diff --git a/src/views/inm/mioitem.vue b/src/views/inm/mioitem.vue index aa1751a7..351eda47 100644 --- a/src/views/inm/mioitem.vue +++ b/src/views/inm/mioitem.vue @@ -2,7 +2,7 @@ @@ -228,7 +228,7 @@ :type="type" :objitem="objitem" @success="handleCheckSuccess" - @closed="dialog.check = false" + @closed="checkDialogClose" > @@ -301,6 +301,7 @@ export default { // cate: "", objitem: {}, mtype:10, + mioType:'', project_code:'', setNameVisible:false, printer_name:localStorage.getItem("printer_name") @@ -330,16 +331,20 @@ export default { this.visible = true; }, getMio() { - this.$API.inm.mio.item.req(this.mioId).then((res) => { - this.mioObj = res; - this.belongDeptId = res.belong_dept; + let that = this; + that.$API.inm.mio.item.req(that.mioId).then((res) => { + that.mioObj = res; + that.mioType = res.type; + that.belongDeptId = res.belong_dept; }); }, //添加 table_add() { + let that = this; + console.log(this.mioType); this.dialog.save = true; this.$nextTick(() => { - this.$refs.saveDialog.open("add", this.mioObj.type); + this.$refs.saveDialog.open("add", that.mioType); }); }, @@ -419,17 +424,17 @@ export default { this.mioObj = res; }); }, + checkDialogClose(){ + let that = this; + that.dialog.check = false; + that.$refs.table.refresh(); + }, handlePrint(){ let that = this; let params = { mio: that.mioId, page:0 } - // if(){ - // that.mtype = 10 - // }else{ - - // } that.$API.inm.mioitem.list.req(params).then((res) => { that.tableData = res; that.printVisible = true;