feat: 调整客户表的字段

This commit is contained in:
Wanwan 2023-10-29 00:03:11 +08:00
parent 4cdab6fb3e
commit 59cf0c29f0
4 changed files with 59 additions and 4 deletions

View File

@ -3,6 +3,9 @@ import request from '@/config/axios'
export interface CustomerVO { export interface CustomerVO {
id: number id: number
name: string name: string
industryId: number
level: number
source: number
followUpStatus: boolean followUpStatus: boolean
lockStatus: boolean lockStatus: boolean
mobile: string mobile: string

View File

@ -188,5 +188,8 @@ export enum DICT_TYPE {
// ========== CRM - 客户管理模块 ========== // ========== CRM - 客户管理模块 ==========
CRM_RECEIVABLE_CHECK_STATUS = 'crm_receivable_check_status', CRM_RECEIVABLE_CHECK_STATUS = 'crm_receivable_check_status',
CRM_RETURN_TYPE = 'crm_return_type' CRM_RETURN_TYPE = 'crm_return_type',
CRM_CUSTOMER_INDUSTRY = 'crm_customer_industry',
CRM_CUSTOMER_LEVEL = 'crm_customer_level',
CRM_CUSTOMER_SOURCE = 'crm_customer_source'
} }

View File

@ -13,6 +13,36 @@
<el-form-item label="手机" prop="mobile"> <el-form-item label="手机" prop="mobile">
<el-input v-model="formData.mobile" placeholder="请输入手机" /> <el-input v-model="formData.mobile" placeholder="请输入手机" />
</el-form-item> </el-form-item>
<el-form-item label="所属行业" prop="industryId">
<el-select v-model="formData.industryId" placeholder="请选择所属行业">
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.CRM_CUSTOMER_INDUSTRY)"
:key="dict.value + ''"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="客户等级" prop="level">
<el-select v-model="formData.level" placeholder="请选择客户等级">
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.CRM_CUSTOMER_LEVEL)"
:key="dict.value + ''"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="客户来源" prop="source">
<el-select v-model="formData.source" placeholder="请选择客户来源">
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.CRM_CUSTOMER_SOURCE)"
:key="dict.value + ''"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="电话" prop="telephone"> <el-form-item label="电话" prop="telephone">
<el-input v-model="formData.telephone" placeholder="请输入电话" /> <el-input v-model="formData.telephone" placeholder="请输入电话" />
</el-form-item> </el-form-item>
@ -56,7 +86,7 @@
</Dialog> </Dialog>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { DICT_TYPE, getBoolDictOptions } from '@/utils/dict' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import * as CustomerApi from '@/api/crm/customer' import * as CustomerApi from '@/api/crm/customer'
const { t } = useI18n() // const { t } = useI18n() //
@ -70,6 +100,9 @@ const formData = ref({
id: undefined, id: undefined,
name: undefined, name: undefined,
mobile: undefined, mobile: undefined,
industryId: undefined,
level: undefined,
source: undefined,
telephone: undefined, telephone: undefined,
website: undefined, website: undefined,
qq: undefined, qq: undefined,
@ -135,9 +168,10 @@ const resetForm = () => {
formData.value = { formData.value = {
id: undefined, id: undefined,
name: undefined, name: undefined,
followUpStatus: undefined,
lockStatus: undefined,
mobile: undefined, mobile: undefined,
industryId: undefined,
level: undefined,
source: undefined,
telephone: undefined, telephone: undefined,
website: undefined, website: undefined,
qq: undefined, qq: undefined,

View File

@ -65,6 +65,21 @@
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.dealStatus" /> <dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.dealStatus" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="所属行业" align="center" prop="industryId">
<template #default="scope">
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_INDUSTRY" :value="scope.row.industryId" />
</template>
</el-table-column>
<el-table-column label="客户等级" align="center" prop="level">
<template #default="scope">
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_LEVEL" :value="scope.row.level" />
</template>
</el-table-column>
<el-table-column label="客户来源" align="center" prop="source">
<template #default="scope">
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_SOURCE" :value="scope.row.source" />
</template>
</el-table-column>
<el-table-column label="手机" align="center" prop="mobile" /> <el-table-column label="手机" align="center" prop="mobile" />
<el-table-column label="电话" align="center" prop="telephone" /> <el-table-column label="电话" align="center" prop="telephone" />
<el-table-column label="网址" align="center" prop="website" /> <el-table-column label="网址" align="center" prop="website" />