entity_AttendanceDetailFileImport.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. function checkData( file_id ) {
  2. if( file_id == null || file_id == undefined || file_id == "" ){
  3. alert("请输入file_id");
  4. return false;
  5. }
  6. var query_url = '../jaxrs/fileimport/check/' + file_id;
  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 importData( file_id ) {
  23. if( file_id == null || file_id == undefined || file_id == "" ){
  24. alert("请输入file_id");
  25. return false;
  26. }
  27. var query_url = '../jaxrs/fileimport/import/' + file_id;
  28. $.ajax({
  29. type : 'get',
  30. dataType : 'json',
  31. contentType : 'application/json; charset=utf-8',
  32. url : query_url,
  33. xhrFields : {
  34. 'withCredentials' : true
  35. },
  36. crossDomain : true
  37. }).done(function(json) {
  38. $('#result').html( JSON.stringify( json, null, 4) );
  39. }).fail(function(json) {
  40. failure(json);
  41. });
  42. }
  43. function testImport( ) {
  44. var query_url = '../jaxrs/fileimport/import/test';
  45. $.ajax({
  46. type : 'get',
  47. dataType : 'json',
  48. contentType : 'application/json; charset=utf-8',
  49. url : query_url,
  50. xhrFields : {
  51. 'withCredentials' : true
  52. },
  53. crossDomain : true
  54. }).done(function(json) {
  55. $('#result').html( JSON.stringify( json, null, 4) );
  56. }).fail(function(json) {
  57. failure(json);
  58. });
  59. }