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
5e1bd152
authored
Feb 28, 2019
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'zjl_inner_account_20190221' into development
parents
363e2e22
0ba9436b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
21 deletions
app/Http/Controllers/AddOrderController.php
public/js/add_order.js
resources/views/addOtherOrder/content.blade.php
resources/views/detail/content.blade.php
app/Http/Controllers/AddOrderController.php
View file @
5e1bd152
...
...
@@ -381,15 +381,22 @@ Class AddOrderController extends Controller
$data
[
'address_id'
]
=
$request
->
input
(
'address_id'
,
0
);
$data
[
'cart_id'
]
=
$request
->
input
(
'cart_ids'
,
''
);
$data
[
'user_coupon_id'
]
=
$request
->
input
(
'user_coupon_id'
,
0
);
$data
[
'type'
]
=
!
$is_online
?
3
:
$request
->
input
(
'goods_type'
);
if
(
$is_online
==
0
)
{
$data
[
'type'
]
=
3
;
// 自营线下
}
else
if
(
$is_online
==
2
)
{
$data
[
'type'
]
=
4
;
// 自营其他业务
$data
[
'business_type'
]
=
$request
->
input
(
'business_type'
,
0
);
// 业务类型
}
else
{
$data
[
'type'
]
=
$request
->
input
(
'goods_type'
);
}
$data
[
'k1'
]
=
time
();
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$url
=
Config
(
'website.api_domain'
)
.
'cart/confirm'
;
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
if
(
$response
[
'err_code'
]
==
0
)
{
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
$response
[
'data'
]];
}
else
{
...
...
public/js/add_order.js
View file @
5e1bd152
...
...
@@ -131,7 +131,7 @@
$
(
'.address-detail'
).
text
(
data
.
province_val
+
data
.
city_val
+
data
.
district_val
+
data
.
detail_address
);
if
(
cart_ids
.
length
>
0
)
{
loading
.
confirm
(
user_id
,
address_id
,
cart_ids
,
user_coupon_id
,
goods_type
);
// 确认订单信息
loading
.
confirm
(
user_id
,
address_id
,
cart_ids
,
user_coupon_id
,
goods_type
,
is_online
);
// 确认订单信息
}
}
}
...
...
@@ -141,7 +141,7 @@
$
(
'.address_id'
).
val
(
''
);
if
(
cart_ids
.
length
>
0
)
{
loading
.
confirm
(
user_id
,
address_id
,
cart_ids
,
user_coupon_id
,
goods_type
);
// 确认订单信息
loading
.
confirm
(
user_id
,
address_id
,
cart_ids
,
user_coupon_id
,
goods_type
,
is_online
);
// 确认订单信息
}
}
})
...
...
@@ -520,7 +520,7 @@
$
(
'.user_coupon_id'
).
val
(
''
);
}
loading
.
confirm
(
user_id
,
address_id
,
cart_ids
,
coupon_id
,
goods_type
);
// 确认订单信息
loading
.
confirm
(
user_id
,
address_id
,
cart_ids
,
coupon_id
,
goods_type
,
is_online
);
// 确认订单信息
})
// 切换销售类型
...
...
@@ -867,11 +867,18 @@
// 确认订单信息
confirm
:
function
(
user_id
,
address_id
,
cart_ids
,
user_coupon_id
,
goods_type
,
is_online
=
1
)
{
var
self
=
this
;
var
business_type
=
$
(
'#business_type'
);
// 自营其他业务
if
(
business_type
.
length
>
0
)
{
business_type
=
business_type
.
val
();
}
else
{
business_type
=
0
;
}
$
.
ajax
({
type
:
'post'
,
url
:
'/ajax/confirm'
,
data
:
{
uid
:
user_id
,
address_id
:
address_id
,
cart_ids
:
cart_ids
,
user_coupon_id
:
user_coupon_id
,
goods_type
:
goods_type
,
is_online
:
is_online
},
data
:
{
uid
:
user_id
,
address_id
:
address_id
,
cart_ids
:
cart_ids
,
user_coupon_id
:
user_coupon_id
,
goods_type
:
goods_type
,
is_online
:
is_online
,
business_type
:
business_type
},
dataType
:
"json"
,
success
:
function
(
resp
){
console
.
log
(
resp
);
if
(
resp
.
errcode
==
0
)
{
...
...
@@ -883,15 +890,17 @@
$
(
'.goods_amount_val'
).
empty
().
text
(
data
.
goods_total_format
);
// 商品总额
$
(
'.order_amount'
).
empty
().
text
(
data
.
order_amount_format
);
// 订单总额
// 若优惠券ID存在,则不用再推荐
if
(
!
user_coupon_id
)
{
$
(
'.preferential_price'
).
hide
();
$
(
'.preferential_price_val'
).
empty
();
self
.
getCoupon
(
user_id
,
goods_type
,
cart_ids
);
// 获取最优的优惠券
}
else
{
$
(
'.preferential_price'
).
show
();
$
(
'.preferential_price_val'
).
empty
().
text
(
data
.
preferential_price_format
);
// 联营和自营线上
if
(
is_online
!=
2
)
{
if
(
!
user_coupon_id
)
{
// 若优惠券ID不存在,则推荐
$
(
'.preferential_price'
).
hide
();
$
(
'.preferential_price_val'
).
empty
();
self
.
getCoupon
(
user_id
,
goods_type
,
cart_ids
);
// 获取最优的优惠券
}
else
{
$
(
'.preferential_price'
).
show
();
$
(
'.preferential_price_val'
).
empty
().
text
(
data
.
preferential_price_format
);
}
}
if
(
data
.
extend_fee
)
{
...
...
@@ -899,7 +908,7 @@
$
(
'.extend_fee_val'
).
empty
().
text
(
data
.
extend_fee_format
);
// 附加费
}
if
(
goods_type
==
2
)
{
if
(
goods_type
==
2
&&
business_type
!=
2
)
{
// 自营仓库损耗不需要运费
$
(
'.express_fee_val'
).
empty
().
text
(
data
.
finally_shipping_price_format
);
// 运费
}
}
else
{
...
...
resources/views/addOtherOrder/content.blade.php
View file @
5e1bd152
...
...
@@ -349,7 +349,7 @@
<p
class=
"con-val goods_amount_val"
></p>
</div>
<div
class=
"row"
>
<
!-- <
div class="row">
<input type="hidden" class="user_coupon_id" name="user_coupon_id" value="">
<p class="con-title"><span style="margin-top: 5px;">选择优惠券:</span></p>
<p class="con-val">
...
...
@@ -362,7 +362,7 @@
<div class="row preferential_price">
<p class="con-title"><span>优惠金额:</span></p>
<p class="con-val preferential_price_val">0.00</p>
</div>
</div>
-->
<div
class=
"row extend_fee"
>
<p
class=
"con-title"
><span>
附加费:
</span></p>
...
...
resources/views/detail/content.blade.php
View file @
5e1bd152
...
...
@@ -519,7 +519,7 @@
<table>
<tr>
<td>
商品总额:
</td>
<td>
{{$currency}}
<span
id=
"order-total"
class=
"amount"
>
{{$order_price_info['goods_price']
? $order_price_info['goods_price'] : $order_info['order_amount']
}}
</span></td>
<td>
{{$currency}}
<span
id=
"order-total"
class=
"amount"
>
{{$order_price_info['goods_price']}}
</span></td>
</tr>
@if (isset($order_price_info['ext_price']))
...
...
@@ -559,7 +559,7 @@
@endif
<tr>
<td>
{{ isset($order_temp_info)
&&
$order_temp_info['order_type'] == 3 ? '(自营内部采购下单享95折优惠)' : '' }}订单总额:
</td>
<td>
{{ isset($order_temp_info)
&&
$order_temp_info['order_type'] == 3
&&
!$order_temp_info['business_type']
? '(自营内部采购下单享95折优惠)' : '' }}订单总额:
</td>
<td>
<span
style=
"color:red;font-size:20px"
>
{{$currency}}
<span
class=
"amount"
>
{{$order_info['order_amount']}}
</span>
...
...
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