index.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <template>
  2. <div>
  3. <normal-layout>
  4. <div slot="content">
  5. <div class="container">
  6. <el-row :gutter="20">
  7. <el-col v-for="(item,index) in acountlist" :key="index" :span="6" class="mt-10" @click.native="handleClick(index)">
  8. <div class="acccounet__panel" :style="activeName == index?{border:'1px solid #d8dde8'}:''">
  9. <p class="normal-margin">{{item.accountname}}</p>
  10. <p class="normal-title" style="font-size:1.825rem" :style="activeName == index?{color:'#3874f6'}:''"><small>¥</small>&nbsp;{{tool.formatAmount(item.balance)}}</p>
  11. <div class="score">
  12. <p style="margin-top:16px">信用额度:{{item.creditquota}}</p>
  13. </div>
  14. </div>
  15. </el-col>
  16. </el-row>
  17. <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true" :fixedName="'operation'" height="calc(100vh - 390px)">
  18. <template v-slot:customcol="scope">
  19. <p>{{scope.column.data[scope.column.columnname]}}</p>
  20. </template>
  21. <template v-slot:opreation="scope">
  22. <editPrice v-if="tool.checkAuth($route.name,'update')" class="inline-16" :data="scope.data"/>
  23. <delete-btn
  24. @deleteCreate="deleteCreate"
  25. v-if="tool.checkAuth($route.name,'delete')"
  26. :id="scope.data.sa_itempriceadjust_itemsid"
  27. @deleteSuccess="$refs.basicLayout.listData()"
  28. nameId="20221025095404"
  29. nameKey="sa_itempriceadjust_itemsids"
  30. />
  31. </template>
  32. </tableLayout>
  33. <div style="margin-top:16px;text-align:right">
  34. <el-pagination
  35. background
  36. small
  37. @size-change="handleSizeChange"
  38. @current-change="handleCurrentChange"
  39. :current-page="param.content.pageNumber"
  40. :page-size="param.content.pageSize"
  41. layout="total, prev, pager, next, jumper"
  42. :total="total">
  43. </el-pagination>
  44. </div>
  45. </div>
  46. </div>
  47. </normal-layout>
  48. </div>
  49. </template>
  50. <script>
  51. export default {
  52. data () {
  53. return {
  54. activeName:0,
  55. acountlist:[],
  56. list:[],
  57. param: {
  58. "id":20230111103403,
  59. "content": {
  60. "pageNumber":1,
  61. "pageSize":20,
  62. "sa_accountclassid":""
  63. }
  64. },
  65. total:0
  66. }
  67. },
  68. async created () {
  69. },
  70. methods:{
  71. async listData () {
  72. const res = await this.$api.requested({
  73. id:"20221008145903",
  74. content:{}
  75. })
  76. this.acountlist = res.data
  77. console.log(this.acountlist);
  78. this.accountMx()
  79. },
  80. async accountMx () {
  81. this.param.content.sa_accountclassid = this.acountlist[this.activeName].sa_accountclassid
  82. const res = await this.$api.requested(this.param)
  83. this.list = res.data.rows
  84. },
  85. handleClick (index) {
  86. this.activeName = index
  87. this.accountMx()
  88. },
  89. handleSizeChange(val) {
  90. // console.log(`每页 ${val} 条`);
  91. this.param.content.pageSize = val
  92. this.accountMx()
  93. },
  94. handleCurrentChange(val) {
  95. // console.log(`当前页: ${val}`);
  96. this.param.content.pageNumber = val
  97. this.accountMx()
  98. },
  99. },
  100. mounted () {
  101. this.listData()
  102. },
  103. created () {
  104. this.tablecols = this.tool.tabelCol(this.$route.name)['accountMoneyDetailTable'].tablecols
  105. },
  106. }
  107. </script>
  108. <style>
  109. </style>
  110. <style scoped>
  111. .acccounet__panel{
  112. padding: 10px;
  113. line-height: 30px;
  114. border:1px solid #f1f2f3;
  115. color:#666;
  116. border-radius: 5px;
  117. cursor: pointer;
  118. }
  119. </style>