From d53004f8b32e7b698f3b8b118cdca09d3b6b2628 Mon Sep 17 00:00:00 2001 From: luojie <125330818@qq.com> Date: Thu, 22 Jan 2026 19:24:27 +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 --- src/views/business/comps/template/comps/sp/SWYPBQGZYZBB.vue | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/views/business/comps/template/comps/sp/SWYPBQGZYZBB.vue b/src/views/business/comps/template/comps/sp/SWYPBQGZYZBB.vue index 6633ee0..b2e696e 100644 --- a/src/views/business/comps/template/comps/sp/SWYPBQGZYZBB.vue +++ b/src/views/business/comps/template/comps/sp/SWYPBQGZYZBB.vue @@ -265,8 +265,8 @@ export default { label: "目标溶液编号", prop: "targetSolutionCode", bodyType: "input", - subType: "span", - subKey: "subTargetSolutionCode", + bodySubType: "span", + bodySubKey: "subTargetSolutionCode", bodyFillType: "preFill", width: 280 }, @@ -409,16 +409,17 @@ export default { }; }, mounted() { - }, methods: { //更新代码 async handleUpdateCode() { - const ref = this.$refs.stepTableRef; - const {stepTableFormData} = this.formData; + const {stepTableFormData = []} = this.formData; + if(stepTableFormData.length === 0){ + return; + } const snList = await this.getLatestSn(stepTableFormData.length); stepTableFormData.forEach((item,index) => { - ref.updateDataSourceByRowIndex(index,{subTargetSolutionCode: stepTableFormData.length==1?snList:snList[index]}); + this.$refs.stepTableRef.updateDataSourceByRowIndex(index,{subTargetSolutionCode: stepTableFormData.length==1?snList:snList[index]}); }) this.$nextTick(() => { //通知后端保存数据