preposition_stock_list.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <div>
  3. <template-page
  4. style="width: 100%;
  5. height: 100%;"
  6. ref="pageRef"
  7. :getList="getList"
  8. :exportList="exportList"
  9. :columnParsing="columnParsing"
  10. >
  11. </template-page>
  12. </div>
  13. </template>
  14. <script>
  15. import TemplatePage from '@/components/template/template-page-1.vue'
  16. import import_mixin from '@/components/template/import_mixin.js'
  17. import { getcustomerFrontList, partsNewInExport } from '@/api/stock'
  18. export default {
  19. components: { TemplatePage },
  20. mixins: [import_mixin],
  21. data() {
  22. return {
  23. // 事件组合
  24. optionsEvensGroup: [
  25. [
  26. [
  27. {
  28. name: '批量删除',
  29. click: this.dels,
  30. isRole: this.$checkBtnRole('del', this.$route.meta.roles)
  31. }
  32. ]
  33. ]
  34. ],
  35. // 表格属性
  36. tableAttributes: {
  37. // 启用勾选列
  38. selectColumn: true
  39. },
  40. // 表格事件
  41. tableEvents: {
  42. 'selection-change': this.selectionChange
  43. },
  44. recordSelected: []
  45. }
  46. },
  47. methods: {
  48. // 列表请求函数
  49. getList(...p) {
  50. this.recordSelected = []
  51. return getcustomerFrontList(...p)
  52. },
  53. // 列表导出函数
  54. exportList: partsNewInExport,
  55. // 表格列解析渲染数据更改
  56. columnParsing(item, defaultData) {
  57. return defaultData
  58. },
  59. // 监听勾选变化
  60. selectionChange(data) {
  61. this.recordSelected = data
  62. }
  63. // 批量删除
  64. // dels() {
  65. // if (this.recordSelected.length) {
  66. // this.$confirm('此操作将删除数据, 是否继续?', '提示', {
  67. // confirmButtonText: '确定',
  68. // cancelButtonText: '取消',
  69. // type: 'warning'
  70. // })
  71. // .then(() => {
  72. // partsOldOutDel({
  73. // ids: this.recordSelected.map(item => item.id).join(',')
  74. // })
  75. // .then(res => {
  76. // this.$refs.pageRef.refreshList()
  77. // this.$message({
  78. // type: 'success',
  79. // message: '删除成功!'
  80. // })
  81. // })
  82. // .catch(() => {
  83. // this.$message({
  84. // type: 'error',
  85. // message: '删除失败'
  86. // })
  87. // })
  88. // })
  89. // .catch(() => {
  90. // this.$message({
  91. // type: 'info',
  92. // message: '已取消删除'
  93. // })
  94. // })
  95. // } else {
  96. // this.$message({
  97. // type: 'info',
  98. // message: '请先勾选需要删除的数据!'
  99. // })
  100. // }
  101. // }
  102. }
  103. }
  104. </script>
  105. <style lang="scss" scoped>
  106. ::v-deep .el-table__body-wrapper {
  107. height: 100% !important;
  108. }
  109. </style>