DeliveryForm-77dc5a1d.js 2.6 KB

1
  1. import{d as U,ac as j,r as n,e as v,aM as q,q as A,o as s,x as o,w as d,a as e,H,f as m,c as f,v as b,y as M,t as N,F as D,a0 as O,bq as S,a9 as X,bx as Y,C as z,A as B,B as C,_ as L,__tla as G}from"./index-8dc1e40a.js";import{g as J,__tla as K}from"./index-034c00d4.js";import{a as Q,D as W,__tla as Z}from"./dict-f13a3c8f.js";import{D as $}from"./constants-a1da293a.js";import{u as ee,__tla as ae}from"./useMessage-7a27dd80.js";import{r as T,__tla as le}from"./formRules-467f9efe.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=L(U({name:"ProductDeliveryForm",__name:"DeliveryForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:j.bool.def(!1)},emits:["update:activeName"],setup(p,{expose:w,emit:F}){const V=ee(),u=p,i=n(),l=v({deliveryTypes:[],deliveryTemplateId:void 0}),x=v({deliveryTypes:[T],deliveryTemplateId:[T]});q(()=>u.propFormData,t=>{t&&S(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(u.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 _=n([]);return A(async()=>{_.value=await J()}),(t,r)=>{const I=X,R=Y,y=z,k=B,P=C,g=H;return s(),o(g,{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(N(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(P,{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(_),a=>(s(),o(k,{key:a.id,label:a.name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):O("",!0)]}),_:1},8,["model","rules","disabled"])}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/mall/product/spu/form/DeliveryForm.vue"]])});export{te as __tla,h as default};