diff --git a/klp-ui/src/views/mes/roll/grind/index.vue b/klp-ui/src/views/mes/roll/grind/index.vue index 3eb14b49..b9ea6df5 100644 --- a/klp-ui/src/views/mes/roll/grind/index.vue +++ b/klp-ui/src/views/mes/roll/grind/index.vue @@ -108,14 +108,16 @@
磨削台账 - 新增磨削记录 + + 操作人维护 + 新增磨削记录 +
+ + +
+ 新增操作人 +
+ + + + + + + + + + +
+ + + + + + + + + + + + + 在职 + 离职 + + + + + + { this.$refs.rollForm && this.$refs.rollForm.clearValidate() }) + }, + + // ── 操作人字典维护 ────────────────────────────── + openOperatorDict() { + this.operatorDictOpen = true + this.loadOperatorDict() + }, + loadOperatorDict() { + this.operatorDictLoading = true + listData({ dictType: 'mes_roll_operator', pageNum: 1, pageSize: 999 }).then(res => { + this.operatorDictList = res.rows || [] + }).finally(() => { this.operatorDictLoading = false }) + }, + handleAddOperator() { + this.operatorForm = { dictType: 'mes_roll_operator', dictLabel: '', dictValue: '', status: '0' } + this.operatorFormTitle = '新增操作人' + this.$nextTick(() => { this.operatorFormOpen = true }) + }, + handleEditOperator(row) { + this.operatorForm = { ...row } + this.operatorFormTitle = '修改操作人' + this.$nextTick(() => { this.operatorFormOpen = true }) + }, + handleDeleteOperator(row) { + this.$modal.confirm(`确认删除操作人【${row.dictLabel}】?`).then(() => { + return delData(row.dictCode) + }).then(() => { + this.$modal.msgSuccess('删除成功') + this.$store.dispatch('dict/removeDict', 'mes_roll_operator') + this.loadOperatorDict() + }) + }, + submitOperatorForm() { + this.$refs.operatorForm.validate(valid => { + if (!valid) return + const form = { ...this.operatorForm } + const api = form.dictCode ? updateData : addData + api(form).then(() => { + this.$modal.msgSuccess(form.dictCode ? '修改成功' : '新增成功') + this.operatorFormOpen = false + this.$store.dispatch('dict/removeDict', 'mes_roll_operator') + this.loadOperatorDict() + }) + }) + }, + resetOperatorForm() { + this.operatorForm = {} + this.$nextTick(() => { this.$refs.operatorForm && this.$refs.operatorForm.clearValidate() }) } } } diff --git a/klp-ui/src/views/mes/roll/report/index.vue b/klp-ui/src/views/mes/roll/report/index.vue index 6cf730ff..88da87b0 100644 --- a/klp-ui/src/views/mes/roll/report/index.vue +++ b/klp-ui/src/views/mes/roll/report/index.vue @@ -78,11 +78,19 @@
磨辊人统计 共 {{ operatorStats.length }} 人 + 导出
+ + + @@ -128,6 +136,7 @@