feat(shopOrder): 支持订单商品图片OSS压缩及新增支付方式
- 新增utils/image.ts,提供图片URL补全及OSS压缩参数拼接功能 - 订单列表商品图片列改为使用压缩后图片URL,提高加载性能 - shopOrder相关支付类型注释更新,新增银联支付、POS机支付等多种方式 - 更新支付组件及订单信息界面,新增并显示银联支付、POS机支付、免费、积分支付、货到付款等支付标签 - 订单支付状态标签支持区分“已付款”和“待收货付款”状态 - shopOrder数据model中支付类型及代付类型描述同步更新 - 修复shop utils中payType标签获取的边界条件错误 - 注释掉dashboard待办事项中优惠券使用项,暂停显示该统计数据
This commit is contained in:
@@ -273,7 +273,7 @@ const couponUsedCount = ref(0);
|
||||
const todoItems = computed(() => [
|
||||
{ label: '待发货订单', value: pendingShipmentCount.value, to: '/shop/shopOrder', tagColor: 'blue', dotColor: 'dot-blue', urgent: pendingShipmentCount.value > 0 },
|
||||
{ label: '退款申请', value: pendingRefundCount.value, to: '/shop/shopOrder', tagColor: 'orange', dotColor: 'dot-orange', urgent: pendingRefundCount.value > 0 },
|
||||
{ label: '优惠券使用', value: couponUsedCount.value, to: '/market/coupon', tagColor: 'cyan', dotColor: 'dot-cyan', urgent: false },
|
||||
// { label: '优惠券使用', value: couponUsedCount.value, to: '/market/coupon', tagColor: 'cyan', dotColor: 'dot-cyan', urgent: false },
|
||||
]);
|
||||
|
||||
// 今日统计(使用computed确保响应式更新)
|
||||
|
||||
@@ -71,7 +71,8 @@
|
||||
label="支付状态"
|
||||
:labelStyle="{ width: '90px', color: '#808080' }"
|
||||
>
|
||||
<a-tag v-if="form.payStatus == 1" color="green">已付款</a-tag>
|
||||
<a-tag v-if="form.payStatus == 1 && form.payType !== 8" color="green">已付款</a-tag>
|
||||
<a-tag v-if="form.payStatus == 1 && form.payType === 8" color="blue">待收货付款</a-tag>
|
||||
<a-tag v-if="form.payStatus == 0">未付款</a-tag>
|
||||
<a-tag v-if="form.payStatus == 3">未付款,占场中</a-tag>
|
||||
</a-descriptions-item>
|
||||
@@ -116,30 +117,33 @@
|
||||
<WechatOutlined class="tag-icon" />
|
||||
微信支付
|
||||
</a-tag>
|
||||
<a-tag v-if="form.payType == 2">积分</a-tag>
|
||||
<a-tag v-if="form.payType == 3">
|
||||
<a-tag v-if="form.payType == 2">
|
||||
<AlipayCircleOutlined class="tag-icon" />
|
||||
支付宝
|
||||
</a-tag>
|
||||
<a-tag v-if="form.payType == 3">
|
||||
<IdcardOutlined class="tag-icon" />
|
||||
银联支付
|
||||
</a-tag>
|
||||
<a-tag v-if="form.payType == 4">
|
||||
<IdcardOutlined class="tag-icon" />
|
||||
现金
|
||||
现金支付
|
||||
</a-tag>
|
||||
<a-tag v-if="form.payType == 5">
|
||||
<IdcardOutlined class="tag-icon" />
|
||||
POS机
|
||||
POS机支付
|
||||
</a-tag>
|
||||
<a-tag v-if="form.payType == 6">
|
||||
<IdcardOutlined class="tag-icon" />
|
||||
VIP月卡
|
||||
免费
|
||||
</a-tag>
|
||||
<a-tag v-if="form.payType == 7">
|
||||
<IdcardOutlined class="tag-icon" />
|
||||
VIP年卡
|
||||
积分支付
|
||||
</a-tag>
|
||||
<a-tag v-if="form.payType == 8">
|
||||
<IdcardOutlined class="tag-icon" />
|
||||
VIP次卡
|
||||
货到付款
|
||||
</a-tag>
|
||||
<a-tag v-if="form.payType == 9">
|
||||
<IdcardOutlined class="tag-icon" />
|
||||
@@ -541,9 +545,9 @@
|
||||
coachId: undefined,
|
||||
// 支付的用户id
|
||||
payUserId: undefined,
|
||||
// 0余额支付, 1微信支付,102微信Native,2会员卡支付,3支付宝,4现金,5POS机,6VIP月卡,7VIP年卡,8VIP次卡,9IC月卡,10IC年卡,11IC次卡,12免费,13VIP充值卡,14IC充值卡,15积分支付,16VIP季卡,17IC季卡,18代付
|
||||
// 0余额支付, 1微信支付, 2支付宝, 3银联支付, 4现金支付, 5POS机支付, 6免费, 7积分支付, 8货到付款, 9~18 已废弃
|
||||
payType: undefined,
|
||||
// 代付支付方式,0余额支付, 1微信支付,102微信Native,2会员卡支付,3支付宝,4现金,5POS机,6VIP月卡,7VIP年卡,8VIP次卡,9IC月卡,10IC年卡,11IC次卡,12免费,13VIP充值卡,14IC充值卡,15积分支付,16VIP季卡,17IC季卡,18代付
|
||||
// 代付支付方式, 0余额支付, 1微信支付, 2支付宝, 3银联支付, 4现金支付, 5POS机支付, 6免费, 7积分支付, 8货到付款, 9~18 已废弃
|
||||
friendPayType: undefined,
|
||||
// 0未付款,1已付款
|
||||
payStatus: undefined,
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
<template v-for="(item, index) in record.orderGoods" :key="index">
|
||||
<div class="item py-1">
|
||||
<a-space :id="`g-${index}`">
|
||||
<a-avatar :src="item.image" shape="square" :size="80" />
|
||||
<a-avatar :src="getCompressedImageUrl(item.image)" shape="square" :size="80" />
|
||||
<span>{{ item.goodsName }}</span>
|
||||
</a-space>
|
||||
</div>
|
||||
@@ -376,6 +376,7 @@
|
||||
} from '@/api/shop/shopOrder';
|
||||
import { updateUser } from '@/api/system/user';
|
||||
import { getPayType } from '@/utils/shop';
|
||||
import { getCompressedImageUrl } from '@/utils/image';
|
||||
import { message, Modal } from 'ant-design-vue';
|
||||
import { useOrderNotify } from './useOrderNotify';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user