11
jhzh
2025-07-10 410baea0e0e5a74350adc5291cf23cb79ad30daa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<template>
  <div class="item-card-box">
    <div class="total-assets">
      <div class="left">
        <div class="total-name">
          {{ activeObj.assname }} ({{ activeObj.symbolCode }})
        </div>
        <div class="total-data">
          ¥{{ activeObj.totalMoney   }}
          <!-- {{ 10000000000000   }} -->
        </div>
      </div>
    </div>
 
    <div class="item-card-itembox">
      <div class="item">
        <div class="itembox-data">
          ¥{{ activeObj.profitAndLoss   }}
        </div>
 
        <div class="itembox-name">
          {{ $t("浮動盈虧") }} ({{ activeObj.symbolCode }})
        </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.isZf === 1 ? "-" : "" }}
          ¥{{ activeObj.cumulativeProfitAndLoss   }}
        </div>
 
        <div class="itembox-name">
          {{ $t("累計盈虧") }} ({{ activeObj.symbolCode }})
        </div>
      </div>
      <div class="item">
        <div class="itembox-data">
          ¥{{ activeObj.freezeMoney   }}
        </div>
 
        <div class="itembox-name">
          {{ $t("凍結資產") }} ({{ activeObj.symbolCode }})
        </div>
      </div>
      <div class="item">
        <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="$t('一鍵平倉')" :confirm="confirm">
      <template v-slot:center>
        <div>{{ $t("您確定一鍵平倉所有訂單嗎?") }}</div>
      </template>
    </Dialog>
  </div>
</template>
 
<script>
import Dialog from "@/components/Dialog";
import { allsell } from "../../../axios/api";
 
export default {
  components: { Dialog },
  props: {
    activeObj: {
      type: Object,
      default: {},
    },
    itemClick: {
      type: Function,
      default: () => {},
    },
  },
  methods: {
    async confirm() {
      console.log(this.activeObj.laber);
      const res = await allsell({ stockType: this.activeObj.laber });
      if (res.status === 0) {
        this.itemClick();
        this.$refs.closeAllDialog.show = false;
      }
    },
 
    closeAll() {
      this.$refs.closeAllDialog.show = true;
    },
  },
};
</script>
 
<style lang="less" scoped>
.item-card-box {
  width: 100%;
  min-height: 3.52rem;
  margin: 0 auto;
  box-shadow: 0 0.16rem 0.32rem #00b57429;
  border-radius: 0.26667rem;
  margin-top: 0.42667rem;
  padding: 0.32rem 0.4rem;
  box-sizing: border-box;
  background-color: #03a7ef;
  color: #fff;
  .total-assets {
    display: flex;
    justify-content: space-between;
    .left {
      .total-name {
        font-style: normal;
        font-weight: 400;
        font-size: 0.37333rem;
        opacity: 0.8;
      }
      .total-data {
        font-style: normal;
        font-weight: 500;
        font-size: 0.64rem;
        margin-top: 0.05333rem;
      }
      .total-data-huansuan {
        font-family: PingFang SC;
        font-size: 0.32rem;
        font-style: normal;
        font-weight: 400;
        line-height: normal;
        word-break: break-all;
      }
    }
    .right {
      border-radius: 0.53333rem;
      background: linear-gradient(130deg, #fff 0%, #f4f4f4 100%);
      box-shadow: 0 0.16rem 0.24rem #0035641a;
      color: #cd3a30;
      text-align: center;
      font-family: PingFang SC;
      font-size: 0.37333rem;
      font-style: normal;
      font-weight: 500;
      min-width: 2.50667rem;
      height: 0.90667rem;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      line-height: 0.4rem;
    }
  }
}
 
.item-card-itembox {
  display: flex;
  flex-wrap: wrap; /* 自动换行 */
  .item {
    width: 50%;
    // height: 20px;
    min-width: 50%;
    max-width: 50%;
    // 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;
    }
    .itembox-name {
      font-style: normal;
      font-weight: 400;
      font-size: 0.32rem;
      color: #fff;
      opacity: 0.8;
      margin-top: 0.13333rem;
    }
    .number-text {
      color: #fff;
      font-family: PingFang SC;
      font-size: 0.32rem;
      font-style: normal;
      font-weight: 400;
      line-height: normal;
      word-break: break-all;
    }
  }
}
</style>