list.php 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734
  1. <?php
  2. ?>
  3. <div id="app" v-cloak>
  4. <el-card shadow="never" style="border:0;min-width: 1200px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  5. <div slot="header">
  6. <span>分销员</span>
  7. <div style="float: right; margin: -5px 0">
  8. <el-button type="primary" size="small" @click="onAsync">同步分销员</el-button>
  9. </div>
  10. </div>
  11. <div class="table-body">
  12. <div style="padding-bottom:20px">
  13. <el-row align="middle">
  14. <el-col :span="16">
  15. <p>分销员/导购员推广直播间</p>
  16. <p>邀请商城的分销员/导购员成为视频号小店的分销员,邀请成功后,再奖两个身份进行绑定,绑定完成后,分销员/导购员推广视频号直播间的等场景,若产生订单,可赚取佣金。</p>
  17. <p>分销员:视频号小店的推广者,分销员/导购员:七件事商场的推广者,七件事结合两个产品能力,分销员功能确定订单是谁推广的,分销员/导购员功能给推广者结算佣金。</p>
  18. </el-col>
  19. <el-col :span="8" style="text-align: center">
  20. <el-button type="primary" size="small" @click="inviteSharerDialogVisible = true" style="padding: 9px 15px !important;">邀请分销员</el-button>
  21. </el-col>
  22. </el-row>
  23. </div>
  24. <el-form size="small">
  25. <div class="picker-container-1">
  26. <div class="picker-container-2">分销员接受邀请时间(小店):</div>
  27. <div>
  28. <el-date-picker style="margin-top: 1px;" size="small" @change="changeTime" v-model="datetime" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']"></el-date-picker>
  29. </div>
  30. </div>
  31. <div class="picker-container-1">
  32. <div class="picker-container-2">分销员/导购员绑定时间(七件事商城):</div>
  33. <div><el-date-picker style="margin-top: 1px;" size="small" @change="changeBindTime" v-model="bdatetime" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']"></el-date-picker></div>
  34. </div>
  35. <div></div>
  36. <div style="display:flex;">
  37. <div class="item-box">
  38. <el-select v-model="search.shop_id" placeholder="请选择所属店铺进行搜索" clearable size="small">
  39. <el-option v-for="(name, index) in shops" :key="index" :label="name" :value="index"></el-option>
  40. </el-select>
  41. </div>
  42. <div class="item-box">
  43. <el-input clearable size="small" style="width: 200px" v-model="search.member" placeholder="请输入分销员手机号码"></el-input>
  44. </div>
  45. <div class="item-box">
  46. <el-select v-model="search.level" placeholder="请选择分销员身份" clearable size="small">
  47. <el-option v-for="(name, index) in levels" :key="index" :label="name" :value="index"></el-option>
  48. </el-select>
  49. </div>
  50. <div class="item-box">
  51. <el-select v-model="search.status" placeholder="请选择状态" clearable size="small">
  52. <el-option label="绑定成功" value="100"></el-option>
  53. <el-option label="绑定失败" value="1"></el-option>
  54. </el-select>
  55. </div>
  56. <div class="item-box" flex="dir:left cross:center">
  57. <el-button size="small" type="primary" style="padding: 9px 15px !important;" @click="searchs">搜索</el-button>
  58. </div>
  59. </div>
  60. </el-form>
  61. <el-tabs v-model="activeName" @tab-click="handleClick">
  62. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;" @selection-change="handleSelectionChange">
  63. <el-table-column label="绑定视频号小店" align="center">
  64. <template slot-scope="scope">
  65. <div v-if="scope.row.shop">
  66. {{scope.row.shop.name}}
  67. </div>
  68. <div v-else>
  69. -
  70. </div>
  71. </template>
  72. </el-table-column>
  73. <el-table-column label="用户ID" align="center" width="100px">
  74. <template slot-scope="scope">
  75. <div v-if="scope.row.user">
  76. {{scope.row.user.id}}
  77. </div>
  78. <div v-else>
  79. -
  80. </div>
  81. </template>
  82. </el-table-column>
  83. <el-table-column label="分销员身份(七件事商城)" align="left">
  84. <template slot-scope="scope">
  85. <div class="table-info-img-text" v-if="scope.row.user">
  86. <el-image class="table-info-img circle" :src="scope.row.user.avatar_url">
  87. <div slot="error" class="image-slot">
  88. <com-image src="/resources/img/common/default-avatar.png"></com-image>
  89. </div>
  90. </el-image>
  91. <div class="table-info-text">
  92. <div style="color:#000; text-align: left">{{scope.row.user.nickname}}</div>
  93. <div style="font-size: 12px; text-align: left">{{scope.row.user.mobile}}</div>
  94. </div>
  95. </div>
  96. <div v-else>-</div>
  97. </template>
  98. </el-table-column>
  99. <el-table-column label="分销员名称(小店)" align="center">
  100. <template slot-scope="scope">
  101. <div class="table-info-img-text">
  102. <el-image class="table-info-img circle" src="/resources/img/common/default-avatar.png">
  103. <div slot="error" class="image-slot">
  104. <com-image src="/resources/img/common/default-avatar.png"></com-image>
  105. </div>
  106. </el-image>
  107. <div class="table-info-text">
  108. <div style="color:#000; text-align: left">{{scope.row.nickname}}</div>
  109. </div>
  110. </div>
  111. </template>
  112. </el-table-column>
  113. <el-table-column label="等级" align="center">
  114. <template slot-scope="scope">
  115. {{levels[scope.row.level] ? levels[scope.row.level] : '默认等级'}}
  116. </template>
  117. </el-table-column>
  118. <el-table-column label="累计销售额(元)" align="center">
  119. <template slot-scope="scope">
  120. {{scope.row.total_sales}}
  121. </template>
  122. </el-table-column>
  123. <el-table-column label="累计客户数" align="center" width="100px">
  124. <template slot-scope="scope">
  125. {{scope.row.total_customers}}
  126. </template>
  127. </el-table-column>
  128. <el-table-column label="分销员接受邀请时间(小店)" align="center">
  129. <template slot-scope="scope">
  130. <div>{{scope.row.invite_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
  131. </template>
  132. </el-table-column>
  133. <el-table-column label="分销员/导购员绑定时间(七件事商城)" align="center">
  134. <template slot-scope="scope">
  135. {{scope.row.bind_at|dateTimeFormat('Y-m-d H:i:s')}}
  136. </template>
  137. </el-table-column>
  138. <el-table-column label="状态" align="center" width="100px">
  139. <template slot-scope="scope">
  140. <el-tag size="mini" :type="scope.row.user ? 'success' : 'danger'">
  141. {{scope.row.user ? '绑定成功' : '绑定失败'}}
  142. </el-tag>
  143. </template>
  144. </el-table-column>
  145. <el-table-column label="操作" align="center">
  146. <template slot-scope="scope">
  147. <el-button v-if="scope.row.user_id > 0" size="mini" type="text" @click="onShowCustomer(scope.row)">客户列表</el-button>
  148. <el-button v-if="scope.row.user_id == 0" size="mini" type="text" @click="onBind(scope.row, scope.$index)">绑定</el-button>
  149. <!-- <el-popconfirm @confirm="onUnbind(scope.row, scope.$index)"-->
  150. <!-- title="您真的要取消分销员资格吗?">-->
  151. <!-- <el-button type="text" slot="reference"-->
  152. <!-- style="color: #F56C6C">取消分销员资格</el-button>-->
  153. <!-- </el-popconfirm>-->
  154. </template>
  155. </el-table-column>
  156. </el-table>
  157. </el-tabs>
  158. <!-- 分页器 -->
  159. <div flex="box:last cross:center">
  160. <div></div>
  161. <div>
  162. <el-pagination v-if="pagination" :page-size="pagination.defaultPageSize"
  163. style="display: inline-block;float: right;" background @current-change="pageChange"
  164. layout="prev, pager, next" :total="pagination.totalCount">
  165. </el-pagination>
  166. </div>
  167. </div>
  168. </div>
  169. <!-- 这个是复制用的容器,已隐藏 -->
  170. <textarea id="inputs" style="opacity: 0;width: 0;height: 0;">这是幕后黑手</textarea>
  171. <el-dialog title="选择会员" :visible.sync="userDialogVisible" width="50%">
  172. <div class="search-box">
  173. <div class="input-item">
  174. <el-input @keyup.enter.native="getUser" size="small" placeholder="请输入会员ID" v-model="searchUserData.user_id"> </el-input>
  175. </div>
  176. <div class="input-item">
  177. <el-input @keyup.enter.native="getUser" size="small" placeholder="会员昵称/手机号" v-model="searchUserData.keyword"> </el-input>
  178. </div>
  179. <el-button type="primary" size="small" @click="getUser">搜索</el-button>
  180. <el-button type="warning" size="small" @click="clereSearch" v-if="searchUserData.keyword || searchUserData.user_id" style="padding: 9px 15px !important;">清除搜索条件</el-button>
  181. </div>
  182. <el-table :data="userList" stripe v-loading="userListLoading" style="width: 100%">
  183. <el-table-column prop="date" width="50">
  184. <template slot-scope="scope">
  185. <el-radio v-model="userInfo" :label="scope.row" @change="clickChange"><i></i></el-radio>
  186. </template>
  187. </el-table-column>
  188. <el-table-column prop="id" label="ID" width="80"> </el-table-column>
  189. <el-table-column prop="avatar_url" label="会员" width="80">
  190. <template slot-scope="scope">
  191. <el-image style="width: 60px; height: 60px" :src="scope.row.avatar_url" fit="cover"></el-image>
  192. </template>
  193. </el-table-column>
  194. <el-table-column prop="nickname" width="180"> </el-table-column>
  195. <el-table-column prop="mobile" label="手机号" width="200">
  196. </el-table-column>
  197. <el-table-column prop="level_name" label="会员等级">
  198. <template slot-scope="scope">
  199. <div v-if="scope.row.level > 0">等级{{scope.row.level_name}}</div>
  200. <div v-else>普通用户</div>
  201. </template>
  202. </el-table-column>
  203. <el-table-column prop="parent_nickname" label="已绑定推荐人">
  204. </el-table-column>
  205. </el-table>
  206. <div style="text-align: right;margin: 20px 0;">
  207. <el-row type="flex" class="page" justify="end">
  208. <el-pagination @current-change="userPagination" background layout="prev, pager, next" :page-count="pageCount" v-if="userList"></el-pagination>
  209. </el-row>
  210. </div>
  211. <span slot="footer" class="dialog-footer">
  212. <el-button @click="userDialogVisible = false">取 消</el-button>
  213. <el-button type="primary" v-loading="btnLoading" :disabled="btnLoading" @click="onBindSubmit">确 定</el-button>
  214. </span>
  215. </el-dialog>
  216. <el-dialog
  217. title="邀请视频号小店分销员"
  218. :visible.sync="inviteSharerDialogVisible"
  219. width="50%">
  220. <div>
  221. <h4>一、前往视频号小店后台,扫码给对应的分销员发送分销员邀请链接</h4>
  222. <p style="line-height: 24px">路径 -> 店铺管理 -> 店铺分销员管理</p>
  223. <el-image :src="diy_img_prefix+'/static/addons/WechatVideoShop/sharer/0.png'"></el-image>
  224. <p style="line-height: 24px">点击右上方红色关联按钮</p>
  225. <el-image :src="diy_img_prefix+'/static/addons/WechatVideoShop/sharer/1.png'"></el-image>
  226. <p style="line-height: 24px">扫码后进行分享</p>
  227. <el-image :src="diy_img_prefix+'/static/addons/WechatVideoShop/sharer/10.png'"></el-image>
  228. <h4>二、分销员在手机端接受分销员邀请</h4>
  229. <p style="line-height: 24px">被邀请人点击接受按钮</p>
  230. <el-image :src="diy_img_prefix+'/static/addons/WechatVideoShop/sharer/11.png'"></el-image>
  231. <el-image :src="diy_img_prefix+'/static/addons/WechatVideoShop/sharer/12.png'"></el-image>
  232. <h4>三、邀请成功后在七件事后台再进行分销员/导购员账号绑定</h4>
  233. <el-image :src="diy_img_prefix+'/static/addons/WechatVideoShop/sharer/13.png'"></el-image>
  234. </div>
  235. <span slot="footer" class="dialog-footer">
  236. <el-button @click="inviteSharerDialogVisible = false">取 消</el-button>
  237. <a style="margin-left: 15px" target="_blank" href="https://channels.weixin.qq.com/shop"><el-button type="primary">去邀请</el-button></a>
  238. </span>
  239. </el-dialog>
  240. <el-dialog title="客户列表" :visible.sync="customerSharerDialogVisible" width="50%">
  241. <div class="search-box">
  242. <div class="input-item" style="width: 150px">
  243. <el-input size="small" placeholder="请输入会员ID" v-model="searchCustomerData.user_id"> </el-input>
  244. </div>
  245. <div class="input-item" style="width: 150px">
  246. <el-input size="small" placeholder="会员昵称/手机号" v-model="searchCustomerData.keyword"> </el-input>
  247. </div>
  248. <div class="input-item" style="width: auto !important;">
  249. <el-date-picker style="margin-top: 1px;" size="small" @change="changeCustomerTime" v-model="datetime" type="datetimerange"
  250. value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期"
  251. end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']"></el-date-picker>
  252. </div>
  253. <el-button type="primary" size="small" @click="getUser">搜索</el-button>
  254. <el-button type="warning" size="small" @click="clearCustomerSearch"
  255. v-if="searchCustomerData.keyword || searchCustomerData.user_id" style="padding: 9px 15px !important;">清除搜索条件</el-button>
  256. </div>
  257. <el-table :data="customerList" stripe v-loading="customerListLoading" style="width: 100%">
  258. <el-table-column prop="user_id" label="用户ID" align="center"></el-table-column>
  259. <el-table-column label="客户信息">
  260. <template slot-scope="scope">
  261. <div class="table-info-img-text">
  262. <el-image class="table-info-img circle" :src="scope.row.user.avatar_url">
  263. <div slot="error" class="image-slot">
  264. <com-image src="/resources/img/common/default-avatar.png"></com-image>
  265. </div>
  266. </el-image>
  267. <div class="table-info-text">
  268. <div style="color:#000; text-align: left">{{scope.row.user.nickname}}</div>
  269. <div style="color:#000; text-align: left">{{scope.row.user.mobile}}</div>
  270. </div>
  271. </div>
  272. </template>
  273. </el-table-column>
  274. <el-table-column prop='order_num' label="累计购买订单数" align="center"></el-table-column>
  275. <el-table-column prop='pay_amount' label="累计支付金额" align="center"></el-table-column>
  276. <el-table-column label="邀请时间" align="center">
  277. <template slot-scope="scope">
  278. {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
  279. </template>
  280. </el-table-column>
  281. </el-table>
  282. <div style="text-align: right;margin: 20px 0;">
  283. <el-row type="flex" class="page" justify="end">
  284. <el-pagination @current-change="customerPagination" background layout="prev, pager, next" :page-count="customerPageCount" v-if="customerList"></el-pagination>
  285. </el-row>
  286. </div>
  287. <span slot="footer" class="dialog-footer">
  288. <el-button @click="customerSharerDialogVisible = false">取 消</el-button>
  289. <el-button type="primary" @click="customerSharerDialogVisible = false">确 定</el-button>
  290. </span>
  291. </el-dialog>
  292. </el-card>
  293. </div>
  294. <script>
  295. const app = new Vue({
  296. el: '#app',
  297. data: {
  298. page: 1,
  299. time: [], //本地存时间,请求时不发送
  300. search: {
  301. sharer_type: '',
  302. shop_id: ''
  303. },
  304. loading: false,
  305. activeName: '-1',
  306. list: [], //列表数据
  307. status_map: {
  308. 0: '全部',
  309. 2: '审核拒绝',
  310. 3: '审核通过'
  311. },
  312. datetime: [],
  313. bdatetime: [],
  314. currentItem: null,
  315. currentIndex: null,
  316. btnLoading: false,
  317. pagination: {
  318. totalCount: 0,
  319. },
  320. userDialogVisible: false,
  321. userListLoading: false,
  322. userList: [],
  323. searchUserData: {
  324. user_id: null,
  325. keyword: '',
  326. },
  327. currentUser: null,
  328. shops: {},
  329. pageCount: 0,
  330. levels: [],
  331. userInfo: null,
  332. inviteSharerDialogVisible: false,
  333. diy_img_prefix: '<?= Yii::getAlias('@attachurl') ?>',
  334. customerSharerDialogVisible: false,
  335. customerList: [],
  336. customerPageCount: 0,
  337. searchCustomerData: {
  338. user_id: null,
  339. keyword: '',
  340. parent_id: ''
  341. },
  342. customerListLoading: false,
  343. customerPage: 1,
  344. },
  345. mounted() {
  346. // 获取列表首页数据
  347. this.loadData(this.page, this.search); //获取列表数据
  348. },
  349. methods: {
  350. // 1.0 获取视频列表
  351. loadData(page, others) {
  352. this.loading = true;
  353. request({
  354. method: 'get',
  355. params: {
  356. r: 'wechat-video-shop/sharer/list',
  357. page: page,
  358. limit: 10,
  359. ...others, //其他搜索字段
  360. },
  361. }).then(e => {
  362. this.loading = false;
  363. if (e.data.code === 0) {
  364. this.list = e.data.data.list.list;
  365. this.shops = e.data.data.shop;
  366. this.levels = e.data.data.levels;
  367. this.pagination = e.data.data.list.pagination;
  368. } else {
  369. this.$message.error(e.data.msg);
  370. }
  371. }).catch(e => {});
  372. },
  373. pageChange(page) {
  374. this.page = page;
  375. this.loadData(this.page, this.search);
  376. },
  377. handleClick(tab, event) {
  378. this.page = 1;
  379. this.search.status = this.activeName;
  380. this.loadData(this.page, this.search)
  381. },
  382. handleSelectionChange(val) {
  383. let self = this;
  384. self.choose_list = [];
  385. val.forEach(function(item) {
  386. self.choose_list.push(item.id);
  387. })
  388. },
  389. searchs() {
  390. this.page = 1;
  391. this.loadData(this.page, this.search);
  392. },
  393. onEdit(id) {
  394. let params = {
  395. r: 'wechat-video-shop/order/index',
  396. };
  397. navigateTo(params);
  398. },
  399. changeTime(e) {
  400. if (e) {
  401. this.search.invite_start_date = e[0]
  402. this.search.invite_end_date = e[1]
  403. } else {
  404. this.search.invite_start_date = ''
  405. this.search.invite_end_date = ''
  406. }
  407. },
  408. changeBindTime(e) {
  409. if (e) {
  410. this.search.bind_start_date = e[0]
  411. this.search.bind_end_date = e[1]
  412. } else {
  413. this.search.bind_start_date = ''
  414. this.search.bind_end_date = ''
  415. }
  416. },
  417. changeCustomerTime(e) {
  418. if (e) {
  419. this.searchCustomerData.start_date = e[0]
  420. this.searchCustomerData.end_date = e[1]
  421. } else {
  422. this.searchCustomerData.start_date = ''
  423. this.searchCustomerData.end_date = ''
  424. }
  425. },
  426. onBind(item, index) {
  427. this.getUser()
  428. this.currentItem = item
  429. this.currentIndex = index
  430. this.userDialogVisible = true;
  431. },
  432. onBindSubmit() {
  433. // 提交
  434. this.btnLoading = true;
  435. this.currentItem.user_id = this.currentUser.id
  436. this.currentItem.shop_id = 1 // 需要店铺ID
  437. request({
  438. method: 'post',
  439. params: {
  440. r: 'wechat-video-shop/sharer/bind',
  441. },
  442. data: this.currentItem
  443. }).then(e => {
  444. this.btnLoading = false;
  445. if (e.data.code === 0) {
  446. this.$message.success(e.data.msg);
  447. this.userDialogVisible = false;
  448. this.loadData(this.page, this.search);
  449. } else {
  450. this.$message.error(e.data.msg);
  451. }
  452. }).catch(e => {
  453. this.btnLoading = false;
  454. });
  455. },
  456. onUnbind(item, index) {
  457. this.loading = true;
  458. request({
  459. method: 'post',
  460. params: {
  461. r: 'wechat-video-shop/sharer/unbind',
  462. },
  463. data: item,
  464. }).then(e => {
  465. this.loading = false;
  466. if (e.data.code === 0) {
  467. this.$message.success(e.data.msg);
  468. this.loadData(this.page, this.search);
  469. } else {
  470. this.$message.error(e.data.msg);
  471. }
  472. }).catch(e => {
  473. this.loading = false;
  474. });
  475. },
  476. getUser() {
  477. let self = this;
  478. self.userListLoading = true;
  479. request({
  480. params: {
  481. r: 'wechat-video-shop/sharer/get-users',
  482. page: self.currPage,
  483. ...self.searchUserData,
  484. },
  485. method: 'get',
  486. }).then(e => {
  487. self.userListLoading = false;
  488. if (e.data.code == 0) {
  489. self.userList = e.data.data.list;
  490. self.pageCount = e.data.data.page_count;
  491. } else {
  492. self.$message.error(e.data.msg);
  493. return false;
  494. }
  495. }).catch(e => {
  496. console.log(e);
  497. self.$message.error('网络错误');
  498. return false;
  499. });
  500. },
  501. userPagination(page) {
  502. this.currPage = page
  503. this.getUser()
  504. },
  505. // 会员列表选中
  506. clickChange(userInfo) {
  507. this.currentUser = userInfo
  508. },
  509. clereSearch() {
  510. this.searchUserData = {
  511. user_id: null,
  512. keyword: '',
  513. }
  514. this.currPage = 1
  515. this.getUser()
  516. },
  517. onAsync() {
  518. request({
  519. method: 'get',
  520. params: {
  521. r: 'wechat-video-shop/sharer/async',
  522. },
  523. }).then(e => {
  524. this.loading = false;
  525. if (e.data.code === 0) {
  526. this.$message.success(e.data.msg);
  527. } else {
  528. this.$message.error(e.data.msg);
  529. }
  530. }).catch(e => {
  531. this.loading = false;
  532. });
  533. },
  534. onShowCustomer(item) {
  535. this.searchCustomerData.parent_id = item.user_id
  536. this.customerSharerDialogVisible = true
  537. this.getCustomer()
  538. },
  539. clearCustomerSearch() {
  540. this.searchCustomerData = {
  541. user_id: null,
  542. keyword: '',
  543. }
  544. this.currPage = 1
  545. this.getCustomer()
  546. },
  547. getCustomer() {
  548. let self = this;
  549. self.customerListLoading = true;
  550. request({
  551. params: {
  552. r: 'wechat-video-shop/sharer/customer',
  553. page: self.customerPage,
  554. ...self.searchCustomerData,
  555. },
  556. method: 'get',
  557. }).then(e => {
  558. self.customerListLoading = false;
  559. if (e.data.code == 0) {
  560. self.customerList = e.data.data.list;
  561. self.customerPageCount = e.data.data.page_count;
  562. } else {
  563. self.$message.error(e.data.msg);
  564. return false;
  565. }
  566. }).catch(e => {
  567. console.log(e);
  568. self.$message.error('网络错误');
  569. return false;
  570. });
  571. },
  572. customerPagination(page) {
  573. this.customerPage = page
  574. this.getCustomer()
  575. },
  576. },
  577. });
  578. </script>
  579. <style>
  580. .table-body {
  581. padding: 20px;
  582. background-color: #fff;
  583. }
  584. .input-item {
  585. margin: 0 0 20px;
  586. }
  587. .input-search {
  588. margin-right: 30px;
  589. }
  590. .input-item .el-input-group__append {
  591. background-color: #fff;
  592. border-left: 0;
  593. width: 10%;
  594. padding: 0;
  595. }
  596. .input-item .el-input-group__append .el-button {
  597. padding: 0;
  598. }
  599. .input-item .el-input-group__append .el-button {
  600. margin: 0;
  601. }
  602. .flex-y-center {
  603. display: -webkit-box;
  604. display: -webkit-flex;
  605. display: flex;
  606. -webkit-box-align: center;
  607. -webkit-align-items: center;
  608. -ms-flex-align: center;
  609. -ms-grid-row-align: center;
  610. align-items: center;
  611. }
  612. .el-tabs__header {
  613. font-size: 16px;
  614. }
  615. .table-body {
  616. padding: 20px;
  617. background-color: #fff;
  618. }
  619. .table-body .el-button {
  620. padding: 0 !important;
  621. border: 0;
  622. margin: 0 5px;
  623. }
  624. .input-item {
  625. width: 250px;
  626. margin: 0 0 20px;
  627. display: inline-block;
  628. }
  629. .input-item .el-input__inner {
  630. border-right: 0;
  631. }
  632. .input-item .el-input__inner:hover {
  633. border: 1px solid #dcdfe6;
  634. border-right: 0;
  635. outline: 0;
  636. }
  637. .input-item .el-input__inner:focus {
  638. border: 1px solid #dcdfe6;
  639. border-right: 0;
  640. outline: 0;
  641. }
  642. .input-item .el-input-group__append {
  643. background-color: #fff;
  644. border-left: 0;
  645. width: 10%;
  646. padding: 0;
  647. }
  648. .input-item .el-input-group__append .el-button {
  649. padding: 0;
  650. }
  651. .input-item .el-input-group__append .el-button {
  652. margin: 0;
  653. }
  654. .item-box {
  655. margin-right: 20px;
  656. }
  657. .item-box .label {
  658. margin-right: 8px;
  659. }
  660. .item-box .symbol {
  661. margin: 0 6px;
  662. }
  663. .form-nickname {
  664. width: 180px;
  665. white-space: nowrap;
  666. overflow: hidden;
  667. text-overflow: ellipsis;
  668. }
  669. .el-table th>.cell {
  670. color: #333;
  671. font-weight: bold;
  672. font-size: 14px;
  673. }
  674. .picker-container-1 {
  675. display: flex;
  676. align-items: center;
  677. padding-bottom: 20px
  678. }
  679. .picker-container-2 {
  680. width: 270px;
  681. text-align: right;
  682. padding-right: 20px
  683. }
  684. .el-table th>.cell {
  685. color: #333;
  686. font-weight: bold;
  687. font-size: 14px;
  688. }
  689. .el-table__footer-wrapper,
  690. .el-table__header-wrapper {
  691. border-bottom: 1.4px solid #D6D6D6;
  692. }
  693. .price_col {
  694. color: #FF5D05;
  695. }
  696. </style>