From cc56a3a715ff104d056008d70c6148a989f53430 Mon Sep 17 00:00:00 2001 From: tianyi <13521030702@163.com> Date: Tue, 21 Apr 2026 18:02:49 +0800 Subject: [PATCH] 11 --- src/api/index.js | 19 +- src/views/app/business/courier/courier.vue | 49 ++--- .../app/business/logistics/logistics.vue | 71 +++++-- .../business/logistics/logisticsAddress.vue | 144 +++++++++----- .../sys/order-manage/logisticsAddress.vue | 187 ++++++++++++++++-- src/views/sys/order-manage/orderManage.vue | 84 +++++--- 6 files changed, 403 insertions(+), 151 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index 94ee873..c1dd75c 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -681,7 +681,7 @@ export const deleteOrder = (params) => { // 获取配送员 export const getWorkerListData = (params) => { - return postBodyRequest('/worker/getByCondition', params) + return postBodyRequest('/worker/getMatchingWorkerList', params) } // 创建订单 @@ -724,9 +724,19 @@ export const unbindOrder = (id, params) => { // 抢单操作 export const runshOrder = (params) => { - return postBodyRequest('/order/rush/order', params) + return postRequest('/mall/delivery/reassignWorker', params) } +// 订单详情 +export const getOrderDetail = (id,params) => { + return getRequest(`/mall/order/detail/${id}`, params) +} +// 售后订单详情 +export const getReturnOrderList = (params) => { + return postBodyRequest('/mall/refund/page', params) +} + + // 获取实时订单操作 export const getOwListData = (params) => { return postBodyRequest('/mall/delivery/page', params) @@ -743,6 +753,11 @@ export const orderScheduling = (params) => { export const returnOrder = (params) => { return postRequest('/mall/order/cancel', params) } +//同意/拒绝退款售后 +export const returnOrNoOrder = (params) => { + return postBodyRequest('/mall/refund/allowOrReject', params) +} + //查询物流自取 export const getSaleByCompanyId = (params) => { diff --git a/src/views/app/business/courier/courier.vue b/src/views/app/business/courier/courier.vue index 3bf4fa6..e675112 100644 --- a/src/views/app/business/courier/courier.vue +++ b/src/views/app/business/courier/courier.vue @@ -62,7 +62,7 @@
- @@ -138,7 +138,7 @@ isOnLine:'', //0:下线;1:上线 getPushOrder:'', //0不接指派 1接收 pageNum: 1, - pageSize: 10 + pageSize: 1000 }, selectDate: null, options: { @@ -172,26 +172,21 @@ key: "depoBal", minWidth: 125, }, - { - title: "配送员创建时间", - key: "createTime", - minWidth: 125, - }, { title: "联系方式", key: "mobile", minWidth: 125, }, - { - title: "接单区域", - key: "regionTitle", - minWidth: 125, - }, - { - title: "描述", - key: "remark", - minWidth: 125, - }, + // { + // title: "接单区域", + // key: "regionTitle", + // minWidth: 125, + // }, + // { + // title: "描述", + // key: "remark", + // minWidth: 125, + // }, { title: "接单状态", key: "workerStatus", @@ -412,21 +407,13 @@ methods: { init() { this.getDataList(); - // 初始化导出列数据 - let array = []; - this.exportColumns.forEach((e) => { - // 指定列限制权限 - //e.disabled = false; - array.push(e.title); - }); - this.chooseColumns = array; }, handleSelectDep(v) { this.searchForm.departmentId = v; }, changePage(v) { - this.searchForm.pageNumber = v; + this.searchForm.pageNum = v; this.getDataList(); this.clearSelectAll(); }, @@ -457,23 +444,23 @@ getWorkerListData(this.searchForm).then((res) => { this.loading = false; if (res.success) { - this.data = res.result.content; + this.data = res.result; this.total = res.result.totalElements; - if (this.data.length == 0 && this.searchForm.pageNumber > 1) { - this.searchForm.pageNumber -= 1; + if (this.data.length == 0 && this.searchForm.pageNum > 1) { + this.searchForm.pageNum -= 1; this.getDataList(); } } }); }, handleSearch() { - this.searchForm.pageNumber = 1; + this.searchForm.pageNum = 1; this.searchForm.pageSize = 10; this.getDataList(); }, handleReset() { this.$refs.searchForm.resetFields(); - this.searchForm.pageNumber = 1; + this.searchForm.pageNum = 1; this.searchForm.pageSize = 10; this.selectDate = null; this.searchForm.startDate = ""; diff --git a/src/views/app/business/logistics/logistics.vue b/src/views/app/business/logistics/logistics.vue index a050896..4cd346f 100644 --- a/src/views/app/business/logistics/logistics.vue +++ b/src/views/app/business/logistics/logistics.vue @@ -145,7 +145,7 @@ keyword: "", orderType: 0, putAreaId: "", - shopAreaId: "", + getAreaId: "", xiangtong: false }, searchForm: { @@ -286,18 +286,18 @@ align: "center" }, { //getTimeDifference title: "送达时间", - key: "createTime", + key: "mustFinishTime", minWidth: 80, align: "center", render: (h, params) => { let re = "", color = ""; - if (this.getTimeDifference(params.row.createTime) > 15 && (params.row.orderStatus == + if (this.getTimeDifference(params.row.mustFinishTime) > 15 && (params.row.orderStatus == "0" || params.row.orderStatus == "1")) { - re = params.row.createTime; + re = params.row.mustFinishTime; color = "red"; } else { - re = params.row.createTime; + re = params.row.mustFinishTime; color = "green"; } return h("div", [ @@ -307,7 +307,7 @@ color: color, }, }, - re + this.formatDateTime(re) ), ]); }, @@ -316,6 +316,28 @@ key: "createTime", width: 200, align: "center", + render: (h, params) => { + let re = "", + color = ""; + if (this.getTimeDifference(params.row.createTime) > 15 && (params.row.orderStatus == + "0" || params.row.orderStatus == "1")) { + re = params.row.createTime; + color = "red"; + } else { + re = params.row.createTime; + color = "green"; + } + return h("div", [ + h( + "Tag", { + props: { + color: color, + }, + }, + this.formatDateTime(params.row.createTime) + ), + ]); + }, }, { title: "操作", key: "action", @@ -379,23 +401,18 @@ console.log('订单', item) runshOrder({ - orderId: this.orderId, - orderByWorker: item.workerId, + deliveryId: this.orderId, + newWorkerId: item.workerId, + newWorkerName:item.workerName, + newWorkerPhone:item.mobile, }).then((res) => { this.loading = false; if (res.success) { - transferOrder({ - orderId: this.orderId, - orderByWorker: item.workerId, - workerName: item.workerName - }).then((res) => { - this.loading = false; - if (res.success) { - this.$Message.success("转单成功"); - this.transferOrder = false - this.getLogisticsInfo() - } - }); + if (res.success) { + this.$Message.success("转单成功"); + this.transferOrder = false + this.getLogisticsInfo() + } } }); @@ -502,6 +519,17 @@ this.showType = "0"; this.showOrder = true; }, + formatDateTime(isoString) { + if (!isoString) return '' + const date = new Date(isoString) + const year = date.getFullYear() + const month = String(date.getMonth() + 1).padStart(2, '0') + const day = String(date.getDate()).padStart(2, '0') + const hours = String(date.getHours()).padStart(2, '0') + const minutes = String(date.getMinutes()).padStart(2, '0') + const seconds = String(date.getSeconds()).padStart(2, '0') + return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}` + }, add() { this.showType = "2"; this.showOrder = true; @@ -581,8 +609,9 @@ unbind(v) { this.transferOrder = true this.searchWorker.pageNum = 1; - this.searchWorker.shopAreaId = v.getAreaId + this.searchWorker.getAreaId = v.getAreaId this.searchWorker.putAreaId = v.putAreaId + this.orderId = v.id console.log(v) this.getWorker(v) }, diff --git a/src/views/app/business/logistics/logisticsAddress.vue b/src/views/app/business/logistics/logisticsAddress.vue index 927a5e2..005ccca 100644 --- a/src/views/app/business/logistics/logisticsAddress.vue +++ b/src/views/app/business/logistics/logisticsAddress.vue @@ -2,34 +2,37 @@ -
-
百香多芒
-
少冰+正常糖
-
1
-
¥7.00
-
-
-
超级百香果
-
少冰+正常糖
-
1
-
¥14.00
+
+
{{item.productName}}
+
{{item.specs}}
+
{{item.quantity}}
+
¥{{item.price}}
餐盒费
-
¥0.00
+
¥{{orderData.packageFee}}
配送费
-
¥1.50
+
¥{{orderData.deliveryFee}}
总计
-
¥1.50
+
¥{{orderData.totalAmount}}
抵用券金额
-
¥1.50
+
+ ¥{{orderData.couponDiscountFee== null?0.00:orderData.couponDiscountFee}}
活动优惠金额
-
¥1.50
+
¥0.00
实付金额
-
¥1.50
+
¥{{orderData.totalAmount}}
配送流程
@@ -86,76 +84,120 @@
用户下单
-
2026-04-03 14:56:09
+
+ {{orderData.createTime | formatDateTime}}
-
商家接单
-
2026-04-03 14:56:09
-
麽麽蜜呀
+
商家出餐
+
+ {{orderData.shopMakeTime | formatDateTime}}
+
{{orderData.shopName}}
配送员接单
-
2026-04-03 14:56:09
-
张宝芹
+
+ {{orderData.deliveryInfo.acceptTime | formatDateTime}}
+
{{orderData.deliveryInfo.workerName}}
已到店
-
2026-04-03 14:56:09
-
张宝芹
+
+ {{orderData.deliveryInfo.arriveTime | formatDateTime}}
+
{{orderData.deliveryInfo.workerName}}
配送员已取货
-
2026-04-03 14:56:09
-
张宝芹
+
+ {{orderData.deliveryInfo.getTime | formatDateTime}}
+
{{orderData.deliveryInfo.workerName}}
配送员已送达
-
2026-04-03 14:56:09
-
张宝芹
+
+ {{orderData.deliveryInfo.finishTime | formatDateTime}}
+
{{orderData.deliveryInfo.workerName}}
送单时长
-
23分钟
+
{{getMinutesDiff(orderData.deliveryInfo.acceptTime !=null?orderData.deliveryInfo.acceptTime:1,orderData.deliveryInfo.finishTime != null?orderData.deliveryInfo.finishTime:1)}}分钟
订单总计时
-
0时23分
+
{{getMinutesDiff(orderData.createTime,orderData.deliveryInfo.finishTime != null?orderData.deliveryInfo.finishTime:1)}}分钟
超时
-
--
+
{{getMinutesDiff(orderData.deliveryInfo.mustFinishTime,orderData.deliveryInfo.finishTime != null?orderData.deliveryInfo.finishTime:1)}}分钟