Commit 9f86c5b8 by 朱继来

Merge branch 'zjl_order_20200923'

parents 67141360 7a43ba2d
......@@ -441,6 +441,7 @@ Class OrderController extends Controller
$map['business_type'] = $request->input('business_type', '');
$map['order_type_extend'] = $request->input('order_type_extend', '');
$map['status_extend'] = $request->input('status_extend', '');
$map['is_manager_audit'] = $request->input('is_manager_audit', '');
$perm = new PermController;
......@@ -653,7 +654,6 @@ Class OrderController extends Controller
return ['err_code'=>1, 'err_msg'=>'推入到导出系统失败'];
// $orderModel = new OrderModel();
// return $orderModel->orderExport($info['map']);
}
......
......@@ -179,13 +179,19 @@ class OrderModel extends Model
$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'])) {
$query->where('o.status_extend', '=', $map['status_extend']);
}
})
->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'])) {
$query->where('o.is_type', '=', $map['is_fake']);
......
......@@ -95,17 +95,18 @@
is_new_order = $('#is_new_order').val() ? $('#is_new_order').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() : '';
status_extend = $('#status_extend').val() ? $('#status_extend').val() : '',
is_manager_audit = $('#is_manager_audit').val() ? $('#is_manager_audit').val() : '';
if (url == '/export') {
if (type == 1) { // 联营
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('请选择筛选条件,再导出!');
return false;
}
} 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('请选择筛选条件,再导出!');
return false;
}
......@@ -229,6 +230,10 @@
listUrl += '&status_extend=' + status_extend;
}
if (is_manager_audit) {
listUrl += '&is_manager_audit=' + is_manager_audit;
}
if (test_order.is(':checked')) {
listUrl += '&test_order=' + 1;
}
......@@ -257,7 +262,7 @@
// 联营导出订单
$('.exportExcel').click(function() {
var listUrl = orderListCommon('/export', 1);
console.log(listUrl)
$.get(listUrl, function(resp) {
if (resp.err_code != 0) {
layer.msg(resp.err_msg);
......
......@@ -218,6 +218,17 @@
</select>
</dd>
</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))
<dl>
......@@ -311,7 +322,7 @@
</td>
<td class="show-list">
<?php
if ($v['status'] >= 1 && isset($order_extend->is_manager_audit)) {
if (isset($order_extend->is_manager_audit)) {
switch ($order_extend->is_manager_audit) {
case 1:
echo '<span class="list-text-checking"><b>未申请</b></span>';break;
......@@ -462,6 +473,7 @@
var is_new = "{{$condition['is_new']}}";
var erp_order_id = "{{$condition['erp_order_id']}}";
var is_new_order = "{{$condition['is_new_order']}}";
var is_manager_audit = "{{$condition['is_manager_audit']}}";
var manager = "{{$role}}";
var cc_sales = eval('{!! isset($cc_sales) ? json_encode($cc_sales) : '' !!}'); // 抄送人集合
......@@ -469,7 +481,7 @@
$('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, //在下拉选项添加选中所有和取消选中的按钮
countSelectedText:"已选中{0}项",
selectedTextFormat:"count > 5",
......@@ -487,6 +499,7 @@
$('.is_new').selectpicker('val', is_new.split(',')).trigger("change");
$('#erp_order_id').selectpicker('val', erp_order_id);
$('#is_new_order').selectpicker('val', is_new_order);
$('.is_manager_audit').selectpicker('val', is_manager_audit.split(',')).trigger("change");
$.lie.order.index();
$.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