tb-wechat-transfer-list.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. <!-- ------------- 检索参数 ------------- -->
  21. <div class="c-title">检索参数</div>
  22. <el-form ref="form" :model='p' @submit.native.prevent>
  23. <sa-item type="text" width="100px"name="转账单号" v-model="p.transferId"></sa-item>
  24. <sa-item type="text" width="100px" name="业务订单号" v-model="p.outTradeNo"></sa-item>
  25. <sa-item type="text" width="100px" name="微信openid" v-model="p.openId"></sa-item>
  26. <sa-item type="text" width="100px" name="用户姓名" v-model="p.userName"></sa-item>
  27. <sa-item type="text" width="100px"name="微信业务单号" v-model="p.transferBillNo"></sa-item>
  28. <sa-item type="text" width="100px" name="状态" v-model="p.state"></sa-item>
  29. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  30. <el-button size="mini" type="info" @click="sa.f5()">重置</el-button>
  31. </el-form>
  32. <!-- ------------- 数据列表 ------------- -->
  33. <el-table class="data-table" ref="data-table" :data="dataList" >
  34. <sa-td type="selection"></sa-td>
  35. <sa-td name="转账单号" prop="transferId" ></sa-td>
  36. <sa-td name="业务订单号" prop="outTradeNo" ></sa-td>
  37. <sa-td name="微信openid" prop="openId" ></sa-td>
  38. <sa-td name="用户姓名" prop="userName" ></sa-td>
  39. <sa-td name="转账金额(分)" prop="transferAmount" ></sa-td>
  40. <sa-td name="微信业务单号" prop="transferBillNo" ></sa-td>
  41. <sa-td name="状态" prop="state" ></sa-td>
  42. <sa-td name="转账状态" prop="isTransfer" ></sa-td>
  43. <sa-td name="创建时间" prop="createTime" ></sa-td>
  44. <el-table-column label="操作" fixed="right" width="180px">
  45. <template slot-scope="s">
  46. <el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看</el-button>
  47. <el-button class="c-btn" type="primary" icon="el-icon-edit" @click="syn(s.row)">同步</el-button>
  48. </template>
  49. </el-table-column>
  50. </el-table>
  51. <!-- ------------- 分页 ------------- -->
  52. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()"></sa-item>
  53. </div>
  54. </div>
  55. <script>
  56. var app = new Vue({
  57. components: {
  58. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  59. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  60. },
  61. el: '.vue-box',
  62. data: {
  63. p: { // 查询参数
  64. transferId: '', // 转账单号
  65. outTradeNo: '', // 业务订单号
  66. openId: '', // 用户微信openid
  67. userName: '', // 用户姓名
  68. transferAmount: '', // 转账金额(分)
  69. transferBillNo: '', // 微信业务单号
  70. state: '', // 状态
  71. isTransfer: '', // 转账状态
  72. pageNo: 1, // 当前页
  73. pageSize: 10, // 页大小
  74. sortType: 0 // 排序方式
  75. },
  76. dataCount: 0,
  77. dataList: [], // 数据集合
  78. },
  79. methods: {
  80. // 刷新
  81. f5: function() {
  82. sa.ajax('/transport-server/TbWechatTransfer/getList', sa.removeNull(this.p), function(res) {
  83. this.dataList = res.data; // 数据
  84. this.dataCount = res.dataCount; // 数据总数
  85. sa.f5TableHeight(); // 刷新表格高度
  86. }.bind(this));
  87. },
  88. // 查看
  89. get: function(data) {
  90. sa.showIframe('数据详情', 'tb-wechat-transfer-info.html?transferId=' + data.transferId, '1050px', '90%');
  91. },
  92. // 查看 - 根据选中的
  93. getBySelect: function(data) {
  94. var selection = this.$refs['data-table'].selection;
  95. if(selection.length == 0) {
  96. return sa.msg('请选择一条数据')
  97. }
  98. this.get(selection[0]);
  99. },
  100. syn: function(data) {
  101. sa.ajax('/transport-server/TbWechatTransfer/syn?tradeNo=' + data.outTradeNo, function(res) {
  102. sa.arrayDelete(this.dataList, data);
  103. sa.ok('同步刷新成功');
  104. sa.f5TableHeight(); // 刷新表格高度
  105. }.bind(this))
  106. },
  107. },
  108. created: function() {
  109. this.f5();
  110. sa.onInputEnter();
  111. }
  112. })
  113. </script>
  114. </body>
  115. </html>