destory.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  1. <?php
  2. ?>
  3. <style>
  4. @media screen and (max-width: 1370px) {
  5. #stat_pay {
  6. min-width: 1131px;
  7. }
  8. }
  9. .order_stat {
  10. background: #FFF;
  11. padding: 10px 10px 0;
  12. margin-bottom: 10px;
  13. }
  14. .title {
  15. font-size: 18px;
  16. font-weight: bold;
  17. display: flex;
  18. align-items: center;
  19. height: 40px;
  20. }
  21. .order_stat>.title>.time {
  22. font-size: 13px;
  23. font-weight: 400;
  24. color: #BFBFBF;
  25. margin-left: 20px;
  26. flex: 1;
  27. }
  28. .order_stat .stat_details {
  29. padding: 10px 0;
  30. display: flex;
  31. }
  32. .stat_details .order_module {
  33. flex: 1;
  34. background: #F2F2F2;
  35. margin: 0 5px;
  36. padding: 20px 25px;
  37. }
  38. .order_module {
  39. display: flex;
  40. flex-direction: column;
  41. }
  42. .order_module:last-child {
  43. margin-right: 0;
  44. }
  45. .order_module:first-child {
  46. margin-left: 0;
  47. }
  48. .price {
  49. font-size: 22px;
  50. font-weight: bold;
  51. flex: 1;
  52. word-break: break-all;
  53. }
  54. .oirder_modul_title {
  55. font-size: 12px;
  56. margin: 10px 0;
  57. /* display: flex;
  58. align-items: center; */
  59. }
  60. .oirder_modul_title .text {
  61. margin-right: 10px;
  62. }
  63. .stat_icon {
  64. font-size: 19px;
  65. color: #BFBFBF;
  66. }
  67. .total {
  68. display: flex;
  69. margin-bottom: 10px;
  70. }
  71. .pay_total {
  72. flex: 1;
  73. flex-basis: 764px;
  74. background: #FFF;
  75. padding: 10px 10px 15px;
  76. }
  77. .pay_total:last-child {
  78. margin-left: 12px;
  79. }
  80. .el-date-editor .el-range-separator {
  81. padding: 0;
  82. }
  83. .pay_modules {
  84. margin-top: 20px;
  85. display: flex;
  86. flex-wrap: wrap;
  87. }
  88. .module {
  89. /* width: 350px; */
  90. width: 46%;
  91. background: #F7F7F7;
  92. padding: 20px 25px;
  93. margin-bottom: 15px;
  94. display: flex;
  95. }
  96. .module_two {
  97. width: 33%;
  98. background: #F7F7F7;
  99. padding: 20px 25px;
  100. margin-bottom: 15px;
  101. display: flex;
  102. }
  103. .module:nth-child(2n) {
  104. margin-left: 30px
  105. }
  106. .no_open {
  107. flex: 1;
  108. color: #2E8FF4;
  109. display: flex;
  110. align-items: center;
  111. justify-content: flex-end;
  112. }
  113. .pay_button {
  114. display: flex;
  115. border: 1px solid #2E8FF4;
  116. border-radius: 4px;
  117. color: #464646;
  118. }
  119. .pay_button div {
  120. background: #FFF;
  121. padding: 10px;
  122. font-size: 14px;
  123. font-weight: 500;
  124. width: 80px;
  125. height: 36px;
  126. border-radius: 4px;
  127. text-align: center;
  128. }
  129. .assets {
  130. color: #848484;
  131. }
  132. .data_chart {
  133. background: #FFF;
  134. padding: 10px 10px 15px;
  135. width: 100%;
  136. position: relative;
  137. /* display: flex; */
  138. }
  139. .data_chart_time {
  140. position: absolute;
  141. top: 10px;
  142. right: 50px;
  143. display: flex;
  144. font-size: 16px;
  145. }
  146. .sel_time {
  147. margin-right: 20px;
  148. padding-bottom: 5px;
  149. }
  150. .sel_time:hover {
  151. cursor: pointer
  152. }
  153. .sel_color {
  154. border-bottom: 2px solid #5ED9A9;
  155. }
  156. .top_title {
  157. display: flex;
  158. padding: 18px 0;
  159. background-color: white;
  160. margin: 10px 0;
  161. align-items: center;
  162. }
  163. .top_title div:nth-of-type(1) {
  164. padding: 0 30px 0 20px;
  165. font-weight: bold;
  166. font-size: 16px;
  167. }
  168. .div_text_center {
  169. text-align: center;
  170. }
  171. .table-body {
  172. padding: 20px;
  173. background-color: #fff;
  174. }
  175. .input-item {
  176. display: inline-block;
  177. width: 250px;
  178. margin: 0 0 20px 20px;
  179. }
  180. .input-item .el-input__inner {
  181. border-right: 0;
  182. height: 32px;
  183. line-height: 32px;
  184. font-size: 12px;
  185. }
  186. .input-item .el-input__inner:hover {
  187. border: 1px solid #dcdfe6;
  188. border-right: 0;
  189. outline: 0;
  190. }
  191. .input-item .el-input__inner:focus {
  192. border: 1px solid #dcdfe6;
  193. border-right: 0;
  194. outline: 0;
  195. }
  196. .input-item .el-input-group__append {
  197. background-color: #fff;
  198. border-left: 0;
  199. width: 10%;
  200. padding: 0;
  201. }
  202. .input-item .el-input-group__append .el-button {
  203. padding: 0;
  204. }
  205. .input-item .el-input-group__append .el-button {
  206. margin: 0;
  207. }
  208. .table-info-img {
  209. max-width: 50px !important;
  210. }
  211. </style>
  212. <div id="stat_pay" v-cloak>
  213. <div class="top_title">
  214. <div>嗨贝销毁明细</div>
  215. </div>
  216. <div class="order_stat">
  217. <div class="stat_details">
  218. <div class="order_module" v-for="(item,index) in dataOverview" :key="item.type">
  219. <div class="price div_text_center">
  220. {{item.value}}
  221. </div>
  222. <div class="oirder_modul_title">
  223. <div class="div_text_center">{{item.name}}</div>
  224. </div>
  225. </div>
  226. </div>
  227. </div>
  228. <div class="table-body">
  229. <el-table :data="form" stripe style="width: 100%" v-loading="listLoading">
  230. <el-table-column prop="id" label="ID" min-width="100" align="center"></el-table-column>
  231. <el-table-column prop="change_num" label="销毁数量">
  232. </el-table-column>
  233. <el-table-column prop="desc" label="描述">
  234. </el-table-column>
  235. <el-table-column label="创建时间" align="center">
  236. <template slot-scope="scope">
  237. {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
  238. </template>
  239. </el-table-column>
  240. </el-table>
  241. <!--工具条 批量操作和分页-->
  242. <el-col :span="24" class="toolbar">
  243. <div style="height:20px;"></div>
  244. <el-pagination background layout="prev, pager, next" @current-change="pageChange" :page-count="pageCount" style="float:right;margin:15px">
  245. </el-col>
  246. </div>
  247. </div>
  248. <script>
  249. new Vue({
  250. el: '#stat_pay',
  251. data() {
  252. return {
  253. options: [{
  254. label: '增加',
  255. name: 'add'
  256. },
  257. {
  258. label: '减少',
  259. name: 'sub'
  260. },
  261. ],
  262. from_type_config:[],
  263. dialogBalance: false,
  264. btnLoading: false,
  265. listLoading: false,
  266. //user_id: null, // 外部链接传递进来的 user_id
  267. pageCount: 0,
  268. form: [],
  269. update_order_time: '',
  270. order_time: [],
  271. buttonType: 1,
  272. user_total: null,
  273. order_total: null,
  274. dataOverview: {
  275. "total": {
  276. type: 'total',
  277. name: '销毁总量',
  278. value: '0.00',
  279. }
  280. },
  281. // 会员资产
  282. memberAssets: {},
  283. chartTimeType: 0,
  284. currencyInfo: [],
  285. chartTimeArr: [],
  286. paid_amount_arr: [],
  287. settle_income_arr: [],
  288. }
  289. },
  290. mounted: function() {
  291. //this.getData();
  292. this.getList();
  293. },
  294. methods: {
  295. pageChange(currentPage) {
  296. this.page = currentPage;
  297. this.getList();
  298. },
  299. search() {
  300. this.page = 1;
  301. this.getList();
  302. },
  303. getList() {
  304. //let user_id = this.user_id ? this.user_id : this.searchData.user_id;
  305. let params = {
  306. r: 'hi-go/hi-bei/destory',
  307. page: this.page,
  308. //date: this.date,
  309. // user_id: user_id,
  310. // keyword: this.searchData.keyword,
  311. // type: this.searchData.change_type,
  312. // from_type:this.searchData.from_type,
  313. };
  314. // if (this.searchData.date) {
  315. // Object.assign(params, {
  316. // start_time: this.searchData.date[0],
  317. // end_time: this.searchData.date[1],
  318. // });
  319. // }
  320. request({
  321. params,
  322. }).then(e => {
  323. if (e.data.code === 0) {
  324. this.form = e.data.data.list;
  325. this.pagination = e.data.data.pagination;
  326. this.pageSize = e.data.data.page_size;
  327. this.pageCount = e.data.data.page_count
  328. this.from_type_config = e.data.data.from_type_config;
  329. // //订单概况
  330. for (let field in this.dataOverview) {
  331. if (e.data.data.orderStatistics[field]) {
  332. this.dataOverview[field]['value'] = e.data.data.orderStatistics[field];
  333. } else {
  334. this.dataOverview[field]['value'] = '0.00';
  335. }
  336. }
  337. console.log(this.pageCount);
  338. } else {
  339. this.$message.error(e.data.msg);
  340. }
  341. this.listLoading = false;
  342. }).catch(e => {
  343. this.listLoading = false;
  344. });
  345. this.listLoading = true;
  346. },
  347. getData() {
  348. let that = this;
  349. that.currencyInfo = [];
  350. //that.memberAssets = [];
  351. let date = {
  352. r: '/mall/finance/stat'
  353. }
  354. if (this.order_time) {
  355. // date.start_date = this.order_time[0];
  356. // date.end_date = this.order_time[1];
  357. date.order_time = this.order_time;
  358. }
  359. request({
  360. params: date,
  361. method: 'get',
  362. }).then(res => {
  363. if (res.data.code == 0) {
  364. that.update_order_time = res.data.data.update_time;
  365. that.order_time = res.data.data.date;
  366. //订单概况
  367. for (let field in this.orderTotalArr) {
  368. if (res.data.data.orderStatistics[field]) {
  369. this.orderTotalArr[field]['value'] = res.data.data.orderStatistics[field];
  370. } else {
  371. this.orderTotalArr[field]['value'] = '0.00';
  372. }
  373. }
  374. //支付统计
  375. that.rechargeArr = res.data.data.payment_data;
  376. }
  377. }).catch(e => {
  378. });
  379. },
  380. upButton(type) {
  381. if (this.butbuttonType == type) {
  382. return;
  383. }
  384. this.buttonType = type;
  385. this.memberAssets = [];
  386. if (type == 2) {
  387. this.memberAssets.push(...this.currencyInfo);
  388. } else {
  389. }
  390. },
  391. updateOrderTime(v) {
  392. this.order_time = v;
  393. this.getData();
  394. },
  395. }
  396. })
  397. </script>