diff --git a/src/lang/en/template/pcr.js b/src/lang/en/template/pcr.js index 92be159..e5ae109 100644 --- a/src/lang/en/template/pcr.js +++ b/src/lang/en/template/pcr.js @@ -47,6 +47,19 @@ export default { ypznd: '样品终浓度', fj: 'Attachment', }, + pcr007: { + dztpbh: '电子天平编号', + clpbh: 'Analysis Batch Number', + ypmc: '样品名称', + ypcsnd: '样品初始浓度', + sxbs: '稀释倍数', + ysypxytj: '预设样品吸样体积', + sjypxytj: '实际样品吸样体积', + ysxsyxytj: '预设稀释液吸样体积', + sjxsyxytj: '实际稀释液吸样体积', + ypznd: '样品终浓度', + fj: 'Attachment', + }, // 生物样品分析方法学样品制备表-准确度与精密度 sp008: { title: diff --git a/src/lang/zh/template/pcr.js b/src/lang/zh/template/pcr.js index 953405b..80f8fe1 100644 --- a/src/lang/zh/template/pcr.js +++ b/src/lang/zh/template/pcr.js @@ -46,6 +46,19 @@ export default { ypznd: '样品终浓度', fj: '附件', }, + pcr007: { + dztpbh: '电子天平编号', + clpbh: 'Analysis Batch Number', + ypmc: '样品名称', + ypcsnd: '样品初始浓度', + sxbs: '稀释倍数', + ysypxytj: '预设样品吸样体积', + sjypxytj: '实际样品吸样体积', + ysxsyxytj: '预设稀释液吸样体积', + sjxsyxytj: '实际稀释液吸样体积', + ypznd: '样品终浓度', + fj: 'Attachment', + }, // 生物样品分析方法学样品制备表-Recovery sp009: { title: '生物样品分析方法学样品制备表(Recovery)', diff --git a/src/views/business/comps/template/TemplateTable.vue b/src/views/business/comps/template/TemplateTable.vue index eea82a2..dad03e8 100644 --- a/src/views/business/comps/template/TemplateTable.vue +++ b/src/views/business/comps/template/TemplateTable.vue @@ -52,6 +52,7 @@ import PCR002 from "./comps/pcr/PCR002.vue"; import PCR003 from "./comps/pcr/PCR003.vue"; import PCR004 from "./comps/pcr/PCR004.vue"; import PCR005 from "./comps/pcr/PCR005.vue"; +import PCR007 from "./comps/pcr/PCR007.vue"; //LBA // LBA001-使用SP001 @@ -114,7 +115,7 @@ export default { //色谱 SP001, SP003, SP00456,SP007, SP008, SP009,SP0019,SP0020, // PCR - PCR002, PCR003, PCR004, PCR005, + PCR002, PCR003, PCR004, PCR005,PCR007, //LBA LBA002, LBA003, @@ -162,7 +163,7 @@ export default { handleEditSignCancel(e) { EventBus.$emit('edit-sign-cancel', e); }, - + }, props: { sn: { @@ -232,6 +233,7 @@ export default { 'PCR003': 'PCR003', 'PCR004': 'PCR004', 'PCR005': 'PCR005', + 'PCR007': 'PCR007', //LBA 'LBA001': 'SP001', 'LBA002': 'LBA002', diff --git a/src/views/business/comps/template/comps/pcr/PCR005.vue b/src/views/business/comps/template/comps/pcr/PCR005.vue index 8b5599e..6a23326 100644 --- a/src/views/business/comps/template/comps/pcr/PCR005.vue +++ b/src/views/business/comps/template/comps/pcr/PCR005.vue @@ -16,10 +16,14 @@
- {{ - $t('template.common.downloadTemplate') }} - {{ $t('template.common.importTemplate') - }} +
+ {{ + $t('template.common.downloadTemplate') }} + {{ + $t('template.common.importTemplate') + }} +
+ @@ -57,7 +61,7 @@ import { isValueEmpty } from '@/utils/index'; import { getLatestSnArr } from '@/api/template'; import { EventBus } from "@/utils/eventBus"; import { volumeConverter } from "@/utils/volConverter";//体积单位转换 -import {convertConcentration} from "@/utils/conConverter";//浓度单位转换 +import { convertConcentration } from "@/utils/conConverter";//浓度单位转换 import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue'; import { getPCR005Config } from "../../formConfig/PCRTableConfig.js"; import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue" @@ -243,7 +247,21 @@ export default { this.$refs.ImportExcelDialog.show() }, onLoadExcelData(excelData) { - console.log(excelData) + excelData.shift() + let list = [] + excelData.forEach(item => { + list.push({ + ypmc: item[0], + ypcsnd: item[1], + sxbs: item[2], + ysypxytj: item[3], + targetDiluentVolumePrecision: 3, + actSolutionVolumePrecision: 3 + }) + }) + this.$refs.stepTableRef.addRows(list) + this.$refs.ImportExcelDialog.cancel() + this.onHandleTableBlur() }, // 失去焦点,计算 onHandleTableBlur() { @@ -259,8 +277,6 @@ export default { if (tableList && tableList.length > 0) { for (let i = 0; i < tableList.length; i++) { let item = tableList[i] - console.log(item) - if ( isValueEmpty(ysypxytjUnit) || isValueEmpty(ysxsyxytjUnit) || @@ -271,6 +287,7 @@ export default { ) { continue; } + // 计算预设稀释液吸样体积 公式:(稀释倍数-1)*样品理论体积 let ysxsyxytj = (item.sxbs - 1) * item.ysypxytj ysxsyxytj = volumeConverter.convert(ysxsyxytj + ysypxytjUnit, ysxsyxytjUnit).toFixed( @@ -280,19 +297,16 @@ export default { // 计算样品终浓度: 样品初始浓度/稀释倍数 - let ypznd = (item.ypcsnd ) / item.sxbs + let ypznd = (item.ypcsnd) / item.sxbs ypznd = convertConcentration.convert(ypznd + ypcsndUnit, ypzndUnit).toFixed( item.targetDiluentVolumePrecision ) tableList[i].ypznd = ypznd + } } this.$refs.stepTableRef.updateDataSource(tableList); } - - - - }, //获取已填写的表单数据 getFilledFormData() { diff --git a/src/views/business/comps/template/comps/pcr/PCR007.vue b/src/views/business/comps/template/comps/pcr/PCR007.vue new file mode 100644 index 0000000..8d8a7f5 --- /dev/null +++ b/src/views/business/comps/template/comps/pcr/PCR007.vue @@ -0,0 +1,390 @@ + + + + + \ No newline at end of file diff --git a/src/views/business/comps/template/dialog/ImportExcelDialog.vue b/src/views/business/comps/template/dialog/ImportExcelDialog.vue index 6a40b9c..e1029fa 100644 --- a/src/views/business/comps/template/dialog/ImportExcelDialog.vue +++ b/src/views/business/comps/template/dialog/ImportExcelDialog.vue @@ -3,7 +3,7 @@ - + {{$t('template.common.downloadTemplate') }} { bodySubPlaceholder: 'template.common.xswsPlaceholder', }, ] +} + + +// PCR007 +export const getPCR007Config = ($this) => { + return [ + { + label: 'template.pcr.pcr005.ypmc', + prop: 'ypmc', + width: 280, + bodyType: 'input', + fillType: 'preFill', + otherCode: 'bhOther', + bodyFillType: 'preFill', + }, + { + label: 'template.pcr.pcr005.ypcsnd', + prop: 'ypcsnd', + width: 280, + showWidth: 180, + fillType: 'preFill', + headerSelectKey: 'ypcsndUnit', + headerOptions: $this.getDictOptions('business_nddw'), + bodyType: 'inputNumber', + bodyFillType: 'preFill', + bodyMaxlength: 10, + }, + { + label: 'template.pcr.pcr005.sxbs', + prop: 'sxbs', + width: 280, + showWidth: 180, + fillType: 'preFill', + bodyType: 'inputNumber', + bodyFillType: 'preFill', + bodyMaxlength: 10, + }, + { + label: 'template.pcr.pcr005.ysypxytj', + prop: 'ysypxytj', + width: 280, + showWidth: 180, + fillType: 'preFill', + headerSelectKey: 'ysypxytjUnit', + headerOptions: $this.getDictOptions('business_tjdw'), + bodyType: 'inputNumber', + bodyFillType: 'preFill', + bodyMaxlength: 10, + }, + { + label: 'template.pcr.pcr005.sjypxytj', + prop: 'sjypxytj', + width: 280, + showWidth: 180, + fillType: 'preFill', + headerSelectKey: 'sjypxytjUnit', + headerOptions: $this.getDictOptions('business_tjdw'), + bodyType: 'inputNumber', + bodyFillType: 'actFill', + bodyMaxlength: 10, + }, + { + label: 'template.pcr.pcr005.ysxsyxytj', + prop: 'ysxsyxytj', + width: 280, + showWidth: 180, + fillType: 'preFill', + headerSelectKey: 'ysxsyxytjUnit', + headerOptions: $this.getDictOptions('business_tjdw'), + bodyDisabled: true, + bodyType: 'inputNumber', + bodyFillType: 'preFill', + bodyMaxlength: 10, + bodySubType: 'inputNumber', + bodySubKey: 'actSolutionVolumePrecision', + subPrecision: 0, + bodyFillType: 'preFill', + bodySubFillType: 'preFill', + showBodySub: $this.fillType === 'preFill', + bodyPrecisionKey: 0, + bodyMaxlength: 10, + bodySubPlaceholder: 'template.common.xswsPlaceholder', + }, + { + label: 'template.pcr.pcr005.sjxsyxytj', + prop: 'sjxsyxytj', + width: 280, + showWidth: 180, + fillType: 'preFill', + headerSelectKey: 'sjxsyxytjUnit', + headerOptions: $this.getDictOptions('business_tjdw'), + bodyType: 'inputNumber', + bodyFillType: 'actFill', + bodyMaxlength: 10, + }, + { + label: 'template.pcr.pcr005.ypznd', + prop: 'ypznd', + width: 280, + showWidth: 180, + fillType: 'preFill', + headerSelectKey: 'ypzndUnit', + headerOptions: $this.getDictOptions('business_nddw'), + bodyDisabled: true, + bodyType: 'inputNumber', + bodyFillType: 'preFill', + bodyMaxlength: 10, + bodySubType: 'inputNumber', + bodySubKey: 'targetDiluentVolumePrecision', + bodyPrecisionKey: 'targetDiluentVolumePrecision', + bodySubFillType: 'preFill', + subPrecision: 0, + showBodySub: $this.fillType === 'preFill', + bodyMaxlength: 10, + bodySubPlaceholder: 'template.common.xswsPlaceholder', + }, + ] } \ No newline at end of file diff --git a/src/views/business/comps/template/mixins/templateMixin.js b/src/views/business/comps/template/mixins/templateMixin.js index 985e974..52f8d54 100644 --- a/src/views/business/comps/template/mixins/templateMixin.js +++ b/src/views/business/comps/template/mixins/templateMixin.js @@ -62,6 +62,7 @@ export default { studySn, templateMc, templateMcEn, + templateId, templateSn, startDate, bdmc, @@ -109,7 +110,8 @@ export default { studySn, templateMc, templateMcEn, - templateSn, + templateId, + templateSn, startDate, bdmc, endDate, @@ -123,6 +125,7 @@ export default { studySn, templateMc, templateMcEn, + templateId, templateSn, startDate, bdmc, diff --git a/src/views/business/study/comp/tbbd/Bj.vue b/src/views/business/study/comp/tbbd/Bj.vue index a54afc0..5642164 100644 --- a/src/views/business/study/comp/tbbd/Bj.vue +++ b/src/views/business/study/comp/tbbd/Bj.vue @@ -80,7 +80,7 @@
+ :sn="templateData.templateSn" :templateData="templateData" fillType="actFill" />
@@ -588,12 +588,7 @@ export default { if (params) { this.reset() if (params.formId && params.formId != '') { - if (params.fromYt) { - this.showIndex = 1 - this.bdmbTitle = this.$t('page.business.study.studyFormFill.ytbd') - } else { - this.showIndex = 2 - } + this.$modal.loading() studyFormFill_info({ id: params.formId }).then(response => { this.form = response.data @@ -601,6 +596,12 @@ export default { this.templateData = deepClone(this.form) const obj = Object.assign({}, this.$route, { title: this.form.bdmc }) this.$tab.updatePage(obj); + if (params.fromYt) { + this.showIndex = 1 + this.bdmbTitle = this.$t('page.business.study.studyFormFill.ytbd') + } else { + this.showIndex = 2 + } this.saveSimpleLog({ jcmc: '填报表单编辑', jcmcEn: 'Record Edit', name: this.form.bdmc + '(' + this.form.bdbh + ')', nameEn: this.form.bdmc + '(' + this.form.bdbh + ')' }) this.$modal.closeLoading() })