index.vue 7.32 KB
Newer Older
fukai committed
1
<template>
2
<el-form :model="model" :rules="rules" ref="modelForm" label-width="120px" size="small" style="height:100%;" :validate-on-rule-change="false">
fukai committed
3 4 5 6 7 8
  <el-container style="height:100%;">
  
    <el-main style="padding:0">
      
            <el-container style="height:100%">
            <el-main style="padding:0">
9
              <c-tabs :value="tabVal" class="fulltab" v-model="todoActive" type="card" @tab-click="handleClick">
liuxin committed
10

fukai committed
11 12 13
                <el-tab-pane  v-for="item in codes.todo" :key="item.value" :label="item.label" :name="item.value">
                  <s-todo :todoType="item.value"/>
                </el-tab-pane>
潘际乾 committed
14
              </c-tabs>
fukai committed
15 16 17 18 19 20 21 22 23
            </el-main>
            </el-container>
          
    </el-main>
    <div style="width:8px;background-color:#E8E8E8;"></div>
    <el-aside>              
          <div class="rightPanel">
          <c-page title="牌价">
          <div class="e-table-wrapper">
liuxin committed
24 25
              <c-table
                :data="model.offp.xrtlst"
fukai committed
26 27 28 29 30 31 32 33
                  style="width: 100%"
                  >
                  <el-table-column
                    prop="cur"
                    label="币种"
                    sortable
                    >
                    <template slot-scope="scope">
liuxin committed
34
                      <span>{{
fukai committed
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
                          findCodeLabel(codes.curtxt,scope.row.cur)
                         }}</span>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="buyrat"
                    label="买入价"
                    sortable
                    >
                  </el-table-column>
                  <el-table-column
                    prop="midrat"
                    label="中间价"
                    sortable
                    >
                  </el-table-column>
                  <el-table-column
                    prop="selrat"
                    label="卖出价"
                    sortable
                    >
                  </el-table-column>
liuxin committed
57
                </c-table>
fukai committed
58 59 60 61 62
        </div>
          </c-page>
          <div style="height:16px;background-color:#E8E8E8"></div>
          <c-page title="利率">
          <div class="e-table-wrapper">
liuxin committed
63 64
              <c-table
                :data="model.offp.iralst"
fukai committed
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
                  style="width: 100%"
                  >
                  <el-table-column
                    prop="cur"
                    label="币种"
                    sortable
                    >
                    <template slot-scope="scope">
                      <span>{{ findCodeLabel(codes.relflg,scope.row.cur)}}</span>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="iratyp"
                    label="类型"
                    sortable
                    >
                  </el-table-column>
                  <el-table-column
                    prop="due"
                    label="期限"
                    sortable
                    >
                    <template slot-scope="scope">
                      <span>{{ findCodeLabel(codes.dbfmethod,scope.row.due) }}</span>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="basrat"
                    label="利率"
                    sortable
                    >
                  </el-table-column>
liuxin committed
97
                </c-table>
fukai committed
98 99 100 101 102 103 104 105 106 107 108 109 110
                
            </div>
          </c-page>
        </div>
      </el-aside>
      
      
    
  </el-container>
  </el-form>
</template>
<script>
import Api from "~/service/Api"
wangren committed
111
import commonProcess from "~/mixin/commonProcess"
潘际乾 committed
112
import Pattern from "~/model/Office/Pattern"
113 114
import Default from "~/model/Office/Default";
import Check from "~/model/Office/Check";
fukai committed
115 116 117 118
import CodeTable from "~/config/CodeTable"
import s_todo from "./TodoItem"

export default {
潘际乾 committed
119
    name: 'Office',
fukai committed
120
    components:{"s-todo":s_todo},
wangren committed
121
    mixins: [commonProcess],
liuxin committed
122 123
    computed: {

124 125 126 127 128
    },
    provide() {
        return {
            root: this
        }
liuxin committed
129
    },
fukai committed
130 131
    data(){
        return {
132
          tabVal: CodeTable.todo[0].value,
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 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
          todoActive:"WAT",
          codes:{
                dsp:CodeTable.dsp,
                busflg:CodeTable.busflg,
                actiontype:CodeTable.actiontype,
                cur:CodeTable.cur,
                ptytyp:CodeTable.ptytyp,
                staflg:CodeTable.staflg,
                paytyp:CodeTable.paytyp,
                payattr:CodeTable.payattr,
                balancemode:CodeTable.balancemode,
                bopcustype:CodeTable.bopcustype,
                payeeattr:CodeTable.payeeattr,
                boppaytype:CodeTable.boppaytype,
                debcdtflg:CodeTable.debcdtflg,
                acttyp:CodeTable.acttyp,
                payflg:CodeTable.payflg,
                buscod:CodeTable.buscod,
                datsrc:CodeTable.datsrc,
                sndselflg:CodeTable.sndselflg,
                relflg:CodeTable.relflg,
                payacttyp:CodeTable.payacttyp,
                curtxt:CodeTable.curtxt,
                dbfmethod:CodeTable.dbfmethod,
                bustyp:CodeTable.bustyp,
                todo:CodeTable.todo,
                swftyp:CodeTable.swftyp,
                payeraccttype:CodeTable.payeraccttype,
                oratyp:CodeTable.oratyp,
                chato:CodeTable.chato,
                opertype:CodeTable.opertype,
                bopyesno:CodeTable.bopyesno,
                custyp:CodeTable.custyp,
                selten:CodeTable.selten,
                dsp2:CodeTable.dsp2,
                liqtyp:CodeTable.liqtyp,
            },
          model:{
              offp:{
                todotyp:[],			//  待办类型		.offp.todotyp
                todolst:[],			//  		.offp.todolst
                selten:"",			//  		.offp.selten
                xrtlst:[],			//  		.offp.xrtlst
                iralst:[],			//  		.offp.iralst
              },
          },
          checkRules: Check,
          defaultRules: Default,
          pattern: Pattern,
          rules:null
fukai committed
183 184 185
        }
    },
    methods:{
潘际乾 committed
186 187 188
        handleClick(index, row){
            console.log(index)
        },
fukai committed
189 190 191 192
    },
    mounted:async function(){

        console.log("进入office交易");
fukai committed
193 194
        if(1) return

195
        let rtnmsg = await this.init()
fukai committed
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231
        console.log(rtnmsg)
        if(rtnmsg.code == SUCCESS)
        {
           //TODO 处理数据逻辑
          this.model.offp.todolst = rtnmsg.data.offp_todolst || []
          this.model.offp.iralst = rtnmsg.data.offp_iralst || []
          this.model.offp.xrtlst = rtnmsg.data.offp_xrtlst || []
        }
        else
        {
            this.$notify.error({title: '错误',message: '服务请求失败!'});
        }
    }
}
</script>
<style>
  .rightPanel{
    display: flex;
    height: 100%;
    flex-direction: column;
  }
  .rightPanel .e-table-wrapper{
    height: 100%;
  }
   .fulltab.el-tabs{
        display: flex;
        height: 100%;
        flex-direction: column;
    }
    .fulltab.el-tabs .el-tabs__content{
        flex:1;
    }
    .fulltab.el-tabs .el-tabs__content .el-tab-pane{
        height: 100%;
    }
</style>