liuxf 4 months ago
parent
commit
187fb59ae5
2 changed files with 29 additions and 1 deletions
  1. 28 0
      src/store/modules/sales.js
  2. 1 1
      src/views/fcbi/sales/sumResult.vue

+ 28 - 0
src/store/modules/sales.js

@@ -0,0 +1,28 @@
+import { defineStore } from 'pinia'
+
+export const useSalesStore = defineStore('surveySales', {
+    state: () => ({
+        // 存储销售统计传递的数据
+        salesData: {
+            // 日期相关(月指定/年度指定)
+            monthYear: null, // 月指定-年份
+            startMonth: null, // 月指定-月份
+            startYear: null, // 年度指定-年度
+            // FC选择值
+            brandCode: [],
+            // エリア选择值
+            regions: [],
+            // 标志位
+            salesFlag: 0
+        }
+    }),
+    actions: {
+        // 设置销售统计数据
+        setSalesData(data) {
+            this.salesData = { ...data }
+        }
+    },
+    persist: true
+})
+
+export default useSalesStore

+ 1 - 1
src/views/fcbi/sales/sumResult.vue

@@ -65,7 +65,7 @@
 <script name="purchaseSaleResults" setup>
 
 import { purchaseSaleList} from "@/api/fcbi/purchaseSale.js"
-import useSalesStore from '@/store/modules/survey';
+import useSalesStore from '@/store/modules/sales.js';
 import {download} from "@/utils/request.js";
 import { AGGREGATION_TYPE, TARGET_PERIOD_TYPE } from '@/constants';
 defineExpose({