From 9769a6a64088f3769eb38e48f546ee8a346f9e7d Mon Sep 17 00:00:00 2001
From: wangfukang <15630117759@163.com>
Date: Fri, 31 Jul 2026 17:21:12 +0800
Subject: [PATCH] 1
---
src/api/campus.js | 23 +
src/api/index.js | 5 +
src/views/app/business/courier/courier.vue | 53 +-
.../app/business/courier/logisticsAddress.vue | 42 +-
.../business/deliverytruck/deliveryTruck.vue | 1197 ++++++++---------
.../app/business/logistics/logistics.vue | 156 ++-
src/views/app/business/luckey/luckey.vue | 50 +-
.../app/data-statistics/data-statistics.vue | 86 +-
src/views/app/shop/logisticsAddress.vue | 42 +-
.../sys/order-manage/logisticsAddress.vue | 60 +-
src/views/sys/order-manage/orderManage.vue | 45 +-
11 files changed, 1018 insertions(+), 741 deletions(-)
create mode 100644 src/api/campus.js
diff --git a/src/api/campus.js b/src/api/campus.js
new file mode 100644
index 0000000..603cb0e
--- /dev/null
+++ b/src/api/campus.js
@@ -0,0 +1,23 @@
+import { getRequest, postBodyRequest } from '@/libs/axios';
+
+const PREFIX = '/app/campus/admin';
+
+export const campusCategoryList = (params) => getRequest(`${PREFIX}/categories`, params);
+export const campusCategorySave = (params) => postBodyRequest(`${PREFIX}/categories`, params);
+export const campusCategoryDelete = (id) => postBodyRequest(`${PREFIX}/categories/delete?id=${id}`, {});
+export const campusCategoryStatus = (params) => postBodyRequest(`${PREFIX}/categories/status`, params);
+
+export const campusWallPostPage = (params) => postBodyRequest(`${PREFIX}/wall/posts/page`, params);
+export const campusPartnerPostPage = (params) => postBodyRequest(`${PREFIX}/partner/posts/page`, params);
+export const campusPostStatus = (params) => postBodyRequest(`${PREFIX}/posts/status`, params);
+export const campusPostComments = (id, params) => getRequest(`${PREFIX}/posts/${id}/comments/page`, params);
+export const campusCommentDelete = (id) => postBodyRequest(`${PREFIX}/comments/${id}/delete`, {});
+
+export const campusComplaintPage = (params) => postBodyRequest(`${PREFIX}/complaints/page`, params);
+export const campusComplaintHandle = (params) => postBodyRequest(`${PREFIX}/complaints/handle`, params);
+export const campusComplaintUnblock = (params) => postBodyRequest(`${PREFIX}/complaints/unblock`, params);
+
+export const campusUserLimitPage = (params) => postBodyRequest(`${PREFIX}/users/limits/page`, params);
+export const campusUserLimitSave = (params) => postBodyRequest(`${PREFIX}/users/limits`, params);
+export const campusAdminLogPage = (params) => postBodyRequest(`${PREFIX}/logs/page`, params);
+export const campusAuditLogPage = (params) => getRequest(`${PREFIX}/audit-logs/page`, params);
diff --git a/src/api/index.js b/src/api/index.js
index 6421d50..3f24f13 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -712,6 +712,11 @@ export const disableWorker = (id, params) => {
return postRequest(`/worker/admin/disable/${id}`, params)
}
+// 设置配送员全职状态
+export const setWorkerFullTime = (id, params) => {
+ return postRequest(`/worker/admin/fullTime/${id}`, params)
+}
+
// 抢单工上线
export const onLineWorker = (params) => {
return postRequest(`/worker/onLine`, params)
diff --git a/src/views/app/business/courier/courier.vue b/src/views/app/business/courier/courier.vue
index f97c2df..82cf429 100644
--- a/src/views/app/business/courier/courier.vue
+++ b/src/views/app/business/courier/courier.vue
@@ -102,6 +102,7 @@
deleteWorker,
offLineWorker,
onLineWorker,
+ setWorkerFullTime,
getWorkerRelaPriceByWorkerId,
} from "@/api/index";
import {
@@ -195,6 +196,19 @@
title: "配送员名称",
key: "workerName",
minWidth: 125,
+ render: (h, params) => {
+ return h("div", [
+ h("div", params.row.workerName || "-"),
+ h("Tag", {
+ props: {
+ color: params.row.isFullTime == 1 ? "green" : "default",
+ },
+ style: {
+ marginTop: "4px",
+ },
+ }, params.row.isFullTime == 1 ? "全职配送员" : "非全职配送员"),
+ ]);
+ },
},
{
title: "佣金余额(元)",
@@ -334,7 +348,7 @@
{
title: "操作",
key: "action",
- width: 260,
+ width: 340,
align: "center",
fixed: "right",
render: (h, params) => {
@@ -396,6 +410,17 @@
"上线"
);
}
+ const fullTimeText = params.row.isFullTime == 1 ? "取消全职" : "设置全职";
+ const fullTimeAction = h(
+ "a", {
+ on: {
+ click: () => {
+ this.changeFullTime(params.row);
+ },
+ },
+ },
+ fullTimeText
+ );
return h("div", [
/* h(
"a", {
@@ -449,6 +474,12 @@
},
"接单规则"
),
+ h("Divider", {
+ props: {
+ type: "vertical",
+ },
+ }),
+ fullTimeAction,
]);
},
},
@@ -759,6 +790,26 @@
},
});
},
+ changeFullTime(v) {
+ const isFullTime = v.isFullTime == 1 ? 0 : 1;
+ const actionText = isFullTime == 1 ? "设置为全职配送员" : "取消全职配送员";
+ this.$Modal.confirm({
+ title: actionText,
+ content: "您确认要将配送员 " + v.workerName + " " + actionText + "吗?",
+ loading: true,
+ onOk: () => {
+ setWorkerFullTime(v.workerId, {
+ isFullTime
+ }).then((res) => {
+ this.$Modal.remove();
+ if (res.success) {
+ this.$Message.success("操作成功");
+ this.getDataList();
+ }
+ });
+ },
+ });
+ },
remove(v) {
this.$Modal.confirm({
title: "确认删除",
diff --git a/src/views/app/business/courier/logisticsAddress.vue b/src/views/app/business/courier/logisticsAddress.vue
index f99db43..5100f5a 100644
--- a/src/views/app/business/courier/logisticsAddress.vue
+++ b/src/views/app/business/courier/logisticsAddress.vue
@@ -15,6 +15,14 @@
+
+
+
+
+
+
@@ -24,8 +32,6 @@
deleteComment,
getCommentList
} from "@/api/app";
- import "viewerjs/dist/viewer.css";
- import Viewer from "viewerjs";
export default {
name: "logisticsAddress",
components: {
@@ -45,6 +51,8 @@
selectList: [], // 多选数据
replyVisible: false,
replyList: [],
+ previewVisible: false,
+ previewImage: "",
replyColumns: [
{
type: "index",
@@ -111,7 +119,7 @@
key: "picture",
minWidth: 125,
render: (h, params) => {
-
+ if (!params.row.picture) return h("span", "-");
return h("img", {
attrs: {
src: params.row.picture,
@@ -124,7 +132,8 @@
"object-fit": "contain",
},
on: {
- click: () => {
+ click: (event) => {
+ event.stopPropagation();
this.showPic(params.row.picture);
},
},
@@ -239,17 +248,12 @@
return content;
},
showPic(v) {
- if(v == ''){
- this.$Message.warning("没有评价图");return
+ if (!v) {
+ this.$Message.warning("没有评价图");
+ return;
}
- let image = new Image();
- image.src = v;
- let viewer = new Viewer(image, {
- hidden: function() {
- viewer.destroy();
- },
- });
- viewer.show();
+ this.previewImage = v;
+ this.previewVisible = true;
},
formatDateTime(isoString) {
if (!isoString) return ''
@@ -289,4 +293,14 @@
\ No newline at end of file
diff --git a/src/views/app/business/deliverytruck/deliveryTruck.vue b/src/views/app/business/deliverytruck/deliveryTruck.vue
index d38308c..b0ec2e8 100644
--- a/src/views/app/business/deliverytruck/deliveryTruck.vue
+++ b/src/views/app/business/deliverytruck/deliveryTruck.vue
@@ -1,701 +1,598 @@
-
-
-
-
-
-
-
-
-
-
- 刷新
- 导出所选数据
- 导出全部数据
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 默认
- 宽松
- 紧密
-
-
-
-
-
-
- 已选择
- {{ selectList.length }} 项
- 清空
-
-
-
-
-
+
+
+
+
+
+
+
+
+ changePage('category', p)" @on-page-size-change="s => changePageSize('category', s)" />
+
+
+
+
+
+ changePage('wall', p)" @on-page-size-change="s => changePageSize('wall', s)" />
+
+
+
+
+
+ changePage('partner', p)" @on-page-size-change="s => changePageSize('partner', s)" />
+
+
+
+
+
+ changePage('complaint', p)" @on-page-size-change="s => changePageSize('complaint', s)" />
+
+
+
+
+
+
+
+
-
-
-
{{ statistics.grossFlowAmount }}
-
流水总金额(元)
+
+ 流水总金额(元)
+
+
+
+ 商品价格+打包费+配送费
+
+
+
@@ -89,7 +105,15 @@
{{ statistics.effectiveFlowAmount }}
-
有效流水总金额(元)
+
+ 有效流水总金额(元)
+
+
+
+ 订单商品价格+打包费,再扣微信0.6%手续费
+
+
+
@@ -174,8 +198,17 @@
-
{{ statistics.actualIncomeAmount }}
-
实际所得(元)
+
{{ statistics.actualIncomeAmount }}
+
--
+
+ 实际所得(元)
+
+
+
+ 仅结束时间小于今天且范围不超过31天时计算
+
+
+
@@ -186,7 +219,15 @@
{{ statistics.headquartersDeductionAmount }}
-
总部扣点(元)
+
+ 总部扣点(元)
+
+
+
+ 有效流水总金额 * 0.01
+
+
+
@@ -482,6 +523,8 @@
couponDiscountAmount: "0.00",
customerAverageAmount: "0.00",
actualIncomeAmount: "0.00",
+ actualIncomeAvailable: false,
+ settledAmount: "0.00",
headquartersDeductionAmount: "0.00",
deliveryFeeAmount: "0.00",
smsCount: 0,
@@ -753,7 +796,36 @@
this.searchForm.startDate = v && v[0] ? v[0] : ""
this.searchForm.endDate = v && v[1] ? v[1] : ""
},
+ parseDateString(value) {
+ return value ? new Date(value.replace(/-/g, "/")) : null
+ },
+ rangeDays(startDate, endDate) {
+ const start = this.parseDateString(startDate)
+ const end = this.parseDateString(endDate)
+ if (!start || !end) {
+ return 0
+ }
+ return Math.floor((end.getTime() - start.getTime()) / (24 * 60 * 60 * 1000)) + 1
+ },
+ validateStatisticsRange() {
+ if (!this.searchForm.startDate || !this.searchForm.endDate) {
+ return true
+ }
+ const days = this.rangeDays(this.searchForm.startDate, this.searchForm.endDate)
+ if (days < 1) {
+ this.$Message.warning("结束日期不能小于开始日期")
+ return false
+ }
+ if (days > 31) {
+ this.$Message.warning("日期范围最多选择31天")
+ return false
+ }
+ return true
+ },
getDataList() {
+ if (!this.validateStatisticsRange()) {
+ return
+ }
this.statisticsLoading = true
const params = Object.assign({}, this.searchForm, {
regionId: this.resolveRegionId()
diff --git a/src/views/app/shop/logisticsAddress.vue b/src/views/app/shop/logisticsAddress.vue
index a277914..2c971f0 100644
--- a/src/views/app/shop/logisticsAddress.vue
+++ b/src/views/app/shop/logisticsAddress.vue
@@ -15,6 +15,14 @@
+
+
+
+
+
+
@@ -24,8 +32,6 @@
deleteComment,
getCommentList
} from "@/api/app";
- import "viewerjs/dist/viewer.css";
- import Viewer from "viewerjs";
export default {
name: "logisticsAddress",
components: {
@@ -46,6 +52,8 @@
selectList: [], // 多选数据
replyVisible: false,
replyList: [],
+ previewVisible: false,
+ previewImage: "",
replyColumns: [
{
type: "index",
@@ -112,7 +120,7 @@
key: "picture",
minWidth: 125,
render: (h, params) => {
-
+ if (!params.row.picture) return h("span", "-");
return h("img", {
attrs: {
src: params.row.picture,
@@ -125,7 +133,8 @@
"object-fit": "contain",
},
on: {
- click: () => {
+ click: (event) => {
+ event.stopPropagation();
this.showPic(params.row.picture);
},
},
@@ -240,17 +249,12 @@
return content;
},
showPic(v) {
- if(v == ''){
- this.$Message.warning("没有评价图");return
+ if (!v) {
+ this.$Message.warning("没有评价图");
+ return;
}
- let image = new Image();
- image.src = v;
- let viewer = new Viewer(image, {
- hidden: function() {
- viewer.destroy();
- },
- });
- viewer.show();
+ this.previewImage = v;
+ this.previewVisible = true;
},
formatDateTime(isoString) {
if (!isoString) return ''
@@ -290,4 +294,14 @@
\ No newline at end of file
diff --git a/src/views/sys/order-manage/logisticsAddress.vue b/src/views/sys/order-manage/logisticsAddress.vue
index 9539fb4..3ca4b8c 100644
--- a/src/views/sys/order-manage/logisticsAddress.vue
+++ b/src/views/sys/order-manage/logisticsAddress.vue
@@ -32,16 +32,7 @@
备注:{{orderData.deliveryInfo.remark}}
-
+
商品信息
@@ -125,7 +116,8 @@
图片
-
+
@@ -150,6 +142,24 @@
+
+
+
+
![]()
+
+
+
+
+
@@ -174,7 +184,9 @@
returnFormData:{},
refundReason: "",
refundLoading: false,
- refundActionData: null
+ refundActionData: null,
+ previewVisible: false,
+ previewImage: ""
};
},
filters: {
@@ -351,6 +363,14 @@
}
return String(pictures).split(",").map((item) => item.trim()).filter((item) => item !== "");
},
+ showRefundPicture(picture) {
+ if (!picture) {
+ this.$Message.warning("没有退款/售后图片");
+ return;
+ }
+ this.previewImage = picture;
+ this.previewVisible = true;
+ },
getRefundTypeText(item) {
if (!item) return "";
if (item.refundType == 1) return "退商品";
@@ -555,6 +575,22 @@
margin-right: 8px;
border-radius: 4px;
object-fit: cover;
+ cursor: pointer;
+ }
+
+ .refund-image-preview {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
+ max-height: 70vh;
+ overflow: hidden;
+ }
+
+ .refund-image-preview img {
+ max-width: 100%;
+ max-height: 70vh;
+ object-fit: contain;
}
.text {
diff --git a/src/views/sys/order-manage/orderManage.vue b/src/views/sys/order-manage/orderManage.vue
index f601637..c733bf3 100644
--- a/src/views/sys/order-manage/orderManage.vue
+++ b/src/views/sys/order-manage/orderManage.vue
@@ -81,6 +81,21 @@
margin-top: 12px;
gap: 12px;
}
+
+ .refund-type-status-wrap {
+ display: inline-block;
+ max-width: 100%;
+ white-space: normal;
+ word-break: break-all;
+ line-height: 20px;
+ }
+
+ .search-date-row {
+ display: inline-flex;
+ align-items: flex-start;
+ white-space: nowrap;
+ vertical-align: top;
+ }
@@ -105,6 +120,16 @@
+
+
+
+
+
+
+
+
@@ -481,6 +506,8 @@
searchStatus:10,
shopName: "",
receiverPhone: "",
+ startDate: "",
+ endDate: "",
mobile:'',
userId: ""
},
@@ -683,7 +710,9 @@
width: 210,
align: "center",
render: (h, params) => {
- return h("span", this.getRefundTypeStatusText(params.row.refundTypeStatus));
+ return h("span", {
+ class: "refund-type-status-wrap"
+ }, this.getRefundTypeStatusText(params.row.refundTypeStatus));
}
},
{
@@ -722,7 +751,7 @@
render: (h, params) => {
const order = params.row.mallOrder || {};
const actionList = [
- h("a", {
+ /* h("a", {
style: {
marginRight: "8px"
},
@@ -731,7 +760,7 @@
this.showRefundGoods(params.row);
},
},
- }, order.otherOrder == 1 ? "快递/跑腿单" : "查看商品"),
+ }, order.otherOrder == 1 ? "快递/跑腿单" : "查看商品"), */
];
if (order && order.orderType != 1) {
actionList.push(
@@ -757,8 +786,8 @@
this.showOrderDetail(params.row);
},
},
- }, "查看详情"),
- h("a", {
+ }, "查看详情")
+ /* h("a", {
style: {
marginRight: "8px"
},
@@ -774,7 +803,7 @@
this.returnAmountAllow(params.row, 1);
},
},
- }, this.isSubmittingRefund(params.row) ? "处理中" : "同意"),
+ }, this.isSubmittingRefund(params.row) ? "处理中" : "同意"), */
);
return h("div", actionList);
},
@@ -1144,6 +1173,8 @@
this.searchForm.id = "";
this.searchForm.shopName = "";
this.searchForm.receiverPhone = "";
+ this.searchForm.startDate = "";
+ this.searchForm.endDate = "";
this.searchForm.pageNum = 1;
this.searchForm.pageSize = 10;
this.returnForm.pageNum = 1;
@@ -1190,7 +1221,7 @@
getRefundTypeStatusText(status) {
if (status == 1) return "商家原因";
if (status == 2) return "配送原因";
- if (status == 3) return "商家/配送都有原因(需要退配送费)";
+ if (status == 3) return "商家/配送都有原因";
if (status == 4) return "平台退款";
return "";
},