|
|
|
@ -11,18 +11,16 @@ |
|
|
|
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resourceSj" /> |
|
|
|
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> |
|
|
|
|
|
|
|
<BaseInfoFormPackage fieldItemLabel="template.dl.dl016.xbxx" label="template.dl.dl016.xbxx" |
|
|
|
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData" @onRegentSubmit="onRegentSubmit" |
|
|
|
/> |
|
|
|
<BaseInfoFormPackage fieldItemLabel="template.dl.dl016.xbxx" label="template.dl.dl016.xbxx" |
|
|
|
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData" |
|
|
|
@onRegentSubmit="onRegentSubmit" /> |
|
|
|
|
|
|
|
<LineLabel label="template.dl.dl016.qcxjjyqk" /> |
|
|
|
<CustomTable |
|
|
|
@headerSelectChange="onHeaderSelectChange" |
|
|
|
fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur" |
|
|
|
@beforeSaveRecord = "beforeSaveRecord" |
|
|
|
:showAddRow="false" :showOperation="false" |
|
|
|
ref="qcxjjyqkTableRef" :columns="stepColumns" :formData="tableFormData"> |
|
|
|
</CustomTable> |
|
|
|
<LineLabel label="template.dl.dl016.qcxjjyqk" /> |
|
|
|
<CustomTable @headerSelectChange="onHeaderSelectChange" |
|
|
|
fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur" |
|
|
|
@beforeSaveRecord="beforeSaveRecord" :showAddRow="false" :showOperation="false" |
|
|
|
ref="qcxjjyqkTableRef" :columns="stepColumns" :formData="formData"> |
|
|
|
</CustomTable> |
|
|
|
|
|
|
|
<LineLabel label="template.dl.dl016.czbz" /> |
|
|
|
<Step ref="stepRef" :formData="formData.stepData"></Step> |
|
|
|
@ -49,10 +47,10 @@ import TableOpertaionDelete from "@/components/Template/operation/TableOpertaion |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "DL016", |
|
|
|
dicts: [ |
|
|
|
'business_dl_qsxjbltj','business_tjdw','business_nddw' |
|
|
|
], |
|
|
|
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete }, |
|
|
|
dicts: [ |
|
|
|
'business_dl_qsxjbltj', 'business_tjdw', 'business_nddw' |
|
|
|
], |
|
|
|
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaionDelete }, |
|
|
|
mixins: [templateMixin], |
|
|
|
props: { |
|
|
|
fillType: { |
|
|
|
@ -61,13 +59,13 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
// 表格数据 |
|
|
|
tableFormData() { |
|
|
|
return { |
|
|
|
stepTableFormData: this.formData.stepTableFormData || [], |
|
|
|
headerSelectFields: {} |
|
|
|
} |
|
|
|
}, |
|
|
|
// 表格数据 |
|
|
|
tableFormData() { |
|
|
|
return { |
|
|
|
stepTableFormData: this.formData.stepTableFormData || [], |
|
|
|
headerSelectFields: {} |
|
|
|
} |
|
|
|
}, |
|
|
|
// 备注表单配制 |
|
|
|
remarkConig() { |
|
|
|
return [ |
|
|
|
@ -132,7 +130,7 @@ export default { |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
// 细胞信息 |
|
|
|
// 细胞信息 |
|
|
|
swypyjInfoFormConfig() { |
|
|
|
return [ |
|
|
|
{ |
|
|
|
@ -142,16 +140,16 @@ export default { |
|
|
|
label: 'template.dl.dl016.qxbd', |
|
|
|
type: 'qxbd', |
|
|
|
fillType: 'actFill', |
|
|
|
qxbdType:'DL014', |
|
|
|
filledCodes:['bdmc','bdbh'], |
|
|
|
qxbdType: 'DL014', |
|
|
|
filledCodes: ['bdmc', 'bdbh'], |
|
|
|
}, |
|
|
|
bltj: { |
|
|
|
bltj: { |
|
|
|
label: 'template.dl.dl016.bltj', |
|
|
|
type: 'select', |
|
|
|
fillType: 'preFill', |
|
|
|
options: this.getDictOptions('business_dl_qsxjbltj'), |
|
|
|
otherCode: 'bltjOther', |
|
|
|
showOtherLabel:false |
|
|
|
showOtherLabel: false |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
@ -166,7 +164,7 @@ export default { |
|
|
|
bodyType: "input", |
|
|
|
bodyFillType: "actFill", |
|
|
|
width: 180, |
|
|
|
bodyDisabled: true, |
|
|
|
bodyDisabled: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "template.dl.dl016.xybh", |
|
|
|
@ -183,20 +181,20 @@ export default { |
|
|
|
// width: 180, |
|
|
|
// bodyFillType: "actFill", |
|
|
|
// bodyMaxlength: 10, |
|
|
|
// headerSelectKey: 'qsxjjrldw', |
|
|
|
// fillType: "actFill", |
|
|
|
// headerOptions: this.getDictOptions('business_nddw'), |
|
|
|
// bodyType: 'inputNumber', |
|
|
|
label: "template.dl.dl016.qsxjjrl", |
|
|
|
prop: 'qsxjjrl', |
|
|
|
width: 280, |
|
|
|
headerSelectKey: 'qsxjjrldw', |
|
|
|
fillType: "preFill", |
|
|
|
headerOptions: this.getDictOptions('business_tjdw'), |
|
|
|
bodyType: 'inputNumber', |
|
|
|
bodyFillType: 'actFill', |
|
|
|
copyFrom: 'ysqyl', |
|
|
|
compareTo: 'ysqyl', |
|
|
|
// headerSelectKey: 'qsxjjrldw', |
|
|
|
// fillType: "actFill", |
|
|
|
// headerOptions: this.getDictOptions('business_nddw'), |
|
|
|
// bodyType: 'inputNumber', |
|
|
|
label: "template.dl.dl016.qsxjjrl", |
|
|
|
prop: 'qsxjjrl', |
|
|
|
width: 280, |
|
|
|
headerSelectKey: 'qsxjjrldw', |
|
|
|
fillType: "preFill", |
|
|
|
headerOptions: this.getDictOptions('business_tjdw'), |
|
|
|
bodyType: 'inputNumber', |
|
|
|
bodyFillType: 'actFill', |
|
|
|
copyFrom: 'ysqyl', |
|
|
|
compareTo: 'ysqyl', |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
@ -207,69 +205,69 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
onRegentSubmit(e) { |
|
|
|
const { selectInfo, key, rowIndex } = e |
|
|
|
const { row } = selectInfo |
|
|
|
if (key === 'qxbd') { |
|
|
|
try { |
|
|
|
// 解析前序表单的内容 |
|
|
|
const bdnr = JSON.parse(row.bdnr) |
|
|
|
// 获取剂量组列表数据 |
|
|
|
const stepTableFormData = bdnr.jlzTableData || [] |
|
|
|
onRegentSubmit(e) { |
|
|
|
const { selectInfo, key, rowIndex } = e |
|
|
|
const { row } = selectInfo |
|
|
|
if (key === 'qxbd') { |
|
|
|
try { |
|
|
|
// 解析前序表单的内容 |
|
|
|
const bdnr = JSON.parse(row.bdnr) |
|
|
|
// 获取剂量组列表数据 |
|
|
|
const stepTableFormData = bdnr.jlzTableData || [] |
|
|
|
|
|
|
|
if (stepTableFormData.length === 0) { |
|
|
|
// 清空当前的换液情况列表数据 |
|
|
|
this.$set(this.formData, 'stepTableFormData', []) |
|
|
|
this.$message.warning('前序表单中没有剂量组数据') |
|
|
|
return |
|
|
|
} |
|
|
|
if (stepTableFormData.length === 0) { |
|
|
|
// 清空当前的换液情况列表数据 |
|
|
|
this.$set(this.formData, 'stepTableFormData', []) |
|
|
|
this.$message.warning('前序表单中没有剂量组数据') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// 从剂量组数据中提取剂量组别和悬液编号 |
|
|
|
const itemData = stepTableFormData.map(item => ({ |
|
|
|
jlzb: item.jlzb || '', // 剂量组别 |
|
|
|
xybh: item.xybh || '', // 悬液编号 |
|
|
|
qsxjjrl: '', // |
|
|
|
})) |
|
|
|
// 使用 $set 更新 formData,触发 CustomTable 的响应式更新 |
|
|
|
this.$set(this.formData, 'stepTableFormData', itemData) |
|
|
|
// 从剂量组数据中提取剂量组别和悬液编号 |
|
|
|
const itemData = stepTableFormData.map(item => ({ |
|
|
|
jlzb: item.jlzb || '', // 剂量组别 |
|
|
|
xybh: item.xybh || '', // 悬液编号 |
|
|
|
qsxjjrl: '', // |
|
|
|
})) |
|
|
|
// 使用 $set 更新 formData,触发 CustomTable 的响应式更新 |
|
|
|
this.$set(this.formData, 'stepTableFormData', itemData) |
|
|
|
|
|
|
|
this.$message.success(`已从前序表单加载 ${itemData.length} 条剂量组数据`) |
|
|
|
} catch (error) { |
|
|
|
console.error('解析前序表单数据失败:', error) |
|
|
|
this.$message.error('解析前序表单数据失败') |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
//选择table header下拉框也要更新体积 |
|
|
|
onHeaderSelectChange(data){ |
|
|
|
const {key, headerSelectFields,dataSource=[]} = data; |
|
|
|
this.$message.success(`已从前序表单加载 ${itemData.length} 条剂量组数据`) |
|
|
|
} catch (error) { |
|
|
|
console.error('解析前序表单数据失败:', 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(); |
|
|
|
if (keys.includes(key)) { |
|
|
|
const { targetStartSolution, subTargetStartSolution } = this.$refs.swypyjInfoRef?.getFilledFormData(); |
|
|
|
const params = { |
|
|
|
subTargetStartSolution, |
|
|
|
headerSelectFields |
|
|
|
} |
|
|
|
this.batchUpdateTargetStartSolutionVolume(dataSource,targetStartSolution,params) |
|
|
|
this.batchUpdateTargetStartSolutionVolume(dataSource, targetStartSolution, params) |
|
|
|
} |
|
|
|
}, |
|
|
|
beforeSaveRecord(data){ |
|
|
|
beforeSaveRecord(data) { |
|
|
|
const formFields = this.$refs.swypyjInfoRef?.getFilledFormData(); |
|
|
|
this.onCommonVerifyNdException(formFields,data); |
|
|
|
this.onCommonVerifyNdException(formFields, data); |
|
|
|
}, |
|
|
|
//获取已填写的表单数据 |
|
|
|
getFilledFormData() { |
|
|
|
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "qcxjjyqkTableRef", "stepRef","remarkRef"]) |
|
|
|
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "qcxjjyqkTableRef", "stepRef", "remarkRef"]) |
|
|
|
}, |
|
|
|
//获取填写完成的表单数据 |
|
|
|
async getFormData() { |
|
|
|
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "qcxjjyqkTableRef", "stepRef","remarkRef"]); |
|
|
|
return content; |
|
|
|
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "qcxjjyqkTableRef", "stepRef", "remarkRef"]); |
|
|
|
return content; |
|
|
|
}, |
|
|
|
getResource() { |
|
|
|
//使用的试剂、仪器 |
|
|
|
@ -292,5 +290,4 @@ export default { |
|
|
|
} |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style rel="stylesheet/scss" lang="scss"> |
|
|
|
</style> |
|
|
|
<style rel="stylesheet/scss" lang="scss"></style> |