出库管理 保存按钮去除物料信息为空的验证

出库管理 保存按钮去除物料信息为空的验证
pull/3/head
siontion 9 months ago
parent d1f55736ec
commit 8c2db2f559

@ -518,10 +518,10 @@ const saveFormData = async () => {
const submitForm = async () => {
//
await formRef.value.validate()
if (formData.value.matItemDOList.length === 0) {
message.alertWarning('请添加物料信息!')
return
}
// if (formData.value.matItemDOList.length === 0) {
// message.alertWarning('!')
// return
// }
//
try {
await matSubFormRef.value.validate()
@ -687,7 +687,12 @@ const handleMatCode = async (scope, matid) => {
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.pnlist = pnList.value.filter(pn => pn.wh_id == formData.value.whId && matLastData.value.filter( mat => mat.matId == matid).length>0)
if(matid.length==0){
scope.row.rgId = ''
scope.row.pnId = ''
}
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([])

Loading…
Cancel
Save