From d37ceed2ad5b94bbfc71a8a4cbdb7b498ddf724d Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Sat, 19 Jul 2025 14:14:18 +0800
Subject: [PATCH] 1
---
src/page/user/Warehouse/item.card.vue | 145 +++++++++++++++++++++++++++++-------------------
1 files changed, 88 insertions(+), 57 deletions(-)
diff --git a/src/page/user/Warehouse/item.card.vue b/src/page/user/Warehouse/item.card.vue
index 00f9fec..5b3ee92 100644
--- a/src/page/user/Warehouse/item.card.vue
+++ b/src/page/user/Warehouse/item.card.vue
@@ -1,73 +1,87 @@
<template>
<div class="item-card-box">
+ <div style="padding: 12px 24px; color: #fff;background-color: #185546;width: max-content;margin-bottom: 20px;">{{$t('日股')}}</div>
<div class="total-assets">
<div class="left">
- <div class="total-name">
- {{ activeObj.assname }} ({{ activeObj.symbolCode }})
- </div>
- <div class="total-data">{{ activeObj.totalMoney || "0.0000" }}</div>
- <div class="total-data-huansuan" v-if="activeObj.symbolCode !== 'USD'">
- ≈ {{ activeObj.symbol }} {{ activeObj.totalMoneyUSD || "0.0000" }}
+ <!-- <div class="total-name">
+ {{ activeObj.assname }} ()
+ </div> -->
+ <div class="total-data">
+ {{ activeObj.totalMoney }} {{ activeObj.symbolCode }}
</div>
</div>
- <div class="right" @click="closeAll">{{ $t("全部平仓") }}</div>
</div>
- <!-- totleAssets 总资产 -->
- <!-- availableBalance 可用 -->
- <!-- cumulativeProfitAndLoss 累计盈亏 -->
- <!-- profitAndLoss 浮动盈亏 -->
- <!-- handlingCharge 总手续费 -->
- <!-- freezeMoney 冻结 -->
+
<div class="item-card-itembox">
<div class="item">
- <div class="itembox-data">{{ activeObj.profitAndLoss }}</div>
- <div v-if="activeObj.symbolCode !== 'USD'" class="number-text">
- ≈ {{ activeObj.symbol }} {{ activeObj.profitAndLossUSD || "0.0000" }}
+ <div class="itembox-data">
+ {{ $t("累計盈虧") }}
</div>
<div class="itembox-name">
- {{ $t("浮動盈虧") }} ({{ activeObj.symbolCode }})
+ {{ activeObj.isZf === 1 ? "-" : "" }}
+ {{ activeObj.cumulativeProfitAndLoss }}
</div>
+
</div>
<div class="item">
- <div class="itembox-data">{{ activeObj.availableBalance }}</div>
- <div v-if="activeObj.symbolCode !== 'USD'" class="number-text">
- ≈ {{ activeObj.symbol }}
- {{ activeObj.availableBalanceUSD || "0.0000" }}
+ <div class="itembox-data">
+ {{ $t("浮動盈虧") }}
</div>
+
+ <div class="itembox-name">
+ ¥{{ activeObj.profitAndLoss }}
+ </div>
+ </div>
+
+ <!-- <div class="item">
+ <div class="itembox-data">
+ ¥{{ activeObj.availableBalance }}
+ </div>
+
<div class="itembox-name">
{{ $t("可用資產") }} ({{ activeObj.symbolCode }})
</div>
</div>
+
<div class="item">
- <div class="itembox-data">{{ activeObj.cumulativeProfitAndLoss }}</div>
- <div v-if="activeObj.symbolCode !== 'USD'" class="number-text">
- ≈ {{ activeObj.symbol }}
- {{ activeObj.cumulativeProfitAndLossUSD || "0.0000" }}
+ <div class="itembox-data">
+ ¥{{ activeObj.freezeMoney }}
</div>
- <div class="itembox-name">
- {{ $t("累計盈虧") }} ({{ activeObj.symbolCode }})
- </div>
- </div>
- <div class="item">
- <div class="itembox-data">{{ activeObj.freezeMoney }}</div>
- <div v-if="activeObj.symbolCode !== 'USD'" class="number-text">
- ≈ {{ activeObj.symbol }} {{ activeObj.freezeMoneyUSD || "0.0000" }}
- </div>
+
<div class="itembox-name">
{{ $t("凍結資產") }} ({{ activeObj.symbolCode }})
</div>
</div>
<div class="item">
- <div class="itembox-data">{{ activeObj.handlingCharge }}</div>
- <div v-if="activeObj.symbolCode !== 'USD'" class="number-text">
- ≈ {{ activeObj.symbol }} {{ activeObj.handlingChargeUSD || "0.0000" }}
+ <div class="itembox-data">
+ ¥{{ activeObj.handlingCharge }}
</div>
+
<div class="itembox-name">
{{ $t("總手續費") }} ({{ activeObj.symbolCode }})
</div>
</div>
+ <div class="item">
+ <div class="itembox-data">
+ ¥{{ activeObj.amountToBeCovered }}
+ </div>
+
+ <div class="itembox-name">
+ {{ $t("待补金额") }} ({{ activeObj.symbolCode }})
+ </div>
+ </div> -->
</div>
- <Dialog ref="closeAllDialog" title="一鍵平倉" :confirm="confirm">
+ <div class="zj">
+ <div class="zj_box">
+ <div style="display: flex;align-items: center;color: #858093;"><img style="width: 20px;margin-right: 5px;" src="@/assets/img/xiaohao.svg"/>占用资金</div>
+ <div style="color: #185546;font-weight: bold;">{{ activeObj.freezeMoney }}</div>
+ </div>
+ <div class="zj_box">
+ <div style="display: flex;align-items: center;color: #858093;"><img style="width: 20px;margin-right: 5px;" src="@/assets/img/xiaohao.svg"/>{{ $t("凍結資產") }}</div>
+ <div style="color: #185546;font-weight: bold;">0.00</div>
+ </div>
+ </div>
+ <Dialog ref="closeAllDialog" :title="$t('一鍵平倉')" :confirm="confirm">
<template v-slot:center>
<div>{{ $t("您確定一鍵平倉所有訂單嗎?") }}</div>
</template>
@@ -91,20 +105,17 @@
default: () => {},
},
},
-
methods: {
async confirm() {
console.log(this.activeObj.laber);
const res = await allsell({ stockType: this.activeObj.laber });
if (res.status === 0) {
- console.log(3333);
this.itemClick();
this.$refs.closeAllDialog.show = false;
}
},
closeAll() {
- // allsell()
this.$refs.closeAllDialog.show = true;
},
},
@@ -112,20 +123,35 @@
</script>
<style lang="less" scoped>
+ .zj_box{
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ width: 48%;
+ background-color: #E8F4F0;
+ padding: 20px;
+ }
+ .zj{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-top: 30px;
+ }
.item-card-box {
width: 100%;
min-height: 3.52rem;
margin: 0 auto;
- box-shadow: 0 0.16rem 0.32rem #00b57429;
+ // box-shadow: 0 0.16rem 0.32rem #00b57429;
border-radius: 0.26667rem;
margin-top: 0.42667rem;
- padding: 0.32rem 0.4rem;
+ // padding: 0.32rem 0.4rem;
box-sizing: border-box;
- background-color: #ff5b96;
+ // background-color: #03a7ef;
color: #fff;
.total-assets {
display: flex;
justify-content: space-between;
+ color: #1B1B1B;
.left {
.total-name {
font-style: normal;
@@ -171,28 +197,33 @@
.item-card-itembox {
display: flex;
- flex-wrap: wrap; /* 自动换行 */
+ // flex-wrap: wrap; /* 自动换行 */
+ justify-content: space-between;
.item {
- width: 33%;
+ display: flex;
+ align-items: center;
+ margin-top: 0.45333rem;
+ // width: 50%;
// height: 20px;
- min-width: 33%;
- max-width: 33%;
+ // min-width: 50%;
+ // max-width: 50%;
+ color: #1B1B1B;
// background-color: #fff;
.itembox-data {
font-style: normal;
font-weight: 500;
font-size: 0.37333rem;
- color: #fff;
- margin-top: 0.45333rem;
- word-break: break-all;
+ color: #1B1B1B;
+ // margin-top: 0.45333rem;
+ // word-break: break-all;
}
.itembox-name {
- font-style: normal;
- font-weight: 400;
- font-size: 0.32rem;
- color: #fff;
+ font-weight: bold;
+ font-size: 18px;
+ color: #1FB26B;
opacity: 0.8;
- margin-top: 0.13333rem;
+ margin-left: 20px;
+ // margin-top: 0.13333rem;
}
.number-text {
color: #fff;
@@ -205,4 +236,4 @@
}
}
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3