Helius
2020-12-23 c554c7ad5405bafa149dbb6429e8245f78b33ffc
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
152
153
154
155
156
157
158
159
<!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="startTime" type="text" class="form-control datetimepicker" id="beginTime">-
                <input autocomplete="off"   name="endTime"  type="text" class="form-control datetimepicker" id="endTime">
            </div>
 
            <div class="form-group mr-20">
 
                <label >仓库</label>
                <select
                        class="form-control autoFull " data-filed="name" data-value="id"
                        name="shopId" id="storeId"
                        th:data-url="@{/admin/warehouse/findShopWarehouse}">
                    <option value="">--请选择仓库--</option>
                </select>
            </div>
 
            <div class="form-group mr-20">
                <label >出库类型</label>
                <select name="type" class=" form-control autoFull"  id="type"
                        style="width: 200px"
                        data-filed="value" data-value="value"
                        th:data-url="@{/admin/customerDictionary/getListByParentCode/CKLX}"
                      >
                    <option value="">--请选择出库类型--</option>
                </select>
            </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="outstore-add" onclick="openAdd()" type="button" class="btn btn-primary btn-sm"><i class="fa fa-plus" ></i> 新建出库</button>
          <!-- TODO  <button matrix:btn="outstore-exportExcel" onclick="exportExcel()" type="button" class="btn btn-default btn-sm"><i class="fa fa-download" ></i> 导出</button>-->
            <span class="alert-warning btn-sm">
                <b>提示:</b> 出库只导出明细
        </span>
        </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="shopName" >门店名称</th>
                <th data-field="suName"  >操作员</th>
                <th data-field="outStoreNo">单号</th>
                <th data-field="time" data-formatter="MGrid.getTime" data-sortable="true">时间</th>
                <th data-field="type" >类型</th>
                <th data-align="center"  data-width="180px" 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">
    var myGrid;
 
 
    $(function(){
 
        //时间
        var _initParam = {
            format : "yyyy-mm-dd hh:ii:ss",
            startView : 2,
            maxView : 3,
            minView : 0
        };
        MTools.ininDatetimepicker(_initParam);
        //限制结束时间不小于开始时间
        var initParam2 = {};
        MTools.limitStartEndTime(initParam2);
 
        //初始化出库单属性搜索列表
        MTools.autoFullSelect();
        myGrid=MGrid.initGrid({
            url:basePath+"/admin/outstore/showList",
            sortName:"time",
            sortOrder:"desc",
        });
 
    });
    function buidOperate(value, row, index){
        var html='<button class="btn btn-default btn-sm mr-5" onClick="openLook('+value+')"  title="查看"><i class="fa fa-lg fa-eye"></i></buttoun>';
        html+='';
        return html;
    }
 
 
 
 
 
    function openLook(id){
        layer.full(
            layer.open({
                type : 2,
                title : "查看出库单",
                area : [ MUI.SIZE_L, '400px' ],
                maxmin : true,
                content : [ basePath+'/admin/outstore/lookForm?id=' + id]
            }));
    }
 
    function openAdd() {
        layer.full(
            layer.open({
                type: 2,
                title: "新增出库单",
                area: [MUI.SIZE_L, '400px'],
                content: [basePath+'/admin/outstore/editForm']
            }));
    }
 
    //导出
        function exportExcel(){
            var type = $("#type").val();
            console.log(type);
            var shopId = $("#shopId").val();
            var beginTime=$("#beginTime").val();
            var endTime=$("#endTime").val();
            window.location.href=basePath+"/admin/outstore/exportExcel?shopId="+shopId+"&startTime="+beginTime+"&endTime="+endTime+"&type="+encodeURI(encodeURI(type));
        }
</script>
 
</body>
</html>