Răsfoiți Sursa

修改供应商信息

hurx 1 zi în urmă
părinte
comite
d010aafcae

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

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

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

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

+ 43 - 0
src/views/supplier/info/components/AccountTab.vue

@@ -0,0 +1,43 @@
+<template>
+  <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 v-if="!isViewMode" type="primary" icon="Plus" @click="emit('addPayment')">新增付款信息</el-button>
+      </div>
+      <el-table :data="paymentInfoList" border style="width: 100%">
+        <el-table-column prop="isture" label="是否主账号" align="center">
+          <template #default="scope">
+            <span>{{ Number(scope.row.isture) === 1 ? '是' : '否' }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="bankName" label="开户银行" align="center" />
+        <el-table-column prop="bankNo" label="银行账户" align="center" />
+
+        <el-table-column label="操作" align="center" width="120">
+          <template #default="scope">
+            <el-button link type="primary" @click="emit('viewPayment', scope.row)">查看</el-button>
+            <el-button v-if="!isViewMode" link type="primary" @click="emit('editPayment', scope.row)">编辑</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<script setup lang="ts">
+defineProps<{
+  paymentInfoList: any[];
+  isViewMode: boolean;
+}>();
+
+const emit = defineEmits<{
+  (e: 'addPayment'): void;
+  (e: 'viewPayment', row: any): void;
+  (e: 'editPayment', row: any): void;
+  (e: 'delete', row: any): void;
+  (e: 'change-deafult', row: any): void;
+}>();
+</script>

+ 73 - 32
src/views/supplier/info/components/BasicInfoTab.vue

@@ -6,11 +6,11 @@
           <span class="section-title-text">企业基本信息</span>
           <span class="section-title-text">企业基本信息</span>
           <span class="section-title-divider">/</span>
           <span class="section-title-divider">/</span>
           <span class="supplier-no">供应商编码:{{ detailData.supplierNo }}</span>
           <span class="supplier-no">供应商编码:{{ detailData.supplierNo }}</span>
-          <el-tag 
-            v-if="detailData?.supplyStatus !== undefined && detailData?.supplyStatus !== null" 
-            :type="getStatusConfig(detailData.supplyStatus).type" 
-            effect="light" 
-            style="margin-left: 8px;"
+          <el-tag
+            v-if="detailData?.supplyStatus !== undefined && detailData?.supplyStatus !== null"
+            :type="getStatusConfig(detailData.supplyStatus).type"
+            effect="light"
+            style="margin-left: 8px"
           >
           >
             {{ getStatusConfig(detailData.supplyStatus).text }}
             {{ getStatusConfig(detailData.supplyStatus).text }}
           </el-tag>
           </el-tag>
@@ -27,7 +27,14 @@
         <el-row :gutter="12" class="form-row">
         <el-row :gutter="12" class="form-row">
           <el-col :span="8">
           <el-col :span="8">
             <el-form-item label="所属公司:" required>
             <el-form-item label="所属公司:" required>
-              <el-select v-model="detailData.ownedCompany" placeholder="请选择" clearable filterable style="width: 100%;" :disabled="!isAddMode || !isEditing">
+              <el-select
+                v-model="detailData.ownedCompany"
+                placeholder="请选择"
+                clearable
+                filterable
+                style="width: 100%"
+                :disabled="!isAddMode || !isEditing"
+              >
                 <el-option v-for="company in companyOptions" :key="company.id" :label="company.companyName" :value="company.id" />
                 <el-option v-for="company in companyOptions" :key="company.id" :label="company.companyName" :value="company.id" />
               </el-select>
               </el-select>
             </el-form-item>
             </el-form-item>
@@ -39,11 +46,7 @@
           </el-col>
           </el-col>
           <el-col :span="8">
           <el-col :span="8">
             <el-form-item label="工商名称:" required>
             <el-form-item label="工商名称:" required>
-              <el-input
-                v-model="detailData.businessName"
-                placeholder="请输入工商名称"
-                :disabled="!isEditing"
-              />
+              <el-input v-model="detailData.businessName" placeholder="请输入工商名称" :disabled="!isEditing" />
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
@@ -56,14 +59,21 @@
           </el-col>
           </el-col>
           <el-col :span="8">
           <el-col :span="8">
             <el-form-item label="供应商等级:" required>
             <el-form-item label="供应商等级:" required>
-              <el-select v-model="detailData.cooperateLevel" placeholder="请选择" clearable filterable style="width: 100%;" :disabled="!isAddMode || !isEditing">
+              <el-select
+                v-model="detailData.cooperateLevel"
+                placeholder="请选择"
+                clearable
+                filterable
+                style="width: 100%"
+                :disabled="!isAddMode || !isEditing"
+              >
                 <el-option v-for="level in supplierLevelOptions" :key="level.id" :label="level.supplierLevelName" :value="String(level.id)" />
                 <el-option v-for="level in supplierLevelOptions" :key="level.id" :label="level.supplierLevelName" :value="String(level.id)" />
               </el-select>
               </el-select>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :span="8">
           <el-col :span="8">
             <el-form-item label="企业规模:" required>
             <el-form-item label="企业规模:" required>
-              <el-select v-model="detailData.membershipSize" placeholder="请选择" clearable filterable style="width: 100%;" :disabled="!isEditing">
+              <el-select v-model="detailData.membershipSize" placeholder="请选择" clearable filterable style="width: 100%" :disabled="!isEditing">
                 <el-option v-for="scale in enterpriseScaleOptions" :key="scale.id" :label="scale.enterpriseScaleName" :value="scale.id" />
                 <el-option v-for="scale in enterpriseScaleOptions" :key="scale.id" :label="scale.enterpriseScaleName" :value="scale.id" />
               </el-select>
               </el-select>
             </el-form-item>
             </el-form-item>
@@ -73,27 +83,40 @@
         <el-row :gutter="12" class="form-row">
         <el-row :gutter="12" class="form-row">
           <el-col :span="8">
           <el-col :span="8">
             <el-form-item label="行业类别:" required>
             <el-form-item label="行业类别:" required>
-              <el-select v-model="detailData.industrCategory" placeholder="请选择" clearable filterable style="width: 100%;" :disabled="!isAddMode || !isEditing">
-                <el-option v-for="industry in industryCategoryOptions" :key="industry.id" :label="industry.industryCategoryName" :value="industry.id" />
+              <el-select
+                v-model="detailData.industrCategory"
+                placeholder="请选择"
+                clearable
+                filterable
+                style="width: 100%"
+                :disabled="!isAddMode || !isEditing"
+              >
+                <el-option
+                  v-for="industry in industryCategoryOptions"
+                  :key="industry.id"
+                  :label="industry.industryCategoryName"
+                  :value="industry.id"
+                />
               </el-select>
               </el-select>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :span="8">
           <el-col :span="8">
             <el-form-item label="供应商类型:" required>
             <el-form-item label="供应商类型:" required>
-              <el-select v-model="detailData.supplierType" placeholder="请选择" clearable filterable style="width: 100%;" :disabled="!isAddMode || !isEditing">
+              <el-select
+                v-model="detailData.supplierType"
+                placeholder="请选择"
+                clearable
+                filterable
+                style="width: 100%"
+                :disabled="!isAddMode || !isEditing"
+              >
                 <el-option v-for="type in supplierTypeOptions" :key="type.id" :label="type.supplierTypeName" :value="type.id" />
                 <el-option v-for="type in supplierTypeOptions" :key="type.id" :label="type.supplierTypeName" :value="type.id" />
               </el-select>
               </el-select>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :span="8">
           <el-col :span="8">
             <el-form-item label="固定电话:">
             <el-form-item label="固定电话:">
-              <el-input
-                v-model="detailData.fixedPhone"
-                placeholder="请输入固定电话"
-                type="tel"
-                @input="onFixedPhoneInput"
-                :disabled="!isEditing"
-              />
+              <el-input v-model="detailData.fixedPhone" placeholder="请输入固定电话" type="tel" @input="onFixedPhoneInput" :disabled="!isEditing" />
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
@@ -111,7 +134,13 @@
           </el-col>
           </el-col>
           <el-col :span="8">
           <el-col :span="8">
             <el-form-item label="开始时间:">
             <el-form-item label="开始时间:">
-              <el-date-picker v-model="detailData.validityFromDate" type="date" placeholder="请选择" style="width: 100%;" :disabled="!isAddMode || !isEditing" />
+              <el-date-picker
+                v-model="detailData.validityFromDate"
+                type="date"
+                placeholder="请选择"
+                style="width: 100%"
+                :disabled="!isAddMode || !isEditing"
+              />
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
@@ -119,7 +148,13 @@
         <el-row :gutter="12" class="form-row">
         <el-row :gutter="12" class="form-row">
           <el-col :span="8">
           <el-col :span="8">
             <el-form-item label="结束时间:">
             <el-form-item label="结束时间:">
-              <el-date-picker v-model="detailData.validityToDate" type="date" placeholder="请选择" style="width: 100%;" :disabled="!isAddMode || !isEditing" />
+              <el-date-picker
+                v-model="detailData.validityToDate"
+                type="date"
+                placeholder="请选择"
+                style="width: 100%"
+                :disabled="!isAddMode || !isEditing"
+              />
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :span="8">
           <el-col :span="8">
@@ -137,7 +172,16 @@
         <el-row :gutter="12" class="form-row">
         <el-row :gutter="12" class="form-row">
           <el-col :span="8">
           <el-col :span="8">
             <el-form-item label="详细地址:" required>
             <el-form-item label="详细地址:" required>
-              <el-cascader v-model="selectedOfficeRegionProxy" :options="regionOptions" placeholder="请选择省市区" clearable filterable style="width: 100%;" @change="onOfficeRegionChange" :disabled="!isEditing" />
+              <el-cascader
+                v-model="selectedOfficeRegionProxy"
+                :options="regionOptions"
+                placeholder="请选择省市区"
+                clearable
+                filterable
+                style="width: 100%"
+                @change="onOfficeRegionChange"
+                :disabled="!isEditing"
+              />
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :span="8">
           <el-col :span="8">
@@ -240,14 +284,13 @@
         <el-col :span="24">
         <el-col :span="24">
           <div class="form-item">
           <div class="form-item">
             <span class="label">工商地址:</span>
             <span class="label">工商地址:</span>
-            <el-input v-model="businessInfo.businessAddress" placeholder="工商地址" style="width: 70%;" :disabled="!isEditing" />
+            <el-input v-model="businessInfo.businessAddress" placeholder="工商地址" style="width: 70%" :disabled="!isEditing" />
           </div>
           </div>
         </el-col>
         </el-col>
       </el-row>
       </el-row>
-
     </div>
     </div>
 
 
-    <div class="info-section">
+    <!-- <div class="info-section">
       <div class="section-title-row">
       <div class="section-title-row">
         <div class="section-title-left">
         <div class="section-title-left">
           <span class="section-title-text">付款信息</span>
           <span class="section-title-text">付款信息</span>
@@ -262,9 +305,7 @@
         <el-table-column prop="bankName" label="开户银行" align="center" />
         <el-table-column prop="bankName" label="开户银行" align="center" />
         <el-table-column prop="bankNo" label="银行账户" align="center" />
         <el-table-column prop="bankNo" label="银行账户" align="center" />
       </el-table>
       </el-table>
-
-
-    </div>
+    </div> -->
   </div>
   </div>
 </template>
 </template>
 
 

+ 74 - 0
src/views/supplier/info/components/QualificationTab.vue

@@ -0,0 +1,74 @@
+<template>
+  <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>
+      </div>
+
+      <!-- 资质信息列表 -->
+
+      <el-table :data="qualificationList" border style="width: 100%">
+        <el-table-column prop="qualificationName" label="资质名称" align="center" />
+
+        <el-table-column prop="qualificationLevel" label="资质级别" align="center" />
+
+        <el-table-column prop="certificateNo" label="证件编号" align="center" />
+
+        <el-table-column prop="issuingAuthority" label="发证机构" align="center" />
+
+        <el-table-column label="资质到期日" align="center">
+          <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="emit('downloadQualification', 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="emit('viewQualification', scope.row)">查看</el-button>
+          </template>
+        </el-table-column> -->
+      </el-table>
+
+      <!-- 空状态 -->
+
+      <!-- <div v-if="qualificationList.length === 0" class="empty-state">暂无资质信息</div> -->
+    </div>
+  </div>
+</template>
+
+<script setup lang="ts">
+defineProps<{
+  qualificationList: any[];
+  isViewMode: boolean;
+}>();
+
+/** 格式化日期 */
+
+const formatDate = (dateStr: string) => {
+  if (!dateStr) return '';
+
+  // 去掉时分秒,只保留日期部分
+
+  return dateStr.split(' ')[0];
+};
+
+const emit = defineEmits<{
+  (e: 'downloadQualification', row: any): void;
+  // (e: 'viewQualification', row: any): void;
+  (e: 'delete', row: any): void;
+}>();
+</script>

+ 10 - 5
src/views/supplier/info/components/SupplyInfoTab.vue

@@ -1,6 +1,6 @@
 <template>
 <template>
   <div class="tab-content">
   <div class="tab-content">
-    <div class="info-section">
+    <!-- <div class="info-section">
       <div class="section-title-row">
       <div class="section-title-row">
         <div class="section-title-left">
         <div class="section-title-left">
           <span class="section-title-text">供货类目</span>
           <span class="section-title-text">供货类目</span>
@@ -30,7 +30,7 @@
         </el-tag>
         </el-tag>
         <span v-if="selectedBrands.length === 0" style="color: #999;">暂无品牌信息</span>
         <span v-if="selectedBrands.length === 0" style="color: #999;">暂无品牌信息</span>
       </div>
       </div>
-    </div>
+    </div> 
 
 
     <div class="info-section">
     <div class="info-section">
       <div class="section-title-row">
       <div class="section-title-row">
@@ -52,7 +52,7 @@
           </template>
           </template>
         </el-table-column>
         </el-table-column>
       </el-table>
       </el-table>
-    </div>
+    </div>-->
 
 
     <div class="info-section">
     <div class="info-section">
       <div class="section-title">授权详情信息列表</div>
       <div class="section-title">授权详情信息列表</div>
@@ -94,8 +94,13 @@
         </el-table-column>
         </el-table-column>
       </el-table>
       </el-table>
 
 
-      <div style="margin-top: 20px; display: flex; justify-content: flex-end;">
-        <Pagination v-model:page="authorizationPagination.pageNum" v-model:limit="authorizationPagination.pageSize" :total="authorizationPagination.total" @pagination="emit('authorizationPagination')" />
+      <div style="margin-top: 20px; display: flex; justify-content: flex-end">
+        <Pagination
+          v-model:page="authorizationPagination.pageNum"
+          v-model:limit="authorizationPagination.pageSize"
+          :total="authorizationPagination.total"
+          @pagination="emit('authorizationPagination')"
+        />
       </div>
       </div>
     </div>
     </div>
   </div>
   </div>

+ 197 - 219
src/views/supplier/info/index.vue

@@ -34,6 +34,29 @@
         />
         />
       </el-tab-pane>
       </el-tab-pane>
 
 
+      <el-tab-pane label="基本资质" name="qualification">
+        <QualificationTab :qualificationList="qualificationList" :isViewMode="false" @downloadQualification="handleDownload" />
+      </el-tab-pane>
+
+      <!-- 产品线及资质 -->
+      <el-tab-pane label="产品线及资质" name="supply">
+        <SupplyInfoTab
+          v-model:selectedCategories="selectedCategories"
+          :isViewMode="false"
+          :productCategoryList="productCategoryList"
+          :selectedBrands="selectedBrands"
+          :supplyAreaList="supplyAreaList"
+          :authorizationList="authorizationList"
+          :authorizationPagination="authorizationPagination"
+          :formatDate="formatDate"
+          :getAuthorizedStatusText="getAuthorizedStatusText"
+          @saveCategories="handleSaveCategories"
+          @addBrand="handleAddBrand"
+          @removeBrand="handleRemoveBrand"
+          @editSupplyArea="handleEditSupplyArea"
+          @authorizationPagination="getAuthorizationList"
+        />
+      </el-tab-pane>
       <!-- 采购信息 -->
       <!-- 采购信息 -->
       <el-tab-pane label="采销信息" name="purchase">
       <el-tab-pane label="采销信息" name="purchase">
         <PurchaseInfoTab
         <PurchaseInfoTab
@@ -60,7 +83,7 @@
       </el-tab-pane>
       </el-tab-pane>
 
 
       <!-- 供应信息 -->
       <!-- 供应信息 -->
-      <el-tab-pane label="供应信息" name="supply">
+      <!-- <el-tab-pane label="供应信息" name="supply">
         <SupplyInfoTab
         <SupplyInfoTab
           v-model:selectedCategories="selectedCategories"
           v-model:selectedCategories="selectedCategories"
           :isViewMode="false"
           :isViewMode="false"
@@ -78,16 +101,21 @@
           @editSupplyArea="handleEditSupplyArea"
           @editSupplyArea="handleEditSupplyArea"
           @authorizationPagination="getAuthorizationList"
           @authorizationPagination="getAuthorizationList"
         />
         />
-      </el-tab-pane>
+      </el-tab-pane> -->
 
 
       <!-- 地址管理 -->
       <!-- 地址管理 -->
       <el-tab-pane label="地址管理" name="address">
       <el-tab-pane label="地址管理" name="address">
-        <AddressTab
-          :addressList="addressList"
+        <AddressTab :addressList="addressList" :isViewMode="false" @add="handleAddAddress" @edit="handleEditAddress" @delete="handleDeleteAddress" />
+      </el-tab-pane>
+
+      <!-- 财务信息 -->
+      <el-tab-pane label="财务信息" name="account">
+        <AccountTab
+          :paymentInfoList="paymentInfoList"
           :isViewMode="false"
           :isViewMode="false"
-          @add="handleAddAddress"
-          @edit="handleEditAddress"
-          @delete="handleDeleteAddress"
+          @addPayment="handleAddPayment"
+          @editPayment="handleEditPayment"
+          @viewPayment="handleViewPayment"
         />
         />
       </el-tab-pane>
       </el-tab-pane>
 
 
@@ -116,41 +144,20 @@
     </el-tabs>
     </el-tabs>
 
 
     <!-- 付款信息对话框 -->
     <!-- 付款信息对话框 -->
-    <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-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-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 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-select>
         </el-form-item>
         </el-form-item>
 
 
         <el-form-item label="发票抬头:" prop="businessName">
         <el-form-item label="发票抬头:" prop="businessName">
-          <el-input v-model="paymentForm.businessName" placeholder="企业工商名称" disabled/>
+          <el-input v-model="paymentForm.businessName" placeholder="企业工商名称" disabled />
         </el-form-item>
         </el-form-item>
 
 
         <el-form-item label="纳税人识别号:" prop="circlesName">
         <el-form-item label="纳税人识别号:" prop="circlesName">
-          <el-input v-model="paymentForm.circlesName" placeholder="请输入纳税人识别号" disabled/>
+          <el-input v-model="paymentForm.circlesName" placeholder="请输入纳税人识别号" disabled />
         </el-form-item>
         </el-form-item>
 
 
         <el-form-item label="开户行行号:" prop="bankNum">
         <el-form-item label="开户行行号:" prop="bankNum">
@@ -158,18 +165,8 @@
         </el-form-item>
         </el-form-item>
 
 
         <el-form-item label="开户行名称:" prop="bankInfoNo">
         <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 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-select>
         </el-form-item>
         </el-form-item>
 
 
@@ -202,19 +199,8 @@
     </el-dialog>
     </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-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-row :gutter="20">
           <el-col :span="12">
           <el-col :span="12">
             <el-form-item label="员工姓名:" prop="userName">
             <el-form-item label="员工姓名:" prop="userName">
@@ -223,12 +209,7 @@
           </el-col>
           </el-col>
           <el-col :span="12">
           <el-col :span="12">
             <el-form-item label="手机号:" prop="phone">
             <el-form-item label="手机号:" prop="phone">
-              <el-input
-                v-model="contactForm.phone"
-                placeholder="请输入手机号"
-                maxlength="11"
-                @input="onContactPhoneInput"
-              />
+              <el-input v-model="contactForm.phone" placeholder="请输入手机号" maxlength="11" @input="onContactPhoneInput" />
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
@@ -262,7 +243,7 @@
         <el-row :gutter="20">
         <el-row :gutter="20">
           <el-col :span="12">
           <el-col :span="12">
             <el-form-item label="主要联系人:" prop="isPrimaryContact">
             <el-form-item label="主要联系人:" prop="isPrimaryContact">
-              <el-select v-model="contactForm.isPrimaryContact" placeholder="请选择" style="width: 100%;">
+              <el-select v-model="contactForm.isPrimaryContact" placeholder="请选择" style="width: 100%">
                 <el-option label="是" value="1" />
                 <el-option label="是" value="1" />
                 <el-option label="否" value="0" />
                 <el-option label="否" value="0" />
               </el-select>
               </el-select>
@@ -270,7 +251,7 @@
           </el-col>
           </el-col>
           <el-col :span="12">
           <el-col :span="12">
             <el-form-item label="允许登录供应商端:" prop="isRegister">
             <el-form-item label="允许登录供应商端:" prop="isRegister">
-              <el-select v-model="contactForm.isRegister" placeholder="请选择" style="width: 100%;">
+              <el-select v-model="contactForm.isRegister" placeholder="请选择" style="width: 100%">
                 <el-option label="是" value="1" />
                 <el-option label="是" value="1" />
                 <el-option label="否" value="0" />
                 <el-option label="否" value="0" />
               </el-select>
               </el-select>
@@ -289,12 +270,7 @@
         <el-row :gutter="20">
         <el-row :gutter="20">
           <el-col :span="24">
           <el-col :span="24">
             <el-form-item label="备注:" prop="remark">
             <el-form-item label="备注:" prop="remark">
-              <el-input
-                v-model="contactForm.remark"
-                type="textarea"
-                :rows="3"
-                placeholder="请输入备注"
-              />
+              <el-input v-model="contactForm.remark" type="textarea" :rows="3" placeholder="请输入备注" />
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
@@ -309,12 +285,7 @@
     </el-dialog>
     </el-dialog>
 
 
     <!-- 重置联系人密码对话框 -->
     <!-- 重置联系人密码对话框 -->
-    <el-dialog
-      v-model="resetPwdDialogVisible"
-      title="重置密码"
-      width="520px"
-      :close-on-click-modal="false"
-    >
+    <el-dialog v-model="resetPwdDialogVisible" title="重置密码" width="520px" :close-on-click-modal="false">
       <el-form ref="resetPwdFormRef" :model="resetPwdForm" :rules="resetPwdRules" label-width="120px">
       <el-form ref="resetPwdFormRef" :model="resetPwdForm" :rules="resetPwdRules" label-width="120px">
         <el-form-item label="新密码:" prop="password">
         <el-form-item label="新密码:" prop="password">
           <el-input v-model="resetPwdForm.password" type="password" show-password placeholder="请输入新密码" />
           <el-input v-model="resetPwdForm.password" type="password" show-password placeholder="请输入新密码" />
@@ -333,12 +304,7 @@
     </el-dialog>
     </el-dialog>
 
 
     <!-- 供货区域编辑对话框 -->
     <!-- 供货区域编辑对话框 -->
-    <el-dialog
-      v-model="supplyAreaDialogVisible"
-      title="编辑供货区域"
-      width="700px"
-      :close-on-click-modal="false"
-    >
+    <el-dialog v-model="supplyAreaDialogVisible" title="编辑供货区域" width="700px" :close-on-click-modal="false">
       <RegionCascader v-model="selectedSupplyAreaCodes" :multiple="true" :options="supplyAreaOptions" :show-district="false" />
       <RegionCascader v-model="selectedSupplyAreaCodes" :multiple="true" :options="supplyAreaOptions" :show-district="false" />
 
 
       <template #footer>
       <template #footer>
@@ -350,19 +316,8 @@
     </el-dialog>
     </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-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-row :gutter="20">
           <el-col :span="12">
           <el-col :span="12">
             <el-form-item label="供应商编号:">
             <el-form-item label="供应商编号:">
@@ -398,7 +353,7 @@
                 placeholder="请选择"
                 placeholder="请选择"
                 clearable
                 clearable
                 filterable
                 filterable
-                style="width: 100%;"
+                style="width: 100%"
                 @change="handleAddressRegionChange"
                 @change="handleAddressRegionChange"
               />
               />
             </el-form-item>
             </el-form-item>
@@ -408,12 +363,7 @@
         <el-row :gutter="20">
         <el-row :gutter="20">
           <el-col :span="24">
           <el-col :span="24">
             <el-form-item label="详细地址:" prop="shippingAddress" required>
             <el-form-item label="详细地址:" prop="shippingAddress" required>
-              <el-input
-                v-model="addressForm.shippingAddress"
-                type="textarea"
-                :rows="3"
-                placeholder="请输入详细地址"
-              />
+              <el-input v-model="addressForm.shippingAddress" type="textarea" :rows="3" placeholder="请输入详细地址" />
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
@@ -436,19 +386,8 @@
     </el-dialog>
     </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-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-row :gutter="20">
           <el-col :span="24">
           <el-col :span="24">
             <el-form-item label="合同名称:" prop="contractName">
             <el-form-item label="合同名称:" prop="contractName">
@@ -460,25 +399,15 @@
         <el-row :gutter="20">
         <el-row :gutter="20">
           <el-col :span="12">
           <el-col :span="12">
             <el-form-item label="合同类型:" prop="contractType">
             <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 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-select>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :span="12">
           <el-col :span="12">
             <el-form-item label="提醒时间:" prop="demandReminderTime">
             <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-input-number v-model="contractForm.demandReminderTime" :min="1" :max="365" style="width: 150px" />
+              <span style="margin-left: 10px">天</span>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
@@ -486,22 +415,12 @@
         <el-row :gutter="20">
         <el-row :gutter="20">
           <el-col :span="12">
           <el-col :span="12">
             <el-form-item label="开始时间:" prop="contractStartTime">
             <el-form-item label="开始时间:" prop="contractStartTime">
-              <el-date-picker
-                v-model="contractForm.contractStartTime"
-                type="date"
-                placeholder="请选择"
-                style="width: 100%;"
-              />
+              <el-date-picker v-model="contractForm.contractStartTime" type="date" placeholder="请选择" style="width: 100%" />
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :span="12">
           <el-col :span="12">
             <el-form-item label="截止时间:" prop="contractEndTime">
             <el-form-item label="截止时间:" prop="contractEndTime">
-              <el-date-picker
-                v-model="contractForm.contractEndTime"
-                type="date"
-                placeholder="请选择"
-                style="width: 100%;"
-              />
+              <el-date-picker v-model="contractForm.contractEndTime" type="date" placeholder="请选择" style="width: 100%" />
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
@@ -509,13 +428,8 @@
         <el-row :gutter="20">
         <el-row :gutter="20">
           <el-col :span="12">
           <el-col :span="12">
             <el-form-item label="开票类型:" prop="invoiceType">
             <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 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-select>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
@@ -531,25 +445,15 @@
         <el-row :gutter="20">
         <el-row :gutter="20">
           <el-col :span="12">
           <el-col :span="12">
             <el-form-item label="税率:" prop="taxRate">
             <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 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-select>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :span="12">
           <el-col :span="12">
             <el-form-item label="结算方式:" prop="settlementMethod">
             <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 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-select>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
@@ -572,12 +476,7 @@
         <el-row :gutter="20">
         <el-row :gutter="20">
           <el-col :span="24">
           <el-col :span="24">
             <el-form-item label="合同说明:" prop="contractDescription">
             <el-form-item label="合同说明:" prop="contractDescription">
-              <el-input
-                v-model="contractForm.contractDescription"
-                type="textarea"
-                :rows="4"
-                placeholder="请输入合同说明"
-              />
+              <el-input v-model="contractForm.contractDescription" type="textarea" :rows="4" placeholder="请输入合同说明" />
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
@@ -592,27 +491,17 @@
     </el-dialog>
     </el-dialog>
 
 
     <!-- 品牌新增对话框 -->
     <!-- 品牌新增对话框 -->
-    <el-dialog
-      v-model="brandDialogVisible"
-      title="添加品牌"
-      width="600px"
-      :close-on-click-modal="false"
-      class="brand-dialog"
-    >
+    <el-dialog v-model="brandDialogVisible" title="添加品牌" width="600px" :close-on-click-modal="false" class="brand-dialog">
       <div class="brand-dialog__search">
       <div class="brand-dialog__search">
         <el-form @submit.prevent>
         <el-form @submit.prevent>
           <el-row :gutter="12" align="middle">
           <el-row :gutter="12" align="middle">
             <el-col :span="14">
             <el-col :span="14">
-              <el-form-item label="品牌名称:" style="margin-bottom: 0;">
-                <el-input
-                  v-model="brandSearchKeyword"
-                  placeholder="请输入品牌名称"
-                  @keyup.enter="handleSearchBrand"
-                />
+              <el-form-item label="品牌名称:" style="margin-bottom: 0">
+                <el-input v-model="brandSearchKeyword" placeholder="请输入品牌名称" @keyup.enter="handleSearchBrand" />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
-            <el-col :span="10" style="display: flex; justify-content: flex-end;">
-              <el-form-item label-width="0" style="margin-bottom: 0;">
+            <el-col :span="10" style="display: flex; justify-content: flex-end">
+              <el-form-item label-width="0" style="margin-bottom: 0">
                 <el-button type="primary" @click="handleSearchBrand" :loading="brandSearchLoading">搜索</el-button>
                 <el-button type="primary" @click="handleSearchBrand" :loading="brandSearchLoading">搜索</el-button>
                 <el-button type="primary" @click="handleAddBrandToList()">添加</el-button>
                 <el-button type="primary" @click="handleAddBrandToList()">添加</el-button>
               </el-form-item>
               </el-form-item>
@@ -624,11 +513,12 @@
       <!-- 搜索结果列表 -->
       <!-- 搜索结果列表 -->
       <div v-if="brandSearchResults.length > 0" class="brand-search-results">
       <div v-if="brandSearchResults.length > 0" class="brand-search-results">
         <div class="search-results-title">搜索结果(点击添加):</div>
         <div class="search-results-title">搜索结果(点击添加):</div>
-        <div class="brand-result-item"
+        <div
+          class="brand-result-item"
           v-for="brand in brandSearchResults"
           v-for="brand in brandSearchResults"
           :key="brand.id"
           :key="brand.id"
           @click="handleAddBrandToList(brand)"
           @click="handleAddBrandToList(brand)"
-          style="cursor: pointer;"
+          style="cursor: pointer"
         >
         >
           <span class="brand-result-name">{{ brand.brandName }}</span>
           <span class="brand-result-name">{{ brand.brandName }}</span>
           <span class="brand-result-no">编号: {{ brand.brandNo }}</span>
           <span class="brand-result-no">编号: {{ brand.brandNo }}</span>
@@ -644,11 +534,11 @@
             closable
             closable
             @close="handleRemoveTempBrand(brand)"
             @close="handleRemoveTempBrand(brand)"
             type="info"
             type="info"
-            style="margin-right: 10px; margin-bottom: 10px;"
+            style="margin-right: 10px; margin-bottom: 10px"
           >
           >
             {{ brand.brandName }}
             {{ brand.brandName }}
           </el-tag>
           </el-tag>
-          <span v-if="tempSelectedBrands.length === 0" style="color: #999; font-size: 14px;">暂无已选择品牌</span>
+          <span v-if="tempSelectedBrands.length === 0" style="color: #999; font-size: 14px">暂无已选择品牌</span>
         </div>
         </div>
       </div>
       </div>
 
 
@@ -671,7 +561,21 @@ import { useUserStore } from '@/store/modules/user';
 import RegionCascader from '@/components/RegionCascader/index.vue';
 import RegionCascader from '@/components/RegionCascader/index.vue';
 import FileUpload from '@/components/FileUpload/index.vue';
 import FileUpload from '@/components/FileUpload/index.vue';
 import Pagination from '@/components/Pagination/index.vue';
 import Pagination from '@/components/Pagination/index.vue';
-import { getInfo, getStaffListSplice, getSupplierStaffIds, getContactListById, getSupplierCategories, getSupplierContractsById, getBankBySupplierId, getAuthorizeDetailList, getDictData, getTaxRateList, getSettlementMethodList, getInvoiceTypeList } from '@/api/customer/info/index';
+
+import {
+  getInfo,
+  getStaffListSplice,
+  getSupplierStaffIds,
+  getContactListById,
+  getSupplierCategories,
+  getSupplierContractsById,
+  getBankBySupplierId,
+  getAuthorizeDetailList,
+  getDictData,
+  getTaxRateList,
+  getSettlementMethodList,
+  getInvoiceTypeList
+} from '@/api/customer/info/index';
 import { updateInfo as updateSupplierInfo } from '@/api/supplier/info';
 import { updateInfo as updateSupplierInfo } from '@/api/supplier/info';
 import { getBank, updateBank, addBank } from '@/api/customer/bank/index';
 import { getBank, updateBank, addBank } from '@/api/customer/bank/index';
 import { BankForm } from '@/api/customer/bank/types';
 import { BankForm } from '@/api/customer/bank/types';
@@ -712,6 +616,11 @@ import SupplyInfoTab from './components/SupplyInfoTab.vue';
 import AddressTab from './components/AddressTab.vue';
 import AddressTab from './components/AddressTab.vue';
 import ContractTab from './components/ContractTab.vue';
 import ContractTab from './components/ContractTab.vue';
 
 
+import { listQualification } from '@/api/supplier/qualification';
+import type { QualificationVO } from '@/api/supplier/qualification/types';
+import AccountTab from './components/AccountTab.vue';
+import QualificationTab from './components/QualificationTab.vue';
+
 const scmEditInfo = (data: any) => updateSupplierInfo(data);
 const scmEditInfo = (data: any) => updateSupplierInfo(data);
 
 
 const route = useRoute();
 const route = useRoute();
@@ -741,6 +650,9 @@ const contactSearchParams = ref({
   userName: ''
   userName: ''
 });
 });
 
 
