Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
956b3d29
提交
956b3d29
authored
12月 19, 2019
作者:
luojie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改订单,新增优惠券单独发放
上级
460a4fa0
隐藏空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
185 行增加
和
75 行删除
+185
-75
TbCfCouponIssueController.java
...va/com/platform/controller/TbCfCouponIssueController.java
+18
-0
TbCfToiCouponController.java
...java/com/platform/controller/TbCfToiCouponController.java
+7
-2
Test.java
...admin/src/main/java/com/platform/controller/api/Test.java
+0
-51
TbCfUserInfoDao.java
...admin/src/main/java/com/platform/dao/TbCfUserInfoDao.java
+2
-0
TbCfCouponIssueEntity.java
.../main/java/com/platform/entity/TbCfCouponIssueEntity.java
+13
-0
TbCfToiCouponService.java
.../main/java/com/platform/service/TbCfToiCouponService.java
+2
-0
TbCfUserInfoService.java
...c/main/java/com/platform/service/TbCfUserInfoService.java
+2
-0
TbCfCouponIssueServiceImpl.java
...com/platform/service/impl/TbCfCouponIssueServiceImpl.java
+0
-1
TbCfToiCouponServiceImpl.java
...a/com/platform/service/impl/TbCfToiCouponServiceImpl.java
+27
-1
TbCfUserInfoServiceImpl.java
...va/com/platform/service/impl/TbCfUserInfoServiceImpl.java
+5
-0
TbCfCouponDao.xml
...min/src/main/resources/com/platform/dao/TbCfCouponDao.xml
+1
-1
TbCfCouponIssueDao.xml
...rc/main/resources/com/platform/dao/TbCfCouponIssueDao.xml
+9
-1
TbCfOrderListDao.xml
.../src/main/resources/com/platform/dao/TbCfOrderListDao.xml
+2
-2
TbCfToiCouponDao.xml
.../src/main/resources/com/platform/dao/TbCfToiCouponDao.xml
+4
-2
TbCfUserInfoDao.xml
...n/src/main/resources/com/platform/dao/TbCfUserInfoDao.xml
+5
-1
tbcfcoupon.html
...rm-admin/src/main/webapp/WEB-INF/page/sys/tbcfcoupon.html
+27
-1
tbcfcoupon.js
platform-admin/src/main/webapp/js/sys/tbcfcoupon.js
+51
-10
tbcfitemdetail.js
platform-admin/src/main/webapp/js/sys/tbcfitemdetail.js
+9
-1
tbcforder.js
platform-admin/src/main/webapp/js/sys/tbcforder.js
+1
-1
没有找到文件。
platform-admin/src/main/java/com/platform/controller/TbCfCouponIssueController.java
浏览文件 @
956b3d29
...
...
@@ -7,6 +7,7 @@ import com.platform.entity.TbCfUserInfoEntity;
import
com.platform.service.TbCfCouponIssueService
;
import
com.platform.service.TbCfIssueCouponService
;
import
com.platform.service.TbCfToiCouponService
;
import
com.platform.service.TbCfUserInfoService
;
import
com.platform.utils.PageUtils
;
import
com.platform.utils.Query
;
import
com.platform.utils.R
;
...
...
@@ -33,6 +34,8 @@ public class TbCfCouponIssueController {
private
TbCfCouponIssueService
tbCfCouponIssueService
;
@Autowired
private
TbCfToiCouponService
tbCfToiCouponService
;
@Autowired
private
TbCfUserInfoService
tbCfUserInfoService
;
/**
* 查看列表
*/
...
...
@@ -85,7 +88,21 @@ public class TbCfCouponIssueController {
}
return
R
.
ok
();
}
@RequestMapping
(
"/submit"
)
@RequiresPermissions
(
"tbcfcouponissue:submit"
)
@ResponseBody
public
R
submit
(
@RequestBody
TbCfCouponIssueEntity
tbCfCouponIssue
,
TbCfToiCouponEntity
tbCfToiCoupon
)
{
tbCfCouponIssueService
.
save
(
tbCfCouponIssue
);
String
account
=
tbCfCouponIssue
.
getAccount
();
String
userId
=
tbCfUserInfoService
.
queryById
(
account
);
if
(
userId
!=
null
){
tbCfToiCouponService
.
submit
(
tbCfCouponIssue
,
tbCfToiCoupon
,
userId
);
return
R
.
ok
();
}
else
{
return
R
.
error
(
"用户不存在!"
);
}
}
/**
* 修改
*/
...
...
@@ -97,6 +114,7 @@ public class TbCfCouponIssueController {
return
R
.
ok
();
}
/**
* 删除
*/
...
...
platform-admin/src/main/java/com/platform/controller/TbCfToiCouponController.java
浏览文件 @
956b3d29
...
...
@@ -3,6 +3,7 @@ package com.platform.controller;
import
com.platform.entity.*
;
import
com.platform.service.TbCfCouponIssueService
;
import
com.platform.service.TbCfToiCouponService
;
import
com.platform.service.TbCfUserInfoService
;
import
com.platform.utils.PageUtils
;
import
com.platform.utils.Query
;
import
com.platform.utils.R
;
...
...
@@ -15,8 +16,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -31,6 +30,11 @@ import java.util.Map;
public
class
TbCfToiCouponController
{
@Autowired
private
TbCfToiCouponService
tbCfToiCouponService
;
@Autowired
private
TbCfCouponIssueService
tbCfCouponIssueService
;
@Autowired
private
TbCfUserInfoService
tbCfUserInfoService
;
/**
* 查看列表
*/
...
...
@@ -96,6 +100,7 @@ public class TbCfToiCouponController {
return R.ok();
}*/
/**
* 修改
*/
...
...
platform-admin/src/main/java/com/platform/controller/api/Test.java
deleted
100644 → 0
浏览文件 @
460a4fa0
package
com
.
platform
.
controller
.
api
;
import
net.sf.json.JSONObject
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
//转换时间,正式版删除!!!!!!
public
class
Test
{
/* public static void main(String[] args) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd 00:00:00");
Calendar c = Calendar.getInstance();
c.add(Calendar.DATE, + 7);
Date time = c.getTime();
Date endDate = sdf.parse(sdf.format(time));
Date startDate=sdf.parse(sdf.format(new Date()));
System.out.println(startDate);
System.out.println(endDate);
}*/
/* public static void main(String[] args) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
System.out.println(sdf.format(getStartTime()));
System.out.println(sdf.format(getEndTime()));
}
private static Date getStartTime() {
Calendar todayStart = Calendar.getInstance();
todayStart.set(Calendar.HOUR_OF_DAY, 0);
todayStart.set(Calendar.MINUTE, 0);
todayStart.set(Calendar.SECOND, 0);
todayStart.set(Calendar.MILLISECOND, 0);
return todayStart.getTime();
}
private static Date getEndTime() {
Calendar todayEnd = Calendar.getInstance();
todayEnd.set(Calendar.HOUR_OF_DAY, 23);
todayEnd.set(Calendar.MINUTE, 59);
todayEnd.set(Calendar.SECOND, 59);
todayEnd.set(Calendar.MILLISECOND, 999);
return todayEnd.getTime();
}
*/
}
\ No newline at end of file
platform-admin/src/main/java/com/platform/dao/TbCfUserInfoDao.java
浏览文件 @
956b3d29
...
...
@@ -10,4 +10,6 @@ import com.platform.entity.TbCfUserInfoEntity;
*/
public
interface
TbCfUserInfoDao
extends
BaseDao
<
TbCfUserInfoEntity
>
{
String
queryById
(
String
account
);
}
platform-admin/src/main/java/com/platform/entity/TbCfCouponIssueEntity.java
浏览文件 @
956b3d29
...
...
@@ -16,6 +16,8 @@ public class TbCfCouponIssueEntity implements Serializable {
* 优惠卷发放id
*/
private
String
couponIssueId
;
/**
* 购物券id
*/
...
...
@@ -23,6 +25,8 @@ public class TbCfCouponIssueEntity implements Serializable {
/**
* 用户状态,10(未下单的用户),20(新用户),30(已下单的用户),40(添加购物车的用户)
*/
private
String
account
;
private
Integer
userStatus
;
/**
* 用户等级1,2,3,4
...
...
@@ -49,6 +53,14 @@ public class TbCfCouponIssueEntity implements Serializable {
this
.
couponId
=
couponId
;
}
public
String
getAccount
()
{
return
account
;
}
public
void
setAccount
(
String
account
)
{
this
.
account
=
account
;
}
/**
* 获取:优惠券标题
*/
...
...
@@ -79,4 +91,5 @@ public class TbCfCouponIssueEntity implements Serializable {
public
void
setUserLevel
(
Integer
userLevel
)
{
this
.
userLevel
=
userLevel
;
}
}
platform-admin/src/main/java/com/platform/service/TbCfToiCouponService.java
浏览文件 @
956b3d29
...
...
@@ -78,4 +78,6 @@ public interface TbCfToiCouponService {
* @return
*/
int
saveAndSubmit
(
TbCfCouponIssueEntity
tbCfCouponIssue
,
TbCfToiCouponEntity
tbCfToiCoupon
,
String
userId
);
int
submit
(
TbCfCouponIssueEntity
tbCfCouponIssue
,
TbCfToiCouponEntity
tbCfToiCoupon
,
String
userId
);
}
platform-admin/src/main/java/com/platform/service/TbCfUserInfoService.java
浏览文件 @
956b3d29
...
...
@@ -68,4 +68,6 @@ public interface TbCfUserInfoService {
* @return 删除条数
*/
int
deleteBatch
(
String
[]
userIds
);
String
queryById
(
String
account
);
}
platform-admin/src/main/java/com/platform/service/impl/TbCfCouponIssueServiceImpl.java
浏览文件 @
956b3d29
...
...
@@ -68,5 +68,4 @@ public class TbCfCouponIssueServiceImpl implements TbCfCouponIssueService {
return
tbCfCouponIssueDao
.
queryByStatus
(
couponIssueId
);
}
}
platform-admin/src/main/java/com/platform/service/impl/TbCfToiCouponServiceImpl.java
浏览文件 @
956b3d29
package
com
.
platform
.
service
.
impl
;
import
com.platform.dao.TbCfCouponDao
;
import
com.platform.dao.TbCfToiCouponDao
;
import
com.platform.dao.TbCfUserInfoDao
;
import
com.platform.entity.TbCfCouponEntity
;
import
com.platform.entity.TbCfCouponIssueEntity
;
import
com.platform.entity.TbCfToiCouponEntity
;
import
com.platform.service.TbCfToiCouponService
;
...
...
@@ -22,6 +25,10 @@ import java.util.Map;
public
class
TbCfToiCouponServiceImpl
implements
TbCfToiCouponService
{
@Autowired
private
TbCfToiCouponDao
tbCfToiCouponDao
;
@Autowired
private
TbCfCouponDao
tbCfCouponDao
;
@Autowired
private
TbCfUserInfoDao
tbCfUserInfoDao
;
@Override
public
TbCfToiCouponEntity
queryObject
(
String
toitableId
)
{
...
...
@@ -61,10 +68,29 @@ public class TbCfToiCouponServiceImpl implements TbCfToiCouponService {
@Override
public
int
saveAndSubmit
(
TbCfCouponIssueEntity
tbCfCouponIssue
,
TbCfToiCouponEntity
tbCfToiCoupon
,
String
userId
)
{
TbCfCouponEntity
tbCfCoupon
=
tbCfCouponDao
.
queryObject
(
tbCfCouponIssue
.
getCouponId
());
Date
validStartTime
=
tbCfCoupon
.
getValidStartTime
();
Date
validEndTime
=
tbCfCoupon
.
getValidEndTime
();
tbCfToiCoupon
.
setToitableId
(
IdUtil
.
createIdbyUUID
());
tbCfToiCoupon
.
setCouponId
(
tbCfCouponIssue
.
getCouponId
());
tbCfToiCoupon
.
setUserId
(
userId
);
tbCfToiCoupon
.
setStartTime
(
validStartTime
);
tbCfToiCoupon
.
setEndTime
(
validEndTime
);
tbCfToiCoupon
.
setIdentification
(
1
);
tbCfToiCoupon
.
setEnableFlag
(
1
);
return
tbCfToiCouponDao
.
saveAndSubmit
(
tbCfToiCoupon
);
}
@Override
public
int
submit
(
TbCfCouponIssueEntity
tbCfCouponIssue
,
TbCfToiCouponEntity
tbCfToiCoupon
,
String
userId
)
{
TbCfCouponEntity
tbCfCoupon
=
tbCfCouponDao
.
queryObject
(
tbCfCouponIssue
.
getCouponId
());
Date
validStartTime
=
tbCfCoupon
.
getValidStartTime
();
Date
validEndTime
=
tbCfCoupon
.
getValidEndTime
();
tbCfToiCoupon
.
setToitableId
(
IdUtil
.
createIdbyUUID
());
tbCfToiCoupon
.
setCouponId
(
tbCfCouponIssue
.
getCouponId
());
tbCfToiCoupon
.
setUserId
(
userId
);
tbCfToiCoupon
.
setCreateTime
(
new
Date
());
tbCfToiCoupon
.
setStartTime
(
validStartTime
);
tbCfToiCoupon
.
setEndTime
(
validEndTime
);
tbCfToiCoupon
.
setIdentification
(
1
);
tbCfToiCoupon
.
setEnableFlag
(
1
);
return
tbCfToiCouponDao
.
saveAndSubmit
(
tbCfToiCoupon
);
...
...
platform-admin/src/main/java/com/platform/service/impl/TbCfUserInfoServiceImpl.java
浏览文件 @
956b3d29
...
...
@@ -56,4 +56,9 @@ public class TbCfUserInfoServiceImpl implements TbCfUserInfoService {
public
int
deleteBatch
(
String
[]
userIds
)
{
return
tbCfUserInfoDao
.
deleteBatch
(
userIds
);
}
@Override
public
String
queryById
(
String
account
)
{
return
tbCfUserInfoDao
.
queryById
(
account
);
}
}
platform-admin/src/main/resources/com/platform/dao/TbCfCouponDao.xml
浏览文件 @
956b3d29
...
...
@@ -120,7 +120,7 @@
a.update_time,
a.coupon_vaild
from tb_cf_coupon a left join tb_cf_coupon_category t on t.coupon_category_id=a.coupon_category_id
WHERE 1=1 and a.coupon_vaild
=0
WHERE 1=1 and a.coupon_vaild
!=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
...
...
platform-admin/src/main/resources/com/platform/dao/TbCfCouponIssueDao.xml
浏览文件 @
956b3d29
...
...
@@ -6,7 +6,8 @@
<resultMap
type=
"com.platform.entity.TbCfCouponIssueEntity"
id=
"tbCfCouponIssueMap"
>
<result
property=
"couponIssueId"
column=
"coupon_issue_id"
/>
<result
property=
"couponId"
column=
"coupon_id"
/>
<result
property=
"userStatus"
column=
"user_status"
/>
<result
property=
"account"
column=
"account"
/>
<result
property=
"userStatus"
column=
"user_status"
/>
<result
property=
"userLevel"
column=
"user_level"
/>
</resultMap>
...
...
@@ -14,6 +15,7 @@
select
`coupon_issue_id`,
`coupon_id`,
`account`,
`user_status`,
`user_level`
from tb_cf_coupon_issue
...
...
@@ -29,6 +31,7 @@
select
`coupon_issue_id`,
`coupon_id`,
`account`,
`user_status`,
`user_level`
from tb_cf_coupon_issue
...
...
@@ -82,21 +85,26 @@
insert into tb_cf_coupon_issue(
`coupon_issue_id`,
`coupon_id`,
`account`,
`user_status`,
`user_level`)
values(
#{couponIssueId},
#{couponId},
#{account},
#{userStatus},
#{userLevel})
</insert>
<select
id=
"queryByStatus"
parameterType=
"com.platform.entity.TbCfCouponIssueEntity"
resultType=
"int"
>
select `user_status` from tb_cf_coupon_issue where coupon_issue_id= #{couponIssueId}
</select>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfCouponIssueEntity"
>
update tb_cf_coupon_issue
<set>
<if
test=
"couponId != null"
>
`coupon_id` = #{couponId},
</if>
<if
test=
"account != null"
>
`account` = #{account},
</if>
<if
test=
"userStatus != null"
>
`user_status` = #{userStatus},
</if>
<if
test=
"userLevel != null"
>
`user_level` = #{userLevel}
</if>
</set>
...
...
platform-admin/src/main/resources/com/platform/dao/TbCfOrderListDao.xml
浏览文件 @
956b3d29
...
...
@@ -66,13 +66,13 @@
<!--查询总记录数-->
<select
id=
"queryTotal"
resultType=
"int"
>
select
count(*)
select count( distinct i.order_id)
from tb_cf_order o
INNER JOIN tb_cf_item_order_r i on o.order_id=i.order_id
INNER JOIN tb_cf_finance f on f.order_id=o.order_id
INNER JOIN tb_cf_user_info u on u.user_id=o.user_id
WHERE 1=1 and i.enable_flag=1 and f.pay_way_code!='null'
<if
test=
"name != null and name.trim() != ''"
>
AND o.order_no LIKE concat('%',#{name},'%')
</if>
...
...
platform-admin/src/main/resources/com/platform/dao/TbCfToiCouponDao.xml
浏览文件 @
956b3d29
...
...
@@ -88,14 +88,16 @@
`toitable_id`,
`coupon_id`,
`user_id`,
`create_time`,
`start_time`,
`end_time`,
`identification`,
`enable_flag`)
values(
#{toitableId},
#{couponId},
#{userId},
#{createTime},
#{startTime},
#{endTime},
#{identification},
#{enableFlag})
</insert>
...
...
platform-admin/src/main/resources/com/platform/dao/TbCfUserInfoDao.xml
浏览文件 @
956b3d29
...
...
@@ -175,7 +175,11 @@
</set>
where user_id = #{userId}
</update>
<select
id=
"queryById"
resultType=
"String"
>
select user_id from tb_cf_user_info where account=#{account}
</select>
<delete
id=
"delete"
>
delete from tb_cf_user_info where user_id = #{value}
</delete>
...
...
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcfcoupon.html
浏览文件 @
956b3d29
...
...
@@ -41,8 +41,9 @@
<i-button
type=
"error"
@
click=
"del"
><i
class=
"fa fa-trash-o"
></i>
删除
</i-button>
#end
#if($shiro.hasPermission("tbcfcoupon:delete"))
<i-button
type=
"info"
@
click=
"edit"
>
设置优惠券发放
</i-button
>
<!-- <i-button type="info" @click="edit"> 设置优惠券发放</i-button> --
>
#end
<i-button
type=
"info"
@
click=
"tospecific"
>
特殊发放
</i-button>
</div>
</Row>
<table
id=
"jqGrid"
></table>
...
...
@@ -199,6 +200,31 @@
</Form-item>
</i-form>
</Card>
<!--设置优惠券发放-->
<Card
v-show=
"!showTospecific"
style=
"width:100vw;height: 100vh;position: absolute;top: 0;left: 0;"
>
<p
slot=
"title"
>
{{title}}
</p>
<i-form
ref=
"formValidate3"
:model=
"tbCfCoupon"
:rules=
"ruleValidate"
:label-width=
"80"
>
<Form-item
label=
"优惠券名称:"
prop=
"couponId"
>
<!--<i-input v-model="tbCfCoupon.couponCategory" placeholder="优惠券类型"/>-->
<i-select
placeholder=
"请选择优惠券"
v-model=
"tbCfCoupon.CouponId"
>
<i-option
v-for=
"(el,i) in Coupon"
:key =
'i'
:value=
"el.couponId"
>
{{el.couponTitle}}
</i-option>
</i-select>
</Form-item>
<Form-item
label=
"用户账号"
prop=
"account"
>
<i-input
v-model=
"tbCfCoupon.account"
placeholder=
"用户账号"
/>
</Form-item>
<Form-item>
<!-- <i-button type="primary" @click="handleSubmit1()">提交</i-button>-->
<i-button
type=
"primary"
@
click=
"handleSubmit3('formValidate3')"
>
提交
</i-button>
<i-button
type=
"warning"
@
click=
"showTospecific=!showTospecific"
style=
"margin-left: 8px"
/>
返回
</i-button>
<i-button
type=
"ghost"
@
click=
"handleReset3('formValidate3')"
style=
"margin-left: 8px"
>
重置
</i-button>
</Form-item>
</i-form>
</Card>
<!-- 领取详情 -->
<!-- <el-dialog :title="takeTitle" :visible.sync="takeVisible" width="80%">
<el-table :data="takeData">
...
...
platform-admin/src/main/webapp/js/sys/tbcfcoupon.js
浏览文件 @
956b3d29
...
...
@@ -25,22 +25,19 @@ $(function () {
{
label
:
'修改时间'
,
name
:
'updateTime'
,
index
:
'update_time'
,
width
:
80
,
hidden
:
true
},
{
label
:
'是否为注册即送优惠券'
,
name
:
'couponVaild'
,
index
:
'coupon_vaild'
,
width
:
90
,
formatter
:
validFormat
}]
});
});
$
.
get
(
'../tbcfcoupon/queryAllCoupon'
,
function
(
res
)
{
vm
.
Coupon
=
JSON
.
parse
(
res
).
list
;
console
.
log
(
res
.
list
)
})
$
.
get
(
'../tbcfcouponcategory/queryAll'
,
function
(
res1
)
{
console
.
log
(
res1
.
list
)
vm
.
CouponCategory
=
JSON
.
parse
(
res1
).
list
;
vm
.
Coupon
=
res
.
list
;
// console.log('111',res.list)
console
.
log
(
'111'
,
res
)
})
});
$
(
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
:
'account'
,
index
:
'account'
,
width
:
80
},
{
label
:
'用户状态'
,
name
:
'userStatus'
,
index
:
'user_status'
,
width
:
80
,
formatter
:
userStatusFormat
},
{
label
:
'用户等级'
,
name
:
'userLevel'
,
index
:
'user_level'
,
width
:
80
,
formatter
:
userLevelFormat
}]
});
...
...
@@ -94,6 +91,7 @@ let vm = new Vue({
value
:
'40'
,
label
:
'4'
}],
showTospecific
:
true
,
showEdit
:
true
,
showList
:
true
,
showCategory
:
true
,
...
...
@@ -305,6 +303,13 @@ let vm = new Vue({
vm
.
tbCfCoupon
=
{};
},
tospecific
:
function
(){
vm
.
reload
();
this
.
showTospecific
=
false
vm
.
title
=
"特殊发放"
;
vm
.
tbCfCoupon
=
{};
},
saveOrUpdate1
:
function
(
event
)
{
let
url
=
vm
.
tbCfCoupon
.
couponIssueId
==
null
?
"../tbcfcouponissue/save"
:
"../tbcfcouponissue/update"
;
Ajax
.
request
({
...
...
@@ -363,7 +368,29 @@ let vm = new Vue({
}
});
},
saveOrUpdate3
:
function
(
event
)
{
let
url
=
vm
.
tbCfCoupon
.
couponIssueId
==
null
?
"../tbcfcouponissue/submit"
:
"../tbcfcouponissue/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfCoupon
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r3
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload3
();
});
}
});
},
reload3
:
function
(
event
)
{
vm
.
showTospecific
=
true
;
let
page
=
$
(
"#jqGrid1"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid1"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset3
(
'formValidate3'
);
},
getInfo2
:
function
(
couponCategoryId
){
Ajax
.
request
({
url
:
"../tbcfcouponcategory/info/"
+
couponCategoryId
,
...
...
@@ -392,5 +419,19 @@ let vm = new Vue({
handleReset2
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
},
}
handleSubmit3
:
function
(
name
)
{
handleSubmitValidate
(
this
,
name
,
function
()
{
vm
.
saveOrUpdate3
()
});
},
handleReset3
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
},
},
created
(){
$
.
get
(
'../tbcfcouponcategory/queryAll'
,
function
(
res1
)
{
vm
.
CouponCategory
=
JSON
.
parse
(
res1
).
list
;
})
}
});
platform-admin/src/main/webapp/js/sys/tbcfitemdetail.js
浏览文件 @
956b3d29
...
...
@@ -54,7 +54,8 @@ let vm = new Vue({
vm
.
getInfo
(
itemId
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfItemDetail
.
itemId
==
null
?
"../tbcfitemdetail/save"
:
"../tbcfitemdetail/update"
;
console
.
log
(
111111
)
let
url
=
vm
.
tbCfItemDetail
.
itemId
==
null
?
"../tbcfitemdetail/save"
:
"../tbcfitemdetail/update"
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfItemDetail
),
...
...
@@ -66,6 +67,11 @@ let vm = new Vue({
});
}
});
/*}else{
alert('商品名称、链接、价格、图片不能为空!',function (index) {
vm.reload();
});
}*/
},
del
:
function
(
event
)
{
let
itemIds
=
getSelectedRows
(
"#jqGrid"
);
...
...
@@ -112,7 +118,9 @@ let vm = new Vue({
vm
.
reload
();
},
handleSubmit
:
function
(
name
)
{
console
.
log
(
111111
)
handleSubmitValidate
(
this
,
name
,
function
()
{
console
.
log
(
22222
)
vm
.
saveOrUpdate
()
});
},
...
...
platform-admin/src/main/webapp/js/sys/tbcforder.js
浏览文件 @
956b3d29
...
...
@@ -37,7 +37,7 @@ $(function () {
{
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
}]
{
label
:
'交易关闭时间'
,
name
:
'closeTime'
,
index
:
'close_time'
,
width
:
100
,
hidden
:
true
}]
});
$
.
get
(
'../tbcfexpresstemplate/queryAll'
,
function
(
res
)
{
vm
.
descripition
=
JSON
.
parse
(
res
).
list
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论