1 |
- import{d as S,ah as A,aU as B,b as G,e as H,r as b,f as h,O as D,z as J,a as e,o as r,j as i,w as d,a0 as M,c as o,l as I,F as y,J as L,i as u,C as w,m as X,t as q,aV as V,ae as K,aY as Q,I as W,G as Z,H as $,__tla as ee}from"./index-1e808f2e.js";import{g as ae,__tla as le}from"./index-ac5bda51.js";import{a as te,D as re,__tla as se}from"./dict-a31cb4ba.js";import{D as de}from"./constants-e43f22dd.js";import{u as ie,__tla as oe}from"./useMessage-5f9e8917.js";import{r as k,__tla as pe}from"./formRules-83fad61e.js";import{_ as me}from"./_plugin-vue_export-helper-1b428a4d.js";let g,ye=Promise.all([(()=>{try{return ee}catch{}})(),(()=>{try{return le}catch{}})(),(()=>{try{return se}catch{}})(),(()=>{try{return oe}catch{}})(),(()=>{try{return pe}catch{}})()]).then(async()=>{let _;_={key:0,style:{"text-align":"center","margin-top":"50px","font-size":"14px"}},g=me(S({name:"ProductDeliveryForm",__name:"DeliveryForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:A.bool.def(!1)},emits:["update:activeName"],setup(p,{expose:x,emit:E}){const c=B("spuTypeChange"),F=G(),P=H(()=>F.getMobile),R=ie(),v=p,m=b(),a=h({deliveryTypes:[],deliveryTemplateId:void 0}),j=h({deliveryTypes:[k],deliveryTemplateId:[k]});D(()=>v.propFormData,t=>{t&&(V(a,t),V(a,t))},{immediate:!0}),D(()=>c.value,t=>{t?(a.deliveryTypes=[],a.deliveryTemplateId=void 0):(a.deliveryTypes=[3],a.deliveryTemplateId=1)},{immediate:!0});const z=E;x({validate:async()=>{var t;if(m)try{await((t=e(m))==null?void 0:t.validate()),Object.assign(v.propFormData,a)}catch(s){throw R.error("\u3010\u7269\u6D41\u8BBE\u7F6E\u3011\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),z("update:activeName","delivery"),s}}});const n=b([]);return J(async()=>{n.value=await ae()}),(t,s)=>{const O=K,U=Q,f=W,Y=Z,C=$,N=L;return e(c).value?(r(),i(N,{key:0,ref_key:"formRef",ref:m,model:e(a),rules:e(j),"label-width":"120px",disabled:p.isDetail,class:M(["noBorder",{view:p.isDetail,"mobile-card":e(P)}])},{default:d(()=>{var T;return[u(f,{label:"\u914D\u9001\u65B9\u5F0F",prop:"deliveryTypes"},{default:d(()=>[u(U,{modelValue:e(a).deliveryTypes,"onUpdate:modelValue":s[0]||(s[0]=l=>e(a).deliveryTypes=l),class:"w-80"},{default:d(()=>[(r(!0),o(y,null,w(e(te)(e(re).TRADE_DELIVERY_TYPE),l=>(r(),i(O,{key:l.value,label:l.value},{default:d(()=>[X(q(l.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1}),(T=e(a).deliveryTypes)!=null&&T.includes(e(de).EXPRESS.type)?(r(),i(f,{key:0,label:"\u8FD0\u8D39\u6A21\u677F",prop:"deliveryTemplateId"},{default:d(()=>[u(C,{placeholder:"\u8BF7\u9009\u62E9\u8FD0\u8D39\u6A21\u677F",modelValue:e(a).deliveryTemplateId,"onUpdate:modelValue":s[1]||(s[1]=l=>e(a).deliveryTemplateId=l),class:"w-80"},{default:d(()=>[(r(!0),o(y,null,w(e(n),l=>(r(),i(Y,{key:l.id,label:l.name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):I("",!0)]}),_:1},8,["model","rules","disabled","class"])):(r(),o(y,{key:1},[e(a)!=null?(r(),o("div",_," \u865A\u62DF\u5546\u54C1\u65E0\u9700\u8BBE\u7F6E\u7269\u6D41 ")):I("",!0)],64))}}}),[["__scopeId","data-v-6910a147"]])});export{ye as __tla,g as default};
|