MerchantStoreTab-fe5ccc07.js 3.7 KB

1
  1. import{d as B,h as J,r as t,Q as K,o as r,v as s,aR as L,a,w as n,g as f,m as b,P as c,x as D,f as T,O as j,W as E,X as G,C as H,I as N,_ as Y,__tla as Z}from"./index-430b3151.js";import{_ as $,__tla as aa}from"./ContentWrap-60842994.js";import{S as ea,__tla as ta}from"./index-4d4ee646.js";import{_ as la,__tla as ra}from"./Dialog-cd42c639.js";import sa,{__tla as oa}from"./MerchantStoreFrom-ba314165.js";import _a,{__tla as na}from"./MerchantStorePaymentFrom-6d83f751.js";import{c as F,__tla as ia}from"./permission-c1d04079.js";import{u as ca,__tla as ua}from"./useMessage-d226ba89.js";import{__tla as ma}from"./el-card-dee5b36b.js";import{__tla as ya}from"./UploadImg-2f818d4f.js";import{__tla as fa}from"./index-255e3b1c.js";import{__tla as da}from"./el-image-viewer-467ebe35.js";let M,pa=Promise.all([(()=>{try{return Z}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return ya}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return da}catch{}})()]).then(async()=>{let g,k,w,x;g={class:"left"},k={class:"right"},w=f("div",{style:{clear:"both"}},null,-1),x={class:"dialog-footer"},M=Y(B({__name:"MerchantStoreTab",emits:["success"],setup(ha,{expose:R,emit:z}){const{t:U}=J(),P=ca(),u=t(!1),l=t("info"),o=t(!1),d=t(""),_=t(!1),y=t("create"),m=t({});t("avatar"),R({open:async(e,i)=>{l.value="info",m.value=i,y.value=e,d.value=U("action."+e),e=="view"&&(d.value="\u67E5\u770B"),_.value=e=="view",o.value=!0}});const p=z,S=t(),I=async()=>{var e;await((e=S.value)==null?void 0:e.submitForm())&&(p("success"),o.value=!1)},V=t(),O=async()=>{var e;await((e=V.value)==null?void 0:e.submitForm())&&(p("success"),o.value=!1)},Q=async()=>{await P.confirm("\u662F\u5426\u786E\u8BA4\u5220\u9664"+m.value.name+"\uFF1F");try{await ea.deleteShop(m.value.id)}catch{u.value=!1}o.value=!1,P.success("\u5220\u9664\u6210\u529F"),p("success")};return(e,i)=>{const C=E,W=G,X=$,h=H,q=N,A=K("hasPermi");return r(),s(la,{title:a(d),modelValue:a(o),"onUpdate:modelValue":i[1]||(i[1]=v=>j(o)?o.value=v:null),width:"70%"},L({default:n(()=>[D((r(),s(X,{style:{"max-height":"400px","min-height":"400px","overflow-y":"auto",border:"none"}},{default:n(()=>[f("div",g,[T(W,{modelValue:a(l),"onUpdate:modelValue":i[0]||(i[0]=v=>j(l)?l.value=v:null),"tab-position":"left",class:"child-tabs"},{default:n(()=>[T(C,{label:"\u57FA\u672C\u4FE1\u606F",name:"info"}),a(y)!="create"?(r(),s(C,{key:0,label:"\u6536\u6B3E\u4FE1\u606F",name:"Payment"})):c("",!0)]),_:1},8,["modelValue"])]),f("div",k,[a(l)=="info"?(r(),s(sa,{key:0,obj:a(m),ref_key:"MerchantStoreFromRef",ref:S,isDetail:a(_),openType:a(y)},null,8,["obj","isDetail","openType"])):c("",!0),a(l)=="Payment"?(r(),s(_a,{key:1,obj:a(m),ref_key:"MerchantStorePaymentFromRef",ref:V,isDetail:a(_)},null,8,["obj","isDetail"])):c("",!0)]),w]),_:1})),[[q,a(u)]])]),_:2},[a(_)?void 0:{name:"footer",fn:n(()=>[f("div",x,[!a(_)&&a(F)(["sale:shop:delete"])&&a(y)!="create"?(r(),s(h,{key:0,loading:a(u),type:"danger",onClick:Q},{default:n(()=>[b("\u5220\u9664")]),_:1},8,["loading"])):c("",!0),a(_)||a(l)!="info"?c("",!0):D((r(),s(h,{key:1,loading:a(u),type:"primary",onClick:I},{default:n(()=>[b("\u4FDD\u5B58")]),_:1},8,["loading"])),[[A,["sale:shop:update"]]]),!a(_)&&a(l)=="Payment"&&a(F)(["sale:shop:update"])?(r(),s(h,{key:2,loading:a(u),type:"primary",onClick:O},{default:n(()=>[b("\u4FDD\u5B58")]),_:1},8,["loading"])):c("",!0)])]),key:"0"}]),1032,["title","modelValue"])}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/system/sale/merchant/components/MerchantStoreTab.vue"]])});export{pa as __tla,M as default};