index.vue 6.09 KB
Newer Older
wangna committed
1 2
<template>
  <div class="eContainer">
闫泽浩 committed
3 4 5 6 7 8 9 10 11
    <c-page title="出口保函保兑">
         <!--
        <div  class="fast-button">
           <el-button size="small">备忘录</el-button>
           <el-button size="small" @click="setDraggableContent('cms', '影像信息')">影像信息</el-button>
           <el-button size="small">制裁信息</el-button>
           <el-button size="small">智能提示</el-button>
        /div>
     -->
wangna committed
12 13 14 15
    <el-form
      :model="model"
      :rules="rules"
      ref="modelForm"
16
      label-width="120px"
wangna committed
17 18 19 20 21 22
      label-position="right"
      size="small"
      :validate-on-rule-change="false"
    >
      <c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="myTabClick">
        <!--PD000017 -->
闫泽浩 committed
23 24 25 26 27
     <el-tab-pane label="业务信息" name="ovwp">
       <c-content>
         <m-ovwp :model="model" :codes="codes" />
        </c-content>
     </el-tab-pane>
28 29 30
          <el-tab-pane label="统一授信" name="limitbody">
          <m-limitbody :model="model" :codes="codes" />
        </el-tab-pane>
wangna committed
31 32 33 34

        <!--PD000727 -->
        <el-tab-pane
          v-if="model.gitp.swiftflg == 'Y'"
wangna committed
35
          label="演示/交付"
wangna committed
36 37 38
          name="preperp"
        >
          <c-content>
wangna committed
39
            <m-preperp :model="model" :codes="codes" :sndto="sndto" />
wangna committed
40 41 42 43
          </c-content>
        </el-tab-pane>

        <!--PD000027 -->
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
        <el-tab-pane label="费用/账务" name="engp,setpan,glepan">
         <c-content>
           <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>
               <el-collapse-item title="会计分录" name="glepan">
                 <!-- 会计分录 -->
                 <m-glepan :model="model" :codes="codes" />
               </el-collapse-item>
             </el-collapse>
           </div>
         </c-content>
       </el-tab-pane>

        <el-tab-pane label="备查/附言" name="addbcb">
         <c-content>
           <m-addbcb :model="model" :codes="codes" />
         </c-content>
       </el-tab-pane>
wangna committed
70 71

        <!--PD000529 -->
72 73 74 75 76
     <el-tab-pane label="报文/面函" name="docpan">
  <c-content>
    <m-docpan :model="model" :codes="codes" />
  </c-content>
</el-tab-pane>
wangna committed
77

78 79 80 81 82 83
        <el-tab-pane label="附件信息" name="doctre">
            <c-content>
              <m-doctre :model="model" :codes="codes" />
            </c-content>
          </el-tab-pane>
   
wangna committed
84
      </c-tabs>
闫泽浩 committed
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
     </el-form>
           <c-grid-ety-prompt-dialog
        ref="etyDialog"
        :promptData="promptData"
        @select-ety="selectEty"
      >
      </c-grid-ety-prompt-dialog>
      <c-grid-ety-prompt-dialog
        ref="doxpDialog"
        :isPty="false"
        :promptData="promptData"
        @select-ety="selectMsg"
      >
      </c-grid-ety-prompt-dialog>

      <c-function-btn
        :handleSubmit="handleSubmit"
        :handleCheck="handleCheck"
        :handleStash="handleStash"
      >
      </c-function-btn>
    </c-page>
wangna committed
107 108 109
  </div>
</template>
<script>
wangna committed
110 111 112 113
import Api from "~/service/Api";
import CodeTable from "~/config/CodeTable";
import Getamc from "~/model/Getamc";
import commonProcess from "~/mixin/commonProcess";
wangna committed
114
import commonFuncs from "~/mixin/commonFuncs";
wangna committed
115 116 117 118
import Check from "~/model/Getamc/Check";
import Default from "~/model/Getamc/Default";
import Pattern from "~/model/Getamc/Pattern";
import Conp from "./Conp";
119
import Ovwp1 from "./Ovwp1";
wangna committed
120 121 122 123
import Preperp from "./Preperp";
import Detp from "./Detp";
import Gidtxtp from "./Gidtxtp";
import Opnp from "./Opnp";
124
import Addbcb from "./Addbcb";
wangna committed
125 126 127

