From 826af2b6c80489abcfe00d8fca5f94a633e1577b Mon Sep 17 00:00:00 2001 From: Rui_Li <877258667@qq.com> Date: Tue, 22 Feb 2022 13:20:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E6=8D=A2=E7=94=A8=E6=88=B7=E7=9A=84BU?= =?UTF-8?q?G?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yieldReport/com_produce_report_normal.vue | 2 +- .../yieldReport/com_switch_operator.vue | 83 ++++++++++++++----- 2 files changed, 62 insertions(+), 23 deletions(-) diff --git a/src/views/modules/yieldReport/com_produce_report_normal.vue b/src/views/modules/yieldReport/com_produce_report_normal.vue index 0a37a6c..71e3e3b 100644 --- a/src/views/modules/yieldReport/com_produce_report_normal.vue +++ b/src/views/modules/yieldReport/com_produce_report_normal.vue @@ -3006,7 +3006,7 @@ export default { this.scheduleData.workCenterDesc = data.row.workCenterDesc; this.scheduleData.resourceDesc = data.row.resourceDesc; //设置弹窗的标题 - this.titleCon = '机台工作台' + ' - ' + data.row.workCenterDesc + ' ' + this.titleCon = '机台工作台' + ' - ' + data.row.itemDesc + ' ' + data.row.resourceDesc + ' (' + this.operatorData.operatorName + ')'; }) //刷新页面的卷信息 diff --git a/src/views/modules/yieldReport/com_switch_operator.vue b/src/views/modules/yieldReport/com_switch_operator.vue index 1bfec7d..29cc732 100644 --- a/src/views/modules/yieldReport/com_switch_operator.vue +++ b/src/views/modules/yieldReport/com_switch_operator.vue @@ -4,7 +4,7 @@ - @@ -12,7 +12,7 @@ - + @@ -77,30 +77,65 @@ export default { saveOperatorData() { getOperatorData(this.operatorData).then(({data}) => { //判断是否存在 - if(!data.row){ + //判断是否存在 + if(data.code == 500){ + this.operatorData.operatorName = ''; + this.$message.error(data.msg); + return false; + }else if(!data.row){ this.$message.error('账号有误!'); + this.operatorData.operatorName = ''; return false; - }else{ - let status = data.row.status; - this.operatorData.operatorName = data.row.operatorName; - //重置操作员信息状态 - this.operatorData.status = status; - //判断是否验证通过 - if (status == 'N') { - this.operatorFlag = false; - } else { - this.operatorFlag = true; - } - if (!this.operatorFlag) { - this.$message.error('操作员信息不可用!'); - } - //校验没有问题 关闭弹窗 - this.closeDialog(); - //调用初始化的方法 - this.$emit('initOperatorData', this.operatorData) } + let status = data.row.status; + //判断是否验证通过 + if (status == 'N') { + this.operatorFlag = false; + } else { + this.operatorFlag = true; + } + //重置操作员信息状态 + this.operatorData.status = status; + if (!this.operatorFlag) { + this.$message.error('操作员信息不可用!'); + this.operatorData.operatorName = ''; + } + this.operatorData.operatorName = data.row.operatorName; + //校验没有问题 关闭弹窗 + this.closeDialog(); + //调用初始化的方法 + this.$emit('initOperatorData', this.operatorData); + }); + }, - }) + /*检查操作员的信息*/ + checkOperatorId(){ + getOperatorData(this.operatorData).then(({data}) => { + //判断是否存在 + if(data.code == 500){ + this.$message.error(data.msg); + this.operatorData.operatorName = ''; + return false; + }else if(!data.row){ + this.$message.error('账号有误!'); + this.operatorData.operatorName = ''; + return false; + } + let status = data.row.status; + //判断是否验证通过 + if (status == 'N') { + this.operatorFlag = false; + } else { + this.operatorFlag = true; + } + //重置操作员信息状态 + this.operatorData.status = status; + if (!this.operatorFlag) { + this.$message.error('操作员信息不可用!'); + this.operatorData.operatorName = ''; + } + this.operatorData.operatorName = data.row.operatorName; + }); }, }, created() { @@ -109,4 +144,8 @@ export default {