Browse Source

结算表头部统计

asd26269546 1 year ago
parent
commit
969acad3b7
1 changed files with 107 additions and 0 deletions
  1. 107 0
      src/views/salesMange/salesMange/profitSettlement/index.vue

+ 107 - 0
src/views/salesMange/salesMange/profitSettlement/index.vue

@@ -8,6 +8,7 @@
       :config="config"
       :loading="loading"
       :selectConfig="selectConfig"
+      :statConfig='statConfig'
       highlight-current-row
       :action-list="[
         
@@ -368,6 +369,9 @@ const sourceList = ref({
   },
 });
 const loading = ref(false);
+
+let statConfig = ref([])
+
 const selectConfig = computed(() => {
   return [
     {
@@ -438,6 +442,7 @@ const getDict = () => {
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
+  getTotal()
   proxy
     .post("/saleStatement/getProfitSettlement", sourceList.value.pagination)
     .then((res) => {
@@ -448,6 +453,108 @@ const getList = async (req) => {
       }, 200);
     });
 };
+//获取统计数据
+const getTotal = () => {
+  proxy.post("/saleStatement/getProfitSettlementHead", sourceList.value.pagination).then(
+    (res) => {
+      
+      statConfig.value = [{
+        label: '统计',
+        data:[
+          //一个卡牌多数据配置
+          {
+            label:'订单统计(CNY)',
+            type:2,
+            data:[
+              {
+                label:'订单数',
+                num:res.contractCount,
+                color:'#9E64ED',
+              },
+              {
+                label:'销售总金额',
+                num:res.contractSumAmount,
+                color:'#9E64ED',
+              },
+              {
+                label:'采购总金额',
+                num:res.purchaseSumAmount,
+                color:'#9E64ED',
+              },
+            ]
+          },
+          {
+            label:'收入统计(CNY)',
+            type:3,
+            data:[
+              {
+                label:'合同到账',
+                num:res.contractArrivalSumAmount,
+                color:'#FF9315',
+              },
+              {
+                label:'退税',
+                num:res.taxReturnMoneySumAmount,
+                color:'#FF9315',
+              },
+              {
+                label:'其他收入',
+                num:res.otherIncomeSumAmount,
+                color:'#FF9315',
+              },
+            ]
+          },
+          {
+            label:'支出统计(CNY)',
+            type:5,
+            data:[
+              {
+                label:'支付货款',
+                num:res.payForGoodsSumAmount,
+                color:'#F94539',
+              },
+              {
+                label:'其他支出',
+                num:res.otherExpensesSumAmount,
+                color:'#F94539',
+              },
+            ]
+          },
+          {
+            label:'收支统计(CNY)',
+            type:1,
+            data:[
+              {
+                label:'总收入',
+                num:res.totalIncomeSumAmount,
+                color:'#0084FF',
+              },
+              {
+                label:'总支出',
+                num:res.totalExpensesSumAmount,
+                color:'#0084FF',
+              },
+              {
+                label:'总毛利',
+                num:res.grossProfitSum,
+                color:'#0084FF',
+              },
+              {
+                label:'毛利率',
+                num:res.GrossProfitMargin + '%',
+                color:'#0084FF',
+              },
+            ]
+          },
+        ],
+      }]
+    },
+    (err) => {
+      
+    }
+  );
+}
+
 const rateStatus = ref(false);
 const judgeRate = () => {
   proxy.post("/currencyRate/list", {}).then(