collect.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <template>
  2. <template-page ref="pageRef" :getList="getList" :operation="operation()" :exportList="exportList"
  3. :columnParsing="columnParsing" :tableAttributes="tableAttributes" :tableEvents="tableEvents">
  4. </template-page>
  5. </template>
  6. <script>
  7. import TemplatePage from '@/components/template/template-page-1.vue'
  8. import import_mixin from '@/components/template/import_mixin.js'
  9. import operation_mixin from '@/components/template/operation_mixin.js'
  10. import {
  11. increOrderSettleCountWorkerList,
  12. increOrderSettleCountWorkerListExport
  13. } from '@/api/orderSettleManag'
  14. import { EventBus } from '@/utils/eventBus'
  15. export default {
  16. components: {
  17. TemplatePage,
  18. },
  19. mixins: [import_mixin, operation_mixin],
  20. data() {
  21. return {
  22. formBool: false,
  23. // 表格属性
  24. tableAttributes: {
  25. // 启用勾选列
  26. selectColumn: false,
  27. },
  28. // 表格事件
  29. tableEvents: {
  30. 'selection-change': this.selectionChange
  31. },
  32. formData: {},
  33. detailParams: []
  34. }
  35. },
  36. methods: {
  37. // 列表请求函数
  38. getList(p) {
  39. this.detailParams = p.params.filter(item => item.param === "a.pay_time")
  40. return increOrderSettleCountWorkerList(p)
  41. },
  42. // 列表导出函数
  43. exportList: increOrderSettleCountWorkerListExport,
  44. // 表格列解析渲染数据更改
  45. columnParsing(item, defaultData) {
  46. return defaultData
  47. },
  48. // 监听勾选变化
  49. selectionChange(data) {
  50. this.recordSelected = data
  51. },
  52. operation() {
  53. return this.operationBtn({
  54. detail: {
  55. btnType: 'text',
  56. click: ({ row, index, column }) => {
  57. var { workerId } = row
  58. EventBus.$emit("orderMasterSplitAccount", { workerId, detailParams: this.detailParams, tabTypeCk: "offline" })
  59. }
  60. },
  61. })
  62. },
  63. }
  64. }
  65. </script>
  66. <style lang="scss" scoped></style>