reserved_stock.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <template>
  2. <template-page
  3. ref="pageRef"
  4. :getList="getList"
  5. :exportList="exportList"
  6. :optionsEvensGroup="optionsEvensGroup"
  7. :columnParsing="columnParsing"
  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 add_callback_mixin from '@/components/template/add_callback_mixin.js'
  15. import Popu from '@/components/template/popu.vue'
  16. import { getStockManagerListV2,exportStockManagerListV2 } from '@/api/stock'
  17. import { getDictList } from '@/api/common'
  18. export default {
  19. components: { TemplatePage, Popu },
  20. mixins: [import_mixin, add_callback_mixin],
  21. data() {
  22. return {
  23. visible: false,
  24. // 事件组合
  25. optionsEvensGroup: [
  26. ],
  27. // 表格属性
  28. tableAttributes: {
  29. // 启用勾选列
  30. selectColumn: true
  31. }, // 关闭新增弹窗
  32. // 表格事件
  33. tableEvents: {
  34. 'selection-change': this.selectionChange
  35. },
  36. recordSelected: [],
  37. currentPage: 1, // 当前页码
  38. pageSize: 10, // 每页数量
  39. listTotal: 0, // 列表总数
  40. dataList: null, // 列表数据
  41. listLoading: false, // 列表加载loading
  42. screenForm: {
  43. // 筛选表单数据
  44. type: '',
  45. goodsName: '',
  46. goodsNum: '',
  47. model: '',
  48. jxsName: '',
  49. jxsNum: ''
  50. },
  51. typeList: [],
  52. }
  53. },
  54. methods: {
  55. // 列表请求函数
  56. getList(...p) {
  57. this.recordSelected = []
  58. return getStockManagerListV2(...p)
  59. },
  60. // 列表导出函数
  61. exportList: exportStockManagerListV2,
  62. // 表格列解析渲染数据更改
  63. columnParsing(item, defaultData) {
  64. return defaultData
  65. },
  66. // 监听勾选变化
  67. selectionChange(data) {
  68. this.recordSelected = data
  69. },
  70. operation() {
  71. return (h, { row, index, column }) => {
  72. return (
  73. <div class="operation-btns">
  74. {/* <el-button
  75. size="mini"
  76. type="text"
  77. onClick={ () => {
  78. this.visible = true
  79. this.detailsId = row.id
  80. }}
  81. >
  82. 查看
  83. </el-button> */}
  84. </div>
  85. )
  86. }
  87. },
  88. handleClose() {
  89. this.addOff(() => {
  90. this.visible = false
  91. })()
  92. },
  93. }
  94. }
  95. </script>
  96. <style lang="scss" scoped></style>