diff --git a/src/views/wpm_gx/handover.vue b/src/views/wpm_gx/handover.vue index 1ea24832..a14fdb10 100644 --- a/src/views/wpm_gx/handover.vue +++ b/src/views/wpm_gx/handover.vue @@ -234,10 +234,30 @@ import saveDialog from "./handover_form.vue"; import print from "./../setting/print/A4.vue"; export default { props: { + deptId: { + type: String, + default: "", + }, + mgroupId: { + type: String, + default: "", + }, mgroupName: { type: String, default: "", }, + processId: { + type: String, + default: "", + }, + mgroupcode: { + type: String, + default: "", + }, + processtype:{ + type: String, + default: "", + } }, name: "handover", components: { @@ -268,65 +288,23 @@ export default { selection: [], handoverItem:{}, values: "交送", - deptId:'', mtask: "", mlogId: "", codeText:"", - mgroupId: "", - processId: "", - processtype:"", - processCate: "", printer_name: "", printVisible:false, setNameVisible: false, }; }, mounted() { - this.getMgroupInfo(); + let that = this; + that.printer_name = localStorage.getItem("printer_name"); + that.$TOOL.data.set('gx_deptID',that.deptId) + that.params.mgroup = that.mgroupId; + that.apiObj = that.$API.wpm.handover.list; + that.$refs.table.refresh(); }, methods: { - getMgroupInfo(){ - let that = this; - if(that.mgroupName=="size"){//尺寸检验 - // that.params.material__process__name="一次超洗"; - that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => { - if(res.length>0){ - that.deptId = res[0].id; - that.params.dept=res[0].id; - } - that.apiObj = that.$API.wpm.handover.list; - that.$refs.table.refresh(); - }) - }else if(that.mgroupName=="facade"){//外观检验 - // that.params.material__process__name="二次超洗"; - that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => { - if(res.length>0){ - that.deptId = res[0].id; - that.params.dept=res[0].id; - } - that.apiObj = that.$API.wpm.handover.list; - that.$refs.table.refresh(); - }) - }else{//工段交接 - that.printer_name = localStorage.getItem("printer_name"); - that.$API.mtm.mgroup.list - .req({ page: 0, name: that.mgroupName }) - .then((res) => { - if (res.length < 1) { - that.$message.error("获取工段错误"); - return; - } - that.$TOOL.data.set('gx_deptID',res[0].belong_dept) - that.mgroupId = res[0].id; - that.processId = res[0].process; - that.processCate = res[0].process_cate; - that.processtype = res[0].process_type; - that.params.mgroup = that.mgroupId; - that.apiObj = that.$API.wpm.handover.list; - that.$refs.table.refresh(); - }); - } - }, printSetting(){ this.setNameVisible = true; }, diff --git a/src/views/wpm_gx/index.vue b/src/views/wpm_gx/index.vue index 75fce60c..73821719 100644 --- a/src/views/wpm_gx/index.vue +++ b/src/views/wpm_gx/index.vue @@ -15,7 +15,7 @@ :mgroupName="mgroupName" :mgroupId="mgroupId" :mgroupcode="mgroup_code" - :processId="mgroupProcess" + :processId="processId" :deptId = "mgroupDept" style="height: 60%" > @@ -24,7 +24,7 @@ :mgroupId="mgroupId" :deptId = "mgroupDept" :mgroupName="mgroupName" - :processId="mgroupProcess" + :processId="processId" :mgroupcode="mgroup_code" style="height: 40%" > @@ -34,29 +34,30 @@ :mgroupId="mgroupId" :deptId = "mgroupDept" :mgroupName="mgroupName" - :processId="mgroupProcess" + :processId="processId" :mgroupcode="mgroup_code" + :processtype="processtype" > @@ -83,6 +84,8 @@ export default { selectedIndex:0, mgroup_code:'', mgroupDept:'', + processtype:'', + processId:'', componentsShow:false, }; }, @@ -118,7 +121,8 @@ export default { that.mgroups = res; that.mgroupName = res[0].name; that.mgroupId = res[0].id; - that.mgroupProcess = res[0].process; + that.processId = res[0].process; + that.processtype = res[0].process_type; that.mgroupDept = res[0].belong_dept; that.componentsShow = true; }); diff --git a/src/views/wpm_gx/index2.vue b/src/views/wpm_gx/index2.vue index 15f6ab00..0a51f827 100644 --- a/src/views/wpm_gx/index2.vue +++ b/src/views/wpm_gx/index2.vue @@ -15,7 +15,7 @@ :mgroupName="mgroupName" :mgroupId="mgroupId" :mgroupcode="mgroup_code" - :processId="mgroupProcess" + :processId="processId" :deptId = "mgroupDept" style="height: 60%" > @@ -24,7 +24,7 @@ :mgroupId="mgroupId" :deptId = "mgroupDept" :mgroupName="mgroupName" - :processId="mgroupProcess" + :processId="processId" :mgroupcode="mgroup_code" style="height: 40%" > @@ -34,29 +34,30 @@ :mgroupId="mgroupId" :deptId = "mgroupDept" :mgroupName="mgroupName" - :processId="mgroupProcess" + :processId="processId" :mgroupcode="mgroup_code" + :processtype="processtype" > @@ -83,6 +84,8 @@ export default { selectedIndex:0, mgroup_code:'', mgroupDept:'', + processtype:'', + processId:'', componentsShow:false, }; }, @@ -118,7 +121,8 @@ export default { that.mgroups = res; that.mgroupName = res[0].name; that.mgroupId = res[0].id; - that.mgroupProcess = res[0].process; + that.processId = res[0].process; + that.processtype = res[0].process_type; that.mgroupDept = res[0].belong_dept; that.componentsShow = true; }); diff --git a/src/views/wpm_gx/inm.vue b/src/views/wpm_gx/inm.vue index 68e784a6..90e18158 100644 --- a/src/views/wpm_gx/inm.vue +++ b/src/views/wpm_gx/inm.vue @@ -284,28 +284,8 @@ export default { that.params.tag="todo"; that.$TOOL.data.set('gx_deptID',that.deptId) that.apiObj = that.$API.wpm.wmaterial.list; - // this.getMgroupInfo(); }, methods: { - getMgroupInfo(){ - let that = this; - console.log(that.mgroupName); - that.$API.mtm.mgroup.list.req({ page: 0, name: that.mgroupName }).then((res) => { - if (res.length < 1) { - that.$message.error("获取工段错误"); - return; - } - that.mgroupId = res[0].id; - that.process = res[0].process; - that.belong_dept = res[0].belong_dept; - that.process_type =res[0].process_type; - that.params.mgroup = res[0].id; - that.params.tag="todo"; - that.$TOOL.data.set('gx_deptID',res[0].belong_dept) - that.apiObj = that.$API.wpm.wmaterial.list; - that.$refs.table.refresh(); - }); - }, selectionChange(selection) { let that = this; that.selection = selection; diff --git a/src/views/wpm_gx/inmOut.vue b/src/views/wpm_gx/inmOut.vue index eb4a088a..28099ae5 100644 --- a/src/views/wpm_gx/inmOut.vue +++ b/src/views/wpm_gx/inmOut.vue @@ -176,9 +176,9 @@ v-if="dialog.inmRecord" ref="inmRecordDialog" :cate = "cate_type" - :process = "process" - :mgroupId = "params.mgroupx" - :deptId = " params.belong_dept" + :process = "processId" + :mgroupId = "mgroupId" + :deptId = "params.belong_dept" @success="handleinmSuccess" > @@ -202,10 +202,26 @@ import handoverDialog from "./handover_form2.vue"; import saveDialog from "./inm_record.vue"; export default { props: { + deptId: { + type: String, + default: "", + }, + mgroupId: { + type: String, + default: "", + }, mgroupName: { type: String, default: "", }, + processId: { + type: String, + default: "", + }, + mgroupcode: { + type: String, + default: "", + }, }, components: { saveDialog, @@ -250,7 +266,6 @@ export default { material: "", }, cate_type:'', - process:'', materialType: "wm", changebatch:false, materialsVisible:false, @@ -260,26 +275,14 @@ export default { }; }, mounted() { - this.getMgroupInfo(); + let that = this; + that.params.mgroup = that.mgroupId; + that.params.tag = 'done'; + that.$TOOL.data.set('gx_deptID',that.deptId); + that.apiObj = that.$API.wpm.wmaterial.list; + // that.$refs.table.refresh(); }, methods: { - getMgroupInfo(){ - let that = this; - console.log(that.mgroupName); - that.$API.mtm.mgroup.list.req({ page: 0, name: that.mgroupName }).then((res) => { - if (res.length < 1) { - that.$message.error("获取工段错误"); - return; - } - that.mgroupId = res[0].id; - that.process = res[0].process; - that.params.mgroup = res[0].id; - that.params.tag = 'done'; - that.$TOOL.data.set('gx_deptID',res[0].belong_dept) - that.apiObj = that.$API.wpm.wmaterial.list; - that.$refs.table.refresh(); - }); - }, add() { this.dialog.save = true; this.$nextTick(() => { diff --git a/src/views/wpm_gx/inmrecord.vue b/src/views/wpm_gx/inmrecord.vue index c9bfa2bc..5e5543c1 100644 --- a/src/views/wpm_gx/inmrecord.vue +++ b/src/views/wpm_gx/inmrecord.vue @@ -157,8 +157,8 @@ v-if="dialog.inmRecord" ref="inmRecordDialog" :cate = "cate_type" - :process = "process" - :mgroupId = "params.mgroup" + :process = "processId" + :mgroupId = "mgroupId" :deptId = " deptId" @success="handleinmSuccess" > @@ -173,10 +173,26 @@ export default { saveDialog }, props: { + deptId: { + type: String, + default: "", + }, + mgroupId: { + type: String, + default: "", + }, mgroupName: { type: String, default: "", }, + processId: { + type: String, + default: "", + }, + mgroupcode: { + type: String, + default: "", + }, }, data() { return { @@ -209,7 +225,6 @@ export default { apiObj: null, selection: [], type: "", - deptId:"", process: "", cate: "good", mioId: "", @@ -219,18 +234,8 @@ export default { }, mounted() { let that = this; - that.$nextTick(() => { - that.$API.mtm.mgroup.list.req({ page: 0, name: that.mgroupName }).then((res) => { - if (res.length < 1) { - that.$message.error("获取工段错误"); - return; - } - that.params.mgroup = res[0].id; - that.deptId = res[0].belong_dept; - that.process = res[0].process; - that.apiObj = that.$API.inm.mio.list; - }); - }) + that.params.mgroup = that.mgroupId; + that.apiObj = that.$API.inm.mio.list; }, methods: { tomio(type) { diff --git a/src/views/wpm_gx/mlogs.vue b/src/views/wpm_gx/mlogs.vue index 8c9d8ce2..1d606a60 100644 --- a/src/views/wpm_gx/mlogs.vue +++ b/src/views/wpm_gx/mlogs.vue @@ -212,24 +212,8 @@ export default { let that = this; that.params.mgroup = that.mgroupId; that.apiObj = that.$API.wpm.mlog.list; - // this.getMgroupInfo(); }, methods: { - getMgroupInfo(){ - let that = this; - that.$API.mtm.mgroup.list.req({ page: 0, name: that.mgroupName }).then((res) => { - if (res.length < 1) { - that.$message.error("获取工段错误"); - return; - } - that.mgroupId = res[0].id; - that.deptId = res[0].belong_dept; - that.processId = res[0].process; - that.params.mgroup = res[0].id; - that.apiObj = that.$API.wpm.mlog.list; - that.$refs.table.refresh(); - }); - }, getRemaTime(row){ if(row.work_start_time !== null){ let times = 0; diff --git a/src/views/wpm_gx/mtask.vue b/src/views/wpm_gx/mtask.vue index 2bde578a..7951ca1a 100644 --- a/src/views/wpm_gx/mtask.vue +++ b/src/views/wpm_gx/mtask.vue @@ -20,14 +20,14 @@ - + +