From 174f6b4a82b561b11c7d0b6d4e13be72fc6cb13b Mon Sep 17 00:00:00 2001 From: cb <275647614@qq.com> Date: Thu, 30 Oct 2025 11:35:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=95=86=E5=93=81=E5=94=AE?= =?UTF-8?q?=E5=90=8E=E7=9A=84=E4=B8=8D=E5=90=8C=E6=98=BE=E7=A4=BA=20?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E5=90=8E=E5=8F=B0=E9=87=8D=E5=A4=8D=E5=A4=84?= =?UTF-8?q?=E7=90=86=E7=9A=84=E8=B6=85=E6=97=B6=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../order/OrderDetailController.java | 1 + .../resources/templates/order/master.html | 60 ++++++++++++++++++- .../templates/order/orderManager.html | 59 +++++++++++++++++- .../mapper/order/AfterServiceRecordMapper.xml | 9 ++- 4 files changed, 125 insertions(+), 4 deletions(-) diff --git a/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderDetailController.java b/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderDetailController.java index 35f1eb7e..91ab725d 100644 --- a/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderDetailController.java +++ b/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderDetailController.java @@ -566,6 +566,7 @@ public class OrderDetailController extends BaseController { orderListResponse.setHandoverRemark(detail.getHandoverRemark()); orderListResponse.setGoods(goods); + orderListResponse.setOrderType(detail.getOrderType()); orderListResponse.setAfterPlatformServiceStatus(detail.getAfterServiceStatus()); orderListResponse.setAddMoneyRemark(addMoneyRemark); orderListResponse.setAddMoney(addMoneyTotal); diff --git a/ghy-admin/src/main/resources/templates/order/master.html b/ghy-admin/src/main/resources/templates/order/master.html index 662a7421..2759334f 100644 --- a/ghy-admin/src/main/resources/templates/order/master.html +++ b/ghy-admin/src/main/resources/templates/order/master.html @@ -1026,6 +1026,37 @@ return; } + // 直接获取订单详情来判断订单类型 + getOrderDetailInfo(orderDetailId, function(orderDetail) { + showDisputeModalWithOrderInfo(orderDetailId, disputeRecords, orderDetail); + }); + } + + // 获取订单详情信息 + function getOrderDetailInfo(orderDetailId, callback) { + $.ajax({ + type: "POST", + dataType: "json", + contentType: "application/json", + url: prefix + "/app/detail", + data: JSON.stringify({id: orderDetailId}), + success: function(result) { + if (result.code == web_status.SUCCESS) { + callback(result.data); + } else { + callback(null); + } + }, + error: function() { + callback(null); + } + }); + } + + // 根据订单信息显示售后纠纷处理弹窗 + function showDisputeModalWithOrderInfo(orderDetailId, disputeRecords, orderDetail) { + var isGoodsOrder = orderDetail && orderDetail.orderType === 1; // 1表示商品订单 + var modalContent = ''; @@ -1072,6 +1119,17 @@ }); } + // 获取师傅同意处理方式文本 + function getWorkerAgreeTypeText(type) { + var typeMap = { + 1: '即时退单退款', + 2: '货物拦截后退单退款', + 3: '快递返回货物后退单退款', + 4: '退回货物后退单退款' + }; + return typeMap[type] || '未知'; + } + // 处理退款 function processRefund(recordId, orderDetailId) { var refundAmount = $('#refundAmount_' + recordId).val(); diff --git a/ghy-admin/src/main/resources/templates/order/orderManager.html b/ghy-admin/src/main/resources/templates/order/orderManager.html index 24da34a6..e3d2b673 100644 --- a/ghy-admin/src/main/resources/templates/order/orderManager.html +++ b/ghy-admin/src/main/resources/templates/order/orderManager.html @@ -1254,8 +1254,49 @@ }); } + // 获取订单详情信息 + function getOrderDetailInfo(orderMasterId, callback) { + $.ajax({ + type: "POST", + dataType: "json", + url: prefix + "/app/detail", + contentType: "application/json", + data: JSON.stringify({id: orderMasterId}), + success: function (result) { + if (result.code == web_status.SUCCESS) { + callback(result.data); + } else { + $.modal.msgError("获取订单详情失败:" + result.msg); + } + }, + error: function() { + $.modal.msgError("获取订单详情失败,请重试!"); + } + }); + } + + // 获取师傅同意类型文本 + function getWorkerAgreeTypeText(type) { + var types = { + 1: '同意', + 2: '不同意', + 3: '部分同意' + }; + return types[type] || '未处理'; + } + // 显示售后纠纷处理弹窗 function showAfterServiceDisputeModal(orderMasterId, afterServiceRecords) { + // 先获取订单详情以判断订单类型 + getOrderDetailInfo(orderMasterId, function(orderDetail) { + showDisputeModalWithOrderInfo(orderMasterId, afterServiceRecords, orderDetail); + }); + } + + // 根据订单信息显示售后纠纷处理弹窗 + function showDisputeModalWithOrderInfo(orderMasterId, afterServiceRecords, orderDetail) { + var isGoodsOrder = orderDetail && orderDetail.orderType === 1; + var html = '