Commit 8678f987 by 朱继来

Merge branch 'zjl_freight_20210129'

parents 84b76a05 4775b247
...@@ -1123,10 +1123,20 @@ Class OrderController extends Controller ...@@ -1123,10 +1123,20 @@ Class OrderController extends Controller
$info['online_sales_chief'] = $perm->getUserByCondition(33, 66, 0); // 线上销售-33 线上销售总监-66 $info['online_sales_chief'] = $perm->getUserByCondition(33, 66, 0); // 线上销售-33 线上销售总监-66
$info['online_sales_mgr'] = $perm->getDepartmentUser(33, 63); // 线上销售-33 销售经理-63 $info['online_sales_mgr'] = $perm->getDepartmentUser(33, 63); // 线上销售-33 销售经理-63
$info['online_sales_kefu_1'] = $perm->getUserByCondition(34, 62, 0); // 线上一组销售
$info['online_sales_kefu_2'] = $perm->getUserByCondition(35, 62, 0); // 线上二组销售 // 获取线上销售子级部门
$info['online_sales_kefu_3'] = $perm->getUserByCondition(36, 62, 0); // 线上三组销售 $sub_department = DB::table('user_department')->where('parent_id', 33)->select('department_id', 'department_name')->get();
$info['online_sales_kefu_4'] = $perm->getUserByCondition(37, 62, 0); // 线上四组销售
foreach ($sub_department as $v) {
$v->sales = $perm->getUserByCondition($v->department_id, 62, 0);
}
$info['sub_department'] = $sub_department;
// $info['online_sales_kefu_1'] = $perm->getUserByCondition(34, 62, 0); // 线上一组销售
// $info['online_sales_kefu_2'] = $perm->getUserByCondition(35, 62, 0); // 线上二组销售
// $info['online_sales_kefu_3'] = $perm->getUserByCondition(36, 62, 0); // 线上三组销售
// $info['online_sales_kefu_4'] = $perm->getUserByCondition(37, 62, 0); // 线上四组销售
$info['offline_sales_chief'] = $perm->getUserByCondition(40, 90, 0); // 线下销售-39 线下销售总监-90 $info['offline_sales_chief'] = $perm->getUserByCondition(40, 90, 0); // 线下销售-39 线下销售总监-90
......
<p style="padding-left: 5px;">推送业务员</p> <p style="padding-left: 5px;">推送业务员</p>
<div class="tabs-box"> <div class="tabs-box">
<div class="order-change-main"> <div class="order-change-main">
@if ($order_info['sale_id']) @if ($order_info['sale_id'])
<p class="error">订单已推送!</p> <p class="error">订单已推送!</p>
@endif @endif
<form id="sendSalesForm" class="form-horizontal table-responsive"> <form id="sendSalesForm" class="form-horizontal table-responsive">
<input type="hidden" name="order_id" value="{{ $order_info['order_id'] }}"> <input type="hidden" name="order_id" value="{{ $order_info['order_id'] }}">
<table class="table table-bordered table-hover check-table" style="min-height:150px;"> <table class="table table-bordered table-hover check-table" style="min-height:150px;">
@if (!empty($manager)) @if (!empty($manager))
<tr> <tr>
<td class="check-table-title" width="15%"></td> <td class="check-table-title" width="15%"></td>
<td> <td>
<ul> <ul>
@foreach ($manager as $vo) @foreach ($manager as $vo)
@if ($vo->userId == $order_info['sale_id']) @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> <li><label><input type="radio" name="sale_id" value="{{$vo->userId}}" checked /><span>{{$vo->name}}</span></label></li>
@else @else
<li><label><input type="radio" name="sale_id" value="{{$vo->userId}}"/><span>{{$vo->name}}</span></label></li> <li><label><input type="radio" name="sale_id" value="{{$vo->userId}}"/><span>{{$vo->name}}</span></label></li>
@endif @endif
@endforeach @endforeach
</ul> </ul>
</td> </td>
</tr> </tr>
@endif @endif
@if (!empty($online_sales_chief)) @if (!empty($online_sales_chief))
<tr> <tr>
<td class="check-table-title"></td> <td class="check-table-title"></td>
<td> <td>
<ul> <ul>
@foreach ($online_sales_chief as $vo) @foreach ($online_sales_chief as $vo)
@if ($vo->userId == $order_info['sale_id']) @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> <li><label><input type="radio" name="sale_id" value="{{$vo->userId}}" checked /><span>{{$vo->name}}</span></label></li>
@else @else
<li><label><input type="radio" name="sale_id" value="{{$vo->userId}}"/><span>{{$vo->name}}</span></label></li> <li><label><input type="radio" name="sale_id" value="{{$vo->userId}}"/><span>{{$vo->name}}</span></label></li>
@endif @endif
@endforeach @endforeach
</ul> </ul>
</td> </td>
</tr> </tr>
@endif @endif
@if (!empty($online_sales_mgr)) @if (!empty($online_sales_mgr))
<tr> <tr>
<td class="check-table-title">线上销售:</td> <td class="check-table-title">线上销售:</td>
<td> <td>
<ul> <ul>
<table class="table table-bordered table-hover"> <table class="table table-bordered table-hover">
<tr> <tr>
<td width="10%">主管:</td> <td width="10%">主管:</td>
<td> <td>
<ul> <ul>
@foreach ($online_sales_mgr as $vo) @foreach ($online_sales_mgr as $vo)
@if ($vo->userId == $order_info['sale_id']) @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> <li><label><input type="radio" name="sale_id" value="{{$vo->userId}}" checked /><span>{{$vo->name}}</span></label></li>
@else @else
<li><label><input type="radio" name="sale_id" value="{{$vo->userId}}"/><span>{{$vo->name}}</span></label></li> <li><label><input type="radio" name="sale_id" value="{{$vo->userId}}"/><span>{{$vo->name}}</span></label></li>
@endif @endif
@endforeach @endforeach
</ul> </ul>
</td> </td>
</tr> </tr>
@if (!empty($online_sales_kefu_1)) <!-- 线上销售各组 -->
<tr> @if ($sub_department)
<td>线销一组:</td> @foreach ($sub_department as $v)
<td> @if (!empty($v->sales))
<ul> <tr>
@foreach ($online_sales_kefu_1 as $vo) <td>{{ $v->department_name }}</td>
@if ($vo->userId == $order_info['sale_id']) <td>
<li><label><input type="radio" name="sale_id" value="{{$vo->userId}}" checked /><span>{{$vo->name}}</span></label></li> <ul>
@else @foreach ($v->sales as $vo)
<li><label><input type="radio" name="sale_id" value="{{$vo->userId}}"/><span>{{$vo->name}}</span></label></li> @if ($vo->userId == $order_info['sale_id'])
@endif <li><label><input type="radio" name="sale_id" value="{{$vo->userId}}" checked /><span>{{$vo->name}}</span></label></li>
@endforeach @else
</ul> <li><label><input type="radio" name="sale_id" value="{{$vo->userId}}"/><span>{{$vo->name}}</span></label></li>
</td> @endif
</tr> @endforeach
@endif </ul>
</td>
@if (!empty($online_sales_kefu_2)) </tr>
<tr> @endif
<td>线销二组:</td> @endforeach
<td> @endif
<ul> </table>
@foreach ($online_sales_kefu_2 as $vo) </ul>
@if ($vo->userId == $order_info['sale_id']) </td>
<li><label><input type="radio" name="sale_id" value="{{$vo->userId}}" checked /><span>{{$vo->name}}</span></label></li> </tr>
@else @endif
<li><label><input type="radio" name="sale_id" value="{{$vo->userId}}"/><span>{{$vo->name}}</span></label></li>
@endif @if (!empty($offline_sales_chief))
@endforeach <tr>
</ul> <td class="check-table-title"></td>
</td> <td>
</tr> <ul>
@endif @foreach ($offline_sales_chief as $vo)
@if ($vo->userId == $order_info['sale_id'])
@if (!empty($online_sales_kefu_3)) <li><label><input type="radio" name="sale_id" value="{{$vo->userId}}" checked /><span>{{$vo->name}}</span></label></li>
<tr> @else
<td>线销三组:</td> <li><label><input type="radio" name="sale_id" value="{{$vo->userId}}"/><span>{{$vo->name}}</span></label></li>
<td> @endif
<ul> @endforeach
@foreach ($online_sales_kefu_3 as $vo) </ul>
@if ($vo->userId == $order_info['sale_id']) </td>
<li><label><input type="radio" name="sale_id" value="{{$vo->userId}}" checked /><span>{{$vo->name}}</span></label></li> </tr>
@else @endif
<li><label><input type="radio" name="sale_id" value="{{$vo->userId}}"/><span>{{$vo->name}}</span></label></li>
@endif @if (!empty($offline_sales_all))
@endforeach <tr>
</ul> <td class="check-table-title">交易员:</td>
</td> <td>
</tr> <ul>
@endif @foreach ($offline_sales_all as $vo)
@if ($vo->userId == $order_info['sale_id'])
@if (!empty($online_sales_kefu_4)) <li><label><input type="radio" name="sale_id" value="{{$vo->userId}}" checked /><span>{{$vo->name}}</span></label></li>
<tr> @else
<td>线销四组:</td> <li><label><input type="radio" name="sale_id" value="{{$vo->userId}}"/><span>{{$vo->name}}</span></label></li>
<td> @endif
<ul> @endforeach
@foreach ($online_sales_kefu_4 as $vo) </ul>
@if ($vo->userId == $order_info['sale_id']) </td>
<li><label><input type="radio" name="sale_id" value="{{$vo->userId}}" checked /><span>{{$vo->name}}</span></label></li> </tr>
@else @endif
<li><label><input type="radio" name="sale_id" value="{{$vo->userId}}"/><span>{{$vo->name}}</span></label></li>
@endif @if (!empty($self_kefu))
@endforeach <tr>
</ul> <td class="check-table-title">自营销售部:</td>
</td> <td>
</tr> <ul>
@endif @foreach ($self_kefu as $vo)
</table> @if ($vo->userId == $order_info['sale_id'])
</ul> <li><label><input type="radio" name="sale_id" value="{{$vo->userId}}" checked /><span>{{$vo->name}}</span></label></li>
</td> @else
</tr> <li><label><input type="radio" name="sale_id" value="{{$vo->userId}}"/><span>{{$vo->name}}</span></label></li>
@endif @endif
@endforeach
@if (!empty($offline_sales_chief)) </ul>
<tr> </td>
<td class="check-table-title"></td> </tr>
<td> @endif
<ul>
@foreach ($offline_sales_chief as $vo) @if (!empty($test))
@if ($vo->userId == $order_info['sale_id']) <tr>
<li><label><input type="radio" name="sale_id" value="{{$vo->userId}}" checked /><span>{{$vo->name}}</span></label></li> <td class="check-table-title">测试:</td>
@else <td>
<li><label><input type="radio" name="sale_id" value="{{$vo->userId}}"/><span>{{$vo->name}}</span></label></li> <ul>
@endif @foreach ($test as $vo)
@endforeach @if ($vo->userId == $order_info['sale_id'])
</ul> <li><label><input type="radio" name="sale_id" value="{{$vo->userId}}" checked /><span>{{$vo->name}}</span></label></li>
</td> @else
</tr> <li><label><input type="radio" name="sale_id" value="{{$vo->userId}}"/><span>{{$vo->name}}</span></label></li>
@endif @endif
@endforeach
@if (!empty($offline_sales_all)) </ul>
<tr> </td>
<td class="check-table-title">交易员:</td> </tr>
<td> @endif
<ul>
@foreach ($offline_sales_all as $vo) <!-- 查看权限:当前推送人 或 管理员、查看下级权限 -->
@if ($vo->userId == $order_info['sale_id']) @if ($sale_id == $order_info['sale_id'] || in_array($role, [1, 2]))
<li><label><input type="radio" name="sale_id" value="{{$vo->userId}}" checked /><span>{{$vo->name}}</span></label></li> <tr>
@else <td class="check-table-title">备注信息:</td>
<li><label><input type="radio" name="sale_id" value="{{$vo->userId}}"/><span>{{$vo->name}}</span></label></li> <td>
@endif <textarea name="send_remark" id="send_remark" class="form-control">{{$order_temp_info['send_remark']}}</textarea>
@endforeach </td>
</ul> </tr>
</td> @endif
</tr> </table>
@endif
<a class="btn btn-primary send_sales">提交</a>
@if (!empty($self_kefu)) </form>
<tr> </div>
<td class="check-table-title">自营销售部:</td> </div>
<td>
<ul>
@foreach ($self_kefu as $vo)
@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
@endforeach
</ul>
</td>
</tr>
@endif
@if (!empty($test))
<tr>
<td class="check-table-title">测试:</td>
<td>
<ul>
@foreach ($test as $vo)
@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
@endforeach
</ul>
</td>
</tr>
@endif
<!-- 查看权限:当前推送人 或 管理员、查看下级权限 -->
@if ($sale_id == $order_info['sale_id'] || in_array($role, [1, 2]))
<tr>
<td class="check-table-title">备注信息:</td>
<td>
<textarea name="send_remark" id="send_remark" class="form-control">{{$order_temp_info['send_remark']}}</textarea>
</td>
</tr>
@endif
</table>
<a class="btn btn-primary send_sales">提交</a>
</form>
</div>
</div>
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