| | |
| | | <div class="title_items" v-for="(item, index) in tabsArr" :key="index" |
| | | @click="handleTabsClick(item, index)" :class="index == 0 ? 'kuan' : 'kuan'"> |
| | | <span :class="tabsCurrentIndex === index ? 'active' : ''">{{ item }}{{ index == 0 ? '(' + total + ')' : index == 1 ? '(' + totalss + ')' : |
| | | '(' + totals + ')' |
| | | index == 2 ? '(' + totals + ')' : '(' + xgTotal + ')' |
| | | }}</span> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="waiting_box"> |
| | | <div class="img_cont"> |
| | | <img src="../../assets/img/zhaobudao.png" alt /> |
| | | <span class="gd">{{ '当前无挂单' }}</span> |
| | | <span class="gd">{{ '当前无持仓' }}</span> |
| | | <div class="trading" @click="$router.push('/trading-list')"> |
| | | <span>{{ '开始交易' }}</span> |
| | | </div> |
| | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 挂单 --> |
| | | <div class="waiting" v-if="totalss == 0 && tabsCurrentIndex === 1"> |
| | | <div class="waiting_box"> |
| | | <div class="img_cont"> |
| | |
| | | <span>{{ '当前价格' }}</span> |
| | | </div> |
| | | </div> |
| | | <div class="right_btn"> |
| | | <div class="right_btn" @click="gdClose(item)"> |
| | | <span>{{ '撤销' }}</span> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 平仓 --> |
| | | <div class="waiting" v-if="totals == 0 && tabsCurrentIndex === 2"> |
| | | <div class="waiting_box"> |
| | | <div class="img_cont"> |
| | | <img src="../../assets/img/zhaobudao.png" alt /> |
| | | <span class="gd">{{ '当前无挂单' }}</span> |
| | | <span class="gd">{{ '当前无平仓' }}</span> |
| | | <div class="trading" @click="$router.push('/trading-list')"> |
| | | <span>{{ '开始交易' }}</span> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | </van-list> |
| | | <!-- 新股 --> |
| | | <div class="waiting" v-if="xgTotal == 0 && tabsCurrentIndex === 3"> |
| | | <div class="waiting_box"> |
| | | <div class="img_cont"> |
| | | <img src="../../assets/img/zhaobudao.png" alt /> |
| | | <span class="gd">{{ '当前无申购' }}</span> |
| | | <div class="trading" @click="$router.push({path:'/trading-list',query:{listid:3}})"> |
| | | <span>{{ '开始交易' }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <van-list v-model="loadingXg" :finished="finishedXg" finished-text="没有更多了" |
| | | v-show="tabsCurrentIndex === 3 && xgTotal != 0" @load="onLoadXg" :immediate-check="immediate"> |
| | | <div class="tabs_o"> |
| | | <div class="tabs_o_items" v-for="(item, index) in tabsXgArr" :key="item.id"> |
| | | <div class="tabs_o_title"> |
| | | <span class="title">{{ item.newName }}</span> |
| | | <span class="buy_to_sell" :class="item.type == 0 ? 'maichu' : 'mairu'">{{ |
| | | item.type == 0 ? '线下配售' : '新股申购' |
| | | }}</span> |
| | | <!-- <span class="multiple">{{ item.lever }}X</span> |
| | | <span class="nums">{{ item.buyNum / 100 + '手' }}</span> --> |
| | | </div> |
| | | <div class="center_price"> |
| | | |
| | | <div class="start_price jiantou"> |
| | | <span>{{ item.buyPrice }}</span> |
| | | </div> |
| | | <div class="new_price"> |
| | | <span>{{ item.applyNums }}</span> |
| | | </div> |
| | | </div> |
| | | <div class="bottom_price_title"> |
| | | |
| | | <div class="start_price"> |
| | | <span>{{ '申购价格' }}</span> |
| | | </div> |
| | | <div class="new_price"> |
| | | <span>{{ '申购数量' }}</span> |
| | | </div> |
| | | </div> |
| | | <div class="right_btn" @click="zcsg(item)"> |
| | | <span>{{ '新股申购' }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </van-list> |
| | | |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { Toast } from 'vant'; |
| | | import * as api from "@/axios/api"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | tabsArr: ["持仓", "挂单", "已平仓"], |
| | | tabsArr: ["持仓", "挂单", "已平仓","新股"], |
| | | tabsCurrentIndex: 0, |
| | | titleName: "沪深京账户", |
| | | indexSettingInfo: {}, |
| | |
| | | immediate: false, |
| | | loadings: false, |
| | | loadingss:false, |
| | | tabsOrderList:[] |
| | | tabsOrderList:[], |
| | | xgTotal:0, |
| | | tabsXgArr:[], |
| | | loadingXg:false, |
| | | finishedXg:false, |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | this.getFuturesSetting(); |
| | | this.getListDetails(); |
| | | this.getorderList(); |
| | | this.getNewXg(); |
| | | }, |
| | | created() { |
| | | if(this.$route.query.index){ |
| | | this.tabsCurrentIndex = Number(this.$route.query.index) |
| | | } |
| | | |
| | | |
| | | }, |
| | | methods: { |
| | | onLoad() { |
| | |
| | | default: |
| | | break; |
| | | } |
| | | }, |
| | | onLoadXg() { |
| | | this.getNewXg(); |
| | | }, |
| | | async gdClose(item){ |
| | | let opts = { |
| | | id:item.id |
| | | } |
| | | let data = await api.delGuaDan(opts) |
| | | if(data.status == 1){ |
| | | Toast('撤单成功') |
| | | this.page = 1; |
| | | this.pages = 1; |
| | | this.finished = false; |
| | | this.finisheds = false; |
| | | this.tabsPositionNumArr = []; |
| | | this.tabsPcArr = []; |
| | | switch (this.titleIndex) { |
| | | case 0: |
| | | this.titleName = "沪深京账户"; |
| | | this.getListDetail(); |
| | | this.getListDetails(); |
| | | this.getorderList(); |
| | | break; |
| | | case 1: |
| | | this.titleName = "指数账户"; |
| | | this.getzhishuListDetail(); |
| | | this.getzhishuListDetails(); |
| | | this.getorderList(); |
| | | break; |
| | | case 2: |
| | | this.titleName = "期货账户"; |
| | | this.getQhListDetail(); |
| | | this.getQhListDetails(); |
| | | this.getorderList(); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | }else{ |
| | | Toast(data.msg) |
| | | } |
| | | }, |
| | | zcsg(item){ |
| | | this.$router.push({path:'/trading-list',query:{listid:3}}) |
| | | }, |
| | | SetTitleIndex(index) { |
| | | //账户选项卡 |
| | |
| | | handleTabsClick(item, index) { |
| | | //持仓已平仓选项卡 |
| | | this.tabsCurrentIndex = index; |
| | | if(index==3){ |
| | | this.getNewXg(); |
| | | } |
| | | }, |
| | | handleOpenDialog() { |
| | | this.titleDialog = !this.titleDialog; |
| | |
| | | this.tabsPcArr.push(element) |
| | | }) |
| | | this.totals = data.data.total |
| | | } else { |
| | | Toast(data.msg) |
| | | } |
| | | }, |
| | | async getNewXg() { |
| | | //获取新股 |
| | | this.loadingXg = true; |
| | | let opt = { |
| | | } |
| | | let data = await api.getUserNewGuList(opt) |
| | | this.loadingXg = false; |
| | | if (data.data.length < 15) { |
| | | this.finishedXg = true; |
| | | } |
| | | if (data.status === 0) { |
| | | this.tabsXgArr = data.data |
| | | // data.data.list.forEach(element => { |
| | | // this.tabsXgArr.push(element) |
| | | // }) |
| | | this.xgTotal = data.data.length |
| | | } else { |
| | | Toast(data.msg) |
| | | } |
| | |
| | | } |
| | | |
| | | .right_btn { |
| | | width: 1.7949rem; |
| | | height: 0.6667rem; |
| | | width: 1.9949rem; |
| | | height: 0.7667rem; |
| | | position: absolute; |
| | | right: 1%; |
| | | top: 48%; |