|
|
@ -125,14 +125,44 @@ const buttonBaseClick = (val, item) => { |
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = (row) => { |
|
|
|
return [ |
|
|
|
defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceiptRecordMain:inspectRequest'}), // 生成到货检验申请 |
|
|
|
defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:!row.inspectRequestFlag}),// 生成到货检验申请 |
|
|
|
defaultButtons.mainPutawayRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:!row.putawayRequestFlag}),// 生成采购上架申请 |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
|
const buttonTableClick = async (val, row) => { |
|
|
|
if (val == 'putawayRequest') { // 生成采购上架申请 |
|
|
|
handleExport() |
|
|
|
handleCreatePutawayRequest(row.number) |
|
|
|
}else if(val == 'inspectRequest'){//生成到货检验申请 |
|
|
|
handleCreateInspectRequest(row.number) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 生成采购上架申请按钮操作 */ |
|
|
|
const handleCreatePutawayRequest = async (number:string) => { |
|
|
|
try{ |
|
|
|
await message.confirm(t('确认生成上架申请吗?')) |
|
|
|
tableObject.loading = true |
|
|
|
await PurchasereceiptRecordMainApi.createPutawayRequest(number) |
|
|
|
message.success(t('上架申请生成成功')) |
|
|
|
await getList() |
|
|
|
}catch{}finally{ |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 生成到货检验申请按钮操作 */ |
|
|
|
const handleCreateInspectRequest = async (number:string) => { |
|
|
|
try{ |
|
|
|
await message.confirm(t('确认生成到货检验申请吗?')) |
|
|
|
tableObject.loading = true |
|
|
|
await PurchasereceiptRecordMainApi.createPutawayRequest(number) |
|
|
|
message.success(t('到货检验申请生成成功')) |
|
|
|
await getList() |
|
|
|
}catch{}finally{ |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|