userListQy.vue 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455
  1. <template>
  2. <div>
  3. <el-tabs v-model="activeName" @tab-click="handleClick">
  4. <el-tab-pane label="企业总用户" name="first">
  5. <div style="margin:5px;display: inline-block;">
  6. <span>手机号:</span>
  7. <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入手机号"
  8. v-model="phone"></el-input>
  9. </div>&emsp;&emsp;
  10. <div style="margin:5px;display: inline-block;">
  11. <span>昵称:</span>
  12. <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入昵称"
  13. v-model="campus"></el-input>
  14. </div>&emsp;&emsp;
  15. <!-- <div style="margin:5px;display: inline-block;">
  16. <span>邀请码:</span>
  17. <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请码"
  18. v-model="invitationCodeT"></el-input>
  19. </div>&emsp;&emsp;
  20. <div style="margin:5px;display: inline-block;">
  21. <span>邀请人邀请码:</span>
  22. <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请人邀请码"
  23. v-model="inviterCodeT"></el-input>
  24. </div>&emsp;&emsp; -->
  25. <div style="margin:5px;display: inline-block;">
  26. <span>开始时间:</span>
  27. <el-date-picker style="width: 160px;margin-left: 10px;" v-model="startTime" align="right"
  28. type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始时间">
  29. </el-date-picker>&nbsp;&nbsp;&nbsp;
  30. </div>
  31. <div style="margin:5px;display: inline-block;">
  32. <span>截止时间:</span>
  33. <el-date-picker style="width: 160px;margin-left: 10px;" v-model="endTime" align="right" type="date"
  34. format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择截止时间">
  35. </el-date-picker>
  36. </div>
  37. <div style="display: inline-block;">
  38. <el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="select">查询
  39. </el-button>
  40. <el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置
  41. </el-button>
  42. <el-button style='margin-left:15px;' size="mini" type="warning" icon="document" :disabled="!isAuth('user:daochu')" @click="exportBtn">导出Excel
  43. </el-button>
  44. </div>
  45. <div style="color: orange;"> * 导出数据提示:导出数据前请进行时间或者状态等筛选,否则导出单量过多易出现卡顿或系统崩溃</div>
  46. <el-table v-loading="tableDataLoading" :data="tableData.list">
  47. <el-table-column prop="userId" label="编号" width="80" fixed="left"></el-table-column>
  48. <el-table-column fixed prop="userName" label="昵称" width="150">
  49. <template slot-scope="scope">
  50. <span style="color: #f56c6c;" v-if="!isAuth('userList:phone') && scope.row.userName1">{{ scope.row.userName1 ? scope.row.userName1 : '未绑定' }}</span>
  51. <span style="color: #f56c6c;" v-else>{{ scope.row.userName ? scope.row.userName : '未绑定' }}</span>
  52. </template>
  53. </el-table-column>
  54. <el-table-column prop="sex" label="性别">
  55. <template slot-scope="scope">
  56. <span v-if="scope.row.sex==1">男</span>
  57. <span v-else-if="scope.row.sex==2">女</span>
  58. <span v-else>未设置</span>
  59. </template>
  60. </el-table-column>
  61. <el-table-column label="图像">
  62. <template slot-scope="scope">
  63. <img v-if="scope.row.avatar==null" src="~@/assets/img/avatar.png" alt="" width="40"
  64. height="40">
  65. <img v-else :src="scope.row.avatar" alt="" width="40" height="40">
  66. </template>
  67. </el-table-column>
  68. <el-table-column prop="phone" label="手机号" width="160">
  69. <template slot-scope="scope">
  70. <span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)" v-if="isAuth('userList:phone')">
  71. {{ scope.row.phone ? scope.row.phone : '未绑定' }}
  72. </span>
  73. <span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)" v-else>
  74. {{ scope.row.phone1 ? scope.row.phone1 : '-' }}
  75. </span>
  76. </template>
  77. </el-table-column>
  78. <el-table-column prop="invitationCode" label="邀请码">
  79. <template slot-scope="scope">
  80. <span style="color: #4f9dec;cursor: pointer;"
  81. @click="onChangeShow(scope.row.invitationCode,scope.row.userId,scope.row.userName)">{{ scope.row.invitationCode }}</span>
  82. </template>
  83. </el-table-column>
  84. <el-table-column label="邀请人邀请码">
  85. <template slot-scope="scope">
  86. <span style="color: #4f9dec;cursor: pointer;"
  87. @click="updates2(scope.row.inviterCode)">{{ scope.row.inviterCode ? scope.row.inviterCode : '未绑定' }}</span>
  88. </template>
  89. </el-table-column>
  90. <el-table-column prop="zhiFuBaoName" label="支付宝名称">
  91. <template slot-scope="scope">
  92. <span>{{ scope.row.zhiFuBaoName ? scope.row.zhiFuBaoName : '未绑定' }}</span>
  93. </template>
  94. </el-table-column>
  95. <el-table-column prop="zhiFuBao" label="支付宝账号">
  96. <template slot-scope="scope">
  97. <span>{{ scope.row.zhiFuBao ? scope.row.zhiFuBao : '未绑定' }}</span>
  98. </template>
  99. </el-table-column>
  100. <!-- <el-table-column prop="rate" label="商家佣金比例" width="150">
  101. <template slot-scope="scope">
  102. <span>{{scope.row.rate?scope.row.rate:'0'}}</span>
  103. <el-button size="mini" :disabled="!isAuth('userList:updatebl')"
  104. style="color: #4f9dec;background: #fff;border: none;" @click="xiugai(scope.row,'rate')">
  105. 修改</el-button>
  106. </span>
  107. </template>
  108. </el-table-column> -->
  109. <el-table-column prop="zhiRate" label="一级佣金比例" width="150">
  110. <template slot-scope="scope">
  111. <span>{{scope.row.zhiRate?scope.row.zhiRate:'0'}}</span>
  112. <el-button size="mini" :disabled="!isAuth('userList:updatebl')"
  113. style="color: #4f9dec;background: #fff;border: none;"
  114. @click="xiugai(scope.row,'zhiRate')">修改</el-button>
  115. </span>
  116. </template>
  117. </el-table-column>
  118. <el-table-column prop="feiRate" label="二级佣金比例" width="150">
  119. <template slot-scope="scope">
  120. <span>{{scope.row.feiRate?scope.row.feiRate:'0'}}</span>
  121. <el-button size="mini" :disabled="!isAuth('userList:updatebl')"
  122. style="color: #4f9dec;background: #fff;border: none;"
  123. @click="xiugai(scope.row,'feiRate')">修改</el-button>
  124. </span>
  125. </template>
  126. </el-table-column>
  127. <el-table-column prop="isCompanyVip" label="是否会员">
  128. <template slot-scope="scope">
  129. <span v-if="scope.row.isCompanyVip==1">是</span>
  130. <span v-else>否</span>
  131. </template>
  132. </el-table-column>
  133. <el-table-column prop="companyMonthTime" label="会员到期时间" width="160"></el-table-column>
  134. <el-table-column prop="createTime" label="创建时间" width="160"></el-table-column>
  135. <el-table-column prop="state " label="状态">
  136. <template slot-scope="scope">
  137. <el-switch v-model="scope.row.status" @change="change(scope.row.status,scope.row.userId)"
  138. :active-value="openValue" :disabled="!isAuth('userList:delete')"
  139. :inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
  140. </el-switch>
  141. </template>
  142. </el-table-column>
  143. <el-table-column fixed="right" label="操作" width="120">
  144. <template slot-scope="scope">
  145. <el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
  146. <el-button size="mini" type="warning" @click="zengsongVip(scope.row)" :disabled="!isAuth('userList:updateVip')" >修改会员</el-button>
  147. <el-button size="mini" type="warning" @click="quxiaoVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.isCompanyVip==1" plain>取消会员</el-button>
  148. <el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
  149. @click="deleteuser(scope.row)">删除用户</el-button>
  150. </template>
  151. </el-table-column>
  152. </el-table>
  153. <div style="text-align: center;margin-top: 10px;">
  154. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  155. :page-sizes="[10, 20, 30, 40, 50]" :page-size="limit" :current-page="page"
  156. layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
  157. </el-pagination>
  158. </div>
  159. </el-tab-pane>
  160. <el-tab-pane label="会员用户" name="yixing">
  161. <div style="margin:5px;display: inline-block;">
  162. <span>手机号:</span>
  163. <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入手机号"
  164. v-model="phone"></el-input>
  165. </div>&emsp;&emsp;
  166. <div style="margin:5px;display: inline-block;">
  167. <span>昵称:</span>
  168. <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入昵称"
  169. v-model="campus"></el-input>
  170. </div>&emsp;&emsp;
  171. <!-- <div style="margin:5px;display: inline-block;">
  172. <span>邀请码:</span>
  173. <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请码"
  174. v-model="invitationCodeT"></el-input>
  175. </div>&emsp;&emsp;
  176. <div style="margin:5px;display: inline-block;">
  177. <span>邀请人邀请码:</span>
  178. <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请人邀请码"
  179. v-model="inviterCodeT"></el-input>
  180. </div>&emsp;&emsp; -->
  181. <div style="margin:5px;display: inline-block;">
  182. <span>开始时间:</span>
  183. <el-date-picker style="width: 160px;margin-left: 10px;" v-model="startTime" align="right"
  184. type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始时间">
  185. </el-date-picker>&nbsp;&nbsp;&nbsp;
  186. </div>
  187. <div style="margin:5px;display: inline-block;">
  188. <span>截止时间:</span>
  189. <el-date-picker style="width: 160px;margin-left: 10px;" v-model="endTime" align="right" type="date"
  190. format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择截止时间">
  191. </el-date-picker>
  192. </div>
  193. <div style="display: inline-block;">
  194. <el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="select">查询
  195. </el-button>
  196. <el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置
  197. </el-button>
  198. <el-button style='margin-left:15px;' size="mini" type="warning" icon="document" :disabled="!isAuth('user:daochu')" @click="exportBtn">导出Excel
  199. </el-button>
  200. </div>
  201. <div style="color: orange;"> * 导出数据提示:导出数据前请进行时间或者状态等筛选,否则导出单量过多易出现卡顿或系统崩溃</div>
  202. <el-table v-loading="tableDataLoading" :data="tableData.list">
  203. <el-table-column prop="userId" label="编号" width="80" fixed="left"></el-table-column>
  204. <el-table-column fixed prop="userName" label="昵称" width="150">
  205. <template slot-scope="scope">
  206. <span style="color: #f56c6c;" v-if="!isAuth('userList:phone') && scope.row.userName1">{{ scope.row.userName1 ? scope.row.userName1 : '未绑定' }}</span>
  207. <span style="color: #f56c6c;" v-else>{{ scope.row.userName ? scope.row.userName : '未绑定' }}</span>
  208. </template>
  209. </el-table-column>
  210. <el-table-column prop="sex" label="性别">
  211. <template slot-scope="scope">
  212. <span v-if="scope.row.sex==1">男</span>
  213. <span v-else-if="scope.row.sex==2">女</span>
  214. <span v-else>未设置</span>
  215. </template>
  216. </el-table-column>
  217. <el-table-column label="图像">
  218. <template slot-scope="scope">
  219. <img v-if="scope.row.avatar==null" src="~@/assets/img/avatar.png" alt="" width="40"
  220. height="40">
  221. <img v-else :src="scope.row.avatar" alt="" width="40" height="40">
  222. </template>
  223. </el-table-column>
  224. <el-table-column prop="phone" label="手机号" width="160">
  225. <template slot-scope="scope">
  226. <span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)" v-if="isAuth('userList:phone')">
  227. {{ scope.row.phone ? scope.row.phone : '未绑定' }}
  228. </span>
  229. <span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)" v-else>
  230. {{ scope.row.phone1 ? scope.row.phone1 : '-' }}
  231. </span>
  232. </template>
  233. </el-table-column>
  234. <el-table-column prop="invitationCode" label="邀请码"></el-table-column>
  235. <el-table-column label="邀请人邀请码">
  236. <template slot-scope="scope">
  237. <span style="color: #4f9dec;cursor: pointer;"
  238. @click="updates2(scope.row.inviterCode)">{{ scope.row.inviterCode ? scope.row.inviterCode : '未绑定' }}</span>
  239. </template>
  240. </el-table-column>
  241. <el-table-column prop="zhiFuBaoName" label="支付宝名称">
  242. <template slot-scope="scope">
  243. <span>{{ scope.row.zhiFuBaoName ? scope.row.zhiFuBaoName : '未绑定' }}</span>
  244. </template>
  245. </el-table-column>
  246. <el-table-column prop="zhiFuBao" label="支付宝账号">
  247. <template slot-scope="scope">
  248. <span>{{ scope.row.zhiFuBao ? scope.row.zhiFuBao : '未绑定' }}</span>
  249. </template>
  250. </el-table-column>
  251. <!-- <el-table-column prop="rate" label="商家佣金比例" width="150">
  252. <template slot-scope="scope">
  253. <span>{{scope.row.rate?scope.row.rate:'0'}}</span>
  254. <el-button size="mini" :disabled="!isAuth('userList:updatebl')"
  255. style="color: #4f9dec;background: #fff;border: none;" @click="xiugai(scope.row,'rate')">
  256. 修改</el-button>
  257. </span>
  258. </template>
  259. </el-table-column> -->
  260. <el-table-column prop="zhiRate" label="一级佣金比例" width="150">
  261. <template slot-scope="scope">
  262. <span>{{scope.row.zhiRate?scope.row.zhiRate:'0'}}</span>
  263. <el-button size="mini" :disabled="!isAuth('userList:updatebl')"
  264. style="color: #4f9dec;background: #fff;border: none;"
  265. @click="xiugai(scope.row,'zhiRate')">修改</el-button>
  266. </span>
  267. </template>
  268. </el-table-column>
  269. <el-table-column prop="feiRate" label="二级佣金比例" width="150">
  270. <template slot-scope="scope">
  271. <span>{{scope.row.feiRate?scope.row.feiRate:'0'}}</span>
  272. <el-button size="mini" :disabled="!isAuth('userList:updatebl')"
  273. style="color: #4f9dec;background: #fff;border: none;"
  274. @click="xiugai(scope.row,'feiRate')">修改</el-button>
  275. </span>
  276. </template>
  277. </el-table-column>
  278. <el-table-column prop="isCompanyVip" label="是否会员">
  279. <template slot-scope="scope">
  280. <span v-if="scope.row.isCompanyVip==1">是</span>
  281. <span v-else>否</span>
  282. </template>
  283. </el-table-column>
  284. <el-table-column prop="companyMonthTime" label="会员到期时间" width="160"></el-table-column>
  285. <el-table-column prop="createTime" label="创建时间" width="160"></el-table-column>
  286. <el-table-column prop="state " label="状态">
  287. <template slot-scope="scope">
  288. <el-switch v-model="scope.row.status" @change="change(scope.row.status,scope.row.userId)"
  289. :active-value="openValue" :disabled="!isAuth('userList:delete')"
  290. :inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
  291. </el-switch>
  292. </template>
  293. </el-table-column>
  294. <el-table-column fixed="right" label="操作" width="120">
  295. <template slot-scope="scope">
  296. <el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
  297. <el-button size="mini" type="warning" @click="zengsongVip(scope.row)" :disabled="!isAuth('userList:updateVip')" >修改会员</el-button>
  298. <el-button size="mini" type="warning" @click="quxiaoVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.isCompanyVip==1" plain>取消会员</el-button>
  299. <el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
  300. @click="deleteuser(scope.row)">删除用户</el-button>
  301. </template>
  302. </el-table-column>
  303. </el-table>
  304. <div style="text-align: center;margin-top: 10px;">
  305. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  306. :page-sizes="[10, 20, 30, 40, 50]" :page-size="limit" :current-page="page"
  307. layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
  308. </el-pagination>
  309. </div>
  310. </el-tab-pane>
  311. <el-tab-pane label="普通用户" name="erxing">
  312. <div style="margin:5px;display: inline-block;">
  313. <span>手机号:</span>
  314. <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入手机号"
  315. v-model="phone"></el-input>
  316. </div>&emsp;&emsp;
  317. <div style="margin:5px;display: inline-block;">
  318. <span>昵称:</span>
  319. <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入昵称"
  320. v-model="campus"></el-input>
  321. </div>&emsp;&emsp;
  322. <!-- <div style="margin:5px;display: inline-block;">
  323. <span>邀请码:</span>
  324. <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请码"
  325. v-model="invitationCodeT"></el-input>
  326. </div>&emsp;&emsp;
  327. <div style="margin:5px;display: inline-block;">
  328. <span>邀请人邀请码:</span>
  329. <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请人邀请码"
  330. v-model="inviterCodeT"></el-input>
  331. </div>&emsp;&emsp; -->
  332. <div style="margin:5px;display: inline-block;">
  333. <span>开始时间:</span>
  334. <el-date-picker style="width: 160px;margin-left: 10px;" v-model="startTime" align="right"
  335. type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始时间">
  336. </el-date-picker>&nbsp;&nbsp;&nbsp;
  337. </div>
  338. <div style="margin:5px;display: inline-block;">
  339. <span>截止时间:</span>
  340. <el-date-picker style="width: 160px;margin-left: 10px;" v-model="endTime" align="right" type="date"
  341. format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择截止时间">
  342. </el-date-picker>
  343. </div>
  344. <div style="display: inline-block;">
  345. <el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="select">查询
  346. </el-button>
  347. <el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置
  348. </el-button>
  349. <el-button style='margin-left:15px;' size="mini" type="warning" icon="document" :disabled="!isAuth('user:daochu')" @click="exportBtn">导出Excel
  350. </el-button>
  351. </div>
  352. <div style="color: orange;"> * 导出数据提示:导出数据前请进行时间或者状态等筛选,否则导出单量过多易出现卡顿或系统崩溃</div>
  353. <el-table v-loading="tableDataLoading" :data="tableData.list">
  354. <el-table-column prop="userId" label="编号" width="80" fixed="left"></el-table-column>
  355. <el-table-column fixed prop="userName" label="昵称" width="150">
  356. <template slot-scope="scope">
  357. <span style="color: #f56c6c;" v-if="!isAuth('userList:phone') && scope.row.userName1">{{ scope.row.userName1 ? scope.row.userName1 : '未绑定' }}</span>
  358. <span style="color: #f56c6c;" v-else>{{ scope.row.userName ? scope.row.userName : '未绑定' }}</span>
  359. </template>
  360. </el-table-column>
  361. <el-table-column prop="sex" label="性别">
  362. <template slot-scope="scope">
  363. <span v-if="scope.row.sex==1">男</span>
  364. <span v-else-if="scope.row.sex==2">女</span>
  365. <span v-else>未设置</span>
  366. </template>
  367. </el-table-column>
  368. <el-table-column label="图像">
  369. <template slot-scope="scope">
  370. <img v-if="scope.row.avatar==null" src="~@/assets/img/avatar.png" alt="" width="40"
  371. height="40">
  372. <img v-else :src="scope.row.avatar" alt="" width="40" height="40">
  373. </template>
  374. </el-table-column>
  375. <el-table-column prop="phone" label="手机号" width="160">
  376. <template slot-scope="scope">
  377. <span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)" v-if="isAuth('userList:phone')">
  378. {{ scope.row.phone ? scope.row.phone : '未绑定' }}
  379. </span>
  380. <span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)" v-else>
  381. {{ scope.row.phone1 ? scope.row.phone1 : '-' }}
  382. </span>
  383. </template>
  384. </el-table-column>
  385. <el-table-column prop="invitationCode" label="邀请码"></el-table-column>
  386. <el-table-column label="邀请人邀请码">
  387. <template slot-scope="scope">
  388. <span style="color: #4f9dec;cursor: pointer;"
  389. @click="updates2(scope.row.inviterCode)">{{ scope.row.inviterCode ? scope.row.inviterCode : '未绑定' }}</span>
  390. </template>
  391. </el-table-column>
  392. <el-table-column prop="zhiFuBaoName" label="支付宝名称">
  393. <template slot-scope="scope">
  394. <span>{{ scope.row.zhiFuBaoName ? scope.row.zhiFuBaoName : '未绑定' }}</span>
  395. </template>
  396. </el-table-column>
  397. <el-table-column prop="zhiFuBao" label="支付宝账号">
  398. <template slot-scope="scope">
  399. <span>{{ scope.row.zhiFuBao ? scope.row.zhiFuBao : '未绑定' }}</span>
  400. </template>
  401. </el-table-column>
  402. <!-- <el-table-column prop="rate" label="商家佣金比例" width="150">
  403. <template slot-scope="scope">
  404. <span>{{scope.row.rate?scope.row.rate:'0'}}</span>
  405. <el-button size="mini" :disabled="!isAuth('userList:updatebl')"
  406. style="color: #4f9dec;background: #fff;border: none;" @click="xiugai(scope.row,'rate')">
  407. 修改</el-button>
  408. </span>
  409. </template>
  410. </el-table-column> -->
  411. <el-table-column prop="zhiRate" label="一级佣金比例" width="150">
  412. <template slot-scope="scope">
  413. <span>{{scope.row.zhiRate?scope.row.zhiRate:'0'}}</span>
  414. <el-button size="mini" :disabled="!isAuth('userList:updatebl')"
  415. style="color: #4f9dec;background: #fff;border: none;"
  416. @click="xiugai(scope.row,'zhiRate')">修改</el-button>
  417. </span>
  418. </template>
  419. </el-table-column>
  420. <el-table-column prop="feiRate" label="二级佣金比例" width="150">
  421. <template slot-scope="scope">
  422. <span>{{scope.row.feiRate?scope.row.feiRate:'0'}}</span>
  423. <el-button size="mini" :disabled="!isAuth('userList:updatebl')"
  424. style="color: #4f9dec;background: #fff;border: none;"
  425. @click="xiugai(scope.row,'feiRate')">修改</el-button>
  426. </span>
  427. </template>
  428. </el-table-column>
  429. <el-table-column prop="isCompanyVip" label="是否会员">
  430. <template slot-scope="scope">
  431. <span v-if="scope.row.isCompanyVip==1">是</span>
  432. <span v-else>否</span>
  433. </template>
  434. </el-table-column>
  435. <el-table-column prop="companyMonthTime" label="会员到期时间" width="160"></el-table-column>
  436. <el-table-column prop="createTime" label="创建时间" width="160"></el-table-column>
  437. <el-table-column prop="state " label="状态">
  438. <template slot-scope="scope">
  439. <el-switch v-model="scope.row.status" @change="change(scope.row.status,scope.row.userId)"
  440. :active-value="openValue" :disabled="!isAuth('userList:delete')"
  441. :inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
  442. </el-switch>
  443. </template>
  444. </el-table-column>
  445. <el-table-column fixed="right" label="操作" width="120">
  446. <template slot-scope="scope">
  447. <el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
  448. <el-button size="mini" type="warning" @click="zengsongVip(scope.row)" :disabled="!isAuth('userList:updateVip')" >修改会员</el-button>
  449. <el-button size="mini" type="warning" @click="quxiaoVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.isCompanyVip==1" plain>取消会员</el-button>
  450. <el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
  451. @click="deleteuser(scope.row)">删除用户</el-button>
  452. </template>
  453. </el-table-column>
  454. </el-table>
  455. <div style="text-align: center;margin-top: 10px;">
  456. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  457. :page-sizes="[10, 20, 30, 40, 50]" :page-size="limit" :current-page="page"
  458. layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
  459. </el-pagination>
  460. </div>
  461. </el-tab-pane>
  462. <!-- 修改比例 -->
  463. <el-dialog title="修改佣金比例" :visible.sync="dialogFormVisible2" center>
  464. <div style="margin-bottom: 10px;">
  465. <span style="width: 200px;display: inline-block;text-align: right;">佣金比例:</span>
  466. <el-input style="width:50%;" v-model="proportion" type="number" :min="0" :controls="false"
  467. placeholder="请输入佣金比例"></el-input>
  468. </div>
  469. <div slot="footer" class="dialog-footer">
  470. <el-button @click="dialogFormVisible2 = false">取 消</el-button>
  471. <el-button type="primary" @click="StairNoticeTo2()">确 定</el-button>
  472. </div>
  473. </el-dialog>
  474. <!-- 任务拒绝弹框 -->
  475. <el-dialog title="审核拒绝" :visible.sync="dialogFormVisible" center>
  476. <div style="margin-bottom: 10px;">
  477. <span
  478. style="width: 200px;display: inline-block;text-align: right;position: relative;top: -70px;">拒绝理由:</span>
  479. <el-input style="width:50%;" v-model="content" type="textarea" :rows="4" placeholder="请输入拒绝理由">
  480. </el-input>
  481. </div>
  482. <div slot="footer" class="dialog-footer">
  483. <el-button @click="dialogFormVisible = false">取 消</el-button>
  484. <el-button type="primary" @click="refuseto()">确 定</el-button>
  485. </div>
  486. </el-dialog>
  487. </el-tabs>
  488. <!-- 不可提现添加金额 -->
  489. <el-dialog title="修改" :visible.sync="dialogFormVisible1" center>
  490. <div style="margin-bottom: 10px;">
  491. <span style="width: 200px;display: inline-block;text-align: right;">次数:</span>
  492. <el-input style="width:50%;" v-model="money" type="number" :min="0" :max="100" :controls="false"
  493. placeholder="请输入次数"></el-input>
  494. </div>
  495. <div slot="footer" class="dialog-footer">
  496. <el-button @click="dialogFormVisible1 = false">取 消</el-button>
  497. <el-button type="primary" @click="StairNoticeTo1()">确 定</el-button>
  498. </div>
  499. </el-dialog>
  500. <!-- 修改会员 -->
  501. <el-dialog title="修改会员" :visible.sync="dialogFormVisibleZs" center>
  502. <!-- <div style="margin-bottom: 10px;">
  503. <span style="width: 200px;display: inline-block;text-align: right;">类型:</span>
  504. <el-radio-group v-model="type">
  505. <el-radio :label="1">添加</el-radio>
  506. <el-radio :label="2">减少</el-radio>
  507. </el-radio-group>
  508. </div> -->
  509. <div style="margin-bottom: 20px;position: relative;">
  510. <div style="width: 200px;display: inline-block;text-align: right;position: absolute;top: 0;">会员种类:</div>
  511. <div class="ruleitem" style="display: inline-block;margin-left: 205px;">
  512. <span><el-radio v-for="(item,index) in vipData" :key="index" v-model="vipId"
  513. :label="item.id">{{item.vipName}}</el-radio></span>
  514. </div>
  515. </div>
  516. <div style="margin-bottom: 20px;">
  517. <span style="width: 200px;display: inline-block;text-align: right;">会员等级:</span>
  518. <el-radio-group v-model="vipNameType">
  519. <el-radio :label="0">月会员</el-radio>
  520. <el-radio :label="1">季会员</el-radio>
  521. <el-radio :label="2">年会员</el-radio>
  522. </el-radio-group>
  523. </div>
  524. <div style="margin-bottom: 10px;">
  525. <span style="width: 200px;display: inline-block;text-align: right;">修改天数:</span>
  526. <el-input style="width:50%;" v-model="proportion" type="number" :min="0" :controls="false"
  527. placeholder="请输入修改天数"></el-input>
  528. </div>
  529. <div slot="footer" class="dialog-footer">
  530. <el-button @click="dialogFormVisibleZs = false">取 消</el-button>
  531. <el-button type="primary" @click="updateVip()">确 定</el-button>
  532. </div>
  533. </el-dialog>
  534. <el-dialog title="邀请人员" :visible.sync="isShow">
  535. <el-button type="text" @click="downloadTemplate">生成邀请码</el-button>
  536. <el-table :data="dataSource">
  537. <el-table-column property="userName" label="姓名"></el-table-column>
  538. <el-table-column property="createTime" label="邀请时间"></el-table-column>
  539. </el-table>
  540. <el-pagination
  541. small
  542. background
  543. @current-change="onChangeDataSourcePage"
  544. layout="prev, pager, next"
  545. :current-page="dataParams.page"
  546. :page-size="dataParams.limit"
  547. :total="dataParams.total">
  548. </el-pagination>
  549. </el-dialog>
  550. </div>
  551. </template>
  552. <script>
  553. export default {
  554. data() {
  555. return {
  556. openValue: 1,
  557. closeValue: 2,
  558. state: 'false',
  559. limit: 10,
  560. page: 1,
  561. phone: '',
  562. nickNam: '',
  563. platform: 'all',
  564. isRelation: -1,
  565. isTuan: -1,
  566. value: '',
  567. payData: [],
  568. nickName: '',
  569. grade: '',
  570. name: '',
  571. activeName: 'first',
  572. tableDataLoading: true,
  573. tableData: [],
  574. platforms: [{
  575. value: 'all',
  576. label: '全部'
  577. }, {
  578. value: 'wap',
  579. label: '网站'
  580. }, {
  581. value: 'app',
  582. label: 'APP'
  583. }, {
  584. value: 'weixin',
  585. label: '微信公众号'
  586. },
  587. {
  588. value: 'mp',
  589. label: '微信小程序'
  590. }
  591. ],
  592. campus: '',
  593. homeData1: [],
  594. isAuthentication: 2,
  595. dialogFormVisible2: false,
  596. dialogFormVisible: false,
  597. proportion: '',
  598. texts: '',
  599. userIdss: '',
  600. content: '',
  601. status: -1,
  602. helpTakeId: '',
  603. checkBoxData: [], //多选框选择的值
  604. userResumesStatus: '',
  605. userResumesStatuslist: [{
  606. value: '',
  607. label: '全部'
  608. }, {
  609. value: 1,
  610. label: '简历展示'
  611. }, {
  612. value: 2,
  613. label: '简历隐藏'
  614. }, {
  615. value: 3,
  616. label: '审核中'
  617. }, ],
  618. dialogFormVisible1:false,
  619. money:'',
  620. userId:'',
  621. member:'',
  622. weekMember:'',
  623. isUserVip:'',
  624. isCompanyVip:'',
  625. info: {
  626. stockDate: this.getNowTime(), //日期
  627. },
  628. info2: {
  629. stockDate2: this.getNowTime2(), //日期
  630. },
  631. startTime: '',
  632. endTime: '',
  633. dialogFormVisibleZs:false,
  634. isVip:'',
  635. type:1,
  636. proportion:'',
  637. vipData: [],
  638. vipId: '',
  639. vipNameType: 0,
  640. // inviterCodeT: '',
  641. // invitationCodeT: '',
  642. isShow: false,
  643. dataSource: [{
  644. date: '2026-1-15 22:02:07',
  645. userName: '用户',
  646. address: '中国'
  647. }],
  648. dataParams: {
  649. page: 1,
  650. total: 0,
  651. limit: 10,
  652. },
  653. invitationCode: '',
  654. invitationUserId: ''
  655. }
  656. },
  657. methods: {
  658. // 显示拉人头
  659. onChangeShow(code, id, userName) {
  660. this.isShow = true
  661. this.invitationCode = code
  662. this.invitationUserId = id
  663. this.userName = userName
  664. this.getDataSource()
  665. },
  666. getDataSource(page = 1) {
  667. this.$http({
  668. url: this.$http.adornUrl(`user/selectUserListByInvitationCode?page=${page}&limit=${this.dataParams.limit}&invitationCode=${this.invitationCode}`),
  669. method: 'get'
  670. }).then((res) => {
  671. this.dataSource = res.data.data.list
  672. this.dataParams = {
  673. page: res.data.data.currPage,
  674. limit: res.data.data.pageSize,
  675. total: res.data.data.totalCount,
  676. }
  677. })
  678. },
  679. onChangeDataSourcePage(page) {
  680. this.getDataSource(page)
  681. },
  682. base64ToFileDownload(base64Data, fileName, fileType) {
  683. const mimeMap = {
  684. png: 'image/png',
  685. jpg: 'image/jpeg',
  686. jpeg: 'image/jpeg',
  687. pdf: 'application/pdf',
  688. xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
  689. docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
  690. txt: 'text/plain'
  691. };
  692. const mime = mimeMap[fileType] || 'application/octet-stream';
  693. let pureBase64 = base64Data;
  694. if (base64Data.includes('base64,')) {
  695. pureBase64 = base64Data.split('base64,')[1];
  696. }
  697. const byteCharacters = window.atob(pureBase64);
  698. const byteNumbers = new Array(byteCharacters.length);
  699. for (let i = 0; i < byteCharacters.length; i++) {
  700. byteNumbers[i] = byteCharacters.charCodeAt(i);
  701. }
  702. const byteArray = new Uint8Array(byteNumbers);
  703. const blob = new Blob([byteArray], { type: mime });
  704. const blobUrl = window.URL.createObjectURL(blob);
  705. const a = document.createElement('a');
  706. a.href = blobUrl;
  707. a.download = `${fileName}.${fileType}`;
  708. document.body.appendChild(a);
  709. a.click();
  710. document.body.removeChild(a);
  711. window.URL.revokeObjectURL(blobUrl);
  712. },
  713. // 下载海报
  714. downloadTemplate() {
  715. this.$http({
  716. url: this.$http.adornUrl(`invite/selectInviteAndPoster?userId=${this.invitationUserId}`),
  717. method: 'get',
  718. }).then((res) => {
  719. if(res.data.code == 500){
  720. this.$message.error(res.data.msg)
  721. }
  722. this.base64ToFileDownload(res.data.data.image, this.userName, 'png')
  723. })
  724. },
  725. //处理默认选中当前日期
  726. getNowTime() {
  727. var now = new Date()
  728. var year = now.getFullYear() //得到年份
  729. var month = now.getMonth() //得到月份
  730. var date = now.getDate() //得到日期
  731. month = month + 1
  732. month = month.toString().padStart(2, '0')
  733. date = date.toString().padStart(2, '0')
  734. var defaultDate = `${year}-${month}-${date}`
  735. return defaultDate
  736. this.$set(this.info, 'stockDate', defaultDate)
  737. },
  738. //处理默认选中当前日期
  739. getNowTime2() {
  740. var now = new Date()
  741. var year = now.getFullYear() //得到年份
  742. var month = now.getMonth() - now.getMonth() //得到月份
  743. var date = now.getDate() - now.getDate() + 1 //得到日期
  744. month = month + 1
  745. month = month.toString().padStart(2, '0')
  746. date = date.toString().padStart(2, '0')
  747. var defaultDate = `${year}-${month}-${date}`
  748. return defaultDate
  749. this.$set(this.info, 'stockDate', defaultDate)
  750. },
  751. // 多选
  752. changeFun(val) {
  753. this.checkBoxData = val;
  754. },
  755. // 状态
  756. change(val, userId) {
  757. this.$http({
  758. url: this.$http.adornUrl(`user/updateUserStatusByUserId?userId=${userId}`),
  759. method: 'get',
  760. data: this.$http.adornData({})
  761. }).then(({
  762. data
  763. }) => {
  764. this.$message({
  765. message: '操作成功',
  766. type: 'success',
  767. duration: 1500,
  768. onClose: () => {
  769. this.dataSelect()
  770. }
  771. })
  772. })
  773. },
  774. // 详情跳转
  775. updates(row) {
  776. this.$router.push({
  777. path: '/userDetailQ',
  778. query: {
  779. userId: row.userId
  780. }
  781. })
  782. },
  783. // 详情跳转
  784. updates2(inviterCode) {
  785. if(inviterCode){
  786. this.$http({
  787. url: this.$http.adornUrl('user/selectUserByInvitationCode'),
  788. method: 'get',
  789. params: this.$http.adornParams({
  790. 'invitationCode':inviterCode
  791. })
  792. }).then(({
  793. data
  794. }) => {
  795. if (data.code == 0) {
  796. if(data.data.userEntity){
  797. this.$router.push({
  798. path: '/userDetailQ',
  799. query: {
  800. userId: data.data.userEntity.userId
  801. }
  802. })
  803. }
  804. } else {
  805. this.$message({
  806. message: data.msg,
  807. type: 'warning',
  808. duration: 1500,
  809. onClose: () => {}
  810. })
  811. }
  812. })
  813. }
  814. // this.$router.push({
  815. // path: '/userDetailQ',
  816. // query: {
  817. // userId: row.superior
  818. // }
  819. // })
  820. },
  821. // 获取会员类型
  822. classSelectVipType() {
  823. this.$http({
  824. url: this.$http.adornUrl('vipDetails/selectVipDetailsList'),
  825. method: 'get',
  826. params: this.$http.adornParams({
  827. })
  828. }).then(({
  829. data
  830. }) => {
  831. if (data.code == 0) {
  832. this.tableDataLoading = false
  833. let returnData = data.data
  834. this.vipData = returnData.list
  835. } else {
  836. this.$notify({
  837. title: '提示',
  838. duration: 1800,
  839. message: data.msg,
  840. type: 'warning'
  841. });
  842. }
  843. })
  844. },
  845. handleClick(tab, event) {
  846. this.page = 1
  847. this.campus = ''
  848. // this.inviterCodeT = ''
  849. // this.invitationCodeT = ''
  850. this.phone = ''
  851. this.checkBoxData = []
  852. if (tab._props.label == '企业总用户') {
  853. this.isAuthentication = 2
  854. this.weekMember = ''
  855. this.userResumesStatus = ''
  856. this.member = ''
  857. this.isUserVip = ''
  858. this.isCompanyVip = ''
  859. this.dataSelect()
  860. }
  861. if (tab._props.label == '会员用户') {
  862. this.isAuthentication = 2
  863. this.userResumesStatus = ''
  864. this.member = ''
  865. this.isUserVip = ''
  866. this.isCompanyVip = 1
  867. this.weekMember = ''
  868. this.dataSelect()
  869. }
  870. if (tab._props.label == '普通用户') {
  871. this.isAuthentication = 2
  872. this.userResumesStatus = ''
  873. this.member = ''
  874. this.isUserVip = ''
  875. this.isCompanyVip = 0
  876. this.weekMember = ''
  877. this.dataSelect()
  878. }
  879. if (tab._props.label == '周卡用户') {
  880. this.isAuthentication = 0
  881. this.userResumesStatus = ''
  882. this.member = ''
  883. this.weekMember = ''
  884. this.dataSelect()
  885. }
  886. },
  887. handleSizeChange(val) {
  888. this.limit = val
  889. this.dataSelect()
  890. },
  891. handleCurrentChange(val) {
  892. this.page = val
  893. this.dataSelect()
  894. },
  895. handleSizeChange1(val) {
  896. this.limit = val
  897. this.paySelect()
  898. },
  899. handleCurrentChange1(val) {
  900. this.page = val
  901. this.paySelect()
  902. },
  903. // select自动选择
  904. selectTrigger() {
  905. this.dataSelect()
  906. },
  907. // 查询
  908. select() {
  909. this.page = 1
  910. this.dataSelect()
  911. },
  912. select2() {
  913. this.paySelect()
  914. },
  915. // 重置
  916. cleans() {
  917. this.page = 1
  918. this.campus = ''
  919. this.phone = ''
  920. this.inviterCodeT = ''
  921. // this.invitationCodeT = ''
  922. // this.userResumesStatus = ''
  923. this.startTime = ''
  924. this.endTime = ''
  925. this.dataSelect()
  926. },
  927. //删除用户
  928. deleteuser(row) {
  929. let delid = row.userId
  930. this.$confirm(`确定删除此条信息?`, '提示', {
  931. confirmButtonText: '确定',
  932. cancelButtonText: '取消',
  933. type: 'warning'
  934. }).then(() => {
  935. this.$http({
  936. url: this.$http.adornUrl(`user/deleteUserByUserId/${delid}`),
  937. method: 'post',
  938. params: this.$http.adornData({})
  939. }).then(({
  940. data
  941. }) => {
  942. if (data.code == 0) {
  943. this.$message({
  944. message: '删除成功',
  945. type: 'success',
  946. duration: 1500,
  947. onClose: () => {
  948. this.dataSelect()
  949. }
  950. })
  951. } else {
  952. this.$message({
  953. message: data.msg,
  954. type: 'warning',
  955. duration: 1500,
  956. onClose: () => {}
  957. })
  958. }
  959. })
  960. })
  961. },
  962. // 封号
  963. updates1(row) {
  964. },
  965. // 获取社区数据列表
  966. homeSelect() {
  967. this.tableDataLoading = true
  968. this.$http({
  969. url: this.$http.adornUrl('helpCampus/selectCampusList'),
  970. method: 'get',
  971. params: this.$http.adornParams({
  972. // 'page':this.page,
  973. // 'limit':this.limit,
  974. // 'content':this.content
  975. })
  976. }).then(({
  977. data
  978. }) => {
  979. this.tableDataLoading = false
  980. let returnData = data.data;
  981. this.homeData1 = returnData
  982. })
  983. },
  984. // 筛选信息
  985. animeDat2(state) {
  986. this.dataSelect()
  987. },
  988. // 获取数据列表
  989. dataSelect() {
  990. if(this.startTime!=""&&this.startTime !==null){
  991. if (this.endTime == ''||this.endTime ==null) {
  992. this.$notify({
  993. title: '提示',
  994. duration: 1800,
  995. message: '请选择截止时间',
  996. type: 'warning'
  997. });
  998. return
  999. }
  1000. }
  1001. if(this.endTime!=""&&this.endTime !==null){
  1002. if (this.startTime == ''||this.startTime ==null) {
  1003. this.$notify({
  1004. title: '提示',
  1005. duration: 1800,
  1006. message: '请选择开始时间',
  1007. type: 'warning'
  1008. });
  1009. return
  1010. }
  1011. }
  1012. this.tableDataLoading = true
  1013. this.$http({
  1014. url: this.$http.adornUrl('user/selectUserList'),
  1015. method: 'get',
  1016. params: this.$http.adornParams({
  1017. 'page': this.page,
  1018. 'limit': this.limit,
  1019. 'member': this.member,
  1020. 'phone': this.phone,
  1021. 'userName': this.campus,
  1022. 'userType': this.isAuthentication,
  1023. // 'userResumesStatus': this.userResumesStatus,
  1024. 'weekMember':this.weekMember,
  1025. 'isUserVip':this.isUserVip,
  1026. 'isCompanyVip':this.isCompanyVip,
  1027. 'startTime': this.startTime,
  1028. 'endTime': this.endTime,
  1029. // 'inviterCode': this.inviterCodeT,
  1030. // 'invitationCode': this.invitationCodeT,
  1031. })
  1032. }).then(({
  1033. data
  1034. }) => {
  1035. this.tableDataLoading = false
  1036. if(data.data&&data.data.list.length>0){
  1037. for(var i in data.data.list){
  1038. var pattern = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
  1039. var phone1 = data.data.list[i].phone
  1040. var userName1 = data.data.list[i].userName
  1041. if(pattern.test(phone1)){
  1042. var one = phone1.slice(0, 3)
  1043. var two = phone1.slice(7, 11)
  1044. data.data.list[i].phone1 = one+'****'+two
  1045. }
  1046. if(pattern.test(userName1)){
  1047. var one = userName1.slice(0, 3)
  1048. var two = userName1.slice(7, 11)
  1049. data.data.list[i].userName1 = one+'****'+two
  1050. }
  1051. }
  1052. }
  1053. let returnData = data.data
  1054. this.tableData = returnData
  1055. })
  1056. },
  1057. xiugai(row, text) {
  1058. if (text == 'rate') {
  1059. this.proportion = row.rate
  1060. }
  1061. if (text == 'zhiRate') {
  1062. this.proportion = row.zhiRate
  1063. }
  1064. if (text == 'feiRate') {
  1065. this.proportion = row.feiRate
  1066. }
  1067. this.texts = text
  1068. this.userIdss = row.userId
  1069. this.dialogFormVisible2 = true
  1070. },
  1071. StairNoticeTo2() {
  1072. var datas = {}
  1073. if (this.texts == 'rate') {
  1074. datas.rate = this.proportion
  1075. }
  1076. if (this.texts == 'zhiRate') {
  1077. datas.zhiRate = this.proportion
  1078. }
  1079. if (this.texts == 'feiRate') {
  1080. datas.feiRate = this.proportion
  1081. }
  1082. datas.userId = this.userIdss
  1083. this.$http({
  1084. url: this.$http.adornUrl('user/updateUserByUserId'),
  1085. method: 'post',
  1086. data: this.$http.adornData(datas)
  1087. }).then(({
  1088. data
  1089. }) => {
  1090. console.log('data', data)
  1091. this.$message({
  1092. message: '修改成功',
  1093. type: 'success',
  1094. duration: 1500,
  1095. onClose: () => {
  1096. this.dialogFormVisible2 = false
  1097. this.dataSelect()
  1098. }
  1099. })
  1100. })
  1101. },
  1102. //任务通过
  1103. passClick(id) {
  1104. this.status = 1
  1105. this.content = '同意'
  1106. var ids = id ? [id] : this.checkBoxData.map(item => {
  1107. return item.userId
  1108. })
  1109. this.$http({
  1110. url: this.$http.adornUrl('user/updateUserResumes'),
  1111. method: 'post',
  1112. params: this.$http.adornParams({
  1113. 'userIds': ids,
  1114. 'status': this.status,
  1115. 'auditContent': this.content
  1116. })
  1117. }).then(({
  1118. data
  1119. }) => {
  1120. if (data.code == 0) {
  1121. this.$message({
  1122. message: '操作成功',
  1123. type: 'success',
  1124. duration: 1500,
  1125. onClose: () => {
  1126. this.content = ''
  1127. this.status = -1
  1128. this.dataSelect()
  1129. }
  1130. })
  1131. } else {
  1132. this.$message({
  1133. message: data.msg,
  1134. type: 'error',
  1135. duration: 1500,
  1136. onClose: () => {
  1137. this.content = ''
  1138. this.status = -1
  1139. this.dataSelect()
  1140. }
  1141. })
  1142. }
  1143. })
  1144. },
  1145. //单条任务通过
  1146. passClicks(row) {
  1147. this.status = 1
  1148. this.content = '同意'
  1149. this.$http({
  1150. url: this.$http.adornUrl('user/updateUserResumes'),
  1151. method: 'post',
  1152. params: this.$http.adornParams({
  1153. 'userIds': row.userId,
  1154. 'status': this.status,
  1155. 'auditContent': this.content
  1156. })
  1157. }).then(({
  1158. data
  1159. }) => {
  1160. if (data.code == 0) {
  1161. this.$message({
  1162. message: '操作成功',
  1163. type: 'success',
  1164. duration: 1500,
  1165. onClose: () => {
  1166. this.content = ''
  1167. this.status = -1
  1168. this.dataSelect()
  1169. }
  1170. })
  1171. } else {
  1172. this.$message({
  1173. message: data.msg,
  1174. type: 'error',
  1175. duration: 1500,
  1176. onClose: () => {
  1177. this.content = ''
  1178. this.status = -1
  1179. this.dataSelect()
  1180. }
  1181. })
  1182. }
  1183. })
  1184. },
  1185. //任务拒绝
  1186. refuseClick(rows) {
  1187. this.status = 2
  1188. this.helpTakeId = rows.userId
  1189. this.content = ''
  1190. this.dialogFormVisible = true
  1191. },
  1192. refuseto() {
  1193. if (this.content == '') {
  1194. this.$notify({
  1195. title: '提示',
  1196. duration: 1800,
  1197. message: '请输入拒绝理由',
  1198. type: 'warning'
  1199. });
  1200. return
  1201. }
  1202. this.$http({
  1203. url: this.$http.adornUrl('user/updateUserResumes'),
  1204. method: 'post',
  1205. params: this.$http.adornParams({
  1206. 'userIds': this.helpTakeId,
  1207. 'status': this.status,
  1208. 'auditContent': this.content
  1209. })
  1210. }).then(({
  1211. data
  1212. }) => {
  1213. this.dialogFormVisible = false
  1214. this.$message({
  1215. message: '操作成功',
  1216. type: 'success',
  1217. duration: 1500,
  1218. onClose: () => {
  1219. this.content = ''
  1220. this.status = -1
  1221. this.dataSelect()
  1222. }
  1223. })
  1224. })
  1225. },
  1226. // 不可提现金额充值
  1227. rechargenone(userId) {
  1228. this.userId = userId
  1229. this.dialogFormVisible1 = true
  1230. },
  1231. StairNoticeTo1() {
  1232. if (this.money == '') {
  1233. this.$notify({
  1234. title: '提示',
  1235. duration: 1800,
  1236. message: '请输入次数',
  1237. type: 'warning'
  1238. })
  1239. return
  1240. }
  1241. this.$http({
  1242. url: this.$http.adornUrl('user/updateUserViewResumes'),
  1243. method: 'post',
  1244. params: this.$http.adornParams({
  1245. 'userId':this.userId,
  1246. 'num':this.money
  1247. })
  1248. }).then(({
  1249. data
  1250. }) => {
  1251. if (data.code == 0) {
  1252. this.$message({
  1253. message: '修改成功',
  1254. type: 'success',
  1255. duration: 1500,
  1256. onClose: () => {
  1257. this.money = ''
  1258. this.dataSelect()
  1259. }
  1260. })
  1261. this.dialogFormVisible1 = false
  1262. } else {
  1263. this.$message.error(data.msg)
  1264. }
  1265. })
  1266. },
  1267. // 导出
  1268. exportBtn() {
  1269. var endTime=this.endTime
  1270. if(this.endTime!=''){
  1271. endTime=this.endTime+" 23:59:59"
  1272. }
  1273. this.$http({
  1274. url: this.$http.adornUrl('user/exportExcelUser'),
  1275. method: 'get',
  1276. responseType: 'blob',
  1277. params: this.$http.adornParams({
  1278. // 'page': page,
  1279. // 'size': this.size,
  1280. 'member': this.member,
  1281. 'phone': this.phone,
  1282. 'userName': this.campus,
  1283. 'userType': this.isAuthentication,
  1284. // 'userResumesStatus': this.userResumesStatus,
  1285. 'weekMember':this.weekMember,
  1286. 'isUserVip':this.isUserVip,
  1287. 'isCompanyVip':this.isCompanyVip,
  1288. 'startTime': this.startTime,
  1289. 'endTime': this.endTime,
  1290. // 'inviterCode': this.inviterCodeT,
  1291. // 'invitationCode': this.invitationCodeT,
  1292. })
  1293. }).then(({
  1294. data
  1295. }) => {
  1296. let blob = new Blob([data], {
  1297. type: 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
  1298. })
  1299. if (window.navigator.msSaveOrOpenBlob) {
  1300. navigator.msSaveBlob(blob)
  1301. } else {
  1302. let url = window.URL.createObjectURL(blob)
  1303. let elink = document.createElement('a')
  1304. elink.download = '企业用户列表.xlsx'
  1305. elink.style.display = 'none'
  1306. elink.href = url
  1307. document.body.appendChild(elink)
  1308. elink.click()
  1309. document.body.removeChild(elink)
  1310. }
  1311. })
  1312. },
  1313. // 修改会员弹框
  1314. zengsongVip(row){
  1315. this.type = 1
  1316. this.proportion = ''
  1317. this.userIdss = row.userId
  1318. this.dialogFormVisibleZs = true
  1319. this.vipId=''
  1320. this.vipNameType = 0
  1321. this.classSelectVipType()
  1322. },
  1323. // 设置会员
  1324. updateVip(row){
  1325. if (this.vipId == '') {
  1326. this.$notify({
  1327. title: '提示',
  1328. duration: 1800,
  1329. message: '请选择会员种类',
  1330. type: 'warning'
  1331. });
  1332. return
  1333. }
  1334. if (this.proportion === '') {
  1335. this.$notify({
  1336. title: '提示',
  1337. duration: 1800,
  1338. message: '请输入天数',
  1339. type: 'warning'
  1340. });
  1341. return
  1342. }
  1343. this.$http({
  1344. url: this.$http.adornUrl('vipDetails/giveUserVip'),
  1345. method: 'post',
  1346. params: this.$http.adornParams({
  1347. 'userId':this.userIdss,
  1348. 'num':this.proportion,
  1349. 'vipType':2,
  1350. 'vipId': this.vipId,
  1351. 'vipNameType': this.vipNameType,
  1352. // 'type':this.type
  1353. })
  1354. }).then(({
  1355. data
  1356. }) => {
  1357. if(data.code==0){
  1358. this.$message({
  1359. message: '操作成功',
  1360. type: 'success',
  1361. duration: 1500,
  1362. onClose: () => {
  1363. this.dialogFormVisibleZs = false
  1364. this.dataSelect()
  1365. }
  1366. })
  1367. }else{
  1368. this.$message({
  1369. message: data.msg,
  1370. type: 'warning',
  1371. duration: 1500,
  1372. onClose: () => {
  1373. this.dataSelect()
  1374. }
  1375. })
  1376. }
  1377. })
  1378. },
  1379. // 取消会员
  1380. quxiaoVip(row){
  1381. this.$confirm(`确定要取消会员?`, '提示', {
  1382. confirmButtonText: '确定',
  1383. cancelButtonText: '取消',
  1384. type: 'warning'
  1385. }).then(() => {
  1386. this.$http({
  1387. url: this.$http.adornUrl('vipDetails/cancelUserVip'),
  1388. method: 'post',
  1389. // data: this.$http.adornData({
  1390. params: this.$http.adornParams({
  1391. 'userId':row.userId,
  1392. 'vipType':2,
  1393. })
  1394. }).then(({
  1395. data
  1396. }) => {
  1397. if(data.code==0){
  1398. this.$message({
  1399. message: '操作成功',
  1400. type: 'success',
  1401. duration: 1500,
  1402. onClose: () => {
  1403. this.dataSelect()
  1404. }
  1405. })
  1406. }else{
  1407. this.$message({
  1408. message: data.msg,
  1409. type: 'warning',
  1410. duration: 1500,
  1411. onClose: () => {
  1412. }
  1413. })
  1414. }
  1415. })
  1416. })
  1417. },
  1418. },
  1419. mounted() {
  1420. // this.homeSelect()
  1421. this.dataSelect()
  1422. }
  1423. }
  1424. </script>
  1425. <style scoped="scoped">
  1426. .el-button+.el-button {
  1427. margin-left: 0 !important;
  1428. margin-top: 5px !important;
  1429. }
  1430. </style>