Commit da4cbb40 by 朱继来

自营订单

parent a87b496c
......@@ -49,7 +49,9 @@
return 2;
} else if ($department->name == '交易员') {
return 3;
} else {
} else if ($department->name == '客服') {
return 4;
}else {
return 0;
}
}
......
......@@ -132,3 +132,17 @@
return $response ? $response : curl_error($ch);
}
/**
* 接口服务时加密方式
* @param [type] $data [description]
* @param [type] $timestamp [description]
* @param [type] $key [description]
* @return [type] [description]
*/
function service_token($data, $timestamp, $key = null)
{
$key = is_null($key) ? Config('website.SERVICE_KEY') : $key;
$token = md5($data.$timestamp.$key);
return $token;
}
......@@ -60,6 +60,8 @@ Route::group(['middleware' => 'web'], function () {
Route::get('/amount', 'OrderCountController@amount');
Route::get('/self_order', 'OrderController@selfOrder');
Route::post('/ajaxSelfCancel', 'OrderController@ajaxSelfCancel');
Route::post('/ajaxSelfExpress', 'OrderController@ajaxSelfExpress');
});
......
<?php
return [
// 菜单权限
'订单管理' => [
'平台订单' => ['orderlist_check', 'export', 'check_order', 'cancel_order', 'check_account', 'order_send', 'send_invoice', 'update_address', 'update_invoice', 'check_test_order', 'check_offline_order', 'download_contract'],
'联营订单' => [
'平台订单' => ['orderlist_check', 'export', 'cancel_order', 'check_account', 'order_send', 'update_address', 'update_invoice', 'check_test_order', 'check_order', 'download_contract',],
'ERP订单' => ['erp_order_check'],
],
'自营订单' => [
'订单列表' => ['self_order_check', 'self_order_export', 'self_order_cancel', 'self_order_express', 'self_order_invoice_express', 'self_order_update_address', 'self_order_update_invoice', 'self_check_test_order', 'self_order_download_contract'],
'快递配置' => ['self_order_express_set'],
],
'自营订单' => ['self_order_check'],
'订单统计' => [
'联营订单统计' => ['order_count_check'],
'订单统计' => ['ordercount_check'],
'自营订单统计' => ['self_order_count_check'],
],
];
\ No newline at end of file
......@@ -23,4 +23,10 @@ return [
// 竞调账户配置显示时间
'vp_time_set' => '2018-05-01',
// 基石服务地址
'SERVICE_DOMAIN' => 'http://192.168.1.100',
//中间服务秘钥
'SERVICE_KEY' => 'j9q##VRhaXBEtznIEeDiR@1Hvy0sW3wp',
];
+(function($){
$.lie = $.lie || {version: "v1.0.0"};
$.extend($.lie, {
self:{
index:function(){
$.lie.droplist($('.droplist'));
$('.search_self_order').click(function(){
var order_type = $('#order_type').data('default'),
order_contain = $('input[name=order_contain]').val(),
time_start = $('input[name="time_start"]').val(),
time_end = $('input[name="time_end"]').val(),
order_status = $('#order_status').data('default'),
order_send = $('#order_send').data('default'),
order_source_pf = $('#order_source_pf').data('default'),
order_payment_mode = $('#order_payment_mode').data('default'),
order_invoice_status = $('#order_invoice_status').data('default'),
order_source_adtag = $('input[name="order_source_adtag"]').val(),
test_order = $('input[name=test_order]'),
erp_order_id = $('#erp_order_id').data('default'),
listUrl = '/self_order';
listUrl += '?order_type=' + order_type;
if (order_contain) {
listUrl += '&order_contain=' + order_contain;
}
if(time_start){
time_start = Date.parse(time_start) / 1000;
listUrl += '&time_start='+time_start;
}
if(time_end){
time_end = Date.parse(time_end) / 1000 + (24*60*60-1);
listUrl += '&time_end='+time_end;
}
if (order_status) {
listUrl += '&order_status=' + order_status;
}
if (order_send) {
listUrl += '&order_send=' + order_send;
}
if (order_source_pf) {
listUrl += '&order_source_pf=' + order_source_pf;
}
if (order_payment_mode) {
listUrl += '&order_payment_mode=' + order_payment_mode;
}
if (order_invoice_status) {
listUrl += '&order_invoice_status=' + order_invoice_status;
}
if (order_source_adtag) {
listUrl += '&order_source_adtag=' + order_source_adtag;
}
if (erp_order_id) {
listUrl += '&erp_order_id=' + erp_order_id;
}
if (test_order.is(':checked')) {
listUrl += '&test_order=' + 1;
}
if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !order_invoice_status && !order_send && !order_source_pf && !order_source_adtag && !erp_order_id && !test_order.is(':checked')) {
listUrl = '/self_order';
}
location.href = listUrl;
})
// 导出订单
$('.self_export').click(function() {
var order_type = $('#order_type').data('default'),
order_contain = $('input[name=order_contain]').val(),
time_start = $('input[name="time_start"]').val(),
time_end = $('input[name="time_end"]').val(),
order_status = $('#order_status').data('default'),
order_send = $('#order_send').data('default'),
order_source_pf = $('#order_source_pf').data('default'),
order_payment_mode = $('#order_payment_mode').data('default'),
order_invoice_status = $('#order_invoice_status').data('default'),
order_source_adtag = $('input[name="order_source_adtag"]').val(),
test_order = $('input[name=test_order]'),
erp_order_id = $('#erp_order_id').data('default');
if (test_order.length) {
if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !order_invoice_status && !order_send && !order_source_pf && !order_source_adtag && !erp_order_id && !test_order.is(':checked')) {
layer.msg('请选择筛选条件,再导出!');
return false;
}
} else {
if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !order_invoice_status && !order_send && !order_source_pf && !order_source_adtag && !erp_order_id) {
layer.msg('请选择筛选条件,再导出!');
return false;
}
}
if(time_start){
time_start = Date.parse(time_start) / 1000;
}
if(time_end){
time_end = Date.parse(time_end) / 1000 + (24*60*60-1);
}
if (test_order.is(':checked')) {
test_order = 1;
} else {
test_order = '';
}
location.href = '/export?order_type='+order_type+'&order_contain='+order_contain+'&time_start='+time_start+'&time_end='+time_end+'&order_payment_mode='+order_payment_mode+'&order_status='+order_status+'&order_invoice_status='+order_invoice_status+'&order_send='+order_send+'&order_source_pf='+order_source_pf+'&order_source_adtag='+order_source_adtag+'&erp_order_id='+erp_order_id+'&test_order='+test_order+'&order_goods_type='+2;
})
// 选择查看测试订单
$('input[name=test_order]').click(function(){
if ($(this).is(':checked')) {
$(this).val(1);
} else {
$(this).val('');
}
})
// 切换类型时,清空输入框内容
$('.dropdown-menu>li').click(function(){
var val = $(this).data('val'); // 当前值
var def = $(this).parents('.droplist').data('default'); // 默认值
if (val != def) {
if ($(this).parents('.droplist').attr('name') == 'order_type') {
$('input[name=order_contain]').val(''); // 清空
}
$(this).parents('.droplist').data('default', val); // 赋值
}
})
// 展示列表下的内容
$('.show-list').click(function(){
var nextTr = $(this).parent('tr').next('.show-other-content');
if (nextTr.css('display') == 'none') {
$(this).parent('tr').siblings('.show-other-content').hide();
nextTr.show();
} else {
nextTr.hide();
}
})
}
}
});
})(jQuery)
\ No newline at end of file
......@@ -7,8 +7,8 @@
<title>订单管理后台 | 订单列表</title>
<script>document.domain="{{ Config::get('website.domain') }}";</script>
@include('orderlist.css')
@include('orderlist.js')
@include('selfOrder.css')
@include('selfOrder.js')
</head>
<body class="">
......
<link href="/css/bootstrap.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
<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="/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/common.js"></script>
<script src="/js/self_order.js"></script>
<script src="/js/orderamount.js"></script>
<script src="/js/plugins/DatePicker/WdatePicker.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