|
@ -265,14 +265,7 @@ 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] |
|
|
|
|
|
}) |
|
|
|
|
|
console.log('物料供应商',res) |
|
|
|
|
|
if(res&&res.length>0){ |
|
|
|
|
|
PurchasereturnRequestMainNew.allSchemas.formSchema.forEach(item=>{ |
|
|
|
|
|
if(item.field == 'supplierCode'){ |
|
|
|
|
|
//重置 |
|
|
|
|
|
setV['supplierCode'] = '' |
|
|
setV['supplierCode'] = '' |
|
|
setV['supplierName'] = '' |
|
|
setV['supplierName'] = '' |
|
|
setV['hahaha'] = '' |
|
|
setV['hahaha'] = '' |
|
@ -281,16 +274,27 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro |
|
|
setV['receiptNumber'] = '' |
|
|
setV['receiptNumber'] = '' |
|
|
setV['asnNumber'] = '' |
|
|
setV['asnNumber'] = '' |
|
|
tableData.value = [] |
|
|
tableData.value = [] |
|
|
item.componentProps.options = res |
|
|
getSupplierOptions(val[0][searchField]) |
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
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'] |
|
|