You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
249 lines
9.0 KiB
Plaintext
249 lines
9.0 KiB
Plaintext
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>流程评论</title>
|
|
</head>
|
|
<body onkeypress="Esc()">
|
|
<script language="JavaScript" src="../../Comm/JScript.js" type="text/javascript"></script>
|
|
<script type="text/javascript" src="../../Scripts/bootstrap/js/jquery.min.js"></script>
|
|
<script type="text/javascript" src="../../Scripts/bootstrap/js/bootstrap.min.js"></script>
|
|
<script src="../../Scripts/QueryString.js" type="text/javascript"></script>
|
|
<script src="../../Scripts/config.js" type="text/javascript"></script>
|
|
<script src="../../Comm/Gener.js" type="text/javascript"></script>
|
|
<script src="css/demo.js" type="text/javascript"></script>
|
|
<base target="_self" />
|
|
<link href="../../../DataUser/Style/ccbpm.css" rel="stylesheet" type="text/css" />
|
|
<link href="css/demo.css" rel="stylesheet" type="text/css" />
|
|
<script language="javascript" type="text/javascript">
|
|
/* ESC Key Down */
|
|
function Esc() {
|
|
if (event.keyCode == 27)
|
|
window.close();
|
|
return true;
|
|
}
|
|
var idx = 0;
|
|
//页面启动函数.
|
|
$(function () {
|
|
$("#Msg").html("<img src=../../../Img/loading.gif /> 正在加载,请稍后......");
|
|
InitPage();
|
|
Count();
|
|
$("#Msg").html("");
|
|
});
|
|
|
|
var fk_flow = GetQueryString("FK_Flow");
|
|
var workid = GetQueryString("WorkID");
|
|
var fid = GetQueryString("FID");
|
|
|
|
//初始化数据.
|
|
function InitPage() {
|
|
$("#Table1 tr:not(:first)").html("");
|
|
|
|
|
|
var handler = new HttpHandler("BP.WF.HttpHandler.WF_WorkOpt_OneWork");
|
|
handler.AddUrlData();
|
|
var data = handler.DoMethodReturnString("FlowBBSList");
|
|
|
|
if (data.indexOf('err@') == 0) {
|
|
alert(data);
|
|
return;
|
|
}
|
|
|
|
if (data == "[]") {
|
|
return;
|
|
}
|
|
//转化成json.
|
|
data = JSON.parse(data);
|
|
//增加处理.
|
|
for (var i = 0; i < data.length; i++) {
|
|
//增加行.
|
|
AddRow(data[i]);
|
|
}
|
|
}
|
|
//删除.
|
|
function Delete(mypk) {
|
|
if (window.confirm('您确定要删除吗?') == false)
|
|
return;
|
|
|
|
var handler = new HttpHandler("BP.WF.HttpHandler.WF_WorkOpt_OneWork");
|
|
handler.AddUrlData();
|
|
handler.AddPara("MyPK", mypk);
|
|
var data = handler.DoMethodReturnString("FlowBBS_Delete");
|
|
|
|
if (data.indexOf('err@') == 0) {
|
|
alert(data);
|
|
return;
|
|
}
|
|
|
|
$("#Table1 tr[id='" + mypk + "']").remove();
|
|
Count();
|
|
}
|
|
var wait = 0;
|
|
function time(o) {
|
|
if (wait == 0) {
|
|
o.removeAttribute("disabled");
|
|
o.value = "提交评论";
|
|
wait = 10;
|
|
} else {
|
|
o.setAttribute("disabled", true);
|
|
o.value = "操作过于频繁,请" + wait + "秒后在提交";
|
|
wait--;
|
|
setTimeout(function () {
|
|
time(o)
|
|
},
|
|
1000)
|
|
}
|
|
}
|
|
//统计评论条数
|
|
function Count() {
|
|
|
|
var handler = new HttpHandler("BP.WF.HttpHandler.WF_WorkOpt_OneWork");
|
|
handler.AddUrlData();
|
|
var data = handler.DoMethodReturnString("FlowBBS_Count");
|
|
if (data.indexOf('err@') == 0) {
|
|
alert(data);
|
|
return;
|
|
}
|
|
|
|
document.getElementById("TB_count").innerText = data;
|
|
}
|
|
function Check(empName) {
|
|
|
|
$("#Table1 tr:not(:first)").html("");
|
|
|
|
var handler = new HttpHandler("BP.WF.HttpHandler.WF_WorkOpt_OneWork");
|
|
handler.AddUrlData();
|
|
handler.AddPara("UserName", encodeURIComponent(empName));
|
|
var data = handler.DoMethodReturnString("FlowBBS_Check");
|
|
|
|
|
|
if (data.indexOf('err@') == 0) {
|
|
alert(data);
|
|
return;
|
|
}
|
|
|
|
if (data == "[]") {
|
|
return;
|
|
}
|
|
//转化成json.
|
|
data = JSON.parse(data);
|
|
//增加处理.
|
|
for (var i = 0; i < data.length; i++) {
|
|
AddRow(data[i]);
|
|
|
|
}
|
|
}
|
|
|
|
function Submit() {
|
|
|
|
if ($("#TB_Msg").val() == null || $("#TB_Msg").val() == "" || $("#TB_Msg").val().trim().length == 0) {
|
|
alert("请填写评论内容!");
|
|
return;
|
|
}
|
|
var i = 0;
|
|
$(document).ready(function () {
|
|
$("#Btn_Save").click(function () {
|
|
if (i == 1) {
|
|
time(document.getElementById("Btn_Save"));
|
|
}
|
|
i = i + 1;
|
|
});
|
|
|
|
});
|
|
|
|
var handler = new HttpHandler("BP.WF.HttpHandler.WF_WorkOpt_OneWork");
|
|
handler.AddUrlData();
|
|
handler.AddFormData();
|
|
var data = handler.DoMethodReturnString("FlowBBS_Save");
|
|
|
|
|
|
if (data.indexOf('err@') == 0) {
|
|
alert(data);
|
|
return;
|
|
}
|
|
if (data == "[]") {
|
|
return;
|
|
}
|
|
//转化成json.
|
|
data = JSON.parse(data);
|
|
AddRow(data[0]);
|
|
}
|
|
//清空评论
|
|
function Clear() {
|
|
$("#TB_Msg").val("");
|
|
return;
|
|
}
|
|
//评论回复
|
|
function Rel(empNo, pk, empName) {
|
|
|
|
var handler = new HttpHandler("BP.WF.HttpHandler.WF_WorkOpt_OneWork");
|
|
handler.AddUrlData();
|
|
|
|
var data = handler.DoMethodReturnString("FlowBBSUserName");
|
|
var url = "FlowBBSReplay.htm?RE=" + empNo + "&MyPK=" + pk + "&UserName=" + encodeURIComponent(empName) + "&WebUser=" + encodeURIComponent(data);
|
|
WinOpen(url);
|
|
|
|
}
|
|
function AddRow(data) {
|
|
var mypk = data.MyPK;
|
|
var date = data.RDT;
|
|
var empNo = data.EmpFrom;
|
|
var empName = data.EmpFromT;
|
|
var msg = data.Msg;
|
|
|
|
//获取发表人所在的部门
|
|
var emp = new Entity("BP.WF.Port.Emp", empNo);
|
|
|
|
//var leftInfo = "<img src='../../Img/Dot.png' border='1' width='7px'/> " + empNo + " <br/><br/>";
|
|
var leftInfo = "";
|
|
//增加上icon.
|
|
leftInfo += "<th><img width='100' height='100' src='../../../DataUser/UserIcon/" + empNo + "Biger.png' onerror=\"this.src='../../../DataUser/UserIcon/DefaultBiger.png'\" /> </th><br/><br/>";
|
|
leftInfo += "<th>发表人:  " + empName + "<br>";
|
|
leftInfo += "发表于:  " + date + "<br>";
|
|
leftInfo += "所属部门:  " + emp.FK_DeptText;
|
|
leftInfo += "</th>";
|
|
var delLink = "<a href=\"javascript:Delete('" + mypk + "');\" ><img src='../../Img/Btn/Delete.gif' />删除</a>  |  <a href=\"javascript:Rel('" + empNo + "','" + mypk + "','" + empName + "');\"><img src='../../Img/Btn/Reply.gif' /> 回复</a>  |  <a href=\"javascript:Check('" + empName + "','" + fk_flow + "');\">只看该用户</a> ";
|
|
var newRow = "<tr id='" + mypk + "'>" + leftInfo + "<br><br><th colspan='2'>" + msg + "<br/><br/><hr style='height:1px;border:none;border-top:1px dashed blue;' />" + delLink + "</th></tr>";
|
|
$("#Table1 tr:last").after(newRow);
|
|
Count();
|
|
}
|
|
|
|
|
|
function goTop() {
|
|
if (this.location.href.indexOf("#top") == -1) {
|
|
this.location.href = this.location.href + "#top";
|
|
}
|
|
else {
|
|
this.location.href = this.location.href;
|
|
}
|
|
}
|
|
</script>
|
|
<div align="center" style="margin-top:20px">
|
|
<a name="top"></a>
|
|
<table id="Table1" style="width: 98%;">
|
|
<tr>
|
|
<th style="width: 20%;" colspan="2"> 资料</th>
|
|
<th>信息内容 </th>
|
|
<th style="text-align: right;">评论总计条数: <span style="color: red" id="TB_count" /> </th>
|
|
</tr>
|
|
</table>
|
|
<form id="cc" name="cc">
|
|
<div style="width: 98%;">
|
|
<textarea rows="5" id="TB_Msg" name="TB_Msg" cols="60"></textarea>
|
|
<br />
|
|
<input type="button" id="Btn_Save" name="Btn_Save" value="提交评论" onclick="Submit();" />
|
|
<input type="button" id="Button1" name="Btn_Save" value="清空" onclick="Clear();" />
|
|
</div>
|
|
</form>
|
|
<div id="Msg"></div>
|
|
</div>
|
|
<div class="side">
|
|
<ul>
|
|
<li style="border: none;"><a href="javascript:goTop();">
|
|
<div class="sidebox">
|
|
<img src="Img/TOP.png">顶部</div>
|
|
</a></li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|