index.vue 4.46 KB
Newer Older
fukai committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 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 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152
<template>
  <div class="eibs">
       <c-col :span="24" style="">
           <c-istream-table :list="data" :columns="columns"></c-istream-table>
       </c-col>
  </div>
</template>
<script>
import Api from "~/service/Api";
import commonProcess from "~/mixin/commonProcess";
import Utils from "~/utils";
import Factory from "./Factory";

export default {
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [commonProcess],
  data() {
    return {
      columns: [
        '2 1 "借/贷" 80 1 0',
        '6 2  "账号" 200',
        '3 3 "币种" 70',
        '4 4 "金额" 150 2 8:1 2 5',
        '5 5 "起息日" 150',
        '7 6 "牌价类型" 100',
        '8 7 "牌价" 100 2 0 1 0',
        '9 8 "会计科目" 100',
        '0 9 "分录序号" 100 1 0'
      ],
      data: []
    };
  },
  watch: {
    //this.$refs.glepan.stmData.data = res.data.setmod_glemod_gleshwstm.rows;
    "model.setmod.glemod.gleshwstm": {
      handler(val, oldVal) {
        if (val.rows) {
          this.data = val.rows;
        }
      },
      immediate: true
    }
  },
  methods: {
    async processGlepan() {
      console.log("111")
      console.log(this.model);
      this.model.gidgrp.transName = "gitopn";
      this.model.gidgrp.userId = "742549";
      this.model.gidgrp.rec.objtyp = "GID";
      this.model.gidgrp.rec.ownref = "LG3500230625AA";
      this.model.gidgrp.rec.branchInr = "";
      this.model.gidgrp.rec.detchgcod = "OUR";
      this.model.gidgrp.rec.paytyp = "O";
      this.model.gidgrp.rec.swftyp = "103";
      this.model.gidgrp.rec.valdat = "";
      this.model.gidgrp.rec.gartyp = "1";
      this.model.gidgrp.cbs.opc2.cur = "";
      this.model.gidgrp.cbs.opc2.amt = "0.000";
      this.model.gidgrp.cbs.opn1.cur = "USD";
      this.model.gidgrp.cbs.opn1.amt = "1000.000";
      this.model.gidgrp.cbs.opn2.cur = "USD";
      this.model.gidgrp.cbs.opn2.amt = "1000.000";
      this.model.gidgrp.cbs.max.cur = "USD";
      this.model.gidgrp.cbs.max.amt = "1000.000";
      this.model.gidgrp.cbs.mac2.cur = "";
      this.model.gidgrp.cbs.mac2.amt = "0.000";
      this.model.gidgrp.cbs.mac.cur = "";
      this.model.gidgrp.cbs.mac.amt = "0.000";
      this.model.gidgrp.cbs.cnf.cur = "USD";
      this.model.gidgrp.cbs.cnf.amt = "1000.000";
      let pts = {
        rol: "BEN",
        nam: "",
        ptyinr: "",
        ptainr: "",
        extkey: "999900000009",
        dftdsp: "",
        dftcur: "",
        dftact: "",
        dftfeecur: "",
        dftactptainr: "",
        glggrpflg: "",
        adrblk: "T2342342324234 22342342"
      };

      this.model.gidgrp.ben.pts = pts;
      let pts2 = {
        rol: "ADV",
        nam: "",
        ptyinr: "",
        ptainr: "",
        extkey: "EVERCNBJBUS-001",
        dftdsp: "",
        dftcur: "",
        dftact: "",
        dftfeecur: "",
        dftactptainr: "",
        glggrpflg: "",
        adrblk: "CHINA EVERBRIGHT BANK 100031 BEIJING CHINA"
      };
      this.model.gidgrp.adv.pts = pts2;
      let pts3 = {
        rol: "APL",
        nam: "",
        ptyinr: "",
        ptainr: "11593263",
        extkey: "2000017770-001",
        dftdsp: "",
        dftcur: "",
        dftact: "",
        dftfeecur: "",
        dftactptainr: "",
        glggrpflg: "",
        adrblk:
          "Brilliance Technology Co., Ltd. 8 / F, block B, building 2, Jinyuan East lantianchang Road,Haidian Dist 100087BEIJING, CHINA"
      };
      this.model.gidgrp.apl.pts = pts3;
      this.model.settle.setglg.setgll = [];
      this.model.settle.setfog.setfol = [];
      this.model.settle.setfeg.setfel = [];

      let transName = "gitopn";
      let buildData = Factory[transName];
      if (!buildData) {
        //提示未注册的费用计算处理
        this.$notify.error({ title: "错误", message: "未注册的费用计算处理!" });
      }
      let glepanBuildObj = new buildData(this.model);
      glepanBuildObj.buildGlepan();
      let glepan = glepanBuildObj.model.settle;
      // console.log("111111");
      // console.log(settleBuildObj);
      //发出API请求
      const loading = this.loading("正在请求数据");
      const rulePath = "/business/gle/assertGle";
      console.log(this.model.settle);
      let rtnmsg = await Api.post(rulePath, glepan);
      // console.log("rtnmsg");
      if (rtnmsg.respCode == SUCCESS) {
        Utils.copyValueFromVO(this.model.settle, rtnmsg.data);
        let i = 0;
          this.data = this.model.settle.setglg.setgll;
      }
      loading.close();
    },
  }
};
</script>
<style scoped>
</style>