Jelajahi Sumber

style(admin): B-18 供应链表单/详情/层级 + 虚拟商品/团队接入 PageHeader + StatusTag

- supply-system/{Form,Detail}: 页头 PageHeader(动态标题), 商品/订单状态 StatusTag, 成员角色 default→info, 结算状态 StatusTag, 移除关系 #f56c6c→--adm-error-text, 提示 #999/#909399→--adm-text-45
- supply-hierarchy/ChangeRequest: 页头 PageHeader + 状态 StatusTag, 删页面级 sort 徽章死样式
- VirtualGoodsConfig: 页头 PageHeader(筛选+新增), 道具类型 StatusTag, 提示色→token
- VirtualTeamDetail: 页头 PageHeader(返回+添加), 成员列表子卡片头 SectionTitle
- VirtualTeamList: 页头 PageHeader, 启用/禁用 StatusTag, 成功弹窗图标--adm-success
- 构建 dist_verify 通过
liaoxg 1 bulan lalu
induk
melakukan
2309588273

+ 14 - 19
cfc-web/src/views/admin/VirtualGoodsConfig.vue

@@ -1,29 +1,24 @@
 <template>
   <div class="virtual-goods-config admin-page">
     <el-card>
-      <div slot="header">
-        <span>虚拟支付道具</span>
-        <div style="float: right; display: flex; gap: 10px;">
-          <el-select v-model="filterGoodsType" placeholder="道具类型" size="small" clearable style="width: 150px;" @change="loadData">
-            <el-option label="测评套餐" value="ASSESSMENT_PACKAGE" />
-            <el-option label="会员" value="MEMBERSHIP" />
-            <el-option label="订阅" value="SUBSCRIPTION" />
-          </el-select>
-          <el-select v-model="filterStatus" placeholder="状态" size="small" clearable style="width: 110px;">
-            <el-option label="启用" value="1" />
-            <el-option label="停用" value="0" />
-          </el-select>
-          <el-button type="primary" size="small" @click="handleCreate">+ 新增道具</el-button>
-        </div>
-      </div>
+      <PageHeader slot="header" title="虚拟支付道具">
+        <el-select v-model="filterGoodsType" placeholder="道具类型" size="small" clearable style="width: 150px;" @change="loadData">
+          <el-option label="测评套餐" value="ASSESSMENT_PACKAGE" />
+          <el-option label="会员" value="MEMBERSHIP" />
+          <el-option label="订阅" value="SUBSCRIPTION" />
+        </el-select>
+        <el-select v-model="filterStatus" placeholder="状态" size="small" clearable style="width: 110px;">
+          <el-option label="启用" value="1" />
+          <el-option label="停用" value="0" />
+        </el-select>
+        <el-button type="primary" size="small" @click="handleCreate">+ 新增道具</el-button>
+      </PageHeader>
             <div class="adm-table-wrap">
 <el-table height="100%" :data="filteredList" v-loading="loading" border stripe>
         <el-table-column prop="id" label="ID" width="70" />
         <el-table-column label="道具类型" width="120">
           <template slot-scope="{ row }">
-            <el-tag size="small" :type="row.goodsType === 'ASSESSMENT_PACKAGE' ? 'primary' : (row.goodsType === 'MEMBERSHIP' ? 'success' : 'warning')">
-                {{ goodsTypeText(row.goodsType) }}
-            </el-tag>
+            <StatusTag :type="row.goodsType === 'ASSESSMENT_PACKAGE' ? 'primary' : (row.goodsType === 'MEMBERSHIP' ? 'success' : 'warning')" :text="goodsTypeText(row.goodsType)" />
           </template>
         </el-table-column>
         <el-table-column prop="bizKey" label="业务SKU" min-width="120" />
@@ -67,7 +62,7 @@
         </el-form-item>
         <el-form-item label="道具ID">
           <el-input v-model="form.productId" placeholder="请输入道具ID" />
