import{a0 as e,y as s,o as a,s as t,e as r,f as l,w as i,l as n,j as o,t as d,u,a2 as p,i as c,x as f,ai as m,af as x,G as g,aj as _,m as y}from"./index-68dd960a.js";import{_ as w}from"./s-layout.454a15cd.js";import{f as b}from"./phone-international-input.471da4c0.js";import{A as v}from"./afterSale.7ed28fcc.js";import{_ as h}from"./_plugin-vue_export-helper.1b428a4d.js";const I=()=>e({url:"/trade/delivery/express/list",method:"get"}),j=h({__name:"return-delivery",setup(e){const h=s({id:0,expressIndex:0,expresses:[]});function j(e){h.expressIndex=e.detail.value}async function G(e){if(!h.expresses[h.expressIndex].id)return t.$helper.toast("请选择物流公司"),!1;if(!e.detail.value.logisticsNo)return t.$helper.toast("请填写物流单号"),!1;let s={id:h.id,logisticsId:h.expresses[h.expressIndex].id,logisticsNo:e.detail.value.logisticsNo};const{code:a}=await v.deliveryAfterSale(s);0===a&&(p({title:"填写退货成功"}),t.$router.go("/pages/order/aftersale/detail",{id:h.id}))}return a((e=>{e.id?(h.id=e.id,async function(){const{code:e,data:s}=await I();0===e&&(h.expresses=s,h.expresses.unshift({id:0,name:"请选择"}))}()):t.$helper.toast("缺少订单信息，请检查")})),(e,s)=>{const a=c,t=f,p=m,v=x,I=g,B=_,N=n(y("s-layout"),w);return r(),l(N,{title:"退货物流"},{default:i((()=>[o(a,null,{default:i((()=>[o(B,{onSubmit:G,"report-submit":"true"},{default:i((()=>[o(a,{class:"apply-return"},{default:i((()=>[o(a,{class:"list borRadius14"},{default:i((()=>[o(a,{class:"item acea-row row-between-wrapper",style:{display:"flex","align-items":"center"}},{default:i((()=>[o(a,null,{default:i((()=>[d("物流公司")])),_:1}),o(p,{mode:"selector",class:"num",onChange:j,value:h.expressIndex,range:h.expresses,"range-key":"name"},{default:i((()=>[o(a,{class:"picker acea-row row-between-wrapper",style:{display:"flex","align-items":"center"}},{default:i((()=>[o(a,{class:"reason"},{default:i((()=>[d(u(h.expresses[h.expressIndex].name),1)])),_:1}),o(t,{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:i((()=>[o(a,null,{default:i((()=>[d("物流单号")])),_:1}),o(v,{placeholder:"请填写物流单号",class:"num",name:"logisticsNo","placeholder-class":"placeholder"})])),_:1}),o(I,{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:i((()=>[d("提交")])),_:1})])),_:1})])),_:1})])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-932a289a"]]);export{j as default};
