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