import{d as U,p as X,r as n,f as v,aP as g,B as H,o as s,l as o,w as d,a as e,K as N,i as m,c as f,k as b,j as O,t as S,F as D,a2 as Y,dI as z,ab as A,bX as B,H as G,D as K,G as L,_ as q,__tla as C}from"./index-8c6726e5.js";import{g as J,__tla as M}from"./index-d7f82b27.js";import{a as Q,D as W,__tla as Z}from"./dict-1c98488d.js";import{D as $}from"./constants-a1da293a.js";import{u as ee,__tla as ae}from"./useMessage-9f6930df.js";import{r as T,__tla as le}from"./formRules-7a1e0413.js";let h,te=Promise.all([(()=>{try{return C}catch{}})(),(()=>{try{return M}catch{}})(),(()=>{try{return Z}catch{}})(),(()=>{try{return ae}catch{}})(),(()=>{try{return le}catch{}})()]).then(async()=>{h=q(U({name:"ProductDeliveryForm",__name:"DeliveryForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:X.bool.def(!1)},emits:["update:activeName"],setup(p,{expose:w,emit:F}){const I=ee(),u=p,i=n(),l=v({deliveryTypes:[],deliveryTemplateId:void 0}),V=v({deliveryTypes:[T],deliveryTemplateId:[T]});g(()=>u.propFormData,t=>{t&&z(l,t)},{immediate:!0});const k=F;w({validate:async()=>{var t;if(i)try{await((t=e(i))==null?void 0:t.validate()),Object.assign(u.propFormData,l)}catch(r){throw I.error("\u3010\u7269\u6D41\u8BBE\u7F6E\u3011\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),k("update:activeName","delivery"),r}}});const _=n([]);return H(async()=>{_.value=await J()}),(t,r)=>{const E=A,P=B,y=G,R=K,x=L,j=N;return s(),o(j,{ref_key:"formRef",ref:i,model:e(l),rules:e(V),"label-width":"120px",disabled:p.isDetail},{default:d(()=>{var c;return[m(y,{label:"\u914D\u9001\u65B9\u5F0F",prop:"deliveryTypes"},{default:d(()=>[m(P,{modelValue:e(l).deliveryTypes,"onUpdate:modelValue":r[0]||(r[0]=a=>e(l).deliveryTypes=a),class:"w-80"},{default:d(()=>[(s(!0),f(D,null,b(e(Q)(e(W).TRADE_DELIVERY_TYPE),a=>(s(),o(E,{key:a.value,label:a.value},{default:d(()=>[O(S(a.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1}),(c=e(l).deliveryTypes)!=null&&c.includes(e($).EXPRESS.type)?(s(),o(y,{key:0,label:"\u8FD0\u8D39\u6A21\u677F",prop:"deliveryTemplateId"},{default:d(()=>[m(x,{placeholder:"\u8BF7\u9009\u62E9\u8FD0\u8D39\u6A21\u677F",modelValue:e(l).deliveryTemplateId,"onUpdate:modelValue":r[1]||(r[1]=a=>e(l).deliveryTemplateId=a),class:"w-80"},{default:d(()=>[(s(!0),f(D,null,b(e(_),a=>(s(),o(R,{key:a.id,label:a.name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):Y("",!0)]}),_:1},8,["model","rules","disabled"])}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/mall/product/spu/form/DeliveryForm.vue"]])});export{te as __tla,h as default};
