tb-account-balance-list.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>客户账户-列表</title>
  5. <meta charset="utf-8">
  6. <meta name="viewport"
  7. content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  8. <!-- 所有的 css & js 资源 -->
  9. <link rel="stylesheet" href="https://unpkg.com/element-ui@2.13.0/lib/theme-chalk/index.css">
  10. <link rel="stylesheet" href="../../static/sa.css">
  11. <script src="../../static/kj/vue.min.js"></script>
  12. <script src="../../static/kj/element-ui/index.js"></script>
  13. <script src="../../static/kj/httpVueLoader.js"></script>
  14. <script src="../../static/kj/jquery.min.js"></script>
  15. <script src="../../static/kj/layer/layer.js"></script>
  16. <script src="../../static/sa.js"></script>
  17. <script src="../../static/node_modules/crypto-js/crypto-js.js"></script>
  18. </head>
  19. <body>
  20. <div class="vue-box" style="display: none;" :style="'display: block;'">
  21. <div class="c-panel">
  22. <!-- ------------- 检索参数 ------------- -->
  23. <div class="c-title">检索参数</div>
  24. <el-form ref="form" :model='p' @submit.native.prevent>
  25. <sa-item type="text" name="企业名称" v-model="p.customerName"></sa-item>
  26. <sa-item type="daterange" name="期间">
  27. <el-date-picker v-model="p.createTime" type="daterange" align="right" unlink-panels
  28. value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期"
  29. end-placeholder="结束日期">
  30. </el-date-picker>
  31. </sa-item>
  32. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  33. <el-button type="primary" icon="el-icon-download" @click="exportExcel">导出</el-button>
  34. <el-button type="primary" @click="printFn">打印</el-button>
  35. <sa-item type="fast-btn" show="reset" style="display: inline;"></sa-item>
  36. </el-form>
  37. <el-table class="data-table" ref="data-table" :data="dataList">
  38. <sa-td type="index" name="序号"></sa-td>
  39. <sa-td name="企业名称" prop="customerName" width="260"></sa-td>
  40. <sa-td name="期初余额" prop="beginMoney" not="0">
  41. <template slot-scope="s">
  42. <div>{{s.row.beginMoney.toFixed(2)}}</div>
  43. </template>
  44. </sa-td>
  45. <sa-td name="本期充值" prop="chargeMoney" not="0"></sa-td>
  46. <sa-td name="本期扣除" prop="deuctionMoney" not="0">
  47. <template slot-scope="s"> <div>{{s.row.deuctionMoney.toFixed(2)}}</div> </template>
  48. </sa-td>
  49. <sa-td name="本期余额退款" prop="balanceRefundMoney" not="0"></sa-td>
  50. <sa-td name="本期异常退款" prop="errorRefundMoney" not="0"></sa-td>
  51. <sa-td name="期末余额" prop="endMoney" not="0">
  52. <template slot-scope="s">
  53. <div>{{s.row.endMoney.toFixed(2)}}</div>
  54. </template>
  55. </sa-td>
  56. </el-table>
  57. <!-- ------------- 分页 ------------- -->
  58. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
  59. </sa-item>
  60. </div>
  61. </div>
  62. <script>
  63. </script>
  64. <script>
  65. var app = new Vue({
  66. components: {
  67. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  68. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  69. },
  70. el: '.vue-box',
  71. data: {
  72. p: { // 查询参数
  73. // accountNo: '', // 账户
  74. customerName: '',
  75. createTime: [],
  76. pageNo: 1, // 当前页
  77. pageSize: 10, // 页大小
  78. sortType: 0 // 排序方式
  79. },
  80. dataCount: 0,
  81. dataList: [], // 数据集合
  82. },
  83. methods: {
  84. exportExcel() {
  85. let p = this.p;
  86. let createTime = p.createTime;
  87. if (!createTime || createTime.length == 0) {
  88. sa.error('请选择导出期间')
  89. return;
  90. }
  91. sa.confirm('是否导出符合筛选条件的记录', function() {
  92. sa.ajax('/TbAccount/export', sa.removeNull(this.p),
  93. function(res) {
  94. window.location.href=res.data;
  95. }.bind(this))
  96. }.bind(this));
  97. },
  98. printFn() {
  99. let p = this.p;
  100. let createTime = p.createTime;
  101. if (!createTime || createTime.length == 0) {
  102. sa.error('请选择导出期间')
  103. return;
  104. }
  105. sa.showIframe('打印', 'balance-print.html?customerName='+this.p.customerName+'&bDay='+createTime[0]+'&eDay='+createTime[1], '1080px', '90%');
  106. },
  107. // 刷新
  108. f5: function() {
  109. let p = this.p;
  110. let createTime = p.createTime;
  111. if (!createTime || createTime.length == 0) {
  112. this.dataList = [];
  113. this.dataCount = 0;
  114. return;
  115. } else {
  116. p.beginTime = createTime[0];
  117. p.endTime = createTime[1];
  118. }
  119. sa.ajax('/TbAccount/getBalance', sa.removeNull(this.p), function(res) {
  120. this.dataList = res.data; // 数据
  121. this.dataCount = res.dataCount; // 数据总数
  122. sa.f5TableHeight(); // 刷新表格高度
  123. }.bind(this));
  124. },
  125. },
  126. created: function() {
  127. this.f5();
  128. sa.onInputEnter();
  129. }
  130. })
  131. </script>
  132. </body>
  133. </html>