From d9198178a4f754f445a251ebf338da4f848adb6b Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Thu, 5 Mar 2026 18:52:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86]GSP00?= =?UTF-8?q?5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lang/en/template/gsp.js | 26 ++ src/lang/zh/template/gsp.js | 26 ++ .../business/comps/template/comps/gsp/GSP005.vue | 350 +++++++++++++++++++-- 3 files changed, 383 insertions(+), 19 deletions(-) diff --git a/src/lang/en/template/gsp.js b/src/lang/en/template/gsp.js index ca979e4..1cd6e39 100644 --- a/src/lang/en/template/gsp.js +++ b/src/lang/en/template/gsp.js @@ -42,6 +42,32 @@ export default { calcConditionLabel: '计算公式', sfxyzjfx: '是否需要制剂分析' }, + GSP005: { + xzzl: '新增质量', + xzry: '新增溶液', + zl: '质量', + ry: '溶液', + jspz:'结束配置', + kspz:'开始配置', + pzkssj:'配置开始时间', + pzjssj:'配置结束时间', + sywzbhph:'试验物质编号/批号', + yrybhph:'源溶液编号/批号', + yrymc:'源溶液名称', + yryyjtj:'源溶液预计体积', + yrysjtj:'源溶液实际体积', + yryyjnd:'源溶液预计浓度', + yrysjnd:'源溶液实际浓度', + yryxs:'源溶液系数', + sywzmc:'试验物资名称', + sywzzsxs:'试验物资折射系数', + sywzyjclz:'试验物质预计称量值', + sywzsjclz:'试验物质实际称量值', + rjbhph:'溶剂编号/批号', + rjmc:'溶剂名称', + rjyjtj:'溶剂预计体积', + rjsjtj:'溶剂实际体积', + }, gsp009: { xtsyx: '系统适应性', ypbh: '样品编号', diff --git a/src/lang/zh/template/gsp.js b/src/lang/zh/template/gsp.js index 5d5e3d7..488c541 100644 --- a/src/lang/zh/template/gsp.js +++ b/src/lang/zh/template/gsp.js @@ -42,6 +42,32 @@ export default { calcConditionLabel: '计算公式', sfxyzjfx: '是否需要制剂分析' }, + GSP005: { + xzzl: '新增质量', + xzry: '新增溶液', + zl: '质量', + ry: '溶液', + jspz:'结束配置', + kspz:'开始配置', + pzkssj:'配置开始时间', + pzjssj:'配置结束时间', + sywzbhph:'试验物质编号/批号', + yrybhph:'源溶液编号/批号', + yrymc:'源溶液名称', + yryyjtj:'源溶液预计体积', + yrysjtj:'源溶液实际体积', + yryyjnd:'源溶液预计浓度', + yrysjnd:'源溶液实际浓度', + yryxs:'源溶液系数', + sywzmc:'试验物资名称', + sywzzsxs:'试验物资折射系数', + sywzyjclz:'试验物质预计称量值', + sywzsjclz:'试验物质实际称量值', + rjbhph:'溶剂编号/批号', + rjmc:'溶剂名称', + rjyjtj:'溶剂预计体积', + rjsjtj:'溶剂实际体积', + }, gsp009: { xtsyx: '系统适应性', ypbh: '样品编号', diff --git a/src/views/business/comps/template/comps/gsp/GSP005.vue b/src/views/business/comps/template/comps/gsp/GSP005.vue index 35f1f7c..8b8b1f5 100644 --- a/src/views/business/comps/template/comps/gsp/GSP005.vue +++ b/src/views/business/comps/template/comps/gsp/GSP005.vue @@ -14,31 +14,64 @@ -
-
- {{ - $t('template.common.xzzl') }} - {{ - $t('template.common.xzry') }} +
+
+ {{ $t('template.gsp.GSP005.xzzl') + }} + {{ $t('template.gsp.GSP005.xzry') + }}
-
+
+
+ {{ $t('template.gsp.GSP005.zl') }} +
- {{ + {{ $t('template.common.deleteBtn') }} {{ $t('template.gsp.GSP005.kspz') }} + {{ $t('template.common.bqdy') }}
- + :prefixKey="'form_' + zlIndex"> + {{ $t('template.gsp.GSP005.jspz') }} +
+
+ +
+
+
+ {{ $t('template.gsp.GSP005.ry') }} +
+
+ {{ + $t('template.common.deleteBtn') + }} + {{ $t('template.gsp.GSP005.kspz') }} + {{ $t('template.common.bqdy') }} +
+ + + {{ $t('template.gsp.GSP005.jspz') }}
@@ -241,6 +274,20 @@ export default { label: 'template.common.expireDate', type: "input", }, + pzkssj: { + label: 'template.gsp.GSP005.pzkssj', + type: "input", + bodyDisabled: true, + fillType: "actFill", + maxlength: 20 + }, + pzjssj: { + label: 'template.gsp.GSP005.pzjssj', + type: "input", + bodyDisabled: true, + fillType: "actFill", + maxlength: 20 + }, storageCondition: { label: 'template.common.storageConditionLabel', type: "select", @@ -248,6 +295,84 @@ export default { options: this.getDictOptions("business_cctj"), otherCode: "storageConditionOther", }, + sywzbhph: { + label: 'template.gsp.GSP005.sywzbhph', + type: "input", + subType: "input", + subKey: "sywzbhphSub", + fillType: "preFill", + subFillType: "actFill", + maxlength: 20, + }, + sywzmc: { + label: 'template.gsp.GSP005.sywzmc', + type: "input", + subType: "input", + subKey: "sywzmcSub", + fillType: "preFill", + subFillType: "actFill", + maxlength: 20, + }, + sywzzsxs: { + label: 'template.gsp.GSP005.sywzzsxs', + type: "input", + fillType: "preFill", + maxlength: 20, + }, + sywzyjclz: { + label: 'template.gsp.GSP005.sywzyjclz', + type: "inputNumber", + subType: "select", + subKey: "sywzyjclzUnit", + fillType: "preFill", + subOptions: this.getDictOptions('business_zldw'), + maxlength: 10 + }, + sywzsjclz: { + label: 'template.gsp.GSP005.sywzsjclz', + type: "inputNumber", + subType: "select", + subKey: "sywzsjclzUnit", + fillType: "actFill", + subFillType: "preFill", + subOptions: this.getDictOptions('business_zldw'), + maxlength: 10 + }, + rjbhph: { + label: 'template.gsp.GSP005.rjbhph', + type: "input", + fillType: "preFill", + subType: 'mix', + subKey: 'rjbhphSub', + subFillType: 'actFill', + maxlength: 20, + }, + rjmc: { + label: 'template.gsp.GSP005.rjmc', + type: "input", + fillType: "actFill", + maxlength: 50, + }, + rjyjtj: { + label: 'template.gsp.GSP005.rjyjtj', + type: "inputNumber", + subType: "select", + subKey: "rjyjtjUnit", + fillType: "preFill", + subFillType: "preFill", + subOptions: this.getDictOptions('business_tjdw'), + maxlength: 10 + }, + rjsjtj: { + label: 'template.gsp.GSP005.rjsjtj', + type: "inputNumber", + subType: "select", + subKey: "rjsjtjUnit", + fillType: "actFill", + subFillType: "preFill", + subOptions: this.getDictOptions('business_tjdw'), + maxlength: 10 + }, } } ] @@ -329,6 +454,20 @@ export default { label: 'template.common.expireDate', type: "input", }, + pzkssj: { + label: 'template.gsp.GSP005.pzkssj', + type: "input", + bodyDisabled: true, + fillType: "actFill", + maxlength: 20 + }, + pzjssj: { + label: 'template.gsp.GSP005.pzjssj', + type: "input", + bodyDisabled: true, + fillType: "actFill", + maxlength: 20 + }, storageCondition: { label: 'template.common.storageConditionLabel', type: "select", @@ -336,6 +475,105 @@ export default { options: this.getDictOptions("business_cctj"), otherCode: "storageConditionOther", }, + yrybhph: { + label: 'template.gsp.GSP005.yrybhph', + type: "input", + subType: "input", + subKey: "yrybhphSub", + fillType: "preFill", + subFillType: "actFill", + maxlength: 20, + }, + yrymc: { + label: 'template.gsp.GSP005.yrymc', + type: "input", + subType: "input", + subKey: "yrymcSub", + fillType: "preFill", + subFillType: "actFill", + maxlength: 20, + }, + yryyjtj: { + label: 'template.gsp.GSP005.yryyjtj', + type: "inputNumber", + subType: "select", + subKey: "yryyjtjUnit", + fillType: "preFill", + subFillType: "preFill", + subOptions: this.getDictOptions('business_tjdw'), + maxlength: 10 + }, + yrysjtj: { + label: 'template.gsp.GSP005.yrysjtj', + type: "inputNumber", + subType: "select", + subKey: "yrysjtjUnit", + fillType: "actFill", + subFillType: "preFill", + subOptions: this.getDictOptions('business_tjdw'), + maxlength: 10 + }, + yryyjnd: { + label: 'template.gsp.GSP005.yryyjnd', + type: "inputNumber", + subType: "select", + subKey: "yryyjndUnit", + fillType: "preFill", + subFillType: "preFill", + subOptions: this.getDictOptions('business_nddw'), + maxlength: 10 + }, + yrysjnd: { + label: 'template.gsp.GSP005.yrysjnd', + type: "inputNumber", + subType: "select", + subKey: "yrysjndUnit", + fillType: "actFill", + subFillType: "preFill", + subOptions: this.getDictOptions('business_nddw'), + maxlength: 10 + }, + yryxs: { + label: 'template.gsp.GSP005.yryxs', + type: "input", + fillType: "preFill", + maxlength: 20, + }, + rjbhph: { + label: 'template.gsp.GSP005.rjbhph', + type: "input", + fillType: "preFill", + subType: 'mix', + subKey: 'rjbhphSub', + subFillType: 'actFill', + maxlength: 20, + }, + rjmc: { + label: 'template.gsp.GSP005.rjmc', + type: "input", + fillType: "actFill", + maxlength: 50, + }, + rjyjtj: { + label: 'template.gsp.GSP005.rjyjtj', + type: "inputNumber", + subType: "select", + subKey: "rjyjtjUnit", + fillType: "preFill", + subFillType: "preFill", + subOptions: this.getDictOptions('business_tjdw'), + maxlength: 10 + }, + rjsjtj: { + label: 'template.gsp.GSP005.rjsjtj', + type: "inputNumber", + subType: "select", + subKey: "rjsjtjUnit", + fillType: "actFill", + subFillType: "preFill", + subOptions: this.getDictOptions('business_tjdw'), + maxlength: 10 + }, } } ] @@ -357,6 +595,12 @@ export default { formZlConfigs: [], }); } + if (!this.formData.formRyConfigs) { + this.$set(this.formData, 'formRyConfigs', []); + this.formData.formRyConfigs.push({ + formRyConfigs: [], + }); + } } }, methods: { @@ -397,6 +641,7 @@ export default { }, //填报获取编号 getCode: debounce(async function (v) { + //质量 if (this.formData.formZlConfigs && this.formData.formZlConfigs.length > 0) { for (let i = 0; i < this.formData.formZlConfigs.length; i++) { let item = this.formData.formZlConfigs[i] @@ -410,6 +655,20 @@ export default { } } } + //溶液 + if (this.formData.formRyConfigs && this.formData.formRyConfigs.length > 0) { + for (let i = 0; i < this.formData.formRyConfigs.length; i++) { + let item = this.formData.formRyConfigs[i] + const result = await getLatestSn({ + count: 1, + pre: item.targetCode, + type: 1 + }) + if (result.code == 200) { + this.$refs[`formRyConfigFormPackageRef_${i}`][0].updateFormData("targetCodeSn", result.data[0]) + } + } + } }, 100), //获取字段值,不检验 getFilledFormData() { @@ -418,7 +677,7 @@ export default { if (this.formData.formZlConfigs && this.formData.formZlConfigs.length > 0) { for (let i = 0; i < this.formData.formZlConfigs.length; i++) { const formData = this.$refs[`formZlConfigFormPackageRef_${i}`][0].getFilledFormData(); - const stepData = this.$refs[`formStepRef_${i}`][0].getFilledFormData(); + const stepData = this.$refs[`formZlStepRef_${i}`][0].getFilledFormData(); if (this.formData.startDate && formData.effectivePeriod && formData.effectivePeriodUnit) { formData.expireDate = getExpireDate(this.formData.startDate, formData.effectivePeriod, formData.effectivePeriodUnit) } @@ -428,10 +687,25 @@ export default { }); } } + const formRyConfigsData = []; + if (this.formData.formRyConfigs && this.formData.formRyConfigs.length > 0) { + for (let i = 0; i < this.formData.formRyConfigs.length; i++) { + const formData = this.$refs[`formRyConfigFormPackageRef_${i}`][0].getFilledFormData(); + const stepData = this.$refs[`formRyStepRef_${i}`][0].getFilledFormData(); + if (this.formData.startDate && formData.effectivePeriod && formData.effectivePeriodUnit) { + formData.expireDate = getExpireDate(this.formData.startDate, formData.effectivePeriod, formData.effectivePeriodUnit) + } + formRyConfigsData.push({ + ...formData, + ...stepData, + }); + } + } const remarkData = this.$refs.remarkRef.getFilledFormData(); return { ...baseData, formZlConfigs: formZlConfigsData, + formRyConfigs: formRyConfigsData, ...remarkData } }, @@ -443,7 +717,14 @@ export default { if (this.formData.formZlConfigs && this.formData.formZlConfigs.length > 0) { for (let i = 0; i < this.formData.formZlConfigs.length; i++) { refsToValidate.push(`formZlConfigFormPackageRef_${i}`); - refsToValidate.push(`formStepRef_${i}`); + refsToValidate.push(`formZlStepRef_${i}`); + } + } + + if (this.formData.formRyConfigs && this.formData.formRyConfigs.length > 0) { + for (let i = 0; i < this.formData.formRyConfigs.length; i++) { + refsToValidate.push(`formRyConfigFormPackageRef_${i}`); + refsToValidate.push(`formRyStepRef_${i}`); } } @@ -465,10 +746,34 @@ export default { //生成resource let tmpResource = [] if (this.fillType === "actFill") { - let tableList = content.formZlConfigs - if (tableList && tableList.length > 0) { - for (let i = 0; i < tableList.length; i++) { - let item = tableList[i] + let tableListZl = content.formZlConfigs + if (tableListZl && tableListZl.length > 0) { + for (let i = 0; i < tableListZl.length; i++) { + let item = tableListZl[i] + tmpResource.push({ + mc: item.targetName, + bh: item.targetCode + item.targetCodeSn, + ph: '', + ndz: item.targetActConcentration + item.targetActConcentrationUnit, + nd: item.targetActConcentration, + nddw: item.targetActConcentrationUnit, + ly: 'ELN配制', + sxrq: item.expireDate, + kc: item.targetActVolume, + kcdw: item.targetActVolumeUnit, + syl: null, + type: null, + elnType: this.product, + syldw: item.targetActVolumeUnit, + yxzq: item.effectivePeriod, + yxzqdw: item.effectivePeriodUnit, + }) + } + } + let tableListRy = content.formRyConfigs + if (tableListRy && tableListRy.length > 0) { + for (let i = 0; i < tableListRy.length; i++) { + let item = tableListRy[i] tmpResource.push({ mc: item.targetName, bh: item.targetCode + item.targetCodeSn, @@ -501,7 +806,14 @@ export default { const sjResource = [], yqResource = []; if (this.formData.formZlConfigs && this.formData.formZlConfigs.length > 0) { for (let i = 0; i < this.formData.formZlConfigs.length; i++) { - const paralleResource = this.$refs[`formStepRef_${i}`][0].getStepResource(); + const paralleResource = this.$refs[`formZlStepRef_${i}`][0].getStepResource(); + sjResource.push(...paralleResource.sjResource); + yqResource.push(...paralleResource.yqResource); + } + } + if (this.formData.formRyConfigs && this.formData.formRyConfigs.length > 0) { + for (let i = 0; i < this.formData.formRyConfigs.length; i++) { + const paralleResource = this.$refs[`formRyStepRef_${i}`][0].getStepResource(); sjResource.push(...paralleResource.sjResource); yqResource.push(...paralleResource.yqResource); }