account.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <div class="app-container">
  3. <div class="filter-container" style="margin: 10px 0 10px 0">
  4. <span class="textSpan">客户名称:</span>
  5. <el-input v-model="body.customerName" style="width:200px;" placeholder="客户名称" size="small" clearable />
  6. <el-button class="filter-item" icon="el-icon-search" type="primary" plain @click="Search">搜索</el-button>
  7. <el-button class="classitem" style="marginRight:50px" type="primary" plain icon="el-icon-plus" @click="handlerAdd">新增</el-button>
  8. </div>
  9. <el-table v-loading="loading" :data="tableData" border style="width: 100%">
  10. <!-- 字段信息:客户名称、、账号余额、授信额度、可用额度、操作 -->
  11. <el-table-column label="客户名称" width="200" align="center" show-overflow-tooltip>
  12. <template slot-scope="scope">
  13. <span>{{ scope.row.customerName }}</span>
  14. </template>
  15. </el-table-column>
  16. <el-table-column label="账号余额" width="200" align="center" show-overflow-tooltip>
  17. <template slot-scope="scope">
  18. <span>{{ scope.row.createTime }}</span>
  19. </template>
  20. </el-table-column>
  21. <el-table-column label="授信额度" width="200" align="center" show-overflow-tooltip>
  22. <template slot-scope="scope">
  23. <span>{{ scope.row.createTime }}</span>
  24. </template>
  25. </el-table-column>
  26. <el-table-column label="可用额度" width="200" align="center" show-overflow-tooltip>
  27. <template slot-scope="scope">
  28. <span>{{ scope.row.createTime }}</span>
  29. </template>
  30. </el-table-column>
  31. <el-table-column label="操作" width="200" align="center" show-overflow-tooltip>
  32. <template slot-scope="scope">
  33. <span>{{ scope.row.createTime }}</span>
  34. </template>
  35. </el-table-column>
  36. </el-table>
  37. <div class="pagination">
  38. <el-pagination
  39. current-page.sync="body.current"
  40. :current-page="body.current"
  41. :page-sizes="[10, 20, 30, 50]"
  42. :page-size="body.size"
  43. layout="total, sizes, prev, pager, next, jumper"
  44. background
  45. :total="total"
  46. @size-change="handleSizeChange"
  47. @current-change="handleCurrentChange"
  48. />
  49. </div>
  50. </div>
  51. </template>
  52. <script>
  53. import api from '@/api/userList'
  54. export default {
  55. data() {
  56. return {
  57. loading:false,
  58. tableData:[],
  59. body:{
  60. current:1,
  61. size:10
  62. }
  63. }
  64. },
  65. methods: {
  66. // 更具 this.body 重载数据
  67. reLoad(){
  68. this.loading = true
  69. api.account.Search(this.body).then((res) => {
  70. this.loading =false
  71. this.tableData = res.data.data.records
  72. this.total = res.data.data.total
  73. })
  74. },
  75. // s搜索call
  76. Search(){
  77. this.body.current = 1
  78. this.reLoad()
  79. },
  80. // 新增call
  81. handlerAdd(){
  82. },
  83. // 页码
  84. handleSizeChange(val) {
  85. this.body.size = val
  86. this.reLoad()
  87. },
  88. // 换页
  89. handleCurrentChange(val) {
  90. this.body.current = val
  91. this.reLoad()
  92. }
  93. },
  94. }
  95. </script>
  96. <style>
  97. </style>