PageSourceSearch

https://propro-clean.tw/assets/search.f1d1e4ac.js

js propro-clean.tw collected 2026-10-07 08:14:13 UTC 18,493 bytes, 1 lines download raw bytes

1import{o as e,c as t,g as r,u as o,d as a,y as s,x as n,ab as d,N as i,r as l,e as c,i as p,w as m,n as u,j as b,D as x,V as g,t as v,f as h,F as y,h as f,G as _}from"./vendor.ddbd020e.js";import{_ as w,e as k,g as C,u as M,d as I,n as S,L as j,C as T}from"./index.441c06ad.js";import{E as L,F as V,a as D}from"./vee-validate.esm.ac6fd158.js";import{_ as E,u as z}from"./Spinner.1ec0cc94.js";import{u as B}from"./invoice.059bbc80.js";import{f as H}from"./index.048dc70d.js";var U={};const F={components:{ErrorMessage:L,Form:V,Field:D,Article:w,Spinner:E,InformationCircleIcon:function(o,a){return e(),t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[r("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})])},ExclamationCircleIcon:function(o,a){return e(),t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[r("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})])},ChevronDownIcon:function(o,a){return e(),t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[r("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"})])},ClipboardCopyIcon:function(o,a){return e(),t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[r("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"})])},ExternalLinkIcon:function(o,a){return e(),t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[r("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})])},InboxIcon:function(o,a){return e(),t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[r("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"})])},SearchIcon:function(o,a){return e(),t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[r("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})])}},props:{content:{type:String,default:""},seo:{type:Object,default:()=>{}}},setup(e){const t=k(),r=o(),d=C(),{seconds:i,setSeconds:l}=z(),c=M(),p=a(c.config.arrival_limit_days),m=I();m.url=`${c.config.company_url}search`,m.title=e.seo.article_title||"訂單查詢頁";const u=a([]);return s((async()=>{if(t.isLoggedIn)return await r.push("/member");const e=B();await e.getInvoiceConfigs();const o=n((()=>e.configs));u.value=[{isEnable:o.value.invoice_donate,name:o.value.custom_donate_name||"捐贈",type:0,note:o.value.donate_note,customDonateCode:Number(o.value.default_donate_code)},{isEnable:o.value.invoice_einvoice,name:o.value.custom_einvoice_name||"電子發票",type:1,note:o.value.einvoice_note},{isEnable:o.value.invoice_uniform_number,name:o.value.custom_uniform_number_name||"統編抬頭",type:2,note:o.value.uniform_number_note},{isEnable:o.value.invoice_mobile_code,name:o.value.custom_mobile_code_name||"手機條碼",type:4,note:o.value.mobile_code_note}],d.setLoaded()})),{nl2br:S,seconds:i,setSeconds:l,arrival_limit_days:p,formattingDate:e=>null!==e?H(new Date(e),"yyyy-MM-dd"):"",invoiceTypes:u,currencySymbol:c.currencySymbol,inputClass:"block h-10 w-full rounded-md border border-ant-border bg-white px-3 text-base transition placeholder-ant-tertiary hover:border-ant-primary-hover focus:z-10 focus:border-ant-primary-hover focus:outline-none focus:ring-2 focus:ring-ant-primary focus:ring-opacity-10"}},data:()=>({countryCode:"886",name:"",phone:"",errorMessage:"",isLoading:!1,orders:[],validationCode:"",schema:d({name:i().required("請輸入姓名"),phone:i().matches(/^[0-9]{7,15}$/,"手機格式不正確").required("請輸入手機")}),hasSendValidationCode:!1,hasSearched:!1}),methods:{normalizedPhone(){return["886","84","66"].includes(this.countryCode)&&!/^0/.test(this.phone)?"0"+this.phone:this.phone},async sendValidationCode(){this.isLoading=!0;try{this.errorMessage="",this.setSeconds(30),await j.validatePhone(this.normalizedPhone(),!1)}catch(e){this.setSeconds(0),this.errorMessage=e.message}finally{this.isLoading=!1}},async onSubmit(){this.isLoading=!0;try{this.errorMessage="";const{data:e}=await T.getOrders(this.countryCode,this.normalizedPhone(),this.name,this.validationCode)||[];this.orders=e,this.hasSearched=!0}catch(e){this.errorMessage=e.message}finally{this.isLoading=!1}},statusKind(e=""){const t=t=>t.some((t=>e.startsWith(t)));return t(["已取消","刷卡失敗","物流下單失敗","未取貨","拒收","付款失敗"])?"error":t(["已出貨","待取貨","已完成取貨","已換貨"])?"success":t(["未完成","可出貨","待出貨","出貨中","換貨中","等待退款"])?"processing":"default"},statusTagClass(e){return{error:"border-ant-error-border bg-ant-error-bg text-ant-error-text",success:"border-ant-success-border bg-ant-success-bg text-ant-success-text",processing:"border-ant-info-border bg-ant-info-bg text-ant-primary-active",default:"border-ant-border-card bg-ant-fill text-ant-secondary"}[this.statusKind(e)]},orderMeta(e){const t=this.formattingDate(e.order_create_stamp);return[t?`${t} 訂購`:"",e.order_logistics_option,e.order_payment_option].filter(
1Boolean).join(" · ")},addressLabel:e=>(e.order_logistics_option||"").includes("取貨")?"取貨門市":"出貨地址",invoiceDetail(e){const t=this.getInvoiceType(e);return t?0===t.type?e.order_donate_code&&"0"!==e.order_donate_code?`愛心碼 ${e.order_donate_code}`:"":e.order_invoice_number&&"0"!==e.order_invoice_number?e.order_invoice_number:"待開立":""},hasTrackingCode:e=>"0"!==e.order_tracking_number&&!!e.order_tracking_number,getTraceUrl(e){const t={"黑貓物流":"https://www.t-cat.com.tw/Inquire/Trace.aspx","新竹物流":"https://www.hct.com.tw/Search/SearchGoods_n.aspx","7-11取貨":"https://eservice.7-11.com.tw/e-tracking/search.aspx","全家取貨":"https://www.famiport.com.tw/Web_Famiport/page/process.aspx"};if("7-11取貨"===e.order_logistics_option){const r=(e.order_tracking_number||"").replace(/\D/g,"");if(12===r.length)return t["黑貓物流"];if(8===r.length||11===r.length)return t["7-11取貨"]}return t[e.order_logistics_option]||""},copyToClipBoard(e){document.querySelector(`#trace-code-${e}`).select(),document.execCommand("copy")},getInvoiceType(e){return this.invoiceTypes.find((t=>t.isEnable&&t.type===Number(e.order_need_invoice_status)))}}},q={class:"text-ant-text"},$={class:"container mx-auto mb-5 max-w-screen-md space-y-6 px-4 pb-14 pt-6"},N={class:"rounded-lg border border-ant-border-card bg-white shadow-card"},P=p("div",{class:"flex min-h-[56px] items-center border-b border-ant-split px-6 text-base font-semibold"}," 查詢訂單 ",-1),A={class:"space-y-6 p-6"},G={class:"flex items-start gap-2 rounded-lg border border-ant-info-border bg-ant-info-bg px-3 py-2 text-sm"},K=p("div",null,[p("div",{class:"font-medium"}," 由於資安因素,僅顯示半年內最後五筆訂單 "),p("div",{class:"text-ant-secondary"}," 如需查詢更多歷史訂單,請聯繫客服。 ")],-1),O=p("label",{for:"name",class:"mb-2 block text-sm leading-5"},[p("span",{class:"mr-1 text-ant-error"},"*"),_("姓名 ")],-1),W=p("label",{for:"phone",class:"mb-2 block text-sm leading-5"},[p("span",{class:"mr-1 text-ant-error"},"*"),_("電話 ")],-1),J={class:"flex"},Q={class:"relative flex-shrink-0"},R=[p("option",{disabled:""}," 國碼 ",-1),p("option",{selected:"",value:"886"}," 台灣 +886 ",-1),p("option",{value:"86"}," 中國 +86 ",-1),p("option",{value:"852"}," 香港 +852 ",-1),p("option",{value:"84"}," Việt Nam +84 ",-1),p("option",{value:"66"}," ประเทศไทย +66 ",-1),p("option",{value:""}," 其他 ",-1)],X={class:"md:col-span-2"},Y=p("label",{for:"validationCode",class:"mb-2 block text-sm leading-5"},[p("span",{class:"mr-1 text-ant-error"},"*"),_("驗證碼 ")],-1),Z={class:"flex"},ee=["disabled","onClick"],te={key:0},re={key:1},oe=p("div",{class:"mt-1 text-sm text-ant-secondary"}," 驗證碼 30 秒內可重新寄送一次 ",-1),ae={class:"md:col-span-2"},se=["disabled"],ne=_(" 查詢訂單 "),de={key:0,class:"flex items-start gap-2 rounded-lg border border-ant-error-border bg-ant-error-bg px-3 py-2 text-sm md:col-span-2"},ie={key:0,class:"py-12 text-center text-sm text-ant-secondary"},le=_(" 查無訂單,有需要請聯絡客服 "),ce={class:"flex items-baseline justify-between px-1"},pe=p("div",{class:"text-base font-semibold"}," 查詢結果 ",-1),me={class:"text-sm text-ant-secondary"},ue={class:"flex items-start justify-between gap-3 border-b border-ant-split px-4 py-3 md:px-6"},be={class:"min-w-0"},xe={class:"text-base font-semibold"},ge={class:"text-sm text-ant-secondary"},ve={class:"space-y-4 p-4 md:space-y-6 md:p-6"},he={class:"divide-y divide-ant-split overflow-hidden rounded-lg border border-ant-split text-sm"},ye={class:"grid grid-cols-desc-sm md:grid-cols-desc-md"},fe=p("dt",{class:"border-r border-ant-split bg-ant-fill px-3 py-2.5 text-ant-secondary md:px-6 md:py-3"}," 訂購日期 ",-1),_e=p("dt",{class:"border-r border-ant-split bg-ant-fill px-3 py-2.5 text-ant-secondary md:px-6 md:py-3"}," 發票 ",-1),we={class:"px-3 py-2.5 md:px-6 md:py-3"},ke={key:0,class:"text-ant-secondary"},Ce={key:1,class:"text-ant-secondary"},Me=p("br",null,null,-1),Ie={class:"grid grid-cols-desc-sm md:grid-cols-desc-md"},Se={class:"border-r border-ant-split bg-ant-fill px-3 py-2.5 text-ant-secondary md:px-6 md:py-3"},je={class:"px-3 py-2.5 md:col-span-3 md:px-6 md:py-3"},Te={key:0,class:"grid grid-cols-desc-sm md:grid-cols-desc-md"},Le=p("dt",{class:"border-r border-ant-split bg-ant-fill px-3 py-2.5 text-ant-secondary md:px-6 md:py-3"}," 出貨日 ",-1),Ve=p("dt",{class:"border-r border-ant-split bg-ant-fill px-3 py-2.5 text-ant-secondary md:px-6 md:py-3"}," 預計到貨日 ",-1),De={key:1,class:"grid grid-cols-desc-sm md:grid-cols-desc-md"},Ee=p("dt",{class:"border-r border-ant-split bg-ant-fill px-3 py-2.5 text-ant-secondary md:px-6 md:py-3"}," 追蹤碼 ",-1),ze={class:"flex flex-wrap items-center gap-1 px-3 py-1.5 md:col-span-3 md:px-6 md:py-2"},Be=["id","size","value"],He=["onClick"],Ue=["href"],Fe=_(" 查詢貨態 "),qe={key:2,class:"grid grid-cols-desc-sm md:grid-cols-desc-md"},$e=p("dt",{class:"border-r border-ant-split bg-ant-fill px-3 py-2.5 text-ant-secondary md:px-6 md:py-3"}," 備註 ",-1),Ne=["innerHTML"],Pe={key:0,class:"space-y-2"},Ae=p("div",{class:"text-sm font-semibold"}," 商品明細 ",-1),Ge={class:"divide-y divide-ant-split overflow-hidden rounded-lg border border-ant-split text-sm"},Ke=p("div",{class:"grid grid-cols-items bg-ant-fill font-semibold"},[p("div",{class:"px-3 py-2.5 md:px-4 md:py-3"}," 商品 "),p("div",{class:"px-3 py-2.5 text-right md:px-4 md:py-3"}," 數量 ")],-1),Oe={class:"px-3 py-2.5 md:px-4 md:py-3"},We={class:"px-3 py-2.5 text-right md:px-4 md:py-3"},Je={class:"flex items-baseline justify-between gap-3 rounded-b-lg border-t border-ant-split bg-ant-fill px-4 py-3 md:justify-end md:px-6 md:py-4"},Qe=p("span",{class:"text-sm text-ant-secondary"},"訂單金額",-1),Re={class:"text-lg font-semibold md:text-xl"};"function"==typeof U&&U(F),F.render=function(o,a,s,n,d,i){const w=l("InformationCircleIcon"),k=l("Field"),C=l("ErrorMessage"),M=l("ChevronDownIcon"),I=l("Spinner"),S=l("SearchIcon"),j=l("ExclamationCircleIcon"),T=l("Form"),L=l("InboxIcon"),V=l("ClipboardCopyIcon"),D=l("ExternalLinkIcon"),E=l("Article");return e(),c("div",q,[p("div",$,[p("div",N,[P,p("div",A,[p("div",G,[r(w,{class:"mt-1 h-4 w-4 flex-shrink-0 text-ant-primary"}),K]),r(T,{class:"grid grid-cols-1 gap-6 md:grid-cols-2","validation-schema":d.schema,onSubmit:i.onSubmit},{default:m((({handleSubmit:o})=>[p("div",null,[O,r(k,{id:"name",modelValue:d.name,"onUpdate:modelValue":a[0]||(a[0]=e=>d.name=e),name:"name",class:u(n.inputClass),placeholder:"請輸入訂購時填寫的姓名"},null,8,["modelValue","class"]),r(C,{name:"name",class:"mt-1 block text-sm text-ant-error"})]),p("div",null,[W,p("div",J,[p("div",Q,[b(p("select",{"onUpdate:modelValue":a[1]||(a[1]=e=>d.countryCode=e),class:"h-10 appearance-none rounded-l-md border border-ant-border bg-ant-fill bg-none pl-3 pr-8 text-base transition hover:border-ant-primary-hover focus:z-10 focus:border-ant-primary-hover focus:outline-none focus:ring-2 focus:ring-ant-primary focus:ring-opacity-10"},R,512),[[x,d.countryCode]]),r(M,{class:"pointer-events-none absolute right-2 top-3 h-4 w-4 text-ant-tertiary"})]),b(p("input",{"onUpdate:modelValue":a[2]||(a[2]=e=>d.phone=e),type:"hidden"},null,512),[[g,d.phone,void 0,{trim:!0}]]),r(k,{id:"phone",modelValue:d.phone,"onUpdate:modelValue":a[3]||(a[3]=e=>d.phone=e),modelModifiers:{trim:!0},name:"phone",class:u([n.inputClass,"-ml-px min-w-0 flex-1 rounded-l-none"]),placeholder:"0987654321",inputmode:"tel"},null,8,["modelValue","class"])]),r(C,{name:"phone",class:"mt-1 block text-sm text-ant-error"})]),p("div",X,[Y,p("div",Z,[r(k,{id:"validationCode",modelValue:d.validationCode,"onUpdate:modelValue":a[4]||(a[4]=e=>d.validationCode=e),type:"text",name:"validationCode",placeholder:"請輸入簡訊收到的 4 位數驗證碼",inputmode:"numeric",maxlength:"4",class:u([n.inputClass,"min-w-0 flex-1 rounded-r-none"]),required:""},null,8,["modelValue","class"]),p("button",{class:"-ml-px h-10 whitespace-nowrap rounded-r-md border border-ant-border bg-white px-5 text-base text-ant-text transition hover:z-10 hover:border-ant-primary-hover hover:text-ant-primary-hover focus:outline-none disabled:cursor-not-allowed disabled:bg-ant-fill disabled:text-ant-tertiary disabled:hover:border-ant-border",type:"button",disabled:n.seconds>0,onClick:e=>o(e,i.sendValidationCode)},[n.seconds>
10?(e(),c("span",te,v(n.seconds)+" 秒後可重新寄送",1)):(e(),c("span",re,"寄送驗證碼"))],8,ee)]),oe,r(C,{name:"validationCode",class:"mt-1 block text-sm text-ant-error"})]),p("div",ae,[p("button",{class:"flex h-10 w-full items-center justify-center gap-2 rounded-md bg-ant-primary px-6 text-base text-white shadow-btn-primary transition hover:bg-ant-primary-hover active:bg-ant-primary-active focus:outline-none disabled:cursor-not-allowed disabled:bg-ant-fill disabled:text-ant-tertiary disabled:shadow-none md:w-auto",disabled:d.isLoading},[d.isLoading?(e(),t(I,{key:0,class:"mr-2"})):(e(),t(S,{key:1,class:"h-4 w-4"})),ne],8,se)]),d.errorMessage?(e(),c("div",de,[r(j,{class:"mt-1 h-4 w-4 flex-shrink-0 text-ant-error"}),p("div",null,v(d.errorMessage),1)])):h("",!0)])),_:1},8,["validation-schema","onSubmit"])])]),d.hasSearched&&0===d.orders.length?(e(),c("div",ie,[r(L,{class:"mx-auto mb-2 h-12 w-12 text-gray-300"}),le])):h("",!0),d.orders.length?(e(),c(y,{key:1},[p("div",ce,[pe,p("div",me," 共 "+v(d.orders.length)+" 筆訂單 ",1)]),(e(!0),c(y,null,f(d.orders,(t=>(e(),c("div",{key:t.order_id,class:"rounded-lg border border-ant-border-card bg-white shadow-card"},[p("div",ue,[p("div",be,[p("div",xe," 訂單 #"+v(t.order_id),1),p("div",ge,v(i.orderMeta(t)),1)]),p("span",{class:u(["inline-flex h-[22px] flex-shrink-0 items-center whitespace-nowrap rounded border px-2 text-xs",i.statusTagClass(t.order_status)])},v(t.order_status),3)]),p("div",ve,[p("dl",he,[p("div",ye,[fe,p("dd",{class:u(["px-3 py-2.5 md:px-6 md:py-3",i.getInvoiceType(t)?"border-b border-ant-split md:border-b-0 md:border-r":"md:col-span-3"])},v(n.formattingDate(t.order_create_stamp)||"—"),3),i.getInvoiceType(t)?(e(),c(y,{key:0},[_e,p("dd",we,[_(v(i.getInvoiceType(t).name)+" ",1),i.invoiceDetail(t)?(e(),c("span",ke,"· "+v(i.invoiceDetail(t)),1)):h("",!0),2===i.getInvoiceType(t).type?(e(),c("div",Ce,[_(v(t.order_invnid)+" "+v(t.order_invtitle),1),Me,_(" "+v(t.order_invoice_address),1)])):h("",!0)])],64)):h("",!0)]),p("div",Ie,[p("dt",Se,v(i.addressLabel(t)),1),p("dd",je,v(t.order_member_address),1)]),null!==t.order_shipping_date||void 0!==n.arrival_limit_days?(e(),c("div",Te,[Le,p("dd",{class:u(["px-3 py-2.5 md:px-6 md:py-3",[void 0!==n.arrival_limit_days?"border-b border-ant-split md:border-b-0 md:border-r":"md:col-span-3",n.formattingDate(t.order_shipping_date)?"":"text-ant-secondary"]])},v(n.formattingDate(t.order_shipping_date)||"尚未出貨"),3),void 0!==n.arrival_limit_days?(e(),c(y,{key:0},[Ve,p("dd",{class:u(["px-3 py-2.5 md:px-6 md:py-3",n.formattingDate(t.order_arrival_date)?"":"text-ant-secondary"])},v(n.formattingDate(t.order_arrival_date)||"出貨後更新"),3)],64)):h("",!0)])):h("",!0),i.hasTrackingCode(t)?(e(),c("div",De,[Ee,p("dd",ze,[p("input",{id:`trace-code-${t.order_id}`,type:"text",class:"max-w-full border-0 bg-transparent p-0 text-sm tabular-nums focus:outline-none focus:ring-0",size:String(t.order_tracking_number).length+2,readonly:"",value:t.order_tracking_number},null,8,Be),p("button",{class:"inline-flex h-8 w-8 items-center justify-center rounded-md text-ant-secondary transition hover:bg-ant-fill hover:text-ant-primary focus:outline-none",type:"button",title:"複製追蹤碼",onClick:e=>i.copyToClipBoard(t.order_id)},[r(V,{class:"h-4 w-4"})],8,He),i.getTraceUrl(t)?(e(),c("a",{key:0,class:"ml-2 inline-flex items-center gap-1 whitespace-nowrap text-ant-primary hover:text-ant-primary-hover",target:"_blank",href:i.getTraceUrl(t)},[Fe,r(D,{class:"h-3.5 w-3.5"})],8,Ue)):h("",!0)])])):h("",!0),t.order_notes?(e(),c("div",qe,[$e,p("dd",{class:"px-3 py-2.5 md:col-span-3 md:px-6 md:py-3",innerHTML:n.nl2br(t.order_notes)},null,8,Ne)])):h("",!0)]),t.order_carts&&t.order_carts.length?(e(),c("div",Pe,[Ae,p("div",Ge,[Ke,(e(!0),c(y,null,f(t.order_carts,(t=>(e(),c("div",{key:t.cart_id,class:"grid grid-cols-items"},[p("div",Oe,v(t.cart_product_name),1),p("div",We,v(t.cart_package_qty),1)])))),128))])])):h("",!0)]),p("div",Je,[Qe,p("span",Re,v(n.currencySymbol)+" "+v(t.order_total),1)])])))),128))],64)):h("",!0)]),s.content?(e(),t(E,{key:0,content:s.content},null,8,["content"])):h("",!0)])};export{F 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.