import{d as A,h as j,r as _,e as B,l as J,o as u,v as c,w as t,g as I,x as V,a,f as s,c as K,F as L,q as M,n as y,P as S,D as T,y as W,z as E,A as G,W as H,C as Q,I as X,_ as Y,__tla as Z}from"./index-04f8d540.js";import{_ as $,__tla as aa}from"./Dialog-9afb5ba5.js";import{g as ea,__tla as ta}from"./index-6e443fbf.js";import{d as la,__tla as ra}from"./index-53c40608.js";import sa,{__tla as ia}from"./OrderBaseInfo-58320635.js";import oa,{__tla as _a}from"./OrderProduct-c8b91d84.js";import{u as da,__tla as ua}from"./useMessage-9c37e840.js";import{__tla as ca}from"./SPuUploadImg-ee8ee9b5.js";import{__tla as ma}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_ba706063_lang-f655ad55.js";import{__tla as na}from"./index-ef33124b.js";import{__tla as fa}from"./el-image-viewer-5878bd7a.js";import{__tla as pa}from"./formatTime-81f0c591.js";import{__tla as ya}from"./dict-ef06f7f7.js";import{__tla as va}from"./el-descriptions-item-acdf7c6c.js";import{__tla as ha}from"./DictTag-774e4f97.js";import"./color-6e929987.js";let w,ga=Promise.all([(()=>{try{return Z}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return pa}catch{}})(),(()=>{try{return ya}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return ha}catch{}})()]).then(async()=>{let v,h;v={style:{"text-align":"left",display:"flex"}},h={style:{"text-align":"right"}},w=Y(A({name:"OrderDeliveryForm",__name:"OrderDeliveryForm",emits:["success"],setup(xa,{expose:N,emit:D}){j();const m=da(),o=_(!1),d=_(!1),k=_("express"),e=_({id:0,logisticsId:null,logisticsNo:""}),n=_(),F=B({logisticsId:[{required:!0}],logisticsNo:[{required:!0}]});N({open:async(i,l)=>{z(),e.value.id=l,o.value=!0}});const R=D,q=async()=>{d.value=!0;try{if(e.value.logisticsId===null)return m.error("\u8BF7\u9009\u62E9\u7269\u6D41\u516C\u53F8"),!1;if(e.value.logisticsNo==="")return m.error("\u8BF7\u8F93\u5165\u7269\u6D41\u5355\u53F7"),!1;const i=a(e);k.value==="none"&&(i.logisticsId=0,i.logisticsNo=""),await la(i),m.success("\u53D1\u8D27\u6210\u529F"),o.value=!1,R("success",!0)}finally{d.value=!1}},z=()=>{var i;e.value={id:0,logisticsId:null,logisticsNo:""},(i=n.value)==null||i.resetFields()},g=_([]);return J(async()=>{g.value=await ea()}),(i,l)=>{const x=T,C=W,O=E,f=G,U=H,p=Q,P=$,b=X;return u(),c(P,{modelValue:a(o),"onUpdate:modelValue":l[3]||(l[3]=r=>S(o)?o.value=r:null),title:"\u8BA2\u5355\u53D1\u8D27",width:"60%"},{footer:t(()=>[I("div",v,[V((u(),c(x,{ref_key:"formRef",ref:n,model:a(e),"label-width":"80px",style:{display:"flex"},rules:a(F)},{default:t(()=>[s(f,{label:"\u7269\u6D41\u516C\u53F8",prop:"logisticsId"},{default:t(()=>[s(O,{modelValue:a(e).logisticsId,"onUpdate:modelValue":l[0]||(l[0]=r=>a(e).logisticsId=r),placeholder:"\u8BF7\u9009\u62E9"},{default:t(()=>[(u(!0),K(L,null,M(a(g),r=>(u(),c(C,{key:r.id,label:r.name,value:r.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),s(f,{label:"\u7269\u6D41\u5355\u53F7",prop:"logisticsNo"},{default:t(()=>[s(U,{modelValue:a(e).logisticsNo,"onUpdate:modelValue":l[1]||(l[1]=r=>a(e).logisticsNo=r),placeholder:"\u8BF7\u5F55\u5165\u5FEB\u9012\u5355\u53F7",style:{width:"300px"}},null,8,["modelValue"])]),_:1}),s(f,null,{default:t(()=>[s(p,{type:"primary",plain:""},{default:t(()=>[y("\u626B\u4E00\u626B")]),_:1})]),_:1})]),_:1},8,["model","rules"])),[[b,a(d)]])]),I("div",h,[s(p,{disabled:a(d),type:"primary",onClick:q},{default:t(()=>[y("\u786E \u5B9A")]),_:1},8,["disabled"]),s(p,{onClick:l[2]||(l[2]=r=>o.value=!1)},{default:t(()=>[y("\u53D6 \u6D88")]),_:1})])]),default:t(()=>[V((u(),c(x,{ref_key:"formRef",ref:n,model:a(e),"label-width":"80px",style:{padding:"10px"}},{default:t(()=>[s(sa,{ref:"infoRef","is-detail":!0,isDelivery:!0,id:a(e).id,style:{"margin-bottom":"30px"}},null,8,["id"]),s(oa,{ref:"infoRef",isDelivery:!0,id:a(e).id},null,8,["id"])]),_:1},8,["model"])),[[b,a(d)]])]),_:1},8,["modelValue"])}}}),[["__scopeId","data-v-acdf8a20"],["__file","D:/zx/mall-newfeifan-zx-business/src/views/mall/trade/order/form/OrderDeliveryForm.vue"]])});export{ga as __tla,w as default};
