diff --git a/src/views/wpm_bx/mlogb_form.vue b/src/views/wpm_bx/mlogb_form.vue index c58b938e..d86183d3 100644 --- a/src/views/wpm_bx/mlogb_form.vue +++ b/src/views/wpm_bx/mlogb_form.vue @@ -142,7 +142,7 @@ export default { }); if (arr.length > 0) { that.form.wm_in = arr[0].id; - if(mgroup_code == 'paiyicibang'||mgroup_code == 'paiercibang'){}else{ + if(that.mgroup_code == 'paiyicibang'||that.mgroup_code == 'paiercibang'){}else{ that.submit();//提交 } }else{ diff --git a/src/views/wpm_bx/mlogbw_check.vue b/src/views/wpm_bx/mlogbw_check.vue index 0501e3ee..145eb825 100644 --- a/src/views/wpm_bx/mlogbw_check.vue +++ b/src/views/wpm_bx/mlogbw_check.vue @@ -44,7 +44,7 @@ >编辑 { - that.mlogbwlist = res; + if(res.length>0){ + res.forEach((item) => { + let obj = Object.assign({},item); + obj.isEdit = false; + that.mlogbwlist.push(obj); + }) + } }) }, //添加 @@ -107,7 +114,7 @@ export default { if(row.id!==''&&row.id!==undefined&&row.id!==null){ that.$API.wpm.mlogbw.update.req(row.id,row).then((res) => { that.$message.success("保存成功"); - that.getLists(); + that.getList(); return res; }).catch((err) => { return err; @@ -115,7 +122,7 @@ export default { }else{ that.$API.wpm.mlogbw.create.req(row).then((res) => { that.$message.success("添加成功"); - that.getLists(); + that.getList(); return res; }).catch((err) => { return err; @@ -137,91 +144,22 @@ export default { }).then(() => { that.$API.wpm.mlogbw.delete.req(id).then((res) => { that.$message.success("删除成功"); - that.getLists(); + that.getList(); return res; }).catch((err) => { return err; }); }).catch(() => {}); }, - //表单注入数据 - setData(data) { - Object.assign(this.form, data); - this.getRoute(data.id); - }, - //编辑 - mlogUpdate() { - this.dialog.edit = true; - this.$nextTick(() => { - this.$refs.editDialog.open("edit").setData(this.mlogItem); - }); - }, - table_add() { - this.dialog.save = true; - this.$nextTick(() => { - this.$refs.saveDialog.open(); - }); - }, - mlogbinSuccess(){ - this.$refs.tableIn.refresh(); - this.$refs.tableOut.refresh(); - }, - //自检 - table_in_edit(row) { - this.saveInForm = row; - this.saveInDialog = true; - }, - //提交自检 - saveInSubmit() { - let that = this; - that.$refs.saveInForm.validate(async (valid) => { - if (valid) { - that.isSaveing = true; - let obj = {}; - obj.count_use = that.saveInForm.count_use; - obj.count_pn_jgqbl = that.saveInForm.count_pn_jgqbl; - that.$API.wpm.mlogb.updateIn - .req(that.saveInForm.id, obj) - .then((res) => { - that.isSaveing = false; - that.$message.success("操作成功"); - that.saveInDialog = false; - that.$refs.tableIn.refresh(); - that.$refs.tableOut.refresh(); - }) - .catch(() => { - that.isSaveing = false; - }); - } - }); - }, - - //表单提交方法 - mlogSubmit() { + mlogbSubmit() { let that = this; - that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => { + that.$API.wpm.mlogb.submit.req(that.mlogb).then((res) => { that.isSaveing = false; that.visible = false; that.$message.success("操作成功"); }); }, - handleSaveSuccess() { - this.$refs.tableIn.refresh(); - this.$refs.tableOut.refresh(); - }, - handleCheckSuccess() { - this.$refs.tableOut.refresh(); - }, - fileUPSuccess(res) { - let that = this; - console.log('res',res); - this.test_file = res.path; - }, - //编辑成功后的方法调用 - handleEditSuccess() { - this.getMlogItem(); - }, //设置过滤项 setFilters(filters) { this.selectionFilters = filters;