|
|
@@ -58,10 +58,22 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="search-actions">
|
|
|
- <u-button type="primary" size="small" class="search-btn" @click="handleQuery">
|
|
|
+ <u-button
|
|
|
+ type="primary"
|
|
|
+ shape="round"
|
|
|
+ size="small"
|
|
|
+ class="search-btn"
|
|
|
+ @click="handleQuery"
|
|
|
+ >
|
|
|
搜索
|
|
|
</u-button>
|
|
|
- <u-button type="info" size="small" @click="resetQuery" style="margin-left: 10px">
|
|
|
+ <u-button
|
|
|
+ type="info"
|
|
|
+ shape="round"
|
|
|
+ size="small"
|
|
|
+ @click="resetQuery"
|
|
|
+ style="margin-left: 10px"
|
|
|
+ >
|
|
|
重置
|
|
|
</u-button>
|
|
|
</view>
|
|
|
@@ -215,38 +227,74 @@
|
|
|
<!-- 操作按钮 -->
|
|
|
<view class="card-actions">
|
|
|
<!-- 修改/查看按钮:根据审批状态动态显示 -->
|
|
|
- <view
|
|
|
+ <u-button
|
|
|
v-if="isEditableStatus(item.approvalStatus)"
|
|
|
- class="action-btn info-btn"
|
|
|
+ type="primary"
|
|
|
+ shape="round"
|
|
|
+ size="small"
|
|
|
+ plain
|
|
|
@click="handleUpdate(item)"
|
|
|
>
|
|
|
- <u-icon name="edit-pen" size="16" color="#3c9cff"></u-icon>
|
|
|
- <text class="btn-text">修改</text>
|
|
|
- </view>
|
|
|
- <view v-else class="action-btn warning-btn" @click="handleUpdate(item)">
|
|
|
- <u-icon name="eye" size="16" color="#ff9900"></u-icon>
|
|
|
- <text class="btn-text">查看</text>
|
|
|
- </view>
|
|
|
+ <u-icon
|
|
|
+ name="edit-pen"
|
|
|
+ size="14"
|
|
|
+ color="#ffffff"
|
|
|
+ style="margin-right: 4px"
|
|
|
+ ></u-icon>
|
|
|
+ 修改
|
|
|
+ </u-button>
|
|
|
+ <u-button
|
|
|
+ v-else
|
|
|
+ type="info"
|
|
|
+ shape="round"
|
|
|
+ size="small"
|
|
|
+ plain
|
|
|
+ @click="handleUpdate(item)"
|
|
|
+ >
|
|
|
+ <u-icon
|
|
|
+ name="eye"
|
|
|
+ size="14"
|
|
|
+ color="#323233"
|
|
|
+ style="margin-right: 4px"
|
|
|
+ ></u-icon>
|
|
|
+ 查看
|
|
|
+ </u-button>
|
|
|
|
|
|
<!-- 删除按钮:仅草稿状态可见 -->
|
|
|
- <view
|
|
|
+ <u-button
|
|
|
v-if="item.approvalStatus === 'draft'"
|
|
|
- class="action-btn danger-btn"
|
|
|
+ type="error"
|
|
|
+ size="small"
|
|
|
+ shape="round"
|
|
|
+ plain
|
|
|
@click="handleDelete(item)"
|
|
|
>
|
|
|
- <u-icon name="trash" size="16" color="#f56c6c"></u-icon>
|
|
|
- <text class="btn-text">删除</text>
|
|
|
- </view>
|
|
|
+ <u-icon
|
|
|
+ name="trash"
|
|
|
+ size="14"
|
|
|
+ color="#ffffff"
|
|
|
+ style="margin-right: 4px"
|
|
|
+ ></u-icon>
|
|
|
+ 删除
|
|
|
+ </u-button>
|
|
|
|
|
|
<!-- 销假按钮:仅已完成状态且需要销假时可见 -->
|
|
|
- <view
|
|
|
+ <u-button
|
|
|
v-if="item.approvalStatus === 'finish' && item.needCancel === '1'"
|
|
|
- class="action-btn success-btn"
|
|
|
+ type="success"
|
|
|
+ shape="round"
|
|
|
+ size="small"
|
|
|
+ plain
|
|
|
@click="handleCancelLeave(item)"
|
|
|
>
|
|
|
- <u-icon name="checkmark-circle" size="16" color="#5ac725"></u-icon>
|
|
|
- <text class="btn-text">销假</text>
|
|
|
- </view>
|
|
|
+ <u-icon
|
|
|
+ name="checkmark-circle"
|
|
|
+ size="14"
|
|
|
+ color="#ffffff"
|
|
|
+ style="margin-right: 4px"
|
|
|
+ ></u-icon>
|
|
|
+ 销假
|
|
|
+ </u-button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -975,46 +1023,6 @@ export default {
|
|
|
padding: 20rpx;
|
|
|
border-top: 1px solid #f0f0f0;
|
|
|
gap: 16rpx;
|
|
|
- // background-color: #fafafa;
|
|
|
-}
|
|
|
-
|
|
|
-.action-btn {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- padding: 16rpx 20rpx;
|
|
|
- border-radius: 12rpx;
|
|
|
- min-width: 120rpx;
|
|
|
- transition: all 0.3s ease;
|
|
|
- background-color: transparent;
|
|
|
-
|
|
|
- &:active {
|
|
|
- transform: scale(0.95);
|
|
|
- opacity: 0.8;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-.btn-text {
|
|
|
- font-size: 24rpx;
|
|
|
- margin-top: 8rpx;
|
|
|
- font-weight: 500;
|
|
|
-}
|
|
|
-
|
|
|
-.info-btn .btn-text {
|
|
|
- color: #3c9cff;
|
|
|
-}
|
|
|
-
|
|
|
-.danger-btn .btn-text {
|
|
|
- color: #f56c6c;
|
|
|
-}
|
|
|
-
|
|
|
-.success-btn .btn-text {
|
|
|
- color: #5ac725;
|
|
|
-}
|
|
|
-
|
|
|
-.warning-btn .btn-text {
|
|
|
- color: #ff9900;
|
|
|
}
|
|
|
|
|
|
// 分页容器
|
|
|
@@ -1024,7 +1032,7 @@ export default {
|
|
|
|
|
|
// 搜索按钮样式
|
|
|
::v-deep .search-btn {
|
|
|
- background: linear-gradient(135deg, #007aff, #0051d9) !important;
|
|
|
+ // background: linear-gradient(135deg, #007aff, #0051d9) !important;
|
|
|
border: none !important;
|
|
|
box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3) !important;
|
|
|
transition: all 0.3s ease !important;
|