cloudroam
2025-03-28 cef2bb0eeeb91a22860cf5d23c7348af1ba921dc
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
<template>
  <el-bus-crud v-bind="tableConfig"></el-bus-crud>
</template>
 
<script>
import { dateRangeOptions } from '@/utils/options'
import CustomDateRange from '@/components/custom-date-range.vue'
export default {
  data() {
    return {
      tableConfig: {
        url: 'flower/api/order/list',
        hasNew: false,
        hasEdit: false,
        hasDelete: false,
        onResetView: (row) => {
          this.$router.push(`/order/list/${row.id}`)
        },
        extraQuery: {
          billId: this.$route.params.id,
        },
        columns: [
          { label: '序号', type: 'index' },
          { label: '订单号', prop: 'orderNo' },
          { label: '收货人', prop: 'customer' },
          { label: '花款(售价)', prop: 'totalAmount' },
          { label: '花款(底价)', prop: 'supplierAmount' },
        ],
        searchFormAttrs: {
          labelWidth: 'auto',
        },
        searchForm: [
          {
            type: 'row',
            span: 6,
            items: [
              {
                label: '下单日期:',
                id: 'dateType',
                component: CustomDateRange,
                el: {
                  options: dateRangeOptions,
                },
                searchImmediately: true,
                commonFormat: true,
                commonFormatProps: [
                  'dateType',
                  'createStartDateStr',
                  'createEndDateStr',
                ],
                span: 24,
              },
              { label: '订单号:', id: 'orderNo', type: 'input' },
              { label: '商品名称:', id: 'flowerName', type: 'input' },
              {
                label: '收货人:',
                id: 'customer',
                type: 'input',
                el: { placeholder: '收货人姓名/手机号' },
              },
            ],
          },
        ],
      },
    }
  },
  head() {
    return {
      title: this.isPartner ? '合伙人账单结算明细' : '普通账单结算明细',
    }
  },
  computed: {
    isPartner() {
      return this.$route.params.type === 'partner'
    },
  },
}
</script>