From 28a81a4f084d26570160d067d3bbeb324191adca Mon Sep 17 00:00:00 2001 From: memorylkf <312904636@qq.com> Date: Tue, 10 Feb 2026 16:30:47 +0800 Subject: [PATCH 1/7] =?UTF-8?q?feat:=20[=E6=A8=A1=E6=9D=BF=E7=AE=A1?= =?UTF-8?q?=E7=90=86]=20LBA004?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lang/en/template/lba.js | 14 + src/lang/zh/template/lba.js | 14 + .../business/comps/template/TemplateTable.vue | 5 +- .../business/comps/template/comps/lba/LBA004.vue | 376 +++++++++++++++++++++ 4 files changed, 408 insertions(+), 1 deletion(-) create mode 100644 src/views/business/comps/template/comps/lba/LBA004.vue diff --git a/src/lang/en/template/lba.js b/src/lang/en/template/lba.js index 8f775b7..5e0824f 100644 --- a/src/lang/en/template/lba.js +++ b/src/lang/en/template/lba.js @@ -9,5 +9,19 @@ export default { lba003: { jclc: 'Testing Process', fj: 'Attachment' + }, + lba004: { + xbxx: 'Analysis Plate Information', + ypxx: 'Sample Information', + xszj: '稀释组件', + xz: 'Add', + sc: 'Delete', + jzmc: '基质名称', + xh: '序号', + xsbs: '稀释倍数', + ysypjrz: '预设样品加入值', + sjypjrz: '实际样品加入值', + ysjzjrz: '预设基质加入值', + sjjzjrz: '实际基质加入值' } } diff --git a/src/lang/zh/template/lba.js b/src/lang/zh/template/lba.js index 191723f..a6de2d6 100644 --- a/src/lang/zh/template/lba.js +++ b/src/lang/zh/template/lba.js @@ -9,5 +9,19 @@ export default { lba003: { jclc: '检测流程', fj: '附件' + }, + lba004: { + xbxx: '选板信息', + ypxx: '样品信息', + xszj: '稀释组件', + xz: '新增', + sc: '删除', + jzmc: '基质名称', + xh: '序号', + xsbs: '稀释倍数', + ysypjrz: '预设样品加入值', + sjypjrz: '实际样品加入值', + ysjzjrz: '预设基质加入值', + sjjzjrz: '实际基质加入值' } } diff --git a/src/views/business/comps/template/TemplateTable.vue b/src/views/business/comps/template/TemplateTable.vue index a700d38..fb86766 100644 --- a/src/views/business/comps/template/TemplateTable.vue +++ b/src/views/business/comps/template/TemplateTable.vue @@ -55,6 +55,7 @@ import PCR002 from "./comps/pcr/PCR002.vue"; // LBA001-使用SP001 import LBA002 from "./comps/lba/LBA002.vue"; import LBA003 from "./comps/lba/LBA003.vue"; +import LBA004 from "./comps/lba/LBA004.vue"; //ADA // ADA001-使用SP001 @@ -78,7 +79,8 @@ export default { PCR002, //LBA LBA002, - LBA003 + LBA003, + LBA004 }, props: { sn: { @@ -134,6 +136,7 @@ export default { 'LBA001': 'SP001', 'LBA002': 'LBA002', 'LBA003': 'LBA003', + 'LBA004': 'LBA004', //ADA 'ADA001': 'SP001', 'ADA002': 'LBA002', diff --git a/src/views/business/comps/template/comps/lba/LBA004.vue b/src/views/business/comps/template/comps/lba/LBA004.vue new file mode 100644 index 0000000..e3eee7c --- /dev/null +++ b/src/views/business/comps/template/comps/lba/LBA004.vue @@ -0,0 +1,376 @@ + + + + + \ No newline at end of file From d0a8191ad5f840fdeb4ac40538c461a3080ad365 Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Tue, 10 Feb 2026 18:00:26 +0800 Subject: [PATCH 2/7] =?UTF-8?q?fix:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86]?= =?UTF-8?q?=E9=BA=BB=E7=B2=BE=E8=8D=AF=E9=85=8D=E7=BD=AE=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lang/en/template/commonTemplate.js | 1 + src/lang/zh/template/commonTemplate.js | 1 + .../comps/template/comps/gsp/DMYPPZJLB.vue | 214 ++++++++++++++++----- 3 files changed, 165 insertions(+), 51 deletions(-) diff --git a/src/lang/en/template/commonTemplate.js b/src/lang/en/template/commonTemplate.js index 550f11f..d8846ac 100644 --- a/src/lang/en/template/commonTemplate.js +++ b/src/lang/en/template/commonTemplate.js @@ -46,6 +46,7 @@ export default { // 按钮 saveBtn: 'Save', + addBtn: 'Add', deleteBtn: 'Delete', // 错误提示 diff --git a/src/lang/zh/template/commonTemplate.js b/src/lang/zh/template/commonTemplate.js index fe037a2..4c709ff 100644 --- a/src/lang/zh/template/commonTemplate.js +++ b/src/lang/zh/template/commonTemplate.js @@ -46,6 +46,7 @@ export default { // 按钮 + addBtn: '新增', saveBtn: '保存', deleteBtn: '刪除', diff --git a/src/views/business/comps/template/comps/gsp/DMYPPZJLB.vue b/src/views/business/comps/template/comps/gsp/DMYPPZJLB.vue index 96af2f0..75888b4 100644 --- a/src/views/business/comps/template/comps/gsp/DMYPPZJLB.vue +++ b/src/views/business/comps/template/comps/gsp/DMYPPZJLB.vue @@ -2,31 +2,49 @@ @@ -41,6 +59,7 @@ import { getLatestSn } from '@/api/template'; import { EventBus } from "@/utils/eventBus"; import { uniqeResource } from "@/utils/calUnitTools"; import { debounce } from 'lodash-es' +import { duplicateResource, getExpireDate } from "@/utils/index.js"; export default { name: "DMYPPZJLB", @@ -249,13 +268,32 @@ export default { }, mounted() { const formData = this.getFormDataByTemplateData(); - if(!formData.targetCodeSn&& this.fillType === "actFill"){ + if (!formData.targetCodeSn && this.fillType === "actFill") { this.getCode(formData); + } else { + if (!this.formData.formConfigs) { + this.$set(this.formData, 'formConfigs', []); + this.formData.formConfigs.push({ + formConfigs: [], + }); + } } - }, methods: { - //打印标签 + //新增 + handleAddFormConfig() { + if (!this.formData.formConfigs) { + this.$set(this.formData, 'formConfigs', []); + } + this.formData.formConfigs.push({ + formConfigs: [], + }); + }, + //删除 + handleDeleteFormConfig(index) { + this.formData.formConfigs.splice(index, 1); + }, + //todo 打印标签 printTag() { const printConfig = this.getBasePrintConfig(); const { storageCondition, targetCodeSn } = this.formData; @@ -264,58 +302,123 @@ export default { EventBus.$emit('showTagPrintDialog', { printConfig }) }, - //获取目标溶液编号 + //填报获取编号 getCode: debounce(async function (v) { - const result = await getLatestSn({ - count: 1, - pre:v.targetCode, - type:1 - }) - if (result.code == 200) { - this.$refs.stepFormPackageRef.updateFormData("targetCodeSn", result.data[0]) + if (this.formData.formConfigs && this.formData.formConfigs.length > 0) { + for (let i = 0; i < this.formData.formConfigs.length; i++) { + let item = this.formData.formConfigs[i] + const result = await getLatestSn({ + count: 1, + pre: item.targetCode, + type: 1 + }) + if (result.code == 200) { + this.$refs[`formConfigStepFormPackageRef_${i}`][0].updateFormData("targetCodeSn", result.data[0]) + } + } } }, 100), - //获取已填写的表单数据 + //获取字段值,不检验 getFilledFormData() { - return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"]) + const baseData = this.$refs.baseInfoRef.getFilledFormData(); + const conditionData = this.$refs.storageConditionRef.getFilledFormData(); + const formConfigsData = []; + if (this.formData.formConfigs && this.formData.formConfigs.length > 0) { + for (let i = 0; i < this.formData.formConfigs.length; i++) { + const formData = this.$refs[`formConfigStepFormPackageRef_${i}`][0].getFilledFormData(); + const stepData = this.$refs[`formStepRef_${i}`][0].getFilledFormData(); + if(this.formData.startDate&&formData.effectivePeriod&&formData.effectivePeriodUnit){ + formData.expireDate=getExpireDate(this.formData.startDate, formData.effectivePeriod, formData.effectivePeriodUnit) + } + formConfigsData.push({ + ...formData, + ...stepData, + }); + } + } + const remarkData = this.$refs.remarkRef.getFilledFormData(); + return { + ...baseData, + ...conditionData, + formConfigs: formConfigsData, + ...remarkData + } + }, + //检验 + async validFields() { + // 构建需要验证的引用数组 + let refsToValidate = ["baseInfoRef", "storageConditionRef", "remarkRef"]; + + if (this.formData.formConfigs && this.formData.formConfigs.length > 0) { + for (let i = 0; i < this.formData.formConfigs.length; i++) { + refsToValidate.push(`formConfigStepFormPackageRef_${i}`); + refsToValidate.push(`formStepRef_${i}`); + } + } + + return await this.validFormFields(refsToValidate); }, - //获取填写完成的表单数据 + //获取字段值 async getFormData() { - let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"]); + //先校验再获取值 + const validFlag = await this.validFields(); + if (!validFlag) { + return false; + } + let content = this.getFilledFormData(); + return content; + }, + //获取生成,使用物资 + getResource() { + let content = this.getFilledFormData(); //生成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, - }) + let tableList = content.formConfigs + if (tableList && tableList.length > 0) { + for (let i = 0; i < tableList.length; i++) { + let item = tableList[i] + tmpResource.push({ + mc: item.targetName, + bh: item.targetCode + item.targetCodeSn, + ph: '', + ndz: item.targetActConcentration + item.targetActConcentrationUnit, + nd: item.targetActConcentration, + nddw: item.targetActConcentrationUnit, + ly: 'ELN配制', + sxrq: item.expireDate, + kc: item.targetActVolume, + kcdw: item.targetActVolumeUnit, + syl: null, + type: null, + elnType: this.product, + syldw: item.targetActVolumeUnit, + yxzq: item.effectivePeriod, + yxzqdw: item.effectivePeriodUnit, + }) + } + } } //使用的试剂、仪器 - const stepResource = this.$refs.stepRef.getStepResource() - this.resourceTmp =uniqeResource(tmpResource,stepResource.sjResource||[]) - this.yqResourceTmp = stepResource.yqResource||[] - return content; + const stepResource = this.getStepResource() + this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || []) + this.yqResourceTmp = stepResource.yqResource || [] + debugger + return this.resourceTmp; }, - //保存 - async onSave() { - let content =await this.$refs.stepRef.getFormData(); - console.log(content); - + //获取步骤使用物资 + getStepResource() { + const sjResource = [], yqResource = []; + if (this.formData.formConfigs && this.formData.formConfigs.length > 0) { + for (let i = 0; i < this.formData.formConfigs.length; i++) { + const paralleResource = this.$refs[`formStepRef_${i}`][0].getStepResource(); + sjResource.push(...paralleResource.sjResource); + yqResource.push(...paralleResource.yqResource); + } + } + //去重 + const { sj, yq } = duplicateResource(sjResource, yqResource) + return { sjResource: sj, yqResource: yq }; }, } }; @@ -328,4 +431,13 @@ export default { .print-btn { margin-bottom: 20px; } + +.config-header-right { + margin-bottom: 15px; + font-weight: bold; + font-size: 16px; + color: #303133; + text-align: right; + width: 100%; +} \ No newline at end of file From 96cbb9799dbc812b8692979c3ea65a1ce5f286e3 Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Tue, 10 Feb 2026 18:08:19 +0800 Subject: [PATCH 3/7] =?UTF-8?q?fix:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86]?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/business/comps/template/mixins/templateMixin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/business/comps/template/mixins/templateMixin.js b/src/views/business/comps/template/mixins/templateMixin.js index c071b31..d4f23bb 100644 --- a/src/views/business/comps/template/mixins/templateMixin.js +++ b/src/views/business/comps/template/mixins/templateMixin.js @@ -58,9 +58,9 @@ export default { this.resource = _.filter(JSON.parse(v.resource), function (o) { return o.type == 1 || o.elnType == 1 }) - //试验物资信息 供试品、给药制剂 + //试验物资信息 供试品、给药制剂、麻精药 this.resourceWz = _.filter(JSON.parse(v.resource), function (o) { - return o.type == 3 || o.type == 7 || o.elnType == 3 || o.elnType == 7 + return o.type == 3 || o.type == 5 || o.type == 7 || o.elnType == 3|| o.elnType == 5 || o.elnType == 7 }) } if (v.yqResource) { From 73c40e28710e318efa0ca170438e98d6a5470176 Mon Sep 17 00:00:00 2001 From: memorylkf <312904636@qq.com> Date: Tue, 10 Feb 2026 18:11:52 +0800 Subject: [PATCH 4/7] =?UTF-8?q?feat:=20[=E6=A8=A1=E6=9D=BF=E7=AE=A1?= =?UTF-8?q?=E7=90=86]=20LBA004?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/business/public/public.js | 8 + src/components/Template/HandleFormItem.vue | 3 +- src/lang/en/template/lba.js | 4 +- src/lang/zh/template/lba.js | 4 +- .../business/comps/template/comps/lba/LBA002.vue | 3 +- .../business/comps/template/comps/lba/LBA004.vue | 128 +++++++-- .../template/comps/sp/SWYPFXFFXYPZBB/SP008.vue | 1 + .../template/comps/sp/SWYPFXFFXYPZBB/SP009.vue | 4 +- .../template/comps/sp/SWYPFXFFXYPZBB/SP010.vue | 1 + .../template/comps/sp/SWYPFXFFXYPZBB/SP011.vue | 1 + .../template/comps/sp/SWYPFXFFXYPZBB/SP012.vue | 1 + .../template/comps/sp/SWYPFXFFXYPZBB/SP013.vue | 1 + .../template/comps/sp/SWYPFXFFXYPZBB/SP014.vue | 1 + .../template/comps/sp/SWYPFXFFXYPZBB/SP015.vue | 1 + .../template/comps/sp/SWYPFXFFXYPZBB/SP016.vue | 1 + .../template/comps/sp/SWYPFXFFXYPZBB/SP017.vue | 1 + .../template/comps/sp/SWYPFXFFXYPZBB/SP018.vue | 1 + .../template/dialog/SelectMixReagentDialog.vue | 10 +- .../comps/template/formConfig/formConfig.js | 302 +++++++++++---------- 19 files changed, 309 insertions(+), 167 deletions(-) diff --git a/src/api/business/public/public.js b/src/api/business/public/public.js index 96d3658..f8d8b6a 100644 --- a/src/api/business/public/public.js +++ b/src/api/business/public/public.js @@ -131,3 +131,11 @@ export function public_saveSimpleLog(query) { params: query }) } +// 检测板 +export function public_jcbList(query) { + return request({ + url: '/system/business/public/jcbList', + method: 'get', + params: query + }) +} diff --git a/src/components/Template/HandleFormItem.vue b/src/components/Template/HandleFormItem.vue index 6dbfdcf..5c9e901 100644 --- a/src/components/Template/HandleFormItem.vue +++ b/src/components/Template/HandleFormItem.vue @@ -202,7 +202,7 @@ export default { visible: false,//是否显示弹窗 checkboxValue: this.getChecked(),//是否选中 uuid: getuuid(), // 唯一标识符,用于EventBus事件匹配 - regentType: ['sj', 'gsp', 'mix', 'xj', 'xb', 'gyzj', 'mjy', 'yq'], //试剂/仪器/供试品等类型 + regentType: ['sj', 'gsp', 'mix', 'xj', 'xb', 'gyzj', 'mjy', 'yq','jcb'], //试剂/仪器/供试品等类型 selectRegentInfo: {},//选择的试剂/仪器/供试品等信息 fileList: [],//上传的文件列表 uploadFileUrl: process.env.VUE_APP_BASE_API + "/file/upload", @@ -348,6 +348,7 @@ export default { mjy: "5",//麻精药 xj: "9",//细菌 xb: "11",//细胞 + jcb: "13",//检测板 } params = { ...params, diff --git a/src/lang/en/template/lba.js b/src/lang/en/template/lba.js index 5e0824f..69ae582 100644 --- a/src/lang/en/template/lba.js +++ b/src/lang/en/template/lba.js @@ -4,7 +4,9 @@ export default { lba002: { cztj: 'Work Condition', czsj: 'Work Time', - jcbmc: 'Analysis Plate Name' + jcbmc: 'Analysis Plate Name', + cjr: 'Creator', + cjsj: 'Creation Date' }, lba003: { jclc: 'Testing Process', diff --git a/src/lang/zh/template/lba.js b/src/lang/zh/template/lba.js index a6de2d6..ef20ee2 100644 --- a/src/lang/zh/template/lba.js +++ b/src/lang/zh/template/lba.js @@ -4,7 +4,9 @@ export default { lba002: { cztj: '操作条件', czsj: '操作时间', - jcbmc: '检测板名称' + jcbmc: '检测板名称', + cjr: '创建人', + cjsj: '创建时间' }, lba003: { jclc: '检测流程', diff --git a/src/views/business/comps/template/comps/lba/LBA002.vue b/src/views/business/comps/template/comps/lba/LBA002.vue index 95c515b..267750e 100644 --- a/src/views/business/comps/template/comps/lba/LBA002.vue +++ b/src/views/business/comps/template/comps/lba/LBA002.vue @@ -21,8 +21,9 @@ :formData="formData" :prefixKey = "`table`" fieldItemLabel = "template.common.operationSteps" + :showOperation="fillType === 'preFill'" > -