From 68d3b46bab3fad24fc58d84db41662e032a0d942 Mon Sep 17 00:00:00 2001 From: lb Date: Tue, 28 Nov 2023 09:04:57 +0800 Subject: [PATCH 1/5] update process flow --- .../components/BomSelector.vue | 3 +- .../components/ProcessBomList.vue | 57 +++++++++++-------- .../components/ProcessDetail.vue | 2 +- 3 files changed, 37 insertions(+), 25 deletions(-) diff --git a/src/views/extend/processFlowView/components/BomSelector.vue b/src/views/extend/processFlowView/components/BomSelector.vue index a52be51c..136a06cb 100644 --- a/src/views/extend/processFlowView/components/BomSelector.vue +++ b/src/views/extend/processFlowView/components/BomSelector.vue @@ -19,7 +19,7 @@ - +
@@ -78,6 +78,7 @@
+
; diff --git a/src/views/extend/processFlowView/components/ProcessBomList.vue b/src/views/extend/processFlowView/components/ProcessBomList.vue index e98f32c6..d56eb442 100644 --- a/src/views/extend/processFlowView/components/ProcessBomList.vue +++ b/src/views/extend/processFlowView/components/ProcessBomList.vue @@ -218,34 +218,45 @@ export default { this.total = 0; } + this.selectedBoms = []; // 获取设备及bom列表 this.http('/extend/process-flow-det/getEquipmentDetBySectionId', 'post', { sectionId, flowDetId: detId, - }).then(({ code, data }) => { - if (code == 0) { - this.bomList = data.map((eq) => { - eq.materialsBom = eq.materialsBom || []; - eq.valuesBom = eq.valuesBom || []; - // 设置选中状态 - eq.materialsBom.chosen = eq.materialsBomChoseId ?? null; - eq.valuesBom.chosen = eq.valuesBomChoseId ?? null; - if (eq.equChose || eq.materialsBom.chosen || eq.valuesBom.chosen) { - this.selectedBoms.push({ - equipmentId: eq.id, - equMaterialBomId: eq.materialsBom.chosen, - equValueBomId: eq.valuesBom.chosen, - }); - } - // 设置设备id - eq.materialsBom.equipmentId = eq.id; - eq.valuesBom.equipmentId = eq.id; - return eq; - }); - } else { + }) + .then(({ code, data }) => { + if (code == 0) { + this.bomList = data.map((eq) => { + eq.materialsBom = eq.materialsBom || []; + eq.valuesBom = eq.valuesBom || []; + // 设置选中状态 + eq.materialsBom.chosen = eq.materialsBomChoseId ?? null; + eq.valuesBom.chosen = eq.valuesBomChoseId ?? null; + if ( + eq.equChose || + eq.materialsBom.chosen || + eq.valuesBom.chosen + ) { + this.selectedBoms.push({ + equipmentId: eq.id, + equMaterialBomId: eq.materialsBom.chosen, + equValueBomId: eq.valuesBom.chosen, + }); + } + // 设置设备id + eq.materialsBom.equipmentId = eq.id; + eq.valuesBom.equipmentId = eq.id; + return eq; + }); + } else { + this.bomList.splice(0); + this.selectedBoms = []; + } + }) + .catch((err) => { this.bomList.splice(0); - } - }); + this.selectedBoms = []; + }); }, async handleAddEquipment() { this.open = true; diff --git a/src/views/extend/processFlowView/components/ProcessDetail.vue b/src/views/extend/processFlowView/components/ProcessDetail.vue index 77368267..81d27ce9 100644 --- a/src/views/extend/processFlowView/components/ProcessDetail.vue +++ b/src/views/extend/processFlowView/components/ProcessDetail.vue @@ -34,7 +34,7 @@ class="btn-refresh" @click="handleUpdateLayout" icon="el-icon-refresh"> - 刷新布局 + 保存布局 Date: Tue, 28 Nov 2023 10:54:51 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/quality/processTraceability.js | 10 +- src/views/base/mixins/basic-page.js | 7 +- src/views/base/packagingPrintLog/index.vue | 25 +++- .../equipment/base/alarm/Record/index.vue | 8 +- .../processEquMaterialBom/add-or-updata.vue | 4 +- .../processEquValueBom/add-or-updata.vue | 6 +- .../extend/processEquValueBom/attr-add.vue | 4 +- .../extend/processTraceability/index.vue | 46 ++++--- .../components/ProcessBomList.vue | 38 +++--- .../components/ProcessDetail.vue | 10 +- .../components/ProcessInfo.vue | 21 +-- .../base/qualityInspectionDet/index.vue | 120 +++++++----------- .../base/qualityInspectionType/index.vue | 114 +++++++---------- .../base/qualityScrapType/add-or-updata.vue | 8 +- .../quality/monitoring/currentData/index.vue | 6 +- .../monitoring/materielDateFrom/index.vue | 5 +- .../monitoring/processTraceability/index.vue | 83 ++++++------ .../components/ProcessBomList.vue | 38 +++--- .../components/ProcessDetail.vue | 10 +- .../components/ProcessInfo.vue | 21 +-- .../processTraceabilityDetail/index.vue | 11 +- .../monitoring/statisticalData/index.vue | 7 +- 22 files changed, 315 insertions(+), 287 deletions(-) diff --git a/src/api/quality/processTraceability.js b/src/api/quality/processTraceability.js index d2152584..5faac726 100644 --- a/src/api/quality/processTraceability.js +++ b/src/api/quality/processTraceability.js @@ -1,7 +1,7 @@ /* * @Author: zhp * @Date: 2023-10-31 15:05:06 - * @LastEditTime: 2023-11-03 09:05:50 + * @LastEditTime: 2023-11-28 09:28:05 * @LastEditors: zhp * @Description: */ @@ -24,6 +24,14 @@ export function getWorkOrderList(query) { params: query, }) } + +export function getCoreProduct(id) { + return request({ + url: '/base/core-product/get?id=' + id, + method: 'get' + }) +} + // 导出物料信息 // export function exportEnergyPlcExcel(query) { // return request({ diff --git a/src/views/base/mixins/basic-page.js b/src/views/base/mixins/basic-page.js index b3b14aaa..06c2b851 100644 --- a/src/views/base/mixins/basic-page.js +++ b/src/views/base/mixins/basic-page.js @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2022-08-24 11:19:43 * @LastEditors: zhp - * @LastEditTime: 2023-11-01 10:30:12 + * @LastEditTime: 2023-11-24 09:29:36 * @Description: */ export default { @@ -85,6 +85,7 @@ export default { }, //tableBtn点击 handleClick(val) { + console.log(val.data.packagingCode); if (val.type === "edit") { this.addOrUpdateVisible = true; this.addOrEditTitle = "编辑"; @@ -92,7 +93,7 @@ export default { this.$refs.addOrUpdate.init(val.data.id); }); } else if (val.type === "delete") { - this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex) + this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex,val.data.packagingCode ) } else if (val.type === "change") { this.changeStatus(val.data.id) } else { @@ -101,7 +102,7 @@ export default { }, // 删除 deleteHandle(id, name, index) { - this.$confirm(`是否确认删除${name ? '[' + name + ']' : '[' + index + ']'}数据项?`, "提示", { + this.$confirm(`是否确认删除${name ? ' 名称为'+ name : '[' + index + ']'}数据项?`, "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning", diff --git a/src/views/base/packagingPrintLog/index.vue b/src/views/base/packagingPrintLog/index.vue index 06918805..3e4ec4ea 100644 --- a/src/views/base/packagingPrintLog/index.vue +++ b/src/views/base/packagingPrintLog/index.vue @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2023-08-01 14:55:51 * @LastEditors: zhp - * @LastEditTime: 2023-11-22 14:40:59 + * @LastEditTime: 2023-11-24 09:13:50 * @Description: --> From a5c17d2276d72cb9856a6412d5aecb43a1731ada Mon Sep 17 00:00:00 2001 From: lb Date: Tue, 28 Nov 2023 16:14:24 +0800 Subject: [PATCH 4/5] fix conflicts --- .../core/analysis/balanceAnalysis/index.vue | 78 ++++++++++--------- .../equipment/base/alarm/Record/index.vue | 19 +---- 2 files changed, 43 insertions(+), 54 deletions(-) diff --git a/src/views/core/analysis/balanceAnalysis/index.vue b/src/views/core/analysis/balanceAnalysis/index.vue index 5579da4a..8ce3b630 100644 --- a/src/views/core/analysis/balanceAnalysis/index.vue +++ b/src/views/core/analysis/balanceAnalysis/index.vue @@ -162,50 +162,54 @@ export default { buildProps(nameData) { return new Promise((resolve, reject) => { - const dateArr = Array.from( - new Set( - nameData - .map((item) => (item.tree == 1 ? item.name : undefined)) - .filter((v) => v) - ) - ); - // 排个序 - dateArr.sort().forEach((date) => { - this.tableProps.push({ - label: date, - align: 'center', - children: [ - { - prop: date + '_eq_ct', - label: '设备CT', - align: 'center', - }, - { - prop: date + '_eq_tt', - label: '设备TT', - align: 'center', - }, - { - prop: date + '_pl_ct', - label: '产线CT', - align: 'center', - }, - { - prop: date + '_pl_tt', - label: '产线TT', - align: 'center', - }, - ], + try { + const dateArr = Array.from( + new Set( + nameData + .map((item) => (item.tree == 1 ? item.name : undefined)) + .filter((v) => v) + ) + ); + // 排个序 + dateArr.sort().forEach((date) => { + this.tableProps.push({ + label: date, + align: 'center', + children: [ + { + prop: date + '_eq_ct', + label: '设备CT', + align: 'center', + }, + { + prop: date + '_eq_tt', + label: '设备TT', + align: 'center', + }, + { + prop: date + '_pl_ct', + label: '产线CT', + align: 'center', + }, + { + prop: date + '_pl_tt', + label: '产线TT', + align: 'center', + }, + ], + }); }); - }); - resolve(); + resolve(); + } catch (err) { + reject(err); + } }); }, async buildTableData(data) { /** 处理 工段 分组 */ - const sectionList = data.map(item => {}) + const sectionList = data.map((item) => {}); }, setRowSpan(arr) { diff --git a/src/views/equipment/base/alarm/Record/index.vue b/src/views/equipment/base/alarm/Record/index.vue index c4f93007..91a9f310 100644 --- a/src/views/equipment/base/alarm/Record/index.vue +++ b/src/views/equipment/base/alarm/Record/index.vue @@ -59,14 +59,9 @@