Browse Source

feat:[模板管理][update]

lkf
luojie 1 month ago
parent
commit
5335b3aa84
2 changed files with 38 additions and 19 deletions
  1. +4
    -0
      src/views/business/comps/template/comps/sp/SP003.vue
  2. +34
    -19
      src/views/business/comps/template/comps/sp/SP00456.vue

+ 4
- 0
src/views/business/comps/template/comps/sp/SP003.vue View File

@ -307,6 +307,7 @@ export default {
showBodySub: this.fillType === "preFill",
bodyDisabled: true,
bodyPrecisionKey: "targetStartSolutionVolumePrecision",
subPrecision:0,
bodyMaxlength: 10,
bodySubPlaceholder: "template.common.xswsPlaceholder",
headerSelectTo: "actStartSolutionVolumeUnit",
@ -341,6 +342,7 @@ export default {
showBodySub: this.fillType === "preFill",
bodyDisabled: true,
bodyPrecisionKey: "targetDiluentVolumePrecision",
subPrecision:0,
bodyMaxlength: 10,
bodySubPlaceholder: "请输入保留小数位数",
headerSelectTo: "actDiluentVolumeUnit",
@ -388,6 +390,7 @@ export default {
showBodySub: this.fillType === "preFill",
bodyDisabled: true,
bodyPrecisionKey: "actSolutionConcentrationPrecision",
subPrecision:0,
bodyMaxlength: 10,
bodySubPlaceholder: "请输入保留小数位数",
compareTo: "targetSolutionConcentration",//
@ -421,6 +424,7 @@ export default {
showBodySub: this.fillType === "preFill",
bodyDisabled: true,
bodyPrecisionKey: "actSolutionVolumePrecision",
subPrecision:0,
bodyMaxlength: 10,
bodySubPlaceholder: "请输入保留小数位数",
compareTo: "targetSolutionVolume",//

+ 34
- 19
src/views/business/comps/template/comps/sp/SP00456.vue View File

@ -23,14 +23,14 @@
</div>
<!-- 阶梯配制区域 -->
<div v-for="(ladderConfig, ladderIndex) in formData.ladderConfigs" :key="'ladder_' + ladderIndex">
<div v-for="(ladderConfig, ladderIndex) in formData.ladderConfigs" :key="'ladder_' + ladderConfig.id">
<div class="template-form-item">
<div class="config-header">
<div>{{ $t('template.common.jtpz') }}</div>
<el-button v-if="fillType === 'preFill'" type="text" icon="el-icon-delete"
@click="deleteLadderConfig(ladderIndex)">{{ $t('template.common.deleteBtn')
}}</el-button>
@click="deleteConfig('ladderConfigs', ladderConfig)">{{ $t('template.common.deleteBtn')
}}</el-button>
</div>
<BaseInfoFormPackage @onRegentSubmit="(e) => onRegentSubmit('ladder', ladderIndex, e)"
@beforeReagentSubmit="(data) => onBeforeReagentSubmit(data,ladderIndex, ladderConfig)"
@ -63,16 +63,16 @@
</div>
<!-- 平行配制区域 -->
<div :label="$t('template.common.pxpz')"
v-for="(paralleConfig, paralleIndex) in formData.paralleConfigs"
:key="'paralle_' + paralleIndex">
<div :label="$t('template.common.pxpz')"
v-for="(paralleConfig, paralleIndex) in formData.paralleConfigs"
:key="'paralle_' + paralleConfig.id">
<div class="template-form-item">
<div class="config-header">
<div>{{ $t('template.common.pxpz') }}</div>
<el-button v-if="fillType === 'preFill'" type="text" icon="el-icon-delete"
@click="deleteParalleConfig(paralleIndex)">{{ $t('template.common.deleteBtn')
}}</el-button>
@click="deleteConfig('paralleConfigs', paralleConfig)">{{ $t('template.common.deleteBtn')
}}</el-button>
</div>
<BaseInfoFormPackage @clickable="(e) => handleClickable('paralle', paralleIndex, e)"
:ref="`paralleStepFormPackageRef_${paralleIndex}`" :formConfig="paralleStepFormConfig"
@ -124,6 +124,7 @@ import CustomTable from '@/components/Template/CustomTable.vue';
import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue';
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue";
import { getExpireDate, duplicateResource } from "@/utils/index.js";
import { getuuid } from "@/utils/index.js";
import { isCommonUnit } from "@/utils/conTools";
import moment from "moment";
import { addTj, uniqeResource, uniqeResourceOne, addDecimals } from "@/utils/calUnitTools";
@ -397,6 +398,7 @@ export default {
}
//
this.formData.paralleConfigs.push({
id: getuuid(),
paralleStepData: [],
paralleTableFormData: [],
showParalleConfig: true
@ -411,21 +413,30 @@ export default {
//
this.formData.ladderConfigs.push({
id: getuuid(),
ladderStepData: [],
ladderTableFormData: [],
showLadderConfig: true
});
},
//
deleteLadderConfig(index) {
this.formData.ladderConfigs.splice(index, 1);
this.$set(this.formData, 'ladderConfigs', this.formData.ladderConfigs);
},
//
deleteParalleConfig(index) {
debugger
this.formData.paralleConfigs.splice(index, 1);
this.$set(this.formData, 'paralleConfigs', this.formData.paralleConfigs);
deleteConfig(type, config) {
const configIndex = this.formData[type].findIndex(config => config.id === config.id);
if (configIndex !== -1) {
//
const newConfigs = [...this.formData[type]];
newConfigs.splice(configIndex, 1);
this.$set(this.formData, type, newConfigs);
this.$nextTick(() => {
//
const params = {
type: "fieldChanged",
newRecord: null,
resourceList: null,
}
EventBus.$emit('onModifyRecord', params,)
})
}
},
//
handleAddRow(type, rowIndex, configIndex = 0) {
@ -631,6 +642,7 @@ export default {
const ladderConfigsData = [];
if (this.formData.ladderConfigs && this.formData.ladderConfigs.length > 0) {
for (let i = 0; i < this.formData.ladderConfigs.length; i++) {
const id = this.formData.ladderConfigs[i].id;
const ladderFormData = this.$refs[`ladderStepFormPackageRef_${i}`][0].getFilledFormData();
const ladderTableFormData = this.$refs[`ladderStepTableRef_${i}`][0].getFilledFormData();
const ladderStepData = this.$refs[`ladderStepRef_${i}`][0].getFilledFormData();
@ -639,7 +651,8 @@ export default {
...ladderFormData,
...ladderTableFormData,
ladderStepData: ladderStepData.stepData,
showLadderConfig: true
showLadderConfig: true,
id
});
}
}
@ -648,6 +661,7 @@ export default {
const paralleConfigsData = [];
if (this.formData.paralleConfigs && this.formData.paralleConfigs.length > 0) {
for (let i = 0; i < this.formData.paralleConfigs.length; i++) {
const id = this.formData.paralleConfigs[i].id;
const paralleFormData = this.$refs[`paralleStepFormPackageRef_${i}`][0].getFilledFormData();
const paralleTableFormData = this.$refs[`paralleStepTableRef_${i}`][0].getFilledFormData();
const paralleStepData = this.$refs[`paralleStepRef_${i}`][0].getFilledFormData();
@ -656,7 +670,8 @@ export default {
...paralleFormData,
...paralleTableFormData,
paralleStepData: paralleStepData.stepData,
showParalleConfig: true
showParalleConfig: true,
id
});
}
}

Loading…
Cancel
Save