import{d as R,r as A,v as E,G as V,g as c,z as f,k as u,w as e,b as o,c as b,H as G,F as H,e as t,t as r,x as s,l as h,L as k,_ as L}from"./index-CUnFTKV2.js";const P={class:"recovery-detail"},S={class:"money"},T={key:0,class:"prize-section"},j={class:"image-error"},q={key:1,class:"image-error"},J={class:"prize-code"},K={class:"price"},O={class:"recovery-money"},Q={class:"summary-bar"},W={class:"price"},X={class:"recovery-money"},Y=R({__name:"RecoveryDetailDialog",props:{modelValue:{type:Boolean},recoveryData:{}},emits:["update:modelValue","close"],setup(a,{emit:x}){const p=a,g=x,m=A(p.modelValue),w=E(()=>{var d;return(d=p.recoveryData)!=null&&d.prizes?p.recoveryData.prizes.reduce((l,i)=>l+(i.price||0),0):0});V(()=>p.modelValue,d=>{m.value=d}),V(m,d=>{g("update:modelValue",d)});const D=()=>{m.value=!1,g("close")};return(d,l)=>{const i=c("el-descriptions-item"),C=c("el-tag"),F=c("el-descriptions"),z=c("el-icon"),N=c("el-image"),_=c("el-table-column"),U=c("el-table"),B=c("el-empty"),I=c("el-button"),M=c("el-dialog");return u(),f(M,{modelValue:m.value,"onUpdate:modelValue":l[0]||(l[0]=v=>m.value=v),title:"回收订单详情",width:"800px","close-on-click-modal":!1,onClose:D},{footer:e(()=>[t(I,{onClick:D},{default:e(()=>[...l[6]||(l[6]=[r("关闭",-1)])]),_:1})]),default:e(()=>{var v;return[o("div",P,[a.recoveryData?(u(),b(H,{key:0},[t(F,{column:2,border:"",class:"order-info"},{default:e(()=>[t(i,{label:"回收单号"},{default:e(()=>[r(s(a.recoveryData.recoveryNum),1)]),_:1}),t(i,{label:"回收数量"},{default:e(()=>[t(C,{type:"info",size:"small"},{default:e(()=>[r(s(a.recoveryData.count)+" 件",1)]),_:1})]),_:1}),t(i,{label:"用户昵称"},{default:e(()=>[r(s(a.recoveryData.userNickname||"-"),1)]),_:1}),t(i,{label:"用户ID"},{default:e(()=>[r(s(a.recoveryData.userId),1)]),_:1}),t(i,{label:"手机号"},{default:e(()=>[r(s(a.recoveryData.userMobile||"-"),1)]),_:1}),t(i,{label:"用户UID"},{default:e(()=>[r(s(a.recoveryData.userUid||"-"),1)]),_:1}),t(i,{label:"回收金额"},{default:e(()=>{var n;return[o("span",S,"¥"+s(((n=a.recoveryData.money)==null?void 0:n.toFixed(2))||"0.00"),1)]}),_:1}),t(i,{label:"回收时间"},{default:e(()=>[r(s(a.recoveryData.createdAt),1)]),_:1})]),_:1}),a.recoveryData.prizes&&a.recoveryData.prizes.length>0?(u(),b("div",T,[l[5]||(l[5]=o("h4",{class:"section-title"},"回收奖品明细",-1)),t(U,{data:a.recoveryData.prizes,border:"",size:"small"},{default:e(()=>[t(_,{label:"奖品图片",width:"80",align:"center"},{default:e(({row:n})=>[n.imgUrl?(u(),f(N,{key:0,src:n.imgUrl,"preview-src-list":[n.imgUrl],fit:"cover",class:"prize-img",lazy:""},{error:e(()=>[o("div",j,[t(z,null,{default:e(()=>[t(h(k))]),_:1})])]),_:1},8,["src","preview-src-list"])):(u(),b("div",q,[t(z,null,{default:e(()=>[t(h(k))]),_:1})]))]),_:1}),t(_,{prop:"title",label:"奖品名称","min-width":"180"},{default:e(({row:n})=>[o("span",null,s(n.title||"-"),1)]),_:1}),t(_,{prop:"prizeCode",label:"奖品编码","min-width":"120"},{default:e(({row:n})=>[o("span",J,s(n.prizeCode||"-"),1)]),_:1}),t(_,{label:"奖品价值",width:"120",align:"right"},{default:e(({row:n})=>{var y;return[o("span",K,"¥"+s(((y=n.price)==null?void 0:y.toFixed(2))||"0.00"),1)]}),_:1}),t(_,{label:"回收金额",width:"120",align:"right"},{default:e(({row:n})=>{var y;return[o("span",O,"¥"+s(((y=n.recoveryMoney)==null?void 0:y.toFixed(2))||"0.00"),1)]}),_:1})]),_:1},8,["data"]),o("div",Q,[o("span",null,[l[1]||(l[1]=r("共 ",-1)),o("strong",null,s(a.recoveryData.prizes.length),1),l[2]||(l[2]=r(" 件奖品",-1))]),o("span",null,[l[3]||(l[3]=r("总价值: ",-1)),o("span",W,"¥"+s(w.value.toFixed(2)),1)]),o("span",null,[l[4]||(l[4]=r("回收总额: ",-1)),o("span",X,"¥"+s(((v=a.recoveryData.money)==null?void 0:v.toFixed(2))||"0.00"),1)])])])):(u(),f(B,{key:1,description:"暂无回收奖品记录"}))],64)):G("",!0)])]}),_:1},8,["modelValue"])}}}),$=L(Y,[["__scopeId","data-v-de0cb6ca"]]);export{$ as default};
