1 |
- import{d as A,ai as B,$ as L,L as M,r as v,f as n,M as N,m as O,o as r,x as o,w as d,a,a0 as S,G as U,g as p,c as f,v as b,q as Y,t as q,F as D,R as G,aT as W,af as X,aW as $,B as C,z as H,A as J,_ as K,__tla as Q}from"./index-f90b5c34.js";import{g as Z,__tla as aa}from"./index-82ccc401.js";import{a as ea,D as la,__tla as ta}from"./dict-94292190.js";import{D as sa}from"./constants-40f13f5e.js";import{u as ra,__tla as da}from"./useMessage-b63be42a.js";import{r as T,__tla as oa}from"./formRules-95403af0.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=K(A({name:"ProductDeliveryForm",__name:"DeliveryForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:B.bool.def(!1)},emits:["update:activeName"],setup(i,{expose:h,emit:F}){const I=L(),V=M(()=>I.getMobile),x=ra(),_=i,m=v(),l=n({deliveryTypes:[],deliveryTemplateId:void 0}),E=n({deliveryTypes:[T],deliveryTemplateId:[T]});N(()=>_.propFormData,t=>{t&&W(l,t)},{immediate:!0});const P=F;h({validate:async()=>{var t;if(m)try{await((t=a(m))==null?void 0:t.validate()),Object.assign(_.propFormData,l)}catch(s){throw x.error("\u3010\u7269\u6D41\u8BBE\u7F6E\u3011\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),P("update:activeName","delivery"),s}}});const u=v([]);return O(async()=>{u.value=await Z()}),(t,s)=>{const R=X,g=$,y=C,k=H,z=J,j=U;return r(),o(j,{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 c;return[p(y,{label:"\u914D\u9001\u65B9\u5F0F",prop:"deliveryTypes"},{default:d(()=>[p(g,{modelValue:a(l).deliveryTypes,"onUpdate:modelValue":s[0]||(s[0]=e=>a(l).deliveryTypes=e),class:"w-80"},{default:d(()=>[(r(!0),f(D,null,b(a(ea)(a(la).TRADE_DELIVERY_TYPE),e=>(r(),o(R,{key:e.value,label:e.value},{default:d(()=>[Y(q(e.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1}),(c=a(l).deliveryTypes)!=null&&c.includes(a(sa).EXPRESS.type)?(r(),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":s[1]||(s[1]=e=>a(l).deliveryTemplateId=e),class:"w-80"},{default:d(()=>[(r(!0),f(D,null,b(a(u),e=>(r(),o(k,{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-business/src/views/mall/product/spu/form/DeliveryForm.vue"]])});export{ia as __tla,w as default};
|