<template>
|
<div class="list-data">
|
<div class="header-box">
|
<van-list
|
:finished-text="$t('hj43')"
|
:loading-text="$t('hj430')"
|
:immediate-check="false"
|
>
|
<div
|
class="item"
|
v-for="item in listArr"
|
:key="item.indexCode"
|
@click="shengou(item)"
|
>
|
<div class="tabs_o_items">
|
<div class="tabs_o_title">
|
<div class="title">
|
{{ item.newName }}
|
</div>
|
<span class="buy_to_sell mairu">{{
|
item.type === 1 ? $t("hj45") : $t("新股配售")
|
}}</span>
|
</div>
|
<div
|
style="
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
"
|
>
|
<div style="width: 100%">
|
<div class="bottom_price_title">
|
<div class="start_price">
|
<span>{{ item.buyPrice | _toLocaleString(false) }} </span>
|
</div>
|
<div class="new_price" v-if="item.status <= 3">
|
<span>
|
{{ item.applyNums }}
|
</span>
|
</div>
|
<div class="new_price" v-if="item.status >= 3">
|
<span>
|
{{ item.applyNumber }}
|
</span>
|
</div>
|
<div class="new_price" v-if="item.status === 4">
|
<span style="color: red">
|
{{ item.dbMoney }}
|
</span>
|
</div>
|
</div>
|
<div class="bottom_price_title">
|
<div class="start_price">
|
<span>{{ $t("hj81") }}</span>
|
</div>
|
<div class="new_price" v-if="item.status <= 3">
|
<span>
|
{{ $t("hj57") }}
|
</span>
|
</div>
|
<div class="new_price" v-if="item.status >= 3">
|
<span>
|
{{ $t("hj253") }}
|
</span>
|
</div>
|
<div class="new_price" v-if="item.status === 4">
|
<span style="color: red">
|
{{ $t("待补金额") }}
|
</span>
|
</div>
|
</div>
|
</div>
|
<div class="right_btn pink" style="padding: 0px 0.2rem">
|
<span>
|
{{
|
item.status == 1
|
? $t("hj131")
|
: item.status == 2
|
? $t("hj132")
|
: item.status == 3
|
? $t("hj133")
|
: item.status == 4
|
? $t("待上市")
|
: item.status == 5
|
? $t("hj135")
|
: ""
|
}}
|
</span>
|
|
<!-- <van-button v-else type="primary">
|
{{ $t("hj250") }}</van-button
|
> -->
|
</div>
|
|
<!---->
|
</div>
|
</div>
|
</div>
|
</van-list>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import * as api from "@/axios/api";
|
import handleDt from "@/utils/deTh";
|
import { Dialog, Notify } from "vant";
|
|
// getNewAdd
|
export default {
|
components: {
|
[Dialog.Component.name]: Dialog.Component,
|
},
|
props: {
|
active: {
|
type: String,
|
default: "",
|
},
|
zxactive: {
|
type: String,
|
default: "",
|
},
|
sousuo: {
|
type: String,
|
default: "",
|
},
|
tabsList: {
|
type: Array,
|
default: [],
|
},
|
},
|
watch: {
|
active(e) {
|
this.listArr = [];
|
this.getStock(e, this.zxactive);
|
},
|
zxactive(e) {
|
this.listArr = [];
|
this.getStock(this.active, e);
|
},
|
sousuo(e) {
|
this.listArr = [];
|
this.getStock(this.active, this.zxactive);
|
},
|
},
|
data() {
|
return {
|
fromData: {
|
value: 1,
|
},
|
loading: false,
|
show: false,
|
finished: false,
|
listArr: [],
|
pageNumVal: 1,
|
shengouObj: {},
|
};
|
},
|
|
mounted() {
|
this.listArr = [];
|
this.pageNumVal = 1;
|
this.getStock(this.active, this.zxactive);
|
},
|
methods: {
|
renjiao(item) {
|
if (item.status !== 3) {
|
return;
|
}
|
Dialog.confirm({
|
title: this.$t("提示"),
|
message: this.$t("是否认缴"),
|
confirmButtonText: this.$t("确定"),
|
cancelButtonText: this.$t("取消"),
|
})
|
.then(async () => {
|
const res = await api.submitSubscribe({
|
id: item.id,
|
});
|
if (res.status === 0) {
|
Notify({ type: "success", message: this.$t("认购成功") });
|
this.getStock(this.active, this.zxactive);
|
} else {
|
Notify({ type: "danger", message: this.$t(res.msg) });
|
}
|
// 认购成功
|
})
|
.catch(() => {
|
// on cancel
|
});
|
},
|
fromDatavalue(e) {
|
this.fromData.value = e.target.value;
|
},
|
|
shengou(item) {
|
this.show = true;
|
this.shengouObj = item;
|
},
|
filterSH(val) {
|
if (val === "sh") {
|
return 1;
|
} else if (val === "bj" || val === "sz") {
|
return 0;
|
}
|
},
|
|
// 获取列表
|
getStock: handleDt.debounce(async function (a, b) {
|
let data = await api.getUserNewGuList();
|
if (data.status === 0) {
|
this.listArr = data.data;
|
}
|
console.log(2222222);
|
this.loading = false;
|
this.finished = false;
|
}, 500),
|
onLoads() {},
|
optionszx() {},
|
},
|
};
|
</script>
|
|
<style lang="less" scoped>
|
.tabs_o_items {
|
width: 100%;
|
position: relative;
|
// border-bottom: 0.01rem solid #ececec;
|
padding: 0.3rem 0;
|
.tabs_o_title {
|
width: 100%;
|
display: -webkit-box;
|
display: -ms-flexbox;
|
display: flex;
|
-webkit-box-align: center;
|
-ms-flex-align: center;
|
align-items: center;
|
-webkit-box-pack: justify;
|
-ms-flex-pack: justify;
|
// justify-content: space-between;
|
span {
|
display: inline-block;
|
margin-right: 0.2rem;
|
}
|
.title {
|
font-weight: 600;
|
font-size: 0.4059rem;
|
color: #000;
|
}
|
.buy_to_sell {
|
padding: 0.08rem 0.1rem;
|
font-weight: 600;
|
}
|
.mairu {
|
color: #6daf7d;
|
}
|
}
|
.right_btn {
|
width: 110px;
|
margin-left: 10px;
|
min-height: 0.6667rem;
|
padding: 15px 0;
|
right: 1%;
|
top: 27%;
|
display: -webkit-box;
|
display: -ms-flexbox;
|
display: flex;
|
-webkit-box-align: center;
|
-ms-flex-align: center;
|
align-items: center;
|
-webkit-box-pack: center;
|
-ms-flex-pack: center;
|
justify-content: center;
|
}
|
.pink {
|
color: #eb2f96;
|
background: #fff0f6;
|
border-color: #ffadd2;
|
}
|
.bottom_price_title {
|
width: 100%;
|
margin-top: 0.2rem;
|
display: -webkit-box;
|
display: -ms-flexbox;
|
display: flex;
|
-webkit-box-align: center;
|
-ms-flex-align: center;
|
align-items: center;
|
.start_price {
|
width: 33%;
|
height: 100%;
|
color: #bdbdbd;
|
}
|
.new_price {
|
width: 33%;
|
height: 100%;
|
color: #bdbdbd;
|
}
|
}
|
}
|
.popup-box {
|
padding: 30px 20px;
|
.input-box {
|
height: 1.3rem;
|
background: #f3f3f3;
|
border-radius: 0.15rem;
|
|
line-height: 1.3rem;
|
padding-left: 10px;
|
display: flex;
|
padding-left: 0.2rem;
|
font-size: 0.3975rem;
|
.laber {
|
margin-right: 10px;
|
}
|
// margin-top: 0.8rem;
|
}
|
.but {
|
width: 100%;
|
height: 1.3rem;
|
border-radius: 0.15rem;
|
background: #5c288c;
|
color: #fff;
|
font-size: 0.4615rem;
|
margin-top: 0.5rem;
|
}
|
.shijian {
|
width: 100%;
|
margin-top: 0.5rem;
|
margin-bottom: 0.5rem;
|
.xgsj {
|
margin-top: 10px;
|
font-size: 0.3875rem;
|
// font-weight: 600;
|
display: -webkit-box;
|
display: -ms-flexbox;
|
display: flex;
|
height: 50%;
|
-webkit-box-align: center;
|
-ms-flex-align: center;
|
align-items: center;
|
.sjtlt {
|
width: 25%;
|
margin-left: 0.4rem;
|
}
|
}
|
}
|
}
|
.list-data {
|
width: 100%;
|
background-color: #fff;
|
|
.header-box {
|
padding: 20px 15px;
|
|
color: rgb(140, 159, 173);
|
}
|
}
|
|
.item {
|
// width: 100%;
|
margin: 12px 15px;
|
padding-bottom: 15px;
|
// display: flex;
|
// justify-content: space-between;
|
border-bottom: 1px solid #f0f2f3;
|
.right_bs {
|
text-align: center;
|
border-radius: 0.05333rem;
|
font-family: PingFang SC;
|
font-style: normal;
|
font-weight: 500;
|
font-size: 0.32rem;
|
line-height: 0.64rem;
|
color: #fff;
|
min-width: 2.13333rem;
|
padding: 0 0.16rem;
|
height: 0.64rem;
|
background-color: rgb(3, 173, 143);
|
font-weight: 900;
|
}
|
|
.green {
|
background-color: rgb(3, 173, 143);
|
}
|
.red {
|
background-color: rgb(208, 75, 100);
|
}
|
}
|
.center_price {
|
font-style: normal;
|
font-weight: 500;
|
font-size: 0.4rem;
|
line-height: 0.56rem;
|
text-align: right;
|
color: #14181f;
|
text-align: right;
|
flex: 1;
|
margin-right: 20px;
|
}
|
.title_color {
|
font-style: normal;
|
font-weight: 500;
|
font-size: 0.4rem;
|
line-height: 0.56rem;
|
width: 4rem;
|
text-align: left;
|
color: #14181f;
|
}
|
.xgsgType {
|
border-radius: 0.1rem;
|
background-color: rgba(102, 204, 153, 0.1);
|
border: 0.04rem solid #5ce398;
|
color: #5ce398;
|
text-align: center;
|
line-height: 35px;
|
}
|
</style>
|