Commit 7a6e8024 by 朱继来

添加主管审核筛选

parent bf4dfb3a
...@@ -441,6 +441,7 @@ Class OrderController extends Controller ...@@ -441,6 +441,7 @@ Class OrderController extends Controller
$map['business_type'] = $request->input('business_type', ''); $map['business_type'] = $request->input('business_type', '');
$map['order_type_extend'] = $request->input('order_type_extend', ''); $map['order_type_extend'] = $request->input('order_type_extend', '');
$map['status_extend'] = $request->input('status_extend', ''); $map['status_extend'] = $request->input('status_extend', '');
$map['is_manager_audit'] = $request->input('is_manager_audit', '');
$perm = new PermController; $perm = new PermController;
...@@ -653,7 +654,6 @@ Class OrderController extends Controller ...@@ -653,7 +654,6 @@ Class OrderController extends Controller
return ['err_code'=>1, 'err_msg'=>'推入到导出系统失败']; return ['err_code'=>1, 'err_msg'=>'推入到导出系统失败'];
// $orderModel = new OrderModel(); // $orderModel = new OrderModel();
// return $orderModel->orderExport($info['map']); // return $orderModel->orderExport($info['map']);
} }
......
...@@ -179,13 +179,19 @@ class OrderModel extends Model ...@@ -179,13 +179,19 @@ class OrderModel extends Model
$query->where('o.order_type_extend', '=', $map['order_type_extend']); $query->where('o.order_type_extend', '=', $map['order_type_extend']);
} }
}) })
->where(function ($query) use ($map) { ->where(function ($query) use ($map) {
// 团购状态 // 团购状态
if (isset($map['status_extend'])) { if (isset($map['status_extend'])) {
$query->where('o.status_extend', '=', $map['status_extend']); $query->where('o.status_extend', '=', $map['status_extend']);
} }
}) })
->where(function ($query) use ($map) { ->where(function ($query) use ($map) {
// 主管审核
if (!empty($map['is_manager_audit'])) {
$query->whereIn('oe.is_manager_audit', explode(',', $map['is_manager_audit']));
}
})
->where(function ($query) use ($map) {
// 竞调数据 // 竞调数据
if (isset($map['is_fake'])) { if (isset($map['is_fake'])) {
$query->where('o.is_type', '=', $map['is_fake']); $query->where('o.is_type', '=', $map['is_fake']);
......
...@@ -95,17 +95,18 @@ ...@@ -95,17 +95,18 @@
is_new_order = $('#is_new_order').val() ? $('#is_new_order').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() : '', order_type_extend = $('#order_type_extend').val() ? $('#order_type_extend').val() : '',
status_extend = $('#status_extend').val() ? $('#status_extend').val() : ''; status_extend = $('#status_extend').val() ? $('#status_extend').val() : '',
is_manager_audit = $('#is_manager_audit').val() ? $('#is_manager_audit').val() : '';
if (url == '/export') { if (url == '/export') {
if (type == 1) { // 联营 if (type == 1) { // 联营
if (test_order.length) { if (test_order.length) {
if (!order_contain && !order_sn && !erp_sn && !goods_name && !time_start && !time_end && !order_pay_type && !order_status && !shipping_name && !order_send && !order_source_pf && !order_source_adtag && !order_source_ptag && !erp_order_id && !is_new && !is_new_order && !order_payment_mode && !test_order.is(':checked')) { if (!order_contain && !order_sn && !erp_sn && !goods_name && !time_start && !time_end && !order_pay_type && !order_status && !shipping_name && !order_send && !order_source_pf && !order_source_adtag && !order_source_ptag && !erp_order_id && !is_new && !is_new_order && !order_payment_mode && !test_order.is(':checked') && !is_manager_audit) {
layer.msg('请选择筛选条件,再导出!'); layer.msg('请选择筛选条件,再导出!');
return false; return false;
} }
} else { } else {
if (!order_contain && !order_sn && !erp_sn && !goods_name && !time_start && !time_end && !order_pay_type && !order_status && !shipping_name && !order_send && !order_source_pf && !order_source_adtag && !order_source_ptag && !erp_order_id && !is_new && !is_new_order && !order_payment_mode) { if (!order_contain && !order_sn && !erp_sn && !goods_name && !time_start && !time_end && !order_pay_type && !order_status && !shipping_name && !order_send && !order_source_pf && !order_source_adtag && !order_source_ptag && !erp_order_id && !is_new && !is_new_order && !order_payment_mode && !is_manager_audit) {
layer.msg('请选择筛选条件,再导出!'); layer.msg('请选择筛选条件,再导出!');
return false; return false;
} }
...@@ -229,6 +230,10 @@ ...@@ -229,6 +230,10 @@
listUrl += '&status_extend=' + status_extend; listUrl += '&status_extend=' + status_extend;
} }
if (is_manager_audit) {
listUrl += '&is_manager_audit=' + is_manager_audit;
}
if (test_order.is(':checked')) { if (test_order.is(':checked')) {
listUrl += '&test_order=' + 1; listUrl += '&test_order=' + 1;
} }
...@@ -257,7 +262,7 @@ ...@@ -257,7 +262,7 @@
// 联营导出订单 // 联营导出订单
$('.exportExcel').click(function() { $('.exportExcel').click(function() {
var listUrl = orderListCommon('/export', 1); var listUrl = orderListCommon('/export', 1);
console.log(listUrl)
$.get(listUrl, function(resp) { $.get(listUrl, function(resp) {
if (resp.err_code != 0) { if (resp.err_code != 0) {
layer.msg(resp.err_msg); layer.msg(resp.err_msg);
......
...@@ -218,6 +218,17 @@ ...@@ -218,6 +218,17 @@
</select> </select>
</dd> </dd>
</dl> </dl>
<dl>
<dt>主管审核:</dt>
<dd>
<select id="is_manager_audit" name="is_manager_audit" class="form-control is_manager_audit selectpicker" title="全部" multiple>
<option value="1">未申请</option>
<option value="2">待审核</option>
<option value="3">审核通过</option>
</select>
</dd>
</dl>
@if (in_array('check_test_order', $userPerms)) @if (in_array('check_test_order', $userPerms))
<dl> <dl>
...@@ -462,6 +473,7 @@ ...@@ -462,6 +473,7 @@
var is_new = "{{$condition['is_new']}}"; var is_new = "{{$condition['is_new']}}";
var erp_order_id = "{{$condition['erp_order_id']}}"; var erp_order_id = "{{$condition['erp_order_id']}}";
var is_new_order = "{{$condition['is_new_order']}}"; var is_new_order = "{{$condition['is_new_order']}}";
var is_manager_audit = "{{$condition['is_manager_audit']}}";
var manager = "{{$role}}"; var manager = "{{$role}}";
var cc_sales = eval('{!! isset($cc_sales) ? json_encode($cc_sales) : '' !!}'); // 抄送人集合 var cc_sales = eval('{!! isset($cc_sales) ? json_encode($cc_sales) : '' !!}'); // 抄送人集合
...@@ -469,7 +481,7 @@ ...@@ -469,7 +481,7 @@
$('input[name=test_order]').attr('checked', true); $('input[name=test_order]').attr('checked', true);
} }
$(".order_status, .order_payment_mode, .order_source_pf").selectpicker({ $(".order_status, .order_payment_mode, .order_source_pf, .is_manager_audit").selectpicker({
actionsBox:true, //在下拉选项添加选中所有和取消选中的按钮 actionsBox:true, //在下拉选项添加选中所有和取消选中的按钮
countSelectedText:"已选中{0}项", countSelectedText:"已选中{0}项",
selectedTextFormat:"count > 5", selectedTextFormat:"count > 5",
...@@ -487,6 +499,7 @@ ...@@ -487,6 +499,7 @@
$('.is_new').selectpicker('val', is_new.split(',')).trigger("change"); $('.is_new').selectpicker('val', is_new.split(',')).trigger("change");
$('#erp_order_id').selectpicker('val', erp_order_id); $('#erp_order_id').selectpicker('val', erp_order_id);
$('#is_new_order').selectpicker('val', is_new_order); $('#is_new_order').selectpicker('val', is_new_order);
$('.is_manager_audit').selectpicker('val', is_manager_audit.split(',')).trigger("change");
$.lie.order.index(); $.lie.order.index();
$.lie.track.orderTrack(); $.lie.track.orderTrack();
......
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