Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
0993ed17
Commit
0993ed17
authored
Dec 01, 2019
by
Junling Bu
Browse files
feat[litemall-admin, litemall-admin-api, litemall-core]: 管理后台发货时快递公司选择框
parent
6cb57921
Changes
4
Hide whitespace changes
Inline
Side-by-side
litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminOrderController.java
View file @
0993ed17
...
...
@@ -5,6 +5,9 @@ import org.apache.commons.logging.LogFactory;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.linlinjava.litemall.admin.annotation.RequiresPermissionsDesc
;
import
org.linlinjava.litemall.admin.service.AdminOrderService
;
import
org.linlinjava.litemall.core.express.ExpressService
;
import
org.linlinjava.litemall.core.notify.NotifyService
;
import
org.linlinjava.litemall.core.util.ResponseUtil
;
import
org.linlinjava.litemall.core.validator.Order
;
import
org.linlinjava.litemall.core.validator.Sort
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -22,6 +25,8 @@ public class AdminOrderController {
@Autowired
private
AdminOrderService
adminOrderService
;
@Autowired
private
ExpressService
expressService
;
/**
* 查询订单
...
...
@@ -47,6 +52,16 @@ public class AdminOrderController {
return
adminOrderService
.
list
(
userId
,
orderSn
,
orderStatusArray
,
page
,
limit
,
sort
,
order
);
}
/**
* 查询物流公司
*
* @return
*/
@GetMapping
(
"/channel"
)
public
Object
channel
()
{
return
ResponseUtil
.
ok
(
expressService
.
getVendors
());
}
/**
* 订单详情
*
...
...
@@ -99,5 +114,4 @@ public class AdminOrderController {
public
Object
reply
(
@RequestBody
String
body
)
{
return
adminOrderService
.
reply
(
body
);
}
}
litemall-admin/src/api/order.js
View file @
0993ed17
...
...
@@ -43,3 +43,10 @@ export function replyComment(data) {
data
})
}
export
function
listChannel
(
id
)
{
return
request
({
url
:
'
/order/channel
'
,
method
:
'
get
'
})
}
litemall-admin/src/views/mall/order.vue
View file @
0993ed17
...
...
@@ -3,10 +3,10 @@
<!-- 查询和其他操作 -->
<div
class=
"filter-container"
>
<el-input
v-model=
"listQuery.userId"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入用户ID"
/>
<el-input
v-model=
"listQuery.orderSn"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入订单编号"
/>
<el-input
v-model=
"listQuery.userId"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入用户ID"
/>
<el-input
v-model=
"listQuery.orderSn"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入订单编号"
/>
<el-select
v-model=
"listQuery.orderStatusArray"
multiple
style=
"width: 200px"
class=
"filter-item"
placeholder=
"请选择订单状态"
>
<el-option
v-for=
"(key, value) in statusMap"
:key=
"key"
:label=
"key"
:value=
"value"
/>
<el-option
v-for=
"(key, value) in statusMap"
:key=
"key"
:label=
"key"
:value=
"value"
/>
</el-select>
<el-button
v-permission=
"['GET /admin/order/list']"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleFilter"
>
查找
</el-button>
<el-button
:loading=
"downloadLoading"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-download"
@
click=
"handleDownload"
>
导出
</el-button>
...
...
@@ -15,9 +15,9 @@
<!-- 查询结果 -->
<el-table
v-loading=
"listLoading"
:data=
"list"
element-loading-text=
"正在查询中。。。"
border
fit
highlight-current-row
>
<el-table-column
align=
"center"
min-width=
"100"
label=
"订单编号"
prop=
"orderSn"
/>
<el-table-column
align=
"center"
min-width=
"100"
label=
"订单编号"
prop=
"orderSn"
/>
<el-table-column
align=
"center"
label=
"用户ID"
prop=
"userId"
/>
<el-table-column
align=
"center"
label=
"用户ID"
prop=
"userId"
/>
<el-table-column
align=
"center"
label=
"订单状态"
prop=
"orderStatus"
>
<template
slot-scope=
"scope"
>
...
...
@@ -25,21 +25,21 @@
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"订单金额"
prop=
"orderPrice"
/>
<el-table-column
align=
"center"
label=
"订单金额"
prop=
"orderPrice"
/>
<el-table-column
align=
"center"
label=
"支付金额"
prop=
"actualPrice"
/>
<el-table-column
align=
"center"
label=
"支付金额"
prop=
"actualPrice"
/>
<el-table-column
align=
"center"
label=
"支付时间"
prop=
"payTime"
/>
<el-table-column
align=
"center"
label=
"支付时间"
prop=
"payTime"
/>
<el-table-column
align=
"center"
label=
"物流单号"
prop=
"shipSn"
/>
<el-table-column
align=
"center"
label=
"物流单号"
prop=
"shipSn"
/>
<el-table-column
align=
"center"
label=
"物流渠道"
prop=
"shipChannel"
/>
<el-table-column
align=
"center"
label=
"物流渠道"
prop=
"shipChannel"
/>
<el-table-column
align=
"center"
label=
"操作"
width=
"200"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
v-permission=
"['GET /admin/order/detail']"
type=
"primary"
size=
"mini"
@
click=
"handleDetail(scope.row)"
>
详情
</el-button>
<el-button
v-permission=
"['POST /admin/order/ship']"
v-if=
"scope.row.orderStatus==201"
type=
"primary"
size=
"mini"
@
click=
"handleShip(scope.row)"
>
发货
</el-button>
<el-button
v-permission=
"['POST /admin/order/refund']"
v-if=
"scope.row.orderStatus==202||scope.row.orderStatus==204"
type=
"primary"
size=
"mini"
@
click=
"handleRefund(scope.row)"
>
退款
</el-button>
<el-button
v-if=
"scope.row.orderStatus==201"
v-permission=
"['POST /admin/order/ship']"
type=
"primary"
size=
"mini"
@
click=
"handleShip(scope.row)"
>
发货
</el-button>
<el-button
v-if=
"scope.row.orderStatus==202||scope.row.orderStatus==204"
v-permission=
"['POST /admin/order/refund']"
type=
"primary"
size=
"mini"
@
click=
"handleRefund(scope.row)"
>
退款
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -114,10 +114,12 @@
<el-dialog
:visible.sync=
"shipDialogVisible"
title=
"发货"
>
<el-form
ref=
"shipForm"
:model=
"shipForm"
status-icon
label-position=
"left"
label-width=
"100px"
style=
"width: 400px; margin-left:50px;"
>
<el-form-item
label=
"快递公司"
prop=
"shipChannel"
>
<el-input
v-model=
"shipForm.shipChannel"
/>
<el-select
v-model=
"shipForm.shipChannel"
placeholder=
"请选择"
>
<el-option
v-for=
"item in channels"
:key=
"item.code"
:label=
"item.name"
:value=
"item.code"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"快递编号"
prop=
"shipSn"
>
<el-input
v-model=
"shipForm.shipSn"
/>
<el-input
v-model=
"shipForm.shipSn"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -130,7 +132,7 @@
<el-dialog
:visible.sync=
"refundDialogVisible"
title=
"退款"
>
<el-form
ref=
"refundForm"
:model=
"refundForm"
status-icon
label-position=
"left"
label-width=
"100px"
style=
"width: 400px; margin-left:50px;"
>
<el-form-item
label=
"退款金额"
prop=
"refundMoney"
>
<el-input
v-model=
"refundForm.refundMoney"
:disabled=
"true"
/>
<el-input
v-model=
"refundForm.refundMoney"
:disabled=
"true"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -143,7 +145,7 @@
</template>
<
script
>
import
{
detailOrder
,
listOrder
,
refundOrder
,
shipOrder
}
from
'
@/api/order
'
import
{
detailOrder
,
listOrder
,
listChannel
,
refundOrder
,
shipOrder
}
from
'
@/api/order
'
import
Pagination
from
'
@/components/Pagination
'
// Secondary package based on el-pagination
import
checkPermission
from
'
@/utils/permission
'
// 权限判断函数
...
...
@@ -201,11 +203,13 @@ export default {
refundMoney
:
undefined
},
refundDialogVisible
:
false
,
downloadLoading
:
false
downloadLoading
:
false
,
channels
:
[]
}
},
created
()
{
this
.
getList
()
this
.
getChannel
()
},
methods
:
{
checkPermission
,
...
...
@@ -221,6 +225,11 @@ export default {
this
.
listLoading
=
false
})
},
getChannel
()
{
listChannel
().
then
(
response
=>
{
this
.
channels
=
response
.
data
.
data
})
},
handleFilter
()
{
this
.
listQuery
.
page
=
1
this
.
getList
()
...
...
litemall-core/src/main/java/org/linlinjava/litemall/core/express/ExpressService.java
View file @
0993ed17
...
...
@@ -11,6 +11,7 @@ import org.springframework.util.Base64Utils;
import
java.net.URLEncoder
;
import
java.security.MessageDigest
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -48,6 +49,10 @@ public class ExpressService {
return
null
;
}
public
List
<
Map
<
String
,
String
>>
getVendors
()
{
return
properties
.
getVendors
();
}
/**
* 获取物流信息
*
...
...
Write
Preview
Supports
Markdown
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