index.vue 3.6 KB
Newer Older
chenzhaole committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<template>
  <c-page title="境内外币汇出汇款">
    <div class="eContainer">
    <c-bus-button :$pntvm="this"></c-bus-button>
      <el-form
        :model="model"
        :rules="rules"
        ref="modelForm"
        label-width="150px"
        size="small"
      >
        <c-tabs ref="elment" :value="tabVal" type="card" @tab-click="tabClick">
          <el-tab-pane label="Overview" name="opnp1">
            <!--PD000020 -->
            <c-content>
            <m-opnp1 :model="model" :codes="codes" />
            </c-content>
          </el-tab-pane>
19 20 21 22 23 24
          <el-tab-pane label="parties" name="pardet">
            <!--PD000546 parties-->
            <c-content>
            <m-pardet :model="model" :codes="codes" />
            </c-content>
          </el-tab-pane>
chenzhaole committed
25
          <el-tab-pane label="账务" name="setpan">
26
            <!--PD000006 settlment-->
chenzhaole committed
27 28
            <m-setpan :model="model" :codes="codes" />
          </el-tab-pane>
29 30 31 32
          <el-tab-pane label="分录" name="glepan">
            <!--PD000006 bookings-->
            <m-glepan :model="model" :codes="codes" />
          </el-tab-pane>
chenzhaole committed
33 34 35 36 37 38 39 40
          <el-tab-pane label="附言" name="coninfp">
            <!--PD000000 -->
            <m-coninfp :model="model" :codes="codes" />
          </el-tab-pane>
          <el-tab-pane label="报文及面函" name="docpan">
            <!--PD000000 -->
            <m-docpan :model="model" :codes="codes" />
          </el-tab-pane>
41 42 43 44
          <el-tab-pane label="附件" name="doctre">
            <!--attachments -->
            <m-doctre :model="model" :codes="codes" />
          </el-tab-pane>
chenzhaole committed
45 46 47 48
          <el-tab-pane label="外管信息" name="wg">
            <!--PD000546 -->
            <m-wg :model="model" :codes="codes" />
          </el-tab-pane>
49
          
chenzhaole committed
50 51 52 53 54 55 56 57 58 59 60
        </c-tabs>
      </el-form>
    </div>
  </c-page>
</template>

<script>
import Api from "~/service/Api";
import Utils from "~/utils/index";
import CodeTable from "~/config/CodeTable";
import Cptato from "~/model/Cptato";
wangren committed
61
import commonProcess from "~/mixin/commonProcess";
chenzhaole committed
62 63 64 65 66 67
import Pattern from "~/model/Cptato/Pattern";
import Opnp1 from "./Opnp1";
import Wg from "./Wg";
import Setpan from "~/views/Public/Setpan";
import Coninfp from "~/views/Public/Coninfp";
import Docpan from "~/views/Public/Docpan";
68 69 70
import Glepan from "~/views/Public/Glepan";
import Pardet from "./Pardet";
import Doctre from "~/views/Public/Doctre";
chenzhaole committed
71 72 73 74 75 76 77 78 79

export default {
    name: "Cptato",
    components:{
        "m-opnp1" : Opnp1,
        "m-setpan" : Setpan,
        "m-docpan" : Docpan,
        "m-coninfp" : Coninfp,
        "m-wg" : Wg,
80 81 82
        "m-glepan" : Glepan,
        "m-pardet" : Pardet,
        "m-doctre" : Doctre,
chenzhaole committed
83 84 85 86 87 88
    },
    provide() {
        return {
            root: this,
        };
    },
wangren committed
89
    mixins: [commonProcess],    // 里面包含了Default、Check等的公共处理
chenzhaole committed
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
    data(){
        return {
            tabVal: "opnp1",
            trnName: "cptato",
            model: new Cptato().data,
            rules: Pattern,
            codes: { ...CodeTable },
        };
    },
    methods:{
        myTabClick(tab){
            this.tabClick(tab)
            /**
            *  do it yourself
            **/
        }
     },
    created: async function () {
    console.log("进入cptato交易");
    let rtnmsg = await this.init(this.$route.query);
    if (rtnmsg.respCode == SUCCESS) {
      //TODO 处理数据逻辑
      Utils.copyValueFromVO(this.model, rtnmsg.data);
      if (this.isInDisplay) {
        this.restoreDisplay();
      }
    } else {
      this.$notify.error({ title: "错误", message: "服务请求失败!" });
    }
  },
};
</script>
<style>

</style>