DeliveryForm-4a16b5fa.js 2.7 KB

1
  1. import{d as U,as as j,y as z,e as N,r as n,x as v,w as O,b as Y,o as s,C as o,A as d,a as e,ad as B,W as L,f as p,c as f,R as b,D as M,E as C,F as D,a3 as W,dA as X,ap as q,cf as G,V as H,S as J,U as K,_ as Q,__tla as Z}from"./index-f6fb8e95.js";import{g as $,__tla as ee}from"./index-aac71c4d.js";import{a as ae,D as le,__tla as te}from"./dict-c9a7f6a4.js";import{D as re}from"./constants-c811e5ff.js";import{u as se,__tla as de}from"./useMessage-3b767a67.js";import{r as T,__tla as oe}from"./formRules-e7596da3.js";let w,ie=Promise.all([(()=>{try{return Z}catch{}})(),(()=>{try{return ee}catch{}})(),(()=>{try{return te}catch{}})(),(()=>{try{return de}catch{}})(),(()=>{try{return oe}catch{}})()]).then(async()=>{w=Q(U({name:"ProductDeliveryForm",__name:"DeliveryForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:j.bool.def(!1)},emits:["update:activeName"],setup(i,{expose:h,emit:E}){const F=z(),I=N(()=>F.getMobile),V=se(),_=i,m=n(),l=v({deliveryTypes:[],deliveryTemplateId:void 0}),x=v({deliveryTypes:[T],deliveryTemplateId:[T]});O(()=>_.propFormData,t=>{t&&X(l,t)},{immediate:!0});const R=E;h({validate:async()=>{var t;if(m)try{await((t=e(m))==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"),R("update:activeName","delivery"),r}}});const u=n([]);return Y(async()=>{u.value=await $()}),(t,r)=>{const k=q,P=G,c=H,S=J,g=K,A=L;return s(),o(A,{ref_key:"formRef",ref:m,model:e(l),rules:e(x),"label-width":"120px",disabled:i.isDetail,class:B(["noBorder",{view:i.isDetail,"mobile-card":e(I)}])},{default:d(()=>{var y;return[p(c,{label:"\u914D\u9001\u65B9\u5F0F",prop:"deliveryTypes"},{default:d(()=>[p(P,{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(ae)(e(le).TRADE_DELIVERY_TYPE),a=>(s(),o(k,{key:a.value,label:a.value},{default:d(()=>[M(C(a.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1}),(y=e(l).deliveryTypes)!=null&&y.includes(e(re).EXPRESS.type)?(s(),o(c,{key:0,label:"\u8FD0\u8D39\u6A21\u677F",prop:"deliveryTemplateId"},{default:d(()=>[p(g,{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(S,{key:a.id,label:a.name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):W("",!0)]}),_:1},8,["model","rules","disabled","class"])}}}),[["__scopeId","data-v-75cf19f9"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/mall/product/spu/form/DeliveryForm.vue"]])});export{ie as __tla,w as default};