Commit 4837e834 by 朱继来

添加团购筛选

parent 88686e25
......@@ -428,6 +428,8 @@ Class OrderController extends Controller
$map['is_new'] = $request->input('is_new', '');
$map['is_new_order'] = $request->input('is_new_order', '');
$map['business_type'] = $request->input('business_type', '');
$map['order_type_extend'] = $request->input('order_type_extend', '');
$map['status_extend'] = $request->input('status_extend', '');
$perm = new PermController;
......
......@@ -174,6 +174,18 @@ class OrderModel extends Model
}
})
->where(function ($query) use ($map) {
// 订单类型
if (isset($map['order_type_extend'])) {
$query->where('o.order_type_extend', '=', $map['order_type_extend']);
}
});
->where(function ($query) use ($map) {
// 团购状态
if (isset($map['status_extend'])) {
$query->where('o.status_extend', '=', $map['status_extend']);
}
});
->where(function ($query) use ($map) {
// 竞调数据
if (isset($map['is_fake'])) {
$query->where('o.is_type', '=', $map['is_fake']);
......
......@@ -95,7 +95,9 @@
is_new = $('#is_new').val() ? $('#is_new').val() : '';
order_payment_mode = $('#order_payment_mode').val() ? $('#order_payment_mode').val() : '',
is_new_order = $('#is_new_order').val() ? $('#is_new_order').val() : '';
business_type = $('#business_type').val() ? $('#business_type').val() : '';
business_type = $('#business_type').val() ? $('#business_type').val() : '',
order_type_extend = $('#order_type_extend').val() ? $('#order_type_extend').val() : '',
status_extend = $('#status_extend').val() ? $('#status_extend').val() : '';
if (url == '/export') {
if (type == 1) { // 联营
......@@ -112,12 +114,12 @@
}
} else { // 自营
if (test_order.length) {
if (!order_contain && !order_sn && !erp_sn && !goods_name && !time_start && !time_end && !order_pay_type && !order_payment_mode && !order_status && !sale_type && !order_invoice_status && !order_source_pf && !order_source_adtag && !order_source_ptag && !is_new && !business_type && !test_order.is(':checked')) {
if (!order_contain && !order_sn && !erp_sn && !goods_name && !time_start && !time_end && !order_pay_type && !order_payment_mode && !order_status && !sale_type && !order_invoice_status && !order_source_pf && !order_source_adtag && !order_source_ptag && !is_new && !business_type && !order_type_extend && !status_extend && !test_order.is(':checked')) {
layer.msg('请选择筛选条件,再导出!');
return false;
}
} else {
if (!order_contain && !order_sn && !erp_sn && !goods_name && !time_start && !time_end && !order_pay_type && !order_payment_mode && !order_status && !sale_type && !order_invoice_status && !order_source_pf && !order_source_adtag && !order_source_ptag && !is_new && !business_type) {
if (!order_contain && !order_sn && !erp_sn && !goods_name && !time_start && !time_end && !order_pay_type && !order_payment_mode && !order_status && !sale_type && !order_invoice_status && !order_source_pf && !order_source_adtag && !order_source_ptag && !is_new && !business_type && !order_type_extend && !status_extend) {
layer.msg('请选择筛选条件,再导出!');
return false;
}
......@@ -221,6 +223,14 @@
listUrl += '&business_type=' + business_type;
}
if (order_type_extend) {
listUrl += '&order_type_extend=' + order_type_extend;
}
if (status_extend) {
listUrl += '&status_extend=' + status_extend;
}
if (test_order.is(':checked')) {
listUrl += '&test_order=' + 1;
}
......
......@@ -30,8 +30,12 @@
?>
<tr>
@if ($order_info['order_type_extend'])
<th>订单类型</th>
@endif
@if ($order_info['order_goods_type'] == 2)
<th>订单类型</th>
<th>销售类型</th>
@endif
@if ($order_temp_info['business_type'])
......@@ -51,6 +55,16 @@
</tr>
<tr>
@if ($order_info['order_type_extend'])
<td>
<?php
switch ($order_info['order_type_extend']) {
case 1: echo '团购订单'; break;
}
?>
</td>
@endif
@if ($order_info['order_goods_type'] == 2)
<td>{{ $order_info['sale_type'] == 1 ? '现卖' : '预售' }}</td>
@endif
......@@ -660,8 +674,12 @@
@if ($order_price_info['new_client_price'] != 0)
<tr>
<td>新客价优惠:</td>
<td>{{$currency}}<span id="order-total" class="amount">{{$order_price_info['new_client_price']}}</span></td>
@if ($order_info['is_tuangou'])
<td>团购优惠:</td>
@else
<td>新客价优惠:</td>
@endif
<td><span id="order-total" class="amount">{{$order_price_info['new_client_price']}}</span></td>
</tr>
@endif
......
......@@ -214,6 +214,29 @@
</dd>
</dl>
<dl>
<dt>订单类型:</dt>
<dd>
<select id="order_type_extend" name="order_type_extend" class="form-control order_type_extend selectpicker" title="全部">
<option value="">全部</option>
<option value="0">普通订单</option>
<option value="1">团购订单</option>
</select>
</dd>
</dl>
<dl>
<dt>团购状态:</dt>
<dd>
<select id="status_extend" name="status_extend" class="form-control status_extend selectpicker" title="全部">
<option value="">全部</option>
<option value="-16">团购失败</option>
<option value="10">团购中</option>
<option value="16">团购完成</option>
</select>
</dd>
</dl>
@if (in_array('self_check_test_order', $userPerms))
<dl>
<dt></dt>
......@@ -291,17 +314,25 @@
</td>
<td class="show-list">
<?php
switch ($v['status']) {
case -2: echo '<span class="list-text-no-check"><b>审核未通过</b></span>';break;
case -1: echo '<span class="list-text-cancel"><b>已取消</b></span>';break;
case 1: echo '<span class="list-text-checking"><b>待审核</b></span>';break;
case 2: echo '<span class="list-text-pay"><b>待付款</b></span>';break;
case 3: echo '<span class="list-text-last-pay"><b>待付尾款</b></span>';break;
case 4: echo '<span class="list-text-send"><b>待发货</b></span>';break;
case 7: echo '<span class="list-text-send"><b>部分发货</b></span>';break;
case 8: echo '<span class="list-text-confirm"><b>待收货</b></span>';break;
case 10: echo '<span class="list-text-success"><b>交易成功</b></span>';break;
}
if ($v['order_type_extend'] == 1 && $v['status'] <= 4) { // 团购订单状态
switch ($v['status_extend']) {
case -16: echo '<span class="list-text-cancel"><b>团购失败</b></span>';break;
case 10: echo '<span class="list-text-send"><b>团购中</b></span>';break;
case 16: echo '<span class="list-text-success"><b>团购成功</b></span>';break;
}
} else {
switch ($v['status']) {
case -2: echo '<span class="list-text-no-check"><b>审核未通过</b></span>';break;
case -1: echo '<span class="list-text-cancel"><b>已取消</b></span>';break;
case 1: echo '<span class="list-text-checking"><b>待审核</b></span>';break;
case 2: echo '<span class="list-text-pay"><b>待付款</b></span>';break;
case 3: echo '<span class="list-text-last-pay"><b>待付尾款</b></span>';break;
case 4: echo '<span class="list-text-send"><b>待发货</b></span>';break;
case 7: echo '<span class="list-text-send"><b>部分发货</b></span>';break;
case 8: echo '<span class="list-text-confirm"><b>待收货</b></span>';break;
case 10: echo '<span class="list-text-success"><b>交易成功</b></span>';break;
}
}
?>
</td>
<td class="show-list"> {{ Config('params.order_pay_type')[$v['order_pay_type']] }} </td>
......
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