zj
2024-06-03 65c203bea3b5cd4052f25ca2150b1152679f69e6
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
<!--  -->
<template>
    <div>
        <div class="top_icon">
            <div class="left_back" @click="handleBack()">
                <img src="@/assets/img/zuojiantou.png" alt />
            </div>
            <div class="right_icon">
                {{ $t('订单详情') }}
            </div>
        </div>
        <div class="bottomIfr">
          <div class="pagebox" v-if="pages.buyOrderTime">
            <div class="pagebox_left">{{$t('hj273')}}</div>
            <div class="pagebox_right">{{pages.buyOrderTime | gettime  }}</div>
          </div>
          <div class="pagebox" v-if="pages.sellOrderTime">
            <div class="pagebox_left">{{$t('hj128')}}</div>
            <div class="pagebox_right">{{pages.sellOrderTime | gettime  }}</div>
          </div>
          <div class="pagebox" v-if="pages.orderNum">
            <div class="pagebox_left">{{$t('hj269')}}</div>
            <div class="pagebox_right">{{pages.orderNum}}</div>
          </div>
          <div class="pagebox" v-if="pages.buyOrderPrice">
            <div class="pagebox_left">{{$t('hj270')}}</div>
            <div class="pagebox_right">{{pages.buyOrderPrice}}</div>
          </div>
          <div class="pagebox" v-if="pages.orderTotalPrice">
            <div class="pagebox_left">{{$t('购入总价')}}</div>
            <div class="pagebox_right">{{pages.orderTotalPrice}}</div>
          </div>
          <div class="pagebox" v-if="pages.sellOrderPrice">
            <div class="pagebox_left">{{$t('hj84')}}{{$t('hj81')}}</div>
            <div class="pagebox_right">{{pages.sellOrderPrice}}</div>
          </div>
          <div class="pagebox">
            <div class="pagebox_left">{{$t('hj84')}}{{$t('sl')}}</div>
            <div class="pagebox_right">123</div>
          </div>
          <div class="pagebox" v-if="pages.sellOrderPrice">
            <div class="pagebox_left">{{$t('卖出总价')}}</div>
            <div class="pagebox_right">{{pages.sellOrderPrice}}</div>
          </div>
          <div class="pagebox" v-if="pages.profitAndLose">
            <div class="pagebox_left">{{$t('亏损金额')}}</div>
            <div class="pagebox_right">{{pages.profitAndLose}}</div>
          </div>
 
        </div>
    </div>
</template>
 
<script>
import * as api from '@/axios/api'
export default {
  data () {
    return {
      onlineShow: false,
      onlineService: '',
      pages:{}
    }
  },
  // 生命周期 - 创建完成(访问当前this实例)
  created () {
    this.getInfoSite()
  },
  // 生命周期 - 挂载完成(访问DOM元素)
  mounted () {
 
  },
  methods: {
    handleBack () {
      // 点击返回/
      this.$router.go(-1)
    },
    async  getInfoSite() {
      var res = {
        positionSn:this.$route.query.codes
      }
      let data = await api.positionInfo(res)
      if (data.status === 0) {
        this.pages = data.data
      } else {
      }
    }
  },
  filters: {
    gettime(time) {
      if (!time) {
        return "";
      }
      var nd = new Date(time);
      var y = nd.getFullYear();
      var mm = nd.getMonth() + 1;
      var d = nd.getDate();
      var h = nd.getHours();
      var m = nd.getMinutes();
      var c = nd.getSeconds();
      if (mm < 10) {
        mm = "0" + mm;
      }
      if (d < 10) {
        d = "0" + d;
      }
      if (h < 10) {
        h = "0" + h;
      }
      if (m < 10) {
        m = "0" + m;
      }
      if (c < 10) {
        c = "0" + c;
      }
      // 17:35:2922-06-2022
      // return y + '/' + mm + '/' + d + ' ' + h + ':' + m + ':' + c  //年月日时分秒
      return d + "/" + mm + "/" + y + " " + h + ":" + m + ":" + c; //日月年时分秒
    },
  },
}
</script>
<style scoped lang='less'>
/* @import url(); 引入css类 */
.top_icon {
    position: absolute;
    width: 100%;
    height: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999999;
    background-color: #fff;
    box-shadow: 0 0 1px #999;
 
    .left_back {
        width: 10%;
        height: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index:9999;
 
        img {
            width: 0.6rem;
            height: 0.6rem;
        }
    }
 
    .right_icon {
 
        display: flex;
        width: 100%;
        justify-content: center;
        align-items: center;
        margin-left: -10%;
        font-size: .4rem;
        font-weight: 800;
 
    }
}
 
.bottomIfr {
  position: absolute;
  top: 1.5rem;
  left: 0;
  right: 0;
  bottom: 0;
 
}
.pagebox{
  margin: 0 15px;
  height: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #9a9a9a;
}
.conentIfr {
    width: 100%;
    height: 90%;
    border: none;
    //取消滚动条
    overflow: hidden;
  }
</style>