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
a837031e
authored
Jul 02, 2019
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'zjl_freight_20190627'
parents
be468ee8
f86c1dc7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
26 deletions
app/Http/Controllers/OrderController.php
public/js/order.js
resources/views/detail/changeOrder.blade.php
app/Http/Controllers/OrderController.php
View file @
a837031e
...
...
@@ -761,7 +761,8 @@ Class OrderController extends Controller
"k2"
=>
$check
[
'k2'
],
"client_source"
=>
$client_source
,
"change_extend_fee"
=>
$request
->
input
(
'change_extend_fee'
,
''
),
"kefu_remark"
=>
$request
->
input
(
'kefu_remark'
,
''
),
"kefu_remark"
=>
$request
->
input
(
'kefu_remark'
,
''
),
// 客服备注
"freight_fee"
=>
$request
->
input
(
'freight_fee'
,
0
),
// 运费
];
$temp
=
json_decode
(
curlApi
(
$url
,
$resData
,
"POST"
),
true
);
...
...
public/js/order.js
View file @
a837031e
...
...
@@ -1359,8 +1359,9 @@
$
(
this
).
find
(
'.sup_amount_val'
).
text
(
supplier
[
sup
]);
})
var
fee
=
$
(
'input[name="extra_fee"]'
).
val
()
?
parseFloat
(
$
(
'input[name="extra_fee"]'
).
val
())
:
0
;
var
total
=
parseFloat
(
goods_total
+
fee
).
toFixed
(
2
);
var
extra_fee
=
$
(
'input[name="extra_fee"]'
).
val
()
?
parseFloat
(
$
(
'input[name="extra_fee"]'
).
val
())
:
0
;
var
freight_fee
=
$
(
'input[name="freight_fee"]'
).
val
()
?
parseFloat
(
$
(
'input[name="freight_fee"]'
).
val
())
:
0
;
// 运费
var
total
=
parseFloat
(
goods_total
+
freight_fee
+
extra_fee
).
toFixed
(
2
);
goods_total
=
goods_total
.
toFixed
(
2
);
...
...
@@ -1386,6 +1387,7 @@
$
(
'.extend-fee-table input'
).
on
(
'blur'
,
function
(){
var
table
=
$
(
'.extend-fee-table'
);
var
goods_total
=
parseFloat
(
$
(
'.goods_total'
).
text
());
var
freight_fee
=
$
(
'input[name="freight_fee"]'
).
val
()
?
parseFloat
(
$
(
'input[name="freight_fee"]'
).
val
())
:
0
;
// 运费
var
extend_fee_total
=
0
;
$
(
table
).
find
(
'tbody tr'
).
each
(
function
(){
...
...
@@ -1394,7 +1396,7 @@
extend_fee_total
+=
extend_fee
;
});
var
total
=
parseFloat
(
goods_total
+
extend_fee_total
).
toFixed
(
2
);
var
total
=
parseFloat
(
goods_total
+
freight_fee
+
extend_fee_total
).
toFixed
(
2
);
$
(
'.extra_fee'
).
html
(
extend_fee_total
);
$
(
'input[name="extra_fee"]'
).
val
(
extend_fee_total
);
...
...
@@ -1402,6 +1404,20 @@
$
(
'.total'
).
html
(
total
);
})
// 调整运费
$
(
'.freight_fee'
).
on
(
'blur'
,
function
()
{
var
freight_fee
=
parseFloat
(
$
(
this
).
val
());
if
(
!
freight_fee
)
freight_fee
=
0
;
$
(
this
).
val
(
freight_fee
);
var
goods_total
=
parseFloat
(
$
(
'.goods_total'
).
text
());
var
total
=
parseFloat
(
goods_total
+
freight_fee
).
toFixed
(
2
);
$
(
'.total'
).
html
(
total
);
})
// 定金调整
// $('.advance').on('blur',function(){
// if($(this).val()<($('.total').html()*0.2)){
...
...
@@ -1557,7 +1573,7 @@
// 联营订单需要先指派业务员
if
(
order_goods_type
==
1
&&
sale_id
==
0
)
{
layer
.
alert
(
'请先将订单推送给
业务员
'
,
function
(){
layer
.
alert
(
'请先将订单推送给
客服
'
,
function
(){
location
.
href
=
'/sendSales/'
+
order_id
;
});
return
false
;
...
...
@@ -1649,21 +1665,35 @@
}
var
currencySign
=
currency
==
1
?
'¥'
:
'$'
;
var
goods_amount
=
currencySign
+
$
(
'input[name=goods_amount]'
).
val
();
var
order_amount
=
currencySign
+
$
(
'input[name=order_amount]'
).
val
();
var
goods_amount
=
parseFloat
(
$
(
'.goods_total'
).
text
());
var
order_amount
=
parseFloat
(
$
(
'.total'
).
text
());
var
extra_fee
=
$
(
'input[name=extra_fee]'
).
val
()
?
$
(
'input[name=extra_fee]'
).
val
()
:
0
;
var
freight_fee
=
$
(
'input[name=freight_fee]'
).
val
()
?
$
(
'input[name=freight_fee]'
).
val
()
:
0
;
var
last_paid
=
parseFloat
(
order_amount
+
parseFloat
(
pay_preferential
)).
toFixed
(
2
);
// 实际支付金额
var
content
=
'<div class="submit-check">'
+
'<p class="error">请核对订单金额,谨慎操作!</p>'
+
'<p><label>商品总金额:</label>'
+
currencySign
+
goods_amount
+
'</p>'
+
'<p><label>优惠金额:</label>'
+
discount_amount
+
'</p>'
+
'<p><label>附加费金额:</label>'
+
extra_fee
+
'</p>'
+
'<p><label>运费金额:</label>'
+
freight_fee
+
'</p>'
+
'<p><label>订单总金额:</label><span class="error">'
+
currencySign
+
order_amount
+
'</span></p>'
;
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>'
;
content
+=
'</div>'
;
var
url
=
'/details/'
+
order_id
;
}
else
{
var
content
=
'<div><p class="error">请核对订单金额,谨慎操作!</p><div><p>商品总金额:'
+
goods_amount
+
'</p><p>订单总金额:<span class="error">'
+
order_amount
+
'</span></p></div></div>'
;
content
+=
'<p><label>支付优惠:</label>'
+
pay_preferential
+
'</p>'
+
'<p><label>实际支付金额:</label><span class="error">'
+
currencySign
+
last_paid
+
'</span></p>'
+
'</div>'
;
var
url
=
'/details/'
+
order_id
+
'?tags=self'
;
}
// 弹出提示
layer
.
open
({
title
:
'提醒'
,
area
:
[
'360px'
],
title
:
'提示信息'
,
content
:
content
,
btn
:[
'确定'
,
'取消'
],
yes
:
function
(
index
,
layero
){
...
...
resources/views/detail/changeOrder.blade.php
View file @
a837031e
<style>
.submit-check
{
margin
:
0
auto
;
width
:
200px
;
}
/* 提交审核弹框label */
.submit-check
label
{
display
:
inline-block
;
width
:
120px
;
text-align
:
right
;}
</style>
<p
style=
"padding-left: 5px;"
>
人工审单
</p>
<div
class=
"tabs-box"
>
<div
class=
"order-change-main"
>
...
...
@@ -125,7 +132,7 @@
<textarea
name=
"kefu_remark"
id=
"kefu_remark"
class=
"form-control"
placeholder=
"客服备注信息"
style=
"resize: none;"
>
{{$order_temp_info['kefu_remark']}}
</textarea>
@if ($order_info['order_goods_type'] == 2)
<table
class=
"table table-bordered table-hover"
>
<table
class=
"table table-bordered table-hover"
style=
"margin-top:10px;"
>
<tr>
<th
width=
"20%"
>
批量调价
</th>
<td>
...
...
@@ -199,14 +206,23 @@
</tr>
<!-- 销售类型为现卖时展示 -->
@if ($order_info['sale_type'] == 1)
@if ($order_info['sale_type'] == 1
&&
$order_price_info['ext_price']
)
<tr>
<th
width=
"20%"
>
附加费金额
</th>
<td>
<p
class=
"text-danger"
>
{{$currency}}
<span
class=
"extra_fee"
>
{{$order_price_info['ext_price'] ? $order_price_info['ext_price'] : 0}}
</span></p>
<input
type=
"hidden"
name=
"extra_fee"
autocomplete=
"off"
value=
"{{$order_price_info['ext_price'] ? $order_price_info['ext_price'] : 0}}"
>
</td>
<!-- <td><input type="text" name="extra_fee" autocomplete="off" value="{{$order_price_info['ext_price']}}" class="only_number"></td> -->
</tr>
@endif
@if ($order_info['order_goods_type'] == 2)
<tr>
<th>
运费
</th>
<td>
<span>
{{$currency}}
</span>
<input
class=
"only_number freight_fee"
type=
"text"
name=
"freight_fee"
value=
"{{ $order_price_info['shipping_price'] ? $order_price_info['shipping_price'] : 0 }}"
>
</td>
</tr>
@endif
...
...
@@ -358,6 +374,7 @@
<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']}}"
>
...
...
@@ -397,12 +414,14 @@
<hr>
<table
class=
"table table-bordered table-hover"
>
<tr>
<th>
订单类型:
</th>
<th
width=
"20%"
>
订单类型:
</th>
<td>
@if ($order_temp_info['order_pay_type'] == 1)
全款
@else
@else
if ($order_temp_info['order_pay_type'] == 2)
预付款
@else
账期
@endif
</td>
</tr>
...
...
@@ -413,26 +432,44 @@
</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_
price_info['discount_amount
']}}
</td>
<th>
运费
:
</th>
<td>
{{$order_
temp_info['freight_fee
']}}
</td>
</tr>
@if ($order_temp_info['order_pay_type'] == 2)
<?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_temp_info['deposit_amount']}}
</td>
<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['
goods_amount'] + $order_temp_info['extra_fee'] + $order_price_info['discoun
t_amount']}}
</td>
<th>
定金
:
</th>
<td>
{{$order_temp_info['
deposi
t_amount']}}
</td>
</tr>
@endif
<tr>
<th>
付款时间:
</th>
...
...
@@ -448,9 +485,11 @@
var
is_manager
=
"{{ $role == 1 || $role == 2 || $role == 10 ? true : false }}"
;
var
isNewClient
=
"{{isset($isNewClient) ? $isNewClient : 0}}"
;
var
order_amount
=
"{{$order_info['order_amount']}}"
;
var
currency
=
"{{$order_info['currency']}}"
;
var
order_pay_type
=
"{{$order_info['order_pay_type']}}"
;
// var order_amount = "{{$order_info['order_amount']}}";
var
currency
=
"{{$order_info['currency']}}"
;
// 币种
var
order_pay_type
=
"{{$order_info['order_pay_type']}}"
;
// 付款类型
var
discount_amount
=
"{{ $order_price_info['discount_amount'] ? $order_price_info['discount_amount'] : 0 }}"
;
// 优惠券金额
var
pay_preferential
=
"{{ $order_price_info['pay_preferential'] ? $order_price_info['pay_preferential'] : 0 }}"
;
// 支付优惠(钱包)
var
rest_time
=
"{{$order_info['pay_time'] ? $order_info['pay_time'] - time() : NULL}}"
;
...
...
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