Browse Source

fix: [模板管理] dl019

luojie
memorylkf 2 weeks ago
parent
commit
30863e56a8
1 changed files with 4 additions and 62 deletions
  1. +4
    -62
      src/views/business/comps/template/comps/dl/DL019.vue

+ 4
- 62
src/views/business/comps/template/comps/dl/DL019.vue View File

@ -17,11 +17,9 @@
<LineLabel label="template.dl.dl019.xbczqk" /> <LineLabel label="template.dl.dl019.xbczqk" />
<CustomTable <CustomTable
@headerSelectChange="onHeaderSelectChange"
fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur"
@beforeSaveRecord = "beforeSaveRecord"
fieldItemLabel="template.dl.dl019.xbczqk"
:showAddRow="false" :showOperation="false" :showAddRow="false" :showOperation="false"
ref="stepTableRef" :columns="stepColumns" :formData="tableFormData">
ref="stepTableRef" :columns="stepColumns" :formData="formData">
<!-- <template slot="operation" slot-scope="{ row, rowIndex, columns }"> <!-- <template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion @startConfig="startConfig" @configComplete="configComplete" <TableOpertaion @startConfig="startConfig" @configComplete="configComplete"
@printTag="printTag" @subPackageSubmit="subPackageSubmit" :fillType="fillType" @printTag="printTag" @subPackageSubmit="subPackageSubmit" :fillType="fillType"
@ -68,13 +66,6 @@ export default {
}, },
}, },
computed: { computed: {
//
tableFormData() {
return {
stepTableFormData: this.formData.stepTableFormData || [],
headerSelectFields: {}
}
},
// //
remarkConig() { remarkConig() {
return [ return [
@ -221,70 +212,21 @@ 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 || '', //
bplsh1: '', // bplsh1: '', //
bplsh2: '', // bplsh2: '', //
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) {
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