增加网前订单查询功能

hotfix/远程访问多媒体中心
LiaoYijun 7 years ago
parent 0eccc1b125
commit 9f8fe5e69b

@ -0,0 +1,22 @@
<?php
class Order extends CI_Controller {
public function __construct() {
parent::__construct();
$this->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);
}
}

@ -0,0 +1,27 @@
<?php
class Order_model extends CI_Model {
public function __construct() {
$this->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;
}
}

@ -0,0 +1,71 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
</head>
<div class="container">
<div class="row">
<div class="col-md-19 col-sm-19 col-xs-24">
<form method="post" action="search">
<div class="form-group">
<label for="orderId">订单号</label>
<input type="text" class="form-control" id="orderId" name="orderId" value="<?php echo $order_id; ?>">
</div>
<button type="submit" class="btn btn-default">查询</button>
</form>
<br>
<div class="panel panel-success">
<div class="panel-heading">网前</div>
<div class="panel-body">
<table class="table">
<caption>已经入库成功</caption>
<thead>
<tr> <th>COLI_Name</th> <th>COLI_OrderDetailText</th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo $online['COLI_Name']; ?></td>
<td><?php echo $online['COLI_OrderDetailText']; ?></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading">HT</div>
<div class="panel-body">
<table class="table">
<caption>可以在HT查询</caption>
<thead>
<tr> <th>COLI_Name</th> <th>COLI_OrderDetailText</th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo $ht['COLI_Name']; ?></td>
<td><?php echo $ht['COLI_OrderDetailText']; ?></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-19 col-sm-19 col-xs-24">
</div>
</div>
</div>
</html>

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
</head>
<div class="container">
<div class="row">
<div class="col-md-19 col-sm-19 col-xs-24">
<form method="post" action="order/search">
<div class="form-group">
<label for="orderId">订单号</label>
<input type="text" class="form-control" id="orderId" name="orderId" placeholder="123456789">
</div>
<button type="submit" class="btn btn-default">查询</button>
</form>
</div>
</div>
</div>
<div class="row">
<div class="col-md-19 col-sm-19 col-xs-24">
</div>
</div>
</div>
</html>
Loading…
Cancel
Save