preposition_stock_list.vue 3.4 KB

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