index.vue 8.63 KB
Newer Older
1
<template>
2 3
  <div class="eContainer">
    <c-page title="汇入汇款">
liushikai committed
4 5 6 7
      <el-form
        :model="model"
        :rules="rules"
        ref="modelForm"
8
        label-width="120px"
liushikai committed
9
        size="small"
10
        :validate-on-rule-change="false"
liushikai committed
11
      >
12 13 14 15 16 17
        <c-tabs
          ref="elment"
          :value="tabVal"
          type="card"
          @tab-click="mimeTabClick"
        >
18 19

          <el-tab-pane label="业务信息" name="ovwp">
liushikai committed
20
            <c-content>
21
              <m-ovwp :model="model" :codes="codes" />
liushikai committed
22 23
            </c-content>
          </el-tab-pane>
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42

          <el-tab-pane label="费用/账务" name="setpan,glepan">
            <c-content>
              <div class="eibs-tab">
                <el-collapse v-model="activeNames">
                  <el-collapse-item title="结算" name="setpan">
                    <!-- 结算 -->
                    <m-setpan :model="model" :codes="codes" />
                  </el-collapse-item>
                  <el-collapse-item title="会计分录" name="glepan">
                    <!-- 会计分录 -->
                    <m-glepan :model="model" :codes="codes" />
                  </el-collapse-item>
                </el-collapse>
              </div>
            </c-content>
          </el-tab-pane>

          <!-- <el-tab-pane label="结算" name="setpan">
43
            <c-content>
44
              <m-setpan :model="model" :codes="codes" />
45
            </c-content>
46
          </el-tab-pane>
47

48
          <el-tab-pane label="分录" name="glepan">
49
            <m-glepan :model="model" :codes="codes" ref="glepan" />
50
          </el-tab-pane> -->
51

52 53 54 55
          <el-tab-pane label="备查/附言" name="addbcb">
            <c-content>
              <m-addbcb :model="model" :codes="codes" />
            </c-content>
liushikai committed
56
          </el-tab-pane>
57 58 59
          <!-- <el-tab-pane label="提示信息" name="coninfp">
            <m-coninfp :model="model" :codes="codes" />
          </el-tab-pane> -->
60

61
          <!-- <el-tab-pane label="收账通知" name="docpan2">
吴佳 committed
62
            <m-docpan2 :model="model" :codes="codes" />
63 64 65 66 67 68
          </el-tab-pane> -->

          <el-tab-pane label="申报信息" name="cnyp">
            <c-content>
              <m-cnyp :model="model" :codes="codes" />
            </c-content>
liushikai committed
69
          </el-tab-pane>
70
          <!-- <el-tab-pane label="申报信息" name="sbxx">
潘际乾 committed
71
            <m-sbxx :model="model" :codes="codes" />
72 73 74 75 76 77
          </el-tab-pane> -->
          <!-- <el-tab-pane
            label="2101跨境收入信息"
            name="incp"
            v-if="model.cnybop.cnyflg === '1'"
          >
78
            <c-content>
79
              <m-incp :model="model" :codes="codes"></m-incp>
80
            </c-content>
81
          </el-tab-pane> -->
82

83
          <el-tab-pane label="报文/面函" name="docpan">
吴佳 committed
84 85 86
            <!--PD000000 -->
            <m-docpan :model="model" :codes="codes" />
          </el-tab-pane>
87

88 89 90 91
          <el-tab-pane label="附件信息" name="doctre">
            <!--PD000529 -->
            <m-doctre :model="model" :codes="codes" />
          </el-tab-pane>
92

93 94 95 96 97 98 99
          <!-- <el-tab-pane
            label="境外汇款申请书-基础信息"
            name="basp3"
            v-if="model.bopmod.basflg != '' && model.bopmod.szflg == '1'"
          >
            <m-basp3 :model="model" :codes="codes" />
          </el-tab-pane> -->
100

101 102 103 104 105 106 107
          <!-- <el-tab-pane
            label="境内汇款申请书-基础信息"
            name="basp2"
            v-if="model.bopmod.basflg != '' && model.bopmod.szflg == '2'"
          >
            <m-basp :model="model" :codes="codes" />
          </el-tab-pane> -->
108

109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
          <!-- <el-tab-pane
            label="跨境支付"
            name="secpan"
            v-if="
              model.cpdgrp.rec.swftyp == 'HVP' ||
              model.cpdgrp.rec.swftyp == 'HVQ' ||
              model.cpdgrp.rec.swftyp == 'HVR' ||
              model.cpdgrp.rec.swftyp == 'BEP' ||
              model.cpdgrp.rec.swftyp == 'BEQ' ||
              model.cpdgrp.rec.swftyp == 'BES'
            "
          >
            <c-content>
              <m-secpan :model="model" :codes="codes" />
            </c-content>
          </el-tab-pane> -->
125

126 127 128 129 130 131 132 133 134 135 136 137 138
          <!-- <el-tab-pane
            label="CIPS"
            name="cips"
            v-if="
              model.cpdgrp.rec.swftyp == 'CIU' ||
              model.cpdgrp.rec.swftyp == 'CIV' ||
              model.cpdgrp.rec.swftyp == 'CIW'
            "
          >
            <c-content>
              <m-cips :model="model" :codes="codes" />
            </c-content>
          </el-tab-pane> -->
139

