Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
Z
zion
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
zion
Commits
5cd09588
提交
5cd09588
authored
11月 19, 2019
作者:
zgy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
查询商品最新一条评论
上级
b6f640cd
隐藏空白字符变更
内嵌
并排
正在显示
67 个修改的文件
包含
8647 行增加
和
13 行删除
+8647
-13
KeyConstant.java
...ava/com/diaoyun/zion/chinafrica/constant/KeyConstant.java
+11
-9
ShopifyController.java
...diaoyun/zion/chinafrica/controller/ShopifyController.java
+19
-2
TbCfItemCommentDao.java
...a/com/diaoyun/zion/chinafrica/dao/TbCfItemCommentDao.java
+17
-0
TbCfReplyDao.java
...in/java/com/diaoyun/zion/chinafrica/dao/TbCfReplyDao.java
+15
-0
TbCfItemCommentEntity.java
...diaoyun/zion/chinafrica/entity/TbCfItemCommentEntity.java
+260
-0
TbCfItemCommentEntityExtends.java
.../zion/chinafrica/entity/TbCfItemCommentEntityExtends.java
+78
-0
TbCfReplyEntity.java
...a/com/diaoyun/zion/chinafrica/entity/TbCfReplyEntity.java
+170
-0
ShopifyService.java
...a/com/diaoyun/zion/chinafrica/service/ShopifyService.java
+1
-1
TbCfItemCommentService.java
...aoyun/zion/chinafrica/service/TbCfItemCommentService.java
+76
-0
TbCfReplyService.java
...com/diaoyun/zion/chinafrica/service/TbCfReplyService.java
+72
-0
ShopifyServiceImpl.java
...oyun/zion/chinafrica/service/impl/ShopifyServiceImpl.java
+5
-1
TbCfItemCommentServiceImpl.java
...n/chinafrica/service/impl/TbCfItemCommentServiceImpl.java
+91
-0
TbCfReplyServiceImpl.java
...un/zion/chinafrica/service/impl/TbCfReplyServiceImpl.java
+60
-0
TbCfItemCommentDao.xml
src/main/resources/mapper/TbCfItemCommentDao.xml
+160
-0
TbCfReplyDao.xml
src/main/resources/mapper/TbCfReplyDao.xml
+119
-0
config.js
src/main/resources/mapper/sys/config.js
+113
-0
dept.js
src/main/resources/mapper/sys/dept.js
+196
-0
dict.js
src/main/resources/mapper/sys/dict.js
+114
-0
domain.js
src/main/resources/mapper/sys/domain.js
+132
-0
generator.js
src/main/resources/mapper/sys/generator.js
+46
-0
log.js
src/main/resources/mapper/sys/log.js
+52
-0
menu.js
src/main/resources/mapper/sys/menu.js
+271
-0
oss.js
src/main/resources/mapper/sys/oss.js
+171
-0
role.js
src/main/resources/mapper/sys/role.js
+270
-0
schedule.js
src/main/resources/mapper/sys/schedule.js
+185
-0
schedule_log.js
src/main/resources/mapper/sys/schedule_log.js
+79
-0
smslog.js
src/main/resources/mapper/sys/smslog.js
+121
-0
tbcfaddress.js
src/main/resources/mapper/sys/tbcfaddress.js
+124
-0
tbcfcartrecordr.js
src/main/resources/mapper/sys/tbcfcartrecordr.js
+115
-0
tbcfcontact.js
src/main/resources/mapper/sys/tbcfcontact.js
+113
-0
tbcfcountryconfig.js
src/main/resources/mapper/sys/tbcfcountryconfig.js
+118
-0
tbcfcoupon.js
src/main/resources/mapper/sys/tbcfcoupon.js
+398
-0
tbcfcouponcategory.js
src/main/resources/mapper/sys/tbcfcouponcategory.js
+114
-0
tbcfcouponuse.js
src/main/resources/mapper/sys/tbcfcouponuse.js
+117
-0
tbcfdailyfinance.js
src/main/resources/mapper/sys/tbcfdailyfinance.js
+116
-0
tbcfdescripiton.js
src/main/resources/mapper/sys/tbcfdescripiton.js
+148
-0
tbcfexpresstemplate.js
src/main/resources/mapper/sys/tbcfexpresstemplate.js
+115
-0
tbcfexptemkeyword.js
src/main/resources/mapper/sys/tbcfexptemkeyword.js
+112
-0
tbcffee.js
src/main/resources/mapper/sys/tbcffee.js
+114
-0
tbcffeedback.js
src/main/resources/mapper/sys/tbcffeedback.js
+115
-0
tbcffeedbackrecord.js
src/main/resources/mapper/sys/tbcffeedbackrecord.js
+114
-0
tbcffinance.js
src/main/resources/mapper/sys/tbcffinance.js
+141
-0
tbcfgoodstwotype.js
src/main/resources/mapper/sys/tbcfgoodstwotype.js
+122
-0
tbcfgoodstype.js
src/main/resources/mapper/sys/tbcfgoodstype.js
+112
-0
tbcfhomepage.js
src/main/resources/mapper/sys/tbcfhomepage.js
+140
-0
tbcfissuecoupon.js
src/main/resources/mapper/sys/tbcfissuecoupon.js
+119
-0
tbcfitemcomment.js
src/main/resources/mapper/sys/tbcfitemcomment.js
+122
-0
tbcfitemdetail.js
src/main/resources/mapper/sys/tbcfitemdetail.js
+123
-0
tbcfitemorderr.js
src/main/resources/mapper/sys/tbcfitemorderr.js
+113
-0
tbcforder.js
src/main/resources/mapper/sys/tbcforder.js
+362
-0
tbcforderList.js
src/main/resources/mapper/sys/tbcforderList.js
+213
-0
tbcfpagevisit.js
src/main/resources/mapper/sys/tbcfpagevisit.js
+112
-0
tbcfplatform.js
src/main/resources/mapper/sys/tbcfplatform.js
+140
-0
tbcfplatformorder.js
src/main/resources/mapper/sys/tbcfplatformorder.js
+120
-0
tbcfproblem.js
src/main/resources/mapper/sys/tbcfproblem.js
+152
-0
tbcfreply.js
src/main/resources/mapper/sys/tbcfreply.js
+117
-0
tbcfstationitem.js
src/main/resources/mapper/sys/tbcfstationitem.js
+267
-0
tbcfstationsales.js
src/main/resources/mapper/sys/tbcfstationsales.js
+118
-0
tbcfstationstatistic.js
src/main/resources/mapper/sys/tbcfstationstatistic.js
+116
-0
tbcfstore.js
src/main/resources/mapper/sys/tbcfstore.js
+190
-0
tbcftakecoupon.js
src/main/resources/mapper/sys/tbcftakecoupon.js
+117
-0
tbcftax.js
src/main/resources/mapper/sys/tbcftax.js
+115
-0
tbcfusecoupon.js
src/main/resources/mapper/sys/tbcfusecoupon.js
+113
-0
tbcfuseraddressr.js
src/main/resources/mapper/sys/tbcfuseraddressr.js
+113
-0
tbcfuserinfo.js
src/main/resources/mapper/sys/tbcfuserinfo.js
+133
-0
tbcfversion.js
src/main/resources/mapper/sys/tbcfversion.js
+119
-0
user.js
src/main/resources/mapper/sys/user.js
+201
-0
没有找到文件。
src/main/java/com/diaoyun/zion/chinafrica/constant/KeyConstant.java
浏览文件 @
5cd09588
...
...
@@ -6,26 +6,28 @@ package com.diaoyun.zion.chinafrica.constant;
public
class
KeyConstant
{
//AES加密KEY 不能随便更改!!!
public
static
final
String
AES_KEY
=
"``8d47e4d5f4r7d4"
;
public
static
final
String
AES_KEY
=
"``8d47e4d5f4r7d4"
;
//验证码
public
static
String
IDENTIFY_CODE
=
"identifyCode"
;
public
static
String
IDENTIFY_CODE
=
"identifyCode"
;
//登录用户
public
static
String
LOGIN_USER
=
"loginUser"
;
public
static
String
LOGIN_USER
=
"loginUser"
;
/**
* 存放在redis的key************************************************
*/
//优惠券
public
final
static
String
COUPON
=
"coupon"
;
public
final
static
String
COUPON
=
"coupon"
;
/////////////////订单////////////////
//订单过期前缀
public
final
static
String
ORDER_EXP
=
"order_exp"
;
public
final
static
String
ORDER_EXP
=
"order_exp"
;
//订单详情前缀
public
final
static
String
ORDER_DET
=
"order_det"
;
public
final
static
String
ORDER_DET
=
"order_det"
;
/////////////////订单 END////////////////
//验证码前缀
public
final
static
String
CAPTCHA
=
"captcha_"
;
public
final
static
String
CAPTCHA
=
"captcha_"
;
//手机验证码前缀
public
final
static
String
CAPTCHA_PHONE
=
"captcha_phone"
;
public
final
static
String
CAPTCHA_PHONE
=
"captcha_phone"
;
//自定义id头部
public
final
static
String
CUSTOMIZE_ID
=
"customizeId_"
;
public
final
static
String
CUSTOMIZE_ID
=
"customizeId_"
;
//shopify商品
public
final
static
String
SHOPIFY_ITEM
=
"shopify_item"
;
}
src/main/java/com/diaoyun/zion/chinafrica/controller/ShopifyController.java
浏览文件 @
5cd09588
package
com
.
diaoyun
.
zion
.
chinafrica
.
controller
;
import
com.diaoyun.zion.chinafrica.service.ShopifyService
;
import
com.diaoyun.zion.chinafrica.service.TbCfItemCommentService
;
import
com.diaoyun.zion.master.base.Result
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -20,6 +21,8 @@ public class ShopifyController {
@Autowired
private
ShopifyService
shopifyService
;
@Autowired
private
TbCfItemCommentService
tbCfItemCommentService
;
/**
* 查询商品
...
...
@@ -36,7 +39,8 @@ public class ShopifyController {
/**
* 查询分类商品
*
* @param product_type
* @param product_type 商品分类
* @param product_id 商品ID
* @return
*/
@ApiOperation
(
value
=
"查询分类商品"
)
...
...
@@ -50,7 +54,7 @@ public class ShopifyController {
/**
* 查看商品详情
*
* @param product_id
* @param product_id
商品ID
* @return
*/
@ApiOperation
(
value
=
"查看商品详情"
)
...
...
@@ -60,4 +64,17 @@ public class ShopifyController {
return
shopifyService
.
queryProductsDetails
(
product_id
);
}
/**
* 查询商品最新一条评论
*
* @param itemId 商品ID
* @return
*/
@ApiOperation
(
value
=
"查询商品评论"
)
@GetMapping
(
"/querylastcomment"
)
public
Result
queryLastComment
(
@ApiParam
(
"商品ID"
)
@RequestParam
(
"itemId"
)
String
itemId
)
{
return
tbCfItemCommentService
.
queryLastComment
(
itemId
);
}
}
src/main/java/com/diaoyun/zion/chinafrica/dao/TbCfItemCommentDao.java
0 → 100644
浏览文件 @
5cd09588
package
com
.
diaoyun
.
zion
.
chinafrica
.
dao
;
import
com.diaoyun.zion.chinafrica.entity.TbCfItemCommentEntity
;
import
com.diaoyun.zion.chinafrica.entity.TbCfItemCommentEntityExtends
;
import
com.diaoyun.zion.master.dao.BaseDao
;
/**
* Dao
*
* @author lipengjun
* @date 2019-11-18 14:31:39
*/
public
interface
TbCfItemCommentDao
extends
BaseDao
<
TbCfItemCommentEntity
>
{
public
TbCfItemCommentEntityExtends
queryLastComment
(
String
itemId
);
}
src/main/java/com/diaoyun/zion/chinafrica/dao/TbCfReplyDao.java
0 → 100644
浏览文件 @
5cd09588
package
com
.
diaoyun
.
zion
.
chinafrica
.
dao
;
import
com.diaoyun.zion.chinafrica.entity.TbCfReplyEntity
;
import
com.diaoyun.zion.master.dao.BaseDao
;
/**
* Dao
*
* @author lipengjun
* @date 2019-11-18 15:10:45
*/
public
interface
TbCfReplyDao
extends
BaseDao
<
TbCfReplyEntity
>
{
}
src/main/java/com/diaoyun/zion/chinafrica/entity/TbCfItemCommentEntity.java
0 → 100644
浏览文件 @
5cd09588
package
com
.
diaoyun
.
zion
.
chinafrica
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 实体
* 表名 tb_cf_item_comment
*
* @author lipengjun
* @date 2019-11-18 14:31:39
*/
public
class
TbCfItemCommentEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 商品评论ID
*/
private
String
id
;
/**
* 评论人
*/
private
String
userId
;
/**
* 订单ID
*/
private
String
orderId
;
/**
* 商品ID
*/
private
String
itemId
;
/**
* 商品评分
*/
private
Integer
itemScore
;
/**
* 服务评分
*/
private
Integer
serviceScore
;
/**
* 物流评分
*/
private
Integer
logisticsScore
;
/**
* 价格评分
*/
private
Integer
priceScore
;
/**
* 商品评论
*/
private
String
itemReview
;
/**
* 点赞人数
*/
private
Long
likeNum
;
/**
* 删除标志 0:正常 1:已删除
*/
private
Integer
delFlag
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 回复时间
*/
private
Date
replyTime
;
private
String
username
;
public
String
getUsername
()
{
return
username
;
}
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
/**
* 设置:商品评论ID
*/
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
/**
* 获取:商品评论ID
*/
public
String
getId
()
{
return
id
;
}
/**
* 设置:评论人
*/
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
;
}
/**
* 获取:评论人
*/
public
String
getUserId
()
{
return
userId
;
}
/**
* 设置:订单ID
*/
public
void
setOrderId
(
String
orderId
)
{
this
.
orderId
=
orderId
;
}
/**
* 获取:订单ID
*/
public
String
getOrderId
()
{
return
orderId
;
}
/**
* 设置:商品ID
*/
public
void
setItemId
(
String
itemId
)
{
this
.
itemId
=
itemId
;
}
/**
* 获取:商品ID
*/
public
String
getItemId
()
{
return
itemId
;
}
/**
* 设置:商品评分
*/
public
void
setItemScore
(
Integer
itemScore
)
{
this
.
itemScore
=
itemScore
;
}
/**
* 获取:商品评分
*/
public
Integer
getItemScore
()
{
return
itemScore
;
}
/**
* 设置:服务评分
*/
public
void
setServiceScore
(
Integer
serviceScore
)
{
this
.
serviceScore
=
serviceScore
;
}
/**
* 获取:服务评分
*/
public
Integer
getServiceScore
()
{
return
serviceScore
;
}
/**
* 设置:物流评分
*/
public
void
setLogisticsScore
(
Integer
logisticsScore
)
{
this
.
logisticsScore
=
logisticsScore
;
}
/**
* 获取:物流评分
*/
public
Integer
getLogisticsScore
()
{
return
logisticsScore
;
}
/**
* 设置:价格评分
*/
public
void
setPriceScore
(
Integer
priceScore
)
{
this
.
priceScore
=
priceScore
;
}
/**
* 获取:价格评分
*/
public
Integer
getPriceScore
()
{
return
priceScore
;
}
/**
* 设置:商品评论
*/
public
void
setItemReview
(
String
itemReview
)
{
this
.
itemReview
=
itemReview
;
}
/**
* 获取:商品评论
*/
public
String
getItemReview
()
{
return
itemReview
;
}
/**
* 设置:点赞人数
*/
public
void
setLikeNum
(
Long
likeNum
)
{
this
.
likeNum
=
likeNum
;
}
/**
* 获取:点赞人数
*/
public
Long
getLikeNum
()
{
return
likeNum
;
}
/**
* 设置:删除标志 0:正常 1:已删除
*/
public
void
setDelFlag
(
Integer
delFlag
)
{
this
.
delFlag
=
delFlag
;
}
/**
* 获取:删除标志 0:正常 1:已删除
*/
public
Integer
getDelFlag
()
{
return
delFlag
;
}
/**
* 设置:创建时间
*/
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
/**
* 获取:创建时间
*/
public
Date
getCreateTime
()
{
return
createTime
;
}
/**
* 设置:回复时间
*/
public
void
setReplyTime
(
Date
replyTime
)
{
this
.
replyTime
=
replyTime
;
}
/**
* 获取:回复时间
*/
public
Date
getReplyTime
()
{
return
replyTime
;
}
}
src/main/java/com/diaoyun/zion/chinafrica/entity/TbCfItemCommentEntityExtends.java
0 → 100644
浏览文件 @
5cd09588
package
com
.
diaoyun
.
zion
.
chinafrica
.
entity
;
import
java.util.Date
;
/**
* @Auther: wudepeng
* @Date: 2019/11/18
* @Description: 商品评论(默认显示最新条信息)
*/
public
class
TbCfItemCommentEntityExtends
{
/**
* 商品评论ID
*/
private
String
id
;
/**
* 商品评论
*/
private
String
itemReview
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 评论人
*/
private
String
username
;
/**
* 评论数量
*/
private
Long
count
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getItemReview
()
{
return
itemReview
;
}
public
void
setItemReview
(
String
itemReview
)
{
this
.
itemReview
=
itemReview
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getUsername
()
{
return
username
;
}
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
public
Long
getCount
()
{
return
count
;
}
public
void
setCount
(
Long
count
)
{
this
.
count
=
count
;
}
}
src/main/java/com/diaoyun/zion/chinafrica/entity/TbCfReplyEntity.java
0 → 100644
浏览文件 @
5cd09588
package
com
.
diaoyun
.
zion
.
chinafrica
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 实体
* 表名 tb_cf_reply
*
* @author lipengjun
* @date 2019-11-18 15:10:45
*/
public
class
TbCfReplyEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 回复ID
*/
private
String
id
;
/**
* 回复类型 0:商品 1:社区
*/
private
Integer
replyType
;
/**
* 评论ID
*/
private
String
commentId
;
/**
* 回复人
*/
private
String
userId
;
/**
* 回复对象
*/
private
String
toUserId
;
/**
* 回复内容
*/
private
String
replyMessage
;
/**
* 删除标志 0:正常 1:已删除
*/
private
Integer
delFlag
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 设置:回复ID
*/
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
/**
* 获取:回复ID
*/
public
String
getId
()
{
return
id
;
}
/**
* 设置:回复类型 0:商品 1:社区
*/
public
void
setReplyType
(
Integer
replyType
)
{
this
.
replyType
=
replyType
;
}
/**
* 获取:回复类型 0:商品 1:社区
*/
public
Integer
getReplyType
()
{
return
replyType
;
}
/**
* 设置:评论ID
*/
public
void
setCommentId
(
String
commentId
)
{
this
.
commentId
=
commentId
;
}
/**
* 获取:评论ID
*/
public
String
getCommentId
()
{
return
commentId
;
}
/**
* 设置:回复人
*/
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
;
}
/**
* 获取:回复人
*/
public
String
getUserId
()
{
return
userId
;
}
/**
* 设置:回复对象
*/
public
void
setToUserId
(
String
toUserId
)
{
this
.
toUserId
=
toUserId
;
}
/**
* 获取:回复对象
*/
public
String
getToUserId
()
{
return
toUserId
;
}
/**
* 设置:回复内容
*/
public
void
setReplyMessage
(
String
replyMessage
)
{
this
.
replyMessage
=
replyMessage
;
}
/**
* 获取:回复内容
*/
public
String
getReplyMessage
()
{
return
replyMessage
;
}
/**
* 设置:删除标志 0:正常 1:已删除
*/
public
void
setDelFlag
(
Integer
delFlag
)
{
this
.
delFlag
=
delFlag
;
}
/**
* 获取:删除标志 0:正常 1:已删除
*/
public
Integer
getDelFlag
()
{
return
delFlag
;
}
/**
* 设置:创建时间
*/
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
/**
* 获取:创建时间
*/
public
Date
getCreateTime
()
{
return
createTime
;
}
/**
* 设置:更新时间
*/
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
/**
* 获取:更新时间
*/
public
Date
getUpdateTime
()
{
return
updateTime
;
}
}
src/main/java/com/diaoyun/zion/chinafrica/service/ShopifyService.java
浏览文件 @
5cd09588
...
...
@@ -13,5 +13,5 @@ import org.springframework.web.bind.annotation.RequestParam;
public
interface
ShopifyService
{
public
Result
queryShopifyProducts
();
public
Result
queryProductsByType
(
String
product_type
,
String
product_id
);
Result
queryProductsDetails
(
String
product_id
);
public
Result
queryProductsDetails
(
String
product_id
);
}
src/main/java/com/diaoyun/zion/chinafrica/service/TbCfItemCommentService.java
0 → 100644
浏览文件 @
5cd09588
package
com
.
diaoyun
.
zion
.
chinafrica
.
service
;
import
com.diaoyun.zion.chinafrica.entity.TbCfItemCommentEntity
;
import
com.diaoyun.zion.chinafrica.entity.TbCfItemCommentEntityExtends
;
import
com.diaoyun.zion.master.base.Result
;
import
java.util.List
;
import
java.util.Map
;
/**
* Service接口
*
* @author lipengjun
* @date 2019-11-18 14:31:39
*/
public
interface
TbCfItemCommentService
{
/**
* 根据主键查询实体
*
* @param id 主键
* @return 实体
*/
TbCfItemCommentEntity
queryObject
(
String
id
);
/**
* 分页查询
*
* @param map 参数
* @return list
*/
List
<
TbCfItemCommentEntity
>
queryList
(
Map
<
String
,
Object
>
map
);
/**
* 分页统计总数
*
* @param map 参数
* @return 总数
*/
int
queryTotal
(
Map
<
String
,
Object
>
map
);
/**
* 保存实体
*
* @param tbCfItemComment 实体
* @return 保存条数
*/
int
save
(
TbCfItemCommentEntity
tbCfItemComment
);
/**
* 根据主键更新实体
*
* @param tbCfItemComment 实体
* @return 更新条数
*/
int
update
(
TbCfItemCommentEntity
tbCfItemComment
);
/**
* 根据主键删除
*
* @param id
* @return 删除条数
*/
int
delete
(
String
id
);
/**
* 根据主键批量删除
*
* @param ids
* @return 删除条数
*/
int
deleteBatch
(
String
[]
ids
);
public
Result
queryLastComment
(
String
itemId
);
}
src/main/java/com/diaoyun/zion/chinafrica/service/TbCfReplyService.java
0 → 100644
浏览文件 @
5cd09588
package
com
.
diaoyun
.
zion
.
chinafrica
.
service
;
import
com.diaoyun.zion.chinafrica.entity.TbCfReplyEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
* Service接口
*
* @author lipengjun
* @date 2019-11-18 15:10:45
*/
public
interface
TbCfReplyService
{
/**
* 根据主键查询实体
*
* @param id 主键
* @return 实体
*/
TbCfReplyEntity
queryObject
(
String
id
);
/**
* 分页查询
*
* @param map 参数
* @return list
*/
List
<
TbCfReplyEntity
>
queryList
(
Map
<
String
,
Object
>
map
);
/**
* 分页统计总数
*
* @param map 参数
* @return 总数
*/
int
queryTotal
(
Map
<
String
,
Object
>
map
);
/**
* 保存实体
*
* @param tbCfReply 实体
* @return 保存条数
*/
int
save
(
TbCfReplyEntity
tbCfReply
);
/**
* 根据主键更新实体
*
* @param tbCfReply 实体
* @return 更新条数
*/
int
update
(
TbCfReplyEntity
tbCfReply
);
/**
* 根据主键删除
*
* @param id
* @return 删除条数
*/
int
delete
(
String
id
);
/**
* 根据主键批量删除
*
* @param ids
* @return 删除条数
*/
int
deleteBatch
(
String
[]
ids
);
}
src/main/java/com/diaoyun/zion/chinafrica/service/impl/ShopifyServiceImpl.java
浏览文件 @
5cd09588
...
...
@@ -3,6 +3,7 @@ package com.diaoyun.zion.chinafrica.service.impl;
import
com.diaoyun.zion.chinafrica.service.ShopifyService
;
import
com.diaoyun.zion.chinafrica.vo.ShopifyConstant
;
import
com.diaoyun.zion.master.base.Result
;
import
com.diaoyun.zion.master.common.RedisCache
;
import
com.diaoyun.zion.master.enums.ResultCodeEnum
;
import
com.diaoyun.zion.master.util.HttpClientUtil
;
import
com.github.pagehelper.PageInfo
;
...
...
@@ -16,13 +17,13 @@ import org.slf4j.LoggerFactory;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
static
com
.
github
.
pagehelper
.
page
.
PageMethod
.
startPage
;
/**
* @Auther: wudepeng
...
...
@@ -32,6 +33,8 @@ import static com.github.pagehelper.page.PageMethod.startPage;
@Service
(
"shopifyService"
)
public
class
ShopifyServiceImpl
implements
ShopifyService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ShopifyServiceImpl
.
class
);
@Resource
private
RedisCache
<
Object
>
orderRedisCache
;
/**
* 查询商品
...
...
@@ -89,6 +92,7 @@ public class ShopifyServiceImpl implements ShopifyService {
/**
* 查看商品详情
*
* @param product_id
* @return
*/
...
...
src/main/java/com/diaoyun/zion/chinafrica/service/impl/TbCfItemCommentServiceImpl.java
0 → 100644
浏览文件 @
5cd09588
package
com
.
diaoyun
.
zion
.
chinafrica
.
service
.
impl
;
import
com.diaoyun.zion.chinafrica.dao.TbCfItemCommentDao
;
import
com.diaoyun.zion.chinafrica.entity.TbCfItemCommentEntity
;
import
com.diaoyun.zion.chinafrica.entity.TbCfItemCommentEntityExtends
;
import
com.diaoyun.zion.chinafrica.service.TbCfItemCommentService
;
import
com.diaoyun.zion.master.base.Result
;
import
com.diaoyun.zion.master.enums.ResultCodeEnum
;
import
com.diaoyun.zion.master.util.IdUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
/**
* Service实现类
*
* @author lipengjun
* @date 2019-11-18 14:31:39
*/
@Service
(
"tbCfItemCommentService"
)
public
class
TbCfItemCommentServiceImpl
implements
TbCfItemCommentService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
TbCfItemCommentServiceImpl
.
class
);
@Autowired
private
TbCfItemCommentDao
tbCfItemCommentDao
;
@Override
public
TbCfItemCommentEntity
queryObject
(
String
id
)
{
return
tbCfItemCommentDao
.
queryObject
(
id
);
}
@Override
public
List
<
TbCfItemCommentEntity
>
queryList
(
Map
<
String
,
Object
>
map
)
{
return
tbCfItemCommentDao
.
queryList
(
map
);
}
@Override
public
int
queryTotal
(
Map
<
String
,
Object
>
map
)
{
return
tbCfItemCommentDao
.
queryTotal
(
map
);
}
@Override
public
int
save
(
TbCfItemCommentEntity
tbCfItemComment
)
{
tbCfItemComment
.
setId
(
IdUtil
.
createIdbyUUID
());
return
tbCfItemCommentDao
.
save
(
tbCfItemComment
);
}
@Override
public
int
update
(
TbCfItemCommentEntity
tbCfItemComment
)
{
return
tbCfItemCommentDao
.
update
(
tbCfItemComment
);
}
@Override
public
int
delete
(
String
id
)
{
return
tbCfItemCommentDao
.
delete
(
id
);
}
@Override
public
int
deleteBatch
(
String
[]
ids
)
{
return
tbCfItemCommentDao
.
deleteBatch
(
ids
);
}
/**
* 查询商品最新一条评论
*
* @param itemId
* @return
*/
@Override
public
Result
queryLastComment
(
String
itemId
)
{
Result
result
=
new
Result
();
try
{
TbCfItemCommentEntityExtends
lastComment
=
tbCfItemCommentDao
.
queryLastComment
(
itemId
);
if
(
lastComment
!=
null
)
{
result
.
setData
(
lastComment
).
setMessage
(
"success"
);
logger
.
info
(
"query comment success,the itemId is:"
+
itemId
);
}
else
{
result
.
setCode
(
ResultCodeEnum
.
QUERY_ERROR
.
getCode
()).
setMessage
(
"comment is null"
);
logger
.
error
(
"comment is null,the itemId is:"
+
itemId
);
}
}
catch
(
Exception
e
)
{
result
.
setCode
(
ResultCodeEnum
.
QUERY_ERROR
.
getCode
()).
setMessage
(
e
.
getMessage
());
logger
.
error
(
e
.
getMessage
());
}
return
result
;
}
}
src/main/java/com/diaoyun/zion/chinafrica/service/impl/TbCfReplyServiceImpl.java
0 → 100644
浏览文件 @
5cd09588
package
com
.
diaoyun
.
zion
.
chinafrica
.
service
.
impl
;
import
com.diaoyun.zion.chinafrica.dao.TbCfReplyDao
;
import
com.diaoyun.zion.chinafrica.entity.TbCfReplyEntity
;
import
com.diaoyun.zion.chinafrica.service.TbCfReplyService
;
import
com.diaoyun.zion.master.util.IdUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
/**
* Service实现类
*
* @author lipengjun
* @date 2019-11-18 15:10:45
*/
@Service
(
"tbCfReplyService"
)
public
class
TbCfReplyServiceImpl
implements
TbCfReplyService
{
@Autowired
private
TbCfReplyDao
tbCfReplyDao
;
@Override
public
TbCfReplyEntity
queryObject
(
String
id
)
{
return
tbCfReplyDao
.
queryObject
(
id
);
}
@Override
public
List
<
TbCfReplyEntity
>
queryList
(
Map
<
String
,
Object
>
map
)
{
return
tbCfReplyDao
.
queryList
(
map
);
}
@Override
public
int
queryTotal
(
Map
<
String
,
Object
>
map
)
{
return
tbCfReplyDao
.
queryTotal
(
map
);
}
@Override
public
int
save
(
TbCfReplyEntity
tbCfReply
)
{
tbCfReply
.
setId
(
IdUtil
.
createIdbyUUID
());
return
tbCfReplyDao
.
save
(
tbCfReply
);
}
@Override
public
int
update
(
TbCfReplyEntity
tbCfReply
)
{
return
tbCfReplyDao
.
update
(
tbCfReply
);
}
@Override
public
int
delete
(
String
id
)
{
return
tbCfReplyDao
.
delete
(
id
);
}
@Override
public
int
deleteBatch
(
String
[]
ids
)
{
return
tbCfReplyDao
.
deleteBatch
(
ids
);
}
}
src/main/resources/mapper/TbCfItemCommentDao.xml
0 → 100644
浏览文件 @
5cd09588
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.diaoyun.zion.chinafrica.dao.TbCfItemCommentDao"
>
<resultMap
type=
"com.diaoyun.zion.chinafrica.entity.TbCfItemCommentEntity"
id=
"tbCfItemCommentMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"userId"
column=
"user_id"
/>
<result
property=
"orderId"
column=
"order_id"
/>
<result
property=
"itemId"
column=
"item_id"
/>
<result
property=
"itemScore"
column=
"item_score"
/>
<result
property=
"serviceScore"
column=
"service_score"
/>
<result
property=
"logisticsScore"
column=
"logistics_score"
/>
<result
property=
"priceScore"
column=
"price_score"
/>
<result
property=
"itemReview"
column=
"item_review"
/>
<result
property=
"likeNum"
column=
"like_num"
/>
<result
property=
"delFlag"
column=
"del_flag"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"replyTime"
column=
"reply_time"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfItemCommentEntity"
>
select
`id`,
`user_id`,
`order_id`,
`item_id`,
`item_score`,
`service_score`,
`logistics_score`,
`price_score`,
`item_review`,
`like_num`,
`del_flag`,
`create_time`,
`reply_time`,nick
from tb_cf_item_comment
where id = #{id}
</select>
<select
id=
"queryLastComment"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfItemCommentEntityExtends"
>
SELECT
c.id,
c.create_time,
c.item_review,
u.nick username,
m.count count
FROM
tb_cf_item_comment c
LEFT JOIN tb_cf_user_info u ON c.user_id = u.user_id
LEFT JOIN ( SELECT item_id, count(*) count FROM tb_cf_item_comment GROUP BY item_id ) m ON c.item_id = m.item_id
WHERE
c.item_id = #{itemId}
AND c.del_flag = 0
ORDER BY
c.create_time DESC
LIMIT 1
</select>
<select
id=
"queryList"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfItemCommentEntity"
>
select
`id`,
`user_id`,
`order_id`,
`item_id`,
`item_score`,
`service_score`,
`logistics_score`,
`price_score`,
`item_review`,
`like_num`,
`del_flag`,
`create_time`,
`reply_time`
from tb_cf_item_comment
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
<choose>
<when
test=
"sidx != null and sidx.trim() != ''"
>
order by ${sidx} ${order}
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_item_comment
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
</select>
<insert
id=
"save"
parameterType=
"com.diaoyun.zion.chinafrica.entity.TbCfItemCommentEntity"
>
insert into tb_cf_item_comment(
`id`,
`user_id`,
`order_id`,
`item_id`,
`item_score`,
`service_score`,
`logistics_score`,
`price_score`,
`item_review`,
`like_num`,
`del_flag`,
`create_time`,
`reply_time`)
values(
#{id},
#{userId},
#{orderId},
#{itemId},
#{itemScore},
#{serviceScore},
#{logisticsScore},
#{priceScore},
#{itemReview},
#{likeNum},
#{delFlag},
#{createTime},
#{replyTime})
</insert>
<update
id=
"update"
parameterType=
"com.diaoyun.zion.chinafrica.entity.TbCfItemCommentEntity"
>
update tb_cf_item_comment
<set>
<if
test=
"userId != null"
>
`user_id` = #{userId},
</if>
<if
test=
"orderId != null"
>
`order_id` = #{orderId},
</if>
<if
test=
"itemId != null"
>
`item_id` = #{itemId},
</if>
<if
test=
"itemScore != null"
>
`item_score` = #{itemScore},
</if>
<if
test=
"serviceScore != null"
>
`service_score` = #{serviceScore},
</if>
<if
test=
"logisticsScore != null"
>
`logistics_score` = #{logisticsScore},
</if>
<if
test=
"priceScore != null"
>
`price_score` = #{priceScore},
</if>
<if
test=
"itemReview != null"
>
`item_review` = #{itemReview},
</if>
<if
test=
"likeNum != null"
>
`like_num` = #{likeNum},
</if>
<if
test=
"delFlag != null"
>
`del_flag` = #{delFlag},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"replyTime != null"
>
`reply_time` = #{replyTime}
</if>
</set>
where id = #{id}
</update>
<delete
id=
"delete"
>
delete from tb_cf_item_comment where id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_item_comment where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
src/main/resources/mapper/TbCfReplyDao.xml
0 → 100644
浏览文件 @
5cd09588
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.diaoyun.zion.chinafrica.dao.TbCfReplyDao"
>
<resultMap
type=
"com.diaoyun.zion.chinafrica.entity.TbCfReplyEntity"
id=
"tbCfReplyMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"replyType"
column=
"reply_type"
/>
<result
property=
"commentId"
column=
"comment_id"
/>
<result
property=
"userId"
column=
"user_id"
/>
<result
property=
"toUserId"
column=
"to_user_id"
/>
<result
property=
"replyMessage"
column=
"reply_message"
/>
<result
property=
"delFlag"
column=
"del_flag"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfReplyEntity"
>
select
`id`,
`reply_type`,
`comment_id`,
`user_id`,
`to_user_id`,
`reply_message`,
`del_flag`,
`create_time`,
`update_time`
from tb_cf_reply
where id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfReplyEntity"
>
select
`id`,
`reply_type`,
`comment_id`,
`user_id`,
`to_user_id`,
`reply_message`,
`del_flag`,
`create_time`,
`update_time`
from tb_cf_reply
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
<choose>
<when
test=
"sidx != null and sidx.trim() != ''"
>
order by ${sidx} ${order}
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_reply
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
</select>
<insert
id=
"save"
parameterType=
"com.diaoyun.zion.chinafrica.entity.TbCfReplyEntity"
>
insert into tb_cf_reply(
`id`,
`reply_type`,
`comment_id`,
`user_id`,
`to_user_id`,
`reply_message`,
`del_flag`,
`create_time`,
`update_time`)
values(
#{id},
#{replyType},
#{commentId},
#{userId},
#{toUserId},
#{replyMessage},
#{delFlag},
#{createTime},
#{updateTime})
</insert>
<update
id=
"update"
parameterType=
"com.diaoyun.zion.chinafrica.entity.TbCfReplyEntity"
>
update tb_cf_reply
<set>
<if
test=
"replyType != null"
>
`reply_type` = #{replyType},
</if>
<if
test=
"commentId != null"
>
`comment_id` = #{commentId},
</if>
<if
test=
"userId != null"
>
`user_id` = #{userId},
</if>
<if
test=
"toUserId != null"
>
`to_user_id` = #{toUserId},
</if>
<if
test=
"replyMessage != null"
>
`reply_message` = #{replyMessage},
</if>
<if
test=
"delFlag != null"
>
`del_flag` = #{delFlag},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"updateTime != null"
>
`update_time` = #{updateTime}
</if>
</set>
where id = #{id}
</update>
<delete
id=
"delete"
>
delete from tb_cf_reply where id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_reply where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
src/main/resources/mapper/sys/config.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#sysConfigGrid"
).
Grid
({
url
:
'../sys/config/list'
,
colModel
:
[
{
label
:
'ID'
,
name
:
'id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'参数名'
,
name
:
'confKey'
,
index
:
'conf_key'
,
width
:
60
},
{
label
:
'参数值'
,
name
:
'confValue'
,
index
:
'conf_value'
,
width
:
100
},
{
label
:
'备注'
,
name
:
'remark'
,
index
:
'remark'
,
width
:
80
}
]
});
});
var
vm
=
new
Vue
({
el
:
'#sysConfig'
,
data
:
{
q
:
{
confKey
:
null
},
showList
:
true
,
title
:
null
,
config
:
{},
ruleValidate
:
{
confKey
:
[
{
required
:
true
,
message
:
'参数名不能为空'
,
trigger
:
'blur'
}
],
confValue
:
[
{
required
:
true
,
message
:
'参数值不能为空'
,
trigger
:
'blur'
}
]
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
config
=
{};
},
update
:
function
()
{
var
id
=
getSelectedRow
(
"#sysConfigGrid"
);
if
(
id
==
null
)
{
return
;
}
Ajax
.
request
({
url
:
"../sys/config/info/"
+
id
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
config
=
r
.
config
;
}
});
},
del
:
function
(
event
)
{
var
ids
=
getSelectedRows
(
"#sysConfigGrid"
);
if
(
ids
==
null
)
{
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../sys/config/delete"
,
params
:
JSON
.
stringify
(
ids
),
contentType
:
"application/json"
,
type
:
'POST'
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
saveOrUpdate
:
function
(
event
)
{
var
url
=
vm
.
config
.
id
==
null
?
"../sys/config/save"
:
"../sys/config/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
config
),
contentType
:
"application/json"
,
type
:
'POST'
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
var
page
=
$
(
"#sysConfigGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#sysConfigGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'confKey'
:
vm
.
q
.
confKey
},
page
:
page
}).
trigger
(
"reloadGrid"
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
confKey
:
''
}
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/dept.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
initialPage
();
getGrid
();
});
function
initialPage
()
{
$
(
window
).
resize
(
function
()
{
TreeGrid
.
table
.
resetHeight
({
height
:
$
(
window
).
height
()
-
100
});
});
}
function
getGrid
()
{
var
colunms
=
TreeGrid
.
initColumn
();
var
table
=
new
TreeTable
(
TreeGrid
.
id
,
'../sys/dept/list'
,
colunms
);
table
.
setExpandColumn
(
2
);
table
.
setIdField
(
"deptId"
);
table
.
setCodeField
(
"deptId"
);
table
.
setParentCodeField
(
"parentId"
);
table
.
setExpandAll
(
true
);
table
.
setHeight
(
$
(
window
).
height
()
-
100
);
table
.
init
();
TreeGrid
.
table
=
table
;
}
var
TreeGrid
=
{
id
:
"sysDeptGrid"
,
table
:
null
,
layerIndex
:
-
1
};
/**
* 初始化表格的列
*/
TreeGrid
.
initColumn
=
function
()
{
var
columns
=
[
{
field
:
'selectItem'
,
radio
:
true
},
{
title
:
'部门ID'
,
field
:
'deptId'
,
visible
:
false
,
align
:
'center'
,
valign
:
'middle'
,
width
:
'80px'
},
{
title
:
'部门名称'
,
field
:
'name'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
,
width
:
'180px'
},
{
title
:
'上级部门'
,
field
:
'parentName'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
,
width
:
'100px'
},
{
title
:
'排序号'
,
field
:
'orderNum'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
,
width
:
'100px'
}]
return
columns
;
};
var
setting
=
{
data
:
{
simpleData
:
{
enable
:
true
,
idKey
:
"deptId"
,
pIdKey
:
"parentId"
,
rootPId
:
-
1
},
key
:
{
url
:
"nourl"
}
}
};
var
ztree
;
var
vm
=
new
Vue
({
el
:
'#sysDept'
,
data
:
{
showList
:
true
,
title
:
null
,
dept
:
{
parentName
:
null
,
parentId
:
'01'
,
orderNum
:
0
},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'部门名称不能为空'
,
trigger
:
'blur'
}
]
}
},
methods
:
{
getDept
:
function
()
{
//加载部门树
Ajax
.
request
({
url
:
"../sys/dept/select"
,
async
:
true
,
successCallback
:
function
(
r
)
{
ztree
=
$
.
fn
.
zTree
.
init
(
$
(
"#sysDeptTree"
),
setting
,
r
.
deptList
);
var
node
=
ztree
.
getNodeByParam
(
"deptId"
,
vm
.
dept
.
parentId
);
if
(
node
)
{
ztree
.
selectNode
(
node
);
vm
.
dept
.
parentName
=
node
.
name
;
}
else
{
node
=
ztree
.
getNodeByParam
(
"deptId"
,
'01'
);
ztree
.
selectNode
(
node
);
vm
.
dept
.
parentName
=
node
.
name
;
}
}
});
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
var
deptId
=
TreeGrid
.
table
.
getSelectedRow
();
var
parentId
=
'01'
;
if
(
deptId
.
length
!=
0
)
{
parentId
=
deptId
[
0
].
id
;
}
vm
.
dept
=
{
parentName
:
null
,
parentId
:
parentId
,
orderNum
:
0
};
vm
.
getDept
();
},
update
:
function
()
{
var
deptId
=
getDeptId
();
if
(
deptId
==
null
)
{
return
;
}
Ajax
.
request
({
url
:
"../sys/dept/info/"
+
deptId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
dept
=
r
.
dept
;
vm
.
getDept
();
}
});
},
del
:
function
()
{
var
deptId
=
getDeptId
();
if
(
!
deptId
)
{
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
type
:
"POST"
,
url
:
"../sys/dept/delete"
,
params
:
{
"deptId"
:
deptId
},
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
saveOrUpdate
:
function
(
event
)
{
var
url
=
vm
.
dept
.
deptId
==
null
?
"../sys/dept/save"
:
"../sys/dept/update"
;
Ajax
.
request
({
url
:
url
,
contentType
:
"application/json"
,
params
:
JSON
.
stringify
(
vm
.
dept
),
type
:
'POST'
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
deptTree
:
function
()
{
openWindow
({
title
:
"选择部门"
,
area
:
[
'300px'
,
'450px'
],
content
:
jQuery
(
"#sysDeptLayer"
),
btn
:
[
'确定'
,
'取消'
],
btn1
:
function
(
index
)
{
var
node
=
ztree
.
getSelectedNodes
();
//选择上级部门
vm
.
dept
.
parentId
=
node
[
0
].
deptId
;
vm
.
dept
.
parentName
=
node
[
0
].
name
;
layer
.
close
(
index
);
}
});
},
reload
:
function
()
{
vm
.
showList
=
true
;
TreeGrid
.
table
.
refresh
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
function
getDeptId
()
{
var
selected
=
$
(
'#sysDeptGrid'
).
bootstrapTreeTable
(
'getSelections'
);
if
(
selected
.
length
==
0
)
{
iview
.
Message
.
error
(
"请选择一条记录"
);
return
false
;
}
else
{
return
selected
[
0
].
id
;
}
}
\ No newline at end of file
src/main/resources/mapper/sys/dict.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#sysDictGrid"
).
Grid
({
url
:
'../sys/dict/list'
,
colModel
:
[
{
label
:
'id'
,
name
:
'id'
,
index
:
'id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'唯一标识'
,
name
:
'groupCode'
,
index
:
'group_code'
,
width
:
80
},
{
label
:
'key'
,
name
:
'dictKey'
,
index
:
'dict_key'
,
width
:
80
},
{
label
:
'value'
,
name
:
'dictValue'
,
index
:
'dict_value'
,
width
:
80
},
{
label
:
'备注'
,
name
:
'remark'
,
index
:
'remark'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#sysDict'
,
data
:
{
showList
:
true
,
title
:
null
,
dict
:
{},
ruleValidate
:
{
groupCode
:
[
{
required
:
true
,
message
:
'唯一标识不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
groupCode
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
dict
=
{};
},
update
:
function
(
event
)
{
let
id
=
getSelectedRow
(
"#sysDictGrid"
);
if
(
id
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
id
)
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
dict
.
id
==
null
?
"../sys/dict/save"
:
"../sys/dict/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
dict
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
ids
=
getSelectedRows
(
"#sysDictGrid"
);
if
(
ids
==
null
)
{
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../sys/dict/delete"
,
params
:
JSON
.
stringify
(
ids
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
id
)
{
Ajax
.
request
({
url
:
"../sys/dict/info/"
+
id
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
dict
=
r
.
dict
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#sysDictGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#sysDictGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'groupCode'
:
vm
.
q
.
groupCode
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
groupCode
:
''
}
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/domain.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#sysDomainGrid"
).
Grid
({
url
:
'../sys/domain/list'
,
colModel
:
[
{
label
:
'id'
,
name
:
'id'
,
index
:
'id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'域编码'
,
name
:
'domainCode'
,
index
:
'domain_code'
,
width
:
80
},
{
label
:
'域名称'
,
name
:
'domainName'
,
index
:
'domain_name'
,
width
:
80
},
{
label
:
'域地址'
,
name
:
'domainUrl'
,
index
:
'domain_url'
,
width
:
80
},
{
label
:
'状态'
,
name
:
'domainStatus'
,
index
:
'domain_status'
,
width
:
80
,
formatter
:
function
(
value
)
{
return
transStatus
(
value
);
}
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
,
formatter
:
function
(
value
)
{
return
transDate
(
value
);
}
},
{
label
:
'备注'
,
name
:
'remark'
,
index
:
'remark'
,
width
:
80
},
{
label
:
'图标'
,
name
:
'icon'
,
index
:
'icon'
,
width
:
80
,
formatter
:
function
(
value
)
{
if
(
!
value
)
{
return
''
;
}
return
'<i class="'
+
value
+
' fa-lg">'
;
}
}]
});
});
let
vm
=
new
Vue
({
el
:
'#sysDomain'
,
data
:
{
showList
:
true
,
title
:
null
,
domain
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
domainName
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
domain
=
{};
},
update
:
function
(
event
)
{
let
id
=
getSelectedRow
(
"#sysDomainGrid"
);
if
(
id
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
id
)
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
domain
.
id
==
null
?
"../sys/domain/save"
:
"../sys/domain/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
domain
),
contentType
:
"application/json"
,
type
:
'POST'
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
ids
=
getSelectedRows
(
"#sysDomainGrid"
);
if
(
ids
==
null
)
{
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../sys/domain/delete"
,
params
:
JSON
.
stringify
(
ids
),
contentType
:
"application/json"
,
type
:
'POST'
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
id
)
{
Ajax
.
request
({
url
:
"../sys/domain/info/"
+
id
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
domain
=
r
.
domain
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#sysDomainGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#sysDomainGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'domainName'
:
vm
.
q
.
domainName
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
domainName
:
''
}
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/generator.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#sysGeneratorGrid"
).
Grid
({
url
:
'../sys/generator/list'
,
colModel
:
[
{
label
:
'表名'
,
name
:
'tableName'
,
index
:
'table_name'
,
width
:
100
,
key
:
true
},
{
label
:
'Engine'
,
name
:
'engine'
,
index
:
'engine'
,
width
:
70
},
{
label
:
'表备注'
,
name
:
'tableComment'
,
index
:
'table_comment'
,
width
:
100
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
100
,
formatter
:
function
(
value
)
{
return
transDate
(
value
);
}
}
]
});
});
var
vm
=
new
Vue
({
el
:
'#sysGenerator'
,
data
:
{
q
:
{
tableName
:
null
}
},
methods
:
{
query
:
function
()
{
$
(
"#sysGeneratorGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'tableName'
:
vm
.
q
.
tableName
},
page
:
1
}).
trigger
(
"reloadGrid"
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
tableName
:
''
}
vm
.
query
();
},
generator
:
function
()
{
var
tableNames
=
getSelectedRows
(
"#sysGeneratorGrid"
);
if
(
tableNames
==
null
)
{
return
;
}
location
.
href
=
encodeURI
(
"../sys/generator/code?tables="
+
JSON
.
stringify
(
tableNames
));
}
}
});
src/main/resources/mapper/sys/log.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#sysLogGrid"
).
Grid
({
url
:
'../sys/log/list'
,
colModel
:
[
{
label
:
'id'
,
name
:
'id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'用户名'
,
name
:
'userName'
,
index
:
'user_name'
,
width
:
50
},
{
label
:
'用户操作'
,
name
:
'operation'
,
index
:
'operation'
,
width
:
70
},
{
label
:
'方法'
,
name
:
'title'
,
index
:
'title'
,
width
:
150
},
{
label
:
'请求参数'
,
name
:
'params'
,
index
:
'params'
,
width
:
80
},
{
label
:
'IP地址'
,
name
:
'ip'
,
index
:
'ip'
,
width
:
70
},
{
label
:
'创建时间'
,
name
:
'createDate'
,
index
:
'create_date'
,
width
:
90
,
formatter
:
function
(
value
)
{
return
transDate
(
value
);
}
}
]
});
});
var
vm
=
new
Vue
({
el
:
'#sysLog'
,
data
:
{
q
:
{
key
:
null
},
isLogin
:
[]
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
reload
:
function
(
event
)
{
let
page
=
$
(
"#sysLogGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
let
operation
=
''
;
if
(
vm
.
isLogin
&&
vm
.
isLogin
.
length
>
0
)
{
operation
=
vm
.
isLogin
[
0
];
}
$
(
"#sysLogGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'key'
:
vm
.
q
.
key
,
'operation'
:
operation
},
page
:
page
}).
trigger
(
"reloadGrid"
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
key
:
''
}
vm
.
isLogin
=
[];
vm
.
query
();
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/menu.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
initialPage
();
getGrid
();
});
function
initialPage
()
{
$
(
window
).
resize
(
function
()
{
TreeGrid
.
table
.
resetHeight
({
height
:
$
(
window
).
height
()
-
100
});
});
}
function
getGrid
()
{
var
colunms
=
TreeGrid
.
initColumn
();
var
table
=
new
TreeTable
(
TreeGrid
.
id
,
'../sys/menu/queryAll'
,
colunms
);
table
.
setExpandColumn
(
2
);
table
.
setIdField
(
"menuId"
);
table
.
setCodeField
(
"menuId"
);
table
.
setParentCodeField
(
"parentId"
);
table
.
setExpandAll
(
false
);
table
.
setHeight
(
$
(
window
).
height
()
-
100
);
table
.
init
();
TreeGrid
.
table
=
table
;
}
var
TreeGrid
=
{
id
:
"sysMenuGrid"
,
table
:
null
,
layerIndex
:
-
1
};
/**
* 初始化表格的列
*/
TreeGrid
.
initColumn
=
function
()
{
var
columns
=
[
{
field
:
'selectItem'
,
radio
:
true
},
{
title
:
'编号'
,
field
:
'menuId'
,
visitable
:
false
,
align
:
'center'
,
valign
:
'middle'
,
width
:
'80px'
},
{
title
:
'名称'
,
field
:
'name'
,
align
:
'center'
,
valign
:
'middle'
,
width
:
'180px'
},
{
title
:
'上级菜单'
,
field
:
'parentName'
,
align
:
'center'
,
valign
:
'middle'
,
width
:
'100px'
},
{
title
:
'图标'
,
field
:
'icon'
,
align
:
'center'
,
valign
:
'middle'
,
width
:
'50px'
,
formatter
:
function
(
item
,
index
)
{
return
item
.
icon
==
null
?
''
:
'<i class="'
+
item
.
icon
+
' fa-lg"></i>'
;
}
},
{
title
:
'类型'
,
field
:
'type'
,
align
:
'center'
,
valign
:
'middle'
,
width
:
'60px'
,
formatter
:
function
(
item
)
{
if
(
item
.
type
===
0
)
{
return
'<span class="label label-primary">目录</span>'
;
}
if
(
item
.
type
===
1
)
{
return
'<span class="label label-success">菜单</span>'
;
}
if
(
item
.
type
===
2
)
{
return
'<span class="label label-warning">按钮</span>'
;
}
}
},
{
title
:
'排序'
,
field
:
'orderNum'
,
align
:
'center'
,
valign
:
'middle'
,
width
:
'50px'
},
{
title
:
'菜单URL'
,
field
:
'url'
,
align
:
'center'
,
valign
:
'middle'
,
width
:
'200px'
},
{
title
:
'授权标识'
,
field
:
'perms'
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'状态'
,
field
:
'status'
,
align
:
'center'
,
valign
:
'middle'
,
width
:
'80px'
,
formatter
:
function
(
item
)
{
if
(
item
.
status
===
1
)
{
return
'<span class="label label-success">有效</span>'
;
}
return
'<span class="label label-danger">无效</span>'
;
}
},
{
title
:
'所属域'
,
field
:
'domainName'
,
align
:
'center'
,
valign
:
'middle'
}];
return
columns
;
};
var
setting
=
{
data
:
{
simpleData
:
{
enable
:
true
,
idKey
:
"menuId"
,
pIdKey
:
"parentId"
,
rootPId
:
-
1
},
key
:
{
url
:
"nourl"
}
}
};
var
ztree
;
var
vm
=
new
Vue
({
el
:
'#sysMenu'
,
data
:
{
showList
:
true
,
title
:
null
,
menu
:
{
parentName
:
null
,
parentId
:
0
,
type
:
1
,
orderNum
:
0
,
status
:
1
},
q
:
{
menuName
:
''
,
parentName
:
''
},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'菜单名称不能为空'
,
trigger
:
'blur'
}
],
url
:
[
{
required
:
true
,
message
:
'菜单url不能为空'
,
trigger
:
'blur'
}
],
parentName
:
[
{
required
:
true
,
message
:
'上级菜单不能为空'
,
trigger
:
'blur'
}
]
},
domainList
:
[]
},
methods
:
{
selectIcon
:
function
()
{
openWindow
({
type
:
2
,
title
:
'选取图标'
,
area
:
[
'1030px'
,
'500px'
],
content
:
[
'icon.html'
],
btn
:
false
});
},
getDomains
:
function
()
{
Ajax
.
request
({
url
:
'../sys/domain/queryAll'
,
params
:
{
'domainStatus'
:
1
},
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
domainList
=
r
.
list
;
}
});
},
getMenu
:
function
(
menuId
)
{
//加载菜单树
Ajax
.
request
({
url
:
"../sys/menu/select"
,
async
:
true
,
successCallback
:
function
(
r
)
{
ztree
=
$
.
fn
.
zTree
.
init
(
$
(
"#sysMenuTree"
),
setting
,
r
.
menuList
);
var
node
=
ztree
.
getNodeByParam
(
"menuId"
,
vm
.
menu
.
parentId
);
if
(
node
)
{
ztree
.
selectNode
(
node
);
vm
.
menu
.
parentName
=
node
.
name
;
}
else
{
node
=
ztree
.
getNodeByParam
(
"menuId"
,
0
);
ztree
.
selectNode
(
node
);
vm
.
menu
.
parentName
=
node
.
name
;
}
}
});
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
var
menuId
=
TreeGrid
.
table
.
getSelectedRow
();
var
parentId
=
0
;
if
(
menuId
.
length
!=
0
)
{
parentId
=
menuId
[
0
].
id
;
}
vm
.
menu
=
{
parentName
:
null
,
parentId
:
parentId
,
type
:
1
,
orderNum
:
0
,
status
:
1
};
vm
.
getMenu
();
vm
.
getDomains
();
},
update
:
function
(
event
)
{
var
menuId
=
TreeGrid
.
table
.
getSelectedRow
();
if
(
menuId
.
length
==
0
)
{
iview
.
Message
.
error
(
"请选择一条记录"
);
return
;
}
Ajax
.
request
({
url
:
"../sys/menu/info/"
+
menuId
[
0
].
id
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
menu
=
r
.
menu
;
vm
.
getDomains
();
vm
.
getMenu
();
}
});
},
del
:
function
(
event
)
{
var
menuIds
=
TreeGrid
.
table
.
getSelectedRow
(),
ids
=
[];
if
(
menuIds
.
length
==
0
)
{
iview
.
Message
.
error
(
"请选择一条记录"
);
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
$
.
each
(
menuIds
,
function
(
idx
,
item
)
{
ids
[
idx
]
=
item
.
id
;
});
Ajax
.
request
({
url
:
"../sys/menu/delete"
,
params
:
JSON
.
stringify
(
ids
),
contentType
:
"application/json"
,
type
:
'POST'
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
saveOrUpdate
:
function
(
event
)
{
var
url
=
vm
.
menu
.
menuId
==
null
?
"../sys/menu/save"
:
"../sys/menu/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
menu
),
contentType
:
"application/json"
,
type
:
'POST'
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
menuTree
:
function
()
{
openWindow
({
title
:
"选择菜单"
,
area
:
[
'300px'
,
'450px'
],
content
:
jQuery
(
"#sysMenuLayer"
),
btn
:
[
'确定'
,
'取消'
],
btn1
:
function
(
index
)
{
var
node
=
ztree
.
getSelectedNodes
();
//选择上级菜单
vm
.
menu
.
parentId
=
node
[
0
].
menuId
;
vm
.
menu
.
parentName
=
node
[
0
].
name
;
layer
.
close
(
index
);
}
});
},
query
:
function
()
{
vm
.
reload
();
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
TreeGrid
.
table
.
refresh
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/oss.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#sysOssGrid"
).
Grid
({
url
:
'../sys/oss/list'
,
colModel
:
[
{
label
:
'id'
,
name
:
'id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'URL地址'
,
name
:
'url'
,
index
:
'url'
,
width
:
160
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
40
,
formatter
:
function
(
value
)
{
return
transDate
(
value
);
}
}
]
});
new
AjaxUpload
(
'#upload'
,
{
action
:
'../sys/oss/upload'
,
name
:
'file'
,
autoSubmit
:
true
,
responseType
:
"json"
,
onSubmit
:
function
(
file
,
extension
)
{
if
(
vm
.
config
.
type
==
null
)
{
alert
(
"云存储配置未配置"
);
return
false
;
}
if
(
!
(
extension
&&
/^
(
jpg|jpeg|png|gif
)
$/
.
test
(
extension
.
toLowerCase
())))
{
alert
(
'只支持jpg、png、gif格式的图片!'
);
return
false
;
}
},
onComplete
:
function
(
file
,
r
)
{
if
(
r
.
code
==
0
)
{
alert
(
r
.
url
);
vm
.
reload
();
}
else
{
alert
(
r
.
msg
);
}
}
});
});
var
vm
=
new
Vue
({
el
:
'#sysOss'
,
data
:
{
showList
:
true
,
title
:
null
,
config
:
{},
aliRuleValidate
:
{
aliyunDomain
:
[
{
required
:
true
,
message
:
'阿里云绑定的域名不能为空'
,
trigger
:
'blur'
}
],
aliyunAccessKeyId
:
[
{
required
:
true
,
message
:
'阿里云AccessKeyId不能为空'
,
trigger
:
'blur'
}
],
aliyunAccessKeySecret
:
[
{
required
:
true
,
message
:
'阿里云AccessKeySecret不能为空'
,
trigger
:
'blur'
}
],
aliyunBucketName
:
[
{
required
:
true
,
message
:
'阿里云BucketName不能为空'
,
trigger
:
'blur'
}
]
},
qcloudRuleValidate
:
{
qcloudDomain
:
[
{
required
:
true
,
message
:
'腾讯云绑定的域名不能为空'
,
trigger
:
'blur'
}
],
qcloudAppId
:
[
{
required
:
true
,
message
:
'腾讯云AppId不能为空'
,
trigger
:
'blur'
}
],
qcloudSecretId
:
[
{
required
:
true
,
message
:
'腾讯云SecretId不能为空'
,
trigger
:
'blur'
}
],
qcloudSecretKey
:
[
{
required
:
true
,
message
:
'腾讯云SecretKey不能为空'
,
trigger
:
'blur'
}
],
qcloudBucketName
:
[
{
required
:
true
,
message
:
'腾讯云BucketName不能为空'
,
trigger
:
'blur'
}
],
qcloudRegion
:
[
{
required
:
true
,
message
:
'Bucket所属地区不能为空'
,
trigger
:
'blur'
}
]
}
},
created
:
function
()
{
this
.
getConfig
();
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
getConfig
:
function
()
{
Ajax
.
request
({
url
:
"../sys/oss/config"
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
config
=
r
.
config
;
}
});
},
addConfig
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"云存储配置"
;
},
saveOrUpdate
:
function
()
{
var
url
=
"../sys/oss/saveConfig"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
config
),
contentType
:
"application/json"
,
type
:
'POST'
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
()
{
var
ossIds
=
getSelectedRows
(
"#sysOssGrid"
);
if
(
ossIds
==
null
)
{
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../sys/oss/delete"
,
params
:
JSON
.
stringify
(
ossIds
),
contentType
:
"application/json"
,
type
:
'POST'
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
lookImg
:
function
()
{
var
grid
=
$
(
"#sysOssGrid"
);
var
id
=
grid
.
jqGrid
(
'getGridParam'
,
'selrow'
);
//根据点击行获得点击行的id(id为jsonReader: {id: "id" },)
if
(
!
id
)
{
alert
(
"请选择一条记录"
);
return
;
}
var
ids
=
grid
.
jqGrid
(
'getGridParam'
,
'selarrrow'
);
var
data
=
[];
for
(
var
i
=
0
;
i
<
ids
.
length
;
i
++
)
{
id
=
ids
[
i
];
var
rowData
=
grid
.
jqGrid
(
"getRowData"
,
id
);
var
url
=
rowData
.
url
;
data
.
push
({
"src"
:
url
});
}
eyeImages
(
data
);
},
reload
:
function
()
{
vm
.
showList
=
true
;
var
page
=
$
(
"#sysOssGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#sysOssGrid"
).
jqGrid
(
'setGridParam'
,
{
page
:
page
}).
trigger
(
"reloadGrid"
);
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/role.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#sysRoleGrid"
).
Grid
({
url
:
'../sys/role/list'
,
colModel
:
[
{
label
:
'角色ID'
,
name
:
'roleId'
,
index
:
"role_id"
,
key
:
true
,
hidden
:
true
},
{
label
:
'角色名称'
,
name
:
'roleName'
,
index
:
"role_id"
,
width
:
75
},
{
label
:
'所属部门'
,
name
:
'deptName'
,
index
:
"dept_id"
,
width
:
75
},
{
label
:
'备注'
,
name
:
'remark'
,
width
:
100
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
"create_time"
,
width
:
80
,
formatter
:
function
(
value
)
{
return
transDate
(
value
);
}
}
]
});
});
//菜单树
var
menu_ztree
;
var
menu_setting
=
{
data
:
{
simpleData
:
{
enable
:
true
,
idKey
:
"menuId"
,
pIdKey
:
"parentId"
,
rootPId
:
-
1
},
key
:
{
url
:
"nourl"
}
},
check
:
{
enable
:
true
,
nocheckInherit
:
true
}
};
//部门结构树
var
dept_ztree
;
var
dept_setting
=
{
data
:
{
simpleData
:
{
enable
:
true
,
idKey
:
"deptId"
,
pIdKey
:
"parentId"
,
rootPId
:
-
1
},
key
:
{
url
:
"nourl"
}
}
};
//数据树
var
data_ztree
;
var
data_setting
=
{
data
:
{
simpleData
:
{
enable
:
true
,
idKey
:
"deptId"
,
pIdKey
:
"parentId"
,
rootPId
:
-
1
},
key
:
{
url
:
"nourl"
}
},
check
:
{
enable
:
true
,
nocheckInherit
:
true
,
chkboxType
:
{
"Y"
:
""
,
"N"
:
""
}
}
};
var
vm
=
new
Vue
({
el
:
'#sysRole'
,
data
:
{
q
:
{
roleName
:
null
},
showList
:
true
,
title
:
null
,
role
:
{
deptId
:
''
,
deptName
:
''
},
ruleValidate
:
{
roleName
:
[
{
required
:
true
,
message
:
'角色名称不能为空'
,
trigger
:
'blur'
}
]
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
role
=
{
deptId
:
''
,
deptName
:
''
};
vm
.
getMenuTree
(
null
);
vm
.
getDept
();
vm
.
getDataTree
();
},
update
:
function
()
{
var
roleId
=
getSelectedRow
(
"#sysRoleGrid"
);
if
(
roleId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getDataTree
();
vm
.
getMenuTree
(
roleId
);
},
del
:
function
(
event
)
{
var
roleIds
=
getSelectedRows
(
"#sysRoleGrid"
);
if
(
roleIds
==
null
)
{
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../sys/role/delete"
,
params
:
JSON
.
stringify
(
roleIds
),
contentType
:
"application/json"
,
type
:
'POST'
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getRole
:
function
(
roleId
)
{
Ajax
.
request
({
url
:
"../sys/role/info/"
+
roleId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
role
=
r
.
role
;
vm
.
getDept
();
//勾选角色所拥有的菜单
var
menuIds
=
vm
.
role
.
menuIdList
;
for
(
var
i
=
0
;
i
<
menuIds
.
length
;
i
++
)
{
var
node
=
menu_ztree
.
getNodeByParam
(
"menuId"
,
menuIds
[
i
]);
menu_ztree
.
checkNode
(
node
,
true
,
false
);
}
//勾选角色所拥有的部门数据权限
var
deptIds
=
vm
.
role
.
deptIdList
;
for
(
var
i
=
0
;
i
<
deptIds
.
length
;
i
++
)
{
var
node
=
data_ztree
.
getNodeByParam
(
"deptId"
,
deptIds
[
i
]);
data_ztree
.
checkNode
(
node
,
true
,
false
);
}
}
});
},
saveOrUpdate
:
function
(
event
)
{
//获取选择的菜单
var
nodes
=
menu_ztree
.
getCheckedNodes
(
true
);
var
menuIdList
=
new
Array
();
for
(
var
i
=
0
;
i
<
nodes
.
length
;
i
++
)
{
menuIdList
.
push
(
nodes
[
i
].
menuId
);
}
vm
.
role
.
menuIdList
=
menuIdList
;
//获取选择的数据
var
nodes
=
data_ztree
.
getCheckedNodes
(
true
);
var
deptIdList
=
new
Array
();
for
(
var
i
=
0
;
i
<
nodes
.
length
;
i
++
)
{
deptIdList
.
push
(
nodes
[
i
].
deptId
);
}
vm
.
role
.
deptIdList
=
deptIdList
;
var
url
=
vm
.
role
.
roleId
==
null
?
"../sys/role/save"
:
"../sys/role/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
role
),
contentType
:
"application/json"
,
type
:
'POST'
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
getMenuTree
:
function
(
roleId
)
{
//加载菜单树
Ajax
.
request
({
url
:
"../sys/menu/perms"
,
async
:
true
,
successCallback
:
function
(
r
)
{
menu_ztree
=
$
.
fn
.
zTree
.
init
(
$
(
"#menuTree"
),
menu_setting
,
r
.
menuList
);
//展开所有节点
menu_ztree
.
expandAll
(
true
);
if
(
roleId
!=
null
)
{
vm
.
getRole
(
roleId
);
}
}
});
},
getDataTree
:
function
()
{
//加载菜单树
Ajax
.
request
({
url
:
"../sys/dept/list"
,
async
:
true
,
successCallback
:
function
(
r
)
{
data_ztree
=
$
.
fn
.
zTree
.
init
(
$
(
"#dataTree"
),
data_setting
,
r
.
list
);
//展开所有节点
data_ztree
.
expandAll
(
true
);
}
});
},
getDept
:
function
()
{
//加载部门树
Ajax
.
request
({
url
:
"../sys/dept/list"
,
async
:
true
,
successCallback
:
function
(
r
)
{
dept_ztree
=
$
.
fn
.
zTree
.
init
(
$
(
"#sysRoleTree"
),
dept_setting
,
r
.
list
);
var
node
=
dept_ztree
.
getNodeByParam
(
"deptId"
,
vm
.
role
.
deptId
);
if
(
node
!=
null
)
{
dept_ztree
.
selectNode
(
node
);
vm
.
role
.
deptName
=
node
.
name
;
}
}
});
},
selectDeptTree
:
function
()
{
openWindow
({
title
:
"选择部门"
,
area
:
[
'300px'
,
'450px'
],
content
:
jQuery
(
"#sysRoleLayer"
),
btn
:
[
'确定'
,
'取消'
],
btn1
:
function
(
index
)
{
var
node
=
dept_ztree
.
getSelectedNodes
();
//选择上级部门
vm
.
role
.
deptId
=
node
[
0
].
deptId
;
vm
.
role
.
deptName
=
node
[
0
].
name
;
layer
.
close
(
index
);
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
var
page
=
$
(
"#sysRoleGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#sysRoleGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'roleName'
:
vm
.
q
.
roleName
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
roleName
:
''
}
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/schedule.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#sysScheduleGrid"
).
Grid
({
url
:
'../sys/schedule/list'
,
colModel
:
[
{
label
:
'任务ID'
,
name
:
'jobId'
,
index
:
'job_id'
,
width
:
60
,
key
:
true
},
{
label
:
'bean名称'
,
name
:
'beanName'
,
index
:
'bean_name'
,
width
:
100
},
{
label
:
'方法名称'
,
name
:
'methodName'
,
index
:
'method_name'
,
width
:
100
},
{
label
:
'参数'
,
name
:
'params'
,
index
:
'params'
,
width
:
100
},
{
label
:
'cron表达式 '
,
name
:
'cronExpression'
,
index
:
'cron_expression'
,
width
:
100
},
{
label
:
'备注 '
,
name
:
'remark'
,
index
:
'remark'
,
width
:
100
},
{
label
:
'状态'
,
name
:
'status'
,
index
:
'status'
,
width
:
60
,
formatter
:
function
(
value
,
options
,
row
)
{
return
value
===
0
?
'<span class="label label-success">正常</span>'
:
'<span class="label label-danger">暂停</span>'
;
}
}
]
});
});
var
vm
=
new
Vue
({
el
:
'#sysSchedule'
,
data
:
{
q
:
{
beanName
:
null
},
showList
:
true
,
title
:
null
,
schedule
:
{},
ruleValidate
:
{
beanName
:
[
{
required
:
true
,
message
:
'bean名称不能为空'
,
trigger
:
'blur'
}
],
methodName
:
[
{
required
:
true
,
message
:
'方法名称不能为空'
,
trigger
:
'blur'
}
],
cronExpression
:
[
{
required
:
true
,
message
:
'cron表达式不能为空'
,
trigger
:
'blur'
}
]
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
schedule
=
{};
},
update
:
function
()
{
var
jobId
=
getSelectedRow
(
"#sysScheduleGrid"
);
if
(
jobId
==
null
)
{
return
;
}
Ajax
.
request
({
url
:
"../sys/schedule/info/"
+
jobId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
schedule
=
r
.
schedule
;
}
});
},
saveOrUpdate
:
function
(
event
)
{
var
url
=
vm
.
schedule
.
jobId
==
null
?
"../sys/schedule/save"
:
"../sys/schedule/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
schedule
),
contentType
:
"application/json"
,
type
:
'POST'
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
var
jobIds
=
getSelectedRows
(
"#sysScheduleGrid"
);
if
(
jobIds
==
null
)
{
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../sys/schedule/delete"
,
params
:
JSON
.
stringify
(
jobIds
),
contentType
:
"application/json"
,
type
:
'POST'
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
pause
:
function
(
event
)
{
var
jobIds
=
getSelectedRows
(
"#sysScheduleGrid"
);
if
(
jobIds
==
null
)
{
return
;
}
confirm
(
'确定要暂停选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../sys/schedule/pause"
,
params
:
JSON
.
stringify
(
jobIds
),
contentType
:
"application/json"
,
type
:
'POST'
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
resume
:
function
(
event
)
{
var
jobIds
=
getSelectedRows
(
"#sysScheduleGrid"
);
if
(
jobIds
==
null
)
{
return
;
}
confirm
(
'确定要恢复选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../sys/schedule/resume"
,
params
:
JSON
.
stringify
(
jobIds
),
contentType
:
"application/json"
,
type
:
'POST'
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
runOnce
:
function
(
event
)
{
var
jobIds
=
getSelectedRows
(
"#sysScheduleGrid"
);
if
(
jobIds
==
null
)
{
return
;
}
confirm
(
'确定要立即执行选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../sys/schedule/run"
,
params
:
JSON
.
stringify
(
jobIds
),
contentType
:
"application/json"
,
type
:
'POST'
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
var
page
=
$
(
"#sysScheduleGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#sysScheduleGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'beanName'
:
vm
.
q
.
beanName
},
page
:
page
}).
trigger
(
"reloadGrid"
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
beanName
:
''
}
vm
.
query
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/schedule_log.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#sysScheduleLogGrid"
).
Grid
({
url
:
'../sys/scheduleLog/list'
,
colModel
:
[
{
label
:
'日志ID'
,
name
:
'logId'
,
index
:
'log_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'任务ID'
,
name
:
'jobId'
,
index
:
'job_id'
,
width
:
50
},
{
label
:
'bean名称'
,
name
:
'beanName'
,
index
:
'bean_name'
,
width
:
60
},
{
label
:
'方法名称'
,
name
:
'methodName'
,
index
:
'method_name'
,
width
:
60
},
{
label
:
'参数'
,
name
:
'params'
,
index
:
'params'
,
width
:
60
},
{
label
:
'状态'
,
name
:
'status'
,
index
:
'status'
,
width
:
50
,
formatter
:
function
(
value
,
options
,
row
)
{
return
value
===
0
?
'<span class="label label-success">成功</span>'
:
'<span class="label label-danger pointer" onclick="vm.showError('
+
row
.
logId
+
')">失败</span>'
;
}
},
{
label
:
'耗时(单位:毫秒)'
,
name
:
'times'
,
index
:
'times'
,
width
:
70
},
{
label
:
'执行时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
,
formatter
:
function
(
value
)
{
return
transDate
(
value
);
}
}
],
footerrow
:
true
,
gridComplete
:
function
()
{
var
rowNum
=
parseInt
(
$
(
this
).
getGridParam
(
'records'
),
10
);
if
(
rowNum
>
0
)
{
$
(
".ui-jqgrid-sdiv"
).
show
();
var
times
=
jQuery
(
this
).
getCol
(
'times'
,
false
,
'sum'
);
$
(
this
).
footerData
(
"set"
,
{
"jobId"
:
"<font color='red'>合计<font>"
,
"times"
:
"<font color='red'>"
+
times
+
"<font>"
});
}
else
{
$
(
".ui-jqgrid-sdiv"
).
hide
();
}
}
});
});
var
vm
=
new
Vue
({
el
:
'#sysScheduleLog'
,
data
:
{
q
:
{
jobId
:
null
}
},
methods
:
{
query
:
function
()
{
$
(
"#sysScheduleLogGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'jobId'
:
vm
.
q
.
jobId
},
page
:
1
}).
trigger
(
"reloadGrid"
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
jobId
:
''
}
vm
.
query
();
},
showError
:
function
(
logId
)
{
Ajax
.
request
({
url
:
"../sys/scheduleLog/info/"
+
logId
,
successCallback
:
function
(
r
)
{
openWindow
({
title
:
'失败信息'
,
area
:
[
'600px'
,
'400px'
],
shadeClose
:
true
,
content
:
r
.
log
.
error
});
}
});
},
back
:
function
(
event
)
{
history
.
go
(
-
1
);
}
}
});
src/main/resources/mapper/sys/smslog.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#sysSmsLogGrid"
).
Grid
({
url
:
'../sys/smslog/list'
,
colModel
:
[
{
label
:
'id'
,
name
:
'id'
,
index
:
'id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'操作人'
,
name
:
'userName'
,
index
:
'user_id'
,
width
:
80
},
{
label
:
'发送编号'
,
name
:
'sendId'
,
index
:
'send_id'
,
width
:
80
},
{
label
:
'发送内容'
,
name
:
'content'
,
index
:
'content'
,
width
:
80
},
{
label
:
'发送时间'
,
name
:
'stime'
,
index
:
'stime'
,
width
:
100
,
formatter
:
function
(
value
)
{
return
transDate
(
value
,
'yyyy-MM-dd hh:mm:ss'
);
}
},
{
label
:
'用户签名'
,
name
:
'sign'
,
index
:
'sign'
,
width
:
80
},
{
label
:
'发送状态'
,
name
:
'sendStatus'
,
index
:
'send_status'
,
width
:
80
,
formatter
:
function
(
value
)
{
if
(
value
===
0
)
{
return
'<span class="label label-success">成功</span>'
;
}
return
'<span class="label label-danger">失败</span>'
;
}
},
{
label
:
'无效号码数'
,
name
:
'invalidNum'
,
index
:
'invalid_num'
,
width
:
80
},
{
label
:
'成功提交数'
,
name
:
'successNum'
,
index
:
'success_num'
,
width
:
80
},
{
label
:
'黑名单数'
,
name
:
'blackNum'
,
index
:
'black_num'
,
width
:
80
},
{
label
:
'返回消息'
,
name
:
'returnMsg'
,
index
:
'return_msg'
,
width
:
100
}]
});
});
let
vm
=
new
Vue
({
el
:
'#sysSmsLog'
,
data
:
{
showList
:
true
,
title
:
null
,
config
:
{},
ruleValidate
:
{
domain
:
[
{
required
:
true
,
message
:
'发送域名不能为空'
,
trigger
:
'blur'
}
],
name
:
[
{
required
:
true
,
message
:
'用户名不能为空'
,
trigger
:
'blur'
}
],
pwd
:
[
{
required
:
true
,
message
:
'接口密钥不能为空'
,
trigger
:
'blur'
}
],
sign
:
[
{
required
:
true
,
message
:
'签名不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
sendId
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
addConfig
:
function
(
event
)
{
vm
.
showList
=
false
;
vm
.
title
=
"短信配置"
;
vm
.
getConfig
();
},
updateConfig
:
function
(
event
)
{
let
url
=
"../sys/smslog/saveConfig"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
config
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
getConfig
:
function
()
{
Ajax
.
request
({
url
:
"../sys/smslog/config"
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
config
=
r
.
config
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#sysSmsLogGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#sysSmsLogGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'sendId'
:
vm
.
q
.
sendId
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
sendId
:
''
}
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
updateConfig
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
},
sendSms
:
function
()
{
openWindow
({
type
:
2
,
title
:
'发送短信'
,
area
:
[
'1030px'
,
'500px'
],
content
:
[
'sendsms.html'
],
cancel
:
function
(
index
)
{
vm
.
reload
();
}
});
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfaddress.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfaddress/list'
,
colModel
:
[
{
label
:
'addressId'
,
name
:
'addressId'
,
index
:
'address_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'用户id'
,
name
:
'userId'
,
index
:
'user_id'
,
width
:
80
},
{
label
:
'收货人'
,
name
:
'deliveryName'
,
index
:
'delivery_name'
,
width
:
80
},
{
label
:
'联系电话'
,
name
:
'phone'
,
index
:
'phone'
,
width
:
80
},
{
label
:
'是否为默认地址'
,
name
:
'defaultFlag'
,
index
:
'default_flag'
,
width
:
80
},
{
label
:
'地址详情'
,
name
:
'addressDetail'
,
index
:
'address_detail'
,
width
:
80
},
{
label
:
'所在国家code'
,
name
:
'addressCountryCode'
,
index
:
'address_country_code'
,
width
:
80
},
{
label
:
'所在国家'
,
name
:
'addressCountryName'
,
index
:
'address_country_name'
,
width
:
80
},
{
label
:
'所在州code'
,
name
:
'addressStateCode'
,
index
:
'address_state_code'
,
width
:
80
},
{
label
:
'所在州'
,
name
:
'addressStateName'
,
index
:
'address_state_name'
,
width
:
80
},
{
label
:
'所在区code'
,
name
:
'addressAreaCode'
,
index
:
'address_area_code'
,
width
:
80
},
{
label
:
'所在区'
,
name
:
'addressAreaName'
,
index
:
'address_area_name'
,
width
:
80
},
{
label
:
'标签code'
,
name
:
'labelCode'
,
index
:
'label_code'
,
width
:
80
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
},
{
label
:
'修改时间'
,
name
:
'updateTime'
,
index
:
'update_time'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfAddress
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfAddress
=
{};
},
update
:
function
(
event
)
{
let
addressId
=
getSelectedRow
(
"#jqGrid"
);
if
(
addressId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
addressId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfAddress
.
addressId
==
null
?
"../tbcfaddress/save"
:
"../tbcfaddress/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfAddress
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
addressIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
addressIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfaddress/delete"
,
params
:
JSON
.
stringify
(
addressIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
addressId
){
Ajax
.
request
({
url
:
"../tbcfaddress/info/"
+
addressId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfAddress
=
r
.
tbCfAddress
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfcartrecordr.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfcartrecordr/list'
,
colModel
:
[
{
label
:
'cartRecordId'
,
name
:
'cartRecordId'
,
index
:
'cart_record_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'商品id'
,
name
:
'itemId'
,
index
:
'item_id'
,
width
:
80
},
{
label
:
'用户id'
,
name
:
'userId'
,
index
:
'user_id'
,
width
:
80
},
{
label
:
'是否已经被勾选,0未勾选,1勾选'
,
name
:
'checkFlag'
,
index
:
'check_flag'
,
width
:
80
},
{
label
:
'是否有效'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
80
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfCartRecordR
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfCartRecordR
=
{};
},
update
:
function
(
event
)
{
let
cartRecordId
=
getSelectedRow
(
"#jqGrid"
);
if
(
cartRecordId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
cartRecordId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfCartRecordR
.
cartRecordId
==
null
?
"../tbcfcartrecordr/save"
:
"../tbcfcartrecordr/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfCartRecordR
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
cartRecordIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
cartRecordIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfcartrecordr/delete"
,
params
:
JSON
.
stringify
(
cartRecordIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
cartRecordId
){
Ajax
.
request
({
url
:
"../tbcfcartrecordr/info/"
+
cartRecordId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfCartRecordR
=
r
.
tbCfCartRecordR
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfcontact.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfcontact/list'
,
colModel
:
[
{
label
:
'contactId'
,
name
:
'contactId'
,
index
:
'contact_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'联系方式'
,
name
:
'contactWay'
,
index
:
'contact_way'
,
width
:
80
},
{
label
:
'联系详情'
,
name
:
'contactDetail'
,
index
:
'contact_detail'
,
width
:
80
},
{
label
:
'是否有效'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
80
,
formatter
:
yesOrNoFormat
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfContact
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfContact
=
{};
},
update
:
function
(
event
)
{
let
contactId
=
getSelectedRow
(
"#jqGrid"
);
if
(
contactId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
contactId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfContact
.
contactId
==
null
?
"../tbcfcontact/save"
:
"../tbcfcontact/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfContact
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
contactIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
contactIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfcontact/delete"
,
params
:
JSON
.
stringify
(
contactIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
contactId
){
Ajax
.
request
({
url
:
"../tbcfcontact/info/"
+
contactId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfContact
=
r
.
tbCfContact
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfcountryconfig.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfcountryconfig/list'
,
colModel
:
[
{
label
:
'configId'
,
name
:
'configId'
,
index
:
'config_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'地区编号'
,
name
:
'locationCode'
,
index
:
'location_code'
,
width
:
80
},
{
label
:
'地区类型'
,
name
:
'locationType'
,
index
:
'location_type'
,
width
:
80
},
{
label
:
'地区名称'
,
name
:
'locationName'
,
index
:
'location_name'
,
width
:
80
},
{
label
:
'上级编号'
,
name
:
'parentCode'
,
index
:
'parent_code'
,
width
:
80
},
{
label
:
'英文名'
,
name
:
'englishName'
,
index
:
'english_name'
,
width
:
80
},
{
label
:
'缩写名'
,
name
:
'shortName'
,
index
:
'short_name'
,
width
:
80
},
{
label
:
'是否有下一级'
,
name
:
'endFlag'
,
index
:
'end_flag'
,
width
:
80
},
{
label
:
'是否启用'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
80
,
formatter
:
yesOrNoFormat
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfCountryConfig
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfCountryConfig
=
{};
},
update
:
function
(
event
)
{
let
configId
=
getSelectedRow
(
"#jqGrid"
);
if
(
configId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
configId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfCountryConfig
.
configId
==
null
?
"../tbcfcountryconfig/save"
:
"../tbcfcountryconfig/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfCountryConfig
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
configIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
configIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfcountryconfig/delete"
,
params
:
JSON
.
stringify
(
configIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
configId
){
Ajax
.
request
({
url
:
"../tbcfcountryconfig/info/"
+
configId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfCountryConfig
=
r
.
tbCfCountryConfig
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfcoupon.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfcoupon/list'
,
colModel
:
[
{
label
:
'couponId'
,
name
:
'couponId'
,
index
:
'coupon_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'优惠券类型Id '
,
name
:
'couponCategoryId'
,
index
:
'couponCategoryId'
,
width
:
80
,
hidden
:
true
},
{
label
:
'优惠券类型 '
,
name
:
'couponCategoryName'
,
index
:
'couponCategoryName'
,
width
:
80
},
{
label
:
'可用于类目'
,
name
:
'couponUse'
,
index
:
'coupon_use'
,
width
:
80
,
hidden
:
true
},
{
label
:
'优惠券标题'
,
name
:
'couponTitle'
,
index
:
'coupon_title'
,
width
:
80
},
{
label
:
'优惠券图片地址'
,
name
:
'couponIcon'
,
index
:
'coupon_icon'
,
width
:
80
},
{
label
:
'那些站点可以使用'
,
name
:
'withStationId'
,
index
:
'with_station_id'
,
width
:
80
,
hidden
:
true
},
{
label
:
'满多少金额可以使用'
,
name
:
'withAmount'
,
index
:
'with_amount'
,
width
:
80
},
{
label
:
'抵扣金额'
,
name
:
'deductAmount'
,
index
:
'deduct_amount'
,
width
:
80
},
{
label
:
'发券数量'
,
name
:
'quato'
,
index
:
'quato'
,
width
:
80
},
{
label
:
'已领取数量'
,
name
:
'takeCount'
,
index
:
'take_count'
,
width
:
80
,
hidden
:
true
},
{
label
:
'已使用数量'
,
name
:
'usedCount'
,
index
:
'used_count'
,
width
:
80
,
hidden
:
true
},
{
label
:
'发放开始时间'
,
name
:
'startTime'
,
index
:
'start_time'
,
width
:
80
},
{
label
:
'发放结束时间'
,
name
:
'endTime'
,
index
:
'end_time'
,
width
:
80
},
{
label
:
'有效开始时间'
,
name
:
'validStartTime'
,
index
:
'valid_start_time'
,
width
:
80
},
{
label
:
'有效结束时间'
,
name
:
'validEndTime'
,
index
:
'valid_end_time'
,
width
:
80
},
{
label
:
'有效标志'
,
name
:
'status'
,
index
:
'status'
,
width
:
80
,
formatter
:
stateFormat
},
{
label
:
'创建人'
,
name
:
'createUserId'
,
index
:
'create_user_id'
,
width
:
80
,
hidden
:
true
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
},
{
label
:
'修改人'
,
name
:
'updateUserId'
,
index
:
'update_user_id'
,
width
:
80
,
hidden
:
true
},
{
label
:
'修改时间'
,
name
:
'updateTime'
,
index
:
'update_time'
,
width
:
80
,
hidden
:
true
},
{
label
:
'是否为注册就送优惠券'
,
name
:
'couponVaild'
,
index
:
'coupon_vaild'
,
width
:
80
,
hidden
:
true
}]
});
});
$
(
function
()
{
$
(
"#jqGrid1"
).
Grid
({
url
:
'../tbcfcouponIssue/list'
,
colModel
:
[
{
label
:
'couponIssueId'
,
name
:
'couponIssueId'
,
index
:
'coupon_issue_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'优惠券名称'
,
name
:
'couponId'
,
index
:
'coupon_id'
,
width
:
80
},
{
label
:
'用户状态'
,
name
:
'userStatus'
,
index
:
'user_status'
,
width
:
80
,
formatter
:
userStatusFormat
},
{
label
:
'用户等级'
,
name
:
'userLevel'
,
index
:
'user_level'
,
width
:
80
,
formatter
:
userLevelFormat
}]
});
});
$
(
function
()
{
$
(
"#jqGrid2"
).
Grid
({
url
:
'../tbCfCouponCategory/list'
,
colModel
:
[
{
label
:
'优惠券类型ID'
,
name
:
'couponCategoryId'
,
index
:
'coupon_category_id'
,
key
:
true
},
{
label
:
'优惠券类型名称 '
,
name
:
'couponCategoryName'
,
index
:
'coupon_category_name'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
takeVisible
:
false
,
issueVisible
:
false
,
useVisible
:
false
,
takeTitle
:
"领取详情(已领取数:0)"
,
issueTitle
:
"领取详情(已领取数:0)"
,
//领取优惠券情况
takeData
:[],
issueData
:[],
userStatusOptions
:[{
value
:
'10'
,
label
:
'未下单的用户'
},{
value
:
'20'
,
label
:
'新用户'
},{
value
:
'30'
,
label
:
'已下单的用户'
},{
value
:
'40'
,
label
:
'添加购物车的用户'
}],
userLevelOptions
:[{
value
:
'10'
,
label
:
'1'
},{
value
:
'20'
,
label
:
'2'
},{
value
:
'30'
,
label
:
'3'
},{
value
:
'40'
,
label
:
'4'
}],
showEdit
:
true
,
showList
:
true
,
showCategory
:
true
,
title
:
null
,
tbCfCoupon
:
{},
tbCfCouponIssue
:
{},
tbCfCouponCategory
:
{},
//优惠券类型
CouponCategory
:
null
,
Coupon
:
null
,
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
},
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
();
},
shortcuts
:
[{
text
:
'今天'
,
onClick
(
picker
)
{
picker
.
$emit
(
'pick'
,
new
Date
());
}
},
{
text
:
'昨天'
,
onClick
(
picker
)
{
const
date
=
new
Date
();
date
.
setTime
(
date
.
getTime
()
-
3600
*
1000
*
24
);
picker
.
$emit
(
'pick'
,
date
);
}
},
{
text
:
'一周前'
,
onClick
(
picker
)
{
const
date
=
new
Date
();
date
.
setTime
(
date
.
getTime
()
-
3600
*
1000
*
24
*
7
);
picker
.
$emit
(
'pick'
,
date
);
}
}]
}
},
methods
:
{
changeCouponCategory
(){
let
url
=
`/africa_shop/tbcfcouponcategory/queryByCouponCategoryId?categoryId=
${
this
.
tbCfCoupon
.
couponCategoryId
}
`
;
console
.
log
(
'url'
,
url
)
let
that
=
this
;
Ajax
.
request
({
url
:
url
,
type
:
"get"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r4
)
{
console
.
log
(
'res'
,
r4
)
if
(
r4
.
code
===
0
){
that
.
couponCategory
=
r4
.
list
console
.
log
(
that
.
couponCategory
)
}
}
});
},
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfCoupon
=
{};
},
update
:
function
(
event
)
{
let
couponId
=
getSelectedRow
(
"#jqGrid"
);
if
(
couponId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
couponId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfCoupon
.
couponId
==
null
?
"../tbcfcoupon/save"
:
"../tbcfcoupon/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfCoupon
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
couponIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
couponIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfcoupon/delete"
,
params
:
JSON
.
stringify
(
couponIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
couponId
){
Ajax
.
request
({
url
:
"../tbcfcoupon/info/"
+
couponId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfCoupon
=
r
.
tbCfCoupon
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
},
//获取领取详情
showTake
:
function
()
{
let
couponId
=
getSelectedRow
(
"#jqGrid"
);
if
(
couponId
==
null
)
{
return
;
}
vm
.
takeVisible
=
true
;
vm
.
getCouponTakeList
(
couponId
);
},
//获取发放详情
showIssue
:
function
()
{
let
couponId
=
getSelectedRow
(
"#jqGrid"
);
if
(
couponId
==
null
)
{
return
;
}
vm
.
issueVisible
=
true
;
vm
.
getCouponIssueList
(
couponId
);
},
//获取优惠券领取情况
getCouponTakeList
:
function
(
couponId
)
{
Ajax
.
request
({
url
:
"../tbcfcoupon/take/"
+
couponId
,
async
:
true
,
successCallback
:
function
(
r5
)
{
vm
.
takeData
=
r5
.
list
;
var
length
=
0
;
if
(
!!
vm
.
takeData
)
{
length
=
vm
.
takeData
.
length
;
}
vm
.
takeTitle
=
"领取详情(已领取数:"
+
length
+
")"
;
}
});
},
//获取优惠券发放情况
getCouponIssueList
:
function
(
couponId
)
{
Ajax
.
request
({
url
:
"../tbcfcoupon/issue/"
+
couponId
,
async
:
true
,
successCallback
:
function
(
r6
)
{
vm
.
issueData
=
r6
.
list
;
var
length
=
0
;
if
(
!!
vm
.
issueData
)
{
length
=
vm
.
issueData
.
length
;
}
vm
.
issueTitle
=
"领取详情(已领取数:"
+
length
+
")"
;
}
});
},
insertcoupon
:
function
(){
this
.
showCategory
=
false
vm
.
title
=
"新增优惠券类型"
;
vm
.
tbCfCouponCategory
=
{};
console
.
log
(
"insertcoupon"
)
},
edit
:
function
(){
this
.
showEdit
=
false
vm
.
title
=
"设置优惠券发放"
;
vm
.
tbCfCoupon
=
{};
},
saveOrUpdate1
:
function
(
event
)
{
let
url
=
vm
.
tbCfCoupon
.
couponIssueId
==
null
?
"../tbcfcouponissue/save"
:
"../tbcfcouponissue/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfCoupon
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r1
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload1
();
});
}
});
},
getInfo1
:
function
(
couponIssueId
){
Ajax
.
request
({
url
:
"../tbcfcoupon/info/"
+
couponIssueId
,
async
:
true
,
successCallback
:
function
(
r1
)
{
vm
.
tbCfCouponIssue
=
r1
.
tbCfCouponIssue
;
}
});
},
reload1
:
function
(
event
)
{
vm
.
showEdit
=
true
;
let
page
=
$
(
"#jqGrid1"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid1"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset1
(
'formValidate1'
);
},
handleSubmit1
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate1
()
});
},
handleReset1
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
},
saveOrUpdate2
:
function
(
event
)
{
let
url
=
vm
.
tbCfCoupon
.
couponCategoryId
==
null
?
"../tbcfcouponcategory/save"
:
"../tbcfcouponcategory/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfCoupon
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r2
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload2
();
});
}
});
},
getInfo2
:
function
(
couponCategoryId
){
Ajax
.
request
({
url
:
"../tbcfcouponcategory/info/"
+
couponCategoryId
,
async
:
true
,
successCallback
:
function
(
r2
)
{
vm
.
tbCfCouponCategory
=
r2
.
tbCfCouponCategory
;
}
});
},
reload2
:
function
(
event
)
{
vm
.
showCategory
=
true
;
let
page
=
$
(
"#jqGrid2"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid2"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset2
(
'formValidate2'
);
},
handleSubmit2
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate2
()
});
},
handleReset2
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
},
created
(){
debugger
var
that
=
this
$
.
get
(
'../tbcfcoupon/queryAll'
,
function
(
res
)
{
console
.
log
(
res
.
list
)
that
.
Coupon
=
res
.
list
;
})
var
ta
=
this
$
.
get
(
'../tbcfcouponcategory/queryAll'
,
function
(
res1
)
{
console
.
log
(
res1
.
list
)
ta
.
CouponCategory
=
res1
.
list
;
})
}
});
src/main/resources/mapper/sys/tbcfcouponcategory.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfcouponcategory/list'
,
colModel
:
[
{
label
:
'couponCategoryId'
,
name
:
'couponCategoryId'
,
index
:
'coupon_category_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'优惠券类型名称 '
,
name
:
'couponCategoryName'
,
index
:
'coupon_category_name'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfCouponCategory
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
handleSubmit2
(){
console
.
log
(
111
)
},
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfCouponCategory
=
{};
},
update
:
function
(
event
)
{
let
couponCategoryId
=
getSelectedRow
(
"#jqGrid"
);
if
(
couponCategoryId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
couponCategoryId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfCouponCategory
.
couponCategoryId
==
null
?
"../tbcfcouponcategory/save"
:
"../tbcfcouponcategory/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfCouponCategory
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
couponCategoryIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
couponCategoryIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfcouponcategory/delete"
,
params
:
JSON
.
stringify
(
couponCategoryIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
couponCategoryId
){
Ajax
.
request
({
url
:
"../tbcfcouponcategory/info/"
+
couponCategoryId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfCouponCategory
=
r
.
tbCfCouponCategory
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfcouponuse.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfcouponuse/list'
,
colModel
:
[
{
label
:
'useId'
,
name
:
'useId'
,
index
:
'use_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'用户名称'
,
name
:
'name'
,
index
:
'name'
,
width
:
80
},
{
label
:
'优惠券名称'
,
name
:
'title'
,
index
:
'title'
,
width
:
80
},
{
label
:
'使用时间'
,
name
:
'useTime'
,
index
:
'use_time'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfCouponUse
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
handleSubmit1
(){
console
.
log
(
111
)
},
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfCouponUse
=
{};
},
update
:
function
(
event
)
{
let
useId
=
getSelectedRow
(
"#jqGrid"
);
if
(
useId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
useId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfCouponUse
.
useId
==
null
?
"../tbcfcouponuse/save"
:
"../tbcfcouponuse/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfCouponUse
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
useIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
useIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfcouponuse/delete"
,
params
:
JSON
.
stringify
(
useIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
useId
){
Ajax
.
request
({
url
:
"../tbcfcouponuse/info/"
+
useId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfCouponUse
=
r
.
tbCfCouponUse
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfdailyfinance.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfdailyfinance/list'
,
colModel
:
[
{
label
:
'statisticsId'
,
name
:
'statisticsId'
,
index
:
'statistics_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'下单数'
,
name
:
'orderCount'
,
index
:
'order_count'
,
width
:
80
},
{
label
:
'下单用户数'
,
name
:
'userCount'
,
index
:
'user_count'
,
width
:
80
},
{
label
:
'下单商品数'
,
name
:
'itemCount'
,
index
:
'item_count'
,
width
:
80
},
{
label
:
'平均价格'
,
name
:
'itemAveragePrice'
,
index
:
'item_average_price'
,
width
:
80
},
{
label
:
'下单总额'
,
name
:
'totalSales'
,
index
:
'total_sales'
,
width
:
80
},
{
label
:
'统计时间'
,
name
:
'statisticsTime'
,
index
:
'statistics_time'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfDailyFinance
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfDailyFinance
=
{};
},
update
:
function
(
event
)
{
let
statisticsId
=
getSelectedRow
(
"#jqGrid"
);
if
(
statisticsId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
statisticsId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfDailyFinance
.
statisticsId
==
null
?
"../tbcfdailyfinance/save"
:
"../tbcfdailyfinance/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfDailyFinance
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
statisticsIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
statisticsIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfdailyfinance/delete"
,
params
:
JSON
.
stringify
(
statisticsIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
statisticsId
){
Ajax
.
request
({
url
:
"../tbcfdailyfinance/info/"
+
statisticsId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfDailyFinance
=
r
.
tbCfDailyFinance
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfdescripiton.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfdescripiton/list'
,
colModel
:
[
{
label
:
'descripitionId'
,
name
:
'descripitionId'
,
index
:
'descripition_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'商品品名'
,
name
:
'descripitionName'
,
index
:
'descripition_name'
,
width
:
80
},
{
label
:
'海关编码'
,
name
:
'descripitionCode'
,
index
:
'descripition_code'
,
width
:
80
},
{
label
:
'商品一级分类标题'
,
name
:
'goodtype'
,
index
:
'goodtype'
,
width
:
80
},
{
label
:
'商品二级分类标题'
,
name
:
'title'
,
index
:
'title'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfDescripiton
:
{},
Goodstype2
:
null
,
Goodstype
:
null
,
GoodstypeTwo
:
null
,
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
changeGoodstype
(){
let
url
=
`/africa_shop/tbcfdescripiton/queryByItemType?typeId=
${
this
.
tbCfDescripiton
.
goodstypeId
}
`
console
.
log
(
'url'
,
url
)
let
that
=
this
;
Ajax
.
request
({
url
:
url
,
type
:
"get"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
console
.
log
(
'res'
,
r
)
if
(
r
.
code
===
0
){
that
.
Goodstype2
=
r
.
list
console
.
log
(
that
.
Goodstype2
)
}
}
});
},
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfDescripiton
=
{};
},
update
:
function
(
event
)
{
let
descripitionId
=
getSelectedRow
(
"#jqGrid"
);
if
(
descripitionId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
descripitionId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfDescripiton
.
descripitionId
==
null
?
"../tbcfdescripiton/save"
:
"../tbcfdescripiton/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfDescripiton
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
descripitionIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
descripitionIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfdescripiton/delete"
,
params
:
JSON
.
stringify
(
descripitionIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
descripitionId
){
Ajax
.
request
({
url
:
"../tbcfdescripiton/info/"
+
descripitionId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfDescripiton
=
r
.
tbCfDescripiton
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
},
created
()
{
var
that
=
this
$
.
get
(
'../tbcfgoodstype/queryAll'
,
function
(
res
)
{
// console.log(that,"this");
that
.
Goodstype
=
res
.
list
;
// console.log(that.Goodstype);
});
$
.
get
(
'../tbcfgoodstwotype/queryAll'
,
function
(
res
)
{
// console.log(that,"this");
that
.
GoodstypeTwo
=
res
.
list
;
// console.log(res);
});
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfexpresstemplate.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfexpresstemplate/list'
,
colModel
:
[
{
label
:
'templateId'
,
name
:
'templateId'
,
index
:
'template_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'模板标题'
,
name
:
'templateTitle'
,
index
:
'template_title'
,
width
:
80
},
{
label
:
'商品类型 暂无用,用tb_cf_exp_cat_rel关联'
,
name
:
'itemCategoryId'
,
index
:
'item_category_id'
,
width
:
80
,
hidden
:
true
},
{
label
:
'快递费'
,
name
:
'expressFee'
,
index
:
'express_fee'
,
width
:
80
},
{
label
:
'国家编号'
,
name
:
'countryCode'
,
index
:
'country_code'
,
width
:
80
,
hidden
:
true
},
{
label
:
'创建日期'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
,
hidden
:
true
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfExpressTemplate
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfExpressTemplate
=
{};
},
update
:
function
(
event
)
{
let
templateId
=
getSelectedRow
(
"#jqGrid"
);
if
(
templateId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
templateId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfExpressTemplate
.
templateId
==
null
?
"../tbcfexpresstemplate/save"
:
"../tbcfexpresstemplate/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfExpressTemplate
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
templateIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
templateIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfexpresstemplate/delete"
,
params
:
JSON
.
stringify
(
templateIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
templateId
){
Ajax
.
request
({
url
:
"../tbcfexpresstemplate/info/"
+
templateId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfExpressTemplate
=
r
.
tbCfExpressTemplate
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfexptemkeyword.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfexptemkeyword/list'
,
colModel
:
[
{
label
:
'id'
,
name
:
'id'
,
index
:
'id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'模板id,express_template'
,
name
:
'templateId'
,
index
:
'template_id'
,
width
:
80
},
{
label
:
'关键字'
,
name
:
'keyword'
,
index
:
'keyword'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfExpTemKeyword
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfExpTemKeyword
=
{};
},
update
:
function
(
event
)
{
let
id
=
getSelectedRow
(
"#jqGrid"
);
if
(
id
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
id
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfExpTemKeyword
.
id
==
null
?
"../tbcfexptemkeyword/save"
:
"../tbcfexptemkeyword/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfExpTemKeyword
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
ids
=
getSelectedRows
(
"#jqGrid"
);
if
(
ids
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfexptemkeyword/delete"
,
params
:
JSON
.
stringify
(
ids
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
id
){
Ajax
.
request
({
url
:
"../tbcfexptemkeyword/info/"
+
id
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfExpTemKeyword
=
r
.
tbCfExpTemKeyword
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcffee.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcffee/list'
,
colModel
:
[
{
label
:
'feeId'
,
name
:
'feeId'
,
index
:
'fee_id'
,
key
:
true
,
hidden
:
true
},
//{label: '收费类型,1为百分比,目前只有一种收费方式', name: 'feeType', index: 'fee_type', width: 80},
//{label: '是否生效标志', name: 'enableFlag', index: 'enable_flag', width: 80},
{
label
:
'收取费用百分比'
,
name
:
'feePercent'
,
index
:
'fee_percent'
,
width
:
80
},
{
label
:
'设置美元转换'
,
name
:
'feeRate'
,
index
:
'fee_rate'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfFee
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfFee
=
{};
},
update
:
function
(
event
)
{
let
feeId
=
getSelectedRow
(
"#jqGrid"
);
if
(
feeId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
feeId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfFee
.
feeId
==
null
?
"../tbcffee/save"
:
"../tbcffee/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfFee
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
feeIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
feeIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcffee/delete"
,
params
:
JSON
.
stringify
(
feeIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
feeId
){
Ajax
.
request
({
url
:
"../tbcffee/info/"
+
feeId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfFee
=
r
.
tbCfFee
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcffeedback.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcffeedback/list'
,
colModel
:
[
{
label
:
'feedbackId'
,
name
:
'feedbackId'
,
index
:
'feedback_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'问题'
,
name
:
'question'
,
index
:
'question'
,
width
:
80
},
{
label
:
'是否展示,1展示,0不展示'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
80
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
,
hidden
:
true
},
{
label
:
'反馈问题类型,1为填写类型'
,
name
:
'questionType'
,
index
:
'question_type'
,
width
:
80
,
hidden
:
true
},
{
label
:
'排序,数字,倒序'
,
name
:
'sort'
,
index
:
'sort'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfFeedback
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfFeedback
=
{};
},
update
:
function
(
event
)
{
let
feedbackId
=
getSelectedRow
(
"#jqGrid"
);
if
(
feedbackId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
feedbackId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfFeedback
.
feedbackId
==
null
?
"../tbcffeedback/save"
:
"../tbcffeedback/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfFeedback
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
feedbackIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
feedbackIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcffeedback/delete"
,
params
:
JSON
.
stringify
(
feedbackIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
feedbackId
){
Ajax
.
request
({
url
:
"../tbcffeedback/info/"
+
feedbackId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfFeedback
=
r
.
tbCfFeedback
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcffeedbackrecord.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcffeedbackrecord/list'
,
colModel
:
[
{
label
:
'recordId'
,
name
:
'recordId'
,
index
:
'record_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'反馈用户id'
,
name
:
'userId'
,
index
:
'user_id'
,
width
:
80
},
{
label
:
'反馈问题id'
,
name
:
'feedbackId'
,
index
:
'feedback_id'
,
width
:
80
},
{
label
:
'反馈填写内容'
,
name
:
'answer'
,
index
:
'answer'
,
width
:
80
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfFeedbackRecord
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfFeedbackRecord
=
{};
},
update
:
function
(
event
)
{
let
recordId
=
getSelectedRow
(
"#jqGrid"
);
if
(
recordId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
recordId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfFeedbackRecord
.
recordId
==
null
?
"../tbcffeedbackrecord/save"
:
"../tbcffeedbackrecord/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfFeedbackRecord
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
recordIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
recordIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcffeedbackrecord/delete"
,
params
:
JSON
.
stringify
(
recordIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
recordId
){
Ajax
.
request
({
url
:
"../tbcffeedbackrecord/info/"
+
recordId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfFeedbackRecord
=
r
.
tbCfFeedbackRecord
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcffinance.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcffinance/list'
,
colModel
:
[
{
label
:
'finaceId'
,
name
:
'finaceId'
,
index
:
'finace_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'订单id'
,
name
:
'orderId'
,
index
:
'order_id'
,
width
:
80
},
{
label
:
'用户id'
,
name
:
'userId'
,
index
:
'user_id'
,
width
:
80
},
{
label
:
'支付款项'
,
name
:
'payAccount'
,
index
:
'pay_account'
,
width
:
80
},
{
label
:
'支付流水号'
,
name
:
'payId'
,
index
:
'pay_id'
,
width
:
80
},
{
label
:
'支付方式'
,
name
:
'payWayCode'
,
index
:
'pay_way_code'
,
width
:
80
},
{
label
:
'支付时间'
,
name
:
'payTime'
,
index
:
'pay_Time'
,
width
:
80
},
{
label
:
'支付后显示页面'
,
name
:
'receiptUrl'
,
index
:
'receipt_url'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfFinance
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfFinance
=
{};
},
update
:
function
(
event
)
{
let
finaceId
=
getSelectedRow
(
"#jqGrid"
);
if
(
finaceId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
finaceId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfFinance
.
finaceId
==
null
?
"../tbcffinance/save"
:
"../tbcffinance/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfFinance
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
finaceIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
finaceIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcffinance/delete"
,
params
:
JSON
.
stringify
(
finaceIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
finaceId
){
Ajax
.
request
({
url
:
"../tbcffinance/info/"
+
finaceId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfFinance
=
r
.
tbCfFinance
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
},
a
(){
console
.
log
(
'bcs'
)
$
.
get
(
'../tbcffinance/findByAvgOrderPrice'
,
function
(
res
)
{
console
.
log
(
res
)
})
// Ajax.request({
// url: "../tbcffinance/findBySumPay",
// type: "GET",
// contentType: "application/json",
// successCallback: function () {
//
// alert('操作成功', function (index) {
// vm.reload();
// });
// }
// });
}
},
mounted
(){
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfgoodstwotype.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfgoodstwotype/list'
,
colModel
:
[
{
label
:
'商品二级分类Id'
,
name
:
'goodstwotypeId'
,
index
:
'goodstwotype_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'商品一级分类标题'
,
name
:
'goodstypeTitle'
,
index
:
'goodstype_title'
,
width
:
80
},
{
label
:
'商品二级分类标题'
,
name
:
'goodstwotypeTitle'
,
index
:
'goodstwotype_title'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfGoodstwotype
:
{},
Goodstype
:
null
,
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfGoodstwotype
=
{};
},
update
:
function
(
event
)
{
let
goodstwotypeId
=
getSelectedRow
(
"#jqGrid"
);
if
(
goodstwotypeId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
goodstwotypeId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfGoodstwotype
.
goodstwotypeId
==
null
?
"../tbcfgoodstwotype/save"
:
"../tbcfgoodstwotype/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfGoodstwotype
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
goodstwotypeIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
goodstwotypeIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfgoodstwotype/delete"
,
params
:
JSON
.
stringify
(
goodstwotypeIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
goodstwotypeId
){
Ajax
.
request
({
url
:
"../tbcfgoodstwotype/info/"
+
goodstwotypeId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfGoodstwotype
=
r
.
tbCfGoodstwotype
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
},
created
(){
var
that
=
this
$
.
get
(
'../tbcfgoodstype/queryAll'
,
function
(
res
)
{
debugger
// console.log(that,"this");
that
.
Goodstype
=
res
.
list
;
// console.log(that.Goodstype);
})
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfgoodstype.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfgoodstype/list'
,
colModel
:
[
{
label
:
'goodstypeId'
,
name
:
'goodstypeId'
,
index
:
'goodstype_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'商品分类标题'
,
name
:
'goodstypeTitle'
,
index
:
'goodstype_title'
,
width
:
80
},
{
label
:
'商品分类排序编号'
,
name
:
'goodstypeSort'
,
index
:
'goodstype_sort'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfGoodstype
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfGoodstype
=
{};
},
update
:
function
(
event
)
{
let
goodstypeId
=
getSelectedRow
(
"#jqGrid"
);
if
(
goodstypeId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
goodstypeId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfGoodstype
.
goodstypeId
==
null
?
"../tbcfgoodstype/save"
:
"../tbcfgoodstype/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfGoodstype
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
goodstypeIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
goodstypeIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfgoodstype/delete"
,
params
:
JSON
.
stringify
(
goodstypeIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
goodstypeId
){
Ajax
.
request
({
url
:
"../tbcfgoodstype/info/"
+
goodstypeId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfGoodstype
=
r
.
tbCfGoodstype
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfhomepage.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfhomepage/list'
,
colModel
:
[
{
label
:
'pageId'
,
name
:
'pageId'
,
index
:
'page_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'图片名称'
,
name
:
'imgName'
,
index
:
'img_name'
,
width
:
80
},
{
label
:
'排序(倒序显示)'
,
name
:
'sort'
,
index
:
'sort'
,
width
:
80
},
{
label
:
'跳转链接'
,
name
:
'linkUrl'
,
index
:
'link_url'
,
width
:
100
,
formatter
:
linkFormat
},
{
label
:
'图片'
,
name
:
'imgUrl'
,
index
:
'img_url'
,
width
:
80
,
formatter
:
imageFormat
},
{
label
:
'是否支持浏览'
,
name
:
'scanFlag'
,
index
:
'scan_flag'
,
width
:
80
,
formatter
:
yesOrNoFormat
},
{
label
:
'是否跳转'
,
name
:
'redirectFlag'
,
index
:
'redirect_flag'
,
width
:
80
,
formatter
:
yesOrNoFormat
},
{
label
:
'是否可用'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
80
,
formatter
:
yesOrNoFormat
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfHomePage
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfHomePage
=
{};
},
update
:
function
(
event
)
{
let
pageId
=
getSelectedRow
(
"#jqGrid"
);
if
(
pageId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
pageId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfHomePage
.
pageId
==
null
?
"../tbcfhomepage/save"
:
"../tbcfhomepage/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfHomePage
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
pageIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
pageIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfhomepage/delete"
,
params
:
JSON
.
stringify
(
pageIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
pageId
){
Ajax
.
request
({
url
:
"../tbcfhomepage/info/"
+
pageId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfHomePage
=
r
.
tbCfHomePage
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
},
tirggerFile
:
function
(
event
)
{
var
file
=
event
.
target
.
files
[
0
];
// (利用console.log输出看file文件对象)
var
formData
=
new
FormData
();
formData
.
append
(
"file"
,
file
);
$
.
ajax
({
url
:
"../api/upload/image/"
,
type
:
"POST"
,
data
:
formData
,
cache
:
false
,
//不设置缓存
processData
:
false
,
// 不处理数据
contentType
:
false
,
// 不设置内容类型
success
:
function
(
result
)
{
result
=
JSON
.
parse
(
result
);
//console.log(result)
if
(
result
.
errno
==
0
)
{
//成功
vm
.
tbCfHomePage
.
imgUrl
=
result
.
data
;
vm
.
$forceUpdate
();
}
else
{
iview
.
Message
.
error
(
result
.
errmsg
);
}
}
});
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfissuecoupon.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfissuecoupon/list'
,
colModel
:
[
{
label
:
'couponIssuetableId'
,
name
:
'couponIssuetableId'
,
index
:
'coupon_issuetable_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'发放id'
,
name
:
'issueId'
,
index
:
'issue_id'
,
width
:
80
,
hidden
:
true
},
{
label
:
'优惠券类型'
,
name
:
'couponCategoryName'
,
index
:
'couponCategoryName'
,
width
:
80
},
{
label
:
'优惠券id'
,
name
:
'couponId'
,
index
:
'coupon_id'
,
width
:
80
,
hidden
:
true
},
{
label
:
'优惠券名称'
,
name
:
'couponTitle'
,
index
:
'coupon_title'
,
width
:
80
},
{
label
:
'用户id'
,
name
:
'userId'
,
index
:
'user_id'
,
width
:
80
,
hidden
:
true
},
{
label
:
'用户昵称'
,
name
:
'nick'
,
index
:
'nick'
,
width
:
80
},
{
label
:
'创建日期'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
},
{
label
:
'是否已经使用(0已使用,1未使用)'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
80
}
]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfIssueCoupon
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfIssueCoupon
=
{};
},
update
:
function
(
event
)
{
let
couponIssuetableId
=
getSelectedRow
(
"#jqGrid"
);
if
(
couponIssuetableId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
couponIssuetableId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfIssueCoupon
.
couponIssuetableId
==
null
?
"../tbcfissuecoupon/save"
:
"../tbcfissuecoupon/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfIssueCoupon
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
couponIssuetableIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
couponIssuetableIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfissuecoupon/delete"
,
params
:
JSON
.
stringify
(
couponIssuetableIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
couponIssuetableId
){
Ajax
.
request
({
url
:
"../tbcfissuecoupon/info/"
+
couponIssuetableId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfIssueCoupon
=
r
.
tbCfIssueCoupon
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfitemcomment.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfitemcomment/list'
,
colModel
:
[
{
label
:
'id'
,
name
:
'id'
,
index
:
'id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'评论人'
,
name
:
'userId'
,
index
:
'user_id'
,
width
:
80
},
{
label
:
'订单ID'
,
name
:
'orderId'
,
index
:
'order_id'
,
width
:
80
},
{
label
:
'商品ID'
,
name
:
'itemId'
,
index
:
'item_id'
,
width
:
80
},
{
label
:
'商品评分'
,
name
:
'itemScore'
,
index
:
'item_score'
,
width
:
80
},
{
label
:
'服务评分'
,
name
:
'serviceScore'
,
index
:
'service_score'
,
width
:
80
},
{
label
:
'物流评分'
,
name
:
'logisticsScore'
,
index
:
'logistics_score'
,
width
:
80
},
{
label
:
'价格评分'
,
name
:
'priceScore'
,
index
:
'price_score'
,
width
:
80
},
{
label
:
'商品评论'
,
name
:
'itemReview'
,
index
:
'item_review'
,
width
:
80
},
{
label
:
'点赞人数'
,
name
:
'likeNum'
,
index
:
'like_num'
,
width
:
80
},
{
label
:
'状态'
,
name
:
'delFlag'
,
index
:
'del_flag'
,
width
:
80
,
formatter
:
statusFormat
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
},
{
label
:
'回复时间'
,
name
:
'replyTime'
,
index
:
'reply_time'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfItemComment
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfItemComment
=
{};
},
update
:
function
(
event
)
{
let
id
=
getSelectedRow
(
"#jqGrid"
);
if
(
id
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
id
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfItemComment
.
id
==
null
?
"../tbcfitemcomment/save"
:
"../tbcfitemcomment/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfItemComment
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
ids
=
getSelectedRows
(
"#jqGrid"
);
if
(
ids
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfitemcomment/delete"
,
params
:
JSON
.
stringify
(
ids
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
id
){
Ajax
.
request
({
url
:
"../tbcfitemcomment/info/"
+
id
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfItemComment
=
r
.
tbCfItemComment
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfitemdetail.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfitemdetail/list'
,
colModel
:
[
{
label
:
'itemId'
,
name
:
'itemId'
,
index
:
'item_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'商品id,源平台的id,不一定有'
,
name
:
'sourceItemId'
,
index
:
'source_item_id'
,
width
:
80
},
{
label
:
'来源站点id'
,
name
:
'stationId'
,
index
:
'station_id'
,
width
:
80
},
{
label
:
'站点类型 1为商品独立站 2为店铺独立站 3为平台独立站'
,
name
:
'stationType'
,
index
:
'station_type'
,
width
:
80
},
{
label
:
'商品名称'
,
name
:
'itemTitle'
,
index
:
'item_title'
,
width
:
80
},
{
label
:
'商品数量'
,
name
:
'itemNum'
,
index
:
'item_num'
,
width
:
80
},
{
label
:
'商品主图'
,
name
:
'itemImg'
,
index
:
'item_img'
,
width
:
80
},
{
label
:
'商品单价'
,
name
:
'itemPrice'
,
index
:
'item_price'
,
width
:
80
},
{
label
:
'商品分类'
,
name
:
'itemCategory'
,
index
:
'item_category'
,
width
:
80
},
{
label
:
'商品skus'
,
name
:
'itemSku'
,
index
:
'item_sku'
,
width
:
80
},
{
label
:
'所属平台id'
,
name
:
'shopId'
,
index
:
'shop_id'
,
width
:
80
},
{
label
:
'所属平台名'
,
name
:
'shopName'
,
index
:
'shop_name'
,
width
:
80
},
{
label
:
'所属商铺链接'
,
name
:
'shopUrl'
,
index
:
'shop_url'
,
width
:
80
},
{
label
:
'加入时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfItemDetail
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfItemDetail
=
{};
},
update
:
function
(
event
)
{
let
itemId
=
getSelectedRow
(
"#jqGrid"
);
if
(
itemId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
itemId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfItemDetail
.
itemId
==
null
?
"../tbcfitemdetail/save"
:
"../tbcfitemdetail/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfItemDetail
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
itemIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
itemIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfitemdetail/delete"
,
params
:
JSON
.
stringify
(
itemIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
itemId
){
Ajax
.
request
({
url
:
"../tbcfitemdetail/info/"
+
itemId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfItemDetail
=
r
.
tbCfItemDetail
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfitemorderr.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfitemorderr/list'
,
colModel
:
[
{
label
:
'orderItemId'
,
name
:
'orderItemId'
,
index
:
'order_item_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'商品表记录id'
,
name
:
'itemId'
,
index
:
'item_id'
,
width
:
80
},
{
label
:
'订单id'
,
name
:
'orderId'
,
index
:
'order_id'
,
width
:
80
},
{
label
:
'是否有效'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfItemOrderR
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfItemOrderR
=
{};
},
update
:
function
(
event
)
{
let
orderItemId
=
getSelectedRow
(
"#jqGrid"
);
if
(
orderItemId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
orderItemId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfItemOrderR
.
orderItemId
==
null
?
"../tbcfitemorderr/save"
:
"../tbcfitemorderr/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfItemOrderR
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
orderItemIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
orderItemIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfitemorderr/delete"
,
params
:
JSON
.
stringify
(
orderItemIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
orderItemId
){
Ajax
.
request
({
url
:
"../tbcfitemorderr/info/"
+
orderItemId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfItemOrderR
=
r
.
tbCfItemOrderR
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcforder.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcforder/list'
,
/* colNames: ['orderId','订单号','用户编号','用户昵称','订单创建时间','商品品名','实际付款','收货地址','快递单号','快递状态','支付状态',
'代购状态','代购人','代购时间','操作', '更新时间','成交时间','交易关闭时间','订单状态','用户id','用户名','收货地址Id','收货地址','收货人','收货人手机',
'商品品名','商品总价','总价','实际付款','代购标志', '代购时间','快递费','优惠券id','优惠券标题','优惠券减免价格','税费','手续费','交易号','支付状态',
],*/
colModel
:
[
//显示字段
{
label
:
'orderId'
,
name
:
'orderId'
,
index
:
'order_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'订单号'
,
name
:
'orderNo'
,
index
:
'order_no'
,
width
:
120
},
{
label
:
'订单创建时间'
,
name
:
'orderTime'
,
index
:
'order_time'
,
width
:
90
},
{
label
:
'支付状态'
,
name
:
'payStatus'
,
index
:
'pay_status'
,
width
:
50
,
formatter
:
payStatusFormat
},
{
label
:
'订单状态'
,
name
:
'orderStatus'
,
index
:
'order_status'
,
width
:
50
,
formatter
:
orderStatusFormat
},
{
label
:
'代购状态'
,
name
:
'deliveryFlag'
,
index
:
'delivery_flag'
,
width
:
70
,
formatter
:
deliveryFlagFormat
},
{
label
:
'代购时间'
,
name
:
'deliveryTime'
,
index
:
'delivery_time'
,
width
:
100
},
{
label
:
'用户id'
,
name
:
'userId'
,
index
:
'user_id'
,
width
:
110
,
hidden
:
true
},
{
label
:
'用户名'
,
name
:
'userName'
,
index
:
'user_name'
,
width
:
55
},
{
label
:
'商品品名Id'
,
name
:
'descripitionId'
,
index
:
'descripition_id'
,
width
:
50
,
hidden
:
true
},
/* {label: '商品品名id', name: 'templateId', index: 'templateId', width: 50,hidden:true},
{label: '商品品名', name: 'templateTitle', index: 'templateTitle', width: 50,hidden:true},*/
{
label
:
'商品总价'
,
name
:
'itemsPrice'
,
index
:
'items_price'
,
width
:
80
},
{
label
:
'总价'
,
name
:
'totalPrice'
,
index
:
'total_price'
,
width
:
80
,
hidden
:
true
},
{
label
:
'实际付款'
,
name
:
'realityPay'
,
index
:
'reality_pay'
,
width
:
50
,
hidden
:
true
},
{
label
:
'收货地址Id'
,
name
:
'deliveryAddressId'
,
index
:
'delivery_address_id'
,
width
:
110
,
hidden
:
true
},
{
label
:
'收货地址'
,
name
:
'deliveryAddress'
,
index
:
'delivery_address'
,
width
:
120
},
{
label
:
'收货人'
,
name
:
'deliveryName'
,
index
:
'delivery_name'
,
width
:
70
},
{
label
:
'收货人手机'
,
name
:
'deliveryPhone'
,
index
:
'delivery_phone'
,
width
:
70
},
{
label
:
'快递费'
,
name
:
'expressCost'
,
index
:
'express_cost'
,
width
:
80
,
hidden
:
true
},
{
label
:
'更新时间'
,
name
:
'updateTime'
,
index
:
'update_time'
,
width
:
120
,
hidden
:
true
},
{
label
:
'成交时间'
,
name
:
'dealTime'
,
index
:
'deal_time'
,
width
:
120
,
hidden
:
true
},
{
label
:
'优惠券id'
,
name
:
'couponId'
,
index
:
'coupon_id'
,
width
:
120
,
hidden
:
true
},
{
label
:
'优惠券标题'
,
name
:
'couponTitle'
,
index
:
'coupon_title'
,
width
:
120
,
hidden
:
true
},
{
label
:
'优惠券减免价格'
,
name
:
'deductAmount'
,
index
:
'deduct_amount'
,
width
:
80
,
hidden
:
true
},
{
label
:
'税费'
,
name
:
'tax'
,
index
:
'tax'
,
width
:
80
,
hidden
:
true
},
{
label
:
'手续费'
,
name
:
'fee'
,
index
:
'fee'
,
width
:
80
,
hidden
:
true
},
{
label
:
'交易号'
,
name
:
'payId'
,
index
:
'pay_id'
,
width
:
120
,
hidden
:
true
},
{
label
:
'交易关闭时间'
,
name
:
'closeTime'
,
index
:
'close_time'
,
width
:
100
}]
});
$
.
get
(
'../tbcfexpresstemplate/queryAll'
,
function
(
res
)
{
vm
.
descripition
=
JSON
.
parse
(
res
).
list
;
// console.log(vm.descripition)
})
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
//商品详情
itemVisible
:
false
,
//代购信息
agentVisible
:
false
,
//订单详情
orderVisible
:
false
,
//商品详情
itemData
:
[],
//订单详情
ordersData
:
[],
agentInfo
:
{
orderId
:
""
,
//代购人
userName
:
''
,
//快递单号
pExpressNumber
:
''
,
//商品品名
descripitionId
:
''
,
//实际付款
realityPay
:
''
,
//原网站订单号
pOrderId
:
''
,
//代购平台
platformName
:
''
},
orderStatusOptions
:[{
value
:
'20'
,
label
:
"已付款"
},{
value
:
'10'
,
label
:
"未付款"
},{
value
:
'40'
,
label
:
"已发货"
},{
value
:
'50'
,
label
:
"交易成功"
},{
value
:
'60'
,
label
:
"交易关闭"
}],
payStatusOptions
:[{
value
:
'20'
,
label
:
"已支付"
},{
value
:
'10'
,
label
:
"未支付"
}],
deliveryFlagOptions
:
[{
value
:
'0'
,
label
:
'未代购'
},{
value
:
'20'
,
label
:
'已到达中国仓'
},{
value
:
'40'
,
label
:
'已到达非洲仓'
}],
pickerOptions
:
{
shortcuts
:
[{
text
:
'最近一周'
,
onClick
(
picker
)
{
const
end
=
new
Date
();
const
start
=
new
Date
();
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
*
7
);
picker
.
$emit
(
'pick'
,
[
start
,
end
]);
}
},
{
text
:
'最近一个月'
,
onClick
(
picker
)
{
const
end
=
new
Date
();
const
start
=
new
Date
();
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
*
30
);
picker
.
$emit
(
'pick'
,
[
start
,
end
]);
}
},
{
text
:
'最近三个月'
,
onClick
(
picker
)
{
const
end
=
new
Date
();
const
start
=
new
Date
();
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
*
90
);
picker
.
$emit
(
'pick'
,
[
start
,
end
]);
}
}]
},
formLabelWidth
:
'120px'
,
value
:
''
,
showList
:
true
,
descripition
:
[],
title
:
null
,
tbCfOrder
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
orderNo
:
''
,
payStatus
:
''
,
orderStatus
:
''
,
deliveryFlag
:
''
},
methods
:
{
perChange
:
function
()
{
vm
.
reload
();
},
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfOrder
=
{};
},
//获取订单详情
showOrders
:
function
()
{
let
orderId
=
getSelectedRow
(
"#jqGrid"
);
if
(
orderId
==
null
)
{
return
;
}
vm
.
orderVisible
=
true
;
vm
.
getOrderDetails
(
orderId
);
},
//获取商品详情
showItems
:
function
()
{
let
orderId
=
getSelectedRow
(
"#jqGrid"
);
if
(
orderId
==
null
)
{
return
;
}
vm
.
itemVisible
=
true
;
vm
.
getOrderItemList
(
orderId
);
},
//获取代购信息
showAgent
:
function
()
{
let
orderId
=
getSelectedRow
(
"#jqGrid"
);
if
(
orderId
==
null
)
{
return
;
}
let
rowData
=
getSelectedRowData
(
"#jqGrid"
);
if
(
rowData
.
payStatus
!=
"已支付"
)
{
layer
.
msg
(
"订单尚未支付,不能添加代购信息!"
,{
time
:
3000
//2秒关闭(如果不配置,默认是3秒)
});
return
;
}
vm
.
agentVisible
=
true
;
vm
.
agentInfo
.
orderId
=
orderId
;
vm
.
getAgentInfo
(
orderId
);
},
update
:
function
(
event
)
{
let
orderId
=
getSelectedRow
(
"#jqGrid"
);
if
(
orderId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
orderId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfOrder
.
orderId
==
null
?
"../tbcforder/save"
:
"../tbcforder/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfOrder
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
orderIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
orderIds
==
null
)
{
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcforder/delete"
,
params
:
JSON
.
stringify
(
orderIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
orderId
)
{
Ajax
.
request
({
url
:
"../tbcforder/info/"
+
orderId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfOrder
=
r
.
tbCfOrder
;
}
});
},
/*获取订单中的商品*/
getOrderItemList
:
function
(
orderId
)
{
Ajax
.
request
({
url
:
"../tbcforder/item/"
+
orderId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
itemData
=
r
.
list
;
}
});
},
/*获取订单详情*/
getOrderDetails
:
function
(
orderId
)
{
Ajax
.
request
({
url
:
"../tbcforder/detail/"
+
orderId
,
async
:
true
,
successCallback
:
function
(
r1
)
{
vm
.
ordersData
=
r1
.
list
;
}
});
},
/*获取订单的代购信息*/
getAgentInfo
:
function
(
orderId
)
{
Ajax
.
request
({
url
:
"../tbcforder/agent/"
+
orderId
,
async
:
true
,
type
:
"get"
,
successCallback
:
function
(
r
)
{
console
.
log
(
r
)
if
(
!!
r
.
data
)
{
vm
.
agentInfo
=
r
.
data
;
}
else
{
vm
.
agentInfo
=
{
orderId
:
orderId
,
//代购人
userName
:
''
,
//商品品名
descripitionId
:
''
,
//快递单号
pExpressNumber
:
''
,
//实际付款
realityPay
:
''
,
//原网站订单号
pOrderId
:
''
,
//代购平台
platformName
:
''
};
}
}
});
},
//新增或者修改代购信息
saveOrUpdateAgentInfo
:
function
()
{
console
.
log
(
vm
.
agentInfo
.
descripitionId
);
console
.
log
(
vm
.
agentInfo
)
if
(
vm
.
agentInfo
.
descripitionId
){
Ajax
.
request
({
url
:
"../tbcforder/agent/"
,
params
:
JSON
.
stringify
(
vm
.
agentInfo
),
type
:
"post"
,
// dataType: "json",
contentType
:
'application/json'
,
successCallback
:
function
(
r
)
{
if
(
r
.
result
==
"1"
)
{
vm
.
agentVisible
=
false
;
layer
.
msg
(
"保存成功"
,
{
time
:
2000
//2秒关闭(如果不配置,默认是3秒)
});
}
else
{
alert
(
"保存失败"
);
}
}
// vm.agentInfo=r.data;
});
}
else
{
alert
(
"保存失败,请选择商品品名"
);
}
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
orderNo
=
vm
.
orderNo
;
let
start
=
vm
.
value
[
0
];
let
end
=
vm
.
value
[
1
];
let
payStatus
=
vm
.
payStatus
;
let
deliveryFlag
=
vm
.
deliveryFlag
;
let
orderStatus
=
vm
.
orderStatus
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
orderNo
,
'start'
:
start
,
'end'
:
end
,
'payStatus'
:
payStatus
,
'deliveryFlag'
:
deliveryFlag
,
'orderStatus'
:
orderStatus
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
orderStatus
=
''
,
vm
.
orderNo
=
''
,
vm
.
value
=
''
,
vm
.
payStatus
=
''
,
vm
.
deliveryFlag
=
''
,
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
src/main/resources/mapper/sys/tbcforderList.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcforder/orderList'
,
//colNames: ['orderId', 'itemId', '用户id', '订单号', '下单时间', '金额', '商品', '商品数量', '收货地址', '快递单号', '支付方式', '物流状态'],
/* cellEdit: true,
cellsubmit: "remote",
cellurl:'../tbcforder/changeDeliveryFlag/',*/
colModel
:
[
//显示字段
{
label
:
'orderId'
,
name
:
'orderId'
,
index
:
'order_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'itemId'
,
name
:
'itemId'
,
index
:
'item_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'用户id'
,
name
:
'userId'
,
index
:
'user_id'
,
width
:
120
},
{
label
:
'订单号'
,
name
:
'orderNo'
,
index
:
'order_no'
,
width
:
80
},
{
label
:
'下单时间'
,
name
:
'orderTime'
,
index
:
'order_time'
,
width
:
70
},
{
label
:
'金额'
,
name
:
'realityPay'
,
index
:
'reality_pay'
,
width
:
45
},
// formatter: "currency",formatoptions: {thousandsSeparator:",",decimalSeparator:".",decimalPlaces:"2", prefix:"$"}}, //在金额前加上$,加上后,页合计无法正常显示。
{
label
:
'商品'
,
name
:
'itemTitle'
,
index
:
'item_title'
,
width
:
90
},
{
label
:
'商品数量'
,
name
:
'itemNum'
,
index
:
'item_num'
,
width
:
30
},
{
label
:
'收货地址'
,
name
:
'deliveryAddress'
,
index
:
'delivery_address'
,
width
:
100
},
{
label
:
'快递单号'
,
name
:
'pExpressNumber'
,
index
:
'p_express_number'
,
width
:
80
,
sortable
:
false
},
{
label
:
'支付方式'
,
name
:
'payWayCode'
,
index
:
'pay_way_code'
,
width
:
35
},
{
label
:
'物流状态'
,
name
:
'deliveryFlag'
,
index
:
'delivery_flag'
,
width
:
40
,
formatter
:
deliveryFlagFormat
},
{
label
:
'代购人'
,
name
:
'userName'
,
index
:
'user_name'
,
width
:
40
},
{
label
:
'总金额'
,
name
:
'totalPay'
,
index
:
'totalPay'
,
width
:
40
,
hidden
:
true
}
/* , editable:true,edittype:'select',editoptions:{value:{
0:'等待处理', 10:'已经代购', 20:'正在配送', 30:'已到达中国仓', 40:'正运往非洲',50:'买家已签收'}*/
],
footerrow
:
true
,
gridComplete
:
function
(){
// 页合计
let
rowNum
=
parseInt
(
$
(
this
).
getGridParam
(
'records'
),
10
);
// let totalPay= $(this).getGridParam('totalSum');
if
(
rowNum
>
0
)
{
$
(
".ui-jqgrid-sdiv"
).
show
();
let
realityPay
=
jQuery
(
this
).
getCol
(
'realityPay'
,
false
,
'sum'
);
//let totalPay = jQuery(this).getCol('realityPay', false, 'sum');
$
(
this
).
footerData
(
"set"
,
{
"orderTime"
:
"<font color='red'>页合计<font>"
,
"realityPay"
:
"<font color='red'>"
+
"$"
+
realityPay
.
toFixed
(
2
)
+
"<font>"
,
/* "itemNum": "<font color='red'>总合计<font>",
"deliveryAddress": "<font color='red'>"+"$" + totalPay.toFixed(2) + "<font>",*/
});
}
else
{
$
(
".ui-jqgrid-sdiv"
).
hide
();
}
}
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfOrderList
:
{},
deliveryFlagOptions
:[{
value
:
'0'
,
label
:
'等待处理'
},{
value
:
'10'
,
label
:
'已代购'
},{
value
:
'20'
,
label
:
'已到达中国仓'
},{
value
:
'30'
,
label
:
'正运往非洲'
},{
value
:
'40'
,
label
:
'已到达非洲仓'
},{
value
:
'50'
,
label
:
'买家已签收'
}],
payWayCodeOptions
:[{
value
:
'stripe'
,
label
:
'stripe'
,
},{
value
:
'paypal'
,
label
:
'paypal'
,
},{
value
:
'flutterWave'
,
label
:
'flutterWave'
,
}],
deliveryFlag
:
''
,
payWayCode
:
''
,
pickerOptions
:
{
shortcuts
:
[{
text
:
'最近一周'
,
onClick
(
picker
)
{
const
end
=
new
Date
();
const
start
=
new
Date
();
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
*
7
);
picker
.
$emit
(
'pick'
,
[
start
,
end
]);
}
},
{
text
:
'最近一个月'
,
onClick
(
picker
)
{
const
end
=
new
Date
();
const
start
=
new
Date
();
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
*
30
);
picker
.
$emit
(
'pick'
,
[
start
,
end
]);
}
},
{
text
:
'最近三个月'
,
onClick
(
picker
)
{
const
end
=
new
Date
();
const
start
=
new
Date
();
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
*
90
);
picker
.
$emit
(
'pick'
,
[
start
,
end
]);
}
}]
},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
orderId
:
''
,
orderNo
:
''
,
value
:
''
,
},
methods
:
{
queryAll
:
function
()
{
vm
.
reload
();
},
handleCommand
:
function
(
value
){
alert
(
'click on item '
+
value
);
},
/* handlePayCode:function(value){
debugger;
Ajax.request({
url: "../tbcforder/orderList?pay=" + value,
async: true,
successCallback: function (r) {
vm.tbCfOrderList = r.tbCfOrderList;
}
});
},*/
/* saveOrUpdate: function (event) {
let url = vm.tbCfOrderList.orderId == null ? "../tbcforder/save" : "../tbcforder/update";
Ajax.request({
url: url,
params: JSON.stringify(vm.tbCfOrderList),
type: "POST",
contentType: "application/json",
successCallback: function (r) {
alert('操作成功', function (index) {
vm.reload();
});
}
});
},*/
/*del: function (event) {
let orderIds = getSelectedRows("#jqGrid");
if (orderIds == null) {
return;
}
confirm('确定要删除选中的记录?', function () {
Ajax.request({
url: "../tbcforder/delete",
params: JSON.stringify(orderIds),
type: "POST",
contentType: "application/json",
successCallback: function () {
alert('操作成功', function (index) {
vm.reload();
});
}
});
});
},*/
/* getInfo: function (orderId) {
Ajax.request({
url: "../tbcforder/info/" + orderId,
async: true,
successCallback: function (r) {
vm.tbCfOrderList = r.tbCfOrderList;
}
});
},*/
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
start
=
vm
.
value
[
0
];
let
end
=
vm
.
value
[
1
];
let
payWayCode
=
vm
.
payWayCode
;
let
deliveryFlag
=
vm
.
deliveryFlag
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
orderNo
,
'start'
:
start
,
'end'
:
end
,
'payWayCode'
:
payWayCode
,
'deliveryFlag'
:
deliveryFlag
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
deliveryFlag
=
''
;
vm
.
orderNo
=
''
;
vm
.
value
=
''
;
vm
.
payWayCode
=
''
;
vm
.
expressStatus
=
''
;
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
src/main/resources/mapper/sys/tbcfpagevisit.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfpagevisit/list'
,
colModel
:
[
{
label
:
'recordId'
,
name
:
'recordId'
,
index
:
'record_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'页面或者站点id'
,
name
:
'pageId'
,
index
:
'page_id'
,
width
:
80
},
{
label
:
'访问次数'
,
name
:
'pageCount'
,
index
:
'page_count'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfPageVisit
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfPageVisit
=
{};
},
update
:
function
(
event
)
{
let
recordId
=
getSelectedRow
(
"#jqGrid"
);
if
(
recordId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
recordId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfPageVisit
.
recordId
==
null
?
"../tbcfpagevisit/save"
:
"../tbcfpagevisit/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfPageVisit
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
recordIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
recordIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfpagevisit/delete"
,
params
:
JSON
.
stringify
(
recordIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
recordId
){
Ajax
.
request
({
url
:
"../tbcfpagevisit/info/"
+
recordId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfPageVisit
=
r
.
tbCfPageVisit
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfplatform.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfplatform/list'
,
colModel
:
[
{
label
:
'platformId'
,
name
:
'platformId'
,
index
:
'platform_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'平台编号'
,
name
:
'platformCode'
,
index
:
'platform_code'
,
width
:
80
},
{
label
:
'平台名字'
,
name
:
'platformName'
,
index
:
'platform_name'
,
width
:
80
},
{
label
:
'平台简介'
,
name
:
'platformBrief'
,
index
:
'platform_brief'
,
width
:
80
},
{
label
:
'平台链接'
,
name
:
'platformUrl'
,
index
:
'platform_url'
,
width
:
80
,
formatter
:
linkFormat
},
{
label
:
'平台图片'
,
name
:
'platformImg'
,
index
:
'platform_img'
,
width
:
80
,
formatter
:
imageFormat
},
{
label
:
'启用状态'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
80
},
{
label
:
'排序(倒序)'
,
name
:
'sort'
,
index
:
'sort'
,
width
:
80
},
{
label
:
'创建日期'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfPlatform
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfPlatform
=
{};
},
update
:
function
(
event
)
{
let
platformId
=
getSelectedRow
(
"#jqGrid"
);
if
(
platformId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
platformId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfPlatform
.
platformId
==
null
?
"../tbcfplatform/save"
:
"../tbcfplatform/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfPlatform
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
platformIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
platformIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfplatform/delete"
,
params
:
JSON
.
stringify
(
platformIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
platformId
){
Ajax
.
request
({
url
:
"../tbcfplatform/info/"
+
platformId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfPlatform
=
r
.
tbCfPlatform
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
},
tirggerFile
:
function
(
event
)
{
var
file
=
event
.
target
.
files
[
0
];
var
formData
=
new
FormData
();
formData
.
append
(
"file"
,
file
);
$
.
ajax
({
url
:
"../api/upload/image/"
,
type
:
"POST"
,
data
:
formData
,
cache
:
false
,
//不设置缓存
processData
:
false
,
// 不处理数据
contentType
:
false
,
// 不设置内容类型
success
:
function
(
result
)
{
result
=
JSON
.
parse
(
result
);
//console.log(result)
if
(
result
.
errno
==
0
)
{
//成功
vm
.
tbCfPlatform
.
platformImg
=
result
.
data
;
vm
.
$forceUpdate
();
}
else
{
iview
.
Message
.
error
(
result
.
errmsg
);
}
}
});
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfplatformorder.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfplatformorder/list'
,
colModel
:
[
{
label
:
'relativeId'
,
name
:
'relativeId'
,
index
:
'relative_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'订单id'
,
name
:
'orderId'
,
index
:
'order_id'
,
width
:
80
},
{
label
:
'第三方订单id'
,
name
:
'pOrderId'
,
index
:
'p_order_id'
,
width
:
80
},
{
label
:
'第三方平台名'
,
name
:
'platformName'
,
index
:
'platform_name'
,
width
:
80
},
{
label
:
'第三方平台编号'
,
name
:
'platformCode'
,
index
:
'platform_code'
,
width
:
80
},
{
label
:
'第三方发货地址'
,
name
:
'pDeliveryAddress'
,
index
:
'p_delivery_address'
,
width
:
80
},
{
label
:
'代购人'
,
name
:
'userName'
,
index
:
'user_name'
,
width
:
80
},
{
label
:
'代购人id'
,
name
:
'userId'
,
index
:
'user_id'
,
width
:
80
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
},
{
label
:
'实际付款'
,
name
:
'realityPay'
,
index
:
'reality_pay'
,
width
:
80
},
{
label
:
'第三方快递单号'
,
name
:
'pExpressNumber'
,
index
:
'p_express_number'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfPlatformOrder
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfPlatformOrder
=
{};
},
update
:
function
(
event
)
{
let
relativeId
=
getSelectedRow
(
"#jqGrid"
);
if
(
relativeId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
relativeId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfPlatformOrder
.
relativeId
==
null
?
"../tbcfplatformorder/save"
:
"../tbcfplatformorder/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfPlatformOrder
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
relativeIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
relativeIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfplatformorder/delete"
,
params
:
JSON
.
stringify
(
relativeIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
relativeId
){
Ajax
.
request
({
url
:
"../tbcfplatformorder/info/"
+
relativeId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfPlatformOrder
=
r
.
tbCfPlatformOrder
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfproblem.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfproblem/list'
,
colModel
:
[
{
label
:
'problemId'
,
name
:
'problemId'
,
index
:
'problem_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'问题明细'
,
name
:
'question'
,
index
:
'question'
,
width
:
80
},
{
label
:
'答案'
,
name
:
'answer'
,
index
:
'answer'
,
width
:
80
,
formatter
:
contentFormat
},
{
label
:
'是否展示'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
80
},
{
label
:
'排序'
,
name
:
'sort'
,
index
:
'sort'
,
width
:
80
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
}]
});
});
/**
* 增加修改的编辑器
* @type {UE.ui.Editor|*}
*/
var
ue
=
UE
.
getEditor
(
'container'
);
/**
* 获取文本框内容
* @returns {*|String|void}
*/
function
getContent
()
{
var
htmlContent
=
ue
.
getContent
();
return
htmlContent
;
}
/**
* 显示内容
* @param content
*/
function
showContent
(
problemId
)
{
$
(
'#contentModal'
).
modal
(
'show'
);
vm
.
getInfo
(
problemId
,
true
);
};
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfProblem
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfProblem
=
{};
},
update
:
function
(
event
)
{
let
problemId
=
getSelectedRow
(
"#jqGrid"
);
if
(
problemId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
problemId
);
},
saveOrUpdate
:
function
(
event
)
{
var
answer
=
getContent
();
vm
.
tbCfProblem
.
answer
=
encodeURI
(
answer
);
let
url
=
vm
.
tbCfProblem
.
problemId
==
null
?
"../tbcfproblem/save"
:
"../tbcfproblem/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfProblem
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
ue
.
setContent
(
""
);
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
problemIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
problemIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfproblem/delete"
,
params
:
JSON
.
stringify
(
problemIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
problemId
,
isShowDetail
){
Ajax
.
request
({
url
:
"../tbcfproblem/info/"
+
problemId
,
async
:
true
,
successCallback
:
function
(
r
)
{
console
.
log
(
r
)
r
.
tbCfProblem
.
answer
=
decodeURI
(
r
.
tbCfProblem
.
answer
);
vm
.
tbCfProblem
=
r
.
tbCfProblem
;
ue
.
setContent
(
vm
.
tbCfProblem
.
answer
);
if
(
!!
isShowDetail
)
{
var
answer
=
"无内容,请点击修改,添加内容"
;
if
(
!!
vm
.
tbCfProblem
.
answer
)
{
answer
=
vm
.
tbCfProblem
.
answer
;
}
$
(
"#contentContainer"
).
html
(
answer
);
}
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfreply.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfreply/list'
,
colModel
:
[
{
label
:
'id'
,
name
:
'id'
,
index
:
'id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'评论ID'
,
name
:
'commentId'
,
index
:
'comment_id'
,
width
:
80
},
{
label
:
'回复人'
,
name
:
'userId'
,
index
:
'user_id'
,
width
:
80
},
{
label
:
'回复对象'
,
name
:
'toUserId'
,
index
:
'to_user_id'
,
width
:
80
},
{
label
:
'回复内容'
,
name
:
'replyMessage'
,
index
:
'reply_message'
,
width
:
80
},
{
label
:
'状态'
,
name
:
'delFlag'
,
index
:
'del_flag'
,
width
:
80
,
formatter
:
statusFormat
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
}
]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfReply
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfReply
=
{};
},
update
:
function
(
event
)
{
let
id
=
getSelectedRow
(
"#jqGrid"
);
if
(
id
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
id
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfReply
.
id
==
null
?
"../tbcfreply/save"
:
"../tbcfreply/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfReply
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
ids
=
getSelectedRows
(
"#jqGrid"
);
if
(
ids
==
null
)
{
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfreply/delete"
,
params
:
JSON
.
stringify
(
ids
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
id
)
{
Ajax
.
request
({
url
:
"../tbcfreply/info/"
+
id
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfReply
=
r
.
tbCfReply
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfstationitem.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfstationitem/list'
,
colModel
:
[
{
label
:
'itemId'
,
name
:
'itemId'
,
index
:
'item_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'商品编号'
,
name
:
'itemCode'
,
index
:
'item_code'
,
width
:
80
},
{
label
:
'商品名字'
,
name
:
'itemName'
,
index
:
'item_name'
,
width
:
80
},
{
label
:
'商品标题简介'
,
name
:
'itemBrief'
,
index
:
'item_brief'
,
width
:
80
},
{
label
:
'商品链接'
,
name
:
'itemUrl'
,
index
:
'item_url'
,
width
:
80
,
formatter
:
linkFormat
},
{
label
:
'商品图片'
,
name
:
'itemImg'
,
index
:
'item_img'
,
width
:
80
,
formatter
:
imageFormat
},
{
label
:
'商品价格'
,
name
:
'itemPrice'
,
index
:
'item_price'
,
width
:
80
},
{
label
:
'点击量'
,
name
:
'itemNum'
,
index
:
'item_num'
,
width
:
80
},
{
label
:
'所属平台'
,
name
:
'platformCode'
,
index
:
'platform_code'
,
width
:
80
},
{
label
:
'平台名'
,
name
:
'platformName'
,
index
:
'platform_name'
,
width
:
80
},
{
label
:
'启用状态'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
80
},
{
label
:
'创建日期'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
},
{
label
:
'商品一级分类'
,
name
:
'goodtype'
,
index
:
'goodtype'
,
width
:
80
},
{
label
:
'商品二级分类'
,
name
:
'title'
,
index
:
'title'
,
width
:
80
},
{
label
:
'商品品名'
,
name
:
'dname'
,
index
:
'dname'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfStationItem
:
{},
Goodstype
:
null
,
Goodstype2
:
null
,
uploadList
:
[],
Goodstype3
:
null
,
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
//获取一级分类
changeGoodstype
(){
// console.log(this.tbCfStationItem.itemCategory);
let
url
=
"../tbcfstationitem/queryByItemType?typeId="
+
this
.
tbCfStationItem
.
itemCategory
;
// console.log('url',url)
let
that
=
this
;
Ajax
.
request
({
url
:
url
,
type
:
"get"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
if
(
r
.
code
===
0
){
that
.
Goodstype2
=
r
.
list
}
}
});
},
changeGoodstype2
(){
let
url
=
"../tbcfstationitem/queryByItemTypeTwo?typeTwoId="
+
this
.
tbCfStationItem
.
itemCategorytwo
;
let
that
=
this
;
Ajax
.
request
({
url
:
url
,
type
:
"get"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
if
(
r
.
code
===
0
){
that
.
Goodstype3
=
r
.
descripiton
}
}
});
},
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfStationItem
=
{};
},
update
:
function
(
event
)
{
let
itemId
=
getSelectedRow
(
"#jqGrid"
);
if
(
itemId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
itemId
);
},
saveOrUpdate
:
function
(
event
)
{
vm
.
tbCfStationItem
.
itemImg
=
vm
.
uploadList
[
0
];
let
url
=
vm
.
tbCfStationItem
.
itemId
==
null
?
"../tbcfstationitem/save"
:
"../tbcfstationitem/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfStationItem
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
itemIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
itemIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfstationitem/delete"
,
params
:
JSON
.
stringify
(
itemIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
itemId
){
Ajax
.
request
({
url
:
"../tbcfstationitem/info/"
+
itemId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfStationItem
=
r
.
tbCfStationItem
;
vm
.
uploadList
[
0
]
=
vm
.
tbCfStationItem
.
itemImg
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
},
/*
tirggerFile : function (event) {
var file = event.target.files[0]; // (利用console.log输出看file文件对象)
var formData = new FormData();
formData.append("file", file);
$.ajax({
url: "../tbcfstationitem/image/",
type: "POST",
data: formData,
cache: false, //不设置缓存
processData: false, // 不处理数据
contentType: false,// 不设置内容类型
success: function (result) {
result = JSON.parse(result);
console.log(result)
if (result.errno == 0) {//成功
vm.tbCfStationItem.itemImg = result.data;
console.log(vm.tbCfStationItem.itemImg)
vm.$forceUpdate();
} else {
iview.Message.error(result.errmsg);
}
}
});
}*/
/** ******************************************************************************************** */
handleSuccess
(
response
,
file
,
fileList
)
{
// "http://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/education/155728894307110106.jpg"
vm
.
uploadList
.
push
(
response
);
$
(
"#itemImg"
).
show
();
},
handleBeforeUpload
(
file
)
{
// 上传图片大小不超过5M
if
(
file
.
size
>
5
*
1024
*
1024
)
{
alert
(
'请上传不超过5M的图片'
);
return
false
;
}
const
check
=
this
.
uploadList
.
length
<
1
;
if
(
!
check
)
{
this
.
$Notice
.
warning
({
title
:
'最多只能上传一张图片'
});
return
false
;
}
// 限制上传文件的宽高
// return this.checkImageWH(file,750,320);
},
// 限制上传图片的宽高
checkImageWH
:
function
(
file
,
width
,
height
)
{
let
self
=
this
;
return
new
Promise
(
function
(
resolve
,
reject
)
{
let
filereader
=
new
FileReader
();
filereader
.
onload
=
e
=>
{
let
src
=
e
.
target
.
result
;
const
image
=
new
Image
();
image
.
onload
=
function
()
{
if
(
width
&&
image
.
width
!=
width
)
{
self
.
$Notice
.
error
({
title
:
'请上传宽为'
+
width
+
"的图片"
,
});
reject
();
}
else
if
(
height
&&
image
.
height
!=
height
)
{
self
.
$Notice
.
error
({
title
:
'请上传高为'
+
height
+
"的图片"
,
});
reject
();
}
else
{
resolve
();
}
};
image
.
onerror
=
reject
;
image
.
src
=
src
;
};
filereader
.
readAsDataURL
(
file
);
});
},
// 删除上传图片
delImg1
:
function
(
url
){
if
(
vm
.
title
!=
"详情"
)
{
vm
.
uploadList
.
remove
(
url
);
console
.
log
(
url
);
Ajax
.
request
({
url
:
"../api/osstest/deletetest?url="
+
url
,
async
:
false
,
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
resultData
)
{
// console.log(resultData);
iview
.
Message
.
success
(
resultData
.
success
);
}
});
}
},
/** ******************************************************************************************** */
},
created
(){
var
that
=
this
$
.
get
(
'../tbcfgoodstype/queryAll'
,
function
(
res
)
{
//console.log("成功");
that
.
Goodstype
=
res
.
list
;
})
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfstationsales.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfstationsales/list'
,
colModel
:
[
{
label
:
'saleId'
,
name
:
'saleId'
,
index
:
'sale_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'站点id'
,
name
:
'stationId'
,
index
:
'station_id'
,
width
:
80
},
{
label
:
'商品id'
,
name
:
'itemId'
,
index
:
'item_id'
,
width
:
80
},
{
label
:
'站点类型'
,
name
:
'stationType'
,
index
:
'station_type'
,
width
:
80
},
{
label
:
'商品价格'
,
name
:
'itemPrice'
,
index
:
'item_price'
,
width
:
80
},
{
label
:
'商品数量'
,
name
:
'itemNum'
,
index
:
'item_num'
,
width
:
80
},
{
label
:
'支付流水号'
,
name
:
'payId'
,
index
:
'pay_id'
,
width
:
80
},
{
label
:
'支付方式'
,
name
:
'payWayCode'
,
index
:
'pay_way_code'
,
width
:
80
},
{
label
:
'支付时间'
,
name
:
'payTime'
,
index
:
'pay_time'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfStationSales
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfStationSales
=
{};
},
update
:
function
(
event
)
{
let
saleId
=
getSelectedRow
(
"#jqGrid"
);
if
(
saleId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
saleId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfStationSales
.
saleId
==
null
?
"../tbcfstationsales/save"
:
"../tbcfstationsales/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfStationSales
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
saleIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
saleIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfstationsales/delete"
,
params
:
JSON
.
stringify
(
saleIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
saleId
){
Ajax
.
request
({
url
:
"../tbcfstationsales/info/"
+
saleId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfStationSales
=
r
.
tbCfStationSales
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfstationstatistic.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfstationstatistic/list'
,
colModel
:
[
{
label
:
'statisticId'
,
name
:
'statisticId'
,
index
:
'statistic_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'站点id'
,
name
:
'stationId'
,
index
:
'station_id'
,
width
:
80
},
{
label
:
'站点名字'
,
name
:
'stationName'
,
index
:
'station_name'
,
width
:
80
},
{
label
:
'站点销量'
,
name
:
'stationSales'
,
index
:
'station_sales'
,
width
:
80
},
{
label
:
'销售额'
,
name
:
'salesVolume'
,
index
:
'sales_volume'
,
width
:
80
},
{
label
:
'点击量'
,
name
:
'clicks'
,
index
:
'clicks'
,
width
:
80
},
{
label
:
'统计时间'
,
name
:
'statisticTime'
,
index
:
'statistic_time'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfStationStatistic
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfStationStatistic
=
{};
},
update
:
function
(
event
)
{
let
statisticId
=
getSelectedRow
(
"#jqGrid"
);
if
(
statisticId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
statisticId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfStationStatistic
.
statisticId
==
null
?
"../tbcfstationstatistic/save"
:
"../tbcfstationstatistic/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfStationStatistic
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
statisticIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
statisticIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfstationstatistic/delete"
,
params
:
JSON
.
stringify
(
statisticIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
statisticId
){
Ajax
.
request
({
url
:
"../tbcfstationstatistic/info/"
+
statisticId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfStationStatistic
=
r
.
tbCfStationStatistic
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfstore.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfstore/list'
,
colModel
:
[
{
label
:
'storeId'
,
name
:
'storeId'
,
index
:
'store_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'店铺编号'
,
name
:
'storeCode'
,
index
:
'store_code'
,
width
:
80
},
{
label
:
'店铺名字'
,
name
:
'storeName'
,
index
:
'store_name'
,
width
:
80
},
{
label
:
'店铺简介'
,
name
:
'storeBrief'
,
index
:
'store_brief'
,
width
:
80
},
{
label
:
'店铺链接'
,
name
:
'storeUrl'
,
index
:
'store_url'
,
width
:
80
,
formatter
:
linkFormat
},
{
label
:
'主营商品图片'
,
name
:
'itemImg2'
,
index
:
'item_img_2'
,
width
:
80
,
formatter
:
imageFormat
},
{
label
:
'主营商品图片'
,
name
:
'itemImg1'
,
index
:
'item_img_1'
,
width
:
80
,
formatter
:
imageFormat
},
{
label
:
'店铺图片'
,
name
:
'storeImg'
,
index
:
'store_img'
,
width
:
80
,
formatter
:
imageFormat
},
{
label
:
'所属平台'
,
name
:
'platformCode'
,
index
:
'platform_code'
,
width
:
80
},
{
label
:
'平台名'
,
name
:
'platformName'
,
index
:
'platform_name'
,
width
:
80
},
{
label
:
'启用状态'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
80
},
{
label
:
'创建日期'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfStore
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfStore
=
{};
},
update
:
function
(
event
)
{
let
storeId
=
getSelectedRow
(
"#jqGrid"
);
if
(
storeId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
storeId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfStore
.
storeId
==
null
?
"../tbcfstore/save"
:
"../tbcfstore/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfStore
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
storeIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
storeIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfstore/delete"
,
params
:
JSON
.
stringify
(
storeIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
storeId
){
Ajax
.
request
({
url
:
"../tbcfstore/info/"
+
storeId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfStore
=
r
.
tbCfStore
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
},
tirggerFile
:
function
(
event
)
{
var
file
=
event
.
target
.
files
[
0
];
// (利用console.log输出看file文件对象)
var
formData
=
new
FormData
();
formData
.
append
(
"file"
,
file
);
$
.
ajax
({
url
:
"../api/upload/image/"
,
type
:
"POST"
,
data
:
formData
,
cache
:
false
,
//不设置缓存
processData
:
false
,
// 不处理数据
contentType
:
false
,
// 不设置内容类型
success
:
function
(
result
)
{
result
=
JSON
.
parse
(
result
);
//console.log(result)
if
(
result
.
errno
==
0
)
{
//成功
vm
.
tbCfStore
.
itemImg2
=
result
.
data
;
vm
.
$forceUpdate
();
}
else
{
iview
.
Message
.
error
(
result
.
errmsg
);
}
}
});
},
tirggerFile1
:
function
(
event
)
{
var
file
=
event
.
target
.
files
[
0
];
// (利用console.log输出看file文件对象)
var
formData
=
new
FormData
();
formData
.
append
(
"file"
,
file
);
$
.
ajax
({
url
:
"../api/upload/image/"
,
type
:
"POST"
,
data
:
formData
,
cache
:
false
,
//不设置缓存
processData
:
false
,
// 不处理数据
contentType
:
false
,
// 不设置内容类型
success
:
function
(
result
)
{
result
=
JSON
.
parse
(
result
);
//console.log(result)
if
(
result
.
errno
==
0
)
{
//成功
vm
.
tbCfStore
.
itemImg1
=
result
.
data
;
vm
.
$forceUpdate
();
}
else
{
iview
.
Message
.
error
(
result
.
errmsg
);
}
}
});
},
tirggerStore
:
function
(
event
)
{
var
file
=
event
.
target
.
files
[
0
];
// (利用console.log输出看file文件对象)
var
formData
=
new
FormData
();
formData
.
append
(
"file"
,
file
);
$
.
ajax
({
url
:
"../api/upload/image/"
,
type
:
"POST"
,
data
:
formData
,
cache
:
false
,
//不设置缓存
processData
:
false
,
// 不处理数据
contentType
:
false
,
// 不设置内容类型
success
:
function
(
result
)
{
result
=
JSON
.
parse
(
result
);
//console.log(result)
if
(
result
.
errno
==
0
)
{
//成功
vm
.
tbCfStore
.
storeImg
=
result
.
data
;
vm
.
$forceUpdate
();
}
else
{
iview
.
Message
.
error
(
result
.
errmsg
);
}
}
});
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcftakecoupon.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcftakecoupon/list'
,
colModel
:
[
{
label
:
'领取id'
,
name
:
'takeId'
,
index
:
'take_id'
,
width
:
80
,
hidden
:
true
},
{
label
:
'userId'
,
name
:
'userId'
,
index
:
'user_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'优惠券id'
,
name
:
'couponId'
,
index
:
'coupon_id'
,
width
:
80
,
hidden
:
true
},
{
label
:
'优惠券类型'
,
name
:
'couponCategoryName'
,
index
:
'couponCategoryName'
,
width
:
80
},
{
label
:
'优惠券名称'
,
name
:
'couponTitle'
,
index
:
'couponTitle'
,
width
:
80
},
{
label
:
'用户昵称'
,
name
:
'nick'
,
index
:
'nick'
,
width
:
80
},
{
label
:
'领取时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
},
{
label
:
'是否已经使用'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
80
,
formatter
:
yesOrNoFormat
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfTakeCoupon
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfTakeCoupon
=
{};
},
update
:
function
(
event
)
{
let
userId
=
getSelectedRow
(
"#jqGrid"
);
if
(
userId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
userId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfTakeCoupon
.
userId
==
null
?
"../tbcftakecoupon/save"
:
"../tbcftakecoupon/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfTakeCoupon
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
userIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
userIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcftakecoupon/delete"
,
params
:
JSON
.
stringify
(
userIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
userId
){
Ajax
.
request
({
url
:
"../tbcftakecoupon/info/"
+
userId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfTakeCoupon
=
r
.
tbCfTakeCoupon
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcftax.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcftax/list'
,
colModel
:
[
{
label
:
'taxId'
,
name
:
'taxId'
,
index
:
'tax_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'商品类型id'
,
name
:
'categoryId'
,
index
:
'category_id'
,
width
:
80
,
hidden
:
true
},
{
label
:
'商品类型名'
,
name
:
'categoryName'
,
index
:
'category_name'
,
width
:
80
,
hidden
:
true
},
{
label
:
'起征点'
,
name
:
'mixAmount'
,
index
:
'mix_amount'
,
width
:
80
,
hidden
:
true
},
{
label
:
'税率'
,
name
:
'taxRate'
,
index
:
'tax_rate'
,
width
:
80
},
{
label
:
'启用状态'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
80
,
hidden
:
true
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfTax
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfTax
=
{};
},
update
:
function
(
event
)
{
let
taxId
=
getSelectedRow
(
"#jqGrid"
);
if
(
taxId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
taxId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfTax
.
taxId
==
null
?
"../tbcftax/save"
:
"../tbcftax/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfTax
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
taxIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
taxIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcftax/delete"
,
params
:
JSON
.
stringify
(
taxIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
taxId
){
Ajax
.
request
({
url
:
"../tbcftax/info/"
+
taxId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfTax
=
r
.
tbCfTax
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfusecoupon.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfusecoupon/list'
,
colModel
:
[
{
label
:
'useId'
,
name
:
'useId'
,
index
:
'use_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'用户id'
,
name
:
'userId'
,
index
:
'user_id'
,
width
:
80
},
{
label
:
'优惠券id'
,
name
:
'couponId'
,
index
:
'coupon_id'
,
width
:
80
},
{
label
:
'使用时间'
,
name
:
'useTime'
,
index
:
'use_time'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfUseCoupon
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfUseCoupon
=
{};
},
update
:
function
(
event
)
{
let
useId
=
getSelectedRow
(
"#jqGrid"
);
if
(
useId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
useId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfUseCoupon
.
useId
==
null
?
"../tbcfusecoupon/save"
:
"../tbcfusecoupon/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfUseCoupon
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
useIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
useIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfusecoupon/delete"
,
params
:
JSON
.
stringify
(
useIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
useId
){
Ajax
.
request
({
url
:
"../tbcfusecoupon/info/"
+
useId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfUseCoupon
=
r
.
tbCfUseCoupon
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfuseraddressr.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfuseraddressr/list'
,
colModel
:
[
{
label
:
'userAddressId'
,
name
:
'userAddressId'
,
index
:
'user_address_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'用户id'
,
name
:
'userId'
,
index
:
'user_id'
,
width
:
80
},
{
label
:
'地址id'
,
name
:
'addressId'
,
index
:
'address_id'
,
width
:
80
},
{
label
:
'是否有效'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfUserAddressR
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfUserAddressR
=
{};
},
update
:
function
(
event
)
{
let
userAddressId
=
getSelectedRow
(
"#jqGrid"
);
if
(
userAddressId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
userAddressId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfUserAddressR
.
userAddressId
==
null
?
"../tbcfuseraddressr/save"
:
"../tbcfuseraddressr/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfUserAddressR
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
userAddressIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
userAddressIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfuseraddressr/delete"
,
params
:
JSON
.
stringify
(
userAddressIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
userAddressId
){
Ajax
.
request
({
url
:
"../tbcfuseraddressr/info/"
+
userAddressId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfUserAddressR
=
r
.
tbCfUserAddressR
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfuserinfo.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfuserinfo/list'
,
colModel
:
[
{
label
:
'userId'
,
name
:
'userId'
,
index
:
'user_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'用户编号'
,
name
:
'userNo'
,
index
:
'user_no'
,
width
:
160
},
{
label
:
'用户类型'
,
name
:
'userType'
,
index
:
'user_type'
,
width
:
80
,
formatter
:
userTypeFormat
},
{
label
:
'账号'
,
name
:
'account'
,
index
:
'account'
,
width
:
120
},
{
label
:
'用户头像地址'
,
name
:
'avatar'
,
index
:
'avatar'
,
width
:
100
,
formatter
:
imageFormat
},
{
label
:
'用户名'
,
name
:
'nick'
,
index
:
'nick'
,
width
:
80
},
{
label
:
'下单次数'
,
name
:
'count'
,
index
:
'count'
,
width
:
80
},
{
label
:
'总金额'
,
name
:
'total'
,
index
:
'total'
,
width
:
80
,
formatter
:
moneyFormat
},
{
label
:
'使用优惠券次数'
,
name
:
'num'
,
index
:
'num'
,
width
:
80
},
{
label
:
'电话号码'
,
name
:
'phone'
,
index
:
'phone'
,
width
:
100
},
{
label
:
'是否绑定手机'
,
name
:
'phoneFlag'
,
index
:
'phone_flag'
,
width
:
80
,
formatter
:
yesOrNoFormat
},
{
label
:
'密码'
,
name
:
'password'
,
index
:
'password'
,
width
:
80
,
hidden
:
true
},
{
label
:
'上一次登录时间'
,
name
:
'lastLoginTime'
,
index
:
'last_login_time'
,
width
:
120
},
{
label
:
'上一次登录IP'
,
name
:
'lastLoginIp'
,
index
:
'last_login_ip'
,
width
:
80
},
{
label
:
'登录次数'
,
name
:
'loginCount'
,
index
:
'login_count'
,
width
:
60
},
{
label
:
'邮箱'
,
name
:
'email'
,
index
:
'email'
,
width
:
120
},
{
label
:
'facebook账号'
,
name
:
'facebook'
,
index
:
'facebook'
,
width
:
120
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
120
},
{
label
:
'性别'
,
name
:
'sex'
,
index
:
'sex'
,
width
:
80
,
formatter
:
sexFormat
},
{
label
:
'默认地址id'
,
name
:
'defaultAddressId'
,
index
:
'default_address_id'
,
width
:
200
},
{
label
:
'邀请用户'
,
name
:
'invitedUserId'
,
index
:
'invited_user_id'
,
width
:
120
},
{
label
:
'邀请人数'
,
name
:
'invitedCount'
,
index
:
'invited_count'
,
width
:
80
},
{
label
:
'是否有效'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
60
,
formatter
:
yesOrNoFormat
},
{
label
:
'邮箱是否已经验证'
,
name
:
'emailFlag'
,
index
:
'email_flag'
,
width
:
80
,
formatter
:
yesOrNoFormat
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfUserInfo
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfUserInfo
=
{};
},
update
:
function
(
event
)
{
let
userId
=
getSelectedRow
(
"#jqGrid"
);
if
(
userId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
userId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfUserInfo
.
userId
==
null
?
"../tbcfuserinfo/save"
:
"../tbcfuserinfo/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfUserInfo
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
userIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
userIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfuserinfo/delete"
,
params
:
JSON
.
stringify
(
userIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
userId
){
Ajax
.
request
({
url
:
"../tbcfuserinfo/info/"
+
userId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
tbCfUserInfo
=
r
.
tbCfUserInfo
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/tbcfversion.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfversion/list'
,
colModel
:
[
{
label
:
'versionId'
,
name
:
'versionId'
,
index
:
'version_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'版本code'
,
name
:
'versionCode'
,
index
:
'version_code'
,
width
:
80
},
{
label
:
'版本更新链接'
,
name
:
'versionLike'
,
index
:
'version_like'
,
width
:
80
},
{
label
:
'版本更新内容'
,
name
:
'versionDetail'
,
index
:
'version_detail'
,
width
:
80
}]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
title
:
null
,
tbCfVersion
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfVersion
=
{};
UE
.
getEditor
(
'Detail'
).
setContent
(
""
);
// 富文本赋值
},
update
:
function
(
event
)
{
let
versionId
=
getSelectedRow
(
"#jqGrid"
);
if
(
versionId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
versionId
);
},
saveOrUpdate
:
function
(
event
)
{
vm
.
tbCfVersion
.
versionDetail
=
encodeURI
(
UE
.
getEditor
(
'Detail'
).
getContent
());
// 富文本取值
vm
.
tbCfVersion
.
versionDetail
=
vm
.
tbCfVersion
.
versionDetail
.
replace
(
/ /g
,
" "
);
let
url
=
vm
.
tbCfVersion
.
versionId
==
null
?
"../tbcfversion/save"
:
"../tbcfversion/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfVersion
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
del
:
function
(
event
)
{
let
versionIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
versionIds
==
null
){
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfversion/delete"
,
params
:
JSON
.
stringify
(
versionIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
versionId
){
Ajax
.
request
({
url
:
"../tbcfversion/info/"
+
versionId
,
async
:
false
,
successCallback
:
function
(
r
)
{
vm
.
tbCfVersion
=
r
.
tbCfVersion
;
UE
.
getEditor
(
'Detail'
).
setContent
(
vm
.
tbCfVersion
.
versionDetail
);
// 富文本赋值
console
.
log
(
vm
.
tbCfVersion
);
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
src/main/resources/mapper/sys/user.js
0 → 100644
浏览文件 @
5cd09588
$
(
function
()
{
$
(
"#sysUserGrid"
).
Grid
({
url
:
'../sys/user/list'
,
colModel
:
[
{
label
:
'用户ID'
,
name
:
'userId'
,
index
:
"user_id"
,
key
:
true
,
hidden
:
true
},
{
label
:
'用户名'
,
name
:
'userName'
,
index
:
"user_id"
,
width
:
75
},
{
label
:
'所属部门'
,
name
:
'deptName'
,
index
:
"dept_id"
,
width
:
75
},
{
label
:
'邮箱'
,
name
:
'email'
,
width
:
90
},
{
label
:
'手机号'
,
name
:
'mobile'
,
width
:
100
},
{
label
:
'状态'
,
name
:
'status'
,
width
:
80
,
formatter
:
function
(
value
)
{
return
value
===
0
?
'<span class="label label-danger">禁用</span>'
:
'<span class="label label-success">正常</span>'
;
}
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
"create_time"
,
width
:
80
,
formatter
:
function
(
value
)
{
return
transDate
(
value
);
}
}]
});
});
var
setting
=
{
data
:
{
simpleData
:
{
enable
:
true
,
idKey
:
"deptId"
,
pIdKey
:
"parentId"
,
rootPId
:
-
1
},
key
:
{
url
:
"nourl"
}
}
};
var
ztree
;
var
vm
=
new
Vue
({
el
:
'#sysUser'
,
data
:
{
q
:
{
userName
:
null
},
showList
:
true
,
title
:
null
,
roleList
:
{},
user
:
{
status
:
1
,
deptName
:
''
,
roleIdList
:
[]
},
ruleValidate
:
{
userName
:
[
{
required
:
true
,
message
:
'姓名不能为空'
,
trigger
:
'blur'
}
],
email
:
[
{
required
:
true
,
message
:
'邮箱不能为空'
,
trigger
:
'blur'
},
{
type
:
'email'
,
message
:
'邮箱格式不正确'
,
trigger
:
'blur'
}
],
mobile
:
[
{
required
:
true
,
message
:
'手机号不能为空'
,
trigger
:
'blur'
}
]
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增(默认密码:888888)"
;
vm
.
roleList
=
{};
vm
.
user
=
{
status
:
1
,
roleIdList
:
[],
deptId
:
''
,
deptName
:
''
};
//获取角色信息
this
.
getRoleList
();
vm
.
getDept
();
},
getDept
:
function
()
{
//加载部门树
Ajax
.
request
({
url
:
'../sys/dept/list'
,
async
:
true
,
successCallback
:
function
(
r
)
{
ztree
=
$
.
fn
.
zTree
.
init
(
$
(
"#deptTree"
),
setting
,
r
.
list
);
var
node
=
ztree
.
getNodeByParam
(
"deptId"
,
vm
.
user
.
deptId
);
if
(
node
!=
null
)
{
ztree
.
selectNode
(
node
);
vm
.
user
.
deptName
=
node
.
name
;
}
}
});
},
update
:
function
()
{
var
userId
=
getSelectedRow
(
"#sysUserGrid"
);
if
(
userId
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
Ajax
.
request
({
url
:
"../sys/user/info/"
+
userId
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
user
=
r
.
user
;
//获取角色信息
vm
.
getRoleList
();
vm
.
getDept
();
}
});
},
del
:
function
()
{
var
userIds
=
getSelectedRows
(
"#sysUserGrid"
);
if
(
userIds
==
null
)
{
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../sys/user/delete"
,
params
:
JSON
.
stringify
(
userIds
),
contentType
:
"application/json"
,
type
:
'POST'
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
saveOrUpdate
:
function
(
event
)
{
var
url
=
vm
.
user
.
userId
==
null
?
"../sys/user/save"
:
"../sys/user/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
user
),
contentType
:
"application/json"
,
type
:
'POST'
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
getRoleList
:
function
()
{
Ajax
.
request
({
url
:
'../sys/role/select'
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
roleList
=
r
.
list
;
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
var
page
=
$
(
"#sysUserGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#sysUserGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'userName'
:
vm
.
q
.
userName
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
vm
.
q
=
{
userName
:
''
}
vm
.
reload
();
},
deptTree
:
function
()
{
openWindow
({
title
:
"选择部门"
,
area
:
[
'300px'
,
'450px'
],
content
:
jQuery
(
"#deptLayer"
),
btn
:
[
'确定'
,
'取消'
],
btn1
:
function
(
index
)
{
var
node
=
ztree
.
getSelectedNodes
();
//选择上级部门
vm
.
user
.
deptId
=
node
[
0
].
deptId
;
vm
.
user
.
deptName
=
node
[
0
].
name
;
layer
.
close
(
index
);
}
});
},
handleSubmit
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate
()
});
},
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
}
}
});
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论