库存盘点 选中物料列表交互

库存盘点 选中物料列表交互
pull/3/head
siontion 9 months ago
parent db66895c9a
commit 547e4d9d68

@ -62,7 +62,7 @@
<el-row>
<el-col :span="24">
<el-form-item label="排除库存为0的物料?" prop="noZero">
<el-radio-group v-model="formData.noZero" >
<el-radio-group v-model="formData.noZero" disabled>
<el-radio v-for="dict in getIntDictOptions(DICT_TYPE.HELI_COMMON_IS_OR_NOT)" :key="dict.value"
:label="dict.value">
{{ dict.label }}
@ -75,7 +75,7 @@
<el-col :span="24">
<el-form-item label="盘点开始日期" prop="checkTime">
<el-date-picker v-model="formData.checkTime" value-format="x" placeholder="盘点开始时间"
class="!w-220px" />
class="!w-220px" disabled />
</el-form-item>
</el-col>
</el-row>
@ -84,7 +84,7 @@
<el-row>
<el-col :span="20">
<el-form-item label="备注" prop="description">
<el-input type="textarea" v-model="formData.description" show-word-limit maxlength="200" />
<el-input type="textarea" v-model="formData.description" show-word-limit maxlength="200" disabled />
</el-form-item>
</el-col>
</el-row>
@ -98,7 +98,7 @@
<el-col>
<el-card class="hl-incard">
<el-col>
<el-button class="hl-addbutton" type="primary" size="large" @click="openMatForm(1)"></el-button>
<el-button class="hl-addbutton" type="primary" size="large" @click="openMatForm"></el-button>
</el-col>
<el-form ref="matSubFormRef" :model="formData.matItemDOList" :rules="subFormRules"
v-loading="subFormLoading" label-width="0">
@ -323,8 +323,9 @@ const formRef = ref() // 表单 Ref
const matSubFormRef = ref() // Ref
const matOpenFormRef = ref()
const openMatForm = (noZero: number,whId?: number,isAll?: number) => {
matOpenFormRef.value.open(noZero,whId, isAll)
const openMatForm = () => {
//noZero: number,whId?: number,isAll?: number
matOpenFormRef.value.open(formData.value.noZero,formData.value.whId, formData.value.checkType)
}
const subFormLoading = ref(false) //
@ -353,6 +354,7 @@ const handleStatus = async (num) => {
const getList = async (arrMat) => {
message.alertWarning('数组个数为:'+arrMat.length)
formData.value.matItemDOList = arrMat
}
const userList = ref<UserApi.UserVO[]>([]) //

@ -1,9 +1,9 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible">
<el-form ref="matSubFormRef" :model="list" v-loading="formLoading" label-width="0">
<el-table :data="list" class="hl-table" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" disabled="true" />
<el-table-column prop="cid" label="序号" :width="80" />
<el-form :model="list" v-loading="formLoading" label-width="0" >
<el-table ref="matSubFormRef" :data="list" class="hl-table" @selection-change="handleSelectionChange" :row-key="getRowKeys" min-width="1800">
<el-table-column type="selection" width="55" :reserve-selection="true" :selectable="row=>chkboxEnable" />
<el-table-column prop="no" label="序号" min-width="120" align="center" />
<el-table-column prop="matCode" label="物料编码" min-width="120" align="center" />
<el-table-column prop="matName" label="物料名称" min-width="140" align="center" />
<el-table-column prop="matType" label="物料类型" min-width="120" align="center" />
@ -23,9 +23,12 @@
</Dialog>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import * as StorageLogApi from '@/api/heli/storagelog'
//:selectable="row=>row.disabled || chkboxEnable"
const chkboxEnable = ref(true)
const { t } = useI18n() //
const message = useMessage() //
@ -36,11 +39,15 @@ const formLoading = ref(false) // 表单的加载中1修改时的数据加
const list = ref([]) //
const total = ref(0) //
const multipleSelection = ref([])
const matSubFormRef = ref()
const handleSelectionChange = async (val) =>{
multipleSelection.value = val;
}
//key,
const getRowKeys = (row) => {
return row.matId;
};
const queryParams = reactive({
pageNo: 1,
pageSize: 10
@ -51,13 +58,25 @@ const open = async (noZero: number, whId?: number, isAll?: number) => {
dialogVisible.value = true
dialogTitle.value = '物料列表'
message.alertWarning(noZero)
//
formLoading.value = true
const data = await StorageLogApi.getStorageNowPage(queryParams)
list.value = data.list
total.value = data.total
chkboxEnable.value = isAll ===2 ? false :true
var iNum =1
list.value.forEach(row => {
row.isCopy = 0
row.no = iNum
iNum = iNum+1
setTimeout(() => {
matSubFormRef.value.toggleRowSelection(row,!chkboxEnable.value); //
}, 0);
//matSubFormRef.value.toggleRowSelection(row,chkboxEnable.value)
})
try {
//
} finally {

Loading…
Cancel
Save