index.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. <?php
  2. use common\helpers\ComponentHelper;
  3. ComponentHelper::loadComponentView('com-export-dialog');
  4. ?>
  5. <style>
  6. .table-body {
  7. padding: 20px;
  8. background-color: #fff;
  9. }
  10. .input-item {
  11. display: inline-block;
  12. width: 250px;
  13. margin: 0 0 20px;
  14. }
  15. .input-item .el-input__inner {
  16. border-right: 0;
  17. }
  18. .input-item .el-input__inner:hover {
  19. border: 1px solid #dcdfe6;
  20. border-right: 0;
  21. outline: 0;
  22. }
  23. .input-item .el-input__inner:focus {
  24. border: 1px solid #dcdfe6;
  25. border-right: 0;
  26. outline: 0;
  27. }
  28. .input-item .el-input-group__append {
  29. background-color: #fff;
  30. border-left: 0;
  31. width: 10%;
  32. padding: 0;
  33. }
  34. .input-item .el-input-group__append .el-button {
  35. padding: 0;
  36. }
  37. .input-item .el-input-group__append .el-button {
  38. margin: 0;
  39. }
  40. /* .table-body .el-button {
  41. padding: 0 !important;
  42. border: 0;
  43. margin: 0 5px;
  44. } */
  45. .el-table th>.cell {
  46. color: #333;
  47. font-weight: bold;
  48. font-size: 14px;
  49. }
  50. .el-table__footer-wrapper,
  51. .el-table__header-wrapper {
  52. border-bottom: 1.4px solid #D6D6D6;
  53. }
  54. .el-date-editor .el-range-separator {
  55. /* 设置选择日期框的中间的 ‘至’ 的宽度 */
  56. width: 8%;
  57. }
  58. </style>
  59. <div id="app" v-cloak>
  60. <el-card shadow="never" body-style="background-color: #f3f3f3;padding: 10px 0 0;" style="min-width: 1000px;">
  61. <div slot="header">
  62. <div>
  63. <span>代付记录列表</span>
  64. <div style="float: right; margin: -5px 0">
  65. <!-- <el-button type="primary" size="small" @click="handle('edit')">添加商品</el-button>-->
  66. <!-- <el-button type="primary" size="small">订单导出</el-button>-->
  67. <com-export-dialog style="float: right;margin-top: -5px" :field_list='export_list' :action_url="export_url" :params="search">
  68. </com-export-dialog>
  69. </div>
  70. </div>
  71. </div>
  72. <div class="table-body">
  73. <div class="head" style="display: flex;flex-wrap: wrap;">
  74. <div style="display: flex;width: 350px;margin-right: 20px;align-items: center;margin-bottom: 20px;">
  75. <div style="flex-shrink: 0;align-items: center;">会员ID:</div>
  76. <el-input clearable size="small" type="text" v-model="search.user_id" placeholder="请输入会员ID" @keyup.enter.native="toSearch"></el-input>
  77. </div>
  78. <div style="display: flex;width: 350px;margin-right: 20px;align-items: center;margin-bottom: 20px;">
  79. <div style="flex-shrink: 0;align-items: center;">会员:</div>
  80. <el-input clearable size="small" type="text" v-model="search.user_keyword" placeholder="请输入手机号/昵称" @keyup.enter.native="toSearch"></el-input>
  81. </div>
  82. <div style="display: flex;width: 350px;margin-right: 20px;align-items: center;margin-bottom: 20px;">
  83. <div style="flex-shrink: 0;align-items: center;">收款人/收款账号:</div>
  84. <el-input clearable size="small" type="text" v-model="search.receive_keyword" placeholder="请输入收款人/收款账号" @keyup.enter.native="toSearch"></el-input>
  85. </div>
  86. <div style="display: flex;width: 350px;margin-right: 20px;align-items: center;margin-bottom: 20px;">
  87. <div style="flex-shrink: 0;align-items: center;">订单号:</div>
  88. <el-input clearable size="small" type="text" v-model="search.order_no" placeholder="请输入订单号" @keyup.enter.native="toSearch"></el-input>
  89. </div>
  90. <!-- <div style="display: flex;width: 350px;margin-right: 20px;align-items: center;margin-bottom: 20px;">
  91. <div style="flex-shrink: 0;align-items: center; margin-right: 5px;">账号类型:</div>
  92. <el-select clearable size="small" v-model="search.account_type" placeholder="请选择账号类型">
  93. <el-option :key="0" :value="201" label="对私">对私</el-option>
  94. <el-option :key="1" :value="202" label="对公">对公</el-option>
  95. </el-select>
  96. </div> -->
  97. <div style="display: flex;margin-right: 20px;align-items: center;margin-bottom: 20px;">
  98. <div style="flex-shrink: 0;align-items: center;">创建时间:</div>
  99. <el-date-picker size="small" v-model="time" @change="datetimeChange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" align="center">
  100. </el-date-picker><!-- type="datetimerange" @change="datetimeChange" v-model="time"-->
  101. </div>
  102. <!-- <el-button type="primary" size="small" icon="el-icon-search" style="margin-bottom: 20px;" @click='toSearch'>搜索</el-button> -->
  103. <div class="item-box" flex="dir:left cross:center">
  104. <el-button size="small" type="primary" style="margin-bottom: 20px;" @click="toSearch">搜索
  105. </el-button>
  106. </div>
  107. <div class="item-box" flex="dir:left cross:center" v-if="search.user_id || search.user_keyword || search.order_no || search.start_time || search.end_time || search.receive_keyword || search.account_type">
  108. <el-button size="small" type="warning" style="margin-bottom: 20px; margin-left: 10px;" @click="resetFun">清除搜索条件</el-button>
  109. </div>
  110. </div>
  111. <el-table v-loading="listLoading" :data="list" stripe style="width: 100%">
  112. <el-table-column label="会员ID" min-width="120" align="center">
  113. <template slot-scope="scope">
  114. <div size="small">{{scope.row.user_id}}</div>
  115. </template>
  116. </el-table-column>
  117. <el-table-column prop="avatar_url,nickname" label="会员名称" min-width="120">
  118. <template slot-scope="scope">
  119. <div class="table-info-img-text">
  120. <el-image class="table-info-img circle" :src="scope.row.avatar_url"> </el-image>
  121. <div class="table-info-text">
  122. <div v-if="scope.row.nickname">{{scope.row.nickname}}</div>
  123. <div>{{scope.row.mobile}}</div>
  124. </div>
  125. </div>
  126. </template>
  127. </el-table-column>
  128. <el-table-column label="收款账号信息" min-width="120" align="center">
  129. <template slot-scope="scope">
  130. <div size="small">{{scope.row.receive_account}}<br />{{scope.row.receive_name}}</div>
  131. </template>
  132. </el-table-column>
  133. <el-table-column label="收款账号类型" min-width="120" align="center">
  134. <template slot-scope="scope">
  135. <div size="small">{{scope.row.account_type_text}}</div>
  136. </template>
  137. </el-table-column>
  138. <el-table-column label="订单号" min-width="100" align="center">
  139. <template slot-scope="scope">
  140. <div size="small">{{scope.row.merchant_order_no}}</div>
  141. </template>
  142. </el-table-column>
  143. <el-table-column label="金额" min-width="120" align="center">
  144. <template slot-scope="scope">
  145. <div size="small">{{scope.row.amount}}</div>
  146. </template>
  147. </el-table-column>
  148. <el-table-column label="状态" min-width="100" align="center">
  149. <template slot-scope="scope">
  150. <div size="small">{{scope.row.status_text}}</div>
  151. </template>
  152. </el-table-column>
  153. <el-table-column label="创建时间" prop="user_id" min-width="80" align="center">
  154. <template slot-scope="scope">
  155. <div size="small">{{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
  156. </template>
  157. </el-table-column>
  158. <el-table-column label="到账时间" prop="user_id" min-width="80" align="center">
  159. <template slot-scope="scope">
  160. <div size="small" v-if="scope.row.status ==1">{{scope.row.updated_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
  161. </template>
  162. </el-table-column>
  163. <!--
  164. <el-table-column
  165. label="操作"
  166. align="center"
  167. min-width="100">
  168. <template slot-scope="scope">
  169. <el-button style="margin: 1px;" type="primary" size="mini" @click="seeOrder(scope.row)">查看订单<i class="el-icon-caret-right el-icon--right"></i></el-button>
  170. </template>
  171. </el-table-column>
  172. -->
  173. </el-table>
  174. <div flex="box:last cross:center">
  175. <div></div>
  176. <div>
  177. <el-pagination v-if="list.length > 0" style="display: inline-block;float: right;" background :page-size="pagination.pageSize" @current-change="pageChange" layout="prev, pager, next" :current-page="pagination.current_page" :page-count="pageCount">
  178. </el-pagination>
  179. </div>
  180. </div>
  181. </div>
  182. </el-card>
  183. </div>
  184. <script>
  185. const app = new Vue({
  186. el: '#app',
  187. data() {
  188. return {
  189. export_list: {},
  190. export_url: 'join-pay/default/alternative-pay-record',
  191. list: [],
  192. listLoading: false,
  193. page: 1,
  194. pageCount: 0,
  195. search: {
  196. page: 1,
  197. order_no: '',
  198. start_time: '',
  199. end_time: '',
  200. account_type: null,
  201. receive_keyword: '',
  202. user_id: null,
  203. user_keyword: '',
  204. },
  205. time: '',
  206. };
  207. },
  208. methods: {
  209. resetFun() {
  210. this.search = {
  211. page: 1,
  212. order_no: '',
  213. start_time: '',
  214. end_time: '',
  215. account_type: null,
  216. receive_keyword: '',
  217. user_id: null,
  218. user_keyword: '',
  219. }
  220. this.time = '';
  221. this.toSearch();
  222. },
  223. datetimeChange() {
  224. if (this.time) {
  225. this.search.start_time = this.time[0];
  226. this.search.end_time = this.time[1];
  227. } else {
  228. this.search.start_time = '';
  229. this.search.end_time = '';
  230. }
  231. this.toSearch();
  232. },
  233. toSearch() {
  234. this.search.page = 1;
  235. this.getList();
  236. },
  237. pageChange(currentPage) {
  238. let self = this;
  239. self.search.page = currentPage;
  240. self.getList();
  241. },
  242. // 0.1 获取提成明细列表
  243. getList() {
  244. let self = this;
  245. self.listLoading = true;
  246. let params = {
  247. r: 'join-pay/default/alternative-pay-record',
  248. }
  249. params = Object.assign(params, this.search);
  250. request({
  251. params: params,
  252. method: 'get',
  253. }).then(e => {
  254. self.listLoading = false;
  255. if (e.data.code == 0) {
  256. self.list = e.data.data.list;
  257. self.export_list = e.data.data.export_list;
  258. this.pagination = e.data.data.pagination;
  259. self.pageCount = e.data.data.page_count;
  260. } else {
  261. self.$message.error(e.data.msg);
  262. }
  263. }).catch(e => {
  264. console.log(e);
  265. self.$message.error(e);
  266. });
  267. },
  268. },
  269. mounted: function() {
  270. this.getList();
  271. }
  272. });
  273. </script>