From aa098ee9bb179cdd88cebb815e37bb202699366b Mon Sep 17 00:00:00 2001
From: chen-xin-zhi <3588068430@qq.com>
Date: Thu, 20 Feb 2025 21:50:31 +0800
Subject: [PATCH] Changes
---
package-lock.json | 1 +
package.json | 1 +
src/layout/components/Aside.vue | 15 +-
src/layout/components/DatePicker.vue | 63 ++++
src/layout/components/TimePicker.vue | 59 ++++
src/layout/js/validUtils.js | 10 +
src/router/routes.ts | 5 +
src/views/Orders/OrderList.vue | 37 ++-
src/views/Orders/PendingServiceOrderList.vue | 315 +++++++++++++++++++
src/views/Orders/ServiceOrderList.vue | 48 +--
10 files changed, 517 insertions(+), 37 deletions(-)
create mode 100644 src/layout/components/DatePicker.vue
create mode 100644 src/layout/components/TimePicker.vue
create mode 100644 src/layout/js/validUtils.js
create mode 100644 src/views/Orders/PendingServiceOrderList.vue
diff --git a/package-lock.json b/package-lock.json
index 3e7def7..8c75515 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,6 +10,7 @@
"dependencies": {
"@element-plus/icons-vue": "^2.3.1",
"axios": "^1.7.2",
+ "dayjs": "^1.11.13",
"element-plus": "^2.9.0",
"mitt": "^3.0.1",
"pinia": "^2.2.4",
diff --git a/package.json b/package.json
index 0ac6cc2..dd0c6c0 100644
--- a/package.json
+++ b/package.json
@@ -13,6 +13,7 @@
"dependencies": {
"@element-plus/icons-vue": "^2.3.1",
"axios": "^1.7.2",
+ "dayjs": "^1.11.13",
"element-plus": "^2.9.0",
"mitt": "^3.0.1",
"pinia": "^2.2.4",
diff --git a/src/layout/components/Aside.vue b/src/layout/components/Aside.vue
index b1655a8..c8513a9 100644
--- a/src/layout/components/Aside.vue
+++ b/src/layout/components/Aside.vue
@@ -103,6 +103,12 @@
服务类商品订单列表
+
+
+
+ 服务类商品待处理订单列表
+
+
@@ -166,7 +172,6 @@
import {ref} from 'vue'
import { defineProps } from 'vue';
import emitter from '@/utils/emitter'
-import router from '@/router';
import {List} from "@element-plus/icons-vue";
defineProps(['send-data'])
@@ -174,9 +179,9 @@ const showLog = ref(true)
const isCollapse = ref(false)
const isShow = ref(true)
-const sideWidth = ref(200)
+const sideWidth = ref(250)
const AsideObj = ref({
- width: '200px'
+ width: '250px'
})
emitter.on('Aside', (value:any) => {
@@ -187,10 +192,10 @@ emitter.on('Aside', (value:any) => {
isShow.value = false
sideWidth.value = 64
}else{
- AsideObj.value.width = '200px'
+ AsideObj.value.width = '250px'
isCollapse.value = false
isShow.value = true
- sideWidth.value = 200
+ sideWidth.value = 250
}
})
diff --git a/src/layout/components/DatePicker.vue b/src/layout/components/DatePicker.vue
new file mode 100644
index 0000000..1a21c8e
--- /dev/null
+++ b/src/layout/components/DatePicker.vue
@@ -0,0 +1,63 @@
+
+
+ 预约日期:
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/layout/components/TimePicker.vue b/src/layout/components/TimePicker.vue
new file mode 100644
index 0000000..feb979e
--- /dev/null
+++ b/src/layout/components/TimePicker.vue
@@ -0,0 +1,59 @@
+
+
+ 预约时间段:
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/layout/js/validUtils.js b/src/layout/js/validUtils.js
new file mode 100644
index 0000000..221bf8b
--- /dev/null
+++ b/src/layout/js/validUtils.js
@@ -0,0 +1,10 @@
+export const checkObjectProperties = (obj) => {
+ for (let prop in obj) {
+ // 检查属性值是否为空
+ if (obj[prop] === null || obj[prop] === undefined || obj[prop] === '') {
+ console.log(`属性 "${prop}" 值为空`);
+ return true; // 如果找到一个属性为空,返回 true
+ }
+ }
+ return false; // 如果所有属性都非空,返回 false
+}
\ No newline at end of file
diff --git a/src/router/routes.ts b/src/router/routes.ts
index 8e24cd6..345a77a 100644
--- a/src/router/routes.ts
+++ b/src/router/routes.ts
@@ -55,6 +55,11 @@ export const routes = [
name: '服务类订单列表',
component: ()=> import("../views/Orders/ServiceOrderList.vue")
},
+ {
+ path: '/PendingServiceOrderList',
+ name: '服务类商品待处理订单',
+ component: ()=> import("../views/Orders/PendingServiceOrderList.vue")
+ },
{
path: '/AddCoupons',
name:'添加优惠券',
diff --git a/src/views/Orders/OrderList.vue b/src/views/Orders/OrderList.vue
index 1603342..2997f39 100644
--- a/src/views/Orders/OrderList.vue
+++ b/src/views/Orders/OrderList.vue
@@ -1,14 +1,14 @@
-
-
-
搜索
-
重置
+
+
+ 搜索
+ 重置
+ :header-cell-style="{ 'text-align': 'center' }" :row-style="{ height: '70px' }">
@@ -21,7 +21,7 @@
-
+
@@ -45,7 +45,7 @@
-
+
@@ -60,9 +60,9 @@
发货
-
- 取消订单
-
+
+
+
退款
@@ -175,7 +175,7 @@ const shipment:any = ref({
})//物流单号
const DialogVisible = ref(false); //详情展示
const shipments = ref(false)
-const name = ref('')
+const orderNumber = ref('')
const searchParams: any = ref({ //封装分页
current: 1, //当前页码
pageSize: 5, //每页显示条数
@@ -201,6 +201,7 @@ const handleSelectionChange = (row: any) => {
//获取订单列表
const getOrderList = async () => {
try {
+ searchParams.value.orderNumber = orderNumber.value
const res = await myAxios.post('/order/list/page', { ...searchParams.value });
// console.log('订单信息--->', res.data.data);
if (res.data.code === 1) {
@@ -269,7 +270,7 @@ const deleteOrder = async (row : any) => { //微信退款
},10000)
}
const reset = () => { //重置搜索框
- name.value = '';
+ orderNumber.value = '';
};
const load = () => { } //搜索的方法
const cancelOrder = async (row:any)=>{ //取消订单的方法(未支付能取消)
@@ -284,4 +285,12 @@ const cancelOrder = async (row:any)=>{ //取消订单的方法(未支付能取
}
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/views/Orders/PendingServiceOrderList.vue b/src/views/Orders/PendingServiceOrderList.vue
new file mode 100644
index 0000000..d6ea4ec
--- /dev/null
+++ b/src/views/Orders/PendingServiceOrderList.vue
@@ -0,0 +1,315 @@
+
+
+
+
+ 商品编号:
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+ {{ $index + 1 }}
+
+
+
+
+
+
+
![]()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 详情
+
+
+ 退款
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/Orders/ServiceOrderList.vue b/src/views/Orders/ServiceOrderList.vue
index 0884182..5f0f822 100644
--- a/src/views/Orders/ServiceOrderList.vue
+++ b/src/views/Orders/ServiceOrderList.vue
@@ -1,14 +1,14 @@
-
-
-
搜索
-
重置
+
+
+ 搜索
+ 重置
+ :header-cell-style="{ 'text-align': 'center' }" :row-style="{ height: '70px' }">
@@ -21,7 +21,7 @@
-
+
@@ -45,7 +45,7 @@
-
+
@@ -56,12 +56,12 @@
详情
-
- 发货
-
-
- 取消订单
-
+
+
+
+
+
+
退款
@@ -148,6 +148,7 @@ import { onMounted, ref } from "vue";
import myAxios from "@/api/myAxios";
import { ElMessage } from "element-plus";
import { SuccessInfo , ErrorInfo } from "@/utils/messageInfo";
+import emitter from "@/utils/emitter";
const tableData: any = ref([]); //表单展示数据
const total = ref(0);
const title = ref('')
@@ -158,7 +159,7 @@ const shipment:any = ref({
})//物流单号
const DialogVisible = ref(false); //详情展示
const shipments = ref(false)
-const name = ref('')
+const orderNumber = ref('')
const searchParams: any = ref({ //封装分页
current: 1, //当前页码
pageSize: 5, //每页显示条数
@@ -184,6 +185,7 @@ const handleSelectionChange = (row: any) => {
//获取订单列表
const getOrderList = async () => {
try {
+ searchParams.value.orderNumber = orderNumber.value
const res = await myAxios.post('/order/list/page', { ...searchParams.value });
// console.log('订单信息--->', res.data.data);
if (res.data.code === 1) {
@@ -253,9 +255,11 @@ const deleteOrder = async (row : any) => { //微信退款
},10000)
}
const reset = () => { //重置搜索框
- name.value = '';
+ orderNumber.value = ''
};
-const load = () => { } //搜索的方法
+const load = () => {
+ getOrderList()
+} //搜索的方法
const cancelOrder = async (row:any)=>{ //取消订单的方法(未支付能取消)
console.log('点击的这一行--->',row);
const res = await myAxios.post('/order/cancel/id',{ id: row.id })
@@ -268,4 +272,12 @@ const cancelOrder = async (row:any)=>{ //取消订单的方法(未支付能取
}
-
\ No newline at end of file
+
\ No newline at end of file