diff --git a/src/views/modules/todo/todoCenter.vue b/src/views/modules/todo/todoCenter.vue index af22163..7364dee 100644 --- a/src/views/modules/todo/todoCenter.vue +++ b/src/views/modules/todo/todoCenter.vue @@ -19,56 +19,109 @@ - +
@@ -136,6 +189,14 @@ @@ -280,7 +341,8 @@ ref="comMrbRegister" :visible.sync="showMrbRegisterFlag" mode="single" - :load-history="false" + :mrb-required="false" + :load-history="true" @confirmed="onTodoMrbConfirmed">
@@ -310,7 +372,11 @@ export default { forceType: 'force', todoStatus: 'pendingAudit', responsibilityDept: '', - keyword: '' + keyword: '', + auditTimeStart: '', + auditTimeEnd: '', + triggerTimeStart: '', + triggerTimeEnd: '' }, forceTypeOptions: [ { label: '强制', value: 'force' }, @@ -341,12 +407,16 @@ export default { }, detailRowList: [], showMrbRegisterFlag: false, - currentAuditTodo: null + currentAuditTodo: null, + currentMrbAction: '', + authChange: false, + menuId: this.$route && this.$route.meta ? this.$route.meta.menuId : '' } }, created () { this.loadBuList() this.loadRoleList() + this.getButtonAuthData() this.getTodoStats() this.getDataList() }, @@ -388,6 +458,10 @@ export default { this.searchData.todoStatus = 'pendingAudit' this.searchData.responsibilityDept = '' this.searchData.keyword = '' + this.searchData.auditTimeStart = '' + this.searchData.auditTimeEnd = '' + this.searchData.triggerTimeStart = '' + this.searchData.triggerTimeEnd = '' this.queryHandle() }, getTodoStats () { @@ -423,7 +497,11 @@ export default { forceType: this.searchData.forceType, todoStatus: this.searchData.todoStatus, responsibilityDept: this.searchData.responsibilityDept, - keyword: this.searchData.keyword + keyword: this.searchData.keyword, + auditTimeStart: this.searchData.auditTimeStart || '', + auditTimeEnd: this.searchData.auditTimeEnd || '', + triggerTimeStart: this.searchData.triggerTimeStart || '', + triggerTimeEnd: this.searchData.triggerTimeEnd || '' } }, sizeChangeHandle (val) { @@ -527,11 +605,32 @@ export default { this.$message.info('该代办已审核') return } + this.openTodoMrbModal(row, 'audit') + }, + openTodoChangeModal (row) { + if (!row) { + return + } + if (this.authChange) { + this.$message.warning('当前用户无变更权限') + return + } + if (row.auditFlag !== 'Y') { + this.$message.warning('请先完成审核再进行变更') + return + } + this.openTodoMrbModal(row, 'change') + }, + openTodoMrbModal (row, action) { + if (!row) { + return + } const itemNo = this.toInt(row.itemNo) if (itemNo === null) { - this.$message.warning('未找到工序信息,无法发起审核') + this.$message.warning('未找到工序信息,无法打开MRB异常登记') return } + this.currentMrbAction = action || '' this.currentAuditTodo = row const scheduleData = { site: row.site || this.searchData.site || this.$store.state.user.site, @@ -554,6 +653,13 @@ export default { if (!this.currentAuditTodo) { return } + if (this.currentMrbAction === 'change') { + this.getTodoStats() + this.getDataList() + this.currentAuditTodo = null + this.currentMrbAction = '' + return + } const todo = this.currentAuditTodo const params = { site: todo.site || this.searchData.site || this.$store.state.user.site, @@ -574,8 +680,17 @@ export default { this.$message.error('代办审核失败') }).finally(() => { this.currentAuditTodo = null + this.currentMrbAction = '' }) }, + getButtonAuthData () { + if (typeof this.isAuth !== 'function' || !this.menuId) { + this.authChange = false + return + } + const changeFlag = this.isAuth(this.menuId + ':change') + this.authChange = !changeFlag + }, notifyTodoBadgeRefresh () { if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function') { window.dispatchEvent(new Event('todo-badge-refresh')) @@ -727,6 +842,7 @@ export default { } .search-form /deep/ .el-form-item { + width: 100%; margin-bottom: 12px; } @@ -736,6 +852,16 @@ export default { padding-bottom: 4px; } +.search-condition-row { + margin-bottom: 0; +} + +.search-form /deep/ .el-select, +.search-form /deep/ .el-date-editor.el-input, +.search-form /deep/ .el-date-editor.el-input__inner { + width: 100%; +} + .search-form /deep/ .el-input__inner, .search-form /deep/ .el-textarea__inner { border-radius: 6px; diff --git a/src/views/modules/yieldReport/com_mrb_register.vue b/src/views/modules/yieldReport/com_mrb_register.vue index 9d939ee..8fb8ee2 100644 --- a/src/views/modules/yieldReport/com_mrb_register.vue +++ b/src/views/modules/yieldReport/com_mrb_register.vue @@ -46,7 +46,7 @@