1 |
- import{d as R,i as W,r as i,f as X,m as H,o as v,x as b,w as a,g as e,a as l,q as V,y as Y,c as Z,F as ee,v as ae,t as le,Q as C,h as E,B as te,E as oe,aj as re,ak as de,j as ue,X as se,aW as ie,D as ne,G as me,az as pe,J as _e,_ as ce,__tla as ge}from"./index-3600b653.js";import{_ as fe,__tla as ve}from"./Dialog-2ee66425.js";import{E as Ve,__tla as he}from"./el-time-select-e0e34004.js";import{_ as ye,__tla as be}from"./UploadImg-d1a562e2.js";import{a as we,c as Ue,u as Te,__tla as xe}from"./index-59c45269.js";import{a as qe,D as ke,__tla as Ae}from"./dict-6979570e.js";import{C as I}from"./constants-d55a3460.js";import{d as Se}from"./tree-0af4953a.js";import{g as Ce,__tla as Ee}from"./index-ad53fe73.js";import{g as Ie,__tla as Pe}from"./index-695b8360.js";import{u as ze,__tla as Be}from"./useMessage-fbff8984.js";import{__tla as Le}from"./index-5e3a76d3.js";import{__tla as Fe}from"./el-image-viewer-25ebd18c.js";let P,Ne=Promise.all([(()=>{try{return ge}catch{}})(),(()=>{try{return ve}catch{}})(),(()=>{try{return he}catch{}})(),(()=>{try{return be}catch{}})(),(()=>{try{return xe}catch{}})(),(()=>{try{return Ae}catch{}})(),(()=>{try{return Ee}catch{}})(),(()=>{try{return Pe}catch{}})(),(()=>{try{return Be}catch{}})(),(()=>{try{return Le}catch{}})(),(()=>{try{return Fe}catch{}})()]).then(async()=>{let w,U;w=E("div",{style:{"font-size":"10px"},class:"pl-10px"},"\u63A8\u8350 180x180 \u56FE\u7247\u5206\u8FA8\u7387",-1),U=["src"],P=ce(R({__name:"PickUpStoreForm",emits:["success"],setup(De,{expose:z,emit:B}){const{t:h}=W(),T=ze(),n=i(!1),_=i(!1),x=i(""),m=i(!1),q=i(""),r=i({id:void 0,name:"",phone:"",logo:"",detailAddress:"",introduction:"",areaId:0,openingTime:void 0,closingTime:void 0,latitude:void 0,longitude:void 0,status:I.ENABLE}),L=X({name:[{required:!0,message:"\u95E8\u5E97\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],logo:[{required:!0,message:"\u95E8\u5E97 logo \u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],phone:[{required:!0,message:"\u95E8\u5E97\u624B\u673A\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"},{pattern:/^1[3|4|5|6|7|8|9][0-9]\d{8}$/,message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u7801",trigger:"blur"}],areaId:[{required:!0,message:"\u95E8\u5E97\u6240\u5728\u533A\u57DF\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],detailAddress:[{required:!0,message:"\u95E8\u5E97\u8BE6\u7EC6\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],openingTime:[{required:!0,message:"\u8425\u4E1A\u5F00\u59CB\u65F6\u95F4\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],closingTime:[{required:!0,message:"\u8425\u4E1A\u7ED3\u675F\u65F6\u95F4\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],latitude:[{required:!0,message:"\u7EAC\u5EA6\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],longitude:[{required:!0,message:"\u7ECF\u5EA6\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],status:[{required:!0,message:"\u5F00\u542F\u72B6\u6001\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),f=i(),k=i(),A=i("");z({open:async(d,t)=>{if(n.value=!0,x.value=h("action."+d),q.value=d,D(),t){m.value=!0;try{r.value=await we(t)}finally{m.value=!1}}}});const F=B,N=async()=>{if(f&&await f.value.validate()){m.value=!0;try{const d=r.value;q.value==="create"?(await Ue(d),T.success(h("common.createSuccess"))):(await Te(d),T.success(h("common.updateSuccess"))),n.value=!1,F("success")}finally{m.value=!1}}},D=()=>{var d;r.value={id:void 0,name:"",phone:"",logo:"",detailAddress:"",introduction:"",areaId:void 0,openingTime:void 0,closingTime:void 0,latitude:void 0,longitude:void 0,status:I.ENABLE},(d=f.value)==null||d.resetFields()},$=function(d){d.latlng&&d.latlng.lat&&(r.value.latitude=d.latlng.lat),d.latlng&&d.latlng.lng&&(r.value.longitude=d.latlng.lng),_.value=!1};return H(async()=>{k.value=await Ce(),await(async()=>{window.selectAddress=$,window.addEventListener("message",function(t){let c=t.data;c&&c.module==="locationPicker"&&window.parent.selectAddress(c)},!1);const d=(await Ie()).tencentLbsKey;A.value=`https://apis.map.qq.com/tools/locpicker?type=1&key=${d}&referer=myapp`})()}),(d,t)=>{const c=ye,u=te,s=oe,j=re,G=de,g=ue,p=se,J=ie,S=Ve,y=ne,K=me,M=pe,O=fe,Q=_e;return v(),b(O,{title:l(x),modelValue:l(n),"onUpdate:modelValue":t[14]||(t[14]=o=>C(n)?n.value=o:null),width:"60%"},{footer:a(()=>[e(y,{onClick:N,type:"primary",disabled:l(m)},{default:a(()=>[V("\u786E \u5B9A")]),_:1},8,["disabled"]),e(y,{onClick:t[12]||(t[12]=o=>n.value=!1)},{default:a(()=>[V("\u53D6 \u6D88")]),_:1})]),default:a(()=>[Y((v(),b(K,{ref_key:"formRef",ref:f,model:l(r),rules:l(L),"label-width":"120px"},{default:a(()=>[e(g,null,{default:a(()=>[e(s,{span:12},{default:a(()=>[e(u,{label:"\u95E8\u5E97 logo",prop:"logo"},{default:a(()=>[e(c,{modelValue:l(r).logo,"onUpdate:modelValue":t[0]||(t[0]=o=>l(r).logo=o),limit:1,"is-show-tip":!1},null,8,["modelValue"]),w]),_:1})]),_:1}),e(s,{span:12},{default:a(()=>[e(u,{label:"\u95E8\u5E97\u72B6\u6001",prop:"status"},{default:a(()=>[e(G,{modelValue:l(r).status,"onUpdate:modelValue":t[1]||(t[1]=o=>l(r).status=o)},{default:a(()=>[(v(!0),Z(ee,null,ae(l(qe)(l(ke).COMMON_STATUS),o=>(v(),b(j,{key:o.value,label:o.value},{default:a(()=>[V(le(o.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(g,null,{default:a(()=>[e(s,{span:12},{default:a(()=>[e(u,{label:"\u95E8\u5E97\u540D\u79F0",prop:"name"},{default:a(()=>[e(p,{modelValue:l(r).name,"onUpdate:modelValue":t[2]||(t[2]=o=>l(r).name=o),placeholder:"\u8BF7\u8F93\u5165\u95E8\u5E97\u540D\u79F0"},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:12},{default:a(()=>[e(u,{label:"\u95E8\u5E97\u624B\u673A",prop:"phone"},{default:a(()=>[e(p,{modelValue:l(r).phone,"onUpdate:modelValue":t[3]||(t[3]=o=>l(r).phone=o),placeholder:"\u8BF7\u8F93\u5165\u95E8\u5E97\u624B\u673A"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(u,{label:"\u95E8\u5E97\u7B80\u4ECB",prop:"introduction"},{default:a(()=>[e(p,{modelValue:l(r).introduction,"onUpdate:modelValue":t[4]||(t[4]=o=>l(r).introduction=o),rows:3,type:"textarea",placeholder:"\u8BF7\u8F93\u5165\u95E8\u5E97\u7B80\u4ECB"},null,8,["modelValue"])]),_:1}),e(g,null,{default:a(()=>[e(s,{span:12},{default:a(()=>[e(u,{label:"\u95E8\u5E97\u6240\u5728\u5730\u533A",prop:"areaId"},{default:a(()=>[e(J,{modelValue:l(r).areaId,"onUpdate:modelValue":t[5]||(t[5]=o=>l(r).areaId=o),options:l(k),props:l(Se)},null,8,["modelValue","options","props"])]),_:1})]),_:1}),e(s,{span:12},{default:a(()=>[e(u,{label:"\u95E8\u5E97\u8BE6\u7EC6\u5730\u5740",prop:"detailAddress"},{default:a(()=>[e(p,{modelValue:l(r).detailAddress,"onUpdate:modelValue":t[6]||(t[6]=o=>l(r).detailAddress=o),placeholder:"\u8BF7\u8F93\u5165\u95E8\u5E97\u8BE6\u7EC6\u5730\u5740"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(g,null,{default:a(()=>[e(s,{span:12},{default:a(()=>[e(u,{label:"\u8425\u4E1A\u5F00\u59CB\u65F6\u95F4",prop:"openingTime"},{default:a(()=>[e(S,{modelValue:l(r).openingTime,"onUpdate:modelValue":t[7]||(t[7]=o=>l(r).openingTime=o),"max-time":l(r).closingTime,placeholder:"\u5F00\u59CB\u65F6\u95F4",start:"08:30",step:"00:15",end:"23:30"},null,8,["modelValue","max-time"])]),_:1})]),_:1}),e(s,{span:12},{default:a(()=>[e(u,{label:"\u8425\u4E1A\u7ED3\u675F\u65F6\u95F4",prop:"closingTime"},{default:a(()=>[e(S,{modelValue:l(r).closingTime,"onUpdate:modelValue":t[8]||(t[8]=o=>l(r).closingTime=o),"min-time":l(r).openingTime,placeholder:"\u7ED3\u675F\u65F6\u95F4",start:"08:30",step:"00:15",end:"23:30"},null,8,["modelValue","min-time"])]),_:1})]),_:1})]),_:1}),e(g,null,{default:a(()=>[e(s,{span:12},{default:a(()=>[e(u,{label:"\u7ECF\u5EA6",prop:"longitude"},{default:a(()=>[e(p,{modelValue:l(r).longitude,"onUpdate:modelValue":t[9]||(t[9]=o=>l(r).longitude=o),placeholder:"\u8BF7\u8F93\u5165\u95E8\u5E97\u7ECF\u5EA6"},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:12},{default:a(()=>[e(u,{label:"\u7EAC\u5EA6",prop:"latitude"},{default:a(()=>[e(p,{modelValue:l(r).latitude,"onUpdate:modelValue":t[10]||(t[10]=o=>l(r).latitude=o),placeholder:"\u8BF7\u8F93\u5165\u95E8\u5E97\u7EAC\u5EA6"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(u,{label:"\u83B7\u53D6\u7ECF\u7EAC\u5EA6"},{default:a(()=>[e(y,{type:"primary",onClick:t[11]||(t[11]=o=>_.value=!0)},{default:a(()=>[V("\u83B7\u53D6")]),_:1})]),_:1})]),_:1},8,["model","rules"])),[[Q,l(m)]]),e(M,{modelValue:l(_),"onUpdate:modelValue":t[13]||(t[13]=o=>C(_)?_.value=o:null),title:"\u83B7\u53D6\u7ECF\u7EAC\u5EA6","append-to-body":"",width:"500px",class:"mapBox"},{default:a(()=>[E("iframe",{id:"mapPage",width:"100%",height:"100%",frameborder:"0",src:l(A)},null,8,U)]),_:1},8,["modelValue"])]),_:1},8,["title","modelValue"])}}}),[["__file","D:/zx/mall-newfeifan-zx-business/src/views/mall/trade/delivery/pickUpStore/PickUpStoreForm.vue"]])});export{Ne as __tla,P as default};
|