|
|
@@ -3,7 +3,7 @@ function queryUncheckedTask(){
|
|
|
var data = {
|
|
|
"start_time": $("#start_time").val(),
|
|
|
"end_time": $("#end_time").val(),
|
|
|
- "dept": $("#dept").val(),
|
|
|
+ "checked_dept": $("#fsList").val(),
|
|
|
"check_status":2
|
|
|
}
|
|
|
var cols = [
|
|
|
@@ -12,9 +12,9 @@ function queryUncheckedTask(){
|
|
|
{width: 80, text: '考核人员', type: 'string', flex: true, colClass: '',field: 'checked_person_name'},
|
|
|
{width: 160, text: '考核部门', type: 'string', flex: true, sort: 'down',field: 'checked_dept_name'},
|
|
|
{width: 80, text: '稽查人员', type: 'string', flex: true, colClass: '',field: 'checkman_name'},
|
|
|
- {width: 160, text: '稽查时间段', type: 'string', flex: true, sort: 'down',field: 'start_time'},
|
|
|
- {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
|
|
|
- {width: 160, text: '操作', type: 'string', flex: true, field: 'id',
|
|
|
+ {width: 160, text: '稽查时间段', type: 'string', flex: true, sort: 'down',field: 'check_period'},
|
|
|
+ // {width: 100, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
|
|
|
+ {width: 100, text: '操作', type: 'string', flex: true, field: 'id',
|
|
|
oper:[
|
|
|
{func:'showCheck',text:'稽查',icon_class:'icon-eye-open'}
|
|
|
]
|
|
|
@@ -40,7 +40,7 @@ function queryUnexaminedTask(){
|
|
|
var data = {
|
|
|
"start_time": $("#start_time").val(),
|
|
|
"end_time": $("#end_time").val(),
|
|
|
- "dept": $("#dept").val(),
|
|
|
+ "checked_dept": $("#fsList").val(),
|
|
|
"check_status":21
|
|
|
}
|
|
|
var cols = [
|
|
|
@@ -49,9 +49,9 @@ function queryUnexaminedTask(){
|
|
|
{width: 80, text: '考核人员', type: 'string', flex: true, colClass: '',field: 'checked_person_name'},
|
|
|
{width: 160, text: '考核部门', type: 'string', flex: true, sort: 'down',field: 'checked_dept_name'},
|
|
|
{width: 80, text: '稽查人员', type: 'string', flex: true, colClass: '',field: 'checkman_name'},
|
|
|
- {width: 160, text: '稽查时间段', type: 'string', flex: true, sort: 'down',field: 'start_time'},
|
|
|
- {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
|
|
|
- {width: 160, text: '操作', type: 'string', flex: true, field: 'id',
|
|
|
+ {width: 160, text: '稽查时间段', type: 'string', flex: true, sort: 'down',field: 'check_period'},
|
|
|
+ // {width: 120, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
|
|
|
+ {width: 100, text: '操作', type: 'string', flex: true, field: 'id',
|
|
|
oper:[
|
|
|
{func:'showApplyDetail',text:'处理',icon_class:'icon-hand-up'}
|
|
|
]
|
|
|
@@ -118,20 +118,20 @@ function queryUndispatchedTask(){
|
|
|
var data = {
|
|
|
"start_time": $("#start_time").val(),
|
|
|
"end_time": $("#end_time").val(),
|
|
|
- "dept": $("#dept").val(),
|
|
|
+ "checked_dept": $("#fsList").val(),
|
|
|
"check_status":4
|
|
|
}
|
|
|
var cols = [
|
|
|
- {width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center',field: 'num'},
|
|
|
+ {width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center',field: 'num'},
|
|
|
{width: 160, text: '任务名称', type: 'string', flex: true, sort: 'down',field: 'name'},
|
|
|
{width: 80, text: '考核人员', type: 'string', flex: true, colClass: '',field: 'checked_person_name'},
|
|
|
{width: 160, text: '考核部门', type: 'string', flex: true, sort: 'down',field: 'checked_dept_name'},
|
|
|
{width: 80, text: '稽查人员', type: 'string', flex: true, colClass: '',field: 'checkman_name'},
|
|
|
- {width: 160, text: '稽查时间段', type: 'string', flex: true, sort: 'down',field: 'start_time'},
|
|
|
- {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
|
|
|
+ {width: 160, text: '稽查时间段', type: 'string', flex: true, sort: 'down',field: 'check_period'},
|
|
|
+ // {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
|
|
|
{width: 160, text: '操作', type: 'string', flex: true, field: 'id',
|
|
|
oper:[
|
|
|
- {func:'showTaskDetail',text:'任务详情',icon_class:'icon-tasks'},
|
|
|
+ {func:'showTaskDetail',text:'详情',icon_class:'icon-tasks'},
|
|
|
{func:'dispatchTaskById',text:'下发',icon_class:'icon-signin'}
|
|
|
]
|
|
|
}
|
|
|
@@ -152,54 +152,70 @@ function showTaskDetail(id){
|
|
|
}
|
|
|
|
|
|
function dispatchTaskPatch(){
|
|
|
- var param = {
|
|
|
- "start_time": $("#start_time").val(),
|
|
|
- "end_time": $("#end_time").val(),
|
|
|
- "dept": $("#dept").val(),
|
|
|
- "check_status":4
|
|
|
- }
|
|
|
+ layer.confirm('确定下发全部任务?', {
|
|
|
+ btn: ['确定','取消'] //按钮
|
|
|
+ }, function(){
|
|
|
+ var param = {
|
|
|
+ "start_time": $("#start_time").val(),
|
|
|
+ "end_time": $("#end_time").val(),
|
|
|
+ "checked_dept": $("#dept").val(),
|
|
|
+ "check_status":4
|
|
|
+ }
|
|
|
|
|
|
- no_return_common_service('/task/dispatch', param, function(data){
|
|
|
- queryUndispatchedTask();
|
|
|
- layer.msg(data, {
|
|
|
- time: 2000//20s后自动关闭
|
|
|
+ no_return_common_service('/task/dispatch', param, function(data){
|
|
|
+ queryUndispatchedTask();
|
|
|
+ layer.msg(data, {
|
|
|
+ time: 2000//20s后自动关闭
|
|
|
+ });
|
|
|
});
|
|
|
+ }, function(index){
|
|
|
+ layer.close(index);
|
|
|
});
|
|
|
+
|
|
|
}
|
|
|
|
|
|
function dispatchTaskById(id){
|
|
|
- var param = {
|
|
|
- "id": id,
|
|
|
- "check_status":5
|
|
|
- }
|
|
|
-
|
|
|
- no_return_common_service('/task/dispatchById', param, function(data){
|
|
|
- queryUndispatchedTask();
|
|
|
- layer.msg(data, {
|
|
|
- time: 2000//20s后自动关闭
|
|
|
+ layer.confirm('确定下发任务?', {
|
|
|
+ btn: ['确定','取消'] //按钮
|
|
|
+ }, function(){
|
|
|
+ var param = {
|
|
|
+ "id": id,
|
|
|
+ "check_status":5
|
|
|
+ }
|
|
|
+ no_return_common_service('/task/dispatchById', param, function(data){
|
|
|
+ queryUndispatchedTask();
|
|
|
+ layer.msg(data, {
|
|
|
+ time: 2000//20s后自动关闭
|
|
|
+ });
|
|
|
});
|
|
|
+ }, function(index){
|
|
|
+ layer.close(index);
|
|
|
});
|
|
|
+
|
|
|
}
|
|
|
|
|
|
function queryDispatchedTask(){
|
|
|
var data = {
|
|
|
"start_time": $("#start_time").val(),
|
|
|
"end_time": $("#end_time").val(),
|
|
|
- "dept": $("#dept").val(),
|
|
|
+ "checked_dept": $("#fsList").val(),
|
|
|
"check_status":5
|
|
|
}
|
|
|
+ var hide = false;
|
|
|
+ if(hasRole(ROLE_STATION_ADMIN) || hasRole(ROLE_STATION)) {
|
|
|
+ hide = true;
|
|
|
+ }
|
|
|
var cols = [
|
|
|
{width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center',field: 'num'},
|
|
|
{width: 160, text: '任务名称', type: 'string', flex: true, sort: 'down',field: 'name'},
|
|
|
{width: 80, text: '考核人员', type: 'string', flex: true, colClass: '',field: 'checked_person_name'},
|
|
|
{width: 160, text: '考核部门', type: 'string', flex: true, sort: 'down',field: 'checked_dept_name'},
|
|
|
- {width: 80, text: '稽查人员', type: 'string', flex: true, colClass: '',field: 'checkman_name'},
|
|
|
- {width: 100, text: '开始时间', type: 'string', flex: true, sort: 'down',field: 'start_time'},
|
|
|
- {width: 100, text: '结束时间', type: 'string', flex: true, sort: 'down',field: 'end_time'},
|
|
|
- {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
|
|
|
+ {width: 80, text: '稽查人员', type: 'string', flex: true,hide:hide, colClass: '',field: 'checkman_name'},
|
|
|
+ {width: 160, text: '稽查时间段', type: 'string', flex: true, sort: 'down',field: 'check_period'},
|
|
|
+ // {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
|
|
|
{width: 160, text: '操作', type: 'string', flex: true, field: 'id',
|
|
|
oper:[
|
|
|
- {func:'showTaskDetail1',text:'任务详情',icon_class:'icon-tasks'}
|
|
|
+ {func:'showTaskDetail1',text:'详情',icon_class:'icon-tasks'}
|
|
|
]
|
|
|
}
|
|
|
];
|
|
|
@@ -217,4 +233,86 @@ function showTaskDetail1(id){
|
|
|
var rowData=getItemByIdFromArr(id,$('#dispatched_datatable').mytable('getTableData'));
|
|
|
$.checkTask = rowData;
|
|
|
changePage("/view/mytask/taskDetail.html");
|
|
|
+}
|
|
|
+
|
|
|
+function queryConfirmedTask(){
|
|
|
+ var data = {
|
|
|
+ "start_time": $("#start_time").val(),
|
|
|
+ "end_time": $("#end_time").val(),
|
|
|
+ "checked_dept": $("#fsList").val(),
|
|
|
+ "check_status":6
|
|
|
+ }
|
|
|
+ var hide = false;
|
|
|
+ if(hasRole(ROLE_STATION_ADMIN) || hasRole(ROLE_STATION)) {
|
|
|
+ hide = true;
|
|
|
+ }
|
|
|
+ var cols = [
|
|
|
+ {width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center',field: 'num'},
|
|
|
+ {width: 160, text: '任务名称', type: 'string', flex: true, sort: 'down',field: 'name'},
|
|
|
+ {width: 80, text: '考核人员', type: 'string', flex: true, colClass: '',field: 'checked_person_name'},
|
|
|
+ {width: 160, text: '考核部门', type: 'string', flex: true, sort: 'down',field: 'checked_dept_name'},
|
|
|
+ {width: 80, text: '稽查人员', type: 'string', flex: true,hide:hide, colClass: '',field: 'checkman_name'},
|
|
|
+ {width: 160, text: '稽查时间段', type: 'string', flex: true, sort: 'down',field: 'check_period'},
|
|
|
+ // {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
|
|
|
+ {width: 160, text: '操作', type: 'string', flex: true, field: 'id',
|
|
|
+ oper:[
|
|
|
+ {func:'showTaskDetail4Confirmed',text:'详情',icon_class:'icon-tasks'}
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ];
|
|
|
+
|
|
|
+ // var pager = {
|
|
|
+ // page_size:10
|
|
|
+ // }
|
|
|
+ $('#confirmed_datatable').mytable({'cols':cols,
|
|
|
+ 'url':"/task/getTaskList/",
|
|
|
+ 'param':data}
|
|
|
+ );
|
|
|
+}
|
|
|
+
|
|
|
+function showTaskDetail4Confirmed(id){
|
|
|
+ var rowData=getItemByIdFromArr(id,$('#confirmed_datatable').mytable('getTableData'));
|
|
|
+ $.checkTask = rowData;
|
|
|
+ changePage("/view/mytask/taskDetail.html");
|
|
|
+}
|
|
|
+
|
|
|
+function queryUnsubmitTask(){
|
|
|
+ var data = {
|
|
|
+ "start_time": $("#start_time").val(),
|
|
|
+ "end_time": $("#end_time").val(),
|
|
|
+ "checked_dept": $("#fsList").val(),
|
|
|
+ "check_status":3
|
|
|
+ }
|
|
|
+ var hide = false;
|
|
|
+ if(hasRole(ROLE_STATION_ADMIN) || hasRole(ROLE_STATION)) {
|
|
|
+ hide = true;
|
|
|
+ }
|
|
|
+ var cols = [
|
|
|
+ {width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center',field: 'num'},
|
|
|
+ {width: 160, text: '任务名称', type: 'string', flex: true, sort: 'down',field: 'name'},
|
|
|
+ {width: 80, text: '考核人员', type: 'string', flex: true, colClass: '',field: 'checked_person_name'},
|
|
|
+ {width: 160, text: '考核部门', type: 'string', flex: true, sort: 'down',field: 'checked_dept_name'},
|
|
|
+ {width: 80, text: '稽查人员', type: 'string', flex: true,hide:hide, colClass: '',field: 'checkman_name'},
|
|
|
+ {width: 160, text: '稽查时间段', type: 'string', flex: true, sort: 'down',field: 'check_period'},
|
|
|
+ // {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
|
|
|
+ {width: 160, text: '操作', type: 'string', flex: true, field: 'id',
|
|
|
+ oper:[
|
|
|
+ {func:'showTaskDetail4Confirmed',text:'详情',icon_class:'icon-tasks'}
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ];
|
|
|
+
|
|
|
+ // var pager = {
|
|
|
+ // page_size:10
|
|
|
+ // }
|
|
|
+ $('#submit_datatable').mytable({'cols':cols,
|
|
|
+ 'url':"/task/getTaskList/",
|
|
|
+ 'param':data}
|
|
|
+ );
|
|
|
+}
|
|
|
+
|
|
|
+function showTaskDetail4Confirmed(id){
|
|
|
+ var rowData=getItemByIdFromArr(id,$('#submit_datatable').mytable('getTableData'));
|
|
|
+ $.checkTask = rowData;
|
|
|
+ changePage("/view/mytask/taskDetail.html");
|
|
|
}
|