index.vue 7.15 KB
Newer Older
liuxiaojing committed
1
<template>
liushikai committed
2 3
  <c-page title="汇出汇款">
    <div class="eContainer">
4
      <!-- <c-bus-button :$pntvm="this"></c-bus-button> -->
5
      <c-function-btn :handleSubmit="handleSubmit" :handleCheck="handleCheck" :handleStash="handleStash">
6 7 8 9 10 11 12 13 14
        <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>

15
      <el-form :model="model" :rules="rules" ref="modelForm" label-width="120px" size="small"
16 17
        :validate-on-rule-change="false">
        <c-tabs :value="tabVal" ref="elment" type="card" @tab-click="mimeTabClick">
nanrui committed
18
          <el-tab-pane label="概要" name="opnp1">
liushikai committed
19
            <!--PD000020 -->
潘际乾 committed
20 21 22
            <c-content>
              <m-opnp1 :model="model" :codes="codes" />
            </c-content>
liushikai committed
23
          </el-tab-pane>
liuyunfeng committed
24

25
          <el-tab-pane label="Additional Info" name="AdditionalInfo" v-if="this.model.cpdgrp.rec.swftyp != ''">
liuxin committed
26
            <m-AdditionalInfo :model="model" :codes="codes" />
27
          </el-tab-pane>
liuxin committed
28

nanrui committed
29
          <el-tab-pane label="结算" name="setpan">
liushikai committed
30 31 32
            <!--PD000000 -->
            <m-setpan :model="model" :codes="codes" />
          </el-tab-pane>
liuyunfeng committed
33

nanrui committed
34
          <el-tab-pane label="分录" name="glepan">
liushikai committed
35
            <!--PD000001 -->
36
            <m-glepan :model="model" :codes="codes" ref="glepan" />
liushikai committed
37 38
          </el-tab-pane>

nanrui committed
39
          <el-tab-pane label="提示信息" name="coninfp">
liushikai committed
40 41 42 43
            <!--PD000000 -->
            <m-coninfp :model="model" :codes="codes" />
          </el-tab-pane>

nanrui committed
44
          <el-tab-pane label="报文和面函" name="docpan">
liushikai committed
45 46 47 48
            <!--PD000529 -->
            <m-docpan :model="model" :codes="codes" />
          </el-tab-pane>

49
          <el-tab-pane label="附件" name="doctre">
liushikai committed
50 51 52
            <!--PD000546 -->
            <m-doctre :model="model" :codes="codes" />
          </el-tab-pane>
liuxin committed
53

54
          <el-tab-pane label="融资" name="finp">
liushikai committed
55 56 57
            <!--PD000218 -->
            <m-finp :model="model" :codes="codes" />
          </el-tab-pane>
58

潘际乾 committed
59
          <el-tab-pane label="申报信息" name="sbxx">
liushikai committed
60
            <!--PD000009 -->
61
            <m-sbxx :model="model" :codes="codes" />
liushikai committed
62
          </el-tab-pane>
63

64

65
          <el-tab-pane label="境内汇款申请书-基础信息" name="dbe" v-if="model.bopmod.szflg === '2' && model.bopmod.basflg">
liushikai committed
66 67
            <m-dbe :model="model" :codes="codes"></m-dbe>
          </el-tab-pane>
68
          <el-tab-pane label="境外汇款申请书-基础信息" name="dbb" v-if="model.bopmod.szflg === '1' && model.bopmod.basflg">
liushikai committed
69
            <m-dbb :model="model" :codes="codes"></m-dbb>
liushikai committed
70
          </el-tab-pane>
71 72


73

74

liushikai committed
75

76
          <el-tab-pane label="2111跨境支出信息" name="outp" v-if="model.cnybop.outflg === '1'">
liushikai committed
77
            <m-outp :model="model" :codes="codes"></m-outp>
潘际乾 committed
78
          </el-tab-pane>
liuxin committed
79

80 81 82 83
          <el-tab-pane label="Payment 103 PYE USD" name="Payment103" v-if="
            model.cpdgrp.rec.swftyp === '103' ||
            model.cpdgrp.rec.swftyp === '202'
          ">
liuxin committed
84 85
            <m-Payment :model="model" :codes="codes" />
          </el-tab-pane>
liuxin committed
86 87 88 89 90 91 92 93

          <!-- <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
94
        </c-tabs>
95
      </el-form>
liushikai committed
96
    </div>
