list.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  1. <style>
  2. .header {
  3. padding: 18px 20px;
  4. background: #fff;
  5. margin-bottom: 10px;
  6. border-radius: 5px;
  7. border: 1px solid #EBEEF5;
  8. }
  9. .el-card {
  10. box-shadow: none !important;
  11. }
  12. .inquires_box {
  13. flex-wrap: wrap;
  14. }
  15. .condition {
  16. width: 450px;
  17. }
  18. .condition2 {
  19. margin-right: 30px;
  20. margin-bottom: 20px;
  21. }
  22. .operat_btn_list .el-button {
  23. padding: 8px 20px;
  24. }
  25. .table_box {
  26. margin-top: 10px;
  27. }
  28. .give_btn {
  29. border-radius: 5px;
  30. background: #fff;
  31. padding: 2px 0;
  32. border: 1px solid #DCDFE6;
  33. width: 80px;
  34. cursor: pointer;
  35. }
  36. /*.el-table .cell {*/
  37. /* display: flex;*/
  38. /* justify-content: center;*/
  39. /*}*/
  40. .operat1 {
  41. color: #3399FF;
  42. margin-right: 20px;
  43. cursor: pointer;
  44. }
  45. .operat2 {
  46. color: #FF336E;
  47. cursor: pointer;
  48. }
  49. .pagination_box {
  50. margin-top: 30px;
  51. justify-content: flex-end;
  52. }
  53. .types {
  54. cursor: pointer;
  55. }
  56. .coupon_type_list_box {
  57. flex-wrap: wrap;
  58. }
  59. .coupon_type_list {
  60. background: #F4F4F4;
  61. border-radius: 4px;
  62. padding: 8px 6px;
  63. width: 110px;
  64. margin-bottom: 15px;
  65. margin-right: 15px;
  66. position: relative;
  67. }
  68. /* .coupon_type_list:last-child */
  69. .coupon_type_list_box :nth-child(5n) {
  70. margin-right: 0px;
  71. }
  72. .coupon_type_title {
  73. font-size: 16px;
  74. margin-bottom: 10px;
  75. }
  76. .coupon_type_content {
  77. font-size: 12px;
  78. margin-bottom: 4px;
  79. }
  80. .coupon_type_list_expired {
  81. width: 100px;
  82. position: absolute;
  83. top: 50%;
  84. left: 50%;
  85. transform: translate(-50%, -50%);
  86. opacity: 0.2;
  87. zoom: 1.05;
  88. }
  89. .el-dialog__body {
  90. padding: 20px 20px 10px;
  91. }
  92. .switchStyle .el-switch__label {
  93. position: absolute;
  94. display: none;
  95. color: #fff;
  96. }
  97. .switchStyle .el-switch__label--left {
  98. z-index: 9;
  99. left: 6px;
  100. }
  101. .switchStyle .el-switch__label--right {
  102. z-index: 9;
  103. left: -14px;
  104. }
  105. .switchStyle .el-switch__label.is-active {
  106. display: block;
  107. }
  108. .switchStyle.el-switch .el-switch__core,
  109. .el-switch .el-switch__label {
  110. width: 56px !important;
  111. }
  112. /* 公共样式 */
  113. .flex {
  114. display: -webkit-box;
  115. display: -webkit-flex;
  116. /* #ifndef APP-NVUE */
  117. display: flex;
  118. /* #endif */
  119. }
  120. .flex-x-center {
  121. display: -webkit-box;
  122. display: -webkit-flex;
  123. /* #ifndef APP-NVUE */
  124. display: flex;
  125. /* #endif */
  126. -webkit-box-pack: center;
  127. -webkit-justify-content: center;
  128. -ms-flex-pack: center;
  129. justify-content: center;
  130. }
  131. .flex-x-between {
  132. display: -webkit-box;
  133. display: -webkit-flex;
  134. /* #ifndef APP-NVUE */
  135. display: flex;
  136. /* #endif */
  137. -webkit-box-pack: space-between;
  138. -webkit-justify-content: space-between;
  139. -ms-flex-pack: space-between;
  140. justify-content: space-between;
  141. }
  142. .flex-y-center {
  143. display: -webkit-box;
  144. display: -webkit-flex;
  145. /* #ifndef APP-NVUE */
  146. display: flex;
  147. /* #endif */
  148. -webkit-box-align: center;
  149. -webkit-align-items: center;
  150. -ms-flex-align: center;
  151. -ms-grid-row-align: center;
  152. align-items: center;
  153. }
  154. .give-info {
  155. overflow: hidden;
  156. display: -webkit-box;
  157. -webkit-box-orient: vertical;
  158. -webkit-line-clamp: 1;
  159. }
  160. /* 溢出隐藏 */
  161. .over1 {
  162. text-overflow: -o-ellipsis-lastline;
  163. overflow: hidden;
  164. text-overflow: ellipsis;
  165. display: -webkit-box;
  166. -webkit-line-clamp: 1;
  167. -webkit-box-orient: vertical;
  168. }
  169. .over2 {
  170. text-overflow: -o-ellipsis-lastline;
  171. overflow: hidden;
  172. text-overflow: ellipsis;
  173. display: -webkit-box;
  174. -webkit-line-clamp: 2;
  175. -webkit-box-orient: vertical;
  176. }
  177. .el-table th > .cell {
  178. color: #333;
  179. font-weight: bold;
  180. font-size: 14px;
  181. }
  182. .el-table__footer-wrapper, .el-table__header-wrapper {
  183. border-bottom: 1.4px solid #D6D6D6;
  184. }
  185. </style>
  186. <div id='app' v-cloak style="min-width: 1000px;">
  187. <div class="header">
  188. </div>
  189. <el-card v-loading='loading'>
  190. <!-- 条件查询 -->
  191. <div class="inquires_box flex">
  192. <div class="condition condition2 flex flex-y-center">
  193. <div style="width: 90px;">会员ID:</div>
  194. <el-input size="small" style="flex: 1;margin-left:10px" placeholder="请输入会员ID"
  195. v-model="user_id"></el-input>
  196. </div>
  197. <div class="condition condition2 flex flex-y-center">
  198. <div style="width: 90px;">会员:</div>
  199. <el-input size="small" style="flex: 1;margin-left:10px" placeholder="请输入会员昵称/手机号"
  200. v-model="word"></el-input>
  201. </div>
  202. <el-date-picker size="small" v-model="date" type="datetimerange"
  203. style="float: left"
  204. value-format="yyyy-MM-dd HH:mm:ss"
  205. range-separator="至" start-placeholder="开始日期"
  206. @change="selectDateTime"
  207. end-placeholder="结束日期">
  208. </el-date-picker>
  209. <el-button type="primary" size="small" style="margin-bottom: 20px;" @click='query'>查询</el-button>
  210. </div>
  211. <div :data="all" style="color: #0A54EA">
  212. 赠送余额:{{all.all_balance}},
  213. 赠送积分:{{all.all_score}}
  214. </div>
  215. <div class="table_box">
  216. <el-table :data="tableData" stripe style="width: 100%;font-size:13px">
  217. <el-table-column prop="user_id" label="会员ID" width="180" align="center"></el-table-column>
  218. <el-table-column label="会员名称" min-width="150">
  219. <template slot-scope="scope">
  220. <div class="user_img">
  221. <image style="width: 50px;height: 50px; border-radius: 50%;" :src="scope.row.user.avatar_url? scope.row.user.avatar_url:'resources/img/mall/default_avatar_url.png'"></image>
  222. </div>
  223. <div>
  224. <div style="color:#000;">{{scope.row.user.nickname}}</div>
  225. </div>
  226. </template>
  227. </el-table-column>
  228. <el-table-column prop="recharge_num" label="充值金额" width="150" align="center"></el-table-column>
  229. <el-table-column prop="give_content" label="赠送内容" align="center">
  230. <template slot-scope="scope">
  231. <el-tooltip placement="bottom">
  232. <div slot="content">
  233. <div style="margin-bottom: 6px;" v-for="(item,index) in scope.row.give_content"
  234. :key="index">
  235. <div v-if="item.type == 'coupon'">
  236. {{item.name}}:
  237. <div v-for="(couponItem,coupoIndex) in item.data" :key="couponItem.id">
  238. {{couponItem.discount_method}}*{{couponItem.num}}张
  239. </div>
  240. </div>
  241. <span v-else>
  242. {{item.name}}:{{item.data}}
  243. </span>
  244. </div>
  245. </div>
  246. <div class="give-info">
  247. <span style="margin-bottom: 6px;" v-for="(item,index) in scope.row.give_content"
  248. :key="index">
  249. <span v-if="item.type == 'coupon'">
  250. {{item.name}}:
  251. <span v-for="(couponItem,coupoIndex) in item.data" :key="couponItem.id">
  252. {{couponItem.discount_method}}*{{couponItem.num}}张
  253. </span>
  254. </span>
  255. <span v-else>
  256. {{item.name}}:{{item.data}}
  257. </span>
  258. </span>
  259. </div>
  260. </el-tooltip>
  261. </template>
  262. </el-table-column>
  263. <el-table-column prop="created_at" label="充值时间" width='150' align="center">
  264. <template slot-scope="scope">
  265. <div>{{scope.row.created_at | dateTimeFormat("Y-m-d H:i:s")}}</div>
  266. </template>
  267. </el-table-column>
  268. </el-table>
  269. </div>
  270. <div style="text-align: right;margin: 20px 0;">
  271. <el-pagination @current-change="pagination" background layout="prev, pager, next"
  272. :page-count="pageCount"></el-pagination>
  273. </div>
  274. </el-card>
  275. </div>
  276. <script>
  277. new Vue({
  278. el: '#app',
  279. data() {
  280. return {
  281. loading: false,
  282. value: '',
  283. tableData: [],
  284. dialogVisible: false,
  285. all: [],
  286. date: '',
  287. start_date: '',
  288. end_date: '',
  289. pageCount: 0,
  290. recharge_active_id: '',
  291. user_id: '',
  292. word: '',
  293. page: 1,
  294. limit: 50,
  295. }
  296. },
  297. mounted() {
  298. this.getData();
  299. },
  300. methods: {
  301. query() {
  302. this.page = 1;
  303. this.getData();
  304. },
  305. search() {
  306. this.page = 1;
  307. if (this.date == null) {
  308. this.start_date = '';
  309. this.end_date = ''
  310. }
  311. this.getData();
  312. },
  313. getData() {
  314. this.loading = true;
  315. request({
  316. params: {
  317. r: 'recharge/default/list',
  318. },
  319. data: {
  320. user_id: this.user_id,
  321. recharge_active_id: this.recharge_active_id,
  322. word: this.word,
  323. start_date: this.start_date,
  324. end_date: this.end_date,
  325. page: this.page,
  326. limit: this.limit,
  327. },
  328. method: 'post',
  329. }).then(e => {
  330. this.loading = false;
  331. if (e.data.code == 0) {
  332. this.total_count = e.data.data.list.pagination.totalCount;
  333. this.tableData = e.data.data.list.list;
  334. this.all = e.data.data.all;
  335. this.pageCount = e.data.data.list.page_count;
  336. } else {
  337. this.$message.error(e.data.msg);
  338. }
  339. });
  340. }, pagination(currentPage) {
  341. this.page = currentPage;
  342. this.getData();
  343. },
  344. handleSizeChange(val) {
  345. this.limit = val;
  346. this.getData();
  347. },
  348. handleCurrentChange(val) {
  349. thia.page = val;
  350. this.getData();
  351. }, selectDateTime(e) {
  352. if (e != null) {
  353. this.start_date = e[0];
  354. this.end_date = e[1];
  355. } else {
  356. this.start_date = '';
  357. this.end_date = '';
  358. }
  359. this.search();
  360. }
  361. }, mounted: function () {
  362. this.recharge_active_id = getQuery('recharge_active_id');
  363. this.getData();
  364. }
  365. })
  366. </script>