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

1
  1. import{y as t,o as a,z as s,e,f as o,w as n,_ as i,l,j as r,g as c,k as p,r as u,F as d,m as f,i as m,v as g,s as _,t as y,u as b,C as x,M as j,E as k,G as w}from"./index-b48a414d.js";import{_ as v}from"./su-tabs.a383f815.js";import{_ as S}from"./su-sticky.aabc6a00.js";import{_ as h}from"./s-empty.6d3471cc.js";import{_ as C}from"./s-goods-item.13120f93.js";import{_ as N}from"./uni-load-more.647920f4.js";import{n as z,_ as T,o as A,q as E}from"./s-layout.d6dcdc81.js";import{A as M}from"./afterSale.e9a3d47e.js";import{_ as P}from"./_plugin-vue_export-helper.1b428a4d.js";import"./uni-badge.78cdef34.js";/* empty css */import"./points.c381a8e1.js";/* empty css */import"./phone-international-input.feef99c7.js";const q=P({__name:"list",setup(P){const q={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=q,F.currentTab=t.index,U()}async function U(){F.loadStatus="loading";let{data:t,code:a}=await M.getAfterSalePage({pageNo:F.pagination.pageNo,pageSize:F.pagination.pageSize});0===a&&(t.list.forEach((t=>z(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 $(){"noMore"!==F.loadStatus&&(F.pagination.pageNo++,U())}return a((async t=>{t.type&&(F.currentTab=t.type),await U()})),s((()=>{$()})),(t,a)=>{const s=l(f("su-tabs"),v),i=l(f("su-sticky"),S),z=l(f("s-empty"),h),P=k,B=m,D=l(f("s-goods-item"),C),H=w,J=l(f("uni-load-more"),N),K=l(f("s-layout"),T);return e(),o(K,{title:"售后列表"},{default:n((()=>[r(i,{bgColor:"#fff"},{default:n((()=>[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(B,{key:1},{default:n((()=>[(e(!0),p(d,null,u(F.pagination.list,(t=>(e(),o(B,{class:"list-box ss-m-y-20",key:t.id,onClick:a=>g(_).$router.go("/pages/order/aftersale/detail",{id:t.id})},{default:n((()=>[r(B,{class:"order-head ss-flex ss-col-center ss-row-between"},{default:n((()=>[r(P,{class:"no"},{default:n((()=>[y("服务单号:"+b(t.no),1)])),_:2},1024),r(P,{class:"state"},{default:n((()=>[y(b(g(A)(t)),1)])),_:2},1024)])),_:2},1024),r(D,{img:t.picUrl,title:t.spuName,skuText:t.properties.map((t=>t.valueName)).join(" "),price:t.refundPrice},null,8,["img","title","skuText","price"]),r(B,{class:"apply-box ss-flex ss-col-center ss-row-between border-bottom ss-p-x-20"},{default:n((()=>[r(B,{class:"ss-flex ss-col-center"},{default:n((()=>[r(B,{class:"title ss-m-r-20"},{default:n((()=>[y(b(10===t.way?"仅退款":"退款退货"),1)])),_:2},1024),r(B,{class:"value"},{default:n((()=>[y(b(g(E)(t)),1)])),_:2},1024)])),_:2},1024),r(P,{class:"_icon-forward"})])),_:2},1024),r(B,{class:"tool-btn-box ss-flex ss-col-center ss-row-right ss-p-r-20"},{default:n((()=>[r(B,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 M.cancelAfterSale(s);0===a&&(F.pagination=q,await U())}});var s}),["stop"])},{default:n((()=>[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{q as default};