diff --git a/src/views/business/comps/template/comps/dl/DL012.vue b/src/views/business/comps/template/comps/dl/DL012.vue index 6a7931c..1f7cd96 100644 --- a/src/views/business/comps/template/comps/dl/DL012.vue +++ b/src/views/business/comps/template/comps/dl/DL012.vue @@ -359,9 +359,12 @@ export default { onTableRegentSubmit(data) { if (data.key === 'xbzbqbh') { const selectedRows = data.selectInfo?.selectedRows || [] - const firstRow = selectedRows[0] || {} - this.$refs.xbxxRef.updateFormData('xbzbqbh_tj', firstRow.tj) - this.$refs.xbxxRef.updateFormData('xbzbqbh_dw', firstRow.tjdw) + this.$refs.xbxxRef.updateFormData('xbzbqbh_count', selectedRows.length) + for(let i=1; i<=selectedRows.length; i++){ + const row = selectedRows[i-1] || {} + this.$refs.xbxxRef.updateFormData(`xbzbqbh_bh_${i}`, row.bh) + this.$refs.xbxxRef.updateFormData(`xbzbqbh_dw_${i}`, row.tjdw || '') + } } if (data.key === 'pyxbh') { const row = data.selectInfo?.row || {} @@ -426,24 +429,28 @@ export default { }) } //使用细胞 - tmpResource.push({ - mc: null, - bh: content.xbzbqbh, - ph: '', - ndz: '', - nd: '', - nddw: '', - ly: '', - sxrq: null, - kc: null, - kcdw: null, - syl: null, - type: 9, //使用的时候传对应的值 - elnType: null, //传null - syldw: content.xbzbqbh_dw, - yxzq: null, - yxzqdw: null, - }) + let xbzbqbh_count = content.xbzbqbh_count || formData.xbzbqbh_count || 0; + for(let i=1; i<=xbzbqbh_count; i++){ + tmpResource.push({ + mc: null, + bh: content[`xbzbqbh_bh_${i}`] || formData[`xbzbqbh_bh_${i}`], + ph: '', + ndz: '', + nd: '', + nddw: '', + ly: '', + sxrq: null, + kc: null, + kcdw: null, + syl: null, + type: 9, //使用的时候传对应的值 + elnType: null, //传null + syldw: content[`xbzbqbh_dw_${i}`] || formData[`xbzbqbh_dw_${i}`], + yxzq: null, + yxzqdw: null, + }) + } + //使用仪器 tmpYq.push({ mc: content.pyxbh_mc || formData.pyxbh_mc, diff --git a/src/views/business/comps/template/dialog/SelectMixReagentDialog.vue b/src/views/business/comps/template/dialog/SelectMixReagentDialog.vue index 6344135..2646ca9 100644 --- a/src/views/business/comps/template/dialog/SelectMixReagentDialog.vue +++ b/src/views/business/comps/template/dialog/SelectMixReagentDialog.vue @@ -179,7 +179,7 @@ export default { this.$emit('cancel'); }, onSubmit() { - let row = this.otherChecked ? {bh: this.otherReagent}:this.currentRow; + let row = this.otherChecked ?(this.checkType === "checkbox"?[{bh: this.otherReagent}]:{bh: this.otherReagent}):this.currentRow; const selectedValue = this.otherChecked ? this.otherReagent : this.selectedId; const selectInfo = this.otherChecked ?{ mc: "", @@ -232,7 +232,7 @@ export default { if(this.otherChecked && this.otherReagent){ selectedInfo = this.otherReagent; }else{ - selectedInfo = row.map((item)=>(item.bdbh||item.bh)).join(","); + selectedInfo = row.map((item)=>(item.bdbh||item.bh)).join("、"); } callbackData = { uuid: this.uuid,