From 33ba0b0585a2ecbbb04ade3df268ad2b05e1221c Mon Sep 17 00:00:00 2001
From: 陶杰 <1378534974@qq.com>
Date: 星期三, 30 十月 2024 18:32:18 +0800
Subject: [PATCH] 1.财务报表-增加总销售扎数

---
 pages/report/finance/index.vue |   29 +++++++++++++++++++----------
 1 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/pages/report/finance/index.vue b/pages/report/finance/index.vue
index a490242..a6cdb12 100644
--- a/pages/report/finance/index.vue
+++ b/pages/report/finance/index.vue
@@ -4,8 +4,14 @@
       <el-row :gutter="20">
         <el-col :span="4" class="mb-10">
           <el-card>
-            <div class="statistic-title">销售合计</div>
+            <div class="statistic-title">销售合计(原订单)</div>
             <div class="statistic-num">{{ statistic.orderTotal || 0 }}</div>
+          </el-card>
+        </el-col>
+        <el-col :span="4" class="mb-10">
+          <el-card>
+            <div class="statistic-title">销售合计(实付)</div>
+            <div class="statistic-num">{{ statistic.totalAmount || 0 }}</div>
           </el-card>
         </el-col>
         <el-col :span="4" class="mb-10">
@@ -76,7 +82,7 @@
         </el-col>
       </el-row>
     </div>
-    <el-bus-crud v-bind="tableConfig" />
+    <el-bus-crud ref="crud" v-bind="tableConfig" />
   </div>
 </template>
 
@@ -87,10 +93,7 @@
 dayjs.locale('zh-cn')
 export default {
   data() {
-    const endDate = `${dayjs().format('YYYY-MM-DD')} 00:00:00`
-    const startDate = `${dayjs()
-      .subtract(1, 'month')
-      .format('YYYY-MM-DD')} 23:59:59`
+    const defaultDate = `${dayjs().format('YYYY-MM-DD')} 00:00:00`
     return {
       statistic: {},
       statisticLoading: false,
@@ -104,8 +107,12 @@
         exportUrl: 'flower/v2/report/order/sale/export',
         exportText: '导出',
         onResetView: (row) => {
+          const searchFormRef = this.$refs.crud.$refs.searchForm
+          const searchFormValue = searchFormRef.getFormValue()
           const url = this.$router.resolve(
-            `/report/finance/${row.orderDate}`
+            `/report/finance/${row.orderDate}?partnerId=${
+              searchFormValue?.partnerId || ''
+            }`
           ).href
           window.open(url, '_blank')
         },
@@ -153,7 +160,8 @@
             minWidth: 120,
             fixed: 'left',
           },
-          { label: '销售额', prop: 'orderTotal', minWidth: 120 },
+          { label: '销售额(原订单)', prop: 'orderTotal', minWidth: 120 },
+          { label: '销售额(实付)', prop: 'totalAmount', minWidth: 120 },
           {
             label: '花农底价',
             prop: 'orderSupplierPriceAmount',
@@ -183,7 +191,8 @@
           { label: '售后扣花农款', prop: 'orderFeeSupplier', minWidth: 150 },
           { label: '售后扣平台款', prop: 'orderFeePlatform', minWidth: 150 },
           { label: '总包干费', prop: 'partnerTotalFeeAmount', minWidth: 120 },
-          { label: '销售扎数', prop: 'realSaleNum', minWidth: 120 },
+          { label: '总售扎数', prop: 'orderNum', minWidth: 120 },
+          { label: '实际销售扎数', prop: 'realSaleNum', minWidth: 120 },
           {
             label: '利润',
             prop: 'profitFeeAmount',
@@ -226,7 +235,7 @@
                 },
                 customClass: 'in-bus-form',
                 commonRules: true,
-                default: [startDate, endDate],
+                default: [defaultDate, defaultDate],
               },
               { ...getPartnerListConfig(), label: '合伙人' },
             ],

--
Gitblit v1.9.3