sen
1 天以前 5abcde36961125cbf436f91b8c17610a6b5f8308
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<template>
  <view class="container">
    <Nav title="签署健康承诺书" customBack="pages/signContract/index" />
 
    <scroll-view class="content-scroll" scroll-y>
      <view class="agreement-content">
        <text class="title">{{ agreementContent.title }}</text>
        <text class="intro">{{ agreementContent.intro }}</text>
        <view v-for="(section, i) in agreementContent.sections" :key="i" class="section">
          <text class="section-title">{{ section.title }}</text>
          <text v-for="(p, j) in section.paragraphs" :key="j" class="paragraph">{{ j + 1 }}. {{ p }}</text>
        </view>
        <text class="footer">{{ agreementContent.footer }}</text>
        <text class="ending">{{ agreementContent.ending }}</text>
        <view class="signature">
          <text v-for="(line, i) in agreementContent.signature" :key="i" class="sign-line">{{ line }}</text>
        </view>
      </view>
    </scroll-view>
 
    <!-- 底部固定栏 -->
    <view class="bottom-fixed">
      <view class="agree-area">
        <label class="checkbox-group" @tap="toggleAgree">
          <checkbox :checked="isAgreed" color="#1677ff" />
          <text class="agree-text">我已阅读并理解上述内容,自愿签署</text>
          <text class="required">*</text>
        </label>
      </view>
      <view class="btn-group">
        <button class="cancel-btn" @tap="navigateBack">取消</button>
        <button
          class="next-btn"
          :class="{ disabled: !isAgreed }"
          :disabled="!isAgreed || loading"
          @tap="goToNextStep"
        >
          {{ loading ? '处理中...' : '下一步' }}
        </button>
      </view>
    </view>
  </view>
</template>
 
<script>
// ============ 承诺书内容配置 ============
const AGREEMENT_CONTENT = {
  title: '货车司机出车前健康承诺书',
  intro: '本人 [ ],身份证号 [ ],系 [珠海汇畅/海港货运]公司的货车司机。为确保行车安全,保障自己及他人的生命财产安全,现就本次出车前的身体健康状况作出如下承诺:',
  sections: [
    {
      title: '一、身体基本状况',
      paragraphs: [
        '本人目前无任何疾病症状,未出现发热、咳嗽、头晕、胸闷、心慌、呼吸困难、肢体麻木、关节疼痛等可能影响驾驶安全的情况,身体各项机能正常,无任何可能导致突发疾病的安全隐患。',
        '本人无高血压、心脏病、癫痫等可能影响安全驾驶的慢性疾病或家族遗传病史。如有相关病史,本人承诺在出车前已向公司如实告知,并按照医嘱采取了必要的预防措施,且当前身体状况符合出车要求,血压测量值在正常范围内,收缩压小于 140mmHg,舒张压小于 90mmHg。'
      ]
    },
    {
      title: '二、精神与心理状态',
      paragraphs: [
        '精神状态良好,无疲劳、困倦、焦虑、烦躁等不良情绪,能够集中精力驾驶车辆,保证在行驶过程中保持高度的注意力和警觉性。在过去的 24 小时内,本人有足够的休息时间,未进行任何可能导致身体疲劳的活动,能够确保连续驾驶不超过 4 小时,并在感觉疲劳时及时停车休息。',
        '心理状态稳定,无情绪波动、心理压力过大或精神负担等情况,不会因个人情绪问题影响驾驶安全。'
      ]
    },
    {
      title: '三、药物与酒精情况',
      paragraphs: [
        '本人近期未服用任何可能引起嗜睡、眩晕、幻觉、兴奋等不良反应的药物,确保驾驶过程中不会因药物作用而出现行为失控或反应迟钝的情况。',
        '本人承诺在出车前及驾驶过程中不饮用任何含酒精的饮品,保证血液酒精含量为零,严格遵守 "酒后不开车,开车不喝酒" 的原则,避免因酒精影响导致的交通事故。'
      ]
    },
    {
      title: '四、遵守公司规定与安全驾驶承诺',
      paragraphs: [
        '本人将严格遵守公司的各项规章制度和操作流程,按照规定的时间、路线和任务进行运输作业,不私自更改行程,不违规超速、超载、疲劳驾驶。',
        '在驾驶过程中,严格遵守交通规则,注意交通安全,文明驾驶,不强行超车、不占用应急车道、不违规变道,与前车保持安全距离,尤其是在高速行驶时,提前预判风险,确保行车安全。'
      ]
    }
  ],
  footer: '本人深知作为一名货车司机,良好的身体状况和严格遵守安全驾驶规定是安全行车的基础。如因本人隐瞒身体不适、违规驾驶、服用影响驾驶安全的药物或酒后驾驶等行为导致的安全事故,本人愿意承担由此产生的一切法律责任和经济赔偿,并接受公司相应的处罚。',
  ending: '特此承诺!',
  signature: ['承诺人签字:[ ]', '日期:[ ]']
}
 
