diff --git a/src/views/mes/prepare/index.vue b/src/views/mes/prepare/index.vue index f1e23b5..25bace1 100644 --- a/src/views/mes/prepare/index.vue +++ b/src/views/mes/prepare/index.vue @@ -313,7 +313,7 @@ export default { data() { return { fenyeNumber:5, - fenyeNumberTwo:7, + fenyeNumberTwo:5, shengchan:true, newWorkerLoading: false, refreshNewWorkerTable:true, diff --git a/src/views/quality/cpkUpDowConfig/index.vue b/src/views/quality/cpkUpDowConfig/index.vue index f983431..62d7b34 100644 --- a/src/views/quality/cpkUpDowConfig/index.vue +++ b/src/views/quality/cpkUpDowConfig/index.vue @@ -262,7 +262,7 @@ import {listCpkUpdown,getCpkUpdown, delCpkUpdown,addCpkUpdown,updateCpkUpdown } import ItemSelectMaterial from "@/views/quality/cpkUpDowConfig/selectMaterial"; import {getCheckTypeList,getProjectOptionList} from "@/api/quality/qcTable"; export default { - name: "Updown", + name: "CpkUpDowConfig", dicts: ["check_type","qms_category"], components: {ItemSelectMaterial}, data() { diff --git a/src/views/quality/incomeReport/index.vue b/src/views/quality/incomeReport/index.vue index 619d7e1..fb71aa7 100644 --- a/src/views/quality/incomeReport/index.vue +++ b/src/views/quality/incomeReport/index.vue @@ -68,7 +68,6 @@ - @@ -143,91 +142,29 @@ 编码:{{form.fileNo}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + {{form.factoryCode}} + {{form.incomeBatchNo}} + {{form.checkNo}} - - - - {{ parseTime(form.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }} - - - - - - - {{ parseTime(form.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }} - - - - + {{form.materialName}} + {{form.materialCode}} + {{form.supplierName}} + + {{form.supplierCode}} + {{form.quality}} + {{form.unit}} + + {{form.checkType}} + {{form.standardNo}} + {{ parseTime(form.createTime, '{y}-{m}-{d}') }} + + + - - + @@ -304,7 +241,7 @@ import { getCheckTypes } from "@/api/quality/qcProduce"; import { getDefectTypeListByDefectType } from "@/api/quality/defectType.js"; import moment from 'moment'; export default { - name: "Income", + name: "IncomeReport", dicts: ["unit","check_status","check_result"], data() { return { @@ -376,7 +313,27 @@ export default { }, // 表单参数 form: {checkedValues:[]}, + spanArr: [], + position: 0, checkTypes:[], + labelStyle: { + 'min-width': '100px', + 'word-break': 'keep-all' + }, + content_style: { + 'text-align': 'center', + 'min-width': '200px', + 'word-break': 'break-all' + }, + label_style: { + 'color': '#000', + 'text-align': 'center', + 'font-weight': '600', + 'height': '40px', + 'background-color': '#d6dbe1', + 'min-width': '100px', + 'word-break': 'keep-all' + }, // 表单校验 rules: { /* incomeBatchNo: [ @@ -470,6 +427,8 @@ export default { delFlag: null, checkedValues:[], }; + this.spanArr = []; + this.position = 0; this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -558,6 +517,8 @@ export default { this.checkProjectList = response.rows; this.total = response.total; this.loading = false; + + this.rowspan() }); }, // 打印预览-浏览器打印 @@ -584,7 +545,54 @@ export default { getCodeValue(defectCode) { const foundDefect = this.defectList.find(defect => defect.defectCode === defectCode); return foundDefect.defectSubclass; - } + }, + /** + * 1. 若是objectSpanMethod不返回任何东西,表格不会变化 + * 2. 最外层的判断一般是,先从第几列开始合并 + * 3. 这次从第0行合并2个,下次就要从第3行开始合并(0行加俩,就到3行了) + * 4. 这种方式是有多少条数据,合并多少条数据,比如本案例中有7条数据(从第0条合并到第7条) + * 5. return { rowspan: 0, colspan: 0 } // 表示不合并 + * */ + rowspan() { + + this.checkProjectList.forEach((item, index) => { + if (index === 0) { + this.spanArr.push(1); + this.position = 0; + } else { + if ( + this.checkProjectList[index].projectRuleName === + this.checkProjectList[index - 1].projectRuleName + ) { + this.spanArr[this.position] += 1; + this.spanArr.push(0); + } else { + this.spanArr.push(1); + this.position = index; + } + } + }); + }, + objectSpanMethod({ row, column, rowIndex, columnIndex }) { + /** + if (columnIndex === 0) { + const _row = this.spanArr[rowIndex]; + const _col = _row > 0 ? 1 : 0; + return { + rowspan: _row, + colspan: _col, + }; + } + **/ + if (columnIndex === 1) { + const _row = this.spanArr[rowIndex]; + const _col = _row > 0 ? 1 : 0; + return { + rowspan: _row, + colspan: _col, + }; + } + } } }; @@ -601,4 +609,17 @@ export default { margin-left: 15px; height: 38px; } +.my-description-item1 { + width: 280px; /* 或者你想要的任何宽度 */ +} +.my-description-item2 { + width: 120px; /* 或者你想要的任何宽度 */ +} +.my-description-item3 { + width: 80px; /* 或者你想要的任何宽度 */ +} +.border-row { + border: 1px solid #d3dce6; /* 边框颜色可以根据需要自定义 */ + text-align:center; +} diff --git a/src/views/quality/inventoryReport/index.vue b/src/views/quality/inventoryReport/index.vue index a759a13..ec84e38 100644 --- a/src/views/quality/inventoryReport/index.vue +++ b/src/views/quality/inventoryReport/index.vue @@ -151,95 +151,29 @@ 编码:{{form.fileNo}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ parseTime(form.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }} - - - - - - - {{ parseTime(form.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }} - - - - + + {{form.factoryCode}} + {{form.incomeBatchNo}} + {{form.checkNo}} + + {{form.materialName}} + {{form.materialCode}} + {{form.supplierName}} + + {{form.supplierCode}} + {{form.quality}} + {{form.unit}} + + {{form.standardNo}} + {{ parseTime(form.createTime, '{y}-{m}-{d}') }} + {{ parseTime(form.checkTime, '{y}-{m}-{d}') }} + - - + + @@ -389,6 +323,22 @@ export default { // 表单参数 form: {}, checkTypes:[], + content_style: { + 'text-align': 'center', + 'min-width': '200px', + 'word-break': 'break-all' + }, + label_style: { + 'color': '#000', + 'text-align': 'center', + 'font-weight': '600', + 'height': '40px', + 'background-color': '#d6dbe1', + 'min-width': '100px', + 'word-break': 'keep-all' + }, + spanArr: [], + position: 0, // 表单校验 rules: { /* incomeBatchNo: [ @@ -479,6 +429,8 @@ export default { delFlag: null, }; + this.spanArr = []; + this.position = 0; this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -549,9 +501,9 @@ export default { }, /** 导出按钮操作 */ handleExport() { - this.download('quality/qcInventory/export', { + this.download('quality/qcInventoryReport/export', { ...this.queryParams - }, `inventory_${new Date().getTime()}.xlsx`) + }, `inventoryReport_${new Date().getTime()}.xlsx`) }, /**获取检验项目列表 */ getCheckedProjectList(){ @@ -560,6 +512,8 @@ export default { this.checkProjectList = response.rows; this.total = response.total; this.loading = false; + + this.rowspan() }); }, // 打印预览-浏览器打印 @@ -586,7 +540,53 @@ export default { getCodeValue(defectCode) { const foundDefect = this.defectList.find(defect => defect.defectCode === defectCode); return foundDefect.defectSubclass; - } + }, + /** + * 1. 若是objectSpanMethod不返回任何东西,表格不会变化 + * 2. 最外层的判断一般是,先从第几列开始合并 + * 3. 这次从第0行合并2个,下次就要从第3行开始合并(0行加俩,就到3行了) + * 4. 这种方式是有多少条数据,合并多少条数据,比如本案例中有7条数据(从第0条合并到第7条) + * 5. return { rowspan: 0, colspan: 0 } // 表示不合并 + * */ + rowspan() { + this.checkProjectList.forEach((item, index) => { + if (index === 0) { + this.spanArr.push(1); + this.position = 0; + } else { + if ( + this.checkProjectList[index].projectRuleName === + this.checkProjectList[index - 1].projectRuleName + ) { + this.spanArr[this.position] += 1; + this.spanArr.push(0); + } else { + this.spanArr.push(1); + this.position = index; + } + } + }); + }, + objectSpanMethod({ row, column, rowIndex, columnIndex }) { + /** + if (columnIndex === 0) { + const _row = this.spanArr[rowIndex]; + const _col = _row > 0 ? 1 : 0; + return { + rowspan: _row, + colspan: _col, + }; + } + **/ + if (columnIndex === 1) { + const _row = this.spanArr[rowIndex]; + const _col = _row > 0 ? 1 : 0; + return { + rowspan: _row, + colspan: _col, + }; + } + } } }; @@ -603,4 +603,18 @@ export default { margin-left: 15px; height: 38px; } + +.my-description-item1 { + width: 280px; /* 或者你想要的任何宽度 */ +} +.my-description-item2 { + width: 120px; /* 或者你想要的任何宽度 */ +} +.my-description-item3 { + width: 80px; /* 或者你想要的任何宽度 */ +} +.border-row { + border: 1px solid #d3dce6; /* 边框颜色可以根据需要自定义 */ + text-align:center; +} diff --git a/src/views/quality/produceReport/index.vue b/src/views/quality/produceReport/index.vue index efc19f8..4c7aaf2 100644 --- a/src/views/quality/produceReport/index.vue +++ b/src/views/quality/produceReport/index.vue @@ -632,7 +632,7 @@ - + @@ -734,7 +734,7 @@ import ItemCheckProjects from "./ItemCheckProjects.vue"; import ItemCheckProjectsXJ from "./ItemCheckProjectsXJ.vue"; import moment from 'moment'; export default { - name: "Income", + name: "ProduceReport", components: {ItemCheckProjects,ItemCheckProjectsXJ}, dicts: ["unit","check_status","check_result","qc_rule_prop","device_yes_no"], data() { @@ -1061,9 +1061,9 @@ export default { }, /** 导出按钮操作 */ handleExport() { - this.download('quality/qcIncome/export', { + this.download('quality/qcProduceReport/export', { ...this.queryParams - }, `produce_${new Date().getTime()}.xlsx`) + }, `produceReport_${new Date().getTime()}.xlsx`) }, /**获取检验项目列表 */ getCheckedProjectList(){ diff --git a/src/views/quality/productReport/index.vue b/src/views/quality/productReport/index.vue index 0f6e796..5aeacf3 100644 --- a/src/views/quality/productReport/index.vue +++ b/src/views/quality/productReport/index.vue @@ -258,7 +258,7 @@ import { getCheckTypes } from "@/api/quality/qcProduce"; import { getDefectTypeListByDefectType } from "@/api/quality/defectType.js"; import moment from 'moment'; export default { - name: "Income", + name: "ProductReport", dicts: ["unit","check_status","check_result"], data() { return { @@ -523,9 +523,9 @@ export default { }, /** 导出按钮操作 */ handleExport() { - this.download('quality/qcIncome/export', { + this.download('quality/qcProductReport/export', { ...this.queryParams - }, `income_${new Date().getTime()}.xlsx`) + }, `ProductReport_${new Date().getTime()}.xlsx`) }, /**获取检验项目列表 */ getCheckedProjectList(){ diff --git a/src/views/quality/qcInventory/selectPutInOrder.vue b/src/views/quality/qcInventory/selectPutInOrder.vue index e237ca7..a955893 100644 --- a/src/views/quality/qcInventory/selectPutInOrder.vue +++ b/src/views/quality/qcInventory/selectPutInOrder.vue @@ -14,7 +14,7 @@ v-model="queryParams.materialName" placeholder="物料名称" clearable - style="width: 240px" + style="width: 150px" @keyup.enter.native="handleQuery" /> @@ -23,7 +23,16 @@ v-model="queryParams.materialCode" placeholder="物料编码" clearable - style="width: 240px" + style="width: 150px" + @keyup.enter.native="handleQuery" + /> + + + diff --git a/src/views/quality/qcTableCPK/index.vue b/src/views/quality/qcTableCPK/index.vue index db8fb9c..0a2cd88 100644 --- a/src/views/quality/qcTableCPK/index.vue +++ b/src/views/quality/qcTableCPK/index.vue @@ -122,12 +122,15 @@ 导出 - + + + + diff --git a/src/views/quality/qcTableIncome/index.vue b/src/views/quality/qcTableIncome/index.vue index faeed86..a06637b 100644 --- a/src/views/quality/qcTableIncome/index.vue +++ b/src/views/quality/qcTableIncome/index.vue @@ -353,9 +353,9 @@ export default { }, /** 导出按钮操作 */ handleExport() { - this.download('mes/rfidProcess/export', { + this.download('quality/staticTable/getIncomeTableExport', { ...this.queryParams - }, `rfidProcess_${new Date().getTime()}.xlsx`) + }, `supplier_${new Date().getTime()}.xlsx`) }, /**供应商选择弹出框**/ handleSelectSupplier() { diff --git a/src/views/quality/qcTableXJ/index.vue b/src/views/quality/qcTableXJ/index.vue index 4f30660..a74554c 100644 --- a/src/views/quality/qcTableXJ/index.vue +++ b/src/views/quality/qcTableXJ/index.vue @@ -62,7 +62,7 @@ - + + + @@ -308,7 +310,7 @@ export default { this.ids = selection.map(item => item.prepareId) this.single = selection.length!==1 this.multiple = !selection.length - this.selectPrepare = selection + this.selectPrepare = selection }, /** 新增按钮操作 */ handleAdd() { @@ -366,9 +368,9 @@ export default { }, /** 导出按钮操作 */ handleExport() { - this.download('mes/prepare/export', { + this.download('quality/staticTable/getXJCheckExport', { ...this.queryParams - }, `prepare_${new Date().getTime()}.xlsx`) + }, `xjReport_${new Date().getTime()}.xlsx`) } } };