import{f as v,al as $,ag as M,R as q,am as H,an as O,n as A,ao as G,$ as L,i as Q}from"./element-plus-BjmnhcWI.js";import{_ as X,u as Y,Q as Z}from"./index-CAoOLuwd.js";/* empty css                    *//* empty css                        *//* empty css                   *//* empty css                       */import{aB as j,aA as J,r as K,l as U,L as w,I as m,O as o,M as l,u as n,P as s,Z as c,R as E,Y as I,H as i,X as C,ax as W,ay as ee}from"./vue-vendor-C1ve1r-r.js";const N=f=>(W("data-v-0a6aa195"),f=f(),ee(),f),te={class:"pc-admin-detail-container"},ae={class:"header-content"},se={class:"title"},oe={class:"header-right"},ne={class:"profit-label"},le={class:"section-container"},ce={class:"section-title"},re=N(()=>s("div",{class:"decorate-bar bmc"},null,-1)),de={key:1,class:"empty-text"},ie={class:"highlight-keyword"},ue={class:"odds-val"},_e={class:"amount-val"},pe={class:"section-container"},me={class:"section-title"},fe=N(()=>s("div",{class:"decorate-bar bmc"},null,-1)),ve={class:"order-num-box"},he={class:"issue-text"},be={class:"time-text"},ye={class:"time-text"},xe={class:"text-danger"},ge={__name:"index",setup(f){const{t:e,locale:h}=Y(),b=j(),F=J(),t=K(null);U(()=>{b.query.id&&S(b.query.id)});const B=()=>{F.back()},S=async r=>{try{const a=await Z({id:r});a&&a.code===1?t.value=a.data:v.warning(a.msg||e("暂无数据"))}catch{v.error(e("网络异常"))}},y=r=>{const a=Number(r);return a===0?{text:e("待开奖"),type:"warning"}:a===1?{text:e("未中奖"),type:"danger"}:a===2?{text:e("已中奖"),type:"success"}:a===3?{text:e("已退款"),type:"info"}:{text:e("未知"),type:"info"}},D=r=>{const a=Number(r);return a===1?"text-danger":a===2?"text-success":"text-gray"},T=r=>{const a=Number(r.status);return a===0?"--":a===1?`-${parseFloat(r.amount||0).toFixed(2)}`:a===2?`+${parseFloat(r.profit_and_loss||r.win_amount||0).toFixed(2)}`:"0.00"},z=async r=>{try{await navigator.clipboard.writeText(r),v.success(e("复制成功"))}catch{const u=document.createElement("input");u.value=r,document.body.appendChild(u),u.select(),document.execCommand("copy"),document.body.removeChild(u),v.success(e("复制成功"))}};return(r,a)=>{const u=M,x=q,P=$,d=O,g=H,R=A,k=Q,V=L;return i(),w("div",te,[t.value?(i(),m(k,{key:0,class:"detail-card",shadow:"never"},{default:o(()=>[l(P,{onBack:B,class:"detail-page-header",title:n(e)("返回")},{content:o(()=>[s("div",ae,[s("span",se,c(n(e)("注单详情")),1),l(u,{direction:"vertical",class:"mx-3"}),l(x,{type:y(t.value.status).type,effect:"dark",class:"status-tag"},{default:o(()=>[I(c(y(t.value.status).text),1)]),_:1},8,["type"])])]),extra:o(()=>[s("div",oe,[s("span",ne,c(n(e)("盈亏金额"))+"：",1),s("span",{class:E(["profit-val",D(t.value.status)])},c(T(t.value)),3)])]),_:1},8,["title"]),s("div",le,[s("div",ce,[re,s("span",null,c(n(e)("投注明细")),1)]),l(g,{column:3,border:"",class:"admin-descriptions"},{default:o(()=>[l(d,{label:n(e)("所属玩法")},{default:o(()=>[t.value.game?(i(),m(x,{key:0,type:"info",effect:"dark",size:"small",class:"custom-dark-tag"},{default:o(()=>{var _,p;return[I(c(n(h)==="zh"?(_=t.value.game)==null?void 0:_.name:(p=t.value.game)==null?void 0:p.name_en),1)]}),_:1})):(i(),w("span",de,"--"))]),_:1},8,["label"]),l(d,{label:n(e)("投注内容")},{default:o(()=>{var _,p;return[s("span",ie,c(n(h)==="zh"?(_=t.value.gameplay)==null?void 0:_.name:(p=t.value.gameplay)==null?void 0:p.name_en),1)]}),_:1},8,["label"]),l(d,{label:n(e)("赔率")},{default:o(()=>[s("span",ue,"@"+c(t.value.odds||"0.00"),1)]),_:1},8,["label"]),l(d,{label:n(e)("投注本金")},{default:o(()=>[s("span",_e,c(parseFloat(t.value.amount||0).toFixed(2)),1)]),_:1},8,["label"]),l(d,{label:n(e)("派彩金额"),span:2},{default:o(()=>[s("span",{class:E(["amount-val",{"text-success":Number(t.value.status)===2}])},c(Number(t.value.status)===2?parseFloat(t.value.win_amount||0).toFixed(2):"0.00"),3)]),_:1},8,["label"])]),_:1})]),s("div",pe,[s("div",me,[fe,s("span",null,c(n(e)("订单信息")),1)]),l(g,{column:2,border:"",class:"admin-descriptions"},{default:o(()=>[l(d,{label:n(e)("订单单号")},{default:o(()=>[s("div",ve,[s("span",he,c(t.value.ordernum),1),l(R,{class:"copy-icon",onClick:a[0]||(a[0]=_=>z(t.value.ordernum))},{default:o(()=>[l(n(G))]),_:1})])]),_:1},8,["label"]),l(d,{label:n(e)("投注时间")},{default:o(()=>[s("span",be,c(t.value.created_at),1)]),_:1},8,["label"]),t.value.updated_at?(i(),m(d,{key:0,label:n(e)("更新时间")},{default:o(()=>[s("span",ye,c(t.value.updated_at),1)]),_:1},8,["label"])):C("",!0),t.value.remark?(i(),m(d,{key:1,label:n(e)("备注"),span:2},{default:o(()=>[s("span",xe,c(t.value.remark),1)]),_:1},8,["label"])):C("",!0)]),_:1})])]),_:1})):(i(),m(k,{key:1,shadow:"never",class:"detail-card skeleton-card"},{default:o(()=>[l(V,{rows:6,animated:""})]),_:1}))])}}},Be=X(ge,[["__scopeId","data-v-0a6aa195"]]);export{Be as default};
