1 |
- import{d as j,ac as z,r as n,e as v,aM as A,q as N,o as s,x as o,w as d,a as e,H as O,f as m,c as f,v as b,y as M,t as S,F as D,a0 as U,bu as Y,a9 as q,bx as B,C,A as H,B as L,_ as X,__tla as G}from"./index-285d5e12.js";import{g as J,__tla as K}from"./index-6062b152.js";import{a as Q,D as W,__tla as Z}from"./dict-4a341aee.js";import{D as $}from"./constants-a1da293a.js";import{u as ee,__tla as ae}from"./useMessage-1956eb7c.js";import{r as T,__tla as le}from"./formRules-1f69ee3b.js";let h,te=Promise.all([(()=>{try{return G}catch{}})(),(()=>{try{return K}catch{}})(),(()=>{try{return Z}catch{}})(),(()=>{try{return ae}catch{}})(),(()=>{try{return le}catch{}})()]).then(async()=>{h=X(j({name:"ProductDeliveryForm",__name:"DeliveryForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:z.bool.def(!1)},emits:["update:activeName"],setup(p,{expose:w,emit:F}){const V=ee(),_=p,i=n(),l=v({deliveryTypes:[],deliveryTemplateId:void 0}),x=v({deliveryTypes:[T],deliveryTemplateId:[T]});A(()=>_.propFormData,t=>{t&&Y(l,t)},{immediate:!0});const E=F;w({validate:async()=>{var t;if(i)try{await((t=e(i))==null?void 0:t.validate()),Object.assign(_.propFormData,l)}catch(r){throw V.error("\u3010\u7269\u6D41\u8BBE\u7F6E\u3011\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),E("update:activeName","delivery"),r}}});const u=n([]);return N(async()=>{u.value=await J()}),(t,r)=>{const I=q,R=B,y=C,g=H,k=L,P=O;return s(),o(P,{ref_key:"formRef",ref:i,model:e(l),rules:e(x),"label-width":"120px",disabled:p.isDetail},{default:d(()=>{var c;return[m(y,{label:"\u914D\u9001\u65B9\u5F0F",prop:"deliveryTypes"},{default:d(()=>[m(R,{modelValue:e(l).deliveryTypes,"onUpdate:modelValue":r[0]||(r[0]=a=>e(l).deliveryTypes=a),class:"w-80"},{default:d(()=>[(s(!0),f(D,null,b(e(Q)(e(W).TRADE_DELIVERY_TYPE),a=>(s(),o(I,{key:a.value,label:a.value},{default:d(()=>[M(S(a.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1}),(c=e(l).deliveryTypes)!=null&&c.includes(e($).EXPRESS.type)?(s(),o(y,{key:0,label:"\u8FD0\u8D39\u6A21\u677F",prop:"deliveryTemplateId"},{default:d(()=>[m(k,{placeholder:"\u8BF7\u9009\u62E9\u8FD0\u8D39\u6A21\u677F",modelValue:e(l).deliveryTemplateId,"onUpdate:modelValue":r[1]||(r[1]=a=>e(l).deliveryTemplateId=a),class:"w-80"},{default:d(()=>[(s(!0),f(D,null,b(e(u),a=>(s(),o(g,{key:a.id,label:a.name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):U("",!0)]}),_:1},8,["model","rules","disabled"])}}}),[["__file","D:/zhongxing/mall-newfeifan-zx-admin/src/views/mall/product/spu/form/DeliveryForm.vue"]])});export{te as __tla,h as default};
|