|
|
@ -265,14 +265,7 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro |
|
|
|
if(formField=='itemCode'){ |
|
|
|
setV['itemName'] = val[0]['name'] |
|
|
|
// 更换查询 供应商下拉框数据 |
|
|
|
let res = await PurchasereturnRequestDetailApi.getPurchasereturnSupplierByCode({ |
|
|
|
itemCode:val[0][searchField] |
|
|
|
}) |
|
|
|
console.log('物料供应商',res) |
|
|
|
if(res&&res.length>0){ |
|
|
|
PurchasereturnRequestMainNew.allSchemas.formSchema.forEach(item=>{ |
|
|
|
if(item.field == 'supplierCode'){ |
|
|
|
//重置 |
|
|
|
// 重置数据 |
|
|
|
setV['supplierCode'] = '' |
|
|
|
setV['supplierName'] = '' |
|
|
|
setV['hahaha'] = '' |
|
|
@ -281,16 +274,27 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro |
|
|
|
setV['receiptNumber'] = '' |
|
|
|
setV['asnNumber'] = '' |
|
|
|
tableData.value = [] |
|
|
|
item.componentProps.options = res |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
getSupplierOptions(val[0][searchField]) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
formRef.setValues(setV) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
const getSupplierOptions = async (itemCode)=>{ |
|
|
|
let res = await PurchasereturnRequestDetailApi.getPurchasereturnSupplierByCode({ |
|
|
|
itemCode |
|
|
|
}) |
|
|
|
console.log('物料供应商',res) |
|
|
|
if(res&&res.length>0){ |
|
|
|
PurchasereturnRequestMainNew.allSchemas.formSchema.forEach(item=>{ |
|
|
|
if(item.field == 'supplierCode'){ |
|
|
|
item.componentProps.options = res |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
// 查询页面返回——详情 |
|
|
|
const searchTableSuccessDetail = (formField, searchField, val, formRef) => { |
|
|
|
nextTick(() => { |
|
|
@ -507,7 +511,7 @@ const buttonTableClick = async (val, row) => { |
|
|
|
|
|
|
|
/** 添加/修改操作 */ |
|
|
|
const formRef = ref() |
|
|
|
const openForm = async (type: string, row?: number) => { |
|
|
|
const openForm = async (type: string, row?: Object) => { |
|
|
|
|
|
|
|
isShowButton.value = true |
|
|
|
if (type == 'create') { |
|
|
@ -525,6 +529,14 @@ const openForm = async (type: string, row?: number) => { |
|
|
|
}) |
|
|
|
} |
|
|
|
if (type == 'update') { |
|
|
|
let updateData = await PurchasereturnRequestDetailApi.getPurchasereturnRequestDetailEditData({ |
|
|
|
masterId:row.masterId |
|
|
|
}) |
|
|
|
console.log('updateData',updateData) |
|
|
|
if(updateData){ |
|
|
|
updateData['hahaha'] = updateData['poNumber'] |
|
|
|
} |
|
|
|
getSupplierOptions(updateData['itemCode']) |
|
|
|
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => { |
|
|
|
if (item.field == 'supplierCode') { |
|
|
|
item.componentProps.disabled = true |
|
|
@ -535,9 +547,7 @@ const openForm = async (type: string, row?: number) => { |
|
|
|
item.componentProps.isSearchList = false |
|
|
|
} |
|
|
|
}) |
|
|
|
tableData.value = [{ |
|
|
|
|
|
|
|
}] |
|
|
|
tableData.value = updateData.subList||[] |
|
|
|
} |
|
|
|
formRef.value.open(type, row) |
|
|
|
} |
|
|
@ -839,7 +849,7 @@ const searchTableSuccess1 = (formField, searchField, val, type, row) => { |
|
|
|
if(formField=='hahaha'){ |
|
|
|
// 选择收货单明细 |
|
|
|
const setV = {} |
|
|
|
setV['hahaha'] = val[0]['asnNumber'] |
|
|
|
setV['hahaha'] = val[0]['poNumber'] |
|
|
|
setV['poNumber'] = val[0]['poNumber'] |
|
|
|
setV['poLine'] = val[0]['poLine'] |
|
|
|
setV['receiptNumber'] = val[0]['receiptNumber'] |
|
|
|