From 747b095995f9e1d0a1a820f13dde8750bc4c2b4e Mon Sep 17 00:00:00 2001 From: shijing Date: Mon, 2 Mar 2026 16:50:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=B7=A5=E6=97=B6=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E4=B8=AD=E7=83=AD=E5=8E=8B=E7=9B=B8=E5=85=B3=E8=A1=A8=E6=95=B4?= =?UTF-8?q?=E5=90=88=E5=88=B0=E4=B8=80=E4=B8=AA=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/bxerp/workHoursRY.vue | 121 ++++++++++++++++----- 1 file changed, 94 insertions(+), 27 deletions(-) diff --git a/src/views/statistics/bxerp/workHoursRY.vue b/src/views/statistics/bxerp/workHoursRY.vue index f15ee8b4..d6fab545 100644 --- a/src/views/statistics/bxerp/workHoursRY.vue +++ b/src/views/statistics/bxerp/workHoursRY.vue @@ -28,7 +28,7 @@ @click="handleQuery1" > -
+
- + + @@ -350,6 +353,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -404,7 +456,15 @@ export default { let that = this; let params = {}; params.query = that.query; - that.$API.bi.dataset.exec.req('product_defect_equip_bdgy', params).then((res) => { + let biStr = ''; + if(that.activeName=='luhao'){ + biStr = 'product_defect_equip_bdgy'; + params.query.select_cols = ",ls.板段编号列表,ls.切片编号列表"; + }else if(that.activeName=='muju'){ + biStr = 'product_defect_model'; + params.query.select_cols = ""; + } + that.$API.bi.dataset.exec.req(biStr, params).then((res) => { let data = res.data2.ds0; data.forEach(item=>{ if(item.缺陷分布!==null){ @@ -414,36 +474,49 @@ export default { } } }) - that.tableData = data; - that.showTable=true; + that.$nextTick(() => { + that.tableData = data; + that.showTable=true; + }) }); }, handleQuery1(){ let that = this; - let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"装炉压板出炉_批次号"}]]; - let obj = {},obj1 = {},obj2 = {},obj3 = {}; + let querys1 = [[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"装炉压板出炉_批次号"}]]; + let obj = {},obj1 = {},obj2 = {}; obj.field = 'data__装炉压板出炉_批次号'; - obj.value = that.query.number_contains; + obj.value = that.query1.number_contains; obj.compare = ''; obj1.field = 'data__装炉压板出炉_日期'; - obj1.value = that.query.time_gte; + obj1.value = that.query1.time_gte; obj1.compare = 'gte'; obj2.field = 'data__装炉压板出炉_日期'; - obj2.value = that.query.time_lte; + obj2.value = that.query1.time_lte; obj2.compare = 'lte'; - if(that.query.number_contains!==''&&that.query.number_contains!==null){ - querys[0].push(obj); + if(that.query1.number_contains!==''&&that.query1.number_contains!==null){ + querys1[0].push(obj); } - if(that.query.time_gte!==''&&that.query.time_gte!==null){ - querys[0].push(obj1); + if(that.query1.time_gte!==''&&that.query1.time_gte!==null){ + querys1[0].push(obj1); } - if(that.query.time_lte!==''&&that.query.time_lte!==null){ - querys[0].push(obj2); + if(that.query1.time_lte!==''&&that.query1.time_lte!==null){ + querys1[0].push(obj2); } - that.params.querys = querys; - this.$refs.table.queryData(that.params); + that.params1.querys = querys1; + that.$nextTick(() => { + if(that.activeName=='product'){ + this.$refs.table1.queryData(that.params1); + }else if(that.activeName=='test'){ + this.$refs.table2.queryData(that.params1); + } + }); + + }, + handleQuery(){ + let that = this; + that.getData(); }, deptChange(){ this.getData(); @@ -452,12 +525,10 @@ export default { return row.物料名 == value; }, handleClick(e){ - console.log('e.props.name',e.props.name) - this.query1.time_gte = ''; - this.query1.time_lte = ''; - this.query1.number_contains = ''; + console.log('e.props.name',e.props.name); + this.activeName = e.props.name; this.showTable=false; - if(e.props.name=='luhao'){ + if(e.props.name=='luhao'||e.props.name=='muju'){ this.getData(); } }, @@ -467,10 +538,6 @@ export default { that.visible = true; that.detailRow = row.切片编号列表; }, - handleQuery(){ - let that = this; - that.getData(); - }, }, };