stock_three_level.vue 2.6 KB

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