projectManage.js
21.9 KB
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
var currentPage = 1;// 当前页
var totalpage = 0;// 总页数
var pageNum = 5;// 最多显示页数
var pageSize = 17;
var projectId;
var conditionstr;
var searchInfo;
var searchtext;
var userserver;
var checkboxState = "";
var listObject;
$(function() {
curserver = CONF_BACK_SERVERURL;
getHoliday();//hyh 新增 获取假期,并且该方法设置为同步 2017、10、14
getApproveList(1,"");
meetSearchEvent();
bottomEvent();
// focusAndOnblur("按编号、标题、证号、建设单位搜索");
getSelectType();
getLayerIdByKeyName("业务类型_图层");//ljy 2018-01-08 获取键值对
// hzw 2018/3/6 按钮quan'xian
getRoleChildrenPrivilege(window.parent.listName);
//hyh 新增 分页框回车事件 2017/10/31
$("body").on("keyup keykeypress","[id='targetPage']",function(evt){
if (evt.keyCode == 13) {
var page=parseInt($("#targetPage").val());
if(isNaN(page)){layer.msg("目标页不是有效数字!");return}
if(page<-1||page>totalpage){
$("#targetPage").val("");
layer.msg("目标页超出页码范围!");
return}
currentPage = page;
getApproveList(currentPage);
}
});
$('#searchInput').bind('keypress', function (event) {
if (event.keyCode == "13") {
searQuery();
}
});
});
window.onload = function(){
setTimeout(function() {parent.window.NProgress.done()}, 500);
}
function bottomEvent() {
$('input[type="text"]').keydown( function(e) {
if(event.keyCode == 13){
currentPage=1;
}else{
currentPage=$(".layui-input").val();
}
});
$(document).keyup(function (e) {//捕获文档对象的按键弹起事件
if (e.keyCode == 13) {//按键信息对象以参数的形式传递进来了
var conditionstr = null;
pagging.config.list = getApproveList;
searchInfo = $("#searchInput").val();
conditionstr = searchInfo;
getApproveList(currentPage, searchInfo);
}
});
// 模糊搜索
$("#searchbtninfo").click(function() {
conditionstr = null;
pagging.config.list = getApproveList;
searchInfo = $("#searchInput").val();
conditionstr = searchInfo;
getApproveList(1, searchInfo);
});
$("#searchInput").on('input',function(e){
searchInfo = $("#searchInput").val();
conditionstr = searchInfo;
if(searchInfo==''){
getApproveList(1,"");
}
});
}
function searQuery(){
var condition = $("#searchInput").val();
searchInfo = condition;
conditionstr = searchInfo;
getApproveList(1,condition);
}
function getApproveList(pageIndex, searchText) {
currentPage = pageIndex;
var flowname = $('#projectTypes').val();
var flowType = $('#documentType').val();
if (searchInfo)
searchText = searchInfo;
var conditionjson = {
statusQuery : "所有",
bindingUnit : "所有",
bindingAssignee : "",
agent:"",
flowname : flowname,
flowType : flowType,
signStartTime : "",
signEndTime : "",
limitStartTime : "",
limitEndTime : "",
dateStartTime:"",
dateEndTime:""
}
$.ajax({
type: "POST",
url: curserver + global.modelctls.project.list.manageApprove,
headers:{
"token":$.cookie('ftoken')
},
data:{
pageIndex : pageIndex,
pageSize :pageSize,
searchInfo : searchText,
andcondition:JSON.stringify(conditionjson)
},
dataType: 'json',
beforeSend: function(){
parent.window.$.showLoading();
},
complete: function(){
parent.window.$.hideLoading();
},
success:function(result){
if(result.status!="error") {
zuiData(result);
// buttonStyle(false);
}else {
parent.layer.msg("查询失败!请联系管理员!", {icon : 2});
}
/* hzw 2018/3/15 注释 不影响可以删除
checkboxStop();*/
}
});
$.ajax({
type: "POST",
url: curserver + global.modelctls.project.list.manageApproveCount,
headers:{
"token":$.cookie('ftoken')
},
data:{
pageIndex : pageIndex,
pageSize :pageSize,
searchInfo : searchText,
andcondition:JSON.stringify(conditionjson)
},
dataType: 'json',
success:function(result){
var totalre = result["total"];
layuiPage(totalre);
if (totalre == 0){
$('#msg').css("display", "block");
$('#nvaTab').css("visibility", "hidden");
}else{
$('#msg').css("display", "none");
$('#nvaTab').css("visibility", "visible");
}
}
});
}
function deleteApproveIndex(projectid) {
var _url = CONF_SEARCH_SERVERURL+"/es/approve/delete";
$.ajax({
type:"POST",
url: _url,
data:{"projectid": projectid},
success:function(result){}
});
}
function deleteproject(){
var checkboxData = getCheckStatus().data;
if(checkboxData.length==0){
parent.layer.msg("请选择项目!", {icon : 2});
}else{
parent.layer.open({
content: '确定删除选中流程吗?',
btn: ['确认', '取消'],
shadeClose: true,
icon: 3,
yes: function(){
var url = curserver + global.modelctls.project.deleteProject;
for(var i=0;i<checkboxData.length;i++){
var data = checkboxData[i];
var projectId = data.PROJECTID;
var taskId = data.TASKID;
$.ajax({
async:false,
type: "POST",
url: url,
headers:{
"token":$.cookie('ftoken')
},
data:{
taskId : taskId,
projectId : projectId
},
dataType: 'json',
success:function(result){
if(result.status=="ok"){
parent.layer.msg(result.message,{icon: 1});
//hzw 调用全文检索的接口 2018/1/31
deleteApproveIndex(projectId);
}
}
});
}
getApproveList(currentPage);
parent.window.$.hideLoading(); //loading异步不显示,放后面 hzw 2018/3/15
parent.layer.closeAll();
}
});
}
}
//hzw 调用全文检索的接口 2018/1/31
function deleteApproveIndex(projectId){
var _url = CONF_SEARCH_SERVERURL + "/es/approve/delete";
$.ajax({
type:"POST",
url:_url,
data:{"projectid": projectId},
success:function(result){}
});
}
//var zuidate = {
// cols : [ {
// width : 'auto',
// text : '项目id',
// type : 'number',
// flex : false,
// colClass : 'hidden'
// }, {
// width : 'auto',
// text : '流程id',
// type : 'number',
// flex : false,
// colClass : 'hidden'
// }, {
// width : 'auto',
// text : '实例id',
// type : 'number',
// flex : false,
// colClass : 'hidden'
// }, {
// width : '40',
// text : '<img src="../../image/projecttask/projecttaskinfo.png "style="width:16px;"> ',//hyh 修改,给图标一栏的头部加个图标 2017/10/23
// type : 'string',
// flex : false,
// sort : false
// }, {
// width : '70',
// text : '状态',
// type : 'string',
// flex : false,
// colClass : '',
// sort : false
// }, {
// width : '100',
// text : '当前环节',
// type : 'string',
// flex : false,
// colClass : '',
// sort : false
// }, {
// width : 'auto',
// text : '项目类型',
// type : 'string',
// flex : false,
// colClass : '',
// sort : false
// }, {
// width : '200',
// text : '项目编号',
// type : 'number',
// flex : false,
// colClass : '',
// sort : false
// }, {
// width : 'auto',
// text : '项目名称',
// type : 'string',
// flex : false,
// colClass : '',
// sort : false
// }, {
// width : 'auto',
// text : '建设单位',
// type : 'string',
// flex : false,
// colClass : '',
// sort : false
// }, {
// width : 'auto',
// text : '主办科室 ',
// type : 'string',
// flex : false,
// colClass : '',
// sort : false
// }, {
// width : '100',
// text : '主办人',
// type : 'string',
// flex : false,
// colClass : '',
// sort : false
// }, {
// width : 'auto',
// text : '接件日期',
// type : 'date',
// flex : false,
// colClass : '',
// sort : true
// }, {
// width : '100',
// text : '理论办结日期',
// type : 'date',
// flex : false,
// sort : false
// }
// /*
// * {width: '180', text: '<img
// * src="../assets/images/projecttask/operation.png"
// * style="width:20px;height:20px;margin-right:10px;">操作', type:
// * 'string',flex: false,sort:false} ,
// */],
// rows : []
//}
/*function zuitable() {
$('table.datatable').datatable({
checkable : true,
sortable : true,
checkByClickRow : false,
minFixedLeftWidth : 300,
flexHeadDrag : true
});
} zui 注释标记*/
function zuiData(result) {
//zuidate.rows = []; zui注释标记
var data = [];
var result_map = result["Data"];
var listpath=[];
listObject= [];
for (var i = 0; i < result_map.length; i++) {
var list_re = result_map[i];
if (list_re.length > 0) {
for (var j = 0; j < list_re.length; j++) {
var map_result = list_re[j];
var spListShowOrHidden = map_result["SPLISTSHOWORHIDDEN"];
if(spListShowOrHidden && spListShowOrHidden == "hidden"){
continue;
}else{
var lamp = "";
var bjqx = "";
var cqStr = "";
var flowid = map_result["FLOWID"];
var taskkey = map_result["TASK_DEF_KEY_"];
var attachpath = map_result["ATTACHPATH"];
var flowrevisionid = map_result["FLOWREVISIONID"] == null ? "":map_result["FLOWREVISIONID"];
var description = map_result["DESCRIPTION"];
var projectid = map_result["PROJECTID"] == null ? ""
: map_result["PROJECTID"]
var meetingprojectstate=map_result["MEETINGPROJECTSTATE"]==null?"":map_result["MEETINGPROJECTSTATE"];
var instanceid = map_result["INSTANCEID"] == null ? ""
: map_result["INSTANCEID"]
var taskid = map_result["TASKID"] == null ? "null"
: map_result["TASKID"]
var recevietime = new Date(map_result["CREATETIME"]);
var projectcode = map_result["PROJECTCODE"] == null ? ""
: map_result["PROJECTCODE"];
var casecode = map_result["CASECODE"] == null ? ""
: map_result["CASECODE"];
var registertime = map_result["REGISTERTIME"] == null ? ""
: new Date(map_result["REGISTERTIME"]);
var buildadddress = map_result["BUILDADDRESS"] == null ? ""
: map_result["BUILDADDRESS"];
var projectname = map_result["PROJECTNAME"] == null ? ""
: map_result["PROJECTNAME"];
var flowname = map_result["FLOWNAME"] == null ? ""
: map_result["FLOWNAME"];
var buildunit = map_result["BUILDUNIT"] == null ? ""
: map_result["BUILDUNIT"];
var bindingassignee = map_result["BINDINGASSIGNEE"]==null?"-":map_result["BINDINGASSIGNEE"];
var bindingunit = map_result["BINDINGUNIT"]==null?"-":map_result["BINDINGUNIT"];
var activityName = map_result["ACTIVITYNAME"] == null ? "结束"
: map_result["ACTIVITYNAME"];
var status = map_result["PROJECTSTATUS"] == null ? "-" //hyh 新增-,谢文洲要求 2017/10/24
: map_result["PROJECTSTATUS"];
var flowItemType = map_result["FLOWITEMTYPE"]?map_result["FLOWITEMTYPE"]:null;
if (conditionstr) {
projectcode = projectcode.replace(conditionstr,
'<span style="color:red">' + conditionstr
+ '</span>');
projectname = projectname.replace(conditionstr,
'<span style="color:red">' + conditionstr
+ '</span>');
buildunit = buildunit.replace(conditionstr,
'<span style="color:red">' + conditionstr
+ '</span>');
bindingunit = bindingunit.replace(conditionstr,
'<span style="color:red">' + conditionstr
+ '</span>');
buildadddress = buildadddress.replace(conditionstr,
'<span style="color:red">' + conditionstr
+ '</span>');
casecode = casecode.replace(conditionstr,
'<span style="color:red">' + conditionstr
+ '</span>');
}
// 根据流程版本获取总时限
var timelimitDays = map_result["FINISHTIME"] == null ? 0
: map_result["FINISHTIME"];
var suptotaltime = map_result["SUPTOTALTIME"]==null?0:map_result["SUPTOTALTIME"];
// var officialdate = AddDays(map_result["CREATETIME"],
// parseInt(timelimitDays));
var officialdate =getAddDate(new Date(map_result["CREATETIME"]).format("yyyy-MM-dd hh:mm:ss"),timelimitDays,suptotaltime)//hyh 新增,根据办结天数算出办结时间 2017、10、13
bjqx = lefttime(new Date(), new Date(officialdate));
// var color = changrowcolor(bjqx);
if(taskid=="null"){
if(status == "-"){
status = "办结";
}
}
if(status == "办结") {
cqStr += '<div style=" display: inline-block; margin-right: 5px; "><img src="../../image/projecttask/over.png" title="办结" style="width:18px;height:18px;margin-top: 4px"></div>';
}else if(bjqx=="超时"){
cqStr += '<div style=" display: inline-block; margin-right: 5px;"><img src="../../image/projecttask/redhint.png" title="超时-'+officialdate+'" style="width:16px;height:16px;margin-top: 4px"></div>' //hyh 修改,谢文洲要求改审批图标 2017/10/23
if(status=="办结"){
officialdate = '<span>'+ officialdate + '</span>'
}else{
officialdate = '<span style="color:red;font-weight:bold;">' + officialdate + '</span>'
}
}else if(bjqx=="快超时") {
cqStr += '<div style=" display: inline-block; margin-right: 5px;"><img src="../../image/projecttask/grayhint.png" title="快超时-'+officialdate+'" style="width:16px;height:16px;margin-top: 4px"></div>'//hyh 修改,谢文洲要求改审批图标 2017/10/23
}else if(status == "在办") {
cqStr += '<div style=" display: inline-block; margin-right: 5px; "><img src="../../image/projecttask/process.png" title="在办" style="width:18px;height:18px;margin-top: 4px"></div>';
}else if(status == "退件") {
cqStr += '<div style=" display: inline-block; margin-right: 5px; "><img src="../../image/projecttask/return.png" title="退件" style="width:18px;height:18px;margin-top: 4px"></div>';
}else if(status == "回退") {
cqStr += '<div style=" display: inline-block; margin-right: 5px; "><img src="../../image/projecttask/rollback.png" title="回退" style="width:18px;height:18px;margin-top: 4px"></div>';
}else if(status == "退件办结") {
cqStr += '<div style=" display: inline-block; margin-right: 5px; "><img src="../../image/projecttask/over.png" title="退件办结" style="width:18px;height:18px;margin-top: 4px"></div>';
}
listObject.push(map_result);
listpath.push(attachpath);
var row = {
"PROJECTID": projectid,
"INSTANCEID": instanceid,
"TASKID": taskid,
"BJQX": cqStr,
"PROJECTSTATUS": status,
"ACTIVITYNAME": activityName,
"MEETINGPROJECTSTATE":meetingprojectstate,
"FLOWNAME": flowname,
"PROJECTCODE": projectcode,
"CASECODE": casecode,
"PROJECTNAME": projectname,
"BUILDADDRESS": buildadddress,
"BUILDUNIT": buildunit,
"REGISTERTIME": registertime?registertime.format("yyyy-MM-dd hh:mm:ss").split("00:00:00")[0]:"",
"BINDINGASSIGNEE": bindingassignee,
"BINDINGUNIT": bindingunit,
"CREATETIME": recevietime?recevietime.format("yyyy-MM-dd hh:mm:ss"):"",
"FINISHTIME": officialdate,
"FLOWREVISIONID": flowrevisionid,
"ATTACHPATH":attachpath,
"TASK_DEF_KEY_":taskkey,
"FLOWITEMTYPE":flowItemType
}
data.push(row);
//zuidate.rows.push(row); zui注释标记
}
}
}
}
setLayuiData(data);
/*$.ajax({
type: "POST",
async: true,
url: CONF_DOC_SERVERURL +"ftpfile/recordList.do",
data: {pathList:JSON.stringify(listpath)},
success: function(result) {
var img = '<img class="img" src="../../image/home-content/fj.png" title="附件" style="width:18px;height:18px;margin-right: 5px;">';
var htlist=$("#nvaTab tbody tr");
var recordData=result.data;
if(recordData) {
for(var y=0;y<listObject.length;y++){
var cupath = listObject[y].ATTACHPATH;
if(cupath!=null && cupath!="undefined") {
if(result.data&&recordData.length>0) {
for(var j=0;j<recordData.length;j++){
var compare=recordData[j].slice(1,cupath.length+1);
if(compare == cupath){
var data=layui.table.cache.tableRenderId;
for(var k=0;k<data.length;k++) {
if(data[k].ATTACHPATH==cupath) {
$(htlist[k]).find(".img").remove();
$(htlist[k]).find("td[data-field=\"PROJECTNAME\"] div").prepend(img);
break;
}
}
break;
}
}
}
}
}
}
},
error: function(e) {
console.log(e);
}
})*/
}
function daynavPage(totalpa, totalre, currentPage) {
$("#total_records").html(totalpa);
$("#total_page").html(totalre);
var pageStart = "";
var pageEnd = "";
if (currentPage <= Math.round(pageNum / 2) + 1) {
pageStart = 1;
pageEnd = pageNum;
}
if (currentPage > Math.round(pageNum / 2) + 1) {
pageStart = currentPage - Math.round(pageNum / 2);
pageEnd = currentPage + Math.round(pageNum / 2) - 2;
}
if (pageEnd > totalre) {
pageEnd = totalre;
}
var ulcontent = $(".pagination");
ulcontent.children().filter('li').remove();
ulcontent.append("<li> <a onclick=\"jumpPage(0)\" aria-label=\"Previous\">"
+ "<span aria-hidden=\"true\">上一页</span></a></li> ");
for (var i = pageStart; i <= pageEnd; i++) {
if (i == currentPage) {
ulcontent
.append("<li class=\"active\"><a onclick=\"getApproveList("
+ i + ")\">" + i + "</a></li>");
} else {
ulcontent.append("<li><a onclick=\"getApproveList(" + i + ")\">"
+ i + "</a></li>");
}
}
ulcontent.append("<li> <a onclick=\"jumpPage(1)\" aria-label=\"Next\">"
+ "<span aria-hidden=\"true\">下一页</span></a></li> ");
pagging.modifyPagging(totalpa, totalre, currentPage);
}
pagging.config.list = getApproveList
/**
* 上一页、下一页调转
*
* @param index
*/
function jumpPage(index) {
var pageindex = 1;
if (index == 0) {// 上一页
pageindex = currentPage - 1 <= 1 ? 1 : currentPage - 1;
} else {
pageindex = currentPage + 1 >= totalpage ? totalpage : currentPage + 1;
}
getApproveList(pageindex, searchInfo);
}
/**
* 续办
*/
/* hzw 2018/3/15 注释 提取到layuiDataList.js作为通用方法 不影响可以删除
* function openlayer_continue(){
var checkboxData= getCheckStatus().data;
if (checkboxData.length == 0) {
parent.layer.msg("请选择项目!", {icon : 2});
}
if (checkboxData.length > 1) {
parent.layer.msg("只能选择一个项目!", {icon : 2});
}
if(checkboxData.length==1){
var projectId = checkboxData[0].PROJECTID;
$.ajax({
type: "POST",
url: curserver + global.modelctls.project.getProjectCasecode,
headers:{
"token":$.cookie('ftoken')
},
data:{projectId:projectId},
dataType: 'json',
success:function(data){
if(data.status=='ok'){
layer.open({
type: 2,
title: '审批类型',
shadeClose: true,
shade: 0.6,
offset:'20px',
area: ['80%', '80%'],
content: 'selecttype.jsp?projectId='+projectId //iframe的url
});
}else
layer.msg(data.message,{icon: 2});
}
});
event.stopPropagation();
}
}*/
/* hzw 2018/3/15 注释 不影响可以删除
* // check box 勾选事件
function CheckItem(obj) {
$("input[type='checkbox']:checked").each(function(i) {
$(this).prop('checked', '');
});
var jqobj = $(obj);
var tds = jqobj.parent().parent().find("td");
if (projectId == tds[1].innerText) {
jqobj.prop('checked', '');
projectId = null;
} else {
projectId = tds[1].innerText;
jqobj.prop('checked', 'checked');
}
}
function checkboxStop() {
$("input[type='checkbox']").click(function(e) {
e.stopPropagation();
});
}*/
/*
* hy 2017-09-7添加
*/
//20171222 yyl 项目管理列表关闭项目详情页面后不刷新
function openRefreshList(){
//zuidate.rows = []; zui注释标记
//$('table.datatable').datatable('load',getApproveList(currentPage));
}
function selectProjecType(){
var index = layer.open({
type : 2,
title : '选择业务类型',
shadeClose : true,
shade : 0.3,
area : [ '650px', '600px' ],
offset : [ '50px' ],
content : '../../view/userlist.jsp?name=projectType',
btn : [ '确定', '取消' ],
yes : function(index, layero) {
var iframeWin = window[layero.find('iframe')[0]['name']];
var username = iframeWin.selectSearchUser();
//获取主办人搜索 yyl 2018.01.05
$('#projectTypes').val(username);
layer.close(index);
if($('#projectTypes').val()!="") {
$('#documentType').val("所有");
}
if($('#projectTypes').val().replace(/(^\s*)|(\s*$)/g, "")!=""&& $('#optionType').find(".remove").length==0) {
$("#optionType").append('<span class="glyphicon glyphicon-remove remove" title="移除内容" onclick="remove(this)" ></span>');
}
getApproveList(1);
},
end : function(index, layero) {
}
});
}
function changeType() {
if($('#documentType').val()!="所有") {
$('#projectTypes').val("");
}
if($('#projectTypes').val().replace(/(^\s*)|(\s*$)/g, "")==""&& $('#optionType').find(".remove").length!=0) {
$("#optionType").find(".remove").remove();
}
getApproveList(1, searchInfo);
}
function remove(e) {
$(e.parentElement).find("input[type='text']").val("");
getApproveList(1);
$(e).remove();
}
function valchange(e){
if($(e).val().replace(/(^\s*)|(\s*$)/g, "")!=""&& $(e.parentElement).find(".remove").length==0) {
$(e.parentElement).append('<span class="glyphicon glyphicon-remove remove" title="移除内容" onclick="remove(this)" ></span>');
}else if($(e).val().replace(/(^\s*)|(\s*$)/g, "")==""&& $(e.parentElement).find(".remove").length!=0) {
$(e.parentElement).find(".remove").remove();
}
}
/* hzw 2018/3/15 注释 提取到layuiDataList.js作为通用方法 不影响可以删除
* function openJournal() {
var checkboxData= getCheckStatus().data;
if (checkboxData.length == 0) {
parent.layer.msg("请选择项目!", {icon : 2});
}
if (checkboxData.length > 1) {
parent.layer.msg("只能选择一个项目!", {icon : 2});
}
if (checkboxData.length == 1) {
var flowInstanceId = checkboxData[0].INSTANCEID;
var url = global.contextPath + '/view/projecttask/flowlog.jsp?flowInstanceId=' + flowInstanceId;
layer.open({
type : 2, // page层
area : [ '70%', '90%' ],
offset : '10px',
title : '流程日志',
shadeClose : true,
shade : 0.6, // 遮罩透明度
moveType : 1, // 拖拽风格,0是默认,1是传统拖动
moveOut : true,
// shift: 1, //0-6的动画形式,-1不开启
content : url
});
}
}*/