index.html 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530
  1. <link rel="stylesheet" href="__CDN__/assets/addons/shopro/libs/element/element.css">
  2. <link rel="stylesheet" href="__CDN__/assets/addons/shopro/libs/common.css">
  3. <style>
  4. #agentIndex {
  5. color: #444;
  6. background: #fff;
  7. padding-bottom: 30px;
  8. font-size: 12px;
  9. }
  10. .shopro-reset-button {
  11. margin-right: 20px;
  12. }
  13. .reject-reason-item {
  14. width: 140px;
  15. margin-right: 14px;
  16. }
  17. .shopro-edit-cancel {
  18. color: #848089;
  19. cursor: pointer;
  20. }
  21. .theme-cursor {
  22. color: #6E3DC8;
  23. cursor: pointer;
  24. }
  25. body .table-image {
  26. border-radius: 15px;
  27. width: 30px;
  28. height: 30px;
  29. overflow: hidden;
  30. border: 1px solid #e6e6e6;
  31. }
  32. .shopro-refresh-button {
  33. margin-right: 20px;
  34. margin-bottom: 20px;
  35. }
  36. .shopro-screen-item-vague .shopro-screen-condition {
  37. width: 242px;
  38. }
  39. .shopro-screen-item-vague .el-select {
  40. width: 100px;
  41. }
  42. .agent-apply-item-tip {
  43. font-size: 12px;
  44. line-height: 12px;
  45. color: #58575A;
  46. margin-bottom: 14px;
  47. display: flex;
  48. justify-content: space-between;
  49. align-items: center;
  50. }
  51. .agent-apply-item {
  52. margin-bottom: 20px;
  53. }
  54. .agent-apply-item-identity {
  55. width: 153px;
  56. min-height: 42px;
  57. background: #E6E6E6;
  58. border-radius: 4px;
  59. overflow: hidden;
  60. display: flex;
  61. align-items: center;
  62. }
  63. .agent-apply-item-tip-delete {
  64. color: #F49300;
  65. cursor: pointer;
  66. margin-right: 14px;
  67. }
  68. .color-ED655F {
  69. color: #ED655F;
  70. }
  71. .theme-cursor {
  72. color: #6E3DC8;
  73. cursor: pointer;
  74. }
  75. .color-999 {
  76. color: #999;
  77. }
  78. .color-0ACE97 {
  79. color: #0ACE97;
  80. }
  81. .popover-container .table-image-identity {
  82. width: 100px;
  83. height: 60px;
  84. border-radius: 4px;
  85. }
  86. .unit-tip-item {
  87. color: #626066;
  88. font-size: 12px;
  89. margin-left: 6px;
  90. line-height: 18px;
  91. }
  92. .nice-validator .el-input__inner {
  93. vertical-align: baseline !important;
  94. }
  95. [v-cloak] {
  96. display: none
  97. }
  98. </style>
  99. <script src="__CDN__/assets/addons/shopro/libs/vue.js"></script>
  100. <script src="__CDN__/assets/addons/shopro/libs/element/element.js"></script>
  101. <script src="__CDN__/assets/addons/shopro/libs/moment.js"></script>
  102. <div id="agentIndex" v-cloak v-loading="isAjax">
  103. <div class="shopro-tabs-container">
  104. <el-tabs v-model="activeTabsName" @tab-click="tabshandleClick">
  105. <el-tab-pane v-for="tabs in tabsList" :label="tabs.label" :name="tabs.name"></el-tab-pane>
  106. </el-tabs>
  107. </div>
  108. <div class="shopro-screen-container">
  109. <div class="shopro-button shopro-refresh-button" @click="getListData">
  110. <i class="el-icon-refresh"></i>
  111. </div>
  112. <div class="display-flex shopro-screen-item shopro-screen-item-vague">
  113. <div class="shopro-screen-condition">
  114. <el-input placeholder="请输入内容" v-model="searchForm.form_1_value" class="input-with-select" size="small">
  115. <el-select v-model="searchForm.form_1_key" slot="prepend" placeholder="请选择">
  116. <el-option label="会员ID" value="user_id"></el-option>
  117. <el-option label="会员昵称" value="nickname"></el-option>
  118. <el-option label="手机号" value="mobile"></el-option>
  119. </el-select>
  120. </el-input>
  121. </div>
  122. </div>
  123. <div class="display-flex shopro-screen-item">
  124. <div class="shopro-screen-tip">分销商等级</div>
  125. <div class="shopro-screen-condition">
  126. <el-select v-model="searchForm.level" placeholder="请选择" size="small">
  127. <el-option v-for="item in agentLevelList" :key="item.level"
  128. :label="item.level!='all'?item.name+'(等级'+item.level+')':item.name" :value="item.level">
  129. {{item.name}}
  130. <span v-if="item.level!='all'">(等级{{item.level}})</span>
  131. </el-option>
  132. </el-select>
  133. </div>
  134. </div>
  135. <div class="display-flex shopro-screen-item" v-if="activeTabsName!='pending'">
  136. <div class="shopro-screen-tip">审核状态</div>
  137. <div class="shopro-screen-condition">
  138. <el-select v-model="searchForm.status" placeholder="请选择" size="small">
  139. <el-option v-for="item in agentStatusOptions" :key="item.value" :label="item.label"
  140. :value="item.value">
  141. </el-option>
  142. </el-select>
  143. </div>
  144. </div>
  145. <!-- <div class="display-flex shopro-screen-item">
  146. <div class="shopro-screen-tip">申请时间</div>
  147. <div>
  148. <el-date-picker v-model="searchForm.createtime" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
  149. size="small" format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期"
  150. end-placeholder="结束日期">
  151. </el-date-picker>
  152. </div>
  153. </div> -->
  154. <div class="display-flex shopro-screen-item">
  155. <div class="shopro-screen-tip">更新时间</div>
  156. <div>
  157. <el-date-picker v-model="searchForm.updatetime" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
  158. size="small" format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期"
  159. end-placeholder="结束日期">
  160. </el-date-picker>
  161. </div>
  162. </div>
  163. <div class="display-flex shopro-screen-item-button">
  164. <div class="shopro-button shopro-reset-button" @click="screenEmpty">重置</div>
  165. <div class="shopro-button shopro-screen-button" @click="handleCurrentChange(1)">筛选</div>
  166. </div>
  167. </div>
  168. <div class="shopro-table-container" v-loading="isAjaxtable">
  169. <el-table v-if="activeTabsName=='all'" :data="listData" border stripe :cell-class-name="tableCellClassName"
  170. :header-cell-class-name="tableCellClassName">
  171. <el-table-column label="ID" prop="user_id" width="70">
  172. </el-table-column>
  173. <el-table-column label="分销商信息" width="220">
  174. <template slot-scope="scope">
  175. <div v-if="scope.row.user" class="display-flex">
  176. <div class="table-image">
  177. <el-image :src="Fast.api.cdnurl(scope.row.user.avatar)" fit="contain">
  178. <div slot="error" class="image-slot">
  179. <i class="el-icon-picture-outline"></i>
  180. </div>
  181. </el-image>
  182. </div>
  183. <div class="ellipsis-item">{{scope.row.user.nickname?scope.row.user.nickname:'-'}}</div>
  184. </div>
  185. <div v-else>-</div>
  186. </template>
  187. </el-table-column>
  188. <el-table-column label="手机号" width="120">
  189. <template slot-scope="scope">
  190. <div v-if="scope.row.user && scope.row.user.mobile">{{scope.row.user.mobile}}</div>
  191. <div v-else>-</div>
  192. </template>
  193. </el-table-column>
  194. <el-table-column label="等级" width="160">
  195. <template slot-scope="scope">
  196. <div class="display-flex">
  197. <div class="ellipsis-item">
  198. <span>{{(scope.row.agent_level &&
  199. scope.row.agent_level.name)?scope.row.agent_level.name:'-'}}</span>
  200. <span>(等级{{scope.row.level}})</span>
  201. </div>
  202. </div>
  203. </template>
  204. </el-table-column>
  205. <el-table-column label="累计佣金" min-width="100">
  206. <template slot-scope="scope">
  207. <div>{{scope.row.total_income}}<span class="unit-tip-item">元</span></div>
  208. </template>
  209. </el-table-column>
  210. <el-table-column label="消费金额" min-width="100">
  211. <template slot-scope="scope">
  212. <div>{{scope.row.user?scope.row.user.total_consume:'-'}}<span class="unit-tip-item">元</span></div>
  213. </template>
  214. </el-table-column>
  215. <el-table-column label="直推分销业绩" min-width="200">
  216. <template slot-scope="scope">
  217. <div>{{scope.row.order_money}}元/{{scope.row.order_count}}单</div>
  218. </template>
  219. </el-table-column>
  220. <el-table-column label="上级分销商" min-width="140">
  221. <template slot-scope="scope">
  222. <div v-if="scope.row.parent_agent && scope.row.parent_agent_id!=0" class="display-flex"
  223. @click="operation('edit',scope.row.parent_agent.id)">
  224. <div class="table-image">
  225. <el-image :src="Fast.api.cdnurl(scope.row.parent_agent.avatar)" fit="contain">
  226. <div slot="error" class="image-slot">
  227. <i class="el-icon-picture-outline"></i>
  228. </div>
  229. </el-image>
  230. </div>
  231. <div class="ellipsis-item theme-cursor">
  232. {{scope.row.parent_agent.nickname?scope.row.parent_agent.nickname:'-'}}</div>
  233. </div>
  234. <div style="justify-content: center;" v-else>-</div>
  235. </template>
  236. </el-table-column>
  237. <el-table-column label="一级用户人数" width="120">
  238. <template slot-scope="scope">
  239. <div>
  240. <span v-if="scope.row.user">{{scope.row.user.child_user_count_1}}
  241. <span class="unit-tip-item">人</span>
  242. </span>
  243. <span v-else>-</span>
  244. </div>
  245. </template>
  246. </el-table-column>
  247. <el-table-column label="一级分销商人数" width="120">
  248. <template slot-scope="scope">
  249. <div>{{scope.row.child_agent_count_1}}<span class="unit-tip-item">人</span></div>
  250. </template>
  251. </el-table-column>
  252. <el-table-column fixed="right" label="状态" width="100">
  253. <template slot-scope="scope">
  254. <div class="display-flex">
  255. <span v-if="scope.row.status=='normal'" class="display-flex">
  256. <span class="shopro-status-dot shopro-status-normal-dot"></span>
  257. <span class="shopro-status-normal">{{scope.row.status_text}}</span>
  258. </span>
  259. <span v-else-if="scope.row.status=='forbidden'" class="display-flex">
  260. <span class="shopro-status-dot shopro-status-nonormal-dot"></span>
  261. <span class="shopro-status-nonormal">{{scope.row.status_text}}</span>
  262. </span>
  263. <span v-else-if="scope.row.status=='pending'" class="display-flex">
  264. <span class="shopro-status-dot shopro-status-default-dot"></span>
  265. <span class="shopro-status-default">{{scope.row.status_text}}</span>
  266. </span>
  267. <span v-else-if="scope.row.status=='freeze'" class="display-flex">
  268. <span class="shopro-status-dot shopro-status-special-dot"></span>
  269. <span class="shopro-status-special">{{scope.row.status_text}}</span>
  270. </span>
  271. </div>
  272. </template>
  273. </el-table-column>
  274. <el-table-column label="创建时间" width="150">
  275. <template slot-scope="scope">
  276. <div>
  277. {{moment(scope.row.createtime*1000).format("YYYY-MM-DD HH:mm:ss")}}
  278. </div>
  279. </template>
  280. </el-table-column>
  281. <el-table-column fixed="right" label="操作" min-width="80">
  282. <template slot-scope="scope">
  283. <div class="theme-cursor" @click="operation('edit',scope.row.user_id)">
  284. 查看
  285. </div>
  286. </template>
  287. </el-table-column>
  288. </el-table>
  289. <el-table v-if="activeTabsName=='pending'" :data="listData" border stripe :cell-class-name="tableCellClassName2"
  290. :header-cell-class-name="tableCellClassName2">
  291. <el-table-column label="ID" prop="user_id" width="70">
  292. </el-table-column>
  293. <el-table-column label="分销商信息" min-width="240">
  294. <template slot-scope="scope">
  295. <div v-if="scope.row.user" class="display-flex">
  296. <div class="table-image">
  297. <el-image :src="Fast.api.cdnurl(scope.row.user.avatar)" fit="contain">
  298. <div slot="error" class="image-slot">
  299. <i class="el-icon-picture-outline"></i>
  300. </div>
  301. </el-image>
  302. </div>
  303. <div class="ellipsis-item">{{scope.row.user.nickname?scope.row.user.nickname:'-'}}</div>
  304. </div>
  305. <div v-else>-</div>
  306. </template>
  307. </el-table-column>
  308. <el-table-column label="资料审核" width="160">
  309. <template slot-scope="scope">
  310. <div class="platform-name display-flex-c">
  311. <el-popover placement="bottom" trigger="hover">
  312. <div class="popover-container">
  313. <template v-if="scope.row.apply_info!=''">
  314. <div class="display-flex"
  315. :style="{marginBottom: (scope.row.apply_info && JSON.parse(scope.row.apply_info).length-1)>index?'14px':0}"
  316. v-for="(item,index) in JSON.parse(scope.row.apply_info)">
  317. <div class="display-flex">
  318. <div class="popover-tip">{{item.name}}</div>:
  319. </div>
  320. <div v-if="item.type=='input' || item.type=='number'">{{item.value}}</div>
  321. <div class="table-image table-image-identity" v-if="item.type=='image'">
  322. <el-image :src="Fast.api.cdnurl(item.value)" fit="contain">
  323. <div slot="error" class="image-slot">
  324. <i class="el-icon-picture-outline"></i>
  325. </div>
  326. </el-image>
  327. </div>
  328. </div>
  329. </template>
  330. <div v-if="!scope.row.apply_info" style="text-align: center;">
  331. -
  332. </div>
  333. </div>
  334. <span class="ellipsis-item cursor-pointer" slot="reference">
  335. <span class="color-ED655F" v-if="scope.row.info_status==-1">已驳回</span>
  336. <span class="color-999" v-if="scope.row.info_status==0">未完善</span>
  337. <span class="color-0ACE97" v-if="scope.row.info_status==1">已完善</span>
  338. <span v-if="scope.row.info_status==null">无需资料</span>
  339. </span>
  340. </el-popover>
  341. </div>
  342. </template>
  343. </el-table-column>
  344. <el-table-column label="等级" min-width="160">
  345. <template slot-scope="scope">
  346. <div class="display-flex">
  347. <div class="ellipsis-item">
  348. <span>
  349. {{(scope.row.agent_level &&
  350. scope.row.agent_level.name)?scope.row.agent_level.name:'-'}}
  351. </span>
  352. <span>(等级{{scope.row.level}})</span>
  353. </div>
  354. </div>
  355. </template>
  356. </el-table-column>
  357. <el-table-column label="上级分销商" min-width="140">
  358. <template slot-scope="scope">
  359. <div v-if="scope.row.parent_agent && scope.row.parent_agent_id!=0" class="display-flex"
  360. @click="operation('edit',scope.row.parent_agent.id)">
  361. <div class="table-image">
  362. <el-image :src="Fast.api.cdnurl(scope.row.parent_agent.avatar)" fit="contain">
  363. <div slot="error" class="image-slot">
  364. <i class="el-icon-picture-outline"></i>
  365. </div>
  366. </el-image>
  367. </div>
  368. <div class="ellipsis-item theme-cursor">
  369. {{scope.row.parent_agent.nickname?scope.row.parent_agent.nickname:'-'}}
  370. </div>
  371. </div>
  372. <div style="justify-content: center;" v-else>-</div>
  373. </template>
  374. </el-table-column>
  375. <el-table-column label="消费金额" width="140">
  376. <template slot-scope="scope">
  377. <div>{{scope.row.user?scope.row.user.total_consume:'-'}}<span class="unit-tip-item">元</span></div>
  378. </template>
  379. </el-table-column>
  380. <el-table-column label="推广人数" width="140">
  381. <template slot-scope="scope">
  382. <div>
  383. <span v-if="scope.row.user">{{scope.row.user.child_user_count_1}}</span>
  384. <span v-if="!scope.row.user">-</span>
  385. <span class="unit-tip-item">人</span>
  386. </div>
  387. </template>
  388. </el-table-column>
  389. <el-table-column label="提交次数" width="100">
  390. <template slot-scope="scope">
  391. <div>{{scope.row.apply_num}}<span class="unit-tip-item">次</span>
  392. </div>
  393. </template>
  394. </el-table-column>
  395. <el-table-column label="更新时间" width="150">
  396. <template slot-scope="scope">
  397. <div>
  398. {{moment(scope.row.updatetime*1000).format("YYYY-MM-DD HH:mm:ss")}}
  399. </div>
  400. </template>
  401. </el-table-column>
  402. <el-table-column label="创建时间" width="150">
  403. <template slot-scope="scope">
  404. <div>
  405. {{moment(scope.row.createtime*1000).format("YYYY-MM-DD HH:mm:ss")}}
  406. </div>
  407. </template>
  408. </el-table-column>
  409. <el-table-column fixed="right" label="操作" min-width="220">
  410. <template slot-scope="scope">
  411. <div>
  412. <span class="theme-cursor" style="margin-right: 14px;"
  413. @click="operation('edit',scope.row.user_id)">
  414. 查看
  415. </span>
  416. <span style="margin-right: 14px;cursor: pointer;color:#687FF4"
  417. v-if="scope.row.info_status==0 || scope.row.info_status==-1"
  418. @click="operation('edit',scope.row.user_id)">辅助填写</span>
  419. <span class="shopro-edit-text" v-if="scope.row.info_status==0 || scope.row.info_status==1"
  420. @click="operation('agree',scope.row.user_id,scope.row)">同意</span>
  421. <span class="shopro-edit-text" v-if="scope.row.info_status==null"
  422. @click="operation('agree-null-status',scope.row.user_id)">同意</span>
  423. <span class="agent-apply-item-tip-delete" v-if="scope.row.info_status==1"
  424. @click="operation('reject',scope.row.user_id)">驳回</span>
  425. <span class="shopro-delete-text" slot="reference" v-if="scope.row.info_status==1"
  426. @click="operation('del',scope.row.user_id)">删除</span>
  427. </div>
  428. </template>
  429. </el-table-column>
  430. </el-table>
  431. <el-table v-if="activeTabsName=='1'" :data="listData" border stripe :cell-class-name="tableCellClassName3"
  432. :header-cell-class-name="tableCellClassName3">
  433. <el-table-column label="ID" prop="user_id" width="70">
  434. </el-table-column>
  435. <el-table-column label="分销商名称" min-width="240">
  436. <template slot-scope="scope">
  437. <div v-if="scope.row.user" class="display-flex">
  438. <div class="table-image">
  439. <el-image :src="Fast.api.cdnurl(scope.row.user.avatar)" fit="contain">
  440. <div slot="error" class="image-slot">
  441. <i class="el-icon-picture-outline"></i>
  442. </div>
  443. </el-image>
  444. </div>
  445. <div class="ellipsis-item">{{scope.row.user.nickname?scope.row.user.nickname:'-'}}</div>
  446. </div>
  447. <div v-else>-</div>
  448. </template>
  449. </el-table-column>
  450. <el-table-column label="当前等级" min-width="160">
  451. <template slot-scope="scope">
  452. <div class="display-flex">
  453. <div class="ellipsis-item">
  454. <span>{{(scope.row.agent_level &&
  455. scope.row.agent_level.name)?scope.row.agent_level.name:'-'}}</span>
  456. <span>(等级{{scope.row.level}})</span>
  457. </div>
  458. </div>
  459. </template>
  460. </el-table-column>
  461. <el-table-column label="升级之后的等级" min-width="160">
  462. <template slot-scope="scope">
  463. <div>{{scope.row.level_status_text?scope.row.level_status_text:'-'}}(等级{{scope.row.level_status}})
  464. </div>
  465. </template>
  466. </el-table-column>
  467. <el-table-column label="创建时间" width="160">
  468. <template slot-scope="scope">
  469. <div>
  470. {{moment(scope.row.createtime*1000).format("YYYY-MM-DD HH:mm:ss")}}
  471. </div>
  472. </template>
  473. </el-table-column>
  474. <el-table-column label="消费金额(元)" min-width="140">
  475. <template slot-scope="scope">
  476. <div>{{scope.row.user?scope.row.user.total_consume:'-'}}<span class="unit-tip-item">元</span></div>
  477. </template>
  478. </el-table-column>
  479. <el-table-column label="推广人数" width="140">
  480. <template slot-scope="scope">
  481. <div>
  482. <span v-if="scope.row.user">
  483. {{scope.row.user.child_user_count_1}}<span class="unit-tip-item">人</span>
  484. </span>
  485. <span v-else="scope.row.user">-</span>
  486. </div>
  487. </template>
  488. </el-table-column>
  489. <el-table-column fixed="right" label="操作" min-width="190">
  490. <template slot-scope="scope">
  491. <div>
  492. <span class="shopro-edit-text color-0ACE97" v-if="scope.row.level_status_text"
  493. @click="operation('update-agree',scope.row.user_id,scope.row.level_status)">同意</span>
  494. <span style="margin-right: 12px;" v-if="!scope.row.level_status_text">未找到等级</span>
  495. <span class="shopro-delete-text" v-if="scope.row.level_status!=0"
  496. @click="operation('update-refuse',scope.row.user_id,0)">{{scope.row.level_status_text?'拒绝':'删除'}}</span>
  497. <span class="shopro-edit-text" @click="operation('edit',scope.row.user_id)">查看</span>
  498. </div>
  499. </template>
  500. </el-table-column>
  501. </el-table>
  502. </div>
  503. <div class="shopro-pagination-container">
  504. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
  505. :page-sizes="[10, 20, 30, 40]" :page-size="limit" layout="total, sizes, prev, pager, next, jumper"
  506. :total="totalPage">
  507. </el-pagination>
  508. </div>
  509. </div>