import{d as O,p as g,r as n,f as v,aP as A,B as G,o as s,l as o,w as d,a as e,K as H,i as m,c as f,k as b,j as N,t as S,F as D,a2 as U,dI as X,ab as Y,bX as B,H as K,D as L,G as q,_ as z,__tla as C}from"./index-2c56227b.js";import{g as J,__tla as M}from"./index-d4b9f774.js";import{a as Q,D as W,__tla as Z}from"./dict-763dd292.js";import{D as $}from"./constants-a1da293a.js";import{u as ee,__tla as ae}from"./useMessage-96878a4a.js";import{r as T,__tla as le}from"./formRules-5c913959.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=z(O({name:"ProductDeliveryForm",__name:"DeliveryForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:g.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}),E=v({deliveryTypes:[T],deliveryTemplateId:[T]});A(()=>u.propFormData,t=>{t&&X(l,t)},{immediate:!0});const V=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"),V("update:activeName","delivery"),r}}});const _=n([]);return G(async()=>{_.value=await J()}),(t,r)=>{const P=Y,k=B,y=K,R=L,j=q,x=H;return s(),o(x,{ref_key:"formRef",ref:i,model:e(l),rules:e(E),"label-width":"120px",disabled:p.isDetail},{default:d(()=>{var c;return[m(y,{label:"\u914D\u9001\u65B9\u5F0F",prop:"deliveryTypes"},{default:d(()=>[m(k,{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(P,{key:a.value,label:a.value},{default:d(()=>[N(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(j,{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})):U("",!0)]}),_:1},8,["model","rules","disabled"])}}}),[["__file","E:/GAOHP_2023/mall/newfeifan-front/yudao-ui-admin-vue3/src/views/mall/product/spu/form/DeliveryForm.vue"]])});export{te as __tla,h as default};
