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