增加相关功能

This commit is contained in:
2026-09-03 17:54:49 +08:00
parent 44a03186da
commit d8936d9730
30 changed files with 4503 additions and 2412 deletions
+13 -3
View File
@@ -7,6 +7,7 @@
</div>
<div class="header-actions">
<el-button type="primary" :icon="Plus" @click="openCreate">新增客户</el-button>
<el-button type="success" :icon="Cpu" @click="smartAddVisible = true">智能添加</el-button>
</div>
</div>
@@ -27,7 +28,8 @@
<el-option label="企业" value="1" />
<el-option label="政府机构" value="2" />
<el-option label="国企" value="3" />
<el-option label="个人" value="4" />
<el-option label="教育机构" value="4" />
<el-option label="个人" value="5" />
</el-select>
</el-form-item>
<el-form-item label="客户等级">
@@ -192,21 +194,29 @@
:company-id="currentCompany?.id"
:company-name="currentCompany?.customer_name"
/>
<SmartAddCompany
v-model:visible="smartAddVisible"
type="customer"
@success="fetchList"
/>
</div>
</template>
<script setup>
import { ref, reactive, onMounted } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { Plus, Search, Refresh } from '@element-plus/icons-vue'
import { Plus, Search, Refresh, Cpu } from '@element-plus/icons-vue'
import { getCustomerList, deleteCustomer, toggleCustomerStatus } from '@/api/customer'
import CustomerEdit from './components/edit.vue'
import ContactBook from '../components/contactBook.vue'
import SmartAddCompany from '../components/smartAddCompany.vue'
const loading = ref(false)
const tableData = ref([])
const editVisible = ref(false)
const currentEditData = ref(null)
const smartAddVisible = ref(false)
const detailVisible = ref(false)
const detailData = ref(null)
const contactBookVisible = ref(false)
@@ -369,7 +379,7 @@ async function handleDelete(row) {
}
function customerTypeText(type) {
const map = { '1': '企业', '2': '政府机构', '3': '国企', '4': '个人' }
const map = { '1': '企业', '2': '政府机构', '3': '国企', '4': '教育机构', '5':'个人' }
return map[type] || type
}