pages-order-aftersale-list.b3a6e695.js 3.8 KB

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