changeHistory.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <template>
  2. <div>
  3. <el-table
  4. :data="tableData"
  5. style="width: 100%"
  6. size="small"
  7. border>
  8. <el-table-column
  9. prop="billno"
  10. label="变更人"
  11. width="180">
  12. </el-table-column>
  13. <el-table-column
  14. prop="status"
  15. label="变更时间"
  16. width="90">
  17. </el-table-column>
  18. <el-table-column
  19. prop="billdate"
  20. label="产品编码">
  21. </el-table-column>
  22. <el-table-column
  23. prop="address"
  24. label="产品名称">
  25. </el-table-column>
  26. <el-table-column
  27. prop="address"
  28. label="型号">
  29. </el-table-column>
  30. <el-table-column
  31. prop="address"
  32. label="原数量">
  33. </el-table-column>
  34. <el-table-column
  35. prop="address"
  36. label="变更后数量">
  37. </el-table-column>
  38. <el-table-column
  39. prop="address"
  40. label="变更备注">
  41. </el-table-column>
  42. </el-table>
  43. <div class="container normal-panel" style="text-align:right">
  44. <el-pagination
  45. background
  46. @size-change="handleSizeChange"
  47. @current-change="handleCurrentChange"
  48. :current-page="currentPage"
  49. :page-sizes="[20, 50, 100, 200]"
  50. layout="total,sizes, prev, pager, next, jumper"
  51. :total="total">
  52. </el-pagination>
  53. </div>
  54. </div>
  55. </template>
  56. <script>
  57. export default {
  58. data () {
  59. return {
  60. tableData:[],
  61. param:{
  62. "id": 20230225142004,
  63. "content": {
  64. "sa_orderid": '',
  65. "pageNumber": 1,
  66. "pageSize": 17,
  67. "where": {
  68. "condition": ""
  69. }
  70. },
  71. },
  72. total:0,
  73. currentPage:0,
  74. }
  75. },
  76. methods:{
  77. async listData() {
  78. this.param.content.sa_orderid = this.$route.query.id
  79. const res = await this.$api.requested(this.param)
  80. this.tableData = res.data
  81. this.total = res.total
  82. this.currentPage = res.pageNumber
  83. },
  84. handleSizeChange(val) {
  85. this.param.pageSize = val
  86. this.listData()
  87. },
  88. handleCurrentChange(val) {
  89. this.param.pageNumber = val
  90. this.listData()
  91. },
  92. linkDetail (item) {
  93. let route = this.$route
  94. if (route.path !== '/taskDetails') {
  95. this.oldRoute = {path:route.path,query:route.query}
  96. this.$store.dispatch('setHistoryRouter',this.oldRoute)
  97. }
  98. this.$router.replace({path:'/dispatchdetail',query:{id:item.sa_dispatchid,rowindex:item.rowindex}})
  99. }
  100. },
  101. mounted () {
  102. this.listData()
  103. }
  104. }
  105. </script>
  106. <style>
  107. </style>