WFSearchShow.jsp
93.4 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
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.workflow.workflow.WorkflowVersion"%>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%><%--added by xwj for td2023 on 2005-05-20--%>
<%@ taglib uri="/browserTag" prefix="brow"%>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ page import="weaver.general.GCONST" %>
<%@ page import="weaver.general.IsGovProj" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="weaver.workflow.search.WfAdvanceSearchUtil" %>
<%@ page import="java.util.*" %>
<%@ page import="weaver.workflow.request.todo.RequestUtil" %>
<jsp:useBean id="xssUtil" class="weaver.filter.XssUtil" scope="page" />
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="WorkflowComInfo" class="weaver.workflow.workflow.WorkflowComInfo" scope="page" />
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page" />
<jsp:useBean id="SearchClause" class="weaver.search.SearchClause" scope="session" />
<jsp:useBean id="CustomerInfoComInfo" class="weaver.crm.Maint.CustomerInfoComInfo" scope="page" />
<jsp:useBean id="DepartmentComInfo" class="weaver.hrm.company.DepartmentComInfo" scope="page"/>
<jsp:useBean id="DocComInfo" class="weaver.docs.docs.DocComInfo" scope="page"/>
<jsp:useBean id="BrowserComInfo" class="weaver.workflow.field.BrowserComInfo" scope="page"/>
<jsp:useBean id="SubCompanyComInfo" class="weaver.hrm.company.SubCompanyComInfo" scope="page" />
<jsp:useBean id="WorkflowSearchCustom" class="weaver.workflow.search.WorkflowSearchCustom" scope="page"/>
<jsp:useBean id="ProjectInfoComInfo" class="weaver.proj.Maint.ProjectInfoComInfo" scope="page" />
<jsp:useBean id="WorkTypeComInfo" class="weaver.workflow.workflow.WorkTypeComInfo" scope="page" />
<jsp:useBean id="wfShareAuthorization" class="weaver.workflow.request.WFShareAuthorization" scope="page" />
<jsp:useBean id="requestutil" class="weaver.workflow.request.todo.RequestUtil" scope="page" />
<%@ include file="/workflow/request/CommonUtils.jsp" %>
<%
boolean isopenos = RequestUtil.isOpenOtherSystemToDo();
String showsystem = requestutil.getOfsSetting().getShowsysname();
String isfrom = Util.null2String(request.getParameter("isfrom"));//是否来自自定义查询
String fastsearch = Util.null2String(request.getParameter("fastsearch"));
String fromhp = Util.null2String((String)session.getAttribute("fromhp"));//来自门户
String isall = Util.null2String((String)session.getAttribute("isall"));//来自门户所有流程
//System.out.println("fromhp = "+fromhp);
String customid = Util.null2String(request.getParameter("customid"));
String workflowid = Util.null2String(request.getParameter("workflowid"));//类型流程id
int _borrowRequestid = Util.getIntValue(request.getParameter("_borrowRequestid"),-1);
int _borrowDetailRecordId = Util.getIntValue(request.getParameter("_borrowDetailRecordId"),-1);
boolean _isFromShowRelatedProcess = Util.getIntValue(request.getParameter("_isFromShowRelatedProcess"),-1)==1;//是否来自于借款流程查看相关还款流程按钮的查询
boolean LoanRepaymentAnalysisInnerDetaile = Util.getIntValue(request.getParameter("LoanRepaymentAnalysisInnerDetaile"),0)==1;//是否来自借款报表页面
%>
<html>
<head>
<link href="/css/Weaver_wev8.css" type="text/css" rel="stylesheet">
<script language="javascript" src="/js/weaver_wev8.js"></script>
<script language="javascript" src="/js/datetime_wev8.js"></script>
<script language="javascript" src="/js/selectDateTime_wev8.js"></script>
<script language="javascript" src="/js/JSDateTime/WdatePicker_wev8.js"></script>
<script type="text/javascript">
jQuery(function(){
jQuery("#topTitle").topMenuTitle({searchFn:searchItem});
jQuery("#hoverBtnSpan").hoverBtn();
});
function doSearch(){
if (check_form(frmmain,'')){
$("input[name$=_value]").each(function (i, e) {
thisval = $(this).val();
if (thisval != undefined && thisval != "") {
var ename = $(this).attr("name");
var eid = ename.replace("con", "").replace("_value", "");
var targetelement = $("#con" + eid + "_name");
var temphtml = "";
//alert($("#" + ename + "span").children().length);
$("#" + ename + "span a").each(function () {
temphtml += " " + $(this).text();
});
var checkspan = /^<.*$/;
if(checkspan.test(temphtml)){
temphtml=temphtml.replace(/<[^>]+>/g,"");
}
targetelement.val(temphtml);
}
});
$("input").each(function (i, e) {
var thisval = $(this).val();
if (thisval != undefined && thisval != "") {
var ename = $(this).attr("name");
var targetelement = $("#" + ename + "_name");
if(!targetelement) return;
var temphtml = "";
$("#" + ename + "span a") && $("#" + ename + "span a").each(function () {
temphtml += " " + $(this).text();
});
var checkspan = /^<.*$/;
if(checkspan.test(temphtml)){
temphtml=temphtml.replace(/<[^>]+>/g,"");
}
targetelement.val(temphtml);
}
});
$('#weaver').submit();
}
}
jQuery(document).ready(function(){
//如果指定了自定义查询编号,则加载自定义查询条件
<%
if(!"customSearch".equals(isfrom)){
%>
var customQueryId = <%=request.getParameter("customid")%>;
if(customQueryId){
loadCustomSearch(null, customQueryId);
}
<%
}else{
%>
loadCustomSearch("<%=workflowid%>","<%=customid%>");
<%
}
%>
//给select类型的控件赋值
<%
String[] selectes = new String[]{
"typeid","requestlevel","creatertype","createdateselect","recievedateselect",
"wfstatu","archivestyle","isdeleted","nodetype"
};
for(int i = 0; i < selectes.length; i++){
String selectName = selectes[i];
if (request.getParameter(selectName) != null) {
%>
$("select[name=<%=selectName%>]").val(<%="'" + request.getParameter(selectName) + "'"%>);
<%}%>
$("select[name=<%=selectName%>]").removeAttr('notBeauty');
beautySelect('select[name=<%=selectName%>]');
<%
}
%>
if (parent && parent.showTree) {
parent.showTree();
}
});
/* 加载用户自定义的查询条件 */
function loadCustomSearch(workFlowId, cutomQueryId){
if(!workFlowId && !cutomQueryId){
jQuery('#customQueryDiv').html('');
return;
}
if(workFlowId == "<%=workflowid%>"){
loadCustomSearchForReset(workFlowId,"<%=customid%>");
return;
}
<%
/*
* 获取从上一个页面传入的自定义查询条件,将自定义查询条件转换为JSON格式的字符串。
* 将JSON数据post给WFCustomSearchGenereate.jsp页面,生成自定义查询条件即为赋好值的页面。
* 以此实现查询的条件的保存,不需要用户再次输入。
*/
String[] checkcons = request.getParameterValues("check_con");
String customJsonString = "{";
String checkboxes = "'";
if(checkcons != null){
for(int i = 0; i < checkcons.length; i++){
String id = ""+checkcons[i];
String tmpvalue = ""+Util.null2String(request.getParameter("con"+id+"_value"));
String tmpvalue1 = ""+Util.null2String(request.getParameter("con"+id+"_value1"));
String tmpname = ""+Util.null2String(request.getParameter("con"+id+"_name"));
if(!tmpvalue.equals("")){
customJsonString += "con"+id+"_value" + ":'" + tmpvalue + "',";
}
if(!tmpvalue1.equals("")){
customJsonString += "con"+id+"_value1" + ":'" + tmpvalue1 + "',";
}
if(!tmpname.equals("")){
customJsonString += "con"+id+"_name" + ":'" + tmpname + "',";
}
if(!tmpvalue.equals("")){
checkboxes += (id + ",");
}
}
}
if(customJsonString.length() > 1){
customJsonString = customJsonString.substring(0, customJsonString.length() - 1);
}
customJsonString += "}";
if(checkboxes.length() > 1){
checkboxes = checkboxes.substring(0, checkboxes.length() - 1);
}
checkboxes += "'";
String nameValueString = "'";
Enumeration elementNames = (Enumeration) request.getParameterNames();
while(elementNames.hasMoreElements()) {
String elementName = (String)elementNames.nextElement();
if(elementName.startsWith("con")
&& elementName.endsWith("_value")
&& request.getParameter(elementName) != null
&& !request.getParameter(elementName).trim().equals("")
){
nameValueString += (elementName + ":" + Util.null2String(request.getParameter(elementName)) + ",");
}
}
if(nameValueString.length() > 1){
nameValueString = nameValueString.substring(0, nameValueString.length() - 1);
}
nameValueString += "'";
%>
var parameter = <%=customJsonString%>;
parameter['issimple'] = true;
parameter['workflowid'] = workFlowId;
parameter['customid'] = cutomQueryId;
parameter['checkboxes'] = <%=checkboxes%>;
parameter['allValues'] = <%=nameValueString%>;
jQuery.post(
'/workflow/search/WFCustomSearchGenerate.jsp',
parameter,
function(data){
jQuery('#customQueryDiv').html(data);
jQuery('#customQueryDiv').find('select').each(function(i,v){
beautySelect(jQuery(v));
});
jQuery('#cutomQuerySelect').change(function(e){
loadCustomSearch(null, jQuery(this).val());
});
jQuery('#cutomQuerySelect').click(function(e){
if (e && e.stopPropagation)
e.stopPropagation()
else
window.event.cancelBubble=true
});
}
);
}
</script>
</head>
<body>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
WfAdvanceSearchUtil wfd = new WfAdvanceSearchUtil(request,RecordSet);
String offical = Util.null2String(request.getParameter("offical"));
int officalType = Util.getIntValue(request.getParameter("officalType"),-1);
//获取从WFSearchs.jsp传过来的参数
String viewtype = Util.null2String(request.getParameter("viewtype"));//0:未读 -1:反馈
String isremark = Util.null2String(request.getParameter("isremark"));//5:超时
//获取从WFSearche.jsp传过来的参数
String typeid = Util.null2String(request.getParameter("typeid"));//流程类型id
//主要用于 显示定制列以及 表格 每页展示记录数选择
String pageIdStr = "8";
if(offical.equals("1"))pageIdStr = "13";
//add by bpf 2013-11-07
String nodetype = Util.null2String(request.getParameter("nodetype"));//节点类型
String creatertype = Util.null2String(request.getParameter("creatertype"));//创建人类型
String createrid = Util.null2String(request.getParameter("createrid"));//创建人id
String createrid2 = Util.null2String(request.getParameter("createrid2"));//创建人id
String requestlevel = Util.null2String(request.getParameter("requestlevel"));//紧急程度
String workcode = Util.null2String(request.getParameter("workcode"));//编号
String requestname = "";
requestname = Util.fromScreen2(request.getParameter("requestname"),user.getLanguage());
if (!"".equals(SearchClause.getRequestName())) {
requestname = SearchClause.getRequestName();
SearchClause.setRequestName("");
}
requestname = requestname.trim();//标题
String creatername = Util.null2String(request.getParameter("creatername"));//创建人名
String ownerdeptname = Util.null2String(request.getParameter("ownerdeptname"));//创建人部门
String ownerdepartmentid = Util.null2String(request.getParameter("ownerdepartmentid"));//创建人部门
String creatersubcompanyname = Util.null2String(request.getParameter("creatersubcompanyname"));//创建人分部
String creatersubcompanyid = Util.null2String(request.getParameter("creatersubcompanyid"));//创建人分部id
String unophrmid = Util.null2String(request.getParameter("unophrmid"));//未操作者id
String unophrmname = Util.null2String(request.getParameter("unophrmname"));//未操作者
String docinputname = Util.null2String(request.getParameter("docinputname"));//相关文档名
String docids = Util.null2String(request.getParameter("docids"));//相关文档id
String crmnameinput = Util.null2String(request.getParameter("crmnameinput"));//相关客户名
String crmids = Util.null2String(request.getParameter("crmids"));//相关客户id
String pronameinput = Util.null2String(request.getParameter("pronameinput"));//相关项目名
String proids = Util.null2String(request.getParameter("proids"));//相关项目id
String hrmidsinput = Util.null2String(request.getParameter("hrmidsinput"));//人力资源
String hrmcreaterid = Util.null2String(request.getParameter("hrmcreaterid"));//人力资源
String requestnamed = Util.null2String(request.getParameter("requestnamed"));//快速搜索
int date2during = Util.getIntValue(Util.null2String(request.getParameter("date2during")), 0);
int viewType = Util.getIntValue(Util.null2String(request.getParameter("viewType")), 0);
int isdeleted= Util.getIntValue(request.getParameter("isdeleted"),0);//流程状态
int wfstatu = Util.getIntValue(request.getParameter("wfstatu"),0);//处理状态
int archivestyle = Util.getIntValue(request.getParameter("archivestyle"),0);//归档状态
int recievedateselect = Util.getIntValue(request.getParameter("recievedateselect"),0);//接受日期
String branchid = "";
String cdepartmentid = "";
try {
branchid = Util.null2String((String) session.getAttribute("branchid"));
} catch (Exception e) {
branchid = "";
}
int olddate2during = 0;
BaseBean baseBean = new BaseBean();
String date2durings = "";
String hrmids=hrmcreaterid;
try {
date2durings = Util.null2String(baseBean.getPropValue("wfdateduring", "wfdateduring"));
} catch (Exception e) {
}
String[] date2duringTokens = Util.TokenizerString2(date2durings, ",");
if (date2duringTokens.length > 0) {
olddate2during = Util.getIntValue(date2duringTokens[0], 0);
}
String cdepartmentidspan = "";
ArrayList cdepartmentidArr = Util.TokenizerString(cdepartmentid, ",");
for (int i = 0; i < cdepartmentidArr.size(); i++) {
String tempcdepartmentid = (String) cdepartmentidArr.get(i);
if (cdepartmentidspan.equals(""))
cdepartmentidspan += DepartmentComInfo.getDepartmentname(tempcdepartmentid);
else
cdepartmentidspan += "," + DepartmentComInfo.getDepartmentname(tempcdepartmentid);
}
String newsql = "";
String newsqlos = "";
//WFSearchs.jsp页面条件
if(!viewtype.equals("")){//未读 or 反馈
newsql += " and t2.viewtype='" + viewtype + "'";
newsqlos += " and viewtype="+viewtype ;
}
if(!typeid.equals("") && !typeid.equals("0")){//类别
newsql += " and t2.workflowtype='" + typeid + "'";
newsqlos += " and sysid="+typeid ;
}
if (!workflowid.equals("") && !workflowid.equals("0")){
if(workflowid.indexOf("-")!=-1){
newsql += " and t1.workflowid in(" + workflowid + ")";
}else {
newsql += " and t1.workflowid in(" + WorkflowVersion.getAllVersionStringByWFIDs(workflowid) + ")";
}
newsqlos += " and workflowid="+workflowid ;
}
if (date2during > 0 && date2during < 37){
newsql += WorkflowComInfo.getDateDuringSql(date2during);
newsqlos += WorkflowComInfo.getDateDuringSql(date2during);
}
String dbNames = new RecordSet().getDBType();
boolean isoracle = "oracle".equals(dbNames.toLowerCase());
if(!requestname.equals("")){
if((requestname.indexOf(" ")==-1&&requestname.indexOf("+")==-1)||(requestname.indexOf(" ")!=-1&&requestname.indexOf("+")!=-1)){
if(isoracle){
newsql+=" and instr(t1.requestnamenew, '"+requestname+"') > 0 ";
newsqlos += " and instr(requestname, '"+requestname+"') > 0 ";
}else{
newsql+=" and t1.requestnamenew like '%"+requestname+"%'";
newsqlos += " and requestname like '%"+requestname+"%'";
}
}else if(requestname.indexOf(" ")!=-1&&requestname.indexOf("+")==-1){
String orArray[]=Util.TokenizerString2(requestname," ");
if(orArray.length>0){
newsql+=" and ( ";
newsqlos += " and ( ";
}
for(int i=0;i<orArray.length;i++){
if(isoracle){
newsql+=" and instr(t1.requestnamenew, '"+orArray[i]+"') > 0 ";
}else{
newsql+=" t1.requestnamenew like '%"+orArray[i]+"%'";
}
newsqlos += " requestname like '%"+orArray[i]+"%'";
if(i+1<orArray.length){
newsql+=" or ";
newsqlos +=" or ";
}
}
if(orArray.length>0){
newsql+=" ) ";
newsqlos += " ) ";
}
}else if(requestname.indexOf(" ")==-1&&requestname.indexOf("+")!=-1){
String andArray[]=Util.TokenizerString2(requestname,"+");
for(int i=0;i<andArray.length;i++){
if(isoracle){
newsql+=" and instr(t1.requestnamenew, '"+andArray[i]+"') > 0 ";
}else{
newsql+=" and t1.requestnamenew like '%"+andArray[i]+"%'";
}
newsqlos += " and requestname like '%"+andArray[i]+"%'";
}
}
}
if(!requestnamed.equals("")){
if(isoracle){
newsql+=" and instr(t1.requestnamenew, '"+requestnamed+"') > 0 ";
}else{
newsql+=" and t1.requestnamenew like '%"+requestnamed+"%'";
}
newsqlos += " and requestname like '%"+requestname+"%'";
}
if (!"".equals(workcode)) {
//newsql += " and t1.creatertype= '0' and t1.creater in(select id from hrmresource where workcode like '%" + workcode + "%')";
newsql += " AND t1.requestmark LIKE '%" + workcode + "%' ";
newsqlos += " and 1=2 ";
}
if (!requestlevel.equals("")) {
newsql += " and t1.requestlevel=" + requestlevel;
newsqlos += " and 1=2 " ;
}
//创建人条件
newsql += wfd.handleCreaterCondition("t1.creater");
if (!createrid.equals("")) {
newsqlos += " and creatorid = " + createrid + "";
}
//创建人部门
if(!ownerdepartmentid.equals("")){
newsql += " and t1.creatertype= '0' " + wfd.handleDepCondition("t1.creater");
newsqlos += " and " + wfd.handleDepCondition("creater");
}
//创建人分部
if(!creatersubcompanyid.equals("")){
newsql += " and t1.creatertype= '0' " + wfd.handleSubComCondition("t1.creater");
newsqlos += " and " + wfd.handleSubComCondition("creater");
}
//创建日期
if("1".equals(fastsearch)){
String createdatefrom = Util.null2String(request.getParameter("createdatefrom"));
String createdateto = Util.null2String(request.getParameter("createdateto"));
if (!createdatefrom.equals("")) {
newsql += " and t1.createdate >='" + createdatefrom + "'";
newsqlos += " and createdate >='" + createdatefrom + "'";
}
if (!createdateto.equals("")) {
newsql += " and t1.createdate <='" + createdateto + "'";
newsqlos += " and createdate <='" + createdateto + "'";
}
}else{
newsql += wfd.handCreateDateCondition("t1.createdate");
newsqlos += wfd.handCreateDateCondition("createdate");
}
//接受日期
newsql += wfd.handRecieveDateCondition("t2.receivedate");
newsqlos += wfd.handRecieveDateCondition("receivedate");
//流程状态
if(isdeleted==0){
isdeleted=1;
}else if(isdeleted==1){
isdeleted=0;
}
if(isdeleted!=1){
if (isdeleted == 0) {
newsql +=" and t1.workflowid in (select id from workflow_base where isvalid not in ('1', '2', '3'))";
newsqlos += " and workflowid in (select workflowid from ofs_workflow where cancel!=0) ";
} else if (isdeleted == 2) { //全部
newsql +=" and t1.workflowid in (select id from workflow_base where isvalid<>'2')";
//newsqlos += " and workflowid in (select workflowid from ofs_workflow where cancel=0) ";
}
}else{
newsqlos += " and workflowid in (select workflowid from ofs_workflow where cancel=0) ";
}
//处理状态
if(wfstatu!=0){
if(wfstatu==1){
newsql +=" AND t2.isremark in( '0','1','5','8','9','7')";
newsqlos += " and isremark in ('0') " ;
}else{
newsql +=" AND t2.isremark in('2','4')";
newsqlos += " and isremark in ('2','4') " ;
}
}
//归档处理
if(archivestyle!=0){
if (archivestyle == 1) {
newsql +=" and t2.iscomplete<>1";//未归档
newsqlos +=" and iscomplete<>1";
} else {
newsql +=" and t2.iscomplete=1";//归档
newsqlos +=" and iscomplete=1";
}
}
//节点类型
if (!nodetype.equals("")) {
newsql += " and t1.currentnodetype='" + nodetype + "'";
newsqlos += " and 1=5 " ;
}
//未操作人
newsql +=wfd.handleUnOpCondition("t2.REQUESTID");
if(!unophrmid.equals("")){
newsqlos += " and requestid in (select requestid from ofs_todo_data where userid="+unophrmid+" and isremark=0 )" ;
}
//相关文档docinputname
newsql +=wfd.handleDocCondition("t1.docids");
//相关人力资源
newsql +=wfd.handleHrmCondition("t1.hrmids");
//相关客户
newsql +=wfd.handleCrmCondition("t1.crmids");
//相关项目
newsql +=wfd.handleProsCondition("t1.prjids");
if(!docids.equals("")||!hrmcreaterid.equals("")||!crmids.equals("")||!proids.equals("")){//相关客户等不查询
newsqlos += " and 1=2 ";
}
String CurrentUser = Util.null2String((String) session.getAttribute("RequestViewResource"));
String userID = String.valueOf(user.getUID());
int userid=user.getUID();
String belongtoshow = "";
RecordSet.executeSql("select * from HrmUserSetting where resourceId = "+userID);
if(RecordSet.next()){
belongtoshow = RecordSet.getString("belongtoshow");
}
String userIDAll = String.valueOf(user.getUID());
String Belongtoids =user.getBelongtoids();
int Belongtoid=0;
String[] arr2 = null;
ArrayList<String> userlist = new ArrayList();
userlist.add(userid + "");
if(!"".equals(Belongtoids)){
userIDAll = userID+","+Belongtoids;
arr2 = Belongtoids.split(",");
for(int i=0;i<arr2.length;i++){
Belongtoid = Util.getIntValue(arr2[i]);
userlist.add(Belongtoid + "");
}
}
//add by jhyun for batch submit
String logintype = "" + user.getLogintype();
int usertype = 0;
if (logintype.equals("2"))
usertype = 1;
if (CurrentUser.equals("")) {
CurrentUser = "" + user.getUID();
}
boolean superior = false; //是否为被查看者上级或者本身
if (userID.equals(CurrentUser)) {
superior = true;
} else {
RecordSet.executeSql("SELECT * FROM HrmResource WHERE ID = " + CurrentUser + " AND managerStr LIKE '%" + userID + "%'");
if (RecordSet.next()) {
superior = true;
}
}
int isovertime = 0;
//获取流程共享信息
String currentid = "";
currentid = wfShareAuthorization.getCurrentoperatorIDByUser(user);
String sqlwhere = "";
String sqlwhereos = "";
//是否有共享的流程
if("1".equals(belongtoshow)){
if(!"".equals(currentid) && !"1".equals(fromhp)){
sqlwhere = " where (t1.deleted <> 1 or t1.deleted is null or t1.deleted='') and t1.requestid = t2.requestid AND t2.islasttimes=1 ";
sqlwhere += " and (( t2.userid in (" + userIDAll + " ) and t2.usertype=" + usertype;
}else{
if("1".equals(fromhp) && "1".equals(isall)){
sqlwhere = " where (t1.deleted <> 1 or t1.deleted is null or t1.deleted='') and t1.requestid = t2.requestid AND t2.islasttimes=1 ";
}else{
sqlwhere = " where (t1.deleted <> 1 or t1.deleted is null or t1.deleted='') and t1.requestid = t2.requestid and t2.userid in (" + userIDAll + " ) and t2.usertype=" + usertype + " AND t2.islasttimes=1 ";
}
}
if (RecordSet.getDBType().equals("oracle")) {
sqlwhere += " and (nvl(t1.currentstatus,-1) = -1 or (nvl(t1.currentstatus,-1)=0 and t1.creater in (" + userIDAll + "))) ";
} else if(RecordSet.getDBType().equals("mysql")){
sqlwhere += " and (ifnull(t1.currentstatus,-1) = -1 or (ifnull(t1.currentstatus,-1)=0 and t1.creater in (" + userIDAll + "))) ";
}else {
sqlwhere += " and (isnull(t1.currentstatus,-1) = -1 or (isnull(t1.currentstatus,-1)=0 and t1.creater in (" + userIDAll + "))) ";
}
}else{
if(!"".equals(currentid) && !"1".equals(fromhp)){
sqlwhere = " where (t1.deleted <> 1 or t1.deleted is null or t1.deleted='') and t1.requestid = t2.requestid AND t2.islasttimes=1 ";
sqlwhere += " and (( t2.userid in (" + CurrentUser + " ) and t2.usertype=" + usertype;
}else{
if("1".equals(fromhp) && "1".equals(isall)){
sqlwhere = " where (t1.deleted <> 1 or t1.deleted is null or t1.deleted='') and t1.requestid = t2.requestid AND t2.islasttimes=1 ";
}else{
sqlwhere = " where (t1.deleted <> 1 or t1.deleted is null or t1.deleted='') and t1.requestid = t2.requestid and t2.userid in (" + CurrentUser + " ) and t2.usertype=" + usertype + " AND t2.islasttimes=1 ";
}
}
if (RecordSet.getDBType().equals("oracle")) {
sqlwhere += " and (nvl(t1.currentstatus,-1) = -1 or (nvl(t1.currentstatus,-1)=0 and t1.creater in (" + CurrentUser + "))) ";
} else if(RecordSet.getDBType().equals("mysql")){
sqlwhere += " and (ifnull(t1.currentstatus,-1) = -1 or (ifnull(t1.currentstatus,-1)=0 and t1.creater in (" + CurrentUser + "))) ";
}else {
sqlwhere += " and (isnull(t1.currentstatus,-1) = -1 or (isnull(t1.currentstatus,-1)=0 and t1.creater in (" + CurrentUser + "))) ";
}
}
sqlwhereos += " and userid in ("+CurrentUser+") and islasttimes=1 ";
//是否有共享的流程
String wfid = Util.getSubINClause(currentid,"t2.id", "IN");
if(!"".equals(currentid) && !"1".equals(fromhp)){
sqlwhere += " ) or ("+wfid+")) ";
}
//来自于借款流程查看相关还款流程按钮的查询
if(_isFromShowRelatedProcess){
if("".equals(sqlwhere)){
sqlwhere += " where ";
}else{
sqlwhere += " and ";
}
if(_borrowDetailRecordId > 0 && _borrowRequestid > 0){
sqlwhere += " exists ( \n"+
" select 1 \n" +
" from FnaBorrowInfo fbi \n" +
" where fbi.borrowDirection = -1 \n" +
" and fbi.borrowRequestIdDtlId = "+_borrowDetailRecordId+" and fbi.borrowRequestId = "+_borrowRequestid+" \n" +
" and fbi.requestid = t1.requestid \n"+
" ) \n";
}else{
sqlwhere += " 1=2 ";
}
}
sqlwhere += " " + newsql;
sqlwhereos += " " + newsqlos ;
session.setAttribute("fromhp","");
session.setAttribute("isall","");
String orderby = "t2.receivedate,t2.receivetime";
//update by fanggsh 20060711 for TD4532 begin
boolean hasSubWorkflow = false;
if (workflowid != null && !workflowid.equals("") && workflowid.indexOf(",") == -1) {
RecordSet.executeSql("select id from Workflow_SubWfSet where mainWorkflowId=" + workflowid);
if (RecordSet.next()) {
hasSubWorkflow = true;
}
RecordSet.executeSql("select id from Workflow_TriDiffWfDiffField where mainWorkflowId=" + workflowid);
if (RecordSet.next()) {
hasSubWorkflow = true;
}
}
// RCMenu += "{" + SystemEnv.getHtmlLabelName(364, user.getLanguage()) + ",WFSearch.jsp?offical="+offical+"&date2during=" + olddate2during + ",_self}";
// RCMenuHeight += RCMenuHeightStep;
//批量提交 自定义查询
if("customSearch".equals(isfrom)){
RCMenu += "{" + SystemEnv.getHtmlLabelName(17598, user.getLanguage()) + ",javascript:OnMultiSubmitNew(this),_self}";
RCMenuHeight += RCMenuHeightStep;
}
if(!"1".equals(fastsearch) && !"customSearch".equals(isfrom) ){
RCMenu += "{" + SystemEnv.getHtmlLabelName(18037, user.getLanguage()) + ",javascript:addWFShare(),_self}";
RCMenuHeight += RCMenuHeightStep;
}
if(!_isFromShowRelatedProcess){
RCMenu += "{" + SystemEnv.getHtmlLabelName(197, user.getLanguage()) + ",javascript:rightMenuSearch(),_self}";
RCMenuHeight += RCMenuHeightStep;
}
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<link rel="stylesheet" href="/css/ecology8/request/requestTopMenu_wev8.css" type="text/css" />
<script type="text/javascript" src="/js/ecology8/request/wfSearchResult_wev8.js"></script>
<table id="topTitle" cellpadding="0" cellspacing="0" style="width:100%">
<tr>
<td>
</td>
<td class="rightSearchSpan">
<% if(!"1".equals(fastsearch) && !"customSearch".equals(isfrom)){%>
<input type="button" value="<%=SystemEnv.getHtmlLabelName(18037, user.getLanguage())%>" class="e8_btn_top middle" onclick="addWFShare()" />
<%} %>
<% if("customSearch".equals(isfrom)){%>
<input type="button" value="<%=SystemEnv.getHtmlLabelName(17598, user.getLanguage())%>" style="font-size:12px" class="e8_btn_top middle" onclick="OnMultiSubmitNew(this)">
<%} %>
<input type="text" class="searchInput" value="<%=requestname%>" name="flowTitle"/>
<%if(!"1".equals(fastsearch)){ %>
<span id="advancedSearch" class="advancedSearch"><%=SystemEnv.getHtmlLabelName(21995, user.getLanguage())%></span>
<%} %>
<span title="<%=SystemEnv.getHtmlLabelName(83721,user.getLanguage())%>" class="cornerMenu"></span>
</td>
</tr>
</table>
<%
String actionurl ="";
if(!"customSearch".equals(isfrom)){
actionurl = "WFCustomSearchMiddleHandler.jsp?offical="+offical+"&officalType="+officalType;
}else{
actionurl = "WFCustomSearchMiddleHandler.jsp?offical="+offical+"&officalType="+officalType+"&isfrom="+isfrom+"&workflowid="+workflowid;
}
%>
<form id="weaver" name="frmmain" method="post" action="<%=actionurl%>">
<%
if(!"customSearch".equals(isfrom)){
%>
<input type="hidden" name="pageId" id="pageId" value="<%=PageIdConst.WF_CUSTOM_SEARCH%>"/>
<%}%>
<div id="advancedSearchDiv" style="display:none;">
<wea:layout type="4col" attributes="{'expandAllGroup':'true'}">
<wea:group context='<%=SystemEnv.getHtmlLabelName(32905,user.getLanguage())%>'>
<wea:item><%=SystemEnv.getHtmlLabelName(229, user.getLanguage())%></wea:item>
<wea:item>
<input type="text" style='width:80%;' name="requestname" value="<%=requestname%>" />
<input type="hidden" name="pageId" id="pageId" value=""/>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(714, user.getLanguage())%></wea:item>
<wea:item><input type="text" style='width:80%;' name="workcode" value='<%=workcode%>' ></wea:item>
<%
if(!"customSearch".equals(isfrom)){
%>
<wea:item><%=SystemEnv.getHtmlLabelName(33234, user.getLanguage())%></wea:item>
<% String wfbytypeBrowserURL = "/workflow/workflow/WFTypeBrowserContenter.jsp?showos=1";%>
<wea:item>
<span>
<brow:browser viewType="0" name="typeid"
browserValue='<%=typeid%>'
browserUrl="/systeminfo/BrowserMain.jsp?url=/workflow/workflow/WorkTypeBrowser.jsp?showos=1"
hasInput="true" isSingle="true" hasBrowser="true"
isMustInput="1" completeUrl="/data.jsp?type=worktypeBrowser&showos=1"
browserDialogWidth="600px"
browserSpanValue='<%=WorkTypeComInfo.getWorkTypename(typeid)%>'></brow:browser>
</span>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(26361, user.getLanguage())%></wea:item>
<wea:item>
<brow:browser viewType="0" name="workflowid" browserValue='<%=workflowid%>' onPropertyChange="loadCustomSearch($('#workflowid').val())" browserOnClick="" browserUrl='<%=wfbytypeBrowserURL %>' hasInput="true" isSingle="true" hasBrowser = "true" isMustInput='1' completeUrl="javascript:getajaxurl('workflowBrowser')" width="80%" browserSpanValue='<%=request.getParameter("workflowid_name")%>'> </brow:browser>
<input type="hidden" id="workflowid_name" name="workflowid_name" value="<%=request.getParameter("workflowid_name")%>"/>
</wea:item>
<%}%>
<wea:item><%=SystemEnv.getHtmlLabelName(15534, user.getLanguage())%></wea:item>
<wea:item>
<select class="inputstyle" name="requestlevel" size=1 notBeauty=true>
<option value="" ></option>
<option value="0" ><%=SystemEnv.getHtmlLabelName(225, user.getLanguage())%></option>
<option value="1" ><%=SystemEnv.getHtmlLabelName(15533, user.getLanguage())%></option>
<option value="2" ><%=SystemEnv.getHtmlLabelName(2087, user.getLanguage())%></option>
</select>
</wea:item>
<wea:item ><%=SystemEnv.getHtmlLabelName(882, user.getLanguage())%></wea:item>
<wea:item >
<span style='float:left'>
<select class=inputstyle name=creatertype style='height:25px;' onchange="changeType(this.value,'createridse1span','createridse2span');" notBeauty=true>
<%if (!user.getLogintype().equals("2")) {%>
<option value="0"><%=SystemEnv.getHtmlLabelName(362, user.getLanguage())%></option>
<%}%>
<option value="1"><%=SystemEnv.getHtmlLabelName(136, user.getLanguage())%></option>
</select>
</span>
<span id="createridse1span" <%if ("1".equals(creatertype)) {%>style="display:none;"<%}%>>
<brow:browser viewType="0" name="createrid" browserValue='<%=createrid%>' browserOnClick="" browserUrl="/systeminfo/BrowserMain.jsp?url=/hrm/resource/ResourceBrowser.jsp" hasInput="true" width="135px" isSingle="true" hasBrowser = "true" isMustInput='1' completeUrl="/data.jsp" browserSpanValue='<%=ResourceComInfo.getResourcename(createrid)%>'>
</brow:browser>
</span>
<span id="createridse2span" <%if (!"1".equals(creatertype)) {%>style="display:none;"<%}%>>
<brow:browser viewType="0" name="createrid2" browserValue='<%=createrid2%>' browserOnClick="" browserUrl="/systeminfo/BrowserMain.jsp?url=/CRM/data/CustomerBrowser.jsp" hasInput="true" width="135px;float:left" isSingle="true" hasBrowser = "true" isMustInput='1' completeUrl="/data.jsp?type=7" browserSpanValue='<%=CustomerInfoComInfo.getCustomerInfoname(createrid2)%>'>
</brow:browser>
</span>
</wea:item>
</wea:group>
<wea:group context='<%=SystemEnv.getHtmlLabelName(32843,user.getLanguage())%>' >
<wea:item><%=SystemEnv.getHtmlLabelName(19225, user.getLanguage())%></wea:item>
<wea:item>
<brow:browser viewType="0" name="ownerdepartmentid" browserValue='<%=ownerdepartmentid%>' browserOnClick="" browserUrl="/systeminfo/BrowserMain.jsp?url=/hrm/company/DepartmentBrowser.jsp?selectedids=" hasInput="true" isSingle="true" hasBrowser = "true" isMustInput='1' completeUrl="/data.jsp?type=4" width="80%" browserSpanValue='<%=request.getParameter("ownerdepartmentid_name")%>'> </brow:browser>
<input type="hidden" id="ownerdepartmentid_name" name="ownerdepartmentid_name" value="<%=request.getParameter("ownerdepartmentid_name")%>"/>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(22788, user.getLanguage())%></wea:item>
<wea:item>
<brow:browser viewType="0" name="creatersubcompanyid" browserValue='<%=creatersubcompanyid%>' browserOnClick="" browserUrl="/systeminfo/BrowserMain.jsp?url=/hrm/company/SubcompanyBrowser.jsp" hasInput="true" isSingle="true" hasBrowser = "true" isMustInput='1' completeUrl="/data.jsp?type=164" width="80%" browserSpanValue='<%=request.getParameter("creatersubcompanyid_name")%>'> </brow:browser>
<input type="hidden" id="creatersubcompanyid_name" name="creatersubcompanyid_name" value="<%=request.getParameter("creatersubcompanyid_name")%>"/>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(722, user.getLanguage())%></wea:item>
<wea:item attributes="{\"colspan\":\"3\"}">
<span class="wuiDateSpan" selectId="createdateselect" selectValue="">
<input class=wuiDateSel type="hidden" name="createdatefrom" value="<%=Util.null2String(request.getParameter("createdatefrom"))%>">
<input class=wuiDateSel type="hidden" name="createdateto" value="<%=Util.null2String(request.getParameter("createdateto"))%>">
</span>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(17994, user.getLanguage())%></wea:item>
<wea:item attributes="{\"colspan\":\"3\"}">
<span class="wuiDateSpan" selectId="recievedateselect" selectValue="">
<input class=wuiDateSel type="hidden" name="recievedatefrom" value="<%=Util.null2String(request.getParameter("recievedatefrom"))%>">
<input class=wuiDateSel type="hidden" name="recievedateto" value="<%=Util.null2String(request.getParameter("recievedateto"))%>">
</span>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(553, user.getLanguage())%><%=SystemEnv.getHtmlLabelName(602, user.getLanguage())%></wea:item>
<wea:item>
<select class=inputstyle size=1 name="wfstatu" notBeauty=true>
<option value="0" ><%=SystemEnv.getHtmlLabelName(332, user.getLanguage())%></option>
<option value="1" ><%=SystemEnv.getHtmlLabelName(16658, user.getLanguage())%></option>
<option value="2" ><%=SystemEnv.getHtmlLabelName(24627, user.getLanguage())%></option>
</select>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(15112, user.getLanguage())%></wea:item>
<wea:item>
<select class=inputstyle size=1 name="archivestyle" notBeauty=true>
<option value="0" ><%=SystemEnv.getHtmlLabelName(332, user.getLanguage())%></option>
<option value="1" ><%=SystemEnv.getHtmlLabelName(17999, user.getLanguage())%></option>
<option value="2" ><%=SystemEnv.getHtmlLabelName(18800, user.getLanguage())%></option>
</select>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(19061, user.getLanguage())%></wea:item>
<wea:item>
<select class=inputstyle size=1 name=isdeleted notBeauty=true>
<option value="0" ><%=SystemEnv.getHtmlLabelName(2246,user.getLanguage())%></option>
<option value="1" ><%=SystemEnv.getHtmlLabelName(2245,user.getLanguage())%></option>
<option value="2" ><%=SystemEnv.getHtmlLabelName(332,user.getLanguage())%></option>
</select>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(15536, user.getLanguage())%></wea:item>
<wea:item>
<select class=inputstyle size=1 name=nodetype notBeauty=true>
<option value=""> </option>
<option value="0" ><%=SystemEnv.getHtmlLabelName(125, user.getLanguage())%></option>
<option value="1" ><%=SystemEnv.getHtmlLabelName(142, user.getLanguage())%></option>
<option value="2" ><%=SystemEnv.getHtmlLabelName(725, user.getLanguage())%></option>
<option value="3" ><%=SystemEnv.getHtmlLabelName(251, user.getLanguage())%></option>
</select>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(16354, user.getLanguage())%></wea:item>
<wea:item>
<brow:browser viewType="0" name="unophrmid" browserValue='<%=unophrmid%>' browserOnClick="" browserUrl="/systeminfo/BrowserMain.jsp?url=/hrm/resource/ResourceBrowser.jsp" hasInput="true" isSingle="true" hasBrowser = "true" isMustInput='1' completeUrl="/data.jsp" width="80%" browserSpanValue='<%=request.getParameter("unophrmid_name")%>'> </brow:browser>
<input type="hidden" id="unophrmid_name" name="unophrmid_name" value="<%=request.getParameter("unophrmid_name")%>"/>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(857, user.getLanguage())%></wea:item>
<wea:item>
<brow:browser viewType="0" name="docids" browserValue='<%=docids%>' browserOnClick="" browserUrl="/systeminfo/BrowserMain.jsp?url=/docs/docs/DocBrowser.jsp?isworkflow=1" hasInput="true" isSingle="false" hasBrowser = "true" isMustInput='1' completeUrl="javascript:getajaxurl('9')" width="80%" browserSpanValue='<%=request.getParameter("docids_name")%>'> </brow:browser>
<input type="hidden" id="docids_name" name="docids_name" value="<%=request.getParameter("docids_name")%>"/>
</wea:item>
<%if(!offical.equals("1")){ %>
<wea:item><%=SystemEnv.getHtmlLabelName(179, user.getLanguage())%></wea:item>
<wea:item>
<brow:browser viewType="0" name="hrmcreaterid" browserValue='<%=hrmcreaterid%>' browserOnClick="" browserUrl="/systeminfo/BrowserMain.jsp?url=/hrm/resource/ResourceBrowser.jsp" hasInput="true" isSingle="false" hasBrowser = "true" isMustInput='1' completeUrl="/data.jsp" width="80%" browserSpanValue='<%=request.getParameter("hrmcreaterid_name")%>'> </brow:browser>
<input type="hidden" id="hrmcreaterid_name" name="hrmcreaterid_name" value="<%=request.getParameter("hrmcreaterid_name")%>"/>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(783, user.getLanguage())%></wea:item>
<wea:item>
<brow:browser viewType="0" name="crmids" browserValue='<%=crmids%>' browserOnClick="" browserUrl="/systeminfo/BrowserMain.jsp?url=/CRM/data/CustomerBrowser.jsp" hasInput="true" isSingle="false" hasBrowser = "true" isMustInput='1' completeUrl="javascript:getajaxurl('18')" width="80%" browserSpanValue='<%=request.getParameter("crmids_name")%>'> </brow:browser>
<input type="hidden" id="crmids_name" name="crmids_name" value="<%=request.getParameter("crmids_name")%>"/>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(782, user.getLanguage())%></wea:item>
<wea:item>
<brow:browser viewType="0" name="proids" browserValue='<%=proids%>' browserOnClick="" browserUrl="/systeminfo/BrowserMain.jsp?url=/proj/data/ProjectBrowser.jsp" hasInput="true" isSingle="false" hasBrowser = "true" isMustInput='1' completeUrl="javascript:getajaxurl('135')" width="80%" browserSpanValue='<%=request.getParameter("proids_name")%>'> </brow:browser>
<input type="hidden" id="proids_name" name="proids_name" value="<%=request.getParameter("proids_name")%>"/>
</wea:item>
<%} %>
</wea:group>
<wea:group context="">
<wea:item type="toolbar">
<%if(!_isFromShowRelatedProcess){ %>
<input class="e8_btn_submit" type="submit" name="submit_1" onClick="doSearch()" value="<%=SystemEnv.getHtmlLabelName(197, user.getLanguage()) %>"/>
<span class="e8_sep_line">|</span>
<%} %>
<input class="e8_btn_cancel" type="button" name="reset" onclick="onReset()" value="<%=SystemEnv.getHtmlLabelName(2022, user.getLanguage()) %>"/>
<span class="e8_sep_line">|</span>
<input type="button" value="<%=SystemEnv.getHtmlLabelName(31129,user.getLanguage())%>" class="e8_btn_cancel" id="cancel"/>
</wea:item>
</wea:group>
</wea:layout>
<div id="customQueryDiv"></div>
</div>
</form>
<div>
<%
String tableString = "";
String backfields = " t1.requestid, t1.createdate, t1.createtime,t1.creater, t1.creatertype, t1.workflowid, t1.requestname, t1.status,t1.requestlevel,t1.currentnodeid,t2.receivedate,t2.receivetime,t2.viewtype,t2.isremark,t2.userid,t2.nodeid,t2.agentorbyagentid,t2.agenttype,t2.isprocessed, 0 as systype,t2.workflowtype";
String fromSql = " from workflow_requestbase t1,workflow_currentoperator t2 ";//xxxxx
String sqlWhere = sqlwhere;
if (sqlWhere.indexOf("in (select id from workflow_base where isvalid") < 0) {
sqlWhere += " and t1.workflowid in (select id from workflow_base where (isvalid='1' or isvalid='3') )";
}
//String para2 = "column:requestid+column:workflowid+column:viewtype+" + isovertime + "+" + user.getLanguage() + "+column:nodeid+column:isremark+" + userID
//+ "+column:agentorbyagentid+column:agenttype+column:isprocessed";
String para2 = "column:requestid+column:workflowid+column:viewtype+" + isovertime + "+" + user.getLanguage() + "+column:nodeid+column:isremark+" + user.getUID() +"+column:agentorbyagentid+column:agenttype+column:isprocessed+"+ currentid +"+column:userid+column:workflowtype+column:creater";
String para4 = user.getLanguage() + "+" + user.getUID()+ "+column:userid";
if (!docids.equals("")) {
fromSql = fromSql + ",workflow_form t4 ";
sqlWhere = sqlWhere + " and t1.requestid=t4.requestid ";
}
if("1".equals(belongtoshow)){
if (!superior) {
sqlWhere += " AND EXISTS (SELECT 1 FROM workFlow_CurrentOperator workFlowCurrentOperator WHERE t2.workflowid = workFlowCurrentOperator.workflowid AND t2.requestid = workFlowCurrentOperator.requestid AND workFlowCurrentOperator.userid in ("
+ userIDAll + ") and workFlowCurrentOperator.usertype = " + usertype + ") ";
}
}else{
if (!superior) {
sqlWhere += " AND EXISTS (SELECT 1 FROM workFlow_CurrentOperator workFlowCurrentOperator WHERE t2.workflowid = workFlowCurrentOperator.workflowid AND t2.requestid = workFlowCurrentOperator.requestid AND workFlowCurrentOperator.userid in ("
+ user.getUID() + ") and workFlowCurrentOperator.usertype = " + usertype + ") ";
}
}
if (!branchid.equals("")) {
sqlWhere += " AND t1.creater in (select id from hrmresource where subcompanyid1=" + branchid + ") ";
}
if(offical.equals("1")){//发文/收文/签报
if(officalType==1){
sqlWhere+=(" and t1.workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType in (1,3) and (isvalid=1 or isvalid=3))");
}else if(officalType==2){
sqlWhere+=(" and t1.workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType=2 and (isvalid=1 or isvalid=3))");
}
}
//判断session中是否存在附加条件
String __whereClause = SearchClause.getWhereClause();
if(__whereClause != null && !__whereClause.trim().equals("")){
if(__whereClause.trim().startsWith("and")){
sqlWhere += __whereClause;
}else{
if(LoanRepaymentAnalysisInnerDetaile){
__whereClause = " (t1.deleted=0 or t1.deleted is null) and (t2.isremark in('2','4') or (t2.isremark=0 and t2.takisremark =-2)) and t2.islasttimes=1 ";
}
sqlWhere += (" and " + __whereClause);
}
}
String __whereClauseOs = SearchClause.getWhereclauseOs();
if(__whereClauseOs != null && !__whereClauseOs.trim().equals("")){
if(__whereClauseOs.trim().startsWith("and")){
sqlwhereos += __whereClauseOs;
}else{
sqlwhereos += (" and " + __whereClauseOs);
}
}
//判断session中是否存在附加排序
String __orderClause = SearchClause.getOrderClause();
if(__orderClause != null && !__orderClause.trim().equals("")){
orderby = __orderClause;
}
//判断是否是从WFCustomSearchMiddleHandler转发过来的请求
String[] _fieldLabelArray = null;
String[] _fieldNameArray = null;
List<String> fieldids = null;
List<String> fieldhtmltypes = null;
List<String> fieldtypes = null;
List<String> fielddbtypes = null;
String isNeed = (String) request.getAttribute("CustomSearch_IsNeed");
if(isNeed != null){
String _tableName = (String)request.getAttribute("CustomSearch_TableName");
String _tableNameAlias = (String)request.getAttribute("CustomSearch_TableNameAlias");
fieldids = (List<String>) request.getAttribute("CUSTOMSEARCH_FIELDIDS");
fieldhtmltypes = (List<String>) request.getAttribute("CUSTOMSEARCH_FIELDHTMLTYPES");
fieldtypes = (List<String>) request.getAttribute("CUSTOMSEARCH_FIELDTYPES");
fielddbtypes = (List<String>) request.getAttribute("CUSTOMSEARCH_FIELDDBTYPES");
if(_tableName != null && !_tableName.trim().equals("")){
fromSql += ("," + _tableName + " " +_tableNameAlias + " ");
}
String _fieldNameList = (String)request.getAttribute("CustomSearch_FieldNameList");
if(_fieldNameList != null && !_fieldNameList.trim().isEmpty()){
backfields += ("," + _fieldNameList);
_fieldNameArray = _fieldNameList.split(",");
} else {
_fieldNameArray = new String[]{};
}
String _requestIdList = (String)request.getAttribute("CustomSearch_RequestIdList");
if(_requestIdList != null && !_requestIdList.trim().equals("")){
sqlWhere += (" and t1.requestid = " + _tableNameAlias + ".requestid");
sqlWhere += (" and t1.requestId in " + _requestIdList);
}
String _fieldLabelList = (String)request.getAttribute("CustomSearch_FieldLabelList");
//System.out.println("_fieldNameList = "+_fieldNameList);
//System.out.println("_fieldLabelList = "+_fieldLabelList);
if (_fieldLabelList != null && !_fieldLabelList.trim().isEmpty()) {
_fieldLabelArray = _fieldLabelList.split(",");
} else {
_fieldLabelArray = new String[]{};
}
}
if(isNeed != null || "customSearch".equals(isfrom)){
isopenos = false ;
}
//add by bpf on 2013-11-14
//String countSql="select count(1) as wfCount "+fromSql+sqlWhere ;
//System.err.println("debug-sql:select " + backfields + fromSql + sqlWhere);
//RecordSet.executeSql(countSql);
//String wfCount = "0";
//while(RecordSet.next()){
//wfCount = RecordSet.getString("wfCount");
//}
//System.out.println("fromSql + sqlWhere = "+fromSql+sqlWhere);
//System.out.println("20150810sqlWhere = "+sqlWhere);
String tabletype__ = "checkbox";
if("1".equals(fastsearch)){
tabletype__ = "none";
}
//out.println(sqlWhere);
tableString = " <table instanceid=\""+PageIdConst.getWFPageId(pageIdStr)+"\" tabletype=\""+tabletype__+"\" pagesize=\"" + PageIdConst.getPageSize(PageIdConst.WF_CUSTOM_SEARCH,user.getUID()) + "\" >";
if("customSearch".equals(isfrom)){
tableString+= " <checkboxpopedom id=\"checkbox\" popedompara=\"column:workflowid+column:isremark+column:requestid+column:nodeid+column:userid\" showmethod=\"weaver.general.WorkFlowTransMethod.getWFSearchResultCheckBox\" />";
}else{
tableString+= " <checkboxpopedom id=\"checkbox\" popedompara=\"column:workflowid+column:requestid+column:userid+"+userID+"\" showmethod=\"weaver.workflow.request.WFShareTransMethod.getWFSearchCheckbox\" />";
}
if(isopenos){//开启统一待办
String backfields0 = " requestid, createdate, createtime,creater, creatertype, workflowid, requestname, status,requestlevel,currentnodeid,receivedate,receivetime,viewtype,isremark,userid,nodeid,agentorbyagentid,agenttype,isprocessed, systype,workflowtype";
String backfieldsos = " requestid, createdate, createtime,creatorid as creater, 0 as creatertype, workflowid, requestname, '' as status, 0 as requestlevel, 0 as currentnodeid,receivedate,receivetime,viewtype,isremark,userid,0 as nodeid, -1 as agentorbyagentid,'0' as agenttype,'0' as isprocessed,1 as systype,sysid as workflowtype";
fromSql = " from (select "+backfields0+" from (select "+backfields+" "+fromSql+""+sqlWhere+" union (select "+backfieldsos+" from ofs_todo_data where 1=1 "+sqlwhereos+") ) t1 ) t2 ";
orderby = " receivedate,receivetime ";
//System.out.println("select "+backfields0+fromSql);
tableString+= " <sql backfields=\"" + backfields0 + "\" sqlform=\"" + Util.toHtmlForSplitPage(fromSql) + "\" sqlwhere=\"\" sqlorderby=\"" + orderby + "\" sqlprimarykey=\"t2.requestid\" sqlsortway=\"Desc\" sqlisdistinct=\"false\" />" ; }else {
tableString += " <sql backfields=\"" + backfields + "\" sqlform=\"" + fromSql + "\" sqlwhere=\"" + Util.toHtmlForSplitPage(sqlWhere) + "\" sqlorderby=\"" + orderby + "\" sqlprimarykey=\"t2.requestid\" sqlsortway=\"Desc\" sqlisdistinct=\"false\" />";
}
tableString+= " <head>";
if(isopenos){
String showname = requestutil.getOfsSetting().getShowsysname();
if(!showname.equals("0")){
tableString += "<col width=\"8%\" text=\"" + SystemEnv.getHtmlLabelName(22677, user.getLanguage())
+ "\" column=\"workflowtype\" orderkey=\"workflowtype\" transmethod=\"weaver.workflow.request.todo.RequestUtil.getSysname\" otherpara=\""+showname+"\" />";
}
}
tableString += "<col width=\"10%\" text=\""+ SystemEnv.getHtmlLabelName(722, user.getLanguage())
+ "\" column=\"createdate\" orderkey=\"createdate,createtime\" otherpara=\"column:createtime\" transmethod=\"weaver.general.WorkFlowTransMethod.getWFSearchResultCreateTime\" />";
tableString += "<col width=\"8%\" text=\"" + SystemEnv.getHtmlLabelName(882, user.getLanguage())
+ "\" column=\"creater\" orderkey=\"creater\" otherpara=\"column:creatertype\" transmethod=\"weaver.general.WorkFlowTransMethod.getWFSearchResultName\" />";
tableString += "<col width=\"10%\" text=\"" + SystemEnv.getHtmlLabelName(259, user.getLanguage())
+ "\" column=\"workflowid\" orderkey=\"t2.workflowid\" otherpara=\"column:workflowtype\" transmethod=\"weaver.workflow.request.todo.RequestUtil.getWorkflowName\" />";
tableString += "<col width=\"8%\" text=\"" + SystemEnv.getHtmlLabelName(15534, user.getLanguage())
+ "\" column=\"requestlevel\" orderkey=\"requestlevel\" transmethod=\"weaver.general.WorkFlowTransMethod.getWFSearchResultUrgencyDegree\" otherpara=\""
+ user.getLanguage() + "\"/>";
if(!userIDAll.equals(String.valueOf(user.getUID())) && "1".equals(belongtoshow)){
tableString += "<col width=\"20%\" text=\""
+ SystemEnv.getHtmlLabelName(1334, user.getLanguage())
+ "\" column=\"requestname\" orderkey=\"requestname\" linkkey=\"requestid\" linkvaluecolumn=\"requestid\" target=\"_fullwindow\" transmethod=\"weaver.general.WorkFlowTransMethod.getWfShareLinkWithTitle2\" otherpara=\""
+ para2 + "\" pkey=\"requestname+weaver.general.WorkFlowTransMethod.getWfShareLinkWithTitle\"/>";
}else{
tableString += "<col width=\"20%\" text=\""
+ SystemEnv.getHtmlLabelName(1334, user.getLanguage())
+ "\" column=\"requestname\" orderkey=\"requestname\" linkkey=\"requestid\" linkvaluecolumn=\"requestid\" target=\"_fullwindow\" transmethod=\"weaver.general.WorkFlowTransMethod.getWfShareLinkWithTitle\" otherpara=\""
+ para2 + "\" pkey=\"requestname+weaver.general.WorkFlowTransMethod.getWfShareLinkWithTitle\"/>";
}
tableString += "<col width=\"8%\" text=\"" + SystemEnv.getHtmlLabelName(18564, user.getLanguage())
+ "\" column=\"currentnodeid\" transmethod=\"weaver.workflow.request.todo.RequestUtil.getCurrentNode\" otherpara=\"column:requestid+column:workflowid+column:workflowtype\" />";
//+ "\" column=\"currentnodeid\" transmethod=\"weaver.general.WorkFlowTransMethod.getCurrentNode\"/>";
tableString += "<col width=\"10%\" text=\""
+ SystemEnv.getHtmlLabelName(17994, user.getLanguage())
+ "\" column=\"receivedate\" orderkey=\"receivedate,receivetime\" otherpara=\"column:receivetime\" transmethod=\"weaver.general.WorkFlowTransMethod.getWFSearchResultCreateTime\" />";
tableString += "<col width=\"10%\" text=\"" + SystemEnv.getHtmlLabelName(1335, user.getLanguage()) + "\" column=\"status\" orderkey=\"status\" />";
if(offical.equals("1")){
tableString += "<col width=\"10%\" text=\""
+ SystemEnv.getHtmlLabelName(1265, user.getLanguage())
+ "\" column=\"requestid\" linkkey=\"requestid\" linkvaluecolumn=\"requestid\" target=\"_fullwindow\" transmethod=\"weaver.general.WorkFlowTransMethod.getContentNewLinkWithTitle\" otherpara=\""
+ para2 + "\" />";
}
tableString += "<col width=\"10%\" text=\"" + SystemEnv.getHtmlLabelName(16354, user.getLanguage()) + "\" column=\"requestid\" otherpara=\"" + para4
+ "\" transmethod=\"weaver.general.WorkFlowTransMethod.getUnOperators\"/>";
tableString += "<col width=\"10%\" display=\""+hasSubWorkflow+"\" text=\""
+ SystemEnv.getHtmlLabelName(19363, user.getLanguage())
+ "\" column=\"requestid\" orderkey=\"t2.requestid\" linkkey=\"requestid\" linkvaluecolumn=\"requestid\" target=\"_self\" transmethod=\"weaver.general.WorkFlowTransMethod.getSubWFLink\" otherpara=\""
+ user.getLanguage() + "\"/>";
/*自定义查询定义的需要展示的列*/
if(isNeed != null && "customSearch".equals(isfrom)){
for(int i = 0; i < _fieldNameArray.length; i++){
String _fieldName = _fieldNameArray[i];
String _fieldLabel = _fieldLabelArray[i];
String _otherPara = fieldids.get(i) + "+" + fieldhtmltypes.get(i) + "+" + fieldtypes.get(i) + "+" + fielddbtypes.get(i) + "+" + user.getLanguage();
int indexOfName = _fieldName.indexOf(".");
if (indexOfName >= 0) {
//column不支持表名加列名形式
_fieldName = _fieldName.substring(indexOfName + 1);
}
//column不支持AS形式
if(_fieldName.indexOf(" as ") >= 0){
_fieldName = _fieldName.substring(_fieldName.indexOf(" as ") + 4);
}
if(_fieldName.indexOf(" AS ") >= 0){
_fieldName = _fieldName.substring(_fieldName.indexOf(" AS ") + 4);
}
tableString += "<col width='15%' name='"+_fieldName+"' text='"+_fieldLabel+"' column='"+_fieldName+"' transmethod=\"weaver.workflow.search.WorkflowSearchUtil.getFieldValueShowStringFromTable\" otherpara=\""+_otherPara+"\" />";
}
}
tableString += "</head>" + "</table>";
%>
<wea:SplitPageTag isShowTopInfo="false" tableString='<%=tableString%>' mode="run" />
</div>
</body>
<% if(isNeed != null && "customSearch".equals(isfrom) && _fieldNameArray.length >0){%>
<style type="text/css">
#_xTable table.ListStyle{
table-layout:auto!important;
}
#_xTable div.table{
overflow:auto;
}
body{
overflow-y:scroll;
overflow-x:hidden;
}
</style>
<script type="text/javascript">
var table_01 = jQuery("#_xTable div.table");
table_01.width(jQuery(window).width());
function afterDoWhenLoaded(){
if(jQuery.browser.msie){
table_01.height(table_01.children("table.ListStyle").outerHeight()+20);
}
parent.window.__optkeys = "";
var curPrimarykeys = _table.primarykeylist;
if (prePageNumber == _table.nowPage) {
if (!!prePrimarykeys && prePrimarykeys.length > 0 && !!curPrimarykeys && curPrimarykeys.length > 0) {
var optkeys = "";
for (var _i=0; _i<prePrimarykeys.length; _i++) {
if (curPrimarykeys.indexOf(prePrimarykeys[_i]) == -1) {
optkeys += "," + prePrimarykeys[_i];
}
}
if (optkeys.length > 1) {
optkeys = optkeys.substr(1);
parent.window.__optkeys = optkeys;
}
}
} else {
prePageNumber = _table.nowPage;
}
prePrimarykeys = curPrimarykeys;
if (!!!p) return;
}
</script>
<%} %>
<script type="text/javascript">
function rightMenuSearch(){
if(jQuery("#advancedSearchOuterDiv").css("display")!="none"){
doSearch();
}else{
try{
jQuery("span#searchblockspan",parent.document).find("img:first").click();
}catch(e){
doSearch();
}
}
}
function changeType(type,span1,span2){
if(type=="1"){
jQuery("#"+span1).css("display","none");
jQuery("#"+span2).css("display","");
}else{
jQuery("#"+span2).css("display","none");
jQuery("#"+span1).css("display","");
}
}
var diag_vote;
function addWFShare(){
var ids="";
$("input[name='chkInTableTag']").each(function(){
if($(this).attr("checked"))
ids = ids +$(this).attr("checkboxId")+",";
});
if(ids=="") {
top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(84560,user.getLanguage())%>") ;
}else{
if(window.top.Dialog){
diag_vote = new window.top.Dialog();
} else {
diag_vote = new Dialog();
}
diag_vote.currentWindow = window;
diag_vote.Width = 850;
diag_vote.Height = 550;
diag_vote.Modal = true;
diag_vote.Title = "<%=SystemEnv.getHtmlLabelName(18037, user.getLanguage())%>";
diag_vote.URL = "/workflow/request/AddWorkflowBatchShared.jsp?ids="+ids;
diag_vote.show();
}
}
function submitData()
{
if (check_form(frmmain,''))
document.frmmain.submit();
}
function submitClear()
{
btnclear_onclick();
}
function enablemenuall()
{
for (a=0;a<window.frames["rightMenuIframe"].document.all.length;a++)
{
window.frames["rightMenuIframe"].document.all.item(a).disabled=true;
}
//window.frames["rightMenuIframe"].event.srcElement.disabled = true;
}
function changelevel(obj,tmpindex){
if(obj.value!=""){
document.frmmain.check_con[tmpindex*1].checked = true;
}else{
document.frmmain.check_con[tmpindex*1].checked = false;
}
}
function changelevel1(obj1,obj,tmpindex){
if(obj.value!=""||obj1.value!=""){
document.frmmain.check_con[tmpindex*1].checked = true;
}else{
document.frmmain.check_con[tmpindex*1].checked = false;
}
}
function onSearchWFQTDate(spanname,inputname,inputname1,tmpindex){
var oncleaingFun = function(){
$(spanname).innerHTML = '';
$(inputname).value = '';
if($(inputname).value==""&&$(inputname1).value==""){
document.frmmain.check_con[tmpindex*1].checked = false;
}
}
var language=readCookie("languageidweaver");
if(language==8)
languageStr ="en";
else if(language==9)
languageStr ="zh-tw";
else
languageStr ="zh-cn";
if(window.console){
//console.log("language "+language+" languageStr="+languageStr);
}
WdatePicker({lang:languageStr,el:spanname,onpicked:function(dp){
var returnvalue = dp.cal.getDateStr();$dp.$(inputname).value = returnvalue;document.frmmain.check_con[tmpindex*1].checked = true;},oncleared:oncleaingFun});
}
function onSearchWFQTTime(spanname,inputname,inputname1,tmpindex){
var dads = document.all.meizzDateLayer2.style;
setLastSelectTime(inputname);
var th = spanname;
var ttop = spanname.offsetTop;
var thei = spanname.clientHeight;
var tleft = spanname.offsetLeft;
var ttyp = spanname.type;
while (spanname = spanname.offsetParent){
ttop += spanname.offsetTop;
tleft += spanname.offsetLeft;
}
dads.top = (ttyp == "image") ? ttop + thei : ttop + thei + 22;
dads.left = tleft;
outObject = th;
outValue = inputname;
outButton = (arguments.length == 1) ? null : th;
dads.zIndex = jQuery('#advancedSearchOuterDiv').css('z-index')+1;
dads.display = '';
bShow = true;
CustomQuery=1;
outValue1 = inputname1;
outValue2=tmpindex;
}
function uescape(url){
return escape(url);
}
function disModalDialog(url, spanobj, inputobj, need, curl) {
var id = window.showModalDialog(url, "",
"dialogWidth:550px;dialogHeight:550px;" + "dialogTop:" + (window.screen.availHeight - 30 - parseInt(550))/2 + "px" + ";dialogLeft:" + (window.screen.availWidth - 10 - parseInt(550))/2 + "px" + ";");
if (id != null) {
if (wuiUtil.getJsonValueByIndex(id, 0) != "") {
if (curl != undefined && curl != null && curl != "") {
spanobj.innerHTML = "<A href='" + curl
+ wuiUtil.getJsonValueByIndex(id, 0) + "'>"
+ wuiUtil.getJsonValueByIndex(id, 1) + "</a>";
} else {
spanobj.innerHTML = wuiUtil.getJsonValueByIndex(id, 1);
}
inputobj.value = wuiUtil.getJsonValueByIndex(id, 0);
} else {
spanobj.innerHTML = need ? "<IMG src='/images/BacoError_wev8.gif' align=absMiddle>" : "";
inputobj.value = "";
}
}
}
function onShowBrowser(id,url,tmpindex) {
var url = url + "?selectedids=" + $G("con" + id + "_value").value;
disModalDialog(url, $G("con" + id + "_valuespan"), $G("con" + id + "_value"), false);
$G("con" + id + "_name").value = $G("con" + id + "_valuespan").innerHTML;
if ($G("con" + id + "_value").value == ""){
document.getElementsByName("check_con")[tmpindex * 1].checked = false;
} else {
document.frmmain.check_con[tmpindex*1].checked = true
document.getElementsByName("check_con")[tmpindex * 1].checked = true;
}
}
function onShowBrowser1(id,url,type1) {
//var url = "/systeminfo/BrowserMain.jsp?url=/proj/data/ProjectBrowser.jsp";
if (type1 == 1) {
id1 = window.showModalDialog(url,"","dialogHeight:320px;dialogwidth:275px")
$G("con" + id + "_valuespan").innerHTML = id1;
$G("con" + id + "_value").value=id1
} else if (type1 == 1) {
id1 = window.showModalDialog(url,"","dialogHeight:320px;dialogwidth:275px")
$G("con"+id+"_value1span").innerHTML = id1;
$G("con"+id+"_value1").value=id1;
}
}
function onShowBrowser2(id, url, type1, tmpindex) {
var tmpids = "";
var id1 = null;
if (type1 == 8) {
tmpids = $G("con" + id + "_value").value;
id1 = window.showModalDialog(url + "?projectids=" + tmpids);
} else if (type1 == 9) {
tmpids = $G("con" + id + "_value").value;
id1 = window.showModalDialog(url + "?documentids=" + tmpids);
} else if (type1 == 1) {
tmpids = $G("con" + id + "_value").value;
id1 = window.showModalDialog(url + "?resourceids=" + tmpids);
} else if (type1 == 4) {
tmpids = $G("con" + id + "_value").value;
id1 = window.showModalDialog(url + "?selectedids=" + tmpids
+ "&resourceids=" + tmpids);
} else if (type1 == 16) {
tmpids = $G("con" + id + "_value").value;
id1 = window.showModalDialog(url + "?resourceids=" + tmpids);
} else if (type1 == 7) {
tmpids = $G("con" + id + "_value").value;
id1 = window.showModalDialog(url + "?resourceids=" + tmpids);
} else if (type1 == 142) {
tmpids = $G("con" + id + "_value").value;
id1 = window.showModalDialog(url + "?receiveUnitIds=" + tmpids);
}
//id1 = window.showModalDialog(url)
if (id1 != null) {
resourceids = wuiUtil.getJsonValueByIndex(id1, 0);
resourcename = wuiUtil.getJsonValueByIndex(id1, 1);
if (wuiUtil.getJsonValueByIndex(id1, 0) != "") {
resourceids = resourceids.replace(',','');
resourcename = resourcename.replace(',','');
$G("con" + id + "_valuespan").innerHTML = resourcename;
jQuery("input[name=con" + id + "_value]").val(resourceids);
jQuery("input[name=con" + id + "_name]").val(resourcename);
} else {
$G("con" + id + "_valuespan").innerHTML = "";
$G("con" + id + "_value").value = "";
$G("con" + id + "_name").value = "";
}
}
if ($G("con" + id + "_value").value == "") {
document.getElementsByName("check_con")[tmpindex * 1].checked = false;
} else {
document.getElementsByName("check_con")[tmpindex * 1].checked = true;
}
}
function onShowWorkFlowSerach(inputname, spanname) {
retValue = window
.showModalDialog("/systeminfo/BrowserMain.jsp?url=/workflow/workflow/WorkflowBrowser.jsp?sqlwhere=<%=xssUtil.put(" where isvalid='1' ")%>");
temp = $G(inputname).value;
if(retValue != null) {
if (wuiUtil.getJsonValueByIndex(retValue, 0) != "0" && wuiUtil.getJsonValueByIndex(retValue, 0) != "") {
$G(spanname).innerHTML = wuiUtil.getJsonValueByIndex(retValue, 1);
$G(inputname).value = wuiUtil.getJsonValueByIndex(retValue, 0);
if (temp != wuiUtil.getJsonValueByIndex(retValue, 0)) {
$G("frmmain").action = "WFCustomSearchBySimple.jsp";
$G("frmmain").submit();
enablemenuall();
}
} else {
$G(inputname).value = "";
$G(spanname).innerHTML = "";
$G("frmmain").action = "WFSearch.jsp";
$G("frmmain").submit();
}
}
}
function disModalDialogRtnM(url, inputname, spanname) {
var id = window.showModalDialog(url);
if (id != null) {
if (wuiUtil.getJsonValueByIndex(id, 0) != "") {
var ids = wuiUtil.getJsonValueByIndex(id, 0);
var names = wuiUtil.getJsonValueByIndex(id, 1);
if (ids.indexOf(",") == 0) {
ids = ids.substr(1);
names = names.substr(1);
}
$G(inputname).value = ids;
var sHtml = "";
var ridArray = ids.split(",");
var rNameArray = names.split(",");
for ( var i = 0; i < ridArray.length; i++) {
var curid = ridArray[i];
var curname = rNameArray[i];
if (i != ridArray.length - 1) sHtml += curname + ",";
else sHtml += curname;
}
$G(spanname).innerHTML = sHtml;
} else {
$G(inputname).value = "";
$G(spanname).innerHTML = "";
}
}
}
function getajaxurl(typeId){
var url = "";
if(typeId==12|| typeId==4||typeId==57||typeId==7 || typeId==18 || typeId==164 || typeId== 194 || typeId==23 || typeId==26 || typeId==3 || typeId==8 || typeId==135
|| typeId== 65 || typeId==9 || typeId== 89 || typeId==87 || typeId==58 || typeId==59){
url = "/data.jsp?type=" + typeId;
} else if(typeId==1 || typeId==165 || typeId==166 || typeId==17){
url = "/data.jsp";
} else {
url = "/data.jsp?type=" + typeId;
}
url = "/data.jsp?type=" + typeId;
//alert(typeId + "," + url);
return url;
}
function showallreceived(requestid,returntdid){
jQuery.post(
'WorkflowUnoperatorPersons.jsp',
{
'requestid' : requestid,
'returntdid' : returntdid
},
function(data, textStatus, xhr) {
$GetEle(returntdid).innerHTML = data;
$GetEle(returntdid).parentElement.title = data.replace(/[\r\n]/gm, "");
}
);
}
function setSelectBoxValue(selector, value) {
if (value == null) {
value = jQuery(selector).find('option').first().val();
}
if(jQuery(selector).attr("id") == "cutomQuerySelect"){
return;
}
jQuery(selector).selectbox('change',value,jQuery(selector).find('option[value="'+value+'"]').text());
}
function cleanBrowserValue(name) {
_writeBackData(name, 1, {id:'',name:''});
}
function onReset() {
//browser
jQuery('#weaver .e8_os input[type="hidden"]').each(function() {
cleanBrowserValue(jQuery(this).attr('name'));
});
//input
jQuery('#weaver input:text').val('');
//select
jQuery('#weaver select').each(function() {
setSelectBoxValue(this);
});
<%
if("customSearch".equals(isfrom)){
%>
loadCustomSearchForReset("<%=workflowid%>","<%=customid%>")
<%}else{%>
loadCustomSearchForReset(null,null)
<%}%>
}
function onResetForCustom() {
//browser
jQuery('#weaver .e8_os input[type="hidden"]').each(function() {
cleanBrowserValueForCustom(jQuery(this).attr('name'));
});
//input
jQuery('#weaver input:text').val('');
//select
jQuery('#weaver select').each(function() {
setSelectBoxValue(this);
});
}
function cleanBrowserValueForCustom(name) {
if(name=="workflowid"){
var wfid = "<%=workflowid%>";
var wfname = "<%=WorkflowComInfo.getWorkflowname(workflowid)%>";
_writeBackData(name, 1, {id:wfid,name:wfname},{hasInput:true,isSingle:true});
}else{
_writeBackData(name, 1, {id:'',name:''});
}
}
function getFlowWindowUrl(){
return "/systeminfo/BrowserMain.jsp?url=/workflow/workflow/WorkflowTypeBrowser.jsp?typeid=<%=typeid%>";
}
function loadCustomSearchForReset(workFlowId, cutomQueryId){
if(!workFlowId && !cutomQueryId){
jQuery('#customQueryDiv').html('');
return;
}
jQuery.post(
'/workflow/search/WFCustomSearchGenerate.jsp',
{
'issimple' : true,
'workflowid' : workFlowId,
'customid' : cutomQueryId
},
function(data){
jQuery('#customQueryDiv').html(data);
jQuery('#customQueryDiv').find('select').each(function(i,v){
beautySelect(jQuery(v));
});
jQuery('#cutomQuerySelect').change(function(e){
loadCustomSearchForReset(null, jQuery(this).val());
});
jQuery('#cutomQuerySelect').click(function(e){
if (e && e.stopPropagation)
e.stopPropagation()
else
window.event.cancelBubble=true
});
}
);
}
function OnMultiSubmitNew(obj){
var _reqIds = _xtable_CheckedCheckboxId();
if(_reqIds!=""){
return OnMultiSubmitNew1(obj);
}else{
top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(20149,user.getLanguage())%>");
}
}
function __displayloaddingblock() {
try {
var pTop= parent.document.body.offsetHeight/2+parent.document.body.scrollTop - 50 + jQuery(".e8_boxhead", parent.document).height()/2 ;
var pLeft= parent.document.body.offsetWidth/2 - (65);
//var __top = (jQuery(document.body).height())/2 - 40;
//var __left = (jQuery(document.body).width() - parseInt(157))/2
jQuery("#submitloaddingdiv", parent.document).css({"top":pTop, "left":pLeft, "display":"inline-block;"});
jQuery("#submitloaddingdiv", parent.document).show();
jQuery("#submitloaddingdiv_out", parent.document).show();
} catch (e) {}
}
function OnMultiSubmitNew1(obj){
<%
int multisubmitnotinputsign = 0;
RecordSet.executeSql("select multisubmitnotinputsign from workflow_RequestUserDefault where userId = "+ user.getUID());
if(RecordSet.next()){
multisubmitnotinputsign = Util.getIntValue(Util.null2String(RecordSet.getString("multisubmitnotinputsign")), 0);
}
if (multisubmitnotinputsign == 0) {
%>
if(_xtable_CheckedCheckboxId()!=""){
//$GetEle("multiSubIds").value = _xtable_CheckedCheckboxId();
//$GetEle("frmmain").submit();
//obj.disabled=true;
//批量提交签字意见
var dialog = new window.top.Dialog();
dialog.currentWindow = window;
var url = "/workflow/search/WFSuperviseSignature.jsp?fromtype=1";
dialog.Title = "<%=SystemEnv.getHtmlLabelName(26039,user.getLanguage())%>";
dialog.Width = 450;
dialog.Height = 227;
dialog.Drag = true;
dialog.URL = url;
dialog.callbackfun = function (paramobj, remark) {
OnMultiSubmitNew2(obj, remark);
}
dialog.show();
}else{
alert("<%=SystemEnv.getHtmlLabelName(20149,user.getLanguage())%>");
}
<%} else {%>
OnMultiSubmitNew2(obj);
<%}%>
}
function OnMultiSubmitNew2(obj, remark){
if(_xtable_CheckedCheckboxId()!=""){
//$GetEle("multiSubIds").value = _xtable_CheckedCheckboxId();
//$GetEle("frmmain").submit();
//obj.disabled=true;
__displayloaddingblock();
<%
String wftype=Util.null2String(request.getParameter("wftype"));
int flowAll=Util.getIntValue(Util.null2String(request.getParameter("flowAll")), 0);
int flowNew=Util.getIntValue(Util.null2String(request.getParameter("flowNew")), 0);
workflowid = Util.null2String(request.getParameter("workflowid"));
%>
var multsuburl = "/workflow/request/RequestListOperation.jsp?multiSubIds=" + _xtable_CheckedCheckboxId() + "&workflowid=<%=workflowid%>&method=all&wftype=<%=wftype%>&flowAll=<%=flowAll%>&flowNew=<%=flowNew%>&viewcondition=0&pagefromtype=1";
jQuery.ajax({
type: "post",
cache: false,
url: multsuburl,
data:{'remark' : remark},
contentType : "application/x-www-form-urlencoded;charset=UTF-8",
complete: function(){
},
error:function (XMLHttpRequest, textStatus, errorThrown) {
__hidloaddingblock();
} ,
success : function (data, textStatus) {
_xtable_CleanCheckedCheckbox();
__hidloaddingblock();
_table.reLoad();
}
});
}else{
alert("<%=SystemEnv.getHtmlLabelName(20149,user.getLanguage())%>");
}
}
function __hidloaddingblock() {
try {
jQuery("#submitloaddingdiv", parent.document).hide();
jQuery("#submitloaddingdiv_out", parent.document).hide();
} catch (e) {}
}
</script>
</html>