tb-account-balance-list.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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"></sa-td>
  41. <sa-td name="本期充值" prop="chargeMoney" not="0"></sa-td>
  42. <sa-td name="本期扣除" prop="deuctionMoney" not="0"></sa-td>
  43. <sa-td name="本期余额退款" prop="balanceRefundMoney" not="0"></sa-td>
  44. <sa-td name="本期异常退款" prop="errorRefundMoney" not="0"></sa-td>
  45. <sa-td name="期末余额" prop="endMoney" not="0"></sa-td>
  46. </el-table>
  47. <!-- ------------- 分页 ------------- -->
  48. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
  49. </sa-item>
  50. </div>
  51. </div>
  52. <script>
  53. </script>
  54. <script>
  55. var app = new Vue({
  56. components: {
  57. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  58. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  59. },
  60. el: '.vue-box',
  61. data: {
  62. p: { // 查询参数
  63. // accountNo: '', // 账户
  64. customerName: '',
  65. createTime: [],
  66. pageNo: 1, // 当前页
  67. pageSize: 10, // 页大小
  68. sortType: 0 // 排序方式
  69. },
  70. dataCount: 0,
  71. dataList: [], // 数据集合
  72. },
  73. methods: {
  74. exportExcel() {
  75. let p = this.p;
  76. let createTime = p.createTime;
  77. if (!createTime || createTime.length == 0) {
  78. sa.error('请选择导出期间')
  79. return;
  80. }
  81. sa.confirm('是否导出符合筛选条件的记录', function() {
  82. sa.ajax('/TbAccount/export', sa.removeNull(this.p),
  83. function(res) {
  84. window.location.href=res.data;
  85. }.bind(this))
  86. }.bind(this));
  87. },
  88. printFn() {
  89. let p = this.p;
  90. let createTime = p.createTime;
  91. if (!createTime || createTime.length == 0) {
  92. sa.error('请选择导出期间')
  93. return;
  94. }
  95. sa.showIframe('打印', 'balance-print.html?customerName='+this.p.customerName+'&bDay='+createTime[0]+'&eDay='+createTime[1], '1080px', '90%');
  96. },
  97. // 刷新
  98. f5: function() {
  99. let p = this.p;
  100. let createTime = p.createTime;
  101. if (!createTime || createTime.length == 0) {
  102. this.dataList = [];
  103. this.dataCount = 0;
  104. return;
  105. } else {
  106. p.beginTime = createTime[0];
  107. p.endTime = createTime[1];
  108. }
  109. sa.ajax('/TbAccount/getBalance', sa.removeNull(this.p), function(res) {
  110. this.dataList = res.data; // 数据
  111. this.dataCount = res.dataCount; // 数据总数
  112. sa.f5TableHeight(); // 刷新表格高度
  113. }.bind(this));
  114. },
  115. },
  116. created: function() {
  117. this.f5();
  118. sa.onInputEnter();
  119. }
  120. })
  121. </script>
  122. </body>
  123. </html>