mayf
2024-08-26 4f92f67026dbb26b208e59105bebe206b71e43c8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<template>
  <el-bus-crud ref="crud" v-bind="tableConfig">
    <template #table="{ list }">
      <template v-if="list && list.length > 0">
        <after-sale-table :list="list" @detail="onDetail" />
      </template>
      <el-bus-empty v-else />
    </template>
  </el-bus-crud>
</template>
 
<script>
import AfterSaleTable from '@/components/order/after-sale-table'
export default {
  components: {
    AfterSaleTable,
  },
  data() {
    return {
      tableConfig: {
        url: 'flower/api/partner/sales/list',
        hasNew: false,
        hasEdit: false,
        hasDelete: false,
        onResetView: (row) => {
          this.$router.push(`${this.$route.path}/view/${row.id}`)
        },
        operationAttrs: {
          width: 80,
          fixed: 'right',
        },
        columns: [
          { label: '订单号', prop: 'orderNo', minWidth: 150, fixed: 'left' },
          { label: '售后单号', prop: 'salesNo', minWidth: 150 },
          { label: '收货人', prop: 'customer', minWidth: 120 },
          { label: '收货人电话', prop: 'customerTel', minWidth: 120 },
          {
            label: '收货地址',
            formatter: (row) =>
              `${row.customerProvince || ''}${row.customerCity || ''}${
                row.customerRegion || ''
              }${row.customerAddress || ''}`,
            minWidth: 250,
          },
          { label: '订单金额', prop: 'totalOrderAmount', minWidth: 150 },
          { label: '售后理由', prop: 'reason', minWidth: 200 },
          { label: '售后状态', prop: 'statusStr', minWidth: 120 },
          { label: '审核状态', prop: 'auditStatusStr', minWidth: 120 },
          { label: '申请时间', prop: 'createTime', minWidth: 180 },
          { label: '处理时间', prop: 'auditTime', minWidth: 180 },
        ],
        searchFormAttrs: {
          labelWidth: 'auto',
        },
        searchForm: [
          {
            type: 'row',
            items: [
              {
                label: '售后状态:',
                id: 'status',
                type: 'bus-radio',
                el: {
                  hasAll: true,
                  childType: 'el-radio-button',
                  code: 'ORDER_SALES_STATUS',
                },
                default: '',
                span: 24,
                searchImmediately: true,
              },
              { label: '商品名称:', id: 'flowerName', type: 'input' },
              { label: '订单号:', id: 'orderNo', type: 'input' },
              { label: '售后单号:', id: 'salesNo', type: 'input' },
              { label: '收货人姓名:', id: 'customer', type: 'input' },
              { label: '收货人电话:', id: 'customerTel', type: 'input' },
              { label: '供应商:', id: 'supplierName', type: 'input' },
              {
                label: '下单时间:',
                id: 'orderStartDateStr',
                component: 'el-bus-date-range',
                commonFormat: true,
                commonFormatProps: ['orderStartDateStr', 'orderEndDateStr'],
                customClass: 'in-bus-form',
              },
              {
                label: '售后时间:',
                id: 'salesStartDateStr',
                component: 'el-bus-date-range',
                commonFormat: true,
                commonFormatProps: ['salesStartDateStr', 'salesEndDateStr'],
                customClass: 'in-bus-form',
              },
            ],
          },
        ],
      },
    }
  },
  head() {
    return {
      title: '售后理赔',
    }
  },
  methods: {
    onDetail(item) {
      this.$router.push(`${this.$route.path}/view/${item.id}`)
    },
  },
}
</script>
 
<style lang="scss" scoped></style>