Browse Source

feat:[模板管理][update]

lkf
luojie 2 months ago
parent
commit
ad1f202339
39 changed files with 115 additions and 80 deletions
  1. +10
    -5
      src/components/Template/CustomTable.vue
  2. +7
    -2
      src/components/Template/HandleFormItem.vue
  3. +1
    -1
      src/components/Template/StepComponents/ry/bdtj.vue
  4. +1
    -1
      src/components/Template/StepComponents/ry/bdzl.vue
  5. +1
    -1
      src/components/Template/StepComponents/ry/clcz.vue
  6. +1
    -1
      src/components/Template/StepComponents/ry/clfcz.vue
  7. +1
    -1
      src/components/Template/StepComponents/ry/cs.vue
  8. +1
    -1
      src/components/Template/StepComponents/ry/czdd.vue
  9. +1
    -1
      src/components/Template/StepComponents/ry/czhj.vue
  10. +1
    -1
      src/components/Template/StepComponents/ry/dc.vue
  11. +2
    -2
      src/components/Template/StepComponents/ry/fr.vue
  12. +2
    -2
      src/components/Template/StepComponents/ry/frdrq.vue
  13. +1
    -1
      src/components/Template/StepComponents/ry/fs.vue
  14. +1
    -1
      src/components/Template/StepComponents/ry/fy.vue
  15. +1
    -1
      src/components/Template/StepComponents/ry/glsd.vue
  16. +2
    -2
      src/components/Template/StepComponents/ry/glzd.vue
  17. +1
    -1
      src/components/Template/StepComponents/ry/hwhy.vue
  18. +1
    -1
      src/components/Template/StepComponents/ry/jb.vue
  19. +1
    -1
      src/components/Template/StepComponents/ry/jd.vue
  20. +1
    -1
      src/components/Template/StepComponents/ry/jrjb.vue
  21. +2
    -2
      src/components/Template/StepComponents/ry/jrry.vue
  22. +1
    -1
      src/components/Template/StepComponents/ry/js.vue
  23. +1
    -1
      src/components/Template/StepComponents/ry/jz.vue
  24. +1
    -1
      src/components/Template/StepComponents/ry/lx.vue
  25. +1
    -1
      src/components/Template/StepComponents/ry/mj.vue
  26. +2
    -2
      src/components/Template/StepComponents/ry/rs.vue
  27. +1
    -1
      src/components/Template/StepComponents/ry/sy.vue
  28. +3
    -3
      src/components/Template/StepComponents/ry/tjphcz.vue
  29. +3
    -3
      src/components/Template/StepComponents/ry/tjphfcz.vue
  30. +1
    -1
      src/components/Template/StepComponents/ry/tpjydd.vue
  31. +1
    -1
      src/components/Template/StepComponents/ry/tpjysd.vue
  32. +1
    -1
      src/components/Template/StepComponents/ry/wxhy.vue
  33. +2
    -2
      src/components/Template/StepComponents/ry/ym.vue
  34. +1
    -1
      src/components/Template/StepComponents/ry/zy.vue
  35. +1
    -1
      src/components/Template/StepComponents/ry/zyhy.vue
  36. +30
    -14
      src/components/Template/StepFormPackage.vue
  37. +3
    -2
      src/components/Template/mixins/formPackageMixins.js
  38. +12
    -8
      src/views/business/comps/template/comps/sp/SP003.vue
  39. +10
    -6
      src/views/business/comps/template/mixins/templateMixin.js

+ 10
- 5
src/components/Template/CustomTable.vue View File

