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 as d,f as n,I as i,l as _,s as c,H as p,B as v}from"./index-90c12cc1.js";import{_ as m}from"./uv-navbar.917fb540.js";import{_ as f,a as y}from"./uv-list.de4e7769.js";import{_ as b}from"./uv-input.934893c4.js";import{U as j}from"./uv-picker.5a69f03d.js";import{_ as g}from"./upload-file.69362209.js";import{_ as k}from"./uv-button.8e862d87.js";import{_ as C}from"./layout.e3de63ac.js";import{r as h,t as x}from"./order.190c4706.js";import{u as V}from"./useInterface.bd4f041a.js";import{_ as w}from"./_plugin-vue_export-helper.1b428a4d.js";import"./uv-status-bar.acda7a2c.js";/* empty css                                                                      */import"./uv-icon.c815b875.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.e49836ae.js";import"./uv-loading-icon.ad70964c.js";import"./uv-loading-icon.vue_vue_type_style_index_0_scoped_bad0efbf_lang.de7e0d02.js";import"./uv-input.vue_vue_type_style_index_0_scoped_a7ca300a_lang.8012b887.js";import"./uv-popup.a2d35ebb.js";import"./uv-upload.8ada27d8.js";import"./uv-button.vue_vue_type_style_index_0_scoped_bc0e850d_lang.79bfdc50.js";/* empty css                                                               */const I=w({__name:"addLogistics",setup(w){const{toast:I}=V(),{getParams:P,goBack:L,push:U}=s(),B=e(null);e(null);const N=e([]),O=e([]),q=e({code:"",name:"",postalCode:"",orderCode:"",id:"",returnPolicy:"",returnVoucher:""}),z=()=>{B.value.open()},D=e=>{console.log(e),q.value.code=e.value[0].code,q.value.name=e.value[0].name,B.value.close()},E=async()=>{q.value.code?q.value.postalCode?(await x({...q.value,returnVoucher:N.value.map((e=>e.url)).join(",")}),I({title:"填写成功"}),U({url:"/pages/refundInfo/refundInfo"},{data:{id:q.value.id},type:"redirectTo"})):c({icon:"none",title:"请选择退货说明",duration:2e3}):c({icon:"none",title:"请选择快递公司",duration:2e3})};return l((e=>{const l=P(e);q.value.id=l.id,q.value.orderCode=l.orderCode,h().then((e=>{O.value=[e]}))})),(e,l)=>{const s=u(p("uv-navbar"),m),c=v,h=u(p("uv-list-item"),f),x=u(p("uv-input"),b),V=u(p("uv-list"),y),w=u(p("uv-picker"),j),I=u(p("upload-file"),g),P=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:d(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(h,{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((()=>[i("物流公司")])),_:1}),q.value.name?(a(),t(c,{key:1,class:"y-list-select",onClick:z},{default:o((()=>[i(_(q.value.name),1)])),_:1})):(a(),t(c,{key:0,class:"y-list-select-placeholder",onClick:z},{default:o((()=>[i(" 请选择 ")])),_:1}))])),_:1})])),_:1}),r(h,{border:""},{default:o((()=>[r(c,{class:"y-list-content"},{default:o((()=>[r(c,{class:"y-list-label"},{default:o((()=>[i("物流单号")])),_:1}),r(c,{class:"y-list-input"},{default:o((()=>[r(x,{placeholder:"请输入内容",border:"none",modelValue:q.value.postalCode,"onUpdate:modelValue":l[1]||(l[1]=e=>q.value.postalCode=e)},null,8,["modelValue"])])),_:1})])),_:1})])),_:1})])),_:1}),r(w,{ref_key:"logisticsPicker",ref:B,columns:O.value,keyName:"name",onConfirm:D},null,8,["columns"])])),_:1}),r(c,{class:"y-list"},{default:o((()=>[r(V,{border:""},{default:o((()=>[r(h,{border:""},{default:o((()=>[r(c,{class:"y-list-content"},{default:o((()=>[r(c,{class:"y-list-label"},{default:o((()=>[i("退货说明")])),_:1}),r(c,{class:"y-list-input"},{default:o((()=>[r(x,{placeholder:"请输入内容",border:"none",modelValue:q.value.returnPolicy,"onUpdate:modelValue":l[2]||(l[2]=e=>q.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(I,{modelValue:N.value,"onUpdate:modelValue":l[3]||(l[3]=e=>N.value=e)},null,8,["modelValue"])])),_:1})])),_:1})]),n("div",{class:"form-buttons"},[r(P,{round:"",block:"",type:"primary",onClick:E},{default:o((()=>[i(" 提交 ")])),_:1})])])),_:1})}}},[["__scopeId","data-v-60343a7e"]]);export{I as default};
