username@email.com
2025-04-27 15eb82df2d6ec539e9d4245bfe08d531e8eb6379
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
@model DTO.AdmPieceCheckDTO
@using DTO;
@{
    ViewBag.Title = "CooperOrder";
    Layout = null;
    List<AdmPieceCheckDTO> ListCooperOrderDTO = ViewBag.ListCooperOrderDTO as List<AdmPieceCheckDTO>; //问题类型
                                                                                                      //string  Heji1 = ViewBag.Heji1;
                                                                                                      //string Heji2 = ViewBag.Heji2;
}
 
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <meta http-equiv="Cache-Control" content="no-cache">
    <meta http-equiv="Expires" content="0">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>@SiteConfig.SiteName</title>
    <meta name="keywords" content="@SiteConfig.Keywords">
    <meta name="description" content="@SiteConfig.Description">
    <meta name="author" content="@SiteConfig.Author">
    <link rel="icon" type="image/x-icon" href="@SiteConfig.ShortcutIcon">
    <!-- uc强制竖屏 -->
    <meta name="screen-orientation" content="portrait">
    <!-- QQ强制竖屏 -->
    <meta name="x5-orientation" content="portrait">
    <!-- UC强制全屏 -->
    <meta name="full-screen" content="yes">
    <!-- QQ强制全屏 -->
    <meta name="x5-fullscreen" content="true">
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <script src="~/js/jquery.min.js"></script>
    <style type="text/css">
        body {
            text-align: left;
            font-size: 12px;
        }
 
        table {
            border-collapse: collapse;
            border: none;
            width: 900px;
            margin-left: 0px;
            text-align: center;
        }
 
        td {
            border: solid #000000 1px;
        }
    </style>
</head>
<body>
    <button type="button" onclick="onprint()">打印</button>
    <div id="printArea">
        @if (ListCooperOrderDTO != null && ListCooperOrderDTO.Count > 0)
        {<table>
    @{
        int i = 1;
    }
             <tr>
                 <td style="width:4%;">  编号</td>
                 <td style="width:12%;">  工作时间</td>
                 <td style="width:12%;"> 部门</td>
                 <td style="width:12%;"> 员工姓名</td>
                 <td style="width:12%;"> 计件类别</td>
                 <td style="width:12%;"> 计件项目</td>
                 <td style="width:12%;"> 工作内容</td>
                 <td style="width:12%;"> 绩效提成(元)</td>
                 <td style="width:12%;"> 数量</td>
 
 
             </tr>
    @foreach (var CooperOrderDTO in ListCooperOrderDTO)
    {
 
        <tr>
            <td>  @i</td>
            <td>   @CooperOrderDTO.WorkTimeName</td>
            <td>   @CooperOrderDTO.DeptName</td>
            <td>   @CooperOrderDTO.UserName</td>
            <td>   @CooperOrderDTO.PayTypeName</td>
            <td>   @CooperOrderDTO.WorkProName</td>
            <td>   @CooperOrderDTO.Remark</td>
            <td>   @CooperOrderDTO.Gongzi.Value.ToString("F2")</td>
            <td>   @CooperOrderDTO.Shuliang.Value.ToString("F2")</td>
        </tr>
 
        i++;
    }
 
    <tr>
        <td>  </td>
        <td> </td>
        <td>   </td>
        <td>   </td>
        <td>   </td>
        <td>  </td>
        <td>--合计--</td>
        <td>  @ViewBag.Heji1</td>
        <td>   @ViewBag.Heji2</td>
    </tr>
 
 
 
</table>
        }
    </div>
</body>
<script type="text/javascript">
 
    function printHtml(html) {
        var bodyHtml = document.body.innerHTML;
        document.body.innerHTML = html;
        window.print();
        document.body.innerHTML = bodyHtml;
    }
    function onprint() {
        var html = $("#printArea").html();
        printHtml(html);
    }
</script>
</html>