[FIX] 銷售掃碼支付方式細分與訂單詳情發票操作調整
1. AnalysisController 與 Order 將付款方式 3 由「掃碼支付」細分為「掃碼支付-玉山」,並新增 11「掃碼支付-TayPay」。 2. 訂單詳情面板(order-detail-panel)發票操作按鈕(列印/作廢/勾稽/補開)改為一致的圖示按鈕樣式,並補上捐贈發票不可列印提示。 3. 銷售列表(sales/index)與發票分頁(tab-invoices)配合調整顯示。 4. 三語系新增 QR Code Payment - E.SUN/TayPay 文案並對齊排序。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4a86be6cbf
commit
5875fe380e
@ -88,13 +88,14 @@ class AnalysisController extends Controller
|
|||||||
$availablePaymentTypes = [
|
$availablePaymentTypes = [
|
||||||
1 => __('Credit Card'),
|
1 => __('Credit Card'),
|
||||||
2 => __('E-Ticket (EasyCard/iPass)'),
|
2 => __('E-Ticket (EasyCard/iPass)'),
|
||||||
3 => __('QR Code Payment'),
|
3 => __('QR Code Payment - E.SUN'), // 掃碼支付-玉山
|
||||||
4 => __('Bill Acceptor'),
|
4 => __('Bill Acceptor'),
|
||||||
5 => __('Pass Code'),
|
5 => __('Pass Code'),
|
||||||
6 => __('Pickup Code'),
|
6 => __('Pickup Code'),
|
||||||
7 => __('Welcome Gift'),
|
7 => __('Welcome Gift'),
|
||||||
8 => __('Questionnaire'),
|
8 => __('Questionnaire'),
|
||||||
9 => __('Coin Acceptor'),
|
9 => __('Coin Acceptor'),
|
||||||
|
11 => __('QR Code Payment - TayPay'), // 掃碼支付-TayPay
|
||||||
41 => __('Staff Card'),
|
41 => __('Staff Card'),
|
||||||
42 => __('Pickup Voucher'),
|
42 => __('Pickup Voucher'),
|
||||||
];
|
];
|
||||||
|
|||||||
@ -86,7 +86,7 @@ class Order extends Model
|
|||||||
return [
|
return [
|
||||||
1 => __('Credit Card'),
|
1 => __('Credit Card'),
|
||||||
2 => __('E-Ticket (EasyCard/iPass)'),
|
2 => __('E-Ticket (EasyCard/iPass)'),
|
||||||
3 => __('QR Code Payment'),
|
3 => __('QR Code Payment - E.SUN'), // 掃碼支付-玉山
|
||||||
4 => __('Bill Acceptor'),
|
4 => __('Bill Acceptor'),
|
||||||
5 => __('Pass Code'), // 使用者要求由「通關密碼」改為「通行碼」
|
5 => __('Pass Code'), // 使用者要求由「通關密碼」改為「通行碼」
|
||||||
6 => __('Pickup Code'),
|
6 => __('Pickup Code'),
|
||||||
@ -94,6 +94,7 @@ class Order extends Model
|
|||||||
8 => __('Questionnaire'),
|
8 => __('Questionnaire'),
|
||||||
9 => __('Coin Acceptor'),
|
9 => __('Coin Acceptor'),
|
||||||
10 => __('Mobile Pay'), // NFC 手機感應(行動支付,信用卡軌道,依使用者按鈕分類)
|
10 => __('Mobile Pay'), // NFC 手機感應(行動支付,信用卡軌道,依使用者按鈕分類)
|
||||||
|
11 => __('QR Code Payment - TayPay'), // 掃碼支付-TayPay
|
||||||
21 => __('Offline + 1'),
|
21 => __('Offline + 1'),
|
||||||
22 => __('Offline + 2'),
|
22 => __('Offline + 2'),
|
||||||
23 => __('Offline + 3'),
|
23 => __('Offline + 3'),
|
||||||
|
|||||||
@ -1643,6 +1643,8 @@
|
|||||||
"QR CODE": "QR CODE",
|
"QR CODE": "QR CODE",
|
||||||
"QR Code": "QR Code",
|
"QR Code": "QR Code",
|
||||||
"QR Code Payment": "QR Code Payment",
|
"QR Code Payment": "QR Code Payment",
|
||||||
|
"QR Code Payment - E.SUN": "QR Code Payment - E.SUN",
|
||||||
|
"QR Code Payment - TayPay": "QR Code Payment - TayPay",
|
||||||
"QR Scan Payment": "QR Scan Payment",
|
"QR Scan Payment": "QR Scan Payment",
|
||||||
"Qty": "Qty",
|
"Qty": "Qty",
|
||||||
"Qty Change": "Qty Change",
|
"Qty Change": "Qty Change",
|
||||||
|
|||||||
@ -1643,6 +1643,8 @@
|
|||||||
"QR CODE": "QRコード",
|
"QR CODE": "QRコード",
|
||||||
"QR Code": "QRコード",
|
"QR Code": "QRコード",
|
||||||
"QR Code Payment": "QRコード決済",
|
"QR Code Payment": "QRコード決済",
|
||||||
|
"QR Code Payment - E.SUN": "QRコード決済-玉山銀行",
|
||||||
|
"QR Code Payment - TayPay": "QRコード決済-TayPay",
|
||||||
"QR Scan Payment": "QRスキャン決済",
|
"QR Scan Payment": "QRスキャン決済",
|
||||||
"Qty": "数量",
|
"Qty": "数量",
|
||||||
"Qty Change": "変動数",
|
"Qty Change": "変動数",
|
||||||
|
|||||||
@ -1643,6 +1643,8 @@
|
|||||||
"QR CODE": "二維碼",
|
"QR CODE": "二維碼",
|
||||||
"QR Code": "QR Code",
|
"QR Code": "QR Code",
|
||||||
"QR Code Payment": "掃碼支付",
|
"QR Code Payment": "掃碼支付",
|
||||||
|
"QR Code Payment - E.SUN": "掃碼支付-玉山",
|
||||||
|
"QR Code Payment - TayPay": "掃碼支付-TayPay",
|
||||||
"QR Scan Payment": "掃碼支付功能",
|
"QR Scan Payment": "掃碼支付功能",
|
||||||
"Qty": "數量",
|
"Qty": "數量",
|
||||||
"Qty Change": "異動數量",
|
"Qty Change": "異動數量",
|
||||||
|
|||||||
@ -92,6 +92,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{-- 發票作廢 / 補開 確認框(自製 UI,取代瀏覽器原生 confirm) --}}
|
||||||
|
<x-confirm-modal alpineVar="showVoidModal" confirmAction="submitInvoiceAction()" :title="__('Void Invoice')"
|
||||||
|
:message="__('Void this invoice?')" :confirmText="__('Void Invoice')" :cancelText="__('Cancel')"
|
||||||
|
iconType="danger" confirmColor="rose" />
|
||||||
|
<x-confirm-modal alpineVar="showReissueModal" confirmAction="submitInvoiceAction()" :title="__('Re-issue')"
|
||||||
|
:message="__('Re-issue this invoice?')" :confirmText="__('Re-issue')" :cancelText="__('Cancel')"
|
||||||
|
iconType="info" confirmColor="sky" />
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@ -102,7 +110,29 @@ function salesCenter() {
|
|||||||
showPanel: false,
|
showPanel: false,
|
||||||
activeTab: '{{ $tab }}',
|
activeTab: '{{ $tab }}',
|
||||||
tabLoading: null,
|
tabLoading: null,
|
||||||
|
showVoidModal: false,
|
||||||
|
showReissueModal: false,
|
||||||
|
pendingInvoiceForm: '',
|
||||||
|
|
||||||
|
confirmVoidInvoice(formId) {
|
||||||
|
this.pendingInvoiceForm = formId;
|
||||||
|
this.showVoidModal = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
confirmReissueInvoice(formId) {
|
||||||
|
this.pendingInvoiceForm = formId;
|
||||||
|
this.showReissueModal = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
submitInvoiceAction() {
|
||||||
|
if (this.pendingInvoiceForm) {
|
||||||
|
const form = document.getElementById(this.pendingInvoiceForm);
|
||||||
|
if (form) form.submit();
|
||||||
|
}
|
||||||
|
this.showVoidModal = false;
|
||||||
|
this.showReissueModal = false;
|
||||||
|
},
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
const params = new URLSearchParams(window.location.search);
|
const params = new URLSearchParams(window.location.search);
|
||||||
const urlTab = params.get('tab');
|
const urlTab = params.get('tab');
|
||||||
|
|||||||
@ -309,27 +309,57 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if($invStatus === 'issued')
|
<div class="flex items-center gap-2">
|
||||||
<div class="flex items-center gap-3">
|
@if($invStatus === 'issued')
|
||||||
@if($invPrintable)
|
{{-- 列印(捐贈發票無紙本,僅非捐贈可列印) --}}
|
||||||
<form method="POST" action="{{ route('admin.sales.invoices.print', $order->invoice) }}" target="_blank">
|
@if($invPrintable)
|
||||||
@csrf
|
<form method="POST" action="{{ route('admin.sales.invoices.print', $order->invoice) }}" target="_blank">
|
||||||
<button type="submit" class="flex-1 sm:flex-none px-6 py-3 rounded-xl bg-white dark:bg-slate-800 text-slate-600 dark:text-slate-300 font-bold text-xs border border-slate-200 dark:border-slate-700 hover:bg-indigo-500 hover:text-white hover:border-indigo-500 transition-all duration-300 shadow-sm">
|
@csrf
|
||||||
{{ __('Print Invoice') }}
|
<button type="submit" title="{{ __('Print Invoice') }}"
|
||||||
|
class="p-3 rounded-xl bg-white dark:bg-slate-800 text-slate-500 dark:text-slate-400 border border-slate-200 dark:border-slate-700 hover:bg-indigo-500 hover:text-white hover:border-indigo-500 transition-all duration-300 shadow-sm">
|
||||||
|
<svg class="w-4 h-4 stroke-[2.2]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M6.72 13.829c-.24.03-.48.062-.72.096m.72-.096a42.415 42.415 0 0 1 10.56 0m-10.56 0L6.34 18m10.94-4.171c.24.03.48.062.72.096m-.72-.096L17.66 18m0 0 .229 2.523a1.125 1.125 0 0 1-1.12 1.227H7.231c-.662 0-1.18-.568-1.12-1.227L6.34 18m11.318 0h1.091A2.25 2.25 0 0 0 21 15.75V9.456c0-1.081-.768-2.015-1.837-2.175a48.055 48.055 0 0 0-1.913-.247M6.34 18H5.25A2.25 2.25 0 0 1 3 15.75V9.456c0-1.081.768-2.015 1.837-2.175a48.041 48.041 0 0 1 1.913-.247m10.5 0a48.536 48.536 0 0 0-10.5 0m10.5 0V3.375c0-.621-.504-1.125-1.125-1.125h-8.25c-.621 0-1.125.504-1.125 1.125v3.659M18 10.5h.008v.008H18V10.5Z" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
@else
|
||||||
|
<span class="text-[11px] font-bold text-slate-400 dark:text-slate-500 px-2">{{ __('Donation invoices cannot be printed') }}</span>
|
||||||
|
@endif
|
||||||
|
{{-- 作廢:使用自製確認框 UI(不用瀏覽器原生 confirm) --}}
|
||||||
|
<form id="invoice-void-form-{{ $order->invoice->id }}" method="POST" action="{{ route('admin.sales.invoices.void', $order->invoice) }}" class="hidden">
|
||||||
|
@csrf
|
||||||
|
</form>
|
||||||
|
<button type="button" title="{{ __('Void Invoice') }}"
|
||||||
|
@click="confirmVoidInvoice('invoice-void-form-{{ $order->invoice->id }}')"
|
||||||
|
class="p-3 rounded-xl bg-white dark:bg-slate-800 text-slate-500 dark:text-slate-400 border border-slate-200 dark:border-slate-700 hover:bg-rose-500 hover:text-white hover:border-rose-500 transition-all duration-300 shadow-sm">
|
||||||
|
<svg class="w-4 h-4 stroke-[2.2]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
@elseif(in_array($invStatus, ['pending', 'failed']))
|
||||||
|
{{-- 查詢(對帳) --}}
|
||||||
|
<form method="POST" action="{{ route('admin.sales.invoices.reconcile', $order->invoice) }}">
|
||||||
|
@csrf
|
||||||
|
<button type="submit" title="{{ __('Query') }}"
|
||||||
|
class="p-3 rounded-xl bg-white dark:bg-slate-800 text-slate-500 dark:text-slate-400 border border-slate-200 dark:border-slate-700 hover:bg-amber-500 hover:text-white hover:border-amber-500 transition-all duration-300 shadow-sm">
|
||||||
|
<svg class="w-4 h-4 stroke-[2.2]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
{{-- 補開 --}}
|
||||||
|
<form id="invoice-reissue-form-{{ $order->invoice->id }}" method="POST" action="{{ route('admin.sales.invoices.reissue', $order->invoice) }}" class="hidden">
|
||||||
|
@csrf
|
||||||
|
</form>
|
||||||
|
<button type="button" title="{{ __('Re-issue') }}"
|
||||||
|
@click="confirmReissueInvoice('invoice-reissue-form-{{ $order->invoice->id }}')"
|
||||||
|
class="p-3 rounded-xl bg-white dark:bg-slate-800 text-slate-500 dark:text-slate-400 border border-slate-200 dark:border-slate-700 hover:bg-cyan-500 hover:text-white hover:border-cyan-500 transition-all duration-300 shadow-sm">
|
||||||
|
<svg class="w-4 h-4 stroke-[2.2]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" />
|
||||||
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
|
||||||
@else
|
|
||||||
<span class="text-[11px] font-bold text-slate-400 dark:text-slate-500 px-2">{{ __('Donation invoices cannot be printed') }}</span>
|
|
||||||
@endif
|
@endif
|
||||||
<form method="POST" action="{{ route('admin.sales.invoices.void', $order->invoice) }}"
|
|
||||||
onsubmit="return confirm('{{ __('Void this invoice?') }}')">
|
|
||||||
@csrf
|
|
||||||
<button type="submit" class="flex-1 sm:flex-none px-6 py-3 rounded-xl bg-white dark:bg-slate-800 text-slate-600 dark:text-slate-300 font-bold text-xs border border-slate-200 dark:border-slate-700 hover:bg-rose-500 hover:text-white hover:border-rose-500 transition-all duration-300 shadow-sm">
|
|
||||||
{{ __('Void Invoice') }}
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
@endif
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@ -254,16 +254,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
@endif
|
@endif
|
||||||
@if($st === 'issued')
|
{{-- 作廢按鈕僅在「訂單詳情」提供,列表操作欄不再顯示 --}}
|
||||||
<form method="POST" action="{{ route('admin.sales.invoices.void', $invoice) }}"
|
|
||||||
onsubmit="return confirm('{{ __('Void this invoice?') }}')">
|
|
||||||
@csrf
|
|
||||||
<button type="submit" title="{{ __('Void') }}"
|
|
||||||
class="px-2.5 py-1.5 rounded-lg text-[11px] font-bold text-rose-600 dark:text-rose-400 bg-rose-500/5 hover:bg-rose-500/10 border border-rose-500/20 transition-all">
|
|
||||||
{{ __('Void') }}
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
@endif
|
|
||||||
<button @click="openDetail({{ $invoice->order_id }})"
|
<button @click="openDetail({{ $invoice->order_id }})"
|
||||||
class="p-2 rounded-xl text-slate-400 hover:text-cyan-500 hover:bg-cyan-500/5 dark:hover:bg-cyan-500/10 border border-transparent hover:border-cyan-500/20 transition-all">
|
class="p-2 rounded-xl text-slate-400 hover:text-cyan-500 hover:bg-cyan-500/5 dark:hover:bg-cyan-500/10 border border-transparent hover:border-cyan-500/20 transition-all">
|
||||||
<svg class="w-4 h-4 stroke-[2.5]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
<svg class="w-4 h-4 stroke-[2.5]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user