balance.blade.php 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. @extends('layouts.base')
  2. @section('title', '中台余额明细')
  3. @section('content')
  4. <link rel="stylesheet" href="{{resource_get('plugins/store-cashier/src/common/static/index.css')}}">
  5. <link rel="stylesheet" href="{{resource_get('plugins/yz-supply/assent/css/album1.css?time='.time())}}">
  6. <style>
  7. .edit-i{display:none;}
  8. .el-table_1_column_2:hover .edit-i{font-weight:900;padding:0;margin:0;display:inline-block;}
  9. .el-tabs__item,.is-top{font-size:16px}
  10. .el-tabs__active-bar { height: 3px;}
  11. .iframe {
  12. position: absolute;
  13. width: 100%;
  14. height: 100%;
  15. background: #fff;
  16. overflow-y: hidden;
  17. }
  18. </style>
  19. <div class="all">
  20. <div id="qrcode" ref="qrcode" style="display:none;"></div>
  21. <div id="app" v-cloak>
  22. <div class="vue-head">
  23. <div class="vue-main-title" style="margin-bottom:20px">
  24. <div class="vue-main-title-left"></div>
  25. <div class="vue-main-title-content">中台余额明细</div>
  26. {{-- <div class="vue-main-title-button">--}}
  27. {{-- <el-button type="primary" plain icon="el-icon-plus" size="small" @click="addModal">添加专题</el-button>--}}
  28. {{-- </div>--}}
  29. </div>
  30. <div class="vue-search">
  31. <el-form :inline="true" :model="search_form" class="demo-form-inline">
  32. <el-form-item label="">
  33. <el-select v-model="search_form.middleground_configuration_id" placeholder="请选择供应链" clearable filterable >
  34. <el-option v-for="(item,index) in middleground_configuration" :key="item.id" :label="item.title" :value="item.id"></el-option>
  35. </el-select>
  36. </el-form-item>
  37. <el-form-item label="">
  38. <el-button type="primary" @click="search(1)">搜索</el-button>
  39. </el-form-item>
  40. </el-form>
  41. </div>
  42. </div>
  43. <div class="vue-main">
  44. <div class="vue-main-form">
  45. <div class="vue-main-title" style="margin-bottom:20px">
  46. <div class="vue-main-title-left"></div>
  47. <div class="vue-main-title-content" style="flex:0 0 130px">中台余额明细列表</div>
  48. <div class="" style="text-align:left;font-size:14px;color:#999">
  49. <span>中台余额明细数量:[[total]]</span>&nbsp;&nbsp;&nbsp;
  50. </div>
  51. <div class="vue-main-title-button">
  52. </div>
  53. </div>
  54. <el-table :data="list" style="width: 100%;margin-bottom: 130px;" :class="table_loading==true?'loading-height':''" v-loading="table_loading">
  55. <el-table-column prop="id" label="ID" width="70" align="center"></el-table-column>
  56. <el-table-column prop="pay_sn" label="支付号" align="center"></el-table-column>
  57. <el-table-column prop="username" label="手机号" align="center"></el-table-column>
  58. <el-table-column prop="nickname" label="昵称" align="center"></el-table-column>
  59. <el-table-column prop="balance" label="采购余额" align="center"></el-table-column>
  60. <el-table-column label="业务类型" align="center">
  61. <template slot-scope="scope">
  62. [[scope.row.business_type_name]]
  63. <p v-if="scope.row.order_id">订单id:[[scope.row.order_id]]</p>
  64. </template>
  65. </el-table-column>
  66. <el-table-column prop="amount" label="收入/支出" align="center"></el-table-column>
  67. <el-table-column prop="remarks" label="备注" align="center"></el-table-column>
  68. <el-table-column prop="created_at" label="时间" width="200" align="center">
  69. <template slot-scope="scope">
  70. [[scope.row.created_at]]
  71. </template>
  72. </el-table-column>
  73. </el-table>
  74. </div>
  75. </div>
  76. <!-- 分页 -->
  77. <div class="vue-page" v-if="total>0">
  78. <el-row>
  79. <el-col align="right">
  80. <el-pagination layout="prev, pager, next,jumper" @current-change="search" :total="total"
  81. :page-size="per_size" :current-page="current_page" background
  82. ></el-pagination>
  83. </el-col>
  84. </el-row>
  85. </div>
  86. </div>
  87. </div>
  88. <script src="{{resource_get('static/js/qrcode.min.js')}}"></script>
  89. <script>
  90. var app = new Vue({
  91. el:"#app",
  92. delimiters: ['[[', ']]'],
  93. data() {
  94. return{
  95. balance:0,//汇聚余额
  96. userGoinBalance:0,//站内余额
  97. middleground_configuration:[],//中台供应链
  98. category:[],
  99. times:[],
  100. list:[],//商品列表
  101. table_loading:false,
  102. all_loading:false,
  103. loading:false,
  104. search_form:{
  105. middleground_configuration_id:"",
  106. },
  107. //分页
  108. total:0,
  109. per_size:0,
  110. current_page:0,
  111. }
  112. },
  113. created() {
  114. console.log('category');
  115. console.log(this.category)
  116. this.getMiddlegroundConfiguration();
  117. },
  118. methods: {
  119. skipUrl(item){
  120. window.location.href = item.url
  121. },
  122. getMiddlegroundConfiguration(){
  123. this.$http.post('{!! yzWebFullUrl('plugin.yz-supply.admin.middleground-configuration.get-middleground-configurations') !!}').then(function (response) {
  124. if (response.data.result) {
  125. this.middleground_configuration = response.data.data;
  126. this.search_form.middleground_configuration_id = response.data.data[0].id
  127. this.getDataList();
  128. } else {
  129. this.$message({message: response.data.msg, type: 'error'});
  130. }
  131. }, function (response) {
  132. this.$message({message: response.data.msg, type: 'error'});
  133. })
  134. },
  135. getDataList(page){
  136. var that = this;
  137. that.table_loading = true;
  138. that.$http.post("{!! yzWebFullUrl('plugin.yz-supply.admin.bulk-order.balance-data') !!}",{page:page,search:that.search_form}).then(response => {
  139. console.log(response.data.data);
  140. if(response.data.result==1){
  141. that.list = response.data.data.data.list;
  142. that.total = response.data.data.data.total;
  143. that.current_page = response.data.data.data.page;
  144. that.per_size = response.data.data.data.pageSize;
  145. that.balance = response.data.data.balance;
  146. that.userGoinBalance = response.data.data.userGoinBalance;
  147. }
  148. else{
  149. that.list = [];
  150. that.total = 0;
  151. that.current_page = 1;
  152. that.per_size = 15;
  153. that.balance = 0;
  154. that.userGoinBalance = 0;
  155. that.$message.error(response.data.msg);
  156. }
  157. that.table_loading = false;
  158. }),function(res){
  159. console.log(res);
  160. that.table_loading = false;
  161. };
  162. },
  163. // 搜索、分页
  164. search(page) {
  165. this.getDataList(page);
  166. },
  167. // 上一页
  168. prev() {
  169. let page = parseInt(this.current_page) - 1;
  170. if (page < 1) {
  171. return false;
  172. }
  173. this.getDataList(page);
  174. },
  175. //下一页
  176. next() {
  177. let page = parseInt(this.current_page) + 1;
  178. if (this.per_size < this.page_number) {
  179. return false;
  180. }
  181. this.getDataList(page);
  182. },
  183. //跳页
  184. jumpPage() {
  185. if (this.current_page <= 1) {
  186. this.current_page = 1;
  187. }
  188. // if(this.current_page>100){
  189. // this.current_page = 100
  190. // }
  191. this.getDataList(this.current_page);
  192. },
  193. },
  194. })
  195. </script>
  196. @endsection