From 44be35b5ce3159b525d17ab7abbd931c114867e8 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Thu, 17 Aug 2023 10:52:40 +0800 Subject: [PATCH 01/37] =?UTF-8?q?fix:=20=E5=AE=8C=E5=96=84=E7=A0=8D?= =?UTF-8?q?=E4=BB=B7=E6=B4=BB=E5=8A=A8=E7=AE=A1=E7=90=86=E5=AF=B9=E9=BD=90?= =?UTF-8?q?=E5=90=8E=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mall/promotion/bargain/bargainActivity.ts | 10 +++--- .../mall/product/spu/components/SkuList.vue | 9 ++--- .../bargain/activity/BargainActivityForm.vue | 27 +++++++++++---- .../promotion/combination/record/index.vue | 5 +++ .../mall/promotion/components/SpuSelect.vue | 33 +++++++++++++++---- 5 files changed, 62 insertions(+), 22 deletions(-) diff --git a/src/api/mall/promotion/bargain/bargainActivity.ts b/src/api/mall/promotion/bargain/bargainActivity.ts index a23477d9..9e2dfba5 100644 --- a/src/api/mall/promotion/bargain/bargainActivity.ts +++ b/src/api/mall/promotion/bargain/bargainActivity.ts @@ -7,18 +7,20 @@ export interface BargainActivityVO { startTime?: Date endTime?: Date status?: number - spuId?: number userSize?: number // 达到该人数,才能砍到低价 bargainCount?: number // 最大帮砍次数 totalLimitCount?: number // 最大购买次数 - stock?: number // 活动总库存 + spuId: number + skuId: number + bargainFirstPrice: number // 砍价起始价格,单位分 + bargainPrice: number // 砍价底价 + stock: number // 活动库存 randomMinPrice?: number // 用户每次砍价的最小金额,单位:分 randomMaxPrice?: number // 用户每次砍价的最大金额,单位:分 successCount?: number // 砍价成功数量 - products?: BargainProductVO[] } -// 砍价活动所需属性 +// 砍价活动所需属性。 选择的商品和属性的时候使用方便使用活动的通用封装 export interface BargainProductVO { spuId: number skuId: number diff --git a/src/views/mall/product/spu/components/SkuList.vue b/src/views/mall/product/spu/components/SkuList.vue index 7fbb9011..1cc70298 100644 --- a/src/views/mall/product/spu/components/SkuList.vue +++ b/src/views/mall/product/spu/components/SkuList.vue @@ -334,7 +334,7 @@ const validateSku = () => { for (const sku of formData.value!.skus!) { // 作为活动组件的校验 if (props.isActivityComponent) { - for (const rule of props.ruleConfig) { + for (const rule of props?.ruleConfig) { const arg = getValue(sku, rule.name) if (!rule.rule(arg)) { validate = false // 只要有一个不通过则直接不通过 @@ -534,9 +534,10 @@ watch( } ) const activitySkuListRef = ref>() -const clearSelection = () => { - activitySkuListRef.value.clearSelection() + +const getSkuTableRef = () => { + return activitySkuListRef.value } // 暴露出生成 sku 方法,给添加属性成功时调用 -defineExpose({ generateTableData, validateSku, clearSelection }) +defineExpose({ generateTableData, validateSku, getSkuTableRef }) diff --git a/src/views/mall/promotion/bargain/activity/BargainActivityForm.vue b/src/views/mall/promotion/bargain/activity/BargainActivityForm.vue index 5384d6a1..3bef4956 100644 --- a/src/views/mall/promotion/bargain/activity/BargainActivityForm.vue +++ b/src/views/mall/promotion/bargain/activity/BargainActivityForm.vue @@ -51,7 +51,7 @@ 取 消 - + diff --git a/src/views/mall/promotion/components/SpuSelect.vue b/src/views/mall/promotion/components/SpuSelect.vue index c62e419c..166cf5ff 100644 --- a/src/views/mall/promotion/components/SpuSelect.vue +++ b/src/views/mall/promotion/components/SpuSelect.vue @@ -127,7 +127,8 @@ defineOptions({ name: 'PromotionSpuSelect' }) const props = defineProps({ // 默认不需要(不需要的情况下只返回 spu,需要的情况下返回 选中的 spu 和 sku 列表) // 其它活动需要选择商品和商品属性导入此组件即可,需添加组件属性 :isSelectSku='true' - isSelectSku: propTypes.bool.def(false) // 是否需要选择 sku 属性 + isSelectSku: propTypes.bool.def(false), // 是否需要选择 sku 属性 + radio: propTypes.bool.def(false) // 是否单选 sku }) const message = useMessage() // 消息弹窗 @@ -146,7 +147,7 @@ const queryParams = ref({ }) // 查询参数 const propertyList = ref([]) // 商品属性列表 const spuListRef = ref>() -const skuListRef = ref() // 商品属性选择 Ref +const skuListRef = ref>() // 商品属性选择 Ref const spuData = ref() // 商品详情 const isExpand = ref(false) // 控制 SKU 列表显示 const expandRowKeys = ref() // 控制展开行需要设置 row-key 属性才能使用,该属性为展开行的 keys 数组。 @@ -155,12 +156,30 @@ const expandRowKeys = ref() // 控制展开行需要设置 row-key 属 const selectedSpuId = ref(0) // 选中的商品 spuId const selectedSkuIds = ref([]) // 选中的商品 skuIds const selectSku = (val: ProductSpuApi.Sku[]) => { + const skuTable = skuListRef.value?.getSkuTableRef() if (selectedSpuId.value === 0) { message.warning('请先选择商品再选择相应的规格!!!') - skuListRef.value.clearSelection() + skuTable?.clearSelection() return } - selectedSkuIds.value = val.map((sku) => sku.id!) + if (val.length === 0) { + selectedSkuIds.value = [] + return + } + if (props.radio) { + // 只选择一个 + selectedSkuIds.value = [val.map((sku) => sku.id!)[0]] + // 如果大于1个 + if (val.length > 1) { + // 清空选择 + skuTable?.clearSelection() + // 变更为最后一次选择的 + skuTable?.toggleRowSelection(val.pop(), true) + return + } + } else { + selectedSkuIds.value = val.map((sku) => sku.id!) + } } const selectSpu = (val: ProductSpuApi.Spu[]) => { if (val.length === 0) { @@ -176,9 +195,9 @@ const selectSpu = (val: ProductSpuApi.Spu[]) => { // 如果大于1个 if (val.length > 1) { // 清空选择 - spuListRef.value.clearSelection() + spuListRef.value?.clearSelection() // 变更为最后一次选择的 - spuListRef.value.toggleRowSelection(val.pop(), true) + spuListRef.value?.toggleRowSelection(val.pop(), true) return } expandChange(val[0], val) @@ -194,7 +213,7 @@ const expandChange = async (row: ProductSpuApi.Spu, expandedRows?: ProductSpuApi expandRowKeys.value = [selectedSpuId.value] return } - // 如果以展开 skuList 则选择此对应的 spu 不需要重新获取渲染 skuList + // 如果已展开 skuList 则选择此对应的 spu 不需要重新获取渲染 skuList if (isExpand.value && spuData.value?.id === row.id) { return } From 916e93ab2e3ba5e87bf4cd6e2c23a74ad03966b5 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Thu, 17 Aug 2023 14:56:13 +0800 Subject: [PATCH 02/37] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=8F=B3?= =?UTF-8?q?=E4=BE=A7=E4=BB=A3=E7=A0=81=E8=BF=87=E9=95=BF=E6=97=B6=E4=B8=8D?= =?UTF-8?q?=E7=BC=A9=E6=94=BE=E5=95=A5=E4=B9=9F=E5=81=9A=E4=B8=8D=E4=BA=86?= =?UTF-8?q?=E7=9A=84=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/infra/codegen/PreviewCode.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/infra/codegen/PreviewCode.vue b/src/views/infra/codegen/PreviewCode.vue index 16e63847..f95febaf 100644 --- a/src/views/infra/codegen/PreviewCode.vue +++ b/src/views/infra/codegen/PreviewCode.vue @@ -45,9 +45,9 @@ {{ t('common.copy') }} -
+
-
+ From 2eb740765e76e7ea4e4559de5441e2c3e7c9993e Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sun, 20 Aug 2023 02:16:13 +0800 Subject: [PATCH 03/37] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8?= =?UTF-8?q?=EF=BC=9A=E5=88=97=E8=A1=A8=E9=87=8D=E6=9E=84=20=E2=91=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/trade/order/index.ts | 122 ++- src/api/mall/trade/order/type/orderType.ts | 228 ----- src/views/Login/components/LoginForm.vue | 8 +- src/views/mall/trade/order/detail/index.vue | 367 +++++++ src/views/mall/trade/order/index.vue | 948 +++++++----------- src/views/mall/trade/order/testData.ts | 167 +++ .../mall/trade/order/tradeOrderDetail.vue | 365 ------- 7 files changed, 1024 insertions(+), 1181 deletions(-) delete mode 100644 src/api/mall/trade/order/type/orderType.ts create mode 100644 src/views/mall/trade/order/detail/index.vue create mode 100644 src/views/mall/trade/order/testData.ts delete mode 100644 src/views/mall/trade/order/tradeOrderDetail.vue diff --git a/src/api/mall/trade/order/index.ts b/src/api/mall/trade/order/index.ts index 9d0fab2e..5a6be83c 100644 --- a/src/api/mall/trade/order/index.ts +++ b/src/api/mall/trade/order/index.ts @@ -1,12 +1,110 @@ -import request from '@/config/axios' - -// 获得交易订单分页 -// TODO @xiaobai:改成 getOrderPage -export const getOrderList = (params: PageParam) => { - return request.get({ url: '/trade/order/page', params }) -} - -// 获得交易订单详情 -export const getOrderDetail = (id: number) => { - return request.get({ url: '/trade/order/get-detail?id=' + id }) -} +import request from '@/config/axios' + +export interface OrderVO { + id?: number // 订单编号 + no?: string // 订单流水号 + createTime?: Date // 下单时间 + type?: number // 订单类型 + terminal?: number // 订单来源 + userId?: number // 用户编号 + userIp?: string // 用户 IP + userRemark?: string // 用户备注 + status?: number // 订单状态 + productCount?: number // 购买的商品数量 + finishTime?: Date // 订单完成时间 + cancelTime?: Date // 订单取消时间 + cancelType?: number // 取消类型 + remark?: string // 商家备注 + payOrderId: number // 支付订单编号 + payed?: boolean // 是否已支付 + payTime?: Date // 付款时间 + payChannelCode?: string // 支付渠道 + originalPrice?: number // 商品原价(总) + orderPrice?: number // 订单原价(总) + discountPrice?: number // 订单优惠(总) + deliveryPrice?: number // 运费金额 + adjustPrice?: number // 订单调价(总) + payPrice?: number // 应付金额(总) + deliveryType?: number // 发货方式 + deliveryTemplateId?: number // 配送模板编号 + logisticsId?: number // 发货物流公司编号 + logisticsNo?: string // 发货物流单号 + deliveryStatus?: number // 发货状态 + deliveryTime?: Date // 发货时间 + receiveTime?: Date // 收货时间 + receiverName?: string // 收件人名称 + receiverMobile?: string // 收件人手机 + receiverAreaId?: number // 收件人地区编号 + receiverPostCode?: number // 收件人邮编 + receiverDetailAddress?: string // 收件人详细地址 + afterSaleStatus?: number // 售后状态 + refundPrice?: number // 退款金额 + couponId?: number // 优惠劵编号 + couponPrice?: number // 优惠劵减免金额 + pointPrice?: number // 积分抵扣的金额 + receiverAreaName?: string //收件人地区名字 + items?: OrderItemRespVO[] // 订单项列表 + //用户信息 + user?: { + id?: number + nickname?: string + avatar?: string + } +} + +export interface OrderItemRespVO { + // ========== 订单项基本信息 ========== + id?: number // 编号 + userId?: number // 用户编号 + orderId?: number // 订单编号 + // ========== 商品基本信息 ========== + spuId?: number // 商品 SPU 编号 + spuName?: string //商品 SPU 名称 + skuId?: number // 商品 SKU 编号 + picUrl?: string //商品图片 + count?: number //购买数量 + // ========== 价格 + 支付基本信息 ========== + originalPrice?: number //商品原价(总) + originalUnitPrice?: number //商品原价(单) + discountPrice?: number //商品优惠(总) + payPrice?: number //商品实付金额(总) + orderPartPrice?: number //子订单分摊金额(总) + orderDividePrice?: number //分摊后子订单实付金额(总) + // ========== 营销基本信息 ========== + // TODO 芋艿:在捉摸一下 + // ========== 售后基本信息 ========== + afterSaleStatus?: number // 售后状态 + properties?: ProductPropertiesVO[] //属性数组 +} + +export interface ProductPropertiesVO { + propertyId?: number // 属性的编号 + propertyName?: string // 属性的名称 + valueId?: number //属性值的编号 + valueName?: string // 属性值的名称 +} + +// 查询交易订单列表 +export const getOrderPage = async (params) => { + return await request.get({ url: `/trade/order/page`, params }) +} + +// 查询交易订单详情 +export const getOrder = async (id: number) => { + return await request.get({ url: `/trade/order/get?id=` + id }) +} + +// 新增交易订单 +export const createOrder = async (data: OrderVO) => { + return await request.post({ url: `/trade/order/create`, data }) +} + +// 修改交易订单 +export const updateOrder = async (data: OrderVO) => { + return await request.put({ url: `/trade/order/update`, data }) +} + +// 删除交易订单 +export const deleteOrder = async (id: number) => { + return await request.delete({ url: `/trade/order/delete?id=` + id }) +} diff --git a/src/api/mall/trade/order/type/orderType.ts b/src/api/mall/trade/order/type/orderType.ts deleted file mode 100644 index e5185769..00000000 --- a/src/api/mall/trade/order/type/orderType.ts +++ /dev/null @@ -1,228 +0,0 @@ -// TODO @xiaobai:这个放到 order/index.ts 里哈 -// TODO @xiaobai:注释放到变量后面,这样简洁一点 -// TODO @xiaobai:这个改成 TradeOrderRespVO -export interface TradeOrderPageItemRespVO { - // 订单编号 - id?: number - // 订单流水号 - no?: string - // 下单时间 - createTime?: Date - // 订单类型 - type?: number - // 订单来源 - terminal?: number - // 用户编号 - userId?: number - // 用户 IP - userIp?: string - // 用户备注 - userRemark?: string - // 订单状态 - status?: number - // 购买的商品数量 - productCount?: number - // 订单完成时间 - finishTime?: Date - // 订单取消时间 - cancelTime?: Date - // 取消类型 - cancelType?: number - // 商家备注 - remark?: string - // 支付订单编号 - payOrderId: number - // 是否已支付 - payed?: boolean - // 付款时间 - payTime?: Date - // 支付渠道 - payChannelCode?: string - // 商品原价(总) - originalPrice?: number - // 订单原价(总) - orderPrice?: number - // 订单优惠(总) - discountPrice?: number - // 运费金额 - deliveryPrice?: number - // 订单调价(总) - adjustPrice?: number - // 应付金额(总) - payPrice?: number - // 配送模板编号 - deliveryTemplateId?: number - // 发货物流公司编号 - logisticsId?: number - // 发货物流单号 - logisticsNo?: string - // 发货状态 - deliveryStatus?: number - // 发货时间 - deliveryTime?: Date - // 收货时间 - receiveTime?: Date - // 收件人名称 - receiverName?: string - // 收件人手机 - receiverMobile?: string - // 收件人地区编号 - receiverAreaId?: number - // 收件人邮编 - receiverPostCode?: number - // 收件人详细地址 - receiverDetailAddress?: string - // 售后状态 - afterSaleStatus?: number - // 退款金额 - refundPrice?: number - // 优惠劵编号 - couponId?: number - // 优惠劵减免金额 - couponPrice?: number - // 积分抵扣的金额 - pointPrice?: number - //收件人地区名字 - receiverAreaName?: string - // 订单项列表 - items?: TradeOrderItemBaseVO[] - //用户信息 - user?: MemberUserRespDTO -} - -// TODO @xiaobai:这个改成 TradeOrderItemRespVO -/** - * 交易订单项 Base VO,提供给添加、修改、详细的子 VO 使用 - * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 - */ -export interface TradeOrderItemBaseVO { - // ========== 订单项基本信息 ========== - /** - * 编号 - */ - id?: number - /** - * 用户编号 - */ - userId?: number - /** - * 订单编号 - */ - orderId?: number - // ========== 商品基本信息 ========== - /** - * 商品 SPU 编号 - */ - spuId?: number - /** - * 商品 SPU 名称 - */ - spuName?: string - /** - * 商品 SKU 编号 - */ - skuId?: number - /** - * 商品图片 - */ - picUrl?: string - /** - * 购买数量 - */ - count?: number - // ========== 价格 + 支付基本信息 ========== - /** - * 商品原价(总) - */ - originalPrice?: number - /** - * 商品原价(单) - */ - originalUnitPrice?: number - /** - * 商品优惠(总) - */ - discountPrice?: number - /** - * 商品实付金额(总) - */ - payPrice?: number - /** - * 子订单分摊金额(总) - */ - orderPartPrice?: number - /** - * 分摊后子订单实付金额(总) - */ - orderDividePrice?: number - // ========== 营销基本信息 ========== - // TODO 芋艿:在捉摸一下 - // ========== 售后基本信息 ========== - /** - * 售后状态 - */ - afterSaleStatus?: number - //属性数组 - properties?: ProductPropertyValueDetailRespVO[] -} - -/** - * 管理后台 - 商品属性值的明细 Response VO - */ -export interface ProductPropertyValueDetailRespVO { - /** - * 属性的编号 - */ - propertyId?: number - /** - * 属性的名称 - */ - propertyName?: string - /** - * 属性值的编号 - */ - valueId?: number - /** - * 属性值的名称 - */ - valueName?: string -} - -/** - * 订单详情查询 请求 - */ -export interface TradeOrderPageReqVO { - pageNo: number - pageSize: number - no?: string - userId?: string - userNickname?: string - userMobile?: string - receiverName?: string - receiverMobile?: string - terminal?: string - type?: number - status?: number - payChannelCode?: string - createTime?: [Date, Date] - spuName?: string - itemCount?: string - all?: string -} - -//用户信息 -export interface MemberUserRespDTO { - id?: number - nickname?: string - status?: number - avatar?: string - mobile?: string -} -//订单详情选中type -export interface SelectType { - queryParams: TradeOrderPageReqVO - selectTotal: number //选中的数量 - selectAllFlag: boolean //全选标识 - selectData: Map> //存放涉及选中得页面以及每页选中得数据订单号 全选时根据条件查询 排除取消的list订单 - unSelectList: Set //登记取消的list 全选标识为true 时登记单独取消的list,再次选中时排除, 全选标识为false 时清空list -} diff --git a/src/views/Login/components/LoginForm.vue b/src/views/Login/components/LoginForm.vue index 190c5aa1..87880328 100644 --- a/src/views/Login/components/LoginForm.vue +++ b/src/views/Login/components/LoginForm.vue @@ -21,8 +21,8 @@ v-model="loginData.loginForm.tenantName" :placeholder="t('login.tenantNamePlaceholder')" :prefix-icon="iconHouse" - type="primary" link + type="primary" /> @@ -148,8 +148,8 @@ import { ElLoading } from 'element-plus' import LoginFormTitle from './LoginFormTitle.vue' import type { RouteLocationNormalizedLoaded } from 'vue-router' -import { CACHE_KEY, useCache } from '@/hooks/web/useCache' -const { wsCache } = useCache() +// import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +// const { wsCache } = useCache() import { useIcon } from '@/hooks/web/useIcon' import * as authUtil from '@/utils/auth' @@ -246,7 +246,7 @@ const handleLogin = async (params) => { if (!res) { return } - wsCache.delete(CACHE_KEY.USER) // 清除上次登录用户信息 + // wsCache.delete(CACHE_KEY.USER) // 清除上次登录用户信息 ElLoading.service({ lock: true, text: '正在加载系统中...', diff --git a/src/views/mall/trade/order/detail/index.vue b/src/views/mall/trade/order/detail/index.vue new file mode 100644 index 00000000..394b15de --- /dev/null +++ b/src/views/mall/trade/order/detail/index.vue @@ -0,0 +1,367 @@ + + + diff --git a/src/views/mall/trade/order/index.vue b/src/views/mall/trade/order/index.vue index 1e4f6eb3..e0a5a290 100644 --- a/src/views/mall/trade/order/index.vue +++ b/src/views/mall/trade/order/index.vue @@ -1,572 +1,376 @@ - - + + + diff --git a/src/views/mall/trade/order/testData.ts b/src/views/mall/trade/order/testData.ts new file mode 100644 index 00000000..fcf3adaf --- /dev/null +++ b/src/views/mall/trade/order/testData.ts @@ -0,0 +1,167 @@ +import { OrderVO } from '@/api/mall/trade/order' + +export const testData: OrderVO = [ + { + id: 2, + no: '20230817002', + createTime: new Date('2023-08-17T11:30:00'), + type: 2, + terminal: 10, + userId: 1002, + userIp: '192.168.1.2', + userRemark: 'Urgent delivery required', + status: 20, + productCount: 2, + finishTime: null, + cancelTime: null, + cancelType: null, + remark: '', + payOrderId: 10002, + payed: false, + payTime: null, + payChannelCode: 'wx_app', + originalPrice: 80, + orderPrice: 80, + discountPrice: 0, + deliveryPrice: 5, + adjustPrice: 0, + payPrice: 85, + deliveryTemplateId: 2002, + logisticsId: null, + logisticsNo: '', + deliveryStatus: 0, + deliveryTime: null, + receiveTime: null, + receiverName: 'Jane Smith', + receiverMobile: '987-654-3210', + receiverAreaId: 4002, + receiverPostCode: 54321, + receiverDetailAddress: '456 Elm St, Apt 2C', + afterSaleStatus: 0, + refundPrice: 0, + couponId: null, + couponPrice: 0, + pointPrice: 0, + receiverAreaName: 'Townsville', + items: [ + { + id: 103, + userId: 1002, + orderId: 2, + spuId: 5003, + spuName: 'Widget C', + skuId: 6003, + picUrl: 'https://example.com/images/widget_c.jpg', + count: 1, + originalPrice: 40, + originalUnitPrice: 40, + discountPrice: 0, + payPrice: 40, + orderPartPrice: 40, + orderDividePrice: 40, + afterSaleStatus: 0, + properties: [ + { propertyId: 7001, propertyName: 'Color', valueId: 8004, valueName: 'Green' }, + { propertyId: 7002, propertyName: 'Size', valueId: 8002, valueName: 'Medium' } + ] + }, + { + id: 104, + userId: 1002, + orderId: 2, + spuId: 5004, + spuName: 'Widget D', + skuId: 6004, + picUrl: 'https://example.com/images/widget_d.jpg', + count: 1, + originalPrice: 40, + originalUnitPrice: 40, + discountPrice: 0, + payPrice: 40, + orderPartPrice: 40, + orderDividePrice: 40, + afterSaleStatus: 0, + properties: [ + { propertyId: 7003, propertyName: 'Color', valueId: 8005, valueName: 'Yellow' }, + { propertyId: 7002, propertyName: 'Size', valueId: 8002, valueName: 'Medium' } + ] + } + ], + user: { + id: 1002, + nickname: 'janesmith', + avatar: 'https://example.com/images/avatar.jpg' + } + }, + { + id: 3, + no: '20230817003', + createTime: new Date('2023-08-17T12:00:00'), + type: 1, + terminal: 10, + userId: 1003, + userIp: '192.168.1.3', + userRemark: '', + status: 10, + productCount: 1, + finishTime: new Date('2023-08-18T09:15:00'), + cancelTime: null, + cancelType: null, + remark: '', + payOrderId: 10003, + payed: true, + payTime: new Date('2023-08-17T12:30:00'), + payChannelCode: 'alipay_app', + originalPrice: 25, + orderPrice: 20, + discountPrice: 5, + deliveryPrice: 5, + adjustPrice: 0, + payPrice: 20, + deliveryTemplateId: 2001, + logisticsId: 3002, + logisticsNo: 'DEF987654', + deliveryStatus: 2, + deliveryTime: new Date('2023-08-18T10:30:00'), + receiveTime: new Date('2023-08-19T11:30:00'), + receiverName: 'Sarah Johnson', + receiverMobile: '555-123-4567', + receiverAreaId: 4003, + receiverPostCode: 67890, + receiverDetailAddress: '789 Oak Ave', + afterSaleStatus: 0, + refundPrice: 0, + couponId: 2001, + couponPrice: 5, + pointPrice: 0, + receiverAreaName: 'Villageville', + items: [ + { + id: 105, + userId: 1003, + orderId: 3, + spuId: 5005, + spuName: 'Widget E', + skuId: 6005, + picUrl: 'https://example.com/images/widget_e.jpg', + count: 1, + originalPrice: 20, + originalUnitPrice: 20, + discountPrice: 5, + payPrice: 15, + orderPartPrice: 15, + orderDividePrice: 15, + afterSaleStatus: 0, + properties: [ + { propertyId: 7001, propertyName: 'Color', valueId: 8006, valueName: 'Black' }, + { propertyId: 7002, propertyName: 'Size', valueId: 8002, valueName: 'Medium' } + ] + } + ], + user: { + id: 1003, + nickname: 'sarahjohnson', + avatar: 'https://example.com/images/avatar.jpg' + } + } +] diff --git a/src/views/mall/trade/order/tradeOrderDetail.vue b/src/views/mall/trade/order/tradeOrderDetail.vue deleted file mode 100644 index 1e61f799..00000000 --- a/src/views/mall/trade/order/tradeOrderDetail.vue +++ /dev/null @@ -1,365 +0,0 @@ - - - From f1735a4010ee1e873c4b07c1e0d222e4180fa27c Mon Sep 17 00:00:00 2001 From: owen Date: Sun, 20 Aug 2023 15:54:05 +0800 Subject: [PATCH 04/37] =?UTF-8?q?=E4=BC=9A=E5=91=98=EF=BC=9A=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=BC=9A=E5=91=98=E7=AD=89=E7=BA=A7=E5=A2=9E=E5=88=A0?= =?UTF-8?q?=E6=94=B9=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/member/level/index.ts | 37 ++++++ src/views/member/level/LevelForm.vue | 175 ++++++++++++++++++++++++++ src/views/member/level/index.vue | 182 +++++++++++++++++++++++++++ 3 files changed, 394 insertions(+) create mode 100644 src/api/member/level/index.ts create mode 100644 src/views/member/level/LevelForm.vue create mode 100644 src/views/member/level/index.vue diff --git a/src/api/member/level/index.ts b/src/api/member/level/index.ts new file mode 100644 index 00000000..8a069089 --- /dev/null +++ b/src/api/member/level/index.ts @@ -0,0 +1,37 @@ +import request from '@/config/axios' + +export interface LevelVO { + id: number + name: string + experience: number + value: number + discount: number + icon: string + bgUrl: string + status: number +} + +// 查询会员等级列表 +export const getLevelPage = async (params) => { + return await request.get({ url: `/member/level/page`, params }) +} + +// 查询会员等级详情 +export const getLevel = async (id: number) => { + return await request.get({ url: `/member/level/get?id=` + id }) +} + +// 新增会员等级 +export const createLevel = async (data: LevelVO) => { + return await request.post({ url: `/member/level/create`, data }) +} + +// 修改会员等级 +export const updateLevel = async (data: LevelVO) => { + return await request.put({ url: `/member/level/update`, data }) +} + +// 删除会员等级 +export const deleteLevel = async (id: number) => { + return await request.delete({ url: `/member/level/delete?id=` + id }) +} diff --git a/src/views/member/level/LevelForm.vue b/src/views/member/level/LevelForm.vue new file mode 100644 index 00000000..d02794be --- /dev/null +++ b/src/views/member/level/LevelForm.vue @@ -0,0 +1,175 @@ + + diff --git a/src/views/member/level/index.vue b/src/views/member/level/index.vue new file mode 100644 index 00000000..be1c646c --- /dev/null +++ b/src/views/member/level/index.vue @@ -0,0 +1,182 @@ + + + From 1db98698bd680ceeb72faf316c31a5e30d98205f Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 21 Aug 2023 10:34:10 +0800 Subject: [PATCH 05/37] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E7=9A=84=E7=BC=96=E8=BE=91=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mall/product/property/index.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/views/mall/product/property/index.vue b/src/views/mall/product/property/index.vue index 00597dc3..dc79450b 100644 --- a/src/views/mall/product/property/index.vue +++ b/src/views/mall/product/property/index.vue @@ -73,9 +73,7 @@ > 编辑 - - 属性值 - + 属性值 { } catch {} } +/** 跳转商品属性列表 */ +const goValueList = (id: number) => { + push({ path: '/property/value/' + id }) +} + /** 初始化 **/ onMounted(() => { getList() From 7bef2409262a4075b51b5dbc14d275b5cc3f0a0e Mon Sep 17 00:00:00 2001 From: owen Date: Mon, 21 Aug 2023 21:31:15 +0800 Subject: [PATCH 06/37] =?UTF-8?q?=E4=BC=9A=E5=91=98=EF=BC=9A=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E8=B0=83=E6=95=B4=E4=BC=9A=E5=91=98=E7=AD=89=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/member/level/index.ts | 5 ++ .../level/components/MemberLevelSelect.vue | 46 +++++++++++++++++++ src/views/member/user/UserForm.vue | 35 +++++++++++--- src/views/member/user/index.vue | 13 +++--- 4 files changed, 86 insertions(+), 13 deletions(-) create mode 100644 src/views/member/level/components/MemberLevelSelect.vue diff --git a/src/api/member/level/index.ts b/src/api/member/level/index.ts index 8a069089..a284fd2d 100644 --- a/src/api/member/level/index.ts +++ b/src/api/member/level/index.ts @@ -21,6 +21,11 @@ export const getLevel = async (id: number) => { return await request.get({ url: `/member/level/get?id=` + id }) } +// 查询会员等级 - 精简信息列表 +export const getSimpleLevelList = async () => { + return await request.get({ url: `/member/level/list-all-simple` }) +} + // 新增会员等级 export const createLevel = async (data: LevelVO) => { return await request.post({ url: `/member/level/create`, data }) diff --git a/src/views/member/level/components/MemberLevelSelect.vue b/src/views/member/level/components/MemberLevelSelect.vue new file mode 100644 index 00000000..73e11f1b --- /dev/null +++ b/src/views/member/level/components/MemberLevelSelect.vue @@ -0,0 +1,46 @@ + + + diff --git a/src/views/member/user/UserForm.vue b/src/views/member/user/UserForm.vue index c10d3fea..2a86c63e 100644 --- a/src/views/member/user/UserForm.vue +++ b/src/views/member/user/UserForm.vue @@ -60,6 +60,22 @@ + + + + + + + + + + + + @@ -76,6 +92,7 @@ import * as UserApi from '@/api/member/user' import * as AreaApi from '@/api/system/area' import { defaultProps } from '@/utils/tree' import MemberTagSelect from '@/views/member/tag/components/MemberTagSelect.vue' +import MemberLevelSelect from '@/views/member/level/components/MemberLevelSelect.vue' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 @@ -87,6 +104,7 @@ const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ id: undefined, mobile: undefined, + password: undefined, status: undefined, nickname: undefined, avatar: undefined, @@ -95,14 +113,18 @@ const formData = ref({ areaId: undefined, birthday: undefined, mark: undefined, - tagIds: [] + tagIds: [], + levelId: undefined, + levelReason: undefined }) const formRules = reactive({ mobile: [{ required: true, message: '手机号不能为空', trigger: 'blur' }], - status: [{ required: true, message: '状态不能为空', trigger: 'blur' }] + status: [{ required: true, message: '状态不能为空', trigger: 'blur' }], + levelReason: [{ required: true, message: '修改原因不能为空', trigger: 'blur' }] }) const formRef = ref() // 表单 Ref const areaList = ref([]) // 地区列表 +const originLevelId = ref() // 修改前的会员等级 /** 打开弹窗 */ const open = async (type: string, id?: number) => { @@ -115,6 +137,7 @@ const open = async (type: string, id?: number) => { formLoading.value = true try { formData.value = await UserApi.getUser(id) + originLevelId.value = formData.value.levelId } finally { formLoading.value = false } @@ -158,9 +181,6 @@ const resetForm = () => { mobile: undefined, password: undefined, status: undefined, - registerIp: undefined, - loginIp: undefined, - loginDate: undefined, nickname: undefined, avatar: undefined, name: undefined, @@ -168,8 +188,9 @@ const resetForm = () => { areaId: undefined, birthday: undefined, mark: undefined, - createTime: undefined, - tagIds: [] + tagIds: [], + levelId: undefined, + levelReason: undefined } formRef.value?.resetFields() } diff --git a/src/views/member/user/index.vue b/src/views/member/user/index.vue index 0389de37..673fd63d 100644 --- a/src/views/member/user/index.vue +++ b/src/views/member/user/index.vue @@ -51,6 +51,9 @@ + + + 搜索 重置 @@ -69,8 +72,8 @@ + - { From 884bb055b054408a019c9c1ef7992e3d2c446390 Mon Sep 17 00:00:00 2001 From: owen Date: Mon, 21 Aug 2023 21:44:04 +0800 Subject: [PATCH 07/37] =?UTF-8?q?=E4=BC=9A=E5=91=98=EF=BC=9A=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=A0=87=E7=AD=BE=E5=A2=9E=E5=8A=A0=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A1=86=E4=BD=BF=E7=94=A8=E7=9A=84=20=E7=B2=BE=E7=AE=80?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/member/tag/index.ts | 7 ++++++- src/views/member/tag/components/MemberTagSelect.vue | 3 +-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/api/member/tag/index.ts b/src/api/member/tag/index.ts index 04d0536c..7ff6e9bf 100644 --- a/src/api/member/tag/index.ts +++ b/src/api/member/tag/index.ts @@ -6,7 +6,7 @@ export interface TagVO { } // 查询会员标签列表 -export const getMemberTagPage = async (params) => { +export const getMemberTagPage = async (params: any) => { return await request.get({ url: `/member/tag/page`, params }) } @@ -15,6 +15,11 @@ export const getMemberTag = async (id: number) => { return await request.get({ url: `/member/tag/get?id=` + id }) } +// 查询会员标签 - 精简信息列表 +export const getSimpleTagList = async () => { + return await request.get({ url: `/member/tag/list-all-simple` }) +} + // 新增会员标签 export const createMemberTag = async (data: TagVO) => { return await request.post({ url: `/member/tag/create`, data }) diff --git a/src/views/member/tag/components/MemberTagSelect.vue b/src/views/member/tag/components/MemberTagSelect.vue index ec4f4617..ebff61ea 100644 --- a/src/views/member/tag/components/MemberTagSelect.vue +++ b/src/views/member/tag/components/MemberTagSelect.vue @@ -52,8 +52,7 @@ const tagIds = computed({ const tags = ref([]) const getList = async () => { - const data = await TagApi.getMemberTagPage({}) - tags.value = data.list + tags.value = await TagApi.getSimpleTagList() } /** 添加用户标签表单弹框 */ From 345c09ee6ce5a3c8893bef56c8334573fb0d9bf8 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Mon, 21 Aug 2023 22:39:21 +0800 Subject: [PATCH 08/37] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8?= =?UTF-8?q?=EF=BC=9A=E5=88=97=E8=A1=A8=E9=87=8D=E6=9E=84=20=E2=91=A1=20and?= =?UTF-8?q?=20=E5=AE=8C=E5=96=84=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/trade/order/index.ts | 100 ++-- src/router/modules/remaining.ts | 50 +- src/utils/dict.ts | 2 +- src/views/mall/trade/order/detail/index.vue | 506 ++++++++++---------- src/views/mall/trade/order/index.vue | 92 ++-- src/views/mall/trade/order/testData.ts | 48 +- 6 files changed, 434 insertions(+), 364 deletions(-) diff --git a/src/api/mall/trade/order/index.ts b/src/api/mall/trade/order/index.ts index 5a6be83c..8acb9941 100644 --- a/src/api/mall/trade/order/index.ts +++ b/src/api/mall/trade/order/index.ts @@ -1,52 +1,52 @@ import request from '@/config/axios' export interface OrderVO { - id?: number // 订单编号 + id?: number | null // 订单编号 no?: string // 订单流水号 - createTime?: Date // 下单时间 - type?: number // 订单类型 - terminal?: number // 订单来源 - userId?: number // 用户编号 + createTime?: Date | null // 下单时间 + type?: number | null // 订单类型 + terminal?: number | null // 订单来源 + userId?: number | null // 用户编号 userIp?: string // 用户 IP userRemark?: string // 用户备注 - status?: number // 订单状态 - productCount?: number // 购买的商品数量 - finishTime?: Date // 订单完成时间 - cancelTime?: Date // 订单取消时间 - cancelType?: number // 取消类型 + status?: number | null // 订单状态 + productCount?: number | null // 购买的商品数量 + finishTime?: Date | null // 订单完成时间 + cancelTime?: Date | null // 订单取消时间 + cancelType?: number | null // 取消类型 remark?: string // 商家备注 - payOrderId: number // 支付订单编号 + payOrderId: number | null // 支付订单编号 payed?: boolean // 是否已支付 - payTime?: Date // 付款时间 + payTime?: Date | null // 付款时间 payChannelCode?: string // 支付渠道 - originalPrice?: number // 商品原价(总) - orderPrice?: number // 订单原价(总) - discountPrice?: number // 订单优惠(总) - deliveryPrice?: number // 运费金额 - adjustPrice?: number // 订单调价(总) - payPrice?: number // 应付金额(总) - deliveryType?: number // 发货方式 - deliveryTemplateId?: number // 配送模板编号 - logisticsId?: number // 发货物流公司编号 + originalPrice?: number | null // 商品原价(总) + orderPrice?: number | null // 订单原价(总) + discountPrice?: number | null // 订单优惠(总) + deliveryPrice?: number | null // 运费金额 + adjustPrice?: number | null // 订单调价(总) + payPrice?: number | null // 应付金额(总) + deliveryType?: number | null // 发货方式 + deliveryTemplateId?: number | null // 配送模板编号 + logisticsId?: number | null | null // 发货物流公司编号 logisticsNo?: string // 发货物流单号 - deliveryStatus?: number // 发货状态 - deliveryTime?: Date // 发货时间 - receiveTime?: Date // 收货时间 + deliveryStatus?: number | null // 发货状态 + deliveryTime?: Date | null // 发货时间 + receiveTime?: Date | null // 收货时间 receiverName?: string // 收件人名称 receiverMobile?: string // 收件人手机 - receiverAreaId?: number // 收件人地区编号 - receiverPostCode?: number // 收件人邮编 + receiverAreaId?: number | null // 收件人地区编号 + receiverPostCode?: number | null // 收件人邮编 receiverDetailAddress?: string // 收件人详细地址 - afterSaleStatus?: number // 售后状态 - refundPrice?: number // 退款金额 - couponId?: number // 优惠劵编号 - couponPrice?: number // 优惠劵减免金额 - pointPrice?: number // 积分抵扣的金额 + afterSaleStatus?: number | null // 售后状态 + refundPrice?: number | null // 退款金额 + couponId?: number | null // 优惠劵编号 + couponPrice?: number | null // 优惠劵减免金额 + pointPrice?: number | null // 积分抵扣的金额 receiverAreaName?: string //收件人地区名字 items?: OrderItemRespVO[] // 订单项列表 //用户信息 user?: { - id?: number + id?: number | null nickname?: string avatar?: string } @@ -54,33 +54,33 @@ export interface OrderVO { export interface OrderItemRespVO { // ========== 订单项基本信息 ========== - id?: number // 编号 - userId?: number // 用户编号 - orderId?: number // 订单编号 + id?: number | null // 编号 + userId?: number | null // 用户编号 + orderId?: number | null // 订单编号 // ========== 商品基本信息 ========== - spuId?: number // 商品 SPU 编号 + spuId?: number | null // 商品 SPU 编号 spuName?: string //商品 SPU 名称 - skuId?: number // 商品 SKU 编号 + skuId?: number | null // 商品 SKU 编号 picUrl?: string //商品图片 - count?: number //购买数量 + count?: number | null //购买数量 // ========== 价格 + 支付基本信息 ========== - originalPrice?: number //商品原价(总) - originalUnitPrice?: number //商品原价(单) - discountPrice?: number //商品优惠(总) - payPrice?: number //商品实付金额(总) - orderPartPrice?: number //子订单分摊金额(总) - orderDividePrice?: number //分摊后子订单实付金额(总) + originalPrice?: number | null //商品原价(总) + originalUnitPrice?: number | null //商品原价(单) + discountPrice?: number | null //商品优惠(总) + payPrice?: number | null //商品实付金额(总) + orderPartPrice?: number | null //子订单分摊金额(总) + orderDividePrice?: number | null //分摊后子订单实付金额(总) // ========== 营销基本信息 ========== // TODO 芋艿:在捉摸一下 // ========== 售后基本信息 ========== - afterSaleStatus?: number // 售后状态 + afterSaleStatus?: number | null // 售后状态 properties?: ProductPropertiesVO[] //属性数组 } export interface ProductPropertiesVO { - propertyId?: number // 属性的编号 + propertyId?: number | null // 属性的编号 propertyName?: string // 属性的名称 - valueId?: number //属性值的编号 + valueId?: number | null //属性值的编号 valueName?: string // 属性值的名称 } @@ -90,8 +90,8 @@ export const getOrderPage = async (params) => { } // 查询交易订单详情 -export const getOrder = async (id: number) => { - return await request.get({ url: `/trade/order/get?id=` + id }) +export const getOrder = async (id: number | null) => { + return await request.get({ url: `/trade/order/get-detail?id=` + id }) } // 新增交易订单 @@ -105,6 +105,6 @@ export const updateOrder = async (data: OrderVO) => { } // 删除交易订单 -export const deleteOrder = async (id: number) => { +export const deleteOrder = async (id: number | null) => { return await request.delete({ url: `/trade/order/delete?id=` + id }) } diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 81f74d55..dcc8d41a 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -5,32 +5,32 @@ const { t } = useI18n() * redirect: noredirect 当设置 noredirect 的时候该路由在面包屑导航中不可被点击 * name:'router-name' 设定路由的名字,一定要填写不然使用时会出现各种问题 * meta : { - hidden: true 当设置 true 的时候该路由不会再侧边栏出现 如404,login等页面(默认 false) + hidden: true 当设置 true 的时候该路由不会再侧边栏出现 如404,login等页面(默认 false) - alwaysShow: true 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式, - 只有一个时,会将那个子路由当做根路由显示在侧边栏, - 若你想不管路由下面的 children 声明的个数都显示你的根路由, - 你可以设置 alwaysShow: true,这样它就会忽略之前定义的规则, - 一直显示根路由(默认 false) + alwaysShow: true 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式, + 只有一个时,会将那个子路由当做根路由显示在侧边栏, + 若你想不管路由下面的 children 声明的个数都显示你的根路由, + 你可以设置 alwaysShow: true,这样它就会忽略之前定义的规则, + 一直显示根路由(默认 false) - title: 'title' 设置该路由在侧边栏和面包屑中展示的名字 + title: 'title' 设置该路由在侧边栏和面包屑中展示的名字 - icon: 'svg-name' 设置该路由的图标 + icon: 'svg-name' 设置该路由的图标 - noCache: true 如果设置为true,则不会被 缓存(默认 false) + noCache: true 如果设置为true,则不会被 缓存(默认 false) - breadcrumb: false 如果设置为false,则不会在breadcrumb面包屑中显示(默认 true) + breadcrumb: false 如果设置为false,则不会在breadcrumb面包屑中显示(默认 true) - affix: true 如果设置为true,则会一直固定在tag项中(默认 false) + affix: true 如果设置为true,则会一直固定在tag项中(默认 false) - noTagsView: true 如果设置为true,则不会出现在tag中(默认 false) + noTagsView: true 如果设置为true,则不会出现在tag中(默认 false) - activeMenu: '/dashboard' 显示高亮的路由路径 + activeMenu: '/dashboard' 显示高亮的路由路径 - followAuth: '/dashboard' 跟随哪个路由进行权限过滤 + followAuth: '/dashboard' 跟随哪个路由进行权限过滤 - canTo: true 设置为true即使hidden为true,也依然可以进行路由跳转(默认 false) - } + canTo: true 设置为true即使hidden为true,也依然可以进行路由跳转(默认 false) + } **/ const remainingRouter: AppRouteRecordRaw[] = [ { @@ -349,7 +349,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ { path: '/property', component: Layout, - name: 'property', + name: 'Property', meta: { hidden: true }, @@ -411,6 +411,22 @@ const remainingRouter: AppRouteRecordRaw[] = [ } ] }, + { + path: '/trade/order', + component: Layout, + name: 'Detail', + meta: { + hidden: true + }, + children: [ + { + path: 'detail/:orderId(\\d+)', + component: () => import('@/views/mall/trade/order/detail/index.vue'), + name: 'TradeOrderDetailForm', + meta: { title: '订单详情', icon: '', activeMenu: '/trade/trade/order' } + } + ] + }, { path: '/pay', component: Layout, diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 6ca48716..7a1d53aa 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -130,7 +130,7 @@ export enum DICT_TYPE { BPM_OA_LEAVE_TYPE = 'bpm_oa_leave_type', // ========== PAY 模块 ========== - PAY_CHANNEL_CODE = 'pay_channel_code', // 支付渠道编码类型 + PAY_CHANNEL_CODE_TYPE = 'pay_channel_code_type', // 支付渠道编码类型 PAY_ORDER_STATUS = 'pay_order_status', // 商户支付订单状态 PAY_REFUND_STATUS = 'pay_refund_status', // 退款订单状态 PAY_NOTIFY_STATUS = 'pay_notify_status', // 商户支付回调状态 diff --git a/src/views/mall/trade/order/detail/index.vue b/src/views/mall/trade/order/detail/index.vue index 394b15de..c8e00f99 100644 --- a/src/views/mall/trade/order/detail/index.vue +++ b/src/views/mall/trade/order/detail/index.vue @@ -1,251 +1,271 @@ diff --git a/src/views/mall/trade/order/testData.ts b/src/views/mall/trade/order/testData.ts index fcf3adaf..d4c92a15 100644 --- a/src/views/mall/trade/order/testData.ts +++ b/src/views/mall/trade/order/testData.ts @@ -18,7 +18,7 @@ export const testData: OrderVO = [ remark: '', payOrderId: 10002, payed: false, - payTime: null, + payTime: new Date('2023-08-17T12:30:00'), payChannelCode: 'wx_app', originalPrice: 80, orderPrice: 80, @@ -32,26 +32,27 @@ export const testData: OrderVO = [ deliveryStatus: 0, deliveryTime: null, receiveTime: null, - receiverName: 'Jane Smith', - receiverMobile: '987-654-3210', + receiverName: '李四', + receiverMobile: '19855568989', receiverAreaId: 4002, receiverPostCode: 54321, - receiverDetailAddress: '456 Elm St, Apt 2C', + receiverDetailAddress: '翻斗花园', afterSaleStatus: 0, refundPrice: 0, couponId: null, couponPrice: 0, pointPrice: 0, - receiverAreaName: 'Townsville', + receiverAreaName: '北京市朝阳区', items: [ { id: 103, userId: 1002, orderId: 2, spuId: 5003, - spuName: 'Widget C', + spuName: '毛绒鸭子', skuId: 6003, - picUrl: 'https://example.com/images/widget_c.jpg', + picUrl: + 'http://127.0.0.1:48080/admin-api/infra/file/5/get/20220723041544165856414464011_BIG.jpg', count: 1, originalPrice: 40, originalUnitPrice: 40, @@ -61,8 +62,8 @@ export const testData: OrderVO = [ orderDividePrice: 40, afterSaleStatus: 0, properties: [ - { propertyId: 7001, propertyName: 'Color', valueId: 8004, valueName: 'Green' }, - { propertyId: 7002, propertyName: 'Size', valueId: 8002, valueName: 'Medium' } + { propertyId: 7001, propertyName: '颜色', valueId: 8004, valueName: '黄色' }, + { propertyId: 7002, propertyName: '尺寸', valueId: 8002, valueName: '小鸭子' } ] }, { @@ -70,9 +71,10 @@ export const testData: OrderVO = [ userId: 1002, orderId: 2, spuId: 5004, - spuName: 'Widget D', + spuName: '毛绒鸭子', skuId: 6004, - picUrl: 'https://example.com/images/widget_d.jpg', + picUrl: + 'http://127.0.0.1:48080/admin-api/infra/file/5/get/20220723041544165856414464011_BIG.jpg', count: 1, originalPrice: 40, originalUnitPrice: 40, @@ -82,14 +84,14 @@ export const testData: OrderVO = [ orderDividePrice: 40, afterSaleStatus: 0, properties: [ - { propertyId: 7003, propertyName: 'Color', valueId: 8005, valueName: 'Yellow' }, - { propertyId: 7002, propertyName: 'Size', valueId: 8002, valueName: 'Medium' } + { propertyId: 7001, propertyName: '颜色', valueId: 8004, valueName: '黄色' }, + { propertyId: 7002, propertyName: '尺寸', valueId: 8002, valueName: '大鸭子' } ] } ], user: { id: 1002, - nickname: 'janesmith', + nickname: '小妮子', avatar: 'https://example.com/images/avatar.jpg' } }, @@ -124,26 +126,26 @@ export const testData: OrderVO = [ deliveryStatus: 2, deliveryTime: new Date('2023-08-18T10:30:00'), receiveTime: new Date('2023-08-19T11:30:00'), - receiverName: 'Sarah Johnson', - receiverMobile: '555-123-4567', + receiverName: '张三', + receiverMobile: '13988886656', receiverAreaId: 4003, receiverPostCode: 67890, - receiverDetailAddress: '789 Oak Ave', + receiverDetailAddress: '成华大道', afterSaleStatus: 0, refundPrice: 0, couponId: 2001, couponPrice: 5, pointPrice: 0, - receiverAreaName: 'Villageville', + receiverAreaName: '四川省成都市', items: [ { id: 105, userId: 1003, orderId: 3, spuId: 5005, - spuName: 'Widget E', + spuName: '华为', skuId: 6005, - picUrl: 'https://example.com/images/widget_e.jpg', + picUrl: 'http://127.0.0.1:48080/admin-api/infra/file/5/get/sj.jpg', count: 1, originalPrice: 20, originalUnitPrice: 20, @@ -153,14 +155,14 @@ export const testData: OrderVO = [ orderDividePrice: 15, afterSaleStatus: 0, properties: [ - { propertyId: 7001, propertyName: 'Color', valueId: 8006, valueName: 'Black' }, - { propertyId: 7002, propertyName: 'Size', valueId: 8002, valueName: 'Medium' } + { propertyId: 7001, propertyName: '颜色', valueId: 8006, valueName: '紫色' }, + { propertyId: 7002, propertyName: '选配', valueId: 8002, valueName: '标配' } ] } ], user: { id: 1003, - nickname: 'sarahjohnson', + nickname: '无敌最俊朗', avatar: 'https://example.com/images/avatar.jpg' } } From 78917cd2be0d34dbbf4baab040f0cb83cec910ee Mon Sep 17 00:00:00 2001 From: owen Date: Mon, 21 Aug 2023 23:59:49 +0800 Subject: [PATCH 09/37] =?UTF-8?q?=E4=BC=9A=E5=91=98=EF=BC=9A=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E7=94=A8=E6=88=B7=E5=88=86=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/member/group/index.ts | 38 ++++ src/views/member/group/GroupForm.vue | 112 +++++++++++ .../group/components/MemberGroupSelect.vue | 46 +++++ src/views/member/group/index.vue | 174 ++++++++++++++++++ .../level/components/MemberLevelSelect.vue | 2 +- src/views/member/user/UserForm.vue | 10 +- src/views/member/user/index.vue | 10 +- 7 files changed, 386 insertions(+), 6 deletions(-) create mode 100644 src/api/member/group/index.ts create mode 100644 src/views/member/group/GroupForm.vue create mode 100644 src/views/member/group/components/MemberGroupSelect.vue create mode 100644 src/views/member/group/index.vue diff --git a/src/api/member/group/index.ts b/src/api/member/group/index.ts new file mode 100644 index 00000000..df3054e2 --- /dev/null +++ b/src/api/member/group/index.ts @@ -0,0 +1,38 @@ +import request from '@/config/axios' + +export interface GroupVO { + id: number + name: string + remark: string + status: number +} + +// 查询用户分组列表 +export const getGroupPage = async (params: any) => { + return await request.get({ url: `/member/group/page`, params }) +} + +// 查询用户分组详情 +export const getGroup = async (id: number) => { + return await request.get({ url: `/member/group/get?id=` + id }) +} + +// 新增用户分组 +export const createGroup = async (data: GroupVO) => { + return await request.post({ url: `/member/group/create`, data }) +} + +// 查询用户分组 - 精简信息列表 +export const getSimpleGroupList = async () => { + return await request.get({ url: `/member/group/list-all-simple` }) +} + +// 修改用户分组 +export const updateGroup = async (data: GroupVO) => { + return await request.put({ url: `/member/group/update`, data }) +} + +// 删除用户分组 +export const deleteGroup = async (id: number) => { + return await request.delete({ url: `/member/group/delete?id=` + id }) +} diff --git a/src/views/member/group/GroupForm.vue b/src/views/member/group/GroupForm.vue new file mode 100644 index 00000000..9788dbef --- /dev/null +++ b/src/views/member/group/GroupForm.vue @@ -0,0 +1,112 @@ + + diff --git a/src/views/member/group/components/MemberGroupSelect.vue b/src/views/member/group/components/MemberGroupSelect.vue new file mode 100644 index 00000000..2b38fce1 --- /dev/null +++ b/src/views/member/group/components/MemberGroupSelect.vue @@ -0,0 +1,46 @@ + + + diff --git a/src/views/member/group/index.vue b/src/views/member/group/index.vue new file mode 100644 index 00000000..552a72a6 --- /dev/null +++ b/src/views/member/group/index.vue @@ -0,0 +1,174 @@ + + + diff --git a/src/views/member/level/components/MemberLevelSelect.vue b/src/views/member/level/components/MemberLevelSelect.vue index 73e11f1b..c816a295 100644 --- a/src/views/member/level/components/MemberLevelSelect.vue +++ b/src/views/member/level/components/MemberLevelSelect.vue @@ -18,7 +18,7 @@ defineOptions({ name: 'MemberLevelSelect' }) const props = defineProps({ /** 下拉框选中值 **/ modelValue: { - type: Array, + type: Number, default: undefined } }) diff --git a/src/views/member/user/UserForm.vue b/src/views/member/user/UserForm.vue index 2a86c63e..0b7915a2 100644 --- a/src/views/member/user/UserForm.vue +++ b/src/views/member/user/UserForm.vue @@ -76,6 +76,9 @@ + + + @@ -93,6 +96,7 @@ import * as AreaApi from '@/api/system/area' import { defaultProps } from '@/utils/tree' import MemberTagSelect from '@/views/member/tag/components/MemberTagSelect.vue' import MemberLevelSelect from '@/views/member/level/components/MemberLevelSelect.vue' +import MemberGroupSelect from '@/views/member/group/components/MemberGroupSelect.vue' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 @@ -115,7 +119,8 @@ const formData = ref({ mark: undefined, tagIds: [], levelId: undefined, - levelReason: undefined + levelReason: undefined, + groupId: undefined }) const formRules = reactive({ mobile: [{ required: true, message: '手机号不能为空', trigger: 'blur' }], @@ -190,7 +195,8 @@ const resetForm = () => { mark: undefined, tagIds: [], levelId: undefined, - levelReason: undefined + levelReason: undefined, + groupId: undefined } formRef.value?.resetFields() } diff --git a/src/views/member/user/index.vue b/src/views/member/user/index.vue index 673fd63d..3a8e4259 100644 --- a/src/views/member/user/index.vue +++ b/src/views/member/user/index.vue @@ -54,6 +54,9 @@ + + + 搜索 重置 @@ -73,8 +76,7 @@ - - + Date: Tue, 22 Aug 2023 00:38:44 +0800 Subject: [PATCH 10/37] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8?= =?UTF-8?q?=EF=BC=9A=E5=88=97=E8=A1=A8=E9=87=8D=E6=9E=84=20=E2=91=A2=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=87=E6=B3=A8=E8=A1=A8=E5=8D=95=E5=92=8C?= =?UTF-8?q?=E5=8F=91=E8=B4=A7=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/trade/delivery/express/index.ts | 5 + src/api/mall/trade/order/index.ts | 19 ++-- .../mall/trade/order/DeliveryOrderForm.vue | 93 +++++++++++++++++++ .../mall/trade/order/OrderRemarksForm.vue | 66 +++++++++++++ src/views/mall/trade/order/detail/index.vue | 23 ++++- src/views/mall/trade/order/index.vue | 30 +++--- 6 files changed, 209 insertions(+), 27 deletions(-) create mode 100644 src/views/mall/trade/order/DeliveryOrderForm.vue create mode 100644 src/views/mall/trade/order/OrderRemarksForm.vue diff --git a/src/api/mall/trade/delivery/express/index.ts b/src/api/mall/trade/delivery/express/index.ts index 95429a40..76ac93ec 100644 --- a/src/api/mall/trade/delivery/express/index.ts +++ b/src/api/mall/trade/delivery/express/index.ts @@ -19,6 +19,11 @@ export const getDeliveryExpress = async (id: number) => { return await request.get({ url: '/trade/delivery/express/get?id=' + id }) } +// 获得商品品牌精简信息列表 +export const getSimpleDeliveryExpressList = () => { + return request.get({ url: '/trade/delivery/express/list-all-simple' }) +} + // 新增快递公司 export const createDeliveryExpress = async (data: DeliveryExpressVO) => { return await request.post({ url: '/trade/delivery/express/create', data }) diff --git a/src/api/mall/trade/order/index.ts b/src/api/mall/trade/order/index.ts index 8acb9941..8dfbfab8 100644 --- a/src/api/mall/trade/order/index.ts +++ b/src/api/mall/trade/order/index.ts @@ -94,17 +94,18 @@ export const getOrder = async (id: number | null) => { return await request.get({ url: `/trade/order/get-detail?id=` + id }) } -// 新增交易订单 -export const createOrder = async (data: OrderVO) => { - return await request.post({ url: `/trade/order/create`, data }) +export interface DeliveryVO { + id: number // 订单编号 + logisticsId: number | null // 物流公司编号 + logisticsNo: string // 物流编号 } -// 修改交易订单 -export const updateOrder = async (data: OrderVO) => { - return await request.put({ url: `/trade/order/update`, data }) +// 订单发货 +export const delivery = async (data: DeliveryVO) => { + return await request.post({ url: `/trade/order/delivery`, data }) } -// 删除交易订单 -export const deleteOrder = async (id: number | null) => { - return await request.delete({ url: `/trade/order/delete?id=` + id }) +// 订单备注 +export const remark = async (data) => { + return await request.post({ url: `/trade/order/remark`, data }) } diff --git a/src/views/mall/trade/order/DeliveryOrderForm.vue b/src/views/mall/trade/order/DeliveryOrderForm.vue new file mode 100644 index 00000000..579a376c --- /dev/null +++ b/src/views/mall/trade/order/DeliveryOrderForm.vue @@ -0,0 +1,93 @@ + + diff --git a/src/views/mall/trade/order/OrderRemarksForm.vue b/src/views/mall/trade/order/OrderRemarksForm.vue new file mode 100644 index 00000000..fdcf72dc --- /dev/null +++ b/src/views/mall/trade/order/OrderRemarksForm.vue @@ -0,0 +1,66 @@ + + diff --git a/src/views/mall/trade/order/detail/index.vue b/src/views/mall/trade/order/detail/index.vue index c8e00f99..dc5e4bcc 100644 --- a/src/views/mall/trade/order/detail/index.vue +++ b/src/views/mall/trade/order/detail/index.vue @@ -47,9 +47,9 @@ 调整价格 - 备注 + 备注 - 发货 + 发货 修改地址 @@ -212,17 +212,20 @@ + + diff --git a/src/views/mall/trade/order/testData.ts b/src/views/mall/trade/order/testData.ts deleted file mode 100644 index d4c92a15..00000000 --- a/src/views/mall/trade/order/testData.ts +++ /dev/null @@ -1,169 +0,0 @@ -import { OrderVO } from '@/api/mall/trade/order' - -export const testData: OrderVO = [ - { - id: 2, - no: '20230817002', - createTime: new Date('2023-08-17T11:30:00'), - type: 2, - terminal: 10, - userId: 1002, - userIp: '192.168.1.2', - userRemark: 'Urgent delivery required', - status: 20, - productCount: 2, - finishTime: null, - cancelTime: null, - cancelType: null, - remark: '', - payOrderId: 10002, - payed: false, - payTime: new Date('2023-08-17T12:30:00'), - payChannelCode: 'wx_app', - originalPrice: 80, - orderPrice: 80, - discountPrice: 0, - deliveryPrice: 5, - adjustPrice: 0, - payPrice: 85, - deliveryTemplateId: 2002, - logisticsId: null, - logisticsNo: '', - deliveryStatus: 0, - deliveryTime: null, - receiveTime: null, - receiverName: '李四', - receiverMobile: '19855568989', - receiverAreaId: 4002, - receiverPostCode: 54321, - receiverDetailAddress: '翻斗花园', - afterSaleStatus: 0, - refundPrice: 0, - couponId: null, - couponPrice: 0, - pointPrice: 0, - receiverAreaName: '北京市朝阳区', - items: [ - { - id: 103, - userId: 1002, - orderId: 2, - spuId: 5003, - spuName: '毛绒鸭子', - skuId: 6003, - picUrl: - 'http://127.0.0.1:48080/admin-api/infra/file/5/get/20220723041544165856414464011_BIG.jpg', - count: 1, - originalPrice: 40, - originalUnitPrice: 40, - discountPrice: 0, - payPrice: 40, - orderPartPrice: 40, - orderDividePrice: 40, - afterSaleStatus: 0, - properties: [ - { propertyId: 7001, propertyName: '颜色', valueId: 8004, valueName: '黄色' }, - { propertyId: 7002, propertyName: '尺寸', valueId: 8002, valueName: '小鸭子' } - ] - }, - { - id: 104, - userId: 1002, - orderId: 2, - spuId: 5004, - spuName: '毛绒鸭子', - skuId: 6004, - picUrl: - 'http://127.0.0.1:48080/admin-api/infra/file/5/get/20220723041544165856414464011_BIG.jpg', - count: 1, - originalPrice: 40, - originalUnitPrice: 40, - discountPrice: 0, - payPrice: 40, - orderPartPrice: 40, - orderDividePrice: 40, - afterSaleStatus: 0, - properties: [ - { propertyId: 7001, propertyName: '颜色', valueId: 8004, valueName: '黄色' }, - { propertyId: 7002, propertyName: '尺寸', valueId: 8002, valueName: '大鸭子' } - ] - } - ], - user: { - id: 1002, - nickname: '小妮子', - avatar: 'https://example.com/images/avatar.jpg' - } - }, - { - id: 3, - no: '20230817003', - createTime: new Date('2023-08-17T12:00:00'), - type: 1, - terminal: 10, - userId: 1003, - userIp: '192.168.1.3', - userRemark: '', - status: 10, - productCount: 1, - finishTime: new Date('2023-08-18T09:15:00'), - cancelTime: null, - cancelType: null, - remark: '', - payOrderId: 10003, - payed: true, - payTime: new Date('2023-08-17T12:30:00'), - payChannelCode: 'alipay_app', - originalPrice: 25, - orderPrice: 20, - discountPrice: 5, - deliveryPrice: 5, - adjustPrice: 0, - payPrice: 20, - deliveryTemplateId: 2001, - logisticsId: 3002, - logisticsNo: 'DEF987654', - deliveryStatus: 2, - deliveryTime: new Date('2023-08-18T10:30:00'), - receiveTime: new Date('2023-08-19T11:30:00'), - receiverName: '张三', - receiverMobile: '13988886656', - receiverAreaId: 4003, - receiverPostCode: 67890, - receiverDetailAddress: '成华大道', - afterSaleStatus: 0, - refundPrice: 0, - couponId: 2001, - couponPrice: 5, - pointPrice: 0, - receiverAreaName: '四川省成都市', - items: [ - { - id: 105, - userId: 1003, - orderId: 3, - spuId: 5005, - spuName: '华为', - skuId: 6005, - picUrl: 'http://127.0.0.1:48080/admin-api/infra/file/5/get/sj.jpg', - count: 1, - originalPrice: 20, - originalUnitPrice: 20, - discountPrice: 5, - payPrice: 15, - orderPartPrice: 15, - orderDividePrice: 15, - afterSaleStatus: 0, - properties: [ - { propertyId: 7001, propertyName: '颜色', valueId: 8006, valueName: '紫色' }, - { propertyId: 7002, propertyName: '选配', valueId: 8002, valueName: '标配' } - ] - } - ], - user: { - id: 1003, - nickname: '无敌最俊朗', - avatar: 'https://example.com/images/avatar.jpg' - } - } -] From 51738f8f6e60b59666c3c9ace97d251a051bcb14 Mon Sep 17 00:00:00 2001 From: owen Date: Tue, 22 Aug 2023 11:23:08 +0800 Subject: [PATCH 13/37] =?UTF-8?q?=E4=BC=9A=E5=91=98:=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BC=9A=E5=91=98=E7=AD=89=E7=BA=A7=EF=BC=8C=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E5=8D=95=E7=8B=AC=E7=9A=84=E8=A1=A8=E5=8D=95=E3=80=81=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/member/user/index.ts | 5 ++ src/views/member/user/UpdateLevelForm.vue | 101 ++++++++++++++++++++++ src/views/member/user/UserForm.vue | 26 +----- src/views/member/user/index.vue | 15 +++- 4 files changed, 121 insertions(+), 26 deletions(-) create mode 100644 src/views/member/user/UpdateLevelForm.vue diff --git a/src/api/member/user/index.ts b/src/api/member/user/index.ts index fbeaba93..2a6b6ccf 100644 --- a/src/api/member/user/index.ts +++ b/src/api/member/user/index.ts @@ -32,3 +32,8 @@ export const getUser = async (id: number) => { export const updateUser = async (data: UserVO) => { return await request.put({ url: `/member/user/update`, data }) } + +// 修改会员用户等级 +export const updateUserLevel = async (data: any) => { + return await request.put({ url: `/member/user/update-level`, data }) +} diff --git a/src/views/member/user/UpdateLevelForm.vue b/src/views/member/user/UpdateLevelForm.vue new file mode 100644 index 00000000..e583f4a9 --- /dev/null +++ b/src/views/member/user/UpdateLevelForm.vue @@ -0,0 +1,101 @@ + + diff --git a/src/views/member/user/UserForm.vue b/src/views/member/user/UserForm.vue index 0b7915a2..0da4ef61 100644 --- a/src/views/member/user/UserForm.vue +++ b/src/views/member/user/UserForm.vue @@ -60,22 +60,6 @@ - - - - - - - - - - - - @@ -95,7 +79,6 @@ import * as UserApi from '@/api/member/user' import * as AreaApi from '@/api/system/area' import { defaultProps } from '@/utils/tree' import MemberTagSelect from '@/views/member/tag/components/MemberTagSelect.vue' -import MemberLevelSelect from '@/views/member/level/components/MemberLevelSelect.vue' import MemberGroupSelect from '@/views/member/group/components/MemberGroupSelect.vue' const { t } = useI18n() // 国际化 @@ -118,18 +101,14 @@ const formData = ref({ birthday: undefined, mark: undefined, tagIds: [], - levelId: undefined, - levelReason: undefined, groupId: undefined }) const formRules = reactive({ mobile: [{ required: true, message: '手机号不能为空', trigger: 'blur' }], - status: [{ required: true, message: '状态不能为空', trigger: 'blur' }], - levelReason: [{ required: true, message: '修改原因不能为空', trigger: 'blur' }] + status: [{ required: true, message: '状态不能为空', trigger: 'blur' }] }) const formRef = ref() // 表单 Ref const areaList = ref([]) // 地区列表 -const originLevelId = ref() // 修改前的会员等级 /** 打开弹窗 */ const open = async (type: string, id?: number) => { @@ -142,7 +121,6 @@ const open = async (type: string, id?: number) => { formLoading.value = true try { formData.value = await UserApi.getUser(id) - originLevelId.value = formData.value.levelId } finally { formLoading.value = false } @@ -194,8 +172,6 @@ const resetForm = () => { birthday: undefined, mark: undefined, tagIds: [], - levelId: undefined, - levelReason: undefined, groupId: undefined } formRef.value?.resetFields() diff --git a/src/views/member/user/index.vue b/src/views/member/user/index.vue index 3a8e4259..8f0444c5 100644 --- a/src/views/member/user/index.vue +++ b/src/views/member/user/index.vue @@ -107,7 +107,7 @@ :formatter="dateFormatter" width="180px" /> - + @@ -131,6 +140,8 @@ + + diff --git a/src/views/mall/trade/order/components/OrderAdjustPriceForm.vue b/src/views/mall/trade/order/components/OrderAdjustPriceForm.vue new file mode 100644 index 00000000..3436cb63 --- /dev/null +++ b/src/views/mall/trade/order/components/OrderAdjustPriceForm.vue @@ -0,0 +1,89 @@ + + diff --git a/src/views/mall/trade/order/detail/index.vue b/src/views/mall/trade/order/components/OrderDetailForm.vue similarity index 81% rename from src/views/mall/trade/order/detail/index.vue rename to src/views/mall/trade/order/components/OrderDetailForm.vue index c72dd166..d1a61b2d 100644 --- a/src/views/mall/trade/order/detail/index.vue +++ b/src/views/mall/trade/order/components/OrderDetailForm.vue @@ -3,10 +3,11 @@ {{ orderInfo.no }} - 物流配送 - - 物流配送 - + + + + + 秒杀活动 @@ -37,22 +38,17 @@ - - + - 调整价格 + 调整价格 备注 发货 - - 修改地址 - + + 修改地址 + + 确认收货 - @@ -62,8 +58,6 @@ - - @@ -98,8 +92,6 @@ - - @@ -114,8 +106,7 @@ - - {{ formatToFraction(orderInfo.totalPrice - orderInfo.totalPrice) }}元 + {{ formatToFraction(orderInfo.couponPrice) }}元 @@ -149,7 +140,7 @@ - + @@ -210,15 +201,19 @@ - - + + + + From bb0c1cb536494f87b61e15323826cb2bbecb2099 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 22 Aug 2023 21:59:17 +0800 Subject: [PATCH 17/37] =?UTF-8?q?code=20review=EF=BC=9A=E4=BC=9A=E5=91=98?= =?UTF-8?q?=E7=AD=89=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/member/level/index.ts | 2 +- src/api/member/signin/config/index.ts | 10 +++++----- src/api/member/signin/record/index.ts | 2 +- src/views/member/group/GroupForm.vue | 6 +++--- .../member/group/components/MemberGroupSelect.vue | 1 - src/views/member/level/LevelForm.vue | 10 +++++----- .../member/level/components/MemberLevelSelect.vue | 1 - src/views/member/level/index.vue | 2 +- src/views/member/user/index.vue | 6 ++++-- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/api/member/level/index.ts b/src/api/member/level/index.ts index a284fd2d..540bfe4b 100644 --- a/src/api/member/level/index.ts +++ b/src/api/member/level/index.ts @@ -5,7 +5,7 @@ export interface LevelVO { name: string experience: number value: number - discount: number + discountPercent: number icon: string bgUrl: string status: number diff --git a/src/api/member/signin/config/index.ts b/src/api/member/signin/config/index.ts index 833c2e16..558bdc70 100644 --- a/src/api/member/signin/config/index.ts +++ b/src/api/member/signin/config/index.ts @@ -9,25 +9,25 @@ export interface SignInConfigVO { // 查询积分签到规则列表 export const getSignInConfigList = async () => { - return await request.get({ url: `/member/point/sign-in-config/list` }) + return await request.get({ url: `/member/sign-in/config/list` }) } // 查询积分签到规则详情 export const getSignInConfig = async (id: number) => { - return await request.get({ url: `/member/point/sign-in-config/get?id=` + id }) + return await request.get({ url: `/member/sign-in/config/get?id=` + id }) } // 新增积分签到规则 export const createSignInConfig = async (data: SignInConfigVO) => { - return await request.post({ url: `/member/point/sign-in-config/create`, data }) + return await request.post({ url: `/member/sign-in/config/create`, data }) } // 修改积分签到规则 export const updateSignInConfig = async (data: SignInConfigVO) => { - return await request.put({ url: `/member/point/sign-in-config/update`, data }) + return await request.put({ url: `/member/sign-in/config/update`, data }) } // 删除积分签到规则 export const deleteSignInConfig = async (id: number) => { - return await request.delete({ url: `/member/point/sign-in-config/delete?id=` + id }) + return await request.delete({ url: `/member/sign-in/config/delete?id=` + id }) } diff --git a/src/api/member/signin/record/index.ts b/src/api/member/signin/record/index.ts index 94df2029..7d137029 100644 --- a/src/api/member/signin/record/index.ts +++ b/src/api/member/signin/record/index.ts @@ -9,5 +9,5 @@ export interface SignInRecordVO { // 查询用户签到积分列表 export const getSignInRecordPage = async (params) => { - return await request.get({ url: `/member/point/sign-in-record/page`, params }) + return await request.get({ url: `/member/sign-in/record/page`, params }) } diff --git a/src/views/member/group/GroupForm.vue b/src/views/member/group/GroupForm.vue index 9788dbef..14510b0f 100644 --- a/src/views/member/group/GroupForm.vue +++ b/src/views/member/group/GroupForm.vue @@ -10,9 +10,6 @@ - - - + + + - + diff --git a/src/views/member/user/components/balance-list.vue b/src/views/member/user/components/balance-list.vue index 437714a0..3e9d1785 100644 --- a/src/views/member/user/components/balance-list.vue +++ b/src/views/member/user/components/balance-list.vue @@ -6,6 +6,7 @@ export default defineComponent({ }) + diff --git a/src/views/member/user/components/card-title.vue b/src/views/member/user/components/card-title.vue index 4bd3ee93..041c116a 100644 --- a/src/views/member/user/components/card-title.vue +++ b/src/views/member/user/components/card-title.vue @@ -1,8 +1,8 @@ + diff --git a/src/views/member/user/components/point-list.vue b/src/views/member/user/components/point-list.vue index 7a454562..2b2b98e4 100644 --- a/src/views/member/user/components/point-list.vue +++ b/src/views/member/user/components/point-list.vue @@ -100,13 +100,13 @@ import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { dateFormatter } from '@/utils/formatTime' import * as RecordApi from '@/api//member/point/record' -import { RecordQueryVO } from '@/api//member/point/record' defineOptions({ name: 'PointList' }) + const loading = ref(true) // 列表的加载中 const total = ref(0) // 列表的总页数 const list = ref([]) // 列表的数据 -const queryParams = reactive({ +const queryParams = reactive({ pageNo: 1, pageSize: 10, bizType: undefined, @@ -139,12 +139,15 @@ const resetQuery = () => { queryFormRef.value.resetFields() handleQuery() } + +// TODO @梦:改成 userId 哈 const { memberId } = defineProps({ memberId: { type: Number, required: true } }) + /** 初始化 **/ onMounted(() => { queryParams.userId = memberId diff --git a/src/views/member/user/components/sign-list.vue b/src/views/member/user/components/sign-list.vue index ee57a951..479e18a7 100644 --- a/src/views/member/user/components/sign-list.vue +++ b/src/views/member/user/components/sign-list.vue @@ -83,14 +83,13 @@ - diff --git a/src/views/member/user/detail/index.vue b/src/views/member/user/detail/index.vue index 38c8712c..569277d4 100644 --- a/src/views/member/user/detail/index.vue +++ b/src/views/member/user/detail/index.vue @@ -142,28 +142,25 @@ - - + diff --git a/src/views/mall/trade/order/components/DeliveryOrderForm.vue b/src/views/mall/trade/order/components/OrderDeliveryForm.vue similarity index 77% rename from src/views/mall/trade/order/components/DeliveryOrderForm.vue rename to src/views/mall/trade/order/components/OrderDeliveryForm.vue index b061341f..14f9411d 100644 --- a/src/views/mall/trade/order/components/DeliveryOrderForm.vue +++ b/src/views/mall/trade/order/components/OrderDeliveryForm.vue @@ -2,12 +2,12 @@ - - 快递物流 - 无需发货 + + 快递物流 + 无需发货 -