processRoute.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <ele-pro-table
  3. ref="table"
  4. :columns="columns"
  5. height="400px"
  6. :datasource="datasource"
  7. cache-key="produceOrderZ"
  8. highlight-current-row
  9. @row-click="rowClick"
  10. :need-page="false"
  11. >
  12. <template v-slot:toolbar>
  13. </template>
  14. </ele-pro-table>
  15. </template>
  16. <script>
  17. import { getList } from '@/api/warehousing/index.js';
  18. export default {
  19. components: {},
  20. data() {
  21. return {
  22. loading: false
  23. };
  24. },
  25. computed: {
  26. // 表格列配置
  27. columns() {
  28. return [
  29. {
  30. columnKey: 'index',
  31. label: '序号',
  32. type: 'index',
  33. width: 55,
  34. align: 'center',
  35. showOverflowTooltip: true,
  36. fixed: 'left'
  37. },
  38. {
  39. prop: 'workOrderCode',
  40. label: '工单编码',
  41. align: 'center',
  42. minWidth: 110
  43. },
  44. {
  45. prop: 'warehouseName',
  46. label: '仓库名称 ',
  47. align: 'center'
  48. },
  49. {
  50. prop: 'categoryLevelName',
  51. label: '物品分类名称',
  52. align: 'center'
  53. },
  54. {
  55. prop: 'categoryName',
  56. label: '物品名称',
  57. align: 'center'
  58. },
  59. {
  60. slot: 'totalCount',
  61. label: '总数量',
  62. align: 'center'
  63. },
  64. {
  65. slot: 'totalPackage',
  66. label: '总包装',
  67. align: 'center'
  68. },
  69. {
  70. slot: 'totalWeight',
  71. label: '总重量',
  72. align: 'center'
  73. },
  74. {
  75. prop: 'approvalUserName',
  76. label: '审核人',
  77. align: 'center'
  78. },
  79. {
  80. prop: 'createTime',
  81. label: '创建时间',
  82. align: 'center',
  83. showOverflowTooltip: true,
  84. minWidth: 110
  85. },
  86. {
  87. slot: 'approvalStatus',
  88. label: '状态',
  89. align: 'center'
  90. }
  91. ];
  92. }
  93. },
  94. created() {},
  95. methods: {
  96. /* 表格数据源 */
  97. datasource({ page, limit, where }) {
  98. return getList({
  99. pageNum: page,
  100. size: limit,
  101. ...where
  102. });
  103. },
  104. /* 刷新表格 */
  105. reload(where) {
  106. this.$nextTick(() => {
  107. this.$refs.table.reload({ page: 1, where });
  108. });
  109. },
  110. rowClick() {}
  111. }
  112. };
  113. </script>
  114. <style lang="scss" scoped>
  115. .table {
  116. height: calc((100vh - 70px - 50px - 80px - 20px) / 2);
  117. }
  118. </style>