Browse Source

供应商信息

tjxt 4 months ago
parent
commit
818f9a7ab1
65 changed files with 14938 additions and 0 deletions
  1. 41 0
      INSTALL_ELEMENT_CHINA_AREA_DATA.md
  2. 1 0
      package.json
  3. 75 0
      src/api/company/company/index.ts
  4. 410 0
      src/api/company/company/types.ts
  5. 63 0
      src/api/product/attributes/index.ts
  6. 171 0
      src/api/product/attributes/types.ts
  7. 181 0
      src/api/product/base/index.ts
  8. 804 0
      src/api/product/base/types.ts
  9. 63 0
      src/api/product/brand/index.ts
  10. 315 0
      src/api/product/brand/types.ts
  11. 84 0
      src/api/product/category/index.ts
  12. 402 0
      src/api/product/category/types.ts
  13. 63 0
      src/api/product/contractproduct/index.ts
  14. 146 0
      src/api/product/contractproduct/types.ts
  15. 63 0
      src/api/product/unit/index.ts
  16. 101 0
      src/api/product/unit/types.ts
  17. 63 0
      src/api/product/warehouseInventory/index.ts
  18. 176 0
      src/api/product/warehouseInventory/types.ts
  19. 63 0
      src/api/supplier/address/index.ts
  20. 261 0
      src/api/supplier/address/types.ts
  21. 63 0
      src/api/supplier/approve/index.ts
  22. 96 0
      src/api/supplier/approve/types.ts
  23. 65 0
      src/api/supplier/area/index.ts
  24. 76 0
      src/api/supplier/area/types.ts
  25. 63 0
      src/api/supplier/authorizetypeLevel/index.ts
  26. 71 0
      src/api/supplier/authorizetypeLevel/types.ts
  27. 63 0
      src/api/supplier/bank/index.ts
  28. 156 0
      src/api/supplier/bank/types.ts
  29. 77 0
      src/api/supplier/businessInfo/index.ts
  30. 206 0
      src/api/supplier/businessInfo/types.ts
  31. 71 0
      src/api/supplier/contact/index.ts
  32. 216 0
      src/api/supplier/contact/types.ts
  33. 63 0
      src/api/supplier/contract/index.ts
  34. 145 0
      src/api/supplier/contract/types.ts
  35. 75 0
      src/api/supplier/contractsupply/index.ts
  36. 135 0
      src/api/supplier/contractsupply/types.ts
  37. 63 0
      src/api/supplier/customerCategory/enterpriseScale/index.ts
  38. 75 0
      src/api/supplier/customerCategory/enterpriseScale/types.ts
  39. 63 0
      src/api/supplier/customerCategory/industryCategory/index.ts
  40. 75 0
      src/api/supplier/customerCategory/industryCategory/types.ts
  41. 357 0
      src/api/supplier/info/index.ts
  42. 910 0
      src/api/supplier/info/types.ts
  43. 63 0
      src/api/supplier/qualification/index.ts
  44. 171 0
      src/api/supplier/qualification/types.ts
  45. 63 0
      src/api/supplier/qualificationFile/index.ts
  46. 131 0
      src/api/supplier/qualificationFile/types.ts
  47. 88 0
      src/api/supplier/supplierauthorize/index.ts
  48. 306 0
      src/api/supplier/supplierauthorize/types.ts
  49. 80 0
      src/api/system/addressarea/index.ts
  50. 98 0
      src/api/system/addressarea/types.ts
  51. 55 0
      src/api/system/bank/index.ts
  52. 120 0
      src/api/system/bank/types.ts
  53. 55 0
      src/api/system/invoiceType/index.ts
  54. 80 0
      src/api/system/invoiceType/types.ts
  55. 74 0
      src/api/system/level/index.ts
  56. 62 0
      src/api/system/level/types.ts
  57. 74 0
      src/api/system/type/index.ts
  58. 62 0
      src/api/system/type/types.ts
  59. 13 0
      src/router/index.ts
  60. 62 0
      src/store/modules/user.ts
  61. 393 0
      src/utils/regionData.ts
  62. 608 0
      src/views/supplier/aptitude/index.vue
  63. 1564 0
      src/views/supplier/author/edit.vue
  64. 405 0
      src/views/supplier/author/index.vue
  65. 3581 0
      src/views/supplier/info/index.vue

+ 41 - 0
INSTALL_ELEMENT_CHINA_AREA_DATA.md

@@ -0,0 +1,41 @@
+# 安装 element-china-area-data
+
+为了使用 Element Plus 的中国地区数据,你需要安装 `element-china-area-data` 包。
+
+## 安装命令
+
+```bash
+npm install element-china-area-data
+```
+
+或者使用 yarn:
+
+```bash
+yarn add element-china-area-data
+```
+
+## 使用说明
+
+安装完成后,代码中已经配置好了:
+
+1. **基本信息页面的详细地址选择器** - 使用 `element-china-area-data` 提供的地区数据
+2. **地址管理的省市区选择器** - 使用 `element-china-area-data` 提供的地区数据
+3. **供货区域选择器** - 仍使用原来的 API 数据结构(因为涉及复杂的后端逻辑)
+
+## 数据结构
+
+`element-china-area-data` 的数据结构:
+```javascript
+{
+  value: "110000", // 地区代码
+  label: "北京市", // 地区名称
+  children: [...]  // 子级地区
+}
+```
+
+## 优势
+
+- 📦 无需网络请求,数据本地化
+- 🚀 加载速度更快
+- 📊 数据结构标准化
+- 🔄 定期更新地区数据

+ 1 - 0
package.json

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

+ 75 - 0
src/api/company/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;
+}

