From c46bf7475742e9b50a8fdcc8d592ba3a86b2754d Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 17 十一月 2025 15:02:25 +0800
Subject: [PATCH] 海川开心-添加请假管理、出差管理、公出管理页面
---
src/pages/cooperativeOffice/collaborativeApproval/approve.vue | 91 +++++++++++++++++++++++++--------------------
1 files changed, 51 insertions(+), 40 deletions(-)
diff --git a/src/pages/cooperativeOffice/collaborativeApproval/approve.vue b/src/pages/cooperativeOffice/collaborativeApproval/approve.vue
index ced62d5..aaad83e 100644
--- a/src/pages/cooperativeOffice/collaborativeApproval/approve.vue
+++ b/src/pages/cooperativeOffice/collaborativeApproval/approve.vue
@@ -25,6 +25,30 @@
<text class="info-label">鐢宠鏃ユ湡</text>
<text class="info-value">{{ approvalData.approveTime }}</text>
</view>
+
+ <!-- approveType=2 璇峰亣鐩稿叧瀛楁 -->
+ <template v-if="approvalData.approveType === 2">
+ <view class="info-row">
+ <text class="info-label">璇峰亣寮�濮嬫椂闂�</text>
+ <text class="info-value">{{ approvalData.startDate || '-' }}</text>
+ </view>
+ <view class="info-row">
+ <text class="info-label">璇峰亣缁撴潫鏃堕棿</text>
+ <text class="info-value">{{ approvalData.endDate || '-' }}</text>
+ </view>
+ </template>
+
+ <!-- approveType=3 鍑哄樊鐩稿叧瀛楁 -->
+ <view v-if="approvalData.approveType === 3" class="info-row">
+ <text class="info-label">鍑哄樊鍦扮偣</text>
+ <text class="info-value">{{ approvalData.location || '-' }}</text>
+ </view>
+
+ <!-- approveType=4 鎶ラ攢鐩稿叧瀛楁 -->
+ <view v-if="approvalData.approveType === 4" class="info-row">
+ <text class="info-label">鎶ラ攢閲戦</text>
+ <text class="info-value">{{ approvalData.price ? `楼${approvalData.price}` : '-' }}</text>
+ </view>
</view>
</view>
@@ -83,21 +107,20 @@
</view>
<view class="input-content">
- <van-field
+ <u-textarea
v-model="approvalOpinion"
- type="textarea"
rows="4"
placeholder="璇疯緭鍏ュ鏍告剰瑙�"
maxlength="200"
- show-word-limit
+ count
/>
</view>
</view>
<!-- 搴曢儴鎿嶄綔鎸夐挳 -->
<view v-if="canApprove" class="footer-actions">
- <van-button class="reject-btn" @click="handleReject">椹冲洖</van-button>
- <van-button class="approve-btn" @click="handleApprove">閫氳繃</van-button>
+ <u-button class="reject-btn" @click="handleReject">椹冲洖</u-button>
+ <u-button class="approve-btn" @click="handleApprove">閫氳繃</u-button>
</view>
</view>
</template>
@@ -106,7 +129,12 @@
import { ref, onMounted, computed } from 'vue'
import { approveProcessGetInfo, approveProcessDetails, updateApproveNode } from '@/api/collaborativeApproval/approvalProcess'
import useUserStore from '@/store/modules/user'
-import { showToast } from 'vant'
+const showToast = (message) => {
+ uni.showToast({
+ title: message,
+ icon: 'none'
+ })
+}
import PageHeader from "@/components/PageHeader.vue";
const userStore = useUserStore()
@@ -121,9 +149,7 @@
})
onMounted(() => {
- const pages = getCurrentPages()
- const currentPage = pages[pages.length - 1]
- approveId.value = currentPage.options.approveId
+ approveId.value = uni.getStorageSync('approveId')
if (approveId.value) {
loadApprovalData()
}
@@ -160,6 +186,7 @@
}
const goBack = () => {
+ uni.removeStorageSync('approveId');
uni.navigateBack()
}
@@ -466,18 +493,21 @@
}
.reject-btn {
- width: 120px;
- background: #ff4d4f;
- color: #fff;
- border: none;
-}
+ width: 120px;
+ background: #ff4d4f;
+ color: #fff;
+ }
-.approve-btn {
- width: 120px;
- background: #52c41a;
- color: #fff;
- border: none;
-}
+ .approve-btn {
+ width: 120px;
+ background: #52c41a;
+ color: #fff;
+ }
+
+ /* 閫傞厤u-button鏍峰紡 */
+ :deep(.u-button) {
+ border-radius: 6px;
+ }
@keyframes pulse {
0% {
@@ -516,23 +546,4 @@
display: flex;
justify-content: flex-end;
}
-</style>
-
-<template>
- <!-- 瀹℃壒鎰忚 -->
- <u-form-item label="瀹℃壒鎰忚" prop="approveComment" border-bottom>
- <u-textarea
- v-model="form.approveComment"
- placeholder="璇疯緭鍏ュ鎵规剰瑙�"
- :maxlength="200"
- count
- :autoHeight="true"
- />
- </u-form-item>
-
- <!-- 鎿嶄綔鎸夐挳 -->
- <view class="footer-btns">
- <u-button class="reject-btn" type="error" @click="handleReject">椹冲洖</u-button>
- <u-button class="approve-btn" type="success" @click="handleApprove">閫氳繃</u-button>
- </view>
-</template>
\ No newline at end of file
+</style>
\ No newline at end of file
--
Gitblit v1.9.3