index.vue 4.33 KB
Newer Older
chenzhaole committed
1
<template>
LiRui committed
2 3
  <div class="eContainer">
    <c-page title="境内外币汇出汇款">
4
      <el-form :model="model" :rules="rules" ref="modelForm" label-width="120px" size="small">
chenzhaole committed
5
        <c-tabs ref="elment" :value="tabVal" type="card" @tab-click="tabClick">
LiRui committed
6
          <el-tab-pane label="业务信息" name="ovwp">
chenzhaole committed
7
            <c-content>
LiRui committed
8
              <m-ovwp :model="model" :codes="codes" />
chenzhaole committed
9 10
            </c-content>
          </el-tab-pane>
LiRui committed
11
          <el-tab-pane label="费用/账务" name="setpan,glepan">
12
            <c-content>
LiRui committed
13 14 15 16 17 18 19 20 21 22 23 24
              <div class="eibs-tab">
                <el-collapse v-model="activeNames">
                  <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>
25 26
            </c-content>
          </el-tab-pane>
LiRui committed
27 28 29 30
          <el-tab-pane label="备查/附言" name="addbcb">
            <c-content>
              <m-addbcb :model="model" :codes="codes" />
            </c-content>
31
          </el-tab-pane>
LiRui committed
32 33 34 35 36

          <el-tab-pane label="申报信息" name="cnyp">
            <c-content>
              <m-cnyp :model="model" :codes="codes" />
            </c-content>
chenzhaole committed
37
          </el-tab-pane>
nanrui committed
38
          <!-- 报文和面函 -->
LiRui committed
39
          <el-tab-pane label="报文/面函" name="docpan">
LiRui committed
40
            <c-content>
chenzhaole committed
41
            <!--PD000000 -->
LiRui committed
42 43
              <m-docpan :model="model" :codes="codes" />
            </c-content>
chenzhaole committed
44
          </el-tab-pane>
LiRui committed
45
          <el-tab-pane label="附件信息" name="doctre">
LiRui committed
46
            <c-content>
nanrui committed
47
            <!--附件 -->
LiRui committed
48 49
              <m-doctre :model="model" :codes="codes" />
            </c-content>>
50
          </el-tab-pane>
51

chenzhaole committed
52 53
        </c-tabs>
      </el-form>
54 55
      <c-grid-ety-prompt-dialog ref="etyDialog" :promptData="promptData" v-on:select-ety="selectEty">
      </c-grid-ety-prompt-dialog>
LiRui committed
56 57 58 59 60
            <!-- <c-bus-button :$pntvm="this"></c-bus-button> -->
            <c-function-btn :handleSubmit="handleSubmit" :handleCheck="handleCheck" :handleStash="handleStash">
      </c-function-btn>
    </c-page>
  </div>
chenzhaole committed
61 62 63 64 65 66 67
</template>

<script>
import Api from "~/service/Api";
import Utils from "~/utils/index";
import CodeTable from "~/config/CodeTable";
import Cptato from "~/model/Cptato";
wangren committed
68
import commonProcess from "~/mixin/commonProcess";
69
import commonFuncs from "~/mixin/commonFuncs";
LiRui committed
70
import Check from '~/model/Cptato/Check'
chenzhaole committed
71
import Pattern from "~/model/Cptato/Pattern";
LiRui committed
72
import Default from "~/model/Cptato/Default";
73

LiRui committed
74 75 76
import Ovwp from "./Ovwp";
import Cnyp from "./Cnyp";
import Addbcb from "./Addbcb";
chenzhaole committed
77

78 79 80 81 82 83
import Setpan from "~/views/Public/Setpan";
import Coninfp from "~/views/Public/Coninfp";
import Docpan from "~/views/Public/Docpan";
import Glepan from "~/views/Public/Glepan";
import Doctre from "~/views/Public/Doctre";
import Sbxx from "~/views/Public/Sbxx";
84

chenzhaole committed
85
export default {
86 87
  name: "Cptato",
  components: {
LiRui committed
88
    "m-ovwp": Ovwp,
89 90 91 92 93 94
    "m-setpan": Setpan,
    "m-docpan": Docpan,
    "m-coninfp": Coninfp,
    "m-glepan": Glepan,
    "m-doctre": Doctre,
    "m-sbxx": Sbxx,
LiRui committed
95 96
    "m-cnyp": Cnyp,
    "m-addbcb": Addbcb,
97 98 99 100 101 102 103 104 105
  },
  provide() {
    return {
      root: this,
    };
  },
  mixins: [commonProcess, commonFuncs],    // 里面包含了Default、Check等的公共处理
  data() {
    return {
LiRui committed
106
      tabVal: "ovwp",
107 108
      trnName: "cptato",
      model: new Cptato().data,
LiRui committed
109 110 111
      pattern: Pattern,
      checkRules: Check,
      defaultRules: Default,
LiRui committed
112
      activeNames: ["setpan"],
LiRui committed
113
      rules: null,
114 115 116 117 118 119 120 121 122 123 124 125 126
      codes: { ...CodeTable },
    };
  },
  methods: {
    myTabClick(tab) {
      this.tabClick(tab)
      /**
      *  do it yourself
      **/

    }
  },
  created: async function () {
chenzhaole committed
127 128 129
    console.log("进入cptato交易");
    let rtnmsg = await this.init(this.$route.query);
    if (rtnmsg.respCode == SUCCESS) {
LiRui committed
130
      this.updateModel(rtnmsg.data);
chenzhaole committed
131 132 133 134 135 136 137 138 139 140 141 142 143 144
      //TODO 处理数据逻辑
      Utils.copyValueFromVO(this.model, rtnmsg.data);
      if (this.isInDisplay) {
        this.restoreDisplay();
      }
    } else {
      this.$notify.error({ title: "错误", message: "服务请求失败!" });
    }
  },
};
</script>
<style>

</style>