index.vue 5.42 KB
Newer Older
潘际乾 committed
1 2
<template>
  <div class="eContainer">
huangxin committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16
      <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>
   
潘际乾 committed
17
    <el-form :model="model" :rules="rules" ref="modelForm" label-width="150px" label-position="right" size="small" :validate-on-rule-change="false">
huangxin committed
18
       <c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="tabClick">
潘际乾 committed
19 20
        
            <!--PD000016 -->
huangxin committed
21 22
           <el-tab-pane label="Cancelation" name="canp">
               <c-content>
潘际乾 committed
23
                <m-canp :model="model" :codes="codes"/>
huangxin committed
24
                </c-content>
潘际乾 committed
25 26 27
           </el-tab-pane>
 
            <!--PD000027 -->
huangxin committed
28
           <el-tab-pane label="Liability" name="engp">
潘际乾 committed
29 30 31 32
                <m-engp :model="model" :codes="codes"/>
           </el-tab-pane>
 
            <!--PD000000 -->
huangxin committed
33 34
           <el-tab-pane label="Settlement" name="setpan">
               <c-content>
潘际乾 committed
35
                <m-setpan :model="model" :codes="codes"/>
huangxin committed
36
                </c-content>
潘际乾 committed
37 38 39
           </el-tab-pane>
 
            <!--PD000001 -->
huangxin committed
40
           <el-tab-pane label="Bookings" name="glepan">
潘际乾 committed
41 42 43 44
                <m-glepan :model="model" :codes="codes"/>
           </el-tab-pane>
 
            <!--PD000000 -->
huangxin committed
45
           <el-tab-pane label="Completion" name="coninfp">
潘际乾 committed
46 47 48 49
                <m-coninfp :model="model" :codes="codes"/>
           </el-tab-pane>
 
            <!--PD000529 -->
huangxin committed
50
           <el-tab-pane label="Messages" name="docpan">
潘际乾 committed
51 52 53 54
                <m-docpan :model="model" :codes="codes"/>
           </el-tab-pane>
 
            <!--PD000546 -->
huangxin committed
55
           <el-tab-pane label="Attachments" name="doctre">
潘际乾 committed
56 57 58 59
                <m-doctre :model="model" :codes="codes"/>
           </el-tab-pane>
 
            <!--PD000001 -->
huangxin committed
60
           <el-tab-pane label="统一授信" name="limitbody">
潘际乾 committed
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
                <m-limitbody :model="model" :codes="codes"/>
           </el-tab-pane>
       </c-tabs>
    </el-form>
  </div>
</template>
<script>
import Api from "~/service/Api"
import CodeTable from "~/config/CodeTable"
import Brtcsg from "~/model/Brtcsg"
import commonProcess from "~/mixin/commonProcess"
import commonFuncs from "~/mixin/commonFuncs"
import Check from "~/model/Brtcsg/Check"
import Default from "~/model/Brtcsg/Default"
import Pattern from "~/model/Brtcsg/Pattern"
import Canp from "./Canp"

import Engp from "../../Public/Engp"
import Setpan from "../../Public/Setpan"
import Glepan from "../../Public/Glepan"
import Coninfp from "../../Public/Coninfp"
import Docpan from "../../Public/Docpan"
import Doctre from "../../Public/Doctre"
import Limitbody from "../../Public/Limitbody"


export default {
    name: "Brtcsg",
    components:{
        "m-canp" : Canp,
        "m-engp" : Engp,
        "m-setpan" : Setpan,
        "m-glepan" : Glepan,
        "m-coninfp" : Coninfp,
        "m-docpan" : Docpan,
        "m-doctre" : Doctre,
        "m-limitbody" : Limitbody,
    },
    provide() {
        return {
            root: this
        }
    },
    mixins: [commonProcess, commonFuncs],    // 里面包含了Default、Check等的公共处理
    data(){
        return {
            tabVal: "canp",
            trnName: "brtcsg",
            model: new Brtcsg().data,
            checkRules: Check,
            defaultRules: Default,
            pattern: Pattern,
            rules: null,
            codes: {
            },
        }
    },
    methods:{
huangxin committed
119 120
        // myTabClick(tab){
        //     this.tabClick(tab)
潘际乾 committed
121 122 123
            /**
            *  do it yourself
            **/
huangxin committed
124
        // },
潘际乾 committed
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
        async handleSave() {
            let result = await this.save();
            if (result.respCode == SUCCESS && Object.keys(result.fieldErrors).length == 0) {
                this.$notify({
                    title: "成功",
                    message: "保存成功",
                    type: "success",
                });
                this.$store.dispatch("TagsView/delView", this.$route)
                this.$router.go(-1)
            } else if(result.fieldErrors && Object.keys(result.fieldErrors).length > 0 ){
                const tab = this.showBackendErrors(result.fieldErrors)
                if (tab) {
                    // tab切换之后,需出发tab-click的事件
                    this.tabClick(tab);
                }
                this.$notify({
                    title: "错误",
                    message: "检核失败!",
                    type: "error",
                });
            } else{
                this.$notify({
                    title: "失败",
                    message: "保存失败",
                    type: "error",
                });
            }
        }
    },
    created:async function(){
        console.log("进入brtcsg交易");
        let rtnmsg = await this.init({})
jianglong committed
158 159 160 161 162 163
        if (rtnmsg.respCode == SUCCESS) {
          Utils.copyValueFromVO(this.model, rtnmsg.data);
          if (this.isInDisplay) {
          this.restoreDisplay();
          }
        } else {
潘际乾 committed
164 165
            this.$notify.error({title: '错误',message: '服务请求失败!'});
        }
jianglong committed
166
    },
潘际乾 committed
167 168 169 170 171
}
</script>
<style>

</style>