<template>
  <c-page title="国内证承兑">
    <div class="eContainer bdtudp">
      <el-form
        :model="model"
        :rules="rules"
        ref="modelForm"
        label-width="100px"
        size="small"
        :validate-on-rule-change="false"
      >
        <c-tabs
          :value="initPane"
          ref="elment"
          type="card"
          @tab-click="tabClick"
        >
          <!--PD000032 -->
          <el-tab-pane label="内容" name="payp">
            <m-payp :model="model" :codes="codes" />
          </el-tab-pane>

          <!--PD000147 -->
          <!-- <el-tab-pane label="PD000147" name="mt754p">
            <m-mt754p :model="model" :codes="codes" />
          </el-tab-pane> -->

          <!--PD000139 -->
          <!-- <el-tab-pane label="PD000139" name="mt750p">
            <m-mt750p :model="model" :codes="codes" />
          </el-tab-pane> -->

          <!--PD000137 -->
          <!-- <el-tab-pane label="PD000137" name="ovwp">
            <m-ovwp :model="model" :codes="codes" />
          </el-tab-pane> -->

          <!--PD000062 -->
          <el-tab-pane label="不符点" name="docpre">
            <m-docpre :model="model" :codes="codes" />
          </el-tab-pane>

          <!--PD000079 -->
          <el-tab-pane label="明细" name="shpdet">
            <m-shpdet :model="model" :codes="codes" />
          </el-tab-pane>

          <!--PD000168 -->
          <el-tab-pane label="信用证内容" name="brlip">
            <m-brlip :model="model" :codes="codes" />
          </el-tab-pane>

          <!--PD000213 -->
          <!-- <el-tab-pane label="PD000213" name="othadvtypp">
            <m-othadvtypp :model="model" :codes="codes" />
          </el-tab-pane> -->
        </c-tabs>
        <c-bus-button :$pntvm="this"></c-bus-button>
      </el-form>
    </div>
  </c-page>
</template>
<script>
import Api from "~/service/Api";
import CodeTable from "~/config/CodeTable";
import Bdtudp from "~/model/Bdtudp";
import CommonProcess from "~/mixin/CommonProcess";
import Pattern from "~/model/Bdtudp/Pattern";
import Payp from "./Payp";
//import Mt754p from "./Mt754p";
//import Mt750p from "./Mt750p";
//import Ovwp from "./Ovwp";
import Docpre from "./Docpre";
import Shpdet from "./Shpdet";
import Brlip from "./Brlip";
//import Othadvtypp from "./Othadvtypp";

export default {
  components: {
    "m-payp": Payp,
    //"m-mt754p": Mt754p,
    //"m-mt750p": Mt750p,
    //"m-ovwp": Ovwp,
    "m-docpre": Docpre,
    "m-shpdet": Shpdet,
    "m-brlip": Brlip,
    //"m-othadvtypp": Othadvtypp,
  },
  provide() {
    return {
      root: this,
    };
  },
  mixins: [CommonProcess], // 里面包含了Default、Check等的公共处理
  data() {
    return {
      initPane: "payp",
      model: new Bdtudp().data,
      // defaultRule:Default,
      // rules:this.mergeRules(Pattern,Check),
      rules: Pattern,
      codes: {},
    };
  },
  methods: {
    tabClick() {},
  },
  created: async function () {
    console.log("进入bdtudp交易");
    let rtnmsg = await Api.post("bdtudp/init", { params: {} });
    if (rtnmsg.retcod == SUCCESS) {
      //TODO 处理数据逻辑
    } else {
      this.$notify.error({ title: "错误", message: "服务请求失败！" });
    }
  },
};
</script>
<style>
.bdtudp .el-form-item .el-form-item__label {
  width: 200px !important;
}

.bdtudp .el-form-item .el-form-item__content {
  margin: 0 50px 0 200px !important;
}
</style>
