tb-refund-record-list.html 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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="../../static/kj/element-ui/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. <style>
  18. .sum-div {
  19. text-align: right;
  20. padding: 10px 150px 10px;
  21. font-weight: bold;
  22. }
  23. .sum-title {
  24. color: darkred;
  25. font-weight: bold;
  26. }
  27. </style>
  28. </head>
  29. <body>
  30. <div class="vue-box" :style="'display: block;'">
  31. <div class="c-panel">
  32. <!-- ------------- 检索参数 ------------- -->
  33. <div class="c-title">检索参数</div>
  34. <el-form ref="form" :model='p' @submit.native.prevent>
  35. <sa-item type="text" name="企业名称" v-model="p.customerName"></sa-item>
  36. <sa-item type="date" name="退款时间" v-model="p.refundTime"></sa-item>
  37. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  38. <el-button type="info" icon="el-icon-refresh" @click="p.customerName = '';p.refundTime=''; f5()">重置</el-button>
  39. <el-button v-if="sa.isAuth('tb-refund-record-export')" type="primary" icon="el-icon-download" @click="exportFn">导出</el-button>
  40. </el-form>
  41. <!-- ------------- 数据列表 ------------- -->
  42. <div class="sum-div">总共 <span
  43. class="sum-title">{{dataCount}}</span>条;退款金额:<span class="sum-title">¥{{totalMoney.toFixed(2)}}</span>元</div>
  44. <el-table class="data-table" ref="data-table" :data="dataList">
  45. <sa-td type="index" name="序号" width="80"></sa-td>
  46. <sa-td name="企业名称" prop="customerName" width="230"></sa-td>
  47. <sa-td name="退款金额" prop="refundMoney"></sa-td>
  48. <sa-td name="业务单号" prop="refundNo" width="140"></sa-td>
  49. <sa-td name="业务类型" prop="itemTypeName"></sa-td>
  50. <sa-td name="车型" prop="itemName"></sa-td>
  51. <sa-td name="车牌号" prop="carNo"></sa-td>
  52. <sa-td name="退款时间" prop="refundTime"></sa-td>
  53. <sa-td name="退款操作人" prop="refundBy"></sa-td>
  54. <sa-td name="退款原因" prop="refundDesc"></sa-td>
  55. </el-table>
  56. <!-- ------------- 分页 ------------- -->
  57. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
  58. </sa-item>
  59. </div>
  60. </div>
  61. <script>
  62. var app = new Vue({
  63. components: {
  64. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  65. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  66. },
  67. el: '.vue-box',
  68. data: {
  69. p: { // 查询参数
  70. id: '', //
  71. customerId: '', // 客户ID
  72. customerName: '', // 企业名称
  73. refundTime: '', // 退款时间
  74. refundType: 3, // 退款类型
  75. pageNo: 1, // 当前页
  76. pageSize: 10, // 页大小
  77. sortType: 0 // 排序方式
  78. },
  79. dataCount: 0,
  80. dataList: [], // 数据集合
  81. },
  82. computed: {
  83. totalMoney() {
  84. let list=this.dataList;
  85. let totalMoney=0;
  86. for(let i in list){
  87. totalMoney+=list[i].refundMoney;
  88. }
  89. return totalMoney;
  90. }
  91. },
  92. methods: {
  93. exportFn () {
  94. sa.confirm('是否导出符合筛选条件的扣费记录', function() {
  95. sa.ajax('/TbRefundRecord/export', sa.removeNull(this.p),
  96. function(res) {
  97. window.location.href=res.data;
  98. }.bind(this))
  99. }.bind(this));
  100. },
  101. // 刷新
  102. f5: function() {
  103. sa.ajax('/TbRefundRecord/getList', sa.removeNull(this.p), function(res) {
  104. this.dataList = res.data; // 数据
  105. this.dataCount = res.dataCount; // 数据总数
  106. sa.f5TableHeight(); // 刷新表格高度
  107. }.bind(this));
  108. },
  109. // 查看
  110. get: function(data) {
  111. sa.showIframe('数据详情', 'tb-refund-record-info.html?id=' + data.id, '1050px', '90%');
  112. },
  113. // 查看 - 根据选中的
  114. getBySelect: function(data) {
  115. var selection = this.$refs['data-table'].selection;
  116. if (selection.length == 0) {
  117. return sa.msg('请选择一条数据')
  118. }
  119. this.get(selection[0]);
  120. },
  121. // 修改
  122. update: function(data) {
  123. sa.showIframe('修改数据', 'tb-refund-record-add.html?id=' + data.id, '1000px', '90%');
  124. },
  125. // 新增
  126. add: function(data) {
  127. sa.showIframe('新增数据', 'tb-refund-record-add.html?id=-1', '1000px', '90%');
  128. },
  129. // 删除
  130. del: function(data) {
  131. sa.confirm('是否删除,此操作不可撤销', function() {
  132. sa.ajax('/TbRefundRecord/delete?id=' + data.id, function(res) {
  133. sa.arrayDelete(this.dataList, data);
  134. sa.ok('删除成功');
  135. sa.f5TableHeight(); // 刷新表格高度
  136. }.bind(this))
  137. }.bind(this));
  138. },
  139. // 批量删除
  140. deleteByIds: function() {
  141. // 获取选中元素的id列表
  142. let selection = this.$refs['data-table'].selection;
  143. let ids = sa.getArrayField(selection, 'id');
  144. if (selection.length == 0) {
  145. return sa.msg('请至少选择一条数据')
  146. }
  147. // 提交删除
  148. sa.confirm('是否批量删除选中数据?此操作不可撤销', function() {
  149. sa.ajax('/TbRefundRecord/deleteByIds', {
  150. ids: ids.join(',')
  151. }, function(res) {
  152. sa.arrayDelete(this.dataList, selection);
  153. sa.ok('删除成功');
  154. sa.f5TableHeight(); // 刷新表格高度
  155. }.bind(this))
  156. }.bind(this));
  157. },
  158. },
  159. created: function() {
  160. this.f5();
  161. sa.onInputEnter();
  162. }
  163. })
  164. </script>
  165. </body>
  166. </html>