index.vue 7.24 KB
Newer Older
liuxiaojing committed
1
<template>
liushikai committed
2 3
  <c-page title="汇出汇款">
    <div class="eContainer">
liuxin committed
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
        <!-- <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"
25
            :validate-on-rule-change="false"
liuxin committed
26
        >
27
        <c-tabs :value="tabVal" ref="elment" type="card" @tab-click="mimeTabClick">
28
          <el-tab-pane label="汇款信息" name="opnp1">
liushikai committed
29
            <!--PD000020 -->
潘际乾 committed
30 31 32
            <c-content>
              <m-opnp1 :model="model" :codes="codes" />
            </c-content>
liushikai committed
33
          </el-tab-pane>
liuyunfeng committed
34

liuxin committed
35
          <!-- <el-tab-pane label="Additional Info" name="AdditionalInfo">
liuxin committed
36
            <m-AdditionalInfo :model="model" :codes="codes" />
liuxin committed
37
          </el-tab-pane> -->
liuxin committed
38

39
          <el-tab-pane label="费用及账务" name="setpan">
liushikai committed
40 41 42
            <!--PD000000 -->
            <m-setpan :model="model" :codes="codes" />
          </el-tab-pane>
liuyunfeng committed
43

liuxin committed
44
          <el-tab-pane label="分录" name="glepan">
liushikai committed
45
            <!--PD000001 -->
46
            <m-glepan :model="model" :codes="codes" ref="glepan"/>
liushikai committed
47 48
          </el-tab-pane>

49
          <el-tab-pane label="附言" name="coninfp">
liushikai committed
50 51 52 53
            <!--PD000000 -->
            <m-coninfp :model="model" :codes="codes" />
          </el-tab-pane>

54
          <el-tab-pane label="报文及面函" name="docpan">
liushikai committed
55 56 57 58
            <!--PD000529 -->
            <m-docpan :model="model" :codes="codes" />
          </el-tab-pane>

59
          <el-tab-pane label="附件" name="doctre">
liushikai committed
60 61 62
            <!--PD000546 -->
            <m-doctre :model="model" :codes="codes" />
          </el-tab-pane>
liuxin committed
63

潘际乾 committed
64
          <el-tab-pane label="Finance" name="finp">
liushikai committed
65 66 67
            <!--PD000218 -->
            <m-finp :model="model" :codes="codes" />
          </el-tab-pane>
68

潘际乾 committed
69
          <el-tab-pane label="申报信息" name="sbxx">
liushikai committed
70
            <!--PD000009 -->
潘际乾 committed
71
            <m-sbxx :model="model" :codes="codes"/>
liushikai committed
72 73
          </el-tab-pane>
          
liuxin committed
74
          <el-tab-pane label="境内汇款申请书-基础信息" name="dbe" v-if="model.bopmod.szflg === '2' && model.bopmod.basflg">
liushikai committed
75 76
            <m-dbe :model="model" :codes="codes"></m-dbe>
          </el-tab-pane>
liuxin committed
77
          <el-tab-pane label="境外汇款申请书-基础信息" name="dbb" v-if="model.bopmod.szflg === '1' && model.bopmod.basflg">
liushikai committed
78
            <m-dbb :model="model" :codes="codes"></m-dbb>
liushikai committed
79 80
          </el-tab-pane>

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

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

          <!-- <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
96 97
        </c-tabs>
        </el-form>
liushikai committed
98
    </div>
99 100
    
    <c-grid-ety-prompt-dialog ref="etyDialog" :promptData="promptData" v-on:select-ety="selectEty"></c-grid-ety-prompt-dialog>
liushikai committed
101 102 103 104
  </c-page>
