From 429b6e4d00594183bbcf02aba24d2df2d3f4c95b Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期五, 15 五月 2026 17:18:24 +0800
Subject: [PATCH] 协同审批详情功能及修改限制
---
src/pages/cooperativeOffice/collaborativeApproval/approve.vue | 812 +++++++++++-----------
src/api/collaborativeApproval/approvalProcess.js | 89 +-
src/pages/cooperativeOffice/collaborativeApproval/index.vue | 28
src/api/procurementManagement/procurementLedger.js | 10
src/pages/cooperativeOffice/collaborativeApproval/detail.vue | 1113 +++++++++++++------------------
5 files changed, 954 insertions(+), 1,098 deletions(-)
diff --git a/src/api/collaborativeApproval/approvalProcess.js b/src/api/collaborativeApproval/approvalProcess.js
index 47cf3ec..0d2b129 100644
--- a/src/api/collaborativeApproval/approvalProcess.js
+++ b/src/api/collaborativeApproval/approvalProcess.js
@@ -2,63 +2,72 @@
import request from "@/utils/request";
export function approveProcessListPage(query) {
- return request({
- url: '/approveProcess/list',
- method: 'get',
- params: query,
- })
+ return request({
+ url: "/approveProcess/list",
+ method: "get",
+ params: query,
+ });
}
export function getDept(query) {
- return request({
- url: '/approveProcess/getDept',
- method: 'get',
- params: query,
- })
+ return request({
+ url: "/approveProcess/getDept",
+ method: "get",
+ params: query,
+ });
}
export function approveProcessGetInfo(query) {
- return request({
- url: '/approveProcess/get',
- method: 'get',
- params: query,
- })
+ return request({
+ url: "/approveProcess/get",
+ method: "get",
+ params: query,
+ });
}
// 鏂板瀹℃壒娴佺▼
export function approveProcessAdd(query) {
- return request({
- url: '/approveProcess/add',
- method: 'post',
- data: query,
- })
+ return request({
+ url: "/approveProcess/add",
+ method: "post",
+ data: query,
+ });
}
// 淇敼瀹℃壒娴佺▼
export function approveProcessUpdate(query) {
- return request({
- url: '/approveProcess/update',
- method: 'post',
- data: query,
- })
+ return request({
+ url: "/approveProcess/update",
+ method: "post",
+ data: query,
+ });
}
// 鎻愪氦瀹℃壒
export function updateApproveNode(query) {
- return request({
- url: '/approveNode/updateApproveNode',
- method: 'post',
- data: query,
- })
+ return request({
+ url: "/approveNode/updateApproveNode",
+ method: "post",
+ data: query,
+ });
}
// 鍒犻櫎瀹℃壒娴佺▼
export function approveProcessDelete(query) {
- return request({
- url: '/approveProcess/deleteIds',
- method: 'delete',
- data: query,
- })
+ return request({
+ url: "/approveProcess/deleteIds",
+ method: "delete",
+ data: query,
+ });
}
// 鏌ヨ瀹℃壒娴佺▼
export function approveProcessDetails(query) {
- return request({
- url: '/approveNode/details/' + query,
- method: 'get',
- })
-}
\ No newline at end of file
+ return request({
+ url: "/approveNode/details/" + query,
+ method: "get",
+ });
+}
+
+// 瀹℃壒璇︽儏
+export function getDeliveryDetailByShippingNo(query) {
+ return request({
+ url: "/shippingInfo/getDateilByShippingNo",
+ method: "get",
+ params: query,
+ });
+}
diff --git a/src/api/procurementManagement/procurementLedger.js b/src/api/procurementManagement/procurementLedger.js
index 0a05d2e..5c0bb83 100644
--- a/src/api/procurementManagement/procurementLedger.js
+++ b/src/api/procurementManagement/procurementLedger.js
@@ -72,6 +72,16 @@
method: "get",
});
}
+
+// 鏌ヨ閲囪喘璇︽儏
+export function getPurchaseByCode(query) {
+ return request({
+ url: "/purchase/ledger/getPurchaseByCode",
+ method: "get",
+ params: query,
+ });
+}
+
export function approveProcessGetInfo(query) {
return request({
url: '/approveProcess/get',
diff --git a/src/pages/cooperativeOffice/collaborativeApproval/approve.vue b/src/pages/cooperativeOffice/collaborativeApproval/approve.vue
index aaad83e..b3c8687 100644
--- a/src/pages/cooperativeOffice/collaborativeApproval/approve.vue
+++ b/src/pages/cooperativeOffice/collaborativeApproval/approve.vue
@@ -1,8 +1,7 @@
<template>
<view class="approve-page">
-
- <PageHeader title="瀹℃牳" @back="goBack" />
-
+ <PageHeader title="瀹℃牳"
+ @back="goBack" />
<!-- 鐢宠淇℃伅 -->
<view class="application-info">
<view class="info-header">
@@ -25,7 +24,6 @@
<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">
@@ -37,462 +35,472 @@
<text class="info-value">{{ approvalData.endDate || '-' }}</text>
</view>
</template>
-
<!-- approveType=3 鍑哄樊鐩稿叧瀛楁 -->
- <view v-if="approvalData.approveType === 3" class="info-row">
+ <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">
+ <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>
-
<!-- 瀹℃壒娴佺▼ -->
<view class="approval-process">
<view class="process-header">
<text class="process-title">瀹℃壒娴佺▼</text>
</view>
-
<view class="process-steps">
- <view
- v-for="(step, index) in approvalSteps"
- :key="index"
- class="process-step"
- :class="{
+ <view v-for="(step, index) in approvalSteps"
+ :key="index"
+ class="process-step"
+ :class="{
'completed': step.status === 'completed',
'current': step.status === 'current',
'pending': step.status === 'pending',
'rejected': step.status === 'rejected'
- }"
- >
+ }">
<view class="step-indicator">
<view class="step-dot">
- <text v-if="step.status === 'completed'" class="step-icon">鉁�</text>
- <text v-else-if="step.status === 'rejected'" class="step-icon">鉁�</text>
- <text v-else class="step-number">{{ index + 1 }}</text>
+ <text v-if="step.status === 'completed'"
+ class="step-icon">鉁�</text>
+ <text v-else-if="step.status === 'rejected'"
+ class="step-icon">鉁�</text>
+ <text v-else
+ class="step-number">{{ index + 1 }}</text>
</view>
- <view v-if="index < approvalSteps.length - 1" class="step-line"></view>
+ <view v-if="index < approvalSteps.length - 1"
+ class="step-line"></view>
</view>
-
<view class="step-content">
<view class="step-info">
<text class="step-title">{{ step.title }}</text>
<text class="step-approver">{{ step.approverName }}</text>
- <text v-if="step.approveTime" class="step-time">{{ step.approveTime }}</text>
+ <text v-if="step.approveTime"
+ class="step-time">{{ step.approveTime }}</text>
</view>
-
- <view v-if="step.opinion" class="step-opinion">
+ <view v-if="step.opinion"
+ class="step-opinion">
<text class="opinion-label">瀹℃壒鎰忚锛�</text>
<text class="opinion-content">{{ step.opinion }}</text>
</view>
<!-- 绛惧悕灞曠ず -->
- <view v-if="step.urlTem" class="step-opinion" style="margin-top:8px;">
+ <view v-if="step.urlTem"
+ class="step-opinion"
+ style="margin-top:8px;">
<text class="opinion-label">绛惧悕锛�</text>
- <image :src="step.urlTem" mode="widthFix" style="width:180px;border-radius:6px;border:1px solid #eee;" />
+ <image :src="step.urlTem"
+ mode="widthFix"
+ style="width:180px;border-radius:6px;border:1px solid #eee;" />
</view>
</view>
</view>
</view>
</view>
-
<!-- 瀹℃牳鎰忚杈撳叆 -->
- <view v-if="canApprove" class="approval-input">
+ <view v-if="canApprove"
+ class="approval-input">
<view class="input-header">
<text class="input-title">瀹℃牳鎰忚</text>
</view>
-
<view class="input-content">
- <u-textarea
- v-model="approvalOpinion"
- rows="4"
- placeholder="璇疯緭鍏ュ鏍告剰瑙�"
- maxlength="200"
- count
- />
+ <u-textarea v-model="approvalOpinion"
+ rows="4"
+ placeholder="璇疯緭鍏ュ鏍告剰瑙�"
+ maxlength="200"
+ count />
</view>
</view>
-
<!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view v-if="canApprove" class="footer-actions">
- <u-button class="reject-btn" @click="handleReject">椹冲洖</u-button>
- <u-button class="approve-btn" @click="handleApprove">閫氳繃</u-button>
+ <view v-if="canApprove"
+ class="footer-actions">
+ <u-button class="reject-btn"
+ @click="handleReject">椹冲洖</u-button>
+ <u-button class="approve-btn"
+ @click="handleApprove">閫氳繃</u-button>
</view>
</view>
</template>
<script setup>
-import { ref, onMounted, computed } from 'vue'
-import { approveProcessGetInfo, approveProcessDetails, updateApproveNode } from '@/api/collaborativeApproval/approvalProcess'
-import useUserStore from '@/store/modules/user'
-const showToast = (message) => {
- uni.showToast({
- title: message,
- icon: 'none'
- })
-}
-import PageHeader from "@/components/PageHeader.vue";
+ import { ref, onMounted, computed } from "vue";
+ import {
+ approveProcessGetInfo,
+ approveProcessDetails,
+ updateApproveNode,
+ } from "@/api/collaborativeApproval/approvalProcess";
+ import useUserStore from "@/store/modules/user";
+ const showToast = message => {
+ uni.showToast({
+ title: message,
+ icon: "none",
+ });
+ };
+ import PageHeader from "@/components/PageHeader.vue";
-const userStore = useUserStore()
-const approvalData = ref({})
-const approvalSteps = ref([])
-const approvalOpinion = ref('')
-const approveId = ref('')
+ const userStore = useUserStore();
+ const approvalData = ref({});
+ const approvalSteps = ref([]);
+ const approvalOpinion = ref("");
+ const approveId = ref("");
-// 浠庤鎯呮帴鍙e瓧娈靛榻� canApprove锛氫粎褰撴湁 isShen 鐨勮妭鐐规椂鍙鎵�
-const canApprove = computed(() => {
- return approvalSteps.value.some(step => step.isShen === true)
-})
+ // 浠庤鎯呮帴鍙e瓧娈靛榻� canApprove锛氫粎褰撴湁 isShen 鐨勮妭鐐规椂鍙鎵�
+ const canApprove = computed(() => {
+ return approvalSteps.value.some(step => step.isShen === true);
+ });
-onMounted(() => {
- approveId.value = uni.getStorageSync('approveId')
- if (approveId.value) {
- loadApprovalData()
- }
-})
-
-const loadApprovalData = () => {
- // 鍩烘湰鐢宠淇℃伅
- approveProcessGetInfo({ id: approveId.value }).then(res => {
- approvalData.value = res.data || {}
- })
- // 瀹℃壒鑺傜偣璇︽儏
- approveProcessDetails(approveId.value).then(res => {
- const list = Array.isArray(res.data) ? res.data : []
- // 淇濆瓨鍘熷鑺傜偣鏁版嵁渚涙彁浜や娇鐢�
- activities.value = list
-
- approvalSteps.value = list.map((it, idx) => {
- // 鑺傜偣鐘舵�佹槧灏勶細1=閫氳繃锛�2=涓嶉�氳繃锛屽惁鍒欑湅鏄惁褰撳墠(isShen)锛屽啀榛樿涓哄緟澶勭悊
- let status = 'pending'
- if (it.approveNodeStatus === 1) status = 'completed'
- else if (it.approveNodeStatus === 2) status = 'rejected'
- else if (it.isShen) status = 'current'
- return {
- title: `绗�${idx + 1}姝ュ鎵筦,
- approverName: it.approveNodeUser || '鏈煡鐢ㄦ埛',
- status,
- approveTime: it.approveTime || null,
- opinion: it.approveNodeReason || '',
- urlTem: it.urlTem || '',
- isShen: !!it.isShen
- }
- })
- })
-}
-
-const goBack = () => {
- uni.removeStorageSync('approveId');
- uni.navigateBack()
-}
-
-const submitForm = (status) => {
- // 鍙�夛細鏍¢獙瀹℃牳鎰忚
- if (!approvalOpinion.value?.trim()) {
- showToast('璇疯緭鍏ュ鏍告剰瑙�')
- return
- }
- // 鎵惧埌褰撳墠鍙鎵硅妭鐐�
- const filteredActivities = activities.value.filter(activity => activity.isShen)
- if (!filteredActivities.length) {
- showToast('褰撳墠鏃犲彲瀹℃壒鑺傜偣')
- return
- }
- // 鍐欏叆鐘舵�佸拰鎰忚
- filteredActivities[0].approveNodeStatus = status
- filteredActivities[0].approveNodeReason = approvalOpinion.value || ''
- // 璁$畻鏄惁涓烘渶鍚庝竴姝�
- const isLast = activities.value.findIndex(a => a.isShen) === activities.value.length - 1
- // 璋冪敤鍚庣
- updateApproveNode({ ...filteredActivities[0], isLast }).then(() => {
- const msg = status === 1 ? '瀹℃壒閫氳繃' : '瀹℃壒宸查┏鍥�'
- showToast(msg)
- // 鎻愮ず鍚庤繑鍥炰笂涓�涓〉闈�
- setTimeout(() => {
- goBack() // 鍐呴儴鏄� uni.navigateBack()
- }, 800)
- })
-}
-
-const handleApprove = () => {
- uni.showModal({
- title: '纭鎿嶄綔',
- content: '纭畾瑕侀�氳繃姝ゅ鎵瑰悧锛�',
- success: (res) => {
- if (res.confirm) submitForm(1)
+ onMounted(() => {
+ approveId.value = uni.getStorageSync("approveId");
+ if (approveId.value) {
+ loadApprovalData();
}
- })
-}
+ });
-const handleReject = () => {
- uni.showModal({
- title: '纭鎿嶄綔',
- content: '纭畾瑕侀┏鍥炴瀹℃壒鍚楋紵',
- success: (res) => {
- if (res.confirm) submitForm(2)
+ const loadApprovalData = () => {
+ // 鍩烘湰鐢宠淇℃伅
+ approveProcessGetInfo({ id: approveId.value }).then(res => {
+ approvalData.value = res.data || {};
+ });
+ // 瀹℃壒鑺傜偣璇︽儏
+ approveProcessDetails(approveId.value).then(res => {
+ const list = Array.isArray(res.data) ? res.data : [];
+ // 淇濆瓨鍘熷鑺傜偣鏁版嵁渚涙彁浜や娇鐢�
+ activities.value = list;
+
+ approvalSteps.value = list.map((it, idx) => {
+ // 鑺傜偣鐘舵�佹槧灏勶細1=閫氳繃锛�2=涓嶉�氳繃锛屽惁鍒欑湅鏄惁褰撳墠(isShen)锛屽啀榛樿涓哄緟澶勭悊
+ let status = "pending";
+ if (it.approveNodeStatus === 1) status = "completed";
+ else if (it.approveNodeStatus === 2) status = "rejected";
+ else if (it.isShen) status = "current";
+ return {
+ title: `绗�${idx + 1}姝ュ鎵筦,
+ approverName: it.approveNodeUser || "鏈煡鐢ㄦ埛",
+ status,
+ approveTime: it.approveTime || null,
+ opinion: it.approveNodeReason || "",
+ urlTem: it.urlTem || "",
+ isShen: !!it.isShen,
+ };
+ });
+ });
+ };
+
+ const goBack = () => {
+ uni.removeStorageSync("approveId");
+ uni.navigateBack();
+ };
+
+ const submitForm = status => {
+ // 鍙�夛細鏍¢獙瀹℃牳鎰忚
+ if (!approvalOpinion.value?.trim()) {
+ showToast("璇疯緭鍏ュ鏍告剰瑙�");
+ return;
}
- })
-}
-// 鍘熷鑺傜偣鏁版嵁锛堢敤浜庢彁浜ら�昏緫锛�
-const activities = ref([])
+ // 鎵惧埌褰撳墠鍙鎵硅妭鐐�
+ const filteredActivities = activities.value.filter(
+ activity => activity.isShen
+ );
+ if (!filteredActivities.length) {
+ showToast("褰撳墠鏃犲彲瀹℃壒鑺傜偣");
+ return;
+ }
+ // 鍐欏叆鐘舵�佸拰鎰忚
+ filteredActivities[0].approveNodeStatus = status;
+ filteredActivities[0].approveNodeReason = approvalOpinion.value || "";
+ // 璁$畻鏄惁涓烘渶鍚庝竴姝�
+ const isLast =
+ activities.value.findIndex(a => a.isShen) === activities.value.length - 1;
+ // 璋冪敤鍚庣
+ updateApproveNode({ ...filteredActivities[0], isLast }).then(() => {
+ const msg = status === 1 ? "瀹℃壒閫氳繃" : "瀹℃壒宸查┏鍥�";
+ showToast(msg);
+ // 鎻愮ず鍚庤繑鍥炰笂涓�涓〉闈�
+ setTimeout(() => {
+ goBack(); // 鍐呴儴鏄� uni.navigateBack()
+ }, 800);
+ });
+ };
+
+ const handleApprove = () => {
+ uni.showModal({
+ title: "纭鎿嶄綔",
+ content: "纭畾瑕侀�氳繃姝ゅ鎵瑰悧锛�",
+ success: res => {
+ if (res.confirm) submitForm(1);
+ },
+ });
+ };
+
+ const handleReject = () => {
+ uni.showModal({
+ title: "纭鎿嶄綔",
+ content: "纭畾瑕侀┏鍥炴瀹℃壒鍚楋紵",
+ success: res => {
+ if (res.confirm) submitForm(2);
+ },
+ });
+ };
+ // 鍘熷鑺傜偣鏁版嵁锛堢敤浜庢彁浜ら�昏緫锛�
+ const activities = ref([]);
</script>
<style scoped lang="scss">
-.approve-page {
- min-height: 100vh;
- background: #f8f9fa;
- padding-bottom: 80px;
-}
-
-.header {
- display: flex;
- align-items: center;
- background: #fff;
- padding: 16px 20px;
- border-bottom: 1px solid #f0f0f0;
- position: sticky;
- top: 0;
- z-index: 100;
-}
-
-.title {
- flex: 1;
- text-align: center;
- font-size: 18px;
- font-weight: 600;
- color: #333;
-}
-
-.application-info {
- background: #fff;
- margin: 16px;
- border-radius: 12px;
- overflow: hidden;
-}
-
-.info-header {
- padding: 16px;
- border-bottom: 1px solid #f0f0f0;
- background: #f8f9fa;
-}
-
-.info-title {
- font-size: 16px;
- font-weight: 600;
- color: #333;
-}
-
-.info-content {
- padding: 16px;
-}
-
-.info-row {
- display: flex;
- align-items: center;
- margin-bottom: 12px;
-
- &:last-child {
- margin-bottom: 0;
+ .approve-page {
+ min-height: 100vh;
+ background: #f8f9fa;
+ padding-bottom: 80px;
}
-}
-.info-label {
- font-size: 14px;
- color: #666;
- width: 80px;
- flex-shrink: 0;
-}
+ .header {
+ display: flex;
+ align-items: center;
+ background: #fff;
+ padding: 16px 20px;
+ border-bottom: 1px solid #f0f0f0;
+ position: sticky;
+ top: 0;
+ z-index: 100;
+ }
-.info-value {
- font-size: 14px;
- color: #333;
- flex: 1;
-}
+ .title {
+ flex: 1;
+ text-align: center;
+ font-size: 18px;
+ font-weight: 600;
+ color: #333;
+ }
-.approval-process {
- background: #fff;
- margin: 16px;
- border-radius: 12px;
- overflow: hidden;
-}
+ .application-info {
+ background: #fff;
+ margin: 16px;
+ border-radius: 12px;
+ overflow: hidden;
+ }
-.process-header {
- padding: 16px;
- border-bottom: 1px solid #f0f0f0;
- background: #f8f9fa;
-}
+ .info-header {
+ padding: 16px;
+ border-bottom: 1px solid #f0f0f0;
+ background: #f8f9fa;
+ }
-.process-title {
- font-size: 16px;
- font-weight: 600;
- color: #333;
-}
+ .info-title {
+ font-size: 16px;
+ font-weight: 600;
+ color: #333;
+ }
-.process-steps {
- padding: 20px;
-}
+ .info-content {
+ padding: 16px;
+ }
-.process-step {
- display: flex;
- position: relative;
- margin-bottom: 24px;
-
- &:last-child {
- margin-bottom: 0;
-
- .step-line {
- display: none;
+ .info-row {
+ display: flex;
+ align-items: center;
+ margin-bottom: 12px;
+
+ &:last-child {
+ margin-bottom: 0;
}
}
-}
-.step-indicator {
- display: flex;
- flex-direction: column;
- align-items: center;
- margin-right: 16px;
-}
+ .info-label {
+ font-size: 14px;
+ color: #666;
+ width: 80px;
+ flex-shrink: 0;
+ }
-.step-dot {
- width: 32px;
- height: 32px;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 14px;
- font-weight: 600;
- position: relative;
- z-index: 2;
-}
+ .info-value {
+ font-size: 14px;
+ color: #333;
+ flex: 1;
+ }
-.process-step.completed .step-dot {
- background: #52c41a;
- color: #fff;
-}
+ .approval-process {
+ background: #fff;
+ margin: 16px;
+ border-radius: 12px;
+ overflow: hidden;
+ }
-.process-step.current .step-dot {
- background: #1890ff;
- color: #fff;
- animation: pulse 2s infinite;
-}
+ .process-header {
+ padding: 16px;
+ border-bottom: 1px solid #f0f0f0;
+ background: #f8f9fa;
+ }
-.process-step.pending .step-dot {
- background: #d9d9d9;
- color: #999;
-}
+ .process-title {
+ font-size: 16px;
+ font-weight: 600;
+ color: #333;
+ }
-.step-line {
- width: 2px;
- height: 40px;
- background: #d9d9d9;
- margin-top: 8px;
-}
+ .process-steps {
+ padding: 20px;
+ }
-.process-step.completed .step-line {
- background: #52c41a;
-}
+ .process-step {
+ display: flex;
+ position: relative;
+ margin-bottom: 24px;
-.process-step.rejected .step-dot {
- background: #ff4d4f;
- color: #fff;
-}
-.process-step.rejected .step-line {
- background: #ff4d4f;
-}
+ &:last-child {
+ margin-bottom: 0;
-.step-content {
- flex: 1;
- padding-top: 4px;
-}
+ .step-line {
+ display: none;
+ }
+ }
+ }
-.step-info {
- margin-bottom: 8px;
-}
+ .step-indicator {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ margin-right: 16px;
+ }
-.step-title {
- font-size: 16px;
- font-weight: 600;
- color: #333;
- display: block;
- margin-bottom: 4px;
-}
+ .step-dot {
+ width: 32px;
+ height: 32px;
+ border-radius: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 14px;
+ font-weight: 600;
+ position: relative;
+ z-index: 2;
+ }
-.step-approver {
- font-size: 14px;
- color: #666;
- display: block;
- margin-bottom: 4px;
-}
+ .process-step.completed .step-dot {
+ background: #52c41a;
+ color: #fff;
+ }
-.step-time {
- font-size: 12px;
- color: #999;
- display: block;
-}
+ .process-step.current .step-dot {
+ background: #1890ff;
+ color: #fff;
+ animation: pulse 2s infinite;
+ }
-.step-opinion {
- background: #f8f9fa;
- padding: 12px;
- border-radius: 8px;
- border-left: 4px solid #52c41a;
-}
+ .process-step.pending .step-dot {
+ background: #d9d9d9;
+ color: #999;
+ }
-.opinion-label {
- font-size: 12px;
- color: #666;
- display: block;
- margin-bottom: 4px;
-}
+ .step-line {
+ width: 2px;
+ height: 40px;
+ background: #d9d9d9;
+ margin-top: 8px;
+ }
-.opinion-content {
- font-size: 14px;
- color: #333;
- line-height: 1.5;
-}
+ .process-step.completed .step-line {
+ background: #52c41a;
+ }
-.approval-input {
- background: #fff;
- margin: 16px;
- border-radius: 12px;
- overflow: hidden;
-}
+ .process-step.rejected .step-dot {
+ background: #ff4d4f;
+ color: #fff;
+ }
+ .process-step.rejected .step-line {
+ background: #ff4d4f;
+ }
-.input-header {
- padding: 16px;
- border-bottom: 1px solid #f0f0f0;
- background: #f8f9fa;
-}
+ .step-content {
+ flex: 1;
+ padding-top: 4px;
+ }
-.input-title {
- font-size: 16px;
- font-weight: 600;
- color: #333;
-}
+ .step-info {
+ margin-bottom: 8px;
+ }
-.input-content {
- padding: 16px;
-}
+ .step-title {
+ font-size: 16px;
+ font-weight: 600;
+ color: #333;
+ display: block;
+ margin-bottom: 4px;
+ }
-.footer-actions {
- position: fixed;
- left: 0;
- right: 0;
- bottom: 0;
- background: #fff;
- display: flex;
- justify-content: space-around;
- align-items: center;
- padding: 16px;
- box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
- z-index: 1000;
-}
+ .step-approver {
+ font-size: 14px;
+ color: #666;
+ display: block;
+ margin-bottom: 4px;
+ }
-.reject-btn {
+ .step-time {
+ font-size: 12px;
+ color: #999;
+ display: block;
+ }
+
+ .step-opinion {
+ background: #f8f9fa;
+ padding: 12px;
+ border-radius: 8px;
+ border-left: 4px solid #52c41a;
+ }
+
+ .opinion-label {
+ font-size: 12px;
+ color: #666;
+ display: block;
+ margin-bottom: 4px;
+ }
+
+ .opinion-content {
+ font-size: 14px;
+ color: #333;
+ line-height: 1.5;
+ }
+
+ .approval-input {
+ background: #fff;
+ margin: 16px;
+ border-radius: 12px;
+ overflow: hidden;
+ }
+
+ .input-header {
+ padding: 16px;
+ border-bottom: 1px solid #f0f0f0;
+ background: #f8f9fa;
+ }
+
+ .input-title {
+ font-size: 16px;
+ font-weight: 600;
+ color: #333;
+ }
+
+ .input-content {
+ padding: 16px;
+ }
+
+ .footer-actions {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: #fff;
+ display: flex;
+ justify-content: space-around;
+ align-items: center;
+ padding: 16px;
+ box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
+ z-index: 1000;
+ }
+
+ .reject-btn {
width: 120px;
background: #ff4d4f;
color: #fff;
@@ -503,47 +511,47 @@
background: #52c41a;
color: #fff;
}
-
+
/* 閫傞厤u-button鏍峰紡 */
:deep(.u-button) {
border-radius: 6px;
}
-@keyframes pulse {
- 0% {
- box-shadow: 0 0 0 0 rgba(24, 144, 255, 0.7);
+ @keyframes pulse {
+ 0% {
+ box-shadow: 0 0 0 0 rgba(24, 144, 255, 0.7);
+ }
+ 70% {
+ box-shadow: 0 0 0 10px rgba(24, 144, 255, 0);
+ }
+ 100% {
+ box-shadow: 0 0 0 0 rgba(24, 144, 255, 0);
+ }
}
- 70% {
- box-shadow: 0 0 0 10px rgba(24, 144, 255, 0);
+ .signature-section {
+ background: #fff;
+ padding: 12px 16px 16px;
+ border-top: 1px solid #f0f0f0;
}
- 100% {
- box-shadow: 0 0 0 0 rgba(24, 144, 255, 0);
+ .signature-header {
+ margin-bottom: 8px;
}
-}
-.signature-section {
- background: #fff;
- padding: 12px 16px 16px;
- border-top: 1px solid #f0f0f0;
-}
-.signature-header {
- margin-bottom: 8px;
-}
-.signature-title {
- font-size: 14px;
- font-weight: 600;
- color: #333;
-}
-.signature-box {
- width: 100%;
- height: 180px;
- background: #fff;
- border: 1px dashed #d9d9d9;
- border-radius: 8px;
- overflow: hidden;
-}
-.signature-actions {
- margin-top: 8px;
- display: flex;
- justify-content: flex-end;
-}
+ .signature-title {
+ font-size: 14px;
+ font-weight: 600;
+ color: #333;
+ }
+ .signature-box {
+ width: 100%;
+ height: 180px;
+ background: #fff;
+ border: 1px dashed #d9d9d9;
+ border-radius: 8px;
+ overflow: hidden;
+ }
+ .signature-actions {
+ margin-top: 8px;
+ display: flex;
+ justify-content: flex-end;
+ }
</style>
\ No newline at end of file
diff --git a/src/pages/cooperativeOffice/collaborativeApproval/detail.vue b/src/pages/cooperativeOffice/collaborativeApproval/detail.vue
index 04a4c18..16f9923 100644
--- a/src/pages/cooperativeOffice/collaborativeApproval/detail.vue
+++ b/src/pages/cooperativeOffice/collaborativeApproval/detail.vue
@@ -1,6 +1,6 @@
<template>
<view class="account-detail">
- <PageHeader title="瀹℃壒娴佺▼"
+ <PageHeader :title="operationType === 'detail' ? '璇︽儏' : '瀹℃壒娴佺▼'"
@back="goBack" />
<!-- 琛ㄥ崟鍖哄煙 -->
<u-form ref="formRef"
@@ -8,38 +8,39 @@
:rules="rules"
:model="form"
label-width="140rpx">
- <u-form-item prop="approveReason"
- label="娴佺▼缂栧彿">
- <u-input v-model="form.approveId"
- disabled
- placeholder="鑷姩缂栧彿" />
- </u-form-item>
- <u-form-item prop="approveReason"
- :label="approveType === 5 ? '閲囪喘浜嬬敱' : '鐢宠浜嬬敱'"
- required>
- <u-input v-model="form.approveReason"
- type="textarea"
- rows="2"
- auto-height
- maxlength="200"
- :placeholder="approveType === 5 ? '璇疯緭鍏ラ噰璐簨鐢�' : '璇疯緭鍏ョ敵璇蜂簨鐢�'"
- show-word-limit />
- </u-form-item>
- <u-form-item prop="approveDeptName"
- label="鐢宠閮ㄩ棬"
- required>
- <!-- <u-input v-model="form.approveDeptName"
+ <template v-if="operationType !== 'detail'">
+ <u-form-item prop="approveReason"
+ label="娴佺▼缂栧彿">
+ <u-input v-model="form.approveId"
+ disabled
+ placeholder="鑷姩缂栧彿" />
+ </u-form-item>
+ <u-form-item prop="approveReason"
+ :label="approveType === 5 ? '閲囪喘浜嬬敱' : '鐢宠浜嬬敱'"
+ required>
+ <u-input v-model="form.approveReason"
+ type="textarea"
+ rows="2"
+ auto-height
+ maxlength="200"
+ :placeholder="approveType === 5 ? '璇疯緭鍏ラ噰璐簨鐢�' : '璇疯緭鍏ョ敵璇蜂簨鐢�'"
+ show-word-limit />
+ </u-form-item>
+ <u-form-item prop="approveDeptName"
+ label="鐢宠閮ㄩ棬"
+ required>
+ <!-- <u-input v-model="form.approveDeptName"
placeholder="璇烽�夋嫨鐢宠閮ㄩ棬" /> -->
- <u-input v-model="form.approveDeptName"
- readonly
- placeholder="璇烽�夋嫨鐢宠閮ㄩ棬"
- @click="showPicker = true" />
- <template #right>
- <up-icon name="arrow-right"
- @click="showPicker = true"></up-icon>
- </template>
- </u-form-item>
- <u-form-item prop="approveUser"
+ <u-input v-model="form.approveDeptName"
+ readonly
+ placeholder="璇烽�夋嫨鐢宠閮ㄩ棬"
+ @click="showPicker = true" />
+ <template #right>
+ <up-icon name="arrow-right"
+ @click="showPicker = true"></up-icon>
+ </template>
+ </u-form-item>
+ <!-- <u-form-item prop="approveUser"
label="鐢宠浜�"
required>
<u-input v-model="form.approveUserName"
@@ -57,141 +58,277 @@
<up-icon name="arrow-right"
@click="showDatePicker"></up-icon>
</template>
- </u-form-item>
- <!-- approveType=2 璇峰亣鐩稿叧瀛楁 -->
- <template v-if="approveType === 2">
- <u-form-item prop="startDate"
- label="寮�濮嬫椂闂�"
+ </u-form-item> -->
+ <!-- approveType=2 璇峰亣鐩稿叧瀛楁 -->
+ <template v-if="approveType === 2">
+ <u-form-item prop="startDate"
+ label="寮�濮嬫椂闂�"
+ required>
+ <u-input v-model="form.startDate"
+ readonly
+ placeholder="璇峰亣寮�濮嬫椂闂�"
+ @click="showStartDatePicker" />
+ <template #right>
+ <up-icon name="arrow-right"
+ @click="showStartDatePicker"></up-icon>
+ </template>
+ </u-form-item>
+ <u-form-item prop="endDate"
+ label="缁撴潫鏃堕棿"
+ required>
+ <u-input v-model="form.endDate"
+ readonly
+ placeholder="璇峰亣缁撴潫鏃堕棿"
+ @click="showEndDatePicker" />
+ <template #right>
+ <up-icon name="arrow-right"
+ @click="showEndDatePicker"></up-icon>
+ </template>
+ </u-form-item>
+ </template>
+ <!-- approveType=3 鍑哄樊鐩稿叧瀛楁 -->
+ <u-form-item v-if="approveType === 3"
+ prop="location"
+ label="鍑哄樊鍦扮偣"
required>
- <u-input v-model="form.startDate"
- readonly
- placeholder="璇峰亣寮�濮嬫椂闂�"
- @click="showStartDatePicker" />
- <template #right>
- <up-icon name="arrow-right"
- @click="showStartDatePicker"></up-icon>
- </template>
+ <u-input v-model="form.location"
+ placeholder="璇疯緭鍏ュ嚭宸湴鐐�"
+ clearable />
</u-form-item>
- <u-form-item prop="endDate"
- label="缁撴潫鏃堕棿"
+ <!-- approveType=4 鎶ラ攢鐩稿叧瀛楁 -->
+ <u-form-item v-if="approveType === 4"
+ prop="price"
+ label="鎶ラ攢閲戦"
required>
- <u-input v-model="form.endDate"
- readonly
- placeholder="璇峰亣缁撴潫鏃堕棿"
- @click="showEndDatePicker" />
- <template #right>
- <up-icon name="arrow-right"
- @click="showEndDatePicker"></up-icon>
- </template>
+ <u-input v-model="form.price"
+ type="number"
+ placeholder="璇疯緭鍏ユ姤閿�閲戦"
+ clearable />
</u-form-item>
</template>
- <!-- approveType=3 鍑哄樊鐩稿叧瀛楁 -->
- <u-form-item v-if="approveType === 3"
- prop="location"
- label="鍑哄樊鍦扮偣"
- required>
- <u-input v-model="form.location"
- placeholder="璇疯緭鍏ュ嚭宸湴鐐�"
- clearable />
- </u-form-item>
- <!-- approveType=4 鎶ラ攢鐩稿叧瀛楁 -->
- <u-form-item v-if="approveType === 4"
- prop="price"
- label="鎶ラ攢閲戦"
- required>
- <u-input v-model="form.price"
- type="number"
- placeholder="璇疯緭鍏ユ姤閿�閲戦"
- clearable />
+ <!-- 鎶ヤ环瀹℃壒璇︽儏 -->
+ <view v-if="isQuotationApproval"
+ style="margin: 20rpx 0;">
+ <u-divider text="鎶ヤ环璇︽儏"
+ text-size="28rpx"
+ color="#2979ff"></u-divider>
+ <u-skeleton :loading="quotationLoading"
+ rows="3"
+ animated>
+ <view v-if="!currentQuotation || !currentQuotation.quotationNo"
+ style="padding: 40rpx; text-align: center; color: #999;">
+ 鏈煡璇㈠埌瀵瑰簲鎶ヤ环璇︽儏
+ </view>
+ <view v-else>
+ <u-cell-group :border="false">
+ <u-cell title="鎶ヤ环鍗曞彿"
+ :value="currentQuotation.quotationNo"></u-cell>
+ <u-cell title="瀹㈡埛鍚嶇О"
+ :value="currentQuotation.customer"></u-cell>
+ <u-cell title="涓氬姟鍛�"
+ :value="currentQuotation.salesperson"></u-cell>
+ <u-cell title="鎶ヤ环鏃ユ湡"
+ :value="currentQuotation.quotationDate"></u-cell>
+ <u-cell title="鏈夋晥鏈熻嚦"
+ :value="currentQuotation.validDate"></u-cell>
+ <u-cell title="浠樻鏂瑰紡"
+ :value="currentQuotation.paymentMethod"></u-cell>
+ <u-cell title="鎶ヤ环鎬婚">
+ <template #value>
+ <text style="font-size: 32rpx; color: #e6a23c; font-weight: bold;">
+ 楼{{ Number(currentQuotation.totalAmount ?? 0).toFixed(2) }}
+ </text>
+ </template>
+ </u-cell>
+ </u-cell-group>
+ <view style="margin-top: 20rpx; padding: 0 30rpx;">
+ <view style="font-size: 28rpx; font-weight: bold; margin-bottom: 10rpx;">浜у搧鏄庣粏</view>
+ <view v-for="(item, index) in (currentQuotation.products || [])"
+ :key="index"
+ style="background: #f8f8f8; border-radius: 8rpx; padding: 20rpx; margin-bottom: 10rpx;">
+ <view style="display: flex; justify-content: space-between;">
+ <text style="font-weight: bold;">{{ item.product }}</text>
+ <text style="color: #e6a23c;">楼{{ Number(item.unitPrice ?? 0).toFixed(2) }}</text>
+ </view>
+ <view style="font-size: 24rpx; color: #666; margin-top: 10rpx;">
+ 瑙勬牸: {{ item.specification }} | 鍗曚綅: {{ item.unit }}
+ </view>
+ </view>
+ </view>
+ <view v-if="currentQuotation.remark"
+ style="margin-top: 20rpx; padding: 0 30rpx;">
+ <view style="font-size: 28rpx; font-weight: bold;">澶囨敞</view>
+ <view style="font-size: 26rpx; color: #666; margin-top: 10rpx;">{{ currentQuotation.remark }}</view>
+ </view>
+ </view>
+ </u-skeleton>
+ </view>
+ <!-- 閲囪喘瀹℃壒璇︽儏 -->
+ <view v-if="isPurchaseApproval"
+ style="margin: 20rpx 0;">
+ <u-divider text="閲囪喘璇︽儏"
+ text-size="28rpx"
+ color="#2979ff"></u-divider>
+ <u-skeleton :loading="purchaseLoading"
+ rows="3"
+ animated>
+ <view v-if="!currentPurchase || !currentPurchase.purchaseContractNumber"
+ style="padding: 40rpx; text-align: center; color: #999;">
+ 鏈煡璇㈠埌瀵瑰簲閲囪喘璇︽儏
+ </view>
+ <view v-else>
+ <u-cell-group :border="false">
+ <u-cell title="閲囪喘鍚堝悓鍙�"
+ :value="currentPurchase.purchaseContractNumber"></u-cell>
+ <u-cell title="渚涘簲鍟嗗悕绉�"
+ :value="currentPurchase.supplierName"></u-cell>
+ <u-cell title="椤圭洰鍚嶇О"
+ :value="currentPurchase.projectName"></u-cell>
+ <u-cell title="閿�鍞悎鍚屽彿"
+ :value="currentPurchase.salesContractNo"></u-cell>
+ <u-cell title="绛捐鏃ユ湡"
+ :value="currentPurchase.executionDate"></u-cell>
+ <u-cell title="褰曞叆鏃ユ湡"
+ :value="currentPurchase.entryDate"></u-cell>
+ <u-cell title="浠樻鏂瑰紡"
+ :value="currentPurchase.paymentMethod"></u-cell>
+ <u-cell title="鍚堝悓閲戦">
+ <template #value>
+ <text style="font-size: 32rpx; color: #e6a23c; font-weight: bold;">
+ 楼{{ Number(currentPurchase.contractAmount ?? 0).toFixed(2) }}
+ </text>
+ </template>
+ </u-cell>
+ </u-cell-group>
+ <view style="margin-top: 20rpx; padding: 0 30rpx;">
+ <view style="font-size: 28rpx; font-weight: bold; margin-bottom: 10rpx;">浜у搧鏄庣粏</view>
+ <view v-for="(item, index) in (currentPurchase.productData || [])"
+ :key="index"
+ style="background: #f8f8f8; border-radius: 8rpx; padding: 20rpx; margin-bottom: 10rpx;">
+ <view style="display: flex; justify-content: space-between;">
+ <text style="font-weight: bold;">{{ item.productCategory }}</text>
+ <text style="color: #e6a23c;">楼{{ Number(item.taxInclusiveTotalPrice ?? 0).toFixed(2) }}</text>
+ </view>
+ <view style="font-size: 24rpx; color: #666; margin-top: 10rpx;">
+ 瑙勬牸: {{ item.specificationModel }} | 鏁伴噺: {{ item.quantity }} {{ item.unit }}
+ </view>
+ <view style="font-size: 24rpx; color: #999; margin-top: 4rpx;">
+ 鍚◣鍗曚环: 楼{{ Number(item.taxInclusiveUnitPrice ?? 0).toFixed(2) }}
+ </view>
+ </view>
+ </view>
+ </view>
+ </u-skeleton>
+ </view>
+ <!-- 鍙戣揣瀹℃壒璇︽儏 -->
+ <view v-if="isDeliveryApproval"
+ style="margin: 20rpx 0;">
+ <u-divider text="鍙戣揣璇︽儏"
+ text-size="28rpx"
+ color="#2979ff"></u-divider>
+ <u-skeleton :loading="deliveryLoading"
+ rows="3"
+ animated>
+ <view v-if="!currentDelivery || !currentDelivery.shippingInfo"
+ style="padding: 40rpx; text-align: center; color: #999;">
+ 鏈煡璇㈠埌瀵瑰簲鍙戣揣璇︽儏
+ </view>
+ <view v-else>
+ <u-cell-group :border="false">
+ <u-cell title="閿�鍞鍗�"
+ :value="currentDelivery.shippingInfo.salesContractNo || '--'"></u-cell>
+ <u-cell title="鍙戣揣璁㈠崟鍙�"
+ :value="currentDelivery.shippingInfo.shippingNo || '--'"></u-cell>
+ <u-cell title="瀹㈡埛鍚嶇О"
+ :value="currentDelivery.shippingInfo.customerName || '--'"></u-cell>
+ <u-cell title="鍙戣揣绫诲瀷"
+ :value="currentDelivery.shippingInfo.type || '--'"></u-cell>
+ <u-cell title="鍙戣揣鏃ユ湡"
+ :value="currentDelivery.shippingInfo.shippingDate || '--'"></u-cell>
+ <u-cell title="瀹℃牳鐘舵��"
+ :value="currentDelivery.shippingInfo.status || '--'"></u-cell>
+ <u-cell title="鍙戣揣杞︾墝鍙�"
+ :value="currentDelivery.shippingInfo.shippingCarNumber || '--'"></u-cell>
+ <u-cell title="蹇�掑叕鍙�"
+ :value="currentDelivery.shippingInfo.expressCompany || '--'"></u-cell>
+ <u-cell title="蹇�掑崟鍙�"
+ :value="currentDelivery.shippingInfo.expressNumber || '--'"></u-cell>
+ </u-cell-group>
+ <view style="margin-top: 20rpx; padding: 0 30rpx;">
+ <view style="font-size: 28rpx; font-weight: bold; margin-bottom: 10rpx;">浜у搧鏄庣粏</view>
+ <view v-for="(item, index) in deliveryProductList"
+ :key="index"
+ style="background: #f8f8f8; border-radius: 8rpx; padding: 20rpx; margin-bottom: 10rpx;">
+ <view style="display: flex; justify-content: space-between;">
+ <text style="font-weight: bold;">{{ item.productName }}</text>
+ <text style="color: #2979ff;">鏁伴噺: {{ item.deliveryQuantity }}</text>
+ </view>
+ <view style="font-size: 24rpx; color: #666; margin-top: 10rpx;">
+ 瑙勬牸: {{ item.specificationModel }}
+ </view>
+ <view v-if="item.batchNo"
+ style="font-size: 24rpx; color: #999; margin-top: 4rpx;">
+ 鎵瑰彿: {{ item.batchNo }}
+ </view>
+ </view>
+ </view>
+ <view v-if="currentDelivery.shippingInfo.storageBlobVOs && currentDelivery.shippingInfo.storageBlobVOs.length"
+ style="margin-top: 20rpx; padding: 0 30rpx;">
+ <view style="font-size: 28rpx; font-weight: bold; margin-bottom: 10rpx;">鍙戣揣鍥剧墖</view>
+ <CommonUpload :model-value="currentDelivery.shippingInfo.storageBlobVOs"
+ disabled />
+ </view>
+ </view>
+ </u-skeleton>
+ </view>
+ <u-form-item v-if="operationType !== 'detail'"
+ label="鍥剧墖闄勪欢"
+ prop="storageBlobDTOS"
+ border-bottom>
+ <CommonUpload v-model="form.storageBlobDTOS" />
</u-form-item>
</u-form>
<!-- 閫夋嫨鍣ㄥ脊绐� -->
- <up-action-sheet :show="showPicker"
- :actions="productOptions"
- title="閫夋嫨閮ㄩ棬"
- @select="onConfirm"
- @close="showPicker = false" />
- <!-- 鏃ユ湡閫夋嫨鍣� -->
- <up-popup :show="showDate"
- mode="bottom"
- @close="showDate = false">
- <up-datetime-picker :show="true"
- v-model="currentDate"
- @confirm="onDateConfirm"
- @cancel="showDate = false"
- mode="date" />
- </up-popup>
- <!-- 璇峰亣寮�濮嬫椂闂撮�夋嫨鍣� -->
- <up-popup :show="showStartDate"
- mode="bottom"
- @close="showStartDate = false">
- <up-datetime-picker :show="true"
- v-model="startDateValue"
- @confirm="onStartDateConfirm"
- @cancel="showStartDate = false"
- mode="date" />
- </up-popup>
- <!-- 璇峰亣缁撴潫鏃堕棿閫夋嫨鍣� -->
- <up-popup :show="showEndDate"
- mode="bottom"
- @close="showEndDate = false">
- <up-datetime-picker :show="true"
- v-model="endDateValue"
- @confirm="onEndDateConfirm"
- @cancel="showEndDate = false"
- mode="date" />
- </up-popup>
- <!-- 瀹℃牳娴佺▼鍖哄煙 -->
- <view class="approval-process">
- <view class="approval-header">
- <text class="approval-title">瀹℃牳娴佺▼</text>
- <text class="approval-desc">姣忎釜姝ラ鍙兘閫夋嫨涓�涓鎵逛汉</text>
- </view>
- <view class="approval-steps">
- <view v-for="(step, stepIndex) in approverNodes"
- :key="stepIndex"
- class="approval-step">
- <view class="step-dot"></view>
- <view class="step-title">
- <text>瀹℃壒浜�</text>
- </view>
- <view class="approver-container">
- <view v-if="step.nickName"
- class="approver-item">
- <view class="approver-avatar">
- <text class="avatar-text">{{ step.nickName.charAt(0) }}</text>
- <view class="status-dot"></view>
- </view>
- <view class="approver-info">
- <text class="approver-name">{{ step.nickName }}</text>
- </view>
- <view class="delete-approver-btn"
- @click="removeApprover(stepIndex)">脳</view>
- </view>
- <view v-else
- class="add-approver-btn"
- @click="addApprover(stepIndex)">
- <view class="add-circle">+</view>
- <text class="add-label">閫夋嫨瀹℃壒浜�</text>
- </view>
- </view>
- <view class="step-line"
- v-if="stepIndex < approverNodes.length - 1"></view>
- <view class="delete-step-btn"
- v-if="approverNodes.length > 1"
- @click="removeApprovalStep(stepIndex)">鍒犻櫎鑺傜偣</view>
- </view>
- </view>
- <view class="add-step-btn">
- <u-button icon="plus"
- plain
- type="primary"
- style="width: 100%"
- @click="addApprovalStep">鏂板鑺傜偣</u-button>
- </view>
- </view>
+ <template v-if="operationType !== 'detail'">
+ <up-action-sheet :show="showPicker"
+ :actions="productOptions"
+ title="閫夋嫨閮ㄩ棬"
+ @select="onConfirm"
+ @close="showPicker = false" />
+ <!-- 鏃ユ湡閫夋嫨鍣� -->
+ <up-popup :show="showDate"
+ mode="bottom"
+ @close="showDate = false">
+ <up-datetime-picker :show="true"
+ v-model="currentDate"
+ @confirm="onDateConfirm"
+ @cancel="showDate = false"
+ mode="date" />
+ </up-popup>
+ <!-- 璇峰亣寮�濮嬫椂闂撮�夋嫨鍣� -->
+ <up-popup :show="showStartDate"
+ mode="bottom"
+ @close="showStartDate = false">
+ <up-datetime-picker :show="true"
+ v-model="startDateValue"
+ @confirm="onStartDateConfirm"
+ @cancel="showStartDate = false"
+ mode="date" />
+ </up-popup>
+ <!-- 璇峰亣缁撴潫鏃堕棿閫夋嫨鍣� -->
+ <up-popup :show="showEndDate"
+ mode="bottom"
+ @close="showEndDate = false">
+ <up-datetime-picker :show="true"
+ v-model="endDateValue"
+ @confirm="onEndDateConfirm"
+ @cancel="showEndDate = false"
+ mode="date" />
+ </up-popup>
+ </template>
<!-- 搴曢儴鎸夐挳 -->
- <view class="footer-btns">
+ <view class="footer-btns"
+ v-if="operationType !== 'detail'">
<u-button class="cancel-btn"
@click="goBack">鍙栨秷</u-button>
<u-button class="save-btn"
@@ -201,8 +338,17 @@
</template>
<script setup>
- import { ref, onMounted, onUnmounted, reactive, toRefs } from "vue";
+ import {
+ ref,
+ onMounted,
+ onUnmounted,
+ reactive,
+ toRefs,
+ computed,
+ watch,
+ } from "vue";
import PageHeader from "@/components/PageHeader.vue";
+ import CommonUpload from "@/components/CommonUpload.vue";
import useUserStore from "@/store/modules/user";
import { formatDateToYMD } from "@/utils/ruoyi";
import {
@@ -210,14 +356,16 @@
approveProcessGetInfo,
approveProcessAdd,
approveProcessUpdate,
+ getDeliveryDetailByShippingNo,
} from "@/api/collaborativeApproval/approvalProcess";
+ import { getQuotationList } from "@/api/salesManagement/salesQuotation";
+ import { getPurchaseByCode } from "@/api/procurementManagement/procurementLedger";
const showToast = message => {
uni.showToast({
title: message,
icon: "none",
});
};
- import { userListNoPageByTenantId } from "@/api/system/user";
const data = reactive({
form: {
@@ -229,8 +377,7 @@
approveDeptId: "",
approveReason: "",
checkResult: "",
- tempFileIds: [],
- approverList: [], // 鏂板瀛楁锛屽瓨鍌ㄦ墍鏈夎妭鐐圭殑瀹℃壒浜篿d
+ storageBlobDTOS: [],
startDate: "",
endDate: "",
location: "",
@@ -258,8 +405,6 @@
const productOptions = ref([]);
const operationType = ref("");
const currentApproveStatus = ref("");
- const approverNodes = ref([]);
- const userList = ref([]);
const formRef = ref(null);
const message = ref("");
const showDate = ref(false);
@@ -270,6 +415,19 @@
const endDateValue = ref(Date.now());
const userStore = useUserStore();
const approveType = ref(0);
+ const isInitialLoading = ref(false);
+
+ const quotationLoading = ref(false);
+ const currentQuotation = ref({});
+ const purchaseLoading = ref(false);
+ const currentPurchase = ref({});
+ const deliveryLoading = ref(false);
+ const currentDelivery = ref({});
+ const deliveryProductList = ref([]);
+
+ const isQuotationApproval = computed(() => Number(approveType.value) === 6);
+ const isPurchaseApproval = computed(() => Number(approveType.value) === 5);
+ const isDeliveryApproval = computed(() => Number(approveType.value) === 7);
const getProductOptions = () => {
getDept().then(res => {
@@ -279,20 +437,133 @@
}));
});
};
- const fileList = ref([]);
- let nextApproverId = 2;
const getCurrentinfo = () => {
userStore.getInfo().then(res => {
form.value.approveDeptId = res.user.tenantId;
console.log(res.user.tenantId, "res.user.tenantId");
});
};
+
+ // 鏄剧ず鏃ユ湡閫夋嫨鍣�
+ const showDatePicker = () => {
+ showDate.value = true;
+ };
+
+ // 纭鏃ユ湡閫夋嫨
+ const onDateConfirm = e => {
+ form.value.approveTime = formatDateToYMD(e.value);
+ currentDate.value = formatDateToYMD(e.value);
+ showDate.value = false;
+ };
+
+ // 鏄剧ず璇峰亣寮�濮嬫椂闂撮�夋嫨鍣�
+ const showStartDatePicker = () => {
+ showStartDate.value = true;
+ };
+
+ // 纭璇峰亣寮�濮嬫椂闂撮�夋嫨
+ const onStartDateConfirm = e => {
+ form.value.startDate = formatDateToYMD(e.value);
+ showStartDate.value = false;
+ };
+
+ const showEndDatePicker = () => {
+ showEndDate.value = true;
+ };
+
+ // 纭璇峰亣缁撴潫鏃堕棿閫夋嫨
+ const onEndDateConfirm = e => {
+ form.value.endDate = formatDateToYMD(e.value);
+ showEndDate.value = false;
+ };
+
+ const fetchDetailData = async row => {
+ // 鎶ヤ环瀹℃壒
+ if (isQuotationApproval.value) {
+ const quotationNo = row?.approveReason;
+ if (quotationNo) {
+ quotationLoading.value = true;
+ getQuotationList({ quotationNo })
+ .then(res => {
+ const records = res?.data?.records || [];
+ currentQuotation.value = records[0] || {};
+ })
+ .finally(() => {
+ quotationLoading.value = false;
+ });
+ }
+ }
+
+ // 閲囪喘瀹℃壒
+ if (isPurchaseApproval.value) {
+ const purchaseContractNumber = row?.approveReason;
+ if (purchaseContractNumber) {
+ purchaseLoading.value = true;
+ getPurchaseByCode({ purchaseContractNumber })
+ .then(res => {
+ currentPurchase.value = res;
+ })
+ .catch(err => {
+ console.error("鏌ヨ閲囪喘璇︽儏澶辫触:", err);
+ })
+ .finally(() => {
+ purchaseLoading.value = false;
+ });
+ }
+ }
+
+ // 鍙戣揣瀹℃壒
+ if (isDeliveryApproval.value) {
+ const deliveryNo = row?.approveReason;
+ if (deliveryNo) {
+ deliveryLoading.value = true;
+ currentDelivery.value = {};
+ deliveryProductList.value = [];
+ getDeliveryDetailByShippingNo({ shippingNo: deliveryNo })
+ .then(res => {
+ const detailData = res?.data || res || {};
+ currentDelivery.value = detailData;
+ deliveryProductList.value =
+ detailData.shippingProductDetailDtoList || [];
+ })
+ .catch(err => {
+ console.error("鏌ヨ鍙戣揣璇︽儏澶辫触:", err);
+ })
+ .finally(() => {
+ deliveryLoading.value = false;
+ });
+ }
+ }
+ };
+
+ // 鐩戝惉瀹℃壒浜嬬敱鍙樺寲锛屽鏋滄槸鐗瑰畾瀹℃壒绫诲瀷鍒欏皾璇曡幏鍙栬鎯�
+ watch(
+ () => form.value.approveReason,
+ newVal => {
+ if (isInitialLoading.value) return;
+ if (
+ newVal &&
+ (isQuotationApproval.value ||
+ isPurchaseApproval.value ||
+ isDeliveryApproval.value)
+ ) {
+ // 寤惰繜涓�浼氬啀璇锋眰锛岄伩鍏嶈緭鍏ヨ繃绋嬩腑棰戠箒瑙﹀彂
+ debounceFetchDetail();
+ }
+ }
+ );
+
+ let timer = null;
+ const debounceFetchDetail = () => {
+ if (timer) clearTimeout(timer);
+ timer = setTimeout(() => {
+ fetchDetailData(form.value);
+ }, 800);
+ };
+
onMounted(async () => {
try {
getProductOptions();
- userListNoPageByTenantId().then(res => {
- userList.value = res.data;
- });
form.value.approveUser = userStore.id;
form.value.approveUserName = userStore.nickName;
form.value.approveTime = getCurrentDate();
@@ -302,57 +573,39 @@
approveType.value = uni.getStorageSync("approveType") || 0;
// 濡傛灉鏄紪杈戞ā寮忥紝浠庢湰鍦板瓨鍌ㄨ幏鍙栨暟鎹�
- if (operationType.value === "edit") {
+ if (operationType.value === "edit" || operationType.value === "detail") {
const storedData = uni.getStorageSync("invoiceLedgerEditRow");
if (storedData) {
const row = JSON.parse(storedData);
- fileList.value = row.commonFileList || [];
- form.value.tempFileIds = fileList.value.map(file => file.id);
currentApproveStatus.value = row.approveStatus;
- approveProcessGetInfo({ id: row.approveId, approveReason: "1" }).then(
- res => {
+ isInitialLoading.value = true;
+ approveProcessGetInfo({ id: row.approveId, approveReason: "1" })
+ .then(res => {
form.value = { ...res.data };
- // 鍙嶆樉瀹℃壒浜�
- if (res.data && res.data.approveUserIds) {
- const userIds = res.data.approveUserIds.split(",");
- approverNodes.value = userIds.map((userId, idx) => {
- const userIdNum = parseInt(userId.trim());
- // 浠巙serList涓壘鍒板搴旂殑鐢ㄦ埛淇℃伅
- const userInfo = userList.value.find(
- user => user.userId === userIdNum
- );
- return {
- id: idx + 1,
- userId: userIdNum,
- nickName: userInfo ? userInfo.nickName : null,
- };
- });
- nextApproverId = userIds.length + 1;
- } else {
- // 鏂板妯″紡锛屽垵濮嬪寲涓�涓┖鐨勫鎵硅妭鐐�
- approverNodes.value = [{ id: 1, userId: null, nickName: null }];
- nextApproverId = 2;
+ // 璁剧疆鍥剧墖鍒楄〃鏄剧ず
+ const fileData =
+ res.data.storageBlobVOS || res.data.commonFileList || [];
+ if (fileData.length > 0) {
+ form.value.storageBlobDTOS = fileData;
}
- }
- );
+ // 鑾峰彇棰濆璇︽儏
+ fetchDetailData(res.data);
+ })
+ .finally(() => {
+ // 寤惰繜涓�浼氶噸缃紝纭繚 watch 涓嶄細琚Е鍙�
+ setTimeout(() => {
+ isInitialLoading.value = false;
+ }, 100);
+ });
}
- } else {
- // 鏂板妯″紡锛屽垵濮嬪寲涓�涓┖鐨勫鎵硅妭鐐�
- approverNodes.value = [{ id: 1, userId: null }];
}
-
- // 鐩戝惉鑱旂郴浜洪�夋嫨浜嬩欢
- uni.$on("selectContact", handleSelectContact);
} catch (error) {
- console.error("鑾峰彇閮ㄩ棬鏁版嵁澶辫触:", error);
+ console.error("鑾峰彇鏁版嵁澶辫触:", error);
}
});
- onUnmounted(() => {
- // 绉婚櫎浜嬩欢鐩戝惉
- uni.$off("selectContact", handleSelectContact);
- });
+ onUnmounted(() => {});
const onConfirm = item => {
// 璁剧疆閫変腑鐨勯儴闂�
@@ -375,13 +628,6 @@
};
const submitForm = () => {
- // 妫�鏌ユ瘡涓鎵规楠ゆ槸鍚﹂兘鏈夊鎵逛汉
- const hasEmptyStep = approverNodes.value.some(step => !step.nickName);
- if (hasEmptyStep) {
- showToast("璇蜂负姣忎釜瀹℃壒姝ラ閫夋嫨瀹℃壒浜�");
- return;
- }
-
// 鎵嬪姩妫�鏌ュ繀濉瓧娈碉紝闃叉鍥犳暟鎹被鍨嬮棶棰樺鑷寸殑鏍¢獙澶辫触
if (!form.value.approveReason || !form.value.approveReason.trim()) {
showToast("璇疯緭鍏ョ敵璇蜂簨鐢�");
@@ -406,26 +652,8 @@
.then(valid => {
if (valid) {
// 琛ㄥ崟鏍¢獙閫氳繃锛屽彲浠ユ彁浜ゆ暟鎹�
- // 鏀堕泦鎵�鏈夎妭鐐圭殑瀹℃壒浜篿d
- console.log("approverNodes---", approverNodes.value);
- form.value.approveUserIds = approverNodes.value
- .map(node => node.userId)
- .join(",");
form.value.approveType = approveType.value;
form.value.approveDeptId = Number(form.value.approveDeptId);
- // const submitForm = {
- // approveDeptId: form.value.approveDeptId,
- // approveDeptName: form.value.approveDeptName,
- // approveReason: form.value.approveReason,
- // approveTime: form.value.approveTime,
- // approveType: form.value.approveType,
- // approveUser: form.value.approveUser,
- // approveUserIds: form.value.approveUserIds,
- // endDate: form.value.endDate,
- // startDate: form.value.startDate,
- // };
- // console.log("form.value---", form.value);
- // console.log("submitForm", submitForm);
if (operationType.value === "add" || currentApproveStatus.value == 3) {
approveProcessAdd(form.value).then(res => {
@@ -461,77 +689,6 @@
});
};
- // 澶勭悊鑱旂郴浜洪�夋嫨缁撴灉
- const handleSelectContact = data => {
- const { stepIndex, contact } = data;
- // 灏嗛�変腑鐨勮仈绯讳汉璁剧疆涓哄搴斿鎵规楠ょ殑瀹℃壒浜�
- approverNodes.value[stepIndex].userId = contact.userId;
- approverNodes.value[stepIndex].nickName = contact.nickName;
- };
-
- const addApprover = stepIndex => {
- // 璺宠浆鍒拌仈绯讳汉閫夋嫨椤甸潰
- uni.setStorageSync("stepIndex", stepIndex);
- uni.navigateTo({
- url: "/pages/cooperativeOffice/collaborativeApproval/contactSelect",
- });
- };
-
- const addApprovalStep = () => {
- // 娣诲姞鏂扮殑瀹℃壒姝ラ
- approverNodes.value.push({ userId: null, nickName: null });
- };
-
- const removeApprover = stepIndex => {
- // 绉婚櫎瀹℃壒浜�
- approverNodes.value[stepIndex].userId = null;
- approverNodes.value[stepIndex].nickName = null;
- };
-
- const removeApprovalStep = stepIndex => {
- // 纭繚鑷冲皯淇濈暀涓�涓鎵规楠�
- if (approverNodes.value.length > 1) {
- approverNodes.value.splice(stepIndex, 1);
- } else {
- uni.showToast({
- title: "鑷冲皯闇�瑕佷竴涓鎵规楠�",
- icon: "none",
- });
- }
- };
- // 鏄剧ず鏃ユ湡閫夋嫨鍣�
- const showDatePicker = () => {
- showDate.value = true;
- };
-
- // 纭鏃ユ湡閫夋嫨
- const onDateConfirm = e => {
- form.value.approveTime = formatDateToYMD(e.value);
- currentDate.value = formatDateToYMD(e.value);
- showDate.value = false;
- };
-
- // 鏄剧ず璇峰亣寮�濮嬫椂闂撮�夋嫨鍣�
- const showStartDatePicker = () => {
- showStartDate.value = true;
- };
-
- // 纭璇峰亣寮�濮嬫椂闂撮�夋嫨
- const onStartDateConfirm = e => {
- form.value.startDate = formatDateToYMD(e.value);
- showStartDate.value = false;
- };
-
- const showEndDatePicker = () => {
- showEndDate.value = true;
- };
-
- // 纭璇峰亣缁撴潫鏃堕棿閫夋嫨
- const onEndDateConfirm = e => {
- form.value.endDate = formatDateToYMD(e.value);
- showEndDate.value = false;
- };
-
// 鑾峰彇褰撳墠鏃ユ湡骞舵牸寮忓寲涓� YYYY-MM-DD
function getCurrentDate() {
const today = new Date();
@@ -544,238 +701,8 @@
<style scoped lang="scss">
@import "@/static/scss/form-common.scss";
-
- .approval-process {
- background: #fff;
- margin: 16px;
- border-radius: 16px;
- padding: 16px;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
- }
-
- .approval-header {
- margin-bottom: 16px;
- }
-
- .approval-title {
- font-size: 16px;
- font-weight: 600;
- color: #333;
- display: block;
- margin-bottom: 4px;
- }
-
- .approval-desc {
- font-size: 12px;
- color: #999;
- }
-
- /* 鏍峰紡澧炲己涓衡�滅畝娲佸皬鍦嗗湀椋庢牸鈥� */
- .approval-steps {
- padding-left: 22px;
- position: relative;
-
- &::before {
- content: "";
- position: absolute;
- left: 11px;
- top: 40px;
- bottom: 40px;
- width: 2px;
- background: linear-gradient(
- to bottom,
- #e6f7ff 0%,
- #bae7ff 50%,
- #91d5ff 100%
- );
- border-radius: 1px;
- }
- }
-
- .approval-step {
- position: relative;
- margin-bottom: 24px;
-
- &::before {
- content: "";
- position: absolute;
- left: -18px;
- top: 14px; // 浠� 8px 璋冩暣涓� 14px锛屼笌鏂囧瓧涓績瀵归綈
- width: 12px;
- height: 12px;
- background: #fff;
- border: 3px solid #006cfb;
- border-radius: 50%;
- z-index: 2;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
- }
- }
-
- .step-title {
- top: 12px;
- margin-bottom: 12px;
- position: relative;
- margin-left: 6px;
- }
-
- .step-title text {
- font-size: 14px;
- color: #666;
- background: #f0f0f0;
- padding: 4px 12px;
- border-radius: 12px;
- position: relative;
- line-height: 1.4; // 纭繚鏂囧瓧琛岄珮涓�鑷�
- }
-
- .approver-item {
- display: flex;
- align-items: center;
- background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
- border-radius: 16px;
- padding: 16px;
- gap: 12px;
- position: relative;
- border: 1px solid #e6f7ff;
- box-shadow: 0 4px 12px rgba(0, 108, 251, 0.08);
- transition: all 0.3s ease;
- }
-
- .approver-avatar {
- width: 48px;
- height: 48px;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- position: relative;
- box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
- }
-
- .avatar-text {
- color: #fff;
- font-size: 18px;
- font-weight: 600;
- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
- }
-
- .approver-info {
- flex: 1;
- position: relative;
- }
-
- .approver-name {
- display: block;
- font-size: 16px;
- color: #333;
- font-weight: 500;
- position: relative;
- }
-
- .approver-dept {
- font-size: 12px;
- color: #999;
- background: rgba(0, 108, 251, 0.05);
- padding: 2px 8px;
- border-radius: 8px;
- display: inline-block;
- position: relative;
-
- &::before {
- content: "";
- position: absolute;
- left: 4px;
- top: 50%;
- transform: translateY(-50%);
- width: 2px;
- height: 2px;
- background: #006cfb;
- border-radius: 50%;
- }
- }
-
- .delete-approver-btn {
- font-size: 16px;
- color: #ff4d4f;
- background: linear-gradient(
- 135deg,
- rgba(255, 77, 79, 0.1) 0%,
- rgba(255, 77, 79, 0.05) 100%
- );
- width: 28px;
- height: 28px;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- transition: all 0.3s ease;
- position: relative;
- }
-
- .add-approver-btn {
- display: flex;
- align-items: center;
- justify-content: center;
- background: linear-gradient(135deg, #f0f8ff 0%, #e6f7ff 100%);
- border: 2px dashed #006cfb;
- border-radius: 16px;
- padding: 20px;
- color: #006cfb;
- font-size: 14px;
- position: relative;
- transition: all 0.3s ease;
-
- &::before {
- content: "";
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%);
- width: 32px;
- height: 32px;
- border: 2px solid #006cfb;
- border-radius: 50%;
- opacity: 0;
- transition: all 0.3s ease;
- }
- }
-
- .delete-step-btn {
- color: #ff4d4f;
- font-size: 12px;
- background: linear-gradient(
- 135deg,
- rgba(255, 77, 79, 0.1) 0%,
- rgba(255, 77, 79, 0.05) 100%
- );
- padding: 6px 12px;
- border-radius: 12px;
- display: inline-block;
- position: relative;
- transition: all 0.3s ease;
-
- &::before {
- content: "";
- position: absolute;
- left: 6px;
- top: 50%;
- transform: translateY(-50%);
- width: 4px;
- height: 4px;
- background: #ff4d4f;
- border-radius: 50%;
- }
- }
-
- .step-line {
- display: none; // 闅愯棌鍘熸潵鐨勭嚎鏉★紝浣跨敤浼厓绱犱唬鏇�
- }
-
- .add-step-btn {
- display: flex;
- align-items: center;
- justify-content: center;
+ .account-detail {
+ background-color: #fff;
}
.footer-btns {
position: fixed;
@@ -809,121 +736,5 @@
background: linear-gradient(140deg, #00baff 0%, #006cfb 100%);
box-shadow: 0 0.25rem 0.625rem 0 rgba(3, 88, 185, 0.2);
border-radius: 2.5rem 2.5rem 2.5rem 2.5rem;
- }
-
- // 鍔ㄧ敾瀹氫箟
- @keyframes pulse {
- 0% {
- transform: scale(1);
- opacity: 1;
- }
- 50% {
- transform: scale(1.2);
- opacity: 0.7;
- }
- 100% {
- transform: scale(1);
- opacity: 1;
- }
- }
-
- @keyframes rotate {
- 0% {
- transform: rotate(0deg);
- }
- 100% {
- transform: rotate(360deg);
- }
- }
-
- @keyframes ripple {
- 0% {
- transform: translate(-50%, -50%) scale(0.8);
- opacity: 1;
- }
- 100% {
- transform: translate(-50%, -50%) scale(1.6);
- opacity: 0;
- }
- }
-
- /* 濡傛灉宸叉湁 .step-line锛岃繖閲屾洿绮惧噯瀹氫綅鍒板乏渚т笌灏忓渾鐐瑰榻� */
- .step-line {
- position: absolute;
- left: 4px;
- top: 48px;
- width: 2px;
- height: calc(100% - 48px);
- background: #e5e7eb;
- }
-
- .approver-container {
- display: flex;
- align-items: center;
- background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
- border-radius: 16px;
- gap: 12px;
- padding: 10px 0;
- background: transparent;
- border: none;
- box-shadow: none;
- }
-
- .approver-item {
- display: flex;
- align-items: center;
- gap: 12px;
- padding: 8px 10px;
- background: transparent;
- border: none;
- box-shadow: none;
- border-radius: 0;
- }
-
- .approver-avatar {
- position: relative;
- width: 40px;
- height: 40px;
- border-radius: 50%;
- background: #f3f4f6;
- border: 2px solid #e5e7eb;
- display: flex;
- align-items: center;
- justify-content: center;
- animation: none; /* 绂佺敤鏃嬭浆绛夊姩鐢伙紝鍥炲綊绠�娲� */
- }
-
- .avatar-text {
- font-size: 14px;
- color: #374151;
- font-weight: 600;
- }
-
- .add-approver-btn {
- display: flex;
- align-items: center;
- gap: 8px;
- background: transparent;
- border: none;
- box-shadow: none;
- padding: 0;
- }
-
- .add-approver-btn .add-circle {
- width: 40px;
- height: 40px;
- border: 2px dashed #a0aec0;
- border-radius: 50%;
- color: #6b7280;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 22px;
- line-height: 1;
- }
-
- .add-approver-btn .add-label {
- color: #3b82f6;
- font-size: 14px;
}
</style>
\ No newline at end of file
diff --git a/src/pages/cooperativeOffice/collaborativeApproval/index.vue b/src/pages/cooperativeOffice/collaborativeApproval/index.vue
index bc69a5f..910cdc3 100644
--- a/src/pages/cooperativeOffice/collaborativeApproval/index.vue
+++ b/src/pages/cooperativeOffice/collaborativeApproval/index.vue
@@ -97,13 +97,20 @@
</view>
<view class="detail-row">
<view class="actions">
- <!-- <u-button type="primary"
+ <u-button type="primary"
size="small"
class="action-btn edit"
- :disabled="item.approveStatus == 2 || item.approveStatus == 1 || item.approveStatus == 4 || item.approveStatus == 8"
+ v-if="!(item.approveStatus == 2 || item.approveStatus == 1 || item.approveStatus == 4 || item.approveStatus == 8 || item.approveType == 5 || item.approveType == 6 || item.approveType == 7)"
@click="handleItemClick(item)">
缂栬緫
- </u-button> -->
+ </u-button>
+ <u-button type="info"
+ v-if="item.approveType == 5 || item.approveType == 6 || item.approveType == 7"
+ size="small"
+ class="action-btn detail"
+ @click="handleDetailClick(item)">
+ 璇︽儏
+ </u-button>
<u-button type="success"
size="small"
class="action-btn approve"
@@ -123,13 +130,13 @@
<text>鏆傛棤瀹℃壒鏁版嵁</text>
</view>
<!-- 娴姩鎿嶄綔鎸夐挳 -->
- <!-- <view class="fab-button"
+ <view class="fab-button"
v-if="props.approveType != 5 && props.approveType != 6 && props.approveType != 7"
@click="handleAdd">
<up-icon name="plus"
size="24"
color="#ffffff"></up-icon>
- </view> -->
+ </view>
</view>
</template>
@@ -262,6 +269,17 @@
});
};
+ // 鏌ョ湅璇︽儏
+ const handleDetailClick = item => {
+ uni.setStorageSync("invoiceLedgerEditRow", JSON.stringify(item));
+ uni.setStorageSync("operationType", "detail");
+ uni.setStorageSync("approveId", item.approveId);
+ uni.setStorageSync("approveType", props.approveType);
+ uni.navigateTo({
+ url: "/pages/cooperativeOffice/collaborativeApproval/detail",
+ });
+ };
+
// 娣诲姞鏂拌褰�
const handleAdd = () => {
uni.setStorageSync("operationType", "add");
--
Gitblit v1.9.3