|
|
|
@ -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 || '称量失败') |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
|
}; |
|
|
|
|