income-list.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  1. <style>
  2. .order_stat{
  3. background: #FFF;
  4. padding: 10px 10px 0;
  5. margin-bottom: 10px;
  6. }
  7. .title{
  8. font-size: 18px;
  9. font-weight: bold;
  10. display: flex;
  11. align-items: center;
  12. height: 40px;
  13. }
  14. .order_stat > .title > .time{
  15. font-size: 13px;
  16. font-weight: 400;
  17. color: #BFBFBF;
  18. margin-left: 20px;
  19. flex: 1;
  20. }
  21. .order_stat .stat_details{
  22. padding: 30px 0;
  23. display: flex;
  24. }
  25. .default-avatar{
  26. width: 50px;
  27. height: 50px;
  28. border-radius: 50%;
  29. margin-right: 8px;
  30. }
  31. .uer-nickname {
  32. flex: 1;
  33. }
  34. .user_img{
  35. position: relative;
  36. margin-right: 8px;
  37. /* height: 50px;
  38. width: 50px; */
  39. }
  40. .table-body {
  41. padding: 20px;
  42. background-color: #fff;
  43. }
  44. .input-item {
  45. display: inline-block;
  46. width: 250px;
  47. margin: 0 0 20px 20px;
  48. }
  49. .input-item .el-input__inner:hover{
  50. border: 1px solid #dcdfe6;
  51. border-right: 0;
  52. outline: 0;
  53. }
  54. .input-item .el-input__inner:focus{
  55. border: 1px solid #dcdfe6;
  56. border-right: 0;
  57. outline: 0;
  58. }
  59. .input-item .el-input-group__append {
  60. background-color: #fff;
  61. border-left: 0;
  62. width: 10%;
  63. padding: 0;
  64. }
  65. /* .input-item .el-input-group__append .el-button {
  66. padding: 0;
  67. }
  68. .input-item .el-input-group__append .el-button {
  69. margin: 0;
  70. }
  71. .table-body .el-button {
  72. padding: 0!important;
  73. border: 0;
  74. margin: 0 5px;
  75. } */
  76. .el-table th>.cell{
  77. color: #333;
  78. font-weight: bold;
  79. font-size: 14px;
  80. }
  81. .el-table__footer-wrapper, .el-table__header-wrapper{
  82. border-bottom: 1.4px solid #D6D6D6;
  83. }
  84. .statistical ul {
  85. float: left;
  86. }
  87. .statistical ul li.ul-li {
  88. width: 33%;
  89. float: left;
  90. list-style-type :none;
  91. padding-bottom: 10px;
  92. }
  93. .stat_details{
  94. /* padding-bottom: 30px; */
  95. padding-top: 20px;
  96. display: flex;
  97. }
  98. .order_module{
  99. flex: 1;
  100. background: #F2F2F2;
  101. margin: 0 5px;
  102. padding: 20px 25px;
  103. }
  104. .order_module:last-child{
  105. margin-right: 0;
  106. }
  107. .order_module:first-child{
  108. margin-left: 0;
  109. }
  110. .price{
  111. font-size: 22px;
  112. font-weight: bold;
  113. }
  114. .oirder_modul_title{
  115. font-size: 12px;
  116. margin-bottom: 10px;
  117. display: flex;
  118. align-items: center;
  119. }
  120. .oirder_modul_title .text{
  121. margin-right: 10px;
  122. }
  123. .stat_icon{
  124. font-size: 19px;
  125. color: #BFBFBF;
  126. }
  127. </style>
  128. <div id="app" v-cloak>
  129. <div class="order_stat">
  130. <div class="title">销售公司收益明细</div>
  131. <div class="el-card is-never-shadow" style="border: 0px; min-width: 800px; margin-bottom: 10px;">
  132. <div class="stat_details">
  133. <div class="order_module" v-for="(item,index) in orderTotalArr" :key="item.type">
  134. <div class="oirder_modul_title">
  135. <div class="text">{{item.name}}</div>
  136. <el-tooltip class="item" effect="dark" v-if="item.prompt" :content="item.prompt" placement="bottom">
  137. <i class="el-icon-question stat_icon"></i>
  138. </el-tooltip>
  139. </div>
  140. <div class="price">
  141. {{item.value}}
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. </div>
  147. <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  148. <div class="table-body">
  149. <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
  150. <el-tab-pane label="已结算" name="first">
  151. </el-tab-pane>
  152. <el-tab-pane label="未结算" name="second">
  153. </el-tab-pane>
  154. <div class="input-item">
  155. <el-input @keyup.enter.native="loadData" size="small" placeholder="请输入用户id" v-model="search.user_id"
  156. clearable @clear="toSearch">
  157. </el-input>
  158. </div>
  159. <div class="input-item">
  160. <el-input @keyup.enter.native="loadData" size="small" placeholder="请输入用户昵称/手机号/销售公司名称搜索" v-model="search.keyword" clearable @clear="toSearch">
  161. </el-input>
  162. </div>
  163. <el-button type="primary" size="small" style="padding: 9px 15px !important;" @click="toSearch">搜索</el-button>
  164. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;"
  165. @selection-change="handleSelectionChange">
  166. <el-table-column prop="user_id" label="用户ID" align="center"></el-table-column>
  167. <el-table-column label="基本信息" >
  168. <template slot-scope="scope">
  169. <div class="user_img" flex="cross:center">
  170. <el-image class="default-avatar" :src="scope.row.avatar_url">
  171. <div slot="error" class="image-slot">
  172. <com-image src="resources/img/mall/default_avatar_url.png"></com-image>
  173. </div>
  174. </el-image>
  175. <div class="uer-nickname over1" v-if="scope.row.nickname">{{scope.row.nickname}}</div>
  176. <div class="uer-nickname over1" v-else >ID:{{scope.row.user_id}}</div>
  177. </div>
  178. </template>
  179. </el-table-column>
  180. <el-table-column label="联系电话" prop="mobile" align="center" >
  181. <template slot-scope="scope">
  182. <div>{{scope.row.mobile}}</div>
  183. </template>
  184. </el-table-column>
  185. <el-table-column label="公司名称" prop="company_name" align="center" >
  186. <template slot-scope="scope">
  187. <div>{{scope.row.company_name}}</div>
  188. </template>
  189. </el-table-column>
  190. <el-table-column label="结算金额" prop="money" align="center" >
  191. <template slot-scope="scope">
  192. <div>{{scope.row.money}}</div>
  193. </template>
  194. </el-table-column>
  195. <el-table-column label="平台抽佣" prop="rate_money" align="center" >
  196. <template slot-scope="scope">
  197. <div>{{scope.row.rate_money}}</div>
  198. </template>
  199. </el-table-column>
  200. <el-table-column label="说明" prop="desc" align="center" >
  201. <template slot-scope="scope">
  202. <div>{{scope.row.desc}}</div>
  203. </template>
  204. </el-table-column>
  205. <el-table-column label="结算时间" align="center">
  206. <template slot-scope="scope">
  207. {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
  208. </template>
  209. </el-table-column>
  210. </el-table>
  211. </el-tabs>
  212. <div flex="box:last cross:center">
  213. <div></div>
  214. <div>
  215. <el-pagination v-if="pagination" :page-size="pagination.defaultPageSize"
  216. style="display: inline-block;float: right;" background @current-change="pageChange"
  217. layout="prev, pager, next" :total="pagination.totalCount">
  218. </el-pagination>
  219. </div>
  220. </div>
  221. </div>
  222. </el-card>
  223. </div>
  224. <script>
  225. const app = new Vue({
  226. el: '#app',
  227. data: {
  228. qrimg: '',
  229. showqr: false,
  230. avatar: '',
  231. nickname: '',
  232. search: {
  233. user_id: null,
  234. keyword: '',
  235. status: -1,
  236. page: 1,
  237. type:0,
  238. },
  239. loading: false,
  240. activeName: '-1',
  241. list: [],
  242. pagination: null,
  243. dialogChild: false,
  244. dialogLoading: false,
  245. childList: [],
  246. share_name: {
  247. first: '一级',
  248. second: '二级',
  249. third: '三级'
  250. },
  251. select: {
  252. nickname: '',
  253. status: 'first',
  254. },
  255. dialogContent: false,
  256. remarksForm: {
  257. remarks: '',
  258. user_id: '',
  259. id: '',
  260. },
  261. remarksLoading: false,
  262. exportList: {},
  263. userEdit: {
  264. show: false,
  265. },
  266. commission_arr: {},
  267. agentllList: [],
  268. choose_list: [],
  269. export_url: 'agent/default/index', // 导出路径
  270. sort: 0,
  271. sort_id: 0,
  272. orderTotalArr: [
  273. {
  274. type: 'total_rate',
  275. name: '平台总抽佣',
  276. value: '0.00',
  277. // prompt: '累计所有发放给会员的佣金(待结算+已结算)',
  278. },{
  279. type: 'total_price',
  280. name: '总结算金额',
  281. value: '0.00',
  282. // prompt: '所有会员待结算的佣金',
  283. }
  284. ],
  285. activeName:'first',
  286. },
  287. mounted() {
  288. this.loadData();
  289. },
  290. methods: {
  291. loadData() {
  292. this.loading = true;
  293. let params = {
  294. r: 'sales-company/default/income-list'
  295. };
  296. params = Object.assign(params, this.search);
  297. request({
  298. params: params,
  299. method: 'get',
  300. }).then(e => {
  301. this.loading = false;
  302. if (e.data.code == 0) {
  303. this.list = e.data.data.list;
  304. this.orderTotalArr = e.data.data.orderTotalArr;
  305. this.pagination = e.data.data.pagination;
  306. } else {
  307. this.$message.error(e.data.msg);
  308. }
  309. }).catch(e => {
  310. this.loading = false;
  311. });
  312. },
  313. pageChange(page) {
  314. this.search.page = page;
  315. this.loadData();
  316. },
  317. handleClick(tab, event) {
  318. if(this.activeName == "first"){
  319. this.page = 1;
  320. this.pageCount = 0;
  321. this.search.type = 0;
  322. }else if(this.activeName == "second"){
  323. this.page = 1;
  324. this.pageCount = 0;
  325. this.search.type = 1;
  326. }
  327. this.loadData();
  328. },
  329. toSearch() {
  330. this.search.page = 1;
  331. this.loadData();
  332. },
  333. }
  334. });
  335. </script>
  336. <style>
  337. .el-tabs__header {
  338. font-size: 16px;
  339. }
  340. .table-body {
  341. padding: 20px;
  342. background-color: #fff;
  343. }
  344. .table-body .el-button {
  345. padding: 0 !important;
  346. border: 0;
  347. margin: 0 5px;
  348. }
  349. .input-item {
  350. width: 250px;
  351. margin: 0 0 20px;
  352. display: inline-block;
  353. }
  354. /*.input-item .el-input__inner {*/
  355. /* border-right: 0;*/
  356. /*}*/
  357. .input-item .el-input__inner:hover {
  358. border: 1px solid #dcdfe6;
  359. /*border-right: 0;*/
  360. outline: 0;
  361. }
  362. .input-item .el-input__inner:focus {
  363. border: 1px solid #dcdfe6;
  364. /*border-right: 0;*/
  365. outline: 0;
  366. }
  367. .input-item .el-input-group__append {
  368. background-color: #fff;
  369. border-left: 0;
  370. width: 10%;
  371. padding: 0;
  372. }
  373. .input-item .el-input-group__append .el-button {
  374. padding: 0;
  375. }
  376. .input-item .el-input-group__append .el-button {
  377. margin: 0;
  378. }
  379. .batch {
  380. margin: 0 0 20px;
  381. display: inline-block;
  382. }
  383. .batch .el-button {
  384. padding: 9px 15px !important;
  385. }
  386. .el-table th>.cell{
  387. color: #333;
  388. font-weight: bold;
  389. font-size: 14px;
  390. }
  391. .el-table__footer-wrapper, .el-table__header-wrapper{
  392. border-bottom: 1.4px solid #D6D6D6;
  393. }
  394. .el-table th>.cell {
  395. color: #333;
  396. font-weight: bold;
  397. font-size: 14px;
  398. }
  399. .table1 .el-table__footer-wrapper,
  400. .table1 .el-table__header-wrapper {
  401. border-bottom: 1.4px solid #D6D6D6;
  402. }
  403. .user_img{
  404. position: relative;
  405. margin-right: 8px;
  406. /* height: 50px;
  407. width: 50px; */
  408. }
  409. .default-avatar{
  410. width: 50px;
  411. height: 50px;
  412. border-radius: 50%;
  413. margin-right: 8px;
  414. }
  415. .uer-nickname {
  416. flex: 1;
  417. }
  418. </style>