增加商品售后的不同显示 以及后台重复处理的超时设置
This commit is contained in:
parent
aa7b8c7a5d
commit
174f6b4a82
|
|
@ -566,6 +566,7 @@ public class OrderDetailController extends BaseController {
|
||||||
orderListResponse.setHandoverRemark(detail.getHandoverRemark());
|
orderListResponse.setHandoverRemark(detail.getHandoverRemark());
|
||||||
orderListResponse.setGoods(goods);
|
orderListResponse.setGoods(goods);
|
||||||
|
|
||||||
|
orderListResponse.setOrderType(detail.getOrderType());
|
||||||
orderListResponse.setAfterPlatformServiceStatus(detail.getAfterServiceStatus());
|
orderListResponse.setAfterPlatformServiceStatus(detail.getAfterServiceStatus());
|
||||||
orderListResponse.setAddMoneyRemark(addMoneyRemark);
|
orderListResponse.setAddMoneyRemark(addMoneyRemark);
|
||||||
orderListResponse.setAddMoney(addMoneyTotal);
|
orderListResponse.setAddMoney(addMoneyTotal);
|
||||||
|
|
|
||||||
|
|
@ -1026,6 +1026,37 @@
|
||||||
return;
|
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 = '<div class="modal-body">';
|
var modalContent = '<div class="modal-body">';
|
||||||
modalContent += '<div class="table-responsive">';
|
modalContent += '<div class="table-responsive">';
|
||||||
modalContent += '<table class="table table-bordered table-striped">';
|
modalContent += '<table class="table table-bordered table-striped">';
|
||||||
|
|
@ -1041,7 +1072,14 @@
|
||||||
modalContent += '<tr>';
|
modalContent += '<tr>';
|
||||||
modalContent += '<td>' + (record.orderDetailCode || record.id) + '</td>';
|
modalContent += '<td>' + (record.orderDetailCode || record.id) + '</td>';
|
||||||
modalContent += '<td>¥' + (record.refund || record.agreedRefund || 0) + '</td>';
|
modalContent += '<td>¥' + (record.refund || record.agreedRefund || 0) + '</td>';
|
||||||
modalContent += '<td>' + getWorkerFeedbackText(record.workerFeedbackResult) + '<br/><span style="color: #666; font-size: 12px;">反馈金额:¥' + (record.agreedRefund || 0) + '</span></td>';
|
|
||||||
|
// 师傅反馈列 - 如果是商品订单则增加workerAgreeType显示
|
||||||
|
var workerFeedbackContent = getWorkerFeedbackText(record.workerFeedbackResult) + '<br/><span style="color: #666; font-size: 12px;">反馈金额:¥' + (record.agreedRefund || 0) + '</span>';
|
||||||
|
if (isGoodsOrder && record.workerAgreeType) {
|
||||||
|
workerFeedbackContent += '<br/><span style="color: #007bff; font-size: 12px;">处理方式:' + getWorkerAgreeTypeText(record.workerAgreeType) + '</span>';
|
||||||
|
}
|
||||||
|
modalContent += '<td>' + workerFeedbackContent + '</td>';
|
||||||
|
|
||||||
modalContent += '<td>' + getCustomerCheckText(record.customerFinalCheck) + '</td>';
|
modalContent += '<td>' + getCustomerCheckText(record.customerFinalCheck) + '</td>';
|
||||||
modalContent += '<td>';
|
modalContent += '<td>';
|
||||||
modalContent += '<div style="margin-bottom: 8px;">';
|
modalContent += '<div style="margin-bottom: 8px;">';
|
||||||
|
|
@ -1059,6 +1097,15 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
modalContent += '</tbody></table>';
|
modalContent += '</tbody></table>';
|
||||||
|
|
||||||
|
// 如果是商品订单,在表格下方增加提示文字
|
||||||
|
if (isGoodsOrder) {
|
||||||
|
modalContent += '<div style="margin-top: 15px; padding: 10px; background-color: #fff3cd; border: 1px solid #ffeaa7; border-radius: 4px;">';
|
||||||
|
modalContent += '<i class="fa fa-exclamation-triangle" style="color: #856404; margin-right: 5px;"></i>';
|
||||||
|
modalContent += '<span style="color: #856404; font-weight: bold;">商品退款需确认是否存在退货,并确认退完与否再操作退款!同时确认子单款项金额是否符合退款要求!</span>';
|
||||||
|
modalContent += '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
modalContent += '</div>';
|
modalContent += '</div>';
|
||||||
modalContent += '</div>';
|
modalContent += '</div>';
|
||||||
|
|
||||||
|
|
@ -1072,6 +1119,17 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取师傅同意处理方式文本
|
||||||
|
function getWorkerAgreeTypeText(type) {
|
||||||
|
var typeMap = {
|
||||||
|
1: '即时退单退款',
|
||||||
|
2: '货物拦截后退单退款',
|
||||||
|
3: '快递返回货物后退单退款',
|
||||||
|
4: '退回货物后退单退款'
|
||||||
|
};
|
||||||
|
return typeMap[type] || '未知';
|
||||||
|
}
|
||||||
|
|
||||||
// 处理退款
|
// 处理退款
|
||||||
function processRefund(recordId, orderDetailId) {
|
function processRefund(recordId, orderDetailId) {
|
||||||
var refundAmount = $('#refundAmount_' + recordId).val();
|
var refundAmount = $('#refundAmount_' + recordId).val();
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
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 = '<div class="modal fade" id="afterServiceDisputeModal" tabindex="-1" role="dialog">';
|
var html = '<div class="modal fade" id="afterServiceDisputeModal" tabindex="-1" role="dialog">';
|
||||||
html += '<div class="modal-dialog modal-lg" role="document">';
|
html += '<div class="modal-dialog modal-lg" role="document">';
|
||||||
html += '<div class="modal-content">';
|
html += '<div class="modal-content">';
|
||||||
|
|
@ -1268,7 +1309,12 @@
|
||||||
if (afterServiceRecords && afterServiceRecords.length > 0) {
|
if (afterServiceRecords && afterServiceRecords.length > 0) {
|
||||||
html += '<div class="table-responsive">';
|
html += '<div class="table-responsive">';
|
||||||
html += '<table class="table table-bordered table-striped">';
|
html += '<table class="table table-bordered table-striped">';
|
||||||
html += '<thead><tr><th>子单号</th><th>申请退款金额</th><th>师傅反馈</th><th>客户确认</th><th>操作</th></tr></thead>';
|
// 根据订单类型决定表头
|
||||||
|
if (isGoodsOrder) {
|
||||||
|
html += '<thead><tr><th>子单号</th><th>申请退款金额</th><th>师傅反馈</th><th>师傅同意类型</th><th>客户确认</th><th>操作</th></tr></thead>';
|
||||||
|
} else {
|
||||||
|
html += '<thead><tr><th>子单号</th><th>申请退款金额</th><th>师傅反馈</th><th>客户确认</th><th>操作</th></tr></thead>';
|
||||||
|
}
|
||||||
html += '<tbody>';
|
html += '<tbody>';
|
||||||
|
|
||||||
afterServiceRecords.forEach(function(record) {
|
afterServiceRecords.forEach(function(record) {
|
||||||
|
|
@ -1276,6 +1322,10 @@
|
||||||
html += '<td>' + (record.orderDetailCode || '') + '</td>';
|
html += '<td>' + (record.orderDetailCode || '') + '</td>';
|
||||||
html += '<td>¥' + (record.refund || record.agreedRefund || 0) + '</td>';
|
html += '<td>¥' + (record.refund || record.agreedRefund || 0) + '</td>';
|
||||||
html += '<td>' + getWorkerFeedbackText(record.workerFeedbackResult) + '<br><small style="color: #999;">反馈金额:¥' + (record.agreedRefund || 0) + '</small></td>';
|
html += '<td>' + getWorkerFeedbackText(record.workerFeedbackResult) + '<br><small style="color: #999;">反馈金额:¥' + (record.agreedRefund || 0) + '</small></td>';
|
||||||
|
// 如果是商品订单,添加师傅同意类型列
|
||||||
|
if (isGoodsOrder) {
|
||||||
|
html += '<td>' + getWorkerAgreeTypeText(record.workerAgreeType) + '</td>';
|
||||||
|
}
|
||||||
html += '<td>' + getCustomerCheckText(record.customerFinalCheck) + '</td>';
|
html += '<td>' + getCustomerCheckText(record.customerFinalCheck) + '</td>';
|
||||||
html += '<td style="width: 280px;">';
|
html += '<td style="width: 280px;">';
|
||||||
html += '<div style="margin-bottom: 8px;">';
|
html += '<div style="margin-bottom: 8px;">';
|
||||||
|
|
@ -1293,6 +1343,13 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
html += '</tbody></table></div>';
|
html += '</tbody></table></div>';
|
||||||
|
|
||||||
|
// 如果是商品订单,添加提示文字
|
||||||
|
if (isGoodsOrder) {
|
||||||
|
html += '<div class="alert alert-warning" style="margin-top: 15px;">';
|
||||||
|
html += '<strong>提示:</strong>商品退款需确认是否存在退货,并确认退完与否再操作退款!同时确认子单款项金额是否符合退款要求!';
|
||||||
|
html += '</div>';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
html += '<div class="alert alert-info">该订单暂无售后纠纷记录</div>';
|
html += '<div class="alert alert-info">该订单暂无售后纠纷记录</div>';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -276,6 +276,7 @@
|
||||||
AND customer_final_check IS NULL
|
AND customer_final_check IS NULL
|
||||||
AND (is_auto_processed IS NULL OR is_auto_processed = 0)
|
AND (is_auto_processed IS NULL OR is_auto_processed = 0)
|
||||||
AND create_time <= DATE_SUB(NOW(), INTERVAL 24 HOUR)
|
AND create_time <= DATE_SUB(NOW(), INTERVAL 24 HOUR)
|
||||||
|
AND create_time >= DATE_SUB(NOW(), INTERVAL 1470 MINUTE)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 查询客户确认超时的售后记录 -->
|
<!-- 查询客户确认超时的售后记录 -->
|
||||||
|
|
@ -288,11 +289,13 @@
|
||||||
AND (
|
AND (
|
||||||
-- 倒计时2:师傅重做完成后客户36小时不操作
|
-- 倒计时2:师傅重做完成后客户36小时不操作
|
||||||
(worker_feedback_result = 3
|
(worker_feedback_result = 3
|
||||||
AND redo_complete_time <= DATE_SUB(NOW(), INTERVAL 36 HOUR))
|
AND redo_complete_time <= DATE_SUB(NOW(), INTERVAL 36 HOUR)
|
||||||
|
AND redo_complete_time >= DATE_SUB(NOW(), INTERVAL 2190 MINUTE))
|
||||||
OR
|
OR
|
||||||
-- 倒计时3:师傅拒绝或同意后客户36小时不操作
|
-- 倒计时3:师傅拒绝或同意后客户36小时不操作
|
||||||
(worker_feedback_result IN (0, 1)
|
(worker_feedback_result IN (0, 1)
|
||||||
AND update_time <= DATE_SUB(NOW(), INTERVAL 36 HOUR))
|
AND update_time <= DATE_SUB(NOW(), INTERVAL 36 HOUR)
|
||||||
|
AND update_time >= DATE_SUB(NOW(), INTERVAL 2190 MINUTE))
|
||||||
)
|
)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -305,6 +308,7 @@
|
||||||
AND (
|
AND (
|
||||||
-- 所有类型统一:5天倒计时
|
-- 所有类型统一:5天倒计时
|
||||||
worker_resend_time <= DATE_SUB(NOW(), INTERVAL 4 DAY)
|
worker_resend_time <= DATE_SUB(NOW(), INTERVAL 4 DAY)
|
||||||
|
AND worker_resend_time >= DATE_SUB(NOW(), INTERVAL 5790 MINUTE)
|
||||||
)
|
)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -314,6 +318,7 @@
|
||||||
<include refid="selectAfterServiceRecordVo"/>
|
<include refid="selectAfterServiceRecordVo"/>
|
||||||
WHERE customer_operation_time IS NOT NULL
|
WHERE customer_operation_time IS NOT NULL
|
||||||
AND customer_operation_time <= DATE_SUB(NOW(), INTERVAL 6 DAY)
|
AND customer_operation_time <= DATE_SUB(NOW(), INTERVAL 6 DAY)
|
||||||
|
AND customer_operation_time >= DATE_SUB(NOW(), INTERVAL 8670 MINUTE)
|
||||||
AND (worker_receive_confirm IS NULL OR worker_receive_confirm = 0)
|
AND (worker_receive_confirm IS NULL OR worker_receive_confirm = 0)
|
||||||
AND after_service_status = 0
|
AND after_service_status = 0
|
||||||
AND after_service_category = 2
|
AND after_service_category = 2
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue