DeliveryForm-4cd92951.js 2.7 KB

1
  1. import{d as j,ah as A,Z as B,L,r as n,f as v,M as N,l as O,o as s,x as o,w as d,a,a0 as S,G as U,g as p,c as f,v as b,n as Y,t as Z,F as D,Q as G,aW as Q,ae as W,aZ as X,B as q,z as C,A as H,_ as J,__tla as K}from"./index-3fb48822.js";import{g as $,__tla as aa}from"./index-b96a9b0e.js";import{a as ea,D as la,__tla as ta}from"./dict-51415be4.js";import{D as ra}from"./constants-637baed6.js";import{u as sa,__tla as da}from"./useMessage-b6c78c26.js";import{r as T,__tla as oa}from"./formRules-079bdea5.js";let h,ia=Promise.all([(()=>{try{return K}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return oa}catch{}})()]).then(async()=>{h=J(j({name:"ProductDeliveryForm",__name:"DeliveryForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:A.bool.def(!1)},emits:["update:activeName"],setup(i,{expose:w,emit:F}){const I=B(),V=L(()=>I.getMobile),x=sa(),_=i,m=n(),l=v({deliveryTypes:[],deliveryTemplateId:void 0}),E=v({deliveryTypes:[T],deliveryTemplateId:[T]});N(()=>_.propFormData,t=>{t&&Q(l,t)},{immediate:!0});const k=F;w({validate:async()=>{var t;if(m)try{await((t=a(m))==null?void 0:t.validate()),Object.assign(_.propFormData,l)}catch(r){throw x.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 O(async()=>{u.value=await $()}),(t,r)=>{const P=W,R=X,c=q,g=C,z=H,M=U;return s(),o(M,{ref_key:"formRef",ref:m,model:a(l),rules:a(E),"label-width":"120px",disabled:i.isDetail,class:S(["noBorder",{view:i.isDetail,"mobile-card":a(V)}])},{default:d(()=>{var y;return[p(c,{label:"\u914D\u9001\u65B9\u5F0F",prop:"deliveryTypes"},{default:d(()=>[p(R,{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(ea)(a(la).TRADE_DELIVERY_TYPE),e=>(s(),o(P,{key:e.value,label:e.value},{default:d(()=>[Y(Z(e.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1}),(y=a(l).deliveryTypes)!=null&&y.includes(a(ra).EXPRESS.type)?(s(),o(c,{key:0,label:"\u8FD0\u8D39\u6A21\u677F",prop:"deliveryTemplateId"},{default:d(()=>[p(z,{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(g,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):G("",!0)]}),_:1},8,["model","rules","disabled","class"])}}}),[["__scopeId","data-v-75cf19f9"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/mall/product/spu/form/DeliveryForm.vue"]])});export{ia as __tla,h as default};