order.php 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. <?php
  2. /**
  3. * @link:http://www.goodmall.com/
  4. * @copyright: Copyright (c) 2020
  5. * 名片
  6. * Author: james
  7. * Date: 2020-07-10
  8. * Time: 15:48
  9. */
  10. ?>
  11. <div id="app" v-cloak>
  12. <el-card shadow="never" style="border:0;min-width: 1200px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  13. <div slot="header">
  14. <span>奖励总计</span>
  15. </div>
  16. <div class="table-body">
  17. <el-form size="small" :inline="true" flex="dir:left cross:center">
  18. <div class="item-box" flex="dir:left cross:center">
  19. <el-input size="small" style="width: 200px" type="text" v-model="search.user_id" placeholder="用户id"></el-input>
  20. <el-input size="small" style="width: 200px" type="text" v-model="search.goods_id" placeholder="商品id"></el-input>
  21. <el-input size="small" style="width: 200px" type="text" v-model="search.order_no" placeholder="订单编号"></el-input>
  22. <el-input size="small" style="width: 200px" type="text" v-model="search.grant_id" placeholder="周期ID"></el-input>
  23. </div>
  24. <div class="item-box" flex="dir:left cross:center">
  25. <el-button size="small" type="primary" style="padding: 9px 15px !important;" @click="searchs">搜索
  26. </el-button>
  27. </div>
  28. </el-form>
  29. <el-tabs v-model="activeName" @tab-click="handleClick">
  30. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;"
  31. @selection-change="handleSelectionChange">
  32. <el-table-column label="周期ID" prop="grant_id" align="center"></el-table-column>
  33. <el-table-column prop="order_no" width="200" label="订单编号" align="center">
  34. <template slot-scope="scope">
  35. <div>{{scope.row.order_no}}</div>
  36. </template>>
  37. </el-table-column>
  38. <el-table-column label="商品名称" prop="goods_name" align="center">
  39. <template slot-scope="scope">
  40. <div>{{scope.row.goods.goods_name}}</div>
  41. </template>
  42. </el-table-column>
  43. <el-table-column label="会员昵称" prop="nickname" align="center">
  44. <template slot-scope="scope">
  45. <div>{{scope.row.user.nickname}}</div>
  46. </template>
  47. </el-table-column>
  48. <el-table-column label="类型" prop="is_cloud_text" align="center">
  49. <template slot-scope="scope">
  50. <div>{{scope.row.is_cloud_text}}</div>
  51. </template>
  52. </el-table-column>
  53. <el-table-column label="价格" prop="is_cloud_text" align="center">
  54. <template slot-scope="scope">
  55. <div>{{scope.row.price}}</div>
  56. </template>
  57. </el-table-column>
  58. <el-table-column label="添加时间" prop="created_at" min-width="160" align="center">
  59. <template slot-scope="scope">
  60. <div>{{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
  61. </template>
  62. </el-table-column>
  63. </el-table>
  64. </el-tabs>
  65. <!-- 分页器 -->
  66. <div flex="box:last cross:center">
  67. <div></div>
  68. <div>
  69. <el-pagination v-if="pagination" :page-size="pagination.defaultPageSize"
  70. style="display: inline-block;float: right;" background @current-change="pageChange"
  71. layout="prev, pager, next" :total="pagination.totalCount">
  72. </el-pagination>
  73. </div>
  74. </div>
  75. </div>
  76. <!-- 这个是复制用的容器,已隐藏 -->
  77. <textarea id="inputs" style="opacity: 0;width: 0;height: 0;">这是幕后黑手</textarea>
  78. </el-card>
  79. </div>
  80. <script>
  81. const app = new Vue({
  82. el: '#app',
  83. data: {
  84. page:1,
  85. avatar: '',
  86. nickname: '',
  87. time:[], //本地存时间,请求时不发送
  88. search: {
  89. goods_id : '',
  90. order_no : '',
  91. user_id : '',
  92. grant_id : '',
  93. },
  94. loading: false,
  95. activeName: '-1',
  96. list: [], //列表数据
  97. sum: {
  98. award_money:0,
  99. award_user:0,
  100. grant_num:0,
  101. },
  102. pagination: null,
  103. },
  104. mounted() {
  105. // 获取列表首页数据
  106. this.loadData(this.page,this.search); //获取列表数据
  107. },
  108. methods: {
  109. loadData(page,others) {
  110. this.loading = true;
  111. console.log(this.search);
  112. if(!this.time){
  113. this.search.date_start = '';
  114. this.search.date_end = '';
  115. }else{
  116. this.search.date_start = this.time[0];
  117. this.search.date_end = this.time[1];
  118. }
  119. request({
  120. method: 'get',
  121. params: {
  122. r: 'achievement/default/order',
  123. page: page,
  124. ...others, //其他搜索字段
  125. },
  126. }).then(e => {
  127. this.loading = false;
  128. if (e.data.code === 0) {
  129. this.list = e.data.data.list;
  130. this.sum = e.data.data.sum;
  131. this.pagination = e.data.data.pagination;
  132. } else {
  133. this.$message.error(e.data.msg);
  134. }
  135. }).catch(e => {
  136. });
  137. },
  138. toDetail(id){
  139. console.log(id)
  140. this.$navigate({
  141. r: 'mall/order/detail',
  142. order_id: id
  143. })
  144. },
  145. pageChange(page) {
  146. this.page = page;
  147. this.loadData(this.page,this.search);
  148. },
  149. handleClick(tab, event) {
  150. this.page = 1;
  151. this.search.status = this.activeName;
  152. this.loadData(this.page,this.search)
  153. },
  154. handleSelectionChange(val) {
  155. let self = this;
  156. self.choose_list = [];
  157. val.forEach(function (item) {
  158. self.choose_list.push(item.id);
  159. })
  160. },
  161. searchs() {
  162. this.page = 1;
  163. this.loadData(this.page,this.search);
  164. },
  165. }
  166. });
  167. </script>
  168. <style>
  169. .el-tabs__header {
  170. font-size: 16px;
  171. }
  172. .table-body {
  173. padding: 20px;
  174. background-color: #fff;
  175. }
  176. .table-body .el-button {
  177. padding: 0 !important;
  178. border: 0;
  179. margin: 0 5px;
  180. }
  181. .input-item {
  182. width: 250px;
  183. margin: 0 0 20px;
  184. display: inline-block;
  185. }
  186. .input-item .el-input__inner {
  187. border-right: 0;
  188. }
  189. .input-item .el-input__inner:hover {
  190. border: 1px solid #dcdfe6;
  191. border-right: 0;
  192. outline: 0;
  193. }
  194. .input-item .el-input__inner:focus {
  195. border: 1px solid #dcdfe6;
  196. border-right: 0;
  197. outline: 0;
  198. }
  199. .input-item .el-input-group__append {
  200. background-color: #fff;
  201. border-left: 0;
  202. width: 10%;
  203. padding: 0;
  204. }
  205. .input-item .el-input-group__append .el-button {
  206. padding: 0;
  207. }
  208. .input-item .el-input-group__append .el-button {
  209. margin: 0;
  210. }
  211. .batch {
  212. margin: 0 0 20px;
  213. display: inline-block;
  214. }
  215. .batch .el-button {
  216. padding: 9px 15px !important;
  217. }
  218. .item-box{
  219. margin-right: 20px;
  220. }
  221. .item-box .label{
  222. margin-right: 8px;
  223. }
  224. .item-box .symbol{
  225. margin: 0 6px;
  226. }
  227. .form-nickname{
  228. width: 180px;
  229. white-space:nowrap;
  230. overflow:hidden;
  231. text-overflow:ellipsis;
  232. }
  233. .index-video-url{
  234. width: 300px;
  235. }
  236. .index-video-url video{
  237. width: 100%;
  238. }
  239. .index-related-info{
  240. width: 500px;
  241. }
  242. .video-top{
  243. width: 100%;
  244. display: flex;
  245. align-items: flex-start;
  246. box-sizing: border-box;
  247. padding: 20px;
  248. /* opacity: .5; */
  249. background-color: #FFFFFF;
  250. }
  251. .video-top .top-right{
  252. line-height: 26px;
  253. }
  254. .video-top .top-right .top-title{
  255. font-size: 18px;
  256. white-space:nowrap;
  257. overflow:hidden;
  258. text-overflow:ellipsis;
  259. width: 360px;
  260. }
  261. .video-top .top-right .wrapper{
  262. display: flex;
  263. /* align-items: flex-start; */
  264. }
  265. .video-top .top-right .wrapper .to-copy{
  266. /* color: #03C5FF; */
  267. margin-left: 20px;
  268. }
  269. .video-top .top-right .detail-price{
  270. color: #BC0100;
  271. font-size: 18px;
  272. font-family: Microsoft YaHei;
  273. font-weight: bold;
  274. }
  275. /* .atooltip {
  276. background: #FFFFFF !important;
  277. border: none !important;
  278. } */
  279. .el-table th>.cell{
  280. color: #333;
  281. font-weight: bold;
  282. font-size: 14px;
  283. }
  284. .el-table__footer-wrapper, .el-table__header-wrapper{
  285. border-bottom: 1.4px solid #D6D6D6;
  286. }
  287. .price_col{
  288. color: #FF5D05;
  289. }
  290. </style>