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(() => { //通知后端保存数据