From d30a31e7c2a9acd08da8983e42e6fdf014707a04 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 26 九月 2025 15:39:47 +0800
Subject: [PATCH] 打包修改
---
src/pages/cooperativeOffice/collaborativeApproval/index.vue | 259 +++++++++------------------------------------------
1 files changed, 46 insertions(+), 213 deletions(-)
diff --git a/src/pages/cooperativeOffice/collaborativeApproval/index.vue b/src/pages/cooperativeOffice/collaborativeApproval/index.vue
index 180b802..8aab757 100644
--- a/src/pages/cooperativeOffice/collaborativeApproval/index.vue
+++ b/src/pages/cooperativeOffice/collaborativeApproval/index.vue
@@ -5,13 +5,14 @@
<PageHeader title="瀹℃壒绠$悊" @back="goBack" />
<!-- 鎼滅储鍜岀瓫閫夊尯鍩� -->
- <view class="search-filter-section">
+ <view class="search-section">
<view class="search-bar">
<view class="search-input">
- <input
+ <up-input
class="search-text"
placeholder="璇疯緭鍏ユ祦绋嬬紪鍙�"
v-model="searchForm.approveId"
+ clearable
/>
</view>
<view class="search-button" @click="getList">
@@ -31,27 +32,8 @@
</view>
<text class="item-id">{{ item.approveId }}</text>
</view>
- <!-- 瀹℃壒鐘舵�佹爣绛� -->
- <u-tag :type="getTagClass(item.approveStatus)" size="medium">{{ formatReceiptType(item.approveStatus) }}</u-tag>
-
- <!-- 鎿嶄綔鎸夐挳 -->
- <view class="action-buttons">
- <u-button
- type="primary"
- size="small"
- class="action-btn"
- @click="openDetail(item)"
- >
- 鏌ョ湅璇︽儏
- </u-button>
- <u-button
- type="success"
- size="small"
- class="action-btn"
- @click="approve(item)"
- >
- 瀹℃壒
- </u-button>
+ <view class="item-tag">
+ <u-tag :type="getTagClass(item.approveStatus)">{{ formatReceiptType(item.approveStatus) }}</u-tag>
</view>
</view>
<up-divider></up-divider>
@@ -89,24 +71,24 @@
</view>
<view class="detail-row">
<view class="actions">
- <van-button
+ <u-button
type="primary"
size="small"
class="action-btn edit"
:disabled="item.approveStatus == 2 || item.approveStatus == 1 || item.approveStatus == 4"
@click="handleItemClick(item)"
>
- 缂栬緫
- </van-button>
- <van-button
+ 缂栬緫
+ </u-button>
+ <u-button
type="success"
size="small"
class="action-btn approve"
:disabled="item.approveUserCurrentId == null || item.approveStatus == 2 || item.approveStatus == 3 || item.approveStatus == 4 || item.approveUserCurrentId !== userStore.id"
@click="approve(item)"
>
- 瀹℃牳
- </van-button>
+ 瀹℃牳
+ </u-button>
</view>
</view>
</view>
@@ -151,6 +133,7 @@
};
// 鏌ヨ鍒楄〃
const getList = () => {
+ showLoadingToast('鍔犺浇涓�...')
const page = {
current: -1,
size: -1,
@@ -160,11 +143,25 @@
})
.then((res) => {
ledgerList.value = res.data.records;
+ closeToast()
})
.catch(() => {
- // tableLoading.value = false;
+ closeToast()
});
};
+ // 鏄剧ず鍔犺浇鎻愮ず
+ const showLoadingToast = (message) => {
+ uni.showLoading({
+ title: message,
+ mask: true
+ });
+ };
+
+ // 鍏抽棴鎻愮ず
+ const closeToast = () => {
+ uni.hideLoading();
+ };
+
// 鏄剧ず绛涢�夐�夐」
const showFilterOptions = () => {
uni.showActionSheet({
@@ -199,7 +196,7 @@
} else if (type == 4) {
return "primary";
} else {
- return "danger";
+ return "error";
}
};
@@ -207,21 +204,25 @@
const handleItemClick = (item) => {
// 浣跨敤鏈湴瀛樺偍浼犻�掓暟鎹�
uni.setStorageSync('invoiceLedgerEditRow', JSON.stringify(item));
+ uni.setStorageSync('operationType', 'edit');
+ uni.setStorageSync('approveId', item.approveId);
uni.navigateTo({
- url: `/pages/cooperativeOffice/collaborativeApproval/detail?operationType=edit&approveId=${item.approveId}`,
+ url: "/pages/cooperativeOffice/collaborativeApproval/detail",
});
};
// 娣诲姞鏂拌褰�
const handleAdd = () => {
+ uni.setStorageSync('operationType', 'add');
uni.navigateTo({
- url: "/pages/cooperativeOffice/collaborativeApproval/detail?operationType=add",
+ url: "/pages/cooperativeOffice/collaborativeApproval/detail",
});
};
// 鐐瑰嚮瀹℃牳
const approve = (item) => {
+ uni.setStorageSync('approveId', item.approveId);
uni.navigateTo({
- url: `/pages/cooperativeOffice/collaborativeApproval/approve?approveId=${item.approveId}`
+ url: "/pages/cooperativeOffice/collaborativeApproval/approve"
})
}
@@ -232,178 +233,34 @@
</script>
<style scoped lang="scss">
+ @import "../../../styles/sales-common.scss";
+
.u-divider {
margin: 0 !important;
}
- .sales-account {
- min-height: 100vh;
- background: #f8f9fa;
- position: relative;
- }
- .search-input {
- flex: 1;
- background: #f5f5f5;
- border-radius: 24px;
- padding: 10px 16px;
- display: flex;
- align-items: center;
- gap: 8px;
- }
- .search-text {
- flex: 1;
- font-size: 14px;
- color: #333;
- background: transparent;
- border: none;
- outline: none;
- }
-
- .search-text::placeholder {
- color: #999;
- }
-
-
- .search-filter-section {
- padding: 10px 20px;
- background: #ffffff;
- }
-
- .search-bar {
- display: flex;
- align-items: center;
- gap: 12px;
- }
-
- .search-input {
- flex: 1;
- background: #f5f5f5;
- border-radius: 24px;
- padding: 10px 16px;
- display: flex;
- align-items: center;
- gap: 8px;
- }
- .search-text {
- flex: 1;
- font-size: 14px;
- color: #333;
- background: transparent;
- border: none;
- outline: none;
- }
-
- .search-text::placeholder {
- color: #999;
- }
-
- .filter-button {
- width: 40px;
- height: 40px;
- border-radius: 8px;
- display: flex;
- align-items: center;
- justify-content: center;
- }
-
- .ledger-list {
- padding: 20px;
- }
-
- .ledger-item {
- background: #ffffff;
- border-radius: 12px;
- margin-bottom: 16px;
- overflow: hidden;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
- padding: 0 16px;
- }
-
- .item-header {
- padding: 16px 0;
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
-
- .item-left {
- display: flex;
- align-items: center;
- gap: 8px;
- }
-
+ // 鏂囨。鍥炬爣鏍峰紡 - 瑕嗙洊鍏叡鏍峰紡涓殑鑳屾櫙鑹�
.document-icon {
- width: 24px;
- height: 24px;
background: #ed8d05;
- border-radius: 4px;
- display: flex;
- align-items: center;
- justify-content: center;
}
- .item-id {
- font-size: 14px;
- color: #333;
- font-weight: 500;
+ // 娴姩鎸夐挳鏍峰紡 - 瑕嗙洊鍏叡鏍峰紡涓殑鑳屾櫙鑹�
+ .fab-button {
+ background: #ed8d05;
}
- .item-tag {
- border-radius: 4px;
- padding: 2px 4px;
- }
-
- .tag-text {
- font-size: 11px;
- color: #ffffff;
- font-weight: 500;
- }
-
- .item-details {
- padding: 16px 0;
- }
-
- .detail-row {
- display: flex;
- align-items: flex-end;
- justify-content: space-between;
- margin-bottom: 8px;
-
- &:last-child {
- margin-bottom: 0;
- }
- }
+ // 鐗规湁鏍峰紡
.detail-row-user {
display: flex;
align-items: center;
justify-content: space-between;
}
+
.detail-row-approveReason {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 8px;
- }
-
- .detail-info {
- margin-top: 10px;
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- }
-
- .detail-label {
- font-size: 12px;
- color: #777777;
- min-width: 60px;
- }
-
- .detail-value {
- font-size: 12px;
- color: #000000;
- text-align: right;
- flex: 1;
- margin-left: 16px;
}
.detail-value.highlightBlue {
@@ -416,31 +273,11 @@
font-weight: 500;
}
- .no-data {
- padding: 40px 0;
- text-align: center;
- color: #999;
- }
-
- .fab-button {
- position: fixed;
- bottom: 30px;
- right: 30px;
- width: 56px;
- height: 56px;
- background: #ed8d05;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- box-shadow: 0 4px 16px rgba(41, 121, 255, 0.3);
- z-index: 1000;
- }
-
.approver-value {
display: flex;
justify-content: flex-end;
}
+
.approver-chip {
display: inline-flex;
align-items: center;
@@ -452,6 +289,7 @@
padding: 4px 10px;
max-width: 100%;
}
+
.approver-name {
font-size: 12px;
color: #2b7cff;
@@ -473,10 +311,5 @@
line-height: 28px;
padding: 0 12px;
}
- .action-btn.edit {
- /* primary 鏍峰紡鏉ヨ嚜缁勪欢锛岃繖閲屼繚鐣欓挬瀛愪互渚垮悗缁渶瑕佹墿灞� */
- }
- .action-btn.approve {
- /* success 鏍峰紡鏉ヨ嚜缁勪欢锛岃繖閲屼繚鐣欓挬瀛愪互渚垮悗缁渶瑕佹墿灞� */
- }
+
</style>
\ No newline at end of file
--
Gitblit v1.9.3