import{U as k,J as j,o as R,C as $,w as P,D as q}from"./element-plus.ae8e286c.js";import{_ as N}from"./index.vue_vue_type_script_setup_true_lang.f36e8ca0.js";import{m as S,b as U}from"./index.71fc8348.js";import{u as V}from"./vue-router.ed788fee.js";import{g as J,a as T,u as z}from"./consumer.7b65afe3.js";import{_ as H}from"./account-adjust.vue_vue_type_script_setup_true_lang.fe18eacd.js";import{d as x,_ as y,s as I,ae as K,o as m,c as L,T as e,K as a,a as w,R as r,S as u,L as v,J as E}from"./@vue.108c970a.js";import"./@vueuse.d3d080b7.js";import"./@element-plus.d6eabd08.js";import"./lodash-es.29c53eac.js";import"./dayjs.664390f6.js";import"./axios.4ebfdb3f.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.e92d81a1.js";import"./pinia.eff1ffd5.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.dbf33394.js";import"./color.e1b5fced.js";import"./clone.0a4e8ac3.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.f174a91e.js";import"./ms.a9ae1d6d.js";import"./nprogress.d7c3ab1b.js";import"./vue-clipboard3.add720e2.js";import"./clipboard.01ea18f5.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.241b9b5d.js";import"./index.a9e38e26.js";const M={class:"bg-page flex py-5 mb-10 items-center"},O={class:"basis-40 flex flex-col justify-center items-center"},G=w("div",{class:"mb-2 text-tx-regular"},"\u7528\u6237\u5934\u50CF",-1),Q=x({name:"consumerDetail"}),Ne=x({...Q,setup(W){const p=V(),o=y({avatar:"",channel:"",create_time:"",login_time:"",mobile:"",nickname:"",real_name:0,sex:0,sn:"",account:"",is_disable:0,user_money:""}),n=y({show:!1,value:""}),D=I(),_=async()=>{const s=await J({id:p.query.id});Object.keys(o).forEach(t=>{t=="is_disable"&&(s[t]==0&&(s[t]="\u5426"),s[t]==1&&(s[t]="\u662F")),o[t]=s[t]})},d=async(s,t)=>{S(s)||(await z({id:p.query.id,field:t,value:s}),_())},h=async s=>{await T({user_id:p.query.id,...s}),n.show=!1,_()};return _(),(s,t)=>{const A=k,C=j,B=R,l=$,c=U,f=P,F=N,g=q,b=K("perms");return m(),L("div",null,[e(C,{class:"!border-none",shadow:"never"},{default:a(()=>[e(A,{content:"\u7528\u6237\u8BE6\u60C5",onBack:t[0]||(t[0]=i=>s.$router.back())})]),_:1}),e(C,{class:"mt-4 !border-none",header:"\u57FA\u672C\u8D44\u6599",shadow:"never"},{default:a(()=>[e(g,{ref_key:"formRef",ref:D,class:"ls-form",model:o,"label-width":"120px"},{default:a(()=>[w("div",M,[w("div",O,[G,e(B,{src:o.avatar,size:58},null,8,["src"])])]),e(l,{label:"\u8D26\u53F7\uFF1A"},{default:a(()=>[r(u(o.account),1)]),_:1}),e(l,{label:"\u7528\u6237\u7F16\u53F7\uFF1A"},{default:a(()=>[r(u(o.sn),1)]),_:1}),e(l,{label:"\u7528\u6237\u6635\u79F0\uFF1A"},{default:a(()=>[r(u(o.nickname),1)]),_:1}),e(l,{label:"\u771F\u5B9E\u59D3\u540D\uFF1A"},{default:a(()=>[r(u(o.real_name||"-")+" ",1),v((m(),E(F,{class:"ml-[10px]",onConfirm:t[1]||(t[1]=i=>d(i,"real_name")),limit:32},{default:a(()=>[e(f,{type:"primary",link:""},{default:a(()=>[e(c,{name:"el-icon-EditPen"})]),_:1})]),_:1})),[[b,["user.user/edit"]]])]),_:1}),e(l,{label:"\u6027\u522B\uFF1A"},{default:a(()=>[r(u(o.sex)+" ",1),v((m(),E(F,{class:"ml-[10px]",type:"select",options:[{label:"\u672A\u77E5",value:0},{label:"\u7537",value:1},{label:"\u5973",value:2}],onConfirm:t[2]||(t[2]=i=>d(i,"sex"))},{default:a(()=>[e(f,{type:"primary",link:""},{default:a(()=>[e(c,{name:"el-icon-EditPen"})]),_:1})]),_:1})),[[b,["user.user/edit"]]])]),_:1}),e(l,{label:"\u662F\u5426\u7981\u7528\uFF1A"},{default:a(()=>[r(u(o.is_disable)+" ",1),v((m(),E(F,{class:"ml-[10px]",type:"select",options:[{label:"\u5426",value:0},{label:"\u662F",value:1}],onConfirm:t[3]||(t[3]=i=>d(i,"is_disable"))},{default:a(()=>[e(f,{type:"primary",link:""},{default:a(()=>[e(c,{name:"el-icon-EditPen"})]),_:1})]),_:1})),[[b,["user.user/edit"]]])]),_:1}),e(l,{label:"\u8054\u7CFB\u7535\u8BDD\uFF1A"},{default:a(()=>[r(u(o.mobile||"-"),1)]),_:1}),e(l,{label:"\u6CE8\u518C\u6765\u6E90\uFF1A"},{default:a(()=>[r(u(o.channel),1)]),_:1}),e(l,{label:"\u6CE8\u518C\u65F6\u95F4\uFF1A"},{default:a(()=>[r(u(o.create_time),1)]),_:1}),e(l,{label:"\u6700\u8FD1\u767B\u5F55\u65F6\u95F4\uFF1A"},{default:a(()=>[r(u(o.login_time),1)]),_:1})]),_:1},8,["model"])]),_:1}),e(H,{show:n.show,"onUpdate:show":t[4]||(t[4]=i=>n.show=i),value:n.value,onConfirm:h},null,8,["show","value"])])}}});export{Ne as default};