@ -4,7 +4,7 @@
<div class="custom-table-header">
<div class="custom-table-row">
<div v-for="(col, index) in columns" :key="index" class="custom-table-cell header-cell"
:style="{ width: (templateFillType !== 'actFill'&&col.showWidth)?col.showWidth + 'px' :(col.width ? col.width + 'px' : 'auto') }">
:style="getCellWidth(col)">
<div class="header-cell-content">
<div>{{ $t(col.label) }}</div>
<template
@ -34,7 +34,7 @@
<div class="custom-table-body">
<div v-for="(row, rowIndex) in localDataSource" :key="rowIndex" class="custometable-row">
<div v-for="(col, colIndex) in columns" :key="colIndex" class="custom-table-cell body-cell"
:style="{ width: (templateFillType !== 'actFill'&&col.showWidth)?col.showWidth + 'px' :(col.width ? col.width + 'px' : 'auto') }">
:style="getCellWidth(col)">
<div class="inner-table-cell">
<div class="flex1">
<template v-if="col.bodyType === 'input'">
@ -264,9 +264,14 @@ export default {
this.oldLocalDataSource = [];
},
methods: {
getCellWidth(col){
const {templateFillType} = this;
let width = col.width ? col.width + 'px' : 'auto';
if(templateFillType !== "actFill" && templateFillType !== "preFill"){
width = (col.showWidth)?col.showWidth + 'px' :(col.width ? col.width + 'px' : 'auto')
}
return { width }
},
//
resetRecord(rowIndex, colIndex,) {
if (this.localDataSource.length) {

+ 7
- 2
src/components/Template/HandleFormItem.vue View File

@ -234,7 +234,7 @@ export default {
//
EventBus.$on("onReagentSubmit", this.onReagentSubmit)
//
EventBus.$on("onInstrumentSubmit", this.onInstrumentSubmit)
EventBus.$on("onInstrumentSubmit", this.onMixReagentSubmit)
////
EventBus.$on("onMixReagentSubmit", this.onMixReagentSubmit)
},
@ -243,10 +243,15 @@ export default {
EventBus.$off('onEditSignCancel', this.handleEditSignCancel);
EventBus.$off('onEditSignCallback', this.handleEditSignCallback);
EventBus.$off("onReagentSubmit", this.onReagentSubmit)
EventBus.$off("onInstrumentSubmit", this.onInstrumentSubmit)
EventBus.$off("onInstrumentSubmit", this.onMixReagentSubmit)
EventBus.$off("onMixReagentSubmit", this.onMixReagentSubmit)
},
methods: {
onInstrumentSubmit(data){
if(data.uuid !== this.uuid) return;
this.selectRegentInfo = data;
console.log(data,"yq")
},
handleSuccess(res, file, fileList) {
if(res.code == 200){
this.fileList = fileList;

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

@ -25,7 +25,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill",
},
yq:{
type:"instrument",
type:"yq",
fillType:"actFill",
},
text2:{

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

@ -21,7 +21,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
type:"text",
},
yq:{
type:"instrument",
type:"yq",
fillType:"actFill",
},
text2:{

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

@ -22,7 +22,7 @@ export default {
type: "text",
},
yq: {
type: "instrument",
type: "yq",
fillType: "actFill",
},
text2: {

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

@ -22,7 +22,7 @@ export default {
type: "text",
},
yq: {
type: "instrument",
type: "yq",
fillType: "actFill",
},
text2: {

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

@ -22,7 +22,7 @@ export default {
type: "text",
},
yq: {
type: "instrument",
type: "yq",
fillType: "actFill",
},
text2: {

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

@ -25,7 +25,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill",
},
yq:{
type:"instrument",
type:"yq",
fillType:"actFill",
},
text2:{

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

@ -25,7 +25,7 @@ export default {
fillType: "preFill",
},
yq: {
type: "instrument",
type: "yq",
fillType: "actFill",
},
text2: {

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

@ -21,7 +21,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
type:"text",
},
yq:{
type:"instrument",
type:"yq",
fillType:"actFill",
},
text2:{

+ 2
- 2
src/components/Template/StepComponents/ry/fr.vue View File

@ -25,7 +25,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill",
},
yq:{
type:"instrument",
type:"yq",
fillType:"actFill",
},
text2:{
@ -37,7 +37,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill",
},
sj:{
type:"regent",
type:"sj",
fillType:"actFill",
ylCode: "sjtj",
dwCode: "sjtjdw",

+ 2
- 2
src/components/Template/StepComponents/ry/frdrq.vue View File

@ -25,7 +25,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill",
},
yq:{
type:"instrument",
type:"yq",
fillType:"actFill",
},
text2:{
@ -37,7 +37,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill",
},
sj:{
type:"regent",
type:"sj",
fillType:"actFill",
ylCode: "sjtj",
dwCode: "sjtjdw",

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

@ -22,7 +22,7 @@ export default {
type: "text",
},
yq: {
type: "instrument",
type: "yq",
fillType: "actFill",
},
text2: {

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

@ -22,7 +22,7 @@ export default {
type: "text",
},
yq: {
type: "instrument",
type: "yq",
fillType: "actFill",
},
text2: {

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

@ -25,7 +25,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill",
},
sj:{
type:"regent",
type:"sj",
fillType:"actFill",
},
text3:{

+ 2
- 2
src/components/Template/StepComponents/ry/glzd.vue View File

@ -21,7 +21,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
type:"text",
},
yq:{
type:"instrument",
type:"yq",
fillType:"actFill",
},
text2:{
@ -33,7 +33,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill",
},
sj:{
type:"regent",
type:"sj",
fillType:"actFill",
},
text3:{

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

@ -22,7 +22,7 @@ export default {
type: "text",
},
yq1: {
type: "instrument",
type: "yq",
fillType: "actFill",
},
text2: {

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

@ -22,7 +22,7 @@ export default {
type: "text",
},
yq: {
type: "instrument",
type: "yq",
fillType: "actFill",
},
text4: {

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

@ -26,7 +26,7 @@ export default {
fillType: "preFill",
},
sj: {
type: "regent",
type: "sj",
fillType: "actFill",
},
text2: {

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

@ -21,7 +21,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
type:"text",
},
yq:{
type:"instrument",
type:"yq",
fillType:"actFill",
},
text2:{

+ 2
- 2
src/components/Template/StepComponents/ry/jrry.vue View File

@ -26,7 +26,7 @@ export default {
},
sjrqcz: {
fillType: "actFill",
type: "instrument",
type: "yq",
},
text2: {
label: "仪器,吸取",
@ -38,7 +38,7 @@ export default {
},
sjrq:{
fillType: "actFill",
type: "regent",
type: "sj",
ylCode: "sjsr2",
dwCode: "sjsrdw2",
},

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

@ -25,7 +25,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill",
},
yq:{
type:"instrument",
type:"yq",
fillType:"actFill",
},
text2:{

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

@ -25,7 +25,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill",
},
sj:{
type:"regent",
type:"sj",
fillType:"actFill",
},
text2:{

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

@ -21,7 +21,7 @@ export default {
type: "text",
},
yq: {
type: "instrument",
type: "yq",
fillType: "actFill",
},
text2: {

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

@ -21,7 +21,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
type:"text",
},
yq:{
type:"instrument",
type:"yq",
fillType:"actFill",
},
text2:{

+ 2
- 2
src/components/Template/StepComponents/ry/rs.vue View File

@ -25,7 +25,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill",
},
yq:{
type:"instrument",
type:"yq",
fillType:"actFill",
},
text2:{
@ -78,7 +78,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill",
},
yjsj:{
type:"regent",
type:"sj",
fillType:"actFill",
ylCode: "sjtj2",
dwCode: "sjtjdw1",

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

@ -21,7 +21,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
type:"text",
},
yq:{
type:"instrument",
type:"yq",
fillType:"actFill",
},
text2:{

+ 3
- 3
src/components/Template/StepComponents/ry/tjphcz.vue View File

@ -21,7 +21,7 @@ export default {
type: "text",
},
yq: {
type: "instrument",
type: "yq",
fillType: "actFill",
},
text2: {
@ -41,7 +41,7 @@ export default {
fillType: "preFill",
},
sj1: {
type: "regent",
type: "sj",
fillType: "actFill",
ylCode: "sjjrl",
dwCode: "sjjrldw",
@ -70,7 +70,7 @@ export default {
fillType: "preFill",
},
sj2: {
type: "regent",
type: "sj",
fillType: "actFill",
ylCode: "sjjrl1",
dwCode: "sjjrldw1",

+ 3
- 3
src/components/Template/StepComponents/ry/tjphfcz.vue View File

@ -21,7 +21,7 @@ export default {
type: "text",
},
yq: {
type: "instrument",
type: "yq",
fillType: "actFill",
},
text2: {
@ -41,7 +41,7 @@ export default {
fillType: "preFill",
},
sj1: {
type: "regent",
type: "sj",
fillType: "actFill",
ylCode: "sjjrl",
dwCode: "sjjrldw",
@ -70,7 +70,7 @@ export default {
fillType: "preFill",
},
sj2: {
type: "regent",
type: "sj",
fillType: "actFill",
ylCode: "sjjrl1",
dwCode: "sjjrldw1",

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

@ -24,7 +24,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
type:"text",
},
ddsys:{
type:"instrument",
type:"yq",
fillType:"actFill",
},
text2:{

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

@ -22,7 +22,7 @@ export default {
type: "text",
},
ddsys: {
type: "instrument",
type: "yq",
fillType: "actFill",
},
}

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

@ -21,7 +21,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
type:"text",
},
yq1:{
type:"instrument",
type:"yq",
fillType:"actFill",
},
text2:{

+ 2
- 2
src/components/Template/StepComponents/ry/ym.vue View File

@ -33,7 +33,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill",
},
yq:{
type:"instrument",
type:"yq",
fillType:"actFill",
},
text3:{
@ -45,7 +45,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill",
},
sj:{
type:"regent",
type:"sj",
fillType:"actFill",
ylCode: "ry3",
dwCode: "sjrytjdw",

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

@ -21,7 +21,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
type:"text",
},
yq:{
type:"instrument",
type:"yq",
fillType:"actFill",
},
text2:{

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

@ -25,7 +25,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill",
},
yq1:{
type:"instrument",
type:"yq",
fillType:"actFill",
},
text2:{

+ 30
- 14
src/components/Template/StepFormPackage.vue View File

@ -34,11 +34,12 @@
:item="getButtonItem(sItem)"
@clickButton="(e)=>handleClickButton(e,item)" />
</template>
<!-- 仪器instrumentregent(药剂) gsp(供试品) mix药剂/供试品/给药制剂 -->
<template v-else-if="sItem.type === 'instrument' || sItem.type === 'regent' || sItem.type === 'gsp' || sItem.type === 'mix' || sItem.type === 'xb'">
<!-- 仪器instrumentsj(药剂) gsp(供试品) mix药剂/供试品/给药制剂 -->
<template v-else-if="isRegent(sItem)">
<HandleFormItem class="step-row" :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key"
type="clickable" @clickable="handleClickInstrument(key,sItem.type)" :error="errors[key]"
@update:error="errors[key] = false" @resetRecord="resetRecord(key)" :item="getClickableItem(sItem)"
:type="sItem.type" :error="errors[key]"
@onRegentSubmit="(data)=>onRegentSubmit(data,key,sItem)"
@update:error="errors[key] = false" :item="getRegentItem(sItem)"
:value="formFields[key]" />
</template>
<template v-else-if="sItem.type === 'text'">
@ -71,7 +72,7 @@ import formPackageMixins from '@/components/Template/mixins/formPackageMixins.js
import ZLSubPackage from '@/components/Template/StepComponents/ZLSubPackage.vue'
import { isShowOther } from "@/utils/formPackageCommon.js";
import { EventBus } from "@/utils/eventBus";
import { getuuid } from "@/utils/index.js";
import { getuuid,isRegent} from "@/utils/index.js";
import moment from 'moment'
export default {
inject: ['templateFillType','templateData'],
@ -101,13 +102,13 @@ export default {
},
mounted() {
EventBus.$on("onReagentSubmit",this.onReagentSubmit)
EventBus.$on("onInstrumentSubmit",this.onInstrumentSubmit)
EventBus.$on("onMixReagentSubmit",this.onMixReagentSubmit)
// EventBus.$on("onInstrumentSubmit",this.onInstrumentSubmit)
// EventBus.$on("onMixReagentSubmit",this.onMixReagentSubmit)
},
unmounted() {
EventBus.$off("onReagentSubmit",this.onReagentSubmit)
EventBus.$off("onInstrumentSubmit",this.onInstrumentSubmit)
EventBus.$off("onMixReagentSubmit",this.onMixReagentSubmit)
// EventBus.$off("onInstrumentSubmit",this.onInstrumentSubmit)
// EventBus.$off("onMixReagentSubmit",this.onMixReagentSubmit)
},
data() {
return {
@ -118,9 +119,24 @@ export default {
isShowOther,
currentClickKey: "",//key
uuid:getuuid(),
isRegent,
}
},
methods: {
// ///
// onRegentSubmit(data,key,item){
// this.updateFormData(key,data.selectedId);
// this.$emit("onRegentSubmit", {selectInfo:data,key,config:item});
// },
getRegentItem(item,fieldCode="type"){
const type = item[fieldCode] ;
return {
label: "",
type,
fillType: item.subFillType || item.fillType,
parentLabel: item.label,
}
},
updateZlfzData(key,data){
const ref = this.$refs[`zlSubPackageRef_${key}`][0];
if(ref){
@ -163,7 +179,7 @@ export default {
const sjResource = [],yqResource = [];
for(const key in allFieldsConfig){
const item = allFieldsConfig[key];
if(item.type === "xb" || item.type === "regent" || item.type === "gsp" || item.type === "mix"){
if(item.type === "xb" || item.type === "sj" || item.type === "gsp" || item.type === "mix"){
if(formFields[key]){
let o = {
...formFields[`selectInfo_${key}`],
@ -177,7 +193,7 @@ export default {
}
sjResource.push(o);
}
}else if(item.type === "instrument"){
}else if(item.type === "yq"){
if(formFields[key]){
yqResource.push({
type:item.type,
@ -235,13 +251,13 @@ export default {
getClickableItem(sItem) {
return {
...sItem,
type:"clickable",
type:sItem.type,
}
},
handleClickInstrument(key,type) {
this.currentClickKey = key;
if(type === 'regent'){//
if(type === 'sj'){//
EventBus.$emit("showSelectMixReagentDialog",{
studyFormId:this.templateData.id,
uuid:this.uuid,
@ -291,7 +307,7 @@ export default {
sourceFrom:'step',
type:"11",
})
}else if(type === 'instrument'){
}else if(type === 'yq'){
EventBus.$emit("showSelectInstrumentDialog",{
studyFormId:this.templateData.id,
uuid:this.uuid,

+ 3
- 2
src/components/Template/mixins/formPackageMixins.js View File

@ -46,6 +46,9 @@ export default {
},
methods: {
onSelectChange(){
},
//试剂/仪器等弹窗提交
onRegentSubmit(data,key,item){
this.updateFormData(key,data.selectedId);
@ -219,7 +222,6 @@ export default {
selectInfoKeys.forEach(key => {
result[key] = formData[key];
})
console.log(result,"result")
// 更新表单字段
this.formFields = result;
this.allFieldsConfig = config;
@ -257,7 +259,6 @@ export default {
const errors = [];
// 清空之前的错误状态
this.errors = {};
console.log(allFieldsConfig,formFields,"allFieldsConfig")
for (const key in allFieldsConfig) {
const o = allFieldsConfig[key];
if (o.otherCode) {//

+ 12
- 8
src/views/business/comps/template/comps/sp/SP003.vue View File

@ -297,6 +297,7 @@ export default {
bodyPrecisionKey: "targetStartSolutionVolumePrecision",
bodyMaxlength: 10,
bodySubPlaceholder: "template.common.xswsPlaceholder",
headerSelectTo: "actStartSolutionVolumeUnit",
},
{
label: "template.sp.sp003.sjqsrytj",
@ -330,6 +331,7 @@ export default {
bodyPrecisionKey: "targetDiluentVolumePrecision",
bodyMaxlength: 10,
bodySubPlaceholder: "请输入保留小数位数",
headerSelectTo: "actDiluentVolumeUnit",
},
{
label: "template.sp.sp003.sjxsytj",
@ -348,20 +350,21 @@ export default {
{
label: "template.sp.sp003.ysmbrynd",
prop: "targetSolutionConcentration",
width: 180,
showWidth: 100,
width: 210,
showWidth: 120,
headerSelectKey: "targetSolutionConcentrationUnit",
fillType: "preFill",
headerOptions: this.getDictOptions('business_nddw'),
bodyType: "inputNumber",
bodyFillType: "preFill",
bodyMaxlength: 10,
headerSelectTo:"actSolutionConcentrationUnit",
},
{
label: "template.sp.sp003.sjmbrynd",
prop: "actSolutionConcentration",
width: 190,
showWidth: 100,
width: 210,
showWidth: 120,
headerSelectKey: "actSolutionConcentrationUnit",
fillType: "preFill",
headerOptions: this.getDictOptions('business_nddw'),
@ -380,20 +383,21 @@ export default {
{
label: "template.sp.sp003.ysmbrytj",
prop: "targetSolutionVolume",
width: 180,
showWidth: 100,
width: 200,
showWidth: 120,
headerSelectKey: "targetSolutionVolumeUnit",
fillType: "preFill",
headerOptions: this.getDictOptions('business_tjdw'),
bodyType: "inputNumber",
bodyFillType: "preFill",
bodyMaxlength: 10,
headerSelectTo:"actSolutionVolumeUnit",
},
{
label: "template.sp.sp003.sjmbrytj",
prop: "actSolutionVolume",
width: 180,
showWidth: 100,
width: 200,
showWidth: 120,
headerSelectKey: "actSolutionVolumeUnit",
fillType: "preFill",
headerOptions: this.getDictOptions('business_tjdw'),

+ 10
- 6
src/views/business/comps/template/mixins/templateMixin.js View File

@ -358,8 +358,10 @@ export default {
const volume =
this.$refs.stepFormPackageRef?.getFormDataByKey(
'targetStartSolution'
) || 0
if (volume) {
)
if(isValueEmpty(volume)){
this.$message.error('请先选择预设起始源溶液浓度')
}else{
this.updateTargetStartSolutionVolume(item, volume)
}
} else if (
@ -368,9 +370,12 @@ export default {
) {
//实际起始溶液体积和实际目标溶液体积
const targetAcSolution =
this.$refs.stepFormPackageRef?.getFormDataByKey('targetAcSolution') ||
0 //获取实际起始溶液浓度
if (targetAcSolution) {
this.$refs.stepFormPackageRef?.getFormDataByKey('targetAcSolution') //获取实际起始溶液浓度
console.log(targetAcSolution,"targetAcSolution")
if(isValueEmpty(targetAcSolution)){
this.$message.error('请先选择起始源溶液')
return
}else {
const volResult = this.updateSjmbrynd(item, targetAcSolution);
if(!volResult){
return
@ -413,7 +418,6 @@ export default {
},
//更新起始溶液体积时,计算目标溶液预计浓度
updateTargetStartSolutionVolume(item, volume) {
debugger
const precision = item.targetStartSolutionVolumePrecision || 0
const concentration = item.targetSolutionConcentration || 0
const targetVolume = item.targetSolutionVolume || 0

Loading…
Cancel
Save