Commit 827fd2c4 by 朱继来

Merge branch 'master' of http://119.23.72.7/zhujilai/Order into zjl_brand_20200608

parents 33587241 c7d0c372
Showing with 1022 additions and 133 deletions
...@@ -309,7 +309,12 @@ Class AddOrderController extends Controller ...@@ -309,7 +309,12 @@ Class AddOrderController extends Controller
{ {
if ($request->isMethod('post')) { if ($request->isMethod('post')) {
$url = Config('website.search-skuid'); $url = Config('website.search-skuid');
$data['id'] = $request->input('sku_id'); $data['id'] = $request->input('sku_id');
$user_id = $request->input('user_id', 0);
if ($user_id) {
$data['uid'] = $user_id;
}
$data['k1'] = time(); $data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi'); $data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
...@@ -870,6 +875,7 @@ Class AddOrderController extends Controller ...@@ -870,6 +875,7 @@ Class AddOrderController extends Controller
{ {
if ($request->isMethod('post')) { if ($request->isMethod('post')) {
$add_type = $request->input('add_type', ''); // 新增类型 $add_type = $request->input('add_type', ''); // 新增类型
$goods_type = $request->input('goods_type', 1); // 商品类型
if ($add_type) { if ($add_type) {
$data['add_goods_name'] = $request->input('add_goods_name', ''); $data['add_goods_name'] = $request->input('add_goods_name', '');
...@@ -891,11 +897,20 @@ Class AddOrderController extends Controller ...@@ -891,11 +897,20 @@ Class AddOrderController extends Controller
$data['add_type'] = $add_type; $data['add_type'] = $add_type;
$data['operator_id'] = $request->user->userId; $data['operator_id'] = $request->user->userId;
$url = Config('website.order_api_domain').'/order/addgoods'; if ($goods_type == 1 && !$add_type) {
$data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
$url = Config('website.api_domain').'/order/jointaddgoods';
$res = json_decode(curlApi($url, $data, 'post'), true);
$response = json_decode(curlApi($url, $data, 'post'), true); return ['errcode' => $res['err_code'], 'errmsg' => $res['err_msg'], 'data' => $res['data']];
}
$url = Config('website.order_api_domain').'/order/addgoods';
$res = json_decode(curlApi($url, $data, 'post'), true);
return ['errcode' => $response['errcode'], 'errmsg' => $response['errmsg']]; return ['errcode' => $res['errcode'], 'errmsg' => $res['errmsg']];
} }
} }
......
...@@ -344,29 +344,52 @@ ...@@ -344,29 +344,52 @@
// } // }
// 获取角色对应的主管邮箱 // 获取角色对应的主管邮箱
public function getManager($request) // public function getManager($request)
{ // {
$role = $this->getUserRole($request); // 当前用户角色 // $role = $this->getUserRole($request); // 当前用户角色
$manager_key = array_search($role, Config('perm_args.manager_to_kefu')); // 获取对应的主管key // $manager_key = array_search($role, Config('perm_args.manager_to_kefu')); // 获取对应的主管key
if (!$manager_key) return false; // if (!$manager_key) return false;
$role_name = array_search($manager_key, Config('perm_args.roles')); // 获取主管对应的角色名称 // $role_name = array_search($manager_key, Config('perm_args.roles')); // 获取主管对应的角色名称
if (!$role_name) return false; // if (!$role_name) return false;
$res = $this->getRoleUsers($request, $role_name); // 获取角色对应的用户 // $res = $this->getRoleUsers($request, $role_name); // 获取角色对应的用户
$email = []; // $email = [];
if ($res) { // if ($res) {
foreach ($res as $v) { // foreach ($res as $v) {
$email[] = $v->email; // $email[] = $v->email;
} // }
// }
// return $email;
// }
// 获取角色对应的主管邮箱
public function getManager($userId)
{
// 获取当前所在部门
$department_id = DB::table('user_info')->where('userId', $userId)->value('department_id');
if (!$department_id) return false;
$map = [];
$map['department_id'] = $department_id;
$map['position_id'] = 63; // 销售经理
$email = DB::table('user_info')->where($map)->select('email')->get();
if (empty($email)) return false;
foreach ($email as $v) {
$data[] = $v->email;
} }
return $email; return $data;
} }
/* 订单系统权限调整 --- 20200511 */ /* 订单系统权限调整 --- 20200511 */
......
...@@ -126,7 +126,7 @@ class ReturnController extends Controller ...@@ -126,7 +126,7 @@ class ReturnController extends Controller
$map['sale_id'] = $request->input('sale_id', ''); $map['sale_id'] = $request->input('sale_id', '');
// 非管理员、查看下级,只能看到自己的退货单 // 非管理员、查看下级,只能看到自己的退货单
if (!in_array($info['role'], [1, 2])) { if ($info['role'] == 3) {
$map['create_uid'] = $request->user->userId; $map['create_uid'] = $request->user->userId;
} }
......
...@@ -42,7 +42,9 @@ Route::group(['middleware' => 'web'], function () { ...@@ -42,7 +42,9 @@ Route::group(['middleware' => 'web'], function () {
Route::get('/change/{id}', 'OrderController@changeOrder'); Route::get('/change/{id}', 'OrderController@changeOrder');
Route::match(['get', 'post'], '/sendSales/{id?}', 'OrderController@sendSales'); Route::match(['get', 'post'], '/sendSales/{id?}', 'OrderController@sendSales');
Route::post('/ajaxdeletegoods', 'OrderController@ajaxdeletegoods'); Route::post('/ajaxdeletegoods', 'OrderController@ajaxdeletegoods');
Route::post('/ajaxSaveChange', 'OrderController@ajaxSaveChange'); Route::post('/ajaxSaveChange', 'OrderController@ajaxSaveChange');
Route::post('/ajaxAuditPass', 'OrderController@ajaxAuditPass');
Route::post('/ajaxReAudit', 'OrderController@ajaxReAudit');
Route::get('/check/{id}', 'OrderController@check'); Route::get('/check/{id}', 'OrderController@check');
Route::match(['get', 'post'], '/applyAdjust/{id}', 'OrderController@applyAdjust'); Route::match(['get', 'post'], '/applyAdjust/{id}', 'OrderController@applyAdjust');
Route::match(['get', 'post'], '/send/{id}', 'OrderController@send'); Route::match(['get', 'post'], '/send/{id}', 'OrderController@send');
......
...@@ -251,7 +251,8 @@ ...@@ -251,7 +251,8 @@
// 获取SKU信息 // 获取SKU信息
$('.get-sku').click(function() { $('.get-sku').click(function() {
var sku_id = $(this).siblings('.search-sku').val(); var sku_id = $(this).siblings('.search-sku').val();
var user_id = $('.user_id').val() || 0;
if (!sku_id) { if (!sku_id) {
layer.msg('请输入SKU_ID'); layer.msg('请输入SKU_ID');
...@@ -266,7 +267,7 @@ ...@@ -266,7 +267,7 @@
$.ajax({ $.ajax({
url: '/ajax/getSku', url: '/ajax/getSku',
type: 'post', type: 'post',
data: {sku_id : sku_id.trim()}, data: {sku_id : sku_id.trim(), user_id: user_id},
dataType: 'json', dataType: 'json',
success: function (resp) { console.log(resp) success: function (resp) { console.log(resp)
if (resp.errcode != 0) { if (resp.errcode != 0) {
...@@ -680,7 +681,7 @@ ...@@ -680,7 +681,7 @@
var supplier_id = $(this).data('sup_id'); var supplier_id = $(this).data('sup_id');
var supplier_name = $(this).data('sup_name'); var supplier_name = $(this).data('sup_name');
if (supplier_id == '7' || supplier_name.toLowerCase() == 'digikey') { if (supplier_id == '7' || supplier_name.toString().toLowerCase() == 'digikey') {
is_dgk = true; is_dgk = true;
} }
}) })
......
+(function($){
$.lie = $.lie || {version: "v1.0.0"};
$.extend($.lie, {
audit: {
index:function() {
// 主管审核
$('.manager-audit').click(function() {
var order_id = $(this).data('id');
// 弹出提示
layer.open({
area: ['360px'],
title: '提示信息',
content: '确定审核通过该订单吗?',
btn:['确定', '取消'],
yes: function(index, layero){
$.ajax({
url : '/ajaxAuditPass',
type: 'post',
data: {order_id: order_id},
dataType: 'json',
success: function (resp) {
if(resp.errcode === 0){
layer.msg(resp.errmsg || '操作成功');
setTimeout(function(){
location.reload();
}, 1000);
} else {
layer.alert(resp.errmsg || '网络异常', function() {
location.reload();
});
}
},
error: function (res) {
console.log(res);
}
})
layer.msg('提交中...', {icon: 16, time: 0, shade: 0.3}); // 阻止重复提交
},
btn2: function(index, layero){
layer.close(index);
}
});
})
// 反审
$('.re-audit').click(function() {
var order_id = $(this).data('id');
// 弹出提示
layer.open({
area: ['360px'],
title: '提示信息',
content: '确定再次审核该订单吗?',
btn:['确定', '取消'],
yes: function(index, layero){
$.ajax({
url : '/ajaxReAudit',
type: 'post',
data: {order_id: order_id},
dataType: 'json',
success: function (resp) {
if(resp.errcode === 0){
layer.msg(resp.errmsg || '操作成功');
window.open('/change/' + order_id, '_blank')
return false;
}
layer.alert(resp.errmsg || '网络异常');
return false;
},
error: function (res) {
console.log(res);
}
})
layer.msg('提交中...', {icon: 16, time: 0, shade: 0.3}); // 阻止重复提交
},
btn2: function(index, layero){
layer.close(index);
}
});
})
},
}
})
})(jQuery)
\ No newline at end of file
+(function($){
$.lie = $.lie || {version: "v1.0.0"};
$.extend($.lie, {
send_mail: {
index:function() {
// 发送邮件
$(document).on('click','.send_mail', function(data){
var order_id = $(this).data('id');
var cc_sales_count = cc_sales.length;
var html = '';
for (var i = 0; i < cc_sales_count; i++) {
html += '<option value="'+cc_sales[i].userId+'">'+cc_sales[i].name+'</option>';
}
var content = '<div class="form-group">\
<label class="col-sm-4 control-label">是否有额外的抄送人员?</label>\
<div class="col-sm-8">\
<select id="cc_email" name="cc_email" class="form-control cc_email selectpicker" data-live-search="true" data-size="7" title="全部" multiple>\
'+html+'\
</select>\
</div>\
</div>\
<p style="padding-top: 50px;"><i class="error"> * </i>若无额外抄送人,直接点击‘确认’按钮即可</p>';
layer.open({
area: ['600px', '200px'],
title:'邮件抄送',
content: content,
btn:['确认', '取消'],
//提交事件
btn1:function(){
var cc_email = $('#cc_email').val();
$.ajax({
url: '/send_mail',
data: {id: order_id, cc_email: cc_email},
type:'post',
dataType: 'json',
success:function(resp){
if(resp.errcode == 0){
layer.msg(resp.errmsg || '操作成功');
setTimeout(function(){
location.reload();
}, 1000);
return false;
} else {
layer.alert(resp.errmsg || '网络异常');
}
},
error:function(){
layer.alert('网络异常');
}
});
},
btn2:function(index){
layer.close(index);
}
});
$(".cc_email").selectpicker({
actionsBox:true, //在下拉选项添加选中所有和取消选中的按钮
countSelectedText:"已选中{0}项",
selectedTextFormat:"count > 5",
selectAllText: '全选',
deselectAllText: '取消全选',
})
$('.layui-layer-content').css('overflow', 'visible');
})
},
}
})
})(jQuery)
\ No newline at end of file
+(function($){
$.lie = $.lie || {version: "v1.0.0"};
$.extend($.lie, {
track: {
orderTrack:function() {
// 查看订单明细跟踪
$('.list-item-table').off().delegate('.order-track', 'click', function () {
var rid = $(this).data('rid');
$.ajax({
url : '/ajax/getOrderItemsTrack',
type: 'post',
data: {rec_id : rid},
success: function(resp) {
if (resp.errcode == 0) {
var data = resp.data;
var content = '<table class="table">\
<tr>\
<th width="30%">时间</th>\
<th>说明</th>\
<th width="13%">负责人</th>\
</tr>';
for (var i = 0; i < data.length; i++) {
content += '<tr><td>'+data[i].create_time+'</td><td>'+data[i].track_content+',数量:'+data[i].track_num+'</td><td>'+data[i].create_name+'</td></tr>';
}
content += '</table>';
layer.open({
title: '订单明细跟踪',
area: ['600px', '400px'],
content: content,
btn: [],
})
} else {
layer.alert(resp.errmsg || '网络异常');
}
},
error: function(err) {
console.log(err);
}
})
})
},
}
})
})(jQuery)
\ No newline at end of file
...@@ -387,7 +387,7 @@ ...@@ -387,7 +387,7 @@
$('.return_num').keyup(function() { $('.return_num').keyup(function() {
var removal_number = parseInt($(this).parents('tr').find('.removal_number').val()); // 出库数量 var removal_number = parseInt($(this).parents('tr').find('.removal_number').val()); // 出库数量
var single_pre_price = parseFloat($(this).parents('tr').find('.single_pre_price').val()); // 均摊单价 var single_pre_price = parseFloat($(this).parents('tr').find('.single_pre_price').val()); // 均摊单价
var pay_amount = $('.pay_amount').val(); var pay_amount = parseFloat($('.pay_amount').val());
var val = $(this).val(); // 退货数量 var val = $(this).val(); // 退货数量
if (val > removal_number) { if (val > removal_number) {
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
@include('orderlist.css') @include('orderlist.css')
@include('orderlist.js') @include('orderlist.js')
<script src="/js/orderamount.js"></script>
</head> </head>
<body class=""> <body class="">
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>订单管理后台 | 人工审单</title>
<script>document.domain="{{ Config::get('website.domain') }}";</script>
@include('detail.css')
@include('changeOrder.js')
</head>
<body class="">
<div id="wrapper">
<!-- layouts.navigation -->
@include('layouts.navigation')
<div id="page-wrapper" class="gray-bg">
<div class="row">
@include('changeOrder.content')
</div>
</div>
</div>
</body>
<div class="tabs-box adjusted_order" style="display: none;">
<div class="order-change-main">
<form id="adjustedOrderForm" class="form-horizontal table-responsive">
<input type="hidden" name="order_id" value="{{$order_info['order_id']}}">
<input type="hidden" name="sale_id" value="{{$order_info['sale_id']}}">
<input type="hidden" name="extra_fee" value="{{$order_temp_info['extra_fee']}}">
<input type="hidden" name="freight_fee" value="{{$order_temp_info['freight_fee']}}">
<input type="hidden" name="goods_amount" value="{{$order_temp_info['goods_amount']}}">
<input type="hidden" name="deposit_amount" value="{{$order_temp_info['deposit_amount']}}">
<input type="hidden" name="order_pay_type" value="{{$order_temp_info['order_pay_type']}}">
<input type="hidden" name="pay_time_limit" value="{{$order_temp_info['pay_time_limit']}}">
<input type="hidden" name="cancel_reason" value="{{isset($order_info['cancle_reason']) ? $order_info['cancle_reason'] : ''}}">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>型号</th>
<th>调整数量</th>
<th>调整单价</th>
</tr>
</thead>
<tbody>
@if (isset($order_temp_info['change_info']))
@foreach ($order_temp_info['change_info'] as $k => $v)
<tr>
<td>
<input type="hidden" name="change_info[{{$k}}][goods_name]" value="{{$v['goods_name']}}">
<p>{{$v['goods_name']}}</p>
</td>
<td>
<input type="hidden" name="change_info[{{$k}}][goods_number]" value="{{$v['goods_number']}}">
<p>{{$v['goods_number']}}</p>
</td>
<td>
<input type="hidden" name="change_info[{{$k}}][goods_price]" value="{{$v['goods_price']}}">
<p>{{$v['goods_price']}}</p>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
<hr>
<table class="table table-bordered table-hover">
<tr>
<th width="20%">订单类型:</th>
<td>
@if ($order_temp_info['order_pay_type'] == 1)
全款
@elseif ($order_temp_info['order_pay_type'] == 2)
预付款
@else
账期
@endif
</td>
</tr>
<tr>
<th>商品总额:</th>
<td>{{$order_temp_info['goods_amount']}}</td>
</tr>
<tr>
<th>优惠金额:</th>
<td>{{$order_price_info['discount_amount']}}</td>
</tr>
<tr>
<th>附加费:</th>
<td>{{$order_temp_info['extra_fee']}}</td>
</tr>
<tr>
<th>运费:</th>
<td>{{$order_temp_info['freight_fee']}}</td>
</tr>
<?php $order_amount_temp = $order_temp_info['goods_amount'] + $order_price_info['discount_amount'] + $order_temp_info['extra_fee'] + $order_temp_info['freight_fee']; ?>
<tr>
<th>订单总额:</th>
<td>{{$order_amount_temp}}</td>
</tr>
@if ($order_info['order_goods_type'] == 2)
<tr>
<th>支付优惠:</th>
<td>{{$order_price_info['pay_preferential'] ? $order_price_info['pay_preferential'] : 0}}</td>
</tr>
<tr>
<th>实际支付金额:</th>
<td>{{$order_amount_temp + $order_price_info['pay_preferential']}}</td>
</tr>
@endif
@if ($order_temp_info['order_pay_type'] == 2)
<tr>
<th>定金:</th>
<td>{{$order_temp_info['deposit_amount']}}</td>
</tr>
@endif
<tr>
<th>付款时间:</th>
<td>{{$order_temp_info['pay_time_limit'].'天'}}</td>
</tr>
</table>
</form>
</div>
</div>
<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>
<script src="/js/inspinia.min.js"></script>
<script src="/js/plugins/DatePicker/WdatePicker.js"></script>
<script src="/js/common.js"></script>
<script src="/js/change_order.js?v=<?= time() ?>"></script>
<script src="/js/goods.js?v=<?= time() ?>"></script>
<style>
#temp-save-info { display: none; }
#tempSaveForm { padding: 15px; }
</style>
<div id="temp-save-info">
<div class="order-change-main">
<form id="tempSaveForm" class="form-horizontal table-responsive">
@if ($order_temp_info['temp_save_info']['customer_cn'])
<table class="table table-bordered table-hover">
<tr class="caption">
<th colspan="4" style="text-align: center; background: #f9f9f9;">终端客户信息</th>
</tr>
<tr>
<th>客户名称(中文)</th>
<th>客户名称(英文)</th>
<th>客户类型</th>
<th>产品用途</th>
</tr>
<tr>
<td><?= $order_temp_info['temp_save_info']['customer_cn'] ?></td>
<td><?= $order_temp_info['temp_save_info']['customer_en'] ?></td>
<td><?= Config('params.end_user_type')[$order_temp_info['temp_save_info']['customer_type']] ?></td>
<td><?= $order_temp_info['temp_save_info']['product_use'] ?></td>
</tr>
</table>
@endif
<table class="table table-bordered table-hover">
<thead>
<tr>
<th width="40%">型号</th>
<th>调整数量</th>
<th>调整单价</th>
<th width="20%">状态</th>
</tr>
</thead>
<tbody>
@if (isset($order_temp_info['temp_save_info']['change_info']))
@foreach ($order_temp_info['temp_save_info']['change_info'] as $k => $v)
<tr>
<td>{{$v['goods_name']}}</td>
<td>{{$v['goods_number']}}</td>
<td>{{$v['goods_price']}}</td>
<td>
<?= $v['status'] == 1 ? '正常' : '<i style="color: red;">已取消</i>' ?>
@if (isset($v['is_add']))
<i style="color: green;">(新增)</i>
@endif
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
<hr>
<table class="table table-bordered table-hover">
<tr>
<th width="20%">订单类型:</th>
<td>
@if ($order_temp_info['temp_save_info']['order_pay_type'] == 1)
全款
@elseif ($order_temp_info['temp_save_info']['order_pay_type'] == 2)
预付款
@else
账期
@endif
</td>
</tr>
<tr>
<th>商品总额:</th>
<td>{{$order_temp_info['temp_save_info']['goods_amount']}}</td>
</tr>
<tr>
<th>优惠金额:</th>
<td>{{$order_price_info['discount_amount']}}</td>
</tr>
<tr>
<th>附加费:</th>
<td>{{$order_temp_info['temp_save_info']['extra_fee']}}</td>
</tr>
<tr>
<th>运费:</th>
<td>{{$order_temp_info['temp_save_info']['freight_fee']}}</td>
</tr>
<?php $order_amount_temp = $order_temp_info['temp_save_info']['goods_amount'] + $order_price_info['discount_amount'] + $order_temp_info['temp_save_info']['extra_fee'] + $order_temp_info['temp_save_info']['freight_fee']; ?>
<tr>
<th>订单总额:</th>
<td>{{$order_amount_temp}}</td>
</tr>
@if ($order_info['order_goods_type'] == 2)
<tr>
<th>支付优惠:</th>
<td>{{$order_price_info['pay_preferential'] ? $order_price_info['pay_preferential'] : 0}}</td>
</tr>
<tr>
<th>实际支付金额:</th>
<td>{{$order_amount_temp + $order_price_info['pay_preferential']}}</td>
</tr>
@endif
@if ($order_temp_info['temp_save_info']['order_pay_type'] == 2)
<tr>
<th>定金:</th>
<td>{{$order_temp_info['temp_save_info']['deposit_amount']}}</td>
</tr>
@endif
<tr>
<th>付款时间:</th>
<td>{{$order_temp_info['temp_save_info']['pay_time_limit'].'天'}}</td>
</tr>
<tr>
<th>客服备注:</th>
<td>{{ $order_temp_info['temp_save_info']['kefu_remark'] }}</td>
</tr>
</table>
</form>
</div>
</div>
<script>
var temp_save_info = '{!! json_encode($order_temp_info["temp_save_info"]) !!}';
temp_save_info = eval('('+temp_save_info+')');
console.log(temp_save_info)
</script>
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
{{ Autograph() }} {{ Autograph() }}
@include('orderlist.css') @include('detail.css')
@include('orderlist.js') @include('detail.js')
</head> </head>
<body class=""> <body class="">
......
<p style="margin-left: 5px;">取消订单</p>
<div class="tabs-box cancelPay-order">
<?php
switch($order_info['status']) {
case 2:
echo '<table class="table">
<tr>
<td width="10%">取消订单原因:</td>
<td>
<textarea name="" id="cancel-reason" class="form-control" placeholder="请输入取消原因"></textarea>
</td>
</tr>
<tr><td colspan="20"><a class="btn btn-primary submit">提交</a></td></tr>
</table>';
break;
case -1:
echo '已取消';
break;
}
?>
</div>
\ No newline at end of file
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
<input type="hidden" name="goods_amount" value="{{$order_price_info['goods_price']}}"> <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="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="cancel_reason" value="{{isset($order_info['cancle_reason']) ? $order_info['cancle_reason'] : ''}}">
<input type="hidden" name="user_mobile" value="{{$user_mobile}}">
<input type="hidden" name="check_failed" value=""> <input type="hidden" name="check_failed" value="">
<input type="hidden" name="check_failed_info" value=""> <input type="hidden" name="check_failed_info" value="">
<input type="hidden" name="change_pay_type" value=""> <input type="hidden" name="change_pay_type" value="">
......
<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">
<link href="/css/order.css" rel="stylesheet">
<link href="/css/detail.css" rel="stylesheet">
\ No newline at end of file
<p>操作记录</p>
<div class="tabs-box table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>操作时间</th>
<th>操作人</th>
<th>操作事件</th>
</tr>
</thead>
<tbody>
<?php foreach ($actionLog as $k=>$v) { ?>
<?php if ($k < 4) { ?>
<tr>
<td width="15%"><?= date('Y-m-d H:i:s', $v->create_time) ?></td>
<td width="10%"><?= App\Http\Controllers\getOperatorName($v->operator_id, $v->operator_type) ?></td>
<td><?= $v->event ?></td>
</tr>
<?php } else { ?>
<tr class="other-infos">
<td width="15%"><?= date('Y-m-d H:i:s', $v->create_time) ?></td>
<td width="10%"><?= App\Http\Controllers\getOperatorName($v->operator_id, $v->operator_type) ?></td>
<td><?= $v->event ?></td>
</tr>
<?php } ?>
<?php if ($k >= 4 && $k == count($actionLog)-1) { ?>
<tr>
<td colspan="3" class="text-center click-down"><i class="fa fa-angle-double-down">点击展开</i></td>
<td colspan="3" class="text-center click-up"><i class="fa fa-angle-double-up">点击收起</i></td>
</tr>
<?php } ?>
<?php } ?>
</tbody>
</table>
</div>
\ No newline at end of file
<div style="width: 100%; height: 40px;">
<h3 style="float: left; width: 100px;">收货信息</h3>
<?php
// <!-- 订单状态小于5 且 更新地址权限存在 显示按钮 -->
if (!$tags) {
if (in_array($order_info['status'], array(1, 2, 3, 4)) && in_array('update_address', $userPerms)) {
echo '<a href="/changeShipping/'.$order_info['order_id'].'" class="btn btn-success btn-sm changeBtn">更改收货地址</a>';
}
} elseif (isset($tags) && $tags == 'self') {
if (in_array($order_info['status'], array(1, 2, 4)) && in_array('self_order_update_address', $userPerms)) {
echo '<a href="/changeShipping/'.$order_info['order_id'].'?tags='.$tags.'" class="btn btn-success btn-sm changeBtn">更改收货地址</a>';
}
}
?>
</div>
<div class="table-responsive">
<table class="table table-bordered text-nowrap">
<tr>
<th width="15%">收货人</th>
<th width="18%">联系电话/手机</th>
<th width="15%">配送方式</th>
<?php if ($order_info['order_shipping_type'] == 2) { ?>
<th>自提地址</th>
<?php } else { ?>
<th>收货地址</th>
<?php } ?>
</tr>
<tr>
<td><?= $order_address_info['consignee'] ?></td>
<td><?= $order_address_info['mobile'] ?></td>
<?php if ($order_info['order_shipping_type'] == 2) { ?>
<td>客户自提</td>
<td><?= $order_address_info['address'] ?></td>
<?php } else { ?>
<td>快递送货</td>
<td>
<?= $order_address_info['province_val'] ?>&nbsp;&nbsp;<?= $order_address_info['city_val'] ?>&nbsp;&nbsp;<?= $order_address_info['district_val'] ?>&nbsp;&nbsp;<?= $order_address_info['address'] ?>
</td>
<?php } ?>
</tr>
</table>
</div>
<div style="width: 100%; height: 40px;">
<h3>基本资料</h3>
</div>
<table class="table table-bordered order-express">
<tr>
<!-- @if ($order_info['order_type_extend'])
<th>订单类型</th>
@endif
@if ($order_info['order_goods_type'] == 2)
<th>销售类型</th>
@endif
@if ($order_temp_info['business_type'])
<th>业务类型</th>
@endif
@if ($order_info['order_pay_type'] == 2)
<th>预付款</th>
<th>尾款</th>
@endif -->
<th width="5%">订单编号</th>
<th>订单状态</th>
<th>用户账号</th>
<th>支付方式</th>
<th>支付状态</th>
<th>支付类型</th>
<th>发货状态</th>
<th>物流单号</th>
<th>京东订单编号</th>
<th width="8%">自动确认收货时间</th>
</tr>
<tr>
<td>{{ $order_info['order_sn'] }}</td>
<td>{{ $order_temp_info['is_manager_audit'] ? '待主管审核' : Config('params.order_status')[$order_info['status']] }}</td>
<td>{{ $user_info['mobile'] ? $user_info['mobile'] : $user_info['email'] }}</td>
<td>
<?php
if ($order_info['order_pay_type'] == 2) { // 预付款
if (isset($order_pay_log[1]) && $order_pay_log[1]['pay_name'] != '') {
echo $order_pay_log[1]['pay_name'];
} else if (!empty($order_pay_log) && $order_pay_log[0]['pay_name'] != '') {
echo $order_pay_log[0]['pay_name'];
} else {
echo '--';
}
} else {
if (!empty($order_pay_log) && $order_pay_log[0]['pay_name'] != '') {
echo $order_pay_log[0]['pay_name'];
} else {
echo '--';
}
}
?>
</td>
<td>
<?php
if ($order_info['order_pay_type'] == 2) {
if (isset($order_pay_log[1]) && $order_pay_log[1]['is_paid'] != '') {
echo $order_pay_log[1]['is_paid'] == 1 ? '尾款已支付' : '未支付';
} else if (!empty($order_pay_log) && $order_pay_log[0]['is_paid'] != '') {
echo $order_pay_log[0]['is_paid'] == 1 ? '首款已支付' : '未支付';
} else {
echo '--';
}
} else {
if (!empty($order_pay_log) && $order_pay_log[0]['is_paid'] != '') {
echo $order_pay_log[0]['is_paid'] == 1 ? '已支付' : '未支付';
} else {
echo '--';
}
}
?>
</td>
<td>
<?php
if ($order_info['order_pay_type'] == 1) {
if (!empty($order_pay_log)) {
echo '全款';
} else {
echo '--';
}
} else if ($order_info['order_pay_type'] == 2) {
if (isset($order_pay_log[1])) {
echo '尾款';
} else if (!empty($order_pay_log)) {
echo '预付款';
} else {
echo '--';
}
} else if ($order_info['order_pay_type'] == 3) {
if (!empty($order_pay_log)) {
echo '账期';
} else {
echo '--';
}
}
?>
</td>
<td>
<?php
if ($order_shipping_info) {
switch ($order_shipping_info['status']) {
case -1: echo '未配送'; break;
case 1: echo '配送中'; break;
case 2: echo '已签'; break;
default: echo '未知'; break;
}
} else {
echo '未发货';
}
?>
</td>
<td>{{ $order_shipping_info ? $order_shipping_info['shipping_no'] : '无' }}</td>
<td>{{ $order_temp_info['jd_order_id'] }}</td>
<td>7天</td>
<!--
@if ($order_info['order_type_extend'])
<td>
<?php
switch ($order_info['order_type_extend']) {
case 1: echo '团购订单'; break;
}
?>
</td>
@endif
@if ($order_info['order_goods_type'] == 2)
<td>{{ $order_info['sale_type'] == 1 ? '现卖' : '预售' }}</td>
@endif
@if ($order_temp_info['business_type'])
<td>{{ Config('params.business_type')[$order_temp_info['business_type']] }}</td>
@endif
@if ($order_info['order_pay_type'] == 2)
<td>{{$currency.$order_info['advance_amount']}}</td>
<td>
{{$currency.number_format($order_info['order_amount'] - $order_info['advance_amount'], 2, '.', '')}}
</td>
@endif
<td>{{ $order_info['pay_time'] ? date('Y-m-d H:i:s', $order_info['pay_time']) : '' }}</td> -->
</tr>
</table>
\ No newline at end of file
<p>ERP支付记录</p>
<div class="tabs-box table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>创建时间</th>
<th>收款单号</th>
<th>收款金额</th>
<th>收款时间</th>
<th>支付状态</th>
<th>取消支付时间</th>
</tr>
</thead>
<tbody>
<?php foreach ($erpPayLog as $k=>$v) { ?>
<?php if ($k < 4) { ?>
<tr>
<td width="15%"><?= date('Y-m-d H:i:s', $v->create_time) ?></td>
<td width="10%"><?= $v->receipt_sn ?></td>
<td width="10%"><?= $v->receipt_amount ?></td>
<td width="10%"><?= date('Y-m-d H:i:s', $v->receipt_time) ?></td>
<td><?= $v->status == 1 ? '已支付' : '已取消' ?></td>
<td><?= $v->cancel_time ? date('Y-m-d H:i:s', $v->cancel_time) : '' ?></td>
</tr>
<?php } else { ?>
<tr class="other-infos">
<td width="15%"><?= date('Y-m-d H:i:s', $v->create_time) ?></td>
<td width="10%"><?= $v->receipt_sn ?></td>
<td width="10%"><?= $v->receipt_amount ?></td>
<td width="10%"><?= date('Y-m-d H:i:s', $v->receipt_time) ?></td>
<td><?= $v->status == 1 ? '已支付' : '已取消' ?></td>
<td><?= $v->cancel_time ? date('Y-m-d H:i:s', $v->cancel_time) : '' ?></td>
</tr>
<?php } ?>
<?php if ($k >= 4 && $k == count($erpPayLog)-1) { ?>
<tr>
<td colspan="6" class="text-center click-down"><i class="fa fa-angle-double-down">点击展开</i></td>
<td colspan="6" class="text-center click-up"><i class="fa fa-angle-double-up">点击收起</i></td>
</tr>
<?php } ?>
<?php } ?>
</tbody>
</table>
</div>
\ No newline at end of file
<div style="width: 100%; height: 40px;">
<h3 style="float: left; width: 100px;">发票收货信息</h3>
</div>
<div class="table-responsive">
<table class="table table-bordered text-nowrap">
<tr>
<th width="15%">收票人</th>
<th width="18%">联系电话/手机</th>
<th>收票地址</th>
</tr>
<tr>
<td><?= $order_invoice_address_info['consignee'] ?></td>
<td><?= $order_invoice_address_info['mobile'] ?></td>
<td>
<?= $order_invoice_address_info['province_val'] ?>&nbsp;&nbsp;<?= $order_invoice_address_info['city_val'] ?>&nbsp;&nbsp;<?= $order_invoice_address_info['district_val'] ?>&nbsp;&nbsp;<?= $order_invoice_address_info['address'] ?>
</td>
</tr>
</table>
</div>
\ No newline at end of file
<p>物流信息</p>
<div class="tabs-box table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th width="15%">物流时间</th>
<th>物流信息</th>
</tr>
</thead>
<tbody>
<?php if (!empty($order_shipping_info['info'])) { ?>
<?php $shippings_info = json_decode($order_shipping_info['info'], true); ?>
<?php foreach ($shippings_info as $k=>$v) { ?>
<?php if ($k < 4) { ?>
<tr>
<td><?= $v['AcceptTime'] ?></td>
<td><?= $v['AcceptStation'] ?></td>
</tr>
<?php } else { ?>
<tr class="other-infos">
<td><?= $v['AcceptTime'] ?></td>
<td><?= $v['AcceptStation'] ?></td>
</tr>
<?php } ?>
<?php if ($k >= 4 && $k == count($shippings_info)-1) { ?>
<tr>
<td colspan="2" class="text-center click-down"><i class="fa fa-angle-double-down">点击展开</i></td>
<td colspan="2" class="text-center click-up"><i class="fa fa-angle-double-up">点击收起</i></td>
</tr>
<?php } ?>
<?php } ?>
<?php } else { ?>
<?php foreach ($order_shipping_inside as $k=>$v) { ?>
<?php if ($k < 4) { ?>
<tr>
<td><?= date('Y-m-d H:i:s', $v['create_time']) ?></td>
<td><?= $v['info'] ?></td>
</tr>
<?php } else { ?>
<tr class="other-infos">
<td><?= date('Y-m-d H:i:s', $v['create_time']) ?></td>
<td><?= $v['info'] ?></td>
</tr>
<?php } ?>
<?php if ($k >= 4 && $k == count($order_shipping_inside)-1) { ?>
<tr>
<td colspan="2" class="text-center click-down"><i class="fa fa-angle-double-down">点击展开</i></td>
<td colspan="2" class="text-center click-up"><i class="fa fa-angle-double-up">点击收起</i></td>
</tr>
<?php } ?>
<?php } ?>
<?php } ?>
</tbody>
</table>
</div>
\ No newline at end of file
<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>
<script src="/js/inspinia.min.js"></script>
<script src="/js/plugins/DatePicker/WdatePicker.js"></script>
<script src="/js/common.js"></script>
<script src="/js/md5.js"></script>
<script src="/js/layui/layui.js"></script>
<script src="/js/details.js?v=<?= time() ?>"></script>
<script src="/js/order_audit.js"></script>
<script src="/js/order_track.js"></script>
<script src="/js/order_cancel.js"></script>
<script src="/js/order_send_email.js"></script>
<script src="/js/refund.js?v=<?= time() ?>"></script>
<p style="margin-left: 5px;">订单发货</p>
<div class="tabs-box send">
<table class="table">
<input type="hidden" id="order_id" value="{{$order_info['order_id']}}">
</table>
<table class="table">
<?php
$html = '';
if ($order_info['order_shipping_type'] == 1) {
switch ($order_shipping_info['status']) {
case 1:
echo '<tr>配送中,物流单号为'.$order_shipping_info['shipping_no'].',配送方式为&nbsp;'.$ship_type[$order_shipping_info['shipping_id']].'</tr>';
break;
case 2:
echo '<tr>已签,订单完成</tr>';
break;
default:
// if (count($order_items_info) > 0) {
// foreach ($order_items_info as $k => $item) {
// $html .= '<tr>
// <td>
// <label>型号名:</label>
// <span>'.$item['goods_name'].'</span>
// </td>';
$html .= '<tr>
<td>
<label>选择快递:</label>
<select class="batch-shipping-code">';
foreach ($shippings as $v) {
$html .= '<option value="'.$v->shipping_id.'">'.$v->shipping_name.'</option>';
}
$html .= '</select>
</td>
<td>
<label>填写单号:</label>
<input type="text" class="batch-shipping-no" value="'.$order_shipping_info['shipping_no'].'" />
</td>
<td><a class="btn btn-default batch-send">确认发货</a></td>
</tr>';
// }
// }
echo $html;
break;
}
} else {
echo '<tr>
<td>线下自提</td>
</tr>';
}
?>
</table>
</div>
\ No newline at end of file
...@@ -289,17 +289,21 @@ ...@@ -289,17 +289,21 @@
</td> </td>
<td class="show-list"> <td class="show-list">
<?php <?php
switch ($v['status']) { if ($order_extend->is_manager_audit) {
case -2: echo '<span class="list-text-no-check"><b>审核未通过</b></span>';break; echo '<span class="list-text-checking"><b>待主管审核</b></span>';
case -1: echo '<span class="list-text-cancel"><b>已取消</b></span>';break; } else {
case 1: echo '<span class="list-text-checking"><b>待审核</b></span>';break; switch ($v['status']) {
case 2: echo '<span class="list-text-pay"><b>待付款</b></span>';break; case -2: echo '<span class="list-text-no-check"><b>审核未通过</b></span>';break;
case 3: echo '<span class="list-text-last-pay"><b>待付尾款</b></span>';break; case -1: echo '<span class="list-text-cancel"><b>已取消</b></span>';break;
case 4: echo '<span class="list-text-send"><b>待发货</b></span>';break; case 1: echo '<span class="list-text-checking"><b>待审核</b></span>';break;
case 7: echo '<span class="list-text-send"><b>部分发货</b></span>';break; case 2: echo '<span class="list-text-pay"><b>待付款</b></span>';break;
case 8: echo '<span class="list-text-confirm"><b>待收货</b></span>';break; case 3: echo '<span class="list-text-last-pay"><b>待付尾款</b></span>';break;
case 10: echo '<span class="list-text-success"><b>交易成功</b></span>';break; case 4: echo '<span class="list-text-send"><b>待发货</b></span>';break;
} case 7: echo '<span class="list-text-send"><b>部分发货</b></span>';break;
case 8: echo '<span class="list-text-confirm"><b>待收货</b></span>';break;
case 10: echo '<span class="list-text-success"><b>交易成功</b></span>';break;
}
}
?> ?>
</td> </td>
<td class="show-list"> {{ Config('params.order_pay_type')[$v['order_pay_type']] }} </td> <td class="show-list"> {{ Config('params.order_pay_type')[$v['order_pay_type']] }} </td>
...@@ -325,12 +329,25 @@ ...@@ -325,12 +329,25 @@
<td class="show-list">{{$username != 'vpadmin@ichunt.com' ? date('Y-m-d H:i:s', $v['create_time']) : date('Y-m-d', $v['create_time'])}}</td> <td class="show-list">{{$username != 'vpadmin@ichunt.com' ? date('Y-m-d H:i:s', $v['create_time']) : date('Y-m-d', $v['create_time'])}}</td>
<td> <td>
<div class="btn-group btn-group-xs" style="width: 240px;"> <div class="btn-group btn-group-xs" style="width: 260px;">
<a class="btn btn-primary" href="{{URL('details', ['order_id'=>$v['order_id']])}}" target="_blank">详情</a> @if (in_array('check_order', $userPerms) && $v['sale_id'])
@if ($v['status'] == 1)
@if (in_array('check_order', $userPerms) && in_array($v['status'], [1, 2, 3])) <a class="btn btn-success" href="{{URL('change', ['order_id'=>$v['order_id']])}}" target="_blank">人工审单</a>
<a class="btn btn-success" href="{{URL('change', ['order_id'=>$v['order_id']])}}" target="_blank">人工审单</a> @elseif ($v['status'] == 2 && in_array($role, [1, 2]))
<a class="btn btn-success re-audit" data-id="{{$v['order_id']}}">反审</a>
@endif
@endif
<!-- 主管审核 -->
@if (isset($order_extend->is_manager_audit) && in_array($role, [1, 2]) && $v['status'] == 1)
<a class="btn btn-danger manager-audit" data-id="{{$v['order_id']}}">主管审核</a>
@endif
@if (!empty($order_extend->erp_sn))
<a class="btn btn-primary send_mail" data-id="{{ $v['order_id'] }}">发送邮件</a>
@endif @endif
<a class="btn btn-primary" href="{{URL('details', ['order_id'=>$v['order_id']])}}" target="_blank">详情</a>
<!-- 管理员和经理或有推送权限显示 --> <!-- 管理员和经理或有推送权限显示 -->
@if ((in_array($role, [1, 2]) || in_array('send_salesman', $userPerms))) @if ((in_array($role, [1, 2]) || in_array('send_salesman', $userPerms)))
...@@ -411,6 +428,7 @@ ...@@ -411,6 +428,7 @@
var erp_order_id = "{{$condition['erp_order_id']}}"; var erp_order_id = "{{$condition['erp_order_id']}}";
var is_new_order = "{{$condition['is_new_order']}}"; var is_new_order = "{{$condition['is_new_order']}}";
var manager = "{{$role}}"; var manager = "{{$role}}";
var cc_sales = eval('{!! isset($cc_sales) ? json_encode($cc_sales) : '' !!}'); // 抄送人集合
if (test_order) { if (test_order) {
$('input[name=test_order]').attr('checked', true); $('input[name=test_order]').attr('checked', true);
...@@ -436,6 +454,10 @@ ...@@ -436,6 +454,10 @@
$('#is_new_order').selectpicker('val', is_new_order); $('#is_new_order').selectpicker('val', is_new_order);
$.lie.order.index(); $.lie.order.index();
$.lie.track.orderTrack();
$.lie.cancel.cancelorder();
$.lie.audit.index();
$.lie.send_mail.index();
// 展开菜单 // 展开菜单
$('#side-menu').children('li').eq(1).addClass('active'); $('#side-menu').children('li').eq(1).addClass('active');
......
...@@ -6,13 +6,14 @@ ...@@ -6,13 +6,14 @@
<script src="/js/plugins/slimscroll/jquery.slimscroll.min.js"></script> <script src="/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/js/plugins/metisMenu/jquery.metisMenu.js"></script> <script src="/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/js/inspinia.min.js"></script> <script src="/js/inspinia.min.js"></script>
<script src="/js/plugins/DatePicker/WdatePicker.js"></script>
<script src="/js/common.js"></script> <script src="/js/common.js"></script>
<script src="/js/md5.js"></script>
<script src="/js/layui/layui.js"></script> <script src="/js/layui/layui.js"></script>
<script src="/js/order.js?v=<?= time() ?>"></script> <script src="/js/list.js?v=<?= time() ?>"></script>
<script src="/js/orderamount.js"></script> <script src="/js/order_audit.js"></script>
<script src="/js/plugins/DatePicker/WdatePicker.js"></script> <script src="/js/order_track.js"></script>
<script src="/js/order_cancel.js"></script>
<script src="/js/order_send_email.js"></script>
<script src="/js/refund.js?v=<?= time() ?>"></script> <script src="/js/refund.js?v=<?= time() ?>"></script>
<script src="/js/goods.js?v=<?= time() ?>"></script>
...@@ -143,8 +143,8 @@ ...@@ -143,8 +143,8 @@
</div> </div>
</div> </div>
<!-- 管理员、经理、自营客服主管及助理审核 && 待审核状态 --> <!-- 管理员、经理、自营查看 && 待审核状态 -->
@if (in_array($role, [1, 2, 10, 11]) && $return['status'] == 1) @if (in_array($role, [1, 2, 5]) && $return['status'] == 1)
<div class="text-center" style="margin-bottom: 10px;"> <div class="text-center" style="margin-bottom: 10px;">
<button class="btn btn-info return-check" style="margin-right: 10px;" data-type="2" data-id="{{ $return['return_id'] }}">审核通过</button> <button class="btn btn-info return-check" style="margin-right: 10px;" data-type="2" data-id="{{ $return['return_id'] }}">审核通过</button>
<button class="btn btn-danger return-check" data-type="-2" data-id="{{ $return['return_id'] }}">驳回</button> <button class="btn btn-danger return-check" data-type="-2" data-id="{{ $return['return_id'] }}">驳回</button>
......
...@@ -376,7 +376,7 @@ ...@@ -376,7 +376,7 @@
<div class="btn-group btn-group-xs" style="width: 240px;"> <div class="btn-group btn-group-xs" style="width: 240px;">
<a class="btn btn-primary" href="/details/{{$v['order_id']}}?tags=self" target="_blank">详情</a> <a class="btn btn-primary" href="/details/{{$v['order_id']}}?tags=self" target="_blank">详情</a>
@if (in_array('self_check_order', $userPerms) && in_array($v['status'], [1, 2])) @if (in_array('self_check_order', $userPerms) && in_array($v['status'], [1, 2]) && $v['sale_id'])
<a class="btn btn-success" href="/change/{{$v['order_id']}}?tags=self" target="_blank">人工审单</a> <a class="btn btn-success" href="/change/{{$v['order_id']}}?tags=self" target="_blank">人工审单</a>
@endif @endif
...@@ -479,4 +479,6 @@ ...@@ -479,4 +479,6 @@
$('.business_type').selectpicker('val', business_type.split(',')).trigger("change"); $('.business_type').selectpicker('val', business_type.split(',')).trigger("change");
$.lie.order.index(); $.lie.order.index();
$.lie.track.orderTrack();
$.lie.cancel.cancelorder();
</script> </script>
\ No newline at end of file
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