Commit ccf4f17f by 朱继来

Merge branch 'zjl_adjust_20180828' into development

parents 9febdead 230a309e
......@@ -542,6 +542,7 @@ Class OrderController extends Controller
array('adtags', 'adtags来源'),
array('client_source', '新用户来源'),
array('cancel_reason', '取消原因'),
array('send_remark', '推送备注'),
);
// 非竞调账号,则查看真实数据
......@@ -554,6 +555,7 @@ Class OrderController extends Controller
->leftJoin('lie_order as o', 'it.order_id', '=', 'o.order_id')
->leftJoin('lie_pay_log as p', 'it.order_id', '=', 'p.order_id')
->leftJoin('lie_order_invoice as i', 'it.order_id', '=', 'i.order_id')
->leftJoin('lie_order_extend as oe', 'oe.order_id', '=', 'i.order_id')
->leftJoin('lie_order_address as a', function($join) {
$join->on('it.order_id', '=', 'a.order_id')->where('a.address_type', '=', 1);
})
......@@ -684,7 +686,7 @@ Class OrderController extends Controller
})
->where('it.status', '<>', -1)
->where('o.order_goods_type', '=', $map['order_goods_type'])
->select('it.goods_id', 'it.goods_name', 'it.goods_number', 'it.goods_price', 'it.supplier_name', 'o.order_id', 'o.order_sn', 'o.order_pay_type', 'o.order_source', 'o.create_time', 'o.status', 'o.order_amount', 'o.currency', 'o.sale_id', 'o.cancel_reason', 'i.invoice_status', 'a.consignee', 's.status as shipping_status', 'u.user_id', 'u.mobile', 'u.email', 'u.client_source', 'c.com_name')
->select('it.goods_id', 'it.goods_name', 'it.goods_number', 'it.goods_price', 'it.supplier_name', 'o.order_id', 'o.order_sn', 'o.order_pay_type', 'o.order_source', 'o.create_time', 'o.status', 'o.order_amount', 'o.currency', 'o.sale_id', 'o.cancel_reason', 'i.invoice_status', 'a.consignee', 's.status as shipping_status', 'u.user_id', 'u.mobile', 'u.email', 'u.client_source', 'c.com_name', 'oe.send_remark')
->groupBy('it.rec_id')
->orderBy('o.create_time', 'DESC')
->get();
......@@ -794,6 +796,7 @@ Class OrderController extends Controller
$tmp[$i]['adtags'] = '';
$tmp[$i]['client_source'] = '';
$tmp[$i]['cancel_reason'] = '';
$tmp[$i]['send_remark'] = '';
} else {
$tmp[$i]['order_sn'] = "\t".$order[$i]->order_sn."\t";
$tmp[$i]['user_account'] = $order[$i]->mobile ? $order[$i]->mobile : $order[$i]->email;
......@@ -816,6 +819,7 @@ Class OrderController extends Controller
$tmp[$i]['adtags'] = $order[$i]->order_source;
$tmp[$i]['client_source'] = $order[$i]->client_source;
$tmp[$i]['cancel_reason'] = $order[$i]->cancel_reason;
$tmp[$i]['send_remark'] = $order[$i]->send_remark;
}
unset($sales);
......@@ -1032,6 +1036,7 @@ Class OrderController extends Controller
if ($request->isMethod('post')) {
$order_id = $request->input('order_id', '');
$sale_id = $request->input('sale_id', '');
$send_remark = $request->input('send_remark', '');
$operator_id = $request->user->userId;
if (empty($order_id) || empty($sale_id)) {
......@@ -1048,6 +1053,7 @@ Class OrderController extends Controller
"order_id"=>$order_id,
"sale_id"=>$sale_id,
'operator_id'=>$operator_id,
'send_remark'=>$send_remark,
"pf"=>1,
"k1"=>$check['k1'],
"k2"=>$check['k2']
......@@ -1074,6 +1080,8 @@ Class OrderController extends Controller
$info['test'] = $this->filterLeave($test);
$info['sale_list'] = $this->filterLeave($sale_list);
$info['kefu'] = $this->filterLeave($kefu);
$info['sale_id'] = $request->user->userId;
$info['role'] = $perm->getUserRole($request);
return view('detail', $info);
}
......
......@@ -76,6 +76,16 @@
@endif
</td>
</tr>
<!-- 查看权限:当前推送人或管理员、经理、测试 -->
@if ($sale_id == $order_info['sale_id'] || in_array($role, [1, 2, 5]))
<tr>
<td class="check-table-title" width="20%">备注信息:</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>
......
......@@ -81,6 +81,7 @@
<dt>推送业务员:</dt>
<dd style="width: 115px;">
<select id="order_send" name="order_send" class="form-control order_send selectpicker" title="全部" data-live-search="true" data-size="7">
<option value="">全部</option>
<optgroup label="在职">
@foreach ($sale_list as $v)
@if ($v->status != 4)
......
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