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;