ソースを参照

应用总控平台公司 银行 客服 部门等数据

hurx 1 日 前
コミット
56eec301c3

+ 1 - 0
package.json

@@ -29,6 +29,7 @@
     "axios": "1.8.4",
     "crypto-js": "4.2.0",
     "echarts": "5.6.0",
+    "element-china-area-data": "^6.1.0",
     "element-plus": "2.9.8",
     "file-saver": "2.0.5",
     "highlight.js": "11.9.0",

+ 75 - 0
src/api/company/comDept/index.ts

@@ -0,0 +1,75 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { ComDeptVO, ComDeptForm, ComDeptQuery } from '@/api/company/comDept/types';
+
+/**
+ * 查询企业部门列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listComDept = (query?: ComDeptQuery): AxiosPromise<ComDeptVO[]> => {
+  return request({
+    url: '/system/comDept/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询企业部门详细
+ * @param id
+ */
+export const getComDept = (id: string | number): AxiosPromise<ComDeptVO> => {
+  return request({
+    url: '/system/comDept/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增企业部门
+ * @param data
+ */
+export const addComDept = (data: ComDeptForm) => {
+  return request({
+    url: '/system/comDept',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改企业部门
+ * @param data
+ */
+export const updateComDept = (data: ComDeptForm) => {
+  return request({
+    url: '/system/comDept',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除企业部门
+ * @param id
+ */
+export const delComDept = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/comDept/' + id,
+    method: 'delete'
+  });
+};
+
+export function changeStatus(id: string | number, status: string) {
+  const data = {
+    id,
+    status
+  };
+  return request({
+    url: '/system/comDept/changeStatus',
+    method: 'put',
+    data: data
+  });
+}

+ 255 - 0
src/api/company/comDept/types.ts

@@ -0,0 +1,255 @@
+export interface ComDeptVO {
+  /**
+   * 部门ID
+   */
+  id: string | number;
+
+  /**
+   * 部门编码
+   */
+  deptCode: string;
+
+  /**
+   * 企业ID
+   */
+  companyId: string | number;
+
+  /**
+   * 部门名称
+   */
+  deptName: string;
+
+  /**
+   * 父部门ID
+   */
+  parentId: string | number;
+
+  /**
+   * 祖级部门ID路径
+   */
+  ancestors: string;
+
+  /**
+   * 部门类别
+   */
+  deptCategory: string;
+
+  /**
+   * 部门层级深度
+   */
+  level: number;
+
+  /**
+   * 负责人用户ID
+   */
+  leader: number;
+
+  /**
+   * 联系电话
+   */
+  phone: string;
+
+  /**
+   * 邮箱
+   */
+  email: string;
+
+  /**
+   * 生效日期
+   */
+  validFrom: string | number;
+
+  /**
+   * 失效日期
+   */
+  validTo: string | number;
+
+  /**
+   * 部门状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource: string;
+
+  /**
+   * 显示顺序
+   */
+  orderNum: number;
+
+  /**
+   * 子对象
+   */
+  children: ComDeptVO[];
+}
+
+export interface ComDeptForm extends BaseEntity {
+  /**
+   * 部门ID
+   */
+  id?: string | number;
+
+  /**
+   * 部门编码
+   */
+  deptCode?: string;
+
+  /**
+   * 企业ID
+   */
+  companyId?: string | number;
+
+  /**
+   * 部门名称
+   */
+  deptName?: string;
+
+  /**
+   * 父部门ID
+   */
+  parentId?: string | number;
+
+  /**
+   * 祖级部门ID路径
+   */
+  ancestors?: string;
+
+  /**
+   * 部门类别
+   */
+  deptCategory?: string;
+
+  /**
+   * 部门层级深度
+   */
+  level?: number;
+
+  /**
+   * 负责人用户ID
+   */
+  leader?: number;
+
+  /**
+   * 联系电话
+   */
+  phone?: string;
+
+  /**
+   * 邮箱
+   */
+  email?: string;
+
+  /**
+   * 生效日期
+   */
+  validFrom?: string | number;
+
+  /**
+   * 失效日期
+   */
+  validTo?: string | number;
+
+  /**
+   * 部门状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 显示顺序
+   */
+  orderNum?: number;
+}
+
+export interface ComDeptQuery {
+  /**
+   * 部门编码
+   */
+  deptCode?: string;
+
+  /**
+   * 企业ID
+   */
+  companyId?: string | number;
+
+  /**
+   * 部门名称
+   */
+  deptName?: string;
+
+  /**
+   * 父部门ID
+   */
+  parentId?: string | number;
+
+  /**
+   * 祖级部门ID路径
+   */
+  ancestors?: string;
+
+  /**
+   * 部门类别
+   */
+  deptCategory?: string;
+
+  /**
+   * 部门层级深度
+   */
+  level?: number;
+
+  /**
+   * 负责人用户ID
+   */
+  leader?: number;
+
+  /**
+   * 联系电话
+   */
+  phone?: string;
+
+  /**
+   * 邮箱
+   */
+  email?: string;
+
+  /**
+   * 生效日期
+   */
+  validFrom?: string | number;
+
+  /**
+   * 失效日期
+   */
+  validTo?: string | number;
+
+  /**
+   * 部门状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 显示顺序
+   */
+  orderNum?: number;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 75 - 0
src/api/company/comPost/index.ts

@@ -0,0 +1,75 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { ComPostVO, ComPostForm, ComPostQuery } from '@/api/company/comPost/types';
+
+/**
+ * 查询岗位信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listComPost = (query?: ComPostQuery): AxiosPromise<ComPostVO[]> => {
+  return request({
+    url: '/system/comPost/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询岗位信息详细
+ * @param postId
+ */
+export const getComPost = (postId: string | number): AxiosPromise<ComPostVO> => {
+  return request({
+    url: '/system/comPost/' + postId,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增岗位信息
+ * @param data
+ */
+export const addComPost = (data: ComPostForm) => {
+  return request({
+    url: '/system/comPost',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改岗位信息
+ * @param data
+ */
+export const updateComPost = (data: ComPostForm) => {
+  return request({
+    url: '/system/comPost',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除岗位信息
+ * @param postId
+ */
+export const delComPost = (postId: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/comPost/' + postId,
+    method: 'delete'
+  });
+};
+
+export function changeStatus(id: string | number, status: string) {
+  const data = {
+    id,
+    status
+  };
+  return request({
+    url: '/system/comPost/changeStatus',
+    method: 'put',
+    data: data
+  });
+}

+ 95 - 0
src/api/company/comPost/types.ts

@@ -0,0 +1,95 @@
+export interface ComPostVO {
+  /**
+   * 岗位ID
+   */
+  postId: string | number;
+
+  /**
+   * 岗位编码
+   */
+  postCode: string;
+
+  /**
+   * 岗位名称
+   */
+  postName: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface ComPostForm extends BaseEntity {
+  /**
+   * 岗位ID
+   */
+  postId?: string | number;
+
+  /**
+   * 岗位编码
+   */
+  postCode?: string;
+
+  /**
+   * 岗位名称
+   */
+  postName?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface ComPostQuery extends PageQuery {
+  /**
+   * 岗位编码
+   */
+  postCode?: string;
+
+  /**
+   * 岗位名称
+   */
+  postName?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 75 - 0
src/api/company/comStaff/index.ts

@@ -0,0 +1,75 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { ComStaffVO, ComStaffForm, ComStaffQuery } from '@/api/company/comStaff/types';
+
+/**
+ * 查询人员信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listComStaff = (query?: ComStaffQuery): AxiosPromise<ComStaffVO[]> => {
+  return request({
+    url: '/system/comStaff/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询人员信息详细
+ * @param staffId
+ */
+export const getComStaff = (staffId: string | number): AxiosPromise<ComStaffVO> => {
+  return request({
+    url: '/system/comStaff/' + staffId,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增人员信息
+ * @param data
+ */
+export const addComStaff = (data: ComStaffForm) => {
+  return request({
+    url: '/system/comStaff',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改人员信息
+ * @param data
+ */
+export const updateComStaff = (data: ComStaffForm) => {
+  return request({
+    url: '/system/comStaff',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除人员信息
+ * @param staffId
+ */
+export const delComStaff = (staffId: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/comStaff/' + staffId,
+    method: 'delete'
+  });
+};
+
+export function changeStatus(id: string | number, status: string) {
+  const data = {
+    id,
+    status
+  };
+  return request({
+    url: '/system/comStaff/changeStatus',
+    method: 'put',
+    data: data
+  });
+}

+ 215 - 0
src/api/company/comStaff/types.ts

@@ -0,0 +1,215 @@
+export interface ComStaffVO {
+  /**
+   * 人员ID
+   */
+  staffId: string | number;
+
+  /**
+   * 人员编码
+   */
+  staffCode: string;
+
+  /**
+   * 姓名
+   */
+  staffName: string;
+
+  /**
+   * 所属部门编码
+   */
+  deptId: string | number;
+
+  /**
+   * 联系电话
+   */
+  phone: string;
+
+  /**
+   * 岗位编码
+   */
+  postId: string | number;
+
+  /**
+   * 性别
+   */
+  sex: string;
+
+  /**
+   * 角色编码
+   */
+  roleId: string | number;
+
+  /**
+   * 数据来源
+   */
+  dataSource: string;
+
+  /**
+   * 密码
+   */
+  password: string;
+
+  /**
+   * 有效期起始
+   */
+  validFrom: string | number;
+
+  /**
+   * 有效期截止
+   */
+  validTo: string | number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface ComStaffForm extends BaseEntity {
+  /**
+   * 人员ID
+   */
+  staffId?: string | number;
+
+  /**
+   * 人员编码
+   */
+  staffCode?: string;
+
+  /**
+   * 姓名
+   */
+  staffName?: string;
+
+  /**
+   * 所属部门编码
+   */
+  deptId?: string | number;
+
+  /**
+   * 联系电话
+   */
+  phone?: string;
+
+  /**
+   * 岗位编码
+   */
+  postId?: string | number;
+
+  /**
+   * 性别
+   */
+  sex?: string;
+
+  /**
+   * 角色编码
+   */
+  roleId?: string | number;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 密码
+   */
+  password?: string;
+
+  /**
+   * 有效期起始
+   */
+  validFrom?: string | number;
+
+  /**
+   * 有效期截止
+   */
+  validTo?: string | number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface ComStaffQuery extends PageQuery {
+  /**
+   * 人员编码
+   */
+  staffCode?: string;
+
+  /**
+   * 姓名
+   */
+  staffName?: string;
+
+  /**
+   * 所属部门编码
+   */
+  deptId?: string | number;
+
+  /**
+   * 联系电话
+   */
+  phone?: string;
+
+  /**
+   * 岗位编码
+   */
+  postId?: string | number;
+
+  /**
+   * 性别
+   */
+  sex?: string;
+
+  /**
+   * 角色编码
+   */
+  roleId?: string | number;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 密码
+   */
+  password?: string;
+
+  /**
+   * 有效期起始
+   */
+  validFrom?: string | number;
+
+  /**
+   * 有效期截止
+   */
+  validTo?: string | number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 75 - 0
src/api/company/company/index.ts

@@ -0,0 +1,75 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { CompanyVO, CompanyForm, CompanyQuery } from '@/api/company/company/types';
+
+/**
+ * 查询公司信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listCompany = (query?: CompanyQuery): AxiosPromise<CompanyVO[]> => {
+  return request({
+    url: '/system/company/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询公司信息详细
+ * @param id
+ */
+export const getCompany = (id: string | number): AxiosPromise<CompanyVO> => {
+  return request({
+    url: '/system/company/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增公司信息
+ * @param data
+ */
+export const addCompany = (data: CompanyForm) => {
+  return request({
+    url: '/system/company',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改公司信息
+ * @param data
+ */
+export const updateCompany = (data: CompanyForm) => {
+  return request({
+    url: '/system/company',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除公司信息
+ * @param id
+ */
+export const delCompany = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/company/' + id,
+    method: 'delete'
+  });
+};
+
+export function changeShowStatus(id: string | number, isShow: string) {
+  const data = {
+    id,
+    isShow
+  };
+  return request({
+    url: '/system/bank/changeStatus',
+    method: 'put',
+    data: data
+  });
+}

+ 410 - 0
src/api/company/company/types.ts

@@ -0,0 +1,410 @@
+export interface CompanyVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 会计主体ID
+   */
+  accBnId: string | number;
+
+  /**
+   * 会计主体编号
+   */
+  accBnNo: string;
+
+  /**
+   * 公司地址
+   */
+  address: string;
+
+  /**
+   * 经营开始日期
+   */
+  begData: string;
+
+  /**
+   * 经营范围
+   */
+  busScp: string;
+
+  /**
+   * 注册资本金额
+   */
+  capAmt: number;
+
+  /**
+   * 公司全名
+   */
+  companyFullName: string;
+
+  /**
+   * 法人代表
+   */
+  corporation: string;
+
+  /**
+   * 电子邮箱
+   */
+  email: string;
+
+  /**
+   * 经营结束日期
+   */
+  endData: string;
+
+  /**
+   * 成立日期
+   */
+  foundDa: string;
+
+  /**
+   * 内部客户ID
+   */
+  inCustId: string | number;
+
+  /**
+   * 内部供应商ID
+   */
+  inSupId: string | number;
+
+  /**
+   * 法律代表人
+   */
+  lelPer: string;
+
+  /**
+   * 联系电话
+   */
+  phone: string;
+
+  /**
+   * 负责人/经办人
+   */
+  principal: string;
+
+  /**
+   * 注册地址
+   */
+  regAddr: string;
+
+  /**
+   * 注册日期
+   */
+  regData: string;
+
+  /**
+   * 注册机关
+   */
+  regOrg: string;
+
+  /**
+   * 税务登记号
+   */
+  taxNo: string;
+
+  /**
+   * 公司编号
+   */
+  companyCode: string;
+
+  /**
+   * 公司名称
+   */
+  companyName: string;
+
+  /**
+   * 是否显示(0-是,1-否)
+   */
+  isShow: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface CompanyForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 会计主体ID
+   */
+  accBnId?: string | number;
+
+  /**
+   * 会计主体编号
+   */
+  accBnNo?: string;
+
+  /**
+   * 公司地址
+   */
+  address?: string;
+
+  /**
+   * 经营开始日期
+   */
+  begData?: string;
+
+  /**
+   * 经营范围
+   */
+  busScp?: string;
+
+  /**
+   * 注册资本金额
+   */
+  capAmt?: number;
+
+  /**
+   * 公司全名
+   */
+  companyFullName?: string;
+
+  /**
+   * 法人代表
+   */
+  corporation?: string;
+
+  /**
+   * 电子邮箱
+   */
+  email?: string;
+
+  /**
+   * 经营结束日期
+   */
+  endData?: string;
+
+  /**
+   * 成立日期
+   */
+  foundDa?: string;
+
+  /**
+   * 内部客户ID
+   */
+  inCustId?: string | number;
+
+  /**
+   * 内部供应商ID
+   */
+  inSupId?: string | number;
+
+  /**
+   * 法律代表人
+   */
+  lelPer?: string;
+
+  /**
+   * 联系电话
+   */
+  phone?: string;
+
+  /**
+   * 负责人/经办人
+   */
+  principal?: string;
+
+  /**
+   * 注册地址
+   */
+  regAddr?: string;
+
+  /**
+   * 注册日期
+   */
+  regData?: string;
+
+  /**
+   * 注册机关
+   */
+  regOrg?: string;
+
+  /**
+   * 税务登记号
+   */
+  taxNo?: string;
+
+  /**
+   * 公司编号
+   */
+  companyCode?: string;
+
+  /**
+   * 公司名称
+   */
+  companyName?: string;
+
+  /**
+   * 是否显示(0-是,1-否)
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface CompanyQuery extends PageQuery {
+  /**
+   * 会计主体ID
+   */
+  accBnId?: string | number;
+
+  /**
+   * 会计主体编号
+   */
+  accBnNo?: string;
+
+  /**
+   * 公司地址
+   */
+  address?: string;
+
+  /**
+   * 经营开始日期
+   */
+  begData?: string;
+
+  /**
+   * 经营范围
+   */
+  busScp?: string;
+
+  /**
+   * 注册资本金额
+   */
+  capAmt?: number;
+
+  /**
+   * 公司全名
+   */
+  companyFullName?: string;
+
+  /**
+   * 法人代表
+   */
+  corporation?: string;
+
+  /**
+   * 电子邮箱
+   */
+  email?: string;
+
+  /**
+   * 经营结束日期
+   */
+  endData?: string;
+
+  /**
+   * 成立日期
+   */
+  foundDa?: string;
+
+  /**
+   * 内部客户ID
+   */
+  inCustId?: string | number;
+
+  /**
+   * 内部供应商ID
+   */
+  inSupId?: string | number;
+
+  /**
+   * 法律代表人
+   */
+  lelPer?: string;
+
+  /**
+   * 联系电话
+   */
+  phone?: string;
+
+  /**
+   * 负责人/经办人
+   */
+  principal?: string;
+
+  /**
+   * 注册地址
+   */
+  regAddr?: string;
+
+  /**
+   * 注册日期
+   */
+  regData?: string;
+
+  /**
+   * 注册机关
+   */
+  regOrg?: string;
+
+  /**
+   * 税务登记号
+   */
+  taxNo?: string;
+
+  /**
+   * 公司编号
+   */
+  companyCode?: string;
+
+  /**
+   * 公司名称
+   */
+  companyName?: string;
+
+  /**
+   * 是否显示(0-是,1-否)
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 75 - 0
src/api/customer/creditLevel/index.ts

@@ -0,0 +1,75 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { CreditLevelVO, CreditLevelForm, CreditLevelQuery } from '@/api/customer/creditLevel/types';
+
+/**
+ * 查询信用等级配置列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listCreditLevel = (query?: CreditLevelQuery): AxiosPromise<CreditLevelVO[]> => {
+  return request({
+    url: '/system/creditLevel/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询信用等级配置详细
+ * @param id
+ */
+export const getCreditLevel = (id: string | number): AxiosPromise<CreditLevelVO> => {
+  return request({
+    url: '/system/creditLevel/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增信用等级配置
+ * @param data
+ */
+export const addCreditLevel = (data: CreditLevelForm) => {
+  return request({
+    url: '/system/creditLevel',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改信用等级配置
+ * @param data
+ */
+export const updateCreditLevel = (data: CreditLevelForm) => {
+  return request({
+    url: '/system/creditLevel',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除信用等级配置
+ * @param id
+ */
+export const delCreditLevel = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/creditLevel/' + id,
+    method: 'delete'
+  });
+};
+
+export function changeShowStatus(id: string | number, isShow: string) {
+  const data = {
+    id,
+    isShow
+  };
+  return request({
+    url: '/system/creditLevel/changeStatus',
+    method: 'put',
+    data: data
+  });
+}

+ 110 - 0
src/api/customer/creditLevel/types.ts

@@ -0,0 +1,110 @@
+export interface CreditLevelVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 信用等级编码
+   */
+  creditLevelNo: string;
+
+  /**
+   * 信用等级名称
+   */
+  creditLevelName: string;
+
+  /**
+   * 是否显示(0-显示,1-不显示)
+   */
+  isShow: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface CreditLevelForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 信用等级编码
+   */
+  creditLevelNo?: string;
+
+  /**
+   * 信用等级名称
+   */
+  creditLevelName?: string;
+
+  /**
+   * 是否显示(0-显示,1-不显示)
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface CreditLevelQuery extends PageQuery {
+  /**
+   * 信用等级编码
+   */
+  creditLevelNo?: string;
+
+  /**
+   * 信用等级名称
+   */
+  creditLevelName?: string;
+
+  /**
+   * 是否显示(0-显示,1-不显示)
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 4 - 0
src/api/customer/customerCategory/enterpriseScale/types.ts

@@ -4,6 +4,8 @@ export interface EnterpriseScaleVO {
    */
   id: string | number;
 
+  enterpriseScaleCode: string;
+
   /**
    * 企业规模名称
    */
@@ -31,6 +33,8 @@ export interface EnterpriseScaleForm extends BaseEntity {
    */
   id?: string | number;
 
+  enterpriseScaleCode?: string;
+
   /**
    * 企业规模名称
    */

+ 4 - 0
src/api/customer/customerCategory/industryCategory/types.ts

@@ -4,6 +4,8 @@ export interface IndustryCategoryVO {
    */
   id: string | number;
 
+  industryCode: string;
+
   /**
    * 所属行业
    */
@@ -31,6 +33,8 @@ export interface IndustryCategoryForm extends BaseEntity {
    */
   id?: string | number;
 
+  industryCode?: string;
+
   /**
    * 所属行业
    */

+ 75 - 0
src/api/customer/customerLevel/index.ts

@@ -0,0 +1,75 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { CustomerLevelVO, CustomerLevelForm, CustomerLevelQuery } from '@/api/customer/customerLevel/types';
+
+/**
+ * 查询客户等级配置列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listCustomerLevel = (query?: CustomerLevelQuery): AxiosPromise<CustomerLevelVO[]> => {
+  return request({
+    url: '/system/customerLevel/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询客户等级配置详细
+ * @param id
+ */
+export const getCustomerLevel = (id: string | number): AxiosPromise<CustomerLevelVO> => {
+  return request({
+    url: '/system/customerLevel/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增客户等级配置
+ * @param data
+ */
+export const addCustomerLevel = (data: CustomerLevelForm) => {
+  return request({
+    url: '/system/customerLevel',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改客户等级配置
+ * @param data
+ */
+export const updateCustomerLevel = (data: CustomerLevelForm) => {
+  return request({
+    url: '/system/customerLevel',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除客户等级配置
+ * @param id
+ */
+export const delCustomerLevel = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/customerLevel/' + id,
+    method: 'delete'
+  });
+};
+
+export function changeShowStatus(id: string | number, isShow: string) {
+  const data = {
+    id,
+    isShow
+  };
+  return request({
+    url: '/system/customerLevel/changeStatus',
+    method: 'put',
+    data: data
+  });
+}

+ 110 - 0
src/api/customer/customerLevel/types.ts

@@ -0,0 +1,110 @@
+export interface CustomerLevelVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 客户等级编码
+   */
+  levelCode: string;
+
+  /**
+   * 客户等级名称
+   */
+  levelName: string;
+
+  /**
+   * 是否显示(0-显示,1-不显示)
+   */
+  isShow: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface CustomerLevelForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 客户等级编码
+   */
+  levelCode?: string;
+
+  /**
+   * 客户等级名称
+   */
+  levelName?: string;
+
+  /**
+   * 是否显示(0-显示,1-不显示)
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface CustomerLevelQuery extends PageQuery {
+  /**
+   * 客户等级编码
+   */
+  levelCode?: string;
+
+  /**
+   * 客户等级名称
+   */
+  levelName?: string;
+
+  /**
+   * 是否显示(0-显示,1-不显示)
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 75 - 0
src/api/customer/customerType/index.ts

@@ -0,0 +1,75 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { CustomerTypeVO, CustomerTypeForm, CustomerTypeQuery } from '@/api/customer/customerType/types';
+
+/**
+ * 查询客户类型配置列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listCustomerType = (query?: CustomerTypeQuery): AxiosPromise<CustomerTypeVO[]> => {
+  return request({
+    url: '/system/customerType/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询客户类型配置详细
+ * @param id
+ */
+export const getCustomerType = (id: string | number): AxiosPromise<CustomerTypeVO> => {
+  return request({
+    url: '/system/customerType/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增客户类型配置
+ * @param data
+ */
+export const addCustomerType = (data: CustomerTypeForm) => {
+  return request({
+    url: '/system/customerType',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改客户类型配置
+ * @param data
+ */
+export const updateCustomerType = (data: CustomerTypeForm) => {
+  return request({
+    url: '/system/customerType',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除客户类型配置
+ * @param id
+ */
+export const delCustomerType = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/customerType/' + id,
+    method: 'delete'
+  });
+};
+
+export function changeShowStatus(id: string | number, isShow: string) {
+  const data = {
+    id,
+    isShow
+  };
+  return request({
+    url: '/system/customerType/changeStatus',
+    method: 'put',
+    data: data
+  });
+}

+ 110 - 0
src/api/customer/customerType/types.ts

@@ -0,0 +1,110 @@
+export interface CustomerTypeVO {
+  /**
+   * 主键ID(由应用层生成)
+   */
+  id: string | number;
+
+  /**
+   * 客户类型编码
+   */
+  typeCode: string;
+
+  /**
+   * 客户类型名称
+   */
+  typeName: string;
+
+  /**
+   * 是否显示(0-显示,1-不显示)
+   */
+  isShow: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface CustomerTypeForm extends BaseEntity {
+  /**
+   * 主键ID(由应用层生成)
+   */
+  id?: string | number;
+
+  /**
+   * 客户类型编码
+   */
+  typeCode?: string;
+
+  /**
+   * 客户类型名称
+   */
+  typeName?: string;
+
+  /**
+   * 是否显示(0-显示,1-不显示)
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface CustomerTypeQuery extends PageQuery {
+  /**
+   * 客户类型编码
+   */
+  typeCode?: string;
+
+  /**
+   * 客户类型名称
+   */
+  typeName?: string;
+
+  /**
+   * 是否显示(0-显示,1-不显示)
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 75 - 0
src/api/customer/settlementLevel/index.ts

@@ -0,0 +1,75 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { SettlementLevelVO, SettlementLevelForm, SettlementLevelQuery } from '@/api/customer/settlementLevel/types';
+
+/**
+ * 查询结算等级列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listSettlementLevel = (query?: SettlementLevelQuery): AxiosPromise<SettlementLevelVO[]> => {
+  return request({
+    url: '/system/settlementLevel/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询结算等级详细
+ * @param id
+ */
+export const getSettlementLevel = (id: string | number): AxiosPromise<SettlementLevelVO> => {
+  return request({
+    url: '/system/settlementLevel/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增结算等级
+ * @param data
+ */
+export const addSettlementLevel = (data: SettlementLevelForm) => {
+  return request({
+    url: '/system/settlementLevel',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改结算等级
+ * @param data
+ */
+export const updateSettlementLevel = (data: SettlementLevelForm) => {
+  return request({
+    url: '/system/settlementLevel',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除结算等级
+ * @param id
+ */
+export const delSettlementLevel = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/settlementLevel/' + id,
+    method: 'delete'
+  });
+};
+
+export function changeShowStatus(id: string | number, isShow: string) {
+  const data = {
+    id,
+    isShow
+  };
+  return request({
+    url: '/system/settlementLevel/changeStatus',
+    method: 'put',
+    data: data
+  });
+}

+ 95 - 0
src/api/customer/settlementLevel/types.ts

@@ -0,0 +1,95 @@
+export interface SettlementLevelVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 结算等级编码
+   */
+  settlementLevelId: string | number;
+
+  /**
+   * 结算等级名称
+   */
+  settlementLevelName: string;
+
+  /**
+   * 是否显示(0-显示,1-不显示)
+   */
+  isShow: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface SettlementLevelForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 结算等级编码
+   */
+  settlementLevelId?: string | number;
+
+  /**
+   * 结算等级名称
+   */
+  settlementLevelName?: string;
+
+  /**
+   * 是否显示(0-显示,1-不显示)
+   */
+  isShow?: string | number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface SettlementLevelQuery extends PageQuery {
+  /**
+   * 结算等级编码
+   */
+  settlementLevelId?: string | number;
+
+  /**
+   * 结算等级名称
+   */
+  settlementLevelName?: string;
+
+  /**
+   * 是否显示(0-显示,1-不显示)
+   */
+  isShow?: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 75 - 0
src/api/customer/settlementMethod/index.ts

@@ -0,0 +1,75 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { SettlementMethodVO, SettlementMethodForm, SettlementMethodQuery } from '@/api/customer/settlementMethod/types';
+
+/**
+ * 查询结算方式列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listSettlementMethod = (query?: SettlementMethodQuery): AxiosPromise<SettlementMethodVO[]> => {
+  return request({
+    url: '/system/settlementMethod/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询结算方式详细
+ * @param id
+ */
+export const getSettlementMethod = (id: string | number): AxiosPromise<SettlementMethodVO> => {
+  return request({
+    url: '/system/settlementMethod/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增结算方式
+ * @param data
+ */
+export const addSettlementMethod = (data: SettlementMethodForm) => {
+  return request({
+    url: '/system/settlementMethod',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改结算方式
+ * @param data
+ */
+export const updateSettlementMethod = (data: SettlementMethodForm) => {
+  return request({
+    url: '/system/settlementMethod',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除结算方式
+ * @param id
+ */
+export const delSettlementMethod = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/settlementMethod/' + id,
+    method: 'delete'
+  });
+};
+
+export function changeShowStatus(id: string | number, isShow: string) {
+  const data = {
+    id,
+    isShow
+  };
+  return request({
+    url: '/system/settlementMethod/changeStatus',
+    method: 'put',
+    data: data
+  });
+}

+ 95 - 0
src/api/customer/settlementMethod/types.ts

@@ -0,0 +1,95 @@
+export interface SettlementMethodVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 结算方式编码
+   */
+  settlementId: string | number;
+
+  /**
+   * 结算方式名称
+   */
+  settlementName: string;
+
+  /**
+   * 是否显示(0-是,1-否)
+   */
+  isShow: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface SettlementMethodForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 结算方式编码
+   */
+  settlementId?: string | number;
+
+  /**
+   * 结算方式名称
+   */
+  settlementName?: string;
+
+  /**
+   * 是否显示(0-是,1-否)
+   */
+  isShow?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface SettlementMethodQuery extends PageQuery {
+  /**
+   * 结算方式编码
+   */
+  settlementId?: string | number;
+
+  /**
+   * 结算方式名称
+   */
+  settlementName?: string;
+
+  /**
+   * 是否显示(0-是,1-否)
+   */
+  isShow?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 1 - 0
src/views/customer/customerCategory/industryCategory/index.vue

@@ -25,6 +25,7 @@
 
       <el-table v-loading="loading" border :data="industryCategoryList" @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="55" align="center" />
+        <el-table-column label="编号" align="center" prop="industryCode" />
         <el-table-column label="所属行业" align="center" prop="industryCategoryName" />
         <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
           <template #default="scope">

+ 125 - 24
src/views/customer/customerFile/customerInfo/add.vue

@@ -38,14 +38,24 @@
           <el-col :span="8">
             <el-form-item label="开票类型" prop="invoiceTypeId">
               <el-select v-model="form.invoiceTypeId" placeholder="请选择开票类型" class="w-full">
-                <el-option v-for="item in invoiceTypeList" :key="item.id" :label="item.invoiceTypeName" :value="item.id" />
+                <el-option
+                  v-for="item in invoiceTypeList"
+                  :key="item.id"
+                  :label="`${item.invoiceTypeNo} , ${item.invoiceTypeName}`"
+                  :value="item.id"
+                />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="企业规模" prop="enterpriseScaleId">
               <el-select v-model="form.enterpriseScaleId" placeholder="请选择企业规模" class="w-full" filterable>
-                <el-option v-for="item in enterpriseScaleList" :key="item.id" :label="item.enterpriseScaleName" :value="item.id" />
+                <el-option
+                  v-for="item in enterpriseScaleList"
+                  :key="item.id"
+                  :label="`${item.enterpriseScaleCode} , ${item.enterpriseScaleName}`"
+                  :value="item.id"
+                />
               </el-select>
             </el-form-item>
           </el-col>
@@ -54,22 +64,27 @@
         <el-row :gutter="20">
           <el-col :span="8">
             <el-form-item label="客户类别" prop="customerTypeId">
-              <el-select v-model="form.customerTypeId" placeholder="请选择客户类别" class="w-full">
-                <el-option v-for="dict in customer_type" :key="dict.value" :label="dict.label" :value="dict.value" />
+              <el-select v-model="form.customerTypeId" placeholder="请选择客户类别" class="w-full" filterable>
+                <el-option v-for="item in customerTypeList" :key="item.id" :label="`${item.typeCode} , ${item.typeName}`" :value="item.id" />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="行业类别" prop="industryCategoryId">
               <el-select v-model="form.industryCategoryId" placeholder="请选择行业类别" class="w-full" filterable>
-                <el-option v-for="item in industryCategoryList" :key="item.id" :label="item.industryCategoryName" :value="item.id" />
+                <el-option
+                  v-for="item in industryCategoryList"
+                  :key="item.id"
+                  :label="`${item.industryCode} , ${item.industryCategoryName}`"
+                  :value="item.id"
+                />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="客户等级" prop="customerLevelId">
-              <el-select v-model="form.customerLevelId" placeholder="请选择客户等级" class="w-full">
-                <el-option v-for="dict in customer_level" :key="dict.value" :label="dict.label" :value="dict.value" />
+              <el-select v-model="form.customerLevelId" placeholder="请选择客户等级" class="w-full" filterable>
+                <el-option v-for="item in customerLevelList" :key="item.id" :label="`${item.levelCode} , ${item.levelName}`" :value="item.id" />
               </el-select>
             </el-form-item>
           </el-col>
@@ -309,32 +324,26 @@
         <el-row :gutter="20">
           <el-col :span="8">
             <el-form-item label="业务人员" prop="salesPersonId">
-              <el-select v-model="salesForm.salesPersonId" placeholder="请选择业务人员" class="w-full" filterable>
-                <el-option label="张三" value="1" />
-                <el-option label="李四" value="2" />
-                <el-option label="王五" value="3" />
-                <el-option label="赵六" value="4" />
+              <el-select v-model="salesForm.salesPersonId" placeholder="请选择业务人员" class="w-full" filterable @change="handleSalesPersonChange">
+                <el-option v-for="item in comStaffList" :key="item.staffId" :label="`${item.staffCode} , ${item.staffName}`" :value="item.staffId" />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="客服人员" prop="serviceStaffId">
               <el-select v-model="salesForm.serviceStaffId" placeholder="请选择客服人员" class="w-full" filterable>
-                <el-option label="客服A" value="1" />
-                <el-option label="客服B" value="2" />
-                <el-option label="客服C" value="3" />
-                <el-option label="客服D" value="4" />
+                <el-option v-for="item in comStaffList" :key="item.staffId" :label="`${item.staffCode} , ${item.staffName}`" :value="item.staffId" />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="所属部门" prop="belongingDepartmentId">
               <el-select v-model="salesForm.belongingDepartmentId" placeholder="请选择所属部门" class="w-full" filterable disabled>
-                <el-option label="销售部" value="1" />
-                <el-option label="市场部" value="2" />
-                <el-option label="客服部" value="3" />
-                <el-option label="技术部" value="4" />
+                <el-option v-for="item in comDeptList" :key="item.id" :label="item.deptName" :value="String(item.id)" />
               </el-select>
+              <div v-if="salesForm.belongingDepartmentId && !comDeptList.length" style="color: #606266; font-size: 14px; margin-top: 4px">
+                {{ getDeptName(salesForm.belongingDepartmentId) }}
+              </div>
             </el-form-item>
           </el-col>
         </el-row>
@@ -379,6 +388,12 @@ import { listCustomerInfo, getCustomerInfo, addCustomerInfo } from '@/api/custom
 import { CustomerInfoForm } from '@/api/customer/customerFile/customerInfo/types';
 import { listInvoiceType } from '@/api/customer/invoiceType';
 import { InvoiceTypeVO, InvoiceTypeQuery } from '@/api/customer/invoiceType/types';
+import { listSettlementMethod } from '@/api/customer/settlementMethod';
+import { SettlementMethodVO, SettlementMethodQuery } from '@/api/customer/settlementMethod/types';
+import { listCustomerLevel } from '@/api/customer/customerLevel';
+import { CustomerLevelVO, CustomerLevelQuery } from '@/api/customer/customerLevel/types';
+import { listCustomerType } from '@/api/customer/customerType';
+import { CustomerTypeVO, CustomerTypeQuery } from '@/api/customer/customerType/types';
 import FileSelector from '@/components/FileSelector/index.vue';
 import { generateCustomerNumber } from '@/utils/customerNumber';
 import type { CustomerContactForm } from '@/api/customer/customerFile/customerContact/types';
@@ -392,8 +407,13 @@ import { listEnterpriseScale } from '@/api/customer/customerCategory/enterpriseS
 import { listIndustryCategory } from '@/api/customer/customerCategory/industryCategory';
 import type { EnterpriseScaleVO } from '@/api/customer/customerCategory/enterpriseScale/types';
 import type { IndustryCategoryVO } from '@/api/customer/customerCategory/industryCategory/types';
-import { listSysCompany } from '@/api/company/sysCompany';
-import type { SysCompanyVO } from '@/api/company/sysCompany/types';
+import { listComStaff, getComStaff } from '@/api/company/comStaff';
+import { ComStaffVO, ComStaffQuery, ComStaffForm } from '@/api/company/comStaff/types';
+import { listComDept, getComDept } from '@/api/company/comDept';
+import { ComDeptVO } from '@/api/company/comDept/types';
+
+import { listCompany } from '@/api/company/company';
+import { CompanyVO } from '@/api/company/company/types';
 import { Plus, Delete } from '@element-plus/icons-vue';
 
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -415,7 +435,12 @@ const codeArr = ref([]);
 const enterpriseScaleList = ref<EnterpriseScaleVO[]>([]);
 const industryCategoryList = ref<IndustryCategoryVO[]>([]);
 const invoiceTypeList = ref<InvoiceTypeVO[]>([]);
-const companyList = ref<SysCompanyVO[]>([]);
+const companyList = ref<CompanyVO[]>([]);
+const settlementMethodList = ref<SettlementMethodVO[]>([]);
+const customerLevelList = ref<CustomerLevelVO[]>([]);
+const customerTypeList = ref<CustomerTypeVO[]>([]);
+const comStaffList = ref<ComStaffVO[]>([]);
+const comDeptList = ref<ComDeptVO[]>([]);
 
 // Logo选择器相关
 const logoSelectorVisible = ref(false);
@@ -478,6 +503,11 @@ onMounted(async () => {
   await loadIndustryCategoryList();
   await loadInvoiceTypeList();
   await loadCompanyList();
+  await loadSettlementMethodList();
+  await loadCustomerLevelList();
+  await loadCustomerTypeList();
+  await loadComStaffList();
+  await loadComDeptList();
 
   // 判断是新增还是编辑
   const id = route.query.id;
@@ -565,13 +595,67 @@ const loadInvoiceTypeList = async () => {
 // 加载公司列表
 const loadCompanyList = async () => {
   try {
-    const res = await listSysCompany();
+    const query: any = { isShow: '0' };
+    const res = await listCompany(query);
     companyList.value = res.rows || [];
   } catch (error) {
     console.error('加载公司列表失败:', error);
   }
 };
 
+// 加载结算方式列表
+const loadSettlementMethodList = async () => {
+  try {
+    const query: any = { isShow: '0' };
+    const res = await listSettlementMethod(query);
+    settlementMethodList.value = res.rows || [];
+  } catch (error) {
+    console.error('加载结算方式列表失败:', error);
+  }
+};
+
+// 加载客户等级列表
+const loadCustomerLevelList = async () => {
+  try {
+    const res = await listCustomerLevel();
+    customerLevelList.value = res.rows || [];
+  } catch (error) {
+    console.error('加载客户等级列表失败:', error);
+  }
+};
+
+// 加载客户类别列表
+const loadCustomerTypeList = async () => {
+  try {
+    const res = await listCustomerType();
+    customerTypeList.value = res.rows || [];
+  } catch (error) {
+    console.error('加载客户类别列表失败:', error);
+  }
+};
+
+// 加载员工列表
+const loadComStaffList = async () => {
+  try {
+    const query: ComStaffQuery = { status: '0' };
+    const res = await listComStaff(query);
+    comStaffList.value = res.rows || [];
+  } catch (error) {
+    console.error('加载员工列表失败:', error);
+  }
+};
+
+// 加载部门列表
+const loadComDeptList = async () => {
+  try {
+    const res = await listComDept();
+    // 处理可能的不同返回结构
+    comDeptList.value = res.rows || res.data || [];
+  } catch (error) {
+    console.error('加载部门列表失败:', error);
+  }
+};
+
 // 企业基本信息表单
 const form = reactive<CustomerInfoForm>({
   customerNo: '',
@@ -695,6 +779,23 @@ const handleChange = (val: string[]) => {
   // 将省市区名称用斜杠连接
   form.provincialCityCounty = names.join('/');
 };
+
+// 处理业务人员选择变化
+const handleSalesPersonChange = (staffId: any) => {
+  // 根据选中的业务人员ID,找到对应的部门ID
+  const selectedStaff = comStaffList.value.find((staff) => staff.staffId === staffId);
+  if (selectedStaff) {
+    // 确保 deptId 的类型一致
+    salesForm.belongingDepartmentId = String(selectedStaff.deptId);
+  }
+};
+
+// 获取部门名称
+const getDeptName = (deptId: any) => {
+  const dept = comDeptList.value.find(d => String(d.id) === String(deptId));
+  return dept ? dept.deptName : deptId;
+};
+
 // 编辑联系人
 const handleEditContact = (row: CustomerContactForm, index: number) => {
   currentContact.value = { ...row };

+ 43 - 72
src/views/customer/customerFile/customerInfo/index.vue

@@ -27,26 +27,17 @@
             </el-form-item>
             <el-form-item label="业务员" prop="salesPersonId">
               <el-select v-model="queryParams.salesPersonId" placeholder="请选择业务员" clearable filterable style="width: 200px">
-                <el-option label="张三" value="1" />
-                <el-option label="李四" value="2" />
-                <el-option label="王五" value="3" />
-                <el-option label="赵六" value="4" />
+                <el-option v-for="item in comStaffList" :key="item.staffId" :label="`${item.staffCode} , ${item.staffName}`" :value="item.staffId" />
               </el-select>
             </el-form-item>
             <el-form-item label="客服人员" prop="serviceStaffId">
               <el-select v-model="queryParams.serviceStaffId" placeholder="请选择客服人员" clearable filterable style="width: 200px">
-                <el-option label="客服A" value="1" />
-                <el-option label="客服B" value="2" />
-                <el-option label="客服C" value="3" />
-                <el-option label="客服D" value="4" />
+                <el-option v-for="item in comStaffList" :key="item.staffId" :label="`${item.staffCode} , ${item.staffName}`" :value="item.staffId" />
               </el-select>
             </el-form-item>
             <el-form-item label="归属部门" prop="belongingDepartmentId">
               <el-select v-model="queryParams.belongingDepartmentId" placeholder="请选择归属部门" clearable filterable style="width: 200px">
-                <el-option label="销售部" value="1" />
-                <el-option label="市场部" value="2" />
-                <el-option label="客服部" value="3" />
-                <el-option label="技术部" value="4" />
+                <el-option v-for="item in comDeptList" :key="item.id" :label="item.deptName" :value="item.id" />
               </el-select>
             </el-form-item>
             <el-form-item label="客户标签" prop="customerTag">
@@ -96,30 +87,29 @@
       <el-table v-loading="loading" border :data="customerInfoList" @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="55" align="center" />
         <el-table-column label="客户名称" align="center" prop="customerName" min-width="200" show-overflow-tooltip />
-        <el-table-column label="归属公司" align="center" prop="belongCompanyId" min-width="150">
-          <template #default="scope">
-            <span>{{ getCompanyName(scope.row.belongCompanyId) }}</span>
-          </template>
-        </el-table-column>
+        <el-table-column label="归属公司" align="center" prop="companyName" min-width="150" />
         <el-table-column label="客户编号" align="center" prop="customerNo" min-width="120" />
         <el-table-column label="行业" align="center" prop="industryCategory" min-width="120"> </el-table-column>
-        <el-table-column label="业务员" align="center" prop="salesPersonId" min-width="100">
+        <el-table-column label="业务员" align="center" min-width="100">
           <template #default="scope">
-            <span>{{ getSalesPersonName(scope.row.customerSalesInfoVo?.salesPersonId) }}</span>
+            <span>{{ scope.row.customerSalesInfoVo?.salesPerson }}</span>
           </template>
         </el-table-column>
-
-        <el-table-column label="客服人员" align="center" prop="serviceStaffId" min-width="100">
+        <el-table-column label="客服人员" align="center" min-width="100">
           <template #default="scope">
-            <span>{{ getServiceStaffName(scope.row.customerSalesInfoVo?.serviceStaffId) }}</span>
+            <span>{{ scope.row.customerSalesInfoVo?.serviceStaff }}</span>
           </template>
         </el-table-column>
         <el-table-column label="归属部门" align="center" prop="belongingDepartmentId" min-width="120">
           <template #default="scope">
-            <span>{{ getDepartmentName(scope.row.customerSalesInfoVo?.belongingDepartmentId) }}</span>
+            <span>{{ scope.row.customerSalesInfoVo?.belongingDepartment }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="信用额" align="center" prop="creditAmount" min-width="80">
+          <template #default="scope">
+            <span>{{ scope.row.customerSalesInfoVo?.creditAmount }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="信用额" align="center" prop="creditAmount" min-width="80"> </el-table-column>
         <el-table-column label="状态" align="center" prop="status" min-width="80">
           <template #default="scope">
             <dict-tag :options="sys_check_status" :value="scope.row.status" />
@@ -204,6 +194,10 @@ import { listIndustryCategory } from '@/api/customer/customerCategory/industryCa
 import { IndustryCategoryVO } from '@/api/customer/customerCategory/industryCategory/types';
 import { listSysCompany } from '@/api/company/sysCompany';
 import type { SysCompanyVO } from '@/api/company/sysCompany/types';
+import { listComStaff, getComStaff } from '@/api/company/comStaff';
+import { ComStaffVO, ComStaffQuery, ComStaffForm } from '@/api/company/comStaff/types';
+import { listComDept, getComDept } from '@/api/company/comDept';
+import { ComDeptVO } from '@/api/company/comDept/types';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 const { sys_check_status, customer_type, customer_level } = toRefs<any>(proxy?.useDict('sys_check_status', 'customer_type', 'customer_level'));
 const router = useRouter();
@@ -211,6 +205,8 @@ const customerInfoList = ref<CustomerInfoVO[]>([]);
 const customerTagList = ref<CustomerTagVO[]>([]);
 const industryCategoryList = ref<IndustryCategoryVO[]>([]);
 const companyList = ref<SysCompanyVO[]>([]);
+const comStaffList = ref<ComStaffVO[]>([]);
+const comDeptList = ref<ComDeptVO[]>([]);
 const buttonLoading = ref(false);
 const loading = ref(true);
 const showSearch = ref(true);
@@ -344,54 +340,6 @@ const data = reactive<PageData<CustomerInfoForm, CustomerInfoQuery>>({
 
 const { queryParams, form, rules } = toRefs(data);
 
-// 格式化方法
-const getCompanyName = (id: string | number | undefined) => {
-  const map: Record<string, string> = { '1': '公司A', '2': '公司B', '3': '公司C' };
-  return map[String(id)] || '-';
-};
-
-const getCustomerLevelName = (id: string | number | undefined) => {
-  const map: Record<string, string> = { '1': 'A级', '2': 'B级', '3': 'C级', '4': 'D级' };
-  return map[String(id)] || '-';
-};
-
-const getIndustryName = (id: string | number | undefined) => {
-  const map: Record<string, string> = {
-    '1': '制造业',
-    '2': '服务业',
-    '3': '贸易',
-    '4': '科技',
-    '5': '金融',
-    '6': '其他'
-  };
-  return map[String(id)] || '-';
-
-  // 加载公司列表
-  const loadCompanyList = async () => {
-    try {
-      const res = await listSysCompany();
-      companyList.value = res.rows || [];
-    } catch (error) {
-      console.error('加载公司列表失败:', error);
-    }
-  };
-};
-
-const getSalesPersonName = (id: string | number | undefined) => {
-  const map: Record<string, string> = { '1': '张三', '2': '李四', '3': '王五', '4': '赵六' };
-  return map[String(id)] || '-';
-};
-
-const getServiceStaffName = (id: string | number | undefined) => {
-  const map: Record<string, string> = { '1': '客服A', '2': '客服B', '3': '客服C', '4': '客服D' };
-  return map[String(id)] || '-';
-};
-
-const getDepartmentName = (id: string | number | undefined) => {
-  const map: Record<string, string> = { '1': '销售部', '2': '市场部', '3': '客服部', '4': '技术部' };
-  return map[String(id)] || '-';
-};
-
 /** 查询客户信息列表 */
 const getList = async () => {
   loading.value = true;
@@ -595,10 +543,33 @@ const loadCompanyList = async () => {
   }
 };
 
+/** 加载员工列表 */
+const loadComStaffList = async () => {
+  try {
+    const query: ComStaffQuery = { status: '0' };
+    const res = await listComStaff(query);
+    comStaffList.value = res.rows || [];
+  } catch (error) {
+    console.error('加载员工列表失败:', error);
+  }
+};
+
+/** 加载部门列表 */
+const loadComDeptList = async () => {
+  try {
+    const res = await listComDept();
+    comDeptList.value = res.rows || res.data || [];
+  } catch (error) {
+    console.error('加载部门列表失败:', error);
+  }
+};
+
 onMounted(() => {
   getList();
   loadCustomerTags();
   loadIndustryCategories();
   loadCompanyList();
+  loadComStaffList();
+  loadComDeptList();
 });
 </script>

+ 145 - 31
src/views/customer/customerFile/customerInfo/overview/baseInfo.vue

@@ -40,14 +40,24 @@
           <el-col :span="8">
             <el-form-item label="开票类型" prop="invoiceTypeId">
               <el-select v-model="form.invoiceTypeId" placeholder="请选择开票类型" class="w-full">
-                <el-option v-for="item in invoiceTypeList" :key="item.id" :label="item.invoiceTypeName" :value="item.id" />
+                <el-option
+                  v-for="item in invoiceTypeList"
+                  :key="item.id"
+                  :label="`${item.invoiceTypeNo} , ${item.invoiceTypeName}`"
+                  :value="item.id"
+                />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="企业规模" prop="enterpriseScaleId">
               <el-select v-model="form.enterpriseScaleId" placeholder="请选择企业规模" class="w-full" filterable>
-                <el-option v-for="item in enterpriseScaleList" :key="item.id" :label="item.enterpriseScaleName" :value="item.id" />
+                <el-option
+                  v-for="item in enterpriseScaleList"
+                  :key="item.id"
+                  :label="`${item.enterpriseScaleCode} , ${item.enterpriseScaleName}`"
+                  :value="item.id"
+                />
               </el-select>
             </el-form-item>
           </el-col>
@@ -56,22 +66,27 @@
         <el-row :gutter="20">
           <el-col :span="8">
             <el-form-item label="客户类别" prop="customerTypeId">
-              <el-select v-model="form.customerTypeId" placeholder="请选择客户类别" class="w-full">
-                <el-option v-for="dict in customer_type" :key="dict.value" :label="dict.label" :value="dict.value" />
+              <el-select v-model="form.customerTypeId" placeholder="请选择客户类别" class="w-full" filterable>
+                <el-option v-for="item in customerTypeList" :key="item.id" :label="`${item.typeCode} , ${item.typeName}`" :value="item.id" />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="行业类别" prop="industryCategoryId">
               <el-select v-model="form.industryCategoryId" placeholder="请选择行业类别" class="w-full" filterable>
-                <el-option v-for="item in industryCategoryList" :key="item.id" :label="item.industryCategoryName" :value="item.id" />
+                <el-option
+                  v-for="item in industryCategoryList"
+                  :key="item.id"
+                  :label="`${item.industryCode} , ${item.industryCategoryName}`"
+                  :value="item.id"
+                />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="客户等级" prop="customerLevelId">
-              <el-select v-model="form.customerLevelId" placeholder="请选择客户等级" class="w-full">
-                <el-option v-for="dict in customer_level" :key="dict.value" :label="dict.label" :value="dict.value" />
+              <el-select v-model="form.customerLevelId" placeholder="请选择客户等级" class="w-full" filterable>
+                <el-option v-for="item in customerLevelList" :key="item.id" :label="`${item.levelCode} , ${item.levelName}`" :value="item.id" />
               </el-select>
             </el-form-item>
           </el-col>
@@ -282,32 +297,26 @@
         <el-row :gutter="20">
           <el-col :span="8">
             <el-form-item label="业务人员" prop="salesPersonId">
-              <el-select v-model="salesForm.salesPersonId" placeholder="请选择业务人员" class="w-full" filterable>
-                <el-option label="张三" value="1" />
-                <el-option label="李四" value="2" />
-                <el-option label="王五" value="3" />
-                <el-option label="赵六" value="4" />
+              <el-select v-model="salesForm.salesPersonId" placeholder="请选择业务人员" class="w-full" filterable @change="handleSalesPersonChange">
+                <el-option v-for="item in comStaffList" :key="item.staffId" :label="`${item.staffCode} , ${item.staffName}`" :value="item.staffId" />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="客服人员" prop="serviceStaffId">
               <el-select v-model="salesForm.serviceStaffId" placeholder="请选择客服人员" class="w-full" filterable>
-                <el-option label="客服A" value="1" />
-                <el-option label="客服B" value="2" />
-                <el-option label="客服C" value="3" />
-                <el-option label="客服D" value="4" />
+                <el-option v-for="item in comStaffList" :key="item.staffId" :label="`${item.staffCode} , ${item.staffName}`" :value="item.staffId" />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="所属部门" prop="belongingDepartmentId">
               <el-select v-model="salesForm.belongingDepartmentId" placeholder="请选择所属部门" class="w-full" filterable disabled>
-                <el-option label="销售部" value="1" />
-                <el-option label="市场部" value="2" />
-                <el-option label="客服部" value="3" />
-                <el-option label="技术部" value="4" />
+                <el-option v-for="item in comDeptList" :key="item.id" :label="item.deptName" :value="String(item.id)" />
               </el-select>
+              <div v-if="salesForm.belongingDepartmentId && !comDeptList.length" style="color: #606266; font-size: 14px; margin-top: 4px">
+                {{ getDeptName(salesForm.belongingDepartmentId) }}
+              </div>
             </el-form-item>
           </el-col>
         </el-row>
@@ -315,11 +324,13 @@
         <el-row :gutter="20">
           <el-col :span="8">
             <el-form-item label="信用等级" prop="creditManagement">
-              <el-select v-model="salesForm.creditManagement" placeholder="请选择信用等级" class="w-full">
-                <el-option label="A级" value="A" />
-                <el-option label="B级" value="B" />
-                <el-option label="C级" value="C" />
-                <el-option label="D级" value="D" />
+              <el-select v-model="salesForm.creditManagement" placeholder="请选择信用等级" class="w-full" filterable>
+                <el-option
+                  v-for="item in creditLevelList"
+                  :key="item.id"
+                  :label="`${item.creditLevelNo} , ${item.creditLevelName}`"
+                  :value="item.id"
+                />
               </el-select>
             </el-form-item>
           </el-col>
@@ -357,7 +368,9 @@
           </el-col>
           <el-col :span="8">
             <el-form-item label="收款条件" prop="accountPeriod">
-              <el-input v-model="salesForm.accountPeriod" placeholder="请输入收款条件" />
+              <el-select v-model="salesForm.accountPeriod" placeholder="请选择收款条件" class="w-full" filterable>
+                <el-option v-for="item in settlementMethodList" :key="item.id" :label="item.settlementName" :value="item.id" />
+              </el-select>
             </el-form-item>
           </el-col>
         </el-row>
@@ -365,7 +378,9 @@
         <el-row :gutter="20">
           <el-col :span="8">
             <el-form-item label="结算方式" prop="payDays">
-              <el-select v-model="salesForm.creditManagement" placeholder="请选择结算方式" class="w-full"> </el-select>
+              <el-select v-model="salesForm.payDays" placeholder="请选择结算方式" class="w-full" filterable>
+                <el-option v-for="item in settlementMethodList" :key="item.id" :label="item.settlementName" :value="item.id" />
+              </el-select>
             </el-form-item>
           </el-col>
         </el-row>
@@ -419,6 +434,14 @@ import type { CustomerInfoForm } from '@/api/customer/customerFile/customerInfo/
 import type { BusinessInfoForm } from '@/api/customer/customerFile/businessInfo/types';
 import type { SalesInfoForm } from '@/api/customer/customerFile/salesInfo/types';
 import type { InvoiceInfoForm } from '@/api/customer/customerFile/invoiceInfo/types';
+import { listSettlementMethod } from '@/api/customer/settlementMethod';
+import { SettlementMethodVO, SettlementMethodQuery, SettlementMethodForm } from '@/api/customer/settlementMethod/types';
+import { listCustomerLevel, getCustomerLevel } from '@/api/customer/customerLevel';
+import { CustomerLevelVO, CustomerLevelQuery, CustomerLevelForm } from '@/api/customer/customerLevel/types';
+import { listCustomerType, getCustomerType } from '@/api/customer/customerType';
+import { CustomerTypeVO, CustomerTypeQuery, CustomerTypeForm } from '@/api/customer/customerType/types';
+import { listCreditLevel } from '@/api/customer/creditLevel';
+import { CreditLevelVO, CreditLevelQuery } from '@/api/customer/creditLevel/types';
 import AddInvoiceDialog from '../components/addInvoiceDialog.vue';
 import { regionData } from 'element-china-area-data';
 import { listEnterpriseScale } from '@/api/customer/customerCategory/enterpriseScale';
@@ -427,8 +450,12 @@ import { listInvoiceType } from '@/api/customer/invoiceType';
 import type { EnterpriseScaleVO } from '@/api/customer/customerCategory/enterpriseScale/types';
 import type { IndustryCategoryVO } from '@/api/customer/customerCategory/industryCategory/types';
 import type { InvoiceTypeVO } from '@/api/customer/invoiceType/types';
-import { listSysCompany } from '@/api/company/sysCompany';
-import type { SysCompanyVO } from '@/api/company/sysCompany/types';
+import { listCompany } from '@/api/company/company';
+import { CompanyVO } from '@/api/company/company/types';
+import { listComStaff } from '@/api/company/comStaff';
+import { ComStaffVO, ComStaffQuery } from '@/api/company/comStaff/types';
+import { listComDept } from '@/api/company/comDept';
+import { ComDeptVO } from '@/api/company/comDept/types';
 import FileSelector from '@/components/FileSelector/index.vue';
 import { Plus, Delete } from '@element-plus/icons-vue';
 
@@ -453,7 +480,13 @@ const codeArr = ref([]);
 const enterpriseScaleList = ref<EnterpriseScaleVO[]>([]);
 const industryCategoryList = ref<IndustryCategoryVO[]>([]);
 const invoiceTypeList = ref<InvoiceTypeVO[]>([]);
-const companyList = ref<SysCompanyVO[]>([]);
+const companyList = ref<CompanyVO[]>([]);
+const settlementMethodList = ref<SettlementMethodVO[]>([]);
+const creditLevelList = ref<CreditLevelVO[]>([]);
+const customerLevelList = ref<CustomerLevelVO[]>([]);
+const customerTypeList = ref<CustomerTypeVO[]>([]);
+const comStaffList = ref<ComStaffVO[]>([]);
+const comDeptList = ref<ComDeptVO[]>([]);
 
 // 企业基本信息(用于显示)
 const customerInfo = reactive<any>({
@@ -574,6 +607,12 @@ onMounted(async () => {
   await loadIndustryCategoryList();
   await loadInvoiceTypeList();
   await loadCompanyList();
+  await loadSettlementMethodList();
+  await loadCreditLevelList();
+  await loadCustomerLevelList();
+  await loadCustomerTypeList();
+  await loadComStaffList();
+  await loadComDeptList();
 
   // 优先使用props传递的customerId,否则从路由获取
   const id = props.customerId || route.query.id;
@@ -627,13 +666,78 @@ const loadInvoiceTypeList = async () => {
 // 加载公司列表
 const loadCompanyList = async () => {
   try {
-    const res = await listSysCompany();
+    const query: any = { isShow: '0' };
+    const res = await listCompany();
     companyList.value = res.rows || [];
   } catch (error) {
     console.error('加载公司列表失败:', error);
   }
 };
 
+// 加载结算方式列表
+const loadSettlementMethodList = async () => {
+  try {
+    const query: any = { isShow: '0' };
+    const res = await listSettlementMethod(query);
+    settlementMethodList.value = res.rows || [];
+  } catch (error) {
+    console.error('加载结算方式列表失败:', error);
+  }
+};
+
+// 加载信用等级列表
+const loadCreditLevelList = async () => {
+  try {
+    const query: CreditLevelQuery = { isShow: '0' };
+    const res = await listCreditLevel(query);
+    creditLevelList.value = res.rows || [];
+  } catch (error) {
+    console.error('加载信用等级列表失败:', error);
+  }
+};
+
+// 加载客户等级列表
+const loadCustomerLevelList = async () => {
+  try {
+    const res = await listCustomerLevel();
+    customerLevelList.value = res.rows || [];
+  } catch (error) {
+    console.error('加载客户等级列表失败:', error);
+  }
+};
+
+// 加载客户类别列表
+const loadCustomerTypeList = async () => {
+  try {
+    const res = await listCustomerType();
+    customerTypeList.value = res.rows || [];
+  } catch (error) {
+    console.error('加载客户类别列表失败:', error);
+  }
+};
+
+// 加载员工列表
+const loadComStaffList = async () => {
+  try {
+    const query: ComStaffQuery = { status: '0' };
+    const res = await listComStaff(query);
+    comStaffList.value = res.rows || [];
+  } catch (error) {
+    console.error('加载员工列表失败:', error);
+  }
+};
+
+// 加载部门列表
+const loadComDeptList = async () => {
+  try {
+    const res = await listComDept();
+    // 处理可能的不同返回结构
+    comDeptList.value = res.rows || res.data || [];
+  } catch (error) {
+    console.error('加载部门列表失败:', error);
+  }
+};
+
 // 加载客户数据
 const loadCustomerData = async (id: string) => {
   try {
@@ -768,6 +872,16 @@ const handleChange = (val: string[]) => {
   form.provincialCityCounty = names.join('/');
 };
 
+// 处理业务人员选择变化
+const handleSalesPersonChange = (staffId: any) => {
+  // 根据选中的业务人员ID,找到对应的部门ID
+  const selectedStaff = comStaffList.value.find((staff) => staff.staffId === staffId);
+  if (selectedStaff) {
+    // 确保 deptId 的类型一致
+    salesForm.belongingDepartmentId = String(selectedStaff.deptId);
+  }
+};
+
 // 打开添加开票信息对话框
 const handleAddInvoice = () => {
   currentInvoice.value = undefined;

+ 23 - 10
src/views/customer/maintainInfo/dialog/allotTechnicalAdviser.vue

@@ -3,7 +3,7 @@
     <el-form ref="formRef" :model="form" :rules="rules" label-width="100px">
       <el-form-item label="技术顾问" prop="technicalAdviserId">
         <el-select v-model="form.technicalAdviserId" placeholder="请选择" clearable filterable class="w-full">
-          <el-option v-for="item in technicalAdviserList" :key="item.value" :label="item.label" :value="item.value" />
+          <el-option v-for="item in comStaffList" :key="item.staffId" :label="item.staffName" :value="item.staffId" />
         </el-select>
       </el-form-item>
 
@@ -22,6 +22,8 @@
 </template>
 
 <script setup lang="ts">
+import { listComStaff } from '@/api/company/comStaff';
+import { ComStaffVO, ComStaffQuery } from '@/api/company/comStaff/types';
 interface TechnicalAdviserForm {
   technicalAdviserId?: string | number;
   technicalAdviser?: string;
@@ -58,13 +60,24 @@ const form = reactive<TechnicalAdviserForm>({
   contactPhone: ''
 });
 
-// 技术顾问列表(模拟数据,实际应从接口获取)
-const technicalAdviserList = ref([
-  { label: '技术顾问A', value: '1' },
-  { label: '技术顾问B', value: '2' },
-  { label: '技术顾问C', value: '3' },
-  { label: '技术顾问D', value: '4' }
-]);
+// 技术顾问列表
+const comStaffList = ref<ComStaffVO[]>([]);
+
+// 初始化
+onMounted(async () => {
+  await loadComStaffList();
+});
+
+// 加载员工列表
+const loadComStaffList = async () => {
+  try {
+    const query: any = { status: '0' };
+    const res = await listComStaff(query);
+    comStaffList.value = res.rows || [];
+  } catch (error) {
+    console.error('加载员工列表失败:', error);
+  }
+};
 
 const rules = {
   technicalAdviserId: [{ required: true, message: '请选择技术顾问', trigger: 'change' }],
@@ -88,8 +101,8 @@ watch(
 // 获取技术顾问名称
 const getTechnicalAdviserName = (id: string | number | undefined) => {
   if (!id) return '';
-  const adviser = technicalAdviserList.value.find((item) => item.value === id);
-  return adviser ? adviser.label : '';
+  const adviser = comStaffList.value.find((item) => item.staffId === id);
+  return adviser ? ` ${adviser.staffName}` : '';
 };
 
 // 确认

+ 0 - 3
src/views/customer/maintenanceType/index.vue

@@ -7,9 +7,6 @@
             <el-form-item label="类型名称" prop="typeName">
               <el-input v-model="queryParams.typeName" placeholder="请输入类型名称" clearable @keyup.enter="handleQuery" />
             </el-form-item>
-            <el-form-item label="平台标识" prop="platformCode">
-              <el-input v-model="queryParams.platformCode" placeholder="请输入平台标识" clearable @keyup.enter="handleQuery" />
-            </el-form-item>
             <el-form-item>
               <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
               <el-button icon="Refresh" @click="resetQuery">重置</el-button>