From 42558892818b8fc605ff623eba1c6e5cf1445899 Mon Sep 17 00:00:00 2001 From: shijing Date: Mon, 7 Apr 2025 16:34:59 +0800 Subject: [PATCH 01/67] =?UTF-8?q?=E5=85=89=E5=AD=90=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/inm/mio_form.vue | 4 +- src/views/inm/mioitem_form.vue | 130 ++++++++++++++++++++------------- src/views/pm/utask_form.vue | 4 +- src/views/pm/utask_form_2.vue | 4 +- 4 files changed, 86 insertions(+), 56 deletions(-) diff --git a/src/views/inm/mio_form.vue b/src/views/inm/mio_form.vue index fa95efae..d13faa1a 100644 --- a/src/views/inm/mio_form.vue +++ b/src/views/inm/mio_form.vue @@ -12,9 +12,9 @@ :rules="rules" label-width="120px" > - + - + + + @@ -53,6 +64,8 @@ clearable style="width: 100%" :disabled="inputBatchDisable" + @clear="selectBatchClear" + @change="selectChange" > - + - + @@ -253,6 +265,7 @@ export default { }, ], }, + selectObj:{}, visible: false, isSaveing: false, materialOptions: [], @@ -269,6 +282,8 @@ export default { mioitems:[''], mioitemw:[], project_code:'', + mTracking:10, + apiObj:this.$API.mtm.material.list, }; }, mounted() { @@ -347,7 +362,7 @@ export default { this.inputBatchDisable = true; } else if (type == "do_in") { //生产入库 - query = { page: 0, type__in: type__in }; + query = { page: 0,is_hidden: false, type__in: type__in }; this.inputBatchDisable = false; } else if (type == "pur_in") { //采购入库 @@ -368,12 +383,13 @@ export default { }; this.inputBatchDisable = true; } else { - query = { page: 0 }; + query = { page: 0 ,is_hidden:false}; } - - this.$API.mtm.material.list.req(query).then((res) => { - this.materialOptions = res; - }); + this.query = query; + this.apiObj=this.$API.mtm.material.list; + // this.$API.mtm.material.list.req(query).then((res) => { + // this.materialOptions = res; + // }); }, async initAssemb(item) { this.selectBatchDisable = true; @@ -410,23 +426,35 @@ export default { } }); }, - selectMaterialChange(item) { - var that = this; - var type = this.form.type; - var material = item.id; - that.form.material = material; - - if (type == "do_in") { - if (item.is_assemb) { - this.initAssemb(item); - } else { - this.selectBatchDisable = false; - this.components = []; - this.assembShow = false; - this.getBatchOptions(); + selectChange(item){ + console.log(item) + let that = this; + that.wbatchOptions.forEach((item) => { + if(that.form.batch == item.batch){ + that.form.count = item.count; + that.form.wm = item.id; + } + }) + + }, + selectMaterialChange() { + var that = this; + if(that.form.material!==''&&that.form.material!==null&&that.form.material!==undefined){ + var type = that.form.type; + that.form.material = that.selectObj.id; + that.mTracking = that.selectObj.tracking; + if (type == "do_in") { + if (that.selectObj.is_assemb) { + that.initAssemb(that.selectObj); + } else { + that.selectBatchDisable = false; + that.components = []; + that.assembShow = false; + that.getBatchOptions(); + } + } else { + that.getBatchOptions(); } - } else { - this.getBatchOptions(); } }, getItem(options, id) { @@ -437,15 +465,18 @@ export default { } }, selectBatchChange(item) { - this.form.batch = item.batch; - this.form.mb = item.id; - this.form.count = item.count; - this.form.warehouse = item.warehouse; - this.warehouseDisable = true; - this.inputBatchDisable = true; + if(item!==''&&item!==null&&item!==undefined){ + this.form.batch = item.batch; + this.form.mb = item.id; + this.form.count = item.count; + this.form.warehouse = item.warehouse; + this.warehouseDisable = true; + this.inputBatchDisable = true; + } }, selectBatchClear() { this.form.mb = ""; + this.form.wm = ""; this.form.batch = ""; this.form.count = ""; this.form.warehouse = ""; @@ -464,23 +495,22 @@ export default { }, countChange(){ let that = this; - if(that.project_code=='bxerp'){ - if(that.form.type == "pur_in"){ - that.mioitems = [];that.mioitemw = []; - for(let i=0;i1&&( that.form.type == 'pur_in'|| that.form.type == 'other_in')){ + that.mioitems = [];that.mioitemw = []; + for(let i=0;i - + - + From 66ddb6dda84b3c329dde54bb3e693d0983856717 Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 9 Apr 2025 13:27:33 +0800 Subject: [PATCH 02/67] =?UTF-8?q?fix:=E7=94=9F=E4=BA=A7=E6=A3=80=E9=AA=8C?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/product_check.vue | 46 ++++++++++++++++---------- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/src/views/statistics/product_check.vue b/src/views/statistics/product_check.vue index 0180af56..9a5e00f5 100644 --- a/src/views/statistics/product_check.vue +++ b/src/views/statistics/product_check.vue @@ -72,17 +72,13 @@ - + - + - + @@ -442,6 +430,15 @@ export default { that.$API.bi.dataset.exec.req(exec, obj2).then((res2) => { console.log("退火车间统计:", res2); if (res2.data2.ds0) { + that.option3.series.data[0].value=0; + that.option3.series.data[1].value=0; + that.option3.series.data[2].value=0; + that.option3.series.data[3].value=0; + that.option3.series.data[4].value=0; + that.option3.series.data[5].value=0; + that.option3.series.data[6].value=0; + that.option3.series.data[7].value=0; + that.option3.series.data[8].value=0; let data = res2.data2.ds0; if (data.length > 0) { data.forEach((item) => { @@ -493,6 +490,12 @@ export default { that.$API.bi.dataset.exec.req(exec, obj2).then((res2) => { console.log("7生产车间统计:", res2); if (res2.data2.ds0) { + that.option1.series.data[0].value=0; + that.option1.series.data[1].value=0; + that.option1.series.data[2].value=0; + that.option1.series.data[3].value=0; + that.option1.series.data[4].value=0; + that.option1.series.data[5].value=0; let data = res2.data2.ds0; if (data.length > 0) { data.forEach((item) => { @@ -542,6 +545,13 @@ export default { console.log("10生产车间统计:", res2); if (res2.data2.ds0) { let data = res2.data2.ds0; + that.option2.series.data[0].value=0; + that.option2.series.data[1].value=0; + that.option2.series.data[2].value=0; + that.option2.series.data[3].value=0; + that.option2.series.data[4].value=0; + that.option2.series.data[5].value=0; + that.option2.series.data[6].value=0; if (data.length > 0) { data.forEach((item) => { that.option2.series.data[0].value += item.合格数; From 2050221876b0c68472b5c4a0a60f0e4d982caf2e Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 9 Apr 2025 13:28:06 +0800 Subject: [PATCH 03/67] =?UTF-8?q?fix:=E5=B7=A5=E5=BA=8F=E5=92=8C=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E7=BB=9F=E8=AE=A1=E4=BF=AE=E6=AD=A3=EF=BC=88=E6=9C=AA?= =?UTF-8?q?=E5=AE=8C=E6=88=90=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/ppass_num.vue | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/views/statistics/ppass_num.vue b/src/views/statistics/ppass_num.vue index 920eb975..bb1a084f 100644 --- a/src/views/statistics/ppass_num.vue +++ b/src/views/statistics/ppass_num.vue @@ -75,12 +75,12 @@ @@ -150,6 +150,18 @@ export default { }, barWidth: "15px", }, + { + name: "G05", + data: [0, 0, 0, 0, 0, 0, 0, 0], + type: "bar", + label: { + show: true, + position: "top", + formatter: "{c}", + color: "rgb(64,158,255)", + }, + barWidth: "15px", + }, ], }, processData: [], @@ -201,9 +213,7 @@ export default { ",EXTRACT ( MONTH FROM mlog.handle_date )"; obj.query.order_bys_date = ", 月"; } - let xAxisData = [], - data1 = [], - data0 = []; + let xAxisData = [],data2 = [],data1 = [],data0 = []; that.$API.bi.dataset.exec.req("lineWeek", obj).then((res) => { let data = res.data2.ds0; that.tableData = data; @@ -214,7 +224,9 @@ export default { } console.log("xAxisData:", xAxisData); let index = xAxisData.indexOf(item.工段); - if (item.物料名.indexOf("棒") > -1) { + if (item.物料名.indexOf("G05") > -1) { + data2[index] = item.合格数; + }else if (item.物料名.indexOf("棒") > -1) { data0[index] = item.合格数; } else { data1[index] = item.合格数; @@ -224,6 +236,7 @@ export default { that.option.xAxis.data = that.xAxisData; that.option.series[0].data = data0; that.option.series[1].data = data1; + that.option.series[2].data = data2; }); }, handleQuery() { From bc7336155444ca5f08b08140c927bac86098e30b Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 9 Apr 2025 16:35:01 +0800 Subject: [PATCH 04/67] =?UTF-8?q?fix:=E4=B8=8D=E6=9E=90=E6=99=B6=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E9=94=99=E8=AF=AF=E7=BA=A0=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/qm/behavior.vue | 2 +- src/views/qm/behavior_form.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/qm/behavior.vue b/src/views/qm/behavior.vue index a523a449..a0f26bfd 100644 --- a/src/views/qm/behavior.vue +++ b/src/views/qm/behavior.vue @@ -228,7 +228,7 @@ export default { }, state_xj: { S: "析晶", - K: "不析晶", + R: "不析晶", θ: "未化", }, form: { diff --git a/src/views/qm/behavior_form.vue b/src/views/qm/behavior_form.vue index e1e06d22..4f338fb4 100644 --- a/src/views/qm/behavior_form.vue +++ b/src/views/qm/behavior_form.vue @@ -297,7 +297,7 @@ export default { ], xjOptios: [ { id: "S", name: "析晶" }, - { id: "K", name: "不析晶" }, + { id: "R", name: "不析晶" }, { id: "θ", name: "未化" }, ], visible: false, From 2aabcd17bae4816636be5641ffa3b8c9cb6666ec Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 10 Apr 2025 14:12:49 +0800 Subject: [PATCH 05/67] =?UTF-8?q?fix:=E5=85=89=E5=AD=90=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E4=BF=AE=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/widgets/index_photon.vue | 30 +++++++++++++------------ 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/views/home/widgets/index_photon.vue b/src/views/home/widgets/index_photon.vue index 77c2eef4..ad11c887 100644 --- a/src/views/home/widgets/index_photon.vue +++ b/src/views/home/widgets/index_photon.vue @@ -20,7 +20,6 @@
昨日核心指标
-
@@ -88,17 +87,13 @@
+
+
本月生产数据
+
本月累积交付数
-
+
预制棒管

{{ monthPayNum6 }}

@@ -864,16 +859,22 @@ export default { }); //6车间本月交付数 that.$API.bi.dataset.exec.req("saleOutMonth", obj6).then((res6) => { - if (res6.data2.ds0) { + let sum6 = 0,sum6AVG = 0; + if (res6.data2.ds0&&res6.data2.ds0.length>0) { let list6 = res6.data2.ds0; - let sum6 = 0; if (list6.length > 0) { list6.forEach((item) => { - sum6 = sum6 + item.交付数; + if(item.物料.indexOf('AVG')>-1){ + sum6AVG = sum6AVG + item.数量; + }else{ + sum6 = sum6 + item.数量; + } + }); } - this.monthPayNum6 = sum6; } + this.monthPayNum6 = sum6; + this.monthPayNumAVG = sum6AVG; }); }, //获取昨日AVG的生产记录 @@ -1022,6 +1023,7 @@ export default { box-sizing: border-box; position: relative; background: #ffffff; + padding-top: 20px; } .Retangle_container { display: flex; @@ -1116,7 +1118,7 @@ export default { } .middleRetangle { - border-radius: 2px; + // border-radius: 2px; position: relative; box-sizing: border-box; } From 48c902bdc40225c2ee983e82febc7458d5a708c5 Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 10 Apr 2025 14:13:54 +0800 Subject: [PATCH 06/67] =?UTF-8?q?fix:mioitem=5Fform=20=E4=B8=AD=E4=BB=93?= =?UTF-8?q?=E5=BA=93=E5=B7=B2=E6=9C=89=E6=89=B9=E6=AC=A1=E5=8F=AF=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/inm/mioitem_form.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/inm/mioitem_form.vue b/src/views/inm/mioitem_form.vue index b835c187..717ff96a 100644 --- a/src/views/inm/mioitem_form.vue +++ b/src/views/inm/mioitem_form.vue @@ -91,6 +91,7 @@ v-model="selectBatch" value-key="id" clearable + filterable style="width: 100%" @change="selectBatchChange" @clear="selectBatchClear" From 4bf623b93f34ab80a18ee697bdf08ca8a572917f Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 10 Apr 2025 14:15:05 +0800 Subject: [PATCH 07/67] =?UTF-8?q?fix:=E9=A6=96=E4=BB=B6=E6=A3=80=E9=AA=8C?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E4=B8=AD=E4=BA=BA=E5=91=98=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/qm/first_check.vue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/views/qm/first_check.vue b/src/views/qm/first_check.vue index aefbb318..7fed8356 100644 --- a/src/views/qm/first_check.vue +++ b/src/views/qm/first_check.vue @@ -279,11 +279,9 @@ export default { //获取员工 getUserList() { let that = this; - this.$API.system.user.list - .req({ page: 0, posts__code__contains: "check" }) - .then((res) => { - that.userList = res.results; - }); + this.$API.system.user.list.req({ page: 0, posts__code__contains: "check" }).then((res) => { + that.userList = res; + }); }, // getProcess(){ // let that = this; From 141d7db1855ff921117890b25ae5bb4834902c84 Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 10 Apr 2025 14:15:49 +0800 Subject: [PATCH 08/67] =?UTF-8?q?fix:=E7=BB=9F=E8=AE=A1=E5=88=86=E6=9E=90?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/hunliao.vue | 32 +++---- src/views/statistics/ppass_num.vue | 120 ++++++++++++++---------- src/views/statistics/product_check2.vue | 6 +- 3 files changed, 87 insertions(+), 71 deletions(-) diff --git a/src/views/statistics/hunliao.vue b/src/views/statistics/hunliao.vue index 3582ba0c..b53cc4a9 100644 --- a/src/views/statistics/hunliao.vue +++ b/src/views/statistics/hunliao.vue @@ -21,13 +21,12 @@
-
导出 - + @@ -53,7 +52,6 @@
-
@@ -131,7 +129,7 @@ export default { barWidth: '15px', }] }, - tableData7: [], + dataList: [], tableData10: [], firstWeekNum: 1, endWeekNum: 4, @@ -158,8 +156,8 @@ export default { that.xAxisOrigin.push('第' + i + '周'); } that.xAxisData = that.xAxisOrigin; - that.getData7(); - that.getData10(); + that.getDataHL(); + that.getDataHLXH(); }, methods: { setChart(name, option = null) { @@ -191,7 +189,7 @@ export default { } // 计算两者之间相隔的周数并返回结果 }, - getData7() { + getDataHL() { let that = this; let obj = { query: { start_date: that.start_date, end_date: that.end_date, mgroup_name: "混料", is_count_utask: -1 }, @@ -201,20 +199,18 @@ export default { option.title.text = '混料统计'; let exec = that.queryType == '月' ? 'lineWeek' : 'lineMonth'; that.$API.bi.dataset.exec.req(exec, obj).then((res) => { - let tableData7 = res.data2.ds0 ? res.data2.ds0 : []; - that.tableData7 = tableData7; - debugger; - if (tableData7.length > 0) { - debugger; + let dataList = res.data2.ds0 ? res.data2.ds0 : []; + that.dataList = dataList; + if (dataList.length > 0) { option.series = []; let seriesData = [], nameList = []; - tableData7.forEach(ite => { + dataList.forEach(ite => { if (nameList.indexOf(ite.物料名) > -1) { } else { nameList.push(ite.物料名); seriesData.push([]) } }) - tableData7.forEach(item => { + dataList.forEach(item => { let indexX = 0, indexY = 0; if (that.queryType == '月') { indexX = nameList.indexOf(item.物料名); @@ -223,7 +219,7 @@ export default { indexX = nameList.indexOf(item.物料名); indexY = item.月 - 1; } - seriesData[indexX][indexY] = item.合格数; + seriesData[indexX][indexY] += item.合格数; }); for (let n = 0; n < seriesData.length; n++) { let obj = {}; @@ -240,7 +236,7 @@ export default { } }); }, - getData10() { + getDataHLXH() { let that = this; let option = deepCopy(that.basicOption); option.xAxis.data = that.xAxisData; @@ -320,8 +316,8 @@ export default { } that.xAxisData = that.monthList; } - this.getData7(); - this.getData10(); + this.getDataHL(); + this.getDataHLXH(); }, handleExport(val) { this.exportLoading = true; diff --git a/src/views/statistics/ppass_num.vue b/src/views/statistics/ppass_num.vue index bb1a084f..e37ac3fb 100644 --- a/src/views/statistics/ppass_num.vue +++ b/src/views/statistics/ppass_num.vue @@ -75,12 +75,12 @@
@@ -126,42 +126,42 @@ export default { type: "value", }, series: [ - { - name: "光纤预制棒", - data: [0, 0, 0, 0, 0, 0, 0, 0], - type: "bar", - label: { - show: true, - position: "top", - formatter: "{c}", - color: "rgb(64,158,255)", - }, - barWidth: "15px", - }, - { - name: "光纤预制管", - data: [0, 0, 0, 0, 0, 0, 0, 0], - type: "bar", - label: { - show: true, - position: "top", - formatter: "{c}", - color: "rgb(64,158,255)", - }, - barWidth: "15px", - }, - { - name: "G05", - data: [0, 0, 0, 0, 0, 0, 0, 0], - type: "bar", - label: { - show: true, - position: "top", - formatter: "{c}", - color: "rgb(64,158,255)", - }, - barWidth: "15px", - }, + // { + // name: "光纤预制棒", + // data: [0, 0, 0, 0, 0, 0, 0, 0], + // type: "bar", + // label: { + // show: true, + // position: "top", + // formatter: "{c}", + // color: "rgb(64,158,255)", + // }, + // barWidth: "15px", + // }, + // { + // name: "光纤预制管", + // data: [0, 0, 0, 0, 0, 0, 0, 0], + // type: "bar", + // label: { + // show: true, + // position: "top", + // formatter: "{c}", + // color: "rgb(64,158,255)", + // }, + // barWidth: "15px", + // }, + // { + // name: "G05", + // data: [0, 0, 0, 0, 0, 0, 0, 0], + // type: "bar", + // label: { + // show: true, + // position: "top", + // formatter: "{c}", + // color: "rgb(64,158,255)", + // }, + // barWidth: "15px", + // }, ], }, processData: [], @@ -213,7 +213,7 @@ export default { ",EXTRACT ( MONTH FROM mlog.handle_date )"; obj.query.order_bys_date = ", 月"; } - let xAxisData = [],data2 = [],data1 = [],data0 = []; + let xAxisData = [],nameData=[],seriesData=[],data2 = [],data1 = [],data0 = []; that.$API.bi.dataset.exec.req("lineWeek", obj).then((res) => { let data = res.data2.ds0; that.tableData = data; @@ -222,21 +222,43 @@ export default { } else { xAxisData.push(item.工段); } - console.log("xAxisData:", xAxisData); - let index = xAxisData.indexOf(item.工段); - if (item.物料名.indexOf("G05") > -1) { - data2[index] = item.合格数; - }else if (item.物料名.indexOf("棒") > -1) { - data0[index] = item.合格数; + if (nameData.indexOf(item.物料名) > -1) { } else { - data1[index] = item.合格数; + nameData.push(item.物料名); + let obj = { + name:'', + type: "bar", + label:{ + show: true, + position: "top", + formatter: "{c}", + color: "rgb(64,158,255)", + }, + barWidth: "15px", + data:[0, 0, 0, 0, 0, 0, 0, 0], + }; + obj.name=item.物料名, + seriesData.push(obj); } + console.log("xAxisData:", xAxisData); + console.log("nameData:", nameData); + let index = xAxisData.indexOf(item.工段); + let indexY = nameData.indexOf(item.物料名); + seriesData[indexY].data[index] += item.合格数; + // if (item.物料名.indexOf("G05") > -1) { + // data2[index] = item.合格数; + // }else if (item.物料名.indexOf("棒") > -1) { + // data0[index] = item.合格数; + // } else { + // data1[index] = item.合格数; + // } }); that.xAxisData = xAxisData; that.option.xAxis.data = that.xAxisData; - that.option.series[0].data = data0; - that.option.series[1].data = data1; - that.option.series[2].data = data2; + that.option.series = seriesData; + // that.option.series[0].data = data0; + // that.option.series[1].data = data1; + // that.option.series[2].data = data2; }); }, handleQuery() { diff --git a/src/views/statistics/product_check2.vue b/src/views/statistics/product_check2.vue index 3d57f81b..3cf6a5a7 100644 --- a/src/views/statistics/product_check2.vue +++ b/src/views/statistics/product_check2.vue @@ -141,10 +141,8 @@ this.currentYear = year; this.currentMonth = month; this.queryDate = year + '-' + month; - // this.start_date =year+'-'+month+'-01'; - // this.end_date = year+'-'+month+'-'+new Date(year, month, 0).getDate(); - this.start_date ='2023-01-01'; - this.end_date = '2023-12-31'; + this.start_date =year+'-'+month+'-01'; + this.end_date = year+'-'+month+'-'+new Date(year, month, 0).getDate(); this.getProcess(); }, methods:{ From 3af6b66647d82c33382e4a45de70d9902d9f5e0d Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 11 Apr 2025 10:02:34 +0800 Subject: [PATCH 09/67] =?UTF-8?q?fix:=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/hunliao.vue | 2 +- src/views/statistics/ppass_num.vue | 1 + src/views/statistics/product_check2.vue | 34 ++++++++++++------------- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/views/statistics/hunliao.vue b/src/views/statistics/hunliao.vue index b53cc4a9..f215c8b0 100644 --- a/src/views/statistics/hunliao.vue +++ b/src/views/statistics/hunliao.vue @@ -207,7 +207,7 @@ export default { dataList.forEach(ite => { if (nameList.indexOf(ite.物料名) > -1) { } else { nameList.push(ite.物料名); - seriesData.push([]) + seriesData.push([0,0,0,0,0,0,0,0,0,0,0,0]) } }) dataList.forEach(item => { diff --git a/src/views/statistics/ppass_num.vue b/src/views/statistics/ppass_num.vue index e37ac3fb..080c179b 100644 --- a/src/views/statistics/ppass_num.vue +++ b/src/views/statistics/ppass_num.vue @@ -203,6 +203,7 @@ export default { is_count_utask: -1, select_cols_mgroup: ", mgroup.name AS 工段", group_bys_mgroup: ", mgroup.name", + order_bys_mgroup:",工段" }, raise_exception: true, }; diff --git a/src/views/statistics/product_check2.vue b/src/views/statistics/product_check2.vue index 3cf6a5a7..fccfc61c 100644 --- a/src/views/statistics/product_check2.vue +++ b/src/views/statistics/product_check2.vue @@ -35,9 +35,9 @@
-

各工序检验

- - 各工段检验 + + { - this.processOption = res; - this.process = res[0].id; - this.processName = res[0].name; + getMgroup(){ + this.$API.mtm.mgroup.list.req({belong_dept__name:'6车间',page:0}).then((res) => { + this.mgroupOption = res; + this.mgroup = res[0].id; + this.mgroupName = res[0].name; this.getData(); }); }, - processChange() { - this.processName = this.processOption.find(item => item.id === this.process).name; + mgroupChange() { + this.mgroupName = this.mgroupOption.find(item => item.id === this.mgroup).name; this.getData(); }, getData(){ @@ -169,7 +169,7 @@ query: { end_date: that.end_date, start_date: that.start_date, - mgroup_name: that.processName,group_bys_mgroup: ", mgroup.name", + mgroup_name: that.mgroupName,group_bys_mgroup: ", mgroup.name", group_bys_material: "",order_bys_material: "", select_cols_mgroup: ", mgroup.name AS 工段", select_cols_material: "", @@ -178,7 +178,6 @@ }; //获取echarts数据 that.$API.bi.dataset.exec.req(exec, obj).then((res) => { - console.log('获取echarts数据:', res); if (res.data2.ds0) { let data = res.data2.ds0; let seriesData = [ @@ -201,14 +200,13 @@ }) }) } - console.log('seriesData:', seriesData); that.option1.series[0].data = seriesData; } }); let obj2 = { query: { start_date: that.start_date, end_date: that.end_date, - mgroup_name: that.processName,group_bys_mgroup: ", mgroup.name", + mgroup_name: that.mgroupName,group_bys_mgroup: ", mgroup.name", select_cols_mgroup: ", mgroup.name AS 工段", is_count_utask: -1 }, From ac108870fff903033e138ce84ec4356ab4d701bb Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 11 Apr 2025 13:56:15 +0800 Subject: [PATCH 10/67] =?UTF-8?q?fix:=E5=85=89=E5=AD=90=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E5=88=86=E6=9E=90=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/hunliao.vue | 69 ++++++------ src/views/statistics/material_statistics.vue | 81 +++++---------- src/views/statistics/pass_num.vue | 104 +++++++------------ src/views/statistics/ppass_num.vue | 71 ++----------- 4 files changed, 107 insertions(+), 218 deletions(-) diff --git a/src/views/statistics/hunliao.vue b/src/views/statistics/hunliao.vue index f215c8b0..2c9f0cc5 100644 --- a/src/views/statistics/hunliao.vue +++ b/src/views/statistics/hunliao.vue @@ -144,13 +144,12 @@ export default { let days = new Date(year, month, 0).getDate(); that.currentYear = year; that.currentMonth = month; + that.firstWeekNum = that.getWeekOfYear(year,month,1); + that.endWeekNum = that.getWeekOfYear(year,month,days); + month = month < 10 ? '0' + month : month; that.start_date = year + '-' + month + '-01'; - that.end_date = year + '-' + month + '-' + new Date(year, month, 0).getDate(); - let month1 = month; - if (month1 < 10) { month1 = '0' + month1 } - that.queryDate = year + '-' + month1; - that.firstWeekNum = that.getWeekOfYear(new Date(that.start_date)); - that.endWeekNum = that.getWeekOfYear(new Date(that.end_date)); + that.end_date = year + '-' + month + '-' + days; + that.queryDate = year + '-' + month; let duration = that.endWeekNum - that.firstWeekNum + 1; for (let i = 1; i <= duration; i++) { that.xAxisOrigin.push('第' + i + '周'); @@ -179,15 +178,13 @@ export default { console.log(value) this.queryDate = ''; }, - getWeekOfYear(date) { - var target = new Date(date.getFullYear(), date.getMonth(), date.getDate()); // 创建目标日期对象 - var firstDayOfYear = new Date(target.getFullYear(), 0, 1); // 创建当前年份第一天的日期对象 - if (target.getTime() == firstDayOfYear.getTime()) { - return 1; - } else { - return Math.ceil((target - firstDayOfYear + 8 * (firstDayOfYear.getTimezoneOffset() / 480)) / 604800000); - } - // 计算两者之间相隔的周数并返回结果 + getWeekOfYear(a,b,c) { + var date1 = new Date(a, parseInt(b) - 1, c), //当前日期   + date2 = new Date(a, 0, 1), //当年第一天   + // d是当前日期是今年第多少天   + d = Math.round((date1.valueOf() - date2.valueOf()) / 86400000); + // d + 当前年的第一天的周差距的和在除以7就是本年第几周   + return Math.ceil((d + (date2.getDay() + 1 - 1)) / 7); }, getDataHL() { let that = this; @@ -286,38 +283,40 @@ export default { }, handleQuery() { let that = this; - if (this.queryType == '月') { - if (this.queryDate !== '' && this.queryDate !== null) { - this.start_date = this.queryDate + '-01'; - let arr = this.queryDate.split('-'); - this.end_date = this.queryDate + '-' + new Date(arr[0], arr[1], 0).getDate(); - this.firstWeekNum = this.getWeekOfYear(new Date(this.start_date)); - this.endWeekNum = this.getWeekOfYear(new Date(this.end_date)); - let duration = this.endWeekNum - this.firstWeekNum + 1; + if (that.queryType == '月') { + if (that.queryDate !== '' && that.queryDate !== null) { + let arr = that.queryDate.split('-'); + let year = arr[0]; + let month = arr[1]; + let days = new Date(year, month, 0).getDate(); + that.start_date = that.queryDate + '-01'; + that.end_date = that.queryDate + '-' + days; + that.firstWeekNum = that.getWeekOfYear(year,month,1); + that.endWeekNum = that.getWeekOfYear(year,month,days); + let duration = that.endWeekNum - that.firstWeekNum + 1; let xAxisData = []; for (let i = 1; i <= duration; i++) { xAxisData.push('第' + i + '周'); } that.xAxisData = xAxisData; } else { - this.start_date = this.currentYear + '-' + this.currentMonth + '-01'; - this.end_date = this.currentYear + '-' + this.currentMonth + '-' + new Date(this.currentYear, this.currentMonth, 0).getDate(); - let date = new Date(this.start_date); - this.firstWeekNum = this.getWeekOfYear(date); - this.xAxisData = this.xAxisOrigin; + that.start_date = that.currentYear + '-' + that.currentMonth + '-01'; + that.end_date = that.currentYear + '-' + that.currentMonth + '-' + new Date(that.currentYear, that.currentMonth, 0).getDate(); + that.firstWeekNum = that.getWeekOfYear(that.currentYear,that.currentMonth,1); + that.xAxisData = that.xAxisOrigin; } } else { - if (this.queryDate !== '' && this.queryDate !== null) { - this.start_date = this.queryDate + '-01-01'; - this.end_date = this.queryDate + '-12-31'; + if (that.queryDate !== '' && that.queryDate !== null) { + that.start_date = that.queryDate + '-01-01'; + that.end_date = that.queryDate + '-12-31'; } else { - this.start_date = this.currentYear + '-01-01'; - this.end_date = this.currentYear + '-12-31'; + that.start_date = that.currentYear + '-01-01'; + that.end_date = that.currentYear + '-12-31'; } that.xAxisData = that.monthList; } - this.getDataHL(); - this.getDataHLXH(); + that.getDataHL(); + that.getDataHLXH(); }, handleExport(val) { this.exportLoading = true; diff --git a/src/views/statistics/material_statistics.vue b/src/views/statistics/material_statistics.vue index eb8ad266..89e1d1be 100644 --- a/src/views/statistics/material_statistics.vue +++ b/src/views/statistics/material_statistics.vue @@ -258,18 +258,12 @@ export default { let days = new Date(year, month, 0).getDate(); that.currentYear = year; that.currentMonth = month; + that.firstWeekNum = that.getWeekOfYear(year,month,1); + that.endWeekNum = that.getWeekOfYear(year,month,days); + month = month < 10 ? "0" + month : month; that.start_date = year + "-" + month + "-01"; - that.end_date = - year + "-" + month + "-" + new Date(year, month, 0).getDate(); - let month1 = month; - if (month1 < 10) { - month1 = "0" + month1; - } - that.queryDate = year + "-" + month1; - that.firstWeekNum = that.getWeekOfYear(new Date(that.start_date)); - that.endWeekNum = that.getWeekOfYear(new Date(that.end_date)); - // console.log('that.firstWeekNum',that.firstWeekNum) - // console.log('that.endWeekNum',that.endWeekNum) + that.end_date =year + "-" + month + "-" + days; + that.queryDate = year + "-" + month; let duration = that.endWeekNum - that.firstWeekNum + 1; for (let i = 1; i <= duration; i++) { that.xAxisOrigin.push("第" + i + "周"); @@ -280,8 +274,8 @@ export default { that.rightHeight = height - 115; that.tableHeight = height - 140 - chartheight; that.setChart("bachart1", that.basicOption); - this.getInmOption(); - this.getTable(); + that.getInmOption(); + that.getTable(); }, methods: { setChart(name, option = null) { @@ -300,24 +294,14 @@ export default { } catch (error) {} }, 500); }, - getWeekOfYear(date) { - var target = new Date( - date.getFullYear(), - date.getMonth(), - date.getDate() - ); //目标日期 - var firstDayOfYear = new Date(target.getFullYear(), 0, 1); // 当前年份第一天 - if (target.getTime() == firstDayOfYear.getTime()) { - return 1; - } else { - return Math.ceil( - (target - - firstDayOfYear + - 8 * (firstDayOfYear.getTimezoneOffset() / 480)) / - 604800000 - ); - } - }, + getWeekOfYear(a,b,c) { + var date1 = new Date(a, parseInt(b) - 1, c), //当前日期   + date2 = new Date(a, 0, 1), //当年第一天   + // d是当前日期是今年第多少天   + d = Math.round((date1.valueOf() - date2.valueOf()) / 86400000); + // d + 当前年的第一天的周差距的和在除以7就是本年第几周   + return Math.ceil((d + (date2.getDay() + 1 - 1)) / 7); + }, queryTypeChange(value) { console.log(value); this.queryDate = ""; @@ -402,18 +386,14 @@ export default { let that = this; if (that.queryType == "月") { if (that.queryDate !== "" && that.queryDate !== null) { - that.start_date = that.queryDate + "-01"; let arr = that.queryDate.split("-"); - that.end_date = - that.queryDate + - "-" + - new Date(arr[0], arr[1], 0).getDate(); - that.firstWeekNum = that.getWeekOfYear( - new Date(that.start_date) - ); - that.endWeekNum = that.getWeekOfYear( - new Date(that.end_date) - ); + let year = arr[0]; + let month = arr[1]; + let days = new Date(year, month, 0).getDate(); + that.start_date = that.queryDate + "-01"; + that.end_date =that.queryDate +"-" +days; + that.firstWeekNum = that.getWeekOfYear(year,month,1); + that.endWeekNum = that.getWeekOfYear(year,month,days); let duration = that.endWeekNum - that.firstWeekNum + 1; let xAxisData = []; for (let i = 1; i <= duration; i++) { @@ -421,20 +401,9 @@ export default { } that.xAxisData = xAxisData; } else { - that.start_date = - that.currentYear + "-" + that.currentMonth + "-01"; - that.end_date = - that.currentYear + - "-" + - that.currentMonth + - "-" + - new Date( - that.currentYear, - that.currentMonth, - 0 - ).getDate(); - let date = new Date(that.start_date); - that.firstWeekNum = that.getWeekOfYear(date); + that.start_date =that.currentYear + "-" + that.currentMonth + "-01"; + that.end_date =that.currentYear +"-" +that.currentMonth +"-" +new Date(that.currentYear,that.currentMonth,0).getDate(); + that.firstWeekNum = that.getWeekOfYear(that.currentYear,that.currentMonth,1); that.xAxisData = that.xAxisOrigin; } } else { diff --git a/src/views/statistics/pass_num.vue b/src/views/statistics/pass_num.vue index 978a1795..0b3f5517 100644 --- a/src/views/statistics/pass_num.vue +++ b/src/views/statistics/pass_num.vue @@ -346,16 +346,12 @@ export default { let days = new Date(year, month, 0).getDate(); that.currentYear = year; that.currentMonth = month; + that.firstWeekNum = that.getWeekOfYear(year,month,1); + that.endWeekNum = that.getWeekOfYear(year,month,days); + month = month < 10 ? "0" + month : month; that.start_date = year + "-" + month + "-01"; - that.end_date = - year + "-" + month + "-" + new Date(year, month, 0).getDate(); - let month1 = month; - if (month1 < 10) { - month1 = "0" + month1; - } - that.queryDate = year + "-" + month1; - that.firstWeekNum = that.getWeekOfYear(new Date(that.start_date)); - that.endWeekNum = that.getWeekOfYear(new Date(that.end_date)); + that.end_date =year + "-" + month + "-" + days; + that.queryDate = year + "-" + month; let duration = that.endWeekNum - that.firstWeekNum + 1; for (let i = 1; i <= duration; i++) { that.xAxisOrigin.push("第" + i + "周"); @@ -388,25 +384,14 @@ export default { console.log(value); this.queryDate = ""; }, - getWeekOfYear(date) { - var target = new Date( - date.getFullYear(), - date.getMonth(), - date.getDate() - ); // 创建目标日期对象 - var firstDayOfYear = new Date(target.getFullYear(), 0, 1); // 创建当前年份第一天的日期对象 - if (target.getTime() == firstDayOfYear.getTime()) { - return 1; - } else { - return Math.ceil( - (target - - firstDayOfYear + - 8 * (firstDayOfYear.getTimezoneOffset() / 480)) / - 604800000 - ); - } - // 计算两者之间相隔的周数并返回结果 - }, + getWeekOfYear(a,b,c) { + var date1 = new Date(a, parseInt(b) - 1, c), //当前日期   + date2 = new Date(a, 0, 1), //当年第一天   + // d是当前日期是今年第多少天   + d = Math.round((date1.valueOf() - date2.valueOf()) / 86400000); + // d + 当前年的第一天的周差距的和在除以7就是本年第几周   + return Math.ceil((d + (date2.getDay() + 1 - 1)) / 7); + }, getData6() { let that = this; let option = deepCopy(that.basicOption); @@ -612,57 +597,42 @@ export default { }, handleQuery() { let that = this; - if (this.queryType == "月") { - if (this.queryDate !== "" && this.queryDate !== null) { - this.start_date = this.queryDate + "-01"; - let arr = this.queryDate.split("-"); - this.end_date = - this.queryDate + - "-" + - new Date(arr[0], arr[1], 0).getDate(); - this.firstWeekNum = this.getWeekOfYear( - new Date(this.start_date) - ); - this.endWeekNum = this.getWeekOfYear( - new Date(this.end_date) - ); - let duration = this.endWeekNum - this.firstWeekNum + 1; + if (that.queryType == "月") { + if (that.queryDate !== "" && that.queryDate !== null) { + let arr = that.queryDate.split("-"); + let year = arr[0]; + let month = arr[1]; + let days = new Date(year, month, 0).getDate(); + that.start_date = that.queryDate + "-01"; + that.end_date =that.queryDate +"-" +days; + that.firstWeekNum = that.getWeekOfYear(year,month,1); + that.endWeekNum = that.getWeekOfYear(year,month,days); + let duration = that.endWeekNum - that.firstWeekNum + 1; let xAxisData = []; for (let i = 1; i <= duration; i++) { xAxisData.push("第" + i + "周"); } that.xAxisData = xAxisData; } else { - this.start_date = - this.currentYear + "-" + this.currentMonth + "-01"; - this.end_date = - this.currentYear + - "-" + - this.currentMonth + - "-" + - new Date( - this.currentYear, - this.currentMonth, - 0 - ).getDate(); - let date = new Date(this.start_date); - this.firstWeekNum = this.getWeekOfYear(date); - this.xAxisData = this.xAxisOrigin; + that.start_date =that.currentYear + "-" + that.currentMonth + "-01"; + that.end_date =that.currentYear +"-" +that.currentMonth +"-" +new Date(that.currentYear,that.currentMonth,0).getDate(); + that.firstWeekNum = that.getWeekOfYear(that.currentYear,that.currentMonth,1);; + that.xAxisData = that.xAxisOrigin; } } else { - if (this.queryDate !== "" && this.queryDate !== null) { - this.start_date = this.queryDate + "-01-01"; - this.end_date = this.queryDate + "-12-31"; + if (that.queryDate !== "" && that.queryDate !== null) { + that.start_date = that.queryDate + "-01-01"; + that.end_date = that.queryDate + "-12-31"; } else { - this.start_date = this.currentYear + "-01-01"; - this.end_date = this.currentYear + "-12-31"; + that.start_date = that.currentYear + "-01-01"; + that.end_date = that.currentYear + "-12-31"; } that.xAxisData = that.monthList; } - this.getData6(); - this.getData7(); - this.getData10(); - this.getDataDAVG(); + that.getData6(); + that.getData7(); + that.getData10(); + that.getDataDAVG(); }, handleExport(val) { this.exportLoading = true; diff --git a/src/views/statistics/ppass_num.vue b/src/views/statistics/ppass_num.vue index 080c179b..da1d57ab 100644 --- a/src/views/statistics/ppass_num.vue +++ b/src/views/statistics/ppass_num.vue @@ -75,12 +75,14 @@ @@ -125,44 +127,7 @@ export default { yAxis: { type: "value", }, - series: [ - // { - // name: "光纤预制棒", - // data: [0, 0, 0, 0, 0, 0, 0, 0], - // type: "bar", - // label: { - // show: true, - // position: "top", - // formatter: "{c}", - // color: "rgb(64,158,255)", - // }, - // barWidth: "15px", - // }, - // { - // name: "光纤预制管", - // data: [0, 0, 0, 0, 0, 0, 0, 0], - // type: "bar", - // label: { - // show: true, - // position: "top", - // formatter: "{c}", - // color: "rgb(64,158,255)", - // }, - // barWidth: "15px", - // }, - // { - // name: "G05", - // data: [0, 0, 0, 0, 0, 0, 0, 0], - // type: "bar", - // label: { - // show: true, - // position: "top", - // formatter: "{c}", - // color: "rgb(64,158,255)", - // }, - // barWidth: "15px", - // }, - ], + series: [], }, processData: [], xAxisData: [], @@ -176,12 +141,11 @@ export default { let month = date.getMonth() + 1; let days = new Date(year, month, 0).getDate(); that.currentYear = year; - that.currentMonth = month > 9 ? month : "0" + month; + that.currentMonth = month; + month = month > 9 ? month : "0" + month; that.start_date = year + "-" + month + "-01"; - that.end_date = - year + "-" + month + "-" + new Date(year, month, 0).getDate(); - let month1 = month > 9 ? month : "0" + month; - that.queryDate = year + "-" + month1; + that.end_date =year + "-" + month + "-" + days; + that.queryDate = year + "-" + month; that.tableHeight = document.getElementById("elMain").clientHeight - 40; that.getData6(); }, @@ -214,7 +178,7 @@ export default { ",EXTRACT ( MONTH FROM mlog.handle_date )"; obj.query.order_bys_date = ", 月"; } - let xAxisData = [],nameData=[],seriesData=[],data2 = [],data1 = [],data0 = []; + let xAxisData = [],nameData=[],seriesData=[]; that.$API.bi.dataset.exec.req("lineWeek", obj).then((res) => { let data = res.data2.ds0; that.tableData = data; @@ -246,20 +210,10 @@ export default { let index = xAxisData.indexOf(item.工段); let indexY = nameData.indexOf(item.物料名); seriesData[indexY].data[index] += item.合格数; - // if (item.物料名.indexOf("G05") > -1) { - // data2[index] = item.合格数; - // }else if (item.物料名.indexOf("棒") > -1) { - // data0[index] = item.合格数; - // } else { - // data1[index] = item.合格数; - // } }); that.xAxisData = xAxisData; that.option.xAxis.data = that.xAxisData; that.option.series = seriesData; - // that.option.series[0].data = data0; - // that.option.series[1].data = data1; - // that.option.series[2].data = data2; }); }, handleQuery() { @@ -267,10 +221,7 @@ export default { if (this.queryType == "月") { this.start_date = this.queryDate + "-01"; let arr = this.queryDate.split("-"); - this.end_date = - this.queryDate + - "-" + - new Date(arr[0], arr[1], 0).getDate(); + this.end_date =this.queryDate +"-" +new Date(arr[0], arr[1], 0).getDate(); } else { this.start_date = this.queryDate + "-01-01"; this.end_date = this.queryDate + "-12-31"; From 43a6e2d58bd48f477ce59a22c421bf40ced014e3 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 15 Apr 2025 10:56:44 +0800 Subject: [PATCH 11/67] =?UTF-8?q?feat:=20=E6=88=90=E5=93=81=E5=BA=93?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=92=A4=E9=94=80=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/inm/good_mio.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/views/inm/good_mio.vue b/src/views/inm/good_mio.vue index 7f80db01..3765830c 100644 --- a/src/views/inm/good_mio.vue +++ b/src/views/inm/good_mio.vue @@ -115,6 +115,15 @@ > 提交 + + 撤销 + Date: Tue, 15 Apr 2025 11:17:18 +0800 Subject: [PATCH 12/67] =?UTF-8?q?feat:=20=E5=85=B6=E4=BB=96=E5=87=BA?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E7=9A=84=E6=92=A4=E9=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/inm/mio.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/views/inm/mio.vue b/src/views/inm/mio.vue index 1bbd9266..9f91e8c4 100644 --- a/src/views/inm/mio.vue +++ b/src/views/inm/mio.vue @@ -118,6 +118,17 @@ > 提交 + + 撤销 + Date: Tue, 15 Apr 2025 11:27:43 +0800 Subject: [PATCH 13/67] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=E5=87=BA?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E6=92=A4=E9=94=80=E7=9A=84method?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/inm/good_mio.vue | 18 ++++++++++++++++++ src/views/inm/mio.vue | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/src/views/inm/good_mio.vue b/src/views/inm/good_mio.vue index 3765830c..61c79520 100644 --- a/src/views/inm/good_mio.vue +++ b/src/views/inm/good_mio.vue @@ -243,6 +243,24 @@ export default { }) .catch(() => {}); }, + revert(row) { + this.$confirm(`确定撤销该操作吗?`, "提示", { + type: "warning", + }) + .then(() => { + this.$API.inm.mio.revert + .req(row.id) + .then((res) => { + this.$message.success("撤销成功"); + this.$refs.table.refresh(); + return res; + }) + .catch((err) => { + return err; + }); + }) + .catch(() => {}); + }, table_submit(row) { this.$API.inm.mio.submit.req(row.id).then((res) => { this.$message.success("提交成功"); diff --git a/src/views/inm/mio.vue b/src/views/inm/mio.vue index 9f91e8c4..b48c16e4 100644 --- a/src/views/inm/mio.vue +++ b/src/views/inm/mio.vue @@ -264,6 +264,24 @@ export default { this.$refs.table.refresh(); }); }, + revert(row) { + this.$confirm(`确定撤销该操作吗?`, "提示", { + type: "warning", + }) + .then(() => { + this.$API.inm.mio.revert + .req(row.id) + .then((res) => { + this.$message.success("撤销成功"); + this.$refs.table.refresh(); + return res; + }) + .catch((err) => { + return err; + }); + }) + .catch(() => {}); + }, handleQuery() { this.$refs.table.queryData(this.query); }, From 9c73b60a7b5035f1e96091faafc14ac647f85687 Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 24 Apr 2025 08:37:18 +0800 Subject: [PATCH 14/67] =?UTF-8?q?fix:=E5=85=89=E5=AD=90=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bigScreen/index_photon.vue | 7 +- src/views/home/widgets/index_photon.vue | 339 ++++++++++-------------- 2 files changed, 147 insertions(+), 199 deletions(-) diff --git a/src/views/bigScreen/index_photon.vue b/src/views/bigScreen/index_photon.vue index 6828d4c1..63d5b2e1 100644 --- a/src/views/bigScreen/index_photon.vue +++ b/src/views/bigScreen/index_photon.vue @@ -5,7 +5,7 @@ 光子科技生产管理系统 - +
-
-
-
-
昨日核心指标
-
-
-
-
预制棒合格数
-

{{ dayPassNum7 }}

-

- 同比前天 - - {{ tongbi7 }}% - - - -

-
-
-
预制管合格数
-

{{ dayPassNum10 }}

-

- 同比前天 - - {{ tongbi10 }}% - - - -

-
-
-
AVG合格数
-

{{ dayAVGcountOk }}

-

- 同比前天 - - {{ AVGOktongbi }}% - - - -

-
-
-
预制棒管交付数
-

{{ dayPayNum6 }}

-

- 同比前天 - - {{ tongbi06 }}% - - - -

-
-
-
AVG交付数
-

{{ dayAVGcountDelivered }}

-

- 同比前天 - - {{ AVGDelivertongbi }}% - - - -

+ + +
+
+
+
昨日核心指标
+
+
+
+
预制棒合格数
+

{{ dayPassNum7 }}

+

+ 同比前天 + + {{ tongbi7 }}% + + + +

+
+
+
预制管合格数
+

{{ dayPassNum10 }}

+

+ 同比前天 + + {{ tongbi10 }}% + + + +

+
+
+
预制棒管交付数
+

{{ dayPayNum6 }}

+

+ 同比前天 + + {{ tongbi06 }}% + + + +

+
+
-
-
-
-
-
-
本月生产数据
-
-
-
-
本月累积交付数
-
-
-
预制棒管
+ + +
+
+
+
本月生产数据
+
+
+
+
预制棒管

{{ monthPayNum6 }}

+
本月累积交付数
-
-
AVG
-

{{ monthPayNumAVG }}

+
+ +
+
预制棒合格率
+

+ {{ monthPassRate7 }}% +

+
+
+
+ +
+
预制管合格率
+

+ {{ monthPassRate10 }}% +

+
-
-
-
- -
-
预制棒合格率
-

- {{ monthPassRate7 }}% -

-
-
-
- -
-
预制管合格率
-

- {{ monthPassRate10 }}% -

- -
-
-
- -
-
AVG合格率
-

- {{ monthRateAVG }}% -

-
-
-
+ +
@@ -215,20 +173,20 @@ width="50" > 名称
型号
规格
+
安全库存
{{ item.specification }}
+
+ {{ item.count_safe }} +
@@ -429,6 +391,7 @@ export default { chartData: [], tableData: [], equipList: [], + productList:[], halfProductList: [], warningMaterial: [], calendarValue: "", @@ -449,10 +412,10 @@ export default { monthPassRate7: 0, monthPassRate10: 0, - dayAVGcountOk: 0, - AVGOktongbi: 0, - dayAVGcountDelivered: 0, - AVGDelivertongbi: 0, + // dayAVGcountOk: 0, + // AVGOktongbi: 0, + // dayAVGcountDelivered: 0, + // AVGDelivertongbi: 0, monthRateAVG: 0, monthPayNumAVG: 0, hgNumber: 0, @@ -536,12 +499,12 @@ export default { yesterdayBefore.getDate(); that.getdayData(); that.getMonthData(); - this.getAVGDayData(); this.calendarValue = new Date(); this.getEquipList(); - this.getMaterialList(); + // this.getMaterialList(); this.getProductStatistic(); this.getMaterialWarning(); + this.getProductList(); this.getHalfProductList(); }, methods: { @@ -570,43 +533,56 @@ export default { //半成品数量统计 getHalfProductList() { let that = this; - let obj = { - query: { - material_types: "20", - }, - }; + let obj = {query: {material_types: "20"}}; that.$API.bi.dataset.exec.req("materialCount", obj).then((res) => { if (res.data2.ds0) { - this.halfProductList = res.data2.ds0; + console.log("getHalfProductList", res); + that.halfProductList = res.data2.ds0; + that.tableData = res.data2.ds0; + } + }); + }, + //成品数量统计 + getProductList() { + let that = this; + let obj = {query: {material_types: "10"}}; + that.$API.bi.dataset.exec.req("materialCount", obj).then((res) => { + if (res.data2.ds0) { + console.log("getHalfProductList", res); + that.productList = res.data2.ds0; + that.tableData = res.data2.ds0; } }); }, materialTypeChange() { - this.getMaterialList(); + let that = this; + if(that.materialType==10){ + this.getProductList(); + }else{ + this.getHalfProductList(); + } }, //获取库存 getMaterialList() { let that = this; - that.$API.mtm.material.list - .req({ page: 0, type: that.materialType }) - .then((res) => { - that.tableData = res.filter((item) => { - return item.count > 0; - }); + that.$API.mtm.material.list.req({ page: 0, type: that.materialType }).then((res) => { + that.tableData = []; + that.tableData = res.filter((item) => { + return item.count > 0; }); + console.log("getMaterialList", res); + }); }, //库存警告 getMaterialWarning() { let that = this; - that.$API.mtm.material.list - .req({ page: 0, type__in: "10,20", count__lte: 1 }) - .then((res) => { - if (res.length > 0) { - console.log("getMaterialWarning", res); - that.warningMaterial = res; - } else { - } - }); + that.$API.mtm.material.list.req({ page: 0, tag:'low_inm'}).then((res) => { + if (res.length > 0) { + console.log("getMaterialWarning", res); + that.warningMaterial = res; + } else { + } + }); }, showTime() { this.time = this.$TOOL.dateFormat(new Date(), "hh:mm:ss"); @@ -882,14 +858,12 @@ export default { let that = this; let date = that.yesterday; let date0 = that.yesterdayBefore; - this.$API.wpm.otherlog.list - .req({ + this.$API.wpm.otherlog.list.req({ product: "AVG", page: 0, handle_date__gte: date, handle_date__lte: date, - }) - .then((res) => { + }).then((res) => { let list = res; let count_ok = 0, count_delivered = 0; @@ -899,16 +873,14 @@ export default { count_delivered = count_delivered + item.count_delivered; }); - that.dayAVGcountOk = count_ok; + // that.dayAVGcountOk = count_ok; that.dayAVGcountDelivered = count_delivered; - this.$API.wpm.otherlog.list - .req({ + this.$API.wpm.otherlog.list.req({ product: "AVG", page: 0, handle_date__gte: date0, handle_date__lte: date0, - }) - .then((res0) => { + }).then((res0) => { let list0 = res0; let count_ok0 = 0, count_delivered0 = 0; @@ -933,33 +905,6 @@ export default { } }); }, - getAVGMonthData() { - let that = this; - let start_date = that.year_s + "-" + that.month_s + "-01"; - let end_date = that.year_s + "-" + that.month_s + "-" + that.day_s; - let obj = { - query: { start_date: start_date, end_date: end_date }, - }; - that.$API.bi.dataset.exec.req("AVGMonth", obj).then((res) => { - let list = res.data2.ds0; - let sum = 0, - count_real = 0, - count_ok = 0; - list.forEach((item) => { - sum = sum + item.交付数; - count_ok = count_ok + item.count_ok; - count_real = count_real + item.count_real; - }); - this.monthPayNumAVG = sum; - if (count_real != 0) { - this.monthRateAVG = Math.round( - (count_ok / count_real) * 100 - ); - } else { - this.monthRateAVG = 0; - } - }); - }, getProductStatistic() { let that = this; let start_date = that.year_s + "-" + that.month_s + "-01"; @@ -1081,7 +1026,7 @@ export default { } .countItem { - width: 20%; + width: 33.33%; padding-left: 24px; display: inline-block; box-sizing: border-box; From 220b5a6818a0a917eeffcdbbf94e9388239c24b9 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 25 Apr 2025 10:42:04 +0800 Subject: [PATCH 15/67] =?UTF-8?q?fix=EF=BC=9A=E5=85=89=E5=AD=90=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=88=86=E8=A7=A3=E4=B8=8B=E8=BE=BE=E6=8B=86=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/pm/utask_dept10.vue | 79 ++++++++++++++++++++++--------- src/views/pm/utask_dept6.vue | 33 ++++++++++--- src/views/pm/utask_dept7.vue | 89 +++++++++++++++++++++++------------ 3 files changed, 144 insertions(+), 57 deletions(-) diff --git a/src/views/pm/utask_dept10.vue b/src/views/pm/utask_dept10.vue index edfbff95..b7241f08 100644 --- a/src/views/pm/utask_dept10.vue +++ b/src/views/pm/utask_dept10.vue @@ -11,12 +11,21 @@ v-auth="'utask.create'" >新增任务 + 任务分解 任务分解并下达任务下达
@@ -167,6 +176,7 @@ @confirm.stop="table_del(scope.row)" v-if=" scope.row.state == 10 || + scope.row.state == 14 || scope.row.state == 20 " v-auth="'utask.delete'" @@ -235,6 +245,9 @@ export default { data() { return { utaskId: "", + canBreak:true, + canDepuse:true, + isBreakLoading: false, visibleDrawer: false, isLoading: false, selectedIds: [], @@ -254,6 +267,7 @@ export default { paramsUtask: {}, paramsObj: {}, utaskList: [], + selection:[], state_: { 10: "创建中", 14: "已分解", @@ -378,37 +392,60 @@ export default { gantt.refreshData(); }); }, + utaskBreak() { + let that = this; + if (that.selectedIds.length > 0) { + let ids = that.selectedIds; + that.isBreakLoading = true; + that.$API.pm.utask.scheduemtasks.req({ ids: ids }).then((res) => { + that.$message.success("任务分解成功"); + that.isBreakLoading = false; + that.$refs.table.refresh(); + }).catch(() => { + that.isBreakLoading = false; + }); + } else { + this.$message.error("未选择任何任务"); + } + }, utaskDepuse() { let that = this; if (that.selectedIds.length > 0) { let ids = that.selectedIds; that.isLoading = true; - that.$API.pm.utask.scheduemtasks - .req({ ids: ids }) - .then((res) => { - that.$API.pm.utask.assgin - .req({ ids: ids }) - .then((res) => { - that.$message.success("下达任务成功"); - that.isLoading = false; - that.$refs.table.refresh(); - }) - .catch(() => { - that.isLoading = false; - }); - }) - .catch(() => { - that.isLoading = false; - }); + that.$API.pm.utask.assgin.req({ ids: ids }).then((res) => { + that.$message.success("下达任务成功"); + that.isLoading = false; + that.$refs.table.refresh(); + }).catch(() => { + that.isLoading = false; + }); } else { this.$message.error("未选择任何任务"); } }, handleSelectionChange(selection) { this.selectedIds = []; - selection.forEach((item) => { - this.selectedIds.push(item.id); - }); + this.selection= selection; + if(selection.length>0){ + selection.forEach((item) => { + this.selectedIds.push(item.id); + if(item.state == 10){//创建中 + this.canBreak = true; + this.canDepuse = false; + }else if(item.state == 14){//已分解 + this.canDepuse = true; + this.canBreak = false; + }else{ + this.canBreak = false; + this.canDepuse = false; + } + }); + }else{ + this.canBreak = true; + this.canDepuse = true; + } + }, utaskCreate() { this.dialog.save = true; diff --git a/src/views/pm/utask_dept6.vue b/src/views/pm/utask_dept6.vue index 0d4a79eb..8d3bc050 100644 --- a/src/views/pm/utask_dept6.vue +++ b/src/views/pm/utask_dept6.vue @@ -14,8 +14,9 @@ 任务分解 任务下达
@@ -251,6 +253,8 @@ export default { data() { return { utaskId: "", + canBreak:true, + canDepuse:true, visibleDrawer: false, isLoading: false, selectedIds: [], @@ -400,16 +404,16 @@ export default { let that = this; if (that.selectedIds.length > 0) { let ids = that.selectedIds; - that.isLoading = true; + that.isBreakLoading = true; that.$API.pm.utask.scheduemtasks .req({ ids: ids }) .then((res) => { that.$message.success("分解任务成功"); - that.isLoading = false; + that.isBreakLoading = false; that.$refs.table.refresh(); }) .catch(() => { - that.isLoading = false; + that.isBreakLoading = false; }); } else { this.$message.error("未选择任何任务"); @@ -436,9 +440,24 @@ export default { }, handleSelectionChange(selection) { this.selectedIds = []; - selection.forEach((item) => { - this.selectedIds.push(item.id); - }); + if(selection.length>0){ + selection.forEach((item) => { + this.selectedIds.push(item.id); + if(item.state == 10){//创建中 + this.canBreak = true; + this.canDepuse = false; + }else if(item.state == 14){//已分解 + this.canDepuse = true; + this.canBreak = false; + }else{ + this.canBreak = false; + this.canDepuse = false; + } + }); + }else{ + this.canBreak = true; + this.canDepuse = true; + } }, utaskCreate() { this.dialog.save = true; diff --git a/src/views/pm/utask_dept7.vue b/src/views/pm/utask_dept7.vue index fa617c4e..fd8c4269 100644 --- a/src/views/pm/utask_dept7.vue +++ b/src/views/pm/utask_dept7.vue @@ -11,12 +11,21 @@ v-auth="'utask.create'" >新增任务 + 任务分解 任务分解并下达任务下达
@@ -165,16 +174,11 @@ 0) { let ids = that.selectedIds; + that.isBreakLoading = true; + that.$API.pm.utask.scheduemtasks.req({ ids: ids }).then((res) => { + that.isBreakLoading = false; + that.$refs.table.refresh(); + that.$message.success("任务分解成功"); + }).catch(() => { + that.isBreakLoading = false; + }); + } else { + this.$message.error("未选择任何任务"); + } + }, + utaskDepuse() { + let that = this; + if (that.selectedIds.length > 0) { that.isLoading = true; - that.$API.pm.utask.scheduemtasks - .req({ ids: ids }) - .then((res) => { - that.$API.pm.utask.assgin - .req({ ids: ids }) - .then((res) => { - that.$message.success("下达任务成功"); - that.isLoading = false; - that.$refs.table.refresh(); - }) - .catch(() => { - that.isLoading = false; - }); - }) - .catch(() => { - that.isLoading = false; - }); + let ids = that.selectedIds; + that.$API.pm.utask.assgin.req({ ids: ids }).then((res) => { + that.$message.success("任务下达成功"); + that.isLoading = false; + that.$refs.table.refresh(); + }).catch(() => { + that.isLoading = false; + }); } else { this.$message.error("未选择任何任务"); } }, handleSelectionChange(selection) { this.selectedIds = []; - selection.forEach((item) => { - this.selectedIds.push(item.id); - }); + this.selection= selection; + if(selection.length>0){ + selection.forEach((item) => { + this.selectedIds.push(item.id); + if(item.state == 10){//创建中 + this.canBreak = true; + this.canDepuse = false; + }else if(item.state == 14){//已分解 + this.canDepuse = true; + this.canBreak = false; + }else{ + this.canBreak = false; + this.canDepuse = false; + } + }); + }else{ + this.canBreak = true; + this.canDepuse = true; + } + }, utaskCreate() { this.dialog.save = true; From 9c53adf283c5220b7a8b3b9a3401e0b47fc5f5f7 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 25 Apr 2025 10:42:54 +0800 Subject: [PATCH 16/67] =?UTF-8?q?fix=EF=BC=9A=E5=85=89=E5=AD=90=E7=BB=BC?= =?UTF-8?q?=E5=90=88=E7=BB=9F=E8=AE=A1=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/total_statistics.vue | 114 +++++++++++++++++----- 1 file changed, 87 insertions(+), 27 deletions(-) diff --git a/src/views/statistics/total_statistics.vue b/src/views/statistics/total_statistics.vue index 55c5dab3..d42623e3 100644 --- a/src/views/statistics/total_statistics.vue +++ b/src/views/statistics/total_statistics.vue @@ -67,10 +67,10 @@ - - + + @@ -122,10 +122,10 @@ - - + + @@ -167,10 +167,8 @@ export default { this.day = day; this.query.date = this.currentDate = `${year}-${month}-${day}`; this.getSourceData(); - this.bangHeight = - document.getElementById("bangTable").offsetHeight - 20; - this.guanHeight = - document.getElementById("guanTable").offsetHeight - 20; + this.bangHeight = document.getElementById("bangTable").offsetHeight - 20; + this.guanHeight = document.getElementById("guanTable").offsetHeight - 20; }, created() {}, methods: { @@ -180,6 +178,7 @@ export default { query: { start_date: that.query.date, end_date: that.query.date, + fw_type: "process", }, }; that.$API.bi.dataset.exec.req("count_ok_day", params).then((res) => { @@ -191,17 +190,25 @@ export default { if (item.型号.indexOf("+") > -1) { b_model = item.型号.split("+")[0]; } else { - b_model = guan_model = item.型号; + b_model = item.型号; } let index = models.indexOf(b_model); if(index>-1){ - if(item.检验类型=='prod'){ - that.tableData11[index].中检合格数 += item.合格数; - }else if(item.检验类型=='process'){ - that.tableData11[index].检验合格数 += item.合格数; - } + that.tableData11[index].中检合格数 += item.合格数量; } }); + that.saleDatas.forEach((item1) => { + let b_model = ""; + if (item1.型号.indexOf("+") > -1) { + b_model = item1.型号.split("+")[0]; + } else { + b_model = item1.型号; + } + let index = models.indexOf(b_model); + if(index>-1){ + that.tableData11[index].检验合格数 += item1.数量; + } + }) }else if(type=="g"){ datas.forEach((item) => { let g_model = "",g_spec = ""; @@ -218,13 +225,27 @@ export default { let msitem = g_model+g_spec; let index = models.indexOf(msitem); if(index>-1){ - if(item.检验类型=='prod'){ - that.tableData22[index].中检合格数 += item.合格数; - }else if(item.检验类型=='process'){ - that.tableData22[index].检验合格数 += item.合格数; - } + that.tableData22[index].中检合格数 += item.合格数量; } }); + that.saleDatas.forEach((item1) => { + let g_model = "",g_spec = ""; + if (item1.型号.indexOf("+") > -1) { + g_model = item1.型号.split("+")[1]; + } else { + g_model = item1.型号; + } + if (item1.规格.indexOf("+") > -1) { + g_spec = item1.规格.split("+")[1]; + } else { + g_spec = item1.规格; + } + let msitem = g_model+g_spec; + let index = models.indexOf(msitem); + if(index>-1){ + that.tableData22[index].检验合格数 += item1.数量; + } + }) } } }); @@ -243,12 +264,11 @@ export default { let data_g = [...datas.ds1, ...datas.ds3]; that.data_b = data_b; that.data_g = data_g; - that.getDataB(data_b); - that.getDataG(data_g); + that.getSaleOutData(data_b, data_g); }); }, //棒数据 - getDataB(data) { + getDataB(data,saleData) { let that = this; let models = [],dataArr = []; //按版型(型号)分组 @@ -308,8 +328,8 @@ export default { key = "开槽"; } if (item1.车间==null||item1.车间==undefined) { - console.log( '仓库库存',item1); - console.log( item1.工序 !== "配管"&&item1.类型==10); + // console.log( '仓库库存',item1); + // console.log( item1.工序 !== "配管"&&item1.类型==10); if (item1.工序 == "配管") { key = "配管"; }else if(item1.工序 !== "配管"&&item1.类型==10){ @@ -333,11 +353,23 @@ export default { obj.成品库; that.tableData11[index] = obj; }); + // saleData.forEach((item) => { + // let index = 0; + // if (item.型号.indexOf("+") > -1) { + // let model = item.型号.split("+")[0]; + // index = models.indexOf(model); + // } else { + // index = models.indexOf(item.型号); + // } + // if (index > -1) { + // that.tableData11[index].检验合格数=item.数量; + // } + // }) that.models_b = models; that.getCountOk('b',models); }, //管数据 - getDataG(data) { + getDataG(data,saleData) { let that = this; let models = [], modelArr = []; @@ -428,8 +460,8 @@ export default { key = "倒角"; } if (item5.车间==null||item5.车间==undefined) { - console.log( '仓库库存',item5); - console.log( item5.工序 !== "配管"&&item5.类型==10); + // console.log( '仓库库存',item5); + // console.log( item5.工序 !== "配管"&&item5.类型==10); if (item5.工序 == "配管") { key = "配棒"; }else if(item5.工序 !== "配管"&&item5.类型==10){ @@ -454,9 +486,37 @@ export default { modelsspec.push(modelsspecitem); }); }); + saleData.forEach((item) => { + let index = 0; + if (item.型号.indexOf("+") > -1) { + let model = item.型号.split("+")[1]; + index = models.indexOf(model); + } else { + index = models.indexOf(item.型号); + } + if (index > -1) { + that.tableData22[index].检验合格数=item.数量; + } + }) that.models_g = models; that.getCountOk('g',models); }, + getSaleOutData(data_b, data_g){ + let that = this; + let obj = { + query: { + start_date: that.query.date, + end_date: that.query.date, + mio_type: "sale_out", + material_id: "", + }, + }; + that.$API.bi.dataset.exec.req("saleOutDay", obj).then((res) => { + let saleData = that.saleDatas = res.data2.ds0; + that.getDataB(data_b,saleData); + that.getDataG(data_g,saleData); + }) + }, handleQuery() { let that = this; if (that.query.date !== null && that.query.date !== "") { From 4c5f393a2db9c97af2815bb576275c05521dd5d0 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 25 Apr 2025 10:49:01 +0800 Subject: [PATCH 17/67] =?UTF-8?q?fix:=E7=BB=9F=E8=AE=A1=E5=88=86=E6=9E=90?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=BB=9F=E8=AE=A1=E6=B7=B7=E6=96=99=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E5=88=A0=E9=99=A4=E4=B8=8B=E9=9D=A2=E7=9A=84=E6=B7=B7?= =?UTF-8?q?=E6=96=99=E6=B6=88=E8=80=97=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/hunliao.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/views/statistics/hunliao.vue b/src/views/statistics/hunliao.vue index 2c9f0cc5..05d71a50 100644 --- a/src/views/statistics/hunliao.vue +++ b/src/views/statistics/hunliao.vue @@ -47,7 +47,7 @@ - + @@ -156,7 +156,6 @@ export default { } that.xAxisData = that.xAxisOrigin; that.getDataHL(); - that.getDataHLXH(); }, methods: { setChart(name, option = null) { @@ -316,7 +315,6 @@ export default { that.xAxisData = that.monthList; } that.getDataHL(); - that.getDataHLXH(); }, handleExport(val) { this.exportLoading = true; From 831c33cb981600e582c6e8c0bf41689d9baf2d83 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 25 Apr 2025 16:02:57 +0800 Subject: [PATCH 18/67] =?UTF-8?q?fix:=E6=B7=BB=E5=8A=A0=E6=97=B6=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E4=B8=80=E8=A1=8C=E5=8F=AF=E9=80=89=E6=8B=A9=E5=9C=A8?= =?UTF-8?q?=E7=AC=AC=E4=B8=80=E8=A1=8C=E6=88=96=E8=80=85=E6=9C=80=E5=90=8E?= =?UTF-8?q?=E4=B8=80=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/scFormTable/index.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/scFormTable/index.vue b/src/components/scFormTable/index.vue index 16fa394b..39e072df 100644 --- a/src/components/scFormTable/index.vue +++ b/src/components/scFormTable/index.vue @@ -49,7 +49,8 @@ dragSort: { type: Boolean, default: false }, hideAdd: { type: Boolean, default: false }, hideDelete: { type: Boolean, default: false }, - hideIndex: { type: Boolean, default: false } + hideIndex: { type: Boolean, default: false }, + pushType: { type: String, default: 'push' } }, data(){ return { @@ -99,7 +100,12 @@ }, rowAdd(){ const temp = JSON.parse(JSON.stringify(this.addTemplate)) - this.data.push(temp) + if(this.pushType=='push'){ + this.data.push(temp) + }else if(this.pushType=='unshift'){ + this.data.unshift(temp) + } + }, rowDel(row, index){ this.data.splice(index, 1) From 1d3f3a124ca4450896273a8eeb67f2ac63c08a66 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 25 Apr 2025 16:04:51 +0800 Subject: [PATCH 19/67] =?UTF-8?q?fix:=E5=85=89=E5=AD=90=E5=B7=A5=E5=BA=8F?= =?UTF-8?q?=E4=B8=AD=E7=9A=84route=E6=B7=BB=E5=8A=A0ordering:-update=5Ftim?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mtm/mgroup_form.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/mtm/mgroup_form.vue b/src/views/mtm/mgroup_form.vue index 845e5e45..dc583e59 100644 --- a/src/views/mtm/mgroup_form.vue +++ b/src/views/mtm/mgroup_form.vue @@ -63,7 +63,7 @@ --> - + @@ -360,7 +360,7 @@ export default { that.getData6(); that.getData7(); that.getData10(); - that.getDataDAVG(); + // that.getDataDAVG(); }, methods: { setChart(name, option = null) { @@ -406,7 +406,6 @@ export default { }, }; that.$API.bi.dataset.exec.req(exec, obj).then((res) => { - // console.log('6生产车间统计:',res); let tableData6 = res.data2.ds0 ? res.data2.ds0 : []; that.tableData6 = tableData6; if (tableData6.length > 0) { @@ -424,13 +423,23 @@ export default { tableData6.forEach((item) => { let indexX = nameList.indexOf(item.物料名); let indexY = item.周 - that.firstWeekNum; - seriesData[indexX][indexY] = item.合格数; + if(seriesData[indexX][indexY]){ + seriesData[indexX][indexY] += item.合格数; + }else{ + seriesData[indexX][indexY] =0; + seriesData[indexX][indexY] += item.合格数; + } }); } else { tableData6.forEach((item) => { let indexX = nameList.indexOf(item.物料名); let indexY = item.month - 1; - seriesData[indexX][indexY] = item.合格数; + if(seriesData[indexX][indexY]){ + seriesData[indexX][indexY] += item.合格数; + }else{ + seriesData[indexX][indexY] =0; + seriesData[indexX][indexY] += item.合格数; + } }); } for (let n = 0; n < seriesData.length; n++) { @@ -488,7 +497,12 @@ export default { indexX = nameList.indexOf(item.物料名); indexY = item.月 - 1; } - seriesData[indexX][indexY] = item.合格数; + if(seriesData[indexX][indexY]){ + seriesData[indexX][indexY] += item.合格数; + }else{ + seriesData[indexX][indexY] =0; + seriesData[indexX][indexY] += item.合格数; + } }); for (let n = 0; n < seriesData.length; n++) { let obj = {}; @@ -543,7 +557,12 @@ export default { indexX = nameList.indexOf(item.物料名); indexY = item.月 - 1; } - seriesData[indexX][indexY] = item.合格数; + if(seriesData[indexX][indexY]){ + seriesData[indexX][indexY] += item.合格数; + }else{ + seriesData[indexX][indexY] =0; + seriesData[indexX][indexY] += item.合格数; + } }); for (let n = 0; n < seriesData.length; n++) { let obj = {}; @@ -560,41 +579,40 @@ export default { } }); }, - getDataDAVG() { - let that = this; - let option = deepCopy(that.basicOption); - option.xAxis.data = that.xAxisData; - option.title.text = "AVG"; - let obj = { - query: { start_date: that.start_date, end_date: that.end_date }, - }; - let exec = that.queryType == "月" ? "AVGWeek" : "AVGMonth"; - that.$API.bi.dataset.exec.req(exec, obj).then((res) => { - // console.log('AVG统计:',res); - let tableDataAVG = res.data2.ds0 ? res.data2.ds0 : []; - let seriesData = []; - if (tableDataAVG.length > 0) { - tableDataAVG.forEach((item) => { - let index = 0; - if (that.queryType == "月") { - index = item.month - 1; - } else { - index = item.周 - that.firstWeekNum; - } - seriesData[index] = item.合格数; - }); - let obj = {}; - obj.name = "AVG"; - obj.type = "bar"; - obj.barWidth = "15px"; - obj.data = seriesData; - option.series.push(obj); - that.setChart("bachart4", option); - } else { - that.setChart("bachart4", option); - } - }); - }, + // getDataDAVG() { + // let that = this; + // let option = deepCopy(that.basicOption); + // option.xAxis.data = that.xAxisData; + // option.title.text = "AVG"; + // let obj = { + // query: { start_date: that.start_date, end_date: that.end_date }, + // }; + // let exec = that.queryType == "月" ? "AVGWeek" : "AVGMonth"; + // that.$API.bi.dataset.exec.req(exec, obj).then((res) => { + // let tableDataAVG = res.data2.ds0 ? res.data2.ds0 : []; + // let seriesData = []; + // if (tableDataAVG.length > 0) { + // tableDataAVG.forEach((item) => { + // let index = 0; + // if (that.queryType == "月") { + // index = item.month - 1; + // } else { + // index = item.周 - that.firstWeekNum; + // } + // seriesData[index] = item.合格数; + // }); + // let obj = {}; + // obj.name = "AVG"; + // obj.type = "bar"; + // obj.barWidth = "15px"; + // obj.data = seriesData; + // option.series.push(obj); + // that.setChart("bachart4", option); + // } else { + // that.setChart("bachart4", option); + // } + // }); + // }, handleQuery() { let that = this; if (that.queryType == "月") { @@ -632,7 +650,7 @@ export default { that.getData6(); that.getData7(); that.getData10(); - that.getDataDAVG(); + // that.getDataDAVG(); }, handleExport(val) { this.exportLoading = true; From 0c6b54df2f37743c29b4f345ccfed1aa45881405 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 25 Apr 2025 16:14:01 +0800 Subject: [PATCH 21/67] =?UTF-8?q?fix=EF=BC=9A=E5=85=89=E5=AD=90=E6=A3=80?= =?UTF-8?q?=E9=AA=8C=E7=AE=A1=E7=90=86->=E6=88=90=E5=93=81=E6=A3=80?= =?UTF-8?q?=E9=AA=8C=E9=9A=90=E8=97=8F=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/route.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/config/route.js b/src/config/route.js index e984b6db..5d3dd2c1 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -1867,6 +1867,7 @@ const routes = [ title: "成品检验", // icon: "el-icon-cellphone", perms: ["producttest"], + hidden: true, }, component: "qm/product", }, From aea42e54c8019974d12e035ff79d19fd511e480f Mon Sep 17 00:00:00 2001 From: shijing Date: Sun, 27 Apr 2025 08:57:55 +0800 Subject: [PATCH 22/67] =?UTF-8?q?fix:7=E8=BD=A6=E9=97=B4=E4=B8=8D=E5=90=88?= =?UTF-8?q?=E6=A0=BC=E9=A1=B9=E6=B7=BB=E5=8A=A0=E6=9D=82=E8=B4=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm/worktask_form.vue | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/views/wpm/worktask_form.vue b/src/views/wpm/worktask_form.vue index f490ec03..f1e3a99f 100644 --- a/src/views/wpm/worktask_form.vue +++ b/src/views/wpm/worktask_form.vue @@ -606,6 +606,21 @@ + + + + + + Date: Mon, 28 Apr 2025 09:46:06 +0800 Subject: [PATCH 23/67] =?UTF-8?q?fix:=E6=8E=A7=E5=88=B6=E5=8F=B0=E6=9C=AC?= =?UTF-8?q?=E6=9C=88=E4=BA=A4=E4=BB=98=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/widgets/index_photon.vue | 73 +------------------------ 1 file changed, 2 insertions(+), 71 deletions(-) diff --git a/src/views/home/widgets/index_photon.vue b/src/views/home/widgets/index_photon.vue index c03ba317..b6b74ca5 100644 --- a/src/views/home/widgets/index_photon.vue +++ b/src/views/home/widgets/index_photon.vue @@ -135,9 +135,6 @@ " >
- -
{ - let sum6 = 0,sum6AVG = 0; + let sum6 = 0; if (res6.data2.ds0&&res6.data2.ds0.length>0) { let list6 = res6.data2.ds0; if (list6.length > 0) { list6.forEach((item) => { - if(item.物料.indexOf('AVG')>-1){ - sum6AVG = sum6AVG + item.数量; - }else{ - sum6 = sum6 + item.数量; - } - + sum6 = sum6 + item.数量; }); } } this.monthPayNum6 = sum6; - this.monthPayNumAVG = sum6AVG; }); }, - //获取昨日AVG的生产记录 - getAVGDayData() { - let that = this; - let date = that.yesterday; - let date0 = that.yesterdayBefore; - this.$API.wpm.otherlog.list.req({ - product: "AVG", - page: 0, - handle_date__gte: date, - handle_date__lte: date, - }).then((res) => { - let list = res; - let count_ok = 0, - count_delivered = 0; - if (list.length > 0) { - list.forEach((item) => { - count_ok = count_ok + item.count_ok; - count_delivered = - count_delivered + item.count_delivered; - }); - // that.dayAVGcountOk = count_ok; - that.dayAVGcountDelivered = count_delivered; - this.$API.wpm.otherlog.list.req({ - product: "AVG", - page: 0, - handle_date__gte: date0, - handle_date__lte: date0, - }).then((res0) => { - let list0 = res0; - let count_ok0 = 0, - count_delivered0 = 0; - if (list0.length > 0) { - list0.forEach((item0) => { - count_ok0 = count_ok0 + item0.count_ok; - count_delivered0 = - count_delivered0 + - item0.count_delivered; - }); - that.AVGOktongbi = Math.round( - ((count_ok - count_ok0) / count_ok0) * - 100 - ); - that.AVGDelivertongbi = Math.round( - ((count_delivered - count_delivered0) / - count_delivered0) * - 100 - ); - } - }); - } - }); - }, getProductStatistic() { let that = this; let start_date = that.year_s + "-" + that.month_s + "-01"; From 8aa9dfe98b4bb1fef493322e63b207d5fb211e3c Mon Sep 17 00:00:00 2001 From: shijing Date: Mon, 28 Apr 2025 14:27:35 +0800 Subject: [PATCH 24/67] =?UTF-8?q?fix:=E4=BF=AE=E6=95=B4=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/material_statistics.vue | 139 ++++++++++--------- 1 file changed, 75 insertions(+), 64 deletions(-) diff --git a/src/views/statistics/material_statistics.vue b/src/views/statistics/material_statistics.vue index 89e1d1be..1a2ba481 100644 --- a/src/views/statistics/material_statistics.vue +++ b/src/views/statistics/material_statistics.vue @@ -41,28 +41,25 @@

采购统计

- - - - + + + + + + +
-
+
{ that.inmOption = res; - // that.materialIn = res[1].id; - // let arr = []; - // res.forEach(item=>{ - // if(item.type==30){ - // arr.push(item) - // } - // }); - // that.getInmData(); }); }, //采购物料 getInmData() { let that = this; - let option = deepCopy(that.basicOption); - option.xAxis.data = that.xAxisData; + that.tableData1 = []; let exec = that.queryType == "月" ? "saleOutWeek" : "saleOutMonth"; let obj = { query: { @@ -342,26 +328,16 @@ export default { }, }; that.$API.bi.dataset.exec.req(exec, obj).then((res) => { - console.log("getInmData", res); - option.series.data = []; - if (res.data2.ds0) { - let data = res.data2.ds0; - that.tableData1 = data; - if (data.length > 0) { - let seriesData = []; - data.forEach((item) => { - if (that.queryType == "月") { - let index = item.周 - that.firstWeekNum; - seriesData[index] = item.数量; - } else { - let index = item.月 - 1; - seriesData[index] = item.数量; - } - }); - option.series.data = seriesData; - } + if (res.data2.ds0&&res.data2.ds0.length>0) { + that.tableData1 = res.data2.ds0; + that.setChartData(res.data2.ds0); + }else{ + console.log('无数据') + let option = deepCopy(that.basicOption); + option.xAxis.data = that.xAxisData; + console.log(option); + that.setChart("bachart1",option); } - that.setChart("bachart1", option); }); }, getTable() { @@ -378,7 +354,9 @@ export default { that.tableData2 = []; if (res.data2.ds0) { let data = res.data2.ds0; + that.tableData1 = data; that.tableData2 = data; + that.setChartData(data); } }); }, @@ -421,6 +399,39 @@ export default { that.getInmData(); } }, + setChartData(data){ + let that = this; + let option = deepCopy(that.basicOption); + option.xAxis.data = that.xAxisData; + option.series=[]; + let materials = [],seriesData = []; + data.forEach((item) => { + if(materials.indexOf(item.物料名) == -1){ + materials.push(item.物料名); + } + }) + materials.forEach((item) => { + let obj = {}; + obj.name = item; + obj.type = "bar"; + obj.stack = "Ad"; + obj.barWidth = "15px"; + obj.data = [0,0,0,0,0,0,0,0,0,0,0,0]; + seriesData.push(obj); + }) + data.forEach((item) => { + let index = 0;let indexY = 0; + if (that.queryType == "月") { + index = item.周 - that.firstWeekNum; + } else { + index = item.月 - 1; + } + indexY = materials.indexOf(item.物料名); + seriesData[indexY].data[index] = item.数量; + }); + option.series = seriesData; + that.setChart("bachart1", option); + }, handleExport(val) { this.exportLoading = true; let id = "#exportDiv" + val; From 6b834142d63543b17a1de887fdabb2a1c7f4a353 Mon Sep 17 00:00:00 2001 From: shijing Date: Mon, 28 Apr 2025 16:16:53 +0800 Subject: [PATCH 25/67] =?UTF-8?q?fix:=E9=87=87=E8=B4=AD=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E3=80=81=E9=94=80=E5=94=AE=E7=BB=9F=E8=AE=A1=EF=BC=88=E5=B7=B2?= =?UTF-8?q?=E5=AE=8C=E6=88=90=EF=BC=89=E6=A3=92=E7=BB=9F=E8=AE=A1=E3=80=81?= =?UTF-8?q?=E7=AE=A1=E7=BB=9F=E8=AE=A1=EF=BC=88=E5=BE=85=E5=AE=8C=E5=96=84?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/inm_statistics.vue | 201 +++--- src/views/statistics/material_statistics.vue | 7 +- src/views/statistics/statistics_bang.vue | 655 ++----------------- src/views/statistics/statistics_guan.vue | 291 +------- 4 files changed, 192 insertions(+), 962 deletions(-) diff --git a/src/views/statistics/inm_statistics.vue b/src/views/statistics/inm_statistics.vue index 45c573b7..8e8d44ae 100644 --- a/src/views/statistics/inm_statistics.vue +++ b/src/views/statistics/inm_statistics.vue @@ -41,7 +41,21 @@

产品交付统计

- + + + + + + +
@@ -188,6 +202,7 @@ export default { end_date: "", currentYear: "", currentMonth: "", + materialName: "", xAxisOrigin: [], xAxisData: [], typeOptions: ["月", "年"], @@ -227,20 +242,10 @@ export default { tableData2: [], firstWeekNum: 1, endWeekNum: 4, - monthList: [ - "一月", - "二月", - "三月", - "四月", - "五月", - "六月", - "七月", - "八月", - "九月", - "十月", - "十一月", - "十二月", - ], + monthList: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"], + materialItem:{}, + paramsMaterial:{type__in : "10"}, + apiObjMaterial:this.$API.mtm.material.list, }; }, mounted() { @@ -251,16 +256,12 @@ export default { let days = new Date(year, month, 0).getDate(); that.currentYear = year; that.currentMonth = month; + that.firstWeekNum = that.getWeekOfYear(year,month,1); + that.endWeekNum = that.getWeekOfYear(year,month,days); + month = month < 10 ? "0" + month : month; that.start_date = year + "-" + month + "-01"; - that.end_date = - year + "-" + month + "-" + new Date(year, month, 0).getDate(); - let month1 = month; - if (month1 < 10) { - month1 = "0" + month1; - } - that.queryDate = year + "-" + month1; - that.firstWeekNum = that.getWeekOfYear(new Date(that.start_date)); - that.endWeekNum = that.getWeekOfYear(new Date(that.end_date)); + that.end_date =year + "-" + month + "-" + days; + that.queryDate = year + "-" + month; let duration = that.endWeekNum - that.firstWeekNum + 1; for (let i = 1; i <= duration; i++) { that.xAxisOrigin.push("第" + i + "周"); @@ -272,17 +273,16 @@ export default { that.rightHeight = height - 115; that.getTable(); that.setChart("bachart1", that.basicOption); - this.getSaleOption(); + // this.getSaleOption(); }, methods: { setChart(name, option = null) { // 根据name 渲染数据, option需填写,否则option为模拟数据 - var myChart = echarts.getInstanceByDom( - document.getElementById(name) - ); - if (myChart == undefined) { - myChart = echarts.init(document.getElementById(name), "T"); + var myChart = echarts.getInstanceByDom(document.getElementById(name)); + if (myChart != null) { + myChart.dispose(); // 销毁之前的实例 } + myChart = echarts.init(document.getElementById(name), "T"); if (option == null) { option = Object.assign({}, this.basicOption); } @@ -296,24 +296,13 @@ export default { console.log(value); this.queryDate = ""; }, - getWeekOfYear(date) { - var target = new Date( - date.getFullYear(), - date.getMonth(), - date.getDate() - ); // 创建目标日期对象 - var firstDayOfYear = new Date(target.getFullYear(), 0, 1); // 创建当前年份第一天的日期对象 - if (target.getTime() == firstDayOfYear.getTime()) { - return 1; - } else { - return Math.ceil( - (target - - firstDayOfYear + - 8 * (firstDayOfYear.getTimezoneOffset() / 480)) / - 604800000 - ); - } - // 计算两者之间相隔的周数并返回结果 + getWeekOfYear(a,b,c) { + var date1 = new Date(a, parseInt(b) - 1, c), //当前日期   + date2 = new Date(a, 0, 1), //当年第一天   + // d是当前日期是今年第多少天   + d = Math.round((date1.valueOf() - date2.valueOf()) / 86400000); + // d + 当前年的第一天的周差距的和在除以7就是本年第几周   + return Math.ceil((d + (date2.getDay() + 1 - 1)) / 7); }, materialSaleChange() { this.getSaleData(); @@ -331,8 +320,6 @@ export default { //交付物料 getSaleData() { let that = this; - let option = deepCopy(that.basicOption); - option.xAxis.data = that.xAxisData; let exec = that.queryType == "月" ? "saleOutWeek" : "saleOutMonth"; let obj = { query: { @@ -343,26 +330,14 @@ export default { }, }; that.$API.bi.dataset.exec.req(exec, obj).then((res) => { - console.log("getSaleData", res); - option.series.data = []; - if (res.data2.ds0) { - let data = res.data2.ds0; - that.tableData1 = data; - if (data.length > 0) { - let seriesData = []; - data.forEach((item) => { - if (that.queryType == "月") { - let index = item.周 - that.firstWeekNum; - seriesData[index] = item.数量; - } else { - let index = item.月 - 1; - seriesData[index] = item.数量; - } - }); - option.series.data = seriesData; - } + if (res.data2.ds0&&res.data2.ds0.length>0) { + that.tableData1 = res.data2.ds0; + that.setChartData(res.data2.ds0); + }else{ + let option = deepCopy(that.basicOption); + option.xAxis.data = that.xAxisData; + that.setChart("bachart1",option); } - that.setChart("bachart1", option); }); }, getTable() { @@ -379,7 +354,9 @@ export default { that.tableData2 = []; if (res.data2.ds0) { let data = res.data2.ds0; + that.tableData1 = data; that.tableData2 = data; + that.setChartData(data); } }); }, @@ -387,48 +364,33 @@ export default { let that = this; if (this.queryType == "月") { if (this.queryDate !== "" && this.queryDate !== null) { - this.start_date = this.queryDate + "-01"; - let arr = this.queryDate.split("-"); - this.end_date = - this.queryDate + - "-" + - new Date(arr[0], arr[1], 0).getDate(); - this.firstWeekNum = this.getWeekOfYear( - new Date(this.start_date) - ); - this.endWeekNum = this.getWeekOfYear( - new Date(this.end_date) - ); - let duration = this.endWeekNum - this.firstWeekNum + 1; + let arr = that.queryDate.split("-"); + let year = arr[0]; + let month = arr[1]; + let days = new Date(year, month, 0).getDate(); + that.start_date = that.queryDate + "-01"; + that.end_date =that.queryDate +"-" +days; + that.firstWeekNum = that.getWeekOfYear(year,month,1); + that.endWeekNum = that.getWeekOfYear(year,month,days); + let duration = that.endWeekNum - that.firstWeekNum + 1; let xAxisData = []; for (let i = 1; i <= duration; i++) { xAxisData.push("第" + i + "周"); } that.xAxisData = xAxisData; } else { - this.start_date = - this.currentYear + "-" + this.currentMonth + "-01"; - this.end_date = - this.currentYear + - "-" + - this.currentMonth + - "-" + - new Date( - this.currentYear, - this.currentMonth, - 0 - ).getDate(); - let date = new Date(this.start_date); - this.firstWeekNum = this.getWeekOfYear(date); - this.xAxisData = this.xAxisOrigin; + that.start_date =that.currentYear + "-" + that.currentMonth + "-01"; + that.end_date =that.currentYear +"-" +that.currentMonth +"-" +new Date(that.currentYear,that.currentMonth,0).getDate(); + that.firstWeekNum = that.getWeekOfYear(that.currentYear,that.currentMonth,1); + that.xAxisData = that.xAxisOrigin; } } else { - if (this.queryDate !== "" && this.queryDate !== null) { - this.start_date = this.queryDate + "-01-01"; - this.end_date = this.queryDate + "-12-31"; + if (that.queryDate !== "" && that.queryDate !== null) { + that.start_date = that.queryDate + "-01-01"; + that.end_date = that.queryDate + "-12-31"; } else { - this.start_date = this.currentYear + "-01-01"; - this.end_date = this.currentYear + "-12-31"; + that.start_date = that.currentYear + "-01-01"; + that.end_date = that.currentYear + "-12-31"; } that.xAxisData = that.monthList; } @@ -437,6 +399,39 @@ export default { that.getSaleData(); } }, + setChartData(data){ + let that = this; + let option = deepCopy(that.basicOption); + option.xAxis.data = that.xAxisData; + option.series=[]; + let materials = [],seriesData = []; + data.forEach((item) => { + if(materials.indexOf(item.物料名) == -1){ + materials.push(item.物料名); + } + }) + materials.forEach((item) => { + let obj = {}; + obj.name = item; + obj.type = "bar"; + obj.stack = "Ad"; + obj.barWidth = "15px"; + obj.data = [0,0,0,0,0,0,0,0,0,0,0,0]; + seriesData.push(obj); + }) + data.forEach((item) => { + let index = 0;let indexY = 0; + if (that.queryType == "月") { + index = item.周 - that.firstWeekNum; + } else { + index = item.月 - 1; + } + indexY = materials.indexOf(item.物料名); + seriesData[indexY].data[index] = item.数量; + }); + option.series = seriesData; + that.setChart("bachart1", option); + }, handleExport(val) { this.exportLoading = true; let id = "#exportDiv" + val; diff --git a/src/views/statistics/material_statistics.vue b/src/views/statistics/material_statistics.vue index 1a2ba481..f5210432 100644 --- a/src/views/statistics/material_statistics.vue +++ b/src/views/statistics/material_statistics.vue @@ -43,6 +43,7 @@

采购统计

{{ scope.row.data.棒料成型_count_n_qp }} + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -472,59 +267,14 @@ {{ scope.row.data.六车间_粗中细磨_合格率 }} - - - - - - - - - - - - - - - - + - - - - - - - - - - - - @@ -532,54 +282,19 @@ {{ scope.row.data.六车间_粗中细磨_count_n_yp }} - + - + - + - - - - - - - - - - - - - - - - - - - - - @@ -608,36 +323,6 @@ {{ scope.row.data.六车间_粗中细磨_count_n_hs }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -920,66 +415,21 @@ {{ scope.row.data.六车间中检_count_n_bl }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -621,41 +427,21 @@ {{ scope.row.data.六车间中检_count_n_hs }} - - - - - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/statistics/all_cg.vue b/src/views/statistics/all_cg.vue new file mode 100644 index 00000000..a3dca638 --- /dev/null +++ b/src/views/statistics/all_cg.vue @@ -0,0 +1,100 @@ + + + + + diff --git a/src/views/statistics/all_jx.vue b/src/views/statistics/all_jx.vue new file mode 100644 index 00000000..f2477fea --- /dev/null +++ b/src/views/statistics/all_jx.vue @@ -0,0 +1,289 @@ + + + + + diff --git a/src/views/statistics/all_jy_cjg.vue b/src/views/statistics/all_jy_cjg.vue new file mode 100644 index 00000000..3f4a8049 --- /dev/null +++ b/src/views/statistics/all_jy_cjg.vue @@ -0,0 +1,213 @@ + + + + diff --git a/src/views/statistics/all_jy_sc.vue b/src/views/statistics/all_jy_sc.vue new file mode 100644 index 00000000..3f38ed26 --- /dev/null +++ b/src/views/statistics/all_jy_sc.vue @@ -0,0 +1,506 @@ + + + diff --git a/src/views/statistics/all_kc.vue b/src/views/statistics/all_kc.vue new file mode 100644 index 00000000..7db07116 --- /dev/null +++ b/src/views/statistics/all_kc.vue @@ -0,0 +1,425 @@ + + + diff --git a/src/views/statistics/all_sc_gx.vue b/src/views/statistics/all_sc_gx.vue new file mode 100644 index 00000000..c6ba1a04 --- /dev/null +++ b/src/views/statistics/all_sc_gx.vue @@ -0,0 +1,167 @@ + + + + diff --git a/src/views/statistics/all_sc_hg.vue b/src/views/statistics/all_sc_hg.vue new file mode 100644 index 00000000..1505df2e --- /dev/null +++ b/src/views/statistics/all_sc_hg.vue @@ -0,0 +1,478 @@ + + + + diff --git a/src/views/statistics/all_sc_hl.vue b/src/views/statistics/all_sc_hl.vue new file mode 100644 index 00000000..5e1dd5dd --- /dev/null +++ b/src/views/statistics/all_sc_hl.vue @@ -0,0 +1,185 @@ + + + + diff --git a/src/views/statistics/all_sc_rw.vue b/src/views/statistics/all_sc_rw.vue new file mode 100644 index 00000000..29856800 --- /dev/null +++ b/src/views/statistics/all_sc_rw.vue @@ -0,0 +1,299 @@ + + + + diff --git a/src/views/statistics/all_xs.vue b/src/views/statistics/all_xs.vue new file mode 100644 index 00000000..35c9807b --- /dev/null +++ b/src/views/statistics/all_xs.vue @@ -0,0 +1,83 @@ + + + + + From 7d4710c61a28bb1df8e634aa579ee158b887be2d Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 23 May 2025 15:29:12 +0800 Subject: [PATCH 43/67] =?UTF-8?q?fix:=E5=85=A5=E5=8F=B8=E6=A3=80=E9=AA=8C?= =?UTF-8?q?=E4=B8=8D=E6=98=BE=E7=A4=BA=E6=B2=A1=E6=9C=89=E6=A3=80=E9=AA=8C?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/qm/income.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/qm/income.vue b/src/views/qm/income.vue index 831610bb..07b5f171 100644 --- a/src/views/qm/income.vue +++ b/src/views/qm/income.vue @@ -91,7 +91,7 @@ export default { test_date: '', ordering: '-test_date' }, - params: { type: 20, mio__type: 'pur_in',ordering: '-test_date'}, + params: { type: 20, mio__type: 'pur_in',ordering: '-test_date',test_date__isnull:0}, selection: [], state_: { 10: '', From d9d8fdca34fc242198643c20f4c14a03a76998d7 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 23 May 2025 16:11:36 +0800 Subject: [PATCH 44/67] =?UTF-8?q?fix:=E6=A3=92=E7=AE=A1=E7=BB=BC=E5=90=88?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=97=B6=E9=97=B4=E5=88=97=E5=8A=A0=E5=AE=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/statistics_bang.vue | 20 ++++++++++---------- src/views/statistics/statistics_guan.vue | 14 +++++++------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/views/statistics/statistics_bang.vue b/src/views/statistics/statistics_bang.vue index aae95dfe..466064ba 100644 --- a/src/views/statistics/statistics_bang.vue +++ b/src/views/statistics/statistics_bang.vue @@ -47,7 +47,7 @@ id="exportDiv" stripe > - + @@ -126,7 +126,7 @@ - + @@ -193,7 +193,7 @@ - + @@ -221,7 +221,7 @@ - + @@ -249,7 +249,7 @@ {{ scope.row.data.六车间_粘铁头_count_notok }} - + @@ -302,7 +302,7 @@ {{ getCountQt(scope.row.data,'粗中细磨') }} - + @@ -350,7 +350,7 @@ {{ scope.row.data.六车间_抛光_count_notok }} - + @@ -378,7 +378,7 @@ {{ scope.row.data.六车间_开槽_合格率 }} - + @@ -441,7 +441,7 @@ {{ getCountQt(scope.row.data,'六车间中检') }} - + @@ -494,7 +494,7 @@ {{ scope.row.data.六车间生产入库_合格率 }} - + diff --git a/src/views/statistics/statistics_guan.vue b/src/views/statistics/statistics_guan.vue index c672a35e..5c524dde 100644 --- a/src/views/statistics/statistics_guan.vue +++ b/src/views/statistics/statistics_guan.vue @@ -47,7 +47,7 @@ id="exportDiv" stripe > - + @@ -189,7 +189,7 @@ - + @@ -327,7 +327,7 @@ --> - + @@ -379,7 +379,7 @@ {{getCountQt(scope.row.data,'开槽')}} - + @@ -421,7 +421,7 @@ {{getCountQt(scope.row.data,'倒角')}} - + @@ -500,7 +500,7 @@ {{getCountQt(scope.row.data,'六车间中检')}} - + @@ -542,7 +542,7 @@ {{getCountQt(scope.row.data,'六车间生产入库')}} - + From 60ee27cb44e37f31b925bf38fd78549cf38198fe Mon Sep 17 00:00:00 2001 From: shijing Date: Mon, 26 May 2025 09:44:01 +0800 Subject: [PATCH 45/67] =?UTF-8?q?fix:=E7=BB=9F=E8=AE=A1=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=90=88=E8=AE=A1=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/hunliao.vue | 73 +++++----- src/views/statistics/inm_statistics.vue | 30 +++++ src/views/statistics/material_statistics.vue | 32 +++++ src/views/statistics/pass_num.vue | 135 +++++++++---------- src/views/statistics/ppass_num.vue | 36 ++++- src/views/statistics/product_check.vue | 58 ++++++-- src/views/statistics/product_check2.vue | 30 ++++- src/views/statistics/stock_statistics.vue | 29 ++++ src/views/statistics/task_rate.vue | 34 +++++ src/views/statistics/user_statistics.vue | 47 +++++-- 10 files changed, 373 insertions(+), 131 deletions(-) diff --git a/src/views/statistics/hunliao.vue b/src/views/statistics/hunliao.vue index 05d71a50..9373fa68 100644 --- a/src/views/statistics/hunliao.vue +++ b/src/views/statistics/hunliao.vue @@ -15,18 +15,18 @@
- + - +
- + 导出 - + @@ -47,36 +47,7 @@
- -
+
+ + diff --git a/src/config/route.js b/src/config/route.js index e7e7ddfb..639c0866 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -3459,47 +3459,7 @@ const routes = [ perms: ["statistic_qm"], }, component: "statistics/product_check2.vue", - }, - // { - // "name": "inm_check", - // "path": "/statistic/inm_check", - // "meta": { - // "title": "库存检验统计", - // "icon": "el-icon-DataAnalysis", - // "perms": ["statistic_qm"] - // }, - // "component": "statistics/inm_check.vue" - // }, - // { - // name: "good_check", - // path: "/statistic/good_check", - // meta: { - // title: "成品检验统计", - // // icon: "el-icon-DataAnalysis", - // perms: ["statistic_qm"], - // }, - // component: "statistics/good_check.vue", - // }, - // { - // "name": "behavior_check", - // "path": "/statistic/behavior_check", - // "meta": { - // "title": "性能检验", - // "icon": "el-icon-cellphone", - // "perms": ["statistic_qm"] - // }, - // "component": "statistics/behavior_check.vue" - // }, - // { - // "name": "enter_check", - // "path": "/statistic/enter_check", - // "meta": { - // "title": "入厂检验", - // "icon": "el-icon-cellphone", - // "perms": ["statistic_qm"] - // }, - // "component": "statistics/enter_check.vue" - // }, + } ], }, //物料统计 @@ -3546,94 +3506,6 @@ const routes = [ }, component: "statistics/stock_statistics.vue", }, - //合格数统计——光芯 - { - name: "pass_num_gx", - path: "/statistic/pass_num_gx", - meta: { - title: "合格数统计", - icon: "el-icon-DataAnalysis", - perms: ["pass_num_gx"], - }, - component: "statistics/pass_num_gx.vue", - }, - //任务进度统计——光芯 - { - name: "task_rate_gx", - path: "/statistic/task_rate_gx", - meta: { - title: "任务进度", - icon: "el-icon-DataAnalysis", - perms: ["task_rate_gx"], - }, - component: "statistics/task_rate_gx.vue", - }, - //人员绩效统计——光芯 - { - path: "/work_statistics", - name: "work_statistics", - meta: { - title: "人员生产统计", - icon: "el-icon-trend-charts", - perms: ["work_statistics"], - }, - component: "statistics/work_statistics.vue", - }, - //库存统计——光芯 - { - path: "/statistic_inm", - name: "statistic_inm", - meta: { - title: "库存统计", - icon: "el-icon-trend-charts", - perms: ["statistic_inm_gx"], - }, - component: "statistics/statistics_inm.vue", - }, - //返工统计——光芯 - { - path: "/rework_gx", - name: "rework_gx", - meta: { - title: "返工统计", - icon: "el-icon-trend-charts", - perms: ["rework_gx"], - }, - component: "statistics/rework_gx.vue", - }, - //过程检验统计——光芯 - { - path: "/process_check_gx", - name: "process_check_gx", - meta: { - title: "过程检验统计", - icon: "el-icon-trend-charts", - perms: ["process_check_gx"], - }, - component: "statistics/process_check_gx.vue", - }, - //成品检验统计——光芯 - { - path: "/good_check_gx", - name: "good_check_gx", - meta: { - title: "成品检验统计", - icon: "el-icon-trend-charts", - perms: ["good_check_gx"], - }, - component: "statistics/good_check_gx.vue", - }, - //成品检验记录——光芯 - { - path: "/check_record_gx", - name: "check_record_gx", - meta: { - title: "成品检验记录", - icon: "el-icon-trend-charts", - perms: ["check_record_gx"], - }, - component: "statistics/check_record_gx.vue", - }, //综合查询 { name: "total_statistics", @@ -3667,6 +3539,17 @@ const routes = [ }, component: "statistics/statistics_guan.vue", }, + //批次统计 + { + name: "statistics_batch", + path: "/statistic/statistics_batch", + meta: { + title: "批次统计", + icon: "el-icon-DataAnalysis", + perms: ["statistics_batch"], + }, + component: "statistics/batch_statistics.vue", + }, //综合统计导出 { name: "total_export", diff --git a/src/scui.js b/src/scui.js index 99005705..0add1b85 100644 --- a/src/scui.js +++ b/src/scui.js @@ -23,6 +23,7 @@ import scWaterMark from './components/scWaterMark' import scQrCode from './components/scQrCode' import scIconSelect from './components/scIconSelect' import scEcharts from './components/scEcharts' +import scDegra from './components/scDegra' import scStatusIndicator from './components/scMini/scStatusIndicator' import scTrend from './components/scMini/scTrend' @@ -73,6 +74,8 @@ export default { app.component('scFire', scFire); app.component('scIconSelect', scIconSelect); app.component('scEcharts', scEcharts); + + app.component('scDegra', scDegra); //注册全局指令 app.directive('auth', auth) diff --git a/src/views/statistics/batch_statistics.vue b/src/views/statistics/batch_statistics.vue new file mode 100644 index 00000000..6680d21b --- /dev/null +++ b/src/views/statistics/batch_statistics.vue @@ -0,0 +1,417 @@ + + + + diff --git a/src/views/statistics/statistics_bang.vue b/src/views/statistics/statistics_bang.vue index 8eecf8de..63725ead 100644 --- a/src/views/statistics/statistics_bang.vue +++ b/src/views/statistics/statistics_bang.vue @@ -530,7 +530,8 @@ export default { return { params: { ordering:'-last_time', - batch__startswith__in:'ZJ2,G05,J2C,A55', + material_start__cate:'棒', + last_time_isnull:false, }, query:{ batch__contains:'', diff --git a/src/views/statistics/statistics_guan.vue b/src/views/statistics/statistics_guan.vue index 8ccc0bac..f81cc3af 100644 --- a/src/views/statistics/statistics_guan.vue +++ b/src/views/statistics/statistics_guan.vue @@ -570,7 +570,8 @@ export default { return { params: { ordering:'-last_time', - batch__startswith__in:'ZB2,B1', + material_start__cate:'管', + last_time_isnull:false, }, query:{ batch__contains:'', From 350577a4ece0bbd6ce100743f38bdb5f205b7243 Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 25 Jun 2025 10:40:09 +0800 Subject: [PATCH 50/67] =?UTF-8?q?fix:=E6=A3=92=E7=AE=A1=E7=BB=BC=E5=90=88?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E7=9B=B8=E5=85=B3=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/statistics_bang.vue | 47 ++++- src/views/statistics/statistics_guan.vue | 201 ++++++++++++++-------- src/views/statistics/stock_statistics.vue | 15 +- 3 files changed, 169 insertions(+), 94 deletions(-) diff --git a/src/views/statistics/statistics_bang.vue b/src/views/statistics/statistics_bang.vue index 63725ead..11215941 100644 --- a/src/views/statistics/statistics_bang.vue +++ b/src/views/statistics/statistics_bang.vue @@ -138,7 +138,7 @@ @@ -320,6 +320,11 @@ {{ scope.row.data.六车间_抛光_count_use }} + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + diff --git a/src/views/statistics/check_record_gx.vue b/src/views/statistics/check_record_gx.vue index b545dfcb..0f1fc58c 100644 --- a/src/views/statistics/check_record_gx.vue +++ b/src/views/statistics/check_record_gx.vue @@ -120,7 +120,7 @@ - + diff --git a/src/views/statistics/good_check_gx.vue b/src/views/statistics/good_check_gx.vue index 4b2ba9b9..7d53af0d 100644 --- a/src/views/statistics/good_check_gx.vue +++ b/src/views/statistics/good_check_gx.vue @@ -2,187 +2,642 @@
- - - - - - - + - + clearable + style="width: 160px; margin: 5px" + > + + + + + + 导出
- 导出
- - - - - - - - + diff --git a/src/views/statistics/good_check_gx2.vue b/src/views/statistics/good_check_gx2.vue new file mode 100644 index 00000000..540ab056 --- /dev/null +++ b/src/views/statistics/good_check_gx2.vue @@ -0,0 +1,551 @@ + + + + + diff --git a/src/views/statistics/pass_num_gx.vue b/src/views/statistics/pass_num_gx.vue index cf15610e..218b3ddb 100644 --- a/src/views/statistics/pass_num_gx.vue +++ b/src/views/statistics/pass_num_gx.vue @@ -2,16 +2,6 @@
- - - - - - - - + - - - - - - - - - - - - - + + + + + + + @@ -107,39 +85,39 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -163,43 +141,27 @@ > - - - - - - - - + - - - - - - - - - - - - - + + + + + + @@ -227,39 +189,23 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + @@ -287,39 +233,33 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -347,39 +287,24 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + @@ -407,39 +332,32 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -467,39 +385,32 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -527,39 +438,32 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -587,39 +491,37 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -647,39 +549,36 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + @@ -707,39 +606,39 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -767,39 +666,33 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -827,39 +720,32 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -887,39 +773,32 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -947,39 +826,203 @@ :height="300" > - - - - - - - - + + + + - + + + + + + + + + + + - - - - - - + + + + + + + + + + +
+
+
+ + + 导出 + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + +
+
+
+ + + 导出 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + +
+
+
+ + + 导出 + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1008,32 +1051,29 @@ export default { mgroup_name:'', start_date:'', end_date:'', - group_bys_material: "", - order_bys_material: "", - select_cols_material: "" }, queryDate:'', currentYear: "", currentMonth: "", - nameList: [], + mgroupList: ['外协白片抛', '扫边A', '黑化', '退火', '减薄A', '减薄B', '精雕', '外协出司检', '外协一次抛', '磨抛一次抛', '外扫', '扫边B', '倒角','成品抛', '一次超洗', '尺寸检验', '二次超洗', '外观检验', '三次超洗'], basicOption: { backgroundColor: "transparent", title: { text: "合格数统计", }, + tooltip: { + trigger: "item", + }, + legend: { + top: "3", + right: "3%", + }, grid: { top: "80px", }, tooltip: { trigger: "axis", }, - xAxis: { - type: "category", - data: ["周一","周二","周三","周四","周五","周六","周日"], - }, - yAxis: { - type: "value", - }, lenged: [], series: [], }, @@ -1053,14 +1093,14 @@ export default { tableData13: [], tableData14: [], tableData15: [], + tableData16: [], + tableData17: [], + tableData18: [], options:[], }; }, mounted() { - let that = this; - let nowDate = new Date(); - that.getMgroup(); - // that.getWeekDate(nowDate); + this.getMgroup(); }, methods: { getWeekDate(dates){ @@ -1084,7 +1124,6 @@ export default { dateArr.push(item); } that.weekDateList = dateArr; - // console.log('dateArr',dateArr); that.query.start_date =first.toISOString().split('T')[0]; that.query.end_date =last.toISOString().split('T')[0]; that.options.forEach((item,index)=>{ @@ -1113,7 +1152,11 @@ export default { that.$API.mtm.mgroup.list.req({ page: 0}).then((res) => { let arr = []; res.forEach(item=>{ - arr.push(item.name) + let indexes = that.mgroupList.indexOf(item.name); + if(indexes>-1){ + // that.getDefect(item.id,indexes); + arr[indexes] = item.name; + } }) that.query.mgroup_name = arr[0]; that.options = arr; @@ -1121,6 +1164,16 @@ export default { that.getWeekDate(nowDate); }); }, + // getDefect(id,index){ + // let that = this; + // that.$API.mtm.defect.list.req({ page: 0, mgroup_id: id}).then((res) => { + // let arr = []; + // res.forEach(item=>{ + // arr.push(item.name); + // }) + // that["tableData"+index] = arr; + // }); + // }, getData(mgroup_name,mgroup_index) { let that = this; let option = deepCopy(that.basicOption); @@ -1129,47 +1182,70 @@ export default { option.title.text = mgroup_name+"合格数统计"; let obj = {}; obj.query = query; - that.$API.bi.dataset.exec.req('lineDay_m', obj).then((res) => { + that.$API.bi.dataset.exec.req('lineDay_m3', obj).then((res) => { let tableData = res.data2.ds0 ? res.data2.ds0 : []; let names = 'tableData'+mgroup_index; - that[names] = tableData; + let defectList = []; + let defectObject = {}; + let countOk = 0; if (tableData.length > 0) { - let dataList = [],nameList = [],datas = []; + let chartObj = { + name:mgroup_name, + data: [{name: "合格数",value: 0}], + type: "pie", + radius: ["30%", "65%"], + center: ["40%", "55%"], + label: { + show: true, + position: "outside", + formatter: "{b} : {c} ({d}%)", + }, + }; + //将数据分类 tableData.forEach((ite) => { - if (nameList.indexOf(ite.物料名) > -1) {} else { - nameList.push(ite.物料名); - dataList.push([]) - datas.push([0,0,0,0,0,0,0]); - let obj = { - name:ite.物料名, - data: [], - stack: "Ad", - type: "bar", - barWidth: "15px", - }; - option.series.push(obj) + countOk += ite.合格数; + if(ite.缺陷统计!==null){ + ite.缺陷统计 = JSON.parse(ite.缺陷统计); + for(let key in ite.缺陷统计){ + ite[key] = ite.缺陷统计[key]; + if(defectList.indexOf(key)<0){ + defectList.push(key); + defectObject[key] = ite.缺陷统计[key]; + }else{ + defectObject[key] += ite.缺陷统计[key]; + } + } } }); - that.nameList = nameList; - tableData.forEach((item) => { - let indexX = nameList.indexOf(item.物料名); - dataList[indexX].push(item); - }); - for(let i = 0;i + + +
+ + + + + + + + + + 导出 +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + diff --git a/src/views/statistics/process_statistics_gx.vue b/src/views/statistics/process_statistics_gx.vue new file mode 100644 index 00000000..2b6ee94a --- /dev/null +++ b/src/views/statistics/process_statistics_gx.vue @@ -0,0 +1,886 @@ + + + + diff --git a/src/views/statistics/wpr_statistics.vue b/src/views/statistics/wpr_statistics.vue new file mode 100644 index 00000000..2eb6b32c --- /dev/null +++ b/src/views/statistics/wpr_statistics.vue @@ -0,0 +1,312 @@ + + + + From be0dc2fe73c79995305d45264f423e582ed23810 Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 15 Jul 2025 13:24:04 +0800 Subject: [PATCH 54/67] =?UTF-8?q?fix:=E7=99=BB=E5=BD=95=E9=A1=B5=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=89=88=E6=9C=AC=E5=8F=B7=EF=BC=8C=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E6=9F=A5=E8=AF=A2=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/login/index.vue | 14 ++++++++++++++ src/views/statistics/stock_statistics.vue | 14 +++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index e9fd89ce..d4d78cb3 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -62,6 +62,8 @@ 刷脸登录
--> +
WEB版本:{{ config_index.APP_VER }}
+
SERVER版本:{{ baseConfig.sys_version }}
@@ -94,6 +96,7 @@ From 0113d7a9efb46f0bd811c7cc255d6e93805519c0 Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 15 Jul 2025 15:16:41 +0800 Subject: [PATCH 56/67] =?UTF-8?q?fix:=E6=B7=BB=E5=8A=A0=E4=B8=AD=E6=A3=80?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/route.js | 39 ++++----------------------------------- 1 file changed, 4 insertions(+), 35 deletions(-) diff --git a/src/config/route.js b/src/config/route.js index 639c0866..496277e0 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -1821,16 +1821,6 @@ const routes = [ }, component: "qm/process", }, - { - name: "qmProcess_gx", - path: "/qm/qmProcess_gx", - meta: { - title: "过程自检", - // icon: "el-icon-cellphone", - perms: ["ptest_gx"], - }, - component: "qm/process_gx", - }, { name: "qmProcess2", path: "/qm/qmProcess2", @@ -1872,35 +1862,14 @@ const routes = [ component: "qm/product", }, { - name: "products_cc", - path: "/qm/products_cc", + name: "product_middle", + path: "/qm/product_middle", meta: { - title: "尺寸检验", - // icon: "el-icon-cellphone", - perms: ["productstest_cc"], - }, - component: "qm/products_cc", - }, - { - name: "products_wg", - path: "/qm/products_wg", - meta: { - title: "外观检验", - // icon: "el-icon-cellphone", - perms: ["productstest_wg"], - }, - component: "qm/products_wg", - }, - { - name: "productDetail", - path: "/qm/productDetail", - meta: { - title: "成品检验", + title: "中检记录", // icon: "el-icon-cellphone", perms: ["producttest"], - hidden: true, }, - component: "qm/productCheck", + component: "qm/product_middle", }, ], }, From eacbfea37527ca785b34faf0e549c3d3c40fb352 Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 15 Jul 2025 15:17:21 +0800 Subject: [PATCH 57/67] =?UTF-8?q?fix:=E6=A3=92=E7=AE=A1=E7=BB=BC=E5=90=88?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/statistics_bang.vue | 50 +++++++++++------------- src/views/statistics/statistics_guan.vue | 39 +++++++----------- 2 files changed, 38 insertions(+), 51 deletions(-) diff --git a/src/views/statistics/statistics_bang.vue b/src/views/statistics/statistics_bang.vue index 11215941..4bc578ad 100644 --- a/src/views/statistics/statistics_bang.vue +++ b/src/views/statistics/statistics_bang.vue @@ -43,7 +43,7 @@ ref="table" :apiObj="apiObj" :params="params" - :query="query" + :query="params" id="exportDiv" stripe > @@ -459,6 +459,11 @@ {{ scope.row.data.六车间生产入库_count }} + + + - - - + + + + + + + + + - + - - - + + - + - + - + - + - - + + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + @@ -327,7 +323,7 @@ @@ -362,96 +358,101 @@ - - + + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + + + + @@ -461,7 +462,7 @@ @@ -505,29 +506,29 @@ - + + + + - + - - - - + diff --git a/src/views/statistics/statistics_guan.vue b/src/views/statistics/statistics_guan.vue index 4487772c..367b09d4 100644 --- a/src/views/statistics/statistics_guan.vue +++ b/src/views/statistics/statistics_guan.vue @@ -67,7 +67,7 @@ @@ -134,7 +134,7 @@ @@ -281,7 +281,7 @@ @@ -375,85 +375,85 @@ - - + + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + @@ -469,7 +469,7 @@ @@ -541,7 +541,7 @@ @@ -577,7 +577,7 @@ From d721d1a9d9f6444af98f6a58557d644b69d99091 Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 20 Aug 2025 09:19:01 +0800 Subject: [PATCH 65/67] =?UTF-8?q?fix:=E8=A1=A8=E5=A4=B4=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/statistics_bang.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/statistics/statistics_bang.vue b/src/views/statistics/statistics_bang.vue index f89f86a6..f985c702 100644 --- a/src/views/statistics/statistics_bang.vue +++ b/src/views/statistics/statistics_bang.vue @@ -506,7 +506,7 @@ - + From a6ef32997a94feceea85436460e085a01240a13d Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 20 Aug 2025 15:56:00 +0800 Subject: [PATCH 66/67] =?UTF-8?q?fix:=E6=8E=A7=E5=88=B6=E5=8F=B0NAN?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bigScreen/index_photon.vue | 2 +- src/views/home/enp_home.vue | 4 +- src/views/home/widgets/index_photon.vue | 77 +++++++++++-------------- 3 files changed, 37 insertions(+), 46 deletions(-) diff --git a/src/views/bigScreen/index_photon.vue b/src/views/bigScreen/index_photon.vue index 5f658b8b..cc6a3e25 100644 --- a/src/views/bigScreen/index_photon.vue +++ b/src/views/bigScreen/index_photon.vue @@ -583,7 +583,7 @@ export default { list.forEach((item) => { for (let i = 0; i < this.weekDateList.length; i++) { if (item.日 == that.weekDateList[i]) { - saleOutdept6[i] = item.交付数; + saleOutdept6[i] = item.数量; } } }); diff --git a/src/views/home/enp_home.vue b/src/views/home/enp_home.vue index 730c9ab3..ba46efe4 100644 --- a/src/views/home/enp_home.vue +++ b/src/views/home/enp_home.vue @@ -286,13 +286,13 @@ export default { that.$API.bi.dataset.exec.req('saleOutDay', obj6).then((res6) => { let list6 = res6.data2.ds0; if (list6.length > 0) { - this.dayPayNum6 = list6[0].交付数; + this.dayPayNum6 = list6[0].数量; } //6车前日交付数 that.$API.bi.dataset.exec.req('saleOutDay', obj06).then((res06) => { let list06 = res06.data2.ds0; if (list06.length > 0) { - this.tongbi06 = Math.round((this.dayPayNum6 - list06[0].交付数) / list06[0].交付数 * 100); + this.tongbi06 = Math.round((this.dayPayNum6 - list06[0].数量) / list06[0].数量 * 100); } }); }); diff --git a/src/views/home/widgets/index_photon.vue b/src/views/home/widgets/index_photon.vue index d8ee4e5b..e247081f 100644 --- a/src/views/home/widgets/index_photon.vue +++ b/src/views/home/widgets/index_photon.vue @@ -669,12 +669,12 @@ export default { } } if (beforData7 !== 0) { - this.tongbi7 = Math.round( - ((this.dayPassNum7 - beforData7) / beforData7) * + that.tongbi7 = Math.round( + ((that.dayPassNum7 - beforData7) / beforData7) * 100 ); } else { - this.tongbi7 = this.dayPassNum7; + that.tongbi7 = that.dayPassNum7; } }); }); @@ -705,57 +705,48 @@ export default { } } if (beforData10 !== 0) { - this.tongbi10 = Math.round( - ((this.dayPassNum10 - beforData10) / - beforData10) * - 100 - ); + that.tongbi10 = Math.round(((that.dayPassNum10 - beforData10) /beforData10) *100); } else { - this.tongbi7 = this.dayPassNum7; + that.tongbi7 = that.dayPassNum7; } }); }); //6车昨日交付数 - this.dayPayNum6 = 0; + that.dayPayNum6 = 0; that.$API.bi.dataset.exec.req("saleOutDay", obj6).then((res6) => { if (res6.data2.ds0) { let list6 = res6.data2.ds0; if (list6.length > 0) { list6.forEach((item6) => { - this.dayPayNum6 += item6.交付数; + that.dayPayNum6 += item6.数量; }); } } let beforData6 = 0; //6车前日交付数 - that.$API.bi.dataset.exec - .req("saleOutDay", obj06) - .then((res06) => { - if (res06.data2.ds0) { - let list06 = res06.data2.ds0; - if (list06.length > 0) { - list06.forEach((item06) => { - beforData6 += item06.交付数; - }); - } + that.$API.bi.dataset.exec.req("saleOutDay", obj06).then((res06) => { + if (res06.data2.ds0) { + let list06 = res06.data2.ds0; + if (list06.length > 0) { + list06.forEach((item06) => { + beforData6 += item06.数量; + }); } - if (beforData6 !== 0) { - this.tongbi06 = Math.round( - ((this.dayPassNum6 - beforData6) / beforData6) * - 100 - ); - } else { - this.tongbi06 = this.dayPassNum6; - } - }); + } + if (beforData6 !== 0) { + that.tongbi06 = Math.round(((that.dayPayNum6 - beforData6) / beforData6) *100); + } else { + that.tongbi06 = that.dayPayNum6; + } + }); }); }, //本月合格数&本月交付统计---6、7、10车间 getMonthData() { let that = this; - this.monthPayNum6 = 0; - this.monthPassRate7 = 0; - this.monthPassRate10 = 0; + that.monthPayNum6 = 0; + that.monthPassRate7 = 0; + that.monthPassRate10 = 0; let start_date = that.year_s + "-" + that.month_s + "-01"; let end_date = that.year_s + "-" + that.month_s + "-" + that.day_s; let obj6 = { @@ -802,11 +793,11 @@ export default { rate = (sum_ok / sum_real) * 100; } } - this.monthPassRate7 = Math.round(rate); + that.monthPassRate7 = Math.round(rate); }); //10车间本月合格率 that.$API.bi.dataset.exec.req("lineMonth", obj10).then((res10) => { - this.monthPassRate10 = 0; + that.monthPassRate10 = 0; let sum_ok_10 = 0, sum_real_10 = 0, rate_10 = 0; @@ -820,7 +811,7 @@ export default { rate_10 = (sum_ok_10 / sum_real_10) * 100; } } - this.monthPassRate10 = Math.round(rate_10); + that.monthPassRate10 = Math.round(rate_10); }); //6车间本月交付数 that.$API.bi.dataset.exec.req("saleOutMonth", obj6).then((res6) => { @@ -833,7 +824,7 @@ export default { }); } } - this.monthPayNum6 = sum6; + that.monthPayNum6 = sum6; }); }, getProductStatistic() { @@ -844,7 +835,7 @@ export default { query: { start_date: start_date, end_date: end_date, - dept_name: this.deptName, + dept_name: that.deptName, group_bys_material: "", order_bys_material: "", select_cols_material: "", @@ -871,14 +862,14 @@ export default { } } } - this.hgNumber = ((hgNumber / xAxisData.length) *100).toFixed(2); - this.chartData = chartData; - this.option.xAxis.data = xAxisData; - this.option.series.data = chartData; + that.hgNumber = ((hgNumber / xAxisData.length) *100).toFixed(2); + that.chartData = chartData; + that.option.xAxis.data = xAxisData; + that.option.series.data = chartData; //柱状图 var dom = document.getElementById("barCharts"); var myChart = echarts.init(dom); - myChart.setOption(this.option, true); + myChart.setOption(that.option, true); }); }, deptNameChange() { From bf3863751c2ac82abe50502c254aaff2cc4c6a19 Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 20 Aug 2025 16:55:33 +0800 Subject: [PATCH 67/67] =?UTF-8?q?fix:=E6=A3=92=E7=AE=A1=E7=BB=BC=E5=90=88?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=90=88=E6=A0=BC=E7=8E=87=E4=B8=BA0?= =?UTF-8?q?=E6=97=B6=E4=B8=8D=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/statistics_bang.vue | 22 +++--- src/views/statistics/statistics_guan.vue | 89 ++---------------------- 2 files changed, 18 insertions(+), 93 deletions(-) diff --git a/src/views/statistics/statistics_bang.vue b/src/views/statistics/statistics_bang.vue index f985c702..ab664d33 100644 --- a/src/views/statistics/statistics_bang.vue +++ b/src/views/statistics/statistics_bang.vue @@ -67,7 +67,7 @@ @@ -139,7 +139,7 @@ @@ -213,7 +213,7 @@ @@ -237,7 +237,7 @@ @@ -265,7 +265,7 @@ @@ -323,7 +323,7 @@ @@ -371,7 +371,7 @@ @@ -394,7 +394,7 @@ @@ -462,7 +462,7 @@ @@ -523,12 +523,12 @@ diff --git a/src/views/statistics/statistics_guan.vue b/src/views/statistics/statistics_guan.vue index 367b09d4..919bf23e 100644 --- a/src/views/statistics/statistics_guan.vue +++ b/src/views/statistics/statistics_guan.vue @@ -67,7 +67,7 @@ @@ -134,7 +134,7 @@ @@ -188,81 +188,6 @@ -