-          <div style="color:#909399;font-size:12px;line-height:1.5;margin-top:4px;">需与微信商户后台道具 ID 一致;上线前必须配置</div>
+          <div style="color: var(--adm-text-45);font-size:12px;line-height:1.5;margin-top:4px;">需与微信商户后台道具 ID 一致;上线前必须配置</div>
         </el-form-item>
         <el-form-item label="道具名称">
           <el-input v-model="form.goodsName" placeholder="请输入道具名称" />

+ 4 - 5
cfc-web/src/views/admin/VirtualTeamDetail.vue

@@ -1,11 +1,10 @@
 <template>
   <div class="virtual-team-detail admin-page">
     <el-card>
-      <div slot="header">
+      <PageHeader slot="header" :title="'团队成员管理 - ' + teamName">
         <el-button size="small" icon="el-icon-back" @click="goBack">返回</el-button>
-        <span style="margin-left: 12px">团队成员管理 - {{ teamName }}</span>
-        <el-button style="float: right" type="primary" size="small" @click="showAddDialog">+ 添加成员</el-button>
-      </div>
+        <el-button type="primary" size="small" @click="showAddDialog">+ 添加成员</el-button>
+      </PageHeader>
 
       <div class="team-info" v-loading="infoLoading">
         <el-descriptions :column="3" border size="small">
@@ -18,7 +17,7 @@
 
     <el-card style="margin-top: 16px">
       <div slot="header">
-        <span>成员列表</span>
+        <SectionTitle title="成员列表" />
       </div>
             <div class="adm-table-wrap">
 <el-table height="100%" :data="members" stripe v-loading="membersLoading">

+ 8 - 17
cfc-web/src/views/admin/VirtualTeamList.vue

@@ -1,10 +1,9 @@
 <template>
   <div class="virtual-team-list admin-page">
     <el-card>
-      <div slot="header">
-        <span>虚拟服务商团队</span>
-        <el-button style="float: right" type="primary" size="small" @click="handleCreate">+ 创建团队</el-button>
-      </div>
+      <PageHeader slot="header" title="虚拟服务商团队">
+        <el-button type="primary" size="small" @click="handleCreate">+ 创建团队</el-button>
+      </PageHeader>
 
       <div class="toolbar">
         <el-input
@@ -52,9 +51,7 @@
         </el-table-column>
         <el-table-column prop="enabled" label="状态" width="80">
           <template slot-scope="scope">
-            <el-tag :type="scope.row.enabled ? 'success' : 'info'" size="mini">
-              {{ scope.row.enabled ? '启用' : '禁用' }}
-            </el-tag>
+            <StatusTag :type="scope.row.enabled ? 'success' : 'info'" :text="scope.row.enabled ? '启用' : '禁用'" />
           </template>
         </el-table-column>
         <el-table-column prop="createdAt" label="创建时间" width="170">
@@ -103,7 +100,7 @@
         </el-form-item>
         <el-form-item label="利润率" prop="profitRate">
           <el-input-number v-model="form.profitRate" :min="0" :max="100" :precision="1" :step="0.5" style="width: 200px"></el-input-number>
-          <span style="margin-left: 8px; color: #909399">%</span>
+          <span style="margin-left: 8px; color: var(--adm-text-45)">%</span>
         </el-form-item>
       </el-form>
       <div slot="footer">
@@ -114,8 +111,8 @@
 
     <el-dialog title="操作成功" :visible.sync="successDialogVisible" width="400px" :close-on-click-modal="false">
       <div style="text-align:center;padding:10px 0">
-        <i class="el-icon-success" style="color:#67C23A;font-size:32px"></i>
-        <p style="margin:12px 0 0;font-size:16px;color:#303133">保存成功</p>
+        <i class="el-icon-success" style="color: var(--adm-success);font-size:32px"></i>
+        <p style="margin:12px 0 0;font-size:16px;color: var(--adm-text-88)">保存成功</p>
       </div>
       <div slot="footer">
         <el-button type="primary" @click="handleContinue">继续添加</el-button>
