1
admin
2026-01-31 732c30b33f782c2d2ebb62eacda2fb7a453a7ecd
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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<template>
  <div class="block_trading_order">
    <page-head :title="`${$t('大宗交易订单')}`"> </page-head>
 
    <div class="order_tabs">
      <van-tabs v-model="active" swipe-threshold="1">
        <van-tab :title="$t('hj160')" name=""></van-tab>
        <van-tab :title="$t('申购中')" name="0"></van-tab>
        <van-tab :title="$t('成功')" name="1"></van-tab>
        <van-tab :title="$t('失败')" name="2"></van-tab>
      </van-tabs>
    </div>
 
    <div class="trading_card" v-for="i in list" :key="i.id">
      <div
        class="card_label2 flex-between"
        style="height:1.8em"
        @click="toDetails(i)"
      >
        <div>
          <p class="flex-start gp">
            <span>{{ $t("hj52") }}</span>
          </p>
          <p class="flex-start">
            <span class="label_icon">{{ i.stockGid }}</span>
            <span class="label_name line-one">{{ i.stockName }}</span>
          </p>
        </div>
 
        <div class="flex-end">
          <span class="app">{{ i.stockSpell }}</span>
          <van-icon name="arrow" color="#969799" size=".5em" />
        </div>
      </div>
 
      <p class="card_label2 flex-between">
        <span>{{ $t("sl") }}</span>
        <span>{{ i.orderNum }}</span>
      </p>
 
      <p class="card_label2 flex-between">
        <span>{{ $t("hj81") }}</span>
        <span>{{ i.stockGid | currencySymbol }} {{ i.buyOrderPrice }}</span>
      </p>
 
      <p class="card_label2 flex-between">
        <span>{{ $t("总金额") }}</span>
        <span class="zje">
          {{ i.stockGid | currencySymbol }} {{ i.orderTotalPrice }}
        </span>
      </p>
 
      <p class="card_label2 flex-between">
        <span>{{ $t("状态") }}</span>
        <span :class="`${i.checkType == 2 ? 'zt2' : 'zt'}`">
          {{ status[i.checkType] }}
        </span>
      </p>
 
      <p class="card_label2 flex-between">
        <span>{{ $t("提交时间") }}</span>
        <span>{{ i.buyOrderTime | gettime }}</span>
      </p>
    </div>
 
    <!-- 无数据时显示 -->
    <div class="no_data flex-center" v-show="!list || list.length == 0">
      <img src="@/assets/img/zhaobudao2.png" alt="" />
    </div>
 
    <n-pagination
      :pageNo.sync="pageNum"
      :pageSize="pageSize"
      :total="total"
    ></n-pagination>
  </div>
</template>
 
<script>
import PageHead from "@/components/pageHead.vue";
import nPagination from "@/components/nPagination.vue";
import * as api from "@/axios/api";
import { Toast } from "vant";
 
export default {
  components: {
    PageHead,
    nPagination
  },
  data() {
    return {
      pageNum: 1,
      pageSize: 10,
      total: 1,
      active: "",
      list: [],
      status: {
        0: this.$t("申购中"),
        1: this.$t("成功"),
        2: this.$t("失败")
      }
    };
  },
  watch: {
    pageNum() {
      this.list = [];
      this.getDzOrderList();
    },
    active() {
      this.pageNum = 1;
      this.getDzOrderList();
    }
  },
  methods: {
    // 获取数据
    async getDzOrderList() {
      let opt = {
        pageNum: this.pageNum,
        pageSize: this.pageSize,
        status: this.active
      };
      let data = await api.getDzOrderList(opt);
      if (data.status == 0) {
        this.list = data.data.list;
        this.total = data.data.total;
      } else {
        Toast(data.msg);
      }
    },
    // 点击进入详情
    toDetails(item) {
      const obj = {
        pid: item.id || "",
        type: item.stockGid || ""
      };
      window.localStorage.setItem("kLine", JSON.stringify(obj));
 
      this.$router.push({
        path: "/kline",
        query: {
          code: item.id,
          type: item.stockGid
        }
      });
    }
  },
  created() {
    this.getDzOrderList();
  }
};
</script>
 
<style lang="less" scoped>
@green: #c4d600;
@grey-two: #969799;
@red: #ee0a24;
.block_trading_order {
  font-size: 10vw;
  width: 100%;
  background-color: #f5f5f5;
  min-height: 100vh;
  padding-bottom: 0.3em;
  padding-top: 1.4em;
  position: relative;
  /deep/ .van-tabs--line .van-tabs__wrap {
    height: 1.2em;
  }
  /deep/ .van-tab__text--ellipsis {
    overflow: visible;
  }
  /deep/ .van-tab {
    font-size: 0.4em;
  }
  /deep/ .van-tabs__line {
    background-color: @green;
    height: 0.1em;
    width: 1em;
  }
 
  .order_tabs {
    width: 100%;
    position: fixed;
    top: 1.22em;
    left: 0;
    z-index: 999;
  }
 
  .trading_card {
    width: 9.5em;
    margin: 0.25em auto 0;
    border-radius: 0.25em;
    background: #fff;
    .card_buy {
      height: 1.33em;
      color: @green;
      box-shadow: 0 -0.05333rem 0.26667rem #0000000d;
 
      span {
        font-size: 0.45em;
        font-weight: 600;
        margin-left: 0.2em;
      }
    }
    .card_label2,
    .card_label1 {
      margin: 0 auto;
      width: 9em;
      border-bottom: #f5f5f5 solid 0.01em;
    }
    .card_label2 {
      height: 1.1em;
      color: #323233;
      span {
        font-size: 0.4em;
        font-weight: 500;
      }
      & > span:last-child {
        color: @grey-two;
        font-size: 0.36em;
      }
      .gp {
        margin-bottom: 0.2em;
      }
      .app {
        color: @green;
        font-size: 0.6em;
      }
      .label_name {
        color: @grey-two;
        width: 14em;
      }
      span.zje {
        color: @red;
        font-size: 0.48em;
      }
      span.zt {
        color: @green;
      }
      span.zt2 {
        color: @red;
      }
    }
 
    .card_label1 {
      color: @green;
      height: 1.33em;
 
      span {
        font-size: 0.4em;
      }
    }
 
    .label_icon {
      background: @green;
      color: #fff;
      padding: 0.2em 0.35em;
      border-radius: 0.15em;
      margin-right: 0.3em;
      font-size: 0.3em !important;
    }
  }
 
  .head_right {
    color: @green;
    font-size: 0.4em;
  }
}
</style>