|
@ -146,7 +146,8 @@ import { |
|
|
PurchasereturnRequestDetail, |
|
|
PurchasereturnRequestDetail, |
|
|
PurchasereturnRequestDetailRules, |
|
|
PurchasereturnRequestDetailRules, |
|
|
PurchasereReturnRequestDetailLabel, |
|
|
PurchasereReturnRequestDetailLabel, |
|
|
PurchasereceiptRecordMain1 |
|
|
PurchasereceiptRecordMain1, |
|
|
|
|
|
PurchasereturnPurchasereceiptRecord |
|
|
} from './purchasereturnRequestMain.data' |
|
|
} from './purchasereturnRequestMain.data' |
|
|
import * as PurchasereturnRequestMainApi from '@/api/wms/purchasereturnRequestMain' |
|
|
import * as PurchasereturnRequestMainApi from '@/api/wms/purchasereturnRequestMain' |
|
|
import * as PurchasereturnRequestDetailApi from '@/api/wms/purchasereturnRequestDetail' |
|
|
import * as PurchasereturnRequestDetailApi from '@/api/wms/purchasereturnRequestDetail' |
|
@ -185,18 +186,29 @@ const updataTableColumns = (val) => { |
|
|
|
|
|
|
|
|
const onChangeForm = (field, cur, formRef)=>{ |
|
|
const onChangeForm = (field, cur, formRef)=>{ |
|
|
console.log('onChangeForm',field, cur, formRef) |
|
|
console.log('onChangeForm',field, cur, formRef) |
|
|
console.log('1111') |
|
|
if(field=='supplierCode'){ |
|
|
console.log(PurchasereturnRequestMain.allSchemas) |
|
|
//供应商 |
|
|
PurchasereturnRequestMain.allSchemas.formSchema.forEach(item=>{ |
|
|
PurchasereturnRequestMain.allSchemas.formSchema.forEach(item=>{ |
|
|
if(item.field == field){ |
|
|
|
|
|
// 物料名称赋值 |
|
|
// 物料名称赋值 |
|
|
|
|
|
if(item.field=='supplierCode'){ |
|
|
let setV = {} |
|
|
let setV = {} |
|
|
setV['supplierName'] = item.componentProps.options?.find(el=>el.id==cur)['nickname'] |
|
|
setV['supplierName'] = item.componentProps.options?.find(el=>el.supplierCode==cur+'')['supplierName'] |
|
|
formRef.value.setValues(setV) |
|
|
formRef.value.setValues(setV) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
}else if(field == 'locationCode'){ |
|
|
|
|
|
// 退货库位 获取明细列表 |
|
|
|
|
|
tableData.value = [{ |
|
|
|
|
|
'batch':'20240908', |
|
|
|
|
|
'status':'合格', |
|
|
|
|
|
'inventoryBalance':300, |
|
|
|
|
|
'qty':1, |
|
|
|
|
|
'reason':'200', |
|
|
|
|
|
'remark':'', |
|
|
|
|
|
}] |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
const onEnter = async (field, value) => { |
|
|
const onEnter = async (field, value) => { |
|
|
console.log(field, value) |
|
|
console.log(field, value) |
|
|
|
|
|
|
|
@ -258,18 +270,25 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro |
|
|
setV[formField] = val[0][searchField] |
|
|
setV[formField] = val[0][searchField] |
|
|
if(formField=='itemCode'){ |
|
|
if(formField=='itemCode'){ |
|
|
// 更换查询 供应商下拉框数据 |
|
|
// 更换查询 供应商下拉框数据 |
|
|
|
|
|
let res = await PurchasereturnRequestDetailApi.getPurchasereturnSupplierByCode({ |
|
|
|
|
|
itemCode:val[0][searchField] |
|
|
|
|
|
}) |
|
|
|
|
|
console.log('物料供应商',res) |
|
|
|
|
|
if(res&&res.length>0){ |
|
|
PurchasereturnRequestMain.allSchemas.formSchema.forEach(item=>{ |
|
|
PurchasereturnRequestMain.allSchemas.formSchema.forEach(item=>{ |
|
|
if(item.field == 'supplierCode1'){ |
|
|
if(item.field == 'supplierCode'){ |
|
|
item.componentProps.options = [ |
|
|
item.componentProps.options = res |
|
|
{ |
|
|
|
|
|
id:'454556', |
|
|
|
|
|
nickname:'哈哈哈哈' |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
|
|
|
formRef.setValues(setV) |
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
}else if(formField=='hahaha'){ |
|
|
|
|
|
// 选择收货单明细 |
|
|
|
|
|
setV['poNumber'] = val[0]['poNumber'] |
|
|
|
|
|
setV['poLine'] = val[0]['poLine'] |
|
|
|
|
|
setV['receiptNumber'] = val[0]['receiptNumber'] |
|
|
|
|
|
setV['asnNumber'] = val[0]['asnNumber'] |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
formRef.setValues(setV) |
|
|
formRef.setValues(setV) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -585,26 +604,23 @@ const chooseReceiptList = ()=>{ |
|
|
message.error('请选择物料代码') |
|
|
message.error('请选择物料代码') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
if(!formRef.value.formRef.formModel.supplierName){ |
|
|
if(!formRef.value.formRef.formModel.supplierCode){ |
|
|
message.error('请选择供应商') |
|
|
message.error('请选择供应商') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
searchTableRef.value.open( |
|
|
searchTableRef.value.open( |
|
|
"收货单明细", |
|
|
"收货单明细", |
|
|
Itembasic.allSchemas, |
|
|
PurchasereturnPurchasereceiptRecord.allSchemas, |
|
|
ItembasicApi.getItembasicPage, |
|
|
PurchasereturnRequestDetailApi.getPurchasereturnPurchasereceiptRecordByItemCode, |
|
|
"hahaha", |
|
|
"hahaha", |
|
|
"hahaha", |
|
|
"hahaha", |
|
|
false, |
|
|
false, |
|
|
'tableForm', |
|
|
'tableForm', |
|
|
null, |
|
|
null, |
|
|
[{ |
|
|
{ |
|
|
key: 'available', |
|
|
supplierCode:formRef.value.formRef.formModel.supplierCode, |
|
|
value: 'TRUE', |
|
|
itemCode:formRef.value.formRef.formModel.itemCode |
|
|
action: '==', |
|
|
}, |
|
|
isSearch: true, |
|
|
|
|
|
isMainValue: false |
|
|
|
|
|
}], |
|
|
|
|
|
undefined, |
|
|
undefined, |
|
|
false, |
|
|
false, |
|
|
null |
|
|
null |
|
|