|
@ -161,10 +161,10 @@ |
|
|
// 列表-操作按钮 |
|
|
// 列表-操作按钮 |
|
|
const butttondata = (row) => { |
|
|
const butttondata = (row) => { |
|
|
return [ |
|
|
return [ |
|
|
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 |
|
|
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:accept'}), // 承接 |
|
|
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), // 关闭 |
|
|
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:close'}), // 关闭 |
|
|
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 |
|
|
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:abandon'}), // 放弃 |
|
|
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // 执行 |
|
|
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:execute'}), // 执行 |
|
|
defaultButtons.mainListPackageBtn(null), // 包装 |
|
|
defaultButtons.mainListPackageBtn(null), // 包装 |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
@ -176,10 +176,15 @@ const listTableRef = ref() |
|
|
}else if (val == 'mainPackage') { // 包装 |
|
|
}else if (val == 'mainPackage') { // 包装 |
|
|
const list = await InspectionJobMainApi.getInspectionJobPackageList(row.id) |
|
|
const list = await InspectionJobMainApi.getInspectionJobPackageList(row.id) |
|
|
listTableRef.value.openPackage(row,'包装信息',InspectionJobPackage.allSchemas.tableColumns,list) |
|
|
listTableRef.value.openPackage(row,'包装信息',InspectionJobPackage.allSchemas.tableColumns,list) |
|
|
} |
|
|
}else if (val == 'mainJobAba') { // 放弃 |
|
|
else if (val == 'mainJobClo') { // 关闭 |
|
|
console.log('列表-操作按钮事件-放弃') |
|
|
handleDelete(row.id) |
|
|
handleAbandon(row.id) |
|
|
} |
|
|
} else if (val == 'mainJobClo') { // 关闭 |
|
|
|
|
|
handleClose(row.id) |
|
|
|
|
|
} else if (val == 'mainJobAcc') { // 承接 |
|
|
|
|
|
console.log('列表-操作按钮事件-承接') |
|
|
|
|
|
handleAccept(row.id) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 添加/修改操作 */ |
|
|
/** 添加/修改操作 */ |
|
@ -200,14 +205,38 @@ const listTableRef = ref() |
|
|
const execute = async (type : string, row ?: number) => { |
|
|
const execute = async (type : string, row ?: number) => { |
|
|
formRef.value.open(type, row) |
|
|
formRef.value.open(type, row) |
|
|
} |
|
|
} |
|
|
/** 删除按钮操作 */ |
|
|
/** 关闭按钮操作 */ |
|
|
const handleDelete = async (id : number) => { |
|
|
const handleClose = async (id : number) => { |
|
|
try { |
|
|
try { |
|
|
// 删除的二次确认 |
|
|
// 删除的二次确认 |
|
|
await message.delConfirm() |
|
|
await message.confirm(t('common.confirmColse')) |
|
|
// 发起删除 |
|
|
// 发起删除 |
|
|
await InspectionJobMainApi.deleteInspectionJobMain(id) |
|
|
await InspectionJobMainApi.closeInspectionJobMain(id) |
|
|
message.success(t('common.delSuccess')) |
|
|
message.success(t('common.closeSuccess')) |
|
|
|
|
|
// 刷新列表 |
|
|
|
|
|
await getList() |
|
|
|
|
|
} catch { } |
|
|
|
|
|
} |
|
|
|
|
|
// 承接 |
|
|
|
|
|
const handleAccept = async (id : number) => { |
|
|
|
|
|
try { |
|
|
|
|
|
// 承接的二次确认 |
|
|
|
|
|
await message.confirm(t('common.confirmAccept')) |
|
|
|
|
|
// 发起承接 |
|
|
|
|
|
await InspectionJobMainApi.acceptInspectionJobMain(id) |
|
|
|
|
|
message.success(t('common.acceptSuccess')) |
|
|
|
|
|
// 刷新列表 |
|
|
|
|
|
await getList() |
|
|
|
|
|
} catch { } |
|
|
|
|
|
} |
|
|
|
|
|
// 放弃任务 |
|
|
|
|
|
const handleAbandon = async (id : number) => { |
|
|
|
|
|
try { |
|
|
|
|
|
// 放弃的二次确认 |
|
|
|
|
|
await message.confirm(t('common.confirmGiveup')) |
|
|
|
|
|
// 发起放弃 |
|
|
|
|
|
await InspectionJobMainApi.abandonInspectionJobMain(id) |
|
|
|
|
|
message.success(t('common.giveupSuccess')) |
|
|
// 刷新列表 |
|
|
// 刷新列表 |
|
|
await getList() |
|
|
await getList() |
|
|
} catch { } |
|
|
} catch { } |
|
|