diff --git a/src/views/business/comps/template/comps/dl/DL011.vue b/src/views/business/comps/template/comps/dl/DL011.vue index 3e116c6..c927052 100644 --- a/src/views/business/comps/template/comps/dl/DL011.vue +++ b/src/views/business/comps/template/comps/dl/DL011.vue @@ -8,24 +8,11 @@
- + - - + + @@ -35,13 +22,8 @@ $t('template.dl.dl011.bqdy') }}
- +
@@ -50,23 +32,13 @@
- +
- + @@ -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; diff --git a/src/views/business/comps/template/mixins/templateMixin.js b/src/views/business/comps/template/mixins/templateMixin.js index c05e190..0906ef1 100644 --- a/src/views/business/comps/template/mixins/templateMixin.js +++ b/src/views/business/comps/template/mixins/templateMixin.js @@ -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