Helius
2022-05-27 4351e71d782741143a98f86f6648acd16689165f
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
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<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"/>
    <!-- 本框架基本脚本和样式 -->
    <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>
 
</head>
<body>
<div class="ibox-content">
    <form class="form-horizontal" id="dataform"
          onsubmit="javascripr:return false;">
            <input type="hidden" name="id" th:value="${obj.id }">
 
        <input type="hidden" name="salePlatform" value="线下">
        <div class="form-group">
            <label class="col-sm-2 control-label">套餐余额<span class="text-danger">*</span></label>
            <div class="col-sm-4">
                <input type="text"  class="form-control" name="balance"
                       th:value="${obj.balance}" datatype="*1-20" nullmsg="套餐余额不能为空">
                <div class="Validform_checktip"></div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">套餐余次<span class="text-danger">*</span></label>
            <div class="col-sm-4">
                <input type="text"  class="form-control" name="surplusCount"
                       th:value="${obj.surplusCount}" datatype="*1-20" nullmsg="套餐余次不能为空">
                <div class="Validform_checktip"></div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">到期时间</label>
            <div class="col-sm-4">
                <input name="failTime" type="text" datatype="*"
                       class="form-control  datetimepicker" nullmsg="到期时间不能为空" ignore="ignore"
                       style=" display: inline;"
                       th:value="${#dates.format(obj.failTime , 'yyyy-MM-dd HH:mm')}" >
                <div class="Validform_checktip"></div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">是否使用完成<span class="text-danger">*</span></label>
            <div class="col-sm-4">
                <select  class="form-control " d="isOver" name="isOver">
                    <option value="N" th:selected="${obj.isOver == 'N'}">否</option>
                    <option value="Y" th:selected="${obj.isOver == 'Y'}">是</option>
                </select>
            </div>
        </div>
 
        <div class="form-group">
            <div class="col-sm-4 col-md-offset-2" id="projBox">
                <table class="table table-striped table-hover table-bordered"
                       id="mgrid">
                    <thead>
                    <tr>
                        <th>序号</th>
                        <th>项目名称</th>
                        <th width="140px" class="isShowNum">绑定价<span
                                class="text-danger">*</span></th>
                        <th width="140px" class="isShowNum">次数<span
                                class="text-danger">*</span></th>
 
                    </tr>
                    </thead>
                    <tbody id="projId">
 
 
                            <tr th:each="item,count:${obj.taocanProjUse }" >
                                <td th:text="${count.index}+1"></td>
                                <td>[[${item.projName}]]</td>
                                <td><input  maxlength="8" datatype="price" nullmsg="绑定价不能为空"
                                            th:id="'a'+${count.index}" errormsg="请填写正数可为两位小数" class="form-control  projItem"
                                            th:name="'taocanProjUse['+${count.index}+'].price'"
                                            th:value="${item.price}"><div class="Validform_checktip"></div></td>
                                <td><input type="hidden"
                                           th:name="'taocanProjUse['+${count.index}+'].id'"
                                           th:value="${item.id}" />
                                    <input  datatype="n" type="number" maxlength="8" nullmsg="数量不能为空" ignore="ignore"  errormsg="请填写正数"
                                            th:id="'n'+${count.index}" class="form-control projNumber"
                                            th:name="'taocanProjUse['+${count.index}+'].surplusCount'"
                                            th:value="${item.surplusCount}">    <div class="Validform_checktip"></div></td>
                            </tr>
 
                    </tbody>
 
                </table>
            </div>
        </div>
 
        <div class="form-group">
            <label class="col-sm-2 control-label">套餐备注</label>
            <div class="col-sm-4">
                <textarea    class="form-control" name="remark" rows="4" th:text="${obj?.remark}" ></textarea>
                <div class="Validform_checktip"></div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">修改备注<span class="text-danger">*</span></label>
            <div class="col-sm-4">
                <textarea   datatype="*1-200" class="form-control" name="updateRemark" rows="4"  ></textarea>
                <div class="Validform_checktip"></div>
            </div>
        </div>
 
        <div class="form-group ">
            <div class="col-sm-12 text-center">
                <button onclick="myForm.submit()" class="btn btn-success radius">保存</button>
                &nbsp;&nbsp;&nbsp;&nbsp; <a href="javascript:;"
                                            onclick="MTools.closeForm()" class="btn btn-danger radius">取消</a>
            </div>
        </div>
    </form>
 
</div>
 
<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
<script th:inline="javascript">
    var myForm = null;
    $(function() {
        //初始化时间格式
        var initParam = {
            format : "yyyy-mm-dd", //默认显示年与日,如果想显示十分秒:"yyyy-mm-dd hh:ii:ss"
            minView : "2", //"month",只显示年月日的选择,不会再跳转去选择时分秒;如果想要选择时分秒的:"hour"
        };
        MTools.ininDatetimepicker(initParam);
        myForm = MForm.initForm({
            invokeUrl : basePath+"/admin/taoCanUser/addOrModify",
            afterSubmit : function() {
                if(parent.myGrid) {
                    parent.myGrid.serchData();
                }
 
                if (parent.app) {
                    parent.app.refreshTable();
                }
            },
        });
    });
</script>
</body>
</html>