| <!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"/> | 
|     <!-- 本框架基本脚本和样式 --> | 
|     <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> | 
|     <link rel="stylesheet" | 
|           th:href="@{/plugin/zTree/zTreeStyle/zTreeStyle.css}" | 
|           type="text/css"> | 
|     <script type="text/javascript" | 
|             th:src="@{/plugin/zTree/jquery.ztree.core-3.5.min.js}"></script> | 
|     <script type="text/javascript" | 
|             th:src="@{/plugin/zTree/jquery.ztree.excheck.min.js}"></script> | 
| </head> | 
| <body class=" container-fluid"> | 
| <div class="pd-10"> | 
|     <div class="ibox-content"> | 
|         <!-- 搜索框部分start --> | 
|         <form class="form-inline" id="serchform"> | 
|             <div class="form-group mr-20"> | 
|                 <div class="btn-group search-list " data-for="search-text"> | 
|                     <label for="instoreType">商品名称</label> <input autocomplete="off"   id="search-text" name="name" placeholder="输入查询关键词" | 
|                                                                  type="text" class="form-control"> | 
|                 </div> | 
|             </div> | 
|             <div class="form-group mr-20"> | 
|                 <label for="instoreType">商品类型</label> <select | 
|                     class="form-control" name="goodType" id="goodType"> | 
|                 <option value='家居产品'>家居产品</option> | 
|                 <option value='项目'>项目</option> | 
|                 <option value='套餐'>套餐</option> | 
|                 <option value='充值卡'>充值卡</option> | 
|   | 
|             </select> | 
|             </div> | 
|             <div class="form-group mr-20"> | 
|                 <label for="staus">状态</label> | 
|                 <select class="form-control autoFull" name="staus" nullmsg="状态不能为空" dataType="*" id="staus" | 
|                         data-filed="name" | 
|                         data-value="name" | 
|                         th:data-url="@{/admin/dataDictionary/showDataDictionary}" | 
|                         data-param="{type:'项目状态'}" > | 
|                     <option value=''>请选择项目状态</option> | 
|                 </select> | 
|             </div> | 
|   | 
|             <div class="form-group mr-20"> | 
|                 <label for="goodsSortId">产品分类</label> | 
|                 <select class="form-control select2" size="1" name ="goods.goodsSortId"  id="goodsSortId"> | 
|                     <option value=''>--选择产品分类--</option> | 
|                 </select> | 
|             </div> | 
|             <!-- end --> | 
|             <div class="form-group mr-20 "> | 
|                 <button  onclick="myGrid.serchData()" type="button" class="btn btn-info btn-sm"><i class="fa fa-search " ></i> 搜索</button> | 
|                 <button  onclick="myGrid.resetForm()" type="button" class="btn btn-info btn-sm"><i class="fa fa-refresh " ></i> 重置</button> | 
|             </div> | 
|         </form> | 
|   | 
|         <!-- 搜索框部分en --> | 
|   | 
|         <table id="mgrid" data-url="" > | 
|             <thead> | 
|             <tr> | 
|                 <th data-checkbox="true"  ></th> | 
|                 <th data-formatter="MGrid.indexfn" data-align="center"  data-width="30px" >序号</th> | 
|                 <th data-field="name" >商品名称</th> | 
|                 <th data-field="sealPice">售价/(本金)</th> | 
|                 <th data-field="referencePice" >参考价/(赠送金额)</th> | 
|                 <th data-field="realSealCount">真实销量</th> | 
|                 <th data-field="staus">状态</th> | 
|                 <th data-field="isPresent">是否赠送</th> | 
|                 <th data-field="goodType">类型</th> | 
|                 <th data-field="cateName" >分类</th> | 
|                 <th data-field="isCourse"     data-formatter="getCourse">套餐卡</th> | 
|                 <th data-field="createTime" data-formatter="MGrid.getTime">创建时间</th> | 
|   | 
|             </tr> | 
|             </thead> | 
|         </table> | 
|   | 
|         <div class="row" > | 
|             <button class="btn btn-success center-block" onclick="selectoption()" >确认选择</button> | 
|         </div> | 
|     </div> | 
| <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script> | 
| <script type="text/javascript" th:inline="javascript"> | 
|     var myGrid; | 
|     $(function(){ | 
|         //初始化商品类型搜索列表 | 
|         initGoodsTypes(); | 
|         //初始化商品属性搜索列表 | 
|         MTools.autoFullSelect(); | 
|         $(".select2").select2(); | 
|         //初始化表格 | 
|         myGrid=MGrid.initGrid({ | 
|             url:basePath+"/admin/shoppinggoods/showList", | 
|             height:500, | 
|             clickToSelect: true,// 点击行时选中 | 
|             mutexClick:false,//开启互斥点击 | 
|         }); | 
|     }); | 
|     function getCourse(value, row, index){ | 
|         if(value=='Y'){ | 
|             return "是" | 
|         } | 
|         return '否'; | 
|     } | 
|   | 
|   | 
|     /** | 
|      * 初始化产品列表 | 
|      */ | 
|     function initGoodsTypes() { | 
|         $.AjaxProxy({ | 
|             a : false, | 
|             c : false | 
|         }).invoke(basePath+"/admin/goodstype/all", function(loj) { | 
|             $("#goodsSortId").createSelectTree(loj.attr("result").rows, { | 
|                 append : true, | 
|                 value:"typeName" | 
|             }); | 
|         }); | 
|   | 
|     } | 
|   | 
|     function selectoption(){ | 
|         var arr=myGrid.initParam.$table.bootstrapTable('getSelections'); | 
|         parent.callback(arr); | 
|         parent.layer.close(parent.layer.getFrameIndex(window.name)); | 
|     } | 
| </script> | 
|   | 
| </body> | 
| </html> |