Commit 59a36238 by 朱继来

Merge branch 'zjl_fake_data_20180319' into 'master'

调整发票状态

See merge request !21
parents 2787eb3a 691d2d5a
...@@ -120,6 +120,21 @@ function getShipping($order_id) ...@@ -120,6 +120,21 @@ function getShipping($order_id)
return false; return false;
} }
function getInvoiceStatus($order_id)
{
$invoice = DB::connection('order')
->table('lie_order_invoice')
->where(['order_id' => $order_id])
->select('invoice_status')
->first();
if (!empty($invoice)) {
return $invoice->invoice_status;
}
return false;
}
function getCompanyName($user_id) function getCompanyName($user_id)
{ {
$company = DB::connection('order') $company = DB::connection('order')
......
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
} }
if(time_end){ if(time_end){
time_end = Date.parse(time_end) / 1000; time_end = Date.parse(time_end) / 1000 + (24*60*60-1);
} }
if (test_order.is(':checked')) { if (test_order.is(':checked')) {
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,7 @@
} }
if(time_end){ if(time_end){
time_end = Date.parse(time_end) / 1000; time_end = Date.parse(time_end) / 1000 + (24*60*60-1);
listUrl += '&time_end='+time_end; listUrl += '&time_end='+time_end;
} }
......
...@@ -214,14 +214,14 @@ ...@@ -214,14 +214,14 @@
<?php <?php
if ($v['order_pay_time'] != 0) { if ($v['order_pay_time'] != 0) {
if ($username != 'vpadmin@ichunt.com') { if ($username != 'vpadmin@ichunt.com') {
echo date('Y-m-d H:i:s', $v['order_pay_time']); echo date('Y-m-d', $v['order_pay_time']);
} else { } else {
echo date('Y-m-d', $v['order_pay_time']); echo date('Y-m-d', $v['order_pay_time']);
} }
} else { } else {
if ($v['advance_pay_time'] != 0) { if ($v['advance_pay_time'] != 0) {
if ($username != 'vpadmin@ichunt.com') { if ($username != 'vpadmin@ichunt.com') {
echo date('Y-m-d H:i:s', $v['advance_pay_time']); echo date('Y-m-d', $v['advance_pay_time']);
} else { } else {
echo date('Y-m-d', $v['advance_pay_time']); echo date('Y-m-d', $v['advance_pay_time']);
} }
...@@ -242,12 +242,18 @@ ...@@ -242,12 +242,18 @@
<td class="table-list-title">发票状态</td> <td class="table-list-title">发票状态</td>
<td class="table-list-content"> <td class="table-list-content">
<?php <?php
switch ($v['invoice_status']) { $invoice_status = App\Http\Controllers\getInvoiceStatus($v['order_id']);
if ($invoice_status) {
switch ($invoice_status) {
case -1: echo "待确认";break; case -1: echo "待确认";break;
case 1: echo "已开票";break; case 1: echo "已开票";break;
case 2: echo "已发货";break; case 2: echo "已发货";break;
case 3: echo "已签收";break; case 3: echo "已签收";break;
} }
} else {
echo '';
}
?> ?>
</td> </td>
</tr> </tr>
......
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
自提 自提
@endif @endif
</td> </td>
<td class="show-list">{{date('Y-m-d H:i:s', $v['create_time'])}}</td> <td class="show-list">{{date('Y-m-d', $v['create_time'])}}</td>
<td> <td>
<div class="btn-group btn-group-xs"> <div class="btn-group btn-group-xs">
<a class="btn btn-primary" href="{{URL('details', ['order_id'=>$v['order_id']])}}">详情</a> <a class="btn btn-primary" href="{{URL('details', ['order_id'=>$v['order_id']])}}">详情</a>
...@@ -280,14 +280,14 @@ ...@@ -280,14 +280,14 @@
<?php <?php
if ($v['order_pay_time'] != 0) { if ($v['order_pay_time'] != 0) {
if ($username != 'vpadmin@ichunt.com') { if ($username != 'vpadmin@ichunt.com') {
echo date('Y-m-d H:i:s', $v['order_pay_time']); echo date('Y-m-d', $v['order_pay_time']);
} else { } else {
echo date('Y-m-d', $v['order_pay_time']); echo date('Y-m-d', $v['order_pay_time']);
} }
} else { } else {
if ($v['advance_pay_time'] != 0) { if ($v['advance_pay_time'] != 0) {
if ($username != 'vpadmin@ichunt.com') { if ($username != 'vpadmin@ichunt.com') {
echo date('Y-m-d H:i:s', $v['advance_pay_time']); echo date('Y-m-d', $v['advance_pay_time']);
} else { } else {
echo date('Y-m-d', $v['advance_pay_time']); echo date('Y-m-d', $v['advance_pay_time']);
} }
...@@ -300,12 +300,18 @@ ...@@ -300,12 +300,18 @@
<td class="table-list-title">发票状态</td> <td class="table-list-title">发票状态</td>
<td class="table-list-content"> <td class="table-list-content">
<?php <?php
switch ($v['invoice_status']) { $invoice_status = App\Http\Controllers\getInvoiceStatus($v['order_id']);
if ($invoice_status) {
switch ($invoice_status) {
case -1: echo "待确认";break; case -1: echo "待确认";break;
case 1: echo "已开票";break; case 1: echo "已开票";break;
case 2: echo "已发货";break; case 2: echo "已发货";break;
case 3: echo "已签收";break; case 3: echo "已签收";break;
} }
} else {
echo '';
}
?> ?>
</td> </td>
</tr> </tr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment