|
|
|
@ -2,7 +2,7 @@ |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div class="detail-container"> |
|
|
|
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.templateMc || |
|
|
|
<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="content"> |
|
|
|
@ -15,14 +15,16 @@ |
|
|
|
<LineLabel label="操作步骤" /> |
|
|
|
<div class="template-form-item"> |
|
|
|
<BaseInfoFormPackage @clickable="handleClickable" ref="stepFormPackageRef" |
|
|
|
@resetRecord="resetRecord" |
|
|
|
:formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" /> |
|
|
|
@resetRecord="resetRecord" :formConfig="stepFormConfig" @blur="onHandleBlur" |
|
|
|
:formData="formData" /> |
|
|
|
<CustomTable fieldItemLabel="操作步骤" @blur="onHandleTableBlur" :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> |
|
|
|
<TableOpertaion @startConfig="startConfig" @configComplete="configComplete" |
|
|
|
@printTag="printTag" @subPackageSubmit="subPackageSubmit" :fillType="fillType" |
|
|
|
:row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow"> |
|
|
|
</TableOpertaion> |
|
|
|
</template> |
|
|
|
</CustomTable> |
|
|
|
</div> |
|
|
|
@ -417,25 +419,25 @@ export default { |
|
|
|
mounted() { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
resetRecord(){ |
|
|
|
resetRecord() { |
|
|
|
this.$refs.stepTableRef.resetRecord(); |
|
|
|
}, |
|
|
|
startConfig(val){ |
|
|
|
startConfig(val) { |
|
|
|
const { rowData } = val; |
|
|
|
let postData = { |
|
|
|
bh:rowData.targetSolutionCode+rowData.subTargetSolutionCode, |
|
|
|
bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode, |
|
|
|
} |
|
|
|
this.startConfigRequest(postData); |
|
|
|
}, |
|
|
|
configComplete(val){ |
|
|
|
const { rowData,headerSelectFields } = val; |
|
|
|
configComplete(val) { |
|
|
|
const { rowData, headerSelectFields } = val; |
|
|
|
//计算实际目标溶液体积(实际起始溶液体积+实际稀释液体积) |
|
|
|
const {total,unit} = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit]) |
|
|
|
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, |
|
|
|
mc: null, |
|
|
|
bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode, |
|
|
|
nd: rowData.actSolutionConcentration,//实际目标溶液浓度 |
|
|
|
nddw: headerSelectFields.actSolutionConcentrationUnit, |
|
|
|
kc: total, |
|
|
|
kcdw: unit, |
|
|
|
} |
|
|
|
@ -444,27 +446,27 @@ export default { |
|
|
|
//打印标签回调 |
|
|
|
printTag(data) { |
|
|
|
const printConfig = this.getBasePrintConfig(data); |
|
|
|
EventBus.$emit('showTagPrintDialog', {printConfig}) |
|
|
|
EventBus.$emit('showTagPrintDialog', { printConfig }) |
|
|
|
}, |
|
|
|
//分装回调 |
|
|
|
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.subCode, |
|
|
|
kc:item.num, |
|
|
|
kcdw:dw, |
|
|
|
const { fzsj, rowData, headerSelectFields } = data; |
|
|
|
const { fzList = [], dw = "", mybh } = fzsj; |
|
|
|
if (fzList && fzList.length > 0) { |
|
|
|
const list = fzList.map((item) => { |
|
|
|
return { |
|
|
|
bh: mybh + 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, |
|
|
|
list:list |
|
|
|
studyId: this.formData.studyId, |
|
|
|
studyFormId: this.formData.id, |
|
|
|
bh: mybh, |
|
|
|
nd: rowData.actSolutionConcentration || 0, |
|
|
|
nddw: headerSelectFields.actSolutionConcentrationUnit, |
|
|
|
list: list |
|
|
|
} |
|
|
|
this.subPackageRequest(postData); |
|
|
|
} |
|
|
|
@ -511,15 +513,15 @@ export default { |
|
|
|
//选择试剂提交事件 |
|
|
|
onSelectReagentSubmit(code, row) { |
|
|
|
if (this.currentSubKey === "subStartSolution") {//起始源溶液点击事件 |
|
|
|
this.$refs.stepFormPackageRef.updateFormData("targetAcSolution", row.nd,["targetAcSolution"]); |
|
|
|
this.$refs.stepFormPackageRef.updateFormData("targetAcSolution", row.nd, ["targetAcSolution"]); |
|
|
|
this.updateStepTableData(row); |
|
|
|
} |
|
|
|
this.$refs.stepFormPackageRef.updateFormData(this.currentSubKey, code,[this.currentSubKey]); |
|
|
|
this.$refs.stepFormPackageRef.updateFormData(this.currentSubKey, code, [this.currentSubKey]); |
|
|
|
this.$refs.selectReagentDialogRef.onCancel() |
|
|
|
}, |
|
|
|
//更新table数据 |
|
|
|
updateStepTableData(row) { |
|
|
|
const {stepTableFormData = []} = this.$refs.stepTableRef.getFilledFormData(); |
|
|
|
const { stepTableFormData = [] } = this.$refs.stepTableRef.getFilledFormData(); |
|
|
|
|
|
|
|
// 创建新的表格数据副本 |
|
|
|
const newStepTableData = JSON.parse(JSON.stringify(stepTableFormData)); |
|
|
|
@ -535,7 +537,7 @@ export default { |
|
|
|
// 第三条的起始溶液编号是第二条数据里面的targetSolutionCode字段,以此类推 |
|
|
|
newStepTableData[i].startSolutionCode = newStepTableData[i - 1].targetSolutionCode; |
|
|
|
} |
|
|
|
const {actVol,actNd} = this.updateSjmbrynd(item, row.nd); |
|
|
|
const { actVol, actNd } = this.updateSjmbrynd(item, row.nd); |
|
|
|
item.actSolutionVolume = actVol; |
|
|
|
item.actSolutionConcentration = actNd; |
|
|
|
} |
|
|
|
@ -544,11 +546,40 @@ export default { |
|
|
|
this.$refs.stepTableRef.updateDataSource(newStepTableData); |
|
|
|
}, |
|
|
|
async getFormData() { |
|
|
|
return await this.validFormFields(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"]); |
|
|
|
let content = await this.validFormFields(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"]); |
|
|
|
//生成resource |
|
|
|
let tmpResource = [] |
|
|
|
let tableList = content.stepTableFormData |
|
|
|
if (tableList && tableList.length > 0) { |
|
|
|
for (let i = 0; i < tableList.length; i++) { |
|
|
|
//配置的试剂 |
|
|
|
let item = tableList[i] |
|
|
|
tmpResource.push({ |
|
|
|
mc: null, |
|
|
|
bh: item.targetSolutionCode + item.subTargetSolutionCode, |
|
|
|
ph: null, |
|
|
|
nd: item.actSolutionConcentration + content.headerSelectFields.actSolutionConcentrationUnit, |
|
|
|
source: 'ELN配制', |
|
|
|
sxrq: content.expireDate, |
|
|
|
ndz: item.actSolutionConcentration, |
|
|
|
nddw: content.headerSelectFields.actSolutionConcentrationUnit, |
|
|
|
kc: item.actStartSolutionVolume + item.actDiluentVolume,//todo 单位不一致-计算 |
|
|
|
kcdw: content.headerSelectFields.actStartSolutionVolumeUnit || content.headerSelectFields.actDiluentVolumeUnit,//todo 单位不一致-计算-按最小算 |
|
|
|
syl: null, |
|
|
|
syldw: content.headerSelectFields.actStartSolutionVolumeUnit || content.headerSelectFields.actDiluentVolumeUnit,//todo 单位不一致-计算-按最小算, |
|
|
|
yxzq: null, |
|
|
|
yxzqdw: null, |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
//使用的试剂 |
|
|
|
this.resource = tmpResource |
|
|
|
|
|
|
|
return content; |
|
|
|
}, |
|
|
|
async onSave() { |
|
|
|
// const formData = await this.getFormData(); |
|
|
|
const formData = await this.validFormFields(["baseInfoRef","stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"]); |
|
|
|
const formData = await this.validFormFields(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"]); |
|
|
|
|
|
|
|
console.log(formData, "formData") |
|
|
|
} |
|
|
|
|