dispatch.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. <template slot-scope="scope">
  13. <a class="table_row_link" @click="linkDetail(scope.row)">{{scope.row.billno}}</a>
  14. </template>
  15. </el-table-column>
  16. <el-table-column
  17. prop="status"
  18. label="状态"
  19. width="90">
  20. </el-table-column>
  21. <el-table-column
  22. prop="sumqty"
  23. label="发货数量"
  24. width="90">
  25. </el-table-column>
  26. <el-table-column
  27. prop="sumamount"
  28. label="发货金额"
  29. width="90">
  30. </el-table-column>
  31. <el-table-column
  32. prop="billdate"
  33. label="发货日期"
  34. width="160px">
  35. </el-table-column>
  36. <el-table-column
  37. prop="address"
  38. label="备注">
  39. </el-table-column>
  40. </el-table>
  41. <div class="container normal-panel" style="text-align:right">
  42. <el-pagination
  43. background
  44. @size-change="handleSizeChange"
  45. @current-change="handleCurrentChange"
  46. :current-page="currentPage"
  47. :page-sizes="[20, 50, 100, 200]"
  48. layout="total,sizes, prev, pager, next, jumper"
  49. :total="total">
  50. </el-pagination>
  51. </div>
  52. </div>
  53. </template>
  54. <script>
  55. export default {
  56. data () {
  57. return {
  58. tableData:[],
  59. param:{
  60. "id": 20221205111302,
  61. "content": {
  62. "sa_orderid": '',
  63. "pageNumber": 1,
  64. "pageSize": 17,
  65. "where": {
  66. "condition": ""
  67. }
  68. },
  69. },
  70. total:0,
  71. currentPage:0,
  72. }
  73. },
  74. methods:{
  75. async listData() {
  76. this.param.content.sa_orderid = this.$route.query.id
  77. const res = await this.$api.requested(this.param)
  78. this.tableData = res.data
  79. this.total = res.total
  80. this.currentPage = res.pageNumber
  81. },
  82. handleSizeChange(val) {
  83. this.param.pageSize = val
  84. this.listData()
  85. },
  86. handleCurrentChange(val) {
  87. this.param.pageNumber = val
  88. this.listData()
  89. },
  90. linkDetail (item) {
  91. let route = this.$route
  92. if (route.path !== '/taskDetails') {
  93. this.oldRoute = {path:route.path,query:route.query}
  94. this.$store.dispatch('setHistoryRouter',this.oldRoute)
  95. }
  96. this.$router.replace({path:'/dispatchdetail',query:{id:item.sa_dispatchid,rowindex:item.rowindex}})
  97. }
  98. },
  99. mounted () {
  100. this.listData()
  101. }
  102. }
  103. </script>
  104. <style>
  105. </style>