yujian
2020-06-02 f7716dac347aafef6e9a29f34c5f3e83aad3b286
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
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
        <title>订单统计详情</title>
        <link rel="stylesheet" type="text/css" href="../../css/doui.min.css"/>
        <link rel="stylesheet" type="text/css" href="../../layui/css/layui.css"/>
        <script src="../../js/doui.min.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../js/requestHost.js" type="text/javascript" charset="utf-8"></script>
        <script type="text/javascript">
            doui.importLoad({
                importArray: [
                    // 雷打不动
                    getHostPath() + "js/jquery.min.js",
                    getHostPath() + "js/vue.min.js",
                    // 字体图标
                    getHostPath() + "fontAdmin/iconfont.css",
                    getHostPath() + "font/iconfont.css",
                    // dom模板
                    getHostPath() + "css/admin-all.css",
                    getHostPath() + "js/admin-creat.js",
                    
                ],
            });
        </script>
        <style>
            .layui-table[lay-skin=row] td, .layui-table[lay-skin=row] th {
                border-width: 1px 1px 1px 1px;
            }
        </style>
        
    </head>
    <body>
             <div id="orderInfo"  style="text-align: center;">
                 <table class="layui-table" lay-skin="row">
                   <colgroup>
                     <col width="50">
                     <col width="50">
                     <col width="50">
                     <col width="50">
                   </colgroup>
                   <thead> 
                     <tr>
                      <th style="text-align: center;">状态</th>
                       <th style="text-align: center;">自购</th>
                       <th style="text-align: center;">分享</th>
                       <th style="text-align: center;">总计</th>
                     </tr> 
                   </thead>
                   <tbody>
                     <tr>
                       <td>未到账</td>
                       <td>{{selfNum}}</td>
                       <td>{{shareNum}}</td>
                       <td>{{selfNum + shareNum}}</td>
                    </tr>
                    <tr>
                        <td>已到账</td>
                        <td>{{selfNumEnd}}</td>
                        <td>{{shareNumEnd}}</td>
                        <td>{{selfNumEnd + shareNumEnd}}</td>
                    </tr>
                    <tr style="background-color: #00C5CD;">
                        <td>总计</td>
                        <td>{{selfNum + selfNumEnd}}</td>
                        <td>{{shareNum + shareNumEnd}}</td>
                        <td>{{selfNumEnd + shareNumEnd + selfNum + shareNum}}</td>
                    </tr>
                   </tbody>
                 </table>  
                
                <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                  <legend>等级升级 (付款金额大于1元订单)</legend>
                </fieldset>
                
                <table class="layui-table" lay-skin="row">
                  <colgroup>
                    <col width="50">
                    <col width="50">
                    <col width="50">
                    <col width="50">
                  </colgroup>
                  <thead> 
                    <tr>
                      <th style="text-align: center;">状态</th>
                      <th style="text-align: center;">自购</th>
                      <th style="text-align: center;">分享</th>
                      <th style="text-align: center;">总计</th>
                    </tr> 
                  </thead>
                  <tbody>
                    <tr>
                      <td>未到账</td>
                      <td>{{selfAccount}}</td>
                      <td>{{shareAccount}}</td>
                      <td>{{selfAccount + shareAccount}}</td>
                    </tr>
                    <tr>
                        <td>已到账</td>
                        <td>{{selfAccountEnd}}</td>
                        <td>{{shareAccountEnd}}</td>
                        <td>{{selfAccountEnd + shareAccountEnd}}</td>
                    </tr>
                    <tr style="background-color: #00C5CD;">
                        <td>总计</td>
                        <td>{{selfAccount + selfAccountEnd}}</td>
                        <td>{{shareAccount + shareAccountEnd}}</td>
                        <td>{{selfAccount + shareAccount + selfAccountEnd + shareAccountEnd}}</td>
                    </tr>
                   </tbody>
                </table>  
             </div>
    </body>
</html>
 
 
 
<script type="text/javascript">
     
     doui.onReady({
         success: function() {
            
            // 获取传递过来的值
            var uid = null;
            doui.urlParam({
                success: function (res) {
                    uid = res.id;
                 }
            });
            
            var vm = new Vue({
                el: "#orderInfo",
                data: {
                    selfNum: 0,
                    shareNum: 0,
                    selfNumEnd: 0,
                    shareNumEnd: 0,
                    selfAccount: 0,
                    shareAccount: 0,
                    selfAccountEnd: 0,
                    shareAccountEnd: 0,
                },
            });
            
            doui.request({
                type: "jsonp",
                url: gethttp() + "/admin/new/api/v1/order/countOrderInfo",
                data: {uid: uid},
                success: function (res)
                {
                    if (res.code == 0) { 
                         vm.selfNum = res.data.selfNum;
                         vm.shareNum = res.data.shareNum;
                         vm.selfNumEnd = res.data.selfNumEnd;
                         vm.shareNumEnd = res.data.shareNumEnd;
                         vm.selfAccount = res.data.selfAccount;
                         vm.shareAccount = res.data.shareAccount;
                         vm.selfAccountEnd = res.data.selfAccountEnd;
                         vm.shareAccountEnd = res.data.shareAccountEnd;
                    }
                }
            });
        },
    });    
        
</script>