diff --git a/src/views/wpm/worktask_form.vue b/src/views/wpm/worktask_form.vue index 42c4a904..e827a7d3 100644 --- a/src/views/wpm/worktask_form.vue +++ b/src/views/wpm/worktask_form.vue @@ -1135,7 +1135,6 @@ export default { this.form.mgroup = this.mgroup; this.form.handle_date = year + "-" + month + "-" + day; this.getMaterial(); - // this.getMgroupList(); this.getUserList(); this.getEquipment(); this.getShiftOptions(); @@ -1185,13 +1184,20 @@ export default { }) }, getShiftOptions() { + let that = this; let req_dict = {page: 0} console.log(this.mgroupShiftRule) if(this.mgroupShiftRule != null && this.mgroupShiftRule != undefined){ req_dict.rule = this.mgroupShiftRule } this.$API.mtm.shift.list.req(req_dict).then((res) => { - this.shiftOptions = res + that.shiftOptions = res; + let list = res.filter(item => + item.rule == '长白班' + ); + if(that.activeType !== '10车间'){ + that.form.shift=list[0].id; + } }); }, getUserList() {