From a629a3cf2c81f85dfda3410ba3836056978d8951 Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 21 Dec 2023 13:13:09 +0800 Subject: [PATCH] role --- src/views/sys/role.vue | 25 +++++++++++++---------- src/views/wpm/worktask_form.vue | 36 +++++++-------------------------- 2 files changed, 21 insertions(+), 40 deletions(-) diff --git a/src/views/sys/role.vue b/src/views/sys/role.vue index d13a5071..3b50169e 100644 --- a/src/views/sys/role.vue +++ b/src/views/sys/role.vue @@ -169,18 +169,21 @@ this.isSaveing = true; let res; if(this.type==='add'){ - res = this.$API.system.role.create.req(that.addForm); + this.$API.system.role.create.req(that.addForm).then(res=>{ + this.isSaveing = false; + this.limitedVisible = false; + this.$refs.table.refresh(); + }).catch(err=>{ + this.isSaveing = false; + }); }else{ - res = this.$API.system.role.update.req(that.addForm.id,that.addForm); - } - console.log(res); - debugger; - if(res.err_msg){ - this.$message.error(res.err_msg); - }else{ - this.isSaveing = false; - this.limitedVisible = false; - this.$refs.table.refresh(); + this.$API.system.role.update.req(that.addForm.id,that.addForm).then(res=>{ + this.isSaveing = false; + this.limitedVisible = false; + this.$refs.table.refresh(); + }).catch(err=>{ + this.isSaveing = false; + }); } } }) diff --git a/src/views/wpm/worktask_form.vue b/src/views/wpm/worktask_form.vue index 52206c39..ce1b30d3 100644 --- a/src/views/wpm/worktask_form.vue +++ b/src/views/wpm/worktask_form.vue @@ -1126,15 +1126,6 @@ export default { }; }, mounted() { - console.log('brothersList') - console.log(this.brothersList) - this.getMaterial(); - // this.getMgroupList(); - this.getUserList(); - this.getEquipment(); - this.getShiftOptions(); - this.getRouteOptions(); - let date = new Date(); let year = date.getFullYear(); let month = date.getMonth() + 1; @@ -1144,6 +1135,12 @@ export default { this.form.mtask = this.mtask; this.form.mgroup = this.mgroup; this.form.handle_date = year + "-" + month + "-" + day; + this.getMaterial(); + // this.getMgroupList(); + this.getUserList(); + this.getEquipment(); + this.getShiftOptions(); + this.getRouteOptions(); this.getWorkShopMaterial(); if (this.activeType == "10车间") { let mlogb = []; @@ -1265,13 +1262,6 @@ export default { }); } }, - //获取车间物料 - // getMaterial(){ - // let that = this; - // this.$API.wpm.wmaterial.list.req({belong_dept_name:'8车间',page:0}).then(res=>{ - // that.materialOptions = res; - // }); - // }, getWorkShopMaterial() { let that = this; if(this.form.material_in){ @@ -1355,7 +1345,7 @@ export default { }); this.form.count_ok = ok_number; } else if (this.activeType == "退火") { - this.form.mgroup = "3428194648706011136"; + // this.form.mgroup = "3428194648706011136"; this.form.count_notok = this.form.count_n_wq + this.form.count_n_tw + @@ -1463,18 +1453,6 @@ export default { } } }, - //选择 - // wmaterialInChange(val) { - // console.log(this.form) - // console.log(this.wmaterialOptions); - // debugger; - // for(let i=0;i