index.vue 6.1 KB
Newer Older
liuxiaojing committed
1
<template>
LiRui committed
2 3
  <div class="eContainer">
    <c-page title="汇出汇款">
wangna committed
4 5 6 7 8 9 10 11 12 13 14 15 16 17
      <el-form
        :model="model"
        :rules="rules"
        ref="modelForm"
        label-width="120px"
        size="small"
        :validate-on-rule-change="false"
      >
        <c-tabs
          :value="tabVal"
          ref="elment"
          type="card"
          @tab-click="mimeTabClick"
        >
LiRui committed
18
          <el-tab-pane label="业务信息" name="ovwp">
潘际乾 committed
19
            <c-content>
LiRui committed
20
              <m-ovwp :model="model" :codes="codes" />
潘际乾 committed
21
            </c-content>
liushikai committed
22
          </el-tab-pane>
liuyunfeng committed
23

LiRui committed
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
          <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>
liushikai committed
39
          </el-tab-pane>
liuxin committed
40

LiRui committed
41 42 43 44
          <el-tab-pane label="备查/附言" name="addbcb">
            <c-content>
              <m-addbcb :model="model" :codes="codes" />
            </c-content>
liushikai committed
45
          </el-tab-pane>
46

LiRui committed
47 48 49 50 51
          
          <el-tab-pane label="申报信息" name="cnyp">
            <c-content>
              <m-cnyp :model="model" :codes="codes" />
            </c-content>
liushikai committed
52
          </el-tab-pane>
53

LiRui committed
54
          <!-- <el-tab-pane
wangna committed
55 56 57 58
            label="境内汇款申请书-基础信息"
            name="dbe"
            v-if="model.bopmod.szflg === '2' && model.bopmod.basflg"
          >
liushikai committed
59
            <m-dbe :model="model" :codes="codes"></m-dbe>
LiRui committed
60 61
          </el-tab-pane> -->
          <!-- <el-tab-pane
wangna committed
62 63 64 65
            label="境外汇款申请书-基础信息"
            name="dbb"
            v-if="model.bopmod.szflg === '1' && model.bopmod.basflg"
          >
liushikai committed
66
            <m-dbb :model="model" :codes="codes"></m-dbb>
LiRui committed
67
          </el-tab-pane> -->
68

LiRui committed
69
          <!-- <el-tab-pane
wangna committed
70 71 72 73
            label="2111跨境支出信息"
            name="outp"
            v-if="model.cnybop.outflg === '1'"
          >
liushikai committed
74
            <m-outp :model="model" :codes="codes"></m-outp>
LiRui committed
75 76 77 78 79 80 81
          </el-tab-pane> -->



          <el-tab-pane label="报文/面函" name="docpan">
            <!--PD000529 -->
            <m-docpan :model="model" :codes="codes" />
潘际乾 committed
82
          </el-tab-pane>
liuxin committed
83

LiRui committed
84 85 86
          <el-tab-pane label="附件信息" name="doctre">
            <!--PD000546 -->
            <m-doctre :model="model" :codes="codes" />
liuxin committed
87
          </el-tab-pane>
LiRui committed
88

liuxin committed
89
        </c-tabs>
90
      </el-form>
LiRui committed
91 92 93 94 95 96 97
      <c-grid-ety-prompt-dialog
        ref="doxpDialog"
        :isPty="false"
        :promptData="promptData"
        @select-ety="selectMsg"
      >
      </c-grid-ety-prompt-dialog>
98

LiRui committed
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
      <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>
liushikai committed
114 115 116
</template>
<script>
import Api from "~/service/Api";
117
import Utils from "~/utils/index";
liushikai committed
118 119
import CodeTable from "~/config/CodeTable";
import Cptopn from "~/model/Cptopn";
wangren committed
120
import commonProcess from "~/mixin/commonProcess";
121
import commonFuncs from "~/mixin/commonFuncs";
liushikai committed
122
import Pattern from "~/model/Cptopn/Pattern";
潘际乾 committed
123 124
import Default from "~/model/Cptopn/Default";
import Check from "~/model/Cptopn/Check";
125

LiRui committed
126 127 128
import Ovwp from "./Ovwp";
import Addbcb from "./Addbcb.vue";
import Cnyp from "./Cnyp.vue"
liushikai committed
129

潘际乾 committed
130
import Doctre from "~/views/Public/Doctre";
131 132 133
import Glepan from "~/views/Public/Glepan";
import Setpan from "~/views/Public/Setpan";
import Docpan from "~/views/Public/Docpan";
潘际乾 committed
134

liushikai committed
135
export default {
136
  name: "Cptopn",
liushikai committed
137
  components: {
LiRui committed
138
    "m-ovwp": Ovwp,
liushikai committed
139 140
    "m-setpan": Setpan,
    "m-glepan": Glepan,
LiRui committed
141
    "m-addbcb": Addbcb,
liushikai committed
142 143
    "m-docpan": Docpan,
    "m-doctre": Doctre,
LiRui committed
144 145
    "m-cnyp": Cnyp,

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

潘际乾 committed
225
.messageLabel .el-form-item__label {
226 227 228
  text-align: left;
  font-weight: bold;
  font-size: 12px;
潘际乾 committed
229
}
230
</style>