|
|
@@ -55,14 +55,14 @@
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="项目级别" prop="projectLevel">
|
|
|
<el-select v-model="queryParams.projectLevel" placeholder="请选择" style="width: 100%" clearable>
|
|
|
- <el-option v-for="item in projectLevelOptions" :key="item.dictValue" :label="item.dictLabel" :value="Number(item.dictValue)" />
|
|
|
+ <el-option v-for="item in projectLevelOptions" :key="item.value" :label="item.label" :value="Number(item.value)" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="项目类型" prop="businessType">
|
|
|
<el-select v-model="queryParams.businessType" placeholder="请选择" style="width: 100%" clearable>
|
|
|
- <el-option v-for="item in projectTypeOptions" :key="item.dictValue" :label="item.dictLabel" :value="Number(item.dictValue)" />
|
|
|
+ <el-option v-for="item in projectTypeOptions" :key="item.value" :label="item.label" :value="Number(item.value)" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -71,28 +71,28 @@
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="入围类型" prop="finalizationType">
|
|
|
<el-select v-model="queryParams.finalizationType" placeholder="请选择" style="width: 100%" clearable>
|
|
|
- <el-option v-for="item in shortlistedTypeOptions" :key="item.dictValue" :label="item.dictLabel" :value="Number(item.dictValue)" />
|
|
|
+ <el-option v-for="item in shortlistedTypeOptions" :key="item.value" :label="item.label" :value="Number(item.value)" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="项目状态" prop="projectStatus">
|
|
|
<el-select v-model="queryParams.projectStatus" style="width: 100%" clearable>
|
|
|
- <el-option v-for="item in statusOptions" :key="item.dictValue" :label="item.dictLabel" :value="Number(item.dictValue)" />
|
|
|
+ <el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="Number(item.value)" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="成交结果" prop="result">
|
|
|
<el-select v-model="queryParams.result" placeholder="请选择" style="width: 100%" clearable>
|
|
|
- <el-option v-for="item in resultOptions" :key="item.dictValue" :label="item.dictLabel" :value="Number(item.dictValue)" />
|
|
|
+ <el-option v-for="item in resultOptions" :key="item.value" :label="item.label" :value="Number(item.value)" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="时间查询类型" prop="timeType">
|
|
|
<el-select v-model="queryParams.timeType" style="width: 100%" clearable>
|
|
|
- <el-option v-for="item in timeTypeOptions" :key="item.dictValue" :label="item.dictLabel" :value="Number(item.dictValue)" />
|
|
|
+ <el-option v-for="item in timeTypeOptions" :key="item.value" :label="item.label" :value="Number(item.value)" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -157,12 +157,12 @@
|
|
|
<el-table-column label="客户名称" align="center" prop="customName" min-width="200" show-overflow-tooltip />
|
|
|
<el-table-column label="项目级别" align="center" prop="projectLevel" width="100">
|
|
|
<template #default="scope">
|
|
|
- {{ projectLevelOptions.find(o => String(o.dictValue) === String(scope.row.projectLevel))?.dictLabel || scope.row.projectLevel }}
|
|
|
+ {{ projectLevelOptions.find(o => String(o.value) === String(scope.row.projectLevel))?.label || scope.row.projectLevel }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="项目类型" align="center" prop="businessType" width="100">
|
|
|
<template #default="scope">
|
|
|
- {{ projectTypeOptions.find(o => String(o.dictValue) === String(scope.row.businessType))?.dictLabel || scope.row.businessType }}
|
|
|
+ {{ projectTypeOptions.find(o => String(o.value) === String(scope.row.businessType))?.label || scope.row.businessType }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="金额(万)" align="center" prop="amount" width="100" sortable />
|
|
|
@@ -211,17 +211,17 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="入围类型" align="center" prop="finalizationType" width="100">
|
|
|
<template #default="scope">
|
|
|
- {{ shortlistedTypeOptions.find(o => String(o.dictValue) === String(scope.row.finalizationType || scope.row.shortlistedType || scope.row.selectionType))?.dictLabel || scope.row.finalizationType || scope.row.selectionType }}
|
|
|
+ {{ shortlistedTypeOptions.find(o => String(o.value) === String(scope.row.finalizationType || scope.row.shortlistedType || scope.row.selectionType))?.label || scope.row.finalizationType || scope.row.selectionType }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="项目状态" align="center" prop="projectStatus" width="100">
|
|
|
<template #default="scope">
|
|
|
- <el-tag :type="scope.row.projectStatus === 5 ? 'info' : 'warning'" plain>{{ statusOptions.find(o => String(o.dictValue) === String(scope.row.projectStatus))?.dictLabel || '跟进中' }}</el-tag>
|
|
|
+ <el-tag :type="scope.row.projectStatus === 5 ? 'info' : 'warning'" plain>{{ statusOptions.find(o => String(o.value) === String(scope.row.projectStatus))?.label || '跟进中' }}</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="成交结果" align="center" prop="result" width="100">
|
|
|
<template #default="scope">
|
|
|
- {{ resultOptions.find(o => String(o.dictValue) === String(scope.row.result))?.dictLabel || scope.row.result }}
|
|
|
+ {{ resultOptions.find(o => String(o.value) === String(scope.row.result))?.label || scope.row.result }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" width="180" fixed="right">
|
|
|
@@ -312,14 +312,13 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup name="PlatformSelection">
|
|
|
-import { ref, reactive, onMounted, getCurrentInstance } from 'vue';
|
|
|
+import { ref, reactive, onMounted, getCurrentInstance, toRefs } from 'vue';
|
|
|
import {
|
|
|
listPlatformSelection,
|
|
|
delPlatformSelection,
|
|
|
transferPlatformSelection
|
|
|
} from '@/api/saleManage/platformSelection/index';
|
|
|
import { listRecord, addRecord } from "@/api/visit/record";
|
|
|
-import { listCommonDict } from "@/api/customer/customerDict";
|
|
|
import { selectStaffOptionList } from "@/api/system/comStaff/index";
|
|
|
import { listCompanyOption, listCustomerInfo } from "@/api/customer/customerInfo/index";
|
|
|
import { listIndustryCategory } from "@/api/customer/industryCategory";
|
|
|
@@ -329,7 +328,7 @@ import AddDialog from './add.vue';
|
|
|
import EditDialog from './edit.vue';
|
|
|
import DetailDialog from './detail.vue';
|
|
|
|
|
|
-const { proxy } = getCurrentInstance();
|
|
|
+const proxy = getCurrentInstance().proxy;
|
|
|
|
|
|
// 列表状态
|
|
|
const loading = ref(false);
|
|
|
@@ -381,28 +380,40 @@ const queryParams = reactive({
|
|
|
});
|
|
|
|
|
|
// 下拉选项
|
|
|
-const projectLevelOptions = ref([]);
|
|
|
-const projectTypeOptions = ref([]);
|
|
|
-const shortlistedTypeOptions = ref([]);
|
|
|
-const statusOptions = ref([]);
|
|
|
+const {
|
|
|
+ XMJB0001, L0001, R0001, J0001, ZBPL0001, deal_result, time_query_type
|
|
|
+} = proxy.useDict('XMJB0001', 'L0001', 'R0001', 'J0001', 'ZBPL0001', 'deal_result', 'time_query_type');
|
|
|
+
|
|
|
+const projectLevelOptions = L0001;
|
|
|
+const projectTypeOptions = XMJB0001;
|
|
|
+const shortlistedTypeOptions = R0001;
|
|
|
+const statusOptions = J0001;
|
|
|
+const resultOptions = deal_result;
|
|
|
+const timeTypeOptions = time_query_type;
|
|
|
+const materialOptions = ZBPL0001;
|
|
|
const userOptions = ref([]);
|
|
|
const companyOptions = ref([]);
|
|
|
const deptOptions = ref([]);
|
|
|
-const resultOptions = ref([]);
|
|
|
-const timeTypeOptions = ref([]);
|
|
|
const industryOptions = ref([]);
|
|
|
|
|
|
-const drawerOptions = reactive({
|
|
|
+// 使用 computed 确保传给子组件的是展开后的数组(而非 ref 对象),保持响应式
|
|
|
+const drawerOptionsBase = reactive({
|
|
|
company: [],
|
|
|
user: [],
|
|
|
- level: [],
|
|
|
- type: [],
|
|
|
- shortlisted: [],
|
|
|
- material: [],
|
|
|
industryList: [],
|
|
|
- status: []
|
|
|
});
|
|
|
|
|
|
+const drawerOptions = computed(() => ({
|
|
|
+ company: drawerOptionsBase.company,
|
|
|
+ user: drawerOptionsBase.user,
|
|
|
+ industryList: drawerOptionsBase.industryList,
|
|
|
+ level: L0001.value || [],
|
|
|
+ type: XMJB0001.value || [],
|
|
|
+ shortlisted: R0001.value || [],
|
|
|
+ material: ZBPL0001.value || [],
|
|
|
+ status: J0001.value || [],
|
|
|
+}));
|
|
|
+
|
|
|
/** 查询列表 */
|
|
|
const getList = async () => {
|
|
|
loading.value = true;
|
|
|
@@ -544,11 +555,6 @@ const confirmTransfer = async () => {
|
|
|
|
|
|
/** 初始化基础数据 */
|
|
|
const initData = () => {
|
|
|
- listCommonDict('XMJB0001').then(res => { projectLevelOptions.value = res.data; drawerOptions.level = res.data; });
|
|
|
- listCommonDict('L0001').then(res => { projectTypeOptions.value = res.data; drawerOptions.type = res.data; });
|
|
|
- listCommonDict('R0001').then(res => { shortlistedTypeOptions.value = res.data; drawerOptions.shortlisted = res.data; });
|
|
|
- listCommonDict('J0001').then(res => { statusOptions.value = res.data; drawerOptions.status = res.data; });
|
|
|
- listCommonDict('ZBPL0001').then(res => { drawerOptions.material = res.data; });
|
|
|
listIndustryCategory().then(res => {
|
|
|
const flatten = (list) => {
|
|
|
let result = [];
|
|
|
@@ -560,13 +566,11 @@ const initData = () => {
|
|
|
};
|
|
|
const flatData = flatten(res.data || []);
|
|
|
industryOptions.value = flatData;
|
|
|
- drawerOptions.industryList = res.data; // 弹窗中通常需要树形结构或特定结构
|
|
|
+ drawerOptionsBase.industryList = res.data;
|
|
|
});
|
|
|
- selectStaffOptionList().then(res => { userOptions.value = res.data; drawerOptions.user = res.data; });
|
|
|
- listCompanyOption().then(res => { companyOptions.value = res.data; drawerOptions.company = res.data; });
|
|
|
- listCommonDict('deal_result').then(res => resultOptions.value = res.data);
|
|
|
+ selectStaffOptionList().then(res => { userOptions.value = res.data; drawerOptionsBase.user = res.data; });
|
|
|
+ listCompanyOption().then(res => { companyOptions.value = res.data; drawerOptionsBase.company = res.data; });
|
|
|
deptTreeSelect().then(res => deptOptions.value = res.data);
|
|
|
- listCommonDict('time_query_type').then(res => timeTypeOptions.value = res.data);
|
|
|
};
|
|
|
|
|
|
onMounted(() => {
|