<template>
|
<view class="promise-container">
|
<!-- 头部导航 -->
|
<Nav title="签署承诺书" customBack="pages/beReferred/index"></Nav>
|
|
<!-- 提示信息 -->
|
<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>
|
|
<!-- 承诺书列表 -->
|
<view class="promise-list">
|
<view class="promise-item" @click="goToSign(1)">
|
<view class="item-left">
|
<text class="item-title">货车司机出车前健康承诺书</text>
|
<text class="item-status">({{numberFrom.status}})</text>
|
</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>
|
<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>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
// 可根据实际签署情况修改状态
|
signStatus: true,
|
numberFrom: {
|
number:0,
|
status:'未完成'
|
},
|
receivedForm: {}
|
};
|
},
|
|
onLoad(options) {
|
if(options.uploadIshow=='true'){
|
this.numberFrom= {
|
number:2,
|
status:'完成'
|
}
|
}else {
|
this.numberFrom= {
|
number:0,
|
status:'未完成'
|
}
|
}
|
},
|
methods: {
|
// 返回上一页
|
onBack() {
|
uni.navigateBack({
|
delta: 1
|
});
|
},
|
|
// 关闭提示框
|
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`
|
});
|
}
|
|
},
|
|
// 取消操作
|
onCancel() {
|
uni.navigateBack({
|
delta: 1
|
});
|
},
|
submitForm() {
|
/* 获取 */
|
const form = uni.getStorageSync("signContractForm");
|
console.log("提交的表单数据:", form);
|
// 在这里可以添加提交表单数据的逻辑
|
// 2. 读取后清除缓存(避免数据残留,按需选择)
|
// uni.removeStorageSync("signContractForm");
|
uni.$u.toast('表单已提交');
|
},
|
|
},
|
|
|
};
|
</script>
|
|
<style scoped>
|
.promise-container {
|
width: 100%;
|
min-height: 100vh;
|
background-color: #f5f5f5;
|
display: flex;
|
flex-direction: column;
|
}
|
|
/* 导航栏样式 */
|
.nav-bar {
|
height: 88rpx;
|
background-color: #fff;
|
display: flex;
|
align-items: center;
|
padding: 0 30rpx;
|
border-bottom: 1rpx solid #eee;
|
}
|
|
.back-btn {
|
width: 40rpx;
|
height: 40rpx;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
}
|
|
.nav-title {
|
flex: 1;
|
text-align: center;
|
font-size: 36rpx;
|
font-weight: 500;
|
color: #333;
|
}
|
|
/* 提示框样式 */
|
.tip-box {
|
background-color: #fffbe6;
|
border-radius: 16rpx;
|
padding: 24rpx 30rpx;
|
margin: 20rpx;
|
display: flex;
|
align-items: center;
|
position: relative;
|
}
|
|
.tip-text {
|
font-size: 28rpx;
|
color: #fa8c16;
|
line-height: 1.5;
|
}
|
|
.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;
|
}
|
|
.promise-item {
|
background-color: #fff;
|
height: 120rpx;
|
display: flex;
|
align-items: center;
|
padding: 0 30rpx;
|
border-bottom: 1rpx solid #f5f5f5;
|
justify-content: space-between;
|
}
|
|
.item-left {
|
display: flex;
|
flex-direction: column;
|
justify-content: center;
|
}
|
|
.item-title {
|
font-size: 32rpx;
|
color: #333;
|
margin-bottom: 8rpx;
|
}
|
|
.item-status {
|
font-size: 26rpx;
|
color: #ff4d4f;
|
}
|
|
/* 底部按钮样式 */
|
.bottom-btn-group {
|
padding: 30rpx;
|
background-color: #fff;
|
display: flex;
|
gap: 20rpx;
|
}
|
|
.cancel-btn {
|
flex: 1;
|
height: 96rpx;
|
line-height: 96rpx;
|
font-size: 32rpx;
|
background-color: #f5f5f5;
|
color: #333;
|
border-radius: 16rpx;
|
}
|
|
.confirm-btn {
|
flex: 1;
|
height: 96rpx;
|
line-height: 96rpx;
|
font-size: 32rpx;
|
background-color: #1677ff;
|
color: #fff;
|
border-radius: 16rpx;
|
}
|
|
/* 禁用状态样式 */
|
.confirm-btn[disabled] {
|
background-color: #8ec5fc;
|
opacity: 0.6;
|
}
|
</style>
|