Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
farming
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郑云飞
farming
Commits
68f4abaf
Commit
68f4abaf
authored
Apr 22, 2024
by
郑云飞
Committed by
zhengyunfei
Apr 22, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
所有退款方式都可以部分退款
部分退款后还可以继续退款
parent
a8bae801
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
190 additions
and
71 deletions
+190
-71
src/main/java/com/yunniu/farming/app/WxController.java
+3
-10
src/main/java/com/yunniu/farming/webadmin/model/OrderMain.java
+4
-0
src/main/java/com/yunniu/farming/webadmin/model/OrderRefund.java
+86
-0
src/main/java/com/yunniu/farming/webadmin/model/OrderSub.java
+2
-2
src/main/java/com/yunniu/farming/webadmin/service/impl/GroupOrderServiceImpl.java
+30
-16
src/main/java/com/yunniu/farming/webadmin/service/impl/OrderMainServiceImpl.java
+0
-0
src/main/java/com/yunniu/farming/webadmin/service/impl/WxServiceImpl.java
+17
-11
src/main/java/com/yunniu/farming/wx/WxConfigUtil.java
+4
-4
src/main/java/com/yunniu/farming/wx/WxUtil.java
+3
-2
src/main/resources/application.properties
+6
-6
src/main/resources/mappings/OrderMainMapper.xml
+0
-0
src/main/resources/templates/groupBuy/addOrEdit.html
+2
-2
src/main/resources/templates/order/refundList.html
+33
-18
No files found.
src/main/java/com/yunniu/farming/app/WxController.java
View file @
68f4abaf
...
...
@@ -40,7 +40,6 @@ public class WxController {
}
/**
* 微信支付
*
...
...
@@ -65,15 +64,13 @@ public class WxController {
}
/**
* 回调测试
*/
@RequestMapping
(
value
=
"/testNotifyOk/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
String
testNotifyOk
(
@PathVariable
Integer
id
){
if
(
id
==
null
)
return
null
;
public
String
testNotifyOk
(
@PathVariable
Integer
id
)
{
if
(
id
==
null
)
return
null
;
this
.
wxServiceImpl
.
handleNotifyOk
(
id
);
...
...
@@ -100,20 +97,17 @@ public class WxController {
@RequestMapping
(
value
=
"/wxRefund"
,
method
=
RequestMethod
.
POST
)
public
Result
wxRefund
(
Integer
userId
,
Integer
orderId
,
HttpServletRequest
request
)
{
try
{
return
wxService
.
wxRefund
(
userId
,
orderId
,
""
,
request
);
return
wxService
.
wxRefund
(
userId
,
orderId
,
""
,
request
);
}
catch
(
Exception
e
)
{
return
new
Result
(
103
);
}
}
// @RequestMapping(value = "/asd", method = {RequestMethod.POST, RequestMethod.GET})
// public void asd(String outTradeNo) throws IOException, JDOMException {
// wxService.asd(outTradeNo);
// }
}
\ No newline at end of file
src/main/java/com/yunniu/farming/webadmin/model/OrderMain.java
View file @
68f4abaf
...
...
@@ -30,6 +30,8 @@ public class OrderMain {
// 关联查询对象: 关联用户表
@TableField
(
exist
=
false
)
private
Customer
customer
;
@TableField
(
exist
=
false
)
private
OrderRefund
orderRefund
;
//提交订单校验错误信息
@TableField
(
exist
=
false
)
...
...
@@ -76,6 +78,8 @@ public class OrderMain {
//数据库字段
private
Integer
id
;
// id主键
@TableField
(
exist
=
false
)
private
Integer
zid
;
// id主键
private
Integer
customerid
;
// 客户id
private
Integer
productid
;
// 商品id,关联商品信息表id
private
Integer
addressid
;
//地址id,关联地址表
...
...
src/main/java/com/yunniu/farming/webadmin/model/OrderRefund.java
0 → 100644
View file @
68f4abaf
package
com
.
yunniu
.
farming
.
webadmin
.
model
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
@Data
@TableName
(
value
=
"order_refund"
)
public
class
OrderRefund
implements
Serializable
{
/**
* id
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
* 订单主表id
*/
@TableField
(
value
=
"order_mian_id"
)
private
Long
orderMianId
;
/**
* 退款类型(1:仅退款,2退货退款)
*/
@TableField
(
value
=
"refund_type"
)
private
String
refundType
;
/**
* 是否部分退(0是,1否)
*/
@TableField
(
value
=
"portion"
)
private
String
portion
;
/**
* 退款编码
*/
@TableField
(
value
=
"refund_code"
)
private
String
refundCode
;
/**
* 退款状态(1退款申请,2申请通过,3申请拒绝,4待退货,5退款成功,6待退款)
*/
@TableField
(
value
=
"refund_status"
)
private
String
refundStatus
;
/**
* 退款金额
*/
@TableField
(
value
=
"refund_money"
)
private
Double
refundMoney
;
/**
* 退款申请时间
*/
@TableField
(
value
=
"refund_time"
)
private
Date
refundTime
;
/**
* 退款完成时间
*/
@TableField
(
value
=
"refund_suc_time"
)
private
Date
refundSucTime
;
/**
* 退款原因
*/
@TableField
(
value
=
"refund_reason"
)
private
String
refundReason
;
/**
* 退款图片
*/
@TableField
(
value
=
"refund_img"
)
private
String
refundImg
;
/**
* 退款详情
*/
@TableField
(
value
=
"refund_detail"
)
private
String
refundDetail
;
}
\ No newline at end of file
src/main/java/com/yunniu/farming/webadmin/model/OrderSub.java
View file @
68f4abaf
...
...
@@ -43,9 +43,9 @@ public class OrderSub {
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
private
String
sdef1
;
//自定义项1 退款状态 1申请退款,2申请成功,3申请拒绝,4退款成功
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
private
String
sdef2
;
//自定义项2
private
String
sdef2
;
//自定义项2
退款成功数量
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
private
String
sdef3
;
//自定义项3
private
String
sdef3
;
//自定义项3
退款申请中的数量
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
private
String
sdef4
;
//自定义项4
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
...
...
src/main/java/com/yunniu/farming/webadmin/service/impl/GroupOrderServiceImpl.java
View file @
68f4abaf
...
...
@@ -4,16 +4,11 @@ import com.alibaba.fastjson.JSON;
import
com.baomidou.mybatisplus.core.toolkit.ObjectUtils
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.yunniu.farming.util.StringHelper
;
import
com.yunniu.farming.webadmin.dao.GroupBuyDao
;
import
com.yunniu.farming.webadmin.dao.GroupOrderDao
;
import
com.yunniu.farming.webadmin.dao.OrderMainDao
;
import
com.yunniu.farming.webadmin.dao.OrderSubDao
;
import
com.yunniu.farming.webadmin.model.GroupBuy
;
import
com.yunniu.farming.webadmin.model.GroupOrder
;
import
com.yunniu.farming.webadmin.model.OrderMain
;
import
com.yunniu.farming.webadmin.model.OrderSub
;
import
com.yunniu.farming.webadmin.dao.*
;
import
com.yunniu.farming.webadmin.model.*
;
import
com.yunniu.farming.webadmin.service.GroupOrderService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.aspectj.weaver.ast.Var
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -40,15 +35,18 @@ public class GroupOrderServiceImpl implements GroupOrderService {
private
OrderMainDao
orderMainDao
;
@Autowired
private
OrderSubDao
orderSubDao
;
@Autowired
private
OrderRefundMapper
refundMapper
;
/**
* 保存团购订单
*
* @param item
* @return
*/
@Override
public
GroupOrder
addGroupOrder
(
OrderMain
item
)
{
if
(
item
.
getAreaId
()
==
null
){
if
(
item
.
getAreaId
()
==
null
)
{
throw
new
RuntimeException
(
"缺少小区id参数"
);
}
if
(
item
.
getGroupBuyId
()
==
null
)
{
...
...
@@ -82,7 +80,7 @@ public class GroupOrderServiceImpl implements GroupOrderService {
order
.
setCreateTime
(
new
Date
());
orderDao
.
insert
(
order
);
return
order
;
}
else
{
}
else
{
groupOrder
.
setGroupSize
(
groupOrder
.
getGroupSize
()
+
1
);
if
(
Objects
.
equals
(
groupOrder
.
getGroupSize
(),
groupBuy
.
getGroupSize
()))
{
groupOrder
.
setGroupStatus
(
"1"
);
...
...
@@ -94,6 +92,7 @@ public class GroupOrderServiceImpl implements GroupOrderService {
/**
* 查询团购订单列表
*
* @param item
* @return
*/
...
...
@@ -105,13 +104,14 @@ public class GroupOrderServiceImpl implements GroupOrderService {
/**
* 团购订单详情
*
* @param id
* @return
*/
@Override
public
GroupOrder
findById
(
Long
id
)
{
GroupOrder
order
=
orderDao
.
detailById
(
id
);
if
(
order
.
getSuccessTime
()!=
null
)
{
if
(
order
.
getSuccessTime
()
!=
null
)
{
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
order
.
setSuccessTimeStr
(
formatter
.
format
(
order
.
getSuccessTime
()));
}
...
...
@@ -120,6 +120,7 @@ public class GroupOrderServiceImpl implements GroupOrderService {
/**
* 团购订单用户信息列表
*
* @param item
* @return
*/
...
...
@@ -131,6 +132,7 @@ public class GroupOrderServiceImpl implements GroupOrderService {
/**
* 购买商品列表
*
* @param item 用户列表id
* @return
*/
...
...
@@ -141,18 +143,28 @@ public class GroupOrderServiceImpl implements GroupOrderService {
/**
* 退款回调修改退款状态
*
* @param outRefundNo
* @return
*/
@Override
public
boolean
updateRefundStatus
(
String
outRefundNo
)
{
OrderMain
order
=
orderDao
.
getBySdef1
(
outRefundNo
);
order
.
setIrefundstatus
(
OrderMain
.
STATUS_REFUND_SUC
);
order
.
setIstatus
(
OrderMain
.
STATUS_COMPLETE
);
int
update
=
orderMainDao
.
updateById
(
order
);
OrderRefund
orderRefund
=
refundMapper
.
selectOne
(
Wrappers
.<
OrderRefund
>
lambdaQuery
()
.
eq
(
OrderRefund:
:
getRefundCode
,
outRefundNo
)
.
eq
(
OrderRefund:
:
getRefundStatus
,
6
));
orderRefund
.
setRefundStatus
(
"5"
);
int
update
=
refundMapper
.
updateById
(
orderRefund
);
OrderMain
order
=
orderMainDao
.
selectById
(
orderRefund
.
getOrderMianId
());
if
(
orderRefund
.
getPortion
().
equals
(
"1"
))
{
order
.
setIrefundstatus
(
OrderMain
.
STATUS_REFUND_SUC
);
order
.
setIstatus
(
OrderMain
.
STATUS_COMPLETE
);
orderMainDao
.
updateById
(
order
);
}
List
<
OrderSub
>
orderSubs
=
this
.
orderSubDao
.
selectList
(
Wrappers
.<
OrderSub
>
lambdaQuery
().
eq
(
OrderSub:
:
getMainid
,
order
.
getId
()).
eq
(
OrderSub:
:
getSdef1
,
2
));
orderSubs
.
forEach
(
sub
->
{
orderSubs
.
forEach
(
sub
->
{
sub
.
setSdef1
(
"4"
);
sub
.
setSdef2
(
sub
.
getSdef3
());
sub
.
setSdef3
(
"0"
);
orderSubDao
.
updateById
(
sub
);
});
if
(
update
>
0
)
{
...
...
@@ -188,6 +200,7 @@ public class GroupOrderServiceImpl implements GroupOrderService {
/**
* 完成
*
* @param id
* @return
*/
...
...
@@ -200,6 +213,7 @@ public class GroupOrderServiceImpl implements GroupOrderService {
/**
* 支付成功后判断团购订单是否成团
*
* @param curOrder
*/
public
void
isSuccess
(
OrderMain
curOrder
)
{
...
...
src/main/java/com/yunniu/farming/webadmin/service/impl/OrderMainServiceImpl.java
View file @
68f4abaf
This diff is collapsed.
Click to expand it.
src/main/java/com/yunniu/farming/webadmin/service/impl/WxServiceImpl.java
View file @
68f4abaf
...
...
@@ -2,11 +2,9 @@ package com.yunniu.farming.webadmin.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.yunniu.farming.util.*
;
import
com.yunniu.farming.webadmin.dao.CustomerDao
;
import
com.yunniu.farming.webadmin.dao.GroupBuyDao
;
import
com.yunniu.farming.webadmin.dao.IntegralrecDao
;
import
com.yunniu.farming.webadmin.dao.OrderMainDao
;
import
com.yunniu.farming.webadmin.dao.*
;
import
com.yunniu.farming.webadmin.model.*
;
import
com.yunniu.farming.webadmin.service.WxService
;
import
com.yunniu.farming.wx.WxConfigUtil
;
...
...
@@ -49,6 +47,9 @@ public class WxServiceImpl implements WxService {
@Autowired
private
GroupBuyDao
groupBuyDao
;
@Autowired
private
OrderRefundMapper
refundMapper
;
private
String
[]
imageUrl
=
{
"https://yuezhi-1314984551.cos.ap-shanghai.myqcloud.com/register/41e98a7cc2834450b41927219197d713.jpeg"
,
"https://yuezhi-1314984551.cos.ap-shanghai.myqcloud.com/register/65daa7ab2a9c46c99a580874c73465e3.jpeg"
,
"https://yuezhi-1314984551.cos.ap-shanghai.myqcloud.com/register/056bb47d0b274ab7b430ddd522b18ee3.jpeg"
...
...
@@ -243,9 +244,14 @@ public class WxServiceImpl implements WxService {
order
.
setSrefundreason
(
srefundreason
);
// 退款理由
order
.
setIrefundstatus
(
OrderMain
.
STATUS_CANCEL
);
}
order
.
setTrefundtime
(
new
Date
());
order
.
setRefundorderno
(
StringHelper
.
getOrderno
());
orderMainDao
.
updateById
(
order
);
// order.setTrefundtime(new Date());
// order.setRefundorderno(StringHelper.getOrderno());
// orderMainDao.updateById(order);
OrderRefund
refund
=
refundMapper
.
selectOne
(
Wrappers
.<
OrderRefund
>
lambdaQuery
()
.
eq
(
OrderRefund:
:
getOrderMianId
,
order
.
getId
())
.
eq
(
OrderRefund:
:
getRefundStatus
,
6
));
refund
.
setRefundCode
(
StringHelper
.
getOrderno
());
refundMapper
.
updateById
(
refund
);
double
tradeMoney
=
order
.
getDactmoney
();
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"###################"
);
...
...
@@ -257,15 +263,15 @@ public class WxServiceImpl implements WxService {
parameters
.
put
(
"out_trade_no"
,
order
.
getSorderno
());
// 商户订单号
parameters
.
put
(
"refund_fee_type"
,
"CNY"
);
// 默认人民币:CNY
parameters
.
put
(
"total_fee"
,
decimalFormat
.
format
(
tradeMoney
*
100
));
// 订单总金额
if
(
order
.
getIrefundstatus
().
equals
(
OrderMain
.
STATUS_APPLICATION
))
{
parameters
.
put
(
"refund_fee"
,
decimalFormat
.
format
(
order
.
getIrefundm
oney
()
*
100
));
// 订单总金额
if
(
refund
.
getRefundStatus
().
equals
(
1
))
{
parameters
.
put
(
"refund_fee"
,
decimalFormat
.
format
(
refund
.
getRefundM
oney
()
*
100
));
// 订单总金额
}
else
{
parameters
.
put
(
"refund_fee"
,
decimalFormat
.
format
(
order
.
getIrefundm
oney
()
*
100
));
// 退款金额
parameters
.
put
(
"refund_fee"
,
decimalFormat
.
format
(
refund
.
getRefundM
oney
()
*
100
));
// 退款金额
}
//parameters.put("profit_sharing", "Y");
// 用户端实际ip
parameters
.
put
(
"notify_url"
,
WxConfigUtil
.
refund_notify_url
);
// 接收微信支付异步通知回调地址
parameters
.
put
(
"out_refund_no"
,
order
.
getRefundorderno
());
parameters
.
put
(
"out_refund_no"
,
refund
.
getRefundCode
());
System
.
out
.
println
(
"sign====="
+
parameters
);
// 设置签名
String
sign
=
WxUtil
.
createSignMD5
(
parameters
);
...
...
src/main/java/com/yunniu/farming/wx/WxConfigUtil.java
View file @
68f4abaf
...
...
@@ -15,10 +15,10 @@ public class WxConfigUtil {
public
final
static
String
UNIFIED_ORDER_URL
=
"https://api.mch.weixin.qq.com/pay/unifiedorder"
;
public
final
static
String
PROFIT_SHARING_URL
=
"https://api.mch.weixin.qq.com/secapi/pay/profitsharing"
;
public
final
static
String
PROFIT_SHARING_ADDRECEIVER
=
"https://api.mch.weixin.qq.com/pay/profitsharingaddreceiver"
;
// public final static String notify_url = "http://farming
.nyinhong.com/wx/notify"; // 订单回调接口
public
final
static
String
notify_url
=
"https://qpxdnyy.com/wx/notify"
;
// 订单回调接口
// public final static String refund_notify_url = "http://farming
.nyinhong.com/wx/wxRefundNotify"; // 订单回调接口
public
final
static
String
refund_notify_url
=
"https://qpxdnyy.com/wx/wxRefundNotify"
;
// 订单回调接口
public
final
static
String
notify_url
=
"http://felo
.nyinhong.com/wx/notify"
;
// 订单回调接口
//
public final static String notify_url = "https://qpxdnyy.com/wx/notify"; // 订单回调接口
public
final
static
String
refund_notify_url
=
"http://felo
.nyinhong.com/wx/wxRefundNotify"
;
// 订单回调接口
//
public final static String refund_notify_url = "https://qpxdnyy.com/wx/wxRefundNotify"; // 订单回调接口
public
final
static
String
REFUND_ORDER_URL
=
"https://api.mch.weixin.qq.com/secapi/pay/refund"
;
public
static
String
GET_MINICODE_URL
=
"https://api.weixin.qq.com/wxa/getwxacodeunlimit"
;
...
...
src/main/java/com/yunniu/farming/wx/WxUtil.java
View file @
68f4abaf
...
...
@@ -3,6 +3,7 @@ package com.yunniu.farming.wx;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yunniu.farming.util.HttpClientUtil
;
import
org.apache.commons.codec.digest.DigestUtils
;
import
org.jdom.JDOMException
;
import
javax.crypto.Mac
;
...
...
@@ -102,8 +103,8 @@ public class WxUtil {
}
}
sb
.
append
(
"key="
+
WxConfigUtil
.
API_KEY
);
String
sign
=
MD5
(
sb
.
toString
());
return
sign
;
String
sign
=
DigestUtils
.
md5Hex
(
sb
.
toString
());
return
sign
.
toUpperCase
()
;
}
...
...
src/main/resources/application.properties
View file @
68f4abaf
#spring.datasource.url=jdbc:mysql://152.136.113.101:3306/farming?autoReconnect=true&useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
#spring.datasource.username=root
#spring.datasource.password=Root_123456
spring.datasource.url
=
jdbc:mysql://localhost:3306/farming?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
spring.datasource.username
=
farming
spring.datasource.password
=
PKWB6psxa7FBApZB
#
spring.datasource.url=jdbc:mysql://db1.prd.jianghuxx.com:3317/farming?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
#
spring.datasource.username=root
#
spring.datasource.password=4f9fa23639242790
#
spring.datasource.url=jdbc:mysql://localhost:3306/farming?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
#
spring.datasource.username=farming
#
spring.datasource.password=PKWB6psxa7FBApZB
spring.datasource.url
=
jdbc:mysql://db1.prd.jianghuxx.com:3317/farming?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
spring.datasource.username
=
root
spring.datasource.password
=
4f9fa23639242790
#7LwimZ27FqEnzIPg
##47.101.199.10
spring.datasource.driverClassName
=
com.mysql.cj.jdbc.Driver
...
...
src/main/resources/mappings/OrderMainMapper.xml
View file @
68f4abaf
This diff is collapsed.
Click to expand it.
src/main/resources/templates/groupBuy/addOrEdit.html
View file @
68f4abaf
...
...
@@ -422,8 +422,8 @@
groupBuy
.
areaIdList
=
areaIdList
;
groupBuy
.
products
=
products
;
groupBuy
.
goodsImgArr
=
goodsImgArr
;
groupBuy
.
groupBuyPic
=
groupBuyPic
;
//
groupBuy.groupBuyPic = "https://yuezhi-1314984551.cos.ap-shanghai.myqcloud.com/register/0f2f3ca914fa4e36ad644f61a3a3a243.jpeg";
//
groupBuy.groupBuyPic = groupBuyPic;
groupBuy
.
groupBuyPic
=
"https://yuezhi-1314984551.cos.ap-shanghai.myqcloud.com/register/0f2f3ca914fa4e36ad644f61a3a3a243.jpeg"
;
groupBuy
.
startTime
=
startTime
;
groupBuy
.
endTime
=
endTime
;
$
.
ajax
({
...
...
src/main/resources/templates/order/refundList.html
View file @
68f4abaf
...
...
@@ -83,12 +83,12 @@
<script
type=
"text/html"
id=
"table-handle"
>
<
i
class
=
"layui-icon layui-icon-form"
lay
-
event
=
"orderDetail"
title
=
"订单详情"
><
/i
>
<!--
101
退款申请中
102
待退货
103
待退款
104
退款成功
105
退款拒绝
-->
{{
#
if
(
d
.
irefundstatus
==
10
1
)
{
}}
{{
#
if
(
d
.
orderRefund
.
refundStatus
==
1
&&
d
.
orderRefund
.
refundType
==
1
)
{
}}
<
i
class
=
"layui-icon layui-icon-ok"
lay
-
event
=
"pass"
title
=
"退款申请通过"
><
/i
>
<
i
class
=
"layui-icon layui-icon-close"
lay
-
event
=
"refuse"
title
=
"退款申请拒绝"
><
/i
>
{{
#
}
else
if
(
d
.
irefundstatus
==
103
){
}}
<
i
class
=
"layui-icon layui-icon-component"
lay
-
event
=
"receive"
title
=
"退款已收货"
><
/i
>
{{
#
}
else
if
(
d
.
irefundstatus
==
106
){
}}
{{
#
}
else
if
(
d
.
orderRefund
.
refundStatus
==
1
&&
d
.
orderRefund
.
refundType
==
2
){
}}
<
i
class
=
"layui-icon layui-icon-ok"
lay
-
event
=
"pass"
title
=
"仅退款申请通过"
><
/i
>
<
i
class
=
"layui-icon layui-icon-close"
lay
-
event
=
"refuse"
title
=
"仅退款申请拒绝"
><
/i
>
{{
#
}
}}
...
...
@@ -165,27 +165,28 @@
str
+=
"<span style=''>"
+
d
.
customer
.
swxnick
?
d
.
customer
.
swxnick
:
''
+
"</span>"
}
}
return
str
;
}
}
,{
title
:
"订单金额"
,
width
:
150
,
templet
:
function
(
d
)
{
var
str
=
""
;
str
+=
'金额:<span style="color:red;"> '
+
(
d
.
dactmoney
?
d
.
dactmoney
:
0
)
+
'</span> '
;
str
+=
'积分:<span style="color:red;"> '
+
(
d
.
dactscore
?
d
.
dactscore
:
0
)
+
'</span>'
;
str
+=
'</div>'
;
return
str
?
str
:
""
;
}
}
,
{
field
:
'irefundmoney'
,
width
:
150
,
title
:
'退款金额'
}
,
{
width
:
150
,
title
:
'退款金额'
,
templet
:
function
(
d
)
{
var
str
=
""
;
str
+=
'<span> '
+
(
d
.
orderRefund
.
refundMoney
?
d
.
orderRefund
.
refundMoney
:
0
)
+
'</span> '
;
str
+=
'</div>'
;
return
str
?
str
:
""
;
}
}
,{
title
:
"订单状态"
,
width
:
200
,
...
...
@@ -209,12 +210,12 @@
str
+=
' <span>'
+
status
+
'</span>'
;
// 101退款申请中 102待退货 103待退款 104退款成功
var
refundStatus
=
""
;
if
(
d
.
irefundstatus
==
10
1
)
refundStatus
=
"<span class='layui-badge layui-bg-red'>退款申请</span>"
;
if
(
d
.
irefundstatus
==
102
)
refundStatus
=
"<span class='layui-badge layui-bg-orange'>待退货</span>"
;
if
(
d
.
irefundstatus
==
103
)
refundStatus
=
"<span class='layui-badge layui-bg-orange'>待退款</span>"
;
if
(
d
.
irefundstatus
==
104
)
refundStatus
=
"<span class='layui-badge layui-bg-green'>退款成功</span>"
;
if
(
d
.
irefundstatus
==
105
)
refundStatus
=
"<span class='layui-badge layui-bg-cyan'>退款拒绝</span>"
;
if
(
d
.
irefundstatus
==
106
)
refundStatus
=
"<span class='layui-badge layui-bg-red'>仅退款申请</span>"
;
if
(
d
.
orderRefund
.
refundStatus
==
1
&&
d
.
orderRefund
.
refundType
==
1
)
refundStatus
=
"<span class='layui-badge layui-bg-red'>退款申请</span>"
;
if
(
d
.
orderRefund
.
refundStatus
==
4
)
refundStatus
=
"<span class='layui-badge layui-bg-orange'>待退货</span>"
;
if
(
d
.
orderRefund
.
refundStatus
==
6
)
refundStatus
=
"<span class='layui-badge layui-bg-orange'>待退款</span>"
;
if
(
d
.
orderRefund
.
refundStatus
==
5
)
refundStatus
=
"<span class='layui-badge layui-bg-green'>退款成功</span>"
;
if
(
d
.
orderRefund
.
refundStatus
==
3
)
refundStatus
=
"<span class='layui-badge layui-bg-cyan'>退款拒绝</span>"
;
if
(
d
.
orderRefund
.
refundStatus
==
1
&&
d
.
orderRefund
.
refundType
==
2
)
refundStatus
=
"<span class='layui-badge layui-bg-red'>仅退款申请</span>"
;
str
+=
' <span>'
+
refundStatus
+
'</span>'
;
str
+=
'</div>'
;
return
str
?
str
:
""
;
...
...
@@ -222,18 +223,32 @@
}
,
{
field
:
'tordertime'
,
width
:
100
,
title
:
'下单日期'
}
,
{
field
:
'sremark'
,
width
:
100
,
title
:
'备注'
}
,
{
field
:
'trefundtime'
,
width
:
100
,
title
:
'退款时间'
}
,
{
width
:
100
,
title
:
'退款时间'
,
templet
:
function
(
d
)
{
var
str
=
""
;
str
+=
'<span> '
+
(
d
.
orderRefund
.
refundSucTime
?
d
.
orderRefund
.
refundSucTime
:
""
)
+
'</span> '
;
str
+=
'</div>'
;
return
str
?
str
:
""
;
}
}
,{
width
:
100
,
title
:
"退款图片"
,
align
:
"center"
,
templet
:
function
(
d
)
{
return
d
.
srefundpic
?
'<div><img id="zi'
+
d
.
id
+
'" src="'
+
d
.
srefundpic
+
return
d
.
orderRefund
.
refundImg
?
'<div><img id="zi'
+
d
.
id
+
'" src="'
+
d
.
orderRefund
.
refundImg
+
'" onmouseover="bigImg(this)" onmouseout="smallImg()" onclick="tolook(src)" style="height:20px;"></div>'
:
''
;
}
}
,
{
field
:
'srefundreason'
,
width
:
100
,
title
:
'退款理由'
}
,
{
width
:
100
,
title
:
'退款理由'
,
templet
:
function
(
d
)
{
var
str
=
""
;
str
+=
'<span> '
+
(
d
.
orderRefund
.
refundReason
?
d
.
orderRefund
.
refundReason
:
""
)
+
'</span> '
;
str
+=
'</div>'
;
return
str
?
str
:
""
;
}
}
,
{
field
:
'couriernumber'
,
width
:
120
,
title
:
'退款快递单号'
}
,
{
field
:
'scusaddr'
,
width
:
100
,
title
:
'地址'
}
,
{
field
:
'scuname'
,
width
:
100
,
title
:
'联系姓名'
}
...
...
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