130 lines
4.7 KiB
HTML
130 lines
4.7 KiB
HTML
|
<html login="false" auth="false">
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<title>任务列表</title>
|
||
|
<style>
|
||
|
a {float:right;}
|
||
|
|
||
|
</style>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div widget="toolbar" style="padding:4px;border:0;">
|
||
|
|
||
|
<input id="task_id" widget="hidden" />
|
||
|
<input name="taskname" widget="edit" url="" textfield="text" style="width: 300px;" label="任务名称">
|
||
|
<input name="begindate" widget=datechooser allowinput="f" style="margin-left: -10px;" label="创建开始日期">
|
||
|
<input name="enddate" widget=datechooser allowinput="f" style="margin-left: -70px;" label="至">
|
||
|
<input name="status" widget=combox allowinput="f" style="margin-left: -60px;width: 200px;" showNullItem="true"
|
||
|
data="[{id:'1',text:'未开始'},{id:'2',text:'进行中'},{id:'3',text:'已完成'}]" label="状态">
|
||
|
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>
|
||
|
<a widget="button" iconCls="icon-edit" onclick="createTask()">创建任务</a>
|
||
|
<a widget="button" iconCls="icon-delete" onclick="deleteTask()">删除</a>
|
||
|
<a widget="button" iconCls="icon-enabled" onclick="checkall()">全选</a>
|
||
|
<a widget="button" iconCls="icon-enabled" onclick="manual()">手动回收</a>
|
||
|
<a widget="button" iconCls="icon-enabled" onclick="TaskRecycle()">回收近三个月缴费任务</a>
|
||
|
</div>
|
||
|
|
||
|
<div widget="autosize">
|
||
|
<div widget="datagrid" name="grid" style="width: 100%; height: 100%;" url="rushtasklist/post/taskList" multiSelect="true" onrowdblclick="taskInfo()">
|
||
|
<div type = "checkcolumn" header ="选择"></div>
|
||
|
<div type="indexcolumn" width="20" header="序号"></div>
|
||
|
<div field="taskid" visible="false" ></div>
|
||
|
<div field="task_name" width="60" header="任务名称"></div>
|
||
|
<div field="curstate" width="30" header="状态"></div>
|
||
|
<div field="task_user" width="60" header="指派给"></div>
|
||
|
<div field="fact_assign_num" width="60" header="分配条数"></div>
|
||
|
<div field="task_ratio" width="50" header="完成比例" renderer="percentRenderer" multiplyHundred="true"></div>
|
||
|
<div field="create_date" width="45" align="center" header="创建日期"></div>
|
||
|
<div field="expect" width="30" header="预计结束日期"></div>
|
||
|
<div field="finish_date" width="45" header="完成日期"></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</body>
|
||
|
<script type="text/javascript">
|
||
|
var grid = aos.get('grid');
|
||
|
var taskUser = "";
|
||
|
grid.load();
|
||
|
function search(){
|
||
|
var params={taskname:aos.get('taskname').value,begindate:aos.get('begindate').getValue(),enddate:aos.get('enddate').getValue(),status:aos.get('status').getValue()};
|
||
|
grid.load(params);
|
||
|
}
|
||
|
function createTask(){
|
||
|
var param = {};
|
||
|
param['flag']=1;
|
||
|
aos.showWindow('canvas/rush/taskadd', param, '700px', '600px', '任务明细', function(rtnValue){
|
||
|
aos.get('taskname').setValue(rtnValue.task_name);
|
||
|
search();
|
||
|
});
|
||
|
}
|
||
|
function taskInfo(){
|
||
|
var row=grid.getSelected();
|
||
|
var data={};
|
||
|
data['taskid']=row.taskid;
|
||
|
aos.post({
|
||
|
url:"rushtasklist/post/queryTaskInfo",
|
||
|
data:data,
|
||
|
success:function(rtnData){
|
||
|
var param = {};
|
||
|
param['task_id']=rtnData.id;
|
||
|
param['detail_id']=rtnData.detail_id;
|
||
|
param['task_name']=rtnData.task_name;
|
||
|
param['task_remark']=rtnData.task_remark;
|
||
|
param['start_date']=rtnData.expect_begin_date;
|
||
|
param['end_date']=rtnData.expect_end_date;
|
||
|
aos.showWindow('canvas/rush/taskadd', param, '700px', '600px', '任务明细', function(rtnValue){
|
||
|
aos.get('taskname').setValue(rtnValue.task_name);
|
||
|
search();
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
}
|
||
|
function TaskRecycle(){
|
||
|
var data={};
|
||
|
aos.post({
|
||
|
url:"rushtasklist/post/TaskRecycle",
|
||
|
data:data,
|
||
|
success:function(rtnData){
|
||
|
aos.alert('回收近三个月缴费任务成功!');
|
||
|
}
|
||
|
|
||
|
});
|
||
|
|
||
|
}
|
||
|
function deleteTask(){
|
||
|
var rows = grid.getSelecteds();
|
||
|
var data={};
|
||
|
var taskid ="";
|
||
|
if(rows.length>0){
|
||
|
for(var i=0;i<rows.length;i++){
|
||
|
var obj = rows[i].taskid;
|
||
|
taskid = taskid + obj+",";
|
||
|
}
|
||
|
}
|
||
|
taskid = taskid.substring(0,taskid.lastIndexOf(","));
|
||
|
data['taskid']= taskid;
|
||
|
aos.confirm('确认删除吗?',null,function(action){
|
||
|
if(action == 'cancel')
|
||
|
return;
|
||
|
aos.post({
|
||
|
url:"rushtasklist/post/deleteTaskById",
|
||
|
data:data,
|
||
|
success:function(rtnData){
|
||
|
aos.alert('删除成功!');
|
||
|
}
|
||
|
|
||
|
});
|
||
|
grid.removeRows(rows, true);
|
||
|
});
|
||
|
}
|
||
|
function checkall(){
|
||
|
grid.selectAll();
|
||
|
}
|
||
|
function manual(){
|
||
|
aos.showWindow('canvas/rush/recovery', null, '1200px', '600px', '回收任务中心数据', function(){
|
||
|
|
||
|
});
|
||
|
}
|
||
|
</script>
|
||
|
</html>
|