From 53ac595354d7e577acd48dff19470b73b892c8cf Mon Sep 17 00:00:00 2001
From: mayf <m13160102112@163.com>
Date: 星期六, 12 十月 2024 13:59:55 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 pages/report/supplier.vue |  164 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 164 insertions(+), 0 deletions(-)

diff --git a/pages/report/supplier.vue b/pages/report/supplier.vue
new file mode 100644
index 0000000..aad9201
--- /dev/null
+++ b/pages/report/supplier.vue
@@ -0,0 +1,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>

--
Gitblit v1.9.3