setIsRead.js
2.96 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
var type = getUrlParam("type");
var opener_windows=null;
function isread(fid){
$.post(global.contextPath + global.modelctls.document.setIsRead,
{fid:fid},
function (result) {
refleshList(type);
});
}
function setDisable(){
//表单输入控件全不可填
$('input').attr("disabled",true);
//附件相关控件不可填
// $('.div-attachment').attr("disabled",true);
//
// $("#_fileForm ").before("");
// $("#originhead").append("");
}
function refleshList(type){
opener_windows=window.opener;
if(opener_windows==null){
//若跳转到其他页列表刷新在当前页,否则默认刷新在第一页
if(type=="endorsementdocumentsData")
refshqp();
if(type=="circulatedocumentsData")
refshcy();
if(type=="documentSearchData")
refshsy();
if(type=="supervisionlistData")
refshdb();
if(type=="dealedlistData")
refshyb();
if(type=="managerlistData")
refshgw();
if(type=="archivefileData")
refshgd();
if(type=="draftlistData")
refshcg();
}else{
if(type=="endorsementdocumentsData")
opener_windows.refshqp();
if(type=="circulatedocumentsData")
opener_windows.refshcy();
if(type=="documentSearchData")
opener_windows.refshsy();
if(type=="supervisionlistData")
opener_windows.refshdb();
if(type=="dealedlistData")
opener_windows.refshyb();
if(type=="managerlistData")
opener_windows.refshgw();
if(type=="archivefileData")
opener_windows.refshgd();
if(type=="draftlistData")
opener_windows.refshcg();
if(type==""){
//控制台报opener_windows.refshcy();不是一个函数的错
//opener_windows.refshcy();
}
}
}
function changegw(obj){
var pid=$("#pid").val();
var text = $(obj).text();
if(text=="全部"){
$("#selectHtml").html("全部<span class='caret' style=\"margin-left:5px;\"></span>");
getGWsearch("",pid);
}
if(text=="公文"){
$("#selectHtml").html("公文<span class='caret' style=\"margin-left:5px;\"></span>");
getGWsearch("GW",pid);
}
if(text=="附件"){
$("#selectHtml").html("附件<span class='caret' style=\"margin-left:5px;\"></span>");
getGWsearch("FJ",pid);
}
if(text=="会议"){
$("#selectHtml").html("会议<span class='caret' style=\"margin-left:5px;\"></span>");
getGWsearch("HY",pid);
}
if(text=="审批"){
$("#selectHtml").html("审批<span class='caret' style=\"margin-left:5px;\"></span>");
getGWsearch("SP",pid);
}
if(text=="档案"){
$("#selectHtml").html("档案<span class='caret' style=\"margin-left:5px;\"></span>");
getGWsearch("DA",pid);
}
}
/**
* 关闭当前标签时调用
*/
$(window).unload(function(){
if(documenttype!=undefined){
if(documenttype=="发文"){
if(numberValue==""){return;}
var loginUserUnit=logginUnit[0].name;
//若保存了文号,则更新为在用并且显示1, Y
if(isSaveNumber){
updateNumber(numberValue,loginUserUnit,"1","Y")
//反之,则更新为在用并且显示 0, N
}else{
updateNumber(numberValue,loginUserUnit,"0","N")
}
}
}
});