diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue index e64b4b6..9505e44 100644 --- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue +++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue @@ -253,8 +253,8 @@ export default { formData: { immediate: true, handler(v) { - if(!v.targetCodeSn && this.fillType === "actFill"){ - this.getCode(); + if(this.fillType === "actFill"){ + this.getCode(v); } } } @@ -291,12 +291,28 @@ export default { } }, //获取目标溶液编号 - async getCode(){ - const result = await getLatestSn({ - count: 1, - }) - if(result.code == 200){ - this.$refs.stepFormPackageRef.updateFormData("targetCodeSn",result.data) + async getCode(v){ + debugger + const {stepTableFormData = []} = v; + if(stepTableFormData && stepTableFormData.length>0 && !stepTableFormData[0].bhCode){ + const result = await getLatestSn({ + count: stepTableFormData.length, + }) + if(result.code == 200){ + debugger + if(stepTableFormData.length===0){ + this.$refs.tableRef.updateDataSourceByRowIndex(0,{ + [bhCode]: result.data, + }) + }else{ + for(let i=0;i { prop: 'bh', bodyType: 'select', bodyOptions: $this.getDictOptions('business_jmdyzqdyp'), - subType: 'span', - subKey: 'bhCode', + bodySubType: 'span', + bodySubKey: 'bhCode', bodyFillType: 'preFill', width: 280 },