|
|
@ -129,9 +129,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
row[formField] = val[0][searchField] |
|
|
|
} else { |
|
|
|
const setV = {} |
|
|
|
if(formField == 'itemCode') { |
|
|
|
row['uom'] = val[0]['customerUom'] |
|
|
|
} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
formRef.setValues(setV) |
|
|
|
} |
|
|
@ -378,6 +375,16 @@ const flag = ref(false) |
|
|
|
// 主子数据 提交 |
|
|
|
const submitForm = async (formType, data) => { |
|
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
|
// 判断是否重复物料 |
|
|
|
let isExist = false |
|
|
|
tableData.value.forEach(item => { |
|
|
|
let rs = tableData.value.filter(filterItem => (filterItem.itemCode == item.itemCode)) |
|
|
|
if(rs.length > 1) isExist = true |
|
|
|
}) |
|
|
|
if (isExist) { |
|
|
|
formRef.value.formLoading = false |
|
|
|
return message.warning('物料代码重复') |
|
|
|
} |
|
|
|
data.subList.forEach(obj => { |
|
|
|
if(obj.qty == 0){ |
|
|
|
message.error(`数量不能为0!`) |
|
|
|