|
|
@@ -2,45 +2,52 @@
|
|
|
<template>
|
|
|
<app-pull-refresh ref="pullRefreshRef" v-model:loading="loading" v-model:error="error" v-model:pageIndex="pageIndex"
|
|
|
:page-count="pageCount" @refresh="run">
|
|
|
- <div class="g-order-list">
|
|
|
- <div class="g-order-list__box" v-for="(item, index) in dataList" :key="index">
|
|
|
- <div class="g-order-list__titlebar">
|
|
|
+ <div class="g-product-list">
|
|
|
+ <div class="g-product-list__box" v-for="(item, index) in dataList" :key="index">
|
|
|
+ <div class="g-product-list__titlebar">
|
|
|
<div class="left">
|
|
|
- <h4>{{ item.goodsnamedisplay }}</h4>
|
|
|
+ <b>订单号:{{ item.tradeid }}</b>
|
|
|
</div>
|
|
|
<div class="right">
|
|
|
- <span>{{ item.orderstatusdisplay }}</span>
|
|
|
+ <b :class="!item.buyorsell ? 'g-price-up' : 'g-price-down'">
|
|
|
+ {{ getBuyOrSellName(item.buyorsell) }}
|
|
|
+ </b>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="g-order-list__content">
|
|
|
- <ul>
|
|
|
- <li>
|
|
|
- <span>{{ $t('delivery.offline.buyorselldisplay') }}</span>
|
|
|
- <span>{{ item.buyorselldisplay }}</span>
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <span>{{ $t('delivery.offline.deliveryqty') }}</span>
|
|
|
- <span>{{ item.deliveryqty }}</span>
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <span>{{ $t('delivery.offline.deliveryprice') }}</span>
|
|
|
- <span>{{ item.orderstatus === 1 ? '--' : item.deliveryprice }}</span>
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <span>{{ $t('delivery.offline.deliveryamount') }}</span>
|
|
|
- <span>{{ item.orderstatus === 1 ? '--' : item.deliveryamount }}</span>
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <span>{{ $t('delivery.offline.deliveryinfo') }}</span>
|
|
|
- <span>{{ item.deliveryinfo }}</span>
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <span>{{ $t('delivery.offline.applydate') }}</span>
|
|
|
- <span>{{ formatDate(item.reqtime, 'YYYY-MM-DD') }}</span>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
+ <div class="g-product-list__content">
|
|
|
+ <div class="left">
|
|
|
+ <Image width="100" height="100" radius="4" :src="getImageUrl(item.thumurls)" />
|
|
|
+ </div>
|
|
|
+ <div class="right">
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+ <span>{{ $t('delivery.offline.buyorselldisplay') }}:</span>
|
|
|
+ <span>{{ item.buyorselldisplay }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>{{ $t('delivery.offline.deliveryqty') }}:</span>
|
|
|
+ <span>{{ item.deliveryqty }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>{{ $t('delivery.offline.deliveryprice') }}:</span>
|
|
|
+ <span>{{ item.orderstatus === 1 ? '--' : item.deliveryprice }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>{{ $t('delivery.offline.deliveryamount') }}:</span>
|
|
|
+ <span>{{ item.orderstatus === 1 ? '--' : item.deliveryamount }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>{{ $t('delivery.offline.deliveryinfo') }}:</span>
|
|
|
+ <span>{{ item.deliveryinfo }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>{{ $t('delivery.offline.applydate') }}:</span>
|
|
|
+ <span>{{ formatDate(item.reqtime, 'YYYY-MM-DD') }}</span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="g-order-list__btnbar">
|
|
|
+ <div class="g-product-list__btnbar">
|
|
|
<Button size="small" @click="onCancel(item)" v-if="item.orderstatus === 1" round>{{ $t('operation.cancel2') }}</Button>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -50,10 +57,12 @@
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
import { shallowRef } from 'vue'
|
|
|
-import { Button } from 'vant'
|
|
|
+import { Button, Image } from 'vant'
|
|
|
+import { getBuyOrSellName } from '@/constants/order'
|
|
|
import { fullloading, dialog } from '@/utils/vant'
|
|
|
import { formatDate, handleRequestBigNumber } from '@/filters'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
|
+import { getFileUrl } from '@/filters'
|
|
|
import { queryMineTradeGoodsDeliveryOfflines } from '@/services/api/transfer'
|
|
|
import { offlineDeliveryApplyCancelOrder } from '@/services/api/trade'
|
|
|
import { i18n } from '@/stores'
|
|
|
@@ -104,4 +113,9 @@ const onCancel = (row: Model.MineTradeGoodsDeliveryOfflinesRsp) => {
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+const getImageUrl = (url: string) => {
|
|
|
+ const [firstImg] = url.split(',')
|
|
|
+ return firstImg ? getFileUrl(firstImg) : ''
|
|
|
+}
|
|
|
</script>
|