<template>
|
<div>
|
<headers :mess="loginWay" />
|
<div class="pages">
|
<div class="pages_top">
|
<div class="pages_top_price">₹{{dataprice.totleAssets}}</div>
|
<div class="pages_top_order" @click="gotonew">{{$t('新股订单')}}</div>
|
<div class="pages_top_sx"></div>
|
<div class="pages_top_rules"> IPO{{$t('规则')}}</div>
|
</div>
|
<div class="pages_center">
|
<div @click="typeclick(1)" :class="typeindex==1?'pages_center_boxa':'pages_center_box'">{{$t('新股预览')}}</div>
|
<div @click="typeclick(2)" :class="typeindex==2?'pages_center_boxb':'pages_center_box'">{{$t('申购')}}</div>
|
<div @click="typeclick(3)" :class="typeindex==3?'pages_center_boxc':'pages_center_box'">{{$t('配售')}}</div>
|
</div>
|
|
<div class="pages_list" v-if="typeindex==1">
|
<div class="pages_list_box" v-for="(item,index) in list" :key="index">
|
<div class="pages_list_box_top">
|
<div class="pages_list_box_top_left">
|
<div class="pages_list_box_top_left_left">{{item.name}}</div>
|
<div class="pages_list_box_top_left_right">{{item.code}}</div>
|
</div>
|
<div class="pages_list_box_top_right">{{$t('发行价格')}}
|
<span style="color: #00B95F;">{{item.price}}</span>
|
</div>
|
</div>
|
|
<div class="pages_list_box_bottom">
|
<div class="pages_list_box_bottom_left">
|
<div class="pages_list_box_bottom_left_top">{{$t('预购期间')}}</div>
|
<div class="pages_list_box_bottom_left_bottom">
|
{{item.subscribeTime | gettime}}-{{item.subscribeEndTime | gettime}}</div>
|
</div>
|
<div class="pages_list_box_bottom_left">
|
<div class="pages_list_box_bottom_left_top">{{$t('上市时间')}}</div>
|
<div class="pages_list_box_bottom_left_bottom">{{item.listDate | gettime}}</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="pages_list" v-if="typeindex!=1">
|
<div class="pages_list_boxs" v-for="(item,index) in list" :key="index">
|
<div class="pages_list_box_left">
|
<div class="pages_list_box_left_top">{{item.name}}</div>
|
<div class="pages_list_box_left_buttom" style="margin-left: 0;margin-top: 6px;margin-bottom: 6px;">
|
{{item.code}}</div>
|
<div class="pages_list_box_left_buttoms">{{$t('hj81')}} <span style="color: #00B95F;">{{item.price}}</span></div>
|
</div>
|
<div class="pages_list_box_right">
|
<div class="pages_list_box_right_btn" @click="popuclick(item)">{{typeindex==2?$t('申购'):$t('配售')}}</div>
|
</div>
|
</div>
|
</div>
|
<!-- 新股弹窗 -->
|
<van-popup v-model="settingDialog" position="bottom" @close="popClose">
|
<div class="setting_content">
|
<div class="old_password" >
|
<div class="left_titles">
|
<span>{{ typeindex==2?$t('hj57'):$t('配售数量') }}:</span>
|
</div>
|
<div class="right_password_input">
|
<input type="number" v-model="sgNum" />
|
</div>
|
</div>
|
|
<div class="shijian">
|
<div class="xgsj">
|
|
<div class="sjtlt">{{ typeindex==2?$t('hj59'):$t('配售时间') }}: </div>
|
<div class="xgTime" v-if="this.sgsj">{{ this.sgsj | getTimeYear }}</div>
|
</div>
|
<div class="xgsj">
|
<div class="sjtlt">{{ $t('hj60') }}: </div>
|
<div class="xgTime" v-if="this.rjsj">{{ this.rjsj | getTimeYear }}</div>
|
</div>
|
<div class="xgsj">
|
<div class="sjtlt">{{ $t('上市时间') }}: </div>
|
<div class="xgTime" v-if="this.listDate">{{ this.listDate | getTimeYear }}</div>
|
</div>
|
<div class="xgsj" v-if="typeindex!=3">
|
<div class="sjtlt">{{ $t('最小购买数') }}: </div>
|
<div class="xgTime" v-if="this.orderMinNumber">{{ orderMinNumber }}</div>
|
</div>
|
<div class="xgsj" v-if="typeindex!=1">
|
<div class="sjtlt">{{ $t('最大购买数') }}: </div>
|
<div class="xgTime" v-if="this.orderNumber">{{ orderNumber }}</div>
|
</div>
|
<div class="xgsj" v-if="typeindex==2">
|
<div class="sjtlt">{{ $t('je') }}: </div>
|
<div class="xgTime" v-if="this.xinguprice">{{ xinguprice }}</div>
|
</div>
|
</div>
|
|
<div class="btn_setting" @click="changeSg()">
|
<span>{{ typeindex==2?$t('hj58'):$t('立即配售') }}</span>
|
</div>
|
</div>
|
</van-popup>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import * as api from "@/axios/api";
|
import headers from './compontent/header.vue';
|
import {
|
Toast,
|
MessageBox
|
} from 'mint-ui'
|
export default {
|
components: {
|
headers,
|
},
|
created() {
|
|
this.getmoney()
|
},
|
data() {
|
return {
|
settingDialog: false,
|
list_id: "",
|
loginWay: '123',
|
typeindex: 1,
|
list: [],
|
sgNum: 1,
|
orderMinNumber:'',
|
orderNumber:'',
|
newStockType:'',
|
listDate:'',
|
rjsj:'',
|
sgsj:'',
|
dataprice:'',
|
}
|
},
|
mounted() {
|
this.getqueryNewsList()
|
},
|
methods: {
|
async getmoney(){
|
var option = {accectType:'IN'}
|
let data = await api.getmoney(option)
|
if (data.status === 0) {
|
this.dataprice = data.data
|
Toast(data.msg)
|
} else {
|
Toast(data.msg)
|
}
|
},
|
gotonew(){
|
this.$router.push({path:'/warehouse', query: {
|
index: 3,}})
|
},
|
popuclick(item){
|
this.sgCode = item.code
|
this.xinguprice = item.price
|
this.sgsj = item.subscribeTime
|
this.rjsj = item.subscriptionTime
|
this.listDate = item.listDate
|
this.newStockType = item.newStockType
|
this.orderNumber = item.orderNumber
|
this.orderMinNumber = item.orderMinNumber
|
this.sgNum = Math.floor(this.$store.state.userInfo.enableAmt / this.xinguprice)
|
this.settingDialog = true
|
},
|
async changeSg() {
|
if (this.newStockType != 1) {
|
if (!this.sgNum) {
|
Toast(this.$t('hj67'))
|
return
|
};
|
// this.sgNum必须是数字并且不能小于1
|
if (this.sgNum < 1) {
|
Toast(this.$t('hj68'))
|
return
|
}
|
if (this.sgNum > this.orderNumber) {
|
Toast(this.$t('hj69') + this.orderNumber)
|
return
|
}
|
}
|
|
|
let opt = {
|
newCode: this.sgCode,
|
// applyNums: this.sgNum,
|
applyNums: this.newStockType == 1 ? '999999999' : this.sgNum,
|
phone: this.$store.state.userInfo.phone
|
}
|
let data = await api.getNewAdd(opt)
|
if (data.status === 0) {
|
this.sgShow = false
|
this.sgCode = ''
|
this.sgsj = ''
|
this.rjsj = ''
|
this.listDate = ''
|
this.orderMinNumber = ''
|
this.newStockType = ''
|
this.orderNumber = ''
|
Toast(this.$t('hj70'))
|
this.$router.push({
|
path: '/warehouse?index=3'
|
})
|
} else {
|
Toast(data.msg)
|
}
|
if (navigator.vibrate) {
|
// 支持
|
navigator.vibrate([55])
|
}
|
},
|
popClose() {
|
this.sgCode = ''
|
this.sgsj = ''
|
this.rjsj = ''
|
this.newStockType = ''
|
this.orderNumber = ''
|
},
|
typeclick(e) {
|
this.typeindex = e
|
this.getqueryNewsList()
|
},
|
async getqueryNewsList() {
|
var option = {
|
pageType: this.typeindex
|
}
|
let data = await api.getnewgulist(option);
|
this.list = data.data
|
}
|
|
},
|
filters: {
|
getTimeYear(time){
|
if (!time) {
|
return "";
|
}
|
var nd = new Date(time);
|
var y = nd.getFullYear();
|
var mm = nd.getMonth() + 1;
|
var d = nd.getDate();
|
var h = nd.getHours();
|
var m = nd.getMinutes();
|
var c = nd.getSeconds();
|
if (mm < 10) {
|
mm = "0" + mm;
|
}
|
if (d < 10) {
|
d = "0" + d;
|
}
|
if (h < 10) {
|
h = "0" + h;
|
}
|
if (m < 10) {
|
m = "0" + m;
|
}
|
if (c < 10) {
|
c = "0" + c;
|
}
|
//17:35:2922-06-2022
|
return y + "-" + mm + "-" + d + " " + h + ":" + m + ":" + c;
|
// return mm + "/" + d;
|
},
|
gettime(time) {
|
if (!time) {
|
return "";
|
}
|
var nd = new Date(time);
|
var y = nd.getFullYear();
|
var mm = nd.getMonth() + 1;
|
var d = nd.getDate();
|
var h = nd.getHours();
|
var m = nd.getMinutes();
|
var c = nd.getSeconds();
|
if (mm < 10) {
|
mm = "0" + mm;
|
}
|
if (d < 10) {
|
d = "0" + d;
|
}
|
if (h < 10) {
|
h = "0" + h;
|
}
|
if (m < 10) {
|
m = "0" + m;
|
}
|
if (c < 10) {
|
c = "0" + c;
|
}
|
//17:35:2922-06-2022
|
// return y + "-" + mm + "-" + d + " " + h + ":" + m + ":" + c;
|
return mm + "/" + d;
|
}
|
},
|
|
}
|
</script>
|
|
<style scoped lang="less">
|
.xgsj {
|
font-size: 0.3875rem;
|
font-weight: 600;
|
display: flex;
|
height: 50px;
|
align-items: center;
|
|
}
|
.setting_content {
|
width: 100%;
|
// height: 5rem;
|
padding: 0.3rem;
|
|
.old_password {
|
width: 100%;
|
height: 1.6rem;
|
background: rgb(243, 243, 243);
|
border-radius: 0.15rem;
|
display: flex;
|
margin-top: 0.8rem;
|
|
.left_titles {
|
margin-left: 0.2rem;
|
width: 25%;
|
height: 100%;
|
display: flex;
|
align-items: center;
|
padding-left: 0.2rem;
|
font-size: 0.3975rem;
|
|
// justify-content: flex-end;
|
span {
|
font-weight: 600;
|
letter-spacing: 0.04rem;
|
}
|
}
|
|
.right_password_input {
|
width: 75%;
|
height: 100%;
|
display: flex;
|
align-items: center;
|
|
input {
|
width: 100%;
|
height: 100%;
|
padding-left: 0.2rem;
|
border-radius: 0 0.2rem 0.2rem 0;
|
font-size: 0.3975rem;
|
font-weight: 600;
|
//文字间距
|
letter-spacing: 0.04rem;
|
}
|
}
|
}
|
|
.btn_setting {
|
width: 100%;
|
height: 1.3rem;
|
border-radius: 0.15rem;
|
background: #00B95F;
|
color: #fff;
|
font-size: 0.4615rem;
|
margin-top: 0.5rem;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
|
span {
|
font-weight: 600;
|
}
|
}
|
}
|
.pages_list_box_right_btn{
|
color: #fff;
|
padding: 15px 20px;
|
background-color: #00B95F;
|
border-radius: 8px;
|
}
|
.pages_list_box_left_buttom {
|
margin-left: 10px;
|
padding: 8px;
|
background-color: #c7f3d5;
|
border-radius: 5px;
|
color: #00B95F;
|
}
|
|
.pages_list_box_left_top {
|
color: #00B95F;
|
}
|
|
.pages_list_box_left {
|
display: flex;
|
flex-direction: column;
|
}
|
|
.pages_list_box_bottom_left_top {
|
margin-bottom: 15px;
|
color: #959595;
|
}
|
|
.pages_list_box_bottom_left {
|
margin-top: 20px;
|
display: flex;
|
flex-direction: column;
|
justify-content: center;
|
align-items: center;
|
width: 50%;
|
}
|
|
.pages_list_box_bottom {
|
width: 100%;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
}
|
|
.pages_list_box_top_right {
|
color: #959595;
|
}
|
|
.pages_list_box_top_left_right {
|
margin-left: 10px;
|
padding: 8px;
|
background-color: #c7f3d5;
|
border-radius: 5px;
|
}
|
|
.pages_list_box_top_left {
|
color: #00B95F;
|
display: flex;
|
align-items: center;
|
}
|
|
.pages_list_box_top {
|
display: flex;
|
width: 100%;
|
justify-content: space-between;
|
align-items: center;
|
}
|
|
.pages_list_boxs {
|
width: 96%;
|
margin-top: 20px;
|
padding: 20px;
|
border-radius: 10px;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
background-color: #F5F5F5;
|
}
|
|
.pages_list_box {
|
width: 96%;
|
margin-top: 20px;
|
padding: 20px;
|
border-radius: 10px;
|
display: flex;
|
flex-direction: column;
|
justify-content: center;
|
align-items: center;
|
background-color: #F5F5F5;
|
}
|
|
.pages_list {
|
width: 100%;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
flex-direction: column;
|
}
|
|
.pages_center_boxc {
|
height: 100%;
|
width: 33%;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
background-color: #00B95F;
|
color: #fff;
|
border-radius: 0 10px 10px 0;
|
}
|
|
.pages_center_boxb {
|
height: 100%;
|
width: 33%;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
background-color: #00B95F;
|
color: #fff;
|
}
|
|
.pages_center_boxa {
|
height: 100%;
|
width: 33%;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
background-color: #00B95F;
|
color: #fff;
|
border-radius: 10px 0 0 10px;
|
}
|
|
.pages_center_box {
|
height: 100%;
|
width: 33%;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
}
|
|
.pages_center {
|
background-color: #F5F5F5;
|
width: 96%;
|
border-radius: 8px;
|
height: 60px;
|
display: flex;
|
}
|
|
.pages_top_price {
|
color: #959595;
|
}
|
|
.pages_top {
|
display: flex;
|
justify-content: space-evenly;
|
align-items: center;
|
height: 80px;
|
width: 100%;
|
}
|
|
.pages {
|
width: 100%;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
flex-direction: column;
|
}
|
|
/deep/.header_history {
|
background-color: #00B95F;
|
}
|
|
.newDetail-tits {
|
margin-top: 0.4rem;
|
font-size: 0.4rem;
|
margin-bottom: 0.4rem;
|
}
|
|
.newsTop {
|
border-bottom: 0.01rem solid #cdcdcd;
|
padding-top: 0.3rem;
|
color: #000;
|
width: 96%;
|
margin-left: 0;
|
margin-right: 0;
|
margin: 0 auto;
|
}
|
|
.newsTitle {
|
font-size: 0.55rem;
|
font-weight: 500;
|
}
|
|
.newsDetail {
|
width: 96%;
|
margin-left: 0;
|
margin-right: 0;
|
margin: 0 auto;
|
margin-top: 0.4rem;
|
font-size: 0.35rem;
|
line-height: 0.6rem;
|
}
|
|
.newsImg {
|
width: 100%;
|
margin-top: 0.4rem;
|
}
|
|
.newsImg img {
|
width: 100%;
|
height: 100%;
|
}
|
</style>
|