wujianwei
2026-01-08 850e19bd9655071cd801d74c240b70c61167b4cd
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
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
<template>
    <view class="container">
        <!-- 顶部导航栏 -->
 
        <Nav title="签署遵纪守法承诺书" customBack="pages/acknowledgement/index"></Nav>
 
        <!-- 承诺书内容区域(可滚动) -->
        <scroll-view class="content-scroll" scroll-y="true">
            <view class="agreement-content">
                <text class="title">遵纪守法承诺书</text>
 
                <text class="paragraph">因本人在香港执行出车任务,为支持配合公司对持前往香港执行出车任务人员的管理,共同维护国家和公司的声誉,本人承诺做到:</text>
 
                <text class="heading">一、</text>
                <text
                    class="paragraph">严格遵守中华人民共和国《海关法》、《出境入境管理法》、《出境入境边防检查条例》,香港特别行政区有关法律法规及有关外事纪律规定,保守国家及公司的商业机密。</text>
 
                <text class="heading">二、</text>
                <text class="paragraph">严格遵守珠海市汇畅交通投资有限公司/珠海市海港汽车货运公司《出国(境)工作管理办法》等规章制度。</text>
 
                <text class="heading">三、</text>
                <text
                    class="paragraph">保证不利用赴港执行公务之便进行有损国家、公司形象及声誉等活动,不从事国家法律法规、香港特别行政区法律、上级主管部门或公司规章制度禁止的一切行为及活动。</text>
 
                <text class="heading">四、</text>
                <text
                    class="paragraph">保证不在出车任务时间内进行出入境旅游,不走私贩私、不携带违禁品出入境,不组织及不参与赌博、涉足色情场所、偷引渡等活动。如有发现其他人员或线索涉及违法违规活动,即向公司报告。</text>
 
                <text class="heading">五、</text>
                <text class="paragraph">主动配合口岸各管理部门指挥、检查。服从口岸各管理部门指挥、检查,按规定线路行驶和停放车辆,服从调度和工作安排。</text>
 
                <text class="heading">六、</text>
                <text
                    class="paragraph">每日驾驶车辆出入境前后自觉检查,如发现人员或交通运输工具潜在安全管理隐患,或有涉及各口岸的违法犯罪人员、车辆进出动态等信息的,及时报告公司及珠海出入境边防检查站。</text>
 
                <text class="paragraph">本人如有违反,自愿接受法律法规或公司规章制度的处罚。</text>
 
                <text class="paragraph">特此承诺!</text>
 
                <text class="sign-line">承诺人签字:[ ]</text>
                <text class="sign-line">日期:[ ]</text>
            </view>
        </scroll-view>
 
        <!-- 底部固定区域(勾选框+按钮) -->
        <view class="bottom-fixed">
            <!-- 勾选区域 -->
            <!-- <view class="agree-area">
        <view class="checkbox-group">
          <checkbox 
            class="checkbox" 
            :checked="isAgreed" 
            @change="handleAgreeChange"
          ></checkbox>
          <text class="agree-text">我已阅读并理解上述内容,自愿签署</text>
          <text class="required">*</text>
        </view>
      </view> -->
 
            <!-- 底部按钮 -->
            <view class="btn-group">
                <button class="cancel-btn" @click="navigateBack">上一步</button>
                <button class="next-btn" type="primary" @click="showPopup = true">填写内容</button>
            </view>
        </view>
 
        <!-- <uni-popup ref="popup" background-color="#fff" @change="change">
            <view class="popup-content" :class="{ 'popup-height': type === 'left' || type === 'right' }"><text
                    class="text">popup 内容</text></view>
        </uni-popup> -->
        <view class="popup-mask" v-if="showPopup" @click="showPopup = false"></view>
        <view class="popup-container" v-if="showPopup" style="height: 100%;" :class="{ 'popup-show': showPopup }">
            <view class="popup-title">实名信息确认</view>
 
            <!-- uView 表单组件 -->
            <!-- <u-form ref="verifyForm" :model="formData" :rules="rules" labelPosition="left" labelWidth="180rpx">
                <u-form-item label="本人姓名" prop="name" required>
                    <u-input v-model="formData.name" placeholder="请输入姓名" maxlength="20"></u-input>
                </u-form-item>
 
                <u-form-item label="身份证号" prop="idCard" required>
                    <u-input v-model="formData.idCard" placeholder="请输入18位身份证号" maxlength="18"
                        keyboard-type="number"></u-input>
                </u-form-item>
 
                <u-form-item label="日期" prop="date" required>
                    <uni-datetime-picker type="datetime" v-model="formData.date" style="flex: 1;"
                        @change="onDateTimeChange">
                    </uni-datetime-picker>
                </u-form-item>
 
              
 
            </u-form> -->
            <view class="content" style="padding: 10rpx;">
                <view style="border: 1rpx dashed #555555;">
                    <Signature ref="sig" v-model="v"></Signature>
                </view>
                <u-button class="sign-btn" @click="startSign" type="primary" plain>开始签名</u-button>
 
                <!-- <text style="overflow-wrap: break-word;">{{ v }}</text> -->
            </view>
            <!-- 手动签名区域 -->
            <!-- <view class="signature-area">
                <view class="signature-title">手动签名</view>
                <view class="signature-box">
                    <text class="signature-hint" v-if="!v">要求:字迹清晰,与身份证一致</text>
                    <view class="signature-preview" v-if="v">
                        <text>签名预览</text>
                    </view>
                </view>
            </view> -->
 
            <!-- 底部按钮 -->
            <view class="btn-group">
                <u-button class="cancel-btn" @click="showPopup = false" type="info" plain>
                    取消
                </u-button>
                <u-button class="submit-btn" @click="handleSubmit" type="primary">
                    提交
                </u-button>
            </view>
        </view>
 
    </view>
