From be1be82c78cbdd6d94f5d528da5857a49b22d023 Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 10 Jun 2025 11:28:14 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E5=85=89=E8=8A=AF=E8=B4=A8?= =?UTF-8?q?=E6=A3=80=E7=BB=9F=E8=AE=A1=E6=B7=BB=E5=8A=A0=E6=AF=94=E4=BE=8B?= =?UTF-8?q?=E6=B1=87=E6=80=BB=EF=BC=8C=E7=AD=9B=E9=80=89=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/good_check_gx.vue | 180 ++++++++++++++++--------- 1 file changed, 117 insertions(+), 63 deletions(-) diff --git a/src/views/statistics/good_check_gx.vue b/src/views/statistics/good_check_gx.vue index 4f841b9d..ffdf8e73 100644 --- a/src/views/statistics/good_check_gx.vue +++ b/src/views/statistics/good_check_gx.vue @@ -388,47 +388,80 @@ export default { let that = this; that.params.page = 1; that.params.page_size = val; - that.params.querys=[[{field:"data__has_key",compare:"",value:"尺寸检验_日期"}]]; + that.params.querys=[ + [{field:"data__has_key",compare:"",value:"尺寸检验_日期"}], + [{field:"data__has_key",compare:"",value:"外观检验_日期"}], + [{field:"data__has_key",compare:"",value:"外观检验_返修_日期"}] + ]; that.getList(1); }, handleQuery(){ let that = this; that.params.page = 1; - that.params.querys=[[{field:"data__has_key",compare:"",value:"尺寸检验_日期"}]]; + that.params.querys=[]; + let arr1 = [{field:"data__has_key",compare:"",value:"尺寸检验_日期"}], + arr2 = [{field:"data__has_key",compare:"",value:"外观检验_日期"}], + arr3 = [{field:"data__has_key",compare:"",value:"外观检验_返修_日期"}]; for(let key in that.query){ - if(that.query[key] != ""){ + if(that.query[key] != ""&&that.query[key] != null&&that.query[key] != undefined){ let obj = {}; obj.value = that.query[key]; - if(key=='cc_data_start'){ + if(key=='batch'){ + obj.field = "batch"; + obj.compare = "contains"; + arr1.push(obj); + arr2.push(obj); + arr3.push(obj); + }else if(key=='cc_data_start'){ obj.compare = "gte"; obj.field = "data__尺寸检验_日期"; + arr1.push(obj); }else if(key=='cc_data_end'){ obj.compare = "lte"; obj.field = "data__尺寸检验_日期"; + arr1.push(obj); }else if(key=='wg_data_start'){ obj.compare = "gte"; obj.field = "data__外观检验_日期"; + arr2.push(obj); }else if(key=='wg_data_end'){ obj.compare = "lte"; obj.field = "data__外观检验_日期"; + arr2.push(obj); }else if(key=='fx_data_start'){ obj.compare = "gte"; obj.field = "data__返修_日期"; + arr3.push(obj); }else if(key=='fx_data_end'){ obj.compare = "lte"; obj.field = "data__返修_日期"; - }else{ - obj.field = "batch"; - obj.compare = "contains"; + arr3.push(obj); } - that.params.querys[0].push(obj); } } + if((that.query.cc_data_start != ""&&that.query.cc_data_start != null)||(that.query.cc_data_end != ""&&that.query.cc_data_end != null)){ + console.log('arr1'); + console.log(arr1); + that.params.querys.push(arr1); + } + if((that.query.wg_data_start != ""&&that.query.wg_data_start != null)||(that.query.wg_data_end != ""&&that.query.wg_data_end != null)){ + console.log('arr2'); + console.log(arr2); + that.params.querys.push(arr2); + } + if((that.query.fx_data_start != ""&&that.query.fx_data_start != null)||(that.query.fx_data_end != ""&&that.query.fx_data_end != null)){ + console.log('arr3'); + console.log(arr3); + that.params.querys.push(arr3); + } + if((that.query.cc_data_start == ""||that.query.cc_data_start == null)&&(that.query.cc_data_end == ""||that.query.cc_data_end== null)&& + (that.query.wg_data_start == ""||that.query.wg_data_start == null)&&(that.query.wg_data_end == ""||that.query.wg_data_end == null)&& + (that.query.fx_data_start == ""||that.query.fx_data_start == null)&&(that.query.fx_data_end == ""||that.query.fx_data_end == null)){ + that.params.querys.push(arr1,arr2,arr3); + } this.getList(); }, getSummaries({ columns, data }) { - console.log('data',data); - console.log('columns',columns); const sums = []; columns.forEach((column, index) => { if (index === 0) { @@ -471,78 +504,78 @@ export default { propert = '外观检验_count_ok_full'; }else if(index==28&&column.label=='划麻(返修)'){ propert = '外观检验_缺陷_划麻(返修)'; - }else if(index==29&&column.label=='脏(返修)'){ + }else if(index==30&&column.label=='脏(返修)'){ propert = '外观检验_缺陷_脏(返修)'; - }else if(index==30&&column.label=='气泡'){ + }else if(index==32&&column.label=='气泡'){ propert = '外观检验_缺陷_气泡'; - }else if(index==31&&column.label=='浅气泡(B)'){ + }else if(index==34&&column.label=='浅气泡(B)'){ propert = '外观检验_缺陷_浅气泡(B)'; - }else if(index==32&&column.label=='黑圈变形'){ + }else if(index==35&&column.label=='黑圈变形'){ propert = '外观检验_缺陷_黑圈变形'; - }else if(index==33&&column.label=='黑圈缺口'){ + }else if(index==36&&column.label=='黑圈缺口'){ propert = '外观检验_缺陷_黑圈缺口'; - }else if(index==34&&column.label=='重水纹'){ + }else if(index==37&&column.label=='重水纹'){ propert = '外观检验_缺陷_重水纹'; - }else if(index==35&&column.label=='浅水纹(B)'){ + }else if(index==38&&column.label=='浅水纹(B)'){ propert = '外观检验_缺陷_浅水纹(B)'; - }else if(index==36&&column.label=='大崩'){ + }else if(index==39&&column.label=='大崩'){ propert = '外观检验_缺陷_大崩'; - }else if(index==37&&column.label=='小崩边(B)'){ + }else if(index==40&&column.label=='小崩边(B)'){ propert = '外观检验_缺陷_小崩边(B)'; - }else if(index==38&&column.label=='棕点'){ + }else if(index==42&&column.label=='棕点'){ propert = '外观检验_缺陷_棕点'; - }else if(index==39&&column.label=='浅划麻(B)'){ + }else if(index==43&&column.label=='浅划麻(B)'){ propert = '外观检验_缺陷_浅划麻(B)'; - }else if(index==40&&column.label=='双面划麻'){ + }else if(index==44&&column.label=='双面划麻'){ propert = '外观检验_缺陷_双面划麻'; - }else if(index==41&&column.label=='倒角'){ + }else if(index==45&&column.label=='倒角'){ propert = '外观检验_缺陷_倒角'; - }else if(index==42&&column.label=='棕圈'){ + }else if(index==46&&column.label=='棕圈'){ propert = '外观检验_缺陷_棕圈'; - }else if(index==43&&column.label=='蓝圈'){ + }else if(index==47&&column.label=='蓝圈'){ propert = '外观检验_缺陷_蓝圈'; - }else if(index==44&&column.label=='尺寸小'){ + }else if(index==48&&column.label=='尺寸小'){ propert = '外观检验_缺陷_尺寸小'; - }else if(index==45&&column.label=='破损'){ + }else if(index==49&&column.label=='破损'){ propert = '外观检验_缺陷_破损'; - }else if(index==46&&column.label=='发白'){ + }else if(index==50&&column.label=='发白'){ propert = '外观检验_缺陷_发白'; - }else if(index==47&&column.label=='漏光'){ + }else if(index==51&&column.label=='漏光'){ propert = '外观检验_缺陷_漏光'; - }else if(index == 50&&column.label=='返修数'){ - propert = '返修_count_real'; - }else if(index==51&&column.label=='合格数'){ - propert = '返修_count_ok_full'; - }else if(index==52&&column.label=='黑圈变形'){ - propert = '返修_缺陷_黑圈变形'; - }else if(index==53&&column.label=='气泡'){ - propert = '返修_缺陷_气泡'; - }else if(index==54&&column.label=='浅气泡(B)'){ - propert = '返修_缺陷_浅气泡(B)'; - }else if(index==55&&column.label=='浅划麻(B)'){ - propert = '返修_缺陷_浅划麻(B)'; - }else if(index==56&&column.label=='双面划麻'){ - propert = '返修_缺陷_双面划麻'; - }else if(index==57&&column.label=='浅水纹(B)'){ - propert = '返修_缺陷_浅水纹(B)'; - }else if(index==58&&column.label=='重水纹'){ - propert = '返修_缺陷_重水纹'; - }else if(index==59&&column.label=='大崩'){ - propert = '返修_缺陷_大崩'; - }else if(index==60&&column.label=='小崩边(B)'){ - propert = '返修_缺陷_小崩边(B)'; - }else if(index==61&&column.label=='倒角'){ - propert = '返修_缺陷_倒角'; - }else if(index==62&&column.label=='棕点'){ - propert = '返修_缺陷_棕点'; - }else if(index==63&&column.label=='漏光'){ - propert = '返修_缺陷_漏光'; - }else if(index==64&&column.label=='黑圈缺口'){ - propert = '返修_缺陷_黑圈缺口'; - }else if(index==65&&column.label=='破损'){ - propert = '返修_缺陷_破损'; - }else if(index==66&&column.label=='尺寸小'){ - propert = '返修_缺陷_尺寸小'; + }else if(index == 54&&column.label=='返修数'){ + propert = '外观检验_返修_count_real'; + }else if(index==55&&column.label=='合格数'){ + propert = '外观检验_返修_count_ok_full'; + }else if(index==56&&column.label=='黑圈变形'){ + propert = '外观检验_返修_缺陷_黑圈变形'; + }else if(index==57&&column.label=='气泡'){ + propert = '外观检验_返修_缺陷_气泡'; + }else if(index==58&&column.label=='浅气泡(B)'){ + propert = '外观检验_返修_缺陷_浅气泡(B)'; + }else if(index==59&&column.label=='浅划麻(B)'){ + propert = '外观检验_返修_缺陷_浅划麻(B)'; + }else if(index==60&&column.label=='双面划麻'){ + propert = '外观检验_返修_缺陷_双面划麻'; + }else if(index==61&&column.label=='浅水纹(B)'){ + propert = '外观检验_返修_缺陷_浅水纹(B)'; + }else if(index==62&&column.label=='重水纹'){ + propert = '外观检验_返修_缺陷_重水纹'; + }else if(index==63&&column.label=='大崩'){ + propert = '外观检验_返修_缺陷_大崩'; + }else if(index==64&&column.label=='小崩边(B)'){ + propert = '外观检验_返修_缺陷_小崩边(B)'; + }else if(index==65&&column.label=='倒角'){ + propert = '外观检验_返修_缺陷_倒角'; + }else if(index==66&&column.label=='棕点'){ + propert = '外观检验_返修_缺陷_棕点'; + }else if(index==67&&column.label=='漏光'){ + propert = '外观检验_返修_缺陷_漏光'; + }else if(index==68&&column.label=='黑圈缺口'){ + propert = '外观检验_返修_缺陷_黑圈缺口'; + }else if(index==69&&column.label=='破损'){ + propert = '外观检验_返修_缺陷_破损'; + }else if(index==70&&column.label=='尺寸小'){ + propert = '外观检验_返修_缺陷_尺寸小'; }else if(column.label=='外观总合格数'){ propert = '外观检验_完全总合格数'; } @@ -561,6 +594,27 @@ export default { } }, 0); } + + } + if(index==5||index==7||index==9||index==11||index==18||index==22){ + if(sums[index-1]){ + sums[index] = ((sums[index-1]/sums[3])*100).toFixed(4); + } + } + if(index==27||index==29||index==31||index==33||index==41){ + if(sums[index-1]){ + sums[index] = ((sums[index-1]/sums[25])*100).toFixed(4); + } + } + if(index==72){ + if(sums[71]&&sums[25]){ + sums[index] = ((sums[71]/sums[25])*100).toFixed(4); + } + } + if(index==73){ + if(sums[72]&&sums[22]){ + sums[index] = ((sums[72]/sums[22])*100).toFixed(4); + } } }); return sums;