tb-pay-record-list.html 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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. </head>
  18. <body>
  19. <div class="vue-box" style="display: none;" :style="'display: block;'">
  20. <div class="c-panel">
  21. <!-- ------------- 检索参数 ------------- -->
  22. <div class="c-title">检索参数</div>
  23. <el-form ref="form" :model='p' @submit.native.prevent>
  24. <sa-item type="text" name="主键" v-model="p.id"></sa-item>
  25. <sa-item type="text" name="客户id" v-model="p.customerId"></sa-item>
  26. <sa-item type="text" name="客户名称" v-model="p.customerName"></sa-item>
  27. <sa-item type="text" name="业务订单号" v-model="p.outTradeNo"></sa-item>
  28. <sa-item type="text" name="支付金额" v-model="p.payMoney"></sa-item>
  29. <sa-item type="text" name="支付时间" v-model="p.payTime"></sa-item>
  30. <sa-item type="text" name="微信订单号" v-model="p.transactionId"></sa-item>
  31. <sa-item type="text" name="支付结束时间" v-model="p.timeEnd"></sa-item>
  32. <sa-item type="text" name="创建时间" v-model="p.createTime"></sa-item>
  33. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  34. <br/>
  35. <sa-item name="综合排序">
  36. <el-radio-group v-model="p.sortType" class="s-radio-text">
  37. <el-radio :label="0">默认</el-radio>
  38. <el-radio :label="1">主键</el-radio>
  39. <el-radio :label="2">客户id</el-radio>
  40. <el-radio :label="3">客户名称</el-radio>
  41. <el-radio :label="4">业务订单号</el-radio>
  42. <el-radio :label="5">支付金额</el-radio>
  43. <el-radio :label="6">支付时间</el-radio>
  44. <el-radio :label="7">微信订单号</el-radio>
  45. <el-radio :label="8">支付结束时间</el-radio>
  46. <el-radio :label="9">创建时间</el-radio>
  47. </el-radio-group>
  48. </sa-item>
  49. </el-form>
  50. <!-- ------------- 快捷按钮 ------------- -->
  51. <sa-item type="fast-btn" show="add,get,delete,export,reset"></sa-item>
  52. <!-- ------------- 数据列表 ------------- -->
  53. <el-table class="data-table" ref="data-table" :data="dataList">
  54. <sa-td type="selection"></sa-td>
  55. <sa-td name="主键" prop="id"></sa-td>
  56. <sa-td name="客户id" prop="customerId"></sa-td>
  57. <sa-td name="客户名称" prop="customerName"></sa-td>
  58. <sa-td name="业务订单号" prop="outTradeNo"></sa-td>
  59. <sa-td name="支付金额" prop="payMoney"></sa-td>
  60. <sa-td name="支付时间" prop="payTime"></sa-td>
  61. <sa-td name="微信订单号" prop="transactionId"></sa-td>
  62. <sa-td name="支付结束时间" prop="timeEnd"></sa-td>
  63. <sa-td name="创建时间" prop="createTime"></sa-td>
  64. <el-table-column label="操作" fixed="right" width="240px">
  65. <template slot-scope="s">
  66. <el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看</el-button>
  67. <el-button class="c-btn" type="primary" icon="el-icon-edit" @click="update(s.row)">修改</el-button>
  68. <el-button class="c-btn" type="danger" icon="el-icon-delete" @click="del(s.row)">删除</el-button>
  69. </template>
  70. </el-table-column>
  71. </el-table>
  72. <!-- ------------- 分页 ------------- -->
  73. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()"></sa-item>
  74. </div>
  75. </div>
  76. <script>
  77. var app = new Vue({
  78. components: {
  79. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  80. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  81. },
  82. el: '.vue-box',
  83. data: {
  84. p: { // 查询参数
  85. id: '', // 主键
  86. customerId: '', // 客户id
  87. customerName: '', // 客户名称
  88. outTradeNo: '', // 业务订单号
  89. payMoney: '', // 支付金额
  90. payTime: '', // 支付时间
  91. transactionId: '', // 微信订单号
  92. timeEnd: '', // 支付结束时间
  93. createTime: '', // 创建时间
  94. pageNo: 1, // 当前页
  95. pageSize: 10, // 页大小
  96. sortType: 0 // 排序方式
  97. },
  98. dataCount: 0,
  99. dataList: [], // 数据集合
  100. },
  101. methods: {
  102. // 刷新
  103. f5: function () {
  104. sa.ajax('/TbPayRecord/getList', sa.removeNull(this.p), function (res) {
  105. this.dataList = res.data; // 数据
  106. this.dataCount = res.dataCount; // 数据总数
  107. sa.f5TableHeight(); // 刷新表格高度
  108. }.bind(this));
  109. },
  110. // 查看
  111. get: function (data) {
  112. sa.showIframe('数据详情', 'tb-pay-record-info.html?id=' + data.id, '1050px', '90%');
  113. },
  114. // 查看 - 根据选中的
  115. getBySelect: function (data) {
  116. var selection = this.$refs['data-table'].selection;
  117. if (selection.length == 0) {
  118. return sa.msg('请选择一条数据')
  119. }
  120. this.get(selection[0]);
  121. },
  122. // 修改
  123. update: function (data) {
  124. sa.showIframe('修改数据', 'tb-pay-record-add.html?id=' + data.id, '1000px', '90%');
  125. },
  126. // 新增
  127. add: function (data) {
  128. sa.showIframe('新增数据', 'tb-pay-record-add.html?id=-1', '1000px', '90%');
  129. },
  130. // 删除
  131. del: function (data) {
  132. sa.confirm('是否删除,此操作不可撤销', function () {
  133. sa.ajax('/TbPayRecord/delete?id=' + data.id, function (res) {
  134. sa.arrayDelete(this.dataList, data);
  135. sa.ok('删除成功');
  136. sa.f5TableHeight(); // 刷新表格高度
  137. }.bind(this))
  138. }.bind(this));
  139. },
  140. // 批量删除
  141. deleteByIds: function () {
  142. // 获取选中元素的id列表
  143. let selection = this.$refs['data-table'].selection;
  144. let ids = sa.getArrayField(selection, 'id');
  145. if (selection.length == 0) {
  146. return sa.msg('请至少选择一条数据')
  147. }
  148. // 提交删除
  149. sa.confirm('是否批量删除选中数据?此操作不可撤销', function () {
  150. sa.ajax('/TbPayRecord/deleteByIds', {ids: ids.join(',')}, function (res) {
  151. sa.arrayDelete(this.dataList, selection);
  152. sa.ok('删除成功');
  153. sa.f5TableHeight(); // 刷新表格高度
  154. }.bind(this))
  155. }.bind(this));
  156. },
  157. },
  158. created: function () {
  159. this.f5();
  160. sa.onInputEnter();
  161. }
  162. })
  163. </script>
  164. </body>
  165. </html>