logistics.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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="createdate"
  23. label="单据日期">
  24. </el-table-column>
  25. <el-table-column
  26. prop="address"
  27. label="备注">
  28. </el-table-column>
  29. </el-table>
  30. <div class="container normal-panel" style="text-align:right">
  31. <el-pagination
  32. background
  33. @size-change="handleSizeChange"
  34. @current-change="handleCurrentChange"
  35. :current-page="currentPage"
  36. :page-sizes="[20, 50, 100, 200]"
  37. layout="total,sizes, prev, pager, next, jumper"
  38. :total="total">
  39. </el-pagination>
  40. </div>
  41. </div>
  42. </template>
  43. <script>
  44. export default {
  45. data () {
  46. return {
  47. tableData:[],
  48. param:{
  49. "id": 20221205111402,
  50. "content": {
  51. "sa_orderid": '',
  52. "pageNumber": 1,
  53. "pageSize": 17,
  54. "where": {
  55. "condition": ""
  56. }
  57. },
  58. },
  59. total:0,
  60. currentPage:0,
  61. }
  62. },
  63. methods:{
  64. async listData() {
  65. this.param.content.sa_orderid = this.$route.query.id
  66. const res = await this.$api.requested(this.param)
  67. this.tableData = res.data
  68. this.total = res.total
  69. this.currentPage = res.pageNumber
  70. },
  71. handleSizeChange(val) {
  72. this.param.pageSize = val
  73. this.listData()
  74. },
  75. handleCurrentChange(val) {
  76. this.param.pageNumber = val
  77. this.listData()
  78. },
  79. linkDetail (item) {
  80. let route = this.$route
  81. if (route.path !== '/taskDetails') {
  82. this.oldRoute = {path:route.path,query:route.query}
  83. this.$store.dispatch('setHistoryRouter',this.oldRoute)
  84. }
  85. this.$router.replace({path:'/logisticsdetail',query:{id:item.sa_logisticsid,rowindex:item.rowindex}})
  86. }
  87. },
  88. mounted () {
  89. this.listData()
  90. }
  91. }
  92. </script>
  93. <style>
  94. </style>