1 |
- import{d as j,B as z,r as i,f as B,z as J,S as L,o as c,c as M,i as a,w as e,a as l,T as U,m as n,D as p,j as d,F as X,X as A,I as E,_ as W,q as G,J as H,K as N,L as O,M as Q,__tla as Y}from"./index-1e808f2e.js";import{_ as Z,__tla as $}from"./ContentWrap.vue_vue_type_script_setup_true_lang-cc335a20.js";import{d as aa,__tla as ea}from"./formatTime-a348c3be.js";import{g as ta,d as la,__tla as ra}from"./index-3cd366e9.js";import{_ as sa,__tla as ca}from"./ProductCategoryForm.vue_vue_type_script_setup_true_lang-4386c0ec.js";import{h as na}from"./tree-fd3a041e.js";import{u as oa,__tla as _a}from"./useMessage-5f9e8917.js";import{__tla as ua}from"./el-card-03b3588b.js";import{__tla as ma}from"./Dialog-f44f9d78.js";import"./_plugin-vue_export-helper-1b428a4d.js";let P,ia=Promise.all([(()=>{try{return Y}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return ma}catch{}})()]).then(async()=>{P=j({name:"CrmProductCategory",__name:"index",setup(pa){const w=oa(),{t:R}=z(),f=i(!0),g=i([]),o=B({name:null}),x=i(),_=async()=>{f.value=!0;try{const u=await ta(o);g.value=na(u,"id","parentId")}finally{f.value=!1}},y=()=>{_()},S=()=>{x.value.resetFields(),y()},C=i(),b=(u,t)=>{C.value.open(u,t)};return J(()=>{_()}),(u,t)=>{const V=A,v=E,h=W,r=G,q=H,F=Z,m=N,D=O,k=L("hasPermi"),I=Q;return c(),M(X,null,[a(F,null,{default:e(()=>[a(q,{class:"-mb-15px",model:l(o),ref_key:"queryFormRef",ref:x,inline:!0,"label-width":"68px"},{default:e(()=>[a(v,{label:"\u540D\u79F0",prop:"name"},{default:e(()=>[a(V,{modelValue:l(o).name,"onUpdate:modelValue":t[0]||(t[0]=s=>l(o).name=s),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0",clearable:"",onKeyup:U(y,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(v,null,{default:e(()=>[a(r,{onClick:y},{default:e(()=>[a(h,{icon:"ep:search",class:"mr-5px"}),n(" \u641C\u7D22")]),_:1}),a(r,{onClick:S},{default:e(()=>[a(h,{icon:"ep:refresh",class:"mr-5px"}),n(" \u91CD\u7F6E")]),_:1}),p((c(),d(r,{type:"primary",plain:"",onClick:t[1]||(t[1]=s=>b("create"))},{default:e(()=>[a(h,{icon:"ep:plus",class:"mr-5px"}),n(" \u65B0\u589E ")]),_:1})),[[k,["crm:product-category:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(F,null,{default:e(()=>[p((c(),d(D,{data:l(g),"row-key":"id","default-expand-all":""},{default:e(()=>[a(m,{label:"\u5206\u7C7B\u7F16\u53F7",align:"center",prop:"id"}),a(m,{label:"\u5206\u7C7B\u540D\u79F0",align:"center",prop:"name"}),a(m,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",formatter:l(aa),width:"180px"},null,8,["formatter"]),a(m,{label:"\u64CD\u4F5C",align:"center"},{default:e(s=>[p((c(),d(r,{link:"",type:"primary",onClick:K=>b("update",s.row.id)},{default:e(()=>[n(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[k,["crm:product-category:update"]]]),p((c(),d(r,{link:"",type:"danger",onClick:K=>(async T=>{try{await w.delConfirm(),await la(T),w.success(R("common.delSuccess")),await _()}catch{}})(s.row.id)},{default:e(()=>[n(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[k,["crm:product-category:delete"]]])]),_:1})]),_:1},8,["data"])),[[I,l(f)]])]),_:1}),a(sa,{ref_key:"formRef",ref:C,onSuccess:_},null,512)],64)}}})});export{ia as __tla,P as default};
|