Browse Source

fix:[模板管理]DL014

ouqian
15881625488@163.com 1 month ago
parent
commit
e96e9317b6
3 changed files with 161 additions and 231 deletions
  1. +8
    -0
      src/views/business/comps/template/comps/dl/DL011.vue
  2. +9
    -48
      src/views/business/comps/template/comps/dl/DL012.vue
  3. +144
    -183
      src/views/business/comps/template/comps/dl/DL014.vue

+ 8
- 0
src/views/business/comps/template/comps/dl/DL011.vue View File

@ -55,6 +55,7 @@ import Step from '@/components/Template/Step'
import templateMixin from '../../mixins/templateMixin' import templateMixin from '../../mixins/templateMixin'
import moment from 'moment' import moment from 'moment'
import { uniqeYqOne, uniqeResource } from "@/utils/calUnitTools"; import { uniqeYqOne, uniqeResource } from "@/utils/calUnitTools";
import { EventBus } from "@/utils/eventBus";
const refConf = { const refConf = {
base: 'baseInfoRef', base: 'baseInfoRef',
@ -280,6 +281,13 @@ export default {
this.$refs.pyxxRef.updateFormData('pyxbh_xh', data.selectInfo.row.xh) this.$refs.pyxxRef.updateFormData('pyxbh_xh', data.selectInfo.row.xh)
this.$refs.pyxxRef.updateFormData('pyxbh_jzrq', data.selectInfo.row.jzrq) this.$refs.pyxxRef.updateFormData('pyxbh_jzrq', data.selectInfo.row.jzrq)
} }
//
const params = {
type: "fieldChanged",
newRecord: null,
resourceList: null,
}
EventBus.$emit('onModifyRecord', params);
}, },
// //
handlePyxxClickButton(_item, signData) { handlePyxxClickButton(_item, signData) {

+ 9
- 48
src/views/business/comps/template/comps/dl/DL012.vue View File

@ -50,6 +50,7 @@ import Step from '@/components/Template/Step'
import templateMixin from '../../mixins/templateMixin' import templateMixin from '../../mixins/templateMixin'
import moment from 'moment' import moment from 'moment'
import { uniqeYqOne, uniqeResource } from "@/utils/calUnitTools"; import { uniqeYqOne, uniqeResource } from "@/utils/calUnitTools";
import { EventBus } from "@/utils/eventBus";
const refConf = { const refConf = {
base: 'baseInfoRef', base: 'baseInfoRef',
@ -322,6 +323,13 @@ export default {
this.$refs.pyxxRef.updateFormData('pyxbh_xh', data.selectInfo.row.xh) this.$refs.pyxxRef.updateFormData('pyxbh_xh', data.selectInfo.row.xh)
this.$refs.pyxxRef.updateFormData('pyxbh_jzrq', data.selectInfo.row.jzrq) this.$refs.pyxxRef.updateFormData('pyxbh_jzrq', data.selectInfo.row.jzrq)
} }
//
const params = {
type: "fieldChanged",
newRecord: null,
resourceList: null,
}
EventBus.$emit('onModifyRecord', params);
}, },
handleClickButton(e, signData) { handleClickButton(e, signData) {
console.log(e) console.log(e)
@ -350,61 +358,15 @@ export default {
async validFields() { async validFields() {
return await this.validFormFields(refNames) return await this.validFormFields(refNames)
}, },
_getResource() {
const stepResource = this.$refs.stepRef.getStepResource()
// 使
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = [...(stepResource.yqResource || [])]
//
const xbxxData = this.$refs.xbxxRef?.getFilledFormData() || {}
//
if (xbxxData.xbzbqbh) {
const xbInfo = xbxxData.selectInfo_xbzbqbh || {}
// type
this.xbxjTmp = [
{
value: xbxxData.xbzbqbh,
bh: xbInfo.bh || xbxxData.xbzbqbh,
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
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
},
getResource() { getResource() {
const content = this.getFilledFormData() const content = this.getFilledFormData()
let tmpResource = [] let tmpResource = []
let tmpYq = [] let tmpYq = []
debugger
// //
for (var i = 0; i < parseInt(content.zbxbs); i++) { for (var i = 0; i < parseInt(content.zbxbs); i++) {
tmpResource.push({ tmpResource.push({
mc: content.xbmc, mc: content.xbmc,
bh: content['zbhxbbh_'+(i+1)] +content['zbhxbbhCodeSn_'+(i+1)],
bh: content['zbhxbbh_' + (i + 1)] + content['zbhxbbhCodeSn_' + (i + 1)],
ph: '', ph: '',
ndz: '', ndz: '',
nd: '', nd: '',
@ -451,7 +413,6 @@ export default {
const stepResource = this.$refs.stepRef.getStepResource() const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || []) this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || [])
this.yqResourceTmp = uniqeYqOne(tmpYq, stepResource.yqResource || []) this.yqResourceTmp = uniqeYqOne(tmpYq, stepResource.yqResource || [])
debugger
return this.resourceTmp; return this.resourceTmp;
}, },
onRegentSubmit(e) { onRegentSubmit(e) {

+ 144
- 183
src/views/business/comps/template/comps/dl/DL014.vue View File

@ -8,76 +8,36 @@
</div> </div>
<div class="detail-content"> <div class="detail-content">
<div class="content"> <div class="content">
<BaseInfoFormPackage
fieldItemLabel="template.common.baseInfo"
label="template.common.baseInfo"
:ref="refConf.base"
:formConfig="baseInfoFormConfig"
:formData="formData"
/>
<TableList
label="template.common.gyzjInfo"
:columns="gyzjColumns"
:dataSource="resourceGyzj"
/>
<TableList
label="template.common.reagentInfo"
:columns="sysjColumns"
:dataSource="resource"
/>
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
:ref="refConf.base" :formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.gyzjInfo" :columns="gyzjColumns" :dataSource="resourceGyzj" />
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<LineLabel label="template.dl.dl007.yqsyxx" /> <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 }"> <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> </template>
</CustomTable> </CustomTable>
<LineLabel label="template.dl.dl014.xbxx" /> <LineLabel label="template.dl.dl014.xbxx" />
<BaseInfoFormPackage
:ref="refConf.xbInfo"
:formConfig="xbInfoFormConfig"
:formData="formData"
/>
<BaseInfoFormPackage :ref="refConf.xbInfo" :formConfig="xbInfoFormConfig" :formData="formData" />
<!-- 剂量组配制信息 --> <!-- 剂量组配制信息 -->
<LineLabel label="template.dl.dl014.jlzpzxx" /> <LineLabel label="template.dl.dl014.jlzpzxx" />
<div class="template-form-item"> <div class="template-form-item">
<BaseInfoFormPackage
fieldItemLabel=""
label=""
:ref="refConf.jlzInfo"
:formConfig="jlzInfoFormConfig"
:formData="formData"
@select="onSftjs9Change"
@clickButton="handleJlzzsButton"
@blur="onJlzInfoBlur"
/>
<BaseInfoFormPackage fieldItemLabel="" label="" :ref="refConf.jlzInfo" :formConfig="jlzInfoFormConfig"
:formData="formData" @select="onSftjs9Change" @clickButton="handleJlzzsButton"
@onRegentSubmit="(data) => onTableRegentSubmit(data)" @blur="onJlzInfoBlur" />
<!-- 剂量组名称列表 --> <!-- 剂量组名称列表 -->
<CustomTable
:columns="jlzmcTableColumns"
:ref="refConf.jlzmcTable"
:showOperation="false"
:showAddRow="false"
:formData="jlzmcTableFormData"
:prefixKey="`jlzmcTable`"
@blur="onJlzmcTableBlur"
></CustomTable>
<CustomTable :columns="jlzmcTableColumns" :ref="refConf.jlzmcTable" :showOperation="false"
:showAddRow="false" :formData="jlzmcTableFormData" :prefixKey="`jlzmcTable`" @blur="onJlzmcTableBlur">
</CustomTable>
<!-- 完成按钮 --> <!-- 完成按钮 -->
<div class="jlzmc-complete-btn" v-if="fillType === 'preFill'"> <div class="jlzmc-complete-btn" v-if="fillType === 'preFill'">
@ -87,44 +47,22 @@
</div> </div>
<!-- 培养液 --> <!-- 培养液 -->
<BaseInfoFormPackage
fieldItemLabel=""
label=""
:ref="refConf.pyy"
:formConfig="pyyFormConfig"
:formData="formData"
/>
<BaseInfoFormPackage fieldItemLabel="" label="" :ref="refConf.pyy" :formConfig="pyyFormConfig"
@onRegentSubmit="(data) => onTableRegentSubmit(data)" :formData="formData" />
<!-- 剂量组列表 --> <!-- 剂量组列表 -->
<CustomTable
:columns="jlzTableColumns"
:ref="refConf.jlzTable"
:showOperation="false"
:showAddRow="false"
:formData="jlzTableFormData"
:prefixKey="`jlzTable`"
>
<template
slot="operation"
slot-scope="{ row, rowIndex, columns }"
>
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'jlzTableRef')"
></TableOpertaionDelete>
<CustomTable :columns="jlzTableColumns" :ref="refConf.jlzTable" :showOperation="false" :showAddRow="false"
:formData="jlzTableFormData" @onRegentSubmit="(data) => onTableRegentSubmit(data)"
:prefixKey="`jlzTable`">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'jlzTableRef')"></TableOpertaionDelete>
</template> </template>
</CustomTable> </CustomTable>
</div> </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> </div>
</div> </div>
@ -139,6 +77,8 @@ import LineLabel from '@/components/Template/LineLabel'
import TableList from '@/components/Template/Table' import TableList from '@/components/Template/Table'
import Step from '@/components/Template/Step' import Step from '@/components/Template/Step'
import templateMixin from '../../mixins/templateMixin' import templateMixin from '../../mixins/templateMixin'
import { uniqeResourceOne } from "@/utils/calUnitTools";
import { EventBus } from "@/utils/eventBus";
const refConf = { const refConf = {
base: 'baseInfoRef', base: 'baseInfoRef',
@ -464,7 +404,7 @@ export default {
bodyMaxlength: 10, bodyMaxlength: 10,
headerSelectKey: 'yss9hhyjrlUnit', headerSelectKey: 'yss9hhyjrlUnit',
headerOptions: this.getDictOptions('business_tjdw'), headerOptions: this.getDictOptions('business_tjdw'),
width: 180,
width: 220,
fillType: 'preFill' fillType: 'preFill'
}, },
{ {
@ -473,11 +413,11 @@ export default {
bodyType: 'inputNumber', bodyType: 'inputNumber',
bodyFillType: 'actFill', bodyFillType: 'actFill',
bodyMaxlength: 10, bodyMaxlength: 10,
headerSelectKey: 'yss9hhyjrlUnit',
headerSelectKey: 'sjs9hhyjrlUnit',
headerOptions: this.getDictOptions('business_tjdw'), headerOptions: this.getDictOptions('business_tjdw'),
copyFrom: 'yss9hhyjrl', copyFrom: 'yss9hhyjrl',
compareTo: 'yss9hhyjrl', compareTo: 'yss9hhyjrl',
width: 180,
width: 220,
fillType: 'preFill' fillType: 'preFill'
} }
) )
@ -513,7 +453,7 @@ export default {
bodyType: 'inputNumber', bodyType: 'inputNumber',
bodyFillType: 'actFill', bodyFillType: 'actFill',
bodyMaxlength: 10, bodyMaxlength: 10,
headerSelectKey: 'ysgspjrlUnit',
headerSelectKey: 'sjgspjrlUnit',
headerOptions: this.getDictOptions('business_tjdw'), headerOptions: this.getDictOptions('business_tjdw'),
copyFrom: 'ysgspjrl', copyFrom: 'ysgspjrl',
width: 180, width: 180,
@ -565,6 +505,27 @@ export default {
} }
}, },
methods: { methods: {
onTableRegentSubmit(data) {
if (data.key === 's9hhybh') {
this.$refs.jlzInfoRef.updateFormData('s9hhybh_dw', data.selectInfo.row.kcdw)
}
if (data.key === 'pyysj') {
this.$refs.pyyRef.updateFormData('pyysj_dw', data.selectInfo.row.kcdw)
}
// if (data.key === 'gspbh') {
// this.$refs.pyyRef.updateFormData(data.rowIndex+'_gspbh_dw', data.selectInfo.row.kcdw)
// }
if (data.key === 'xybh') {
this.$refs.pyyRef.updateFormData(data.rowIndex+'_xybh_dw', data.selectInfo.row.kcdw)
}
//
const params = {
type: "fieldChanged",
newRecord: null,
resourceList: null,
}
EventBus.$emit('onModifyRecord', params);
},
// //
deleteTableRow(rowIndex, refName) { deleteTableRow(rowIndex, refName) {
this.$refs[refName].deleteRow(rowIndex) this.$refs[refName].deleteRow(rowIndex)
@ -682,104 +643,104 @@ export default {
return true return true
}, },
getResource() { getResource() {
// 使
const yqsyData = this.$refs.yqsyTableRef?.getFilledFormData()
const yqsyList = yqsyData?.stepTableFormData || []
//
this.yqResourceTmp = yqsyList
.filter((item) => item.yqbh)
.map((item) => ({
type: 'yq',
bh: item.yqbh,
mc: item.yqmc,
xh: item.yqxh,
jzrq: item.jzrq
}))
// S9
const jlzInfoData = this.$refs.jlzInfoRef?.getFilledFormData()
const resourceList = []
// S9S9
if (this.isSftjs9Yes && jlzInfoData?.s9hhybh) {
resourceList.push({
mc: 'S9混合液',
bh: jlzInfoData.s9hhybh,
ph: null,
nd: null,
nddw: null,
ndz: null,
ly: null,
const content = this.getFilledFormData()
let tmpResource = []
let tmpYq = []
let sjs9hhyjrltotal=0
for (var i = 0; i < content.jlzTableData.length; i++) {
let item = content.jlzTableData[i]
sjs9hhyjrltotal=sjs9hhyjrltotal+parseFloat(item.sjs9hhyjrl)
//
tmpResource.push({
mc: null,
bh: item.xybh,
ph: '',
ndz: '',
nd: '',
nddw: '',
ly: '',
sxrq: null, sxrq: null,
kc: null, kc: null,
kcdw: null, kcdw: null,
type: 1,
syl: null, syl: null,
syldw: null,
type: 1, //null
elnType: null, // his.product
syldw: content[i+'_xybh_dw'],
yxzq: null, yxzq: null,
yxzqdw: null
yxzqdw: null,
})
//
tmpResource.push({
mc: null,
bh: item.gyzjbh,
ph: '',
ndz: '',
nd: '',
nddw: '',
ly: '',
sxrq: null,
kc: null,
kcdw: null,
syl: item.sjgspjrl,
type: 3, //null
elnType: null, // his.product
syldw: content.jlzHeaderSelectFields.sjgspjrlUnit,
yxzq: null,
yxzqdw: null,
}) })
} }
//
const jlzData = this.$refs.jlzTableRef?.getFilledFormData()
const jlzList = jlzData?.stepTableFormData || []
const jlzHeaderSelectFields = jlzData?.headerSelectFields || {}
// Set
const xybhSet = new Set()
const gspbhSet = new Set()
jlzList.forEach((item) => {
//
if (item.xybh && !xybhSet.has(item.xybh)) {
xybhSet.add(item.xybh)
resourceList.push({
mc: '细胞悬液',
bh: item.xybh,
ph: null,
nd: null,
nddw: null,
ndz: null,
ly: null,
sxrq: null,
kc: null,
kcdw: null,
type: 1,
syl: item.sjplyjrl || null,
syldw: jlzHeaderSelectFields.ysplyjrlUnit || null,
yxzq: null,
yxzqdw: null
})
}
//
if (item.gspbh && !gspbhSet.has(item.gspbh)) {
gspbhSet.add(item.gspbh)
resourceList.push({
mc: '供试品',
bh: item.gspbh,
ph: null,
nd: null,
nddw: null,
ndz: null,
ly: null,
sxrq: null,
kc: null,
kcdw: null,
type: 1,
syl: item.sjgspjrl || null,
syldw: jlzHeaderSelectFields.ysgspjrlUnit || null,
yxzq: null,
yxzqdw: null
})
}
//S9
tmpResource.push({
mc: null,
bh: content.s9hhybh,
ph: '',
ndz: '',
nd: '',
nddw: '',
ly: '',
sxrq: null,
kc: null,
kcdw: null,
syl: sjs9hhyjrltotal,
type: 1, //使
elnType: null, //null
syldw: content.jlzHeaderSelectFields.sjs9hhyjrlUnit,
yxzq: null,
yxzqdw: null,
}) })
this.resourceTmp = resourceList
return this.resourceTmp
//
tmpResource.push({
mc: null,
bh: content.pyysj,
ph: '',
ndz: '',
nd: '',
nddw: '',
ly: '',
sxrq: null,
kc: null,
kcdw: null,
syl: null,
type: 1, //使
elnType: null, //null
syldw: content.pyysj_dw,
yxzq: null,
yxzqdw: null,
})
//使
for (var i = 0; i < content.stepTableFormData.length; i++) {
let item = content.stepTableFormData[i]
tmpYq.push({
mc: item.yqmc,
xh: item.yqxh,
bh: item.yqbh,
jzrq: item.jzrq,
})
}
this.yqResourceTmp = tmpYq
this.resourceTmp = uniqeResourceOne(tmpResource)
debugger
return this.resourceTmp;
}, },
onRegentSubmit(e) { onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e const { selectInfo, key, rowIndex } = e

Loading…
Cancel
Save