</template>
 
<script>
import Signature from '@/components/sin-signature/index.vue'
import { carUploadTrip } from "@/common/examine";
export default {
    data() {
        return {
            url: '',
            v: '',
            // 控制弹窗显示
            showPopup: false,
            uploadIshow: false,
            // 表单数据
            formData: {
                name: '',
                idCard: '',
                date: ''
            },
            // 签名状态
            hasSignature: false,
            // 表单验证规则
            rules: {
                name: [
                    { required: true, message: '请输入姓名', trigger: 'blur' }
                ],
                idCard: [
                    { required: true, message: '请输入身份证号', trigger: 'blur' },
                    {
                        pattern: /(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
                        message: '请输入正确的18位身份证号',
                        trigger: 'blur'
                    }
                ],
                date: [
                    { required: true, message: '请选择日期', trigger: 'blur' }
                ]
            },
            // 其他数据保持不变
            signatureUrl: '', // 签名图片地址
            hasSignature: false, // 签名状态
            // 新增:记录原始签名,用于重新签名功能
            originalSignature: ''
        };
    },
    components: {
        Signature,
    },
    methods: {
        async startSign() {
            let s = await this.$refs.sig.getSyncSignature();
            console.log('组件版本', this.$refs.sig.VERSION);
            console.log('签名数据', s);
        },
        // 返回上一页
        navigateBack() {
            uni.navigateTo({
                url: '/pages/acknowledgement/index?uploadIshow=' + this.uploadIshow
            });
        },
        // 处理签名变化(修改后)
        handleSignatureChange(url) {
            console.log(url);
            this.signatureUrl = url;
            this.originalSignature = url; // 保存原始签名
            this.hasSignature = !!url; // 有签名时更新状态
        },
        // 提交表单方法中签名验证部分保持不变
        handleSubmit() {
            if (this.v == '') {
                return uni.showToast({ title: '请完成签名', icon: 'none' });
            }
            const form = uni.getStorageSync("signContractForm");
            form.signImg = this.v
            
            carUploadTrip(form).then((res) => {
                if (res == 1) {
                    this.uploadIshow =true
                    uni.showToast({ title: '提交成功', icon: 'none' });
                    this.v = ''
                    this.showPopup = false;
                    setTimeout(() => {
                        wx.navigateTo({
                         url: '/pages/examine/index?id=' + form.dispatchOrderId+'&name='+'上传行程'+'&router='+'pages/beReferred/index'
                       });
                        uni.removeStorageSync("signContractForm");
 
                    }, 1000);
                }else {
                    this.uploadIshow =false
                }
            });
 
 
        },
 
 
    }
};
</script>
 
<style scoped>
.container {
    width: 100%;
    min-height: 100vh;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    /* 留出底部固定区域空间 */
    padding-bottom: 200rpx;
    box-sizing: border-box;
}
 
/* 导航栏样式 */
.nav-bar {
    height: 88rpx;
    display: flex;
    align-items: center;
    padding: 0 30rpx;
    border-bottom: 1rpx solid #e5e5e5;
    position: relative;
    z-index: 10;
}
 
.back-btn image {
    width: 34rpx;
    height: 34rpx;
}
 
.nav-title {
    flex: 1;
    text-align: center;
    font-size: 34rpx;
    color: #333333;
    font-weight: 500;
}
 
/* 滚动内容区 */
.content-scroll {
    flex: 1;
    padding: 30rpx;
    box-sizing: border-box;
    /* 避免内容被底部固定区遮挡 */
    padding-bottom: 220rpx;
}
 
.agreement-content {
    line-height: 1.8;
    width: 100%;
    height: calc(100vh - 200rpx);
}
 
.title {
    display: block;
    font-size: 32rpx;
    color: #333333;
    font-weight: 600;
    text-align: center;
    margin: 0 0 40rpx 0;
    padding-bottom: 20rpx;
    border-bottom: 1rpx solid #f0f0f0;
}
 
.heading {
    display: inline;
    font-size: 28rpx;
    color: #333333;
    font-weight: 500;
}
 
.paragraph {
    display: block;
    font-size: 28rpx;
    color: #666666;
    margin-bottom: 20rpx;
    text-indent: 0;
    /* 此处无需首行缩进,与条款编号配合 */
}
 
.sign-line {
    display: block;
    font-size: 28rpx;
    color: #666666;
    margin-top: 30rpx;
    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 {
    width: 30rpx;
    height: 30rpx;
    margin-right: 15rpx;
}
 
.agree-text {
    font-size: 28rpx;
    color: #333333;
    flex: 1;
}
 
.required {
    font-size: 28rpx;
    color: #ff4d4f;
}
 
/* 底部按钮 */
.btn-group {
    padding: 30rpx;
    display: flex;
    gap: 20rpx;
}
 
.cancel-btn {
    flex: 1;
    height: 90rpx;
    line-height: 90rpx;
    font-size: 32rpx;
    color: #333333;
    background-color: #ffffff;
    border: 1rpx solid #e5e5e5;
    border-radius: 8rpx;
}
 
.next-btn {
    flex: 1;
    height: 90rpx;
    line-height: 90rpx;
    font-size: 32rpx;
    color: #ffffff;
    background-color: #1677ff;
    border: none;
    border-radius: 8rpx;
}
 
.next-btn[disabled] {
    background-color: #c9d8e9;
    opacity: 0.7;
}
 
/* 实名 */
.container {
    width: 100%;
    min-height: 100vh;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
}
 
/* 主页面样式 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30rpx;
    padding: 30rpx;
}
 
.open-btn {
    width: 60%;
    height: 80rpx;
    line-height: 80rpx;
    background-color: #1677ff;
    color: #ffffff;
    border-radius: 40rpx;
    font-size: 30rpx;
}
 
/* 弹窗样式 */
.popup-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    transition: opacity 0.3s;
}
 
.popup-container {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffffff;
    border-top-left-radius: 20rpx;
    border-top-right-radius: 20rpx;
    z-index: 999;
    padding: 30rpx;
    box-sizing: border-box;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}
 
.popup-show {
    transform: translateY(0);
}
 
.popup-title {
    font-size: 34rpx;
    color: #333333;
    font-weight: 600;
    text-align: center;
    margin-bottom: 40rpx;
    padding-bottom: 20rpx;
    border-bottom: 1rpx solid #f0f0f0;
}
 
/* 签名区域 */
.signature-area {
    display: flex;
    flex-direction: column;
    gap: 20rpx;
    margin-top: 20rpx;
    padding-top: 20rpx;
    border-top: 1rpx solid #f0f0f0;
}
 
.signature-title {
    font-size: 28rpx;
    color: #333333;
    margin-bottom: 10rpx;
}
 
.signature-box {
    width: 100%;
    height: 200rpx;
    border: 1rpx dashed #e5e5e5;
    border-radius: 8rpx;
    display: flex;
    justify-content: center;
    align-items: center;
}
 
.signature-hint {
    font-size: 26rpx;
    color: #999999;
    text-align: center;
}
 
.signature-preview {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f9f9f9;
    font-size: 26rpx;
    color: #666666;
}
 
.sign-btn {
    margin-top: 10rpx;
}
 
/* 底部按钮 */
.btn-group {
    display: flex;
    gap: 20rpx;
    margin-top: 40rpx;
}
 
.cancel-btn,
.submit-btn {
    flex: 1;
    height: 90rpx;
    line-height: 90rpx;
    font-size: 32rpx;
}
 
/* 签名区域样式 */
/* 仅修改签名区域相关样式 */
</style>