import{_ as a}from"./uv-navbar.31c484ad.js";import{f as e,g as s,o as t,c as o,w as r,n as l,a as u,h as d,t as i,u as c,b as n,F as f,r as m,m as p,s as v,q as _,d as y,B as g,v as j}from"./index-3714412c.js";import{r as k,u as C,o as h}from"./useRouter.f44141c1.js";import{_ as b}from"./uv-tabs.1dd9974c.js";import{_ as L}from"./uv-sticky.53c0e026.js";import{_ as P}from"./goods.46695bdd.js";import{l as I,m as x,s as S}from"./order.770d13ec.js";import{b as w}from"./api.966d6934.js";import{_ as R}from"./layout.99605750.js";import{e as A}from"./订单.c84717c2.js";import{E}from"./index.573aa2d3.js";import{u as H}from"./usePage.b4ec4df0.js";import{_ as N}from"./_plugin-vue_export-helper.1b428a4d.js";import"./uv-status-bar.b515a02d.js";import"./uv-icon.c593f91d.js";import"./uv-badge.e9560e1c.js";import"./uv-button.14a976f7.js";import"./uv-loading-icon.8ba359c8.js";import"./good-attr-select.1541fb80.js";import"./uv-image.7b0e6bd2.js";import"./uv-transition.4f5b62a8.js";import"./space.57299547.js";import"./product.d7200236.js";import"./useInterface.f3e95e31.js";import"./index.d0119d7e.js";const $={__name:"refund-order",props:["class","data"],emits:["refresh"],setup(a,{emit:j}){const h=a,{push:b}=C(),L=e(h.data);e(h.data.freightPrice),e(h.data.payPrice),e(h.data.couponPrice),e(h.data.deductionPrice),e(h.data.totalPrice);const S=async()=>{v({title:"提示",content:"确认删除记录",success:async a=>{a.confirm?(await I({id:L.value.id,orderCode:L.value.orderCode}),L.value=null,_({title:"已删除",duration:2e3})):a.cancel}})},R=async()=>{v({title:"提示",content:"确认撤销申请吗",success:async a=>{a.confirm?(await x({id:L.value.id,key:L.value.orderCode}),L.value=null,_({title:"已撤销",duration:2e3})):a.cancel}})},A=()=>{b({url:"/pages/refundInfo/refundInfo"},{data:{id:L.value.id}})},E=()=>{b({url:"/pages/addLogistics/addLogistics"},{data:{id:L.value.id,orderCode:L.value.orderCode}})},H=()=>{console.log(L.value),b({url:"/pages/refund/refund"},{data:{refundType:L.value.serviceType,goods:L.value.cartInfo.map((a=>a.productAttrUnique)).toString(),id:L.value.orderId}})};return(a,e)=>{const v=y,_=k(s("goods"),P),j=g;return t(),o(v,null,{default:r((()=>[L.value?(t(),o(v,{key:0,class:l(["order",a.className])},{default:r((()=>[u(v,{class:"order-header",onClick:A},{default:r((()=>[u(v,{class:"order-logo"},{default:r((()=>[u(v,{class:"color-y"},{default:r((()=>[d("Y")])),_:1}),u(v,null,{default:r((()=>[d("SHOP商城")])),_:1})])),_:1}),u(v,{class:"order-status status-2"},{default:r((()=>[d(i(c(w)[L.value.state]),1)])),_:1})])),_:1}),u(v,{class:"order-goods",onClick:A},{default:r((()=>[(t(!0),n(f,null,m(L.value.cartInfo,((a,e)=>(t(),o(_,{list:"",interval:"",desc:"3",showAction:"",model:"",purchase:a.cartNum,data:a.productInfo,price:a.truePrice},null,8,["purchase","data","price"])))),256))])),_:1}),u(v,{class:"refund-order-info",onClick:A},{default:r((()=>[u(j,{class:l(["text",3===L.value.state&&"color-y"])},{default:r((()=>[d(i(3===L.value.state?"成功退款":"待平台处理"),1)])),_:1},8,["class"]),u(j,{class:"text"},{default:r((()=>[d(i(3===L.value.state?"成功":"")+"退款¥"+i(L.value.refundAmount),1)])),_:1})])),_:1}),u(v,{class:"order-actions"},{default:r((()=>[u(v,{class:"order-actions-left"}),u(v,{class:"order-actions-btns"},{default:r((()=>[[3,4].includes(L.value.state)?(t(),o(v,{key:0,class:"order-actions-default",onClick:S},{default:r((()=>[d(" 删除记录 ")])),_:1})):p("",!0),[0,1].includes(L.value.state)?(t(),o(v,{key:1,class:"order-actions-default",onClick:R},{default:r((()=>[d(" 撤销申请 ")])),_:1})):p("",!0),5===L.value.state?(t(),o(v,{key:2,class:"order-actions-default",onClick:H},{default:r((()=>[d(" 再次申请 ")])),_:1})):p("",!0),1===L.value.state?(t(),o(v,{key:3,class:"order-actions-default",onClick:E},{default:r((()=>[d(" 填写物流 ")])),_:1})):p("",!0),u(v,{class:"order-actions-primary",onClick:A},{default:r((()=>[d(" 查看详情 ")])),_:1})])),_:1})])),_:1})])),_:1},8,["class"])):p("",!0)])),_:1})}}},q=N({__name:"refundList",setup(l){const{type:d,refresh:i,dataList:v,loadend:_,loading:g,listEmpty:P}=H(S),{goBack:I,getParams:x}=C(),w=e([{name:"全部",value:-1},{name:"售后中",value:1},{name:"已完成",value:2}]),N=a=>{d.value=a.value,i()};return h((a=>{const e=x(a);e.type<0||!e.type?d.value=-1:d.value=e.type,i()})),(e,l)=>{const i=k(s("uv-navbar"),a),C=k(s("uv-tabs"),b),h=k(s("uv-sticky"),L),x=k(s("refund-order"),$),S=y,H=j("ListLoadLoading"),q=j("ListLoadOver"),B=k(s("layout"),R);return t(),o(B,null,{default:r((()=>[u(h,{bgColor:"#fff",customNavHeight:"0"},{default:r((()=>[u(i,{fixed:!1,title:"售后订单",onLeftClick:c(I)},null,8,["onLeftClick"]),u(C,{scrollable:!1,list:w.value,onClick:N,lineColor:"#f56c6c"},null,8,["list"])])),_:1}),c(P)?(t(),o(E,{key:1,iconSrc:c(A)},null,8,["iconSrc"])):(t(),o(S,{key:0,class:"orderList"},{default:r((()=>[(t(!0),n(f,null,m(c(v),(a=>(t(),o(x,{data:a,key:`${c(d)}_${a.id}`,onRefresh:e.handleRefresh},null,8,["data","onRefresh"])))),128))])),_:1})),c(g)?(t(),o(H,{key:2})):p("",!0),c(_)?(t(),o(q,{key:3})):p("",!0)])),_:1})}}},[["__scopeId","data-v-54ca1358"]]);export{q as default};
