import{B as t,o as a,C as s,f as e,g as o,w as n,am as i,_ as l,q as r,n as p,i as u,p as c,r as d,F as f,u as m,l as g,z as _,s as y,m as b,t as x,I as j,R as k,K as w,L as v}from"./index-007bf156.js";import{_ as S}from"./su-tabs.6f882e3d.js";import{_ as h}from"./su-sticky.42fb87b3.js";import{_ as C}from"./s-empty.df9577ad.js";import{_ as N}from"./s-goods-item.8ceb696e.js";import{_ as z}from"./uni-load-more.4c025ab2.js";import{_ as T}from"./s-layout.19bedb43.js";import{l as A,m as B,n as G}from"./useGoods.ac3bf93e.js";import{_ as I}from"./_plugin-vue_export-helper.1b428a4d.js";import"./uni-badge.cf8b6051.js";/* empty css                                                                */import"./points.c381a8e1.js";/* empty css                                                                     */import"./phone-international-input.3617e4e0.js";const M=I({__name:"list",setup(I){const M={list:[],total:0,pageNo:1,pageSize:10},P=t({currentTab:0,showApply:!1,pagination:{list:[],total:0,pageNo:1,pageSize:10},loadStatus:""}),q=[{name:"全部",value:"all"}];function E(t){P.pagination=M,P.currentTab=t.index,F()}async function F(){P.loadStatus="loading";let{data:t,code:a}=await i.getAfterSalePage({pageNo:P.pagination.pageNo,pageSize:P.pagination.pageSize});0===a&&(t.list.forEach((t=>A(t))),P.pagination.list=l.concat(P.pagination.list,t.list),P.pagination.total=t.total,P.loadStatus=P.pagination.list.length<P.pagination.total?"more":"noMore")}function H(){"noMore"!==P.loadStatus&&(P.pagination.pageNo++,F())}return a((async t=>{t.type&&(P.currentTab=t.type),await F()})),s((()=>{H()})),(t,a)=>{const s=r(m("su-tabs"),S),l=r(m("su-sticky"),h),A=r(m("s-empty"),C),I=w,K=g,L=r(m("s-goods-item"),N),R=v,U=r(m("uni-load-more"),z),$=r(m("s-layout"),T);return e(),o($,{title:"售后列表"},{default:n((()=>[p(l,{bgColor:"#fff"},{default:n((()=>[p(s,{list:q,scrollable:!1,onChange:E,current:P.currentTab},null,8,["current"])])),_:1}),0===P.pagination.total?(e(),o(A,{key:0,icon:"/static/data-empty.png",text:"暂无数据"})):u("",!0),P.pagination.total>0?(e(),o(K,{key:1},{default:n((()=>[(e(!0),c(f,null,d(P.pagination.list,(t=>(e(),o(K,{class:"list-box ss-m-y-20",key:t.id,onClick:a=>_(y).$router.go("/pages/order/aftersale/detail",{id:t.id})},{default:n((()=>[p(K,{class:"order-head ss-flex ss-col-center ss-row-between"},{default:n((()=>[p(I,{class:"no"},{default:n((()=>[b("服务单号："+x(t.no),1)])),_:2},1024),p(I,{class:"state"},{default:n((()=>[b(x(_(B)(t)),1)])),_:2},1024)])),_:2},1024),p(L,{img:t.picUrl,title:t.spuName,skuText:t.properties.map((t=>t.valueName)).join(" "),price:t.refundPrice},null,8,["img","title","skuText","price"]),p(K,{class:"apply-box ss-flex ss-col-center ss-row-between border-bottom ss-p-x-20"},{default:n((()=>[p(K,{class:"ss-flex ss-col-center"},{default:n((()=>[p(K,{class:"title ss-m-r-20"},{default:n((()=>[b(x(10===t.way?"仅退款":"退款退货"),1)])),_:2},1024),p(K,{class:"value"},{default:n((()=>[b(x(_(G)(t)),1)])),_:2},1024)])),_:2},1024),p(I,{class:"_icon-forward"})])),_:2},1024),p(K,{class:"tool-btn-box ss-flex ss-col-center ss-row-right ss-p-r-20"},{default:n((()=>[p(K,null,{default:n((()=>[(null==t?void 0:t.buttons.includes("cancel"))?(e(),o(R,{key:0,class:"ss-reset-button tool-btn",onClick:j((a=>{return s=t.id,void k({title:"提示",content:"确定要取消此申请吗？",success:async function(t){if(!t.confirm)return;const{code:a}=await i.cancelAfterSale(s);0===a&&(P.pagination=M,await F())}});var s}),["stop"])},{default:n((()=>[b("取消申请")])),_:2},1032,["onClick"])):u("",!0)])),_:2},1024)])),_:2},1024)])),_:2},1032,["onClick"])))),128))])),_:1})):u("",!0),P.pagination.total>0?(e(),o(U,{key:2,status:P.loadStatus,"content-text":{contentdown:"上拉加载更多"},onClick:H},null,8,["status"])):u("",!0)])),_:1})}}},[["__scopeId","data-v-9f57e4d3"]]);export{M as default};
