From f33e27eb62ef266c85e90e305404f50864d02852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=B9=8F?= Date: Thu, 15 Aug 2024 12:02:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BE=9C=E6=B5=B7=E6=95=B0=E6=8D=AE=E5=9C=A8?= =?UTF-8?q?=E6=90=BA=E7=A8=8B=E9=82=A3=E9=87=8C=E8=AE=BE=E7=BD=AE=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trainsystem/controllers/addorders.php | 1 + .../trainsystem/controllers/api.php | 24 +++++++++++++++---- .../trainsystem/views/export_lanhai.php | 13 +++++----- 3 files changed, 27 insertions(+), 11 deletions(-) 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) {?> - - + $value) {?> + " title="Popover title" data-container="body" data-toggle="popover" data-placement="top" data-content="顶部的 Popover 中的一些内容"> + + - - + +
时间信息变化值团名外联
日期类型金额订单号外联团号乘客
总额: