1import{E as B}from"./DfnPil3h.js";import{E as D,a as $}from"./DOazv29h.js";import{a as O,E as j}from"./DnJ0UX5i.js";import{p as G,N as M,a as Y,d as Z,e as c,f as d,g as t,P as x,Z as U,F as C,r as b,j as a,k as r,v as H,E as J,z as n,T as m,s as p,I as K,t as Q,n as X,q as ee,L as te,W as se,_ as oe}from"./PibMVjtL.js";import{_ as ae}from"./BmVh749p.js";import{_ as le}from"./Z4C0-6LW.js";import{s as N}from"./OEk43jwc.js";import"./ClslwFr-.js";import"./BufHyZLV.js";import"./CxoMENoO.js";import"./BE5vQZyN.js";import"./C3gAQFKy.js";import"./C8X9cIez.js";import"./Dkap69c8.js";const re=G("/image/icon_wechat.png"),ie={class:"create_contact_page"},ne={class:"container"},ue={class:"cant_find_form_block"},ce={class:"cant_find_image_list"},de={class:"image_list"},me=["src"],pe=["onClick"],_e={class:"contact_item_box"},ye={class:"category_list"},ve={class:"form_result_block"},fe={class:"cant_find_image_list"},ge={class:"image_list"},Ce=["src"],be={class:"flex_box"},he={class:"contact_us"},we={class:"contact_item"},ke={class:"right"},qe={class:"contact_item"},xe={class:"right"},Ue=M({__name:"createContact",setup(Ne){const E=se(),f=n(!1),_=n([]),h=n(""),w=n([]),I=n([]),g=n(),V=Y(),l=n({userName:"",inquiryNo:"",userContact:"",contactType:0,remark:"",inquiryImageUrl:[],merchantCategoryUuid:[]}),S=n({userName:[{required:!0,message:"Please enter your name",trigger:["blur"]}],userContact:[{required:!0,message:"Please enter your contact number",trigger:["blur"]}],contactType:[{required:!0,message:"Please select your contact method",trigger:["change"]}]}),F=async()=>{try{let s={inquiryNo:h.value,flag:1},e=await N.getContactDetail(s);if(e.code===200){const{inquiryImageUrlList:u,merchantCategoryList:i,contactList:y}=e.data||{};_.value=u||[],l.value.inquiryImageUrl=u||[],w.value=i||[],I.value=y||[]}}catch(s){m.error(s.message||"Failed to get inquiry detail")}},L=async()=>{g.value&&await g.value.validate(async s=>{if(s)try{await N.createContact(l.value),f.value=!0}catch(e){m.error(e.message||"Failed to submit inquiry")}else m.error("Please fill in all required fields")})},T=s=>{const e=l.value.merchantCategoryUuid.indexOf(s);e>-1?l.value.merchantCategoryUuid.splice(e,1):l.value.merchantCategoryUuid.push(s)},P=s=>{if(_.value.length===1){m.error("At least one image is required");return}_.value.splice(s,1)},k=s=>{const e=document.createElement("textarea");e.readOnly=!0,e.style.position="absolute",e.style.left="-9999px",e.value=s,document.body.appendChild(e),e.select(),document.execCommand("Copy")?m.success("Copied successfully"):m.error("Copy failed"),document.body.removeChild(e)},A=()=>{const s=V.whatsAppUrl;s&&window.open(s,"_blank")};return Z(()=>E.query.inquiryNo,s=>{s&&(h.value=s,l.value.inquiryNo=s,F())},{immediate:!0}),(s,e)=>{const u=B,i=$,y=j,R=O,v=J,W=D,z=H;return c(),d("div",ie,[t("div",ne,[x(t("div",ue,[e[10]||(e[10]=t("div",{class:"form_result_title"},"I can't find it?",-1)),e[11]||(e[11]=t("div",{class:"form_result_desc"}," In order to provide you with professional services, please provide the following information, and we will arrange people to contact you. ",-1)),t("div",ce,[e[6]||(e[6]=t("div",{class:"title"},"The products that I want to inquiry ",-1)),t("div",de,[(c(!0),d(C,null,b(_.value,(o,q)=>(c(),d("div",{class:"image_item",key:o.url},[t("img",{class:"pic",src:o,alt:""},null,8,me),t("img",{onClick:Ee=>P(q),class:"close",src:ae,alt:""},null,8,pe)]))),128))])]),a(W,{ref_key:"inquiryFormRef",ref:g,model:l.value,"label-width":"auto","label-position":"top",size:"default",rules:S.value},{default:r(()=>[a(i,{label:"Name",prop:"userName"},{default:r(()=>[a(u,{class:"form_input",placeholder:"Pls fill with your full name",modelValue:l.value.userName,"onUpdate:modelValue":e[0]||(e[0]=o=>l.value.userName=o)},null,8,["modelValue"])]),_:1}),t("div",_e,[a(i,{label:"Contact",class:"contact_item_left",prop:"contactType"},{default:r(()=>[a(R,{modelValue:l.value.contactType,"onUpdate:modelValue":e[1]||(e[1]=o=>l.value.contactType=o),class:"custom_radio_group"},{default:r(()=>[a(y,{value:0},{default:r(()=>[...e[7]||(e[7]=[p("WhatsApp",-1)])]),_:1}),a(y,{value:1},{default:r(()=>[...e[8]||(e[8]=[p("WeChat",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),a(i,{label:"",class:"contact_item_right",prop:"userContact"},{default:r(()=>[a(u,{class:"form_input",placeholder:"Please enter your WhatsApp number",modelValue:l.value.userContact,"onUpdate:modelValue":e[2]||(e[2]=o=>l.value.userContact=o)},null,8,["modelValue"])]),_:1})]),a(i,{label:"Commodity categories",prop:"merchantCategoryUuid"},{default:r(()=>[t("div",ye,[(c(!0),d(C,null,b(w.value,o=>(c(),K(v,{class:X(["category_item",{cur:l.value.merchantCategoryUuid.includes(o.categoryUuid)}]),key:o.categoryUuid,onClick:q=>T(o.categoryUuid)},{default:r(()=>[p(Q(o.name),1)]),_:2},1032,["class","onClick"]))),128))])]),_:1}),a(i,{label:"Remark",prop:"remark"},{default:r(()=>[a(u,{class:"form_input",maxlength:"500",rows:6,"show-word-limit":"",type:"textarea",placeholder:"Description",modelValue:l.value.remark,"onUpdate:modelValue":e[3]||(e[3]=o=>l.value.remark=o)},null,8,["modelValue"])]),_:1}),a(i,{style:{"margin-bottom":"0px"}},{default:r(()=>[a(v,{class:"submit_btn",type:"primary",onClick:L},{default:r(()=>[...e[9]||(e[9]=[p("Submit",-1)])]),_:1})]),_:1})]),_:1},8,["model","rules"])],512),[[U,!f.value]]),x(t("div",ve,[e[19]||(e[19]=t("div",{class:"form_result_title"},"Submitted successfully",-1)),e[20]||(e[20]=t("div",{class:"form_result_desc"}," We will reply in 24 hours , Pls note your inbox ",-1)),t("div",fe,[e[12]||(e[12]=t("div",{class:"title"},"The products that I want to inquiry ",-1)),t("div",ge,[(c(!0),d(C,null,b(l.value.inquiryImageUrl,o=>(c(),d("div",{class:"image_item",key:o},[t("img",{class:"pic",src:o,alt:""},null,8,Ce)]))),128))])]),t("div",be,[e[14]||(e[14]=t("div",{class:"tip_text"}," You can also add the manager of the customer service for your own inquiry service ",-1)),t("div",{class:"contact_service",onClick:A},[e[13]||(e[13]=t("div",null,"Contact Customer Service",-1)),a(z,null,{default:r(()=>[a(ee(te))]),_:1})])]),t("div",he,[t("div",we,[e[16]||(e[16]=t("div",{class:"left"},[t("img",{class:"icon",src:re,alt:""}),t("span",null,"Wechat:"),t("span",{class:"text"},"galaxywe18")],-1)),t("div",ke,[a(v,{class:"copy_btn",type:"primary",size:"small",onClick:e[4]||(e[4]=o=>k("galaxywe18"))},{default:r(()=>[...e[15]||(e[15]=[p("Copy",-1)])]),_:1})])]),t("div",qe,[e[18]||(e[18]=t("div",{class:"left"},[t("img",{class:"icon",src:le,alt:""}),t("span",null,"WhatsApp:"),t("span",{class:"text"},"+86 13138277323")],-1)),t("div",xe,[a(v,{class:"copy_btn",type:"primary",size:"small",onClick:e[5]||(e[5]=o=>k("+86 13138277323"))},{default:r(()=>[...e[17]||(e[17]=[p("Copy",-1)])]),_:1})])])])],512),[[U,f.value]])])])}}}),Oe=oe(Ue,[["__scopeId","data-v-2e4cb513"]]);export{Oe 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.