From ec08a360a0e7a807be66ff6fb917358d4e09c888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com> Date: Wed, 3 Jun 2026 16:54:37 +0800 Subject: [PATCH] =?UTF-8?q?feat(qc/inspection):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=A3=80=E9=AA=8C=E4=BB=BB=E5=8A=A1=E6=96=B9=E6=A1=88=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E7=9A=84=E5=85=AC=E5=8F=B8=E5=92=8C=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 给SchemeSelect组件新增company和scheme两个props 2. 组件内新增模板单位查询参数并关联传入的company值 3. 组件挂载/重置时自动匹配并选中传入的默认方案 4. 同步更新表单内的归属公司和任务类型字段初始化 --- .../KLPService/SchemeSelect/index.vue | 27 +++++++++++++++++-- klp-ui/src/views/mes/qc/inspection/task.vue | 2 +- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/klp-ui/src/components/KLPService/SchemeSelect/index.vue b/klp-ui/src/components/KLPService/SchemeSelect/index.vue index 49f37663..7e9bd675 100644 --- a/klp-ui/src/components/KLPService/SchemeSelect/index.vue +++ b/klp-ui/src/components/KLPService/SchemeSelect/index.vue @@ -180,6 +180,14 @@ export default { visible: { type: Boolean, default: false + }, + company: { + type: String, + default: '' + }, + scheme: { + type: String, + default: '' } }, data() { @@ -194,11 +202,16 @@ export default { queryParams: { pageNum: 1, pageSize: 999, - templateName: undefined + templateName: undefined, + templateUnit: undefined }, selectedCoils: [], form: { - taskCode: undefined + taskCode: undefined, + taskType: undefined, + belongCompany: undefined, + enterCoilNos: undefined, + supplierCoilNos: undefined }, schemeAddOpen: false, schemeAddLoading: false, @@ -239,12 +252,16 @@ export default { this.selectedTemplate = null; this.checkItemList = []; this.form.taskCode = undefined; + this.form.belongCompany = undefined; + this.form.taskType = undefined; this.selectedCoils = []; this.selectedEnterCoilNos = []; this.tempEnterCoilNo = ''; this.selectedSupplierCoilNos = []; this.tempSupplierCoilNo = ''; this.enterCoilNoError = false; + this.queryParams.templateName = undefined; + this.queryParams.templateUnit = this.company || undefined; this.getList(); } } @@ -256,6 +273,12 @@ export default { this.templateList = response.rows || []; this.total = response.total || 0; this.loading = false; + if (this.scheme && this.templateList.length > 0) { + const match = this.templateList.find(t => t.templateName === this.scheme); + if (match) { + this.handleSchemeClick(match); + } + } }); }, handleQuery() { diff --git a/klp-ui/src/views/mes/qc/inspection/task.vue b/klp-ui/src/views/mes/qc/inspection/task.vue index 2ef6f6d4..6a45f031 100644 --- a/klp-ui/src/views/mes/qc/inspection/task.vue +++ b/klp-ui/src/views/mes/qc/inspection/task.vue @@ -406,7 +406,7 @@ - +