wzy
2021-04-01 d388e2788b7ef088d7cd40f901b0acdcec460bc3
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
 
 
<!doctype html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
 
<meta
    content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
    name="viewport" />
<title th:text="${session.userInfo.shopName }"></title>
 
<!-- Set render engine for 360 browser -->
<meta name="renderer" content="webkit">
 
<!-- No Baidu Siteapp-->
<meta http-equiv="Cache-Control" content="no-siteapp" />
 
 
 
<!-- Add to homescreen for Chrome on Android -->
<meta name="mobile-web-app-capable" content="yes">
 
 
<!-- Add to homescreen for Safari on iOS -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="Amaze UI" />
 
 
<!-- Tile icon for Win8 (144x144 + tile color) -->
 
<meta name="msapplication-TileColor" content="#0e90d2">
<script type="text/javascript"
    th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
<script type="text/javascript"
    th:src="@{/js/systools/DDMBase.js}"></script>
<link rel="stylesheet"
    th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
<link rel="stylesheet"
    th:href="@{/plugin/amazingUI/css/app.css}">
<link rel="stylesheet" type="text/css"
      th:href="@{/css/dingPersonalCar.css}" >
 
    
  
   
<link rel="stylesheet" type="text/css"
      th:href="@{/plugin/LCalendar/src/css/LCalendar.css}">
</head>
<body>
    <!-- 购物车页面 -->
    <!-- 头部开始 -->
    <header data-am-widget="header" class="am-header color-w back-m1">
        <div class="am-header-left am-header-nav">
            <a th:href="@{/admin/redirect/hive/mobile/order-use?foot=3}" class=""> <i
                class="am-header-icon am-icon-chevron-left"></i>
            </a>
        </div>
 
        <h1 class="am-header-title">
            <a href="#title-link" class=""> 新建消耗 </a>
        </h1>
 
        <!-- <div class="am-header-right am-header-nav">
            <a href="###" class=""> <i class="am-header-icon am-icon-bars"></i>
            </a>
        </div> -->
    </header>
    <!-- 头部结束 -->
 
                <!-- 购物车表单开始 -->
        <form class="am-form am-form-horizontal" id="dataform"
                        onsubmit="javascripr:return false;">
                <div class="main main1">
                    <div data-am-widget="list_news"
                        class="am-list-news am-list-news-default">
                        <div class="am-list-news-bd">
                            <ul class="am-list" id="ul_order_use">
                            
                            </ul>
                        </div>
                    </div>
                    <div id="submitBtn">
                        <div class="am-input-group am-form-group  am-input-group-primary am-g">
                            <div class="am-u-sm-4">
                                <span class="am-input-group-label">预约时间</span> 
                            </div>
                            <!-- 
                            <div class="am-u-sm-8">    
                                <input autocomplete="off"   type="text" readonly="readonly"
                                    name="yyTime" class="am-form-field  datetimepicker"  />
                             -->
                             </div>
                            <div class="am-u-sm-8">
                                <div>
                                    <input autocomplete="off"   id="demo2" type="text" readonly="" placeholder="日期和时间选择特效" value="2016-05-11 17:44" data-lcalendar="2016-05-11,2016-05-11" />
                                   </div>
                               </div>
                        </div>
                        <div  class="inputBtn">
                            <button  class="am-btn btn-m1 am-radius am-btn-block"
                                type="button" onclick="myForm.submit()">消耗</button>
                        </div>
                    </div>
            </div>
    </form>
        <div>
            <input autocomplete="off"   id="demo1" type="text" readonly="" placeholder="日期选择特效" data-lcalendar="2016-05-11,2016-05-11" />
        </div>
        
        <div>
            <input autocomplete="off"   id="demo3" type="text" readonly="" placeholder="时间选择特效" />
        </div>
        <div>
            <input autocomplete="off"   id="demo4" type="text" readonly="" placeholder="年月选择特效" />
        </div>
            
    <!-- 购物车表单结束 -->
 
 
    <script type="text/x-handlebars-template" id="amz-tpl">
  {{>header header}}
 
  {{>menu menu}}
 
  {{>slider slider}}
 
  {{>list_news list1}}
 
  {{>gallery gallery}}
 
  {{>list_news list2}}
 
  {{>footer footer}}
 
  {{>navbar navbar}}
</script>
    <script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
    <script
        th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
    <!-- index js -->
    <script type="text/javascript">
    $('.datetimepicker').datetimepicker({
        format : "yyyy-mm-dd hh:ii",
        autoclose: true,
    });
    
        //查询消耗列表 isOver=1表示完成,isOver=2未完成
        $(function() {
            $
                    .AjaxProxy({
                        p : {
                            isOver : 2
                        }
                    })
                    .invoke(
                             basePath+"/admin/projService/findAllUnUseService",
                            function(loj) {
                                var html = "";
                                var ids = "";
                                if(loj.getRowCount()>0){
                                
                                for (var i = 0; i < loj.getRowCount(); i++) {
                                    html += ' <li class=" lic  am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-right " >'
                                            + '<div class=" am-u-sm-2 am-list-thumb ">'
                                            + '<label class=" am-checkbox ">'
                                            + '<input autocomplete="off"    type="checkbox" name="projUses['+i+'].id" class="check " value='
                                            + loj.getString(i, "id")
                                            + '>'
                                            + '</label>'
                                            + '</div>'
                                            + '<div class=" am-u-sm-7 am-list-main">'
                                            + '<h3 class="am-list-item-hd">';
                                    if (loj.getString(i, "projInfo")) {
                                        html += loj.getString(i, "projInfo").projName
                                    } else {
                                        html += loj.getString(i, "taocanInfo").name
                                    }
                                    html += '</h3>'
 
                                            + ' </div>'
                                            + '<div class="am-u-sm-3 am-list-thumb">'
                                            + ' <span>余'
                                            + loj.getString(i, "surplusCount")
                                            + '次</span>' + '</div>' + '  </li>';
 
                                }
                                }else{
                                    html="没有可消耗的项目!"
                                    $("#submitBtn").hide();
                                }
                                //显示数据
                                $("#ul_order_use").html(html);
 
                                //初始化表单
                                myForm = MForm
                                        .initForm({
                                            invokeUrl :  basePath+"/admin/projService/addService",
                                            afterSubmit : function(loj) {
                                                var msg = '';
                                                if (loj.attr("result").status == '200') {
                                                    msg = '消耗成功';
                                                    layer
                                                            .open({
                                                                shade : false,
                                                                content : msg,
                                                                className : 'showBox',
                                                                time : 1,
                                                                end : function(
                                                                        elem) {
                                                                    MTools
                                                                            .redirect( basePath+"/admin/redirect/hive/mobile/order-use");
                                                                }
                                                            });
                                                } 
                                            }
                                        });
 
                            });
        });
        
        $(function() {
            $(".check").uCheck('enable');
        })
    </script>
</body>    
    <script 
        th:src="@{/plugin/LCalendar/src/js/LCalendar.js}"></script>
    <script>
    var calendar = new LCalendar();
    calendar.init({
        'trigger': '#demo1', //标签id
        'type': 'date', //date 调出日期选择 datetime 调出日期时间选择 time 调出时间选择 ym 调出年月选择,
        'minDate': '1900-1-1', //最小日期
        'maxDate': new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDate() //最大日期
    });
    var calendardatetime = new LCalendar();
    calendardatetime.init({
        'trigger': '#demo2',
        'type': 'datetime'
    });
    var calendartime = new LCalendar();
    calendartime.init({
        'trigger': '#demo3',
        'type': 'time'
    });
    var calendarym = new LCalendar();
    calendarym.init({
        'trigger': '#demo4',
        'type': 'ym',
        'minDate': '1900-1',
        'maxDate': new Date().getFullYear() + '-' + (new Date().getMonth() + 1)
    });
    </script>
 
 
</html>