|
|
@ -63,6 +63,7 @@ |
|
|
|
@handleDeleteTable="handleDeleteTable" |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
@submitForm="submitForm" |
|
|
|
@onEnter="onEnter" |
|
|
|
/> |
|
|
|
<!-- 添加明细:采购收货记录单号 --> |
|
|
|
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" /> |
|
|
@ -128,6 +129,14 @@ const isShowButton = ref(true) |
|
|
|
const updataTableColumns = (val) => { |
|
|
|
tableColumns.value = val |
|
|
|
} |
|
|
|
const onEnter = async (field,value)=>{ |
|
|
|
console.log(field,value) |
|
|
|
if('supplierCode'==field){ |
|
|
|
//供应商代码 |
|
|
|
}else if('purchaseReceiptRecordNumber' == field){ |
|
|
|
//采购收货记录 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
@ -195,7 +204,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
|
// 获取子表数据 getBomDisassemble |
|
|
|
// PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailList({ |
|
|
|
PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailListToRepeat({ |
|
|
|
masterId: val[0]['id'] |
|
|
|
masterId: val[0]['masterId'] |
|
|
|
}).then((res) => { |
|
|
|
if (res) tableData.value = res |
|
|
|
tableData.value.forEach((item) => { |
|
|
@ -225,6 +234,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
|
if (item.field == 'qty') { |
|
|
|
item.tableForm.disabled = false |
|
|
|
} |
|
|
|
if (item.field == 'returnedQty') { |
|
|
|
item.tableForm.disabled = false |
|
|
|
} |
|
|
|
if (item.field == 'reason') { |
|
|
|
item.tableForm.disabled = false |
|
|
|
} |
|
|
@ -702,6 +714,10 @@ const handleDeleteTable = (item, index, formRef) => { |
|
|
|
|
|
|
|
// 主子数据 提交 |
|
|
|
const submitForm = async (formType, data) => { |
|
|
|
if(tableData.value.find(item=>Number(item.returnedQty)>Number(item.receiptQty))){ |
|
|
|
message.warning("退货数量不能大于收获数量") |
|
|
|
return; |
|
|
|
} |
|
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
|
try { |
|
|
|
if (formType === 'create') { |
|
|
|