// ============ URL 工具 ============
const buildUrl = (path, params) => {
  const query = Object.entries(params)
    .map(([k, v]) => `${k}=${encodeURIComponent(v)}`)
    .join('&')
  return `${path}?${query}`
}
 
export default {
  data() {
    return {
      agreementContent: AGREEMENT_CONTENT,
      isAgreed: false,
      formData: { uploadIshow: false },
      loading: false
    }
  },
 
  onLoad(options) {
    this.formData = options || {}
    if (options?.uploadIshow === 'true') {
      this.isAgreed = true
    }
  },
 
  methods: {
    toggleAgree() {
      this.isAgreed = !this.isAgreed
    },
 
    navigateBack() {
      uni.navigateTo({
        url: buildUrl('/pages/signContract/index', {
          uploadIshow: this.formData.uploadIshow
        })
      })
    },
 
    async goToNextStep() {
      if (!this.isAgreed) {
        return uni.showToast({ title: '请先勾选同意', icon: 'none' })
      }
 
      this.loading = true
      try {
        uni.navigateTo({
          url: buildUrl('/pages/observeLaw/index', {
            uploadIshow: this.formData.uploadIshow
          })
        })
      } finally {
        this.loading = false
      }
    }
  }
}
</script>
 
<style scoped>
.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: #ffffff;
}
 
.content-scroll {
  flex: 1;
  padding: 30rpx;
  padding-bottom: 240rpx;
  box-sizing: border-box;
}
 
/* 承诺书内容 */
.agreement-content {
  line-height: 1.8;
}
 
.title {
  display: block;
  font-size: 32rpx;
  color: #333;
  font-weight: 600;
  text-align: center;
  margin-bottom: 40rpx;
}
 
.section {
  margin-bottom: 20rpx;
}
 
.section-title {
  display: block;
  font-size: 30rpx;
  color: #333;
  font-weight: 500;
  margin: 30rpx 0 15rpx;
}
 
.paragraph {
  display: block;
  font-size: 28rpx;
  color: #666;
  margin-bottom: 15rpx;
  text-indent: 56rpx;
}
 
.footer {
  display: block;
  font-size: 28rpx;
  color: #666;
  margin-top: 30rpx;
}
 
.ending {
  display: block;
  font-size: 28rpx;
  color: #666;
  margin-top: 20rpx;
}
 
.signature {
  margin-top: 40rpx;
}
 
.sign-line {
  display: block;
  font-size: 28rpx;
  color: #666;
  margin-top: 20rpx;
  text-align: right;
  padding-right: 50rpx;
}
 
/* 底部固定栏 */
.bottom-fixed {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ffffff;
  border-top: 1rpx solid #f5f5f5;
  z-index: 99;
}
 
.agree-area {
  padding: 20rpx 30rpx;
}
 
.checkbox-group {
  display: flex;
  align-items: center;
}
 
checkbox {
  transform: scale(0.8);
}
 
.agree-text {
  font-size: 28rpx;
  color: #333;
  margin-left: 10rpx;
}
 
.required {
  font-size: 28rpx;
  color: #ff4d4f;
  margin-left: 4rpx;
}
 
.btn-group {
  display: flex;
  gap: 20rpx;
  padding: 20rpx 30rpx 40rpx;
}
 
.cancel-btn,
.next-btn {
  flex: 1;
  height: 90rpx;
  line-height: 90rpx;
  font-size: 32rpx;
  border-radius: 8rpx;
  border: none;
}
 
.cancel-btn {
  color: #333;
  background-color: #f5f5f5;
}
 
.next-btn {
  color: #fff;
  background-color: #1677ff;
}
 
.next-btn.disabled {
  background-color: #c9d8e9;
  opacity: 0.7;
}
</style>