| <!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> | 
|   | 
| </head> | 
| <body class=" container-fluid"> | 
| <div class="pd-10"> | 
|     <!-- 搜索框部分start --> | 
|     <div class="row form-head"> | 
|         <form class="form-inline" id="serchform"> | 
|             <div class="form-group mr-20"> | 
|                 <label >门店编号</label> | 
|                 <input autocomplete="off"   name="shopNo" type="text" class="form-control"> | 
|             </div> | 
|             <div class="form-group mr-20"> | 
|                 <label >门店名称</label> | 
|                 <input autocomplete="off"   name="shopName" type="text" class="form-control"> | 
|             </div> | 
|   | 
|   | 
|             <div class="form-group"> | 
|                 <button onclick="myGrid.serchData(1)" type="button" | 
|                         class="btn btn-sm btn-info"> | 
|                     <i class="fa fa-search "></i> 搜索 | 
|                 </button> | 
|                 <button type="reset" class="btn btn-sm btn-info "> | 
|                     <i class="fa fa-refresh "></i> 重置 | 
|                 </button> | 
|             </div> | 
|         </form> | 
|     </div> | 
|     <div class="row mt-10"> | 
|         <div id="option-bar"> | 
|             <!-- 功能按钮部分 --> | 
|             <button matrix:btn="shopInfo-add"  onclick="openAdd()" type="button" class="btn btn-info btn-sm"><i class="fa fa-add" ></i> 新增</button> | 
|             <button matrix:btn="shopInfo-edit"  onclick="openEdit()" type="button" class="btn btn-info btn-sm"><i class="fa fa-edit" ></i> 编辑</button> | 
|             <button matrix:btn="shopInfo-dels"  onclick="myGrid.delItems()" type="button" class="btn btn-danger btn-sm"><i class="fa fa-trash" ></i>批量删除</button> | 
|         </div> | 
|         <!-- 数据表格部分 --> | 
|         <table id="mgrid"> | 
|             <thead> | 
|             <tr> | 
|                 <th data-checkbox="true"></th> | 
|                 <th data-formatter="MGrid.indexfn" data-align="center" data-width="30px">序号</th> | 
|                 <th data-field="shopNo" data-sortable="true">门店编号</th> | 
|                 <th data-field="shopName">门店名称</th> | 
|                 <th data-field="shopShortName">门店简称</th> | 
|                 <th data-field="shopTel">门店电话</th> | 
|                 <th data-field="rent">门店租金</th> | 
|                 <th data-field="bankNo">银行卡号</th> | 
|                 <th data-field="bankName">开户行</th> | 
|                 <th data-field="bankOwnerName">开户人姓名</th> | 
|                 <th data-field="shopAddr">门店地址</th> | 
|                 <th data-field="id" data-formatter="buidOperate">操作</th> | 
|             </tr> | 
|             </thead> | 
|         </table> | 
|         <!-- 数据表格部分end --> | 
|     </div> | 
| </div> | 
|   | 
| <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script> | 
| <script type="text/javascript"> | 
|     $(".select2").select2(); | 
|     MTools.autoFullSelect(); | 
|     var myGrid; | 
|     $(function () { | 
|         myGrid = MGrid.initGrid({ | 
|             url: basePath+"/hiveErp/shopInfo/showList", | 
|             delUrl: basePath+"/hiveErp/shopInfo/del" | 
|         }); | 
|     }); | 
|   | 
|     function openAdd() { | 
|         layer.open({ | 
|             type: 2, | 
|             title: "添加门店", | 
|             area: MUI.SIZE_M, | 
|             content: [basePath+'/hiveErp/shopInfo/editForm'] | 
|         }); | 
|     } | 
|   | 
|     //打开编辑界面 | 
|     function openEdit() { | 
|         var id = myGrid.getSelectItemId(); | 
|         layer.open({ | 
|             type: 2, | 
|             title: "编辑门店", | 
|             area: MUI.SIZE_M, | 
|             maxmin: true, | 
|             content: [basePath+'/hiveErp/shopInfo/editForm?id=' + id] | 
|         }); | 
|     } | 
|   | 
|     function buidOperate(value, row, index) { | 
|         var html = []; | 
|   | 
|   | 
|         html [0]= '<button class="btn btn-success" onclick="downQrcode('+row.id+')" >下载门店小程序码</button>'; | 
|   | 
|         return html.join(""); | 
|     } | 
|   | 
|   | 
|     function downQrcode(id){ | 
|   | 
|             $.AjaxProxy().invoke(basePath+'/hiveErp/shopInfo/getProductShareQrcode/'+id, | 
|                 function (loj) { | 
|                     window.open(   loj.getString(0,"qrcode")); | 
|                 }); | 
|   | 
|     } | 
|   | 
|   | 
| </script> | 
|   | 
|   | 
| </body> | 
| </html> |