Browse Source

fix:[模板管理]DL011

ouqian
15881625488@163.com 1 month ago
parent
commit
24df8e4e30
2 changed files with 78 additions and 82 deletions
  1. +77
    -81
      src/views/business/comps/template/comps/dl/DL011.vue
  2. +1
    -1
      src/views/business/comps/template/mixins/templateMixin.js

+ 77
- 81
src/views/business/comps/template/comps/dl/DL011.vue View File

@ -8,24 +8,11 @@
</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" />
<TableList
label="template.common.reagentInfo"
:columns="sysjColumns"
:dataSource="resourceSj"
/>
<TableList
label="template.common.instrumentInfo"
:columns="yqColumns"
:dataSource="yqResource"
/>
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resourceSj" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<!-- 细胞信息 -->
<LineLabel label="template.dl.dl011.xbxx" />
@ -35,13 +22,8 @@
$t('template.dl.dl011.bqdy')
}}</el-button>
</div>
<BaseInfoFormPackage
fieldItemLabel=""
label=""
:ref="refConf.xbxx"
:formConfig="xbxxConfig"
:formData="formData"
/>
<BaseInfoFormPackage fieldItemLabel="" label="" :ref="refConf.xbxx" :formConfig="xbxxConfig"
@onRegentSubmit="(data) => onTableRegentSubmit(data)" :formData="formData" />
</div>
<LineLabel label="template.dl.dl011.fxbz" />
@ -50,23 +32,13 @@
<!-- 预留区域 - 培养信息 -->
<LineLabel label="template.dl.dl011.pyxx" />
<div class="template-form-item">
<BaseInfoFormPackage
fieldItemLabel=""
label=""
:ref="refConf.pyxx"
:formConfig="pyxxConfig"
:formData="formData"
@clickButton="handlePyxxClickButton"
/>
<BaseInfoFormPackage fieldItemLabel="" label="" :ref="refConf.pyxx" :formConfig="pyxxConfig"
:formData="formData" @onRegentSubmit="(data) => onTableRegentSubmit(data)"
@clickButton="handlePyxxClickButton" />
</div>
<BaseInfoFormPackage
fieldItemLabel="template.dl.dl007.bz"
label="template.dl.dl007.bz"
:ref="refConf.remark"
:formConfig="remarkConfig"
:formData="formData"
/>
<BaseInfoFormPackage fieldItemLabel="template.dl.dl007.bz" label="template.dl.dl007.bz" :ref="refConf.remark"
:formConfig="remarkConfig" :formData="formData" />
</div>
</div>
</div>
@ -82,6 +54,7 @@ import TableList from '@/components/Template/Table'
import Step from '@/components/Template/Step'
import templateMixin from '../../mixins/templateMixin'
import moment from 'moment'
import { uniqeYqOne, uniqeResource } from "@/utils/calUnitTools";
const refConf = {
base: 'baseInfoRef',
@ -297,6 +270,17 @@ export default {
}
},
methods: {
onTableRegentSubmit(data) {
if (data.key === 'xbdcbh') {
this.$refs.xbxxRef.updateFormData('xbdcbh_tj', data.selectInfo.row.tj)
this.$refs.xbxxRef.updateFormData('xbdcbh_dw', data.selectInfo.row.tjdw)
}
if (data.key === 'pyxbh') {
this.$refs.pyxxRef.updateFormData('pyxbh_mc', data.selectInfo.row.mc)
this.$refs.pyxxRef.updateFormData('pyxbh_xh', data.selectInfo.row.xh)
this.$refs.pyxxRef.updateFormData('pyxbh_jzrq', data.selectInfo.row.jzrq)
}
},
//
handlePyxxClickButton(_item, signData) {
this.$refs.pyxxRef.updateFormData(
@ -322,49 +306,60 @@ export default {
return await this.validFormFields(refNames)
},
getResource() {
const content = this.getFilledFormData()
let tmpResource = []
let tmpYq = []
//
tmpResource.push({
mc: content.xbmc,
bh: content.fshxbbh + content.fshxbbhCodeSn,
ph: '',
ndz: '',
nd: '',
nddw: '',
ly: 'ELN配制',
sxrq: null,
kc: content.fshxbsjtj,
kcdw: content.fshxbsjtjUnit,
syl: null,
type: null, //null
elnType: this.product, // his.product
syldw: content.fshxbsjtjUnit,
yxzq: null,
yxzqdw: null,
})
//使
tmpResource.push({
mc: null,
bh: content.xbdcbh,
ph: '',
ndz: '',
nd: '',
nddw: '',
ly: '',
sxrq: null,
kc: null,
kcdw: null,
syl: content.xbdcbh_tj,
type: 9, //使
elnType: null, //null
syldw: content.xbdcbh_dw,
yxzq: null,
yxzqdw: null,
})
//使
tmpYq.push({
mc: content.pyxbh_mc,
xh: content.pyxbh_xh,
bh: content.pyxbh,
jzrq: content.pyxbh_jzrq,
})
//使
const stepResource = this.$refs.stepRef.getStepResource()
// 使
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = [...(stepResource.yqResource || [])]
//
const xbxxData = this.$refs.xbxxRef?.getFilledFormData() || {}
//
if (xbxxData.xbdcbh) {
const xbInfo = xbxxData.selectInfo_xbdcbh || {}
// type StepFormPackage xb
this.xbxjTmp = [
{
value: xbxxData.xbdcbh,
bh: xbInfo.bh || xbxxData.xbdcbh,
mc: xbInfo.mc || '',
xh: xbInfo.xh || '',
jzrq: xbInfo.jzrq || ''
}
]
} else {
this.xbxjTmp = []
}
//
const pyxxData = this.$refs.pyxxRef?.getFilledFormData() || {}
//
if (pyxxData.pyxbh) {
const pyxInfo = pyxxData.selectInfo_pyxbh || {}
// type StepFormPackage yq
this.yqResourceTmp.push({
type: 'yq',
value: pyxxData.pyxbh,
bh: pyxInfo.bh || pyxxData.pyxbh,
mc: pyxInfo.mc || '',
xh: pyxInfo.xh || '',
jzrq: pyxInfo.jzrq || ''
})
}
return this.resourceTmp
this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || [])
this.yqResourceTmp = uniqeYqOne(tmpYq, stepResource.yqResource || [])
debugger
return this.resourceTmp;
},
onRegentSubmit(e) {
//
@ -391,6 +386,7 @@ export default {
.print-btn {
margin-bottom: 20px;
}
.config-header-end {
display: flex;
justify-content: flex-end;

+ 1
- 1
src/views/business/comps/template/mixins/templateMixin.js View File

@ -93,7 +93,7 @@ export default {
id
} = v
if (v.resource) {
//type 类型:1:试剂;3:给药制剂;5:麻精药;7:供试品
//type 类型:1:试剂;3:给药制剂;5:麻精药;7:供试品 9:细胞;11:细菌
//试验试剂信息 试剂
// this.resource = _.filter(JSON.parse(v.resource), function (o) {
// return o.type == 1 || o.elnType == 1

Loading…
Cancel
Save