Browse Source

Merge remote-tracking branch 'origin/master' into master

肖路 2 weeks ago
parent
commit
37ee69ecfb
76 changed files with 16323 additions and 2 deletions
  1. 2 2
      .env.production
  2. 63 0
      src/api/bill/invoiceInfo/index.ts
  3. 161 0
      src/api/bill/invoiceInfo/types.ts
  4. 63 0
      src/api/bill/statementDetail/index.ts
  5. 204 0
      src/api/bill/statementDetail/types.ts
  6. 75 0
      src/api/bill/statementInvoice/index.ts
  7. 179 0
      src/api/bill/statementInvoice/types.ts
  8. 63 0
      src/api/bill/statementInvoiceDetail/index.ts
  9. 266 0
      src/api/bill/statementInvoiceDetail/types.ts
  10. 63 0
      src/api/bill/statementInvoiceProduct/index.ts
  11. 251 0
      src/api/bill/statementInvoiceProduct/types.ts
  12. 110 0
      src/api/bill/statementOrder/index.ts
  13. 248 0
      src/api/bill/statementOrder/types.ts
  14. 63 0
      src/api/bill/statementProduct/index.ts
  15. 251 0
      src/api/bill/statementProduct/types.ts
  16. 74 0
      src/api/company/comCurrency/index.ts
  17. 105 0
      src/api/company/comCurrency/types.ts
  18. 75 0
      src/api/company/comStaff/index.ts
  19. 215 0
      src/api/company/comStaff/types.ts
  20. 75 0
      src/api/company/company/index.ts
  21. 410 0
      src/api/company/company/types.ts
  22. 41 0
      src/api/company/revenueExpense/index.ts
  23. 18 0
      src/api/company/revenueExpense/types.ts
  24. 75 0
      src/api/company/warehouse/index.ts
  25. 380 0
      src/api/company/warehouse/types.ts
  26. 63 0
      src/api/customer/bank/index.ts
  27. 156 0
      src/api/customer/bank/types.ts
  28. 77 0
      src/api/customer/bussineInfo/index.ts
  29. 206 0
      src/api/customer/bussineInfo/types.ts
  30. 63 0
      src/api/customer/contact/index.ts
  31. 201 0
      src/api/customer/contact/types.ts
  32. 63 0
      src/api/customer/customerCategory/enterpriseScale/index.ts
  33. 75 0
      src/api/customer/customerCategory/enterpriseScale/types.ts
  34. 63 0
      src/api/customer/customerCategory/industryCategory/index.ts
  35. 75 0
      src/api/customer/customerCategory/industryCategory/types.ts
  36. 74 0
      src/api/customer/customerFile/businessInfo/index.ts
  37. 230 0
      src/api/customer/customerFile/businessInfo/types.ts
  38. 63 0
      src/api/customer/customerFile/contract/index.ts
  39. 264 0
      src/api/customer/customerFile/contract/types.ts
  40. 63 0
      src/api/customer/customerFile/customerContact/index.ts
  41. 269 0
      src/api/customer/customerFile/customerContact/types.ts
  42. 63 0
      src/api/customer/customerFile/customerDept/index.ts
  43. 325 0
      src/api/customer/customerFile/customerDept/types.ts
  44. 133 0
      src/api/customer/customerFile/customerInfo/index.ts
  45. 452 0
      src/api/customer/customerFile/customerInfo/types.ts
  46. 63 0
      src/api/customer/customerFile/groupCustomer/index.ts
  47. 95 0
      src/api/customer/customerFile/groupCustomer/types.ts
  48. 63 0
      src/api/customer/customerFile/invoiceInfo/index.ts
  49. 185 0
      src/api/customer/customerFile/invoiceInfo/types.ts
  50. 77 0
      src/api/customer/customerFile/purchaseHabit/index.ts
  51. 253 0
      src/api/customer/customerFile/purchaseHabit/types.ts
  52. 63 0
      src/api/customer/customerFile/salesInfo/index.ts
  53. 275 0
      src/api/customer/customerFile/salesInfo/types.ts
  54. 80 0
      src/api/customer/customerFile/shippingAddress/index.ts
  55. 290 0
      src/api/customer/customerFile/shippingAddress/types.ts
  56. 133 0
      src/api/customer/customerInfo/index.ts
  57. 452 0
      src/api/customer/customerInfo/types.ts
  58. 371 0
      src/api/customer/info/index.ts
  59. 930 0
      src/api/customer/info/types.ts
  60. 75 0
      src/api/customer/invoiceType/index.ts
  61. 95 0
      src/api/customer/invoiceType/types.ts
  62. 355 0
      src/api/customer/supplierInfo/index.ts
  63. 910 0
      src/api/customer/supplierInfo/types.ts
  64. 111 0
      src/api/order/orderDeliver/index.ts
  65. 253 0
      src/api/order/orderDeliver/types.ts
  66. 171 0
      src/api/order/orderMain/index.ts
  67. 769 0
      src/api/order/orderMain/types.ts
  68. 587 0
      src/views/bill/statementInvoice/addDrawer.vue
  69. 252 0
      src/views/bill/statementInvoice/addInvoiceDialog.vue
  70. 326 0
      src/views/bill/statementInvoice/detailDrawer.vue
  71. 362 0
      src/views/bill/statementInvoice/index.vue
  72. 267 0
      src/views/bill/statementInvoice/statementOrderDrawer.vue
  73. 785 0
      src/views/bill/statementOrder/addDrawer.vue
  74. 549 0
      src/views/bill/statementOrder/detailDrawer.vue
  75. 347 0
      src/views/bill/statementOrder/index.vue
  76. 271 0
      src/views/bill/statementOrder/orderMainDrawer.vue

+ 2 - 2
.env.production

@@ -1,5 +1,5 @@
 # 页面标题
-VITE_APP_TITLE = RuoYi-Vue-Plus多租户管理系统
+VITE_APP_TITLE = 优易商城-API对接管理平台
 VITE_APP_LOGO_TITLE = RuoYi-Vue-Plus
 
 # 生产环境配置
@@ -15,7 +15,7 @@ VITE_APP_MONITOR_ADMIN = '/admin/applications'
 VITE_APP_SNAILJOB_ADMIN = '/snail-job'
 
 # 生产环境
-VITE_APP_BASE_API = 'http://one.yoe365.com'
+VITE_APP_BASE_API = 'https://one.yoe365.com'
 
 # 是否在打包时开启压缩,支持 gzip 和 brotli
 VITE_BUILD_COMPRESS = gzip

