import{a as e,O as l,o as a,j as t,w as o,u as s,G as u,h as r,i,f as n,I as d,l as _,s as c,H as p,B as v}from"./index-9bec188e.js";import{_ as m}from"./uv-navbar.c519dc25.js";import{_ as f,a as y}from"./uv-list.ea38c0d0.js";import{_ as b}from"./uv-input.fc0d46b1.js";import{U as j}from"./uv-picker.0e41c7e2.js";import{_ as g}from"./upload-file.06bcb25a.js";import{_ as k}from"./uv-button.9242bdc2.js";import{_ as C}from"./layout.62460c6d.js";import{r as x,t as h}from"./order.f67793d3.js";import{u as V}from"./useInterface.982c71ba.js";import{_ as P}from"./_plugin-vue_export-helper.1b428a4d.js";import"./uv-status-bar.6dc37cad.js";/* empty css                                                                      */import"./uv-icon.27c7246d.js";import"./uv-icon.vue_vue_type_style_index_0_scoped_23936b10_lang.7145f5b2.js";import"./uv-navbar.vue_vue_type_style_index_0_scoped_4c301e25_lang.553ed1e6.js";import"./uv-badge.07f8d0fa.js";import"./uv-loading-icon.bfbe6dc1.js";import"./uv-loading-icon.vue_vue_type_style_index_0_scoped_bad0efbf_lang.8998f762.js";import"./uv-input.vue_vue_type_style_index_0_scoped_a7ca300a_lang.8012b887.js";import"./uv-popup.f272c9ae.js";import"./uv-overlay.6fe03ce8.js";import"./uv-transition.b971e856.js";import"./createAnimation.e5fefaf6.js";import"./uv-upload.2f331acd.js";import"./uv-button.vue_vue_type_style_index_0_scoped_bc0e850d_lang.79bfdc50.js";/* empty css                                                               */const w=P({__name:"addLogistics",setup(P){const{toast:w}=V(),{getParams:I,goBack:L,push:U}=s(),B=e(null);e(null);const A=e([]),G=e([]),N=e({code:"",name:"",postalCode:"",orderCode:"",id:"",returnPolicy:"",returnVoucher:""}),O=()=>{B.value.open()},W=e=>{console.log(e),N.value.code=e.value[0].code,N.value.name=e.value[0].name,B.value.close()},q=async()=>{N.value.code?N.value.postalCode?(await h({...N.value,returnVoucher:A.value.map((e=>e.url)).join(",")}),w({title:"填写成功"}),U({url:"/pages/refundInfo/refundInfo"},{data:{id:N.value.id},type:"redirectTo"})):c({icon:"none",title:"请选择退货说明",duration:2e3}):c({icon:"none",title:"请选择快递公司",duration:2e3})};return l((e=>{const l=I(e);N.value.id=l.id,N.value.orderCode=l.orderCode,x().then((e=>{G.value=[e]}))})),(e,l)=>{const s=u(p("uv-navbar"),m),c=v,x=u(p("uv-list-item"),f),h=u(p("uv-input"),b),V=u(p("uv-list"),y),P=u(p("uv-picker"),j),w=u(p("upload-file"),g),I=u(p("uv-button"),k),U=u(p("layout"),C);return a(),t(U,null,{default:o((()=>[r(s,{fixed:!1,title:"填写物流","left-arrow":"",onLeftClick:i(L)},null,8,["onLeftClick"]),n("div",null,[n("div",{class:"mb-20"}),r(c,{class:"y-list"},{default:o((()=>[r(V,{border:""},{default:o((()=>[r(x,{border:"",clickable:"","right-text":"请选择","show-arrow":"",onClick:l[0]||(l[0]=()=>{})},{default:o((()=>[r(c,{class:"y-list-content"},{default:o((()=>[r(c,{class:"y-list-label"},{default:o((()=>[d("物流公司")])),_:1}),N.value.name?(a(),t(c,{key:1,class:"y-list-select",onClick:O},{default:o((()=>[d(_(N.value.name),1)])),_:1})):(a(),t(c,{key:0,class:"y-list-select-placeholder",onClick:O},{default:o((()=>[d(" 请选择 ")])),_:1}))])),_:1})])),_:1}),r(x,{border:""},{default:o((()=>[r(c,{class:"y-list-content"},{default:o((()=>[r(c,{class:"y-list-label"},{default:o((()=>[d("物流单号")])),_:1}),r(c,{class:"y-list-input"},{default:o((()=>[r(h,{placeholder:"请输入内容",border:"none",modelValue:N.value.postalCode,"onUpdate:modelValue":l[1]||(l[1]=e=>N.value.postalCode=e)},null,8,["modelValue"])])),_:1})])),_:1})])),_:1})])),_:1}),r(P,{ref_key:"logisticsPicker",ref:B,columns:G.value,keyName:"name",onConfirm:W},null,8,["columns"])])),_:1}),r(c,{class:"y-list"},{default:o((()=>[r(V,{border:""},{default:o((()=>[r(x,{border:""},{default:o((()=>[r(c,{class:"y-list-content"},{default:o((()=>[r(c,{class:"y-list-label"},{default:o((()=>[d("退货说明")])),_:1}),r(c,{class:"y-list-input"},{default:o((()=>[r(h,{placeholder:"请输入内容",border:"none",modelValue:N.value.returnPolicy,"onUpdate:modelValue":l[2]||(l[2]=e=>N.value.returnPolicy=e)},null,8,["modelValue"])])),_:1})])),_:1})])),_:1})])),_:1})])),_:1}),r(c,{class:"card noBorder full"},{default:o((()=>[r(c,{class:"card-head"},{default:o((()=>[n("div",{class:"card-title"},"上传凭证")])),_:1}),r(c,{class:"card-content"},{default:o((()=>[r(w,{modelValue:A.value,"onUpdate:modelValue":l[3]||(l[3]=e=>A.value=e)},null,8,["modelValue"])])),_:1})])),_:1})]),n("div",{class:"form-buttons"},[r(I,{round:"",block:"",type:"primary",onClick:q},{default:o((()=>[d(" 提交 ")])),_:1})])])),_:1})}}},[["__scopeId","data-v-60343a7e"]]);export{w as default};
