|
|
@ -1,23 +1,39 @@ |
|
|
<!-- 生物样品接收记录表 --> |
|
|
|
|
|
|
|
|
<!-- 生物分析生物样品采集管制备表 --> |
|
|
<template> |
|
|
<template> |
|
|
<div> |
|
|
<div> |
|
|
<div class="detail-container"> |
|
|
<div class="detail-container"> |
|
|
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.bdmc }}<img src="@/assets/images/detail-title.png" /></div> |
|
|
|
|
|
|
|
|
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.bdmc }}<img |
|
|
|
|
|
src="@/assets/images/detail-title.png" /></div> |
|
|
<div class="detail-content"> |
|
|
<div class="detail-content"> |
|
|
<div class="content"> |
|
|
<div class="content"> |
|
|
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" |
|
|
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" |
|
|
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" /> |
|
|
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" /> |
|
|
|
|
|
|
|
|
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" /> |
|
|
|
|
|
|
|
|
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" /> |
|
|
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> |
|
|
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> |
|
|
|
|
|
|
|
|
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.xbxx" label="template.dl.dl020.xbxx" |
|
|
|
|
|
|
|
|
<BaseInfoFormPackage fieldItemLabel="template.dl.dl017.xbxx" label="template.dl.dl017.xbxx" |
|
|
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData" |
|
|
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData" |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
<LineLabel label="template.dl.dl020.czbz" /> |
|
|
|
|
|
<Step ref="stepRef" :formData="formData.stepData"></Step> |
|
|
|
|
|
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.dlbz" label="template.dl.dl020.dlbz" |
|
|
|
|
|
|
|
|
<LineLabel label="template.dl.dl017.qcxjjyqk" /> |
|
|
|
|
|
<CustomTable |
|
|
|
|
|
@headerSelectChange="onHeaderSelectChange" |
|
|
|
|
|
fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur" |
|
|
|
|
|
@beforeSaveRecord = "beforeSaveRecord" |
|
|
|
|
|
:showAddRow="false" :showOperation="fillType === 'actFill'" |
|
|
|
|
|
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> |
|
|
|
|
|
</CustomTable> |
|
|
|
|
|
|
|
|
|
|
|
<LineLabel label="template.dl.dl017.czbz" /> |
|
|
|
|
|
<Step ref="stepRef" :formData="formData.stepData"></Step> |
|
|
|
|
|
|
|
|
|
|
|
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark" |
|
|
ref="remarkRef" :formConfig="remarkConig" :formData="formData" /> |
|
|
ref="remarkRef" :formConfig="remarkConig" :formData="formData" /> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
@ -32,11 +48,18 @@ import LineLabel from "@/components/Template/LineLabel"; |
|
|
import TableList from "@/components/Template/Table"; |
|
|
import TableList from "@/components/Template/Table"; |
|
|
import Step from "@/components/Template/Step"; |
|
|
import Step from "@/components/Template/Step"; |
|
|
import templateMixin from "../../mixins/templateMixin"; |
|
|
import templateMixin from "../../mixins/templateMixin"; |
|
|
import moment from "moment"; |
|
|
|
|
|
|
|
|
import CustomTable from '@/components/Template/CustomTable.vue'; |
|
|
|
|
|
import { EventBus } from "@/utils/eventBus"; |
|
|
|
|
|
import { uniqeResource } from "@/utils/calUnitTools"; |
|
|
|
|
|
import { debounce } from 'lodash-es' |
|
|
|
|
|
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue" |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: "DL020", |
|
|
|
|
|
components: { BaseInfoFormPackage, LineLabel, TableList, Step }, |
|
|
|
|
|
|
|
|
name: "DL017", |
|
|
|
|
|
dicts: [ |
|
|
|
|
|
'business_dl_qsxjbltj','business_tjdw' |
|
|
|
|
|
], |
|
|
|
|
|
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete }, |
|
|
mixins: [templateMixin], |
|
|
mixins: [templateMixin], |
|
|
props: { |
|
|
props: { |
|
|
fillType: { |
|
|
fillType: { |
|
|
@ -84,10 +107,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
type: "cellItem", |
|
|
type: "cellItem", |
|
|
label: 'template.dl.dl020.sydd', |
|
|
|
|
|
|
|
|
label: 'template.dl.dl017.sydd', |
|
|
config: { |
|
|
config: { |
|
|
pre: { |
|
|
|
|
|
label: 'template.dl.dl020.sydd', |
|
|
|
|
|
|
|
|
sydd: { |
|
|
|
|
|
label: 'template.dl.dl017.sydd', |
|
|
type: "input", |
|
|
type: "input", |
|
|
fillType: "actFill", |
|
|
fillType: "actFill", |
|
|
}, |
|
|
}, |
|
|
@ -95,7 +118,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
type: "cellItem", |
|
|
type: "cellItem", |
|
|
label: 'template.dl.dl020.czsj', |
|
|
|
|
|
|
|
|
label: 'template.dl.dl017.czsj', |
|
|
config: { |
|
|
config: { |
|
|
startDate: { |
|
|
startDate: { |
|
|
label: 'template.common.startTime', |
|
|
label: 'template.common.startTime', |
|
|
@ -109,20 +132,138 @@ export default { |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
// 生物样品移交记录表信息 |
|
|
|
|
|
|
|
|
// 细胞信息 |
|
|
swypyjInfoFormConfig() { |
|
|
swypyjInfoFormConfig() { |
|
|
return [ |
|
|
return [ |
|
|
{ |
|
|
{ |
|
|
type: "cellItem", |
|
|
type: "cellItem", |
|
|
config: { |
|
|
config: { |
|
|
qxbd: { |
|
|
qxbd: { |
|
|
span:1, |
|
|
|
|
|
label: 'template.dl.dl020.qxbd', |
|
|
|
|
|
|
|
|
// span:1, |
|
|
|
|
|
label: 'template.dl.dl017.qxbd', |
|
|
type: 'qxbd', |
|
|
type: 'qxbd', |
|
|
fillType: 'actFill', |
|
|
fillType: 'actFill', |
|
|
filledCodes:['bdmc','bdbh'], |
|
|
filledCodes:['bdmc','bdbh'], |
|
|
}, |
|
|
}, |
|
|
|
|
|
bltj: { |
|
|
|
|
|
label: 'template.dl.dl017.bltj', |
|
|
|
|
|
type: 'select', |
|
|
|
|
|
fillType: 'preFill', |
|
|
|
|
|
options: this.getDictOptions('business_dl_qsxjbltj'), |
|
|
|
|
|
otherCode: 'bltjOther', |
|
|
|
|
|
}, |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
// 秋水仙碱加液情况 |
|
|
|
|
|
stepColumns() { |
|
|
|
|
|
return [ |
|
|
|
|
|
{ |
|
|
|
|
|
label: "template.dl.dl017.jlzb", |
|
|
|
|
|
prop: "startSolutionCode", |
|
|
|
|
|
width: 180, |
|
|
|
|
|
bodyType: "input", |
|
|
|
|
|
bodyFillType: "actFill", |
|
|
|
|
|
bodyMaxlength: 10, |
|
|
|
|
|
bodyDisabled: true, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: "template.dl.dl017.xybh", |
|
|
|
|
|
prop: "startSolutionCode", |
|
|
|
|
|
width: 180, |
|
|
|
|
|
bodyType: "input", |
|
|
|
|
|
bodyFillType: "actFill", |
|
|
|
|
|
bodyMaxlength: 10, |
|
|
|
|
|
bodyDisabled: true, |
|
|
|
|
|
},{ |
|
|
|
|
|
label: "template.dl.dl017.sjqszqk", |
|
|
|
|
|
prop: "startSolutionCode", |
|
|
|
|
|
width: 180, |
|
|
|
|
|
bodyType: "input", |
|
|
|
|
|
bodyFillType: "actFill", |
|
|
|
|
|
bodyMaxlength: 10, |
|
|
|
|
|
bodyDisabled: true, |
|
|
|
|
|
},{ |
|
|
|
|
|
label: "template.dl.dl017.sjqcdqk", |
|
|
|
|
|
prop: "startSolutionCode", |
|
|
|
|
|
width: 180, |
|
|
|
|
|
bodyType: "input", |
|
|
|
|
|
bodyFillType: "actFill", |
|
|
|
|
|
bodyMaxlength: 10, |
|
|
|
|
|
bodyDisabled: true, |
|
|
|
|
|
},{ |
|
|
|
|
|
label: "template.dl.dl017.saqqtqk", |
|
|
|
|
|
prop: "startSolutionCode", |
|
|
|
|
|
width: 180, |
|
|
|
|
|
bodyType: "input", |
|
|
|
|
|
bodyFillType: "actFill", |
|
|
|
|
|
bodyMaxlength: 10, |
|
|
|
|
|
bodyDisabled: true, |
|
|
|
|
|
},{ |
|
|
|
|
|
label: "template.dl.dl017.ddpyy", |
|
|
|
|
|
prop: "startSolutionCode", |
|
|
|
|
|
width: 180, |
|
|
|
|
|
bodyType: "input", |
|
|
|
|
|
bodyFillType: "actFill", |
|
|
|
|
|
bodyMaxlength: 10, |
|
|
|
|
|
bodyDisabled: true, |
|
|
|
|
|
},{ |
|
|
|
|
|
label: "template.dl.dl017.xd", |
|
|
|
|
|
prop: "startSolutionCode", |
|
|
|
|
|
width: 180, |
|
|
|
|
|
bodyType: "input", |
|
|
|
|
|
bodyFillType: "actFill", |
|
|
|
|
|
bodyMaxlength: 10, |
|
|
|
|
|
bodyDisabled: true, |
|
|
|
|
|
},{ |
|
|
|
|
|
label: "template.dl.dl017.sj", |
|
|
|
|
|
prop: "startSolutionCode", |
|
|
|
|
|
width: 180, |
|
|
|
|
|
bodyType: "input", |
|
|
|
|
|
bodyFillType: "actFill", |
|
|
|
|
|
bodyMaxlength: 10, |
|
|
|
|
|
bodyDisabled: true, |
|
|
|
|
|
},{ |
|
|
|
|
|
label: "template.dl.dl017.ds", |
|
|
|
|
|
prop: "startSolutionCode", |
|
|
|
|
|
width: 180, |
|
|
|
|
|
bodyType: "input", |
|
|
|
|
|
bodyFillType: "actFill", |
|
|
|
|
|
bodyMaxlength: 10, |
|
|
|
|
|
bodyDisabled: true, |
|
|
|
|
|
},{ |
|
|
|
|
|
label: "template.dl.dl017.dy1gd", |
|
|
|
|
|
prop: "startSolutionCode", |
|
|
|
|
|
width: 180, |
|
|
|
|
|
bodyType: "input", |
|
|
|
|
|
bodyFillType: "actFill", |
|
|
|
|
|
bodyMaxlength: 10, |
|
|
|
|
|
bodyDisabled: true, |
|
|
|
|
|
},{ |
|
|
|
|
|
label: "template.dl.dl017.dy2gd", |
|
|
|
|
|
prop: "startSolutionCode", |
|
|
|
|
|
width: 180, |
|
|
|
|
|
bodyType: "input", |
|
|
|
|
|
bodyFillType: "actFill", |
|
|
|
|
|
bodyMaxlength: 10, |
|
|
|
|
|
bodyDisabled: true, |
|
|
|
|
|
},{ |
|
|
|
|
|
label: "template.dl.dl017.dy3gd", |
|
|
|
|
|
prop: "startSolutionCode", |
|
|
|
|
|
width: 180, |
|
|
|
|
|
bodyType: "input", |
|
|
|
|
|
bodyFillType: "actFill", |
|
|
|
|
|
bodyMaxlength: 10, |
|
|
|
|
|
bodyDisabled: true, |
|
|
|
|
|
},{ |
|
|
|
|
|
label: "template.dl.dl017.dy4gd", |
|
|
|
|
|
prop: "startSolutionCode", |
|
|
|
|
|
width: 180, |
|
|
|
|
|
bodyType: "input", |
|
|
|
|
|
bodyFillType: "actFill", |
|
|
|
|
|
bodyMaxlength: 10, |
|
|
|
|
|
bodyDisabled: true, |
|
|
}, |
|
|
}, |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
@ -135,42 +276,80 @@ export default { |
|
|
mounted() { |
|
|
mounted() { |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
// 点击按钮 |
|
|
|
|
|
// handleClickButton(item,signData){ |
|
|
|
|
|
// this.$refs.ypjsInfoRef.updateFormData("jssj", moment().format("YYYY/MM/DD HH:mm"),{isUpdateRecord:true,signData}); |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
//选择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); |
|
|
|
|
|
}, |
|
|
|
|
|
//分装回调 |
|
|
|
|
|
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); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
//获取已填写的表单数据 |
|
|
//获取已填写的表单数据 |
|
|
async getFilledFormData() { |
|
|
|
|
|
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"]); |
|
|
|
|
|
return content; |
|
|
|
|
|
// const baseData = this.$refs.baseInfoRef.getFilledFormData(); |
|
|
|
|
|
// const swypyjData = this.$refs.swypyjInfoRef.getFilledFormData(); |
|
|
|
|
|
// const remarkData = this.$refs.remarkRef.getFilledFormData(); |
|
|
|
|
|
|
|
|
|
|
|
// return { |
|
|
|
|
|
// ...baseData, |
|
|
|
|
|
// ...swypyjData, |
|
|
|
|
|
// ...remarkData, |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
getFilledFormData() { |
|
|
|
|
|
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"]) |
|
|
}, |
|
|
}, |
|
|
//获取填写完成的表单数据 |
|
|
//获取填写完成的表单数据 |
|
|
async getFormData() { |
|
|
async getFormData() { |
|
|
//先校验再获取值 |
|
|
|
|
|
const validFlag = await this.validFields(); |
|
|
|
|
|
if (!validFlag) { |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
let content = this.getFilledFormData(); |
|
|
|
|
|
return content |
|
|
|
|
|
}, |
|
|
|
|
|
//只做校验 |
|
|
|
|
|
async validFields() { |
|
|
|
|
|
// 构建需要验证的引用数组 |
|
|
|
|
|
let refsToValidate = ["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"]; |
|
|
|
|
|
return await this.validFormFields(refsToValidate); |
|
|
|
|
|
|
|
|
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"]); |
|
|
|
|
|
return content; |
|
|
}, |
|
|
}, |
|
|
getResource() { |
|
|
getResource() { |
|
|
// let content = this.getFilledFormData(); |
|
|
|
|
|
//使用的试剂、仪器 |
|
|
//使用的试剂、仪器 |
|
|
const stepResource = this.$refs.stepRef.getStepResource() |
|
|
const stepResource = this.$refs.stepRef.getStepResource() |
|
|
this.resourceTmp = stepResource.sjResource || [] |
|
|
this.resourceTmp = stepResource.sjResource || [] |
|
|
@ -179,27 +358,18 @@ export default { |
|
|
}, |
|
|
}, |
|
|
//保存 |
|
|
//保存 |
|
|
async onSave() { |
|
|
async onSave() { |
|
|
const formData = this.getStepResource(); |
|
|
|
|
|
console.log(formData, "formData") |
|
|
|
|
|
|
|
|
let content = await this.$refs.stepRef.getFormData(); |
|
|
|
|
|
console.log(content); |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 删除表格行 |
|
|
|
|
|
// deleteRow(rowIndex) { |
|
|
|
|
|
// const tableRef = this.$refs['tableRef']; |
|
|
|
|
|
// if (tableRef) { |
|
|
|
|
|
// tableRef.deleteRow(rowIndex); |
|
|
|
|
|
// } |
|
|
|
|
|
// }, |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
<style rel="stylesheet/scss" lang="scss"> |
|
|
<style rel="stylesheet/scss" lang="scss"> |
|
|
.mt-20 { |
|
|
|
|
|
margin-top: 20px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.print-btn { |
|
|
|
|
|
margin-bottom: 20px; |
|
|
|
|
|
} |
|
|
|
|
|
.config-header-end { |
|
|
|
|
|
display: flex; |
|
|
|
|
|
justify-content: flex-end; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
margin-bottom: 15px; |
|
|
|
|
|
font-weight: bold; |
|
|
|
|
|
font-size: 16px; |
|
|
|
|
|
color: #303133; |
|
|
|
|
|
} |
|
|
|
|
|
</style> |
|
|
</style> |