diff --git a/src/views/qualityManagement/FQC/qualityStatistics.vue b/src/views/qualityManagement/FQC/qualityStatistics.vue index 3e68cd4..278a8e4 100644 --- a/src/views/qualityManagement/FQC/qualityStatistics.vue +++ b/src/views/qualityManagement/FQC/qualityStatistics.vue @@ -34,8 +34,9 @@ 搜索 - EXCEL导出 - 导出全部记录 + 日生产报表导出 + 缺陷详情导出 + @@ -254,6 +255,9 @@ // { row: 0, col: 10, rowspan: 3, colspan: 0 }, // { row: 0, col: 11, rowspan: 3, colspan: 0 }, ], + hiddenCells: [], + // 列表对照表 + tableCellDict: [], // 右键菜单 tableMenu: { header: { @@ -289,19 +293,16 @@ mergeTable(num) { this.mergeCells = [] for (let i = 0; i < this.QualityStatisticsTable.length; i = i + num) { - this.mergeCells.push({ row: i, col: 0, rowspan: num, colspan: 0 }) - this.mergeCells.push({ row: i, col: 1, rowspan: num, colspan: 0 }) - this.mergeCells.push({ row: i, col: 2, rowspan: num, colspan: 0 }) - this.mergeCells.push({ row: i, col: 3, rowspan: num, colspan: 0 }) - this.mergeCells.push({ row: i, col: 4, rowspan: num, colspan: 0 }) - this.mergeCells.push({ row: i, col: 5, rowspan: num, colspan: 0 }) - this.mergeCells.push({ row: i, col: 6, rowspan: num, colspan: 0 }) - this.mergeCells.push({ row: i, col: 7, rowspan: num, colspan: 0 }) - this.mergeCells.push({ row: i, col: 8, rowspan: num, colspan: 0 }) - this.mergeCells.push({ row: i, col: 9, rowspan: num, colspan: 0 }) - this.mergeCells.push({ row: i, col: 10, rowspan: num, colspan: 0 }) - this.mergeCells.push({ row: i, col: 11, rowspan: num, colspan: 0 }) - this.mergeCells.push({ row: i, col: 12, rowspan: num, colspan: 0 }) + let count = 13 - this.hiddenCells.length; + for (let j = 0; j < count; j++) { + this.mergeCells.push({ row: i, col: j, rowspan: num, colspan: 0 }) + } + // if(this.hiddenCells.includes('工单号')){ + + // } + // this.mergeCells.push({ row: i, col: 10, rowspan: num, colspan: 0 }) + // this.mergeCells.push({ row: i, col: 11, rowspan: num, colspan: 0 }) + // this.mergeCells.push({ row: i, col: 12, rowspan: num, colspan: 0 }) } }, @@ -386,11 +387,11 @@ this.$refs.xTable.openExport() }, // 导出全部数据 - exportAllDataEvent() { + exportAllDataEvent(isShowDetail = false) { let data = { ...this.search, ...this.pagination }; data.type = this.search.reportType + 1; - data.isShowDetail = false; - let fileName = this.reportType_options[this.search.reportType].label + '.xlsx'; + data.isShowDetail = isShowDetail; + let fileName = this.reportType_options[this.search.reportType].label + (isShowDetail ? '-缺陷详情' : '-日生产报表') + '.xlsx'; downloadStatisticsTableExcel(data).then(res => { console.log(res); let blobURL = URL.createObjectURL(res.data) @@ -428,10 +429,10 @@ const $table = this.$refs.xTable switch (menu.code) { case 'hideColumn': - $table.hideColumn(column) + this.hideColumn(column); break case 'showAllColumn': - $table.resetColumn() + this.resetColumn() break case 'remove': this.removeData(row) @@ -441,6 +442,28 @@ break } }, + // 隐藏列 + hideColumn(column) { + const $table = this.$refs.xTable; + $table.hideColumn(column); + this.hiddenCells.push(column.title); + this.resetMergeTable(); + }, + // 取消所有隐藏列 + resetColumn() { + const $table = this.$refs.xTable; + this.hiddenCells = []; + $table.resetColumn(); + this.resetMergeTable(); + }, + resetMergeTable(){ + if(this.search.reportType === 3){ + this.mergeTable(2); + }else{ + this.mergeTable(3); + } + + }, // 删除数据 removeData(row) { this.$confirm('此操作将永久删除该条记录, 是否继续?', '提示', { diff --git a/src/views/wmsManagement/WmBlankInventory.vue b/src/views/wmsManagement/WmBlankInventory.vue index 6fd9c53..dfbd1ef 100644 --- a/src/views/wmsManagement/WmBlankInventory.vue +++ b/src/views/wmsManagement/WmBlankInventory.vue @@ -85,7 +85,7 @@ - + diff --git a/src/views/wmsManagement/WmCheckLog.vue b/src/views/wmsManagement/WmCheckLog.vue index 3c41888..71c32ad 100644 --- a/src/views/wmsManagement/WmCheckLog.vue +++ b/src/views/wmsManagement/WmCheckLog.vue @@ -64,7 +64,7 @@ - + diff --git a/src/views/wmsManagement/WmCustom.vue b/src/views/wmsManagement/WmCustom.vue index 5e3e9f5..95a80de 100644 --- a/src/views/wmsManagement/WmCustom.vue +++ b/src/views/wmsManagement/WmCustom.vue @@ -112,7 +112,7 @@ /> - + diff --git a/src/views/wmsManagement/WmFgentryInspect.vue b/src/views/wmsManagement/WmFgentryInspect.vue index b8e0103..5a1db54 100644 --- a/src/views/wmsManagement/WmFgentryInspect.vue +++ b/src/views/wmsManagement/WmFgentryInspect.vue @@ -85,7 +85,7 @@ /> - + diff --git a/src/views/wmsManagement/WmGoodsChangeLog.vue b/src/views/wmsManagement/WmGoodsChangeLog.vue index a6b52f0..48300ec 100644 --- a/src/views/wmsManagement/WmGoodsChangeLog.vue +++ b/src/views/wmsManagement/WmGoodsChangeLog.vue @@ -66,7 +66,7 @@ - + diff --git a/src/views/wmsManagement/WmMaterial.vue b/src/views/wmsManagement/WmMaterial.vue index a6b0734..19b6cd3 100644 --- a/src/views/wmsManagement/WmMaterial.vue +++ b/src/views/wmsManagement/WmMaterial.vue @@ -7,587 +7,520 @@ * @LastEditTime: (2024-03-16) --> + this.getList() + }, + }, + } + \ No newline at end of file diff --git a/src/views/wmsManagement/WmOutOrder.vue b/src/views/wmsManagement/WmOutOrder.vue index 378623e..17e1472 100644 --- a/src/views/wmsManagement/WmOutOrder.vue +++ b/src/views/wmsManagement/WmOutOrder.vue @@ -85,7 +85,7 @@ - + diff --git a/src/views/wmsManagement/WmpatchSearch.vue b/src/views/wmsManagement/WmpatchSearch.vue index a934e69..a52ad34 100644 --- a/src/views/wmsManagement/WmpatchSearch.vue +++ b/src/views/wmsManagement/WmpatchSearch.vue @@ -1,7 +1,7 @@