buildCommons.js 3.82 KB
Newer Older
wanggang_yf committed
1
export default {
wanggang_yf committed
2
  buildPtspta(ptsptaObj) {
wanggang_yf committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
    let pts = ptsptaObj.pts;
    let ptspta = {
      rol: pts.rol,
      name: pts.nam,
      ptyinr: pts.ptyinr,
      ptainr: pts.ptainr,
      extkey: pts.extkey,
      dftdsp: pts.dftdsp,
      dftcur: pts.dftcur,
      dftact: pts.dftact,
      dftfeecur: pts.dftfeecur,
      dftactptainr: pts.dftactptainr,
      glggrpflg: pts.glggrpflg,
      adrblk: pts.adrblk
    };
    return ptspta;
  },
wanggang_yf committed
20
  buildCommonData(model, trnName) {
wanggang_yf committed
21 22 23 24 25 26 27 28 29
    let ptsptaList = [];
    if (model.brdgrp.apl.pts.extkey) {
      ptsptaList.push(this.buildPtspta(model.brdgrp.apl));
    }
    if (model.brdgrp.ben.pts.extkey) {
      ptsptaList.push(this.buildPtspta(model.brdgrp.ben));
    }
    let dataObj = {
      rec: {
30
        objtyp: 'BRD',
wanggang_yf committed
31
        objinr:model.brdgrp.rec.objinr,
wanggang_yf committed
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
        ownref: model.brdgrp.rec.ownref,
        opndat: model.brdgrp.rec.opndat,
        expdat: model.brdgrp.rec.expdat,
        branchInr: model.brdgrp.rec.branchInr,
        hndtyp: model.brdgrp.rec.hndtyp,
        gartyp: model.brdgrp.rec.gartyp,
        fingua: model.brdgrp.rec.fingua,
        fromflg: model.brdgrp.rec.fromflg,
        othersno: model.brdgrp.rec.othersno,
        sndto: model.brdgrp.rec.sndto,
        swiftflg: model.brtp.swiftflg,
        brduil: model.brdgrp.rec.brduil,
        purpos: model.brdgrp.rec.purpos,
        revflg: model.brdgrp.rec.revflg,
        cnfsta: model.brdgrp.rec.cnfsta,
      },
      cbsMap: {
        MAX: model.brdgrp.cbs.max,
        OPN1: model.brdgrp.cbs.opn1,
        MAC: model.brdgrp.cbs.mac,
        MAC2: model.brdgrp.cbs.mac2,
        OPC2: model.brdgrp.cbs.opc2,
        CNF: model.brdgrp.cbs.cnf,
      },
      ptsList: ptsptaList,
      transName: trnName,
      userId: window.sessionStorage.userId ? window.sessionStorage.userId : 'ZL'
    };
    return dataObj
  },
wanggang_yf committed
62
  buildSetfeg(model, trnName) {
wanggang_yf committed
63 64 65 66 67 68 69 70
    let params = {
      ...this.buildCommonData(model, trnName),
      liaall: model.liaall,
      liaccv: model.liaccv,
      // doceot: model.trnmod.trndoc.doceot,
    };
    return params
  },
wanggang_yf committed
71
  buildSetglg(model, trnName) {
wanggang_yf committed
72 73 74 75 76 77 78 79
    let params = {
      ...this.buildCommonData(model, trnName),
      setfeg: model.setmod.setfeg,
      liaall: model.liaall,
      liaccv: model.liaccv,
    };
    return params
  },
wanggang_yf committed
80
  buildGlentry(model, trnName) {
wanggang_yf committed
81 82 83 84 85 86 87 88 89
    let params = {
      ...this.buildCommonData(model, trnName),
      liaallg: model.liaall.liaallg,
      setfog: model.setmod.setfog,
      setfeg: model.setmod.setfeg,
      setglg: model.setmod.setglg,
    };
    return params
  },
wanggang_yf committed
90
  buildEngp(model, trnName) {
wanggang_yf committed
91 92 93 94 95 96
    let params = {
      ...this.buildCommonData(model, trnName),
      liaallg: model.liaall.liaallg,
    };
    return params
  },
wanggang_yf committed
97
  buildDocpan(model, trnName) {
wanggang_yf committed
98 99 100 101 102
    let params = {
      ...this.buildCommonData(model, trnName),
    };
    return params
  },
wanggang_yf committed
103
  buildCcvpan(model, trnName) {
wanggang_yf committed
104 105 106 107 108 109 110 111 112
    let params = {
      ...this.buildCommonData(model, trnName),
      liaccvg: model.liaccv.liaccvg,
      oldamt: model.liaccv.oldamt,
      chgamt: model.liaccv.chgamt,
      concur: model.liaccv.concur,
    };
    return params
  },
wanggang_yf committed
113
  buildLimitbody(model, trnName) {
wanggang_yf committed
114 115 116
    let params = {
      ...this.buildCommonData(model, trnName),
      rec: {
117
        objtyp: 'BRD',
wanggang_yf committed
118 119 120 121 122 123
        objinr: model.gidgrp.rec.objinr,
        ownref: model.gidgrp.rec.ownref,
      },
    };
    return params
  },
wanggang_yf committed
124
  buildDoctre(model, trnName) {
wanggang_yf committed
125 126 127
    let params = {
      ...this.buildCommonData(model, trnName),
      rec: {
128
        objtyp: 'BRD',
wanggang_yf committed
129 130 131 132 133 134 135 136
        objinr: model.brdgrp.rec.objinr,
        ownref: model.brdgrp.rec.ownref,
        swiftflg: model.brtp.swiftflg,
      },
    };
    return params
  },
  // 公共组件setmod中dsp字段改变,触发联动时候的入参
wanggang_yf committed
137
  buildSetgllAccts(model, trnName, setglg) {
wanggang_yf committed
138 139 140 141 142 143 144
    let params = {
      ...this.buildCommonData(model, trnName),
      setglg
    };
    return params
  }
}