index.vue 4.46 KB
Newer Older
fukai committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 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 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
<template>
  <div class="eContainer">
    <c-page title="境外汇款申请书删除">
      <el-form
        :model="model"
        ref="modelForm"
        label-width="120px"
        label-position="right"
        size="small"
        :rules="allRules"
        :validate-on-rule-change="false"
      >
        <c-tabs
          v-model="tabVal"
          ref="elment"
          type="card"
          @tab-click="myTabClick"
        >
          <!--dbap PD000050 主面板 -->
          <el-tab-pane label="境外汇款申请书删除" name="ovwp">
            <c-content>
              <div class="eibs-tab">
                <c-collapse
                  ref="ovwp"
                  style="margin-bottom: 5px"
                  v-model="activeNames"
                >
                <el-collapse-item title="接口数据" name="selection">
                    <c-content>
                      <m-selection :model="model" :codes="codes" />
                    </c-content>
                  </el-collapse-item>
                  <el-collapse-item title="基础信息" name="ovwp">
                    <m-ovwp :model="model" :codes="codes" />
                  </el-collapse-item>
                  <el-collapse-item title="申报信息" name="ovwp1">
                    <m-ovwp1 :model="model" :codes="codes" />
                  </el-collapse-item>
                  <el-collapse-item title="管理信息" name="ovwp2">
                    <m-ovwp2 :model="model" :codes="codes" />
                  </el-collapse-item>
                  <!-- <el-collapse-item title="Financing Details" name="trtcrep">
                    <m-trtcrep :model="model" :codes="codes" />
                  </el-collapse-item>
                  <el-collapse-item title="同业代付" name="dftcrep">
                    <m-dftcrep :model="model" :codes="codes" />
                  </el-collapse-item> -->
                </c-collapse>
              </div>
            </c-content>
          </el-tab-pane>
        </c-tabs>
      </el-form>
      <!-- 底部按钮 -->
      <m-btn
        :handleCheck="handleCheck"
        :handleSubmit="handleSubmit"
       :model="model" 
       />
    </c-page>
  </div>
</template>
<script>
import CodeTable from "~/config/CodeTable";
import Dbbdel from "../model";
import commonProcess from "~/mixin/commonProcess";
import Ovwp from "./Ovwp";
import Ovwp1 from "./Ovwp1";
import Ovwp2 from "./Ovwp2";
import Selection from "./Selection";
import operationFunc from "~/mixin/operationFunc";
import Btn from "~/page/Business/Bopnew/components/FunctionBtn/AddBtn";
import event from "../event";
import Check from "../model/check";
import {checkRuleOfdbbaddame} from 'BopRules'
import * as BopTools from "../../common/utils/BopTools"
import Api from '~/service/Api';

export default {
  name: "Dbbdel",
  components: {
    "m-ovwp": Ovwp,
    "m-ovwp1": Ovwp1,
    "m-ovwp2": Ovwp2,
    "m-selection": Selection,
    "m-btn": Btn
  },
  provide() {
    return {
      root: this
    };
  },
  mixins: [commonProcess, operationFunc, event], // 里面包含了Default、Check等的公共处理
  data() {
    return {
      tabVal: "ovwp",
      trnName: "dbbdel",
      trnType: "",
      model: new Dbbdel().data,
      codes: { ...CodeTable },
      activeNames: ["selection"],
      rules:{
        "mtabut.basflg":[
          { type: "string", required: true, message: "请勾选" },
        ]
      }
    };
  },
  methods: {
    myTabClick(tab) {
      this.tabClick(tab);
      /**
       *  do it yourself
       **/
    }
  },
  created: async function() {
    console.log("进入dbbdel交易");
    let params = {
      transName: this.trnName,
      recgrp:{
        bas:{
          inr: this.$route.query.inr,
        }
      }
    };
    this.init(params);
    this.$Api=Api
  },
  computed: {
    allRules() {
      if(this.model.mtabut.basflg){
        if(this.model.recgrp.dcl.rptno){
          this.model.mtabut.dclflg='O';
        }
        if(this.model.recgrp.vrf.rptno){
          this.model.mtabut.vrfflg='O';
        }
      }else{
        this.model.mtabut.dclflg='';
        this.model.mtabut.vrfflg='';
      }
      // let clientRules = Check.apply(this);
      let clientRules ={};
      let bgRules = checkRuleOfdbbaddame().call(this);
      let allRules = BopTools.mergeRules(clientRules,bgRules)
      allRules = BopTools.mergeRules(allRules,this.rules)
      allRules = BopTools.filterRule.call(this,allRules)
      BopTools.wrapCallback.call(this,allRules)
      return allRules
    }
  }
};
</script>
<style>
</style>