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