Browse Source

feat:[模板管理][update]

luojie
luojie 2 weeks ago
parent
commit
e1fd6d7dc5
4 changed files with 43 additions and 5 deletions
  1. +1
    -1
      src/components/Template/StepComponents/ZLSubPackage.vue
  2. +39
    -4
      src/components/Template/StepComponents/ry/zlfz.vue
  3. +1
    -0
      src/components/Template/mixins/stepMixins.js
  4. +2
    -0
      src/views/business/comps/template/dialog/SelectMixReagentDialog.vue

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

@ -260,7 +260,7 @@ export default {
},
onReset() {
this.fzList.forEach((item, index) => {
item.num = "";
item.actnum = "";
//
if (this.fzListErrors[index] !== undefined) {
this.$set(this.fzListErrors, index, false);

+ 39
- 4
src/components/Template/StepComponents/ry/zlfz.vue View File

@ -9,6 +9,9 @@
import StepFormPackage from '@/components/Template/StepFormPackage.vue';
import stepMixins from '@/components/Template/mixins/stepMixins.js';
import { compareVolume } from '@/utils/volumeTools.js';
import {
sj_subpackage,
} from '@/api/business/sj/sj'
export default {
mixins: [stepMixins],
components: {
@ -64,13 +67,16 @@ export default {
if (res) {
const { zlfz } = res;
const gspInfo = res.selectInfo_gsp || {};
const { kc, kcdw } = gspInfo;
const { kc, kcdw, gg, ggdw, bh } = gspInfo;
const dw = zlfz.formData.dw;
const errMsg = "分装后小份容量之和大于母液容量,是否确认分装?"
const totalVolume = zlfz.fzList.reduce((acc, cur) => acc + Number(cur.actnum), 0);
const compareResult = compareVolume(totalVolume, dw, kc, kcdw);
const fzInfo = {
...zlfz.formData,
gg,
ggdw,
bh,
fzList: zlfz.fzList,
};
if (compareResult > 0 || !kc) {//
@ -96,10 +102,39 @@ export default {
}
},
submitEmit(fzInfo) {
async submitEmit(fzInfo) {
this.$refs.stepFormPackageRef.updateFormData("fzInfo", fzInfo);
this.$message.success("质量分装成功");
this.justUpdateFilledFormData();
const { dw,bh, gg, ggdw, fzList = [] } = fzInfo;
if(!fzList.length){
this.$message.error("请填写分装信息");
return;
}
const list = fzList.map((item) => {
return {
bh: item.preCode,
kc: item.actnum,
kcdw: dw,
}
})
let postData = {
studyId: this.templateData.studyId,
studyFormId: this.templateData.id,
bh,
gg,
ggdw,
studySubjectId: this.templateData.studySubjectId,
studyId: this.templateData.studyId,
studyFormId: this.templateData.id,
list: list
}
const res = await sj_subpackage(postData)
if (res.code === 200) {
this.$message.success('分装成功')
this.justUpdateFilledFormData();
} else {
this.$message.error('分装失败')
}
}
}
}

+ 1
- 0
src/components/Template/mixins/stepMixins.js View File

@ -4,6 +4,7 @@ import { getLatestSn, getLatestSnArr } from '@/api/template'
export default {
inject: {
templateFillType: { default: 'preFill' },
templateData: { default: {} },
templateSn: { default: '' },
getStepData: { default: () => null },
getJcbData: { default: () => null },

+ 2
- 0
src/views/business/comps/template/dialog/SelectMixReagentDialog.vue View File

@ -189,6 +189,8 @@ export default {
type: Number(this.selectType),
kc: row.kc,
kcdw: row.kcdw,
gg: row.gg,
ggdw: row.ggdw,
}
const {qxbdType,checkType} = this;
if(qxbdType){

Loading…
Cancel
Save