import{A as L}from"./index.1d26a072.js";import{C as $,a as q,g as M,b as O,d as P}from"./ChangeInfo.0c5aa5d7.js";import{d as j,a6 as G,r as p,b as V,p as R,c,e as g,f as H,g as u,h as t,i as s,u as l,k as y,A as C,q as J,F as K,m as F,y as B,N as Q,E as D,_ as W}from"./index.0308b213.js";import"./install.524ae6f2.js";import"./useAgent.c0cb1751.js";import"./list.5526c7ef.js";import"./useInstance.233fbdde.js";const X={class:"filter-form"},Y={style:{display:"flex"}},Z={style:{display:"flex"}},ee={style:{display:"flex"}},te=F("\u67E5\u8BE2"),le={class:"data"},ae={class:"table"},oe={class:"table-operation-btn"},ne={class:"top"},se=F("\u8D26\u6237\u53D8\u52A8"),ue=F("\u5220\u9664"),ie={class:"bottom"},de={class:"pagination"},re=j({setup(pe){const{OpPlatform:f}=G();p(!1),p(!1),p(0);const o=V({agentid:"",uid:"",card_no:"",mobile:"",page:1,limit:10}),i=V({count:0,list:[],areas:[]}),d=()=>{f.value==="agent"?q().then(n=>{i.list=n.list,i.count=n.count,i.areas=n.areas}):M(o).then(n=>{i.list=n.list,i.count=n.count,i.areas=n.areas})};d();let _=p(!1),b=p(!1),h=p(0);const E=n=>{h.value=n,b.value=!0,B(()=>{_.value=!0})},w=()=>{h.value=0,B(()=>{b.value=!1,d()})};let A=p([]);const k=n=>{A.value=[],n.forEach(e=>A.value.push(e.id))};R(()=>[o.page,o.limit],()=>{d()});const z=()=>{d()},U=n=>{Q.alert("\u786E\u5B9A\u5220\u9664\u8BE5\u6570\u636E\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{f.value==="agent"?O(n).then(e=>{D({message:"\u5220\u9664\u6210\u529F",type:"success"}),d()}):P(n).then(e=>{D({message:"\u5220\u9664\u6210\u529F",type:"success"}),d()})}).catch(()=>{})};return(n,e)=>{const m=c("el-form-item"),v=c("el-input"),x=c("el-button"),N=c("el-form"),r=c("el-table-column"),I=c("el-table"),S=c("el-pagination");return g(),H(K,null,[u("div",X,[t(N,{model:l(o),"label-width":"90px"},{default:s(()=>[u("view",Y,[l(f)==="shangpu"?(g(),y(m,{key:0,class:"tn-el-form-item",label:"\u4EE3\u7406\u533A\u57DF",style:{flex:"1"}},{default:s(()=>[t(l(L),{modelValue:l(o).agentid,"onUpdate:modelValue":e[0]||(e[0]=a=>l(o).agentid=a)},null,8,["modelValue"])]),_:1})):C("",!0)]),u("view",Z,[t(m,{class:"tn-el-form-item",label:"uid",style:{width:"500px",flex:"1"}},{default:s(()=>[t(v,{modelValue:l(o).uid,"onUpdate:modelValue":e[1]||(e[1]=a=>l(o).uid=a),placeholder:"\u8BF7\u8F93\u5165uid"},null,8,["modelValue"])]),_:1}),t(m,{class:"tn-el-form-item",label:"\u5361\u53F7",style:{width:"500px",flex:"1"}},{default:s(()=>[t(v,{modelValue:l(o).card_no,"onUpdate:modelValue":e[2]||(e[2]=a=>l(o).card_no=a),placeholder:"\u8BF7\u8F93\u5165\u5361\u53F7"},null,8,["modelValue"])]),_:1})]),u("view",ee,[t(m,{class:"tn-el-form-item",label:"\u624B\u673A\u53F7\u7801",style:{width:"500px",flex:"1"}},{default:s(()=>[t(v,{modelValue:l(o).mobile,"onUpdate:modelValue":e[3]||(e[3]=a=>l(o).mobile=a),placeholder:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7\u7801"},null,8,["modelValue"])]),_:1}),t(m,{class:"tn-el-form-item",style:{width:"500px",flex:"1"}})]),t(m,null,{default:s(()=>[t(x,{class:"tn-el-form-item--item tn-button tn-button--blue",onClick:z},{default:s(()=>[te]),_:1})]),_:1})]),_:1},8,["model"])]),u("div",le,[u("div",ae,[t(I,{data:l(i).list,onSelectionChange:k},{default:s(()=>[l(f)==="shangpu"?(g(),y(r,{key:0,label:"\u4EE3\u7406\u533A\u57DF",prop:"agent_title"})):C("",!0),t(r,{label:"uid",prop:"uid"}),t(r,{label:"\u624B\u673A\u53F7\u7801",prop:"mobile"}),t(r,{label:"\u4F59\u989D",prop:"credit2"}),t(r,{label:"\u8D60\u9001",prop:"send"}),t(r,{label:"\u5361\u53F7",prop:"card_no"}),t(r,{label:"\u64CD\u4F5C",align:"center"},{default:s(a=>[u("div",oe,[u("div",ne,[t(x,{size:"small",type:"primary",onClick:T=>E(a.row.id)},{default:s(()=>[se]),_:2},1032,["onClick"]),t(x,{size:"small",type:"danger",onClick:T=>U(a.row.id)},{default:s(()=>[ue]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])])]),u("div",ie,[u("div",de,[t(S,{"current-page":l(o).page,"onUpdate:current-page":e[4]||(e[4]=a=>l(o).page=a),"page-size":l(o).limit,"onUpdate:page-size":e[5]||(e[5]=a=>l(o).limit=a),"page-limit":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:l(i).count,onSizeChange:e[6]||(e[6]=a=>d()),onCurrentChange:e[7]||(e[7]=a=>d())},null,8,["current-page","page-size","total"])])]),l(b)?(g(),y($,{key:0,modelValue:l(_),"onUpdate:modelValue":e[8]||(e[8]=a=>J(_)?_.value=a:_=a),id:l(h),onOnClose:w},null,8,["modelValue","id"])):C("",!0)],64)}}});const ve=W(re,[["__scopeId","data-v-f943275a"]]);export{ve as default};
