index.vue 5.42 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
          <el-tab-pane label="申报信息" name="cnyp">
            <c-content>
              <m-cnyp :model="model" :codes="codes" />
            </c-content>
liushikai committed
51
          </el-tab-pane>
52

LiRui committed
53 54
          <el-tab-pane label="报文/面函" name="docpan">
            <!--PD000529 -->
wangna committed
55 56 57
            <c-content>
              <m-docpan :model="model" :codes="codes" />
            </c-content>
潘际乾 committed
58
          </el-tab-pane>
liuxin committed
59

LiRui committed
60 61
          <el-tab-pane label="附件信息" name="doctre">
            <!--PD000546 -->
wangna committed
62 63 64
            <c-content>
              <m-doctre :model="model" :codes="codes" />
            </c-content>
liuxin committed
65
          </el-tab-pane>
liuxin committed
66
        </c-tabs>
67
      </el-form>
LiRui committed
68 69 70 71 72 73 74
      <c-grid-ety-prompt-dialog
        ref="doxpDialog"
        :isPty="false"
        :promptData="promptData"
        @select-ety="selectMsg"
      >
      </c-grid-ety-prompt-dialog>
75

LiRui committed
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
      <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
91 92 93
</template>
<script>
import Api from "~/service/Api";
94
import Utils from "~/utils/index";
liushikai committed
95 96
import CodeTable from "~/config/CodeTable";
import Cptopn from "~/model/Cptopn";
wangren committed
97
import commonProcess from "~/mixin/commonProcess";
98
import commonFuncs from "~/mixin/commonFuncs";
liushikai committed
99
import Pattern from "~/model/Cptopn/Pattern";
潘际乾 committed
100 101
import Default from "~/model/Cptopn/Default";
import Check from "~/model/Cptopn/Check";
102

LiRui committed
103 104
import Ovwp from "./Ovwp";
import Addbcb from "./Addbcb.vue";
wangna committed
105
import Cnyp from "./Cnyp.vue";
liushikai committed
106

潘际乾 committed
107
import Doctre from "~/views/Public/Doctre";
108
import Glepan from "~/views/Public/Glepan";
109
import Setpan from "~/components/business/setmod/views";
110
import Docpan from "~/views/Public/Docpan";
潘际乾 committed
111

liushikai committed
112
export default {
113
  name: "Cptopn",
liushikai committed
114
  components: {
LiRui committed
115
    "m-ovwp": Ovwp,
liushikai committed
116 117
    "m-setpan": Setpan,
    "m-glepan": Glepan,
LiRui committed
118
    "m-addbcb": Addbcb,
liushikai committed
119 120
    "m-docpan": Docpan,
    "m-doctre": Doctre,
LiRui committed
121
    "m-cnyp": Cnyp,
liushikai committed
122
  },
123 124 125 126 127 128
  provide() {
    return {
      root: this,
    };
  },
  mixins: [commonProcess, commonFuncs], // 里面包含了Default、Check等的公共处理
liushikai committed
129 130
  data() {
    return {
LiRui committed
131
      tabVal: "ovwp",
132
      trnName: "cptopn",
liushikai committed
133
      model: new Cptopn().data,
潘际乾 committed
134 135 136
      checkRules: Check,
      defaultRules: Default,
      pattern: Pattern,
137
      rules: null,
LiRui committed
138
      activeNames: ["setpan"],
139
      codes: { ...CodeTable },
liushikai committed
140 141
    };
  },
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
  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
173
  },
liushikai committed
174 175
  created: async function () {
    console.log("进入cptopn交易");
liuxin committed
176
    let rtnmsg = await this.init(this.$route.query);
潘际乾 committed
177
    if (rtnmsg.respCode == SUCCESS) {
178
      Utils.copyValueFromVO(this.model, rtnmsg.data);
liuxin committed
179 180 181
      if (this.isInDisplay) {
        this.restoreDisplay();
      }
liushikai committed
182 183
    } else {
      this.$notify.error({ title: "错误", message: "服务请求失败!" });
184
    }
liushikai committed
185
  },
186
  watch: {
187 188
    "model.cpdgrp.cbs.nom1.amt": {
      handler(val, oldVal) {
189
        this.changeFormItemRequired("cpdgrp.rec.swftyp", val != "0.000");
190 191 192
      },
      immediate: true,
    },
193
  },
liushikai committed
194
};
liuxiaojing committed
195 196
</script>
<style>
潘际乾 committed
197
.el-col .el-divider--horizontal {
198
  margin-top: 0;
潘际乾 committed
199
}
200

潘际乾 committed
201
.messageLabel .el-form-item__label {
202 203 204
  text-align: left;
  font-weight: bold;
  font-size: 12px;
潘际乾 committed
205
}
206
</style>