1
陶杰
2024-11-27 aa7cd5b28360f6b40a9ab498191e42e06344ab90
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<template>
  <div>
    <div v-loading="statisticLoading">
      <el-row :gutter="20" type="flex" justify="center">
        <el-col :span="6" class="mb-10">
          <el-card class="is-total">
            <div class="statistic-title">底价合计</div>
            <div class="statistic-num">
              {{ statistic.orderSupplierPriceAmount || 0 }}
            </div>
          </el-card>
        </el-col>
        <el-col :span="12" class="mb-10">
          <el-row :gutter="20">
            <el-col :span="12" class="mb-10">
              <el-card>
                <div class="statistic-title">降级扣款</div>
                <div class="statistic-num">
                  {{ statistic.orderCheckFee || 0 }}
                </div>
              </el-card>
            </el-col>
            <el-col :span="12" class="mb-10">
              <el-card>
                <div class="statistic-title">缺货扣款</div>
                <div class="statistic-num">
                  {{ statistic.orderLackFeeSupplier || 0 }}
                </div>
              </el-card>
            </el-col>
            <el-col :span="12">
              <el-card>
                <div class="statistic-title">售后扣款</div>
                <div class="statistic-num">
                  {{ statistic.salesFeeSupplier || 0 }}
                </div>
              </el-card>
            </el-col>
            <el-col :span="12">
              <el-card>
                <div class="statistic-title">实际销售扎数</div>
                <div class="statistic-num">
                  {{ statistic.realSaleNum || 0 }}
                </div>
              </el-card>
            </el-col>
          </el-row>
        </el-col>
        <el-col :span="6" class="mb-10">
          <el-card class="is-total">
            <div class="statistic-title">结算合计</div>
            <div class="statistic-num">
              {{ statistic.profitFeeAmount || 0 }}
            </div>
          </el-card>
        </el-col>
      </el-row>
    </div>
    <el-bus-crud v-bind="tableConfig"></el-bus-crud>
  </div>
</template>
 
<script>
import { getSupplierListConfig } from '@/utils/form-item-config'
export default {
  data() {
    const currentDate = this.$elBusUtil.toDate(new Date())
    return {
      statisticLoading: false,
      statistic: {},
      tableConfig: {
        url: 'flower/v2/report/order/supplier/page',
        hasNew: false,
        hasOperation: false,
        hasExport: true,
        exportUrl: 'flower/v2/report/order/supplier/export',
        exportText: '导出',
        beforeRequest: async (params) => {
          this.statisticLoading = true
          // eslint-disable-next-line
          let { code, data } = await this.$elBusHttp.request(
            `flower/v2/report/order/supplier/count`,
            { params }
          )
          if (code === 0) {
            this.statistic = data || {}
          }
          this.statisticLoading = false
        },
        columns: [
          { label: '日期', prop: 'dateinfo', fixed: 'left', minWidth: 120 },
          {
            label: '供应商ID',
            prop: 'supplierId',
            fixed: 'left',
            minWidth: 80,
          },
          {
            label: '供应商',
            prop: 'supplierName',
            fixed: 'left',
            minWidth: 120,
          },
          {
            label: '花农底价',
            prop: 'orderSupplierPriceAmount',
            minWidth: 120,
          },
          { label: '降级扣款', prop: 'orderCheckFee', minWidth: 120 },
          {
            label: '缺货扣款(缺货+补货)',
            prop: 'orderLackFeeSupplier',
            minWidth: 150,
          },
          { label: '售后扣花农款', prop: 'salesFeeSupplier', minWidth: 120 },
          { label: '实际销售扎数', prop: 'realSaleNum', minWidth: 120 },
          {
            label: '结算费用',
            prop: 'profitFeeAmount',
            fixed: 'right',
            minWidth: 120,
          },
          {
            label: '订单状态',
            prop: 'settleStatus',
            fixed: 'right',
            minWidth: 120,
          },
        ],
        searchForm: [
          {
            type: 'row',
            items: [
              {
                label: '下单日期',
                id: 'startDate',
                component: 'el-bus-date-range',
                el: {
                  clearable: false,
                },
                commonFormat: true,
                commonFormatProps: ['startDate', 'endDate'],
                customClass: 'in-bus-form',
                commonRules: true,
                default: [currentDate, currentDate],
              },
              { ...getSupplierListConfig(), label: '供应商' },
            ],
          },
        ],
      },
    }
  },
  head() {
    return {
      title: '花农结算报表',
    }
  },
}
</script>
 
<style lang="scss" scoped>
@import '@/assets/statistic/index.scss';
</style>