entity_AttendanceSetting.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. function data_get_attendancesetting( id ) {
  2. var query_url = '../jaxrs/attendancesetting/' + id;
  3. //如果未输入ID,那么就查询所有的应用信息
  4. if( id == null || id == undefined || id == "" ){
  5. query_url = '../jaxrs/attendancesetting/list/all';
  6. }
  7. $.ajax({
  8. type : 'get',
  9. dataType : 'json',
  10. contentType : 'application/json; charset=utf-8',
  11. url : query_url,
  12. xhrFields : {
  13. 'withCredentials' : true
  14. },
  15. crossDomain : true
  16. }).done(function(json) {
  17. $('#result').html( JSON.stringify( json, null, 4) );
  18. }).fail(function(json) {
  19. failure(json);
  20. });
  21. }
  22. function data_post_attendancesetting( id ) {
  23. $.ajax({
  24. type : 'post',
  25. dataType : 'json',
  26. contentType : 'application/json; charset=utf-8',
  27. url : '../jaxrs/attendancesetting' ,
  28. xhrFields : {
  29. 'withCredentials' : true
  30. },
  31. data : JSON.stringify($.parseJSON($('#content').val())),
  32. crossDomain : true
  33. }).done(function(json) {
  34. $('#result').html(JSON.stringify(json.data, null, 4));
  35. });
  36. }
  37. function data_delete_attendancesetting( id ) {
  38. if( id == null || id == undefined || id == "" ){
  39. alert("请输入ID");
  40. return false;
  41. }
  42. $.ajax({
  43. type : 'delete',
  44. dataType : 'json',
  45. contentType : 'application/json; charset=utf-8',
  46. url : '../jaxrs/attendancesetting/' + id ,
  47. xhrFields : {
  48. 'withCredentials' : true
  49. },
  50. crossDomain : true
  51. }).done(function(json) {
  52. $('#result').html(JSON.stringify(json.data, null, 4));
  53. });
  54. }