import{_ as $,u as j}from"./EditDialog.vue_vue_type_script_setup_true_lang.b3afafa5.js";import{A as I}from"./index.1d26a072.js";import{_ as L}from"./index.vue_vue_type_script_setup_true_lang.8a761348.js";import{d as O,b7 as S,a6 as G,r as c,b as F,p as H,c as d,at as J,e as n,f as m,u as l,h as t,i as o,A as p,g as i,w as K,k as h,t as _,m as g,q as M,F as Q,y as W,_ as X}from"./index.0308b213.js";import"./useInstance.233fbdde.js";import"./install.524ae6f2.js";import"./useAgent.c0cb1751.js";import"./list.5526c7ef.js";const Y={key:0,class:"filter-form"},Z=g("\u67E5\u8BE2"),ee={class:"data"},te={class:"table"},le={class:"user-info"},ae={class:"avatar",style:{width:"100px !important",height:"100px"}},oe=["src"],ue={key:0,class:"group-name"},ie={class:"tag tag--blue"},se={key:0,class:"tag tag--blue"},ne={key:1,class:"tag tag--blue"},re={class:"tag tag--blue"},de={style:{display:"flex","flex-direction":"column","text-align":"center","justify-content":"center","align-items":"center"}},_e=g("\u6388\u4FE1\u989D\u5EA6\u660E\u7EC6"),ce=g("\u603B\u6388\u4FE1\u989D\u5EA6\u660E\u7EC6"),me={class:"bottom"},pe={class:"pagination"},ge=O({setup(fe){const k=S(),{OpPlatform:x}=G();let v=c(!1);const a=F({page:1,limit:10,agentid:"",sid:""});F({store:[]});const f=F({list:[],count:0});c([]);const E=()=>{v.value=!0,x.value=="shangpu"&&j(a).then(r=>{f.list=r.list,f.count=r.count,v.value=!1})};E(),H(()=>[a.page,a.limit],()=>{E()});const V=()=>{E()};let b=c(!1),C=c(!1),D=c(0);const B=()=>{D.value=0,W(()=>{C.value=!1}),E()},z=r=>{k.push({path:"/admin/plugin/credit_limit_record/index",query:{uid:r}})},P=r=>{k.push({path:"/admin/plugin/credit_limit_record/total",query:{uid:r}})};return(r,u)=>{const y=d("el-form-item"),w=d("el-button"),U=d("el-form"),s=d("el-table-column"),A=d("el-tag"),q=d("el-table"),N=d("el-pagination"),R=J("loading");return n(),m(Q,null,[l(x)==="shangpu"?(n(),m("div",Y,[t(U,{model:l(a),"label-width":"90px"},{default:o(()=>[t(y,{class:"tn-el-form-item",label:"\u4EE3\u7406"},{default:o(()=>[t(l(I),{modelValue:l(a).agentid,"onUpdate:modelValue":u[0]||(u[0]=e=>l(a).agentid=e),placeholder:"\u8BF7\u9009\u62E9\u4EE3\u7406"},null,8,["modelValue"])]),_:1}),t(y,{class:"tn-el-form-item",label:"\u95E8\u5E97"},{default:o(()=>[t(L,{modelValue:l(a).sid,"onUpdate:modelValue":u[1]||(u[1]=e=>l(a).sid=e),agentid:l(a).agentid,placeholder:"\u8BF7\u9009\u62E9\u95E8\u5E97"},null,8,["modelValue","agentid"])]),_:1}),t(y,null,{default:o(()=>[t(w,{class:"tn-el-form-item--item tn-button tn-button--blue",onClick:V},{default:o(()=>[Z]),_:1})]),_:1})]),_:1},8,["model"])])):p("",!0),i("div",ee,[i("div",te,[K((n(),h(q,{data:l(f).list},{default:o(()=>[t(s,{label:"\u4EE3\u7406\u5546",prop:"agent_title"}),t(s,{label:"\u4F9B\u5E94\u5546",prop:"supplier_title"}),t(s,{label:"\u95E8\u5E97",prop:"store_title"}),t(s,{label:"\u4F1A\u5458uid",prop:"uid"}),t(s,{label:"\u987E\u5BA2\u4FE1\u606F"},{default:o(e=>[i("div",le,[i("div",ae,[i("img",{src:e.row.avatar,style:{width:"100%",height:"100%"}},null,8,oe),e.row.groupname&&e.row.groupname!=="null"?(n(),m("div",ue,_(e.row.groupname),1)):p("",!0)]),i("div",ie," \u6635\u79F0: "+_(e.row.nickname),1),e.row.realname?(n(),m("div",se," \u59D3\u540D: "+_(e.row.realname),1)):p("",!0),e.row.mobile?(n(),m("div",ne," \u624B\u673A\u53F7: "+_(e.row.mobile),1)):p("",!0),i("div",re," \u52A0\u5165\u65F6\u95F4: "+_(e.row.addtime_text),1)])]),_:1}),t(s,{label:"\u603B\u6388\u4FE1\u989D\u5EA6",prop:"total_credit_limit"}),t(s,{label:"\u5269\u4F59\u6388\u4FE1\u989D\u5EA6",prop:"credit_limit"}),t(s,{label:"\u5DF2\u4F7F\u7528\u6388\u4FE1\u989D\u5EA6",prop:"used_credit_limit"},{default:o(e=>[e.row.used_credit_limit>0?(n(),h(A,{key:0,type:"danger"},{default:o(()=>[g(_(e.row.used_credit_limit),1)]),_:2},1024)):(n(),h(A,{key:1},{default:o(()=>[g(_(e.row.used_credit_limit),1)]),_:2},1024))]),_:1}),t(s,{label:"\u64CD\u4F5C"},{default:o(e=>[i("view",de,[t(w,{type:"primary",onClick:T=>z(e.row.uid)},{default:o(()=>[_e]),_:2},1032,["onClick"]),t(w,{style:{"margin-top":"5px"},type:"success",onClick:T=>P(e.row.uid)},{default:o(()=>[ce]),_:2},1032,["onClick"])])]),_:1})]),_:1},8,["data"])),[[R,l(v)]])])]),i("div",me,[i("div",pe,[t(N,{currentPage:l(a).page,"onUpdate:currentPage":u[2]||(u[2]=e=>l(a).page=e),"page-size":l(a).limit,"onUpdate:page-size":u[3]||(u[3]=e=>l(a).limit=e),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:l(f).count},null,8,["currentPage","page-size","total"])])]),l(C)?(n(),h($,{key:1,modelValue:l(b),"onUpdate:modelValue":u[4]||(u[4]=e=>M(b)?b.value=e:b=e),id:l(D),onOnClose:B},null,8,["modelValue","id"])):p("",!0)],64)}}});const xe=X(ge,[["__scopeId","data-v-0d4e6287"]]);export{xe as default};
