Commit a4d2db41 by 朱继来

temp

parent 1d16214e
......@@ -260,12 +260,18 @@ function isChangeInvoice($order_sn)
}
}
// 自营线下订单
function getOrderExtend($order_id)
// 订单扩展表
function getOrderExtend($order_id, $field="*", $where=array())
{
$extend = DB::connection('order')->table('lie_order_extend')->where(['order_id' => $order_id, 'order_type' => 3])->select('temp_id')->first();
$map['order_id'] = $order_id;
return $extend ? true : false;
if (!empty($where)) {
$map = array_merge($map, $where);
}
$extend = DB::connection('order')->table('lie_order_extend')->where($map)->select($field)->first();
return $extend;
}
Class OrderController extends Controller
......
......@@ -1265,8 +1265,8 @@
$('.checkOrder').click(function(){
var is_newClient = $('input[name=is_newClient]:checked').val();
var client_source = $('input[name=client_source]:checked').val();
var order_status = $('input[name=order_status]:checked').val();
var pay_type = $('input[name=order_pay_type]:checked').val(); // 订单付款类型
var order_status = $('input[name=order_status]:checked').val() ? $('input[name=order_status]:checked').val() : 2;
var pay_type = $('input[name=order_pay_type]:checked').val() ? $('input[name=order_pay_type]:checked').val() : 1; // 订单付款类型
var reason = $('input[name=reason]:checked').val();
var payTime = $('.payTime').val();
var payTimeOther = $('.payTimeOther').val();
......
......@@ -43,6 +43,7 @@
@endif
<!-- 审核 -->
@if ($order_info['order_goods_type'] == 1)
<p>审核</p>
<table class="table table-bordered table-hover check-table">
<tr>
......@@ -82,6 +83,8 @@
</table>
<hr/>
@endif
<!-- 调价 -->
<p>调价</p>
<table class="table table-bordered table-hover order-change-table">
......
......@@ -410,7 +410,7 @@
<th>供应商</th>
<?php
if ($action_name == 'changeOrder' && count($order_items_info) > 1 && $order_info['status'] == 1) {
if ($action_name == 'changeOrder' && count($order_items_info) > 1 && in_array($order_info['status'], [1, 2])) {
echo '<th>操作</th>';
}
?>
......@@ -443,7 +443,7 @@
<td>{{$v['delivery_time']}}</td>
<td>{{$v['supplier_name']}}</td>
@if ($action_name == 'changeOrder' && count($order_items_info) > 1 && $order_info['status'] == 1)
@if ($action_name == 'changeOrder' && count($order_items_info) > 1 && in_array($order_info['status'], [1, 2]))
<td><a class="btn btn-danger deletegoods" href="javascript:;" data-id="{{$v['rec_id']}}">删除</a></td>
@endif
</tr>
......@@ -606,20 +606,20 @@
@elseif (isset($_REQUEST['tags']) && $_REQUEST['tags'] == 'self' && $action_name != 'changeOrder')
<p style="padding-left: 5px;">操作</p>
<div class="tabs-box">
@if (in_array($order_info['status'], [1, 2, 3, 4]) && in_array('self_order_cancel', $userPerms))
<a class="btn btn-danger self_cancel" href="javascript:;" data-id="{{$order_info['order_id']}}">取消订单</a>
@endif
<!-- 判断状态和权限 $extend-自营线下订单 -->
@if ($order_info['status'] == 1 && in_array('add_offline_audit', $userPerms) && $extend)
<a class="btn btn-success self-check" data-id="{{$order_info['order_id']}}">内部订单审核</a>
<!-- <a class="btn btn-success self-check" data-id="{{$order_info['order_id']}}">内部订单审核</a> -->
@endif
<!-- 订单审单 -->
@if (in_array($order_info['status'], [1, 2]) && in_array('self_check_order', $userPerms) && !$extend)
@if (in_array($order_info['status'], [1, 2]) && in_array('self_check_order', $userPerms))
<a class="btn btn-info" href="/change/{{$order_info['order_id']}}?tags=self">人工审单</a>
@endif
@if (in_array($order_info['status'], [1, 2, 3, 4]) && !$extend && in_array('self_order_cancel', $userPerms))
<a class="btn btn-danger self_cancel" href="javascript:;" data-id="{{$order_info['order_id']}}">取消订单</a>
@endif
@if ($order_info['status'] == 2 && in_array('self_check_pay', $userPerms))
<a href="/self_check_pay/{{$order_info['order_id']}}?tags=self" class="btn btn-success">对账</a>
@endif
......
......@@ -340,9 +340,13 @@
<td class="table-list-content">
<p class="show-title" title="{{App\Http\Controllers\getCompanyName($v['user_id'])}}">{{App\Http\Controllers\getCompanyName($v['user_id'])}}</p>
</td>
<td class="table-list-title">Adtag或其它</td>
<td class="table-list-content" colspan="3">
<p class="show-title" title="<?php echo App\Http\Controllers\handleOrderSource($v['order_source']); ?>"><?php echo App\Http\Controllers\handleOrderSource($v['order_source']); ?></p>
<td class="table-list-title">是否新订单</td>
<td class="table-list-content">
<?php
$is_new_order = App\Http\Controllers\getOrderExtend($v['order_id'], 'is_new');
echo $is_new_order->is_new ? '是' : '否';
?>
</td>
</tr>
@if ($v['order_pay_type'] == 2)
......@@ -433,6 +437,12 @@
<td class="table-list-title">发货状态</td>
<td class="table-list-content">{{$shippingStatus}}</td>
</tr>
<tr>
<td class="table-list-title">Adtag或其它</td>
<td class="table-list-content" colspan="3">
<p class="show-title" title="<?php echo App\Http\Controllers\handleOrderSource($v['order_source']); ?>"><?php echo App\Http\Controllers\handleOrderSource($v['order_source']); ?></p>
</td>
</tr>
</table>
</td>
</tr>
......
......@@ -276,8 +276,7 @@
<div class="btn-group btn-group-xs">
<a class="btn btn-primary" href="/details/{{$v['order_id']}}?tags=self" target="_blank">详情</a>
<?php $extend = App\Http\Controllers\getOrderExtend($v['order_id']); ?>
@if (in_array('self_check_order', $userPerms) && in_array($v['status'], [1, 2]) && !$extend)
@if (in_array('self_check_order', $userPerms) && in_array($v['status'], [1, 2]))
<a class="btn btn-success" href="/change/{{$v['order_id']}}?tags=self" target="_blank">人工审单</a>
@endif
......
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