username@email.com
2024-09-09 cc170291673472d3cda8d7ea77f6bd3a3b5dbb83
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
<script type="text/html" template lay-done="layui.data.done(d);">
    <table class="layui-table layui-form" lay-filter="LAY-app-CoreCmsPlanOrder-detailsForm" id="LAY-app-CoreCmsPlanOrder-detailsForm">
        <colgroup>
            <col width="100">
            <col>
        </colgroup>
        <tbody>
 
 
 
 
 
 
            <tr>
                <td style="background-color:lightsteelblue;width:25%;">
                    商品名称
                </td>
                <td style="background-color: lightsteelblue; width: 25%;">
                    商品规格
                </td>
                <td style="background-color: lightsteelblue; width: 25%;">
                    计划数量
                </td>
 
                <td style="background-color: lightsteelblue; width: 25%;">
                    调整数量
                </td>
 
            </tr>
 
            {{# layui.each(d.params.data, function(index, item){ }}
            <tr>
                <td>
                    {{ item.name }}
                </td>
                <td>
                    {{ item.specification }}
                </td>
                <td>
                    {{ item.nums }}
                </td>
 
                <td>
                    {{ item.numsnew }}
                </td>
 
            </tr>
            {{# }); }}
 
 
 
 
 
            <!--<tr>
                 <td style="background-color:lightsteelblue;" colspan="4">
                     修改订单
                 </td>
 
             </tr>
            <tr>
                 <td style="background-color:lightsteelblue;">
                     商品名称
                 </td>
                 <td style="background-color:lightsteelblue;">
                     单价(元)
                 </td>
                 <td style="background-color:lightsteelblue;">
                     数量
                 </td>
                 <td style="background-color:lightsteelblue;">
                     总价(元)
                 </td>
             </tr>
 
             {{# layui.each(d.params.data.modelItem2, function(index, item){ }}
             <tr>
                 <td>
                     {{ item.name }}   {{ item.specification }}
                 </td>
                 <td>
                     {{ item.price }}
                 </td>
                 <td>
                     {{ item.nums }}
                 </td>
                 <td>
                     {{ item.amount }}
                 </td>
             </tr>
             {{# }); }}-->
 
        </tbody>
    </table>
 
 
    <div class="layui-form-item text-right">
        <input type="button" class="layui-btn"   value="打印" onclick="print()">
    </div>
</script>
<script>
    var debug= layui.setter.debug;
    layui.data.done = function (d) {
        //开启调试情况下获取接口赋值数据
        if (debug) { console.log(d.params.data); }
 
        layui.use(['admin', 'form', 'coreHelper'], function () {
            var $ = layui.$
                , setter = layui.setter
                , admin = layui.admin
                , coreHelper = layui.coreHelper
                , form = layui.form;
            form.render(null, 'LAY-app-CoreCmsPlanOrder-detailsForm');
        });
    };
 
 
    function print() {
 
        // 使用方法:
        // 假设你有一个id为"printSection"的HTML元素,你想打印这个元素的内容
       
 
        var v = document.createElement("div");
        $(v).append($("#LAY-app-CoreCmsPlanOrder-detailsForm").prop("outerHTML") + '<style type="text/css">table { width: 595px;border-collapse: collapse;} td {border:1px solid #F00 }</style></div>');
 
        var h = window.open("Print_window", "_blank");
        h.document.write($(v).prop("outerHTML"));
        h.document.close();
        h.print();
        h.close();
    }
 
   
 
    
 
   
    
</script>