pull/4/head
qiuhongwu 8 months ago
parent 411428d486
commit 88dfe85d6a

@ -374,6 +374,7 @@ const handleStatus = async (num) => {
query.id = formData.value.id
query.type = 'update'
openerror()
reload()
}
@ -414,19 +415,23 @@ const UpError = (err, file, fileList) => {
}
const openerror = () => {
setTimeout(() => {
//
ElMessageBox.alert(
// 使
`文件名为:${failedAttachmentsName.value}的上传失败`,
`文件格式不正确或网络问题 请您稍微再试`,
{
dangerouslyUseHTMLString: false, // 使HTMLfalse
confirmButtonText: '知道了',
center: true
}
)
}, 1000)
setTimeout(() => {
if(failedAttachmentsName.value.length>0){
//
ElMessageBox.alert(
// 使
`文件名为:${failedAttachmentsName.value.join(' / ')}上传失败`,
`文件格式不正确或网络问题 请您稍微再试`,
{
dangerouslyUseHTMLString: false, // 使HTMLfalse
confirmButtonText: '知道了',
center: true
}
)
}
}, 1000)
}
const refreshAttachments = (files, type) => {
@ -536,7 +541,6 @@ const submitForm = async () => {
query.type = 'update'
//
openerror()
reload()
}

@ -9,8 +9,7 @@
<img src="/src/assets/imgs/status/statuszf.png" v-else-if="formData.status == 3" alt="" />
<span v-else></span>
</div>
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="100px" v-loading="formLoading"
v-bind:disabled="isShowBtnOther">
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="100px" v-loading="formLoading" v-bind:disabled="isShowBtnOther">
<!-- 基础信息 -->
<el-card class="hl-card-info">
<template #header>
@ -29,8 +28,7 @@
<el-col :span="24">
<el-form-item prop="stockInType" label="出库类型">
<el-select v-model="formData.stockInType" clearable style="width: 100%" @change="handleStockType" v-bind:disabled="ctrView || ctrSave">
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_STORAGE_OUT_TYPE)" :key="dict.value"
:label="dict.label" :value="dict.value" />
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_STORAGE_OUT_TYPE)" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
@ -41,8 +39,7 @@
<el-col :span="24">
<el-form-item prop="industry" label="单据状态">
<el-select v-model="formData.status" placeholder="下拉选择" clearable class="!w-700px" disabled>
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_STORAGE_STATUS)" :key="dict.value"
:label="dict.label" :value="dict.value" />
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_STORAGE_STATUS)" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
@ -50,7 +47,7 @@
<el-row>
<el-col :span="24">
<el-form-item prop="headerNo" label="上游单号">
<el-input v-model="formData.headerNo" class="!w-700px" v-bind:disabled="ctrView || ctrSave || enableHeadNo"/>
<el-input v-model="formData.headerNo" class="!w-700px" v-bind:disabled="ctrView || ctrSave || enableHeadNo" />
</el-form-item>
</el-col>
</el-row>
@ -59,16 +56,14 @@
<el-row>
<el-col :span="24">
<el-form-item label="单据日期" prop="createTime">
<el-date-picker v-model="formData.createTime" value-format="x" placeholder="单据日期" disabled
class="!w-400px" />
<el-date-picker v-model="formData.createTime" value-format="x" placeholder="单据日期" disabled class="!w-400px" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item prop="whId" label="出库仓库" required>
<el-select v-model="formData.whId" placeholder="下拉选择" clearable class="!w-400px" @change="handleWh"
v-bind:disabled="ctrView || ctrSave">
<el-select v-model="formData.whId" placeholder="下拉选择" clearable class="!w-400px" @change="handleWh" v-bind:disabled="ctrView || ctrSave">
<el-option v-for="dict in whList" :key="dict.id" :label="dict.whName" :value="dict.id" />
</el-select>
</el-form-item>
@ -79,7 +74,7 @@
<el-row>
<el-col :span="24">
<el-form-item label="备注" prop="description">
<el-input type="textarea" v-model="formData.description" show-word-limit maxlength="200" class="!w-2080px" v-bind:disabled="ctrView || ctrSave"/>
<el-input type="textarea" v-model="formData.description" show-word-limit maxlength="200" class="!w-2080px" v-bind:disabled="ctrView || ctrSave" />
</el-form-item>
</el-col>
</el-row>
@ -95,17 +90,14 @@
<el-col>
<el-button class="hl-addbutton" type="primary" size="large" v-bind:disabled="ctrView || ctrSave" @click="onAddItem"></el-button>
</el-col>
<el-form ref="matSubFormRef" :model="formData.matItemDOList" :rules="subFormRules"
v-loading="subFormLoading" label-width="0">
<el-form ref="matSubFormRef" :model="formData.matItemDOList" :rules="subFormRules" v-loading="subFormLoading" label-width="0">
<el-table :data="formData.matItemDOList" class="hl-table">
<el-table-column prop="cid" label="序号" :width="80" />
<el-table-column prop="matId" min-width="140" align="center">
<template #header> <span class="hl-table_header">*</span>物料名称 </template>
<template #default="scope">
<el-form-item :prop="`${scope.$index}.matId`" :rules="subFormRules.matId" class="mb-0px!">
<el-select v-model="scope.row.matId" placeholder="物料名称" :remote-method="remoteMatNameSearch" v-bind:disabled="ctrView || ctrSave"
remote-show-suffix remote clearable reserve-keyword filterable :loading="matSelectLoading"
@change="(val) => handleMatName(scope, val)" class="!w-180px">
<el-select v-model="scope.row.matId" placeholder="物料名称" :remote-method="remoteMatNameSearch" v-bind:disabled="ctrView || ctrSave" remote-show-suffix remote clearable reserve-keyword filterable :loading="matSelectLoading" @change="(val) => handleMatName(scope, val)" class="!w-180px">
<el-option v-for="item in matList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
@ -114,24 +106,21 @@
<el-table-column prop="matCode" label="物料编码" min-width="120" align="center" />
<el-table-column prop="matType" label="物料类型" min-width="120" align="center">
<template #default="scope">
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_TYPE" :value="scope.row.matType"
v-if="scope.row.matType ? true : false" />
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_TYPE" :value="scope.row.matType" v-if="scope.row.matType ? true : false" />
</template>
</el-table-column>
<el-table-column prop="matSpec" label="规格/型号" min-width="120" align="center" />
<el-table-column prop="matUnit" label="系统单位" min-width="120" align="center">
<template #default="scope">
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="scope.row.matUnit"
v-if="scope.row.matUnit ? true : false" />
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="scope.row.matUnit" v-if="scope.row.matUnit ? true : false" />
</template>
</el-table-column>
<el-table-column prop="rgId" min-width="120" align="center">
<template #header> <span class="hl-table_header">*</span>出库库区 </template>
<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%"
v-bind:disabled="true">
<el-select v-model="scope.row.rgId" placeholder="" style="width: 100%" v-bind:disabled="true">
<el-option v-for="dict in rgList" :key="dict.id" :label="dict.rg_name" :value="dict.id" />
</el-select>
</el-form-item>
@ -142,8 +131,7 @@
<template #default="scope">
<el-form-item :prop="`${scope.$index}.pnId`" :rules="subFormRules.pnId" class="mb-0px!">
<el-select v-model="scope.row.pnId" placeholder="" style="width: 100%" v-bind:disabled="ctrView || ctrSave" @change="handlePn(scope)">
<el-option v-for="dict in scope.row.pnlist" :key="dict.id" :label="dict.pn_name"
:value="dict.id" />
<el-option v-for="dict in scope.row.pnlist" :key="dict.id" :label="dict.pn_name" :value="dict.id" />
</el-select>
</el-form-item>
</template>
@ -152,16 +140,15 @@
<el-table-column prop="storageOkQty" min-width="120" align="center">
<template #header> <span class="hl-table_header">*</span>出库数量</template>
<template #default="scope">
<el-form-item :prop="`${scope.$index}.storageOkQty`" :rules="subFormRules.storageOkQty"
class="mb-0px!">
<el-input v-model="scope.row.storageOkQty" v-bind:disabled="ctrView || ctrSave"/>
<el-form-item :prop="`${scope.$index}.storageOkQty`" :rules="subFormRules.storageOkQty" class="mb-0px!">
<el-input v-model="scope.row.storageOkQty" v-bind:disabled="ctrView || ctrSave" />
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="lotNo" min-width="120" label="批次号" align="center" v-if="false" />
<el-table-column prop="description" min-width="180" label="备注" align="center">
<template #default="scope">
<el-input v-model="scope.row.description" v-bind:disabled="ctrView || ctrSave"/>
<el-input v-model="scope.row.description" v-bind:disabled="ctrView || ctrSave" />
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="240">
@ -175,8 +162,7 @@
</el-button>
<el-button link type="primary" @click="handlefuke(scope.$index, scope.row)">复制</el-button> -->
<el-button link type="danger" size="small" @click.prevent="handleDelete2(scope.$index)"
v-bind:disabled="ctrView || ctrDelete">
<el-button link type="danger" size="small" @click.prevent="handleDelete2(scope.$index)" v-bind:disabled="ctrView || ctrDelete">
删除
</el-button>
</template>
@ -196,15 +182,12 @@
<el-col>
<el-card class="hl-incard">
<el-col>
<el-upload ref="matUploadRef" :file-list="matUploadFiles" multiple :limit="10" :action="uploadUrl"
:headers="{
<el-upload ref="matUploadRef" :file-list="matUploadFiles" multiple :limit="10" :action="uploadUrl" :headers="{
Authorization: 'Bearer ' + getAccessToken(),
'tenant-id': getTenantId()
}" name="files" :show-file-list="false" :auto-upload="false" :data="matUploadData"
:on-change="matUploadChange"
:on-error="UpError" class="upload-file-uploader" >
}" name="files" :show-file-list="false" :auto-upload="false" :data="matUploadData" :on-change="matUploadChange" :on-error="UpError" class="upload-file-uploader">
<el-button type="primary" v-bind:disabled="ctrView || ctrSave">
<Icon icon="ep:upload-filled" />上传
<Icon icon="ep:upload-filled" />上传
</el-button>
</el-upload>
</el-col>
@ -219,12 +202,10 @@
<el-table-column label="操作" align="center">
<template #default="scope">
<el-button link type="danger" size="small" v-bind:disabled="ctrView || ctrDelete"
@click="handleDeleteAttachment(scope.$index, scope.row.businessFileType)">
<el-button link type="danger" size="small" v-bind:disabled="ctrView || ctrDelete" @click="handleDeleteAttachment(scope.$index, scope.row.businessFileType)">
删除
</el-button>
<el-button link type="primary" size="small" v-bind:disabled="ctrView || ctrDelete"
@click="downloadAttachment(scope.row.name, scope.row.url)">
<el-button link type="primary" size="small" v-bind:disabled="ctrView || ctrDelete" @click="downloadAttachment(scope.row.name, scope.row.url)">
下载
</el-button>
</template>
@ -280,11 +261,11 @@
</el-form>
<div class="text-center hl-footer">
<el-button @click="() => router.go(-1)" size="large"> </el-button>
<el-button @click="submitForm" type="success" v-if="btnSave" size="large">
<el-button @click="submitForm" type="success" v-if="btnSave" size="large">
</el-button>
<el-button @click="handleStatus(2)" type="primary" v-if="btnSave" size="large">
<el-button @click="handleStatus(2)" type="primary" v-if="btnSave" size="large">
</el-button>
<el-button @click="handleStatus(3)" type="danger" v-if="btnCancel" size="large">
<el-button @click="handleStatus(3)" type="danger" v-if="btnCancel" size="large">
</el-button>
</div>
</el-card>
@ -364,16 +345,13 @@ const handleStockType = async (typeid) => {
if (typeid == 1) {
enableHeadNo.value = false
} else {
enableHeadNo.value = true
}
}
const handleStatus = async (num) => {
formData.value.status = num
const data = formData.value as unknown as StorageApi.StorageVO
if(num==2){
if (num == 2) {
//
await formRef.value.validate()
if (formData.value.matItemDOList.length === 0) {
@ -386,8 +364,8 @@ const handleStatus = async (num) => {
} catch (e) {
return
}
//
const matCurrentData = await StorageMatApi.getStorageMatList(0)
//
const matCurrentData = await StorageMatApi.getStorageMatList(0)
var hasRestNum = true
formData.value.matItemDOList.forEach((rest) => {
if (
@ -396,7 +374,8 @@ const handleStatus = async (num) => {
mat.matId == rest.matId &&
mat.pnId == rest.pnId &&
mat.matRest < Number(rest.storageOkQty)
) !== undefined || rest.storageOkQty.length ==0
) !== undefined ||
rest.storageOkQty.length == 0
) {
hasRestNum = false
}
@ -411,11 +390,10 @@ const handleStatus = async (num) => {
await saveFormData()
data.outbound = useUserStore().getUser.id
}else{
await StorageApi.updateStorage(data)
data.cancel = useUserStore().getUser.id
commonResult = 'common.updateSuccess'
} else {
await StorageApi.updateStorage(data)
data.cancel = useUserStore().getUser.id
commonResult = 'common.updateSuccess'
}
await StorageApi.updateStorageStatus(data)
@ -423,11 +401,10 @@ const handleStatus = async (num) => {
query.id = formData.value.id
query.type = 'update'
openerror()
openerror()
reload()
}
// ==================== =======================================
const uploadUrl = ref(import.meta.env.VITE_UPLOAD_BATCH_URL)
const matUploadRef = ref()
@ -456,21 +433,22 @@ const UpError = (err, file, fileList) => {
const openerror = () => {
setTimeout(() => {
//
ElMessageBox.alert(
// 使
`文件名为:${failedAttachmentsName.value}的上传失败`,
`文件格式不正确或网络问题 请您稍微再试`,
{
dangerouslyUseHTMLString: false, // 使HTMLfalse
confirmButtonText: '知道了',
center: true
}
)
if (failedAttachmentsName.value.length > 0) {
//
ElMessageBox.alert(
// 使
`文件名为:${failedAttachmentsName.value.join(' / ')}上传失败`,
`文件格式不正确或网络问题 请您稍微再试`,
{
dangerouslyUseHTMLString: false,
confirmButtonText: '知道了',
center: true
}
)
}
}, 1000)
}
const refreshAttachments = (files, type) => {
formData.value.attachments = formData.value.attachments.filter((value) => value.id)
@ -529,7 +507,6 @@ const saveFormData = async () => {
formData.value.id = await StorageApi.createStorage(data)
commonResult = 'common.createSuccess'
} else {
await StorageApi.updateStorage(data)
commonResult = 'common.updateSuccess'
}
@ -576,7 +553,8 @@ const submitForm = async () => {
mat.matId == rest.matId &&
mat.pnId == rest.pnId &&
mat.matRest < Number(rest.storageOkQty)
) !== undefined || rest.storageOkQty.length ==0
) !== undefined ||
rest.storageOkQty.length == 0
) {
hasRestNum = false
}
@ -601,7 +579,6 @@ const submitForm = async () => {
var matCount = 1
const onAddItem = () => {
if (formData.value.whId) {
const newData = {
//
@ -621,7 +598,7 @@ const onAddItem = () => {
lotNo: '',
description: '',
productBomItemValueDOList: [],
matList : matList.value
matList: matList.value
}
matCount = matCount + 1
@ -648,47 +625,62 @@ const handleWh = async (wid) => {
formData.value.rgId = ''
//
rgList.value = (await RgApi.getSimpList()).filter( rg => rg.wh_id == wid)
rgList.value = (await RgApi.getSimpList()).filter((rg) => rg.wh_id == wid)
//
pnList.value = (await PnApi.getSimpList()).filter( pn => pn.wh_id == wid)
pnList.value = (await PnApi.getSimpList()).filter((pn) => pn.wh_id == wid)
//await getMatList()
}
const getMatList = async (name) =>{
const getMatList = async (name) => {
//
let matParams = {
pageNo: 1,
pageSize: 10,
status: '1'
}
if(name.length>0){
matParams.name = name
}
pageNo: 1,
pageSize: 10,
status: '1'
}
if (name.length > 0) {
matParams.name = name
}
//const matLastRemoteData = await StorageMatApi.getStorageMatList(0)
//const matLastRemoteData = await StorageMatApi.getStorageMatList(0)
const dataMat = await MaterialApi.getMaterialPage(matParams)
matList.value = dataMat.list
// matList.value = dataMat.list.filter(
// (item) =>
// matLastRemoteData.find(
// (fish) => fish.matId === item.id && fish.whId == formData.value.whId
// ) !== undefined
// )
const dataMat = await MaterialApi.getMaterialPage(matParams)
matList.value = dataMat.list
// matList.value = dataMat.list.filter(
// (item) =>
// matLastRemoteData.find(
// (fish) => fish.matId === item.id && fish.whId == formData.value.whId
// ) !== undefined
// )
}
const handlePn = async (scope) =>{
const handlePn = async (scope) => {
scope.row.matList = matList.value
var repeatItem = formData.value.matItemDOList.filter( mat => mat.matId==scope.row.matId && mat.pnId == scope.row.pnId)
if(repeatItem.length>1){
message.alertWarning('物料编码['+repeatItem[0].matCode+']出库库位存在多行数据,请修改,避免重复出库')
return
var repeatItem = formData.value.matItemDOList.filter(
(mat) => mat.matId == scope.row.matId && mat.pnId == scope.row.pnId
)
if (repeatItem.length > 1) {
message.alertWarning(
'物料编码[' + repeatItem[0].matCode + ']出库库位存在多行数据,请修改,避免重复出库'
)
return
}
if (matLastData.value.find((item) => item.matId === scope.row.matId && item.whId== formData.value.whId && item.pnId == scope.row.pnId)) {
const matVo = matLastData.value.find((item) => item.matId === scope.row.matId && item.whId== formData.value.whId && item.pnId == scope.row.pnId)
if (
matLastData.value.find(
(item) =>
item.matId === scope.row.matId &&
item.whId == formData.value.whId &&
item.pnId == scope.row.pnId
)
) {
const matVo = matLastData.value.find(
(item) =>
item.matId === scope.row.matId &&
item.whId == formData.value.whId &&
item.pnId == scope.row.pnId
)
// scope.row.matId = matVo.matId
// scope.row.matName = matVo.matName
// scope.row.matCode = matVo.matCode
@ -701,15 +693,13 @@ const handlePn = async (scope) =>{
// scope.row.storageOkQty = matVo.storageOkQty
// scope.row.lotNo = matVo.lotNo
// scope.row.description = matVo.description
} else{
} else {
scope.row.rgId = ''
scope.row.matRest = '0'
message.alertWarning('当前库位无库存数量可出库')
}
}
const matSelectLoading = ref(false)
const remoteMatNameSearch = async (name) => {
matSelectLoading.value = true
@ -719,20 +709,23 @@ const remoteMatNameSearch = async (name) => {
}
const handleMatName = async (scope, matid) => {
scope.row.matId = scope.row.matList.find((item) => item.id === matid)?.id
scope.row.matName = scope.row.matList.find((item) => item.id === matid)?.name
scope.row.matCode = scope.row.matList.find((item) => item.id === matid)?.code
scope.row.matSpec = scope.row.matList.find((item) => item.id === matid)?.spec
scope.row.matType = scope.row.matList.find((item) => item.id === matid)?.materialType
scope.row.matUnit = scope.row.matList.find((item) => item.id === matid)?.unit
scope.row.rgId = ''
scope.row.pnId = ''
if(matid.length==0){
}
scope.row.matId = scope.row.matList.find((item) => item.id === matid)?.id
scope.row.matName = scope.row.matList.find((item) => item.id === matid)?.name
scope.row.matCode = scope.row.matList.find((item) => item.id === matid)?.code
scope.row.matSpec = scope.row.matList.find((item) => item.id === matid)?.spec
scope.row.matType = scope.row.matList.find((item) => item.id === matid)?.materialType
scope.row.matUnit = scope.row.matList.find((item) => item.id === matid)?.unit
scope.row.rgId = ''
scope.row.pnId = ''
if (matid.length == 0) {
}
scope.row.pnlist = pnList.value.filter(pn => pn.wh_id == formData.value.whId && matLastData.value.filter( mat => mat.matId == matid && mat.pnId == pn.id).length>0)
scope.row.pnlist = pnList.value.filter(
(pn) =>
pn.wh_id == formData.value.whId &&
matLastData.value.filter((mat) => mat.matId == matid && mat.pnId == pn.id).length > 0
)
}
const matLastData = ref([])
@ -746,14 +739,14 @@ const btnCancel = ref(false)
//
const initStatus = async (status) => {
switch(status){
switch (status) {
case 1:
ctrView.value = false
ctrSave.value = false
ctrCancel.value = true
ctrDelete.value = false
btnSave.value= true
btnSave.value = true
btnCancel.value = false
break
case 2:
@ -761,7 +754,7 @@ const initStatus = async (status) => {
ctrSave.value = true
ctrCancel.value = false
ctrDelete.value = true
btnSave.value= false
btnSave.value = false
btnCancel.value = true
break
case 3:
@ -769,21 +762,21 @@ const initStatus = async (status) => {
ctrSave.value = true
ctrCancel.value = true
ctrDelete.value = true
btnSave.value= false
btnSave.value = false
btnCancel.value = false
break
default:
break
}
//
if(query.type === 'review'){
ctrView.value = true
ctrSave.value = true
ctrCancel.value = true
ctrDelete.value = true
btnSave.value= false
btnCancel.value = false
if (query.type === 'review') {
ctrView.value = true
ctrSave.value = true
ctrCancel.value = true
ctrDelete.value = true
btnSave.value = false
btnCancel.value = false
}
}
const matList = ref<MaterialApi.MaterialVO[]>([]) //
@ -793,7 +786,6 @@ const matSimpList = ref([]) // 物料基本信息列表
const matSimpVirtualList = ref([]) //
/** 初始化 **/
onMounted(async () => {
//
dialogTitle.value = query.type === 'review' ? '查看' : t('action.' + query.type)
@ -808,17 +800,15 @@ onMounted(async () => {
//
if (query.id) {
//
matSimpList.value = await MaterialApi.getSimpList()
matSimpVirtualList.value = await MaterialApi.getSimpVirtualList()
matEditList.value = matSimpList.value //matSimpList.value.filter( mat => matLastData.value.filter( row => row.matId == mat.id).length>0)
//
formData.value = await StorageApi.getStorage(query.id)
if(formData.value.vmatName){
if (formData.value.vmatName) {
matEditList.value = matSimpVirtualList.value
}
@ -827,11 +817,11 @@ onMounted(async () => {
//
const dataRgList = await RgApi.getSimpList()
rgList.value = dataRgList.filter( rg => rg.wh_id == formData.value.whId)
rgList.value = dataRgList.filter((rg) => rg.wh_id == formData.value.whId)
//
const dataPnList = await PnApi.getSimpList()
pnList.value = dataPnList.filter( pn => pn.wh_id == formData.value.whId)
pnList.value = dataPnList.filter((pn) => pn.wh_id == formData.value.whId)
//
const queryParamsMat = reactive({
@ -845,13 +835,15 @@ onMounted(async () => {
formData.value.matItemDOList.forEach((item) => {
item.cid = matCount
item.matId = matEditList.value.find((record) => record.id === item.matId)?.id
item.matCode = matEditList.value.find( (record) => record.id === item.matId)?.code
item.matCode = matEditList.value.find((record) => record.id === item.matId)?.code
item.matName = matEditList.value.find((record) => record.id === item.matId)?.name
item.matSpec = matEditList.value.find((record) => record.id === item.matId)?.spec
item.matType = matEditList.value.find((record) => record.id === item.matId)?.material_type
item.matUnit = matEditList.value.find((record) => record.id === item.matId)?.unit
item.matRest = matLastData.value.find( row => row.matId == item.matId && row.pnId == item.pnId)?.matRest
item.matRest = (item.matRest==undefined || item.matRest.length==0)?0:item.matRest
item.matRest = matLastData.value.find(
(row) => row.matId == item.matId && row.pnId == item.pnId
)?.matRest
item.matRest = item.matRest == undefined || item.matRest.length == 0 ? 0 : item.matRest
item.pnlist = pnList.value.filter((pn) => pn.wh_id === item.whId)
item.matList = matEditList.value.filter((record) => record.id === item.matId)
matCount = matCount + 1

Loading…
Cancel
Save