935090232@qq.com
2022-01-24 6d78f8ab222498d727e91983d0511d8119d95aa3
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
<!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>