From c29c0c57e7f739a56b07d9199b1f97d5da08f703 Mon Sep 17 00:00:00 2001 From: zhangdi <1104545947@qq.com> Date: Mon, 1 Jun 2026 11:25:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E8=89=BA=E4=BB=BB=E5=8A=A1=E5=A4=84?= =?UTF-8?q?=E7=90=86=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/oem/oemOrder/index.vue | 4 +- .../processMainte/processPlanning.vue | 567 ++++++++---------- .../processMainte/reworkProcessPlanning.vue | 20 +- 3 files changed, 269 insertions(+), 322 deletions(-) diff --git a/src/views/oem/oemOrder/index.vue b/src/views/oem/oemOrder/index.vue index 8b28f944..7471df14 100644 --- a/src/views/oem/oemOrder/index.vue +++ b/src/views/oem/oemOrder/index.vue @@ -660,9 +660,7 @@ export default { this.changeOpen = false; this.showBatch = false this.isWorkRateOpen = false - if (isRefresh) { - this.refresh(); - } + this.onLoad(this.page) }, // 设置班组人员 setCrew(bcId) { diff --git a/src/views/processManagement/components/processMainte/processPlanning.vue b/src/views/processManagement/components/processMainte/processPlanning.vue index 307f591c..6b8f80ec 100644 --- a/src/views/processManagement/components/processMainte/processPlanning.vue +++ b/src/views/processManagement/components/processMainte/processPlanning.vue @@ -5,14 +5,8 @@ - + @@ -20,36 +14,15 @@ - -
+ +
- + 复制 - + 删除
@@ -60,18 +33,8 @@ - - + + @@ -90,11 +53,7 @@ - + @@ -106,65 +65,30 @@ 保存
- - - 导入模板 + + + 导入模板
- - 导入模板 + + 导入模板
- - + + @@ -174,19 +98,10 @@ @@ -197,19 +112,10 @@ @@ -240,27 +146,13 @@ - - + + @@ -268,23 +160,11 @@ *检验项目 @@ -294,77 +174,40 @@ *检验标准 - + - - + + @@ -372,10 +215,7 @@ *镀前镀后 - - + + @@ -600,7 +386,7 @@ export default { formRules2: { projectCode: [{ required: true, message: '请选择', trigger: ['change', 'submit'] }], projectStandard: [{ required: true, message: '请输入', trigger: ['change', 'submit'] }], - proHours: [{ required: true, message: '请输入', trigger: ['change', 'submit'] }], + // proHours: [{ required: true, message: '请输入', trigger: ['change', 'submit'] }], }, formRules3: { testType: [{ required: true, message: '请选择', trigger: ['change', 'submit'] }], @@ -1556,10 +1342,7 @@ export default { if (!noMainPro) { return this.$message.error('此套工艺未含主工序,请设置主工序!!!'); } - if (isReturn == 1) { - return this.$message.warning('涂色标的工时定额必须大于0,请修改!'); - } - // const res = await getPartDetail(this.partId); + let dsCraftMold = this.partInfoData; if (dsCraftMold.markingsTest == '1') { @@ -1654,7 +1437,7 @@ export default { } } - // // penmark 喷码验证 + // penmark 喷码验证 if (dsCraftMold.inkjetPrinting == '1') { let flag = false; arr.forEach(item => { @@ -1675,13 +1458,87 @@ export default { }); } } - - // 处理传参 - if (this.treeNodes.rawData.qualityGradeCode) { - let qualityInfo = this.rankList.find( - item => item.code == this.treeNodes.rawData.qualityGradeCode + // 镀种信息或者工艺路线中是否包含清洗,判断主工序是否包含 清洗 无则警告提示 + const hasCleaningInPlateOrCraftWay = + (this.partInfoData.plate && this.partInfoData.plate.includes('清洗')) || + (this.partInfoData.craftWay && this.partInfoData.craftWay.includes('清洗')); + if (hasCleaningInPlateOrCraftWay) { + const hasCleaningInMainProcess = this.form1.tableData1.some( + item => item.isMain === '1' && item.processName && item.processName.includes('清洗') + ); + if (!hasCleaningInMainProcess) { + this.$message({ + dangerouslyUseHTMLString: true, + message: '该零件镀种或工艺路线包含“清洗”,但主工序中未设置清洗工序。', + showClose: true, + duration: 7000, + type: 'warning', + }); + // return; + } + } + // 镀种信息中包含 Ct.p或者钝化,判断主工序是否包含 钝化 无则警告提示 + const hasDotInPlate = + this.partInfoData.plate && (this.partInfoData.plate.includes('Ct.p') || this.partInfoData.plate.includes('钝化')); + if (hasDotInPlate) { + const hasDotInMainProcess = this.form1.tableData1.some( + item => item.isMain === '1' && item.processName && item.processName.includes('钝化') + ); + if (!hasDotInMainProcess) { + this.$message({ + dangerouslyUseHTMLString: true, + message: '该零件镀种包含Ct.p或钝化,但主工序中未设置钝化工序。', + showClose: true, + duration: 7000, + type: 'warning', + }); + // return; + } + } + // 镀种信息中包含 (Et.A(S) 且不包含 hd)和 (包含 硫酸阳极),/判断主工序是否包含 硫酸 无否则警告提示 + const plate = this.partInfoData.plate || ''; + const hasEtAS = plate.includes('Et.A(S)'); + const hasNoHd = !plate.includes('hd'); + const hasSulfuricAnodize = plate.includes('硫酸阳极'); + if (hasEtAS && hasNoHd && hasSulfuricAnodize) { + const hasSulfuricInMainProcess = this.form1.tableData1.some( + item => item.isMain === '1' && item.processName && ( + item.processName.includes('硫酸') || + item.processName.includes('硫酸阳极') + ) ); - // this.treeNodes.rawData.qualityGradeName = qualityInfo.name; + if (!hasSulfuricInMainProcess) { + this.$message({ + dangerouslyUseHTMLString: true, + message: '镀种包含 Et.A(S)(不含hd)且含硫酸阳极,但主工序中未设置硫酸相关工序。', + showClose: true, + duration: 7000, + type: 'warning', + }); + // 如需强制阻断保存,可取消下面注释: + // return; + } + } + // 镀种信息包含 镀种信息中包含 (Et.A(S) 且包含 hd)和 (包含硫酸阳极),判断主工序是否包含 硬质,无则警告提示; + const hasHds = plate.includes('hd'); + if (hasEtAS && hasHds && hasSulfuricAnodize) { + const hasHardAnodizeInMainProcess = this.form1.tableData1.some( + item => item.isMain === '1' && item.processName && ( + item.processName.includes('硬质') || + item.processName.includes('硬质阳极') + ) + ); + if (!hasHardAnodizeInMainProcess) { + this.$message({ + dangerouslyUseHTMLString: true, + message: '镀种包含 Et.A(S)(含hd)且含硫酸阳极,但主工序中未设置硬质相关工序。', + showClose: true, + duration: 7000, + type: 'warning', + }); + // 如需强制阻断保存,可取消下面注释: + // return; + } } let query_ = { dsPart: this.partInfoData, //零件信息 @@ -1700,26 +1557,103 @@ export default { this.craftLoading = false; }); } - }); + }) } if (this.activeName == '2') { this.$refs.tableForm2.validate((isValid, invalidFields) => { if (isValid) { - // 🔍 新增:校验是否包含“耐蚀性检测” - const hasCorrosionTest = this.form2.tableData2.some( - item => - item.projectName?.includes('耐蚀性检测') || - (item.projectCode && - this.projectOptions - .find(p => p.id === item.projectCode) - ?.name?.includes('耐蚀性检测')) - ); - - // 如果父节点备注包含 'HTBY' 且未设置耐蚀性检测,则报错 - if (this.parentData.rawData?.remarks?.includes('HTBY') && !hasCorrosionTest) { - this.$message.error('备注包含 HTBY 时,检测项目必须包含耐蚀性检测!'); - return; + console.log(90909090, this.partInfoData) + // 零件名称中 是否含有 印制板 判断项目中是否含有 可焊性检测 无则警告提示 + const hasPrintingBoard = this.partInfoData.partName && this.partInfoData.partName.includes('印制板'); + if (hasPrintingBoard) { + const hasSolderabilityTest = this.form2.tableData2.some(item => + item.projectName && item.projectName.includes('可焊性') + ); + if (!hasSolderabilityTest) { + this.$message({ + dangerouslyUseHTMLString: true, + message: '零件名称包含“印制板”,但检验项目中未设置“可焊性检测”。', + showClose: true, + duration: 7000, + type: 'warning', + }); + // 注意:此处仅为警告,不 return,允许用户继续保存(根据现有风格) + } } + + // 镀种信息中带 nm或sb,判断检验项目是否存在 磁导率检测 无否则警告提示 + const plate = (this.partInfoData.plate || '').toLowerCase(); + if (plate.includes('nm') || plate.includes('sb')) { + const hasPermeabilityTest = this.form2.tableData2.some(item => + item.projectName && item.projectName.includes('磁导率') + ); + if (!hasPermeabilityTest) { + this.$message({ + dangerouslyUseHTMLString: true, + message: '镀种信息包含 nm 或 sb,但检验项目中未设置“磁导率检测”。', + showClose: true, + duration: 7000, + type: 'warning', + }); + } + } + // 镀种信息中 包含 干膜,判断项目是否存在 结合力检测,无否则警告提示 + if (this.partInfoData.plate && this.partInfoData.plate.includes('干膜')) { + const hasAdhesionTest = this.form2.tableData2.some(item => + item.projectName && item.projectName.includes('结合力') + ); + if (!hasAdhesionTest) { + this.$message({ + dangerouslyUseHTMLString: true, + message: '镀种信息包含“干膜”,但检验项目中未设置“结合力检测”。', + showClose: true, + duration: 7000, + type: 'warning', + }); + } + } + // 镀种信息中包含 (Et.A(S) 且不包含 hd)和 (包含 硫酸阳极),判断检验项目是否存在 封孔性检测 无否则警告提示 + const plateStr2 = this.partInfoData.plate || ''; + const hasEtAS2 = plateStr2.includes('Et.A(S)'); + const hasNoHd2 = !plateStr2.includes('hd'); + const hasSulfuricAnodize2 = plateStr2.includes('硫酸阳极'); + + if (hasEtAS2 && hasNoHd2 && hasSulfuricAnodize2) { + const hasSealingTest2 = this.form2.tableData2.some(item => + item.projectName && item.projectName.includes('封孔') + ); + if (!hasSealingTest2) { + this.$message({ + dangerouslyUseHTMLString: true, + message: '镀种包含 Et.A(S)(不含hd)且含硫酸阳极,但检验项目中未设置“封孔性检测”。', + showClose: true, + duration: 7000, + type: 'warning', + }); + } + } + // 镀种信息包含 镀种信息中包含 (Et.A(S) 且包含 hd)和 (包含硫酸阳极);若同时镀种信息中包含C1,检测项目是否存在 封孔性检测,无则警告提示 + const plateStr = this.partInfoData.plate || ''; + const hasEtAS = plateStr.includes('Et.A(S)'); + const hasHd = plateStr.includes('hd'); + const hasSulfuricAnodize = plateStr.includes('硫酸阳极'); + const hasC1 = plateStr.includes('C1'); + + if (hasEtAS && hasHd && hasSulfuricAnodize && hasC1) { + const hasSealingTest = this.form2.tableData2.some(item => + item.projectName && item.projectName.includes('封孔') + ); + if (!hasSealingTest) { + this.$message({ + dangerouslyUseHTMLString: true, + message: '镀种包含 Et.A(S)(含hd)、硫酸阳极及C1,但检验项目中未设置“封孔性检测”。', + showClose: true, + duration: 7000, + type: 'warning', + }); + } + } + this.craftLoading = true; let query_ = { processEntity: this.treeNodes.rawData.processInfo, //工序 @@ -1992,10 +1926,12 @@ export default { // background-color: #f5f7fa; } } + .el-tree-node__label { font-size: 14px; } } + :deep(.el-tree-node.is-current > .el-tree-node__content) { background-color: rgba(40, 76, 135, 0.9) !important; @@ -2003,6 +1939,7 @@ export default { color: #fff; } } + :deep(.el-table__header th.el-table__cell) { height: 40px !important; min-height: 40px !important; @@ -2054,8 +1991,10 @@ export default { padding: 6px 12px; margin: 0; } + :deep(.el-table thead) { - height: 36px !important; /* 设置你想要的高度 */ + height: 36px !important; + /* 设置你想要的高度 */ line-height: 36px !important; } diff --git a/src/views/processManagement/components/processMainte/reworkProcessPlanning.vue b/src/views/processManagement/components/processMainte/reworkProcessPlanning.vue index d2e10ea8..ad701f83 100644 --- a/src/views/processManagement/components/processMainte/reworkProcessPlanning.vue +++ b/src/views/processManagement/components/processMainte/reworkProcessPlanning.vue @@ -2,7 +2,16 @@
+ :default-expand-all="true" :expand-on-click-node="false" node-key="id" ref="tree" > + +
@@ -183,7 +192,7 @@ - + @@ -1118,9 +1127,10 @@ export default { :deep(.el-tree-node.is-current > .el-tree-node__content) { background-color: rgba(40, 76, 135, 0.9) !important; + color: #fff !important; - .el-tree-node__label { - color: #fff; + .tree-node-item { + color: #fff !important; } }