Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ufo
/
ufo-platform
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
王水玲
6 years ago
Commit
d9380d4437f20e24795f455d0ce4b40960309cb5
2 parents
80fd1ce0
3482f6c7
Merge branch 'master' of
http://git.yoho.cn/ufo/ufo-platform
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
466 additions
and
30 deletions
common/pom.xml
common/src/main/java/com/yoho/ufo/service/impl/InboxService.java
dal/src/main/java/com/yoho/order/model/BuyerOrderReq.java
dal/src/main/java/com/yoho/order/model/SellerOrder.java
dal/src/main/resources/META-INF/mybatis/BuyerOrderMapper.xml
dal/src/main/resources/META-INF/mybatis/SellerOrderMapper.xml
order/src/main/java/com/yoho/ufo/order/constant/Constant.java
order/src/main/java/com/yoho/ufo/order/controller/BuyerOrderController.java
order/src/main/java/com/yoho/ufo/order/service/IBuyerOrderService.java
order/src/main/java/com/yoho/ufo/order/service/impl/BuyerOrderServiceImpl.java
pom.xml
product/pom.xml
product/src/main/java/com/yoho/ufo/service/impl/ProductServiceImpl.java
web/src/main/resources/config.properties
web/src/main/webapp/META-INF/autoconf/config.properties
web/src/main/webapp/html/orderManage/list.html
common/pom.xml
View file @
d9380d4
...
...
@@ -53,6 +53,9 @@
<artifactId>
poi-ooxml
</artifactId>
<version>
3.16
</version>
</dependency>
<dependency>
<artifactId>
yohoufo-fore-inboxclient
</artifactId>
<groupId>
com.yohoufo.fore
</groupId>
</dependency>
</dependencies>
</project>
...
...
common/src/main/java/com/yoho/ufo/service/impl/InboxService.java
0 → 100644
View file @
d9380d4
package
com
.
yoho
.
ufo
.
service
.
impl
;
import
com.yohoufo.inboxclient.model.InBoxResponse
;
import
com.yohoufo.inboxclient.model.InboxReqVO
;
import
com.yohoufo.inboxclient.sdk.InBoxSDK
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* Created by li.ma on 2018/9/26.
* 发消息推送的接口
*/
@Service
public
class
InboxService
{
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
InboxService
.
class
);
@Autowired
private
InBoxSDK
inBoxSDK
;
// 场景的枚举值参考 com.yohobuy.ufo.model.enums.InboxBusinessTypeEnum
public
InBoxResponse
addInbox
(
Integer
businessType
,
Integer
type
,
String
params
,
int
uid
){
log
.
info
(
"addInbox with businessType is {}, type is {}, params is {}, uid is {}"
,
businessType
,
type
,
params
,
uid
);
InboxReqVO
reqVO
=
new
InboxReqVO
();
reqVO
.
setBusinessType
(
businessType
);
reqVO
.
setParams
(
params
);
reqVO
.
setType
(
type
);
reqVO
.
setUid
(
uid
);
InBoxResponse
inBoxResponse
=
inBoxSDK
.
addInbox
(
reqVO
);
log
.
info
(
"addInbox call result is {}"
,
inBoxResponse
);
return
inBoxResponse
;
}
}
...
...
dal/src/main/java/com/yoho/order/model/BuyerOrderReq.java
View file @
d9380d4
...
...
@@ -40,6 +40,8 @@ public class BuyerOrderReq extends PageRequestBO{
private
Integer
depotNo
;
private
Integer
navStatus
;
//头部bar的选中状态
public
Integer
getId
()
{
return
id
;
}
...
...
@@ -144,6 +146,14 @@ public class BuyerOrderReq extends PageRequestBO{
this
.
depotNo
=
depotNo
;
}
public
Integer
getNavStatus
()
{
return
navStatus
;
}
public
void
setNavStatus
(
Integer
navStatus
)
{
this
.
navStatus
=
navStatus
;
}
public
String
toString
()
{
return
"BuyerOrderListReq{"
+
"orderCode="
+
orderCode
+
...
...
dal/src/main/java/com/yoho/order/model/SellerOrder.java
View file @
d9380d4
...
...
@@ -28,8 +28,6 @@ public class SellerOrder implements Serializable {
private
BigDecimal
earnestMoney
;
//保证金
private
Byte
isCancel
;
//是否取消出售 0:未取消,1:已取消
/**
* 状态 0:待付保证金,1:上架关闭(卖家取消支付),3:上架关闭(卖家支付超时),
* 4:出售中,5:上架关闭(卖家取消出售),6:上架关闭(平台取消出售),7:已售出
...
...
@@ -104,14 +102,6 @@ public class SellerOrder implements Serializable {
this
.
earnestMoney
=
earnestMoney
;
}
public
Byte
getIsCancel
()
{
return
isCancel
;
}
public
void
setIsCancel
(
Byte
isCancel
)
{
this
.
isCancel
=
isCancel
;
}
public
Byte
getStatus
()
{
return
status
;
}
...
...
@@ -147,7 +137,6 @@ public class SellerOrder implements Serializable {
", payment="
+
payment
+
", income="
+
income
+
", earnestMoney="
+
earnestMoney
+
", isCancel="
+
isCancel
+
", status="
+
status
+
", createTime="
+
createTime
+
", updateTime="
+
updateTime
+
...
...
dal/src/main/resources/META-INF/mybatis/BuyerOrderMapper.xml
View file @
d9380d4
...
...
@@ -10,7 +10,7 @@
<result
column=
"payment"
property=
"payment"
jdbcType=
"TINYINT"
/>
<result
column=
"payment_type"
property=
"paymentType"
jdbcType=
"TINYINT"
/>
<result
column=
"is_cancel"
property=
"isCancel"
jdbcType=
"TINYINT"
/>
<result
column=
"amount"
property=
"
uid
"
jdbcType=
"DECIMAL"
/>
<result
column=
"amount"
property=
"
amount
"
jdbcType=
"DECIMAL"
/>
<result
column=
"ship_fee"
property=
"shipFee"
jdbcType=
"DECIMAL"
/>
<result
column=
"status"
property=
"status"
jdbcType=
"TINYINT"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"INTEGER"
/>
...
...
@@ -30,10 +30,13 @@
<select
id=
"selectCountByStatus"
resultType=
"java.lang.Integer"
>
select count(1)
from buyer_order where status in
from buyer_order where 1=1
<if
test=
"list != null and list.size()>0"
>
and status in
<foreach
collection=
"list"
item=
"status"
open=
"("
close=
")"
separator=
","
>
#{status}
</foreach>
</if>
</select>
<sql
id=
"Query_Order_Sql"
>
...
...
dal/src/main/resources/META-INF/mybatis/SellerOrderMapper.xml
View file @
d9380d4
...
...
@@ -10,14 +10,13 @@
<result
column=
"payment"
property=
"payment"
jdbcType=
"TINYINT"
/>
<result
column=
"income"
property=
"income"
jdbcType=
"DECIMAL"
/>
<result
column=
"earnest_money"
property=
"earnestMoney"
jdbcType=
"DECIMAL"
/>
<result
column=
"is_cancel"
property=
"isCancel"
jdbcType=
"TINYINT"
/>
<result
column=
"status"
property=
"status"
jdbcType=
"TINYINT"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"INTEGER"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"INTEGER"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, uid, order_code, skup, client_type, payment, income, earnest_money,
is_cancel,
id, uid, order_code, skup, client_type, payment, income, earnest_money,
status, create_time, update_time
</sql>
...
...
order/src/main/java/com/yoho/ufo/order/constant/Constant.java
View file @
d9380d4
...
...
@@ -2,6 +2,12 @@ package com.yoho.ufo.order.constant;
public
enum
Constant
{
//买家未付款
BUYER_ORDER_STATUS_BUYER_NOT_PAY
((
byte
)
0
),
//买家已付款
BUYER_ORDER_STATUS_BUYER_PAYED
((
byte
)
1
),
//商品调拨中(卖家发货,可查物流)
BUYER_ORDER_STATUS_ALLOCATING
((
byte
)
2
),
...
...
@@ -11,8 +17,32 @@ public enum Constant {
//待收货
BUYER_ORDER_STATUS_TO_BE_RECEIVED
((
byte
)
4
),
//订单已完成
BUYER_ORDER_STATUS_FINISHED
((
byte
)
5
),
//买家付款前卖家取消
BUYER_ORDER_STATUS_SELLER_CANCEL_BEFORE_PAY
((
byte
)
10
),
//买家付款后取消
BUYER_ORDER_STATUS_CANCEL_AFTER_PAY
((
byte
)
11
),
//超时未发货取消
BUYER_ORDER_STATUS_CANCEL_SENDGOODS_TIMEOUT
((
byte
)
12
),
//鉴定不通过取消
BUYER_ORDER_STATUS_JUDGE_NOT_PASS
((
byte
)
13
);
BUYER_ORDER_STATUS_JUDGE_NOT_PASS
((
byte
)
13
),
//买家付款前买家取消
BUYER_ORDER_STATUS_BUYER_CANCEL_BEFORE_PAY
((
byte
)
14
),
//超时未支付取消
BUYER_ORDER_STATUS_CANCEL_PAY_TIMEOUT
((
byte
)
15
),
//卖家发货前取消
BUYER_ORDER_STATUS_SELLER_CANCEL_BEFORE_SENDGOODS
((
byte
)
16
),
//客服取消
BUYER_ORDER_STATUS_CANCEL_BY_SERVICE_STAFF
((
byte
)
17
);
private
byte
byteVal
;
...
...
order/src/main/java/com/yoho/ufo/order/controller/BuyerOrderController.java
View file @
d9380d4
...
...
@@ -33,6 +33,13 @@ public class BuyerOrderController {
return
new
ApiResponse
.
ApiResponseBuilder
().
code
(
200
).
message
(
"查询成功"
).
data
(
map
).
build
();
}
@RequestMapping
(
value
=
"/getCountByOrderStatus"
)
public
ApiResponse
getCountByOrderStatus
()
{
LOGGER
.
info
(
"getCountByOrderStatus in"
);
Map
<
String
,
Integer
>
map
=
buyerOrderService
.
getCountByOrderStatus
();
return
new
ApiResponse
.
ApiResponseBuilder
().
code
(
200
).
message
(
"查询成功"
).
data
(
map
).
build
();
}
@RequestMapping
(
value
=
"/queryOrderList"
)
public
ApiResponse
queryOrderList
(
BuyerOrderReq
req
)
{
LOGGER
.
info
(
"queryOrderList in. req is {}"
,
req
);
...
...
order/src/main/java/com/yoho/ufo/order/service/IBuyerOrderService.java
View file @
d9380d4
...
...
@@ -24,4 +24,6 @@ public interface IBuyerOrderService {
List
<
ExpressCompany
>
queryAllExpressCompanyList
();
BuyerOrderResp
getSendBackInfoBySkup
(
BuyerOrderReq
req
);
Map
<
String
,
Integer
>
getCountByOrderStatus
();
}
...
...
order/src/main/java/com/yoho/ufo/order/service/impl/BuyerOrderServiceImpl.java
View file @
d9380d4
...
...
@@ -98,6 +98,29 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
return
resultMap
;
}
public
Map
<
String
,
Integer
>
getCountByOrderStatus
(){
int
num_0
=
buyerOrderMapper
.
selectCountByStatus
(
null
);
//全部
int
num_1
=
buyerOrderMapper
.
selectCountByStatus
(
getStatusListByNavStatus
(
1
));
//待买家付款
int
num_2
=
buyerOrderMapper
.
selectCountByStatus
(
getStatusListByNavStatus
(
2
));
//待卖家发货
int
num_3
=
buyerOrderMapper
.
selectCountByStatus
(
getStatusListByNavStatus
(
3
));
//卖家已发货
int
num_4
=
buyerOrderMapper
.
selectCountByStatus
(
getStatusListByNavStatus
(
4
));
//平台鉴定中
int
num_5
=
buyerOrderMapper
.
selectCountByStatus
(
getStatusListByNavStatus
(
5
));
//平台已发货
int
num_6
=
buyerOrderMapper
.
selectCountByStatus
(
getStatusListByNavStatus
(
6
));
//订单完成
int
num_7
=
buyerOrderMapper
.
selectCountByStatus
(
getStatusListByNavStatus
(
7
));
//已取消
Map
<
String
,
Integer
>
resultMap
=
Maps
.
newHashMap
();
resultMap
.
put
(
"num_0"
,
num_0
);
resultMap
.
put
(
"num_1"
,
num_1
);
resultMap
.
put
(
"num_2"
,
num_2
);
resultMap
.
put
(
"num_3"
,
num_3
);
resultMap
.
put
(
"num_4"
,
num_4
);
resultMap
.
put
(
"num_5"
,
num_5
);
resultMap
.
put
(
"num_6"
,
num_6
);
resultMap
.
put
(
"num_7"
,
num_7
);
return
resultMap
;
}
public
PageResponseBO
<
BuyerOrderResp
>
queryOrderList
(
BuyerOrderReq
req
)
{
if
(!
checkAndBuildParam
(
req
))
{
return
null
;
...
...
@@ -116,6 +139,9 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
//查询buyer_order_goods
List
<
String
>
buyerOrderCodeList
=
orderList
.
stream
().
map
(
BuyerOrder:
:
getOrderCode
).
collect
(
Collectors
.
toList
());
List
<
BuyerOrderGoods
>
buyerGoodsList
=
buyerOrderGoodsMapper
.
selectByOrderCode
(
buyerOrderCodeList
);
if
(
CollectionUtils
.
isEmpty
(
buyerGoodsList
))
{
return
null
;
}
Map
<
String
,
BuyerOrderGoods
>
buyerGoodsMap
=
buyerGoodsList
.
stream
().
collect
(
Collectors
.
toMap
(
BuyerOrderGoods:
:
getOrderCode
,
b
->
b
));
//查询seller_order_goods
...
...
@@ -202,6 +228,9 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
Map
<
Integer
,
SellerOrder
>
sellerOrderMap
,
Map
<
Integer
,
SellerOrderGoods
>
sellerGoodsMap
,
Map
<
String
,
ExpressInfo
>
expressInfoMap
){
List
<
BuyerOrderResp
>
respList
=
Lists
.
newArrayList
();
for
(
BuyerOrder
item
:
orderList
)
{
if
(
null
==
buyerGoodsMap
.
get
(
item
.
getOrderCode
()))
{
continue
;
}
Integer
skup
=
buyerGoodsMap
.
get
(
item
.
getOrderCode
()).
getSkup
();
SellerOrder
sellerOrder
=
sellerOrderMap
.
get
(
skup
);
BuyerOrderResp
resp
=
new
BuyerOrderResp
();
...
...
@@ -211,10 +240,16 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
resp
.
setProductNum
(
1
);
//目前固定为1
resp
.
setSkuStr
(
sellerGoodsMap
.
get
(
skup
).
getStorageId
().
toString
());
resp
.
setDepotNo
(
sellerGoodsMap
.
get
(
skup
).
getDepotNo
());
resp
.
setSellerWaybillCode
(
expressInfoMap
.
get
(
sellerOrder
.
getOrderCode
()).
getWaybillCode
());
resp
.
setSellerWaybillCode
(
null
==
expressInfoMap
.
get
(
sellerOrder
.
getOrderCode
())
?
""
:
expressInfoMap
.
get
(
sellerOrder
.
getOrderCode
()).
getWaybillCode
());
resp
.
setSellerOrderCode
(
sellerOrder
.
getOrderCode
());
resp
.
setSkup
(
skup
);
resp
.
setCreateTimeStr
(
null
==
item
.
getCreateTime
()
?
""
:
DateUtil
.
long2DateStr
(
item
.
getCreateTime
().
longValue
()*
1000
,
"yyyy-MM-dd HH:mm:ss"
));
resp
.
setUid
(
item
.
getUid
());
resp
.
setProductName
(
sellerGoodsMap
.
get
(
skup
).
getProductName
());
resp
.
setColorName
(
sellerGoodsMap
.
get
(
skup
).
getColorName
());
resp
.
setSizeName
(
sellerGoodsMap
.
get
(
skup
).
getSizeName
());
resp
.
setGoodsPrice
(
String
.
format
(
"%.2f"
,
buyerGoodsMap
.
get
(
item
.
getOrderCode
()).
getGoodsPrice
().
doubleValue
()));
resp
.
setAmount
(
null
==
item
.
getAmount
()
?
null
:
String
.
format
(
"%.2f"
,
item
.
getAmount
().
doubleValue
()));
respList
.
add
(
resp
);
}
...
...
@@ -222,11 +257,35 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
return
respList
;
}
private
List
<
Byte
>
getStatusListByNavStatus
(
Integer
navStatus
)
{
switch
(
navStatus
)
{
case
1
:
return
Lists
.
newArrayList
(
Constant
.
BUYER_ORDER_STATUS_BUYER_NOT_PAY
.
getByteVal
());
case
2
:
return
Lists
.
newArrayList
(
Constant
.
BUYER_ORDER_STATUS_BUYER_PAYED
.
getByteVal
());
case
3
:
return
Lists
.
newArrayList
(
Constant
.
BUYER_ORDER_STATUS_ALLOCATING
.
getByteVal
());
case
4
:
return
Lists
.
newArrayList
(
Constant
.
BUYER_ORDER_STATUS_JUDGING
.
getByteVal
());
case
5
:
return
Lists
.
newArrayList
(
Constant
.
BUYER_ORDER_STATUS_TO_BE_RECEIVED
.
getByteVal
());
case
6
:
return
Lists
.
newArrayList
(
Constant
.
BUYER_ORDER_STATUS_FINISHED
.
getByteVal
());
case
7
:
return
Lists
.
newArrayList
(
Constant
.
BUYER_ORDER_STATUS_SELLER_CANCEL_BEFORE_PAY
.
getByteVal
(),
Constant
.
BUYER_ORDER_STATUS_CANCEL_AFTER_PAY
.
getByteVal
(),
Constant
.
BUYER_ORDER_STATUS_CANCEL_SENDGOODS_TIMEOUT
.
getByteVal
(),
Constant
.
BUYER_ORDER_STATUS_JUDGE_NOT_PASS
.
getByteVal
(),
Constant
.
BUYER_ORDER_STATUS_BUYER_CANCEL_BEFORE_PAY
.
getByteVal
(),
Constant
.
BUYER_ORDER_STATUS_CANCEL_PAY_TIMEOUT
.
getByteVal
(),
Constant
.
BUYER_ORDER_STATUS_SELLER_CANCEL_BEFORE_SENDGOODS
.
getByteVal
(),
Constant
.
BUYER_ORDER_STATUS_CANCEL_BY_SERVICE_STAFF
.
getByteVal
());
default
:
return
Lists
.
newArrayList
();
}
}
private
boolean
checkAndBuildParam
(
BuyerOrderReq
req
)
{
if
(
StringUtils
.
isNotEmpty
(
req
.
getStatusStr
()))
{
req
.
setStatusList
(
convertStatus
(
req
.
getStatusStr
()));
}
if
(
null
!=
req
.
getNavStatus
())
{
req
.
setStatusList
(
getStatusListByNavStatus
(
req
.
getNavStatus
()));
}
if
(
StringUtils
.
isNotEmpty
(
req
.
getSellerWaybillCode
()))
{
ExpressInfo
expressInfo
=
expressInfoMapper
.
selectByWaybillCode
(
req
.
getSellerWaybillCode
());
if
(
null
==
expressInfo
)
{
...
...
pom.xml
View file @
d9380d4
...
...
@@ -19,6 +19,7 @@
<project-name>
ufo-platform
</project-name>
<spring.version>
4.3.8.RELEASE
</spring.version>
<ufo.model.version>
1.0-SNAPSHOT
</ufo.model.version>
<inboxclient.version>
1.0.0-SNAPSHOT
</inboxclient.version>
</properties>
<dependencyManagement>
...
...
@@ -79,7 +80,11 @@
<artifactId>
pinyin4j
</artifactId>
<version>
2.5.0
</version>
</dependency>
<dependency>
<artifactId>
yohoufo-fore-inboxclient
</artifactId>
<groupId>
com.yohoufo.fore
</groupId>
<version>
${inboxclient.version}
</version>
</dependency>
</dependencies>
</dependencyManagement>
...
...
product/pom.xml
View file @
d9380d4
...
...
@@ -52,6 +52,4 @@
<artifactId>
mybatis-spring
</artifactId>
</dependency>
</dependencies>
</project>
...
...
product/src/main/java/com/yoho/ufo/service/impl/ProductServiceImpl.java
View file @
d9380d4
...
...
@@ -71,6 +71,8 @@ public class ProductServiceImpl implements IProductService, ApplicationContextAw
private
StoragePriceMapper
storagePriceMapper
;
@Autowired
private
UfoSizeMapper
sizeMapper
;
@Autowired
private
InboxService
inboxService
;
@Override
public
ApiResponse
<
Void
>
addOrUpdate
(
ProductRequestBo
bo
)
{
...
...
@@ -508,17 +510,13 @@ public static void main(String[] args) {
applicationContext
.
publishEvent
(
new
StorageNumEvent
(
sp
.
getStorageId
()));
}
// TODO 发推送给商家端
LOGGER
.
info
(
"send info to seller, product_name is {}"
,
bo
.
getProductName
());
InboxBusinessTypeEnum
.
SALE_NOTIFIED_UNSHELF
.
getType
();
InboxBusinessTypeEnum
.
SALE_NOTIFIED_UNSHELF
.
getBusinessType
();
bo
.
getProductName
();
LOGGER
.
info
(
"send info to seller, product_name is {}, seller_uid is {}"
,
bo
.
getProductName
(),
sp
.
getSellerUid
());
inboxService
.
addInbox
(
InboxBusinessTypeEnum
.
SALE_NOTIFIED_UNSHELF
.
getBusinessType
(),
InboxBusinessTypeEnum
.
SALE_NOTIFIED_UNSHELF
.
getType
(),
bo
.
getProductName
(),
sp
.
getSellerUid
());
// TODO 调用银联接口退保证金
LOGGER
.
info
(
"send refund info to payment, seller_uid is {}, skup is {}"
,
sp
.
getSellerUid
(),
sp
.
getSkup
());
return
new
ApiResponse
<>(
200
,
"操作成功"
);
}
return
new
ApiResponse
<>(
400
,
"SKUP取消失败,状态已变更!"
);
...
...
web/src/main/resources/config.properties
View file @
d9380d4
...
...
@@ -33,4 +33,6 @@ qiniu.accesskey=atSf7xxIl8alEnsXbhC1bOD1GWVW3qYffz8SlB4m
qiniu.secretkey
=
pyoJzPygXIkFWrc1BAsH6tAJ0yweTchpJwGKEwhm
file.image.size
=
512000
file.image.gif.size
=
2621440
qiniu.bucket
=
goodsimg
\ No newline at end of file
qiniu.bucket
=
goodsimg
inbox.baseurl
=
http://java-yohoufo-fore.test3.ingress.dev.yohocorp.com/ufo-gateway/?debug=XYZ
\ No newline at end of file
...
...
web/src/main/webapp/META-INF/autoconf/config.properties
View file @
d9380d4
...
...
@@ -32,4 +32,6 @@ qiniu.accesskey=${qiniu.accesskey}
qiniu.secretkey
=
${qiniu.secretkey}
file.image.size
=
${file.image.size}
file.image.gif.size
=
${file.image.gif.size}
qiniu.bucket
=
${qiniu.bucket}
\ No newline at end of file
qiniu.bucket
=
${qiniu.bucket}
inbox.baseurl
=
${inbox.baseurl}
\ No newline at end of file
...
...
web/src/main/webapp/html/orderManage/list.html
0 → 100644
View file @
d9380d4
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
/>
<title>
Yoho!Buy运营平台
</title>
<script
src=
"/ufoPlatform/js/include.js"
></script>
<style>
.selected
{
background
:
#5bc0de
;
color
:
#fff
;
}
</
style
>
<
style
type
=
"
text
/
css
"
>
.nav
li
{
float
:
left
;
list-style
:
none
;}
.nav
li
a
{
float
:
left
;
text-decoration
:
none
;
padding
:
0.2em
1.6em
;
border-right
:
1px
solid
white
;
color
:
black
;
font-size
:
14px
;}
</style>
</head>
<body
class=
"easyui-layout"
>
<div
region=
"north"
style=
"height:320px;"
>
<script>
document
.
write
(
addHead
(
'订单管理'
,
'订单列表'
));
</script>
<input
type=
"hidden"
id=
"navStatus"
>
<div>
<ul
id=
"basicTab"
class=
"nav"
>
<li
class=
"selected"
><a
href=
"javascript:switchOrderStatus(0);"
>
全部
</a></li>
<li><a
href=
"javascript:switchOrderStatus(1);"
>
待卖家付款
</a></li>
<li><a
href=
"javascript:switchOrderStatus(2);"
>
待卖家发货
</a></li>
<li><a
href=
"javascript:switchOrderStatus(3);"
>
平台鉴定中
</a></li>
<li><a
href=
"javascript:switchOrderStatus(4);"
>
平台鉴定中
</a></li>
<li><a
href=
"javascript:switchOrderStatus(5);"
>
平台已发货
</a></li>
<li><a
href=
"javascript:switchOrderStatus(6);"
>
订单完成
</a></li>
<li><a
href=
"javascript:switchOrderStatus(7);"
>
已取消
</a></li>
</ul>
</div>
<br>
<div
style=
"margin-left: 10px;margin-top: 30px"
>
<hr
style=
"border:1px solid #ddd;"
><br>
<div
style=
"border:1px solid #ddd;border-radius:5px 5px 5px 5px;width:500px:height:200px"
>
<div
style=
"margin-left: 10px;margin-top: 20px;margin-bottom: 20px"
>
<label>
订单编号:
</label>
<input
id=
"orderCode"
type=
"text"
class=
"easyui-textbox"
style=
"width:150px"
>
<label>
买家UID:
</label>
<input
id=
"buyerUid"
type=
"text"
class=
"easyui-textbox"
style=
"width:150px"
/>
<label>
卖家快递单号:
</label>
<input
id=
"sellerWaybillCode"
type=
"text"
class=
"easyui-textbox"
style=
"width:150px"
/>
<label>
订单状态:
</label>
<select
id=
"status"
class=
"easyui-combobox"
style=
"width:100px;"
>
<option
value=
""
>
全部
</option>
<option
value=
"0"
>
待买家付款
</option>
<option
value=
"1"
>
待卖家发货
</option>
<option
value=
"2"
>
卖家已发货
</option>
<option
value=
"3"
>
平台鉴定中
</option>
<option
value=
"4"
>
平台已发货
</option>
<option
value=
"5"
>
订单完成
</option>
<option
value=
"10"
>
已取消(买家付款前卖家)
</option>
<option
value=
"11"
>
已取消(买家付款后卖家)
</option>
<option
value=
"12"
>
已取消(超时未发货)
</option>
<option
value=
"13"
>
已取消(鉴定不通过)
</option>
<option
value=
"14"
>
已取消(支付前取消)
</option>
<option
value=
"15"
>
已取消(超时未支付)
</option>
<option
value=
"16"
>
已取消(已支付,卖家发货前取消)
</option>
<option
value=
"17"
>
已取消(客服取消)
</option>
</select>
<br><br>
<label>
商品编码:
</label>
<input
id=
"productId"
type=
"text"
class=
"easyui-textbox"
style=
"width:150px"
/>
<label>
SKU:
</label>
<input
id=
"sku"
type=
"text"
class=
"easyui-textbox"
style=
"width:150px"
/>
<label>
手机号:
</label>
<input
id=
"mobile"
type=
"text"
class=
"easyui-textbox"
style=
"width:150px"
/>
<label>
SKU-P:
</label>
<input
id=
"skup"
type=
"text"
class=
"easyui-textbox"
style=
"width:150px"
/>
<a
id=
"searchBtn"
class=
"btn-info"
>
查询
</a>
<a
id=
"allBtn"
class=
"btn-success"
>
全部
</a>
</div>
</div>
</div>
</div>
<div
id=
"orderList"
region=
"center"
>
<table
id=
"orderListTable"
></table>
</div>
<script>
$
(
function
()
{
$
(
"#basicTab li"
).
click
(
function
()
{
$
(
this
).
siblings
(
'li'
).
removeClass
(
'selected'
);
// 删除其他兄弟元素的样式
$
(
this
).
addClass
(
'selected'
);
// 添加当前元素的样式
});
$
(
"#searchBtn"
).
linkbutton
({
iconCls
:
"icon-search"
,
onClick
:
function
()
{
$
(
"#orderListTable"
).
datagrid
(
"load"
,
{
navStatus
:
document
.
getElementById
(
"navStatus"
).
value
,
status
:
$
(
"#status"
).
myCombobox
(
"getValue"
),
orderCode
:
$
(
"#orderCode"
).
val
(),
uid
:
$
(
"#buyerUid"
).
val
(),
productId
:
$
(
"#productId"
).
val
(),
storageId
:
$
(
"#sku"
).
val
(),
skup
:
$
(
"#skup"
).
val
(),
sellerWaybillCode
:
$
(
"#sellerWaybillCode"
).
val
(),
mobile
:
$
(
"#mobile"
).
val
()
});
}
});
//全部按钮
$
(
"#allBtn"
).
linkbutton
({
iconCls
:
"icon-import"
,
onClick
:
function
()
{
$
(
"#orderCode_"
).
textbox
(
'setValue'
,
''
);
$
(
"#uid"
).
textbox
(
'setValue'
,
''
);
$
(
"#sellerWaybillCode"
).
textbox
(
'setValue'
,
''
);
$
(
"#status"
).
combobox
(
'setValue'
,
''
);
$
(
"#productId"
).
textbox
(
'setValue'
,
''
);
$
(
"#sku"
).
textbox
(
'setValue'
,
''
);
$
(
"#mobile"
).
textbox
(
'setValue'
,
''
);
$
(
"#skup"
).
textbox
(
'setValue'
,
''
);
$
(
"#orderListTable"
).
datagrid
(
"load"
,
{
navStatus
:
document
.
getElementById
(
"navStatus"
).
value
});
}
});
getOrderList
();
});
function
getOrderList
(){
var
navStatus
=
document
.
getElementById
(
"navStatus"
).
value
;
$
(
"#orderListTable"
).
myDatagrid
({
fit
:
true
,
fitColumns
:
true
,
striped
:
true
,
url
:
contextPath
+
"/buyerOrder/queryOrderList"
,
method
:
'POST'
,
queryParams
:
{
navStatus
:
navStatus
},
loadFilter
:
function
(
data
)
{
var
temp
=
defaultLoadFilter
(
data
);
temp
=
null
==
temp
?[]:
temp
;
temp
.
rows
=
temp
.
list
;
return
temp
;
},
columns
:
[[{
title
:
"订单编号"
,
field
:
"orderCode"
,
width
:
30
,
align
:
"center"
},
{
title
:
"买家UID"
,
field
:
"uid"
,
width
:
20
,
align
:
"center"
},
{
title
:
"商品名称"
,
field
:
"productName"
,
width
:
20
,
align
:
"center"
},
{
title
:
"颜色"
,
field
:
"colorName"
,
width
:
20
,
align
:
"center"
},
{
title
:
"尺码"
,
field
:
"sizeName"
,
width
:
20
,
align
:
"center"
},
{
title
:
"商品件数"
,
field
:
"productNum"
,
width
:
20
,
align
:
"center"
},
{
title
:
"商品金额"
,
field
:
"goodsPrice"
,
width
:
20
,
align
:
"center"
},
{
title
:
"实付"
,
field
:
"amount"
,
width
:
20
,
align
:
"center"
},
{
title
:
"订单状态"
,
field
:
"status"
,
width
:
20
,
align
:
"center"
,
formatter
:
function
(
value
,
rowData
,
rowIndex
)
{
if
(
value
==
0
){
return
"待买家付款"
;
}
else
if
(
value
==
1
){
return
"待卖家发货"
;
}
else
if
(
value
==
2
)
{
return
"卖家已发货"
;
}
else
if
(
value
==
3
){
return
"平台鉴定中"
;
}
else
if
(
value
==
4
){
return
"平台已发货"
;
}
else
if
(
value
==
5
){
return
"订单完成"
;
}
else
if
(
value
==
10
){
return
"已取消(买家付款前卖家取消交易)"
;
}
else
if
(
value
==
11
){
return
"已取消(买家付款后卖家取消交易)"
;
}
else
if
(
value
==
12
){
return
"已取消(卖家发货超时)"
;
}
else
if
(
value
==
13
){
return
"已取消(商品鉴定不通过)"
;
}
else
if
(
value
==
14
){
return
"已取消(买家支付前取消)"
;
}
else
if
(
value
==
15
){
return
"已取消(买家支付超时)"
;
}
else
if
(
value
==
16
){
return
"已取消(卖家发货前取消)"
;
}
else
if
(
value
==
17
){
return
"已取消(客服取消)"
}
}
},{
title
:
"下单时间"
,
field
:
"createTimeStr"
,
width
:
30
,
align
:
"center"
},{
title
:
"操作"
,
field
:
"asdf"
,
width
:
30
,
align
:
"center"
,
formatter
:
function
(
value
,
rowData
,
rowIndex
)
{
return
"<a role='detail' dataId='"
+
rowData
.
id
+
"' style='margin-left:10px;background-color: #5cb85c !important;'>详情</a>"
;
}
}]],
cache
:
false
,
pagination
:
true
,
pageSize
:
20
,
idField
:
"id"
,
singleSelect
:
true
,
onLoadSuccess
:
function
(
data
)
{
$
(
this
).
datagrid
(
"getPanel"
).
find
(
"a[role='detail']"
).
linkbutton
({
onClick
:
function
()
{
var
id
=
$
(
this
).
attr
(
"dataId"
);
$
.
messager
.
confirm
(
"确认收货提醒"
,
"是否确认收货?确认收货前请务必确定货品已到达仓库。"
,
function
(
flag
)
{
if
(
flag
)
{
$
.
post
(
contextPath
+
"/buyerOrder/updateOrderStatus"
,
{
id
:
id
,
status
:
3
},
function
(
data
)
{
if
(
data
.
code
==
200
)
{
$
(
"#orderListTable"
).
datagrid
(
"reload"
);
window
.
self
.
$
.
messager
.
show
({
title
:
"提示"
,
msg
:
"确认收货成功!"
});
}
else
{
window
.
self
.
$
.
messager
.
alert
(
"失败"
,
"失败!"
,
"error"
);
}
});
}
});
}
});
}
});
}
function
switchOrderStatus
(
navStatus
){
$
(
"#navStatus"
).
val
(
navStatus
);
$
(
"#orderCode_"
).
textbox
(
'setValue'
,
''
);
$
(
"#uid"
).
textbox
(
'setValue'
,
''
);
$
(
"#sellerWaybillCode"
).
textbox
(
'setValue'
,
''
);
$
(
"#status"
).
combobox
(
'setValue'
,
''
);
$
(
"#productId"
).
textbox
(
'setValue'
,
''
);
$
(
"#sku"
).
textbox
(
'setValue'
,
''
);
$
(
"#mobile"
).
textbox
(
'setValue'
,
''
);
$
(
"#skup"
).
textbox
(
'setValue'
,
''
);
$
(
"#orderListTable"
).
datagrid
(
"load"
,
{
navStatus
:
navStatus
});
}
</script>
</body>
</html>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment