1 |
- import{d as Y,ag as j,Y as z,K as L,r as n,e as v,L as N,l as O,o as r,v as o,w as d,a as e,Z as S,D as X,f as p,c as f,q as b,n as M,t as q,F as D,P as B,b9 as H,ad as K,bc as Z,A as C,y as G,z as J,_ as Q,__tla as W}from"./index-11e4820e.js";import{g as $,__tla as ee}from"./index-c5bb7afe.js";import{a as ae,D as le,__tla as te}from"./dict-4072dcec.js";import{D as se}from"./constants-40f13f5e.js";import{u as re,__tla as de}from"./useMessage-06ddf735.js";import{r as T,__tla as oe}from"./formRules-a3633e47.js";let w,ie=Promise.all([(()=>{try{return W}catch{}})(),(()=>{try{return ee}catch{}})(),(()=>{try{return te}catch{}})(),(()=>{try{return de}catch{}})(),(()=>{try{return oe}catch{}})()]).then(async()=>{w=Q(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=z(),V=L(()=>I.getMobile),E=re(),u=i,m=n(),l=v({deliveryTypes:[],deliveryTemplateId:void 0}),k=v({deliveryTypes:[T],deliveryTemplateId:[T]});N(()=>u.propFormData,t=>{t&&H(l,t)},{immediate:!0});const P=F;h({validate:async()=>{var t;if(m)try{await((t=e(m))==null?void 0:t.validate()),Object.assign(u.propFormData,l)}catch(s){throw E.error("\u3010\u7269\u6D41\u8BBE\u7F6E\u3011\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),P("update:activeName","delivery"),s}}});const _=n([]);return O(async()=>{_.value=await $()}),(t,s)=>{const R=K,g=Z,c=C,x=G,A=J,U=X;return r(),o(U,{ref_key:"formRef",ref:m,model:e(l),rules:e(k),"label-width":"120px",disabled:i.isDetail,class:S(["noBorder",{view:i.isDetail,"mobile-card":e(V)}])},{default:d(()=>{var y;return[p(c,{label:"\u914D\u9001\u65B9\u5F0F",prop:"deliveryTypes"},{default:d(()=>[p(g,{modelValue:e(l).deliveryTypes,"onUpdate:modelValue":s[0]||(s[0]=a=>e(l).deliveryTypes=a),class:"w-80"},{default:d(()=>[(r(!0),f(D,null,b(e(ae)(e(le).TRADE_DELIVERY_TYPE),a=>(r(),o(R,{key:a.value,label:a.value},{default:d(()=>[M(q(a.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1}),(y=e(l).deliveryTypes)!=null&&y.includes(e(se).EXPRESS.type)?(r(),o(c,{key:0,label:"\u8FD0\u8D39\u6A21\u677F",prop:"deliveryTemplateId"},{default:d(()=>[p(A,{placeholder:"\u8BF7\u9009\u62E9\u8FD0\u8D39\u6A21\u677F",modelValue:e(l).deliveryTemplateId,"onUpdate:modelValue":s[1]||(s[1]=a=>e(l).deliveryTemplateId=a),class:"w-80"},{default:d(()=>[(r(!0),f(D,null,b(e(_),a=>(r(),o(x,{key:a.id,label:a.name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):B("",!0)]}),_:1},8,["model","rules","disabled","class"])}}}),[["__scopeId","data-v-75cf19f9"],["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/mall/product/spu/form/DeliveryForm.vue"]])});export{ie as __tla,w as default};
|