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
1807a2a6
authored
Oct 15, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
temp2
parent
6d4f21e1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
14 deletions
app/Http/Controllers/OrderController.php
config/website.php
public/js/order.js
resources/views/detail/changeOrder.blade.php
resources/views/detail/content.blade.php
app/Http/Controllers/OrderController.php
View file @
1807a2a6
...
...
@@ -284,6 +284,23 @@ function getSupplierName($key)
return
$supp_info
;
}
// 获取自营库存
function
getSelfStock
(
$goods_id
)
{
if
(
!
$goods_id
)
return
'商品ID不存在'
;
$url
=
Config
(
'website.self-stock-url'
);
$data
[
'sku_id'
]
=
$goods_id
;
$response
=
json_decode
(
curlApi
(
$url
,
$data
,
'POST'
),
true
);
if
(
$response
[
'errcode'
]
==
0
)
{
return
$response
[
'data'
][
'stock'
];
}
else
{
return
'未找SKU信息'
;
}
}
Class
OrderController
extends
Controller
{
// 首页
...
...
@@ -1093,7 +1110,8 @@ Class OrderController extends Controller
$check
[
'k2'
]
=
md5
(
md5
(
$check
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$client_source
=
$request
->
input
(
'client_source'
)
==
1
?
$request
->
input
(
'input-other-source'
)
:
$request
->
input
(
'client_source'
);
echo
'<pre>'
;
print_r
(
$request
->
input
());
die
;
$resData
=
[
"user_id"
=>
$request
->
input
(
'user_id'
,
''
),
"cancel_reason"
=>
$request
->
input
(
'cancel_reason'
,
''
),
...
...
config/website.php
View file @
1807a2a6
...
...
@@ -64,4 +64,7 @@ return [
// 新增自营线上订单付款地址
'pay_online_url'
=>
'http://www.liexin.com/v3/pay/online?id='
,
// 获取自营商品库存
'self-stock-url'
=>
'http://footstone.liexin.net/webapi/goods_details?sku_id='
,
];
public/js/order.js
View file @
1807a2a6
...
...
@@ -1083,7 +1083,7 @@
$
(
this
).
find
(
'.sup_amount_val'
).
text
(
supplier
[
sup
]);
})
var
fee
=
parseFloat
(
$
(
'input[name="extra_fee"]'
).
val
())
;
var
fee
=
$
(
'input[name="extra_fee"]'
).
val
()
?
parseFloat
(
$
(
'input[name="extra_fee"]'
).
val
())
:
0
;
var
total
=
parseFloat
(
goods_total
+
fee
).
toFixed
(
2
);
goods_total
=
goods_total
.
toFixed
(
2
);
...
...
@@ -1227,13 +1227,15 @@
var
is_newClient
=
$
(
'input[name=is_newClient]:checked'
).
val
();
var
client_source
=
$
(
'input[name=client_source]:checked'
).
val
();
var
order_status
=
$
(
'input[name=order_status]:checked'
).
val
();
var
pay_type
=
$
(
'input[name=order_pay_type]:checked'
).
val
();
// 订单类型
var
pay_type
=
$
(
'input[name=order_pay_type]:checked'
).
val
();
// 订单
付款
类型
var
reason
=
$
(
'input[name=reason]:checked'
).
val
();
var
payTime
=
$
(
'.payTime'
).
val
();
var
payTimeOther
=
$
(
'.payTimeOther'
).
val
();
var
sale_id
=
$
(
'input[name=sale_id]'
).
val
();
var
order_goods_type
=
$
(
'input[name=order_goods_type]'
).
val
();
if
(
sale_id
==
0
)
{
// 联营订单需要先指派业务员
if
(
order_goods_type
==
1
&&
sale_id
==
0
)
{
layer
.
alert
(
'请先将订单推送给业务员'
,
function
(){
location
.
href
=
'/sendSales/'
+
$
(
'input[name=order_id]'
).
val
();
});
...
...
@@ -1325,11 +1327,6 @@
}
}
var
currencySign
=
currency
==
1
?
'¥'
:
'$'
;
var
goods_amount
=
currencySign
+
$
(
'input[name=goods_amount]'
).
val
();
var
order_amount
=
currencySign
+
$
(
'input[name=order_amount]'
).
val
();
var
extra_fee
=
$
(
'input[name=extra_fee]'
).
val
()
==
''
?
''
:
currencySign
+
$
(
'input[name=extra_fee]'
).
val
();
if
(
!
is_manager
)
{
// 设置默认值false
$
(
'input[name=check_failed]'
).
val
(
0
);
...
...
@@ -1358,10 +1355,21 @@
}
}
var
currencySign
=
currency
==
1
?
'¥'
:
'$'
;
var
goods_amount
=
currencySign
+
$
(
'input[name=goods_amount]'
).
val
();
var
order_amount
=
currencySign
+
$
(
'input[name=order_amount]'
).
val
();
if
(
order_goods_type
==
1
)
{
var
extra_fee
=
$
(
'input[name=extra_fee]'
).
val
()
?
currencySign
+
'0'
:
currencySign
+
$
(
'input[name=extra_fee]'
).
val
();
var
content
=
'<div><p class="error">请核对订单金额,谨慎操作!</p><div><p>商品总金额:'
+
goods_amount
+
'</p><p>附加费金额:'
+
extra_fee
+
'</p><p>订单总金额:<span class="error">'
+
order_amount
+
'</span></p></div></div>'
;
}
else
{
var
content
=
'<div><p class="error">请核对订单金额,谨慎操作!</p><div><p>商品总金额:'
+
goods_amount
+
'</p><p>订单总金额:<span class="error">'
+
order_amount
+
'</span></p></div></div>'
;
}
// 弹出提示
layer
.
open
({
title
:
'提醒'
,
content
:
'<div><p class="error">请核对订单金额,谨慎操作!</p><div><p>商品总金额:'
+
goods_amount
+
'</p><p>附加费金额:'
+
extra_fee
+
'</p><p>订单总金额:<span class="error">'
+
order_amount
+
'</span></p></div></div>'
,
content
:
content
,
btn
:[
'取消'
,
'确定'
],
yes
:
function
(
index
,
layero
){
layer
.
close
(
index
);
...
...
resources/views/detail/changeOrder.blade.php
View file @
1807a2a6
...
...
@@ -6,6 +6,7 @@
<input
type=
"hidden"
name=
"order_sn"
value=
"{{$order_info['order_sn']}}"
>
<input
type=
"hidden"
name=
"user_id"
value=
"{{$order_info['user_id']}}"
>
<input
type=
"hidden"
name=
"order_id"
value=
"{{$order_info['order_id']}}"
>
<input
type=
"hidden"
name=
"order_goods_type"
value=
"{{$order_info['order_goods_type']}}"
>
<input
type=
"hidden"
name=
"sale_id"
value=
"{{$order_info['sale_id']}}"
>
<input
type=
"hidden"
name=
"goods_amount"
value=
"{{$order_price_info['goods_price']}}"
>
<input
type=
"hidden"
name=
"order_amount"
value=
"{{$order_info['order_amount']}}"
>
...
...
@@ -116,10 +117,14 @@
<!-- 销售类型为预售时展示 -->
@if ($order_info['sale_type'] == 2)
<td>
<input
type=
"text"
class=
"
num"
value=
"
"
>
<input
type=
"text"
class=
"
only_number"
name=
"delivery_time"
value=
""
placeholder=
"请填写天数
"
>
</td>
<td>
<label>
<input
type=
"checkbox"
name=
"is_lock[]"
value=
"{{$v['goods_id']}}"
>
<span>
锁定库存,可用库存:
<b
class=
"text-danger"
>
{{ App\Http\Controllers\getSelfStock($v['goods_id']) }}
</b></span>
</label>
</td>
@endif
</tr>
...
...
@@ -237,11 +242,15 @@
<p>
付款时间
</p>
<table
class=
"table table-bordered table-hover change-table"
>
<tr>
<th>
选择付款时间
</th>
<th
width=
"20%"
>
选择付款时间
</th>
<td>
<select
name=
"payTime"
class=
"payTime"
>
<option
value=
""
>
请选择
</option>
<option
value=
"1"
>
1天
</option>
<!-- 预售订单默认2天 -->
@if ($order_info['sale_type'] == 2)
<option
value=
"2"
selected
>
2天
</option>
@endif
<option
value=
"3"
>
3天
</option>
<option
value=
"7"
>
7天
</option>
<option
value=
"15"
>
15天
</option>
...
...
resources/views/detail/content.blade.php
View file @
1807a2a6
...
...
@@ -610,7 +610,7 @@
@endif
</div>
@elseif (isset($_REQUEST['tags'])
&&
$_REQUEST['tags'] == 'self')
@elseif (isset($_REQUEST['tags'])
&&
$_REQUEST['tags'] == 'self'
&&
$action_name != 'changeOrder'
)
<p
style=
"padding-left: 5px;"
>
操作
</p>
<div
class=
"tabs-box"
>
<!-- 判断状态和权限 -->
...
...
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