tb-transport-fundflow-bill-list.html 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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.status" width="120px">
  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" ></sa-td>
  45. <el-table-column label="货运平台" align="center" >
  46. <sa-td name="收入笔数" prop="inCountPlatform" ></sa-td>
  47. <sa-td name="收入金额(元)" prop="inAmountPlatform" ></sa-td>
  48. <sa-td name="支出笔数" prop="outCountPlatform" ></sa-td>
  49. <sa-td name="支出金额(元)" prop="outAmountPlatform" ></sa-td>
  50. </el-table-column>
  51. <el-table-column label="微信平台" align="center" >
  52. <sa-td name="收入笔数" prop="inCountWechat" ></sa-td>
  53. <sa-td name="收入金额(元)" prop="inAmountWechat" ></sa-td>
  54. <sa-td name="支出笔数" prop="outCountWechat" ></sa-td>
  55. <sa-td name="支出金额(元)" prop="outAmountWechat" ></sa-td>
  56. </el-table-column>
  57. <sa-td name="对账结果" prop="result" type="enum" :jv="{0: '一致', 1: '不一致'}" ></sa-td>
  58. <el-table-column label="操作" fixed="right" width="80px">
  59. <template slot-scope="s">
  60. <el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看</el-button>
  61. </template>
  62. </el-table-column>
  63. </el-table>
  64. <!-- ------------- 分页 ------------- -->
  65. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()"></sa-item>
  66. </div>
  67. </div>
  68. <script>
  69. var app = new Vue({
  70. components: {
  71. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  72. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  73. },
  74. el: '.vue-box',
  75. data: {
  76. p: { // 查询参数
  77. billId: '', // 账单ID
  78. billDate: '', // 账单日期
  79. result : '',
  80. inCountPlatform: '', // 平台收入笔数
  81. inAmountPlatform: '', // 平台收入金额
  82. outCountPlatform: '', // 平台支出笔数
  83. outAmountPlatform: '', // 平台支出金额
  84. inCountWechat: '', // 微信收入笔数
  85. inAmountWechat: '', // 微信收入金额
  86. outCountWechat: '', // 微信支出笔数
  87. outAmountWechat: '', // 微信支出金额
  88. pageNo: 1, // 当前页
  89. pageSize: 10, // 页大小
  90. sortType: 0 // 排序方式
  91. },
  92. dataCount: 0,
  93. dataList: [], // 数据集合
  94. },
  95. methods: {
  96. // 刷新
  97. f5: function() {
  98. sa.ajax('/transport-server/TbTransportFundflowBill/getList', sa.removeNull(this.p), function(res) {
  99. this.dataList = res.data; // 数据
  100. this.dataCount = res.dataCount; // 数据总数
  101. sa.f5TableHeight(); // 刷新表格高度
  102. }.bind(this));
  103. },
  104. // 查看
  105. get: function(data) {
  106. sa.showIframe('资金对账详情', 'tb-transport-fundflow-bill-info.html?id=' + data.billId, '800px', '500px');
  107. },
  108. // 查看 - 根据选中的
  109. getBySelect: function(data) {
  110. var selection = this.$refs['data-table'].selection;
  111. if(selection.length == 0) {
  112. return sa.msg('请选择一条数据')
  113. }
  114. this.get(selection[0]);
  115. },
  116. // 修改
  117. update: function(data) {
  118. sa.showIframe('修改数据', 'tb-transport-fundflow-bill-add.html?id=' + data.id, '1000px', '90%');
  119. },
  120. // 新增
  121. add: function(data) {
  122. sa.showIframe('新增数据', 'tb-transport-fundflow-bill-add.html?id=-1', '1000px', '90%');
  123. },
  124. // 删除
  125. del: function(data) {
  126. sa.confirm('是否删除,此操作不可撤销', function() {
  127. sa.ajax('/TbTransportFundflowBill/delete?id=' + data.billId, function(res) {
  128. sa.arrayDelete(this.dataList, data);
  129. sa.ok('删除成功');
  130. sa.f5TableHeight(); // 刷新表格高度
  131. }.bind(this))
  132. }.bind(this));
  133. },
  134. // 批量删除
  135. deleteByIds: function() {
  136. // 获取选中元素的id列表
  137. let selection = this.$refs['data-table'].selection;
  138. let ids = sa.getArrayField(selection, 'id');
  139. if(selection.length == 0) {
  140. return sa.msg('请至少选择一条数据')
  141. }
  142. // 提交删除
  143. sa.confirm('是否批量删除选中数据?此操作不可撤销', function() {
  144. sa.ajax('/TbTransportFundflowBill/deleteByIds', {ids: ids.join(',')}, function(res) {
  145. sa.arrayDelete(this.dataList, selection);
  146. sa.ok('删除成功');
  147. sa.f5TableHeight(); // 刷新表格高度
  148. }.bind(this))
  149. }.bind(this));
  150. },
  151. },
  152. created: function() {
  153. this.f5();
  154. sa.onInputEnter();
  155. }
  156. })
  157. </script>
  158. </body>
  159. </html>