value
2023-09-01 3f43fee1a16ea38b9f6653521829b545bf67dfed
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
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
<template>
    <div class="content-wrapper">
        <div class="content-main">
            <div class="cover">
                <div class="cover-top">
                    <div>
                        <div style="height: 30px; line-height: 30px;">报告编号:{{reportData.rcode}}</div>
                        <div style="height: 30px; line-height: 30px;">Reference No:{{reportData.rcode}}</div>
                    </div>
                </div>
                <div class="title">
                    <h1 style="text-align-last:justify ;">检验报告</h1>
                    <h1>Test Report</h1>
                </div>
                <div class="cover-body">
                    <div class="name">
                        <div style="width:140px; text-align-last: justify;">
                            <div>试样名称</div>
                            <span style="font-size: 14px;">Name of Product</span>
                        </div>
                        <div class="line"> {{reportData.name}}</div>
                    </div>
                    <div class="name">
                        <div style="width:140px; text-align-last: justify;">
                            <div style="text-align-last: justify;">型号</div>
                            <span style="font-size: 14px;">Type and Size</span>
                        </div>
                        <div class="line"> {{reportData.specifications}}</div>
                    </div>
                    <div class="name">
                        <div style="width:140px; text-align-last: justify;">
                            <div>委托单位</div>
                            <span style="font-size: 14px;display: block;margin: 10px 45px 0px;">Client</span>
                        </div>
                        <div class="line"> {{reportData.supplier}}</div>
                    </div>
                    <div class="name">
                        <div style="width:140px; text-align-last: justify;">
                            <div>检验类别</div>
                            <span style="font-size: 14px;">Kind of Test</span>
                        </div>
                        <div class="line"> {{reportData.type==1?'成品检验':'委托检验'}}</div>
                    </div>
                </div>
                <div class="cover-footer">
                    <span>{{enterprise.name}}</span><br>
                    <span style="font-size: 14px;">{{enterprise.nameEn}}</span>
                </div>
            </div>
            <div class="pageOne">
                <div class="statement">
                    <div>
                        <h2>声明</h2>
                    </div>
                    <div style="text-align-last: center;">
                        <h2 style="font-size: 14px;">Statement</h2>
                    </div>
                </div>
                <div class="statement-body">
                    <div>
                        <span>1. 本检验报告(包括复印件)未加检测专用章一律无效。</span><br>
                        <span>This test report (including any duplicates) shall become effective only with pecial chapter for
                            testing on.</span>
                    </div>
                    <div>
                        <span>2. 本检验报告无编写、审核、批准人签章无效。</span><br>
                        <span>This test report shall become effective only with the signatures of compiler checker and
                            approver.</span>
                    </div>
                    <div>
                        <span>3. 本检验报告涂改无效。</span><br>
                        <span>This test report will be invalid if altered.</span>
                    </div>
                    <div>
                        <span>4. 本检验报告不得部分复印。</span><br>
                        <span>This test report mustn’t copy partly.</span>
                    </div>
                    <div>
                        <span>5. 送样委托检验,仅对来样负责。</span><br>
                        <span>For the sample submitted by clients, the test result is valid only for these samples.</span>
                    </div>
                    <div>
                        <span>6. 样品及委托单位为委托方自命名。</span><br>
                        <span>Samples and consignor name for the principal.</span>
                    </div>
                    <div>
                        <span>7. 本检验报告中英文描述有冲突时,以中文解释为准。</span><br>
                        <span>If the Chinese and English version of the test report have any conflict, the Chinese version should be
                            the standard for arbitrament.</span>
                    </div>
                    <div>
                        <span>8. 委托方对本检验报告若有异议,应于样品保存期内向本中心提出,联系电话:{{enterprise.linkPhone}}</span><br>
                        <span>Clients who have any different ideas about this test report, may contract with Test Central within the
                            sample reservation time. Tel: {{enterprise.linkPhone}}</span>
                    </div>
                    <div>
                        <span>9. 本中心样品自报告发送日起,一般保存一个月,以备复验。</span><br>
                        <span>The sample shall be reserved for one month beginning from the data when this test report is submitted
                            for examine or review.</span>
                    </div>
                </div>
                <div class="statement-footer">
                    <div class="depart">
                        <span>{{enterprise.name}}</span><br>
                        <span>{{enterprise.nameEn}}</span>
                    </div>
                    <div class="address">
                        <span>地 址:{{enterprise.address}}</span><br>
                        <span>Address: {{enterprise.addressEn}}</span>
                    </div>
                    <div class="zipcode">邮政编码Zip Code:{{enterprise.code}}</div>
                    <div class="tel">电 话Tel:{{enterprise.linkPhone}}</div>
                    <div class="email">邮 箱E-mail:{{enterprise.email}}</div>
                </div>
            </div>
            <div class="pageTwo">
                <div class="header" style="line-height: 10px;">
                    <div style="width: 350px;margin: 0 auto; text-align-last: justify;">
                        <h2 style="font-size: 18px;">{{enterprise.name}}</h2>
                    </div>
                    <div style="width: 500px; margin: 0 auto;text-align-last: justify;">
                        <h2 style="font-size: 14px;">{{enterprise.nameEn}}</h2>
                    </div>
                    <div style="width: 120px;margin: 0 auto;text-align-last: justify;">
                        <h2 style="font-size: 18px;">检测报告</h2>
                    </div>
                    <div style="width: 100px; margin: 0 auto;text-align-last: justify;">
                        <h2 style="font-size: 14px;">Test Report</h2>
                    </div>
                </div>
                <div class="table">
                    <div class="table-header">
                        <div>
                            <span>报告编号:{{reportData.rcode}}</span><br>
                            <span>Reference No:{{reportData.rcode}}</span>
                        </div>
                        <div>
                            <span>第1页共2页</span><br>
                            <span>Page 1 of 2</span>
                        </div>
                    </div>
                    <div class="table-body">
                        <table width="100%" border="1" cellspacing="0" style="text-align: center;">
                            <tr>
                                <td><span>试样名称</span><br>
                                    <span>Name of product</span>
                                </td>
                                <td colspan="2">{{reportData.name}}</td>
                                <td>
                                    <span>规格型号</span><br>
                                    <span>Type and size</span>
                                </td>
                                <td colspan="2">{{reportData.specifications}}</td>
                            </tr>
                            <tr>
                                <td>
                                    <span>样品数量</span><br>
                                    <span>Test item</span>
                                </td>
                                <td colspan="2">{{reportData.num}}</td>
                                <td>
                                    <span>检验项目</span><br>
                                    <span>Test item</span>
                                </td>
                                <td colspan="2">{{reData.productNames}}</td>
                            </tr>
                            <tr>
                                <td>
                                    <span>来样方式</span><br>
                                    <span>Delivering method</span>
                                </td>
                                <td colspan="2"></td>
                                <td>
                                    <span>检验类型</span><br>
                                    <span>Type of test</span>
                                </td>
                                <td colspan="2">
                                    {{reportData.type === 0 ? "原材料检验" : (reportData.type === 1 ? "委托检验" : "成品检验")}}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span>样品状态</span><br>
                                    <span>Sample discription</span>
                                </td>
                                <td colspan="2">/</td>
                                <td>
                                    <span>生产单位</span><br>
                                    <span>Producer</span>
                                </td>
                                <td colspan="2">
                                    {{reportData.supplier}}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span>送样时间</span><br>
                                    <span>Received date</span>
                                </td>
                                <td colspan="2">
                                    
                                </td>
                                <td>
                                    <span>检验日期</span><br>
                                    <span>Test date</span>
                                </td>
                                <td colspan="2">
                                    {{reportData.createTime}}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span>委托人</span><br>
                                    <span>Consignor</span>
                                </td>
                                <td colspan="2">
                                    {{enterprise.linkName}}
                                </td>
                                <td>
                                    <span>电话</span><br>
                                    <span>Tel</span>
                                </td>
                                <td colspan="2">
                                    {{enterprise.linkPhone}}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span>委托单位</span><br>
                                    <span>Client</span>
                                </td>
                                <td colspan="5">
                                    {{enterprise.name}}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span>委托单位地址</span><br>
                                    <span>Address</span>
                                </td>
                                <td colspan="5">
                                    {{enterprise.address}}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span>检验环境</span><br>
                                    <span>Test environment</span>
                                </td>
                                <td colspan="5"></td>
                            </tr>
                            <tr>
                                <td>
                                    <span>检验依据</span><br>
                                    <span>Test standard</span>
                                </td>
                                <td colspan="5"></td>
                            </tr>
                            <tr>
                                <td style="height: 180px;">
                                    <span>结论</span><br>
                                    <span>Conclusion </span>
                                </td>
                                <td colspan="5">
                                    <div style="padding-left: 20px;width:100%;text-align:left; font-size:18px;height: 120px;line-height: 120px;">{{reportData.inspectionStatus === 1 ? "合格" : "不合格"}}</div>
                                    <div style="height: 60px;margin-left: 250px;">
                                        <span>(检测报告专用章)</span><br>
                                        <span>( SPECIFIC STAMP FOR TEST RTORT) </span><br>
                                        <span>签发日期: {{formattedDate('yyyy年MM月DD日','zh-cn') }}</span><br>
                                        <span>Date of issue: {{formattedDate('LL','en-ca') }}</span>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span>备注</span><br>
                                    <span>Remark </span>
                                </td>
                                <td colspan="5"></td>
                            </tr>
                            <tr>
                                <td>
                                    <span>编制</span><br>
                                    <span>Preparer</span>
                                </td>
                                <td colspan="2">{{reportData.preparerName}}</td>
                                <td>
                                    <span>检验</span><br>
                                    <span>Tester</span>
                                </td>
                                <td colspan="2"></td>
                            </tr>
                            <tr>
                                <td>
                                    <span>审核</span><br>
                                    <span>Checker </span>
                                </td>
                                <td colspan="2"></td>
                                <td>
                                    <span>批准</span><br>
                                    <span>Approver</span>
                                </td>
                                <td colspan="2"></td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
            <div class="pageThree">
                <div class="header" style="line-height: 10px;">
                    <div style="width: 350px;margin: 0 auto; text-align-last: justify;">
                        <h2 style="font-size: 18px;">江苏中天科技股份有限公司检测中心</h2>
                    </div>
                    <div style="width: 500px; margin: 0 auto;text-align-last: justify;">
                        <h2 style="font-size: 14px;">TEST CENTER OF JIANGSU ZHONGTIAN TECHNOLOGY CO.,LTD</h2>
                    </div>
                    <div style="width: 120px;margin: 0 auto;text-align-last: justify;">
                        <h2 style="font-size: 18px;">检测报告</h2>
                    </div>
                    <div style="width: 100px; margin: 0 auto;text-align-last: justify;">
                        <h2 style="font-size: 14px;">Test Report</h2>
                    </div>
                </div>
                <div class="table">
                    <div class="table-header">
                        <div>
                            <span>报告编号:{{reportData.rcode}}</span><br>
                            <span>Reference No:{{reportData.rcode}}</span>
                        </div>
                        <div>
                            <span>第2页共2页</span><br>
                            <span>Page 2 of 2</span>
                        </div>
                    </div>
                    <div class="table-body">
                        <table width="100%" border="1" cellspacing="0" style="text-align: center;">
                            <tr>
                                <td colspan="4">
                                    <span>样品编号</span><br>
                                    <span>Sample No</span>
                                </td>
                                <td colspan="3">{{reportData.imCode}}</td>
                                <td colspan="4">
                                    <span>规格型号</span><br>
                                    <span>Type</span>
                                </td>
                                <td colspan="3">{{reportData.specifications}}</td>
                            </tr>
                            <tr>
                                <td>
                                    <span>序号</span><br>
                                    <span>No</span>
                                </td>
                                <td colspan="3">
                                    <span>检验项目</span><br>
                                    <span>Test item</span>
                                </td>
                                <td>
                                    <span>单位</span><br>
                                    <span>Unit</span>
                                </td>
                                <td colspan="3">
                                    <span>标准要求</span><br>
                                    <span>Requirement</span>
                                </td>
                                <td colspan="3">
                                    <span>检验结果</span><br>
                                    <span>Test result</span>
                                </td>
                                <td>
                                    <span>结论</span><br>
                                    <span>Conclusion</span>
                                </td>
                            </tr>
                            <tr v-for="(item, index) in resultTable" :key="index">
                                <td>
                                    <span>{{ index + 1 }}</span><br>
                                </td>
                                <td colspan="3">
                                    <span>{{ item.ipName }}</span>
                                </td>
                                <td>
                                    <span>{{ item.unit }}</span>
                                </td>
                                <td colspan="3">
                                    <span>{{ item.required }}</span><br>
                                </td>
                                <td colspan="3">
                                    <span>{{ item.testValue }}</span><br>
                                </td>
                                <td>
                                    <span>{{ isIfState(item.testState) }}</span>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span>备注:</span><br/>
                                    <span>remarks:</span>
                                </td>
                                <td colspan="13">
                                    “√”表示项目合格,“×”表示项目不合格,“-”表示不要判定,“/”表示没有标准要求。
                                    “√” indicates test Item is qualified,“×” indicates test Item is unqualified,
                                    “-” indicates test Item  judgment is not required,“/” indicates test Item is no test requirement .
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
            <div class="pageFour">
                <div class="page-header" style="display: flex;justify-content: space-between;font-size: 12px;">
                    <div>
                        <span>报告编号:{{reportData.rcode}}</span><br>
                        <span>Reference No:{{reportData.rcode}}</span>
                    </div>
                    <div>
                        <span>附页</span><br>
                        <span>Appenfix</span>
                    </div>
                </div>
                <hr>
                <div class="table">
                    <div class="table-header">
                        <div style="width: 200px; margin: 0 auto;text-align-last: justify;">
                            <h2>检验设备一览表</h2>
                        </div>
                        <div style="text-align-last: center;">
                            <h2 style="font-size: 14px;">Equipment List</h2>
                        </div>
                    </div>
                    <div class="table-body">
                        <table width="100%" border="1" cellspacing="0" style="text-align: center;">
                            <thead>
                                <tr>
                                    <td>
                                        <span>序号</span><br>
                                        <span>No</span>
                                    </td>
                                    <td colspan="2">
                                        <span>设备名称</span><br>
                                        <span>Equipment name</span>
                                    </td>
                                    <td>
                                        <span>设备型号</span><br>
                                        <span>type</span>
                                    </td>
                                    <td colspan="2">
                                        <span>编号</span><br>
                                        <span>Factory number</span>
                                    </td>
                                    <td colspan="2">
                                        <span>校准有效期</span><br>
                                        <span>Date of validity</span>
                                    </td>
                                </tr>
                            </thead>
                            <tr v-for="(item, index) in table" :key="index">
                                <td>
                                    <span>{{ item.id }}</span>
                                </td>
                                <td colspan="2">
                                    <span>{{ item.equipment_name }}</span>
                                </td>
                                <td>
                                    <span>{{ item.type }}</span><br>
                                </td>
                                <td colspan="2">
                                    <span>{{ item.factory_number }}</span>
                                </td>
                                <td colspan="2">
                                    <span>{{ item.validity }}</span>
                                </td>
                            </tr>
                        </table>
                        <p style="width:100%;text-align: center;font-size: 15px;">------以下空白(Following Blank)------</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
 
