index.vue 7.92 KB
Newer Older
wjj committed
1
<template>
2
  <div class="eContainer">
wjj committed
3
    <c-page title="进口代收二次收单">
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119

      <el-form :model="model" :rules="rules" ref="modelForm" label-width="120px" label-position="right"
               size="small" :validate-on-rule-change="false">
        <c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="myTabClick">

          <!--附加单据 -->
          <!--                    <el-tab-pane label="附加单据" name="bctret">-->
          <!--                        <m-bctret :model="model" :codes="codes" />-->
          <!--                    </el-tab-pane>-->


          <!--指示条款 -->
          <!--                    <el-tab-pane label="指示条款" name="detp">-->
          <!--                        <m-detp :model="model" :codes="codes" />-->
          <!--                    </el-tab-pane>-->

          <!--参与方 -->
          <!--                    <el-tab-pane label="参与方" name="ptyp">-->
          <!--                        <c-content>-->
          <!--                            <m-ptyp :model="model" :codes="codes" />-->
          <!--                        </c-content>-->
          <!--                    </el-tab-pane>-->

          <!--表外记账 -->
          <!--                    <el-tab-pane label="表外记账" name="engp">-->
          <!--                        <m-engp :model="model" :codes="codes" />-->
          <!--                    </el-tab-pane>-->

          <!--结算 -->
          <!--                    <el-tab-pane label="结算" name="setpan">-->
          <!--                        <c-content>-->
          <!--                            <m-setpan :model="model" :codes="codes" />-->
          <!--                        </c-content>-->
          <!--                    </el-tab-pane>-->

          <!--                    <el-tab-pane label="账务" name="glepan">-->
          <!--                            <m-glepan :model="model" :codes="codes" />-->
          <!--                        </el-tab-pane>-->

          <!--提示信息 -->
          <!--                    <el-tab-pane label="提示信息" name="coninfp">-->
          <!--                        <m-coninfp :model="model" :codes="codes" />-->
          <!--                    </el-tab-pane>-->

          <!--报文和面函 -->
          <!--                    <el-tab-pane label="报文和面函" name="docpan">-->
          <!--                        <m-docpan :model="model" :codes="codes" />-->
          <!--                    </el-tab-pane>-->

          <!--附件 -->
          <!--                    <el-tab-pane label="附件" name="doctre">-->
          <!--                        <m-doctre :model="model" :codes="codes" />-->
          <!--                    </el-tab-pane>-->

          <!--业务信息  -->
          <el-tab-pane label="业务信息" name="ovwp">
            <c-content>
              <m-ovwp :model="model" :codes="codes" />
            </c-content>
          </el-tab-pane>

<!--          <el-tab-pane label="统一授信" name="limitbody">-->
<!--            <c-content>-->
<!--              <m-limitbody :model="model" :codes="codes" />-->
<!--            </c-content>-->
<!--          </el-tab-pane>-->

          <el-tab-pane label="费用/账务" name="engp,setpan,glepan">
            <c-content>
              <div class="eibs-tab">
                <el-collapse v-model="activeNames">
                  <el-collapse-item title="表外记账" name="engp">
                    <!-- 表外记账 -->
                    <m-engp :model="model" :codes="codes" />
                  </el-collapse-item>
                  <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>
          </el-tab-pane>

          <el-tab-pane label="备查/附言" name="addbcb">
            <c-content>
              <m-addbcb :model="model" :codes="codes" />
            </c-content>
          </el-tab-pane>



          <el-tab-pane label="报文/面函" name="docpan">
            <c-content>
              <m-docpan :model="model" :codes="codes" />
            </c-content>
          </el-tab-pane>

          <el-tab-pane label="附件信息" name="doctre">
            <c-content>
              <m-doctre :model="model" :codes="codes" />
            </c-content>
          </el-tab-pane>

        </c-tabs>
      </el-form>


      <c-function-btn :handleSubmit="handleSubmit" :handleCheck="handleCheck" :handleStash="handleStash">

      </c-function-btn>

