From 1b96cb80cad3e5dc1600adbdf557ca263e0a585e Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Sat, 18 Nov 2023 18:06:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=EF=BC=9A=E5=95=86=E6=88=B7?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=A7=AF=E5=88=86=E5=95=86=E5=93=81=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/marketing.js | 96 + src/api/product.js | 6 + src/router/modules/marketing.js | 36 + src/utils/timeOptions.js | 62 + .../integral/addProduct/copyRecord.vue | 102 + .../marketing/integral/addProduct/index.vue | 1715 +++++++++++++++++ .../marketing/integral/classify/index.vue | 143 ++ .../marketing/integral/orderList/index.vue | 560 ++++++ .../integral/orderList/orderDetails.vue | 622 ++++++ .../integral/productList/goodsList.vue | 153 ++ .../marketing/integral/productList/index.vue | 256 +++ src/views/order/index.vue | 3 +- 12 files changed, 3753 insertions(+), 1 deletion(-) create mode 100644 src/utils/timeOptions.js create mode 100644 src/views/marketing/integral/addProduct/copyRecord.vue create mode 100644 src/views/marketing/integral/addProduct/index.vue create mode 100644 src/views/marketing/integral/classify/index.vue create mode 100644 src/views/marketing/integral/orderList/index.vue create mode 100644 src/views/marketing/integral/orderList/orderDetails.vue create mode 100644 src/views/marketing/integral/productList/goodsList.vue create mode 100644 src/views/marketing/integral/productList/index.vue diff --git a/src/api/marketing.js b/src/api/marketing.js index c678776..de47655 100644 --- a/src/api/marketing.js +++ b/src/api/marketing.js @@ -488,3 +488,99 @@ export function holdIntegralList(data) { export function holdIntegralTitleApi() { return request.get(`integral/hold_list_title`) } + +// 积分商品分类 -- 列表 +export function integralCategoryListApi() { + return request.get('points/cate/lst') +} +// 积分商品分类 -- 新增表单 +export function integralCategoryCreateApi() { + return request.get('points/cate/create/form') +} + +// 积分商品分类 -- 编辑表单 +export function integralCategoryUpdateApi(id) { + return request.get(`points/cate/update/form/${id}`) +} + +// 积分商品分类 -- 删除 +export function integralCategoryDeleteApi(id) { + return request.delete(`points/cate/delete/${id}`) +} + +// 积分商品分类 -- 修改状态 +export function integralCategoryStatusApi(id, status) { + return request.post(`points/cate/status/${id}`, {status}) +} + +// 积分商品 -- 商品列表 +export function integralProList(data) { + return request.get(`points/product/lst`, data) +} + +// 积分商品 -- 删除 +export function integralProDeleteApi(id) { + return request.delete(`points/product/delete/${id}`) +} + +// 积分商品 -- 修改状态 +export function integralProductStatusApi(id, status) { + return request.post(`points/product/status/${id}`, {status}) +} + +// 积分商品 -- 创建商品 +export function createIntegralProduct(data) { + return request.post(`points/product/create`, data) +} +// 积分商品 -- 商品详情 +export function integralProDetailApi(id) { + return request.get(`points/product/detail/${id}`) +} +// 积分商品 -- 商品分类选择 +export function integralProCateSelect() { + return request.get(`points/cate/select`) +} +// 积分商品 -- 编辑商品 +export function integralProUpdateApi(id, data) { + return request.post(`points/product/update/${id}`, data) +} +// 积分商品列表 -- 立即生成规格 +export function generateAttrApi(id, data) { + return request.post(`points/product/get_attr_value/${id}`, data) +} +// 积分订单 -- 列表 +export function integralOrderLstApi(data) { + return request.get(`points/order/lst`, data) +} +// 积分订单 -- 导出 +export function integralOrderExcelApi(data) { + return request.get(`points/order/excel`, data) +} +// 积分订单 -- 快递公司列表 +export function expressOptionsApi(data) { + return request.get(`expr/options`) +} +// 积分订单 -- 发货 +export function integralDelivery(id, data) { + return request.post(`points/order/delivery/${id}`, data) +} +// 积分订单 -- 删除 +export function integralOrderDeleteApi(id) { + return request.delete(`points/order/delete/${id}`) +} +// 积分订单 -- 快递查询 +export function integralOrderExpressApi(id) { + return request.get(`points/order/express/${id}`) +} +// 积分订单 -- 详情 +export function integralOrderDetailApi(id) { + return request.get(`points/order/detail/${id}`) +} +// 积分订单 -- 订单记录 +export function integralOrderLog(id, data) { + return request.get(`points/order/status/${id}`, data) +} +// 积分订单 -- 备注 +export function integralMarkApi(id) { + return request.get(`points/order/mark/${id}/form`) +} diff --git a/src/api/product.js b/src/api/product.js index 233c21c..b37529b 100644 --- a/src/api/product.js +++ b/src/api/product.js @@ -140,6 +140,12 @@ export function categorySelectApi() { export function categoryListApi() { return request.get(`store/category/list`) } +/** + * @description 商户商品列表 -- 选择弹窗 + */ +export function merProductLstApi(data) { + return request.get(`store/product/list`, data) +} /** * @description 商品列表 -- 品牌分类 */ diff --git a/src/router/modules/marketing.js b/src/router/modules/marketing.js index 5ce7727..73a1f47 100644 --- a/src/router/modules/marketing.js +++ b/src/router/modules/marketing.js @@ -302,6 +302,42 @@ const marketingRouter = }, component: () => import('@/views/marketing/integral/log/index') }, + { + path: 'classify', + name: `integralClassify`, + meta: { + title: '积分商品分类', + noCache: true + }, + component: () => import('@/views/marketing/integral/classify/index') + }, + { + path: 'proList', + name: `integralProductList`, + meta: { + title: '积分商品列表', + noCache: true + }, + component: () => import('@/views/marketing/integral/productList/index') + }, + { + path: 'addProduct/:id?/:edit?', + name: `addIntegralProduct`, + meta: { + title: '添加积分商品', + noCache: true + }, + component: () => import('@/views/marketing/integral/addProduct/index') + }, + { + path: 'orderList', + name: `IntegralOrderList`, + meta: { + title: '兑换记录', + noCache: true + }, + component: () => import('@/views/marketing/integral/orderList/index') + }, { path: 'give', name: `integralGive`, diff --git a/src/utils/timeOptions.js b/src/utils/timeOptions.js new file mode 100644 index 0000000..f3a7155 --- /dev/null +++ b/src/utils/timeOptions.js @@ -0,0 +1,62 @@ + +export default { + shortcuts: [ + { + text: '今天', + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate())); + picker.$emit('pick', [start, end]); + }, + }, + { + text: '昨天', + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime( + start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1)), + ); + end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1))); + picker.$emit('pick', [start, end]); + }, + }, + { + text: '最近7天', + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); + picker.$emit('pick', [start, end]); + }, + }, + { + text: '最近30天', + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); + picker.$emit('pick', [start, end]); + }, + }, + { + text: '本月', + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), 1))); + picker.$emit('pick', [start, end]); + }, + }, + { + text: '本年', + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1))); + picker.$emit('pick', [start, end]); + }, + }, + ], +}; diff --git a/src/views/marketing/integral/addProduct/copyRecord.vue b/src/views/marketing/integral/addProduct/copyRecord.vue new file mode 100644 index 0000000..05be5fc --- /dev/null +++ b/src/views/marketing/integral/addProduct/copyRecord.vue @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/marketing/integral/addProduct/index.vue b/src/views/marketing/integral/addProduct/index.vue new file mode 100644 index 0000000..6b7618c --- /dev/null +++ b/src/views/marketing/integral/addProduct/index.vue @@ -0,0 +1,1715 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 开启 + 关闭 + + + + + + + 开启 + 关闭 + + + + + + + + + + + + + + + + + + + + 单规格 + 多规格 + + + + + + + + + + {{ item.value }} + + + + {{ j }} + + + + 添加 + + + + + + + + + + + + + + + + + 确定 + 取消 + + + + + 添加新规格 + 立即生成 + + + + + + + + + + {{oneFormBatch[0]['attr']}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量添加 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 删除 + + + + + + + + + + + + + + + + 上一步 + + 下一步 + + 提交 + + + + + + + + + + + + + + + + + + diff --git a/src/views/marketing/integral/classify/index.vue b/src/views/marketing/integral/classify/index.vue new file mode 100644 index 0000000..e13fa2b --- /dev/null +++ b/src/views/marketing/integral/classify/index.vue @@ -0,0 +1,143 @@ + + + + + 添加积分商品分类 + + + + + {{ scope.row.cate_name + ' [ ' + scope.row.store_category_id + ' ]' }} + + + + + + + + + + + + 编辑 + 删除 + + + + + + + + + + diff --git a/src/views/marketing/integral/orderList/index.vue b/src/views/marketing/integral/orderList/index.vue new file mode 100644 index 0000000..698d00e --- /dev/null +++ b/src/views/marketing/integral/orderList/index.vue @@ -0,0 +1,560 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 导出 + + + + + + + + + {{ props.row.mark | filterEmpty }} + + + {{ props.row.remark | filterEmpty }} + + + + + + + + 用户已删除 + + + + + + + + + + {{ val.cart_info.product.store_name + ' | ' }}{{ val.cart_info.productAttr.sku }} + + {{ '¥'+ val.cart_info.productAttr.price + ' x '+ val.product_num }} + (-{{ val.product_num - val.refund_num }}) + + + + + + + + + + 待付款 + + {{ scope.row.status | integralOrderStatus }} + + + 已删除 + + + + + {{ scope.row.create_time }} + + + + + 发送货 + 订单详情 + 删除 + + + + + + + + + + + + + + 手动发货 + 无需物流 + 自己配送 + + + + + + + + + + + + + + + + + + + + + + + 取 消 + 提交 + + + + + + + + + + diff --git a/src/views/marketing/integral/orderList/orderDetails.vue b/src/views/marketing/integral/orderList/orderDetails.vue new file mode 100644 index 0000000..ba0a7e3 --- /dev/null +++ b/src/views/marketing/integral/orderList/orderDetails.vue @@ -0,0 +1,622 @@ + + + + + + + + + 普通订单 + + 订单编号:{{ orderDetailList.order_sn }} + + + + 发送货 + 备注 + + + + + 订单状态 + + 用户已删除 + 待付款 + + {{ orderDetailList.status | integralOrderStatus }} + + + + + 实际支付 + {{ !orderDetailList.pay_time ? '-' : orderDetailList.integral+'个积分+'+orderDetailList.pay_price+'元' }} + + + 支付方式 + 积分+{{ orderDetailList.pay_type | payTypeFilter }}支付 + - + + + 支付时间 + {{ orderDetailList.create_time }} + + + + + + + 用户信息 + + + 用户昵称: + + {{ + orderDetailList.user.real_name ? orderDetailList.user.real_name : orderDetailList.user.nickname + }} + + + + 用户ID: + {{ orderDetailList.user.uid ? orderDetailList.user.uid : '-' }} + + + 绑定电话: + {{ orderDetailList.user.phone ? orderDetailList.user.phone : '-' }} + + + + + 收货信息 + + + 收货人: + {{ orderDetailList.real_name ? orderDetailList.real_name : '-' }} + + + 收货电话: + {{ orderDetailList.user_phone ? orderDetailList.user_phone : '-' }} + + + 收货地址: + {{ orderDetailList.user_address ? orderDetailList.user_address : '-' }} + + + + + 订单信息 + + + 创建时间: + {{ orderDetailList.create_time ? orderDetailList.create_time : '-' }} + + + 商品总数: + {{ orderDetailList.total_num ? orderDetailList.total_num : '-' }} + + + 实际支付: + {{ !orderDetailList.pay_time ? '-' : orderDetailList.integral+'个积分+'+orderDetailList.pay_price+'元' }} + + + 积分抵扣: + 使用了{{ orderDetailList.integral }}个积分 + + + 订单总价: + {{ orderDetailList.total_price ? orderDetailList.total_price : '-' }} + + + + + 物流信息 + + + 快递公司: + {{ orderDetailList.delivery_name ? orderDetailList.delivery_name : '-' }} + + + 快递单号: + {{ orderDetailList.delivery_id ? orderDetailList.delivery_id : '-' }} + 物流查询 + + + + + 买家留言 + + + {{ orderDetailList.mark ? orderDetailList.mark : '-' }} + + + + + 商家备注 + + + {{ orderDetailList.remark ? orderDetailList.remark : '-' }} + + + + + + + + + + + + + + {{ scope.row.cart_info.product.store_name }} + + 规格:{{ + scope.row.cart_info.productAttr.sku ? scope.row.cart_info.productAttr.sku : '默认' + }} + + + + + + + + + + {{ scope.row.cart_info.productAttr.price ? scope.row.cart_info.productAttr.price : '-' }} + + + + + + + + + {{ scope.row.product_price ? scope.row.product_price+'元' : '-' }} + + + + + + + + + {{ scope.row.integral_total ? scope.row.integral_total+'积分' : '-' }} + + + + + + + + + {{ scope.row.product_num }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ scope.row.order_sn }} + + + + + {{ scope.row.change_message }} + + + + + + {{ operationType(scope.row.user_type) }} + + + + + + + {{ scope.row.nickname }} + + + + + + + {{ scope.row.change_time }} + + + + + + + + + + + + + + + + 物流公司:{{ orderDetailList.delivery_name }} + 物流单号:{{ orderDetailList.delivery_id }} + + + + + + + + + + + + + + + + + diff --git a/src/views/marketing/integral/productList/goodsList.vue b/src/views/marketing/integral/productList/goodsList.vue new file mode 100644 index 0000000..75e62a8 --- /dev/null +++ b/src/views/marketing/integral/productList/goodsList.vue @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + +   + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/marketing/integral/productList/index.vue b/src/views/marketing/integral/productList/index.vue new file mode 100644 index 0000000..d811065 --- /dev/null +++ b/src/views/marketing/integral/productList/index.vue @@ -0,0 +1,256 @@ + + + + + + + + + + + + + + + + + + + 查询 + 重置 + + + + + 添加积分商品 + + 快速添加 + + + + + + + + + + + + + + + + + + + + + + + 兑换记录 + + + 编辑 + + + 复制 + + 删除 + + + + + + + + + + + + + + + diff --git a/src/views/order/index.vue b/src/views/order/index.vue index 622438e..c41a431 100644 --- a/src/views/order/index.vue +++ b/src/views/order/index.vue @@ -738,7 +738,8 @@ export default { this.isDump = res.data.crmeb_serve_dump if (res.data.crmeb_serve_dump == 1) this.getEleTempData() }).catch((res) => { - this.$message.error(res.message) + console.log(res); + // this.$message.error(res.message) }) }, // 获取快递公司列表