"use strict";const e=require("../../../common/vendor.js"),t=require("../../../sheep/index.js"),s=require("../../../sheep/hooks/useGoods.js"),r=require("../../../sheep/api/trade/afterSale.js");if(require("../../../sheep/url/index.js"),require("../../../sheep/store/index.js"),require("../../../sheep/store/app.js"),require("../../../sheep/api/promotion/diy.js"),require("../../../sheep/request/index.js"),require("../../../sheep/config/index.js"),require("../../../sheep/platform/index.js"),require("../../../sheep/platform/provider/wechat/index.js"),require("../../../sheep/platform/provider/wechat/miniProgram.js"),require("../../../sheep/api/member/auth.js"),require("../../../sheep/api/member/social.js"),require("../../../sheep/api/member/user.js"),require("../../../sheep/platform/provider/apple/index.js"),require("../../../sheep/platform/share.js"),require("../../../sheep/router/index.js"),require("../../../sheep/hooks/useModal.js"),require("../../../sheep/helper/index.js"),require("../../../sheep/helper/test.js"),require("../../../sheep/helper/digit.js"),require("../../../sheep/api/member/signin.js"),require("../../../sheep/helper/throttle.js"),require("../../../sheep/platform/pay.js"),require("../../../sheep/api/pay/order.js"),require("../../../sheep/store/user.js"),require("../../../sheep/store/cart.js"),require("../../../sheep/api/trade/cart.js"),require("../../../sheep/api/pay/wallet.js"),require("../../../sheep/api/trade/order.js"),require("../../../sheep/api/promotion/coupon.js"),require("../../../sheep/store/sys.js"),require("../../../sheep/store/modal.js"),require("../../../sheep/config/zIndex.js"),require("../../../sheep/util/index.js"),!Array){(e.resolveComponent("su-tabs")+e.resolveComponent("su-sticky")+e.resolveComponent("s-empty")+e.resolveComponent("s-goods-item")+e.resolveComponent("uni-load-more")+e.resolveComponent("s-layout"))()}Math||((()=>"../../../sheep/ui/su-tabs/su-tabs.js")+(()=>"../../../sheep/ui/su-sticky/su-sticky.js")+(()=>"../../../sheep/components/s-empty/s-empty.js")+(()=>"../../../sheep/components/s-goods-item/s-goods-item.js")+(()=>"../../../uni_modules/uni-load-more/components/uni-load-more/uni-load-more.js")+(()=>"../../../sheep/components/s-layout/s-layout.js"))();const i={__name:"list",setup(i){const a={list:[],total:0,pageNo:1,pageSize:10},o=e.reactive({currentTab:0,showApply:!1,pagination:{list:[],total:0,pageNo:1,pageSize:10},loadStatus:""}),n=[{name:"全部",value:"all"}];function p(e){o.pagination=a,o.currentTab=e.index,u()}async function u(){o.loadStatus="loading";let{data:t,code:i}=await r.AfterSaleApi.getAfterSalePage({pageNo:o.pagination.pageNo,pageSize:o.pagination.pageSize});0===i&&(t.list.forEach((e=>s.handleAfterSaleButtons(e))),o.pagination.list=e._.concat(o.pagination.list,t.list),o.pagination.total=t.total,o.loadStatus=o.pagination.list.length<o.pagination.total?"more":"noMore")}function l(){"noMore"!==o.loadStatus&&(o.pagination.pageNo++,u())}return e.onLoad((async e=>{e.type&&(o.currentTab=e.type),await u()})),e.onReachBottom((()=>{l()})),(i,d)=>e.e({a:e.o(p),b:e.p({list:n,scrollable:!1,current:o.currentTab}),c:e.p({bgColor:"#fff"}),d:0===o.pagination.total},0===o.pagination.total?{e:e.p({icon:"/static/data-empty.png",text:"暂无数据"})}:{},{f:o.pagination.total>0},o.pagination.total>0?{g:e.f(o.pagination.list,((i,n,p)=>e.e({a:e.t(i.no),b:e.t(e.unref(s.formatAfterSaleStatus)(i)),c:"9f57e4d3-4-"+p+",9f57e4d3-0",d:e.p({img:i.picUrl,title:i.spuName,skuText:i.properties.map((e=>e.valueName)).join(" "),price:i.refundPrice}),e:e.t(10===i.way?"仅退款":"退款退货"),f:e.t(e.unref(s.formatAfterSaleStatusDescription)(i)),g:null==i?void 0:i.buttons.includes("cancel")},(null==i?void 0:i.buttons.includes("cancel"))?{h:e.o((t=>{return s=i.id,void e.index.showModal({title:"提示",content:"确定要取消此申请吗？",success:async function(e){if(!e.confirm)return;const{code:t}=await r.AfterSaleApi.cancelAfterSale(s);0===t&&(o.pagination=a,await u())}});var s}),i.id)}:{},{i:i.id,j:e.o((s=>e.unref(t.sheep).$router.go("/pages/order/aftersale/detail",{id:i.id})),i.id)})))}:{},{h:o.pagination.total>0},o.pagination.total>0?{i:e.o(l),j:e.p({status:o.loadStatus,"content-text":{contentdown:"上拉加载更多"}})}:{},{k:e.p({title:"售后列表"})})}},a=e._export_sfc(i,[["__scopeId","data-v-9f57e4d3"]]);wx.createPage(a);