+ 63 - 0
src/api/bill/invoiceInfo/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { InvoiceInfoVO, InvoiceInfoForm, InvoiceInfoQuery } from '@/api/bill/invoiceInfo/types';
+
+/**
+ * 查询发票信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listInvoiceInfo = (query?: InvoiceInfoQuery): AxiosPromise<InvoiceInfoVO[]> => {
+  return request({
+    url: '/bill/invoiceInfo/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询发票信息详细
+ * @param id
+ */
+export const getInvoiceInfo = (id: string | number): AxiosPromise<InvoiceInfoVO> => {
+  return request({
+    url: '/bill/invoiceInfo/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增发票信息
+ * @param data
+ */
+export const addInvoiceInfo = (data: InvoiceInfoForm) => {
+  return request({
+    url: '/bill/invoiceInfo',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改发票信息
+ * @param data
+ */
+export const updateInvoiceInfo = (data: InvoiceInfoForm) => {
+  return request({
+    url: '/bill/invoiceInfo',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除发票信息
+ * @param id
+ */
+export const delInvoiceInfo = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/bill/invoiceInfo/' + id,
+    method: 'delete'
+  });
+};

+ 161 - 0
src/api/bill/invoiceInfo/types.ts

@@ -0,0 +1,161 @@
+export interface InvoiceInfoVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 对账单发票id
+   */
+  statementInvoiceId: string | number;
+
+  /**
+   * 对账单发票编号
+   */
+  statementInvoiceNo: string;
+
+  /**
+   * 发票类型
+   */
+  invoiceType: string;
+
+  /**
+   * 发票代码
+   */
+  invoiceCode: string;
+
+  /**
+   * 发票金额
+   */
+  invoiceAmount: number;
+
+  /**
+   * 发票附件路径或URL
+   */
+  invoiceAnnex: string;
+
+  /**
+   * 开票公司名称
+   */
+  companyName: string;
+
+  /**
+   * 发票开具日期
+   */
+  invoiceDate: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+}
+
+export interface InvoiceInfoForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 对账单发票id
+   */
+  statementInvoiceId?: string | number;
+
+  /**
+   * 对账单发票编号
+   */
+  statementInvoiceNo?: string;
+
+  /**
+   * 发票类型
+   */
+  invoiceType?: string;
+
+  /**
+   * 发票代码
+   */
+  invoiceCode?: string;
+
+  /**
+   * 发票金额
+   */
+  invoiceAmount?: number;
+
+  /**
+   * 发票附件路径或URL
+   */
+  invoiceAnnex?: string;
+
+  /**
+   * 开票公司名称
+   */
+  companyName?: string;
+
+  /**
+   * 发票开具日期
+   */
+  invoiceDate?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+}
+
+export interface InvoiceInfoQuery extends PageQuery {
+
+  /**
+   * 对账单发票id
+   */
+  statementInvoiceId?: string | number;
+
+  /**
+   * 对账单发票编号
+   */
+  statementInvoiceNo?: string;
+
+  /**
+   * 发票类型
+   */
+  invoiceType?: string;
+
+  /**
+   * 发票代码
+   */
+  invoiceCode?: string;
+
+  /**
+   * 发票金额
+   */
+  invoiceAmount?: number;
+
+  /**
+   * 发票附件路径或URL
+   */
+  invoiceAnnex?: string;
+
+  /**
+   * 开票公司名称
+   */
+  companyName?: string;
+
+  /**
+   * 发票开具日期
+   */
+  invoiceDate?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 63 - 0
src/api/bill/statementDetail/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { StatementDetailVO, StatementDetailForm, StatementDetailQuery } from '@/api/bill/statementDetail/types';
+
+/**
+ * 查询对账单交易明细列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listStatementDetail = (query?: StatementDetailQuery): AxiosPromise<StatementDetailVO[]> => {
+  return request({
+    url: '/bill/statementDetail/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询对账单交易明细详细
+ * @param id
+ */
+export const getStatementDetail = (id: string | number): AxiosPromise<StatementDetailVO> => {
+  return request({
+    url: '/bill/statementDetail/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增对账单交易明细
+ * @param data
+ */
+export const addStatementDetail = (data: StatementDetailForm) => {
+  return request({
+    url: '/bill/statementDetail',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改对账单交易明细
+ * @param data
+ */
+export const updateStatementDetail = (data: StatementDetailForm) => {
+  return request({
+    url: '/bill/statementDetail',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除对账单交易明细
+ * @param id
+ */
+export const delStatementDetail = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/bill/statementDetail/' + id,
+    method: 'delete'
+  });
+};

+ 204 - 0
src/api/bill/statementDetail/types.ts

@@ -0,0 +1,204 @@
+export interface StatementDetailVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 对账单id
+   */
+  statementOrderId: string | number;
+
+  /**
+   * 对账单编号
+   */
+  statementOrderNo: string;
+
+  /**
+   * 明细类型(如:1-销售订单, 2-退款等)
+   */
+  type: string;
+
+  /**
+   * 关联的订单id
+   */
+  orderId: string | number;
+
+  /**
+   * 关联的订单编号
+   */
+  orderNo: string;
+
+  /**
+   * 该明细金额
+   */
+  amount: number;
+
+  /**
+   * 订单时间
+   */
+  orderTime: string;
+
+  /**
+   * 签收日期
+   */
+  signingDate: string;
+
+  /**
+   * 操作用户id
+   */
+  userId: string | number;
+
+  /**
+   * 操作用户编号
+   */
+  userName: string;
+
+  userDeptId: string | number;
+
+  /**
+   * 用户所属部门
+   */
+  userDept: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface StatementDetailForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 对账单id
+   */
+  statementOrderId?: string | number;
+
+  /**
+   * 对账单编号
+   */
+  statementOrderNo?: string;
+
+  /**
+   * 明细类型(如:1-销售订单, 2-退款等)
+   */
+  type?: string;
+
+  /**
+   * 关联的订单id
+   */
+  orderId?: string | number;
+
+  /**
+   * 关联的订单编号
+   */
+  orderNo?: string;
+
+  /**
+   * 该明细金额
+   */
+  amount?: number;
+
+  /**
+   * 订单时间
+   */
+  orderTime?: string;
+
+  /**
+   * 签收日期
+   */
+  signingDate?: string;
+
+  /**
+   * 操作用户id
+   */
+  userId?: string | number;
+
+  /**
+   * 操作用户编号
+   */
+  userName?: string;
+
+  userDeptId?: string | number;
+
+  /**
+   * 用户所属部门
+   */
+  userDept?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface StatementDetailQuery extends PageQuery {
+  /**
+   * 对账单id
+   */
+  statementOrderId?: string | number;
+
+  /**
+   * 对账单编号
+   */
+  statementOrderNo?: string;
+
+  /**
+   * 明细类型(如:1-销售订单, 2-退款等)
+   */
+  type?: string;
+
+  /**
+   * 关联的订单id
+   */
+  orderId?: string | number;
+
+  /**
+   * 关联的订单编号
+   */
+  orderNo?: string;
+
+  /**
+   * 该明细金额
+   */
+  amount?: number;
+
+  /**
+   * 订单时间
+   */
+  orderTime?: string;
+
+  /**
+   * 签收日期
+   */
+  signingDate?: string;
+
+  /**
+   * 操作用户id
+   */
+  userId?: string | number;
+
+  /**
+   * 操作用户编号
+   */
+  userName?: string;
+
+  /**
+   * 用户所属部门
+   */
+  userDept?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 75 - 0
src/api/bill/statementInvoice/index.ts

@@ -0,0 +1,75 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { StatementInvoiceVO, StatementInvoiceForm, StatementInvoiceQuery } from '@/api/bill/statementInvoice/types';
+
+/**
+ * 查询销售发票主列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listStatementInvoice = (query?: StatementInvoiceQuery): AxiosPromise<StatementInvoiceVO[]> => {
+  return request({
+    url: '/bill/statementInvoice/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询销售发票主详细
+ * @param id
+ */
+export const getStatementInvoice = (id: string | number): AxiosPromise<StatementInvoiceVO> => {
+  return request({
+    url: '/bill/statementInvoice/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增销售发票主
+ * @param data
+ */
+export const addStatementInvoice = (data: StatementInvoiceForm) => {
+  return request({
+    url: '/bill/statementInvoice',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改销售发票主
+ * @param data
+ */
+export const updateStatementInvoice = (data: StatementInvoiceForm) => {
+  return request({
+    url: '/bill/statementInvoice',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除销售发票主
+ * @param id
+ */
+export const delStatementInvoice = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/bill/statementInvoice/' + id,
+    method: 'delete'
+  });
+};
+
+export function changeStatus(id: string | number, invoiceStatus: string) {
+  const data = {
+    id,
+    invoiceStatus
+  };
+  return request({
+    url: '/bill/statementInvoice/changeStatus',
+    method: 'put',
+    data: data
+  });
+}

+ 179 - 0
src/api/bill/statementInvoice/types.ts

@@ -0,0 +1,179 @@
+export interface StatementInvoiceVO {
+  /**
+   *
+   */
+  id: string | number;
+
+  /**
+   * 发票编号
+   */
+  statementInvoiceNo: string;
+
+  /**
+   * 客户编号
+   */
+  customerId: string | number;
+
+  /**
+   * 客户编号
+   */
+  customerNo: string;
+
+  /**
+   * 客户名称
+   */
+  customerName: string;
+
+  /**
+   * 发票金额
+   */
+  invoiceAmount: number;
+
+  /**
+   * 发票状态
+   */
+  invoiceStatus: string;
+
+  /**
+   * 开票时间
+   */
+  invoiceTime: string;
+
+  /**
+   * 驳回备注
+   */
+  rejectRemark: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface StatementInvoiceForm extends BaseEntity {
+  /**
+   *
+   */
+  id?: string | number;
+
+  /**
+   * 发票编号
+   */
+  statementInvoiceNo?: string;
+
+  /**
+   * 客户编号
+   */
+  customerId?: string | number;
+
+  /**
+   * 客户编号
+   */
+  customerNo?: string;
+
+  /**
+   * 客户名称
+   */
+  customerName?: string;
+
+  /**
+   * 发票金额
+   */
+  invoiceAmount?: number;
+
+  /**
+   * 发票状态
+   */
+  invoiceStatus?: string;
+
+  /**
+   * 开票时间
+   */
+  invoiceTime?: string;
+
+  /**
+   * 驳回备注
+   */
+  rejectRemark?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+  /**
+   * 附件地址
+   */
+  annexAddress?: string;
+
+  /**
+   * 发票明细列表
+   */
+  detailList?: any[];
+
+  /**
+   * 商品清单列表
+   */
+  productList?: any[];
+
+  /**
+   * 发票列表
+   */
+  invoiceList?: any[];
+}
+
+export interface StatementInvoiceQuery extends PageQuery {
+  /**
+   * 发票编号
+   */
+  statementInvoiceNo?: string;
+
+  /**
+   * 客户编号
+   */
+  customerId?: string | number;
+
+  /**
+   * 客户编号
+   */
+  customerNo?: string;
+
+  /**
+   * 客户名称
+   */
+  customerName?: string;
+
+  /**
+   * 发票金额
+   */
+  invoiceAmount?: number;
+
+  /**
+   * 发票状态
+   */
+  invoiceStatus?: string;
+
+  statementOrderNo?: string;
+
+  orderNo?: string;
+
+  /**
+   * 开票时间
+   */
+  invoiceTime?: string;
+
+  /**
+   * 驳回备注
+   */
+  rejectRemark?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 63 - 0
src/api/bill/statementInvoiceDetail/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { StatementInvoiceDetailVO, StatementInvoiceDetailForm, StatementInvoiceDetailQuery } from '@/api/bill/statementInvoiceDetail/types';
+
+/**
+ * 查询销售发票明细列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listStatementInvoiceDetail = (query?: StatementInvoiceDetailQuery): AxiosPromise<StatementInvoiceDetailVO[]> => {
+  return request({
+    url: '/bill/statementInvoiceDetail/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询销售发票明细详细
+ * @param id
+ */
+export const getStatementInvoiceDetail = (id: string | number): AxiosPromise<StatementInvoiceDetailVO> => {
+  return request({
+    url: '/bill/statementInvoiceDetail/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增销售发票明细
+ * @param data
+ */
+export const addStatementInvoiceDetail = (data: StatementInvoiceDetailForm) => {
+  return request({
+    url: '/bill/statementInvoiceDetail',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改销售发票明细
+ * @param data
+ */
+export const updateStatementInvoiceDetail = (data: StatementInvoiceDetailForm) => {
+  return request({
+    url: '/bill/statementInvoiceDetail',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除销售发票明细
+ * @param id
+ */
+export const delStatementInvoiceDetail = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/bill/statementInvoiceDetail/' + id,
+    method: 'delete'
+  });
+};

+ 266 - 0
src/api/bill/statementInvoiceDetail/types.ts

@@ -0,0 +1,266 @@
+export interface StatementInvoiceDetailVO {
+  /**
+   * 
+   */
+  id: string | number;
+
+  /**
+   * 发票主表id(关联主表)
+   */
+  statementInvoiceId: string | number;
+
+  /**
+   * 发票编号(关联主表)
+   */
+  statementInvoiceNo: string;
+
+  /**
+   * 对账金额
+   */
+  statementAmount: number;
+
+  /**
+   * 订单类型
+   */
+  orderType: string;
+
+  /**
+   * 关联的订单id
+   */
+  orderId: string | number;
+
+  /**
+   * 订单编号
+   */
+  orderNo: string;
+
+  /**
+   * 订单金额
+   */
+  orderAmount: number;
+
+  /**
+   * 订单时间
+   */
+  orderTime: string;
+
+  /**
+   * 签约/对账日期
+   */
+  signingDate: string;
+
+  /**
+   * 操作用户id
+   */
+  userId: string | number;
+
+  /**
+   * 操作人
+   */
+  userName: string;
+
+  /**
+   * 操作人部门
+   */
+  userDeptId: string | number;
+
+  /**
+   * 操作人部门
+   */
+  userDept: string;
+
+  /**
+   * 对账单id
+   */
+  statementOrderId: string | number;
+
+  /**
+   * 对账单号(可选)
+   */
+  statementOrderNo: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+}
+
+export interface StatementInvoiceDetailForm extends BaseEntity {
+  /**
+   * 
+   */
+  id?: string | number;
+
+  /**
+   * 发票主表id(关联主表)
+   */
+  statementInvoiceId?: string | number;
+
+  /**
+   * 发票编号(关联主表)
+   */
+  statementInvoiceNo?: string;
+
+  /**
+   * 对账金额
+   */
+  statementAmount?: number;
+
+  /**
+   * 订单类型
+   */
+  orderType?: string;
+
+  /**
+   * 关联的订单id
+   */
+  orderId?: string | number;
+
+  /**
+   * 订单编号
+   */
+  orderNo?: string;
+
+  /**
+   * 订单金额
+   */
+  orderAmount?: number;
+
+  /**
+   * 订单时间
+   */
+  orderTime?: string;
+
+  /**
+   * 签约/对账日期
+   */
+  signingDate?: string;
+
+  /**
+   * 操作用户id
+   */
+  userId?: string | number;
+
+  /**
+   * 操作人
+   */
+  userName?: string;
+
+  /**
+   * 操作人部门
+   */
+  userDeptId?: string | number;
+
+  /**
+   * 操作人部门
+   */
+  userDept?: string;
+
+  /**
+   * 对账单id
+   */
+  statementOrderId?: string | number;
+
+  /**
+   * 对账单号(可选)
+   */
+  statementOrderNo?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+}
+
+export interface StatementInvoiceDetailQuery extends PageQuery {
+
+  /**
+   * 发票主表id(关联主表)
+   */
+  statementInvoiceId?: string | number;
+
+  /**
+   * 发票编号(关联主表)
+   */
+  statementInvoiceNo?: string;
+
+  /**
+   * 对账金额
+   */
+  statementAmount?: number;
+
+  /**
+   * 订单类型
+   */
+  orderType?: string;
+
+  /**
+   * 关联的订单id
+   */
+  orderId?: string | number;
+
+  /**
+   * 订单编号
+   */
+  orderNo?: string;
+
+  /**
+   * 订单金额
+   */
+  orderAmount?: number;
+
+  /**
+   * 订单时间
+   */
+  orderTime?: string;
+
+  /**
+   * 签约/对账日期
+   */
+  signingDate?: string;
+
+  /**
+   * 操作用户id
+   */
+  userId?: string | number;
+
+  /**
+   * 操作人
+   */
+  userName?: string;
+
+  /**
+   * 操作人部门
+   */
+  userDeptId?: string | number;
+
+  /**
+   * 操作人部门
+   */
+  userDept?: string;
+
+  /**
+   * 对账单id
+   */
+  statementOrderId?: string | number;
+
+  /**
+   * 对账单号(可选)
+   */
+  statementOrderNo?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 63 - 0
src/api/bill/statementInvoiceProduct/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { StatementInvoiceProductVO, StatementInvoiceProductForm, StatementInvoiceProductQuery } from '@/api/bill/statementInvoiceProduct/types';
+
+/**
+ * 查询销售发票商品列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listStatementInvoiceProduct = (query?: StatementInvoiceProductQuery): AxiosPromise<StatementInvoiceProductVO[]> => {
+  return request({
+    url: '/bill/statementInvoiceProduct/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询销售发票商品详细
+ * @param id
+ */
+export const getStatementInvoiceProduct = (id: string | number): AxiosPromise<StatementInvoiceProductVO> => {
+  return request({
+    url: '/bill/statementInvoiceProduct/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增销售发票商品
+ * @param data
+ */
+export const addStatementInvoiceProduct = (data: StatementInvoiceProductForm) => {
+  return request({
+    url: '/bill/statementInvoiceProduct',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改销售发票商品
+ * @param data
+ */
+export const updateStatementInvoiceProduct = (data: StatementInvoiceProductForm) => {
+  return request({
+    url: '/bill/statementInvoiceProduct',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除销售发票商品
+ * @param id
+ */
+export const delStatementInvoiceProduct = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/bill/statementInvoiceProduct/' + id,
+    method: 'delete'
+  });
+};

+ 251 - 0
src/api/bill/statementInvoiceProduct/types.ts

@@ -0,0 +1,251 @@
+export interface StatementInvoiceProductVO {
+  /**
+   * 
+   */
+  id: string | number;
+
+  /**
+   * 发票主表id(关联主表)
+   */
+  statementInvoiceId: string | number;
+
+  /**
+   * 发票编号(关联主表)
+   */
+  statementInvoiceNo: string;
+
+  /**
+   * 商品类型
+   */
+  type: string;
+
+  /**
+   * 关联的订单id
+   */
+  orderId: string | number;
+
+  /**
+   * 所属订单编号
+   */
+  orderNo: string;
+
+  /**
+   * 品类id
+   */
+  categoryId: string | number;
+
+  /**
+   * 品类编号
+   */
+  categoryNo: string;
+
+  /**
+   * 商品id
+   */
+  productId: string | number;
+
+  /**
+   * 商品编号
+   */
+  productNo: string;
+
+  /**
+   * 商品名称
+   */
+  itemName: string;
+
+  /**
+   * 单位
+   */
+  unitId: string | number;
+
+  /**
+   * 单位名称
+   */
+  unitName: string;
+
+  /**
+   * 数量
+   */
+  quantity: number;
+
+  /**
+   * 单价
+   */
+  unitPrice: number;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+}
+
+export interface StatementInvoiceProductForm extends BaseEntity {
+  /**
+   * 
+   */
+  id?: string | number;
+
+  /**
+   * 发票主表id(关联主表)
+   */
+  statementInvoiceId?: string | number;
+
+  /**
+   * 发票编号(关联主表)
+   */
+  statementInvoiceNo?: string;
+
+  /**
+   * 商品类型
+   */
+  type?: string;
+
+  /**
+   * 关联的订单id
+   */
+  orderId?: string | number;
+
+  /**
+   * 所属订单编号
+   */
+  orderNo?: string;
+
+  /**
+   * 品类id
+   */
+  categoryId?: string | number;
+
+  /**
+   * 品类编号
+   */
+  categoryNo?: string;
+
+  /**
+   * 商品id
+   */
+  productId?: string | number;
+
+  /**
+   * 商品编号
+   */
+  productNo?: string;
+
+  /**
+   * 商品名称
+   */
+  itemName?: string;
+
+  /**
+   * 单位
+   */
+  unitId?: string | number;
+
+  /**
+   * 单位名称
+   */
+  unitName?: string;
+
+  /**
+   * 数量
+   */
+  quantity?: number;
+
+  /**
+   * 单价
+   */
+  unitPrice?: number;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+}
+
+export interface StatementInvoiceProductQuery extends PageQuery {
+
+  /**
+   * 发票主表id(关联主表)
+   */
+  statementInvoiceId?: string | number;
+
+  /**
+   * 发票编号(关联主表)
+   */
+  statementInvoiceNo?: string;
+
+  /**
+   * 商品类型
+   */
+  type?: string;
+
+  /**
+   * 关联的订单id
+   */
+  orderId?: string | number;
+
+  /**
+   * 所属订单编号
+   */
+  orderNo?: string;
+
+  /**
+   * 品类id
+   */
+  categoryId?: string | number;
+
+  /**
+   * 品类编号
+   */
+  categoryNo?: string;
+
+  /**
+   * 商品id
+   */
+  productId?: string | number;
+
+  /**
+   * 商品编号
+   */
+  productNo?: string;
+
+  /**
+   * 商品名称
+   */
+  itemName?: string;
+
+  /**
+   * 单位
+   */
+  unitId?: string | number;
+
+  /**
+   * 单位名称
+   */
+  unitName?: string;
+
+  /**
+   * 数量
+   */
+  quantity?: number;
+
+  /**
+   * 单价
+   */
+  unitPrice?: number;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 110 - 0
src/api/bill/statementOrder/index.ts

@@ -0,0 +1,110 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { StatementOrderVO, StatementOrderForm, StatementOrderQuery } from '@/api/bill/statementOrder/types';
+
+/**
+ * 查询对账单主列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listStatementOrder = (query?: StatementOrderQuery): AxiosPromise<StatementOrderVO[]> => {
+  return request({
+    url: '/bill/statementOrder/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询对账单主详细
+ * @param id
+ */
+export const getStatementOrder = (id: string | number): AxiosPromise<StatementOrderVO> => {
+  return request({
+    url: '/bill/statementOrder/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增对账单主
+ * @param data
+ */
+export const addStatementOrder = (data: StatementOrderForm) => {
+  return request({
+    url: '/bill/statementOrder',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改对账单主
+ * @param data
+ */
+export const updateStatementOrder = (data: StatementOrderForm) => {
+  return request({
+    url: '/bill/statementOrder',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除对账单主
+ * @param id
+ */
+export const delStatementOrder = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/bill/statementOrder/' + id,
+    method: 'delete'
+  });
+};
+
+export function changeStatus(id: string | number, statementStatus: string) {
+  const data = {
+    id,
+    statementStatus
+  };
+  return request({
+    url: '/bill/statementOrder/changeStatus',
+    method: 'put',
+    data: data
+  });
+}
+
+/**
+ * 根据客户ID查询对账单明细(分页)
+ * @param customerId 客户ID
+ * @param pageQuery 分页参数
+ */
+export const getCustomerOrderDetails = (customerId: string | number, pageQuery?: { pageNum?: number; pageSize?: number }) => {
+  return request({
+    url: '/bill/statementOrder/getCustomerOrderDetails/' + customerId,
+    method: 'get',
+    params: pageQuery
+  });
+};
+
+/**
+ * 根据多个 (对账单ID + 订单ID) 查询对应的订单商品列表
+ * @param items - 包含 statementOrderId 和 orderId 的数组
+ */
+export function getStatementProductList(items: { statementOrderId: number | string; orderId: number | string }[]) {
+  if (!Array.isArray(items) || items.length === 0) {
+    return Promise.reject(new Error('至少选择一个订单'));
+  }
+
+  // 可选:校验每项是否完整
+  const invalidItem = items.find((item) => item.statementOrderId == null || item.orderId == null);
+  if (invalidItem) {
+    return Promise.reject(new Error('每项必须包含 statementOrderId 和 orderId'));
+  }
+
+  return request({
+    url: '/bill/statementOrder/getStatementProductList',
+    method: 'post',
+    data: items // 发送 JSON 数组
+  });
+}

+ 248 - 0
src/api/bill/statementOrder/types.ts

@@ -0,0 +1,248 @@
+export interface StatementOrderVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 对账单编号
+   */
+  statementOrderNo: string;
+
+  /**
+   * 客户编号
+   */
+  customerId: string | number;
+
+  /**
+   * 客户编号
+   */
+  customerNo: string;
+
+  /**
+   * 客户名称
+   */
+  customerName: string;
+
+  /**
+   * 对账总金额
+   */
+  amount: number;
+
+  statementSelfId: string | number;
+
+  /**
+   * 对账人姓名
+   */
+  statementSelf: string;
+
+  /**
+   * 对账人电话
+   */
+  statementSelfPhone: string;
+
+  /**
+   * 对账状态(如:0-待确认, 1-已确认, 2-已驳回)
+   */
+  statementStatus: string;
+
+  /**
+   * 是否已付款
+   */
+  isPaymentStatus: string;
+
+  /**
+   * 是否已开票
+   */
+  isInvoiceStatus: string;
+
+  /**
+   * 对账日期
+   */
+  statementDate: string;
+
+  /**
+   * 附件存储路径
+   */
+  annexAddress: string;
+
+  /**
+   * 驳回原因
+   */
+  rejectRemark: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+  /**
+   * 对账明细列表
+   */
+  detailList?: any[];
+
+  /**
+   * 商品清单列表
+   */
+  productList?: any[];
+}
+
+export interface StatementOrderForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 对账单编号
+   */
+  statementOrderNo?: string;
+
+  /**
+   * 客户编号
+   */
+  customerId?: string | number;
+
+  /**
+   * 客户编号
+   */
+  customerNo?: string;
+
+  /**
+   * 客户名称
+   */
+  customerName?: string;
+
+  /**
+   * 对账总金额
+   */
+  amount?: number;
+
+  statementSelfId?: string | number;
+
+  /**
+   * 对账人姓名
+   */
+  statementSelf?: string;
+
+  /**
+   * 对账人电话
+   */
+  statementSelfPhone?: string;
+
+  /**
+   * 对账状态(如:0-待确认, 1-已确认, 2-已驳回)
+   */
+  statementStatus?: string;
+
+  /**
+   * 是否已付款
+   */
+  isPaymentStatus?: string;
+
+  /**
+   * 是否已开票
+   */
+  isInvoiceStatus?: string;
+
+  /**
+   * 对账日期
+   */
+  statementDate?: string;
+
+  /**
+   * 附件存储路径
+   */
+  annexAddress?: string;
+
+  /**
+   * 驳回原因
+   */
+  rejectRemark?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+  detailList?: any[];
+
+  productList?: any[];
+}
+
+export interface StatementOrderQuery extends PageQuery {
+  /**
+   * 对账单编号
+   */
+  statementOrderNo?: string;
+
+  /**
+   * 客户编号
+   */
+  customerId?: string | number;
+
+  /**
+   * 客户编号
+   */
+  customerNo?: string;
+
+  /**
+   * 客户名称
+   */
+  customerName?: string;
+
+  /**
+   * 对账总金额
+   */
+  amount?: number;
+
+  /**
+   * 对账人姓名
+   */
+  statementSelf?: string;
+
+  /**
+   * 对账人电话
+   */
+  statementSelfPhone?: string;
+
+  /**
+   * 对账状态(如:0-待确认, 1-已确认, 2-已驳回)
+   */
+  statementStatus?: string;
+
+  /**
+   * 是否已付款
+   */
+  isPaymentStatus?: string;
+
+  /**
+   * 是否已开票
+   */
+  isInvoiceStatus?: string;
+
+  /**
+   * 对账日期
+   */
+  statementDate?: string;
+
+  /**
+   * 附件存储路径
+   */
+  annexAddress?: string;
+
+  /**
+   * 驳回原因
+   */
+  rejectRemark?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 63 - 0
src/api/bill/statementProduct/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { StatementProductVO, StatementProductForm, StatementProductQuery } from '@/api/bill/statementProduct/types';
+
+/**
+ * 查询对账单商品明细列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listStatementProduct = (query?: StatementProductQuery): AxiosPromise<StatementProductVO[]> => {
+  return request({
+    url: '/bill/statementProduct/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询对账单商品明细详细
+ * @param id
+ */
+export const getStatementProduct = (id: string | number): AxiosPromise<StatementProductVO> => {
+  return request({
+    url: '/bill/statementProduct/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增对账单商品明细
+ * @param data
+ */
+export const addStatementProduct = (data: StatementProductForm) => {
+  return request({
+    url: '/bill/statementProduct',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改对账单商品明细
+ * @param data
+ */
+export const updateStatementProduct = (data: StatementProductForm) => {
+  return request({
+    url: '/bill/statementProduct',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除对账单商品明细
+ * @param id
+ */
+export const delStatementProduct = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/bill/statementProduct/' + id,
+    method: 'delete'
+  });
+};

+ 251 - 0
src/api/bill/statementProduct/types.ts

@@ -0,0 +1,251 @@
+export interface StatementProductVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 对账单id
+   */
+  statementOrderId: string | number;
+
+  /**
+   * 对账单编号
+   */
+  statementOrderNo: string;
+
+  /**
+   * 商品类型(如:1-实物, 2-服务等)
+   */
+  type: string;
+
+  /**
+   * 关联的订单id
+   */
+  orderId: string | number;
+
+  /**
+   * 关联的订单编号
+   */
+  orderNo: string;
+
+  /**
+   * 品类id
+   */
+  categoryId: string | number;
+
+  /**
+   * 品类编号
+   */
+  categoryNo: string;
+
+  /**
+   * 商品id
+   */
+  productId: string | number;
+
+  /**
+   * 商品编号
+   */
+  productNo: string;
+
+  /**
+   * 商品名称
+   */
+  itemName: string;
+
+  /**
+   * 单位
+   */
+  unitId: string | number;
+
+  /**
+   * 单位
+   */
+  unitName: string;
+
+  /**
+   * 数量
+   */
+  quantity: number;
+
+  /**
+   * 单价
+   */
+  unitPrice: number;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+}
+
+export interface StatementProductForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 对账单id
+   */
+  statementOrderId?: string | number;
+
+  /**
+   * 对账单编号
+   */
+  statementOrderNo?: string;
+
+  /**
+   * 商品类型(如:1-实物, 2-服务等)
+   */
+  type?: string;
+
+  /**
+   * 关联的订单id
+   */
+  orderId?: string | number;
+
+  /**
+   * 关联的订单编号
+   */
+  orderNo?: string;
+
+  /**
+   * 品类id
+   */
+  categoryId?: string | number;
+
+  /**
+   * 品类编号
+   */
+  categoryNo?: string;
+
+  /**
+   * 商品id
+   */
+  productId?: string | number;
+
+  /**
+   * 商品编号
+   */
+  productNo?: string;
+
+  /**
+   * 商品名称
+   */
+  itemName?: string;
+
+  /**
+   * 单位
+   */
+  unitId?: string | number;
+
+  /**
+   * 单位
+   */
+  unitName?: string;
+
+  /**
+   * 数量
+   */
+  quantity?: number;
+
+  /**
+   * 单价
+   */
+  unitPrice?: number;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+}
+
+export interface StatementProductQuery extends PageQuery {
+
+  /**
+   * 对账单id
+   */
+  statementOrderId?: string | number;
+
+  /**
+   * 对账单编号
+   */
+  statementOrderNo?: string;
+
+  /**
+   * 商品类型(如:1-实物, 2-服务等)
+   */
+  type?: string;
+
+  /**
+   * 关联的订单id
+   */
+  orderId?: string | number;
+
+  /**
+   * 关联的订单编号
+   */
+  orderNo?: string;
+
+  /**
+   * 品类id
+   */
+  categoryId?: string | number;
+
+  /**
+   * 品类编号
+   */
+  categoryNo?: string;
+
+  /**
+   * 商品id
+   */
+  productId?: string | number;
+
+  /**
+   * 商品编号
+   */
+  productNo?: string;
+
+  /**
+   * 商品名称
+   */
+  itemName?: string;
+
+  /**
+   * 单位
+   */
+  unitId?: string | number;
+
+  /**
+   * 单位
+   */
+  unitName?: string;
+
+  /**
+   * 数量
+   */
+  quantity?: number;
+
+  /**
+   * 单价
+   */
+  unitPrice?: number;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 74 - 0
src/api/company/comCurrency/index.ts

@@ -0,0 +1,74 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { ComCurrencyVO, ComCurrencyForm, ComCurrencyQuery } from '@/api/company/comCurrency/types';
+
+/**
+ * 查询交易币别配置列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listComCurrency = (query?: ComCurrencyQuery): AxiosPromise<ComCurrencyVO[]> => {
+  return request({
+    url: '/system/comCurrency/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询交易币别配置详细
+ * @param id
+ */
+export const getComCurrency = (id: string | number): AxiosPromise<ComCurrencyVO> => {
+  return request({
+    url: '/system/comCurrency/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增交易币别配置
+ * @param data
+ */
+export const addComCurrency = (data: ComCurrencyForm) => {
+  return request({
+    url: '/system/comCurrency',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改交易币别配置
+ * @param data
+ */
+export const updateComCurrency = (data: ComCurrencyForm) => {
+  return request({
+    url: '/system/comCurrency',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除交易币别配置
+ * @param id
+ */
+export const delComCurrency = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/comCurrency/' + id,
+    method: 'delete'
+  });
+};
+export function changeStatus(id: string | number, isShow: string) {
+  const data = {
+    id,
+    isShow
+  };
+  return request({
+    url: '/system/comCurrency/changeStatus',
+    method: 'put',
+    data: data
+  });
+}

+ 105 - 0
src/api/company/comCurrency/types.ts

@@ -0,0 +1,105 @@
+export interface ComCurrencyVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 货币编码
+   */
+  currencyCode: string;
+
+  /**
+   * 货币名称
+   */
+  currencyName: string;
+
+  /**
+   * 是否显示(0-显示,1-不显示)
+   */
+  isShow: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface ComCurrencyForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 货币编码
+   */
+  currencyCode?: string;
+
+  /**
+   * 货币名称
+   */
+  currencyName?: string;
+
+  /**
+   * 是否显示(0-显示,1-不显示)
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface ComCurrencyQuery extends PageQuery {
+  /**
+   * 货币编码
+   */
+  currencyCode?: string;
+
+  /**
+   * 货币名称
+   */
+  currencyName?: string;
+
+  /**
+   * 是否显示(0-显示,1-不显示)
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: 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;
+}

+ 41 - 0
src/api/company/revenueExpense/index.ts

@@ -0,0 +1,41 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { RevenueExpenseVO, RevenueExpenseForm, RevenueExpenseQuery } from '@/api/company/revenueExpense/types';
+
+export const listRevenueExpense = (query?: RevenueExpenseQuery): AxiosPromise<RevenueExpenseVO[]> => {
+  return request({
+    url: '/company/revenueExpense/list',
+    method: 'get',
+    params: query
+  });
+};
+
+export const getRevenueExpense = (id: string | number): AxiosPromise<RevenueExpenseVO> => {
+  return request({
+    url: '/company/revenueExpense/' + id,
+    method: 'get'
+  });
+};
+
+export const addRevenueExpense = (data: RevenueExpenseForm) => {
+  return request({
+    url: '/company/revenueExpense',
+    method: 'post',
+    data
+  });
+};
+
+export const updateRevenueExpense = (data: RevenueExpenseForm) => {
+  return request({
+    url: '/company/revenueExpense',
+    method: 'put',
+    data
+  });
+};
+
+export const delRevenueExpense = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/company/revenueExpense/' + id,
+    method: 'delete'
+  });
+};

+ 18 - 0
src/api/company/revenueExpense/types.ts

@@ -0,0 +1,18 @@
+export interface RevenueExpenseVO {
+  id?: string | number;
+  expenseCode?: string;
+  expenseName?: string;
+  expenseFlag?: string;
+  remark?: string;
+}
+
+export interface RevenueExpenseForm extends RevenueExpenseVO {}
+
+export interface RevenueExpenseQuery {
+  pageNum?: number;
+  pageSize?: number;
+  expenseCode?: string;
+  expenseName?: string;
+  expenseFlag?: string;
+  params?: Record<string, any>;
+}

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

@@ -0,0 +1,75 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { WarehouseVO, WarehouseForm, WarehouseQuery } from '@/api/company/warehouse/types';
+
+/**
+ * 查询仓库信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listWarehouse = (query?: WarehouseQuery): AxiosPromise<WarehouseVO[]> => {
+  return request({
+    url: '/system/warehouse/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询仓库信息详细
+ * @param id
+ */
+export const getWarehouse = (id: string | number): AxiosPromise<WarehouseVO> => {
+  return request({
+    url: '/system/warehouse/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增仓库信息
+ * @param data
+ */
+export const addWarehouse = (data: WarehouseForm) => {
+  return request({
+    url: '/system/warehouse',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改仓库信息
+ * @param data
+ */
+export const updateWarehouse = (data: WarehouseForm) => {
+  return request({
+    url: '/system/warehouse',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除仓库信息
+ * @param id
+ */
+export const delWarehouse = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/warehouse/' + id,
+    method: 'delete'
+  });
+};
+
+export function changeStatus(id: string | number, isShow: string) {
+  const data = {
+    id,
+    isShow
+  };
+  return request({
+    url: '/system/warehouse/changeStatus',
+    method: 'put',
+    data: data
+  });
+}

+ 380 - 0
src/api/company/warehouse/types.ts

@@ -0,0 +1,380 @@
+export interface WarehouseVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 仓库编码
+   */
+  warehouseCode: string;
+
+  /**
+   * 仓库名称
+   */
+  warehouseName: string;
+
+  /**
+   * 库存状态
+   */
+  stkStu: string;
+
+  /**
+   * 所属公司
+   */
+  companyId: string | number;
+
+  /**
+   * 省份
+   */
+  province: string;
+
+  /**
+   * 城市
+   */
+  city: string;
+
+  /**
+   * 区/县
+   */
+  district: string;
+
+  /**
+   * 省市区
+   */
+  provinceCityDistrict: string;
+
+  /**
+   * 仓库类型
+   */
+  warehouseType: string;
+
+  /**
+   * 仓库功能
+   */
+  warehouseFunction: string;
+
+  /**
+   * 是否支持发货
+   */
+  isShip: string;
+
+  /**
+   * 是否支持退货
+   */
+  isReturn: string;
+
+  /**
+   * 是否默认仓库
+   */
+  isDefault: string;
+
+  /**
+   * 是否前台展示
+   */
+  isShow: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource: string;
+
+  /**
+   * 联系人姓名
+   */
+  contacts: string;
+
+  /**
+   * 手机号
+   */
+  mobile: string;
+
+  /**
+   * 固定电话
+   */
+  phone: string;
+
+  /**
+   * 详细地址
+   */
+  address: string;
+
+  /**
+   * 邮政编码
+   */
+  zipCode: string;
+
+  /**
+   * 最大配送时效(天)
+   */
+  maxLeadTime: number;
+
+  /**
+   * 最小配送时效(天)
+   */
+  minLeadTime: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface WarehouseForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 仓库编码
+   */
+  warehouseCode?: string;
+
+  /**
+   * 仓库名称
+   */
+  warehouseName?: string;
+
+  /**
+   * 库存状态
+   */
+  stkStu?: string;
+
+  /**
+   * 所属公司
+   */
+  companyId?: string | number;
+
+  /**
+   * 省份
+   */
+  province?: string;
+
+  /**
+   * 城市
+   */
+  city?: string;
+
+  /**
+   * 区/县
+   */
+  district?: string;
+
+  /**
+   * 省市区
+   */
+  provinceCityDistrict?: string;
+
+  /**
+   * 仓库类型
+   */
+  warehouseType?: string;
+
+  /**
+   * 仓库功能
+   */
+  warehouseFunction?: string;
+
+  /**
+   * 是否支持发货
+   */
+  isShip?: string;
+
+  /**
+   * 是否支持退货
+   */
+  isReturn?: string;
+
+  /**
+   * 是否默认仓库
+   */
+  isDefault?: string;
+
+  /**
+   * 是否前台展示
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 联系人姓名
+   */
+  contacts?: string;
+
+  /**
+   * 手机号
+   */
+  mobile?: string;
+
+  /**
+   * 固定电话
+   */
+  phone?: string;
+
+  /**
+   * 详细地址
+   */
+  address?: string;
+
+  /**
+   * 邮政编码
+   */
+  zipCode?: string;
+
+  /**
+   * 最大配送时效(天)
+   */
+  maxLeadTime?: number;
+
+  /**
+   * 最小配送时效(天)
+   */
+  minLeadTime?: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface WarehouseQuery extends PageQuery {
+  /**
+   * 仓库编码
+   */
+  warehouseCode?: string;
+
+  /**
+   * 仓库名称
+   */
+  warehouseName?: string;
+
+  /**
+   * 库存状态
+   */
+  stkStu?: string;
+
+  /**
+   * 所属公司
+   */
+  companyId?: string | number;
+
+  /**
+   * 省份
+   */
+  province?: string;
+
+  /**
+   * 城市
+   */
+  city?: string;
+
+  /**
+   * 区/县
+   */
+  district?: string;
+
+  /**
+   * 省市区
+   */
+  provinceCityDistrict?: string;
+
+  /**
+   * 仓库类型
+   */
+  warehouseType?: string;
+
+  /**
+   * 仓库功能
+   */
+  warehouseFunction?: string;
+
+  /**
+   * 是否支持发货
+   */
+  isShip?: string;
+
+  /**
+   * 是否支持退货
+   */
+  isReturn?: string;
+
+  /**
+   * 是否默认仓库
+   */
+  isDefault?: string;
+
+  /**
+   * 是否前台展示
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 联系人姓名
+   */
+  contacts?: string;
+
+  /**
+   * 手机号
+   */
+  mobile?: string;
+
+  /**
+   * 固定电话
+   */
+  phone?: string;
+
+  /**
+   * 详细地址
+   */
+  address?: string;
+
+  /**
+   * 邮政编码
+   */
+  zipCode?: string;
+
+  /**
+   * 最大配送时效(天)
+   */
+  maxLeadTime?: number;
+
+  /**
+   * 最小配送时效(天)
+   */
+  minLeadTime?: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 63 - 0
src/api/customer/bank/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { BankVO, BankForm, BankQuery } from '@/api/customer/bank/types';
+
+/**
+ * 查询供应商银行账户列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listBank = (query?: BankQuery): AxiosPromise<BankVO[]> => {
+  return request({
+    url: '/customer/supplierbank/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询供应商银行账户详细
+ * @param id
+ */
+export const getBank = (id: string | number): AxiosPromise<BankVO> => {
+  return request({
+    url: '/customer/supplierbank/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增供应商银行账户
+ * @param data
+ */
+export const addBank = (data: BankForm) => {
+  return request({
+    url: '/customer/supplierbank',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改供应商银行账户
+ * @param data
+ */
+export const updateBank = (data: BankForm) => {
+  return request({
+    url: '/customer/supplierbank',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除供应商银行账户
+ * @param id
+ */
+export const delBank = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/supplierbank/' + id,
+    method: 'delete'
+  });
+};

+ 156 - 0
src/api/customer/bank/types.ts

@@ -0,0 +1,156 @@
+export interface BankVO {
+  /**
+   * 账户序号
+   */
+  num: number;
+
+  /**
+   * 供应商编号
+   */
+  supplierNo: string;
+
+  /**
+   * 供应商ID
+   */
+  supplierId: string | number;
+
+  /**
+   * 银行行号
+   */
+  bankNum: string;
+
+  /**
+   * 银行信息编号(可能为内部系统编号)
+   */
+  bankInfoNo: string;
+
+  /**
+   * 银行名称
+   */
+  bankName: string;
+
+  /**
+   * 银行账号
+   */
+  bankNo: string;
+
+}
+
+export interface BankForm extends BaseEntity {
+  /**
+   * 账户序号
+   */
+  num?: number;
+
+  /**
+   * 供应商编号
+   */
+  supplierNo?: string;
+
+  /**
+   * 供应商ID
+   */
+  supplierId?: string | number;
+
+  /**
+   * 银行行号
+   */
+  bankNum?: string;
+
+  /**
+   * 银行信息编号(银行ID)
+   */
+  bankInfoNo?: string | number;
+
+  /**
+   * 银行名称
+   */
+  bankName?: string;
+
+  /**
+   * 银行账号
+   */
+  bankNo?: string;
+
+  /**
+   * 账户有效性标识(1-有效, 0-无效)
+   */
+  isture?: string;
+
+  /**
+   * 纳税人识别号
+   */
+  circlesName?: string;
+
+  /**
+   * 账户预留电话
+   */
+  phone?: string;
+
+  /**
+   * 发票类型编号(发票类型ID)
+   */
+  invoiceTypeNo?: string | number;
+
+  /**
+   * 发票类型名称
+   */
+  invoiceTypeName?: string;
+
+  /**
+   * 企业工商名称(发票抬头)
+   */
+  businessName?: string;
+
+  /**
+   * 工商地址
+   */
+  businessAddress?: string;
+
+}
+
+export interface BankQuery extends PageQuery {
+
+  /**
+   * 账户序号
+   */
+  num?: number;
+
+  /**
+   * 供应商编号
+   */
+  supplierNo?: string;
+
+  /**
+   * 供应商ID
+   */
+  supplierId?: string | number;
+
+  /**
+   * 银行行号
+   */
+  bankNum?: string;
+
+  /**
+   * 银行信息编号(可能为内部系统编号)
+   */
+  bankInfoNo?: string;
+
+  /**
+   * 银行名称
+   */
+  bankName?: string;
+
+  /**
+   * 银行账号
+   */
+  bankNo?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 77 - 0
src/api/customer/bussineInfo/index.ts

@@ -0,0 +1,77 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { BusinessInfoVO, BusinessInfoForm, BusinessInfoQuery } from '@/api/customer/bussineInfo/types';
+
+/**
+ * 查询供应商工商注册信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listBusinessInfo = (query?: BusinessInfoQuery): AxiosPromise<BusinessInfoVO[]> => {
+  return request({
+    url: '/customer/sbusinessInfo/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询供应商工商注册信息详细
+ * @param supplierId
+ */
+export const getBusinessInfo = (supplierId: string | number): AxiosPromise<BusinessInfoVO> => {
+  return request({
+    url: '/customer/sbusinessInfo/' + supplierId,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增供应商工商注册信息
+ * @param data
+ */
+export const addBusinessInfo = (data: BusinessInfoForm) => {
+  return request({
+    url: '/customer/sbusinessInfo',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改供应商工商注册信息
+ * @param data
+ */
+export const updateBusinessInfo = (data: BusinessInfoForm) => {
+  return request({
+    url: '/customer/sbusinessInfo',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除供应商工商注册信息
+ * @param supplierId
+ */
+export const delBusinessInfo = (supplierId: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/sbusinessInfo/' + supplierId,
+    method: 'delete'
+  });
+};
+
+/**
+ * 获取工商信息
+ * @param enterpriseName 企业名称
+ */
+export const getBusinessInformation = (enterpriseName: string) => {
+  return request({
+    url: '/customer/sbusinessInfo/getinformation',
+    method: 'get',
+    params: {
+      enterpriseName
+    }
+  });
+};

+ 206 - 0
src/api/customer/bussineInfo/types.ts

@@ -0,0 +1,206 @@
+export interface BusinessInfoVO {
+  /**
+   * 关联客户ID
+   */
+  supplierId: string | number;
+
+  /**
+   * 工商全称
+   */
+  businessName: string;
+
+  /**
+   * 统一社会信用代码
+   */
+  socialCreditCode: string;
+
+  /**
+   * 法人姓名
+   */
+  legalPersonName: string;
+
+  /**
+   * 注册资本
+   */
+  registeredCapital: string;
+
+  /**
+   * 实缴资本
+   */
+  paidInCapital: string | number;
+
+  /**
+   * 成立日期
+   */
+  establishmentDate: string;
+
+  /**
+   * 吊销日期
+   */
+  revocationDate: string;
+
+  /**
+   * 登记状态
+   */
+  registrationStatus: string;
+
+  /**
+   * 登记机关
+   */
+  registrationAuthority: string;
+
+  /**
+   * 经营范围
+   */
+  bussinessRange: string;
+
+  /**
+   * 营业执照路径
+   */
+  businessLicense: string;
+
+  /**
+   * 工商地址-详细地址
+   */
+  businessAddress: string;
+
+}
+
+export interface BusinessInfoForm extends BaseEntity {
+  /**
+   * 关联客户ID
+   */
+  supplierId?: string | number;
+
+  /**
+   * 工商全称
+   */
+  businessName?: string;
+
+  /**
+   * 统一社会信用代码
+   */
+  socialCreditCode?: string;
+
+  /**
+   * 法人姓名
+   */
+  legalPersonName?: string;
+
+  /**
+   * 注册资本
+   */
+  registeredCapital?: string;
+
+  /**
+   * 实缴资本
+   */
+  paidInCapital?: string | number;
+
+  /**
+   * 成立日期
+   */
+  establishmentDate?: string;
+
+  /**
+   * 吊销日期
+   */
+  revocationDate?: string;
+
+  /**
+   * 登记状态
+   */
+  registrationStatus?: string;
+
+  /**
+   * 登记机关
+   */
+  registrationAuthority?: string;
+
+  /**
+   * 经营范围
+   */
+  bussinessRange?: string;
+
+  /**
+   * 营业执照路径
+   */
+  businessLicense?: string;
+
+  /**
+   * 工商地址-详细地址
+   */
+  businessAddress?: string;
+
+}
+
+export interface BusinessInfoQuery extends PageQuery {
+
+  /**
+   * 工商全称
+   */
+  businessName?: string;
+
+  /**
+   * 统一社会信用代码
+   */
+  socialCreditCode?: string;
+
+  /**
+   * 法人姓名
+   */
+  legalPersonName?: string;
+
+  /**
+   * 注册资本
+   */
+  registeredCapital?: string;
+
+  /**
+   * 实缴资本
+   */
+  paidInCapital?: string | number;
+
+  /**
+   * 成立日期
+   */
+  establishmentDate?: string;
+
+  /**
+   * 吊销日期
+   */
+  revocationDate?: string;
+
+  /**
+   * 登记状态
+   */
+  registrationStatus?: string;
+
+  /**
+   * 登记机关
+   */
+  registrationAuthority?: string;
+
+  /**
+   * 经营范围
+   */
+  bussinessRange?: string;
+
+  /**
+   * 营业执照路径
+   */
+  businessLicense?: string;
+
+  /**
+   * 工商地址-详细地址
+   */
+  businessAddress?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 63 - 0
src/api/customer/contact/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { ContactVO, ContactForm, ContactQuery } from '@/api/customer/contact/types';
+
+/**
+ * 查询联系人列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listContact = (query?: ContactQuery): AxiosPromise<ContactVO[]> => {
+  return request({
+    url: '/customer/contact/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询联系人详细
+ * @param id
+ */
+export const getContact = (id: string | number): AxiosPromise<ContactVO> => {
+  return request({
+    url: '/customer/contact/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增联系人
+ * @param data
+ */
+export const addContact = (data: ContactForm) => {
+  return request({
+    url: '/customer/contact',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改联系人
+ * @param data
+ */
+export const updateContact = (data: ContactForm) => {
+  return request({
+    url: '/customer/contact',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除联系人
+ * @param id
+ */
+export const delContact = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/contact/' + id,
+    method: 'delete'
+  });
+};

+ 201 - 0
src/api/customer/contact/types.ts

@@ -0,0 +1,201 @@
+export interface ContactVO {
+  /**
+   * ID
+   */
+  id?: string | number;
+
+  /**
+   * 供应商编号
+   */
+  supplierNo?: string;
+
+  /**
+   * 供应商ID
+   */
+  supplierId?: string | number;
+
+  /**
+   * 供应商名称
+   */
+  supplierName?: string;
+
+  /**
+   * 用户ID
+   */
+  userNo?: string;
+
+  /**
+   * A10标识号
+   */
+  abutment_no?: string;
+
+  /**
+   * 员工姓名
+   */
+  userName?: string;
+
+  /**
+   * 手机号
+   */
+  phone?: string;
+
+  /**
+   * 角色
+   */
+  roleNo?: string;
+
+  /**
+   * 部门
+   */
+  departmentNo?: string;
+
+  /**
+   * 职位
+   */
+  position?: string;
+
+  /**
+   * 主要联系人(0-否,1-是)
+   */
+  isPrimaryContact?: string;
+
+  /**
+   * 允许登录供应商端(0-否,1-是)
+   */
+  isRegister?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 邮箱
+   */
+  email?: string;
+
+  /**
+   * 传真
+   */
+  fax?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface ContactForm extends BaseEntity {
+  /**
+   * 供应商编号
+   */
+  supplierNo?: string;
+
+  /**
+   * 供应商ID
+   */
+  supplierId?: string | number;
+
+  /**
+   * 用户ID
+   */
+  userNo?: string;
+
+  /**
+   * A10标识号
+   */
+  abutment_no?: string;
+
+  /**
+   * 员工姓名
+   */
+  userName?: string;
+
+  /**
+   * 手机号
+   */
+  phone?: string;
+
+  /**
+   * 角色
+   */
+  roleNo?: string;
+
+  /**
+   * 部门
+   */
+  departmentNo?: string;
+
+  /**
+   * 职位
+   */
+  position?: string;
+
+  /**
+   * 主要联系人(0-否,1-是)
+   */
+  isPrimaryContact?: string;
+
+  /**
+   * 允许登录供应商端(0-否,1-是)
+   */
+  isRegister?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 邮箱
+   */
+  email?: string;
+
+  /**
+   * 传真
+   */
+  fax?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface ContactQuery extends PageQuery {
+
+  /**
+   * 供应商编号
+   */
+  supplierNo?: string;
+
+  /**
+   * 供应商ID
+   */
+  supplierId?: string | number;
+
+  /**
+   * 用户ID
+   */
+  userNo?: string;
+
+  /**
+   * 员工姓名
+   */
+  userName?: string;
+
+  /**
+   * 手机号
+   */
+  phone?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}

+ 63 - 0
src/api/customer/customerCategory/enterpriseScale/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { EnterpriseScaleVO, EnterpriseScaleForm, EnterpriseScaleQuery } from '@/api/customer/customerCategory/enterpriseScale/types';
+
+/**
+ * 查询企业规模列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listEnterpriseScale = (query?: EnterpriseScaleQuery): AxiosPromise<EnterpriseScaleVO[]> => {
+  return request({
+    url: '/customer/enterpriseScale/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询企业规模详细
+ * @param id
+ */
+export const getEnterpriseScale = (id: string | number): AxiosPromise<EnterpriseScaleVO> => {
+  return request({
+    url: '/customer/enterpriseScale/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增企业规模
+ * @param data
+ */
+export const addEnterpriseScale = (data: EnterpriseScaleForm) => {
+  return request({
+    url: '/customer/enterpriseScale',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改企业规模
+ * @param data
+ */
+export const updateEnterpriseScale = (data: EnterpriseScaleForm) => {
+  return request({
+    url: '/customer/enterpriseScale',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除企业规模
+ * @param id
+ */
+export const delEnterpriseScale = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/enterpriseScale/' + id,
+    method: 'delete'
+  });
+};

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

@@ -0,0 +1,75 @@
+export interface EnterpriseScaleVO {
+  /**
+   * ID
+   */
+  id: string | number;
+
+  /**
+   * 企业规模名称
+   */
+  enterpriseScaleName: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode: string;
+}
+
+export interface EnterpriseScaleForm extends BaseEntity {
+  /**
+   * ID
+   */
+  id?: string | number;
+
+  /**
+   * 企业规模名称
+   */
+  enterpriseScaleName?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+}
+
+export interface EnterpriseScaleQuery extends PageQuery {
+  /**
+   * 企业规模名称
+   */
+  enterpriseScaleName?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 63 - 0
src/api/customer/customerCategory/industryCategory/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { IndustryCategoryVO, IndustryCategoryForm, IndustryCategoryQuery } from '@/api/customer/customerCategory/industryCategory/types';
+
+/**
+ * 查询所属行业列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listIndustryCategory = (query?: IndustryCategoryQuery): AxiosPromise<IndustryCategoryVO[]> => {
+  return request({
+    url: '/customer/industryCategory/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询所属行业详细
+ * @param id
+ */
+export const getIndustryCategory = (id: string | number): AxiosPromise<IndustryCategoryVO> => {
+  return request({
+    url: '/customer/industryCategory/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增所属行业
+ * @param data
+ */
+export const addIndustryCategory = (data: IndustryCategoryForm) => {
+  return request({
+    url: '/customer/industryCategory',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改所属行业
+ * @param data
+ */
+export const updateIndustryCategory = (data: IndustryCategoryForm) => {
+  return request({
+    url: '/customer/industryCategory',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除所属行业
+ * @param id
+ */
+export const delIndustryCategory = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/industryCategory/' + id,
+    method: 'delete'
+  });
+};

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

@@ -0,0 +1,75 @@
+export interface IndustryCategoryVO {
+  /**
+   * ID
+   */
+  id: string | number;
+
+  /**
+   * 所属行业
+   */
+  industryCategoryName: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode: string;
+}
+
+export interface IndustryCategoryForm extends BaseEntity {
+  /**
+   * ID
+   */
+  id?: string | number;
+
+  /**
+   * 所属行业
+   */
+  industryCategoryName?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+}
+
+export interface IndustryCategoryQuery extends PageQuery {
+  /**
+   * 所属行业
+   */
+  industryCategoryName?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 74 - 0
src/api/customer/customerFile/businessInfo/index.ts

@@ -0,0 +1,74 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { BusinessInfoVO, BusinessInfoForm, BusinessInfoQuery } from '@/api/customer/customerFile/businessInfo/types';
+
+/**
+ * 查询客户工商注册信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listBusinessInfo = (query?: BusinessInfoQuery): AxiosPromise<BusinessInfoVO[]> => {
+  return request({
+    url: '/customer/businessInfo/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询客户工商注册信息详细
+ * @param customerId
+ */
+export const getBusinessInfo = (customerId: string | number): AxiosPromise<BusinessInfoVO> => {
+  return request({
+    url: '/customer/businessInfo/' + customerId,
+    method: 'get'
+  });
+};
+
+/**
+ * 查询客户工商注册信息详细
+ * @param customerName
+ */
+export const getBusinessInfoBycustomerName = (customerName: string): AxiosPromise<BusinessInfoVO> => {
+  return request({
+    url: '/customer/businessInfo/selectBusinessByCustomerName/' + customerName,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增客户工商注册信息
+ * @param data
+ */
+export const addBusinessInfo = (data: BusinessInfoForm) => {
+  return request({
+    url: '/customer/businessInfo',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改客户工商注册信息
+ * @param data
+ */
+export const updateBusinessInfo = (data: BusinessInfoForm) => {
+  return request({
+    url: '/customer/businessInfo',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除客户工商注册信息
+ * @param customerId
+ */
+export const delBusinessInfo = (customerId: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/businessInfo/' + customerId,
+    method: 'delete'
+  });
+};

+ 230 - 0
src/api/customer/customerFile/businessInfo/types.ts

@@ -0,0 +1,230 @@
+export interface BusinessInfoVO {
+  /**
+   * 关联客户ID
+   */
+  customerId: string | number;
+
+  /**
+   * 工商全称
+   */
+  businessCustomerName: string;
+
+  /**
+   * 统一社会信用代码
+   */
+  socialCreditCode: string;
+
+  /**
+   * 法人姓名
+   */
+  legalPersonName: string;
+
+  /**
+   * 注册资本
+   */
+  registeredCapital: string;
+
+  /**
+   * 实缴资本
+   */
+  paidInCapital: string | number;
+
+  /**
+   * 成立日期
+   */
+  establishmentDate: string;
+
+  /**
+   * 吊销日期
+   */
+  revocationDate: string;
+
+  /**
+   * 登记状态
+   */
+  registrationStatus: string;
+
+  /**
+   * 登记机关
+   */
+  registrationAuthority: string;
+
+  /**
+   * 经营范围
+   */
+  bussinessRange: string;
+
+  /**
+   * 营业执照路径
+   */
+  businessLicense: string;
+
+  /**
+   * 工商地址-详细地址
+   */
+  businessAddress: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface BusinessInfoForm extends BaseEntity {
+  /**
+   * 关联客户ID
+   */
+  customerId?: string | number;
+
+  /**
+   * 工商全称
+   */
+  businessCustomerName?: string;
+
+  /**
+   * 统一社会信用代码
+   */
+  socialCreditCode?: string;
+
+  /**
+   * 法人姓名
+   */
+  legalPersonName?: string;
+
+  /**
+   * 注册资本
+   */
+  registeredCapital?: string;
+
+  /**
+   * 实缴资本
+   */
+  paidInCapital?: string | number;
+
+  /**
+   * 成立日期
+   */
+  establishmentDate?: string;
+
+  /**
+   * 吊销日期
+   */
+  revocationDate?: string;
+
+  /**
+   * 登记状态
+   */
+  registrationStatus?: string;
+
+  /**
+   * 登记机关
+   */
+  registrationAuthority?: string;
+
+  /**
+   * 经营范围
+   */
+  bussinessRange?: string;
+
+  /**
+   * 营业执照路径
+   */
+  businessLicense?: string;
+
+  /**
+   * 工商地址-详细地址
+   */
+  businessAddress?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface BusinessInfoQuery extends PageQuery {
+  /**
+   * 工商全称
+   */
+  businessCustomerName?: string;
+
+  /**
+   * 统一社会信用代码
+   */
+  socialCreditCode?: string;
+
+  /**
+   * 法人姓名
+   */
+  legalPersonName?: string;
+
+  /**
+   * 注册资本
+   */
+  registeredCapital?: string;
+
+  /**
+   * 实缴资本
+   */
+  paidInCapital?: string | number;
+
+  /**
+   * 成立日期
+   */
+  establishmentDate?: string;
+
+  /**
+   * 吊销日期
+   */
+  revocationDate?: string;
+
+  /**
+   * 登记状态
+   */
+  registrationStatus?: string;
+
+  /**
+   * 登记机关
+   */
+  registrationAuthority?: string;
+
+  /**
+   * 经营范围
+   */
+  bussinessRange?: string;
+
+  /**
+   * 营业执照路径
+   */
+  businessLicense?: string;
+
+  /**
+   * 工商地址-详细地址
+   */
+  businessAddress?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 63 - 0
src/api/customer/customerFile/contract/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { ContractVO, ContractForm, ContractQuery } from '@/api/customer/customerFile/contract/types';
+
+/**
+ * 查询客户合同列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listContract = (query?: ContractQuery): AxiosPromise<ContractVO[]> => {
+  return request({
+    url: '/customer/contract/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询客户合同详细
+ * @param id
+ */
+export const getContract = (id: string | number): AxiosPromise<ContractVO> => {
+  return request({
+    url: '/customer/contract/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增客户合同
+ * @param data
+ */
+export const addContract = (data: ContractForm) => {
+  return request({
+    url: '/customer/contract',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改客户合同
+ * @param data
+ */
+export const updateContract = (data: ContractForm) => {
+  return request({
+    url: '/customer/contract',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除客户合同
+ * @param id
+ */
+export const delContract = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/contract/' + id,
+    method: 'delete'
+  });
+};

+ 264 - 0
src/api/customer/customerFile/contract/types.ts

@@ -0,0 +1,264 @@
+export interface ContractVO {
+  /**
+   * ID
+   */
+  id: string | number;
+
+  /**
+   * 客户编号
+   */
+  customerNo: string;
+
+  /**
+   * 客户id
+   */
+  customerId: string | number;
+
+  /**
+   * 合同编号
+   */
+  contractNo: string;
+
+  /**
+   * 合同名称
+   */
+  contractName: string;
+
+  customerName: string;
+
+  /**
+   * 合同金额
+   */
+  contractAmount: string;
+
+  /**
+   * 客服负责人
+   */
+  customerLeader: string;
+
+  /**
+   * 项目负责人
+   */
+  projectLeader: string;
+
+  /**
+   * 合同类型
+   */
+  contractType: string;
+
+  /**
+   * 合同开始时间
+   */
+  startTime: string;
+
+  /**
+   * 合同结束时间
+   */
+  endTime: string;
+
+  /**
+   * 合同上传时间
+   */
+  uploadTime: string;
+
+  /**
+   * 结算方式
+   */
+  settlementType: string;
+
+  /**
+   * 合同状态
+   */
+  contractStatus: string;
+
+  /**
+   * 审批状态(如:0-待审批,1-已通过,2-已驳回等)
+   */
+  approvalStatus: string;
+
+  /**
+   * 附件路径或信息
+   */
+  annex: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface ContractForm extends BaseEntity {
+  /**
+   * ID
+   */
+  id?: string | number;
+
+  /**
+   * 客户编号
+   */
+  customerNo?: string;
+
+  customerName?: string;
+
+  /**
+   * 客户id
+   */
+  customerId?: string | number;
+
+  /**
+   * 合同编号
+   */
+  contractNo?: string;
+
+  /**
+   * 合同名称
+   */
+  contractName?: string;
+
+  /**
+   * 合同金额
+   */
+  contractAmount?: string;
+
+  /**
+   * 客服负责人
+   */
+  customerLeader?: string;
+
+  /**
+   * 项目负责人
+   */
+  projectLeader?: string;
+
+  /**
+   * 合同类型
+   */
+  contractType?: string;
+
+  /**
+   * 合同开始时间
+   */
+  startTime?: string;
+
+  /**
+   * 合同结束时间
+   */
+  endTime?: string;
+
+  /**
+   * 合同上传时间
+   */
+  uploadTime?: string;
+
+  /**
+   * 结算方式
+   */
+  settlementType?: string;
+
+  /**
+   * 合同状态
+   */
+  contractStatus?: string;
+
+  /**
+   * 审批状态(如:0-待审批,1-已通过,2-已驳回等)
+   */
+  approvalStatus?: string;
+
+  /**
+   * 附件路径或信息
+   */
+  annex?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface ContractQuery extends PageQuery {
+  /**
+   * 客户编号
+   */
+  customerNo?: string;
+
+  /**
+   * 客户id
+   */
+  customerId?: string | number;
+
+  /**
+   * 合同编号
+   */
+  contractNo?: string;
+
+  /**
+   * 合同名称
+   */
+  contractName?: string;
+
+  /**
+   * 合同金额
+   */
+  contractAmount?: string;
+
+  /**
+   * 客服负责人
+   */
+  customerLeader?: string;
+
+  /**
+   * 项目负责人
+   */
+  projectLeader?: string;
+
+  /**
+   * 合同类型
+   */
+  contractType?: string;
+
+  /**
+   * 合同开始时间
+   */
+  startTime?: string;
+
+  /**
+   * 合同结束时间
+   */
+  endTime?: string;
+
+  /**
+   * 合同上传时间
+   */
+  uploadTime?: string;
+
+  /**
+   * 结算方式
+   */
+  settlementType?: string;
+
+  /**
+   * 合同状态
+   */
+  contractStatus?: string;
+
+  /**
+   * 审批状态(如:0-待审批,1-已通过,2-已驳回等)
+   */
+  approvalStatus?: string;
+
+  /**
+   * 附件路径或信息
+   */
+  annex?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 63 - 0
src/api/customer/customerFile/customerContact/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { CustomerContactVO, CustomerContactForm, CustomerContactQuery } from '@/api/customer/customerFile/customerContact/types';
+
+/**
+ * 查询客户联系人信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listCustomerContact = (query?: CustomerContactQuery): AxiosPromise<CustomerContactVO[]> => {
+  return request({
+    url: '/customer/customerContact/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询客户联系人信息详细
+ * @param id
+ */
+export const getCustomerContact = (id: string | number): AxiosPromise<CustomerContactVO> => {
+  return request({
+    url: '/customer/customerContact/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增客户联系人信息
+ * @param data
+ */
+export const addCustomerContact = (data: CustomerContactForm) => {
+  return request({
+    url: '/customer/customerContact',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改客户联系人信息
+ * @param data
+ */
+export const updateCustomerContact = (data: CustomerContactForm) => {
+  return request({
+    url: '/customer/customerContact',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除客户联系人信息
+ * @param id
+ */
+export const delCustomerContact = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/customerContact/' + id,
+    method: 'delete'
+  });
+};

+ 269 - 0
src/api/customer/customerFile/customerContact/types.ts

@@ -0,0 +1,269 @@
+export interface CustomerContactVO {
+  /**
+   * 联系人ID
+   */
+  id: string | number;
+
+  /**
+   * 所属客户ID
+   */
+  customerId: string | number;
+
+  /**
+   * 联系人姓名
+   */
+  contactName: string;
+
+  customLoginName: string;
+
+  /**
+   * 手机号码
+   */
+  phone: string;
+
+  /**
+   * 办公电话
+   */
+  officePhone: string;
+
+  /**
+   * 办公电话2
+   */
+  officePhoneTwo: string;
+
+  /**
+   * 性别
+   */
+  gender: string;
+
+  /**
+   * 采购角色(如:采购经理、财务)
+   */
+  roleId: string | number;
+
+  roleName: string;
+
+  deptId: string | number;
+
+  deptName: string;
+
+  /**
+   * 是否主联系人:0=是,1=否
+   */
+  isPrimary: string;
+
+  birthday: Date;
+
+  /**
+   * 详细地址
+   */
+  addressDetail: string;
+
+  /**
+   * 所在省编码
+   */
+  addressProvince: string;
+
+  /**
+   * 所在市编码
+   */
+  addressCity: string;
+
+  /**
+   * 所在区县编码
+   */
+  addressCounty: string;
+
+  /**
+   * 省市区
+   */
+  provincialCityCounty: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface CustomerContactForm extends BaseEntity {
+  /**
+   * 联系人ID
+   */
+  id?: string | number;
+
+  /**
+   * 所属客户ID
+   */
+  customerId?: string | number;
+
+  /**
+   * 联系人姓名
+   */
+  contactName?: string;
+
+  customLoginName?: string;
+
+  /**
+   * 手机号码
+   */
+  phone?: string;
+
+  /**
+   * 办公电话
+   */
+  officePhone?: string;
+
+  /**
+   * 办公电话2
+   */
+  officePhoneTwo?: string;
+
+  /**
+   * 性别
+   */
+  gender?: string;
+
+  /**
+   * 采购角色(如:采购经理、财务)
+   */
+  roleId?: string | number;
+
+  roleName?: string;
+
+  deptId?: string | number;
+
+  deptName?: string;
+
+  email: string;
+
+  /**
+   * 是否主联系人:0=是,1=否
+   */
+  isPrimary?: string;
+
+  birthday?: Date;
+
+  /**
+   * 详细地址
+   */
+  addressDetail?: string;
+
+  /**
+   * 所在省编码
+   */
+  addressProvince?: string;
+
+  /**
+   * 所在市编码
+   */
+  addressCity?: string;
+
+  /**
+   * 所在区县编码
+   */
+  addressCounty?: string;
+
+  /**
+   * 省市区
+   */
+  provincialCityCounty?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface CustomerContactQuery extends PageQuery {
+  /**
+   * 所属客户ID
+   */
+  customerId?: string | number;
+
+  /**
+   * 联系人姓名
+   */
+  contactName?: string;
+
+  /**
+   * 手机号码
+   */
+  phone?: string;
+
+  email?: string;
+
+  /**
+   * 办公电话
+   */
+  officePhone?: string;
+
+  /**
+   * 办公电话2
+   */
+  officePhoneTwo?: string;
+
+  /**
+   * 性别
+   */
+  gender?: string;
+
+  /**
+   * 采购角色(如:采购经理、财务)
+   */
+  roleId?: string | number;
+
+  /**
+   * 是否主联系人:0=是,1=否
+   */
+  isPrimary?: string;
+
+  /**
+   * 详细地址
+   */
+  addressDetail?: string;
+
+  /**
+   * 所在省编码
+   */
+  addressProvince?: string;
+
+  /**
+   * 所在市编码
+   */
+  addressCity?: string;
+
+  /**
+   * 所在区县编码
+   */
+  addressCounty?: string;
+
+  /**
+   * 省市区
+   */
+  provincialCityCounty?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 63 - 0
src/api/customer/customerFile/customerDept/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { CustomerDeptVO, CustomerDeptForm, CustomerDeptQuery } from '@/api/customer/customerFile/customerDept/types';
+
+/**
+ * 查询客户部门信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listCustomerDept = (query?: CustomerDeptQuery): AxiosPromise<CustomerDeptVO[]> => {
+  return request({
+    url: '/customer/customerDept/tree',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询客户部门信息详细
+ * @param id
+ */
+export const getCustomerDept = (id: string | number): AxiosPromise<CustomerDeptVO> => {
+  return request({
+    url: '/customer/customerDept/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增客户部门信息
+ * @param data
+ */
+export const addCustomerDept = (data: CustomerDeptForm) => {
+  return request({
+    url: '/customer/customerDept',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改客户部门信息
+ * @param data
+ */
+export const updateCustomerDept = (data: CustomerDeptForm) => {
+  return request({
+    url: '/customer/customerDept',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除客户部门信息
+ * @param id
+ */
+export const delCustomerDept = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/customerDept/' + id,
+    method: 'delete'
+  });
+};

+ 325 - 0
src/api/customer/customerFile/customerDept/types.ts

@@ -0,0 +1,325 @@
+export interface CustomerDeptVO {
+  /**
+   * ID
+   */
+  deptId: string | number;
+
+  /**
+   * 部门编号
+   */
+  deptNo: string;
+
+  /**
+   * 部门名称
+   */
+  deptName: string;
+
+  /**
+   * 父部门id
+   */
+  parentId: string | number;
+
+  /**
+   * 祖级列表
+   */
+  ancestors: string;
+
+  /**
+   * 客户编号
+   */
+  customerId: string | number;
+
+  /**
+   * 部门层级(如1级、2级等)
+   */
+  departmentLevel: number;
+
+  /**
+   * 年度预算
+   */
+  yearlyBudget: number;
+
+  /**
+   * 已使用预算
+   */
+  usedBudget: number;
+
+  /**
+   * 月度限额
+   */
+  monthLimit: number;
+
+  /**
+   * 月度已用预算
+   */
+  monthUsedBudget: number;
+
+  /**
+   * 绑定状态
+   */
+  bindStatus: string;
+
+  /**
+   * 绑定地址
+   */
+  bindAddress: string;
+
+  /**
+   * 部门负责人
+   */
+  deptManage: string;
+
+  /**
+   * 是否限制预算
+   */
+  isLimit: string;
+
+  /**
+   * 所选年份
+   */
+  selectYear: string;
+
+  /**
+   * 费用类型
+   */
+  expenseType: string;
+
+  /**
+   * 年度剩余预算
+   */
+  residueYearlyBudget: string | number;
+
+  /**
+   * 充值金额
+   */
+  recharge: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+  /**
+   * 子对象
+   */
+  children: CustomerDeptVO[];
+}
+
+export interface CustomerDeptForm extends BaseEntity {
+  /**
+   * ID
+   */
+  deptId?: string | number;
+
+  /**
+   * 部门编号
+   */
+  deptNo?: string;
+
+  /**
+   * 部门名称
+   */
+  deptName?: string;
+
+  /**
+   * 父部门id
+   */
+  parentId?: string | number;
+
+  /**
+   * 祖级列表
+   */
+  ancestors?: string;
+
+  /**
+   * 客户编号
+   */
+  customerId?: string | number;
+
+  /**
+   * 部门层级(如1级、2级等)
+   */
+  departmentLevel?: number;
+
+  /**
+   * 年度预算
+   */
+  yearlyBudget?: number;
+
+  /**
+   * 已使用预算
+   */
+  usedBudget?: number;
+
+  /**
+   * 月度限额
+   */
+  monthLimit?: number;
+
+  /**
+   * 月度已用预算
+   */
+  monthUsedBudget?: number;
+
+  /**
+   * 绑定状态
+   */
+  bindStatus?: string;
+
+  /**
+   * 绑定地址
+   */
+  bindAddress?: string;
+
+  /**
+   * 部门负责人
+   */
+  deptManage?: string;
+
+  /**
+   * 是否限制预算
+   */
+  isLimit?: string;
+
+  /**
+   * 所选年份
+   */
+  selectYear?: string;
+
+  /**
+   * 费用类型
+   */
+  expenseType?: string;
+
+  /**
+   * 年度剩余预算
+   */
+  residueYearlyBudget?: string | number;
+
+  /**
+   * 充值金额
+   */
+  recharge?: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface CustomerDeptQuery {
+  /**
+   * 部门编号
+   */
+  deptNo?: string;
+
+  /**
+   * 部门名称
+   */
+  deptName?: string;
+
+  /**
+   * 父部门id
+   */
+  parentId?: string | number;
+
+  /**
+   * 祖级列表
+   */
+  ancestors?: string;
+
+  /**
+   * 客户编号
+   */
+  customerId?: string | number;
+
+  /**
+   * 部门层级(如1级、2级等)
+   */
+  departmentLevel?: number;
+
+  /**
+   * 年度预算
+   */
+  yearlyBudget?: number;
+
+  /**
+   * 已使用预算
+   */
+  usedBudget?: number;
+
+  /**
+   * 月度限额
+   */
+  monthLimit?: number;
+
+  /**
+   * 月度已用预算
+   */
+  monthUsedBudget?: number;
+
+  /**
+   * 绑定状态
+   */
+  bindStatus?: string;
+
+  /**
+   * 绑定地址
+   */
+  bindAddress?: string;
+
+  /**
+   * 部门负责人
+   */
+  deptManage?: string;
+
+  /**
+   * 是否限制预算
+   */
+  isLimit?: string;
+
+  /**
+   * 所选年份
+   */
+  selectYear?: string;
+
+  /**
+   * 费用类型
+   */
+  expenseType?: string;
+
+  /**
+   * 年度剩余预算
+   */
+  residueYearlyBudget?: string | number;
+
+  /**
+   * 充值金额
+   */
+  recharge?: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 133 - 0
src/api/customer/customerFile/customerInfo/index.ts

@@ -0,0 +1,133 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { CustomerInfoVO, CustomerInfoForm, CustomerInfoQuery } from '@/api/customer/customerFile/customerInfo/types';
+
+/**
+ * 查询客户信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listCustomerInfo = (query?: CustomerInfoQuery): AxiosPromise<CustomerInfoVO[]> => {
+  return request({
+    url: '/customer/customerInfo/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询客户信息详细
+ * @param id
+ */
+export const getCustomerInfo = (id: string | number): AxiosPromise<CustomerInfoVO> => {
+  return request({
+    url: '/customer/customerInfo/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增客户信息
+ * @param data
+ */
+export const addCustomerInfo = (data: CustomerInfoForm) => {
+  return request({
+    url: '/customer/customerInfo',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改客户信息
+ * @param data
+ */
+export const updateCustomerInfo = (data: CustomerInfoForm) => {
+  return request({
+    url: '/customer/customerInfo',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除客户信息
+ * @param id
+ */
+export const delCustomerInfo = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/customerInfo/' + id,
+    method: 'delete'
+  });
+};
+
+/**
+ * 状态修改
+ * @param id 客户id
+ * @param status 状态
+ */
+export function changeStatus(id: string, status: string) {
+  const data = {
+    id,
+    status
+  };
+  return request({
+    url: '/customer/customerInfo/changeStatus',
+    method: 'put',
+    data: data
+  });
+}
+
+/**
+ * 修改临时额度
+ * @param customerIds 客户id
+ * @param creditAmount 额度
+ */
+export function updateCreditAmount(customerIds: number[], temporaryQuota: number) {
+  const data = {
+    customerIds,
+    temporaryQuota
+  };
+  return request({
+    url: '/customer/customerInfo/updateCreditAmount',
+    method: 'put',
+    data: data
+  });
+}
+
+/**
+ * 修改临时额度
+ * @param customerIds 客户id
+ * @param tagIds 标签id
+ */
+export function setCustomerInfoTag(customerIds: number[], tagIds: number[]) {
+  const data = {
+    customerIds,
+    tagIds
+  };
+  return request({
+    url: '/customer/customerInfo/setCustomerInfoTag',
+    method: 'put',
+    data: data
+  });
+}
+
+export const listContractList = (query?: CustomerInfoQuery): AxiosPromise<CustomerInfoVO[]> => {
+  return request({
+    url: '/customer/customerInfo/contractList',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 根据名称模糊查询客户信息
+ * @param customerName
+ */
+export const getListBycustomerName = (customerName: string): AxiosPromise<CustomerInfoVO[]> => {
+  return request({
+    url: '/customer/customerInfo/selectByCustomerName/' + customerName,
+    method: 'get'
+  });
+};

+ 452 - 0
src/api/customer/customerFile/customerInfo/types.ts

@@ -0,0 +1,452 @@
+import type { BusinessInfoVO, BusinessInfoForm } from '../businessInfo/types';
+import type { CustomerContactVO, CustomerContactForm } from '../customerContact/types';
+import type { SalesInfoVO, SalesInfoForm } from '../salesInfo/types';
+import type { InvoiceInfoVO, InvoiceInfoForm } from '../invoiceInfo/types';
+
+export interface CustomerInfoVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 客户编号
+   */
+  customerNo: string;
+
+  /**
+   * 所属公司
+   */
+  belongCompanyId: string | number;
+
+  /**
+   * 公司名称
+   */
+  companyName: string;
+
+  /**
+   * 客户名称
+   */
+  customerName: string;
+
+  /**
+   * 工商名称
+   */
+  businessCustomerName: string;
+
+  /**
+   * 企业简称
+   */
+  shortName: string;
+
+  /**
+   * 开票类型
+   */
+  invoiceTypeId: string | number;
+
+  /**
+   * 企业规模
+   */
+  enterpriseScaleId: string | number;
+
+  enterpriseScale: string;
+
+  /**
+   * 客户类别
+   */
+  customerTypeId: string | number;
+
+  /**
+   * 行业类别
+   */
+  industryCategoryId: string | number;
+
+  industryCategory: string;
+
+  /**
+   * 客户等级
+   */
+  customerLevelId: string | number;
+
+  /**
+   * 固定电话
+   */
+  landline: string;
+
+  /**
+   * 传真
+   */
+  fax: string;
+
+  /**
+   * 网址
+   */
+  url: string;
+
+  /**
+   * 邮政编码
+   */
+  postCode: string;
+
+  /**
+   * 开始时间
+   */
+  validityFromDate: string | number;
+
+  /**
+   * 结束时间
+   */
+  validityToDate: string | number;
+
+  /**
+   * 发票抬头
+   */
+  invoiceTop: string;
+
+  /**
+   * 详细地址(注册地址)
+   */
+  address: string;
+
+  /**
+   * 省份编码
+   */
+  regProvincialNo: string;
+
+  /**
+   * 城市编码
+   */
+  regCityNo: string;
+
+  /**
+   * 区县编码
+   */
+  regCountyNo: string;
+
+  /**
+   * 省市区
+   */
+  provincialCityCounty: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+  /**
+   * 工商信息
+   */
+  customerBusinessInfoVo?: BusinessInfoVO;
+
+  /**
+   * 销售信息
+   */
+  customerSalesInfoVo?: SalesInfoVO;
+
+  /**
+   * 联系人列表
+   */
+  customerContactVoList?: CustomerContactVO[];
+
+  /**
+   * 开票信息列表
+   */
+  customerInvoiceInfoVoList?: InvoiceInfoVO[];
+}
+
+export interface CustomerInfoForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 客户编号
+   */
+  customerNo?: string;
+
+  /**
+   * 所属公司
+   */
+  belongCompanyId?: string | number;
+
+  /**
+   * 公司名称
+   */
+  companyName?: string;
+
+  /**
+   * 客户名称
+   */
+  customerName?: string;
+
+  /**
+   * 工商名称
+   */
+  businessCustomerName?: string;
+
+  /**
+   * 企业简称
+   */
+  shortName?: string;
+
+  /**
+   * 开票类型
+   */
+  invoiceTypeId?: string | number;
+
+  /**
+   * 企业规模
+   */
+  enterpriseScaleId?: string | number;
+
+  /**
+   * 客户类别
+   */
+  customerTypeId?: string | number;
+
+  /**
+   * 行业类别
+   */
+  industryCategoryId?: string | number;
+
+  /**
+   * 客户等级
+   */
+  customerLevelId?: string | number;
+
+  /**
+   * 固定电话
+   */
+  landline?: string;
+
+  /**
+   * 传真
+   */
+  fax?: string;
+
+  /**
+   * 网址
+   */
+  url?: string;
+
+  /**
+   * 邮政编码
+   */
+  postCode?: string;
+
+  /**
+   * 开始时间
+   */
+  validityFromDate?: string | number;
+
+  /**
+   * 结束时间
+   */
+  validityToDate?: string | number;
+
+  /**
+   * 发票抬头
+   */
+  invoiceTop?: string;
+
+  /**
+   * 详细地址(注册地址)
+   */
+  address?: string;
+
+  /**
+   * 省份编码
+   */
+  regProvincialNo?: string;
+
+  /**
+   * 城市编码
+   */
+  regCityNo?: string;
+
+  /**
+   * 区县编码
+   */
+  regCountyNo?: string;
+
+  /**
+   * 省市区
+   */
+  provincialCityCounty?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+  /**
+   * 工商信息
+   */
+  customerBusinessBo?: BusinessInfoForm;
+
+  /**
+   * 销售信息
+   */
+  customerSalesInfoBo?: SalesInfoForm;
+
+  /**
+   * 联系人列表
+   */
+  customerContactBoList?: CustomerContactForm[];
+
+  /**
+   * 开票信息列表
+   */
+  customerInvoiceInfoBoList?: InvoiceInfoForm[];
+}
+
+export interface CustomerInfoQuery extends PageQuery {
+  /**
+   * 客户编号
+   */
+  customerNo?: string;
+
+  /**
+   * 所属公司
+   */
+  belongCompanyId?: string | number;
+
+  /**
+   * 公司名称
+   */
+  companyName?: string;
+
+  /**
+   * 客户名称
+   */
+  customerName?: string;
+
+  /**
+   * 工商名称
+   */
+  businessCustomerName?: string;
+
+  /**
+   * 企业简称
+   */
+  shortName?: string;
+
+  /**
+   * 开票类型
+   */
+  invoiceTypeId?: string | number;
+
+  /**
+   * 企业规模
+   */
+  enterpriseScaleId?: string | number;
+
+  /**
+   * 客户类别
+   */
+  customerTypeId?: string | number;
+
+  /**
+   * 行业类别
+   */
+  industryCategoryId?: string | number;
+
+  /**
+   * 客户等级
+   */
+  customerLevelId?: string | number;
+
+  salesPersonId?: string | number;
+
+  serviceStaffId?: string | number;
+
+  belongingDepartmentId?: string | number;
+
+  /**
+   * 固定电话
+   */
+  landline?: string;
+
+  /**
+   * 传真
+   */
+  fax?: string;
+
+  /**
+   * 网址
+   */
+  url?: string;
+
+  /**
+   * 邮政编码
+   */
+  postCode?: string;
+
+  /**
+   * 开始时间
+   */
+  validityFromDate?: string | number;
+
+  /**
+   * 结束时间
+   */
+  validityToDate?: string | number;
+
+  /**
+   * 发票抬头
+   */
+  invoiceTop?: string;
+
+  /**
+   * 详细地址(注册地址)
+   */
+  address?: string;
+
+  /**
+   * 省份编码
+   */
+  regProvincialNo?: string;
+
+  /**
+   * 城市编码
+   */
+  regCityNo?: string;
+
+  /**
+   * 区县编码
+   */
+  regCountyNo?: string;
+
+  /**
+   * 省市区
+   */
+  provincialCityCounty?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  customerTag?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 63 - 0
src/api/customer/customerFile/groupCustomer/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { GroupCustomerVO, GroupCustomerForm, GroupCustomerQuery } from '@/api/customer/customerFile/groupCustomer/types';
+
+/**
+ * 查询集团客户关系列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listGroupCustomer = (query?: GroupCustomerQuery): AxiosPromise<GroupCustomerVO[]> => {
+  return request({
+    url: '/customer/groupCustomer/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询集团客户关系详细
+ * @param id
+ */
+export const getGroupCustomer = (id: string | number): AxiosPromise<GroupCustomerVO> => {
+  return request({
+    url: '/customer/groupCustomer/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增集团客户关系
+ * @param data
+ */
+export const addGroupCustomer = (data: GroupCustomerForm) => {
+  return request({
+    url: '/customer/groupCustomer',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改集团客户关系
+ * @param data
+ */
+export const updateGroupCustomer = (data: GroupCustomerForm) => {
+  return request({
+    url: '/customer/groupCustomer',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除集团客户关系
+ * @param id
+ */
+export const delGroupCustomer = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/groupCustomer/' + id,
+    method: 'delete'
+  });
+};

+ 95 - 0
src/api/customer/customerFile/groupCustomer/types.ts

@@ -0,0 +1,95 @@
+export interface GroupCustomerVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 集团客户id
+   */
+  groupCustomerId: string | number;
+
+  /**
+   * 客户id
+   */
+  customerId: string | number;
+
+  /**
+   * 客户等级
+   */
+  customerLevel: string;
+
+  /**
+   * 顶级客户id
+   */
+  topCustomerId: string | number;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface GroupCustomerForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 集团客户id
+   */
+  groupCustomerId?: string | number;
+
+  /**
+   * 客户id
+   */
+  customerId?: string | number;
+
+  /**
+   * 客户等级
+   */
+  customerLevel?: string;
+
+  /**
+   * 顶级客户id
+   */
+  topCustomerId?: string | number;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface GroupCustomerQuery extends PageQuery {
+  /**
+   * 集团客户id
+   */
+  groupCustomerId?: string | number;
+
+  /**
+   * 客户id
+   */
+  customerId?: string | number;
+
+  /**
+   * 客户等级
+   */
+  customerLevel?: string;
+
+  /**
+   * 顶级客户id
+   */
+  topCustomerId?: string | number;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 63 - 0
src/api/customer/customerFile/invoiceInfo/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { InvoiceInfoVO, InvoiceInfoForm, InvoiceInfoQuery } from '@/api/customer/customerFile/invoiceInfo/types';
+
+/**
+ * 查询客户开票信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listInvoiceInfo = (query?: InvoiceInfoQuery): AxiosPromise<InvoiceInfoVO[]> => {
+  return request({
+    url: '/customer/invoiceInfo/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询客户开票信息详细
+ * @param id
+ */
+export const getInvoiceInfo = (id: string | number): AxiosPromise<InvoiceInfoVO> => {
+  return request({
+    url: '/customer/invoiceInfo/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增客户开票信息
+ * @param data
+ */
+export const addInvoiceInfo = (data: InvoiceInfoForm) => {
+  return request({
+    url: '/customer/invoiceInfo',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改客户开票信息
+ * @param data
+ */
+export const updateInvoiceInfo = (data: InvoiceInfoForm) => {
+  return request({
+    url: '/customer/invoiceInfo',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除客户开票信息
+ * @param id
+ */
+export const delInvoiceInfo = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/invoiceInfo/' + id,
+    method: 'delete'
+  });
+};

+ 185 - 0
src/api/customer/customerFile/invoiceInfo/types.ts

@@ -0,0 +1,185 @@
+export interface InvoiceInfoVO {
+  /**
+   * 开票信息ID
+   */
+  id: string | number;
+
+  /**
+   * 所属客户ID
+   */
+  customerId: string | number;
+
+  /**
+   * 纳税人识别号
+   */
+  taxId: string | number;
+
+  /**
+   * 开户行行号
+   */
+  bankCode: string;
+
+  /**
+   * 开户行
+   */
+  bankId: string | number;
+
+  /**
+   * 开户行名称
+   */
+  bankName: string;
+
+  /**
+   * 银行账户
+   */
+  bankAccount: string;
+
+  /**
+   * 联系电话
+   */
+  phone: string;
+
+  /**
+   * 开户行地址
+   */
+  address: string;
+
+  /**
+   * 是否主账号:0=是,1=否
+   */
+  isPrimaryAccount: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface InvoiceInfoForm extends BaseEntity {
+  /**
+   * 开票信息ID
+   */
+  id?: string | number;
+
+  /**
+   * 所属客户ID
+   */
+  customerId?: string | number;
+
+  /**
+   * 纳税人识别号
+   */
+  taxId?: string | number;
+
+  /**
+   * 开户行行号
+   */
+  bankCode?: string;
+
+  /**
+   * 开户行
+   */
+  bankId?: string | number;
+
+  /**
+   * 开户行名称
+   */
+  bankName?: string;
+
+  /**
+   * 银行账户
+   */
+  bankAccount?: string;
+
+  /**
+   * 联系电话
+   */
+  phone?: string;
+
+  /**
+   * 开户行地址
+   */
+  address?: string;
+
+  /**
+   * 是否主账号:0=是,1=否
+   */
+  isPrimaryAccount?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface InvoiceInfoQuery extends PageQuery {
+  /**
+   * 所属客户ID
+   */
+  customerId?: string | number;
+
+  /**
+   * 纳税人识别号
+   */
+  taxId?: string | number;
+
+  /**
+   * 开户行行号
+   */
+  bankCode?: string;
+
+  /**
+   * 开户行
+   */
+  bankId?: string | number;
+
+  /**
+   * 开户行名称
+   */
+  bankName?: string;
+
+  /**
+   * 银行账户
+   */
+  bankAccount?: string;
+
+  /**
+   * 联系电话
+   */
+  phone?: string;
+
+  /**
+   * 开户行地址
+   */
+  address?: string;
+
+  /**
+   * 是否主账号:0=是,1=否
+   */
+  isPrimaryAccount?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 77 - 0
src/api/customer/customerFile/purchaseHabit/index.ts

@@ -0,0 +1,77 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { PurchaseHabitVO, PurchaseHabitForm, PurchaseHabitQuery } from '@/api/customer/customerFile/purchaseHabit/types';
+
+/**
+ * 查询客户采购习惯列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listPurchaseHabit = (query?: PurchaseHabitQuery): AxiosPromise<PurchaseHabitVO[]> => {
+  return request({
+    url: '/customer/purchaseHabit/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询客户采购习惯详细
+ * @param id
+ */
+export const getPurchaseHabit = (id: string | number): AxiosPromise<PurchaseHabitVO> => {
+  return request({
+    url: '/customer/purchaseHabit/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增客户采购习惯
+ * @param data
+ */
+export const addPurchaseHabit = (data: PurchaseHabitForm) => {
+  return request({
+    url: '/customer/purchaseHabit',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改客户采购习惯
+ * @param data
+ */
+export const updatePurchaseHabit = (data: PurchaseHabitForm) => {
+  return request({
+    url: '/customer/purchaseHabit',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除客户采购习惯
+ * @param id
+ */
+export const delPurchaseHabit = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/purchaseHabit/' + id,
+    method: 'delete'
+  });
+};
+
+/**
+ * 新增客户采购习惯
+ * @param data
+ */
+export const getCustomerPurchaseHabitData = (customerId: string | number): AxiosPromise<PurchaseHabitVO> => {
+  return request({
+    url: '/customer/purchaseHabit/getCustomerPurchaseHabitData',
+    method: 'get',
+    params: {
+      customerId: customerId
+    }
+  });
+};

+ 253 - 0
src/api/customer/customerFile/purchaseHabit/types.ts

@@ -0,0 +1,253 @@
+export interface PurchaseHabitVO {
+  /**
+   * ID
+   */
+  id: string | number;
+
+  customerId: string | number;
+
+  /**
+   * 客户编号
+   */
+  customerNo: string;
+
+  /**
+   * 月度采购量
+   */
+  monthPurchase: number;
+
+  /**
+   * 年度采购量
+   */
+  yearPurchase: number;
+
+  /**
+   * 常驻负责人/对接人
+   */
+  permanentOfficer: string;
+
+  /**
+   * 选择的机型/型号
+   */
+  choiceModel: string;
+
+  /**
+   * 打印量
+   */
+  printAmount: string;
+
+  /**
+   * 是否购买原装耗材(0-是,1-否)
+   */
+  buyOriginal: string;
+
+  /**
+   * 是否购买技术服务(0-是,1-否)
+   */
+  technologyService: string;
+
+  /**
+   * 采购品类(主选项)
+   */
+  purchaseCategory: string;
+
+  /**
+   * 采购品类(其他补充)
+   */
+  otherCategory: string;
+
+  /**
+   * 适用场景(主选项)
+   */
+  adaptScene: string;
+
+  /**
+   * 适用场景(其他补充)
+   */
+  otherScene: string;
+
+  /**
+   * 定制化需求(主选项)
+   */
+  customizeDemand: string;
+
+  /**
+   * 定制化需求(其他补充)
+   */
+  otherCustomize: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface PurchaseHabitForm extends BaseEntity {
+  /**
+   * ID
+   */
+  id?: string | number;
+
+  customerId?: string | number;
+
+  /**
+   * 客户编号
+   */
+  customerNo?: string;
+
+  /**
+   * 月度采购量
+   */
+  monthPurchase?: number;
+
+  /**
+   * 年度采购量
+   */
+  yearPurchase?: number;
+
+  /**
+   * 常驻负责人/对接人
+   */
+  permanentOfficer?: string;
+
+  /**
+   * 选择的机型/型号
+   */
+  choiceModel?: string;
+
+  /**
+   * 打印量
+   */
+  printAmount?: string;
+
+  /**
+   * 是否购买原装耗材(0-是,1-否)
+   */
+  buyOriginal?: string;
+
+  /**
+   * 是否购买技术服务(0-是,1-否)
+   */
+  technologyService?: string;
+
+  /**
+   * 采购品类(主选项)
+   */
+  purchaseCategory?: string;
+
+  /**
+   * 采购品类(其他补充)
+   */
+  otherCategory?: string;
+
+  /**
+   * 适用场景(主选项)
+   */
+  adaptScene?: string;
+
+  /**
+   * 适用场景(其他补充)
+   */
+  otherScene?: string;
+
+  /**
+   * 定制化需求(主选项)
+   */
+  customizeDemand?: string;
+
+  /**
+   * 定制化需求(其他补充)
+   */
+  otherCustomize?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface PurchaseHabitQuery extends PageQuery {
+  /**
+   * 客户ID
+   */
+  customerId?: string | number;
+  /**
+   * 客户编号
+   */
+  customerNo?: string;
+
+  /**
+   * 月度采购量
+   */
+  monthPurchase?: number;
+
+  /**
+   * 年度采购量
+   */
+  yearPurchase?: number;
+
+  /**
+   * 常驻负责人/对接人
+   */
+  permanentOfficer?: string;
+
+  /**
+   * 选择的机型/型号
+   */
+  choiceModel?: string;
+
+  /**
+   * 打印量
+   */
+  printAmount?: string;
+
+  /**
+   * 是否购买原装耗材(0-是,1-否)
+   */
+  buyOriginal?: string;
+
+  /**
+   * 是否购买技术服务(0-是,1-否)
+   */
+  technologyService?: string;
+
+  /**
+   * 采购品类(主选项)
+   */
+  purchaseCategory?: string;
+
+  /**
+   * 采购品类(其他补充)
+   */
+  otherCategory?: string;
+
+  /**
+   * 适用场景(主选项)
+   */
+  adaptScene?: string;
+
+  /**
+   * 适用场景(其他补充)
+   */
+  otherScene?: string;
+
+  /**
+   * 定制化需求(主选项)
+   */
+  customizeDemand?: string;
+
+  /**
+   * 定制化需求(其他补充)
+   */
+  otherCustomize?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 63 - 0
src/api/customer/customerFile/salesInfo/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { SalesInfoVO, SalesInfoForm, SalesInfoQuery } from '@/api/customer/customerFile/salesInfo/types';
+
+/**
+ * 查询客户销售信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listSalesInfo = (query?: SalesInfoQuery): AxiosPromise<SalesInfoVO[]> => {
+  return request({
+    url: '/customer/salesInfo/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询客户销售信息详细
+ * @param id
+ */
+export const getSalesInfo = (id: string | number): AxiosPromise<SalesInfoVO> => {
+  return request({
+    url: '/customer/salesInfo/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增客户销售信息
+ * @param data
+ */
+export const addSalesInfo = (data: SalesInfoForm) => {
+  return request({
+    url: '/customer/salesInfo',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改客户销售信息
+ * @param data
+ */
+export const updateSalesInfo = (data: SalesInfoForm) => {
+  return request({
+    url: '/customer/salesInfo',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除客户销售信息
+ * @param id
+ */
+export const delSalesInfo = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/salesInfo/' + id,
+    method: 'delete'
+  });
+};

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

@@ -0,0 +1,275 @@
+export interface SalesInfoVO {
+  /**
+   * 销售信息ID
+   */
+  id: string | number;
+
+  /**
+   * 关联客户ID
+   */
+  customerId: string | number;
+
+  /**
+   * 信用额度
+   */
+  creditAmount: number;
+
+  /**
+   * 剩余额度
+   */
+  remainingQuota: number;
+
+  /**
+   * 临时额度
+   */
+  temporaryQuota: number;
+
+  /**
+   * 账期(如:30天)
+   */
+  accountPeriod: string;
+
+  /**
+   * 账单日(每月几号)
+   */
+  billDate: number;
+
+  /**
+   * 计费日(如:每月1日)
+   */
+  billingDay: number;
+
+  /**
+   * 订单审核方式
+   */
+  orderAudit: string;
+
+  /**
+   * 信用管理方式
+   */
+  creditManagementId: number | string;
+
+  /**
+   * 信用支付密码
+   */
+  creditPaymentPassword: string;
+
+  /**
+   * 付款天数
+   */
+  payDays: number;
+
+  /**
+   * 销售人员
+   */
+  salesPersonId: string | number;
+
+  /**
+   * 服务人员
+   */
+  serviceStaffId: string | number;
+
+  /**
+   * 所属部门
+   */
+  belongingDepartmentId: string | number;
+
+  /**
+   * 应收账款
+   */
+  accountsReceivable: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface SalesInfoForm extends BaseEntity {
+  /**
+   * 销售信息ID
+   */
+  id?: string | number;
+
+  /**
+   * 关联客户ID
+   */
+  customerId?: string | number;
+
+  /**
+   * 信用额度
+   */
+  creditAmount?: number;
+
+  /**
+   * 剩余额度
+   */
+  remainingQuota?: number;
+
+  /**
+   * 临时额度
+   */
+  temporaryQuota?: number;
+
+  /**
+   * 账期(如:30天)
+   */
+  accountPeriod?: string;
+
+  /**
+   * 账单日(每月几号)
+   */
+  billDate?: number;
+
+  /**
+   * 计费日(如:每月1日)
+   */
+  billingDay?: number;
+
+  /**
+   * 订单审核方式
+   */
+  orderAudit?: string;
+
+  /**
+   * 信用管理方式
+   */
+  creditManagementId?: number | string;
+
+  /**
+   * 信用支付密码
+   */
+  creditPaymentPassword?: string;
+
+  /**
+   * 付款天数
+   */
+  payDays?: number;
+
+  /**
+   * 销售人员
+   */
+  salesPersonId?: string | number;
+
+  /**
+   * 服务人员
+   */
+  serviceStaffId?: string | number;
+
+  /**
+   * 所属部门
+   */
+  belongingDepartmentId?: string | number;
+
+  /**
+   * 应收账款
+   */
+  accountsReceivable?: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface SalesInfoQuery extends PageQuery {
+  /**
+   * 关联客户ID
+   */
+  customerId?: string | number;
+
+  /**
+   * 信用额度
+   */
+  creditAmount?: number;
+
+  /**
+   * 剩余额度
+   */
+  remainingQuota?: number;
+
+  /**
+   * 临时额度
+   */
+  temporaryQuota?: number;
+
+  /**
+   * 账期(如:30天)
+   */
+  accountPeriod?: string;
+
+  /**
+   * 账单日(每月几号)
+   */
+  billDate?: number;
+
+  /**
+   * 计费日(如:每月1日)
+   */
+  billingDay?: number;
+
+  /**
+   * 订单审核方式
+   */
+  orderAudit?: string;
+
+  /**
+   * 信用管理方式
+   */
+  creditManagementId?: number | string;
+
+  /**
+   * 信用支付密码
+   */
+  creditPaymentPassword?: string;
+
+  /**
+   * 付款天数
+   */
+  payDays?: number;
+
+  /**
+   * 销售人员
+   */
+  salesPersonId?: string | number;
+
+  /**
+   * 服务人员
+   */
+  serviceStaffId?: string | number;
+
+  /**
+   * 所属部门
+   */
+  belongingDepartmentId?: string | number;
+
+  /**
+   * 应收账款
+   */
+  accountsReceivable?: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 80 - 0
src/api/customer/customerFile/shippingAddress/index.ts

@@ -0,0 +1,80 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { ShippingAddressVO, ShippingAddressForm, ShippingAddressQuery } from '@/api/customer/customerFile/shippingAddress/types';
+
+/**
+ * 查询客户收货地址列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listShippingAddress = (query?: ShippingAddressQuery): AxiosPromise<ShippingAddressVO[]> => {
+  return request({
+    url: '/customer/shippingAddress/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询客户收货地址详细
+ * @param id
+ */
+export const getShippingAddress = (id: string | number): AxiosPromise<ShippingAddressVO> => {
+  return request({
+    url: '/customer/shippingAddress/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增客户收货地址
+ * @param data
+ */
+export const addShippingAddress = (data: ShippingAddressForm) => {
+  return request({
+    url: '/customer/shippingAddress',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改客户收货地址
+ * @param data
+ */
+export const updateShippingAddress = (data: ShippingAddressForm) => {
+  return request({
+    url: '/customer/shippingAddress',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除客户收货地址
+ * @param id
+ */
+export const delShippingAddress = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/shippingAddress/' + id,
+    method: 'delete'
+  });
+};
+
+/**
+ * 设置默认地址
+ * @param id
+ * @param defaultAddress 状态
+ */
+export function changeDefaultAddress(id: string | number, defaultAddress: string) {
+  const data = {
+    id,
+    defaultAddress
+  };
+  return request({
+    url: '/customer/shippingAddress/changeDefaultAddress',
+    method: 'put',
+    data: data
+  });
+}

+ 290 - 0
src/api/customer/customerFile/shippingAddress/types.ts

@@ -0,0 +1,290 @@
+export interface ShippingAddressVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 客户id
+   */
+  customerId: string | number;
+
+  /**
+   * 收货地址编号
+   */
+  shippingAddressNo: string;
+
+  /**
+   * 收货人姓名
+   */
+  consignee: string;
+
+  /**
+   * 部门编号
+   */
+  deptId: string | number;
+
+  /**
+   * 联系电话
+   */
+  phone: string;
+
+  /**
+   * 详细地址
+   */
+  address: string;
+
+  /**
+   * 邮政编码
+   */
+  postal: string;
+
+  /**
+   * 是否默认地址(0-是,1-否)
+   */
+  defaultAddress: string;
+
+  /**
+   * 地址标签
+   */
+  addressLabel: string;
+
+  /**
+   * 省份编码
+   */
+  provincialNo: string;
+
+  /**
+   * 城市编码
+   */
+  cityNo: string;
+
+  /**
+   * 区县编码
+   */
+  countryNo: string;
+
+  /**
+   * 区县编码
+   */
+  provincialCityCountry: string;
+
+  /**
+   * 推送状态(0-已推送,1-未推送等)
+   */
+  pushStatus: string;
+
+  /**
+   * 序号/排序号
+   */
+  num: number;
+
+  /**
+   * 部门名称
+   */
+  deptName: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface ShippingAddressForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 客户id
+   */
+  customerId?: string | number;
+
+  /**
+   * 收货地址编号
+   */
+  shippingAddressNo?: string;
+
+  /**
+   * 收货人姓名
+   */
+  consignee?: string;
+
+  /**
+   * 部门编号
+   */
+  deptId?: string | number;
+
+  /**
+   * 联系电话
+   */
+  phone?: string;
+
+  /**
+   * 详细地址
+   */
+  address?: string;
+
+  /**
+   * 邮政编码
+   */
+  postal?: string;
+
+  /**
+   * 是否默认地址(0-是,1-否)
+   */
+  defaultAddress?: string;
+
+  /**
+   * 地址标签
+   */
+  addressLabel?: string;
+
+  /**
+   * 省份编码
+   */
+  provincialNo?: string;
+
+  /**
+   * 城市编码
+   */
+  cityNo?: string;
+
+  /**
+   * 区县编码
+   */
+  countryNo?: string;
+
+  /**
+   * 区县编码
+   */
+  provincialCityCountry?: string;
+
+  /**
+   * 推送状态(0-已推送,1-未推送等)
+   */
+  pushStatus?: string;
+
+  /**
+   * 序号/排序号
+   */
+  num?: number;
+
+  /**
+   * 部门名称
+   */
+  deptName?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface ShippingAddressQuery extends PageQuery {
+  /**
+   * 客户id
+   */
+  customerId?: string | number;
+
+  /**
+   * 收货地址编号
+   */
+  shippingAddressNo?: string;
+
+  /**
+   * 收货人姓名
+   */
+  consignee?: string;
+
+  /**
+   * 部门编号
+   */
+  deptId?: string | number;
+
+  /**
+   * 联系电话
+   */
+  phone?: string;
+
+  /**
+   * 详细地址
+   */
+  address?: string;
+
+  /**
+   * 邮政编码
+   */
+  postal?: string;
+
+  /**
+   * 是否默认地址(0-是,1-否)
+   */
+  defaultAddress?: string;
+
+  /**
+   * 地址标签
+   */
+  addressLabel?: string;
+
+  /**
+   * 省份编码
+   */
+  provincialNo?: string;
+
+  /**
+   * 城市编码
+   */
+  cityNo?: string;
+
+  /**
+   * 区县编码
+   */
+  countryNo?: string;
+
+  /**
+   * 区县编码
+   */
+  provincialCityCountry?: string;
+
+  /**
+   * 推送状态(0-已推送,1-未推送等)
+   */
+  pushStatus?: string;
+
+  /**
+   * 序号/排序号
+   */
+  num?: number;
+
+  /**
+   * 部门名称
+   */
+  deptName?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 133 - 0
src/api/customer/customerInfo/index.ts

@@ -0,0 +1,133 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { CustomerInfoVO, CustomerInfoForm, CustomerInfoQuery } from '@/api/customer/customerInfo/types';
+
+/**
+ * 查询客户信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listCustomerInfo = (query?: CustomerInfoQuery): AxiosPromise<CustomerInfoVO[]> => {
+  return request({
+    url: '/customer/customerInfo/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询客户信息详细
+ * @param id
+ */
+export const getCustomerInfo = (id: string | number): AxiosPromise<CustomerInfoVO> => {
+  return request({
+    url: '/customer/customerInfo/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增客户信息
+ * @param data
+ */
+export const addCustomerInfo = (data: CustomerInfoForm) => {
+  return request({
+    url: '/customer/customerInfo',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改客户信息
+ * @param data
+ */
+export const updateCustomerInfo = (data: CustomerInfoForm) => {
+  return request({
+    url: '/customer/customerInfo',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除客户信息
+ * @param id
+ */
+export const delCustomerInfo = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/customerInfo/' + id,
+    method: 'delete'
+  });
+};
+
+/**
+ * 状态修改
+ * @param id 客户id
+ * @param status 状态
+ */
+export function changeStatus(id: string, status: string) {
+  const data = {
+    id,
+    status
+  };
+  return request({
+    url: '/customer/customerInfo/changeStatus',
+    method: 'put',
+    data: data
+  });
+}
+
+/**
+ * 修改临时额度
+ * @param customerIds 客户id
+ * @param creditAmount 额度
+ */
+export function updateCreditAmount(customerIds: number[], creditAmount: number) {
+  const data = {
+    customerIds,
+    creditAmount
+  };
+  return request({
+    url: '/customer/customerInfo/updateCreditAmount',
+    method: 'put',
+    data: data
+  });
+}
+
+/**
+ * 修改临时额度
+ * @param customerIds 客户id
+ * @param tagIds 标签id
+ */
+export function setCustomerInfoTag(customerIds: number[], tagIds: number[]) {
+  const data = {
+    customerIds,
+    tagIds
+  };
+  return request({
+    url: '/customer/customerInfo/setCustomerInfoTag',
+    method: 'put',
+    data: data
+  });
+}
+
+export const listContractList = (query?: CustomerInfoQuery): AxiosPromise<CustomerInfoVO[]> => {
+  return request({
+    url: '/customer/customerInfo/contractList',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 根据名称模糊查询客户信息
+ * @param customerName
+ */
+export const getListBycustomerName = (customerName: string): AxiosPromise<CustomerInfoVO[]> => {
+  return request({
+    url: '/customer/customerInfo/selectByCustomerName/' + customerName,
+    method: 'get'
+  });
+};

+ 452 - 0
src/api/customer/customerInfo/types.ts

@@ -0,0 +1,452 @@
+import type { BusinessInfoVO, BusinessInfoForm } from '@/api/customer/businessInfo/types';
+import type { CustomerContactVO, CustomerContactForm } from '@/api/customer/customerContact/types';
+import type { SalesInfoVO, SalesInfoForm } from '@/api/customer/salesInfo/types';
+import type { InvoiceInfoVO, InvoiceInfoForm } from '@/api/customer/invoiceInfo/types';
+
+export interface CustomerInfoVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 客户编号
+   */
+  customerNo: string;
+
+  /**
+   * 所属公司
+   */
+  belongCompanyId: string | number;
+
+  /**
+   * 公司名称
+   */
+  companyName: string;
+
+  /**
+   * 客户名称
+   */
+  customerName: string;
+
+  /**
+   * 工商名称
+   */
+  businessCustomerName: string;
+
+  /**
+   * 企业简称
+   */
+  shortName: string;
+
+  /**
+   * 开票类型
+   */
+  invoiceTypeId: string | number;
+
+  /**
+   * 企业规模
+   */
+  enterpriseScaleId: string | number;
+
+  enterpriseScale: string;
+
+  /**
+   * 客户类别
+   */
+  customerTypeId: string | number;
+
+  /**
+   * 行业类别
+   */
+  industryCategoryId: string | number;
+
+  industryCategory: string;
+
+  /**
+   * 客户等级
+   */
+  customerLevelId: string | number;
+
+  /**
+   * 固定电话
+   */
+  landline: string;
+
+  /**
+   * 传真
+   */
+  fax: string;
+
+  /**
+   * 网址
+   */
+  url: string;
+
+  /**
+   * 邮政编码
+   */
+  postCode: string;
+
+  /**
+   * 开始时间
+   */
+  validityFromDate: string | number;
+
+  /**
+   * 结束时间
+   */
+  validityToDate: string | number;
+
+  /**
+   * 发票抬头
+   */
+  invoiceTop: string;
+
+  /**
+   * 详细地址(注册地址)
+   */
+  address: string;
+
+  /**
+   * 省份编码
+   */
+  regProvincialNo: string;
+
+  /**
+   * 城市编码
+   */
+  regCityNo: string;
+
+  /**
+   * 区县编码
+   */
+  regCountyNo: string;
+
+  /**
+   * 省市区
+   */
+  provincialCityCounty: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+  /**
+   * 工商信息
+   */
+  customerBusinessInfoVo?: BusinessInfoVO;
+
+  /**
+   * 销售信息
+   */
+  customerSalesInfoVo?: SalesInfoVO;
+
+  /**
+   * 联系人列表
+   */
+  customerContactVoList?: CustomerContactVO[];
+
+  /**
+   * 开票信息列表
+   */
+  customerInvoiceInfoVoList?: InvoiceInfoVO[];
+}
+
+export interface CustomerInfoForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 客户编号
+   */
+  customerNo?: string;
+
+  /**
+   * 所属公司
+   */
+  belongCompanyId?: string | number;
+
+  /**
+   * 公司名称
+   */
+  companyName?: string;
+
+  /**
+   * 客户名称
+   */
+  customerName?: string;
+
+  /**
+   * 工商名称
+   */
+  businessCustomerName?: string;
+
+  /**
+   * 企业简称
+   */
+  shortName?: string;
+
+  /**
+   * 开票类型
+   */
+  invoiceTypeId?: string | number;
+
+  /**
+   * 企业规模
+   */
+  enterpriseScaleId?: string | number;
+
+  /**
+   * 客户类别
+   */
+  customerTypeId?: string | number;
+
+  /**
+   * 行业类别
+   */
+  industryCategoryId?: string | number;
+
+  /**
+   * 客户等级
+   */
+  customerLevelId?: string | number;
+
+  /**
+   * 固定电话
+   */
+  landline?: string;
+
+  /**
+   * 传真
+   */
+  fax?: string;
+
+  /**
+   * 网址
+   */
+  url?: string;
+
+  /**
+   * 邮政编码
+   */
+  postCode?: string;
+
+  /**
+   * 开始时间
+   */
+  validityFromDate?: string | number;
+
+  /**
+   * 结束时间
+   */
+  validityToDate?: string | number;
+
+  /**
+   * 发票抬头
+   */
+  invoiceTop?: string;
+
+  /**
+   * 详细地址(注册地址)
+   */
+  address?: string;
+
+  /**
+   * 省份编码
+   */
+  regProvincialNo?: string;
+
+  /**
+   * 城市编码
+   */
+  regCityNo?: string;
+
+  /**
+   * 区县编码
+   */
+  regCountyNo?: string;
+
+  /**
+   * 省市区
+   */
+  provincialCityCounty?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+  /**
+   * 工商信息
+   */
+  customerBusinessBo?: BusinessInfoForm;
+
+  /**
+   * 销售信息
+   */
+  customerSalesInfoBo?: SalesInfoForm;
+
+  /**
+   * 联系人列表
+   */
+  customerContactBoList?: CustomerContactForm[];
+
+  /**
+   * 开票信息列表
+   */
+  customerInvoiceInfoBoList?: InvoiceInfoForm[];
+}
+
+export interface CustomerInfoQuery extends PageQuery {
+  /**
+   * 客户编号
+   */
+  customerNo?: string;
+
+  /**
+   * 所属公司
+   */
+  belongCompanyId?: string | number;
+
+  /**
+   * 公司名称
+   */
+  companyName?: string;
+
+  /**
+   * 客户名称
+   */
+  customerName?: string;
+
+  /**
+   * 工商名称
+   */
+  businessCustomerName?: string;
+
+  /**
+   * 企业简称
+   */
+  shortName?: string;
+
+  /**
+   * 开票类型
+   */
+  invoiceTypeId?: string | number;
+
+  /**
+   * 企业规模
+   */
+  enterpriseScaleId?: string | number;
+
+  /**
+   * 客户类别
+   */
+  customerTypeId?: string | number;
+
+  /**
+   * 行业类别
+   */
+  industryCategoryId?: string | number;
+
+  /**
+   * 客户等级
+   */
+  customerLevelId?: string | number;
+
+  salesPersonId?: string | number;
+
+  serviceStaffId?: string | number;
+
+  belongingDepartmentId?: string | number;
+
+  /**
+   * 固定电话
+   */
+  landline?: string;
+
+  /**
+   * 传真
+   */
+  fax?: string;
+
+  /**
+   * 网址
+   */
+  url?: string;
+
+  /**
+   * 邮政编码
+   */
+  postCode?: string;
+
+  /**
+   * 开始时间
+   */
+  validityFromDate?: string | number;
+
+  /**
+   * 结束时间
+   */
+  validityToDate?: string | number;
+
+  /**
+   * 发票抬头
+   */
+  invoiceTop?: string;
+
+  /**
+   * 详细地址(注册地址)
+   */
+  address?: string;
+
+  /**
+   * 省份编码
+   */
+  regProvincialNo?: string;
+
+  /**
+   * 城市编码
+   */
+  regCityNo?: string;
+
+  /**
+   * 区县编码
+   */
+  regCountyNo?: string;
+
+  /**
+   * 省市区
+   */
+  provincialCityCounty?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  customerTag?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 371 - 0
src/api/customer/info/index.ts

@@ -0,0 +1,371 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { InfoVO, InfoForm, InfoQuery } from '@/api/customer/info/types';
+
+/**
+ * 查询供应商信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listInfo = (query?: InfoQuery): AxiosPromise<InfoVO[]> => {
+  return request({
+    url: '/customer/info/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询供应商信息详细
+ * @param id
+ */
+export const getInfo = (id: string | number): AxiosPromise<InfoVO> => {
+  return request({
+    url: '/customer/info/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增供应商信息
+ * @param data
+ */
+export const addInfo = (data: InfoForm) => {
+  return request({
+    url: '/customer/info',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改供应商信息
+ * @param data
+ */
+export const updateInfo = (data: InfoForm) => {
+  return request({
+    url: '/customer/info',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * SCM修改供应商信息(不走审核)
+ * @param data
+ */
+export const scmEditInfo = (data: InfoForm) => {
+  return request({
+    url: '/customer/info/scm',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除供应商信息
+ * @param id
+ */
+export const delInfo = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/info/' + id,
+    method: 'delete'
+  });
+};
+
+
+/**
+ * 获取供应商类型列表
+ */
+export const getComSupTyList = () => {
+  return request({
+    url: '/system/type/getComSupTyList',
+    method: 'get'
+  });
+};
+/**
+ * 获取产品分类列表
+ */
+export const getProductCategoryList = () => {
+  return request({
+    url: '/product/category/getProductCategoryList',
+    method: 'get'
+  });
+};
+/**
+ * 获取人员信息列表
+ */
+export const getComStaffList = (params?: any) => {
+  return request({
+    url: '/system/comStaff/list',
+    method: 'get',
+    params: params
+  });
+};
+/**
+ * 获取字典数据
+ */
+export const getDictData = (dictType: string) => {
+  return request({
+    url: `/system/dict/data/type/${dictType}`,
+    method: 'get'
+  });
+};
+
+/**
+ * 查询供应商信息列表(新接口,包含产品经理和采购员)
+ * @param query
+ * @returns {*}
+ */
+export const getInfoList = (query?: InfoQuery): AxiosPromise<InfoVO[]> => {
+  return request({
+    url: '/customer/info/getList',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询待审核供应商信息列表
+ * @param query
+ * @returns {*}
+ */
+export const getApproveList = (query?: InfoQuery): AxiosPromise<InfoVO[]> => {
+  return request({
+    url: '/customer/info/getApproveList',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 根据供应商ID获取人员信息
+ * @param supplierId 供应商ID
+ */
+export const getStaffInfoById = (supplierId: string | number) => {
+  return request({
+    url: '/system/comStaff/informationById',
+    method: 'get',
+    params: { supplierId }
+  });
+};
+
+/**
+ * 获取所有人员信息(用于下拉框)
+ */
+export const getStaffListSplice = () => {
+  return request({
+    url: '/system/comStaff/listSplice',
+    method: 'get'
+  });
+};
+
+/**
+ * 根据供应商ID获取产品经理和采购员ID
+ * @param supplierId 供应商ID
+ */
+export const getSupplierStaffIds = (supplierId: string | number) => {
+  return request({
+    url: '/system/comStaff/informationById',
+    method: 'get',
+    params: { supplierId: supplierId }
+  });
+};
+
+/**
+ * 根据供应商ID获取联系人列表
+ * @param supplierId 供应商ID
+ * @param params 分页参数
+ */
+export const getContactListById = (supplierId: string | number, params?: any) => {
+  return request({
+    url: '/customer/contact/getSupplierContactlistById',
+    method: 'get',
+    params: {
+      supplierId: supplierId,
+      ...params
+    }
+  });
+};
+
+/**
+ * 根据供应商ID获取已选择的品目ID列表
+ * @param supplierId 供应商ID
+ * @param supplyStatus 供应商状态(可选)
+ */
+export const getSupplierCategories = (supplierId: string | number, supplyStatus?: string) => {
+  return request({
+    url: '/customer/info/getSupplierCategories',
+    method: 'get',
+    params: { supplierId, supplyStatus }
+  });
+};
+
+/**
+ * 根据供应商ID获取合同列表
+ * @param supplierId 供应商ID
+ * @param params 查询参数
+ */
+export const getSupplierContractsById = (supplierId: string | number, params?: any) => {
+  return request({
+    url: '/customer/supplierContract/supplierContractsById',
+    method: 'get',
+    params: {
+      supplierId: supplierId,
+      ...params
+    }
+  });
+};
+
+/**
+ * 根据供应商ID获取合同列表(新接口)
+ * @param supplierId 供应商ID
+ * @param params 查询参数
+ */
+export const getContractListById = (supplierId: string | number, params?: any) => {
+  return request({
+    url: '/customer/supplierContract/getListbyId',
+    method: 'get',
+    params: {
+      supplierId: supplierId,
+      ...params
+    }
+  });
+};
+
+/**
+ * 根据供应商ID获取银行账户信息
+ * @param id 供应商ID
+ */
+export const getBankBySupplierId = (id: string | number) => {
+  return request({
+    url: '/customer/supplierbank/getBankBySupplierId',
+    method: 'get',
+    params: { id }
+  });
+};
+
+/**
+ * 根据供应商ID获取授权详情列表(支持分页)
+ * @param params 查询参数,包含supplierId和分页参数
+ */
+export const getAuthorizeDetailList = (params: any) => {
+  return request({
+    url: '/customer/supplierauthorize/getAuthorizeDetailList',
+    method: 'get',
+    params: params
+  });
+};
+
+/**
+ * 保存供应商采购信息(产品经理和采购员)
+ * @param data 采购信息数据
+ */
+export const savePurchaseInfo = (data: { supplierId: string | number; productManager: number | null; purchaser: number | null }) => {
+  return request({
+    url: '/customer/procurement',
+    method: 'post',
+    data: data
+  });
+};
+
+
+/**
+ * 根据供应商ID获取地址列表
+ * @param supplierId 供应商ID
+ */
+export const getSupplierAddressById = (supplierId: string | number) => {
+  return request({
+    url: '/customer/supplieraddress/supplierAddressById',
+    method: 'get',
+    params: { supplierId }
+  });
+};
+
+/**
+ * 获取公司列表
+ */
+export const getCompanyList = (params?: any) => {
+  return request({
+    url: '/system/company/list',
+    method: 'get',
+    params
+  });
+};
+
+/**
+ * 获取供应商类型列表
+ */
+export const getSupplierTypeList = (params?: any) => {
+  return request({
+    url: '/system/type/list',
+    method: 'get',
+    params: {
+
+
+      dataSource: 'youyi',
+      ...params
+    }
+  });
+};
+
+/**
+ * 获取供应商等级列表
+ */
+export const getSupplierLevelList = () => {
+  return request({
+    url: '/system/level/list',
+    method: 'get'
+  });
+};
+
+/**
+ * 获取企业规模列表
+ */
+export const getEnterpriseScaleList = () => {
+  return request({
+    url: '/customer/enterpriseScale/getlist',
+    method: 'get'
+  });
+};
+
+/**
+ * 获取行业类别列表
+ */
+export const getIndustryCategoryList = () => {
+  return request({
+    url: '/customer/industryCategory/getlist',
+    method: 'get'
+  });
+};
+
+/**
+ * 获取税率列表
+ */
+export const getTaxRateList = () => {
+  return request({
+    url: '/system/taxrate/list',
+    method: 'get'
+  });
+};
+
+/**
+ * 获取结算方式列表
+ */
+export const getSettlementMethodList = () => {
+  return request({
+    url: '/system/settlementMethod/list',
+    method: 'get'
+  });
+};
+
+/**
+ * 获取发票类型列表
+ */
+export const getInvoiceTypeList = () => {
+  return request({
+    url: '/system/invoiceType/list',
+    method: 'get'
+  });
+};

+ 930 - 0
src/api/customer/info/types.ts

@@ -0,0 +1,930 @@
+export interface InfoVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 供应商编号
+   */
+  supplierNo: string;
+
+  /**
+   * 企业名称
+   */
+  enterpriseName: string;
+
+  /**
+   * 人员规模
+   */
+  membershipSize: string;
+
+  /**
+   * 供应商类型
+   */
+  supplierType: string | number;
+
+  /**
+   * 合作类型
+   */
+  cooperationType: string;
+
+  /**
+   * 固定电话
+   */
+  fixedPhone: string;
+
+  /**
+   * 传真
+   */
+  fax: string;
+
+  /**
+   * 网址
+   */
+  url: string;
+
+  /**
+   * 邮政编码
+   */
+  postCode: string;
+
+  /**
+   * 邮箱
+   */
+  mailbox: string;
+
+  /**
+   * 办公地址-省
+   */
+  officeProvince: string;
+
+  /**
+   * 办公地址-市
+   */
+  officeCity: string;
+
+  /**
+   * 办公地址-区/县
+   */
+  officeCounty?: string;
+
+  /**
+   * 办公详细地址
+   */
+  officeAddress: string;
+
+  /**
+   * 营业执照名称
+   */
+  businessName: string;
+
+  /**
+   * 统一社会信用代码
+   */
+  socialCreditCode: string;
+
+  /**
+   * 法人姓名
+   */
+  legalPersonName: string;
+
+  /**
+   * 法人身份证号
+   */
+  legalPersonId: string | number;
+
+  /**
+   * 注册资本
+   */
+  registeredCapital: string;
+
+  /**
+   * 注册地址-省
+   */
+  businessProvince: string;
+
+  /**
+   * 注册地址-市
+   */
+  businessCity: string;
+
+  /**
+   * 注册地址-区/县
+   */
+  businessCounty: string;
+
+  /**
+   * 注册详细地址
+   */
+  businessAddress: string;
+
+  /**
+   * 营业执照图片路径
+   */
+  businessLicense: string;
+
+  /**
+   * 发票类型
+   */
+  invoiceType: string;
+
+  /**
+   * 发票抬头
+   */
+  invoiceHeader: string;
+
+  /**
+   * 纳税人识别号
+   */
+  taxpayerIdentifier: string | number;
+
+  /**
+   * 开户银行
+   */
+  depositaryBank: string;
+
+  /**
+   * 行号(可能是银行行号)
+   */
+  rowNum: string;
+
+  /**
+   * 银行账号
+   */
+  bankAccounts: string;
+
+  /**
+   * 发票地址
+   */
+  invoiceAddress: string;
+
+  /**
+   * 发票电话
+   */
+  invoiceLandline: string;
+
+  /**
+   * 供货范围
+   */
+  scopeSupply: string;
+
+  /**
+   * 合作方式(0-公开招标, 1-邀请招标...)
+   */
+  cooperateWay: number;
+
+  /**
+   * 合作等级
+   */
+  cooperateLevel: string | number;
+
+  /**
+   * 合同到期时间
+   */
+  contractEndTime: string;
+
+  /**
+   * 供应状态(0-暂停, 1-正常...)
+   */
+  supplyStatus: string;
+
+  /**
+   * 供应评分
+   */
+  supplyScore: number;
+
+  /**
+   * 年销售额
+   */
+  yearSales: number;
+
+  /**
+   * 供应商联系人姓名
+   */
+  supplierName: string;
+
+  /**
+   * 供应商联系人电话
+   */
+  supplierPhone: string;
+
+  /**
+   * 供应商登录密码(已加密)
+   */
+  supplierPassword: string;
+
+  /**
+   * 经营品类
+   */
+  operatingCategory: string;
+
+  /**
+   * 经营品牌
+   */
+  operatingBrand: string;
+
+  /**
+   * 其他客户
+   */
+  otherCustomers: string;
+
+  /**
+   * 简称
+   */
+  shortName: string;
+
+  /**
+   * 所属行业
+   */
+  industrCategory: string;
+
+  /**
+   * 类型(可能与supplier_type重复或细分)
+   */
+  type: string;
+
+  /**
+   * 所属公司
+   */
+  ownedCompany: string;
+
+  /**
+   * 推送状态(0-未推送, 1-已推送...)
+   */
+  pushStatus: number;
+
+  /**
+   * 创建时间
+   */
+  created: string;
+
+  /**
+   * 修改时间
+   */
+  modify: string;
+
+  /**
+   * 有效期开始时间
+   */
+  validityFromDate: string | number;
+
+  /**
+   * 有效期结束时间
+   */
+  validityToDate: string | number;
+
+  /**
+   * 行号(可能是内部排序或备用字段)
+   */
+  rowNo: number;
+
+  /**
+   * 法人身份证图片路径
+   */
+  personImage: string;
+
+  /**
+   * 法人身份证图片路径Url
+   */
+  personImageUrl: string;
+  /**
+   * 对接次数
+   */
+  abutmentNo: number;
+
+  /**
+   * 是否合作(1-是, 0-否)
+   */
+  cooperative: number;
+
+  /**
+   * 供货区域(省)
+   */
+  province?: string;
+
+  /**
+   * 供货区域(市)
+   */
+  city?: string;
+
+}
+
+export interface InfoForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 供应商编号
+   */
+  supplierNo?: string;
+
+  /**
+   * 企业名称
+   */
+  enterpriseName?: string;
+
+  /**
+   * 人员规模
+   */
+  membershipSize?: string;
+
+  /**
+   * 供应商类型
+   */
+  supplierType?: string;
+
+  /**
+   * 合作类型
+   */
+  cooperationType?: string;
+
+  /**
+   * 固定电话
+   */
+  fixedPhone?: string;
+
+  /**
+   * 传真
+   */
+  fax?: string;
+
+  /**
+   * 网址
+   */
+  url?: string;
+
+  /**
+   * 邮政编码
+   */
+  postCode?: string;
+
+  /**
+   * 邮箱
+   */
+  mailbox?: string;
+
+  /**
+   * 办公地址-省
+   */
+  officeProvince?: string;
+
+  /**
+   * 办公地址-市
+   */
+  officeCity?: string;
+
+  /**
+   * 办公地址-区/县
+   */
+  officeCounty?: string;
+
+  /**
+   * 办公详细地址
+   */
+  officeAddress?: string;
+
+  /**
+   * 营业执照名称
+   */
+  businessName?: string;
+
+  /**
+   * 统一社会信用代码
+   */
+  socialCreditCode?: string;
+
+  /**
+   * 法人姓名
+   */
+  legalPersonName?: string;
+
+  /**
+   * 法人身份证号
+   */
+  legalPersonId?: string | number;
+
+  /**
+   * 注册资本
+   */
+  registeredCapital?: string;
+
+  /**
+   * 注册地址-省
+   */
+  businessProvince?: string;
+
+  /**
+   * 注册地址-市
+   */
+  businessCity?: string;
+
+  /**
+   * 注册地址-区/县
+   */
+  businessCounty?: string;
+
+  /**
+   * 注册详细地址
+   */
+  businessAddress?: string;
+
+  /**
+   * 营业执照图片路径
+   */
+  businessLicense?: string;
+
+  /**
+   * 发票类型
+   */
+  invoiceType?: string;
+
+  /**
+   * 发票抬头
+   */
+  invoiceHeader?: string;
+
+  /**
+   * 纳税人识别号
+   */
+  taxpayerIdentifier?: string | number;
+
+  /**
+   * 开户银行
+   */
+  depositaryBank?: string;
+
+  /**
+   * 行号(可能是银行行号)
+   */
+  rowNum?: string;
+
+  /**
+   * 银行账号
+   */
+  bankAccounts?: string;
+
+  /**
+   * 发票地址
+   */
+  invoiceAddress?: string;
+
+  /**
+   * 发票电话
+   */
+  invoiceLandline?: string;
+
+  /**
+   * 供货范围
+   */
+  scopeSupply?: string;
+
+  /**
+   * 合作方式(0-公开招标, 1-邀请招标...)
+   */
+  cooperateWay?: number;
+
+  /**
+   * 合作等级
+   */
+  cooperateLevel?: string;
+
+  /**
+   * 合同到期时间
+   */
+  contractEndTime?: string;
+
+  /**
+   * 供应状态(0-暂停, 1-正常...)
+   */
+  supplyStatus?: string;
+
+  /**
+   * 供应评分
+   */
+  supplyScore?: number;
+
+  /**
+   * 年销售额
+   */
+  yearSales?: number;
+
+  /**
+   * 供应商联系人姓名
+   */
+  supplierName?: string;
+
+  /**
+   * 供应商联系人电话
+   */
+  supplierPhone?: string;
+
+  /**
+   * 供应商登录密码(已加密)
+   */
+  supplierPassword?: string;
+
+  /**
+   * 经营品类
+   */
+  operatingCategory?: string;
+
+  /**
+   * 经营品牌
+   */
+  operatingBrand?: string;
+
+  /**
+   * 其他客户
+   */
+  otherCustomers?: string;
+
+  /**
+   * 简称
+   */
+  shortName?: string;
+
+  /**
+   * 所属行业
+   */
+  industrCategory?: string;
+
+  /**
+   * 类型(可能与supplier_type重复或细分)
+   */
+  type?: string;
+
+  /**
+   * 所属公司
+   */
+  ownedCompany?: string;
+
+  /**
+   * 推送状态(0-未推送, 1-已推送...)
+   */
+  pushStatus?: number;
+
+  /**
+   * 创建时间
+   */
+  created?: string;
+
+  /**
+   * 修改时间
+   */
+  modify?: string;
+
+  /**
+   * 有效期开始时间
+   */
+  validityFromDate?: string | number;
+
+  /**
+   * 有效期结束时间
+   */
+  validityToDate?: string | number;
+
+  /**
+   * 行号(可能是内部排序或备用字段)
+   */
+  rowNo?: number;
+
+  /**
+   * 法人身份证图片路径
+   */
+  personImage?: string;
+
+  /**
+   * 对接次数
+   */
+  abutmentNo?: number;
+
+  /**
+   * 是否合作(1-是, 0-否)
+   */
+  cooperative?: number;
+
+}
+
+export interface InfoQuery extends PageQuery {
+
+  /**
+   * 供应商编号
+   */
+  supplierNo?: string;
+
+  /**
+   * 产品经理
+   */
+  productManager?: string;
+
+  /**
+   * 采购人员
+   */
+  buyer?: string;
+
+  /**
+   * 供应区域(省)
+   */
+  province?: string;
+
+  /**
+   * 供应区域(市)
+   */
+  city?: string;
+
+  /**
+   * 企业名称
+   */
+  enterpriseName?: string;
+
+  /**
+   * 人员规模
+   */
+  membershipSize?: string;
+
+  /**
+   * 供应商类型
+   */
+  supplierType?: string;
+
+  /**
+   * 合作类型
+   */
+  cooperationType?: string;
+
+  /**
+   * 固定电话
+   */
+  fixedPhone?: string;
+
+  /**
+   * 传真
+   */
+  fax?: string;
+
+  /**
+   * 网址
+   */
+  url?: string;
+
+  /**
+   * 邮政编码
+   */
+  postCode?: string;
+
+  /**
+   * 邮箱
+   */
+  mailbox?: string;
+
+  /**
+   * 办公地址-省
+   */
+  officeProvince?: string;
+
+  /**
+   * 办公地址-市
+   */
+  officeCity?: string;
+
+  /**
+   * 办公地址-区/县
+   */
+  officeCounty?: string;
+
+  /**
+   * 办公详细地址
+   */
+  officeAddress?: string;
+
+  /**
+   * 营业执照名称
+   */
+  businessName?: string;
+
+  /**
+   * 统一社会信用代码
+   */
+  socialCreditCode?: string;
+
+  /**
+   * 法人姓名
+   */
+  legalPersonName?: string;
+
+  /**
+   * 法人身份证号
+   */
+  legalPersonId?: string | number;
+
+  /**
+   * 注册资本
+   */
+  registeredCapital?: string;
+
+  /**
+   * 注册地址-省
+   */
+  businessProvince?: string;
+
+  /**
+   * 注册地址-市
+   */
+  businessCity?: string;
+
+  /**
+   * 注册地址-区/县
+   */
+  businessCounty?: string;
+
+  /**
+   * 注册详细地址
+   */
+  businessAddress?: string;
+
+  /**
+   * 营业执照图片路径
+   */
+  businessLicense?: string;
+
+  /**
+   * 发票类型
+   */
+  invoiceType?: string;
+
+  /**
+   * 发票抬头
+   */
+  invoiceHeader?: string;
+
+  /**
+   * 纳税人识别号
+   */
+  taxpayerIdentifier?: string | number;
+
+  /**
+   * 开户银行
+   */
+  depositaryBank?: string;
+
+  /**
+   * 行号(可能是银行行号)
+   */
+  rowNum?: string;
+
+  /**
+   * 银行账号
+   */
+  bankAccounts?: string;
+
+  /**
+   * 发票地址
+   */
+  invoiceAddress?: string;
+
+  /**
+   * 发票电话
+   */
+  invoiceLandline?: string;
+
+  /**
+   * 供货范围
+   */
+  scopeSupply?: string;
+
+  /**
+   * 合作方式(0-公开招标, 1-邀请招标...)
+   */
+  cooperateWay?: number;
+
+  /**
+   * 合作等级
+   */
+  cooperateLevel?: string;
+
+  /**
+   * 合同到期时间
+   */
+  contractEndTime?: string;
+
+  /**
+   * 供应状态(0-暂停, 1-正常...)
+   */
+  supplyStatus?: string;
+
+  /**
+   * 供应评分
+   */
+  supplyScore?: number;
+
+  /**
+   * 年销售额
+   */
+  yearSales?: number;
+
+  /**
+   * 供应商联系人姓名
+   */
+  supplierName?: string;
+
+  /**
+   * 供应商联系人电话
+   */
+  supplierPhone?: string;
+
+  /**
+   * 供应商登录密码(已加密)
+   */
+  supplierPassword?: string;
+
+  /**
+   * 经营品类
+   */
+  operatingCategory?: string;
+
+  /**
+   * 经营品牌
+   */
+  operatingBrand?: string;
+
+  /**
+   * 其他客户
+   */
+  otherCustomers?: string;
+
+  /**
+   * 简称
+   */
+  shortName?: string;
+
+  /**
+   * 所属行业
+   */
+  industrCategory?: string;
+
+  /**
+   * 类型(可能与supplier_type重复或细分)
+   */
+  type?: string;
+
+  /**
+   * 所属公司
+   */
+  ownedCompany?: string;
+
+  /**
+   * 推送状态(0-未推送, 1-已推送...)
+   */
+  pushStatus?: number;
+
+  /**
+   * 创建时间
+   */
+  created?: string;
+
+  /**
+   * 修改时间
+   */
+  modify?: string;
+
+  /**
+   * 有效期开始时间
+   */
+  validityFromDate?: string | number;
+
+  /**
+   * 有效期结束时间
+   */
+  validityToDate?: string | number;
+
+  /**
+   * 行号(可能是内部排序或备用字段)
+   */
+  rowNo?: number;
+
+  /**
+   * 法人身份证图片路径
+   */
+  personImage?: string;
+
+  /**
+   * 对接次数
+   */
+  abutmentNo?: number;
+
+  /**
+   * 是否合作(1-是, 0-否)
+   */
+  cooperative?: number;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

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

@@ -0,0 +1,75 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { InvoiceTypeVO, InvoiceTypeForm, InvoiceTypeQuery } from '@/api/customer/invoiceType/types';
+
+/**
+ * 查询发票类型列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listInvoiceType = (query?: InvoiceTypeQuery): AxiosPromise<InvoiceTypeVO[]> => {
+  return request({
+    url: '/system/invoiceType/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询发票类型详细
+ * @param id
+ */
+export const getInvoiceType = (id: string | number): AxiosPromise<InvoiceTypeVO> => {
+  return request({
+    url: '/system/invoiceType/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增发票类型
+ * @param data
+ */
+export const addInvoiceType = (data: InvoiceTypeForm) => {
+  return request({
+    url: '/system/invoiceType',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改发票类型
+ * @param data
+ */
+export const updateInvoiceType = (data: InvoiceTypeForm) => {
+  return request({
+    url: '/system/invoiceType',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除发票类型
+ * @param id
+ */
+export const delInvoiceType = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/invoiceType/' + id,
+    method: 'delete'
+  });
+};
+
+export function changeShowStatus(id: string | number, isShow: string) {
+  const data = {
+    id,
+    isShow
+  };
+  return request({
+    url: '/system/invoiceType/changeStatus',
+    method: 'put',
+    data: data
+  });
+}

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

@@ -0,0 +1,95 @@
+export interface InvoiceTypeVO {
+  /**
+   * ID
+   */
+  id: string | number;
+
+  /**
+   * 发票类型编号
+   */
+  invoiceTypeNo: string;
+
+  /**
+   * 发票类型名称
+   */
+  invoiceTypeName: string;
+
+  /**
+   * 是否显示:0-显示,1-隐藏
+   */
+  isShow: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface InvoiceTypeForm extends BaseEntity {
+  /**
+   * ID
+   */
+  id?: string | number;
+
+  /**
+   * 发票类型编号
+   */
+  invoiceTypeNo?: string;
+
+  /**
+   * 发票类型名称
+   */
+  invoiceTypeName?: string;
+
+  /**
+   * 是否显示:0-显示,1-隐藏
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface InvoiceTypeQuery extends PageQuery {
+  /**
+   * 发票类型编号
+   */
+  invoiceTypeNo?: string;
+
+  /**
+   * 发票类型名称
+   */
+  invoiceTypeName?: string;
+
+  /**
+   * 是否显示:0-显示,1-隐藏
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 355 - 0
src/api/customer/supplierInfo/index.ts

@@ -0,0 +1,355 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { InfoVO, InfoForm, InfoQuery } from '@/api/customer/supplierInfo/types';
+
+/**
+ * 查询供应商信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listInfo = (query?: InfoQuery): AxiosPromise<InfoVO[]> => {
+  return request({
+    url: '/customer/info/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询供应商信息详细
+ * @param id
+ */
+export const getInfo = (id: string | number): AxiosPromise<InfoVO> => {
+  return request({
+    url: '/customer/info/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增供应商信息
+ * @param data
+ */
+export const addInfo = (data: InfoForm) => {
+  return request({
+    url: '/customer/info',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改供应商信息
+ * @param data
+ */
+export const updateInfo = (data: InfoForm) => {
+  return request({
+    url: '/customer/info',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除供应商信息
+ * @param id
+ */
+export const delInfo = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/info/' + id,
+    method: 'delete'
+  });
+};
+
+
+/**
+ * 获取供应商类型列表
+ */
+export const getComSupTyList = () => {
+  return request({
+    url: '/system/type/getComSupTyList',
+    method: 'get'
+  });
+};
+/**
+ * 获取产品分类列表
+ */
+export const getProductCategoryList = () => {
+  return request({
+    url: '/product/category/getProductCategoryList',
+    method: 'get'
+  });
+};
+/**
+ * 获取人员信息列表
+ */
+export const getComStaffList = (params?: any) => {
+  return request({
+    url: '/system/comStaff/list',
+    method: 'get',
+    params: params
+  });
+};
+/**
+ * 获取字典数据
+ */
+export const getDictData = (dictType: string) => {
+  return request({
+    url: `/system/dict/data/type/${dictType}`,
+    method: 'get'
+  });
+};
+
+/**
+ * 查询供应商信息列表(新接口,包含产品经理和采购员)
+ * @param query
+ * @returns {*}
+ */
+export const getInfoList = (query?: InfoQuery): AxiosPromise<InfoVO[]> => {
+  return request({
+    url: '/customer/info/getList',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询待审核供应商信息列表
+ * @param query
+ * @returns {*}
+ */
+export const getApproveList = (query?: InfoQuery): AxiosPromise<InfoVO[]> => {
+  return request({
+    url: '/customer/info/getApproveList',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 根据供应商ID获取人员信息
+ * @param supplierId 供应商ID
+ */
+export const getStaffInfoById = (supplierId: string | number) => {
+  return request({
+    url: '/system/comStaff/informationById',
+    method: 'get',
+    params: { supplierId }
+  });
+};
+
+/**
+ * 获取所有人员信息(用于下拉框)
+ */
+export const getStaffListSplice = () => {
+  return request({
+    url: '/system/comStaff/listSplice',
+    method: 'get'
+  });
+};
+
+/**
+ * 根据供应商ID获取产品经理和采购员ID
+ * @param supplierId 供应商ID
+ */
+export const getSupplierStaffIds = (supplierId: string | number) => {
+  return request({
+    url: '/system/comStaff/informationById',
+    method: 'get',
+    params: { supplierId: supplierId }
+  });
+};
+
+/**
+ * 根据供应商ID获取联系人列表
+ * @param supplierId 供应商ID
+ * @param params 分页参数
+ */
+export const getContactListById = (supplierId: string | number, params?: any) => {
+  return request({
+    url: '/customer/contact/getSupplierContactlistById',
+    method: 'get',
+    params: {
+      supplierId: supplierId,
+      ...params
+    }
+  });
+};
+
+/**
+ * 根据供应商ID获取已选择的品目ID列表
+ * @param supplierId 供应商ID
+ */
+export const getSupplierCategories = (supplierId: string | number) => {
+  return request({
+    url: '/customer/info/getSupplierCategories',
+    method: 'get',
+    params: { supplierId }
+  });
+};
+
+/**
+ * 根据供应商ID获取合同列表
+ * @param supplierId 供应商ID
+ * @param params 查询参数
+ */
+export const getSupplierContractsById = (supplierId: string | number, params?: any) => {
+  return request({
+    url: '/customer/supplierContract/supplierContractsById',
+    method: 'get',
+    params: {
+      supplierId: supplierId,
+      ...params
+    }
+  });
+};
+
+/**
+ * 根据供应商ID获取合同列表(新接口)
+ * @param supplierId 供应商ID
+ * @param params 查询参数
+ */
+export const getContractListById = (supplierId: string | number, params?: any) => {
+  return request({
+    url: '/customer/supplierContract/getListbyId',
+    method: 'get',
+    params: {
+      supplierId: supplierId,
+      ...params
+    }
+  });
+};
+
+/**
+ * 根据供应商ID获取银行账户信息
+ * @param id 供应商ID
+ */
+export const getBankBySupplierId = (id: string | number) => {
+  return request({
+    url: '/customer/supplierbank/getBankBySupplierId',
+    method: 'get',
+    params: { id }
+  });
+};
+
+/**
+ * 根据供应商ID获取授权详情列表
+ * @param supplierId 供应商ID
+ */
+export const getAuthorizeDetailList = (supplierId: string | number) => {
+  return request({
+    url: '/customer/supplierauthorize/getAuthorizeDetailList',
+    method: 'get',
+    params: { supplierId }
+  });
+};
+
+/**
+ * 保存供应商采购信息(产品经理和采购员)
+ * @param data 采购信息数据
+ */
+export const savePurchaseInfo = (data: { supplierId: string | number; productManager: number | null; purchaser: number | null }) => {
+  return request({
+    url: '/system/comStaff/saveInformation',
+    method: 'post',
+    data: data
+  });
+};
+/**
+ * 根据供应商ID获取地址列表
+ * @param supplierId 供应商ID
+ */
+export const getSupplierAddressById = (supplierId: string | number) => {
+  return request({
+    url: '/customer/supplieraddress/supplierAddressById',
+    method: 'get',
+    params: { supplierId }
+  });
+};
+
+/**
+ * 获取公司列表
+ */
+export const getCompanyList = () => {
+  return request({
+    url: '/system/company/list',
+    method: 'get'
+  });
+};
+
+/**
+ * 获取供应商类型列表
+ */
+export const getSupplierTypeList = (params?: any) => {
+  return request({
+    url: '/system/type/list',
+    method: 'get',
+    params: {
+
+
+      dataSource: 'youyi',
+      ...params
+    }
+  });
+};
+
+/**
+ * 获取供应商等级列表
+ */
+export const getSupplierLevelList = () => {
+  return request({
+    url: '/system/level/list',
+    method: 'get'
+  });
+};
+
+/**
+ * 获取企业规模列表
+ */
+export const getEnterpriseScaleList = () => {
+  return request({
+    url: '/customer/enterpriseScale/getlist',
+    method: 'get'
+  });
+};
+
+/**
+ * 获取行业类别列表
+ */
+export const getIndustryCategoryList = () => {
+  return request({
+    url: '/customer/industryCategory/getlist',
+    method: 'get'
+  });
+};
+
+/**
+ * 获取税率列表
+ */
+export const getTaxRateList = () => {
+  return request({
+    url: '/system/taxrate/list',
+    method: 'get'
+  });
+};
+
+/**
+ * 获取结算方式列表
+ */
+export const getSettlementMethodList = () => {
+  return request({
+    url: '/system/settlementMethod/list',
+    method: 'get'
+  });
+};
+
+/**
+ * 获取发票类型列表
+ */
+export const getInvoiceTypeList = () => {
+  return request({
+    url: '/system/invoiceType/list',
+    method: 'get'
+  });
+};

+ 910 - 0
src/api/customer/supplierInfo/types.ts

@@ -0,0 +1,910 @@
+export interface InfoVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 供应商编号
+   */
+  supplierNo: string;
+
+  /**
+   * 企业名称
+   */
+  enterpriseName: string;
+
+  /**
+   * 人员规模
+   */
+  membershipSize: string;
+
+  /**
+   * 供应商类型
+   */
+  supplierType: string | number;
+
+  /**
+   * 合作类型
+   */
+  cooperationType: string;
+
+  /**
+   * 固定电话
+   */
+  fixedPhone: string;
+
+  /**
+   * 传真
+   */
+  fax: string;
+
+  /**
+   * 网址
+   */
+  url: string;
+
+  /**
+   * 邮政编码
+   */
+  postCode: string;
+
+  /**
+   * 邮箱
+   */
+  mailbox: string;
+
+  /**
+   * 办公地址-省
+   */
+  officeProvince: string;
+
+  /**
+   * 办公地址-市
+   */
+  officeCity: string;
+
+  /**
+   * 办公地址-区/县
+   */
+  officeCounty?: string;
+
+  /**
+   * 办公详细地址
+   */
+  officeAddress: string;
+
+  /**
+   * 营业执照名称
+   */
+  businessName: string;
+
+  /**
+   * 统一社会信用代码
+   */
+  socialCreditCode: string;
+
+  /**
+   * 法人姓名
+   */
+  legalPersonName: string;
+
+  /**
+   * 法人身份证号
+   */
+  legalPersonId: string | number;
+
+  /**
+   * 注册资本
+   */
+  registeredCapital: string;
+
+  /**
+   * 注册地址-省
+   */
+  businessProvince: string;
+
+  /**
+   * 注册地址-市
+   */
+  businessCity: string;
+
+  /**
+   * 注册地址-区/县
+   */
+  businessCounty: string;
+
+  /**
+   * 注册详细地址
+   */
+  businessAddress: string;
+
+  /**
+   * 营业执照图片路径
+   */
+  businessLicense: string;
+
+  /**
+   * 发票类型
+   */
+  invoiceType: string;
+
+  /**
+   * 发票抬头
+   */
+  invoiceHeader: string;
+
+  /**
+   * 纳税人识别号
+   */
+  taxpayerIdentifier: string | number;
+
+  /**
+   * 开户银行
+   */
+  depositaryBank: string;
+
+  /**
+   * 行号(可能是银行行号)
+   */
+  rowNum: string;
+
+  /**
+   * 银行账号
+   */
+  bankAccounts: string;
+
+  /**
+   * 发票地址
+   */
+  invoiceAddress: string;
+
+  /**
+   * 发票电话
+   */
+  invoiceLandline: string;
+
+  /**
+   * 供货范围
+   */
+  scopeSupply: string;
+
+  /**
+   * 合作方式(0-公开招标, 1-邀请招标...)
+   */
+  cooperateWay: number;
+
+  /**
+   * 合作等级
+   */
+  cooperateLevel: string | number;
+
+  /**
+   * 合同到期时间
+   */
+  contractEndTime: string;
+
+  /**
+   * 供应状态(0-暂停, 1-正常...)
+   */
+  supplyStatus: number;
+
+  /**
+   * 供应评分
+   */
+  supplyScore: number;
+
+  /**
+   * 年销售额
+   */
+  yearSales: number;
+
+  /**
+   * 供应商联系人姓名
+   */
+  supplierName: string;
+
+  /**
+   * 供应商联系人电话
+   */
+  supplierPhone: string;
+
+  /**
+   * 供应商登录密码(已加密)
+   */
+  supplierPassword: string;
+
+  /**
+   * 经营品类
+   */
+  operatingCategory: string;
+
+  /**
+   * 经营品牌
+   */
+  operatingBrand: string;
+
+  /**
+   * 其他客户
+   */
+  otherCustomers: string;
+
+  /**
+   * 简称
+   */
+  shortName: string;
+
+  /**
+   * 所属行业
+   */
+  industrCategory: string;
+
+  /**
+   * 类型(可能与supplier_type重复或细分)
+   */
+  type: string;
+
+  /**
+   * 所属公司
+   */
+  ownedCompany: string;
+
+  /**
+   * 推送状态(0-未推送, 1-已推送...)
+   */
+  pushStatus: number;
+
+  /**
+   * 创建时间
+   */
+  created: string;
+
+  /**
+   * 修改时间
+   */
+  modify: string;
+
+  /**
+   * 有效期开始时间
+   */
+  validityFromDate: string | number;
+
+  /**
+   * 有效期结束时间
+   */
+  validityToDate: string | number;
+
+  /**
+   * 行号(可能是内部排序或备用字段)
+   */
+  rowNo: number;
+
+  /**
+   * 法人身份证图片路径
+   */
+  personImage: string;
+
+  /**
+   * 法人身份证图片路径Url
+   */
+  personImageUrl: string;
+  /**
+   * 对接次数
+   */
+  abutmentNo: number;
+
+  /**
+   * 是否合作(1-是, 0-否)
+   */
+  cooperative: number;
+
+  /**
+   * 供货区域(省)
+   */
+  province?: string;
+
+  /**
+   * 供货区域(市)
+   */
+  city?: string;
+
+}
+
+export interface InfoForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 供应商编号
+   */
+  supplierNo?: string;
+
+  /**
+   * 企业名称
+   */
+  enterpriseName?: string;
+
+  /**
+   * 人员规模
+   */
+  membershipSize?: string;
+
+  /**
+   * 供应商类型
+   */
+  supplierType?: string;
+
+  /**
+   * 合作类型
+   */
+  cooperationType?: string;
+
+  /**
+   * 固定电话
+   */
+  fixedPhone?: string;
+
+  /**
+   * 传真
+   */
+  fax?: string;
+
+  /**
+   * 网址
+   */
+  url?: string;
+
+  /**
+   * 邮政编码
+   */
+  postCode?: string;
+
+  /**
+   * 邮箱
+   */
+  mailbox?: string;
+
+  /**
+   * 办公地址-省
+   */
+  officeProvince?: string;
+
+  /**
+   * 办公地址-市
+   */
+  officeCity?: string;
+
+  /**
+   * 办公地址-区/县
+   */
+  officeCounty?: string;
+
+  /**
+   * 办公详细地址
+   */
+  officeAddress?: string;
+
+  /**
+   * 营业执照名称
+   */
+  businessName?: string;
+
+  /**
+   * 统一社会信用代码
+   */
+  socialCreditCode?: string;
+
+  /**
+   * 法人姓名
+   */
+  legalPersonName?: string;
+
+  /**
+   * 法人身份证号
+   */
+  legalPersonId?: string | number;
+
+  /**
+   * 注册资本
+   */
+  registeredCapital?: string;
+
+  /**
+   * 注册地址-省
+   */
+  businessProvince?: string;
+
+  /**
+   * 注册地址-市
+   */
+  businessCity?: string;
+
+  /**
+   * 注册地址-区/县
+   */
+  businessCounty?: string;
+
+  /**
+   * 注册详细地址
+   */
+  businessAddress?: string;
+
+  /**
+   * 营业执照图片路径
+   */
+  businessLicense?: string;
+
+  /**
+   * 发票类型
+   */
+  invoiceType?: string;
+
+  /**
+   * 发票抬头
+   */
+  invoiceHeader?: string;
+
+  /**
+   * 纳税人识别号
+   */
+  taxpayerIdentifier?: string | number;
+
+  /**
+   * 开户银行
+   */
+  depositaryBank?: string;
+
+  /**
+   * 行号(可能是银行行号)
+   */
+  rowNum?: string;
+
+  /**
+   * 银行账号
+   */
+  bankAccounts?: string;
+
+  /**
+   * 发票地址
+   */
+  invoiceAddress?: string;
+
+  /**
+   * 发票电话
+   */
+  invoiceLandline?: string;
+
+  /**
+   * 供货范围
+   */
+  scopeSupply?: string;
+
+  /**
+   * 合作方式(0-公开招标, 1-邀请招标...)
+   */
+  cooperateWay?: number;
+
+  /**
+   * 合作等级
+   */
+  cooperateLevel?: string;
+
+  /**
+   * 合同到期时间
+   */
+  contractEndTime?: string;
+
+  /**
+   * 供应状态(0-暂停, 1-正常...)
+   */
+  supplyStatus?: number;
+
+  /**
+   * 供应评分
+   */
+  supplyScore?: number;
+
+  /**
+   * 年销售额
+   */
+  yearSales?: number;
+
+  /**
+   * 供应商联系人姓名
+   */
+  supplierName?: string;
+
+  /**
+   * 供应商联系人电话
+   */
+  supplierPhone?: string;
+
+  /**
+   * 供应商登录密码(已加密)
+   */
+  supplierPassword?: string;
+
+  /**
+   * 经营品类
+   */
+  operatingCategory?: string;
+
+  /**
+   * 经营品牌
+   */
+  operatingBrand?: string;
+
+  /**
+   * 其他客户
+   */
+  otherCustomers?: string;
+
+  /**
+   * 简称
+   */
+  shortName?: string;
+
+  /**
+   * 所属行业
+   */
+  industrCategory?: string;
+
+  /**
+   * 类型(可能与supplier_type重复或细分)
+   */
+  type?: string;
+
+  /**
+   * 所属公司
+   */
+  ownedCompany?: string;
+
+  /**
+   * 推送状态(0-未推送, 1-已推送...)
+   */
+  pushStatus?: number;
+
+  /**
+   * 创建时间
+   */
+  created?: string;
+
+  /**
+   * 修改时间
+   */
+  modify?: string;
+
+  /**
+   * 有效期开始时间
+   */
+  validityFromDate?: string | number;
+
+  /**
+   * 有效期结束时间
+   */
+  validityToDate?: string | number;
+
+  /**
+   * 行号(可能是内部排序或备用字段)
+   */
+  rowNo?: number;
+
+  /**
+   * 法人身份证图片路径
+   */
+  personImage?: string;
+
+  /**
+   * 对接次数
+   */
+  abutmentNo?: number;
+
+  /**
+   * 是否合作(1-是, 0-否)
+   */
+  cooperative?: number;
+
+}
+
+export interface InfoQuery extends PageQuery {
+
+  /**
+   * 供应商编号
+   */
+  supplierNo?: string;
+
+  /**
+   * 企业名称
+   */
+  enterpriseName?: string;
+
+  /**
+   * 人员规模
+   */
+  membershipSize?: string;
+
+  /**
+   * 供应商类型
+   */
+  supplierType?: string;
+
+  /**
+   * 合作类型
+   */
+  cooperationType?: string;
+
+  /**
+   * 固定电话
+   */
+  fixedPhone?: string;
+
+  /**
+   * 传真
+   */
+  fax?: string;
+
+  /**
+   * 网址
+   */
+  url?: string;
+
+  /**
+   * 邮政编码
+   */
+  postCode?: string;
+
+  /**
+   * 邮箱
+   */
+  mailbox?: string;
+
+  /**
+   * 办公地址-省
+   */
+  officeProvince?: string;
+
+  /**
+   * 办公地址-市
+   */
+  officeCity?: string;
+
+  /**
+   * 办公地址-区/县
+   */
+  officeCounty?: string;
+
+  /**
+   * 办公详细地址
+   */
+  officeAddress?: string;
+
+  /**
+   * 营业执照名称
+   */
+  businessName?: string;
+
+  /**
+   * 统一社会信用代码
+   */
+  socialCreditCode?: string;
+
+  /**
+   * 法人姓名
+   */
+  legalPersonName?: string;
+
+  /**
+   * 法人身份证号
+   */
+  legalPersonId?: string | number;
+
+  /**
+   * 注册资本
+   */
+  registeredCapital?: string;
+
+  /**
+   * 注册地址-省
+   */
+  businessProvince?: string;
+
+  /**
+   * 注册地址-市
+   */
+  businessCity?: string;
+
+  /**
+   * 注册地址-区/县
+   */
+  businessCounty?: string;
+
+  /**
+   * 注册详细地址
+   */
+  businessAddress?: string;
+
+  /**
+   * 营业执照图片路径
+   */
+  businessLicense?: string;
+
+  /**
+   * 发票类型
+   */
+  invoiceType?: string;
+
+  /**
+   * 发票抬头
+   */
+  invoiceHeader?: string;
+
+  /**
+   * 纳税人识别号
+   */
+  taxpayerIdentifier?: string | number;
+
+  /**
+   * 开户银行
+   */
+  depositaryBank?: string;
+
+  /**
+   * 行号(可能是银行行号)
+   */
+  rowNum?: string;
+
+  /**
+   * 银行账号
+   */
+  bankAccounts?: string;
+
+  /**
+   * 发票地址
+   */
+  invoiceAddress?: string;
+
+  /**
+   * 发票电话
+   */
+  invoiceLandline?: string;
+
+  /**
+   * 供货范围
+   */
+  scopeSupply?: string;
+
+  /**
+   * 合作方式(0-公开招标, 1-邀请招标...)
+   */
+  cooperateWay?: number;
+
+  /**
+   * 合作等级
+   */
+  cooperateLevel?: string;
+
+  /**
+   * 合同到期时间
+   */
+  contractEndTime?: string;
+
+  /**
+   * 供应状态(0-暂停, 1-正常...)
+   */
+  supplyStatus?: number;
+
+  /**
+   * 供应评分
+   */
+  supplyScore?: number;
+
+  /**
+   * 年销售额
+   */
+  yearSales?: number;
+
+  /**
+   * 供应商联系人姓名
+   */
+  supplierName?: string;
+
+  /**
+   * 供应商联系人电话
+   */
+  supplierPhone?: string;
+
+  /**
+   * 供应商登录密码(已加密)
+   */
+  supplierPassword?: string;
+
+  /**
+   * 经营品类
+   */
+  operatingCategory?: string;
+
+  /**
+   * 经营品牌
+   */
+  operatingBrand?: string;
+
+  /**
+   * 其他客户
+   */
+  otherCustomers?: string;
+
+  /**
+   * 简称
+   */
+  shortName?: string;
+
+  /**
+   * 所属行业
+   */
+  industrCategory?: string;
+
+  /**
+   * 类型(可能与supplier_type重复或细分)
+   */
+  type?: string;
+
+  /**
+   * 所属公司
+   */
+  ownedCompany?: string;
+
+  /**
+   * 推送状态(0-未推送, 1-已推送...)
+   */
+  pushStatus?: number;
+
+  /**
+   * 创建时间
+   */
+  created?: string;
+
+  /**
+   * 修改时间
+   */
+  modify?: string;
+
+  /**
+   * 有效期开始时间
+   */
+  validityFromDate?: string | number;
+
+  /**
+   * 有效期结束时间
+   */
+  validityToDate?: string | number;
+
+  /**
+   * 行号(可能是内部排序或备用字段)
+   */
+  rowNo?: number;
+
+  /**
+   * 法人身份证图片路径
+   */
+  personImage?: string;
+
+  /**
+   * 对接次数
+   */
+  abutmentNo?: number;
+
+  /**
+   * 是否合作(1-是, 0-否)
+   */
+  cooperative?: number;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 111 - 0
src/api/order/orderDeliver/index.ts

@@ -0,0 +1,111 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { OrderDeliverVO, OrderDeliverForm, OrderDeliverQuery } from '@/api/order/orderDeliver/types';
+
+/**
+ * 查询订单发货主列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listOrderDeliver = (query?: OrderDeliverQuery): AxiosPromise<OrderDeliverVO[]> => {
+  return request({
+    url: '/order/orderDeliver/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询订单发货主详细
+ * @param id
+ */
+export const getOrderDeliver = (id: string | number): AxiosPromise<OrderDeliverVO> => {
+  return request({
+    url: '/order/orderDeliver/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增订单发货主
+ * @param data
+ */
+export const addOrderDeliver = (data: OrderDeliverForm) => {
+  return request({
+    url: '/order/orderDeliver',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改订单发货主
+ * @param data
+ */
+export const updateOrderDeliver = (data: OrderDeliverForm) => {
+  return request({
+    url: '/order/orderDeliver',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除订单发货主
+ * @param id
+ */
+export const delOrderDeliver = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/order/orderDeliver/' + id,
+    method: 'delete'
+  });
+};
+
+/**
+ * 查询订单发货物流信息
+ * @param query
+ * @returns {*}
+ */
+
+export const queryTrack = (query?: OrderDeliverQuery): AxiosPromise<OrderDeliverVO[]> => {
+  return request({
+    url: '/order/orderDeliver/queryTrack',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 根据客户ID查询发货单(分页)
+ * @param customerId 客户ID
+ * @param pageQuery 分页参数
+ */
+export const getCustomerDeliverOrders = (customerId: string | number, pageQuery?: { pageNum?: number; pageSize?: number }) => {
+  return request({
+    url: '/order/orderDeliver/getCustomerDeliverOrders/' + customerId,
+    method: 'get',
+    params: pageQuery
+  });
+};
+
+/**
+ * 根据多个订单ID查询对应的订单商品列表
+ * @param orderIds
+ */
+export function getCustomerOrderProductList(orderIds: (string | number)[]) {
+  if (!Array.isArray(orderIds) || orderIds.length === 0) {
+    return Promise.reject(new Error('订单ID不能为空'));
+  }
+
+  // 手动构造查询参数,确保格式为 orderId=1&orderId=2&orderId=3
+  const params = new URLSearchParams();
+  orderIds.forEach((id) => {
+    params.append('orderId', String(id));
+  });
+
+  return request({
+    url: '/order/orderDeliver/getCustomerOrderProductList?' + params.toString(),
+    method: 'get'
+  });
+}

+ 253 - 0
src/api/order/orderDeliver/types.ts

@@ -0,0 +1,253 @@
+export interface OrderDeliverVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 订单id
+   */
+  orderId: string | number;
+
+  /**
+   * 订单编号
+   */
+  orderCode: string;
+
+  /**
+   * 物流包裹号
+   */
+  logisticPackNo: string;
+
+  /**
+   * 发货方式
+   */
+  deliverMethod: string;
+
+  /**
+   * 送货人姓名
+   */
+  deliverMan: string;
+
+  /**
+   * 送货人联系电话
+   */
+  phone: string;
+
+  /**
+   * 物流状态
+   */
+  logisticsStatus: string;
+
+  /**
+   * 发货备注
+   */
+  deliverRemark: string;
+
+  /**
+   * 装箱/验货备注
+   */
+  checklistRemark: string;
+
+  /**
+   * 承运物流公司
+   */
+  logisticsCompanyId: number;
+
+  /**
+   * 承运物流公司编码
+   */
+  logisticsCompanyCode: string;
+
+  /**
+   * 物流单号
+   */
+  logisticNo: string;
+
+  /**
+   * 包裹状态
+   */
+  logisticPackStatus: string;
+
+  /**
+   * 收货人电话
+   */
+  consigneePhone: string;
+
+  dataSource: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+  deliverProductList: any[];
+}
+
+export interface OrderDeliverForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 订单id
+   */
+  orderId?: string | number;
+
+  /**
+   * 订单编号
+   */
+  orderCode?: string;
+
+  /**
+   * 物流包裹号
+   */
+  logisticPackNo?: string;
+
+  /**
+   * 发货方式
+   */
+  deliverMethod?: string;
+
+  /**
+   * 送货人姓名
+   */
+  deliverMan?: string;
+
+  /**
+   * 送货人联系电话
+   */
+  phone?: string;
+
+  /**
+   * 物流状态
+   */
+  logisticsStatus?: string;
+
+  /**
+   * 发货备注
+   */
+  deliverRemark?: string;
+
+  /**
+   * 装箱/验货备注
+   */
+  checklistRemark?: string;
+
+  /**
+   * 承运物流公司
+   */
+  logisticsCompanyId?: number;
+
+  /**
+   * 承运物流公司编码
+   */
+  logisticsCompanyCode?: string;
+
+  /**
+   * 物流单号
+   */
+  logisticNo?: string;
+
+  /**
+   * 包裹状态
+   */
+  logisticPackStatus?: string;
+
+  /**
+   * 收货人电话
+   */
+  consigneePhone?: string;
+
+  dataSource?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+  /**
+   * 订单商品明细列表
+   */
+  orderDeliverProducts?: any[];
+}
+
+export interface OrderDeliverQuery extends PageQuery {
+  /**
+   * 订单id
+   */
+  orderId?: string | number;
+
+  /**
+   * 订单编号
+   */
+  orderCode?: string;
+
+  /**
+   * 物流包裹号
+   */
+  logisticPackNo?: string;
+
+  /**
+   * 发货方式
+   */
+  deliverMethod?: string;
+
+  /**
+   * 送货人姓名
+   */
+  deliverMan?: string;
+
+  /**
+   * 送货人联系电话
+   */
+  phone?: string;
+
+  /**
+   * 物流状态
+   */
+  logisticsStatus?: string;
+
+  /**
+   * 发货备注
+   */
+  deliverRemark?: string;
+
+  /**
+   * 装箱/验货备注
+   */
+  checklistRemark?: string;
+
+  /**
+   * 承运物流公司
+   */
+  logisticsCompany?: number;
+
+  /**
+   * 物流单号
+   */
+  logisticNo?: string;
+
+  /**
+   * 包裹状态
+   */
+  logisticPackStatus?: string;
+
+  /**
+   * 收货人电话
+   */
+  consigneePhone?: string;
+
+  dataSource?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 171 - 0
src/api/order/orderMain/index.ts

@@ -0,0 +1,171 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { OrderMainVO, OrderMainForm, OrderMainQuery } from '@/api/order/orderMain/types';
+
+/**
+ * 查询订单主信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listOrderMain = (query?: OrderMainQuery): AxiosPromise<OrderMainVO[]> => {
+  return request({
+    url: '/order/orderMain/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询分配订单信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listOrderAssignment = (query?: OrderMainQuery): AxiosPromise<OrderMainVO[]> => {
+  return request({
+    url: '/order/orderMain/assignmentList',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询订单主信息详细
+ * @param id
+ */
+export const getOrderMain = (id: string | number): AxiosPromise<OrderMainVO> => {
+  return request({
+    url: '/order/orderMain/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增订单主信息
+ * @param data
+ */
+export const addOrderMain = (data: OrderMainForm) => {
+  return request({
+    url: '/order/orderMain',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改订单主信息
+ * @param data
+ */
+export const updateOrderMain = (data: OrderMainForm) => {
+  return request({
+    url: '/order/orderMain',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 确认订单
+ * @param data
+ */
+export const orderAffirm = (data: OrderMainForm) => {
+  return request({
+    url: '/order/orderMain/orderAffirm',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除订单主信息
+ * @param id
+ */
+export const delOrderMain = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/order/orderMain/' + id,
+    method: 'delete'
+  });
+};
+
+/**
+ * 关闭订单
+ * @param id
+ */
+export const closeOrderMain = (id: string | number | Array<string | number>) => {
+  const ids = Array.isArray(id) ? id : [id];
+
+  return request({
+    url: '/order/orderMain/closeOrder',
+    method: 'post',
+    params: { ids }
+  });
+};
+
+/**
+ * 查询数量
+ * @param query
+ * @returns {*}
+ */
+
+export const queryOrderStatusStats = () => {
+  return request({
+    url: '/order/orderMain/queryOrderStatusStats',
+    method: 'get'
+  });
+};
+
+/**
+ * 修改审核状态
+ * @param id
+ * @param checkStatus
+ */
+export function changeCheckStatus(id: string | number, checkStatus: string) {
+  const data = {
+    id,
+    checkStatus
+  };
+  return request({
+    url: '/order/orderMain/checkStatus',
+    method: 'put',
+    data: data
+  });
+}
+
+/**
+ * 修改订单状态
+ * @param id
+ * @param orderStatus
+ */
+export function changeStatus(id: string | number, orderStatus: string) {
+  const data = {
+    id,
+    orderStatus
+  };
+  return request({
+    url: '/order/orderMain/changeStatus',
+    method: 'put',
+    data: data
+  });
+}
+
+/**
+ * 根据多个订单ID查询对应的订单商品列表
+ * @param orderIds
+ */
+export function getCustomerOrderProductList(orderIds: (string | number)[]) {
+  if (!Array.isArray(orderIds) || orderIds.length === 0) {
+    return Promise.reject(new Error('订单ID不能为空'));
+  }
+
+  // 手动构造查询参数,确保格式为 orderId=1&orderId=2&orderId=3
+  const params = new URLSearchParams();
+  orderIds.forEach((id) => {
+    params.append('orderId', String(id));
+  });
+
+  return request({
+    url: '/order/orderMain/getCustomerOrderProductList?' + params.toString(),
+    method: 'get'
+  });
+}

+ 769 - 0
src/api/order/orderMain/types.ts

@@ -0,0 +1,769 @@
+export interface OrderMainVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 订单编号
+   */
+  orderNo: string;
+
+  /**
+   * 发货单号
+   */
+  shipmentNo: string;
+
+  /**
+   * 子订单编号
+   */
+  subOrderNo: string;
+
+  /**
+   * 所属公司
+   */
+  companyId: string | number;
+
+  /**
+   * 客户ID(关联客户主表)
+   */
+  customerId: string | number;
+
+  /**
+   * 客户编号
+   */
+  customerCode: string;
+
+  customerName: string;
+
+  /**
+   * 用户ID(关联用户表)
+   */
+  userId: string | number;
+
+  /**
+   * 收货地址ID
+   */
+  shippingAddressId: string | number;
+
+  /**
+   * 采购事由
+   */
+  purchaseReason: string;
+
+  /**
+   * 发票类型
+   */
+  invoiceType: string;
+
+  /**
+   * 支付方式
+   */
+  payType: string;
+
+  /**
+   * 发货仓库
+   */
+  warehouseId: string | number;
+
+  /**
+   * 信用额度(元)
+   */
+  creditLimit: number;
+
+  /**
+   * 预计送达时间
+   */
+  expectedDeliveryTime: string;
+
+  /**
+   * 业务员姓名/工号
+   */
+  businessStaff: string;
+
+  /**
+   * 客服人员
+   */
+  customerService: string;
+
+  /**
+   * 业务部门
+   */
+  businessDept: string;
+
+  /**
+   * 用户所属部门
+   */
+  userDept: string;
+
+  /**
+   * 商品总数量
+   */
+  productQuantity: number;
+
+  /**
+   * 商品种数
+   */
+  productTotal: number;
+
+  /**
+   * 已分配数量
+   */
+  assigned: number;
+
+  /**
+   * 未分配数量
+   */
+  unassigned: number;
+
+  /**
+   * 运费(元)
+   */
+  shippingFee: number;
+
+  /**
+   * 订单总金额(元)
+   */
+  totalAmount: number;
+
+  /**
+   * 应付金额(元)
+   */
+  payableAmount: number;
+
+  /**
+   * 支付状态
+   */
+  paymentStatus: string;
+
+  /**
+   * 订单来源
+   */
+  orderSource: string;
+
+  /**
+   * 订单状态
+   */
+  orderStatus: string;
+
+  /**
+   * 下单时间
+   */
+  orderTime: string;
+
+  /**
+   * 确认时间
+   */
+  confirmTime: string;
+
+  /**
+   * 发货时间
+   */
+  shippingTime: string;
+
+  /**
+   * 收货时间
+   */
+  receivingTime: string;
+
+  /**
+   * 已发货数量
+   */
+  shippedQuantity: number;
+
+  /**
+   * 未发货数量
+   */
+  unshippedQuantity: number;
+
+  /**
+   * 包裹数量
+   */
+  packageCount: number;
+
+  /**
+   * 签收数量
+   */
+  signedQuantity: number;
+
+  /**
+   * 已完成售后数量
+   */
+  afterSaleCompleted: number;
+
+  /**
+   * 申请售后数量
+   */
+  afterSalePending: number;
+
+  /**
+   * 配送时效描述
+   */
+  deliveryDesc: string;
+
+  /**
+   * 推送状态
+   */
+  pushStatus: string;
+
+  /**
+   * 订单附件文件路径
+   */
+  attachmentPath: string;
+
+  /**
+   * 配送类型
+   */
+  deliveryType: string;
+
+  /**
+   * 创建类别
+   */
+  orderCategory: string;
+
+  /**
+   * 商品编码
+   */
+  productCode: string;
+
+  /**
+   * 取消或异常原因
+   */
+  cancelReason: string;
+
+  /**
+   * 费用类型
+   */
+  expenseType: string;
+
+  /**
+   * 用户编号
+   */
+  userNo: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  platformCode: string;
+
+  dataSource: string;
+
+  isSplitChild: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+  checkStatus: string;
+
+  assignmentStatus: string;
+
+  orderProductList: any[];
+
+  deliverProductList: any[];
+}
+
+export interface OrderMainForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 订单编号
+   */
+  orderNo?: string;
+
+  /**
+   * 发货单号
+   */
+  shipmentNo?: string;
+
+  /**
+   * 子订单编号
+   */
+  subOrderNo?: string;
+
+  /**
+   * 所属公司
+   */
+  companyId?: string | number;
+
+  /**
+   * 客户ID(关联客户主表)
+   */
+  customerId?: string | number;
+
+  /**
+   * 客户编号
+   */
+  customerCode: string;
+
+  /**
+   * 用户ID(关联用户表)
+   */
+  userId?: string | number;
+
+  /**
+   * 收货地址ID
+   */
+  shippingAddressId?: string | number;
+
+  /**
+   * 采购事由
+   */
+  purchaseReason?: string;
+
+  /**
+   * 发票类型
+   */
+  invoiceType?: string;
+
+  /**
+   * 支付方式
+   */
+  payType?: string;
+
+  /**
+   * 发货仓库
+   */
+  warehouseId?: string | number;
+
+  /**
+   * 信用额度(元)
+   */
+  creditLimit?: number;
+
+  /**
+   * 预计送达时间
+   */
+  expectedDeliveryTime?: string;
+
+  /**
+   * 业务员姓名/工号
+   */
+  businessStaff?: string;
+
+  /**
+   * 客服人员
+   */
+  customerService?: string;
+
+  /**
+   * 业务部门
+   */
+  businessDept?: string;
+
+  /**
+   * 用户所属部门
+   */
+  userDept?: string;
+
+  /**
+   * 商品总数量
+   */
+  productQuantity?: number;
+
+  /**
+   * 运费(元)
+   */
+  shippingFee?: number;
+
+  /**
+   * 订单总金额(元)
+   */
+  totalAmount?: number;
+
+  /**
+   * 应付金额(元)
+   */
+  payableAmount?: number;
+
+  /**
+   * 支付状态
+   */
+  paymentStatus?: string;
+
+  /**
+   * 订单来源
+   */
+  orderSource?: string;
+
+  /**
+   * 订单状态
+   */
+  orderStatus?: string;
+
+  /**
+   * 下单时间
+   */
+  orderTime?: string;
+
+  /**
+   * 确认时间
+   */
+  confirmTime?: string;
+
+  /**
+   * 发货时间
+   */
+  shippingTime?: string;
+
+  /**
+   * 收货时间
+   */
+  receivingTime?: string;
+
+  /**
+   * 已发货数量
+   */
+  shippedQuantity?: number;
+
+  /**
+   * 未发货数量
+   */
+  unshippedQuantity?: number;
+
+  /**
+   * 包裹数量
+   */
+  packageCount?: number;
+
+  /**
+   * 签收数量
+   */
+  signedQuantity?: number;
+
+  /**
+   * 已完成售后数量
+   */
+  afterSaleCompleted?: number;
+
+  /**
+   * 申请售后数量
+   */
+  afterSalePending?: number;
+
+  /**
+   * 配送时效描述
+   */
+  deliveryDesc?: string;
+
+  /**
+   * 推送状态
+   */
+  pushStatus?: string;
+
+  /**
+   * 订单附件文件路径
+   */
+  attachmentPath?: string;
+
+  /**
+   * 配送类型
+   */
+  deliveryType?: string;
+
+  /**
+   * 创建类别
+   */
+  orderCategory?: string;
+
+  /**
+   * 商品编码
+   */
+  productCode?: string;
+
+  /**
+   * 取消或异常原因
+   */
+  cancelReason?: string;
+
+  /**
+   * 费用类型
+   */
+  expenseType?: string;
+
+  /**
+   * 用户编号
+   */
+  userNo?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  isSplitChild: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+  dataSource?: string;
+
+  checkStatus?: string;
+
+  assignmentStatus?: string;
+
+  /**
+   * 订单商品明细列表
+   */
+  orderProductBos?: any[];
+
+  customerSalesInfoVo: any;
+}
+
+export interface OrderMainQuery extends PageQuery {
+  /**
+   * 订单编号
+   */
+  orderNo?: string;
+
+  /**
+   * 发货单号
+   */
+  shipmentNo?: string;
+
+  /**
+   * 子订单编号
+   */
+  subOrderNo?: string;
+
+  /**
+   * 所属公司
+   */
+  companyId?: string | number;
+
+  /**
+   * 客户ID(关联客户主表)
+   */
+  customerId?: string | number;
+
+  /**
+   * 用户ID(关联用户表)
+   */
+  userId?: string | number;
+
+  /**
+   * 收货地址ID
+   */
+  shippingAddressId?: string | number;
+
+  /**
+   * 采购事由
+   */
+  purchaseReason?: string;
+
+  /**
+   * 发票类型
+   */
+  invoiceType?: string;
+
+  /**
+   * 支付方式
+   */
+  payType?: string;
+
+  /**
+   * 发货仓库
+   */
+  warehouseId?: string | number;
+
+  /**
+   * 信用额度(元)
+   */
+  creditLimit?: number;
+
+  /**
+   * 预计送达时间
+   */
+  expectedDeliveryTime?: string;
+
+  /**
+   * 业务员姓名/工号
+   */
+  businessStaff?: string;
+
+  /**
+   * 客服人员
+   */
+  customerService?: string;
+
+  /**
+   * 业务部门
+   */
+  businessDept?: string;
+
+  /**
+   * 用户所属部门
+   */
+  userDept?: string;
+
+  /**
+   * 商品总数量
+   */
+  productQuantity?: number;
+
+  /**
+   * 运费(元)
+   */
+  shippingFee?: number;
+
+  /**
+   * 订单总金额(元)
+   */
+  totalAmount?: number;
+
+  /**
+   * 应付金额(元)
+   */
+  payableAmount?: number;
+
+  /**
+   * 支付状态
+   */
+  paymentStatus?: string;
+
+  /**
+   * 订单来源
+   */
+  orderSource?: string;
+
+  customerName?: string;
+
+  /**
+   * 订单状态
+   */
+  orderStatus?: string;
+
+  orderStatuses?: string;
+
+  /**
+   * 下单时间
+   */
+  orderTime?: string;
+
+  /**
+   * 确认时间
+   */
+  confirmTime?: string;
+
+  /**
+   * 发货时间
+   */
+  shippingTime?: string;
+
+  /**
+   * 收货时间
+   */
+  receivingTime?: string;
+
+  /**
+   * 已发货数量
+   */
+  shippedQuantity?: number;
+
+  /**
+   * 未发货数量
+   */
+  unshippedQuantity?: number;
+
+  /**
+   * 包裹数量
+   */
+  packageCount?: number;
+
+  /**
+   * 签收数量
+   */
+  signedQuantity?: number;
+
+  /**
+   * 已完成售后数量
+   */
+  afterSaleCompleted?: number;
+
+  /**
+   * 申请售后数量
+   */
+  afterSalePending?: number;
+
+  /**
+   * 配送时效描述
+   */
+  deliveryDesc?: string;
+
+  /**
+   * 推送状态
+   */
+  pushStatus?: string;
+
+  /**
+   * 订单附件文件路径
+   */
+  attachmentPath?: string;
+
+  /**
+   * 配送类型
+   */
+  deliveryType?: string;
+
+  /**
+   * 创建类别
+   */
+  orderCategory?: string;
+
+  /**
+   * 商品编码
+   */
+  productCode?: string;
+
+  /**
+   * 取消或异常原因
+   */
+  cancelReason?: string;
+
+  /**
+   * 费用类型
+   */
+  expenseType?: string;
+
+  /**
+   * 客户编号
+   */
+
+  customerCode?: string;
+
+  /**
+   * 用户编号
+   */
+  userNo?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  dataSource?: string;
+
+  isSplitChild?: string;
+
+  checkStatus?: string;
+
+  assignmentStatus?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 587 - 0
src/views/bill/statementInvoice/addDrawer.vue

@@ -0,0 +1,587 @@
+<template>
+  <!-- 新增/编辑发票抽屉 -->
+  <el-drawer v-model="drawer.visible" size="75%" direction="rtl" :before-close="handleDrawerClose" :close-on-click-modal="true">
+    <template #header>
+      <div class="drawer-header">
+        <span class="order-title">{{ drawer.title }}</span>
+      </div>
+    </template>
+
+    <div class="drawer-content">
+      <el-form ref="formRef" :model="form" :rules="rules" label-width="120px">
+        <!-- 基本信息 -->
+        <el-divider content-position="left">
+          <span style="color: #409eff; font-weight: 600">基本信息</span>
+        </el-divider>
+
+        <el-row :gutter="20">
+          <el-col :span="8">
+            <el-form-item label="客户名称" prop="customerId">
+              <el-select
+                v-model="form.customerId"
+                filterable
+                remote
+                reserve-keyword
+                placeholder="请输入客户名称"
+                :remote-method="remoteSearchCustomer"
+                :loading="customerLoading"
+                clearable
+                style="width: 100%"
+                @change="handleCustomerChange"
+              >
+                <el-option v-for="item in customerOptions" :key="item.id" :label="item.customerName" :value="item.id" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="开票金额" prop="invoiceAmount">
+              <el-input v-model="form.invoiceAmount" disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="开票日期" prop="invoiceTime">
+              <el-date-picker v-model="form.invoiceTime" type="date" placeholder="请选择开票日期" style="width: 100%" value-format="YYYY-MM-DD" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <!-- 账单列表 -->
+        <el-divider content-position="left">
+          <span style="color: #409eff; font-weight: 600">账单列表</span>
+        </el-divider>
+        <div class="table-actions" style="margin-bottom: 15px">
+          <el-button type="primary" icon="Plus" @click="handleSelectStatement">选择对账单</el-button>
+        </div>
+
+        <el-table :data="form.detailList" border style="width: 100%; margin-bottom: 20px">
+          <el-table-column type="index" label="序号" width="60" align="center" />
+          <el-table-column prop="statementOrderNo" label="对账单编号" min-width="150" align="center" />
+          <el-table-column prop="statementAmount" label="对账金额" min-width="120" align="center" />
+          <el-table-column prop="orderNo" label="订单编号" min-width="150" align="center" />
+          <el-table-column prop="orderAmount" label="金额" min-width="120" align="center" />
+          <el-table-column prop="orderTime" label="下单日期" min-width="120" align="center" />
+          <el-table-column prop="userName" label="下单人" min-width="100" align="center" />
+          <el-table-column prop="userDept" label="部门" min-width="120" align="center" />
+        </el-table>
+
+        <!-- 商品清单 -->
+        <el-divider content-position="left">
+          <span style="color: #409eff; font-weight: 600">商品清单</span>
+        </el-divider>
+
+        <el-table :data="pagedProductList" border style="width: 100%; margin-bottom: 20px">
+          <el-table-column
+            type="index"
+            label="序号"
+            width="60"
+            align="center"
+            :index="(index) => (productPage.pageNum - 1) * productPage.pageSize + index + 1"
+          />
+          <el-table-column prop="orderNo" label="订单编号" min-width="120" align="center" />
+          <el-table-column prop="productNo" label="商品编号" min-width="120" align="center" />
+          <el-table-column prop="itemName" label="商品名称" min-width="180" align="center" />
+          <el-table-column prop="unitName" label="单位" align="center" />
+          <el-table-column prop="quantity" label="数量" align="center" />
+          <el-table-column prop="unitPrice" label="单价" align="center">
+            <template #default="scope">
+              {{ scope.row.unitPrice ? Number(scope.row.unitPrice).toFixed(2) : '0.00' }}
+            </template>
+          </el-table-column>
+          <el-table-column label="小计" align="center">
+            <template #default="scope">
+              {{ (Number(scope.row.quantity || 0) * Number(scope.row.unitPrice || 0)).toFixed(2) }}
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <!-- 分页 -->
+        <el-pagination
+          v-if="form.productList && form.productList.length > 0"
+          v-model:current-page="productPage.pageNum"
+          v-model:page-size="productPage.pageSize"
+          :page-sizes="[10, 20, 50, 100]"
+          layout="total, sizes, prev, pager, next, jumpers"
+          :total="productPage.total"
+          @size-change="handleProductSizeChange"
+          @current-change="handleProductCurrentChange"
+          style="margin-top: 15px"
+        />
+
+        <!-- 发票列表 -->
+        <el-divider content-position="left">
+          <span style="color: #409eff; font-weight: 600">发票列表</span>
+        </el-divider>
+
+        <div class="table-actions" style="margin-bottom: 15px">
+          <el-button type="primary" icon="Plus" @click="handleAddInvoice">新增发票</el-button>
+        </div>
+
+        <!-- 发票表格 -->
+        <el-table :data="invoiceList" border style="width: 100%; margin-bottom: 20px">
+          <el-table-column prop="invoiceType" label="发票类型" min-width="120" align="center">
+            <template #default="scope">
+              <dict-tag :options="invoice_type" :value="scope.row.invoiceType" />
+            </template>
+          </el-table-column>
+          <el-table-column prop="invoiceDate" label="开票日期" min-width="120" align="center" />
+          <el-table-column prop="invoiceCode" label="发票代码" min-width="150" align="center" />
+          <el-table-column prop="invoiceAmount" label="发票金额" min-width="120" align="center">
+            <template #default="scope">
+              {{ Number(scope.row.invoiceAmount || 0).toFixed(2) }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="remark" label="备注" align="center" />
+          <el-table-column label="操作" width="150" align="center">
+            <template #default="scope">
+              <el-button link type="primary" size="small" @click="handleEditInvoice(scope.row, scope.$index)">编辑</el-button>
+              <el-button link type="danger" size="small" @click="handleDeleteInvoice(scope.$index)">删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-form>
+    </div>
+
+    <template #footer>
+      <div class="drawer-footer">
+        <el-button @click="handleDrawerClose(() => (drawer.visible = false))">取消</el-button>
+        <el-button type="primary" :loading="buttonLoading" @click="handleSubmit">确定</el-button>
+      </div>
+    </template>
+  </el-drawer>
+
+  <!-- 对账单选择抽屉 -->
+  <StatementOrderDrawer ref="statementOrderDrawerRef" @success="handleStatementSelected" />
+
+  <!-- 文件选择器 -->
+  <FileSelector v-model="fileSelectorVisible" :multiple="true" :allowed-types="[1, 2, 3, 4, 5]" title="选择发票附件" @confirm="handleFileSelected" />
+
+  <!-- 新增发票对话框 -->
+  <AddInvoiceDialog ref="addInvoiceDialogRef" @success="handleInvoiceAdded" />
+</template>
+
+<script setup name="InvoiceAddDrawer" lang="ts">
+import { addStatementInvoice, updateStatementInvoice } from '@/api/bill/statementInvoice';
+import { StatementInvoiceForm } from '@/api/bill/statementInvoice/types';
+import { getListBycustomerName } from '@/api/customer/customerFile/customerInfo';
+import { CustomerInfoVO } from '@/api/customer/customerFile/customerInfo/types';
+import { StatementOrderVO } from '@/api/bill/statementOrder/types';
+import StatementOrderDrawer from './statementOrderDrawer.vue';
+import FileSelector from '@/components/FileSelector/index.vue';
+import AddInvoiceDialog from './addInvoiceDialog.vue';
+
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { invoice_type } = toRefs<any>(proxy?.useDict('invoice_type'));
+const initFormData: StatementInvoiceForm = {
+  id: undefined,
+  statementInvoiceNo: undefined,
+  customerId: undefined,
+  customerNo: undefined,
+  customerName: undefined,
+  invoiceAmount: undefined,
+  invoiceStatus: undefined,
+  invoiceTime: undefined,
+  rejectRemark: undefined,
+  remark: undefined,
+  detailList: [],
+  productList: [],
+  invoiceList: []
+};
+
+const formRef = ref<ElFormInstance>();
+const buttonLoading = ref(false);
+const form = ref<StatementInvoiceForm>({ ...initFormData });
+
+const rules = reactive({
+  customerId: [{ required: true, message: '请选择客户', trigger: 'change' }],
+  invoiceTime: [{ required: true, message: '请选择开票日期', trigger: 'change' }]
+} as any);
+
+const fileList = ref<any[]>([]);
+
+const productPage = reactive({
+  pageNum: 1,
+  pageSize: 10,
+  total: 0
+});
+
+const drawer = reactive<DialogOption>({
+  visible: false,
+  title: '新增发票'
+});
+
+const isEdit = ref(false);
+
+const customerLoading = ref(false);
+const customerOptions = ref<CustomerInfoVO[]>([]);
+const statementOrderDrawerRef = ref<any>();
+const fileSelectorVisible = ref(false);
+const addInvoiceDialogRef = ref<any>();
+const currentSelectedStatements = ref<StatementOrderVO[]>([]);
+const invoiceList = ref<any[]>([]); // 发票列表
+const editingInvoiceIndex = ref<number>(-1);
+
+/** 计算当前页的商品列表 */
+const pagedProductList = computed(() => {
+  const start = (productPage.pageNum - 1) * productPage.pageSize;
+  const end = start + productPage.pageSize;
+  return form.value.productList?.slice(start, end) || [];
+});
+
+/** 打开新增/编辑发票抽屉 */
+const open = (id?: string | number, data?: StatementInvoiceForm) => {
+  reset();
+
+  if (id && data) {
+    // 编辑模式
+    isEdit.value = true;
+    drawer.title = '编辑发票';
+    Object.assign(form.value, data);
+
+    // 将客户信息添加到下拉选项中,以便回显
+    if (data.customerId && data.customerName) {
+      customerOptions.value = [
+        {
+          id: data.customerId,
+          customerName: data.customerName,
+          customerNo: data.customerNo || ''
+        } as CustomerInfoVO
+      ];
+    }
+
+    // 解析附件地址并回显附件列表
+    if (data.annexAddress) {
+      const urls = data.annexAddress.split(',').filter((url) => url.trim());
+      fileList.value = urls.map((url, index) => {
+        const fileName = url.split('/').pop() || `附件${index + 1}`;
+        return {
+          name: fileName,
+          url: url.trim(),
+          id: undefined
+        };
+      });
+    }
+
+    // 设置商品列表分页总数
+    if (data.productList && data.productList.length > 0) {
+      productPage.total = data.productList.length;
+    }
+
+    // 回显发票列表
+    if (data.invoiceList && data.invoiceList.length > 0) {
+      invoiceList.value = data.invoiceList;
+    }
+  } else {
+    // 新增模式
+    isEdit.value = false;
+    drawer.title = '新增发票';
+  }
+
+  drawer.visible = true;
+};
+
+/** 表单重置 */
+const reset = () => {
+  form.value = { ...initFormData };
+  fileList.value = [];
+  invoiceList.value = [];
+  editingInvoiceIndex.value = -1;
+  productPage.pageNum = 1;
+  productPage.pageSize = 10;
+  productPage.total = 0;
+  customerOptions.value = [];
+  currentSelectedStatements.value = [];
+  formRef.value?.clearValidate();
+};
+
+/** 远程搜索客户 */
+const remoteSearchCustomer = async (query: string) => {
+  if (query) {
+    customerLoading.value = true;
+    try {
+      const res = await getListBycustomerName(query);
+      customerOptions.value = res.data || [];
+    } catch (error) {
+      console.error('搜索客户失败:', error);
+    } finally {
+      customerLoading.value = false;
+    }
+  } else {
+    customerOptions.value = [];
+  }
+};
+
+/** 客户变更 */
+const handleCustomerChange = (value: string | number) => {
+  const selectedCustomer = customerOptions.value.find((customer) => customer.id === value);
+  if (selectedCustomer) {
+    form.value.customerId = selectedCustomer.id;
+    form.value.customerNo = selectedCustomer.customerNo;
+    form.value.customerName = selectedCustomer.customerName;
+
+    // 清空之前选择的对账单和商品
+    form.value.detailList = [];
+    form.value.productList = [];
+    form.value.invoiceAmount = undefined;
+    productPage.total = 0;
+    currentSelectedStatements.value = [];
+  }
+};
+
+/** 选择对账单 */
+const handleSelectStatement = () => {
+  if (!form.value.customerId) {
+    proxy?.$modal.msgWarning('请先选择客户');
+    return;
+  }
+
+  // 使用nextTick确保组件已挂载
+  nextTick(() => {
+    if (statementOrderDrawerRef.value && typeof statementOrderDrawerRef.value.open === 'function') {
+      statementOrderDrawerRef.value.open(form.value.customerId, currentSelectedStatements.value);
+    } else {
+      console.error('对账单抽屉组件未正确加载');
+    }
+  });
+};
+
+/** 对账单选择成功回调 */
+const handleStatementSelected = (data: any) => {
+  const { statements, details, products } = data;
+
+  if (statements && statements.length > 0) {
+    let totalAmount = 0;
+
+    // 保存当前选中的对账单
+    currentSelectedStatements.value = statements;
+
+    // 清空现有数据
+    form.value.detailList = [];
+    form.value.productList = [];
+
+    // 填充发票明细
+    if (details && details.length > 0) {
+      form.value.detailList = details.map((detail: any) => ({
+        statementOrderId: detail.statementOrderId,
+        statementOrderNo: detail.statementOrderNo || '',
+        statementAmount: detail.statementAmount || 0,
+        orderId: detail.orderId || '',
+        orderNo: detail.orderNo || '',
+        orderAmount: detail.amount || 0,
+        signingDate: detail.signingDate || '',
+        orderTime: detail.orderTime || '',
+        userDept: detail.userDept || '',
+        userName: detail.userName || ''
+      }));
+
+      // 计算总金额
+      totalAmount = details.reduce((sum: number, detail: any) => sum + Number(detail.amount || 0), 0);
+    }
+
+    // 设置开票金额
+    form.value.invoiceAmount = totalAmount;
+
+    // 直接使用传递过来的产品列表
+    if (products && products.length > 0) {
+      form.value.productList = products;
+      productPage.total = products.length;
+    }
+  }
+};
+
+/** 打开文件选择器 */
+const handleOpenFileSelector = () => {
+  fileSelectorVisible.value = true;
+};
+
+/** 文件选择完成 */
+const handleFileSelected = (files: any[]) => {
+  if (files && files.length > 0) {
+    files.forEach((file) => {
+      fileList.value.push({
+        name: file.fileName || file.name,
+        url: file.fileUrl || file.url,
+        id: file.id
+      });
+    });
+    form.value.annexAddress = fileList.value.map((f) => f.url || f.name).join(',');
+  }
+  fileSelectorVisible.value = false;
+};
+
+/** 删除文件 */
+const handleRemoveFile = (index: number) => {
+  fileList.value.splice(index, 1);
+  form.value.annexAddress = fileList.value.map((f) => f.url || f.name).join(',');
+};
+
+/** 下载文件 */
+const handleDownloadFile = async (file: any) => {
+  if (!file.url) {
+    proxy?.$modal.msgWarning('文件地址不存在');
+    return;
+  }
+
+  try {
+    const response = await fetch(file.url);
+    const blob = await response.blob();
+    const blobUrl = window.URL.createObjectURL(blob);
+    const link = document.createElement('a');
+    link.href = blobUrl;
+    link.download = file.name || '附件';
+    document.body.appendChild(link);
+    link.click();
+    document.body.removeChild(link);
+    window.URL.revokeObjectURL(blobUrl);
+  } catch (error) {
+    console.error('下载失败:', error);
+    const link = document.createElement('a');
+    link.href = file.url;
+    link.download = file.name || '附件';
+    link.target = '_blank';
+    document.body.appendChild(link);
+    link.click();
+    document.body.removeChild(link);
+  }
+};
+
+/** 预览文件 */
+const handlePreviewFile = (file: any) => {
+  if (!file.url) {
+    proxy?.$modal.msgWarning('文件地址不存在');
+    return;
+  }
+  window.open(file.url, '_blank');
+};
+
+/** 产品分页大小改变 */
+const handleProductSizeChange = (val: number) => {
+  productPage.pageSize = val;
+};
+
+/** 产品分页页码改变 */
+const handleProductCurrentChange = (val: number) => {
+  productPage.pageNum = val;
+};
+
+/** 新增发票 */
+const handleAddInvoice = () => {
+  editingInvoiceIndex.value = -1;
+  addInvoiceDialogRef.value?.open({
+    invoiceCompanyName: form.value.customerName
+  });
+};
+
+/** 发票添加成功 */
+const handleInvoiceAdded = (invoiceData: any) => {
+  // 编辑:更新当前行;新增:追加
+  if (editingInvoiceIndex.value >= 0 && editingInvoiceIndex.value < invoiceList.value.length) {
+    const prev = invoiceList.value[editingInvoiceIndex.value] || {};
+    invoiceList.value.splice(editingInvoiceIndex.value, 1, {
+      ...prev,
+      ...invoiceData,
+      id: prev.id
+    });
+  } else {
+    invoiceList.value.push({
+      ...invoiceData,
+      id: invoiceData?.id ?? Date.now()
+    });
+  }
+  editingInvoiceIndex.value = -1;
+};
+
+/** 编辑发票 */
+const handleEditInvoice = (invoice: any, index: number) => {
+  editingInvoiceIndex.value = index;
+  addInvoiceDialogRef.value?.open({
+    ...invoice,
+    invoiceCompanyName: invoice?.invoiceCompanyName ?? invoice?.invoiceCompany ?? invoice?.companyName ?? invoice?.company ?? form.value.customerName
+  });
+};
+
+/** 删除发票 */
+const handleDeleteInvoice = (index: number) => {
+  proxy?.$modal
+    .confirm('确认删除该发票吗?')
+    .then(() => {
+      invoiceList.value.splice(index, 1);
+      proxy?.$modal.msgSuccess('删除成功');
+    })
+    .catch(() => {});
+};
+
+/** 提交表单 */
+const handleSubmit = async () => {
+  if (!formRef.value) return;
+
+  await formRef.value.validate(async (valid) => {
+    if (valid) {
+      buttonLoading.value = true;
+      try {
+        // 组装发票列表数据
+        form.value.invoiceList = invoiceList.value;
+
+        if (isEdit.value) {
+          await updateStatementInvoice(form.value);
+          proxy?.$modal.msgSuccess('修改成功');
+        } else {
+          await addStatementInvoice(form.value);
+          proxy?.$modal.msgSuccess('新增成功');
+        }
+        drawer.visible = false;
+        emit('success');
+      } catch (error) {
+        console.error(error);
+      } finally {
+        buttonLoading.value = false;
+      }
+    }
+  });
+};
+
+/** 关闭抽屉前的回调 */
+const handleDrawerClose = (done: () => void) => {
+  if (buttonLoading.value) {
+    return;
+  }
+  done();
+  reset();
+};
+
+const emit = defineEmits(['success']);
+
+defineExpose({
+  open
+});
+</script>
+
+<style scoped lang="scss">
+.drawer-header {
+  display: flex;
+  align-items: center;
+  gap: 10px;
+
+  .order-title {
+    font-size: 16px;
+    font-weight: 600;
+    color: #303133;
+  }
+}
+
+.drawer-content {
+  padding: 0 20px 20px;
+  height: calc(100% - 60px);
+  overflow-y: auto;
+}
+
+.empty-data {
+  text-align: center;
+  padding: 20px 0;
+}
+
+.drawer-footer {
+  display: flex;
+  justify-content: flex-end;
+  gap: 10px;
+}
+</style>

+ 252 - 0
src/views/bill/statementInvoice/addInvoiceDialog.vue

@@ -0,0 +1,252 @@
+<template>
+  <!-- 新增发票对话框 -->
+  <el-dialog v-model="dialog.visible" :title="dialog.title" width="800px" :before-close="handleClose">
+    <el-form ref="formRef" :model="form" :rules="rules" label-width="120px">
+      <!-- 发票信息 -->
+      <el-divider content-position="left">
+        <span style="color: #409eff; font-weight: 600">发票信息</span>
+      </el-divider>
+
+      <el-row :gutter="20">
+        <el-col :span="12">
+          <el-form-item label="发票类型" prop="invoiceType">
+            <el-select v-model="form.invoiceType" placeholder="请选择发票类型" clearable style="width: 100%">
+              <el-option v-for="dict in invoice_type" :key="dict.value" :label="dict.label" :value="dict.value" />
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="发票代码" prop="invoiceCode">
+            <el-input v-model="form.invoiceCode" placeholder="请填写发票代码" clearable />
+          </el-form-item>
+        </el-col>
+      </el-row>
+
+      <el-row :gutter="20">
+        <el-col :span="12">
+          <el-form-item label="开票公司名称" prop="invoiceCompanyName">
+            <el-input v-model="form.invoiceCompanyName" placeholder="请填写开票公司名称" clearable />
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="发票金额" prop="invoiceAmount">
+            <el-input-number v-model="form.invoiceAmount" :controls="false" clearable style="width: 100%"> </el-input-number>
+          </el-form-item>
+        </el-col>
+      </el-row>
+
+      <el-row :gutter="20">
+        <el-col :span="12">
+          <el-form-item label="开票日期" prop="invoiceDate">
+            <el-date-picker v-model="form.invoiceDate" type="date" placeholder="请选择开票日期" style="width: 100%" value-format="YYYY-MM-DD" />
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="24">
+          <el-form-item label="备注" prop="remark">
+            <el-input v-model="form.remark" type="textarea" :min="2" placeholder="请填写备注" clearable />
+          </el-form-item>
+        </el-col>
+      </el-row>
+
+      <el-row :gutter="20">
+        <el-col :span="24">
+          <el-form-item label="发票附件" prop="invoiceAnnex">
+            <el-upload
+              :action="uploadAction"
+              :on-success="handleUploadSuccess"
+              :before-upload="beforeUpload"
+              :on-remove="handleRemoveUploadFile"
+              :on-preview="handlePreviewUploadFile"
+              :file-list="fileList"
+              multiple
+            >
+              <el-button type="primary" icon="Upload">点击上传</el-button>
+              <template #tip>
+                <div class="el-upload__tip">支持jpg/png/xlsx等文件,单个文件不超过50MB</div>
+              </template>
+            </el-upload>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+
+    <template #footer>
+      <div class="dialog-footer">
+        <el-button @click="handleClose">取消</el-button>
+        <el-button type="primary" :loading="buttonLoading" @click="handleSubmit">提交</el-button>
+      </div>
+    </template>
+  </el-dialog>
+</template>
+
+<script setup name="AddInvoiceDialog" lang="ts">
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { invoice_type } = toRefs<any>(proxy?.useDict('invoice_type'));
+interface InvoiceForm {
+  invoiceType?: string;
+  invoiceCode?: string;
+  invoiceCompanyName?: string;
+  invoiceAmount?: number;
+  invoiceDate?: string;
+  remark?: string;
+  invoiceAnnex?: string;
+}
+
+const initFormData: InvoiceForm = {
+  invoiceType: undefined,
+  invoiceCode: undefined,
+  invoiceCompanyName: undefined,
+  invoiceAmount: undefined,
+  remark: undefined,
+  invoiceDate: undefined,
+  invoiceAnnex: undefined
+};
+
+const formRef = ref<ElFormInstance>();
+const buttonLoading = ref(false);
+const form = ref<InvoiceForm>({ ...initFormData });
+const fileList = ref<any[]>([]);
+const uploadAction = import.meta.env.VITE_APP_BASE_API + '/resource/oss/upload';
+
+const dialog = reactive<DialogOption>({
+  visible: false,
+  title: '发票信息'
+});
+
+const rules = reactive({
+  invoiceType: [{ required: true, message: '请选择发票类型', trigger: 'change' }],
+  invoiceCode: [{ required: true, message: '请填写发票代码', trigger: 'blur' }],
+  invoiceCompanyName: [{ required: true, message: '请填写开票公司名称', trigger: 'blur' }],
+  invoiceAmount: [
+    { required: true, message: '请填写发票金额', trigger: 'blur' },
+    {
+      pattern: /^(0|[1-9]\d*)(\.\d{1,2})?$/ as RegExp,
+      message: '请输入正确的金额格式,最多保留两位小数',
+      trigger: 'blur'
+    }
+  ]
+  // invoiceDate: [{ required: true, message: '请选择开票日期', trigger: 'change' }]
+} as any);
+
+/** 打开对话框 */
+const open = (data?: InvoiceForm) => {
+  reset();
+
+  if (data) {
+    // 编辑模式
+    Object.assign(form.value, data);
+
+    // 解析附件地址并回显附件列表
+    if (data.invoiceAnnex) {
+      const urls = data.invoiceAnnex.split(',').filter((url) => url.trim());
+      fileList.value = urls.map((url, index) => {
+        const fileName = url.split('/').pop() || `附件${index + 1}`;
+        return {
+          name: fileName,
+          url: url.trim(),
+          uid: Date.now() + index,
+          status: 'success'
+        };
+      });
+    }
+  }
+
+  dialog.visible = true;
+};
+
+/** 重置表单 */
+const reset = () => {
+  form.value = { ...initFormData };
+  fileList.value = [];
+  formRef.value?.clearValidate();
+};
+
+/** 上传前校验 */
+const beforeUpload = (file: any) => {
+  const isLt50M = file.size / 1024 / 1024 < 50;
+  if (!isLt50M) {
+    proxy?.$modal.msgWarning('上传文件大小不能超过 50MB!');
+  }
+  return isLt50M;
+};
+
+/** 上传成功回调 */
+function handleUploadSuccess(response: any, file: any, fileListParam: any[]) {
+  if (response.code === 200) {
+    // 更新 fileList
+    fileList.value = fileListParam;
+    // 收集所有已上传成功的文件URL
+    const urls = fileListParam
+      .filter((f: any) => f.response?.code === 200 || f.url)
+      .map((f: any) => f.response?.data?.url || f.url)
+      .filter(Boolean);
+    form.value.invoiceAnnex = urls.join(',');
+    proxy?.$modal.msgSuccess('文件上传成功');
+  } else {
+    proxy?.$modal.msgError(response.msg || '文件上传失败');
+  }
+}
+
+/** 删除文件 */
+const handleRemoveUploadFile = (uploadFile: any) => {
+  form.value.invoiceAnnex = fileList.value
+    .map((f) => f.url)
+    .filter(Boolean)
+    .join(',');
+};
+
+/** 预览文件 */
+const handlePreviewUploadFile = (uploadFile: any) => {
+  if (uploadFile.url) {
+    window.open(uploadFile.url, '_blank');
+  } else {
+    proxy?.$modal.msgWarning('文件地址不存在');
+  }
+};
+
+/** 提交表单 */
+const handleSubmit = async () => {
+  if (!formRef.value) return;
+
+  await formRef.value.validate(async (valid) => {
+    if (valid) {
+      buttonLoading.value = true;
+      try {
+        // 返回发票数据给父组件
+        emit('success', form.value);
+        dialog.visible = false;
+        proxy?.$modal.msgSuccess('添加成功');
+      } catch (error) {
+        console.error(error);
+      } finally {
+        buttonLoading.value = false;
+      }
+    }
+  });
+};
+
+/** 关闭对话框 */
+const handleClose = () => {
+  if (buttonLoading.value) {
+    return;
+  }
+  dialog.visible = false;
+  reset();
+};
+
+const emit = defineEmits(['success']);
+
+defineExpose({
+  open
+});
+</script>
+
+<style scoped lang="scss">
+.dialog-footer {
+  display: flex;
+  justify-content: flex-end;
+  gap: 10px;
+}
+</style>

+ 326 - 0
src/views/bill/statementInvoice/detailDrawer.vue

@@ -0,0 +1,326 @@
+<template>
+  <!-- 发票详情 -->
+  <el-drawer v-model="drawer.visible" size="75%" direction="rtl" :before-close="handleDrawerClose" :close-on-click-modal="true">
+    <template #header>
+      <div class="drawer-header">
+        <span class="order-title">发票详情</span>
+      </div>
+    </template>
+
+    <div class="drawer-content">
+      <el-form ref="formRef" :model="form" :rules="rules" label-width="120px">
+        <!-- 基本信息 -->
+        <el-divider content-position="left">
+          <span style="color: #409eff; font-weight: 600">基本信息</span>
+        </el-divider>
+
+        <el-row :gutter="20">
+          <el-col :span="8">
+            <el-form-item label="开票单号:" prop="statementInvoiceNo">
+              <el-input v-model="form.statementInvoiceNo" disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="开票状态:" prop="invoiceStatus">
+              <dict-tag :options="invoice_status" :value="form.invoiceStatus" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="客户名称:" prop="customerName">
+              <el-input v-model="form.customerName" disabled />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="8">
+            <el-form-item label="开票金额:" prop="invoiceAmount">
+              <el-input v-model="form.invoiceAmount" disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="开票日期:" prop="invoiceTime">
+              <el-date-picker
+                v-model="form.invoiceTime"
+                type="date"
+                placeholder="请选择开票日期"
+                style="width: 100%"
+                value-format="YYYY-MM-DD"
+                disabled
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <!-- 账单列表 -->
+        <el-divider content-position="left">
+          <span style="color: #409eff; font-weight: 600">账单列表</span>
+        </el-divider>
+
+        <el-table :data="form.detailList" border style="width: 100%; margin-bottom: 20px">
+          <el-table-column type="index" label="序号" width="60" align="center" />
+          <el-table-column prop="statementOrderNo" label="对账单编号" min-width="150" align="center" />
+          <el-table-column prop="statementAmount" label="对账金额" min-width="120" align="center" />
+          <el-table-column prop="orderNo" label="订单编号" min-width="150" align="center" />
+          <el-table-column prop="orderAmount" label="金额" min-width="120" align="center" />
+          <el-table-column prop="orderTime" label="下单日期" min-width="120" align="center" />
+          <el-table-column prop="userName" label="下单人" min-width="100" align="center" />
+          <el-table-column prop="userDept" label="部门" min-width="120" align="center" />
+        </el-table>
+
+        <!-- 商品清单 -->
+        <el-divider content-position="left">
+          <span style="color: #409eff; font-weight: 600">商品清单</span>
+        </el-divider>
+
+        <el-table :data="pagedProductList" border style="width: 100%; margin-bottom: 20px">
+          <el-table-column
+            type="index"
+            label="序号"
+            width="60"
+            align="center"
+            :index="(index) => (productPage.pageNum - 1) * productPage.pageSize + index + 1"
+          />
+          <el-table-column prop="orderNo" label="订单编号" min-width="120" align="center" />
+          <el-table-column prop="productNo" label="商品编号" min-width="120" align="center" />
+          <el-table-column prop="itemName" label="商品名称" min-width="180" align="center" />
+          <el-table-column prop="unitName" label="单位" align="center" />
+          <el-table-column prop="quantity" label="数量" align="center" />
+          <el-table-column prop="unitPrice" label="单价" align="center">
+            <template #default="scope">
+              {{ scope.row.unitPrice ? Number(scope.row.unitPrice).toFixed(2) : '0.00' }}
+            </template>
+          </el-table-column>
+          <el-table-column label="小计" align="center">
+            <template #default="scope">
+              {{ (Number(scope.row.quantity || 0) * Number(scope.row.unitPrice || 0)).toFixed(2) }}
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <!-- 分页 -->
+        <el-pagination
+          v-if="form.productList && form.productList.length > 0"
+          v-model:current-page="productPage.pageNum"
+          v-model:page-size="productPage.pageSize"
+          :page-sizes="[10, 20, 50, 100]"
+          layout="total, sizes, prev, pager, next, jumpers"
+          :total="productPage.total"
+          @size-change="handleProductSizeChange"
+          @current-change="handleProductCurrentChange"
+          style="margin-top: 15px"
+        />
+
+        <!-- 发票列表 -->
+        <el-divider content-position="left">
+          <span style="color: #409eff; font-weight: 600">发票列表</span>
+        </el-divider>
+
+        <el-table :data="form.invoiceList" border style="width: 100%; margin-bottom: 20px">
+          <el-table-column type="index" label="序号" width="80" align="center" />
+          <el-table-column prop="invoiceType" label="发票类型" min-width="120" align="center">
+            <template #default="scope">
+              <dict-tag :options="invoice_type" :value="scope.row.invoiceType" />
+            </template>
+          </el-table-column>
+          <el-table-column prop="invoiceDate" label="开票日期" min-width="120" align="center" />
+          <el-table-column prop="invoiceCode" label="发票代码" min-width="150" align="center" />
+          <el-table-column prop="invoiceAmount" label="发票金额" min-width="120" align="center">
+            <template #default="scope">
+              {{ Number(scope.row.invoiceAmount || 0).toFixed(2) }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="remark" label="备注" align="center" />
+          <el-table-column label="操作" width="160" align="center">
+            <template #default="scope">
+              <el-button type="primary" link @click="handleDownloadFile(scope.row)">查看附件</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-form>
+    </div>
+
+    <template #footer>
+      <div class="drawer-footer">
+        <el-button @click="handleDrawerClose(() => (drawer.visible = false))">取消</el-button>
+        <el-button type="primary" :loading="buttonLoading" @click="handleDrawerClose(() => (drawer.visible = false))">提交</el-button>
+      </div>
+    </template>
+  </el-drawer>
+</template>
+
+<script setup name="InvoiceDetailDrawer" lang="ts">
+import { StatementInvoiceForm } from '@/api/bill/statementInvoice/types';
+
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { invoice_type, invoice_status } = toRefs<any>(proxy?.useDict('invoice_type', 'invoice_status'));
+const initFormData: StatementInvoiceForm = {
+  id: undefined,
+  statementInvoiceNo: undefined,
+  customerId: undefined,
+  customerNo: undefined,
+  customerName: undefined,
+  invoiceAmount: undefined,
+  invoiceStatus: undefined,
+  invoiceTime: undefined,
+  rejectRemark: undefined,
+  remark: undefined,
+  detailList: [],
+  productList: []
+};
+
+const formRef = ref<ElFormInstance>();
+const buttonLoading = ref(false);
+const form = ref<StatementInvoiceForm>({ ...initFormData });
+
+const rules = reactive({
+  customerId: [{ required: true, message: '请选择客户', trigger: 'change' }],
+  invoiceTime: [{ required: true, message: '请选择开票日期', trigger: 'change' }]
+} as any);
+
+const fileList = ref<any[]>([]);
+
+const productPage = reactive({
+  pageNum: 1,
+  pageSize: 10,
+  total: 0
+});
+
+const drawer = reactive<DialogOption>({
+  visible: false,
+  title: '发票详情'
+});
+
+/** 计算当前页的商品列表 */
+const pagedProductList = computed(() => {
+  const start = (productPage.pageNum - 1) * productPage.pageSize;
+  const end = start + productPage.pageSize;
+  return form.value.productList?.slice(start, end) || [];
+});
+
+/** 打开发票详情抽屉 */
+const open = (id?: string | number, data?: StatementInvoiceForm) => {
+  reset();
+
+  if (id && data) {
+    // 查看模式
+    drawer.title = '发票详情';
+    Object.assign(form.value, data);
+
+    // 解析附件地址并回显附件列表
+    if (data.annexAddress) {
+      const urls = data.annexAddress.split(',').filter((url) => url.trim());
+      fileList.value = urls.map((url, index) => {
+        const fileName = url.split('/').pop() || `附件${index + 1}`;
+        return {
+          name: fileName,
+          url: url.trim(),
+          id: undefined
+        };
+      });
+    }
+
+    // 设置商品列表分页总数
+    if (data.productList && data.productList.length > 0) {
+      productPage.total = data.productList.length;
+    }
+  }
+
+  drawer.visible = true;
+};
+
+/** 表单重置 */
+const reset = () => {
+  form.value = { ...initFormData };
+  fileList.value = [];
+  productPage.pageNum = 1;
+  productPage.pageSize = 10;
+  productPage.total = 0;
+  formRef.value?.clearValidate();
+};
+
+/** 下载文件 */
+const handleDownloadFile = async (file: any) => {
+  if (!file.invoiceAnnex) {
+    proxy?.$modal.msgWarning('文件地址不存在');
+    return;
+  }
+
+  try {
+    const response = await fetch(file.invoiceAnnex);
+    const blob = await response.blob();
+    const blobUrl = window.URL.createObjectURL(blob);
+    const link = document.createElement('a');
+    link.href = blobUrl;
+    link.download = file.name || '附件';
+    document.body.appendChild(link);
+    link.click();
+    document.body.removeChild(link);
+    window.URL.revokeObjectURL(blobUrl);
+  } catch (error) {
+    console.error('下载失败:', error);
+    const link = document.createElement('a');
+    link.href = file.invoiceAnnex;
+    link.download = file.name || '附件';
+    link.target = '_blank';
+    document.body.appendChild(link);
+    link.click();
+    document.body.removeChild(link);
+  }
+};
+
+/** 产品分页大小改变 */
+const handleProductSizeChange = (val: number) => {
+  productPage.pageSize = val;
+};
+
+/** 产品分页页码改变 */
+const handleProductCurrentChange = (val: number) => {
+  productPage.pageNum = val;
+};
+
+/** 关闭抽屉前的回调 */
+const handleDrawerClose = (done: () => void) => {
+  if (buttonLoading.value) {
+    return;
+  }
+  done();
+  reset();
+};
+
+const emit = defineEmits(['success']);
+
+defineExpose({
+  open
+});
+</script>
+
+<style scoped lang="scss">
+.drawer-header {
+  display: flex;
+  align-items: center;
+  gap: 10px;
+
+  .order-title {
+    font-size: 16px;
+    font-weight: 600;
+    color: #303133;
+  }
+}
+
+.drawer-content {
+  padding: 0 20px 20px;
+  height: calc(100% - 60px);
+  overflow-y: auto;
+}
+
+.empty-data {
+  text-align: center;
+  padding: 20px 0;
+}
+
+.drawer-footer {
+  display: flex;
+  justify-content: flex-end;
+  gap: 10px;
+}
+</style>

+ 362 - 0
src/views/bill/statementInvoice/index.vue

@@ -0,0 +1,362 @@
+<template>
+  <div class="p-2">
+    <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
+      <div v-show="showSearch" class="mb-[10px]">
+        <el-card shadow="hover">
+          <el-form ref="queryFormRef" :model="queryParams" :inline="true">
+            <el-form-item label="开票编号" prop="statementInvoiceNo">
+              <el-input v-model="queryParams.statementInvoiceNo" placeholder="请输入发票编号" clearable @keyup.enter="handleQuery" />
+            </el-form-item>
+            <el-form-item label="开票日期" prop="statementDate">
+              <el-date-picker
+                v-model="dateRange"
+                type="daterange"
+                range-separator="至"
+                start-placeholder="开始时间"
+                end-placeholder="结束时间"
+                value-format="YYYY-MM-DD"
+              />
+            </el-form-item>
+            <el-form-item label="客户名称" prop="customerId">
+              <el-select
+                v-model="queryParams.customerId"
+                filterable
+                remote
+                reserve-keyword
+                placeholder="请输入客户名称"
+                :remote-method="remoteSearchCustomer"
+                :loading="customerLoading"
+                clearable
+                style="width: 100%"
+                @change="handleCustomerChange"
+              >
+                <el-option v-for="item in customerOptions" :key="item.id" :label="item.customerName" :value="item.id" />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="订单编号" prop="orderNo">
+              <el-input v-model="queryParams.orderNo" placeholder="请输入订单编号" clearable @keyup.enter="handleQuery" />
+            </el-form-item>
+            <el-form-item label="开票状态" prop="invoiceStatus">
+              <el-select v-model="queryParams.invoiceStatus" placeholder="请选择开票状态" clearable>
+                <el-option v-for="dict in invoice_status" :key="dict.value" :label="dict.label" :value="dict.value" />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="对账单号" prop="statementOrderNo">
+              <el-input v-model="queryParams.statementOrderNo" 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>
+            </el-form-item>
+          </el-form>
+        </el-card>
+      </div>
+    </transition>
+
+    <el-card shadow="never">
+      <template #header>
+        <el-row :gutter="10" class="mb8">
+          <el-col :span="22"> 销售发票信息列表 </el-col>
+          <el-col :span="1.5">
+            <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['bill:statementInvoice:add']">新增</el-button>
+          </el-col>
+        </el-row>
+      </template>
+
+      <el-table v-loading="loading" border :data="statementInvoiceList" @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column label="开票编号" align="center" prop="statementInvoiceNo" />
+        <el-table-column label="开票时间" align="center" prop="invoiceTime">
+          <template #default="scope">
+            <span>{{ parseTime(scope.row.invoiceTime, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="客户名称" align="center" prop="customerName" />
+        <el-table-column label="开票金额" align="center" prop="invoiceAmount">
+          <template #default="scope">
+            <span>{{ Number(scope.row.invoiceAmount).toFixed(2) }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="开票状态" align="center" prop="invoiceStatus">
+          <template #default="scope">
+            <dict-tag :options="invoice_status" :value="scope.row.invoiceStatus" />
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
+          <template #default="scope">
+            <template v-for="btn in getAvailableButtons(scope.row.invoiceStatus)" :key="btn.action">
+              <el-button link type="primary" @click="btn.handler(scope.row)" v-hasPermi="[btn.permission]">
+                {{ btn.label }}
+              </el-button>
+            </template>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
+    </el-card>
+    <!-- 新增开票的抽屉 -->
+    <add-drawer ref="addDrawerRef" @success="getList" />
+    <!-- 查看开票信息的抽屉 -->
+    <detail-drawer ref="detailDrawerRef" @success="getList" />
+  </div>
+</template>
+
+<script setup name="StatementInvoice" lang="ts">
+import { listStatementInvoice, getStatementInvoice, changeStatus } from '@/api/bill/statementInvoice';
+import { StatementInvoiceVO, StatementInvoiceQuery, StatementInvoiceForm } from '@/api/bill/statementInvoice/types';
+import { getListBycustomerName } from '@/api/customer/customerFile/customerInfo';
+import { CustomerInfoVO } from '@/api/customer/customerFile/customerInfo/types';
+import AddDrawer from './addDrawer.vue';
+import DetailDrawer from './detailDrawer.vue';
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { invoice_status } = toRefs<any>(proxy?.useDict('invoice_status'));
+const addDrawerRef = ref<InstanceType<typeof AddDrawer>>();
+const detailDrawerRef = ref<InstanceType<typeof DetailDrawer>>();
+const statementInvoiceList = ref<StatementInvoiceVO[]>([]);
+const buttonLoading = ref(false);
+const loading = ref(true);
+const showSearch = ref(true);
+const ids = ref<Array<string | number>>([]);
+const single = ref(true);
+const multiple = ref(true);
+const total = ref(0);
+const dateRange = ref<[DateModelType, DateModelType]>(['', '']);
+const queryFormRef = ref<ElFormInstance>();
+const statementInvoiceFormRef = ref<ElFormInstance>();
+const customerLoading = ref(false);
+const customerOptions = ref<CustomerInfoVO[]>([]);
+const dialog = reactive<DialogOption>({
+  visible: false,
+  title: ''
+});
+
+// 发票单状态枚举
+enum InvoiceStatus {
+  DRAFT = 0, // 待确认
+  PENDING = 1, // 待对账
+  CONFIRMED = 2, // 已对账
+  OBSOLETE = 3 // 已作废
+}
+
+// 按钮配置类型
+interface ActionButton {
+  action: string;
+  label: string;
+  handler: (row: StatementInvoiceVO) => void;
+  permission: string;
+}
+
+const initFormData: StatementInvoiceForm = {
+  id: undefined,
+  statementInvoiceNo: undefined,
+  customerId: undefined,
+  customerNo: undefined,
+  customerName: undefined,
+  invoiceAmount: undefined,
+  invoiceStatus: undefined,
+  invoiceTime: undefined,
+  rejectRemark: undefined,
+  remark: undefined
+};
+const data = reactive<PageData<StatementInvoiceForm, StatementInvoiceQuery>>({
+  form: { ...initFormData },
+  queryParams: {
+    pageNum: 1,
+    pageSize: 10,
+    statementInvoiceNo: undefined,
+    customerId: undefined,
+    customerNo: undefined,
+    customerName: undefined,
+    invoiceAmount: undefined,
+    invoiceStatus: undefined,
+    invoiceTime: undefined,
+    rejectRemark: undefined,
+    platformCode: undefined,
+    params: {}
+  },
+  rules: {}
+});
+
+const { queryParams, form, rules } = toRefs(data);
+
+/** 查询销售发票主列表 */
+const getList = async () => {
+  loading.value = true;
+  const res = await listStatementInvoice(proxy?.addDateRange(queryParams.value, dateRange.value));
+  statementInvoiceList.value = res.rows;
+  total.value = res.total;
+  loading.value = false;
+};
+
+/** 远程搜索客户 */
+const remoteSearchCustomer = async (query: string) => {
+  if (query) {
+    customerLoading.value = true;
+    try {
+      const res = await getListBycustomerName(query);
+      customerOptions.value = res.data;
+    } catch (error) {
+      console.error(error);
+    } finally {
+      customerLoading.value = false;
+    }
+  } else {
+    customerOptions.value = [];
+  }
+};
+
+/** 客户变更 */
+const handleCustomerChange = async (customerId: string | number) => {
+  if (customerId) {
+    const customer = customerOptions.value.find((item) => item.id === customerId);
+    if (customer) {
+      form.value.customerName = customer.customerName;
+      form.value.customerNo = customer.customerNo;
+    }
+  } else {
+    form.value.customerName = undefined;
+    form.value.customerNo = undefined;
+  }
+};
+
+/** 表单重置 */
+const reset = () => {
+  form.value = { ...initFormData };
+  statementInvoiceFormRef.value?.resetFields();
+};
+
+/** 搜索按钮操作 */
+const handleQuery = () => {
+  queryParams.value.pageNum = 1;
+  getList();
+};
+
+/** 重置按钮操作 */
+const resetQuery = () => {
+  dateRange.value = ['', ''];
+  queryFormRef.value?.resetFields();
+  handleQuery();
+};
+
+/** 多选框选中数据 */
+const handleSelectionChange = (selection: StatementInvoiceVO[]) => {
+  ids.value = selection.map((item) => item.id);
+  single.value = selection.length != 1;
+  multiple.value = !selection.length;
+};
+
+/** 新增按钮操作 */
+const handleAdd = () => {
+  reset();
+  // 打开抽屉
+  addDrawerRef.value?.open();
+};
+
+/** 修改按钮操作 */
+const handleUpdate = async (row?: StatementInvoiceVO) => {
+  const _id = row?.id || ids.value[0];
+  const res = await getStatementInvoice(_id);
+  // 打开抽屉,传递id和数据
+  addDrawerRef.value?.open(_id, res.data);
+};
+
+/** 查看按钮操作 */
+const handleDetail = async (row?: StatementInvoiceVO) => {
+  const _id = row?.id || ids.value[0];
+  const res = await getStatementInvoice(_id);
+  // 打开抽屉,传递id和数据
+  detailDrawerRef.value?.open(_id, res.data);
+};
+
+/** 发送按钮操作 */
+const handleSend = async (row?: StatementInvoiceVO) => {
+  const _no = row?.statementInvoiceNo;
+  const _ids = row?.id || ids.value;
+  const oldValue = row.invoiceStatus; // 保存旧值
+  await proxy?.$modal.confirm('是否发送当前发票编号【' + _no + '】吗?').finally(() => (loading.value = false));
+  //todo 发送
+  try {
+    await changeStatus(row.id, '1'); // 传新值 1 待开票
+  } catch (e) {
+    // 恢复旧值
+    row.invoiceStatus = oldValue;
+  }
+  proxy?.$modal.msgSuccess('发送成功');
+  await getList();
+};
+
+/** 撤回按钮操作 */
+const handleWithdraw = async (row?: StatementInvoiceVO) => {
+  const _no = row?.statementInvoiceNo;
+  const _ids = row?.id;
+  const oldValue = row.invoiceStatus; // 保存旧值
+  await proxy?.$modal.confirm('是否撤回当前发票编号【' + _no + '】吗?').finally(() => (loading.value = false));
+  //todo 撤回
+  try {
+    await changeStatus(_ids, '0'); // 传新值 0 待确认
+  } catch (e) {
+    // 恢复旧值
+    row.invoiceStatus = oldValue;
+  }
+  proxy?.$modal.msgSuccess('撤回成功');
+  await getList();
+};
+
+/** 作废按钮操作 */
+const handleObsolete = async (row?: StatementInvoiceVO) => {
+  const _no = row?.statementInvoiceNo;
+  const oldValue = row.invoiceStatus; // 保存旧值
+  await proxy?.$modal.confirm('是否作废当前发票编号【' + _no + '】吗?').finally(() => (loading.value = false));
+  await changeStatus(row.id, '3'); // 传新值 3 - 作废
+  proxy?.$modal.msgSuccess('作废成功');
+  await getList();
+};
+
+// 按钮配置映射:状态 -> 可用按钮列表
+const buttonConfigMap: Record<number, ActionButton[]> = {
+  [InvoiceStatus.DRAFT]: [
+    { action: 'detail', label: '查看', handler: handleDetail, permission: 'bill:statementInvoice:edit' },
+    { action: 'edit', label: '编辑', handler: handleUpdate, permission: 'bill:statementInvoice:edit' },
+    { action: 'send', label: '发送开票信息', handler: handleSend, permission: 'bill:statementInvoice:edit' },
+    { action: 'withdraw', label: '撤回', handler: handleWithdraw, permission: 'bill:statementInvoice:edit' },
+    { action: 'obsolete', label: '作废', handler: handleObsolete, permission: 'bill:statementInvoice:remove' }
+  ],
+  [InvoiceStatus.PENDING]: [
+    { action: 'detail', label: '查看', handler: handleDetail, permission: 'bill:statementInvoice:edit' },
+    { action: 'edit', label: '编辑', handler: handleUpdate, permission: 'bill:statementInvoice:edit' },
+    { action: 'withdraw', label: '撤回', handler: handleWithdraw, permission: 'bill:statementInvoice:edit' },
+    { action: 'obsolete', label: '作废', handler: handleObsolete, permission: 'bill:statementInvoice:remove' }
+  ],
+  [InvoiceStatus.CONFIRMED]: [
+    { action: 'detail', label: '查看', handler: handleDetail, permission: 'bill:statementInvoice:edit' },
+    { action: 'obsolete', label: '作废', handler: handleObsolete, permission: 'bill:statementInvoice:remove' }
+  ],
+  [InvoiceStatus.OBSOLETE]: [{ action: 'detail', label: '查看', handler: handleDetail, permission: 'bill:statementInvoice:edit' }]
+};
+
+/**
+ * 根据对发票状态获取可用按钮列表
+ * @param status 发票单状态
+ * @returns 可用按钮配置数组
+ */
+const getAvailableButtons = (status: number): ActionButton[] => {
+  return buttonConfigMap[status] || [{ action: 'detail', label: '查看', handler: handleDetail, permission: 'bill:statementInvoice:edit' }];
+};
+
+/** 导出按钮操作 */
+const handleExport = () => {
+  proxy?.download(
+    'bill/statementInvoice/export',
+    {
+      ...queryParams.value
+    },
+    `statementInvoice_${new Date().getTime()}.xlsx`
+  );
+};
+
+onMounted(() => {
+  getList();
+});
+</script>

+ 267 - 0
src/views/bill/statementInvoice/statementOrderDrawer.vue

@@ -0,0 +1,267 @@
+<template>
+  <!-- 对账单选择抽屉 -->
+  <el-drawer v-model="drawerVisible" size="70%" direction="rtl" :close-on-click-modal="true" :close-on-press-escape="true" destroy-on-close>
+    <template #header>
+      <div class="drawer-header">
+        <span class="order-title">对账单信息</span>
+      </div>
+    </template>
+
+    <div class="drawer-content">
+      <!-- 对账单明细列表 -->
+      <el-table ref="tableRef" :data="tableData" border @selection-change="handleSelectionChange" style="width: 100%" v-loading="loading">
+        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column prop="statementOrderNo" label="对账单号" min-width="140" align="center" />
+        <el-table-column prop="statementAmount" label="对账金额" align="center">
+          <template #default="scope">
+            {{ Number(scope.row.statementAmount || 0).toFixed(2) }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="orderNo" label="订单编号" min-width="140" align="center" />
+        <el-table-column prop="amount" label="金额" min-width="100" align="center">
+          <template #default="scope">
+            {{ Number(scope.row.amount || 0).toFixed(2) }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="orderTime" label="下单日期" min-width="110" align="center" />
+        <el-table-column prop="userName" label="下单人" min-width="100" align="center" />
+        <el-table-column prop="userDept" label="部门" min-width="120" align="center" />
+      </el-table>
+
+      <!-- 分页 -->
+      <el-pagination
+        v-model:current-page="queryParams.pageNum"
+        v-model:page-size="queryParams.pageSize"
+        :page-sizes="[10, 20, 50, 100]"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        style="margin-top: 20px"
+      />
+    </div>
+
+    <template #footer>
+      <div class="drawer-footer">
+        <el-button @click="handleCancel">取消</el-button>
+        <el-button type="primary" @click="handleConfirm">确定</el-button>
+      </div>
+    </template>
+  </el-drawer>
+</template>
+
+<script setup name="StatementOrderDrawer" lang="ts">
+import { getCustomerOrderDetails, getStatementProductList } from '@/api/bill/statementOrder';
+
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+
+// 抽屉显示状态
+const drawerVisible = ref(false);
+const loading = ref(false);
+const tableRef = ref<any>();
+const tableData = ref<any[]>([]);
+const selectedStatements = ref<any[]>([]);
+const total = ref(0);
+const customerId = ref<string | number>();
+
+const queryParams = ref({
+  pageNum: 1,
+  pageSize: 10
+});
+
+const mergedProductList = ref<any[]>([]);
+
+/** 打开抽屉 */
+const open = (customerIdParam: string | number, preSelectedStatements?: any[]) => {
+  customerId.value = customerIdParam;
+  selectedStatements.value = preSelectedStatements || [];
+  drawerVisible.value = true;
+
+  // 查询数据
+  loadData();
+};
+
+/** 加载数据 */
+const loadData = async () => {
+  if (!customerId.value) {
+    console.error('customerId为空');
+    return;
+  }
+
+  loading.value = true;
+  try {
+    const res = await getCustomerOrderDetails(customerId.value, {
+      pageNum: queryParams.value.pageNum,
+      pageSize: queryParams.value.pageSize
+    });
+
+    // 解析数据 - 支持多种返回格式
+    let rows: any[] = [];
+    let totalCount = 0;
+
+    if (res.rows) {
+      rows = res.rows;
+      totalCount = res.total || 0;
+    } else if (res.data && res.data.rows) {
+      rows = res.data.rows;
+      totalCount = res.data.total || 0;
+    } else if (res.data && Array.isArray(res.data)) {
+      rows = res.data;
+      totalCount = res.data.length;
+    } else if (Array.isArray(res)) {
+      rows = res;
+      totalCount = res.length;
+    }
+
+    tableData.value = rows;
+    total.value = totalCount;
+  } catch (error) {
+    console.error('加载数据失败:', error);
+    tableData.value = [];
+    total.value = 0;
+  } finally {
+    loading.value = false;
+  }
+};
+
+/** 表格选择变化 */
+const handleSelectionChange = async (selection: any[]) => {
+  selectedStatements.value = selection;
+  // 合并选中订单的产品列表
+  await mergeProductList();
+};
+
+/** 合并选中订单的产品列表 */
+const mergeProductList = async () => {
+  if (selectedStatements.value.length === 0) {
+    mergedProductList.value = [];
+    return;
+  }
+
+  try {
+    const items = selectedStatements.value
+      .map((order) => ({
+        statementOrderId: order.statementOrderId,
+        orderId: order.orderId
+      }))
+      .filter((item) => item.statementOrderId != null && item.orderId != null);
+
+    if (items.length === 0) {
+      mergedProductList.value = [];
+      return;
+    }
+
+    const res = await getStatementProductList(items);
+    const productList = res.rows || [];
+
+    // 构建产品列表
+    const newProductList: any[] = [];
+    productList.forEach((item: any) => {
+      const product: any = {
+        id: undefined,
+        statementOrderId: undefined,
+        orderNo: item.orderNo || '',
+        productNo: item.productNo || item.skuNo || item.productCode || '',
+        itemName: item.productName || item.skuName || item.itemName || item.productFullName || '',
+        specifications: item.specifications || item.spec || item.model || item.specModel || '',
+        quantity: item.quantity || item.num || item.orderQuantity,
+        unitPrice: item.price || item.unitPrice || item.salePrice || item.orderPrice,
+        productUnit: item.productUnit || item.unitName || '',
+        unitName: item.productUnit || item.unitName || '',
+        type: item.productType || item.type || '',
+        orderId: item.orderId,
+        categoryId: item.categoryId,
+        categoryNo: item.categoryNo || '',
+        productId: item.productId || item.id,
+        unitId: item.productUnitId || item.unitId
+      };
+      newProductList.push(product);
+    });
+
+    // 更新产品列表
+    mergedProductList.value = newProductList;
+  } catch (error) {
+    console.error('获取订单产品列表失败:', error);
+    mergedProductList.value = [];
+  }
+};
+
+/** 确定选择 */
+const handleConfirm = async () => {
+  if (selectedStatements.value.length === 0) {
+    proxy?.$modal.msgWarning('请至少选择一条订单明细');
+    return;
+  }
+
+  // 传递订单列表、明细列表和产品列表
+  emit('success', {
+    statements: selectedStatements.value,
+    details: selectedStatements.value,
+    products: mergedProductList.value
+  });
+  drawerVisible.value = false;
+};
+
+/** 分页大小改变 */
+const handleSizeChange = (val: number) => {
+  queryParams.value.pageSize = val;
+  queryParams.value.pageNum = 1;
+  loadData();
+};
+
+/** 分页页码改变 */
+const handleCurrentChange = (val: number) => {
+  queryParams.value.pageNum = val;
+  loadData();
+};
+
+/** 取消 */
+const handleCancel = () => {
+  drawerVisible.value = false;
+};
+
+/** 重置数据 */
+const resetData = () => {
+  tableData.value = [];
+  selectedStatements.value = [];
+  mergedProductList.value = [];
+  total.value = 0;
+  customerId.value = undefined;
+  queryParams.value = {
+    pageNum: 1,
+    pageSize: 10
+  };
+};
+
+const emit = defineEmits(['success']);
+
+defineExpose({
+  open
+});
+</script>
+
+<style scoped lang="scss">
+.drawer-header {
+  display: flex;
+  align-items: center;
+  gap: 10px;
+
+  .order-title {
+    font-size: 16px;
+    font-weight: 600;
+    color: #303133;
+  }
+}
+
+.drawer-content {
+  padding: 0 20px 20px;
+  height: calc(100% - 60px);
+  overflow-y: auto;
+}
+
+.drawer-footer {
+  display: flex;
+  justify-content: flex-end;
+  gap: 10px;
+}
+</style>

+ 785 - 0
src/views/bill/statementOrder/addDrawer.vue

@@ -0,0 +1,785 @@
+<template>
+  <!-- 新增对账详情抽屉 -->
+  <el-drawer v-model="drawer.visible" size="75%" direction="rtl" :before-close="handleDrawerClose" :close-on-click-modal="true">
+    <template #header>
+      <div class="drawer-header">
+        <span class="order-title">新增对账</span>
+      </div>
+    </template>
+
+    <div class="drawer-content">
+      <el-form ref="formRef" :model="form" :rules="rules" label-width="120px">
+        <!-- 基本信息 -->
+        <el-divider content-position="left">
+          <span style="color: #409eff; font-weight: 600">基本信息</span>
+        </el-divider>
+
+        <el-row :gutter="20">
+          <el-col :span="8" v-if="isEdit">
+            <el-form-item label="对账单号" prop="statementOrderNo">
+              <el-input v-model="form.statementOrderNo" disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8" v-if="isEdit">
+            <el-form-item label="对账状态" prop="statementStatus">
+              <el-input v-model="form.statementStatus" disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="客户名称" prop="customerId">
+              <el-select
+                v-model="form.customerId"
+                filterable
+                remote
+                reserve-keyword
+                placeholder="请输入客户名称"
+                :remote-method="remoteSearchCustomer"
+                :loading="customerLoading"
+                clearable
+                style="width: 100%"
+                @change="handleCustomerChange"
+              >
+                <el-option v-for="item in customerOptions" :key="item.id" :label="item.customerName" :value="item.id" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="8">
+            <el-form-item label="对账单金额" prop="amount">
+              <el-input v-model="form.amount" disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="对账人" prop="statementSelfId">
+              <el-select
+                v-model="form.statementSelfId"
+                placeholder="请选择对账人"
+                clearable
+                filterable
+                style="width: 100%"
+                @change="handleStaffChange"
+              >
+                <el-option v-for="staff in staffOptions" :key="staff.staffId" :label="staff.staffName" :value="staff.staffId" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="对账人联系方式" prop="statementSelfPhone">
+              <el-input v-model="form.statementSelfPhone" placeholder="请填写对账人联系方式" clearable />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="8">
+            <el-form-item label="对账日期" prop="statementDate">
+              <el-date-picker v-model="form.statementDate" type="date" placeholder="请选择对账日期" style="width: 100%" value-format="YYYY-MM-DD" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="支付状态" prop="isPaymentStatus">
+              <el-select v-model="form.isPaymentStatus" placeholder="请选择支付状态" clearable style="width: 100%">
+                <el-option v-for="dict in payment_status" :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="isInvoiceStatus">
+              <el-select v-model="form.isInvoiceStatus" placeholder="请选择发票状态" clearable style="width: 100%">
+                <el-option v-for="dict in invoice_issuance_status" :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="24">
+            <el-form-item label="备注" prop="remark">
+              <el-input v-model="form.remark" type="textarea" :rows="3" placeholder="请输入备注" maxlength="500" show-word-limit />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <!-- 对账明细 -->
+        <el-divider content-position="left">
+          <span style="color: #409eff; font-weight: 600">对账明细</span>
+        </el-divider>
+
+        <div class="table-actions" style="margin-bottom: 15px">
+          <el-button type="primary" icon="Plus" @click="handleAddDetail">选择订单</el-button>
+        </div>
+
+        <el-table :data="form.detailList" border style="width: 100%; margin-bottom: 20px">
+          <el-table-column type="index" label="序号" width="60" align="center" />
+          <el-table-column prop="orderNo" label="订单编号" min-width="150" align="center" />
+          <el-table-column prop="deliverCode" label="发货单编号" min-width="150" align="center" />
+          <el-table-column prop="amount" label="金额" min-width="120" align="center" />
+          <el-table-column prop="orderTime" label="下单日期" min-width="120" align="center" />
+          <el-table-column prop="userName" label="下单人" min-width="100" align="center" />
+          <el-table-column prop="userDept" label="部门" min-width="120" align="center" />
+        </el-table>
+        <!-- 
+        <div v-if="form.detailList.length === 0" class="empty-data">
+          <el-empty description="暂无数据" :image-size="100" />
+        </div> -->
+
+        <!-- 商品清单 -->
+        <el-divider content-position="left">
+          <span style="color: #409eff; font-weight: 600">商品清单</span>
+        </el-divider>
+
+        <el-table :data="pagedProductList" border style="width: 100%; margin-bottom: 20px">
+          <el-table-column
+            type="index"
+            label="序号"
+            width="60"
+            align="center"
+            :index="(index) => (productPage.pageNum - 1) * productPage.pageSize + index + 1"
+          />
+          <el-table-column prop="orderNo" label="订单编号" min-width="120" align="center" />
+          <el-table-column prop="productNo" label="商品编号" min-width="120" align="center" />
+          <el-table-column prop="itemName" label="商品名称" min-width="180" align="center" />
+          <el-table-column prop="unitName" label="单位" width="80" align="center" />
+          <el-table-column prop="quantity" label="数量" width="100" align="center" />
+          <el-table-column prop="unitPrice" label="单价" width="100" align="center">
+            <template #default="scope">
+              {{ scope.row.unitPrice ? Number(scope.row.unitPrice).toFixed(2) : '0.00' }}
+            </template>
+          </el-table-column>
+          <el-table-column label="小计" width="120" align="center">
+            <template #default="scope">
+              {{ (Number(scope.row.quantity || 0) * Number(scope.row.unitPrice || 0)).toFixed(2) }}
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <!-- 分页 -->
+        <el-pagination
+          v-if="form.productList.length > 0"
+          v-model:current-page="productPage.pageNum"
+          v-model:page-size="productPage.pageSize"
+          :page-sizes="[10, 20, 50, 100]"
+          layout="total, sizes, prev, pager, next, jumpers"
+          :total="productPage.total"
+          @size-change="handleProductSizeChange"
+          @current-change="handleProductCurrentChange"
+          style="margin-top: 15px"
+        />
+
+        <!-- 对账附件 -->
+        <el-divider content-position="left">
+          <span style="color: #409eff; font-weight: 600">对账附件</span>
+        </el-divider>
+
+        <el-upload
+          :action="uploadAction"
+          :on-success="handleUploadSuccess"
+          :before-upload="beforeUpload"
+          :show-file-list="false"
+          multiple
+          style="margin-bottom: 10px"
+        >
+          <el-button type="primary" icon="Upload">点击上传</el-button>
+        </el-upload>
+
+        <el-table :data="fileList" border style="width: 100%; margin-bottom: 20px">
+          <el-table-column type="index" label="序号" width="80" align="center" />
+          <el-table-column prop="name" label="文件名称" min-width="200" align="center" />
+          <el-table-column prop="url" label="文件地址" min-width="250" align="center">
+            <template #default="scope">
+              {{ scope.row.url || '暂无地址' }}
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" width="250" align="center">
+            <template #default="scope">
+              <el-button type="primary" link @click="handleDownloadFile(scope.row)">下载</el-button>
+              <el-button type="primary" link @click="handlePreviewFile(scope.row)">预览</el-button>
+              <el-button type="danger" link @click="handleRemoveFile(scope.$index)">删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <!-- 
+        <div v-if="fileList.length === 0" class="empty-data">
+          <el-empty description="暂无附件" :image-size="100" />
+        </div> -->
+      </el-form>
+    </div>
+
+    <template #footer>
+      <div class="drawer-footer">
+        <el-button @click="handleDrawerClose(() => (drawer.visible = false))">取消</el-button>
+        <el-button type="primary" :loading="buttonLoading" @click="handleSubmit">确定</el-button>
+      </div>
+    </template>
+  </el-drawer>
+
+  <!-- 客户订单抽屉 -->
+  <OrderMainDrawer ref="orderMainDrawerRef" @success="handleOrderSelected" />
+</template>
+
+<script setup name="AddDrawer" lang="ts">
+import { addStatementOrder, updateStatementOrder } from '@/api/bill/statementOrder';
+import { StatementOrderForm } from '@/api/bill/statementOrder/types';
+import { StatementDetailForm } from '@/api/bill/statementDetail/types';
+import { getListBycustomerName } from '@/api/customer/customerFile/customerInfo';
+import { CustomerInfoVO } from '@/api/customer/customerFile/customerInfo/types';
+import { listOrderMain, getOrderMain } from '@/api/order/orderMain';
+import { OrderMainVO, OrderMainQuery, OrderMainForm } from '@/api/order/orderMain/types';
+import { OrderDeliverVO } from '@/api/order/orderDeliver/types';
+import { listComStaff } from '@/api/company/comStaff';
+import { ComStaffVO, ComStaffQuery } from '@/api/company/comStaff/types';
+import OrderMainDrawer from './orderMainDrawer.vue';
+import { getCustomerDeliverOrders } from '@/api/order/orderDeliver';
+
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { statement_status, invoice_issuance_status, payment_status } = toRefs<any>(
+  proxy?.useDict('statement_status', 'statement_order_type', 'invoice_issuance_status', 'payment_status')
+);
+
+const initFormData: StatementOrderForm = {
+  id: undefined,
+  statementOrderNo: undefined,
+  customerId: undefined,
+  customerNo: undefined,
+  customerName: undefined,
+  amount: undefined,
+  statementSelfId: undefined,
+  statementSelf: undefined,
+  statementSelfPhone: undefined,
+  statementStatus: undefined,
+  isPaymentStatus: '1',
+  isInvoiceStatus: '0',
+  statementDate: undefined,
+  annexAddress: undefined,
+  rejectRemark: undefined,
+  remark: undefined,
+  detailList: [],
+  productList: []
+};
+
+const emit = defineEmits(['success']);
+
+const formRef = ref<any>();
+const buttonLoading = ref(false);
+
+const form = ref<
+  StatementOrderForm & {
+    actualAmount?: string;
+    accountingVerification?: string;
+    skuProductName?: string;
+    skuProductModel?: string;
+    attachmentRemark?: string;
+  }
+>({ ...initFormData });
+
+const rules = reactive({
+  customerName: [{ required: true, message: '请输入客户名称', trigger: 'blur' }],
+  statementSelfId: [{ required: true, message: '请选择对账人', trigger: 'blur' }],
+  statementSelfPhone: [
+    { required: true, message: '请输入对账人手机号', trigger: 'blur' },
+    { pattern: /^1[3-9]\d{9}$/ as RegExp, message: '请输入正确的手机号格式', trigger: 'blur' }
+  ]
+} as any);
+
+const fileList = ref<any[]>([]);
+
+const productPage = reactive({
+  pageNum: 1,
+  pageSize: 10,
+  total: 0
+});
+
+const drawer = reactive<DialogOption>({
+  visible: false,
+  title: '新增对账'
+});
+
+const isEdit = ref(false); // 是否为编辑模式
+
+const customerLoading = ref(false);
+const customerOptions = ref<CustomerInfoVO[]>([]);
+const staffOptions = ref<ComStaffVO[]>([]);
+const orderMainDrawerRef = ref<any>();
+const uploadAction = import.meta.env.VITE_APP_BASE_API + '/resource/oss/upload';
+const currentSelectedOrders = ref<OrderDeliverVO[]>([]);
+const preloadedOrders = ref<OrderDeliverVO[]>([]); // 预加载的订单列表
+
+/** 计算当前页的商品列表 */
+const pagedProductList = computed(() => {
+  const start = (productPage.pageNum - 1) * productPage.pageSize;
+  const end = start + productPage.pageSize;
+  return form.value.productList?.slice(start, end) || [];
+});
+const preloadedTotal = ref(0); // 预加载的订单总数
+
+/** 打开新增/编辑对账详情抽屉 */
+const open = (id?: string | number, data?: StatementOrderForm) => {
+  reset();
+
+  if (id && data) {
+    // 编辑模式
+    isEdit.value = true;
+    drawer.title = '编辑对账';
+    Object.assign(form.value, data);
+
+    // 将客户信息添加到下拉选项中,以便回显
+    if (data.customerId && data.customerName) {
+      customerOptions.value = [
+        {
+          id: data.customerId,
+          customerName: data.customerName,
+          customerNo: data.customerNo || ''
+        } as CustomerInfoVO
+      ];
+    }
+
+    // 解析附件地址并回显附件列表
+    if (data.annexAddress) {
+      const urls = data.annexAddress.split(',').filter((url) => url.trim());
+      fileList.value = urls.map((url, index) => {
+        const fileName = url.split('/').pop() || `附件${index + 1}`;
+        return {
+          name: fileName,
+          url: url.trim(),
+          id: undefined
+        };
+      });
+    }
+
+    // 设置商品列表分页总数
+    if (data.productList && data.productList.length > 0) {
+      productPage.total = data.productList.length;
+    }
+  } else {
+    // 新增模式
+    isEdit.value = false;
+    drawer.title = '新增对账';
+  }
+
+  // 先打开抽屉
+  drawer.visible = true;
+
+  // 异步加载员工列表
+  getStaffList();
+
+  // 编辑模式下,如果有客户ID,异步预加载订单列表
+  if (id && data?.customerId) {
+    preloadOrders(data.customerId);
+  }
+};
+
+/** 表单重置 */
+const reset = () => {
+  form.value = { ...initFormData };
+  fileList.value = [];
+  productPage.pageNum = 1;
+  productPage.pageSize = 10;
+  productPage.total = 0;
+  customerOptions.value = [];
+  currentSelectedOrders.value = [];
+  preloadedOrders.value = [];
+  preloadedTotal.value = 0;
+  formRef.value?.clearValidate();
+};
+
+/** 远程搜索客户 */
+const remoteSearchCustomer = async (query: string) => {
+  if (query) {
+    customerLoading.value = true;
+    try {
+      const res = await getListBycustomerName(query);
+      customerOptions.value = res.data;
+    } catch (error) {
+      console.error(error);
+    } finally {
+      customerLoading.value = false;
+    }
+  } else {
+    customerOptions.value = [];
+  }
+};
+
+/** 客户变更 */
+const handleCustomerChange = async (customerId: string | number) => {
+  if (customerId) {
+    const customer = customerOptions.value.find((item) => item.id === customerId);
+    if (customer) {
+      form.value.customerName = customer.customerName;
+      form.value.customerNo = customer.customerNo;
+    }
+    // 预加载订单列表
+    await preloadOrders(customerId);
+  } else {
+    form.value.customerName = undefined;
+    form.value.customerNo = undefined;
+    preloadedOrders.value = [];
+    preloadedTotal.value = 0;
+  }
+};
+
+/** 预加载订单列表 */
+const preloadOrders = async (customerId: string | number) => {
+  try {
+    const res = await getCustomerDeliverOrders(customerId);
+    preloadedOrders.value = res.rows || [];
+    preloadedTotal.value = res.total || 0;
+  } catch (error) {
+    console.error('预加载订单列表失败:', error);
+    preloadedOrders.value = [];
+    preloadedTotal.value = 0;
+  }
+};
+
+/** 选择订单 */
+const handleSelectOrder = () => {
+  if (!form.value.customerId) {
+    proxy?.$modal.msgWarning('请先选择客户');
+    return;
+  }
+  // 传递当前已选中的订单、产品列表、预加载的订单列表和总数
+  orderMainDrawerRef.value?.open(
+    form.value.customerId,
+    currentSelectedOrders.value,
+    form.value.productList,
+    preloadedOrders.value,
+    preloadedTotal.value
+  );
+};
+
+/** 获取员工列表 */
+const getStaffList = async () => {
+  try {
+    const res = await listComStaff();
+    staffOptions.value = res.rows || [];
+  } catch (error) {
+    console.error('获取员工列表失败:', error);
+  }
+};
+
+/** 员工变更 */
+const handleStaffChange = (staffId: string | number) => {
+  if (staffId) {
+    const staff = staffOptions.value.find((item) => item.staffId === staffId);
+    if (staff) {
+      form.value.statementSelf = staff.staffName || '';
+      form.value.statementSelfPhone = staff.phone || '';
+    }
+  } else {
+    form.value.statementSelf = undefined;
+    form.value.statementSelfPhone = '';
+  }
+};
+
+/** 订单选择成功回调 */
+const handleOrderSelected = (data: any) => {
+  const { orders, products } = data;
+
+  if (orders && orders.length > 0) {
+    let totalAmount = 0;
+
+    // 保存当前选中的订单
+    currentSelectedOrders.value = orders;
+
+    // 清空现有数据
+    form.value.detailList = [];
+    form.value.productList = [];
+
+    // 填充对账明细
+    orders.forEach((order: any) => {
+      totalAmount += Number(order.totalAmount || 0);
+
+      const detail: any = {
+        id: undefined,
+        statementOrderId: undefined,
+        orderNo: order.orderCode,
+        deliverCode: order.deliverCode || '',
+        orderTime: order.orderTime || '',
+        amount: order.totalAmount,
+        type: order.orderType || '',
+        orderId: order.id,
+        signingDate: order.receivingTime || order.signingDate || '',
+        userId: order.createBy,
+        userName: order.createName || '',
+        userDeptId: order.createDept,
+        userDept: order.createDeptName || ''
+      };
+      form.value.detailList?.push(detail);
+    });
+
+    // 设置总金额
+    form.value.amount = totalAmount;
+
+    // 直接使用传递过来的产品列表
+    if (products && products.length > 0) {
+      form.value.productList = products;
+      productPage.total = products.length;
+    }
+  }
+};
+
+/** 添加对账明细 */
+const handleAddDetail = () => {
+  if (!form.value.customerId) {
+    proxy?.$modal.msgWarning('请先选择客户');
+    return;
+  }
+  // 传递当前已选中的订单、产品列表、预加载的订单列表和总数
+  orderMainDrawerRef.value?.open(
+    form.value.customerId,
+    currentSelectedOrders.value,
+    form.value.productList,
+    preloadedOrders.value,
+    preloadedTotal.value
+  );
+};
+
+/** 产品分页大小改变 */
+const handleProductSizeChange = (val: number) => {
+  productPage.pageSize = val;
+};
+
+/** 产品分页页码改变 */
+const handleProductCurrentChange = (val: number) => {
+  productPage.pageNum = val;
+};
+
+/** 上传前校验 */
+const beforeUpload = (file: any) => {
+  const isLt50M = file.size / 1024 / 1024 < 50;
+  if (!isLt50M) {
+    proxy?.$modal.msgWarning('上传文件大小不能超过 50MB!');
+  }
+  return isLt50M;
+};
+
+/** 上传成功回调 */
+const handleUploadSuccess = (response: any, file: any) => {
+  if (response.code === 200) {
+    fileList.value.push({
+      name: file.name,
+      url: response.data.url,
+      id: undefined
+    });
+    // 更新表单中的附件地址
+    form.value.annexAddress = fileList.value
+      .map((f) => f.url)
+      .filter(Boolean)
+      .join(',');
+    proxy?.$modal.msgSuccess('上传成功');
+  } else {
+    proxy?.$modal.msgError(response.msg || '上传失败');
+  }
+};
+
+/** 删除文件 */
+const handleRemoveFile = (index: number) => {
+  fileList.value.splice(index, 1);
+  // 更新表单中的附件地址
+  form.value.annexAddress = fileList.value
+    .map((f) => f.url)
+    .filter(Boolean)
+    .join(',');
+};
+
+/** 下载文件 */
+const handleDownloadFile = async (file: any) => {
+  if (!file.url) {
+    proxy?.$modal.msgWarning('文件地址不存在');
+    return;
+  }
+
+  try {
+    // 使用fetch获取文件
+    const response = await fetch(file.url);
+    const blob = await response.blob();
+
+    // 创建Blob URL
+    const blobUrl = window.URL.createObjectURL(blob);
+
+    // 创建下载链接
+    const link = document.createElement('a');
+    link.href = blobUrl;
+    link.download = file.name || '附件';
+    document.body.appendChild(link);
+    link.click();
+
+    // 清理
+    document.body.removeChild(link);
+    window.URL.revokeObjectURL(blobUrl);
+  } catch (error) {
+    console.error('下载失败:', error);
+    // 如果fetch失败,回退到直接打开链接的方式
+    const link = document.createElement('a');
+    link.href = file.url;
+    link.download = file.name || '附件';
+    link.target = '_blank';
+    document.body.appendChild(link);
+    link.click();
+    document.body.removeChild(link);
+  }
+};
+
+/** 预览文件 */
+const handlePreviewFile = (file: any) => {
+  if (!file.url) {
+    proxy?.$modal.msgWarning('文件地址不存在');
+    return;
+  }
+  // 在新窗口打开文件
+  window.open(file.url, '_blank');
+};
+
+/** 提交表单 */
+const handleSubmit = async () => {
+  if (!formRef.value) return;
+  console.log(form.value);
+
+  await formRef.value.validate(async (valid) => {
+    if (valid) {
+      buttonLoading.value = true;
+      try {
+        if (isEdit.value) {
+          // 编辑模式
+          await updateStatementOrder(form.value);
+          proxy?.$modal.msgSuccess('修改成功');
+        } else {
+          // 新增模式
+          await addStatementOrder(form.value);
+          proxy?.$modal.msgSuccess('新增成功');
+        }
+        drawer.visible = false;
+        emit('success');
+      } catch (error) {
+        console.error(error);
+      } finally {
+        buttonLoading.value = false;
+      }
+    }
+  });
+};
+
+/** 关闭抽屉前的回调 */
+const handleDrawerClose = (done: () => void) => {
+  if (buttonLoading.value) {
+    return;
+  }
+  done();
+  reset();
+};
+
+defineExpose({
+  open
+});
+</script>
+
+<style scoped lang="scss">
+.drawer-header {
+  display: flex;
+  align-items: center;
+  gap: 10px;
+
+  .order-title {
+    font-size: 16px;
+    font-weight: 600;
+    color: #303133;
+  }
+}
+
+.drawer-content {
+  padding: 0 20px 20px;
+  height: calc(100% - 60px);
+  overflow-y: auto;
+}
+
+.assign-dialog-content {
+  padding: 0 10px;
+}
+
+.assign-target-section {
+  margin-bottom: 20px;
+
+  .target-input-wrapper {
+    display: flex;
+    align-items: center;
+    gap: 8px;
+
+    .required-mark {
+      color: #f56c6c;
+      font-size: 14px;
+    }
+
+    .label {
+      font-size: 14px;
+      color: #606266;
+      white-space: nowrap;
+    }
+  }
+
+  .or-divider {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 14px;
+    color: #909399;
+  }
+}
+
+.product-list-section {
+  margin-top: 20px;
+}
+
+.detail-header {
+  padding: 15px 20px;
+  background-color: #f5f7fa;
+  border-radius: 4px;
+  margin-bottom: 20px;
+
+  .info-item {
+    display: flex;
+    flex-direction: column;
+    gap: 5px;
+
+    .label {
+      font-size: 12px;
+      color: #909399;
+    }
+
+    .value {
+      font-size: 14px;
+      color: #303133;
+      font-weight: 500;
+    }
+  }
+}
+
+.detail-tabs {
+  .tab-actions {
+    margin-bottom: 15px;
+  }
+}
+
+:deep(.el-alert__title) {
+  font-size: 13px;
+}
+
+.empty-data {
+  padding: 20px 0;
+  text-align: center;
+}
+
+.drawer-footer {
+  display: flex;
+  justify-content: flex-end;
+  gap: 10px;
+  padding: 15px 20px;
+  border-top: 1px solid #e4e7ed;
+}
+
+:deep(.el-upload__tip) {
+  margin-top: 8px;
+  font-size: 12px;
+  color: #909399;
+}
+</style>

+ 549 - 0
src/views/bill/statementOrder/detailDrawer.vue

@@ -0,0 +1,549 @@
+<template>
+  <!-- 对账详情抽屉 -->
+  <el-drawer v-model="drawer.visible" size="75%" direction="rtl" :before-close="handleDrawerClose" :close-on-click-modal="true">
+    <template #header>
+      <div class="drawer-header">
+        <span class="order-title">对账详情</span>
+      </div>
+    </template>
+
+    <div class="drawer-content">
+      <el-form ref="formRef" :model="form" :rules="rules" label-width="135px">
+        <!-- 基本信息 -->
+        <el-divider content-position="left">
+          <span style="color: #409eff; font-weight: 600">基本信息</span>
+        </el-divider>
+        <el-row :gutter="20">
+          <el-col :span="8">
+            <el-form-item label="对账单号:" prop="statementOrderNo">
+              <el-input v-model="form.statementOrderNo" disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="对账状态:" prop="statementStatus">
+              <dict-tag :options="statement_status" :value="form.statementStatus" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="客户名称:" prop="customerName">
+              <el-input v-model="form.customerName" disabled />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="8">
+            <el-form-item label="对账单金额:" prop="amount">
+              <el-input v-model="form.amount" disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="对账人:" prop="statementSelf">
+              <el-input v-model="form.statementSelf" disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="对账人联系方式:" prop="statementSelfPhone">
+              <el-input v-model="form.statementSelfPhone" placeholder="请填写对账人联系方式" disabled />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="8">
+            <el-form-item label="对账日期:" prop="statementDate">
+              <el-date-picker
+                v-model="form.statementDate"
+                type="date"
+                placeholder="请选择对账日期"
+                style="width: 100%"
+                value-format="YYYY-MM-DD"
+                disabled
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="支付状态:" prop="isPaymentStatus">
+              <el-select v-model="form.isPaymentStatus" placeholder="请选择支付状态" clearable style="width: 100%" disabled>
+                <el-option v-for="dict in payment_status" :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="isInvoiceStatus">
+              <el-select v-model="form.isInvoiceStatus" placeholder="请选择发票状态" clearable style="width: 100%" disabled>
+                <el-option v-for="dict in invoice_issuance_status" :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="24">
+            <el-form-item label="备注:" prop="remark">
+              <el-input v-model="form.remark" type="textarea" :rows="3" placeholder="请输入备注" maxlength="500" show-word-limit disabled />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <!-- 对账明细 -->
+        <el-divider content-position="left">
+          <span style="color: #409eff; font-weight: 600">对账明细</span>
+        </el-divider>
+
+        <el-table :data="form.detailList" border style="width: 100%; margin-bottom: 20px">
+          <el-table-column type="index" label="序号" width="60" align="center" />
+          <el-table-column prop="orderNo" label="订单编号" min-width="150" align="center" />
+          <el-table-column prop="amount" label="金额" min-width="120" align="center" />
+          <el-table-column prop="orderTime" label="下单日期" min-width="120" align="center" />
+          <el-table-column prop="userName" label="下单人" min-width="100" align="center" />
+          <el-table-column prop="userDept" label="部门" min-width="120" align="center" />
+        </el-table>
+        <!-- 
+        <div v-if="form.detailList.length === 0" class="empty-data">
+          <el-empty description="暂无数据" :image-size="100" />
+        </div> -->
+
+        <!-- 商品清单 -->
+        <el-divider content-position="left">
+          <span style="color: #409eff; font-weight: 600">商品清单</span>
+        </el-divider>
+
+        <el-table :data="pagedProductList" border style="width: 100%; margin-bottom: 20px">
+          <el-table-column
+            type="index"
+            label="序号"
+            width="60"
+            align="center"
+            :index="(index) => (productPage.pageNum - 1) * productPage.pageSize + index + 1"
+          />
+          <el-table-column prop="orderNo" label="订单编号" min-width="120" align="center" />
+          <el-table-column prop="productNo" label="商品编号" min-width="120" align="center" />
+          <el-table-column prop="itemName" label="商品名称" min-width="180" align="center" />
+          <el-table-column prop="unitName" label="单位" width="80" align="center" />
+          <el-table-column prop="quantity" label="数量" width="100" align="center" />
+          <el-table-column prop="unitPrice" label="单价" width="100" align="center">
+            <template #default="scope">
+              {{ scope.row.unitPrice ? Number(scope.row.unitPrice).toFixed(2) : '0.00' }}
+            </template>
+          </el-table-column>
+          <el-table-column label="小计" width="120" align="center">
+            <template #default="scope">
+              {{ (Number(scope.row.quantity || 0) * Number(scope.row.unitPrice || 0)).toFixed(2) }}
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <!-- 分页 -->
+        <el-pagination
+          v-if="form.productList.length > 0"
+          v-model:current-page="productPage.pageNum"
+          v-model:page-size="productPage.pageSize"
+          :page-sizes="[10, 20, 50, 100]"
+          layout="total, sizes, prev, pager, next, jumpers"
+          :total="productPage.total"
+          @size-change="handleProductSizeChange"
+          @current-change="handleProductCurrentChange"
+          style="margin-top: 15px"
+        />
+
+        <!-- 对账附件 -->
+        <el-divider content-position="left">
+          <span style="color: #409eff; font-weight: 600">对账附件</span>
+        </el-divider>
+
+        <el-table :data="fileList" border style="width: 100%; margin-bottom: 20px">
+          <el-table-column type="index" label="序号" width="80" align="center" />
+          <el-table-column prop="name" label="文件名称" min-width="200" align="center" />
+          <el-table-column prop="url" label="文件地址" min-width="250" align="center">
+            <template #default="scope">
+              {{ scope.row.url || '暂无地址' }}
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" width="160" align="center">
+            <template #default="scope">
+              <el-button type="primary" link @click="handleDownloadFile(scope.row)">下载</el-button>
+              <el-button type="primary" link @click="handlePreviewFile(scope.row)">预览</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <!-- 
+        <div v-if="fileList.length === 0" class="empty-data">
+          <el-empty description="暂无附件" :image-size="100" />
+        </div> -->
+      </el-form>
+    </div>
+
+    <template #footer>
+      <div class="drawer-footer">
+        <el-button @click="handleDrawerClose(() => (drawer.visible = false))">取消</el-button>
+        <el-button type="primary" :loading="buttonLoading" @click="handleDrawerClose(() => (drawer.visible = false))">提交</el-button>
+      </div>
+    </template>
+  </el-drawer>
+</template>
+
+<script setup name="AddDrawer" lang="ts">
+import { addStatementOrder, updateStatementOrder } from '@/api/bill/statementOrder';
+import { StatementOrderForm } from '@/api/bill/statementOrder/types';
+import { CustomerInfoVO } from '@/api/customer/customerFile/customerInfo/types';
+import { listOrderMain, getOrderMain } from '@/api/order/orderMain';
+import { OrderMainVO, OrderMainQuery, OrderMainForm } from '@/api/order/orderMain/types';
+
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { statement_status, invoice_issuance_status, payment_status } = toRefs<any>(
+  proxy?.useDict('statement_status', 'statement_order_type', 'invoice_issuance_status', 'payment_status')
+);
+
+const initFormData: StatementOrderForm = {
+  id: undefined,
+  statementOrderNo: undefined,
+  customerId: undefined,
+  customerNo: undefined,
+  customerName: undefined,
+  amount: undefined,
+  statementSelfId: undefined,
+  statementSelf: undefined,
+  statementSelfPhone: undefined,
+  statementStatus: undefined,
+  isPaymentStatus: undefined,
+  isInvoiceStatus: undefined,
+  statementDate: undefined,
+  annexAddress: undefined,
+  rejectRemark: undefined,
+  remark: undefined,
+  detailList: [],
+  productList: []
+};
+
+const emit = defineEmits(['success']);
+
+const formRef = ref<any>();
+const buttonLoading = ref(false);
+
+const form = ref<
+  StatementOrderForm & {
+    actualAmount?: string;
+    accountingVerification?: string;
+    skuProductName?: string;
+    skuProductModel?: string;
+    attachmentRemark?: string;
+  }
+>({ ...initFormData });
+
+const rules = reactive({
+  customerName: [{ required: true, message: '请输入客户名称', trigger: 'blur' }],
+  statementSelfId: [{ required: true, message: '请选择对账人', trigger: 'blur' }],
+  statementSelfPhone: [
+    { required: true, message: '请输入对账人手机号', trigger: 'blur' },
+    { pattern: /^1[3-9]\d{9}$/ as RegExp, message: '请输入正确的手机号格式', trigger: 'blur' }
+  ]
+} as any);
+
+const fileList = ref<any[]>([]);
+
+const productPage = reactive({
+  pageNum: 1,
+  pageSize: 10,
+  total: 0
+});
+
+const drawer = reactive<DialogOption>({
+  visible: false,
+  title: '对账详情'
+});
+
+const isEdit = ref(false); // 是否为编辑模式
+
+const customerOptions = ref<CustomerInfoVO[]>([]);
+const preloadedOrders = ref<OrderMainVO[]>([]); // 预加载的订单列表
+const preloadedTotal = ref(0); // 预加载的订单总数
+
+/** 计算当前页的商品列表 */
+const pagedProductList = computed(() => {
+  const start = (productPage.pageNum - 1) * productPage.pageSize;
+  const end = start + productPage.pageSize;
+  return form.value.productList?.slice(start, end) || [];
+});
+
+/** 打开新增/编辑对账详情抽屉 */
+const open = (id?: string | number, data?: StatementOrderForm) => {
+  reset();
+
+  if (id && data) {
+    // 查看模式
+    drawer.title = '对账详情';
+    Object.assign(form.value, data);
+
+    // 将客户信息添加到下拉选项中,以便回显
+    if (data.customerId && data.customerName) {
+      customerOptions.value = [
+        {
+          id: data.customerId,
+          customerName: data.customerName,
+          customerNo: data.customerNo || ''
+        } as CustomerInfoVO
+      ];
+    }
+
+    // 解析附件地址并回显附件列表
+    if (data.annexAddress) {
+      const urls = data.annexAddress.split(',').filter((url) => url.trim());
+      fileList.value = urls.map((url, index) => {
+        const fileName = url.split('/').pop() || `附件${index + 1}`;
+        return {
+          name: fileName,
+          url: url.trim(),
+          id: undefined
+        };
+      });
+    }
+
+    // 设置商品列表分页总数
+    if (data.productList && data.productList.length > 0) {
+      productPage.total = data.productList.length;
+    }
+  }
+
+  // 先打开抽屉
+  drawer.visible = true;
+};
+
+/** 表单重置 */
+const reset = () => {
+  form.value = { ...initFormData };
+  fileList.value = [];
+  productPage.pageNum = 1;
+  productPage.pageSize = 10;
+  productPage.total = 0;
+  customerOptions.value = [];
+  formRef.value?.clearValidate();
+};
+
+/** 预加载订单列表 */
+const preloadOrders = async (customerId: string | number) => {
+  try {
+    const params: OrderMainQuery = {
+      pageNum: 1,
+      pageSize: 10,
+      customerId: customerId
+    };
+    const res = await listOrderMain(params);
+    preloadedOrders.value = res.rows || [];
+    preloadedTotal.value = res.total || 0;
+  } catch (error) {
+    console.error('预加载订单列表失败:', error);
+    preloadedOrders.value = [];
+    preloadedTotal.value = 0;
+  }
+};
+
+/** 产品分页大小改变 */
+const handleProductSizeChange = (val: number) => {
+  productPage.pageSize = val;
+};
+
+/** 产品分页页码改变 */
+const handleProductCurrentChange = (val: number) => {
+  productPage.pageNum = val;
+};
+
+/** 下载文件 */
+const handleDownloadFile = async (file: any) => {
+  if (!file.url) {
+    proxy?.$modal.msgWarning('文件地址不存在');
+    return;
+  }
+
+  try {
+    // 使用fetch获取文件
+    const response = await fetch(file.url);
+    const blob = await response.blob();
+
+    // 创建Blob URL
+    const blobUrl = window.URL.createObjectURL(blob);
+
+    // 创建下载链接
+    const link = document.createElement('a');
+    link.href = blobUrl;
+    link.download = file.name || '附件';
+    document.body.appendChild(link);
+    link.click();
+
+    // 清理
+    document.body.removeChild(link);
+    window.URL.revokeObjectURL(blobUrl);
+  } catch (error) {
+    console.error('下载失败:', error);
+    // 如果fetch失败,回退到直接打开链接的方式
+    const link = document.createElement('a');
+    link.href = file.url;
+    link.download = file.name || '附件';
+    link.target = '_blank';
+    document.body.appendChild(link);
+    link.click();
+    document.body.removeChild(link);
+  }
+};
+
+/** 预览文件 */
+const handlePreviewFile = (file: any) => {
+  if (!file.url) {
+    proxy?.$modal.msgWarning('文件地址不存在');
+    return;
+  }
+  // 在新窗口打开文件
+  window.open(file.url, '_blank');
+};
+
+/** 提交表单 */
+const handleSubmit = async () => {
+  if (!formRef.value) return;
+
+  await formRef.value.validate(async (valid) => {
+    if (valid) {
+      buttonLoading.value = true;
+      try {
+        if (isEdit.value) {
+          // 编辑模式
+          await updateStatementOrder(form.value);
+          proxy?.$modal.msgSuccess('修改成功');
+        } else {
+          // 新增模式
+          await addStatementOrder(form.value);
+          proxy?.$modal.msgSuccess('新增成功');
+        }
+        drawer.visible = false;
+        emit('success');
+      } catch (error) {
+        console.error(error);
+      } finally {
+        buttonLoading.value = false;
+      }
+    }
+  });
+};
+
+/** 关闭抽屉前的回调 */
+const handleDrawerClose = (done: () => void) => {
+  if (buttonLoading.value) {
+    return;
+  }
+  done();
+  reset();
+};
+
+defineExpose({
+  open
+});
+</script>
+
+<style scoped lang="scss">
+.drawer-header {
+  display: flex;
+  align-items: center;
+  gap: 10px;
+
+  .order-title {
+    font-size: 16px;
+    font-weight: 600;
+    color: #303133;
+  }
+}
+
+.drawer-content {
+  padding: 0 20px 20px;
+  height: calc(100% - 60px);
+  overflow-y: auto;
+}
+
+.assign-dialog-content {
+  padding: 0 10px;
+}
+
+.assign-target-section {
+  margin-bottom: 20px;
+
+  .target-input-wrapper {
+    display: flex;
+    align-items: center;
+    gap: 8px;
+
+    .required-mark {
+      color: #f56c6c;
+      font-size: 14px;
+    }
+
+    .label {
+      font-size: 14px;
+      color: #606266;
+      white-space: nowrap;
+    }
+  }
+
+  .or-divider {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 14px;
+    color: #909399;
+  }
+}
+
+.product-list-section {
+  margin-top: 20px;
+}
+
+.detail-header {
+  padding: 15px 20px;
+  background-color: #f5f7fa;
+  border-radius: 4px;
+  margin-bottom: 20px;
+
+  .info-item {
+    display: flex;
+    flex-direction: column;
+    gap: 5px;
+
+    .label {
+      font-size: 12px;
+      color: #909399;
+    }
+
+    .value {
+      font-size: 14px;
+      color: #303133;
+      font-weight: 500;
+    }
+  }
+}
+
+.detail-tabs {
+  .tab-actions {
+    margin-bottom: 15px;
+  }
+}
+
+:deep(.el-alert__title) {
+  font-size: 13px;
+}
+
+.empty-data {
+  padding: 20px 0;
+  text-align: center;
+}
+
+.drawer-footer {
+  display: flex;
+  justify-content: flex-end;
+  gap: 10px;
+  padding: 15px 20px;
+  border-top: 1px solid #e4e7ed;
+}
+
+:deep(.el-upload__tip) {
+  margin-top: 8px;
+  font-size: 12px;
+  color: #909399;
+}
+</style>

+ 347 - 0
src/views/bill/statementOrder/index.vue

@@ -0,0 +1,347 @@
+<template>
+  <div class="p-2">
+    <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
+      <div v-show="showSearch" class="mb-[10px]">
+        <el-card shadow="hover">
+          <el-form ref="queryFormRef" :model="queryParams" :inline="true">
+            <el-form-item label="对账单号" prop="statementOrderNo">
+              <el-input v-model="queryParams.statementOrderNo" placeholder="请输入对账单号" clearable @keyup.enter="handleQuery" />
+            </el-form-item>
+            <el-form-item label="对账日期" prop="statementDate">
+              <el-date-picker
+                v-model="dateRange"
+                type="daterange"
+                range-separator="至"
+                start-placeholder="开始时间"
+                end-placeholder="结束时间"
+                value-format="YYYY-MM-DD"
+              />
+            </el-form-item>
+            <el-form-item label="客户名称" prop="customerName">
+              <el-input v-model="queryParams.customerName" placeholder="请输入客户名称" clearable @keyup.enter="handleQuery" />
+            </el-form-item>
+            <!-- <el-form-item label="订单编号" prop="orderNo">
+              <el-input v-model="queryParams.orderNo" placeholder="请输入客户名称" clearable @keyup.enter="handleQuery" />
+            </el-form-item> -->
+            <el-form-item label="对账状态" prop="statementStatus">
+              <el-select v-model="queryParams.statementStatus" placeholder="请选择对账状态" clearable>
+                <el-option v-for="dict in statement_status" :key="dict.value" :label="dict.label" :value="dict.value" />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="支付状态" prop="isPaymentStatus">
+              <el-select v-model="queryParams.isPaymentStatus" placeholder="请选择付款状态" clearable>
+                <el-option v-for="dict in payment_status" :key="dict.value" :label="dict.label" :value="dict.value" />
+              </el-select>
+            </el-form-item>
+
+            <el-form-item>
+              <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
+              <el-button icon="Refresh" @click="resetQuery">重置</el-button>
+            </el-form-item>
+          </el-form>
+        </el-card>
+      </div>
+    </transition>
+
+    <el-card shadow="never">
+      <template #header>
+        <el-row :gutter="10" class="mb8">
+          <el-col :span="22"> 对账管理信息列表 </el-col>
+          <el-col :span="1.5">
+            <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['bill:statementOrder:add']">新增</el-button>
+          </el-col>
+        </el-row>
+      </template>
+
+      <el-table v-loading="loading" border :data="statementOrderList" @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column label="对账单号" align="center" prop="statementOrderNo" />
+        <el-table-column label="对账日期" align="center" prop="statementDate" width="180">
+          <template #default="scope">
+            <span>{{ parseTime(scope.row.statementDate, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="对账金额" align="center" prop="amount" />
+        <el-table-column label="客户编号" align="center" prop="customerNo" />
+        <el-table-column label="客户名称" align="center" prop="customerName" />
+        <el-table-column label="对账状态" align="center" prop="statementStatus">
+          <template #default="scope">
+            <dict-tag :options="statement_status" :value="scope.row.statementStatus" />
+          </template>
+        </el-table-column>
+        <el-table-column label="开票状态" align="center" prop="isInvoiceStatus">
+          <template #default="scope">
+            <dict-tag :options="invoice_issuance_status" :value="scope.row.isInvoiceStatus" />
+          </template>
+        </el-table-column>
+        <el-table-column label="支付状态" align="center" prop="isPaymentStatus">
+          <template #default="scope">
+            <dict-tag :options="payment_status" :value="scope.row.isPaymentStatus" />
+          </template>
+        </el-table-column>
+
+        <el-table-column label="操作" align="center" width="300" fixed="right">
+          <template #default="scope">
+            <template v-for="btn in getAvailableButtons(scope.row.statementStatus)" :key="btn.action">
+              <el-button link type="primary" @click="btn.handler(scope.row)" v-hasPermi="[btn.permission]">
+                {{ btn.label }}
+              </el-button>
+            </template>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
+    </el-card>
+    <!--新增对账的抽屉 -->
+    <add-drawer ref="addDrawerRef" @success="getList" />
+    <!--查看对账的抽屉 -->
+    <detail-drawer ref="detailDrawerRef" @success="getList" />
+  </div>
+</template>
+
+<script setup name="StatementOrder" lang="ts">
+import { listStatementOrder, getStatementOrder, changeStatus } from '@/api/bill/statementOrder';
+import { StatementOrderVO, StatementOrderQuery, StatementOrderForm } from '@/api/bill/statementOrder/types';
+import AddDrawer from './addDrawer.vue';
+import DetailDrawer from './detailDrawer.vue';
+
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { statement_status, statement_order_type, invoice_issuance_status, payment_status } = toRefs<any>(
+  proxy?.useDict('statement_status', 'statement_order_type', 'invoice_issuance_status', 'payment_status')
+);
+
+const statementOrderList = ref<StatementOrderVO[]>([]);
+const buttonLoading = ref(false);
+const loading = ref(true);
+const showSearch = ref(true);
+const ids = ref<Array<string | number>>([]);
+const single = ref(true);
+const multiple = ref(true);
+const total = ref(0);
+const addDrawerRef = ref<InstanceType<typeof AddDrawer>>();
+const detailDrawerRef = ref<InstanceType<typeof DetailDrawer>>();
+const queryFormRef = ref<ElFormInstance>();
+const statementOrderFormRef = ref<ElFormInstance>();
+const dateRange = ref<[DateModelType, DateModelType]>(['', '']);
+const dialog = reactive<DialogOption>({
+  visible: false,
+  title: ''
+});
+
+const initFormData: StatementOrderForm = {
+  id: undefined,
+  statementOrderNo: undefined,
+  customerId: undefined,
+  customerNo: undefined,
+  customerName: undefined,
+  amount: undefined,
+  statementSelf: undefined,
+  statementSelfPhone: undefined,
+  statementStatus: undefined,
+  isPaymentStatus: undefined,
+  isInvoiceStatus: undefined,
+  statementDate: undefined,
+  annexAddress: undefined,
+  rejectRemark: undefined,
+  remark: undefined,
+  detailList: [],
+  productList: []
+};
+const data = reactive<PageData<StatementOrderForm, StatementOrderQuery>>({
+  form: { ...initFormData },
+  queryParams: {
+    pageNum: 1,
+    pageSize: 10,
+    statementOrderNo: undefined,
+    customerId: undefined,
+    customerNo: undefined,
+    customerName: undefined,
+    amount: undefined,
+    statementSelf: undefined,
+    statementSelfPhone: undefined,
+    statementStatus: undefined,
+    isPaymentStatus: undefined,
+    isInvoiceStatus: undefined,
+    statementDate: undefined,
+    annexAddress: undefined,
+    rejectRemark: undefined,
+    platformCode: undefined,
+    params: {}
+  },
+  rules: {}
+});
+
+const { queryParams, form, rules } = toRefs(data);
+
+// 对账单状态枚举
+enum StatementStatus {
+  DRAFT = 0, // 待确认
+  PENDING = 1, // 待对账
+  CONFIRMED = 2, // 已对账
+  REJECTED = 3, // 已驳回
+  OBSOLETE = 4 // 已作废
+}
+
+// 按钮配置类型
+interface ActionButton {
+  action: string;
+  label: string;
+  handler: (row: StatementOrderVO) => void;
+  permission: string;
+}
+
+/** 查询对账单主列表 */
+const getList = async () => {
+  loading.value = true;
+  const res = await listStatementOrder(proxy?.addDateRange(queryParams.value, dateRange.value));
+  statementOrderList.value = res.rows;
+  total.value = res.total;
+  loading.value = false;
+};
+
+/** 表单重置 */
+const reset = () => {
+  form.value = { ...initFormData };
+  statementOrderFormRef.value?.resetFields();
+};
+
+/** 搜索按钮操作 */
+const handleQuery = () => {
+  queryParams.value.pageNum = 1;
+  getList();
+};
+
+/** 重置按钮操作 */
+const resetQuery = () => {
+  dateRange.value = ['', ''];
+  queryFormRef.value?.resetFields();
+  handleQuery();
+};
+
+/** 多选框选中数据 */
+const handleSelectionChange = (selection: StatementOrderVO[]) => {
+  ids.value = selection.map((item) => item.id);
+  single.value = selection.length != 1;
+  multiple.value = !selection.length;
+};
+
+/** 新增按钮操作 */
+const handleAdd = () => {
+  reset();
+  // 打开抽屉
+  addDrawerRef.value?.open();
+};
+
+/** 修改按钮操作 */
+const handleUpdate = async (row?: StatementOrderVO) => {
+  const _id = row?.id || ids.value[0];
+  const res = await getStatementOrder(_id);
+  // 打开抽屉,传递id和数据
+  addDrawerRef.value?.open(_id, res.data);
+};
+
+/** 查看按钮操作 */
+const handleDetail = async (row?: StatementOrderVO) => {
+  const _id = row?.id || ids.value[0];
+  const res = await getStatementOrder(_id);
+  // 打开抽屉,传递id和数据
+  detailDrawerRef.value?.open(_id, res.data);
+};
+
+/** 发送按钮操作 */
+const handleSend = async (row?: StatementOrderVO) => {
+  const _no = row?.statementOrderNo;
+  const _ids = row?.id;
+  const oldValue = row.statementStatus; // 保存旧值
+  await proxy?.$modal.confirm('是否发送当前账单编号【' + _no + '】吗?').finally(() => (loading.value = false));
+  //todo 发送
+  try {
+    await changeStatus(_ids, '1'); // 传新值 1 待确认
+  } catch (e) {
+    // 恢复旧值
+    row.statementStatus = oldValue;
+  }
+  proxy?.$modal.msgSuccess('发送成功');
+  await getList();
+};
+
+/** 撤回按钮操作 */
+const handleWithdraw = async (row?: StatementOrderVO) => {
+  const _no = row?.statementOrderNo;
+  const _ids = row?.id;
+  const oldValue = row.statementStatus; // 保存旧值
+  await proxy?.$modal.confirm('是否撤回当前账单编号【' + _no + '】吗?').finally(() => (loading.value = false));
+  //todo 撤回
+  try {
+    await changeStatus(_ids, '0'); // 传新值 0 待确认
+  } catch (e) {
+    // 恢复旧值
+    row.statementStatus = oldValue;
+  }
+  proxy?.$modal.msgSuccess('撤回成功');
+  await getList();
+};
+
+/** 作废按钮操作 */
+const handleObsolete = async (row?: StatementOrderVO) => {
+  const _no = row?.statementOrderNo;
+  const oldValue = row.statementStatus; // 保存旧值
+  await proxy?.$modal.confirm('是否作废当前账单编号【' + _no + '】吗?').finally(() => (loading.value = false));
+  await changeStatus(row.id, '4'); // 传新值 4 - 作废
+  proxy?.$modal.msgSuccess('作废成功');
+  await getList();
+};
+
+/** 导出按钮操作 */
+const handleExport = () => {
+  proxy?.download(
+    'bill/statementOrder/export',
+    {
+      ...queryParams.value
+    },
+    `statementOrder_${new Date().getTime()}.xlsx`
+  );
+};
+
+// 按钮配置映射:状态 -> 可用按钮列表
+const buttonConfigMap: Record<number, ActionButton[]> = {
+  [StatementStatus.DRAFT]: [
+    { action: 'detail', label: '查看', handler: handleDetail, permission: 'bill:statementOrder:edit' },
+    { action: 'edit', label: '编辑', handler: handleUpdate, permission: 'bill:statementOrder:edit' },
+    { action: 'send', label: '发送对账单', handler: handleSend, permission: 'bill:statementOrder:edit' },
+    { action: 'withdraw', label: '撤回', handler: handleWithdraw, permission: 'bill:statementOrder:edit' },
+    { action: 'obsolete', label: '作废', handler: handleObsolete, permission: 'bill:statementOrder:remove' }
+  ],
+  [StatementStatus.PENDING]: [
+    { action: 'detail', label: '查看', handler: handleDetail, permission: 'bill:statementOrder:edit' },
+    { action: 'edit', label: '编辑', handler: handleUpdate, permission: 'bill:statementOrder:edit' },
+    { action: 'withdraw', label: '撤回', handler: handleWithdraw, permission: 'bill:statementOrder:edit' },
+    { action: 'obsolete', label: '作废', handler: handleObsolete, permission: 'bill:statementOrder:remove' }
+  ],
+  [StatementStatus.CONFIRMED]: [
+    { action: 'detail', label: '查看', handler: handleDetail, permission: 'bill:statementOrder:edit' },
+    { action: 'obsolete', label: '作废', handler: handleObsolete, permission: 'bill:statementOrder:remove' }
+  ],
+  [StatementStatus.REJECTED]: [
+    { action: 'detail', label: '查看', handler: handleDetail, permission: 'bill:statementOrder:edit' },
+    { action: 'edit', label: '编辑', handler: handleUpdate, permission: 'bill:statementOrder:edit' },
+    { action: 'send', label: '发送对账单', handler: handleSend, permission: 'bill:statementOrder:edit' },
+    { action: 'obsolete', label: '作废', handler: handleObsolete, permission: 'bill:statementOrder:remove' }
+  ],
+  [StatementStatus.OBSOLETE]: [{ action: 'detail', label: '查看', handler: handleDetail, permission: 'bill:statementOrder:edit' }]
+};
+
+/**
+ * 根据对账单状态获取可用按钮列表
+ * @param status 对账单状态
+ * @returns 可用按钮配置数组
+ */
+const getAvailableButtons = (status: number): ActionButton[] => {
+  return buttonConfigMap[status] || [{ action: 'detail', label: '查看', handler: handleDetail, permission: 'bill:statementOrder:edit' }];
+};
+
+onMounted(() => {
+  getList();
+});
+</script>

+ 271 - 0
src/views/bill/statementOrder/orderMainDrawer.vue

@@ -0,0 +1,271 @@
+<template>
+  <!-- 客户订单抽屉 -->
+  <el-drawer v-model="drawer.visible" title="对账单信息" size="68%" direction="rtl" :before-close="handleDrawerClose" :close-on-click-modal="true">
+    <div class="drawer-content">
+      <el-table ref="tableRef" v-loading="loading" :data="orderList" border @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column prop="orderCode" label="订单编号" min-width="150" align="center" />
+        <el-table-column prop="deliverCode" label="发货单编号" min-width="150" align="center" />
+        <el-table-column prop="totalAmount" label="金额" min-width="100" align="center">
+          <template #default="scope">
+            {{ scope.row.totalAmount ? Number(scope.row.totalAmount).toFixed(2) : '0.00' }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="orderTime" label="下单日期" min-width="120" align="center" />
+        <el-table-column prop="createName" label="下单人" min-width="100" align="center" />
+        <el-table-column prop="createDeptName" label="部门" min-width="150" align="center" />
+      </el-table>
+
+      <pagination v-show="total > 0" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" :total="total" @pagination="getList" />
+    </div>
+
+    <template #footer>
+      <div class="drawer-footer">
+        <el-button @click="handleDrawerClose(() => (drawer.visible = false))">取消</el-button>
+        <el-button type="primary" @click="handleConfirm">确定</el-button>
+      </div>
+    </template>
+  </el-drawer>
+</template>
+
+<script setup name="OrderMainDrawer" lang="ts">
+import { listOrderMain } from '@/api/order/orderMain';
+import { getCustomerDeliverOrders, getCustomerOrderProductList } from '@/api/order/orderDeliver';
+import { OrderMainVO, OrderMainQuery } from '@/api/order/orderMain/types';
+
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+
+const emit = defineEmits(['success']);
+
+const drawer = reactive<DialogOption>({
+  visible: false,
+  title: '对账单信息'
+});
+
+const loading = ref(false);
+const orderList = ref<OrderMainVO[]>([]);
+const selectedOrders = ref<OrderMainVO[]>([]);
+const mergedProductList = ref<any[]>([]);
+const total = ref(0);
+const tableRef = ref<any>();
+const custId = ref<string | number>();
+
+const queryParams = ref<OrderMainQuery>({
+  pageNum: 1,
+  pageSize: 10,
+  customerId: undefined
+});
+
+/** 打开抽屉 */
+const open = async (
+  customerId: string | number,
+  preSelectedOrders?: OrderMainVO[],
+  preProductList?: any[],
+  preloadedOrderList?: OrderMainVO[],
+  preloadedTotalCount?: number
+) => {
+  custId.value = customerId;
+
+  // 先重置所有状态(包括表格选中)
+  reset();
+  queryParams.value.customerId = customerId;
+  drawer.visible = true;
+
+  // 如果有预加载的订单列表,直接使用,否则请求API
+  if (preloadedOrderList && preloadedOrderList.length > 0) {
+    orderList.value = preloadedOrderList;
+    total.value = preloadedTotalCount || 0;
+    loading.value = false;
+  } else {
+    // 获取订单列表
+    await getList();
+  }
+
+  // 只有当传入了preSelectedOrders且非空时,才恢复选中状态
+  if (preSelectedOrders && preSelectedOrders.length > 0) {
+    selectedOrders.value = [...preSelectedOrders];
+    mergedProductList.value = preProductList ? [...preProductList] : [];
+
+    // 恢复表格选中状态
+    await nextTick();
+    restoreSelection(preSelectedOrders);
+  }
+};
+
+/** 获取订单列表 */
+const getList = async () => {
+  if (!custId.value) {
+    console.error('customerId为空');
+    return;
+  }
+
+  loading.value = true;
+  try {
+    const res = await getCustomerDeliverOrders(custId.value, {
+      pageNum: queryParams.value.pageNum,
+      pageSize: queryParams.value.pageSize
+    });
+
+    // 解析数据 - 支持多种返回格式
+    let rows: any[] = [];
+    let totalCount = 0;
+
+    if (res.rows) {
+      rows = res.rows;
+      totalCount = res.total || 0;
+    } else if (res.data && res.data.rows) {
+      rows = res.data.rows;
+      totalCount = res.data.total || 0;
+    } else if (res.data && Array.isArray(res.data)) {
+      rows = res.data;
+      totalCount = res.data.length;
+    } else if (Array.isArray(res)) {
+      rows = res;
+      totalCount = res.length;
+    }
+
+    orderList.value = rows;
+    total.value = totalCount;
+
+    // 数据加载完成后,清空表格选中状态(避免自动恢复之前的选中)
+    await nextTick();
+    tableRef.value?.clearSelection();
+  } catch (error) {
+    console.error('加载数据失败:', error);
+    orderList.value = [];
+    total.value = 0;
+  } finally {
+    loading.value = false;
+  }
+};
+
+/** 加载数据 */
+const loadData = async () => {};
+
+/** 恢复选中状态 */
+const restoreSelection = (preSelectedOrders: OrderMainVO[]) => {
+  if (!tableRef.value || !orderList.value.length) {
+    return;
+  }
+
+  // 根据订单ID恢复选中状态
+  preSelectedOrders.forEach((preOrder) => {
+    const row = orderList.value.find((order) => order.id === preOrder.id);
+    if (row) {
+      tableRef.value.toggleRowSelection(row, true);
+    }
+  });
+};
+
+/** 表格选择变化 */
+const handleSelectionChange = async (selection: OrderMainVO[]) => {
+  selectedOrders.value = selection;
+  // 合并选中订单的产品列表
+  await mergeProductList();
+};
+
+/** 合并选中订单的产品列表 */
+const mergeProductList = async () => {
+  if (selectedOrders.value.length === 0) {
+    mergedProductList.value = [];
+    return;
+  }
+
+  try {
+    // 提取所有选中订单的ID
+    const orderIds = selectedOrders.value.map((order) => order.id).filter((id) => id !== undefined);
+
+    if (orderIds.length === 0) {
+      mergedProductList.value = [];
+      return;
+    }
+
+    // 调用接口获取订单商品列表
+    const res = await getCustomerOrderProductList(orderIds);
+    const productList = res.rows || [];
+
+    // 构建产品列表
+    const newProductList: any[] = [];
+    productList.forEach((item: any) => {
+      const product: any = {
+        id: undefined,
+        statementOrderId: undefined,
+        orderNo: item.orderNo || '',
+        productNo: item.productNo || item.skuNo || item.productCode || '',
+        itemName: item.productName || item.skuName || item.itemName || item.productFullName || '',
+        specifications: item.specifications || item.spec || item.model || item.specModel || '',
+        quantity: item.deliverNum,
+        unitPrice: item.price || item.unitPrice || item.salePrice || item.orderPrice,
+        productUnit: item.productUnit || item.unitName || '',
+        subtotal: item.subtotal,
+        unitName: item.productUnit || item.unitName || '',
+        type: item.productType || item.type || '',
+        orderId: item.deliverId,
+        categoryId: item.categoryId,
+        categoryNo: item.categoryNo || '',
+        productId: item.productId || item.id,
+        unitId: item.productUnitId || item.unitId
+      };
+      newProductList.push(product);
+    });
+
+    // 更新产品列表
+    mergedProductList.value = newProductList;
+  } catch (error) {
+    console.error('获取订单产品列表失败:', error);
+    mergedProductList.value = [];
+  }
+};
+
+/** 确定选择 */
+const handleConfirm = () => {
+  if (selectedOrders.value.length === 0) {
+    proxy?.$modal.msgWarning('请至少选择一条订单');
+    return;
+  }
+
+  // 传递订单列表和产品列表
+  emit('success', { orders: selectedOrders.value, products: mergedProductList.value });
+  drawer.visible = false;
+};
+
+/** 重置 */
+const reset = () => {
+  orderList.value = [];
+  selectedOrders.value = [];
+  mergedProductList.value = [];
+  total.value = 0;
+  queryParams.value = {
+    pageNum: 1,
+    pageSize: 10,
+    customerId: undefined
+  };
+  tableRef.value?.clearSelection();
+};
+
+/** 关闭抽屉前的回调 */
+const handleDrawerClose = (done: () => void) => {
+  done();
+  reset();
+};
+
+defineExpose({
+  open
+});
+</script>
+
+<style scoped lang="scss">
+.drawer-content {
+  padding: 0 20px 20px;
+  height: calc(100% - 60px);
+  overflow-y: auto;
+}
+
+.drawer-footer {
+  display: flex;
+  justify-content: flex-end;
+  gap: 10px;
+  padding: 15px 20px;
+  border-top: 1px solid #e4e7ed;
+}
+</style>