From a1a681c84ea0cb68340350443deb5fd06872e794 Mon Sep 17 00:00:00 2001
From: b2894lxlx <517289602@qq.com>
Date: Thu, 7 Aug 2025 22:53:18 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=B4=E8=B4=B9?=
=?UTF-8?q?=E8=AE=B0=E5=BD=95=E9=80=BE=E6=9C=9F=E5=A4=A9=E6=95=B0=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.development | 4 +-
src/api/order/model/index.ts | 1 +
.../yunxinwei/order/components/order-info.vue | 47 ++++++++++++-------
3 files changed, 34 insertions(+), 18 deletions(-)
diff --git a/.env.development b/.env.development
index 2ba80cb..408d2d3 100644
--- a/.env.development
+++ b/.env.development
@@ -1,7 +1,7 @@
VITE_APP_NAME=后台管理系统
#VITE_API_URL=http://localhost:9090/api
-#VITE_API_URL=http://yxw.wsdns.cn/api
+VITE_API_URL=http://yxw.wsdns.cn/api
#VITE_SOCKET_URL=ws://localhost:9190
-VITE_API_URL=http://127.0.0.1:9090/api
+#VITE_API_URL=http://127.0.0.1:9090/api
#VITE_API_URL=https://server.gxwebsoft.com/api
VITE_SOCKET_URL=wss://server.gxwebsoft.com
diff --git a/src/api/order/model/index.ts b/src/api/order/model/index.ts
index 3abf5f9..5980c39 100644
--- a/src/api/order/model/index.ts
+++ b/src/api/order/model/index.ts
@@ -35,6 +35,7 @@ export interface Order {
sortNumber?: number;
// 配送方式
deliveryType?: string;
+ payTime?: string;
// 付款状态
payStatus?: number;
expressPrice?: string;
diff --git a/src/views/yunxinwei/order/components/order-info.vue b/src/views/yunxinwei/order/components/order-info.vue
index 05b6181..c0f0dcc 100644
--- a/src/views/yunxinwei/order/components/order-info.vue
+++ b/src/views/yunxinwei/order/components/order-info.vue
@@ -267,9 +267,6 @@
电池押金:¥{{ record.batteryDeposit }}
电池保险:¥{{ record.batteryInsurance }}
-
- {{ expirationDay(record) }}
-
{{ countDuration(record) }}
@@ -278,7 +275,7 @@
-
+
- {{ record.orderNo }}
+ {{ record.orderNo }}
-
+
电池租金:¥{{ record.batteryRent }}
电池押金:¥{{ record.batteryDeposit }}
电池保险:¥{{ record.batteryInsurance }}
@@ -302,7 +304,14 @@
{{ record.expirationTime }}
- {{ expirationDay(record) }}
+ {{ expirationDay(record) }}
+ {{
+ expirationDay(record)
+ }}
@@ -454,6 +463,7 @@
import { listOrder, listOrderPay } from '@/api/order';
import { CopyOutlined } from '@ant-design/icons-vue';
import { EquipmentRecord } from '@/api/apps/equipment/record/model';
+ import dayjs from 'dayjs';
const useForm = Form.useForm;
// 是否开启响应式布局
@@ -809,15 +819,20 @@
// };
const expirationDay = (order) => {
- const setTime = new Date(order.expirationTime);
- const nowTime = new Date();
- const restSec = setTime.getTime() - nowTime.getTime();
- console.log('计算剩余天数');
- console.log(restSec);
- // 剩余天数
- const day = parseInt(String(restSec / (60 * 60 * 24 * 1000)));
- if (day < 0) {
- return '逾期' + Math.abs(day) + '天';
+ if (dayjs(order.expirationTime).isBefore(dayjs())) {
+ const useDay = dayjs(order.expirationTime).diff(
+ dayjs(props?.data?.payTime),
+ 'd'
+ );
+ return `使用${useDay}天`;
+ } else {
+ const day = dayjs(order.expirationTime).diff(dayjs(order.payTime), 'd');
+ if (day < 0) {
+ return '逾期' + Math.abs(day) + '天';
+ } else {
+ const useDay = dayjs().diff(dayjs(props?.data?.payTime), 'd');
+ return `使用${useDay}天`;
+ }
}
};
From 5146d52e467ff4ed8ab3b8e8229e5b3bbcddd012 Mon Sep 17 00:00:00 2001
From: b2894lxlx <517289602@qq.com>
Date: Thu, 7 Aug 2025 23:20:20 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=B4=E8=B4=B9?=
=?UTF-8?q?=E8=AE=B0=E5=BD=95=E9=80=BE=E6=9C=9F=E5=A4=A9=E6=95=B0=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/order/model/index.ts | 1 +
src/views/yunxinwei/order/index.vue | 116 +++++++++++++++++-----------
2 files changed, 70 insertions(+), 47 deletions(-)
diff --git a/src/api/order/model/index.ts b/src/api/order/model/index.ts
index 5980c39..804ec7c 100644
--- a/src/api/order/model/index.ts
+++ b/src/api/order/model/index.ts
@@ -119,6 +119,7 @@ export interface OrderPay {
currPeriods?:number;//当前期数
isAdminRenew?:number;//是否管理员学费
+ orderPays?: OrderPay[]
}
diff --git a/src/views/yunxinwei/order/index.vue b/src/views/yunxinwei/order/index.vue
index 1c5d68c..d88c6d1 100644
--- a/src/views/yunxinwei/order/index.vue
+++ b/src/views/yunxinwei/order/index.vue
@@ -31,10 +31,10 @@
{{
- record.restDay
+ record.restDay
}}
{{ record.restDay }}
- 天
+ 天
@@ -52,7 +52,8 @@
+ />
+
(含运费:¥{{ record.expressPrice }})
@@ -66,17 +67,17 @@
余额支付
+ >余额支付
+
微信支付
+ >微信支付
+
支付宝
+ >支付宝
+
通联支付
+ >通联支付
+
快递配送
@@ -88,37 +89,37 @@
未付款
+ >未付款
+
已付款
+ >已付款
+
未收货
已收货
+ >已收货
+
退租中
+ >退租中
+
已退租
+ >已退租
+
@@ -155,20 +156,20 @@
销售
+ >销售
+
分期
+ >分期
+
以租代购
+ >以租代购
+
租赁
+ >租赁
+
续租
+ >续租
+
@@ -179,26 +180,34 @@
{{ record.equipment?.equipmentCode }}
+
+ {{
+ record.orderPays && record.orderPays.length > 0
+ ? record.orderPays[record.orderPays.length - 1].expirationTime
+ : record.expirationTime
+ }}
+
{{ record.createTime }}
详情
+ >详情
+
换电
+ >换电
+
退租
+ >退租
+
@@ -270,6 +279,7 @@
import { getDictionaryOptions } from '@/utils/common';
import { Equipment } from '@/api/apps/equipment/model';
import { utils, writeFile } from 'xlsx';
+ import dayjs from "dayjs";
// 当前用户信息
// const userStore = useUserStore();
@@ -312,10 +322,10 @@
sorter: true
},
/* {
- title: '商品编号',
- dataIndex: 'goodsId',
- key: 'goodsId'
- }, */
+ title: '商品编号',
+ dataIndex: 'goodsId',
+ key: 'goodsId'
+ }, */
{
title: '电池型号',
dataIndex: 'batteryModel',
@@ -341,7 +351,6 @@
},
{
title: '到期时间',
- dataIndex: 'expirationTime',
key: 'expirationTime',
sorter: true
},
@@ -477,7 +486,7 @@
const showAdvancedSearch = ref(false);
// 表格数据源
- const datasource: DatasourceFunction = ({
+ const datasource: DatasourceFunction = async ({
page,
limit,
where,
@@ -500,12 +509,17 @@
where.tenantId = localStorage.getItem('tenantId');
where.isRenew = 0;
where.isFreeze = 1;
- return pageOrder({
+ const res = await pageOrder({
...where,
...orders,
page,
limit
});
+ res.list.map(item => {
+ item.restDay = calRestDay(item);
+ return item
+ })
+ return res
};
// 导出
const handleExport = () => {
@@ -600,6 +614,11 @@
showEdit.value = true;
};
+ const calRestDay = (row: Order) => {
+ if (!row.orderPays || row.orderPays.length == 0) return ''
+ return dayjs(row.orderPays[row.orderPays.length - 1].expirationTime).diff(dayjs(), 'd')
+ };
+
const onEditContent = (name, text, item) => {
orderId.value = item.orderId;
field.value = name;
@@ -716,6 +735,7 @@
p {
line-height: 0.8;
}
+
.sys-org-table :deep(.ant-table-body) {
overflow: auto !important;
overflow: overlay !important;
@@ -725,9 +745,11 @@
padding: 0 4px;
margin-bottom: 0;
}
+
.price-edit {
padding-right: 5px;
}
+
.comments {
max-width: 200px;
}
From 72194db4794f74e357dd431f8e2352d62c3a698f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com>
Date: Sat, 10 Jan 2026 00:31:15 +0800
Subject: [PATCH 3/3] =?UTF-8?q?feat(order):=20=E6=9B=B4=E6=96=B0API?=
=?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=92=8C=E8=AE=A2=E5=8D=95=E6=94=AF=E4=BB=98?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修改开发和生产环境配置文件中的API和WebSocket地址
- 添加updateOrderPay API方法用于更新订单支付信息
- 在订单信息组件中添加日期选择器用于修改开始和过期时间
- 实现订单过期天数计算逻辑的改进
- 添加数据保存成功提示消息
- 更新头像文件存储地址配置
---
.env.development | 5 +-
.env.production | 7 +-
src/api/order/index.ts | 8 +
src/views/oa/task/components/task-info.vue | 4 +-
src/views/user/task/components/task-info.vue | 4 +-
.../yunxinwei/order/components/order-info.vue | 60 +-
yarn.lock | 5816 +++++++++--------
7 files changed, 2990 insertions(+), 2914 deletions(-)
diff --git a/.env.development b/.env.development
index 408d2d3..116d930 100644
--- a/.env.development
+++ b/.env.development
@@ -1,7 +1,6 @@
VITE_APP_NAME=后台管理系统
#VITE_API_URL=http://localhost:9090/api
-VITE_API_URL=http://yxw.wsdns.cn/api
+VITE_API_URL=https://yxw-api.websoft.top/api
#VITE_SOCKET_URL=ws://localhost:9190
#VITE_API_URL=http://127.0.0.1:9090/api
-#VITE_API_URL=https://server.gxwebsoft.com/api
-VITE_SOCKET_URL=wss://server.gxwebsoft.com
+VITE_SOCKET_URL=wss://server.websoft.top
diff --git a/.env.production b/.env.production
index 14d05e2..b0e0570 100644
--- a/.env.production
+++ b/.env.production
@@ -1,6 +1,3 @@
VITE_APP_NAME=后台管理系统
-#VITE_API_URL=https://server.jimeigroup.cn/api
-#VITE_API_URL=https://server.gxwebsoft.com/api
-VITE_API_URL=http://yxw.wsdns.cn/api
-#VITE_API_URL=http://1.14.132.108:10032/api
-VITE_SOCKET_URL=wss://server.gxwebsoft.com
+VITE_API_URL=https://yxw-api.websoft.top/api
+VITE_SOCKET_URL=wss://server.websoft.top
diff --git a/src/api/order/index.ts b/src/api/order/index.ts
index 1fb2706..977e351 100644
--- a/src/api/order/index.ts
+++ b/src/api/order/index.ts
@@ -67,6 +67,14 @@ export async function addOrderPay(data: OrderPay) {
return Promise.reject(new Error(res.data.message));
}
+export async function updateOrderPay(data: OrderPay) {
+ const res = await request.put>('/shop/order-pay', data);
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
/**
* 根据id查询订单
*/
diff --git a/src/views/oa/task/components/task-info.vue b/src/views/oa/task/components/task-info.vue
index 8787b38..2a24962 100644
--- a/src/views/oa/task/components/task-info.vue
+++ b/src/views/oa/task/components/task-info.vue
@@ -119,7 +119,7 @@
回复
@@ -147,7 +147,7 @@
diff --git a/src/views/user/task/components/task-info.vue b/src/views/user/task/components/task-info.vue
index b705aaa..8bece25 100644
--- a/src/views/user/task/components/task-info.vue
+++ b/src/views/user/task/components/task-info.vue
@@ -115,7 +115,7 @@
回复
@@ -143,7 +143,7 @@
diff --git a/src/views/yunxinwei/order/components/order-info.vue b/src/views/yunxinwei/order/components/order-info.vue
index c0f0dcc..ad86221 100644
--- a/src/views/yunxinwei/order/components/order-info.vue
+++ b/src/views/yunxinwei/order/components/order-info.vue
@@ -283,7 +283,7 @@
ref="tableRef2"
:pagination="true"
>
-
+
- {{ record.startTime }}
- {{ record.expirationTime }}
+
+
{{ expirationDay(record) }}{{ expirationDay(record, index) }}
{{
- expirationDay(record)
+ expirationDay(record, index)
}}
@@ -444,13 +460,13 @@