+ 63 - 0
src/api/product/attributes/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { AttributesVO, AttributesForm, AttributesQuery } from '@/api/product/attributes/types';
+
+/**
+ * 查询产品属性定义(用于动态属性配置)列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listAttributes = (query?: AttributesQuery): AxiosPromise<AttributesVO[]> => {
+  return request({
+    url: '/product/attributes/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询产品属性定义(用于动态属性配置)详细
+ * @param id
+ */
+export const getAttributes = (id: string | number): AxiosPromise<AttributesVO> => {
+  return request({
+    url: '/product/attributes/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增产品属性定义(用于动态属性配置)
+ * @param data
+ */
+export const addAttributes = (data: AttributesForm) => {
+  return request({
+    url: '/product/attributes',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改产品属性定义(用于动态属性配置)
+ * @param data
+ */
+export const updateAttributes = (data: AttributesForm) => {
+  return request({
+    url: '/product/attributes',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除产品属性定义(用于动态属性配置)
+ * @param id
+ */
+export const delAttributes = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/product/attributes/' + id,
+    method: 'delete'
+  });
+};

+ 171 - 0
src/api/product/attributes/types.ts

@@ -0,0 +1,171 @@
+  export interface AttributesVO {
+  /**
+   * 主键,自增ID
+   */
+  id: string | number;
+
+  /**
+   * 关联的产品分类id
+   */
+  categoryId: string | number;
+
+  /**
+   * 产品分类名称
+   */
+  categoryName?: string;
+
+  /**
+   * 属性编码(用于系统识别)
+   */
+  productAttributesCode: string;
+
+  /**
+   * 属性显示名称
+   */
+  productAttributesName: string;
+
+  /**
+   * 是否可选:0=单选属性,1=唯一属性,2=复选属性
+   */
+  isOptional: string; 
+
+  /**
+   * 属性录入方式(1=手工录入,2=从列表中选择)
+   */
+  entryMethod: string;
+
+  /**
+   * 是否用于商品筛选:1=是,0=否
+   */
+  isFilter: string;
+
+  /**
+   * 预定义属性值列表(逗号分隔或JSON)
+   */
+  attributesList: string;
+
+  /**
+   * 是否必填: 1=是, 0=否
+   */
+  required: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+}
+
+export interface AttributesForm extends BaseEntity {
+  /**
+   * 主键,自增ID
+   */
+  id?: string | number;
+
+  /**
+   * 关联的产品分类id
+   */
+  categoryId?: string | number;
+
+  /**
+   * 属性编码(用于系统识别)
+   */
+  productAttributesCode?: string;
+
+  /**
+   * 属性显示名称
+   */
+  productAttributesName?: string;
+
+  /**
+   * 是否可选:0=单选属性,1=唯一属性,2=复选属性
+   */
+  isOptional?: string | number;
+
+  /**
+   * 属性录入方式(manual=手工录入,select=从列表中选择)
+   */
+  entryMethod?: string;
+
+  /**
+   * 是否用于商品筛选:1=是,0=否
+   */
+  isFilter?: string | number;
+
+  /**
+   * 预定义属性值列表(逗号分隔或JSON)
+   */
+  attributesList?: string;
+
+  /**
+   * 是否必填: 1=是, 0=否
+   */
+  required?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+}
+
+export interface AttributesQuery extends PageQuery {
+
+  /**
+   * 关联的产品分类id
+   */
+  categoryId?: string | number;
+
+  /**
+   * 分类名称(用于模糊搜索)
+   */
+  categoryName?: string;
+
+  /**
+   * 属性编码(用于系统识别)
+   */
+  productAttributesCode?: string;
+
+  /**
+   * 属性显示名称
+   */
+  productAttributesName?: string;
+
+  /**
+   * 是否可选:0=单选属性,1=唯一属性,2=复选属性
+   */
+  isOptional?: string;
+
+  /**
+   * 属性录入方式(manual=手工录入,select=从列表中选择)
+   */
+  entryMethod?: string;
+
+  /**
+   * 是否用于商品筛选:1=是,0=否
+   */
+  isFilter?: string;
+
+  /**
+   * 预定义属性值列表(逗号分隔或JSON)
+   */
+  attributesList?: string;
+
+  /**
+   * 是否必填: 1=是, 0=否
+   */
+  required?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 181 - 0
src/api/product/base/index.ts

@@ -0,0 +1,181 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { BaseVO, BaseForm, BaseQuery } from '@/api/product/base/types';
+import { CategoryQuery, categoryTreeVO, CategoryVO } from '../category/types';
+import { BrandQuery, BrandVO } from '../brand/types';
+import { AttributesVO } from '../attributes/types';
+import { EnsureQuery, EnsureVO } from '../ensure/types';
+import { AfterSalesQuery, AfterSalesVO } from '../afterSales/types';
+import { UnitQuery, UnitVO } from '../unit/types';
+
+/**
+ * 查询产品基础信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listBase = (query?: BaseQuery): AxiosPromise<BaseVO[]> => {
+  return request({
+    url: '/product/base/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询产品基础信息详细
+ * @param id
+ */
+export const getBase = (id: string | number): AxiosPromise<BaseVO> => {
+  return request({
+    url: '/product/base/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增产品基础信息
+ * @param data
+ */
+export const addBase = (data: BaseForm) => {
+  return request({
+    url: '/product/base',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改产品基础信息
+ * @param data
+ */
+export const updateBase = (data: BaseForm) => {
+  return request({
+    url: '/product/base',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除产品基础信息
+ * @param id
+ */
+export const delBase = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/product/base/' + id,
+    method: 'delete'
+  });
+};
+
+/**
+ * 获取产品分类树
+ * @param query
+ * @returns {*}
+ */
+export const categoryTree = (query?: CategoryQuery): AxiosPromise<categoryTreeVO[]> => {
+  return request({
+    url: '/product/base/categoryTree',
+    method: 'get',
+    params: query
+  });
+};
+/**
+ * 查询产品分类信息列表
+ * @param query
+ * @returns {*}
+ */
+export const categoryList = (query?: CategoryQuery): AxiosPromise<CategoryVO[]> => {
+  return request({
+    url: '/product/base/categoryList',
+    method: 'get',
+    params: query
+  });
+};
+/**
+ * 查询产品品牌信息列表
+ * @param query
+ * @returns {*}
+ */
+export const brandList = (query?: BrandQuery): AxiosPromise<BrandVO[]> => {
+  return request({
+    url: '/product/base/brandList',
+    method: 'get',
+    params: query
+  });
+};
+/**
+ * 查询产品分类下的属性列表
+ * @param id
+ * @returns {*}
+ */
+export const categoryAttributeList = (id: string | number): AxiosPromise<AttributesVO[]> => {
+  return request({
+    url: '/product/base/getProductAttributeList/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 查询产品服务保障列表
+ * @param query
+ * @returns {*}
+ */
+export const getServiceList = (query?: EnsureQuery): AxiosPromise<EnsureVO[]> => {
+  return request({
+    url: '/product/base/getServiceList',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 获取售后服务信息列表
+ * @param query
+ * @returns {*}
+ */
+export const getAfterSaleList = (query?: AfterSalesQuery): AxiosPromise<AfterSalesVO[]> => {
+  return request({
+    url: '/product/base/getAfterSalesList',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 获取单位信息列表
+ * @param query
+ * @returns {*}
+ */
+export const getUnitList = (query?: UnitQuery): AxiosPromise<UnitVO[]> => {
+  return request({
+    url: '/product/base/getUnitList',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 商品审核
+ * @param data 审核信息(包含id、productReviewStatus、reviewComments)
+ */
+export const reviewBase = (data: BaseForm) => {
+  return request({
+    url: '/product/base/review',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 商品上下架 状态变更
+ * @param data 审核信息(包含id、productStatus、shelfComments)
+ */
+export const shelfReview = (data: BaseForm) => {
+  return request({
+    url: '/product/base/shelfReview',
+    method: 'post',
+    data: data
+  });
+};
+

+ 804 - 0
src/api/product/base/types.ts

@@ -0,0 +1,804 @@
+export interface BaseVO {
+  /**
+   * 主键,自增ID
+   */
+  id: string | number;
+
+  /**
+   * 产品编号
+   */
+  productNo: string;
+
+  /**
+   * 项目名称
+   */
+  itemName: string;
+
+  /**
+   * 品牌id
+   */
+  brandId: string | number;
+
+  /**
+   * 顶级分类id
+   */
+  topCategoryId: string | number;
+
+  /**
+   * 中级分类id
+   */
+  mediumCategoryId: string | number;
+
+  /**
+   * 底层分类id
+   */
+  bottomCategoryId: string | number;
+
+  /**
+   * 单位id
+   */
+  unitId: string | number;
+
+  /**
+   * 产品图片URL
+   */
+  productImage: string;
+
+  /**
+   * 产品图片URLUrl
+   */
+  productImageUrl: string;
+  /**
+   * 是否自营(1=是,0=否)
+   */
+  isSelf: string;
+
+  /**
+   * 商品类型 1=默认类型,2精选商品,3=停售商品
+   * */
+  productCategory?: number;
+
+  /**
+   * 产品审核状态 0=待采购审核,1=审核通过,2=驳回,3=待营销审核
+   */
+  productReviewStatus: string;
+
+  /**
+   * 首页推荐:1=推荐,0=不推荐
+   */
+  homeRecommended: string;
+
+  /**
+   * 分类推荐:1=推荐,0=不推荐
+   */
+  categoryRecommendation: string;
+
+  /**
+   * 购物车推荐:1=推荐,0=不推荐
+   */
+  cartRecommendation: string;
+
+  /**
+   * 推荐产品顺序
+   */
+  recommendedProductOrder: number;
+
+  /**
+   * 是否热门:1=是,0=否
+   */
+  isPopular: string;
+
+  /**
+   * 是否新品:1=是,0=否
+   */
+  isNew: string;
+
+  /**
+   * 商品状态:1=已上架,0=下架,2=上架中
+   */
+  productStatus: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource: string;
+
+  /**
+   * 市场价
+   */
+  marketPrice: number;
+
+  /**
+   * 会员价格
+   */
+  memberPrice: number;
+
+  /**
+   * 最低销售价格
+   */
+  minSellingPrice: number;
+
+  /**
+   * 采购价格
+   */
+  purchasingPrice: number;
+
+  /**
+   * 暂估毛利率
+   */
+  tempGrossMargin: number;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+  /**
+   * 主库简介
+   */
+  mainLibraryIntro?: string;
+
+  /**
+   * 售后服务
+   */
+  afterSalesService?: string;
+
+  /**
+   * 服务保障 支持多选,分隔 (存储服务保障ID列表,如: "1,2,3")
+   */
+  serviceGuarantee?: string;
+
+  /**
+   * 安装服务 - 免费安装
+   */
+  freeInstallation?: string;
+
+  /**
+   * 市场价
+   */
+  midRangePrice?: number;
+
+  /**
+   * 平档价
+   */
+  standardPrice?: number;
+
+  /**
+   * 最低售价
+   */
+  certificatePrice?: number;
+
+  /**
+   * 售价验证量
+   */
+  priceVerificationQuantity?: string;
+
+  /**
+   * 采购价
+   */
+  purchasePrice?: number;
+
+  /**
+   * 暂估采购价
+   */
+  estimatedPurchasePrice?: number;
+
+  /**
+   * 产品性质
+   */
+  productNature?: string;
+
+  /**
+   * 采购人员
+   */
+  purchasingPersonnel?: string;
+
+  /**
+   * 旧属性类型
+   */
+  oldAttributeType?: string;
+
+  /**
+   * 录入套数
+   */
+  entrySetCount?: string;
+
+  /**
+   * 商品主图
+   */
+  mainImage?: string;
+
+  /**
+   * 商品详情 - 电脑端
+   */
+  pcDetail?: string;
+
+  /**
+   * 商品详情 - 移动端
+   */
+  mobileDetail?: string;
+
+  /**
+   * 税率
+   */
+  taxRate?: number;
+
+  /**
+   * 币种
+   */
+  currency?: string;
+
+  /**
+   * 最低起订量
+   */
+  minOrderQuantity?: number;
+
+  /**
+   * 审核意见
+   */
+  reviewComments?: string;
+
+  /**
+   * 商品属性值(JSON字符串)
+   */
+  attributesList?: string;
+
+  /**
+   * 品牌名称
+   */
+  brandName?: string;
+
+  /**
+   * 分类名称
+   */
+  categoryName?: string;
+
+  /**
+   * 单位名称
+   */
+  unitName?: string;
+
+  /**
+   * 可用库存数
+   */
+  availableStock?: number;
+
+  /**
+   * 实际库存
+   */
+  actualStock?: number;
+
+  /**
+   * 虚拟库存
+   */
+  virtualStock?: number;
+
+  /**
+   * 对接状态
+   */
+  connectStatus?: string;
+
+}
+
+export interface BaseForm extends BaseEntity {
+  /**
+   * 主键,自增ID
+   */
+  id?: string | number;
+
+  /**
+   * 产品编号
+   */
+  productNo?: string;
+
+  /**
+   * 项目名称
+   */
+  itemName?: string;
+
+  /**
+   * 品牌id
+   */
+  brandId?: string | number;
+
+  /**
+   * 顶级分类id
+   */
+  topCategoryId?: string | number;
+
+  /**
+   * 中级分类id
+   */
+  mediumCategoryId?: string | number;
+
+  /**
+   * 底层分类id
+   */
+  bottomCategoryId?: string | number;
+
+  /**
+   * 单位id
+   */
+  unitId?: string | number;
+
+  /**
+   * 产品图片URL
+   */
+  productImage?: string;
+
+  /**
+   * 是否自营(1=是,0=否)
+   */
+  isSelf?: number;
+
+  /**
+   * 商品类型 1=默认类型,2精选商品,3=停售商品
+   * */
+  productCategory?: number;
+
+  /**
+   * 产品审核状态 0=待采购审核,1=审核通过,2=驳回,3=待营销审核
+   */
+  productReviewStatus?: number;
+
+  /**
+   * 首页推荐:1=推荐,0=不推荐
+   */
+  homeRecommended?: number;
+
+  /**
+   * 分类推荐:1=推荐,0=不推荐
+   */
+  categoryRecommendation?: number;
+
+  /**
+   * 购物车推荐:1=推荐,0=不推荐
+   */
+  cartRecommendation?: number;
+
+  /**
+   * 推荐产品顺序
+   */
+  recommendedProductOrder?: number;
+
+  /**
+   * 是否热门:1=是,0=否
+   */
+  isPopular?: number;
+
+  /**
+   * 是否新品:1=是,0=否
+   */
+  isNew?: number;
+
+  /**
+   * 商品状态:1=已上架,0=下架,2=上架中
+   */
+  productStatus?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+  /**
+   * 款号
+   */
+  styleNo?: string;
+
+  /**
+   * A10产品名称
+   */
+  a10ProductName?: string;
+
+  /**
+   * 规格型号
+   */
+  specification?: string;
+
+  /**
+   * UPC(S)条码
+   */
+  upcBarcode?: string;
+
+  /**
+   * 发票名称
+   */
+  invoiceName?: string;
+
+  /**
+   * 发票规格
+   */
+  invoiceSpec?: string;
+
+  /**
+   * 产品品牌
+   */
+  productBrand?: string;
+
+  /**
+   * 段号
+   */
+  sectionNo?: string;
+
+  /**
+   * 包装规格
+   */
+  packagingSpec?: string;
+
+  /**
+   * 采用基准
+   */
+  adoptionStandard?: string;
+
+  /**
+   * 采品性质
+   */
+  purchaseNature?: string;
+
+  /**
+   * 参考链接
+   */
+  referenceLink?: string;
+
+  /**
+   * 商品重量
+   */
+  weight?: string;
+
+  /**
+   * 重量单位
+   */
+  weightUnit?: string;
+
+  /**
+   * 商品体积
+   */
+  volume?: string;
+
+  /**
+   * 体积单位
+   */
+  volumeUnit?: string;
+
+  /**
+   * 主库简介
+   */
+  mainLibraryIntro?: string;
+
+  /**
+   * 售后服务
+   */
+  afterSalesService?: string;
+
+  /**
+   * 服务保障 支持多选,分隔 (存储服务保障ID列表,如: "1,2,3")
+   */
+  serviceGuarantee?: string;
+
+  /**
+   * 安装服务 - 免费安装
+   */
+  freeInstallation?: string;
+
+  /**
+   * 市场价
+   */
+  midRangePrice?: number;
+
+  /**
+   * 平档价
+   */
+  standardPrice?: number;
+
+  /**
+   * 最低售价
+   */
+  certificatePrice?: number;
+
+  /**
+   * 售价验证量
+   */
+  priceVerificationQuantity?: string;
+
+  /**
+   * 采购价
+   */
+  purchasePrice?: number;
+
+  /**
+   * 暂估采购价
+   */
+  estimatedPurchasePrice?: number;
+
+  /**
+   * 产品性质
+   */
+  productNature?: string;
+
+  /**
+   * 采购人员
+   */
+  purchasingPersonnel?: string;
+
+  /**
+   * 旧属性类型
+   */
+  oldAttributeType?: string;
+
+  /**
+   * 录入套数
+   */
+  entrySetCount?: string;
+
+  /**
+   * 商品主图
+   */
+  mainImage?: string;
+
+  /**
+   * 商品详情 - 电脑端
+   */
+  pcDetail?: string;
+
+  /**
+   * 商品详情 - 移动端
+   */
+  mobileDetail?: string;
+
+  /**
+   * 税率
+   */
+  taxRate?: number;
+
+  /**
+   * 币种
+   */
+  currency?: string;
+
+  /**
+   * 最低起订量
+   */
+  minOrderQuantity?: number;
+
+  /**
+   * 是否可定制
+   */
+  customizable?: boolean;
+
+  /**
+   * 定制方式(逗号分隔)
+   */
+  customizedStyle?: string;
+
+  /**
+   * 定制工艺(逗号分隔)
+   */
+  customizedCraft?: string;
+
+  /**
+   * 定制说明
+   */
+  customDescription?: string;
+
+  /**
+   * 定制详情列表(JSON字符串)
+   */
+  customDetailsJson?: string;
+
+  /**
+   * 销售量/销量人气
+   */
+  salesVolume?: number;
+
+  /**
+   * 商品属性值(JSON字符串)
+   */
+  attributesList?: string;
+
+  /**
+   * 审核意见
+   */
+  reviewComments?: string;
+
+  /**
+   * 上下架审核意见
+   */
+  shelfComments?: string;
+
+}
+
+export interface BaseQuery extends PageQuery {
+
+  /**
+   * 搜索文本(商品名称/商品编号)
+   */
+  searchText?: string;
+
+  /**
+   * 产品编号
+   */
+  productNo?: string;
+
+  /**
+   * 项目名称
+   */
+  itemName?: string;
+
+  /**
+   * 品牌id
+   */
+  brandId?: string | number;
+
+  /**
+   * 商品品牌名称
+   */
+  brandName?: string;
+
+  /**
+   * 顶级分类id
+   */
+  topCategoryId?: string | number;
+
+  /**
+   * 中级分类id
+   */
+  mediumCategoryId?: string | number;
+
+  /**
+   * 底层分类id
+   */
+  bottomCategoryId?: string | number;
+
+  /**
+   * 单位id
+   */
+  unitId?: string | number;
+
+  /**
+   * 产品图片URL
+   */
+  productImage?: string;
+
+  /**
+   * 是否自营(1=是,0=否)
+   */
+  isSelf?: number;
+
+  /**
+   * 商品类型 1=默认类型,2精选商品,3=停售商品
+   * */
+  productCategory?: number;
+
+  /**
+   * 产品审核状态 0=待采购审核,1=审核通过,2=驳回,3=待营销审核
+   */
+  productReviewStatus?: number;
+
+  /**
+   * 首页推荐:1=推荐,0=不推荐
+   */
+  homeRecommended?: number;
+
+  /**
+   * 分类推荐:1=推荐,0=不推荐
+   */
+  categoryRecommendation?: number;
+
+  /**
+   * 购物车推荐:1=推荐,0=不推荐
+   */
+  cartRecommendation?: number;
+
+  /**
+   * 推荐产品顺序
+   */
+  recommendedProductOrder?: number;
+
+  /**
+   * 是否热门:1=是,0=否
+   */
+  isPopular?: number;
+
+  /**
+   * 是否新品:1=是,0=否
+   */
+  isNew?: number;
+
+  /**
+   * 商品状态:1=已上架,0=下架,2=上架中
+   */
+  productStatus?: number;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 商品标签
+   */
+  productTag?: string;
+
+  /**
+   * 采购性质
+   */
+  purchaseNature?: string;
+
+  /**
+   * 供应商类型
+   */
+  supplierType?: string;
+
+  /**
+   * 供应商性质
+   */
+  supplierNature?: string;
+
+  /**
+   * 项目组织
+   */
+  projectOrg?: string;
+
+  /**
+   * 游标分页 - 上次看到的ID
+   */
+  lastSeenId?: string | number;
+
+  /**
+   * 游标分页 - 第一个ID(用于上一页)
+   */
+  firstSeenId?: string | number;
+
+  /**
+   * 游标分页方向 0=上一页,1=下一页
+   */
+  way?: number;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+/**
+ * 状态数量统计视图对象
+ */
+export class StatusCountVo {
+  /**
+   * 总数
+   */
+  total: number | null = null;
+
+  /**
+   * 上架数
+   */
+  onSale: number | null = null;
+
+  /**
+   * 下架数
+   */
+  offSale: number | null = null;
+
+  /**
+   * 待审核数量
+   */
+  waitAudit: number | null = null;
+
+  /**
+   * 通过数量
+   */
+  auditPass: number | null = null;
+
+  /**
+   * 驳回数量
+   */
+  auditReject: number | null = null;
+}
+
+
+

+ 63 - 0
src/api/product/brand/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { BrandVO, BrandForm, BrandQuery } from '@/api/product/brand/types';
+
+/**
+ * 查询产品品牌信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listBrand = (query?: BrandQuery): AxiosPromise<BrandVO[]> => {
+  return request({
+    url: '/product/brand/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询产品品牌信息详细
+ * @param id
+ */
+export const getBrand = (id: string | number): AxiosPromise<BrandVO> => {
+  return request({
+    url: '/product/brand/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增产品品牌信息
+ * @param data
+ */
+export const addBrand = (data: BrandForm) => {
+  return request({
+    url: '/product/brand',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改产品品牌信息
+ * @param data
+ */
+export const updateBrand = (data: BrandForm) => {
+  return request({
+    url: '/product/brand',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除产品品牌信息
+ * @param id
+ */
+export const delBrand = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/product/brand/' + id,
+    method: 'delete'
+  });
+};

+ 315 - 0
src/api/product/brand/types.ts

@@ -0,0 +1,315 @@
+export interface BrandVO {
+  /**
+   * 主键
+   */
+  id: string | number;
+
+  /**
+   * 品牌编号(唯一标识)
+   */
+  brandNo: string;
+
+  /**
+   * 品牌中文名称
+   */
+  brandName: string;
+
+  /**
+   * 品牌首字母缩写(如拼音首字母)
+   */
+  brandInitials: string;
+
+  /**
+   * 品牌英文名称
+   */
+  brandEnglishName: string;
+
+  /**
+   * 推荐值(数值越大越靠前)
+   */
+  recommendValue: number;
+
+  /**
+   * 品牌Logo图片路径或URL
+   */
+  brandLogo: string;
+
+  /**
+   * 品牌标题(用于展示)
+   */
+  brandTitle: string;
+
+  /**
+   * 品牌大图(横幅/封面图)
+   */
+  brandBigImage: string;
+
+  /**
+   * 品牌大图(横幅/封面图)Url
+   */
+  brandBigImageUrl: string;
+  /**
+   * 品牌故事(简介文本)
+   */
+  brandStory: string;
+
+  /**
+   * 是否显示(1=显示,0=隐藏)
+   */
+  isShow: number;
+
+  /**
+   * 品牌注册人
+   */
+  brandRegistrant: string;
+
+  /**
+   * 许可证编号
+   */
+  license: string;
+
+  /**
+   * 注册证书编号
+   */
+  registrationCertificate: string;
+
+  /**
+   * 证书/许可过期时间
+   */
+  expireTime: string;
+
+  /**
+   * 品牌描述(较长文本)
+   */
+  brandDescribe: string;
+
+  /**
+   * 展示位置(如首页、分类页等)
+   */
+  position: string;
+
+  /**
+   * 关注度/收藏数(默认为0)
+   */
+  care: number;
+
+  /**
+   * 数据来源
+   */
+  dataSource: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+}
+
+export interface BrandForm extends BaseEntity {
+  /**
+   * 主键
+   */
+  id?: string | number;
+
+  /**
+   * 品牌编号(唯一标识)
+   */
+  brandNo?: string;
+
+  /**
+   * 品牌中文名称
+   */
+  brandName?: string;
+
+  /**
+   * 品牌首字母缩写(如拼音首字母)
+   */
+  brandInitials?: string;
+
+  /**
+   * 品牌英文名称
+   */
+  brandEnglishName?: string;
+
+  /**
+   * 推荐值(数值越大越靠前)
+   */
+  recommendValue?: number;
+
+  /**
+   * 品牌Logo图片路径或URL
+   */
+  brandLogo?: string;
+
+  /**
+   * 品牌标题(用于展示)
+   */
+  brandTitle?: string;
+
+  /**
+   * 品牌大图(横幅/封面图)
+   */
+  brandBigImage?: string;
+
+  /**
+   * 品牌故事(简介文本)
+   */
+  brandStory?: string;
+
+  /**
+   * 是否显示(1=显示,0=隐藏)
+   */
+  isShow?: number;
+
+  /**
+   * 品牌注册人
+   */
+  brandRegistrant?: string;
+
+  /**
+   * 许可证编号
+   */
+  license?: string;
+
+  /**
+   * 注册证书编号
+   */
+  registrationCertificate?: string;
+
+  /**
+   * 证书/许可过期时间
+   */
+  expireTime?: string;
+
+  /**
+   * 品牌描述(较长文本)
+   */
+  brandDescribe?: string;
+
+  /**
+   * 展示位置(如首页、分类页等)
+   */
+  position?: string;
+
+  /**
+   * 关注度/收藏数(默认为0)
+   */
+  care?: number;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+}
+
+export interface BrandQuery extends PageQuery {
+
+  /**
+   * 品牌编号(唯一标识)
+   */
+  brandNo?: string;
+
+  /**
+   * 品牌中文名称
+   */
+  brandName?: string;
+
+  /**
+   * 品牌首字母缩写(如拼音首字母)
+   */
+  brandInitials?: string;
+
+  /**
+   * 品牌英文名称
+   */
+  brandEnglishName?: string;
+
+  /**
+   * 推荐值(数值越大越靠前)
+   */
+  recommendValue?: number;
+
+  /**
+   * 品牌Logo图片路径或URL
+   */
+  brandLogo?: string;
+
+  /**
+   * 品牌标题(用于展示)
+   */
+  brandTitle?: string;
+
+  /**
+   * 品牌大图(横幅/封面图)
+   */
+  brandBigImage?: string;
+
+  /**
+   * 品牌故事(简介文本)
+   */
+  brandStory?: string;
+
+  /**
+   * 是否显示(1=显示,0=隐藏)
+   */
+  isShow?: number;
+
+  /**
+   * 品牌注册人
+   */
+  brandRegistrant?: string;
+
+  /**
+   * 许可证编号
+   */
+  license?: string;
+
+  /**
+   * 注册证书编号
+   */
+  registrationCertificate?: string;
+
+  /**
+   * 证书/许可过期时间
+   */
+  expireTime?: string;
+
+  /**
+   * 品牌描述(较长文本)
+   */
+  brandDescribe?: string;
+
+  /**
+   * 展示位置(如首页、分类页等)
+   */
+  position?: string;
+
+  /**
+   * 关注度/收藏数(默认为0)
+   */
+  care?: number;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 84 - 0
src/api/product/category/index.ts

@@ -0,0 +1,84 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { CategoryVO, CategoryForm, CategoryQuery } from '@/api/product/category/types';
+
+/**
+ * 查询产品分类列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listCategory = (query?: Partial<CategoryQuery>): AxiosPromise<CategoryVO[]> => {
+  return request({
+    url: '/product/category/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询产品分类详细
+ * @param id
+ */
+export const getCategory = (id: string | number): AxiosPromise<CategoryVO> => {
+  return request({
+    url: '/product/category/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增产品分类
+ * @param data
+ */
+export const addCategory = (data: CategoryForm) => {
+  return request({
+    url: '/product/category',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改产品分类
+ * @param data
+ */
+export const updateCategory = (data: CategoryForm) => {
+  return request({
+    url: '/product/category',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除产品分类
+ * @param id
+ */
+export const delCategory = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/product/category/' + id,
+    method: 'delete'
+  });
+};
+
+/**
+ * 查询产品分类列表(排除节点)
+ * @param id
+ */
+export const listCategoryExcludeChild = (id: string | number): AxiosPromise<CategoryVO[]> => {
+  return request({
+    url: '/product/category/tree/exclude/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 获取产品分类列表
+ */
+export const getProductCategoryList = () => {
+  return request({
+    url: '/product/category/getProductCategoryList',
+    method: 'get'
+  });
+};

+ 402 - 0
src/api/product/category/types.ts

@@ -0,0 +1,402 @@
+export interface CategoryVO {
+  /**
+   * 主键
+   */
+  id: string | number;
+
+  /**
+   * 分类编号
+   */
+  categoryNo: string;
+
+  /**
+   * 分类名称
+   */
+  categoryName: string;
+
+  /**
+   * 父级分类ID
+   */
+  parentId: string | number;
+
+  /**
+   * 父级分类名称
+   */
+  parentName?: string;
+
+  /**
+   * 祖籍列表
+   */
+  ancestors: string;
+
+  /**
+   * 分类层级(1=一级,2=二级, 3三级)
+   */
+  classLevel: number;
+
+  /**
+   * 是否显示(1=显示,0=隐藏)
+   */
+  isShow: number;
+
+  /**
+   * 是否在GPS中显示
+   */
+  isShowGps: number;
+
+  /**
+   * 折扣率(可能为JSON或文本)
+   */
+  discountRate: number;
+
+  /**
+   * 拼音码(用于快速检索)
+   */
+  pyCode: string;
+
+  /**
+   * 分类描述
+   */
+  classDescription: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource: string;
+
+  /**
+   * 自定义标签1
+   */
+  oneLable1: string;
+
+  /**
+   * 自定义标签2
+   */
+  oneLable2: string;
+
+  /**
+   * 自定义链接1
+   */
+  oneLink1: string;
+
+  /**
+   * 自定义链接2
+   */
+  oneLink2: string;
+
+  /**
+   * 排序值,默认为0
+   */
+  sort: number;
+
+  /**
+   * 颜色(如CSS颜色值)
+   */
+  color: string;
+
+  /**
+   * 采购编号
+   */
+  purchaseNo: string;
+
+  /**
+   * 采购名称
+   */
+  purchaseName: string;
+
+  /**
+   * 采购负责人编号
+   */
+  purchaseManagerNo: string;
+
+  /**
+   * 采购负责人姓名
+   */
+  purchaseManagerName: string;
+
+  /**
+   * 所属平台(0=Web, 1=小程序)
+   */
+  platform: number;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+  /**
+   * 子级分类
+   */
+  children?: CategoryVO[];
+
+  /**
+   * 是否有子节点(用于懒加载)
+   */
+  hasChildren?: boolean;
+}
+
+export interface CategoryForm extends BaseEntity {
+  /**
+   * 主键
+   */
+  id?: string | number;
+
+  /**
+   * 分类编号
+   */
+  categoryNo?: string;
+
+  /**
+   * 分类名称
+   */
+  categoryName?: string;
+
+  /**
+   * 父级分类ID
+   */
+  parentId?: string | number;
+
+  /**
+   * 父级分类名称
+   */
+  parentName?: string;
+
+  /**
+   * 祖籍列表
+   */
+  ancestors?: string;
+
+  /**
+   * 分类层级(1=一级,2=二级, 3三级)
+   */
+  classLevel?: number;
+
+  /**
+   * 是否显示(1=显示,0=隐藏)
+   */
+  isShow?: number;
+
+  /**
+   * 是否在GPS中显示
+   */
+  isShowGps?: number;
+
+  /**
+   * 折扣率(可能为JSON或文本)
+   */
+  discountRate?: number;
+
+  /**
+   * 拼音码(用于快速检索)
+   */
+  pyCode?: string;
+
+  /**
+   * 分类描述
+   */
+  classDescription?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 自定义标签1
+   */
+  oneLable1?: string;
+
+  /**
+   * 自定义标签2
+   */
+  oneLable2?: string;
+
+  /**
+   * 自定义链接1
+   */
+  oneLink1?: string;
+
+  /**
+   * 自定义链接2
+   */
+  oneLink2?: string;
+
+  /**
+   * 排序值,默认为0
+   */
+  sort?: number;
+
+  /**
+   * 颜色(如CSS颜色值)
+   */
+  color?: string;
+
+  /**
+   * 采购编号
+   */
+  purchaseNo?: string;
+
+  /**
+   * 采购名称
+   */
+  purchaseName?: string;
+
+  /**
+   * 采购负责人编号
+   */
+  purchaseManagerNo?: string;
+
+  /**
+   * 采购负责人姓名
+   */
+  purchaseManagerName?: string;
+
+  /**
+   * 所属平台(0=Web, 1=小程序)
+   */
+  platform?: number;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+}
+
+export interface CategoryQuery extends PageQuery {
+
+  /**
+   * 分类编号
+   */
+  categoryNo?: string;
+
+  /**
+   * 分类名称
+   */
+  categoryName?: string;
+
+  /**
+   * 父级分类ID
+   */
+  parentId?: string | number;
+
+  /**
+   * 祖籍列表
+   */
+  ancestors?: string;
+
+  /**
+   * 分类层级(1=一级,2=二级, 3三级)
+   */
+  classLevel?: number;
+
+  /**
+   * 是否显示(1=显示,0=隐藏)
+   */
+  isShow?: number;
+
+  /**
+   * 是否在GPS中显示
+   */
+  isShowGps?: number;
+
+  /**
+   * 折扣率(可能为JSON或文本)
+   */
+  discountRate?: number;
+
+  /**
+   * 拼音码(用于快速检索)
+   */
+  pyCode?: string;
+
+  /**
+   * 分类描述
+   */
+  classDescription?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 自定义标签1
+   */
+  oneLable1?: string;
+
+  /**
+   * 自定义标签2
+   */
+  oneLable2?: string;
+
+  /**
+   * 自定义链接1
+   */
+  oneLink1?: string;
+
+  /**
+   * 自定义链接2
+   */
+  oneLink2?: string;
+
+  /**
+   * 排序值,默认为0
+   */
+  sort?: number;
+
+  /**
+   * 颜色(如CSS颜色值)
+   */
+  color?: string;
+
+  /**
+   * 采购编号
+   */
+  purchaseNo?: string;
+
+  /**
+   * 采购名称
+   */
+  purchaseName?: string;
+
+  /**
+   * 采购负责人编号
+   */
+  purchaseManagerNo?: string;
+
+  /**
+   * 采购负责人姓名
+   */
+  purchaseManagerName?: string;
+
+  /**
+   * 所属平台(0=Web, 1=小程序)
+   */
+  platform?: number;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+/**
+ * 部门类型
+ */
+export interface categoryTreeVO extends BaseEntity {
+  id: number | string;
+  label: string;
+  parentId: number | string;
+  weight: number;
+  children: categoryTreeVO[];
+  isShow: '';
+}
+
+
+

+ 63 - 0
src/api/product/contractproduct/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { ContracproductVO, ContracproductForm, ContracproductQuery } from '@/api/product/contractproduct/types';
+
+/**
+ * 查询合同产品关联列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listContracproduct = (query?: ContracproductQuery): AxiosPromise<ContracproductVO[]> => {
+  return request({
+    url: '/product/contracproduct/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询合同产品关联详细
+ * @param id
+ */
+export const getContracproduct = (id: string | number): AxiosPromise<ContracproductVO> => {
+  return request({
+    url: '/product/contracproduct/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增合同产品关联
+ * @param data
+ */
+export const addContracproduct = (data: ContracproductForm) => {
+  return request({
+    url: '/product/contracproduct',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改合同产品关联
+ * @param data
+ */
+export const updateContracproduct = (data: ContracproductForm) => {
+  return request({
+    url: '/product/contracproduct',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除合同产品关联
+ * @param id
+ */
+export const delContracproduct = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/product/contracproduct/' + id,
+    method: 'delete'
+  });
+};

+ 146 - 0
src/api/product/contractproduct/types.ts

@@ -0,0 +1,146 @@
+export interface ContracproductVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 合同供货编号
+   */
+  contractSupplyNo: string;
+
+  /**
+   * 产品编号
+   */
+  productNo: string;
+
+  /**
+   * 产品id
+   */
+  productId: string | number;
+
+  /**
+   * 供货周期(单位:天/月,根据业务定义)
+   */
+  supplyCycle: number;
+
+  /**
+   * 库存属性
+   */
+  inventoryProperties: string;
+
+  /**
+   * 最小供货量
+   */
+  minSupply: number;
+
+  /**
+   * 报价(支持大文本)
+   */
+  offerPrice: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+}
+
+export interface ContracproductForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 合同供货编号
+   */
+  contractSupplyNo?: string;
+
+  /**
+   * 产品编号
+   */
+  productNo?: string;
+
+  /**
+   * 产品id
+   */
+  productId?: string | number;
+
+  /**
+   * 供货周期(单位:天/月,根据业务定义)
+   */
+  supplyCycle?: number;
+
+  /**
+   * 库存属性
+   */
+  inventoryProperties?: string;
+
+  /**
+   * 最小供货量
+   */
+  minSupply?: number;
+
+  /**
+   * 报价(支持大文本)
+   */
+  offerPrice?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+}
+
+export interface ContracproductQuery extends PageQuery {
+
+  /**
+   * 合同供货编号
+   */
+  contractSupplyNo?: string;
+
+  /**
+   * 产品编号
+   */
+  productNo?: string;
+
+  /**
+   * 产品id
+   */
+  productId?: string | number;
+
+  /**
+   * 供货周期(单位:天/月,根据业务定义)
+   */
+  supplyCycle?: number;
+
+  /**
+   * 库存属性
+   */
+  inventoryProperties?: string;
+
+  /**
+   * 最小供货量
+   */
+  minSupply?: number;
+
+  /**
+   * 报价(支持大文本)
+   */
+  offerPrice?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 63 - 0
src/api/product/unit/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { UnitVO, UnitForm, UnitQuery } from '@/api/product/unit/types';
+
+/**
+ * 查询产品计量单位列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listUnit = (query?: UnitQuery): AxiosPromise<UnitVO[]> => {
+  return request({
+    url: '/product/unit/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询产品计量单位详细
+ * @param id
+ */
+export const getUnit = (id: string | number): AxiosPromise<UnitVO> => {
+  return request({
+    url: '/product/unit/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增产品计量单位
+ * @param data
+ */
+export const addUnit = (data: UnitForm) => {
+  return request({
+    url: '/product/unit',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改产品计量单位
+ * @param data
+ */
+export const updateUnit = (data: UnitForm) => {
+  return request({
+    url: '/product/unit',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除产品计量单位
+ * @param id
+ */
+export const delUnit = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/product/unit/' + id,
+    method: 'delete'
+  });
+};

+ 101 - 0
src/api/product/unit/types.ts

@@ -0,0 +1,101 @@
+export interface UnitVO {
+  /**
+   * 主键,自增ID
+   */
+  id: string | number;
+
+  /**
+   * 单位编号
+   */
+  unitNo: string;
+
+  /**
+   * 单位名称(如:件、箱、千克等)
+   */
+  unitName: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource: string;
+
+  /**
+   * 是否显示:1=是,0=否
+   */
+  isShow: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+}
+
+export interface UnitForm extends BaseEntity {
+  /**
+   * 主键,自增ID
+   */
+  id?: string | number;
+
+  /**
+   * 单位编号
+   */
+  unitNo?: string;
+
+  /**
+   * 单位名称(如:件、箱、千克等)
+   */
+  unitName?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 是否显示:1=是,0=否
+   */
+  isShow?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+}
+
+export interface UnitQuery extends PageQuery {
+
+  /**
+   * 单位编号
+   */
+  unitNo?: string;
+
+  /**
+   * 单位名称(如:件、箱、千克等)
+   */
+  unitName?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 是否显示:1=是,0=否
+   */
+  isShow?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 63 - 0
src/api/product/warehouseInventory/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { WarehouseInventoryVO, WarehouseInventoryForm, WarehouseInventoryQuery } from '@/api/product/warehouseInventory/types';
+
+/**
+ * 查询仓库库存明细列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listWarehouseInventory = (query?: WarehouseInventoryQuery): AxiosPromise<WarehouseInventoryVO[]> => {
+  return request({
+    url: '/product/warehouseInventory/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询仓库库存明细详细
+ * @param id
+ */
+export const getWarehouseInventory = (id: string | number): AxiosPromise<WarehouseInventoryVO> => {
+  return request({
+    url: '/product/warehouseInventory/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增仓库库存明细
+ * @param data
+ */
+export const addWarehouseInventory = (data: WarehouseInventoryForm) => {
+  return request({
+    url: '/product/warehouseInventory',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改仓库库存明细
+ * @param data
+ */
+export const updateWarehouseInventory = (data: WarehouseInventoryForm) => {
+  return request({
+    url: '/product/warehouseInventory',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除仓库库存明细
+ * @param id
+ */
+export const delWarehouseInventory = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/product/warehouseInventory/' + id,
+    method: 'delete'
+  });
+};

+ 176 - 0
src/api/product/warehouseInventory/types.ts

@@ -0,0 +1,176 @@
+export interface WarehouseInventoryVO {
+  /**
+   * ID
+   */
+  id: string | number;
+
+  /**
+   * 商品ID
+   */
+  productId: string | number;
+
+  /**
+   * SKU ID
+   */
+  skuId: string | number;
+
+  /**
+   * 规格型号
+   */
+  specModel: string;
+
+  /**
+   * 仓库ID
+   */
+  warehouseId: string | number;
+
+  /**
+   * 仓库编号
+   */
+  warehouseNo: string;
+
+  /**
+   * 仓库名称
+   */
+  warehouseName: string;
+
+  /**
+   * 可用库存
+   */
+  nowInventory: number;
+
+  /**
+   * 锁定库存
+   */
+  lockInventory: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+}
+
+export interface WarehouseInventoryForm extends BaseEntity {
+  /**
+   * ID
+   */
+  id?: string | number;
+
+  /**
+   * 商品ID
+   */
+  productId?: string | number;
+
+  /**
+   * SKU ID
+   */
+  skuId?: string | number;
+
+  /**
+   * 规格型号
+   */
+  specModel?: string;
+
+  /**
+   * 仓库ID
+   */
+  warehouseId?: string | number;
+
+  /**
+   * 仓库编号
+   */
+  warehouseNo?: string;
+
+  /**
+   * 仓库名称
+   */
+  warehouseName?: string;
+
+  /**
+   * 可用库存
+   */
+  nowInventory?: number;
+
+  /**
+   * 锁定库存
+   */
+  lockInventory?: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+}
+
+export interface WarehouseInventoryQuery extends PageQuery {
+
+  /**
+   * 商品ID
+   */
+  productId?: string | number;
+
+  /**
+   * SKU ID
+   */
+  skuId?: string | number;
+
+  /**
+   * 规格型号
+   */
+  specModel?: string;
+
+  /**
+   * 仓库ID
+   */
+  warehouseId?: string | number;
+
+  /**
+   * 仓库编号
+   */
+  warehouseNo?: string;
+
+  /**
+   * 仓库名称
+   */
+  warehouseName?: string;
+
+  /**
+   * 可用库存
+   */
+  nowInventory?: number;
+
+  /**
+   * 锁定库存
+   */
+  lockInventory?: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

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

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { AddressVO, AddressForm, AddressQuery } from '@/api/supplier/address/types';
+
+/**
+ * 查询供应商地址列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listAddress = (query?: AddressQuery): AxiosPromise<AddressVO[]> => {
+  return request({
+    url: '/customer/supplieraddress/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询供应商地址详细
+ * @param id
+ */
+export const getAddress = (id: string | number): AxiosPromise<AddressVO> => {
+  return request({
+    url: '/customer/supplieraddress/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增供应商地址
+ * @param data
+ */
+export const addAddress = (data: AddressForm) => {
+  return request({
+    url: '/customer/supplieraddress',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改供应商地址
+ * @param data
+ */
+export const updateAddress = (data: AddressForm) => {
+  return request({
+    url: '/customer/supplieraddress',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除供应商地址
+ * @param id
+ */
+export const delAddress = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/supplieraddress/' + id,
+    method: 'delete'
+  });
+};

+ 261 - 0
src/api/supplier/address/types.ts

@@ -0,0 +1,261 @@
+export interface AddressVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 供应商编号
+   */
+  supplierNo: string;
+
+  /**
+   * 配送公司名称
+   */
+  shippingCompany: string;
+
+  /**
+   * 发货人姓名
+   */
+  shipperName: string;
+
+  /**
+   * 发货人电话
+   */
+  shipperPhone: string;
+
+  /**
+   * 邮政编码
+   */
+  shippingPostCode: string;
+
+  /**
+   * 省
+   */
+  shippingProvincial: string;
+
+  /**
+   * 市
+   */
+  shippingCity: string;
+
+  /**
+   * 区/县
+   */
+  shippingCounty: string;
+
+  /**
+   * 详细地址
+   */
+  shippingAddress: string;
+
+  /**
+   * 推送状态(例如:0-未推送, 1-已推送, 16-推送失败)
+   */
+  pushStatus: number;
+
+  /**
+   * 创建时间
+   */
+  created: string;
+
+  /**
+   * 修改时间
+   */
+  modify: string;
+
+  /**
+   * 是否为自身地址(1-是, 0-否)
+   */
+  isSelf: number;
+
+  /**
+   * 地址类型(例如:1-注册地址, 2-经营地址, 3-发货地址)
+   */
+  type: number;
+
+  /**
+   * 地址编码
+   */
+  addressNo: string;
+
+}
+
+export interface AddressForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 供应商编号
+   */
+  supplierNo?: string;
+
+  /**
+   * 供应商ID
+   */
+  supplierId?: string | number;
+
+  /**
+   * 配送公司名称
+   */
+  shippingCompany?: string;
+
+  /**
+   * 发货人姓名
+   */
+  shipperName?: string;
+
+  /**
+   * 发货人电话
+   */
+  shipperPhone?: string;
+
+  /**
+   * 邮政编码
+   */
+  shippingPostCode?: string;
+
+  /**
+   * 省
+   */
+  shippingProvincial?: string;
+
+  /**
+   * 市
+   */
+  shippingCity?: string;
+
+  /**
+   * 区/县
+   */
+  shippingCounty?: string;
+
+  /**
+   * 详细地址
+   */
+  shippingAddress?: string;
+
+  /**
+   * 推送状态(例如:0-未推送, 1-已推送, 16-推送失败)
+   */
+  pushStatus?: number;
+
+  /**
+   * 创建时间
+   */
+  created?: string;
+
+  /**
+   * 修改时间
+   */
+  modify?: string;
+
+  /**
+   * 是否为自身地址(1-是, 0-否)
+   */
+  isSelf?: number;
+
+  /**
+   * 地址类型(例如:1-注册地址, 2-经营地址, 3-发货地址)
+   */
+  type?: number;
+
+  /**
+   * 地址编码
+   */
+  addressNo?: string;
+
+}
+
+export interface AddressQuery extends PageQuery {
+
+  /**
+   * 供应商编号
+   */
+  supplierNo?: string;
+
+  /**
+   * 供应商ID(主键,查询更快)
+   */
+  supplierId?: string | number;
+
+  /**
+   * 配送公司名称
+   */
+  shippingCompany?: string;
+
+  /**
+   * 发货人姓名
+   */
+  shipperName?: string;
+
+  /**
+   * 发货人电话
+   */
+  shipperPhone?: string;
+
+  /**
+   * 邮政编码
+   */
+  shippingPostCode?: string;
+
+  /**
+   * 省
+   */
+  shippingProvincial?: string;
+
+  /**
+   * 市
+   */
+  shippingCity?: string;
+
+  /**
+   * 区/县
+   */
+  shippingCounty?: string;
+
+  /**
+   * 详细地址
+   */
+  shippingAddress?: string;
+
+  /**
+   * 推送状态(例如:0-未推送, 1-已推送, 16-推送失败)
+   */
+  pushStatus?: number;
+
+  /**
+   * 创建时间
+   */
+  created?: string;
+
+  /**
+   * 修改时间
+   */
+  modify?: string;
+
+  /**
+   * 是否为自身地址(1-是, 0-否)
+   */
+  isSelf?: number;
+
+  /**
+   * 地址类型(例如:1-注册地址, 2-经营地址, 3-发货地址)
+   */
+  type?: number;
+
+  /**
+   * 地址编码
+   */
+  addressNo?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

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

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { ApproveVO, ApproveForm, ApproveQuery } from '@/api/supplier/approve/types';
+
+/**
+ * 查询供应商审核列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listApprove = (query?: ApproveQuery): AxiosPromise<ApproveVO[]> => {
+  return request({
+    url: '/customer/approve/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询供应商审核详细
+ * @param id
+ */
+export const getApprove = (id: string | number): AxiosPromise<ApproveVO> => {
+  return request({
+    url: '/customer/approve/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增供应商审核
+ * @param data
+ */
+export const addApprove = (data: ApproveForm) => {
+  return request({
+    url: '/customer/approve',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改供应商审核
+ * @param data
+ */
+export const updateApprove = (data: ApproveForm) => {
+  return request({
+    url: '/customer/approve',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除供应商审核
+ * @param id
+ */
+export const delApprove = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/approve/' + id,
+    method: 'delete'
+  });
+};

+ 96 - 0
src/api/supplier/approve/types.ts

@@ -0,0 +1,96 @@
+export interface ApproveVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 供应商编号
+   */
+  supplierNo: string;
+
+  /**
+   * 供应商名称
+   */
+  enterpriseName: string;
+
+  /**
+   * 企业规模
+   */
+  membershipSize: string;
+
+  /**
+   * 供应商类型
+   */
+  supplierType: string;
+
+  /**
+   * 经营类目
+   */
+  operatingCategory: string;
+
+  /**
+   * 供应品牌
+   */
+  operatingBrand: string;
+
+  /**
+   * 是否合作(1-是, 0-否)status
+   */
+  cooperative: number;
+
+  /**
+   * 状态
+   */
+  supplyStatus: string;
+
+}
+
+export interface ApproveForm extends BaseEntity {
+}
+
+export interface ApproveQuery extends PageQuery {
+
+  /**
+   * 供应商名称
+   */
+  enterpriseName?: string;
+
+  /**
+   * 供应商类型
+   */
+  supplierType?: string;
+
+  /**
+   * 供货范围
+   */
+  scopeSupply?: string;
+
+  /**
+   * 经营类目
+   */
+  operatingCategory?: string;
+
+  /**
+   * 供应品牌
+   */
+  operatingBrand?: string;
+
+  /**
+   * 是否合作(1-是, 0-否)status
+   */
+  cooperative?: number;
+
+  /**
+   * 状态
+   */
+  supplyStatus?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 65 - 0
src/api/supplier/area/index.ts

@@ -0,0 +1,65 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { AreaVO, AreaForm, AreaQuery } from '@/api/supplier/area/types';
+
+/**
+ * 查询供应区域列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listArea = (query?: AreaQuery): AxiosPromise<AreaVO[]> => {
+  return request({
+    url: '/customer/area/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询供应区域详细
+ * @param id
+ */
+export const getArea = (id: string | number): AxiosPromise<AreaVO> => {
+  return request({
+    url: '/customer/area/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增供应区域
+ * @param data
+ */
+export const addArea = (data: AreaForm) => {
+  return request({
+    url: '/customer/area',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改供应区域
+ * @param data
+ */
+export const updateArea = (data: AreaForm) => {
+  return request({
+    url: '/customer/area',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除供应区域
+ * @param id
+ */
+export const delArea = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/area/' + id,
+    method: 'delete'
+  });
+};
+
+

+ 76 - 0
src/api/supplier/area/types.ts

@@ -0,0 +1,76 @@
+export interface AreaVO {
+  /**
+   * 供应商编号(关联供应商主表)
+   */
+  supplyNo: string;
+
+  /**
+   * 供应商ID(关联供应商主表主键)
+   */
+  supplierId: string | number;
+
+  /**
+   * 区域编码(如国标行政区域编码/自定义区域编码)
+   */
+  areaCode: string;
+
+  /**
+   * 区域名称(如北京市/江苏省南京市/天河区)
+   */
+  areaName: string;
+
+  /**
+   * 上级区域编码(如省级编码对应市级的上级编码,顶级区域为0)
+   */
+  parentCode: string;
+
+  /**
+   * 区域层级(1省/直辖市 2市 3区县 4街道/镇)
+   */
+  level: string;
+
+}
+
+export interface AreaForm extends BaseEntity {
+}
+
+export interface AreaQuery extends PageQuery {
+
+  /**
+   * 供应商编号(关联供应商主表)
+   */
+  supplyNo?: string;
+
+  /**
+   * 供应商ID(关联供应商主表主键)
+   */
+  supplierId?: string | number;
+
+  /**
+   * 区域编码(如国标行政区域编码/自定义区域编码)
+   */
+  areaCode?: string;
+
+  /**
+   * 区域名称(如北京市/江苏省南京市/天河区)
+   */
+  areaName?: string;
+
+  /**
+   * 上级区域编码(如省级编码对应市级的上级编码,顶级区域为0)
+   */
+  parentCode?: string;
+
+  /**
+   * 区域层级(1省/直辖市 2市 3区县 4街道/镇)
+   */
+  level?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

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

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { AuthorizetypeLevelVO, AuthorizetypeLevelForm, AuthorizetypeLevelQuery } from '@/api/supplier/authorizetypeLevel/types';
+
+/**
+ * 查询供应商授权等级和授权类型列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listAuthorizetypeLevel = (query?: AuthorizetypeLevelQuery): AxiosPromise<AuthorizetypeLevelVO[]> => {
+  return request({
+    url: '/system/authorizetypeLevel/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询供应商授权等级和授权类型详细
+ * @param id
+ */
+export const getAuthorizetypeLevel = (id: string | number): AxiosPromise<AuthorizetypeLevelVO> => {
+  return request({
+    url: '/system/authorizetypeLevel/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增供应商授权等级和授权类型
+ * @param data
+ */
+export const addAuthorizetypeLevel = (data: AuthorizetypeLevelForm) => {
+  return request({
+    url: '/system/authorizetypeLevel',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改供应商授权等级和授权类型
+ * @param data
+ */
+export const updateAuthorizetypeLevel = (data: AuthorizetypeLevelForm) => {
+  return request({
+    url: '/system/authorizetypeLevel',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除供应商授权等级和授权类型
+ * @param id
+ */
+export const delAuthorizetypeLevel = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/authorizetypeLevel/' + id,
+    method: 'delete'
+  });
+};

+ 71 - 0
src/api/supplier/authorizetypeLevel/types.ts

@@ -0,0 +1,71 @@
+export interface AuthorizetypeLevelVO {
+  /**
+   * ID
+   */
+  id: string | number;
+
+  /**
+   * 授权类型
+   */
+  authorizeType: string;
+
+  /**
+   * 授权等级
+   */
+  authorizeLevel: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+}
+
+export interface AuthorizetypeLevelForm extends BaseEntity {
+  /**
+   * ID
+   */
+  id?: string | number;
+
+  /**
+   * 授权类型
+   */
+  authorizeType?: string;
+
+  /**
+   * 授权等级
+   */
+  authorizeLevel?: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+}
+
+export interface AuthorizetypeLevelQuery extends PageQuery {
+
+  /**
+   * 授权类型
+   */
+  authorizeType?: string;
+
+  /**
+   * 授权等级
+   */
+  authorizeLevel?: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 63 - 0
src/api/supplier/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/supplier/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/supplier/businessInfo/index.ts

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

+ 206 - 0
src/api/supplier/businessInfo/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;
+}
+
+
+

+ 71 - 0
src/api/supplier/contact/index.ts

@@ -0,0 +1,71 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { ContactVO, ContactForm, ContactQuery } from './types';
+
+/**
+ * 查询联系人列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listContact = (query?: ContactQuery): AxiosPromise<ContactVO[]> => {
+  return request({
+    url: '/customer/contact/list',
+    method: 'get',
+    params: query
+  });
+};
+
+export const getSupplierContactlistById = (query?: ContactQuery): AxiosPromise<ContactVO[]> => {
+  return request({
+    url: '/customer/contact/getSupplierContactlistById',
+    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'
+  });
+};

+ 216 - 0
src/api/supplier/contact/types.ts

@@ -0,0 +1,216 @@
+export interface ContactVO {
+  /**
+   * ID
+   */
+  id?: string | number;
+
+  /**
+   * 供应商编号
+   */
+  supplierNo?: string;
+
+  /**
+   * 供应商ID
+   */
+  supplierId?: string | number;
+
+  /**
+   * 供应商名称
+   */
+  supplierName?: string;
+
+  /**
+   * 用户ID(关联系统用户表)
+   */
+  userId?: 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 ContactForm extends BaseEntity {
+  /**
+   * 供应商编号
+   */
+  supplierNo?: string;
+
+  /**
+   * 供应商ID
+   */
+  supplierId?: string | number;
+
+  /**
+   * 用户ID(关联系统用户表)
+   */
+  userId?: 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(关联系统用户表)
+   */
+  userId?: string | number;
+
+  /**
+   * 用户ID
+   */
+  userNo?: string;
+
+  /**
+   * 员工姓名
+   */
+  userName?: string;
+
+  /**
+   * 手机号
+   */
+  phone?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}

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

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

+ 145 - 0
src/api/supplier/contract/types.ts

@@ -0,0 +1,145 @@
+export interface ContractVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 供应商编号
+   */
+  supplierNo: string;
+
+  /**
+   * 供应商名称
+   */
+  supplierName: string;
+
+  /**
+   * 合同数
+   */
+  contractNum: number;
+
+  /**
+   * 有效期内合同
+   */
+  validContract: number;
+
+  /**
+   * 失效合同
+   */
+  invalidContract: number;
+
+  /**
+   * 供应商ID
+   */
+  supplierId:  number;
+
+}
+
+export interface ContractForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+  
+  /**
+   * 供应商编号
+   */
+  supplierNo?: string;
+  
+  /**
+   * 供应商ID
+   */
+  supplierId?: string | number;
+  
+  /**
+   * 供应商名称
+   */
+  supplierName?: string;
+  
+  /**
+   * 合同编号
+   */
+  contractNo?: string;
+  
+  /**
+   * 合同名称
+   */
+  contractName?: string;
+  
+  /**
+   * 合同类型(年度合作/项目采购/其他合作)
+   */
+  contractType?: string | number;
+  
+  /**
+   * 合同生效时间
+   */
+  contractStartTime?: string;
+  
+  /**
+   * 合同到期时间
+   */
+  contractEndTime?: string;
+  
+  /**
+   * 合同状态(0待审核 1已签署 2已完成 3已到期 4审核未通过)
+   */
+  contractStatus?: string | number;
+  
+  /**
+   * 到期提醒时间(单位:天,如提前7天提醒)
+   */
+  demandReminderTime?: number;
+  
+  /**
+   * 税率
+   */
+  taxRate?: string | number;
+  
+  /**
+   * 合同金额
+   */
+  contractAmount?: string | number;
+  
+  /**
+   * 合同说明
+   */
+  contractDescription?: string;
+  
+  /**
+   * 合同附件存储地址(多个附件用分隔符区分)
+   */
+  contractAttachment?: string;
+  
+  /**
+   * 结算方式
+   */
+  settlementMethod?: string | number;
+  
+  /**
+   * 发票类型
+   */
+  invoiceType?: string | number;
+}
+
+export interface ContractQuery extends PageQuery {
+
+  /**
+   * 供应商编号
+   */
+  supplierNo?: string;
+
+  /**
+   * 供应商名称
+   */
+  supplierName?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 75 - 0
src/api/supplier/contractsupply/index.ts

@@ -0,0 +1,75 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { ContractsupplyVO, ContractsupplyForm, ContractsupplyQuery } from '@/api/supplier/contractsupply/types';
+
+/**
+ * 查询协议供货列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listContractsupply = (query?: ContractsupplyQuery): AxiosPromise<ContractsupplyVO[]> => {
+  return request({
+    url: '/customer/contractsupply/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询协议供货详细
+ * @param id
+ */
+export const getContractsupply = (id: string | number): AxiosPromise<ContractsupplyVO> => {
+  return request({
+    url: '/customer/contractsupply/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增协议供货
+ * @param data
+ */
+export const addContractsupply = (data: ContractsupplyForm) => {
+  return request({
+    url: '/customer/contractsupply',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改协议供货
+ * @param data
+ */
+export const updateContractsupply = (data: ContractsupplyForm) => {
+  return request({
+    url: '/customer/contractsupply',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除协议供货
+ * @param id
+ */
+export const delContractsupply = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/contractsupply/' + id,
+    method: 'delete'
+  });
+};
+
+/**
+ * 审核协议供货
+ * @param data
+ */
+export const auditContractsupply = (data: { id: string | number; status: number }) => {
+  return request({
+    url: '/customer/contractsupply/edit',
+    method: 'put',
+    data: data
+  });
+};

+ 135 - 0
src/api/supplier/contractsupply/types.ts

@@ -0,0 +1,135 @@
+export interface ContractsupplyVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 协议单号
+   */
+  contractSupplyNo: number;
+
+  /**
+   * 供应商编号
+   */
+  supplyNo: string;
+
+  /**
+   * 供应商名称
+   */
+  supplierName: string;
+
+  /**
+   * 商品数量
+   */
+  productNumber: number;
+
+  /**
+   * 开始时间
+   */
+  startTime: string;
+
+  /**
+   * 结束时间
+   */
+  endTime: string;
+
+  /**
+   * 剩余时限(天)
+   */
+  timeRemaining: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+}
+
+export interface ContractsupplyForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 协议单号
+   */
+  contractSupplyNo?: string;
+
+  /**
+   * 所属公司ID
+   */
+  companyId?: string | number;
+
+  /**
+   * 供应商ID
+   */
+  supplierId?: string | number;
+
+  /**
+   * 供应商名称
+   */
+  supplierName?: string;
+
+  /**
+   * 开始时间
+   */
+  startTime?: string;
+
+  /**
+   * 结束时间
+   */
+  endTime?: string;
+
+  /**
+   * 附件
+   */
+  attachment?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+  /**
+   * 是否提交
+   */
+  isSubmit?: boolean;
+
+  /**
+   * 状态(0驳回 1生效)
+   */
+  status?: number | string;
+}
+
+export interface ContractsupplyQuery extends PageQuery {
+
+  /**
+   * 协议单号
+   */
+  contractSupplyNo?: number;
+
+  /**
+   * 供应商名称
+   */
+  supplierName?: string;
+
+  /**
+   * 开始时间
+   */
+  startTime?: string;
+
+  /**
+   * 结束时间
+   */
+  endTime?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 63 - 0
src/api/supplier/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/supplier/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/supplier/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/supplier/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;
+}

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

@@ -0,0 +1,357 @@
+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
+  });
+};
+
+/**
+ * 删除供应商信息
+ * @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 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 = () => {
+  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/supplier/info/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;
+}
+
+
+

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

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { QualificationVO, QualificationForm, QualificationQuery } from '@/api/supplier/qualification/types';
+
+/**
+ * 查询供应商资质信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listQualification = (query?: QualificationQuery): AxiosPromise<QualificationVO[]> => {
+  return request({
+    url: '/customer/qualification/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询供应商资质信息详细
+ * @param id
+ */
+export const getQualification = (id: string | number): AxiosPromise<QualificationVO> => {
+  return request({
+    url: '/customer/qualification/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增供应商资质信息
+ * @param data
+ */
+export const addQualification = (data: QualificationForm) => {
+  return request({
+    url: '/customer/qualification',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改供应商资质信息
+ * @param data
+ */
+export const updateQualification = (data: QualificationForm) => {
+  return request({
+    url: '/customer/qualification',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除供应商资质信息
+ * @param id
+ */
+export const delQualification = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/qualification/' + id,
+    method: 'delete'
+  });
+};

+ 171 - 0
src/api/supplier/qualification/types.ts

@@ -0,0 +1,171 @@
+export interface QualificationVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 资质名称(对应表单“资质名称”)
+   */
+  qualificationName: string;
+
+  /**
+   * 资质级别(对应表单“资质级别”)
+   */
+  qualificationLevel: string;
+
+  /**
+   * 证件编号(对应表单“证件编号”)
+   */
+  certificateNo: string;
+
+  /**
+   * 发证机构(对应表单“发证机构”)
+   */
+  issuingAuthority: string;
+
+  /**
+   * 资质有效期-开始日期(对应表单“开始日期”)
+   */
+  startDate: string;
+
+  /**
+   * 资质有效期-结束日期(对应表单“结束日期”,长期有效时为NULL)
+   */
+  endDate: string;
+
+  /**
+   * 是否长期有效(0=否 1=是,对应表单“长期有效”复选框)
+   */
+  isLongValid: string | number;
+
+  /**
+   * 附件存储地址(对应表单“上传附件”)
+   */
+  attachmentUrl: string;
+
+  /**
+   * 附件原文件名
+   */
+  attachmentName: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+}
+
+export interface QualificationForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 资质名称(对应表单“资质名称”)
+   */
+  qualificationName?: string;
+
+  /**
+   * 资质级别(对应表单“资质级别”)
+   */
+  qualificationLevel?: string;
+
+  /**
+   * 证件编号(对应表单“证件编号”)
+   */
+  certificateNo?: string;
+
+  /**
+   * 发证机构(对应表单“发证机构”)
+   */
+  issuingAuthority?: string;
+
+  /**
+   * 资质有效期-开始日期(对应表单“开始日期”)
+   */
+  startDate?: string;
+
+  /**
+   * 资质有效期-结束日期(对应表单“结束日期”,长期有效时为NULL)
+   */
+  endDate?: string;
+
+  /**
+   * 是否长期有效(0=否 1=是,对应表单“长期有效”复选框)
+   */
+  isLongValid?: string | number;
+
+  /**
+   * 附件存储地址(对应表单“上传附件”)
+   */
+  attachmentUrl?: string;
+
+  /**
+   * 附件原文件名
+   */
+  attachmentName?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+}
+
+export interface QualificationQuery extends PageQuery {
+
+  /**
+   * 资质名称(对应表单“资质名称”)
+   */
+  qualificationName?: string;
+
+  /**
+   * 资质级别(对应表单“资质级别”)
+   */
+  qualificationLevel?: string;
+
+  /**
+   * 证件编号(对应表单“证件编号”)
+   */
+  certificateNo?: string;
+
+  /**
+   * 发证机构(对应表单“发证机构”)
+   */
+  issuingAuthority?: string;
+
+  /**
+   * 资质有效期-开始日期(对应表单“开始日期”)
+   */
+  startDate?: string;
+
+  /**
+   * 资质有效期-结束日期(对应表单“结束日期”,长期有效时为NULL)
+   */
+  endDate?: string;
+
+  /**
+   * 是否长期有效(0=否 1=是,对应表单“长期有效”复选框)
+   */
+  isLongValid?: string | number;
+
+  /**
+   * 附件存储地址(对应表单“上传附件”)
+   */
+  attachmentUrl?: string;
+
+  /**
+   * 附件原文件名
+   */
+  attachmentName?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

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

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { QualificationFileVO, QualificationFileForm, QualificationFileQuery } from '@/api/supplier/qualificationFile/types';
+
+/**
+ * 查询供应商授权信息文件列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listQualificationFile = (query?: QualificationFileQuery): AxiosPromise<QualificationFileVO[]> => {
+  return request({
+    url: '/customer/qualificationFile/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询供应商授权信息文件详细
+ * @param id
+ */
+export const getQualificationFile = (id: string | number): AxiosPromise<QualificationFileVO> => {
+  return request({
+    url: '/customer/qualificationFile/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增供应商授权信息文件
+ * @param data
+ */
+export const addQualificationFile = (data: QualificationFileForm) => {
+  return request({
+    url: '/customer/qualificationFile',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改供应商授权信息文件
+ * @param data
+ */
+export const updateQualificationFile = (data: QualificationFileForm) => {
+  return request({
+    url: '/customer/qualificationFile',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除供应商授权信息文件
+ * @param id
+ */
+export const delQualificationFile = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/qualificationFile/' + id,
+    method: 'delete'
+  });
+};

+ 131 - 0
src/api/supplier/qualificationFile/types.ts

@@ -0,0 +1,131 @@
+export interface QualificationFileVO {
+  /**
+   * id
+   */
+  id: string | number;
+
+  /**
+   * 资质编号
+   */
+  authorizeNo: string;
+
+  /**
+   * 资质类型名称
+   */
+  name: string;
+
+  /**
+   * 文件名称
+   */
+  fileName: string;
+
+  /**
+   * 文件类型
+   */
+  fileType: string;
+
+  /**
+   * 文件上传路径
+   */
+  fileUrl: string;
+
+  /**
+   * 资质到期日期
+   */
+  endTime: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+}
+
+export interface QualificationFileForm extends BaseEntity {
+  /**
+   * id
+   */
+  id?: string | number;
+
+  /**
+   * 资质编号
+   */
+  authorizeNo?: string;
+
+  /**
+   * 资质类型名称
+   */
+  name?: string;
+
+  /**
+   * 文件名称
+   */
+  fileName?: string;
+
+  /**
+   * 文件类型
+   */
+  fileType?: string;
+
+  /**
+   * 文件上传路径
+   */
+  fileUrl?: string;
+
+  /**
+   * 资质到期日期
+   */
+  endTime?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+}
+
+export interface QualificationFileQuery extends PageQuery {
+
+  /**
+   * 资质编号
+   */
+  authorizeNo?: string;
+
+  /**
+   * 资质类型名称
+   */
+  name?: string;
+
+  /**
+   * 文件名称
+   */
+  fileName?: string;
+
+  /**
+   * 文件类型
+   */
+  fileType?: string;
+
+  /**
+   * 文件上传路径
+   */
+  fileUrl?: string;
+
+  /**
+   * 资质到期日期
+   */
+  endTime?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 88 - 0
src/api/supplier/supplierauthorize/index.ts

@@ -0,0 +1,88 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { SupplierauthorizeVO, SupplierauthorizeForm, SupplierauthorizeQuery } from '@/api/supplier/supplierauthorize/types';
+
+/**
+ * 查询供应能力查询列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listSupplierauthorize = (query?: SupplierauthorizeQuery): AxiosPromise<SupplierauthorizeVO[]> => {
+  return request({
+    url: '/customer/supplierauthorize/getSupplyCapacityList',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询授权详情列表(新接口)
+ * @param query
+ * @returns {*}
+ */
+export const getAuthorizeDetailList = (query?: SupplierauthorizeQuery): AxiosPromise<SupplierauthorizeVO[]> => {
+  return request({
+    url: '/customer/supplierauthorize/getDetailList',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询供应能力查询详细
+ * @param id
+ */
+export const getSupplierauthorize = (id: string | number): AxiosPromise<SupplierauthorizeVO> => {
+  return request({
+    url: '/customer/supplierauthorize/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 获取品牌授权详情(编辑回显用)
+ * @param id
+ */
+export const getBrandAuthorizeDetail = (id: string | number): AxiosPromise<SupplierauthorizeVO> => {
+  return request({
+    url: '/customer/supplierauthorize/getBrandAuthorizeDetail',
+    method: 'get',
+    params: { id }
+  });
+};
+
+/**
+ * 新增供应能力查询
+ * @param data
+ */
+export const addSupplierauthorize = (data: SupplierauthorizeForm) => {
+  return request({
+    url: '/customer/supplierauthorize',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改供应能力查询
+ * @param data
+ */
+export const updateSupplierauthorize = (data: SupplierauthorizeForm) => {
+  return request({
+    url: '/customer/supplierauthorize',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除供应能力查询
+ * @param id
+ */
+export const delSupplierauthorize = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/customer/supplierauthorize/' + id,
+    method: 'delete'
+  });
+};

+ 306 - 0
src/api/supplier/supplierauthorize/types.ts

@@ -0,0 +1,306 @@
+export interface SupplierauthorizeVO {
+  /**
+   * 供应商编号
+   */
+  supplierNo: string;
+
+  /**
+   * 供应商ID
+   */
+  supplierId: string | number;
+
+  /**
+   * 授权单编号
+   */
+  authorizeNo: string;
+
+  /**
+   * 品牌编号
+   */
+  brandNo: string;
+
+  /**
+   * 品牌名称(中文)
+   */
+  brandName: string;
+
+  /**
+   * 品牌英文名称
+   */
+  brandEnglishName: string;
+
+  /**
+   * 品牌LOGO图片地址
+   */
+  brandLogo: string;
+
+  /**
+   * 授权类型(如独家/非独家)
+   */
+  authorizeType: string;
+
+  /**
+   * 授权品类(多个品类用分隔符区分)
+   */
+  authorizationCategory: string;
+
+  /**
+   * 品牌授权方(授权出具主体)
+   */
+  brandLicensor: string;
+
+  /**
+   * 授权关系文件存储地址
+   */
+  authorizationRelationshipFile: string;
+
+  /**
+   * 授权开始时间
+   */
+  authorizationStartTime: string;
+
+  /**
+   * 授权结束时间
+   */
+  authorizationEndTime: string;
+
+  /**
+   * 授权区域(如中国大陆/全球等)
+   */
+  authorizedArea: string;
+
+  /**
+   * 品牌持有类型(如自有/代理)
+   */
+  brandHoldType: string;
+
+  /**
+   * 授权层级(如一级/二级授权)
+   */
+  authorizeLevel: string;
+
+  /**
+   * 授权审核状态(0待审核/1已通过/2已驳回)
+   */
+  authorizedStatus: string;
+
+  /**
+   * 授权关系文件原文件名
+   */
+  authorizationRelationshipFileName: string;
+
+  /**
+   * 品牌注册人
+   */
+  brandRegistrant: string;
+
+  /**
+   * 审核反馈意见
+   */
+  reviewFeedback: string;
+
+}
+
+export interface SupplierauthorizeForm extends BaseEntity {
+  /**
+   * 供应商编号
+   */
+  supplierNo?: string;
+
+  /**
+   * 供应商ID
+   */
+  supplierId?: string | number;
+
+  /**
+   * 授权单编号
+   */
+  authorizeNo?: string;
+
+  /**
+   * 品牌编号
+   */
+  brandNo?: string;
+
+  /**
+   * 品牌名称(中文)
+   */
+  brandName?: string;
+
+  /**
+   * 品牌英文名称
+   */
+  brandEnglishName?: string;
+
+  /**
+   * 品牌LOGO图片地址
+   */
+  brandLogo?: string;
+
+  /**
+   * 授权类型(如独家/非独家)
+   */
+  authorizeType?: string;
+
+  /**
+   * 授权品类(多个品类用分隔符区分)
+   */
+  authorizationCategory?: string;
+
+  /**
+   * 品牌授权方(授权出具主体)
+   */
+  brandLicensor?: string;
+
+  /**
+   * 授权关系文件存储地址
+   */
+  authorizationRelationshipFile?: string;
+
+  /**
+   * 授权开始时间
+   */
+  authorizationStartTime?: string;
+
+  /**
+   * 授权结束时间
+   */
+  authorizationEndTime?: string;
+
+  /**
+   * 授权区域(如中国大陆/全球等)
+   */
+  authorizedArea?: string;
+
+  /**
+   * 品牌持有类型(如自有/代理)
+   */
+  brandHoldType?: string;
+
+  /**
+   * 授权层级(如一级/二级授权)
+   */
+  authorizeLevel?: string;
+
+  /**
+   * 授权审核状态(0待审核/1已通过/2已驳回)
+   */
+  authorizedStatus?: string;
+
+  /**
+   * 授权关系文件原文件名
+   */
+  authorizationRelationshipFileName?: string;
+
+  /**
+   * 品牌注册人
+   */
+  brandRegistrant?: string;
+
+  /**
+   * 审核反馈意见
+   */
+  reviewFeedback?: string;
+
+}
+
+export interface SupplierauthorizeQuery extends PageQuery {
+
+  /**
+   * 供应商编号
+   */
+  supplierNo?: string;
+
+  /**
+   * 供应商ID
+   */
+  supplierId?: string | number;
+
+  /**
+   * 品牌名称(中文)
+   */
+  brandName?: string;
+
+  /**
+   * 省名称
+   */
+  province?: string;
+
+  /**
+   * 市名称
+   */
+  city?: string;
+
+  /**
+   * 授权类型(如独家/非独家)
+   */
+  authorizeType?: string;
+
+  /**
+   * 授权品类(多个品类用分隔符区分)
+   */
+  authorizationCategory?: string;
+
+  /**
+   * 品牌授权方(授权出具主体)
+   */
+  brandLicensor?: string;
+
+  /**
+   * 授权关系文件存储地址
+   */
+  authorizationRelationshipFile?: string;
+
+  /**
+   * 授权开始时间
+   */
+  authorizationStartTime?: string;
+
+  /**
+   * 授权结束时间
+   */
+  authorizationEndTime?: string;
+
+  /**
+   * 授权区域(如中国大陆/全球等)
+   */
+  authorizedArea?: string;
+
+  /**
+   * 品牌持有类型(如自有/代理)
+   */
+  brandHoldType?: string;
+
+  /**
+   * 授权层级(如一级/二级授权)
+   */
+  authorizeLevel?: string;
+
+  /**
+   * 授权审核状态(0待审核/1已通过/2已驳回)
+   */
+  authorizedStatus?: string;
+
+  /**
+   * 授权关系文件原文件名
+   */
+  authorizationRelationshipFileName?: string;
+
+  /**
+   * 品牌注册人
+   */
+  brandRegistrant?: string;
+
+  /**
+   * 审核反馈意见
+   */
+  reviewFeedback?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 80 - 0
src/api/system/addressarea/index.ts

@@ -0,0 +1,80 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { AddressareaVO, AddressareaForm, AddressareaQuery } from '@/api/system/addressarea/types';
+
+// API functions for address area management
+
+/**
+ * 查询地区列表列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listAddressarea = (query?: AddressareaQuery): AxiosPromise<AddressareaVO[]> => {
+  return request({
+    url: '/system/addressarea/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询省市列表列表
+ * @param query
+ * @returns {*}
+ */
+
+export const chinaAreaList = (query?: AddressareaQuery): AxiosPromise<AddressareaVO[]> => {
+  return request({
+    url: '/system/addressarea/getChinaList',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询地区列表详细
+ * @param id
+ */
+export const getAddressarea = (id: string | number): AxiosPromise<AddressareaVO> => {
+  return request({
+    url: '/system/addressarea/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增地区列表
+ * @param data
+ */
+export const addAddressarea = (data: AddressareaForm) => {
+  return request({
+    url: '/system/addressarea',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改地区列表
+ * @param data
+ */
+export const updateAddressarea = (data: AddressareaForm) => {
+  return request({
+    url: '/system/addressarea',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除地区列表
+ * @param id
+ */
+export const delAddressarea = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/addressarea/' + id,
+    method: 'delete'
+  });
+};
+

+ 98 - 0
src/api/system/addressarea/types.ts

@@ -0,0 +1,98 @@
+export interface AddressareaVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 地区编码
+   */
+  areaCode: string;
+
+  /**
+   * 地区名称
+   */
+  areaName: string;
+
+  /**
+   * 父类ID
+   */
+  parentCode: number;
+
+  /**
+   * 地区简称
+   */
+  simpleName: string;
+
+  /**
+   * 地区等级省 1 市 2
+   */
+  level: number;
+
+  /**
+   * 拼英
+   */
+  pinYin: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource: string;
+
+  children: AddressareaVO[];
+
+}
+
+export interface AddressareaForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 地区编码
+   */
+  areaCode?: string;
+
+  /**
+   * 地区名称
+   */
+  areaName?: string;
+
+  /**
+   * 父类ID
+   */
+  parentCode?: number;
+
+  /**
+   * 地区简称
+   */
+  simpleName?: string;
+
+  /**
+   * 地区等级省 1 市 2
+   */
+  level?: number;
+
+  /**
+   * 拼英
+   */
+  pinYin?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+}
+
+export interface AddressareaQuery extends PageQuery {
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 55 - 0
src/api/system/bank/index.ts

@@ -0,0 +1,55 @@
+import request from '@/utils/request';
+import { BankVO, BankQuery, BankForm } from './types';
+
+/**
+ * 查询银行列表
+ */
+export function listBank(query: BankQuery) {
+  return request<any>({
+    url: '/system/bank/list',
+    method: 'get',
+    params: query
+  });
+}
+
+/**
+ * 查询银行详细
+ */
+export function getBank(id: string | number) {
+  return request<any>({
+    url: '/system/bank/' + id,
+    method: 'get'
+  });
+}
+
+/**
+ * 新增银行
+ */
+export function addBank(data: BankForm) {
+  return request<any>({
+    url: '/system/bank',
+    method: 'post',
+    data: data
+  });
+}
+
+/**
+ * 修改银行
+ */
+export function updateBank(data: BankForm) {
+  return request<any>({
+    url: '/system/bank',
+    method: 'put',
+    data: data
+  });
+}
+
+/**
+ * 删除银行
+ */
+export function delBank(id: string | number | Array<string | number>) {
+  return request<any>({
+    url: '/system/bank/' + id,
+    method: 'delete'
+  });
+}

+ 120 - 0
src/api/system/bank/types.ts

@@ -0,0 +1,120 @@
+export interface BankVO {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 网点编号
+   */
+  bnId?: string;
+
+  /**
+   * 网点名称
+   */
+  bnName?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 网点地址
+   */
+  bnAddr?: string;
+
+  /**
+   * 网点分类ID
+   */
+  bnCatgId?: string;
+
+  /**
+   * 传真号码
+   */
+  faxNo?: string;
+
+  /**
+   * 联系电话
+   */
+  telNo?: string;
+
+  /**
+   * 是否显示(0-是,1-否)
+   */
+  isShow?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface BankQuery extends PageQuery {
+  /**
+   * 网点编号
+   */
+  bnId?: string;
+
+  /**
+   * 网点名称
+   */
+  bnName?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}
+
+export interface BankForm {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 网点编号
+   */
+  bnId?: string;
+
+  /**
+   * 网点名称
+   */
+  bnName?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 网点地址
+   */
+  bnAddr?: string;
+
+  /**
+   * 网点分类ID
+   */
+  bnCatgId?: string;
+
+  /**
+   * 传真号码
+   */
+  faxNo?: string;
+
+  /**
+   * 联系电话
+   */
+  telNo?: string;
+
+  /**
+   * 是否显示(0-是,1-否)
+   */
+  isShow?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}

+ 55 - 0
src/api/system/invoiceType/index.ts

@@ -0,0 +1,55 @@
+import request from '@/utils/request';
+import { InvoiceTypeVO, InvoiceTypeQuery, InvoiceTypeForm } from './types';
+
+/**
+ * 查询发票类型列表
+ */
+export function listInvoiceType(query: InvoiceTypeQuery) {
+  return request<any>({
+    url: '/system/invoiceType/list',
+    method: 'get',
+    params: query
+  });
+}
+
+/**
+ * 查询发票类型详细
+ */
+export function getInvoiceType(id: string | number) {
+  return request<any>({
+    url: '/system/invoiceType/' + id,
+    method: 'get'
+  });
+}
+
+/**
+ * 新增发票类型
+ */
+export function addInvoiceType(data: InvoiceTypeForm) {
+  return request<any>({
+    url: '/system/invoiceType',
+    method: 'post',
+    data: data
+  });
+}
+
+/**
+ * 修改发票类型
+ */
+export function updateInvoiceType(data: InvoiceTypeForm) {
+  return request<any>({
+    url: '/system/invoiceType',
+    method: 'put',
+    data: data
+  });
+}
+
+/**
+ * 删除发票类型
+ */
+export function delInvoiceType(id: string | number | Array<string | number>) {
+  return request<any>({
+    url: '/system/invoiceType/' + id,
+    method: 'delete'
+  });
+}

+ 80 - 0
src/api/system/invoiceType/types.ts

@@ -0,0 +1,80 @@
+export interface InvoiceTypeVO {
+  /**
+   * 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;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}
+
+export interface InvoiceTypeForm {
+  /**
+   * ID
+   */
+  id?: string | number;
+
+  /**
+   * 发票类型编号
+   */
+  invoiceTypeNo?: string;
+
+  /**
+   * 发票类型名称
+   */
+  invoiceTypeName?: string;
+
+  /**
+   * 是否显示:0-显示,1-隐藏
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}

+ 74 - 0
src/api/system/level/index.ts

@@ -0,0 +1,74 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { LevelVO, LevelForm, LevelQuery } from '@/api/system/level/types';
+
+/**
+ * 查询供应商等级列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listLevel = (query?: LevelQuery): AxiosPromise<LevelVO[]> => {
+  return request({
+    url: '/system/level/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询供应商等级详细
+ * @param datasource
+ * @param supplierLevelNo
+ */
+export const getLevel = (datasource: string, supplierLevelNo: string): AxiosPromise<LevelVO> => {
+  return request({
+    url: '/system/level/' + datasource + '/' + supplierLevelNo,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增供应商等级
+ * @param data
+ */
+export const addLevel = (data: LevelForm) => {
+  return request({
+    url: '/system/level',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改供应商等级
+ * @param data
+ */
+export const updateLevel = (data: LevelForm) => {
+  return request({
+    url: '/system/level',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除供应商等级
+ * @param supplierLevelNo
+ */
+export const delLevel = (supplierLevelNo: string | Array<string>) => {
+  return request({
+    url: '/system/level/' + supplierLevelNo,
+    method: 'delete'
+  });
+};
+
+/**
+ * 获取数据来源列表
+ */
+export const getDataSourceList = (): AxiosPromise<{ dataSourceNm: string }[]> => {
+  return request({
+    url: '/system/datasource/GetDataSourceList',
+    method: 'get'
+  });
+};

+ 62 - 0
src/api/system/level/types.ts

@@ -0,0 +1,62 @@
+export interface LevelVO {
+  /**
+   * ID
+   */
+  id?: string | number;
+  /**
+   * 编号
+   */
+  supplierLevelNo: string;
+
+  /**
+   * 名称
+   */
+  supplierLevelName: string;
+
+  /**
+   * 是否展示(0不展示 1展示)
+   */
+  isShow: string;
+
+  /**
+   * 数据来源(如手动录入/系统自动评级/第三方导入)
+   */
+  dataSource: string;
+
+}
+
+export interface LevelForm extends BaseEntity {
+  /**
+   * ID
+   */
+  id?: string | number;
+  /**
+   * 名称
+   */
+  supplierLevelName?: string;
+
+  /**
+   * 是否展示(0不展示 1展示)
+   */
+  isShow?: string;
+
+}
+
+export interface LevelQuery extends PageQuery {
+  /**
+   * ID
+   */
+  id?: string | number;
+  /**
+   * 数据来源(如手动录入/系统自动评级/第三方导入)
+   */
+  dataSource?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 74 - 0
src/api/system/type/index.ts

@@ -0,0 +1,74 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { TypeVO, TypeForm, TypeQuery } from '@/api/system/type/types';
+
+/**
+ * 查询供应商类别列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listType = (query?: TypeQuery): AxiosPromise<TypeVO[]> => {
+  return request({
+    url: '/system/type/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询供应商类别详细
+ * @param datasource
+ * @param supplierTypeNo
+ */
+export const getType = (datasource: string, supplierTypeNo: string): AxiosPromise<TypeVO> => {
+  return request({
+    url: '/system/type/' + datasource + '/' + supplierTypeNo,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增供应商类别
+ * @param data
+ */
+export const addType = (data: TypeForm) => {
+  return request({
+    url: '/system/type',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改供应商类别
+ * @param data
+ */
+export const updateType = (data: TypeForm) => {
+  return request({
+    url: '/system/type',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除供应商类别
+ * @param supplierTypeNo
+ */
+export const delType = (supplierTypeNo: string | Array<string>) => {
+  return request({
+    url: '/system/type/' + supplierTypeNo,
+    method: 'delete'
+  });
+};
+
+/**
+ * 获取数据来源列表
+ */
+export const getDataSourceList = (): AxiosPromise<{ dataSourceNm: string }[]> => {
+  return request({
+    url: '/system/datasource/GetDataSourceList',
+    method: 'get'
+  });
+};

+ 62 - 0
src/api/system/type/types.ts

@@ -0,0 +1,62 @@
+export interface TypeVO {
+  /**
+   * ID
+   */
+  id?: string | number;
+  /**
+   * 编号
+   */
+  supplierTypeNo: string;
+
+  /**
+   * 名称
+   */
+  supplierTypeName: string;
+
+  /**
+   * 是否展示
+   */
+  isShow: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource: string;
+
+}
+
+export interface TypeForm extends BaseEntity {
+  /**
+   * ID
+   */
+  id?: string | number;
+  /**
+   * 名称
+   */
+  supplierTypeName?: string;
+
+  /**
+   * 是否展示
+   */
+  isShow?: string;
+
+}
+
+export interface TypeQuery extends PageQuery {
+  /**
+   * ID
+   */
+  id?: string | number;
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 13 - 0
src/router/index.ts

@@ -88,6 +88,19 @@ export const constantRoutes: RouteRecordRaw[] = [
         meta: { title: '个人中心', icon: 'user' }
       }
     ]
+  },
+  {
+    path: '/supplier/author/edit',
+    component: Layout,
+    hidden: true,
+    children: [
+      {
+        path: '',
+        component: () => import('@/views/supplier/author/edit.vue'),
+        name: 'AuthorEdit',
+        meta: { title: '新增产品线授权', activeMenu: '/supplier/author' }
+      }
+    ]
   }
 ];
 

+ 62 - 0
src/store/modules/user.ts

@@ -5,6 +5,8 @@ import { LoginData } from '@/api/types';
 import defAva from '@/assets/images/profile.jpg';
 import { defineStore } from 'pinia';
 import { ref } from 'vue';
+import { getSupplierContactlistById } from '@/api/supplier/contact';
+import type { ContactVO } from '@/api/supplier/contact/types';
 
 export const useUserStore = defineStore('user', () => {
   const token = ref(getToken());
@@ -15,6 +17,11 @@ export const useUserStore = defineStore('user', () => {
   const avatar = ref('');
   const roles = ref<Array<string>>([]); // 用户角色编码集合 → 判断路由权限
   const permissions = ref<Array<string>>([]); // 用户权限编码集合 → 判断按钮权限
+  
+  // 供应商相关信息
+  const supplierId = ref<string | number | null>(null); // 当前用户所属的供应商ID
+  const supplierNo = ref<string>(''); // 供应商编号
+  const contactInfo = ref<ContactVO | null>(null); // 当前用户的联系人完整信息
 
   /**
    * 登录
@@ -52,17 +59,68 @@ export const useUserStore = defineStore('user', () => {
       avatar.value = profile;
       userId.value = user.userId;
       tenantId.value = user.tenantId;
+      
+      // 获取用户信息后,立即获取供应商信息
+      await getSupplierInfo();
+      
       return Promise.resolve();
     }
     return Promise.reject(err);
   };
 
+  // 获取当前用户的供应商信息
+  const getSupplierInfo = async (): Promise<void> => {
+    try {
+      if (!userId.value) {
+        console.warn('userId 为空,无法获取供应商信息');
+        return;
+      }
+
+      console.log('=== 开始获取供应商信息 ===');
+      console.log('当前用户ID:', userId.value);
+
+      // 通过 userId 查询联系人信息
+      const res = await getSupplierContactlistById({
+        userId: userId.value,
+        pageNum: 1,
+        pageSize: 1
+      });
+
+      console.log('getSupplierContactlistById 返回结果:', res.rows[0]);
+
+      if (res.rows && res.rows.length > 0) {
+        const contact = res.rows[0];
+        contactInfo.value = contact;
+        supplierId.value = contact.supplierId || null;
+        supplierNo.value = contact.supplierNo || '';
+
+        console.log('✓ 成功获取供应商信息');
+        console.log('供应商ID:', supplierId.value);
+        console.log('供应商编号:', supplierNo.value);
+        console.log('联系人信息:', contactInfo.value);
+      } else {
+        console.warn('未找到当前用户的联系人信息');
+        supplierId.value = null;
+        supplierNo.value = '';
+        contactInfo.value = null;
+      }
+    } catch (error) {
+      console.error('获取供应商信息失败:', error);
+      supplierId.value = null;
+      supplierNo.value = '';
+      contactInfo.value = null;
+    }
+  };
+
   // 注销
   const logout = async (): Promise<void> => {
     await logoutApi();
     token.value = '';
     roles.value = [];
     permissions.value = [];
+    supplierId.value = null;
+    supplierNo.value = '';
+    contactInfo.value = null;
     removeToken();
   };
 
@@ -78,8 +136,12 @@ export const useUserStore = defineStore('user', () => {
     avatar,
     roles,
     permissions,
+    supplierId,
+    supplierNo,
+    contactInfo,
     login,
     getInfo,
+    getSupplierInfo,
     logout,
     setAvatar
   };

+ 393 - 0
src/utils/regionData.ts

@@ -0,0 +1,393 @@
+// 中国省市区数据 - 简化版本
+// 数据结构适配 Element Plus Cascader 组件
+
+export interface RegionItem {
+  value: string;
+  label: string;
+  children?: RegionItem[];
+}
+
+export const regionData: RegionItem[] = [
+  {
+    value: '110000',
+    label: '北京市',
+    children: [
+      {
+        value: '110100',
+        label: '北京市',
+        children: [
+          { value: '110101', label: '东城区' },
+          { value: '110102', label: '西城区' },
+          { value: '110105', label: '朝阳区' },
+          { value: '110106', label: '丰台区' },
+          { value: '110107', label: '石景山区' },
+          { value: '110108', label: '海淀区' },
+          { value: '110109', label: '门头沟区' },
+          { value: '110111', label: '房山区' },
+          { value: '110112', label: '通州区' },
+          { value: '110113', label: '顺义区' },
+          { value: '110114', label: '昌平区' },
+          { value: '110115', label: '大兴区' },
+          { value: '110116', label: '怀柔区' },
+          { value: '110117', label: '平谷区' },
+          { value: '110118', label: '密云区' },
+          { value: '110119', label: '延庆区' }
+        ]
+      }
+    ]
+  },
+  {
+    value: '120000',
+    label: '天津市',
+    children: [
+      {
+        value: '120100',
+        label: '天津市',
+        children: [
+          { value: '120101', label: '和平区' },
+          { value: '120102', label: '河东区' },
+          { value: '120103', label: '河西区' },
+          { value: '120104', label: '南开区' },
+          { value: '120105', label: '河北区' },
+          { value: '120106', label: '红桥区' },
+          { value: '120110', label: '东丽区' },
+          { value: '120111', label: '西青区' },
+          { value: '120112', label: '津南区' },
+          { value: '120113', label: '北辰区' },
+          { value: '120114', label: '武清区' },
+          { value: '120115', label: '宝坻区' },
+          { value: '120116', label: '滨海新区' },
+          { value: '120117', label: '宁河区' },
+          { value: '120118', label: '静海区' },
+          { value: '120119', label: '蓟州区' }
+        ]
+      }
+    ]
+  },
+  {
+    value: '130000',
+    label: '河北省',
+    children: [
+      {
+        value: '130100',
+        label: '石家庄市',
+        children: [
+          { value: '130102', label: '长安区' },
+          { value: '130104', label: '桥西区' },
+          { value: '130105', label: '新华区' },
+          { value: '130107', label: '井陉矿区' },
+          { value: '130108', label: '裕华区' },
+          { value: '130109', label: '藁城区' },
+          { value: '130110', label: '鹿泉区' },
+          { value: '130111', label: '栾城区' },
+          { value: '130121', label: '井陉县' },
+          { value: '130123', label: '正定县' },
+          { value: '130125', label: '行唐县' },
+          { value: '130126', label: '灵寿县' },
+          { value: '130127', label: '高邑县' },
+          { value: '130128', label: '深泽县' },
+          { value: '130129', label: '赞皇县' },
+          { value: '130130', label: '无极县' },
+          { value: '130131', label: '平山县' },
+          { value: '130132', label: '元氏县' },
+          { value: '130133', label: '赵县' },
+          { value: '130183', label: '晋州市' },
+          { value: '130184', label: '新乐市' }
+        ]
+      },
+      {
+        value: '130200',
+        label: '唐山市',
+        children: [
+          { value: '130202', label: '路南区' },
+          { value: '130203', label: '路北区' },
+          { value: '130204', label: '古冶区' },
+          { value: '130205', label: '开平区' },
+          { value: '130207', label: '丰南区' },
+          { value: '130208', label: '丰润区' },
+          { value: '130209', label: '曹妃甸区' },
+          { value: '130223', label: '滦县' },
+          { value: '130224', label: '滦南县' },
+          { value: '130225', label: '乐亭县' },
+          { value: '130227', label: '迁西县' },
+          { value: '130229', label: '玉田县' },
+          { value: '130281', label: '遵化市' },
+          { value: '130283', label: '迁安市' }
+        ]
+      }
+    ]
+  },
+  {
+    value: '310000',
+    label: '上海市',
+    children: [
+      {
+        value: '310100',
+        label: '上海市',
+        children: [
+          { value: '310101', label: '黄浦区' },
+          { value: '310104', label: '徐汇区' },
+          { value: '310105', label: '长宁区' },
+          { value: '310106', label: '静安区' },
+          { value: '310107', label: '普陀区' },
+          { value: '310109', label: '虹口区' },
+          { value: '310110', label: '杨浦区' },
+          { value: '310112', label: '闵行区' },
+          { value: '310113', label: '宝山区' },
+          { value: '310114', label: '嘉定区' },
+          { value: '310115', label: '浦东新区' },
+          { value: '310116', label: '金山区' },
+          { value: '310117', label: '松江区' },
+          { value: '310118', label: '青浦区' },
+          { value: '310120', label: '奉贤区' },
+          { value: '310151', label: '崇明区' }
+        ]
+      }
+    ]
+  },
+  {
+    value: '320000',
+    label: '江苏省',
+    children: [
+      {
+        value: '320100',
+        label: '南京市',
+        children: [
+          { value: '320102', label: '玄武区' },
+          { value: '320104', label: '秦淮区' },
+          { value: '320105', label: '建邺区' },
+          { value: '320106', label: '鼓楼区' },
+          { value: '320111', label: '浦口区' },
+          { value: '320113', label: '栖霞区' },
+          { value: '320114', label: '雨花台区' },
+          { value: '320115', label: '江宁区' },
+          { value: '320116', label: '六合区' },
+          { value: '320117', label: '溧水区' },
+          { value: '320118', label: '高淳区' }
+        ]
+      },
+      {
+        value: '320200',
+        label: '无锡市',
+        children: [
+          { value: '320205', label: '锡山区' },
+          { value: '320206', label: '惠山区' },
+          { value: '320211', label: '滨湖区' },
+          { value: '320213', label: '梁溪区' },
+          { value: '320214', label: '新吴区' },
+          { value: '320281', label: '江阴市' },
+          { value: '320282', label: '宜兴市' }
+        ]
+      }
+    ]
+  },
+  {
+    value: '330000',
+    label: '浙江省',
+    children: [
+      {
+        value: '330100',
+        label: '杭州市',
+        children: [
+          { value: '330102', label: '上城区' },
+          { value: '330105', label: '拱墅区' },
+          { value: '330106', label: '西湖区' },
+          { value: '330108', label: '滨江区' },
+          { value: '330109', label: '萧山区' },
+          { value: '330110', label: '余杭区' },
+          { value: '330111', label: '富阳区' },
+          { value: '330112', label: '临安区' },
+          { value: '330113', label: '临平区' },
+          { value: '330114', label: '钱塘区' },
+          { value: '330122', label: '桐庐县' },
+          { value: '330127', label: '淳安县' },
+          { value: '330182', label: '建德市' }
+        ]
+      }
+    ]
+  },
+  {
+    value: '340000',
+    label: '安徽省',
+    children: [
+      {
+        value: '340100',
+        label: '合肥市',
+        children: [
+          { value: '340102', label: '瑶海区' },
+          { value: '340103', label: '庐阳区' },
+          { value: '340104', label: '蜀山区' },
+          { value: '340111', label: '包河区' },
+          { value: '340121', label: '长丰县' },
+          { value: '340122', label: '肥东县' },
+          { value: '340123', label: '肥西县' },
+          { value: '340124', label: '庐江县' },
+          { value: '340181', label: '巢湖市' }
+        ]
+      }
+    ]
+  },
+  {
+    value: '350000',
+    label: '福建省',
+    children: [
+      {
+        value: '350100',
+        label: '福州市',
+        children: [
+          { value: '350102', label: '鼓楼区' },
+          { value: '350103', label: '台江区' },
+          { value: '350104', label: '仓山区' },
+          { value: '350105', label: '马尾区' },
+          { value: '350111', label: '晋安区' },
+          { value: '350112', label: '长乐区' },
+          { value: '350121', label: '闽侯县' },
+          { value: '350122', label: '连江县' },
+          { value: '350123', label: '罗源县' },
+          { value: '350124', label: '闽清县' },
+          { value: '350125', label: '永泰县' },
+          { value: '350128', label: '平潭县' },
+          { value: '350181', label: '福清市' }
+        ]
+      }
+    ]
+  },
+  {
+    value: '360000',
+    label: '江西省',
+    children: [
+      {
+        value: '360100',
+        label: '南昌市',
+        children: [
+          { value: '360102', label: '东湖区' },
+          { value: '360103', label: '西湖区' },
+          { value: '360104', label: '青云谱区' },
+          { value: '360111', label: '青山湖区' },
+          { value: '360112', label: '新建区' },
+          { value: '360113', label: '红谷滩区' },
+          { value: '360121', label: '南昌县' },
+          { value: '360123', label: '安义县' },
+          { value: '360124', label: '进贤县' }
+        ]
+      }
+    ]
+  },
+  {
+    value: '370000',
+    label: '山东省',
+    children: [
+      {
+        value: '370100',
+        label: '济南市',
+        children: [
+          { value: '370102', label: '历下区' },
+          { value: '370103', label: '市中区' },
+          { value: '370104', label: '槐荫区' },
+          { value: '370105', label: '天桥区' },
+          { value: '370112', label: '历城区' },
+          { value: '370113', label: '长清区' },
+          { value: '370114', label: '章丘区' },
+          { value: '370115', label: '济阳区' },
+          { value: '370116', label: '莱芜区' },
+          { value: '370117', label: '钢城区' },
+          { value: '370124', label: '平阴县' },
+          { value: '370126', label: '商河县' }
+        ]
+      }
+    ]
+  },
+  {
+    value: '410000',
+    label: '河南省',
+    children: [
+      {
+        value: '410100',
+        label: '郑州市',
+        children: [
+          { value: '410102', label: '中原区' },
+          { value: '410103', label: '二七区' },
+          { value: '410104', label: '管城回族区' },
+          { value: '410105', label: '金水区' },
+          { value: '410106', label: '上街区' },
+          { value: '410108', label: '惠济区' },
+          { value: '410122', label: '中牟县' },
+          { value: '410181', label: '巩义市' },
+          { value: '410182', label: '荥阳市' },
+          { value: '410183', label: '新密市' },
+          { value: '410184', label: '新郑市' },
+          { value: '410185', label: '登封市' }
+        ]
+      }
+    ]
+  },
+  {
+    value: '420000',
+    label: '湖北省',
+    children: [
+      {
+        value: '420100',
+        label: '武汉市',
+        children: [
+          { value: '420102', label: '江岸区' },
+          { value: '420103', label: '江汉区' },
+          { value: '420104', label: '硚口区' },
+          { value: '420105', label: '汉阳区' },
+          { value: '420106', label: '武昌区' },
+          { value: '420107', label: '青山区' },
+          { value: '420111', label: '洪山区' },
+          { value: '420112', label: '东西湖区' },
+          { value: '420113', label: '汉南区' },
+          { value: '420114', label: '蔡甸区' },
+          { value: '420115', label: '江夏区' },
+          { value: '420116', label: '黄陂区' },
+          { value: '420117', label: '新洲区' }
+        ]
+      }
+    ]
+  },
+  {
+    value: '430000',
+    label: '湖南省',
+    children: [
+      {
+        value: '430100',
+        label: '长沙市',
+        children: [
+          { value: '430102', label: '芙蓉区' },
+          { value: '430103', label: '天心区' },
+          { value: '430104', label: '岳麓区' },
+          { value: '430105', label: '开福区' },
+          { value: '430111', label: '雨花区' },
+          { value: '430112', label: '望城区' },
+          { value: '430121', label: '长沙县' },
+          { value: '430181', label: '浏阳市' },
+          { value: '430182', label: '宁乡市' }
+        ]
+      }
+    ]
+  },
+  {
+    value: '440000',
+    label: '广东省',
+    children: [
+      {
+        value: '440100',
+        label: '广州市',
+        children: [
+          { value: '440103', label: '荔湾区' },
+          { value: '440104', label: '越秀区' },
+          { value: '440105', label: '海珠区' },
+          { value: '440106', label: '天河区' },
+          { value: '440111', label: '白云区' },
+          { value: '440112', label: '黄埔区' },
+          { value: '440113', label: '番禺区' },
+          { value: '440114', label: '花都区' },
+          { value: '440115', label: '南沙区' },
+          { value: '440117', label: '从化区' },
+          { value: '440118', label: '增城区' }
+        ]
+      },
+      {
+        value: '440300',
+        label: '深圳

+ 608 - 0
src/views/supplier/aptitude/index.vue

@@ -0,0 +1,608 @@
+<template>
+  <div class="app-container">
+    <!-- 资质管理列表 -->
+    <div class="table-header">
+      <span class="table-title">资质管理列表</span>
+      <el-button type="primary" @click="handleAdd">新增</el-button>
+    </div>
+
+    <!-- 资质信息列表 -->
+    <el-table v-loading="loading" :data="qualificationList" border style="width: 100%">
+      <el-table-column prop="qualificationName" label="资质名称" align="center" width="120" />
+      <el-table-column prop="qualificationLevel" label="资质级别" align="center" width="100" />
+      <el-table-column prop="certificateNo" label="证件编号" align="center" width="120" />
+      <el-table-column prop="issuingAuthority" label="发证机构" align="center" width="120" />
+      <el-table-column label="资质到期日" align="center" width="150">
+        <template #default="scope">
+          <span v-if="scope.row.isLongValid == 1">
+            {{ formatDate(scope.row.endDate) }} 长期有效
+          </span>
+          <span v-else>{{ formatDate(scope.row.endDate) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="资质文件" align="center" min-width="300">
+        <template #default="scope">
+          <el-button v-if="scope.row.attachmentUrl" link type="primary" @click="handleDownload(scope.row)">
+            {{ scope.row.attachmentName || '下载文件' }}
+          </el-button>
+          <span v-else>-</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" width="200" fixed="right">
+        <template #default="scope">
+          <el-button link type="primary" @click="handleView(scope.row)">查看</el-button>
+          <el-button link type="primary" @click="handleEdit(scope.row)">编辑</el-button>
+          <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <!-- 空状态 -->
+    <div v-if="qualificationList.length === 0 && !loading" class="empty-state">
+      暂无资质信息
+    </div>
+
+    <!-- 分页 -->
+    <div v-if="pagination.total > pagination.pageSize" class="pagination-container">
+      <el-pagination
+        v-model:current-page="pagination.pageNum"
+        v-model:page-size="pagination.pageSize"
+        :page-sizes="[10, 20, 50, 100]"
+        :total="pagination.total"
+        layout="total, sizes, prev, pager, next, jumper"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+    </div>
+
+    <!-- 新增/编辑对话框 -->
+    <el-dialog
+      v-model="dialogVisible"
+      :title="dialogTitle"
+      width="800px"
+      :close-on-click-modal="false"
+    >
+      <el-form :model="formData" :rules="formRules" ref="formRef" label-width="100px">
+        <el-row :gutter="20">
+          <el-col :span="24">
+            <el-form-item label="资质名称" prop="qualificationName">
+              <el-input v-model="formData.qualificationName" placeholder="请输入资质名称" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        
+        <el-row :gutter="20">
+          <el-col :span="24">
+            <el-form-item label="资质级别" prop="qualificationLevel">
+              <el-input v-model="formData.qualificationLevel" placeholder="请输入资质级别" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="证件编号" prop="certificateNo">
+              <el-input v-model="formData.certificateNo" placeholder="请输入证件编号" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="发证机构" prop="issuingAuthority">
+              <el-input v-model="formData.issuingAuthority" placeholder="请输入发证机构" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        
+        <el-row :gutter="20">
+          <el-col :span="24">
+            <el-form-item label="资质到期日">
+              <div class="date-range-container">
+                <div class="date-inputs">
+                  <el-date-picker
+                    v-model="startDate"
+                    type="date"
+                    placeholder="开始日期"
+                    style="width: 200px;"
+                    :disabled="isLongValid"
+                    @change="handleStartDateChange"
+                  />
+                  <span style="margin: 0 10px;">-</span>
+                  <el-date-picker
+                    v-model="endDate"
+                    type="date"
+                    placeholder="结束日期"
+                    style="width: 200px;"
+                    :disabled="isLongValid"
+                    @change="handleEndDateChange"
+                  />
+                  <el-checkbox v-model="isLongValid" @change="handleLongValidChange" style="margin-left: 20px;">
+                    长期有效
+                  </el-checkbox>
+                </div>
+              </div>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        
+        <el-row :gutter="20">
+          <el-col :span="24">
+            <el-form-item label="上传附件">
+              <FileUpload 
+                v-model="formData.attachmentUrl"
+                :limit="1"
+                :file-size="10"
+                :file-type="['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx']"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        
+        <el-row :gutter="20">
+          <el-col :span="24">
+            <el-form-item label="备注">
+              <el-input 
+                v-model="formData.remark" 
+                type="textarea" 
+                :rows="4" 
+                placeholder="请输入内容" 
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <template #footer>
+        <el-button @click="dialogVisible = false">取消</el-button>
+        <el-button type="primary" :loading="submitLoading" @click="handleSubmit">确认</el-button>
+      </template>
+    </el-dialog>
+
+    <!-- 查看对话框 -->
+    <el-dialog
+      v-model="viewDialogVisible"
+      title="查看资质"
+      width="800px"
+      :close-on-click-modal="false"
+    >
+      <el-form :model="viewData" label-width="100px">
+        <el-row :gutter="20">
+          <el-col :span="24">
+            <el-form-item label="资质名称">
+              <el-input v-model="viewData.qualificationName" readonly />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        
+        <el-row :gutter="20">
+          <el-col :span="24">
+            <el-form-item label="资质级别">
+              <el-input v-model="viewData.qualificationLevel" readonly />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="证件编号">
+              <el-input v-model="viewData.certificateNo" readonly />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="发证机构">
+              <el-input v-model="viewData.issuingAuthority" readonly />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        
+        <el-row :gutter="20">
+          <el-col :span="24">
+            <el-form-item label="资质到期日">
+              <div class="date-range-container">
+                <div class="date-inputs">
+                  <el-date-picker
+                    :model-value="viewStartDate"
+                    type="date"
+                    placeholder="开始日期"
+                    style="width: 200px;"
+                    readonly
+                    disabled
+                  />
+                  <span style="margin: 0 10px;">-</span>
+                  <el-date-picker
+                    :model-value="viewEndDate"
+                    type="date"
+                    placeholder="结束日期"
+                    style="width: 200px;"
+                    readonly
+                    disabled
+                  />
+                  <el-checkbox :model-value="viewData.isLongValid == 1" disabled style="margin-left: 20px;">
+                    长期有效
+                  </el-checkbox>
+                </div>
+              </div>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        
+        <el-row :gutter="20">
+          <el-col :span="24">
+            <el-form-item label="上传附件">
+              <div v-if="viewData.attachmentUrl" class="file-display">
+                <el-button link type="primary" @click="handleDownload(viewData)">
+                  {{ viewData.attachmentName || '下载文件' }}
+                </el-button>
+              </div>
+              <span v-else>暂无文件</span>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        
+        <el-row :gutter="20">
+          <el-col :span="24">
+            <el-form-item label="备注">
+              <el-input 
+                v-model="viewData.remark" 
+                type="textarea" 
+                :rows="4" 
+                readonly
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <template #footer>
+        <el-button @click="viewDialogVisible = false">关闭</el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup lang="ts">
+import { ref, onMounted } from 'vue';
+import { ElMessage, ElMessageBox } from 'element-plus';
+import { listQualification, addQualification, updateQualification, delQualification } from '@/api/supplier/qualification';
+import type { QualificationVO, QualificationForm, QualificationQuery } from '@/api/supplier/qualification/types';
+import { listByIds } from '@/api/system/oss';
+import FileUpload from '@/components/FileUpload/index.vue';
+
+defineOptions({
+  name: 'Aptitude'
+});
+
+const qualificationList = ref<QualificationVO[]>([]);
+const loading = ref(false);
+
+// 分页参数
+const pagination = ref({
+  pageNum: 1,
+  pageSize: 10,
+  total: 0
+});
+
+// 对话框相关
+const dialogVisible = ref(false);
+const dialogTitle = ref('');
+const submitLoading = ref(false);
+const formRef = ref();
+
+// 查看对话框相关
+const viewDialogVisible = ref(false);
+const viewData = ref<QualificationVO>({} as QualificationVO);
+const viewStartDate = ref<Date | null>(null);
+const viewEndDate = ref<Date | null>(null);
+
+// 表单数据
+const formData = ref<QualificationForm>({
+  qualificationName: '',
+  qualificationLevel: '',
+  certificateNo: '',
+  issuingAuthority: '',
+  startDate: '',
+  endDate: '',
+  isLongValid: 0,
+  attachmentUrl: '',
+  attachmentName: '',
+  remark: ''
+});
+
+// 长期有效标志和日期
+const isLongValid = ref(false);
+const startDate = ref<Date | null>(null);
+const endDate = ref<Date | null>(null);
+
+// 表单验证规则
+const formRules = {
+  qualificationName: [
+    { required: true, message: '请输入资质名称', trigger: 'blur' }
+  ],
+  qualificationLevel: [
+    { required: true, message: '请输入资质级别', trigger: 'blur' }
+  ],
+  certificateNo: [
+    { required: true, message: '请输入证件编号', trigger: 'blur' }
+  ],
+  issuingAuthority: [
+    { required: true, message: '请输入发证机构', trigger: 'blur' }
+  ]
+};
+
+/** 获取资质列表 */
+const getQualificationList = async () => {
+  try {
+    loading.value = true;
+    const res = await listQualification({
+      pageNum: pagination.value.pageNum,
+      pageSize: pagination.value.pageSize
+    });
+    qualificationList.value = res.rows || [];
+    pagination.value.total = res.total || 0;
+    console.log('资质列表:', qualificationList.value);
+  } catch (e) {
+    console.error('获取资质列表失败:', e);
+    ElMessage.error('获取资质列表失败');
+  } finally {
+    loading.value = false;
+  }
+};
+
+/** 新增 */
+const handleAdd = () => {
+  resetForm();
+  dialogTitle.value = '新增资质';
+  dialogVisible.value = true;
+};
+
+/** 查看 */
+const handleView = (row: QualificationVO) => {
+  viewData.value = { ...row };
+  
+  // 设置查看模式的日期
+  if (row.startDate && row.endDate) {
+    const startDateStr = row.startDate.split(' ')[0]; // 去掉时分秒
+    const endDateStr = row.endDate.split(' ')[0]; // 去掉时分秒
+    viewStartDate.value = new Date(startDateStr);
+    viewEndDate.value = new Date(endDateStr);
+  } else {
+    viewStartDate.value = null;
+    viewEndDate.value = null;
+  }
+  
+  viewDialogVisible.value = true;
+};
+
+/** 编辑 */
+const handleEdit = (row: QualificationVO) => {
+  resetForm();
+  dialogTitle.value = '编辑资质';
+  
+  // 回显数据
+  formData.value = { ...row };
+  isLongValid.value = row.isLongValid == 1;
+  
+  // 回显日期,去掉时分秒
+  if (!isLongValid.value && row.startDate && row.endDate) {
+    const startDateStr = row.startDate.split(' ')[0]; // 去掉时分秒
+    const endDateStr = row.endDate.split(' ')[0]; // 去掉时分秒
+    startDate.value = new Date(startDateStr);
+    endDate.value = new Date(endDateStr);
+  }
+  
+  dialogVisible.value = true;
+};
+
+/** 删除 */
+const handleDelete = (row: QualificationVO) => {
+  ElMessageBox.confirm('确定要删除该资质信息吗?', '提示', {
+    confirmButtonText: '确定',
+    cancelButtonText: '取消',
+    type: 'warning'
+  }).then(async () => {
+    try {
+      await delQualification(row.id);
+      ElMessage.success('删除成功');
+      getQualificationList();
+    } catch (e) {
+      console.error('删除失败:', e);
+      ElMessage.error('删除失败');
+    }
+  }).catch(() => {
+    // 取消删除
+  });
+};
+
+/** 下载附件 */
+const handleDownload = async (row: QualificationVO) => {
+  if (!row.attachmentUrl) {
+    ElMessage.warning('暂无附件可下载');
+    return;
+  }
+  
+  try {
+    // 直接使用 attachmentUrl 进行下载
+    const link = document.createElement('a');
+    link.href = row.attachmentUrl;
+    link.download = row.attachmentName || '附件';
+    link.target = '_blank';
+    document.body.appendChild(link);
+    link.click();
+    document.body.removeChild(link);
+    ElMessage.success('开始下载');
+  } catch (e) {
+    console.error('下载附件失败:', e);
+    ElMessage.error('下载失败');
+  }
+};
+
+/** 长期有效改变 */
+const handleLongValidChange = (value: boolean) => {
+  if (value) {
+    startDate.value = null;
+    endDate.value = null;
+    formData.value.startDate = '';
+    formData.value.endDate = '';
+  }
+  formData.value.isLongValid = value ? 1 : 0;
+};
+
+/** 开始日期改变 */
+const handleStartDateChange = (date: Date | null) => {
+  if (date) {
+    formData.value.startDate = date.toISOString().split('T')[0];
+  } else {
+    formData.value.startDate = '';
+  }
+};
+
+/** 结束日期改变 */
+const handleEndDateChange = (date: Date | null) => {
+  if (date) {
+    formData.value.endDate = date.toISOString().split('T')[0];
+  } else {
+    formData.value.endDate = '';
+  }
+};
+
+/** 提交 */
+const handleSubmit = async () => {
+  try {
+    await formRef.value.validate();
+    
+    submitLoading.value = true;
+    
+    // 如果有附件,获取文件详情(URL 和文件名)
+    if (formData.value.attachmentUrl) {
+      try {
+        const res = await listByIds(formData.value.attachmentUrl);
+        if (res.data && res.data.length > 0) {
+          const file = res.data[0];
+          formData.value.attachmentUrl = file.url; // 存储实际的 URL
+          formData.value.attachmentName = file.originalName; // 存储文件名
+        }
+      } catch (e) {
+        console.warn('获取文件信息失败:', e);
+        // 如果获取文件信息失败,直接使用原始的 attachmentUrl
+      }
+    }
+    
+    if (formData.value.id) {
+      // 编辑
+      await updateQualification(formData.value);
+      ElMessage.success('更新成功');
+    } else {
+      // 新增
+      await addQualification(formData.value);
+      ElMessage.success('新增成功');
+    }
+    
+    dialogVisible.value = false;
+    getQualificationList();
+  } catch (e) {
+    console.error('提交失败:', e);
+    ElMessage.error('提交失败');
+  } finally {
+    submitLoading.value = false;
+  }
+};
+
+/** 重置表单 */
+const resetForm = () => {
+  formData.value = {
+    qualificationName: '',
+    qualificationLevel: '',
+    certificateNo: '',
+    issuingAuthority: '',
+    startDate: '',
+    endDate: '',
+    isLongValid: 0,
+    attachmentUrl: '',
+    attachmentName: '',
+    remark: ''
+  };
+  isLongValid.value = false;
+  startDate.value = null;
+  endDate.value = null;
+  formRef.value?.clearValidate();
+};
+
+/** 分页大小改变 */
+const handleSizeChange = (size: number) => {
+  pagination.value.pageSize = size;
+  getQualificationList();
+};
+
+/** 当前页改变 */
+const handleCurrentChange = (page: number) => {
+  pagination.value.pageNum = page;
+  getQualificationList();
+};
+
+/** 格式化日期 */
+const formatDate = (dateStr: string) => {
+  if (!dateStr) return '-';
+  // 去掉时分秒,只保留日期部分
+  return dateStr.split(' ')[0];
+};
+
+onMounted(() => {
+  getQualificationList();
+});
+</script>
+
+<style scoped>
+.app-container {
+  padding: 20px;
+  background: #f0f2f5;
+  min-height: calc(100vh - 84px);
+}
+
+.table-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  background: #fff;
+  padding: 16px 20px;
+  margin-bottom: 0;
+  border-radius: 4px 4px 0 0;
+}
+
+.table-title {
+  font-size: 16px;
+  font-weight: 500;
+  color: #333;
+}
+
+.el-table {
+  border-radius: 0 0 4px 4px;
+}
+
+.empty-state {
+  text-align: center;
+  padding: 40px;
+  color: #999;
+  background: #fff;
+}
+
+.pagination-container {
+  display: flex;
+  justify-content: flex-end;
+  padding: 20px;
+  background: #fff;
+  border-radius: 0 0 4px 4px;
+}
+
+.date-range-container {
+  width: 100%;
+}
+
+.date-inputs {
+  display: flex;
+  align-items: center;
+}
+
+.file-display {
+  padding: 8px 12px;
+  background: #f5f7fa;
+  border: 1px solid #dcdfe6;
+  border-radius: 4px;
+  display: inline-block;
+}
+</style>

+ 1564 - 0
src/views/supplier/author/edit.vue

@@ -0,0 +1,1564 @@
+<template>
+  <div class="app-container">
+    <!-- 页面头部 -->
+    <div class="page-header">
+      <el-icon class="back-icon" @click="goBack"><ArrowLeft /></el-icon>
+      <span class="page-title">{{ isEditMode ? '修改产品线授权' : '新增产品线授权' }}</span>
+    </div>
+
+    <!-- 设置授权 -->
+    <div class="form-section">
+      <div class="section-title">设置授权</div>
+      
+      <el-form :model="formData" label-width="100px" class="auth-form">
+        <el-row :gutter="20">
+          <el-col :span="8">
+            <el-form-item label="品牌名称:">
+              <el-select
+                v-if="!isEditMode"
+                v-model="formData.brandName"
+                placeholder="请选择"
+                clearable
+                filterable
+                style="width: 100%;"
+                @change="handleBrandChange"
+              >
+                <el-option
+                  v-for="brand in brandList"
+                  :key="brand.id"
+                  :label="brand.brandName"
+                  :value="brand.brandName"
+                />
+              </el-select>
+              <el-input
+                v-else
+                v-model="formData.brandName"
+                readonly
+                style="width: 100%;"
+                placeholder="品牌名称"
+                class="readonly-input"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="授权类型:">
+              <el-select 
+                v-model="formData.authorizeTypeId" 
+                placeholder="请选择" 
+                clearable 
+                style="width: 100%;"
+                @change="handleAuthorizeTypeChange"
+              >
+                <el-option
+                  v-for="item in authorizeTypeList"
+                  :key="item.id"
+                  :label="item.authorizeType"
+                  :value="item.id"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <!-- 第一行:三个分类下拉框 -->
+        <el-row :gutter="20">
+          <el-col :span="6">
+            <el-form-item label="选择分类:">
+              <el-select
+                v-if="!isEditMode"
+                v-model="formData.category1"
+                placeholder="请选择"
+                clearable
+                style="width: 100%;"
+                @change="handleCategory1Change"
+              >
+                <el-option
+                  v-for="item in category1List"
+                  :key="item.id"
+                  :label="item.categoryName"
+                  :value="item.id"
+                />
+              </el-select>
+              <el-input
+                v-else
+                :value="categoryDisplayNames.oneLevelName"
+                readonly
+                style="width: 100%;"
+                placeholder="一级分类"
+                class="readonly-input"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label=" ">
+              <el-select
+                v-if="!isEditMode"
+                v-model="formData.category2"
+                placeholder="请选择"
+                clearable
+                style="width: 100%;"
+                :disabled="!formData.category1"
+                @change="handleCategory2Change"
+              >
+                <el-option
+                  v-for="item in category2List"
+                  :key="item.id"
+                  :label="item.categoryName"
+                  :value="item.id"
+                />
+              </el-select>
+              <el-input
+                v-else
+                :value="categoryDisplayNames.twoLevelName"
+                readonly
+                style="width: 100%;"
+                placeholder="二级分类"
+                class="readonly-input"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label=" ">
+              <el-select
+                v-if="!isEditMode"
+                v-model="formData.category3"
+                placeholder="请选择"
+                clearable
+                style="width: 100%;"
+                :disabled="!formData.category2"
+                @change="handleCategory3Change"
+              >
+                <el-option
+                  v-for="item in category3List"
+                  :key="item.id"
+                  :label="item.categoryName"
+                  :value="item.id"
+                />
+              </el-select>
+              <el-input
+                v-else
+                :value="categoryDisplayNames.threeLevelName"
+                readonly
+                style="width: 100%;"
+                placeholder="三级分类"
+                class="readonly-input"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-button v-if="!isEditMode" type="primary" icon="Plus" @click="handleAddCategory">添加分类</el-button>
+          </el-col>
+        </el-row>
+
+        <!-- 额外添加的分类行(只有二级和三级) -->
+        <div v-for="row in extraCategoryRows" :key="row.id" class="extra-category-row">
+          <el-row :gutter="20">
+            <el-col :span="6">
+              <el-form-item label=" ">
+                <!-- 占位,保持对齐 -->
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label=" ">
+                <el-select
+                  v-model="row.category2"
+                  placeholder="请选择"
+                  clearable
+                  style="width: 100%;"
+                  @change="(val) => handleExtraCategory2Change(row, val)"
+                >
+                  <el-option
+                    v-for="item in row.category2List"
+                    :key="item.id"
+                    :label="item.categoryName"
+                    :value="item.id"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label=" ">
+                <el-select
+                  v-model="row.category3"
+                  placeholder="请选择"
+                  clearable
+                  style="width: 100%;"
+                  :disabled="!row.category2"
+                  @change="(val) => handleExtraCategory3Change(row, val)"
+                >
+                  <el-option
+                    v-for="item in row.category3List"
+                    :key="item.id"
+                    :label="item.categoryName"
+                    :value="item.id"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-button type="danger" icon="Delete" @click="handleDeleteCategory(row)">删除分类</el-button>
+            </el-col>
+          </el-row>
+        </div>
+
+        <!-- 授权链路 -->
+        <el-form-item label="授权链路:">
+          <div class="auth-chain-container">
+            <!-- 授权链路表格 -->
+            <el-table :data="authChainTableData" border style="width: 100%; margin-bottom: 16px;">
+              <el-table-column 
+                v-for="(level, index) in authChainLevels" 
+                :key="index"
+                :label="level.label" 
+                align="center"
+                min-width="200"
+              >
+                <template #default>
+                  <el-input 
+                    v-if="level.editable"
+                    v-model="level.value" 
+                    :placeholder="level.placeholder"
+                    clearable
+                  />
+                  <span v-else>{{ level.value }}</span>
+                </template>
+              </el-table-column>
+            </el-table>
+            
+            <!-- 操作按钮 -->
+            <div class="auth-chain-actions">
+              <el-button type="primary" @click="handleAddAuthLevel">添加品牌授权人</el-button>
+              <el-button type="danger" @click="handleDeleteAuthLevel" :disabled="authChainLevels.length <= 2">删除</el-button>
+            </div>
+          </div>
+        </el-form-item>
+
+        <!-- 原来的授权人员输入(保留或删除,根据需求) -->
+        <!-- <el-form-item>
+          <el-input
+            v-model="formData.authPerson"
+            placeholder="请输入品牌授权人"
+            style="width: 300px;"
+          />
+          <el-button type="primary" icon="Plus" style="margin-left: 10px;" @click="handleAddPerson">
+            添加品牌授权人
+          </el-button>
+          <el-button icon="Delete" @click="handleDeletePerson">删除</el-button>
+        </el-form-item> -->
+      </el-form>
+
+      <!-- 资质文件 -->
+      <div class="file-section">
+        <div class="file-title">资质文件</div>
+        <el-table :data="fileList" border style="width: 100%">
+          <el-table-column prop="index" label="序号" align="center" width="80" />
+          <el-table-column prop="typeName" label="资质名称" align="center" width="150" />
+          <el-table-column label="文件名称" align="center" min-width="400">
+            <template #default="scope">
+              <div v-if="scope.row.fileOssIds" class="file-name-list">
+                <div v-for="(fileName, idx) in getFileNames(scope.row.fileOssIds)" :key="idx" class="file-name-item">
+                  {{ fileName }}
+                </div>
+              </div>
+              <span v-else style="color: #999;">暂无文件</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="资质文件" align="center" width="250">
+            <template #default="scope">
+              <div class="file-actions">
+                <el-button type="primary" link @click="handleUploadFile(scope.row)">上传文件</el-button>
+                <template v-if="scope.row.fileOssIds">
+                  <el-button type="primary" link @click="handleDownloadFile(scope.row)">下载</el-button>
+                  <el-button type="danger" link @click="handleDeleteFile(scope.row)">删除</el-button>
+                </template>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="资质到期日" align="center" width="220">
+            <template #default="scope">
+              <el-date-picker
+                v-model="scope.row.expireDate"
+                type="date"
+                placeholder="请选择到期日"
+                style="width: 100%;"
+              />
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+
+    <!-- 文件上传对话框 -->
+    <el-dialog
+      v-model="fileUploadDialogVisible"
+      title="上传资质文件"
+      width="600px"
+      :close-on-click-modal="false"
+    >
+      <FileUpload 
+        v-model="currentFileRow.fileOssIds"
+        :limit="5"
+        :file-size="10"
+        :file-type="['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx']"
+      />
+      <template #footer>
+        <el-button @click="fileUploadDialogVisible = false">关闭</el-button>
+      </template>
+    </el-dialog>
+
+      <!-- 授权区域 -->
+      <div class="area-section">
+        <div class="area-title">
+          <span>授权区域:</span>
+          <el-button type="primary" @click="handleSelectArea">选择区域</el-button>
+        </div>
+        <el-table :data="areaList" border style="width: 100%">
+          <el-table-column type="index" label="序号" align="center" width="80" />
+          <el-table-column prop="province" label="授权区域(省)" align="center" />
+          <el-table-column prop="city" label="授权区域(市)" align="center" />
+        </el-table>
+        
+      </div>
+
+      <!-- 提交按钮 -->
+      <div class="submit-section">
+        <el-button type="primary" @click="handleSubmit">提交</el-button>
+      </div>
+    </div>
+
+    <!-- 授权区域选择对话框 -->
+    <el-dialog
+      v-model="areaDialogVisible"
+      title="选择授权区域"
+      width="700px"
+      :close-on-click-modal="false"
+    >
+      <el-cascader
+        v-model="selectedAreas"
+        :options="areaOptions"
+        :props="cascaderProps"
+        placeholder="请选择授权区域"
+        style="width: 100%;"
+        clearable
+        filterable
+      />
+      <template #footer>
+        <el-button @click="areaDialogVisible = false">取消</el-button>
+        <el-button type="primary" :loading="areaSubmitLoading" @click="handleAreaSubmit">确定</el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup lang="ts">
+import { ref, onMounted, watch } from 'vue';
+import { useRouter, useRoute } from 'vue-router';
+import { ArrowLeft } from '@element-plus/icons-vue';
+import { ElMessage, ElMessageBox } from 'element-plus';
+import { listBrand } from '@/api/product/brand';
+import { listCategory } from '@/api/product/category';
+import type { CategoryVO } from '@/api/product/category/types';
+import { chinaAreaList } from '@/api/system/addressarea';
+import { listByIds } from '@/api/system/oss';
+import { addSupplierauthorize, getBrandAuthorizeDetail, updateSupplierauthorize } from '@/api/supplier/supplierauthorize';
+import type { SupplierauthorizeForm } from '@/api/supplier/supplierauthorize/types';
+import type { QualificationFileForm } from '@/api/supplier/qualificationFile/types';
+import { listAuthorizetypeLevel } from '@/api/supplier/authorizetypeLevel';
+import type { AuthorizetypeLevelVO } from '@/api/supplier/authorizetypeLevel/types';
+import { useUserStore } from '@/store/modules/user';
+import FileUpload from '@/components/FileUpload/index.vue';
+
+const router = useRouter();
+const route = useRoute();
+const userStore = useUserStore();
+
+// 判断是新增还是编辑模式
+const editId = ref<string | number>('');
+const isEditMode = ref(false);
+
+// 分类显示名称(编辑模式用)
+const categoryDisplayNames = ref({
+  oneLevelName: '',
+  twoLevelName: '',
+  threeLevelName: ''
+});
+
+// 表单数据
+const formData = ref({
+  brandId: '',
+  brandName: '',
+  brandLogo: '', // 品牌LOGO
+  authorizeTypeId: '', // 授权类型ID
+  authorizeLevel: '', // 授权等级
+  category1: '', // 第一行的一级分类
+  category2: '', // 第一行的二级分类
+  category3: '', // 第一行的三级分类
+  authPerson: ''
+});
+
+// 品牌列表
+const brandList = ref<any[]>([]);
+
+// 授权类型列表
+const authorizeTypeList = ref<AuthorizetypeLevelVO[]>([]);
+
+// 授权链路
+interface AuthChainLevel {
+  label: string;      // 列标题(0级授权、1级授权...)
+  value: string;      // 授权人名称
+  editable: boolean;  // 是否可编辑
+  placeholder: string; // 输入框提示
+}
+
+const authChainLevels = ref<AuthChainLevel[]>([
+  {
+    label: '0级授权',
+    value: '',
+    editable: true,
+    placeholder: '请输入授权人'
+  },
+  {
+    label: '1级授权',
+    value: '优易达(武汉)有限公司',
+    editable: false,
+    placeholder: ''
+  }
+]);
+
+// 表格数据(只有一行,用于显示)
+const authChainTableData = ref([{}]);
+
+// 第一行的分类列表
+const category1List = ref<CategoryVO[]>([]); // 一级分类
+const category2List = ref<CategoryVO[]>([]); // 二级分类
+const category3List = ref<CategoryVO[]>([]); // 三级分类
+
+// 额外添加的分类行(只有二级和三级)
+interface ExtraCategoryRow {
+  id: number;
+  category2: string | number;
+  category3: string | number;
+  category2List: CategoryVO[];
+  category3List: CategoryVO[];
+}
+
+const extraCategoryRows = ref<ExtraCategoryRow[]>([]);
+let extraCategoryRowIdCounter = 0;
+
+// 资质文件列表
+const fileList = ref([
+  { 
+    index: 1, 
+    typeName: '商标注册证', 
+    fileOssIds: '', 
+    expireDate: '',
+    fileDetails: [] as any[] // 缓存文件详情
+  },
+  { 
+    index: 2, 
+    typeName: '品牌授权书', 
+    fileOssIds: '', 
+    expireDate: '',
+    fileDetails: [] as any[]
+  },
+  { 
+    index: 3, 
+    typeName: '质检报告', 
+    fileOssIds: '', 
+    expireDate: '',
+    fileDetails: [] as any[]
+  }
+]);
+
+// 文件名称缓存
+const fileNamesCache = ref<Map<string, string[]>>(new Map());
+
+// 文件上传对话框
+const fileUploadDialogVisible = ref(false);
+const currentFileRow = ref<any>({});
+
+// 授权区域列表
+const areaList = ref<any[]>([]);
+
+// 授权区域对话框相关
+const areaDialogVisible = ref(false);
+const areaSubmitLoading = ref(false);
+const selectedAreas = ref<any[]>([]); // 选中的授权区域(级联选择器的值)
+const areaOptions = ref<any[]>([]); // 授权区域选项(从接口获取)
+const selectedAreaIds = ref<string[]>([]); // 选中的区域ID列表(用于提交)
+
+const cascaderProps = {
+  multiple: true,
+  value: 'id', // 使用id而不是areaCode
+  label: 'areaName',
+  children: 'children',
+  checkStrictly: false,
+  emitPath: true
+};
+
+/** 返回 */
+const goBack = () => {
+  router.back();
+};
+
+/** 加载详情数据(编辑模式) */
+const loadDetailData = async () => {
+  try {
+    console.log('=== 加载详情数据 ===');
+    console.log('编辑ID:', editId.value);
+    
+    const res = await getBrandAuthorizeDetail(editId.value);
+    const data = res.data;
+    
+    console.log('详情数据:', data);
+    
+    // 回显基本信息
+    formData.value.brandName = data.brandName || '';
+    formData.value.brandLogo = data.brandLogo || '';
+    formData.value.authorizeTypeId = Number(data.authorizeType) || '';
+    formData.value.authorizeLevel = data.authorizeLevel || '';
+    
+    // 根据品牌名称找到对应的品牌ID(需要等待品牌列表加载完成)
+    if (data.brandName) {
+      // 如果品牌列表还没加载完成,等待一下
+      let retryCount = 0;
+      while (brandList.value.length === 0 && retryCount < 10) {
+        await new Promise(resolve => setTimeout(resolve, 100));
+        retryCount++;
+      }
+      
+      if (brandList.value.length > 0) {
+        const matchedBrand = brandList.value.find(brand => brand.brandName === data.brandName);
+        if (matchedBrand) {
+          formData.value.brandId = matchedBrand.id;
+          console.log('根据品牌名称找到品牌ID:', { brandName: data.brandName, brandId: matchedBrand.id });
+        } else {
+          // 如果找不到匹配的品牌,设置一个临时ID避免验证失败
+          formData.value.brandId = 'edit_mode_brand_id';
+          console.warn('未找到匹配的品牌,使用临时ID');
+        }
+      } else {
+        formData.value.brandId = 'edit_mode_brand_id';
+        console.warn('品牌列表未加载,使用临时ID');
+      }
+    }
+    
+    console.log('授权类型回显:', { 
+      原始值: data.authorizeType, 
+      转换后: Number(data.authorizeType),
+      类型: typeof Number(data.authorizeType)
+    });
+    
+    // 回显分类信息(根据 categoryId 和 categorysMap)
+    if (data.categoryId && data.categorysMap) {
+      // 设置三级分类ID(这是实际需要提交的)
+      formData.value.category3 = data.categoryId;
+      
+      // 为了通过验证,也设置一级和二级分类的临时值
+      formData.value.category1 = 'edit_mode_category1';
+      formData.value.category2 = 'edit_mode_category2';
+      
+      // 存储分类名称用于显示
+      categoryDisplayNames.value = {
+        oneLevelName: data.categorysMap.oneLevelName || '',
+        twoLevelName: data.categorysMap.twoLevelName || '',
+        threeLevelName: data.categorysMap.threeLevelName || ''
+      };
+      
+      console.log('分类信息回显:', {
+        categoryId: data.categoryId,
+        names: categoryDisplayNames.value,
+        formData: {
+          category1: formData.value.category1,
+          category2: formData.value.category2,
+          category3: formData.value.category3
+        }
+      });
+    }
+    
+    // 回显授权链路
+    if (data.brandLicensor) {
+      const licensors = data.brandLicensor.split(',');
+      authChainLevels.value = [];
+      
+      licensors.forEach((licensor, index) => {
+        authChainLevels.value.push({
+          label: `${index}级授权`,
+          value: licensor.trim(),
+          editable: licensor.trim() !== '优易达(武汉)有限公司',
+          placeholder: '请输入授权人'
+        });
+      });
+      console.log('授权链路回显:', authChainLevels.value);
+    }
+    
+    // 回显授权区域
+    if (data.authorizedArea) {
+      const areaIds = data.authorizedArea.split(',');
+      selectedAreaIds.value = areaIds;
+      
+      // 为级联选择器设置选中值
+      // 需要根据区域ID在 areaOptions 中找到对应的省市关系
+      selectedAreas.value = await buildCascaderValues(areaIds);
+      
+      // 显示区域名称
+      areaList.value = [{
+        province: data.province || '',
+        city: data.city || ''
+      }];
+      console.log('授权区域回显:', { 
+        areaIds, 
+        selectedAreas: selectedAreas.value,
+        province: data.province, 
+        city: data.city 
+      });
+    }
+    
+    // 回显资质文件
+    if (data.qualificationFiles && data.qualificationFiles.length > 0) {
+      // 按文件类型分组
+      const filesByType = {
+        '商标注册证': [],
+        '品牌授权书': [],
+        '质检报告': []
+      };
+      
+      data.qualificationFiles.forEach(file => {
+        if (filesByType[file.name]) {
+          filesByType[file.name].push(file);
+        }
+      });
+      
+      // 回显到对应的文件列表
+      fileList.value.forEach(fileRow => {
+        const files = filesByType[fileRow.typeName];
+        if (files && files.length > 0) {
+          // 构造 OSS ID 字符串(模拟上传组件的格式)
+          const ossIds = files.map(f => f.id).join(',');
+          fileRow.fileOssIds = ossIds;
+          
+          // 缓存文件详情
+          fileRow.fileDetails = files.map(f => ({
+            id: f.id,
+            originalName: f.fileName,
+            url: f.fileUrl,
+            fileSuffix: f.fileType
+          }));
+          
+          // 设置到期日期(使用第一个文件的到期日期)
+          if (files[0].endTime) {
+            fileRow.expireDate = files[0].endTime.split(' ')[0]; // 只取日期部分
+          }
+          
+          // 缓存文件名称
+          const fileNames = files.map(f => f.fileName);
+          fileNamesCache.value.set(ossIds, fileNames);
+          
+          console.log(`${fileRow.typeName} 文件回显:`, {
+            ossIds,
+            fileNames,
+            fileDetails: fileRow.fileDetails,
+            expireDate: fileRow.expireDate
+          });
+        }
+      });
+      
+      console.log('资质文件回显完成:', fileList.value);
+    }
+    
+    ElMessage.success('数据加载成功');
+  } catch (error) {
+    console.error('加载详情数据失败:', error);
+    ElMessage.error('加载数据失败');
+  }
+};
+
+
+
+/** 根据三级分类ID加载分类信息 */
+const loadCategoryByThirdLevel = async (categoryId: string | number) => {
+  // 这里需要根据三级分类ID反向查找一级、二级分类
+  // 暂时留空,后续需要完善
+  console.log('需要根据三级分类ID加载分类信息:', categoryId);
+};
+
+/** 获取品牌列表 */
+const getBrandList = async () => {
+  try {
+    const res = await listBrand({
+      pageNum: 1,
+      pageSize: 1000
+    });
+    brandList.value = res.rows || [];
+    console.log('品牌列表:', brandList.value);
+  } catch (e) {
+    console.error('获取品牌列表失败:', e);
+  }
+};
+
+/** 获取授权类型列表 */
+const getAuthorizeTypeList = async () => {
+  try {
+    const res = await listAuthorizetypeLevel({
+      pageNum: 1,
+      pageSize: 100
+    });
+    authorizeTypeList.value = res.rows || [];
+    console.log('授权类型列表:', authorizeTypeList.value);
+  } catch (e) {
+    console.error('获取授权类型列表失败:', e);
+  }
+};
+
+/** 授权类型改变 */
+const handleAuthorizeTypeChange = (id: string | number) => {
+  const selected = authorizeTypeList.value.find(item => item.id === id);
+  if (selected) {
+    formData.value.authorizeLevel = String(selected.authorizeLevel);
+    console.log('选择授权类型:', { 
+      id: id, 
+      authorizeType: selected.authorizeType,
+      authorizeLevel: selected.authorizeLevel 
+    });
+  }
+};
+
+/** 品牌选择改变 */
+const handleBrandChange = (brandName: string) => {
+  const selectedBrand = brandList.value.find(b => b.brandName === brandName);
+  if (selectedBrand) {
+    formData.value.brandId = selectedBrand.id;
+    formData.value.brandName = selectedBrand.brandName;
+    formData.value.brandLogo = selectedBrand.brandLogo || ''; // 保存品牌LOGO
+    console.log('选择品牌:', { 
+      brandId: formData.value.brandId, 
+      brandName: formData.value.brandName,
+      brandLogo: formData.value.brandLogo
+    });
+  }
+};
+
+/** 获取一级分类列表 */
+const getCategory1List = async () => {
+  try {
+    const res = await listCategory({
+      classLevel: 1,
+      pageNum: 1,
+      pageSize: 1000
+    });
+    category1List.value = res.rows || [];
+    console.log('一级分类:', category1List.value);
+  } catch (e) {
+    console.error('获取一级分类失败:', e);
+  }
+};
+
+/** 第一行:一级分类改变 */
+const handleCategory1Change = async (value: string | number) => {
+  // 清空二级和三级分类
+  formData.value.category2 = '';
+  formData.value.category3 = '';
+  category2List.value = [];
+  category3List.value = [];
+  
+  // 清空所有额外的分类行
+  extraCategoryRows.value = [];
+  
+  if (!value) return;
+  
+  // 根据一级分类ID查询二级分类
+  try {
+    const res = await listCategory({
+      parentId: value,
+      classLevel: 2,
+      pageNum: 1,
+      pageSize: 1000
+    });
+    category2List.value = res.rows || [];
+    console.log('二级分类:', category2List.value);
+  } catch (e) {
+    console.error('获取二级分类失败:', e);
+  }
+};
+
+/** 获取所有已选中的三级分类ID */
+const getSelectedCategory3Ids = (): (string | number)[] => {
+  const ids: (string | number)[] = [];
+  
+  // 第一行的三级分类
+  if (formData.value.category3) {
+    ids.push(formData.value.category3);
+  }
+  
+  // 额外行的三级分类
+  extraCategoryRows.value.forEach(row => {
+    if (row.category3) {
+      ids.push(row.category3);
+    }
+  });
+  
+  return ids;
+};
+
+/** 第一行:二级分类改变 */
+const handleCategory2Change = async (value: string | number) => {
+  // 清空三级分类
+  formData.value.category3 = '';
+  category3List.value = [];
+  
+  if (!value) return;
+  
+  // 根据二级分类ID查询三级分类
+  try {
+    const res = await listCategory({
+      parentId: value,
+      classLevel: 3,
+      pageNum: 1,
+      pageSize: 1000
+    });
+    
+    // 过滤掉已选中的三级分类(排除当前行自己的选择)
+    const selectedIds = extraCategoryRows.value
+      .map(row => row.category3)
+      .filter(id => id);
+    
+    category3List.value = (res.rows || []).filter(
+      (item: CategoryVO) => !selectedIds.includes(item.id)
+    );
+    
+    console.log('三级分类:', category3List.value);
+  } catch (e) {
+    console.error('获取三级分类失败:', e);
+  }
+};
+
+/** 第一行:三级分类改变 */
+const handleCategory3Change = (value: string | number) => {
+  if (!value) return;
+  
+  // 检查是否已经在额外行中选择了相同的三级分类
+  const isDuplicate = extraCategoryRows.value.some(row => row.category3 === value);
+  
+  if (isDuplicate) {
+    ElMessage.warning('该分类已经选择过了,请选择其他分类');
+    formData.value.category3 = '';
+  }
+};
+
+/** 额外行:二级分类改变 */
+const handleExtraCategory2Change = async (row: ExtraCategoryRow, value: string | number) => {
+  // 清空三级分类
+  row.category3 = '';
+  row.category3List = [];
+  
+  if (!value) return;
+  
+  // 根据二级分类ID查询三级分类
+  try {
+    const res = await listCategory({
+      parentId: value,
+      classLevel: 3,
+      pageNum: 1,
+      pageSize: 1000
+    });
+    
+    // 过滤掉已选中的三级分类(排除当前行自己的选择)
+    const selectedIds = getSelectedCategory3Ids().filter(id => id !== row.category3);
+    
+    row.category3List = (res.rows || []).filter(
+      (item: CategoryVO) => !selectedIds.includes(item.id)
+    );
+    
+    console.log('额外行三级分类:', row.category3List);
+  } catch (e) {
+    console.error('获取三级分类失败:', e);
+  }
+};
+
+/** 额外行:三级分类改变 */
+const handleExtraCategory3Change = (row: ExtraCategoryRow, value: string | number) => {
+  if (!value) return;
+  
+  // 检查是否与第一行的三级分类重复
+  if (formData.value.category3 === value) {
+    ElMessage.warning('该分类已经选择过了,请选择其他分类');
+    row.category3 = '';
+    return;
+  }
+  
+  // 检查是否与其他额外行的三级分类重复
+  const isDuplicate = extraCategoryRows.value.some(r => r.id !== row.id && r.category3 === value);
+  
+  if (isDuplicate) {
+    ElMessage.warning('该分类已经选择过了,请选择其他分类');
+    row.category3 = '';
+  }
+};
+
+/** 添加分类行(只添加二级和三级) */
+const handleAddCategory = async () => {
+  // 必须先选择一级分类
+  if (!formData.value.category1) {
+    ElMessage.warning('请先选择一级分类');
+    return;
+  }
+  
+  // 使用第一行的二级分类列表
+  extraCategoryRows.value.push({
+    id: ++extraCategoryRowIdCounter,
+    category2: '',
+    category3: '',
+    category2List: [...category2List.value], // 复用第一行的二级分类列表
+    category3List: []
+  });
+  
+  console.log('添加额外分类行,当前行数:', extraCategoryRows.value.length);
+};
+
+/** 删除额外分类行 */
+const handleDeleteCategory = (row: ExtraCategoryRow) => {
+  const index = extraCategoryRows.value.findIndex(r => r.id === row.id);
+  if (index > -1) {
+    extraCategoryRows.value.splice(index, 1);
+    ElMessage.success('删除成功');
+  }
+};
+
+/** 添加授权人 */
+const handleAddPerson = () => {
+  if (!formData.value.authPerson) {
+    ElMessage.warning('请输入授权人');
+    return;
+  }
+  ElMessage.success('授权人添加成功');
+};
+
+/** 删除授权人 */
+const handleDeletePerson = () => {
+  formData.value.authPerson = '';
+  ElMessage.success('删除成功');
+};
+
+/** 添加授权级别 */
+const handleAddAuthLevel = () => {
+  // 在最前面插入新的0级授权
+  // 所有现有级别的标签都要+1
+  const newLevels: AuthChainLevel[] = [
+    {
+      label: '0级授权',
+      value: '',
+      editable: true,
+      placeholder: '请输入授权人'
+    }
+  ];
+  
+  // 将现有的级别标签都+1
+  authChainLevels.value.forEach((level, index) => {
+    newLevels.push({
+      label: `${index + 1}级授权`,
+      value: level.value,
+      editable: level.editable && level.value !== '优易达(武汉)有限公司', // 优易达始终不可编辑
+      placeholder: level.placeholder
+    });
+  });
+  
+  authChainLevels.value = newLevels;
+  ElMessage.success('添加成功');
+};
+
+/** 删除授权级别 */
+const handleDeleteAuthLevel = () => {
+  if (authChainLevels.value.length <= 2) {
+    ElMessage.warning('至少保留两级授权');
+    return;
+  }
+  
+  // 删除第一个(0级授权)
+  authChainLevels.value.shift();
+  
+  // 重新调整所有级别的标签
+  authChainLevels.value = authChainLevels.value.map((level, index) => ({
+    ...level,
+    label: `${index}级授权`
+  }));
+  
+  ElMessage.success('删除成功');
+};
+
+/** 获取文件名称列表 */
+const getFileNames = (ossIds: string): string[] => {
+  if (!ossIds) return [];
+  
+  // 检查缓存
+  if (fileNamesCache.value.has(ossIds)) {
+    return fileNamesCache.value.get(ossIds)!;
+  }
+  
+  // 在编辑模式下,尝试从 fileDetails 中获取文件名
+  if (isEditMode.value) {
+    const fileRow = fileList.value.find(row => row.fileOssIds === ossIds);
+    if (fileRow && fileRow.fileDetails && fileRow.fileDetails.length > 0) {
+      const fileNames = fileRow.fileDetails.map((detail: any) => detail.originalName);
+      fileNamesCache.value.set(ossIds, fileNames);
+      return fileNames;
+    }
+  }
+  
+  // 异步加载文件名称(新增模式或缓存未命中时)
+  loadFileNames(ossIds);
+  
+  return [];
+};
+
+/** 异步加载文件名称 */
+const loadFileNames = async (ossIds: string) => {
+  try {
+    const res = await listByIds(ossIds);
+    const fileNames = res.data.map((oss: any) => oss.originalName);
+    fileNamesCache.value.set(ossIds, fileNames);
+  } catch (e) {
+    console.error('获取文件名称失败:', e);
+  }
+};
+
+// 监听文件变化,更新文件名称
+watch(
+  () => fileList.value.map(f => f.fileOssIds),
+  (newValues, oldValues) => {
+    newValues.forEach((ossIds, index) => {
+      // 只有当ossIds变化且不为空时才加载
+      if (ossIds && ossIds !== oldValues?.[index]) {
+        // 在编辑模式下,如果已经有缓存的文件详情,就不要重新请求OSS
+        if (isEditMode.value && fileList.value[index].fileDetails && fileList.value[index].fileDetails.length > 0) {
+          console.log('编辑模式:跳过OSS请求,使用已缓存的文件详情');
+          return;
+        }
+        
+        loadFileNames(ossIds);
+        // 同时加载文件详情并缓存
+        loadFileDetails(index, ossIds);
+      }
+    });
+  },
+  { deep: true }
+);
+
+/** 加载文件详情并缓存 */
+const loadFileDetails = async (fileIndex: number, ossIds: string) => {
+  try {
+    const res = await listByIds(ossIds);
+    fileList.value[fileIndex].fileDetails = res.data || [];
+    console.log(`文件详情已缓存 [${fileList.value[fileIndex].typeName}]:`, res.data);
+  } catch (e) {
+    console.error('获取文件详情失败:', e);
+  }
+};
+
+/** 上传文件 */
+const handleUploadFile = (row: any) => {
+  currentFileRow.value = row;
+  fileUploadDialogVisible.value = true;
+};
+
+/** 下载文件 */
+const handleDownloadFile = async (row: any) => {
+  if (!row.fileOssIds) {
+    ElMessage.warning('暂无文件可下载');
+    return;
+  }
+  
+  try {
+    const res = await listByIds(row.fileOssIds);
+    if (res.data && res.data.length > 0) {
+      // 下载所有文件
+      res.data.forEach((file: any) => {
+        const link = document.createElement('a');
+        link.href = file.url;
+        link.download = file.originalName;
+        link.target = '_blank';
+        document.body.appendChild(link);
+        link.click();
+        document.body.removeChild(link);
+      });
+      ElMessage.success('开始下载');
+    }
+  } catch (e) {
+    console.error('下载文件失败:', e);
+    ElMessage.error('下载失败');
+  }
+};
+
+/** 删除文件 */
+const handleDeleteFile = (row: any) => {
+  ElMessageBox.confirm('确定要删除该资质的所有文件吗?', '提示', {
+    confirmButtonText: '确定',
+    cancelButtonText: '取消',
+    type: 'warning'
+  }).then(() => {
+    row.fileOssIds = '';
+    // 清除缓存
+    fileNamesCache.value.forEach((value, key) => {
+      if (key.includes(row.fileOssIds)) {
+        fileNamesCache.value.delete(key);
+      }
+    });
+    ElMessage.success('删除成功');
+  }).catch(() => {
+    // 取消删除
+  });
+};
+
+/** 根据区域ID构建级联选择器的值 */
+const buildCascaderValues = async (areaIds: string[]): Promise<any[]> => {
+  const cascaderValues: any[] = [];
+  
+  // 遍历所有区域ID,找到它们在区域树中的位置
+  areaIds.forEach(areaId => {
+    const numId = Number(areaId);
+    
+    // 在省级数据中查找
+    for (const province of areaOptions.value) {
+      if (province.id === numId) {
+        // 这是一个省级ID
+        cascaderValues.push([numId]);
+        return;
+      }
+      
+      // 在市级数据中查找
+      if (province.children) {
+        for (const city of province.children) {
+          if (city.id === numId) {
+            // 这是一个市级ID,需要包含省级ID
+            cascaderValues.push([province.id, numId]);
+            return;
+          }
+        }
+      }
+    }
+  });
+  
+  console.log('构建级联选择器值:', { areaIds, cascaderValues });
+  return cascaderValues;
+};
+
+/** 选择区域 */
+const handleSelectArea = () => {
+  areaDialogVisible.value = true;
+};
+
+/** 初始化授权区域选项数据 */
+const initAreaOptions = async () => {
+  try {
+    const res = await chinaAreaList();
+    areaOptions.value = res.data || [];
+    console.log('授权区域选项数据加载完成:', areaOptions.value.length);
+  } catch (e) {
+    console.error('获取授权区域数据失败:', e);
+  }
+};
+
+/** 提交授权区域 */
+const handleAreaSubmit = async () => {
+  try {
+    areaSubmitLoading.value = true;
+
+    console.log('=== 授权区域提交 ===');
+    console.log('selectedAreas.value:', selectedAreas.value);
+    
+    // 从选中的路径中提取区域信息(用于显示)
+    const regionData = extractRegionData(selectedAreas.value);
+    
+    // 提取所有选中的区域ID(包括省和市的ID)
+    const areaIds: string[] = [];
+    selectedAreas.value.forEach(path => {
+      if (Array.isArray(path)) {
+        // path 是 [省ID, 市ID]
+        console.log('处理路径:', path);
+        path.forEach(id => {
+          console.log('提取ID:', id, '类型:', typeof id);
+          if (id && !areaIds.includes(String(id))) {
+            areaIds.push(String(id));
+          }
+        });
+      }
+    });
+    
+    selectedAreaIds.value = areaIds;
+
+    // 更新授权区域列表显示
+    areaList.value = [{
+      province: regionData.provinces,
+      city: regionData.cities
+    }];
+
+    console.log('选中的授权区域名称:', regionData);
+    console.log('选中的区域ID列表(用于提交):', selectedAreaIds.value);
+    console.log('=== 授权区域提交完成 ===');
+    ElMessage.success('授权区域设置成功');
+    areaDialogVisible.value = false;
+  } catch (e) {
+    console.error('设置授权区域失败:', e);
+    ElMessage.error('设置失败');
+  } finally {
+    areaSubmitLoading.value = false;
+  }
+};
+
+/** 从级联选择器的值中提取区域数据 */
+const extractRegionData = (selectedPaths: any[]) => {
+  // 用于存储省-市的映射关系
+  const provinceMap = new Map<string, Set<string>>();
+
+  selectedPaths.forEach(path => {
+    if (Array.isArray(path) && path.length >= 2) {
+      const [provinceId, cityId] = path;
+      
+      // 查找对应的名称(通过id查找)
+      const provinceName = findRegionNameById(provinceId, areaOptions.value);
+      const province = areaOptions.value.find(p => p.id === provinceId);
+      const cityName = province && cityId ? findRegionNameById(cityId, province.children || []) : '';
+
+      if (provinceName) {
+        if (!provinceMap.has(provinceName)) {
+          provinceMap.set(provinceName, new Set());
+        }
+        
+        if (cityName) {
+          provinceMap.get(provinceName)!.add(cityName);
+        }
+      }
+    }
+  });
+
+  // 生成省份和城市字符串
+  const provinces: string[] = [];
+  const cities: string[] = [];
+
+  provinceMap.forEach((citySet, provinceName) => {
+    provinces.push(provinceName);
+    cities.push(Array.from(citySet).join(','));
+  });
+
+  return {
+    provinces: provinces.join(','),
+    cities: cities.join(';')
+  };
+};
+
+/** 根据id查找区域名称 */
+const findRegionNameById = (id: string | number, regions: any[]): string => {
+  const region = regions.find(r => r.id === id);
+  return region ? region.areaName : '';
+};
+
+/** 提交 */
+const handleSubmit = async () => {
+  try {
+    // 验证必填项
+    if (!formData.value.brandId || !formData.value.brandName) {
+      ElMessage.warning('请选择品牌');
+      return;
+    }
+    
+    // 编辑模式下跳过分类验证,因为分类是锁死的
+    if (!isEditMode.value) {
+      if (!formData.value.category1 || !formData.value.category2 || !formData.value.category3) {
+        ElMessage.warning('请选择完整的分类');
+        return;
+      }
+    }
+    
+    if (!userStore.supplierId) {
+      ElMessage.error('供应商ID不存在');
+      return;
+    }
+
+    // 收集所有分类数据
+    const allCategories = [
+      {
+        category1: formData.value.category1,
+        category2: formData.value.category2,
+        category3: formData.value.category3
+      },
+      ...extraCategoryRows.value.map(row => ({
+        category1: formData.value.category1,
+        category2: row.category2,
+        category3: row.category3
+      }))
+    ];
+    
+    // 提取所有三级分类ID(只传三级分类ID的列表,并去重)
+    const categoryIds = [...new Set(
+      allCategories
+        .map(cat => cat.category3)
+        .filter(id => id) // 过滤掉空值
+    )];
+    
+    // 验证是否有重复的分类
+    if (categoryIds.length !== allCategories.filter(cat => cat.category3).length) {
+      console.warn('检测到重复的分类选择,已自动去重');
+    }
+    
+    // 构建授权区域字符串(使用ID,用逗号分隔)
+    const authorizedArea = selectedAreaIds.value.join(',');
+    
+    console.log('=== 构建授权区域 ===');
+    console.log('selectedAreaIds.value:', selectedAreaIds.value);
+    console.log('authorizedArea (提交给后端):', authorizedArea);
+    console.log('类型检查 - 是否包含数字:', selectedAreaIds.value.map(id => ({ id, type: typeof id })));
+    
+    // 构建授权链路字符串(从0级到最高级,用逗号分隔)
+    const brandLicensor = authChainLevels.value
+      .map(level => level.value)
+      .filter(value => value) // 过滤掉空值
+      .join(',');
+    
+    // 构建资质文件集合(使用缓存的文件详情)
+    const qualificationFiles: QualificationFileForm[] = [];
+    
+    for (const file of fileList.value) {
+      if (file.fileOssIds && file.fileDetails.length > 0) {
+        // 使用缓存的文件详情,无需再次请求
+        file.fileDetails.forEach((ossFile: any) => {
+          qualificationFiles.push({
+            name: file.typeName, // 资质类型名称(商标注册证、品牌授权书、质检报告)
+            fileName: ossFile.originalName, // 文件名称
+            fileType: ossFile.fileSuffix || '', // 文件类型
+            fileUrl: ossFile.url, // 文件URL
+            endTime: file.expireDate ? new Date(file.expireDate).toISOString() : '' // 资质到期日期
+          });
+        });
+      }
+    }
+    
+    console.log('使用缓存的文件详情,无需等待OSS请求');
+    
+    // 构建提交数据
+    const submitData: any = {
+      supplierId: userStore.supplierId,
+      supplierNo: userStore.supplierNo,
+      brandId: formData.value.brandId,
+      brandName: formData.value.brandName,
+      brandLogo: formData.value.brandLogo,
+      authorizeType: formData.value.authorizeTypeId, // 授权类型ID
+      authorizeLevel: formData.value.authorizeLevel, // 授权等级
+      categoryIds: categoryIds, // 三级分类ID列表
+      authorizedArea: authorizedArea, // 授权地址(区域ID列表)
+      brandLicensor: brandLicensor, // 授权链路(授权人列表)
+      qualificationFiles: qualificationFiles // 资质文件集合
+    };
+    
+    console.log('提交数据:', submitData);
+    console.log('三级分类ID列表:', categoryIds);
+    console.log('授权地址:', authorizedArea);
+    console.log('授权链路:', brandLicensor);
+    console.log('资质文件集合:', qualificationFiles);
+    
+    // 调用API(根据模式调用不同的接口)
+    if (isEditMode.value) {
+      // 编辑模式:调用更新接口
+      await updateSupplierauthorize({ ...submitData, id: editId.value });
+      ElMessage.success('更新成功');
+    } else {
+      // 新增模式:调用新增接口
+      await addSupplierauthorize(submitData);
+      ElMessage.success('提交成功');
+    }
+    
+    router.back();
+  } catch (error) {
+    console.error('提交失败:', error);
+    ElMessage.error('提交失败,请重试');
+  }
+};
+
+onMounted(async () => {
+  console.log('=== Edit页面初始化 ===');
+  console.log('route.query:', route.query);
+  console.log('route.query.id:', route.query.id);
+  
+  // 检查是否为编辑模式
+  if (route.query.id) {
+    editId.value = route.query.id as string;
+    isEditMode.value = true;
+    console.log('✓ 编辑模式,ID:', editId.value);
+    console.log('✓ isEditMode.value:', isEditMode.value);
+    
+    // 编辑模式:并行加载基础数据和详情数据
+    await Promise.all([
+      getBrandList(),
+      getAuthorizeTypeList(),
+      getCategory1List(),
+      initAreaOptions(),
+      loadDetailData() // 详情数据也并行加载
+    ]);
+  } else {
+    console.log('✓ 新增模式');
+    console.log('✓ isEditMode.value:', isEditMode.value);
+    
+    // 新增模式:只加载基础数据
+    await Promise.all([
+      getBrandList(),
+      getAuthorizeTypeList(),
+      getCategory1List(),
+      initAreaOptions()
+    ]);
+  }
+  
+  console.log('=== Edit页面初始化完成 ===');
+});
+</script>
+
+<style scoped>
+.app-container {
+  background: #f0f2f5;
+  min-height: 100vh;
+}
+
+.page-header {
+  background: #fff;
+  padding: 16px 24px;
+  display: flex;
+  align-items: center;
+  border-bottom: 1px solid #e8e8e8;
+}
+
+.back-icon {
+  font-size: 18px;
+  cursor: pointer;
+  margin-right: 12px;
+  color: #666;
+}
+
+.back-icon:hover {
+  color: #409eff;
+}
+
+.page-title {
+  font-size: 16px;
+  font-weight: 500;
+  color: #333;
+}
+
+.form-section {
+  background: #fff;
+  margin: 20px;
+  padding: 24px;
+  border-radius: 4px;
+}
+
+.section-title {
+  font-size: 16px;
+  font-weight: 500;
+  color: #333;
+  margin-bottom: 24px;
+  padding-bottom: 12px;
+  border-bottom: 1px solid #e8e8e8;
+}
+
+.auth-form {
+  margin-bottom: 30px;
+}
+
+.extra-category-row {
+  margin-bottom: 16px;
+}
+
+.file-section,
+.area-section {
+  margin-top: 30px;
+}
+
+.file-title,
+.area-title {
+  font-size: 14px;
+  font-weight: 500;
+  color: #333;
+  margin-bottom: 16px;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.empty-tip {
+  text-align: center;
+  padding: 40px;
+  color: #999;
+}
+
+.submit-section {
+  margin-top: 30px;
+  text-align: center;
+}
+
+.file-name-list {
+  text-align: left;
+  padding: 8px 0;
+}
+
+.file-name-item {
+  padding: 4px 0;
+  color: #409eff;
+  font-size: 14px;
+  line-height: 1.5;
+}
+
+.file-actions {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  gap: 8px;
+}
+
+.auth-chain-container {
+  width: 100%;
+}
+
+.auth-chain-actions {
+  display: flex;
+  gap: 12px;
+}
+
+/* 只读输入框样式 - 更美观的设计 */
+.readonly-input :deep(.el-input__wrapper) {
+  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
+  border: 1px solid #dee2e6 !important;
+  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1) !important;
+  cursor: not-allowed !important;
+}
+
+.readonly-input :deep(.el-input__inner) {
+  background: transparent !important;
+  color: #495057 !important;
+  font-weight: 500 !important;
+  cursor: not-allowed !important;
+  text-align: center !important;
+}
+
+.readonly-input :deep(.el-input__wrapper):hover {
+  border-color: #adb5bd !important;
+  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15) !important;
+}
+
+.readonly-input :deep(.el-input__wrapper):focus-within {
+  border-color: #6c757d !important;
+  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15), 0 0 0 2px rgba(108, 117, 125, 0.1) !important;
+}
+
+/* 分类区域样式 */
+.category-section {
+  margin-bottom: 20px;
+  padding: 16px;
+  background: #fafbfc;
+  border-radius: 8px;
+  border: 1px solid #e1e4e8;
+}
+
+.section-label {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  margin-bottom: 16px;
+  font-weight: 600;
+  color: #24292e;
+}
+</style>

+ 405 - 0
src/views/supplier/author/index.vue

@@ -0,0 +1,405 @@
+<template>
+  <div class="app-container">
+    <!-- 搜索表单 -->
+    <el-form :model="searchParams" :inline="true" class="search-form" >
+      <el-form-item label="品牌名称">
+        <el-select
+          v-model="searchParams.brandName"
+          placeholder="请选择品牌"
+          clearable
+          filterable
+          remote
+          :remote-method="searchBrand"
+          :loading="brandLoading"
+          style="width: 200px;"
+          @visible-change="handleBrandDropdownVisible"
+        >
+          <el-option
+            v-for="brand in brandList"
+            :key="brand.id"
+            :label="brand.brandName"
+            :value="brand.brandName"
+          />
+          <el-option v-if="brandLoading" disabled value="">
+            <div style="text-align: center;">加载中...</div>
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="省">
+        <el-input v-model="searchParams.province" placeholder="请输入省名称" clearable style="width: 200px;" />
+      </el-form-item>
+      <el-form-item label="市">
+        <el-input v-model="searchParams.city" placeholder="请输入市名称" clearable style="width: 200px;" />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="Search" @click="handleSearch">搜索</el-button>
+        <el-button icon="Refresh" @click="handleReset">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <!-- 产品线管理列表 -->
+    <div class="table-header">
+      <span class="table-title">产品线管理列表</span>
+      <el-button type="primary" @click="handleAdd">添加授权</el-button>
+    </div>
+
+    <!-- 授权详情信息列表 -->
+    <el-table v-loading="loading" :data="authorizationList" border style="width: 100%">
+      <el-table-column prop="brandName" label="品牌名称" align="center" />
+      <el-table-column label="一级类目" align="center">
+        <template #default="scope">
+          <span>{{ scope.row.categorysMap?.oneLevelName || '-' }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="二级类目" align="center">
+        <template #default="scope">
+          <span>{{ scope.row.categorysMap?.twoLevelName || '-' }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="三级类目" align="center">
+        <template #default="scope">
+          <span>{{ scope.row.categorysMap?.threeLevelName || '-' }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="authorizationEndTime" label="资质到期日期" align="center">
+        <template #default="scope">
+          <span>{{ scope.row.authorizationEndTime ? formatDate(scope.row.authorizationEndTime) : '-' }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="province" label="授权区域(省)" align="center" />
+      <el-table-column prop="city" label="授权区域(市)" align="center" />
+      <el-table-column prop="authorizedStatus" label="状态" align="center">
+        <template #default="scope">
+          <span>{{ getAuthorizedStatusText(scope.row.authorizedStatus) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" width="120">
+        <template #default="scope">
+          <el-button link type="primary" @click="handleView(scope.row)">编辑</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <!-- 空状态 -->
+    <div v-if="authorizationList.length === 0 && !loading" class="empty-state">
+      暂无授权详情信息
+    </div>
+
+    <!-- 分页 -->
+    <div class="pagination-container">
+      <el-pagination
+        v-model:current-page="pagination.pageNum"
+        v-model:page-size="pagination.pageSize"
+        :page-sizes="[10, 20, 50, 100]"
+        :total="pagination.total"
+        layout="total, sizes, prev, pager, next, jumper"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+    </div>
+  </div>
+</template>
+
+<script setup lang="ts">
+import { ref, onMounted, nextTick } from 'vue';
+import { useRouter } from 'vue-router';
+import { useUserStore } from '@/store/modules/user';
+import { getAuthorizeDetailList } from '@/api/supplier/supplierauthorize';
+import { listBrand } from '@/api/product/brand';
+import { ElMessage } from 'element-plus';
+
+defineOptions({
+  name: 'Author2015618489107828737'
+});
+
+const router = useRouter();
+
+const userStore = useUserStore();
+const authorizationList = ref<any[]>([]);
+const loading = ref(false);
+
+// 品牌相关
+const brandList = ref<any[]>([]);
+const brandLoading = ref(false);
+const brandPagination = ref({
+  pageNum: 1,
+  pageSize: 100
+});
+const hasMoreBrands = ref(true);
+const isSearchMode = ref(false); // 是否在搜索模式
+
+// 搜索参数
+const searchParams = ref({
+  brandName: '',
+  province: '', // 省名称
+  city: ''      // 市名称
+});
+
+// 分页参数
+const pagination = ref({
+  pageNum: 1,
+  pageSize: 10,
+  total: 0
+});
+
+/** 获取品牌列表 */
+const getBrandList = async (reset = false) => {
+  if (reset) {
+    brandPagination.value.pageNum = 1;
+    brandList.value = [];
+  }
+
+  try {
+    brandLoading.value = true;
+    const res = await listBrand({
+      pageNum: brandPagination.value.pageNum,
+      pageSize: brandPagination.value.pageSize
+    });
+    
+    const newBrands = res.rows || [];
+    if (reset) {
+      brandList.value = newBrands;
+    } else {
+      brandList.value = [...brandList.value, ...newBrands];
+    }
+    
+    // 判断是否还有更多数据
+    hasMoreBrands.value = newBrands.length === brandPagination.value.pageSize;
+    
+    console.log('品牌列表:', brandList.value);
+  } catch (e) {
+    console.error('获取品牌列表失败:', e);
+  } finally {
+    brandLoading.value = false;
+  }
+};
+
+/** 搜索品牌 */
+const searchBrand = async (query: string) => {
+  if (!query) {
+    isSearchMode.value = false;
+    await getBrandList(true);
+    return;
+  }
+  
+  isSearchMode.value = true;
+  try {
+    brandLoading.value = true;
+    const res = await listBrand({
+      brandName: query,
+      pageNum: 1,
+      pageSize: 100
+    });
+    brandList.value = res.rows || [];
+    hasMoreBrands.value = false; // 搜索模式下不支持加载更多
+  } catch (e) {
+    console.error('搜索品牌失败:', e);
+  } finally {
+    brandLoading.value = false;
+  }
+};
+
+/** 下拉框显示/隐藏 */
+const handleBrandDropdownVisible = async (visible: boolean) => {
+  if (visible && brandList.value.length === 0) {
+    await getBrandList(true);
+    // 添加滚动监听
+    await nextTick();
+    addScrollListener();
+  } else if (!visible) {
+    // 移除滚动监听
+    removeScrollListener();
+  }
+};
+
+/** 添加滚动监听 */
+const addScrollListener = () => {
+  const dropdown = document.querySelector('.el-select-dropdown__wrap');
+  if (dropdown) {
+    dropdown.addEventListener('scroll', handleScroll);
+  }
+};
+
+/** 移除滚动监听 */
+const removeScrollListener = () => {
+  const dropdown = document.querySelector('.el-select-dropdown__wrap');
+  if (dropdown) {
+    dropdown.removeEventListener('scroll', handleScroll);
+  }
+};
+
+/** 处理滚动事件 */
+const handleScroll = async (e: Event) => {
+  const target = e.target as HTMLElement;
+  const scrollTop = target.scrollTop;
+  const scrollHeight = target.scrollHeight;
+  const clientHeight = target.clientHeight;
+  
+  // 滚动到底部,且不在搜索模式,且还有更多数据,且不在加载中
+  if (scrollTop + clientHeight >= scrollHeight - 10 && 
+      !isSearchMode.value && 
+      hasMoreBrands.value && 
+      !brandLoading.value) {
+    await loadMoreBrands();
+  }
+};
+
+/** 加载更多品牌 */
+const loadMoreBrands = async () => {
+  brandPagination.value.pageNum++;
+  await getBrandList(false);
+};
+
+/** 获取授权详情列表 */
+const getAuthorizationList = async () => {
+  let supplierId = userStore.supplierId;
+  
+  if (!supplierId) {
+    console.warn('supplierId 为空,无法获取授权详情');
+    return;
+  }
+
+  try {
+    loading.value = true;
+    console.log('获取授权详情列表,供应商ID:', supplierId);
+    const res = await getAuthorizeDetailList({ 
+      supplierId: supplierId,
+      brandName: searchParams.value.brandName,
+      province: searchParams.value.province,
+      city: searchParams.value.city,
+      pageNum: pagination.value.pageNum,
+      pageSize: pagination.value.pageSize
+    });
+    authorizationList.value = res.data || [];
+    pagination.value.total = authorizationList.value.length;
+    console.log('授权详情列表:', authorizationList.value);
+  } catch (e) {
+    console.error('获取授权详情列表失败:', e);
+    ElMessage.error('获取授权详情列表失败');
+  } finally {
+    loading.value = false;
+  }
+};
+
+/** 搜索 */
+const handleSearch = () => {
+  pagination.value.pageNum = 1;
+  getAuthorizationList();
+};
+
+/** 重置 */
+const handleReset = () => {
+  searchParams.value = {
+    brandName: '',
+    province: '',
+    city: ''
+  };
+  pagination.value.pageNum = 1;
+  getAuthorizationList();
+};
+
+/** 添加授权 */
+const handleAdd = () => {
+  router.push('/supplier/author/edit');
+};
+
+/** 查看/编辑 */
+const handleView = (row: any) => {
+  console.log('查看/编辑:', row);
+  router.push({
+    path: '/supplier/author/edit',
+    query: { id: row.id }
+  });
+};
+
+/** 分页大小改变 */
+const handleSizeChange = (size: number) => {
+  pagination.value.pageSize = size;
+  getAuthorizationList();
+};
+
+/** 当前页改变 */
+const handleCurrentChange = (page: number) => {
+  pagination.value.pageNum = page;
+  getAuthorizationList();
+};
+
+/** 格式化日期 */
+const formatDate = (date: string | Date) => {
+  if (!date) return '-';
+  const d = new Date(date);
+  // 使用本地时区格式化日期,避免时区问题
+  const year = d.getFullYear();
+  const month = String(d.getMonth() + 1).padStart(2, '0');
+  const day = String(d.getDate()).padStart(2, '0');
+  return `${year}-${month}-${day}`;
+};
+
+/** 获取授权状态文本 */
+const getAuthorizedStatusText = (status: string) => {
+  const statusMap = {
+    '0': '待审核',
+    '1': '已生效',
+    '2': '已过期'
+  };
+  return statusMap[status] || '未知';
+};
+
+onMounted(async () => {
+  // 并行加载品牌列表和授权详情列表
+  await Promise.all([
+    getBrandList(true),
+    getAuthorizationList()
+  ]);
+});
+</script>
+
+<style scoped>
+.app-container {
+  padding: 20px;
+  background: #f0f2f5;
+  min-height: calc(100vh - 84px);
+}
+
+.search-form {
+  background: #fff;
+  padding: 20px;
+  margin-bottom: 20px;
+  border-radius: 4px;
+}
+
+.table-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  background: #fff;
+  padding: 16px 20px;
+  margin-bottom: 0;
+  border-radius: 4px 4px 0 0;
+}
+
+.table-title {
+  font-size: 16px;
+  font-weight: 500;
+  color: #333;
+}
+
+.el-table {
+  border-radius: 0 0 4px 4px;
+}
+
+.empty-state {
+  text-align: center;
+  padding: 40px;
+  color: #999;
+  background: #fff;
+}
+
+.pagination-container {
+  display: flex;
+  justify-content: flex-end;
+  padding: 20px;
+  background: #fff;
+  border-radius: 0 0 4px 4px;
+}
+</style>

+ 3581 - 0
src/views/supplier/info/index.vue

@@ -0,0 +1,3581 @@
+<template>
+  <div class="app-container">
+    <!-- 页面头部 -->
+    <div class="detail-header">
+      <el-icon class="back-icon" @click="goBack"><ArrowLeft /></el-icon>
+      <span class="header-title">查看供应商</span>
+    </div>
+
+    <!-- 标签页 -->
+    <el-tabs v-model="activeTab" class="detail-tabs">
+      <!-- 基本信息 -->
+      <el-tab-pane label="基本信息" name="basic">
+        <div class="tab-content">
+          <!-- 企业基本信息 -->
+          <div class="info-section">
+            <div class="section-title-row">
+              <div class="section-title-left">
+                <span class="section-title-text">企业基本信息</span>
+                <span class="section-title-divider">/</span>
+                <span class="supplier-no">供应商编码:{{ detailData.supplierNo }}</span>
+              </div>
+              <el-button type="primary" icon="Document" @click="handleSave">保存</el-button>
+            </div>
+
+            <el-form :model="detailData" label-width="100px" class="detail-form">
+              <el-row :gutter="40" class="form-row">
+                <el-col :span="8">
+                  <el-form-item label="所属公司:" required>
+                    <el-select v-model="detailData.ownedCompany" placeholder="请选择" clearable filterable style="width: 100%;" disabled>
+                      <el-option
+                        v-for="company in companyOptions"
+                        :key="company.id"
+                        :label="company.companyName"
+                        :value="company.id"
+                      />
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="企业名称:" required>
+                    <el-input v-model="detailData.enterpriseName" placeholder="请输入企业名称" disabled>
+                      <template #append v-if="isAddMode && !isBasicInfoSaved">
+                        <el-button 
+                          type="primary" 
+                          @click="handleGetBusinessInfo"
+                          :loading="businessInfoLoading"
+                          :icon="businessInfoLoading ? '' : 'Search'"
+                        >
+                          {{ businessInfoLoading ? '获取中...' : '获取工商信息' }}
+                        </el-button>
+                      </template>
+                    </el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="工商名称:">
+                    <el-input v-model="detailData.businessName" placeholder="请输入工商名称" disabled />
+                  </el-form-item>
+                </el-col>
+              </el-row>
+
+              <el-row :gutter="40" class="form-row">
+                <el-col :span="8">
+                  <el-form-item label="企业简称:" required>
+                    <el-input v-model="detailData.shortName" placeholder="请输入企业简称" />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="供应商等级:" required>
+                    <el-select v-model="detailData.cooperateLevel" placeholder="请选择" clearable filterable style="width: 100%;" disabled>
+                      <el-option
+                        v-for="level in supplierLevelOptions"
+                        :key="level.id"
+                        :label="level.supplierLevelName"
+                        :value="String(level.id)"
+                      />
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="企业规模:" required>
+                    <el-select v-model="detailData.membershipSize" placeholder="请选择" clearable filterable style="width: 100%;" disabled>
+                      <el-option
+                        v-for="scale in enterpriseScaleOptions"
+                        :key="scale.id"
+                        :label="scale.enterpriseScaleName"
+                        :value="scale.id"
+                      />
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+
+              <el-row :gutter="40" class="form-row">
+                <el-col :span="8">
+                  <el-form-item label="行业类别:" required>
+                    <el-select v-model="detailData.industrCategory" placeholder="请选择" clearable filterable style="width: 100%;" disabled>
+                      <el-option
+                        v-for="industry in industryCategoryOptions"
+                        :key="industry.id"
+                        :label="industry.industryCategoryName"
+                        :value="industry.id"
+                      />
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="供应商类型:" required>
+                    <el-select v-model="detailData.supplierType" placeholder="请选择" clearable filterable style="width: 100%;" disabled>
+                      <el-option
+                        v-for="type in supplierTypeOptions"
+                        :key="type.id"
+                        :label="type.supplierTypeName"
+                        :value="type.id"
+                      />
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="固定电话:">
+                    <el-input v-model="detailData.fixedPhone" placeholder="请输入固定电话" disabled />
+                  </el-form-item>
+                </el-col>
+              </el-row>
+
+              <el-row :gutter="40" class="form-row">
+                <el-col :span="8">
+                  <el-form-item label="传真:">
+                    <el-input v-model="detailData.fax" placeholder="请输入传真" disabled />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="企业邮箱:">
+                    <el-input v-model="detailData.mailbox" placeholder="请输入企业邮箱" disabled />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="开始时间:">
+                    <el-date-picker
+                      v-model="detailData.validityFromDate"
+                      type="date"
+                      placeholder="请选择"
+                      style="width: 100%;"
+                      disabled
+                    />
+                  </el-form-item>
+                </el-col>
+              </el-row>
+
+              <el-row :gutter="40" class="form-row">
+                <el-col :span="8">
+                  <el-form-item label="结束时间:">
+                    <el-date-picker
+                      v-model="detailData.validityToDate"
+                      type="date"
+                      placeholder="请选择"
+                      style="width: 100%;"
+                      disabled
+                    />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="邮政编码:">
+                    <el-input v-model="detailData.postCode" placeholder="请输入邮政编码" disabled />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="网址:">
+                    <el-input v-model="detailData.url" placeholder="请输入网址" disabled />
+                  </el-form-item>
+                </el-col>
+              </el-row>
+
+              <el-row :gutter="40" class="form-row">
+                <el-col :span="8">
+                  <el-form-item label="详细地址:" required>
+                    <el-cascader
+                      v-model="selectedOfficeRegion"
+                      :options="regionOptions"
+                      :props="regionCascaderProps"
+                      placeholder="请选择省市区"
+                      clearable
+                      filterable
+                      style="width: 100%;"
+                      @change="handleOfficeRegionChange"
+                      disabled
+                    />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label=" " label-width="0">
+                    <el-input v-model="detailData.officeAddress" placeholder="请输入详细地址" disabled />
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form>
+          </div>
+
+          <!-- 工商信息 -->
+          <div class="info-section">
+            <div class="section-title">工商信息</div>
+
+            <el-row :gutter="40" class="form-row">
+              <el-col :span="8">
+                <div class="form-item">
+                  <span class="label">企业工商名称:</span>
+                  <span class="value">{{ businessInfo.businessName || detailData.businessName || '' }}</span>
+                </div>
+              </el-col>
+              <el-col :span="8">
+                <div class="form-item">
+                  <span class="label">登记机关:</span>
+                  <span class="value">{{ businessInfo.registrationAuthority || '' }}</span>
+                </div>
+              </el-col>
+              <el-col :span="8">
+                <div class="form-item">
+                  <span class="label">成立日期:</span>
+                  <span class="value">{{ formatDate(businessInfo.establishmentDate) || '' }}</span>
+                </div>
+              </el-col>
+            </el-row>
+
+            <el-row :gutter="40" class="form-row">
+              <el-col :span="8">
+                <div class="form-item">
+                  <span class="label">登记状态:</span>
+                  <span class="value">{{ businessInfo.registrationStatus || '' }}</span>
+                </div>
+              </el-col>
+              <el-col :span="8">
+                <div class="form-item">
+                  <span class="label">实缴资本:</span>
+                  <span class="value">{{ businessInfo.paidInCapital || '' }}</span>
+                </div>
+              </el-col>
+              <el-col :span="8">
+                <div class="form-item">
+                  <span class="label">社会信用代码:</span>
+                  <span class="value">{{ businessInfo.socialCreditCode || detailData.socialCreditCode || '' }}</span>
+                </div>
+              </el-col>
+            </el-row>
+
+            <el-row :gutter="40" class="form-row">
+              <el-col :span="8">
+                <div class="form-item">
+                  <span class="label">法人姓名:</span>
+                  <span class="value">{{ businessInfo.legalPersonName || '' }}</span>
+                </div>
+              </el-col>
+              <el-col :span="8">
+                <div class="form-item">
+                  <span class="label">注册资本:</span>
+                  <span class="value">{{ businessInfo.registeredCapital || '' }}</span>
+                </div>
+              </el-col>
+              
+            </el-row>
+
+          
+
+            <el-row :gutter="40" class="form-row">
+              <el-col :span="24">
+                <div class="form-item">
+                  <span class="label">工商地址:</span>
+                  <el-input v-model="businessInfo.businessAddress" placeholder="工商地址" style="width: 70%;" />
+                </div>
+              </el-col>
+            </el-row>
+          </div>
+
+          <!-- 付款信息 -->
+          <div class="info-section">
+            <div class="section-title">
+              付款信息
+            </div>
+            <el-table :data="paymentInfoList" border style="width: 100%">
+              <el-table-column prop="num" label="是否主账号" align="center">
+                <template #default="scope">
+                  <span>{{ scope.row.num === 1 ? '是' : '否' }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column prop="bankName" label="开户银行" align="center" />
+              <el-table-column prop="bankNo" label="银行账户" align="center" />
+
+              
+            </el-table>
+
+            <!-- 空状态 -->
+            <div v-if="paymentInfoList.length === 0" style="text-align: center; padding: 40px; color: #999;">
+              暂无付款信息
+            </div>
+          </div>
+        </div>
+      </el-tab-pane>
+
+      <!-- 采购信息 -->
+      <el-tab-pane label="采销信息" name="purchase" :disabled="isAddMode && !isBasicInfoSaved">
+        <div class="tab-content">
+          <div class="info-section">
+            <div class="section-title">
+              采购信息
+            </div>
+
+            <el-row :gutter="40" class="form-row">
+              <el-col :span="12">
+                <div class="form-item">
+                  <span class="label">产品经理:</span>
+                  <el-select
+                    v-model="selectedProductManager"
+                    placeholder="请选择产品经理"
+                    filterable
+                    clearable
+                    style="width: 300px;"
+                  >
+                    <el-option
+                      v-for="item in staffOptions"
+                      :key="item.staffId"
+                      :label="item.displayText"
+                      :value="item.staffId"
+                    />
+                  </el-select>
+                </div>
+              </el-col>
+              <el-col :span="12">
+                <div class="form-item">
+                  <span class="label">采购员:</span>
+                  <el-select
+                    v-model="selectedBuyer"
+                    placeholder="请选择采购员"
+                    filterable
+                    clearable
+                    style="width: 300px;"
+                  >
+                    <el-option
+                      v-for="item in staffOptions"
+                      :key="item.staffId"
+                      :label="item.displayText"
+                      :value="item.staffId"
+                    />
+                  </el-select>
+                </div>
+              </el-col>
+            </el-row>
+          </div>
+        </div>
+      </el-tab-pane>
+
+      <!-- 联系人 -->
+      <el-tab-pane label="联系人" name="contact" :disabled="isAddMode && !isBasicInfoSaved">
+        <div class="tab-content">
+          <div class="info-section">
+            <div class="section-title-row">
+              <div class="section-title-left">
+                <span class="section-title-text">业务联系人</span>
+              </div>
+              <el-button type="primary" icon="Plus" @click="handleAddContact">新增联系人</el-button>
+            </div>       
+            <!-- 联系人表格 -->
+            <el-table v-loading="contactLoading" :data="contactList" border style="width: 100%">
+              <el-table-column prop="supplierName" label="所属供应商" align="center" />
+              <el-table-column prop="userNo" label="用户ID" align="center" />
+              <el-table-column prop="abutment_no" label="A10标识号" align="center" />
+              <el-table-column prop="userName" label="员工姓名" align="center" />
+              <el-table-column prop="phone" label="手机号" align="center" />
+              <el-table-column prop="roleNo" label="角色" align="center" />
+              <el-table-column prop="departmentNo" label="部门" align="center" />
+              <el-table-column prop="position" label="职位" align="center" />
+              <el-table-column prop="isPrimaryContact" label="主要联系人" align="center">
+                <template #default="scope">
+                  <span>{{ scope.row.isPrimaryContact === '1' ? '是' : '否' }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column prop="isRegister" label="允许登录供应商端" align="center">
+                <template #default="scope">
+                  <span>{{ scope.row.isRegister === '1' ? '是' : '否' }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="操作" align="center">
+                <template #default="scope">
+                  <el-button link type="primary" @click="handleViewContact(scope.row)">查看</el-button>
+                  <el-button link type="primary" @click="handleEditContact(scope.row)">编辑</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </div>
+      </el-tab-pane>
+
+      <!-- 供应信息 -->
+      <el-tab-pane label="供应信息" name="supply" :disabled="isAddMode && !isBasicInfoSaved">
+        <div class="tab-content">
+          <div class="info-section">
+            <div class="section-title-row">
+              <div class="section-title-left">
+                <span class="section-title-text">供货类目</span>
+              </div>
+              <el-button type="primary" icon="Document" @click="handleSaveCategories">保存</el-button>
+            </div>
+
+            <!-- 产品分类复选框 -->
+            <el-checkbox-group v-model="selectedCategories" class="category-group">
+              <el-checkbox
+                v-for="category in productCategoryList"
+                :key="category.id"
+                :label="String(category.id)"
+              >
+                {{ category.categoryName }}
+              </el-checkbox>
+            </el-checkbox-group>
+          </div>
+
+          <div class="info-section">
+            <div class="section-title-row">
+              <div class="section-title-left">
+                <span class="section-title-text">供货品牌</span>
+              </div>
+              <div>
+                <el-button type="primary" icon="Plus" @click="handleAddBrand">编辑</el-button>
+              </div>
+            </div>
+            <div class="brand-display-wrapper">
+              <el-tag
+                v-for="brand in selectedBrands"
+                :key="brand.id"
+                closable
+                @close="handleRemoveBrand(brand)"
+                style="margin-right: 10px; margin-bottom: 10px;"
+              >
+                {{ brand.brandName }}
+              </el-tag>
+              <span v-if="selectedBrands.length === 0" style="color: #999;">暂无品牌信息</span>
+            </div>
+          </div>
+
+          <div class="info-section">
+            <div class="section-title-row">
+              <div class="section-title-left">
+                <span class="section-title-text">供货区域</span>
+              </div>
+              <el-button type="primary" icon="Edit" @click="handleEditSupplyArea">编辑</el-button>
+            </div>
+            <el-table :data="supplyAreaList" border style="width: 100%">
+              <el-table-column type="index" label="序号" align="center" width="80" />
+              <el-table-column prop="province" label="供货区域(省)" align="center">
+                <template #default="scope">
+                  <span>{{ scope.row.province || '' }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column prop="city" label="供货区域(市)" align="center">
+                <template #default="scope">
+                  <span>{{ scope.row.city || '' }}</span>
+                </template>
+              </el-table-column>
+              
+            </el-table>
+          </div>
+
+          <div class="info-section">
+            <div class="section-title">授权详情信息列表</div>
+            <el-table :data="authorizationList" border style="width: 100%">
+              <el-table-column prop="supplierName" label="供应商名称" align="center" />
+              <el-table-column prop="brandName" label="品牌名称" align="center" />
+              <el-table-column label="一级类目" align="center">
+                <template #default="scope">
+                  <span>{{ scope.row.categorysMap?.oneLevelName || '-' }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="二级类目" align="center">
+                <template #default="scope">
+                  <span>{{ scope.row.categorysMap?.twoLevelName || '-' }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="三级类目" align="center">
+                <template #default="scope">
+                  <span>{{ scope.row.categorysMap?.threeLevelName || '-' }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column prop="authorizationEndTime" label="禁止时间" align="center">
+                <template #default="scope">
+                  <span>{{ scope.row.authorizationEndTime ? formatDate(scope.row.authorizationEndTime) : '-' }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column prop="province" label="授权区域(省)" align="center" />
+              <el-table-column prop="city" label="授权区域(市)" align="center" />
+              <el-table-column prop="authorizedStatus" label="状态" align="center">
+                <template #default="scope">
+                  <span>{{ getAuthorizedStatusText(scope.row.authorizedStatus) }}</span>
+                </template>
+              </el-table-column>
+            </el-table>
+            <!-- 分页 -->
+            <div style="margin-top: 20px; display: flex; justify-content: flex-end;">
+              <el-pagination
+                v-model:current-page="authorizationPagination.pageNum"
+                v-model:page-size="authorizationPagination.pageSize"
+                :page-sizes="[10, 20, 50, 100]"
+                :total="authorizationPagination.total"
+                layout="total, sizes, prev, pager, next, jumper"
+                @size-change="handleAuthorizationSizeChange"
+                @current-change="handleAuthorizationCurrentChange"
+              />
+            </div>
+          </div>
+        </div>
+      </el-tab-pane>
+
+      <!-- 地址管理 -->
+      <el-tab-pane label="地址管理" name="address" :disabled="isAddMode && !isBasicInfoSaved">
+        <div class="tab-content">
+          <div class="info-section">
+            <div class="section-title">地址信息列表</div>
+            <el-button icon="Plus" type="primary" @click="handleAddAddress">添加地址</el-button>
+            <el-table :data="addressList" border style="width: 100%">
+              <el-table-column prop="supplierNo" label="供应商编号" align="center" />
+              <el-table-column prop="addressNo" label="地址编号" align="center" />
+              <el-table-column prop="shipperName" label="姓名" align="center" />
+              <el-table-column prop="shipperPhone" label="手机号码" align="center" />
+              <el-table-column prop="shippingProvincial" label="省份" align="center" />
+              <el-table-column prop="shippingCity" label="市" align="center" />
+              <el-table-column prop="shippingCounty" label="区县" align="center" />
+              <el-table-column label="详细地址" align="center">
+                <template #default="scope">
+                  <span>{{ scope.row.shippingAddress || '-' }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column prop="shippingPostCode" label="邮政编码" align="center" />
+              <el-table-column prop="isSelf" label="默认地址" align="center">
+                <template #default="scope">
+                  <span>{{ scope.row.isSelf === 1 || scope.row.isSelf === '1' ? '是' : '否' }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="操作" align="center" width="150">
+                <template #default="scope">
+                  <el-button link type="primary" @click="handleEditAddress(scope.row)">编辑</el-button>
+                  <el-button link type="danger" @click="handleDeleteAddress(scope.row)">删除</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+
+            <!-- 空状态 -->
+            <div v-if="addressList.length === 0" style="text-align: center; padding: 40px; color: #999;">
+              暂无地址信息
+            </div>
+          </div>
+        </div>
+      </el-tab-pane>
+
+      <!-- 合同管理 -->
+      <el-tab-pane label="合同管理" name="contract" :disabled="isAddMode && !isBasicInfoSaved">
+        <div class="tab-content">
+          <div class="info-section">
+            <!-- 搜索表单 -->
+            <el-form :model="contractSearchParams" :inline="true" style="margin-bottom: 20px;">
+              <el-form-item label="合同编号">
+                <el-input v-model="contractSearchParams.contractNo" placeholder="请输入合同编号" clearable style="width: 200px;" />
+              </el-form-item>
+              <el-form-item label="合同名称">
+                <el-input v-model="contractSearchParams.contractName" placeholder="请输入合同名称" clearable style="width: 200px;" />
+              </el-form-item>
+              <el-form-item label="合同类型">
+                <el-select v-model="contractSearchParams.contractType" placeholder="请选择" clearable filterable style="width: 150px;">
+                  <el-option label="年度合作" value="0" />
+                  <el-option label="项目采购" value="1" />
+                  <el-option label="其他合作" value="2" />
+                </el-select>
+              </el-form-item>
+              
+              <el-form-item>
+                <el-button type="primary" icon="Search" @click="handleContractSearch">搜索</el-button>
+                <el-button icon="Refresh" @click="handleContractReset">重置</el-button>
+                
+              </el-form-item>
+            </el-form>
+
+            <div class="section-title">合同信息列表</div>
+
+            <!-- 合同表格 -->
+            <el-table :data="contractList" border style="width: 100%">
+              <el-table-column prop="contractNo" label="合同编号" align="center" />
+              <el-table-column prop="contractName" label="合同名称" align="center" />
+              <el-table-column prop="contractType" label="合同类型" align="center">
+                <template #default="scope">
+                  <span>{{ getContractTypeText(scope.row.contractType) }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column prop="contractAmount" label="金额(万)" align="center">
+                <template #default="scope">
+                  <span>{{ scope.row.contractAmount || '-' }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column prop="contractStartTime" label="起始时间" align="center">
+                <template #default="scope">
+                  <span>{{ scope.row.contractStartTime ? formatDate(scope.row.contractStartTime) : '-' }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column prop="contractEndTime" label="截止时间" align="center">
+                <template #default="scope">
+                  <span>{{ scope.row.contractEndTime ? formatDate(scope.row.contractEndTime) : '-' }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column prop="createTime" label="上传时间" align="center">
+                <template #default="scope">
+                  <span>{{ scope.row.createTime ? formatDate(scope.row.createTime) : '-' }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column prop="contractAttachment" label="附件管理" align="center">
+                <template #default="scope">
+                  <el-button v-if="scope.row.contractAttachment" link type="primary" @click="handleViewAttachment(scope.row)">查看附件</el-button>
+                  <span v-else>-</span>
+                </template>
+              </el-table-column>
+              <el-table-column prop="contractStatus" label="状态" align="center">
+                <template #default="scope">
+                  <span>{{ getContractStatusText(scope.row.contractStatus) }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="操作" align="center" width="80">
+                <template #default="scope">
+                  <el-button link type="primary" @click="handleViewContract(scope.row)">查看</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+
+
+            <!-- 分页 -->
+            <div style="margin-top: 20px; display: flex; justify-content: flex-end;">
+              <el-pagination
+                v-model:current-page="contractPagination.pageNum"
+                v-model:page-size="contractPagination.pageSize"
+                :page-sizes="[10, 20, 50, 100]"
+                :total="contractPagination.total"
+                layout="total, sizes, prev, pager, next, jumper"
+                @size-change="handleContractSizeChange"
+                @current-change="handleContractCurrentChange"
+              />
+            </div>
+          </div>
+        </div>
+      </el-tab-pane>
+    </el-tabs>
+
+    <!-- 营业执照选择器 -->
+    <FileSelector
+      v-model="businessLicenseDialogVisible"
+      :allowed-types="[1]"
+      :multiple="false"
+      title="选择营业执照"
+      @confirm="handleBusinessLicenseConfirm"
+    />
+
+    <!-- 法人身份证照片选择器 -->
+    <FileSelector
+      v-model="personImageDialogVisible"
+      :allowed-types="[1]"
+      :multiple="false"
+      title="选择法人身份证照片"
+      @confirm="handlePersonImageConfirm"
+    />
+
+    <!-- 付款信息对话框 -->
+    <el-dialog
+      v-model="paymentDialogVisible"
+      :title="paymentDialogTitle"
+      width="1000px"
+      :close-on-click-modal="false"
+    >
+      <el-form
+        ref="paymentFormRef"
+        :model="paymentForm"
+        :rules="paymentFormRules"
+        label-width="140px"
+        :disabled="paymentDialogReadonly"
+      >
+        <el-form-item label="开票类型:" prop="invoiceTypeNo">
+          <el-select 
+            v-model="paymentForm.invoiceTypeNo" 
+            placeholder="请选择" 
+            style="width: 100%;"
+            @change="handleInvoiceTypeChange"
+          >
+            <el-option 
+              v-for="item in invoiceTypeList" 
+              :key="item.id" 
+              :label="item.invoiceTypeName" 
+              :value="item.id" 
+            />
+          </el-select>
+        </el-form-item>
+
+        <el-form-item label="发票抬头:" prop="businessName">
+          <el-input v-model="paymentForm.businessName" placeholder="企业工商名称" disabled/>
+        </el-form-item>
+
+        <el-form-item label="纳税人识别号:" prop="circlesName">
+          <el-input v-model="paymentForm.circlesName" placeholder="请输入纳税人识别号" disabled/>
+        </el-form-item>
+
+        <el-form-item label="开户行行号:" prop="bankNum">
+          <el-input v-model="paymentForm.bankNum" placeholder="请输入开户行行号" />
+        </el-form-item>
+
+        <el-form-item label="开户行名称:" prop="bankInfoNo">
+          <el-select 
+            v-model="paymentForm.bankInfoNo" 
+            placeholder="请选择" 
+            style="width: 100%;"
+            @change="handleBankChange"
+          >
+            <el-option 
+              v-for="item in systemBankList" 
+              :key="item.id" 
+              :label="item.bnName" 
+              :value="item.id" 
+            />
+          </el-select>
+        </el-form-item>
+
+        <el-form-item label="银行账户:" prop="bankNo">
+          <el-input v-model="paymentForm.bankNo" placeholder="请输入银行账户" />
+        </el-form-item>
+
+        <el-form-item label="固定电话:" prop="phone">
+          <el-input v-model="paymentForm.phone" placeholder="请输入固定电话" />
+        </el-form-item>
+
+        <el-form-item label="地址:" prop="businessAddress">
+          <el-input v-model="paymentForm.businessAddress" placeholder="工商地址" disabled />
+        </el-form-item>
+
+        <el-form-item label="是否主账号:" prop="num">
+          <el-radio-group v-model="paymentForm.num">
+            <el-radio :label="1">是</el-radio>
+            <el-radio :label="0">否</el-radio>
+          </el-radio-group>
+        </el-form-item>
+      </el-form>
+
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button @click="paymentDialogVisible = false">取消</el-button>
+          <el-button v-if="!paymentDialogReadonly" type="primary" @click="handlePaymentSubmit" :loading="paymentSubmitLoading">确定</el-button>
+        </div>
+      </template>
+    </el-dialog>
+
+    <!-- 联系人对话框 -->
+    <el-dialog
+      v-model="contactDialogVisible"
+      :title="contactDialogTitle"
+      width="900px"
+      :close-on-click-modal="false"
+    >
+      <el-form
+        ref="contactFormRef"
+        :model="contactForm"
+        :rules="contactFormRules"
+        label-width="140px"
+        :disabled="contactDialogReadonly"
+      >
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="员工姓名:" prop="userName">
+              <el-input v-model="contactForm.userName" placeholder="请输入员工姓名" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="手机号:" prop="phone">
+              <el-input v-model="contactForm.phone" placeholder="请输入手机号" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="部门:" prop="departmentNo">
+              <el-input v-model="contactForm.departmentNo" placeholder="请输入部门" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="职位:" prop="position">
+              <el-input v-model="contactForm.position" placeholder="请输入职位" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="角色:" prop="roleNo">
+              <el-input v-model="contactForm.roleNo" placeholder="请输入角色" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="邮箱:" prop="email">
+              <el-input v-model="contactForm.email" placeholder="请输入邮箱" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="主要联系人:" prop="isPrimaryContact">
+              <el-select v-model="contactForm.isPrimaryContact" placeholder="请选择" style="width: 100%;">
+                <el-option label="是" value="1" />
+                <el-option label="否" value="0" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="允许登录供应商端:" prop="isRegister">
+              <el-select v-model="contactForm.isRegister" placeholder="请选择" style="width: 100%;">
+                <el-option label="是" value="1" />
+                <el-option label="否" value="0" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="传真:" prop="fax">
+              <el-input v-model="contactForm.fax" placeholder="请输入传真" />
+            </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="contactForm.remark"
+                type="textarea"
+                :rows="3"
+                placeholder="请输入备注"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button @click="contactDialogVisible = false">取消</el-button>
+          <el-button v-if="!contactDialogReadonly" type="primary" @click="handleContactSubmit" :loading="contactSubmitLoading">确定</el-button>
+        </div>
+      </template>
+    </el-dialog>
+
+    <!-- 供货区域编辑对话框 -->
+    <el-dialog
+      v-model="supplyAreaDialogVisible"
+      title="编辑供货区域"
+      width="700px"
+      :close-on-click-modal="false"
+    >
+      <el-cascader
+        v-model="selectedSupplyAreas"
+        :options="supplyAreaOptions"
+        :props="cascaderProps"
+        placeholder="请选择供货区域"
+        clearable
+        filterable
+        collapse-tags
+        collapse-tags-tooltip
+        style="width: 100%;"
+      />
+
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button @click="supplyAreaDialogVisible = false">取消</el-button>
+          <el-button type="primary" @click="handleSupplyAreaSubmit" :loading="supplyAreaSubmitLoading">确定</el-button>
+        </div>
+      </template>
+    </el-dialog>
+
+    <!-- 地址管理对话框 -->
+    <el-dialog
+      v-model="addressDialogVisible"
+      :title="addressDialogTitle"
+      width="650px"
+      :close-on-click-modal="false"
+    >
+      <el-form
+        ref="addressFormRef"
+        :model="addressForm"
+        :rules="addressFormRules"
+        label-width="120px"
+        :disabled="addressDialogReadonly"
+      >
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="供应商编号:">
+              <el-input v-model="addressForm.supplierNo" disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="收货人:" prop="shipperName" required>
+              <el-input v-model="addressForm.shipperName" placeholder="请输入收货人" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="手机号码:" prop="shipperPhone" required>
+              <el-input v-model="addressForm.shipperPhone" placeholder="请输入手机号码" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="邮政编码:" prop="shippingPostCode">
+              <el-input v-model="addressForm.shippingPostCode" placeholder="请输入邮政编码" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="24">
+            <el-form-item label="地址:" prop="shippingProvincial" required>
+              <el-cascader
+                v-model="selectedAddressRegion"
+                :options="regionOptions"
+                :props="regionCascaderProps"
+                placeholder="请选择"
+                clearable
+                filterable
+                style="width: 100%;"
+                @change="handleAddressRegionChange"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="24">
+            <el-form-item label="详细地址:" prop="shippingAddress">
+              <el-input
+                v-model="addressForm.shippingAddress"
+                type="textarea"
+                :rows="3"
+                placeholder="请输入详细地址"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="默认地址:">
+              <el-switch v-model="addressForm.isSelf" :active-value="1" :inactive-value="0" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button @click="addressDialogVisible = false">取消</el-button>
+          <el-button v-if="!addressDialogReadonly" type="primary" @click="handleAddressSubmit" :loading="addressSubmitLoading">确定</el-button>
+        </div>
+      </template>
+    </el-dialog>
+
+    <!-- 合同管理对话框 -->
+    <el-dialog
+      v-model="contractDialogVisible"
+      :title="contractDialogTitle"
+      width="900px"
+      :close-on-click-modal="false"
+    >
+      <el-form
+        ref="contractFormRef"
+        :model="contractForm"
+        :rules="contractFormRules"
+        label-width="140px"
+        :disabled="contractDialogReadonly"
+      >
+        <el-row :gutter="20">
+          <el-col :span="24">
+            <el-form-item label="合同名称:" prop="contractName">
+              <el-input v-model="contractForm.contractName" placeholder="请输入合同名称" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="合同类型:" prop="contractType">
+              <el-select v-model="contractForm.contractType" placeholder="请选择" style="width: 100%;">
+                <el-option
+                  v-for="item in contractTypeDict"
+                  :key="item.dictValue"
+                  :label="item.dictLabel"
+                  :value="item.dictValue"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="提醒时间:" prop="demandReminderTime">
+              <el-input-number
+                v-model="contractForm.demandReminderTime"
+                :min="1"
+                :max="365"
+                style="width: 150px;"
+              />
+              <span style="margin-left: 10px;">天</span>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="开始时间:" prop="contractStartTime">
+              <el-date-picker
+                v-model="contractForm.contractStartTime"
+                type="date"
+                placeholder="请选择"
+                style="width: 100%;"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="截止时间:" prop="contractEndTime">
+              <el-date-picker
+                v-model="contractForm.contractEndTime"
+                type="date"
+                placeholder="请选择"
+                style="width: 100%;"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="开票类型:" prop="invoiceType">
+              <el-select v-model="contractForm.invoiceType" placeholder="请选择" style="width: 100%;">
+                <el-option
+                  v-for="item in invoiceTypeList"
+                  :key="item.id"
+                  :label="item.invoiceTypeName"
+                  :value="item.id"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="合同金额:" prop="contractAmount">
+              <el-input v-model="contractForm.contractAmount" placeholder="请输入">
+                <template #append>万元</template>
+              </el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="税率:" prop="taxRate">
+              <el-select v-model="contractForm.taxRate" placeholder="请选择" style="width: 100%;">
+                <el-option
+                  v-for="item in taxRateList"
+                  :key="item.id"
+                  :label="item.taxrateName"
+                  :value="item.id"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="结算方式:" prop="settlementMethod">
+              <el-select v-model="contractForm.settlementMethod" placeholder="请选择" style="width: 100%;">
+                <el-option
+                  v-for="item in settlementMethodList"
+                  :key="item.id"
+                  :label="item.settlementName"
+                  :value="item.id"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="24">
+            <el-form-item label="合同附件:" prop="contractAttachment">
+              <FileUpload
+                v-model="contractForm.contractAttachment"
+                :limit="10"
+                :file-size="50"
+                :file-type="['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'pdf']"
+                :disabled="contractDialogReadonly"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="24">
+            <el-form-item label="合同说明:" prop="contractDescription">
+              <el-input
+                v-model="contractForm.contractDescription"
+                type="textarea"
+                :rows="4"
+                placeholder="请输入合同说明"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button @click="contractDialogVisible = false">取消</el-button>
+          <el-button v-if="!contractDialogReadonly" type="primary" @click="handleContractSubmit" :loading="contractSubmitLoading">确定</el-button>
+        </div>
+      </template>
+    </el-dialog>
+
+    <!-- 品牌新增对话框 -->
+    <el-dialog
+      v-model="brandDialogVisible"
+      title="添加品牌"
+      width="600px"
+      :close-on-click-modal="false"
+    >
+      <div style="margin-bottom: 20px;">
+        <el-form :inline="true" @submit.prevent>
+          <el-form-item label="品牌名称:">
+            <el-input
+              v-model="brandSearchKeyword"
+              placeholder="请输入品牌名称"
+              style="width: 200px;"
+              @keyup.enter="handleSearchBrand"
+            />
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" @click="handleSearchBrand" :loading="brandSearchLoading">搜索</el-button>
+            <el-button type="primary" @click="handleAddBrandToList()">添加</el-button>
+          </el-form-item>
+        </el-form>
+      </div>
+
+      <!-- 搜索结果列表 -->
+      <div v-if="brandSearchResults.length > 0" class="brand-search-results">
+        <div class="search-results-title">搜索结果:</div>
+        <div class="brand-result-item"
+          v-for="brand in brandSearchResults"
+          :key="brand.id"
+          @click="handleAddBrandToList(brand)"
+        >
+          <span class="brand-result-name">{{ brand.brandName }}</span>
+          <span class="brand-result-no">编号: {{ brand.brandNo }}</span>
+        </div>
+      </div>
+
+      <div class="selected-brands-section">
+        <div class="section-label">已选择品牌:</div>
+        <div class="brand-tags-container">
+          <el-tag
+            v-for="brand in tempSelectedBrands"
+            :key="brand.id"
+            closable
+            @close="handleRemoveTempBrand(brand)"
+            type="info"
+            style="margin-right: 10px; margin-bottom: 10px;"
+          >
+            {{ brand.brandName }}
+          </el-tag>
+          <span v-if="tempSelectedBrands.length === 0" style="color: #999; font-size: 14px;">暂无已选择品牌</span>
+        </div>
+      </div>
+
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button @click="handleBrandDialogClose">取消</el-button>
+          <el-button type="primary" @click="handleBrandSubmit" :loading="brandSubmitLoading">保存</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup lang="ts">
+import { ref, onMounted } from 'vue';
+import { useRoute, useRouter } from 'vue-router';
+import { ArrowLeft, Plus, Search } from '@element-plus/icons-vue';
+import { ElMessage, ElMessageBox } from 'element-plus';
+import { useUserStore } from '@/store/modules/user';
+import FileSelector from '@/components/FileSelector/index.vue';
+import FileUpload from '@/components/FileUpload/index.vue';
+import { getInfo, addInfo, updateInfo, getStaffListSplice, getSupplierStaffIds, getContactListById, getSupplierCategories, getSupplierContractsById, getBankBySupplierId, getAuthorizeDetailList, savePurchaseInfo, getDictData, getTaxRateList, getSettlementMethodList, getInvoiceTypeList, listInfo } from '@/api/supplier/info';
+import { getBank, updateBank, addBank } from '@/api/supplier/bank';
+import { BankForm } from '@/api/supplier/bank/types';
+import { getContact, addContact, updateContact, getSupplierContactlistById } from '@/api/supplier/contact';
+import { ContactForm } from '@/api/supplier/contact/types';
+import { InfoVO } from '@/api/supplier/info/types';
+import { listCompany } from '@/api/company/company';
+import { CompanyVO } from '@/api/company/company/types';
+import { listEnterpriseScale } from '@/api/supplier/customerCategory/enterpriseScale';
+import { EnterpriseScaleVO } from '@/api/supplier/customerCategory/enterpriseScale/types';
+import { listIndustryCategory } from '@/api/supplier/customerCategory/industryCategory';
+import { IndustryCategoryVO } from '@/api/supplier/customerCategory/industryCategory/types';
+import { listLevel } from '@/api/system/level';
+import { LevelVO } from '@/api/system/level/types';
+import { listType } from '@/api/system/type';
+import { TypeVO } from '@/api/system/type/types';
+import { listBrand, getBrand } from '@/api/product/brand';
+import { BrandVO } from '@/api/product/brand/types';
+import { getProductCategoryList } from '@/api/product/category';
+import { listAddress, getAddress, addAddress, updateAddress, delAddress } from '@/api/supplier/address';
+import { AddressForm, AddressQuery } from '@/api/supplier/address/types';
+import { addArea, listArea, getArea } from '@/api/supplier/area';
+import { listContract, getContract, addContract, updateContract } from '@/api/supplier/contract';
+import { ContractForm } from '@/api/supplier/contract/types';
+import { getBusinessInformation } from '@/api/supplier/businessInfo';
+import { regionData } from 'element-china-area-data';
+import { chinaAreaList } from '@/api/system/addressarea/index';
+import { listInvoiceType } from '@/api/system/invoiceType';
+import { InvoiceTypeVO } from '@/api/system/invoiceType/types';
+import { listBank as listSystemBank } from '@/api/system/bank';
+import { BankVO as SystemBankVO } from '@/api/system/bank/types';
+import { listByIds } from '@/api/system/oss';
+
+const route = useRoute();
+const router = useRouter();
+const userStore = useUserStore();
+
+const activeTab = ref('basic');
+const isAddMode = ref(false); // 是否为新增模式
+const isBasicInfoSaved = ref(false); // 基础信息是否已保存
+const currentSupplierId = ref<string | number | null>(null); // 当前登录用户所属的供应商ID
+const detailData = ref<InfoVO>({} as InfoVO);
+const staffOptions = ref<any[]>([]);
+const selectedProductManager = ref<number | null>(null);
+const selectedBuyer = ref<number | null>(null);
+const companyOptions = ref<CompanyVO[]>([]);
+const enterpriseScaleOptions = ref<EnterpriseScaleVO[]>([]);
+const industryCategoryOptions = ref<IndustryCategoryVO[]>([]);
+const supplierLevelOptions = ref<LevelVO[]>([]);
+const supplierTypeOptions = ref<TypeVO[]>([]);
+
+// 工商信息对象
+const businessInfo = ref<any>({});
+const businessInfoLoading = ref(false); // 获取工商信息的loading状态
+
+// 文件选择器相关
+const businessLicenseDialogVisible = ref(false);
+const personImageDialogVisible = ref(false);
+
+// 联系人相关数据
+const contactList = ref<any[]>([]);
+const contactLoading = ref(false);
+const contactSearchParams = ref({
+  userNo: '',
+  userName: ''
+});
+
+// 联系人对话框相关
+const contactDialogVisible = ref(false);
+const contactDialogTitle = ref('');
+const contactDialogReadonly = ref(false);
+const contactFormRef = ref<ElFormInstance>();
+const contactSubmitLoading = ref(false);
+const contactForm = ref<ContactForm>({
+  supplierNo: '',
+  supplierId: undefined,
+  userNo: '',
+  userName: '',
+  phone: '',
+  roleNo: '',
+  departmentNo: '',
+  position: '',
+  isPrimaryContact: '0',
+  isRegister: '0',
+  email: '',
+  fax: '',
+  remark: ''
+});
+
+// 联系人表单验证规则
+const contactFormRules = {
+  userName: [{ required: true, message: '请输入员工姓名', trigger: 'blur' }],
+  phone: [{ required: true, message: '请输入手机号', trigger: 'blur' }]
+};
+
+// 供应信息相关数据
+const productCategoryList = ref<any[]>([]);
+const selectedCategories = ref<string[]>([]);
+const supplyAreaList = ref<any[]>([]);
+
+// 授权详情信息列表
+const authorizationList = ref<any[]>([]);
+const authorizationPagination = ref({
+  pageNum: 1,
+  pageSize: 10,
+  total: 0
+});
+
+// 供货区域对话框相关
+const supplyAreaDialogVisible = ref(false);
+const supplyAreaSubmitLoading = ref(false);
+const selectedSupplyAreas = ref<any[]>([]); // 选中的供货区域(级联选择器的值)
+const supplyAreaOptions = ref<any[]>([]); // 供货区域选项(从接口获取)
+const savedAreaData = ref<any[]>([]); // 已保存的供货区域数据
+const cascaderProps = {
+  multiple: true,
+  checkStrictly: true, // 改为 true,允许选择任意级别
+  value: 'areaCode',
+  label: 'areaName',
+  children: 'children',
+  emitPath: true
+};
+
+// 省市区级联选择器的 props 配置
+const regionCascaderProps = {
+  value: 'value',
+  label: 'label',
+  children: 'children',
+  emitPath: true
+};
+
+// 详细地址级联选择器相关
+const regionOptions = ref<any[]>([]); // 省市区级联选择器选项
+const selectedOfficeRegion = ref<string[]>([]); // 选中的省市区代码数组
+
+// 品牌相关数据
+const selectedBrands = ref<BrandVO[]>([]); // 已选择的品牌列表
+const brandDialogVisible = ref(false);
+const brandSearchKeyword = ref(''); // 品牌搜索关键词
+const tempSelectedBrands = ref<BrandVO[]>([]); // 弹框中临时选择的品牌
+const brandSearchResults = ref<BrandVO[]>([]); // 品牌搜索结果
+const allBrandList = ref<BrandVO[]>([]); // 所有品牌列表
+const brandSubmitLoading = ref(false);
+const brandSearchLoading = ref(false);
+
+/** 获取授权详情列表 */
+const getAuthorizationList = async () => {
+  let id = route.query.id as string;
+  if (!id && userStore.supplierId) {
+    id = String(userStore.supplierId);
+  }
+  if (!id) return;
+
+  try {
+    const res = await getAuthorizeDetailList({
+      supplierId: id,
+      pageNum: authorizationPagination.value.pageNum,
+      pageSize: authorizationPagination.value.pageSize
+    });
+    
+    console.log('授权详情API返回:', res);
+    
+    authorizationList.value = res.rows || res.data || [];
+    authorizationPagination.value.total = res.total || authorizationList.value.length;
+    
+    console.log('授权详情列表:', authorizationList.value);
+    console.log('分页信息:', authorizationPagination.value);
+  } catch (e) {
+    console.error('获取授权详情列表失败:', e);
+  }
+};
+
+// 地址管理列表
+const addressList = ref<any[]>([]);
+
+// 地址管理对话框相关
+const addressDialogVisible = ref(false);
+const addressDialogTitle = ref('');
+const addressDialogReadonly = ref(false);
+const addressFormRef = ref<ElFormInstance>();
+const addressSubmitLoading = ref(false);
+const selectedAddressRegion = ref<string[]>([]); // 地址的省市区代码数组
+const addressForm = ref<AddressForm>({
+  supplierNo: '',
+  supplierId: undefined,
+  shipperName: '',
+  shipperPhone: '',
+  shippingPostCode: '',
+  shippingProvincial: '',
+  shippingCity: '',
+  shippingCounty: '',
+  shippingAddress: '',
+  isSelf: 0
+});
+
+// 地址表单验证规则
+const addressFormRules = {
+  shipperName: [{ required: true, message: '请输入收货人', trigger: 'blur' }],
+  shipperPhone: [{ required: true, message: '请输入手机号码', trigger: 'blur' }],
+  shippingProvincial: [{ required: true, message: '请选择地址', trigger: 'change' }]
+};
+
+// 付款信息列表
+const paymentInfoList = ref<any[]>([]);
+
+// 付款信息对话框相关
+const paymentDialogVisible = ref(false);
+const paymentDialogTitle = ref('');
+const paymentDialogReadonly = ref(false);
+const paymentFormRef = ref<ElFormInstance>();
+const paymentSubmitLoading = ref(false);
+const paymentForm = ref<BankForm>({
+  num: undefined,
+  supplierNo: '',
+  bankNum: '',
+  bankInfoNo: undefined,
+  bankName: '',
+  bankNo: '',
+  isture: '1',
+  circlesName: '',
+  phone: '',
+  invoiceTypeNo: undefined,
+  invoiceTypeName: '',
+  businessName: '',
+  businessAddress: ''
+});
+
+// 发票类型列表和银行列表
+const invoiceTypeList = ref<InvoiceTypeVO[]>([]);
+const systemBankList = ref<SystemBankVO[]>([]);
+
+// 付款信息表单验证规则
+const paymentFormRules = {
+  invoiceTypeNo: [{ required: true, message: '请选择开票类型', trigger: 'change' }],
+  bankNum: [{ required: true, message: '请输入开户行行号', trigger: 'blur' }],
+  bankInfoNo: [{ required: true, message: '请选择开户行名称', trigger: 'change' }],
+  bankNo: [{ required: true, message: '请输入银行账户', trigger: 'blur' }],
+  phone: [{ required: true, message: '请输入固定电话', trigger: 'blur' }],
+  num: [{ required: true, message: '请选择是否主账号', trigger: 'change' }]
+};
+
+/** 获取发票类型列表 */
+const getInvoiceTypeData = async () => {
+  try {
+    const res = await listInvoiceType({ pageNum: 1, pageSize: 1000 });
+    invoiceTypeList.value = res.rows || [];
+  } catch (e) {
+    console.error('获取发票类型失败:', e);
+  }
+};
+
+/** 获取银行列表 */
+const getSystemBankData = async () => {
+  try {
+    const res = await listSystemBank({ pageNum: 1, pageSize: 1000 });
+    systemBankList.value = res.rows || [];
+  } catch (e) {
+    console.error('获取银行列表失败:', e);
+  }
+};
+
+/** 获取付款信息 */
+/** 获取付款信息 */
+const getPaymentInfo = async () => {
+  // 优先使用 URL 中的 id,如果没有则使用 userStore.supplierId
+  let id = route.query.id as string;
+  if (!id && userStore.supplierId) {
+    id = String(userStore.supplierId);
+  }
+  
+  if (!id) {
+    console.warn('无法获取付款信息:缺少供应商ID');
+    return;
+  }
+
+  try {
+    console.log('获取付款信息,供应商ID:', id);
+    const res = await getBankBySupplierId(id);
+    // 后端返回数组
+    if (res.data) {
+      paymentInfoList.value = Array.isArray(res.data) ? res.data : [res.data];
+      console.log('付款信息列表:', paymentInfoList.value);
+    }
+  } catch (e) {
+    console.error('获取付款信息失败:', e);
+  }
+};
+
+// 合同管理相关数据
+const contractList = ref<any[]>([]);
+const contractSearchParams = ref({
+  contractNo: '',
+  contractName: '',
+  contractType: '',
+  contractStartTime: '' as string | Date | '',
+  contractEndTime: '' as string | Date | '',
+  contractStatus: ''
+});
+const contractPagination = ref({
+  pageNum: 1,
+  pageSize: 10,
+  total: 0
+});
+
+// 合同对话框相关
+const contractDialogVisible = ref(false);
+const contractDialogTitle = ref('');
+const contractDialogReadonly = ref(false);
+const contractFormRef = ref<ElFormInstance>();
+const contractSubmitLoading = ref(false);
+const contractTypeDict = ref<any[]>([]); // 合同类型字典
+const taxRateList = ref<any[]>([]); // 税率列表
+const settlementMethodList = ref<any[]>([]); // 结算方式列表
+const contractForm = ref<ContractForm>({
+  supplierNo: '',
+  supplierId: undefined,
+  contractNo: '',
+  contractName: '',
+  contractType: '',
+  contractStartTime: '',
+  contractEndTime: '',
+  contractStatus: 0,
+  demandReminderTime: 4,
+  taxRate: undefined,
+  contractAmount: undefined,
+  contractDescription: '',
+  contractAttachment: '',
+  settlementMethod: '',
+  invoiceType: ''
+});
+
+// 合同表单验证规则
+const contractFormRules = {
+  contractName: [{ required: true, message: '请输入合同名称', trigger: 'blur' }],
+  contractType: [{ required: true, message: '请选择合同类型', trigger: 'change' }],
+  contractStartTime: [{ required: true, message: '请选择开始时间', trigger: 'change' }],
+  contractEndTime: [{ required: true, message: '请选择截止时间', trigger: 'change' }]
+};
+
+/** 返回列表页 */
+const goBack = () => {
+  // 使用浏览器后退,返回上一页
+  router.back();
+};
+
+/** 获取当前登录用户的供应商ID */
+const getCurrentUserSupplier = async () => {
+  try {
+    // 确保用户信息已加载(包括供应商信息)
+    if (!userStore.supplierId) {
+      console.log('供应商信息未加载,正在加载...');
+      await userStore.getInfo();
+    }
+    
+    const storeSupplierId = userStore.supplierId;
+    
+    if (!storeSupplierId) {
+      console.warn('未获取到供应商ID');
+      ElMessage.warning('当前用户未配置供应商信息,请联系管理员');
+      return;
+    }
+    
+    console.log('✓ 从 userStore 获取到供应商ID:', storeSupplierId);
+    console.log('供应商编号:', userStore.supplierNo);
+    console.log('联系人信息:', userStore.contactInfo);
+    
+    // 保存到本地变量
+    currentSupplierId.value = storeSupplierId;
+  } catch (e) {
+    console.error('✗ 获取供应商信息失败:', e);
+    ElMessage.error('获取供应商信息失败');
+  }
+};
+
+/** 获取工商信息 */
+const handleGetBusinessInfo = async () => {
+  if (!detailData.value.enterpriseName) {
+    ElMessage.warning('请先输入企业名称');
+    return;
+  }
+
+  try {
+    businessInfoLoading.value = true;
+    
+    // 调用获取工商信息接口
+    const res = await getBusinessInformation(detailData.value.enterpriseName);
+    
+    if (res.code === 200 && res.data) {
+      // 将获取到的工商信息填充到表单
+      businessInfo.value = res.data;
+      
+      // 自动填充基本信息表单的相关字段
+      if (res.data.businessName) {
+        detailData.value.businessName = res.data.businessName;
+      }
+      if (res.data.socialCreditCode) {
+        detailData.value.socialCreditCode = res.data.socialCreditCode;
+      }
+      if (res.data.legalPersonName) {
+        detailData.value.legalPersonName = res.data.legalPersonName;
+      }
+      if (res.data.registeredCapital) {
+        detailData.value.registeredCapital = res.data.registeredCapital;
+      }
+      
+      ElMessage({ message: '工商信息获取成功', type: 'info' });
+    } else {
+      ElMessage.error(res.msg || '获取工商信息失败');
+    }
+  } catch (e) {
+    console.error('获取工商信息失败:', e);
+    ElMessage.error('获取工商信息失败');
+  } finally {
+    businessInfoLoading.value = false;
+  }
+};
+
+/** 保存数据 */
+const handleSave = async () => {
+  try {
+    // 验证企业简称必填
+    if (!detailData.value.shortName) {
+      ElMessage.warning('请输入企业简称');
+      return;
+    }
+
+    // 获取供应商ID
+    let id = route.query.id as string;
+    if (!id && userStore.supplierId) {
+      id = String(userStore.supplierId);
+    }
+    if (!id) {
+      ElMessage.error('供应商ID不存在');
+      return;
+    }
+
+    // 只传递 id 和 shortName
+    const submitData = {
+      id: id,
+      shortName: detailData.value.shortName
+    };
+
+    // 调用更新接口
+    await updateInfo(submitData as any);
+    ElMessage({ message: '保存成功', type: 'info' });
+
+    // 刷新当前数据
+    await getDetail();
+  } catch (e) {
+    console.error('保存失败:', e);
+    ElMessage.error('保存失败');
+  }
+};
+
+/** 打开营业执照选择对话框 */
+const openBusinessLicenseSelector = () => {
+  businessLicenseDialogVisible.value = true;
+};
+
+/** 打开法人身份证照片选择对话框 */
+const openPersonImageSelector = () => {
+  personImageDialogVisible.value = true;
+};
+
+/** 营业执照选择确认 */
+const handleBusinessLicenseConfirm = (files: any[]) => {
+  if (files && files.length > 0) {
+    const file = files[0];
+    detailData.value.businessLicense = file.url || file.fileUrl;
+    console.log('选择的营业执照:', file);
+    ElMessage({ message: '营业执照选择成功', type: 'info' });
+  }
+};
+
+/** 法人身份证照片选择确认 */
+const handlePersonImageConfirm = (files: any[]) => {
+  if (files && files.length > 0) {
+    const file = files[0];
+    // 保存图片URL路径,不是ID
+    detailData.value.personImage = file.url || file.fileUrl;
+    detailData.value.personImageUrl = file.url || file.fileUrl;
+    console.log('选择的法人身份证照片:', file);
+    ElMessage({ message: '法人身份证照片选择成功', type: 'info' });
+  }
+};
+
+/** 初始化省市区级联选择器数据 */
+const initRegionOptions = async () => {
+  try {
+    // 使用 element-china-area-data 提供的地区数据
+    regionOptions.value = regionData;
+    console.log('省市区数据加载完成:', regionOptions.value.length);
+  } catch (e) {
+    console.error('初始化省市区数据失败:', e);
+  }
+};
+
+/** 初始化供货区域选项数据 */
+const initSupplyAreaOptions = async () => {
+  try {
+    // 供货区域仍使用原来的 API 数据结构,因为涉及到复杂的后端逻辑
+    const res = await chinaAreaList();
+    supplyAreaOptions.value = res.data || [];
+    console.log('供货区域选项数据加载完成:', supplyAreaOptions.value.length);
+  } catch (e) {
+    console.error('获取供货区域数据失败:', e);
+  }
+};
+
+/** 详细地址省市区改变事件 */
+const handleOfficeRegionChange = (value: string[]) => {
+  if (value && value.length === 3) {
+    // value 是 [省代码, 市代码, 区代码]
+    const [provinceCode, cityCode, districtCode] = value;
+
+    // 从 regionOptions 中查找对应的名称
+    let provinceName = '';
+    let cityName = '';
+    let districtName = '';
+
+    const province = regionOptions.value.find((p: any) => p.value === provinceCode);
+    if (province) {
+      provinceName = province.label;
+
+      const city = province.children?.find((c: any) => c.value === cityCode);
+      if (city) {
+        cityName = city.label;
+
+        const district = city.children?.find((d: any) => d.value === districtCode);
+        if (district) {
+          districtName = district.label;
+        }
+      }
+    }
+
+    // 更新 detailData
+    detailData.value.officeProvince = provinceName;
+    detailData.value.officeCity = cityName;
+    detailData.value.officeCounty = districtName;
+  } else {
+    // 清空
+    detailData.value.officeProvince = '';
+    detailData.value.officeCity = '';
+    detailData.value.officeCounty = '';
+  }
+};
+
+/** 获取详情数据 */
+const getDetail = async () => {
+  let id = route.query.id as string;
+  const mode = route.query.mode as string;
+
+  // 判断是否为新增模式
+  if (mode === 'add') {
+    isAddMode.value = true;
+    isBasicInfoSaved.value = false;
+    return;
+  }
+
+  // 如果 URL 中没有 id,从 userStore 获取 supplierId
+  if (!id) {
+    console.log('URL 中没有 id 参数,从 userStore 获取 supplierId');
+    console.log('当前 userStore.supplierId:', userStore.supplierId);
+    
+    // 如果 userStore 中还没有 supplierId,尝试重新获取
+    if (!userStore.supplierId) {
+      console.log('userStore 中没有 supplierId,尝试重新获取...');
+      try {
+        await userStore.getSupplierInfo();
+        console.log('重新获取后的 supplierId:', userStore.supplierId);
+      } catch (error) {
+        console.error('获取供应商信息失败:', error);
+      }
+    }
+    
+    if (userStore.supplierId) {
+      id = String(userStore.supplierId);
+      console.log('使用 userStore 中的 supplierId:', id);
+    } else {
+      console.warn('userStore 中也没有 supplierId,无法加载供应商信息');
+      ElMessage.warning('无法获取供应商信息,请重新登录');
+      return;
+    }
+  }
+
+  // 编辑模式,已有ID,视为基础信息已保存
+  isAddMode.value = false;
+  isBasicInfoSaved.value = true;
+
+  if (id) {
+    console.log('=== 准备调用 getInfo 接口 ===');
+    console.log('接口路径: /customer/info/' + id);
+    console.log('供应商ID:', id);
+    console.log('ID类型:', typeof id);
+    
+    try {
+      const res = await getInfo(id);
+      detailData.value = res.data;
+      console.log('✓ 成功获取供应商详情数据:', detailData.value);
+    } catch (error) {
+      console.error('✗ 获取供应商详情失败:', error);
+      ElMessage.error('获取供应商详情失败: ' + (error as any)?.message || '未知错误');
+      return;
+    }
+
+    // 如果 personImageUrl 为空但 personImage 有值,使用 personImage 的值
+    if (!detailData.value.personImageUrl && detailData.value.personImage) {
+      detailData.value.personImageUrl = detailData.value.personImage;
+    }
+
+    // 初始化品牌列表
+    initBrandList();
+    // 初始化详细地址显示
+    if (detailData.value.officeProvince && detailData.value.officeCity && detailData.value.officeCounty) {
+      const province = detailData.value.officeProvince;
+      const city = detailData.value.officeCity;
+      const county = detailData.value.officeCounty;
+
+      // 根据省市区名称查找对应的代码
+      const provinceItem = regionOptions.value.find((p: any) => p.label === province);
+      if (provinceItem) {
+        const cityItem = provinceItem.children?.find((c: any) => c.label === city);
+        if (cityItem) {
+          const districtItem = cityItem.children?.find((d: any) => d.label === county);
+          if (districtItem) {
+            selectedOfficeRegion.value = [provinceItem.value, cityItem.value, districtItem.value];
+          }
+        }
+      }
+    }
+
+    // 解析工商信息,支持 otherCustomersMap 或 otherCustomers
+    const otherCustomersData = (detailData.value as any).otherCustomersMap || detailData.value.otherCustomers;
+    if (otherCustomersData) {
+      try {
+        // 如果是字符串,需要解析JSON
+        if (typeof otherCustomersData === 'string') {
+          businessInfo.value = JSON.parse(otherCustomersData);
+        } else {
+          businessInfo.value = otherCustomersData;
+        }
+        console.log('工商信息:', businessInfo.value);
+      } catch (e) {
+        console.error('解析工商信息失败:', e);
+      }
+    }
+
+    // 工商信息字段已经在 detailData 中返回,直接使用
+    // 将 detailData 的工商信息字段映射到 businessInfo
+    businessInfo.value = {
+      businessName: detailData.value.businessName,
+      registrationAuthority: (detailData.value as any).registrationAuthority,
+      establishmentDate: (detailData.value as any).establishmentDate,
+      registrationStatus: (detailData.value as any).registrationStatus,
+      paidInCapital: (detailData.value as any).paidInCapital,
+      socialCreditCode: detailData.value.socialCreditCode,
+      legalPersonName: detailData.value.legalPersonName,
+      registeredCapital: detailData.value.registeredCapital,
+      revocationDate: (detailData.value as any).revocationDate,
+      bussinessRange: (detailData.value as any).bussinessRange,
+      businessAddress: (detailData.value as any).businessAddress
+    };
+    console.log('工商信息(从详情接口):', businessInfo.value);
+
+    // 获取当前供应商的产品经理和采购员ID
+    try {
+      const staffIdsRes = await getSupplierStaffIds(id);
+      const staffIds = staffIdsRes.data; // {productManager: 1, purchaser: 2}
+
+      selectedProductManager.value = staffIds.productManager;
+      selectedBuyer.value = staffIds.purchaser;
+
+      console.log('当前产品经理ID:', staffIds.productManager);
+      console.log('当前采购员ID:', staffIds.purchaser);
+    } catch (e) {
+      console.error('获取人员ID失败:', e);
+    }
+  }
+};
+
+/** 获取人员下拉选项 */
+const getStaffOptions = async () => {
+  try {
+    const res = await getStaffListSplice();
+    const staffMap = res.data; // Map<Long, String> 格式:{1: "00040,郑春风", 2: "00050,王坤"}
+
+    // 转换为下拉框选项格式
+    staffOptions.value = Object.entries(staffMap).map(([staffId, displayText]) => ({
+      staffId: Number(staffId),
+      displayText: displayText,
+      label: displayText,
+      value: Number(staffId)
+    }));
+  } catch (e) {
+    console.error('获取人员信息失败:', e);
+  }
+};
+
+/** 获取公司下拉选项 */
+const getCompanyOptions = async () => {
+  try {
+    const res = await listCompany({
+      pageNum: 1,
+      pageSize: 1000,
+      status: '0'
+    }); // 只获取正常状态的公司
+    companyOptions.value = res.rows || [];
+  } catch (e) {
+    console.error('获取公司信息失败:', e);
+  }
+};
+
+/** 获取企业规模下拉选项 */
+const getEnterpriseScaleOptions = async () => {
+  try {
+    const res = await listEnterpriseScale({
+      pageNum: 1,
+      pageSize: 1000,
+      status: '0' // 只获取正常状态的企业规模
+    });
+    enterpriseScaleOptions.value = res.data || res.rows || [];
+  } catch (e) {
+    console.error('获取企业规模信息失败:', e);
+  }
+};
+
+/** 获取行业类别下拉选项 */
+const getIndustryCategoryOptions = async () => {
+  try {
+    const res = await listIndustryCategory({
+      pageNum: 1,
+      pageSize: 1000,
+      status: '0' // 只获取正常状态的行业类别
+    });
+    industryCategoryOptions.value = res.data || res.rows || [];
+  } catch (e) {
+    console.error('获取行业类别信息失败:', e);
+  }
+};
+
+/** 获取供应商等级下拉选项 */
+const getSupplierLevelOptions = async () => {
+  try {
+    const res = await listLevel({
+      pageNum: 1,
+      pageSize: 1000
+    });
+    supplierLevelOptions.value = res.data || res.rows || [];
+  } catch (e) {
+    console.error('获取供应商等级信息失败:', e);
+  }
+};
+
+/** 获取供应商类型下拉选项 */
+const getSupplierTypeOptions = async () => {
+  try {
+    const res = await listType({
+      pageNum: 1,
+      pageSize: 1000
+    } as any);
+    supplierTypeOptions.value = res.data || res.rows || [];
+  } catch (e) {
+    console.error('获取供应商类型信息失败:', e);
+  }
+};
+
+/** 获取联系人列表 */
+const getContactList = async () => {
+  let id = route.query.id as string;
+  if (!id && userStore.supplierId) {
+    id = String(userStore.supplierId);
+  }
+  if (!id) return;
+
+  contactLoading.value = true;
+  try {
+    const res = await getContactListById(id, {
+      pageNum: 1,
+      pageSize: 100,
+      ...contactSearchParams.value
+    });
+    contactList.value = res.rows || [];
+  } catch (e) {
+    console.error('获取联系人列表失败:', e);
+  } finally {
+    contactLoading.value = false;
+  }
+};
+
+/** 搜索联系人 */
+const handleContactSearch = () => {
+  getContactList();
+};
+
+/** 重置联系人搜索 */
+const handleContactReset = () => {
+  contactSearchParams.value = {
+    userNo: '',
+    userName: ''
+  };
+  getContactList();
+};
+
+/** 新增联系人 */
+const handleAddContact = () => {
+  // 重置表单
+  contactForm.value = {
+    supplierNo: detailData.value.supplierNo,
+    supplierId: route.query.id as any,
+    userNo: '',
+    userName: '',
+    phone: '',
+    roleNo: '',
+    departmentNo: '',
+    position: '',
+    isPrimaryContact: '0',
+    isRegister: '0',
+    email: '',
+    fax: '',
+    remark: ''
+  };
+  contactDialogTitle.value = '新增联系人';
+  contactDialogReadonly.value = false;
+  contactDialogVisible.value = true;
+};
+
+/** 查看联系人 */
+const handleViewContact = async (row: any) => {
+  try {
+    const res = await getContact(row.id);
+    Object.assign(contactForm.value, res.data);
+    contactDialogTitle.value = '查看联系人';
+    contactDialogReadonly.value = true;
+    contactDialogVisible.value = true;
+  } catch (e) {
+    console.error('获取联系人详情失败:', e);
+    ElMessage.error('获取联系人详情失败');
+  }
+};
+
+/** 编辑联系人 */
+const handleEditContact = async (row: any) => {
+  try {
+    const res = await getContact(row.id);
+    Object.assign(contactForm.value, res.data);
+    contactDialogTitle.value = '编辑联系人';
+    contactDialogReadonly.value = false;
+    contactDialogVisible.value = true;
+  } catch (e) {
+    console.error('获取联系人详情失败:', e);
+    ElMessage.error('获取联系人详情失败');
+  }
+};
+
+/** 提交联系人 */
+const handleContactSubmit = async () => {
+  if (!contactFormRef.value) return;
+
+  contactFormRef.value.validate(async (valid: boolean) => {
+    if (!valid) return;
+
+    try {
+      contactSubmitLoading.value = true;
+
+      // 设置供应商编号和ID
+      if (!contactForm.value.supplierNo && detailData.value.supplierNo) {
+        contactForm.value.supplierNo = detailData.value.supplierNo;
+      }
+      if (!contactForm.value.supplierId && route.query.id) {
+        contactForm.value.supplierId = route.query.id as any;
+      }
+
+      if ((contactForm.value as any).id) {
+        // 更新
+        await updateContact(contactForm.value);
+        ElMessage({ message: '更新成功', type: 'info' });
+      } else {
+        // 新增
+        await addContact(contactForm.value);
+        ElMessage({ message: '新增成功', type: 'info' });
+      }
+
+      contactDialogVisible.value = false;
+      // 刷新联系人列表
+      await getContactList();
+    } catch (e) {
+      console.error('保存联系人失败:', e);
+      ElMessage.error('保存联系人失败');
+    } finally {
+      contactSubmitLoading.value = false;
+    }
+  });
+};
+
+/** 获取产品分类列表 */
+const getProductCategories = async () => {
+  try {
+    const res = await getProductCategoryList();
+    productCategoryList.value = res.data || [];
+    console.log('产品分类列表:', productCategoryList.value);
+
+    // 获取分类列表后,再获取已选择的品目
+    await getSupplierSelectedCategories();
+  } catch (e) {
+    console.error('获取产品分类失败:', e);
+  }
+};
+
+/** 获取供应商已选择的品目 */
+const getSupplierSelectedCategories = async () => {
+  let id = route.query.id as string;
+  if (!id && userStore.supplierId) {
+    id = String(userStore.supplierId);
+  }
+  if (!id) return;
+
+  try {
+    const res = await getSupplierCategories(id);
+    // 确保数据类型一致,转换为字符串数组
+    selectedCategories.value = (res.data || []).map(String);
+    console.log('供应商已选择的品目ID:', selectedCategories.value);
+    console.log('产品分类列表:', productCategoryList.value);
+  } catch (e) {
+    console.error('获取供应商品目失败:', e);
+  }
+};
+
+/** 保存供货类目 */
+const handleSaveCategories = async () => {
+  try {
+    let id = route.query.id as string;
+    if (!id && userStore.supplierId) {
+      id = String(userStore.supplierId);
+    }
+    if (!id) {
+      ElMessage.error('供应商ID不存在');
+      return;
+    }
+
+    // 调用更新接口,保存选中的品目
+    await updateInfo({
+      id: id,
+      operatingCategory: selectedCategories.value.join(',')
+    } as any);
+
+    ElMessage({ message: '保存成功', type: 'info' });
+  } catch (e) {
+    console.error('保存供货类目失败:', e);
+    ElMessage.error('保存失败');
+  }
+};
+
+/** 保存采购信息 */
+const handleSavePurchaseInfo = async () => {
+  try {
+    let id = route.query.id as string;
+    if (!id && userStore.supplierId) {
+      id = String(userStore.supplierId);
+    }
+    if (!id) {
+      ElMessage.error('供应商ID不存在');
+      return;
+    }
+
+    // 调用保存采购信息接口
+    await savePurchaseInfo({
+      supplierId: id,
+      productManager: selectedProductManager.value,
+      purchaser: selectedBuyer.value
+    });
+
+    ElMessage({ message: '保存成功', type: 'info' });
+  } catch (e) {
+    console.error('保存采购信息失败:', e);
+    ElMessage.error('保存失败');
+  }
+};
+
+/** 获取所有品牌列表 */
+const getAllBrandList = async () => {
+  try {
+    const res = await listBrand({
+      pageNum: 1,
+      pageSize: 1000 // 获取所有品牌
+    });
+    allBrandList.value = res.rows || [];
+    console.log('品牌列表:', allBrandList.value);
+  } catch (e) {
+    console.error('获取品牌列表失败:', e);
+  }
+};
+
+/** 新增品牌 - 打开弹框 */
+const handleAddBrand = () => {
+  // 复制当前已选择的品牌到临时列表
+  tempSelectedBrands.value = [...selectedBrands.value];
+  brandSearchKeyword.value = '';
+  // 显示所有品牌作为初始搜索结果
+  brandSearchResults.value = [...allBrandList.value];
+  brandDialogVisible.value = true;
+};
+
+/** 搜索品牌 */
+const handleSearchBrand = async () => {
+  // 如果搜索关键词为空,显示所有品牌
+  if (!brandSearchKeyword.value.trim()) {
+    brandSearchResults.value = [...allBrandList.value];
+    return;
+  }
+
+  try {
+    brandSearchLoading.value = true;
+    const res = await listBrand({
+      brandName: brandSearchKeyword.value.trim(),
+      pageNum: 1,
+      pageSize: 50
+    });
+    brandSearchResults.value = res.rows || [];
+
+    if (brandSearchResults.value.length === 0) {
+      ElMessage.info('未找到匹配的品牌');
+    }
+  } catch (e) {
+    console.error('搜索品牌失败:', e);
+    ElMessage.error('搜索品牌失败');
+  } finally {
+    brandSearchLoading.value = false;
+  }
+};
+
+/** 添加品牌到列表 */
+const handleAddBrandToList = (brand?: BrandVO) => {
+  // 如果没有传入品牌,则使用搜索关键词手动创建
+  if (!brand) {
+    if (!brandSearchKeyword.value.trim()) {
+      ElMessage.warning('请输入品牌名称或先搜索品牌');
+      return;
+    }
+
+    // 手动创建品牌对象(临时方案)
+    brand = {
+      id: brandSearchKeyword.value.trim(),
+      brandName: brandSearchKeyword.value.trim()
+    } as BrandVO;
+  }
+
+  // 检查品牌是否已存在
+  const exists = tempSelectedBrands.value.some(b => b.id === brand!.id);
+
+  if (exists) {
+    ElMessage.warning('该品牌已添加');
+    return;
+  }
+
+  // 添加品牌到临时列表
+  tempSelectedBrands.value.push(brand);
+  brandSearchKeyword.value = ''; // 清空搜索框
+  brandSearchResults.value = []; // 清空搜索结果
+};
+
+/** 删除临时品牌 */
+const handleRemoveTempBrand = (brand: BrandVO) => {
+  const index = tempSelectedBrands.value.findIndex(b => b.id === brand.id);
+  if (index > -1) {
+    tempSelectedBrands.value.splice(index, 1);
+  }
+};
+
+/** 删除已选择的品牌 */
+const handleRemoveBrand = async (brand: BrandVO) => {
+  const index = selectedBrands.value.findIndex(b => b.id === brand.id);
+  if (index > -1) {
+    selectedBrands.value.splice(index, 1);
+    // 立即保存到后端
+    await saveBrandsToServer();
+  }
+};
+
+/** 品牌对话框关闭 */
+const handleBrandDialogClose = () => {
+  brandDialogVisible.value = false;
+  brandSearchKeyword.value = '';
+};
+
+/** 提交品牌 */
+const handleBrandSubmit = async () => {
+  try {
+    brandSubmitLoading.value = true;
+
+    // 更新主品牌列表
+    selectedBrands.value = [...tempSelectedBrands.value];
+
+    // 保存到服务器
+    await saveBrandsToServer();
+
+    ElMessage({ message: '保存成功', type: 'info' });
+    brandDialogVisible.value = false;
+  } catch (e) {
+    console.error('保存品牌失败:', e);
+    ElMessage.error('保存失败');
+  } finally {
+    brandSubmitLoading.value = false;
+  }
+};
+
+/** 保存品牌到服务器 */
+const saveBrandsToServer = async () => {
+  let id = route.query.id as string;
+  if (!id && userStore.supplierId) {
+    id = String(userStore.supplierId);
+  }
+  if (!id) {
+    ElMessage.error('供应商ID不存在');
+    return;
+  }
+
+  // 将品牌ID用逗号分隔保存
+  const brandIds = selectedBrands.value.map(brand => brand.id).join(',');
+
+  await updateInfo({
+    id: id,
+    operatingBrand: brandIds
+  } as any);
+};
+
+/** 初始化品牌列表 - 从后端数据解析 */
+const initBrandList = async () => {
+  if (detailData.value.operatingBrand) {
+    // 后端返回的是用逗号分隔的品牌ID
+    const brandIds = detailData.value.operatingBrand.split(',').filter(id => id.trim());
+
+    if (brandIds.length > 0) {
+      try {
+        // 根据品牌ID获取品牌详细信息
+        const brandPromises = brandIds.map(id => getBrand(id.trim()));
+        const brandResults = await Promise.allSettled(brandPromises);
+
+        selectedBrands.value = brandResults
+          .filter(result => result.status === 'fulfilled')
+          .map(result => (result as PromiseFulfilledResult<any>).value.data)
+          .filter(brand => brand); // 过滤掉空值
+      } catch (e) {
+        console.error('获取品牌详情失败:', e);
+        // 降级处理:如果获取品牌详情失败,使用ID作为显示名称
+        selectedBrands.value = brandIds.map(id => ({
+          id: id.trim(),
+          brandName: id.trim()
+        } as BrandVO));
+      }
+    }
+  }
+};
+
+/** 获取供货区域列表 */
+const getSupplyAreaList = async () => {
+  let id = route.query.id as string;
+  if (!id && userStore.supplierId) {
+    id = String(userStore.supplierId);
+  }
+  if (!id) return;
+
+  try {
+    const res = await listArea({
+      supplierId: id,
+      pageNum: 1,
+      pageSize: 1000
+    });
+    
+    // 保存原始数据,用于编辑时回显
+    savedAreaData.value = res.data || res.rows || [];
+    
+    // 处理返回的数据,按层级组织
+    const areaData = savedAreaData.value;
+    
+    // 第一步:先收集所有省份
+    const provinceMap: any = {};
+    areaData.forEach((area: any) => {
+      if (area.level === '1' || area.level === 1) {
+        provinceMap[area.areaCode] = {
+          province: area.areaName,
+          city: ''
+        };
+      }
+    });
+    
+    // 第二步:将城市添加到对应的省份
+    areaData.forEach((area: any) => {
+      if (area.level === '2' || area.level === 2) {
+        const parentCode = area.parentCode;
+        if (provinceMap[parentCode]) {
+          // 将城市添加到省份的城市列表中
+          if (provinceMap[parentCode].city) {
+            provinceMap[parentCode].city += ',' + area.areaName;
+          } else {
+            provinceMap[parentCode].city = area.areaName;
+          }
+        }
+      }
+    });
+    
+    // 转换为数组
+    supplyAreaList.value = Object.values(provinceMap).filter((item: any) => 
+      item.province || item.city
+    );
+    
+    console.log('供货区域列表:', supplyAreaList.value);
+    console.log('保存的原始数据:', savedAreaData.value);
+  } catch (e) {
+    console.error('获取供货区域列表失败:', e);
+  }
+};
+
+/** 编辑供货区域 */
+const handleEditSupplyArea = async () => {
+  supplyAreaDialogVisible.value = true;
+
+  // 根据已保存的数据回显选中状态
+  if (savedAreaData.value && savedAreaData.value.length > 0) {
+    const selectedPaths: any[] = [];
+    
+    // 遍历已保存的数据,构建级联选择器需要的路径格式
+    savedAreaData.value.forEach((area: any) => {
+      if (area.level === '2') {
+        // 市级数据,需要找到对应的省份
+        const province = savedAreaData.value.find((p: any) => 
+          p.level === '1' && p.areaCode === area.parentCode
+        );
+        
+        if (province) {
+          // 构建路径 [省代码, 市代码]
+          selectedPaths.push([province.areaCode, area.areaCode]);
+        }
+      }
+    });
+    
+    selectedSupplyAreas.value = selectedPaths;
+    console.log('回显的选中路径:', selectedPaths);
+  } else {
+    selectedSupplyAreas.value = [];
+  }
+};
+
+/** 将区域代码转换为级联路径 */
+const convertRegionCodesToPaths = (codes: string[]) => {
+  const paths: any[] = [];
+  
+  codes.forEach(code => {
+    const path = findRegionPath(code, supplyAreaOptions.value);
+    if (path) {
+      paths.push(path);
+    }
+  });
+  
+  return paths;
+};
+
+/** 在区域树中查找指定代码的完整路径(只到市级) */
+const findRegionPath = (targetCode: string, regions: any[], currentPath: string[] = []): string[] | null => {
+  for (const region of regions) {
+    const newPath = [...currentPath, region.areaCode];
+    
+    // 如果找到目标代码,返回路径
+    if (region.areaCode === targetCode) {
+      return newPath;
+    }
+    
+    // 如果有子节点,继续查找(只查找到市级,即两层)
+    if (region.children && region.children.length > 0 && newPath.length < 2) {
+      const found = findRegionPath(targetCode, region.children, newPath);
+      if (found) {
+        return found;
+      }
+    }
+  }
+  
+  return null;
+};
+
+/** 提交供货区域 */
+const handleSupplyAreaSubmit = async () => {
+  try {
+    supplyAreaSubmitLoading.value = true;
+
+    let id = route.query.id as string;
+    if (!id && userStore.supplierId) {
+      id = String(userStore.supplierId);
+    }
+    if (!id) {
+      ElMessage.error('供应商ID不存在');
+      return;
+    }
+
+    // 构建 areaList 数组
+    const areaList = buildAreaList(selectedSupplyAreas.value);
+    console.log('构建的 areaList:', areaList);
+
+    // 从选中的路径中提取区域信息(用于显示)
+    const regionData = extractRegionData(selectedSupplyAreas.value);
+
+    // 保存区域代码(用于下次编辑时回显)
+    const regionCodes = regionData.districtCodes.join(',');
+
+    const submitData = {
+      supplierId: id,
+      supplyNo: detailData.value.supplierNo,
+      areaList: areaList, // 传递 areaList 数组
+      province: regionData.provinces,
+      city: regionData.cities,
+      supplyRegions: regionCodes
+    };
+    
+    console.log('提交的数据:', submitData);
+
+    await addArea(submitData as any);
+
+    // 更新本地数据
+    (detailData.value as any).province = regionData.provinces;
+    (detailData.value as any).city = regionData.cities;
+    (detailData.value as any).district = '';
+    (detailData.value as any).supplyRegions = regionCodes;
+
+    // 更新供货区域列表显示
+    supplyAreaList.value = [{
+      province: regionData.provinces,
+      city: regionData.cities,
+      district: ''
+    }];
+
+    ElMessage({ message: '保存成功', type: 'info' });
+    supplyAreaDialogVisible.value = false;
+  } catch (e) {
+    console.error('保存供货区域失败:', e);
+    ElMessage.error('保存失败');
+  } finally {
+    supplyAreaSubmitLoading.value = false;
+  }
+};
+
+/** 从级联选择器的值中提取区域数据 */
+const extractRegionData = (selectedPaths: any[]) => {
+  // 用于存储省-市的映射关系
+  const provinceMap = new Map<string, Set<string>>();
+  const cityCodes: string[] = [];
+
+  selectedPaths.forEach(path => {
+    if (Array.isArray(path) && path.length >= 2) {
+      const [provinceCode, cityCode] = path;
+      
+      // 保存城市代码
+      if (cityCode) {
+        cityCodes.push(cityCode);
+      }
+      
+      // 查找对应的名称
+      const provinceName = findRegionName(provinceCode, supplyAreaOptions.value);
+      const province = supplyAreaOptions.value.find(p => p.areaCode === provinceCode);
+      const cityName = province && cityCode ? findRegionName(cityCode, province.children || []) : '';
+
+      if (provinceName) {
+        if (!provinceMap.has(provinceName)) {
+          provinceMap.set(provinceName, new Set());
+        }
+        
+        if (cityName) {
+          provinceMap.get(provinceName)!.add(cityName);
+        }
+      }
+    }
+  });
+
+  // 生成省份和城市字符串
+  const provinces: string[] = [];
+  const cities: string[] = [];
+
+  provinceMap.forEach((citySet, provinceName) => {
+    provinces.push(provinceName);
+    cities.push(Array.from(citySet).join(','));
+  });
+
+  return {
+    provinces: provinces.join(','),
+    cities: cities.join(';'),
+    districts: '', // 没有区县数据
+    districtCodes: cityCodes
+  };
+};
+
+/** 根据代码查找区域名称 */
+const findRegionName = (code: string, regions: any[]): string => {
+  const region = regions.find(r => r.areaCode === code);
+  return region ? region.areaName : '';
+};
+
+/** 构建 areaList 数组 */
+const buildAreaList = (selectedPaths: any[]) => {
+  const areaList: any[] = [];
+  const provinceMap = new Map<string, Set<string>>(); // 省份代码 -> 城市代码集合
+  const addedProvinces = new Set<string>(); // 已添加的省份
+
+  console.log('选中的路径:', selectedPaths);
+
+  // 第一步:收集所有选中的省份和城市
+  selectedPaths.forEach(path => {
+    if (Array.isArray(path)) {
+      const provinceCode = path[0];
+      const cityCode = path[1];
+      
+      if (!provinceMap.has(provinceCode)) {
+        provinceMap.set(provinceCode, new Set());
+      }
+      
+      // 如果有城市代码,添加到集合中
+      if (cityCode) {
+        provinceMap.get(provinceCode)!.add(cityCode);
+      }
+    }
+  });
+
+  console.log('省份映射:', Array.from(provinceMap.entries()));
+
+  // 第二步:构建 areaList 数组
+  provinceMap.forEach((cityCodes, provinceCode) => {
+    // 查找省份信息
+    const province = supplyAreaOptions.value.find(p => p.areaCode === provinceCode);
+    
+    if (province) {
+      // 添加省份(每个省份只添加一次)
+      if (!addedProvinces.has(provinceCode)) {
+        areaList.push({
+          areaCode: province.areaCode,
+          areaName: province.areaName,
+          level: 1
+        });
+        addedProvinces.add(provinceCode);
+      }
+
+      // 添加该省份下所有选中的城市
+      cityCodes.forEach(cityCode => {
+        const city = province.children?.find((c: any) => c.areaCode === cityCode);
+        
+        if (city) {
+          areaList.push({
+            areaCode: city.areaCode,
+            areaName: city.areaName,
+            parentCode: province.areaCode, // 使用省份的 areaCode 作为 parentCode
+            level: 2
+          });
+        }
+      });
+    }
+  });
+
+  return areaList;
+};
+
+/** 格式化日期 */
+const formatDate = (date: string | Date) => {
+  if (!date) return '-';
+  const d = new Date(date);
+  return d.toISOString().split('T')[0];
+};
+
+/** 获取合同状态类型 */
+const getContractStatusType = (status: number) => {
+  const statusMap = {
+    0: 'info',    // 草稿
+    1: 'success', // 已生效
+    2: 'warning', // 已到期
+    3: 'danger',  // 已终止
+    4: 'danger'   // 已作废
+  };
+  return statusMap[status] || 'info';
+};
+
+/** 获取合同状态文本 */
+const getContractStatusText = (status: number) => {
+  const statusMap = {
+    0: '待审核',
+    1: '生效',
+    2: '失效'
+
+  };
+  return statusMap[status] || '未知';
+};
+
+/** 获取合同类型文本 */
+const getContractTypeText = (type: string | number) => {
+  const typeMap = {
+    '0': '年度合作',
+    '1': '项目采购',
+    '2': '其他合作',
+  };
+  return typeMap[type] || '未知';
+};
+
+/** 获取授权状态文本 */
+const getAuthorizedStatusText = (status: string) => {
+  const statusMap = {
+    '0': '待审核',
+    '1': '已通过',
+    '2': '已驳回'
+  };
+  return statusMap[status] || '未知';
+};
+
+/** 搜索合同 */
+const handleContractSearch = () => {
+  console.log('搜索合同:', contractSearchParams.value);
+  getContractList();
+};
+
+/** 重置合同搜索 */
+const handleContractReset = () => {
+  contractSearchParams.value = {
+    contractNo: '',
+    contractName: '',
+    contractType: '',
+    contractStartTime: '',
+    contractEndTime: '',
+    contractStatus: ''
+  };
+  getContractList();
+};
+
+/** 获取合同列表 */
+const getContractList = async () => {
+  let id = route.query.id as string;
+  if (!id && userStore.supplierId) {
+    id = String(userStore.supplierId);
+  }
+  if (!id) return;
+
+  try {
+    // 构建查询参数,排除日期字段
+    const { contractStartTime, contractEndTime, ...otherParams } = contractSearchParams.value;
+    
+    const params: any = {
+      pageNum: contractPagination.value.pageNum,
+      pageSize: contractPagination.value.pageSize,
+      ...otherParams
+    };
+    
+    // 如果有开始时间,格式化为 YYYY-MM-DD
+    if (contractStartTime) {
+      const date = new Date(contractStartTime);
+      params.contractStartTime = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`;
+    }
+    
+    // 如果有结束时间,格式化为 YYYY-MM-DD
+    if (contractEndTime) {
+      const date = new Date(contractEndTime);
+      params.contractEndTime = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`;
+    }
+    
+    console.log('合同查询参数:', params); // 添加日志方便调试
+    
+    const res = await getSupplierContractsById(id, params);
+    contractList.value = res.rows || [];
+    contractPagination.value.total = res.total || 0;
+  } catch (e) {
+    console.error('获取合同列表失败:', e);
+  }
+};
+
+/** 查看附件 */
+const handleViewAttachment = async (row: any) => {
+  if (!row.contractAttachment) {
+    ElMessage.warning('暂无附件可下载');
+    return;
+  }
+  
+  try {
+    // 通过文件ID获取文件信息
+    const res = await listByIds(row.contractAttachment);
+    if (res.data && res.data.length > 0) {
+      const file = res.data[0];
+      
+      // 使用fetch获取文件并强制下载
+      const response = await fetch(file.url);
+      const blob = await response.blob();
+      
+      // 创建下载链接
+      const url = window.URL.createObjectURL(blob);
+      const link = document.createElement('a');
+      link.href = url;
+      link.download = file.originalName || (row.contractName ? `${row.contractName}_合同附件` : '合同附件');
+      link.style.display = 'none';
+      
+      document.body.appendChild(link);
+      link.click();
+      document.body.removeChild(link);
+      
+      // 清理URL对象
+      window.URL.revokeObjectURL(url);
+      
+      ElMessage({ message: '开始下载', type: 'info' });
+    } else {
+      ElMessage.warning('未找到附件文件');
+    }
+  } catch (e) {
+    console.error('下载附件失败:', e);
+    ElMessage.error('下载失败');
+  }
+};
+
+/** 查看合同 */
+const handleViewContract = async (row: any) => {
+  try {
+    const res = await getContract(row.id);
+    Object.assign(contractForm.value, res.data);
+    contractDialogTitle.value = '查看合同';
+    contractDialogReadonly.value = true;
+    contractDialogVisible.value = true;
+  } catch (e) {
+    console.error('获取合同详情失败:', e);
+    ElMessage.error('获取合同详情失败');
+  }
+};
+
+/** 编辑合同 */
+const handleEditContract = async (row: any) => {
+  try {
+    const res = await getContract(row.id);
+    Object.assign(contractForm.value, res.data);
+    contractDialogTitle.value = '编辑合同';
+    contractDialogReadonly.value = false;
+    contractDialogVisible.value = true;
+  } catch (e) {
+    console.error('获取合同详情失败:', e);
+    ElMessage.error('获取合同详情失败');
+  }
+};
+
+/** 获取合同类型字典 */
+const getContractTypeDict = async () => {
+  try {
+    const res = await getDictData('contract_type');
+    contractTypeDict.value = res.data || [];
+  } catch (e) {
+    console.error('获取合同类型字典失败:', e);
+  }
+};
+
+/** 获取税率列表 */
+const getTaxRateData = async () => {
+  try {
+    const res = await getTaxRateList();
+    taxRateList.value = res.rows || res.data || [];
+  } catch (e) {
+    console.error('获取税率列表失败:', e);
+  }
+};
+
+/** 获取结算方式列表 */
+const getSettlementMethodData = async () => {
+  try {
+    const res = await getSettlementMethodList();
+    settlementMethodList.value = res.rows || res.data || [];
+  } catch (e) {
+    console.error('获取结算方式列表失败:', e);
+  }
+};
+
+/** 新增合同 */
+const handleAddContract = () => {
+  // 重置表单
+  contractForm.value = {
+    supplierNo: detailData.value.supplierNo,
+    supplierId: route.query.id as any,
+    contractNo: '',
+    contractName: '',
+    contractType: '',
+    contractStartTime: '',
+    contractEndTime: '',
+    contractStatus: 0,
+    demandReminderTime: 4,
+    taxRate: undefined,
+    contractAmount: undefined,
+    contractDescription: '',
+    contractAttachment: '',
+    settlementMethod: '',
+    invoiceType: ''
+  };
+  contractDialogTitle.value = '添加合同';
+  contractDialogReadonly.value = false;
+  contractDialogVisible.value = true;
+};
+
+/** 提交合同 */
+const handleContractSubmit = async () => {
+  if (!contractFormRef.value) return;
+
+  contractFormRef.value.validate(async (valid: boolean) => {
+    if (!valid) return;
+
+    try {
+      contractSubmitLoading.value = true;
+
+      // 设置供应商编号和ID
+      if (!contractForm.value.supplierNo && detailData.value.supplierNo) {
+        contractForm.value.supplierNo = detailData.value.supplierNo;
+      }
+      if (!contractForm.value.supplierId && route.query.id) {
+        contractForm.value.supplierId = route.query.id as any;
+      }
+
+      if ((contractForm.value as any).id) {
+        // 更新
+        await updateContract(contractForm.value);
+        ElMessage({ message: '更新成功', type: 'info' });
+      } else {
+        // 新增
+        await addContract(contractForm.value);
+        ElMessage({ message: '新增成功', type: 'info' });
+      }
+
+      contractDialogVisible.value = false;
+      // 刷新合同列表
+      await getContractList();
+    } catch (e) {
+      console.error('保存合同失败:', e);
+      ElMessage.error('保存合同失败');
+    } finally {
+      contractSubmitLoading.value = false;
+    }
+  });
+};
+
+/** 分页大小改变 */
+const handleContractSizeChange = (size: number) => {
+  contractPagination.value.pageSize = size;
+  getContractList();
+};
+
+/** 当前页改变 */
+const handleContractCurrentChange = (page: number) => {
+  contractPagination.value.pageNum = page;
+  getContractList();
+};
+
+/** 授权详情分页大小改变 */
+const handleAuthorizationSizeChange = (size: number) => {
+  authorizationPagination.value.pageSize = size;
+  getAuthorizationList();
+};
+
+/** 授权详情当前页改变 */
+const handleAuthorizationCurrentChange = (page: number) => {
+  authorizationPagination.value.pageNum = page;
+  getAuthorizationList();
+};
+
+/** 查看付款信息 */
+const handleViewPayment = async (row: any) => {
+  try {
+    const res = await getBank(row.id);
+    Object.assign(paymentForm.value, res.data);
+    paymentDialogTitle.value = '查看付款信息';
+    paymentDialogReadonly.value = true;
+    paymentDialogVisible.value = true;
+  } catch (e) {
+    console.error('获取付款信息详情失败:', e);
+    ElMessage.error('获取付款信息详情失败');
+  }
+};
+
+/** 编辑付款信息 */
+const handleEditPayment = async (row: any) => {
+  try {
+    const res = await getBank(row.id);
+    Object.assign(paymentForm.value, res.data);
+    // 从供应商详情中获取企业工商名称和工商地址
+    paymentForm.value.businessName = detailData.value.businessName || '';
+    paymentForm.value.businessAddress = detailData.value.businessAddress || '';
+    paymentDialogTitle.value = '编辑付款信息';
+    paymentDialogReadonly.value = false;
+    paymentDialogVisible.value = true;
+  } catch (e) {
+    console.error('获取付款信息详情失败:', e);
+    ElMessage.error('获取付款信息详情失败');
+  }
+};
+
+/** 新增付款信息 */
+const handleAddPayment = () => {
+  // 检查是否已保存供应商基本信息
+  if (!detailData.value.id || !detailData.value.supplierNo) {
+    ElMessage.warning('请先保存供应商基本信息后再新增付款信息');
+    return;
+  }
+  
+  // 重置表单
+  paymentForm.value = {
+    num: undefined,
+    supplierNo: detailData.value.supplierNo,
+    supplierId: detailData.value.id,
+    bankNum: '',
+    bankInfoNo: undefined,
+    bankName: '',
+    bankNo: '',
+    isture: '1',
+    circlesName: '',
+    phone: '',
+    invoiceTypeNo: undefined,
+    invoiceTypeName: '',
+    businessName: detailData.value.businessName || '',
+    businessAddress: detailData.value.businessAddress || ''
+  };
+  paymentDialogTitle.value = '新增付款信息';
+  paymentDialogReadonly.value = false;
+  paymentDialogVisible.value = true;
+};
+
+/** 发票类型选择改变 */
+const handleInvoiceTypeChange = (value: string | number) => {
+  const selectedInvoice = invoiceTypeList.value.find(item => item.id === value);
+  if (selectedInvoice) {
+    paymentForm.value.invoiceTypeNo = selectedInvoice.id;
+    paymentForm.value.invoiceTypeName = selectedInvoice.invoiceTypeName;
+  }
+};
+
+/** 银行选择改变 */
+const handleBankChange = (value: string | number) => {
+  const selectedBank = systemBankList.value.find(item => item.id === value);
+  if (selectedBank) {
+    paymentForm.value.bankInfoNo = selectedBank.id;
+    paymentForm.value.bankName = selectedBank.bnName;
+  }
+};
+
+/** 提交付款信息 */
+const handlePaymentSubmit = async () => {
+  if (!paymentFormRef.value) return;
+
+  paymentFormRef.value.validate(async (valid: boolean) => {
+    if (!valid) return;
+
+    try {
+      paymentSubmitLoading.value = true;
+
+      // 设置供应商编号和ID
+      if (!paymentForm.value.supplierNo && detailData.value.supplierNo) {
+        paymentForm.value.supplierNo = detailData.value.supplierNo;
+      }
+      if (!paymentForm.value.supplierId && detailData.value.id) {
+        paymentForm.value.supplierId = detailData.value.id;
+      }
+
+      if ((paymentForm.value as any).id) {
+        // 更新
+        await updateBank(paymentForm.value);
+        ElMessage({ message: '更新成功', type: 'info' });
+      } else {
+        // 新增
+        await addBank(paymentForm.value);
+        ElMessage({ message: '新增成功', type: 'info' });
+      }
+
+      paymentDialogVisible.value = false;
+      // 刷新付款信息列表
+      await getPaymentInfo();
+    } catch (e) {
+      console.error('保存付款信息失败:', e);
+      ElMessage.error('保存付款信息失败');
+    } finally {
+      paymentSubmitLoading.value = false;
+    }
+  });
+};
+
+/** 获取地址列表 */
+const getAddressList = async () => {
+  let id = route.query.id as string;
+  if (!id && userStore.supplierId) {
+    id = String(userStore.supplierId);
+  }
+  if (!id) return;
+
+  try {
+    const res = await listAddress({
+      supplierId: id,
+      pageNum: 1,
+      pageSize: 1000
+    });
+    addressList.value = res.data || res.rows || [];
+  } catch (e) {
+    console.error('获取地址列表失败:', e);
+  }
+};
+
+/** 新增地址 */
+const handleAddAddress = () => {
+  // 重置表单
+  addressForm.value = {
+    supplierNo: detailData.value.supplierNo,
+    supplierId: detailData.value.id,
+    shipperName: '',
+    shipperPhone: '',
+    shippingPostCode: '',
+    shippingProvincial: '',
+    shippingCity: '',
+    shippingCounty: '',
+    shippingAddress: '',
+    isSelf: 0
+  };
+  selectedAddressRegion.value = [];
+  addressDialogTitle.value = '添加地址';
+  addressDialogReadonly.value = false;
+  addressDialogVisible.value = true;
+};
+
+/** 查看地址 */
+const handleViewAddress = async (row: any) => {
+  try {
+    const res = await getAddress(row.id);
+    Object.assign(addressForm.value, res.data);
+
+    // 回显省市区选择器
+    if (res.data.shippingProvincial && res.data.shippingCity && res.data.shippingCounty) {
+      const province = res.data.shippingProvincial;
+      const city = res.data.shippingCity;
+      const county = res.data.shippingCounty;
+
+      // 根据省市区名称查找对应的代码
+      const provinceItem = regionOptions.value.find((p: any) => p.label === province);
+      if (provinceItem) {
+        const cityItem = provinceItem.children?.find((c: any) => c.label === city);
+        if (cityItem) {
+          const districtItem = cityItem.children?.find((d: any) => d.label === county);
+          if (districtItem) {
+            selectedAddressRegion.value = [provinceItem.value, cityItem.value, districtItem.value];
+          }
+        }
+      }
+    }
+
+    addressDialogTitle.value = '查看地址';
+    addressDialogReadonly.value = true;
+    addressDialogVisible.value = true;
+  } catch (e) {
+    console.error('获取地址详情失败:', e);
+    ElMessage.error('获取地址详情失败');
+  }
+};
+
+/** 编辑地址 */
+const handleEditAddress = async (row: any) => {
+  try {
+    const res = await getAddress(row.id);
+    Object.assign(addressForm.value, res.data);
+
+    // 回显省市区选择器
+    if (res.data.shippingProvincial && res.data.shippingCity && res.data.shippingCounty) {
+      const province = res.data.shippingProvincial;
+      const city = res.data.shippingCity;
+      const county = res.data.shippingCounty;
+
+      // 根据省市区名称查找对应的代码
+      const provinceItem = regionOptions.value.find((p: any) => p.label === province);
+      if (provinceItem) {
+        const cityItem = provinceItem.children?.find((c: any) => c.label === city);
+        if (cityItem) {
+          const districtItem = cityItem.children?.find((d: any) => d.label === county);
+          if (districtItem) {
+            selectedAddressRegion.value = [provinceItem.value, cityItem.value, districtItem.value];
+          }
+        }
+      }
+    }
+
+    addressDialogTitle.value = '编辑地址';
+    addressDialogReadonly.value = false;
+    addressDialogVisible.value = true;
+  } catch (e) {
+    console.error('获取地址详情失败:', e);
+    ElMessage.error('获取地址详情失败');
+  }
+};
+
+/** 删除地址 */
+const handleDeleteAddress = async (row: any) => {
+  try {
+    await ElMessageBox.confirm('确认删除该地址吗?', '提示', {
+      confirmButtonText: '确认',
+      cancelButtonText: '取消',
+      type: 'warning'
+    });
+
+    await delAddress(row.id);
+    ElMessage({ message: '删除成功', type: 'info' });
+    
+    // 刷新地址列表
+    getAddressList();
+  } catch (e: any) {
+    if (e !== 'cancel') {
+      console.error('删除地址失败:', e);
+      ElMessage.error('删除地址失败');
+    }
+  }
+};
+
+/** 地址省市区改变事件 */
+const handleAddressRegionChange = (value: string[]) => {
+  if (value && value.length === 3) {
+    // value 是 [省代码, 市代码, 区代码]
+    const [provinceCode, cityCode, districtCode] = value;
+
+    // 从 regionOptions 中查找对应的名称
+    let provinceName = '';
+    let cityName = '';
+    let districtName = '';
+
+    const province = regionOptions.value.find((p: any) => p.value === provinceCode);
+    if (province) {
+      provinceName = province.label;
+
+      const city = province.children?.find((c: any) => c.value === cityCode);
+      if (city) {
+        cityName = city.label;
+
+        const district = city.children?.find((d: any) => d.value === districtCode);
+        if (district) {
+          districtName = district.label;
+        }
+      }
+    }
+
+    // 更新 addressForm
+    addressForm.value.shippingProvincial = provinceName;
+    addressForm.value.shippingCity = cityName;
+    addressForm.value.shippingCounty = districtName;
+  } else {
+    // 清空
+    addressForm.value.shippingProvincial = '';
+    addressForm.value.shippingCity = '';
+    addressForm.value.shippingCounty = '';
+  }
+};
+
+/** 提交地址 */
+const handleAddressSubmit = async () => {
+  if (!addressFormRef.value) return;
+
+  addressFormRef.value.validate(async (valid: boolean) => {
+    if (!valid) return;
+
+    try {
+      addressSubmitLoading.value = true;
+
+      // 设置供应商编号和ID
+      if (!addressForm.value.supplierNo && detailData.value.supplierNo) {
+        addressForm.value.supplierNo = detailData.value.supplierNo;
+      }
+      if (!addressForm.value.supplierId && detailData.value.id) {
+        addressForm.value.supplierId = detailData.value.id;
+      }
+
+      if ((addressForm.value as any).id) {
+        // 更新
+        await updateAddress(addressForm.value);
+        ElMessage({ message: '更新成功', type: 'info' });
+      } else {
+        // 新增
+        await addAddress(addressForm.value);
+        ElMessage({ message: '新增成功', type: 'info' });
+      }
+
+      addressDialogVisible.value = false;
+      // 刷新地址列表
+      await getAddressList();
+    } catch (e) {
+      console.error('保存地址失败:', e);
+      ElMessage.error('保存地址失败');
+    } finally {
+      addressSubmitLoading.value = false;
+    }
+  });
+};
+
+onMounted(async () => {
+  // 先初始化省市区数据
+  initRegionOptions();
+  // 初始化供货区域选项数据
+  initSupplyAreaOptions();
+  
+  // 并行加载所有下拉框选项数据
+  await Promise.all([
+    getStaffOptions(),
+    getCompanyOptions(), // 获取公司下拉选项
+    getEnterpriseScaleOptions(), // 获取企业规模下拉选项
+    getIndustryCategoryOptions(), // 获取行业类别下拉选项
+    getSupplierLevelOptions(), // 获取供应商等级下拉选项
+    getSupplierTypeOptions(), // 获取供应商类型下拉选项
+    getContractTypeDict(), // 获取合同类型字典
+    getTaxRateData(), // 获取税率列表
+    getSettlementMethodData(), // 获取结算方式列表
+    getInvoiceTypeData(), // 获取发票类型列表
+    getAllBrandList(), // 获取所有品牌列表
+    getSystemBankData() // 获取银行列表
+  ]);
+  
+  // 下拉框选项加载完成后,再获取详情数据
+  // getDetail 会自动从 userStore 获取 supplierId(如果 URL 中没有 id)
+  await getDetail();
+
+  // 只有在编辑模式或基础信息已保存时才加载其他数据
+  let id = route.query.id as string;
+  const mode = route.query.mode as string;
+  
+  // 如果 URL 中没有 id,使用 userStore.supplierId
+  if (!id && userStore.supplierId) {
+    id = String(userStore.supplierId);
+  }
+  
+  if (id && mode !== 'add') {
+    getContactList();
+    getProductCategories(); // 这个方法内部会调用 getSupplierSelectedCategories
+    getContractList(); // 获取合同列表
+    getPaymentInfo(); // 获取付款信息
+    getAuthorizationList(); // 获取授权详情列表
+    getAddressList(); // 获取地址列表
+    getSupplyAreaList(); // 获取供货区域列表
+  }
+});
+</script>
+
+<style scoped>
+.app-container {
+  background: #f0f2f5;
+  min-height: 100vh;
+  padding: 0;
+}
+
+.detail-header {
+  background: #fff;
+  padding: 16px 24px;
+  display: flex;
+  align-items: center;
+  border-bottom: 1px solid #e8e8e8;
+  margin-bottom: 0;
+}
+
+.back-icon {
+  font-size: 18px;
+  cursor: pointer;
+  margin-right: 12px;
+  color: #666;
+}
+
+.back-icon:hover {
+  color: #409eff;
+}
+
+.header-title {
+  font-size: 16px;
+  font-weight: 500;
+  color: #333;
+}
+
+.detail-tabs {
+  background: #fff;
+  margin: 0;
+  padding: 0 24px;
+  margin-top: 16px;
+}
+
+.detail-tabs :deep(.el-tabs__header) {
+  margin: 0;
+  border-bottom: 1px solid #e8e8e8;
+}
+
+.detail-tabs :deep(.el-tabs__nav-wrap) {
+  padding: 0;
+}
+
+.detail-tabs :deep(.el-tabs__item) {
+  height: 48px;
+  line-height: 48px;
+  font-size: 14px;
+  color: #666;
+}
+
+.detail-tabs :deep(.el-tabs__item.is-active) {
+  color: #409eff;
+  font-weight: 500;
+}
+
+.tab-content {
+  padding: 24px;
+  background: #fff;
+}
+
+.info-section {
+  margin-bottom: 40px;
+}
+
+.section-title {
+  font-size: 15px;
+  font-weight: 500;
+  color: #333;
+  margin-bottom: 24px;
+  padding-bottom: 12px;
+  border-bottom: 1px solid #e8e8e8;
+}
+
+.section-title-row {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-bottom: 24px;
+  padding-bottom: 12px;
+  border-bottom: 1px solid #e8e8e8;
+}
+
+.section-title-left {
+  display: flex;
+  align-items: center;
+}
+
+.section-title-text {
+  font-size: 15px;
+  font-weight: 500;
+  color: #409eff;
+}
+
+.section-title-divider {
+  margin: 0 8px;
+  color: #999;
+}
+
+.supplier-no {
+  color: #409eff;
+  font-weight: normal;
+  font-size: 14px;
+}
+
+.detail-form :deep(.el-form-item) {
+  margin-bottom: 18px;
+}
+
+.detail-form :deep(.el-form-item__label) {
+  color: #666;
+  font-size: 14px;
+}
+
+.detail-form :deep(.el-form-item__label::before) {
+  color: #f56c6c;
+}
+
+.form-row {
+  margin-bottom: 20px;
+}
+
+.form-item {
+  display: flex;
+  align-items: flex-start;
+  line-height: 32px;
+  font-size: 14px;
+}
+
+.form-item .label {
+  color: #666;
+  min-width: 100px;
+  flex-shrink: 0;
+}
+
+.form-item .value {
+  color: #333;
+  flex: 1;
+  word-break: break-all;
+}
+
+.category-group {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 16px;
+}
+
+.category-group .el-checkbox {
+  margin-right: 0;
+  margin-bottom: 12px;
+}
+
+.supply-brand {
+  font-size: 14px;
+  color: #333;
+  padding: 8px 0;
+}
+
+.brand-input-wrapper {
+  margin-top: 12px;
+}
+
+.brand-display-wrapper {
+  margin-top: 12px;
+  min-height: 40px;
+  padding: 8px;
+  background: #f5f7fa;
+  border-radius: 4px;
+}
+
+.brand-tags-container {
+  min-height: 80px;
+  padding: 16px;
+  background: #f5f7fa;
+  border-radius: 4px;
+  border: 1px solid #e4e7ed;
+}
+
+.brand-search-results {
+  max-height: 300px;
+  overflow-y: auto;
+  margin-bottom: 20px;
+  border: 1px solid #e4e7ed;
+  border-radius: 4px;
+}
+
+.search-results-title {
+  padding: 10px 16px;
+  background: #f5f7fa;
+  font-weight: 500;
+  font-size: 14px;
+  color: #606266;
+  border-bottom: 1px solid #e4e7ed;
+}
+
+.brand-result-item {
+  padding: 12px 16px;
+  cursor: pointer;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  border-bottom: 1px solid #f0f0f0;
+  transition: background-color 0.2s;
+}
+
+.brand-result-item:hover {
+  background-color: #f5f7fa;
+}
+
+.brand-result-item:last-child {
+  border-bottom: none;
+}
+
+.brand-result-name {
+  font-size: 14px;
+  color: #303133;
+  font-weight: 500;
+}
+
+.brand-result-no {
+  font-size: 12px;
+  color: #909399;
+}
+
+.selected-brands-section {
+  margin-top: 20px;
+}
+
+.section-label {
+  font-size: 14px;
+  color: #606266;
+  margin-bottom: 12px;
+  font-weight: 500;
+}
+
+.image-upload {
+  display: inline-block;
+  margin-left: 10px;
+}
+
+.upload-placeholder {
+  width: 100px;
+  height: 100px;
+  border: 1px dashed #d9d9d9;
+  border-radius: 4px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  cursor: pointer;
+  color: #999;
+  font-size: 24px;
+}
+
+.upload-placeholder:hover {
+  border-color: #409eff;
+  color: #409eff;
+}
+</style>