|
|
@@ -0,0 +1,104 @@
|
|
|
+<template>
|
|
|
+ <app-view class="wrtradedetail">
|
|
|
+ <app-pull-refresh class="wrtradedetail__container" v-model:pageIndex="pageIndex" :page-count="pageCount"
|
|
|
+ :updateList="dataList" @refresh="onRefresh" @updated="onRefreshUpdated">
|
|
|
+ <template #header>
|
|
|
+ <ul class="list list-row" v-if="showHeader">
|
|
|
+ <li class="list-column">
|
|
|
+ <span>商品</span>
|
|
|
+ </li>
|
|
|
+ <li class="list-column">
|
|
|
+ <span>方向</span>
|
|
|
+ </li>
|
|
|
+ <li class="list-column">
|
|
|
+ <span>成交价格</span>
|
|
|
+ </li>
|
|
|
+ <li class="list-column">
|
|
|
+ <span>成交数量</span>
|
|
|
+ </li>
|
|
|
+ <li class="list-column">
|
|
|
+ <span>成交金额</span>
|
|
|
+ </li>
|
|
|
+ <li class="list-column">
|
|
|
+ <span>成交时间</span>
|
|
|
+ </li>
|
|
|
+ <Button round @click="routerTo('bank-hisstatement')">更多</Button>
|
|
|
+ </ul>
|
|
|
+ </template>
|
|
|
+ <template #default="{ item }">
|
|
|
+ <ul class="list list-row">
|
|
|
+ <li class="list-column"><span>{{ item.wrstandardname }}</span></li>
|
|
|
+ <li class="list-column"><span>{{ item.buyorsell === 0 ? '买入' : '卖出' }}</span></li>
|
|
|
+ <li class="list-column"><span>{{ item.tradeprice }}</span></li>
|
|
|
+ <li class="list-column"><span>{{ item.tradeqty }}</span></li>
|
|
|
+ <li class="list-column">
|
|
|
+ <span>{{ formatDate(item.tradetime, 'YYYY-MM-DD') }}</span>
|
|
|
+ <span>{{ formatDate(item.tradetime, 'HH:mm:ss') }}</span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </template>
|
|
|
+ </app-pull-refresh>
|
|
|
+ </app-view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script lang="ts" setup>
|
|
|
+import { shallowRef } from 'vue'
|
|
|
+import { useQueryWrTradeDetail } from '@/business/order'
|
|
|
+import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
|
|
|
+import { useNavigation } from '@/hooks/navigation'
|
|
|
+import { Button } from 'vant'
|
|
|
+import { formatDate } from '@/filters'
|
|
|
+
|
|
|
+const { dataList, pageIndex, pageCount, getWrTradeDetail } = useQueryWrTradeDetail()
|
|
|
+const showHeader = shallowRef(false)
|
|
|
+const { routerTo } = useNavigation()
|
|
|
+
|
|
|
+const onRefresh = (callback: () => void) => {
|
|
|
+ getWrTradeDetail(1).finally(() => callback())
|
|
|
+}
|
|
|
+
|
|
|
+const onRefreshUpdated = (data: Model.UserScoreLogRsp[]) => {
|
|
|
+ showHeader.value = data.length > 0
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less">
|
|
|
+.wrtradedetail {
|
|
|
+ &__container {
|
|
|
+ height: 100%;
|
|
|
+ overflow-y: auto;
|
|
|
+
|
|
|
+ .list {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ background-color: #fff;
|
|
|
+
|
|
|
+ &-row {
|
|
|
+ font-size: .32rem;
|
|
|
+ border-bottom: 1px solid #eee;
|
|
|
+ padding: .12rem .32rem;
|
|
|
+ }
|
|
|
+
|
|
|
+ &-column {
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ text-align: center;
|
|
|
+
|
|
|
+ &:first-child {
|
|
|
+ text-align: left;
|
|
|
+ }
|
|
|
+
|
|
|
+ &:last-child {
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+
|
|
|
+ span:last-child {
|
|
|
+ color: #999;
|
|
|
+ font-size: .24rem;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|