+// 供应商资质相关数据
+const qualificationList = ref<QualificationVO[]>([]);
+
 // 联系人对话框相关
 // 联系人对话框相关
 const contactDialogVisible = ref(false);
 const contactDialogVisible = ref(false);
 const contactDialogTitle = ref('');
 const contactDialogTitle = ref('');
@@ -790,7 +702,14 @@ const contactFormRules = {
 const resetPwdDialogVisible = ref(false);
 const resetPwdDialogVisible = ref(false);
 const resetPwdFormRef = ref<ElFormInstance>();
 const resetPwdFormRef = ref<ElFormInstance>();
 const resetPwdSubmitLoading = ref(false);
 const resetPwdSubmitLoading = ref(false);
-const resetPwdForm = ref<{ id: string | number | null; userId: string | number | null; userName: string; phone: string; password: string; confirmPassword: string }>({
+const resetPwdForm = ref<{
+  id: string | number | null;
+  userId: string | number | null;
+  userName: string;
+  phone: string;
+  password: string;
+  confirmPassword: string;
+}>({
   id: null,
   id: null,
   userId: null,
   userId: null,
   userName: '',
   userName: '',
@@ -967,6 +886,23 @@ const getSystemBankData = async () => {
   }
   }
 };
 };
 
 
+/** 获取资质列表 */
+const getQualificationList = async () => {
+  try {
+    const res = await listQualification({
+      supplierId: route.query.id as any,
+      pageNum: 1,
+      pageSize: 99
+    });
+    qualificationList.value = res.rows || [];
+  } catch (e) {
+    console.error('获取资质列表失败:', e);
+
+    ElMessage.error('获取资质列表失败');
+  } finally {
+  }
+};
+
 /** 获取付款信息 */
 /** 获取付款信息 */
 const getPaymentInfo = async () => {
 const getPaymentInfo = async () => {
   const id = route.query.id as string;
   const id = route.query.id as string;
@@ -1213,10 +1149,10 @@ const getDetail = async () => {
           // 使用临时表数据覆盖主表数据
           // 使用临时表数据覆盖主表数据
           const tempData: any = tempRes.data;
           const tempData: any = tempRes.data;
           detailData.value = {
           detailData.value = {
-            ...detailData.value,  // 保留主表的一些基础字段
-            ...tempData,          // 使用临时表的修改数据
-            id: detailData.value.id,  // 确保ID是主表的ID
-            supplierNo: detailData.value.supplierNo  // 确保supplierNo是主表的
+            ...detailData.value, // 保留主表的一些基础字段
+            ...tempData, // 使用临时表的修改数据
+            id: detailData.value.id, // 确保ID是主表的ID
+            supplierNo: detailData.value.supplierNo // 确保supplierNo是主表的
           } as any;
           } as any;
           console.log('已加载临时表数据:', tempData);
           console.log('已加载临时表数据:', tempData);
         }
         }
@@ -1690,7 +1626,7 @@ const handleAddBrandToList = (brand?: BrandVO) => {
   }
   }
 
 
   // 检查品牌是否已存在
   // 检查品牌是否已存在
-  const exists = tempSelectedBrands.value.some(b => b.id === brand!.id);
+  const exists = tempSelectedBrands.value.some((b) => b.id === brand!.id);
 
 
   if (exists) {
   if (exists) {
     ElMessage.warning('该品牌已添加');
     ElMessage.warning('该品牌已添加');
@@ -1707,7 +1643,7 @@ const handleAddBrandToList = (brand?: BrandVO) => {
 
 
 /** 删除临时品牌 */
 /** 删除临时品牌 */
 const handleRemoveTempBrand = (brand: BrandVO) => {
 const handleRemoveTempBrand = (brand: BrandVO) => {
-  const index = tempSelectedBrands.value.findIndex(b => b.id === brand.id);
+  const index = tempSelectedBrands.value.findIndex((b) => b.id === brand.id);
   if (index > -1) {
   if (index > -1) {
     tempSelectedBrands.value.splice(index, 1);
     tempSelectedBrands.value.splice(index, 1);
   }
   }
@@ -1715,7 +1651,7 @@ const handleRemoveTempBrand = (brand: BrandVO) => {
 
 
 /** 删除已选择的品牌 */
 /** 删除已选择的品牌 */
 const handleRemoveBrand = async (brand: BrandVO) => {
 const handleRemoveBrand = async (brand: BrandVO) => {
-  const index = selectedBrands.value.findIndex(b => b.id === brand.id);
+  const index = selectedBrands.value.findIndex((b) => b.id === brand.id);
   if (index > -1) {
   if (index > -1) {
     selectedBrands.value.splice(index, 1);
     selectedBrands.value.splice(index, 1);
     // 立即保存到后端
     // 立即保存到后端
@@ -1759,7 +1695,7 @@ const saveBrandsToServer = async () => {
   }
   }
 
 
   // 将品牌ID用逗号分隔保存
   // 将品牌ID用逗号分隔保存
-  const brandIds = selectedBrands.value.map(brand => brand.id).join(',');
+  const brandIds = selectedBrands.value.map((brand) => brand.id).join(',');
 
 
   // 方案B:只提交必要字段,避免EditGroup校验因缺字段失败
   // 方案B:只提交必要字段,避免EditGroup校验因缺字段失败
   await scmEditInfo({
   await scmEditInfo({
@@ -1772,25 +1708,28 @@ const saveBrandsToServer = async () => {
 const initBrandList = async () => {
 const initBrandList = async () => {
   if (detailData.value.operatingBrand) {
   if (detailData.value.operatingBrand) {
     // 后端返回的是用逗号分隔的品牌ID
     // 后端返回的是用逗号分隔的品牌ID
-    const brandIds = detailData.value.operatingBrand.split(',').filter(id => id.trim());
+    const brandIds = detailData.value.operatingBrand.split(',').filter((id) => id.trim());
 
 
     if (brandIds.length > 0) {
     if (brandIds.length > 0) {
       try {
       try {
         // 根据品牌ID获取品牌详细信息
         // 根据品牌ID获取品牌详细信息
-        const brandPromises = brandIds.map(id => getBrand(id.trim()));
+        const brandPromises = brandIds.map((id) => getBrand(id.trim()));
         const brandResults = await Promise.allSettled(brandPromises);
         const brandResults = await Promise.allSettled(brandPromises);
 
 
         selectedBrands.value = brandResults
         selectedBrands.value = brandResults
-          .filter(result => result.status === 'fulfilled')
-          .map(result => (result as PromiseFulfilledResult<any>).value.data)
-          .filter(brand => brand); // 过滤掉空值
+          .filter((result) => result.status === 'fulfilled')
+          .map((result) => (result as PromiseFulfilledResult<any>).value.data)
+          .filter((brand) => brand); // 过滤掉空值
       } catch (e) {
       } catch (e) {
         console.error('获取品牌详情失败:', e);
         console.error('获取品牌详情失败:', e);
         // 降级处理:如果获取品牌详情失败,使用ID作为显示名称
         // 降级处理:如果获取品牌详情失败,使用ID作为显示名称
-        selectedBrands.value = brandIds.map(id => ({
-          id: id.trim(),
-          brandName: id.trim()
-        } as BrandVO));
+        selectedBrands.value = brandIds.map(
+          (id) =>
+            ({
+              id: id.trim(),
+              brandName: id.trim()
+            }) as BrandVO
+        );
       }
       }
     }
     }
   }
   }
@@ -1844,9 +1783,7 @@ const getSupplyAreaList = async () => {
     });
     });
 
 
     // 转换为数组
     // 转换为数组
-    supplyAreaList.value = Object.values(provinceMap).filter((item: any) =>
-      item.province || item.city
-    );
+    supplyAreaList.value = Object.values(provinceMap).filter((item: any) => item.province || item.city);
 
 
     console.log('供货区域列表:', supplyAreaList.value);
     console.log('供货区域列表:', supplyAreaList.value);
     console.log('保存的原始数据:', savedAreaData.value);
     console.log('保存的原始数据:', savedAreaData.value);
@@ -2056,11 +1993,11 @@ const formatDate = (date: string | Date) => {
 /** 获取合同状态类型 */
 /** 获取合同状态类型 */
 const getContractStatusType = (status: number) => {
 const getContractStatusType = (status: number) => {
   const statusMap = {
   const statusMap = {
-    0: 'info',    // 草稿
+    0: 'info', // 草稿
     1: 'success', // 已生效
     1: 'success', // 已生效
     2: 'warning', // 已到期
     2: 'warning', // 已到期
-    3: 'danger',  // 已终止
-    4: 'danger'   // 已作废
+    3: 'danger', // 已终止
+    4: 'danger' // 已作废
   };
   };
   return statusMap[status] || 'info';
   return statusMap[status] || 'info';
 };
 };
@@ -2071,7 +2008,6 @@ const getContractStatusText = (status: number) => {
     0: '待审核',
     0: '待审核',
     1: '生效',
     1: '生效',
     2: '失效'
     2: '失效'
-
   };
   };
   return statusMap[status] || '未知';
   return statusMap[status] || '未知';
 };
 };
@@ -2081,7 +2017,7 @@ const getContractTypeText = (type: string | number) => {
   const typeMap = {
   const typeMap = {
     '0': '年度合作',
     '0': '年度合作',
     '1': '项目采购',
     '1': '项目采购',
-    '2': '其他合作',
+    '2': '其他合作'
   };
   };
   return typeMap[type] || '未知';
   return typeMap[type] || '未知';
 };
 };
@@ -2424,7 +2360,7 @@ const handleAddPayment = () => {
 
 
 /** 发票类型选择改变 */
 /** 发票类型选择改变 */
 const handleInvoiceTypeChange = (value: string | number) => {
 const handleInvoiceTypeChange = (value: string | number) => {
-  const selectedInvoice = invoiceTypeList.value.find(item => item.id === value);
+  const selectedInvoice = invoiceTypeList.value.find((item) => item.id === value);
   if (selectedInvoice) {
   if (selectedInvoice) {
     paymentForm.value.invoiceTypeNo = selectedInvoice.id;
     paymentForm.value.invoiceTypeNo = selectedInvoice.id;
     paymentForm.value.invoiceTypeName = selectedInvoice.invoiceTypeName;
     paymentForm.value.invoiceTypeName = selectedInvoice.invoiceTypeName;
@@ -2433,7 +2369,7 @@ const handleInvoiceTypeChange = (value: string | number) => {
 
 
 /** 银行选择改变 */
 /** 银行选择改变 */
 const handleBankChange = (value: string | number) => {
 const handleBankChange = (value: string | number) => {
-  const selectedBank = systemBankList.value.find(item => item.id === value);
+  const selectedBank = systemBankList.value.find((item) => item.id === value);
   if (selectedBank) {
   if (selectedBank) {
     paymentForm.value.bankInfoNo = selectedBank.id;
     paymentForm.value.bankInfoNo = selectedBank.id;
     paymentForm.value.bankName = selectedBank.bnName;
     paymentForm.value.bankName = selectedBank.bnName;
@@ -2480,6 +2416,47 @@ const handlePaymentSubmit = async () => {
   });
   });
 };
 };
 
 
+/** 下载附件 */
+const handleDownload = async (row: QualificationVO) => {
+  if (!row.attachmentUrl) {
+    ElMessage.warning('暂无附件可下载');
+
+    return;
+  }
+
+  try {
+    // 使用 fetch 获取文件并强制下载
+
+    const response = await fetch(row.attachmentUrl);
+
+    if (!response.ok) throw new Error('下载失败');
+
+    const blob = await response.blob();
+
+    const url = window.URL.createObjectURL(blob);
+
+    const link = document.createElement('a');
+
+    link.href = url;
+
+    link.download = row.attachmentName || '附件';
+
+    document.body.appendChild(link);
+
+    link.click();
+
+    document.body.removeChild(link);
+
+    window.URL.revokeObjectURL(url);
+
+    ElMessage.success('开始下载');
+  } catch (e) {
+    console.error('下载附件失败:', e);
+
+    ElMessage.error('下载失败');
+  }
+};
+
 /** 获取地址列表 */
 /** 获取地址列表 */
 const getAddressList = async () => {
 const getAddressList = async () => {
   const id = route.query.id as string;
   const id = route.query.id as string;
@@ -2745,6 +2722,7 @@ onMounted(async () => {
     getAuthorizationList(); // 获取授权详情列表
     getAuthorizationList(); // 获取授权详情列表
     getAddressList(); // 获取地址列表
     getAddressList(); // 获取地址列表
     getSupplyAreaList(); // 获取供货区域列表
     getSupplyAreaList(); // 获取供货区域列表
+    getQualificationList();
   }
   }
 });
 });
 </script>
 </script>