|
|
|
@ -8,78 +8,42 @@ |
|
|
|
</div> |
|
|
|
<div class="detail-content"> |
|
|
|
<div class="content"> |
|
|
|
<BaseInfoFormPackage |
|
|
|
fieldItemLabel="template.common.baseInfo" |
|
|
|
label="template.common.baseInfo" |
|
|
|
:ref="refConf.base" |
|
|
|
:formConfig="baseInfoFormConfig" |
|
|
|
:formData="formData" |
|
|
|
/> |
|
|
|
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" |
|
|
|
:ref="refConf.base" :formConfig="baseInfoFormConfig" :formData="formData" /> |
|
|
|
|
|
|
|
<!-- <LineLabel label="template.dl.dl003.sysj" /> --> |
|
|
|
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" /> |
|
|
|
|
|
|
|
<LineLabel label="template.dl.dl007.yqsyxx" /> |
|
|
|
<CustomTable |
|
|
|
:columns="yqsyColumns" |
|
|
|
:ref="refConf.yqsy" |
|
|
|
@onRegentSubmit="(e) => onRegentSubmit(e)" |
|
|
|
:showOperation="fillType === 'actFill'" |
|
|
|
:showAddRow="fillType === 'actFill'" |
|
|
|
:formData="formData" |
|
|
|
:prefixKey="`yqsyTable`" |
|
|
|
> |
|
|
|
<CustomTable :columns="yqsyColumns" :ref="refConf.yqsy" @onRegentSubmit="(e) => onRegentSubmit(e)" |
|
|
|
:showOperation="fillType === 'actFill'" :showAddRow="fillType === 'actFill'" :formData="formData" |
|
|
|
:prefixKey="`yqsyTable`"> |
|
|
|
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
|
<TableOpertaionDelete |
|
|
|
:row="row" |
|
|
|
:rowIndex="rowIndex" |
|
|
|
:columns="columns" |
|
|
|
@deleteRow="() => deleteTableRow(rowIndex, 'yqsyTableRef')" |
|
|
|
></TableOpertaionDelete> |
|
|
|
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" |
|
|
|
@deleteRow="() => deleteTableRow(rowIndex, 'yqsyTableRef')"></TableOpertaionDelete> |
|
|
|
</template> |
|
|
|
</CustomTable> |
|
|
|
|
|
|
|
<LineLabel label="template.common.operationSteps" /> |
|
|
|
<div class="template-form-item"> |
|
|
|
<BaseInfoFormPackage |
|
|
|
fieldItemLabel="template.common.operationSteps" |
|
|
|
:ref="refConf.czInfo" |
|
|
|
:formConfig="czInfoFormConfig" |
|
|
|
:formData="formData" |
|
|
|
@clickButton="handleClickButton" |
|
|
|
@onRegentSubmit="onRegentSubmit" |
|
|
|
/> |
|
|
|
<CustomTable |
|
|
|
fieldItemLabel="template.common.operationSteps" |
|
|
|
:columns="jzjzColumns" |
|
|
|
@blur="operateBlur" |
|
|
|
:ref="'jzjzTableRef'" |
|
|
|
@onRegentSubmit="(e) => onRegentSubmit(e)" |
|
|
|
:showOperation="fillType === 'actFill'" |
|
|
|
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps" :ref="refConf.czInfo" |
|
|
|
:formConfig="czInfoFormConfig" :formData="formData" @clickButton="handleClickButton" |
|
|
|
@onRegentSubmit="onRegentSubmit" /> |
|
|
|
<CustomTable fieldItemLabel="template.common.operationSteps" :columns="jzjzColumns" @blur="operateBlur" |
|
|
|
:ref="'jzjzTableRef'" @onRegentSubmit="(e) => onRegentSubmit(e)" :showOperation="fillType === 'actFill'" |
|
|
|
:showAddRow="fillType === 'actFill'" |
|
|
|
:formData="{stepTableFormData:formData.stepTableFormData_1,headerSelectFields:{}}" |
|
|
|
:showHeaderSelect="fillType === 'actFill'" |
|
|
|
:prefixKey="`jzjzTable`" |
|
|
|
> |
|
|
|
:formData="{ stepTableFormData: formData.stepTableFormData_1, headerSelectFields: {} }" |
|
|
|
:showHeaderSelect="fillType === 'actFill'" :prefixKey="`jzjzTable`"> |
|
|
|
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
|
<TableOpertaionDelete |
|
|
|
:row="row" |
|
|
|
:rowIndex="rowIndex" |
|
|
|
:columns="columns" |
|
|
|
@deleteRow="() => deleteTableRow(rowIndex, 'jzjzTableRef')" |
|
|
|
></TableOpertaionDelete> |
|
|
|
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" |
|
|
|
@deleteRow="() => deleteTableRow(rowIndex, 'jzjzTableRef')"></TableOpertaionDelete> |
|
|
|
</template> |
|
|
|
</CustomTable> |
|
|
|
</div> |
|
|
|
|
|
|
|
<BaseInfoFormPackage |
|
|
|
fieldItemLabel="template.dl.dl007.bz" |
|
|
|
label="template.dl.dl007.bz" |
|
|
|
:ref="refConf.remark" |
|
|
|
:formConfig="remarkConig" |
|
|
|
:formData="formData" |
|
|
|
/> |
|
|
|
|
|
|
|
<BaseInfoFormPackage fieldItemLabel="template.dl.dl007.bz" label="template.dl.dl007.bz" :ref="refConf.remark" |
|
|
|
:formConfig="remarkConig" :formData="formData" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -94,6 +58,7 @@ import LineLabel from '@/components/Template/LineLabel' |
|
|
|
import TableList from '@/components/Template/Table' |
|
|
|
import Step from '@/components/Template/Step' |
|
|
|
import templateMixin from '../../mixins/templateMixin' |
|
|
|
import { uniqeYqOne, uniqeResourceOne } from "@/utils/calUnitTools"; |
|
|
|
import moment from 'moment' |
|
|
|
|
|
|
|
const refConf = { |
|
|
|
@ -135,7 +100,7 @@ export default { |
|
|
|
fillType: 'actFill', |
|
|
|
span: 1, |
|
|
|
placeholder: 'template.common.remarkPlaceholder', |
|
|
|
maxlength: 1000, |
|
|
|
maxlength: 1000, |
|
|
|
rows: 5 |
|
|
|
} |
|
|
|
} |
|
|
|
@ -143,7 +108,7 @@ export default { |
|
|
|
] |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
|
|
|
|
|
|
|
|
// if (this.fillType === "actFill") { |
|
|
|
// this.handleUpdateCode(formData); |
|
|
|
// } |
|
|
|
@ -207,7 +172,7 @@ export default { |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 仪器使用信息 |
|
|
|
yqsyColumns() { |
|
|
|
return [ |
|
|
|
@ -306,7 +271,7 @@ export default { |
|
|
|
subKey: 'pykssj', |
|
|
|
buttonName: 'template.dl.dl003.ksButton', |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
@ -319,7 +284,7 @@ export default { |
|
|
|
prop: "targetSolutionCode", |
|
|
|
bodyType: 'input', |
|
|
|
bodySubType: "span", |
|
|
|
bodySubKey: "subTargetSolutionCode", |
|
|
|
bodySubKey: "subTargetSolutionCode", |
|
|
|
myCodeFields: ["targetSolutionCode", "subTargetSolutionCode"],//分装的母液编号字段 |
|
|
|
bodyFillType: 'actFill' |
|
|
|
}, |
|
|
|
@ -339,25 +304,25 @@ export default { |
|
|
|
label: 'template.dl.dl003.jzjrtj', |
|
|
|
prop: 'jzjrtj', |
|
|
|
headerSelectKey: "targetDiluentVolumeUnit", |
|
|
|
headerOptions: this.getDictOptions('business_tjdw'), |
|
|
|
headerOptions: this.getDictOptions('business_tjdw'), |
|
|
|
bodyType: 'inputNumber', |
|
|
|
bodyMaxlength: 10, |
|
|
|
bodyMaxlength: 10, |
|
|
|
bodyFillType: 'actFill', |
|
|
|
fillType: 'actFill', |
|
|
|
} |
|
|
|
// { |
|
|
|
// label: "template.sp.sp003.ysmbrynd", |
|
|
|
// prop: "targetSolutionConcentration", |
|
|
|
// width: 210, |
|
|
|
// showWidth: 120, |
|
|
|
// headerSelectKey: "targetSolutionConcentrationUnit", |
|
|
|
// fillType: "preFill", |
|
|
|
// headerOptions: this.getDictOptions('business_nddw'), |
|
|
|
// bodyType: "inputNumber", |
|
|
|
// bodyFillType: "preFill", |
|
|
|
// bodyMaxlength: 10, |
|
|
|
// headerSelectTo:"actSolutionConcentrationUnit", |
|
|
|
// }, |
|
|
|
// label: "template.sp.sp003.ysmbrynd", |
|
|
|
// prop: "targetSolutionConcentration", |
|
|
|
// width: 210, |
|
|
|
// showWidth: 120, |
|
|
|
// headerSelectKey: "targetSolutionConcentrationUnit", |
|
|
|
// fillType: "preFill", |
|
|
|
// headerOptions: this.getDictOptions('business_nddw'), |
|
|
|
// bodyType: "inputNumber", |
|
|
|
// bodyFillType: "preFill", |
|
|
|
// bodyMaxlength: 10, |
|
|
|
// headerSelectTo:"actSolutionConcentrationUnit", |
|
|
|
// }, |
|
|
|
] |
|
|
|
}, |
|
|
|
}, |
|
|
|
@ -379,7 +344,7 @@ export default { |
|
|
|
moment().format('YYYY/MM/DD HH:mm'), |
|
|
|
{ isUpdateRecord: true, signData } |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
// 获取已填写的表单数据 |
|
|
|
getFilledFormData() { |
|
|
|
@ -394,11 +359,88 @@ export default { |
|
|
|
return await this.validFormFields(refNames) |
|
|
|
}, |
|
|
|
getResource() { |
|
|
|
// const stepResource = this.$refs.yqsyTableRef.getStepResource() |
|
|
|
// 使用的试剂、仪器 |
|
|
|
// this.resourceTmp = stepResource.sjResource || [] |
|
|
|
// this.yqResourceTmp = stepResource.yqResource || [] |
|
|
|
// return this.resourceTmp |
|
|
|
let content = this.getFilledFormData(); |
|
|
|
//生成resource |
|
|
|
let tmpResource = [] |
|
|
|
let tmpYq = [] |
|
|
|
if (this.fillType === "actFill") { |
|
|
|
let header1 = content.headerSelectFields_1 |
|
|
|
let table1 = content.stepTableFormData_1 |
|
|
|
//细菌 |
|
|
|
if (table1 && table1.length > 0) { |
|
|
|
for (let i = 0; i < table1.length; i++) { |
|
|
|
let item = table1[i] |
|
|
|
//生成 |
|
|
|
tmpResource.push({ |
|
|
|
mc: '', |
|
|
|
bh: item.targetSolutionCode + item.subTargetSolutionCode, |
|
|
|
ph: '', |
|
|
|
ndz: '', |
|
|
|
nd: '', |
|
|
|
nddw: '', |
|
|
|
ly: 'ELN配制', |
|
|
|
sxrq: null, |
|
|
|
kc: item.jzjrtj + header1.targetDiluentVolumeUnit, |
|
|
|
kcdw: header1.targetDiluentVolumeUnit, |
|
|
|
syl: null, |
|
|
|
type: null, //生成的时候传null |
|
|
|
elnType: this.product, //生成的时候传 his.product |
|
|
|
syldw: header1.targetDiluentVolumeUnit, |
|
|
|
yxzq: null, |
|
|
|
yxzqdw: null, |
|
|
|
}) |
|
|
|
//使用 1:试剂;3:给药制剂;5:麻精药;7:供试品 9:细胞;11:细菌 |
|
|
|
tmpResource.push({ |
|
|
|
mc: item.jzlymc, |
|
|
|
bh: item.jzlybh, |
|
|
|
ph: '', |
|
|
|
ndz: '', |
|
|
|
nd: '', |
|
|
|
nddw: '', |
|
|
|
ly: '', |
|
|
|
sxrq: null, |
|
|
|
kc: null, |
|
|
|
kcdw: null, |
|
|
|
syl: item.jzlytj, |
|
|
|
type: 9, //使用的时候传对应的值 |
|
|
|
elnType: null, //传null |
|
|
|
syldw: header1.targetDiluentVolumeUnit, |
|
|
|
yxzq: null, |
|
|
|
yxzqdw: null, |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
//仪器 |
|
|
|
let table = content.stepTableFormData |
|
|
|
if (table && table.length > 0) { |
|
|
|
for (let i = 0; i < table.length; i++) { |
|
|
|
let item = table[i] |
|
|
|
tmpYq.push({ |
|
|
|
mc: item.yqmc, |
|
|
|
xh: item.yqxh, |
|
|
|
bh: item.yqbh, |
|
|
|
jzrq: item.jzrq, |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
tmpYq.push({ |
|
|
|
mc: content.pykssjmc, |
|
|
|
xh: content.pykssjxh, |
|
|
|
bh: content.fssygbh, |
|
|
|
jzrq: content.pykssjjzrq, |
|
|
|
}) |
|
|
|
tmpYq.push({ |
|
|
|
mc: content.pyxmc, |
|
|
|
xh: content.pyxxh, |
|
|
|
bh: content.pyx, |
|
|
|
jzrq: content.pyxjzrq, |
|
|
|
}) |
|
|
|
this.yqResourceTmp = tmpYq |
|
|
|
} |
|
|
|
//使用的试剂,仪器 |
|
|
|
this.yqResourceTmp = uniqeYqOne(tmpYq) |
|
|
|
this.resourceTmp = uniqeResourceOne(tmpResource) |
|
|
|
return this.resourceTmp; |
|
|
|
}, |
|
|
|
onRegentSubmit(e) { |
|
|
|
const { selectInfo, key, rowIndex } = e |
|
|
|
@ -415,13 +457,26 @@ export default { |
|
|
|
if (key === 'qxbd') { |
|
|
|
this.$refs.czInfoRef.updateFormData('pykssj', row.startDate) |
|
|
|
} |
|
|
|
if (key == 'fssygbh') { |
|
|
|
this.$refs.czInfoRef.updateFormData('pykssjmc', row.mc) |
|
|
|
this.$refs.czInfoRef.updateFormData('pykssjxh', row.xh) |
|
|
|
this.$refs.czInfoRef.updateFormData('pykssjjzrq', row.jzrq) |
|
|
|
} |
|
|
|
if (key == 'pyx') { |
|
|
|
this.$refs.czInfoRef.updateFormData('pyxmc', row.mc) |
|
|
|
this.$refs.czInfoRef.updateFormData('pyxxh', row.xh) |
|
|
|
this.$refs.czInfoRef.updateFormData('pyxjzrq', row.jzrq) |
|
|
|
} |
|
|
|
if (key == 'jzlybh') { |
|
|
|
this.$refs['jzjzTableRef'].updateDataSourceByRowIndex(rowIndex, { jzlymc: row.mc, jzlytj: row.tj, jzlytjdw: row.tjdw }) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 保存 |
|
|
|
async onSave() { |
|
|
|
const formData = this.getStepResource() |
|
|
|
console.log(formData, 'formData') |
|
|
|
}, |
|
|
|
//处理table失焦事件 |
|
|
|
//处理table失焦事件 |
|
|
|
async operateBlur(params) { |
|
|
|
let isGeneratingSubCode = false; |
|
|
|
const { dataSource = [], rowIndex } = params; // 重点:接收当前行索引rowIndex |
|
|
|
@ -448,9 +503,9 @@ export default { |
|
|
|
isGeneratingSubCode = true; |
|
|
|
|
|
|
|
// 5. 调用接口生成子码(仅传当前行的参数) |
|
|
|
const subCode = await this.getLatestSnArr([{ |
|
|
|
pre: currentItem.targetSolutionCode, |
|
|
|
type: 1 |
|
|
|
const subCode = await this.getLatestSnArr([{ |
|
|
|
pre: currentItem.targetSolutionCode, |
|
|
|
type: 1 |
|
|
|
}]); |
|
|
|
|
|
|
|
// 6. 赋值到当前行(兼容接口返回空的情况) |
|
|
|
@ -469,20 +524,20 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
//选择table header下拉框也要更新体积 |
|
|
|
// onHeaderSelectChange(data){ |
|
|
|
// const {key, headerSelectFields,dataSource=[]} = data; |
|
|
|
// const keys = [ |
|
|
|
// 'targetDiluentVolumeUnit', |
|
|
|
// ] |
|
|
|
// if(keys.includes(key)){ |
|
|
|
// const {targetStartSolution,subTargetStartSolution} = this.$refs.stepFormPackageRef?.getFilledFormData(); |
|
|
|
// const params = { |
|
|
|
// subTargetStartSolution, |
|
|
|
// headerSelectFields |
|
|
|
// } |
|
|
|
// this.batchUpdateTargetStartSolutionVolume(dataSource,targetStartSolution,params) |
|
|
|
// } |
|
|
|
// }, |
|
|
|
// onHeaderSelectChange(data){ |
|
|
|
// const {key, headerSelectFields,dataSource=[]} = data; |
|
|
|
// const keys = [ |
|
|
|
// 'targetDiluentVolumeUnit', |
|
|
|
// ] |
|
|
|
// if(keys.includes(key)){ |
|
|
|
// const {targetStartSolution,subTargetStartSolution} = this.$refs.stepFormPackageRef?.getFilledFormData(); |
|
|
|
// const params = { |
|
|
|
// subTargetStartSolution, |
|
|
|
// headerSelectFields |
|
|
|
// } |
|
|
|
// this.batchUpdateTargetStartSolutionVolume(dataSource,targetStartSolution,params) |
|
|
|
// } |
|
|
|
// }, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
@ -494,6 +549,7 @@ export default { |
|
|
|
.print-btn { |
|
|
|
margin-bottom: 20px; |
|
|
|
} |
|
|
|
|
|
|
|
.config-header-end { |
|
|
|
display: flex; |
|
|
|
justify-content: flex-end; |
|
|
|
|