|
|
@ -33,7 +33,7 @@ |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
<template #action="{ row }"> |
|
|
|
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|
|
|
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" /> |
|
|
|
</template> |
|
|
|
</Table> |
|
|
|
</ContentWrap> |
|
|
@ -147,7 +147,7 @@ const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
// 列表头部按钮 |
|
|
|
const HeadButttondata = [ |
|
|
|
defaultButtons.defaultAddBtn({hasPermi:'wms:production-main:create'}), // 新增——需要手动修改下权限 |
|
|
|
defaultButtons.defaultAddBtn({hasPermi:'wms:production-main:create'}), // 新增 |
|
|
|
defaultButtons.defaultImportBtn({hasPermi:'wms:production-main:import'}), // 导入 |
|
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:production-main:export'}), // 导出 |
|
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
@ -190,30 +190,29 @@ const isShowMainButton = (row,val) => { |
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = (row) => { |
|
|
|
return [ |
|
|
|
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['REQUEST_NEW','REQUEST_REVIEWING','REQUEST_AGREED','REQUEST_REFUSED','REQUEST_HANDLING'])}), // 关闭 |
|
|
|
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['REQUEST_REFUSED','REQUEST_CANCELLED'])}), // 重新添加 |
|
|
|
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['REQUEST_NEW'])}), // 提交审批 |
|
|
|
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['REQUEST_REVIEWING'])}), // 驳回 |
|
|
|
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['REQUEST_REVIEWING'])}), // 审批通过 |
|
|
|
defaultButtons.mainListEditBtn({hasPermi:'wms:production-main:update'}), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:production-main:delete'}), // 删除 |
|
|
|
] |
|
|
|
return [ |
|
|
|
defaultButtons.mainListPlanOpeBtn({hide:isShowMainButton(row,['PLAN_CLOSED','PLAN_REFUSED'])}), // 打开 |
|
|
|
defaultButtons.mainListPlanCloBtn({hide:isShowMainButton(row,['PLAN_NEW','PLAN_REVIEWING','PLAN_AGREED','PLAN_REFUSED','PLAN_PUBLISHED'])}), // 关闭 |
|
|
|
defaultButtons.mainListPlanSubBtn({hide:isShowMainButton(row,['PLAN_NEW'])}), // 提交审批 |
|
|
|
defaultButtons.mainListPlanTurBtn({hide:isShowMainButton(row,['PLAN_REVIEWING'])}), // 驳回 |
|
|
|
defaultButtons.mainListPlanAppBtn({hide:isShowMainButton(row,['PLAN_REVIEWING'])}), // 审批通过 |
|
|
|
defaultButtons.mainListPlanPubBtn({hide:isShowMainButton(row,['PLAN_AGREED'])}), // 发布 |
|
|
|
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['PLAN_NEW']),hasPermi:'wms:production-main:update'}), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['PLAN_NEW']),hasPermi:'wms:production-main:delete'}), // 删除 |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
|
const buttonTableClick = async (val, row) => { |
|
|
|
if (val == 'mainClose') { // 关闭 |
|
|
|
if (val == 'mainPlanOpe') { // 打开 |
|
|
|
console.log('列表-操作按钮事件-打开') |
|
|
|
} else if (val == 'mainPlanClo') { // 关闭 |
|
|
|
console.log('列表-操作按钮事件-关闭') |
|
|
|
} else if (val == 'mainReAdd') { // 重新添加 |
|
|
|
console.log('列表-操作按钮事件-重新添加') |
|
|
|
} else if (val == 'mainSubmit') { // 提交审批 |
|
|
|
} else if (val == 'mainPlanSub') { // 提交审批 |
|
|
|
console.log('列表-操作按钮事件-提交审批') |
|
|
|
} else if (val == 'mainTurnDown') { // 驳回 |
|
|
|
} else if (val == 'mainPlanTur') { // 驳回 |
|
|
|
console.log('列表-操作按钮事件-驳回') |
|
|
|
} else if (val == 'mainApprove') { // 审批通过 |
|
|
|
} else if (val == 'mainPlanApp') { // 审批通过 |
|
|
|
console.log('列表-操作按钮事件-审批通过') |
|
|
|
} else if (val == 'edit') { // 编辑 |
|
|
|
openForm('update', row) |
|
|
|