Browse Source

HL-4862创建采购收货申请时,“到库位代码”默认为待检库

hella_online_20240904
yufei_wang 2 months ago
parent
commit
29182329bc
  1. 19
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

19
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

@ -225,12 +225,11 @@ const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row
}
})
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
//console.log("formRef",formRef)
console.log("searchTableSuccess",formField, searchField, val, formRef, type, row)
nextTick(() => {
nextTick(async () => {
if (type == 'tableForm') {
//
//row[formField] = val[0][searchField]
@ -276,8 +275,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
//----
setV['supplierCode'] = val[0]['supplierCode']
setV['poNumber'] = val[0]['number']
const newRow = val[0]
newRow['poNumber'] = val[0]['number']
let res = await PurchasereceiptRequestMainApi.queryPurchasePlan({
"poNumber": val[0]['number']//
})
console.log('默认到库位res',res)
if(res&&res['toLocationCode']){
setV['onlyDefaultToLocationCode'] = res['toLocationCode'] // --
}
//
getSearchTableData(val[0]['number'])
// tableData.value = [newRow]
@ -580,7 +585,11 @@ const updateTableData = (tableList)=>{
newRow['arriveDate'] = dayjs().valueOf()
//
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)){
tableData.value.push(newRow)
}

Loading…
Cancel
Save