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
65a3beb4
authored
Jan 15, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
购物车添加赠品
parent
e6acc26d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
6 deletions
public/js/add_order.js
resources/views/addOrder/content.blade.php
resources/views/detail/detail_items_info.php
public/js/add_order.js
View file @
65a3beb4
...
...
@@ -355,8 +355,10 @@
case
1
:
html
+=
'<th>限时限量</th>'
;
break
;
case
2
:
html
+=
'<th>活动价</th>'
;
break
;
case
3
:
html
+=
'<th>会员价</th>'
;
break
;
case
6
:
html
+=
'<th>自营清库存</th>'
;
break
;
case
7
:
html
+=
'<th>团购价</th>'
;
break
;
case
8
:
html
+=
'<th>折扣价</th>'
;
break
;
case
10
:
html
+=
'<th>活动打折</th>'
;
break
;
default
:
html
+=
'<th></th>'
;
break
;
}
}
...
...
@@ -944,8 +946,10 @@
var
order_amount
=
0
;
var
currency
=
''
;
var
cart_ids
=
[];
var
cart_gift
=
resp
.
data
.
cart_gift
;
// 订单赠品信息
if
(
len
==
0
)
return
false
;
if
(
len
>
0
)
{
var
buyer
=
''
;
// list = list.reverse();
// 购物车列表
...
...
@@ -994,7 +998,7 @@
var
address_id
=
$
(
'.address_id'
).
val
();
self
.
confirm
(
user_id
,
address_id
,
cart_ids
,
user_coupon_id
,
goods_type
,
is_online
);
// 确认订单信息
}
// 自营商品检查数量
// if (goods_type == 2) { // 20200826 订单合并后,不以goods_type为判断条件
...
...
@@ -1033,7 +1037,33 @@
self
.
lists
(
user_id
,
goods_type
,
is_online
,
delivery_place
);
// 加载购物车列表
}
// }
}
else
{
// 赠品信息
if
(
cart_gift
.
err_code
==
0
)
{
var
gift_len
=
cart_gift
.
data
.
length
;
var
gift_data
=
cart_gift
.
data
;
var
str
=
''
;
for
(
var
i
=
0
;
i
<
gift_len
;
i
++
)
{
str
+=
'<tr>\
<td>'
+
gift_data
[
i
].
activity_id
+
'</td>\
<td>\
<div class="layer-photos-demo">\
<a><img src="'
+
gift_data
[
i
].
pic
+
'" width="20" height="20"></a>\
</div>\
</td>\
<td>'
+
gift_data
[
i
].
item_name
+
'</td>\
<td>'
+
gift_data
[
i
].
num
+
'</td>\
<td>'
+
gift_data
[
i
].
content
+
'</td>\
</tr>'
;
}
$
(
'.gift-table tbody'
).
append
(
str
);
}
return
false
;
}
layer
.
msg
(
resp
.
errmsg
||
'网络异常'
);
$
(
'.shop-lists'
).
hide
();
...
...
@@ -1043,7 +1073,6 @@
}
else
{
$
(
'.amount-section'
).
hide
();
}
}
},
});
},
...
...
@@ -1099,7 +1128,7 @@
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
,
business_type
:
business_type
,
zy_delivery_type
:
zy_delivery_type
},
dataType
:
"json"
,
success
:
function
(
resp
){
console
.
log
(
resp
);
success
:
function
(
resp
){
if
(
resp
.
errcode
==
0
)
{
var
data
=
resp
.
data
;
...
...
resources/views/addOrder/content.blade.php
View file @
65a3beb4
...
...
@@ -462,6 +462,27 @@
</div>
</div>
<div
class=
"order-gift-info"
>
<div
class=
"ibox-title"
>
<h3>
赠品信息
</h3>
</div>
<div
class=
"ibox-content"
>
<table
class=
"table table-bordered table-hover gift-table"
>
<thead>
<tr>
<th
width=
"10%"
>
活动ID
</th>
<th
width=
"20%"
>
赠品图片
</th>
<th
width=
"20%"
>
赠品名称
</th>
<th
width=
"20%"
>
赠品数量
</th>
<th
width=
"30%"
>
赠品说明
</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<div
class=
"order-info"
>
<div
class=
"ibox-title"
>
<h3>
订单信息
</h3>
...
...
resources/views/detail/detail_items_info.php
View file @
65a3beb4
...
...
@@ -228,7 +228,7 @@
<tbody>
<?php
foreach
(
$order_gift
as
$k
=>
$v
)
{
?>
<tr>
<td>
<?=
$v
[
'activity_id'
]
?>
</td>
<td>
<?=
$v
[
'
gift_info'
][
'
activity_id'
]
?>
</td>
<td>
<div
class=
"layer-photos-demo"
>
<a><img
src=
"
<?=
$v
[
'gift_info'
][
'pic'
]
?>
"
width=
"20"
height=
"20"
></a>
...
...
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