import{C as W,D as X,J as Y,K as ee,w as oe,F as te,L as ae,M as le,N as ue,O as ne}from"./element-plus.a63a26dd.js";import{_ as se}from"./index.vue_vue_type_script_setup_true_lang.ecb80feb.js";import{_ as re}from"./index.vue_vue_type_script_setup_true_lang.3d204d54.js";import{u as ie}from"./vue-router.101084e3.js";import{d as N,r as d,s as me,Z as pe,i as de,ap as ce,o as i,c as y,U as e,L as l,u as o,aa as w,T as U,a9 as R,K as c,R as f,M as g,a as T,S as _e,j as fe,Q as be,n as he}from"./@vue.18505fe0.js";import{u as De}from"./usePaging.6a6670f9.js";import{u as ve}from"./useDictOptions.ceaaf089.js";import{h as $}from"./index.af2b1692.js";import{a as Fe}from"./user_ship.42716294.js";import{a as Ce}from"./system_store.7ab9d72e.js";import"./lodash.2473fc51.js";import{_ as ye}from"./edit.vue_vue_type_script_setup_true_name_userEdit_lang.9a73936e.js";import{_ as we}from"./details.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.1c275ded.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.4884cfc2.js";import"./axios.932d3f8a.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.dfacf054.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./pinia.a969beab.js";import"./css-color-function.9f6a56f3.js";import"./color.d1bc3784.js";import"./clone.83700f2e.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.fcc9be76.js";import"./vue-clipboard3.9e751565.js";import"./clipboard.dda64e67.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./user_label.2dc067bd.js";import"./index.vue_vue_type_script_setup_true_lang.ab7008c1.js";import"./purchase.vue_vue_type_script_setup_true_name_purchase_lang.fb8a553b.js";import"./balance.vue_vue_type_script_setup_true_name_balance_lang.76cb4dca.js";import"./merchandise.vue_vue_type_script_setup_true_name_merchandise_lang.103a0181.js";import"./freeze.vue_vue_type_script_setup_true_name_freeze_lang.765dead1.js";import"./returnMoney.vue_vue_type_script_setup_true_name_returnMoney_lang.a96e7355.js";import"./receiveGifts.vue_vue_type_script_setup_true_name_receiveGifts_lang.fdccf6c2.js";const ge={class:"mt-4"},ke={class:"flex mt-4 justify-end"},Ee=N({name:"userList"}),go=N({...Ee,setup(Be){var V;const z=ie(),D=d(null),k=d([]),v=me(),F=d(!1),n=pe({nickname:"",account:"",mobile:"",store_id:(V=z.query.store_id)!=null?V:"",user_ship:""});Fe([]).then(s=>{k.value=s.lists});const M=d([]),P=s=>{M.value=s.map(({id:t})=>t)},{dictData:E}=ve("sex,system_disable"),{pager:m,getLists:C,resetParams:I,resetPage:_}=De({fetchFun:$,params:n}),j=async s=>{var t,r;F.value=!0,await he(),(t=v.value)==null||t.open("edit"),(r=v.value)==null||r.setFormData(s)},q=async s=>{var t,r;(t=D.value)==null||t.open(),(r=D.value)==null||r.setFormData(s)},b=d(!1),B=d([]),A=(s="")=>{b.value=!0,Ce({name:s,page_size:50}).then(t=>{B.value=t.lists,setTimeout(()=>{b.value=!1},300)}).catch(t=>{setTimeout(()=>{b.value=!1},300)})};return de(()=>{C()}),(s,t)=>{const r=W,p=X,x=Y,L=ee,h=oe,O=re,J=te,S=ae,u=le,Q=ue,Z=se,K=ce("perms"),G=ne;return i(),y("div",null,[e(S,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[e(J,{class:"mb-[-16px]",model:o(n),inline:""},{default:l(()=>[e(p,{label:"\u7528\u6237\u6635\u79F0",prop:"nickname"},{default:l(()=>[e(r,{class:"w-[280px]",modelValue:o(n).nickname,"onUpdate:modelValue":t[0]||(t[0]=a=>o(n).nickname=a),onKeydown:w(o(_),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u6635\u79F0"},null,8,["modelValue","onKeydown"])]),_:1}),e(p,{label:"\u7528\u6237\u8D26\u53F7",prop:"account"},{default:l(()=>[e(r,{class:"w-[280px]",modelValue:o(n).account,"onUpdate:modelValue":t[1]||(t[1]=a=>o(n).account=a),onKeydown:w(o(_),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u8D26\u53F7"},null,8,["modelValue","onKeydown"])]),_:1}),e(p,{label:"\u7528\u6237\u7535\u8BDD",prop:"mobile"},{default:l(()=>[e(r,{class:"w-[280px]",modelValue:o(n).mobile,"onUpdate:modelValue":t[2]||(t[2]=a=>o(n).mobile=a),onKeydown:w(o(_),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u7535\u8BDD"},null,8,["modelValue","onKeydown"])]),_:1}),e(p,{label:"\u7528\u6237\u7C7B\u578B",prop:"user_ship"},{default:l(()=>[e(L,{class:"w-[280px]",modelValue:o(n).user_ship,"onUpdate:modelValue":t[3]||(t[3]=a=>o(n).user_ship=a),placeholder:"\u8BF7\u9009\u62E9\u7528\u6237\u7C7B\u578B",onChange:o(_)},{default:l(()=>[(i(!0),y(U,null,R(o(k),a=>(i(),c(x,{label:a.title,value:a.id,key:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),e(p,{label:"\u6240\u5C5E\u95E8\u5E97",prop:"store_id"},{default:l(()=>[e(L,{modelValue:o(n).store_id,"onUpdate:modelValue":t[4]||(t[4]=a=>o(n).store_id=a),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":A,loading:o(b),style:{width:"240px"}},{default:l(()=>[(i(!0),y(U,null,R(o(B),a=>(i(),c(x,{key:a.id,label:a.name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),e(p,null,{default:l(()=>[e(h,{type:"primary",onClick:o(_)},{default:l(()=>[f("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(h,{onClick:o(I)},{default:l(()=>[f("\u91CD\u7F6E")]),_:1},8,["onClick"]),e(O,{class:"ml-2.5","fetch-fun":o($),params:o(n),"page-size":o(m).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),g((i(),c(S,{class:"!border-none",shadow:"never"},{default:l(()=>[T("div",ge,[e(Q,{data:o(m).lists,onSelectionChange:P},{default:l(()=>[e(u,{label:"ID",prop:"id","min-width":"55"}),e(u,{label:"\u771F\u5B9E\u59D3\u540D",prop:"real_name"}),e(u,{label:"\u7528\u6237\u6635\u79F0",prop:"nickname","min-width":"100"}),e(u,{label:"\u7528\u6237\u8D26\u53F7",prop:"account","min-width":"100"}),e(u,{label:"\u7528\u6237\u7535\u8BDD",prop:"mobile","min-width":"100"}),e(u,{label:"\u7528\u6237\u7C7B\u578B",prop:"vip_name"}),e(u,{label:"\u5F00\u901A\u65F6\u95F4",prop:"vip_time"}),e(u,{label:"\u793C\u54C1\u5238",prop:"integral"}),e(u,{label:"\u8FD4\u8FD8\u91D1",prop:"return_money"},{default:l(({row:a})=>[f(_e(Number(a.return_money).toFixed(2)),1)]),_:1}),e(u,{label:"\u91C7\u8D2D\u6B3E",prop:"purchase_funds"}),e(u,{label:"\u7528\u6237\u4F59\u989D",prop:"now_money"}),e(u,{label:"\u7D2F\u8BA1\u6D88\u8D39",prop:"total_recharge_amount"}),e(u,{label:"\u5730\u5740",prop:"format_address",width:"150"}),e(u,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:l(({row:a})=>[g((i(),c(h,{type:"primary",link:"",onClick:H=>j(a)},{default:l(()=>[f(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[K,["user.user/edit"]]]),g((i(),c(h,{type:"primary",link:"",onClick:H=>q(a)},{default:l(()=>[f(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"])),[[K,["user.user/detail"]]])]),_:1})]),_:1},8,["data"])]),T("div",ke,[e(Z,{modelValue:o(m),"onUpdate:modelValue":t[5]||(t[5]=a=>fe(m)?m.value=a:null),onChange:o(C)},null,8,["modelValue","onChange"])])]),_:1})),[[G,o(m).loading]]),e(we,{ref_key:"detailsRef",ref:D,"dict-data":o(E)},null,8,["dict-data"]),o(F)?(i(),c(ye,{key:0,ref_key:"editRef",ref:v,"dict-data":o(E),onSuccess:o(C),onClose:t[6]||(t[6]=a=>F.value=!1)},null,8,["dict-data","onSuccess"])):be("",!0)])}}});export{go as default};