From d94e516c0f6d81d5b12288035bc51432b18301c8 Mon Sep 17 00:00:00 2001
From: spllzh <28668817@qq.com>
Date: Thu, 14 Aug 2025 17:15:17 +0800
Subject: [PATCH] =?UTF-8?q?=E9=94=80=E5=94=AE=E6=89=80=E5=B1=9E=E5=93=AA?=
=?UTF-8?q?=E4=B8=AA=E9=A1=B9=E7=9B=AE=E7=9A=84=E5=A4=84=E7=90=86=E9=80=BB?=
=?UTF-8?q?=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/sales/index.vue | 46 +++++++++++++++++++++++++++++++--------
1 file changed, 37 insertions(+), 9 deletions(-)
diff --git a/src/views/sales/index.vue b/src/views/sales/index.vue
index 84dd283..50212d7 100644
--- a/src/views/sales/index.vue
+++ b/src/views/sales/index.vue
@@ -58,10 +58,10 @@
/>
-
- 启用
- 停用
-
+
+ 启用
+ 停用
+
筛选
@@ -142,6 +142,16 @@
+
+
+
+
+
import { getSalesList, getSalesById, addSales, updateSales, deleteSales, batchDeleteSales } from '@/api/sales'
import { getDealershipList } from '@/api/dealership'
+import { getProjectList } from '@/api/project'
export default {
name: 'Sales',
@@ -198,10 +209,7 @@ export default {
// 门店选项
storeOptions: [],
// 项目选项
- projectOptions: [
- { value: '1', label: '广丰项目' },
- { value: '2', label: '广丰项目 电话接访话术' }
- ],
+ projectOptions: [],
// 添加/编辑对话框相关
dialogVisible: false,
dialogTitle: '',
@@ -226,6 +234,7 @@ export default {
created() {
this.getList()
this.getStoreOptions()
+ this.getProjectOptions()
},
methods: {
// 获取列表数据
@@ -317,7 +326,26 @@ export default {
]
})
},
-
+ // 获取项目选项
+ getProjectOptions() {
+ getProjectList({ pageSize: 1000 }).then(response => {
+ if (response && response.code === 20000) {
+ this.projectOptions = response.data.map(item => ({
+ value: item.id,
+ label: item.projectName
+ }))
+ } else {
+ this.$message.error(response?.message || '获取项目列表失败')
+ }
+ }).catch(error => {
+ console.error('获取项目列表失败:', error)
+ // 开发环境使用模拟数据
+ this.projectOptions = [
+ { value: '1', label: '广丰项目' },
+ { value: '2', label: '广丰项目 电话接访话术' }
+ ]
+ })
+ },
// 查询
handleQuery() {
this.queryParams.pageNum = 1