1 |
- import{v as t,t as a,o as e,m as s,a as o,b as n,d as l,w as i,u as r,am as u,_ as p,e as c,f as d,z as _,x as m,y as f,F as g,i as y,s as b,g as x,j,L as v,R as k,l as w,M as S}from"./index-DUAp9XEj.js";import{_ as h}from"./su-tabs.D9LHL6MN.js";import{_ as C}from"./su-sticky.CUWzU4BI.js";import{_ as N}from"./s-empty.BQPqUoar.js";import{_ as z}from"./s-goods-item.BjLLzKA4.js";import{_ as T}from"./uni-load-more.7LU3tP0I.js";import{_ as A}from"./s-layout.a1_kfpIW.js";import{l as q,m as M,n as E}from"./useGoods.Cwnq-veC.js";import{_ as I}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./uni-badge.CNH6qySH.js";/* empty css */import"./points.DDTOnulC.js";/* empty css */import"./s-menu-tools.Bn3wdRty.js";import"./s-layout.vue_vue_type_style_index_0_scoped_d5f7c468_lang.CKkHKX6k.js";import"./phone-international-input.vue_vue_type_style_index_0_scoped_a793e264_lang.Bv2EixP5.js";import"./s-tabbar.fodLOlFD.js";import"./phone-international-input.D4fi9eUK.js";const P=I({__name:"list",setup(I){const P={list:[],total:0,pageNo:1,pageSize:10},F=t({currentTab:0,showApply:!1,pagination:{list:[],total:0,pageNo:1,pageSize:10},loadStatus:""}),G=[{name:a("common.all"),value:"all"}];function H(t){F.pagination=P,F.currentTab=t.index,J()}async function J(){F.loadStatus="loading";let{data:t,code:a}=await u.getAfterSalePage({pageNo:F.pagination.pageNo,pageSize:F.pagination.pageSize});0===a&&(t.list.forEach((t=>q(t))),F.pagination.list=p.concat(F.pagination.list,t.list),F.pagination.total=t.total,F.loadStatus=F.pagination.list.length<F.pagination.total?"more":"noMore")}function L(){"noMore"!==F.loadStatus&&(F.pagination.pageNo++,J())}return e((async t=>{t.type&&(F.currentTab=t.type),await J()})),s((()=>{L()})),(t,e)=>{const s=o(n("su-tabs"),h),p=o(n("su-sticky"),C),q=o(n("s-empty"),N),I=w,O=y,R=o(n("s-goods-item"),z),U=S,X=o(n("uni-load-more"),T),Y=o(n("s-layout"),A);return c(),l(Y,{title:r(a)("order.after_sales_list")},{default:i((()=>[d(p,{bgColor:"#fff"},{default:i((()=>[d(s,{list:G,scrollable:!1,onChange:H,current:F.currentTab},null,8,["current"])])),_:1}),0===F.pagination.total?(c(),l(q,{key:0,icon:"/static/data-empty.png",text:r(a)("common.no_data")},null,8,["text"])):_("",!0),F.pagination.total>0?(c(),l(O,{key:1},{default:i((()=>[(c(!0),m(g,null,f(F.pagination.list,(t=>(c(),l(O,{class:"list-box ss-m-y-20",key:t.id,onClick:a=>r(b).$router.go("/pages/order/aftersale/detail",{id:t.id})},{default:i((()=>[d(O,{class:"order-head ss-flex ss-col-center ss-row-between"},{default:i((()=>[d(I,{class:"no"},{default:i((()=>[x(j(r(a)("order.service_order_number"))+":"+j(t.no),1)])),_:2},1024),d(I,{class:"state"},{default:i((()=>[x(j(r(M)(t)),1)])),_:2},1024)])),_:2},1024),d(R,{img:t.picUrl,title:t.spuName,skuText:t.properties.map((t=>t.valueName)).join(" "),price:t.refundPrice},null,8,["img","title","skuText","price"]),d(O,{class:"apply-box ss-flex ss-col-center ss-row-between border-bottom ss-p-x-20"},{default:i((()=>[d(O,{class:"ss-flex ss-col-center"},{default:i((()=>[d(O,{class:"title ss-m-r-20"},{default:i((()=>[x(j(10===t.way?r(a)("order.refund_only"):r(a)("order.refund_and_return")),1)])),_:2},1024),d(O,{class:"value"},{default:i((()=>[x(j(r(E)(t)),1)])),_:2},1024)])),_:2},1024),d(I,{class:"_icon-forward"})])),_:2},1024),d(O,{class:"tool-btn-box ss-flex ss-col-center ss-row-right ss-p-r-20"},{default:i((()=>[d(O,null,{default:i((()=>[(null==t?void 0:t.buttons.includes("cancel"))?(c(),l(U,{key:0,class:"ss-reset-button tool-btn",onClick:v((e=>{return s=t.id,void k({title:a("setting.prompt"),content:a("order.confirm_cancel_request"),success:async function(t){if(!t.confirm)return;const{code:a}=await u.cancelAfterSale(s);0===a&&(F.pagination=P,await J())}});var s}),["stop"])},{default:i((()=>[x(j(r(a)("order.cancel_request")),1)])),_:2},1032,["onClick"])):_("",!0)])),_:2},1024)])),_:2},1024)])),_:2},1032,["onClick"])))),128))])),_:1})):_("",!0),F.pagination.total>0?(c(),l(X,{key:2,status:F.loadStatus,"content-text":{contentdown:"上拉加载更多"},onClick:L},null,8,["status"])):_("",!0)])),_:1},8,["title"])}}},[["__scopeId","data-v-efc5bb77"]]);export{P as default};
|