import{B as W,C as X,w as Y,D as Z,I as ee,O as te,o as ue,P as oe,L as ae,Q as se}from"./element-plus.10e48c93.js";import{_ as ne}from"./index.vue_vue_type_script_setup_true_lang.579ca8f7.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_lang.4fea239f.js";import{u as ie}from"./vue-router.9f65afb1.js";import{d as L,$ as re,r as g,b8 as ce,a4 as pe,af as me,o as a,c,U as e,L as u,u as o,a8 as de,R as s,M as p,K as i,S as _e,T as fe,Q as F,k as z,a as b,bf as Ee,be as ye}from"./@vue.51d7f2d8.js";import{u as Fe}from"./usePaging.60d02673.js";import{k as v,f as S,d as he}from"./index.5b774352.js";import{e as q,f as Ce,s as ke}from"./consumer.0a91afe1.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./index.1f170085.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.0fc4c9f8.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const Be=h=>(Ee("data-v-8c512d23"),h=h(),ye(),h),ve={key:0,style:{color:"#67c23a"}},De={key:1,style:{color:"#fe0000"}},ge={key:0,style:{color:"#67c23a"}},be={key:1,style:{color:"#fe0000"}},Ae=Be(()=>b("h1",null,"\u91CD\u8981\u63D0\u9192",-1)),xe={key:0,class:"content"},Ve={key:1,class:"content"},we={class:"btn_menu"},Ie={class:"flex justify-end mt-4"},Pe=L({name:"consumerLists"}),ze=L({...Pe,setup(h){const A=ie(),m=re({keyword:"",channel:"",create_time_start:"",create_time_end:"",company_id:""});A.query.company_id&&(m.company_id=A.query.company_id);const y=g(0),d=g(!1),C=g(!1),k=()=>{d.value=!1,C.value=!1},R=()=>{console.log(y.value),Ce({id:y.value}).then(()=>{S.msgSuccess("\u53D1\u9001\u6210\u529F")}),k()},U=()=>{ke({id:y.value}).then(K=>{S.msgSuccess("\u53D1\u9001\u6210\u529F")}),k()},{pager:_,getLists:D,resetPage:x,resetParams:$}=Fe({fetchFun:q,params:m});return ce(()=>{D()}),D(),(K,f)=>{const N=W,V=X,n=Y,T=le,B=pe("router-link"),M=Z,w=ee,l=te,Q=ue,j=oe,O=ae,G=ne,E=me("perms"),H=se;return a(),c("div",null,[e(w,{class:"!border-none",shadow:"never"},{default:u(()=>[e(M,{ref:"formRef",class:"mb-[-16px]",model:o(m),inline:!0},{default:u(()=>[e(V,{label:"\u7528\u6237\u4FE1\u606F"},{default:u(()=>[e(N,{class:"w-[280px]",modelValue:o(m).keyword,"onUpdate:modelValue":f[0]||(f[0]=t=>o(m).keyword=t),placeholder:"\u7528\u6237\u7F16\u53F7/\u6635\u79F0/\u624B\u673A\u53F7\u7801",clearable:"",onKeyup:de(o(x),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(V,null,{default:u(()=>[e(n,{type:"primary",onClick:o(x)},{default:u(()=>[s("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(n,{onClick:o($)},{default:u(()=>[s("\u91CD\u7F6E")]),_:1},8,["onClick"]),e(T,{class:"ml-2.5","fetch-fun":o(q),params:o(m),"page-size":o(_).size},null,8,["fetch-fun","params","page-size"]),p((a(),i(n,{class:"ml-2.5",type:"primary"},{default:u(()=>[e(B,{to:{path:o(v)("user.user/edit")}},{default:u(()=>[s(" \u521B\u5EFA ")]),_:1},8,["to"])]),_:1})),[[E,["user.user/edit"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(w,{class:"!border-none mt-4",shadow:"never"},{default:u(()=>[p((a(),i(j,{size:"large",data:o(_).lists},{default:u(()=>[e(l,{label:"ID",prop:"id","min-width":"100"}),e(l,{label:"\u7528\u6237\u7F16\u53F7",prop:"sn","min-width":"120"}),e(l,{label:"\u5934\u50CF","min-width":"100"},{default:u(({row:t})=>[e(Q,{src:t.avatar,size:50},null,8,["src"])]),_:1}),e(l,{label:"\u8D26\u53F7",prop:"account","min-width":"120"}),e(l,{label:"\u59D3\u540D",prop:"nickname","min-width":"100"}),e(l,{label:"\u8054\u7CFB\u65B9\u5F0F",prop:"mobile","min-width":"120"}),e(l,{label:"\u96B6\u5C5E\u516C\u53F8",prop:"company_name","min-width":"180",align:"center"},{default:u(({row:t})=>{var r;return[s(_e(((r=t.company)==null?void 0:r.company_name)||"/"),1)]}),_:1}),e(l,{label:"\u6240\u5728\u4E61\u9547",prop:"street_name","min-width":"120"}),e(l,{label:"\u6388\u6743\u8EAB\u4EFD",prop:"role_name","min-width":"120"},{default:u(({row:t})=>{var r;return[t.admin_id==((r=t.company)==null?void 0:r.admin_id)?(a(),c("span",ve,"\u516C\u53F8\u540E\u53F0\u7BA1\u7406\u4EBA\u5458")):(a(),c("span",De,"\u65E0"))]}),_:1}),e(l,{label:"\u662F\u5426\u7B7E\u7EA6",prop:"is_contract",align:"center","min-width":"120"},{default:u(({row:t})=>[t.is_contract==1?(a(),c("span",ge,"\u5DF2\u7B7E\u7EA6")):(a(),c("span",be,"\u672A\u7B7E\u7EA6"))]),_:1}),e(l,{label:"\u64CD\u4F5C","min-width":"300",align:"center",fixed:"right"},{default:u(({row:t})=>{var r,I,P;return[p((a(),i(n,{type:"primary",link:""},{default:u(()=>[e(B,{to:{path:o(v)("user.user/detail"),query:{id:t.id}}},{default:u(()=>[s(" \u8BE6\u60C5 ")]),_:2},1032,["to"])]),_:2},1024)),[[E,["user.user/detail"]]]),t.is_contract==0?(a(),c(fe,{key:0},[t.contract?F("",!0):p((a(),i(n,{key:0,type:"primary",link:""},{default:u(()=>[e(B,{to:{path:o(v)("user.user/detail"),query:{id:t.id,mode:"initiate"}}},{default:u(()=>[s(" \u751F\u6210\u5408\u540C ")]),_:2},1032,["to"])]),_:2},1024)),[[E,["user.user/launch"]]]),((r=t.contract)==null?void 0:r.check_status)==1?p((a(),i(n,{key:1,type:"primary",link:""},{default:u(()=>[e(B,{to:{path:o(v)("user.user/detail"),query:{id:t.id,mode:"uplode",mdoeid:t.contract.id}}},{default:u(()=>[s(" \u4E0A\u4F20\u5408\u540C ")]),_:2},1032,["to"])]),_:2},1024)),[[E,["user.user/uplode"]]]):F("",!0),((I=t.contract)==null?void 0:I.check_status)==2?p((a(),i(n,{key:2,type:"primary",link:"",onClick:J=>(d.value=!0,C.value=!0,y.value=t.id)},{default:u(()=>[s("\u53D1\u9001\u5408\u540C")]),_:2},1032,["onClick"])),[[E,["user.user/launch"]]]):F("",!0),t.is_contract==0&&((P=t.contract)==null?void 0:P.check_status)==3?p((a(),i(n,{key:3,type:"primary",link:"",onClick:J=>(d.value=!0,y.value=t.id)},{default:u(()=>[s("\u91CD\u65B0\u53D1\u9001\u77ED\u4FE1")]),_:2},1032,["onClick"])),[[E,["user.user/launch"]]]):F("",!0)],64)):F("",!0)]}),_:1})]),_:1},8,["data"])),[[H,o(_).loading]]),e(O,{modelValue:o(d),"onUpdate:modelValue":f[1]||(f[1]=t=>z(d)?d.value=t:null),onClose:k},{default:u(()=>[Ae,o(C)?(a(),c("div",xe," \u8BF7\u786E\u8BA4\u4FE1\u606F\u662F\u5426\u6709\u8BEF,\u53D1\u9001\u5408\u540C,\u8BF7\u786E\u8BA4\u4FE1\u606F\u662F\u5426\u6709\u8BEF,\u53D1\u9001\u7535\u5B50\u5408\u540C\u540E\u77ED\u65F6\u95F4\u5185\u5C06\u4E0D\u53EF\u518D\u6B21\u53D1\u9001. ")):(a(),c("div",Ve," \u786E\u8BA4\u7B7E\u7EA6\u77ED\u4FE1\u5C06\u572860\u79D2\u540E\u53D1\u9001,\u8BF7\u6CE8\u610F\u67E5\u6536,\u5E76\u70B9\u51FB\u77ED\u4FE1\u94FE\u63A5\u8FDB\u884C\u7EBF\u4E0A\u5408\u540C\u7B7E\u7EA6 ")),b("p",we,[o(C)?(a(),i(n,{key:0,type:"primary",size:"large",onClick:R},{default:u(()=>[s("\u786E\u8BA4\u521B\u5EFA")]),_:1})):(a(),i(n,{key:1,type:"primary",size:"large",onClick:U},{default:u(()=>[s("\u786E\u8BA4")]),_:1})),e(n,{type:"info",size:"large",onClick:k},{default:u(()=>[s("\u8FD4\u56DE")]),_:1})])]),_:1},8,["modelValue"]),b("div",Ie,[e(G,{modelValue:o(_),"onUpdate:modelValue":f[2]||(f[2]=t=>z(_)?_.value=t:null),onChange:o(D)},null,8,["modelValue","onChange"])])]),_:1})])}}});const Ct=he(ze,[["__scopeId","data-v-8c512d23"]]);export{Ct as default};