</template>
<script>
import Api from "~/service/Api";
潘际乾 committed
105
import Utils from "~/utils/index"
liushikai committed
106 107
import CodeTable from "~/config/CodeTable";
import Cptopn from "~/model/Cptopn";
wangren committed
108
import commonProcess from "~/mixin/commonProcess";
liushikai committed
109
import Pattern from "~/model/Cptopn/Pattern";
潘际乾 committed
110 111
import Default from "~/model/Cptopn/Default";
import Check from "~/model/Cptopn/Check";
liushikai committed
112
import Opnp1 from "./Opnp1";
113
// import Coninfp from "./Coninfp";
114
import Finp from "./Finp"
liushikai committed
115 116
import Dbe from "./Dbe.vue"
import Dbb from "./Dbb.vue"
liushikai committed
117
import Outp from "./Outp.vue"
liuxin committed
118 119
import AdditionalInfo from "./AdditionalInfo.vue"
import Payment from "./Payment103.vue"
liuxin committed
120 121
// import Payment103 from "./Det103.vue"
// import Payment202 from "./Det202.vue"
122
import Coninfp from "~/views/Public/Coninfp";
liushikai committed
123

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

wangren committed
130
import commonFuncs from "~/mixin/commonFuncs";
liuxin committed
131

liushikai committed
132
export default {
潘际乾 committed
133
  name: 'Cptopn',
liushikai committed
134 135 136 137 138 139 140 141
  components: {
    "m-opnp1": Opnp1,
    "m-setpan": Setpan,
    "m-glepan": Glepan,
    "m-coninfp": Coninfp,
    "m-docpan": Docpan,
    "m-doctre": Doctre,
    "m-finp": Finp,
潘际乾 committed
142
    "m-sbxx": Sbxx,
liushikai committed
143
    "m-dbe": Dbe,
liushikai committed
144
    "m-dbb": Dbb,
liuxin committed
145 146
    "m-outp": Outp,
    "m-AdditionalInfo": AdditionalInfo,
liuxin committed
147 148 149 150
    "m-Payment": Payment,
    // "m-Payment103": Payment103,
    // "m-Payment202": Payment202

liushikai committed
151
  },
152 153 154 155 156
    provide() {
        return {
            root: this
        }
    },
wangren committed
157
  mixins: [commonProcess,commonFuncs], // 里面包含了Default、Check等的公共处理
liushikai committed
158 159
  data() {
    return {
liushikai committed
160
      tabVal:"opnp1",
潘际乾 committed
161
      trnName:"cptopn",
liushikai committed
162
      model: new Cptopn().data,
潘际乾 committed
163 164 165 166 167
      checkRules: Check,
      defaultRules: Default,
      pattern: Pattern,
      rules:null,
      codes: {...CodeTable},
liushikai committed
168 169
    };
  },
潘际乾 committed
170
  methods:{
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
      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
201
  },
liushikai committed
202 203
  created: async function () {
    console.log("进入cptopn交易");
liuxin committed
204
    let rtnmsg = await this.init(this.$route.query);
潘际乾 committed
205 206
    if (rtnmsg.respCode == SUCCESS) {
      Utils.copyValueFromVO(this.model,rtnmsg.data)
liuxin committed
207 208 209
      if (this.isInDisplay) {
        this.restoreDisplay();
      }
liushikai committed
210 211
    } else {
      this.$notify.error({ title: "错误", message: "服务请求失败!" });
212
    }
liushikai committed
213
  },
214 215 216 217 218 219 220 221
  watch:{
    "model.cpdgrp.cbs.nom1.amt": {
      handler(val, oldVal) {
        this.changeFormItemRequired("cpdgrp.rec.swftyp", val != '0.000');
      },
      immediate: true,
    },
  }
liushikai committed
222
};
liuxiaojing committed
223 224
</script>
<style>
潘际乾 committed
225
.el-col .el-divider--horizontal {
liushikai committed
226
    margin-top: 0;
潘际乾 committed
227 228 229 230 231 232
}
.messageLabel .el-form-item__label {
    text-align: left;
    font-weight: bold;
    font-size: 12px;
}
233
</style>