1 |
- import{d as G,h as H,r as i,e as I,k as K,P as Q,o as c,c as T,f as a,w as e,a as l,Q as j,m as n,v as p,q as d,F as A,U as L,z as M,_ as W,B as E,C as J,D as N,G as O,H as X,__tla as Y}from"./index-2eab2d23.js";import{_ as Z,__tla as $}from"./ContentWrap.vue_vue_type_script_setup_true_lang-5a63038a.js";import{d as aa,__tla as ea}from"./formatTime-41155543.js";import{g as ta,d as la,__tla as ra}from"./index-8807aab2.js";import{_ as sa,__tla as ca}from"./ProductCategoryForm.vue_vue_type_script_setup_true_lang-861c4d8d.js";import{h as na}from"./tree-fd3a041e.js";import{u as oa,__tla as _a}from"./useMessage-171aa63e.js";import{__tla as ua}from"./el-card-c558f0ec.js";import{__tla as ma}from"./Dialog-c2716df6.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=G({name:"CrmProductCategory",__name:"index",setup(pa){const w=oa(),{t:q}=H(),f=i(!0),g=i([]),o=I({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=()=>{_()},R=()=>{x.value.resetFields(),y()},C=i(),b=(u,t)=>{C.value.open(u,t)};return K(()=>{_()}),(u,t)=>{const V=L,v=M,h=W,r=E,D=J,F=Z,m=N,S=O,k=Q("hasPermi"),U=X;return c(),T(A,null,[a(F,null,{default:e(()=>[a(D,{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:j(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:R},{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(S,{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:z=>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:z=>(async B=>{try{await w.delConfirm(),await la(B),w.success(q("common.delSuccess")),await _()}catch{}})(s.row.id)},{default:e(()=>[n(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[k,["crm:product-category:delete"]]])]),_:1})]),_:1},8,["data"])),[[U,l(f)]])]),_:1}),a(sa,{ref_key:"formRef",ref:C,onSuccess:_},null,512)],64)}}})});export{ia as __tla,P as default};
|