|
|
@ -2,7 +2,7 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div> |
|
|
<div> |
|
|
<div class="detail-container"> |
|
|
<div class="detail-container"> |
|
|
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{formData.templateMc || $t('template.common.pageTitle')}}<img |
|
|
|
|
|
|
|
|
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{formData.templateMc || "生物样品标曲工作液制备表"}}<img |
|
|
src="@/assets/images/detail-title.png" /></div> |
|
|
src="@/assets/images/detail-title.png" /></div> |
|
|
<div class="detail-content"> |
|
|
<div class="detail-content"> |
|
|
<div class="content"> |
|
|
<div class="content"> |
|
|
@ -16,7 +16,7 @@ |
|
|
<div class="template-form-item"> |
|
|
<div class="template-form-item"> |
|
|
<BaseInfoFormPcakge @clickable="handleClickable" ref="stepFormPackageRef" :formConfig="stepFormConfig" @blur="onHandleBlur" |
|
|
<BaseInfoFormPcakge @clickable="handleClickable" ref="stepFormPackageRef" :formConfig="stepFormConfig" @blur="onHandleBlur" |
|
|
:formData="formData" /> |
|
|
:formData="formData" /> |
|
|
<CustomTable :showAddRow="false" @blur="onHandleTableBlur" :showOperation="fillType === 'actFillill'" ref="stepTableRef" :columns="stepColumns" |
|
|
|
|
|
|
|
|
<CustomTable :showAddRow="fillType === 'actFill'" @blur="onHandleTableBlur" :showOperation="fillType === 'actFill'" ref="stepTableRef" :columns="stepColumns" |
|
|
:formData="formData" > |
|
|
:formData="formData" > |
|
|
<template slot="operation" slot-scope="{ row, rowIndex}"> |
|
|
<template slot="operation" slot-scope="{ row, rowIndex}"> |
|
|
<TableOpertaion :fillType="fillType" :row="row" :rowIndex="rowIndex" @deleteRow="deleteRow"></TableOpertaion> |
|
|
<TableOpertaion :fillType="fillType" :row="row" :rowIndex="rowIndex" @deleteRow="deleteRow"></TableOpertaion> |
|
|
@ -445,10 +445,37 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
//选择试剂提交事件 |
|
|
//选择试剂提交事件 |
|
|
onSelectReagentSubmit(code){ |
|
|
|
|
|
|
|
|
onSelectReagentSubmit(code,row){ |
|
|
|
|
|
if(this.currentSubKey === "subStartSolution"){//起始源溶液点击事件 |
|
|
|
|
|
this.$refs.stepFormPackageRef.updateFormData("targetAcSolution", row.vol); |
|
|
|
|
|
this.updateStepTableData(row); |
|
|
|
|
|
} |
|
|
this.$refs.stepFormPackageRef.updateFormData(this.currentSubKey, code); |
|
|
this.$refs.stepFormPackageRef.updateFormData(this.currentSubKey, code); |
|
|
|
|
|
|
|
|
this.selectReagentVisible = false; |
|
|
this.selectReagentVisible = false; |
|
|
}, |
|
|
}, |
|
|
|
|
|
//更新table数据 |
|
|
|
|
|
updateStepTableData(row){ |
|
|
|
|
|
const {stepTableFormData = []} = this.formData; |
|
|
|
|
|
|
|
|
|
|
|
// 创建新的表格数据副本 |
|
|
|
|
|
const newStepTableData = JSON.parse(JSON.stringify(stepTableFormData)); |
|
|
|
|
|
|
|
|
|
|
|
// 遍历数据,按要求更新起始溶液编号 |
|
|
|
|
|
for (let i = 0; i < newStepTableData.length; i++) { |
|
|
|
|
|
if (i === 0) { |
|
|
|
|
|
// 第一条记录的起始溶液编号是确认弹框带出来的,也就是row.code字段 |
|
|
|
|
|
newStepTableData[i].startSolutionCode = row.code; |
|
|
|
|
|
} else { |
|
|
|
|
|
// 第二条的起始溶液编号是第一条数据里面的targetSolutionCode字段, |
|
|
|
|
|
// 第三条的起始溶液编号是第二条数据里面的targetSolutionCode字段,以此类推 |
|
|
|
|
|
newStepTableData[i].startSolutionCode = newStepTableData[i - 1].targetSolutionCode; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 更新stepTableRef组件的数据 |
|
|
|
|
|
this.$refs.stepTableRef.updateDataSource(newStepTableData); |
|
|
|
|
|
}, |
|
|
async getFormData() { |
|
|
async getFormData() { |
|
|
return await this.validFormFields(["baseInfoRef", "storageConditionRef","stepFormPackageRef","stepTableRef","stepRef","remarkRef"]); |
|
|
return await this.validFormFields(["baseInfoRef", "storageConditionRef","stepFormPackageRef","stepTableRef","stepRef","remarkRef"]); |
|
|
}, |
|
|
}, |
|
|
|