tb-order-bank-list.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>银行回执信息表-列表</title>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <!-- 所有的 css & js 资源 -->
  8. <link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
  9. <link rel="stylesheet" href="../../static/sa.css">
  10. <script src="../../static/kj/vue.min.js"></script>
  11. <script src="../../static/kj/element-ui/index.js"></script>
  12. <script src="../../static/kj/httpVueLoader.js"></script>
  13. <script src="../../static/kj/jquery.min.js"></script>
  14. <script src="../../static/kj/layer/layer.js"></script>
  15. <script src="../../static/sa.js"></script>
  16. </head>
  17. <body>
  18. <div class="vue-box" style="display: none;" :style="'display: block;'">
  19. <div class="c-panel">
  20. <el-table class="data-table" ref="data-table" :data="dataList" >
  21. <sa-td name="互市代码" prop="organization" ></sa-td>
  22. <sa-td name="银行标识" prop="bankCode" ></sa-td>
  23. <sa-td name="业务类型" prop="operation" ></sa-td>
  24. <sa-td name="回执代码" prop="code" ></sa-td>
  25. <sa-td name="订单号" prop="source" width="189px"></sa-td>
  26. <sa-td name="流水单号" prop="result" ></sa-td>
  27. <sa-td name="回执内容" prop="note" width="300px"></sa-td>
  28. <!-- <sa-td name="报文发送时间" prop="date" width="150px"></sa-td> -->
  29. <sa-td name="创建时间" prop="createTime" width="150px"></sa-td>
  30. </el-table>
  31. <!-- ------------- 分页 ------------- -->
  32. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()"></sa-item>
  33. </div>
  34. </div>
  35. <script>
  36. var app = new Vue({
  37. components: {
  38. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  39. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  40. },
  41. el: '.vue-box',
  42. data: {
  43. tradeNo: sa.p('tradeNo', 0), // 获取数据ID
  44. p: { // 查询参数
  45. source: '', // 订单号
  46. },
  47. dataCount: 0,
  48. dataList: [], // 数据集合
  49. },
  50. methods: {
  51. // 刷新
  52. f5: function() {
  53. this.p.source = this.tradeNo
  54. sa.ajax('/payment-server/BankInfo/getList', sa.removeNull(this.p), function(res) {
  55. this.dataList = res.data; // 数据
  56. this.dataCount = res.dataCount; // 数据总数
  57. sa.f5TableHeight(); // 刷新表格高度
  58. }.bind(this));
  59. },
  60. // 查看
  61. get: function(data) {
  62. sa.showIframe('数据详情', 'bank-info-info.html?id=' + data.id, '1050px', '90%');
  63. },
  64. // 查看 - 根据选中的
  65. getBySelect: function(data) {
  66. var selection = this.$refs['data-table'].selection;
  67. if(selection.length == 0) {
  68. return sa.msg('请选择一条数据')
  69. }
  70. this.get(selection[0]);
  71. },
  72. // 修改
  73. update: function(data) {
  74. sa.showIframe('修改数据', 'bank-info-add.html?id=' + data.id, '1000px', '90%');
  75. },
  76. // 新增
  77. add: function(data) {
  78. sa.showIframe('新增数据', 'bank-info-add.html?id=-1', '1000px', '90%');
  79. },
  80. // 删除
  81. del: function(data) {
  82. sa.confirm('是否删除,此操作不可撤销', function() {
  83. sa.ajax('/BankInfo/delete?id=' + data.id, function(res) {
  84. sa.arrayDelete(this.dataList, data);
  85. sa.ok('删除成功');
  86. sa.f5TableHeight(); // 刷新表格高度
  87. }.bind(this))
  88. }.bind(this));
  89. },
  90. // 批量删除
  91. deleteByIds: function() {
  92. // 获取选中元素的id列表
  93. let selection = this.$refs['data-table'].selection;
  94. let ids = sa.getArrayField(selection, 'id');
  95. if(selection.length == 0) {
  96. return sa.msg('请至少选择一条数据')
  97. }
  98. // 提交删除
  99. sa.confirm('是否批量删除选中数据?此操作不可撤销', function() {
  100. sa.ajax('/BankInfo/deleteByIds', {ids: ids.join(',')}, function(res) {
  101. sa.arrayDelete(this.dataList, selection);
  102. sa.ok('删除成功');
  103. sa.f5TableHeight(); // 刷新表格高度
  104. }.bind(this))
  105. }.bind(this));
  106. },
  107. },
  108. created: function() {
  109. this.f5();
  110. sa.onInputEnter();
  111. }
  112. })
  113. </script>
  114. </body>
  115. </html>