index.vue 5.16 KB
Newer Older
liyixun committed
1 2
<template>
  <div class="eContainer">
nanrui committed
3 4
    <el-form :model="model" :rules="rules" ref="modelForm" label-width="120px" label-position="right" size="small"
      :validate-on-rule-change="false">
liyixun committed
5
      <c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="myTabClick">
nanrui committed
6
        <el-tab-pane label="业务信息" name="ovwp">
liyixun committed
7 8 9 10
          <c-content>
            <m-ovwp :model="model" :codes="codes" />
          </c-content>
        </el-tab-pane>
liyixun committed
11

nanrui committed
12
        <el-tab-pane label="保证金" name="ccvpan">
liyixun committed
13 14 15 16
          <c-content>
            <m-ccvpan :model="model" :codes="codes" />
          </c-content>
        </el-tab-pane>
liyixun committed
17

nanrui committed
18
        <el-tab-pane label="统一授信" name="limitbody">
liyixun committed
19
          <c-content>
nanrui committed
20
            <m-limitbody :model="model" :codes="codes" />
liyixun committed
21 22
          </c-content>
        </el-tab-pane>
liyixun committed
23

nanrui committed
24
        <el-tab-pane label="费用/账务" name="engp,setpan,glepan">
liyixun committed
25
          <c-content>
nanrui committed
26 27 28 29 30 31 32 33 34 35
            <div class="eibs-tab">
              <el-collapse v-model="activeNames">
                <el-collapse-item title="表外记账" name="engp">
                  <!-- 表外记账 -->
                  <m-engp :model="model" :codes="codes" />
                </el-collapse-item>
                <el-collapse-item title="结算" name="setpan">
                  <!-- 结算 -->
                  <m-setpan :model="model" :codes="codes" />
                </el-collapse-item>
36 37 38 39
                <el-collapse-item title="会计分录" name="glepan">
                  <!-- 会计分录 -->
                  <m-glepan :model="model" :codes="codes" />
                </el-collapse-item>
nanrui committed
40 41
              </el-collapse>
            </div>
liyixun committed
42 43
          </c-content>
        </el-tab-pane>
nanrui committed
44 45 46 47 48 49 50 51 52
        
        <!--PD000510 -->
        <el-tab-pane label="备查/附言" name="addbcb">
            <c-content>
              <m-addbcb :model="model" :codes="codes" />
            </c-content>
          </el-tab-pane>

        <el-tab-pane label="报文/面函" name="docpan">
liyixun committed
53
          <c-content>
nanrui committed
54
            <m-docpan :model="model" :codes="codes" />
liyixun committed
55 56
          </c-content>
        </el-tab-pane>
liyixun committed
57

nanrui committed
58 59
        <!--trndoc PD000546 Attachments -->
        <el-tab-pane label="附件" name="doctre">
liyixun committed
60 61 62 63 64
          <c-content>
            <m-doctre :model="model" :codes="codes" />
          </c-content>
        </el-tab-pane>
      </c-tabs>
liyixun committed
65
    </el-form>
nanrui committed
66
    <c-grid-ety-prompt-dialog ref="etyDialog" :promptData="promptData" v-on:select-ety="selectEty">
liyixun committed
67
    </c-grid-ety-prompt-dialog>
nanrui committed
68 69 70 71 72 73 74 75
    <c-function-btn :handleSubmit="handleSubmit" :handleCheck="handleCheck" :handleStash="handleStash">
      <!-- <el-button size="small">流程附言</el-button>
      <el-button size="small">交易历史</el-button>
      <el-button size="small">备忘录</el-button>
      <el-button size="small">影像信息</el-button>
      <el-button size="small">制裁信息</el-button>
      <el-button size="small">智能提示</el-button> -->
    </c-function-btn>
liyixun committed
76 77 78
  </div>
</template>
<script>
liyixun committed
79 80 81 82
import Api from "~/service/Api";
import CodeTable from "~/config/CodeTable";
import Gitame from "~/model/Gitame";
import commonProcess from "~/mixin/commonProcess";
liyixun committed
83
import commonFuncs from "~/mixin/commonFuncs";
liyixun committed
84 85 86
import Check from "~/model/Gitame/Check";
import Default from "~/model/Gitame/Default";
import Pattern from "~/model/Gitame/Pattern";
liyixun committed
87

nanrui committed
88
import Ovwp from "./Ovwp";
liyixun committed
89
import Ccvpan from "~/views/Public/Ccvpan";
nanrui committed
90 91
import Limitbody from "~/views/Public/Limitbody";
import Engp from "~/views/Public/Engp";
92
import Setpan from "~/components/business/setmod/views";
liyixun committed
93
import Glepan from "~/views/Public/Glepan";
nanrui committed
94
import Addbcb from "./Addbcb";
liyixun committed
95 96
import Docpan from "~/views/Public/Docpan";
import Doctre from "~/views/Public/Doctre";
nanrui committed
97

liyixun committed
98 99

export default {
liyixun committed
100 101 102 103
  name: "Gitame",
  components: {
    "m-ovwp": Ovwp,
    "m-ccvpan": Ccvpan,
nanrui committed
104 105
    "m-limitbody": Limitbody,
    "m-engp": Engp,
liyixun committed
106 107
    "m-setpan": Setpan,
    "m-glepan": Glepan,
nanrui committed
108
    "m-addbcb": Addbcb,
liyixun committed
109 110 111 112 113 114 115 116 117 118 119
    "m-docpan": Docpan,
    "m-doctre": Doctre,
  },
  provide() {
    return {
      root: this,
    };
  },
  mixins: [commonProcess, commonFuncs], // 里面包含了Default、Check等的公共处理
  data() {
    return {
nanrui committed
120 121
      tabVal: "ovwp",
      activeNames: ["engp"],
liyixun committed
122 123 124 125 126 127 128 129 130 131
      trnName: "gitame",
      trnType: "",
      model: new Gitame().data,
      checkRules: Check,
      defaultRules: Default,
      pattern: Pattern,
      rules: null,
      codes: {
        ...CodeTable,
      },
liyixun committed
132
      flag: false,
liyixun committed
133 134 135 136 137
    };
  },
  methods: {
    myTabClick(tab) {
      this.tabClick(tab);
liyixun committed
138
      let name = tab.name;
liyixun committed
139 140 141 142 143 144 145 146 147 148 149
      let rulePath;
      if (name === "setpan") {
        this.flag = true;
      }
      if (!!rulePath) {
        this.executeRule(rulePath).then((res) => {
          if (res.respCode == SUCCESS) {
            this.updateModel(res.data);
          }
        });
      }
liyixun committed
150 151 152
      /**
       *  do it yourself
       **/
liyixun committed
153
    },
liyixun committed
154 155 156 157 158 159 160 161 162 163 164 165
  },
  created: async function () {
    console.log("进入gitame交易");
    let rtnmsg = await this.init({});
    if (rtnmsg.respCode == SUCCESS) {
      this.updateModel(rtnmsg.data);
      //TODO 处理数据逻辑
      if (this.isInDisplay) {
        this.restoreDisplay();
      }
    } else {
      this.$notify.error({ title: "错误", message: "服务请求失败!" });
liyixun committed
166
    }
liyixun committed
167 168
  },
};
liyixun committed
169 170
</script>
<style>
nanrui committed
171

liyixun committed
172
</style>