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
709bc2c1
authored
Jan 27, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'zjl_order_gift_20210107'
parents
784c7247
0e942c37
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
158 additions
and
93 deletions
app/Http/Controllers/OrderController.php
public/css/detail.css
public/js/add_order.js
resources/views/addOrder/content.blade.php
resources/views/detail/detail_base_info.blade.php
resources/views/detail/detail_items_info.php
app/Http/Controllers/OrderController.php
View file @
709bc2c1
...
@@ -1716,9 +1716,10 @@ Class OrderController extends Controller
...
@@ -1716,9 +1716,10 @@ Class OrderController extends Controller
'order_shipping_inside'
=>
$temp
[
'data'
][
'order_shipping_inside'
],
'order_shipping_inside'
=>
$temp
[
'data'
][
'order_shipping_inside'
],
'actionLog'
=>
$actionLog
,
'actionLog'
=>
$actionLog
,
'erpPayLog'
=>
$erpPayLog
,
'erpPayLog'
=>
$erpPayLog
,
'order_refund_info'
=>
$temp
[
'data'
][
'order_refund_info'
],
//
'order_refund_info' => $temp['data']['order_refund_info'],
'order_refund_items'
=>
$temp
[
'data'
][
'order_refund_items'
],
//
'order_refund_items' => $temp['data']['order_refund_items'],
'order_extra'
=>
$temp
[
'data'
][
'order_extra'
],
'order_extra'
=>
$temp
[
'data'
][
'order_extra'
],
'order_gift'
=>
$temp
[
'data'
][
'order_gift'
],
];
];
// 自营物流信息
// 自营物流信息
...
...
public/css/detail.css
View file @
709bc2c1
...
@@ -119,7 +119,7 @@ li {
...
@@ -119,7 +119,7 @@ li {
}
}
/* 后台新增订单 start */
/* 后台新增订单 start */
.user-info
,
.address-content
,
.invoice-content
,
.order-info
,
.client-info
{
.user-info
,
.address-content
,
.invoice-content
,
.order-info
,
.client-info
,
.order-gift-info
{
display
:
none
;
display
:
none
;
}
}
...
...
public/js/add_order.js
View file @
709bc2c1
...
@@ -355,8 +355,10 @@
...
@@ -355,8 +355,10 @@
case
1
:
html
+=
'<th>限时限量</th>'
;
break
;
case
1
:
html
+=
'<th>限时限量</th>'
;
break
;
case
2
:
html
+=
'<th>活动价</th>'
;
break
;
case
2
:
html
+=
'<th>活动价</th>'
;
break
;
case
3
:
html
+=
'<th>会员价</th>'
;
break
;
case
3
:
html
+=
'<th>会员价</th>'
;
break
;
case
6
:
html
+=
'<th>自营清库存</th>'
;
break
;
case
7
:
html
+=
'<th>团购价</th>'
;
break
;
case
7
:
html
+=
'<th>团购价</th>'
;
break
;
case
8
:
html
+=
'<th>折扣价</th>'
;
break
;
case
8
:
html
+=
'<th>折扣价</th>'
;
break
;
case
10
:
html
+=
'<th>活动打折</th>'
;
break
;
default
:
html
+=
'<th></th>'
;
break
;
default
:
html
+=
'<th></th>'
;
break
;
}
}
}
}
...
@@ -407,11 +409,11 @@
...
@@ -407,11 +409,11 @@
// 添加到商品列表
// 添加到商品列表
$
(
'.add-to-lists'
).
click
(
function
()
{
$
(
'.add-to-lists'
).
click
(
function
()
{
var
goods_min_num
=
$
(
this
).
parents
(
'.sku-info'
).
find
(
'.moq'
).
text
();
var
goods_min_num
=
$
(
this
).
parents
(
'.sku-info'
).
find
(
'.moq'
).
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
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
;
if
(
internal_uid
)
{
if
(
internal_uid
)
{
user_id
=
internal_uid
;
user_id
=
internal_uid
;
...
@@ -938,63 +940,65 @@
...
@@ -938,63 +940,65 @@
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
resp
){
success
:
function
(
resp
){
if
(
resp
.
errcode
==
0
)
{
if
(
resp
.
errcode
==
0
)
{
var
list
=
resp
.
data
.
list
;
var
list
=
resp
.
data
.
list
;
var
len
=
list
.
length
;
var
len
=
list
.
length
;
var
html
=
''
;
var
html
=
''
;
var
order_amount
=
0
;
var
order_amount
=
0
;
var
currency
=
''
;
var
currency
=
''
;
var
cart_ids
=
[];
var
cart_ids
=
[];
var
cart_gift
=
resp
.
data
.
cart_gift
;
// 订单赠品信息
if
(
len
>
0
)
{
var
buyer
=
''
;
if
(
len
==
0
)
return
false
;
// list = list.reverse();
// 购物车列表
var
buyer
=
''
;
for
(
var
i
=
len
-
1
;
i
>=
0
;
i
--
)
{
// list = list.reverse();
html
+=
'<tr data-cid="'
+
list
[
i
].
cart_id
+
'" data-type="'
+
list
[
i
].
type
+
'" min_buy="'
+
list
[
i
].
min_buy
+
'" data-sup_name="'
+
list
[
i
].
supplier_name
+
'" data-sup_id="'
+
list
[
i
].
supplier_id
+
'" data-brand_id="'
+
list
[
i
].
brand_id
+
'" data-brand_name="'
+
list
[
i
].
brand_name
+
'" data-goods_type="'
+
list
[
i
].
goods_type
+
'">'
+
// 购物车列表
'<td>'
+
(
len
-
i
)
+
'</td>'
+
for
(
var
i
=
len
-
1
;
i
>=
0
;
i
--
)
{
'<td class="goods_id">'
+
list
[
i
].
goods_id
+
'</td>'
+
html
+=
'<tr data-cid="'
+
list
[
i
].
cart_id
+
'" data-type="'
+
list
[
i
].
type
+
'" min_buy="'
+
list
[
i
].
min_buy
+
'" data-sup_name="'
+
list
[
i
].
supplier_name
+
'" data-sup_id="'
+
list
[
i
].
supplier_id
+
'" data-brand_id="'
+
list
[
i
].
brand_id
+
'" data-brand_name="'
+
list
[
i
].
brand_name
+
'" data-goods_type="'
+
list
[
i
].
goods_type
+
'">'
+
'<td>'
+
list
[
i
].
goods_name
+
'</td>'
+
'<td>'
+
(
len
-
i
)
+
'</td>'
+
'<td>'
+
list
[
i
].
brand_name
+
'</td>'
;
'<td class="goods_id">'
+
list
[
i
].
goods_id
+
'</td>'
+
'<td>'
+
list
[
i
].
goods_name
+
'</td>'
+
if
(
goods_type
==
1
)
{
// 联营添加标准品牌列
'<td>'
+
list
[
i
].
brand_name
+
'</td>'
;
html
+=
list
[
i
].
standard_brand_name
?
'<td class="standard-brand-yellow">'
:
'<td>'
;
if
(
goods_type
==
1
)
{
// 联营添加标准品牌列
html
+=
'<input type="text" class="change_standard_brand_name" name="standard_brand_name" value="'
+
list
[
i
].
standard_brand_name
+
'" readonly /><i class="fa fa-exclamation-triangle fa-2x select-standard-brand" aria-hidden="true" data-type=1></i></td>'
;
html
+=
list
[
i
].
standard_brand_name
?
'<td class="standard-brand-yellow">'
:
'<td>'
;
}
html
+=
'<input type="text" class="change_standard_brand_name" name="standard_brand_name" value="'
+
list
[
i
].
standard_brand_name
+
'" readonly /><i class="fa fa-exclamation-triangle fa-2x select-standard-brand" aria-hidden="true" data-type=1></i></td>'
;
}
// if (goods_type == 2) {
// if (goods_type == 2) {
var
mpl
=
list
[
i
].
mpl
?
list
[
i
].
mpl
:
''
;
var
mpl
=
list
[
i
].
mpl
?
list
[
i
].
mpl
:
''
;
html
+=
'<td><span class="goods_mpl">'
+
mpl
+
'</span></td>'
;
html
+=
'<td><span class="goods_mpl">'
+
mpl
+
'</span></td>'
;
// }
// }
html
+=
'<td><input type="text" class="goods_num" name="goods_num" value="'
+
list
[
i
].
goods_number
+
'" data-origin_num="'
+
list
[
i
].
goods_number
+
'"></td>'
+
'<td class="goods_price">'
+
list
[
i
].
goods_price
+
'</td>'
+
'<td class="goods_amount">'
+
list
[
i
].
goods_amount_format
+
'</td>'
+
'<td>'
+
list
[
i
].
delivery_time
+
'</td>'
;
html
+=
'<td><input type="text" class="goods_num" name="goods_num" value="'
+
list
[
i
].
goods_number
+
'" data-origin_num="'
+
list
[
i
].
goods_number
+
'"></td>'
+
if
(
goods_type
==
1
)
{
'<td class="goods_price">'
+
list
[
i
].
goods_price
+
'</td>'
+
html
+=
'<td>'
+
list
[
i
].
supplier_name
+
'</td>'
;
'<td class="goods_amount">'
+
list
[
i
].
goods_amount_format
+
'</td>'
+
'<td>'
+
list
[
i
].
delivery_time
+
'</td>'
;
if
(
goods_type
==
1
)
{
html
+=
'<td>'
+
list
[
i
].
supplier_name
+
'</td>'
;
buyer
=
list
[
i
].
buyer_id
!=
'0'
?
list
[
i
].
buyer_id
:
''
;
buyer
=
list
[
i
].
buyer_id
!=
'0'
?
list
[
i
].
buyer_id
:
''
;
html
+=
'<td>'
+
buyer
+
'</td>'
;
html
+=
'<td>'
+
buyer
+
'</td>'
;
html
+=
'<td>'
+
list
[
i
].
batch
+
'</td>'
;
html
+=
'<td>'
+
list
[
i
].
batch
+
'</td>'
;
}
}
html
+=
'<td><a class="btn btn-danger btn-xs remove-goods">删除</a></td>'
+
html
+=
'<td><a class="btn btn-danger btn-xs remove-goods">删除</a></td>'
+
'</tr>'
;
'</tr>'
;
cart_ids
.
push
(
list
[
i
].
cart_id
);
// 购物车ID集合
cart_ids
.
push
(
list
[
i
].
cart_id
);
// 购物车ID集合
}
}
$
(
'.shop-lists'
).
show
();
$
(
'.shop-lists'
).
show
();
$
(
'.shop-table tbody'
).
empty
().
append
(
html
);
$
(
'.shop-table tbody'
).
empty
().
append
(
html
);
$
(
'#sale_type'
).
val
(
list
[
0
].
sale_type
);
// 自营线上订单选择销售类型
$
(
'#sale_type'
).
val
(
list
[
0
].
sale_type
);
// 自营线上订单选择销售类型
var
address_id
=
$
(
'.address_id'
).
val
();
var
address_id
=
$
(
'.address_id'
).
val
();
self
.
confirm
(
user_id
,
address_id
,
cart_ids
,
user_coupon_id
,
goods_type
,
is_online
);
// 确认订单信息
self
.
confirm
(
user_id
,
address_id
,
cart_ids
,
user_coupon_id
,
goods_type
,
is_online
);
// 确认订单信息
}
// 自营商品检查数量
// 自营商品检查数量
// if (goods_type == 2) { // 20200826 订单合并后,不以goods_type为判断条件
// if (goods_type == 2) { // 20200826 订单合并后,不以goods_type为判断条件
...
@@ -1033,17 +1037,46 @@
...
@@ -1033,17 +1037,46 @@
self
.
lists
(
user_id
,
goods_type
,
is_online
,
delivery_place
);
// 加载购物车列表
self
.
lists
(
user_id
,
goods_type
,
is_online
,
delivery_place
);
// 加载购物车列表
}
}
// }
// }
}
else
{
layer
.
msg
(
resp
.
errmsg
||
'网络异常'
);
// 赠品信息
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>'
;
}
$
(
'.shop-lists'
).
hide
(
);
$
(
'.gift-table tbody'
).
empty
().
append
(
str
);
if
(
is_online
)
{
$
(
'.order-gift-info'
).
show
();
$
(
'.order-info'
).
hide
();
}
else
{
}
else
{
$
(
'.amount-section'
).
hide
();
$
(
'.order-gift-info'
).
hide
();
}
}
}
return
false
;
}
layer
.
msg
(
resp
.
errmsg
||
'网络异常'
);
$
(
'.shop-lists'
).
hide
();
if
(
is_online
)
{
$
(
'.order-info'
).
hide
();
}
else
{
$
(
'.amount-section'
).
hide
();
}
},
},
});
});
},
},
...
@@ -1099,7 +1132,7 @@
...
@@ -1099,7 +1132,7 @@
url
:
'/ajax/confirm'
,
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
},
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"
,
dataType
:
"json"
,
success
:
function
(
resp
){
console
.
log
(
resp
);
success
:
function
(
resp
){
if
(
resp
.
errcode
==
0
)
{
if
(
resp
.
errcode
==
0
)
{
var
data
=
resp
.
data
;
var
data
=
resp
.
data
;
...
...
resources/views/addOrder/content.blade.php
View file @
709bc2c1
...
@@ -461,6 +461,27 @@
...
@@ -461,6 +461,27 @@
<textarea
name=
"remark"
id=
"remark"
class=
"form-control"
placeholder=
"填写订单备注信息"
></textarea>
<textarea
name=
"remark"
id=
"remark"
class=
"form-control"
placeholder=
"填写订单备注信息"
></textarea>
</div>
</div>
</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=
"order-info"
>
<div
class=
"ibox-title"
>
<div
class=
"ibox-title"
>
...
...
resources/views/detail/detail_base_info.blade.php
View file @
709bc2c1
...
@@ -22,6 +22,9 @@
...
@@ -22,6 +22,9 @@
@endif -->
@endif -->
<th
width=
"5%"
>
订单编号
</th>
<th
width=
"5%"
>
订单编号
</th>
@if ($order_info['order_goods_type'] == 1)
<th
width=
"13%"
>
ERP单号
</th>
@endif
<th>
订单状态
</th>
<th>
订单状态
</th>
<th>
用户账号
</th>
<th>
用户账号
</th>
@if ($username != 'vpadmin@ichunt.com')
@if ($username != 'vpadmin@ichunt.com')
...
@@ -42,6 +45,9 @@
...
@@ -42,6 +45,9 @@
<tr>
<tr>
<td>
{{ $order_info['order_sn'] }}
</td>
<td>
{{ $order_info['order_sn'] }}
</td>
@if ($order_info['order_goods_type'] == 1)
<td>
{{ $order_temp_info['erp_sn'] }}
</td>
@endif
<td>
{{ Config('params.order_status')[$order_info['status']] }}
</td>
<td>
{{ Config('params.order_status')[$order_info['status']] }}
</td>
<td>
{{ isset($user_info['mobile']) ? $user_info['mobile'] : $user_info['email'] }}
</td>
<td>
{{ isset($user_info['mobile']) ? $user_info['mobile'] : $user_info['email'] }}
</td>
@if ($username != 'vpadmin@ichunt.com')
@if ($username != 'vpadmin@ichunt.com')
...
...
resources/views/detail/detail_items_info.php
View file @
709bc2c1
...
@@ -211,39 +211,43 @@
...
@@ -211,39 +211,43 @@
<?php
}
?>
<?php
}
?>
</tfoot>
</tfoot>
</table>
</table>
</div>
<!-- 退款已处理 -->
<!-- 赠品信息 -->
<?php
if
(
$order_refund_info
[
'status'
]
==
10
&&
$order_price_info
[
'refund_price'
]
!=
0
)
{
?>
<?php
if
(
!
empty
(
$order_gift
))
{
?>
<hr>
<hr>
<table
class=
"table"
>
<table
class=
"table table-bordered"
>
<thead>
<thead>
<tr
class=
"caption"
>
<tr
class=
"caption"
>
<th>
退款型号
</th>
<th>
赠品活动ID
</th>
<th>
退款数量
</th>
<th>
赠品图片
</th>
<th>
价格
</th>
<th>
赠品名称
</th>
<th>
小计
</th>
<th>
数量
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<?php
foreach
(
$order_gift
as
$k
=>
$v
)
{
?>
<?php
foreach
(
$order_refund_items
as
$k
=>
$v
)
{
?>
<tr>
<td>
<?=
$v
[
'goods_name'
]
?>
</td>
<td>
<?=
$v
[
'refund_num'
]
?>
</td>
<td>
<?=
$currency
.
$v
[
'single_pre_price'
]
?>
</td>
<td>
<?=
$currency
.
number_format
(
$v
[
'refund_num'
]
*
$v
[
'single_pre_price'
],
4
)
?>
</td>
</tr>
<?php
}
?>
<tr>
<tr>
<td>
手动差价
</td>
<td>
<?=
$v
[
'gift_info'
][
'activity_id'
]
?>
</td>
<td></td>
<td>
<td></td>
<div
class=
"layer-photos-demo"
>
<td>
<?=
'-'
.
$order_refund_info
[
'price_fall'
]
?>
</td>
<a><img
src=
"
<?=
$v
[
'gift_info'
][
'pic'
]
?>
"
width=
"20"
height=
"20"
></a>
</div>
</td>
<td>
<?=
$v
[
'gift_info'
][
'item_name'
]
?>
</td>
<td>
<?=
$v
[
'gift_info'
][
'num'
]
?>
</td>
</tr>
</tr>
</tbody>
<?php
}
?>
</table>
</tbody>
<?php
}
?>
</div>
<script>
layer
.
photos
({
photos
:
'.layer-photos-demo'
,
anim
:
5
//0-6的选择,指定弹出图片动画类型,默认随机(请注意,3.0之前的版本用shift参数)
});
</script>
</table>
<?php
}
?>
<div
class=
"order-total"
style=
"margin-top: 30px;"
>
<div
class=
"order-total"
style=
"margin-top: 30px;"
>
<div>
<div>
...
...
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