From a1b74f4639fb7783bae4fdc8498bedf7226b0c54 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 22 Dec 2023 10:38:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=8F=AD=E6=AC=A1=E9=80=89=E6=8B=A9?= =?UTF-8?q?=EF=BC=8C=E5=85=88=E8=BF=99=E6=A0=B7=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm/mlog6_form.vue | 2 +- src/views/wpm/mlog_dept7.vue | 12 +++++++++--- src/views/wpm/mlog_hun.vue | 1 + src/views/wpm/mlog_tui.vue | 1 + src/views/wpm/worktask_form.vue | 26 +++++++++++--------------- 5 files changed, 23 insertions(+), 19 deletions(-) diff --git a/src/views/wpm/mlog6_form.vue b/src/views/wpm/mlog6_form.vue index f08685ed..e2f9ab14 100644 --- a/src/views/wpm/mlog6_form.vue +++ b/src/views/wpm/mlog6_form.vue @@ -58,7 +58,7 @@ diff --git a/src/views/wpm/mlog_dept7.vue b/src/views/wpm/mlog_dept7.vue index 27a41cf7..1f4d95d1 100644 --- a/src/views/wpm/mlog_dept7.vue +++ b/src/views/wpm/mlog_dept7.vue @@ -255,9 +255,15 @@ - + + diff --git a/src/views/wpm/mlog_hun.vue b/src/views/wpm/mlog_hun.vue index 85e6d606..d5d4d6fa 100644 --- a/src/views/wpm/mlog_hun.vue +++ b/src/views/wpm/mlog_hun.vue @@ -155,6 +155,7 @@ diff --git a/src/views/wpm/mlog_tui.vue b/src/views/wpm/mlog_tui.vue index d9743429..aafb7840 100644 --- a/src/views/wpm/mlog_tui.vue +++ b/src/views/wpm/mlog_tui.vue @@ -202,6 +202,7 @@ diff --git a/src/views/wpm/worktask_form.vue b/src/views/wpm/worktask_form.vue index db3e2228..31f1d13c 100644 --- a/src/views/wpm/worktask_form.vue +++ b/src/views/wpm/worktask_form.vue @@ -503,7 +503,7 @@ @@ -579,7 +579,7 @@ @@ -1048,6 +1048,7 @@ export default { emits: ["success", "closed"], props: { + mgroupShiftRule:{ type: String, default: "" }, mgroup:{ type: String, default: "" }, mtask: { type: String, default: "" }, mgroupId: { type: String, default: "" }, @@ -1166,20 +1167,15 @@ export default { }) }, getShiftOptions() { - this.$API.mtm.shift.list.req({ page: 0}).then((res) => { - this.shiftOptions = []; - if(this.activeType == "10车间"){ - res.forEach(item=>{ - if(item.rule=='两倒'){ - this.shiftOptions.push(item); - } - }) + let req_dict = {page: 0} + if(this.mgroupShiftRule != null && this.mgroupShiftRule != undefined){ + req_dict.rule = this.mgroupShiftRule + } + this.$API.mtm.shift.list.req(req_dict).then((res) => { + if(res.length==1){ + this.form.shift = res[0].id }else{ - res.forEach(item=>{ - if(item.rule=='长白班'){ - this.form.shift = item.id; - } - }) + this.shiftOptions = res } }); },