Browse Source

fix: [模板管理] dl016+dl017

luojie
memorylkf 2 weeks ago
parent
commit
103f509954
2 changed files with 18 additions and 119 deletions
  1. +5
    -47
      src/views/business/comps/template/comps/dl/DL016.vue
  2. +13
    -72
      src/views/business/comps/template/comps/dl/DL017.vue

+ 5
- 47
src/views/business/comps/template/comps/dl/DL016.vue View File

@ -17,11 +17,9 @@
<LineLabel label="template.dl.dl016.qcxjjyqk" /> <LineLabel label="template.dl.dl016.qcxjjyqk" />
<CustomTable <CustomTable
@headerSelectChange="onHeaderSelectChange"
fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur"
@beforeSaveRecord = "beforeSaveRecord"
fieldItemLabel="template.dl.dl016.qcxjjyqk"
:showAddRow="false" :showOperation="false" :showAddRow="false" :showOperation="false"
ref="qcxjjyqkTableRef" :columns="stepColumns" :formData="tableFormData">
ref="qcxjjyqkTableRef" :columns="stepColumns" :formData="formData">
</CustomTable> </CustomTable>
<LineLabel label="template.dl.dl016.czbz" /> <LineLabel label="template.dl.dl016.czbz" />
@ -61,13 +59,6 @@ export default {
}, },
}, },
computed: { computed: {
//
tableFormData() {
return {
stepTableFormData: this.formData.stepTableFormData || [],
headerSelectFields: {}
}
},
// //
remarkConig() { remarkConig() {
return [ return [
@ -189,14 +180,12 @@ export default {
// bodyType: 'inputNumber', // bodyType: 'inputNumber',
label: "template.dl.dl016.qsxjjrl", label: "template.dl.dl016.qsxjjrl",
prop: 'qsxjjrl', prop: 'qsxjjrl',
width: 280,
width: 180,
headerSelectKey: 'qsxjjrldw', headerSelectKey: 'qsxjjrldw',
fillType: "preFill", fillType: "preFill",
headerOptions: this.getDictOptions('business_tjdw'), headerOptions: this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber', bodyType: 'inputNumber',
bodyFillType: 'actFill', bodyFillType: 'actFill',
copyFrom: 'ysqyl',
compareTo: 'ysqyl',
} }
] ]
}, },
@ -217,51 +206,20 @@ export default {
// //
const stepTableFormData = bdnr.jlzTableData || [] const stepTableFormData = bdnr.jlzTableData || []
if (stepTableFormData.length === 0) {
//
this.$set(this.formData, 'stepTableFormData', [])
this.$message.warning('前序表单中没有剂量组数据')
return
}
// //
const itemData = stepTableFormData.map(item => ({ const itemData = stepTableFormData.map(item => ({
jlzb: item.jlzb || '', // jlzb: item.jlzb || '', //
xybh: item.xybh || '', // xybh: item.xybh || '', //
qsxjjrl: '', // qsxjjrl: '', //
id:this.getuuid(),
})) }))
// 使 $set formData CustomTable
this.$set(this.formData, 'stepTableFormData', itemData)
this.$message.success(`已从前序表单加载 ${itemData.length} 条剂量组数据`)
this.$refs.qcxjjyqkTableRef.updateDataSource(itemData);
} catch (error) { } catch (error) {
console.error('解析前序表单数据失败:', error) console.error('解析前序表单数据失败:', error)
this.$message.error('解析前序表单数据失败') this.$message.error('解析前序表单数据失败')
} }
} }
}, },
//table header
onHeaderSelectChange(data){
const {key, headerSelectFields,dataSource=[]} = data;
const keys = [
'targetStartSolutionVolumeUnit',
'targetDiluentVolumeUnit',
'targetSolutionConcentrationUnit',
'targetSolutionVolumeUnit',
]
if(keys.includes(key)){
const {targetStartSolution,subTargetStartSolution} = this.$refs.swypyjInfoRef?.getFilledFormData();
const params = {
subTargetStartSolution,
headerSelectFields
}
this.batchUpdateTargetStartSolutionVolume(dataSource,targetStartSolution,params)
}
},
beforeSaveRecord(data){
const formFields = this.$refs.swypyjInfoRef?.getFilledFormData();
this.onCommonVerifyNdException(formFields,data);
},
// //
getFilledFormData() { getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "qcxjjyqkTableRef", "stepRef","remarkRef"]) return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "qcxjjyqkTableRef", "stepRef","remarkRef"])

+ 13
- 72
src/views/business/comps/template/comps/dl/DL017.vue View File

