import{d as M,h as O,r as f,e as j,l as Q,R as D,o as _,c as F,f as t,w as n,n as y,x as d,v as p,a as e,Q as G,F as P,j as q,C as Y,G as B,H,I as J,_ as K,__tla as V}from"./index-04f8d540.js";import{_ as W,__tla as X}from"./index-bf28d6af.js";import{_ as Z,__tla as $}from"./DictTag-774e4f97.js";import{d as aa,__tla as ta}from"./formatTime-81f0c591.js";import{L,C as ea,g as ra,d as la,__tla as oa}from"./CustomerLimitConfigForm-63c2378d.js";import{D as ia,__tla as na}from"./dict-ef06f7f7.js";import{u as sa,__tla as _a}from"./useMessage-9c37e840.js";import{__tla as ca}from"./index-1cf9f52b.js";import"./color-6e929987.js";import{__tla as ma}from"./Dialog-9afb5ba5.js";import{__tla as pa}from"./el-tree-select-78c28ca5.js";import{__tla as ua}from"./index-19f577dd.js";import"./tree-0af4953a.js";import{__tla as fa}from"./index-6e48cf5a.js";let x,ya=Promise.all([(()=>{try{return V}catch{}})(),(()=>{try{return X}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return pa}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return fa}catch{}})()]).then(async()=>{x=K(M({name:"CustomerLimitConfigList",__name:"CustomerLimitConfigList",props:{confType:{type:Number,required:!0}},setup(I){const C=sa(),{t:S}=O(),{confType:w}=I,g=f(!0),T=f(0),b=f([]),s=j({pageNo:1,pageSize:10,type:w}),c=async()=>{g.value=!0;try{const o=await ra(s);b.value=o.list,T.value=o.total}finally{g.value=!1}},k=f(),v=(o,r)=>{k.value.open(o,w,r)},R=()=>{s.pageNo=1,c()};return Q(()=>{c()}),(o,r)=>{const N=q,u=Y,l=B,U=Z,z=H,E=W,h=D("hasPermi"),A=J;return _(),F(P,null,[t(u,{plain:"",onClick:R},{default:n(()=>[t(N,{icon:"ep:refresh",class:"mr-5px"}),y(" \u5237\u65B0 ")]),_:1}),d((_(),p(u,{type:"primary",plain:"",onClick:r[0]||(r[0]=a=>v("create"))},{default:n(()=>[t(N,{icon:"ep:plus",class:"mr-5px"}),y(" \u65B0\u589E ")]),_:1})),[[h,["crm:customer-limit-config:create"]]]),d((_(),p(z,{data:e(b),stripe:!0,"show-overflow-tooltip":!0,class:"mt-4"},{default:n(()=>[t(l,{label:"\u7F16\u53F7",align:"center",prop:"id"}),t(l,{label:"\u89C4\u5219\u7C7B\u578B",align:"center",prop:"type"}),t(l,{label:"\u89C4\u5219\u9002\u7528\u4EBA\u7FA4",align:"center",formatter:a=>{var i;return(i=a.users)==null?void 0:i.map(m=>m.nickname).join("\uFF0C")}},null,8,["formatter"]),t(l,{label:"\u89C4\u5219\u9002\u7528\u90E8\u95E8",align:"center",formatter:a=>{var i;return(i=a.depts)==null?void 0:i.map(m=>m.name).join("\uFF0C")}},null,8,["formatter"]),t(l,{label:o.confType===e(L).CUSTOMER_QUANTITY_LIMIT?"\u62E5\u6709\u5BA2\u6237\u6570\u4E0A\u9650":"\u9501\u5B9A\u5BA2\u6237\u6570\u4E0A\u9650",align:"center",prop:"maxCount"},null,8,["label"]),o.confType===e(L).CUSTOMER_QUANTITY_LIMIT?(_(),p(l,{key:0,label:"\u6210\u4EA4\u5BA2\u6237\u662F\u5426\u5360\u7528\u62E5\u6709\u5BA2\u6237\u6570",align:"center",prop:"dealCountEnabled"},{default:n(a=>[t(U,{type:e(ia).INFRA_BOOLEAN_STRING,value:a.row.dealCountEnabled},null,8,["type","value"])]),_:1})):G("",!0),t(l,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",formatter:e(aa),width:"180px"},null,8,["formatter"]),t(l,{label:"\u64CD\u4F5C",align:"center","min-width":"110",fixed:"right"},{default:n(a=>[d((_(),p(u,{link:"",type:"primary",onClick:i=>v("update",a.row.id)},{default:n(()=>[y(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[h,["crm:customer-limit-config:update"]]]),d((_(),p(u,{link:"",type:"danger",onClick:i=>(async m=>{try{await C.delConfirm(),await la(m),C.success(S("common.delSuccess")),await c()}catch{}})(a.row.id)},{default:n(()=>[y(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[h,["crm:customer-limit-config:delete"]]])]),_:1})]),_:1},8,["data"])),[[A,e(g)]]),t(E,{total:e(T),page:e(s).pageNo,"onUpdate:page":r[1]||(r[1]=a=>e(s).pageNo=a),limit:e(s).pageSize,"onUpdate:limit":r[2]||(r[2]=a=>e(s).pageSize=a),onPagination:c},null,8,["total","page","limit"]),t(ea,{ref_key:"formRef",ref:k,onSuccess:c},null,512)],64)}}}),[["__file","D:/zx/mall-newfeifan-zx-business/src/views/crm/customer/limitConfig/CustomerLimitConfigList.vue"]])});export{ya as __tla,x as default};
