From 9f8fe5e69b1871261079acff09575ecceabd896d Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Fri, 2 Aug 2019 15:04:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BD=91=E5=89=8D=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E6=9F=A5=E8=AF=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/Order.php | 22 +++++++++ application/models/Order_model.php | 27 ++++++++++++ application/views/order/detail.php | 71 ++++++++++++++++++++++++++++++ application/views/order/index.php | 33 ++++++++++++++ 4 files changed, 153 insertions(+) create mode 100644 application/controllers/Order.php create mode 100644 application/models/Order_model.php create mode 100644 application/views/order/detail.php create mode 100644 application/views/order/index.php diff --git a/application/controllers/Order.php b/application/controllers/Order.php new file mode 100644 index 00000000..e960608e --- /dev/null +++ b/application/controllers/Order.php @@ -0,0 +1,22 @@ +load->model('order_model'); + } + + public function index() { + // echo 'dsfasd'; + $this->load->view('order/index'); + } + + public function search() { + $order_id = $this->input->get_post('orderId'); + $order_array = $this->order_model->get_order_by_id($order_id); + $order_in_ht_array = $this->order_model->get_order_by_id_in_ht($order_id); + $data['online'] = $order_array; + $data['ht'] = $order_in_ht_array; + $data['order_id'] = $order_id; + $this->load->view('order/detail', $data); + } +} diff --git a/application/models/Order_model.php b/application/models/Order_model.php new file mode 100644 index 00000000..09e2ac8d --- /dev/null +++ b/application/models/Order_model.php @@ -0,0 +1,27 @@ +hunter = $this->load->database('HT', TRUE); + } + + public function get_order_by_id($order_id) { + $order_query = $this->hunter->query("select COLI_Name, COLI_OrderDetailText, COLI_OrderStartDate + from [syn123].tourmanager.dbo.ConfirmLineInfoTmp + where + COLI_ID = ?", $order_id); + $order_array = $order_query->row_array(); + return $order_array; + } + + public function get_order_by_id_in_ht($order_id) { + $order_query = $this->hunter->query("select COLI_Name, COLI_OrderDetailText, COLI_OrderStartDate from ConfirmLineInfo where COLI_AddCode IN + (select cast(coli_sn as varchar(20)) + from ConfirmLineInfoTmp + where + COLI_ID = ?)", $order_id); + $order_array = $order_query->row_array(); + return $order_array; + } +} diff --git a/application/views/order/detail.php b/application/views/order/detail.php new file mode 100644 index 00000000..d161df33 --- /dev/null +++ b/application/views/order/detail.php @@ -0,0 +1,71 @@ + + + + + + +
+
+
+
+
+ + +
+ +
+
+
+
网前
+
+ + + + + + + + + + + + +
已经入库成功
COLI_Name COLI_OrderDetailText
+
+
+ +
+
HT
+
+ + + + + + + + + + + + +
可以在HT查询
COLI_Name COLI_OrderDetailText
+
+
+ +
+ +
+ + +
+ + + +
+
+
+
+ + + diff --git a/application/views/order/index.php b/application/views/order/index.php new file mode 100644 index 00000000..dcb7857e --- /dev/null +++ b/application/views/order/index.php @@ -0,0 +1,33 @@ + + + + + + +
+
+
+
+
+ + +
+ +
+ +
+ +
+ + +
+ + + +
+
+
+
+ + +