From afb86b1cecaf0a58ee851dc6a8dc85eebdf065d7 Mon Sep 17 00:00:00 2001 From: shijing Date: Mon, 23 Mar 2026 14:47:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=83=AD=E5=8E=8B=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=EF=BC=88=E6=AF=9B=EF=BC=89=E6=A3=80=E6=B5=8B=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/bxerp/workHoursRY.vue | 257 +++++++++++++-------- 1 file changed, 157 insertions(+), 100 deletions(-) diff --git a/src/views/statistics/bxerp/workHoursRY.vue b/src/views/statistics/bxerp/workHoursRY.vue index 2178302a..3caaff9b 100644 --- a/src/views/statistics/bxerp/workHoursRY.vue +++ b/src/views/statistics/bxerp/workHoursRY.vue @@ -28,7 +28,21 @@ @click="handleQuery1" > -
+
+ + + + -
-
- - - - -
@@ -82,12 +76,18 @@ :params="params1" :query="params1" row-key="id" + :default-sort="{ prop: 'date', order: 'descending' }" stripe > - + + + + @@ -182,8 +182,8 @@ @@ -192,127 +192,149 @@ - + - - + + - - - - - - - - + + + + + + + + + + + + + + + + - + + + + - - + + + + + + + + + + + - + - + - - - - - - - - - + - - - @@ -534,8 +556,22 @@ export default { userName:'', activeName: 'product', params1: { - ordering:'data__装炉压板出炉_批次号', - querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"装炉压板出炉_批次号"}]], + ordering:'-create_time', + // ordering:'-data__装模_日期', + // querys:[[{field:"data__has_key",compare:"",value:"装炉压板出炉_批次号"}]], + querys:[[ + {field:"wpr_mlogbw__mlogb__mlog__mgroup__name",compare:"",value:"装炉压板出炉"}, + {field:"wpr_mlogbw__mlogb__material_out",compare:"isnull",value:false}] + ], + }, + params2: { + ordering:'-create_time', + querys:[[ + {field:"wpr_mlogbw__mlogb__mlog__mgroup__name",compare:"",value:"毛坯检测"}, + {field:"wpr_mlogbw__mlogb__material_out",compare:"isnull",value:false}, + {field:"data__毛坯检测_日期",compare:"isnull",value:false}, + {field:"data__has_key",compare:"",value:"毛坯检测_批次号"}] + ], }, query1:{ number_contains:'', @@ -550,6 +586,8 @@ export default { start_date:'', select_cols: ",ls.板段编号列表,ls.切片编号列表" }, + end_date:'', + start_date:'', mgruops:[], tableData:[], detailRow:[], @@ -562,26 +600,37 @@ export default { mounted() { let that = this; let date = new Date(); - that.query.end_date = that.$TOOL.dateFormat2(date); - that.query.start_date = that.query.end_date.split('-')[0] + '-' + that.query.end_date.split('-')[1] + '-01'; + that.end_date = that.query.end_date = that.$TOOL.dateFormat2(date); + that.start_date = that.query.start_date = that.query.end_date.split('-')[0] + '-' + that.query.end_date.split('-')[1] + '-01'; }, methods: { getData(){ let that = this; - let params = {}; - let biStr = ''; + let params = {},query ={},biStr = ''; + if(that.query.start_date==''||that.query.start_date==null){ + that.query.start_date = query.start_date = that.start_date; + }else{ + query.start_date = that.query.start_date; + } + if(that.query.end_date==''||that.query.end_date==null){ + that.query.end_date = query.end_date = that.end_date; + }else{ + query.end_date = that.query.end_date; + } if(that.activeName=='luhao'){ - params.query = that.query; + query.select_cols = that.query.select_cols; + params.query = query; biStr = 'product_defect_equip_bdgy'; - params.query.select_cols = ",ls.板段编号列表,ls.切片编号列表"; }else if(that.activeName=='muju'){ - params.query = that.query; + query.select_cols = ""; + params.query = query; biStr = 'product_defect_model'; - params.query.select_cols = ""; }else if(that.activeName=='gongxu'){ - params.query = that.query2; + query.process_name = that.query2.process_name; + params.query = query; biStr = 'product_defect_reya'; }else if(that.activeName=='total'){ + params.query = query; biStr = 'product_defect_sg'; } console.log('params',params); @@ -603,17 +652,24 @@ export default { }, handleQuery1(){ let that = this; - let querys1 = [[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"装炉压板出炉_批次号"}]]; + let querys1 = [[{field:"wpr_mlogbw__mlogb__mlog__mgroup__name",compare:"",value:"装炉压板出炉"}, + {field:"wpr_mlogbw__mlogb__material_out",compare:"isnull",value:false}]]; + if(that.activeName=='test'){ + querys1 = [[{field:"wpr_mlogbw__mlogb__mlog__mgroup__name",compare:"",value:"毛坯检测"}, + {field:"wpr_mlogbw__mlogb__material_out",compare:"isnull",value:false}, + {field:"data__毛坯检测_日期",compare:"isnull",value:false}, + {field:"data__has_key",compare:"",value:"毛坯检测_批次号"}]]; + } let obj = {},obj1 = {},obj2 = {}; - obj.field = 'data__装炉压板出炉_批次号'; + obj.field = that.activeName=='product'?'data__装炉压板出炉_批次号':'data__毛坯检测_批次号'; obj.value = that.query1.number_contains; obj.compare = ''; - obj1.field = 'data__装炉压板出炉_日期'; + obj1.field = that.activeName=='product'?'data__装炉压板出炉_日期':'data__毛坯检测_日期'; obj1.value = that.query1.time_gte; obj1.compare = 'gte'; - obj2.field = 'data__装炉压板出炉_日期'; + obj2.field = that.activeName=='product'?'data__装炉压板出炉_日期':'data__毛坯检测_日期'; obj2.value = that.query1.time_lte; obj2.compare = 'lte'; if(that.query1.number_contains!==''&&that.query1.number_contains!==null){ @@ -625,28 +681,29 @@ export default { if(that.query1.time_lte!==''&&that.query1.time_lte!==null){ querys1[0].push(obj2); } - that.params1.querys = querys1; + that.$nextTick(() => { if(that.activeName=='product'){ + that.params1.querys = querys1; this.$refs.table1.queryData(that.params1); }else if(that.activeName=='test'){ - this.$refs.table2.queryData(that.params1); + that.params2.querys = querys1; + this.$refs.table2.queryData(that.params2); } }); }, - handleQuery(){ + handleQuery2(){ let that = this; that.getData(); }, - deptChange(){ - this.getData(); - }, filterName(value, row) { return row.物料名 == value; }, handleClick(e){ - console.log('e.props.name',e.props.name); + let that = this; + that.query.end_date = that.end_date; + that.query.start_date = that.start_date; this.activeName = e.props.name; this.showTable=false; if(e.props.name=='luhao'||e.props.name=='muju'||e.props.name=='gongxu'||e.props.name=='total'){