|
|
|
@ -3,68 +3,48 @@ |
|
|
|
<div> |
|
|
|
<div class="detail-container"> |
|
|
|
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.templateMc || |
|
|
|
$t('template.sp.sp009.title') }}<img src="@/assets/images/detail-title.png" /></div> |
|
|
|
$t('template.sp.sp009.title') }}<img src="@/assets/images/detail-title.png" /></div> |
|
|
|
<div class="detail-content"> |
|
|
|
<div class="content"> |
|
|
|
<BaseInfoFormPcakge fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" ref="baseInfoRef" |
|
|
|
:formConfig="baseInfoFormConfig" :formData="formData" /> |
|
|
|
<TableList label="template.common.reagentInfo" :columns="sysjColumns" |
|
|
|
:dataSource="resource" /> |
|
|
|
<TableList label="template.common.instrumentInfo" :columns="yqsColumns" |
|
|
|
:dataSource="resource" /> |
|
|
|
<BaseInfoFormPcakge fieldItemLabel="template.common.storageCondition" label="template.common.storageCondition" ref="storageConditionRef" |
|
|
|
<BaseInfoFormPcakge fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" |
|
|
|
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" /> |
|
|
|
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" /> |
|
|
|
<TableList label="template.common.instrumentInfo" :columns="yqsColumns" :dataSource="resource" /> |
|
|
|
<BaseInfoFormPcakge fieldItemLabel="template.common.storageCondition" |
|
|
|
label="template.common.storageCondition" ref="storageConditionRef" |
|
|
|
:formConfig="storageFormConfig" :formData="formData" /> |
|
|
|
<LineLabel label="template.common.operationSteps" /> |
|
|
|
<div class="template-form-item"> |
|
|
|
<BaseInfoFormPcakge fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef" :formConfig="stepFormConfig" @blur="onHandleBlur" |
|
|
|
:formData="formData" /> |
|
|
|
<span>基质</span> |
|
|
|
<BaseInfoFormPcakge fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef" |
|
|
|
:formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" /> |
|
|
|
|
|
|
|
<CustomTable |
|
|
|
@blur="onHandleTableBlur" |
|
|
|
:ref="`tableRef`" |
|
|
|
:columns="tableStepColumns" |
|
|
|
:formData="formData" |
|
|
|
:prefixKey = "`table`" |
|
|
|
@clickable="handleClickable" |
|
|
|
fieldItemLabel = "这个是什么" |
|
|
|
> |
|
|
|
<CustomTable @blur="onHandleTableBlur" :ref="`tableRef`" :columns="tableStepColumns" |
|
|
|
:formData="formData" :prefixKey="`table`" @clickable="handleClickable" |
|
|
|
fieldItemLabel="这个是什么"> |
|
|
|
<template slot="operation" slot-scope="{ row, rowIndex}"> |
|
|
|
<TableOpertaion |
|
|
|
:fillType="fillType" |
|
|
|
:row="row" |
|
|
|
:rowIndex="rowIndex" |
|
|
|
@deleteRow="(rowIndex) => deleteRow(rowIndex)" |
|
|
|
></TableOpertaion> |
|
|
|
<TableOpertaion :fillType="fillType" :row="row" :rowIndex="rowIndex" |
|
|
|
@deleteRow="(rowIndex) => deleteRow(rowIndex)"></TableOpertaion> |
|
|
|
</template> |
|
|
|
</CustomTable> |
|
|
|
</div> |
|
|
|
<div class="template-form-item"> |
|
|
|
<span>test</span> |
|
|
|
<span>溶液</span> |
|
|
|
|
|
|
|
<BaseInfoFormPcakge fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef" :formConfig="stepFormConfig" @blur="onHandleBlur" |
|
|
|
:formData="formData" /> |
|
|
|
<CustomTable |
|
|
|
@blur="onHandleTableBlur" |
|
|
|
:ref="`tableRef`" |
|
|
|
:columns="tableStepColumns" |
|
|
|
:formData="formData" |
|
|
|
:prefixKey = "`table`" |
|
|
|
@clickable="handleClickable" |
|
|
|
fieldItemLabel = "这个是什么" |
|
|
|
> |
|
|
|
<BaseInfoFormPcakge fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef" |
|
|
|
:formConfig="rongyeStepFormConfig" @blur="onHandleBlur" :formData="formData" /> |
|
|
|
<CustomTable @blur="onHandleTableBlur" :ref="`tableRef`" :columns="rongyeTableStepColumns" |
|
|
|
:formData="formData" :prefixKey="`table`" @clickable="handleClickable" |
|
|
|
fieldItemLabel="这个是什么"> |
|
|
|
<template slot="operation" slot-scope="{ row, rowIndex}"> |
|
|
|
<TableOpertaion |
|
|
|
:fillType="fillType" |
|
|
|
:row="row" |
|
|
|
:rowIndex="rowIndex" |
|
|
|
@deleteRow="(rowIndex) => deleteRow(rowIndex)" |
|
|
|
></TableOpertaion> |
|
|
|
<TableOpertaion :fillType="fillType" :row="row" :rowIndex="rowIndex" |
|
|
|
@deleteRow="(rowIndex) => deleteRow(rowIndex)"></TableOpertaion> |
|
|
|
</template> |
|
|
|
</CustomTable> |
|
|
|
</div> |
|
|
|
<Step ref="stepRef" :formData="formData.stepData"></Step> |
|
|
|
<BaseInfoFormPcakge fieldItemLabel="template.common.remark" label="template.common.remark" ref="remarkRef" :formConfig="remarkConig" |
|
|
|
:formData="formData" /> |
|
|
|
<BaseInfoFormPcakge fieldItemLabel="template.common.remark" label="template.common.remark" |
|
|
|
ref="remarkRef" :formConfig="remarkConig" :formData="formData" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -81,12 +61,12 @@ import Step from "@/components/Template/Step"; |
|
|
|
import templateMixin from "../../../mixins/templateMixin"; |
|
|
|
import CustomTable from '@/components/Template/CustomTable.vue'; |
|
|
|
import { getLatestSn } from '@/api/template'; |
|
|
|
import {getSWYPFXFFXYPZBBTableConfig} from "../../../formConfig/SWYPFXFFXYPZBBTableConfig.js"; |
|
|
|
import { getSWYPFXFFXYPZBBTableConfig, getSWYPFXFFXYPZBBTQHSLTableConfig } from "../../../formConfig/SWYPFXFFXYPZBBTableConfig.js"; |
|
|
|
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue" |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "SWYPFXRYPZB", |
|
|
|
components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable,TableOpertaion }, |
|
|
|
components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable, TableOpertaion }, |
|
|
|
mixins: [templateMixin], |
|
|
|
props: { |
|
|
|
fillType: { |
|
|
|
@ -107,7 +87,6 @@ export default { |
|
|
|
options: this.getDictOptions("business_cctj"), |
|
|
|
otherCode: "storageConditionOther", |
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
]; |
|
|
|
@ -222,17 +201,41 @@ export default { |
|
|
|
{ |
|
|
|
type: "step", |
|
|
|
config: { |
|
|
|
jz1: { |
|
|
|
label: 'template.sp.sp009.xzjz', |
|
|
|
type: "span", |
|
|
|
label: 'template.common.storageConditionLabel', |
|
|
|
jz: { |
|
|
|
label: 'template.sp.sp008.xzjz', |
|
|
|
type: "input", |
|
|
|
fillType: "preFill", |
|
|
|
options: this.getDictOptions("business_cctj"), |
|
|
|
otherCode: "storageConditionOther", |
|
|
|
subType: "clickable", |
|
|
|
subKey: "subJz", |
|
|
|
subFillType: "actFill", |
|
|
|
maxlength: 20, |
|
|
|
labelWidth: 80, |
|
|
|
}, |
|
|
|
|
|
|
|
jz: { |
|
|
|
label: 'template.sp.sp009.xzjz', |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
rongyeStepFormConfig() { |
|
|
|
return [ |
|
|
|
{ |
|
|
|
type: "step", |
|
|
|
config: { |
|
|
|
gzy: { |
|
|
|
label: 'template.sp.sp009.xzgzy', |
|
|
|
type: "input", |
|
|
|
fillType: "preFill", |
|
|
|
subType: "clickable", |
|
|
|
subKey: "subSolution", |
|
|
|
subFillType: "actFill", |
|
|
|
maxlength: 20, |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: "step", |
|
|
|
config: { |
|
|
|
xsy: { |
|
|
|
label: 'template.sp.sp009.xzxsy', |
|
|
|
type: "input", |
|
|
|
fillType: "preFill", |
|
|
|
subType: "clickable", |
|
|
|
@ -240,14 +243,15 @@ export default { |
|
|
|
subFillType: "actFill", |
|
|
|
maxlength: 20, |
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
] |
|
|
|
}, |
|
|
|
tableStepColumns() { |
|
|
|
return getSWYPFXFFXYPZBBTableConfig(this); |
|
|
|
return getSWYPFXFFXYPZBBTableConfig(this, 'business_sp_tqhsl', false); |
|
|
|
}, |
|
|
|
rongyeTableStepColumns() { |
|
|
|
return getSWYPFXFFXYPZBBTQHSLTableConfig(this, 'business_sp_tqhsl'); |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
@ -278,7 +282,7 @@ export default { |
|
|
|
formData: { |
|
|
|
immediate: true, |
|
|
|
handler(v) { |
|
|
|
if(!v.targetCodeSn && this.fillType === "actFill"){ |
|
|
|
if (!v.targetCodeSn && this.fillType === "actFill") { |
|
|
|
this.getCode(); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -287,36 +291,36 @@ export default { |
|
|
|
methods: { |
|
|
|
//点击表格单元格 |
|
|
|
handleClickable(col, rowIndex) { |
|
|
|
console.log("clickable",rowIndex, col) |
|
|
|
if(col.prop === "sjry"){ |
|
|
|
console.log("clickable", rowIndex, col) |
|
|
|
if (col.prop === "sjry") { |
|
|
|
//调用对应弹窗的方法; |
|
|
|
} |
|
|
|
this.$refs.tableRef.updateDataSourceByRowIndex(rowIndex,{ |
|
|
|
this.$refs.tableRef.updateDataSourceByRowIndex(rowIndex, { |
|
|
|
sjry: "我是填充进来的数据", |
|
|
|
}) |
|
|
|
}, |
|
|
|
//获取目标溶液编号 |
|
|
|
async getCode(){ |
|
|
|
async getCode() { |
|
|
|
const result = await getLatestSn({ |
|
|
|
count: 1, |
|
|
|
}) |
|
|
|
if(result.code == 200){ |
|
|
|
this.$refs.stepFormPackageRef.updateFormData("targetCodeSn",result.data) |
|
|
|
if (result.code == 200) { |
|
|
|
this.$refs.stepFormPackageRef.updateFormData("targetCodeSn", result.data) |
|
|
|
} |
|
|
|
}, |
|
|
|
//获取已填写的表单数据 |
|
|
|
getFilledFormData(){ |
|
|
|
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "tableRef","stepRef", "remarkRef"]) |
|
|
|
getFilledFormData() { |
|
|
|
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "tableRef", "stepRef", "remarkRef"]) |
|
|
|
}, |
|
|
|
async getFormData() { |
|
|
|
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef","tableRef" ,"stepRef", "remarkRef"]); |
|
|
|
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "tableRef", "stepRef", "remarkRef"]); |
|
|
|
//生成resource |
|
|
|
let tmpResource = [] |
|
|
|
debugger |
|
|
|
//配置的试剂 |
|
|
|
tmpResource.push({ |
|
|
|
mc: content.targetName, |
|
|
|
bh: content.targetCode+content.targetCodeSn, |
|
|
|
bh: content.targetCode + content.targetCodeSn, |
|
|
|
ph: '', |
|
|
|
nd: content.targetActConcentration + content.targetActConcentrationUnit, |
|
|
|
source: 'ELN配制', |
|
|
|
@ -326,12 +330,12 @@ export default { |
|
|
|
kc: content.targetActVolume, |
|
|
|
kcdw: content.targetActVolumeUnit, |
|
|
|
syl: null, |
|
|
|
syldw:content.targetActVolumeUnit, |
|
|
|
yxzq:content.effectivePeriod, |
|
|
|
yxzqdw:content.effectivePeriodUnit, |
|
|
|
syldw: content.targetActVolumeUnit, |
|
|
|
yxzq: content.effectivePeriod, |
|
|
|
yxzqdw: content.effectivePeriodUnit, |
|
|
|
}) |
|
|
|
//使用的试剂 |
|
|
|
this.resource=tmpResource |
|
|
|
this.resource = tmpResource |
|
|
|
|
|
|
|
return content; |
|
|
|
}, |
|
|
|
|