123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707 |
- <template>
- <div class="app-container">
- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
- <el-form-item label="UID" prop="userid">
- <el-input
- v-model="queryParams.userid"
- placeholder="请输入UID"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="昵称 " prop="nickname">
- <el-input
- v-model="queryParams.nickname"
- placeholder="请输入昵称 "
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="手机号" prop="mobile">
- <el-input
- v-model="queryParams.mobile"
- placeholder="请输入手机号 "
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="登录ip地址" prop="ipaddr">
- <el-input
- v-model="queryParams.ipaddr"
- placeholder="请输入手机号 "
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="在线状态" prop="onlineStatus">
- <el-select v-model="queryParams.onlineStatus" placeholder="请选择" clearable>
- <el-option
- v-for="dict in dict.type.app_user_online_status"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- />
- </el-select>
- </el-form-item>
- <br>
- <el-form-item label="直属上级" prop="pid">
- <el-input
- v-model="queryParams.pid"
- placeholder="请输入直属上级"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="用户身份" prop="role">
- <el-select v-model="queryParams.role" placeholder="请选择用户身份" clearable>
- <el-option
- v-for="dict in dict.type.app_user_role"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- />
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
- </el-form-item>
- </el-form>
- <el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
- <el-button
- type="primary"
- plain
- icon="el-icon-plus"
- size="mini"
- @click="handleAdd"
- v-hasPermi="['business:user:add']"
- >新增</el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="success"
- plain
- icon="el-icon-edit"
- size="mini"
- :disabled="single"
- @click="handleUpdate"
- v-hasPermi="['business:user:edit']"
- >修改</el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="danger"
- plain
- icon="el-icon-delete"
- size="mini"
- :disabled="multiple"
- @click="handleDelete"
- v-hasPermi="['business:user:remove']"
- >删除</el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="warning"
- plain
- icon="el-icon-download"
- size="mini"
- @click="handleExport"
- v-hasPermi="['business:user:export']"
- >导出</el-button>
- </el-col>
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
- </el-row>
- <el-table v-loading="loading" :data="userList" style="width: 100%" @scroll="handleScroll" @selection-change="handleSelectionChange">
- <el-table-column type="selection" width="55" align="center" />
- <el-table-column fixed label="UID" align="center" prop="userid" />
- <el-table-column fixed label="昵称 " align="center" prop="username" width="200"/>
- <el-table-column label="头像" align="center" prop="avatar" width="100">
- <template slot-scope="scope">
- <image-preview :src="scope.row.avatar" :width="50" :height="50"/>
- </template>
- </el-table-column>
- <el-table-column label="金币" align="center" prop="coin" width="150"/>
- <el-table-column label="余额" align="center" prop="diamondCoin" width="150"/>
- <el-table-column label="手机号" align="center" prop="mobile" width="150"/>
- <el-table-column label="最近一次登录ip" align="center" prop="ipaddr" width="150"/>
- <el-table-column label=" 上次登录时间" align="center" prop="lastLoginTime" width="180">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.lastLoginTime, '{y}-{m}-{d}') }}</span>
- </template>
- </el-table-column>
- <el-table-column label="最大连续签到天数" align="center" prop="maxSignCount" />
- <el-table-column label="主播等级" align="center" prop="anchorGrade" />
- <el-table-column label="主播积分" align="center" prop="anchorPoint" />
- <el-table-column label="连续登录天数" align="center" prop="awardLoginDay" />
- <el-table-column label="魅力等级" align="center" prop="charmGrade" />
- <el-table-column label="魅力积分" align="center" prop="charmPoint" />
- <el-table-column label="可兑换" align="center" prop="coinCash" />
- <el-table-column label="消费总额(财富积分)" align="center" prop="consumption" width="150"/>
- <el-table-column label="注册时间" align="center" prop="createTime" width="180">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
- </template>
- </el-table-column>
- <el-table-column label="邀请码" align="center" prop="inviteCode" />
- <el-table-column label="主播是否认证" align="center" prop="isAnchorAuth">
- <template slot-scope="scope">
- <dict-tag :options="dict.type.is_anchor_auth" :value="scope.row.isAnchorAuth"/>
- </template>
- </el-table-column>
- <!-- <el-table-column label="最后登录ip" align="center" prop="lastLoginIp" />-->
- <el-table-column label=" 离线时间" align="center" prop="lastOffLineTime" width="180">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.lastOffLineTime, '{y}-{m}-{d}') }}</span>
- </template>
- </el-table-column>
- <el-table-column label="用户在线状态" align="center" prop="onlineStatus">
- <template slot-scope="scope">
- <dict-tag :options="dict.type.app_user_online_status" :value="scope.row.onlineStatus"/>
- </template>
- </el-table-column>
- <el-table-column label="手机厂商" align="center" prop="phoneFirm" />
- <el-table-column label="手机型号" align="center" prop="phoneModel" />
- <el-table-column label="直属上级" align="center" prop="pid" />
- <el-table-column label="用户身份" align="center" prop="role">
- <template slot-scope="scope">
- <dict-tag :options="dict.type.app_user_role" :value="scope.row.role"/>
- </template>
- </el-table-column>
- <el-table-column label="连续签到次数" align="center" prop="signCount" />
- <el-table-column label="上次签到时间" align="center" prop="signTime" width="180">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.signTime, '{y}-{m}-{d}') }}</span>
- </template>
- </el-table-column>
- <el-table-column label="手机号区域" align="center" prop="smsRegion" />
- <el-table-column label="用户状态" align="center" prop="status">
- <template slot-scope="scope">
- <dict-tag :options="dict.type.app_user_status" :value="scope.row.status"/>
- </template>
- </el-table-column>
- <el-table-column fixed="right" label="操作" align="center" width="200" class-name="small-padding fixed-width">
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- v-if="scope.row.role == 1 && scope.row.liveLive"
- @click="handleLive(scope.row)"
- >{{scope.row.liveLive.islive==1?'关播':'虚拟开播'}}</el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="getUserDetail(scope.row)"
- >查看详情</el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="handleRestPwd(scope.row)"
- >重置密码</el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-bank-card"
- @click="handleCharge(scope.row)"
- >充值</el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="handleWithdraw(scope.row)"
- >补足提现流水</el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="handleUpdate(scope.row)"
- v-hasPermi="['business:user:edit']"
- >修改</el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-delete"
- @click="handleDelete(scope.row)"
- v-hasPermi="['business:user:remove']"
- >删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- <pagination
- v-show="total>0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
- <!-- 添加或修改app用户对话框 -->
- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
- <el-form ref="form" :model="form" :rules="rules" label-width="80px">
- <el-form-item label="当前版本号" prop="appVersion">
- <el-input v-model="form.appVersion" placeholder="请输入当前版本号" />
- </el-form-item>
- <el-form-item label="当前版本code" prop="appVersionCode">
- <el-input v-model="form.appVersionCode" placeholder="请输入当前版本code" />
- </el-form-item>
- <el-form-item label="用户头像" prop="avatar">
- <image-upload v-model="form.avatar"/>
- </el-form-item>
- <el-form-item label="连续登录天数" prop="awardLoginDay">
- <el-input v-model="form.awardLoginDay" placeholder="请输入连续登录天数" />
- </el-form-item>
- <el-form-item label="生日" prop="birthday">
- <el-input v-model="form.birthday" placeholder="请输入生日" />
- </el-form-item>
- <el-form-item label="魅力等级" prop="charmGrade">
- <el-input v-model="form.charmGrade" placeholder="请输入魅力等级" />
- </el-form-item>
- <el-form-item label="魅力积分" prop="charmPoint">
- <el-input v-model="form.charmPoint" placeholder="请输入魅力积分" />
- </el-form-item>
- <el-form-item label="金币 /充值金额" prop="coin">
- <el-input v-model="form.coin" placeholder="请输入金币 /充值金额" />
- </el-form-item>
- <el-form-item label="可兑换" prop="coinCash">
- <el-input v-model="form.coinCash" placeholder="请输入可兑换" />
- </el-form-item>
- <el-form-item label="消费总额(财富积分)" prop="consumption">
- <el-input v-model="form.consumption" placeholder="请输入消费总额(财富积分)" />
- </el-form-item>
- <el-form-item label="邀请码" prop="inviteCode">
- <el-input v-model="form.inviteCode" type="textarea" placeholder="请输入内容" />
- </el-form-item>
- <el-form-item label=" 用户当前的位置信息ID" prop="ipaddr">
- <el-input v-model="form.ipaddr" placeholder="请输入 用户当前的位置信息ID" />
- </el-form-item>
- <el-form-item label="主播是否认证 0:未认证 1:已认证 后台添加主播时,如果是认证状态, 需要添加认证记录" prop="isAnchorAuth">
- <el-select v-model="form.isAnchorAuth" placeholder="请选择主播是否认证 0:未认证 1:已认证 后台添加主播时,如果是认证状态, 需要添加认证记录">
- <el-option
- v-for="dict in dict.type.is_anchor_auth"
- :key="dict.value"
- :label="dict.label"
- :value="parseInt(dict.value)"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="上次登录时间(连续登录用)" prop="lastLoginDay">
- <el-date-picker clearable
- v-model="form.lastLoginDay"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="请选择上次登录时间(连续登录用)">
- </el-date-picker>
- </el-form-item>
- <el-form-item label="最后登录ip" prop="lastLoginIp">
- <el-input v-model="form.lastLoginIp" placeholder="请输入最后登录ip" />
- </el-form-item>
- <el-form-item label=" 上次登录时间" prop="lastLoginTime">
- <el-date-picker clearable
- v-model="form.lastLoginTime"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="请选择 上次登录时间">
- </el-date-picker>
- </el-form-item>
- <el-form-item label=" 离线时间" prop="lastOffLineTime">
- <el-date-picker clearable
- v-model="form.lastOffLineTime"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="请选择 离线时间">
- </el-date-picker>
- </el-form-item>
- <el-form-item label="最大连续签到天数" prop="maxSignCount">
- <el-input v-model="form.maxSignCount" placeholder="请输入最大连续签到天数" />
- </el-form-item>
- <el-form-item label=" 手机号" prop="mobile">
- <el-input v-model="form.mobile" placeholder="请输入 手机号" />
- </el-form-item>
- <el-form-item label="昵称 " prop="nickname">
- <el-input v-model="form.nickname" placeholder="请输入昵称 " />
- </el-form-item>
- <el-form-item label="用户在线状态 0:离线 1:在线" prop="onlineStatus">
- <el-select v-model="form.onlineStatus" placeholder="请选择用户在线状态 0:离线 1:在线">
- <el-option
- v-for="dict in dict.type.app_user_online_status"
- :key="dict.value"
- :label="dict.label"
- :value="parseInt(dict.value)"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="手机厂商" prop="phoneFirm">
- <el-input v-model="form.phoneFirm" placeholder="请输入手机厂商" />
- </el-form-item>
- <el-form-item label="手机型号" prop="phoneModel">
- <el-input v-model="form.phoneModel" placeholder="请输入手机型号" />
- </el-form-item>
- <el-form-item label="手机系统" prop="phoneSystem">
- <el-input v-model="form.phoneSystem" placeholder="请输入手机系统" />
- </el-form-item>
- <el-form-item label="手机唯一标识" prop="phoneUuid">
- <el-input v-model="form.phoneUuid" placeholder="请输入手机唯一标识" />
- </el-form-item>
- <el-form-item label="直属上级" prop="pid">
- <el-input v-model="form.pid" placeholder="请输入直属上级" />
- </el-form-item>
- <el-form-item label="用户身份" prop="role">
- <el-select v-model="form.role" placeholder="请选择用户身份">
- <el-option
- v-for="dict in dict.type.app_user_role"
- :key="dict.value"
- :label="dict.label"
- :value="parseInt(dict.value)"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="连续签到次数" prop="signCount">
- <el-input v-model="form.signCount" placeholder="请输入连续签到次数" />
- </el-form-item>
- <el-form-item label="上次签到时间" prop="signTime">
- <el-date-picker clearable
- v-model="form.signTime"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="请选择上次签到时间">
- </el-date-picker>
- </el-form-item>
- <el-form-item label="手机号区域 例如:86" prop="smsRegion">
- <el-input v-model="form.smsRegion" placeholder="请输入手机号区域 例如:86" />
- </el-form-item>
- <el-form-item label=" 用户状态 1:禁用 0:正常" prop="status">
- <el-select v-model="form.status" placeholder="请选择 用户状态 1:禁用 0:正常">
- <el-option
- v-for="dict in dict.type.app_user_status"
- :key="dict.value"
- :label="dict.label"
- :value="parseInt(dict.value)"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="余额/可提现余额" prop="diamondCoin">
- <el-input v-model="form.diamondCoin" placeholder="请输入余额/可提现余额" />
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitForm">确 定</el-button>
- <el-button @click="cancel">取 消</el-button>
- </div>
- </el-dialog>
- <!-- 重置密码对话框 -->
- <el-dialog :title="title" :visible.sync="resetPwdopen" width="500px" append-to-body>
- <el-form ref="resetPwdForm" :model="resetPwdForm" :rules="resetPwdRules" label-width="80px">
- <el-form-item label="用户id" prop="userId">
- <el-input v-model="resetPwdForm.userId" disabled />
- </el-form-item>
- <el-form-item label="密码" prop="password">
- <el-input v-model="resetPwdForm.password" placeholder="请输入密码" />
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitResetPwdForm">确 定</el-button>
- <el-button @click="cancel">取 消</el-button>
- </div>
- </el-dialog>
- <!-- 充值对话框 -->
- <el-dialog :title="title" :visible.sync="chargeopen" width="700px" append-to-body>
- <el-form ref="chargeForm" :model="chargeForm" :rules="currentRules" :validate-on-rule-change=false label-width="150px">
- <el-form-item label="用户id" prop="userId">
- <el-input v-model="chargeForm.userId" disabled />
- </el-form-item>
- <el-form-item label="货币类型" prop="type">
- <el-select v-model="chargeForm.type" placeholder="请选择" clearable>
- <el-option
- v-for="dict in dict.type.app_user_coin_type"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="金额" prop="amount">
- <el-input type="text" v-model="chargeForm.amount" placeholder="请输入金额" />
- </el-form-item>
- <el-form-item label="是否扣除手续费" prop="isRate">
- <el-select v-model="chargeForm.isRate" placeholder="请选择" clearable @change="isRateChange">
- <el-option
- v-for="dict in dict.type.app_charge_rate"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="渠道(扣除对应渠道手续费)" prop="channelId" v-if="chargeForm.isRate==1">
- <el-select v-model="chargeForm.channelId" placeholder="请选择" clearable @change="chargeChannel">
- <el-option
- v-for="dict in channelList"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- />
- </el-select>
- <span style="padding-left: 1rem;color: red;font-size: 12px" v-if="null != rate && undefined != rate">手续费:{{(rate*100).toFixed(2) + "%"}}</span>
- </el-form-item>
- <!-- <el-form-item label="手续费比例" prop="rate" v-show="chargeForm.isRate==1 && chargeForm.channelId == -1">
- <el-input v-model="chargeForm.rate" placeholder="请输入手续费 (比如扣除10%,则填写0.1)" />
- </el-form-item>-->
- <template v-show="!isReadOnly">
- <el-form-item label="手续费比例" prop="rate" >
- <el-input type="number" v-model="chargeForm.rate" placeholder="请输入手续费 (比如扣除10%,则填写0.1)" :disabled="isReadOnly"/>
- </el-form-item>
- </template>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitChargeForm">确 定</el-button>
- <el-button @click="cancel">取 消</el-button>
- </div>
- </el-dialog>
- <!-- 补足流水对话框 -->
- <el-dialog :title="title" :visible.sync="resetWithdrawopen" width="700px" append-to-body>
- <el-form ref="withdrawForm" :model="resetWithdrawForm" :rules="withdrawRules" :validate-on-rule-change=false label-width="150px">
- <el-form-item label="用户id" prop="userId">
- <el-input v-model="resetWithdrawForm.userId" disabled />
- </el-form-item>
- <el-form-item label="金额" prop="amount">
- <el-input type="text" v-model="resetWithdrawForm.amount" placeholder="请输入金额" />
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitWithdrawForm">确 定</el-button>
- <el-button @click="cancel">取 消</el-button>
- </div>
- </el-dialog>
- <!-- 虚拟开播对话框 -->
- <el-dialog :title="title" :visible.sync="liveOpen" width="700px" append-to-body>
- <el-form :validate-on-rule-change=false label-width="150px">
- <el-form-item label="关播提示" prop="amount" v-if="liveLive.islive == 1">
- <el-input type="text" v-model="resetWithdrawForm.amount" placeholder="请输入" />
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitLiveForm">确 定</el-button>
- <el-button @click="cancel">取 消</el-button>
- </div>
- </el-dialog>
- <!-- 用户详情对话框 -->
- <el-dialog :title="title" :visible.sync="superOpen" width="80%" append-to-body>
- <el-form >
- <el-form-item label="">
- <span>
- <image-preview :src="userInfo.avatar" :width="50" :height="50"/>
- </span>
- <span style="margin-left: 1rem;">{{userInfo.userid}} {{userInfo.role==0?"普通用户":"主播"}}</span>
- <span style="margin-left: 1rem;">注册IP:{{userInfo.registerIp}}</span>
- <span style="margin-left: 1rem;">最后登录IP:{{userInfo.ipaddr}}</span>
- </el-form-item>
- <el-form-item label="">
- <span>
- 金币:{{userInfo.coin}}
- </span>
- <span style="margin-left: 1rem;">
- 余额:{{userInfo.diamondCoin}}
- </span>
- </el-form-item>
- <el-form-item label="">
- <el-tabs v-model="activeName" @tab-click="handleClick" style="width: 100%">
- <el-tab-pane label="上级推荐人列表" name="first">
- <el-table
- :data="superUserList"
- stripe
- style="width: 100%">
- <el-table-column
- prop="userId"
- label="UID">
- </el-table-column>
- <el-table-column
- prop="pid"
- label="上级UID">
- </el-table-column>
- </el-table>
- </el-tab-pane>
- <el-tab-pane label="下级代理人列表" name="nine">
- <el-table
- :data="downUserList"
- stripe
- style="width: 100%">
- <el-table-column
- prop="userId"
- label="UID">
- </el-table-column>
- <el-table-column
- prop="pid"
- label="上级UID">
- </el-table-column>
- </el-table>
- </el-tab-pane>
- <el-tab-pane label="用户待遇" name="second">
- <el-form-item label="">
- <span>
- 直播分红:<el-input
- v-model="appAgentForm.liveRate"
- placeholder="请输入直播分红 "
- style="width: 150px"
- />
- </span><span style="padding-left: 10px">%</span>
- <span style="margin-left: 1rem;">
- 保底分红:<el-input
- v-model="appAgentForm.dividendGuaranteeRate"
- placeholder="请输入分红比例 "
- style="width: 150px"
- />
- </span>
- <span style="padding-left: 10px">%</span>
- <span style="margin-left: 1rem;">
- <el-button type="primary" @click="submitAgentForm">修 改</el-button>
- </span>
- <el-table
- :data="undefined!=userInfo.infoDetail?userInfo.infoDetail.gameCommissionList:[]"
- stripe
- style="width: 100%;margin-top: 10px">
- <el-table-column
- prop="gameName"
- label="游戏">
- </el-table-column>
- <el-table-column
- prop="gameRate"
- label="返佣">
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.gameRate"
- placeholder="请输入游戏返佣比例 "
- style="width: 150px"
- />
- </template>
- </el-table-column>
- <el-table-column fixed="right" label="操作" align="center" width="200" class-name="small-padding fixed-width">
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="submitGameCommissionForm(scope.row)"
- >修 改</el-button>
- </template>
- </el-table-column>
- </el-table>
- </el-form-item>
- </el-tab-pane>
- <el-tab-pane label="同IP登录用户" name="three">
- <el-table
- v-loading="ipLoading"
- :data="ipUserList"
- stripe
- style="width: 100%">
- <el-table-column
- prop="userid"
- label="UID">
- </el-table-column>
- <el-table-column
- prop="username"
- label="昵称">
- </el-table-column>
- <el-table-column
- prop="ipaddr"
- label="最后登录ip">
- </el-table-column>
- </el-table>
- <pagination
- v-show="ipTotal>0"
- :total="ipTotal"
- :page.sync="queryIpParams.pageNum"
- :limit.sync="queryIpParams.pageSize"
- @pagination="getIpList"
- />
- </el-tab-pane>
- <el-tab-pane label="绑定提现账号" name="four">
- <el-table
- :data="accountList"
- v-loading="accountLoading"
- stripe
- style="width: 100%">
- <el-table-column
- prop="uid"
- label="UID">
- </el-table-column>
- <el-table-column label="账号类型" align="center" prop="type">
- <template slot-scope="scope">
- <dict-tag :options="dict.type.app_user_cash_account" :value="scope.row.type"/>
- </template>
- </el-table-column>
- <el-table-column
- prop="account"
- label="账号">
- </el-table-column>
- </el-table>
- <pagination
- v-show="accountTotal>0"
- :total="accountTotal"
- :page.sync="queryAccountParams.pageNum"
- :limit.sync="queryAccountParams.pageSize"
- @pagination="getAccountList"
- />
- </el-tab-pane>
- <el-tab-pane label="兑换记录" name="five">
- <el-table
- :data="orderList"
- v-loading="orderLoading"
- stripe
- style="width: 100%">
- <el-table-column
- prop="uid"
- label="UID">
- </el-table-column>
- <el-table-column
- prop="productNames"
- label="商品">
- </el-table-column>
- <el-table-column label="交易金额(实付金额)" align="center" prop="transactionAmount" />
- <el-table-column label="收货人地址" align="center" prop="address" width="200"/>
- <el-table-column label="订单状态" align="center" prop="status">
- <template slot-scope="scope">
- <dict-tag :options="dict.type.app_goods_order_status" :value="scope.row.status"/>
- </template>
- </el-table-column>
- </el-table>
- <pagination
- v-show="orderTotal>0"
- :total="orderTotal"
- :page.sync="queryOrderParams.pageNum"
- :limit.sync="queryOrderParams.pageSize"
- @pagination="getOrderList"
- />
- </el-tab-pane>
- <el-tab-pane label="直播获得的游戏投注返佣" name="six">
- <el-table
- :data="liveList"
- v-loading="liveLoading"
- stripe
- style="width: 100%">
- <el-table-column
- prop="userId"
- label="UID">
- </el-table-column>
- <el-table-column
- prop="gameName"
- label="游戏">
- </el-table-column>
- <el-table-column label="期号" align="center" prop="gameDate" />
- <el-table-column label="佣金" align="center" prop="commission" />
- </el-table>
- <pagination
- v-show="liveTotal>0"
- :total="liveTotal"
- :page.sync="queryLiveParams.pageNum"
- :limit.sync="queryLiveParams.pageSize"
- @pagination="getLiveList"
- />
- </el-tab-pane>
- <el-tab-pane label="收到的礼物" name="seven">
- <el-table
- :data="giftList"
- v-loading="giftLoading"
- stripe
- style="width: 100%">
- <el-table-column
- prop="fromUid"
- label="UID">
- </el-table-column>
- <el-table-column
- prop="coinChange"
- label="礼物收益">
- </el-table-column>
- <el-table-column
- prop="remarks"
- label="礼物">
- </el-table-column>
- <el-table-column
- prop="createTime"
- label="时间">
- </el-table-column>
- </el-table>
- <pagination
- v-show="giftTotal>0"
- :total="giftTotal"
- :page.sync="queryGiftParams.pageNum"
- :limit.sync="queryGiftParams.pageSize"
- @pagination="getGiftList"
- />
- </el-tab-pane>
- <el-tab-pane label="下注记录" name="eight">
- <el-table
- :data="bettingList"
- v-loading="bettingLoading"
- stripe
- style="width: 100%">
- <el-table-column label="游戏" align="center" prop="gameId">
- <template slot-scope="scope">
- <span>{{ getTypeName(scope.row.gameId) }}</span>
- </template>
- </el-table-column>
- <el-table-column label="用户ID" align="center" prop="userId" />
- <el-table-column label="游戏期号" align="center" prop="gameDate" />
- <el-table-column label="主播ID" align="center" prop="liveUserId" />
- <el-table-column label="直播房间号" align="center" prop="liveRoomId" />
- <el-table-column label="是否直播间投注 " align="center" prop="isLive">
- <template slot-scope="scope">
- <dict-tag :options="dict.type.app_betting_is_live" :value="scope.row.isLive"/>
- </template>
- </el-table-column>
- <el-table-column label="投注类型" align="center" prop="bettingType">
- <template slot-scope="scope">
- <dict-tag :options="dict.type.app_game_betting_type" :value="scope.row.bettingType"/>
- </template>
- </el-table-column>
- <el-table-column label="投注选项" align="center" prop="bettingItem">
- <template slot-scope="scope">
- {{getItemName(scope.row)}}
- </template>
- </el-table-column>
- <el-table-column label="投注选项倍数" align="center" prop="bettingMultiple" />
- <el-table-column label="投注金额" align="center" prop="bettingAmount" />
- <el-table-column label="投注佣金" align="center" prop="bettingCommission" />
- <el-table-column label="是否中奖" align="center" prop="isWinning">
- <template slot-scope="scope">
- <dict-tag :options="dict.type.app_game_betting_winning" :value="scope.row.isWinning"/>
- </template>
- </el-table-column>
- </el-table>
- <pagination
- v-show="bettingTotal>0"
- :total="bettingTotal"
- :page.sync="queryBettingParams.pageNum"
- :limit.sync="queryBettingParams.pageSize"
- @pagination="getBettingList"
- />
- </el-tab-pane>
- </el-tabs>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="cancel">关闭</el-button>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import { listUser, getUser, delUser, addUser, updateUser,resetUser,userCharge,channelList,withdraw,openLive,userDetail,liveCommission,getGift,updateUserAgent,updateGameCommissionAgent } from "@/api/business/user";
- import { listAccount} from "@/api/business/account";
- import { listOrder } from "@/api/business/order";
- import { listBetting} from "@/api/business/betting";
- import {allGameList } from "@/api/business/game_item";
- import {allList} from "@/api/business/lottery";
- export default {
- name: "User",
- dicts: ['is_anchor_auth', 'app_user_role', 'app_user_status', 'app_user_online_status','app_user_coin_type','app_charge_rate','app_goods_order_status','app_betting_is_live','app_game_betting_type','app_game_betting_winning','app_user_cash_account'],
- data() {
- return {
- activeName:"first",
- // 遮罩层
- loading: true,
- ipLoading: true,
- accountLoading: true,
- orderLoading: true,
- liveLoading: true,
- giftLoading: true,
- bettingLoading: true,
- // 选中数组
- ids: [],
- // 非单个禁用
- single: true,
- // 非多个禁用
- multiple: true,
- // 显示搜索条件
- showSearch: true,
- // 总条数
- total: 0,
- ipTotal: 0,
- accountTotal: 0,
- orderTotal: 0,
- liveTotal: 0,
- giftTotal: 0,
- bettingTotal: 0,
- // app用户表格数据
- userList: [],
- ipUserList: [],
- accountList: [],
- orderList: [],
- liveList: [],
- giftList: [],
- bettingList: [],
- // 弹出层标题
- title: "",
- // 是否显示弹出层
- open: false,
- // 是否显示弹出层
- resetPwdopen: false,
- // 是否显示弹出层
- resetWithdrawopen: false,
- // 是否显示弹出层
- chargeopen: false,
- channelList:[],
- isReadOnly:true,
- rate:null,
- channelMap:{},
- liveLive:{},
- liveOpen:false,
- superOpen:false,
- userInfo:{},
- closeMsg:null,
- superUserList:[],
- downUserList:[],
- typeMap:{},
- typeList:[],
- gameItemMap:{},
- gameItemList:[],
- gameItemShowList:[],
- appAgentForm:{
- liveRate:null,
- dividendGuaranteeRate:null,
- userId:null
- },
- appGameCommissionForm:{
- id:null,
- gameId:null,
- userId:null,
- pid:null,
- gameRate:null,
- gameName:null
- },
- queryIpParams: {
- pageNum: 1,
- pageSize: 10,
- ipaddr: null,
- },
- queryAccountParams: {
- pageNum: 1,
- pageSize: 10,
- uid: null,
- },
- queryOrderParams: {
- pageNum: 1,
- pageSize: 10,
- uid: null,
- },
- queryLiveParams: {
- pageNum: 1,
- pageSize: 10,
- userId: null,
- },
- queryGiftParams: {
- pageNum: 1,
- pageSize: 10,
- userId: null,
- },
- queryBettingParams: {
- pageNum: 1,
- pageSize: 10,
- userId: null,
- },
- // 查询参数
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- userid: null,
- anchorGrade: null,
- anchorPoint: null,
- appVersion: null,
- appVersionCode: null,
- avatar: null,
- awardLoginDay: null,
- birthday: null,
- charmGrade: null,
- charmPoint: null,
- coin: null,
- coinCash: null,
- consumption: null,
- createTime: null,
- ipaddr: null,
- isAnchorAuth: null,
- nickname: null,
- onlineStatus: null,
- phoneFirm: null,
- phoneModel: null,
- phoneSystem: null,
- phoneUuid: null,
- pid: null,
- role: null,
- diamondCoin: null,
- mobile:null,
- },
- // 表单参数
- form: {},
- //重置密码
- resetPwdForm:{},
- //补足流水
- resetWithdrawForm:{},
- //充值
- chargeForm:{},
- // 表单校验
- rules: {
- level: [
- { required: true, message: "不能为空", trigger: "blur" }
- ],
- },
- resetPwdRules: {
- password: [
- { required: true, message: "密码不能为空", trigger: "blur" }
- ],
- },
- chargeRules: {
- amount: [
- { required: true, message: "金额不能为空", trigger: "blur" }
- ],
- type: [
- { required: true, message: "类型不能为空", trigger: "blur" }
- ],
- isRate: [
- { required: true, message: "请选择是否扣除手续费", trigger: "blur" }
- ]
- },
- withdrawRules: {
- amount: [
- { required: true, message: "金额不能为空", trigger: "blur" }
- ]
- },
- scrollLeft: 0
- };
- },
- created() {
- let that = this;
- allList().then(response => {
- if(response.data){
- for(var i in response.data){
- var item = response.data[i];
- that.gameItemMap[item.itemLocation.toString() + "_" + item.gameId] = item.itemName;
- that.gameItemList.push({
- value:item.itemLocation+"_"+item.gameId,
- label:item.itemName,
- gameId:item.gameId
- })
- }
- }
- });
- allGameList().then(response => {
- if(response.data){
- for(var i in response.data){
- var item = response.data[i];
- that.typeMap[item.id.toString()] = item.name;
- that.typeList.push({
- value:item.id,
- label:item.name
- })
- }
- }
- that.getList();
- });
- },
- computed: {
- currentRules:function(){
- if(this.chargeForm.isRate == 1){
- this.chargeRules["channelId"] = [
- { required: true, message: "请选择充值渠道", trigger: "blur" }
- ];
- }else{
- delete this.chargeRules["channelId"]
- }
- return this.chargeRules;
- },
- },
- methods: {
- getItemName(row){
- let that = this;
- let bettingGameType = row.bettingGameType;
- let bettingItem = row.bettingItem;
- let gameId = row.gameId;
- if("0" == bettingGameType){
- return that.gameItemMap[bettingItem+"_"+gameId];
- }else{
- let name = "";
- let arr = JSON.parse(bettingItem);
- for(var i in arr){
- let item = arr[i];
- if("" != name){
- name = name + ",";
- }
- name = name + that.gameItemMap[item["bettingItem"]+"_"+gameId];
- }
- return name;
- }
- },
- getTypeName(id) {
- return this.typeMap[id.toString()];
- },
- /** 查询app用户列表 */
- getList() {
- this.loading = true;
- listUser(this.queryParams).then(response => {
- this.userList = response.rows;
- this.total = response.total;
- this.loading = false;
- });
- },
- /** 查询同ip app用户列表 */
- getIpList() {
- this.ipLoading = true;
- this.queryIpParams.ipaddr = this.userInfo.ipaddr;
- listUser(this.queryIpParams).then(response => {
- this.ipUserList = response.rows;
- this.ipTotal = response.total;
- this.ipLoading = false;
- });
- },
- /** 查询提现账号列表 */
- getAccountList() {
- this.accountLoading = true;
- this.queryAccountParams.uid = this.userInfo.userid;
- listAccount(this.queryAccountParams).then(response => {
- this.accountList = response.rows;
- this.accountTotal = response.total;
- this.accountLoading = false;
- });
- },
- /** 查询兑换列表 */
- getOrderList() {
- this.orderLoading = true;
- this.queryOrderParams.uid = this.userInfo.userid;
- listOrder(this.queryOrderParams).then(response => {
- this.orderList = response.rows;
- this.orderTotal = response.total;
- this.orderLoading = false;
- });
- },
- /** 查询兑换列表 */
- getLiveList() {
- this.liveLoading = true;
- this.queryLiveParams.userId = this.userInfo.userid;
- liveCommission(this.queryLiveParams).then(response => {
- this.liveList = response.rows;
- this.liveTotal = response.total;
- this.liveLoading = false;
- });
- },
- /** 查询礼物列表 */
- getGiftList() {
- this.giftLoading = true;
- this.queryGiftParams.userId = this.userInfo.userid;
- getGift(this.queryGiftParams).then(response => {
- this.giftList = response.rows;
- this.giftTotal = response.total;
- this.giftLoading = false;
- });
- },
- /** 查询下注记录 */
- getBettingList() {
- this.bettingLoading = true;
- this.queryBettingParams.userId = this.userInfo.userid;
- listBetting(this.queryBettingParams).then(response => {
- this.bettingList = response.rows;
- this.bettingTotal = response.total;
- this.bettingLoading = false;
- });
- },
- // 取消按钮
- cancel() {
- this.open = false;
- this.resetPwdopen = false;
- this.chargeopen = false;
- this.resetWithdrawopen = false;
- this.liveOpen = false;
- this.superOpen = false;
- this.reset();
- this.resetPwd();
- this.resetCharge();
- this.resetWithdraw();
- },
- // 表单重置
- reset() {
- this.form = {
- userid: null,
- address: null,
- agentId: null,
- amount: null,
- anchorGrade: null,
- anchorPoint: null,
- appVersion: null,
- appVersionCode: null,
- avatar: null,
- awardLoginDay: null,
- birthday: null,
- broadCast: null,
- channelId: null,
- chargeShow: null,
- charmGrade: null,
- charmPoint: null,
- city: null,
- cityEdit: null,
- coin: null,
- coinCash: null,
- constellation: null,
- consumption: null,
- createTime: null,
- dealScalePlan: null,
- delFlag: null,
- deviceId: null,
- devoteShow: null,
- giftGlobalBroadcast: null,
- goodnum: null,
- groupId: null,
- gsRoomId: null,
- gsRoomType: null,
- guildId: null,
- headNo: null,
- height: null,
- hideDistance: null,
- inviteCode: null,
- bindCode: null,
- ipaddr: null,
- isAnchorAuth: null,
- isAutomatic: null,
- isJoinJg: null,
- isLiveAccount: null,
- isNotDisturb: null,
- isOooAccount: null,
- isPush: null,
- isRecommend: null,
- isShowHomePage: null,
- isSvip: null,
- isTone: null,
- isYouthModel: null,
- ishot: null,
- isrecord: null,
- issuper: null,
- iszombie: null,
- iszombiep: null,
- joinRoomShow: null,
- kickTime: null,
- lastGameNum: null,
- lastLoginDay: null,
- lastLoginIp: null,
- lastLoginTime: null,
- lastOffLineTime: null,
- lat: null,
- level: null,
- liveFunction: null,
- liveStatus: null,
- liveThumb: null,
- liveThumbs: null,
- lng: null,
- lockReason: null,
- lockTime: null,
- loginType: null,
- managerCoId: null,
- managerId: null,
- maxSignCount: null,
- mobile: null,
- nickname: null,
- nobleGrade: null,
- onlineStatus: null,
- oooHomePageSortNo: null,
- oooLiveStatus: null,
- oooTwoClassifyId: null,
- openLiveZombieNum: null,
- openid: null,
- optUserName: null,
- password: null,
- phoneFirm: null,
- phoneModel: null,
- phoneSystem: null,
- phoneUuid: null,
- pid: null,
- portrait: null,
- poster: null,
- province: null,
- pushPlatform: null,
- pushRegisterId: null,
- readShortVideoNumber: null,
- regType: null,
- registerIp: null,
- role: null,
- roomId: null,
- roomTitle: null,
- roomType: null,
- roomTypeVal: null,
- salt: null,
- sanwei: null,
- score: null,
- sex: null,
- signCount: null,
- signTime: null,
- signature: null,
- smsRegion: null,
- source: null,
- starId: null,
- status: null,
- totalAmount: null,
- totalAmountCash: null,
- totalCash: null,
- totalCharge: null,
- unionid: null,
- updatePwdTime: null,
- userActivationKey: null,
- userEmail: null,
- userGrade: null,
- userPoint: null,
- userSetOnlineStatus: null,
- userType: null,
- userUrl: null,
- username: null,
- video: null,
- videoCoin: null,
- videoImg: null,
- vocation: null,
- voice: null,
- voiceCoin: null,
- voiceStatus: null,
- voipToken: null,
- votes: null,
- votestotal: null,
- wealthGrade: null,
- wechat: null,
- weight: null,
- whetherEnablePositioningShow: null,
- youthPassword: null,
- zombieMaxNum: null,
- zombieRatio: null,
- agentGrade: null,
- liveDividedInto: null,
- gameDividedInto: null,
- inviteBindTime: null,
- fundPassword: null,
- diamondCoin: null,
- diamondCoinTotal: null,
- diamondCoinCashTotal: null,
- agentFlag: null,
- diamondCoinCash: null,
- otherPid: null
- };
- this.resetForm("form");
- },// 表单重置
- resetPwd() {
- this.resetPwdForm = {
- userId: null,
- password: null
- };
- this.resetForm("restPwdForm");
- },// 表单重置
- resetWithdraw() {
- this.resetWithdrawForm = {
- userId: null,
- amount: null
- };
- this.resetForm("restWithdraoForm");
- },// 表单重置
- resetCharge() {
- this.chargeForm = {
- userId: null,
- amount: null,
- type:null,
- isRate:null,
- rate:null,
- channelId:null
- };
- this.resetForm("restPwdForm");
- },
- /** 搜索按钮操作 */
- handleQuery() {
- this.queryParams.pageNum = 1;
- this.getList();
- },
- /** 重置按钮操作 */
- resetQuery() {
- this.resetForm("queryForm");
- this.handleQuery();
- },
- // 多选框选中数据
- handleSelectionChange(selection) {
- this.ids = selection.map(item => item.userid)
- this.single = selection.length!==1
- this.multiple = !selection.length
- },
- /** 新增按钮操作 */
- handleAdd() {
- this.reset();
- this.open = true;
- this.title = "添加app用户";
- },
- /** 修改按钮操作 */
- handleUpdate(row) {
- this.reset();
- const userid = row.userid || this.ids
- getUser(userid).then(response => {
- this.form = response.data;
- this.open = true;
- this.title = "修改app用户";
- });
- },
- handleLive(row){
- this.liveLive = row.liveLive;
- this.title = row.liveLive.islive==1?"关播":"虚拟开播";
- this.liveOpen = true;
- this.closeMsg = null;
- },
- /** 重置密码按钮操作 */
- handleRestPwd(row) {
- this.resetPwd();
- const userid = row.userid;
- this.resetPwdForm = {
- userId:userid,
- password:""
- };
- this.resetPwdopen = true;
- this.title = "重置密码";
- },
- /** 补足流水按钮操作 */
- handleWithdraw(row) {
- this.resetWithdraw();
- const userid = row.userid;
- this.resetWithdrawForm = {
- userId:userid,
- password:""
- };
- this.resetWithdrawopen = true;
- this.title = "补足提现流水";
- },
- /** 充值按钮操作 */
- handleCharge(row) {
- var that = this;
- that.channelList = [];
- that.channelMap = {};
- channelList().then(response => {
- if(response.data){
- for(var i in response.data){
- var item = response.data[i];
- that.channelMap[item.id] = item.rate;
- that.channelList.push({
- value:item.id,
- label:item.name,
- rate:item.rate
- })
- }
- }
- });
- this.resetCharge();
- const userid = row.userid;
- this.chargeForm = {
- userId:userid,
- type: null,
- amount:null
- };
- this.chargeopen = true;
- this.title = "充值";
- /*this.$nextTick(()=>{
- // 重置当前页面的所有字段值
- this.$refs['chargeForm'].resetFields();
- if (data){
- // 模式1
- this.form.patternType = 1;
- }else{
- // 模式2
- this.form.patternType = 2;
- }
- // 设置校验规则
- this.setValidRules(this.form.patternType);
- })*/
- },
- /** 提交按钮 */
- submitForm() {
- this.$refs["form"].validate(valid => {
- if (valid) {
- if (this.form.userid != null) {
- updateUser(this.form).then(response => {
- this.$modal.msgSuccess("修改成功");
- this.open = false;
- this.getList();
- });
- } else {
- addUser(this.form).then(response => {
- this.$modal.msgSuccess("新增成功");
- this.open = false;
- this.getList();
- });
- }
- }
- });
- },
- /** 重置密码提交按钮 */
- submitResetPwdForm() {
- this.$refs["resetPwdForm"].validate(valid => {
- if (valid) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- });
- setTimeout(function (){loading.close();},1000);
- resetUser(this.resetPwdForm).then(response => {
- this.$modal.msgSuccess("修改成功");
- this.resetPwdopen = false;
- this.getList();
- loading.close();
- });
- }
- });
- },
- /** 补足流水提交按钮 */
- submitWithdrawForm() {
- var that =this;
- this.$refs["withdrawForm"].validate(valid => {
- if (valid) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- });
- setTimeout(function (){loading.close();},1000);
- withdraw(this.resetWithdrawForm).then(response => {
- this.$modal.msgSuccess("补足流水成功");
- this.resetWithdrawopen = false;
- this.getList();
- loading.close();
- });
- }
- });
- },
- /** 充值提交按钮 */
- submitChargeForm() {
- var that =this;
- this.$refs["chargeForm"].validate(valid => {
- if (valid) {
- if(that.chargeForm.isRate != 1){
- that.chargeForm.rate = null;
- }
- if(that.chargeForm.channelId == -1 && (undefined == that.chargeForm.rate || null == that.chargeForm.rate)){
- this.$modal.msgError("请输入手续费比例");
- return;
- }
- if(that.chargeForm.channelId == -1 && that.chargeForm.rate >= 1){
- this.$modal.msgError("手续费比例超过最大值");
- return;
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- });
- setTimeout(function (){loading.close();},1000);
- userCharge(this.chargeForm).then(response => {
- this.$modal.msgSuccess("修改成功");
- this.chargeopen = false;
- this.getList();
- loading.close();
- });
- }
- });
- },
- /** 开关播提交按钮 */
- submitLiveForm() {
- var that =this;
- this.liveLive["title"] = this.closeMsg;
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- });
- setTimeout(function (){loading.close();},1000);
- openLive(this.liveLive).then(response => {
- that.liveOpen = false;
- setTimeout(function (){
- that.getList();
- },4000);
- if(this.liveLive.islive!=1){
- that.$alert(response["msg"], '开播成功', {
- confirmButtonText: '确定',
- callback: action => {
- /*this.$message({
- type: 'info',
- message: `action: ${ action }`
- });*/
- }
- });
- }else{
- that.$modal.msgSuccess(this.liveLive.islive==1?"关播":"虚拟开播"+"成功");
- }
- loading.close();
- });
- },
- /** 代理待遇提交按钮 */
- submitAgentForm() {
- var that =this;
- if(!that.appAgentForm.liveRate){
- that.$modal.msgError("直播分红不能为空!");
- return;
- }
- if(!that.appAgentForm.dividendGuaranteeRate){
- that.$modal.msgError("保底分红不能为空!");
- return;
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- });
- setTimeout(function (){loading.close();},1000);
- updateUserAgent(this.appAgentForm).then(response => {
- that.$modal.msgSuccess("修改成功");
- that.getList();
- loading.close();
- });
- },
- /** 代理游戏待遇提交按钮 */
- submitGameCommissionForm(row) {
- var that =this;
- that.appGameCommissionForm = row;
- if(!that.appGameCommissionForm.gameRate){
- that.$modal.msgError("游戏返佣比例不能为空!");
- return;
- }
- if(!that.appGameCommissionForm.gameRate){
- that.$modal.msgError("游戏返佣不能为空!");
- return;
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- });
- setTimeout(function (){loading.close();},1000);
- updateGameCommissionAgent(this.appGameCommissionForm).then(response => {
- that.getList();
- that.$modal.msgSuccess("修改成功");
- loading.close();
- });
- },
- /** 删除按钮操作 */
- handleDelete(row) {
- const userids = row.userid || this.ids;
- this.$modal.confirm('是否确认删除app用户编号为"' + userids + '"的数据项?').then(function() {
- return delUser(userids);
- }).then(() => {
- this.getList();
- this.$modal.msgSuccess("删除成功");
- }).catch(() => {});
- },
- /** 导出按钮操作 */
- handleExport() {
- this.download('business/user/export', {
- ...this.queryParams
- }, `user_${new Date().getTime()}.xlsx`)
- },
- handleScroll(event) {
- // 当滚动时同步左右滚动
- this.scrollLeft = event.target.scrollLeft;
- },
- isRateChange(val){
- let rule = {};
- for(var i in this.chargeRules){
- rule[i] = this.chargeRules[i];
- }
- this.chargeRules = {};
- if(this.chargeForm.isRate == 1){
- rule["channelId"] = [
- { required: true, message: "请选择充值渠道", trigger: "blur" }
- ];
- /*rule["rate"] = [
- { required: true, message: "请输入手续费比例", trigger: "blur" }
- ];*/
- }else{
- delete rule["channelId"];
- // delete rule["rate"];
- }
- this.chargeRules = rule;
- },
- chargeChannel(val){
- let rule = {};
- for(var i in this.chargeRules){
- rule[i] = this.chargeRules[i];
- }
- this.chargeRules = {};
- if(this.chargeForm.channelId == -1){
- /*this.chargeForm.rate = null;
- rule["rate"] = [
- { required: true, message: "请输入手续费比例", trigger: "blur" }
- ];*/
- this.isReadOnly = false;
- this.rate = null;
- }else{
- let rate = this.channelMap[this.chargeForm.channelId];
- this.chargeForm.rate = rate;
- // delete rule["rate"];
- this.isReadOnly = true;
- this.rate = rate;
- }
- // this.chargeRules = rule;
- },
- getUserDetail(row){
- let that = this;
- that.title = "用户详情"
- that.activeName = "first";
- that.userInfo = row;
- that.userInfo["infoDetail"] = {};
- userDetail({"userId":row.userid}).then(response => {
- that.superUserList = response.data.superUserList;
- that.downUserList = response.data.downUserList;
- that.userInfo["infoDetail"] = response.data;
- that.superOpen = true;
- that.appAgentForm["dividendGuaranteeRate"] = undefined!=that.userInfo.infoDetail?that.userInfo.infoDetail.dividendGuaranteeRate:0.00;
- that.appAgentForm["liveRate"] = undefined!=that.userInfo.infoDetail?that.userInfo.infoDetail.liveRate:0.00;
- that.appAgentForm["userId"] = that.userInfo.infoDetail.userId;
- });
- },
- handleClick(tab, event) {
- if("three" == tab.$options.propsData.name){
- this.getIpList();
- }
- if("four" == tab.$options.propsData.name){
- this.getAccountList();
- }
- if("five" == tab.$options.propsData.name){
- this.getOrderList();
- }
- if("six" == tab.$options.propsData.name){
- this.getLiveList();
- }
- if("seven" == tab.$options.propsData.name){
- this.getGiftList();
- }
- if("eight" == tab.$options.propsData.name){
- this.getBettingList();
- }
- }
- }
- };
- </script>
- <style scoped>
- </style>
|