Browse Source

feat:[模板管理][update]

luojie
luojie 6 days ago
parent
commit
e35f6785b6
6 changed files with 261 additions and 11 deletions
  1. +2
    -1
      src/lang/en/template/gsp.js
  2. +4
    -0
      src/lang/en/template/sp.js
  3. +2
    -1
      src/lang/zh/template/gsp.js
  4. +4
    -0
      src/lang/zh/template/sp.js
  5. +21
    -7
      src/views/business/comps/template/comps/sp/SP00456.vue
  6. +228
    -2
      src/views/business/comps/template/formConfig/paralleAndLadderConfig.js

+ 2
- 1
src/lang/en/template/gsp.js View File

@ -40,7 +40,8 @@ export default {
},
GSP003: {
calcConditionLabel: '计算公式',
sfxyzjfx: '是否需要制剂分析'
sfxyzjfx: '是否需要制剂分析',
dztp: '电子天平',
},
GSP005: {
xzzl: '新增质量',

+ 4
- 0
src/lang/en/template/sp.js View File

@ -40,6 +40,10 @@ export default {
sjmbrytj: 'Actual Volume of Target Solution',
mbryyxzq: 'Validity Period of Target Solution',
mbrysxr: 'Expiration Date of Target Solution',
ysyybh:"预设原药编号",
sjyybh:"实际原药编号",
ysyyzl:"预设原药质量",
sjyyzl:"实际原药质量",
ysysrybh: '预设原始溶液编号',
sjysrybh: '实际原始溶液编号',
ysysrynd: '预设原始溶液浓度',

+ 2
- 1
src/lang/zh/template/gsp.js View File

@ -40,7 +40,8 @@ export default {
},
GSP003: {
calcConditionLabel: '计算公式',
sfxyzjfx: '是否需要制剂分析'
sfxyzjfx: '是否需要制剂分析',
dztp: '电子天平',
},
GSP005: {
xzzl: '新增质量',

+ 4
- 0
src/lang/zh/template/sp.js View File

@ -40,6 +40,10 @@ export default {
sjmbrytj: '实际目标溶液体积',
mbryyxzq: '目标溶液有效周期',
mbrysxr: '目标溶液失效日',
ysyybh:"预设原药编号",
sjyybh:"实际原药编号",
ysyyzl:"预设原药质量",
sjyyzl:"实际原药质量",
ysysrybh: '预设原始溶液编号',
sjysrybh: '实际原始溶液编号',
ysysrynd: '预设原始溶液浓度',

+ 21
- 7
src/views/business/comps/template/comps/sp/SP00456.vue View File

@ -61,11 +61,11 @@
<!-- 质量平行配制区域 -->
<div v-for="(paralleConfig, paralleIndex) in formData.paralleMassConfigs"
:key="'zl_paralle_' + paralleConfig.id">
<LadderConfig :currentFormConfig="paralleStepFormConfig" :currentFormData="paralleConfig"
<LadderConfig :currentFormConfig="paralleMassStepFormConfig" :currentFormData="paralleConfig"
:showOperation="fillType === 'actFill' || fillType === 'preFill'"
:tableColumns="paralleStepColumns" :prefixKey="'zl_paralle_' + paralleIndex"
:configType="'paralle'" :ref="`zl_paralleRef_${paralleIndex}`"
:fieldItemLabel="getTableLabel('zl_paralle')" :showHeader="!isPcr234"
:tableColumns="paralleMassStepColumns" :prefixKey="'zl_paralle_' + paralleIndex"
:configType="'paralleMass'" :ref="`paralleMassRef_${paralleIndex}`"
:fieldItemLabel="getTableLabel('paralleMass')" :showHeader="!isPcr234"
@deleteConfig="deleteConfig('paralleMassConfigs', paralleConfig)" :fillType="fillType" />
</div>
<!-- 平行配制区域 -->
@ -136,10 +136,10 @@ import { isCommonUnit } from "@/utils/conTools";
import { addTj, uniqeResource, uniqeResourceOne, addDecimals } from "@/utils/calUnitTools";
import {
getLadderColumnsConfig, getParallelColumnsConfig, getLadderFormConfig,
getBaseInfoFormConfig, getRemarkFormConfig, getStorageConditionFormConfig, getParalleStepFormConfig, getJcbColumnsConfig
getBaseInfoFormConfig, getRemarkFormConfig, getStorageConditionFormConfig, getParalleStepFormConfig, getJcbColumnsConfig,getParalleMassStepFormConfig,getParallelMassColumnsConfig
} from "../../formConfig/paralleAndLadderConfig.js";
import LadderConfig from "@/views/business/comps/template/comps/sp/comps/LadderConfig.vue";
const configTyps = [
let configTyps = [
{
configType: "paralle",
ref: "paralleRef",
@ -200,6 +200,10 @@ export default {
baseInfoFormConfig() {
return getBaseInfoFormConfig(this);
},
//
paralleMassStepFormConfig() {
return getParalleMassStepFormConfig(this);
},
paralleStepFormConfig() {
return getParalleStepFormConfig(this);
},
@ -210,6 +214,9 @@ export default {
ladderStepFormConfig() {
return getLadderFormConfig(this);
},
paralleMassStepColumns() {
return getParallelMassColumnsConfig(this, this.sn);
},
paralleStepColumns() {
return getParallelColumnsConfig(this, this.sn);
},
@ -256,6 +263,13 @@ export default {
if (this.isPcr234 && !this.formData.ladderConfigs) {
this.handleAddConfig("ladderConfigs");
}
if(this.isGsp4){
configTyps.push({
configType: "paralleMass",
ref: "paralleMassRef",
configName: "paralleMassConfigs",
})
}
},
methods: {
//
@ -278,7 +292,7 @@ export default {
obj = {
"paralle": "template.common.pxpz",//
"ladder": "template.common.tdxs",//
"zl_paralle": "template.common.zlpx",//
"paralleMass": "template.common.zlpx",//
}
}
return obj[type] || '';//

+ 228
- 2
src/views/business/comps/template/formConfig/paralleAndLadderConfig.js View File

@ -472,6 +472,177 @@ export const getParallelColumnsConfig = ($this, sn) => {
}
]
}
// 平行质量配制表格列配制
export const getParallelMassColumnsConfig = ($this, sn) => {
return [
{
label: 'template.sp.sp00456.mbrybh',
prop: 'targetSolutionCode',
bodyType: 'input',
bodySubType: 'span',
bodySubKey: 'subTargetSolutionCode',
bodyFillType: 'preFill',
myCodeFields: ['targetSolutionCode', 'subTargetSolutionCode'], //分装的母液编号字段
maxVolumeField: 'actSolutionVolume', //分装的最大量字段
maxVolumeFieldUnit: 'actSolutionVolumeUnit', //分装的最大量单位字段
showWidth: 180,
width: 280
},
{
label: 'template.sp.sp00456.ysmbrynd',
prop: 'ysmbrynd',
width: 280,
showWidth: 120,
headerSelectKey: 'ysmbrynddw',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_nddw'),
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10,
headerSelectTo: 'sjmbrynddw'
},
{
label: 'template.sp.sp00456.sjmbrynd',
prop: 'sjmbrynd',
width: 280,
showWidth: 120,
headerSelectKey: 'sjmbrynddw',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_nddw'),
bodyDisabled: true,
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
bodySubPlaceholder: 'template.common.xswsPlaceholder',
compareTo: 'ysmbrynd' //比较哪个字段
},
{
label: 'template.sp.sp00456.ysmbrytj',
prop: 'ysmbrytj',
width: 280,
showWidth: 120,
headerSelectKey: 'ysmbrytjdw',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10,
headerSelectTo: 'sjmbrytjdw'
},
{
label: 'template.sp.sp00456.sjmbrytj',
prop: 'sjmbrytj',
width: 280,
showWidth: 120,
headerSelectKey: 'sjmbrytjdw',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
bodySubPlaceholder: 'template.common.xswsPlaceholder',
compareTo: 'ysmbrytj' //比较哪个字段
},
{
label: 'template.sp.sp00456.mbryyxzq',
prop: 'targetSolutionCycle',
width: 280,
showWidth: 160,
fillType: 'preFill',
bodyType: 'inputNumber',
bodySubType: 'select',
showBodySub: true,
bodySubKey: 'targetSolutionCyclePrecision',
bodySubOptions: $this.getDictOptions('business_yxqdw'),
bodyFillType: 'preFill',
bodySubFillType: 'preFill',
bodyMaxlength: 10
},
{
label: 'template.sp.sp00456.mbrysxr',
prop: 'targetSolutionExpirationDate',
showWidth: 120,
width: 180,
bodyType: 'span'
},
{
label: 'template.sp.sp00456.ysyybh',
prop: 'ysyybh',
width: 280,
showWidth: 120,
bodyType: 'input',
bodyFillType: 'preFill'
},
{
label: 'template.sp.sp00456.sjyybh',
prop: 'sjyybh',
width: 280,
showWidth: 180,
bodyType: 'input',
bodyFillType: 'actFill',
copyFrom: 'ysyybh',
compareTo: 'ysyybh' //比较哪个字段
},
{
label: 'template.sp.sp00456.ysyyzl',
prop: 'ysyyzl',
headerSelectKey: 'ysyyzldw',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_zldw'),
width: 280,
showWidth: 160,
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10,
headerSelectTo: 'sjyyzldw'
},
{
label: 'template.sp.sp00456.sjyyzl',
prop: 'sjyyzl',
fillType: 'preFill',
headerSelectKey: 'sjyyzldw',
headerOptions: $this.getDictOptions('business_zldw'),
width: 280,
showWidth: 120,
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyDisabled: true,
compareTo: 'ysyyzl', //比较哪个字段
bodySubKey: 'ysyyzlButton',
bodySubType: 'button',
bodySubButtonName:"获取值",
bodySubFillType: 'actFill',
},
{
label: 'template.sp.sp00456.yjxsytj',
prop: 'yjxsytj',
headerSelectKey: 'yjxsytjdw',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
width: 280,
showWidth: 120,
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10,
headerSelectTo: 'sjxsytjdw'
},
{
label: 'template.sp.sp00456.sjxsytj',
prop: 'sjxsytj',
headerSelectKey: 'sjxsytjdw',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
width: 280,
showWidth: 120,
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
copyFrom: 'yjxsytj',
compareTo: 'yjxsytj' //比较哪个字段
}
]
}
//阶梯配制
export const getLadderFormConfig = ($this) => {
@ -545,8 +716,8 @@ export const getLadderFormConfig = ($this) => {
]
if (sn === 'LBA007' || sn === 'ADA007') {
defaultConfig.unshift(explainConfig)
}else if (sn === 'GSP004') {
defaultConfig[0].config = {...gsp4config1,...defaultConfig[0].config, }
} else if (sn === 'GSP004') {
defaultConfig[0].config = { ...gsp4config1, ...defaultConfig[0].config, }
}
return defaultConfig
}
@ -741,7 +912,62 @@ export const getParalleStepFormConfig = ($this) => {
const sn = $this.sn
if (sn === 'LBA007' || sn === 'ADA007') {
defaultConfig.unshift(explainConfig)
} else if (sn === 'GSP004') {
defaultConfig[0].config = { ...gsp4config1, ...defaultConfig[0].config, }
}
return defaultConfig
}
//平行质量配制
export const getParalleMassStepFormConfig = ($this) => {
const defaultConfig = [
{
type: 'step',
config: {
jsgs: {
label: 'template.gsp.GSP003.calcConditionLabel',
type: 'input',
fillType: 'preFill',
span:1,
maxlength: 50
},
sfxyzjfx: {
label: 'template.gsp.GSP003.sfxyzjfx',
type: "select",
fillType: "actFill",
options: [
{ label: '是', value: '是' },
{ label: '否', value: '否' }
]
},
dztp:{
label: 'template.gsp.GSP003.dztp',
type: 'yq',
fillType: 'actFill',
},
xsy: {
label: 'template.sp.sp00456.xsy',
labelWidth: 80,
type: 'input',
fillType: 'preFill',
subType: 'sj',
subKey: 'subSolution',
subFillType: 'actFill',
maxlength: 20
},
cctj: {
label: 'template.sp.sp00456.cctj',
labelWidth: 80,
type: 'select',
fillType: 'preFill',
options: $this.getDictOptions('business_cctj'),
multiple: true,
otherCode: 'paralleStepStorageConditionOther'
}
}
}
]
return defaultConfig
}

Loading…
Cancel
Save