index.vue 2.3 KB
<template>
  <div class="eContainer">
    <c-page title="汇款注销">
      <el-form :model="model" :rules="rules" ref="modelForm" label-width="150px" label-position="right" size="small" :validate-on-rule-change="false">
        <c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="myTabClick">
          <m-info :model="model" :codes="codes" />
        </c-tabs>
      </el-form>
      <!-- 底部按钮 -->
      <c-function-btn :handleSubmit="handleSubmit" :handleCheck="handleCheck" :handleStash="handleStash" ref="commonBtn" @handleSureWarning="handleSureWarning">
      </c-function-btn>
    </c-page>
  </div>
</template>
<script>
import Api from "~/service/Api";
import CodeTable from "~/config/CodeTable";
import event from "../event";
import Cptcan from "../model";
import commonProcess from "~/mixin/commonProcess";
import operationFunc from "~/mixin/operationFunc";
import commonDepend from "~/mixin/commonDepend";
import Check from "../model/check";
import Default from "../model/default";
import buildFn from "../event/buildCommons.js";

import Info from "~/page/Remittance/Cptrop/views/info";

export default {
  name: "Cptcan",
  components: {
    "m-info": Info,
  },
  provide() {
    return {
      root: this
    };
  },
  mixins: [
    commonProcess,
    Check,
    Default,
    operationFunc,
    event,
    commonDepend,
    buildFn
  ], // 里面包含了Default、Check等的公共处理
  data() {
    return {
      tabVal: "",
      trnName: "cptcan",
      trnType: "",
      model: new Cptcan().data,
      codes: {...CodeTable}
    };
  },
  methods: {
    myTabClick(tab) {
      this.tabClick(tab);
      /**
       *  do it yourself
       **/
    }
  },
  created: async function() {
    console.log("进入cptcan交易");
    let params = {
      transName: this.trnName,
      cpdgrp: {
        rec: {
          inr: this.$route.query.inr,
          ownref: this.$route.query.ownref
        }
      }
    };
    let rtnmsg = await this.init(params);
    if (rtnmsg) {
      //TODO 处理数据逻辑
      this.model.cpdgrp.rec.paytyp = rtnmsg.cpdgrp.rec.paytyp;
      this.model.cpdgrp.rec.paydat = rtnmsg.cpdgrp.rec.paydat;
      this.model.cpdgrp.rec.valdat = rtnmsg.cpdgrp.rec.valdat;
    }
    //this.model.cpdgrp.rec.cptrou = "SWIFT";
    this.cptrouChange("1");
  }
};
</script>
<style>
</style>