Commit 6a5bc4ab authored by jiaoyahui's avatar jiaoyahui

record文件更改

parent ae6505ad
......@@ -106,18 +106,19 @@
</div>
<div>股票代码</div>
<div>股票名称</div>
<div>盈亏金额</div>
<div>盈亏比例</div>
<div>持仓天数</div>
</div>
<div>
<ul class="user_ul">
<li class="name" v-for="(item, index) in pageStockPro" :key="index">
<div class="se_data">{{ item.buyingTime }}</div>
<div class="se_data">{{ item.sellingTime }}</div>
<div class="se_data">{{handleDateTime(item.buyingTime)}}</div>
<div class="se_data">{{handleDateTime(item.sellingTime)}}</div>
<div class="se_data">{{ item.code }}</div>
<div class="se_data">{{ item.name }}</div>
<div class="se_data_p">{{ item.profitRatio }}</div>
<div class="se_data_p">{{ item.profitPrice / 100 }}%</div>
<div class="se_data_p">{{ item.profitRatio }}</div>
<div class="se_data_t">{{ item.holdingDays }}</div>
</li>
</ul>
......@@ -169,8 +170,26 @@ export default {
} else {
this.get_Pro(); //已购买
}
},
methods: {
handleDateTime(timestamp) {
// const timestamp = Date.now();
const date = new Date(timestamp);
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
const hours = date.getHours().toString().padStart(2, '0');
const minutes = date.getMinutes().toString().padStart(2, '0');
const seconds = date.getSeconds().toString().padStart(2, '0');
return `${year}-${month}-${day}${hours}:${minutes}:${seconds}`;
},
//未购买---------------开始
get_elected() {
let params = {
......@@ -260,6 +279,7 @@ export default {
this.yimai_orderBy = orderBy;
this.get_Pro();
},
//已购买---------------结束
onClickLeft() {
......@@ -285,22 +305,15 @@ export default {
/* padding-left: 10px; */
padding-left: 6px;
margin-right: 6px;
border: 1px solid red;
/* width: 436px; */
background: rgb(241, 238, 238);
position: fixed;
top: 46px;
left: 0%;
/* line-height: 28px; */
/* height: 40px;
}
.scrop{
/* width: 435px; */
overflow-x: scroll;
white-space: nowrap;
border: 1px solid red;
/* height: 200px; */
}
.contain {
position: relative;
width: 100%;
......@@ -354,7 +367,7 @@ export default {
border-bottom: 1px solid #d5d8db;
display: flex;
line-height: 27px;
width:165%;
margin-top: 7px;
}
.user_ul {
......@@ -374,7 +387,7 @@ export default {
margin-left: 1px;
}
.se_data {
width: 18%;
width: 26%;
line-height: 41px;
text-align: center;
}
......@@ -403,4 +416,13 @@ export default {
.sent{
margin-top: 10px;
}
::v-deep .van-nav-bar[data-v-341046a4] {
position: relative;
z-index: 1;
background-color: #e03939;
-webkit-user-select: none;
color: white;
user-select: none;
width: 165%;
}
</style>
......@@ -46,7 +46,7 @@
<div>{{ item.name }}</div>
<div>{{ item.code }}</div>
</div>
<div class="odiv">{{ item.createdTime }}</div>
<div class="odiv">{{ handleDateTime(item.createdTime) }}</div>
<div class="odiv_p">{{ item.cost }}</div>
<div class="odiv">{{ item.profitLossRatio }}</div>
</div>
......@@ -239,6 +239,17 @@ export default {
this.getselected();
},
methods: {
handleDateTime(timestamp) {
// const timestamp = Date.now();
const date = new Date(timestamp);
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
const hours = date.getHours().toString().padStart(2, '0');
const minutes = date.getMinutes().toString().padStart(2, '0');
const seconds = date.getSeconds().toString().padStart(2, '0');
return `${year}-${month}-${day}${hours}:${minutes}:${seconds}`;
},
getselected() {
let params = {
productId: this.detInfo.id,
......
......@@ -354,6 +354,7 @@ export default {
this.server.newcrmqueryproduct(params).then((res) => {
if (res.data.code == 200) {
alert("兑换成功");
window.location.reload()
} else if (res.data.code == 500) {
alert("网络错误,请稍后重试");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment