index.vue 59 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
  4. <el-form-item label="UID" prop="userid">
  5. <el-input
  6. v-model="queryParams.userid"
  7. placeholder="请输入UID"
  8. clearable
  9. @keyup.enter.native="handleQuery"
  10. />
  11. </el-form-item>
  12. <el-form-item label="昵称 " prop="nickname">
  13. <el-input
  14. v-model="queryParams.nickname"
  15. placeholder="请输入昵称 "
  16. clearable
  17. @keyup.enter.native="handleQuery"
  18. />
  19. </el-form-item>
  20. <el-form-item label="手机号" prop="mobile">
  21. <el-input
  22. v-model="queryParams.mobile"
  23. placeholder="请输入手机号 "
  24. clearable
  25. @keyup.enter.native="handleQuery"
  26. />
  27. </el-form-item>
  28. <el-form-item label="登录ip地址" prop="ipaddr">
  29. <el-input
  30. v-model="queryParams.ipaddr"
  31. placeholder="请输入手机号 "
  32. clearable
  33. @keyup.enter.native="handleQuery"
  34. />
  35. </el-form-item>
  36. <el-form-item label="在线状态" prop="onlineStatus">
  37. <el-select v-model="queryParams.onlineStatus" placeholder="请选择" clearable>
  38. <el-option
  39. v-for="dict in dict.type.app_user_online_status"
  40. :key="dict.value"
  41. :label="dict.label"
  42. :value="dict.value"
  43. />
  44. </el-select>
  45. </el-form-item>
  46. <br>
  47. <el-form-item label="直属上级" prop="pid">
  48. <el-input
  49. v-model="queryParams.pid"
  50. placeholder="请输入直属上级"
  51. clearable
  52. @keyup.enter.native="handleQuery"
  53. />
  54. </el-form-item>
  55. <el-form-item label="用户身份" prop="role">
  56. <el-select v-model="queryParams.role" placeholder="请选择用户身份" clearable>
  57. <el-option
  58. v-for="dict in dict.type.app_user_role"
  59. :key="dict.value"
  60. :label="dict.label"
  61. :value="dict.value"
  62. />
  63. </el-select>
  64. </el-form-item>
  65. <el-form-item>
  66. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  67. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  68. </el-form-item>
  69. </el-form>
  70. <el-row :gutter="10" class="mb8">
  71. <el-col :span="1.5">
  72. <el-button
  73. type="primary"
  74. plain
  75. icon="el-icon-plus"
  76. size="mini"
  77. @click="handleAdd"
  78. v-hasPermi="['business:user:add']"
  79. >新增</el-button>
  80. </el-col>
  81. <el-col :span="1.5">
  82. <el-button
  83. type="success"
  84. plain
  85. icon="el-icon-edit"
  86. size="mini"
  87. :disabled="single"
  88. @click="handleUpdate"
  89. v-hasPermi="['business:user:edit']"
  90. >修改</el-button>
  91. </el-col>
  92. <el-col :span="1.5">
  93. <el-button
  94. type="danger"
  95. plain
  96. icon="el-icon-delete"
  97. size="mini"
  98. :disabled="multiple"
  99. @click="handleDelete"
  100. v-hasPermi="['business:user:remove']"
  101. >删除</el-button>
  102. </el-col>
  103. <el-col :span="1.5">
  104. <el-button
  105. type="warning"
  106. plain
  107. icon="el-icon-download"
  108. size="mini"
  109. @click="handleExport"
  110. v-hasPermi="['business:user:export']"
  111. >导出</el-button>
  112. </el-col>
  113. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  114. </el-row>
  115. <el-table v-loading="loading" :data="userList" style="width: 100%" @scroll="handleScroll" @selection-change="handleSelectionChange">
  116. <el-table-column type="selection" width="55" align="center" />
  117. <el-table-column fixed label="UID" align="center" prop="userid" />
  118. <el-table-column fixed label="昵称 " align="center" prop="username" width="200"/>
  119. <el-table-column label="头像" align="center" prop="avatar" width="100">
  120. <template slot-scope="scope">
  121. <image-preview :src="scope.row.avatar" :width="50" :height="50"/>
  122. </template>
  123. </el-table-column>
  124. <el-table-column label="金币" align="center" prop="coin" width="150"/>
  125. <el-table-column label="余额" align="center" prop="diamondCoin" width="150"/>
  126. <el-table-column label="手机号" align="center" prop="mobile" width="150"/>
  127. <el-table-column label="最近一次登录ip" align="center" prop="ipaddr" width="150"/>
  128. <el-table-column label=" 上次登录时间" align="center" prop="lastLoginTime" width="180">
  129. <template slot-scope="scope">
  130. <span>{{ parseTime(scope.row.lastLoginTime, '{y}-{m}-{d}') }}</span>
  131. </template>
  132. </el-table-column>
  133. <el-table-column label="最大连续签到天数" align="center" prop="maxSignCount" />
  134. <el-table-column label="主播等级" align="center" prop="anchorGrade" />
  135. <el-table-column label="主播积分" align="center" prop="anchorPoint" />
  136. <el-table-column label="连续登录天数" align="center" prop="awardLoginDay" />
  137. <el-table-column label="魅力等级" align="center" prop="charmGrade" />
  138. <el-table-column label="魅力积分" align="center" prop="charmPoint" />
  139. <el-table-column label="可兑换" align="center" prop="coinCash" />
  140. <el-table-column label="消费总额(财富积分)" align="center" prop="consumption" width="150"/>
  141. <el-table-column label="注册时间" align="center" prop="createTime" width="180">
  142. <template slot-scope="scope">
  143. <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
  144. </template>
  145. </el-table-column>
  146. <el-table-column label="邀请码" align="center" prop="inviteCode" />
  147. <el-table-column label="主播是否认证" align="center" prop="isAnchorAuth">
  148. <template slot-scope="scope">
  149. <dict-tag :options="dict.type.is_anchor_auth" :value="scope.row.isAnchorAuth"/>
  150. </template>
  151. </el-table-column>
  152. <!-- <el-table-column label="最后登录ip" align="center" prop="lastLoginIp" />-->
  153. <el-table-column label=" 离线时间" align="center" prop="lastOffLineTime" width="180">
  154. <template slot-scope="scope">
  155. <span>{{ parseTime(scope.row.lastOffLineTime, '{y}-{m}-{d}') }}</span>
  156. </template>
  157. </el-table-column>
  158. <el-table-column label="用户在线状态" align="center" prop="onlineStatus">
  159. <template slot-scope="scope">
  160. <dict-tag :options="dict.type.app_user_online_status" :value="scope.row.onlineStatus"/>
  161. </template>
  162. </el-table-column>
  163. <el-table-column label="手机厂商" align="center" prop="phoneFirm" />
  164. <el-table-column label="手机型号" align="center" prop="phoneModel" />
  165. <el-table-column label="直属上级" align="center" prop="pid" />
  166. <el-table-column label="用户身份" align="center" prop="role">
  167. <template slot-scope="scope">
  168. <dict-tag :options="dict.type.app_user_role" :value="scope.row.role"/>
  169. </template>
  170. </el-table-column>
  171. <el-table-column label="连续签到次数" align="center" prop="signCount" />
  172. <el-table-column label="上次签到时间" align="center" prop="signTime" width="180">
  173. <template slot-scope="scope">
  174. <span>{{ parseTime(scope.row.signTime, '{y}-{m}-{d}') }}</span>
  175. </template>
  176. </el-table-column>
  177. <el-table-column label="手机号区域" align="center" prop="smsRegion" />
  178. <el-table-column label="用户状态" align="center" prop="status">
  179. <template slot-scope="scope">
  180. <dict-tag :options="dict.type.app_user_status" :value="scope.row.status"/>
  181. </template>
  182. </el-table-column>
  183. <el-table-column fixed="right" label="操作" align="center" width="200" class-name="small-padding fixed-width">
  184. <template slot-scope="scope">
  185. <el-button
  186. size="mini"
  187. type="text"
  188. icon="el-icon-edit"
  189. v-if="scope.row.role == 1 && scope.row.liveLive"
  190. @click="handleLive(scope.row)"
  191. >{{scope.row.liveLive.islive==1?'关播':'虚拟开播'}}</el-button>
  192. <el-button
  193. size="mini"
  194. type="text"
  195. icon="el-icon-edit"
  196. @click="getUserDetail(scope.row)"
  197. >查看详情</el-button>
  198. <el-button
  199. size="mini"
  200. type="text"
  201. icon="el-icon-edit"
  202. @click="handleRestPwd(scope.row)"
  203. >重置密码</el-button>
  204. <el-button
  205. size="mini"
  206. type="text"
  207. icon="el-icon-bank-card"
  208. @click="handleCharge(scope.row)"
  209. >充值</el-button>
  210. <el-button
  211. size="mini"
  212. type="text"
  213. icon="el-icon-edit"
  214. @click="handleWithdraw(scope.row)"
  215. >补足提现流水</el-button>
  216. <el-button
  217. size="mini"
  218. type="text"
  219. icon="el-icon-edit"
  220. @click="handleUpdate(scope.row)"
  221. v-hasPermi="['business:user:edit']"
  222. >修改</el-button>
  223. <el-button
  224. size="mini"
  225. type="text"
  226. icon="el-icon-delete"
  227. @click="handleDelete(scope.row)"
  228. v-hasPermi="['business:user:remove']"
  229. >删除</el-button>
  230. </template>
  231. </el-table-column>
  232. </el-table>
  233. <pagination
  234. v-show="total>0"
  235. :total="total"
  236. :page.sync="queryParams.pageNum"
  237. :limit.sync="queryParams.pageSize"
  238. @pagination="getList"
  239. />
  240. <!-- 添加或修改app用户对话框 -->
  241. <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
  242. <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  243. <el-form-item label="当前版本号" prop="appVersion">
  244. <el-input v-model="form.appVersion" placeholder="请输入当前版本号" />
  245. </el-form-item>
  246. <el-form-item label="当前版本code" prop="appVersionCode">
  247. <el-input v-model="form.appVersionCode" placeholder="请输入当前版本code" />
  248. </el-form-item>
  249. <el-form-item label="用户头像" prop="avatar">
  250. <image-upload v-model="form.avatar"/>
  251. </el-form-item>
  252. <el-form-item label="连续登录天数" prop="awardLoginDay">
  253. <el-input v-model="form.awardLoginDay" placeholder="请输入连续登录天数" />
  254. </el-form-item>
  255. <el-form-item label="生日" prop="birthday">
  256. <el-input v-model="form.birthday" placeholder="请输入生日" />
  257. </el-form-item>
  258. <el-form-item label="魅力等级" prop="charmGrade">
  259. <el-input v-model="form.charmGrade" placeholder="请输入魅力等级" />
  260. </el-form-item>
  261. <el-form-item label="魅力积分" prop="charmPoint">
  262. <el-input v-model="form.charmPoint" placeholder="请输入魅力积分" />
  263. </el-form-item>
  264. <el-form-item label="金币 /充值金额" prop="coin">
  265. <el-input v-model="form.coin" placeholder="请输入金币 /充值金额" />
  266. </el-form-item>
  267. <el-form-item label="可兑换" prop="coinCash">
  268. <el-input v-model="form.coinCash" placeholder="请输入可兑换" />
  269. </el-form-item>
  270. <el-form-item label="消费总额(财富积分)" prop="consumption">
  271. <el-input v-model="form.consumption" placeholder="请输入消费总额(财富积分)" />
  272. </el-form-item>
  273. <el-form-item label="邀请码" prop="inviteCode">
  274. <el-input v-model="form.inviteCode" type="textarea" placeholder="请输入内容" />
  275. </el-form-item>
  276. <el-form-item label=" 用户当前的位置信息ID" prop="ipaddr">
  277. <el-input v-model="form.ipaddr" placeholder="请输入 用户当前的位置信息ID" />
  278. </el-form-item>
  279. <el-form-item label="主播是否认证 0:未认证 1:已认证 后台添加主播时,如果是认证状态, 需要添加认证记录" prop="isAnchorAuth">
  280. <el-select v-model="form.isAnchorAuth" placeholder="请选择主播是否认证 0:未认证 1:已认证 后台添加主播时,如果是认证状态, 需要添加认证记录">
  281. <el-option
  282. v-for="dict in dict.type.is_anchor_auth"
  283. :key="dict.value"
  284. :label="dict.label"
  285. :value="parseInt(dict.value)"
  286. ></el-option>
  287. </el-select>
  288. </el-form-item>
  289. <el-form-item label="上次登录时间(连续登录用)" prop="lastLoginDay">
  290. <el-date-picker clearable
  291. v-model="form.lastLoginDay"
  292. type="date"
  293. value-format="yyyy-MM-dd"
  294. placeholder="请选择上次登录时间(连续登录用)">
  295. </el-date-picker>
  296. </el-form-item>
  297. <el-form-item label="最后登录ip" prop="lastLoginIp">
  298. <el-input v-model="form.lastLoginIp" placeholder="请输入最后登录ip" />
  299. </el-form-item>
  300. <el-form-item label=" 上次登录时间" prop="lastLoginTime">
  301. <el-date-picker clearable
  302. v-model="form.lastLoginTime"
  303. type="date"
  304. value-format="yyyy-MM-dd"
  305. placeholder="请选择 上次登录时间">
  306. </el-date-picker>
  307. </el-form-item>
  308. <el-form-item label=" 离线时间" prop="lastOffLineTime">
  309. <el-date-picker clearable
  310. v-model="form.lastOffLineTime"
  311. type="date"
  312. value-format="yyyy-MM-dd"
  313. placeholder="请选择 离线时间">
  314. </el-date-picker>
  315. </el-form-item>
  316. <el-form-item label="最大连续签到天数" prop="maxSignCount">
  317. <el-input v-model="form.maxSignCount" placeholder="请输入最大连续签到天数" />
  318. </el-form-item>
  319. <el-form-item label=" 手机号" prop="mobile">
  320. <el-input v-model="form.mobile" placeholder="请输入 手机号" />
  321. </el-form-item>
  322. <el-form-item label="昵称 " prop="nickname">
  323. <el-input v-model="form.nickname" placeholder="请输入昵称 " />
  324. </el-form-item>
  325. <el-form-item label="用户在线状态 0:离线 1:在线" prop="onlineStatus">
  326. <el-select v-model="form.onlineStatus" placeholder="请选择用户在线状态 0:离线 1:在线">
  327. <el-option
  328. v-for="dict in dict.type.app_user_online_status"
  329. :key="dict.value"
  330. :label="dict.label"
  331. :value="parseInt(dict.value)"
  332. ></el-option>
  333. </el-select>
  334. </el-form-item>
  335. <el-form-item label="手机厂商" prop="phoneFirm">
  336. <el-input v-model="form.phoneFirm" placeholder="请输入手机厂商" />
  337. </el-form-item>
  338. <el-form-item label="手机型号" prop="phoneModel">
  339. <el-input v-model="form.phoneModel" placeholder="请输入手机型号" />
  340. </el-form-item>
  341. <el-form-item label="手机系统" prop="phoneSystem">
  342. <el-input v-model="form.phoneSystem" placeholder="请输入手机系统" />
  343. </el-form-item>
  344. <el-form-item label="手机唯一标识" prop="phoneUuid">
  345. <el-input v-model="form.phoneUuid" placeholder="请输入手机唯一标识" />
  346. </el-form-item>
  347. <el-form-item label="直属上级" prop="pid">
  348. <el-input v-model="form.pid" placeholder="请输入直属上级" />
  349. </el-form-item>
  350. <el-form-item label="用户身份" prop="role">
  351. <el-select v-model="form.role" placeholder="请选择用户身份">
  352. <el-option
  353. v-for="dict in dict.type.app_user_role"
  354. :key="dict.value"
  355. :label="dict.label"
  356. :value="parseInt(dict.value)"
  357. ></el-option>
  358. </el-select>
  359. </el-form-item>
  360. <el-form-item label="连续签到次数" prop="signCount">
  361. <el-input v-model="form.signCount" placeholder="请输入连续签到次数" />
  362. </el-form-item>
  363. <el-form-item label="上次签到时间" prop="signTime">
  364. <el-date-picker clearable
  365. v-model="form.signTime"
  366. type="date"
  367. value-format="yyyy-MM-dd"
  368. placeholder="请选择上次签到时间">
  369. </el-date-picker>
  370. </el-form-item>
  371. <el-form-item label="手机号区域 例如:86" prop="smsRegion">
  372. <el-input v-model="form.smsRegion" placeholder="请输入手机号区域 例如:86" />
  373. </el-form-item>
  374. <el-form-item label=" 用户状态 1:禁用 0:正常" prop="status">
  375. <el-select v-model="form.status" placeholder="请选择 用户状态 1:禁用 0:正常">
  376. <el-option
  377. v-for="dict in dict.type.app_user_status"
  378. :key="dict.value"
  379. :label="dict.label"
  380. :value="parseInt(dict.value)"
  381. ></el-option>
  382. </el-select>
  383. </el-form-item>
  384. <el-form-item label="余额/可提现余额" prop="diamondCoin">
  385. <el-input v-model="form.diamondCoin" placeholder="请输入余额/可提现余额" />
  386. </el-form-item>
  387. </el-form>
  388. <div slot="footer" class="dialog-footer">
  389. <el-button type="primary" @click="submitForm">确 定</el-button>
  390. <el-button @click="cancel">取 消</el-button>
  391. </div>
  392. </el-dialog>
  393. <!-- 重置密码对话框 -->
  394. <el-dialog :title="title" :visible.sync="resetPwdopen" width="500px" append-to-body>
  395. <el-form ref="resetPwdForm" :model="resetPwdForm" :rules="resetPwdRules" label-width="80px">
  396. <el-form-item label="用户id" prop="userId">
  397. <el-input v-model="resetPwdForm.userId" disabled />
  398. </el-form-item>
  399. <el-form-item label="密码" prop="password">
  400. <el-input v-model="resetPwdForm.password" placeholder="请输入密码" />
  401. </el-form-item>
  402. </el-form>
  403. <div slot="footer" class="dialog-footer">
  404. <el-button type="primary" @click="submitResetPwdForm">确 定</el-button>
  405. <el-button @click="cancel">取 消</el-button>
  406. </div>
  407. </el-dialog>
  408. <!-- 充值对话框 -->
  409. <el-dialog :title="title" :visible.sync="chargeopen" width="700px" append-to-body>
  410. <el-form ref="chargeForm" :model="chargeForm" :rules="currentRules" :validate-on-rule-change=false label-width="150px">
  411. <el-form-item label="用户id" prop="userId">
  412. <el-input v-model="chargeForm.userId" disabled />
  413. </el-form-item>
  414. <el-form-item label="货币类型" prop="type">
  415. <el-select v-model="chargeForm.type" placeholder="请选择" clearable>
  416. <el-option
  417. v-for="dict in dict.type.app_user_coin_type"
  418. :key="dict.value"
  419. :label="dict.label"
  420. :value="dict.value"
  421. />
  422. </el-select>
  423. </el-form-item>
  424. <el-form-item label="金额" prop="amount">
  425. <el-input type="text" v-model="chargeForm.amount" placeholder="请输入金额" />
  426. </el-form-item>
  427. <el-form-item label="是否扣除手续费" prop="isRate">
  428. <el-select v-model="chargeForm.isRate" placeholder="请选择" clearable @change="isRateChange">
  429. <el-option
  430. v-for="dict in dict.type.app_charge_rate"
  431. :key="dict.value"
  432. :label="dict.label"
  433. :value="dict.value"
  434. />
  435. </el-select>
  436. </el-form-item>
  437. <el-form-item label="渠道(扣除对应渠道手续费)" prop="channelId" v-if="chargeForm.isRate==1">
  438. <el-select v-model="chargeForm.channelId" placeholder="请选择" clearable @change="chargeChannel">
  439. <el-option
  440. v-for="dict in channelList"
  441. :key="dict.value"
  442. :label="dict.label"
  443. :value="dict.value"
  444. />
  445. </el-select>
  446. <span style="padding-left: 1rem;color: red;font-size: 12px" v-if="null != rate && undefined != rate">手续费:{{(rate*100).toFixed(2) + "%"}}</span>
  447. </el-form-item>
  448. <!-- <el-form-item label="手续费比例" prop="rate" v-show="chargeForm.isRate==1 && chargeForm.channelId == -1">
  449. <el-input v-model="chargeForm.rate" placeholder="请输入手续费 (比如扣除10%,则填写0.1)" />
  450. </el-form-item>-->
  451. <template v-show="!isReadOnly">
  452. <el-form-item label="手续费比例" prop="rate" >
  453. <el-input type="number" v-model="chargeForm.rate" placeholder="请输入手续费 (比如扣除10%,则填写0.1)" :disabled="isReadOnly"/>
  454. </el-form-item>
  455. </template>
  456. </el-form>
  457. <div slot="footer" class="dialog-footer">
  458. <el-button type="primary" @click="submitChargeForm">确 定</el-button>
  459. <el-button @click="cancel">取 消</el-button>
  460. </div>
  461. </el-dialog>
  462. <!-- 补足流水对话框 -->
  463. <el-dialog :title="title" :visible.sync="resetWithdrawopen" width="700px" append-to-body>
  464. <el-form ref="withdrawForm" :model="resetWithdrawForm" :rules="withdrawRules" :validate-on-rule-change=false label-width="150px">
  465. <el-form-item label="用户id" prop="userId">
  466. <el-input v-model="resetWithdrawForm.userId" disabled />
  467. </el-form-item>
  468. <el-form-item label="金额" prop="amount">
  469. <el-input type="text" v-model="resetWithdrawForm.amount" placeholder="请输入金额" />
  470. </el-form-item>
  471. </el-form>
  472. <div slot="footer" class="dialog-footer">
  473. <el-button type="primary" @click="submitWithdrawForm">确 定</el-button>
  474. <el-button @click="cancel">取 消</el-button>
  475. </div>
  476. </el-dialog>
  477. <!-- 虚拟开播对话框 -->
  478. <el-dialog :title="title" :visible.sync="liveOpen" width="700px" append-to-body>
  479. <el-form :validate-on-rule-change=false label-width="150px">
  480. <el-form-item label="关播提示" prop="amount" v-if="liveLive.islive == 1">
  481. <el-input type="text" v-model="resetWithdrawForm.amount" placeholder="请输入" />
  482. </el-form-item>
  483. </el-form>
  484. <div slot="footer" class="dialog-footer">
  485. <el-button type="primary" @click="submitLiveForm">确 定</el-button>
  486. <el-button @click="cancel">取 消</el-button>
  487. </div>
  488. </el-dialog>
  489. <!-- 用户详情对话框 -->
  490. <el-dialog :title="title" :visible.sync="superOpen" width="80%" append-to-body>
  491. <el-form >
  492. <el-form-item label="">
  493. <span>
  494. <image-preview :src="userInfo.avatar" :width="50" :height="50"/>&nbsp;&nbsp;
  495. </span>
  496. <span style="margin-left: 1rem;">{{userInfo.userid}} {{userInfo.role==0?"普通用户":"主播"}}</span>
  497. <span style="margin-left: 1rem;">注册IP:{{userInfo.registerIp}}</span>
  498. <span style="margin-left: 1rem;">最后登录IP:{{userInfo.ipaddr}}</span>
  499. </el-form-item>
  500. <el-form-item label="">
  501. <span>
  502. 金币:{{userInfo.coin}}
  503. </span>
  504. <span style="margin-left: 1rem;">
  505. 余额:{{userInfo.diamondCoin}}
  506. </span>
  507. </el-form-item>
  508. <el-form-item label="">
  509. <el-tabs v-model="activeName" @tab-click="handleClick" style="width: 100%">
  510. <el-tab-pane label="上级推荐人列表" name="first">
  511. <el-table
  512. :data="superUserList"
  513. stripe
  514. style="width: 100%">
  515. <el-table-column
  516. prop="userId"
  517. label="UID">
  518. </el-table-column>
  519. <el-table-column
  520. prop="pid"
  521. label="上级UID">
  522. </el-table-column>
  523. </el-table>
  524. </el-tab-pane>
  525. <el-tab-pane label="下级代理人列表" name="nine">
  526. <el-table
  527. :data="downUserList"
  528. stripe
  529. style="width: 100%">
  530. <el-table-column
  531. prop="userId"
  532. label="UID">
  533. </el-table-column>
  534. <el-table-column
  535. prop="pid"
  536. label="上级UID">
  537. </el-table-column>
  538. </el-table>
  539. </el-tab-pane>
  540. <el-tab-pane label="用户待遇" name="second">
  541. <el-form-item label="">
  542. <span>
  543. 直播分红:<el-input
  544. v-model="appAgentForm.liveRate"
  545. placeholder="请输入直播分红 "
  546. style="width: 150px"
  547. />
  548. </span><span style="padding-left: 10px">%</span>
  549. <span style="margin-left: 1rem;">
  550. 保底分红:<el-input
  551. v-model="appAgentForm.dividendGuaranteeRate"
  552. placeholder="请输入分红比例 "
  553. style="width: 150px"
  554. />
  555. </span>
  556. <span style="padding-left: 10px">%</span>
  557. <span style="margin-left: 1rem;">
  558. <el-button type="primary" @click="submitAgentForm">修 改</el-button>
  559. </span>
  560. <el-table
  561. :data="undefined!=userInfo.infoDetail?userInfo.infoDetail.gameCommissionList:[]"
  562. stripe
  563. style="width: 100%;margin-top: 10px">
  564. <el-table-column
  565. prop="gameName"
  566. label="游戏">
  567. </el-table-column>
  568. <el-table-column
  569. prop="gameRate"
  570. label="返佣">
  571. <template slot-scope="scope">
  572. <el-input
  573. v-model="scope.row.gameRate"
  574. placeholder="请输入游戏返佣比例 "
  575. style="width: 150px"
  576. />
  577. </template>
  578. </el-table-column>
  579. <el-table-column fixed="right" label="操作" align="center" width="200" class-name="small-padding fixed-width">
  580. <template slot-scope="scope">
  581. <el-button
  582. size="mini"
  583. type="text"
  584. icon="el-icon-edit"
  585. @click="submitGameCommissionForm(scope.row)"
  586. >修 改</el-button>
  587. </template>
  588. </el-table-column>
  589. </el-table>
  590. </el-form-item>
  591. </el-tab-pane>
  592. <el-tab-pane label="同IP登录用户" name="three">
  593. <el-table
  594. v-loading="ipLoading"
  595. :data="ipUserList"
  596. stripe
  597. style="width: 100%">
  598. <el-table-column
  599. prop="userid"
  600. label="UID">
  601. </el-table-column>
  602. <el-table-column
  603. prop="username"
  604. label="昵称">
  605. </el-table-column>
  606. <el-table-column
  607. prop="ipaddr"
  608. label="最后登录ip">
  609. </el-table-column>
  610. </el-table>
  611. <pagination
  612. v-show="ipTotal>0"
  613. :total="ipTotal"
  614. :page.sync="queryIpParams.pageNum"
  615. :limit.sync="queryIpParams.pageSize"
  616. @pagination="getIpList"
  617. />
  618. </el-tab-pane>
  619. <el-tab-pane label="绑定提现账号" name="four">
  620. <el-table
  621. :data="accountList"
  622. v-loading="accountLoading"
  623. stripe
  624. style="width: 100%">
  625. <el-table-column
  626. prop="uid"
  627. label="UID">
  628. </el-table-column>
  629. <el-table-column label="账号类型" align="center" prop="type">
  630. <template slot-scope="scope">
  631. <dict-tag :options="dict.type.app_user_cash_account" :value="scope.row.type"/>
  632. </template>
  633. </el-table-column>
  634. <el-table-column
  635. prop="account"
  636. label="账号">
  637. </el-table-column>
  638. </el-table>
  639. <pagination
  640. v-show="accountTotal>0"
  641. :total="accountTotal"
  642. :page.sync="queryAccountParams.pageNum"
  643. :limit.sync="queryAccountParams.pageSize"
  644. @pagination="getAccountList"
  645. />
  646. </el-tab-pane>
  647. <el-tab-pane label="兑换记录" name="five">
  648. <el-table
  649. :data="orderList"
  650. v-loading="orderLoading"
  651. stripe
  652. style="width: 100%">
  653. <el-table-column
  654. prop="uid"
  655. label="UID">
  656. </el-table-column>
  657. <el-table-column
  658. prop="productNames"
  659. label="商品">
  660. </el-table-column>
  661. <el-table-column label="交易金额(实付金额)" align="center" prop="transactionAmount" />
  662. <el-table-column label="收货人地址" align="center" prop="address" width="200"/>
  663. <el-table-column label="订单状态" align="center" prop="status">
  664. <template slot-scope="scope">
  665. <dict-tag :options="dict.type.app_goods_order_status" :value="scope.row.status"/>
  666. </template>
  667. </el-table-column>
  668. </el-table>
  669. <pagination
  670. v-show="orderTotal>0"
  671. :total="orderTotal"
  672. :page.sync="queryOrderParams.pageNum"
  673. :limit.sync="queryOrderParams.pageSize"
  674. @pagination="getOrderList"
  675. />
  676. </el-tab-pane>
  677. <el-tab-pane label="直播获得的游戏投注返佣" name="six">
  678. <el-table
  679. :data="liveList"
  680. v-loading="liveLoading"
  681. stripe
  682. style="width: 100%">
  683. <el-table-column
  684. prop="userId"
  685. label="UID">
  686. </el-table-column>
  687. <el-table-column
  688. prop="gameName"
  689. label="游戏">
  690. </el-table-column>
  691. <el-table-column label="期号" align="center" prop="gameDate" />
  692. <el-table-column label="佣金" align="center" prop="commission" />
  693. </el-table>
  694. <pagination
  695. v-show="liveTotal>0"
  696. :total="liveTotal"
  697. :page.sync="queryLiveParams.pageNum"
  698. :limit.sync="queryLiveParams.pageSize"
  699. @pagination="getLiveList"
  700. />
  701. </el-tab-pane>
  702. <el-tab-pane label="收到的礼物" name="seven">
  703. <el-table
  704. :data="giftList"
  705. v-loading="giftLoading"
  706. stripe
  707. style="width: 100%">
  708. <el-table-column
  709. prop="fromUid"
  710. label="UID">
  711. </el-table-column>
  712. <el-table-column
  713. prop="coinChange"
  714. label="礼物收益">
  715. </el-table-column>
  716. <el-table-column
  717. prop="remarks"
  718. label="礼物">
  719. </el-table-column>
  720. <el-table-column
  721. prop="createTime"
  722. label="时间">
  723. </el-table-column>
  724. </el-table>
  725. <pagination
  726. v-show="giftTotal>0"
  727. :total="giftTotal"
  728. :page.sync="queryGiftParams.pageNum"
  729. :limit.sync="queryGiftParams.pageSize"
  730. @pagination="getGiftList"
  731. />
  732. </el-tab-pane>
  733. <el-tab-pane label="下注记录" name="eight">
  734. <el-table
  735. :data="bettingList"
  736. v-loading="bettingLoading"
  737. stripe
  738. style="width: 100%">
  739. <el-table-column label="游戏" align="center" prop="gameId">
  740. <template slot-scope="scope">
  741. <span>{{ getTypeName(scope.row.gameId) }}</span>
  742. </template>
  743. </el-table-column>
  744. <el-table-column label="用户ID" align="center" prop="userId" />
  745. <el-table-column label="游戏期号" align="center" prop="gameDate" />
  746. <el-table-column label="主播ID" align="center" prop="liveUserId" />
  747. <el-table-column label="直播房间号" align="center" prop="liveRoomId" />
  748. <el-table-column label="是否直播间投注 " align="center" prop="isLive">
  749. <template slot-scope="scope">
  750. <dict-tag :options="dict.type.app_betting_is_live" :value="scope.row.isLive"/>
  751. </template>
  752. </el-table-column>
  753. <el-table-column label="投注类型" align="center" prop="bettingType">
  754. <template slot-scope="scope">
  755. <dict-tag :options="dict.type.app_game_betting_type" :value="scope.row.bettingType"/>
  756. </template>
  757. </el-table-column>
  758. <el-table-column label="投注选项" align="center" prop="bettingItem">
  759. <template slot-scope="scope">
  760. {{getItemName(scope.row)}}
  761. </template>
  762. </el-table-column>
  763. <el-table-column label="投注选项倍数" align="center" prop="bettingMultiple" />
  764. <el-table-column label="投注金额" align="center" prop="bettingAmount" />
  765. <el-table-column label="投注佣金" align="center" prop="bettingCommission" />
  766. <el-table-column label="是否中奖" align="center" prop="isWinning">
  767. <template slot-scope="scope">
  768. <dict-tag :options="dict.type.app_game_betting_winning" :value="scope.row.isWinning"/>
  769. </template>
  770. </el-table-column>
  771. </el-table>
  772. <pagination
  773. v-show="bettingTotal>0"
  774. :total="bettingTotal"
  775. :page.sync="queryBettingParams.pageNum"
  776. :limit.sync="queryBettingParams.pageSize"
  777. @pagination="getBettingList"
  778. />
  779. </el-tab-pane>
  780. </el-tabs>
  781. </el-form-item>
  782. </el-form>
  783. <div slot="footer" class="dialog-footer">
  784. <el-button @click="cancel">关闭</el-button>
  785. </div>
  786. </el-dialog>
  787. </div>
  788. </template>
  789. <script>
  790. import { listUser, getUser, delUser, addUser, updateUser,resetUser,userCharge,channelList,withdraw,openLive,userDetail,liveCommission,getGift,updateUserAgent,updateGameCommissionAgent } from "@/api/business/user";
  791. import { listAccount} from "@/api/business/account";
  792. import { listOrder } from "@/api/business/order";
  793. import { listBetting} from "@/api/business/betting";
  794. import {allGameList } from "@/api/business/game_item";
  795. import {allList} from "@/api/business/lottery";
  796. export default {
  797. name: "User",
  798. 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'],
  799. data() {
  800. return {
  801. activeName:"first",
  802. // 遮罩层
  803. loading: true,
  804. ipLoading: true,
  805. accountLoading: true,
  806. orderLoading: true,
  807. liveLoading: true,
  808. giftLoading: true,
  809. bettingLoading: true,
  810. // 选中数组
  811. ids: [],
  812. // 非单个禁用
  813. single: true,
  814. // 非多个禁用
  815. multiple: true,
  816. // 显示搜索条件
  817. showSearch: true,
  818. // 总条数
  819. total: 0,
  820. ipTotal: 0,
  821. accountTotal: 0,
  822. orderTotal: 0,
  823. liveTotal: 0,
  824. giftTotal: 0,
  825. bettingTotal: 0,
  826. // app用户表格数据
  827. userList: [],
  828. ipUserList: [],
  829. accountList: [],
  830. orderList: [],
  831. liveList: [],
  832. giftList: [],
  833. bettingList: [],
  834. // 弹出层标题
  835. title: "",
  836. // 是否显示弹出层
  837. open: false,
  838. // 是否显示弹出层
  839. resetPwdopen: false,
  840. // 是否显示弹出层
  841. resetWithdrawopen: false,
  842. // 是否显示弹出层
  843. chargeopen: false,
  844. channelList:[],
  845. isReadOnly:true,
  846. rate:null,
  847. channelMap:{},
  848. liveLive:{},
  849. liveOpen:false,
  850. superOpen:false,
  851. userInfo:{},
  852. closeMsg:null,
  853. superUserList:[],
  854. downUserList:[],
  855. typeMap:{},
  856. typeList:[],
  857. gameItemMap:{},
  858. gameItemList:[],
  859. gameItemShowList:[],
  860. appAgentForm:{
  861. liveRate:null,
  862. dividendGuaranteeRate:null,
  863. userId:null
  864. },
  865. appGameCommissionForm:{
  866. id:null,
  867. gameId:null,
  868. userId:null,
  869. pid:null,
  870. gameRate:null,
  871. gameName:null
  872. },
  873. queryIpParams: {
  874. pageNum: 1,
  875. pageSize: 10,
  876. ipaddr: null,
  877. },
  878. queryAccountParams: {
  879. pageNum: 1,
  880. pageSize: 10,
  881. uid: null,
  882. },
  883. queryOrderParams: {
  884. pageNum: 1,
  885. pageSize: 10,
  886. uid: null,
  887. },
  888. queryLiveParams: {
  889. pageNum: 1,
  890. pageSize: 10,
  891. userId: null,
  892. },
  893. queryGiftParams: {
  894. pageNum: 1,
  895. pageSize: 10,
  896. userId: null,
  897. },
  898. queryBettingParams: {
  899. pageNum: 1,
  900. pageSize: 10,
  901. userId: null,
  902. },
  903. // 查询参数
  904. queryParams: {
  905. pageNum: 1,
  906. pageSize: 10,
  907. userid: null,
  908. anchorGrade: null,
  909. anchorPoint: null,
  910. appVersion: null,
  911. appVersionCode: null,
  912. avatar: null,
  913. awardLoginDay: null,
  914. birthday: null,
  915. charmGrade: null,
  916. charmPoint: null,
  917. coin: null,
  918. coinCash: null,
  919. consumption: null,
  920. createTime: null,
  921. ipaddr: null,
  922. isAnchorAuth: null,
  923. nickname: null,
  924. onlineStatus: null,
  925. phoneFirm: null,
  926. phoneModel: null,
  927. phoneSystem: null,
  928. phoneUuid: null,
  929. pid: null,
  930. role: null,
  931. diamondCoin: null,
  932. mobile:null,
  933. },
  934. // 表单参数
  935. form: {},
  936. //重置密码
  937. resetPwdForm:{},
  938. //补足流水
  939. resetWithdrawForm:{},
  940. //充值
  941. chargeForm:{},
  942. // 表单校验
  943. rules: {
  944. level: [
  945. { required: true, message: "不能为空", trigger: "blur" }
  946. ],
  947. },
  948. resetPwdRules: {
  949. password: [
  950. { required: true, message: "密码不能为空", trigger: "blur" }
  951. ],
  952. },
  953. chargeRules: {
  954. amount: [
  955. { required: true, message: "金额不能为空", trigger: "blur" }
  956. ],
  957. type: [
  958. { required: true, message: "类型不能为空", trigger: "blur" }
  959. ],
  960. isRate: [
  961. { required: true, message: "请选择是否扣除手续费", trigger: "blur" }
  962. ]
  963. },
  964. withdrawRules: {
  965. amount: [
  966. { required: true, message: "金额不能为空", trigger: "blur" }
  967. ]
  968. },
  969. scrollLeft: 0
  970. };
  971. },
  972. created() {
  973. let that = this;
  974. allList().then(response => {
  975. if(response.data){
  976. for(var i in response.data){
  977. var item = response.data[i];
  978. that.gameItemMap[item.itemLocation.toString() + "_" + item.gameId] = item.itemName;
  979. that.gameItemList.push({
  980. value:item.itemLocation+"_"+item.gameId,
  981. label:item.itemName,
  982. gameId:item.gameId
  983. })
  984. }
  985. }
  986. });
  987. allGameList().then(response => {
  988. if(response.data){
  989. for(var i in response.data){
  990. var item = response.data[i];
  991. that.typeMap[item.id.toString()] = item.name;
  992. that.typeList.push({
  993. value:item.id,
  994. label:item.name
  995. })
  996. }
  997. }
  998. that.getList();
  999. });
  1000. },
  1001. computed: {
  1002. currentRules:function(){
  1003. if(this.chargeForm.isRate == 1){
  1004. this.chargeRules["channelId"] = [
  1005. { required: true, message: "请选择充值渠道", trigger: "blur" }
  1006. ];
  1007. }else{
  1008. delete this.chargeRules["channelId"]
  1009. }
  1010. return this.chargeRules;
  1011. },
  1012. },
  1013. methods: {
  1014. getItemName(row){
  1015. let that = this;
  1016. let bettingGameType = row.bettingGameType;
  1017. let bettingItem = row.bettingItem;
  1018. let gameId = row.gameId;
  1019. if("0" == bettingGameType){
  1020. return that.gameItemMap[bettingItem+"_"+gameId];
  1021. }else{
  1022. let name = "";
  1023. let arr = JSON.parse(bettingItem);
  1024. for(var i in arr){
  1025. let item = arr[i];
  1026. if("" != name){
  1027. name = name + ",";
  1028. }
  1029. name = name + that.gameItemMap[item["bettingItem"]+"_"+gameId];
  1030. }
  1031. return name;
  1032. }
  1033. },
  1034. getTypeName(id) {
  1035. return this.typeMap[id.toString()];
  1036. },
  1037. /** 查询app用户列表 */
  1038. getList() {
  1039. this.loading = true;
  1040. listUser(this.queryParams).then(response => {
  1041. this.userList = response.rows;
  1042. this.total = response.total;
  1043. this.loading = false;
  1044. });
  1045. },
  1046. /** 查询同ip app用户列表 */
  1047. getIpList() {
  1048. this.ipLoading = true;
  1049. this.queryIpParams.ipaddr = this.userInfo.ipaddr;
  1050. listUser(this.queryIpParams).then(response => {
  1051. this.ipUserList = response.rows;
  1052. this.ipTotal = response.total;
  1053. this.ipLoading = false;
  1054. });
  1055. },
  1056. /** 查询提现账号列表 */
  1057. getAccountList() {
  1058. this.accountLoading = true;
  1059. this.queryAccountParams.uid = this.userInfo.userid;
  1060. listAccount(this.queryAccountParams).then(response => {
  1061. this.accountList = response.rows;
  1062. this.accountTotal = response.total;
  1063. this.accountLoading = false;
  1064. });
  1065. },
  1066. /** 查询兑换列表 */
  1067. getOrderList() {
  1068. this.orderLoading = true;
  1069. this.queryOrderParams.uid = this.userInfo.userid;
  1070. listOrder(this.queryOrderParams).then(response => {
  1071. this.orderList = response.rows;
  1072. this.orderTotal = response.total;
  1073. this.orderLoading = false;
  1074. });
  1075. },
  1076. /** 查询兑换列表 */
  1077. getLiveList() {
  1078. this.liveLoading = true;
  1079. this.queryLiveParams.userId = this.userInfo.userid;
  1080. liveCommission(this.queryLiveParams).then(response => {
  1081. this.liveList = response.rows;
  1082. this.liveTotal = response.total;
  1083. this.liveLoading = false;
  1084. });
  1085. },
  1086. /** 查询礼物列表 */
  1087. getGiftList() {
  1088. this.giftLoading = true;
  1089. this.queryGiftParams.userId = this.userInfo.userid;
  1090. getGift(this.queryGiftParams).then(response => {
  1091. this.giftList = response.rows;
  1092. this.giftTotal = response.total;
  1093. this.giftLoading = false;
  1094. });
  1095. },
  1096. /** 查询下注记录 */
  1097. getBettingList() {
  1098. this.bettingLoading = true;
  1099. this.queryBettingParams.userId = this.userInfo.userid;
  1100. listBetting(this.queryBettingParams).then(response => {
  1101. this.bettingList = response.rows;
  1102. this.bettingTotal = response.total;
  1103. this.bettingLoading = false;
  1104. });
  1105. },
  1106. // 取消按钮
  1107. cancel() {
  1108. this.open = false;
  1109. this.resetPwdopen = false;
  1110. this.chargeopen = false;
  1111. this.resetWithdrawopen = false;
  1112. this.liveOpen = false;
  1113. this.superOpen = false;
  1114. this.reset();
  1115. this.resetPwd();
  1116. this.resetCharge();
  1117. this.resetWithdraw();
  1118. },
  1119. // 表单重置
  1120. reset() {
  1121. this.form = {
  1122. userid: null,
  1123. address: null,
  1124. agentId: null,
  1125. amount: null,
  1126. anchorGrade: null,
  1127. anchorPoint: null,
  1128. appVersion: null,
  1129. appVersionCode: null,
  1130. avatar: null,
  1131. awardLoginDay: null,
  1132. birthday: null,
  1133. broadCast: null,
  1134. channelId: null,
  1135. chargeShow: null,
  1136. charmGrade: null,
  1137. charmPoint: null,
  1138. city: null,
  1139. cityEdit: null,
  1140. coin: null,
  1141. coinCash: null,
  1142. constellation: null,
  1143. consumption: null,
  1144. createTime: null,
  1145. dealScalePlan: null,
  1146. delFlag: null,
  1147. deviceId: null,
  1148. devoteShow: null,
  1149. giftGlobalBroadcast: null,
  1150. goodnum: null,
  1151. groupId: null,
  1152. gsRoomId: null,
  1153. gsRoomType: null,
  1154. guildId: null,
  1155. headNo: null,
  1156. height: null,
  1157. hideDistance: null,
  1158. inviteCode: null,
  1159. bindCode: null,
  1160. ipaddr: null,
  1161. isAnchorAuth: null,
  1162. isAutomatic: null,
  1163. isJoinJg: null,
  1164. isLiveAccount: null,
  1165. isNotDisturb: null,
  1166. isOooAccount: null,
  1167. isPush: null,
  1168. isRecommend: null,
  1169. isShowHomePage: null,
  1170. isSvip: null,
  1171. isTone: null,
  1172. isYouthModel: null,
  1173. ishot: null,
  1174. isrecord: null,
  1175. issuper: null,
  1176. iszombie: null,
  1177. iszombiep: null,
  1178. joinRoomShow: null,
  1179. kickTime: null,
  1180. lastGameNum: null,
  1181. lastLoginDay: null,
  1182. lastLoginIp: null,
  1183. lastLoginTime: null,
  1184. lastOffLineTime: null,
  1185. lat: null,
  1186. level: null,
  1187. liveFunction: null,
  1188. liveStatus: null,
  1189. liveThumb: null,
  1190. liveThumbs: null,
  1191. lng: null,
  1192. lockReason: null,
  1193. lockTime: null,
  1194. loginType: null,
  1195. managerCoId: null,
  1196. managerId: null,
  1197. maxSignCount: null,
  1198. mobile: null,
  1199. nickname: null,
  1200. nobleGrade: null,
  1201. onlineStatus: null,
  1202. oooHomePageSortNo: null,
  1203. oooLiveStatus: null,
  1204. oooTwoClassifyId: null,
  1205. openLiveZombieNum: null,
  1206. openid: null,
  1207. optUserName: null,
  1208. password: null,
  1209. phoneFirm: null,
  1210. phoneModel: null,
  1211. phoneSystem: null,
  1212. phoneUuid: null,
  1213. pid: null,
  1214. portrait: null,
  1215. poster: null,
  1216. province: null,
  1217. pushPlatform: null,
  1218. pushRegisterId: null,
  1219. readShortVideoNumber: null,
  1220. regType: null,
  1221. registerIp: null,
  1222. role: null,
  1223. roomId: null,
  1224. roomTitle: null,
  1225. roomType: null,
  1226. roomTypeVal: null,
  1227. salt: null,
  1228. sanwei: null,
  1229. score: null,
  1230. sex: null,
  1231. signCount: null,
  1232. signTime: null,
  1233. signature: null,
  1234. smsRegion: null,
  1235. source: null,
  1236. starId: null,
  1237. status: null,
  1238. totalAmount: null,
  1239. totalAmountCash: null,
  1240. totalCash: null,
  1241. totalCharge: null,
  1242. unionid: null,
  1243. updatePwdTime: null,
  1244. userActivationKey: null,
  1245. userEmail: null,
  1246. userGrade: null,
  1247. userPoint: null,
  1248. userSetOnlineStatus: null,
  1249. userType: null,
  1250. userUrl: null,
  1251. username: null,
  1252. video: null,
  1253. videoCoin: null,
  1254. videoImg: null,
  1255. vocation: null,
  1256. voice: null,
  1257. voiceCoin: null,
  1258. voiceStatus: null,
  1259. voipToken: null,
  1260. votes: null,
  1261. votestotal: null,
  1262. wealthGrade: null,
  1263. wechat: null,
  1264. weight: null,
  1265. whetherEnablePositioningShow: null,
  1266. youthPassword: null,
  1267. zombieMaxNum: null,
  1268. zombieRatio: null,
  1269. agentGrade: null,
  1270. liveDividedInto: null,
  1271. gameDividedInto: null,
  1272. inviteBindTime: null,
  1273. fundPassword: null,
  1274. diamondCoin: null,
  1275. diamondCoinTotal: null,
  1276. diamondCoinCashTotal: null,
  1277. agentFlag: null,
  1278. diamondCoinCash: null,
  1279. otherPid: null
  1280. };
  1281. this.resetForm("form");
  1282. },// 表单重置
  1283. resetPwd() {
  1284. this.resetPwdForm = {
  1285. userId: null,
  1286. password: null
  1287. };
  1288. this.resetForm("restPwdForm");
  1289. },// 表单重置
  1290. resetWithdraw() {
  1291. this.resetWithdrawForm = {
  1292. userId: null,
  1293. amount: null
  1294. };
  1295. this.resetForm("restWithdraoForm");
  1296. },// 表单重置
  1297. resetCharge() {
  1298. this.chargeForm = {
  1299. userId: null,
  1300. amount: null,
  1301. type:null,
  1302. isRate:null,
  1303. rate:null,
  1304. channelId:null
  1305. };
  1306. this.resetForm("restPwdForm");
  1307. },
  1308. /** 搜索按钮操作 */
  1309. handleQuery() {
  1310. this.queryParams.pageNum = 1;
  1311. this.getList();
  1312. },
  1313. /** 重置按钮操作 */
  1314. resetQuery() {
  1315. this.resetForm("queryForm");
  1316. this.handleQuery();
  1317. },
  1318. // 多选框选中数据
  1319. handleSelectionChange(selection) {
  1320. this.ids = selection.map(item => item.userid)
  1321. this.single = selection.length!==1
  1322. this.multiple = !selection.length
  1323. },
  1324. /** 新增按钮操作 */
  1325. handleAdd() {
  1326. this.reset();
  1327. this.open = true;
  1328. this.title = "添加app用户";
  1329. },
  1330. /** 修改按钮操作 */
  1331. handleUpdate(row) {
  1332. this.reset();
  1333. const userid = row.userid || this.ids
  1334. getUser(userid).then(response => {
  1335. this.form = response.data;
  1336. this.open = true;
  1337. this.title = "修改app用户";
  1338. });
  1339. },
  1340. handleLive(row){
  1341. this.liveLive = row.liveLive;
  1342. this.title = row.liveLive.islive==1?"关播":"虚拟开播";
  1343. this.liveOpen = true;
  1344. this.closeMsg = null;
  1345. },
  1346. /** 重置密码按钮操作 */
  1347. handleRestPwd(row) {
  1348. this.resetPwd();
  1349. const userid = row.userid;
  1350. this.resetPwdForm = {
  1351. userId:userid,
  1352. password:""
  1353. };
  1354. this.resetPwdopen = true;
  1355. this.title = "重置密码";
  1356. },
  1357. /** 补足流水按钮操作 */
  1358. handleWithdraw(row) {
  1359. this.resetWithdraw();
  1360. const userid = row.userid;
  1361. this.resetWithdrawForm = {
  1362. userId:userid,
  1363. password:""
  1364. };
  1365. this.resetWithdrawopen = true;
  1366. this.title = "补足提现流水";
  1367. },
  1368. /** 充值按钮操作 */
  1369. handleCharge(row) {
  1370. var that = this;
  1371. that.channelList = [];
  1372. that.channelMap = {};
  1373. channelList().then(response => {
  1374. if(response.data){
  1375. for(var i in response.data){
  1376. var item = response.data[i];
  1377. that.channelMap[item.id] = item.rate;
  1378. that.channelList.push({
  1379. value:item.id,
  1380. label:item.name,
  1381. rate:item.rate
  1382. })
  1383. }
  1384. }
  1385. });
  1386. this.resetCharge();
  1387. const userid = row.userid;
  1388. this.chargeForm = {
  1389. userId:userid,
  1390. type: null,
  1391. amount:null
  1392. };
  1393. this.chargeopen = true;
  1394. this.title = "充值";
  1395. /*this.$nextTick(()=>{
  1396. // 重置当前页面的所有字段值
  1397. this.$refs['chargeForm'].resetFields();
  1398. if (data){
  1399. // 模式1
  1400. this.form.patternType = 1;
  1401. }else{
  1402. // 模式2
  1403. this.form.patternType = 2;
  1404. }
  1405. // 设置校验规则
  1406. this.setValidRules(this.form.patternType);
  1407. })*/
  1408. },
  1409. /** 提交按钮 */
  1410. submitForm() {
  1411. this.$refs["form"].validate(valid => {
  1412. if (valid) {
  1413. if (this.form.userid != null) {
  1414. updateUser(this.form).then(response => {
  1415. this.$modal.msgSuccess("修改成功");
  1416. this.open = false;
  1417. this.getList();
  1418. });
  1419. } else {
  1420. addUser(this.form).then(response => {
  1421. this.$modal.msgSuccess("新增成功");
  1422. this.open = false;
  1423. this.getList();
  1424. });
  1425. }
  1426. }
  1427. });
  1428. },
  1429. /** 重置密码提交按钮 */
  1430. submitResetPwdForm() {
  1431. this.$refs["resetPwdForm"].validate(valid => {
  1432. if (valid) {
  1433. const loading = this.$loading({
  1434. lock: true,
  1435. text: '加载中',
  1436. spinner: 'el-icon-loading',
  1437. background: 'rgba(0, 0, 0, 0.7)'
  1438. });
  1439. setTimeout(function (){loading.close();},1000);
  1440. resetUser(this.resetPwdForm).then(response => {
  1441. this.$modal.msgSuccess("修改成功");
  1442. this.resetPwdopen = false;
  1443. this.getList();
  1444. loading.close();
  1445. });
  1446. }
  1447. });
  1448. },
  1449. /** 补足流水提交按钮 */
  1450. submitWithdrawForm() {
  1451. var that =this;
  1452. this.$refs["withdrawForm"].validate(valid => {
  1453. if (valid) {
  1454. const loading = this.$loading({
  1455. lock: true,
  1456. text: '加载中',
  1457. spinner: 'el-icon-loading',
  1458. background: 'rgba(0, 0, 0, 0.7)'
  1459. });
  1460. setTimeout(function (){loading.close();},1000);
  1461. withdraw(this.resetWithdrawForm).then(response => {
  1462. this.$modal.msgSuccess("补足流水成功");
  1463. this.resetWithdrawopen = false;
  1464. this.getList();
  1465. loading.close();
  1466. });
  1467. }
  1468. });
  1469. },
  1470. /** 充值提交按钮 */
  1471. submitChargeForm() {
  1472. var that =this;
  1473. this.$refs["chargeForm"].validate(valid => {
  1474. if (valid) {
  1475. if(that.chargeForm.isRate != 1){
  1476. that.chargeForm.rate = null;
  1477. }
  1478. if(that.chargeForm.channelId == -1 && (undefined == that.chargeForm.rate || null == that.chargeForm.rate)){
  1479. this.$modal.msgError("请输入手续费比例");
  1480. return;
  1481. }
  1482. if(that.chargeForm.channelId == -1 && that.chargeForm.rate >= 1){
  1483. this.$modal.msgError("手续费比例超过最大值");
  1484. return;
  1485. }
  1486. const loading = this.$loading({
  1487. lock: true,
  1488. text: '加载中',
  1489. spinner: 'el-icon-loading',
  1490. background: 'rgba(0, 0, 0, 0.7)'
  1491. });
  1492. setTimeout(function (){loading.close();},1000);
  1493. userCharge(this.chargeForm).then(response => {
  1494. this.$modal.msgSuccess("修改成功");
  1495. this.chargeopen = false;
  1496. this.getList();
  1497. loading.close();
  1498. });
  1499. }
  1500. });
  1501. },
  1502. /** 开关播提交按钮 */
  1503. submitLiveForm() {
  1504. var that =this;
  1505. this.liveLive["title"] = this.closeMsg;
  1506. const loading = this.$loading({
  1507. lock: true,
  1508. text: '加载中',
  1509. spinner: 'el-icon-loading',
  1510. background: 'rgba(0, 0, 0, 0.7)'
  1511. });
  1512. setTimeout(function (){loading.close();},1000);
  1513. openLive(this.liveLive).then(response => {
  1514. that.liveOpen = false;
  1515. setTimeout(function (){
  1516. that.getList();
  1517. },4000);
  1518. if(this.liveLive.islive!=1){
  1519. that.$alert(response["msg"], '开播成功', {
  1520. confirmButtonText: '确定',
  1521. callback: action => {
  1522. /*this.$message({
  1523. type: 'info',
  1524. message: `action: ${ action }`
  1525. });*/
  1526. }
  1527. });
  1528. }else{
  1529. that.$modal.msgSuccess(this.liveLive.islive==1?"关播":"虚拟开播"+"成功");
  1530. }
  1531. loading.close();
  1532. });
  1533. },
  1534. /** 代理待遇提交按钮 */
  1535. submitAgentForm() {
  1536. var that =this;
  1537. if(!that.appAgentForm.liveRate){
  1538. that.$modal.msgError("直播分红不能为空!");
  1539. return;
  1540. }
  1541. if(!that.appAgentForm.dividendGuaranteeRate){
  1542. that.$modal.msgError("保底分红不能为空!");
  1543. return;
  1544. }
  1545. const loading = this.$loading({
  1546. lock: true,
  1547. text: '加载中',
  1548. spinner: 'el-icon-loading',
  1549. background: 'rgba(0, 0, 0, 0.7)'
  1550. });
  1551. setTimeout(function (){loading.close();},1000);
  1552. updateUserAgent(this.appAgentForm).then(response => {
  1553. that.$modal.msgSuccess("修改成功");
  1554. that.getList();
  1555. loading.close();
  1556. });
  1557. },
  1558. /** 代理游戏待遇提交按钮 */
  1559. submitGameCommissionForm(row) {
  1560. var that =this;
  1561. that.appGameCommissionForm = row;
  1562. if(!that.appGameCommissionForm.gameRate){
  1563. that.$modal.msgError("游戏返佣比例不能为空!");
  1564. return;
  1565. }
  1566. if(!that.appGameCommissionForm.gameRate){
  1567. that.$modal.msgError("游戏返佣不能为空!");
  1568. return;
  1569. }
  1570. const loading = this.$loading({
  1571. lock: true,
  1572. text: '加载中',
  1573. spinner: 'el-icon-loading',
  1574. background: 'rgba(0, 0, 0, 0.7)'
  1575. });
  1576. setTimeout(function (){loading.close();},1000);
  1577. updateGameCommissionAgent(this.appGameCommissionForm).then(response => {
  1578. that.getList();
  1579. that.$modal.msgSuccess("修改成功");
  1580. loading.close();
  1581. });
  1582. },
  1583. /** 删除按钮操作 */
  1584. handleDelete(row) {
  1585. const userids = row.userid || this.ids;
  1586. this.$modal.confirm('是否确认删除app用户编号为"' + userids + '"的数据项?').then(function() {
  1587. return delUser(userids);
  1588. }).then(() => {
  1589. this.getList();
  1590. this.$modal.msgSuccess("删除成功");
  1591. }).catch(() => {});
  1592. },
  1593. /** 导出按钮操作 */
  1594. handleExport() {
  1595. this.download('business/user/export', {
  1596. ...this.queryParams
  1597. }, `user_${new Date().getTime()}.xlsx`)
  1598. },
  1599. handleScroll(event) {
  1600. // 当滚动时同步左右滚动
  1601. this.scrollLeft = event.target.scrollLeft;
  1602. },
  1603. isRateChange(val){
  1604. let rule = {};
  1605. for(var i in this.chargeRules){
  1606. rule[i] = this.chargeRules[i];
  1607. }
  1608. this.chargeRules = {};
  1609. if(this.chargeForm.isRate == 1){
  1610. rule["channelId"] = [
  1611. { required: true, message: "请选择充值渠道", trigger: "blur" }
  1612. ];
  1613. /*rule["rate"] = [
  1614. { required: true, message: "请输入手续费比例", trigger: "blur" }
  1615. ];*/
  1616. }else{
  1617. delete rule["channelId"];
  1618. // delete rule["rate"];
  1619. }
  1620. this.chargeRules = rule;
  1621. },
  1622. chargeChannel(val){
  1623. let rule = {};
  1624. for(var i in this.chargeRules){
  1625. rule[i] = this.chargeRules[i];
  1626. }
  1627. this.chargeRules = {};
  1628. if(this.chargeForm.channelId == -1){
  1629. /*this.chargeForm.rate = null;
  1630. rule["rate"] = [
  1631. { required: true, message: "请输入手续费比例", trigger: "blur" }
  1632. ];*/
  1633. this.isReadOnly = false;
  1634. this.rate = null;
  1635. }else{
  1636. let rate = this.channelMap[this.chargeForm.channelId];
  1637. this.chargeForm.rate = rate;
  1638. // delete rule["rate"];
  1639. this.isReadOnly = true;
  1640. this.rate = rate;
  1641. }
  1642. // this.chargeRules = rule;
  1643. },
  1644. getUserDetail(row){
  1645. let that = this;
  1646. that.title = "用户详情"
  1647. that.activeName = "first";
  1648. that.userInfo = row;
  1649. that.userInfo["infoDetail"] = {};
  1650. userDetail({"userId":row.userid}).then(response => {
  1651. that.superUserList = response.data.superUserList;
  1652. that.downUserList = response.data.downUserList;
  1653. that.userInfo["infoDetail"] = response.data;
  1654. that.superOpen = true;
  1655. that.appAgentForm["dividendGuaranteeRate"] = undefined!=that.userInfo.infoDetail?that.userInfo.infoDetail.dividendGuaranteeRate:0.00;
  1656. that.appAgentForm["liveRate"] = undefined!=that.userInfo.infoDetail?that.userInfo.infoDetail.liveRate:0.00;
  1657. that.appAgentForm["userId"] = that.userInfo.infoDetail.userId;
  1658. });
  1659. },
  1660. handleClick(tab, event) {
  1661. if("three" == tab.$options.propsData.name){
  1662. this.getIpList();
  1663. }
  1664. if("four" == tab.$options.propsData.name){
  1665. this.getAccountList();
  1666. }
  1667. if("five" == tab.$options.propsData.name){
  1668. this.getOrderList();
  1669. }
  1670. if("six" == tab.$options.propsData.name){
  1671. this.getLiveList();
  1672. }
  1673. if("seven" == tab.$options.propsData.name){
  1674. this.getGiftList();
  1675. }
  1676. if("eight" == tab.$options.propsData.name){
  1677. this.getBettingList();
  1678. }
  1679. }
  1680. }
  1681. };
  1682. </script>
  1683. <style scoped>
  1684. </style>