97
    <c-grid-ety-prompt-dialog ref="doxpDialog" :isPty="false" :promptData="promptData" @select-ety="selectMsg">
98 99
    </c-grid-ety-prompt-dialog>

100 101
    <c-grid-ety-prompt-dialog ref="etyDialog" :promptData="promptData" v-on:select-ety="selectEty">
    </c-grid-ety-prompt-dialog>
liushikai committed
102 103 104 105
  </c-page>
</template>
<script>
import Api from "~/service/Api";
106
import Utils from "~/utils/index";
liushikai committed
107 108
import CodeTable from "~/config/CodeTable";
import Cptopn from "~/model/Cptopn";
wangren committed
109
import commonProcess from "~/mixin/commonProcess";
110
import commonFuncs from "~/mixin/commonFuncs";
liushikai committed
111
import Pattern from "~/model/Cptopn/Pattern";
潘际乾 committed
112 113
import Default from "~/model/Cptopn/Default";
import Check from "~/model/Cptopn/Check";
114

liushikai committed
115
import Opnp1 from "./Opnp1";
116 117 118 119 120 121
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";
122 123
import Basp from "./Basp"

liushikai committed
124

125
import Coninfp from "~/views/Public/Coninfp";
潘际乾 committed
126
import Doctre from "~/views/Public/Doctre";
127 128 129
import Glepan from "~/views/Public/Glepan";
import Setpan from "~/views/Public/Setpan";
import Docpan from "~/views/Public/Docpan";
130
import Sbxx from "~/views/Public/Sbxx";
潘际乾 committed
131

132

liuxin committed
133

liushikai committed
134
export default {
135
  name: "Cptopn",
liushikai committed
136 137 138 139 140 141 142 143
  components: {
    "m-opnp1": Opnp1,
    "m-setpan": Setpan,
    "m-glepan": Glepan,
    "m-coninfp": Coninfp,
    "m-docpan": Docpan,
    "m-doctre": Doctre,
    "m-finp": Finp,
潘际乾 committed
144
    "m-sbxx": Sbxx,
liushikai committed
145
    "m-dbe": Dbe,
liushikai committed
146
    "m-dbb": Dbb,
liuxin committed
147 148
    "m-outp": Outp,
    "m-AdditionalInfo": AdditionalInfo,
liuxin committed
149
    "m-Payment": Payment,
150
    "m-basp": Basp,
liuxin committed
151 152
    // "m-Payment103": Payment103,
    // "m-Payment202": Payment202
liushikai committed
153
  },
154 155 156 157 158 159
  provide() {
    return {
      root: this,
    };
  },
  mixins: [commonProcess, commonFuncs], // 里面包含了Default、Check等的公共处理
liushikai committed
160 161
  data() {
    return {
162 163
      tabVal: "opnp1",
      trnName: "cptopn",
liushikai committed
164
      model: new Cptopn().data,
潘际乾 committed
165 166 167
      checkRules: Check,
      defaultRules: Default,
      pattern: Pattern,
168 169
      rules: null,
      codes: { ...CodeTable },
liushikai committed
170 171
    };
  },
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202
  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
203
  },
liushikai committed
204 205
  created: async function () {
    console.log("进入cptopn交易");
liuxin committed
206
    let rtnmsg = await this.init(this.$route.query);
潘际乾 committed
207
    if (rtnmsg.respCode == SUCCESS) {
208
      Utils.copyValueFromVO(this.model, rtnmsg.data);
liuxin committed
209 210 211
      if (this.isInDisplay) {
        this.restoreDisplay();
      }
212 213 214



liushikai committed
215 216
    } else {
      this.$notify.error({ title: "错误", message: "服务请求失败!" });
217
    }
liushikai committed
218
  },
219
  watch: {
220 221
    "model.cpdgrp.cbs.nom1.amt": {
      handler(val, oldVal) {
222
        this.changeFormItemRequired("cpdgrp.rec.swftyp", val != "0.000");
223 224 225
      },
      immediate: true,
    },
226
  },
liushikai committed
227
};
liuxiaojing committed
228 229
</script>
<style>
潘际乾 committed
230
.el-col .el-divider--horizontal {
231
  margin-top: 0;
潘际乾 committed
232
}
233

潘际乾 committed
234
.messageLabel .el-form-item__label {
235 236 237
  text-align: left;
  font-weight: bold;
  font-size: 12px;
潘际乾 committed
238
}
239
</style>