<script>
    import moment from 'moment';
    import {
        get,
        post,
        wpost
    } from "@/api/util/requestUtil.js"
    export default {
        name: 'TestReport',
        data() {
            return {
                resultTable: [],
                table: [{
                    id: 1,
                    equipment_name: '拖拉机',
                    type: 1,
                    factory_number: 'Akjgfewof',
                    validity: '2023.8.25~2023.8.27'
                }],
                enterprise: {},
                reData: {
                    productNames: null
                }
            }
        },
        mounted() {
            this.initResultData();
            this.getEnterprise();
            if (Object.keys(this.reportData).length > 0) {
                this.reData.productNames = ''
                this.reportData.products.forEach(a=>{
                    this.reData.productNames += ("," + a.ipName)
                })
                this.reData.productNames = this.reData.productNames.replace(',','')
            }
        },
        methods: {
            initResultData(){
                this.resultTable = this.reportData.products;
                if (this.resultTable.length < 15) {
                    let size = this.resultTable.length;
                    let num = 15 - size;
                    for (let i = 0; i < num; i++) {
                        this.resultTable.push({
                            code: null,
                            ipName: "",
                            required: "",
                            testState: null,
                            testValue: "",
                            unit: ""
                        })
                    }
                }
            },
            isIfState(val) {
                if (val === 1) return "√"
                else if (val === null || val === undefined) return null
                else return "X"
            },
            formattedDate(fmt,local) {
                moment.locale(local);
                return moment().format(fmt);
            },
            getEnterprise() {
                get("/report/getEnterprise").then(res => {
                    this.enterprise = res.data
                })
            }
        },
        props: ["reportData"],
    }
