diff --git a/src/views/business/comps/template/comps/dl/DL012.vue b/src/views/business/comps/template/comps/dl/DL012.vue index 373c7fa..78708c6 100644 --- a/src/views/business/comps/template/comps/dl/DL012.vue +++ b/src/views/business/comps/template/comps/dl/DL012.vue @@ -8,35 +8,17 @@
- + - - + +
- +
@@ -45,23 +27,13 @@
- +
- +
@@ -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;