From e96e9317b62ab62c901c90a467ab77796e3d0222 Mon Sep 17 00:00:00 2001
From: "15881625488@163.com" <15881625488@163.com>
Date: Wed, 18 Mar 2026 18:20:31 +0800
Subject: [PATCH] =?UTF-8?q?fix:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86]DL014?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../business/comps/template/comps/dl/DL011.vue | 8 +
.../business/comps/template/comps/dl/DL012.vue | 57 +---
.../business/comps/template/comps/dl/DL014.vue | 327 +++++++++------------
3 files changed, 161 insertions(+), 231 deletions(-)
diff --git a/src/views/business/comps/template/comps/dl/DL011.vue b/src/views/business/comps/template/comps/dl/DL011.vue
index e41c302..4c3cee7 100644
--- a/src/views/business/comps/template/comps/dl/DL011.vue
+++ b/src/views/business/comps/template/comps/dl/DL011.vue
@@ -55,6 +55,7 @@ import Step from '@/components/Template/Step'
import templateMixin from '../../mixins/templateMixin'
import moment from 'moment'
import { uniqeYqOne, uniqeResource } from "@/utils/calUnitTools";
+import { EventBus } from "@/utils/eventBus";
const refConf = {
base: 'baseInfoRef',
@@ -280,6 +281,13 @@ export default {
this.$refs.pyxxRef.updateFormData('pyxbh_xh', data.selectInfo.row.xh)
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) {
diff --git a/src/views/business/comps/template/comps/dl/DL012.vue b/src/views/business/comps/template/comps/dl/DL012.vue
index ef9bf15..e10e802 100644
--- a/src/views/business/comps/template/comps/dl/DL012.vue
+++ b/src/views/business/comps/template/comps/dl/DL012.vue
@@ -50,6 +50,7 @@ import Step from '@/components/Template/Step'
import templateMixin from '../../mixins/templateMixin'
import moment from 'moment'
import { uniqeYqOne, uniqeResource } from "@/utils/calUnitTools";
+import { EventBus } from "@/utils/eventBus";
const refConf = {
base: 'baseInfoRef',
@@ -322,6 +323,13 @@ export default {
this.$refs.pyxxRef.updateFormData('pyxbh_xh', data.selectInfo.row.xh)
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) {
console.log(e)
@@ -350,61 +358,15 @@ export default {
async validFields() {
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() {
const content = this.getFilledFormData()
let tmpResource = []
let tmpYq = []
- debugger
//生成细胞
for (var i = 0; i < parseInt(content.zbxbs); i++) {
tmpResource.push({
mc: content.xbmc,
- bh: content['zbhxbbh_'+(i+1)] +content['zbhxbbhCodeSn_'+(i+1)],
+ bh: content['zbhxbbh_' + (i + 1)] + content['zbhxbbhCodeSn_' + (i + 1)],
ph: '',
ndz: '',
nd: '',
@@ -451,7 +413,6 @@ export default {
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || [])
this.yqResourceTmp = uniqeYqOne(tmpYq, stepResource.yqResource || [])
- debugger
return this.resourceTmp;
},
onRegentSubmit(e) {
diff --git a/src/views/business/comps/template/comps/dl/DL014.vue b/src/views/business/comps/template/comps/dl/DL014.vue
index 4956fb3..823c441 100644
--- a/src/views/business/comps/template/comps/dl/DL014.vue
+++ b/src/views/business/comps/template/comps/dl/DL014.vue
@@ -8,76 +8,36 @@
-
-
-
-
+
+
+
+
-
onRegentSubmit(e)"
- :showOperation="fillType === 'actFill'"
- :showAddRow="fillType === 'actFill'"
- :formData="formData"
- :prefixKey="`yqsyTable`"
- >
+ onRegentSubmit(e)"
+ :showOperation="fillType === 'actFill'" :showAddRow="fillType === 'actFill'" :formData="formData"
+ :prefixKey="`yqsyTable`">
- deleteTableRow(rowIndex, 'yqsyTableRef')"
- >
+ deleteTableRow(rowIndex, 'yqsyTableRef')">
-
+
-
+
@@ -139,6 +77,8 @@ import LineLabel from '@/components/Template/LineLabel'
import TableList from '@/components/Template/Table'
import Step from '@/components/Template/Step'
import templateMixin from '../../mixins/templateMixin'
+import { uniqeResourceOne } from "@/utils/calUnitTools";
+import { EventBus } from "@/utils/eventBus";
const refConf = {
base: 'baseInfoRef',
@@ -464,7 +404,7 @@ export default {
bodyMaxlength: 10,
headerSelectKey: 'yss9hhyjrlUnit',
headerOptions: this.getDictOptions('business_tjdw'),
- width: 180,
+ width: 220,
fillType: 'preFill'
},
{
@@ -473,11 +413,11 @@ export default {
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
- headerSelectKey: 'yss9hhyjrlUnit',
+ headerSelectKey: 'sjs9hhyjrlUnit',
headerOptions: this.getDictOptions('business_tjdw'),
copyFrom: 'yss9hhyjrl',
compareTo: 'yss9hhyjrl',
- width: 180,
+ width: 220,
fillType: 'preFill'
}
)
@@ -513,7 +453,7 @@ export default {
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
- headerSelectKey: 'ysgspjrlUnit',
+ headerSelectKey: 'sjgspjrlUnit',
headerOptions: this.getDictOptions('business_tjdw'),
copyFrom: 'ysgspjrl',
width: 180,
@@ -565,6 +505,27 @@ export default {
}
},
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) {
this.$refs[refName].deleteRow(rowIndex)
@@ -682,104 +643,104 @@ export default {
return true
},
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 = []
-
- // 如果添加了S9混合液,提取S9混合液编号
- 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,
kc: null,
kcdw: null,
- type: 1,
syl: null,
- syldw: null,
+ type: 1, //生成的时候传null
+ elnType: null, //生成的时候传 his.product
+ syldw: content[i+'_xybh_dw'],
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) {
const { selectInfo, key, rowIndex } = e