diff --git a/src/views/wms/issueManage/issue/issueRequestMain/index.vue b/src/views/wms/issueManage/issue/issueRequestMain/index.vue index d21bfcb60..18cba9828 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/index.vue +++ b/src/views/wms/issueManage/issue/issueRequestMain/index.vue @@ -172,12 +172,13 @@ const isShowMainButton = (row,val) => { // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), // 关闭 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4'])}), // 关闭 defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // 重新添加 defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // 驳回 defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // 审批通过 - defaultButtons.mainListEditBtn({hasPermi:'wms:issue-request-main:update'}), // 编辑 + defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3'])}), // 处理 + defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:issue-request-main:update'}), // 编辑 // defaultButtons.mainListDeleteBtn({hasPermi:'wms:issue-request-main:delete'}), // 删除 ] } @@ -187,16 +188,52 @@ const butttondata = (row) => { // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { if (val == 'mainClose') { // 关闭 - console.log('列表-操作按钮事件-关闭') + await message.confirm('确认要关闭吗?') + IssueRequestMainApi.close(row.id).then(() => { + message.success(t('common.updateSuccess')) + getList() + }).catch(err => { + console.log(err) + }) } else if (val == 'mainReAdd') { // 重新添加 - console.log('列表-操作按钮事件-重新添加') + await message.confirm('确认要重新添加吗?') + IssueRequestMainApi.reAdd(row.id).then(() => { + message.success(t('common.updateSuccess')) + getList() + }).catch(err => { + console.log(err) + }) } else if (val == 'mainSubmit') { // 提交审批 - console.log('列表-操作按钮事件-提交审批') + await message.confirm('确认要重新添加吗?') + IssueRequestMainApi.submit(row.id).then(() => { + message.success(t('common.updateSuccess')) + getList() + }).catch(err => { + console.log(err) + }) } else if (val == 'mainTurnDown') { // 驳回 - console.log('列表-操作按钮事件-驳回') + await message.confirm('确认要重新添加吗?') + IssueRequestMainApi.refused(row.id).then(() => { + message.success(t('common.updateSuccess')) + getList() + }).catch(err => { + console.log(err) + }) } else if (val == 'mainApprove') { // 审批通过 - console.log('列表-操作按钮事件-审批通过') - } else if (val == 'edit') { // 编辑 + IssueRequestMainApi.agree(row.id).then(() => { + message.success(t('common.updateSuccess')) + getList() + }).catch(err => { + console.log(err) + }) + } else if (val == 'mainHandle') { // 处理 + IssueRequestMainApi.handle(row.id).then(() => { + message.success(t('common.updateSuccess')) + getList() + }).catch(err => { + console.log(err) + }) + } else if (val == 'edit') { // 编辑 openForm('update', row) } else if (val == 'delete') { // 删除 handleDelete(row.id)