From f07bec0e5ede565c12e58632009fb459e92a4746 Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Tue, 3 Feb 2026 16:29:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86]sp004?= =?UTF-8?q?,5,6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/comps/template/comps/sp/SP003.vue | 2 +- .../business/comps/template/comps/sp/SP00456.vue | 113 +++++++++++++++++---- 2 files changed, 94 insertions(+), 21 deletions(-) diff --git a/src/views/business/comps/template/comps/sp/SP003.vue b/src/views/business/comps/template/comps/sp/SP003.vue index a065f8a..c7b0df5 100644 --- a/src/views/business/comps/template/comps/sp/SP003.vue +++ b/src/views/business/comps/template/comps/sp/SP003.vue @@ -574,8 +574,8 @@ export default { if (tableList && tableList.length > 0) { for (let i = 0; i < tableList.length; i++) { let item = tableList[i] - let fzTotal = 0 //分装 + let fzTotal = 0 //分装总量 if (item.fzsj && item.fzsj.fzList && item.fzsj.fzList) { for (let j = 0; j < item.fzsj.fzList.length; j++) { let fzItem = item.fzsj.fzList[j] diff --git a/src/views/business/comps/template/comps/sp/SP00456.vue b/src/views/business/comps/template/comps/sp/SP00456.vue index 8db3a22..01fd73e 100644 --- a/src/views/business/comps/template/comps/sp/SP00456.vue +++ b/src/views/business/comps/template/comps/sp/SP00456.vue @@ -110,7 +110,7 @@ import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue'; import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"; import { getExpireDate, duplicateResource } from "@/utils/index.js"; import moment from "moment"; -import { addTj, uniqeResource,uniqeResourceOne,addDecimals } from "@/utils/calUnitTools"; +import { addTj, uniqeResource, uniqeResourceOne, addDecimals } from "@/utils/calUnitTools"; import { getLadderColumnsConfig, getParallelColumnsConfig, getLadderFormConfig, getBaseInfoFormConfig, getRemarkFormConfig, getStorageConditionFormConfig, getParalleStepFormConfig } from "../../formConfig/paralleAndLadderConfig.js"; export default { name: "SP00456", @@ -210,7 +210,7 @@ export default { bh: mybh, nd: rowData.actSolutionConcentration || 0, nddw: headerSelectFields.actSolutionConcentrationUnit, - studySubjectId: this.formData.studySubjectId, + studySubjectId: this.formData.studySubjectId, list: list } this.subPackageRequest(postData); @@ -306,7 +306,7 @@ export default { this.$refs[ref][0]?.updateDataSourceByRowIndex(idx, { subTargetSolutionCode: snList[idx], ...expDate }); }); resolve() - }else{ + } else { reject() } @@ -594,6 +594,7 @@ export default { } let content = this.getFilledFormData(); //生成resource + debugger let tmpResource = [] if (this.fillType === "actFill") { //平行配置 @@ -603,11 +604,12 @@ export default { let stepTableFormData = ladderConfigs.stepTableFormData for (let j = 0; j < stepTableFormData.length; j++) { - let fzTotal = 0//分装总量 + //分装 + let fzTotal = 0//分装总量 let fzsj = stepTableFormData[j].fzsj if (fzsj && fzsj.fzList) { for (let k = 0; k < fzsj.fzList.length; k++) { - let fzItem = fzsj.fzList[k] + let fzItem = fzsj.fzList[k] tmpResource.push({ mc: null, bh: fzsj.mybh + fzItem.preCode + fzItem.subCode, @@ -626,10 +628,10 @@ export default { yxzq: ladderConfigs.effectivePeriod, yxzqdw: ladderConfigs.effectivePeriodUnit, }) - fzTotal=addDecimals(fzTotal,fzItem.num) + fzTotal = addDecimals(fzTotal, fzItem.num) } } - + //生成 //计算实际目标溶液体积(实际起始溶液体积+实际稀释液体积) const { total, unit } = addTj([stepTableFormData[j].actStartSolutionVolume, stepTableFormData[j].actDiluentVolume], [ladderConfigs.headerSelectFields.actStartSolutionVolumeUnit, ladderConfigs.headerSelectFields.actDiluentVolumeUnit]) tmpResource.push({ @@ -645,12 +647,47 @@ export default { kcdw: unit, type: null, elnType: this.product, - syl: fzTotal>0?fzTotal:null, - syldw: fzTotal>0?fzsj.dw:unit, + syl: fzTotal > 0 ? fzTotal : null, + syldw: fzTotal > 0 ? fzsj.dw : unit, yxzq: ladderConfigs.effectivePeriod, yxzqdw: ladderConfigs.effectivePeriodUnit, }) - + //起始源溶液 + tmpResource.push({ + mc: null, + bh: ladderConfigs.subStartSolution, + ph: null, + nd: null, + nddw: null, + ndz: null, + ly: null, + sxrq: null, + kc: null, + kcdw: null, + type: 1, + syl: stepTableFormData[j].actStartSolutionVolume, + syldw: ladderConfigs.headerSelectFields.actStartSolutionVolumeUnit, + yxzq: null, + yxzqdw: null, + }) + //稀释液 + tmpResource.push({ + mc: null, + bh: ladderConfigs.subSolution, + ph: null, + nd: null, + nddw: null, + ndz: null, + ly: null, + sxrq: null, + kc: null, + kcdw: null, + type: 1, + syl: stepTableFormData[j].actDiluentVolume, + syldw: ladderConfigs.headerSelectFields.actDiluentVolumeUnit, + yxzq: null, + yxzqdw: null, + }) } } } @@ -660,11 +697,12 @@ export default { let paralleConfigs = content.paralleConfigs[i] let stepTableFormData = paralleConfigs.stepTableFormData for (let j = 0; j < stepTableFormData.length; j++) { - let fzTotal = 0//分装总量 + //分装 + let fzTotal = 0//分装总量 let fzsj = stepTableFormData[j].fzsj if (fzsj && fzsj.fzList) { for (let k = 0; k < fzsj.fzList.length; k++) { - let fzItem = fzsj.fzList[k] + let fzItem = fzsj.fzList[k] tmpResource.push({ mc: null, bh: fzsj.mybh + fzItem.preCode + fzItem.subCode, @@ -683,10 +721,10 @@ export default { yxzq: paralleConfigs.effectivePeriod, yxzqdw: paralleConfigs.effectivePeriodUnit, }) - fzTotal=addDecimals(fzTotal,fzItem.num) + fzTotal = addDecimals(fzTotal, fzItem.num) } } - + //生成 const { total, unit } = addTj([stepTableFormData[j].actSolutionVolume, stepTableFormData[j].actDiluentVolume], [paralleConfigs.headerSelectFields.actSolutionVolumeUnit, paralleConfigs.headerSelectFields.actDiluentVolumeUnit]) tmpResource.push({ mc: null, @@ -701,23 +739,58 @@ export default { kcdw: unit, type: null, elnType: this.product, - syl: fzTotal>0?fzTotal:null, - syldw: fzTotal>0?fzsj.dw:unit, + syl: fzTotal > 0 ? fzTotal : null, + syldw: fzTotal > 0 ? fzsj.dw : unit, yxzq: stepTableFormData[j].targetSolutionCycle, yxzqdw: stepTableFormData[j].targetSolutionCyclePrecision, }) - + //起始源溶液 + tmpResource.push({ + mc: null, + bh: paralleConfigs.subStartSolution, + ph: null, + nd: null, + nddw: null, + ndz: null, + ly: null, + sxrq: null, + kc: null, + kcdw: null, + type: 1, + syl: stepTableFormData[j].actSolutionVolume, + syldw: paralleConfigs.headerSelectFields.actSolutionVolumeUnit, + yxzq: null, + yxzqdw: null, + }) + //稀释液 + tmpResource.push({ + mc: null, + bh: paralleConfigs.subSolution, + ph: null, + nd: null, + nddw: null, + ndz: null, + ly: null, + sxrq: null, + kc: null, + kcdw: null, + type: 1, + syl: stepTableFormData[j].actDiluentVolume, + syldw: paralleConfigs.headerSelectFields.actDiluentVolumeUnit, + yxzq: null, + yxzqdw: null, + }) } } } } - if(tmpResource.length>0){ + if (tmpResource.length > 0) { tmpResource = uniqeResourceOne(tmpResource) } //使用的试剂、仪器 const stepResource = this.getStepResource() - this.resourceTmp =uniqeResource(tmpResource,stepResource.sjResource||[]) - this.yqResourceTmp = stepResource.yqResource||[] + this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || []) + this.yqResourceTmp = stepResource.yqResource || [] this.resourceTmp = tmpResource return content;