From 5ea9e7951f171a581e9f3157730284a2dd947dfa Mon Sep 17 00:00:00 2001
From: gyq <875626088@qq.com>
Date: Sat, 16 Mar 2024 17:47:15 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AE=A2=E5=8D=95=E8=AF=A6?=
=?UTF-8?q?=E6=83=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.development | 2 +-
src/App.vue | 22 +
src/api/home.js | 5 +-
src/api/order.js | 12 +
src/views/home/home.vue | 400 +++++++++++++++++-
.../order_manage/components/orderDetail.vue | 334 +++++++++++++++
src/views/order_manage/order_list.vue | 24 +-
src/views/product/add_shop.vue | 9 +-
src/views/product/components/addGroup.vue | 2 +-
src/views/shop/components/shopInfo.vue | 4 +-
10 files changed, 790 insertions(+), 24 deletions(-)
create mode 100644 src/views/order_manage/components/orderDetail.vue
diff --git a/.env.development b/.env.development
index f97c926..4b22c0f 100644
--- a/.env.development
+++ b/.env.development
@@ -2,7 +2,7 @@ ENV = 'development'
# 接口地址
# VUE_APP_BASE_API = 'http://192.168.2.128:8000' // 刘一帆
-# VUE_APP_BASE_API = 'http://192.168.2.98:8000' // 公司测试
+# VUE_APP_BASE_API = 'https://405465h7n2.vicp.fun ' // 公司测试
# VUE_APP_BASE_API = 'http://192.168.2.96:8000' // 阿伟
VUE_APP_BASE_API = 'https://cashieradmin.sxczgkj.cn'
# VUE_APP_BASE_API = 'http://192.168.2.16:8000'
diff --git a/src/App.vue b/src/App.vue
index 9d9e72b..5089146 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -56,6 +56,28 @@ export default {
.shop_type_box {
display: flex;
+ &.disabled {
+ .item {
+ background-color: #f9f9f9;
+
+ &:hover {
+ cursor: not-allowed;
+ }
+
+ &.active {
+ border-color: #ececec;
+ }
+
+ .active_dot {
+ background-color: #ececec;
+ }
+
+ .s_title {
+ color: #999;
+ }
+ }
+ }
+
.item {
$borderColor: #1890FF;
margin-right: 14px;
diff --git a/src/api/home.js b/src/api/home.js
index 0a5f44b..9434a7b 100644
--- a/src/api/home.js
+++ b/src/api/home.js
@@ -62,14 +62,15 @@ export function dateAmount(day) {
* 商品销售排行
* @returns
*/
-export function dateProduct(day, page) {
+export function dateProduct(day, page, size) {
return request({
url: '/api/summary/dateProduct',
method: 'get',
params: {
shopId: localStorage.getItem('shopId'),
day: day,
- page: page
+ page: page,
+ size: size
}
})
}
diff --git a/src/api/order.js b/src/api/order.js
index 173db70..8c7f17a 100644
--- a/src/api/order.js
+++ b/src/api/order.js
@@ -31,4 +31,16 @@ export function tbOrderInfoDownload(data) {
},
responseType: 'blob'
})
+}
+
+/**
+ * 通过Id查询订单
+ * @param {*} id
+ * @returns
+ */
+export function tbOrderInfoDetail(id) {
+ return request({
+ url: `/api/tbOrderInfo/${id}`,
+ method: 'get'
+ })
}
\ No newline at end of file
diff --git a/src/views/home/home.vue b/src/views/home/home.vue
index 1b90abe..ed6e709 100644
--- a/src/views/home/home.vue
+++ b/src/views/home/home.vue
@@ -17,15 +17,25 @@
支付笔数
{{ topData.paymentsNumber }}
-
+
今日支付笔数{{ topData.paymentsNumberToday || 0 }}
+
+
+
{{ topData.totalVisits }}
+
+
+
今日访问 {{ topData.totalVisitsToday || 0 }}
+
+
{{ topData.totalUser }}
-
+
今日新增 {{ topData.userToday || 0 }}
@@ -52,7 +62,7 @@
-
+
近7天
30天
@@ -63,12 +73,14 @@
销售数量
{{ productCount }}
+
@@ -102,7 +114,7 @@
@@ -344,7 +711,7 @@ export default {
}
.row {
- height: 40px;
+ height: 50px;
color: #555;
font-size: 14px;
display: flex;
@@ -358,6 +725,15 @@ export default {
color: rgb(255, 85, 85);
margin-left: 4px;
}
+
+ .dot {
+ $size: 6px;
+ width: $size;
+ height: $size;
+ border-radius: 50%;
+ background-color: #1890FF;
+ margin-right: 6px;
+ }
}
}
}
@@ -391,6 +767,10 @@ export default {
font-size: 24px;
height: 60px;
}
+
+ .product_chart_wrap {
+ height: 50px;
+ }
}
}
diff --git a/src/views/order_manage/components/orderDetail.vue b/src/views/order_manage/components/orderDetail.vue
new file mode 100644
index 0000000..0822e25
--- /dev/null
+++ b/src/views/order_manage/components/orderDetail.vue
@@ -0,0 +1,334 @@
+
+
+
+
+
+
+
+
+
+
收款详情
+
+
商品金额:¥{{ detail.productAmount }}
+
打包费:{{ detail.packFee || '-' }}
+
+
+
订单原价:¥{{ detail.originAmount }}
+
优惠金额:¥{{ detail.userCouponAmount || '-' }}
+
实收金额:¥{{ detail.payAmount }}
+
+
+
退款金额:¥{{ detail.refundAmount }} 退款详情>
+
+
支付方式:现金
+
+
+
+
订单信息
+
+
订单编号:{{ detail.orderNo }}
+
订单类型:{{ detail.sendType | sendTypeFilter }}
+
创建时间:{{ detail.createdAt | timeFilter }}
+
+
+
设备名称:-
+
支付时间:{{ detail.paidTime | timeFilter }}
+
更新时间:{{ detail.updatedAt | timeFilter }}
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.productName }}
+
+
+
+
+
+ x{{ scope.row.num }}
+
+
+
+
+ ¥{{ scope.row.price }}/
+
+
+
+
+ ¥{{ scope.row.priceAmount }}
+
+
+
+
+
+
+
+
{{ item.createdAt | timeFilter }}
+
+
+
+
+ {{ val.productName }}
+
+
+ 退-{{ val.num }}
+
+
+ ¥{{ val.priceAmount }}
+
+
+ ¥-{{ val.priceAmount }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/order_manage/order_list.vue b/src/views/order_manage/order_list.vue
index 597c43f..34f0341 100644
--- a/src/views/order_manage/order_list.vue
+++ b/src/views/order_manage/order_list.vue
@@ -81,8 +81,10 @@
-
{{ item.productName }}
-
{{ item.productSkuName }}
+
{{ item.productName }} (退 - {{
+ item.num }})
+
{{ item.productSkuName }}
@@ -91,6 +93,9 @@
{{ scope.row.orderType | orderTypeFilter }}
+
+ 退款:-¥{{
+ scope.row.refundAmount }}
¥{{ scope.row.productAmount }}
@@ -109,6 +114,11 @@
{{ scope.row.createdAt | timeFilter }}
+
+
+ 详情
+
+
@@ -116,6 +126,7 @@
@current-change="paginationChange" @size-change="sizeChange"
layout="total, sizes, prev, pager, next, jumper">
+
@@ -125,7 +136,11 @@ import { tbShopPayTypeGet } from '@/api/setting'
import { tbOrderInfoData, tbOrderInfoDownload } from '@/api/order'
import dayjs from 'dayjs'
import { downloadFile } from '@/utils/index'
+
+import orderDetail from './components/orderDetail'
+
export default {
+ components: { orderDetail },
data() {
return {
orderEnum,
@@ -298,6 +313,11 @@ export default {
}
}
+.refund {
+ color: #FF9731;
+ font-weight: bold;
+}
+
.table_order_info {
.order_no {
color: #999;
diff --git a/src/views/product/add_shop.vue b/src/views/product/add_shop.vue
index d535bee..632e56f 100644
--- a/src/views/product/add_shop.vue
+++ b/src/views/product/add_shop.vue
@@ -2,7 +2,7 @@
-
+
{{ item.label }}
@@ -116,7 +116,7 @@
注:小程序商城必须设置库存数量大于0
-
+
@@ -423,10 +423,6 @@ export default {
})
this.selectSpecResult = true
}
-
- if (res.typeEnum == 'sku') {
- this.createSkuBody()
- }
} catch (error) {
console.log(error)
}
@@ -481,6 +477,7 @@ export default {
},
// 切换类型
changeTypeEnum(index) {
+ if (this.form.id) return
this.shopTypesActive = index
const typeEnum = this.shopTypes[index].typeEnum
this.form.typeEnum = typeEnum
diff --git a/src/views/product/components/addGroup.vue b/src/views/product/components/addGroup.vue
index 8408bcf..7aa8e14 100644
--- a/src/views/product/components/addGroup.vue
+++ b/src/views/product/components/addGroup.vue
@@ -7,7 +7,7 @@
-
+
添加商品
diff --git a/src/views/shop/components/shopInfo.vue b/src/views/shop/components/shopInfo.vue
index 03574ff..2ef1362 100644
--- a/src/views/shop/components/shopInfo.vue
+++ b/src/views/shop/components/shopInfo.vue
@@ -50,12 +50,12 @@
}" format="HH:mm" value-format="HH:mm">
-
+