From e1fd6d7dc5b8c6e0a4ca79652c6de91c96df4d7b Mon Sep 17 00:00:00 2001 From: luojie <125330818@qq.com> Date: Tue, 7 Apr 2026 11:01:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86][upd?= =?UTF-8?q?ate]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Template/StepComponents/ZLSubPackage.vue | 2 +- src/components/Template/StepComponents/ry/zlfz.vue | 43 ++++++++++++++++++++-- src/components/Template/mixins/stepMixins.js | 1 + .../template/dialog/SelectMixReagentDialog.vue | 2 + 4 files changed, 43 insertions(+), 5 deletions(-) diff --git a/src/components/Template/StepComponents/ZLSubPackage.vue b/src/components/Template/StepComponents/ZLSubPackage.vue index fcfcb40..10400b5 100644 --- a/src/components/Template/StepComponents/ZLSubPackage.vue +++ b/src/components/Template/StepComponents/ZLSubPackage.vue @@ -260,7 +260,7 @@ export default { }, onReset() { this.fzList.forEach((item, index) => { - item.num = ""; + item.actnum = ""; // 同时更新错误状态 if (this.fzListErrors[index] !== undefined) { this.$set(this.fzListErrors, index, false); diff --git a/src/components/Template/StepComponents/ry/zlfz.vue b/src/components/Template/StepComponents/ry/zlfz.vue index 939b2bc..e818924 100644 --- a/src/components/Template/StepComponents/ry/zlfz.vue +++ b/src/components/Template/StepComponents/ry/zlfz.vue @@ -9,6 +9,9 @@ import StepFormPackage from '@/components/Template/StepFormPackage.vue'; import stepMixins from '@/components/Template/mixins/stepMixins.js'; import { compareVolume } from '@/utils/volumeTools.js'; +import { + sj_subpackage, +} from '@/api/business/sj/sj' export default { mixins: [stepMixins], components: { @@ -64,13 +67,16 @@ export default { if (res) { const { zlfz } = res; const gspInfo = res.selectInfo_gsp || {}; - const { kc, kcdw } = gspInfo; + const { kc, kcdw, gg, ggdw, bh } = gspInfo; const dw = zlfz.formData.dw; const errMsg = "分装后小份容量之和大于母液容量,是否确认分装?" const totalVolume = zlfz.fzList.reduce((acc, cur) => acc + Number(cur.actnum), 0); const compareResult = compareVolume(totalVolume, dw, kc, kcdw); const fzInfo = { ...zlfz.formData, + gg, + ggdw, + bh, fzList: zlfz.fzList, }; if (compareResult > 0 || !kc) {//没有填写实际溶液体积的也需要提示错误信息 @@ -96,10 +102,39 @@ export default { } }, - submitEmit(fzInfo) { + async submitEmit(fzInfo) { this.$refs.stepFormPackageRef.updateFormData("fzInfo", fzInfo); - this.$message.success("质量分装成功"); - this.justUpdateFilledFormData(); + const { dw,bh, gg, ggdw, fzList = [] } = fzInfo; + if(!fzList.length){ + this.$message.error("请填写分装信息"); + return; + } + const list = fzList.map((item) => { + return { + bh: item.preCode, + kc: item.actnum, + kcdw: dw, + } + }) + let postData = { + studyId: this.templateData.studyId, + studyFormId: this.templateData.id, + bh, + gg, + ggdw, + studySubjectId: this.templateData.studySubjectId, + studyId: this.templateData.studyId, + studyFormId: this.templateData.id, + list: list + } + const res = await sj_subpackage(postData) + if (res.code === 200) { + this.$message.success('分装成功') + this.justUpdateFilledFormData(); + } else { + this.$message.error('分装失败') + } + } } } diff --git a/src/components/Template/mixins/stepMixins.js b/src/components/Template/mixins/stepMixins.js index 3160df4..f038245 100644 --- a/src/components/Template/mixins/stepMixins.js +++ b/src/components/Template/mixins/stepMixins.js @@ -4,6 +4,7 @@ import { getLatestSn, getLatestSnArr } from '@/api/template' export default { inject: { templateFillType: { default: 'preFill' }, + templateData: { default: {} }, templateSn: { default: '' }, getStepData: { default: () => null }, getJcbData: { default: () => null }, diff --git a/src/views/business/comps/template/dialog/SelectMixReagentDialog.vue b/src/views/business/comps/template/dialog/SelectMixReagentDialog.vue index ff36f99..5f984e8 100644 --- a/src/views/business/comps/template/dialog/SelectMixReagentDialog.vue +++ b/src/views/business/comps/template/dialog/SelectMixReagentDialog.vue @@ -189,6 +189,8 @@ export default { type: Number(this.selectType), kc: row.kc, kcdw: row.kcdw, + gg: row.gg, + ggdw: row.ggdw, } const {qxbdType,checkType} = this; if(qxbdType){