index.vue 7.92 KB
Newer Older
1 2
<template>
  <div class="eContainer">
xiameng committed
3
    <c-page title="进口保函赔付">
xiameng committed
4
   <!-- <c-function-btn>
panziyi committed
5 6 7 8 9 10 11
      <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>
      <el-button size="small">智能提示</el-button>
xiameng committed
12
    </c-function-btn> -->
panziyi committed
13 14 15 16
    <el-form
      :model="model"
      :rules="rules"
      ref="modelForm"
17
      label-width="120px"
panziyi committed
18 19 20 21
      label-position="right"
      size="small"
      :validate-on-rule-change="false"
    >
panziyi committed
22
      <c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="myTabClick">
xiameng committed
23

panziyi committed
24
        <!--PD000027 -->
xiameng committed
25
        <el-tab-pane label="业务信息" name="ovwp">
panziyi committed
26
          <c-content>
xiameng committed
27
            <m-ovwp :model="model" :codes="codes" />
panziyi committed
28 29 30 31
          </c-content>
        </el-tab-pane>

        <!--PD000001 -->
wangna committed
32
        <el-tab-pane label="保证金" name="ccvpan">
xiameng committed
33
          <c-content>
panziyi committed
34
          <m-ccvpan :model="model" :codes="codes" />
xiameng committed
35
          </c-content>
panziyi committed
36 37
        </el-tab-pane>

xiameng committed
38
        <el-tab-pane label="统一授信" name="limitbody,shisuan">
panziyi committed
39
          <c-content>
xiameng committed
40 41 42 43 44 45 46 47 48 49
            <div class="eibs-tab">
              <el-collapse v-model="activeNames1">
                <el-collapse-item title="统一授信" name="limitbody">
                  <m-limitbody :model="model" :codes="codes" />
                </el-collapse-item>
                <el-collapse-item title="试算结果" name="shisuan">
                  <m-shisuan :model="model" :codes="codes" />
                </el-collapse-item>
              </el-collapse>
            </div>
panziyi committed
50
          </c-content>
panziyi committed
51 52
        </el-tab-pane>

xiameng committed
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
  <!--PD000027 -->
        <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>

panziyi committed
75
        <!--PD000000 -->
xiameng committed
76
        <el-tab-pane label="备查/附言" name="coninfp">
xiameng committed
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
            <c-content>
              <div class="eibs-tab">
                <el-collapse v-model="activeNames">
                  <el-collapse-item title="附言" name="coninfp">
                    <m-coninfp :model="model" :codes="codes" />
                  </el-collapse-item>
                </el-collapse>
              </div>
            </c-content>
          </el-tab-pane>

        <!--PD000002 -->
        <el-tab-pane label="申报信息" name="cnyp">
          <c-content>
          <m-cnyp :model="model" :codes="codes" />
          </c-content>
panziyi committed
93 94 95
        </el-tab-pane>

        <!--PD000529 -->
xiameng committed
96
        <el-tab-pane label="报文/面函" name="docpan">
xiameng committed
97
          <c-content>
panziyi committed
98
          <m-docpan :model="model" :codes="codes" />
xiameng committed
99
          </c-content>
panziyi committed
100 101 102
        </el-tab-pane>

        <!--PD000546 -->
xiameng committed
103
        <el-tab-pane label="附件信息" name="doctre">
xiameng committed
104
          <c-content>
panziyi committed
105
          <m-doctre :model="model" :codes="codes" />
xiameng committed
106
          </c-content>
panziyi committed
107 108 109
        </el-tab-pane>

      </c-tabs>
110
    </el-form>
panziyi committed
111 112 113 114 115 116 117 118 119 120 121 122 123
    <c-grid-ety-prompt-dialog
      ref="etyDialog"
      :promptData="promptData"
      v-on: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>
xiameng committed
124 125 126 127 128 129

    <c-function-btn
      :handleSubmit="handleSubmit"
      :handleCheck="handleCheck"
      :handleStash="handleStash">
    </c-function-btn>
xiameng committed
130 131

    </c-page>
132 133 134
  </div>
</template>
<script>
panziyi committed
135 136 137
import Api from "~/service/Api";
import CodeTable from "~/config/CodeTable";
import Gitset from "~/model/Gitset";
panziyi committed
138 139
import commonProcess from "~/mixin/commonProcess";
import commonFuncs from "~/mixin/commonFuncs";
panziyi committed
140 141 142
import Check from "~/model/Gitset/Check";
import Default from "~/model/Gitset/Default";
import Pattern from "~/model/Gitset/Pattern";
wangna committed
143

