1 |
- import{d as U,ar as A,y as N,e as O,r as n,x as v,w as Y,b as B,o as s,C as o,A as d,a,ac as C,V as L,f as p,c as f,Q as b,D as M,E as Q,F as D,a2 as X,dy as q,ao as z,ce as G,U as H,R as J,S as K,__tla as W}from"./index-92ee0c67.js";import{g as Z,__tla as $}from"./index-6bb8fd38.js";import{a as aa,D as ea,__tla as la}from"./dict-84c3ed73.js";import{D as ta}from"./constants-c811e5ff.js";import{u as ra,__tla as sa}from"./useMessage-f82a8260.js";import{r as T,__tla as da}from"./formRules-95d6547a.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(U({name:"ProductDeliveryForm",__name:"DeliveryForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:A.bool.def(!1)},emits:["update:activeName"],setup(i,{expose:w,emit:V}){const E=N(),I=O(()=>E.getMobile),F=ra(),_=i,m=n(),l=v({deliveryTypes:[],deliveryTemplateId:void 0}),P=v({deliveryTypes:[T],deliveryTemplateId:[T]});Y(()=>_.propFormData,t=>{t&&q(l,t)},{immediate:!0});const R=V;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"),R("update:activeName","delivery"),r}}});const u=n([]);return B(async()=>{u.value=await Z()}),(t,r)=>{const k=z,x=G,y=H,g=J,j=K,S=L;return s(),o(S,{ref_key:"formRef",ref:m,model:a(l),rules:a(P),"label-width":"120px",disabled:i.isDetail,class:C(["noBorder",{view:i.isDetail,"mobile-card":a(I)}])},{default:d(()=>{var c;return[p(y,{label:"\u914D\u9001\u65B9\u5F0F",prop:"deliveryTypes"},{default:d(()=>[p(x,{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(aa)(a(ea).TRADE_DELIVERY_TYPE),e=>(s(),o(k,{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(ta).EXPRESS.type)?(s(),o(y,{key:0,label:"\u8FD0\u8D39\u6A21\u677F",prop:"deliveryTemplateId"},{default:d(()=>[p(j,{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})):X("",!0)]}),_:1},8,["model","rules","disabled","class"])}}}),[["__scopeId","data-v-2750247f"]])});export{ia as __tla,h as default};
|