parent
c2120b5637
commit
0717c53206
@ -0,0 +1,190 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>任务列表</title>
|
||||
<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="black">
|
||||
|
||||
<!--标准mui.css-->
|
||||
<link rel="stylesheet" href="./css/mui.min.css">
|
||||
<!--App自定义的css-->
|
||||
<!--<link rel="stylesheet" type="text/css" href="../css/app.css" />-->
|
||||
<style>
|
||||
.mui-control-content {
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.p_title {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.p_jiezhi {
|
||||
margin-top: 10px;
|
||||
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="mui-content">
|
||||
<div style="padding: 10px 10px;">
|
||||
<div id="segmentedControl" class="mui-segmented-control mui-segmented-control-inverted">
|
||||
<a class="mui-control-item" href="#item1" id="tab1">待填报</a>
|
||||
<a class="mui-control-item" href="#item2" id="tab2">已填报</a>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div id="item1" class="mui-control-content">
|
||||
<div class="mui-input-row mui-search">
|
||||
<input id="wSearch" type="search" class="mui-input-clear" placeholder="">
|
||||
</div>
|
||||
<ul class="mui-table-view mui-table-view-striped mui-table-view-condensed" id="liNotView">
|
||||
</ul>
|
||||
<script id="liNotTemplate" type="text/x-jsrender">
|
||||
{{for data}}
|
||||
<li class="mui-table-view-cell" id="{{:job_id}}" onclick="report({{:job_id}},{{:jiezhi}},{{:status_code}},'{{:target_id}}');">
|
||||
<div class="mui-table">
|
||||
<div class="mui-table-cell mui-col-xs-9">
|
||||
<p class="p_title">{{:job_name}}</p>
|
||||
<p class="p_jiezhi">截止日期:{{:deadline_time}}</p>
|
||||
</div>
|
||||
<div class="mui-table-cell mui-col-xs-3 mui-text-right">
|
||||
<span class="mui-h5">{{:create_time}}</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{/for}}
|
||||
</script>
|
||||
</div>
|
||||
<div id="item2" class="mui-control-content">
|
||||
<div class="mui-input-row mui-search">
|
||||
<input id="ySearch" type="search" class="mui-input-clear" placeholder="">
|
||||
</div>
|
||||
<ul class="mui-table-view mui-table-view-striped mui-table-view-condensed" id="liYesView">
|
||||
</ul>
|
||||
<script id="liYesTemplate" type="text/x-jsrender">
|
||||
{{for data}}
|
||||
<li class="mui-table-view-cell" id="{{:job_id}}" onclick="report({{:job_id}},{{:jiezhi}},{{:status_code}},'{{:target_id}}');">
|
||||
<div class="mui-table">
|
||||
<div class="mui-table-cell mui-col-xs-9">
|
||||
<p class="p_title">{{:job_name}}</p>
|
||||
<p class="p_jiezhi">截止日期:{{:deadline_time}}
|
||||
{{if jiezhi}}
|
||||
<span style="float: right;margin-right: -86px;background:#FFE7E7;border-radius: 15px;padding:1px 10px;font-size:12px;color:#FA7474">已截止</span>
|
||||
{{/if}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="mui-table-cell mui-col-xs-3 mui-text-right">
|
||||
<span class="mui-h5">{{:create_time}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{/for}}
|
||||
</script>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="./js/mui.min.js"></script>
|
||||
<script src="./js/jquery.min.js"></script>
|
||||
<script src="./js/jsrender.min.js"></script>
|
||||
<script>
|
||||
|
||||
$(function () {
|
||||
|
||||
var tabFlag = window.localStorage.getItem('tabFlag');
|
||||
|
||||
if (tabFlag == 1) {
|
||||
$("#tab1").addClass("mui-active");
|
||||
$("#item1").addClass("mui-active");
|
||||
$("#tab2").removeClass("mui-active");
|
||||
$("#item2").removeClass("mui-active");
|
||||
loadWList("");
|
||||
} else {
|
||||
$("#tab2").addClass("mui-active");
|
||||
$("#item2").addClass("mui-active");
|
||||
$("#tab1").removeClass("mui-active");
|
||||
$("#item1").removeClass("mui-active");
|
||||
loadYList("");
|
||||
}
|
||||
|
||||
function loadWList(keyword) {
|
||||
$.ajax({
|
||||
url: "/QingLong/collect/viewJobListPerson?page=1&limit=100&keyword=" + keyword + "&is_finish=0",
|
||||
async: false,
|
||||
type: 'GET',
|
||||
success: function (res) {
|
||||
var template = $.templates('#liNotTemplate');
|
||||
var htmlOutput = template.render(res);
|
||||
$('#liNotView').html(htmlOutput);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function loadYList(keyword) {
|
||||
$.ajax({
|
||||
url: "/QingLong/collect/viewJobListPerson?page=1&limit=100&keyword=" + keyword + "&is_finish=1",
|
||||
async: false,
|
||||
type: 'GET',
|
||||
success: function (res) {
|
||||
var template = $.templates('#liYesTemplate');
|
||||
var htmlOutput = template.render(res);
|
||||
$('#liYesView').html(htmlOutput);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("#wSearch").keypress(function (event) {
|
||||
if (event.which == 13) {
|
||||
loadWList($("#wSearch").val());
|
||||
}
|
||||
});
|
||||
|
||||
$("#ySearch").keypress(function (event) {
|
||||
if (event.which == 13) {
|
||||
loadYList($("#ySearch").val());
|
||||
}
|
||||
});
|
||||
|
||||
mui(".mui-icon-clear")[0].addEventListener('tap', function () {
|
||||
loadWList("");
|
||||
});
|
||||
|
||||
mui(".mui-icon-clear")[1].addEventListener('tap', function () {
|
||||
loadYList("");
|
||||
});
|
||||
|
||||
mui(".mui-control-item")[0].addEventListener('tap', function () {
|
||||
window.localStorage.setItem('tabFlag', 1);
|
||||
loadWList("");
|
||||
});
|
||||
|
||||
mui(".mui-control-item")[1].addEventListener('tap', function () {
|
||||
window.localStorage.setItem('tabFlag', 2);
|
||||
loadYList("");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function report(job_id, jiezhi, status_code, target_id) {
|
||||
if (jiezhi) {
|
||||
window.location.href = "/QingLong/view/tb/form/view_mobile.html?job_id=" + job_id + "&status_code=" + status_code + "&target_id=" + target_id;
|
||||
} else {
|
||||
window.location.href = "/QingLong/view/tb/form/report_p_mobile.html?job_id=" + job_id + "&status_code=" + status_code + "&target_id=" + target_id;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in new issue