From 8efbbbf001290d02a247d79d0defd6da5295466c Mon Sep 17 00:00:00 2001 From: HanLong <404402223@qq.com> Date: Wed, 11 Feb 2026 14:54:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86]PCR0?= =?UTF-8?q?02?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/comps/template/comps/pcr/PCR002.vue | 137 +++++++++++++++++---- .../comps/template/formConfig/PCRTableConfig.js | 14 ++- 2 files changed, 120 insertions(+), 31 deletions(-) diff --git a/src/views/business/comps/template/comps/pcr/PCR002.vue b/src/views/business/comps/template/comps/pcr/PCR002.vue index 60c38b9..b5d3127 100644 --- a/src/views/business/comps/template/comps/pcr/PCR002.vue +++ b/src/views/business/comps/template/comps/pcr/PCR002.vue @@ -63,10 +63,11 @@ import templateMixin from "../../mixins/templateMixin"; import CustomTable from '@/components/Template/CustomTable.vue'; import { getLatestSnArr } from '@/api/template'; import { EventBus } from "@/utils/eventBus"; -import { uniqeResource } from "@/utils/calUnitTools"; import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue'; import { getLadderColumnsConfig } from "../../formConfig/PCRTableConfig.js"; import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue" +import { addTj,uniqeResource,uniqeResourceOne,addDecimals } from "@/utils/calUnitTools"; + export default { name: "PCR002", components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaion, SelectReagentDialog }, @@ -373,37 +374,121 @@ export default { getFilledFormData() { return this.getFilledFormDataByRefs(["baseInfoRef", "stepFormPackageRef","stepTableRef", "stepRef", "remarkRef"]) }, - //获取填写完成的表单数据 async getFormData() { - let content = await this.validFormFields(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"]); + let content = await this.validFormFields(["baseInfoRef", "stepFormPackageRef", "stepTableRef","stepRef", "remarkRef"]); + return content; + }, + getResource() { + let content = this.getFilledFormData(); + console.log(content) //生成resource let tmpResource = [] - if (this.fillType === "actFill") { - //配置的试剂 - tmpResource.push({ - mc: content.targetName, - bh: content.targetCode + content.targetCodeSn, - ph: '', - ndz: content.targetActConcentration + content.targetActConcentrationUnit, - nd: content.targetActConcentration, - nddw: content.targetActConcentrationUnit, - ly: 'ELN配制', - sxrq: content.expireDate, - kc: content.targetActVolume, - kcdw: content.targetActVolumeUnit, - syl: null, - type: null, - elnType: this.product, - syldw: content.targetActVolumeUnit, - yxzq: content.effectivePeriod, - yxzqdw: content.effectivePeriodUnit, - }) + if(this.fillType === "actFill"){ + let tableList = content.stepTableFormData + if(tableList && tableList.length>0){ + for(let i=0;i0){ + for(let j=0;j0?fzTotal:null, + syldw:fzTotal>0?item.fzsj.dw:unit, + yxzq:content.effectivePeriod, + yxzqdw:content.effectivePeriodUnit, + }) + } + } + } + if(tmpResource.length>0){ + tmpResource = uniqeResourceOne(tmpResource) } //使用的试剂、仪器 const stepResource = this.$refs.stepRef.getStepResource() - this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || []) - this.yqResourceTmp = stepResource.yqResource || [] - return content; + this.resourceTmp =uniqeResource(tmpResource,stepResource.sjResource||[]) + this.yqResourceTmp = stepResource.yqResource||[] + return this.resourceTmp; }, //保存 async onSave() { diff --git a/src/views/business/comps/template/formConfig/PCRTableConfig.js b/src/views/business/comps/template/formConfig/PCRTableConfig.js index 2963d11..fb463c8 100644 --- a/src/views/business/comps/template/formConfig/PCRTableConfig.js +++ b/src/views/business/comps/template/formConfig/PCRTableConfig.js @@ -28,6 +28,7 @@ export const getLadderColumnsConfig = ($this, selectKey) => { label: 'template.pcr.pcr002.ysqsrytj', prop: 'targetStartSolutionVolume', width: 280, + showWidth: 180, headerSelectKey: 'targetStartSolutionVolumeUnit', fillType: 'preFill', headerOptions: $this.getDictOptions('business_tjdw'), @@ -40,7 +41,8 @@ export const getLadderColumnsConfig = ($this, selectKey) => { bodyPrecisionKey: 'targetStartSolutionVolumePrecision', bodyMaxlength: 10, bodyDisabled: true, - bodySubPlaceholder: 'template.common.xswsPlaceholder' + bodySubPlaceholder: 'template.common.xswsPlaceholder', + headerSelectTo:"actStartSolutionVolumeUnit", }, { label: 'template.pcr.pcr002.sjqsrytj', @@ -69,10 +71,10 @@ export const getLadderColumnsConfig = ($this, selectKey) => { bodyFillType: 'preFill', bodySubFillType: 'preFill', showBodySub: $this.fillType === 'preFill', - bodyPrecisionKey: 'targetDiluentVolumePrecision', bodyMaxlength: 10, - bodySubPlaceholder: 'template.common.xswsPlaceholder' + bodySubPlaceholder: 'template.common.xswsPlaceholder', + headerSelectTo:"actDiluentVolumeUnit", }, { label: 'template.pcr.pcr002.sjxsytj', @@ -96,7 +98,8 @@ export const getLadderColumnsConfig = ($this, selectKey) => { headerOptions: $this.getDictOptions('business_nddw'), bodyType: 'inputNumber', bodyFillType: 'preFill', - bodyMaxlength: 10 + bodyMaxlength: 10, + headerSelectTo:"actSolutionConcentrationUnit", }, { label: 'template.pcr.pcr002.sjmbrynd', @@ -213,7 +216,8 @@ export const getParallelColumnsConfig = ($this) => { headerOptions: $this.getDictOptions('business_tjdw'), bodyType: 'inputNumber', bodyFillType: 'preFill', - bodyMaxlength: 10 + bodyMaxlength: 10, + headerSelectTo:"actSolutionVolumeUnit", }, { label: 'template.sp.sp00456.sjmbrytj',