var _=(x,h,i)=>new Promise((f,o)=>{var p=l=>{try{u(i.next(l))}catch(m){o(m)}},g=l=>{try{u(i.throw(l))}catch(m){o(m)}},u=l=>l.done?f(l.value):Promise.resolve(l.value).then(p,g);u((i=i.apply(x,h)).next())});import{_ as E,u as G,av as d,aG as L,b as S,h as b,c as I,w as e,$ as C,ap as N,P as M,f as j,o as y,i as k,bK as n,j as R,k as t,p as r,t as v}from"./index-CZJgrp0v.js";import{a as T}from"./activityListItem.DfhT9o0a.js";import{m as V}from"./matchGroupInfo.Blbycxot.js";import{n as $,c as K,o as O}from"./eventJava.C13-6nEn.js";import{_ as P}from"./bottomButton.DlIqw7or.js";import"./index.RI71f-uW.js";import"./uv-line-progress.Fpuf9PUr.js";import"./themeMixins.C76yI6bA.js";import"./dayjs.min.17IgkfKq.js";import"./uv-button.DwAMxj01.js";/* empty css                                                                     */const U={__name:"detail",setup(x){const h=G(),i=d(""),f=d(""),o=d({}),p=d({}),g=d({groupName:"--",projectName:"--"}),u=d(!1),l=d(!1),m=c=>_(this,null,function*(){let s=yield K(c);if(s.code!==0){M({title:s.msg,icon:"none"});return}p.value=s.data}),D=c=>_(this,null,function*(){let s=yield $(c);if(s.code!==0)throw C({title:"提示",content:s.msg,showCancel:!1,success:w=>{w.confirm&&N()}}),new Error(s.msg);i.value=s.data.eventId;let a={groupName:s.data.eventGroupName,projectName:s.data.eventTermName};g.value=a,s.data.statusCn=s.data.status===1?"已领取":"未领取",o.value=s.data}),B=()=>_(this,null,function*(){u.value=!0;let c=yield O({eventMaterialId:f.value,tsId:h.userInfo.tsId,receiveOperation:o.value.status===0?"receive":"cancel"});if(c.code!==0){M({title:c.msg,icon:"none"}),u.value=!1;return}u.value=!1,C({title:"领取物资",showCancel:!1,content:o.value.status===0?"物资领取已确认":"物资领取已取消",success:s=>{s.confirm&&N()}})});return L(c=>_(this,null,function*(){f.value=c.eventMaterialId,l.value=!1,S({title:"加载中..."});try{yield D(f.value),m(i.value),b(),l.value=!0}catch(s){b(),l.value=!0}})),(c,s)=>{const a=R,w=j("layout-default-uni");return y(),I(w,null,{default:e(()=>[n(l)?(y(),I(a,{key:0,class:"my-match-detail-container page-main-container"},{default:e(()=>[t(T,{showButton:!1,info:n(p),style:{"margin-bottom":"32rpx"}},null,8,["info"]),t(V,{info:n(g),style:{"margin-bottom":"32rpx"}},null,8,["info"]),t(a,{class:"match-user-box"},{default:e(()=>[t(a,{class:"match-user-box_top"},{default:e(()=>[t(a,null,{default:e(()=>[r("报名信息")]),_:1})]),_:1}),t(a,{class:"match-user-box_middle"},{default:e(()=>[t(a,{class:"row"},{default:e(()=>[t(a,{class:"label"},{default:e(()=>[r("姓名")]),_:1}),t(a,{class:"value"},{default:e(()=>[r(v(n(o).name||"--"),1)]),_:1})]),_:1}),t(a,{class:"row"},{default:e(()=>[t(a,{class:"label"},{default:e(()=>[r("联系方式")]),_:1}),t(a,{class:"value"},{default:e(()=>[r(v(n(o).phone||"--"),1)]),_:1})]),_:1})]),_:1})]),_:1}),t(a,{class:"goods-info-box"},{default:e(()=>[t(a,{class:"row"},{default:e(()=>[t(a,{class:"label"},{default:e(()=>[r("物资内容")]),_:1}),t(a,{class:"value"},{default:e(()=>[r(v(n(o).eventMaterialName||"--"),1)]),_:1})]),_:1}),t(a,{class:"row"},{default:e(()=>[t(a,{class:"label"},{default:e(()=>[r("领取状态")]),_:1}),t(a,{class:"value"},{default:e(()=>[r(v(n(o).statusCn||"--"),1)]),_:1})]),_:1})]),_:1}),n(o).status===0?(y(),I(P,{key:0,loading:n(u),onClick:B},{default:e(()=>[r(v(n(o).status===0?"确认领取":"取消领取"),1)]),_:1},8,["loading"])):k("",!0)]),_:1})):k("",!0)]),_:1})}}},ea=E(U,[["__scopeId","data-v-595d8833"]]);export{ea as default};
