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