|
|
@@ -1,85 +1,72 @@
|
|
|
<template>
|
|
|
- <app-view class="spot-details g-form">
|
|
|
+ <app-view class="g-detail">
|
|
|
<template #header>
|
|
|
<app-navbar title="挂牌详情" />
|
|
|
</template>
|
|
|
- <div v-if="quoteItem" class="spot-details__content">
|
|
|
- <Swipe class="banner" :autoplay="5000" indicator-color="white" lazy-render>
|
|
|
- <SwipeItem v-for="(url, index) in topBanners" :key="index">
|
|
|
- <img :src="url" />
|
|
|
- </SwipeItem>
|
|
|
- </Swipe>
|
|
|
- <div class="goods">
|
|
|
- <table cellspacing="0" cellpadding="0">
|
|
|
- <tr>
|
|
|
- <th colspan="3">
|
|
|
- <h1>{{ quoteItem.wrstandardname }}</h1>
|
|
|
- </th>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td>
|
|
|
- <span>卖价:</span>
|
|
|
- <span>{{ quoteItem.sellprice }}</span>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <span>卖量:</span>
|
|
|
- <span>{{ quoteItem.sellqty }}</span>
|
|
|
- </td>
|
|
|
- <td rowspan="3" style="vertical-align:top">
|
|
|
- <div class="goods-price">
|
|
|
- <h4>参考价(元/{{ quoteItem.enumdicname }})</h4>
|
|
|
- <h2>{{ quoteItem.spotgoodsprice }}</h2>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td>
|
|
|
- <span>买价:</span>
|
|
|
- <span>{{ quoteItem.buyprice }}</span>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <span>买量:</span>
|
|
|
- <span>{{ quoteItem.buyqty }}</span>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td colspan="2">
|
|
|
- <span>仓库:</span>
|
|
|
- <span>{{ quoteItem.warehousename }}</span>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
+ <Banner :data-list="topBanners" height="4rem" />
|
|
|
+ <div class="g-detail__buy" v-if="quoteItem">
|
|
|
+ <div class="title">
|
|
|
+ <span>{{ quoteItem.wrstandardname }}</span>
|
|
|
</div>
|
|
|
- <div class="trade">
|
|
|
- <div class="trade-section sell" v-if="sellList.length">
|
|
|
- <Cell title="卖价" />
|
|
|
- <app-list :columns="columns" :data-list="sellList">
|
|
|
- <template #operate="{ row }">
|
|
|
- <Button size="small" round @click="delistingListing(row, BuyOrSell.Buy)">买入</Button>
|
|
|
- </template>
|
|
|
- </app-list>
|
|
|
- </div>
|
|
|
- <div class="trade-section buy" v-if="buyList.length">
|
|
|
- <Cell title="买价" />
|
|
|
- <app-list :columns="columns" :data-list="buyList">
|
|
|
- <template #operate="{ row }">
|
|
|
- <Button size="small" round @click="delistingListing(row, BuyOrSell.Sell)">卖出</Button>
|
|
|
- </template>
|
|
|
- </app-list>
|
|
|
- </div>
|
|
|
+ <div class="info">
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+ <span>卖价</span>
|
|
|
+ <span>¥{{ quoteItem.sellprice }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>卖量</span>
|
|
|
+ <span>{{ quoteItem.sellqty }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>买价</span>
|
|
|
+ <span>¥{{ quoteItem.buyprice }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>买量</span>
|
|
|
+ <span>{{ quoteItem.buyqty }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>仓库</span>
|
|
|
+ <span>{{ quoteItem.warehousename }}</span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="trade">
|
|
|
+ <div class="trade-section sell" v-if="sellList.length">
|
|
|
+ <Cell title="卖价" />
|
|
|
+ <app-list :columns="columns" :data-list="sellList">
|
|
|
+ <template #operate="{ row }">
|
|
|
+ <Button size="small" round @click="delistingListing(row, BuyOrSell.Buy)">买入</Button>
|
|
|
+ </template>
|
|
|
+ </app-list>
|
|
|
</div>
|
|
|
- <div class="gallery">
|
|
|
- <Divider>商品详情</Divider>
|
|
|
- <template v-for="(url, index) in goodsImages" :key="index">
|
|
|
- <img :src="url" alt="" />
|
|
|
- </template>
|
|
|
+ <div class="trade-section buy" v-if="buyList.length">
|
|
|
+ <Cell title="买价" />
|
|
|
+ <app-list :columns="columns" :data-list="buyList">
|
|
|
+ <template #operate="{ row }">
|
|
|
+ <Button size="small" round @click="delistingListing(row, BuyOrSell.Sell)">卖出</Button>
|
|
|
+ </template>
|
|
|
+ </app-list>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <Empty v-else />
|
|
|
+ <div class="g-detail__desc">
|
|
|
+ <template v-for="(url, index) in goodsImages" :key="index">
|
|
|
+ <img :src="url" alt="" />
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
<template #footer>
|
|
|
- <div class="g-form__footer" v-if="quoteItem">
|
|
|
- <Button type="warning" block round @click="toggleListing(BuyOrSell.Sell)">我要卖</Button>
|
|
|
- <Button type="primary" block round @click="toggleListing(BuyOrSell.Buy)">我要买</Button>
|
|
|
+ <div class="g-detail__footer">
|
|
|
+ <div class="price" v-if="quoteItem">
|
|
|
+ <span class="price-text">参考价:</span>
|
|
|
+ <span class="price-unit">¥</span>
|
|
|
+ <span class="price-integer">{{ quoteItem.spotgoodsprice }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="submit">
|
|
|
+ <span class="submit-button warning" @click="toggleListing(BuyOrSell.Sell)">我要卖</span>
|
|
|
+ <span class="submit-button danger" @click="toggleListing(BuyOrSell.Buy)">我要买</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<component ref="componentRef" :is="componentMap.get(componentId)" v-bind="{ quoteItem, quoteDetail, buyorsell }"
|
|
|
@closed="closeComponent" v-if="componentId" />
|
|
|
@@ -89,7 +76,7 @@
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
import { shallowRef, computed, defineAsyncComponent, onUnmounted } from 'vue'
|
|
|
-import { Cell, Swipe, SwipeItem, Empty, Divider, Button } from 'vant'
|
|
|
+import { Cell, Button } from 'vant'
|
|
|
import { getFileUrl } from '@/filters'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
|
import { useComponent } from '@/hooks/component'
|
|
|
@@ -98,6 +85,7 @@ import { BuyOrSell } from '@/constants/order'
|
|
|
import { queryOrderQuote, queryOrderQuoteDetail } from '@/services/api/goods'
|
|
|
import eventBus from '@/services/bus'
|
|
|
import AppList from '@mobile/components/base/list/index.vue'
|
|
|
+import Banner from '@mobile/components/base/banner/index.vue'
|
|
|
|
|
|
const componentMap = new Map<string, unknown>([
|
|
|
['listing', defineAsyncComponent(() => import('./components/listing/index.vue'))], // 挂牌
|