tb-transport-trade-bill-list.html 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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" name="账单日期" v-model="p.billDate" width="100px">
  24. <el-date-picker
  25. v-model="p.billDate"
  26. type="date"
  27. format="yyyy-MM-dd"
  28. value-format="yyyy-MM-dd"
  29. placeholder="选择日期">
  30. </el-date-picker>
  31. </sa-item>
  32. <sa-item type="text" name="对账结果" v-model="p.result" width="100px">
  33. <el-select v-model="p.result">
  34. <el-option label="全部" value=""></el-option>
  35. <el-option label="对账一致" value="0"></el-option>
  36. <el-option label="对账异常" value="1"></el-option>
  37. </el-select>
  38. </sa-item>
  39. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  40. <el-button size="mini" type="info" @click="sa.f5()">重置</el-button>
  41. </el-form>
  42. <!-- ------------- 数据列表 ------------- -->
  43. <el-table class="data-table" ref="data-table" :data="dataList" >
  44. <sa-td name="账单日期" prop="billDate" style="background-color:#dddddd" ></sa-td>
  45. <el-table-column label="货运平台" align="center" >
  46. <sa-td name="收款笔数" prop="receiveCountPlatform" ></sa-td>
  47. <sa-td name="收款金额(元)" prop="receiveAmountPlatform" ></sa-td>
  48. <sa-td name="转账笔数" prop="transferCountPlatform" ></sa-td>
  49. <sa-td name="转账金额(元)" prop="transferAmountPlatform" ></sa-td>
  50. <sa-td name="退款笔数" prop="refundCountPlatform" ></sa-td>
  51. <sa-td name="退款金额(元)" prop="refundAmountPlatform" ></sa-td>
  52. </el-table-column>
  53. <el-table-column label="微信平台" align="center" style="background-color:#dddddd">
  54. <sa-td name="收款笔数" prop="receiveCountWechat" ></sa-td>
  55. <sa-td name="收款金额(元)" prop="receiveAmountWechat" ></sa-td>
  56. <sa-td name="转账笔数" prop="transferCountWechat" ></sa-td>
  57. <sa-td name="转账金额(元)" prop="transferAmountWechat" ></sa-td>
  58. <sa-td name="退款笔数" prop="refundCountWechat" ></sa-td>
  59. <sa-td name="退款金额(元)" prop="refundAmountWechat" ></sa-td>
  60. </el-table-column>
  61. <sa-td name="对账结果" prop="result" type="enum" :jv="{0: '一致', 1: '不一致'}" ></sa-td>
  62. <el-table-column label="操作" fixed="right" width="80px">
  63. <template slot-scope="s">
  64. <el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看</el-button>
  65. </template>
  66. </el-table-column>
  67. </el-table>
  68. <!-- ------------- 分页 ------------- -->
  69. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()"></sa-item>
  70. </div>
  71. </div>
  72. <script>
  73. var app = new Vue({
  74. components: {
  75. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  76. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  77. },
  78. el: '.vue-box',
  79. data: {
  80. p: { // 查询参数
  81. billId: '', // 账单ID
  82. billDate: '', // 账单日期
  83. result : '',
  84. receiveCountPlatform: '', // 平台收款笔数
  85. receiveAmountPlatform: '', // 平台收款金额
  86. transferCountPlatform: '', // 平台转账笔数
  87. transferAmountPlatform: '', // 平台转账金额
  88. refundCountPlatform: '', // 平台退款笔数
  89. refundAmountPlatform: '', // 平台退款金额
  90. receiveCountWechat: '', // 微信收款笔数
  91. receiveAmountWechat: '', // 微信收款金额
  92. transferCountWechat: '', // 微信转账笔数
  93. transferAmountWechat: '', // 微信转账金额
  94. refundCountWechat: '', // 微信退款笔数
  95. refundAmountWechat: '', // 微信退款金额
  96. pageNo: 1, // 当前页
  97. pageSize: 10, // 页大小
  98. sortType: 0 // 排序方式
  99. },
  100. dataCount: 0,
  101. dataList: [], // 数据集合
  102. },
  103. methods: {
  104. // 刷新
  105. f5: function() {
  106. sa.ajax('/transport-server/TbTransportTradeBill/getList', sa.removeNull(this.p), function(res) {
  107. this.dataList = res.data; // 数据
  108. this.dataCount = res.dataCount; // 数据总数
  109. sa.f5TableHeight(); // 刷新表格高度
  110. }.bind(this));
  111. },
  112. // 查看
  113. get: function(data) {
  114. sa.showIframe('交易对账详情', 'tb-transport-trade-bill-info.html?id=' + data.billId, '900px', '600px');
  115. },
  116. // 查看 - 根据选中的
  117. getBySelect: function(data) {
  118. var selection = this.$refs['data-table'].selection;
  119. if(selection.length == 0) {
  120. return sa.msg('请选择一条数据')
  121. }
  122. this.get(selection[0]);
  123. },
  124. // 修改
  125. update: function(data) {
  126. sa.showIframe('修改数据', 'tb-transport-trade-bill-add.html?id=' + data.id, '1000px', '90%');
  127. },
  128. // 新增
  129. add: function(data) {
  130. sa.showIframe('新增数据', 'tb-transport-trade-bill-add.html?id=-1', '1000px', '90%');
  131. },
  132. // 删除
  133. del: function(data) {
  134. sa.confirm('是否删除,此操作不可撤销', function() {
  135. sa.ajax('/TbTransportTradeBill/delete?id=' + data.billId, function(res) {
  136. sa.arrayDelete(this.dataList, data);
  137. sa.ok('删除成功');
  138. sa.f5TableHeight(); // 刷新表格高度
  139. }.bind(this))
  140. }.bind(this));
  141. },
  142. // 批量删除
  143. deleteByIds: function() {
  144. // 获取选中元素的id列表
  145. let selection = this.$refs['data-table'].selection;
  146. let ids = sa.getArrayField(selection, 'id');
  147. if(selection.length == 0) {
  148. return sa.msg('请至少选择一条数据')
  149. }
  150. // 提交删除
  151. sa.confirm('是否批量删除选中数据?此操作不可撤销', function() {
  152. sa.ajax('/TbTransportTradeBill/deleteByIds', {ids: ids.join(',')}, function(res) {
  153. sa.arrayDelete(this.dataList, selection);
  154. sa.ok('删除成功');
  155. sa.f5TableHeight(); // 刷新表格高度
  156. }.bind(this))
  157. }.bind(this));
  158. },
  159. },
  160. created: function() {
  161. this.f5();
  162. sa.onInputEnter();
  163. }
  164. })
  165. </script>
  166. </body>
  167. </html>