|
|
@@ -11,12 +11,12 @@
|
|
|
<div class="g-detail__info" v-if="detail">
|
|
|
<div class="pricebar">
|
|
|
<div class="pricebar-left">
|
|
|
- <span class="tag">订货价</span>
|
|
|
+ <span class="tag">最新价</span>
|
|
|
<span class="unit">¥</span>
|
|
|
- <span class="price">{{ detail.presaleprice.toFixed(2) }}</span>
|
|
|
+ <span class="price">{{ getQuotePrice(detail.goodscode) }}</span>
|
|
|
</div>
|
|
|
<div class="pricebar-right">
|
|
|
- <span>最新价:{{ detail.goodsid }}</span>
|
|
|
+ <span>订货价:{{ detail.presaleprice.toFixed(2) }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="titlebar">
|
|
|
@@ -24,6 +24,8 @@
|
|
|
<span>{{ detail.goodsname }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <Cell title="转让列表" />
|
|
|
+ <app-list :columns="columns" :data-list="sellList" />
|
|
|
<div class="g-detail__desc">
|
|
|
<template v-for="(url, index) in detailImages" :key="index">
|
|
|
<img :src="url" alt="" />
|
|
|
@@ -31,7 +33,7 @@
|
|
|
</div>
|
|
|
<template #footer>
|
|
|
<div class="g-detail__footer">
|
|
|
- <Button type="primary" block round @click="openComponent('delisting')">我要转让</Button>
|
|
|
+ <Button type="primary" block round @click="openComponent('listing')">我要转让</Button>
|
|
|
</div>
|
|
|
<component ref="componentRef" :is="componentMap.get(componentId)" v-bind="{ detail }" @closed="closeComponent"
|
|
|
v-if="componentId" />
|
|
|
@@ -41,31 +43,48 @@
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
import { computed, defineAsyncComponent } from 'vue'
|
|
|
-import { Swipe, SwipeItem, Button, Tag } from 'vant'
|
|
|
-import { getFileUrl, parsePercent } from '@/filters'
|
|
|
+import { Swipe, SwipeItem, Button, Cell } from 'vant'
|
|
|
+import { getFileUrl } from '@/filters'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
|
+import { BuyOrSell } from '@/constants/order'
|
|
|
import { queryPresaleDefault } from '@/services/api/transfer'
|
|
|
+import { queryTjmdTradeOrderDetail } from '@/services/api/swap'
|
|
|
import { useComponent } from '@/hooks/component'
|
|
|
import { useNavigation } from '@/hooks/navigation'
|
|
|
import { useFuturesStore } from '@/stores'
|
|
|
+import AppList from '@mobile/components/base/list/index.vue'
|
|
|
|
|
|
const componentMap = new Map<string, unknown>([
|
|
|
+ ['listing', defineAsyncComponent(() => import('./components/listing/index.vue'))], // 挂牌
|
|
|
['delisting', defineAsyncComponent(() => import('./components/delisting/index.vue'))], // 摘牌
|
|
|
])
|
|
|
|
|
|
const { getQueryStringToNumber } = useNavigation()
|
|
|
const { componentRef, componentId, openComponent, closeComponent } = useComponent()
|
|
|
-const futuresStore = useFuturesStore()
|
|
|
+const { getQuotePrice } = useFuturesStore()
|
|
|
+const goodsid = getQueryStringToNumber('goodsid')
|
|
|
|
|
|
const { data: detail } = useRequest(queryPresaleDefault, {
|
|
|
params: {
|
|
|
- goodsid: getQueryStringToNumber('goodsid'),
|
|
|
- },
|
|
|
- onSuccess: (res) => {
|
|
|
- futuresStore.getQuotePrice(res.data.goodscode)
|
|
|
+ goodsid,
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+const { dataList: sellList } = useRequest(queryTjmdTradeOrderDetail, {
|
|
|
+ params: {
|
|
|
+ pagesize: 3,
|
|
|
+ goodsid,
|
|
|
+ buyorsell: BuyOrSell.Sell,
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+const columns: Model.TableColumn[] = [
|
|
|
+ { prop: 'username', label: '挂牌方' },
|
|
|
+ { prop: 'orderqty', label: '数量' },
|
|
|
+ { prop: 'orderprice', label: '价格' },
|
|
|
+ { prop: 'operate', label: '操作' },
|
|
|
+]
|
|
|
+
|
|
|
// 商品banner
|
|
|
const detailBanners = computed(() => {
|
|
|
const bannerpicurl = detail.value?.bannerpicurl ?? ''
|