erpInfo.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <template>
  2. <div>
  3. <tableDetail :layout="tablecols" :data="list" :opwidth="200" :custom="true">
  4. <template v-slot:customcol="scope">
  5. <div >{{scope.column.data[scope.column.columnname]||scope.column.columnname ==='operation'?scope.column.data[scope.column.columnname] : '--'}}</div>
  6. </template>
  7. </tableDetail>
  8. <div class="container normal-panel" style="text-align:right">
  9. <el-pagination
  10. background
  11. @size-change="handleSizeChange"
  12. @current-change="handleCurrentChange"
  13. :current-page="currentPage"
  14. :page-sizes="[20, 50, 100, 200]"
  15. :page-size="100"
  16. layout="total,sizes, prev, pager, next, jumper"
  17. :total="total">
  18. </el-pagination>
  19. </div>
  20. </div>
  21. </template>
  22. <script>
  23. export default {
  24. name: "erpInfo",
  25. data(){
  26. return {
  27. param:{
  28. "id": 2025070309465702,
  29. "content": {
  30. "ownertable": "sa_logistics",
  31. "ownerid": "71147",
  32. "pageNumber": 1,
  33. "pageSize": 20
  34. },
  35. },
  36. tablecols:[],
  37. list:[],
  38. currentPage:0,
  39. total:0
  40. }
  41. },
  42. methods:{
  43. async listData(){
  44. this.param.content.ownerid = this.$route.query.id
  45. const res = await this.$api.requested(this.param)
  46. this.list = res.data
  47. this.total = res.total
  48. this.currentPage = res.pageNumber
  49. },
  50. handleSizeChange(val) {
  51. // console.log(`每页 ${val} 条`);
  52. this.param.content.pageSize = val
  53. this.listData()
  54. },
  55. handleCurrentChange(val) {
  56. // console.log(`当前页: ${val}`);
  57. this.param.content.pageNumber = val
  58. this.listData()
  59. },
  60. },
  61. mounted() {
  62. this.listData()
  63. },
  64. created() {
  65. this.tablecols = this.tool.tabelCol(this.$route.name).erpInfoTable.tablecols
  66. }
  67. }
  68. </script>
  69. <style scoped>
  70. </style>