import{o as e,c as a,d as l,F as s,_ as t,m as o,bm as c,r as i,y as r,a as n,b as u,n as d,p,aF as m,q as g,e as v,W as x,aB as f,E as b,dF as _,Y as h,dG as y,bp as w}from"./index-BhrLSE9x.js";import{b as k}from"./el-overlay-C6ddMYf0.js";import{j}from"./el-statistic-Cg8urxXc.js";const C={class:"grid grid-cols-2 gap-[12px]"},P={__name:"CancelOrderPopup",emits:["close","cancel"],setup(t,{emit:o}){const c=o,i=()=>{c("cancel")};return(t,o)=>(e(),a(s,null,[o[1]||(o[1]=l("p",{class:"text-[var(--my-mine-color25)] pb-[24px] text-[16px]"}," 如果您已完成付款，请勿撤销。否则可能导致已付款金额丢失，请您耐心等待，我们将尽快为您处理。如有任何问题请联系在线客服协助解决。 ",-1)),l("div",C,[l("button",{class:"my-mine-btn-cancel",onClick:i},"继续撤销"),l("button",{class:"my-mine-btn-confirm",onClick:o[0]||(o[0]=e=>c("close"))},"暂不撤销")])],64))}},G={class:"flex flex-col gap-[16px] items-start justify-start px-[8px]"},U={class:"bg-[var(--recharge-upload-block-bg)] rounded-[6px] h-[112px] w-full pt-[12px] px-[16px] pb-[5px] upload-area"},V=["src"],B={class:"box"},J=["src","alt"],$={class:"el-upload-list__item-actions"},z=["onClick"],E=["onClick"],F={class:"flex items-center justify-start gap-[6px]"},q=["src"],I={class:"w-full max-h-[640px] overflow-auto"},M=["src"],N=t({__name:"UploadRechargeReceipt",props:{show:{type:Boolean,default:!1},data:{}},emits:["close","success"],setup(t,{emit:C}){const{theme:P}=o(),N=t,{show:R,data:D}=c(N),L=C,O=i([]),S=i(""),W=i(!1),Y=i([]),A=async e=>["image/jpeg","image/png","image/jpg"].includes(e.type)?!(e.size/1024/1024>10)||(b.error("图片大小不能超过10MB"),!1):(b.error("文件格式只能是：PNG、JPG、JPEG。"),!1),H=async e=>{const a=await _(e);if(1!==a.code)return b.error(a.message);Y.value.push(a.data.imageUrl)},K=async()=>{const e=Y.value.join(","),a=await j({id:D.value.id,urls:e});if(1!==a.code)return b.error(a.message);L("success"),O.value=[]},Q=()=>{O.value=[]};return(t,o)=>{const c=r("zoom-in"),i=h,b=r("Delete"),_=y,j=w,C=k;return e(),a(s,null,[n(C,{title:`上传凭证确认充值(${Y.value.length}/3)`,class:"my-clean-dialog",modelValue:p(R),"onUpdate:modelValue":o[1]||(o[1]=e=>f(R)?R.value=e:null),"align-center":"","show-close":"",center:"",width:"430","close-on-click-modal":!1,"close-on-press-escape":!1,onClose:Q},{default:u((()=>[l("div",G,[l("p",{class:d(["text-[var(--withdrawal-secondary-color)] text-[14px] font-400",{"!text-[#2f3244]":"violet"===p(P)}])}," 请您上传这笔存款的信息，包含卡号、金额、姓名和时间 ",2),l("div",U,[n(_,{"file-list":O.value,"onUpdate:fileList":o[0]||(o[0]=e=>O.value=e),accept:".jpg,.jpeg,.png",limit:3,"list-type":"picture-card","before-upload":A,"auto-upload":!0,"http-request":H},{file:u((({file:s,index:t})=>[l("div",B,[Y.value[t]?(e(),a("img",{key:0,class:"el-upload-list__item-thumbnail",src:Y.value[t],alt:t},null,8,J)):(e(),a("div",{key:1,class:"img-loading",style:m([{background:`url(${s.url}) center center no-repeat`},{backgroundSize:"100% 100%"}])},o[3]||(o[3]=[l("div",{class:"my-loading-mask"},[l("div",{class:"loader"}),l("p",{class:"loading-text"},"上传中")],-1)]),4)),l("span",$,[l("span",{class:"el-upload-list__item-preview",onClick:e=>(e=>{S.value=e.url,W.value=!0})(s)},[n(i,null,{default:u((()=>[n(c)])),_:1})],8,z),l("span",{class:"el-upload-list__item-delete",onClick:e=>((e,a)=>{O.value.splice(a,1),Y.value.splice(a,1)})(0,t)},[n(i,null,{default:u((()=>[n(b)])),_:1})],8,E)])])])),default:u((()=>[O.value.length<3?(e(),a("img",{key:0,src:p(g)(`recharge/upload_${p(P)}.png`),alt:""},null,8,V)):v("",!0)])),_:1},8,["file-list"]),o[4]||(o[4]=l("p",{class:"text-[var(--withdrawal-secondary-color)] text-[14px] font-400"},"文件格式为：PNG、JPG、JPEG，大小不超过10MB。",-1))]),n(j,{disabled:Y.value.length<1,class:d({"button-disabled":Y.value.length<1}),onClick:K},{default:u((()=>o[5]||(o[5]=[x(" 提交 ")]))),_:1},8,["disabled","class"]),l("div",F,[l("img",{src:p(g)(`recharge/alert_${p(P)}.png`),class:"w-[16px] h-[16px]"},null,8,q),o[6]||(o[6]=l("div",{class:"text-[var(--withdrawal-secondary-color)] text-[12px] font-400"},"提交真实凭证后，平台会加速处理您的订单，请耐心等候。",-1))])])])),_:1},8,["title","modelValue"]),n(C,{modelValue:W.value,"onUpdate:modelValue":o[2]||(o[2]=e=>W.value=e)},{default:u((()=>[l("div",I,[l("img",{src:S.value,alt:"Preview Image",class:"w-full"},null,8,M)])])),_:1},8,["modelValue"])],64)}}},[["__scopeId","data-v-488b65db"]]);export{N as U,P as _};
