|
|
@@ -5,62 +5,30 @@
|
|
5
|
5
|
<meta charset="UTF-8">
|
|
6
|
6
|
<script src="../Script/Common/huayi.load.js"></script>
|
|
7
|
7
|
<script src="../Script/Common/huayi.config.js"></script>
|
|
8
|
|
- <!--<link rel="stylesheet" href="../css/layer/need/layer.css" />-->
|
|
|
8
|
+ <link rel="stylesheet" href="../css/layer/need/layer.css" />
|
|
9
|
9
|
<link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
|
|
10
|
10
|
<link rel="stylesheet" href="../css/init.css" />
|
|
11
|
|
- <title>知识库主界面</title>
|
|
|
11
|
+ <title>通讯录</title>
|
|
12
|
12
|
<style>
|
|
13
|
|
- .treeTable {
|
|
14
|
|
- height: 400px;
|
|
15
|
|
- /*overflow-y: auto;*/
|
|
|
13
|
+ .toolBar {
|
|
|
14
|
+ padding: 15px 0;
|
|
|
15
|
+ border-bottom: 1px solid #ccc;
|
|
16
|
16
|
}
|
|
17
|
17
|
|
|
18
|
|
- .tree {
|
|
19
|
|
- height: 100%;
|
|
20
|
|
- }
|
|
21
|
|
-
|
|
22
|
|
- .trTitle {
|
|
23
|
|
- width: 100%;
|
|
24
|
|
- height: 34px;
|
|
25
|
|
- line-height: 34px;
|
|
26
|
|
- border-bottom: 1px solid #ebebeb;
|
|
27
|
|
- color: red;
|
|
28
|
|
- font-weight: 700;
|
|
29
|
|
- margin-bottom: 15px;
|
|
30
|
|
- }
|
|
31
|
|
-
|
|
32
|
|
- .treeCon {
|
|
33
|
|
- border: 1px solid #ebebeb;
|
|
34
|
|
- overflow-y: auto;
|
|
35
|
|
- }
|
|
36
|
|
-
|
|
37
|
|
- .ztree li {
|
|
38
|
|
- width: 100%;
|
|
39
|
|
- overflow: hidden;
|
|
40
|
|
- white-space: nowrap;
|
|
41
|
|
- text-overflow: ellipsis;
|
|
42
|
|
- }
|
|
43
|
|
-
|
|
44
|
|
- .content {
|
|
45
|
|
- width: 270px;
|
|
46
|
|
- height: 100%;
|
|
47
|
|
- overflow: hidden;
|
|
48
|
|
- white-space: nowrap;
|
|
49
|
|
- text-overflow: ellipsis;
|
|
50
|
|
- text-align: left;
|
|
51
|
|
- cursor: pointer;
|
|
|
18
|
+ #upFile {
|
|
|
19
|
+ width: initial!important;
|
|
52
|
20
|
}
|
|
53
|
21
|
</style>
|
|
54
|
22
|
</head>
|
|
55
|
23
|
|
|
56
|
24
|
<body class="gray-bg">
|
|
57
|
|
- <div class="container-fluid wrapper-content animated fadeInRight">
|
|
|
25
|
+ <div class="container-fluid wrapper wrapper-content animated fadeInRight">
|
|
58
|
26
|
<div class="daoHang clearfix">
|
|
59
|
27
|
<div class="dhLeft">
|
|
60
|
28
|
<sapn><i class="syIcon"></i>位置:
|
|
61
|
29
|
<a id="ReIndex">首页</a>>
|
|
62
|
|
- <a href="javaScript:;">通讯录</a>>
|
|
63
|
|
- <a href="" class="nowPosition">通讯录列表</a>
|
|
|
30
|
+ <a href="javaScript:;">系统管理</a>>
|
|
|
31
|
+ <a href="" class="nowPosition">通讯录</a>
|
|
64
|
32
|
</sapn>
|
|
65
|
33
|
</div>
|
|
66
|
34
|
<div class="dhRight">
|
|
|
@@ -68,64 +36,314 @@
|
|
68
|
36
|
</div>
|
|
69
|
37
|
</div>
|
|
70
|
38
|
<div class="toolBar clearfix">
|
|
71
|
|
- <div class="toolLeft">
|
|
72
|
|
- <!--<span><input type="text" class="searCon input_" placeholder="请输入要搜索的关键字" style="width: 175px;height: 32px; border: 1px solid #ccc;" /></span>-->
|
|
73
|
|
- <!--<button class="btns searchGo">搜索</button>-->
|
|
74
|
|
- <button class="btns addgroup">添加</button>
|
|
75
|
|
- <button class="btns editgroup">修改</button>
|
|
76
|
|
- <button class="btns deletegroup">删除</button>
|
|
77
|
|
- </div>
|
|
|
39
|
+ <!--<div class="toolLeft">
|
|
|
40
|
+ <span style="display: inline-block;"><input class="fl" type="file" id="upFile" name="upFile" /></span>
|
|
|
41
|
+ <a class="btns" id="daoRu">导入</a>
|
|
|
42
|
+ <a href="muban/AddressBook.xlsx" download="通讯录模板.xlsx" title="点击下载模板" style="margin-right: 10px;">通讯录模板</a>
|
|
|
43
|
+ </div>-->
|
|
78
|
44
|
<div class="toolRight">
|
|
79
|
|
- <button class="btns addConnew">添加通讯录</button>
|
|
80
|
|
- <button class="btns editnew">修改通讯录</button>
|
|
81
|
|
- <button class="btns seenew">查看通讯录</button>
|
|
|
45
|
+ <span>关键字:<input type="text" class="KeyWord" style="height: 31px;"/></span>
|
|
|
46
|
+ <button class="btns searchGo">搜索</button>
|
|
|
47
|
+ <button class="btns return">添加</button>
|
|
|
48
|
+
|
|
|
49
|
+ <a class="btns dbexecl">导出</a>
|
|
82
|
50
|
</div>
|
|
83
|
51
|
</div>
|
|
84
|
|
- <div class="treeTable clearfix">
|
|
85
|
|
- <div class="tree col-md-2">
|
|
86
|
|
- <div class="trTitle">通讯录分组</div>
|
|
87
|
|
- <div class="treeCon">
|
|
88
|
|
- <ul id="treeDemo" class="ztree" style="height: 500px;">
|
|
89
|
|
- <!--类名为ztree是必须的-->
|
|
90
|
|
- </ul>
|
|
|
52
|
+ <!--苗福浩导入-->
|
|
|
53
|
+ <div style="padding: 10px; margin-bottom: 20px;">
|
|
|
54
|
+ <div class="alert alert-info" role="alert">
|
|
|
55
|
+ <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
|
|
|
56
|
+ <span class="sr-only">tips:</span> 上传文件需要严格按照下载的EXCEL模板进行填写!
|
|
|
57
|
+ </div>
|
|
|
58
|
+ <div class="form-inline clearfix">
|
|
|
59
|
+ <div class="form-group">
|
|
|
60
|
+ <a href="muban/AddressBook.xlsx" download="通讯录模板.xlsx" title="点击下载模板" style="margin-right: 10px;">通讯录模板</a>
|
|
|
61
|
+ </div>
|
|
|
62
|
+ <div class="form-group">
|
|
|
63
|
+ <input class="hidden" type="file" id="upFile" name="upFile" accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel,application/x-xls,application/x-xlsx" />
|
|
|
64
|
+ <input class="form-control btn btn-success" title="点击上传Excel文件" type="button" value="上传Excel文件" id="upFileExcel" />
|
|
|
65
|
+ <span class="excelName"></span>
|
|
91
|
66
|
</div>
|
|
92
|
67
|
</div>
|
|
93
|
|
- <div class="tableCon col-md-10">
|
|
94
|
|
- <div class="trTitle">通讯录列表</div>
|
|
95
|
|
- <div style="height: 500px;overflow:auto">
|
|
96
|
|
- <table id="table1" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
|
|
97
|
|
- <thead>
|
|
98
|
|
- <tr>
|
|
99
|
|
- <th data-field="state" data-checkbox="true" data-align="center"></th>
|
|
100
|
|
- <th data-align="center" data-formatter="setCode">编号</th>
|
|
101
|
|
- <th data-align="center" data-field="unitname">单位名称</th>
|
|
102
|
|
- <!--<th data-align="center" data-field="unitaddress">单位地址</th>-->
|
|
103
|
|
- <!--<th data-align="center" data-field="faxnumber">传真</th>-->
|
|
104
|
|
- <th data-align="center" data-field="publicphone">公开电话</th>
|
|
105
|
|
- <th data-align="center" data-field="officetime">办公时间</th>
|
|
106
|
|
- <th data-align="center" data-field="operateduty">工作职责</th>
|
|
107
|
|
- <th data-align="center" data-field="internalphone">内部电话</th>
|
|
108
|
|
- <th data-align="center" data-field="chargeperson">负责人</th>
|
|
109
|
|
- <!--<th data-align="center" data-field="chargepersonpsition">负责人职务</th>-->
|
|
110
|
|
- <!--<th data-align="center" data-field="chargepersonphone">负责人联系方式</th>-->
|
|
111
|
|
- <!--<th data-align="center" data-field="remark">备注</th>-->
|
|
112
|
|
- <th data-align="center" data-formatter="operationBtns">操作</th>
|
|
113
|
|
- </tr>
|
|
114
|
|
- </thead>
|
|
115
|
|
- <tbody id="tbody"></tbody>
|
|
116
|
|
- </table>
|
|
|
68
|
+ <div class="progress">
|
|
|
69
|
+ <div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
|
|
|
70
|
+
|
|
117
|
71
|
</div>
|
|
118
|
|
- <!--<p style="margin-top: 20px;"><button class="btns allDel">批量删除</button></p>-->
|
|
119
|
72
|
</div>
|
|
|
73
|
+ <!--<div class="form-group text-center">
|
|
|
74
|
+ <input type="button" id="importNum" class="form-control btn btn-success" value="导入" />
|
|
|
75
|
+ </div>-->
|
|
120
|
76
|
</div>
|
|
121
|
77
|
|
|
122
|
|
- </div>
|
|
|
78
|
+ <div class="treeTable clearfix">
|
|
|
79
|
+ <div class="tableCon col-md-12">
|
|
|
80
|
+ <table id="table1" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
|
|
|
81
|
+ <thead>
|
|
|
82
|
+ <tr>
|
|
|
83
|
+ <th data-field="F_Name" data-align="left">姓名</th>
|
|
|
84
|
+ <th data-field="F_Sex" data-align="left">性别</th>
|
|
|
85
|
+ <th data-field="F_Mobile" data-align="left" data-formatter="phoneTableHtml1">手机号</th>
|
|
|
86
|
+ <th data-field="F_ElseMobile" data-align="left" data-formatter="phoneTableHtml2">其他电话</th>
|
|
|
87
|
+ <!--<th data-field="F_Birthday" data-align="left">生日</th>
|
|
|
88
|
+ <th data-field="F_IDCard" data-align="center">身份证号</th>
|
|
|
89
|
+ <th data-field="F_Education" data-align="center">学历</th>-->
|
|
|
90
|
+ <th data-field="F_Email" data-align="center">邮件</th>
|
|
|
91
|
+ <th data-field="F_Department" data-align="center">单位名称</th>
|
|
|
92
|
+ <th data-field="F_Telephone" data-align="center" data-formatter="phoneTableHtml3">单位电话</th>
|
|
|
93
|
+ <th data-field="F_Company" data-align="center">部门</th>
|
|
|
94
|
+ <th data-field="F_Position" data-align="center">职务</th>
|
|
|
95
|
+ <th data-field="F_Address" data-align="center">地址</th>
|
|
|
96
|
+ <th data-field="F_Note" data-align="center">备注</th>
|
|
|
97
|
+ <th data-align="center" data-formatter="caoZuo">操作</th>
|
|
|
98
|
+ </tr>
|
|
|
99
|
+ </thead>
|
|
|
100
|
+ <tbody id="tbody"></tbody>
|
|
|
101
|
+ </table>
|
|
|
102
|
+ </div>
|
|
|
103
|
+ </div>
|
|
123
|
104
|
|
|
|
105
|
+ </div>
|
|
124
|
106
|
<script src="../css/layer/layer.js"></script>
|
|
125
|
107
|
<script src="../js/zTree/jquery.ztree.core.js"></script>
|
|
126
|
|
- <script src="../js/kindeditor/kindeditor-all-min.js"></script>
|
|
127
|
|
- <script src="../js/kindeditor/lang/zh-CN.js"></script>
|
|
128
|
|
- <script src="./js/tongList.js"></script>
|
|
|
108
|
+ <script src="../js/visit/ajaxfileupload.js"></script>
|
|
|
109
|
+ <script src="../js/sm2/sm2.js"></script>
|
|
|
110
|
+ <script src="../js/sm2/decrypt.js"></script>
|
|
|
111
|
+ <script>
|
|
|
112
|
+ var token = $.cookie("token");
|
|
|
113
|
+ var table = $('#table1');
|
|
|
114
|
+ initTable();
|
|
|
115
|
+ $('.searchGo').click(function() {
|
|
|
116
|
+ initTable();
|
|
|
117
|
+ })
|
|
|
118
|
+
|
|
|
119
|
+ function initTable() {
|
|
|
120
|
+ //先销毁表格
|
|
|
121
|
+ table.bootstrapTable('destroy');
|
|
|
122
|
+ //初始化表格,动态从服务器加载数据
|
|
|
123
|
+ table.bootstrapTable({
|
|
|
124
|
+ method: "get", //使用get请求到服务器获取数据
|
|
|
125
|
+ url: huayi.config.callcenter_url + "AddressBook/GetList", //获取数据的Servlet地址
|
|
|
126
|
+ contentType: "application/x-www-form-urlencoded",
|
|
|
127
|
+ striped: true, //表格显示条纹
|
|
|
128
|
+ pagination: true, //启动分页
|
|
|
129
|
+ pageSize: 10, //每页显示的记录数
|
|
|
130
|
+ pageNumber: 1, //当前第几页
|
|
|
131
|
+ pageList: [10, 20, 50, 100], //记录数可选列表
|
|
|
132
|
+ search: false, //是否启用查询
|
|
|
133
|
+ showColumns: false, //显示下拉框勾选要显示的列
|
|
|
134
|
+ showRefresh: false, //显示刷新按钮
|
|
|
135
|
+ sidePagination: "server", //表示服务端请求
|
|
|
136
|
+ //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
|
|
137
|
+ //设置为limit可以获取limit, offset, search, sort, order
|
|
|
138
|
+ queryParamsType: "undefined",
|
|
|
139
|
+ queryParams: function queryParams(params) { //设置查询参数
|
|
|
140
|
+ var param = {
|
|
|
141
|
+ page: params.pageNumber,
|
|
|
142
|
+ pagesize: params.pageSize,
|
|
|
143
|
+ token: $.cookie("token"),
|
|
|
144
|
+ keyWord: $('.KeyWord').val()
|
|
|
145
|
+ };
|
|
|
146
|
+ return param;
|
|
|
147
|
+ },
|
|
|
148
|
+ onLoadSuccess: function() { //加载成功时执行
|
|
|
149
|
+ //layer.msg("加载成功");
|
|
|
150
|
+ },
|
|
|
151
|
+ onLoadError: function() { //加载失败时执行
|
|
|
152
|
+ //layer.msg("加载数据失败", { time: 1500, icon: 2 });
|
|
|
153
|
+ }
|
|
|
154
|
+ });
|
|
|
155
|
+ }
|
|
|
156
|
+
|
|
|
157
|
+ function phoneTableHtml1(val, row){
|
|
|
158
|
+ return '<a onclick="phoneTableClick(this ,\'' +row.F_MobileShow+'\')"> ' + val + '</a>'
|
|
|
159
|
+ }
|
|
|
160
|
+ function phoneTableHtml2(val, row){
|
|
|
161
|
+ return '<a onclick="phoneTableClick(this ,\'' +row.F_ElseMobileShow+'\')"> ' + val + '</a>'
|
|
|
162
|
+ }
|
|
|
163
|
+ function phoneTableHtml3(val, row){
|
|
|
164
|
+ return '<a onclick="phoneTableClick(this ,\'' +row.F_TelephoneShow+'\')"> ' + val + '</a>'
|
|
|
165
|
+ }
|
|
|
166
|
+ function caoZuo(val, row) {
|
|
|
167
|
+ return '<div><a title="编辑" style="margin-right:5px;" onclick="XG(' + row.F_UserId + ')"><i class="fa fa-pencil-square-o"></i></a><a title="删除" onclick="del(' + row.F_UserId + ')"><i class="fa fa-remove"></i></a> </div>'
|
|
|
168
|
+ }
|
|
|
169
|
+ //添加
|
|
|
170
|
+ $('.return').click(function() {
|
|
|
171
|
+ // top.$("iframe:visible")[0].src = "SystemManager/addTongXun.html";
|
|
|
172
|
+ layer.open({
|
|
|
173
|
+ maxmin: true, //开启最大化最小化按钮
|
|
|
174
|
+ type: 2,
|
|
|
175
|
+ content: "./commonHtml/addTongXun.html", //iframe的url,no代表不显示滚动条
|
|
|
176
|
+ title: '添加通讯录',
|
|
|
177
|
+ area: ['65%', '85%'], //宽高
|
|
|
178
|
+ });
|
|
|
179
|
+ })
|
|
|
180
|
+ //删除
|
|
|
181
|
+ function del(ids) {
|
|
|
182
|
+ var laye = layer.confirm('您确定要删除吗?', {
|
|
|
183
|
+ btn: ['确定', '取消'] //可以无限个按钮
|
|
|
184
|
+ }, function(index, layero) {
|
|
|
185
|
+ //按钮【按钮一】的回调 AddressBook/DelAddressBook
|
|
|
186
|
+ $.ajax({
|
|
|
187
|
+ type: "post",
|
|
|
188
|
+ url: huayi.config.callcenter_url + "AddressBook/DelAddressBook",
|
|
|
189
|
+ async: true,
|
|
|
190
|
+ dataType: 'json',
|
|
|
191
|
+ data: {
|
|
|
192
|
+ token: $.cookie("token"),
|
|
|
193
|
+ ids: ids
|
|
|
194
|
+ },
|
|
|
195
|
+ success: function(data) {
|
|
|
196
|
+ if(data.state.toLowerCase() == 'success') {
|
|
|
197
|
+ layer.msg('删除成功');
|
|
|
198
|
+ initTable();
|
|
|
199
|
+ }
|
|
|
200
|
+ }
|
|
|
201
|
+ });
|
|
|
202
|
+ }, function(index) {
|
|
|
203
|
+ //按钮【按钮二】的回调
|
|
|
204
|
+ layer.close(laye)
|
|
|
205
|
+ });
|
|
|
206
|
+ }
|
|
|
207
|
+ //修改
|
|
|
208
|
+ function XG(id) {
|
|
|
209
|
+
|
|
|
210
|
+ layer.open({
|
|
|
211
|
+ maxmin: true, //开启最大化最小化按钮
|
|
|
212
|
+ type: 2,
|
|
|
213
|
+ content: "./commonHtml/editTongXun.html?id=" + id, //iframe的url,no代表不显示滚动条
|
|
|
214
|
+ title: '修改通讯录',
|
|
|
215
|
+ area: ['65%', '85%'], //宽高
|
|
|
216
|
+ });
|
|
|
217
|
+ }
|
|
|
218
|
+ //导出
|
|
|
219
|
+ $('.dbexecl').click(function() {
|
|
|
220
|
+ dcexcel(this);
|
|
|
221
|
+ })
|
|
|
222
|
+ function dcexcel(obj) {
|
|
|
223
|
+ var url = huayi.config.callcenter_url + "AddressBook/ExportAddressBook?token=" + $.cookie("token");
|
|
|
224
|
+ url += "&keyWord=" + $(".KeyWord").val();
|
|
|
225
|
+ obj.href = url;
|
|
|
226
|
+ }
|
|
|
227
|
+// //导入
|
|
|
228
|
+// $("#daoRu").click(function() {
|
|
|
229
|
+//
|
|
|
230
|
+// ajaxFileUpload();
|
|
|
231
|
+// });
|
|
|
232
|
+//
|
|
|
233
|
+// function ajaxFileUpload() {
|
|
|
234
|
+// $.ajaxFileUpload({
|
|
|
235
|
+// url: huayi.config.callcenter_url + 'AddressBook/ImportAddressBook', //用于文件上传的服务器端请求地址
|
|
|
236
|
+// secureuri: false, //是否需要安全协议,一般设置为false
|
|
|
237
|
+// fileElementId: 'upFile', //文件上传域的ID
|
|
|
238
|
+// dataType: 'json', //返回值类型 一般设置为json
|
|
|
239
|
+// data: {
|
|
|
240
|
+// token: $.cookie("token"),
|
|
|
241
|
+// upFile: "upFile"
|
|
|
242
|
+// },
|
|
|
243
|
+// success: function(data) //服务器成功响应处理函数
|
|
|
244
|
+// {
|
|
|
245
|
+// if(data.state.toLowerCase() == 'success') {
|
|
|
246
|
+// layer.msg("导入成功!");
|
|
|
247
|
+//
|
|
|
248
|
+// }
|
|
|
249
|
+// }
|
|
|
250
|
+// })
|
|
|
251
|
+// return false;
|
|
|
252
|
+// }
|
|
|
253
|
+
|
|
|
254
|
+ $(document).ready(function() {
|
|
|
255
|
+
|
|
|
256
|
+ //上传EXCEL文件
|
|
|
257
|
+ $("#upFileExcel").click(function() {
|
|
|
258
|
+ $("#upFile").trigger("click");
|
|
|
259
|
+
|
|
|
260
|
+ });
|
|
|
261
|
+ $("#upFile").change(function() {
|
|
|
262
|
+ var Files = document.getElementById("upFile").files;
|
|
|
263
|
+ $('.excelName').html(Files[0].name); //文件名称
|
|
|
264
|
+ uploads();
|
|
|
265
|
+ });
|
|
|
266
|
+// $("#importNum").click(function() {
|
|
|
267
|
+// uploads();
|
|
|
268
|
+// });
|
|
|
269
|
+
|
|
|
270
|
+ });
|
|
|
271
|
+ //上传Excel文件 模拟实时进度
|
|
|
272
|
+ function uploads() {
|
|
|
273
|
+ var txtName = $('.excelName').text();
|
|
|
274
|
+ if(txtName == '') {
|
|
|
275
|
+ layer.confirm('请先上传文件', {
|
|
|
276
|
+ icon: 2,
|
|
|
277
|
+ btn: ['确定']
|
|
|
278
|
+ });
|
|
|
279
|
+ return;
|
|
|
280
|
+ }
|
|
|
281
|
+ //一般情况下,excel后缀是".xls",在2007以及以后的版本中又增加了".xlsx"。excel的模板文件后缀名是".xlt",启动宏的工作簿后缀名是".xlsm"。
|
|
|
282
|
+ if(txtName.indexOf('.xls') != -1 ||
|
|
|
283
|
+ txtName.indexOf('.xlsx') != -1 ||
|
|
|
284
|
+ txtName.indexOf('.xlt') != -1 ||
|
|
|
285
|
+ txtName.indexOf('.xlsm') != -1
|
|
|
286
|
+ ) {
|
|
|
287
|
+ var formData = new FormData();
|
|
|
288
|
+ var Files = document.getElementById("upFile").files;
|
|
|
289
|
+ formData.append("upFile", Files[0]);
|
|
|
290
|
+// formData.append("taskid", wid);
|
|
|
291
|
+ formData.append("token", $.cookie("token"));
|
|
|
292
|
+ $.ajax({
|
|
|
293
|
+ url: huayi.config.callcenter_url + "AddressBook/ImportAddressBook",
|
|
|
294
|
+ type: "POST",
|
|
|
295
|
+ data: formData,
|
|
|
296
|
+ /**
|
|
|
297
|
+ *必须false才会自动加上正确的Content-Type
|
|
|
298
|
+ */
|
|
|
299
|
+ contentType: false,
|
|
|
300
|
+ /**
|
|
|
301
|
+ * 必须false才会避开jQuery对 formdata 的默认处理
|
|
|
302
|
+ * XMLHttpRequest会对 formdata 进行正确的处理
|
|
|
303
|
+ */
|
|
|
304
|
+ processData: false,
|
|
|
305
|
+
|
|
|
306
|
+ success: function(result) {
|
|
|
307
|
+ $("#importNum").attr("disabled", false);
|
|
|
308
|
+ $("#importNum").val('导入');
|
|
|
309
|
+ window.location.reload();
|
|
|
310
|
+ },
|
|
|
311
|
+ error: function(textStatus) {
|
|
|
312
|
+// percents = 0;
|
|
|
313
|
+ $('.progress').hide();
|
|
|
314
|
+ layer.confirm('网络繁忙,请稍后再试...', {
|
|
|
315
|
+ btn: ['确定'] //按钮
|
|
|
316
|
+ });
|
|
|
317
|
+ $("#importNum").attr("disabled", false);
|
|
|
318
|
+ $("#importNum").val('导入');
|
|
|
319
|
+ },
|
|
|
320
|
+ complete: function(XMLHttpRequest, textStatus) {
|
|
|
321
|
+// percents = 0;
|
|
|
322
|
+ $('.progress').hide();
|
|
|
323
|
+ if(textStatus == 'timeout') {
|
|
|
324
|
+ var xmlhttp = window.XMLHttpRequest ? new window.XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHttp");
|
|
|
325
|
+ xmlhttp.abort();
|
|
|
326
|
+ layer.confirm('网络延时,请稍后再试...', {
|
|
|
327
|
+ btn: ['确定'] //按钮
|
|
|
328
|
+ });
|
|
|
329
|
+ }
|
|
|
330
|
+ $("#importNum").attr("disabled", false);
|
|
|
331
|
+ $("#importNum").val('导入');
|
|
|
332
|
+ },
|
|
|
333
|
+ });
|
|
|
334
|
+
|
|
|
335
|
+ } else {
|
|
|
336
|
+ layer.confirm('请上传EXCEL文件', {
|
|
|
337
|
+ icon: 2,
|
|
|
338
|
+ btn: ['确定']
|
|
|
339
|
+ });
|
|
|
340
|
+ return;
|
|
|
341
|
+ }
|
|
|
342
|
+ }
|
|
|
343
|
+
|
|
|
344
|
+
|
|
|
345
|
+
|
|
|
346
|
+ </script>
|
|
129
|
347
|
</body>
|
|
130
|
348
|
|
|
131
|
349
|
</html>
|