瀏覽代碼

员工档案姓名改蓝色可点击、详情关闭按钮移到右上角,岗位调动已通过单据隐藏取消按钮

lihaiting 6 天之前
父節點
當前提交
5eedab966a

+ 2 - 6
src/styles/views/employeeArchive/components/EmployeeArchiveDetail.scss

@@ -1,11 +1,8 @@
 .detail-shell { height: 100%; display: flex; flex-direction: column; overflow: hidden; color: #27384d; background: #fff; }
 .profile-header { position: relative; flex: 0 0 auto; display: flex; gap: 18px; padding: 58px 28px 23px; border-bottom: 1px solid #e2e8ef; color: #27384d; background: #f8fbff; }
 .profile-header::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 1px; background: #dfe7f1; content: ''; }
-.drawer-close { position: absolute; top: 16px; left: 20px; width: 32px; height: 32px; border: 1px solid #dce4ed; border-radius: 5px; color: #65768b; background: #fff; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
+.drawer-close { position: absolute; top: 16px; right: 22px; width: 32px; height: 32px; border: 1px solid #dce4ed; border-radius: 5px; color: #65768b; background: #fff; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
 .drawer-close:hover { border-color: #b9c7d6; color: #27415f; background: #f4f7fa; }
-.profile-actions { position: absolute; top: 16px; right: 22px; display: flex; gap: 8px; }
-.profile-actions ::v-deep .el-button { color: #465b73; border-color: #d7e0e9; border-radius: 4px; background: #fff; }
-.profile-actions ::v-deep .el-button:hover { color: var(--color-primary); border-color: var(--color-primary-2); background: var(--color-primary-1); }
 .avatar { width: 78px; height: 78px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border: 4px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #cad6e3, 0 6px 16px rgba(42, 67, 97, .13); color: #fff; font-size: 29px; font-weight: 600; background: var(--avatar-color); }
 .avatar img { width: 100%; height: 100%; object-fit: cover; }
 .profile-title { min-width: 0; padding-top: 3px; }
@@ -106,8 +103,7 @@
 
 @media (max-width: 620px) {
   .profile-header { padding: 58px 18px 20px; }
-  .drawer-close { left: 14px; }
-  .profile-actions { right: 14px; }
+  .drawer-close { right: 14px; }
   .avatar { width: 62px; height: 62px; margin-top: 0; }
   .profile-title { margin-top: 0; }
   .profile-meta { display: none; }

+ 3 - 2
src/styles/views/employeeArchive/index.scss

@@ -87,8 +87,9 @@
 .table-avatar { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border: 2px solid #fff; border-radius: 11px; box-shadow: 0 5px 12px rgba(35, 91, 160, .16); color: #fff; font-size: 14px; font-weight: 600; background: var(--avatar-color); }
 .table-avatar img { width: 100%; height: 100%; object-fit: cover; }
 .employee-cell > span:last-child { min-width: 0; }
-.employee-cell strong, .employee-cell small, .department-cell span, .department-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
-.employee-cell strong { color: #33465d; font-size: 14px; font-weight: 600; }
+.employee-cell ::v-deep .el-link, .employee-cell small, .department-cell span, .department-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+/* 员工姓名:颜色由 el-link type="primary"(蓝色)提供,这里只统一字号字重 */
+.employee-cell ::v-deep .el-link { font-size: 14px; font-weight: 600; line-height: 1.5; }
 .employee-cell small { margin-top: 3px; color: #95a0af; font-size: 14px; }
 .department-cell span { color: #47586e; font-size: 14px; }
 .department-cell small { max-width: 150px; margin-top: 3px; color: #9aa5b2; font-size: 14px; }

+ 0 - 3
src/views/hrManagement/employeeArchive/components/EmployeeArchiveDetail.vue

@@ -12,9 +12,6 @@
         <button class="drawer-close" type="button" aria-label="关闭" @click="drawerVisible = false">
           <i class="el-icon-close"></i>
         </button>
-        <div class="profile-actions">
-          <el-button size="small" icon="el-icon-edit" @click="$emit('edit', employee)">编辑</el-button>
-        </div>
         <div class="avatar" :style="avatarStyle">
           <img v-if="employee.avatar" :src="employee.avatar" :alt="employee.name" />
           <span v-else>{{ (employee.name || '-').slice(-1) }}</span>

+ 9 - 3
src/views/hrManagement/employeeArchive/index.vue

@@ -120,13 +120,19 @@
               </template>
             </template>
             <template v-slot:name="{ row }">
-              <button type="button" class="employee-cell" @click.stop="openDetail(row)">
+              <div class="employee-cell" @click.stop="openDetail(row)">
                 <span class="table-avatar" :style="employeeAvatarStyle(row)">
                   <img v-if="row.avatar" :src="row.avatar" :alt="row.name" />
                   <span v-else>{{ (row.name || '-').slice(-1) }}</span>
                 </span>
-                <span><strong>{{ row.name }}</strong><small>{{ row.employeeNo }}</small></span>
-              </button>
+                <span class="employee-cell-main">
+                  <!-- 员工姓名:与其它列表页一致的蓝色可点击样式 -->
+                  <el-link type="primary" :underline="false" @click.stop="openDetail(row)">
+                    {{ row.name || '-' }}
+                  </el-link>
+                  <small>{{ row.employeeNo }}</small>
+                </span>
+              </div>
             </template>
             <template v-slot:dept="{ row }">
               <div class="department-cell">

+ 5 - 2
src/views/hrManagement/positionTransfer/index.vue

@@ -89,7 +89,7 @@
             @click.stop="openEdit(row)">
             编辑
           </el-link>
-          <el-link v-if="canCancel(row)" type="primary" :underline="false" icon="el-icon-close"
+          <el-link v-if="canCancel(row)" type="warning" :underline="false" icon="el-icon-close"
             @click.stop="cancelRecord(row)">
             取消
           </el-link>
@@ -1132,7 +1132,10 @@ export default {
       return canEditUserChange(row);
     },
     canCancel(row) {
-      return canCancelUserChange(row);
+      if (!canCancelUserChange(row)) return false;
+      /* 审批已通过的异动单不再允许取消(列表态 approved 同时覆盖已生效/待生效) */
+      const status = String(row?.approvalStatus || "").toUpperCase();
+      return row?.docStatus !== "approved" && status !== "APPROVED";
     },
     canWithdraw(row) {
       return canWithdrawUserChange(row);