agent-old.blade.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  1. @extends('layouts.base')
  2. @section('title', '直推客户')
  3. @section('content')
  4. <!-- <link href="{{static_url('yunshop/css/member.css')}}" media="all" rel="stylesheet" type="text/css"/> -->
  5. <link href="{{static_url('yunshop/css/total.css')}}" media="all" rel="stylesheet" type="text/css" />
  6. <style scoped>
  7. .vue-title {
  8. display: flex;
  9. margin: 5px 0;
  10. line-height: 32px;
  11. font-size: 16px;
  12. color: #333;
  13. font-weight: 600;
  14. }
  15. .vue-title-left {
  16. width: 4px;
  17. height: 18px;
  18. margin-top: 6px;
  19. background: #29ba9c;
  20. display: inline-block;
  21. margin-right: 10px;
  22. }
  23. .vue-title-content {
  24. font-size: 14px;
  25. flex: 1;
  26. }
  27. .member-info {
  28. display: flex;
  29. margin: 38px;
  30. justify-content: space-between;
  31. }
  32. .search-top {
  33. display: flex;
  34. height: 200px;
  35. /* width: 742px; */
  36. }
  37. .top-item1 {
  38. flex: 1;
  39. }
  40. .top-item2 {
  41. width: 740px;
  42. }
  43. .audit,
  44. .is_follow {
  45. width: 60px;
  46. height: 30px;
  47. text-align: center;
  48. line-height: 30px;
  49. font-size: 14px;
  50. color: #fff;
  51. margin: 0 auto;
  52. border-radius: 4px;
  53. background-color: #13c7a7;
  54. }
  55. .un-audit {
  56. width: 60px;
  57. height: 22px;
  58. text-align: center;
  59. line-height: 22px;
  60. font-size: 14px;
  61. color: #fff;
  62. margin: 0 auto;
  63. border-radius: 4px;
  64. background-color: #a5a5a4;
  65. }
  66. .client_static {
  67. width: 110px;
  68. height: 30px;
  69. text-align: center;
  70. line-height: 30px;
  71. font-size: 14px;
  72. color: #fff;
  73. margin: 0 auto;
  74. border-radius: 4px;
  75. background-color: #13c7a7;
  76. }
  77. .un_follow {
  78. width: 70px;
  79. height: 30px;
  80. text-align: center;
  81. line-height: 30px;
  82. font-size: 14px;
  83. color: #fff;
  84. margin: 0 auto;
  85. border-radius: 4px;
  86. background-color: #ffb025;
  87. }
  88. .name-over {
  89. line-height: 37px;
  90. overflow: hidden;
  91. white-space: nowrap;
  92. text-overflow: ellipsis;
  93. }
  94. /* 分页 */
  95. .pagination-right {
  96. text-align: center;
  97. margin: 50px auto;
  98. }
  99. /* 列表 */
  100. .straight_table p {
  101. font-size: 12px;
  102. margin-top: 5px;
  103. font-family: SourceHanSansCN-Medium;
  104. font-size: 14px;
  105. font-weight: normal;
  106. font-stretch: normal;
  107. letter-spacing: 0px;
  108. /* color: #333333; */
  109. }
  110. .cell {
  111. text-align: center;
  112. }
  113. .keep {
  114. width: 80px;
  115. height: 30px;
  116. border-radius: 4px;
  117. line-height: 30px;
  118. font-family: MicrosoftYaHei;
  119. font-size: 14px;
  120. font-weight: 600 !important;
  121. font-stretch: normal;
  122. letter-spacing: 1px;
  123. color: #ffffff;
  124. margin: 0 auto;
  125. }
  126. .keep_already {
  127. background-color: #13c7a7;
  128. }
  129. .keep_cancel {
  130. background-color: #ffb025;
  131. }
  132. .keep_not {
  133. background-color: #a5a5a4;
  134. }
  135. .audit,
  136. .client_static {
  137. font-weight: 600 !important;
  138. }
  139. .btn_follow {
  140. height: 22px;
  141. line-height: 22px;
  142. color: #fff;
  143. font-weight: 600 !important;
  144. font-size: 12px;
  145. text-align: center;
  146. font-family: arial, "Hiragino Sans GB", "Microsoft Yahei", 微软雅黑, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti;
  147. margin: 0 auto;
  148. border-radius: 4px;
  149. }
  150. .is_follow {
  151. width: 60px;
  152. background-color: #13c7a7;
  153. }
  154. .un_follow {
  155. width: 70px;
  156. background-color: #ffb025;
  157. }
  158. .no_follow {
  159. width: 70px;
  160. background-color: #999999;
  161. }
  162. [v-cloak] {
  163. display: none;
  164. }
  165. .flexBox {
  166. height: 180px;
  167. display: flex;
  168. padding-bottom: 0px;
  169. }
  170. .search_box {
  171. /* border:1px solid red; */
  172. /* width:calc(100% - 200px); */
  173. flex: 1;
  174. padding-left: 13px;
  175. }
  176. .solid_e7 {
  177. width: 1px;
  178. height: 140px;
  179. background-color: #e7e7e7;
  180. margin: 10px 50px 0 0;
  181. }
  182. .index_pub {
  183. height: 42px;
  184. border-radius: 4px;
  185. margin-right: 20px;
  186. margin-bottom: 10px;
  187. }
  188. .index_01 {
  189. /* width: 180px; */
  190. width: 20%;
  191. }
  192. .index_02 {
  193. /* width: 300px; */
  194. width: 30%;
  195. }
  196. .index_03 {
  197. width: 202px;
  198. }
  199. .index_btn {
  200. width: 102px;
  201. height: 42px;
  202. border-radius: 4px;
  203. }
  204. .index_btn01 {
  205. background-color: #29ba9c;
  206. }
  207. .index_btn02 {
  208. width: 102px;
  209. color: #29ba9c;
  210. border: solid 1px #29ba9c;
  211. }
  212. .sum_text {
  213. font-family: SourceHanSansCN-Regular;
  214. font-size: 14px;
  215. font-weight: normal;
  216. font-stretch: normal;
  217. letter-spacing: 1px;
  218. color: #999999;
  219. }
  220. .el-table th>.cell {
  221. font-family: SourceHanSansCN-Medium;
  222. font-size: 14px;
  223. font-weight: 600;
  224. font-stretch: normal;
  225. letter-spacing: 0px;
  226. color: #666666;
  227. }
  228. .operate {
  229. width: 70px;
  230. height: 30px;
  231. border-radius: 4px;
  232. border: solid 1px #a2a2a2;
  233. }
  234. </style>
  235. <div class="all">
  236. <div id="app" v-cloak>
  237. <div class="total-head flexBox">
  238. <div class="search-top">
  239. <div class="top-item1">
  240. <div class="vue-title" style="margin-bottom:20px;">
  241. <div class="vue-title-left"></div>
  242. <div class="vue-title-content">搜索筛选</div>
  243. </div>
  244. <div class="search_box">
  245. <el-input class="index_pub index_01" v-model="mid" placeholder="请输入搜索ID" clearable></el-input>
  246. <el-input class="index_pub index_02" v-model="keyword" placeholder="可搜索昵称/姓名/手机号" clearable>
  247. </el-input>
  248. <el-select class="index_pub index_01" v-model="followed" placeholder="是否关注" clearable>
  249. <el-option label="取消关注" value="0">
  250. </el-option>
  251. <el-option label="已关注" value="1">
  252. </el-option>
  253. <el-option label="未关注" value="2">
  254. </el-option>
  255. </el-select>
  256. <el-select class="index_pub index_01" v-model="status" placeholder="状态" clearable>
  257. <el-option label="未审核" value="0">
  258. </el-option>
  259. <el-option label="已审核" value="2">
  260. </el-option>
  261. </el-select>
  262. <el-select class="index_pub index_01" v-model="isBack" placeholder="黑名单状态" clearable>
  263. <el-option label="否" value="0">
  264. </el-option>
  265. <el-option label="是" value="1">
  266. </el-option>
  267. </el-select>
  268. <el-button class="index_btn" type="primary" @click="search" @keyup.enter="search">搜索</el-button>
  269. <el-button class="index_btn index_btn02" @click="exports">导出
  270. </div>
  271. </div>
  272. </div>
  273. <div class="solid_e7"></div>
  274. <div class="top-item2">
  275. <div class="vue-title">
  276. <div class="vue-title-left"></div>
  277. <div class="vue-title-content">会员信息</div>
  278. </div>
  279. <div style="display:flex;margin-top:20px;">
  280. <div>
  281. <img style="width:90px;height:90px;" :src="avatar" alt="">
  282. </div>
  283. <div style="margin-left:10px;display:flex;flex-direction: column;justify-content: space-between;">
  284. <div style="color: #333333;font-weight:600"><span>姓名:[[realname]]</span><span style="margin-left: 30px;">手机号:[[mobile]]</span></div>
  285. <div style="color: #868686;">昵称:[[nickname]]</div>
  286. <div style="color: #868686;">余额:<span style="color:red">[[credit2]]</span> / 积分:<span style="color:red">[[credit1]]</span></div>
  287. </div>
  288. </div>
  289. </div>
  290. </div>
  291. <div class="total-floo">
  292. <div class="vue-title">
  293. <div class="vue-title-left"></div>
  294. <div class="vue-title-content" style="flex:none;margin-right:24px;">客户列表</div>
  295. <div class="sum_text">总数:[[total]]</div>
  296. </div>
  297. <el-table class="straight_table" :data="tableData" style="width: 100%;">
  298. <el-table-column width="80px" label="会员ID">
  299. <template slot-scope="scope">
  300. <p>[[ scope.row.uid ]]</p>
  301. </template>
  302. </el-table-column>
  303. <el-table-column label="推荐人">
  304. <template slot-scope="scope">
  305. <div v-if="scope.row.yz_member.parent_id">
  306. <p><img style="width:37px;height:37px;border-radius: 50%;" :src="scope.row.yz_member.agent.avatar" alt=""></p>
  307. <p class="name-over">[[ scope.row.yz_member.agent.nickname ]]</p>
  308. </div>
  309. <div v-else>
  310. <p v-if="scope.row.yz_member.is_agent===1" class="is_follow">总店</p>
  311. <p v-else class="un_follow">暂无</p>
  312. </div>
  313. </template>
  314. </el-table-column>
  315. <el-table-column label="粉丝">
  316. <template slot-scope="scope">
  317. <div>
  318. <p v-if="scope.row.avatar"><img style="width:37px;height:37px;border-radius: 50%;" :src="scope.row.avatar" alt=""></p>
  319. <p v-if="scope.row.fans_item" class="name-over">[[ scope.row.fans_item ]]</p>
  320. <p v-else class="name-over">未更新</p>
  321. </div>
  322. </template>
  323. </el-table-column>
  324. <el-table-column label="姓名">
  325. <template slot-scope="scope">
  326. <p>[[ scope.row.realname]]</p>
  327. </template>
  328. </el-table-column>
  329. <el-table-column label="手机号">
  330. <template slot-scope="scope">
  331. <p>[[ scope.row.mobile ]]</p>
  332. </template>
  333. </el-table-column>
  334. <el-table-column label="状态">
  335. <template slot-scope="scope">
  336. <div v-if="scope.row.yz_member.is_agent!==null && scope.row.yz_member.is_agent==1">
  337. <p v-if="scope.row.yz_member.status==0" class="un-audit">未审核</p>
  338. <p v-else-if="scope.row.yz_member.status==1" class="un-audit">未审核</p>
  339. <p v-else class="audit">已审核</p>
  340. </div>
  341. <div v-else>-</div>
  342. </template>
  343. </el-table-column>
  344. <el-table-column label="客户状态" width="200">
  345. <template slot-scope="scope">
  346. <p class="client_static" v-if="scope.row.yz_member.inviter===0">暂定用户</p>
  347. <p class="client_static" v-else>锁定关系客户</p>
  348. </template>
  349. </el-table-column>
  350. <el-table-column label="注册时间">
  351. <template slot-scope="scope">
  352. <p>[[timeDate(scope.row.createtime*1000)]]</p>
  353. </template>
  354. </el-table-column>
  355. <el-table-column label="关注">
  356. <template slot-scope="scope">
  357. <div v-if="scope.row.has_one_fans && scope.row.has_one_fans!==null">
  358. <p class="keep keep_already" v-if="scope.row.has_one_fans.followed == 1">已关注</p>
  359. <p class="keep keep_cancel" v-else>取消关注</p>
  360. </div>
  361. <div v-else>
  362. <p class="keep keep_not">未关注</p>
  363. </div>
  364. </template>
  365. </el-table-column>
  366. <el-table-column label="操作">
  367. <template slot-scope="scope">
  368. <el-popover placement="top" width="150" trigger="click">
  369. <el-link :href="'{{yzWebUrl('member.member.detail', array('id' => ''))}}'+[[scope.row.uid]]" :underline="false" style="height:30px;line-height:30px;"><i class="fa fa-edit"></i> 会员详情
  370. </el-link>
  371. <el-link :href="'{{yzWebUrl('order.order-list.index', array('member_id' => ''))}}'+[[scope.row.uid]]" :underline="false" style="height:30px;line-height:30px;"><i class="fa fa-list"></i>
  372. 会员订单</el-link>
  373. <el-link :href="'{{yzWebUrl('point.recharge.index', array('id' => ''))}}'+[[scope.row.uid]]" :underline="false" style="height:30px;line-height:30px;"><i class="fa fa-credit-card"></i>
  374. 充值积分</el-link>
  375. <el-link :href="'{{yzWebUrl('balance.recharge.index', array('member_id' => ''))}}'+[[scope.row.uid]]" :underline="false" style="height:30px;line-height:30px;"><i class="fa fa-money"></i>
  376. 充值余额
  377. </el-link>
  378. <el-link :href="'{{yzWebUrl('member.member.agent-old', array('id' => ''))}}'+[[scope.row.uid]]" :underline="false" style="height:30px;line-height:30px;"><i class="fa fa-exchange"></i>
  379. 直推客户
  380. </el-link>
  381. <el-link :href="'{{yzWebUrl('member.member.agent', array('id' => ''))}}'+[[scope.row.uid]]" :underline="false" style="height:30px;line-height:30px;"><i class="fa fa-exchange"></i>
  382. 团队客户
  383. </el-link>
  384. <el-link :href="'{{yzWebUrl('member.member.agent-parent', array('id' => ''))}}'+[[scope.row.uid]]" :underline="false" style="height:30px;line-height:30px;"><i class="fa fa-exchange"></i>
  385. 上级会员
  386. </el-link>
  387. <el-link :href="'{{yzWebUrl('member.member.black', array('black'=>0,'id' => ''))}}'+[[scope.row.uid]]" v-if="scope.row.yz_member.is_black==1" :underline="false" style="height:30px;line-height:30px;"><i class="fa fa-minus-circle"></i> 取消黑名单</el-link>
  388. <el-link :href="'{{yzWebUrl('member.member.black', array('black'=>1,'id' => ''))}}'+[[scope.row.uid]]" v-else :underline="false" style="height:30px;line-height:30px;"><i class="fa fa-minus-circle"></i> 设置黑名单</el-link>
  389. <el-button class="operate" slot="reference" size="mini" @click="handleEdit(scope.$index, scope.row)">操作
  390. </el-button>
  391. </el-popover>
  392. </template>
  393. </el-table-column>
  394. </el-table>
  395. </div>
  396. <!-- 分页 -->
  397. <div v-if="tableData.length!==0" class="fixed total-floo">
  398. <div class="fixed_box">
  399. <el-pagination background style="text-align: right;" @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-size="pagesize" layout="prev, pager, next, jumper" :total="total">
  400. </el-pagination>
  401. </div>
  402. </div>
  403. </div>
  404. </div>
  405. @include("finance.balance.verifyPopupComponent")
  406. <script>
  407. var vm = new Vue({
  408. el: '#app',
  409. delimiters: ['[[', ']]'],
  410. data() {
  411. return {
  412. avatar: "",
  413. nickname: "",
  414. realname: "",
  415. mobile: "",
  416. credit2: "",
  417. credit1: "",
  418. mid: '',
  419. keyword: '',
  420. followed: '',
  421. status: '',
  422. isBack: '',
  423. tableData: [],
  424. itemList: [],
  425. currentPage: 1,
  426. pagesize: 6,
  427. total: 0,
  428. row_id: '',
  429. isAttentionClass: 1
  430. }
  431. },
  432. created() {
  433. g = this;
  434. //优化在不同设备固定定位挡住的现象设置父元素的内边距
  435. window.onload = function() {
  436. let all = document.querySelector(".all");
  437. let h = window.innerHeight * 0.04;
  438. all.style.paddingBottom = h + "px";
  439. }
  440. let id = this.getParam('id');
  441. if (this.getParam('id') && id !== -1) {
  442. this.row_id = Number(this.getParam('id'))
  443. this.postVipInfoList(1);
  444. }
  445. //全局监听searchBtnt enter事件
  446. document.onkeydown = (e) => {
  447. let key = window.event.keyCode;
  448. if (key == 13) {
  449. g.search();
  450. }
  451. }
  452. },
  453. updated() {
  454. console.log(this.isAttentionClass);
  455. },
  456. methods: {
  457. getParam(name) {
  458. var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
  459. var r = window.location.search.substr(1).match(reg);
  460. if (r != null) return unescape(r[2]);
  461. return null;
  462. },
  463. handleEdit(index, row) {
  464. },
  465. //会员信息列表
  466. postVipInfoList(page) {
  467. this.$http.post("{!!yzWebFullUrl('member.member.agent-old-show')!!}", {
  468. page,
  469. id: this.row_id,
  470. aid: this.mid,
  471. keyword: this.keyword,
  472. followed: this.followed,
  473. status: this.status,
  474. isblack: this.isBack
  475. }).then(res => {
  476. let {
  477. member,
  478. list,
  479. } = res.body.data;
  480. //会员头像
  481. this.avatar = member.avatar;
  482. //昵称
  483. this.nickname = member.nickname;
  484. //真实姓名
  485. this.realname = member.realname;
  486. //手机号码
  487. this.mobile = member.mobile;
  488. //余额
  489. this.credit2 = member.credit2;
  490. //积分
  491. this.credit1 = member.credit1;
  492. console.log(res);
  493. console.log(member);
  494. let {
  495. current_page,
  496. per_page,
  497. total
  498. } = list;
  499. if (list.data !== null && list.data.length !== 0) {
  500. //客户列表
  501. this.tableData = list.data;
  502. }else{
  503. this.tableData = [];
  504. }
  505. // console.log(this.tableData);
  506. console.log(current_page, per_page, total);
  507. //当前页
  508. this.currentPage = current_page;
  509. //每页显示几行
  510. this.pagesize = per_page;
  511. //总数量
  512. this.total = total;
  513. })
  514. },
  515. //当前页码
  516. handleCurrentChange(page) {
  517. this.postVipInfoList(page)
  518. },
  519. //搜索
  520. search() {
  521. //搜索当前粉丝
  522. this.postVipInfoList(this.currentPage);
  523. },
  524. //时间的转换
  525. timeDate(date) {
  526. let d = new Date(date);
  527. let resDate = d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate() + ' ' + d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds();
  528. return resDate;
  529. },
  530. //导出
  531. exports() {
  532. let isSubmied = false;
  533. if (verifyed && (expireTime === 0 || expireTime * 1000 < Date.now())) {
  534. showGetVerifyCodePopup();
  535. return false;
  536. }
  537. if (isSubmied) {
  538. return false;
  539. } else {
  540. isSubmied = true;
  541. }
  542. // 不能换行
  543. let url = `{!! yzWebFullUrl('member.member.do-export')!!}&id=${this.row_id}` + "&aid=" + this.mid + "&keyword=" + this.keyword + "&followed=" + this.followed + "&status=" + this.status + "&isblack=" + this.isBack;
  544. window.location.href = url;
  545. // console.log(url);
  546. },
  547. //回退
  548. hisGo(i) {
  549. // console.log(i);
  550. history.go(i)
  551. }
  552. },
  553. filters: {
  554. filtersData(data) {
  555. if (data.has_one_fans !== null && data.has_one_fans !== "") {
  556. if (data.has_one_fans.followed !== null) {
  557. if (data.has_one_fans.followed == 0) {
  558. return "取消关注"
  559. } else if (data.has_one_fans.followed == 1) {
  560. return "已关注"
  561. } else if (data.has_one_fans.followed == 2) {
  562. return "未关注"
  563. }
  564. }
  565. } else {
  566. return "已关注"
  567. }
  568. }
  569. }
  570. })
  571. </script>
  572. @endsection