|
|
@ -1,6 +1,6 @@ |
|
|
import moment from 'moment' |
|
|
import moment from 'moment' |
|
|
import { getLatestSn, getLatestSnArr } from '@/api/template'; |
|
|
import { getLatestSn, getLatestSnArr } from '@/api/template'; |
|
|
import { isValueEmpty, getStringWidth } from '@/utils/index'; |
|
|
|
|
|
|
|
|
import { isValueEmpty, getStringWidth,getuuid } from '@/utils/index'; |
|
|
import { isCommonUnit } from "@/utils/conTools"; |
|
|
import { isCommonUnit } from "@/utils/conTools"; |
|
|
import { sj_subpackage, sj_startConfiguration, sj_configurationCompleted } from '@/api/business/sj/sj'; |
|
|
import { sj_subpackage, sj_startConfiguration, sj_configurationCompleted } from '@/api/business/sj/sj'; |
|
|
import { convertConcentration } from "@/utils/conConverter";//浓度单位转换
|
|
|
import { convertConcentration } from "@/utils/conConverter";//浓度单位转换
|
|
|
@ -175,7 +175,7 @@ export default { |
|
|
!expireDate |
|
|
!expireDate |
|
|
) { |
|
|
) { |
|
|
let end; |
|
|
let end; |
|
|
if (startDate === "NA") { |
|
|
|
|
|
|
|
|
if (effectivePeriod === "NA" || effectivePeriodUnit === "NA") { |
|
|
end = "NA"; |
|
|
end = "NA"; |
|
|
} else { |
|
|
} else { |
|
|
const start = moment(startDate) |
|
|
const start = moment(startDate) |
|
|
@ -288,10 +288,14 @@ export default { |
|
|
onBeforeReagentSubmit(data) { |
|
|
onBeforeReagentSubmit(data) { |
|
|
const { selectData, callback, key, formFields } = data; |
|
|
const { selectData, callback, key, formFields } = data; |
|
|
const { subTargetStartSolution } = formFields; |
|
|
const { subTargetStartSolution } = formFields; |
|
|
|
|
|
|
|
|
//判断选择的浓度单位和预制的浓度单位是否一致
|
|
|
//判断选择的浓度单位和预制的浓度单位是否一致
|
|
|
if (key === "subStartSolution" && !isCommonUnit(selectData.row.nddw, [subTargetStartSolution])) {//选择起始源溶液需要同步更新table的变更记录。
|
|
|
if (key === "subStartSolution" && !isCommonUnit(selectData.row.nddw, [subTargetStartSolution])) {//选择起始源溶液需要同步更新table的变更记录。
|
|
|
callback.prevent('浓度单位与预制不符,请重新选择或申请废止并重新预制。'); |
|
|
callback.prevent('浓度单位与预制不符,请重新选择或申请废止并重新预制。'); |
|
|
} |
|
|
} |
|
|
|
|
|
if(selectData.row.nd === "NA"){ |
|
|
|
|
|
callback.prevent('当前实际浓度为NA,请重新选择'); |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
getFormDataByTemplateData() { |
|
|
getFormDataByTemplateData() { |
|
|
let o = {}; |
|
|
let o = {}; |
|
|
@ -498,7 +502,8 @@ export default { |
|
|
actSolutionConcentrationPrecision: 3, //小数点精度默认为3
|
|
|
actSolutionConcentrationPrecision: 3, //小数点精度默认为3
|
|
|
targetDiluentVolumePrecision: 3, //小数点精度默认为3
|
|
|
targetDiluentVolumePrecision: 3, //小数点精度默认为3
|
|
|
targetStartSolutionVolumePrecision: 3, //小数点精度默认为3
|
|
|
targetStartSolutionVolumePrecision: 3, //小数点精度默认为3
|
|
|
targetSolutionCode: `CA-WS-STD${Number(codeSTD) - index}` |
|
|
|
|
|
|
|
|
targetSolutionCode: `CA-WS-STD${Number(codeSTD) - index}`, |
|
|
|
|
|
id:getuuid() |
|
|
})) |
|
|
})) |
|
|
this.$refs.stepTableRef.updateDataSource(arr) |
|
|
this.$refs.stepTableRef.updateDataSource(arr) |
|
|
} else if (key === 'targetStartSolution' || key === 'subTargetStartSolution') { |
|
|
} else if (key === 'targetStartSolution' || key === 'subTargetStartSolution') { |
|
|
@ -615,6 +620,11 @@ export default { |
|
|
const targetStartVolUnit = actSolutionConcentrationUnit.split("/")[1];//先按照预设目标溶液浓度的单位标准
|
|
|
const targetStartVolUnit = actSolutionConcentrationUnit.split("/")[1];//先按照预设目标溶液浓度的单位标准
|
|
|
const converActVol = volumeConverter.convert(actVol + actSolutionVolumeUnit, targetStartVolUnit) |
|
|
const converActVol = volumeConverter.convert(actVol + actSolutionVolumeUnit, targetStartVolUnit) |
|
|
const converActDiluentVolume1 = volumeConverter.convert(actStartSolutionVolume + actStartSolutionVolumeUnit, targetStartVolUnit) |
|
|
const converActDiluentVolume1 = volumeConverter.convert(actStartSolutionVolume + actStartSolutionVolumeUnit, targetStartVolUnit) |
|
|
|
|
|
const converArr = targetAcSolution.split("/"); |
|
|
|
|
|
converArr.map((item)=>{ |
|
|
|
|
|
return convertConcentration.convert(item + targetStartSolutionUnit, actSolutionConcentrationUnit) |
|
|
|
|
|
}) |
|
|
|
|
|
console.log(converArr,"converArr") |
|
|
const converTargetAcSolution = convertConcentration.convert(targetAcSolution + targetStartSolutionUnit, actSolutionConcentrationUnit) |
|
|
const converTargetAcSolution = convertConcentration.convert(targetAcSolution + targetStartSolutionUnit, actSolutionConcentrationUnit) |
|
|
// 实际目标溶液浓度 = 实际源溶液浓度÷(实际终体积÷源溶液加入体积);
|
|
|
// 实际目标溶液浓度 = 实际源溶液浓度÷(实际终体积÷源溶液加入体积);
|
|
|
const actNd = ( |
|
|
const actNd = ( |
|
|
@ -651,7 +661,11 @@ export default { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
const targetStartVolUnit = targetSolutionConcentrationUnit.split("/")[1];//先按照预设目标溶液浓度的单位标准
|
|
|
const targetStartVolUnit = targetSolutionConcentrationUnit.split("/")[1];//先按照预设目标溶液浓度的单位标准
|
|
|
|
|
|
|
|
|
|
|
|
const volumeArr = volume.split("/"); |
|
|
|
|
|
const converArr = volumeArr.map((item)=>{ |
|
|
|
|
|
return convertConcentration.convert(item + subTargetStartSolution, targetSolutionConcentrationUnit) |
|
|
|
|
|
}) |
|
|
|
|
|
console.log(converArr,"converArr") |
|
|
//将起始溶液浓度转换为和预设目标溶液浓度一样的单位再计算;
|
|
|
//将起始溶液浓度转换为和预设目标溶液浓度一样的单位再计算;
|
|
|
const converStartCon = convertConcentration.convert(volume + subTargetStartSolution, targetSolutionConcentrationUnit) |
|
|
const converStartCon = convertConcentration.convert(volume + subTargetStartSolution, targetSolutionConcentrationUnit) |
|
|
//将预设目标溶液体积转换为和预设目标溶液浓度单位的分母一样的单位再计算;如:预设目标溶液浓度单位为mg/mL,预设目标溶液体积单位为uL,则将预设目标溶液体积转换为mL
|
|
|
//将预设目标溶液体积转换为和预设目标溶液浓度单位的分母一样的单位再计算;如:预设目标溶液浓度单位为mg/mL,预设目标溶液体积单位为uL,则将预设目标溶液体积转换为mL
|
|
|
|