|
|
@ -136,8 +136,10 @@ const buttonBaseClick = (val, item) => { |
|
|
|
const butttondata = (row) => { |
|
|
|
return [ |
|
|
|
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, 'publish'),hasPermi: 'wms:inspection-recode-first-main:update' }), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn({hasPermi: 'wms:inspection-recode-first-main:delete' }), // 删除 |
|
|
|
defaultButtons.mainListDeleteBtn({ hide: isShowMainButton(row, 'publish'),hasPermi: 'wms:inspection-recode-first-main:delete' }), // 删除 |
|
|
|
defaultButtons.mainListOrderPubBtn({ hide: isShowMainButton(row, 'publish'), hasPermi: 'qms:inspection-recode-first-main:pub' }), // 发布 |
|
|
|
|
|
|
|
defaultButtons.mainExport({ hide: !row.isPublished}), // 导出 |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
@ -153,6 +155,9 @@ const buttonBaseClick = (val, item) => { |
|
|
|
handleDelete(row.id) |
|
|
|
}else if (val == 'mainOrderPub') { //发布 |
|
|
|
handleOrderPub(row) |
|
|
|
}else if (val == 'mainExport') { |
|
|
|
// 导出 |
|
|
|
handleMainExport(row) |
|
|
|
} |
|
|
|
} |
|
|
|
/** 添加/修改操作 */ |
|
|
@ -194,9 +199,24 @@ const buttonBaseClick = (val, item) => { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 列表导出按钮操作 */ |
|
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
|
const handleMainExport = async (row: any) => { |
|
|
|
try { |
|
|
|
await message.exportConfirm() |
|
|
|
// 发起导出 |
|
|
|
exportLoading.value = true |
|
|
|
tableObject.params.number = row.number |
|
|
|
const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params) |
|
|
|
download.excel(data, '首件检验记录.xlsx') |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
|
exportLoading.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 导出按钮操作 */ |
|
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
|
const handleExport = async () => { |
|
|
|
try { |
|
|
|
// 导出的二次确认 |
|
|
@ -204,7 +224,7 @@ const buttonBaseClick = (val, item) => { |
|
|
|
// 发起导出 |
|
|
|
exportLoading.value = true |
|
|
|
const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params) |
|
|
|
download.excel(data, '备件申领记录主.xlsx') |
|
|
|
download.excel(data, '首件检验记录.xlsx') |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
|
exportLoading.value = false |
|
|
|