1import{_ as ce,A as pe,x as O,D as ue,aT as fe,a as be,d as me,q as y,L as xe}from"./entry.CGgvWIq9.js";import{a as u,i as _e,A as j,b as $,ab as ve,k as he,r as we,ae as Y,E as x,F as _,R as ye,a1 as d,G as e,X as ge,$ as v,V as C,Z as b,u as t,a3 as i,aL as Ie,Y as M,av as W,W as B,ag as m,ao as Se,ap as Ve}from"./swiper-vue.-M1go58E.js";import{_ as ke}from"./vue3-recaptcha2.es.Z_McP7gs.js";import{_ as Re}from"./FormButtonMemberInfo.BYj_MgJb.js";const r=h=>(Se("data-v-c751888e"),h=h(),Ve(),h),Le=["data-nosnippet"],Ce=r(()=>e("h4",{class:"text-center text-3xl font-bold text-secondary-700"},"填寫表å®è«®è©¢èª²ç¨åªæ ",-1)),Ne=r(()=>e("p",{class:"mb-4 mt-2 text-center text-lg text-base-400"}," è«å¡«å¯«è¡¨æ ¼å
§å¿
è¦è¨æ¯ï¼é¡§åå°å¡å°å¨æ¶å°è¨æ¯å¾åéçºæ¨æåï¼è¬è¬ã ",-1)),Ae={class:"flex flex-wrap justify-center gap-x-2"},Te=r(()=>e("label",{class:"relative flex-[0_1_auto] bg-base-50 px-[8px] py-[12px] text-center font-bold after:absolute after:inset-y-0 after:right-0 after:m-auto after:h-[60%] after:w-[2px] after:bg-base-200 after:content-['']"},"ç實å§å",-1)),Ee={class:"h-4 w-full text-left text-sm text-red-500"},Ue=r(()=>e("label",{class:"relative flex-[0_1_auto] bg-base-50 px-[8px] py-[12px] text-center font-bold after:absolute after:inset-y-0 after:right-0 after:m-auto after:h-[60%] after:w-[2px] after:bg-base-200 after:content-['']"},"é»åä¿¡ç®±",-1)),De={class:"h-4 w-full text-left text-sm text-red-500"},qe=r(()=>e("label",{class:"relative flex-[0_1_auto] bg-base-50 px-[8px] py-[12px] text-center font-bold after:absolute after:inset-y-0 after:right-0 after:m-auto after:h-[60%] after:w-[2px] after:bg-base-200 after:content-['']"},"è¡åé»è©±",-1)),Fe={class:"h-4 w-full text-left text-sm text-red-500"},Oe=r(()=>e("label",{class:"relative flex-[0_1_auto] bg-base-50 px-[8px] py-[12px] text-center font-bold after:absolute after:inset-y-0 after:right-0 after:m-auto after:h-[60%] after:w-[2px] after:bg-base-200 after:content-['']"},"Line ID",-1)),je={class:"h-4 w-full text-left text-sm text-red-500"},$e={class:"flex flex-wrap justify-center overflow-hidden rounded-sm border border-solid border-transparent"},Ye=r(()=>e("label",{class:"relative flex-[0_1_auto] bg-base-50 px-[8px] py-[12px] text-center font-bold after:absolute after:inset-y-0 after:right-0 after:m-auto after:h-[60%] after:w-[2px] after:bg-base-200 after:content-['']"},"è¯çµ¡æé",-1)),Me=r(()=>e("option",{value:"0"},"å
¨å¤©çå¯",-1)),We=r(()=>e("option",{value:"1"},"æ©ä¸",-1)),Be=r(()=>e("option",{value:"2"},"ä¸å",-1)),Ge=r(()=>e("option",{value:"3"},"ä¸å",-1)),Pe=r(()=>e("option",{value:"4"},"æä¸",-1)),Xe=[Me,We,Be,Ge,Pe],ze=r(()=>e("div",{class:"h-4 w-full text-left text-sm text-red-500"},null,-1)),Qe=r(()=>e("label",{class:"relative flex-[0_1_auto] bg-base-50 px-[8px] py-[12px] text-center font-bold after:absolute after:inset-y-0 after:right-0 after:m-auto after:h-[60%] after:w-[2px] after:bg-base-200 after:content-['']"},"諮詢å°å",-1)),Ze=r(()=>e("option",{value:"",disabled:""},"è«é¸æâ¦",-1)),He=r(()=>e("option",{value:1},"ç·ä¸è«®è©¢",-1)),Je=r(()=>e("option",{value:"",disabled:""},"-實é«éå¸-",-1)),Ke=["value"],et=r(()=>e("label",{class:"relative w-full bg-base-50 px-[8px] py-[12px] font-bold leading-[1.3] after:absolute after:inset-x-0 after:bottom-0 after:m-auto after:h-[1px] after:w-[99%] after:bg-base-200 after:content-['']"},"諮詢å
§å®¹",-1)),tt={class:"h-4 w-full text-left text-sm text-red-500"},at={class:"mb-2 block"},ot={class:"inline-block text-sm text-red-500"},lt={class:"mb-2 block"},st={class:"inline-block text-sm text-red-500"},nt={class:"text-center"},rt=["src","alt","title"],dt="6LcUhbUUAAAAALfm5nNyPpU07kB64EZIYGZFXbR7",it={__name:"StoreConsultForm",props:{qrcodeText:{type:Array,default:null},qrcodeLink:{type:String,default:""},qrcodeSrc:{type:String,default:""},typeCode:{type:String,required:!0},typeId:{type:[Number,String],required:!0},selectedLocationId:{type:[Number,String],default:""},nosnippet:{type:Boolean,default:!0}},setup(h){var q;const c=h,{$storeConsultSchema:G,$fieldLimits:P}=pe(),g=u(!1);typeof c.qrcodeSrc=="string"&&c.qrcodeSrc!==""?g.value=!0:g.value=!1;const X=_e("windowResize",u(null)),V=u(null),I=u(0);j(()=>{I.value=V.value.offsetWidth}),$(X,()=>{I.value=V.value.offsetWidth});const{typeCode:z,selectedLocationId:k}=ve(c),Q=he(()=>Number(c.typeId)||0),Z=u([{typeCode:"ENGLISH",webId:["Y"]},{typeCode:"UNIVERSITY_ARTICLE",webId:["R"]},{typeCode:"UNIVERSITY_COMMENT",webId:["R"]},{typeCode:"UNIVERSITY_EXAM",webId:["R"]},{typeCode:"UNIVERSITY_INDEX",webId:["R"]},{typeCode:"UNIVERSITY_LECTURE",webId:["R"]},{typeCode:"UNIVERSITY_NEWS",webId:["R"]},{typeCode:"UNIVERSITY_VIDEO",webId:["R"]},{typeCode:"LOCATIONS",webId:["R","T"]}]),R=u((q=Z.value.find(l=>l.typeCode===c.typeCode))==null?void 0:q.webId),{execute:H,loading:L}=O(),w=u([]),N=u(!1),A=()=>k.value?k.value:(N.value?w.value.length>0:!!R.value)?"":1;async function J(){try{if(!R.value)return;
1const l=await H("/api/form/locations",{method:"post",body:{web:R.value}});w.value=l.data}catch(l){console.error("APIé¯èª¤ï¼2.7.2 ä¾ç¶²ç«å®ä½åå¾è«®è©¢å°å:",l)}finally{N.value=!0,o.webLocationId=A()}}j(J);const{execute:K}=O(),{getPageSourceBody:ee}=ue(),T=u(null),S=u(),E=u(null),{getFormMarketingDataForApi:te,clearFormMarketingData:ae}=fe(),U=()=>{const{printId:l,adNo:a}=te();return{typeCode:z,typeId:Q,name:"",email:"",phone:"",lineId:"",webLocationId:A(),contactTime:"0",memo:"",isRead:!1,isSaleAgree:!1,...l?{printId:l}:{},...a?{adNo:a}:{}}},o=we(U()),oe=l=>{o.name=l.name,o.email=l.email,o.phone=l.phone},le=l=>{S.value=l},D=l=>{S.value=null,y({type:"warning",message:l==="expire"?"æ©å¨äººé©è已龿ï¼è«éæ°å¾é¸":"æ©å¨äººé©è失æï¼è«éæ°å¾é¸"})},se=()=>{var l;(l=T.value)==null||l.reset(),S.value=null},ne=({errors:l})=>{y({type:"warning",message:Object.values(l).find(Boolean)||"è«ç¢ºèªè¡¨å®æ¬ä½æ¯å¦æ£ç¢ºå¡«å¯«"})},re=()=>{delete o.printId,delete o.adNo,Object.assign(o,U()),E.value.resetForm({values:{...o}})},de=async()=>{var a,p;if(!S.value){y({type:"warning",message:"è«å¾é¸æ©å¨äººé©è"});return}const l=JSON.stringify({...o,...ee()});try{await K("/api/form/add",{method:"post",body:l});const{trackformSubmit:f}=xe();f("GO填表"),y({type:"success",message:"æ¨å¡«å¯«çè³æå·²éåºï¼è«çå¾
客æäººå¡èæ¨è¯ç¹«ï¼è¬è¬"}),ae(),re(),se()}catch(f){console.error("APIé¯èª¤ï¼2.7.1 æ°å¢è¡¨å®",f),y({type:"warning",message:((p=(a=f==null?void 0:f.data)==null?void 0:a.data)==null?void 0:p.message)||"表å®ç¼é失æ"})}};return $(k,l=>{o.webLocationId=l}),(l,a)=>{const p=Y("Field"),f=be,ie=Y("Form");return _(),x("div",{ref_key:"refElementWrapper",ref:V,"data-nosnippet":c.nosnippet?"":null},[ye(l.$slots,"default",{},()=>[Ce,Ne],!0),d(Re,{class:"mb-4",onUserData:oe}),e("div",Ae,[d(ie,{ref_key:"form",ref:E,"validation-schema":t(G),class:b([t(g)&&t(I)>=920?"flex-1":"","w-full"]),onSubmit:a[11]||(a[11]=n=>de()),onInvalidSubmit:ne},{default:v(({errors:n,isSubmitting:F})=>[e("div",{class:b([n.name?"border-red-500":"border-transparent","flex flex-wrap items-center justify-center overflow-hidden rounded-sm border border-solid"])},[Te,d(p,{modelValue:t(o).name,"onUpdate:modelValue":a[0]||(a[0]=s=>t(o).name=s),name:"name",label:"ç實å§å",class:"w-full flex-[1_1_0] overflow-hidden bg-base-50 px-[8px] py-[12px] focus:outline-none",placeholder:"è«è¼¸å
¥ç實å§å",type:"text"},null,8,["modelValue"])],2),e("div",Ee,i(n.name),1),e("div",{class:b([n.email?"border-red-500":"border-transparent","flex flex-wrap items-center justify-center overflow-hidden rounded-sm border border-solid"])},[Ue,d(p,{modelValue:t(o).email,"onUpdate:modelValue":a[1]||(a[1]=s=>t(o).email=s),name:"email",class:"w-full flex-[1_1_0] overflow-hidden bg-base-50 px-[8px] py-[12px] focus:outline-none",type:"text",label:"é»åä¿¡ç®±",placeholder:"ç¯ä¾ï¼[email protected]"},null,8,["modelValue"])],2),e("div",De,i(n.email),1),e("div",{class:b([n.phone?"border-red-500":"border-transparent","flex flex-wrap items-center justify-center overflow-hidden rounded-sm border border-solid"])},[qe,d(p,{modelValue:t(o).phone,"onUpdate:modelValue":a[2]||(a[2]=s=>t(o).phone=s),name:"phone",type:"text",label:"è¡åé»è©±",placeholder:"ç¯ä¾ï¼09xxxxxxxx",class:"w-full flex-[1_1_0] overflow-hidden bg-base-50 px-[8px] py-[12px] focus:outline-none"},null,8,["modelValue"])],2),e("div",Fe,i(n.phone),1),e("div",{class:b([n.lineId?"border-red-500":"border-transparent","flex flex-wrap items-center justify-center overflow-hidden rounded-sm border border-solid"])},[Oe,d(p,{modelValue:t(o).lineId,"onUpdate:modelValue":a[3]||(a[3]=s=>t(o).lineId=s),name:"lineId",type:"text",label:"Line ID",placeholder:"ID",class:"w-full flex-[1_1_0] overflow-hidden bg-base-50 px-[8px] py-[12px] focus:outline-none"},null,8,["modelValue"])],2),e("div",je,i(n.lineId),1),e("div",$e,[Ye,C(e("select",{"onUpdate:modelValue":a[4]||(a[4]=s=>t(o).contactTime=s),name:"contactTime",class:"w-full flex-[1_1_0] overflow-hidden bg-base-50 px-[8px] py-[12px] outline-none"},Xe,512),[[Ie,t(o).contactTime]])]),ze,C(e("div",{class:b([n.webLocationId?"border-red-500":"border-transparent","flex flex-wrap justify-center overflow-hidden rounded-sm border border-solid"])},[Qe,d(p,{modelValue:t(o).webLocationId,"onUpdate:modelValue":a[5]||(a[5]=s=>t(o).webLocationId=s),label:"諮詢å°å",as:"select",name:"webLocationId",disabled:t(L),class:"w-full flex-[1_1_0] overflow-hidden bg-base-50 px-[8px] py-[12px] outline-none"},{default:v(()=>[Ze,He,Je,(_(!0),x(M,null,W(t(w),s=>(_(),x("option",{key:s.id,value:s.id},i(s.location)+"-"+i(s.address),9,Ke))),128))]),_:1},8,["modelValue","disabled"])],2),[[B,t(L)||t(w).length>0]]),C(e("div",{class:"h-4 w-full text-left text-sm text-red-500"},i(n.webLocationId),513),[[B,t(L)||t(w).length>0]]),e("div",{class:b([n.memo?"border-red-500":"border-transparent","flex flex-wrap items-center justify-center overflow-hidden rounded-sm border border-solid"])},[et,d(p,{modelValue:t(o).memo,"onUpdate:modelValue":a[6]||(a[6]=s=>t(o).memo=s),as:"textarea",class:"h-[175px] max-h-[175px] w-full overflow-auto bg-base-50 p-2 outline-none",name:"memo",label:"諮詢å
§å®¹",rows:"4",placeholder:`è«ç°¡è¿°æ¨æ³è«®è©¢çå
§å®¹ï¼${t(P).question} å以å
§ï¼`},null,8,["modelValue","placeholder"])],2),e("div",tt,i(n.memo),1),e("label",at,[d(p,{modelValue:t(o).isRead,"onUpdate:modelValue":a[7]||(a[7]=s=>t(o).isRead=s),class:b(["mr-[3px]",{" unchecked ":n.isRead}]),name:"isRead",label:"æ¤æ¬ä½",type:"checkbox","true-value":1,"false-value":0,value:!0},null,8,["modelValue","class"]),m("æ¬äººå·²çè§£åé±è® "),d(f,{class:"border-b border-solid border-link text-link",to:"/service/toWebQA?faq_id=2",target:"_blank"},{default:v(()=>[m("æå¡æ¬ç說æ ")]),_:1}),m("è· "),d(f,{class:"border-b border-solid border-link text-link",to:"/service/toWebQA?faq_id=160",target:"_blank"},{default:v(()=>[m("åè³æ³ç¸éè¦ç¯")]),_:1}),m("ã "),e("span",ot,i(n.isRead),1)]),e("label",lt,[d(p,{modelValue:t(o).isSaleAgree,"onUpdate:modelValue":a[8]||(a[8]=s=>t(o).isSaleAgree=s),class:b(["mr-[3px]",{" unchecked ":n.isSaleAgree}]),name:"isSaleAgree",type:"checkbox",label:"æ¤æ¬ä½",value:!0},null,8,["modelValue","class"]),m("æ¬äººé¡ææä¾è¡¨å®è³æçµ¦èºç£ç¥è庫ç¸é伿¥ã "),e("span",st,i(n.isSaleAgree),1)]),d(t(ke),{ref_key:"recaptcha",ref:T,sitekey:dt,onVerify:le,onExpire:a[9]||(a[9]=s=>D("expire")),onFail:a[10]||(a[10]=s=>D("fail"))},null,512),d(me,{disabled:F},{default:v(()=>[m(i(F?"éåºä¸":"è³æéåº"),1)]),_:2},1032,["disabled"])]),_:1},8,["validation-schema","class"]),t(g)?(_(),x("div",{key:0,class:b(t(I)>=920?"w-[200px] flex-initial":"w-3/5")},[e("div",nt,[(_(!0),x(M,null,W(c.qrcodeText,n=>(_(),x("div",{key:n},i(n),1))),128))]),d(f,{to:c.qrcodeLink,class:"block"},{default:v(()=>[e("img",{class:"block w-full",src:c.qrcodeSrc,alt:c.qrcodeText,title:c.qrcodeText},null,8,rt)]),_:1},8,["to"])],2)):ge("",!0)])],8,Le)}}},bt=ce(it,[["__scopeId","data-v-c751888e"]]);export{bt as S};
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.