diff --git a/application/third_party/trainsystem/controllers/addorders.php b/application/third_party/trainsystem/controllers/addorders.php index fc4b0356..817cdc3e 100644 --- a/application/third_party/trainsystem/controllers/addorders.php +++ b/application/third_party/trainsystem/controllers/addorders.php @@ -885,6 +885,7 @@ class addorders extends CI_Controller{ //出票次数 $countAuto = $this->train_system_model->get_autotimes($cold_sn); $add_data->ts_autotimes = $countAuto->countauto + 1; //出票次数+1 + $add_data->lanhaiData = ""; //途牛默认澜海数据为空 //存储到数据库 $this->train_system_model->add_orders($add_data); diff --git a/application/third_party/trainsystem/controllers/api.php b/application/third_party/trainsystem/controllers/api.php index 567d7471..2356894e 100644 --- a/application/third_party/trainsystem/controllers/api.php +++ b/application/third_party/trainsystem/controllers/api.php @@ -421,6 +421,13 @@ class api extends CI_Controller{ //参数 $from_date = $this->input->post("from_date"); $to_date = $this->input->post("to_date"); + $examine = $this->input->post("examine"); + + $reback=array();//返回的数据 + $reback["from_date"] = $from_date; + $reback["to_date"] = $to_date; + $reback["examine"] = $examine; + if(!empty($from_date) && !empty($to_date)){ //拼接发送的报文 $PostData = new stdClass(); @@ -472,12 +479,19 @@ class api extends CI_Controller{ //print_r($arr); - + if(empty($examine)){ //写入excel模板 - header("Content-type:application/vnd.ms-excel;charset=utf-8"); - header("Content-Disposition:attachment;filename=juhe_train.xls"); - $string_r= $this->load->view("lanhai_transaction_excel",array("arr"=>$arr),TRUE); - echo $string_r;die; + header("Content-type:application/vnd.ms-excel;charset=utf-8"); + header("Content-Disposition:attachment;filename=lanhai_train.xls"); + $string_r= $this->load->view("lanhai_transaction_excel",array("arr"=>$arr),TRUE); + echo $string_r;die; + }else{ + krsort($arr);//数组倒序 + $reback["data"]=$arr; + $this->load->view('header'); + $this->load->view('export_lanhai',$reback); + $this->load->view('footer'); + } } diff --git a/application/third_party/trainsystem/views/export_lanhai.php b/application/third_party/trainsystem/views/export_lanhai.php index 484880b5..3ffc50a6 100644 --- a/application/third_party/trainsystem/views/export_lanhai.php +++ b/application/third_party/trainsystem/views/export_lanhai.php @@ -31,16 +31,17 @@
时间 | 信息 | 变化值 | 团名 | 外联 | ||
---|---|---|---|---|---|---|
日期 | 类型 | 金额 | 订单号 | 外联 | 团号 | 乘客 |
+ $value) {?> + | ||||||
+ | ||||||
总额: |