import{d as M,ai as N,aU as O,$ as S,L as q,r as b,f as D,M as h,m as C,a as e,o as s,x as i,w as d,a0 as $,c as o,R as w,F as y,G,g as u,v as x,q as X,t as H,aV as I,af as J,aY as K,B as Q,z as W,A as Z,_ as ee,__tla as ae}from"./index-7d5b26d3.js";import{g as le,__tla as te}from"./index-0ccde738.js";import{a as se,D as re,__tla as de}from"./dict-37d1dfe8.js";import{D as ie}from"./constants-d55a3460.js";import{u as oe,__tla as me}from"./useMessage-c81eaa5b.js";import{r as V,__tla as pe}from"./formRules-24ef81cf.js";let g,ye=Promise.all([(()=>{try{return ae}catch{}})(),(()=>{try{return te}catch{}})(),(()=>{try{return de}catch{}})(),(()=>{try{return me}catch{}})(),(()=>{try{return pe}catch{}})()]).then(async()=>{let _;_={key:0,style:{"text-align":"center","margin-top":"50px","font-size":"14px"}},g=ee(M({name:"ProductDeliveryForm",__name:"DeliveryForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:N.bool.def(!1)},emits:["update:activeName"],setup(m,{expose:k,emit:F}){const v=O("spuTypeChange"),E=S(),R=q(()=>E.getMobile),z=oe(),c=m,p=b(),a=D({deliveryTypes:[],deliveryTemplateId:void 0}),P=D({deliveryTypes:[V],deliveryTemplateId:[V]});h(()=>c.propFormData,t=>{t&&(I(a,t),I(a,t))},{immediate:!0}),h(()=>v.value,t=>{t?(a.deliveryTypes=[],a.deliveryTemplateId=void 0):(a.deliveryTypes=[3],a.deliveryTemplateId=1)},{immediate:!0});const Y=F;k({validate:async()=>{var t;if(p)try{await((t=e(p))==null?void 0:t.validate()),Object.assign(c.propFormData,a)}catch(r){throw z.error("\u3010\u7269\u6D41\u8BBE\u7F6E\u3011\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),Y("update:activeName","delivery"),r}}});const n=b([]);return C(async()=>{n.value=await le()}),(t,r)=>{const U=J,j=K,f=Q,A=W,B=Z,L=G;return e(v).value?(s(),i(L,{key:0,ref_key:"formRef",ref:p,model:e(a),rules:e(P),"label-width":"120px",disabled:m.isDetail,class:$(["noBorder",{view:m.isDetail,"mobile-card":e(R)}])},{default:d(()=>{var T;return[u(f,{label:"\u914D\u9001\u65B9\u5F0F",prop:"deliveryTypes"},{default:d(()=>[u(j,{modelValue:e(a).deliveryTypes,"onUpdate:modelValue":r[0]||(r[0]=l=>e(a).deliveryTypes=l),class:"w-80"},{default:d(()=>[(s(!0),o(y,null,x(e(se)(e(re).TRADE_DELIVERY_TYPE),l=>(s(),i(U,{key:l.value,label:l.value},{default:d(()=>[X(H(l.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1}),(T=e(a).deliveryTypes)!=null&&T.includes(e(ie).EXPRESS.type)?(s(),i(f,{key:0,label:"\u8FD0\u8D39\u6A21\u677F",prop:"deliveryTemplateId"},{default:d(()=>[u(B,{placeholder:"\u8BF7\u9009\u62E9\u8FD0\u8D39\u6A21\u677F",modelValue:e(a).deliveryTemplateId,"onUpdate:modelValue":r[1]||(r[1]=l=>e(a).deliveryTemplateId=l),class:"w-80"},{default:d(()=>[(s(!0),o(y,null,x(e(n),l=>(s(),i(A,{key:l.id,label:l.name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):w("",!0)]}),_:1},8,["model","rules","disabled","class"])):(s(),o(y,{key:1},[e(a)!=null?(s(),o("div",_," \u865A\u62DF\u5546\u54C1\u65E0\u9700\u8BBE\u7F6E\u7269\u6D41 ")):w("",!0)],64))}}}),[["__scopeId","data-v-75cf19f9"],["__file","D:/zx/mall-newfeifan-zx-business/src/views/mall/product/spu/form/DeliveryForm.vue"]])});export{ye as __tla,g as default};