@ -17,11 +17,9 @@
<LineLabel label="template.dl.dl017.xbczqk" /> <LineLabel label="template.dl.dl017.xbczqk" />
<CustomTable <CustomTable
@headerSelectChange="onHeaderSelectChange"
fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur"
@beforeSaveRecord = "beforeSaveRecord"
fieldItemLabel="template.common.operationSteps"
:showAddRow="false" :showOperation="false" :showAddRow="false" :showOperation="false"
ref="stepTableRef" :columns="stepColumns" :formData="tableFormData">
ref="stepTableRef" :columns="stepColumns" :formData="formData">
</CustomTable> </CustomTable>
<LineLabel label="template.dl.dl017.czbz" /> <LineLabel label="template.dl.dl017.czbz" />
@ -62,13 +60,6 @@ export default {
}, },
}, },
computed: { computed: {
//
tableFormData() {
return {
stepTableFormData: this.formData.stepTableFormData,
headerSelectFields: {}
}
},
// //
remarkConig() { remarkConig() {
return [ return [
@ -206,56 +197,56 @@ export default {
},{ },{
label: "template.dl.dl017.ddpyy", label: "template.dl.dl017.ddpyy",
prop: "ddpyy", prop: "ddpyy",
width: 180,
width: 100,
bodyType: "checkbox", bodyType: "checkbox",
bodyFillType: "actFill", bodyFillType: "actFill",
bodyMaxlength: 10, bodyMaxlength: 10,
},{ },{
label: "template.dl.dl017.xd", label: "template.dl.dl017.xd",
prop: "xd", prop: "xd",
width: 180,
width: 100,
bodyType: "checkbox", bodyType: "checkbox",
bodyFillType: "actFill", bodyFillType: "actFill",
bodyMaxlength: 10, bodyMaxlength: 10,
},{ },{
label: "template.dl.dl017.sj", label: "template.dl.dl017.sj",
prop: "sj", prop: "sj",
width: 180,
width: 100,
bodyType: "checkbox", bodyType: "checkbox",
bodyFillType: "actFill", bodyFillType: "actFill",
bodyMaxlength: 10, bodyMaxlength: 10,
},{ },{
label: "template.dl.dl017.ds", label: "template.dl.dl017.ds",
prop: "ds", prop: "ds",
width: 180,
width: 100,
bodyType: "checkbox", bodyType: "checkbox",
bodyFillType: "actFill", bodyFillType: "actFill",
bodyMaxlength: 10, bodyMaxlength: 10,
},{ },{
label: "template.dl.dl017.dy1gd", label: "template.dl.dl017.dy1gd",
prop: "dy1gd", prop: "dy1gd",
width: 180,
width: 100,
bodyType: "checkbox", bodyType: "checkbox",
bodyFillType: "actFill", bodyFillType: "actFill",
bodyMaxlength: 10, bodyMaxlength: 10,
},{ },{
label: "template.dl.dl017.dy2gd", label: "template.dl.dl017.dy2gd",
prop: "dy2gd", prop: "dy2gd",
width: 180,
width: 100,
bodyType: "checkbox", bodyType: "checkbox",
bodyFillType: "actFill", bodyFillType: "actFill",
bodyMaxlength: 10, bodyMaxlength: 10,
},{ },{
label: "template.dl.dl017.dy3gd", label: "template.dl.dl017.dy3gd",
prop: "dy3gd", prop: "dy3gd",
width: 180,
width: 100,
bodyType: "checkbox", bodyType: "checkbox",
bodyFillType: "actFill", bodyFillType: "actFill",
bodyMaxlength: 10, bodyMaxlength: 10,
},{ },{
label: "template.dl.dl017.dy4gd", label: "template.dl.dl017.dy4gd",
prop: "dy4gd", prop: "dy4gd",
width: 180,
width: 100,
bodyType: "checkbox", bodyType: "checkbox",
bodyFillType: "actFill", bodyFillType: "actFill",
bodyMaxlength: 10, bodyMaxlength: 10,
@ -282,13 +273,6 @@ export default {
// //
const stepTableFormData = bdnr.jlzTableData || [] const stepTableFormData = bdnr.jlzTableData || []
if (stepTableFormData.length === 0) {
//
this.$set(this.formData, 'stepTableFormData', [])
this.$message.warning('前序表单中没有剂量组数据')
return
}
// //
const itemData = stepTableFormData.map(item => ({ const itemData = stepTableFormData.map(item => ({
jlzb: item.jlzb || '', jlzb: item.jlzb || '',
@ -303,60 +287,17 @@ export default {
dy1gd: '', dy1gd: '',
dy2gd: '', dy2gd: '',
dy3gd: '', dy3gd: '',
dy4gd: ''
dy4gd: '',
id:this.getuuid(),
})) }))
// 使 $set formData CustomTable
this.$set(this.formData, 'stepTableFormData', itemData)
this.$message.success(`已从前序表单加载 ${itemData.length} 条剂量组数据`)
this.$refs.stepTableRef.updateDataSource(itemData);
} catch (error) { } catch (error) {
this.$set(this.formData, 'stepTableFormData', [])
console.error('解析前序表单数据失败:', error) console.error('解析前序表单数据失败:', error)
this.$message.error('解析前序表单数据失败') this.$message.error('解析前序表单数据失败')
} }
} }
}, },
//table header
onHeaderSelectChange(data){
const {key, headerSelectFields,dataSource=[]} = data;
const keys = [
'targetStartSolutionVolumeUnit',
'targetDiluentVolumeUnit',
'targetSolutionConcentrationUnit',
'targetSolutionVolumeUnit',
]
if(keys.includes(key)){
const {targetStartSolution,subTargetStartSolution} = this.$refs.swypyjInfoRef?.getFilledFormData();
const params = {
subTargetStartSolution,
headerSelectFields
}
this.batchUpdateTargetStartSolutionVolume(dataSource,targetStartSolution,params)
}
},
beforeSaveRecord(data){
const formFields = this.$refs.swypyjInfoRef?.getFilledFormData();
this.onCommonVerifyNdException(formFields,data);
},
configComplete(val) {
const { rowData, headerSelectFields } = val;
//(+)
const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit])
let postData = {
mc: null,
bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode,
nd: rowData.actSolutionConcentration,//
nddw: headerSelectFields.actSolutionConcentrationUnit,
studySubjectId: this.formData.studySubjectId,
studyFormId:this.formData.id,
studyId:this.formData.studyId,
kc: total,
kcdw: unit,
}
this.configCompleteRequest(postData);
},
// //
getFilledFormData() { getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"]) return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"])

Loading…
Cancel
Save