From b7834cdfe9412a873440fca29f155a1a51a4eb98 Mon Sep 17 00:00:00 2001 From: memorylkf <312904636@qq.com> Date: Thu, 12 Feb 2026 15:27:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86]?= =?UTF-8?q?=20GSP009+GSP011=20=E7=94=9F=E6=88=90=E7=BC=96=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/comps/template/comps/gsp/GSP009.vue | 87 +++++++++++++++++----- .../business/comps/template/comps/lba/LBA006.vue | 6 +- 2 files changed, 72 insertions(+), 21 deletions(-) diff --git a/src/views/business/comps/template/comps/gsp/GSP009.vue b/src/views/business/comps/template/comps/gsp/GSP009.vue index 1a7578d..4e367a6 100644 --- a/src/views/business/comps/template/comps/gsp/GSP009.vue +++ b/src/views/business/comps/template/comps/gsp/GSP009.vue @@ -29,6 +29,9 @@ {{ $t('template.lba.lba004.sc')}} @@ -163,7 +166,7 @@ export default { }, xz: { label: 'template.gsp.gsp009.xz', - type: "sj", + type: "mix", fillType: "actFill", subType:"text", subText:this.sn=='GSP009'?'template.gsp.gsp009.zw':'template.gsp.gsp011.zw' @@ -180,8 +183,30 @@ export default { }, mounted() { this.handleAddParalle(true); + const formData = this.getFormDataByTemplateData(); + if(this.fillType === "actFill"){ + this.getCode(formData); + } }, methods: { + //获取目标溶液编号 + async getCode(content){ + if (content.paralleConfigs && content.paralleConfigs.length > 0 && !content.paralleConfigs[0].ypBh) { + const codes = content.paralleConfigs.map((item) => ({ pre: item.yp, type: 1 })); + const snList = await this.getLatestSnArr(codes); + content.paralleConfigs.forEach((row, idx) => { + this.$refs[`paralleStepFormPackageRef_${idx}`][0].updateFormData('ypBh',snList[idx]) + }); + const params = { + type: "fieldChanged", + newRecord: null, + resourceList: null, + } + setTimeout(() => { + EventBus.$emit('onModifyRecord', params,) + }, 10); + } + }, //获取已填写的表单数据 getFilledFormData() { const baseData = this.$refs.baseInfoRef.getFilledFormData(); @@ -230,8 +255,45 @@ export default { }, getResource() { let content = this.getFilledFormData(); + //生成resource + let tmpResource = [] + if (this.fillType === "actFill") { + //平行配置 + if (content.paralleConfigs && content.paralleConfigs.length > 0) { + for (let i = 0; i < content.paralleConfigs.length; i++) { + let paralleConfigs = content.paralleConfigs[i] + //使用量 + tmpResource.push({ + mc: null, + bh: paralleConfigs.xz, + ph: null, + nd: null, + nddw: null, + ndz: null, + ly: null, + sxrq: null, + kc: null, + kcdw: null, + type: 1, + syl: null, + syldw: null, + yxzq: null, + yxzqdw: null, + }) + } + } + } + if (tmpResource.length > 0) { + tmpResource = uniqeResourceOne(tmpResource) + } + tmpResource.forEach((row, idx) => { + row.syldw = null + row.syl = null + }); + + debugger //使用的试剂、仪器 - this.resourceTmp = [] + this.resourceTmp = tmpResource this.yqResourceTmp = [] return this.resourceTmp; }, @@ -242,7 +304,6 @@ export default { }, //新增平行配制 handleAddParalle(init) { - debugger let isAdd = !init if(init && (!this.formData.paralleConfigs || this.formData.paralleConfigs.length===0)){ isAdd = true @@ -258,7 +319,6 @@ export default { }); } //todo: 需要回调保存? - debugger }, // 删除平行配制配置 deleteParalleConfig(index) { @@ -268,21 +328,12 @@ export default { } this.formData.paralleConfigs.splice(index, 1); }, - // 删除表格行 - deleteRow(rowIndex, type, configIndex = 0) { - // 根据类型删除对应的表格行 - if (type === 'ladder') { - const tableRef = this.$refs[`ladderStepTableRef_${configIndex}`]; - if (tableRef) { - tableRef.deleteRow(rowIndex); - } - } else if (type === 'paralle') { - const tableRef = this.$refs[`paralleStepTableRef_${configIndex}`]; - if (tableRef) { - tableRef[0].deleteRow(rowIndex); - } - } + onTableBeforeReagentSubmit(val1,va2,va3){ + debugger }, + onTableRegentSubmit(val1,va2,va3){ + debugger + } } }; diff --git a/src/views/business/comps/template/comps/lba/LBA006.vue b/src/views/business/comps/template/comps/lba/LBA006.vue index 0537695..6bd877b 100644 --- a/src/views/business/comps/template/comps/lba/LBA006.vue +++ b/src/views/business/comps/template/comps/lba/LBA006.vue @@ -183,7 +183,9 @@ export default { }; }, mounted() { - this.handleAddParalle(true); + setTimeout(()=>{ + this.handleAddParalle(true); + },300) }, methods: { //获取已填写的表单数据 @@ -246,7 +248,6 @@ export default { }, //新增平行配制 handleAddParalle(init) { - debugger let isAdd = !init if(init && (!this.formData.paralleConfigs || this.formData.paralleConfigs.length===0)){ isAdd = true @@ -261,7 +262,6 @@ export default { showParalleConfig: true }); } - debugger }, // 删除平行配制配置 deleteParalleConfig(index) {