Przeglądaj źródła

修改客户信息中 销售信息更改erp数据部分

hurx 1 tydzień temu
rodzic
commit
969f0df375

+ 63 - 0
src/api/company/taxrate/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { TaxrateVO, TaxrateForm, TaxrateQuery } from '@/api/company/taxrate/types';
+
+/**
+ * 查询产品税率配置列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listTaxrate = (query?: TaxrateQuery): AxiosPromise<TaxrateVO[]> => {
+  return request({
+    url: '/system/taxrate/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询产品税率配置详细
+ * @param id
+ */
+export const getTaxrate = (id: string | number): AxiosPromise<TaxrateVO> => {
+  return request({
+    url: '/system/taxrate/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增产品税率配置
+ * @param data
+ */
+export const addTaxrate = (data: TaxrateForm) => {
+  return request({
+    url: '/system/taxrate',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改产品税率配置
+ * @param data
+ */
+export const updateTaxrate = (data: TaxrateForm) => {
+  return request({
+    url: '/system/taxrate',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除产品税率配置
+ * @param id
+ */
+export const delTaxrate = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/taxrate/' + id,
+    method: 'delete'
+  });
+};

+ 110 - 0
src/api/company/taxrate/types.ts

@@ -0,0 +1,110 @@
+export interface TaxrateVO {
+  /**
+   * 主键,自增ID
+   */
+  id: string | number;
+
+  /**
+   * 税率编号
+   */
+  taxrateNo: string;
+
+  /**
+   * 税率名称
+   */
+  taxrateName: string;
+
+  /**
+   * 税率值)
+   */
+  taxrate: number;
+
+  /**
+   * 数据来源
+   */
+  dataSource: string;
+
+  /**
+   * 是否显示:1=是,0=否
+   */
+  isShow: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface TaxrateForm extends BaseEntity {
+  /**
+   * 主键,自增ID
+   */
+  id?: string | number;
+
+  /**
+   * 税率编号
+   */
+  taxrateNo?: string;
+
+  /**
+   * 税率名称
+   */
+  taxrateName?: string;
+
+  /**
+   * 税率值)
+   */
+  taxrate?: number;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 是否显示:1=是,0=否
+   */
+  isShow?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface TaxrateQuery extends PageQuery {
+  /**
+   * 税率编号
+   */
+  taxrateNo?: string;
+
+  /**
+   * 税率名称
+   */
+  taxrateName?: string;
+
+  /**
+   * 税率值)
+   */
+  taxrate?: number;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 是否显示:1=是,0=否
+   */
+  isShow?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 15 - 0
src/api/customer/customerFile/salesInfo/types.ts

@@ -92,6 +92,13 @@ export interface SalesInfoVO {
    * 备注
    */
   remark: string;
+  customerSource: string;
+  unitPrice: string;
+  sellChannel: string;
+  creditLimit: string;
+  creditTimeLimit: string;
+  dealCurrencyId: string | number;
+  rateId: string | number;
 }
 
 export interface SalesInfoForm extends BaseEntity {
@@ -184,6 +191,14 @@ export interface SalesInfoForm extends BaseEntity {
    * 备注
    */
   remark?: string;
+
+  customerSource?: string;
+  unitPrice?: string;
+  sellChannel?: string;
+  creditLimit?: string;
+  creditTimeLimit?: string;
+  dealCurrencyId?: string | number;
+  rateId?: string | number;
 }
 
 export interface SalesInfoQuery extends PageQuery {

+ 63 - 0
src/api/erpData/erpCompany/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { ErpCompanyVO, ErpCompanyForm, ErpCompanyQuery } from '@/api/erpData/erpCompany/types';
+
+/**
+ * 查询erp公司信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listErpCompany = (query?: ErpCompanyQuery): AxiosPromise<ErpCompanyVO[]> => {
+  return request({
+    url: '/system/erpCompany/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询erp公司信息详细
+ * @param id
+ */
+export const getErpCompany = (id: string | number): AxiosPromise<ErpCompanyVO> => {
+  return request({
+    url: '/system/erpCompany/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增erp公司信息
+ * @param data
+ */
+export const addErpCompany = (data: ErpCompanyForm) => {
+  return request({
+    url: '/system/erpCompany',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改erp公司信息
+ * @param data
+ */
+export const updateErpCompany = (data: ErpCompanyForm) => {
+  return request({
+    url: '/system/erpCompany',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除erp公司信息
+ * @param id
+ */
+export const delErpCompany = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/erpCompany/' + id,
+    method: 'delete'
+  });
+};

+ 410 - 0
src/api/erpData/erpCompany/types.ts

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

+ 63 - 0
src/api/erpData/erpDept/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { ErpDeptVO, ErpDeptForm, ErpDeptQuery } from '@/api/erpData/erpDept/types';
+
+/**
+ * 查询erp部门列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listErpDept = (query?: ErpDeptQuery): AxiosPromise<ErpDeptVO[]> => {
+  return request({
+    url: '/system/erpDept/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询erp部门详细
+ * @param deptId
+ */
+export const getErpDept = (deptId: string | number): AxiosPromise<ErpDeptVO> => {
+  return request({
+    url: '/system/erpDept/' + deptId,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增erp部门
+ * @param data
+ */
+export const addErpDept = (data: ErpDeptForm) => {
+  return request({
+    url: '/system/erpDept',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改erp部门
+ * @param data
+ */
+export const updateErpDept = (data: ErpDeptForm) => {
+  return request({
+    url: '/system/erpDept',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除erp部门
+ * @param deptId
+ */
+export const delErpDept = (deptId: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/erpDept/' + deptId,
+    method: 'delete'
+  });
+};

+ 295 - 0
src/api/erpData/erpDept/types.ts

@@ -0,0 +1,295 @@
+export interface ErpDeptVO {
+  /**
+   * 部门id
+   */
+  deptId: string | number;
+
+  /**
+   * 部门编号
+   */
+  deptNo: string;
+
+  /**
+   * 父部门id
+   */
+  parentId: string | number;
+
+  /**
+   * 公司id
+   */
+  companyId: string | number;
+
+  /**
+   * 祖级列表
+   */
+  ancestors: string;
+
+  /**
+   * 部门名称
+   */
+  deptName: string;
+
+  /**
+   * 部门类别编码
+   */
+  deptCategory: string;
+
+  /**
+   * 显示顺序
+   */
+  orderNum: number;
+
+  /**
+   * 负责人
+   */
+  leader: number;
+
+  /**
+   * 联系电话
+   */
+  phone: string;
+
+  /**
+   * 邮箱
+   */
+  email: string;
+
+  /**
+   * 部门状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 是否是公司(0是  1否)
+   */
+  isCompanyFlag: string;
+
+  /**
+   * 部门经理id
+   */
+  managerId: string | number;
+
+  /**
+   * 部门主管id
+   */
+  chargeId: string | number;
+
+  /**
+   * 部门经理编号
+   */
+  managerNo: string;
+
+  /**
+   * 部门主管编号
+   */
+  chargeNo: string;
+
+  /**
+   * 部门经理
+   */
+  managerName: string;
+
+  /**
+   * 部门主管
+   */
+  chargeName: string;
+}
+
+export interface ErpDeptForm extends BaseEntity {
+  /**
+   * 部门id
+   */
+  deptId?: string | number;
+
+  /**
+   * 部门编号
+   */
+  deptNo?: string;
+
+  /**
+   * 父部门id
+   */
+  parentId?: string | number;
+
+  /**
+   * 公司id
+   */
+  companyId?: string | number;
+
+  /**
+   * 祖级列表
+   */
+  ancestors?: string;
+
+  /**
+   * 部门名称
+   */
+  deptName?: string;
+
+  /**
+   * 部门类别编码
+   */
+  deptCategory?: string;
+
+  /**
+   * 显示顺序
+   */
+  orderNum?: number;
+
+  /**
+   * 负责人
+   */
+  leader?: number;
+
+  /**
+   * 联系电话
+   */
+  phone?: string;
+
+  /**
+   * 邮箱
+   */
+  email?: string;
+
+  /**
+   * 部门状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 是否是公司(0是  1否)
+   */
+  isCompanyFlag?: string;
+
+  /**
+   * 部门经理id
+   */
+  managerId?: string | number;
+
+  /**
+   * 部门主管id
+   */
+  chargeId?: string | number;
+
+  /**
+   * 部门经理编号
+   */
+  managerNo?: string;
+
+  /**
+   * 部门主管编号
+   */
+  chargeNo?: string;
+
+  /**
+   * 部门经理
+   */
+  managerName?: string;
+
+  /**
+   * 部门主管
+   */
+  chargeName?: string;
+}
+
+export interface ErpDeptQuery extends PageQuery {
+  /**
+   * 部门编号
+   */
+  deptNo?: string;
+
+  /**
+   * 父部门id
+   */
+  parentId?: string | number;
+
+  /**
+   * 公司id
+   */
+  companyId?: string | number;
+
+  /**
+   * 祖级列表
+   */
+  ancestors?: string;
+
+  /**
+   * 部门名称
+   */
+  deptName?: string;
+
+  /**
+   * 部门类别编码
+   */
+  deptCategory?: string;
+
+  /**
+   * 显示顺序
+   */
+  orderNum?: number;
+
+  /**
+   * 负责人
+   */
+  leader?: number;
+
+  /**
+   * 联系电话
+   */
+  phone?: string;
+
+  /**
+   * 邮箱
+   */
+  email?: string;
+
+  /**
+   * 部门状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 是否是公司(0是  1否)
+   */
+  isCompanyFlag?: string;
+
+  /**
+   * 部门经理id
+   */
+  managerId?: string | number;
+
+  /**
+   * 部门主管id
+   */
+  chargeId?: string | number;
+
+  /**
+   * 部门经理编号
+   */
+  managerNo?: string;
+
+  /**
+   * 部门主管编号
+   */
+  chargeNo?: string;
+
+  /**
+   * 部门经理
+   */
+  managerName?: string;
+
+  /**
+   * 部门主管
+   */
+  chargeName?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 63 - 0
src/api/erpData/erpStaff/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { ErpStaffVO, ErpStaffForm, ErpStaffQuery } from '@/api/erpData/erpStaff/types';
+
+/**
+ * 查询erp人员信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listErpStaff = (query?: ErpStaffQuery): AxiosPromise<ErpStaffVO[]> => {
+  return request({
+    url: '/system/erpStaff/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询erp人员信息详细
+ * @param staffId
+ */
+export const getErpStaff = (staffId: string | number): AxiosPromise<ErpStaffVO> => {
+  return request({
+    url: '/system/erpStaff/' + staffId,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增erp人员信息
+ * @param data
+ */
+export const addErpStaff = (data: ErpStaffForm) => {
+  return request({
+    url: '/system/erpStaff',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改erp人员信息
+ * @param data
+ */
+export const updateErpStaff = (data: ErpStaffForm) => {
+  return request({
+    url: '/system/erpStaff',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除erp人员信息
+ * @param staffId
+ */
+export const delErpStaff = (staffId: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/erpStaff/' + staffId,
+    method: 'delete'
+  });
+};

+ 215 - 0
src/api/erpData/erpStaff/types.ts

@@ -0,0 +1,215 @@
+export interface ErpStaffVO {
+  /**
+   * 人员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 ErpStaffForm 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 ErpStaffQuery 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;
+}

+ 9 - 5
src/views/customer/customerFile/customerInfo/add.vue

@@ -405,8 +405,12 @@ import type { EnterpriseScaleVO } from '@/api/customer/customerCategory/enterpri
 import type { IndustryCategoryVO } from '@/api/customer/customerCategory/industryCategory/types';
 import { listComStaff, getComStaff } from '@/api/company/comStaff';
 import { ComStaffVO, ComStaffQuery, ComStaffForm } from '@/api/company/comStaff/types';
+import { listErpStaff } from '@/api/erpData/erpStaff';
+import { ErpStaffVO } from '@/api/erpData/erpStaff/types';
 import { listDept, getDept, listDeptExcludeChild } from '@/api/system/dept';
 import { DeptVO } from '@/api/system/dept/types';
+import { listErpDept, getErpDept } from '@/api/erpData/erpDept';
+import { ErpDeptVO } from '@/api/erpData/erpDept/types';
 
 import { listCompany } from '@/api/company/company';
 import { CompanyVO } from '@/api/company/company/types';
@@ -436,8 +440,8 @@ const companyList = ref<CompanyVO[]>([]);
 const settlementMethodList = ref<SettlementMethodVO[]>([]);
 const customerLevelList = ref<CustomerLevelVO[]>([]);
 const customerTypeList = ref<CustomerTypeVO[]>([]);
-const comStaffList = ref<ComStaffVO[]>([]);
-const comDeptList = ref<DeptVO[]>([]);
+const comStaffList = ref<ErpStaffVO[]>([]);
+const comDeptList = ref<ErpDeptVO[]>([]);
 
 // 企业基本信息表单
 const form = reactive<CustomerInfoForm>({
@@ -766,7 +770,7 @@ const loadCustomerTypeList = async () => {
 const loadComStaffList = async () => {
   try {
     const query: any = { status: '0' };
-    const res = await listComStaff(query);
+    const res = await listErpStaff(query);
     comStaffList.value = res.rows || [];
   } catch (error) {
     console.error('加载员工列表失败:', error);
@@ -776,7 +780,7 @@ const loadComStaffList = async () => {
 // 加载部门列表
 const loadComDeptList = async () => {
   try {
-    const res = await listDept();
+    const res = await listErpDept();
     // 处理可能的不同返回结构
     comDeptList.value = res.rows || res.data || [];
   } catch (error) {
@@ -855,7 +859,7 @@ watch(
 
     // 如果列表中没有,从API获取
     try {
-      const res = await getDept(newDeptId);
+      const res = await getErpDept(newDeptId);
       if (res.data) {
         deptName.value = res.data.deptName;
         comDeptList.value.push(res.data);

+ 9 - 6
src/views/customer/customerFile/customerInfo/index.vue

@@ -74,7 +74,7 @@
               <el-col :span="6">
                 <el-form-item label="归属部门" prop="belongingDepartmentId" style="width: 100%; margin-right: 0">
                   <el-select v-model="queryParams.belongingDepartmentId" placeholder="请选择归属部门" clearable filterable style="width: 100%">
-                    <el-option v-for="item in comDeptList" :key="item.id" :label="item.deptName" :value="item.id" />
+                    <el-option v-for="item in comDeptList" :key="item.deptId" :label="item.deptName" :value="item.deptId" />
                   </el-select>
                 </el-form-item>
               </el-col>
@@ -323,6 +323,10 @@ 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 { listErpStaff } from '@/api/erpData/erpStaff';
+import { ErpStaffVO } from '@/api/erpData/erpStaff/types';
+import { listErpDept, getErpDept } from '@/api/erpData/erpDept';
+import { ErpDeptVO } from '@/api/erpData/erpDept/types';
 import { WarningFilled } from '@element-plus/icons-vue';
 const router = useRouter();
 const customerInfoList = ref<CustomerInfoVO[]>([]);
@@ -330,8 +334,8 @@ const customerTagList = ref<CustomerTagVO[]>([]);
 const customerLevelList = ref<CustomerLevelVO[]>([]);
 const industryCategoryList = ref<IndustryCategoryVO[]>([]);
 const companyList = ref<CompanyVO[]>([]);
-const comStaffList = ref<ComStaffVO[]>([]);
-const comDeptList = ref<ComDeptVO[]>([]);
+const comStaffList = ref<ErpStaffVO[]>([]);
+const comDeptList = ref<ErpDeptVO[]>([]);
 const buttonLoading = ref(false);
 const loading = ref(true);
 const transferConfirmLoading = ref(false);
@@ -831,8 +835,7 @@ const loadCompanyList = async () => {
 const loadComStaffList = async () => {
   try {
     const query: ComStaffQuery = { status: '0' } as any;
-    const res = await listComStaff(query);
-    console.log(res);
+    const res = await listErpStaff(query);
 
     comStaffList.value = res.rows || [];
   } catch (error) {
@@ -843,7 +846,7 @@ const loadComStaffList = async () => {
 /** 加载部门列表 */
 const loadComDeptList = async () => {
   try {
-    const res = await listComDept();
+    const res = await listErpDept();
     comDeptList.value = res.rows || res.data || [];
   } catch (error) {
     console.error('加载部门列表失败:', error);

+ 146 - 41
src/views/customer/customerFile/customerInfo/overview/baseInfo.vue

@@ -288,12 +288,37 @@
         </el-row>
       </el-form>
     </el-card>
+    <!-- 公司开票信息 -->
+    <el-card shadow="never" class="mb-4">
+      <template #header>
+        <div class="flex justify-between items-center">
+          <span class="font-medium">企业开票信息</span>
+          <el-button type="primary" @click="handleAddInvoice">新增</el-button>
+        </div>
+      </template>
+      <el-table :data="invoiceList" border>
+        <el-table-column type="index" label="序号" align="center" width="60" />
+        <el-table-column label="是否主账号" align="center" prop="isPrimaryAccount" min-width="120">
+          <template #default="{ row }">
+            <span>{{ row.isPrimaryAccount === '0' ? '是' : '否' }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="开户行名称" align="center" prop="bankName" min-width="180" />
+        <el-table-column label="银行账户" align="center" prop="bankAccount" min-width="180" />
+        <el-table-column label="操作" align="center" width="150" fixed="right">
+          <template #default="{ row, $index }">
+            <el-button link type="primary" @click="handleEditInvoice(row, $index)">编辑</el-button>
+            <el-button link type="danger" @click="removeInvoice(row)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-card>
 
-    <!-- 销售信息 -->
+    <!-- 销售信息 --改为 ERP数据-->
     <el-card shadow="never" class="mb-4">
       <template #header>
         <div class="flex justify-between items-center">
-          <span class="font-medium">销售信息</span>
+          <span class="font-medium">ERP销售信息</span>
           <el-button type="primary" @click="handleSave">保存</el-button>
         </div>
       </template>
@@ -365,13 +390,13 @@
               <el-input v-model="salesForm.creditPaymentPassword" type="password" placeholder="请输入支付密码" show-password />
             </el-form-item>
           </el-col>
-          <el-col :span="8">
+          <!-- <el-col :span="8">
             <el-form-item label="收款条件" prop="accountPeriod">
               <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-col> -->
         </el-row>
 
         <el-row :gutter="20">
@@ -382,36 +407,68 @@
               </el-select>
             </el-form-item>
           </el-col>
+          <el-col :span="8">
+            <el-form-item label="客户来源" prop="payDays">
+              <el-select v-model="salesForm.customerSource" class="w-full" filterable>
+                <el-option v-for="dict in customer_source" :key="dict.value" :label="dict.label" :value="dict.value" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="销售通路" prop="payDays">
+              <el-select v-model="salesForm.sellChannel" class="w-full" filterable>
+                <el-option v-for="dict in sell_channel" :key="dict.value" :label="dict.label" :value="dict.value" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="8">
+            <el-form-item label="税码" prop="rateId">
+              <el-select v-model="salesForm.rateId" placeholder="税码" class="w-full" filterable>
+                <el-option v-for="item in taxrateList" :key="item.id" :label="item.taxrateNo" :value="item.id" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="交易币别" prop="dealCurrencyId">
+              <el-select v-model="salesForm.dealCurrencyId" placeholder="请选择交易币别" class="w-full" filterable>
+                <el-option v-for="item in currencyList" :key="item.id" :label="item.currencyName" :value="item.id" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="账款归属" prop="payDays">
+              <el-input v-model="form.customerNo" disabled />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="8">
+            <el-form-item label="单价含税" prop="payDays">
+              <el-select v-model="salesForm.unitPrice" placeholder="单价含税" class="w-full" filterable>
+                <el-option v-for="item in unitPriceArr" :key="item.value" :label="item.label" :value="item.value" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="账款额度超限" prop="creditLimit">
+              <el-select v-model="salesForm.creditLimit" placeholder="请选择账款额度超限" class="w-full" filterable>
+                <el-option v-for="dict in erp_is_enabled" :key="dict.value" :label="dict.label" :value="dict.value" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="账款超期" prop="creditTimeLimit">
+              <el-select v-model="salesForm.creditTimeLimit" placeholder="请选择账款超期" class="w-full" filterable>
+                <el-option v-for="dict in erp_is_enabled" :key="dict.value" :label="dict.label" :value="dict.value" />
+              </el-select>
+            </el-form-item>
+          </el-col>
         </el-row>
       </el-form>
     </el-card>
 
-    <!-- 公司开票信息 -->
-    <el-card shadow="never" class="mb-4">
-      <template #header>
-        <div class="flex justify-between items-center">
-          <span class="font-medium">企业开票信息</span>
-          <el-button type="primary" @click="handleAddInvoice">新增</el-button>
-        </div>
-      </template>
-      <el-table :data="invoiceList" border>
-        <el-table-column type="index" label="序号" align="center" width="60" />
-        <el-table-column label="是否主账号" align="center" prop="isPrimaryAccount" min-width="120">
-          <template #default="{ row }">
-            <span>{{ row.isPrimaryAccount === '0' ? '是' : '否' }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="开户行名称" align="center" prop="bankName" min-width="180" />
-        <el-table-column label="银行账户" align="center" prop="bankAccount" min-width="180" />
-        <el-table-column label="操作" align="center" width="150" fixed="right">
-          <template #default="{ row, $index }">
-            <el-button link type="primary" @click="handleEditInvoice(row, $index)">编辑</el-button>
-            <el-button link type="danger" @click="removeInvoice(row)">删除</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </el-card>
-
     <!-- 添加/编辑开票信息对话框 -->
     <add-invoice-dialog v-model="invoiceDialogVisible" :edit-data="currentInvoice" @confirm="handleInvoiceConfirm" />
 
@@ -454,14 +511,22 @@ import type { InvoiceTypeVO } from '@/api/customer/invoiceType/types';
 import { listCompany } from '@/api/company/company';
 import { CompanyVO } from '@/api/company/company/types';
 import { listComStaff } from '@/api/company/comStaff';
+import { listErpStaff } from '@/api/erpData/erpStaff';
 import { ComStaffVO, ComStaffQuery } from '@/api/company/comStaff/types';
+import { ErpStaffVO } from '@/api/erpData/erpStaff/types';
 import { listDept, getDept } from '@/api/system/dept';
 import { DeptVO } from '@/api/system/dept/types';
+import { listErpDept, getErpDept } from '@/api/erpData/erpDept';
+import { ErpDeptVO } from '@/api/erpData/erpDept/types';
 import FileSelector from '@/components/FileSelector/index.vue';
 import { Plus, Delete } from '@element-plus/icons-vue';
-
+import { listComCurrency } from '@/api/company/comCurrency';
+import { listTaxrate } from '@/api/company/taxrate';
+import { ComCurrencyVO } from '@/api/company/comCurrency/types';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
-const { order_check_way, customer_type, customer_level } = toRefs<any>(proxy?.useDict('order_check_way', 'customer_type', 'customer_level'));
+const { order_check_way, customer_type, customer_level, customer_source, sell_channel, erp_is_enabled } = toRefs<any>(
+  proxy?.useDict('order_check_way', 'customer_type', 'customer_level', 'customer_source', 'sell_channel', 'erp_is_enabled')
+);
 // 接收父组件传递的props
 const props = defineProps<{
   customerId?: string | number;
@@ -470,6 +535,10 @@ const props = defineProps<{
 
 const route = useRoute();
 const router = useRouter();
+const unitPriceArr = ref([
+  { label: '含税', value: 'True' },
+  { label: '不含税', value: 'False' }
+]);
 
 const formRef = ref<any>(null);
 const salesFormRef = ref<any>(null);
@@ -487,9 +556,10 @@ const settlementMethodList = ref<SettlementMethodVO[]>([]);
 const creditLevelList = ref<CreditLevelVO[]>([]);
 const customerLevelList = ref<CustomerLevelVO[]>([]);
 const customerTypeList = ref<CustomerTypeVO[]>([]);
-const comStaffList = ref<ComStaffVO[]>([]);
-const comDeptList = ref<DeptVO[]>([]);
-
+const comStaffList = ref<ErpStaffVO[]>([]);
+const comDeptList = ref<ErpDeptVO[]>([]);
+const currencyList = ref<ComCurrencyVO[]>([]);
+const taxrateList = ref<any[]>([]);
 // 企业基本信息(用于显示)
 const customerInfo = reactive<any>({
   customerNo: '',
@@ -570,6 +640,12 @@ const salesForm = reactive<SalesInfoForm>({
   creditPaymentPassword: '',
   accountPeriod: '',
   payDays: undefined,
+  customerSource: '1',
+  unitPrice: 'True',
+  sellChannel: '1',
+  creditLimit: '1',
+  creditTimeLimit: '1',
+  dealCurrencyId: undefined,
   status: '0'
 });
 
@@ -617,6 +693,33 @@ const salesRules = {
   serviceStaffId: [{ required: true, message: '请选择客服人员', trigger: 'change' }]
 };
 
+// 加载币种列表
+const loadCurrencyList = async () => {
+  try {
+    const res = await listComCurrency({
+      isShow: '0',
+      pageNum: 1,
+      pageSize: 1000
+    });
+    currencyList.value = res.rows || [];
+  } catch (error) {
+    console.error('加载币种列表失败:', error);
+    currencyList.value = [];
+  }
+};
+
+// 加载税码列表
+const loadTaxrateList = async () => {
+  try {
+    const res = await listTaxrate({
+      isShow: '0',
+      pageNum: 1,
+      pageSize: 1000
+    });
+    taxrateList.value = res.rows || [];
+  } catch (error) {}
+};
+
 // 初始化
 onMounted(async () => {
   // 加载下拉框数据
@@ -630,6 +733,8 @@ onMounted(async () => {
   await loadCustomerTypeList();
   await loadComStaffList();
   await loadComDeptList();
+  await loadCurrencyList();
+  await loadTaxrateList();
 
   // 优先使用props传递的customerId,否则从路由获取
   const id = props.customerId || route.query.id;
@@ -773,8 +878,8 @@ const loadCustomerTypeList = async () => {
 // 加载员工列表
 const loadComStaffList = async () => {
   try {
-    const query: any = { status: '0' };
-    const res = await listComStaff(query);
+    const query: any = {};
+    const res = await listErpStaff(query);
     comStaffList.value = res.rows || [];
   } catch (error) {
     console.error('加载员工列表失败:', error);
@@ -784,7 +889,7 @@ const loadComStaffList = async () => {
 // 加载部门列表
 const loadComDeptList = async () => {
   try {
-    const res = await listDept();
+    const res = await listErpDept();
     // 处理可能的不同返回结构
     comDeptList.value = res.rows || res.data || [];
   } catch (error) {
@@ -842,7 +947,7 @@ const loadCustomerData = async (id: any) => {
         const deptExists = comDeptList.value.find((d) => String(d.deptId) === String(salesForm.belongingDepartmentId));
         if (!deptExists) {
           try {
-            const deptRes = await getDept(salesForm.belongingDepartmentId);
+            const deptRes = await getErpDept(salesForm.belongingDepartmentId);
             if (deptRes.data) {
               comDeptList.value.push(deptRes.data);
             }
@@ -914,7 +1019,7 @@ watch(
       const res = await getDept(newDeptId);
       if (res.data) {
         deptName.value = res.data.deptName;
-        comDeptList.value.push(res.data);
+        comDeptList.value.push(res.data as any);
       }
     } catch (error) {
       console.error('获取部门信息失败:', error);
@@ -972,7 +1077,7 @@ const handleSalesPersonChange = async (staffId: any) => {
       try {
         const res = await getDept(selectedStaff.deptId);
         if (res.data) {
-          comDeptList.value.push(res.data);
+          comDeptList.value.push(res.data as any);
         }
       } catch (error) {
         console.error('获取部门信息失败:', error);