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