Commit 0be9656f by 朱继来

fix conflict

parents 1dff8f27 84b5420f
......@@ -742,6 +742,15 @@ Class OrderController extends Controller
// return array('errcode'=>-10010,'errmsg'=>'没有权限进行二次调价');
// }
if (!$request->input('pay_time_limit')) {
$payTime = $request->input('payTime', '');
$payTimeOther = $request->input('payTimeOther', '');
$pay_time_limit = $payTime == 'other' ? $payTimeOther : $payTime;
} else {
$pay_time_limit = $request->input('pay_time_limit');
}
$url = Config('website.api_domain').'order/changeOrder';
$check['k1'] = time();
......@@ -757,12 +766,12 @@ Class OrderController extends Controller
"order_amount" => $request->input('order_amount', ''),
"extra_fee" => $request->input('extra_fee', ''),
"change_info" => $request->input('change_info', ''),
"payTime" => $request->input('payTime', ''),
"payTimeOther" => $request->input('payTimeOther', ''),
"pay_time_limit" => $pay_time_limit,
"check_failed" => $request->input('check_failed', ''),
"order_id" => $order_id,
"pf" => 1,
"k1" => $check['k1'],
"k2" => $check['k2']
"k2" => $check['k2'],
];
$temp = json_decode(curlApi($url, $resData, "POST"), true);
......@@ -771,6 +780,78 @@ Class OrderController extends Controller
}
}
// 驳回调价信息
public function ajaxRejected(Request $request)
{
if ($request->isMethod('post')) {
$order_id = $request->input('order_id');
$order = DB::connection('order')
->table('lie_order')
->where(['order_id' => $order_id])
->update(['order_temp_info' => '']);
if (!$order) {
return array('errcode'=>-1, 'errmsg'=>'驳回失败');
}
return array('errcode'=>0,'errmsg'=>'驳回成功');
}
}
// 推送业务员
public function sendSales(Request $request, $id='')
{
if ($request->isMethod('post')) {
$order_id = $request->input('order_id', '');
$sale_id = $request->input('sale_id', '');
if (empty($order_id) || empty($sale_id))
return array('errcode'=>10003, 'errmsg'=>'参数不存在');
$url = Config('website.api_domain').'order/sendSales';
$check['k1'] = time();
$check['k2'] = md5(md5($check['k1']).'fh6y5t4rr351d2c3bryi');
$resData = array(
"order_id"=>$order_id,
"sale_id"=>$sale_id,
"pf"=>1,
"k1"=>$check['k1'],
"k2"=>$check['k2']
);
$temp = json_decode(curlApi($url, $resData, "POST"), true);
return array('errcode'=>$temp['err_code'],'errmsg'=>$temp['err_msg']);
// $update = DB::connection('order')->table('lie_order')->where('order_id', $order_id)->update(['sale_id' => $sale_id]);
// if (!$update) {
// return array('errcode'=>-1, 'errmsg'=>'推送失败');
// }
// return array('errcode'=>0, 'errmsg'=>'推送成功');
}
$info = $this->orderDetail($request, $id);
// 获取所有的业务员
$sale_list = $this->getSales('销售');
$perm = new PermController;
$manager = $perm->getRoleUsers($request, '经理');
$sale_list = $perm->getRoleUsers($request, '交易员');
$info['sale_list'] = $sale_list;
$info['manager'] = $manager;
return view('detail', $info);
}
// 人工审单后再次调价 --- 20180404
public function adjustPrice(Request $request, $id)
{
......@@ -782,8 +863,9 @@ Class OrderController extends Controller
}
$data['confirm_time'] = 0;
$data['pay_time'] = 0;
$data['status'] = 1;
$data['sale_id'] = 0; // 再次调价调整sale_id
// $data['sale_id'] = 0; // 再次调价调整sale_id
$update = DB::connection('order')
->table('lie_order')
......@@ -1335,4 +1417,27 @@ Class OrderController extends Controller
}
}
// 延长付款时间
public function ajaxDelayTime(Request $request)
{
if ($request->isMethod('post')) {
$order_id = $request->input('order_id', '');
$delay_time = $request->input('delay_time', '');
}
if (empty($order_id) || empty($delay_time)) return ['errcode'=>10003, 'errmsg'=>'参数不存在'];
$order = DB::connection('order')->table('lie_order')->where('order_id', '=', $order_id)->select('pay_time')->first();
$delay_time = $order->pay_time + $delay_time * 86400;
$update = DB::connection('order')->table('lie_order')->where('order_id', '=', $order_id)->update(['pay_time'=>$delay_time]);
if (!$update) {
return ['errcode'=>0, 'errmsg'=>'延长失败'];
}
return ['errcode'=>0, 'errmsg'=>'延长成功'];
}
}
\ No newline at end of file
......@@ -38,6 +38,7 @@ Route::group(['middleware' => 'web'], function () {
Route::get('/details/{id}', 'OrderController@details');
Route::get('/change/{id}', 'OrderController@changeOrder');
Route::match(['get', 'post'], '/sendSales/{id?}', 'OrderController@sendSales');
Route::post('/ajaxdeletegoods', 'OrderController@ajaxdeletegoods');
Route::post('/ajaxSaveChange', 'OrderController@ajaxSaveChange');
Route::get('/check/{id}', 'OrderController@check');
......@@ -59,6 +60,10 @@ Route::group(['middleware' => 'web'], function () {
Route::get('/count', 'OrderCountController@count');
Route::get('/amount', 'OrderCountController@amount');
Route::match('post', '/ajaxDelayTime', 'OrderController@ajaxDelayTime');
Route::match('post', '/ajaxRejected', 'OrderController@ajaxRejected');
});
// 不需要登陆态
......
/*!
* Bootstrap-select v1.12.4 (http://silviomoreto.github.io/bootstrap-select)
*
* Copyright 2013-2017 bootstrap-select
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
*/select.bs-select-hidden,select.selectpicker{display:none!important}.bootstrap-select{width:220px\9}.bootstrap-select>.dropdown-toggle{width:100%;padding-right:25px;z-index:1}.bootstrap-select>.dropdown-toggle.bs-placeholder,.bootstrap-select>.dropdown-toggle.bs-placeholder:active,.bootstrap-select>.dropdown-toggle.bs-placeholder:focus,.bootstrap-select>.dropdown-toggle.bs-placeholder:hover{color:#999}.bootstrap-select>select{position:absolute!important;bottom:0;left:50%;display:block!important;width:.5px!important;height:100%!important;padding:0!important;opacity:0!important;border:none}.bootstrap-select>select.mobile-device{top:0;left:0;display:block!important;width:100%!important;z-index:2}.error .bootstrap-select .dropdown-toggle,.has-error .bootstrap-select .dropdown-toggle{border-color:#b94a48}.bootstrap-select.fit-width{width:auto!important}.bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn){width:220px}.bootstrap-select .dropdown-toggle:focus{outline:thin dotted #333!important;outline:5px auto -webkit-focus-ring-color!important;outline-offset:-2px}.bootstrap-select.form-control{margin-bottom:0;padding:0;border:none}.bootstrap-select.form-control:not([class*=col-]){width:100%}.bootstrap-select.form-control.input-group-btn{z-index:auto}.bootstrap-select.form-control.input-group-btn:not(:first-child):not(:last-child)>.btn{border-radius:0}.bootstrap-select.btn-group:not(.input-group-btn),.bootstrap-select.btn-group[class*=col-]{float:none;display:inline-block;margin-left:0}.bootstrap-select.btn-group.dropdown-menu-right,.bootstrap-select.btn-group[class*=col-].dropdown-menu-right,.row .bootstrap-select.btn-group[class*=col-].dropdown-menu-right{float:right}.form-group .bootstrap-select.btn-group,.form-horizontal .bootstrap-select.btn-group,.form-inline .bootstrap-select.btn-group{margin-bottom:0}.form-group-lg .bootstrap-select.btn-group.form-control,.form-group-sm .bootstrap-select.btn-group.form-control{padding:0}.form-group-lg .bootstrap-select.btn-group.form-control .dropdown-toggle,.form-group-sm .bootstrap-select.btn-group.form-control .dropdown-toggle{height:100%;font-size:inherit;line-height:inherit;border-radius:inherit}.form-inline .bootstrap-select.btn-group .form-control{width:100%}.bootstrap-select.btn-group.disabled,.bootstrap-select.btn-group>.disabled{cursor:not-allowed}.bootstrap-select.btn-group.disabled:focus,.bootstrap-select.btn-group>.disabled:focus{outline:0!important}.bootstrap-select.btn-group.bs-container{position:absolute;height:0!important;padding:0!important}.bootstrap-select.btn-group.bs-container .dropdown-menu{z-index:1060}.bootstrap-select.btn-group .dropdown-toggle .filter-option{display:inline-block;overflow:hidden;width:100%;text-align:left}.bootstrap-select.btn-group .dropdown-toggle .caret{position:absolute;top:50%;right:12px;margin-top:-2px;vertical-align:middle}.bootstrap-select.btn-group[class*=col-] .dropdown-toggle{width:100%}.bootstrap-select.btn-group .dropdown-menu{min-width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-select.btn-group .dropdown-menu.inner{position:static;float:none;border:0;padding:0;margin:0;border-radius:0;-webkit-box-shadow:none;box-shadow:none}.bootstrap-select.btn-group .dropdown-menu li{position:relative}.bootstrap-select.btn-group .dropdown-menu li.active small{color:#fff}.bootstrap-select.btn-group .dropdown-menu li.disabled a{cursor:not-allowed}.bootstrap-select.btn-group .dropdown-menu li a{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bootstrap-select.btn-group .dropdown-menu li a.opt{position:relative;padding-left:2.25em}.bootstrap-select.btn-group .dropdown-menu li a span.check-mark{display:none}.bootstrap-select.btn-group .dropdown-menu li a span.text{display:inline-block}.bootstrap-select.btn-group .dropdown-menu li small{padding-left:.5em}.bootstrap-select.btn-group .dropdown-menu .notify{position:absolute;bottom:5px;width:96%;margin:0 2%;min-height:26px;padding:3px 5px;background:#f5f5f5;border:1px solid #e3e3e3;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05);pointer-events:none;opacity:.9;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-select.btn-group .no-results{padding:3px;background:#f5f5f5;margin:0 5px;white-space:nowrap}.bootstrap-select.btn-group.fit-width .dropdown-toggle .filter-option{position:static}.bootstrap-select.btn-group.fit-width .dropdown-toggle .caret{position:static;top:auto;margin-top:-1px}.bootstrap-select.btn-group.show-tick .dropdown-menu li.selected a span.check-mark{position:absolute;display:inline-block;right:15px;margin-top:5px}.bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text{margin-right:34px}.bootstrap-select.show-menu-arrow.open>.dropdown-toggle{z-index:1061}.bootstrap-select.show-menu-arrow .dropdown-toggle:before{content:'';border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid rgba(204,204,204,.2);position:absolute;bottom:-4px;left:9px;display:none}.bootstrap-select.show-menu-arrow .dropdown-toggle:after{content:'';border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;bottom:-4px;left:10px;display:none}.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:before{bottom:auto;top:-3px;border-top:7px solid rgba(204,204,204,.2);border-bottom:0}.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:after{bottom:auto;top:-3px;border-top:6px solid #fff;border-bottom:0}.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:before{right:12px;left:auto}.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:after{right:13px;left:auto}.bootstrap-select.show-menu-arrow.open>.dropdown-toggle:after,.bootstrap-select.show-menu-arrow.open>.dropdown-toggle:before{display:block}.bs-actionsbox,.bs-donebutton,.bs-searchbox{padding:4px 8px}.bs-actionsbox{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bs-actionsbox .btn-group button{width:50%}.bs-donebutton{float:left;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bs-donebutton .btn-group button{width:100%}.bs-searchbox+.bs-actionsbox{padding:0 8px 4px}.bs-searchbox .form-control{margin-bottom:0;width:100%;float:none}
\ No newline at end of file
......@@ -268,7 +268,7 @@ input[type="color"],
margin-bottom: 0;
}
#payTime {
.payTime {
float: left;
margin-right: 20px;
}
......@@ -289,9 +289,19 @@ input[type="color"],
.checked_right {
position: absolute;
right: 0;
line-height: 60px;
line-height: 10px;
}
.count_time {
color: red;
font-size: 20px;
}
.delay_time_title{
float:left;
}
.showtime {
height: 30px;
line-height: 30px;
}
.delay_confirm {
margin-bottom: 5px;
}
\ No newline at end of file
......@@ -392,6 +392,11 @@
</div>
</div>
@if ($action_name == 'sendSales')
<!--推送业务员-->
@include('detail.sendSales')
@endif
@if ($action_name == 'checkPay')
<!--对账-->
@include('detail.checkPay')
......@@ -425,7 +430,7 @@
<!-- 查看ERP订单详情时去掉操作按钮 -->
@if (!isset($_REQUEST['tags']))
<!-- 人工审单时去掉操作按钮 -->
@if ($action_name != 'changeOrder')
@if ($action_name != 'sendSales' && $action_name != 'changeOrder')
<p style="padding-left: 5px;">操作</p>
<div class="tabs-box">
<!-- 判断操作权限 -->
......
<p style="padding-left: 5px;">推送业务员</p>
<div class="tabs-box">
<div class="order-change-main">
@if ($order_info['sale_id'])
<p class="error">订单已推送!</p>
@endif
<form id="sendSalesForm" class="form-horizontal">
<input type="hidden" name="order_id" value="{{$order_info['order_id']}}">
<table class="table table-bordered table-hover check-table" style="min-height:150px;">
<tr>
<td class="check-table-title" width="20%">业务员:</td>
<td>
@if (!empty($manager))
@foreach ($manager as $k => $v)
@if(($k + 1) % 8 == 1)
<ul>
@endif
@if ($v->userId == $order_info['sale_id'])
<li><label><input type="radio" name="sale_id" value="{{$v->userId}}" checked /><span>{{$v->name}}</span></label></li>
@else
<li><label><input type="radio" name="sale_id" value="{{$v->userId}}"/><span>{{$v->name}}</span></label></li>
@endif
@if(($k + 1) % 8 == 0 || $k + 1 == count($manager))
</ul>
@endif
@endforeach
<hr/>
@endif
@foreach ($sale_list as $key => $vo)
@if(($key + 1) % 8 == 1)
<ul>
@endif
@if ($vo->userId == $order_info['sale_id'])
<li><label><input type="radio" name="sale_id" value="{{$vo->userId}}" checked /><span>{{$vo->name}}</span></label></li>
@else
<li><label><input type="radio" name="sale_id" value="{{$vo->userId}}"/><span>{{$vo->name}}</span></label></li>
@endif
@if(($key + 1) % 8 == 0 || $key + 1 == count($sale_list))
</ul>
@endif
@endforeach
</td>
</tr>
</table>
<a class="btn btn-primary send_sales">提交</a>
</form>
</div>
</div>
......@@ -42,6 +42,22 @@
</div>
</dd>
</dl> -->
<dl>
<dt>订单状态:</dt>
<dd>
<select id="order_status" name="order_status" class="selectpicker" title="全部" multiple>
<option class="order_status" value="-1">已取消</option>
<option class="order_status" value="1">待审核</option>
<option class="order_status" value="2">待付款</option>
<option class="order_status" value="3">待付尾款</option>
<option class="order_status" value="4">待发货</option>
<option class="order_status" value="7">部分发货</option>
<option class="order_status" value="8">待收货</option>
<option class="order_status" value="10">交易成功</option>
</select>
</dd>
</dl>
<dl>
<dt>付款类型:</dt>
<dd>
......@@ -56,24 +72,6 @@
</dd>
</dl>
<dl>
<dt>订单状态:</dt>
<dd>
<div class="droplist" data-default="{{$condition['order_status']}}" id="order_status" name="order_status">
<ul class="dropdown-menu">
<li data-val="" class="active">全部</li>
<li data-val="-1">已取消</li>
<li data-val="1">待审核</li>
<li data-val="2">待付款</li>
<li data-val="3">待付尾款</li>
<li data-val="4">待发货</li>
<li data-val="7">部分发货</li>
<li data-val="8">待收货</li>
<li data-val="10">交易成功</li>
</ul>
</div>
</dd>
</dl>
<dl>
<dt>配送方式:</dt>
<dd>
<div class="droplist" data-default="{{$condition['shipping_name']}}" id="shipping_name" name="shipping_name" >
......@@ -269,7 +267,7 @@
<td>
<div class="btn-group btn-group-xs">
<a class="btn btn-primary" href="{{URL('details', ['order_id'=>$v['order_id']])}}" target="_blank">详情</a>
<!-- 管理员和经理显示 $role = 1 || 2 -->
@if (in_array('check_order', $userPerms))
<a class="btn btn-success" href="{{URL('change', ['order_id'=>$v['order_id']])}}" target="_blank">人工审单</a>
@endif
......@@ -283,6 +281,11 @@
@if (in_array('download_contract', $userPerms))
<a class="btn btn-info" href="{{$downLoadUrl}}">下载合同</a>
<!-- 管理员和经理显示 && sale_id为空 && 订单状态为待审核 -->
@if (in_array($role, [1, 2]) && !$v['sale_id'] && $v['status'] == 1)
<a class="btn btn-info" href="{{URL('sendSales', ['order_id'=>$v['order_id']])}}" target="_blank">推送</a>
@endif
</div>
</td>
......@@ -456,10 +459,13 @@
<script>
var test_order = "{{$condition['test_order']}}";
var order_status = "{{$condition['order_status']}}";
if (test_order) {
$('input[name=test_order]').attr('checked', true);
}
$('.selectpicker').selectpicker('val', order_status.split(',')).trigger("change");
$.lie.order.index();
</script>
\ No newline at end of file
<link href="/css/bootstrap.min.css" rel="stylesheet">
<link href="/css/bootstrap-select.min.css" rel="stylesheet">
<link href="/font-awesome/css/font-awesome.css" rel="stylesheet">
<link href="/css/style.css" rel="stylesheet">
<link href="/layer/skin/layer.css" rel="stylesheet">
......
<script src="/js/jquery-2.2.1.js"></script>
<script src="/js/jquery.form.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/bootstrap-select.min.js"></script>
<script src="/layer/layer.js"></script>
<script src="/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/js/plugins/metisMenu/jquery.metisMenu.js"></script>
......
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