checked.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // var page_size=10;
  2. function queryCheckedTask() {
  3. var t = getTimeByMonth(GV("#start_time"));
  4. var data = {
  5. "start_time": getMomentTimeFormat(t.starttime),
  6. "end_time": getMomentTimeFormat(t.endtime),
  7. "checked_dept": $("#fsList").val(),
  8. "hasScore": $("#hasScoreList").val(),
  9. "check_status_arr": [4, 5, 6]
  10. };
  11. var hide = false;
  12. if (hasRole(ROLE_FWQ_ADMIN) || hasRole(ROLE_FWQ) || hasRole(ROLE_JICHA) || roleContains('FWQ')) {
  13. hide = true;
  14. }
  15. var cols = [
  16. { width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center', field: 'num' },
  17. { width: 160, text: '任务名称', type: 'string', flex: true, sort: 'down', field: 'name' },
  18. { width: 160, text: '考核部门', type: 'string', flex: true, sort: 'down', field: 'checked_dept_name' },
  19. { width: 80, text: '稽查人员', type: 'string', flex: true, hide: hide, field: 'checkman_name' },
  20. { width: 160, text: '稽查时间段', type: 'string', flex: true, sort: 'down', field: 'check_period' },
  21. // {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
  22. {
  23. width: 160,
  24. text: '操作',
  25. type: 'string',
  26. flex: true,
  27. field: 'id',
  28. oper: [
  29. { func: 'showTaskDetail', text: '详情', icon_class: 'icon-tasks' }
  30. ]
  31. }
  32. ];
  33. // var pager = {
  34. // page_size:10
  35. // }
  36. checkedTaskTableObj = $('#checked_datatable').mytable({
  37. 'cols': cols,
  38. 'url': "/f/task/getall/",
  39. 'param': data,
  40. 'pager': {
  41. 'page_size': 10,
  42. 'p_cur': cur_page
  43. }
  44. });
  45. //保存上次查询参数
  46. $.zui.store.set('store_param_' + current_url, data);
  47. }
  48. function showTaskDetail(id) {
  49. var rowData = getItemByIdFromArr(id, $('#checked_datatable').mytable('getTableData'));
  50. $.checkTask = rowData;
  51. changePage("/fwq/view/task/taskDetail.html", checkedTaskTableObj);
  52. }