"use strict";const e=require("../../../common/vendor.js"),r=require("../../../common/assets.js"),s=require("../../../sheep/index.js"),i=require("../../../sheep/api/trade/afterSale.js"),p=require("../../../sheep/api/trade/delivery.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"),!Array){e.resolveComponent("s-layout")()}Math;const t={__name:"return-delivery",setup(t){const a=e.reactive({id:0,expressIndex:0,expresses:[]});function o(e){a.expressIndex=e.detail.value}async function u(r){if(!a.expresses[a.expressIndex].id)return s.sheep.$helper.toast("请选择物流公司"),!1;if(!r.detail.value.logisticsNo)return s.sheep.$helper.toast("请填写物流单号"),!1;let p={id:a.id,logisticsId:a.expresses[a.expressIndex].id,logisticsNo:r.detail.value.logisticsNo};const{code:t}=await i.AfterSaleApi.deliveryAfterSale(p);0===t&&(e.index.showToast({title:"填写退货成功"}),s.sheep.$router.go("/pages/order/aftersale/detail",{id:a.id}))}return e.onLoad((e=>{e.id?(a.id=e.id,async function(){const{code:e,data:r}=await p.DeliveryApi.getDeliveryExpressList();0===e&&(a.expresses=r,a.expresses.unshift({id:0,name:"请选择"}))}()):s.sheep.$helper.toast("缺少订单信息，请检查")})),(s,i)=>({a:e.t(a.expresses[a.expressIndex].name),b:r._imports_0$1,c:e.o(o),d:a.expressIndex,e:a.expresses,f:e.o(u),g:e.p({title:"退货物流"})})}},a=e._export_sfc(t,[["__scopeId","data-v-932a289a"]]);wx.createPage(a);
