|
|
|
@ -12,22 +12,16 @@ |
|
|
|
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> |
|
|
|
|
|
|
|
<BaseInfoFormPackage fieldItemLabel="template.dl.dl017.xbxx" label="template.dl.dl017.xbxx" |
|
|
|
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData" |
|
|
|
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData" @onRegentSubmit="onRegentSubmit" |
|
|
|
/> |
|
|
|
|
|
|
|
<LineLabel label="template.dl.dl017.xbczqk" /> |
|
|
|
<CustomTable |
|
|
|
@headerSelectChange="onHeaderSelectChange" |
|
|
|
fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur" |
|
|
|
@beforeSaveRecord = "beforeSaveRecord" @onRegentSubmit="(e) => onRegentSubmit" |
|
|
|
@beforeSaveRecord = "beforeSaveRecord" |
|
|
|
:showAddRow="false" :showOperation="false" |
|
|
|
ref="stepTableRef" :columns="stepColumns" :formData="formData"> |
|
|
|
<!-- <template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
|
<TableOpertaion @startConfig="startConfig" @configComplete="configComplete" |
|
|
|
@printTag="printTag" @subPackageSubmit="subPackageSubmit" :fillType="fillType" |
|
|
|
:row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow"> |
|
|
|
</TableOpertaion> |
|
|
|
</template> --> |
|
|
|
ref="stepTableRef" :columns="stepColumns" :formData="tableFormData"> |
|
|
|
</CustomTable> |
|
|
|
|
|
|
|
<LineLabel label="template.dl.dl017.czbz" /> |
|
|
|
@ -57,7 +51,7 @@ import TableOpertaionDelete from "@/components/Template/operation/TableOpertaion |
|
|
|
export default { |
|
|
|
name: "DL017", |
|
|
|
dicts: [ |
|
|
|
'business_dl_qsxjbltj','business_tjdw','business_dl_sjqszqk','business_dl_sjqcdqk','business_dl_sjqqtqk','business_dl_xbmc' |
|
|
|
'business_dl_qsxjbltj','business_tjdw','business_dl_sjqszqk','business_dl_sjqcdqk','business_dl_sjqqtqk','business_dl_xbmc',"business_sydd" |
|
|
|
], |
|
|
|
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete }, |
|
|
|
mixins: [templateMixin], |
|
|
|
@ -68,6 +62,13 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
// 表格数据 |
|
|
|
tableFormData() { |
|
|
|
return { |
|
|
|
stepTableFormData: this.formData.stepTableFormData, |
|
|
|
headerSelectFields: {} |
|
|
|
} |
|
|
|
}, |
|
|
|
// 备注表单配置 |
|
|
|
remarkConig() { |
|
|
|
return [ |
|
|
|
@ -113,7 +114,7 @@ export default { |
|
|
|
label: 'template.dl.dl017.sydd', |
|
|
|
type: 'select', |
|
|
|
fillType: 'actFill', |
|
|
|
options: this.getDictOptions('business_dl_xbmc'), |
|
|
|
options: this.getDictOptions('business_sydd'), |
|
|
|
otherCode: 'xbmcOther', |
|
|
|
showOtherLabel:false |
|
|
|
}, |
|
|
|
@ -146,7 +147,7 @@ export default { |
|
|
|
label: 'template.dl.dl017.qxbd', |
|
|
|
type: 'qxbd', |
|
|
|
fillType: 'actFill', |
|
|
|
qxbdType:'DL017', |
|
|
|
qxbdType:'DL014', |
|
|
|
filledCodes:['bdmc','bdbh'], |
|
|
|
}, |
|
|
|
bltj: { |
|
|
|
@ -187,21 +188,21 @@ export default { |
|
|
|
width: 180, |
|
|
|
bodyType: "select", |
|
|
|
bodyFillType: "actFill", |
|
|
|
options: this.getDictOptions('business_dl_sjqszqk'), |
|
|
|
bodyOptions: this.getDictOptions('business_dl_sjqszqk'), |
|
|
|
},{ |
|
|
|
label: "template.dl.dl017.sjqcdqk", |
|
|
|
prop: "sjqcdqk", |
|
|
|
width: 180, |
|
|
|
bodyType: "select", |
|
|
|
bodyFillType: "actFill", |
|
|
|
options: this.getDictOptions('business_dl_sjqcdqk'), |
|
|
|
bodyOptions: this.getDictOptions('business_dl_sjqcdqk'), |
|
|
|
},{ |
|
|
|
label: "template.dl.dl017.saqqtqk", |
|
|
|
prop: "saqqtqk", |
|
|
|
width: 180, |
|
|
|
bodyType: "select", |
|
|
|
bodyFillType: "actFill", |
|
|
|
options: this.getDictOptions('business_dl_sjqqtqk'), |
|
|
|
bodyOptions: this.getDictOptions('business_dl_sjqqtqk'), |
|
|
|
},{ |
|
|
|
label: "template.dl.dl017.ddpyy", |
|
|
|
prop: "ddpyy", |
|
|
|
@ -209,7 +210,6 @@ export default { |
|
|
|
bodyType: "checkbox", |
|
|
|
bodyFillType: "actFill", |
|
|
|
bodyMaxlength: 10, |
|
|
|
bodyDisabled: true, |
|
|
|
},{ |
|
|
|
label: "template.dl.dl017.xd", |
|
|
|
prop: "xd", |
|
|
|
@ -217,7 +217,6 @@ export default { |
|
|
|
bodyType: "checkbox", |
|
|
|
bodyFillType: "actFill", |
|
|
|
bodyMaxlength: 10, |
|
|
|
bodyDisabled: true, |
|
|
|
},{ |
|
|
|
label: "template.dl.dl017.sj", |
|
|
|
prop: "sj", |
|
|
|
@ -225,7 +224,6 @@ export default { |
|
|
|
bodyType: "checkbox", |
|
|
|
bodyFillType: "actFill", |
|
|
|
bodyMaxlength: 10, |
|
|
|
bodyDisabled: true, |
|
|
|
},{ |
|
|
|
label: "template.dl.dl017.ds", |
|
|
|
prop: "ds", |
|
|
|
@ -233,7 +231,6 @@ export default { |
|
|
|
bodyType: "checkbox", |
|
|
|
bodyFillType: "actFill", |
|
|
|
bodyMaxlength: 10, |
|
|
|
bodyDisabled: true, |
|
|
|
},{ |
|
|
|
label: "template.dl.dl017.dy1gd", |
|
|
|
prop: "dy1gd", |
|
|
|
@ -241,7 +238,6 @@ export default { |
|
|
|
bodyType: "checkbox", |
|
|
|
bodyFillType: "actFill", |
|
|
|
bodyMaxlength: 10, |
|
|
|
bodyDisabled: true, |
|
|
|
},{ |
|
|
|
label: "template.dl.dl017.dy2gd", |
|
|
|
prop: "dy2gd", |
|
|
|
@ -249,7 +245,6 @@ export default { |
|
|
|
bodyType: "checkbox", |
|
|
|
bodyFillType: "actFill", |
|
|
|
bodyMaxlength: 10, |
|
|
|
bodyDisabled: true, |
|
|
|
},{ |
|
|
|
label: "template.dl.dl017.dy3gd", |
|
|
|
prop: "dy3gd", |
|
|
|
@ -257,7 +252,6 @@ export default { |
|
|
|
bodyType: "checkbox", |
|
|
|
bodyFillType: "actFill", |
|
|
|
bodyMaxlength: 10, |
|
|
|
bodyDisabled: true, |
|
|
|
},{ |
|
|
|
label: "template.dl.dl017.dy4gd", |
|
|
|
prop: "dy4gd", |
|
|
|
@ -265,7 +259,6 @@ export default { |
|
|
|
bodyType: "checkbox", |
|
|
|
bodyFillType: "actFill", |
|
|
|
bodyMaxlength: 10, |
|
|
|
bodyDisabled: true, |
|
|
|
}, |
|
|
|
] |
|
|
|
}, |
|
|
|
@ -281,13 +274,47 @@ export default { |
|
|
|
onRegentSubmit(e) { |
|
|
|
const { selectInfo, key, rowIndex } = e |
|
|
|
const { row } = selectInfo |
|
|
|
console.log('selectInfo==============',selectInfo) |
|
|
|
if (key === 'yqbh') { |
|
|
|
const params = { |
|
|
|
jlzb: row.mc, |
|
|
|
xybh: row.xh, |
|
|
|
if (key === 'qxbd') { |
|
|
|
try { |
|
|
|
// 解析前序表单的内容 |
|
|
|
const bdnr = JSON.parse(row.bdnr) |
|
|
|
console.log('前序表单内容============', bdnr) |
|
|
|
// 获取剂量组列表数据 |
|
|
|
const stepTableFormData = bdnr.jlzTableData || [] |
|
|
|
|
|
|
|
if (stepTableFormData.length === 0) { |
|
|
|
// 清空当前的细胞操作情况列表数据 |
|
|
|
this.$set(this.formData, 'stepTableFormData', []) |
|
|
|
this.$message.warning('前序表单中没有剂量组数据') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// 从剂量组数据中提取剂量组别和悬液编号 |
|
|
|
const itemData = stepTableFormData.map(item => ({ |
|
|
|
jlzb: item.jlzb || '', |
|
|
|
xybh: item.xybh || '', |
|
|
|
sjqszqk: '', |
|
|
|
sjqcdqk: '', |
|
|
|
saqqtqk: '', |
|
|
|
ddpyy: '', |
|
|
|
xd: '', |
|
|
|
sj: '', |
|
|
|
ds: '', |
|
|
|
dy1gd: '', |
|
|
|
dy2gd: '', |
|
|
|
dy3gd: '', |
|
|
|
dy4gd: '' |
|
|
|
})) |
|
|
|
|
|
|
|
// 使用 $set 更新 formData,触发 CustomTable 的响应式更新 |
|
|
|
this.$set(this.formData, 'stepTableFormData', itemData) |
|
|
|
|
|
|
|
this.$message.success(`已从前序表单加载 ${itemData.length} 条剂量组数据`) |
|
|
|
} catch (error) { |
|
|
|
this.$set(this.formData, 'stepTableFormData', []) |
|
|
|
console.error('解析前序表单数据失败:', error) |
|
|
|
this.$message.error('解析前序表单数据失败') |
|
|
|
} |
|
|
|
this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params) |
|
|
|
} |
|
|
|
}, |
|
|
|
//选择table header下拉框也要更新体积 |
|
|
|
@ -329,31 +356,7 @@ export default { |
|
|
|
} |
|
|
|
this.configCompleteRequest(postData); |
|
|
|
}, |
|
|
|
//分装回调 |
|
|
|
subPackageSubmit(data) { |
|
|
|
const { fzsj, rowData, headerSelectFields } = data; |
|
|
|
const { fzList = [], dw = "", mybh } = fzsj; |
|
|
|
if (fzList && fzList.length > 0) { |
|
|
|
const list = fzList.map((item) => { |
|
|
|
return { |
|
|
|
bh: mybh + item.preCode + item.subCode, |
|
|
|
kc: item.num, |
|
|
|
kcdw: dw, |
|
|
|
} |
|
|
|
}) |
|
|
|
let postData = { |
|
|
|
studyId: this.formData.studyId, |
|
|
|
studyFormId: this.formData.id, |
|
|
|
bh: mybh, |
|
|
|
nd: rowData.actSolutionConcentration || 0, |
|
|
|
nddw: headerSelectFields.actSolutionConcentrationUnit, |
|
|
|
studySubjectId: this.formData.studySubjectId, |
|
|
|
studyFormId:this.formData.id, |
|
|
|
list: list |
|
|
|
} |
|
|
|
this.subPackageRequest(postData); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//获取已填写的表单数据 |
|
|
|
getFilledFormData() { |
|
|
|
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"]) |
|
|
|
@ -366,8 +369,20 @@ export default { |
|
|
|
getResource() { |
|
|
|
//使用的试剂、仪器 |
|
|
|
const stepResource = this.$refs.stepRef.getStepResource() |
|
|
|
const hyqkData = this.$refs.stepTableRef?.getFilledFormData() |
|
|
|
const tableList = hyqkData?.stepTableFormData || [] |
|
|
|
// 从操作步骤中提取试剂和仪器资源 |
|
|
|
this.resourceTmp = stepResource.sjResource || [] |
|
|
|
this.yqResourceTmp = stepResource.yqResource || [] |
|
|
|
|
|
|
|
const sjResourceFromHyqk = tableList |
|
|
|
.filter(item => item.xybh) |
|
|
|
.map(item => ({ |
|
|
|
bh: item.xybh, |
|
|
|
type: 'cell' |
|
|
|
})) |
|
|
|
|
|
|
|
this.resourceTmp = [...this.resourceTmp, ...sjResourceFromHyqk] |
|
|
|
return this.resourceTmp; |
|
|
|
}, |
|
|
|
//保存 |
|
|
|
|