index.vue 6.78 KB
Newer Older
fanyanyan committed
1 2
<template>
  <div class="eContainer">
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
    <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> -->
      <el-button size="small">制裁信息</el-button>
      <!-- <el-button size="small">拆分报文</el-button> -->
      <el-button size="small">智能提示</el-button>
    </c-function-btn>
    <el-form
      :model="model"
      :rules="rules"
      ref="modelForm"
22
      label-width="120px"
23 24 25 26 27 28
      label-position="right"
      size="small"
      :validate-on-rule-change="false"
    >
      <c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="myTabClick">
        <!--bttset PD000034 Funds Settlement -->
wangna committed
29
        <el-tab-pane label="转让证收汇" name="setp">
30
          <c-content>
31 32 33 34
            <m-setp ref="setp" :model="model" :codes="codes" />
          </c-content>
        </el-tab-pane>

wangna committed
35
        <el-tab-pane label="表外" name="engp">
36 37 38 39 40
          <c-content>
            <m-engp :model="model" :codes="codes" />
          </c-content>
        </el-tab-pane>

wangna committed
41
        <el-tab-pane label="费用及账务" name="setpan">
42
          <c-content>
43
            <m-setpan :model="model" :codes="codes" />
44
          </c-content>
45 46
        </el-tab-pane>

wangna committed
47
        <el-tab-pane label="分录" name="glepan">
liyixun committed
48 49 50 51
          <c-content>
            <m-glepan :model="model" :codes="codes" />
          </c-content>
        </el-tab-pane>
52

wangna committed
53
        <el-tab-pane label="附言" name="coninfp">
54 55 56 57 58
          <c-content>
            <m-coninfp :model="model" :codes="codes" />
          </c-content>
        </el-tab-pane>

wangna committed
59
        <el-tab-pane label="报文及面函" name="doc">
60 61 62
          <m-doc :model="model" :codes="codes" />
        </el-tab-pane>

wangna committed
63
        <el-tab-pane label="交易附件" name="doctre">
64 65
          <c-content>
            <m-doctre :model="model" :codes="codes" />
66 67 68
          </c-content>
        </el-tab-pane>
        <!--lendoc PD000001 收账通知 -->
69
        <el-tab-pane label="收账通知" name="docpan">
70 71 72
          <m-docpan :model="model" :codes="codes" />
        </el-tab-pane>
        <!--bopgat PD000006 外管信息 -->
73
        <el-tab-pane label="外管信息" name="wg">
74 75 76
          <m-wg :model="model" :codes="codes" />
        </el-tab-pane>
        <!--dbdp PD000000 境内收入申报单-基础信息 -->
77 78 79 80 81 82 83 84 85 86 87 88
        <el-tab-pane
          v-if="model.bopmod.szflg == '1' && model.bopmod.basflg == 'X'"
          label="涉外收入申报单-基础信息"
          name="basp"
        >
          <m-basp :model="model" :codes="codes" />
        </el-tab-pane>
        <el-tab-pane
          v-if="model.bopmod.szflg == '2' && model.bopmod.basflg == 'X'"
          label="境内收入申报单-基础信息"
          name="basp1"
        >
89 90 91
          <m-basp :model="model" :codes="codes" />
        </el-tab-pane>
        <!--cnybop PD000002 跨境人民币申报 -->
92
        <el-tab-pane label="跨境人民币申报" name="cnyp">
93 94 95
          <m-cnyp :model="model" :codes="codes" />
        </el-tab-pane>
        <!--cnybop PD000001 2101跨境收入信息 -->
liyixun committed
96 97 98 99 100
        <el-tab-pane
          v-if="model.cnybop.cnyflg == '1'"
          label="2101跨境收入信息"
          name="incp"
        >
101 102 103
          <c-content>
            <m-incp :model="model" :codes="codes" />
          </c-content>
104 105
        </el-tab-pane>
        <!--limmod PD001139 试算结果 -->
106
        <el-tab-pane label="试算结果" name="shisuan">
