Browse Source

feat: [模板管理] LBA008获取天平值

luojie
memorylkf 1 week ago
parent
commit
73feb0eb69
4 changed files with 37 additions and 10 deletions
  1. +29
    -3
      src/views/business/comps/template/comps/lba/LBA008.vue
  2. +1
    -1
      src/views/business/comps/template/comps/pcr/PCR008.vue
  3. +1
    -1
      src/views/business/comps/template/formConfig/PCRTableConfig.js
  4. +6
    -5
      src/views/business/comps/template/formConfig/lba/lba008.js

+ 29
- 3
src/views/business/comps/template/comps/lba/LBA008.vue View File

@ -26,7 +26,8 @@
<CustomTable @blur="onHandleTableBlur" @headerSelectChange="onHandleTableBlur"
:ref="`stepTableRef`" :columns="tableStepColumns" :formData="formData" :prefixKey="`table`"
:showOperation="fillType === 'preFill'" fieldItemLabel="template.common.operationSteps">
:showOperation="fillType === 'preFill'" fieldItemLabel="template.common.operationSteps"
@clickButton="handleClickButton">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion :fillType="fillType" :row="row" :rowIndex="rowIndex" :columns="columns"
@deleteRow="(rowIndex) => deleteRow(rowIndex)"></TableOpertaion>
@ -60,8 +61,9 @@ import { convertConcentration } from "@/utils/conConverter";//浓度单位转换
import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue';
import { getLBA008Config } from "../../formConfig/lba/lba008.js";
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"
import { addTj, subTj, uniqeResource, uniqeResourceOne, addDecimals } from "@/utils/calUnitTools";
import { addTj, subTj, uniqeResource, uniqeResourceOne, addDecimals,uniqeYqOne } from "@/utils/calUnitTools";
import ImportExcelDialog from '../../dialog/ImportExcelDialog'
import { getBalance } from '@/utils/tpph.js';
export default {
name: "LBA008",
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaion, SelectReagentDialog, ImportExcelDialog },
@ -307,9 +309,12 @@ export default {
},
getResource() {
let content = this.getFilledFormData();
let formData = this.formData;
//resource
let tmpResource = []
let tmpYq = []
if (this.fillType === "actFill") {
let tableList = content.stepTableFormData
if (tableList && tableList.length > 0) {
@ -344,10 +349,14 @@ export default {
if (tmpResource.length > 0) {
tmpResource = uniqeResourceOne(tmpResource)
}
//使
tmpYq.push(content.selectInfo_dztpbh || formData.selectInfo_dztpbh)
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || [])
this.yqResourceTmp = stepResource.yqResource || []
this.yqResourceTmp = uniqeYqOne([...stepResource.yqResource || [],...tmpYq])
return this.resourceTmp;
},
//
@ -363,6 +372,23 @@ export default {
stepTableRef.deleteRow(rowIndex);
}
},
//
async handleClickButton(e, rowIndex,colIndex,ee,data) {
if(e==='cqzlBtn'){
const content = this.getFilledFormData()
let formData = this.formData;
let qy = content.yqInfo_dztpbh || formData.yqInfo_dztpbh
let dw = content.headerSelectFields.cqzlUnit
let x = await getBalance({yq:qy,dw:dw})
if(x && x.success){
this.$refs.stepTableRef?.updateDataSourceByRowIndex(rowIndex, { cqzl: x.value },{signData:data,updateFields:['cqzl']});
}else{
this.$message.error(x.message || '称量失败')
}
}
},
}
};

+ 1
- 1
src/views/business/comps/template/comps/pcr/PCR008.vue View File

@ -427,7 +427,7 @@ export default {
//
async handleClickButton(e, rowIndex,colIndex,ee,data) {
debugger
if(e==='targetDiluentVolumePrecision'){
if(e==='lzzgzBtn'){
const content = this.getFilledFormData()
let formData = this.formData;

+ 1
- 1
src/views/business/comps/template/formConfig/PCRTableConfig.js View File

@ -795,7 +795,7 @@ export const getPCR008Config = ($this) => {
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
bodySubKey: 'targetDiluentVolumePrecision',
bodySubKey: 'lzzgzBtn',
bodyFillType: 'actFill',
bodySubType: 'button',
bodySubButtonName: 'form.hqz',

+ 6
- 5
src/views/business/comps/template/formConfig/lba/lba008.js View File

@ -8,7 +8,7 @@ export const getLBA008Config = ($this) => {
bodyType: 'input',
fillType: 'preFill',
otherCode: 'bhOther',
bodyFillType: 'preFill',
bodyFillType: 'preFill'
},
{
label: 'template.lba.lba008.zzlx',
@ -18,7 +18,7 @@ export const getLBA008Config = ($this) => {
fillType: 'preFill',
bodyType: 'input',
bodyFillType: 'preFill',
bodyMaxlength: 10,
bodyMaxlength: 10
},
{
label: 'template.lba.lba008.cqzl',
@ -31,13 +31,14 @@ export const getLBA008Config = ($this) => {
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodySubType: 'button',
bodySubKey: 'cqzlBtn',
bodySubButtonName: 'form.hqz',
bodyMaxlength: 10,
bodySubFillType: 'actFill',
subPrecision: 0,
showBodySub: $this.fillType === 'actFill',
bodyMaxlength: 10,
bodySubPlaceholder: 'template.common.xswsPlaceholder',
bodySubPlaceholder: 'template.common.xswsPlaceholder'
},
{
label: 'template.lba.lba008.ysyjrybjrl',
@ -58,7 +59,7 @@ export const getLBA008Config = ($this) => {
bodyMaxlength: 10,
bodyDisabled: $this.fillType === 'preFill',
bodySubPlaceholder: 'template.common.xswsPlaceholder',
headerSelectTo:"actStartSolutionVolumeUnit",
headerSelectTo: 'actStartSolutionVolumeUnit'
},
{
label: 'template.lba.lba008.sjyjrybjrl',
@ -71,7 +72,7 @@ export const getLBA008Config = ($this) => {
bodyType: 'inputNumber',
bodyFillType: 'actFill',
copyFrom: 'ysyjrybjrl', //复制哪个字段
bodyMaxlength: 10,
bodyMaxlength: 10
}
]
}

Loading…
Cancel
Save