import{u as k}from"./useInstance.233fbdde.js";import{az as d,aa as i,D as m,d as y,a6 as L,r as h,b as Y,p as w,c as r,e as F,k as V,i as t,h as o,u as n,f as q,j as U,m as A,t as $,F as I,a2 as J,E as D}from"./index.0308b213.js";const W=e=>d({url:"adminapi/mall.MallOrder/lists",params:e}),X=e=>d({url:"adminapi/mall.MallOrder/detail",params:{id:e}}),N=e=>d({url:"adminapi/mall.MallOrder/toShipping",method:"POST",data:e}),G=e=>d({url:"adminapi/mall.MallOrder/export",method:"POST",data:e}),Q=e=>i({url:"agent/mall.MallOrder/lists",params:e}),ee=e=>i({url:"agent/mall.MallOrder/detail",params:{id:e}}),R=e=>i({url:"agent/mall.MallOrder/toShipping",method:"POST",data:e}),le=e=>i({url:"agent/mall.MallOrder/export",method:"POST",data:e}),ae=e=>m({url:"merchant/shopping.MallOrder/lists",params:e}),te=e=>m({url:"merchant/shopping.MallOrder/export",method:"POST",data:e}),Z=e=>m({url:"merchant/shopping.MallOrder/toShipping",method:"POST",data:e}),ue=e=>m({url:"merchant/shopping.MallOrder/detail",params:{id:e}}),j=A("\u63D0\u4EA4"),z=A("\u53D6\u6D88"),oe=y({props:{id:{default:0},modelValue:{type:Boolean,default:!1},ids:{default:[]}},emits:["update:modelValue","onClose"],setup(e,{emit:M}){const p=e,{OpPlatform:x}=L(),{global:b}=k(),c=h([{code:"ZTO",name:"\u4E2D\u901A\u5FEB\u9012"},{code:"YTO",name:"\u5706\u901A\u901F\u9012"},{code:"YD",name:"\u97F5\u8FBE\u901F\u9012"},{code:"STO",name:"\u7533\u901A\u5FEB\u9012"},{code:"SF",name:"\u987A\u4E30\u901F\u8FD0"},{code:"JD",name:"\u4EAC\u4E1C\u5FEB\u9012"},{code:"YZPY",name:"\u90AE\u653F\u5FEB\u9012\u5305\u88F9"},{code:"EMS",name:"EMS"},{code:"JTSD",name:"\u6781\u5154\u901F\u9012"},{code:"DBL",name:"\u5FB7\u90A6\u5FEB\u9012"},{code:"FWX",name:"\u4E30\u7F51\u901F\u8FD0"},{code:"HTKY",name:"\u767E\u4E16\u5FEB\u9012"}]),_=h(!1),E=h(),l=Y({id:0,ids:[],express_name:"",express_code:"",express_no:""});w(()=>p.modelValue,s=>{l.id=p.id,l.ids=p.ids,_.value=s});const v=()=>{const s=c.value.findIndex((g,S)=>g.code==l.express_code),u=c.value[s].name;l.express_name=u,x.value=="agent"?R(l).then(()=>{D.success("\u8BA2\u5355\u53D1\u8D27\u6210\u529F")}).catch(()=>{}):x.value=="shangpu"?N(l).then(()=>{D.success("\u8BA2\u5355\u53D1\u8D27\u6210\u529F")}).catch(()=>{}):Z(l).then(()=>{D.success("\u8BA2\u5355\u53D1\u8D27\u6210\u529F")}).catch(()=>{}),f()},f=()=>{M("update:modelValue",!1),M("onClose"),b.$resetForm(E.value,l)};return(s,u)=>{const g=r("el-option"),S=r("el-select"),O=r("el-form-item"),T=r("el-input"),B=r("el-button"),C=r("el-dialog");return F(),V(C,{modelValue:_.value,"onUpdate:modelValue":u[2]||(u[2]=a=>_.value=a),title:"\u7535\u5546\u53D1\u8D27",width:"50%",onClose:f},{default:t(()=>[o(n(J),{ref_key:"formRef",ref:E,model:n(l),"label-width":"140px"},{default:t(()=>[o(O,{class:"tn-el-form-item",label:"\u7269\u6D41\u540D\u79F0"},{default:t(()=>[o(S,{modelValue:n(l).express_code,"onUpdate:modelValue":u[0]||(u[0]=a=>n(l).express_code=a),filterable:"",clearable:""},{default:t(()=>[(F(!0),q(I,null,U(c.value,(a,P)=>(F(),V(g,{key:P,value:a.code,label:a.name},{default:t(()=>[A($(a.name),1)]),_:2},1032,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(O,{class:"tn-el-form-item",label:"\u7269\u6D41\u5355\u53F7"},{default:t(()=>[o(T,{modelValue:n(l).express_no,"onUpdate:modelValue":u[1]||(u[1]=a=>n(l).express_no=a)},null,8,["modelValue"])]),_:1}),o(O,null,{default:t(()=>[o(B,{type:"primary",onClick:v},{default:t(()=>[j]),_:1}),o(B,{onClick:f},{default:t(()=>[z]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}});export{oe as _,ee as a,ue as b,ae as c,Q as d,W as e,le as f,X as g,G as h,te as i};
