index.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. <?php
  2. use common\helpers\ComponentHelper;
  3. ?>
  4. <style>
  5. </style>
  6. <div id="app" v-cloak>
  7. <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  8. <div slot="header">
  9. <span>延时结算明细</span>
  10. </div>
  11. <div class="table-body">
  12. <div class="input-item">
  13. <el-input @keyup.enter.native="loadData" size="small" placeholder="请输入订单编号" v-model="search.order_no" clearable @clear="toSearch">
  14. </el-input>
  15. </div>
  16. <div class="input-item">
  17. <el-input @keyup.enter.native="loadData" size="small" placeholder="请输入关键字搜索" v-model="search.keyword" clearable @clear="toSearch">
  18. </el-input>
  19. </div>
  20. <el-date-picker size="small" v-model="search.date" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="addTimeChange">
  21. </el-date-picker>
  22. <div class="input-item">
  23. <el-select size="small" v-model="search.wallet_type" @change='toSearch' class="select" placeholder="资金类型" clearable>
  24. <el-option :key="index" :label="item" :value="index" v-for="(item, index) in wallet_types"></el-option>
  25. </el-select>
  26. </div>
  27. <div class="input-item">
  28. <el-select size="small" v-model="search.status" @change='toSearch' class="select" placeholder="结算状态" clearable>
  29. <el-option key="0" label="未结算" value="0"></el-option>
  30. <el-option key="1" label="已结算" value="1"></el-option>
  31. </el-select>
  32. </div>
  33. <el-button type="primary" size="small" @click="toSearch">搜索</el-button>
  34. <el-tabs v-model="activeName" @tab-click="handleClick">
  35. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;" @selection-change="handleSelectionChange">
  36. <!-- <el-table-column align='center' type="selection"></el-table-column>-->
  37. <el-table-column prop="user_id" label="用户ID" width="80" align="center"></el-table-column>
  38. <el-table-column label="用户昵称">
  39. <template slot-scope="scope">
  40. <div class="user_img" flex="cross:center">
  41. <el-image class="default-avatar" :src="scope.row.user.avatar_url">
  42. <div slot="error" class="image-slot">
  43. <com-image src="resources/img/mall/default_avatar_url.png"></com-image>
  44. </div>
  45. </el-image>
  46. <div class="nickname-box">
  47. <div class="uer-nickname over1">{{scope.row.user.nickname}}</div>
  48. <div class="uer-nickname over1">{{scope.row.user.mobile}}</div>
  49. </div>
  50. </div>
  51. </template>
  52. </el-table-column>
  53. <el-table-column prop="contributor_name" label="商品名称"></el-table-column>
  54. <el-table-column label="订单号" prop="order_no" align="center">
  55. <template slot-scope="scope">
  56. <span style="display:block;">{{scope.row.order_no}}</span>
  57. <span class="tag-diff" v-if="scope.row.order_no && scope.row.order_no.indexOf('DYC') > -1">抖音cps订单</span>
  58. </template>
  59. </el-table-column>
  60. <el-table-column label="资产类型" prop="wallet_type" align="center" width="100">
  61. <template slot-scope="scope">
  62. <el-tag type="success" size="small" v-if="scope.row.wallet_type == 'commission'">{{ wallet_types[scope.row.wallet_type] }}</el-tag>
  63. <el-tag type="warning" size="small" v-else="scope.row.wallet_type == 'commission'">{{ wallet_types[scope.row.wallet_type] }}</el-tag>
  64. </template>
  65. </el-table-column>
  66. <el-table-column label="结算金额" prop="wallet_num" align="center" width="100">
  67. <template slot-scope="scope">
  68. <el-link type="primary" :underline="false" class="wallet-price">{{ scope.row.wallet_num }}</el-link>
  69. </template>
  70. </el-table-column>
  71. <el-table-column label="延时天数" prop="day_num" align="center" width="100"></el-table-column>
  72. <el-table-column label="资产说明" prop="wallet_desc" align="center"></el-table-column>
  73. <el-table-column label="结算状态" prop="status" align="center">
  74. <template slot-scope="scope">
  75. {{ scope.row.status ? '已结算' : '未结算' }}
  76. </template>
  77. </el-table-column>
  78. <el-table-column label="创建时间" align="center">
  79. <template slot-scope="scope">
  80. {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
  81. </template>
  82. </el-table-column>
  83. <el-table-column label="结算时间" align="center">
  84. <template slot-scope="scope">
  85. <span v-if="scope.row.agented_at">{{scope.row.agented_at|dateTimeFormat('Y-m-d H:i:s')}}</span>
  86. <span v-else>--</span>
  87. </template>
  88. </el-table-column>
  89. </el-table>
  90. </el-tabs>
  91. <div flex="box:last cross:center">
  92. <div></div>
  93. <div>
  94. <el-pagination v-if="pagination" :page-size="pagination.defaultPageSize" style="display: inline-block;float: right;" background @current-change="pageChange" layout="prev, pager, next" :total="pagination.totalCount">
  95. </el-pagination>
  96. </div>
  97. </div>
  98. </div>
  99. </el-card>
  100. </div>
  101. <script>
  102. const app = new Vue({
  103. el: '#app',
  104. data: {
  105. search: {
  106. order_no: '',
  107. keyword: '',
  108. page: 1,
  109. status: '',
  110. wallet_type: '',
  111. date_start: '',
  112. date_end: '',
  113. date: []
  114. },
  115. wallet_types: {},
  116. loading: false,
  117. activeName: '-1',
  118. list: [],
  119. pagination: null,
  120. exportList: {},
  121. choose_list: [],
  122. export_url: 'agent/detail/index', // 导出路径
  123. },
  124. mounted() {
  125. this.loadData();
  126. },
  127. methods: {
  128. addTimeChange(v) {
  129. this.search.date_start = v ? v[0] : '';
  130. this.search.date_end = v ? v[1] : '';
  131. },
  132. confirmSubmit() {
  133. console.log(this.activeName)
  134. this.search.status = this.activeName
  135. },
  136. loadData() {
  137. this.loading = true;
  138. let params = {
  139. r: 'agent/delay-log/index'
  140. };
  141. params = Object.assign(params, this.search);
  142. request({
  143. params: params,
  144. method: 'get',
  145. }).then(e => {
  146. this.loading = false;
  147. if (e.data.code == 0) {
  148. this.list = e.data.data.list;
  149. this.pagination = e.data.data.pagination;
  150. this.wallet_types = e.data.data.wallet_types;
  151. // this.exportList = e.data.data.export_list;
  152. } else {
  153. this.$message.error(e.data.msg);
  154. }
  155. }).catch(e => {
  156. this.loading = false;
  157. });
  158. },
  159. pageChange(page) {
  160. this.search.page = page;
  161. this.loadData();
  162. },
  163. handleClick(tab, event) {
  164. this.search.page = 1;
  165. this.search.status = this.activeName;
  166. this.loadData()
  167. },
  168. toSearch() {
  169. this.search.page = 1;
  170. this.loadData();
  171. },
  172. editClick() {
  173. this.edit.show = true;
  174. },
  175. handleSelectionChange(val) {
  176. let self = this;
  177. self.choose_list = [];
  178. val.forEach(function(item) {
  179. self.choose_list.push(item.id);
  180. })
  181. }
  182. }
  183. });
  184. </script>
  185. <style>
  186. .el-tabs__header {
  187. font-size: 16px;
  188. }
  189. .table-body {
  190. padding: 20px;
  191. background-color: #fff;
  192. }
  193. .table-body .el-button {
  194. border: 0;
  195. margin: 0 5px;
  196. }
  197. .input-item {
  198. margin: 0 0 20px;
  199. display: inline-block;
  200. }
  201. /*.input-item .el-input__inner {*/
  202. /* border-right: 0;*/
  203. /*}*/
  204. .input-item .el-input__inner:hover {
  205. border: 1px solid #dcdfe6;
  206. /*border-right: 0;*/
  207. outline: 0;
  208. }
  209. .input-item .el-input__inner:focus {
  210. border: 1px solid #dcdfe6;
  211. /*border-right: 0;*/
  212. outline: 0;
  213. }
  214. .input-item .el-input-group__append {
  215. background-color: #fff;
  216. border-left: 0;
  217. width: 10%;
  218. padding: 0;
  219. }
  220. .input-item .el-input-group__append .el-button {
  221. padding: 0;
  222. }
  223. .input-item .el-input-group__append .el-button {
  224. margin: 0;
  225. }
  226. .batch {
  227. margin: 0 0 20px;
  228. display: inline-block;
  229. }
  230. .batch .el-button {
  231. padding: 9px 15px !important;
  232. }
  233. .el-table th>.cell {
  234. color: #333;
  235. font-weight: bold;
  236. font-size: 14px;
  237. }
  238. .el-table__footer-wrapper,
  239. .el-table__header-wrapper {
  240. border-bottom: 1.4px solid #D6D6D6;
  241. }
  242. .el-table th>.cell {
  243. color: #333;
  244. font-weight: bold;
  245. font-size: 14px;
  246. }
  247. .table1 .el-table__footer-wrapper,
  248. .table1 .el-table__header-wrapper {
  249. border-bottom: 1.4px solid #D6D6D6;
  250. }
  251. .user_img {
  252. position: relative;
  253. margin-right: 8px;
  254. }
  255. .default-avatar {
  256. width: 50px;
  257. height: 50px;
  258. border-radius: 50%;
  259. margin-right: 8px;
  260. }
  261. .uer-nickname {
  262. flex: 1;
  263. }
  264. .tag-diff{
  265. display: inline-block;
  266. background-color: rgba(112, 182, 3, 1);
  267. color: #fff;
  268. border-radius: 42px;
  269. line-height: 22px;
  270. height: 22px;
  271. padding: 0 6px;
  272. }
  273. .wallet-price {
  274. font-size: 16px;
  275. }
  276. </style>