|
|
@ -518,10 +518,10 @@ const saveFormData = async () => {
|
|
|
|
const submitForm = async () => {
|
|
|
|
const submitForm = async () => {
|
|
|
|
// 校验表单
|
|
|
|
// 校验表单
|
|
|
|
await formRef.value.validate()
|
|
|
|
await formRef.value.validate()
|
|
|
|
if (formData.value.matItemDOList.length === 0) {
|
|
|
|
// if (formData.value.matItemDOList.length === 0) {
|
|
|
|
message.alertWarning('请添加物料信息!')
|
|
|
|
// message.alertWarning('请添加物料信息!')
|
|
|
|
return
|
|
|
|
// return
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
// 校验子表单
|
|
|
|
// 校验子表单
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
await matSubFormRef.value.validate()
|
|
|
|
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.matType = scope.row.matList.find((item) => item.id === matid)?.materialType
|
|
|
|
scope.row.matUnit = scope.row.matList.find((item) => item.id === matid)?.unit
|
|
|
|
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([])
|
|
|
|
const matLastData = ref([])
|
|
|
|