Browse Source

feat: [模板管理] DL012使用的细胞修改-多选+其他

zhangteng
memorylkf 5 days ago
parent
commit
c94cc6ff62
2 changed files with 30 additions and 23 deletions
  1. +28
    -21
      src/views/business/comps/template/comps/dl/DL012.vue
  2. +2
    -2
      src/views/business/comps/template/dialog/SelectMixReagentDialog.vue

+ 28
- 21
src/views/business/comps/template/comps/dl/DL012.vue View File

@ -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,

+ 2
- 2
src/views/business/comps/template/dialog/SelectMixReagentDialog.vue View File

@ -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,

Loading…
Cancel
Save