diff --git a/src/Admin/Native/PayOrders.php b/src/Admin/Native/PayOrders.php
index 66642f7a..0bd290d7 100644
--- a/src/Admin/Native/PayOrders.php
+++ b/src/Admin/Native/PayOrders.php
@@ -437,15 +437,28 @@ class PayOrders {
}
$images_cell = $thumbs ? implode('', $thumbs) : '—';
echo '
' . esc_html((string) $id) . ' ' . esc_html((string) ($item['created_at'] ?? '')) . ' | ' . esc_html($number) . ' ' . esc_html($type_label) . ($order ? ' · ' . esc_html(\AKSRT\Payment\UserOrders::get_instance()->decorate_order_view($order, false)['product_name'] ?? '') : '') . ' | ' . esc_html($user ? $user->display_name . ' (#' . $uid . ')' : '#' . $uid) . ' | ' . $reason_cell . ' | ' . $materials_cell . ' | ' . $desc_cell . ' | ' . $images_cell . ' | ' . esc_html($refund_amount) . ' | ' . esc_html($status_labels[(string) $item['status']] ?? (string) $item['status']) . ' | ';
- if ((string) $item['status'] === 'pending') foreach (['approve' => '通过', 'reject' => '拒绝'] as $decision => $label) {
- echo '';
- }
- if ((string) $item['status'] === 'processing') {
+ // 快捷操作:仿 WP 文章列表 row-actions(悬停显示),点击经 JS 以 POST 提交
+ $quick_actions = [];
+ if ((string) $item['status'] === 'pending') {
+ $quick_actions = ['approve' => __('通过', 'aksrt'), 'reject' => __('拒绝', 'aksrt')];
+ } elseif ((string) $item['status'] === 'processing') {
$gateway_result = json_decode((string) ($item['gateway_result'] ?? ''), true);
$manual_refund = is_array($gateway_result) && sanitize_key((string) ($gateway_result['status'] ?? '')) === 'manual';
- foreach (($manual_refund ? ['complete' => '确认线下退款完成', 'reject' => '确认未退款并拒绝'] : ['approve' => '同步退款状态']) as $decision => $label) {
- echo '';
+ $quick_actions = $manual_refund
+ ? ['complete' => __('确认线下退款完成', 'aksrt'), 'reject' => __('确认未退款并拒绝', 'aksrt')]
+ : ['approve' => __('同步退款状态', 'aksrt')];
+ }
+ if ($quick_actions) {
+ $links = [];
+ foreach ($quick_actions as $decision => $label) {
+ $links[] = '' . esc_html($label) . '';
}
+ echo ' ' . implode(' | ', $links) . ' ';
}
if (!empty($item['admin_note'])) echo '' . esc_html__('备注:', 'aksrt') . esc_html((string) $item['admin_note']) . ' ';
if (!empty($item['gateway_result'])) {
@@ -456,6 +469,21 @@ class PayOrders {
echo ' |
';
}
echo '';
+ echo '';
}
public function handle_after_sale_review(): void {