CustomerLimitConfigList-8ef51f98.js 4.1 KB

1
  1. import{d as M,i as O,r as f,f as D,m as P,S as j,o as _,c as q,g as a,w as n,q as y,y as d,x as p,a as e,R as F,F as H,k as Q,D as Y,H as B,I as G,J,_ as X,__tla as K}from"./index-57157669.js";import{_ as V,__tla as W}from"./index-4d3fe9bb.js";import{_ as Z,__tla as $}from"./DictTag-a5f34e9f.js";import{d as tt,__tla as at}from"./formatTime-5651d340.js";import{L as I,C as et,g as rt,d as lt,__tla as ot}from"./CustomerLimitConfigForm-649af19a.js";import{D as it,__tla as nt}from"./dict-8e991ff7.js";import{u as st,__tla as _t}from"./useMessage-b0cd8819.js";import{__tla as ct}from"./index-8092cb03.js";import"./color-6e929987.js";import{__tla as mt}from"./Dialog-f9339461.js";import{__tla as pt}from"./el-tree-select-94986612.js";import{__tla as ut}from"./index-eab26e50.js";import"./tree-0af4953a.js";import{__tla as ft}from"./index-ecf2f94d.js";let L,yt=Promise.all([(()=>{try{return K}catch{}})(),(()=>{try{return W}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return at}catch{}})(),(()=>{try{return ot}catch{}})(),(()=>{try{return nt}catch{}})(),(()=>{try{return _t}catch{}})(),(()=>{try{return ct}catch{}})(),(()=>{try{return mt}catch{}})(),(()=>{try{return pt}catch{}})(),(()=>{try{return ut}catch{}})(),(()=>{try{return ft}catch{}})()]).then(async()=>{L=X(M({name:"CustomerLimitConfigList",__name:"CustomerLimitConfigList",props:{confType:{type:Number,required:!0}},setup(S){const C=st(),{t:x}=O(),{confType:b}=S,g=f(!0),w=f(0),T=f([]),s=D({pageNo:1,pageSize:10,type:b}),c=async()=>{g.value=!0;try{const o=await rt(s);T.value=o.list,w.value=o.total}finally{g.value=!1}},k=f(),N=(o,r)=>{k.value.open(o,b,r)},R=()=>{s.pageNo=1,c()};return P(()=>{c()}),(o,r)=>{const v=Q,u=Y,l=B,U=Z,E=G,z=V,h=j("hasPermi"),A=J;return _(),q(H,null,[a(u,{plain:"",onClick:R},{default:n(()=>[a(v,{icon:"ep:refresh",class:"mr-5px"}),y(" \u5237\u65B0 ")]),_:1}),d((_(),p(u,{type:"primary",plain:"",onClick:r[0]||(r[0]=t=>N("create"))},{default:n(()=>[a(v,{icon:"ep:plus",class:"mr-5px"}),y(" \u65B0\u589E ")]),_:1})),[[h,["crm:customer-limit-config:create"]]]),d((_(),p(E,{data:e(T),stripe:!0,"show-overflow-tooltip":!0,class:"mt-4"},{default:n(()=>[a(l,{label:"\u7F16\u53F7",align:"center",prop:"id"}),a(l,{label:"\u89C4\u5219\u7C7B\u578B",align:"center",prop:"type"}),a(l,{label:"\u89C4\u5219\u9002\u7528\u4EBA\u7FA4",align:"center",formatter:t=>{var i;return(i=t.users)==null?void 0:i.map(m=>m.nickname).join("\uFF0C")}},null,8,["formatter"]),a(l,{label:"\u89C4\u5219\u9002\u7528\u90E8\u95E8",align:"center",formatter:t=>{var i;return(i=t.depts)==null?void 0:i.map(m=>m.name).join("\uFF0C")}},null,8,["formatter"]),a(l,{label:o.confType===e(I).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(I).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(t=>[a(U,{type:e(it).INFRA_BOOLEAN_STRING,value:t.row.dealCountEnabled},null,8,["type","value"])]),_:1})):F("",!0),a(l,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",formatter:e(tt),width:"180px"},null,8,["formatter"]),a(l,{label:"\u64CD\u4F5C",align:"center","min-width":"110",fixed:"right"},{default:n(t=>[d((_(),p(u,{link:"",type:"primary",onClick:i=>N("update",t.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 lt(m),C.success(x("common.delSuccess")),await c()}catch{}})(t.row.id)},{default:n(()=>[y(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[h,["crm:customer-limit-config:delete"]]])]),_:1})]),_:1},8,["data"])),[[A,e(g)]]),a(z,{total:e(w),page:e(s).pageNo,"onUpdate:page":r[1]||(r[1]=t=>e(s).pageNo=t),limit:e(s).pageSize,"onUpdate:limit":r[2]||(r[2]=t=>e(s).pageSize=t),onPagination:c},null,8,["total","page","limit"]),a(et,{ref_key:"formRef",ref:k,onSuccess:c},null,512)],64)}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-business/src/views/crm/customer/limitConfig/CustomerLimitConfigList.vue"]])});export{yt as __tla,L as default};