@@ -274,13 +271,7 @@ export default {
 <style scoped>
 .virtual-team-list { padding: 20px; }
 .toolbar { margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
-.sort-header {
-  cursor: pointer;
-  user-select: none;
-  font-weight: 500;
-  font-size: 12px;
-}
 .sort-header:hover {
-  color: #409eff;
+  color: var(--adm-primary);
 }
 </style>

+ 3 - 26
cfc-web/src/views/admin/supply-hierarchy/ChangeRequest.vue

@@ -1,9 +1,7 @@
 <template>
     <div class="supply-hierarchy-change-request">
         <el-card>
-            <div slot="header">
-                <span>更换上级审核</span>
-            </div>
+            <PageHeader slot="header" title="更换上级审核" />
             
             <div class="filter-section">
                 <el-form :inline="true" :model="filterForm" size="small">
@@ -47,9 +45,7 @@
                 </el-table-column>
                 <el-table-column prop="status" label="状态" width="100">
                     <template slot-scope="scope">
-                        <el-tag :type="getStatusTagType(scope.row.status)" size="small">
-                            {{ getStatusText(scope.row.status) }}
-                        </el-tag>
+                        <StatusTag :type="getStatusTagType(scope.row.status)" :text="getStatusText(scope.row.status)" />
                     </template>
                 </el-table-column>
                 <el-table-column prop="createdAt" label="申请时间" width="160">
@@ -217,26 +213,7 @@ export default {
 .filter-section {
     margin-bottom: 20px;
 }
-.sort-header {
-    cursor: pointer;
-    user-select: none;
-    font-weight: 500;
-    font-size: 12px;
-}
 .sort-header:hover {
-    color: #409eff;
-}
-.sort-index {
-    color: #fff;
-    border-radius: 8px;
-    font-size: 10px;
-    padding: 0 4px;
-    margin: 0 2px;
-}
-.sort-asc-badge {
-    background: #f56c6c;
-}
-.sort-desc-badge {
-    background: #409eff;
+    color: var(--adm-primary);
 }
 </style>

+ 9 - 16
cfc-web/src/views/admin/supply-system/Detail.vue

@@ -1,10 +1,9 @@
 <template>
   <div class="supply-system-detail">
     <el-card>
-      <div slot="header">
-        <span>体系详情 — {{ system.name }}</span>
-        <el-button style="float: right" size="mini" @click="$router.push('/supply-system')">返回列表</el-button>
-      </div>
+      <PageHeader slot="header" :title="'体系详情 — ' + (system.name || '')">
+        <el-button size="mini" @click="$router.push('/supply-system')">返回列表</el-button>
+      </PageHeader>
 
       <el-tabs v-model="activeTab">
         <!-- Tab 1: 商品 -->
@@ -19,7 +18,7 @@
             <el-table-column prop="stock" label="库存" width="80"></el-table-column>
             <el-table-column prop="status" label="状态" width="80">
               <template slot-scope="scope">
-                <el-tag size="mini">{{ scope.row.status }}</el-tag>
+                <StatusTag size="mini" :text="scope.row.status" />
               </template>
             </el-table-column>
             <el-table-column label="操作" width="100">
@@ -44,16 +43,12 @@
             </el-table-column>
             <el-table-column prop="role" label="角色" width="100">
               <template slot-scope="scope">
-                <el-tag :type="scope.row.role === 'admin' ? 'warning' : 'default'" size="small">
-                  {{ scope.row.role === 'admin' ? '管理员' : '成员' }}
-                </el-tag>
+                <StatusTag :type="scope.row.role === 'admin' ? 'warning' : 'info'" :text="scope.row.role === 'admin' ? '管理员' : '成员'" />
               </template>
             </el-table-column>
             <el-table-column prop="status" label="状态" width="80">
               <template slot-scope="scope">
-                <el-tag size="mini" :type="scope.row.status === 'active' ? 'success' : 'info'">
-                  {{ scope.row.status === 'active' ? '活跃' : '非活跃' }}
-                </el-tag>
+                <StatusTag size="mini" :type="scope.row.status === 'active' ? 'success' : 'info'" :text="scope.row.status === 'active' ? '活跃' : '非活跃'" />
               </template>
             </el-table-column>
             <el-table-column prop="joinedAt" label="加入时间" width="160">
@@ -80,7 +75,7 @@
               <template slot-scope="scope">{{ scope.row.totalAmount != null ? (scope.row.totalAmount / 100).toFixed(2) : '-' }}</template>
             </el-table-column>
             <el-table-column prop="status" label="状态" width="80">
-              <template slot-scope="scope"><el-tag size="mini">{{ scope.row.status }}</el-tag></template>
+              <template slot-scope="scope"><StatusTag size="mini" :text="scope.row.status" /></template>
             </el-table-column>
             <el-table-column prop="supplierId" label="收款供应商" width="120">
               <template slot-scope="scope">{{ scope.row.supplierId || '-' }}</template>
@@ -114,9 +109,7 @@
                 <el-table-column prop="supplierPayout" label="供应商实付(分)" width="120"></el-table-column>
                 <el-table-column prop="status" label="状态" width="100">
                     <template slot-scope="scope">
-                        <el-tag :type="scope.row.status === 'settled' ? 'success' : 'warning'" size="small">
-                            {{ scope.row.status === 'settled' ? '已结算' : '待确认' }}
-                        </el-tag>
+                        <StatusTag :type="scope.row.status === 'settled' ? 'success' : 'warning'" :text="scope.row.status === 'settled' ? '已结算' : '待确认'" />
                     </template>
                 </el-table-column>
                 <el-table-column label="操作" width="180">
@@ -474,7 +467,7 @@ export default {
                     attrs: {
                         size: 'mini',
                         type: 'text',
-                        style: 'color: #f56c6c; margin-left: 5px;'
+                        style: 'color: var(--adm-error-text); margin-left: 5px;'
                     },
                     on: {
                         click: (e) => {

+ 6 - 7
cfc-web/src/views/admin/supply-system/Form.vue

@@ -1,10 +1,9 @@
 <template>
   <div class="supply-system-form">
     <el-card>
-      <div slot="header">
-        <span>{{ isEdit ? '编辑体系' : '新建供应商体系' }}</span>
-        <el-button style="float: right" size="mini" @click="$router.back()">返回</el-button>
-      </div>
+      <PageHeader slot="header" :title="isEdit ? '编辑体系' : '新建供应商体系'">
+        <el-button size="mini" @click="$router.back()">返回</el-button>
+      </PageHeader>
 
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
         <el-form-item label="体系名称" prop="name">
@@ -32,7 +31,7 @@
 
         <el-form-item label="账期(天)" prop="settlementPeriodDays">
           <el-input-number v-model="form.settlementPeriodDays" :min="1" :max="365" :step="30"></el-input-number>
-          <span style="margin-left: 10px; color: #999">30=月结 60=双月 90=季结</span>
+          <span style="margin-left: 10px; color: var(--adm-text-45)">30=月结 60=双月 90=季结</span>
         </el-form-item>
 
         <el-form-item label="平台留利(%)" prop="platformProfitRate">
@@ -52,8 +51,8 @@
 
     <el-dialog title="操作成功" :visible.sync="successDialogVisible" width="400px" :close-on-click-modal="false">
       <div style="text-align:center;padding:10px 0">
-        <i class="el-icon-success" style="color:#67C23A;font-size:32px"></i>
-        <p style="margin:12px 0 0;font-size:16px;color:#303133">{{ isEdit ? '保存成功' : '创建成功' }}</p>
+        <i class="el-icon-success" style="color: var(--adm-success);font-size:32px"></i>
+        <p style="margin:12px 0 0;font-size:16px;color: var(--adm-text-88)">{{ isEdit ? '保存成功' : '创建成功' }}</p>
       </div>
       <div slot="footer">
         <el-button v-if="!isEdit" type="primary" @click="handleContinue">继续添加</el-button>