|
|
@ -264,7 +264,7 @@ const butttondata = (row) => { |
|
|
|
defaultButtons.mainListDocumentPrintBtn({ hide: isShowMainButton(row, ['3','8']) }), // 单据打印 |
|
|
|
// 生成记录 |
|
|
|
{ |
|
|
|
label: '处理', |
|
|
|
label: '发货', |
|
|
|
name: 'genRecords', |
|
|
|
hide: isShowMainButton(row, ['3']), |
|
|
|
type: 'primary', |
|
|
@ -462,14 +462,28 @@ const handleTur = async (id: number) => { |
|
|
|
/** 处理按钮操作 */ |
|
|
|
const genRecords = async (id: number) => { |
|
|
|
try { |
|
|
|
// 处理的二次确认 |
|
|
|
await message.confirm('是否处理所选中数据?') |
|
|
|
tableObject.loading = true |
|
|
|
// 发起处理 |
|
|
|
await SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id) |
|
|
|
message.success(t('处理成功!')) |
|
|
|
// 刷新列表 |
|
|
|
await getList() |
|
|
|
await SupplierdeliverRequestMainApi.selfCheckReport(id).then(res => { |
|
|
|
if(!res){ |
|
|
|
message.warning("请先上传自检报告!") |
|
|
|
return |
|
|
|
}else{ |
|
|
|
// 处理的二次确认 |
|
|
|
message.confirm('是否处理所选中数据?') |
|
|
|
tableObject.loading = true |
|
|
|
// 发起处理 |
|
|
|
SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id).then(res => { |
|
|
|
if(!res){ |
|
|
|
message.success(t('处理成功!')) |
|
|
|
// 单据打印 |
|
|
|
handleDocumentPrint(id) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 刷新列表 |
|
|
|
getList() |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
console.log("自检报告校验异常",err) |
|
|
|
}) |
|
|
|
} catch {}finally{ |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
|