index.vue 5.5 KB
Newer Older
1
<template>
liushikai committed
2 3
  <c-page title="汇入汇款">
    <div class="eContainer">
4 5 6 7 8 9 10 11 12 13 14 15 16 17
      <!-- <c-bus-button :$pntvm="this"></c-bus-button> -->
      <c-function-btn
        :handleSubmit="handleSubmit"
        :handleCheck="handleCheck"
        :handleStash="handleStash"
      >
        <el-button size="small">备忘录</el-button>
        <el-button size="small">影像信息</el-button>
        <!-- <el-button size="small">保存模板</el-button> -->
        <!-- <el-button size="small">使用模板</el-button> -->
        <el-button size="small">制裁信息</el-button>
        <!-- <el-button size="small">拆分报文</el-button> -->
        <el-button size="small">智能提示</el-button>
      </c-function-btn>
liushikai committed
18 19 20 21 22 23
      <el-form
        :model="model"
        :rules="rules"
        ref="modelForm"
        label-width="150px"
        size="small"
24
        :validate-on-rule-change="false"
liushikai committed
25
      >
wangguangchao committed
26
        <c-tabs ref="elment" :value="tabVal" type="card" @tab-click="mimeTabClick">
27
          <el-tab-pane label="基本信息" name="opnp1">
liushikai committed
28 29 30 31 32
            <!--PD000020 -->
            <c-content>
            <m-opnp1 :model="model" :codes="codes" />
            </c-content>
          </el-tab-pane>
33
           <el-tab-pane label="费用及账务" name="setpan">
liushikai committed
34
            <!--PD000006 -->
35
            <c-content>
liushikai committed
36
            <m-setpan :model="model" :codes="codes" />
37
            </c-content>
38 39 40
          </el-tab-pane>
           <el-tab-pane label="分录" name="glepan">
            <m-glepan :model="model" :codes="codes" ref="glepan" />
liushikai committed
41 42 43 44 45
          </el-tab-pane>
          <el-tab-pane label="附言" name="coninfp">
            <!--PD000000 -->
            <m-coninfp :model="model" :codes="codes" />
          </el-tab-pane>
吴佳 committed
46
          
liushikai committed
47 48 49 50 51 52
          <el-tab-pane label="附件" name="doctre">
            <!--PD000529 -->
            <m-doctre :model="model" :codes="codes" />
          </el-tab-pane>
          <el-tab-pane label="收账通知" name="docpan2">
            <!--PD000001 -->
吴佳 committed
53
            <m-docpan2 :model="model" :codes="codes" />
liushikai committed
54
          </el-tab-pane>
潘际乾 committed
55
          <el-tab-pane label="申报信息" name="sbxx">
liushikai committed
56
            <!--PD000546 -->
潘际乾 committed
57
            <m-sbxx :model="model" :codes="codes" />
liushikai committed
58
          </el-tab-pane>
59 60 61 62 63
           <el-tab-pane label="2101跨境收入信息" name="incp" v-if="model.cnybop.cnyflg === '1'">
            <c-content>
            <m-incp :model="model" :codes="codes"></m-incp>
            </c-content>
          </el-tab-pane>
吴佳 committed
64 65 66 67
          <el-tab-pane label="报文及面函" name="docpan">
            <!--PD000000 -->
            <m-docpan :model="model" :codes="codes" />
          </el-tab-pane>
liushikai committed
68 69 70
        </c-tabs>
      </el-form>
    </div>
71
     <c-grid-ety-prompt-dialog ref="etyDialog" :promptData="promptData" v-on:select-ety="selectEty"></c-grid-ety-prompt-dialog>
liushikai committed
72
  </c-page>
73 74
</template>
<script>
liushikai committed
75 76 77 78
import Api from "~/service/Api";
import Utils from "~/utils/index";
import CodeTable from "~/config/CodeTable";
import Cptadv from "~/model/Cptadv";
wangren committed
79 80
import commonProcess from "~/mixin/commonProcess";
import commonFuncs from "~/mixin/commonFuncs";
liushikai committed
81
import Opnp1 from "./Opnp1";
吴佳 committed
82
import Docpan2 from "./Docpan2";
83 84 85
import Pattern from "~/model/Cptadv/Pattern";
import Default from "~/model/Cptadv/Default";
import Check from "~/model/Cptadv/Check";
liushikai committed
86 87 88
// import Setpan from "./Setpan";
// import Coninfp from "./Coninfp";
// import Docpan from "./Docpan";
潘际乾 committed
89
import Sbxx from "./Sbxx";
90
import Incp from "./Incp";
91

潘际乾 committed
92
import Doctre from "~/views/Public/Doctre";
liushikai committed
93
import Setpan from "~/views/Public/Setpan";
94
import Glepan from "~/views/Public/Glepan";
liushikai committed
95 96
import Coninfp from "~/views/Public/Coninfp";
import Docpan from "~/views/Public/Docpan";
chenzhaole committed
97
import Ptap from "~/views/Public/Ptap";
98 99

export default {
liushikai committed
100 101 102
  name: "Cptadv",
  components: {
    "m-opnp1": Opnp1,
潘际乾 committed
103
    "m-sbxx": Sbxx,
liushikai committed
104
    "m-setpan": Setpan,
105
    "m-glepan": Glepan,
liushikai committed
106 107 108
    "m-coninfp": Coninfp,
    "m-docpan": Docpan,
    "m-doctre": Doctre,
chenzhaole committed
109
    "m-ptap": Ptap,
110 111
    "m-docpan2" : Docpan2,
    "m-incp" : Incp
liushikai committed
112 113 114 115 116 117
  },
  provide() {
    return {
      root: this,
    };
  },
wangren committed
118
  mixins: [commonProcess,commonFuncs], // 里面包含了Default、Check等的公共处理
119
  computed: {},
liushikai committed
120 121 122 123 124 125 126
  data() {
    return {
      tabVal: "opnp1",
      trnName: "cptadv",
      model: new Cptadv().data,
      // defaultRule:Default,
      // rules:this.mergeRules(Pattern,Check),
127 128 129 130
      checkRules: Check,
      defaultRules: Default,
      pattern: Pattern,
      rules: null,
liushikai committed
131 132 133
      codes: { ...CodeTable },
    };
  },
wangguangchao committed
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
  methods: {
    mimeTabClick(tab) {
      this.tabClick(tab)
      const name = tab.name
      let rulePath;
      if (name === "docpan2") {
        rulePath = "lendoc.docpan";
      }
      if (name === "sbxx") {
        rulePath = "bopmod.wg,cnybop.cnyp";
      }
      if (name === "incp") {
        rulePath = "cnybop.incp";
      }
      if (!!rulePath) {
        this.executeRule(rulePath).then(res => {
          if (res.respCode == SUCCESS) {
            this.updateModel(res.data)
          }
        })
      }
    }
  },
liushikai committed
157 158 159 160 161 162 163 164 165 166 167
  created: async function () {
    console.log("进入cptadv交易");
    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: "服务请求失败!" });
168
    }
liushikai committed
169 170
  },
};
171 172
</script>
<style>
潘际乾 committed
173
.el-col .el-divider--horizontal {
liushikai committed
174
    margin-top: 0;
潘际乾 committed
175 176 177 178 179 180
}
.messageLabel .el-form-item__label {
    text-align: left;
    font-weight: bold;
    font-size: 12px;
}
181
</style>