PageSourceSearch

https://zahit-pro-v2.pages.dev/assets/_member.me.orders-DptZr-jh.js

js zahit-pro-v2.pages.dev collected 2026-10-03 06:03:12 UTC 11,920 bytes, 1 lines download raw bytes

1import{j as e}from"./jsx-runtime-0DLF9kdB.js";import{G as p}from"./GlassCard-QGEypy6d.js";import{P as f}from"./PageTransition-d4Dnod-f.js";import{M as a}from"./MobileNavigation-D8pesZXW.js";import{u as w,L as l}from"./components-C61DWoh4.js";import"./cn-fNskMoFt.js";import"./use-combine-values-xozz9E_C.js";import"./proxy-TcOPxGtH.js";import"./index-DM-Ysix_.js";import"./i18n-context-DuXOzqEp.js";import"./hooks-ktRWiHiM.js";function u(t){return new Intl.NumberFormat("zh-TW",{style:"currency",currency:"TWD",maximumFractionDigits:0}).format(t||0)}function N(t){return t?new Date(t).toLocaleString("zh-TW",{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"}):"-"}const y={CREATED:{label:"已建立",tone:"border-sky-300/20 bg-sky-400/10 text-sky-100",next:"訂單已建立,等待後續確認。"},UNPAID:{label:"待付款",tone:"border-amber-300/25 bg-amber-400/10 text-amber-100",next:"請留意付款方式或等待總部確認。"},PAID:{label:"已付款",tone:"border-emerald-300/20 bg-emerald-400/10 text-emerald-100",next:"付款完成,訂單會接續處理。"},FULFILLING:{label:"處理中",tone:"border-cyan-300/20 bg-cyan-400/10 text-cyan-100",next:"店家或總部正在處理這筆訂單。"},SHIPPED:{label:"已出貨",tone:"border-lime-300/20 bg-lime-400/10 text-lime-100",next:"商品已出貨,請留意配送資訊。"},COMPLETED:{label:"已完成",tone:"border-white/10 bg-white/5 text-zinc-200",next:"訂單已完成,可查看保固或服務紀錄。"},CANCELLED:{label:"已取消",tone:"border-rose-300/20 bg-rose-400/10 text-rose-100",next:"如需協助,可從此訂單建立客服單。"},REFUNDING:{label:"退款中",tone:"border-rose-300/20 bg-rose-400/10 text-rose-100",next:"退款流程處理中,可向客服確認進度。"},REFUNDED:{label:"已退款",tone:"border-white/10 bg-white/5 text-zinc-300",next:"退款已完成。"}},v={PENDING:{label:"付款待確認",tone:"border-amber-300/25 bg-amber-400/10 text-amber-100"},UNPAID:{label:"尚未付款",tone:"border-amber-300/25 bg-amber-400/10 text-amber-100"},PAID:{label:"付款完成",tone:"border-emerald-300/20 bg-emerald-400/10 text-emerald-100"},SUCCEEDED:{label:"付款完成",tone:"border-emerald-300/20 bg-emerald-400/10 text-emerald-100"},FAILED:{label:"付款失敗",tone:"border-rose-300/20 bg-rose-400/10 text-rose-100"},REFUNDING:{label:"退款中",tone:"border-rose-300/20 bg-rose-400/10 text-rose-100"},REFUNDED:{label:"已退款",tone:"border-white/10 bg-white/5 text-zinc-300"}};function k(t){return y[t||""]||{label:t||"更新中",tone:"border-white/10 bg-white/5 text-zinc-300",next:"等待狀態更新。"}}function E(t){return v[t||""]||{label:t||"尚無付款紀錄",tone:"border-white/10 bg-white/5 text-zinc-300"}}function D(t){return{PENDING:"待總部複查",APPROVED:"施工已確認",REJECTED:"需補件",CANCELLED:"已取消"}[t||""]||t||"尚未回報"}function z(t){return{ACTIVE:"保固有效",EXPIRED:"保固到期",VOID:"保固作廢"}[t||""]||t||"尚未建立"}function I(t,d){return t.map(c=>`${c.sku.product.name} x ${c.qty}`).join(" / ")||d}function $(){const{orders:t}=w(),d=t.filter(s=>!["COMPLETED","CANCELLED","REFUNDED"].includes(s.status)).length,c=t.filter(s=>{var n;return s.status==="UNPAID"||((n=s.payments[0])==null?void 0:n.status)==="PENDING"}).length,o=t.filter(s=>s.vehicleProtections.length>0).length;return e.jsx(f,{children:e.jsx("div",{className:"min-h-screen bg-[#070706] pb-28 text-[#f7f0e6]",children:e.jsxs("main",{className:"mx-auto max-w-5xl space-y-4 px-4 pt-4 md:space-y-5 md:px-8 md:pt-8",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-xs font-bold text-[#8f8a82]",children:"會員訂單"}),e.jsx("h1",{className:"mt-1 text-2xl font-black leading-tight text-white md:text-3xl",children:"訂單紀錄"}),e.jsx("p",{className:"mt-2 max-w-2xl text-sm leading-6 text-zinc-400",children:"追蹤付款、施工回報與保固建立進度。"})]}),e.jsxs(l,{to:"/shop",className:"inline-flex h-11 shrink-0 items-center justify-center gap-2 rounded-lg bg-white px-3 text-sm font-black text-black transition hover:bg-zinc-200",children:[e.jsx(a,{name:"bag",className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"前往商城"}),e.jsx("span",{className:"sm:hidden",children:"商城"})]})]}),e.jsxs("section",{className:"grid grid-cols-3 gap-2",children:[e.jsxs("div",{className:"rounded-lg border border-white/10 bg-white/[0.03] px-3 py-3",children:[e.jsx("p",{className:"text-[10px] font-bold text-zinc-500",children:"總訂單"}),e.jsx("p",{className:"mt-1 font-mono text-xl font-black text-white",children:t.length})]}),e.jsxs("div",{className:"rounded-lg border border-cyan-300/20 bg-cyan-400/10 px-3 py-3",children:[e.jsx("p",{className:"text-[10px] font-bold text-cyan-100/70",children:"處理中"}),e.jsx("p",{className:"mt-1 font-mono text-xl font-black text-white",children:d})]}),e.jsxs("div",{className:"rounded-lg border border-amber-300/20 bg-amber-400/10 px-3 py-3",children:[e.jsx("p",{className:"text-[10px] font-bold text-amber-100/75",children:"付款待確認"}),e.jsx("p",{className:"mt-1 font-mono text-xl font-black text-white",children:c})]})]}),e.jsxs("div",{className:"flex items-center justify-between gap-3 px-1",children:[e.jsx("div",{className:"min-w-0 text-xs text-zinc-500",children:o>0?`${o} 筆已有保固紀錄`:"完工審核後,保固會顯示在訂單內。"}),e.jsx(l,{to:"/me/support",className:"shrink-0 text-xs font-bold text-zinc-300 hover:text-white",children:"客服中心"})]}),e.jsx("div",{className:"space-y-3",children:t.length===0?e.jsx(p,{className:"!rounded-lg p-5",intensity:"low",children:e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-md border border-amber-300/20 bg-amber-400/10 text-amber-100",children:e.jsx(a,{name:"receipt",className:"h-5 w-5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"text-lg font-black text-white",children:"尚無訂單紀錄"}),e.jsx("p",{className:"mt-2 text-sm leading-6 text-zinc-400",children:"可以先建立預約,或從色庫與商城挑選合適的方案。完成付款或施工後,進度會集中在這裡。"}),e.jsxs("div",{className:"mt-4 grid grid-cols-2 gap-2",children:[e.jsxs(l,{to:"/service-intake",className:"inline-flex min-h-11 items-center justify-center gap-2 rounded-lg border border-emerald-300/20 bg-emerald-400/10 px-3 text-sm font-black text-emerald-100",children:[e.jsx(a,{name:"service",className:"h-4 w-4"}),"預約服務"]}),e.jsxs(l,{to:"/shop/color-chart",className:"inline-flex min-h-11 items-center justify-center gap-2 rounded-lg border border-white/10 bg-white/[0.04] px-3 text-sm font-black text-zinc-100",children:[e.jsx(a,{name:"swatch",className:"h-4 w-4"}),"查看色庫"]})]})]})]})}):t.map(s=>{var b,h;const n=s.payments[0],i=s.serviceReports[0],r=s.vehicleProtections[0],m=k(s.status),x=E(n==null?void 0:n.status),g=((b=s.store)==null?void 0:b.name)||((h=s.salesAgent)==null?void 0:h.name)||"Zahit 總部",j=I(s.items,s.type);return e.jsxs(p,{className:"!rounded-lg overflow-hidden",intensity:"low",children:[e.jsxs("div",{className:"p-4 md:p-5",children:[e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:`rounded-md border px-2 py-1 text-[10px] font-black ${m.tone}`,children:m.label}),e.jsx("span",{className:`rounded-md border px-2 py-1 text-[10px] font-bold ${x.tone}`,children:x.label})]}),e.jsx("h2",{className:"mt-3 line-clamp-2 break-words text-base font-black leading-6 text-white md:text-lg",children:j}),e.jsx("p",{className:"mt-2 break-all font-mono text-[11px] leading-5 text-zinc-500",children:s.orderNumber})]}),e.jsxs("div",{className:"min-w-0 sm:text-right",children:[e.jsx("p",{className:"break-words font-mono text-xl font-black leading-7 text-white md:text-2xl",children:u(s.totalAmount)}),e.jsx("p",{className:"mt-1 text-xs leading-5 text-zinc-500",children:N(s.createdAt)})]})]}),e.jsxs("div",{className:"mt-4 grid grid-cols-[88px_1fr] gap-x-3 gap-y-2 text-xs md:grid-cols-[110px_1fr_110px_1fr]",children:[e.jsx("p",{className:"font-bold text-zinc-500",children:"服務單位"}),e.jsx("p",{className:"min-w-0 break-words font-semibold text-zinc-200",children:g}),e.jsx("p",{className:"font-bold text-zinc-500",children:"訂單類型"}),e.jsx("p",{className:"min-w-0 break-words font-mono text-zinc-300",children:s.type})]}),e.jsx("p",{className:"mt-4 rounded-md border border-white/10 bg-black/20 px-3 py-2 text-xs leading-5 text-zinc-300",children:m.next})]}),e.jsx("div",{className:"border-t border-white/10",children:e.jsxs("div",{className:"grid divide-y divide-white/10 text-sm md:grid-cols-3 md:divide-x md:divide-y-0",children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3 px-4 py-3",children:[e.jsx("div",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-white/10 bg-black/25 text-zinc-300",children:e.jsx(a,{name:"receipt",className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-[10px] font-bold text-zinc-500",children:"付款"}),e.jsx("p",{className:"mt-1 break-words font-bold text-white",children:x.label}),(n==null?void 0:n.paidAt)&&e.jsx("p",{className:"mt-1 text-xs text-zinc-500",children:N(n.paidAt)})]})]}),e.jsxs("div",{className:"flex min-w-0 items-start gap-3 px-4 py-3",children:[e.jsx("div",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-white/10 bg-black/25 text-zinc-300",children:e.jsx(a,{name:"service",className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-[10px] font-bold text-zinc-500",children:"施工回報"}),e.jsx("p",{className:"mt-1 break-words font-bold text-white",children:D(i==null?void 0:i.status)}),(i==null?void 0:i.batchNumber)&&e.jsx("p",{className:"mt-1 break-all font-mono text-xs text-zinc-500",children:i.batchNumber})]})]}),e.jsxs("div",{className:"flex min-w-0 items-start gap-3 px-4 py-3",children:[e.jsx("div",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-white/10 bg-black/25 text-zinc-300",children:e.jsx(a,{name:"shield",className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-[10px] font-bold text-zinc-500",children:"保固"}),e.jsx("p",{className:"mt-1 break-words font-bold text-white",children:z(r==null?void 0:r.status)}),(r==null?void 0:r.warrantyCode)&&e.jsx("p",{className:"mt-1 break-all font-mono text-xs text-zinc-500",children:r.warrantyCode})]})]})]})}),e.jsxs("div",{className:"flex flex-col gap-2 border-t border-white/10 p-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsx("div",{className:"min-w-0 text-xs leading-5 text-zinc-500",children:r!=null&&r.warrantyCode?"保固碼已建ç«
1‹ï¼Œå¯åˆ°ä¿å›ºè»Šåº«æŸ¥çœ‹å®Œæ•´è³‡è¨Šã€‚":"需要修改資料或確認付款,可直接詢問客服。"}),e.jsxs("div",{className:r!=null&&r.id?"grid grid-cols-2 gap-2 sm:flex sm:shrink-0":"grid gap-2 sm:flex sm:shrink-0",children:[(r==null?void 0:r.id)&&e.jsxs(l,{to:"/me/garage",className:"inline-flex min-h-10 items-center justify-center gap-2 rounded-lg border border-lime-300/20 bg-lime-400/10 px-3 text-xs font-black text-lime-100",children:[e.jsx(a,{name:"shield",className:"h-4 w-4"}),"保固"]}),e.jsxs(l,{to:`/me/support?orderId=${s.id}`,className:"inline-flex min-h-10 items-center justify-center gap-2 rounded-lg border border-rose-300/20 bg-rose-400/10 px-3 text-xs font-black text-rose-100",children:[e.jsx(a,{name:"support",className:"h-4 w-4"}),"詢問客服"]})]})]})]},s.id)})})]})})})}export{$ as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.