140 141 142 143 144 145 146 147 148 149 150 151 152
          <!-- <el-tab-pane
            label="CIPS2.0"
            name="cips2"
            v-if="
              model.cpdgrp.rec.swftyp == 'CIU' ||
              model.cpdgrp.rec.swftyp == 'CIV' ||
              model.cpdgrp.rec.swftyp == 'CIW'
            "
          >
            <c-content>
              <m-cips2 :model="model" :codes="codes" />
            </c-content>
          </el-tab-pane> -->
153

154 155 156 157 158 159 160 161 162 163 164 165 166
          <!-- <el-tab-pane
            label="CIPS2.0"
            name="cips3"
            v-if="
              model.cpdgrp.rec.swftyp == 'CIU' ||
              model.cpdgrp.rec.swftyp == 'CIV' ||
              model.cpdgrp.rec.swftyp == 'CIW'
            "
          >
            <c-content>
              <m-cips3 :model="model" :codes="codes" />
            </c-content>
          </el-tab-pane> -->
liushikai committed
167 168
        </c-tabs>
      </el-form>
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
      <c-grid-ety-prompt-dialog
        ref="doxpDialog"
        :isPty="false"
        :promptData="promptData"
        @select-ety="selectMsg"
      >
      </c-grid-ety-prompt-dialog>

      <c-grid-ety-prompt-dialog
        ref="etyDialog"
        :promptData="promptData"
        v-on:select-ety="selectEty"
      ></c-grid-ety-prompt-dialog>

      <!-- <c-bus-button :$pntvm="this"></c-bus-button> -->
      <c-function-btn
        :handleSubmit="handleSubmit"
        :handleCheck="handleCheck"
        :handleStash="handleStash"
      >
      </c-function-btn>
    </c-page>
  </div>
192 193
</template>
<script>
liushikai committed
194 195 196 197
import Api from "~/service/Api";
import Utils from "~/utils/index";
import CodeTable from "~/config/CodeTable";
import Cptadv from "~/model/Cptadv";
wangren committed
198 199
import commonProcess from "~/mixin/commonProcess";
import commonFuncs from "~/mixin/commonFuncs";
200 201 202
import Pattern from "~/model/Cptadv/Pattern";
import Default from "~/model/Cptadv/Default";
import Check from "~/model/Cptadv/Check";
203

204
import Ovwp from "./Ovwp";
潘际乾 committed
205
import Sbxx from "./Sbxx";
206 207
import Cnyp from "./Cnyp";
import Addbcb from "./Addbcb";
208
import Incp from "./Incp";
209 210
import Basp from "./Basp";
import Basp3 from "./Basp3";
211

潘际乾 committed
212
import Doctre from "~/views/Public/Doctre";
liushikai committed
213
import Setpan from "~/views/Public/Setpan";
214
import Glepan from "~/views/Public/Glepan";
liushikai committed
215
import Docpan from "~/views/Public/Docpan";
chenzhaole committed
216
import Ptap from "~/views/Public/Ptap";
217 218

export default {
liushikai committed
219 220
  name: "Cptadv",
  components: {
221
    "m-ovwp": Ovwp,
潘际乾 committed
222
    "m-sbxx": Sbxx,
223
    "m-cnyp": Cnyp,
liushikai committed
224
    "m-setpan": Setpan,
225
    "m-glepan": Glepan,
226
    "m-addbcb": Addbcb,
liushikai committed
227 228
    "m-docpan": Docpan,
    "m-doctre": Doctre,
chenzhaole committed
229
    "m-ptap": Ptap,
230
    "m-incp": Incp,
231
    "m-basp": Basp,
232
    "m-basp3": Basp3,
liushikai committed
233 234 235 236 237 238
  },
  provide() {
    return {
      root: this,
    };
  },
239
  mixins: [commonProcess, commonFuncs], // 里面包含了Default、Check等的公共处理
240
  computed: {},
liushikai committed
241 242
  data() {
    return {
243
      tabVal: "ovwp",
liushikai committed
244 245 246 247
      trnName: "cptadv",
      model: new Cptadv().data,
      // defaultRule:Default,
      // rules:this.mergeRules(Pattern,Check),
248 249 250 251
      checkRules: Check,
      defaultRules: Default,
      pattern: Pattern,
      rules: null,
252
      activeNames: ["setpan"],
liushikai committed
253 254 255
      codes: { ...CodeTable },
    };
  },
wangguangchao committed
256 257
  methods: {
    mimeTabClick(tab) {
258 259
      this.tabClick(tab);
      const name = tab.name;
wangguangchao committed
260 261 262 263 264 265 266 267 268 269 270
      let rulePath;
      if (name === "docpan2") {
        rulePath = "lendoc.docpan";
      }
      if (name === "sbxx") {
        rulePath = "bopmod.wg,cnybop.cnyp";
      }
      if (name === "incp") {
        rulePath = "cnybop.incp";
      }
      if (!!rulePath) {
271
        this.executeRule(rulePath).then((res) => {
wangguangchao committed
272
          if (res.respCode == SUCCESS) {
273
            this.updateModel(res.data);
wangguangchao committed
274
          }
275
        });
wangguangchao committed
276
      }
277
    },
wangguangchao committed
278
  },
liushikai committed
279 280 281 282 283 284 285 286 287 288 289
  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: "服务请求失败!" });
290
    }
liushikai committed
291 292
  },
};
293 294
</script>
<style>
潘际乾 committed
295
.el-col .el-divider--horizontal {
296
  margin-top: 0;
潘际乾 committed
297 298
}
.messageLabel .el-form-item__label {
299 300 301
  text-align: left;
  font-weight: bold;
  font-size: 12px;
潘际乾 committed
302
}
303
</style>