diff --git a/src/views/statistics/batch_statistics.vue b/src/views/statistics/batch_statistics.vue index 6680d21b..03b9b871 100644 --- a/src/views/statistics/batch_statistics.vue +++ b/src/views/statistics/batch_statistics.vue @@ -163,6 +163,7 @@ 返工 报废 改版 + 退料 diff --git a/src/views/statistics/check_record_gx.vue b/src/views/statistics/check_record_gx.vue index b545dfcb..0f1fc58c 100644 --- a/src/views/statistics/check_record_gx.vue +++ b/src/views/statistics/check_record_gx.vue @@ -120,7 +120,7 @@ - + diff --git a/src/views/statistics/good_check_gx.vue b/src/views/statistics/good_check_gx.vue index 4b2ba9b9..7d53af0d 100644 --- a/src/views/statistics/good_check_gx.vue +++ b/src/views/statistics/good_check_gx.vue @@ -2,187 +2,642 @@
- - - - - - - + - + clearable + style="width: 160px; margin: 5px" + > + + + + + + 导出
- 导出
- - - - - - - - + diff --git a/src/views/statistics/good_check_gx2.vue b/src/views/statistics/good_check_gx2.vue new file mode 100644 index 00000000..540ab056 --- /dev/null +++ b/src/views/statistics/good_check_gx2.vue @@ -0,0 +1,551 @@ + + + + + diff --git a/src/views/statistics/pass_num_gx.vue b/src/views/statistics/pass_num_gx.vue index cf15610e..218b3ddb 100644 --- a/src/views/statistics/pass_num_gx.vue +++ b/src/views/statistics/pass_num_gx.vue @@ -2,16 +2,6 @@
- - - - - - - - + - - - - - - - - - - - - - + + + + + + + @@ -107,39 +85,39 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -163,43 +141,27 @@ > - - - - - - - - + - - - - - - - - - - - - - + + + + + + @@ -227,39 +189,23 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + @@ -287,39 +233,33 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -347,39 +287,24 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + @@ -407,39 +332,32 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -467,39 +385,32 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -527,39 +438,32 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -587,39 +491,37 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -647,39 +549,36 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + @@ -707,39 +606,39 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -767,39 +666,33 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -827,39 +720,32 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -887,39 +773,32 @@ :height="300" > - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -947,39 +826,203 @@ :height="300" > - - - - - - - - + + + + - + + + + + + + + + + + - - - - - - + + + + + + + + + + +
+
+
+ + + 导出 + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + +
+
+
+ + + 导出 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + +
+
+
+ + + 导出 + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1008,32 +1051,29 @@ export default { mgroup_name:'', start_date:'', end_date:'', - group_bys_material: "", - order_bys_material: "", - select_cols_material: "" }, queryDate:'', currentYear: "", currentMonth: "", - nameList: [], + mgroupList: ['外协白片抛', '扫边A', '黑化', '退火', '减薄A', '减薄B', '精雕', '外协出司检', '外协一次抛', '磨抛一次抛', '外扫', '扫边B', '倒角','成品抛', '一次超洗', '尺寸检验', '二次超洗', '外观检验', '三次超洗'], basicOption: { backgroundColor: "transparent", title: { text: "合格数统计", }, + tooltip: { + trigger: "item", + }, + legend: { + top: "3", + right: "3%", + }, grid: { top: "80px", }, tooltip: { trigger: "axis", }, - xAxis: { - type: "category", - data: ["周一","周二","周三","周四","周五","周六","周日"], - }, - yAxis: { - type: "value", - }, lenged: [], series: [], }, @@ -1053,14 +1093,14 @@ export default { tableData13: [], tableData14: [], tableData15: [], + tableData16: [], + tableData17: [], + tableData18: [], options:[], }; }, mounted() { - let that = this; - let nowDate = new Date(); - that.getMgroup(); - // that.getWeekDate(nowDate); + this.getMgroup(); }, methods: { getWeekDate(dates){ @@ -1084,7 +1124,6 @@ export default { dateArr.push(item); } that.weekDateList = dateArr; - // console.log('dateArr',dateArr); that.query.start_date =first.toISOString().split('T')[0]; that.query.end_date =last.toISOString().split('T')[0]; that.options.forEach((item,index)=>{ @@ -1113,7 +1152,11 @@ export default { that.$API.mtm.mgroup.list.req({ page: 0}).then((res) => { let arr = []; res.forEach(item=>{ - arr.push(item.name) + let indexes = that.mgroupList.indexOf(item.name); + if(indexes>-1){ + // that.getDefect(item.id,indexes); + arr[indexes] = item.name; + } }) that.query.mgroup_name = arr[0]; that.options = arr; @@ -1121,6 +1164,16 @@ export default { that.getWeekDate(nowDate); }); }, + // getDefect(id,index){ + // let that = this; + // that.$API.mtm.defect.list.req({ page: 0, mgroup_id: id}).then((res) => { + // let arr = []; + // res.forEach(item=>{ + // arr.push(item.name); + // }) + // that["tableData"+index] = arr; + // }); + // }, getData(mgroup_name,mgroup_index) { let that = this; let option = deepCopy(that.basicOption); @@ -1129,47 +1182,70 @@ export default { option.title.text = mgroup_name+"合格数统计"; let obj = {}; obj.query = query; - that.$API.bi.dataset.exec.req('lineDay_m', obj).then((res) => { + that.$API.bi.dataset.exec.req('lineDay_m3', obj).then((res) => { let tableData = res.data2.ds0 ? res.data2.ds0 : []; let names = 'tableData'+mgroup_index; - that[names] = tableData; + let defectList = []; + let defectObject = {}; + let countOk = 0; if (tableData.length > 0) { - let dataList = [],nameList = [],datas = []; + let chartObj = { + name:mgroup_name, + data: [{name: "合格数",value: 0}], + type: "pie", + radius: ["30%", "65%"], + center: ["40%", "55%"], + label: { + show: true, + position: "outside", + formatter: "{b} : {c} ({d}%)", + }, + }; + //将数据分类 tableData.forEach((ite) => { - if (nameList.indexOf(ite.物料名) > -1) {} else { - nameList.push(ite.物料名); - dataList.push([]) - datas.push([0,0,0,0,0,0,0]); - let obj = { - name:ite.物料名, - data: [], - stack: "Ad", - type: "bar", - barWidth: "15px", - }; - option.series.push(obj) + countOk += ite.合格数; + if(ite.缺陷统计!==null){ + ite.缺陷统计 = JSON.parse(ite.缺陷统计); + for(let key in ite.缺陷统计){ + ite[key] = ite.缺陷统计[key]; + if(defectList.indexOf(key)<0){ + defectList.push(key); + defectObject[key] = ite.缺陷统计[key]; + }else{ + defectObject[key] += ite.缺陷统计[key]; + } + } } }); - that.nameList = nameList; - tableData.forEach((item) => { - let indexX = nameList.indexOf(item.物料名); - dataList[indexX].push(item); - }); - for(let i = 0;i + + +
+ + + + + + + + + + 导出 +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + diff --git a/src/views/statistics/process_statistics_gx.vue b/src/views/statistics/process_statistics_gx.vue new file mode 100644 index 00000000..2b6ee94a --- /dev/null +++ b/src/views/statistics/process_statistics_gx.vue @@ -0,0 +1,886 @@ + + + + diff --git a/src/views/statistics/wpr_statistics.vue b/src/views/statistics/wpr_statistics.vue new file mode 100644 index 00000000..2eb6b32c --- /dev/null +++ b/src/views/statistics/wpr_statistics.vue @@ -0,0 +1,312 @@ + + + +