wjj committed
120
    </c-page>
121
  </div>
wjj committed
122 123 124 125 126
</template>
<script>
    import Api from "~/service/Api"
    import Utils from "~/utils/index"
    import CodeTable from "~/config/CodeTable"
wangren committed
127
    import commonFuncs from "~/mixin/commonFuncs";
wjj committed
128
    import Bctrad from "~/model/Bctrad"
wangren committed
129
    import commonProcess from "~/mixin/commonProcess"
wjj committed
130 131 132
    import Check from "~/model/Bctrad/Check"
    import Default from "~/model/Bctrad/Default"
    import Pattern from "~/model/Bctrad/Pattern"
133 134 135 136 137 138

    // import Bctret from "./Bctret";
    // import Detp from "./Detp";
    // import Ptyp from "./Ptyp";
    import Ovwp from "./Ovwp";
    import Addbcb from "./Addbcb";
nanrui committed
139

wjj committed
140
    import Engp from "~/views/Public/Engp"
141
    import Setpan from "~/components/business/setmod/views"
wjj committed
142 143
    import Coninfp from "~/views/Public/Coninfp"
    import Docpan from "~/views/Public/Docpan"
144
    import Doctre from "~/views/Public/Doctre"
panziyi committed
145
    import Glepan from "~/views/Public/Glepan"
146
    // import Limitbody from "~/views/Public/Limitbody";
wjj committed
147 148 149 150

    export default {
        name: "Bctrad",
        components: {
151 152 153 154 155 156 157 158 159 160 161 162
          // "m-bctret": Bctret,
          // "m-detp": Detp,
          // "m-ptyp": Ptyp,
          "m-engp": Engp,
          "m-setpan": Setpan,
          "m-coninfp": Coninfp,
          "m-docpan": Docpan,
          "m-doctre": Doctre,
          "m-glepan": Glepan,
          "m-ovwp": Ovwp,
          "m-addbcb": Addbcb,
          // "m-limitbody": Limitbody,
wjj committed
163 164 165 166 167 168
        },
        provide() {
            return {
                root: this
            }
        },
169
        mixins: [commonProcess,commonFuncs], // 里面包含了Default、Check等的公共处理
wjj committed
170 171
        data() {
            return {
172 173
                activeNames: ["engp"],
                tabVal: "ovwp",
wjj committed
174 175 176 177 178 179 180 181 182 183 184 185
                trnName: "bctrad",
                model: new Bctrad().data,
                checkRules: Check,
                defaultRules: Default,
                pattern: Pattern,
                rules: null,
                codes: {
                    ...CodeTable
                },
            }
        },
        methods: {
panziyi committed
186 187 188
      myTabClick(tab) {
      this.tabClick(tab);
      let name = tab.name;
panziyi committed
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
      let rulePath;
      if (name === "setpan") {
        rulePath = "setmod.setpan";
      }
      if (name === "glepan") {
        rulePath = "setmod.glemod.glepan";
      }
      if (name === "docpan") {
        rulePath = "trnmod.trndoc.docpan"
      }
      if (!!rulePath) {
        this.executeRule(rulePath).then((res) => {
          if (res.respCode == SUCCESS) {
            this.updateModel(res.data);
          }
        });
      }
      
      }
wjj committed
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229
        },
        created: async function () {
            console.log("进入bctrad交易");
            let rtnmsg = await this.init(this.$route.query)
            if (rtnmsg.respCode == SUCCESS) {
                //更新数据
                Utils.copyValueFromVO(this.model, rtnmsg.data);
                if (this.isInDisplay) {
                    this.restoreDisplay();
                }
            } else {
                this.$notify.error({
                    title: '错误',
                    message: '服务请求失败!'
                });
            }
        }
    }
</script>
<style>

</style>