Cnyp.vue 3.23 KB
Newer Older
jxl committed
1 2
<template>
  <div class="eibs-tab">
huangxin committed
3 4 5 6 7
      <el-collapse v-model="activeNames" @change="handleChange">
          
          <el-collapse-item title="外管信息" name="wg">
              <m-wg :model="model" :codes="codes" />
          </el-collapse-item>
8

hewei committed
9
          <el-collapse-item title="涉外收入申请单-基础信息" name="basp3" v-if="model.bopmod.szflg=='1' && model.bopmod.basflg=='X'">
huangxin committed
10 11
              <m-basp3 :model="model" :codes="codes" />
          </el-collapse-item>
12

hewei committed
13
          <el-collapse-item title="境内收入申请单-基础信息" name="basp2" v-if="model.bopmod.szflg=='2' && model.bopmod.basflg=='X'">
huangxin committed
14 15
              <m-basp2 :model="model" :codes="codes" />
          </el-collapse-item>
16

huangxin committed
17 18 19 20 21 22 23 24 25
          <el-collapse-item title="跨境人民币申报" name="cnyp1">
              <m-cnyp1 :model="model" :codes="codes" />
          </el-collapse-item>
  
         <!--cnybop PD000001 2101跨境收入信息 -->
         <el-collapse-item title="2101跨境收入信息" name="incp" v-if="model.cnybop.cnyflg=='1'">
              <m-incp :model="model" :codes="codes"/>
         </el-collapse-item>
      </el-collapse>
jxl committed
26
  </div>
huangxin committed
27 28 29 30 31 32 33 34 35 36 37 38 39
  </template>
  
  <script>
  import Api from "~/service/Api";
  import commonProcess from "~/mixin/commonProcess";
  import CodeTable from "~/config/CodeTable";
  import Event from "~/model/Botset/Event";
  import Wg from "./Wg";
  import Cnyp1 from "./Cnyp1";
  import Incp from "./Incp";
  import Basp2 from "./Basp2";
  import Basp3 from "./Basp3";
  
40 41 42 43 44
  const tabNameToRulePathMapping = {
    "basp2": "bopmod.dbdp.basp",
    "basp3": "bopmod.dbap.basp",
    "incp": "cnybop.incp",
  }
huangxin committed
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
  
  export default {
      inject: ["root"],
      components: {
          "m-basp2": Basp2,
          "m-basp3": Basp3,
          "m-wg": Wg,
          "m-cnyp1": Cnyp1,
          "m-incp": Incp,
      },
      props: ["model", "codes"],
      mixins: [commonProcess],
      data() {
          return {
              activeNames: ["wg"],
          };
      },
      methods: {
          ...Event,
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
          handleChange(names) {
            if (this.isInDisplay) {
              return
            }
            const arr = [];
            for (let i = 0; i < names.length; i++) {
              const n = names[i];
              const path = tabNameToRulePathMapping[n]
              if (path) {
                arr.push(path)
              }
            }
            let rulePath = arr.join(",");
            if (!!rulePath) {//rulePath不为空串
              this.executeRule(rulePath).then((res) => {
                if (res.respCode == SUCCESS) {
                  this.updateModel(res.data);
                }
              });
            }
          },
        myTabClick(tab) {
          this.tabClick(tab);
          let name = tab.name;
          let rulePath;
          if (name === "basp3") {
            rulePath = "bopmod.dbap.basp";
          }
          if (name === "basp2") {
            rulePath = "bopmod.dbdp.basp";
          }
          if (!!rulePath) {
            this.executeRule(rulePath).then((res) => {
              if (res.respCode == SUCCESS) {
                this.updateModel(res.data);
              }
            });
          }
        },
huangxin committed
103 104 105 106 107 108 109 110
      },
      created: function () {},
  };
  </script>
  
  <style>
  </style>