|
|
@ -16,33 +16,36 @@ |
|
|
<LineLabel label="template.common.operationSteps" /> |
|
|
<LineLabel label="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> |
|
|
<el-button type="primary" @click="handleAddLadder">{{ $t('template.common.xzjtpz') |
|
|
<el-button type="primary" @click="handleAddLadder">{{ $t('template.common.xzjtpz') |
|
|
}}</el-button> |
|
|
|
|
|
|
|
|
}}</el-button> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<!-- 阶梯配制区域 --> |
|
|
<!-- 阶梯配制区域 --> |
|
|
<div v-for="(ladderConfig, ladderIndex) in formData.ladderConfigs" :key="'ladder_' + ladderConfig.id"> |
|
|
|
|
|
|
|
|
<div v-for="(ladderConfig, ladderIndex) in formData.ladderConfigs" |
|
|
|
|
|
:key="'ladder_' + ladderConfig.id"> |
|
|
|
|
|
|
|
|
<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" |
|
|
@click="deleteConfig('ladderConfigs', ladderConfig)">{{ $t('template.common.deleteBtn') |
|
|
|
|
|
}}</el-button> |
|
|
|
|
|
|
|
|
@click="deleteConfig('ladderConfigs', ladderConfig)">{{ |
|
|
|
|
|
$t('template.common.deleteBtn') |
|
|
|
|
|
}}</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<BaseInfoFormPackage @onRegentSubmit="(e) => onRegentSubmit('ladder', ladderIndex, e)" |
|
|
<BaseInfoFormPackage @onRegentSubmit="(e) => onRegentSubmit('ladder', ladderIndex, e)" |
|
|
@beforeReagentSubmit="(data) => onBeforeReagentSubmit(data,ladderIndex, ladderConfig)" |
|
|
|
|
|
|
|
|
@beforeReagentSubmit="(data) => onBeforeReagentSubmit(data, ladderIndex, ladderConfig)" |
|
|
:ref="`ladderStepFormPackageRef_${ladderIndex}`" :formConfig="ladderStepFormConfig" |
|
|
:ref="`ladderStepFormPackageRef_${ladderIndex}`" :formConfig="ladderStepFormConfig" |
|
|
:formData="ladderConfig" :fieldItemLabel="$t('template.common.jtpz')" |
|
|
:formData="ladderConfig" :fieldItemLabel="$t('template.common.jtpz')" |
|
|
@blur="(e) => onHandleBlur(e,'ladder', ladderIndex)" |
|
|
|
|
|
@select = "(e) => onHandleBlur(e,'ladder', ladderIndex)" |
|
|
|
|
|
|
|
|
@blur="(e) => onHandleBlur(e, 'ladder', ladderIndex)" |
|
|
|
|
|
@select="(e) => onHandleBlur(e, 'ladder', ladderIndex)" |
|
|
:prefixKey="'ladder_' + ladderIndex" /> |
|
|
:prefixKey="'ladder_' + ladderIndex" /> |
|
|
<CustomTable @blur="(e) => onHandleTableBlur('ladder', ladderIndex, e)" |
|
|
<CustomTable @blur="(e) => onHandleTableBlur('ladder', ladderIndex, e)" |
|
|
:ref="`ladderStepTableRef_${ladderIndex}`" :showOperation="fillType === 'actFill' || fillType === 'preFill'" |
|
|
|
|
|
|
|
|
:ref="`ladderStepTableRef_${ladderIndex}`" |
|
|
|
|
|
:showOperation="fillType === 'actFill' || fillType === 'preFill'" |
|
|
:columns="ladderStepColumns" :formData="ladderConfig" |
|
|
:columns="ladderStepColumns" :formData="ladderConfig" |
|
|
@beforeSaveRecord = "(data) => onBeforeSaveRecord(data,'ladder',ladderIndex)" |
|
|
|
|
|
@headerSelectChange="(data)=>onHeaderSelectChange(data,'ladder',ladderIndex)" |
|
|
|
|
|
|
|
|
@beforeSaveRecord="(data) => onBeforeSaveRecord(data, 'ladder', ladderIndex)" |
|
|
|
|
|
@headerSelectChange="(data) => onHeaderSelectChange(data, 'ladder', ladderIndex)" |
|
|
:prefixKey="'ladder_' + ladderIndex" :fieldItemLabel="$t('template.common.jtpz')"> |
|
|
:prefixKey="'ladder_' + ladderIndex" :fieldItemLabel="$t('template.common.jtpz')"> |
|
|
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
<TableOpertaion @printTag="(e) => printTag(e, 'ladderConfigs', ladderIndex)" |
|
|
<TableOpertaion @printTag="(e) => printTag(e, 'ladderConfigs', ladderIndex)" |
|
|
@ -62,26 +65,27 @@ |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<!-- 平行配制区域 --> |
|
|
<!-- 平行配制区域 --> |
|
|
<div :label="$t('template.common.pxpz')" |
|
|
|
|
|
v-for="(paralleConfig, paralleIndex) in formData.paralleConfigs" |
|
|
|
|
|
:key="'paralle_' + paralleConfig.id"> |
|
|
|
|
|
|
|
|
<div :label="$t('template.common.pxpz')" |
|
|
|
|
|
v-for="(paralleConfig, paralleIndex) in formData.paralleConfigs" |
|
|
|
|
|
:key="'paralle_' + paralleConfig.id"> |
|
|
|
|
|
|
|
|
<div class="template-form-item"> |
|
|
<div class="template-form-item"> |
|
|
<div class="config-header"> |
|
|
<div class="config-header"> |
|
|
<div>{{ $t('template.common.pxpz') }}</div> |
|
|
<div>{{ $t('template.common.pxpz') }}</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" |
|
|
@click="deleteConfig('paralleConfigs', paralleConfig)">{{ $t('template.common.deleteBtn') |
|
|
|
|
|
}}</el-button> |
|
|
|
|
|
|
|
|
@click="deleteConfig('paralleConfigs', paralleConfig)">{{ |
|
|
|
|
|
$t('template.common.deleteBtn') |
|
|
|
|
|
}}</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<BaseInfoFormPackage @clickable="(e) => handleClickable('paralle', paralleIndex, e)" |
|
|
<BaseInfoFormPackage @clickable="(e) => handleClickable('paralle', paralleIndex, e)" |
|
|
:ref="`paralleStepFormPackageRef_${paralleIndex}`" :formConfig="paralleStepFormConfig" |
|
|
:ref="`paralleStepFormPackageRef_${paralleIndex}`" :formConfig="paralleStepFormConfig" |
|
|
:formData="paralleConfig" :prefixKey="'paralle' + paralleIndex" |
|
|
:formData="paralleConfig" :prefixKey="'paralle' + paralleIndex" |
|
|
:fieldItemLabel="$t('template.common.pxpz')" /> |
|
|
:fieldItemLabel="$t('template.common.pxpz')" /> |
|
|
<CustomTable @blur="(e) => onHandleTableBlur('paralle', paralleIndex, e)" |
|
|
<CustomTable @blur="(e) => onHandleTableBlur('paralle', paralleIndex, e)" |
|
|
:ref="`paralleStepTableRef_${paralleIndex}`" :showOperation="fillType === 'actFill' || fillType === 'preFill'" |
|
|
|
|
|
:columns="paralleStepColumns" |
|
|
|
|
|
@bodySelectChange = "bodySelectChange" |
|
|
|
|
|
@headerSelectChange="(data)=>onHeaderSelectChange(data,'paralle',paralleIndex)" |
|
|
|
|
|
|
|
|
:ref="`paralleStepTableRef_${paralleIndex}`" |
|
|
|
|
|
:showOperation="fillType === 'actFill' || fillType === 'preFill'" |
|
|
|
|
|
:columns="paralleStepColumns" @bodySelectChange="bodySelectChange" |
|
|
|
|
|
@headerSelectChange="(data) => onHeaderSelectChange(data, 'paralle', paralleIndex)" |
|
|
@beforeReagentSubmit="(data) => onTableBeforeReagentSubmit(data, paralleIndex, paralleConfig)" |
|
|
@beforeReagentSubmit="(data) => onTableBeforeReagentSubmit(data, paralleIndex, paralleConfig)" |
|
|
@onRegentSubmit="(data) => onTableRegentSubmit('paralle', paralleIndex, data)" |
|
|
@onRegentSubmit="(data) => onTableRegentSubmit('paralle', paralleIndex, data)" |
|
|
:formData="paralleConfig" :prefixKey="'paralle' + paralleIndex" |
|
|
:formData="paralleConfig" :prefixKey="'paralle' + paralleIndex" |
|
|
@ -200,17 +204,18 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
onBeforeSaveRecord(data,type,configIndex){ |
|
|
|
|
|
if(type === "ladder"){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onBeforeSaveRecord(data, type, configIndex) { |
|
|
|
|
|
if (type === "ladder") { |
|
|
const formFields = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFilledFormData(); |
|
|
const formFields = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFilledFormData(); |
|
|
this.onCommonVerifyNdException(formFields,data); |
|
|
|
|
|
|
|
|
this.onCommonVerifyNdException(formFields, data); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
bodySelectChange(data){ |
|
|
|
|
|
this.paralleUpdateTargetStartSolutionVolume(data.item,data.headerSelectFields); |
|
|
|
|
|
|
|
|
bodySelectChange(data) { |
|
|
|
|
|
this.paralleUpdateTargetStartSolutionVolume(data.item, data.headerSelectFields); |
|
|
}, |
|
|
}, |
|
|
//平行配置更新体积 |
|
|
//平行配置更新体积 |
|
|
paralleUpdateTargetStartSolutionVolume(item,headerSelectFields){ |
|
|
|
|
|
|
|
|
paralleUpdateTargetStartSolutionVolume(item, headerSelectFields) { |
|
|
const volumne = item.targetStartSolutionConcentration; |
|
|
const volumne = item.targetStartSolutionConcentration; |
|
|
const subTargetStartSolution = item.targetStartSolutionConcentrationPrecision; |
|
|
const subTargetStartSolution = item.targetStartSolutionConcentrationPrecision; |
|
|
const params = { |
|
|
const params = { |
|
|
@ -218,42 +223,42 @@ export default { |
|
|
subTargetStartSolution |
|
|
subTargetStartSolution |
|
|
} |
|
|
} |
|
|
if (volumne) { |
|
|
if (volumne) { |
|
|
this.updateTargetStartSolutionVolume(item, volumne,params); |
|
|
|
|
|
|
|
|
this.updateTargetStartSolutionVolume(item, volumne, params); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onHandleBlur(e,type,configIndex){ |
|
|
|
|
|
const {targetStartSolution,subTargetStartSolution} = e; |
|
|
|
|
|
const {stepTableFormData,headerSelectFields} = this.$refs[`ladderStepTableRef_${configIndex}`][0]?.getFilledFormData(); |
|
|
|
|
|
|
|
|
onHandleBlur(e, type, configIndex) { |
|
|
|
|
|
const { targetStartSolution, subTargetStartSolution } = e; |
|
|
|
|
|
const { stepTableFormData, headerSelectFields } = this.$refs[`ladderStepTableRef_${configIndex}`][0]?.getFilledFormData(); |
|
|
const params = { |
|
|
const params = { |
|
|
subTargetStartSolution, |
|
|
subTargetStartSolution, |
|
|
headerSelectFields |
|
|
headerSelectFields |
|
|
} |
|
|
} |
|
|
this.batchUpdateTargetStartSolutionVolume(stepTableFormData,targetStartSolution,params) |
|
|
|
|
|
|
|
|
this.batchUpdateTargetStartSolutionVolume(stepTableFormData, targetStartSolution, params) |
|
|
}, |
|
|
}, |
|
|
//选择table header下拉框也要更新体积 |
|
|
//选择table header下拉框也要更新体积 |
|
|
onHeaderSelectChange(data,type,configIndex){ |
|
|
|
|
|
const {key, headerSelectFields,dataSource=[]} = data; |
|
|
|
|
|
|
|
|
onHeaderSelectChange(data, type, configIndex) { |
|
|
|
|
|
const { key, headerSelectFields, dataSource = [] } = data; |
|
|
const keys = [ |
|
|
const keys = [ |
|
|
'targetStartSolutionVolumeUnit', |
|
|
'targetStartSolutionVolumeUnit', |
|
|
'targetDiluentVolumeUnit', |
|
|
'targetDiluentVolumeUnit', |
|
|
'targetSolutionConcentrationUnit', |
|
|
'targetSolutionConcentrationUnit', |
|
|
'targetSolutionVolumeUnit', |
|
|
'targetSolutionVolumeUnit', |
|
|
] |
|
|
] |
|
|
console.log(key,"key") |
|
|
|
|
|
if(keys.includes(key)){ |
|
|
|
|
|
if(type === 'ladder'){ |
|
|
|
|
|
const {targetStartSolution,subTargetStartSolution} = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFilledFormData(); |
|
|
|
|
|
|
|
|
console.log(key, "key") |
|
|
|
|
|
if (keys.includes(key)) { |
|
|
|
|
|
if (type === 'ladder') { |
|
|
|
|
|
const { targetStartSolution, subTargetStartSolution } = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFilledFormData(); |
|
|
const params = { |
|
|
const params = { |
|
|
subTargetStartSolution, |
|
|
subTargetStartSolution, |
|
|
headerSelectFields |
|
|
headerSelectFields |
|
|
} |
|
|
} |
|
|
this.batchUpdateTargetStartSolutionVolume(dataSource,targetStartSolution,params) |
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
|
this.batchUpdateTargetStartSolutionVolume(dataSource, targetStartSolution, params) |
|
|
|
|
|
} else { |
|
|
dataSource.forEach(item => { |
|
|
dataSource.forEach(item => { |
|
|
this.paralleUpdateTargetStartSolutionVolume(item,headerSelectFields); |
|
|
|
|
|
|
|
|
this.paralleUpdateTargetStartSolutionVolume(item, headerSelectFields); |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
//分装 |
|
|
//分装 |
|
|
@ -263,7 +268,7 @@ export default { |
|
|
if (fzList && fzList.length > 0) { |
|
|
if (fzList && fzList.length > 0) { |
|
|
const list = fzList.map((item) => { |
|
|
const list = fzList.map((item) => { |
|
|
return { |
|
|
return { |
|
|
bh: mybh +item.preCode + item.subCode, |
|
|
|
|
|
|
|
|
bh: mybh + item.preCode + item.subCode, |
|
|
kc: item.num, |
|
|
kc: item.num, |
|
|
kcdw: dw, |
|
|
kcdw: dw, |
|
|
} |
|
|
} |
|
|
@ -461,45 +466,45 @@ export default { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
getLadderNdParamsByIndex(configIndex){ |
|
|
|
|
|
|
|
|
getLadderNdParamsByIndex(configIndex) { |
|
|
const { headerSelectFields = [] } = this.$refs[`ladderStepTableRef_${configIndex}`][0].getFilledFormData(); |
|
|
const { headerSelectFields = [] } = this.$refs[`ladderStepTableRef_${configIndex}`][0].getFilledFormData(); |
|
|
const subTargetAcSolutionUnit = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFormDataByKey("subTargetAcSolutionUnit");//获取实际起始溶液浓度 |
|
|
const subTargetAcSolutionUnit = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFormDataByKey("subTargetAcSolutionUnit");//获取实际起始溶液浓度 |
|
|
return { |
|
|
return { |
|
|
targetStartSolutionUnit:subTargetAcSolutionUnit, |
|
|
|
|
|
|
|
|
targetStartSolutionUnit: subTargetAcSolutionUnit, |
|
|
headerSelectFields |
|
|
headerSelectFields |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
getParalleNdParamsByIndex(item,configIndex){ |
|
|
|
|
|
|
|
|
getParalleNdParamsByIndex(item, configIndex) { |
|
|
const { headerSelectFields = [] } = this.$refs[`paralleStepTableRef_${configIndex}`][0].getFilledFormData(); |
|
|
const { headerSelectFields = [] } = this.$refs[`paralleStepTableRef_${configIndex}`][0].getFilledFormData(); |
|
|
const subTargetAcSolutionUnit = item.subTargetAcSolutionUnit || "";//获取实际起始溶液浓度单位 |
|
|
const subTargetAcSolutionUnit = item.subTargetAcSolutionUnit || "";//获取实际起始溶液浓度单位 |
|
|
return { |
|
|
return { |
|
|
targetStartSolutionUnit:subTargetAcSolutionUnit, |
|
|
|
|
|
|
|
|
targetStartSolutionUnit: subTargetAcSolutionUnit, |
|
|
headerSelectFields |
|
|
headerSelectFields |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 表格失去焦点事件 |
|
|
// 表格失去焦点事件 |
|
|
onHandleTableBlur(type, configIndex, e) { |
|
|
onHandleTableBlur(type, configIndex, e) { |
|
|
const { colKey = "", item, rowIndex,headerSelectFields } = e; |
|
|
|
|
|
|
|
|
const { colKey = "", item, rowIndex, headerSelectFields } = e; |
|
|
if (colKey === "targetStartSolutionConcentration" || colKey === "targetSolutionVolume" || colKey === "targetSolutionConcentration" || colKey === "targetStartSolutionVolumePrecision" || colKey === "targetDiluentVolumePrecision") { |
|
|
if (colKey === "targetStartSolutionConcentration" || colKey === "targetSolutionVolume" || colKey === "targetSolutionConcentration" || colKey === "targetStartSolutionVolumePrecision" || colKey === "targetDiluentVolumePrecision") { |
|
|
if (type === "ladder") { |
|
|
if (type === "ladder") { |
|
|
const {targetStartSolution,subTargetStartSolution} = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFilledFormData(); |
|
|
|
|
|
|
|
|
const { targetStartSolution, subTargetStartSolution } = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFilledFormData(); |
|
|
const params = { |
|
|
const params = { |
|
|
subTargetStartSolution, |
|
|
subTargetStartSolution, |
|
|
headerSelectFields |
|
|
headerSelectFields |
|
|
} |
|
|
} |
|
|
if (targetStartSolution) { |
|
|
if (targetStartSolution) { |
|
|
this.updateTargetStartSolutionVolume(item, targetStartSolution,params); |
|
|
|
|
|
|
|
|
this.updateTargetStartSolutionVolume(item, targetStartSolution, params); |
|
|
} |
|
|
} |
|
|
} else if (type === "paralle") { |
|
|
} else if (type === "paralle") { |
|
|
this.paralleUpdateTargetStartSolutionVolume(item,headerSelectFields); |
|
|
|
|
|
|
|
|
this.paralleUpdateTargetStartSolutionVolume(item, headerSelectFields); |
|
|
} |
|
|
} |
|
|
} else if (colKey === "actStartSolutionVolume" || colKey === "actDiluentVolume") {//实际起始溶液体积和实际目标溶液体积 |
|
|
} else if (colKey === "actStartSolutionVolume" || colKey === "actDiluentVolume") {//实际起始溶液体积和实际目标溶液体积 |
|
|
if (type === "ladder") { |
|
|
if (type === "ladder") { |
|
|
const targetAcSolution = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFormDataByKey("targetAcSolution");//获取实际起始溶液浓度 |
|
|
const targetAcSolution = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFormDataByKey("targetAcSolution");//获取实际起始溶液浓度 |
|
|
const params = this.getLadderNdParamsByIndex(configIndex); |
|
|
const params = this.getLadderNdParamsByIndex(configIndex); |
|
|
if (targetAcSolution) { |
|
|
if (targetAcSolution) { |
|
|
const volResult = this.updateSjmbrynd(item, targetAcSolution,params); |
|
|
|
|
|
|
|
|
const volResult = this.updateSjmbrynd(item, targetAcSolution, params); |
|
|
if (!volResult) { |
|
|
if (!volResult) { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
@ -510,9 +515,9 @@ export default { |
|
|
} |
|
|
} |
|
|
} else if (type === "paralle") { |
|
|
} else if (type === "paralle") { |
|
|
const targetAcSolution = item.targetAcSolution || 0;//获取实际起始溶液浓度 |
|
|
const targetAcSolution = item.targetAcSolution || 0;//获取实际起始溶液浓度 |
|
|
const params = this.getParalleNdParamsByIndex(item,configIndex); |
|
|
|
|
|
|
|
|
const params = this.getParalleNdParamsByIndex(item, configIndex); |
|
|
if (targetAcSolution) { |
|
|
if (targetAcSolution) { |
|
|
const volResult = this.updateSjmbrynd(item, targetAcSolution,params); |
|
|
|
|
|
|
|
|
const volResult = this.updateSjmbrynd(item, targetAcSolution, params); |
|
|
if (!volResult) { |
|
|
if (!volResult) { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
@ -526,9 +531,9 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onTableBeforeReagentSubmit(data){ |
|
|
|
|
|
const {selectData, callback, key, rowData} = data; |
|
|
|
|
|
if(key === "actStartSolutionCode" && !isCommonUnit(selectData.row.nddw,[rowData.targetStartSolutionConcentrationPrecision])){//选择起始源溶液需要同步更新table的变更记录。 |
|
|
|
|
|
|
|
|
onTableBeforeReagentSubmit(data) { |
|
|
|
|
|
const { selectData, callback, key, rowData } = data; |
|
|
|
|
|
if (key === "actStartSolutionCode" && !isCommonUnit(selectData.row.nddw, [rowData.targetStartSolutionConcentrationPrecision])) {//选择起始源溶液需要同步更新table的变更记录。 |
|
|
callback.prevent('浓度单位与预制不符,请重新选择或申请废止并重新预制。'); |
|
|
callback.prevent('浓度单位与预制不符,请重新选择或申请废止并重新预制。'); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
@ -538,9 +543,9 @@ export default { |
|
|
const { row, selectedId } = selectInfo; |
|
|
const { row, selectedId } = selectInfo; |
|
|
if (key === "actStartSolutionCode") {//实际原始溶液编号点击事件 |
|
|
if (key === "actStartSolutionCode") {//实际原始溶液编号点击事件 |
|
|
const tableRef = this.$refs[`paralleStepTableRef_${configIndex}`][0]; |
|
|
const tableRef = this.$refs[`paralleStepTableRef_${configIndex}`][0]; |
|
|
const params = this.getParalleNdParamsByIndex(rowData,configIndex); |
|
|
|
|
|
|
|
|
const params = this.getParalleNdParamsByIndex(rowData, configIndex); |
|
|
if (tableRef) { |
|
|
if (tableRef) { |
|
|
const volResult = this.updateSjmbrynd(rowData, row.nd,params); |
|
|
|
|
|
|
|
|
const volResult = this.updateSjmbrynd(rowData, row.nd, params); |
|
|
//第一次选择溶液的时候,可能其他值没填入,就需要先把浓度和code一起更新 |
|
|
//第一次选择溶液的时候,可能其他值没填入,就需要先把浓度和code一起更新 |
|
|
tableRef.updateDataSourceByRowIndex(rowIndex, { |
|
|
tableRef.updateDataSourceByRowIndex(rowIndex, { |
|
|
actStartSolutionCode: selectedId, |
|
|
actStartSolutionCode: selectedId, |
|
|
@ -597,7 +602,7 @@ export default { |
|
|
item.startSolutionCode = newData[index - 1].targetSolutionCode + newData[index - 1].subTargetSolutionCode; |
|
|
item.startSolutionCode = newData[index - 1].targetSolutionCode + newData[index - 1].subTargetSolutionCode; |
|
|
initNd = newData[index - 1].actSolutionConcentration; |
|
|
initNd = newData[index - 1].actSolutionConcentration; |
|
|
} |
|
|
} |
|
|
const volResult = this.updateSjmbrynd(item, initNd,params); |
|
|
|
|
|
|
|
|
const volResult = this.updateSjmbrynd(item, initNd, params); |
|
|
if (!volResult) { |
|
|
if (!volResult) { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
@ -691,23 +696,23 @@ export default { |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
let content = this.getFilledFormData(); |
|
|
let content = this.getFilledFormData(); |
|
|
if(content){ |
|
|
|
|
|
const {ladderConfigs = [], paralleConfigs = []} = content; |
|
|
|
|
|
if(ladderConfigs.length > 0){ |
|
|
|
|
|
const ladderConUnitDiff = ladderConfigs.every(item => isCommonUnit(item.subTargetStartSolution,[item.headerSelectFields.actSolutionConcentrationUnit, item.headerSelectFields.targetSolutionConcentrationUnit])); |
|
|
|
|
|
if(!ladderConUnitDiff){ |
|
|
|
|
|
|
|
|
if (content) { |
|
|
|
|
|
const { ladderConfigs = [], paralleConfigs = [] } = content; |
|
|
|
|
|
if (ladderConfigs.length > 0) { |
|
|
|
|
|
const ladderConUnitDiff = ladderConfigs.every(item => isCommonUnit(item.subTargetStartSolution, [item.headerSelectFields.actSolutionConcentrationUnit, item.headerSelectFields.targetSolutionConcentrationUnit])); |
|
|
|
|
|
if (!ladderConUnitDiff) { |
|
|
this.$message.error("起始浓度单位与目标浓度单位不符,请重新选择!"); |
|
|
this.$message.error("起始浓度单位与目标浓度单位不符,请重新选择!"); |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if(paralleConfigs.length > 0){ |
|
|
|
|
|
|
|
|
if (paralleConfigs.length > 0) { |
|
|
const paralleConUnitDiff = paralleConfigs.every(item => { |
|
|
const paralleConUnitDiff = paralleConfigs.every(item => { |
|
|
const {stepTableFormData = [],headerSelectFields = {}} =item; |
|
|
|
|
|
|
|
|
const { stepTableFormData = [], headerSelectFields = {} } = item; |
|
|
const conUnits = stepTableFormData.map(item => item.targetStartSolutionConcentrationPrecision); |
|
|
const conUnits = stepTableFormData.map(item => item.targetStartSolutionConcentrationPrecision); |
|
|
const {actSolutionConcentrationUnit,targetSolutionConcentrationUnit} = headerSelectFields; |
|
|
|
|
|
return isCommonUnit(actSolutionConcentrationUnit,[...conUnits,targetSolutionConcentrationUnit]); |
|
|
|
|
|
|
|
|
const { actSolutionConcentrationUnit, targetSolutionConcentrationUnit } = headerSelectFields; |
|
|
|
|
|
return isCommonUnit(actSolutionConcentrationUnit, [...conUnits, targetSolutionConcentrationUnit]); |
|
|
}); |
|
|
}); |
|
|
if(!paralleConUnitDiff){ |
|
|
|
|
|
|
|
|
if (!paralleConUnitDiff) { |
|
|
this.$message.error("起始浓度单位与目标浓度单位不符,请重新选择!"); |
|
|
this.$message.error("起始浓度单位与目标浓度单位不符,请重新选择!"); |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|