index.vue 7.6 KB
Newer Older
liuxiaojing committed
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 18 19 20 21 22 23 24 25 26 27 28 29 30 31
      <!-- <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>

      <el-form
        :model="model"
        :rules="rules"
        ref="modelForm"
        label-width="150px"
        size="small"
        :validate-on-rule-change="false"
      >
        <c-tabs
          :value="tabVal"
          ref="elment"
          type="card"
          @tab-click="mimeTabClick"
liuxin committed
32
        >
33
          <el-tab-pane label="汇款信息" name="opnp1">
liushikai committed
34
            <!--PD000020 -->
潘际乾 committed
35 36 37
            <c-content>
              <m-opnp1 :model="model" :codes="codes" />
            </c-content>
liushikai committed
38
          </el-tab-pane>
liuyunfeng committed
39

40 41 42 43 44
          <el-tab-pane
            label="Additional Info"
            name="AdditionalInfo"
            v-if="this.model.cpdgrp.rec.swftyp != ''"
          >
liuxin committed
45
            <m-AdditionalInfo :model="model" :codes="codes" />
46
          </el-tab-pane>
liuxin committed
47

48
          <el-tab-pane label="费用及账务" name="setpan">
liushikai committed
49 50 51
            <!--PD000000 -->
            <m-setpan :model="model" :codes="codes" />
          </el-tab-pane>
liuyunfeng committed
52

liuxin committed
53
          <el-tab-pane label="分录" name="glepan">
liushikai committed
54
            <!--PD000001 -->
55
            <m-glepan :model="model" :codes="codes" ref="glepan" />
liushikai committed
56 57
          </el-tab-pane>

58
          <el-tab-pane label="附言" name="coninfp">
liushikai committed
59 60 61 62
            <!--PD000000 -->
            <m-coninfp :model="model" :codes="codes" />
          </el-tab-pane>

63
          <el-tab-pane label="报文及面函" name="docpan">
liushikai committed
64 65 66 67
            <!--PD000529 -->
            <m-docpan :model="model" :codes="codes" />
          </el-tab-pane>

68
          <el-tab-pane label="附件" name="doctre">
liushikai committed
69 70 71
            <!--PD000546 -->
            <m-doctre :model="model" :codes="codes" />
          </el-tab-pane>
liuxin committed
72

潘际乾 committed
73
          <el-tab-pane label="Finance" name="finp">
liushikai committed
74 75 76
            <!--PD000218 -->
            <m-finp :model="model" :codes="codes" />
          </el-tab-pane>
77

潘际乾 committed
78
          <el-tab-pane label="申报信息" name="sbxx">
liushikai committed
79
            <!--PD000009 -->
80
            <m-sbxx :model="model" :codes="codes" />
liushikai committed
81
          </el-tab-pane>
82

83

84
          <el-tab-pane label="境内汇款申请书-基础信息" name="dbe" v-if="model.bopmod.szflg === '2' && model.bopmod.basflg" >
liushikai committed
85 86
            <m-dbe :model="model" :codes="codes"></m-dbe>
          </el-tab-pane>
87
          <el-tab-pane label="境外汇款申请书-基础信息" name="dbb" v-if="model.bopmod.szflg === '1' && model.bopmod.basflg" >
liushikai committed
88
            <m-dbb :model="model" :codes="codes"></m-dbb>
liushikai committed
89
          </el-tab-pane>
90 91


92

93

liushikai committed
94

95 96 97 98 99
          <el-tab-pane
            label="2111跨境支出信息"
            name="outp"
            v-if="model.cnybop.outflg === '1'"
          >
liushikai committed
100
            <m-outp :model="model" :codes="codes"></m-outp>
潘际乾 committed
101
          </el-tab-pane>
liuxin committed
102

103 104 105 106 107 108 109 110
          <el-tab-pane
            label="Payment 103 PYE USD"
            name="Payment103"
            v-if="
              model.cpdgrp.rec.swftyp === '103' ||
              model.cpdgrp.rec.swftyp === '202'
            "
          >
liuxin committed
111 112
            <m-Payment :model="model" :codes="codes" />
          </el-tab-pane>
liuxin committed
113 114 115 116 117 118 119 120

          <!-- <el-tab-pane label="Payment 103 PYE USD" name="Payment103">
            <m-Payment103 :model="model" :codes="codes" />
          </el-tab-pane> -->

          <!-- <el-tab-pane label="Payment 202 PYE USD" name="Payment202">
            <m-Payment202 :model="model" :codes="codes" />
          </el-tab-pane> -->
liuxin committed
121
        </c-tabs>
122
      </el-form>
liushikai committed
123
    </div>
zhujiazhan committed
124
    <c-grid-ety-prompt-dialog
125 126 127 128 129 130 131 132 133 134 135 136 137
      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>
liushikai committed
138 139 140 141
  </c-page>