import Engp from "~/views/Public/Engp";
import Setpan from "~/views/Public/Setpan";
wangna committed
128
import Glepan from "~/views/Public/Glepan";
wangna committed
129 130
import Coninfp from "~/views/Public/Coninfp";
import Docpan from "~/views/Public/Docpan";
wangna committed
131
import Doctre from "~/views/Public/Doctre";
wangna committed
132
import Limitbody from "~/views/Public/Limitbody";
133
import Ovwp from "./Ovwp";
wangna committed
134 135

export default {
wangna committed
136 137 138
  name: "Getamc",
  components: {
    "m-conp": Conp,
139
    "m-ovwp1": Ovwp1,
wangna committed
140 141 142
    "m-preperp": Preperp,
    "m-detp": Detp,
    "m-gidtxtp": Gidtxtp,
143
    "m-addbcb": Addbcb,
wangna committed
144 145
    "m-engp": Engp,
    "m-setpan": Setpan,
wangna committed
146
    "m-glepan": Glepan,
wangna committed
147 148
    "m-coninfp": Coninfp,
    "m-docpan": Docpan,
wangna committed
149
    "m-doctre": Doctre,
wangna committed
150 151
    "m-opnp": Opnp,
    "m-limitbody": Limitbody,
152
    "m-ovwp": Ovwp,
wangna committed
153 154 155 156 157 158 159 160 161
  },
  provide() {
    return {
      root: this,
    };
  },
  mixins: [commonProcess, commonFuncs], // 里面包含了Default、Check等的公共处理
  data() {
    return {
162
      tabVal: "ovwp",
wangna committed
163 164 165 166 167 168 169 170 171
      trnName: "getamc",
      model: new Getamc().data,
      checkRules: Check,
      defaultRules: Default,
      pattern: Pattern,
      rules: null,
      codes: {
        ...CodeTable,
      },
wangna committed
172 173
      bookings: false,
      attachments: false,
wangna committed
174
      sndto: [],
175
      activeNames: ["engp"],
wangna committed
176 177 178 179 180
    };
  },
  methods: {
    myTabClick(tab) {
      this.tabClick(tab);
wangna committed
181 182
      if (tab.name === "setpan") {
        (this.bookings = true), (this.attachments = true);
wangna committed
183
      }
wangna committed
184 185 186
      /**
       *  do it yourself
       **/
wangna committed
187
    },
wangna committed
188 189 190 191 192 193 194 195 196 197 198 199 200
    buildSndto(data){
      var result = [];
      for(let i = 0; i < data.length; i++){
        var temp = data[i].split('\t');
        let newList = {
          value: temp[0],
          label: temp[1],
        }
        result.push(newList);
      }
      this.sndto = result;
      console.log(this.sndto)
    },
wangna committed
201 202 203 204 205 206
  },
  created: async function () {
    console.log("进入getamc交易");
    let rtnmsg = await this.init({});
    if (rtnmsg.respCode == SUCCESS) {
      this.updateModel(rtnmsg.data);
wangna committed
207 208
      console.log(rtnmsg.codeSet['gidgrp.rec.sndto'])
      this.buildSndto(rtnmsg.codeSet['gidgrp.rec.sndto'] || []);
wangna committed
209
      //TODO 处理数据逻辑
wangna committed
210
      if (this.isInDisplay) {
wangna committed
211 212
        this.restoreDisplay();
      }
wangna committed
213 214
    } else {
      this.$notify.error({ title: "错误", message: "服务请求失败!" });
wangna committed
215
    }
wangna committed
216 217
  },
};
wangna committed
218 219 220
</script>
<style>
</style>