DeliveryForm-f47c7aeb.js 2.7 KB

1
  1. import{d as Y,ag as j,Y as A,K as L,r as v,e as n,L as O,k as S,o as s,v as o,w as d,a,Z as U,D as Z,f as p,c as f,q as b,m as M,t as q,F as D,P as B,aW as K,ad as W,aZ as X,A as C,y as G,z as H,_ as J,__tla as Q}from"./index-430b3151.js";import{g as $,__tla as aa}from"./index-aa6d3c0e.js";import{a as ea,D as la,__tla as ta}from"./dict-603b6a58.js";import{D as ra}from"./constants-637baed6.js";import{u as sa,__tla as da}from"./useMessage-d226ba89.js";import{r as T,__tla as oa}from"./formRules-51914dec.js";let w,ia=Promise.all([(()=>{try{return Q}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return oa}catch{}})()]).then(async()=>{w=J(Y({name:"ProductDeliveryForm",__name:"DeliveryForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:j.bool.def(!1)},emits:["update:activeName"],setup(i,{expose:h,emit:F}){const I=A(),V=L(()=>I.getMobile),E=sa(),_=i,m=v(),l=n({deliveryTypes:[],deliveryTemplateId:void 0}),k=n({deliveryTypes:[T],deliveryTemplateId:[T]});O(()=>_.propFormData,t=>{t&&K(l,t)},{immediate:!0});const x=F;h({validate:async()=>{var t;if(m)try{await((t=a(m))==null?void 0:t.validate()),Object.assign(_.propFormData,l)}catch(r){throw E.error("\u3010\u7269\u6D41\u8BBE\u7F6E\u3011\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),x("update:activeName","delivery"),r}}});const u=v([]);return S(async()=>{u.value=await $()}),(t,r)=>{const P=W,R=X,y=C,g=G,z=H,N=Z;return s(),o(N,{ref_key:"formRef",ref:m,model:a(l),rules:a(k),"label-width":"120px",disabled:i.isDetail,class:U(["noBorder",{view:i.isDetail,"mobile-card":a(V)}])},{default:d(()=>{var c;return[p(y,{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(()=>[M(q(e.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1}),(c=a(l).deliveryTypes)!=null&&c.includes(a(ra).EXPRESS.type)?(s(),o(y,{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})):B("",!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,w as default};