Commit c330c75b by 朱继来

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

parents 230a309e fa4f226b
......@@ -215,6 +215,36 @@ function getGoodsName($goods_id)
return $goods_info['goods_name'];
}
// 获取订单来源
function getOrderSource($order_id)
{
$order = DB::connection('order')->table('lie_order_extend')->where('order_id', $order_id)->select('order_type')->first();
if ($order) {
switch ($order->order_type) {
case 1:
case 2:
case 3:
$source = '后台';
break;
case 0:
$order_source = DB::connection('order')->table('lie_order')->where('order_id', $order_id)->select('order_source')->first();
if (preg_match('/pf=1/', $order_source->order_source)) {
$source = 'PC端';
} else if (preg_match('/pf=2/', $order_source->order_source)) {
$source = '移动端';
} else {
$source = '未知';
}
}
return $source;
}
return false;
}
Class OrderController extends Controller
{
// 首页
......@@ -885,6 +915,10 @@ Class OrderController extends Controller
$data['shippings'] = $shippingInfo;
}
$extend = DB::connection('order')->table('lie_order_extend')->where(['order_id' => $id, 'order_type' => 3])->first();
$data['extend'] = $extend ? $extend : '';
}
return view($view_id, $data);
......
......@@ -78,6 +78,27 @@ Route::group(['middleware' => 'web'], function () {
Route::post('/ajaxInputCancelReason', 'OrderController@ajaxInputCancelReason');
Route::get('/add_order', 'AddOrderController@addOrder');
Route::post('/ajax/getUserInfo', 'AddOrderController@getUserInfo');
Route::post('/ajax/selectAddr', 'AddOrderController@selectAddr');
Route::post('/ajax/selectInv', 'AddOrderController@selectInv');
Route::post('/ajax/selectInvType', 'AddOrderController@selectInvType');
Route::post('/ajax/getCoupon', 'AddOrderController@getCoupon');
Route::get('/add_online', 'AddOrderController@addOnline');
Route::post('/ajax/getExpressFee', 'AddOrderController@getExpressFee');
Route::get('/add_offline', 'AddOrderController@addOffline');
Route::post('/ajax/getSku', 'AddOrderController@getSku');
Route::post('/ajax/addCart', 'AddOrderController@addCart');
Route::post('/ajax/cartList', 'AddOrderController@cartList');
Route::post('/ajax/changeNum', 'AddOrderController@changeNum');
Route::post('/ajax/deleteGoods', 'AddOrderController@deleteGoods');
Route::post('/ajax/create', 'AddOrderController@create');
Route::get('/addorder/success', 'AddOrderController@success');
Route::post('/ajax/selfCheck', 'AddOrderController@selfCheck');
});
// 不需要登陆态
......
......@@ -5,12 +5,18 @@
'平台订单' => ['orderlist_check', 'export', 'cancel_order', 'check_account', 'order_send', 'update_address', 'update_invoice', 'check_test_order', 'check_order', 'download_contract', 'send_salesman'],
'ERP订单' => ['erp_order_check'],
'线上用户下单' => ['add_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_check'],
'线上用户下单' => ['add_online_check'],
'内部采购下单' => ['add_offline_check', 'add_offline_audit'],
],
'订单统计' => [
......
......@@ -41,4 +41,27 @@ return [
// www站点
'main_url' => 'https://www.liexin.com/',
// 新增自营线下订单内部账号
'internal-account' => '15011111111',
// 新增用户入口
'add-user-url' => 'http://member.liexin.net/add',
// 编辑用户入口
'check-user-url' => 'http://member.liexin.net/list',
// 查询SKUID接口
// 'search-skuid' => 'http://footstone.liexin.net/webapi/sku_list',
'search-skuid' => 'http://www.liexin.com/v3/sku/list',
// 新增SKU入口
'add-sku-url' => 'http://footstone.liexin.net/manage/addsku',
// 查询联营SKU入口
'search-sku-url-1' => 'http://footstone.liexin.net/manage/skulist',
// 查询自营SKU入口
'search-sku-url-2' => 'http://footstone.liexin.net/manage/GoodsList',
// 新增自营线上订单付款地址
'pay_online_url' => 'http://www.liexin.com/v3/pay/online?id=',
];
......@@ -99,3 +99,83 @@ li {
resize: none;
}
/*新增订单*/
.user-info, .address-content, .invoice-content, .order-info {
display: none;
}
.title-tips {
font-size: 12px;
color: #ff9900;
}
.clear {
clear:both;
height: 0;
line-height: 0;
font-size: 0;
}
.sku-info {
width: 100%;
height: auto;
min-height: 100px;
margin-top: 20px;
display: none;
}
.sku-info-left {
float: left;
width: 70%;
}
.sku-info-right {
float: right;
width: 30%;
}
.sku-info-right .table > tbody > tr > th, .sku-info-right .table > tbody > tr > td {
line-height: 0.5;
}
.shop-lists{
margin-top: 10px;
display: none;
}
.shop-lists input {
width: 100px;
}
.amount-section{
margin-top: 40px;
text-align: right;
display: none;
}
/*提交订单成功页面*/
.section-1, .section-3{
text-align: center;
margin: 20px;
}
.section-1 img{
margin-bottom: 20px;
}
.section-2 {
width: 50%;
height: 100px;
border: 1px solid #ccc;
margin: 0 25%;
padding: 25px;
background: #f0f0f0;
}
.section-2 p {
margin-left: 33%;
}
.con-title {
float: left;
width: 100px;
}
.con-title span {
float: right;
}
.con-val {
float: left;
}
......@@ -1491,6 +1491,58 @@
});
})
// 自营审单
$('.self-check').click(function(){
var order_id = $(this).data('id');
layer.open({
title: '审核自营线下订单',
content: '确定审核通过吗?',
btn:['通过', '不通过'],
yes: function(index, layero){
$.ajax({
url: '/ajax/selfCheck',
type: 'post',
data: {order_id: order_id, status: 4},
dataType:'json',
success: function(resp) {
if(resp.errcode === 0){
layer.msg(resp.errmsg || '操作成功');
setTimeout(function(){
location.reload();
}, 1000);
} else {
layer.alert(resp.errmsg || '网络异常');
}
},
error: function(err) {
console.log(err)
}
})
},
btn2: function(index, layero){ // 不通过--取消订单
$.ajax({
url: '/ajax/selfCheck',
type: 'post',
data: {order_id: order_id, status: -1},
dataType:'json',
success: function(resp) {
if(resp.errcode === 0){
layer.msg(resp.errmsg || '操作成功');
setTimeout(function(){
location.reload();
}, 1000);
} else {
layer.alert(resp.errmsg || '网络异常');
}
},
error: function(err) {
console.log(err)
}
})
}
});
})
},
}
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>订单管理后台 | {{ $title }}</title>
<script>document.domain="{{ Config::get('website.domain') }}";</script>
@include('addOffline.css')
@include('addOffline.js')
</head>
<body class="body-small" style="min-width:1024px;">
<div id="wrapper">
<!-- layouts.navigation -->
@include('layouts.navigation')
@include('addOffline.content')
</div>
</body>
<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/add_order.js"></script>
<script src="/js/plugins/DatePicker/WdatePicker.js"></script>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>订单管理后台 | {{ $title }}</title>
<script>document.domain="{{ Config::get('website.domain') }}";</script>
@include('addOffline.css')
@include('addOffline.js')
</head>
<body class="body-small" style="min-width:1024px;">
<div id="wrapper">
<!-- layouts.navigation -->
@include('layouts.navigation')
@include('addOnline.content')
</div>
</body>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>订单管理后台 | {{ $title }}</title>
<script>document.domain="{{ Config::get('website.domain') }}";</script>
@include('addOffline.css')
@include('addOffline.js')
</head>
<body class="body-small" style="min-width:1024px;">
<div id="wrapper">
<!-- layouts.navigation -->
@include('layouts.navigation')
@include('addOrder.content')
</div>
</body>
......@@ -245,7 +245,7 @@
@if($order_info['status'] < 10 && $order_invoice_info['invoice_status'] < 2 && in_array('update_invoice', $userPerms))
<a href="/changeInvoice/{{$order_info['order_id']}}" class="btn btn-success btn-sm changeBtn">更改发票</a>
@endif
@elseif (isset($_REQUEST['tags']) && $_REQUEST['tags'] == 'self')
@elseif (isset($_REQUEST['tags']) && $_REQUEST['tags'] == 'self' && !$extend)
@if($order_info['status'] < 10 && $order_invoice_info['invoice_status'] < 2 && in_array('self_order_update_invoice', $userPerms))
<a href="/changeInvoice/{{$order_info['order_id']}}?tags={{$_REQUEST['tags']}}" class="btn btn-success btn-sm changeBtn">更改发票</a>
@endif
......@@ -434,7 +434,6 @@
</table>
</div>
<div class="tabs-box order-total">
<div>
<table>
......@@ -554,7 +553,7 @@
@endif
<!-- 预付款 管理员完成首款对账后改变'对账'按钮 -->
@if ($order_info['status'] >= 2 && in_array('check_account', $userPerms))
@if (in_array($order_info['status'], [2, 3]) && in_array('check_account', $userPerms))
@if ($order_info['status'] == 3 && (!empty($order_pay_log) && $order_pay_log[0]['pay_type'] != ''))
<a href="javascript:;" data-id="{{$order_info['order_id']}}" class="btn btn-default last-check">对账</a>
@else
......@@ -576,7 +575,11 @@
<p style="padding-left: 5px;">操作</p>
<div class="tabs-box">
<!-- 判断状态和权限 -->
@if (in_array($order_info['status'], [2, 3, 4]) && in_array('self_order_cancel', $userPerms))
@if ($order_info['status'] == 1 && in_array('add_offline_audit', $userPerms))
<a class="btn btn-success self-check" data-id="{{$order_info['order_id']}}" class="btn btn-default">审单</a>
@endif
@if (in_array($order_info['status'], [2, 3, 4]) && !$extend && in_array('self_order_cancel', $userPerms))
<a class="btn btn-default self_cancel" href="javascript:;" data-id="{{$order_info['order_id']}}" class="btn btn-default">取消订单</a>
@endif
......
<div class="row wrapper border-bottom white-bg page-heading">
<div class="col-lg-10" style="height:10px"></div>
<div class="col-lg-10">
<a class="navbar-minimalize minimalize-styl-2 btn btn-primary pull-left" style="margin-left:0px;margin-top:18px;" href="#"><i class="fa fa-bars"></i> </a>
<div class="col-lg-10" style="padding-left:0px;">
<h2>{{ $title }}</h2>
<ol class="breadcrumb">
@for ($i = 0; $i < count($paths); $i++)
......
......@@ -120,6 +120,7 @@
<li data-val="" class="active">全部</li>
<li data-val="1">PC端</li>
<li data-val="2">移动端</li>
<li data-val="3">后台</li>
</ul>
</div>
</dd>
......@@ -377,8 +378,14 @@
<tr>
<td class="table-list-title">快递单号</td>
<td class="table-list-content">{{$shippingNo ? substr($shippingNo, 0, -2) : ''}}</td>
<td class="table-list-title">Adtag或其它</td>
<td class="table-list-title">订单来源</td>
<td class="table-list-content">
<?php echo App\Http\Controllers\getOrderSource($v['order_id']); ?>
</td>
</tr>
<tr>
<td class="table-list-title">Adtag或其它</td>
<td class="table-list-content" colspan="3">
<p class="show-title" title="{{$v['order_source']}}">{{$v['order_source']}}</p>
</td>
</tr>
......
......@@ -68,6 +68,7 @@
<li data-val="" class="active">全部</li>
<li data-val="1">PC端</li>
<li data-val="2">移动端</li>
<li data-val="3">后台</li>
</ul>
</div>
</dd>
......@@ -149,7 +150,7 @@
<th class="pl30">应付金额</th>
<th class="pl30">订单状态</th>
<th class="pl30">支付方式</th>
<th class="pl30">绑定客服</th>
<th class="pl30">订单来源</th>
<th class="pl30">发货状态</th>
<th class="pl30">下单时间</th>
<th class="pl30">操作</th>
......@@ -191,15 +192,8 @@
<td class="show-list"><?php print_r(App\Http\Controllers\getPayName($v['order_id'])); ?></td>
<td class="show-list">
<?php
foreach ($sale_list as $val) {
if ($val->userId == $v['sale_id']) {
echo $val->name;
}
}
?>
</td>
<td class="show-list"><?php echo App\Http\Controllers\getOrderSource($v['order_id']); ?></td>
<td class="show-list" class="show-list">
<?php
$shipping = App\Http\Controllers\getShipping($v['order_id']);
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>订单管理后台 | {{ $title }}</title>
<script>document.domain="{{ Config::get('website.domain') }}";</script>
@include('addOffline.css')
@include('addOffline.js')
</head>
<body class="body-small" style="min-width:1024px;">
<div id="wrapper">
<!-- layouts.navigation -->
@include('layouts.navigation')
@include('success.content')
</div>
</body>
<div id="page-wrapper" class="gray-bg">
@include('layouts.header')
<div class="wrapper wrapper-content">
<div class="row">
<div class="col-lg-12">
<div class="ibox float-e-margins">
<div class="ibox-title" style="border-top:0;">
<?php
$currency = $order_info->currency == 1 ? '¥' : '$';
?>
<div class="section-1">
<img src="../img/success.png" alt="提交成功">
<h3>订单提交成功</h3>
<p>下单时间:{{ date('Y-m-d H:i:s', $order_info->create_time) }}</p>
@if ($type == 1)
<p class="title-tips"><i class="fa fa-info-circle"></i>可在订单中心完善发票信息,最迟在客户付款前一定要完善发票信息,否则无法同步至ERP</p>
@endif
</div>
<div class="section-2">
@if ($type != 3)
<style>.section-2{height: 150px;}</style>
<p>手机号码:{{ $user_info->mobile }}</p>
@endif
<p>订单编号:{{ $order_info->order_sn }}</p>
<p>应付金额:<span class="text-danger">{{ $currency.$order_info->order_amount }}</span></p>
@if ($type == 2)
<div style="text-align: center;">付款地址:{{ Config('website.pay_online_url').$order_info->order_id }}</div>
@endif
</div>
<div class="section-3">
@if ($type == 1)
<a class="btn btn-success" href="/change/{{ $order_info->order_id }}">审核订单</a>
<a class="btn btn-default" href="/add_order">继续新增</a>
@elseif ($type == 2)
<a class="btn btn-success" href="/self_order">查看订单</a>
<a class="btn btn-default" href="/add_online">继续新增</a>
@else
<a class="btn btn-success" href="/self_order">查看订单</a>
<a class="btn btn-default" href="/add_offline">继续新增</a>
@endif
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
// $.lie.add_order.offline();
</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