import{d as P,n as R,r as f,f as j,B as z,P as B,o as _,c as F,i as t,w as n,j as d,C as y,l as p,a as e,a2 as G,F as D,v as Q,J as Y,L as q,M as H,N as J,_ as K,__tla as V}from"./index-2c56227b.js";import{_ as W,__tla as X}from"./index-8106be8e.js";import{_ as Z,__tla as $}from"./DictTag-cfe1898d.js";import{d as aa,__tla as ta}from"./formatTime-7f0ec2bf.js";import{L,C as ea,g as ra,d as la,__tla as oa}from"./CustomerLimitConfigForm-fa5e87a3.js";import{D as ia,__tla as na}from"./dict-763dd292.js";import{u as sa,__tla as _a}from"./useMessage-96878a4a.js";import{__tla as ca}from"./index-d17bd909.js";import"./color-6e929987.js";import{__tla as ma}from"./Dialog-1050d437.js";import{__tla as pa}from"./el-tree-select-97cbdeb3.js";import{__tla as ua}from"./index-f13aed27.js";import"./tree-0af4953a.js";import{__tla as fa}from"./index-0f7aa9db.js";let I,da=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()=>{I=K(P({name:"CustomerLimitConfigList",__name:"CustomerLimitConfigList",props:{confType:{type:Number,required:!0}},setup(S){const C=sa(),{t:E}=R(),{confType:w}=S,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}},v=f(),N=(o,r)=>{v.value.open(o,w,r)},x=()=>{s.pageNo=1,c()};return z(()=>{c()}),(o,r)=>{const k=Q,u=Y,l=q,M=Z,U=H,A=W,h=B("hasPermi"),O=J;return _(),F(D,null,[t(u,{plain:"",onClick:x},{default:n(()=>[t(k,{icon:"ep:refresh",class:"mr-5px"}),d(" \u5237\u65B0 ")]),_:1}),y((_(),p(u,{type:"primary",plain:"",onClick:r[0]||(r[0]=a=>N("create"))},{default:n(()=>[t(k,{icon:"ep:plus",class:"mr-5px"}),d(" \u65B0\u589E ")]),_:1})),[[h,["crm:customer-limit-config:create"]]]),y((_(),p(U,{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(M,{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=>[y((_(),p(u,{link:"",type:"primary",onClick:i=>N("update",a.row.id)},{default:n(()=>[d(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[h,["crm:customer-limit-config:update"]]]),y((_(),p(u,{link:"",type:"danger",onClick:i=>(async m=>{try{await C.delConfirm(),await la(m),C.success(E("common.delSuccess")),await c()}catch{}})(a.row.id)},{default:n(()=>[d(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[h,["crm:customer-limit-config:delete"]]])]),_:1})]),_:1},8,["data"])),[[O,e(g)]]),t(A,{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:v,onSuccess:c},null,512)],64)}}}),[["__file","E:/GAOHP_2023/mall/newfeifan-front/yudao-ui-admin-vue3/src/views/crm/customer/limitConfig/CustomerLimitConfigList.vue"]])});export{da as __tla,I as default};
