From 7ed2a032d0724e68aec8af940f2ce0023a9f0eb7 Mon Sep 17 00:00:00 2001
From: sen <sen@qq.com>
Date: 星期三, 15 四月 2026 09:27:51 +0800
Subject: [PATCH] 修改调度单年月日
---
ui/car_wx_app/pages/signContract/index.vue | 428 +++++++++++++++++++++++++++++++----------------------
1 files changed, 250 insertions(+), 178 deletions(-)
diff --git a/ui/car_wx_app/pages/signContract/index.vue b/ui/car_wx_app/pages/signContract/index.vue
index 8268862..a7a5ac7 100644
--- a/ui/car_wx_app/pages/signContract/index.vue
+++ b/ui/car_wx_app/pages/signContract/index.vue
@@ -1,250 +1,322 @@
<template>
- <view class="promise-container">
- <!-- 澶撮儴瀵艰埅 -->
- <Nav title="绛剧讲鎵胯涔�" customBack="pages/beReferred/index"></Nav>
+ <view class="container">
+ <!-- Nav 杩斿洖鐢� goBack 鎺ョ锛屼笌搴曢儴鍙栨秷鎸夐挳琛屼负涓�鑷� -->
+ <Nav title="绛剧讲鎵胯涔�" @back="goBack" />
- <!-- 鎻愮ず淇℃伅 -->
- <view class="tip-box">
- <text class="tip-text">鍙戣溅鍓嶏紝鎮ㄩ渶瑕佺缃蹭互涓嬫枃浠讹細</text>
- <text class="progress-text">(褰撳墠杩涘害{{numberFrom.number}}/2)</text>
- <u-icon name="close" size="24" color="#999" class="close-btn" @click="onCloseTip"></u-icon>
+ <!-- 杩涘害鎻愮ず鍗$墖 -->
+ <view class="progress-card">
+ <view class="progress-header">
+ <view class="progress-icon-wrap">
+ <u-icon name="edit-pen" size="20" color="#fff" />
+ </view>
+ <view class="progress-info">
+ <text class="progress-title">鍙戣溅鍓嶇缃�</text>
+ <text class="progress-desc">璇峰畬鎴愪互涓嬫壙璇轰功绛剧讲鍚庢柟鍙彂杞�</text>
+ </view>
+ </view>
+ <view class="progress-bar-wrap">
+ <view class="progress-bar">
+ <view class="progress-fill" :style="{ width: progressPercent + '%' }" />
+ </view>
+ <text class="progress-num">{{ completedCount }}/{{ promiseList.length }}</text>
+ </view>
</view>
<!-- 鎵胯涔﹀垪琛� -->
+ <view class="section-title">绛剧讲鏂囦欢</view>
<view class="promise-list">
- <view class="promise-item" @click="goToSign(1)">
+ <view
+ v-for="item in promiseList"
+ :key="item.id"
+ class="promise-item"
+ :class="{ 'item-completed': item.completed }"
+ @tap="goToSign(item)"
+ >
<view class="item-left">
- <text class="item-title">璐ц溅鍙告満鍑鸿溅鍓嶅仴搴锋壙璇轰功</text>
- <text class="item-status">({{numberFrom.status}})</text>
+ <view class="item-check" :class="{ checked: item.completed }">
+ <u-icon :name="item.completed ? 'checkmark' : 'edit-pen'" :size="item.completed ? 14 : 16" color="#fff" />
+ </view>
+ <view class="item-content">
+ <text class="item-title">{{ item.title }}</text>
+ <text class="item-status" :class="{ completed: item.completed }">
+ {{ item.completed ? '宸茬缃�' : '寰呯缃�' }}
+ </text>
+ </view>
</view>
- <u-icon name="arrow-right" size="24" color="#ccc"></u-icon>
- </view>
-
- <view class="promise-item" @click="goToSign(2)">
- <view class="item-left">
- <text class="item-title">閬电邯瀹堟硶鎵胯涔�</text>
- <text class="item-status">({{numberFrom.status}})</text>
+ <view class="item-right">
+ <text v-if="!item.completed" class="go-sign">鍘荤缃�</text>
+ <u-icon name="arrow-right" size="18" :color="item.completed ? '#c0c4cc' : '#4285f4'" />
</view>
- <u-icon name="arrow-right" size="24" color="#ccc"></u-icon>
</view>
</view>
<!-- 搴曢儴鎸夐挳 -->
- <view class="bottom-btn-group">
- <u-button class="confirm-btn" @click="onCancel" text="鍙栨秷"></u-button>
- <!-- <u-button class="confirm-btn" >鍙戣溅</u-button> -->
- <!-- <u-button class="confirm-btn" @click="submitForm" :disabled="signStatus" type="primary" text="鍙戣溅"></u-button> -->
+ <view class="bottom-bar">
+ <button class="cancel-btn" @tap="goBack">杩斿洖涓婁竴椤�</button>
</view>
</view>
</template>
<script>
+const PROMISE_CONFIG = Object.freeze([
+ { id: 1, title: '璐ц溅鍙告満鍑鸿溅鍓嶅仴搴锋壙璇轰功', path: '/pages/acknowledgement/index' },
+ { id: 2, title: '閬电邯瀹堟硶鎵胯涔�', path: '/pages/observeLaw/index' }
+])
+
export default {
data() {
return {
- // 鍙牴鎹疄闄呯缃叉儏鍐典慨鏀圭姸鎬�
- signStatus: true,
- numberFrom: {
- number:0,
- status:'鏈畬鎴�'
- },
- receivedForm: {}
- };
+ isCompleted: false
+ }
},
-
- onLoad(options) {
- if(options.uploadIshow=='true'){
- this.numberFrom= {
- number:2,
- status:'瀹屾垚'
- }
- }else {
- this.numberFrom= {
- number:0,
- status:'鏈畬鎴�'
- }
- }
+
+ computed: {
+ promiseList() {
+ return PROMISE_CONFIG.map(item => ({
+ ...item,
+ completed: this.isCompleted
+ }))
},
+ completedCount() {
+ return this.isCompleted ? PROMISE_CONFIG.length : 0
+ },
+ progressPercent() {
+ return (this.completedCount / PROMISE_CONFIG.length) * 100
+ }
+ },
+
+ onLoad(options) {
+ this.isCompleted = options?.uploadIshow === 'true'
+ },
+
methods: {
- // 杩斿洖涓婁竴椤�
- onBack() {
- uni.navigateBack({
- delta: 1
- });
+ goToSign(item) {
+ uni.navigateTo({ url: item.path })
},
-
- // 鍏抽棴鎻愮ず妗�
- onCloseTip() {
- // 瀹為檯椤圭洰涓彲闅愯棌鎻愮ず妗�
- // this.$refs.tipBox.style.display = 'none';
- },
-
- // 鍓嶅線绛剧讲椤甸潰
- goToSign(index) {
- if (index === 1) {
- uni.navigateTo({
- url: `/pages/acknowledgement/index`
- });
- return;
- } else if (index == 2) {
- uni.navigateTo({
- url: `/pages/observeLaw/index`
- });
+ /**
+ * 瀹夊叏杩斿洖鍒颁笂浼犺绋嬮〉锛坋xamine锛�
+ * 浠庨〉闈㈡爤涓煡鎵� examine 椤甸潰锛岃绠楁纭殑 delta 鍥為��
+ * 閬垮厤鎵胯涔﹂〉闈� navigateTo 瀵艰嚧鐨勬爤鍫嗙Н姝诲惊鐜�
+ */
+ goBack() {
+ const pages = getCurrentPages()
+ // 浠庢爤搴曞線涓婃壘 examine 椤甸潰
+ for (let i = pages.length - 2; i >= 0; i--) {
+ if (pages[i].route && pages[i].route.includes('pages/examine')) {
+ uni.navigateBack({ delta: pages.length - 1 - i })
+ return
+ }
}
-
- },
-
- // 鍙栨秷鎿嶄綔
- onCancel() {
- uni.navigateBack({
- delta: 1
- });
- },
- submitForm() {
- /* 鑾峰彇 */
- const form = uni.getStorageSync("signContractForm");
- console.log("鎻愪氦鐨勮〃鍗曟暟鎹細", form);
- // 鍦ㄨ繖閲屽彲浠ユ坊鍔犳彁浜よ〃鍗曟暟鎹殑閫昏緫
- // 2. 璇诲彇鍚庢竻闄ょ紦瀛橈紙閬垮厤鏁版嵁娈嬬暀锛屾寜闇�閫夋嫨锛�
- // uni.removeStorageSync("signContractForm");
- uni.$u.toast('琛ㄥ崟宸叉彁浜�');
- },
-
- },
-
-
-};
+ // 鍏滃簳锛氱洿鎺ヨ繑鍥炰笂涓�椤�
+ uni.navigateBack({ delta: 1 })
+ }
+ }
+}
</script>
<style scoped>
-.promise-container {
- width: 100%;
- min-height: 100vh;
- background-color: #f5f5f5;
+.container {
+ display: flex;
+ flex-direction: column;
+ height: 100vh;
+ background-color: #f5f7fa;
+}
+
+/* 杩涘害鍗$墖 */
+.progress-card {
+ margin: 24rpx 24rpx 0;
+ padding: 32rpx;
+ background: linear-gradient(135deg, #4285f4 0%, #5b9ef4 100%);
+ border-radius: 20rpx;
+ box-shadow: 0 8rpx 24rpx rgba(66, 133, 244, 0.3);
+}
+
+.progress-header {
+ display: flex;
+ align-items: center;
+ margin-bottom: 28rpx;
+}
+
+.progress-icon-wrap {
+ width: 72rpx;
+ height: 72rpx;
+ border-radius: 50%;
+ background-color: rgba(255, 255, 255, 0.25);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-right: 20rpx;
+ flex-shrink: 0;
+}
+
+.progress-info {
display: flex;
flex-direction: column;
}
-/* 瀵艰埅鏍忔牱寮� */
-.nav-bar {
- height: 88rpx;
+.progress-title {
+ font-size: 34rpx;
+ font-weight: 600;
+ color: #fff;
+ margin-bottom: 6rpx;
+}
+
+.progress-desc {
+ font-size: 24rpx;
+ color: rgba(255, 255, 255, 0.8);
+}
+
+.progress-bar-wrap {
+ display: flex;
+ align-items: center;
+}
+
+.progress-bar {
+ flex: 1;
+ height: 12rpx;
+ background-color: rgba(255, 255, 255, 0.3);
+ border-radius: 6rpx;
+ overflow: hidden;
+ margin-right: 16rpx;
+}
+
+.progress-fill {
+ height: 100%;
background-color: #fff;
- display: flex;
- align-items: center;
- padding: 0 30rpx;
- border-bottom: 1rpx solid #eee;
+ border-radius: 6rpx;
+ transition: width 0.4s ease;
}
-.back-btn {
- width: 40rpx;
- height: 40rpx;
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-.nav-title {
- flex: 1;
- text-align: center;
- font-size: 36rpx;
+.progress-num {
+ font-size: 26rpx;
+ color: #fff;
font-weight: 500;
- color: #333;
+ flex-shrink: 0;
}
-/* 鎻愮ず妗嗘牱寮� */
-.tip-box {
- background-color: #fffbe6;
- border-radius: 16rpx;
- padding: 24rpx 30rpx;
- margin: 20rpx;
- display: flex;
- align-items: center;
- position: relative;
-}
-
-.tip-text {
+/* 鍒嗗尯鏍囬 */
+.section-title {
font-size: 28rpx;
- color: #fa8c16;
- line-height: 1.5;
+ color: #909399;
+ padding: 28rpx 36rpx 16rpx;
}
-.progress-text {
- font-size: 28rpx;
- color: #fa8c16;
- margin-left: 10rpx;
-}
-
-.close-btn {
- position: absolute;
- right: 24rpx;
- top: 50%;
- transform: translateY(-50%);
-}
-
-/* 鎵胯涔﹀垪琛ㄦ牱寮� */
+/* 鎵胯涔﹀垪琛� */
.promise-list {
- flex: 1;
- margin-top: 10rpx;
+ margin: 0 24rpx;
+ border-radius: 16rpx;
+ overflow: hidden;
+ background-color: #fff;
+ box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
}
.promise-item {
- background-color: #fff;
- height: 120rpx;
display: flex;
align-items: center;
- padding: 0 30rpx;
- border-bottom: 1rpx solid #f5f5f5;
justify-content: space-between;
+ padding: 32rpx;
+ position: relative;
+}
+
+.promise-item + .promise-item {
+ border-top: 1rpx solid #f2f3f5;
+}
+
+.promise-item:active {
+ background-color: #f5f7fa;
}
.item-left {
display: flex;
- flex-direction: column;
+ align-items: center;
+ flex: 1;
+ min-width: 0;
+}
+
+.item-check {
+ width: 56rpx;
+ height: 56rpx;
+ border-radius: 50%;
+ background-color: #e6e8eb;
+ display: flex;
+ align-items: center;
justify-content: center;
+ margin-right: 24rpx;
+ flex-shrink: 0;
+ transition: background-color 0.3s;
+}
+
+.item-check.checked {
+ background-color: #52c41a;
+}
+
+.item-content {
+ display: flex;
+ flex-direction: column;
+ min-width: 0;
}
.item-title {
- font-size: 32rpx;
- color: #333;
+ font-size: 30rpx;
+ color: #303133;
+ font-weight: 500;
margin-bottom: 8rpx;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
}
.item-status {
- font-size: 26rpx;
- color: #ff4d4f;
+ font-size: 24rpx;
+ color: #ff6b6b;
}
-/* 搴曢儴鎸夐挳鏍峰紡 */
-.bottom-btn-group {
- padding: 30rpx;
- background-color: #fff;
+.item-status.completed {
+ color: #52c41a;
+}
+
+.item-completed .item-title {
+ color: #909399;
+}
+
+.item-right {
display: flex;
- gap: 20rpx;
+ align-items: center;
+ flex-shrink: 0;
+ margin-left: 16rpx;
+}
+
+.go-sign {
+ font-size: 24rpx;
+ color: #4285f4;
+ margin-right: 8rpx;
+}
+
+/* 搴曢儴鎸夐挳 */
+.bottom-bar {
+ padding: 24rpx 24rpx;
+ padding-bottom: calc(24rpx + env(safe-area-inset-bottom));
+ background-color: #fff;
+ box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.04);
}
.cancel-btn {
- flex: 1;
- height: 96rpx;
- line-height: 96rpx;
- font-size: 32rpx;
- background-color: #f5f5f5;
- color: #333;
- border-radius: 16rpx;
+ width: 100%;
+ height: 88rpx;
+ line-height: 88rpx;
+ font-size: 30rpx;
+ background-color: #f5f7fa;
+ color: #606266;
+ border-radius: 12rpx;
+ border: none;
+ font-weight: 500;
}
-.confirm-btn {
- flex: 1;
- height: 96rpx;
- line-height: 96rpx;
- font-size: 32rpx;
- background-color: #1677ff;
- color: #fff;
- border-radius: 16rpx;
+.cancel-btn::after {
+ border: none;
}
-/* 绂佺敤鐘舵�佹牱寮� */
-.confirm-btn[disabled] {
- background-color: #8ec5fc;
- opacity: 0.6;
+.cancel-btn:active {
+ background-color: #e8eaed;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.8.0