processRoute.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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. slot: 'approvalStatus',
  76. label: '状态',
  77. align: 'center'
  78. }
  79. ];
  80. }
  81. },
  82. created() {},
  83. methods: {
  84. /* 表格数据源 */
  85. datasource({ page, limit, where }) {
  86. return getList({
  87. pageNum: page,
  88. size: limit,
  89. ...where
  90. });
  91. },
  92. /* 刷新表格 */
  93. reload(where) {
  94. this.$nextTick(() => {
  95. this.$refs.table.reload({ page: 1, where });
  96. });
  97. },
  98. rowClick() {}
  99. }
  100. };
  101. </script>
  102. <style lang="scss" scoped>
  103. .table {
  104. height: calc((100vh - 70px - 50px - 80px - 20px) / 2);
  105. }
  106. </style>