point-log-list.blade.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. @extends('layouts.base')
  2. @section('title', '赠送积分明细')
  3. @section('content')
  4. <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-goods1.css')}}"/>
  5. <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-ohter.css')}}"/>
  6. <style>
  7. .edit-i {
  8. display: none;
  9. }
  10. .el-table_1_column_2:hover .edit-i {
  11. font-weight: 900;
  12. padding: 0;
  13. margin: 0;
  14. display: inline-block;
  15. }
  16. .el-tabs__item, .is-top {
  17. font-size: 16px
  18. }
  19. .el-tabs__active-bar {
  20. height: 3px;
  21. }
  22. /*.el-select .el-input {*/
  23. /* width: 120px;*/
  24. /*}*/
  25. .input-with-select .el-input-group__prepend {
  26. background-color: #fff;
  27. }
  28. </style>
  29. <div class="all">
  30. <div id="app" v-cloak>
  31. <div class="vue-head">
  32. <div class="vue-search">
  33. <el-form :inline="true" :model="search_form" class="demo-form-inline">
  34. <el-form-item>
  35. <el-input placeholder="订单号" v-model="search_form.order_sn"></el-input>
  36. </el-form-item>
  37. {{-- <el-form-item>--}}
  38. {{-- <el-input placeholder="消费券码" v-model="search_form.coupon_sn"></el-input>--}}
  39. {{-- </el-form-item>--}}
  40. <el-form-item>
  41. <el-select clearable v-model="search_form.is_count">
  42. <el-option label="不统计" value="0"></el-option>
  43. <el-option label="统计" value="1"></el-option>
  44. </el-select>
  45. </el-form-item>
  46. <el-form-item>
  47. <el-select clearable v-model="search_form.time_search" placeholder="搜索时间类型">
  48. <el-option
  49. v-for="(item,index) in ts_arr"
  50. :key="index"
  51. :label="item.label"
  52. :value="item.value">
  53. </el-option>
  54. </el-select>
  55. </el-form-item>
  56. <el-form-item>
  57. <div class="block">
  58. <span class="demonstration"></span>
  59. <el-date-picker
  60. v-model="search_form.time_arr"
  61. type="datetimerange"
  62. :picker-options="pickerOptions"
  63. range-separator="至"
  64. start-placeholder="开始日期"
  65. end-placeholder="结束日期"
  66. value-format="timestamp"
  67. align="right">
  68. </el-date-picker>
  69. </div>
  70. </el-form-item>
  71. <el-form-item>
  72. <el-button-group>
  73. <el-button style="margin-bottom:10px;margin-left:0;" type="primary"
  74. @click="changeForm()">搜索
  75. </el-button>
  76. <el-button style="margin-bottom:10px;margin-left:0;" type=""
  77. @click="export1()">导出
  78. </el-button>
  79. </el-button-group>
  80. </el-form-item>
  81. </el-row>
  82. </el-form>
  83. </div>
  84. </div>
  85. <div class="vue-main">
  86. <div class="vue-main-form">
  87. <div class="vue-main-title" style="margin-top:-10px">
  88. <div class="title"><span
  89. style="width: 4px;height: 18px;background-color: #29ba9c;margin-right:15px;display:inline-block;"></span><b>区域分红</b>
  90. </div>
  91. <div class="tip" style="margin-left: 10px;margin-top:5px;display:inline-block;">
  92. <b>总数:[[total]]</b>&nbsp;
  93. <template v-if="is_count==1">
  94. <b>&nbsp;&nbsp;积分:[[sum_point]]</b>
  95. </template>
  96. </div>
  97. </div>
  98. </div>
  99. <div style="margin-bottom:20px">
  100. </div>
  101. <el-table v-if="show_table" :data="list" style="width: 100%;margin-bottom: 20px;"
  102. :fit="true"
  103. default-expand-all
  104. row-key="id"
  105. ref="table">
  106. <el-table-column prop="id" label="ID" align="center">
  107. </el-table-column>
  108. <el-table-column prop="created_at" label="赠送时间" align="center">
  109. </el-table-column>
  110. <el-table-column label="订单号" align="center">
  111. <template slot-scope="scope">
  112. [[scope.row.has_one_order.order_sn]]
  113. </template>
  114. </el-table-column>
  115. <el-table-column prop="point" label="赠送积分" align="center">
  116. </el-table-column>
  117. </el-table>
  118. </div>
  119. <div class="vue-page" v-if="total > 0">
  120. <el-row>
  121. <el-col align="right">
  122. <el-pagination layout="prev, pager, next,jumper" @current-change="getData"
  123. :total="total"
  124. :page-size="per_page" :current-page="current_page" background
  125. ></el-pagination>
  126. </el-col>
  127. </el-row>
  128. </div>
  129. </div>
  130. <!-- 分页 -->
  131. </div>
  132. </div>
  133. <script>
  134. var app = new Vue({
  135. el: "#app",
  136. delimiters: ['[[', ']]'],
  137. name: 'test',
  138. data() {
  139. {{--let store_id = '{!!($_GET['store_id']) !!}' ? '{!!($_GET['store_id']) !!}' : '0';--}}
  140. return {
  141. tabActiveName: 'third',
  142. show_table: false,
  143. sum_point:0,
  144. is_count:0,
  145. list: [],
  146. total: 1,
  147. per_page: 1,
  148. current_page: 1,
  149. search_form: {
  150. order_sn: '',
  151. is_count: '0',
  152. time_search: '',
  153. time_arr: [new Date().getTime(), new Date().getTime()],
  154. },
  155. search_data: {},
  156. ts_arr: [
  157. {value: 'created_at', label: '赠送时间'},
  158. ],
  159. pickerOptions: {
  160. shortcuts: [{
  161. text: '最近一周',
  162. onClick(picker) {
  163. const end = new Date();
  164. const start = new Date();
  165. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  166. picker.$emit('pick', [start, end]);
  167. }
  168. }, {
  169. text: '最近一个月',
  170. onClick(picker) {
  171. const end = new Date();
  172. const start = new Date();
  173. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  174. picker.$emit('pick', [start, end]);
  175. }
  176. }, {
  177. text: '最近三个月',
  178. onClick(picker) {
  179. const end = new Date();
  180. const start = new Date();
  181. start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
  182. picker.$emit('pick', [start, end]);
  183. }
  184. }]
  185. },
  186. }
  187. },
  188. created() {
  189. },
  190. mounted() {
  191. this.changeForm();
  192. },
  193. methods: {
  194. export1(){
  195. let json = JSON.parse(JSON.stringify(this.search_data));
  196. let newTime = JSON.parse(JSON.stringify(this.search_data.time_arr));
  197. newTime[0] = newTime !== null ? newTime[0] / 1000 : '';
  198. newTime[1] = newTime !== null ? newTime[1] / 1000 : '';
  199. json.time_arr = newTime;
  200. let search_data = JSON.stringify(json);
  201. let url = `{!! yzWebFullUrl('plugin.area-dividend.area.point-log.export') !!}`;
  202. url = url + '&search_data=' + search_data;
  203. window.open(url);
  204. },
  205. {{--tabChange() {--}}
  206. {{-- var url = '';--}}
  207. {{-- url = '{!! yzWebFullUrl('plugin.coupon-store.store.income.areaIndex') !!}';--}}
  208. {{-- window.location.href = url;--}}
  209. {{--},--}}
  210. {{--memberDetail: function (id) {--}}
  211. {{-- window.open("{!! yzWebFullUrl('member.member.detail') !!}" + '&id=' + id);--}}
  212. {{--},--}}
  213. {{--orderDetail: function (id) {--}}
  214. {{-- window.open("{!! yzWebFullUrl(' plugin.coupon-store.store.detail.vue-index') !!}" + '&id=' + id + '&order_id=' + id);--}}
  215. {{--},--}}
  216. search: function () {
  217. this.show_table = false;
  218. this.$http.post('{!! yzWebFullUrl('plugin.area-dividend.area.point-log.index') !!}', {
  219. 'page': this.current_page,
  220. 'is_json': 1,
  221. 'search_data': this.search_data,
  222. }).then(function (response) {
  223. console.log(response);
  224. if (response.data.result) {
  225. let this_data = response.data.data.list;
  226. this.current_page = this_data.current_page;
  227. this.list = this_data.data;
  228. this.total = this_data.total;
  229. this.per_page = this_data.per_page;
  230. this.sum_point = response.data.data.sum_point;
  231. this.is_count = response.data.data.is_count;
  232. // this.$message({message: response.data.msg,type: 'success'});
  233. // location.reload();
  234. this.show_table = true;
  235. } else {
  236. this.$message({message: response.data.msg, type: 'error'});
  237. this.show_table = true;
  238. }
  239. }, function (response) {
  240. this.$message({message: response.data.msg, type: 'error'});
  241. this.show_table = true;
  242. })
  243. },
  244. getData: function (val) {
  245. this.current_page = val;
  246. this.search();
  247. },
  248. changeForm: function () {
  249. this.search_data = this.search_form;
  250. this.current_page = 1;
  251. this.search();
  252. }
  253. },
  254. })
  255. </script>
  256. @endsection