Browse Source

fix[模板管理]DL016.vue

ouqian
lslaiwy 1 month ago
parent
commit
145e2cb5a8
2 changed files with 44 additions and 10 deletions
  1. +42
    -8
      src/views/business/comps/template/comps/dl/DL016.vue
  2. +2
    -2
      src/views/business/comps/template/comps/dl/DL024.vue

+ 42
- 8
src/views/business/comps/template/comps/dl/DL016.vue View File

@ -21,7 +21,7 @@
fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur" fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur"
@beforeSaveRecord = "beforeSaveRecord" @beforeSaveRecord = "beforeSaveRecord"
:showAddRow="false" :showOperation="false" :showAddRow="false" :showOperation="false"
ref="qcxjjyqkTableRef" :columns="stepColumns" :formData="formData">
ref="qcxjjyqkTableRef" :columns="stepColumns" :formData="qcxjjyqkFormData">
</CustomTable> </CustomTable>
<LineLabel label="template.dl.dl016.czbz" /> <LineLabel label="template.dl.dl016.czbz" />
@ -62,6 +62,13 @@ export default {
}, },
}, },
computed: { computed: {
//
qcxjjyqkFormData() {
return {
stepTableFormData: this.formData.qcxjjyqkData || [],
headerSelectFields: {}
}
},
// //
remarkConig() { remarkConig() {
return [ return [
@ -136,7 +143,7 @@ export default {
label: 'template.dl.dl016.qxbd', label: 'template.dl.dl016.qxbd',
type: 'qxbd', type: 'qxbd',
fillType: 'actFill', fillType: 'actFill',
qxbdType:'DL017',
qxbdType:'DL014',
filledCodes:['bdmc','bdbh'], filledCodes:['bdmc','bdbh'],
}, },
bltj: { bltj: {
@ -194,14 +201,41 @@ export default {
onRegentSubmit(e) { onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e const { selectInfo, key, rowIndex } = e
const { row } = selectInfo const { row } = selectInfo
console.log('selectInfo==============',selectInfo)
console.log('selectInfo==============',selectInfo,key,rowIndex)
if (key === 'qxbd') { if (key === 'qxbd') {
const params = {
jlzb: row.mc,
xybh: row.xh,
xccsjzjdrq: ''
try {
//
const bdnr = JSON.parse(row.bdnr)
console.log('前序表单数据:', bdnr)
//
const qcxjjyqkData = bdnr.qcxjjyqkData || []
// if (qcxjjyqkData.length === 0) {
// this.$message.warning('')
// return
// }
//
const itemData = qcxjjyqkData.map(item => ({
jlzb: item.jlzb || '', //
xybh: item.xybh || '', //
hyqszqk: '', //
hyqcdjqk: '', //
hyqqtqk: '', //
qqpyy: '', //
pbsxd: '', // PBS
pyybrl: '' //
}))
// 使 $set formData CustomTable
this.$set(this.formData, 'qcxjjyqkData', itemData)
this.$message.success(`已从前序表单加载 ${itemData.length} 条剂量组数据`)
} catch (error) {
console.error('解析前序表单数据失败:', error)
this.$message.error('解析前序表单数据失败')
} }
this.$refs.qcxjjyqkTableRef.updateDataSourceByRowIndex(rowIndex, params)
} }
}, },
//table header //table header

+ 2
- 2
src/views/business/comps/template/comps/dl/DL024.vue View File

@ -111,8 +111,8 @@ export default {
label: 'template.dl.dl024.sydd', label: 'template.dl.dl024.sydd',
type: 'select', type: 'select',
fillType: 'actFill', fillType: 'actFill',
options: this.getDictOptions('business_dl_xbmc'),
otherCode: 'xbmcOther',
options: this.getDictOptions('business_sydd'),
otherCode: 'syddOther',
showOtherLabel:false showOtherLabel:false
}, },
} }

Loading…
Cancel
Save