diff --git a/src/views/modules/yieldReport/otherReport/fqc_produce_report_normal.vue b/src/views/modules/yieldReport/otherReport/fqc_produce_report_normal.vue index ab1496e..41e7497 100644 --- a/src/views/modules/yieldReport/otherReport/fqc_produce_report_normal.vue +++ b/src/views/modules/yieldReport/otherReport/fqc_produce_report_normal.vue @@ -62,6 +62,7 @@ 扫描卷 @@ -94,6 +95,7 @@ 创建分卷 @@ -207,6 +209,8 @@ height="200" :data="sfdcDefectList" border + show-summary + :summary-method="sfdcDefectListSummaries" v-loading="dataListLoading" style="width: 100%;"> 批量直接送检 @@ -312,6 +319,7 @@ 其它操作 @@ -2233,7 +2241,7 @@ export default { headerAlign: "center", align: "center", columnLabel: "序号", - columnWidth: 35, + columnWidth: 50, columnHidden: false, columnImage: false, columnSortable: false, @@ -2251,7 +2259,7 @@ export default { headerAlign: "center", align: "center", columnLabel: "卷号", - columnWidth: 150, + columnWidth: 200, columnHidden: false, columnImage: false, columnSortable: false, @@ -2736,7 +2744,10 @@ export default { defectFlag: false, produceToolFlag: false, materialFlag: false, - downTimeFlag: false + downTimeFlag: false, + scannerRollFlag:false, + otherFlag:false, + bulkInspectionFlag:false }, dataListLoading: false, createRoll: { @@ -2798,6 +2809,60 @@ export default { notOverFinishRoll, /*未结生产订单下机*/ }, methods: { + // 不良记录 + sfdcDefectListSummaries(param){ + const { columns, data } = param; + const sums = []; + columns.forEach((column, index) => { + + if (index == 4){ + const values = data.map(item => Number(item[column.property])); + if (!values.every(value => isNaN(value))) { + sums[index] = values.reduce((prev, curr) => { + const value = Number(curr); + if (!isNaN(value)) { + return prev + curr; + } else { + return prev; + } + }, 0); + sums[index] ; + } + sums[index]+= sums[index]?sums[index]:0 + } + + }); + return sums; + }, + // 机器下机卷 + sfdcRollListSummaries(param){ + const { columns, data } = param; + const sums = []; + columns.forEach((column, index) => { + if (index === 0) { + sums[index] = '下机卷总数:'; + return; + } + if (index == 14){ + let list = data.filter(item => item.virtualRollFlag!='Y' && item.rollType !='删除卷') + const values = list.map(item => Number(item[column.property])); + let sum = 0 + if (!values.every(value => isNaN(value))) { + sum = values.reduce((prev, curr) => { + const value = Number(curr); + if (!isNaN(value)) { + return prev + curr; + } else { + return prev; + } + }, 0); + + } + sums[0]+= sum?sum:0 + } + }); + return sums; + }, // 异常下机报工 notOverFinishRollModal() { this.popoverFlag = false @@ -3074,9 +3139,16 @@ export default { this.buttonTags.toolFlag = true; this.buttonTags.materialFlag = true; this.buttonTags.downTimeFlag = true; + this.buttonTags.scannerRollFlag = true; + this.buttonTags.mergeRollFlag = true; + this.buttonTags.otherFlag = true; + this.buttonTags.bulkInspectionFlag = true; } else { //存在人员既可以合并卷 + this.buttonTags.otherFlag = false; + this.buttonTags.bulkInspectionFlag = false; this.buttonTags.mergeRollFlag = false; + this.buttonTags.createNewRollFlag = false; //刷新其他的菜单 await refreshWorkPlatformButtons(this.scheduleData).then(({data}) => { if (data.resultMap.createNewRollFlag == 'Y') { diff --git a/src/views/modules/yieldReport/otherReport/fqc_split_roll_report.vue b/src/views/modules/yieldReport/otherReport/fqc_split_roll_report.vue index d14d75d..09d38de 100644 --- a/src/views/modules/yieldReport/otherReport/fqc_split_roll_report.vue +++ b/src/views/modules/yieldReport/otherReport/fqc_split_roll_report.vue @@ -61,6 +61,7 @@ 扫描卷 @@ -93,6 +94,7 @@ 创建分卷 @@ -167,6 +169,8 @@ height="250" :data="sfdcRollList" border + show-summary + :summary-method="sfdcRollListSummaries" v-loading="dataListLoading" style="width: 100%;"> { + if (index === 0) { + sums[index] = '下机卷总数:'; + return; + } + if (index == 14){ + let list = data.filter(item => item.virtualRollFlag!='Y' && item.rollType !='删除卷') + const values = list.map(item => Number(item[column.property])); + let sum = 0 + if (!values.every(value => isNaN(value))) { + sum = values.reduce((prev, curr) => { + const value = Number(curr); + if (!isNaN(value)) { + return prev + curr; + } else { + return prev; + } + }, 0); + } + sums[0]+= sum?sum:0 + } + }); + return sums; + }, // 批量直接送检 bulkInspection(){ this.scheduleData.operatorId = this.operatorData.operatorId @@ -2947,9 +2982,12 @@ export default { this.buttonTags.toolFlag = true; this.buttonTags.materialFlag = true; this.buttonTags.downTimeFlag = true; + this.buttonTags.scannerRollFlag = true; } else { //存在人员既可以合并卷 this.buttonTags.mergeRollFlag = false; + this.buttonTags.scannerRollFlag = false; + this.buttonTags.createNewRollFlag = false; //刷新其他的菜单 await refreshWorkPlatformButtons(this.scheduleData).then(({data}) => { if (data.resultMap.createNewRollFlag == 'Y') { diff --git a/src/views/modules/yieldReport/otherReport/rework_inspect_report.vue b/src/views/modules/yieldReport/otherReport/rework_inspect_report.vue index f4b3f3d..d7f5c84 100644 --- a/src/views/modules/yieldReport/otherReport/rework_inspect_report.vue +++ b/src/views/modules/yieldReport/otherReport/rework_inspect_report.vue @@ -61,6 +61,7 @@ 扫描卷 @@ -93,6 +94,7 @@ 创建分卷 @@ -206,6 +208,8 @@ height="200" :data="sfdcDefectList" border + show-summary + :summary-method="sfdcDefectListSummaries" v-loading="dataListLoading" style="width: 100%;"> 批量直接送检 @@ -311,6 +318,7 @@ 其它操作 @@ -2737,7 +2745,10 @@ export default { defectFlag: false, produceToolFlag: false, materialFlag: false, - downTimeFlag: false + downTimeFlag: false, + scannerRollFlag:false, + otherFlag:false, + bulkInspectionFlag:false }, dataListLoading: false, createRoll: { @@ -2799,6 +2810,60 @@ export default { notOverFinishRoll }, methods: { + // 不良记录 + sfdcDefectListSummaries(param){ + const { columns, data } = param; + const sums = []; + columns.forEach((column, index) => { + + if (index == 4){ + const values = data.map(item => Number(item[column.property])); + if (!values.every(value => isNaN(value))) { + sums[index] = values.reduce((prev, curr) => { + const value = Number(curr); + if (!isNaN(value)) { + return prev + curr; + } else { + return prev; + } + }, 0); + sums[index] ; + } + sums[index]+= sums[index]?sums[index]:0 + } + + }); + return sums; + }, + // 机器下机卷 + sfdcRollListSummaries(param){ + const { columns, data } = param; + const sums = []; + columns.forEach((column, index) => { + if (index === 0) { + sums[index] = '下机卷总数:'; + return; + } + if (index == 14){ + let list = data.filter(item => item.virtualRollFlag!='Y' && item.rollType !='删除卷') + const values = list.map(item => Number(item[column.property])); + let sum = 0 + if (!values.every(value => isNaN(value))) { + sum = values.reduce((prev, curr) => { + const value = Number(curr); + if (!isNaN(value)) { + return prev + curr; + } else { + return prev; + } + }, 0); + + } + sums[0]+= sum?sum:0 + } + }); + return sums; + }, // 异常下机报工 notOverFinishRollModal() { this.popoverFlag = false @@ -3062,6 +3127,7 @@ export default { async refreshPageButtons() { //判断是否存在人员 if (this.operatorData.operatorId == null || this.operatorData.operatorId == '') { + this.buttonTags.createNewRollFlag = true; this.buttonTags.switchRollFlag = true; this.buttonTags.separateRollFlag = true; @@ -3072,9 +3138,16 @@ export default { this.buttonTags.toolFlag = true; this.buttonTags.materialFlag = true; this.buttonTags.downTimeFlag = true; + this.buttonTags.scannerRollFlag = true; + this.buttonTags.mergeRollFlag = true; + this.buttonTags.otherFlag = true; + this.buttonTags.bulkInspectionFlag = true; } else { //存在人员既可以合并卷 this.buttonTags.mergeRollFlag = false; + this.buttonTags.otherFlag = false; + this.buttonTags.bulkInspectionFlag = false; + this.buttonTags.createNewRollFlag = false; //刷新其他的菜单 await refreshWorkPlatformButtons(this.scheduleData).then(({data}) => { if (data.resultMap.createNewRollFlag == 'Y') {