panziyi committed
144 145 146 147 148 149 150 151
import Limitbody from "~/views/Public/Limitbody";
import Engp from "~/views/Public/Engp";
import Doctre from "~/views/Public/Doctre";
import Docpan from "~/views/Public/Docpan";
import Setpan from "~/views/Public/Setpan";
import Coninfp from "~/views/Public/Coninfp";
import Glepan from "~/views/Public/Glepan";
import Ccvpan from "~/views/Public/Ccvpan";
xiameng committed
152
import Ovwp from "./Ovwp";
panziyi committed
153 154
import Cnyp from "./Cnyp";
import Shisuan from "./Shisuan";
155 156

export default {
panziyi committed
157 158
  name: "Gitset",
  components: {
xiameng committed
159
    "m-ovwp": Ovwp,
panziyi committed
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
    "m-engp": Engp,
    "m-ccvpan": Ccvpan,
    "m-setpan": Setpan,
    "m-glepan": Glepan,
    "m-coninfp": Coninfp,
    "m-docpan": Docpan,
    "m-doctre": Doctre,
    "m-cnyp": Cnyp,
    "m-shisuan": Shisuan,
    "m-limitbody": Limitbody,
  },
  provide() {
    return {
      root: this,
    };
  },
  mixins: [commonProcess, commonFuncs], // 里面包含了Default、Check等的公共处理
  data() {
    return {
xiameng committed
179
      tabVal: "ovwp",
panziyi committed
180 181 182 183 184 185 186
      trnName: "gitset",
      model: new Gitset().data,
      checkRules: Check,
      defaultRules: Default,
      pattern: Pattern,
      rules: null,
      codes: { ...CodeTable },
187
      activeNames: ["engp","coninfp"],
xiameng committed
188
      activeNames1: ["limitbody"],
panziyi committed
189 190
    };
  },
panziyi committed
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212
   watch:{
         "model.setmod.doccur":{
              immediate:true,
              handler(){
                let cur = this.model.setmod.doccur;
                let amt = this.model.setmod.docamt;
                let doc = this.model.gcdgrp.rec.docprbrol
                this.det202cvName= "Payment 202 "+doc+" "+cur+" "+ amt;
                this.det756Name  = "Payment 756 "+doc+" "+cur+" "+ amt;
              }
            },
          "model.mtabut.clsflg":{
                  immediate:true,
                  handler(){
                    let cur = this.model.setmod.doccur;
                    let amt = this.model.setmod.docamt;
                    let doc = this.model.gcdgrp.rec.docprbrol
                    this.det202cvName= "Payment 202 "+doc+" "+cur+" "+ amt;
                    this.det756Name  = "Payment 756 "+doc+" "+cur+" "+ amt;
              }
            },
    },
panziyi committed
213
  methods: {
panziyi committed
214
   myTabClick(tab) {
panziyi committed
215 216 217 218 219 220
      this.tabClick(tab);
      const name = tab.name;
      let rulePath;
      if(name === 'basp'){
        rulePath = "bopmod.dbcp.basp"
      }
panziyi committed
221 222 223
      if(name === 'basp1'){
        rulePath = "bopmod.dbfp.basp"
      }
panziyi committed
224
      if(name === 'outp'){
225
        rulePath = "cnybop.outp"
panziyi committed
226 227 228 229
      }
      if (name === "cips") {
        rulePath = "trnmod.cipmod.cips"
      }
nanrui committed
230 231 232 233 234 235
      // if(name === 'det756'){
      //   rulePath = "setmod.setglg.setgll(2).sespay.det756"
      // }
      // if (name === "det202cv") {
      //   rulePath = "setmod.setglg.setgll(2).sespay.det202cv"
      // }
panziyi committed
236 237 238 239 240 241 242 243
      if (!!rulePath) {
        this.executeRule(rulePath).then((res) => {
          if (res.respCode == SUCCESS) {
            this.updateModel(res.data);
          }
        });
      }
    },
panziyi committed
244 245 246 247 248 249 250
  },
  created: async function () {
    console.log("进入gitset交易");
    let rtnmsg = await this.init({});
    if (rtnmsg.respCode == SUCCESS) {
      //TODO 处理数据逻辑
      this.updateModel(rtnmsg.data);
panziyi committed
251
      this.model.mtabut.clsflg="X";
panziyi committed
252 253 254
      if (this.isInDisplay) {
        this.restoreDisplay();
      }
panziyi committed
255 256
    } else {
      this.$notify.error({ title: "错误", message: "服务请求失败!" });
257
    }
panziyi committed
258 259
  },
};
260 261 262
</script>
<style>
</style>