import{f as e,o as l,c as a,w as o,a as t,u as s,k as u,h as r,t as d,D as i,g as n,d as c}from"./index-d76b1e7a.js";import{_ as p}from"./uv-navbar.59911b60.js";import{o as m,u as v,r as _}from"./useRouter.2bdb47a0.js";import{_ as f,a as y}from"./uv-list.31608877.js";import{_ as b}from"./uv-input.d57a3a97.js";import{_ as j}from"./uv-picker.2c560387.js";import{_ as k}from"./upload-file.0b8d89dc.js";import{_ as C}from"./uv-button.dcfcbf96.js";import{_ as g}from"./layout.f8e9d577.js";import{q as h,r as V}from"./order.6c3b873a.js";import{u as x}from"./useInterface.5df3648b.js";import{_ as w}from"./_plugin-vue_export-helper.1b428a4d.js";import"./uv-status-bar.66ab7702.js";/* empty css                                                                      */import"./uv-icon.5730d4d2.js";import"./uv-navbar.vue_vue_type_style_index_0_scoped_8d8b32e4_lang.3fde2b65.js";import"./uv-badge.8f9f267e.js";import"./uv-transition.b33e1d5c.js";import"./uv-popup.432d8c17.js";import"./uv-upload.9e6ede9e.js";import"./api.9246a192.js";const I=w({__name:"addLogistics",setup(w){const{toast:I}=x(),{getParams:P,goBack:L,push:U}=v(),B=e(null);e(null);const N=e([]),q=e([]),z=e({code:"",name:"",postalCode:"",orderCode:"",id:"",returnPolicy:"",returnVoucher:""}),A=()=>{B.value.open()},D=e=>{console.log(e),z.value.code=e.value[0].code,z.value.name=e.value[0].name,B.value.close()},E=async()=>{z.value.code?z.value.postalCode?(await V({...z.value,returnVoucher:N.value.map((e=>e.url)).join(",")}),I({title:"填写成功"}),U({url:"/pages/refundInfo/refundInfo"},{data:{id:z.value.id}})):i({icon:"none",title:"请选择退货说明",duration:2e3}):i({icon:"none",title:"请选择快递公司",duration:2e3})};return m((e=>{const l=P(e);z.value.id=l.id,z.value.orderCode=l.orderCode,h().then((e=>{q.value=[e]}))})),(e,i)=>{const m=_(n("uv-navbar"),p),v=c,h=_(n("uv-list-item"),f),V=_(n("uv-input"),b),x=_(n("uv-list"),y),w=_(n("uv-picker"),j),I=_(n("upload-file"),k),P=_(n("uv-button"),C),U=_(n("layout"),g);return l(),a(U,null,{default:o((()=>[t(m,{fixed:!1,title:"填写物流","left-arrow":"",onLeftClick:s(L)},null,8,["onLeftClick"]),u("div",null,[u("div",{class:"mb-20"}),t(v,{class:"y-list"},{default:o((()=>[t(x,{border:""},{default:o((()=>[t(h,{border:"",clickable:"","right-text":"请选择","show-arrow":"",onClick:i[0]||(i[0]=()=>{})},{default:o((()=>[t(v,{class:"y-list-content"},{default:o((()=>[t(v,{class:"y-list-label"},{default:o((()=>[r("物流公司")])),_:1}),z.value.name?(l(),a(v,{key:1,class:"y-list-select",onClick:A},{default:o((()=>[r(d(z.value.name),1)])),_:1})):(l(),a(v,{key:0,class:"y-list-select-placeholder",onClick:A},{default:o((()=>[r(" 请选择 ")])),_:1}))])),_:1})])),_:1}),t(h,{border:""},{default:o((()=>[t(v,{class:"y-list-content"},{default:o((()=>[t(v,{class:"y-list-label"},{default:o((()=>[r("物流单号")])),_:1}),t(v,{class:"y-list-input"},{default:o((()=>[t(V,{placeholder:"请输入内容",border:"none",modelValue:z.value.postalCode,"onUpdate:modelValue":i[1]||(i[1]=e=>z.value.postalCode=e)},null,8,["modelValue"])])),_:1})])),_:1})])),_:1})])),_:1}),t(w,{ref_key:"logisticsPicker",ref:B,columns:q.value,keyName:"name",onConfirm:D},null,8,["columns"])])),_:1}),t(v,{class:"y-list"},{default:o((()=>[t(x,{border:""},{default:o((()=>[t(h,{border:""},{default:o((()=>[t(v,{class:"y-list-content"},{default:o((()=>[t(v,{class:"y-list-label"},{default:o((()=>[r("退货说明")])),_:1}),t(v,{class:"y-list-input"},{default:o((()=>[t(V,{placeholder:"请输入内容",border:"none",modelValue:z.value.returnPolicy,"onUpdate:modelValue":i[2]||(i[2]=e=>z.value.returnPolicy=e)},null,8,["modelValue"])])),_:1})])),_:1})])),_:1})])),_:1})])),_:1}),t(v,{class:"card noBorder full"},{default:o((()=>[t(v,{class:"card-head"},{default:o((()=>[u("div",{class:"card-title"},"上传凭证")])),_:1}),t(v,{class:"card-content"},{default:o((()=>[t(I,{modelValue:N.value,"onUpdate:modelValue":i[3]||(i[3]=e=>N.value=e)},null,8,["modelValue"])])),_:1})])),_:1})]),u("div",{class:"form-buttons"},[t(P,{round:"",block:"",type:"primary",onClick:E},{default:o((()=>[r(" 提交 ")])),_:1})])])),_:1})}}},[["__scopeId","data-v-bd85e80b"]]);export{I as default};
