pages-order-aftersale-list.9309c001.js 3.7 KB

1
  1. import{v as t,o as a,x as s,e,f as o,w as l,_ as i,l as n,j as r,g as c,k as p,r as u,F as d,m as f,i as m,u as g,s as _,p as y,t as b,A as x,M as k,C as j,D as w}from"./index-9880b451.js";import{_ as v}from"./su-tabs.1ce39404.js";import{_ as S}from"./su-sticky.84aef901.js";import{_ as C}from"./s-empty.74111684.js";import{_ as h}from"./s-goods-item.f5d79fd7.js";import{_ as N}from"./uni-load-more.aac4524a.js";import{_ as T}from"./s-layout.dfc5b0b5.js";import{k as A,l as z,m as M}from"./useGoods.bdd1c2ea.js";import{A as P}from"./afterSale.a533f86e.js";import{_ as D}from"./_plugin-vue_export-helper.1b428a4d.js";/* empty css *//* empty css */import"./index.df38848e.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=>A(t))),F.pagination.list=i.concat(F.pagination.list,t.list),F.pagination.total=t.total,F.loadStatus=F.pagination.list.length<F.pagination.total?"more":"noMore")}function Y(){"noMore"!==F.loadStatus&&(F.pagination.pageNo++,U())}return a((async t=>{t.type&&(F.currentTab=t.type),await U()})),s((()=>{Y()})),(t,a)=>{const s=n(f("su-tabs"),v),i=n(f("su-sticky"),S),A=n(f("s-empty"),C),D=j,Z=m,$=n(f("s-goods-item"),h),q=w,B=n(f("uni-load-more"),N),H=n(f("s-layout"),T);return e(),o(H,{title:"售后列表"},{default:l((()=>[r(i,{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(A,{key:0,icon:"/static/data-empty.png",text:"暂无数据"})):c("",!0),F.pagination.total>0?(e(),o(Z,{key:1},{default:l((()=>[(e(!0),p(d,null,u(F.pagination.list,(t=>(e(),o(Z,{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(Z,{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(g(z)(t)),1)])),_:2},1024)])),_:2},1024),r($,{img:t.picUrl,title:t.spuName,skuText:t.properties.map((t=>t.valueName)).join(" "),price:t.refundPrice},null,8,["img","title","skuText","price"]),r(Z,{class:"apply-box ss-flex ss-col-center ss-row-between border-bottom ss-p-x-20"},{default:l((()=>[r(Z,{class:"ss-flex ss-col-center"},{default:l((()=>[r(Z,{class:"title ss-m-r-20"},{default:l((()=>[y(b(10===t.way?"仅退款":"退款退货"),1)])),_:2},1024),r(Z,{class:"value"},{default:l((()=>[y(b(g(M)(t)),1)])),_:2},1024)])),_:2},1024),r(D,{class:"_icon-forward"})])),_:2},1024),r(Z,{class:"tool-btn-box ss-flex ss-col-center ss-row-right ss-p-r-20"},{default:l((()=>[r(Z,null,{default:l((()=>[(null==t?void 0:t.buttons.includes("cancel"))?(e(),o(q,{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(B,{key:2,status:F.loadStatus,"content-text":{contentdown:"上拉加载更多"},onClick:Y},null,8,["status"])):c("",!0)])),_:1})}}},[["__scopeId","data-v-de25cc13"]]);export{E as default};