Browse Source

Merge branch 'master' into ouqian

ouqian
ouqian 1 month ago
parent
commit
1e9ffc3ebf
10 changed files with 623 additions and 39 deletions
  1. +4
    -13
      src/components/Template/CustomTable.vue
  2. +19
    -0
      src/components/Template/Step.vue
  3. +75
    -0
      src/components/Template/StepComponents/qxwdx/qxfz.vue
  4. +95
    -0
      src/components/Template/StepComponents/qxwdx/qxjz.vue
  5. +1
    -1
      src/components/Template/StepComponents/ry/ddhy.vue
  6. +4
    -4
      src/components/Template/StepComponents/ry/hwhy.vue
  7. +65
    -15
      src/views/business/comps/template/comps/sp/SP00456.vue
  8. +338
    -0
      src/views/business/comps/template/comps/sp/comps/LadderConfig.vue
  9. +22
    -4
      src/views/business/comps/template/formConfig/paralleAndLadderConfig.js
  10. +0
    -2
      src/views/business/comps/template/mixins/templateMixin.js

+ 4
- 13
src/components/Template/CustomTable.vue View File

@ -732,19 +732,7 @@ export default {
errors: errors errors: errors
}; };
}, },
//
isValueEmpty(value) {
if (value === null || value === undefined || value === '') {
return true;
}
if (typeof value === 'string' && value.trim() === '') {
return true;
}
if (Array.isArray(value) && value.length === 0) {
return true;
}
return false;
},
// //
onHeaderSelectChange(col, value) { onHeaderSelectChange(col, value) {
if (col.headerSelectTo) { if (col.headerSelectTo) {
@ -943,6 +931,9 @@ export default {
this.isIndeterminate = false; this.isIndeterminate = false;
this.$emit('selectionChange', this.selectedRows); this.$emit('selectionChange', this.selectedRows);
}, },
updateHeaderSelectFields(fields) {
this.headerSelectFields = {...this.headerSelectFields, ...fields};
},
// formData // formData
updateDataSource(dataSource = []) { updateDataSource(dataSource = []) {
this.oldLocalDataSource = JSON.parse(JSON.stringify(this.localDataSource)); this.oldLocalDataSource = JSON.parse(JSON.stringify(this.localDataSource));

+ 19
- 0
src/components/Template/Step.vue View File

@ -140,6 +140,12 @@ import fy_spyjzzb from './StepComponents/spyjzzb/fy_spyjzzb.vue';//色谱匀浆
import jz_spyjzzb from './StepComponents/spyjzzb/jz_spyjzzb.vue';//- import jz_spyjzzb from './StepComponents/spyjzzb/jz_spyjzzb.vue';//-
//
//-使-
//-使-
import qxfz from './StepComponents/qxwdx/qxfz.vue';//-
import qxjz from './StepComponents/qxwdx/qxjz.vue';//-
import { public_templateStepList } from '@/api/business/public/public'; import { public_templateStepList } from '@/api/business/public/public';
@ -275,6 +281,10 @@ export default {
yjbc, yjbc,
fy_spyjzzb, fy_spyjzzb,
jz_spyjzzb, jz_spyjzzb,
//
qxfz,
qxjz,
}, },
computed: { computed: {
stepComponentMap() { stepComponentMap() {
@ -375,6 +385,13 @@ export default {
'yjyhh':'jszz', 'yjyhh':'jszz',
'fy_spyjzzb':'fy_spyjzzb', 'fy_spyjzzb':'fy_spyjzzb',
'jz_spyjzzb':'jz_spyjzzb', 'jz_spyjzzb':'jz_spyjzzb',
//
'ddhy_qxwdx': 'Ddhy',
'hwph':'Hwhy',
'qxfz':'qxfz',
'qxjz':'qxjz',
} }
} }
@ -436,6 +453,7 @@ export default {
type: '', type: '',
formData: {} formData: {}
}) })
justUpdateFilledFormData();
this.$emit('step-added', this.steps.length) this.$emit('step-added', this.steps.length)
} catch (error) { } catch (error) {
console.error('添加步骤失败:', error) console.error('添加步骤失败:', error)
@ -447,6 +465,7 @@ export default {
if (this.steps.length > 1) { if (this.steps.length > 1) {
const removedStep = this.steps.splice(index, 1)[0] const removedStep = this.steps.splice(index, 1)[0]
justUpdateFilledFormData();
this.$emit('step-removed', { index, step: removedStep, remaining: this.steps.length }) this.$emit('step-removed', { index, step: removedStep, remaining: this.steps.length })
} else { } else {
this.$message.warning('至少需要保留一个步骤') this.$message.warning('至少需要保留一个步骤')

+ 75
- 0
src/components/Template/StepComponents/qxwdx/qxfz.vue View File

@ -0,0 +1,75 @@
<!-- 匀浆液分装2 -->
<template>
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'qxwdx_qxfz'" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
</template>
<script>
import StepFormPackage from '@/components/Template/StepFormPackage.vue';
import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default {
mixins: [stepMixins],
props: {
sn: {
type: String,
default: 'qxfz',
},
},
components: {
StepFormPackage
},
computed: {
formConfig() {
let config = [{
config: {
text1: {
label: "将平衡完成后的样品进行分装,分装",
type: "text",
},
count: {
type: "inputNumber",
fillType: "preFill",
},
text2: {
label: "份,每份预计分装",
type: "text",
},
yjfz: {
type: "inputNumber",
fillType: "preFill",
},
yjfzdw:{
type:"select",
options:this.getDictOptions("business_tjdw"),
selectTo:"sjfzdw",
fillType:"preFill",
},
text3: {
label: ",实际分装",
type: "text",
},
sjfz: {
type: "inputNumber",
fillType: "actFill",
compareTo:"yjfz",
copyFrom:"yjfz"
},
sjfzdw:{
type:"select",
options:this.getDictOptions("business_tjdw"),
fillType:"preFill",
},
text4: {
label: "。",
type: "text",
},
}
}]
return config
}
},
}
</script>
<style lang="scss" scoped></style>

+ 95
- 0
src/components/Template/StepComponents/qxwdx/qxjz.vue View File

@ -0,0 +1,95 @@
<!-- 全血静置 -->
<template>
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'qxwdx_qxjz'" @resetRecord="resetRecord" :form-config="formConfig"
:formData="formData" />
</template>
<script>
import StepFormPackage from '@/components/Template/StepFormPackage.vue';
import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default {
mixins: [stepMixins],
props: {
sn: {
type: String,
default: 'qxjz',
},
},
components: {
StepFormPackage
},
computed: {
formConfig() {
let config = [{
config: {
text1: {
label: "将样品分装后的第",
type: "text",
},
sort: {
type: "inputNumber",
fillType: "preFill",
},
text2: {
label: "份,立即放置于",
type: "text",
},
yjwd: {
type: "select",
options: this.getDictOptions("business_wddw"),
fillType: "preFill",
otherCode: "yjwdOther",
},
yjhj: {
type: "select",
options: this.getDictOptions("business_hjxx"),
fillType: "preFill",
otherCode: "yjhjOther",
},
text5: {
label: ",实际放置于",
type: "text",
},
sjwd: {
type: "select",
options: this.getDictOptions("business_wddw"),
fillType: "actFill",
otherCode: "sjwdOther",
compareTo: "yjwd",
},
sjhj: {
type: "select",
options: this.getDictOptions("business_hjxx"),
fillType: "actFill",
otherCode: "sjhjOther",
compareTo: "yjhj",
},
text6: {
label: "条件下静置,即稳定性",
type: "text",
},
startDate: {
type: "input",
fillType: "actFill",
disabled: true,
},
button1:{
type:"button",
buttonName:"开始",
},
text9: {
type: "text",
label: "。",
},
}
}]
return config
}
},
}
</script>
<style lang="scss" scoped></style>

+ 1
- 1
src/components/Template/StepComponents/ry/ddhy.vue View File

@ -23,7 +23,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
let config = [{ let config = [{
config:{ config:{
text1:{ text1:{
label:"将溶液进行上下颠倒,预计颠倒",
label:this.sn==='ddhy_qxwdx'?"将全血样品进行轻轻上下颠倒,预计颠倒":"将溶液进行上下颠倒,预计颠倒",
type:"text", type:"text",
}, },
ddcs1:{ ddcs1:{

+ 4
- 4
src/components/Template/StepComponents/ry/hwhy.vue View File

@ -40,7 +40,7 @@ export default {
fillType: "preFill", fillType: "preFill",
}, },
text3: { text3: {
label: "°C,实际温度为",
label: "°C,设置实际温度为",
type: "text", type: "text",
}, },
sjwd: { sjwd: {
@ -64,7 +64,7 @@ export default {
fillType: "preFill", fillType: "preFill",
}, },
text8: { text8: {
label: "实际转速为",
label: "实际设置转速为",
type: "text", type: "text",
}, },
sjzs: { sjzs: {
@ -93,7 +93,7 @@ export default {
fillType: "preFill", fillType: "preFill",
}, },
text5: { text5: {
label: ",实际时长为",
label: ",实际设置时长为",
type: "text", type: "text",
}, },
sjsc: { sjsc: {
@ -108,7 +108,7 @@ export default {
fillType: "preFill", fillType: "preFill",
}, },
text6: { text6: {
label: ",进行恒温混匀,混匀",
label: this.sn==='hwph'?",进行恒温平衡,平衡": ",进行恒温混匀,混匀",
type: "text", type: "text",
}, },
startDate: { startDate: {

+ 65
- 15
src/views/business/comps/template/comps/sp/SP00456.vue View File

@ -10,10 +10,26 @@
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" /> ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.sjInfo" :columns="sjColumns" :dataSource="resourceSj" /> <TableList label="template.common.sjInfo" :columns="sjColumns" :dataSource="resourceSj" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> <TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<BaseInfoFormPackage fieldItemLabel="template.common.storageCondition"
<BaseInfoFormPackage v-if="!isLba" fieldItemLabel="template.common.storageCondition"
label="template.common.storageCondition" ref="storageConditionRef" label="template.common.storageCondition" ref="storageConditionRef"
:formConfig="storageFormConfig" :formData="formData" /> :formConfig="storageFormConfig" :formData="formData" />
<LineLabel label="template.common.operationSteps" />
<div v-if="isLba">
<LineLabel label="template.lba.lba004.xbxx" />
<CustomTable
:isBorder="false"
:ref="`jcbRef`"
:columns="jcbColumns"
:formData="formData"
:prefixKey = "`jcb`"
fieldItemLabel = "template.lba.lba004.xbxx"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteJcbRow" ></TableOpertaionDelete>
</template>
</CustomTable>
</div>
<LineLabel :label="isLba ? 'template.lba.lba005.bzqxpz' : 'template.common.operationSteps'" />
<div v-if="fillType === 'preFill'" class="mt-20"> <div v-if="fillType === 'preFill'" class="mt-20">
<el-button type="primary" @click="handleAddParalle">{{ $t('template.common.xzpxpz') <el-button type="primary" @click="handleAddParalle">{{ $t('template.common.xzpxpz')
}}</el-button> }}</el-button>
@ -24,8 +40,18 @@
<!-- 阶梯配制区域 --> <!-- 阶梯配制区域 -->
<div v-for="(ladderConfig, ladderIndex) in formData.ladderConfigs" <div v-for="(ladderConfig, ladderIndex) in formData.ladderConfigs"
:key="'ladder_' + ladderConfig.id"> :key="'ladder_' + ladderConfig.id">
<LadderConfig
:currentFormConfig="ladderStepFormConfig"
:currentFormData = "ladderConfig"
:showOperation="fillType === 'actFill' || fillType === 'preFill'"
:tableColumns = "ladderStepColumns"
:prefixKey="'ladder_'+ladderIndex"
:ref="`ladderRef_${ladderIndex}`"
:fieldItemLabel="$t('template.common.jtpz')"
:fillType="fillType"
<div class="template-form-item">
/>
<!-- <div class="template-form-item">
<div class="config-header"> <div class="config-header">
<div>{{ $t('template.common.jtpz') }}</div> <div>{{ $t('template.common.jtpz') }}</div>
<el-button v-if="fillType === 'preFill'" type="text" icon="el-icon-delete" <el-button v-if="fillType === 'preFill'" type="text" icon="el-icon-delete"
@ -61,7 +87,7 @@
<Step class="mt-0 s-container" :ref="`ladderStepRef_${ladderIndex}`" <Step class="mt-0 s-container" :ref="`ladderStepRef_${ladderIndex}`"
:formData="ladderConfig.ladderStepData" :fieldItemLabel="$t('template.common.jtpz')" :formData="ladderConfig.ladderStepData" :fieldItemLabel="$t('template.common.jtpz')"
:prefixKey="'ladder_' + ladderIndex"></Step> :prefixKey="'ladder_' + ladderIndex"></Step>
</div>
</div> -->
</div> </div>
<!-- 平行配制区域 --> <!-- 平行配制区域 -->
@ -126,15 +152,20 @@ import templateMixin from "../../mixins/templateMixin.js";
import CustomTable from '@/components/Template/CustomTable.vue'; import CustomTable from '@/components/Template/CustomTable.vue';
import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue'; import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue';
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"; import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue";
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
import { getExpireDate, duplicateResource } from "@/utils/index.js"; import { getExpireDate, duplicateResource } from "@/utils/index.js";
import { getuuid } from "@/utils/index.js"; import { getuuid } from "@/utils/index.js";
import { isCommonUnit } from "@/utils/conTools"; import { isCommonUnit } from "@/utils/conTools";
import moment from "moment"; import moment from "moment";
import { addTj, uniqeResource, uniqeResourceOne, addDecimals } from "@/utils/calUnitTools"; import { addTj, uniqeResource, uniqeResourceOne, addDecimals } from "@/utils/calUnitTools";
import { getLadderColumnsConfig, getParallelColumnsConfig, getLadderFormConfig, getBaseInfoFormConfig, getRemarkFormConfig, getStorageConditionFormConfig, getParalleStepFormConfig } from "../../formConfig/paralleAndLadderConfig.js";
import {
getLadderColumnsConfig, getParallelColumnsConfig, getLadderFormConfig,
getBaseInfoFormConfig, getRemarkFormConfig, getStorageConditionFormConfig, getParalleStepFormConfig ,getJcbColumnsConfig
} from "../../formConfig/paralleAndLadderConfig.js";
import LadderConfig from "@/views/business/comps/template/comps/sp/comps/LadderConfig.vue";
export default { export default {
name: "SP00456", name: "SP00456",
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, SelectReagentDialog, TableOpertaion },
components: { LadderConfig,BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, SelectReagentDialog, TableOpertaion, TableOpertaionDelete, LadderConfig },
mixins: [templateMixin], mixins: [templateMixin],
props: { props: {
fillType: { fillType: {
@ -155,6 +186,10 @@ export default {
}, },
}, },
computed: { computed: {
//
jcbColumns(){
return getJcbColumnsConfig(this);
},
// //
storageFormConfig() { storageFormConfig() {
return getStorageConditionFormConfig(this); return getStorageConditionFormConfig(this);
@ -183,6 +218,7 @@ export default {
}, },
}, },
data() { data() {
const labArr = ["LBA005","LBA007"]
return { return {
subSolutionVisible: false, subSolutionVisible: false,
currentSubKey: "",//key currentSubKey: "",//key
@ -193,6 +229,7 @@ export default {
currentTableKey: "",//key currentTableKey: "",//key
targetAcSolutionFromTable: true,// targetAcSolutionFromTable: true,//
currentRowData: {},// currentRowData: {},//
isLba: labArr.includes(this.sn),
}; };
}, },
mounted() { mounted() {
@ -204,7 +241,12 @@ export default {
} }
}, },
methods: { methods: {
deleteJcbRow(rowIndex){
const jcbRef = this.$refs['jcbRef'];
if (jcbRef) {
jcbRef.deleteRow(rowIndex);
}
},
onBeforeSaveRecord(data, type, configIndex) { onBeforeSaveRecord(data, type, configIndex) {
if (type === "ladder") { if (type === "ladder") {
const formFields = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFilledFormData(); const formFields = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFilledFormData();
@ -407,6 +449,7 @@ export default {
paralleTableFormData: [], paralleTableFormData: [],
showParalleConfig: true showParalleConfig: true
}); });
this.justUpdateFilledFormData();
}, },
// //
handleAddLadder() { handleAddLadder() {
@ -422,6 +465,7 @@ export default {
ladderTableFormData: [], ladderTableFormData: [],
showLadderConfig: true showLadderConfig: true
}); });
this.justUpdateFilledFormData();
}, },
// //
deleteConfig(type, config) { deleteConfig(type, config) {
@ -616,8 +660,9 @@ export default {
}, },
// //
async validFields() { async validFields() {
const { isLba } = this;
const refsToValidate = isLba ? ["baseInfoRef", "jcbRef", "remarkRef"]: ["baseInfoRef", "storageConditionRef", "remarkRef"]
// //
let refsToValidate = ["baseInfoRef", "storageConditionRef", "remarkRef"];
// //
if (this.formData.ladderConfigs && this.formData.ladderConfigs.length > 0) { if (this.formData.ladderConfigs && this.formData.ladderConfigs.length > 0) {
@ -640,21 +685,26 @@ export default {
}, },
getFilledFormData() { getFilledFormData() {
const baseData = this.$refs.baseInfoRef.getFilledFormData(); const baseData = this.$refs.baseInfoRef.getFilledFormData();
const conditionData = this.$refs.storageConditionRef.getFilledFormData();
let conditionData = {};
if (!this.isLba) {
conditionData = this.$refs.storageConditionRef.getFilledFormData();
}
// //
const ladderConfigsData = []; const ladderConfigsData = [];
if (this.formData.ladderConfigs && this.formData.ladderConfigs.length > 0) { if (this.formData.ladderConfigs && this.formData.ladderConfigs.length > 0) {
for (let i = 0; i < this.formData.ladderConfigs.length; i++) { for (let i = 0; i < this.formData.ladderConfigs.length; i++) {
const id = this.formData.ladderConfigs[i].id; const id = this.formData.ladderConfigs[i].id;
const ladderFormData = this.$refs[`ladderStepFormPackageRef_${i}`][0].getFilledFormData();
const ladderTableFormData = this.$refs[`ladderStepTableRef_${i}`][0].getFilledFormData();
const ladderStepData = this.$refs[`ladderStepRef_${i}`][0].getFilledFormData();
const {
baseFormData,
tableData,
stepData,
} = this.$refs[`ladderRef_${i}`][0].getFilledFormData();
ladderConfigsData.push({ ladderConfigsData.push({
...ladderFormData,
...ladderTableFormData,
ladderStepData: ladderStepData.stepData,
...baseFormData,
...tableData,
ladderStepData: stepData,
showLadderConfig: true, showLadderConfig: true,
id id
}); });

+ 338
- 0
src/views/business/comps/template/comps/sp/comps/LadderConfig.vue View File

@ -0,0 +1,338 @@
<template>
<div class="template-form-item">
<div class="config-header">
<div>{{ $t('template.common.jtpz') }}</div>
<el-button v-if="fillType === 'preFill'" type="text" icon="el-icon-delete"
@click="deleteConfig('ladderConfigs')">{{
$t('template.common.deleteBtn')
}}</el-button>
</div>
<BaseInfoFormPackage @onRegentSubmit="(e) => onRegentSubmit(e)"
@beforeReagentSubmit="(data) => onBeforeReagentSubmit(data)"
ref="formPackageRef" :formConfig="currentFormConfig" :formData="currentFormData"
:fieldItemLabel="fieldItemLabel" @blur="(e) => onHandleBlur(e)"
@select="(e) => onHandleBlur(e)" :prefixKey="prefixKey" />
<CustomTable @blur="(e) => onHandleTableBlur(e)"
ref="tableRef" :showOperation="showOperation"
:columns="tableColumns" :formData="currentFormData"
@bodySelectChange="bodySelectChange"
@beforeSaveRecord="(data) => onBeforeSaveRecord(data )"
@headerSelectChange="(data) => onHeaderSelectChange(data)"
:prefixKey="prefixKey" :fieldItemLabel="fieldItemLabel">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion @printTag="(e) => printTag(e)"
@startConfig="(val) => startConfig(val )"
@configComplete="(val) => configComplete(val)"
@subPackageSubmit="(val) => subPackageSubmit(val)"
:fillType="fillType" :row="row" :rowIndex="rowIndex" :columns="columns"
@deleteRow="(rowIndex) => deleteRow(rowIndex)">
</TableOpertaion>
</template>
</CustomTable>
<Step class="mt-0 s-container" ref="stepRef" :formData="currentFormData.ladderStepData"
:fieldItemLabel="fieldItemLabel" :prefixKey="prefixKey"></Step>
</div>
</template>
<script>
import Step from '@/components/Template/Step.vue';
import CustomTable from '@/components/Template/CustomTable.vue';
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue";
import BaseInfoFormPackage from '@/components/Template/BaseInfoFormPackage.vue';
import templateMixin from "../../../mixins/templateMixin.js";
import { addTj, uniqeResource, uniqeResourceOne, addDecimals } from "@/utils/calUnitTools";
export default {
components: {
Step,
CustomTable,
TableOpertaion,
BaseInfoFormPackage,
},
name: "LadderConfig",
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: '',
},
currentFormConfig: {
type: Array,
default: () => [],
},
prefixKey: {
type: String,
default: '',
},
fieldItemLabel: {
type: String,
default: '',
},
currentFormData: {
type: Object,
default: () => {},
},
showOperation: {
type: Boolean,
default: false,
},
tableColumns: {
type: Array,
default: () => [],
},
configType:{
type: String,
default: 'ladder',
}
},
methods: {
getStepResource(){
return this.$refs.stepRef?.getStepResource();
},
getFilledFormData() {
const baseFormData = this.$refs.formPackageRef?.getFilledFormData();
const tableData = this.$refs.tableRef?.getFilledFormData();
const stepData = this.$refs.stepRef?.getFilledFormData();
return {
baseFormData,
tableData,
stepData:stepData?.stepData || [],
}
},
//
onRegentSubmit(data) {
const { selectInfo, key } = data;
const { row } = selectInfo;
if (key) {
const packageRef = this.$refs.formPackageRef;
if (key === "subStartSolution") {
packageRef.updateFormData("targetAcSolution", row.nd);
packageRef.updateFormData("subTargetAcSolutionUnit", row.nddw);
packageRef.onValueChangeCompareTo("targetAcSolution", row.nd, "targetStartSolution");
packageRef.onValueChangeCompareTo("subTargetAcSolutionUnit", row.nddw, "subTargetStartSolution");
this.updateTableNd(row);
}
}
},
//table
updateTableNd(row) {
const { stepTableFormData = [], headerSelectFields = [] } = this.$refs.tableRef?.getFilledFormData();
const newData = JSON.parse(JSON.stringify(stepTableFormData));
const params = this.getLadderNdParamsByIndex(rowIndex);
//
newData.forEach((item, index) => {
let initNd = row.nd;//
if (index === 0) {
item.startSolutionCode = row.bh;
} else {
item.startSolutionCode = newData[index - 1].targetSolutionCode + newData[index - 1].subTargetSolutionCode;
initNd = newData[index - 1].actSolutionConcentration;
}
const volResult = this.updateSjmbrynd(item, initNd, params);
if (!volResult) {
return
}
item.actSolutionVolume = volResult.actVol;
item.actSolutionConcentration = volResult.actNd;
// stepTableRef
})
this.$refs.tableRef?.updateDataSource(newData);
},
getLadderNdParamsByIndex() {
const { headerSelectFields = [] } = this.$refs.tableRef?.getFilledFormData();
const subTargetAcSolutionUnit = this.$refs.formPackageRef?.getFormDataByKey("subTargetAcSolutionUnit");//
return {
targetStartSolutionUnit: subTargetAcSolutionUnit,
headerSelectFields
}
},
onHandleBlur(e) {
const { targetStartSolution, subTargetStartSolution } = e;
const { stepTableFormData, headerSelectFields } = this.$refs.tableRef?.getFilledFormData();
const params = {
subTargetStartSolution,
headerSelectFields
}
this.batchUpdateTargetStartSolutionVolume(stepTableFormData, targetStartSolution, params)
},
//
onHandleTableBlur(e) {
const { configType } = this;
const { colKey = "", item, rowIndex, headerSelectFields } = e;
if (colKey === "targetStartSolutionConcentration" || colKey === "targetSolutionVolume" || colKey === "targetSolutionConcentration" || colKey === "targetStartSolutionVolumePrecision" || colKey === "targetDiluentVolumePrecision") {
if (configType === "ladder") {
const { targetStartSolution, subTargetStartSolution } = this.$refs.formPackageRef?.getFilledFormData();
const params = {
subTargetStartSolution,
headerSelectFields
}
if (targetStartSolution) {
this.updateTargetStartSolutionVolume(item, targetStartSolution, params);
}
} else if (configType === "paralle") {
this.paralleUpdateTargetStartSolutionVolume(item, headerSelectFields);
}
} else if (colKey === "actStartSolutionVolume" || colKey === "actDiluentVolume") {//
if (configType === "ladder") {
const targetAcSolution = this.$refs.formPackageRef?.getFormDataByKey("targetAcSolution");//
const params = this.getLadderNdParamsByIndex(configIndex);
if (targetAcSolution) {
const volResult = this.updateSjmbrynd(item, targetAcSolution, params);
if (!volResult) {
return
}
this.$refs.tableRef?.updateDataSourceByRowIndex(rowIndex, {
actSolutionVolume: volResult.actVol,
actSolutionConcentration: volResult.actNd,
});
}
} else if (configType === "paralle") {
const targetAcSolution = item.targetAcSolution || 0;//
const params = this.getParalleNdParamsByIndex(item, configIndex);
if (targetAcSolution) {
const volResult = this.updateSjmbrynd(item, targetAcSolution, params);
if (!volResult) {
return
}
this.$refs.tableRef?.updateDataSourceByRowIndex(rowIndex, {
actSolutionVolume: volResult.actVol,
actSolutionConcentration: volResult.actNd,
});
}
}
}
},
bodySelectChange(data) {
this.paralleUpdateTargetStartSolutionVolume(data.item, data.headerSelectFields);
},
//
paralleUpdateTargetStartSolutionVolume(item, headerSelectFields) {
const volumne = item.targetStartSolutionConcentration;
const subTargetStartSolution = item.targetStartSolutionConcentrationPrecision;
const params = {
headerSelectFields,
subTargetStartSolution
}
if (volumne) {
this.updateTargetStartSolutionVolume(item, volumne, params);
}
},
onBeforeSaveRecord(data) {
if (this.configType === "ladder") {
const formFields = this.$refs.formPackageRef?.getFilledFormData();
this.onCommonVerifyNdException(formFields, data);
}
},
//table header
onHeaderSelectChange(data) {
const { key, headerSelectFields, dataSource = [] } = data;
const keys = [
'targetStartSolutionVolumeUnit',
'targetDiluentVolumeUnit',
'targetSolutionConcentrationUnit',
'targetSolutionVolumeUnit',
]
if (keys.includes(key)) {
if (this.configType === 'ladder') {
const { targetStartSolution, subTargetStartSolution } = this.$refs.formPackageRef?.getFilledFormData();
const params = {
subTargetStartSolution,
headerSelectFields
}
this.batchUpdateTargetStartSolutionVolume(dataSource, targetStartSolution, params)
} else {
dataSource.forEach(item => {
this.paralleUpdateTargetStartSolutionVolume(item, headerSelectFields);
})
}
}
},
//
printTag(e) {
const { nickName, name } = this.$store.getters;
const { printCode, row, type } = e;
const currentForm = this.$refs.formPackageRef?.getFilledFormData();
const { stepStorageCondition, startDate, expireDate, paralleStepStorageCondition } = currentForm;
const targetSolutionExpirationDate = row.targetSolutionExpirationDate;
const lang = this.$i18n.locale;
const printConfig = {
"品名": "暂时还不知道品名是哪个字段",
"存储条件": stepStorageCondition || paralleStepStorageCondition,
"配制日期": moment(startDate).format("YYYY-MM-DD"),
"有效期至": moment(targetSolutionExpirationDate || expireDate).format("YYYY-MM-DD HH:mm"),
"配置者": lang === "zh_CN" ? nickName : name,
//type==="subPackage"
//type==="row"
"编号": type === "subPackage" ? printCode : (row.targetSolutionCode + row.subTargetSolutionCode),
}
console.log(printConfig, "printConfig")
EventBus.$emit('showTagPrintDialog', { printConfig })
},
//
startConfig(val) {
const { rowData } = val;
let postData = {
bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode,
studySubjectId: this.formData.studySubjectId,
studyId: this.formData.studyId,
studyFormId: this.formData.id,
}
this.startConfigRequest(postData);
},
//
configComplete(val) {
const { rowData, headerSelectFields } = val;
//(+)
const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit])
debugger
let postData = {
mc: null,
bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode,
nd: rowData.actSolutionConcentration,//
nddw: headerSelectFields.actSolutionConcentrationUnit,
studySubjectId: this.formData.studySubjectId,
studyId: this.formData.studyId,
studyFormId: this.formData.id,
kc: total,
kcdw: unit,
}
this.configCompleteRequest(postData);
},
//
subPackageSubmit(data) {
const { fzsj, rowData, headerSelectFields } = data;
const { fzList = [], dw = "", mybh } = fzsj;
if (fzList && fzList.length > 0) {
const list = fzList.map((item) => {
return {
bh: mybh + item.preCode + item.subCode,
kc: item.num,
kcdw: dw,
}
})
let postData = {
studyId: this.formData.studyId,
studyFormId: this.formData.id,
bh: mybh,
nd: rowData.actSolutionConcentration || 0,
nddw: headerSelectFields.actSolutionConcentrationUnit,
studySubjectId: this.formData.studySubjectId,
studyId: this.formData.studyId,
studyFormId: this.formData.id,
list: list
}
this.subPackageRequest(postData);
}
},
//
deleteRow(rowIndex) {
this.$refs.tableRef.deleteRow(rowIndex);
},
}
}
</script>
<style lang="scss" scoped></style>

+ 22
- 4
src/views/business/comps/template/formConfig/paralleAndLadderConfig.js View File

@ -477,7 +477,7 @@ export const getLadderFormConfig = ($this) => {
export const getBaseInfoFormConfig = ($this) => { export const getBaseInfoFormConfig = ($this) => {
const sn = $this.sn; const sn = $this.sn;
const labArr = ["LBA005","LBA007"] const labArr = ["LBA005","LBA007"]
const isLab = labArr.includes(sn);
const isLba = labArr.includes(sn);
return [ return [
{ {
type: 'cardItem', type: 'cardItem',
@ -509,7 +509,7 @@ export const getBaseInfoFormConfig = ($this) => {
}, },
{ {
type: 'conditionItem', type: 'conditionItem',
label:isLab? 'template.lba.lba002.cztj':'template.common.testConfigurationConditions',
label:isLba? 'template.lba.lba002.cztj':'template.common.testConfigurationConditions',
config: { config: {
pre: { pre: {
label: 'template.common.preFill', label: 'template.common.preFill',
@ -530,7 +530,7 @@ export const getBaseInfoFormConfig = ($this) => {
} }
} }
}, },
{
isLba?{}:{
type: 'conditionItem', type: 'conditionItem',
label: 'template.sp.sp00456.rqcz', label: 'template.sp.sp00456.rqcz',
config: { config: {
@ -546,7 +546,7 @@ export const getBaseInfoFormConfig = ($this) => {
}, },
{ {
type: 'cellItem', type: 'cellItem',
label: 'template.common.configurationTime',
label: isLba?'template.lba.lba002.czsj':'template.common.configurationTime',
config: { config: {
startDate: { startDate: {
label: 'template.common.startTime', label: 'template.common.startTime',
@ -625,3 +625,21 @@ export const getParalleStepFormConfig = ($this) => {
} }
] ]
} }
//选板信息;
export const getJcbColumnsConfig = ($this) => {
return [{
label: 'template.lba.lba002.jcbmc',
prop: 'jcb',
bodyType: 'input',
bodyFillType: 'preFill',
width: 280,
bodyMaxlength:20
},{
label: '',
prop: 'jcbBh',
bodyType: 'jcb',
bodyFillType: 'actFill',
width: 280
}]
}

+ 0
- 2
src/views/business/comps/template/mixins/templateMixin.js View File

@ -372,10 +372,8 @@ export default {
}, },
//统一校验form表单是否填写 //统一校验form表单是否填写
async validFormFields(refArr = []) { async validFormFields(refArr = []) {
console.log(refArr,2121)
let result = {} let result = {}
const refs = refArr.map((ref) => { const refs = refArr.map((ref) => {
console.log(ref,312312321)
let refData = {} let refData = {}
if (this.$refs[ref][0]) { if (this.$refs[ref][0]) {
refData = this.$refs[ref][0]?.getFormData() || {} refData = this.$refs[ref][0]?.getFormData() || {}

Loading…
Cancel
Save