|
@ -143,6 +143,7 @@ const updataTableColumns = (val) => { |
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
|
|
|
|
console.log("formField:",formField) |
|
|
if (type == 'tableForm') { |
|
|
if (type == 'tableForm') { |
|
|
// 明细查询页赋值 |
|
|
// 明细查询页赋值 |
|
|
row[formField] = val[0][searchField] |
|
|
row[formField] = val[0][searchField] |
|
@ -152,9 +153,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
row['poLine'] = val[0]['poLine'] |
|
|
row['poLine'] = val[0]['poLine'] |
|
|
row['uom'] = val[0]['uom'] |
|
|
row['uom'] = val[0]['uom'] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
const setV = {} |
|
|
const setV = {} |
|
|
setV[formField] = val[0][searchField] |
|
|
setV[formField] = val[0][searchField] |
|
|
|
|
|
if(formField == 'ppNumber'){ |
|
|
|
|
|
// 清空子表数据 |
|
|
|
|
|
tableData.value = [] // 重置明细数据 |
|
|
|
|
|
} |
|
|
formRef.setValues(setV) |
|
|
formRef.setValues(setV) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -643,6 +649,11 @@ const submitForm = async (formType, data) => { |
|
|
} |
|
|
} |
|
|
try { |
|
|
try { |
|
|
if (formType === 'create') { |
|
|
if (formType === 'create') { |
|
|
|
|
|
if(tableData.value.length <= 0){ |
|
|
|
|
|
message.warning(`子表明细不能为空!`) |
|
|
|
|
|
formRef.value.formLoading = false |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
await SupplierdeliverRequestMainApi.createSupplierdeliverRequestMain(data) |
|
|
await SupplierdeliverRequestMainApi.createSupplierdeliverRequestMain(data) |
|
|
message.success(t('common.createSuccess')) |
|
|
message.success(t('common.createSuccess')) |
|
|
} else { |
|
|
} else { |
|
|