import{v as t,o as a,x as s,e,f as o,w as l,_ as n,l as i,j as r,g as c,k as u,r as p,F as d,m as f,i as m,u as _,s as g,p as y,t as b,A as x,T as k,C as j,D as v}from"./index-219abc09.js";import{_ as w}from"./su-tabs.4a630811.js";import{_ as S}from"./su-sticky.a4c563e5.js";import{_ as C}from"./s-empty.0224d4b9.js";import{_ as h}from"./s-goods-item.9b7f200a.js";import{_ as N}from"./uni-load-more.989ac777.js";import{_ as T}from"./s-layout.e3f07a22.js";import{l as z,m as A,n as M}from"./useGoods.f5223d84.js";import{A as P}from"./afterSale.a00ee278.js";import{_ as D}from"./_plugin-vue_export-helper.1b428a4d.js";/* empty css                                                                *//* empty css                                                                     */import"./form.480ce5b4.js";const E=D({__name:"list",setup(D){const E={list:[],total:0,pageNo:1,pageSize:10},F=t({currentTab:0,showApply:!1,pagination:{list:[],total:0,pageNo:1,pageSize:10},loadStatus:""}),G=[{name:"全部",value:"all"}];function I(t){F.pagination=E,F.currentTab=t.index,U()}async function U(){F.loadStatus="loading";let{data:t,code:a}=await P.getAfterSalePage({pageNo:F.pagination.pageNo,pageSize:F.pagination.pageSize});0===a&&(t.list.forEach((t=>z(t))),F.pagination.list=n.concat(F.pagination.list,t.list),F.pagination.total=t.total,F.loadStatus=F.pagination.list.length<F.pagination.total?"more":"noMore")}function $(){"noMore"!==F.loadStatus&&(F.pagination.pageNo++,U())}return a((async t=>{t.type&&(F.currentTab=t.type),await U()})),s((()=>{$()})),(t,a)=>{const s=i(f("su-tabs"),w),n=i(f("su-sticky"),S),z=i(f("s-empty"),C),D=j,q=m,B=i(f("s-goods-item"),h),H=v,J=i(f("uni-load-more"),N),K=i(f("s-layout"),T);return e(),o(K,{title:"售后列表"},{default:l((()=>[r(n,{bgColor:"#fff"},{default:l((()=>[r(s,{list:G,scrollable:!1,onChange:I,current:F.currentTab},null,8,["current"])])),_:1}),0===F.pagination.total?(e(),o(z,{key:0,icon:"/static/data-empty.png",text:"暂无数据"})):c("",!0),F.pagination.total>0?(e(),o(q,{key:1},{default:l((()=>[(e(!0),u(d,null,p(F.pagination.list,(t=>(e(),o(q,{class:"list-box ss-m-y-20",key:t.id,onClick:a=>_(g).$router.go("/pages/order/aftersale/detail",{id:t.id})},{default:l((()=>[r(q,{class:"order-head ss-flex ss-col-center ss-row-between"},{default:l((()=>[r(D,{class:"no"},{default:l((()=>[y("服务单号："+b(t.no),1)])),_:2},1024),r(D,{class:"state"},{default:l((()=>[y(b(_(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(q,{class:"apply-box ss-flex ss-col-center ss-row-between border-bottom ss-p-x-20"},{default:l((()=>[r(q,{class:"ss-flex ss-col-center"},{default:l((()=>[r(q,{class:"title ss-m-r-20"},{default:l((()=>[y(b(10===t.way?"仅退款":"退款退货"),1)])),_:2},1024),r(q,{class:"value"},{default:l((()=>[y(b(_(M)(t)),1)])),_:2},1024)])),_:2},1024),r(D,{class:"_icon-forward"})])),_:2},1024),r(q,{class:"tool-btn-box ss-flex ss-col-center ss-row-right ss-p-r-20"},{default:l((()=>[r(q,null,{default:l((()=>[(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 k({title:"提示",content:"确定要取消此申请吗？",success:async function(t){if(!t.confirm)return;const{code:a}=await P.cancelAfterSale(s);0===a&&(F.pagination=E,await U())}});var s}),["stop"])},{default:l((()=>[y("取消申请")])),_:2},1032,["onClick"])):c("",!0)])),_:2},1024)])),_:2},1024)])),_:2},1032,["onClick"])))),128))])),_:1})):c("",!0),F.pagination.total>0?(e(),o(J,{key:2,status:F.loadStatus,"content-text":{contentdown:"上拉加载更多"},onClick:$},null,8,["status"])):c("",!0)])),_:1})}}},[["__scopeId","data-v-9f57e4d3"]]);export{E as default};
