|
@ -225,12 +225,11 @@ const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { |
|
|
//console.log("formRef",formRef) |
|
|
//console.log("formRef",formRef) |
|
|
console.log("searchTableSuccess",formField, searchField, val, formRef, type, row) |
|
|
console.log("searchTableSuccess",formField, searchField, val, formRef, type, row) |
|
|
nextTick(() => { |
|
|
nextTick(async () => { |
|
|
if (type == 'tableForm') { |
|
|
if (type == 'tableForm') { |
|
|
// 明细查询页赋值 |
|
|
// 明细查询页赋值 |
|
|
//row[formField] = val[0][searchField] |
|
|
//row[formField] = val[0][searchField] |
|
@ -276,8 +275,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
//新增--采购订单-- |
|
|
//新增--采购订单-- |
|
|
setV['supplierCode'] = val[0]['supplierCode'] |
|
|
setV['supplierCode'] = val[0]['supplierCode'] |
|
|
setV['poNumber'] = val[0]['number'] |
|
|
setV['poNumber'] = val[0]['number'] |
|
|
const newRow = val[0] |
|
|
let res = await PurchasereceiptRequestMainApi.queryPurchasePlan({ |
|
|
newRow['poNumber'] = val[0]['number'] |
|
|
"poNumber": val[0]['number']//采购订单号 |
|
|
|
|
|
}) |
|
|
|
|
|
console.log('默认到库位res',res) |
|
|
|
|
|
if(res&&res['toLocationCode']){ |
|
|
|
|
|
setV['onlyDefaultToLocationCode'] = res['toLocationCode'] // 仅仅用来存储数据--用于给子表赋值 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 请求明细数据 |
|
|
// 请求明细数据 |
|
|
getSearchTableData(val[0]['number']) |
|
|
getSearchTableData(val[0]['number']) |
|
|
// tableData.value = [newRow] |
|
|
// tableData.value = [newRow] |
|
@ -580,7 +585,11 @@ const updateTableData = (tableList)=>{ |
|
|
newRow['arriveDate'] = dayjs().valueOf() |
|
|
newRow['arriveDate'] = dayjs().valueOf() |
|
|
//批次 |
|
|
//批次 |
|
|
newRow['batch'] = formatDate(newRow['produceDate'],'YYYYMMDD'); |
|
|
newRow['batch'] = formatDate(newRow['produceDate'],'YYYYMMDD'); |
|
|
newRow['defaultToLocationCode'] =row['defaultLocation'] |
|
|
// newRow['defaultToLocationCode'] =row['defaultLocation'] |
|
|
|
|
|
if(!newRow['defaultToLocationCode']){ |
|
|
|
|
|
newRow['defaultToLocationCode'] = formRef.value.formRef.formModel['onlyDefaultToLocationCode'] |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if(!tableData.value.find((item:object)=>item.poNumber == newRow.poNumber&&item.itemCode == newRow.itemCode&&item.poLine == newRow.poLine&&item.batch == newRow.batch)){ |
|
|
if(!tableData.value.find((item:object)=>item.poNumber == newRow.poNumber&&item.itemCode == newRow.itemCode&&item.poLine == newRow.poLine&&item.batch == newRow.batch)){ |
|
|
tableData.value.push(newRow) |
|
|
tableData.value.push(newRow) |
|
|
} |
|
|
} |
|
|