|
- /**
- * Created by luocj on 2016/12/15.
- */
- // document.write("<script language='javascript' src='./date/DatePicker/WdatePicker.js'></script>");
- // document.write("<link rel='stylesheet' href='../js/date/DatePicker/skin/WdatePicker.css'/>")
- var main_tr = $('.main_tr').prop('outerHTML');
- var up_tr = $('.up_tr').prop('outerHTML');
- var date_type = 1;
- var start_date = getDateTime(0);
- var end_date = getDateTime(0);
- var province = '';
- var city = '';
- var hotel_name = '';
- var supplier_id = '';
- var sale_org_id = '';
- var provinceHTML = $('#province').html();
- var cityHTML = $('#city').html();
- var supp_op = $('.supp').prop('outerHTML');
- var sale_op = $('.sale').prop('outerHTML');
-
- //导出函数
- function excel() {
- $('#excel').on('click', function () {
- date_type = $('#date_type').val();
- start_date = $('#start_date').val();
- end_date = $('#end_date').val();
- province = $('#province').val() == 0 ? '' : $('#province').val();
- city = $('#city').val() == 0 ? '' : $('#city').val();
- hotel_name = $('#hotel_name').val();
- supplier_id = $('#supplier_id').val();
- sale_org_id = $('#sale_org_id').val();
- 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;
- })
- }
-
- function today() {
- var date_s = getDateTime(0);
- setDate(date_s, date_s);
- }
-
- function yesterday() {
- var date_s = getDateTime(10);
- setDate(date_s, date_s);
- }
-
- function thisWeek() {
- var Nowdate = new Date();
- var WeekFirstDay = new Date(Nowdate - (Nowdate.getDay() - 1) * 86400000);
- var WeekLastDay = new Date((WeekFirstDay / 1000 + 6 * 86400) * 1000);
- var date_s = getDateTime(0, WeekFirstDay);
- var date_e = getDateTime(0, WeekLastDay);
- setDate(date_s, date_e);
- }
-
- function thisMonth() {
- var date_s = getDateTime(14);
- var date_e = getDateTime(15);
- setDate(date_s, date_e);
- }
-
- function setDate(date_s, date_e) {
- $("#report-start_date").val(date_s);
- $("#report-end_date").val(date_e);
- }
|