import{d as U,ar as A,y as B,e as N,r as n,x as v,w as O,b as Y,o as s,A as o,B as d,a,ac as G,W as M,f as p,c as f,R as b,E as K,G as L,F as D,D as W,dy as X,ao as q,ce as z,V as C,S as H,U as J,__tla as Q}from"./index-92ad187a.js";import{g as Z,__tla as $}from"./index-c04e743c.js";import{a as aa,D as ea,__tla as la}from"./dict-221f3e01.js";import{D as ta}from"./constants-c811e5ff.js";import{u as ra,__tla as sa}from"./useMessage-d9788660.js";import{r as T,__tla as da}from"./formRules-bab8ffd5.js";import{_ as oa}from"./_plugin-vue_export-helper-1b428a4d.js";let h,ia=Promise.all([(()=>{try{return Q}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return da}catch{}})()]).then(async()=>{h=oa(U({name:"ProductDeliveryForm",__name:"DeliveryForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:A.bool.def(!1)},emits:["update:activeName"],setup(i,{expose:w,emit:V}){const E=B(),I=N(()=>E.getMobile),F=ra(),_=i,m=n(),l=v({deliveryTypes:[],deliveryTemplateId:void 0}),R=v({deliveryTypes:[T],deliveryTemplateId:[T]});O(()=>_.propFormData,t=>{t&&X(l,t)},{immediate:!0});const k=V;w({validate:async()=>{var t;if(m)try{await((t=a(m))==null?void 0:t.validate()),Object.assign(_.propFormData,l)}catch(r){throw F.error("\u3010\u7269\u6D41\u8BBE\u7F6E\u3011\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),k("update:activeName","delivery"),r}}});const u=n([]);return Y(async()=>{u.value=await Z()}),(t,r)=>{const x=q,P=z,y=C,S=H,g=J,j=M;return s(),o(j,{ref_key:"formRef",ref:m,model:a(l),rules:a(R),"label-width":"120px",disabled:i.isDetail,class:G(["noBorder",{view:i.isDetail,"mobile-card":a(I)}])},{default:d(()=>{var c;return[p(y,{label:"\u914D\u9001\u65B9\u5F0F",prop:"deliveryTypes"},{default:d(()=>[p(P,{modelValue:a(l).deliveryTypes,"onUpdate:modelValue":r[0]||(r[0]=e=>a(l).deliveryTypes=e),class:"w-80"},{default:d(()=>[(s(!0),f(D,null,b(a(aa)(a(ea).TRADE_DELIVERY_TYPE),e=>(s(),o(x,{key:e.value,label:e.value},{default:d(()=>[K(L(e.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1}),(c=a(l).deliveryTypes)!=null&&c.includes(a(ta).EXPRESS.type)?(s(),o(y,{key:0,label:"\u8FD0\u8D39\u6A21\u677F",prop:"deliveryTemplateId"},{default:d(()=>[p(g,{placeholder:"\u8BF7\u9009\u62E9\u8FD0\u8D39\u6A21\u677F",modelValue:a(l).deliveryTemplateId,"onUpdate:modelValue":r[1]||(r[1]=e=>a(l).deliveryTemplateId=e),class:"w-80"},{default:d(()=>[(s(!0),f(D,null,b(a(u),e=>(s(),o(S,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):W("",!0)]}),_:1},8,["model","rules","disabled","class"])}}}),[["__scopeId","data-v-2750247f"]])});export{ia as __tla,h as default};
