index.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  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="onEdit(0)">购买次数</el-button>
  9. </div>
  10. </div>
  11. <div class="table-body">
  12. <el-form size="small" :inline="true" flex="dir:left cross:center">
  13. <div class="item-box">
  14. <el-input clearable size="small" style="width: 200px" v-model="search.id" placeholder="请输入ID号"></el-input>
  15. </div>
  16. <div class="item-box">
  17. <el-input clearable size="small" style="width: 200px" v-model="search.keyword" placeholder="请输入充值类型"></el-input>
  18. </div>
  19. <div class="item-box" flex="dir:left cross:center">
  20. <el-button size="small" type="primary" style="padding: 9px 15px !important;" @click="searchs">搜索</el-button>
  21. </div>
  22. </el-form>
  23. <el-tabs v-model="activeName" @tab-click="handleClick">
  24. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;"
  25. @selection-change="handleSelectionChange">
  26. <el-table-column label="ID" prop="id" width="120" align="center"></el-table-column>
  27. <el-table-column label="充值类型" prop="recharge_desc" align="left"></el-table-column>
  28. <el-table-column label="充值金额" prop="amount" width="160" align="center"></el-table-column>
  29. <el-table-column label="充值次数" prop="num" width="160" align="center"></el-table-column>
  30. <el-table-column label="支付方式" width="150" align="center">
  31. <template slot-scope="scope">
  32. <el-tag size="mini" :type="pay_types[scope.row.pay_type].type">{{pay_types[scope.row.pay_type].title}}</el-tag>
  33. </template>
  34. </el-table-column>
  35. <el-table-column label="订单编号" prop="order_no" align="center"></el-table-column>
  36. <el-table-column label="更新时间" width="160" align="center">
  37. <template slot-scope="scope">
  38. <div>{{scope.row.updated_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
  39. </template>
  40. </el-table-column>
  41. </el-table>
  42. </el-tabs>
  43. <!-- 分页器 -->
  44. <div flex="box:last cross:center">
  45. <div></div>
  46. <div>
  47. <el-pagination v-if="pagination" :page-size="pagination.defaultPageSize"
  48. style="display: inline-block;" background @current-change="pageChange"
  49. layout="prev, pager, next" :total="pagination.totalCount">
  50. </el-pagination>
  51. </div>
  52. </div>
  53. </div>
  54. <!-- 这个是复制用的容器,已隐藏 -->
  55. <textarea id="inputs" style="opacity: 0;width: 0;height: 0;">这是幕后黑手</textarea>
  56. </el-card>
  57. </div>
  58. <script>
  59. const app = new Vue({
  60. el: '#app',
  61. data: {
  62. page:1,
  63. time:[], //本地存时间,请求时不发送
  64. search: {
  65. keyword: '',
  66. id: '',
  67. },
  68. loading: false,
  69. activeName: '-1',
  70. list: [], //列表数据
  71. pagination: null,
  72. pay_types: [
  73. {
  74. title: '未支付',
  75. type: 'danger'
  76. },
  77. {
  78. title: '微信支付',
  79. type: 'success'
  80. },
  81. {
  82. title: '支付宝支付',
  83. type: 'primary'
  84. }
  85. ]
  86. },
  87. mounted() {
  88. // 获取列表首页数据
  89. this.loadData(this.page,this.search); //获取列表数据
  90. },
  91. methods: {
  92. // 1.0 获取视频列表
  93. loadData(page,others) {
  94. this.loading = true;
  95. if(!this.time){
  96. this.search.date_start = '';
  97. this.search.date_end = '';
  98. }else{
  99. this.search.date_start = this.time[0];
  100. this.search.date_end = this.time[1];
  101. }
  102. request({
  103. method: 'get',
  104. params: {
  105. r: 'wechat-video-shop/order/index',
  106. page: page,
  107. limit: 10,
  108. ...others, //其他搜索字段
  109. },
  110. }).then(e => {
  111. this.loading = false;
  112. if (e.data.code === 0) {
  113. this.list = e.data.data.list;
  114. this.pagination = e.data.data.pagination;
  115. } else {
  116. this.$message.error(e.data.msg);
  117. }
  118. }).catch(e => {
  119. });
  120. },
  121. pageChange(page) {
  122. this.page = page;
  123. this.loadData(this.page,this.search);
  124. },
  125. pageChangeDataPop(page) {
  126. },
  127. handleClick(tab, event) {
  128. this.page = 1;
  129. this.search.status = this.activeName;
  130. this.loadData(this.page,this.search)
  131. },
  132. handleSelectionChange(val) {
  133. let self = this;
  134. self.choose_list = [];
  135. val.forEach(function (item) {
  136. self.choose_list.push(item.id);
  137. })
  138. },
  139. searchs() {
  140. this.page = 1;
  141. this.loadData(this.page,this.search);
  142. },
  143. onEdit(id) {
  144. let params = {
  145. r: 'wechat-video-shop/order/index',
  146. };
  147. navigateTo(params);
  148. }
  149. },
  150. filters: {
  151. amount: function(val) {
  152. return parseFloat(val / 100).toFixed(2)
  153. }
  154. }
  155. });
  156. </script>
  157. <style>
  158. .set-el-button {
  159. padding: 0 !important;
  160. border: 0;
  161. margin: 0 5px;
  162. }
  163. .sort-input {
  164. width: 100%;
  165. background-color: #F3F5F6;
  166. height: 32px;
  167. }
  168. .sort-input span {
  169. height: 32px;
  170. width: 100%;
  171. line-height: 32px;
  172. display: inline-block;
  173. padding: 0 10px;
  174. font-size: 13px;
  175. }
  176. .sort-input .el-input__inner {
  177. height: 32px;
  178. line-height: 32px;
  179. background-color: #F3F5F6;
  180. float: left;
  181. padding: 0 10px;
  182. border: 0;
  183. }
  184. .table-body {
  185. padding: 20px;
  186. background-color: #fff;
  187. }
  188. .table-info .el-button {
  189. padding: 0 !important;
  190. border: 0;
  191. margin: 0 5px;
  192. }
  193. .input-item {
  194. margin: 0 0 20px;
  195. }
  196. .input-item-name {
  197. margin-right: 5px;
  198. }
  199. .input-search {
  200. margin-right: 30px;
  201. }
  202. .input-item .el-input-group__append {
  203. background-color: #fff;
  204. border-left: 0;
  205. width: 10%;
  206. padding: 0;
  207. }
  208. .input-item .el-input-group__append .el-button {
  209. padding: 0;
  210. }
  211. .input-item .el-input-group__append .el-button {
  212. margin: 0;
  213. }
  214. .data-pop-info {
  215. /* padding: 18px 15px 30px; */
  216. color: #333;
  217. }
  218. .data-pop-mode {
  219. background: #F8F8F8;
  220. border-radius: 4px;
  221. margin-bottom: 10px;
  222. }
  223. .data-pop-top {
  224. height: 90px;
  225. }
  226. .data-price {
  227. width: 200px;
  228. flex-direction: column;
  229. border-right: 1px solid #E5E5E5;
  230. }
  231. .data-info {
  232. flex: 1;
  233. padding: 22px 15px;
  234. font-size: 16px;
  235. }
  236. .data-info-name {
  237. display: inline-block;
  238. text-align: end;
  239. }
  240. .data-pop-detail {
  241. padding: 15px 18px;
  242. }
  243. .data-detail-mode {
  244. min-width: 33%;
  245. flex-shrink: 0;
  246. text-align: center;
  247. margin-top: 16px;
  248. line-height: 26px;
  249. font-size: 16px;
  250. }
  251. .share-pop-model {
  252. margin-top: 20px;
  253. }
  254. .share-name {
  255. width: 90px;
  256. display: inline-block;
  257. margin-right: 18px;
  258. text-align: end;
  259. }
  260. .flex-y-center {
  261. display: -webkit-box;
  262. display: -webkit-flex;
  263. display: flex;
  264. -webkit-box-align: center;
  265. -webkit-align-items: center;
  266. -ms-flex-align: center;
  267. -ms-grid-row-align: center;
  268. align-items: center;
  269. }
  270. </style>
  271. <style>
  272. .el-tabs__header {
  273. font-size: 16px;
  274. }
  275. .table-body {
  276. padding: 20px;
  277. background-color: #fff;
  278. }
  279. .table-body .el-button {
  280. padding: 0 !important;
  281. border: 0;
  282. margin: 0 5px;
  283. }
  284. .input-item {
  285. width: 250px;
  286. margin: 0 0 20px;
  287. display: inline-block;
  288. }
  289. .input-item .el-input__inner {
  290. border-right: 0;
  291. }
  292. .input-item .el-input__inner:hover {
  293. border: 1px solid #dcdfe6;
  294. border-right: 0;
  295. outline: 0;
  296. }
  297. .input-item .el-input__inner:focus {
  298. border: 1px solid #dcdfe6;
  299. border-right: 0;
  300. outline: 0;
  301. }
  302. .input-item .el-input-group__append {
  303. background-color: #fff;
  304. border-left: 0;
  305. width: 10%;
  306. padding: 0;
  307. }
  308. .input-item .el-input-group__append .el-button {
  309. padding: 0;
  310. }
  311. .input-item .el-input-group__append .el-button {
  312. margin: 0;
  313. }
  314. .batch {
  315. margin: 0 0 20px;
  316. display: inline-block;
  317. }
  318. .batch .el-button {
  319. padding: 9px 15px !important;
  320. }
  321. .item-box{
  322. margin-right: 20px;
  323. }
  324. .item-box .label{
  325. margin-right: 8px;
  326. }
  327. .item-box .symbol{
  328. margin: 0 6px;
  329. }
  330. .form-nickname{
  331. width: 180px;
  332. white-space:nowrap;
  333. overflow:hidden;
  334. text-overflow:ellipsis;
  335. }
  336. .index-video-url{
  337. width: 300px;
  338. }
  339. .index-video-url video{
  340. width: 100%;
  341. }
  342. .index-related-info{
  343. width: 500px;
  344. }
  345. .video-top{
  346. width: 100%;
  347. display: flex;
  348. align-items: flex-start;
  349. box-sizing: border-box;
  350. padding: 20px;
  351. /* opacity: .5; */
  352. background-color: #FFFFFF;
  353. }
  354. .video-top .top-right{
  355. line-height: 26px;
  356. }
  357. .video-top .top-right .top-title{
  358. font-size: 18px;
  359. white-space:nowrap;
  360. overflow:hidden;
  361. text-overflow:ellipsis;
  362. width: 360px;
  363. }
  364. .video-top .top-right .wrapper{
  365. display: flex;
  366. /* align-items: flex-start; */
  367. }
  368. .video-top .top-right .wrapper .to-copy{
  369. /* color: #03C5FF; */
  370. margin-left: 20px;
  371. }
  372. .video-top .top-right .detail-price{
  373. color: #BC0100;
  374. font-size: 18px;
  375. font-family: Microsoft YaHei;
  376. font-weight: bold;
  377. }
  378. /* .atooltip {
  379. background: #FFFFFF !important;
  380. border: none !important;
  381. } */
  382. .el-table th>.cell{
  383. color: #333;
  384. font-weight: bold;
  385. font-size: 14px;
  386. }
  387. .el-table__footer-wrapper, .el-table__header-wrapper{
  388. border-bottom: 1.4px solid #D6D6D6;
  389. }
  390. .price_col{
  391. color: #FF5D05;
  392. }
  393. </style>