Commit d0dc3d31 by 朱继来

合并审单和调价功能

parent da6afce7
......@@ -344,9 +344,20 @@ Class OrderController extends Controller
$info = $this->orderDetail($request, $id);
//待审核才可以
if($info['order_info']['status'] != 1){
return redirect('/prompt')->with(['message'=>"该订单不符合调价条件~【status:{$info['order_info']['status']}】",'url' =>$_SERVER['HTTP_REFERER'], 'jumpTime'=>3,'status'=>false]);
}
// if($info['order_info']['status'] != 1){
// return redirect('/prompt')->with(['message'=>"该订单不符合人工审单条件~【status:{$info['order_info']['status']}】",'url' =>$_SERVER['HTTP_REFERER'], 'jumpTime'=>3,'status'=>false]);
// }
// 获取所有的业务员
$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);
}
......@@ -406,6 +417,9 @@ Class OrderController extends Controller
$check['k2'] = md5(md5($check['k1']).'fh6y5t4rr351d2c3bryi');
$resData = [
"cancel_reason" => $request->input('cancel_reason', ''),
"sale_id" => $request->input('sale_id', ''),
"status" => $request->input('order_status', ''),
"deposit_amount" => $request->input('deposit_amount', ''),
"goods_amount" => $request->input('goods_amount', ''),
"order_amount" => $request->input('order_amount', ''),
......
......@@ -7,6 +7,10 @@
padding: 2px;
}
.btn-group-xs a{
margin-right: 5px;
}
/* 文本颜色 */
.list-text-no-check{color: #FFB5B5;}
.list-text-cancel{color: #999;}
......@@ -247,4 +251,11 @@ input[type="color"],
border-bottom-right-radius: 5px;
padding: 10px;
text-align: center;
}
.show-advance-pay{
display: none;
}
.error{
color: red;
}
\ No newline at end of file
<p style="padding-left: 5px;">人工调价、审核</p>
<p style="padding-left: 5px;">人工审单</p>
<div class="tabs-box">
<div class="order-change-main">
<form action="{{URL('ajaxSaveChange')}}" method="post" class="form-horizontal ajaxSubmit">
@if ($order_info['status'] == 1)
<form id="checkOrderForm" class="form-horizontal">
<input type="hidden" name="order_sn" value="{{$order_info['order_sn']}}">
<input type="hidden" name="order_id" value="{{$order_info['order_id']}}">
<input type="hidden" name="goods_amount" value="{{$order_price_info['goods_price']}}">
<input type="hidden" name="order_amount" value="{{$order_info['order_amount']}}">
<input type="hidden" name="cancel_reason" value="{{isset($order_info['cancle_reason']) ? $order_info['cancle_reason'] : ''}}">
<input type="hidden" name="user_mobile" value="{{$user_mobile}}">
<!-- 审核 -->
<p>审核</p>
<table class="table table-bordered table-hover check-table" style="min-height:150px;">
<tr>
<td class="check-table-title" width="20%">付款类型:</td>
<td class="check-select">
<label><input class="order_all_pay" type="radio" name="order_pay_type" value="1">全额付款</label>
<label><input class="order_advance_pay" type="radio" name="order_pay_type" value="2">预付首款</label>
</td>
</tr>
<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
<li><label><input type="radio" name="sale_id" value="{{$v->userId}}"/>{{$v->name}}</label></li>
@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
<li><label><input type="radio" name="sale_id" value="{{$vo->userId}}"/>{{$vo->name}}</label></li>
@if(($key + 1) % 8 == 0 || $key + 1 == count($sale_list))
</ul>
@endif
@endforeach
</td>
</tr>
<tr>
<td class="check-table-title" width="20%">调价审核:</td>
<td class="check-select">
<label><input type="radio" name="order_status" value="2" checked>审核通过</label>
<label><input type="radio" name="order_status" value="-1" id="faild">审核不通过</label>
</td>
</tr>
<tr class="cancle_reason" style="display: none;">
<td class="check-table-title">审核不通过原因:</td>
<td>
<div class="multi-reason">
<label><input type="radio" name="reason" value="客户不接受调价">客户不接受调价</label>
<label><input type="radio" name="reason" value="无现货">无现货</label>
<label><input type="radio" name="reason" value="客户不接受附加费">客户不接受附加费</label>
<label><input type="radio" name="reason" value="客户下错单">客户下错单</label>
</div>
<div class="other-reason">
<label><input type="radio" name="reason" value="1">其他</label>
<textarea name="reason" id="input-reason" placeholder="请填写其他原因"></textarea>
</div>
</td>
</tr>
</table>
<!-- 调价 -->
<p>调价</p>
<table class="table table-bordered table-hover order-change-table change-table">
<thead>
......@@ -57,7 +125,7 @@
</tr>
</table>
@if ($order_info['order_pay_type'] == 2)
<div class="show-advance-pay">
<p>定金调整</p>
<table class="table table-bordered table-hover change-table">
<tr>
......@@ -77,9 +145,29 @@
</td>
</tr>
</table>
@endif
</div>
<button class="btn btn-primary">提交</button>
<a class="btn btn-primary checkOrder">提交</a>
</form>
@endif
@if ($order_info['status'] == 2)
<p>交易状态:&nbsp;审核通过,请联系客户及时付款!</p>
@endif
@if ($order_info['status'] == -1)
@if ($order_info['cancel_reason'] != '')
<p>交易状态:&nbsp;审核不通过</p>
<p>审核不通过原因:&nbsp;{{$order_info['cancel_reason']}}</p>
@else
<p>交易状态:&nbsp;用戶取消</p>
@endif
@endif
</div>
</div>
\ No newline at end of file
</div>
<script>
var order_amount = "{{$order_info['order_amount']}}";
var currency = "{{$order_info['currency']}}";
var order_pay_type = "{{$order_info['order_pay_type']}}";
</script>
\ No newline at end of file
......@@ -414,11 +414,11 @@
<div class="tabs-box">
<!-- 判断操作权限 -->
@if (($role == 1 || $role ==2) && $order_info['status'] == 1 && in_array('adjust_price', $userPerms))
<a href="{{URL('change', ['order_id'=>$order_info['order_id']])}}" class="btn btn-default">调价</a>
<a class="btn btn-success" href="{{URL('change', ['order_id'=>$order_info['order_id']])}}" class="btn btn-default">人工审单</a>
@endif
<!-- <a href="{:U('account', 'order_id='.$order_info['order_id'])}" class="btn btn-default">账期设置</a> -->
@if (($role == 1 || $role ==2) && in_array($order_info['status'], array(1, 2)) && in_array('check_order', $userPerms))
<a href="{{URL('check', ['order_id'=>$order_info['order_id']])}}" class="btn btn-default">审单</a>
<!-- <a href="{{URL('check', ['order_id'=>$order_info['order_id']])}}" class="btn btn-default">审单</a> -->
@endif
@if ($order_info['status'] == 2 && in_array('cancel_order', $userPerms))
......
......@@ -260,8 +260,8 @@
<a class="btn btn-primary" href="{{URL('details', ['order_id'=>$v['order_id']])}}">详情</a>
<!-- 管理员和经理显示 -->
@if ($role == 1 || $role == 2)
<a class="btn btn-default" href="{{URL('change', ['order_id'=>$v['order_id']])}}">调价</a>
<a class="btn btn-success" href="{{URL('check', ['order_id'=>$v['order_id']])}}">审核</a>
<a class="btn btn-success" href="{{URL('change', ['order_id'=>$v['order_id']])}}">人工审单</a>
<!-- <a class="btn btn-success" href="{{URL('check', ['order_id'=>$v['order_id']])}}">审单</a> -->
@endif
</div>
</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