From b16881fbf542827c1073802afb4229e1f57d3bc3 Mon Sep 17 00:00:00 2001 From: luojie <125330818@qq.com> Date: Mon, 9 Mar 2026 20:36:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86][?= =?UTF-8?q?=E6=9A=82=E5=AD=98]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/comps/template/comps/sp/SP00456.vue | 51 +++++++++++++++++++--- .../template/formConfig/paralleAndLadderConfig.js | 26 +++++++++-- 2 files changed, 66 insertions(+), 11 deletions(-) diff --git a/src/views/business/comps/template/comps/sp/SP00456.vue b/src/views/business/comps/template/comps/sp/SP00456.vue index ee2008b..648c2c6 100644 --- a/src/views/business/comps/template/comps/sp/SP00456.vue +++ b/src/views/business/comps/template/comps/sp/SP00456.vue @@ -10,10 +10,26 @@ ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" /> - - +
+ + + + +
+
{{ $t('template.common.xzpxpz') }} @@ -126,15 +142,19 @@ import templateMixin from "../../mixins/templateMixin.js"; import CustomTable from '@/components/Template/CustomTable.vue'; import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue'; import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"; +import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue" import { getExpireDate, duplicateResource } from "@/utils/index.js"; import { getuuid } from "@/utils/index.js"; import { isCommonUnit } from "@/utils/conTools"; import moment from "moment"; import { addTj, uniqeResource, uniqeResourceOne, addDecimals } from "@/utils/calUnitTools"; -import { getLadderColumnsConfig, getParallelColumnsConfig, getLadderFormConfig, getBaseInfoFormConfig, getRemarkFormConfig, getStorageConditionFormConfig, getParalleStepFormConfig } from "../../formConfig/paralleAndLadderConfig.js"; +import { + getLadderColumnsConfig, getParallelColumnsConfig, getLadderFormConfig, + getBaseInfoFormConfig, getRemarkFormConfig, getStorageConditionFormConfig, getParalleStepFormConfig ,getJcbColumnsConfig +} from "../../formConfig/paralleAndLadderConfig.js"; export default { name: "SP00456", - components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, SelectReagentDialog, TableOpertaion }, + components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, SelectReagentDialog, TableOpertaion, TableOpertaionDelete }, mixins: [templateMixin], props: { fillType: { @@ -155,6 +175,10 @@ export default { }, }, computed: { + //选板信息; + jcbColumns(){ + return getJcbColumnsConfig(this); + }, // 存储条件表单配置 storageFormConfig() { return getStorageConditionFormConfig(this); @@ -183,6 +207,7 @@ export default { }, }, data() { + const labArr = ["LBA005","LBA007"] return { subSolutionVisible: false, currentSubKey: "",//当前点击的子项key @@ -193,6 +218,7 @@ export default { currentTableKey: "",//当前点击的表格key targetAcSolutionFromTable: true,//是否从表格中获取实际原始溶液浓度 currentRowData: {},//当前点击的行数据 + isLba: labArr.includes(this.sn), }; }, mounted() { @@ -204,7 +230,12 @@ export default { } }, methods: { - + deleteJcbRow(rowIndex){ + const jcbRef = this.$refs['jcbRef']; + if (jcbRef) { + jcbRef.deleteRow(rowIndex); + } + }, onBeforeSaveRecord(data, type, configIndex) { if (type === "ladder") { const formFields = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFilledFormData(); @@ -407,6 +438,7 @@ export default { paralleTableFormData: [], showParalleConfig: true }); + this.justUpdateFilledFormData(); }, //新增阶梯配制 handleAddLadder() { @@ -422,6 +454,7 @@ export default { ladderTableFormData: [], showLadderConfig: true }); + this.justUpdateFilledFormData(); }, // 删除阶梯配制配置 deleteConfig(type, config) { @@ -616,8 +649,9 @@ export default { }, //只做校验 async validFields() { + const { isLba } = this; + const refsToValidate = isLba ? ["baseInfoRef", "jcbRef", "remarkRef"]: ["baseInfoRef", "storageConditionRef", "remarkRef"] // 构建需要验证的引用数组 - let refsToValidate = ["baseInfoRef", "storageConditionRef", "remarkRef"]; // 添加阶梯配制相关的引用 if (this.formData.ladderConfigs && this.formData.ladderConfigs.length > 0) { @@ -640,7 +674,10 @@ export default { }, getFilledFormData() { const baseData = this.$refs.baseInfoRef.getFilledFormData(); - const conditionData = this.$refs.storageConditionRef.getFilledFormData(); + let conditionData = {}; + if (!this.isLba) { + conditionData = this.$refs.storageConditionRef.getFilledFormData(); + } // 获取所有阶梯配制数据 const ladderConfigsData = []; diff --git a/src/views/business/comps/template/formConfig/paralleAndLadderConfig.js b/src/views/business/comps/template/formConfig/paralleAndLadderConfig.js index c4de2fc..748fcc1 100644 --- a/src/views/business/comps/template/formConfig/paralleAndLadderConfig.js +++ b/src/views/business/comps/template/formConfig/paralleAndLadderConfig.js @@ -477,7 +477,7 @@ export const getLadderFormConfig = ($this) => { export const getBaseInfoFormConfig = ($this) => { const sn = $this.sn; const labArr = ["LBA005","LBA007"] - const isLab = labArr.includes(sn); + const isLba = labArr.includes(sn); return [ { type: 'cardItem', @@ -509,7 +509,7 @@ export const getBaseInfoFormConfig = ($this) => { }, { type: 'conditionItem', - label:isLab? 'template.lba.lba002.cztj':'template.common.testConfigurationConditions', + label:isLba? 'template.lba.lba002.cztj':'template.common.testConfigurationConditions', config: { pre: { label: 'template.common.preFill', @@ -530,7 +530,7 @@ export const getBaseInfoFormConfig = ($this) => { } } }, - { + isLba?{}:{ type: 'conditionItem', label: 'template.sp.sp00456.rqcz', config: { @@ -546,7 +546,7 @@ export const getBaseInfoFormConfig = ($this) => { }, { type: 'cellItem', - label: 'template.common.configurationTime', + label: isLba?'template.lba.lba002.czsj':'template.common.configurationTime', config: { startDate: { label: 'template.common.startTime', @@ -625,3 +625,21 @@ export const getParalleStepFormConfig = ($this) => { } ] } + +//选板信息; +export const getJcbColumnsConfig = ($this) => { + return [{ + label: 'template.lba.lba002.jcbmc', + prop: 'jcb', + bodyType: 'input', + bodyFillType: 'preFill', + width: 280, + bodyMaxlength:20 + },{ + label: '', + prop: 'jcbBh', + bodyType: 'jcb', + bodyFillType: 'actFill', + width: 280 + }] +} \ No newline at end of file