detailDialog.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <template>
  2. <div>
  3. <headerTitle title="Bom审批"></headerTitle>
  4. <BOMSearch @search="reload" :statusOpt="statusOpt" />
  5. <ele-pro-table
  6. ref="table"
  7. :columns="columns"
  8. :datasource="datasource"
  9. class="dict-table"
  10. tool-class="ele-toolbar-actions"
  11. >
  12. </ele-pro-table>
  13. </div>
  14. </template>
  15. <script>
  16. import BOMSearch from './BOM-search.vue';
  17. import { getBomPageCategoryId } from '@/api/bpm/components/bomApprover';
  18. export default {
  19. components: {
  20. BOMSearch
  21. },
  22. props: {
  23. businessId: {
  24. default: ''
  25. }
  26. },
  27. mixins: [],
  28. data() {
  29. return {
  30. visible: false,
  31. title: '',
  32. columns: [
  33. {
  34. label: '序号',
  35. columnKey: 'index',
  36. type: 'index',
  37. width: 55,
  38. align: 'center',
  39. showOverflowTooltip: true
  40. },
  41. {
  42. prop: 'code',
  43. label: 'BOM编码',
  44. showOverflowTooltip: true
  45. },
  46. {
  47. prop: 'name',
  48. label: 'BOM名称',
  49. showOverflowTooltip: true
  50. },
  51. {
  52. prop: 'categoryCode',
  53. label: '产品编码',
  54. showOverflowTooltip: true
  55. },
  56. {
  57. prop: 'categoryName',
  58. label: '产品名称',
  59. showOverflowTooltip: true
  60. },
  61. {
  62. prop: 'dosage',
  63. label: '用量',
  64. showOverflowTooltip: true
  65. },
  66. {
  67. prop: 'measuringUnit',
  68. label: '计量单位',
  69. showOverflowTooltip: true
  70. },
  71. {
  72. prop: 'versions',
  73. label: '版本'
  74. },
  75. {
  76. prop: 'status ',
  77. label: '状态',
  78. formatter: (row) => {
  79. return this.statusOpt[+row.status];
  80. }
  81. },
  82. {
  83. prop: 'createName',
  84. label: '创建人',
  85. showOverflowTooltip: true
  86. },
  87. {
  88. prop: 'createTime',
  89. label: '创建日期',
  90. showOverflowTooltip: true
  91. }
  92. ],
  93. statusOpt: {
  94. '': '全部',
  95. 0: '已停用',
  96. 1: '已发布'
  97. }
  98. };
  99. },
  100. created() {},
  101. methods: {
  102. /* 表格数据源 */
  103. datasource({ where, page, limit }) {
  104. return getBomPageCategoryId({
  105. ...where,
  106. pageNum: page,
  107. size: limit,
  108. id: this.businessId,
  109. });
  110. },
  111. /* 刷新表格 */
  112. reload(where) {
  113. this.$refs.table.reload({ where });
  114. }
  115. }
  116. };
  117. </script>
  118. <style lang="scss" scoped>
  119. :deep(.el-table__expanded-cell) {
  120. padding-bottom: 30px !important;
  121. border-bottom: 12px solid #ccffcc !important;
  122. }
  123. </style>