fullCargo.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <template-page
  3. ref="pageRef"
  4. :get-list="getList"
  5. :options-evens-group="optionsEvensGroup"
  6. :column-parsing="columnParsing"
  7. />
  8. </template>
  9. <script>
  10. import TemplatePage from '@/components/template/template-page-1.vue'
  11. import import_mixin from '@/components/template/import_mixin.js'
  12. import add_callback_mixin from '@/components/template/add_callback_mixin.js'
  13. import { getStockCostListFullDate, getStockCostListFullDateV2Export } from '@/api/basic_data/fullCargo'
  14. export default {
  15. components: { TemplatePage },
  16. mixins: [import_mixin, add_callback_mixin],
  17. data() {
  18. return {
  19. visible: false,
  20. // 事件组合
  21. optionsEvensGroup: [
  22. [
  23. [
  24. {
  25. name: '月账单更新',
  26. click: () => {
  27. this.$refs.pageRef.refreshList()
  28. }
  29. }
  30. ]
  31. ]
  32. ],
  33. // 表格属性
  34. tableAttributes: {
  35. // 启用勾选列
  36. selectColumn: true
  37. }, // 关闭新增弹窗
  38. // 表格事件
  39. tableEvents: {
  40. 'selection-change': this.selectionChange
  41. },
  42. recordSelected: [],
  43. detailsId: ''
  44. }
  45. },
  46. methods: {
  47. // 列表请求函数
  48. getList(...p) {
  49. this.recordSelected = []
  50. return getStockCostListFullDate(...p)
  51. },
  52. // 列表导出函数
  53. exportList: getStockCostListFullDateV2Export,
  54. // 表格列解析渲染数据更改
  55. columnParsing(_item, defaultData) {
  56. return defaultData
  57. },
  58. // 监听勾选变化
  59. selectionChange(data) {
  60. this.recordSelected = data
  61. },
  62. operation() {
  63. return (_h, { row, index, column }) => {
  64. return (
  65. <div class='operation-btns'>
  66. </div>
  67. )
  68. }
  69. },
  70. handleClose() {
  71. this.addOff(() => {
  72. this.visible = false
  73. })()
  74. }
  75. }
  76. }
  77. </script>
  78. <style lang="scss" scoped></style>