From 52c49f4474b70577c80e160e831f25fa486c8ccf Mon Sep 17 00:00:00 2001 From: rui_li <877258667@qq.com> Date: Sun, 21 Nov 2021 13:39:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/yieldReport/com_finish_roll.vue | 109 ++++++++++++++++++ ...rmal.vue => com_produce_report_normal.vue} | 97 +++++++++++++--- .../yieldReport/com_switch_operator.vue | 93 +++++++++++++++ .../modules/yieldReport/produce_order.vue | 84 ++++++++------ 4 files changed, 329 insertions(+), 54 deletions(-) create mode 100644 src/views/modules/yieldReport/com_finish_roll.vue rename src/views/modules/yieldReport/{produce_report_normal.vue => com_produce_report_normal.vue} (96%) create mode 100644 src/views/modules/yieldReport/com_switch_operator.vue diff --git a/src/views/modules/yieldReport/com_finish_roll.vue b/src/views/modules/yieldReport/com_finish_roll.vue new file mode 100644 index 0000000..5621c92 --- /dev/null +++ b/src/views/modules/yieldReport/com_finish_roll.vue @@ -0,0 +1,109 @@ + + + + + diff --git a/src/views/modules/yieldReport/produce_report_normal.vue b/src/views/modules/yieldReport/com_produce_report_normal.vue similarity index 96% rename from src/views/modules/yieldReport/produce_report_normal.vue rename to src/views/modules/yieldReport/com_produce_report_normal.vue index b413616..4599dfd 100644 --- a/src/views/modules/yieldReport/produce_report_normal.vue +++ b/src/views/modules/yieldReport/com_produce_report_normal.vue @@ -71,7 +71,8 @@ 创建分卷 - + 结束卷 @@ -292,7 +293,7 @@ 刷新 - + 切换用户 @@ -341,10 +342,21 @@ - + + + + + + + + + + + + + diff --git a/src/views/modules/yieldReport/produce_order.vue b/src/views/modules/yieldReport/produce_order.vue index 4c99202..a80efdb 100644 --- a/src/views/modules/yieldReport/produce_order.vue +++ b/src/views/modules/yieldReport/produce_order.vue @@ -106,38 +106,17 @@ - - - - - - - - - - - - - - - 列表 - - - 保存 - - - 关闭 - + + - - - - + - + + + @@ -146,16 +125,19 @@ import { getProduceScheduleList, - getOperatorData, -} from '@/api/yieldReport/produce_order.js' -import produceReportNormal from "./produce_report_normal"; +} from '@/api/yieldReport/produce_order.js'; +/*引入组件*/ +import comSwitchOperator from "./com_switch_operator";/*切换操作员*/ +import comProduceReportNormal from "./com_produce_report_normal";/* 报工的组件*/ +import comFinishRoll from "./com_finish_roll";/*结束卷的组件*/ export default { data() { return { height: 800, - operatorFlag: false, + showOperatorFlag: false, showReportFlag: false, + showFinishFlag:false, selectList: [], searchData: { site: this.$store.state.user.site, @@ -961,7 +943,9 @@ export default { } }, components: { - produceReportNormal, + comSwitchOperator,/*切换用户的组件*/ + comProduceReportNormal,/*报工页面的组件*/ + comFinishRoll,/*结束卷的组件*/ }, mounted() { this.$nextTick(() => { @@ -969,6 +953,7 @@ export default { }) }, methods: { + /*查询派工单*/ getProduceScheduleList() { getProduceScheduleList(this.searchData).then(({data}) => { @@ -984,6 +969,15 @@ export default { setCurrentRow(row, column, event) { this.currentRow = JSON.parse(JSON.stringify(row)); }, + + //设置参数 + initOperatorData(operatorData){ + this.showOperatorFlag = false; + this.operatorData = JSON.parse(JSON.stringify(operatorData)); + //切换到报工组件 + this.switchProduceReportModal(); + }, + //切换员工modal switchOperatorModal() { //首先判断是否选择好派工单 @@ -992,9 +986,25 @@ export default { return false; } //打开操作员切换功能 - this.operatorData.showFlag = true; + this.showOperatorFlag = true; + this.$nextTick(() => { + this.$refs.comSwitchOperator.init(); + }); + }, + + //切换报工modal + switchProduceReportModal() { + //首先判断是否选择好派工单 + if (JSON.stringify(this.currentRow) == '{}') { + this.$message.error('请先选择派工单!'); + return false; + } + //打开操作员切换功能 + this.showReportFlag = true; + this.$nextTick(() => { + this.$refs.comProduceReportNormal.init(this.currentRow.seqNo, this.operatorData); + }); }, - //检查操作员信息是否可以使用 //保存操作员的信息 saveOperatorData() { @@ -1026,7 +1036,7 @@ export default { this.showReportFlag = true; //打开报工操作页面 this.$nextTick(() => { - this.$refs.produceReportNormal.init(this.currentRow.seqNo, this.operatorData); + this.$refs.comProduceReportNormal.init(this.currentRow.seqNo, this.operatorData); }); }) }