</script>
 
<style lang="scss" scoped>
    .content-wrapper {
        .content-main {
            margin: -100px auto;
            width: 90%;
 
            .cover {
                margin: 80px 0px;
                padding: 0px 50px;
                height: 1200px;
                background-color: #fff;
                box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
 
                .cover-top {
                    display: flex;
                    justify-content: end;
                    font-size: 20px;
                    margin-right: 50px;
                    padding-top: 50px;
                    // font-weight: bold;
                }
 
                .title {
                    margin-top: 100px;
                    padding: 0px 220px;
                    text-align: center;
                    font-size: 25px;
                }
 
                .cover-body {
                    font-size: 25px;
                    margin: 100px 80px;
 
                    .name {
                        // background-color: #bfa;
                        display: flex;
                        justify-content: space-between;
                        margin-bottom: 20px;
 
                        .line {
                            width: 500px;
                            border-bottom: solid 1px black;
                            text-align: center;
                            // height: 60px;
                            line-height: 60px;
                        }
                    }
                }
 
                .cover-footer {
                    text-align: center;
                    margin-top: 200px;
 
                    span {
                        font-size: 23px;
                        height: 40px;
                        line-height: 40px;
                    }
                }
            }
 
            .pageOne {
                margin-top: -50px;
                background-color: #fff;
                box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
                padding: 50px 100px;
                height: 1200px;
 
                .statement {
                    margin: 0 auto;
                    width: 100px;
                    text-align-last: justify;
                }
 
                .statement-body {
                    line-height: 32px;
                    text-align: justify;
                    margin: 30px 0px;
                    font-size: 12px;
                }
 
                .statement-footer {
                    line-height: 30px;
                    font-size: 12px;
                }
            }
 
            .pageTwo {
                margin-top: 30px;
                background-color: #fff;
                box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
                padding: 50px 60px;
                height: 1200px;
 
                .table {
                    margin-top: 20px;
 
                    .table-header {
                        display: flex;
                        justify-content: space-between;
                        font-size: 14px;
                        line-height: 20px;
                    }
 
                    .table-body {
                        font-size: 12px;
 
                        table td {
                            width: 150px;
                            height: 52px;
                        }
                    }
                }
            }
 
            .pageThree {
                margin-top: 30px;
                background-color: #fff;
                box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
                padding: 50px 60px;
                height: 1200px;
 
                .table {
                    margin-top: 20px;
 
                    .table-header {
                        display: flex;
                        justify-content: space-between;
                        font-size: 14px;
                        line-height: 20px;
                    }
 
                    .table-body {
                        font-size: 12px;
 
                        table td {
                            width: 8%;
                            height: 52px;
                        }
                    }
                }
            }
 
            .pageFour {
                margin-top: 30px;
                background-color: #fff;
                box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
                padding: 50px 60px;
                height: 1200px;
 
                .table {
                    margin-top: 50px;
 
                    .table-header {
                        line-height: 20px;
                    }
 
                    .table-body {
                        margin-top: 20px;
                        font-size: 12px;
 
                        table td {
                            width: 80px;
                            height: 52px;
                        }
                    }
                }
            }
 
        }
    }
</style>