Browse Source

fix:[模板管理]DL012物资生成

ouqian
15881625488@163.com 1 month ago
parent
commit
88e9dd9b9c
1 changed files with 83 additions and 40 deletions
  1. +83
    -40
      src/views/business/comps/template/comps/dl/DL012.vue

+ 83
- 40
src/views/business/comps/template/comps/dl/DL012.vue View File

@ -8,35 +8,17 @@
</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.dl012.xbxx" />
<div class="template-form-item">
<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.dl012.zbbz" />
@ -45,23 +27,13 @@
<!-- 培养信息 -->
<LineLabel label="template.dl.dl012.pyxx" />
<div class="template-form-item">
<BaseInfoFormPackage
fieldItemLabel=""
label=""
:ref="refConf.pyxx"
:formConfig="pyxxConfig"
@clickButton="handleClickButton"
:formData="formData"
/>
<BaseInfoFormPackage fieldItemLabel="" label="" :ref="refConf.pyxx" :formConfig="pyxxConfig"
@clickButton="handleClickButton" @onRegentSubmit="(data) => onTableRegentSubmit(data)"
:formData="formData" />
</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>
@ -77,6 +49,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',
@ -339,6 +312,17 @@ export default {
}
},
methods: {
onTableRegentSubmit(data) {
if (data.key === 'xbzbqbh') {
this.$refs.xbxxRef.updateFormData('xbzbqbh_tj', data.selectInfo.row.tj)
this.$refs.xbxxRef.updateFormData('xbzbqbh_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)
}
},
handleClickButton(e, signData) {
console.log(e)
const { subKey } = e || {}
@ -366,7 +350,7 @@ export default {
async validFields() {
return await this.validFormFields(refNames)
},
getResource() {
_getResource() {
const stepResource = this.$refs.stepRef.getStepResource()
// 使
this.resourceTmp = stepResource.sjResource || []
@ -411,6 +395,64 @@ export default {
return this.resourceTmp
},
getResource() {
const content = this.getFilledFormData()
let tmpResource = []
let tmpYq = []
//
for (var i = 0; i < parseInt(content.zbxbs); i++) {
tmpResource.push({
mc: content.xbmc,
bh: content['zbhxbbh_'+(i+1)] +content['zbhxbbhCodeSn_'+(i+1)],
ph: '',
ndz: '',
nd: '',
nddw: '',
ly: 'ELN配制',
sxrq: null,
kc: content.zbhxbsjtj,
kcdw: content.zbhxbsjtjUnit,
syl: null,
type: null, //null
elnType: this.product, // his.product
syldw: content.zbhxbsjtjUnit,
yxzq: null,
yxzqdw: null,
})
}
//使
tmpResource.push({
mc: null,
bh: content.xbzbqbh,
ph: '',
ndz: '',
nd: '',
nddw: '',
ly: '',
sxrq: null,
kc: null,
kcdw: null,
syl: null,
type: 9, //使
elnType: null, //null
syldw: content.xbzbqbh_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 = uniqeResource(tmpResource, stepResource.sjResource || [])
this.yqResourceTmp = uniqeYqOne(tmpYq, stepResource.yqResource || [])
debugger
return this.resourceTmp;
},
onRegentSubmit(e) {
//
},
@ -430,6 +472,7 @@ export default {
.print-btn {
margin-bottom: 20px;
}
.config-header-end {
display: flex;
justify-content: flex-end;

Loading…
Cancel
Save