Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
朱继来
/
后台订单管理
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0831899d
authored
Aug 29, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整新增订单
parent
84d150eb
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
93 additions
and
28 deletions
app/Http/Controllers/AddOrderController.php
app/Http/Controllers/OrderController.php
config/perm.php
config/website.php
public/js/add_order.js
resources/views/addOnline/content.blade.php
resources/views/addOrder/content.blade.php
resources/views/detail/content.blade.php
resources/views/orderlist/content.blade.php
resources/views/selfOrder/content.blade.php
resources/views/success/content.blade.php
app/Http/Controllers/AddOrderController.php
View file @
0831899d
...
@@ -328,6 +328,7 @@ Class AddOrderController extends Controller
...
@@ -328,6 +328,7 @@ Class AddOrderController extends Controller
if
(
$request
->
isMethod
(
'post'
))
{
if
(
$request
->
isMethod
(
'post'
))
{
$data
[
'uid'
]
=
$request
->
input
(
'uid'
);
$data
[
'uid'
]
=
$request
->
input
(
'uid'
);
$data
[
'type'
]
=
$request
->
input
(
'type'
);
$data
[
'type'
]
=
$request
->
input
(
'type'
);
$data
[
'delivery_place'
]
=
$request
->
input
(
'delivery_place'
);
$data
[
'k1'
]
=
time
();
$data
[
'k1'
]
=
time
();
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
...
...
app/Http/Controllers/OrderController.php
View file @
0831899d
...
@@ -215,6 +215,36 @@ function getGoodsName($goods_id)
...
@@ -215,6 +215,36 @@ function getGoodsName($goods_id)
return
$goods_info
[
'goods_name'
];
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
Class
OrderController
extends
Controller
{
{
// 首页
// 首页
...
...
config/perm.php
View file @
0831899d
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
'ERP订单'
=>
[
'erp_order_check'
],
'ERP订单'
=>
[
'erp_order_check'
],
'
新增订
单'
=>
[
'add_order_check'
],
'
线上用户下
单'
=>
[
'add_order_check'
],
],
],
'自营订单'
=>
[
'自营订单'
=>
[
...
@@ -14,9 +14,9 @@
...
@@ -14,9 +14,9 @@
'快递配置'
=>
[
'self_order_express_set_check'
],
'快递配置'
=>
[
'self_order_express_set_check'
],
'
新增订单_线上
'
=>
[
'add_online_check'
],
'
线上用户下单
'
=>
[
'add_online_check'
],
'
新增订单_线下'
=>
[
'add_offline_check
'
],
'
内部采购下单'
=>
[
'add_offline_check'
,
'add_offline_audit
'
],
],
],
'订单统计'
=>
[
'订单统计'
=>
[
...
...
config/website.php
View file @
0831899d
...
@@ -47,6 +47,9 @@ return [
...
@@ -47,6 +47,9 @@ return [
// 新增用户入口
// 新增用户入口
'add-user-url'
=>
'http://member.liexin.net/add'
,
'add-user-url'
=>
'http://member.liexin.net/add'
,
// 编辑用户入口
'check-user-url'
=>
'http://member.liexin.net/list'
,
// 查询SKUID接口
// 查询SKUID接口
// 'search-skuid' => 'http://footstone.liexin.net/webapi/sku_list',
// 'search-skuid' => 'http://footstone.liexin.net/webapi/sku_list',
'search-skuid'
=>
'http://www.liexin.com/v3/sku/list'
,
'search-skuid'
=>
'http://www.liexin.com/v3/sku/list'
,
...
...
public/js/add_order.js
View file @
0831899d
...
@@ -258,6 +258,7 @@
...
@@ -258,6 +258,7 @@
$
(
'.status'
).
text
(
status_val
);
$
(
'.status'
).
text
(
status_val
);
$
(
'.goods_id'
).
val
(
data
.
goods_id
);
$
(
'.goods_id'
).
val
(
data
.
goods_id
);
$
(
'.goods_type'
).
val
(
data
.
goods_type
);
//阶梯价格
//阶梯价格
if
(
data
.
ladder_price
!=
null
)
{
if
(
data
.
ladder_price
!=
null
)
{
...
@@ -294,6 +295,7 @@
...
@@ -294,6 +295,7 @@
$
(
'.add-to-lists'
).
click
(
function
()
{
$
(
'.add-to-lists'
).
click
(
function
()
{
var
goods_min_num
=
$
(
this
).
parents
(
'.sku-info'
).
find
(
'.goods-min-num'
).
text
();
var
goods_min_num
=
$
(
this
).
parents
(
'.sku-info'
).
find
(
'.goods-min-num'
).
text
();
var
goods_id
=
$
(
this
).
siblings
(
'.goods_id'
).
val
();
var
goods_id
=
$
(
this
).
siblings
(
'.goods_id'
).
val
();
var
type
=
$
(
this
).
siblings
(
'.goods_type'
).
val
();
var
delivery_place
=
1
;
// 1.大陆,2.香港 自营默认是大陆
var
delivery_place
=
1
;
// 1.大陆,2.香港 自营默认是大陆
var
user_id
=
0
;
var
user_id
=
0
;
...
@@ -313,20 +315,30 @@
...
@@ -313,20 +315,30 @@
return
false
;
return
false
;
}
}
if
(
type
==
0
)
{
layer
.
msg
(
'仅支持联营商品下单,请在自营订单中下单'
);
return
false
;
}
var
goods_min_price
=
$
(
this
).
parents
(
'.sku-info'
).
find
(
'.goods-min-price'
).
text
();
var
goods_min_price
=
$
(
this
).
parents
(
'.sku-info'
).
find
(
'.goods-min-price'
).
text
();
var
goods_min_price_us
=
$
(
this
).
parents
(
'.sku-info'
).
find
(
'.goods-min-price-us'
).
text
();
var
goods_min_price_us
=
$
(
this
).
parents
(
'.sku-info'
).
find
(
'.goods-min-price-us'
).
text
();
if
(
delivery_place
==
1
)
{
if
(
delivery_place
==
1
)
{
if
(
goods_min_price
==
0
)
{
if
(
goods_min_price
==
0
)
{
layer
.
msg
(
'
添加商品
失败'
);
layer
.
msg
(
'
缺少RMB价格,商品添加
失败'
);
return
false
;
return
false
;
}
}
}
else
if
(
delivery_place
==
2
)
{
}
else
if
(
delivery_place
==
2
)
{
if
(
goods_min_price_us
==
0
)
{
if
(
goods_min_price_us
==
0
)
{
layer
.
msg
(
'
添加商品
失败'
);
layer
.
msg
(
'
缺少美金价格,商品添加
失败'
);
return
false
;
return
false
;
}
}
}
}
}
else
{
if
(
type
==
2
)
{
layer
.
msg
(
'仅支持自营商品下单,请在联营订单中下单'
);
return
false
;
}
}
}
}
}
...
@@ -353,6 +365,14 @@
...
@@ -353,6 +365,14 @@
})
})
})
})
// 切换交货地
$
(
'.delivery_place'
).
click
(
function
()
{
var
user_id
=
$
(
'.user_id'
).
val
();
var
delivery_place
=
$
(
this
).
val
();
loading
.
lists
(
user_id
,
goods_type
,
is_online
,
delivery_place
);
// 加载购物车列表
})
// 调整商品数量
// 调整商品数量
$
(
'.shop-table'
).
delegate
(
'.goods_num'
,
'blur'
,
function
()
{
$
(
'.shop-table'
).
delegate
(
'.goods_num'
,
'blur'
,
function
()
{
var
self
=
$
(
this
);
var
self
=
$
(
this
);
...
@@ -518,13 +538,13 @@
...
@@ -518,13 +538,13 @@
},
},
// 购物车商品列表
// 购物车商品列表
lists
:
function
(
user_id
,
goods_type
,
is_online
)
{
// type:1-联营,2-自营
lists
:
function
(
user_id
,
goods_type
,
is_online
,
delivery_place
=
"1"
)
{
// type:1-联营,2-自营
var
self
=
this
;
var
self
=
this
;
$
.
ajax
({
$
.
ajax
({
type
:
'post'
,
type
:
'post'
,
url
:
'/ajax/cartList'
,
url
:
'/ajax/cartList'
,
data
:
{
uid
:
user_id
,
type
:
goods_type
},
data
:
{
uid
:
user_id
,
type
:
goods_type
,
delivery_place
:
delivery_place
},
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
resp
){
success
:
function
(
resp
){
if
(
resp
.
errcode
==
0
)
{
if
(
resp
.
errcode
==
0
)
{
...
...
resources/views/addOnline/content.blade.php
View file @
0831899d
...
@@ -21,7 +21,10 @@
...
@@ -21,7 +21,10 @@
<input
type=
"text"
class=
"search-user"
name=
"user-mobile"
value=
""
placeholder=
"请输入会员账号"
>
<input
type=
"text"
class=
"search-user"
name=
"user-mobile"
value=
""
placeholder=
"请输入会员账号"
>
<a
class=
"btn btn-info get-user"
>
获取用户信息
</a>
<a
class=
"btn btn-info get-user"
>
获取用户信息
</a>
<span>
快捷入口:
<a
href=
"{{Config('website.add-user-url')}}"
target=
"_blank"
>
新增用户账号
</a></span>
<span>
快捷入口:
<a
href=
"{{Config('website.add-user-url')}}"
target=
"_blank"
style=
"margin-right: 10px;"
>
新增用户账号
</a>
<a
href=
"{{Config('website.check-user-url')}}"
target=
"_blank"
>
查询/编辑用户账号
</a>
</span>
</div>
</div>
</div>
</div>
...
@@ -107,7 +110,7 @@
...
@@ -107,7 +110,7 @@
</div>
</div>
<div
class=
"invoice-info"
>
<div
class=
"invoice-info"
>
<h4>
发票信息
<span
class=
"title-tips"
><i
class=
"fa fa-info-circle"
></i>
可在订单中心完善发票信息,需要在订单审核通过前填写发票信息,否则无法同步至ERP
</span></h4>
<h4>
发票信息
<span
class=
"title-tips"
><i
class=
"fa fa-info-circle"
></i>
自营订单没有审核流程,所以一定要完善发票资料。
</span></h4>
<input
type=
"hidden"
name=
"tax_id"
class=
"tax_id"
value=
""
>
<input
type=
"hidden"
name=
"tax_id"
class=
"tax_id"
value=
""
>
...
@@ -315,6 +318,7 @@
...
@@ -315,6 +318,7 @@
</div>
</div>
<input
type=
"hidden"
name=
"goods_id"
class=
"goods_id"
value=
""
>
<input
type=
"hidden"
name=
"goods_id"
class=
"goods_id"
value=
""
>
<input
type=
"hidden"
name=
"goods_type"
class=
"goods_type"
value=
""
>
<div
class=
"clear"
></div>
<div
class=
"clear"
></div>
...
...
resources/views/addOrder/content.blade.php
View file @
0831899d
...
@@ -21,7 +21,10 @@
...
@@ -21,7 +21,10 @@
<input
type=
"text"
class=
"search-user"
name=
"user-mobile"
value=
""
placeholder=
"请输入会员账号"
>
<input
type=
"text"
class=
"search-user"
name=
"user-mobile"
value=
""
placeholder=
"请输入会员账号"
>
<a
class=
"btn btn-info get-user"
>
获取用户信息
</a>
<a
class=
"btn btn-info get-user"
>
获取用户信息
</a>
<span>
快捷入口:
<a
href=
"{{Config('website.add-user-url')}}"
target=
"_blank"
>
新增用户账号
</a></span>
<span>
快捷入口:
<a
href=
"{{Config('website.add-user-url')}}"
target=
"_blank"
style=
"margin-right: 10px;"
>
新增用户账号
</a>
<a
href=
"{{Config('website.check-user-url')}}"
target=
"_blank"
>
查询/编辑用户账号
</a>
</span>
</div>
</div>
</div>
</div>
...
@@ -129,7 +132,7 @@
...
@@ -129,7 +132,7 @@
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-6"
>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<span>
<i
class=
"text-danger"
>
*
</i>
选择发票信息:
</span>
<span>
选择发票信息:
</span>
<select
name=
"invoice"
id=
"invoice"
>
<select
name=
"invoice"
id=
"invoice"
>
</select>
</select>
</div>
</div>
...
@@ -227,11 +230,11 @@
...
@@ -227,11 +230,11 @@
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<span>
交货地址:
</span>
<span>
交货地址:
</span>
<label
class=
"radio-inline"
>
<label
class=
"radio-inline"
>
<input
type=
"radio"
name=
"delivery_place"
value=
"1"
>
大陆
<input
type=
"radio"
name=
"delivery_place"
class=
"delivery_place"
value=
"1"
checked=
"checked"
>
大陆
</label>
<label
class=
"radio-inline"
>
<input
type=
"radio"
name=
"delivery_place"
class=
"delivery_place"
value=
"2"
>
香港
</label>
</label>
<!-- <label class="radio-inline">
<input type="radio" name="delivery_place" value="2"> 香港
</label> -->
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -335,6 +338,7 @@
...
@@ -335,6 +338,7 @@
</div>
</div>
<input
type=
"hidden"
name=
"goods_id"
class=
"goods_id"
value=
""
>
<input
type=
"hidden"
name=
"goods_id"
class=
"goods_id"
value=
""
>
<input
type=
"hidden"
name=
"goods_type"
class=
"goods_type"
value=
""
>
<div
class=
"clear"
></div>
<div
class=
"clear"
></div>
...
...
resources/views/detail/content.blade.php
View file @
0831899d
...
@@ -575,7 +575,7 @@
...
@@ -575,7 +575,7 @@
<p
style=
"padding-left: 5px;"
>
操作
</p>
<p
style=
"padding-left: 5px;"
>
操作
</p>
<div
class=
"tabs-box"
>
<div
class=
"tabs-box"
>
<!-- 判断状态和权限 -->
<!-- 判断状态和权限 -->
@if ($order_info['status'] == 1)
@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>
<a
class=
"btn btn-success self-check"
data-id=
"{{$order_info['order_id']}}"
class=
"btn btn-default"
>
审单
</a>
@endif
@endif
...
...
resources/views/orderlist/content.blade.php
View file @
0831899d
...
@@ -119,6 +119,7 @@
...
@@ -119,6 +119,7 @@
<li
data-val=
""
class=
"active"
>
全部
</li>
<li
data-val=
""
class=
"active"
>
全部
</li>
<li
data-val=
"1"
>
PC端
</li>
<li
data-val=
"1"
>
PC端
</li>
<li
data-val=
"2"
>
移动端
</li>
<li
data-val=
"2"
>
移动端
</li>
<li
data-val=
"3"
>
后台
</li>
</ul>
</ul>
</div>
</div>
</dd>
</dd>
...
@@ -376,8 +377,14 @@
...
@@ -376,8 +377,14 @@
<tr>
<tr>
<td
class=
"table-list-title"
>
快递单号
</td>
<td
class=
"table-list-title"
>
快递单号
</td>
<td
class=
"table-list-content"
>
{{$shippingNo ? substr($shippingNo, 0, -2) : ''}}
</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"
>
<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>
<p
class=
"show-title"
title=
"{{$v['order_source']}}"
>
{{$v['order_source']}}
</p>
</td>
</td>
</tr>
</tr>
...
...
resources/views/selfOrder/content.blade.php
View file @
0831899d
...
@@ -68,6 +68,7 @@
...
@@ -68,6 +68,7 @@
<li
data-val=
""
class=
"active"
>
全部
</li>
<li
data-val=
""
class=
"active"
>
全部
</li>
<li
data-val=
"1"
>
PC端
</li>
<li
data-val=
"1"
>
PC端
</li>
<li
data-val=
"2"
>
移动端
</li>
<li
data-val=
"2"
>
移动端
</li>
<li
data-val=
"3"
>
后台
</li>
</ul>
</ul>
</div>
</div>
</dd>
</dd>
...
@@ -149,7 +150,7 @@
...
@@ -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>
<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 @@
...
@@ -191,15 +192,8 @@
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getPayName
(
$v
[
'order_id'
]));
?>
</td>
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getPayName
(
$v
[
'order_id'
]));
?>
</td>
<td
class=
"show-list"
>
<td
class=
"show-list"
>
<?php
echo
App\Http\Controllers\getOrderSource
(
$v
[
'order_id'
]);
?>
</td>
<?php
foreach
(
$sale_list
as
$val
)
{
if
(
$val
->
userId
==
$v
[
'sale_id'
])
{
echo
$val
->
name
;
}
}
?>
</td>
<td
class=
"show-list"
class=
"show-list"
>
<td
class=
"show-list"
class=
"show-list"
>
<?php
<?php
$shipping
=
App\Http\Controllers\getShipping
(
$v
[
'order_id'
]);
$shipping
=
App\Http\Controllers\getShipping
(
$v
[
'order_id'
]);
...
...
resources/views/success/content.blade.php
View file @
0831899d
...
@@ -14,7 +14,9 @@
...
@@ -14,7 +14,9 @@
<img
src=
"../img/success.png"
alt=
"提交成功"
>
<img
src=
"../img/success.png"
alt=
"提交成功"
>
<h3>
订单提交成功
</h3>
<h3>
订单提交成功
</h3>
<p>
下单时间:{{ date('Y-m-d H:i:s', $order_info->create_time) }}
</p>
<p>
下单时间:{{ date('Y-m-d H:i:s', $order_info->create_time) }}
</p>
<p
class=
"title-tips"
><i
class=
"fa fa-info-circle"
></i>
为了方便后续操作,请将如下订单编号,备注在ERP中的采购单中。
</p>
@if ($type == 1)
<p
class=
"title-tips"
><i
class=
"fa fa-info-circle"
></i>
可在订单中心完善发票信息,最迟在客户付款前一定要完善发票信息,否则无法同步至ERP
</p>
@endif
</div>
</div>
<div
class=
"section-2"
>
<div
class=
"section-2"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment