Helius
2021-01-11 69d8c54fe4d0c90de196f3d92f74933d06529902
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
 
 
 
 
 
<!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="Pragma" CONTENT="no-cache">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
    content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<LINK rel="Bookmark" href="../images/favicon.ico">
<!-- 本框架基本脚本和样式 -->
<script type="text/javascript"
    th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
<script type="text/javascript"
    th:src="@{/js/systools/MBase.js}"></script>
<title></title>
</head>
 
<div class="panel-body">
    <div class="form-group panel panel-info"
        style="padding: 10px; padding-bottom: 0px; border-color: #bce8f1; margin: 5px 20%">
        <div class="panel-heading">
            <h1>客户姓名:[[${vipInfo.vipName}]]</h1>
        </div>
        <form class="form-horizontal" id="dataform"
            style="height: 600px; overflow: scroll; overflow-x: unset;">
            <input autocomplete="off"   type="hidden" name="onId" th:value="${onId }">
 
                <h1 th:if="(${#maps.size(taocanProjMap) eq 0 } and ${#lists.size(projList)} eq 0)" >该会员没有可消耗的项目!</h1>
 
                    <table th:if="(${#maps.size(taocanProjMap) ne 0} or ${#lists.size(projList) ne 0})" class="table table-bordered">
                        <tr>
                            <td colspan="5"><label >预约时间</label>
                                <input autocomplete="off"   type="text" class=" datetimepicker" id="yyStartTime"
                                name="yyTime" nullmsg="请选择预约时间" datatype="*"
                                       th:value="${#dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd HH:mm')}"  />
                            </td>
                        </tr>
                        <tr class="active">
                            <th>项目名称</th>
                            <th>数量</th>
                            <th>余次</th>
                            <th>余额</th>
                            <th>有效期</th>
                            <th>来源</th>
                            <th>单次划扣次数</th>
                        </tr>
                        <tr>
                            <td colspan="60" class="active"><label> 套餐使用情况 </label></td>
                        </tr>
 
                        <th:block th:if="${#maps.size(taocanProjMap)>0}">
 
                            <th:block th:each="item,in:${taocanProjMap}"  >
                                <th:block th:each="projUser,str:${item.value}" th:with="length=${#lists.size(item.value)}"  >
 
                                    <th:block th:if="${str.index == 0 }">
 
                                        <tr class="success" colspan="60">
                                            <td><label>套餐名称:[[${projUser.shoppingGoods.name }]]
                                                <span th:if="${projUser.type eq '套餐卡'}">[[${item.key }]][套餐卡]</span>
                                            </label></td>
                                            <td></td>
                                            <td><th:block th:if="${projUser.type eq '套餐卡'}">
                                                <span th:if="${projUser.surplusCount gt 10000 }">不限</span>
                                                <span th:if="${projUser.surplusCount lt 10000 }">[[${projUser.surplusCount}]]</span>
                                            </th:block></td>
                                            <td><span th:if="${projUser.type eq '套餐卡'}">[[${projUser.balance }]]</span></td>
                                            <td><span th:if="${projUser.type eq '套餐卡'}">
                                                <span
                                                      th:text="${#dates.format(projUser?.failTime,'yyyy年MM月dd日')}"
                                                       ></span>
                                            </span></td>
                                            <td></td>
                                            <td></td>
                                        </tr>
                                    </th:block>
                                    <tr>
                                        <td><input autocomplete="off"   type="checkbox" name="projBox"
                                                   th:value="${projUser.id }">[[${projUser.name}]](¥[[${projUser.price }]])</td>
                                        <td><input autocomplete="off"   class="form-control"
                                                   th:max="${projUser.surplusCount}" min="1" style="width: 70px"
                                                   type="number" value="1"></td>
                                            <th:block th:if="${projUser.type ne '套餐卡'}">
                                                <td>[[${projUser.surplusCount}]]</td>
                                                <td>[[${projUser.balance }]]</td>
                                                <td><span
                                                        th:text="${#dates.format(projUser?.failTime,'yyyy年MM月dd日')}"
                                                ></span></td>
                                                <td>[[${projUser.source}]]</td>
                                                <td>[[${projUser.shoppingGoodsAssemble?.deductionNum}]]</td>
                                            </th:block>
                                            <th:block th:if="${projUser.type eq '套餐卡'}">
                                                <td>-</td>
                                                <td>-</td>
                                                <td>-</td>
                                                <td>-</td>
                                                <td>[[${projUser.shoppingGoodsAssemble?.deductionNum}]]</td>
                                            </th:block>
                                    </tr>
 
                                    <th:block th:if="${str.index == length-1 }">
                                        <th:block
                                                th:if="${#lists.size(projUser.shoppingGoods.assembleGoods)>0}">
                                            <tr>
                                                <td colspan="60" class="active"><label>[[${projUser.shoppingGoods.name }]]套餐内产品
                                                </label></td>
                                            </tr>
                                                <tr th:each="assembList:${projUser.shoppingGoods.assembleGoods }">
                                                    <td> [[${assembList.goods?.name }]]</td>
                                                </tr>
                                            <tr>
                                                <td colspan="60"><label>历史备注:</label> <code>[[${projUser.remark }]]</code></td>
                                            </tr>
                                        </th:block>
                                    </th:block>
 
                                </th:block>
                            </th:block>
 
 
 
                        </th:block>
                        <th:block th:if="${#lists.size(projList)>0}">
                            <tr>
                                <td colspan="60" class="success"><label>项目使用情况</label></td>
                            </tr>
                                <tr th:each="item:${projList }">
                                    <td class="check"><input autocomplete="off"   type="checkbox" name="projBox"
                                                             th:value="${item.id }">[[${item.name }]]</td>
                                    <td><input autocomplete="off"   class="form-control" th:max="${item.surplusCount}"
                                               min="1" style="width: 70px" type="number" value="1" /></td>
                                    <td>[[${item.surplusCount}]]</td>
                                    <td>[[${item.balance}]]</td>
                                    <td><span th:text="${#dates.format(item?.failTime,'yyyy年MM月dd日')}"
                                    ></span></td>
                                    <td>[[${item.source }]]</td>
                                </tr>
                        </th:block>
                        <tr>
                        </tr>
                    </table>
            </c:otherwise>
            </c:choose>
             <input type="text"  hidden="hidden" th:value="${vipInfo.id }" name="vipId" />
        </form>
    </div>
    <div class="form-group ">
        <div class="col-sm-12 text-center">
            <a href="javascript:;" onclick="myForm.submit()"
                class="btn btn-success radius">确认</a> &nbsp;&nbsp;&nbsp;&nbsp;
            <button onclick="MTools.closeForm()" class="btn btn-danger radius"
                type="button">关闭</button>
        </div>
    </div>
</div>
<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script><script type="text/javascript">
 
    $('.datetimepicker')
            .datetimepicker(
                    {
                        format : "yyyy-mm-dd hh:ii",
                        maxView : 2,
                        minView : 0,
                        startView : 2,
                        todayBtn : true,
                        setStartDate : '<fmt:formatDate value="${now}" pattern="yyyy-MM-dd HH:MM"/>'
 
                    });
 
    var myForm = MForm.initForm({
        invokeUrl : basePath+"/admin/projService/addService",
        beforeSubmit : function() {
 
 
            var projIds = "";
 
            var param=this.extendParam;
 
            $('input:checkbox[name=projBox]:checked').each(function(i) {
                var num = $(this).parent("td").next("td").find("input").val();
                var puseId= $(this).val();
                param["serviceItems["+i+"].puseId"]=puseId;
                param["serviceItems["+i+"].count"]=num;
                projIds+=puseId;
            });
 
            if (projIds == "") {
                layer.alert("请选择要消耗的项目!");
                return false;
            }
            return true;
        },
        afterSubmit : function() {
            MTools.closeForm();
        },
    });
</script>
</body>
 
</html>