Browse Source

fix:[模板管理][DL007~DL015功能核验]

ouqian
ouqian 1 month ago
parent
commit
e3f562f4ef
6 changed files with 98 additions and 33 deletions
  1. +2
    -1
      src/views/business/comps/template/comps/dl/DL007.vue
  2. +1
    -1
      src/views/business/comps/template/comps/dl/DL011.vue
  3. +1
    -1
      src/views/business/comps/template/comps/dl/DL012.vue
  4. +41
    -10
      src/views/business/comps/template/comps/dl/DL013.vue
  5. +29
    -7
      src/views/business/comps/template/comps/dl/DL014.vue
  6. +24
    -13
      src/views/business/comps/template/comps/dl/DL015.vue

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

@ -221,11 +221,12 @@ export default {
disabled: true
},
pyjssj: {
// TODOinputdateTime
label: 'template.dl.dl007.pyjssj',
type: 'input',
fillType: 'actFill',
subType: 'button',
disabled: true,
subDisabled: this.fillType !== 'actFill',
subKey: 'pyjssjButton',
buttonName: 'template.dl.dl007.jsButton'
}

+ 1
- 1
src/views/business/comps/template/comps/dl/DL011.vue View File

@ -198,7 +198,7 @@ export default {
fillType: 'actFill',
subType: 'button',
subKey: 'pykssjButton',
subDisable: this.fillType !== 'actFill',
subDisabled: this.fillType !== 'actFill',
disabled: true,
buttonName: 'template.dl.dl011.pykssjButton'
}

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

@ -195,7 +195,7 @@ export default {
subType: 'button',
subKey: 'pykssjButton',
disabled: true,
subDisable: this.fillType !== 'actFill',
subDisabled: this.fillType !== 'actFill',
buttonName: 'template.dl.dl012.pykssjButton'
}
}

+ 41
- 10
src/views/business/comps/template/comps/dl/DL013.vue View File

