index.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <template>
  2. <div class="ele-body">
  3. <el-card shadow="never" v-loading="loading">
  4. <search @search="reload" ref="searchRef"></search>
  5. <ele-pro-table
  6. ref="table"
  7. :columns="columns"
  8. max-height="68vh"
  9. :datasource="datasource"
  10. cache-key="pickingDetails"
  11. highlight-current-row
  12. @refresh="refresh"
  13. >
  14. <template v-slot:status="{ row }">
  15. <el-tag
  16. :type="row.status == '0' ? 'danger' : 'success'"
  17. effect="dark"
  18. >{{
  19. row.status == '0'
  20. ? '未领料'
  21. : row.status == '1'
  22. ? '已领料'
  23. : row.status == '2'
  24. ? '已出库'
  25. : ''
  26. }}</el-tag
  27. >
  28. </template>
  29. </ele-pro-table>
  30. </el-card>
  31. </div>
  32. </template>
  33. <script>
  34. import { getPage } from '@/api/pick/pickApply';
  35. import search from './components/search.vue';
  36. export default {
  37. name: 'pickApply',
  38. components: {
  39. search
  40. },
  41. data() {
  42. return {
  43. dataList: [],
  44. loading: false
  45. };
  46. },
  47. computed: {
  48. // 表格列配置
  49. columns() {
  50. return [
  51. {
  52. columnKey: 'index',
  53. label: '序号',
  54. type: 'index',
  55. width: 55,
  56. align: 'center',
  57. showOverflowTooltip: true
  58. },
  59. {
  60. prop: 'code',
  61. label: '领料单编号',
  62. align: 'center'
  63. },
  64. {
  65. prop: '',
  66. label: '关联工单编号',
  67. align: 'center'
  68. },
  69. {
  70. prop: '',
  71. label: '仓库名称',
  72. align: 'center'
  73. },
  74. {
  75. prop: 'executorName',
  76. label: '领料人',
  77. align: 'center'
  78. },
  79. {
  80. prop: 'createTime',
  81. label: '领料时间',
  82. align: 'center'
  83. },
  84. {
  85. prop: 'status',
  86. slot: 'status',
  87. label: '状态',
  88. align: 'center'
  89. },
  90. {
  91. prop: '',
  92. label: '操作',
  93. width: 80,
  94. align: 'center',
  95. resizable: false,
  96. fixed: 'right',
  97. slot: 'action'
  98. }
  99. ];
  100. }
  101. },
  102. methods: {
  103. /* 表格数据源 */
  104. datasource({ page, limit, where }) {
  105. return getPage({
  106. ...where,
  107. pageNum: page,
  108. size: limit
  109. });
  110. }
  111. },
  112. created() {}
  113. };
  114. </script>
  115. <style lang="scss" scoped></style>