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