From 932e2109905b86ca3679b2368e5b35d7967f3631 Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Fri, 6 Mar 2026 18:14:56 +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 --- .../business/comps/template/comps/gsp/GSP002.vue | 1 - .../business/comps/template/comps/gsp/GSP005.vue | 159 +++++++++++++++++++-- 2 files changed, 146 insertions(+), 14 deletions(-) diff --git a/src/views/business/comps/template/comps/gsp/GSP002.vue b/src/views/business/comps/template/comps/gsp/GSP002.vue index a0f8c10..fb621ea 100644 --- a/src/views/business/comps/template/comps/gsp/GSP002.vue +++ b/src/views/business/comps/template/comps/gsp/GSP002.vue @@ -519,7 +519,6 @@ export default { const { rowData, headerSelectFields } = val; //计算实际目标溶液体积(实际起始溶液体积+实际稀释液体积) const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit]) - debugger let postData = { mc: null, bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode, diff --git a/src/views/business/comps/template/comps/gsp/GSP005.vue b/src/views/business/comps/template/comps/gsp/GSP005.vue index ec1997a..9c9c894 100644 --- a/src/views/business/comps/template/comps/gsp/GSP005.vue +++ b/src/views/business/comps/template/comps/gsp/GSP005.vue @@ -34,7 +34,7 @@ $t('template.common.deleteBtn') }} {{ $t('template.gsp.GSP005.kspz') }} + @click="zlKspz(zlIndex)">{{ $t('template.gsp.GSP005.kspz') }} {{ $t('template.common.bqdy') }} @@ -47,7 +47,7 @@ :formData="formzlConfig.stepData" :fieldItemLabel="$t('template.common.jtpz')" :prefixKey="'form_' + zlIndex"> {{ $t('template.gsp.GSP005.jspz') }} + @click="zlJspz(zlIndex)">{{ $t('template.gsp.GSP005.jspz') }} @@ -62,7 +62,7 @@ $t('template.common.deleteBtn') }} {{ $t('template.gsp.GSP005.kspz') }} + @click="ryKspz(ryIndex)">{{ $t('template.gsp.GSP005.kspz') }} {{ $t('template.common.bqdy') }} @@ -75,7 +75,7 @@ :formData="formryConfig.stepData" :fieldItemLabel="$t('template.common.jtpz')" :prefixKey="'form_' + ryIndex"> {{ $t('template.gsp.GSP005.jspz') }} + @click="ryJspz(ryIndex)">{{ $t('template.gsp.GSP005.jspz') }} @@ -96,10 +96,11 @@ import templateMixin from "../../mixins/templateMixin"; import CustomTable from '@/components/Template/CustomTable.vue'; import { getLatestSn } from '@/api/template'; import { EventBus } from "@/utils/eventBus"; -import { uniqeResource } from "@/utils/calUnitTools"; +import { uniqeResource, subTj } from "@/utils/calUnitTools"; import { debounce } from 'lodash-es' import { duplicateResource, getExpireDate } from "@/utils/index.js"; import { isCommonUnit } from "@/utils/conTools"; +import moment from "moment"; export default { name: "GSP005", @@ -313,6 +314,7 @@ export default { label: 'template.gsp.GSP005.sywzmc', type: "input", subType: "input", + subDisabled: true, subKey: "sywzmcSub", fillType: "preFill", subFillType: "actFill", @@ -356,6 +358,7 @@ export default { rjmc: { label: 'template.gsp.GSP005.rjmc', type: "input", + disabled: true, fillType: "actFill", maxlength: 50, }, @@ -495,6 +498,7 @@ export default { label: 'template.gsp.GSP005.yrymc', type: "input", subType: "input", + subDisabled: true, subKey: "yrymcSub", fillType: "preFill", subFillType: "actFill", @@ -560,6 +564,7 @@ export default { rjmc: { label: 'template.gsp.GSP005.rjmc', type: "input", + disabled: true, fillType: "actFill", maxlength: 50, }, @@ -614,6 +619,64 @@ export default { } }, methods: { + //溶液开始配置 + ryKspz(zlIndex) { + this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('pzkssj', moment().format("YYYY-MM-DD HH:mm:ss")) + const rowData = this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].getFilledFormData() + let postData = { + bh: rowData.targetCode + rowData.targetCodeSn, + studySubjectId: this.formData.studySubjectId, + studyId: this.formData.studyId, + studyFormId: this.formData.id, + } + this.startConfigRequest(postData); + }, + //溶液结束配置 + ryJspz(zlIndex) { + this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('pzjssj', moment().format("YYYY-MM-DD HH:mm:ss")) + const rowData = this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].getFilledFormData() + let postData = { + mc: rowData.targetName, + bh: rowData.targetCode + rowData.targetCodeSn, + nd: rowData.targetActConcentration, + nddw: rowData.targetActConcentrationUnit, + kc: rowData.targetActVolume, + kcdw: rowData.targetActVolumeUnit, + studySubjectId: this.formData.studySubjectId, + studyId: this.formData.studyId, + studyFormId: this.formData.id, + } + this.configCompleteRequest(postData); + }, + //质量开始配置 + zlKspz(zlIndex) { + this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('pzkssj', moment().format("YYYY-MM-DD HH:mm:ss")) + const rowData = this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].getFilledFormData() + let postData = { + bh: rowData.targetCode + rowData.targetCodeSn, + studySubjectId: this.formData.studySubjectId, + studyId: this.formData.studyId, + studyFormId: this.formData.id, + } + this.startConfigRequest(postData); + }, + //质量结束配置 + zlJspz(zlIndex) { + this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('pzjssj', moment().format("YYYY-MM-DD HH:mm:ss")) + const rowData = this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].getFilledFormData() + let postData = { + mc: rowData.targetName, + bh: rowData.targetCode + rowData.targetCodeSn, + nd: rowData.targetActConcentration, + nddw: rowData.targetActConcentrationUnit, + kc: rowData.targetActVolume, + kcdw: rowData.targetActVolumeUnit, + studySubjectId: this.formData.studySubjectId, + studyId: this.formData.studyId, + studyFormId: this.formData.id, + } + this.configCompleteRequest(postData); + }, // 溶液 onTableBeforeReagentRySubmit(data, zlIndex, formZlConfig) { const { selectData, callback, key, formFields } = data; @@ -632,13 +695,13 @@ export default { this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('yrybhphSubType', data.selectInfo.selectType) this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('yrybhphSubKcdw', data.selectInfo.row.kcdw) this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('yrybhphSubNddw', data.selectInfo.row.nddw) - this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('yrymc', data.selectInfo.row.mc||'NA') + this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('yrymcSub', data.selectInfo.row.mc || 'NA') } if (data.key === 'rjbhphSub') { this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubType', data.selectInfo.selectType) this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubKcdw', data.selectInfo.row.kcdw) this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubNddw', data.selectInfo.row.nddw) - this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjmc', data.selectInfo.row.mc||'NA') + this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjmc', data.selectInfo.row.mc || 'NA') } }, // 质量 @@ -659,13 +722,13 @@ export default { this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('sywzbhphSubType', data.selectInfo.selectType) this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('sywzbhphSubKcdw', data.selectInfo.row.kcdw) this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('sywzbhphSubNddw', data.selectInfo.row.nddw) - this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('sywzmcSub', data.selectInfo.row.mc||'NA') + this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('sywzmcSub', data.selectInfo.row.mc || 'NA') } if (data.key === 'rjbhphSub') { this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubType', data.selectInfo.selectType) this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubKcdw', data.selectInfo.row.kcdw) this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubNddw', data.selectInfo.row.nddw) - this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjmc', data.selectInfo.row.mc||'NA') + this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjmc', data.selectInfo.row.mc || 'NA') } }, //新增质量 @@ -832,10 +895,45 @@ export default { yxzq: item.effectivePeriod, yxzqdw: item.effectivePeriodUnit, }) + //试验物质编号/批号 + tmpResource.push({ + mc: null, + bh: item.sywzbhphSub, + ph: null, + nd: null, + nddw: null, + ndz: null, + ly: null, + sxrq: null, + kc: null, + kcdw: null, + type: item.sywzbhphSubType, + syl: item.sywzyjclz, + syldw: item.sywzyjclzUnit, + yxzq: null, + yxzqdw: null, + }) + //溶剂编号/批号 + tmpResource.push({ + mc: null, + bh: item.rjbhphSub, + ph: null, + nd: null, + nddw: null, + ndz: null, + ly: null, + sxrq: null, + kc: null, + kcdw: null, + type: item.rjbhphSubType, + syl: item.rjsjtj, + syldw: item.rjsjtjUnit, + yxzq: null, + yxzqdw: null, + }) } } - //使用 - + let tableListRy = content.formRyConfigs if (tableListRy && tableListRy.length > 0) { for (let i = 0; i < tableListRy.length; i++) { @@ -858,10 +956,45 @@ export default { yxzq: item.effectivePeriod, yxzqdw: item.effectivePeriodUnit, }) + //源溶液编号/批号 + tmpResource.push({ + mc: null, + bh: item.yrybhphSub, + ph: null, + nd: null, + nddw: null, + ndz: null, + ly: null, + sxrq: null, + kc: null, + kcdw: null, + type: item.yrybhphSubType, + syl: item.yrysjtj, + syldw: item.yrysjtjUnit, + yxzq: null, + yxzqdw: null, + }) + //溶剂编号/批号 + tmpResource.push({ + mc: null, + bh: item.rjbhphSub, + ph: null, + nd: null, + nddw: null, + ndz: null, + ly: null, + sxrq: null, + kc: null, + kcdw: null, + type: item.rjbhphSubType, + syl: item.rjsjtj, + syldw: item.rjsjtjUnit, + yxzq: null, + yxzqdw: null, + }) } } - //使用 - + } //使用的试剂、仪器 const stepResource = this.getStepResource()