// var page_size=10;
function queryCheckedAppealTask() {
    var t = getTimeByMonth(GV("#start_time"));
    var data = {
        "start_time": getMomentTimeFormat(t.starttime),
        "end_time": getMomentTimeFormat(t.endtime),
        "checked_dept": $("#fsList").val(),
        // "status_search_type":1,
        "check_status_arr": [14, 15, 16],
        "appeal_result": $("#appealResultSelect").val()
    }
    var hide = false;

    if (hasRole(ROLE_QZD_ADMIN) || hasRole(ROLE_QZD) || hasRole(ROLE_JICHA) || roleContains('QZD')) {
        hide = true;
    }
    var cols = [
        { width: 30, text: '序号', type: 'number', flex: true, colClass: 'text-center', field: 'num' },
        { width: 100, text: '任务名称', type: 'string', flex: true, sort: 'down', field: 'name' },
        { width: 80, text: '申诉部门', type: 'string', flex: true, sort: 'down', field: 'checked_dept_name' },
        { width: 80, text: '稽查人员', type: 'string', flex: true, hide: hide, field: 'checkman_name' },
        { width: 80, text: '复核人员', type: 'string', flex: true, hide: hide, field: 'recheckman_name' },
        { width: 120, text: '稽查时间段', type: 'string', flex: true, sort: 'down', field: 'check_period' },
        { width: 80, text: '申诉结果', type: 'string', flex: true, field: 'appeal_result_name' },
        // {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
        {
            width: 120,
            text: '操作',
            type: 'string',
            flex: true,
            field: 'id',
            oper: [
                { func: 'showTaskDetail', text: '详情', icon_class: 'icon-tasks' }
            ]
        }
    ];

    // var pager = {
    //     page_size:10
    // }
    checkedAppealTableObj = $('#checked_datatable').mytable({
        'cols': cols,
        'url': "/f/checkAppeal/getTaskList/",
        'param': data,
        'pager': {
            'p_cur': cur_page
        }
    });
    //保存本次查询参数
    $.zui.store.set('store_param_' + current_url, data);
}

function showTaskDetail(id) {
    var rowData = getItemByIdFromArr(id, $('#checked_datatable').mytable('getTableData'));
    $.checkTask = rowData;
    post_common_service("/f/checkAppeal/getByTaskId", { "task_id": rowData.id }, function(data) {
        $.checkTask = rowData;
        $.checkTask.appeal = data;
        changePage("/qzd/view/task/taskDetail.html", checkedAppealTableObj);
    });
    // changePage("/view/mytask/taskDetail.html",checkedAppealTableObj);
}