Browse Source

修改采购收货

master
zhaoxuebing 10 months ago
parent
commit
2588f24b3e
  1. 11
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

11
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -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 {

Loading…
Cancel
Save