Browse Source

fix:[模板管理]GSP005

ouqian
15881625488@163.com 1 month ago
parent
commit
d9198178a4
3 changed files with 383 additions and 19 deletions
  1. +26
    -0
      src/lang/en/template/gsp.js
  2. +26
    -0
      src/lang/zh/template/gsp.js
  3. +331
    -19
      src/views/business/comps/template/comps/gsp/GSP005.vue

+ 26
- 0
src/lang/en/template/gsp.js View File

@ -42,6 +42,32 @@ export default {
calcConditionLabel: '计算公式',
sfxyzjfx: '是否需要制剂分析'
},
GSP005: {
xzzl: '新增质量',
xzry: '新增溶液',
zl: '质量',
ry: '溶液',
jspz:'结束配置',
kspz:'开始配置',
pzkssj:'配置开始时间',
pzjssj:'配置结束时间',
sywzbhph:'试验物质编号/批号',
yrybhph:'源溶液编号/批号',
yrymc:'源溶液名称',
yryyjtj:'源溶液预计体积',
yrysjtj:'源溶液实际体积',
yryyjnd:'源溶液预计浓度',
yrysjnd:'源溶液实际浓度',
yryxs:'源溶液系数',
sywzmc:'试验物资名称',
sywzzsxs:'试验物资折射系数',
sywzyjclz:'试验物质预计称量值',
sywzsjclz:'试验物质实际称量值',
rjbhph:'溶剂编号/批号',
rjmc:'溶剂名称',
rjyjtj:'溶剂预计体积',
rjsjtj:'溶剂实际体积',
},
gsp009: {
xtsyx: '系统适应性',
ypbh: '样品编号',

+ 26
- 0
src/lang/zh/template/gsp.js View File

@ -42,6 +42,32 @@ export default {
calcConditionLabel: '计算公式',
sfxyzjfx: '是否需要制剂分析'
},
GSP005: {
xzzl: '新增质量',
xzry: '新增溶液',
zl: '质量',
ry: '溶液',
jspz:'结束配置',
kspz:'开始配置',
pzkssj:'配置开始时间',
pzjssj:'配置结束时间',
sywzbhph:'试验物质编号/批号',
yrybhph:'源溶液编号/批号',
yrymc:'源溶液名称',
yryyjtj:'源溶液预计体积',
yrysjtj:'源溶液实际体积',
yryyjnd:'源溶液预计浓度',
yrysjnd:'源溶液实际浓度',
yryxs:'源溶液系数',
sywzmc:'试验物资名称',
sywzzsxs:'试验物资折射系数',
sywzyjclz:'试验物质预计称量值',
sywzsjclz:'试验物质实际称量值',
rjbhph:'溶剂编号/批号',
rjmc:'溶剂名称',
rjyjtj:'溶剂预计体积',
rjsjtj:'溶剂实际体积',
},
gsp009: {
xtsyx: '系统适应性',
ypbh: '样品编号',

+ 331
- 19
src/views/business/comps/template/comps/gsp/GSP005.vue View File

@ -14,31 +14,64 @@
<TableList label="template.common.sjInfo" :columns="sjColumns" :dataSource="resourceSj" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<div class="config-header-right">
<el-button v-if="fillType === 'preFill'" type="primary" @click="handleAddFormConfig">{{
$t('template.common.xzzl') }}</el-button>
<el-button v-if="fillType === 'preFill'" type="primary" @click="handleAddFormConfig">{{
$t('template.common.xzry') }}</el-button>
<div class="template-form-item" v-ifan class="s">="fillType === 'preFill'">
<div class="config-header-left">
<el-button type="primary" @click="handleAddFormZlConfig">{{ $t('template.gsp.GSP005.xzzl')
}}</el-button>
<el-button type="primary" @click="handleAddFormRyConfig">{{ $t('template.gsp.GSP005.xzry')
}}</el-button>
</div>
</div>
<!-- 质量 -->
<div v-for="(formzlConfig, ladderIndex) in formData.formZlConfigs" :key="'ladder_' + ladderIndex">
<div v-for="(formzlConfig, zlIndex) in formData.formZlConfigs" :key="'zl_' + zlIndex">
<div class="template-form-item">
<div class="config-header-left">
{{ $t('template.gsp.GSP005.zl') }}
</div>
<div class="config-header-right">
<el-button v-if="fillType === 'preFill' && formData.formZlConfigs.length > 1"
type="danger" @click="handleDeleteFormZlConfig(ladderIndex)">{{
<el-button v-if="fillType === 'preFill'" type="danger"
@click="handleDeleteFormZlConfig(zlIndex)">{{
$t('template.common.deleteBtn')
}}</el-button>
<el-button class="print-btn" v-if="fillType === 'actFill'" type="primary"
@click="printTag">{{ $t('template.gsp.GSP005.kspz') }}</el-button>
<el-button class="print-btn" v-if="fillType === 'actFill'" type="primary"
@click="printTag">{{ $t('template.common.bqdy') }}</el-button>
</div>
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps"
:ref="`formZlConfigFormPackageRef_${ladderIndex}`" :formConfig="formZlConfig"
:ref="`formZlConfigFormPackageRef_${zlIndex}`" :formConfig="formZlConfig"
:formData="formzlConfig" />
<Step class="mt-0 s-container" :ref="`formStepRef_${ladderIndex}`"
<Step class="mt-0 s-container" :ref="`formZlStepRef_${zlIndex}`"
:formData="formzlConfig.stepData" :fieldItemLabel="$t('template.common.jtpz')"
:prefixKey="'form_' + ladderIndex"></Step>
:prefixKey="'form_' + zlIndex"></Step>
<el-button class="print-btn" v-if="fillType === 'actFill'" type="primary"
@click="printTag">{{ $t('template.gsp.GSP005.jspz') }}</el-button>
</div>
</div>
<!-- 溶液 -->
<div v-for="(formryConfig, ryIndex) in formData.formRyConfigs" :key="'ry_' + ryIndex">
<div class="template-form-item">
<div class="config-header-left">
{{ $t('template.gsp.GSP005.ry') }}
</div>
<div class="config-header-right">
<el-button v-if="fillType === 'preFill'" type="danger"
@click="handleDeleteFormRyConfig(ryIndex)">{{
$t('template.common.deleteBtn')
}}</el-button>
<el-button class="print-btn" v-if="fillType === 'actFill'" type="primary"
@click="printTag">{{ $t('template.gsp.GSP005.kspz') }}</el-button>
<el-button class="print-btn" v-if="fillType === 'actFill'" type="primary"
@click="printTag">{{ $t('template.common.bqdy') }}</el-button>
</div>
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps"
:ref="`formRyConfigFormPackageRef_${ryIndex}`" :formConfig="formRyConfig"
:formData="formryConfig" />
<Step class="mt-0 s-container" :ref="`formRyStepRef_${ryIndex}`"
:formData="formryConfig.stepData" :fieldItemLabel="$t('template.common.jtpz')"
:prefixKey="'form_' + ryIndex"></Step>
<el-button class="print-btn" v-if="fillType === 'actFill'" type="primary"
@click="printTag">{{ $t('template.gsp.GSP005.jspz') }}</el-button>
</div>
</div>
<!-- 备注 -->
@ -241,6 +274,20 @@ export default {
label: 'template.common.expireDate',
type: "input",
},
pzkssj: {
label: 'template.gsp.GSP005.pzkssj',
type: "input",
bodyDisabled: true,
fillType: "actFill",
maxlength: 20
},
pzjssj: {
label: 'template.gsp.GSP005.pzjssj',
type: "input",
bodyDisabled: true,
fillType: "actFill",
maxlength: 20
},
storageCondition: {
label: 'template.common.storageConditionLabel',
type: "select",
@ -248,6 +295,84 @@ export default {
options: this.getDictOptions("business_cctj"),
otherCode: "storageConditionOther",
},
sywzbhph: {
label: 'template.gsp.GSP005.sywzbhph',
type: "input",
subType: "input",
subKey: "sywzbhphSub",
fillType: "preFill",
subFillType: "actFill",
maxlength: 20,
},
sywzmc: {
label: 'template.gsp.GSP005.sywzmc',
type: "input",
subType: "input",
subKey: "sywzmcSub",
fillType: "preFill",
subFillType: "actFill",
maxlength: 20,
},
sywzzsxs: {
label: 'template.gsp.GSP005.sywzzsxs',
type: "input",
fillType: "preFill",
maxlength: 20,
},
sywzyjclz: {
label: 'template.gsp.GSP005.sywzyjclz',
type: "inputNumber",
subType: "select",
subKey: "sywzyjclzUnit",
fillType: "preFill",
subOptions: this.getDictOptions('business_zldw'),
maxlength: 10
},
sywzsjclz: {
label: 'template.gsp.GSP005.sywzsjclz',
type: "inputNumber",
subType: "select",
subKey: "sywzsjclzUnit",
fillType: "actFill",
subFillType: "preFill",
subOptions: this.getDictOptions('business_zldw'),
maxlength: 10
},
rjbhph: {
label: 'template.gsp.GSP005.rjbhph',
type: "input",
fillType: "preFill",
subType: 'mix',
subKey: 'rjbhphSub',
subFillType: 'actFill',
maxlength: 20,
},
rjmc: {
label: 'template.gsp.GSP005.rjmc',
type: "input",
fillType: "actFill",
maxlength: 50,
},
rjyjtj: {
label: 'template.gsp.GSP005.rjyjtj',
type: "inputNumber",
subType: "select",
subKey: "rjyjtjUnit",
fillType: "preFill",
subFillType: "preFill",
subOptions: this.getDictOptions('business_tjdw'),
maxlength: 10
},
rjsjtj: {
label: 'template.gsp.GSP005.rjsjtj',
type: "inputNumber",
subType: "select",
subKey: "rjsjtjUnit",
fillType: "actFill",
subFillType: "preFill",
subOptions: this.getDictOptions('business_tjdw'),
maxlength: 10
},
}
}
]
@ -329,6 +454,20 @@ export default {
label: 'template.common.expireDate',
type: "input",
},
pzkssj: {
label: 'template.gsp.GSP005.pzkssj',
type: "input",
bodyDisabled: true,
fillType: "actFill",
maxlength: 20
},
pzjssj: {
label: 'template.gsp.GSP005.pzjssj',
type: "input",
bodyDisabled: true,
fillType: "actFill",
maxlength: 20
},
storageCondition: {
label: 'template.common.storageConditionLabel',
type: "select",
@ -336,6 +475,105 @@ export default {
options: this.getDictOptions("business_cctj"),
otherCode: "storageConditionOther",
},
yrybhph: {
label: 'template.gsp.GSP005.yrybhph',
type: "input",
subType: "input",
subKey: "yrybhphSub",
fillType: "preFill",
subFillType: "actFill",
maxlength: 20,
},
yrymc: {
label: 'template.gsp.GSP005.yrymc',
type: "input",
subType: "input",
subKey: "yrymcSub",
fillType: "preFill",
subFillType: "actFill",
maxlength: 20,
},
yryyjtj: {
label: 'template.gsp.GSP005.yryyjtj',
type: "inputNumber",
subType: "select",
subKey: "yryyjtjUnit",
fillType: "preFill",
subFillType: "preFill",
subOptions: this.getDictOptions('business_tjdw'),
maxlength: 10
},
yrysjtj: {
label: 'template.gsp.GSP005.yrysjtj',
type: "inputNumber",
subType: "select",
subKey: "yrysjtjUnit",
fillType: "actFill",
subFillType: "preFill",
subOptions: this.getDictOptions('business_tjdw'),
maxlength: 10
},
yryyjnd: {
label: 'template.gsp.GSP005.yryyjnd',
type: "inputNumber",
subType: "select",
subKey: "yryyjndUnit",
fillType: "preFill",
subFillType: "preFill",
subOptions: this.getDictOptions('business_nddw'),
maxlength: 10
},
yrysjnd: {
label: 'template.gsp.GSP005.yrysjnd',
type: "inputNumber",
subType: "select",
subKey: "yrysjndUnit",
fillType: "actFill",
subFillType: "preFill",
subOptions: this.getDictOptions('business_nddw'),
maxlength: 10
},
yryxs: {
label: 'template.gsp.GSP005.yryxs',
type: "input",
fillType: "preFill",
maxlength: 20,
},
rjbhph: {
label: 'template.gsp.GSP005.rjbhph',
type: "input",
fillType: "preFill",
subType: 'mix',
subKey: 'rjbhphSub',
subFillType: 'actFill',
maxlength: 20,
},
rjmc: {
label: 'template.gsp.GSP005.rjmc',
type: "input",
fillType: "actFill",
maxlength: 50,
},
rjyjtj: {
label: 'template.gsp.GSP005.rjyjtj',
type: "inputNumber",
subType: "select",
subKey: "rjyjtjUnit",
fillType: "preFill",
subFillType: "preFill",
subOptions: this.getDictOptions('business_tjdw'),
maxlength: 10
},
rjsjtj: {
label: 'template.gsp.GSP005.rjsjtj',
type: "inputNumber",
subType: "select",
subKey: "rjsjtjUnit",
fillType: "actFill",
subFillType: "preFill",
subOptions: this.getDictOptions('business_tjdw'),
maxlength: 10
},
}
}
]
@ -357,6 +595,12 @@ export default {
formZlConfigs: [],
});
}
if (!this.formData.formRyConfigs) {
this.$set(this.formData, 'formRyConfigs', []);
this.formData.formRyConfigs.push({
formRyConfigs: [],
});
}
}
},
methods: {
@ -397,6 +641,7 @@ export default {
},
//
getCode: debounce(async function (v) {
//
if (this.formData.formZlConfigs && this.formData.formZlConfigs.length > 0) {
for (let i = 0; i < this.formData.formZlConfigs.length; i++) {
let item = this.formData.formZlConfigs[i]
@ -410,6 +655,20 @@ export default {
}
}
}
//
if (this.formData.formRyConfigs && this.formData.formRyConfigs.length > 0) {
for (let i = 0; i < this.formData.formRyConfigs.length; i++) {
let item = this.formData.formRyConfigs[i]
const result = await getLatestSn({
count: 1,
pre: item.targetCode,
type: 1
})
if (result.code == 200) {
this.$refs[`formRyConfigFormPackageRef_${i}`][0].updateFormData("targetCodeSn", result.data[0])
}
}
}
}, 100),
//
getFilledFormData() {
@ -418,7 +677,7 @@ export default {
if (this.formData.formZlConfigs && this.formData.formZlConfigs.length > 0) {
for (let i = 0; i < this.formData.formZlConfigs.length; i++) {
const formData = this.$refs[`formZlConfigFormPackageRef_${i}`][0].getFilledFormData();
const stepData = this.$refs[`formStepRef_${i}`][0].getFilledFormData();
const stepData = this.$refs[`formZlStepRef_${i}`][0].getFilledFormData();
if (this.formData.startDate && formData.effectivePeriod && formData.effectivePeriodUnit) {
formData.expireDate = getExpireDate(this.formData.startDate, formData.effectivePeriod, formData.effectivePeriodUnit)
}
@ -428,10 +687,25 @@ export default {
});
}
}
const formRyConfigsData = [];
if (this.formData.formRyConfigs && this.formData.formRyConfigs.length > 0) {
for (let i = 0; i < this.formData.formRyConfigs.length; i++) {
const formData = this.$refs[`formRyConfigFormPackageRef_${i}`][0].getFilledFormData();
const stepData = this.$refs[`formRyStepRef_${i}`][0].getFilledFormData();
if (this.formData.startDate && formData.effectivePeriod && formData.effectivePeriodUnit) {
formData.expireDate = getExpireDate(this.formData.startDate, formData.effectivePeriod, formData.effectivePeriodUnit)
}
formRyConfigsData.push({
...formData,
...stepData,
});
}
}
const remarkData = this.$refs.remarkRef.getFilledFormData();
return {
...baseData,
formZlConfigs: formZlConfigsData,
formRyConfigs: formRyConfigsData,
...remarkData
}
},
@ -443,7 +717,14 @@ export default {
if (this.formData.formZlConfigs && this.formData.formZlConfigs.length > 0) {
for (let i = 0; i < this.formData.formZlConfigs.length; i++) {
refsToValidate.push(`formZlConfigFormPackageRef_${i}`);
refsToValidate.push(`formStepRef_${i}`);
refsToValidate.push(`formZlStepRef_${i}`);
}
}
if (this.formData.formRyConfigs && this.formData.formRyConfigs.length > 0) {
for (let i = 0; i < this.formData.formRyConfigs.length; i++) {
refsToValidate.push(`formRyConfigFormPackageRef_${i}`);
refsToValidate.push(`formRyStepRef_${i}`);
}
}
@ -465,10 +746,34 @@ export default {
//resource
let tmpResource = []
if (this.fillType === "actFill") {
let tableList = content.formZlConfigs
if (tableList && tableList.length > 0) {
for (let i = 0; i < tableList.length; i++) {
let item = tableList[i]
let tableListZl = content.formZlConfigs
if (tableListZl && tableListZl.length > 0) {
for (let i = 0; i < tableListZl.length; i++) {
let item = tableListZl[i]
tmpResource.push({
mc: item.targetName,
bh: item.targetCode + item.targetCodeSn,
ph: '',
ndz: item.targetActConcentration + item.targetActConcentrationUnit,
nd: item.targetActConcentration,
nddw: item.targetActConcentrationUnit,
ly: 'ELN配制',
sxrq: item.expireDate,
kc: item.targetActVolume,
kcdw: item.targetActVolumeUnit,
syl: null,
type: null,
elnType: this.product,
syldw: item.targetActVolumeUnit,
yxzq: item.effectivePeriod,
yxzqdw: item.effectivePeriodUnit,
})
}
}
let tableListRy = content.formRyConfigs
if (tableListRy && tableListRy.length > 0) {
for (let i = 0; i < tableListRy.length; i++) {
let item = tableListRy[i]
tmpResource.push({
mc: item.targetName,
bh: item.targetCode + item.targetCodeSn,
@ -501,7 +806,14 @@ export default {
const sjResource = [], yqResource = [];
if (this.formData.formZlConfigs && this.formData.formZlConfigs.length > 0) {
for (let i = 0; i < this.formData.formZlConfigs.length; i++) {
const paralleResource = this.$refs[`formStepRef_${i}`][0].getStepResource();
const paralleResource = this.$refs[`formZlStepRef_${i}`][0].getStepResource();
sjResource.push(...paralleResource.sjResource);
yqResource.push(...paralleResource.yqResource);
}
}
if (this.formData.formRyConfigs && this.formData.formRyConfigs.length > 0) {
for (let i = 0; i < this.formData.formRyConfigs.length; i++) {
const paralleResource = this.$refs[`formRyStepRef_${i}`][0].getStepResource();
sjResource.push(...paralleResource.sjResource);
yqResource.push(...paralleResource.yqResource);
}

Loading…
Cancel
Save