import{B as e,o as s,s as a,f as t,g as r,w as l,as as i,q as n,n as o,m as d,t as u,am as p,aq as c,l as f,A as m,at as x,a5 as g,L as _,au as y,u as v}from"./index-007bf156.js";import{_ as w}from"./s-layout.19bedb43.js";import{f as b}from"./phone-international-input.3617e4e0.js";import{_ as h}from"./_plugin-vue_export-helper.1b428a4d.js";import"./useGoods.ac3bf93e.js";const I=h({__name:"return-delivery",setup(h){const I=e({id:0,expressIndex:0,expresses:[]});function j(e){I.expressIndex=e.detail.value}async function B(e){if(!I.expresses[I.expressIndex].id)return a.$helper.toast("请选择物流公司"),!1;if(!e.detail.value.logisticsNo)return a.$helper.toast("请填写物流单号"),!1;let s={id:I.id,logisticsId:I.expresses[I.expressIndex].id,logisticsNo:e.detail.value.logisticsNo};const{code:t}=await p.deliveryAfterSale(s);0===t&&(c({title:"填写退货成功"}),a.$router.go("/pages/order/aftersale/detail",{id:I.id}))}return s((e=>{e.id?(I.id=e.id,async function(){const{code:e,data:s}=await i.getDeliveryExpressList();0===e&&(I.expresses=s,I.expresses.unshift({id:0,name:"请选择"}))}()):a.$helper.toast("缺少订单信息，请检查")})),(e,s)=>{const a=f,i=m,p=x,c=g,h=_,G=y,k=n(v("s-layout"),w);return t(),r(k,{title:"退货物流"},{default:l((()=>[o(a,null,{default:l((()=>[o(G,{onSubmit:B,"report-submit":"true"},{default:l((()=>[o(a,{class:"apply-return"},{default:l((()=>[o(a,{class:"list borRadius14"},{default:l((()=>[o(a,{class:"item acea-row row-between-wrapper",style:{display:"flex","align-items":"center"}},{default:l((()=>[o(a,null,{default:l((()=>[d("物流公司")])),_:1}),o(p,{mode:"selector",class:"num",onChange:j,value:I.expressIndex,range:I.expresses,"range-key":"name"},{default:l((()=>[o(a,{class:"picker acea-row row-between-wrapper",style:{display:"flex","align-items":"center"}},{default:l((()=>[o(a,{class:"reason"},{default:l((()=>{var e;return[d(u(null==(e=I.expresses[I.expressIndex])?void 0:e.name),1)]})),_:1}),o(i,{src:b,class:"select-icon"})])),_:1})])),_:1},8,["value","range"])])),_:1}),o(a,{class:"item textarea acea-row row-between",style:{display:"flex","align-items":"center"}},{default:l((()=>[o(a,null,{default:l((()=>[d("物流单号")])),_:1}),o(c,{placeholder:"请填写物流单号",class:"num",name:"logisticsNo","placeholder-class":"placeholder"})])),_:1}),o(h,{class:"returnBnt bg-color ss-reset-button ui-BG-Main-Gradient sub-btn","form-type":"submit",style:{background:"linear-gradient(90deg,var(--ui-BG-Main),var(--ui-BG-Main-gradient))!important"}},{default:l((()=>[d("提交")])),_:1})])),_:1})])),_:1})])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-2e052dc0"]]);export{I as default};
