|
|
|
@ -126,7 +126,7 @@
|
|
|
|
|
<el-table-column prop="rgId" width="140" label="出库库区" required>
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-form-item :prop="`${scope.$index}.rgId`" :rules="subFormRules.rgId" class="mb-0px!">
|
|
|
|
|
<el-select v-model="scope.row.rgId" placeholder="" style="width: 100%" @change="handleRg(scope)">
|
|
|
|
|
<el-select v-model="scope.row.rgId" placeholder="" style="width: 100%" @change="handleRg(scope)" disabled="">
|
|
|
|
|
<el-option v-for="dict in rgList" :key="dict.id" :label="dict.rgName" :value="dict.id" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -450,7 +450,7 @@ const submitForm = async () => {
|
|
|
|
|
item.whId = formData.value.whId
|
|
|
|
|
})
|
|
|
|
|
const dataMats = formData.value.matItemDOList as unknown as StorageMatApi.StorageMatVO[]
|
|
|
|
|
await StorageMatApi.createStorageMatBatch(dataMats)
|
|
|
|
|
await StorageMatApi.createStorageMatBatch(dataMats, storageid.value)
|
|
|
|
|
|
|
|
|
|
//附件信息保存
|
|
|
|
|
matUploadFiles.value = { 'businessType': 'STORAGE', 'businessId': storageid, 'businessFileType': '' }
|
|
|
|
@ -563,7 +563,7 @@ const remoteMatCodeSearch = async (name) => {
|
|
|
|
|
|
|
|
|
|
const handleMatCode = async (scope, matid) => {
|
|
|
|
|
|
|
|
|
|
if (matid) {
|
|
|
|
|
if (matid && matLastData.value.find((item) => item.matId === matid)) {
|
|
|
|
|
const matVo = matLastData.value.find((item) => item.matId === matid)
|
|
|
|
|
scope.row.matId = matVo.matId
|
|
|
|
|
scope.row.matName = matVo.matName
|
|
|
|
@ -700,22 +700,22 @@ onMounted(async () => {
|
|
|
|
|
const matVos = await MaterialApi.getMaterialPage(queryParamsMat2)
|
|
|
|
|
|
|
|
|
|
formData.value.matItemDOList.forEach(item => {
|
|
|
|
|
// item.cid = matCount
|
|
|
|
|
// item.matId = matVos.list.find((record) => record.id === item.matId)?.id
|
|
|
|
|
// //item.matCode = matVos.list.find( (record) => record.id === item.matId)?.id
|
|
|
|
|
// item.matCode = matVos.list.find((record) => record.id === item.matId)?.code
|
|
|
|
|
// item.matSpec = matVos.list.find((record) => record.id === item.matId)?.spec
|
|
|
|
|
// item.matType = matVos.list.find((record) => record.id === item.matId)?.materialType
|
|
|
|
|
// item.matUnit = matVos.list.find((record) => record.id === item.matId)?.unit
|
|
|
|
|
// item.pnlist = pnList.value.filter((pn) => pn.rgId === item.rgId)
|
|
|
|
|
// item.matRest = matLastData.value.find((rest) => rest.rgId === item.rgId && rest.pnId === item.pnId)?.matRest
|
|
|
|
|
// matCount = matCount + 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
item = matLastData.value.find((rest) => rest.rgId === item.rgId && rest.pnId === item.pnId)
|
|
|
|
|
item.pnlist = pnList.value.filter((pn) => pn.rgId === item.rgId)
|
|
|
|
|
item.cid = matCount
|
|
|
|
|
item.matId = matVos.list.find((record) => record.id === item.matId)?.id
|
|
|
|
|
//item.matCode = matVos.list.find( (record) => record.id === item.matId)?.id
|
|
|
|
|
item.matCode = matVos.list.find((record) => record.id == item.matId)?.code
|
|
|
|
|
item.matSpec = matVos.list.find((record) => record.id == item.matId)?.spec
|
|
|
|
|
item.matType = matVos.list.find((record) => record.id == item.matId)?.materialType
|
|
|
|
|
item.matUnit = matVos.list.find((record) => record.id == item.matId)?.unit
|
|
|
|
|
item.pnlist = pnList.value.filter((pn) => pn.rgId == item.rgId)
|
|
|
|
|
item.matRest = matLastData.value.find((rest) => rest.rgId == item.rgId && rest.pnId == item.pnId)?.matRest
|
|
|
|
|
matCount = matCount + 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// item = matLastData.value.find((rest) => rest.rgId === item.rgId && rest.pnId === item.pnId)
|
|
|
|
|
// item.pnlist = pnList.value.filter((pn) => pn.rgId === item.rgId)
|
|
|
|
|
// item.cid = matCount
|
|
|
|
|
// matCount = matCount + 1
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|