diff --git a/src/api/model/wpm.js b/src/api/model/wpm.js index 6d13d792..56b4e1f6 100644 --- a/src/api/model/wpm.js +++ b/src/api/model/wpm.js @@ -383,6 +383,26 @@ export default { }, }, }, + mloguser: { + list: { + name: "列表", + req: async function (data) { + return await http.get(`${config.API_URL}/wpm/mloguser/`, data); + }, + }, + create: { + name: "创建", + req: async function (data) { + return await http.post(`${config.API_URL}/wpm/mloguser/`, data); + }, + }, + delete: { + name: "删除", + req: async function (id) { + return await http.delete(`${config.API_URL}/wpm/mloguser/${id}/`); + }, + }, + }, handover: { list: { name: "值班记录列表", @@ -559,6 +579,38 @@ export default { // return await http.get(`${config.API_URL}/wpm/batchlog/`, data); // }, // }, + batchlog: { + list: { + name: "批次列表", + req: async function (data) { + return await http.get(`${config.API_URL}/wpm/batchlog/`, data); + }, + }, + dag: { + name: "获取批次的DAG图数据", + req: async function (data) { + return await http.post(`${config.API_URL}/wpm/batchlog/dag/`, data); + }, + }, + batchesTo:{ + name: "获取已指向的批次号", + req: async function (data) { + return await http.post(`${config.API_URL}/wpm/batchlog/batches_to/`, data); + }, + }, + batchwork:{ + name: "工段批次加工进度", + req: async function (data) { + return await http.post(`${config.API_URL}/wpm/ana/batchwork/`, data); + }, + }, + }, + // batchlog: { + // name: "批次列表", + // req: async function (data) { + // return await http.get(`${config.API_URL}/wpm/batchlog/`, data); + // }, + // }, batchlog: { list: { name: "批次列表", @@ -591,6 +643,12 @@ export default { return await http.post(`${config.API_URL}/wpm/batchst/cquery/`, data); }, }, + batchstquery: { + name: "批次统计数据", + req: async function (data) { + return await http.post(`${config.API_URL}/wpm/batchst/cquery/`, data); + }, + }, wpr:{ list: { name: "动态产品", diff --git a/src/config/route.js b/src/config/route.js index d1826827..ca8d1255 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -1828,6 +1828,7 @@ const routes = [ title: "首件检验", // icon: "el-icon-cellphone", perms: ["ftest"], + hidden: true, }, component: "qm/first", }, @@ -1841,16 +1842,6 @@ const routes = [ }, component: "qm/process", }, - { - name: "qmProcess_gx", - path: "/qm/qmProcess_gx", - meta: { - title: "过程自检", - // icon: "el-icon-cellphone", - perms: ["ptest_gx"], - }, - component: "qm/process_gx", - }, { name: "qmProcess2", path: "/qm/qmProcess2", @@ -1892,35 +1883,14 @@ const routes = [ component: "qm/product", }, { - name: "products_cc", - path: "/qm/products_cc", + name: "product_middle", + path: "/qm/product_middle", meta: { - title: "尺寸检验", - // icon: "el-icon-cellphone", - perms: ["productstest_cc"], - }, - component: "qm/products_cc", - }, - { - name: "products_wg", - path: "/qm/products_wg", - meta: { - title: "外观检验", - // icon: "el-icon-cellphone", - perms: ["productstest_wg"], - }, - component: "qm/products_wg", - }, - { - name: "productDetail", - path: "/qm/productDetail", - meta: { - title: "成品检验", + title: "中检记录", // icon: "el-icon-cellphone", perms: ["producttest"], - hidden: true, }, - component: "qm/productCheck", + component: "qm/product_middle", }, ], }, @@ -3512,47 +3482,7 @@ const routes = [ perms: ["statistic_qm"], }, component: "statistics/product_check2.vue", - }, - // { - // "name": "inm_check", - // "path": "/statistic/inm_check", - // "meta": { - // "title": "库存检验统计", - // "icon": "el-icon-DataAnalysis", - // "perms": ["statistic_qm"] - // }, - // "component": "statistics/inm_check.vue" - // }, - { - name: "good_check", - path: "/statistic/good_check", - meta: { - title: "成品检验统计", - // icon: "el-icon-DataAnalysis", - perms: ["statistic_qm"], - }, - component: "statistics/good_check.vue", - }, - // { - // "name": "behavior_check", - // "path": "/statistic/behavior_check", - // "meta": { - // "title": "性能检验", - // "icon": "el-icon-cellphone", - // "perms": ["statistic_qm"] - // }, - // "component": "statistics/behavior_check.vue" - // }, - // { - // "name": "enter_check", - // "path": "/statistic/enter_check", - // "meta": { - // "title": "入厂检验", - // "icon": "el-icon-cellphone", - // "perms": ["statistic_qm"] - // }, - // "component": "statistics/enter_check.vue" - // }, + } ], }, //物料统计 @@ -3599,105 +3529,6 @@ const routes = [ }, component: "statistics/stock_statistics.vue", }, - //合格数统计——光芯 - { - name: "pass_num_gx", - path: "/statistic/pass_num_gx", - meta: { - title: "合格数统计", - icon: "el-icon-DataAnalysis", - perms: ["pass_num_gx"], - }, - component: "statistics/pass_num_gx.vue", - }, - //任务进度统计——光芯 - { - name: "task_rate_gx", - path: "/statistic/task_rate_gx", - meta: { - title: "任务进度", - icon: "el-icon-DataAnalysis", - perms: ["task_rate_gx"], - }, - component: "statistics/task_rate_gx.vue", - }, - //人员绩效统计——光芯 - { - path: "/work_statistics", - name: "work_statistics", - meta: { - title: "人员生产统计", - icon: "el-icon-trend-charts", - perms: ["work_statistics"], - }, - component: "statistics/work_statistics.vue", - }, - //库存统计——光芯 - { - path: "/statistic_inm", - name: "statistic_inm", - meta: { - title: "库存统计", - icon: "el-icon-trend-charts", - perms: ["statistic_inm_gx"], - }, - component: "statistics/statistics_inm.vue", - }, - //返工统计——光芯 - { - path: "/rework_gx", - name: "rework_gx", - meta: { - title: "返工统计", - icon: "el-icon-trend-charts", - perms: ["rework_gx"], - }, - component: "statistics/rework_gx.vue", - }, - //过程检验统计——光芯 - { - path: "/process_check_gx", - name: "process_check_gx", - meta: { - title: "过程检验统计", - icon: "el-icon-trend-charts", - perms: ["process_check_gx"], - }, - component: "statistics/process_check_gx.vue", - }, - //成品检验统计——光芯 - { - path: "/good_check_gx", - name: "good_check_gx", - meta: { - title: "成品检验统计", - icon: "el-icon-trend-charts", - perms: ["good_check_gx"], - }, - component: "statistics/good_check_gx.vue", - }, - //成品检验记录——光芯 - { - path: "/check_record_gx", - name: "check_record_gx", - meta: { - title: "成品检验记录", - icon: "el-icon-trend-charts", - perms: ["check_record_gx"], - }, - component: "statistics/check_record_gx.vue", - }, - //扫边车间数据汇总——光芯 - // { - // path: "/statistics_saobian", - // name: "statistics_saobian", - // meta: { - // title: "扫边车间统计", - // icon: "el-icon-trend-charts", - // perms: ["statistic_inm"], - // }, - // component: "statistics/statistics_saobian.vue", - // }, //综合查询 { name: "total_statistics", @@ -3731,50 +3562,29 @@ const routes = [ }, component: "statistics/statistics_guan.vue", }, - //综合统计--AVG + //批次统计 + { + name: "statistics_batch", + path: "/statistic/statistics_batch", + meta: { + title: "批次统计", + icon: "el-icon-DataAnalysis", + perms: ["statistics_batch"], + }, + component: "statistics/batch_statistics.vue", + }, + //综合统计导出 + { + name: "total_export", + path: "/statistic/total_export", + meta: { + title: "统计导出", + icon: "el-icon-DataAnalysis", + perms: ["total_export"], + }, + component: "statistics/all.vue", + }, ], - // children:[ - // { - // "path": "/product_statistics", - // "name": "product_statistics", - // "meta": { - // "title": "生产统计", - // "icon": "el-icon-trend-charts", - // "perms": ["bigScreenP"], - // }, - // "component": "statistics/product_statistics.vue" - // }, - // { - // "path": "/quality_statistics", - // "name": "quality_statistics", - // "meta": { - // "title": "质量统计", - // "icon": "el-icon-trend-charts", - // "perms": ["bigScreenP"], - // }, - // "component": "statistics/quality_statistics.vue" - // }, - // { - // "path": "/sale_statistics", - // "name": "sale_statistics", - // "meta": { - // "title": "销售统计", - // "icon": "el-icon-trend-charts", - // "perms": ["bigScreenP"], - // }, - // "component": "statistics/sale_statistics.vue" - // }, - // { - // "path": "/material_statistics", - // "name": "material_statistics", - // "meta": { - // "title": "物料统计", - // "icon": "el-icon-trend-charts", - // "perms": ["bigScreenP"], - // }, - // "component": "statistics/material_statistics.vue" - // }, - // ], }, //报表 { diff --git a/src/views/bigScreen/index_6dept.vue b/src/views/bigScreen/index_6dept.vue index 4abff1a1..28f9ff5d 100644 --- a/src/views/bigScreen/index_6dept.vue +++ b/src/views/bigScreen/index_6dept.vue @@ -239,7 +239,6 @@ export default { this.containerHeight2 = document.getElementById("scrollContainer2").clientHeight; this.table2Visible = true; - const ondDayTime = 86400000; let date = new Date(); let year = date.getFullYear(); @@ -247,9 +246,10 @@ export default { let day = date.getDate(); let days = new Date(year, month, 0).getDate(); this.days = days; + month = month < 10 ? "0" + month : month; + day = day < 10 ? "0" + day : day; let start_date = year + "-" + month + "-01"; - let lastDay = new Date(year, month, 0).getDate(); - let end_date = year + "-" + month + "-" + lastDay; + let end_date = year + "-" + month + "-" + days; this.start_date = start_date; this.end_date = end_date; this.today = year + "-" + month + "-" + day; @@ -383,12 +383,13 @@ export default { start_date: this.weekFirst, end_date: this.weekLast, dept_name: "6车间", - select_cols_material: ", material.model AS 型号", - group_bys_material: ", material.model", - order_bys_material: "", - select_cols_mgroup: ", mgroup.name AS 工段", - group_bys_mgroup: ", mgroup.name", is_count_utask: -1, + group_bys_mgroup: ", mgroup.name", + order_bys_mgroup: ", 工段", + group_bys_material: ", material.model", + order_bys_material: ", 型号", + select_cols_mgroup: ", mgroup.name AS 工段", + select_cols_material: ", material.model AS 型号" }, }; //生产车间按日统计 @@ -446,15 +447,15 @@ export default { legendArr2 = []; let obj = { query: { - start_date: "2023-01-01", - end_date: "2023-12-31", - dept_name: "10车间", + start_date: this.start_date, + end_date: this.end_date, + dept_name: "6车间", }, }; let obj2 = { query: { - start_date: "2023-01-01", - end_date: "2023-12-31", + start_date: this.start_date, + end_date: this.end_date, mio_type: "sale_out", material_id: "", }, @@ -466,9 +467,7 @@ export default { xAxisData[i] = text; } //生产车间按日统计 - that.$API.bi.dataset.exec - .req("productStatistic", obj) - .then((res1) => { + that.$API.bi.dataset.exec.req("productStatistic", obj).then((res1) => { console.log("生产车间按日统计:", res1); if (res1.data2.ds0) { let list1 = res1.data2.ds0; @@ -498,8 +497,6 @@ export default { }); } } - console.log("00000000000000000000000"); - console.log("seriesData:", seriesData); let chart1Option = deepCopy(this.basicOption); chart1Option.legend.data = legendArr; chart1Option.xAxis.data = xAxisData; diff --git a/src/views/bigScreen/index_photon.vue b/src/views/bigScreen/index_photon.vue index 6828d4c1..cc6a3e25 100644 --- a/src/views/bigScreen/index_photon.vue +++ b/src/views/bigScreen/index_photon.vue @@ -5,86 +5,37 @@ 光子科技生产管理系统 - + -
-
+
+
本周交付数
-
+
本周合格数
-
+
本周合格率
-
+
-
-
+
+
枣庄 {{ currentDay }}{{ currentWeek @@ -95,33 +46,15 @@ />
-
- - AVG合格数 -
- {{ countOk_AVG }} -
-
- 预制棒合格数 -
- {{ countOk_dept7 }} -
+ 本周预制棒合格数 +
{{ countOk_dept7 }}
- 预制管合格数 -
- {{ countOk_dept10 }} -
+ 本周预制管合格数 +
{{ countOk_dept10 }}
@@ -133,46 +66,16 @@ status="warning" >
-
-
+
+
@@ -182,32 +85,14 @@ 10车间
-
+
本周计划完成度
-
+
@@ -483,7 +368,6 @@ export default { }, deptName: "10车间", heightTimer: null, - countOk_AVG: 0, countOk_dept7: 0, countOk_dept10: 0, blockTableHeight: 0, @@ -681,7 +565,7 @@ export default { this.getPlanRate(); this.getMaterialList(); }, - //本周6车间交付数----棒管交付数 + //本周棒管交付数 getsaleOut() { let that = this; let obj = { @@ -699,43 +583,13 @@ 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.数量; } } }); } that.saleOutdept6 = saleOutdept6; - that.getAVGDayData(); - }); - }, - //获取AVG的交付数$合格数 - getAVGDayData() { - let that = this; - this.$API.wpm.otherlog.list - .req({ - product: "AVG", - page: 0, - handle_date__gte: that.start_date, - handle_date__lte: that.end_date, - }) - .then((res) => { - let list = res; - let count_ok = 0, - saleOutAVG = [0, 0, 0, 0, 0, 0, 0], - countOkAVG = [0, 0, 0, 0, 0, 0, 0]; - if (list.length > 0) { - list.forEach((item) => { - count_ok = count_ok + item.count_ok; - let day = item.handle_date.split("-"); - let index = this.weekDateList.indexOf(day[2]); - saleOutAVG[index] = item.count_delivered; - countOkAVG[index] = item.count_ok; - }); - that.saleOutAVG = saleOutAVG; - that.countOkAVG = countOkAVG; - that.countOk_AVG = count_ok; - } - that.getCountDept7(); + that.getCountDept7(); //左1---本周交付数 let chartDom = document.getElementById("line1"); chartDom.style.height = this.blockHeight; @@ -745,9 +599,6 @@ export default { trigger: "axis", axisPointer: { type: "cross", - label: { - backgroundColor: "#6a7985", - }, }, }, legend: { @@ -758,16 +609,12 @@ export default { { backgroundColor: "rgb(1,235,239)", name: "预制棒管", - textStyle: { color: "#fff", }, itemStyle: { color: new echarts.graphic.LinearGradient( - 0, - 0, - 0, - 1, + 0,0,0,1, [ { offset: 0, @@ -781,31 +628,6 @@ export default { ), }, }, - { - name: "AVG", - textStyle: { - color: "#fff", - }, - itemStyle: { - // color:'rgb(1,235,239)', - color: new echarts.graphic.LinearGradient( - 0, - 0, - 0, - 1, - [ - { - offset: 0, - color: "rgb(1,235,239)", - }, - { - offset: 1, - color: "rgb(5, 158, 163)", - }, - ] - ), - }, - }, ], }, grid: { @@ -857,42 +679,6 @@ export default { { name: "预制棒管", type: "line", - stack: "Total", - smooth: true, - lineStyle: { - width: 1, - color: "rgb(1,235,239)", - }, - - showSymbol: false, - areaStyle: { - opacity: 0.8, - color: new echarts.graphic.LinearGradient( - 0, - 0, - 0, - 1, - [ - { - offset: 0, - color: "rgba(1,235,239)", - }, - { - offset: 1, - color: "rgb(5, 158, 163)", - }, - ] - ), - }, - emphasis: { - focus: "series", - }, - data: that.saleOutdept6, - }, - { - name: "AVG", - type: "line", - stack: "Total", smooth: true, lineStyle: { width: 1, @@ -902,10 +688,7 @@ export default { areaStyle: { opacity: 0.8, color: new echarts.graphic.LinearGradient( - 0, - 0, - 0, - 1, + 0,0,0,1, [ { offset: 0, @@ -921,11 +704,40 @@ export default { emphasis: { focus: "series", }, - data: that.saleOutAVG, + data: that.saleOutdept6, }, ], }; myChart.setOption(option); + }); + }, + //获取AVG的交付数$合格数 + getAVGDayData() { + let that = this; + this.$API.wpm.otherlog.list + .req({ + product: "AVG", + page: 0, + handle_date__gte: that.start_date, + handle_date__lte: that.end_date, + }) + .then((res) => { + let list = res; + let count_ok = 0, + saleOutAVG = [0, 0, 0, 0, 0, 0, 0], + countOkAVG = [0, 0, 0, 0, 0, 0, 0]; + if (list.length > 0) { + list.forEach((item) => { + count_ok = count_ok + item.count_ok; + let day = item.handle_date.split("-"); + let index = this.weekDateList.indexOf(day[2]); + saleOutAVG[index] = item.count_delivered; + countOkAVG[index] = item.count_ok; + }); + that.saleOutAVG = saleOutAVG; + that.countOkAVG = countOkAVG; + } + }); }, //7车间合格数&&合格率 @@ -939,6 +751,9 @@ export default { group_bys_material: "", order_bys_material: "", select_cols_material: "", + group_bys_material_name: "", + order_bys_material_name: "", + select_cols_material_name: "" }, }; that.$API.bi.dataset.exec.req("lineDay", obj).then((res) => { @@ -988,20 +803,15 @@ export default { group_bys_material: "", order_bys_material: "", select_cols_material: "", + group_bys_material_name: "", + order_bys_material_name: "", + select_cols_material_name: "" }, }; that.$API.bi.dataset.exec.req("lineDay", obj).then((res) => { let list = res.data2.ds0; let countOkDept10 = [0, 0, 0, 0, 0, 0, 0], - countRateDept10 = [ - null, - null, - null, - null, - null, - null, - null, - ]; + countRateDept10 = [null,null,null,null,null,null,null,]; let countOk_dept10 = 0; if (list.length > 0) { list.forEach((item) => { @@ -1039,9 +849,7 @@ export default { dept_name: that.deptName, }, }; - that.$API.bi.dataset.exec - .req("productStatistic", obj) - .then((res) => { + that.$API.bi.dataset.exec.req("productStatistic", obj).then((res) => { let list = res.data2.ds0; let PlanRate = [0, 0, 0, 0, 0, 0, 0]; if (list.length > 0) { @@ -1119,23 +927,6 @@ export default { show: false, }, }, - // { - // type: 'value', - // name: '完成度', - // min: 0, - // max: 100, - // interval: 20, - // axisLabel: { - // formatter: '{value} %', - // color: '#ffffff' - // }, - // nameTextStyle: { - // color: '#ffffff' - // }, - // splitLine: { - // show: false, - // }, - // } ], series: [ { @@ -1168,27 +959,6 @@ export default { ), }, }, - // { - // name: '合格率', - // type: 'line', - // yAxisIndex: 1, - // // 255,120,0 - // tooltip: { - // valueFormatter: function (value) { - // return value; - // } - // }, - // symbol: 'circle', - // symbolSize: 8, - // itemStyle: { - // // 设置symbol的颜色 - // color: 'rgb(255,120,0)' - // }, - // lineStyle: { - // color: 'rgb(255,120,0)' - // }, - // data: [63, 80, 71, 82, 60, 70, 85], - // } ], }; line3Chart.setOption(line3option); @@ -1759,31 +1529,6 @@ export default { top: 5, right: 5, data: [ - { - name: "AVG", - textStyle: { - color: "#fff", - }, - itemStyle: { - color: new echarts.graphic.LinearGradient( - 0, - 0, - 0, - 1, - [ - { - offset: 0, - color: "rgb(5,245,2)", - }, - { - offset: 1, - color: "rgb(7,137,43)", - }, - ] - ), - }, - }, - { name: "预制管", textStyle: { @@ -1791,10 +1536,7 @@ export default { }, itemStyle: { color: new echarts.graphic.LinearGradient( - 0, - 0, - 0, - 1, + 0,0,0,1, [ { offset: 0, @@ -1814,12 +1556,8 @@ export default { color: "#fff", }, itemStyle: { - // color:'rgb(1,235,239)', color: new echarts.graphic.LinearGradient( - 0, - 0, - 0, - 1, + 0,0,0,1, [ { offset: 0, @@ -1881,12 +1619,8 @@ export default { focus: "series", }, itemStyle: { - // color:'rgb(1,235,239)', color: new echarts.graphic.LinearGradient( - 0, - 0, - 0, - 1, + 0,0,0,1, [ { offset: 0, @@ -1912,10 +1646,7 @@ export default { }, itemStyle: { color: new echarts.graphic.LinearGradient( - 0, - 0, - 0, - 1, + 0,0,0,1, [ { offset: 0, @@ -1930,34 +1661,6 @@ export default { }, data: that.countOkDept10, }, - { - name: "AVG", - type: "bar", - stack: "Ad", - barWidth: 20, - emphasis: { - focus: "series", - }, - itemStyle: { - color: new echarts.graphic.LinearGradient( - 0, - 0, - 0, - 1, - [ - { - offset: 0, - color: "rgb(5,245,2)", - }, - { - offset: 1, - color: "rgb(7,137,43)", - }, - ] - ), - }, - data: that.countOkAVG, - }, ], }; bar1Chart.setOption(bar1option); @@ -1980,10 +1683,7 @@ export default { }, itemStyle: { color: new echarts.graphic.LinearGradient( - 0, - 0, - 0, - 1, + 0,0,0,1, [ { offset: 0, @@ -2004,10 +1704,7 @@ export default { }, itemStyle: { color: new echarts.graphic.LinearGradient( - 0, - 0, - 0, - 1, + 0,0,0,1, [ { offset: 0, @@ -2073,12 +1770,8 @@ export default { symbolSize: 8, //设置折线上圆点大小 symbol: "circle", itemStyle: { - // 设置symbol的颜色 color: new echarts.graphic.LinearGradient( - 0, - 0, - 0, - 1, + 0,0,0,1, [ { offset: 0, @@ -2110,7 +1803,7 @@ export default { color: "yellow", // 100% 处的颜色 }, ], - globalCoord: false, // 缺省为 false + globalCoord: false, }, }, }, @@ -2121,12 +1814,8 @@ export default { symbolSize: 8, //设置折线上圆点大小 symbol: "circle", itemStyle: { - // 设置symbol的颜色 color: new echarts.graphic.LinearGradient( - 0, - 0, - 0, - 1, + 0,0,0,1, [ { offset: 0, @@ -2139,7 +1828,7 @@ export default { ] ), }, - smooth: 0.5, // 设置折线弧度 + smooth: 0.5, data: that.countRateDept10, lineStyle: { color: { @@ -2158,7 +1847,7 @@ export default { color: "rgb(5, 158, 163)", // 100% 处的颜色 }, ], - globalCoord: false, // 缺省为 false + globalCoord: false, }, }, }, @@ -2171,11 +1860,12 @@ export default { let pieChart = echarts.init(pieDom); let pieoption = { color: [ - "rgb(3,195,198)", + "rgb(237,224,45)", "rgb(155,248,249)", "rgb(110,181,249)", "rgb(205,248,248)", "rgb(248,189,118)", + "rgb(3,195,198)", ], legend: { bottom: 1, @@ -2197,33 +1887,9 @@ export default { type: "pie", radius: [30, 60], center: ["50%", "45%"], - // roseType: 'area', itemStyle: { borderRadius: 2, }, - // label: { - // fontSize: 12, - // alignTo: 'edge', - // formatter: '{b}\n', - // edgeDistance: 10, - // lineHeight: 20, - // rich: { - // title: { - // fontSize: 12, - // color: '#999', - // lineHeight: 50, - // }, - // } - // }, - // labelLayout: function (params) { - // var isLeft = params.labelRect.x < myChart.getWidth() / 2; - // var points = params.labelLinePoints; - // points[2][0] = isLeft? params.labelRect.x: params.labelRect.x + params.labelRect.width; - // return { - // labelLinePoints: points - // }; - // }, - label: { minMargin: 10, edgeDistance: 10, @@ -2290,7 +1956,42 @@ export default { background: url("/public/img/photon_bg.png") no-repeat; background-size: cover; } +.leftPosition{ + position: absolute; + left: 0; + width: 20%; + z-index: 10 +} +.leftPositionContainer{ + display: flex; + flex-direction: column; + height: 100%; + padding: 0 10px; +} +#line1,#bar1,#line2,#pie,#line3{ + width: 100%; + height: 92%; + background: rgba(9, 31, 43, 0.5); + border-radius: 20px; + margin-top: 5px; +} +.rightPosition{ + position: absolute; + right: 0; + width: 20%; + z-index: 10; +} +.rightPositionContainer{ + display: flex; + flex-direction: column; + height: 100%; + padding: 0 10px; +} +#mainBlock{ + padding: 0; + overflow: hidden; +} .pageHeader { font-size: 32px; background: none; @@ -2386,7 +2087,27 @@ export default { width: 100%; height: 100%; } - +.modelContainer{ + position: absolute; + width: 100%; + text-align: center; +} +.modeltopTitle{ + margin: 5px 0 50px 0; + color: #fff; + font-size: 12px; + font-weight: bold; +} +.progressNum{ + font-size: 30px; + color: white; + font-weight: bold; +} +.progressText{ + font-size: 18px; + color: white; + margin-top: 10px; +} #renderCanvas { width: 100%; height: 100%; @@ -2437,7 +2158,7 @@ export default { } .totalNumWrap > img { - width: 10vw; + width: 12vw; } .totalNumWrap_green > .totalNumber { @@ -2453,7 +2174,7 @@ export default { } .totalNumber { - font-size: 25px; + font-size: 2vw; font-weight: bold; position: absolute; left: 50%; 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 77c2eef4..e247081f 100644 --- a/src/views/home/widgets/index_photon.vue +++ b/src/views/home/widgets/index_photon.vue @@ -16,146 +16,99 @@
-
-
-
-
昨日核心指标
- -
-
-
-
预制棒合格数
-

{{ 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 }}% -

-
-
-
+ +
@@ -182,9 +135,6 @@ " >
- -
-
库存情况
-
+
成品库存统计
+
名称
型号
规格
+
安全库存
{{ item.specification }}
+
+ {{ item.count_safe }} +
@@ -434,6 +388,7 @@ export default { chartData: [], tableData: [], equipList: [], + productList:[], halfProductList: [], warningMaterial: [], calendarValue: "", @@ -449,17 +404,9 @@ export default { tongbi10: 0, dayPayNum6: 0, //交付数 tongbi06: 0, - monthPayNum6: 0, monthPassRate7: 0, monthPassRate10: 0, - - dayAVGcountOk: 0, - AVGOktongbi: 0, - dayAVGcountDelivered: 0, - AVGDelivertongbi: 0, - monthRateAVG: 0, - monthPayNumAVG: 0, hgNumber: 0, option: { tooltip: { @@ -541,12 +488,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: { @@ -575,43 +522,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; } }); }, - materialTypeChange() { - this.getMaterialList(); + //成品数量统计 + 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("getProductList", res); + that.productList = res.data2.ds0; + that.tableData = res.data2.ds0; + } + }); }, + // materialTypeChange() { + // 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"); @@ -709,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; } }); }); @@ -745,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 = { @@ -842,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; @@ -860,103 +811,20 @@ 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) => { - if (res6.data2.ds0) { + let sum6 = 0; + if (res6.data2.ds0&&res6.data2.ds0.length>0) { let list6 = res6.data2.ds0; - let sum6 = 0; if (list6.length > 0) { list6.forEach((item) => { - sum6 = sum6 + item.交付数; + sum6 = sum6 + item.数量; }); } - this.monthPayNum6 = sum6; - } - }); - }, - //获取昨日AVG的生产记录 - getAVGDayData() { - let that = this; - let date = that.yesterday; - let date0 = that.yesterdayBefore; - this.$API.wpm.otherlog.list - .req({ - product: "AVG", - page: 0, - handle_date__gte: date, - handle_date__lte: date, - }) - .then((res) => { - let list = res; - let count_ok = 0, - count_delivered = 0; - if (list.length > 0) { - list.forEach((item) => { - count_ok = count_ok + item.count_ok; - count_delivered = - count_delivered + item.count_delivered; - }); - that.dayAVGcountOk = count_ok; - that.dayAVGcountDelivered = count_delivered; - this.$API.wpm.otherlog.list - .req({ - product: "AVG", - page: 0, - handle_date__gte: date0, - handle_date__lte: date0, - }) - .then((res0) => { - let list0 = res0; - let count_ok0 = 0, - count_delivered0 = 0; - if (list0.length > 0) { - list0.forEach((item0) => { - count_ok0 = count_ok0 + item0.count_ok; - count_delivered0 = - count_delivered0 + - item0.count_delivered; - }); - that.AVGOktongbi = Math.round( - ((count_ok - count_ok0) / count_ok0) * - 100 - ); - that.AVGDelivertongbi = Math.round( - ((count_delivered - count_delivered0) / - count_delivered0) * - 100 - ); - } - }); - } - }); - }, - 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; } + that.monthPayNum6 = sum6; }); }, getProductStatistic() { @@ -967,13 +835,17 @@ 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: "", + group_bys_material_name: "", + order_bys_material_name: "", + select_cols_material_name: "" }, }; - that.$API.bi.dataset.exec - .req("productStatistic", obj) - .then((res) => { - console.log("productStatistic:", res); + that.$API.bi.dataset.exec.req("lineDay", obj).then((res) => { + console.log("lineDay本月数据:", res); let list = res.data2.ds0; let chartData = [], xAxisData = [], @@ -990,17 +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() { @@ -1022,6 +891,7 @@ export default { box-sizing: border-box; position: relative; background: #ffffff; + padding-top: 20px; } .Retangle_container { display: flex; @@ -1079,7 +949,7 @@ export default { } .countItem { - width: 20%; + width: 33.33%; padding-left: 24px; display: inline-block; box-sizing: border-box; @@ -1116,7 +986,7 @@ export default { } .middleRetangle { - border-radius: 2px; + // border-radius: 2px; position: relative; box-sizing: border-box; } diff --git a/src/views/inm/good_mio.vue b/src/views/inm/good_mio.vue index 904fee4f..d92829ee 100644 --- a/src/views/inm/good_mio.vue +++ b/src/views/inm/good_mio.vue @@ -125,6 +125,15 @@ > 撤销 + + 撤销 + - - + - + - - - + + - + - + - + - + - - + + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + @@ -327,7 +323,7 @@ @@ -362,96 +358,101 @@ - - + + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + + + + @@ -459,6 +460,11 @@ {{ scope.row.data.六车间生产入库_count }} + + + - - - - + - + + + + + + + + + + @@ -529,16 +545,15 @@ export default { data() { return { params: { - ordering:'-last_time,-first_time', - material_start__cate:'棒', - last_time_isnull:false, + ordering:'-data__棒料成型_小日期', + querys : [[{field:"data__has_key",compare:"",value:"棒料成型_日期"}]] }, query:{ batch__contains:'', last_time__gte:'', last_time__lte:'', }, - apiObj: this.$API.wpm.batchst, + apiObj: this.$API.wpm.batchstquery, options:[], tableData:[], }; @@ -546,33 +561,25 @@ export default { methods: { handleQuery(){ let that = this; - let querys = [],arr1=[],arr2=[]; + let querys = [[{field:"data__has_key",compare:"",value:"棒料成型_日期"}],]; let obj = {},obj1 = {},obj2 = {}; obj.field = 'batch__contains'; obj.value = that.query.batch__contains; obj.compare = ''; - obj1.field = 'last_time__gte'; + obj1.field = 'last_time'; obj1.value = that.query.last_time__gte; obj1.compare = 'gte'; - obj2.field = 'last_time__lte'; + obj2.field = 'last_time'; obj2.value = that.query.last_time__lte; obj2.compare = 'lte'; - if((that.query.last_time__gte==''||that.query.last_time__gte==null)&&(that.query.last_time__lte==''||that.query.last_time__lte==null)&&that.query.batch__contains!==''&&that.query.batch__contains!==null){ - querys.push(obj); + if(that.query.batch__contains!==''&&that.query.batch__contains!==null){ + querys[0].push(obj); } if(that.query.last_time__gte!==''&&that.query.last_time__gte!==null){ - arr1.push(obj1); - if(that.query.batch__contains!==''&&that.query.batch__contains!==null){ - arr1.push(obj); - } - querys.push(arr1) + querys[0].push(obj1); } if(that.query.last_time__lte!==''&&that.query.last_time__lte!==null){ - arr2.push(obj2); - if(that.query.batch__contains!==''&&that.query.batch__contains!==null){ - arr2.push(obj); - } - querys.push(arr2) + querys[0].push(obj2); } let params = {}; params.querys = querys; diff --git a/src/views/statistics/statistics_guan.vue b/src/views/statistics/statistics_guan.vue index ab146571..919bf23e 100644 --- a/src/views/statistics/statistics_guan.vue +++ b/src/views/statistics/statistics_guan.vue @@ -43,7 +43,7 @@ ref="table" :apiObj="apiObj" :params="params" - :query="query" + :query="params" id="exportDiv" stripe > @@ -67,7 +67,7 @@ @@ -129,12 +129,12 @@ @@ -188,81 +188,6 @@ - - - + + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + @@ -469,7 +394,7 @@ @@ -536,12 +461,12 @@ @@ -577,9 +502,19 @@ + + + + + + @@ -591,9 +526,8 @@ export default { data() { return { params: { - ordering:'-last_time', - material_start__cate:'管', - last_time_isnull:false, + ordering:'-data__管料成型_小日期', + querys : [[{field:"data__has_key",compare:"",value:"管料成型_日期"}],[{field:"data__has_key",compare:"",value:"管料退火_日期"}]] }, query:{ batch__contains:'', @@ -601,7 +535,7 @@ export default { last_time__lte:'', }, - apiObj: this.$API.wpm.batchst, + apiObj: this.$API.wpm.batchstquery, options:[], tableData:[], }; @@ -609,33 +543,28 @@ export default { methods: { handleQuery(){ let that = this; - let querys = [],arr1=[],arr2=[]; + let querys = [[{field:"data__has_key",compare:"",value:"管料成型_日期"}],[{field:"data__has_key",compare:"",value:"管料退火_日期"}]]; let obj = {},obj1 = {},obj2 = {}; obj.field = 'batch__contains'; obj.value = that.query.batch__contains; obj.compare = ''; - obj1.field = 'last_time__gte'; + obj1.field = 'last_time'; obj1.value = that.query.last_time__gte; obj1.compare = 'gte'; - obj2.field = 'last_time__lte'; + obj2.field = 'last_time'; obj2.value = that.query.last_time__lte; obj2.compare = 'lte'; - if((that.query.last_time__gte==''||that.query.last_time__gte==null)&&(that.query.last_time__lte==''||that.query.last_time__lte==null)&&that.query.batch__contains!==''&&that.query.batch__contains!==null){ - querys.push(obj); + if(that.query.batch__contains!==''&&that.query.batch__contains!==null){ + querys[0].push(obj); + querys[1].push(obj); } if(that.query.last_time__gte!==''&&that.query.last_time__gte!==null){ - arr1.push(obj1); - if(that.query.batch__contains!==''&&that.query.batch__contains!==null){ - arr1.push(obj); - } - querys.push(arr1) + querys[0].push(obj1); + querys[1].push(obj1); } if(that.query.last_time__lte!==''&&that.query.last_time__lte!==null){ - arr2.push(obj2); - if(that.query.batch__contains!==''&&that.query.batch__contains!==null){ - arr2.push(obj); - } - querys.push(arr2) + querys[0].push(obj2); + querys[1].push(obj2); } let params = {}; params.querys = querys; diff --git a/src/views/wpm/mlog6_form.vue b/src/views/wpm/mlog6_form.vue index 16aa1941..364abe04 100644 --- a/src/views/wpm/mlog6_form.vue +++ b/src/views/wpm/mlog6_form.vue @@ -482,6 +482,21 @@ + + + + + + + + + + + + + + + + + +