Browse Source

feat:[模板管理][烦人的提交记录]

lkf
luojie 2 months ago
parent
commit
5efaf48f50
6 changed files with 468 additions and 61 deletions
  1. +4
    -0
      src/components/Template/Step.vue
  2. +341
    -0
      src/components/Template/StepComponents/ZLSubPackage.vue
  3. +3
    -1
      src/components/Template/StepComponents/ry/qywz.vue
  4. +52
    -0
      src/components/Template/StepComponents/ry/zlfz.vue
  5. +5
    -0
      src/components/Template/StepFormPackage.vue
  6. +63
    -60
      src/views/business/comps/template/comps/sp/SP00456.vue

+ 4
- 0
src/components/Template/Step.vue View File

@ -71,6 +71,7 @@ import Js from "./StepComponents/ry/js.vue";//溶液-计数
import Mj from "./StepComponents/ry/mj.vue";//- import Mj from "./StepComponents/ry/mj.vue";//-
import Fs from "./StepComponents/ry/fs.vue";//- import Fs from "./StepComponents/ry/fs.vue";//-
import Fb from "./StepComponents/ry/fb.vue";//- import Fb from "./StepComponents/ry/fb.vue";//-
import Zlfz from "./StepComponents/ry/zlfz.vue";//-
@ -113,6 +114,7 @@ const stepTypes = [
{ label: '灭菌', value: 'mj' }, { label: '灭菌', value: 'mj' },
{ label: '复苏', value: 'fs' }, { label: '复苏', value: 'fs' },
{ label: '封板', value: 'fb' }, { label: '封板', value: 'fb' },
{ label: '质量分装', value: 'zlfz' },
]; ];
@ -177,6 +179,7 @@ export default {
Mj, Mj,
Fs, Fs,
Fb, Fb,
Zlfz,
}, },
computed: { computed: {
stepComponentMap() { stepComponentMap() {
@ -220,6 +223,7 @@ export default {
'mj': 'Mj', 'mj': 'Mj',
'fs': 'Fs', 'fs': 'Fs',
'fb': 'Fb', 'fb': 'Fb',
'zlfz': 'Zlfz',
} }
} }
return this.componentMap return this.componentMap

+ 341
- 0
src/components/Template/StepComponents/ZLSubPackage.vue View File

@ -0,0 +1,341 @@
<!-- 质量分装 -->
<template>
<div class="zl-container">
<div class="dialog-content">
<div class="header-container">
<div class="header-item">
<div class="header-title">母编号</div>
<HandleFormItem fieldKey = "clfz_mybh" :item="inputItem" :error="formErrors.mybh"
v-model="formData.mybh" />
</div>
<div class="header-item">
<div class="header-title">分装数量</div>
<HandleFormItem fieldKey = "clfz_fzsl" @blur="onBlurFzsl" :item="integerInputNumberItem"
type = "inputNumber"
:error="formErrors.fzsl" v-model="formData.fzsl" />
</div>
<div class="header-item">
<div class="header-title">单位</div>
<div class="unit-select">
<HandleFormItem :item="unitItem" type="select" :error="formErrors.dw"
@blur="(e) => onCommonBlur(e, 'dw')" v-model="formData.dw" />
</div>
</div>
</div>
<div class="content-container">
<div class="header-container">
<div v-for="(item, index) in fzList" class="list-item" :key="index">
<div class="list-label">{{ formData.mybh }}-set{{ item.subCode }}</div>
<HandleFormItem :fieldKey = "'clfz_set'+index+'_prenum'" :item="preInputNumberItem" :error="fzListErrors[index]"
type="inputNumber" @blur="onBlurFzNum(index)" v-model="item.num" />
<HandleFormItem :fieldKey = "'clfz_set'+index+'_actnum'" class="ml-5" :item="inputNumberItem" :error="fzListErrors[index]"
type="inputNumber" @blur="onBlurFzNum(index)" v-model="item.num" />
<HandleFormItem
class="ml-5"
type="button"
:item="getButtonItem()"
@clickButton="(e)=>onGetValue(e,item)" />
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import HandleFormItem from '@/components/Template/HandleFormItem.vue';
import { compareVolume } from '@/utils/volumeTools.js';
import { EventBus } from '@/utils/eventBus';
import { getLatestSn } from '@/api/template';
export default {
dicts: [
'business_tjdw',
],
components: {
HandleFormItem,
},
data() {
return {
subData: {},
inputItem: {
type: "input",
fillType: "actFill",
disabled: true,
},
integerInputNumberItem: {
type: "inputNumber",
fillType: "preFill",
precision: 0,
maxlength: 3
},
inputNumberItem: {
type: "inputNumber",
fillType: "actFill",
},
preInputNumberItem: {
type: "inputNumber",
fillType: "preFill",
},
formData: {
mybh: "",//
fzsl: "",//
dw: "",//
mfbzl: "",//
},
fzList: [],//
//
formErrors: {
mybh: false,
fzsl: false,
dw: false,
},
fzListErrors: [], //
uuid:"",//id
}
},
computed: {
unitItem() {
return {
type: "select",
fillType: "actFill",
options: this.dict.type.business_tjdw
}
}
},
methods: {
//
getButtonItem() {
return {
fillType: "actFill",
buttonName:"获取值",
}
},
close() {
this.visible = false;
this.fzList = [];
this.formData = {};
this.resetErrors();
},
show(data) {
const cloneData = JSON.parse(JSON.stringify(data));
if(data && data.uuid) {//eventBusid
this.uuid = data.uuid
}
if (data.fzList) {
this.fzList = JSON.parse(JSON.stringify(cloneData.fzList));
//
this.fzListErrors = new Array(this.fzList.length).fill(false);
delete cloneData.fzList;
}
this.formData = cloneData;
//
this.resetErrors();
this.visible = true;
},
onSubmit() {
//
if (!this.validateFormData()) {
this.$message.error('表单内容未填完,请填写后再提交')
return;
} else {
const errMsg = "分装后小份容量之和大于母液容量,是否确认分装?"
const {maxVolume,maxVolumeUnit,dw} = this.formData;
const totalVolume = this.fzList.reduce((acc, cur) => acc + Number(cur.num), 0);
const compareResult = compareVolume(totalVolume,dw,maxVolume, maxVolumeUnit);
console.log(compareResult,totalVolume,dw,maxVolume, maxVolumeUnit,"比较结果");
if(compareResult > 0||!maxVolume){//
this.$modal.confirm(errMsg, '提示', {
confirmButtonText: this.$t('form.saveConfirm'),
cancelButtonText: this.$t('form.cancel'),
type: 'warning'
}).then(() => {
this.submitEmit();
}).catch(() => {
//
});
return;
}
this.submitEmit();
}
},
submitEmit(){
EventBus.$emit('dialogSubPackageSubmit', {...this.formData, fzList: this.fzList,uuid:this.uuid});
setTimeout(() => {
this.close();
}, 500);
},
validateFormData() {
let isValid = true;
//
if (!this.formData.mybh) {
this.formErrors.mybh = true;
isValid = false;
}
//
if (!this.formData.fzsl) {
this.formErrors.fzsl = true;
isValid = false;
}
//
if (!this.formData.dw) {
this.formErrors.dw = true;
isValid = false;
}
//
if (this.fzList && this.fzList.length > 0) {
for (let i = 0; i < this.fzList.length; i++) {
if (!this.fzList[i].num) {
// fzListErrors
if (this.fzListErrors.length <= i) {
this.$set(this.fzListErrors, i, true);
} else {
this.fzListErrors[i] = true;
}
isValid = false;
}
}
}
return isValid;
},
resetErrors() {
//
Object.keys(this.formErrors).forEach(key => {
this.formErrors[key] = false;
});
//
this.fzListErrors.forEach((_, index) => {
this.$set(this.fzListErrors, index, false);
});
},
//
async onBlurFzsl(e) {
console.log(e,"失去焦点时的数量")
//
if (e) {
this.formErrors.fzsl = false;
}
//
this.fzList = [];
this.fzListErrors = [];
const result = await getLatestSn({
pre: this.formData.mybh,
count: e,
type: 2,
})
if(result.code === 200){
const codes = result.data;
//
for (let i = 0; i < e; i++) {
this.fzList.push({
num: "",
subCode: codes[i],
});
//
this.fzListErrors.push(false);
}
}
},
onAverage() {
const { mfbzl } = this.formData;
this.fzList.forEach((item, index) => {
item.num = mfbzl;
//
if (this.fzListErrors[index] !== undefined) {
this.$set(this.fzListErrors, index, false);
}
})
//
this.formErrors.mfbzl = false;
},
onGetValue(item) {
},
onCommonBlur(e, field) {
if (this.formData[field]) {
this.formErrors[field] = false;
}
},
onBlurFzNum(index) {
if (this.fzList[index] && this.fzList[index].num) {
if (this.fzListErrors[index] !== undefined) {
this.$set(this.fzListErrors, index, false);
}
}
},
}
}
</script>
<style lang="scss" scoped>
.zl-container{
// width: 1100px;
}
.dialog-content {
// padding: 20px;
}
.ml-5{
margin-left: 5px;
}
.unit-select {
width: 100px;
}
.content-item {
display: flex;
align-items: center;
}
.header-container {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-gap: 20px;
margin-top: 10px;
}
.header-item {
// box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
background: #fff;
border-radius: 4px;
display: flex;
align-items: center;
// padding: 20px;
}
.header-title {
// margin-bottom: 10px;
margin-right: 5px;
}
.content-container {
margin-top: 10px;
// padding: 20px;
// box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
// max-height: 50vh;
overflow: auto;
}
.ml-20 {
margin-left: 20px;
}
.list-item {
display: flex;
align-items: center;
// margin-top: 20px;
}
.list-label {
margin-right: 5px;
// width: 200px;
}
</style>

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

@ -33,7 +33,9 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
type:"text", type:"text",
}, },
zl:{ zl:{
type:"span",
type:"input",
fillType:"actFill",
disabled:true,
}, },
text3:{ text3:{

+ 52
- 0
src/components/Template/StepComponents/ry/zlfz.vue View File

@ -0,0 +1,52 @@
<!-- 质量分装 -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="ry_czdd" @resetRecord="resetRecord" :form-config="formConfig"
:formData="formData" />
</template>
<script>
import StepFormPackage from '@/components/Template/StepFormPackage.vue';
import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default {
mixins: [stepMixins],
components: {
StepFormPackage
},
computed: {
formConfig() {
return [
{
config: {
text1: {
label: "选择",
type: "text",
},
ddsys: {
type: "input",
fillType: "preFill",
},
yq: {
type: "gsp",
fillType: "actFill",
},
text2: {
label: "进行称量分装",
type: "text",
},
}
},
{
config:{
clfz:{
type: "zlfz",
}
}
}
]
}
},
}
</script>
<style lang="scss" scoped></style>

+ 5
- 0
src/components/Template/StepFormPackage.vue View File

@ -47,6 +47,9 @@
<template v-else-if="sItem.type === 'span'"> <template v-else-if="sItem.type === 'span'">
<span>{{ formFields[key] }}</span> <span>{{ formFields[key] }}</span>
</template> </template>
<template v-else-if="sItem.type === 'zlfz'">
<ZLSubPackage :subData = "formFields[key]" ref="zlSubPackageRef" />
</template>
<div v-show="isShowOther(formFields[key])" class="flex flex1"> <div v-show="isShowOther(formFields[key])" class="flex flex1">
<div class="other-title">{{sItem.otherLabel ? $t(sItem.otherLabel) : $t("template.common.other") }}</div> <div class="other-title">{{sItem.otherLabel ? $t(sItem.otherLabel) : $t("template.common.other") }}</div>
@ -64,6 +67,7 @@
<script> <script>
import HandleFormItem from '@/components/Template/HandleFormItem.vue' import HandleFormItem from '@/components/Template/HandleFormItem.vue'
import formPackageMixins from '@/components/Template/mixins/formPackageMixins.js' import formPackageMixins from '@/components/Template/mixins/formPackageMixins.js'
import ZLSubPackage from '@/components/Template/StepComponents/ZLSubPackage.vue'
import { isShowOther } from "@/utils/formPackageCommon.js"; import { isShowOther } from "@/utils/formPackageCommon.js";
import { EventBus } from "@/utils/eventBus"; import { EventBus } from "@/utils/eventBus";
import { getuuid } from "@/utils/index.js"; import { getuuid } from "@/utils/index.js";
@ -72,6 +76,7 @@ export default {
inject: ['templateFillType','templateData'], inject: ['templateFillType','templateData'],
components: { components: {
HandleFormItem, HandleFormItem,
ZLSubPackage
}, },
mixins: [formPackageMixins], mixins: [formPackageMixins],
props: { props: {

+ 63
- 60
src/views/business/comps/template/comps/sp/SP00456.vue View File

@ -32,8 +32,7 @@
@resetRecord="(e) => resetRecord('ladder', ladderIndex, e)" @resetRecord="(e) => resetRecord('ladder', ladderIndex, e)"
@onSureModifyRecord="(e) => onSureModifyRecord('ladder', ladderIndex, e)" @onSureModifyRecord="(e) => onSureModifyRecord('ladder', ladderIndex, e)"
:ref="`ladderStepFormPackageRef_${ladderIndex}`" :formConfig="ladderStepFormConfig" :ref="`ladderStepFormPackageRef_${ladderIndex}`" :formConfig="ladderStepFormConfig"
:formData="ladderConfig" fieldItemLabel="阶梯配制"
:prefixKey="'ladder_' + ladderIndex" />
:formData="ladderConfig" fieldItemLabel="阶梯配制" :prefixKey="'ladder_' + ladderIndex" />
<CustomTable @blur="(e) => onHandleTableBlur('ladder', ladderIndex, e)" <CustomTable @blur="(e) => onHandleTableBlur('ladder', ladderIndex, e)"
:ref="`ladderStepTableRef_${ladderIndex}`" :columns="ladderStepColumns" :ref="`ladderStepTableRef_${ladderIndex}`" :columns="ladderStepColumns"
:formData="ladderConfig" :prefixKey="'ladder_' + ladderIndex" fieldItemLabel="阶梯配制"> :formData="ladderConfig" :prefixKey="'ladder_' + ladderIndex" fieldItemLabel="阶梯配制">
@ -66,8 +65,7 @@
</div> </div>
<BaseInfoFormPackage @clickable="(e) => handleClickable('paralle', paralleIndex, e)" <BaseInfoFormPackage @clickable="(e) => handleClickable('paralle', paralleIndex, e)"
:ref="`paralleStepFormPackageRef_${paralleIndex}`" :formConfig="paralleStepFormConfig" :ref="`paralleStepFormPackageRef_${paralleIndex}`" :formConfig="paralleStepFormConfig"
:formData="paralleConfig" :prefixKey="'paralle' + paralleIndex"
fieldItemLabel="平行配制" />
:formData="paralleConfig" :prefixKey="'paralle' + paralleIndex" fieldItemLabel="平行配制" />
<CustomTable @blur="(e) => onHandleTableBlur('paralle', paralleIndex, e)" <CustomTable @blur="(e) => onHandleTableBlur('paralle', paralleIndex, e)"
:ref="`paralleStepTableRef_${paralleIndex}`" :columns="paralleStepColumns" :ref="`paralleStepTableRef_${paralleIndex}`" :columns="paralleStepColumns"
@clickable="(e, tableRowIndex, rowData) => handleTableClickable('paralle', paralleIndex, e, tableRowIndex, rowData)" @clickable="(e, tableRowIndex, rowData) => handleTableClickable('paralle', paralleIndex, e, tableRowIndex, rowData)"
@ -110,9 +108,9 @@ import templateMixin from "../../mixins/templateMixin.js";
import CustomTable from '@/components/Template/CustomTable.vue'; import CustomTable from '@/components/Template/CustomTable.vue';
import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue'; import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue';
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"; import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue";
import { getExpireDate,duplicateResource } from "@/utils/index.js";
import { getExpireDate, duplicateResource } from "@/utils/index.js";
import moment from "moment"; import moment from "moment";
import { addTj,uniqeResource } from "@/utils/calUnitTools";
import { addTj, uniqeResource } from "@/utils/calUnitTools";
import { getLadderColumnsConfig, getParallelColumnsConfig, getLadderFormConfig, getBaseInfoFormConfig, getRemarkFormConfig, getStorageConditionFormConfig, getParalleStepFormConfig } from "../../formConfig/paralleAndLadderConfig.js"; import { getLadderColumnsConfig, getParallelColumnsConfig, getLadderFormConfig, getBaseInfoFormConfig, getRemarkFormConfig, getStorageConditionFormConfig, getParalleStepFormConfig } from "../../formConfig/paralleAndLadderConfig.js";
export default { export default {
name: "SP00456", name: "SP00456",
@ -239,7 +237,7 @@ export default {
this.configCompleteRequest(postData); this.configCompleteRequest(postData);
}, },
getTemplateName() { getTemplateName() {
if (this.templateData&&this.templateData.templateMc) {
if (this.templateData && this.templateData.templateMc) {
return this.templateData.templateMc return this.templateData.templateMc
} }
const o = { const o = {
@ -272,41 +270,46 @@ export default {
}, },
// //
async assignNumbersToTableData(config) { async assignNumbersToTableData(config) {
const configs = this.formData[config]
const { startDate } = this.formData;
// paralleConfigsparalleTableFormData
if (configs && configs.length > 0) {
for (let i = 0; i < configs.length; i++) {
const ref = config === "paralleConfigs" ? `paralleStepTableRef_${i}` : `ladderStepTableRef_${i}`;
const { stepTableFormData = [], effectivePeriod, effectivePeriodUnit, expireDate } = configs[i];
if (!expireDate && config === "ladderConfigs") {
const date = getExpireDate(startDate, effectivePeriod, effectivePeriodUnit);
configs[i].expireDate = date;
}
if (stepTableFormData && stepTableFormData.length > 0) {
const tableDataArray = stepTableFormData;
// subTargetSolutionCode
const hasAnyWithValue = tableDataArray.some(row =>
row.subTargetSolutionCode && row.subTargetSolutionCode.trim() !== '');
//
if (!hasAnyWithValue) {
const codes = stepTableFormData.map((item) => ({prex:item.targetSolutionCode,type:1}));
const snList = await this.getLatestSnArr(codes);
tableDataArray.forEach((row, idx) => {
let expDate = {};
if (config === "paralleConfigs" && !row.targetSolutionExpirationDate) {
let date = getExpireDate(startDate, row.targetSolutionCycle, row.targetSolutionCyclePrecision);
expDate = {
targetSolutionExpirationDate: date
return new Promise(async (resolve, reject) => {
const configs = this.formData[config]
const { startDate } = this.formData;
// paralleConfigsparalleTableFormData
if (configs && configs.length > 0) {
for (let i = 0; i < configs.length; i++) {
const ref = config === "paralleConfigs" ? `paralleStepTableRef_${i}` : `ladderStepTableRef_${i}`;
const { stepTableFormData = [], effectivePeriod, effectivePeriodUnit, expireDate } = configs[i];
if (!expireDate && config === "ladderConfigs") {
const date = getExpireDate(startDate, effectivePeriod, effectivePeriodUnit);
configs[i].expireDate = date;
}
if (stepTableFormData && stepTableFormData.length > 0) {
const tableDataArray = stepTableFormData;
// subTargetSolutionCode
const hasAnyWithValue = tableDataArray.some(row =>
row.subTargetSolutionCode && row.subTargetSolutionCode.trim() !== '');
//
if (!hasAnyWithValue) {
const codes = stepTableFormData.map((item) => ({ prex: item.targetSolutionCode, type: 1 }));
const snList = await this.getLatestSnArr(codes);
tableDataArray.forEach((row, idx) => {
let expDate = {};
if (config === "paralleConfigs" && !row.targetSolutionExpirationDate) {
let date = getExpireDate(startDate, row.targetSolutionCycle, row.targetSolutionCyclePrecision);
expDate = {
targetSolutionExpirationDate: date
}
} }
}
this.$refs[ref][0]?.updateDataSourceByRowIndex(idx, { subTargetSolutionCode: snList[idx], ...expDate });
});
Promise.resolve();
this.$refs[ref][0]?.updateDataSourceByRowIndex(idx, { subTargetSolutionCode: snList[idx], ...expDate });
});
resolve()
}else{
reject()
}
} }
} }
} }
}
})
}, },
@ -402,25 +405,25 @@ export default {
const targetAcSolution = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFormDataByKey("targetAcSolution") || 0;// const targetAcSolution = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFormDataByKey("targetAcSolution") || 0;//
if (targetAcSolution) { if (targetAcSolution) {
const volResult = this.updateSjmbrynd(item, targetAcSolution); const volResult = this.updateSjmbrynd(item, targetAcSolution);
if(!volResult){
if (!volResult) {
return return
} }
this.$refs[`ladderStepTableRef_${configIndex}`][0]?.updateDataSourceByRowIndex(rowIndex, { this.$refs[`ladderStepTableRef_${configIndex}`][0]?.updateDataSourceByRowIndex(rowIndex, {
actSolutionVolume: volResult.actVol, actSolutionVolume: volResult.actVol,
actSolutionConcentration: volResult.actNd, actSolutionConcentration: volResult.actNd,
},"blur");
}, "blur");
} }
} else if (type === "paralle") { } else if (type === "paralle") {
const targetAcSolution = item.targetAcSolution || 0;// const targetAcSolution = item.targetAcSolution || 0;//
if (targetAcSolution) { if (targetAcSolution) {
const volResult = this.updateSjmbrynd(item, targetAcSolution); const volResult = this.updateSjmbrynd(item, targetAcSolution);
if(!volResult){
if (!volResult) {
return return
} }
this.$refs[`paralleStepTableRef_${configIndex}`][0]?.updateDataSourceByRowIndex(rowIndex, { this.$refs[`paralleStepTableRef_${configIndex}`][0]?.updateDataSourceByRowIndex(rowIndex, {
actSolutionVolume: volResult.actVol, actSolutionVolume: volResult.actVol,
actSolutionConcentration: volResult.actNd, actSolutionConcentration: volResult.actNd,
},"blur");
}, "blur");
} }
} }
@ -468,7 +471,7 @@ export default {
const tableRef = this.$refs[`paralleStepTableRef_${currentRowIndex}`][0]; const tableRef = this.$refs[`paralleStepTableRef_${currentRowIndex}`][0];
if (tableRef) { if (tableRef) {
const volResult = this.updateSjmbrynd(this.currentRowData, row.nd); const volResult = this.updateSjmbrynd(this.currentRowData, row.nd);
if(!volResult){
if (!volResult) {
return return
} }
tableRef.updateDataSourceByRowIndex(currentTableIndex, { tableRef.updateDataSourceByRowIndex(currentTableIndex, {
@ -476,7 +479,7 @@ export default {
targetAcSolution: row.nd, targetAcSolution: row.nd,
actSolutionVolume: volResult.actVol, actSolutionVolume: volResult.actVol,
actSolutionConcentration: volResult.actNd, actSolutionConcentration: volResult.actNd,
},"clickable")
}, "clickable")
} }
} }
this.$refs.selectReagentDialogRef.onCancel(); this.$refs.selectReagentDialogRef.onCancel();
@ -497,7 +500,7 @@ export default {
// //
newData.forEach((item, index) => { newData.forEach((item, index) => {
const volResult = this.updateSjmbrynd(item, row.nd); const volResult = this.updateSjmbrynd(item, row.nd);
if(!volResult){
if (!volResult) {
return return
} }
console.log(volResult.actNd, "actNd") console.log(volResult.actNd, "actNd")
@ -601,15 +604,15 @@ export default {
mc: null, mc: null,
bh: stepTableFormData[j].targetSolutionCode + stepTableFormData[j].subTargetSolutionCode, bh: stepTableFormData[j].targetSolutionCode + stepTableFormData[j].subTargetSolutionCode,
ph: null, ph: null,
ndz:stepTableFormData[j].actSolutionConcentration + ladderConfigs.headerSelectFields.actSolutionConcentrationUnit,
ndz: stepTableFormData[j].actSolutionConcentration + ladderConfigs.headerSelectFields.actSolutionConcentrationUnit,
nd: stepTableFormData[j].actSolutionConcentration, nd: stepTableFormData[j].actSolutionConcentration,
nddw: ladderConfigs.headerSelectFields.actSolutionConcentrationUnit, nddw: ladderConfigs.headerSelectFields.actSolutionConcentrationUnit,
ly: 'ELN配制', ly: 'ELN配制',
sxrq: ladderConfigs.expireDate, sxrq: ladderConfigs.expireDate,
kc: total, kc: total,
kcdw: unit, kcdw: unit,
type: null,
elnType: this.product,
type: null,
elnType: this.product,
syl: null, syl: null,
syldw: unit, syldw: unit,
yxzq: ladderConfigs.effectivePeriod, yxzq: ladderConfigs.effectivePeriod,
@ -629,8 +632,8 @@ export default {
sxrq: ladderConfigs.expireDate, sxrq: ladderConfigs.expireDate,
kc: fzsj.fzList[k].num, kc: fzsj.fzList[k].num,
kcdw: fzsj.dw, kcdw: fzsj.dw,
type: null,
elnType: this.product,
type: null,
elnType: this.product,
syl: null, syl: null,
syldw: ladderConfigs.headerSelectFields.actSolutionVolumeUnit, syldw: ladderConfigs.headerSelectFields.actSolutionVolumeUnit,
yxzq: ladderConfigs.effectivePeriod, yxzq: ladderConfigs.effectivePeriod,
@ -659,8 +662,8 @@ export default {
sxrq: stepTableFormData[j].targetSolutionExpirationDate, sxrq: stepTableFormData[j].targetSolutionExpirationDate,
kc: total, kc: total,
kcdw: unit, kcdw: unit,
type: null,
elnType: this.product,
type: null,
elnType: this.product,
syl: null, syl: null,
syldw: unit, syldw: unit,
yxzq: stepTableFormData[j].targetSolutionCycle, yxzq: stepTableFormData[j].targetSolutionCycle,
@ -680,8 +683,8 @@ export default {
sxrq: paralleConfigs.expireDate, sxrq: paralleConfigs.expireDate,
kc: fzsj.fzList[k].num, kc: fzsj.fzList[k].num,
kcdw: fzsj.dw, kcdw: fzsj.dw,
type: null,
elnType: this.product,
type: null,
elnType: this.product,
syl: null, syl: null,
syldw: paralleConfigs.headerSelectFields.actSolutionVolumeUnit, syldw: paralleConfigs.headerSelectFields.actSolutionVolumeUnit,
yxzq: paralleConfigs.effectivePeriod, yxzq: paralleConfigs.effectivePeriod,
@ -693,16 +696,16 @@ export default {
} }
} }
} }
//使
//使
// const stepResource = this.$refs.stepRef.getStepResource() // const stepResource = this.$refs.stepRef.getStepResource()
// this.resourceTmp =uniqeResource(tmpResource,stepResource.sjResource||[]) // this.resourceTmp =uniqeResource(tmpResource,stepResource.sjResource||[])
// this.yqResourceTmp = stepResource.yqResource||[] // this.yqResourceTmp = stepResource.yqResource||[]
this.resourceTmp=tmpResource
this.resourceTmp = tmpResource
return content; return content;
}, },
getStepResource(){
const sjResource=[],yqResource= [];
getStepResource() {
const sjResource = [], yqResource = [];
if (this.formData.paralleConfigs && this.formData.paralleConfigs.length > 0) { if (this.formData.paralleConfigs && this.formData.paralleConfigs.length > 0) {
for (let i = 0; i < this.formData.paralleConfigs.length; i++) { for (let i = 0; i < this.formData.paralleConfigs.length; i++) {
const paralleResource = this.$refs[`paralleStepRef_${i}`][0].getStepResource(); const paralleResource = this.$refs[`paralleStepRef_${i}`][0].getStepResource();
@ -718,8 +721,8 @@ export default {
} }
} }
// //
const {sj,yq} = duplicateResource(sjResource,yqResource)
return {sjResource:sj,yqResource:yq};
const { sj, yq } = duplicateResource(sjResource, yqResource)
return { sjResource: sj, yqResource: yq };
}, },
async onSave() { async onSave() {
const formData = this.getStepResource(); const formData = this.getStepResource();

Loading…
Cancel
Save