policy.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <template-page
  3. ref="pageRef"
  4. :get-list="getList"
  5. :export-list="exportList"
  6. :options-evens-group="optionsEvensGroup"
  7. :column-parsing="columnParsing"
  8. >
  9. <!-- <popu v-if="visible">
  10. <el-page-header slot="head" content="订单信息" @back="handleClose" />
  11. <sales-return-order-detail v-if="visible" :refund-order-id="refundOrderId" type="policy" />
  12. </popu> -->
  13. </template-page>
  14. </template>
  15. <script>
  16. import TemplatePage from '@/components/template/template-page-1.vue'
  17. import import_mixin from '@/components/template/import_mixin.js'
  18. import add_callback_mixin from '@/components/template/add_callback_mixin.js'
  19. import Popu from '@/components/template/popu.vue'
  20. import SalesReturnOrderDetail from './orderDetail.vue'
  21. import { getListRetailExecV2, exportListRetailExecV2 } from '@/api/executionRecord'
  22. export default {
  23. components: { TemplatePage, Popu, SalesReturnOrderDetail },
  24. mixins: [import_mixin, add_callback_mixin],
  25. data() {
  26. return {
  27. visible: false,
  28. // 事件组合
  29. optionsEvensGroup: [
  30. // [
  31. // [
  32. // {
  33. // name: '新增',
  34. // click: this.addOn(() => {
  35. // this.visible = true
  36. // })
  37. // // isRole: this.$checkBtnRole('add', this.$route.meta.roles)
  38. // }
  39. // ]
  40. // ]
  41. ],
  42. // 表格属性
  43. tableAttributes: {
  44. // 启用勾选列
  45. selectColumn: true
  46. }, // 关闭新增弹窗
  47. // 表格事件
  48. tableEvents: {
  49. 'selection-change': this.selectionChange
  50. },
  51. recordSelected: [],
  52. detailsId: '',
  53. refundOrderId: null
  54. }
  55. },
  56. methods: {
  57. // 列表请求函数
  58. getList(...p) {
  59. this.recordSelected = []
  60. return getListRetailExecV2(...p)
  61. },
  62. // 列表导出函数
  63. exportList: exportListRetailExecV2,
  64. // 表格列解析渲染数据更改
  65. columnParsing(item, defaultData) {
  66. return defaultData
  67. },
  68. // 监听勾选变化
  69. selectionChange(data) {
  70. this.recordSelected = data
  71. },
  72. operation() {
  73. return (h, { row, index, column }) => {
  74. return (
  75. <div class='operation-btns'>
  76. <el-button
  77. size='mini'
  78. type='text'
  79. onClick={() => {
  80. this.visible = true
  81. this.refundOrderId = row.refundOrderId
  82. }}
  83. >
  84. 查看
  85. </el-button>
  86. </div>
  87. )
  88. }
  89. },
  90. handleClose() {
  91. this.refundOrderId = null
  92. this.addOff(() => {
  93. this.visible = false
  94. })()
  95. }
  96. }
  97. }
  98. </script>
  99. <style lang="scss" scoped></style>