فهرست منبع

供应商信息中新增 erp供应商信息

hurx 1 هفته پیش
والد
کامیت
a10ef09866

+ 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;
+}

+ 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;
+}

+ 63 - 0
src/api/supplier/erpSupplierInfo/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { ErpSupplierInfoVO, ErpSupplierInfoForm, ErpSupplierInfoQuery } from '@/api/supplier/erpSupplierInfo/types';
+
+/**
+ * 查询erp供应商信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listErpSupplierInfo = (query?: ErpSupplierInfoQuery): AxiosPromise<ErpSupplierInfoVO[]> => {
+  return request({
+    url: '/customer/erpSupplierInfo/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询erp供应商信息详细
+ * @param id
+ */
+export const getErpSupplierInfo = (id: string | number): AxiosPromise<ErpSupplierInfoVO> => {
+  return request({
+    url: '/customer/erpSupplierInfo/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增erp供应商信息
+ * @param data
+ */
+export const addErpSupplierInfo = (data: ErpSupplierInfoForm) => {
+  return request({
+    url: '/customer/erpSupplierInfo',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改erp供应商信息
+ * @param data
+ */
+export const updateErpSupplierInfo = (data: ErpSupplierInfoForm) => {
+  return request({
+    url: '/customer/erpSupplierInfo',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除erp供应商信息
+ * @param id
+ */
+export const delErpSupplierInfo = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/erpSupplierInfo/' + id,
+    method: 'delete'
+  });
+};

+ 204 - 0
src/api/supplier/erpSupplierInfo/types.ts

@@ -0,0 +1,204 @@
+export interface ErpSupplierInfoVO {
+  /**
+   * ID
+   */
+  id: string | number;
+
+  /**
+   * 关联供应商ID
+   */
+  supplierId: string | number;
+
+  /**
+   * 采购人员id
+   */
+  purchaseId: string | number;
+
+  /**
+   * 所属部门
+   */
+  belongingDepartmentId: string | number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+  /**
+   * 单价含税
+   */
+  unitPrice: string;
+
+  /**
+   * 交易币别
+   */
+  dealCurrencyId: string | number;
+
+  /**
+   * 账款归属
+   */
+  accountBelong: string;
+
+  /**
+   * 税码id
+   */
+  rateId: string | number;
+
+  /**
+   * 采购开票类型id
+   */
+  purchaseInvoiceId: string | number;
+
+  /**
+   * 采购开票类型编号
+   */
+  purchaseInvoiceNo: string;
+
+  /**
+   * 采购开票类型
+   */
+  purchaseInvoice: string;
+
+  settlementMethod: string;
+}
+
+export interface ErpSupplierInfoForm extends BaseEntity {
+  /**
+   * ID
+   */
+  id?: string | number;
+
+  /**
+   * 关联供应商ID
+   */
+  supplierId?: string | number;
+
+  /**
+   * 采购人员id
+   */
+  purchaseId?: string | number;
+
+  /**
+   * 所属部门
+   */
+  belongingDepartmentId?: string | number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+  /**
+   * 单价含税
+   */
+  unitPrice?: string;
+
+  /**
+   * 交易币别
+   */
+  dealCurrencyId?: string | number;
+
+  /**
+   * 账款归属
+   */
+  accountBelong?: string;
+
+  /**
+   * 税码id
+   */
+  rateId?: string | number;
+
+  /**
+   * 采购开票类型id
+   */
+  purchaseInvoiceId?: string | number;
+
+  /**
+   * 采购开票类型编号
+   */
+  purchaseInvoiceNo?: string;
+
+  /**
+   * 采购开票类型
+   */
+  purchaseInvoice?: string;
+
+  settlementMethod?: string;
+}
+
+export interface ErpSupplierInfoQuery extends PageQuery {
+  /**
+   * 关联供应商ID
+   */
+  supplierId?: string | number;
+
+  /**
+   * 采购人员id
+   */
+  purchaseId?: string | number;
+
+  /**
+   * 所属部门
+   */
+  belongingDepartmentId?: string | number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 单价含税
+   */
+  unitPrice?: string;
+
+  /**
+   * 交易币别
+   */
+  dealCurrencyId?: string | number;
+
+  /**
+   * 账款归属
+   */
+  accountBelong?: string;
+
+  /**
+   * 税码id
+   */
+  rateId?: string | number;
+
+  /**
+   * 采购开票类型id
+   */
+  purchaseInvoiceId?: string | number;
+
+  /**
+   * 采购开票类型编号
+   */
+  purchaseInvoiceNo?: string;
+
+  /**
+   * 采购开票类型
+   */
+  purchaseInvoice?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 0 - 1
src/api/supplier/info/index.ts

@@ -74,7 +74,6 @@ export const delInfo = (id: string | number | Array<string | number>) => {
   });
 };
 
-
 /**
  * 获取供应商类型列表
  */

+ 259 - 28
src/views/customer/info/components/BasicInfoTab.vue

@@ -5,29 +5,29 @@
         <div class="section-title-left">
           <span class="section-title-text">企业基本信息</span>
           <span class="section-title-divider">/</span>
-          <span class="supplier-no">供应商编码:{{ detailData.supplierNo }}</span>
+          <span class="supplier-no">供应商编码:{{ localDetailData.supplierNo }}</span>
         </div>
         <el-button v-if="!isViewMode" type="primary" icon="Document" @click="onSaveClick">保存</el-button>
       </div>
 
-      <el-form :model="detailData" label-width="120px" class="detail-form">
+      <el-form :model="localDetailData" label-width="120px" class="detail-form">
         <el-row :gutter="12" class="form-row">
           <el-col :span="8">
             <el-form-item label="所属公司:" required>
-              <el-select v-model="detailData.ownedCompany" placeholder="请选择" clearable filterable style="width: 100%" :disabled="isViewMode">
+              <el-select v-model="localDetailData.ownedCompany" placeholder="请选择" clearable filterable style="width: 100%" :disabled="isViewMode">
                 <el-option v-for="company in companyOptions" :key="company.id" :label="company.companyName" :value="company.id" />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="企业名称:" required>
-              <el-input v-model="detailData.enterpriseName" placeholder="请输入企业名称" :disabled="isViewMode" />
+            <el-form-item label="供应商名称:" required>
+              <el-input v-model="localDetailData.enterpriseName" placeholder="请输入企业名称" :disabled="isViewMode" />
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="工商名称:" required>
               <el-input
-                v-model="detailData.businessName"
+                v-model="localDetailData.businessName"
                 :disabled="isViewMode"
                 placeholder="请输入工商名称"
                 @blur="isAddMode && !isBasicInfoSaved && !isViewMode && emit('getBusinessInfo')"
@@ -40,27 +40,34 @@
         <el-row :gutter="12" class="form-row">
           <el-col :span="8">
             <el-form-item label="企业简称:" required>
-              <el-input v-model="detailData.shortName" placeholder="请输入企业简称" :disabled="isViewMode" />
+              <el-input v-model="localDetailData.shortName" placeholder="请输入企业简称" :disabled="isViewMode" />
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="供应商等级:" required>
-              <el-select v-model="detailData.cooperateLevel" placeholder="请选择" clearable filterable style="width: 100%" :disabled="isViewMode">
+              <el-select
+                v-model="localDetailData.cooperateLevel"
+                placeholder="请选择"
+                clearable
+                filterable
+                style="width: 100%"
+                :disabled="isViewMode"
+              >
                 <el-option v-for="level in supplierLevelOptions" :key="level.id" :label="level.supplierLevelName" :value="String(level.id)" />
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="8">
+          <!-- <el-col :span="8">
             <el-form-item label="企业规模:" required>
               <el-select v-model="detailData.membershipSize" placeholder="请选择" clearable filterable style="width: 100%" :disabled="isViewMode">
                 <el-option v-for="scale in enterpriseScaleOptions" :key="scale.id" :label="scale.enterpriseScaleName" :value="scale.id" />
               </el-select>
             </el-form-item>
-          </el-col>
+          </el-col> -->
         </el-row>
 
         <el-row :gutter="12" class="form-row">
-          <el-col :span="8">
+          <!-- <el-col :span="8">
             <el-form-item label="行业类别:" required>
               <el-select v-model="detailData.industrCategory" placeholder="请选择" clearable filterable style="width: 100%" :disabled="isViewMode">
                 <el-option
@@ -71,10 +78,10 @@
                 />
               </el-select>
             </el-form-item>
-          </el-col>
+          </el-col> -->
           <el-col :span="8">
             <el-form-item label="供应商类型:" required>
-              <el-select v-model="detailData.supplierType" placeholder="请选择" clearable filterable style="width: 100%" :disabled="isViewMode">
+              <el-select v-model="localDetailData.supplierType" placeholder="请选择" clearable filterable style="width: 100%" :disabled="isViewMode">
                 <el-option v-for="type in supplierTypeOptions" :key="type.id" :label="type.supplierTypeName" :value="type.id" />
               </el-select>
             </el-form-item>
@@ -82,10 +89,10 @@
           <el-col :span="8">
             <el-form-item label="固定电话:" :error="fixedPhoneError">
               <el-input
-                v-model="detailData.fixedPhone"
+                v-model="localDetailData.fixedPhone"
                 placeholder="请输入固定电话"
                 type="tel"
-                @blur="onFixedPhoneBlur" 
+                @blur="onFixedPhoneBlur"
                 :disabled="isViewMode"
               />
             </el-form-item>
@@ -95,17 +102,23 @@
         <el-row :gutter="12" class="form-row">
           <el-col :span="8">
             <el-form-item label="传真:">
-              <el-input v-model="detailData.fax" placeholder="请输入传真" @blur="onFaxBlur" :disabled="isViewMode" />
+              <el-input v-model="localDetailData.fax" placeholder="请输入传真" @blur="onFaxBlur" :disabled="isViewMode" />
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="企业邮箱:">
-              <el-input v-model="detailData.mailbox" placeholder="请输入企业邮箱" :disabled="isViewMode" />
+              <el-input v-model="localDetailData.mailbox" placeholder="请输入企业邮箱" :disabled="isViewMode" />
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="开始时间:">
-              <el-date-picker v-model="detailData.validityFromDate" type="date" placeholder="请选择" style="width: 100%" :disabled="isViewMode" />
+              <el-date-picker
+                v-model="localDetailData.validityFromDate"
+                type="date"
+                placeholder="请选择"
+                style="width: 100%"
+                :disabled="isViewMode"
+              />
             </el-form-item>
           </el-col>
         </el-row>
@@ -113,17 +126,17 @@
         <el-row :gutter="12" class="form-row">
           <el-col :span="8">
             <el-form-item label="结束时间:">
-              <el-date-picker v-model="detailData.validityToDate" type="date" placeholder="请选择" style="width: 100%" :disabled="isViewMode" />
+              <el-date-picker v-model="localDetailData.validityToDate" type="date" placeholder="请选择" style="width: 100%" :disabled="isViewMode" />
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="邮政编码:" :error="postCodeError">
-              <el-input v-model="detailData.postCode" placeholder="请输入邮政编码" @blur="onPostCodeBlur" :disabled="isViewMode" />
+              <el-input v-model="localDetailData.postCode" placeholder="请输入邮政编码" @blur="onPostCodeBlur" :disabled="isViewMode" />
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="网址:">
-              <el-input v-model="detailData.url" placeholder="请输入网址" :disabled="isViewMode" />
+              <el-input v-model="localDetailData.url" placeholder="请输入网址" :disabled="isViewMode" />
             </el-form-item>
           </el-col>
         </el-row>
@@ -145,7 +158,7 @@
           </el-col>
           <el-col :span="8">
             <el-form-item label=" " label-width="0">
-              <el-input v-model="detailData.officeAddress" placeholder="请输入详细地址" :disabled="isViewMode" />
+              <el-input v-model="localDetailData.officeAddress" placeholder="请输入详细地址" :disabled="isViewMode" />
             </el-form-item>
           </el-col>
         </el-row>
@@ -159,7 +172,7 @@
         <el-col :span="8">
           <div class="form-item">
             <span class="label">企业工商名称:</span>
-            <span class="value">{{ businessInfo.businessName || detailData.businessName || '' }}</span>
+            <span class="value">{{ businessInfo.businessName || localDetailData.businessName || '' }}</span>
           </div>
         </el-col>
         <el-col :span="8">
@@ -192,7 +205,7 @@
         <el-col :span="8">
           <div class="form-item">
             <span class="label">社会信用代码:</span>
-            <span class="value">{{ businessInfo.socialCreditCode || detailData.socialCreditCode || '' }}</span>
+            <span class="value">{{ businessInfo.socialCreditCode || localDetailData.socialCreditCode || '' }}</span>
           </div>
         </el-col>
       </el-row>
@@ -226,7 +239,7 @@
           <div class="form-item">
             <span class="label">营业执照:</span>
             <ImageUpload
-              v-model="detailData.businessLicense"
+              v-model="localDetailData.businessLicense"
               :limit="1"
               :disabled="isViewMode"
               :file-size="5"
@@ -240,7 +253,7 @@
           <div class="form-item">
             <span class="label">法人身份证照片:</span>
             <ImageUpload
-              v-model="detailData.personImage"
+              v-model="localDetailData.personImage"
               :limit="1"
               :disabled="isViewMode"
               :file-size="5"
@@ -278,12 +291,86 @@
         </el-table-column>
       </el-table>
     </div>
+
+    <div class="section-title">ERP供应商信息</div>
+    <el-form :model="erpSupplierInfoForm" label-width="120px" class="detail-form">
+      <el-row :gutter="12" class="form-row">
+        <el-col :span="8">
+          <el-form-item label="采购人员:">
+            <el-select v-model="erpSupplierInfoForm.purchaseId" placeholder="请选择采购人员" class="w-full" filterable :disabled="isViewMode">
+              <el-option v-for="item in erpStaffList" :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="采购开票类型:">
+            <el-select
+              v-model="erpSupplierInfoForm.purchaseInvoiceNo"
+              placeholder="采购开票类型"
+              class="w-full"
+              filterable
+              :disabled="isViewMode"
+              @change="handInvoiceChange"
+            >
+              <el-option v-for="item in purchaseInvoice" :key="item.value" :label="item.label" :value="item.value" />
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="单价含税:">
+            <el-select v-model="erpSupplierInfoForm.unitPrice" placeholder="单价含税" class="w-full" filterable :disabled="isViewMode">
+              <el-option v-for="item in unitPriceArr" :key="item.value" :label="item.label" :value="item.value" />
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="12" class="form-row">
+        <el-col :span="8">
+          <el-form-item label="税码:">
+            <el-select v-model="erpSupplierInfoForm.rateId" placeholder="税码" class="w-full" filterable :disabled="isViewMode">
+              <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="交易币别:">
+            <el-select v-model="erpSupplierInfoForm.dealCurrencyId" placeholder="请选择交易币别" class="w-full" filterable :disabled="isViewMode">
+              <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="账款归属:">
+            <el-input v-model="localDetailData.supplierNo" disabled />
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="12" class="form-row">
+        <el-col :span="8">
+          <el-form-item label="付款条件:">
+            <el-select v-model="erpSupplierInfoForm.settlementMethod" placeholder="请选择付款条件" class="w-full" filterable :disabled="isViewMode">
+              <el-option v-for="dict in payment_clause" :key="dict.value" :label="dict.label" :value="dict.value" />
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
   </div>
 </template>
 
 <script setup lang="ts">
 import ImageUpload from '@/components/ImageUpload/index.vue';
 import { ElMessage } from 'element-plus';
+import { listErpSupplierInfo, getErpSupplierInfo } from '@/api/supplier/erpSupplierInfo';
+import { ErpSupplierInfoForm } from '@/api/supplier/erpSupplierInfo/types';
+import { listErpStaff } from '@/api/erpData/erpStaff';
+import { ErpStaffVO } from '@/api/erpData/erpStaff/types';
+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 { payment_clause } = toRefs<any>(proxy?.useDict('payment_clause'));
 
 const props = defineProps<{
   detailData: any;
@@ -296,6 +383,7 @@ const props = defineProps<{
   isViewMode: boolean;
   isBasicInfoSaved: boolean;
   businessInfo: any;
+  businessAddress: any;
   businessInfoLoading: boolean;
   regionOptions: any[];
   selectedOfficeRegion: string[];
@@ -303,21 +391,66 @@ const props = defineProps<{
   formatDate: (date: any) => string;
 }>();
 
+// erp供应商信息
+const erpSupplierInfoForm = reactive<ErpSupplierInfoForm>({
+  id: undefined,
+  supplierId: undefined,
+  purchaseId: undefined,
+  belongingDepartmentId: undefined,
+  status: undefined,
+  remark: undefined,
+  unitPrice: 'True',
+  dealCurrencyId: undefined,
+  accountBelong: undefined,
+  rateId: undefined,
+  purchaseInvoiceId: undefined,
+  purchaseInvoiceNo: undefined,
+  purchaseInvoice: undefined,
+  settlementMethod: undefined
+});
+
 const emit = defineEmits<{
-  (e: 'save'): void;
+  (e: 'save', erpSupplierInfo: ErpSupplierInfoForm): void;
   (e: 'getBusinessInfo'): void;
   (e: 'officeRegionChange', value: string[]): void;
   (e: 'update:selectedOfficeRegion', value: string[]): void;
   (e: 'addPayment'): void;
   (e: 'viewPayment', row: any): void;
   (e: 'editPayment', row: any): void;
+  (e: 'update:detailData', value: any): void;
 }>();
 
+const erpStaffList = ref<ErpStaffVO[]>([]);
+
+const localDetailData = computed({
+  get: () => props.detailData,
+  set: (value) => emit('update:detailData', value)
+});
+
 const selectedOfficeRegionProxy = computed({
   get: () => props.selectedOfficeRegion,
   set: (value) => emit('update:selectedOfficeRegion', value)
 });
 
+const unitPriceArr = ref([
+  { label: '含税', value: 'True' },
+  { label: '不含税', value: 'False' }
+]);
+
+const purchaseInvoice = ref([
+  { label: '优易达专票', value: '0001' },
+  { label: '江西优易云普票', value: '0016' },
+  { label: '江西优易云专票', value: '0006' },
+  { label: '无票', value: '0017' },
+  { label: '新天利泰专票', value: '0003' },
+  { label: '优易达(长沙)-普票', value: '0019' },
+  { label: '优易达(长沙)-专票', value: '0018' },
+  { label: '优易达普票', value: '0010' },
+  { label: '优易智采(江西)-专票', value: '0020' }
+]);
+const taxrateList = ref<any[]>([]);
+const currencyList = ref<ComCurrencyVO[]>([]);
+
 const onOfficeRegionChange = (val: unknown) => {
   emit('officeRegionChange', (val || []) as string[]);
 };
@@ -363,6 +496,38 @@ watch(
   { immediate: true }
 );
 
+const handInvoiceChange = (invoiceNo: any) => {
+  const invoice = purchaseInvoice.value.find((invoice) => invoice.value === invoiceNo);
+  erpSupplierInfoForm.purchaseInvoice = invoice?.label;
+};
+
+// 加载税码列表
+const loadTaxrateList = async () => {
+  try {
+    const res = await listTaxrate({
+      isShow: '0',
+      pageNum: 1,
+      pageSize: 1000
+    });
+    taxrateList.value = res.rows || [];
+  } catch (error) {}
+};
+
+// 加载币种列表
+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 onFixedPhoneBlur = () => {
   fixedPhoneError.value = validateFixedPhone(props.detailData?.fixedPhone);
 };
@@ -371,6 +536,16 @@ const onPostCodeBlur = () => {
   postCodeError.value = validatePostCode(props.detailData?.postCode);
 };
 
+// 加载员工列表
+const loadErpStaffList = async () => {
+  try {
+    const query: any = {};
+    const res = await listErpStaff(query);
+    erpStaffList.value = res.rows || [];
+  } catch (error) {
+    console.error('加载员工列表失败:', error);
+  }
+};
 const onFaxBlur = () => {
   const err = validateFax(props.detailData?.fax);
   if (err) ElMessage.warning(err);
@@ -396,8 +571,64 @@ const onSaveClick = () => {
     ElMessage.warning(faxErr);
     return;
   }
-  emit('save');
+  emit('save', erpSupplierInfoForm);
+};
+
+// 加载ERP供应商信息
+const loadErpSupplierInfo = async (supplierId: string | number) => {
+  if (!supplierId) {
+    console.log('supplierId为空,跳过查询');
+    return;
+  }
+
+  try {
+    console.log('查询ERP供应商信息,supplierId:', supplierId);
+    const res = await listErpSupplierInfo({ supplierId, pageNum: 1, pageSize: 1 });
+    console.log('ERP供应商信息查询结果:', res);
+
+    if (res.rows && res.rows.length > 0) {
+      const data = res.rows[0];
+      Object.assign(erpSupplierInfoForm, {
+        id: data.id,
+        supplierId: data.supplierId,
+        purchaseId: data.purchaseId,
+        belongingDepartmentId: data.belongingDepartmentId,
+        status: data.status,
+        remark: data.remark,
+        unitPrice: data.unitPrice || 'True',
+        dealCurrencyId: data.dealCurrencyId,
+        accountBelong: data.accountBelong,
+        rateId: data.rateId,
+        purchaseInvoiceId: data.purchaseInvoiceId,
+        purchaseInvoiceNo: data.purchaseInvoiceNo,
+        purchaseInvoice: data.purchaseInvoice,
+        settlementMethod: data.settlementMethod
+      });
+      console.log('ERP供应商信息已回显:', erpSupplierInfoForm);
+    } else {
+      console.log('未查询到ERP供应商信息');
+    }
+  } catch (error) {
+    console.error('加载ERP供应商信息失败:', error);
+  }
 };
+
+watch(
+  () => props.detailData?.id,
+  (newId) => {
+    console.log('detailData.id变化:', newId);
+    if (newId) {
+      loadErpSupplierInfo(newId);
+    }
+  },
+  { immediate: true }
+);
+
+onMounted(() => {
+  loadErpStaffList();
+  loadTaxrateList();
+  loadCurrencyList();
+});
 </script>
 
 <style scoped>