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.

328 lines
11 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!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>
<!--
1, 抄送界面。
2需要 FK_Flow, FK_Node,WorkID, FID.
3, 调用方法 CC.htm?FK_Flow=001&FK_Node=103&WorkID=232&FID=23
-->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="white" />
<script src="../Scripts/bootstrap/js/bootstrap.min.js"></script>
<link href="../Scripts/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<script src="../Scripts/bootstrap/bootstrap-table/src/bootstrap-table.js"></script>
<link href="../Scripts/bootstrap/bootstrap-table/src/bootstrap-table.css" rel="stylesheet" />
<link href="../js/mui/css/mui.css" rel="stylesheet" type="text/css" />
<script src="../js/jquery.js" type="text/javascript"></script>
<script src="../js/mui/js/mui.min.js" type="text/javascript"></script>
<script src="../Scripts/config.js" type="text/javascript"></script>
<script src="../Scripts/QueryString.js" type="text/javascript"></script>
<script src="../Comm/Gener.js" type="text/javascript"></script>
<script type="text/javascript" src="../Scripts/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../Scripts/bootstrap/js/jquery.cokie.min.js"></script>
<style type="text/css">
</style>
<script type="text/javascript">
var param = {};
$(function () {
Help();
//初始化页面移交页面
param = {
FK_Node: GetQueryString('FK_Node'),
WorkID: GetQueryString('WorkID'),
FID: GetQueryString('FID'),
Message: GetQueryString('Info'),
FK_Flow: GetQueryString("FK_Flow")
};
var dept = getQueryStringByNameFromUrl("?" + $.cookie('CCS'), "FK_Dept");
if (dept == null || dept == '' || dept == undefined) {
dept = $.cookie('FK_Dept');
}
if (dept == undefined) {
var u = new WebUser();
dept = u.FK_Dept;
}
var url = "SelectEmps.htm?FK_Dept=" + dept + "&s=" + Math.random();
url = url.replace('=101&', '=10102&');
url += "&WorkID=" + GetQueryString("WorkID") + "&FK_Flow=" + GetQueryString("FK_Flow") + "&FK_Node=" + GetQueryString("FK_Node") + "&PageName=CC";
$('#BtnSelectEmps').bind('click', function () {
SetHref(url);
});
//查询出来抄送的信息.
var ccs = new Entities("BP.WF.CCLists");
ccs.Retrieve("FK_Node", GetQueryString("FK_Node"), "WorkID", GetQueryString("WorkID"));
BindTable(ccs);
});
function BindTable(ccs) {
for (var i = 0; i < ccs.length; i++) {
var cc = ccs[i];
var row = "";
row += "<tr>";
row += "<td>" + cc.CCToName + "</td>";
// row += "<td title='" + cc.CCToDeptName + "' >" + cc.CCToDeptName + "</td>";
row += "<td><a href=\"javascript:DeleteIt('" + cc.MyPK + "'," + i + ");\" >移除</a></td>";
row += "</tr>";
$("#Table1 tbody").append(row);
}
}
function DeleteIt(mypk, row) {
var cc = new Entity("BP.WF.CCList");
cc.MyPK = mypk;
cc.Delete();
ClearTable();
//查询出来抄送的信息.
var ccs = new Entities("BP.WF.CCLists");
ccs.Retrieve("FK_Node", GetQueryString("FK_Node"), "WorkID", GetQueryString("WorkID"));
BindTable(ccs);
return;
}
//确定 执行抄送操作
function DoCC(empStr) {
var workID = GetQueryString("WorkID");
var webUser = new WebUser();
var emp = new Entity("BP.Port.Emp");
emp.No = empStr;
if (emp.RetrieveFromDBSources() == 0) {
emp.No = webUser.OrgNo + "_" + empStr;
emp.Retrieve();
}
var empName = emp.Name;
var empDeptNo = emp.FK_Dept;
var empDeptName = emp.FK_DeptText;
var gwf = new Entity("BP.WF.GenerWorkFlow", workID);
var title = gwf.Title;
var nodeName = gwf.NodeName;
var flowName = gwf.FlowName;
var cc = new Entity("BP.WF.CCList");
//当前人员的信息.
cc.Rec = webUser.No;
cc.RecName = webUser.Name;
//抄送给人员的信息.
cc.CCTo = empStr;
cc.CCToName = empName;
cc.FK_Node = GetQueryString("FK_Node");
cc.WorkID = GetQueryString("WorkID");
cc.MyPK = cc.WorkID + "_" + cc.FK_Node + "_" + cc.CCTo;
if (cc.IsExits() == true) {
alert('该人员[' + cc.CCToName + ']已经存在.');
return;
}
//抄送给部门的信息.
cc.CCToDept = empDeptNo;
cc.CCToDeptName = empDeptName;
cc.WorkID = GetQueryString("WorkID");
cc.FK_Node = GetQueryString("FK_Node");
cc.NodeName = nodeName;
cc.FK_Flow = GetQueryString("FK_Flow");
cc.FlowName = flowName;
cc.Title = title;
cc.MyPK = cc.WorkID + "_" + cc.FK_Node + "_" + cc.CCTo;
cc.Sta = -1;
if (cc.IsExits() == true) {
alert('该人员已经存在.');
return;
}
cc.Insert();
ClearTable();
//查询出来抄送的信息.
var ccs = new Entities("BP.WF.CCLists");
ccs.Retrieve("FK_Node", GetQueryString("FK_Node"), "WorkID", GetQueryString("WorkID"));
BindTable(ccs);
$(".foot").hide();
}
//设置选中的人员
function selectEmpsWindowClose(data) {
$('#myPopup').popup('close');
if (data == '取消') {
return;
}
DoCC(data.No);
return;
$('#TB_Emps').val(data.No);
}
//删除当前行
function delRow(nowTr) {
$("#Table1 tbody tr:eq(" + nowTr + ")").remove();
}
//得到行对象
function ClearTable() {
var table = $("#Table1");
var tbody = $("#Table1 tbody");
var trArr = $("#Table1 tbody tr");
tbody.empty();
}
$(function () {
$("#TB_Emps").bind('input propertychange', function () {
if ($("#TB_Emps").val() == null || $("#TB_Emps").val() == "") {
$("#SelectEmp").hide().html("");
return;
}
//执行数据初始化工作.
var hand = new HttpHandler("BP.WF.HttpHandler.WF_WorkOpt");
hand.AddUrlData();
hand.AddPara("TB_Emps", $("#TB_Emps").val());
var data = hand.DoMethodReturnString("HuiQian_SelectEmps");
if (data.indexOf('err@') == 0) {
alert(data);
return;
}
data = JSON.parse(data);
var html = "";
for (var i = 0; i < data.length; i++) {
html = html + "<div class='item' onclick='getCon(\"" + data[i].No + "\");' onmouseenter='getFocus(this)'>" + data[i].Name + "</div>";
}
$("#SelectEmp").show().html(html);
});
});
function selectAdd(No) {
DoCC(No);
}
//鼠标事件
function getFocus(obj) {
$(".item").removeClass("addbg");
$(obj).addClass("addbg");
}
//选择下拉数据
function getCon(no) {
$("#TB_Emps").val('');
DoCC(no);
$("#SelectEmp").hide().html("");
}
function Help() {
$("#HelpInfo").toggle();
}
function Back() {
var url = "../MyFlowGener.htm?WorkID=" + GetQueryString("WorkID") + "&FK_Flow=" + GetQueryString("FK_Flow") + "&FK_Node=" + GetQueryString("FK_Node") + "&ms=" + Math.random();
SetHref(url);
}
/**/</script>
</head>
<body>
<!--标题-->
<header class="mui-bar mui-bar-nav">
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
<a class="mui-action-back mui-icon mui-pull-right" href="javascript:Back();" style="font-size:14px">完成</a>
<h1 class="mui-title">请选择抄送的人</h1>
</header>
<!--页面内容展示-->
<div class="mui-content">
<div class="mui-scroll-wrapper">
<div class="mui-scroll">
<div class="mui-input-row" style="margin-top: 55px;">
<table id="Table1" class="table" style="width: 98%;">
<thead>
<tr id='title'>
<th>名称</th>
<!--<th> 所在部门 </th>-->
<th> 操作 </th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<div>
<div id="labInfo">
输入关键字:
<input type="text" id="TB_Emps" title="查张三,您可输入: zs或zhangs或zhangsan" placeholder="查张三,您可输入:zs或zhangs或zhangsan" name="TB_Emps" value='' style="width: 99%;" />
<div id="SelectEmp"></div>
<button type="button" id="BtnSelectEmps" class="mui-btn mui-btn-success mui-icon mui-icon-plus" style="width:100%;background-color:#4cd9647a;border-color:#4cd9647a">选择抄送人</button>
<br /><img src="../Img/CC.png" style="width:27px;" /><a href="javascript:Help()">帮助</a>
</div>
<div id="HelpInfo" style="">
<ul>
<li> 1、抄送就是把当前的工作抄送给其他人查阅但是对方没有审批审核的权限。</li>
<li>2、被抄送人可以在抄送列表里查看抄送信息。</li>
<li>3、可以使用人员名称拼音支持全拼和简拼。</li>
<li>例如:查找耿润华您可以输入: grh 或者 gengrh 或者 gengrunhua</li>
<li>支持单位名称,例如:耿润华/集团信息中心, 可以输入为 grh/jtxxzx</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript">
//初始化单页的区域滚动
mui('.mui-scroll-wrapper').scroll();
mui.init({
beforeback: function () {//监听物理返回按键的方法
Back();
return false;
}
});
</script>
</html>