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