Browse Source

fix:[模板管理]sp003

lkf
15881625488@163.com 2 months ago
parent
commit
92ef7da723
2 changed files with 80 additions and 67 deletions
  1. +27
    -25
      src/views/business/comps/template/comps/sp/SP003.vue
  2. +53
    -42
      src/views/business/comps/template/comps/sp/SP00456.vue

+ 27
- 25
src/views/business/comps/template/comps/sp/SP003.vue View File

@ -54,7 +54,7 @@ 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 { EventBus } from "@/utils/eventBus"; import { EventBus } from "@/utils/eventBus";
import { addTj ,uniqeResource,uniqeResourceOne} from "@/utils/calUnitTools";
import { addTj ,uniqeResource,uniqeResourceOne,addDecimals} from "@/utils/calUnitTools";
export default { export default {
name: "SP003", name: "SP003",
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, SelectReagentDialog, TableOpertaion }, components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, SelectReagentDialog, TableOpertaion },
@ -575,38 +575,20 @@ export default {
if (tableList && tableList.length > 0) { if (tableList && tableList.length > 0) {
for (let i = 0; i < tableList.length; i++) { for (let i = 0; i < tableList.length; i++) {
let item = tableList[i] let item = tableList[i]
//(+)
const { total, unit } = addTj([item.actStartSolutionVolume, item.actDiluentVolumeUnit], [content.headerSelectFields.actStartSolutionVolumeUnit, content.headerSelectFields.actDiluentVolumeUnit])
tmpResource.push({
mc: null,
bh: item.targetSolutionCode + item.subTargetSolutionCode,
ph: null,
nd: item.actSolutionConcentration,
nddw: content.headerSelectFields.actSolutionConcentrationUnit,
ndz: item.actSolutionConcentration + content.headerSelectFields.actSolutionConcentrationUnit,
ly: 'ELN配制',
sxrq: content.expireDate,
kc: total,
kcdw: unit,
type: null,
elnType: this.product,
syl: null,
syldw: unit,
yxzq: content.effectivePeriod,
yxzqdw: content.effectivePeriodUnit,
})
let fzTotal = 0//
if (item.fzsj && item.fzsj.fzList && item.fzsj.fzList) { if (item.fzsj && item.fzsj.fzList && item.fzsj.fzList) {
for (let j = 0; j < item.fzsj.fzList.length; j++) { for (let j = 0; j < item.fzsj.fzList.length; j++) {
let fzItem = item.fzsj.fzList[j]
tmpResource.push({ tmpResource.push({
mc: null, mc: null,
bh: item.fzsj.mybh + '-' + item.fzsj.fzList[j].subCode,
bh: item.fzsj.mybh + fzItem.preCode + fzItem.subCode,
ph: null, ph: null,
nd: item.actSolutionConcentration, nd: item.actSolutionConcentration,
nddw: content.headerSelectFields.actSolutionConcentrationUnit, nddw: content.headerSelectFields.actSolutionConcentrationUnit,
ndz: item.actSolutionConcentration + content.headerSelectFields.actSolutionConcentrationUnit, ndz: item.actSolutionConcentration + content.headerSelectFields.actSolutionConcentrationUnit,
ly: 'ELN配制', ly: 'ELN配制',
sxrq: content.expireDate, sxrq: content.expireDate,
kc: item.fzsj.fzList[j].num,
kc: fzItem.num,
kcdw: item.fzsj.dw, kcdw: item.fzsj.dw,
type: null, type: null,
elnType: this.product, elnType: this.product,
@ -615,12 +597,32 @@ export default {
yxzq: content.effectivePeriod, yxzq: content.effectivePeriod,
yxzqdw: content.effectivePeriodUnit, yxzqdw: content.effectivePeriodUnit,
}) })
fzTotal=addDecimals(fzTotal,fzItem.num)
} }
} }
//(+)
const { total, unit } = addTj([item.actStartSolutionVolume, item.actDiluentVolumeUnit], [content.headerSelectFields.actStartSolutionVolumeUnit, content.headerSelectFields.actDiluentVolumeUnit])
tmpResource.push({
mc: null,
bh: item.targetSolutionCode + item.subTargetSolutionCode,
ph: null,
nd: item.actSolutionConcentration,
nddw: content.headerSelectFields.actSolutionConcentrationUnit,
ndz: item.actSolutionConcentration + content.headerSelectFields.actSolutionConcentrationUnit,
ly: 'ELN配制',
sxrq: content.expireDate,
kc: total,
kcdw: unit,
type: null,
elnType: this.product,
syl: fzTotal>0?fzTotal:null,
syldw: fzTotal>0?item.fzsj.dw:unit,
yxzq: content.effectivePeriod,
yxzqdw: content.effectivePeriodUnit,
})
} }
} }
//使
} }
if(tmpResource.length>0){ if(tmpResource.length>0){
tmpResource = uniqeResourceOne(tmpResource) tmpResource = uniqeResourceOne(tmpResource)

+ 53
- 42
src/views/business/comps/template/comps/sp/SP00456.vue View File

@ -110,7 +110,7 @@ import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue';
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"; import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue";
import { getExpireDate, duplicateResource } from "@/utils/index.js"; import { getExpireDate, duplicateResource } from "@/utils/index.js";
import moment from "moment"; import moment from "moment";
import { addTj, uniqeResource,uniqeResourceOne } 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 } from "../../formConfig/paralleAndLadderConfig.js";
export default { export default {
name: "SP00456", name: "SP00456",
@ -598,39 +598,22 @@ export default {
let ladderConfigs = content.ladderConfigs[i] let ladderConfigs = content.ladderConfigs[i]
let stepTableFormData = ladderConfigs.stepTableFormData let stepTableFormData = ladderConfigs.stepTableFormData
for (let j = 0; j < stepTableFormData.length; j++) { for (let j = 0; j < stepTableFormData.length; j++) {
//(+)
const { total, unit } = addTj([stepTableFormData[j].actStartSolutionVolume, stepTableFormData[j].actDiluentVolume], [ladderConfigs.headerSelectFields.actStartSolutionVolumeUnit, ladderConfigs.headerSelectFields.actDiluentVolumeUnit])
tmpResource.push({
mc: null,
bh: stepTableFormData[j].targetSolutionCode + stepTableFormData[j].subTargetSolutionCode,
ph: null,
ndz: stepTableFormData[j].actSolutionConcentration + ladderConfigs.headerSelectFields.actSolutionConcentrationUnit,
nd: stepTableFormData[j].actSolutionConcentration,
nddw: ladderConfigs.headerSelectFields.actSolutionConcentrationUnit,
ly: 'ELN配制',
sxrq: ladderConfigs.expireDate,
kc: total,
kcdw: unit,
type: null,
elnType: this.product,
syl: null,
syldw: unit,
yxzq: ladderConfigs.effectivePeriod,
yxzqdw: ladderConfigs.effectivePeriodUnit,
})
let fzTotal = 0//
let fzsj = stepTableFormData[j].fzsj let fzsj = stepTableFormData[j].fzsj
if (fzsj && fzsj.fzList) { if (fzsj && fzsj.fzList) {
for (let k = 0; k < fzsj.fzList.length; k++) { for (let k = 0; k < fzsj.fzList.length; k++) {
let fzItem = fzsj.fzList[k]
tmpResource.push({ tmpResource.push({
mc: null, mc: null,
bh: fzsj.mybh + '-' + fzsj.fzList[k].subCode,
bh: fzsj.mybh + fzItem.preCode + fzItem.subCode,
ph: null, ph: null,
nd: stepTableFormData[j].actSolutionConcentration, nd: stepTableFormData[j].actSolutionConcentration,
nddw: ladderConfigs.headerSelectFields.actSolutionConcentrationUnit, nddw: ladderConfigs.headerSelectFields.actSolutionConcentrationUnit,
ndz: stepTableFormData[j].actSolutionConcentration + ladderConfigs.headerSelectFields.actSolutionConcentrationUnit, ndz: stepTableFormData[j].actSolutionConcentration + ladderConfigs.headerSelectFields.actSolutionConcentrationUnit,
ly: 'ELN配制', ly: 'ELN配制',
sxrq: ladderConfigs.expireDate, sxrq: ladderConfigs.expireDate,
kc: fzsj.fzList[k].num,
kc: fzItem.num,
kcdw: fzsj.dw, kcdw: fzsj.dw,
type: null, type: null,
elnType: this.product, elnType: this.product,
@ -639,49 +622,55 @@ export default {
yxzq: ladderConfigs.effectivePeriod, yxzq: ladderConfigs.effectivePeriod,
yxzqdw: ladderConfigs.effectivePeriodUnit, yxzqdw: ladderConfigs.effectivePeriodUnit,
}) })
fzTotal=addDecimals(fzTotal,fzItem.num)
} }
} }
}
}
}
//
if (content.paralleConfigs && content.paralleConfigs.length > 0) {
for (let i = 0; i < content.paralleConfigs.length; i++) {
let paralleConfigs = content.paralleConfigs[i]
let stepTableFormData = paralleConfigs.stepTableFormData
for (let j = 0; j < stepTableFormData.length; j++) {
const { total, unit } = addTj([stepTableFormData[j].actSolutionVolume, stepTableFormData[j].actDiluentVolume], [paralleConfigs.headerSelectFields.actSolutionVolumeUnit, paralleConfigs.headerSelectFields.actDiluentVolumeUnit])
//(+)
const { total, unit } = addTj([stepTableFormData[j].actStartSolutionVolume, stepTableFormData[j].actDiluentVolume], [ladderConfigs.headerSelectFields.actStartSolutionVolumeUnit, ladderConfigs.headerSelectFields.actDiluentVolumeUnit])
tmpResource.push({ tmpResource.push({
mc: null, mc: null,
bh: stepTableFormData[j].targetSolutionCode + stepTableFormData[j].subTargetSolutionCode, bh: stepTableFormData[j].targetSolutionCode + stepTableFormData[j].subTargetSolutionCode,
ph: null, ph: null,
ndz: stepTableFormData[j].actSolutionConcentration + ladderConfigs.headerSelectFields.actSolutionConcentrationUnit,
nd: stepTableFormData[j].actSolutionConcentration, nd: stepTableFormData[j].actSolutionConcentration,
ndz: stepTableFormData[j].actSolutionConcentration + paralleConfigs.headerSelectFields.actSolutionConcentrationUnit,
nddw: paralleConfigs.headerSelectFields.actSolutionConcentrationUnit,
nddw: ladderConfigs.headerSelectFields.actSolutionConcentrationUnit,
ly: 'ELN配制', ly: 'ELN配制',
sxrq: stepTableFormData[j].targetSolutionExpirationDate,
sxrq: ladderConfigs.expireDate,
kc: total, kc: total,
kcdw: unit, kcdw: unit,
type: null, type: null,
elnType: this.product, elnType: this.product,
syl: null,
syldw: unit,
yxzq: stepTableFormData[j].targetSolutionCycle,
yxzqdw: stepTableFormData[j].targetSolutionCyclePrecision,
syl: fzTotal>0?fzTotal:null,
syldw: fzTotal>0?fzsj.dw:unit,
yxzq: ladderConfigs.effectivePeriod,
yxzqdw: ladderConfigs.effectivePeriodUnit,
}) })
}
}
}
//
if (content.paralleConfigs && content.paralleConfigs.length > 0) {
for (let i = 0; i < content.paralleConfigs.length; i++) {
let paralleConfigs = content.paralleConfigs[i]
let stepTableFormData = paralleConfigs.stepTableFormData
for (let j = 0; j < stepTableFormData.length; j++) {
let fzTotal = 0//
let fzsj = stepTableFormData[j].fzsj let fzsj = stepTableFormData[j].fzsj
if (fzsj && fzsj.fzList) { if (fzsj && fzsj.fzList) {
for (let k = 0; k < fzsj.fzList.length; k++) { for (let k = 0; k < fzsj.fzList.length; k++) {
let fzItem = fzsj.fzList[k]
tmpResource.push({ tmpResource.push({
mc: null, mc: null,
bh: fzsj.mybh + '-' + fzsj.fzList[k].subCode,
bh: fzsj.mybh + fzItem.preCode + fzItem.subCode,
ph: null, ph: null,
ndz: stepTableFormData[j].actSolutionConcentration + paralleConfigs.headerSelectFields.actSolutionConcentrationUnit, ndz: stepTableFormData[j].actSolutionConcentration + paralleConfigs.headerSelectFields.actSolutionConcentrationUnit,
nd: stepTableFormData[j].actSolutionConcentration, nd: stepTableFormData[j].actSolutionConcentration,
nddw: paralleConfigs.headerSelectFields.actSolutionConcentrationUnit, nddw: paralleConfigs.headerSelectFields.actSolutionConcentrationUnit,
ly: 'ELN配制', ly: 'ELN配制',
sxrq: paralleConfigs.expireDate, sxrq: paralleConfigs.expireDate,
kc: fzsj.fzList[k].num,
kc: fzItem.num,
kcdw: fzsj.dw, kcdw: fzsj.dw,
type: null, type: null,
elnType: this.product, elnType: this.product,
@ -690,8 +679,30 @@ export default {
yxzq: paralleConfigs.effectivePeriod, yxzq: paralleConfigs.effectivePeriod,
yxzqdw: paralleConfigs.effectivePeriodUnit, yxzqdw: paralleConfigs.effectivePeriodUnit,
}) })
fzTotal=addDecimals(fzTotal,fzItem.num)
} }
} }
const { total, unit } = addTj([stepTableFormData[j].actSolutionVolume, stepTableFormData[j].actDiluentVolume], [paralleConfigs.headerSelectFields.actSolutionVolumeUnit, paralleConfigs.headerSelectFields.actDiluentVolumeUnit])
tmpResource.push({
mc: null,
bh: stepTableFormData[j].targetSolutionCode + stepTableFormData[j].subTargetSolutionCode,
ph: null,
nd: stepTableFormData[j].actSolutionConcentration,
ndz: stepTableFormData[j].actSolutionConcentration + paralleConfigs.headerSelectFields.actSolutionConcentrationUnit,
nddw: paralleConfigs.headerSelectFields.actSolutionConcentrationUnit,
ly: 'ELN配制',
sxrq: stepTableFormData[j].targetSolutionExpirationDate,
kc: total,
kcdw: unit,
type: null,
elnType: this.product,
syl: fzTotal>0?fzTotal:null,
syldw: fzTotal>0?fzsj.dw:unit,
yxzq: stepTableFormData[j].targetSolutionCycle,
yxzqdw: stepTableFormData[j].targetSolutionCyclePrecision,
})
} }
} }
} }

Loading…
Cancel
Save