From a03f42f7329b7da12f9d180b2fcf695bedadc51f Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 3 Jun 2026 12:26:36 +0800 Subject: [PATCH 01/27] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0=E6=95=B0=E5=AD=97?= =?UTF-8?q?=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/em.js | 8 +++ src/layout/components/userbar.vue | 39 +++++++++++++ src/utils/tool.js | 5 ++ src/views/wpm_bx/mlog_detail.vue | 2 +- src/views/wpm_bx/mlogbw_check_table.vue | 77 +++++++++++++++++++++++++ 5 files changed, 130 insertions(+), 1 deletion(-) diff --git a/src/api/model/em.js b/src/api/model/em.js index 405c35e0..17fc615b 100644 --- a/src/api/model/em.js +++ b/src/api/model/em.js @@ -126,6 +126,14 @@ export default { data); } }, + get_svs_char: { + name: "获取数据识别", + req: async function(data){ + return await http.get( + `${config.API_URL}/em/equipment/get_svs_char/`, + data); + } + } }, //巡检记录 einspect: { diff --git a/src/layout/components/userbar.vue b/src/layout/components/userbar.vue index 3e9c6c9e..049f4515 100644 --- a/src/layout/components/userbar.vue +++ b/src/layout/components/userbar.vue @@ -15,6 +15,11 @@ +
+ + + +
@@ -139,6 +144,22 @@ 保存 + + + + + + + + + + + + + + 保存 + + -
+
检验 批量操作 + 数字识别
{{ test_file_name }} @@ -1118,6 +1119,82 @@ that.$API.wpm.prints.req(printer_ip, obj).then((response) => { that.wprNumber = ""; that.setVisible=true; }, + + + //扫描这里更新:添加数字化识别,调用一个接口,并且返回number和设备数据,然后根据number将这一行放到第一行并编辑这一行,并且把设备数据放到对应位置 + digital(){ + let that = this; + that.ocr_ip = localStorage.getItem("ocr_ip") || ""; + that.ocr_port = localStorage.getItem("ocr_port") || ""; + that.ocr_unit = localStorage.getItem("ocr_unit") || ""; + //第一步:调用接口获取数字识别设备返回的number + if(!that.ocr_ip || !that.ocr_port || !that.ocr_unit){ + that.$message.warning('请先在右上角"数字识别设置"配置IP、端口号和位号'); + return; + } + that.$API.em.equipment.get_svs_char.req({ + ip: that.ocr_ip, + port: that.ocr_port, + unit: that.ocr_unit + }).then((res) => { + alert(res); + // if(res.number){ + // that.mlogbwlist.forEach((item,index) => { + // if(item.number==res.number){ + // let obj = Object.assign({},item); + // obj.isEdit = true; + // that.mlogbwlist.splice(index,1); + // that.wprInputText = ""; + // that.mlogbwlist.unshift(obj); + // that.$nextTick(() => { + // that.selectedindexes.push(obj.id); + // that.selectWprList.push(item); + // }) + // //第二步:获取投影仪设备的监测数据 + // //先判断是否有需要检测设备的检测项,若有,赋值,若无,跳过 + // if(that.qct_testitems.length>0 && !!that.setForm.cd_req_addr){ + // that.$API.em.cd.req({method:that.setForm.cd_req_addr}).then((res) => { + // that.qct_testitems.forEach(item0 => { + // if(item0.testitem_cd_expr!=null){ + // that.mlogbwlist[index][item0.testitem_name]= eval(item0.testitem_cd_expr); + // that.qct_defects.forEach(item => { + // if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){ + // let str = item.rule_expression.replace(/`/g, ''); + // str = str.replace(/\${(.*?)}/g, 'row.\$1'); + // let judge = false; + // try { + // judge = eval(str); + // that.mlogbwlist[index][item.defect_name] = judge; + // }catch (error) { + // console.error(error); + // } + // }else{ + // that.mlogbwlist[index][item.defect_name] = false; + // } + // }); + // } + // }) + // }).catch((err) => { + // this.$notify.error({ + // title: '获取数据失败', + // message: err.data + // }) + // return err; + // }); + // } + // } + // }) + // } + }).catch((err) => { + that.$notify.error({ + title: '数字识别获取失败', + message: err.data + }) + return err; + }); + }, + + //扫描物料将这一行放到第一行并编辑这一行 wprinputChange(){ let that = this; From c362763a2521e2bf3e968c270767e22c950ae064 Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 3 Jun 2026 14:04:32 +0800 Subject: [PATCH 02/27] =?UTF-8?q?fix:=E6=95=B0=E5=AD=97=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E9=A2=9C=E8=89=B2=E6=94=B9=E4=B8=BA=E7=BB=BF?= =?UTF-8?q?=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/mlogbw_check_table.vue | 102 ++++++++++++------------ 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/src/views/wpm_bx/mlogbw_check_table.vue b/src/views/wpm_bx/mlogbw_check_table.vue index 5e982a8c..7b4b586e 100644 --- a/src/views/wpm_bx/mlogbw_check_table.vue +++ b/src/views/wpm_bx/mlogbw_check_table.vue @@ -22,7 +22,7 @@ 检验 批量操作 - 数字识别 + 数字识别
{{ test_file_name }} @@ -1133,58 +1133,58 @@ that.$API.wpm.prints.req(printer_ip, obj).then((response) => { return; } that.$API.em.equipment.get_svs_char.req({ - ip: that.ocr_ip, + host: that.ocr_ip, port: that.ocr_port, - unit: that.ocr_unit + flow_unit: that.ocr_unit }).then((res) => { - alert(res); - // if(res.number){ - // that.mlogbwlist.forEach((item,index) => { - // if(item.number==res.number){ - // let obj = Object.assign({},item); - // obj.isEdit = true; - // that.mlogbwlist.splice(index,1); - // that.wprInputText = ""; - // that.mlogbwlist.unshift(obj); - // that.$nextTick(() => { - // that.selectedindexes.push(obj.id); - // that.selectWprList.push(item); - // }) - // //第二步:获取投影仪设备的监测数据 - // //先判断是否有需要检测设备的检测项,若有,赋值,若无,跳过 - // if(that.qct_testitems.length>0 && !!that.setForm.cd_req_addr){ - // that.$API.em.cd.req({method:that.setForm.cd_req_addr}).then((res) => { - // that.qct_testitems.forEach(item0 => { - // if(item0.testitem_cd_expr!=null){ - // that.mlogbwlist[index][item0.testitem_name]= eval(item0.testitem_cd_expr); - // that.qct_defects.forEach(item => { - // if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){ - // let str = item.rule_expression.replace(/`/g, ''); - // str = str.replace(/\${(.*?)}/g, 'row.\$1'); - // let judge = false; - // try { - // judge = eval(str); - // that.mlogbwlist[index][item.defect_name] = judge; - // }catch (error) { - // console.error(error); - // } - // }else{ - // that.mlogbwlist[index][item.defect_name] = false; - // } - // }); - // } - // }) - // }).catch((err) => { - // this.$notify.error({ - // title: '获取数据失败', - // message: err.data - // }) - // return err; - // }); - // } - // } - // }) - // } + console.log(res); + if(res.char){ + that.mlogbwlist.forEach((item,index) => { + if(item.number==res.char){ + let obj = Object.assign({},item); + obj.isEdit = true; + that.mlogbwlist.splice(index,1); + that.wprInputText = ""; + that.mlogbwlist.unshift(obj); + that.$nextTick(() => { + that.selectedindexes.push(obj.id); + that.selectWprList.push(item); + }) + //第二步:获取投影仪设备的监测数据 + //先判断是否有需要检测设备的检测项,若有,赋值,若无,跳过 + if(that.qct_testitems.length>0 && !!that.setForm.cd_req_addr){ + that.$API.em.cd.req({method:that.setForm.cd_req_addr}).then((res) => { + that.qct_testitems.forEach(item0 => { + if(item0.testitem_cd_expr!=null){ + that.mlogbwlist[index][item0.testitem_name]= eval(item0.testitem_cd_expr); + that.qct_defects.forEach(item => { + if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){ + let str = item.rule_expression.replace(/`/g, ''); + str = str.replace(/\${(.*?)}/g, 'row.\$1'); + let judge = false; + try { + judge = eval(str); + that.mlogbwlist[index][item.defect_name] = judge; + }catch (error) { + console.error(error); + } + }else{ + that.mlogbwlist[index][item.defect_name] = false; + } + }); + } + }) + }).catch((err) => { + this.$notify.error({ + title: '获取数据失败', + message: err.data + }) + return err; + }); + } + } + }) + } }).catch((err) => { that.$notify.error({ title: '数字识别获取失败', From aca3d91fa4085098bd9c9bd9def12cb9f0e04f2a Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 5 Jun 2026 16:15:46 +0800 Subject: [PATCH 03/27] =?UTF-8?q?fix:=E8=A7=84=E8=8C=83=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=EF=BC=8C=E5=8E=BB=E6=8E=89=E5=A4=9A=E4=BD=99?= =?UTF-8?q?console?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/mlogbw_check_table.vue | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/views/wpm_bx/mlogbw_check_table.vue b/src/views/wpm_bx/mlogbw_check_table.vue index 7b4b586e..3b1a3784 100644 --- a/src/views/wpm_bx/mlogbw_check_table.vue +++ b/src/views/wpm_bx/mlogbw_check_table.vue @@ -412,6 +412,9 @@ export default { wprInputText:"", project_code:"", test_file_name:"", + ocr_ip:"", + ocr_port:"", + ocr_unit:"", canMultiple:false, selectedAll:false, checkAll: false, @@ -541,6 +544,9 @@ export default { },500) that.actionMenuClickHandler = (event) => that.handleDocumentClick(event); document.addEventListener("click", that.actionMenuClickHandler, true); + that.ocr_ip = localStorage.getItem("ocr_ip") || ""; + that.ocr_port = localStorage.getItem("ocr_port") || ""; + that.ocr_unit = localStorage.getItem("ocr_unit") || ""; }, beforeUnmount() { @@ -698,7 +704,6 @@ export default { }, timeChange(row){ let that = this; - console.log('row',row) let index = that.mlogbwlist.indexOf(row); if(row.work_start_time!==''&&row.work_start_time!==null&&row.work_start_time!==undefined){ let waveNum = 1; @@ -1124,9 +1129,6 @@ that.$API.wpm.prints.req(printer_ip, obj).then((response) => { //扫描这里更新:添加数字化识别,调用一个接口,并且返回number和设备数据,然后根据number将这一行放到第一行并编辑这一行,并且把设备数据放到对应位置 digital(){ let that = this; - that.ocr_ip = localStorage.getItem("ocr_ip") || ""; - that.ocr_port = localStorage.getItem("ocr_port") || ""; - that.ocr_unit = localStorage.getItem("ocr_unit") || ""; //第一步:调用接口获取数字识别设备返回的number if(!that.ocr_ip || !that.ocr_port || !that.ocr_unit){ that.$message.warning('请先在右上角"数字识别设置"配置IP、端口号和位号'); @@ -1331,7 +1333,6 @@ that.$API.wpm.prints.req(printer_ip, obj).then((response) => { fullscreen: true, text: "解析中...请稍等", }); - console.log(res); this.$API.wpm.mlog.change.req(that.mlogId,{ test_file: res.path }).then((res) => { loading.close(); this.$message.success("导入成功"); From 71bb8eba40474afe222f93fa92af748594ce7167 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 5 Jun 2026 16:22:54 +0800 Subject: [PATCH 04/27] =?UTF-8?q?fix:=E7=A6=85=E9=81=93430?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/route.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/config/route.js b/src/config/route.js index 5e652bc8..5975be6d 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -3528,6 +3528,7 @@ const routes = [ path: "/statistic/task_rate", meta: { title: "任务进度", + hidden: true, // icon: "el-icon-DataAnalysis", perms: ["statistic_wpm"], }, @@ -3595,6 +3596,7 @@ const routes = [ name: "user_statistics", meta: { title: "绩效统计", + hidden: true, icon: "el-icon-trend-charts", perms: ["statistic_kpi"], }, From 5172fe960ccb7cbe2f12daaea013634cedb8f539 Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 9 Jun 2026 09:28:11 +0800 Subject: [PATCH 05/27] =?UTF-8?q?fix:=E8=BE=93=E5=85=A5=E7=89=A9=E6=96=99?= =?UTF-8?q?=E7=9A=84wpr=E5=88=97=E8=A1=A8=E6=98=BE=E7=A4=BA=E7=BC=BA?= =?UTF-8?q?=E9=99=B7=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/mlogbw_check.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/views/wpm_bx/mlogbw_check.vue b/src/views/wpm_bx/mlogbw_check.vue index 3fdff9fd..0a80f1c1 100644 --- a/src/views/wpm_bx/mlogbw_check.vue +++ b/src/views/wpm_bx/mlogbw_check.vue @@ -620,6 +620,13 @@ export default { that.testitems.push(obj) } }) + res.qct_defects.forEach((item) => { + that.addTemplate[item.defect_name] = false; + let obj = Object.assign({}, item); + obj.canEdit = that.processType=='20'?false:true; + that.qct_defects.push(obj); + }) + that.qct_defects_origin = that.qct_defects; that.getList(); }); }, From 1f1088fbd55a5528f521427870962e5da4bb8bfa Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 9 Jun 2026 09:29:32 +0800 Subject: [PATCH 06/27] =?UTF-8?q?feat:=E6=97=A5=E5=BF=97=E8=BE=93=E5=87=BA?= =?UTF-8?q?=E7=89=A9=E6=96=99=E4=B8=AD=E8=8E=B7=E5=8F=96=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=90=8E=E8=87=AA=E5=8A=A8=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/mlogbw_check_table.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/wpm_bx/mlogbw_check_table.vue b/src/views/wpm_bx/mlogbw_check_table.vue index 3b1a3784..a1bf6e34 100644 --- a/src/views/wpm_bx/mlogbw_check_table.vue +++ b/src/views/wpm_bx/mlogbw_check_table.vue @@ -1174,6 +1174,7 @@ that.$API.wpm.prints.req(printer_ip, obj).then((response) => { that.mlogbwlist[index][item.defect_name] = false; } }); + that.formTableSave(); } }) }).catch((err) => { @@ -1249,6 +1250,7 @@ that.$API.wpm.prints.req(printer_ip, obj).then((response) => { that.mlogbwlist[index][item.defect_name] = false; } }); + that.formTableSave(); } }) }).catch((err) => { From 6e93de20a3c809b9de3f0ab12d572a09a664a446 Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 9 Jun 2026 11:05:00 +0800 Subject: [PATCH 07/27] =?UTF-8?q?feat:=E7=A6=85=E9=81=93436?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/cm.js | 8 +++ src/layout/components/userbar.vue | 86 +++++++++++++++++++++++++------ src/utils/tool.js | 5 ++ src/views/wpm_bx/wprList.vue | 37 +++++++++++++ 4 files changed, 121 insertions(+), 15 deletions(-) diff --git a/src/api/model/cm.js b/src/api/model/cm.js index cf9940e3..f50827e6 100644 --- a/src/api/model/cm.js +++ b/src/api/model/cm.js @@ -101,6 +101,14 @@ export default { `${config.API_URL}/cm/labeltemplate/${id}/send_to_coder/`, data); } + }, + sendToHanslaser:{ + name: "下发到激光", + req: async function(id, data){ + return await http.post( + `${config.API_URL}/cm/labeltemplate/${id}/send_to_hanslaser/`, + data); + } } } } diff --git a/src/layout/components/userbar.vue b/src/layout/components/userbar.vue index 049f4515..16902e1a 100644 --- a/src/layout/components/userbar.vue +++ b/src/layout/components/userbar.vue @@ -1,25 +1,41 @@ diff --git a/src/views/wpm_gx/mlogb_form.vue b/src/views/wpm_gx/mlogb_form.vue index d3bf8cba..8f98c24a 100644 --- a/src/views/wpm_gx/mlogb_form.vue +++ b/src/views/wpm_gx/mlogb_form.vue @@ -6,185 +6,181 @@ destroy-on-close @closed="$emit('closed')" > - - - - - - - - - [{{ item.routepack_name }}]{{ item.name }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 保存 - 取消 - - + + + + + + + [{{ item.routepack_name }}]{{ item.name }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 保存 + 取消 + From b66f71c2d53d8e5d65862c4677f24aa167451293 Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 17 Jun 2026 09:06:04 +0800 Subject: [PATCH 22/27] =?UTF-8?q?feat:=E5=B7=A5=E5=BA=8F=E4=BD=99=E6=96=99?= =?UTF-8?q?=E5=8F=AA=E6=98=BE=E7=A4=BAQS=E3=80=8132.2=E3=80=813D=E3=80=812?= =?UTF-8?q?.5D=E5=9B=9B=E7=A7=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bigScreen/gxerp/index_com.vue | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/views/bigScreen/gxerp/index_com.vue b/src/views/bigScreen/gxerp/index_com.vue index 3938f194..c5f3346a 100644 --- a/src/views/bigScreen/gxerp/index_com.vue +++ b/src/views/bigScreen/gxerp/index_com.vue @@ -359,10 +359,12 @@ export default { let list = res.data2.ds0; if (list.length > 0) { list.forEach((item) => { - let arr = []; - arr[0] = item.物料名+'('+item.状态+')'; - arr[1] = item.数量; - that.configDataProcess.data.push(arr); + if(item.物料名.indexOf('QS')>-1||item.物料名.indexOf('32.2')>-1||item.物料名.indexOf('3D')>-1||item.物料名.indexOf('2.5D')>-1){ + let arr = []; + arr[0] = item.物料名+'('+item.状态+')'; + arr[1] = item.数量; + that.configDataProcess.data.push(arr); + } }) } }) @@ -471,7 +473,7 @@ export default { getMaterials(page) { let that = this; let query = '{ material_name, batch, count, count_working }'; - that.$API.wpm.wmaterial.list.req({ page: page, page_size: 500, mgroup: that.mgroupId, query: query }).then((res) => { + that.$API.wpm.wmaterial.list.req({ page: page, page_size: 100, mgroup: that.mgroupId, query: query }).then((res) => { if (res.results.length > 0) { res.results.forEach((item) => { let arr = []; @@ -481,6 +483,9 @@ export default { arr[3] = item.count_working; that.configDataInm.data.push(arr); }) + if(that.configDataInm.data.length Date: Wed, 17 Jun 2026 16:07:33 +0800 Subject: [PATCH 23/27] =?UTF-8?q?feat=EF=BC=9A=E5=85=89=E5=AD=90=E9=94=80?= =?UTF-8?q?=E5=94=AE=E5=8F=91=E8=B4=A7mioitems=E5=88=9B=E5=BB=BA=E6=97=B6?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E6=89=B9=E6=AC=A1=E5=88=9B=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/inm/mioitem_form.vue | 44 +++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/src/views/inm/mioitem_form.vue b/src/views/inm/mioitem_form.vue index 7ee5c7b8..1f52f301 100644 --- a/src/views/inm/mioitem_form.vue +++ b/src/views/inm/mioitem_form.vue @@ -90,6 +90,7 @@ v-model="selectBatch" value-key="id" clearable + :multiple="project_code=='gz'&&form.type == 'sale_out'" filterable remote = "true" :style="divStyle" @@ -581,6 +582,13 @@ export default { that.form.count = Number(that.selectObj.count_canmio); that.mTracking = that.selectObj.material_.tracking; that.selectBatchChange(that.selectObj) + }else if(that.type == "sale_out"&&that.project_code=='gz'){ + that.form.material = that.selectObj.id; + that.form.unit = that.selectObj.unit; + that.form.unit_price = that.selectObj.unit_price; + that.mTracking = that.selectObj.tracking; + that.selectBatch = []; + that.getBatchOptions(); }else{ var type = this.form.type; that.form.material = that.selectObj.id; @@ -616,6 +624,26 @@ export default { let that = this; that.wprList = []; that.mioitems = []; + // gz 销售发货:多选批次 + if(that.form.type == 'sale_out' && that.project_code == 'gz' && Array.isArray(items)){ + if(items.length === 0){ + that.form.batch = ""; + that.form.mb = ""; + that.form.count = 0; + that.batchcount = 0; + that.form.warehouse = ""; + that.inputBatchDisable = false; + return; + } + let totalCount = items.reduce((sum, it) => sum + Number(it.count_canmio || 0), 0); + that.form.batch = items.map(it => it.batch).join(','); + that.form.mb = items.map(it => it.id).join(','); + that.form.count = totalCount; + that.batchcount = totalCount; + that.form.warehouse = items[0].warehouse; + that.inputBatchDisable = true; + return; + } if(items){ if(that.form.type == 'sale_out'&&that.project_code=='bxerp'){ let count = 0; @@ -876,7 +904,21 @@ export default { try { let res; if (that.mode == "add") { - res = await that.$API.inm.mioitem.create.req(that.form); + if(that.form.type == 'sale_out' && that.project_code == 'gz' && Array.isArray(that.selectBatch) && that.selectBatch.length > 0){ + let payload = that.selectBatch.map(b => ({ + mio: that.mioId, + material: that.form.material, + batch: b.batch, + mb: b.id, + count: Number(b.count_canmio), + warehouse: b.warehouse, + unit_price: that.form.unit_price, + note: that.form.note || '' + })); + res = await that.$API.inm.mioitem.create.req(payload); + } else { + res = await that.$API.inm.mioitem.create.req(that.form); + } } else if (that.mode == "edit") { res = await that.$API.inm.mioitem.update.req(that.form.id,that.form); } From 789d8552399422fcec19298b27e431491574f9c1 Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 18 Jun 2026 10:19:15 +0800 Subject: [PATCH 24/27] =?UTF-8?q?fix:=E5=85=89=E5=AD=90=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E5=86=85=E5=AD=98=E6=B3=84=E9=9C=B2=E9=9A=90=E8=97=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bigScreen/index_photon.vue | 153 +++++++++++++++++++-------- 1 file changed, 106 insertions(+), 47 deletions(-) diff --git a/src/views/bigScreen/index_photon.vue b/src/views/bigScreen/index_photon.vue index 7eceb216..11aa755a 100644 --- a/src/views/bigScreen/index_photon.vue +++ b/src/views/bigScreen/index_photon.vue @@ -463,10 +463,21 @@ export default { percentage: 100, count_guan: 0, }, + isUnmounted: false, + pieChart: null, + line1Chart: null, + line2Chart: null, + line3Chart: null, + bar1Chart: null, + onResize: null, + onCanvasMouseMove: null, + onCanvasClick: null, + canvasEl: null, }; }, mounted() { loadBabylon().then(() => { + if (this.isUnmounted) return; this.initView(); }) }, @@ -536,27 +547,22 @@ export default { that.showTime(); }, 1000); that.notokTimer = setInterval(() => { + if (that.isUnmounted) return; let pieDom = document.getElementById("pie"); - if (pieDom) { - if (that.deptName == "10车间") { - that.deptName = "7车间"; - } else { - that.deptName = "10车间"; - } - let deptData = []; - if (that.deptName == "7车间") { - deptData = that.dept7Data; - } else { - deptData = that.dept10Data; - } - that.pieoption.series.data = deptData; - let pieoption = that.pieoption; - - let pieChart = echarts.init(pieDom); - pieChart.clear(); - pieChart.setOption(pieoption, true); + if (!pieDom) return; + if (that.deptName == "10车间") { + that.deptName = "7车间"; + } else { + that.deptName = "10车间"; } - }, 5000); + let deptData = + that.deptName == "7车间" ? that.dept7Data : that.dept10Data; + that.pieoption.series.data = deptData; + if (!that.pieChart || that.pieChart.isDisposed()) { + that.pieChart = echarts.init(pieDom); + } + that.pieChart.setOption(that.pieoption, true); + }, 60000); that.timerData = setInterval(() => { that.getDeptDetail(); }, 60000); @@ -592,8 +598,12 @@ export default { that.getCountDept7(); //左1---本周交付数 let chartDom = document.getElementById("line1"); + if (!chartDom) return; chartDom.style.height = this.blockHeight; - let myChart = echarts.init(chartDom); + if (!that.line1Chart || that.line1Chart.isDisposed()) { + that.line1Chart = echarts.init(chartDom); + } + let myChart = that.line1Chart; let option = { tooltip: { trigger: "axis", @@ -862,8 +872,12 @@ export default { } //柱状图折线 let line3Dom = document.getElementById("line3"); + if (!line3Dom) return; line3Dom.style.height = this.blockHeight; - let line3Chart = echarts.init(line3Dom); + if (!that.line3Chart || that.line3Chart.isDisposed()) { + that.line3Chart = echarts.init(line3Dom); + } + let line3Chart = that.line3Chart; let line3option = { tooltip: { trigger: "axis", @@ -1217,7 +1231,7 @@ export default { // 添加抓取事件 const hl1 = new BABYLON.HighlightLayer("hl1", scene); const hl1Click = new BABYLON.HighlightLayer("hl1Click", scene); - canvas.addEventListener("mousemove", (event) => { + that.onCanvasMouseMove = (event) => { // 使用 scene.pick 检测鼠标拾取 const pickResult = scene.pick( scene.pointerX, @@ -1292,8 +1306,9 @@ export default { } else { that.infoVisibel = false; } - }); - canvas.addEventListener("click", (event) => { + }; + canvas.addEventListener("mousemove", that.onCanvasMouseMove); + that.onCanvasClick = (event) => { // 使用 scene.pick 检测鼠标拾取 const pickResult = scene.pick( scene.pointerX, @@ -1364,7 +1379,8 @@ export default { } } } - }); + }; + canvas.addEventListener("click", that.onCanvasClick); return scene; }; const scene = createScene(); //Call the createScene function @@ -1374,9 +1390,9 @@ export default { }); this.engine = engine; this.scene = scene; - window.addEventListener("resize", function () { - engine.resize(); - }); + this.canvasEl = canvas; + this.onResize = () => engine.resize(); + window.addEventListener("resize", this.onResize); }, getDeptData(name) { this.infoVisibel = true; @@ -1505,8 +1521,12 @@ export default { let that = this; //左边2 let bar1 = document.getElementById("bar1"); + if (!bar1) return; bar1.style.height = this.blockHeight; - let bar1Chart = echarts.init(bar1); + if (!that.bar1Chart || that.bar1Chart.isDisposed()) { + that.bar1Chart = echarts.init(bar1); + } + let bar1Chart = that.bar1Chart; let bar1option = { tooltip: { trigger: "axis", @@ -1655,8 +1675,12 @@ export default { bar1Chart.setOption(bar1option); //左3 let line2Dom = document.getElementById("line2"); + if (!line2Dom) return; line2Dom.style.height = this.blockHeight; - let line2Chart = echarts.init(line2Dom); + if (!that.line2Chart || that.line2Chart.isDisposed()) { + that.line2Chart = echarts.init(line2Dom); + } + let line2Chart = that.line2Chart; let line2option = { tooltip: { trigger: "axis", @@ -1845,8 +1869,12 @@ export default { line2Chart.setOption(line2option); //饼状图 let pieDom = document.getElementById("pie"); + if (!pieDom) return; pieDom.style.height = this.blockHeight; - let pieChart = echarts.init(pieDom); + if (!that.pieChart || that.pieChart.isDisposed()) { + that.pieChart = echarts.init(pieDom); + } + let pieChart = that.pieChart; let pieoption = { color: [ "rgb(237,224,45)", @@ -1914,22 +1942,53 @@ export default { }, }, beforeUnmount() { - let that = this; - clearInterval(that.timerTime); - clearInterval(that.timerData); - clearInterval(that.notokTimer); - that.timerTime = null; - that.timerData = null; - that.notokTimer = null; - }, - beforeDestoryed() { - let that = this; - clearInterval(that.timerTime); - clearInterval(that.timerData); - clearInterval(that.notokTimer); - that.timerTime = null; - that.timerData = null; - that.notokTimer = null; + this.isUnmounted = true; + // 定时器 + clearInterval(this.timerTime); + clearInterval(this.timerData); + clearInterval(this.notokTimer); + clearInterval(this.heightTimer); + this.timerTime = null; + this.timerData = null; + this.notokTimer = null; + this.heightTimer = null; + // echarts 实例 + [ + this.pieChart, + this.line1Chart, + this.line2Chart, + this.line3Chart, + this.bar1Chart, + ].forEach((c) => { + if (c && !c.isDisposed()) c.dispose(); + }); + this.pieChart = this.line1Chart = this.line2Chart = this.line3Chart = this.bar1Chart = null; + // 事件监听器 + if (this.onResize) { + window.removeEventListener("resize", this.onResize); + this.onResize = null; + } + if (this.canvasEl) { + if (this.onCanvasMouseMove) { + this.canvasEl.removeEventListener("mousemove", this.onCanvasMouseMove); + } + if (this.onCanvasClick) { + this.canvasEl.removeEventListener("click", this.onCanvasClick); + } + this.canvasEl = null; + } + this.onCanvasMouseMove = null; + this.onCanvasClick = null; + // babylon 引擎 + if (this.scene) { + try { this.scene.dispose(); } catch (e) {} + this.scene = null; + } + if (this.engine) { + try { this.engine.stopRenderLoop(); } catch (e) {} + try { this.engine.dispose(); } catch (e) {} + this.engine = null; + } }, }; From a7254d578ae1ce49cde7a259003a827e2f594634 Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 18 Jun 2026 14:27:20 +0800 Subject: [PATCH 25/27] =?UTF-8?q?fix:=E5=85=89=E8=8A=AF=E5=B7=A5=E6=AE=B5?= =?UTF-8?q?=E7=9C=8B=E6=9D=BF=E5=B7=A5=E5=BA=8F=E4=BD=99=E6=96=99=E5=8F=AA?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E5=90=88=E6=A0=BC=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bigScreen/gxerp/index_com.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/bigScreen/gxerp/index_com.vue b/src/views/bigScreen/gxerp/index_com.vue index c5f3346a..816faae2 100644 --- a/src/views/bigScreen/gxerp/index_com.vue +++ b/src/views/bigScreen/gxerp/index_com.vue @@ -359,7 +359,7 @@ export default { let list = res.data2.ds0; if (list.length > 0) { list.forEach((item) => { - if(item.物料名.indexOf('QS')>-1||item.物料名.indexOf('32.2')>-1||item.物料名.indexOf('3D')>-1||item.物料名.indexOf('2.5D')>-1){ + if(item.状态=='合格'&&(item.物料名.indexOf('QS')>-1||item.物料名.indexOf('32.2')>-1||item.物料名.indexOf('3D')>-1||item.物料名.indexOf('2.5D')>-1)){ let arr = []; arr[0] = item.物料名+'('+item.状态+')'; arr[1] = item.数量; From 4cb34c00bd7a8128a52b7e8c83078ab4e50f4603 Mon Sep 17 00:00:00 2001 From: shijing Date: Mon, 22 Jun 2026 14:08:43 +0800 Subject: [PATCH 26/27] =?UTF-8?q?feat:=E7=A6=85=E9=81=93437=20=E5=88=86?= =?UTF-8?q?=E6=A3=80=E7=9A=84=E6=A3=80=E6=B5=8B=E8=A1=A8=E9=87=8C=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E5=96=B7=E7=A0=81=E5=B7=A5=E5=BA=8F=E7=9A=84=E5=B7=A5?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/bxerp/fenjian.vue | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/views/statistics/bxerp/fenjian.vue b/src/views/statistics/bxerp/fenjian.vue index 7978f2c8..92b64fbf 100644 --- a/src/views/statistics/bxerp/fenjian.vue +++ b/src/views/statistics/bxerp/fenjian.vue @@ -115,13 +115,18 @@ {{scope.row.data.分检_缺陷项_扭转角不合格?scope.row.data.分检_缺陷项_扭转角不合格:0}} - + + + + - + @@ -151,9 +156,21 @@ export default { apiObj: this.$API.wpm.wpr.query, options:[], tableData:[], + toolList:{}, }; }, + mounted() { + this.getToolings(); + }, methods: { + getToolings(){ + let that = this; + that.$API.em.equipment.list.req({ page: 0,type:10,cate__code:'7'}).then((res) => { + res.forEach((item) => { + that.toolList[item.id] = item.number; + }); + }); + }, handleQuery(){ let that = this; let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__分检_日期",compare:"isnull",value:false},{field:"data__has_key",compare:"",value:"分检_批次号"}]]; From 6181b757956629177a7c2a4e08918634c72dfac8 Mon Sep 17 00:00:00 2001 From: shijing Date: Mon, 22 Jun 2026 14:38:32 +0800 Subject: [PATCH 27/27] =?UTF-8?q?feat:=E7=A6=85=E9=81=93438?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/mlogbw_check_table.vue | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/views/wpm_bx/mlogbw_check_table.vue b/src/views/wpm_bx/mlogbw_check_table.vue index 8769d286..d63ff6f6 100644 --- a/src/views/wpm_bx/mlogbw_check_table.vue +++ b/src/views/wpm_bx/mlogbw_check_table.vue @@ -58,7 +58,10 @@ 扭转日期 工装 {{ item.testitem_name }} - {{ item.defect_name }} + + {{ item.defect_name }} + {{ getDefectCount(item.defect_name) }} + 备注 操作 @@ -1358,6 +1361,15 @@ that.$API.wpm.prints.req(printer_ip, obj).then((response) => { this.$message.error("导入失败,请重新尝试"); }); }, + getDefectCount(defectName){ + let count = 0; + this.mlogbwlist.forEach(row => { + if(row[defectName]){ + count++; + } + }); + return count; + }, hasNull(){ let that = this; let canSubmit = true;