1 |
- import{d as O,af as N,X as S,J as U,r as n,e as v,K as X,k as q,o as s,q as o,w as d,a,Y as B,C,f as p,c as f,n as b,m as M,t as z,F as T,O as A,b9 as J,ac as K,bc as L,z as G,x as H,y as Q,__tla as W}from"./index-2eab2d23.js";import{g as Z,__tla as $}from"./index-8bc1e5b3.js";import{a as aa,D as ea,__tla as la}from"./dict-1ad71b6f.js";import{D as ta}from"./constants-40f13f5e.js";import{u as ra,__tla as sa}from"./useMessage-171aa63e.js";import{r as D,__tla as da}from"./formRules-228bd511.js";import{_ as oa}from"./_plugin-vue_export-helper-1b428a4d.js";let h,ia=Promise.all([(()=>{try{return W}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return da}catch{}})()]).then(async()=>{h=oa(O({name:"ProductDeliveryForm",__name:"DeliveryForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:N.bool.def(!1)},emits:["update:activeName"],setup(i,{expose:w,emit:I}){const V=S(),E=U(()=>V.getMobile),F=ra(),_=i,m=n(),l=v({deliveryTypes:[],deliveryTemplateId:void 0}),k=v({deliveryTypes:[D],deliveryTemplateId:[D]});X(()=>_.propFormData,t=>{t&&J(l,t)},{immediate:!0});const x=I;w({validate:async()=>{var t;if(m)try{await((t=a(m))==null?void 0:t.validate()),Object.assign(_.propFormData,l)}catch(r){throw F.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=n([]);return q(async()=>{u.value=await Z()}),(t,r)=>{const P=K,R=L,y=G,Y=H,g=Q,j=C;return s(),o(j,{ref_key:"formRef",ref:m,model:a(l),rules:a(k),"label-width":"120px",disabled:i.isDetail,class:B(["noBorder",{view:i.isDetail,"mobile-card":a(E)}])},{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(T,null,b(a(aa)(a(ea).TRADE_DELIVERY_TYPE),e=>(s(),o(P,{key:e.value,label:e.value},{default:d(()=>[M(z(e.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1}),(c=a(l).deliveryTypes)!=null&&c.includes(a(ta).EXPRESS.type)?(s(),o(y,{key:0,label:"\u8FD0\u8D39\u6A21\u677F",prop:"deliveryTemplateId"},{default:d(()=>[p(g,{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(T,null,b(a(u),e=>(s(),o(Y,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):A("",!0)]}),_:1},8,["model","rules","disabled","class"])}}}),[["__scopeId","data-v-2750247f"]])});export{ia as __tla,h as default};
|