@ -254,7 +254,9 @@ export default {
type: 'select',
options: this.getDictOptions('business_dl_xbmc'),
fillType: 'actFill',
otherCode: 'xbmcOther'
otherCode: 'xbmcOther',
otherMaxlength: 50
},
xbbh: {
label: 'template.dl.dl013.xbbh',
@ -450,13 +452,28 @@ export default {
},
//
handleCdxxAdd() {
// 使
const yqsyTableRef = this.$refs[refConf.yqsy]
const beforeData = yqsyTableRef?.getDataSource() || []
// 使
const currentYqsyData = yqsyTableRef?.getFilledFormData() || {}
// formData使
if (currentYqsyData.stepTableFormData && currentYqsyData.stepTableFormData.length > 0) {
// 使$set
this.$set(this.formData, 'yqsyTablestepTableFormData', currentYqsyData.stepTableFormData)
this.$set(this.formData, 'yqsyTableheaderSelectFields', currentYqsyData.headerSelectFields || {})
this.$set(this.formData, 'yqsyTableheaderFields', currentYqsyData.headerFields || {})
}
//
if (!this.formData.cdxxConfigs) {
this.$set(this.formData, 'cdxxConfigs', [])
}
//
this.formData.cdxxConfigs.push({
//
const newCdxxItem = {
id: getuuid(),
xsbs: null,
xbmd: null,
@ -464,7 +481,10 @@ export default {
ysg: null,
zxg: null,
yxg: null
})
}
//
this.formData.cdxxConfigs.push(newCdxxItem)
//
this.$refs[refConf.cdxx]?.updateFormData(
@ -476,13 +496,24 @@ export default {
}
)
// 使
this.$nextTick(() => {
//
EventBus.$emit('onModifyRecord', {
type: 'fieldChanged',
newRecord: null,
resourceList: null
})
const afterData = yqsyTableRef?.getDataSource() || []
//
if (afterData.length === 0 && beforeData.length > 0) {
yqsyTableRef?.updateDataSource(beforeData)
}
//
setTimeout(() => {
EventBus.$emit('onModifyRecord', {
type: 'fieldChanged',
newRecord: null,
resourceList: null,
source: 'cdxxAdd'
})
}, 100)
})
},
//

+ 29
- 7
src/views/business/comps/template/comps/dl/DL014.vue View File

@ -298,14 +298,16 @@ export default {
type: 'select',
options: this.getDictOptions('business_dl_qsxjbltj'),
fillType: 'preFill',
otherCode: 'bltjOther'
otherCode: 'bltjOther',
otherMaxlength: 50
},
xbmc: {
label: 'template.dl.dl014.xbmc',
type: 'select',
options: this.getDictOptions('business_dl_xbmc'),
fillType: 'preFill',
otherCode: 'xbmcOther'
otherCode: 'xbmcOther',
otherMaxlength: 50
}
}
}
@ -317,7 +319,8 @@ export default {
pxpb: {
label: 'template.dl.dl014.pxpb',
type: 'inputNumber',
fillType: 'preFill'
fillType: 'preFill',
maxlength: 2
},
sftjs9: {
label: 'template.dl.dl014.sftjs9',
@ -343,7 +346,8 @@ export default {
const jlzzsConfig = {
label: 'template.dl.dl014.jlzzs',
type: 'inputNumber',
fillType: 'preFill'
fillType: 'preFill',
maxlength: 2
}
// preFill
@ -369,7 +373,8 @@ export default {
label: 'template.dl.dl014.jlzzmc',
prop: 'jlzzmc',
bodyType: 'input',
bodyFillType: 'preFill'
bodyFillType: 'preFill',
bodyMaxlength: 20
}
]
},
@ -399,7 +404,8 @@ export default {
label: 'template.dl.dl014.jlzb',
prop: 'jlzb',
bodyType: 'input',
bodyFillType: 'preFill'
bodyFillType: 'preFill',
bodyMaxlength: 10
},
{
label: 'template.dl.dl014.xybh',
@ -584,7 +590,7 @@ export default {
if (this.fillType === 'actFill') {
const yqsyTableRef = this.$refs[refConf.yqsy]
const yqsyTableData = yqsyTableRef?.getDataSource() || []
if (yqsyTableData.length === 0) {
this.$message.warning(this.$t('template.dl.dl014.yqsyxxEmpty'))
return Promise.reject(this.$t('template.dl.dl014.yqsyxxEmpty'))
@ -892,6 +898,11 @@ export default {
return
}
//
if (jlzmcList.length > 0) {
this.$set(this.formData, 'jlzmcTableData', jlzmcList)
}
//
const newRows = []
@ -920,6 +931,17 @@ export default {
// formDataCustomTable
this.$set(this.formData, 'jlzTableData', newRows)
//
this.$nextTick(() => {
const jlzmcTableRef = this.$refs[refConf.jlzmcTable]
const currentJlzmcData = jlzmcTableRef?.getDataSource() || []
//
if (currentJlzmcData.length === 0 && jlzmcList.length > 0) {
jlzmcTableRef?.updateDataSource(jlzmcList)
}
})
this.$message.success(`已生成 ${newRows.length} 行剂量组数据`)
},
//

+ 24
- 13
src/views/business/comps/template/comps/dl/DL015.vue View File

@ -16,8 +16,16 @@
:formData="formData"
/>
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resourceSj" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<TableList
label="template.common.reagentInfo"
:columns="sysjColumns"
:dataSource="resourceSj"
/>
<TableList
label="template.common.instrumentInfo"
:columns="yqColumns"
:dataSource="yqResource"
/>
<LineLabel label="template.dl.dl015.xbxx" />
<BaseInfoFormPackage
@ -185,7 +193,7 @@ export default {
qxbd: {
label: 'template.dl.dl015.qxbd',
type: 'qxbd',
qxbdType:'DL014',
qxbdType: 'DL014',
fillType: 'actFill',
filledCodes: ['bdmc', 'bdbh']
},
@ -194,7 +202,8 @@ export default {
type: 'select',
options: this.getDictOptions('business_dl_qsxjbltj'),
fillType: 'preFill',
otherCode: 'bltjOther'
otherCode: 'bltjOther',
otherMaxlength: 50
}
}
}
@ -290,14 +299,14 @@ export default {
//
getFilledFormData() {
const baseData = this.getFilledFormDataByRefs(refNames)
// stepTableFormData
const hyqkData = this.$refs[refConf.hyqk]?.getFilledFormData()
if (hyqkData) {
baseData.stepTableFormData = hyqkData.stepTableFormData || []
baseData.headerSelectFields = hyqkData.headerSelectFields || {}
}
return baseData
},
//
@ -312,16 +321,16 @@ export default {
const stepResource = this.$refs.stepRef.getStepResource()
const hyqkData = this.$refs.hyqkTableRef?.getFilledFormData()
const hyqkList = hyqkData?.stepTableFormData || []
//
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
//
// Set
const xybhSet = new Set()
const sjResourceFromHyqk = []
hyqkList.forEach((item) => {
if (item.xybh && !xybhSet.has(item.xybh)) {
xybhSet.add(item.xybh)
@ -344,9 +353,9 @@ export default {
})
}
})
this.resourceTmp = [...this.resourceTmp, ...sjResourceFromHyqk]
return this.resourceTmp
},
onRegentSubmit(e) {
@ -370,7 +379,7 @@ export default {
}
//
const hyqkData = jlzTableData.map(item => ({
const hyqkData = jlzTableData.map((item) => ({
jlzb: item.jlzb || '', //
xybh: item.xybh || '', //
hyqszqk: '', //
@ -384,7 +393,9 @@ export default {
// 使 $set formData CustomTable
this.$set(this.formData, 'stepTableFormData', hyqkData)
this.$message.success(`已从前序表单加载 ${hyqkData.length} 条剂量组数据`)
this.$message.success(
`已从前序表单加载 ${hyqkData.length} 条剂量组数据`
)
} catch (error) {
console.error('解析前序表单数据失败:', error)
//

Loading…
Cancel
Save