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() {