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.
258 lines
9.4 KiB
Plaintext
258 lines
9.4 KiB
Plaintext
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
|
<title>关键字查询</title>
|
|
<!--<link href="./css/themes/default/jquery.mobile-1.4.5.min.css" rel="stylesheet" type="text/css" />
|
|
<link href="./css/themes/classic/theme-classic.css" rel="stylesheet" type="text/css" />-->
|
|
<link href="./css/Main.css" rel="stylesheet" type="text/css" />
|
|
<link href="js/mui/css/mui.min.css" rel="stylesheet" type="text/css" />
|
|
<link href="js/mui/css/mui.indexedlist.css" rel="stylesheet" type="text/css" />
|
|
<script src="./js/mui/js/mui.min.js" type="text/javascript"></script>
|
|
<script src="./js/jquery.js" type="text/javascript"></script>
|
|
<!--<script src="./js/jquery.mobile-1.4.5.min.js" type="text/javascript"></script>-->
|
|
<script src="./Scripts/config.js" type="text/javascript"></script>
|
|
<script src="Scripts/bootstrap/js/jquery.cokie.min.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">
|
|
|
|
$(function () {
|
|
var key = GetQueryString("Key");
|
|
if (key == null || key == "" || key == "null" || key == undefined)
|
|
key = "";
|
|
|
|
document.getElementById("TB_KWds").value = key;
|
|
|
|
|
|
Btn_Click();
|
|
|
|
document.getElementById("TB_KWds").addEventListener("keypress",function(event) {
|
|
if(event.keyCode == "13") {
|
|
document.activeElement.blur();//收起虚拟键盘
|
|
Btn_Click();//TODO 完成搜索事件
|
|
event.preventDefault(); // 阻止默认事件---阻止页面刷新
|
|
}
|
|
});
|
|
});
|
|
|
|
function Btn_Click() {
|
|
var TB_KWds = document.getElementById("TB_KWds");
|
|
if (TB_KWds.value == "") {
|
|
return;
|
|
}
|
|
|
|
var key = TB_KWds.value;
|
|
|
|
var frmData = $("#cc").serialize();
|
|
|
|
var handler = new HttpHandler("BP.WF.HttpHandler.CCMobile");
|
|
handler.AddFormData();
|
|
var data = handler.DoMethodReturnString("SearchKey_Query");
|
|
|
|
if (data.indexOf('err@') == 0) {
|
|
mui.alert(data);
|
|
return;
|
|
}
|
|
|
|
//转化成json.
|
|
data = JSON.parse(data);
|
|
|
|
var user = new WebUser();
|
|
// var wf_GenerWorkFlow = data["WF_GenerWorkFlow"];
|
|
var wf_GenerWorkFlow = data;
|
|
|
|
if (data.length == 0) {
|
|
mui.toast('没有数据', { duration: 'long', type: 'div' })
|
|
//$("ul").html("无数据");
|
|
return;
|
|
}
|
|
|
|
var currUserNo = $.cookie('No');
|
|
// var currUserNo = $.cookie("CCS","FK_Dept");
|
|
//alert(currUserNo);
|
|
|
|
var tableHtml = "";
|
|
|
|
for (var i = 0; i < wf_GenerWorkFlow.length; i++) {
|
|
|
|
var en = wf_GenerWorkFlow[i];
|
|
|
|
var fk_flow = en.FK_Flow,
|
|
fk_node = en.FK_Node,
|
|
workid = en.WorkID,
|
|
fid = en.FID,
|
|
isRead = en.IsRead,
|
|
paras = en.AtPara;
|
|
|
|
if (paras == null || paras == "") {
|
|
paras = "";
|
|
}
|
|
else {
|
|
if (paras.indexOf("IsCC=1") > -1) {
|
|
paras = "IsCC=1";
|
|
} else {
|
|
paras = "";
|
|
}
|
|
}
|
|
|
|
var icon = "";
|
|
if (en.WFState == 3)
|
|
icon = "./Img/WFState/Complete.png"; //已经完成.
|
|
else if (en.WFState == 2)
|
|
icon = "./Img/WFState/Runing.png"; //运行中.
|
|
else if (en.WFState == 5)
|
|
icon = "./Img/WFState/ReturnSta.png"; //退回.
|
|
else
|
|
icon = "./Img/WFState/AskFor.png"; //其他.
|
|
|
|
var href = "";
|
|
if (en.TodoEmps.indexOf(user.No + ',') >= 0 || en.TodoEmps.indexOf(user.Name + ';') > 0) {
|
|
href = "MyFlow.htm?FK_Flow=" + fk_flow + "&From=SearchKey&FK_Node=" + fk_node + "&WorkID=" + workid + "&FID=" + fid + "&IsRead=" + isRead + "&Paras=" + paras + "&T=" + Math.random();
|
|
icon = "./Img/WFState/Todo.png"; //运行中.
|
|
}
|
|
else {
|
|
href = "MyView.htm?FK_Node=" + fk_node + "&FK_Flow=" + fk_flow + "&WorkID=" + workid + "&From=SearchKey&t=" + Math.random() + "&Key=" + key;
|
|
}
|
|
|
|
// icon += "?Ms=" + Math.random();
|
|
|
|
var todoEmpsName = en.TodoEmps.substr(en.TodoEmps.indexOf(',') + 1);
|
|
|
|
var _Html = "";
|
|
_Html += "<li data-icon='false' >";
|
|
_Html += " <a class='mui-table-view-cell mui-indexed-list-item mui-checkbox mui-left' href='" + href + "' target='_self' >";
|
|
_Html += "<table style='width:100%;border-width:0px;padding:0px; margin:0px;'>";
|
|
_Html += "<tr>";
|
|
_Html += "<td style='width:10%;padding:0px; margin:0px;'><img src='" + icon + "' style='float:left;width:30px;height:30px;' /></td>";
|
|
_Html += "<td style='width:90%;padding:0px; margin:0px;'>";
|
|
_Html += " <h5 style='color:#096BC1;'>" + en.Title + "</h5>";
|
|
_Html += "<p>";
|
|
_Html += "当前:" + en.NodeName + "<font color=green> " + todoEmpsName + "</font>";
|
|
_Html += " 日期:" + en.RDT.substring(5);
|
|
_Html += "</p>";
|
|
|
|
_Html += "</td>";
|
|
_Html += "</tr>";
|
|
_Html += "</table>";
|
|
_Html += "</a>";
|
|
_Html += "</li>";
|
|
|
|
tableHtml += _Html;
|
|
}
|
|
|
|
$('#LV_Search').children().remove();
|
|
|
|
//展显
|
|
$(tableHtml).appendTo('#LV_Search');
|
|
//刷新
|
|
// $("#LV_Search").trigger("create");
|
|
// $("#LV_Search").listview('refresh');
|
|
|
|
//$("LV_Todolist").append(tableHtml);
|
|
}
|
|
|
|
|
|
/* 打开表单. */
|
|
function OpenFrm(workid, nodeID, flowNo) {
|
|
|
|
//执行催办.
|
|
var handler = new HttpHandler("BP.WF.HttpHandler.CCMobile");
|
|
handler.AddPara("FK_Node", nodeID);
|
|
handler.AddPara("FK_Flow", flowNo);
|
|
handler.AddPara("WorkID", WorkID);
|
|
var data = handler.DoMethodReturnString("KeySearch_OpenFrm");
|
|
if (data.indexOf('err@') == 0) {
|
|
alert(data);
|
|
return;
|
|
}
|
|
|
|
if (data.indexOf('url@') == 0) {
|
|
data = data.replace('url@', '.');
|
|
data = data.replace('../CCForm/Frm.htm', '../MyView.htm');
|
|
window.open(data);
|
|
return;
|
|
}
|
|
alert(data);
|
|
}
|
|
|
|
function Back() {
|
|
var url = 'Search.htm?s=' + Math.random();
|
|
SetHref(url);
|
|
}
|
|
|
|
function BackToSearch() {
|
|
var url = 'Search.htm?s=' + Math.random();
|
|
SetHref(url);
|
|
}
|
|
|
|
</script>
|
|
<style>
|
|
html,
|
|
body {
|
|
height: 100%;
|
|
overflow: hidden;
|
|
}
|
|
.mui-bar {
|
|
-webkit-box-shadow: none;
|
|
box-shadow: none;
|
|
}
|
|
#done.mui-disabled{
|
|
color: gray;
|
|
}
|
|
.mui-bar-tab .mui-tab-item {
|
|
color:#000;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<form id="cc">
|
|
<header class="mui-bar mui-bar-nav">
|
|
<a class="mui-icon mui-icon-left-nav mui-pull-left" href="Search.htm"></a>
|
|
<h1 class="mui-title">关键字查询</h1>
|
|
</header>
|
|
|
|
<div class="mui-content">
|
|
<div id='list' class="mui-indexed-list mui-scroll-wrapper">
|
|
<div class="mui-indexed-list-search mui-input-row mui-search">
|
|
<input type="search" name="TB_KWds" id="TB_KWds" class="mui-input-clear mui-indexed-list-search-input" placeholder="请输入关键字">
|
|
</div>
|
|
<div class="mui-indexed-list-alert"></div>
|
|
<div class="mui-indexed-list-inner mui-scroll">
|
|
<div class="mui-indexed-list-empty-alert">没有数据</div>
|
|
<ul id="LV_Search" class="mui-table-view" style="padding-left:8px">
|
|
</ul>
|
|
</div>
|
|
|
|
</div>
|
|
<nav class="mui-bar mui-bar-tab">
|
|
<a class="mui-tab-item mui-active" href="#" onclick="javascript:Btn_Click()">
|
|
<!--<span class="mui-icon mui-icon-search"></span>-->
|
|
<span class="mui-tab-label">查询</span>
|
|
</a>
|
|
<a class="mui-tab-item" href="#" onclick="javascript:BackToSearch()">
|
|
<!--<span class="mui-icon mui-icon-undo"></span>-->
|
|
<span class="mui-tab-label">返回</span>
|
|
</a>
|
|
</nav>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<script src="js/mui/js/mui.min.js"></script>
|
|
<script src="js/mui/js/mui.indexedlist.js"></script>
|
|
<script type="text/javascript" charset="utf-8">
|
|
mui.init();
|
|
mui.ready(function () {
|
|
var header = document.querySelector('header.mui-bar');
|
|
var list = document.getElementById('list');
|
|
list.style.height = (document.body.offsetHeight - header.offsetHeight) + 'px';
|
|
window.indexedList = new mui.IndexedList(list);
|
|
});
|
|
mui('.mui-scroll-wrapper').scroll();
|
|
</script>
|
|
</body>
|
|
</html>
|