ExpressForm-d336a9cc.js 4.1 KB

1
  1. import{d as L,n as M,r as d,f as O,o as c,l as p,w as s,i as r,a as e,j as f,C as R,c as T,F as j,k as J,t as K,y as X,g as I,U as P,H as W,c0 as G,ag as Q,ah as Y,K as Z,J as $,N as ee,_ as ae,__tla as le}from"./index-af173888.js";import{_ as te,__tla as se}from"./Dialog-987c90a1.js";import{_ as re,__tla as oe}from"./UploadImg-adf73e38.js";import{a as ue,D as me,__tla as de}from"./dict-093d1dfa.js";import{C as x}from"./constants-a3c69b57.js";import{a as ie,c as _e,u as ce,__tla as ne}from"./index-78cc49bc.js";import{u as pe,__tla as fe}from"./useMessage-170c1b43.js";import{__tla as ve}from"./index-4db4ba8b.js";import{__tla as ge}from"./el-image-viewer-0d82b94c.js";let U,ye=Promise.all([(()=>{try{return le}catch{}})(),(()=>{try{return se}catch{}})(),(()=>{try{return oe}catch{}})(),(()=>{try{return de}catch{}})(),(()=>{try{return ne}catch{}})(),(()=>{try{return fe}catch{}})(),(()=>{try{return ve}catch{}})(),(()=>{try{return ge}catch{}})()]).then(async()=>{let v;v=I("div",{style:{"font-size":"10px"},class:"pl-10px"},"\u63A8\u8350 180x180 \u56FE\u7247\u5206\u8FA8\u7387",-1),U=ae(L({name:"ExpressForm",__name:"ExpressForm",emits:["success"],setup(Ve,{expose:w,emit:E}){const{t:n}=M(),g=pe(),u=d(!1),y=d(""),m=d(!1),V=d(""),t=d({id:void 0,code:"",name:"",logo:"",sort:0,status:x.ENABLE}),k=O({code:[{required:!0,message:"\u5FEB\u9012\u7F16\u7801\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],name:[{required:!0,message:"\u5206\u7C7B\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],logo:[{required:!0,message:"\u5206\u7C7B\u56FE\u7247\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],sort:[{required:!0,message:"\u5206\u7C7B\u6392\u5E8F\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],status:[{required:!0,message:"\u5F00\u542F\u72B6\u6001\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),_=d();w({open:async(o,a)=>{if(u.value=!0,y.value=n("action."+o),V.value=o,C(),a){m.value=!0;try{t.value=await ie(a)}finally{m.value=!1}}}});const F=E,q=async()=>{if(_&&await _.value.validate()){m.value=!0;try{const o=t.value;V.value==="create"?(await _e(o),g.success(n("common.createSuccess"))):(await ce(o),g.success(n("common.updateSuccess"))),u.value=!1,F("success")}finally{m.value=!1}}},C=()=>{var o;t.value={id:void 0,name:"",picUrl:"",status:x.ENABLE},(o=_.value)==null||o.resetFields()};return(o,a)=>{const b=P,i=W,N=re,S=G,z=Q,A=Y,D=Z,h=$,B=te,H=ee;return c(),p(B,{title:e(y),modelValue:e(u),"onUpdate:modelValue":a[6]||(a[6]=l=>X(u)?u.value=l:null)},{footer:s(()=>[r(h,{onClick:q,type:"primary",disabled:e(m)},{default:s(()=>[f("\u786E \u5B9A")]),_:1},8,["disabled"]),r(h,{onClick:a[5]||(a[5]=l=>u.value=!1)},{default:s(()=>[f("\u53D6 \u6D88")]),_:1})]),default:s(()=>[R((c(),p(D,{ref_key:"formRef",ref:_,model:e(t),rules:e(k),"label-width":"120px"},{default:s(()=>[r(i,{label:"\u516C\u53F8\u7F16\u7801",prop:"code"},{default:s(()=>[r(b,{modelValue:e(t).code,"onUpdate:modelValue":a[0]||(a[0]=l=>e(t).code=l),placeholder:"\u8BF7\u8F93\u5165\u5FEB\u9012\u7F16\u7801"},null,8,["modelValue"])]),_:1}),r(i,{label:"\u516C\u53F8\u540D\u79F0",prop:"name"},{default:s(()=>[r(b,{modelValue:e(t).name,"onUpdate:modelValue":a[1]||(a[1]=l=>e(t).name=l),placeholder:"\u8BF7\u8F93\u5165\u5FEB\u9012\u540D\u79F0"},null,8,["modelValue"])]),_:1}),r(i,{label:"\u516C\u53F8 logo",prop:"logo"},{default:s(()=>[r(N,{modelValue:e(t).logo,"onUpdate:modelValue":a[2]||(a[2]=l=>e(t).logo=l),limit:1,"is-show-tip":!1},null,8,["modelValue"]),v]),_:1}),r(i,{label:"\u6392\u5E8F",prop:"sort"},{default:s(()=>[r(S,{modelValue:e(t).sort,"onUpdate:modelValue":a[3]||(a[3]=l=>e(t).sort=l),"controls-position":"right",min:0},null,8,["modelValue"])]),_:1}),r(i,{label:"\u5F00\u542F\u72B6\u6001",prop:"status"},{default:s(()=>[r(A,{modelValue:e(t).status,"onUpdate:modelValue":a[4]||(a[4]=l=>e(t).status=l)},{default:s(()=>[(c(!0),T(j,null,J(e(ue)(e(me).COMMON_STATUS),l=>(c(),p(z,{key:l.value,label:l.value},{default:s(()=>[f(K(l.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[H,e(m)]])]),_:1},8,["title","modelValue"])}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/mall/trade/delivery/express/ExpressForm.vue"]])});export{ye as __tla,U as default};