import{a as e,G as l,o as a,e as o,f as r,g as d,w as u,I as t,r as m,h as s}from"./vendor.347ab8d9.js";import{c as n,f}from"./member.3bf9fd1c.js";import{_ as p}from"./index.b1be5a3b.js";import"./request.e3e195c7.js";const i={name:"member-add",setup(){const a=e([]),o=e({passwd:"a123456",paywd:"121314"});n().then((e=>{200==e.status&&e.data.forEach(((e,l)=>{console.log(l),a[l]=e}))}));const r=l(null);return{options:a,rules:{name:[{required:!0,message:"请输入真实姓名",trigger:"blur"}],mobile:[{required:!0,message:"请输入手机号码",trigger:"blur"}],agent:[{required:!0,message:"请选择账户类型",trigger:"blur"}]},formRef:r,form:o,onSubmit:()=>{r.value.validate((e=>{if(!e)return!1;console.log(o),f(o).then((e=>{200==e.status?t.success(e.msg):t.error(e.msg)}))}))},onReset:()=>{r.value.resetFields()}}}},c={class:"crumbs"},b=r("i",{class:"el-icon-lx-calendar"},null,-1),_=s(" 用户管理 "),V=s("新增用户"),g={class:"container"},h={class:"form-box"},w=s("会员"),v=s("代理"),U=s("禁用"),y=s("启用"),x=s("提交"),j=s("重置");var k=p(i,[["render",function(e,l,t,s,n,f){const p=m("el-breadcrumb-item"),i=m("el-breadcrumb"),k=m("el-input"),q=m("el-form-item"),C=m("el-cascader"),R=m("el-radio"),S=m("el-radio-group"),E=m("el-button"),F=m("el-form");return a(),o("div",null,[r("div",c,[d(i,{separator:"/"},{default:u((()=>[d(p,null,{default:u((()=>[b,_])),_:1}),d(p,null,{default:u((()=>[V])),_:1})])),_:1})]),r("div",g,[r("div",h,[d(F,{ref:"formRef",rules:s.rules,model:s.form,"label-width":"80px"},{default:u((()=>[d(q,{label:"用户姓名",prop:"name"},{default:u((()=>[d(k,{modelValue:s.form.name,"onUpdate:modelValue":l[0]||(l[0]=e=>s.form.name=e),placeholder:"请输入真实姓名"},null,8,["modelValue"])])),_:1}),d(q,{label:"用户手机",prop:"mobile"},{default:u((()=>[d(k,{modelValue:s.form.mobile,"onUpdate:modelValue":l[1]||(l[1]=e=>s.form.mobile=e),placeholder:"请输入手机号码(必填)"},null,8,["modelValue"])])),_:1}),d(q,{label:"登录密码",prop:"passwd"},{default:u((()=>[d(k,{modelValue:s.form.passwd,"onUpdate:modelValue":l[2]||(l[2]=e=>s.form.passwd=e),placeholder:"不修改请留空"},null,8,["modelValue"])])),_:1}),d(q,{label:"支付密码",prop:"paywd"},{default:u((()=>[d(k,{modelValue:s.form.paywd,"onUpdate:modelValue":l[3]||(l[3]=e=>s.form.paywd=e),placeholder:"不修改请留空"},null,8,["modelValue"])])),_:1}),d(q,{label:"身份证号",prop:"id_card"},{default:u((()=>[d(k,{modelValue:s.form.id_card,"onUpdate:modelValue":l[4]||(l[4]=e=>s.form.id_card=e),placeholder:"请输入身份证号码"},null,8,["modelValue"])])),_:1}),d(q,{label:"选择上级",prop:"agent_far"},{default:u((()=>[d(C,{options:s.options,modelValue:s.form.agent_far,"onUpdate:modelValue":l[5]||(l[5]=e=>s.form.agent_far=e),placeholder:"选择上级"},null,8,["options","modelValue"])])),_:1}),d(q,{label:"账户类型",prop:"agent_id"},{default:u((()=>[d(S,{modelValue:s.form.agent_id,"onUpdate:modelValue":l[6]||(l[6]=e=>s.form.agent_id=e)},{default:u((()=>[d(R,{label:0},{default:u((()=>[w])),_:1}),d(R,{label:1},{default:u((()=>[v])),_:1})])),_:1},8,["modelValue"])])),_:1}),d(q,{label:"登录状态",prop:"status"},{default:u((()=>[d(S,{modelValue:s.form.status,"onUpdate:modelValue":l[7]||(l[7]=e=>s.form.status=e)},{default:u((()=>[d(R,{label:0},{default:u((()=>[U])),_:1}),d(R,{label:1},{default:u((()=>[y])),_:1})])),_:1},8,["modelValue"])])),_:1}),d(q,null,{default:u((()=>[d(E,{type:"primary",onClick:s.onSubmit},{default:u((()=>[x])),_:1},8,["onClick"]),d(E,{onClick:s.onReset},{default:u((()=>[j])),_:1},8,["onClick"])])),_:1})])),_:1},8,["rules","model"])])])])}]]);export{k as default};
