import{d as A,i as O,r as f,f as D,m as P,S as j,o as _,c as q,g as t,w as n,q as y,y as d,x as p,a as e,R as F,F as Y,k as Q,D as B,H as G,I as H,J,_ as K,__tla as V}from"./index-7d5b26d3.js";import{_ as W,__tla as X}from"./index-966eea36.js";import{_ as Z,__tla as $}from"./DictTag-89bfbd38.js";import{d as aa,__tla as ta}from"./formatTime-5152c108.js";import{L,C as ea,g as ra,d as la,__tla as ia}from"./CustomerLimitConfigForm-238fd9dc.js";import{D as oa,__tla as na}from"./dict-37d1dfe8.js";import{u as sa,__tla as _a}from"./useMessage-c81eaa5b.js";import{__tla as ca}from"./index-cdb8fe72.js";import"./color-6e929987.js";import{__tla as ma}from"./Dialog-2be588df.js";import{__tla as pa}from"./el-tree-select-50c86e57.js";import{__tla as ua}from"./index-a54c35d5.js";import"./tree-0af4953a.js";import{__tla as fa}from"./index-a25f8706.js";let x,ya=Promise.all([(()=>{try{return V}catch{}})(),(()=>{try{return X}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return ia}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(A({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=D({pageNo:1,pageSize:10,type:w}),c=async()=>{g.value=!0;try{const i=await ra(s);b.value=i.list,T.value=i.total}finally{g.value=!1}},k=f(),N=(i,r)=>{k.value.open(i,w,r)},R=()=>{s.pageNo=1,c()};return P(()=>{c()}),(i,r)=>{const v=Q,u=B,l=G,U=Z,z=H,E=W,h=j("hasPermi"),M=J;return _(),q(Y,null,[t(u,{plain:"",onClick:R},{default:n(()=>[t(v,{icon:"ep:refresh",class:"mr-5px"}),y(" \u5237\u65B0 ")]),_:1}),d((_(),p(u,{type:"primary",plain:"",onClick:r[0]||(r[0]=a=>N("create"))},{default:n(()=>[t(v,{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 o;return(o=a.users)==null?void 0:o.map(m=>m.nickname).join("\uFF0C")}},null,8,["formatter"]),t(l,{label:"\u89C4\u5219\u9002\u7528\u90E8\u95E8",align:"center",formatter:a=>{var o;return(o=a.depts)==null?void 0:o.map(m=>m.name).join("\uFF0C")}},null,8,["formatter"]),t(l,{label:i.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"]),i.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(oa).INFRA_BOOLEAN_STRING,value:a.row.dealCountEnabled},null,8,["type","value"])]),_:1})):F("",!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:o=>N("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:o=>(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"])),[[M,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};