</template>
<script>
import Api from "~/service/Api";
142
import Utils from "~/utils/index";
liushikai committed
143 144
import CodeTable from "~/config/CodeTable";
import Cptopn from "~/model/Cptopn";
wangren committed
145
import commonProcess from "~/mixin/commonProcess";
liushikai committed
146
import Pattern from "~/model/Cptopn/Pattern";
潘际乾 committed
147 148
import Default from "~/model/Cptopn/Default";
import Check from "~/model/Cptopn/Check";
liushikai committed
149
import Opnp1 from "./Opnp1";
150
// import Coninfp from "./Coninfp";
151 152 153 154 155 156
import Finp from "./Finp";
import Dbe from "./Dbe.vue";
import Dbb from "./Dbb.vue";
import Outp from "./Outp.vue";
import AdditionalInfo from "./AdditionalInfo.vue";
import Payment from "./Payment103.vue";
liuxin committed
157 158
// import Payment103 from "./Det103.vue"
// import Payment202 from "./Det202.vue"
159
import Coninfp from "~/views/Public/Coninfp";
160 161
import Basp from "./Basp"

liushikai committed
162

潘际乾 committed
163
import Doctre from "~/views/Public/Doctre";
164 165 166
import Glepan from "~/views/Public/Glepan";
import Setpan from "~/views/Public/Setpan";
import Docpan from "~/views/Public/Docpan";
167
import Sbxx from "~/views/Public/Sbxx";
潘际乾 committed
168

wangren committed
169
import commonFuncs from "~/mixin/commonFuncs";
liuxin committed
170

liushikai committed
171
export default {
172
  name: "Cptopn",
liushikai committed
173 174 175 176 177 178 179 180
  components: {
    "m-opnp1": Opnp1,
    "m-setpan": Setpan,
    "m-glepan": Glepan,
    "m-coninfp": Coninfp,
    "m-docpan": Docpan,
    "m-doctre": Doctre,
    "m-finp": Finp,
潘际乾 committed
181
    "m-sbxx": Sbxx,
liushikai committed
182
    "m-dbe": Dbe,
liushikai committed
183
    "m-dbb": Dbb,
liuxin committed
184 185
    "m-outp": Outp,
    "m-AdditionalInfo": AdditionalInfo,
liuxin committed
186
    "m-Payment": Payment,
187
    "m-basp": Basp,
liuxin committed
188 189
    // "m-Payment103": Payment103,
    // "m-Payment202": Payment202
liushikai committed
190
  },
191 192 193 194 195 196
  provide() {
    return {
      root: this,
    };
  },
  mixins: [commonProcess, commonFuncs], // 里面包含了Default、Check等的公共处理
liushikai committed
197 198
  data() {
    return {
199 200
      tabVal: "opnp1",
      trnName: "cptopn",
liushikai committed
201
      model: new Cptopn().data,
潘际乾 committed
202 203 204
      checkRules: Check,
      defaultRules: Default,
      pattern: Pattern,
205 206
      rules: null,
      codes: { ...CodeTable },
liushikai committed
207 208
    };
  },
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
  methods: {
    mimeTabClick(tab) {
      this.tabClick(tab);
      const name = tab.name;
      let rulePath;
      if (name === "setpan") {
        rulePath = "pyenam";
      }
      if (name === "glepan") {
        rulePath = "glepan";
      }
      if (name === "coninfp") {
        rulePath = "coninfp";
      }
      if (name === "docpan") {
        rulePath = "oit.inftxt";
      }
      if (name === "doctre") {
        rulePath = "doctre";
      }
      if (name === "sbxx") {
        rulePath = "trd.ownref,cnyp";
      }
      if (!!rulePath) {
        this.executeRule(rulePath).then((res) => {
          if (res.respCode == SUCCESS) {
            this.updateModel(res.data);
          }
        });
      }
    },
潘际乾 committed
240
  },
liushikai committed
241 242
  created: async function () {
    console.log("进入cptopn交易");
liuxin committed
243
    let rtnmsg = await this.init(this.$route.query);
潘际乾 committed
244
    if (rtnmsg.respCode == SUCCESS) {
245
      Utils.copyValueFromVO(this.model, rtnmsg.data);
liuxin committed
246 247 248
      if (this.isInDisplay) {
        this.restoreDisplay();
      }
249 250 251



liushikai committed
252 253
    } else {
      this.$notify.error({ title: "错误", message: "服务请求失败!" });
254
    }
liushikai committed
255
  },
256
  watch: {
257 258
    "model.cpdgrp.cbs.nom1.amt": {
      handler(val, oldVal) {
259
        this.changeFormItemRequired("cpdgrp.rec.swftyp", val != "0.000");
260 261 262
      },
      immediate: true,
    },
263
  },
liushikai committed
264
};
liuxiaojing committed
265 266
</script>
<style>
潘际乾 committed
267
.el-col .el-divider--horizontal {
268
  margin-top: 0;
潘际乾 committed
269 270
}
.messageLabel .el-form-item__label {
271 272 273
  text-align: left;
  font-weight: bold;
  font-size: 12px;
潘际乾 committed
274
}
275
</style>