Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

64 linhas
2.2 KiB

  1. /**
  2. * Created by luocj on 2016/12/15.
  3. */
  4. // document.write("<script language='javascript' src='./date/DatePicker/WdatePicker.js'></script>");
  5. // document.write("<link rel='stylesheet' href='../js/date/DatePicker/skin/WdatePicker.css'/>")
  6. var main_tr = $('.main_tr').prop('outerHTML');
  7. var up_tr = $('.up_tr').prop('outerHTML');
  8. var date_type = 1;
  9. var start_date = getDateTime(0);
  10. var end_date = getDateTime(0);
  11. var province = '';
  12. var city = '';
  13. var hotel_name = '';
  14. var supplier_id = '';
  15. var sale_org_id = '';
  16. var provinceHTML = $('#province').html();
  17. var cityHTML = $('#city').html();
  18. var supp_op = $('.supp').prop('outerHTML');
  19. var sale_op = $('.sale').prop('outerHTML');
  20. //导出函数
  21. function excel() {
  22. $('#excel').on('click', function () {
  23. date_type = $('#date_type').val();
  24. start_date = $('#start_date').val();
  25. end_date = $('#end_date').val();
  26. province = $('#province').val() == 0 ? '' : $('#province').val();
  27. city = $('#city').val() == 0 ? '' : $('#city').val();
  28. hotel_name = $('#hotel_name').val();
  29. supplier_id = $('#supplier_id').val();
  30. sale_org_id = $('#sale_org_id').val();
  31. window.location.href = "/zz-jd/st-ht/HTcontrol.php?type=finance_ApiStatisticalReport&op=excel&date_type=" + date_type + "&start_date=" + start_date + "&end_date=" + end_date + "&province=" + province + "&city=" + city + "&hotel_name=" + hotel_name + "&supplier_id=" + supplier_id + "&org_sale_id=" + sale_org_id;
  32. })
  33. }
  34. function today() {
  35. var date_s = getDateTime(0);
  36. setDate(date_s, date_s);
  37. }
  38. function yesterday() {
  39. var date_s = getDateTime(10);
  40. setDate(date_s, date_s);
  41. }
  42. function thisWeek() {
  43. var Nowdate = new Date();
  44. var WeekFirstDay = new Date(Nowdate - (Nowdate.getDay() - 1) * 86400000);
  45. var WeekLastDay = new Date((WeekFirstDay / 1000 + 6 * 86400) * 1000);
  46. var date_s = getDateTime(0, WeekFirstDay);
  47. var date_e = getDateTime(0, WeekLastDay);
  48. setDate(date_s, date_e);
  49. }
  50. function thisMonth() {
  51. var date_s = getDateTime(14);
  52. var date_e = getDateTime(15);
  53. setDate(date_s, date_e);
  54. }
  55. function setDate(date_s, date_e) {
  56. $("#report-start_date").val(date_s);
  57. $("#report-end_date").val(date_e);
  58. }