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.

220 lines
8.8 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, 调用方法 ReturnWork.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,maximum-scale=1,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="white" />
<!-- 引入mui -->
<script src="../js/jquery.js" type="text/javascript"></script>
<script src="../js/mui/js/mui.min.js" type="text/javascript"></script>
<link href="../js/mui/css/mui.css" rel="stylesheet" type="text/css" />
<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/jquery.cokie.min.js"></script>
<script type="text/javascript">
var param = {};
var selectNo = '';
$(function () {
//初始化页面移交页面
param = {
FK_Node: GetQueryString('FK_Node'),
WorkID: GetQueryString('WorkID'),
FID: GetQueryString('FID'),
Message: GetQueryString('Info'),
FK_Flow: GetQueryString("FK_Flow"),
selectNo:GetQueryString("Select_No"),
selectName:GetQueryString("Select_Name")
};
//选择移交人
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 += "&WorkID=" + GetQueryString("WorkID") + "&FK_Flow=" + GetQueryString("FK_Flow") + "&FK_Node=" + GetQueryString("FK_Node") + "&PageName=Forward";
$('#BtnSelectEmps').bind('click', function () {
SetHref(url);
});
if (param.selectNo != null && param.selectNo != undefined && param.selectNo != "") {
selectNo = param.selectNo;
$("#TB_Emps").val(param.selectName);
}
//人员选择.
$("#TB_Emps").bind('input propertychange', function () {
if ($("#TB_Emps").val() == null || $("#TB_Emps").val() == "") {
$("#SelectEmp").hide().html("");
return;
} else {
//回去输入内容,查询数据库
var handler = new HttpHandler("BP.WF.HttpHandler.CCMobile_WorkOpt");
handler.AddPara("FK_Node", GetQueryString("FK_Node"));
handler.AddPara("WorkID", GetQueryString("WorkID"));
handler.AddPara("FID", GetQueryString("FID"));
handler.AddPara("TB_Emps", $("#TB_Emps").val());
var data = handler.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 + "\",\""+data[i].Name+"\");' onmouseenter='getFocus(this)'>" + data[i].Name + "</div>";
}
$("#SelectEmp").show().html(html);
}
});
});
//鼠标事件
function getFocus(obj) {
$(".item").removeClass("addbg");
$(obj).addClass("addbg");
}
//选择下拉数据
function getCon(no, name) {
selectNo = no;
$("#TB_Emps").val(name);
$("#SelectEmp").hide().html("");
}
//确定 执行会签操作
function ShiftWork() {
if (selectNo == "") {
alert('请输入要移交的人员ID.');
return;
}
var handler = new HttpHandler("BP.WF.HttpHandler.WF_WorkOpt");
handler.AddPara("FK_Flow", param.FK_Flow);
handler.AddPara("WorkID", param.WorkID);
handler.AddPara("FID", param.FID);
handler.AddPara("FK_Node", param.FK_Node);
handler.AddPara("ToEmp", selectNo);
handler.AddPara("Message", $("#Message").val());
var data = handler.DoMethodReturnString("Shift_Save");
if (data.indexOf('err@') == 0) {
alert(data);
return;
}
BackTolist();
}
//确定 执行移交操作
function ReturnPopupWork() {
//WorkID, this.FID, this.FK_Node
var empNos = frames["iframeSelectEmpsForm"].window.returnVal.No;
if (empNos == "" || empNos == undefined || empNos == null)
return;
alert(empNos);
$.ajax({
type: 'post',
async: true,
data: { FK_Flow: param.FK_Flow, WorkID: param.WorkID, FID: param.FID, FK_Node: param.FK_Node },
url: Handler + "?DoType=Shift&FK_Flow=" + param.FK_Flow + "&WorkID=" + param.WorkID + "&FID=" + param.FID + "&FK_Node=" + param.FK_Node + "&m=" + Math.random() + "&ToEmp=" + empNos + '&Message=' + $('#Message').val(),
dataType: 'html',
success: function (data) {
if (window.parent != null && window.parent.returnWorkWindowClose != null) {
window.parent.returnWorkWindowClose(data);
} else {
$('body').append($('<div>' + data + '</div>'));
}
}
});
$(".foot").hide();
}
//取消移交
function Close() {
if (window.parent != null && window.parent.returnWorkWindowClose != null) {
window.parent.returnWorkWindowClose("取消");
} else {
$('body').append($('<div>' + "已取消操作" + '</div>'));
window.close();
}
}
//返回我的工作.
function BackToWork() {
var url = "../MyFlow.htm?WorkID=" + GetQueryString("WorkID") + "&FK_Flow=" + GetQueryString("FK_Flow") + "&FK_Node=" + GetQueryString("FK_Node");
SetHref(url);
}
function BackTolist() {
var url = "../Todolist.htm?WorkID=" + GetQueryString("WorkID") + "&FK_Flow=" + GetQueryString("FK_Flow") + "&FK_Node=" + GetQueryString("FK_Node");
SetHref(url);
}
//设置选中的人员
function selectEmpsWindowClose(returnVal) {
$('#win').window('close');
if (returnVal == '取消') {
return;
}
$('#TB_Emps').val(returnVal);
}
/**/</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>
<h1 id="title" class="mui-title">请选择移交人</h1>
</header>
<nav class="mui-bar mui-bar-tab ">
<a class="mui-tab-item" href="#" id="ShiftWork" onclick="ShiftWork()">确定移交</a>
<a class="mui-tab-item" href="#" id="BackToWork" onclick="BackToWork()">返回我的工作</a>
<a class="mui-tab-item" href="#" id="BackTolist" onclick="BackTolist()">待办</a>
</nav>
<div class="mui-content" style="margin-top: 15px;">
<div class="mui-content-padded">
<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>
</div>
<label for="TB_Doc">移交原因:</label>
<div class="mui-input-row" style="margin: 10px 5px;">
<textarea name="TB_Doc" id="TB_Doc" rows="5" placeholder="请输入移交原因.."></textarea>
</div>
</div>
</div>
</body>
</html>