107 108 109
          <m-shisuan :model="model" :codes="codes" />
        </el-tab-pane>
      </c-tabs>
fanyanyan committed
110
    </el-form>
liyixun committed
111 112 113 114 115 116 117
    <c-grid-ety-prompt-dialog
      ref="doxpDialog"
      :isPty="false"
      :promptData="promptData"
      @select-ety="selectMsg"
    >
    </c-grid-ety-prompt-dialog>
liyixun committed
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>
fanyanyan committed
124 125 126
  </div>
</template>
<script>
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
import Api from "~/service/Api";
import CodeTable from "~/config/CodeTable";
import Bttset from "~/model/Bttset";
import commonProcess from "~/mixin/commonProcess";
import commonFuncs from "~/mixin/commonFuncs";
import Check from "~/model/Bttset/Check";
import Default from "~/model/Bttset/Default";
import Pattern from "~/model/Bttset/Pattern";
import Setp from "./Setp";
import Docpan from "./Docpan";
import Wg from "./Wg";
import Basp from "./Basp";
import Cnyp from "./Cnyp";
import Incp from "./Incp";
import Shisuan from "./Shisuan";
fanyanyan committed
142

143 144 145 146 147
import Engp from "~/views/Public/Engp";
import Setpan from "~/views/Public/Setpan";
import Coninfp from "~/views/Public/Coninfp";
import Doc from "~/views/Public/Docpan";
import Doctre from "~/views/Public/Doctre";
148
import Glepan from "~/views/Public/Glepan";
149

fanyanyan committed
150
export default {
151 152 153 154 155 156 157 158 159
  name: "Bttset",
  components: {
    "m-setp": Setp,
    "m-docpan": Docpan,
    "m-wg": Wg,
    "m-basp": Basp,
    "m-cnyp": Cnyp,
    "m-incp": Incp,
    "m-shisuan": Shisuan,
160 161 162 163 164
    "m-engp": Engp,
    "m-setpan": Setpan,
    "m-coninfp": Coninfp,
    "m-doc": Doc,
    "m-doctre": Doctre,
liyixun committed
165
    "m-glepan": Glepan,
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193
  },
  provide() {
    return {
      root: this,
    };
  },
  mixins: [commonProcess, commonFuncs], // 里面包含了Default、Check等的公共处理
  data() {
    return {
      tabVal: "setp",
      trnName: "bttset",
      trnType: "",
      model: new Bttset().data,
      checkRules: Check,
      defaultRules: Default,
      pattern: Pattern,
      rules: null,
      codes: {
        ...CodeTable,
      },
    };
  },
  methods: {
    myTabClick(tab) {
      this.tabClick(tab);
      /**
       *  do it yourself
       **/
liyixun committed
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
      let name = tab.name;
      let rulePath;
      if (name === "basp") {
        rulePath = "bopmod.dbap.basp";
      }
      if (name === "basp1") {
        rulePath = "bopmod.dbdp.basp";
      }
      if (name === "wg") {
        rulePath = "bopgat.wg";
      }
      if (name === "incp") {
        rulePath = "Cnybop.incp";
      }
      if (!!rulePath) {
        this.executeRule(rulePath).then((res) => {
          if (res.respCode == SUCCESS) {
            this.updateModel(res.data);
          }
        });
      }
fanyanyan committed
215
    },
216 217 218 219 220 221
  },
  created: async function () {
    console.log("进入bttset交易");
    let rtnmsg = await this.init({});
    if (rtnmsg.respCode == SUCCESS) {
      this.updateModel(rtnmsg.data);
222 223 224 225 226
      if (this.isInDisplay) {
        this.restoreDisplay();
      }
      this.$refs.setp.$refs.table.$refs.table.toggleAllSelection();

227 228 229
      //TODO 处理数据逻辑
    } else {
      this.$notify.error({ title: "错误", message: "服务请求失败!" });
fanyanyan committed
230
    }
231 232
  },
};
fanyanyan committed
233 234 235
</script>
<style>
</style>