فهرست منبع

首页弹窗修改

yanym 1 سال پیش
والد
کامیت
d1e3decafa

+ 47 - 13
suishenbang-admin/src/main/resources/templates/system/alertConfiguration/add.html

@@ -46,6 +46,21 @@
                 </select>
             </div>
         </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">部门类型:</label>
+            <div class="col-sm-3">
+                <select title="请选择公司" id="deptType1" name="deptType1" class="form-control m-b selectpicker">
+                </select>
+            </div>
+            <div class="col-sm-3">
+                <select title="请选择大区" id="deptType2" name="deptType2" class="form-control m-b selectpicker">
+                </select>
+            </div>
+            <div class="col-sm-3">
+                <select title="请选择销售部" id="deptType3" name="deptType3" class="form-control m-b selectpicker">
+                </select>
+            </div>
+        </div>
 <!--        <div class="form-group">
             <label class="col-sm-3 control-label">是否启动:</label>
             <div class="col-sm-8">
@@ -56,18 +71,6 @@
                 </div>
             </div>
         </div>-->
-        <!--<div class="form-group">-->
-            <!--<label class="col-sm-3 control-label">是否启动</label>-->
-            <!--<div class="col-sm-8">-->
-                <!--<label class="radio-box">-->
-                    <!--<input type="radio" name="alertStatus" value="0">未启动-->
-                <!--</label>-->
-                <!--<label class="radio-box">-->
-                    <!--<input type="radio" name="alertStatus" value="1">启动-->
-                <!--</label>-->
-                <!--<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>-->
-            <!--</div>-->
-        <!--</div>-->
     </form>
 </div>
 <th:block th:include="include :: footer" />
@@ -75,8 +78,34 @@
 <th:block th:include="include :: bootstrap-select-js" />
 <script type="text/javascript">
     var prefix = ctx + "system/configuration"
+
+    $(document).ready(function () {
+        var obj = {
+            parType: "diy_level",
+            parValue: ""
+        }
+        // getCompanyList(obj);
+    })
+
     $("#form-configuration-add").validate({
-        focusCleanup: true
+        focusCleanup: true,
+        rules:{
+            alertContent:{
+                required:true
+            },
+            alertStartTime:{
+                required:true
+            },
+            alertEndTime:{
+                required:true
+            },
+            alertNum: {
+                required:true
+            },
+            userType: {
+                required:true
+            }
+        },
     });
 
     function submitHandler() {
@@ -94,6 +123,11 @@
         format: "yyyy-mm-dd hh:ii",
         autoclose: true
     });
+
+    /* 获取公司列表 */
+    function getCompanyList(obj) {
+        $.operate.post(prefix + "/searchOrg", obj);
+    }
 </script>
 </body>
 </html>

+ 23 - 15
suishenbang-admin/src/main/resources/templates/system/alertConfiguration/configuration.html

@@ -51,15 +51,15 @@
                 <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:configuration:add">
                     <i class="fa fa-plus"></i> 添加
                 </a>
-                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:configuration:edit">
-                    <i class="fa fa-edit"></i> 修改
-                </a>
-                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:configuration:remove">
-                    <i class="fa fa-remove"></i> 删除
-                </a>
-                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:configuration:export">
-                    <i class="fa fa-download"></i> 导出
-                 </a>
+                <!--<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:configuration:edit">-->
+                    <!--<i class="fa fa-edit"></i> 修改-->
+                <!--</a>-->
+                <!--<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:configuration:remove">-->
+                    <!--<i class="fa fa-remove"></i> 删除-->
+                <!--</a>-->
+                <!--<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:configuration:export">-->
+                    <!--<i class="fa fa-download"></i> 导出-->
+                 <!--</a>-->
             </div>
             <div class="col-sm-12 select-table table-striped">
                 <table id="bootstrap-table"></table>
@@ -89,23 +89,27 @@
                 {
                     field : 'alertContent', 
                     title : '弹框内容',
-                    width : '300px',
+                    width : '200px',
                     formatter: function(value, row, index) {
                         return $.table.tooltip(value);
                     }
                 },
                 {
                     field : 'alertStartTime', 
-                    title : '弹框开始时间'
+                    title : '开始时间'
                 },
                 {
                     field : 'alertEndTime', 
-                    title : '弹框结束时间'
+                    title : '结束时间'
                 },
                 {
                     field : 'alertNum', 
-                    title : '弹框每日可弹次数'
+                    title : '次数'
                 },
+                    {
+                        field : 'salesLevel',
+                        title : '通知部门'
+                    },
                 {
                     field : 'userType',
                     title : '用户类型',
@@ -134,8 +138,12 @@
                     align: 'center',
                     formatter: function(value, row, index) {
                         var actions = [];
-                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.alertId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
-                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.alertId + '\')"><i class="fa fa-remove"></i>删除</a>');
+                        if (row.alertStatus == 0) {
+                            actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.alertId + '\')"><i class="fa fa-remove"></i>删除</a>');
+                        } else {
+                            actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.alertId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
+                            actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.alertId + '\')"><i class="fa fa-remove"></i>删除</a>');
+                        }
                         return actions.join('');
                     }
                 }]