Browse Source

fix:[模板管理]sp003,004,005,006

lkf
15881625488@163.com 2 months ago
parent
commit
915c3d7ee6
2 changed files with 116 additions and 16 deletions
  1. +5
    -6
      src/views/business/comps/template/comps/sp/SWYPBQGZYZBB.vue
  2. +111
    -10
      src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue

+ 5
- 6
src/views/business/comps/template/comps/sp/SWYPBQGZYZBB.vue View File

@ -552,7 +552,6 @@ export default {
let tableList = content.stepTableFormData
if (tableList && tableList.length > 0) {
for (let i = 0; i < tableList.length; i++) {
//
let item = tableList[i]
tmpResource.push({
mc: null,
@ -567,8 +566,8 @@ export default {
kcdw: content.headerSelectFields.actStartSolutionVolumeUnit || content.headerSelectFields.actDiluentVolumeUnit,//todo --
syl: null,
syldw: content.headerSelectFields.actStartSolutionVolumeUnit || content.headerSelectFields.actDiluentVolumeUnit,//todo --,
yxzq: null,
yxzqdw: null,
yxzq: content.effectivePeriod,
yxzqdw: content.effectivePeriodUnit,
})
if (item.fzsj && item.fzsj.fzList && item.fzsj.fzList) {
for (let j = 0; j < item.fzsj.fzList.length; j++) {
@ -585,14 +584,14 @@ export default {
kcdw: item.fzsj.dw,
syl: null,
syldw: item.fzsj.dw,
yxzq: null,
yxzqdw: null,
yxzq: content.effectivePeriod,
yxzqdw: content.effectivePeriodUnit,
})
}
}
}
}
//使
debugger
this.resourceTmp = tmpResource
return content;

+ 111
- 10
src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue View File

@ -2,8 +2,8 @@
<template>
<div>
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ getTemplateName() }}<img
src="@/assets/images/detail-title.png" /></div>
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.bdmc || getTemplateName()
}}<img src="@/assets/images/detail-title.png" /></div>
<div class="detail-content">
<div class="content">
<BaseInfoFormPackage label="试验基本信息" ref="baseInfoRef" :formConfig="baseInfoFormConfig"
@ -378,7 +378,7 @@ export default {
//
onHandleTableBlur(type, configIndex, e) {
const { colKey = "", item,rowIndex } = e;
const { colKey = "", item, rowIndex } = e;
if (colKey === "targetStartSolutionConcentration" || colKey === "targetSolutionVolume" || colKey === "targetSolutionConcentration" || colKey === "targetStartSolutionVolumePrecision" || colKey === "targetDiluentVolumePrecision") {
if (type === "ladder") {
const volume = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFormDataByKey("targetStartSolution") || 0;
@ -395,17 +395,21 @@ export default {
if (type === "ladder") {
const targetAcSolution = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFormDataByKey("targetAcSolution") || 0;//
if (targetAcSolution) {
const {actVol, actNd} = this.updateSjmbrynd(item, targetAcSolution);
this.$refs[`ladderStepTableRef_${configIndex}`][0]?.updateDataSourceByRowIndex(rowIndex,{actSolutionVolume: actVol,
actSolutionConcentration: actNd,});
const { actVol, actNd } = this.updateSjmbrynd(item, targetAcSolution);
this.$refs[`ladderStepTableRef_${configIndex}`][0]?.updateDataSourceByRowIndex(rowIndex, {
actSolutionVolume: actVol,
actSolutionConcentration: actNd,
});
}
} else if (type === "paralle") {
const targetAcSolution = item.targetAcSolution || 0;//
if (targetAcSolution) {
this.updateSjmbrynd(item, targetAcSolution);
const {actVol, actNd} = this.updateSjmbrynd(item, targetAcSolution);
this.$refs[`paralleStepTableRef_${configIndex}`][0]?.updateDataSourceByRowIndex(rowIndex,{actSolutionVolume: actVol,
targetAcSolution: actNd,});
const { actVol, actNd } = this.updateSjmbrynd(item, targetAcSolution);
this.$refs[`paralleStepTableRef_${configIndex}`][0]?.updateDataSourceByRowIndex(rowIndex, {
actSolutionVolume: actVol,
targetAcSolution: actNd,
});
}
}
@ -564,7 +568,104 @@ export default {
if (!validFlag) {
return false;
}
return this.getFilledFormData();
let content = this.getFilledFormData();
//resource
let tmpResource = []
//
if (content.ladderConfigs && content.ladderConfigs.length > 0) {
for (let i = 0; i < content.ladderConfigs.length; i++) {
let ladderConfigs = content.ladderConfigs[i]
let stepTableFormData = ladderConfigs.stepTableFormData
for (let j = 0; j < stepTableFormData.length; j++) {
tmpResource.push({
mc: null,
bh: stepTableFormData[j].targetSolutionCode + stepTableFormData[j].subTargetSolutionCode,
ph: null,
nd: stepTableFormData[j].actSolutionConcentration + ladderConfigs.headerSelectFields.actSolutionConcentrationUnit,
source: 'ELN配制',
sxrq: ladderConfigs.expireDate,
ndz: stepTableFormData[j].actSolutionConcentration,
nddw: ladderConfigs.headerSelectFields.actSolutionConcentrationUnit,
kc: stepTableFormData[j].actSolutionVolume,
kcdw: ladderConfigs.headerSelectFields.actSolutionVolumeUnit,
syl: null,
syldw: ladderConfigs.headerSelectFields.actSolutionVolumeUnit,
yxzq: ladderConfigs.effectivePeriod,
yxzqdw: ladderConfigs.effectivePeriodUnit,
})
let fzsj = stepTableFormData[j].fzsj
if (fzsj && fzsj.fzList) {
for (let k = 0; k < fzsj.fzList.length; k++) {
tmpResource.push({
mc: null,
bh: fzsj.mybh + '-' + fzsj.fzList[k].subCode,
ph: null,
nd: stepTableFormData[j].actSolutionConcentration + ladderConfigs.headerSelectFields.actSolutionConcentrationUnit,
source: 'ELN配制',
sxrq: ladderConfigs.expireDate,
ndz: stepTableFormData[j].actSolutionConcentration,
nddw: ladderConfigs.headerSelectFields.actSolutionConcentrationUnit,
kc: fzsj.fzList[k].num,
kcdw: fzsj.dw,
syl: null,
syldw: ladderConfigs.headerSelectFields.actSolutionVolumeUnit,
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++) {
tmpResource.push({
mc: null,
bh: stepTableFormData[j].targetSolutionCode + stepTableFormData[j].subTargetSolutionCode,
ph: null,
nd: stepTableFormData[j].actSolutionConcentration + paralleConfigs.headerSelectFields.actSolutionConcentrationUnit,
source: 'ELN配制',
sxrq: stepTableFormData[j].targetSolutionExpirationDate,
ndz: stepTableFormData[j].actSolutionConcentration,
nddw: paralleConfigs.headerSelectFields.actSolutionConcentrationUnit,
kc: stepTableFormData[j].actSolutionVolume,
kcdw: paralleConfigs.headerSelectFields.actSolutionVolumeUnit,
syl: null,
syldw: paralleConfigs.headerSelectFields.actSolutionVolumeUnit,
yxzq: stepTableFormData[j].targetSolutionCycle,
yxzqdw: stepTableFormData[j].targetSolutionCyclePrecision,
})
let fzsj = stepTableFormData[j].fzsj
if (fzsj && fzsj.fzList) {
for (let k = 0; k < fzsj.fzList.length; k++) {
tmpResource.push({
mc: null,
bh: fzsj.mybh + '-' + fzsj.fzList[k].subCode,
ph: null,
nd: stepTableFormData[j].actSolutionConcentration + paralleConfigs.headerSelectFields.actSolutionConcentrationUnit,
source: 'ELN配制',
sxrq: paralleConfigs.expireDate,
ndz: stepTableFormData[j].actSolutionConcentration,
nddw: paralleConfigs.headerSelectFields.actSolutionConcentrationUnit,
kc: fzsj.fzList[k].num,
kcdw: fzsj.dw,
syl: null,
syldw: paralleConfigs.headerSelectFields.actSolutionVolumeUnit,
yxzq: paralleConfigs.effectivePeriod,
yxzqdw: paralleConfigs.effectivePeriodUnit,
})
}
}
}
}
}
debugger
this.resourceTmp = tmpResource
return content;
},
async onSave() {
const formData = await this.getFormData();

Loading…
Cancel
Save