From 6dd3ce5d438e90e453bf3e44e287aa835ffda339 Mon Sep 17 00:00:00 2001 From: lisy <linlangsur163@163.com> Date: 星期二, 01 八月 2023 14:05:30 +0800 Subject: [PATCH] app端接口优化 --- cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java | 13 + cloud-server-activity/src/main/resources/mapper/UserCouponMapper.xml | 5 cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/model/Coupon.java | 130 ++++++++++ cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/CouponClient.java | 7 cloud-server-management/src/main/webapp/WEB-INF/view/system/tCouponExamine/TCouponExamine.html | 45 +++ cloud-server-course/src/main/java/com/dsh/course/service/impl/TCoursePackageDiscountServiceImpl.java | 40 -- cloud-server-management/src/main/webapp/WEB-INF/view/system/tCouponExamine/TCouponExamineInfo.html | 336 ++++++++++++++++----------- cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponExamineController.java | 38 +++ cloud-server-management/src/main/webapp/static/modular/system/tCouponExamine/TCouponExamine.js | 6 cloud-server-management/src/main/webapp/static/modular/system/tCouponExamine/TCouponExamineInfo.js | 59 ++++ cloud-server-management/src/main/webapp/WEB-INF/view/system/tCouponExamine/TCouponExamineList.html | 6 11 files changed, 511 insertions(+), 174 deletions(-) diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java b/cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java index 8b7b952..1681d5b 100644 --- a/cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java +++ b/cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java @@ -243,6 +243,7 @@ } + @ResponseBody @PostMapping("/base/coupon/couponExamineDetail") Map<String, Object> queryCouponExamineDetail(@RequestBody Integer id){ Map<String, Object> couponInfo = new HashMap<>(); @@ -352,4 +353,16 @@ return couponInfo; } + + + @ResponseBody + @PostMapping("/base/coupon/updateCouponExamine") + public boolean updateCouponData(@RequestBody Coupon coupon){ + try { + return couponService.updateById(coupon); + }catch (Exception e){ + return false; + } + } + } diff --git a/cloud-server-activity/src/main/resources/mapper/UserCouponMapper.xml b/cloud-server-activity/src/main/resources/mapper/UserCouponMapper.xml index e81d57f..0df05cb 100644 --- a/cloud-server-activity/src/main/resources/mapper/UserCouponMapper.xml +++ b/cloud-server-activity/src/main/resources/mapper/UserCouponMapper.xml @@ -13,6 +13,9 @@ DATE_FORMAT(b.endTime, '%Y-%m-%d') as endTime from t_user_coupon a left join t_coupon b on (a.couponId = b.id) - where a.`status` = 1 and b.type != 3 and a.userId = #{uid} and (b.useScope = 1 or (b.useScope = 2 and provinceCode = #{provinceCode} and cityCode = #{cityCode}) or (b.useScope = 3 and b.id in (select couponId from t_coupon_store where storeId = #{storeId}))) + where a.`status` = 1 and b.type != 3 and a.userId = #{uid} and + ( + b.useScope = 1 or (b.useScope = 2 and b.id IN (SELECT couponId FROM t_coupon_city where provinceCode = #{provinceCode} and cityCode = #{cityCode}) ) + or (b.useScope = 3 and b.id in (select couponId from t_coupon_store where storeId = #{storeId}))) </select> </mapper> diff --git a/cloud-server-course/src/main/java/com/dsh/course/service/impl/TCoursePackageDiscountServiceImpl.java b/cloud-server-course/src/main/java/com/dsh/course/service/impl/TCoursePackageDiscountServiceImpl.java index 0838569..1017f20 100644 --- a/cloud-server-course/src/main/java/com/dsh/course/service/impl/TCoursePackageDiscountServiceImpl.java +++ b/cloud-server-course/src/main/java/com/dsh/course/service/impl/TCoursePackageDiscountServiceImpl.java @@ -291,8 +291,8 @@ public ExchangeCoursePackageResponse getWeekFreeCourseDetails(Integer coursePackageDiscountId,String lat,String lon) { ExchangeCoursePackageResponse packageResponse = new ExchangeCoursePackageResponse(); TCoursePackageDiscount coursePackageDiscount = this.baseMapper.selectById(coursePackageDiscountId); - packageResponse.setCoursePackageDiscountId(coursePackageDiscount.getCoursePackageId()); Integer coursePackageId = coursePackageDiscount.getCoursePackageId(); + packageResponse.setCoursePackageDiscountId(coursePackageId); TCoursePackage coursePackage = tcpMapper.selectById(coursePackageId); @@ -309,7 +309,9 @@ distanceVo.setStoreId(coursePackage.getStoreId()); String s = sreClient.calculateDistance(distanceVo); packageResponse.setDistance(Double.valueOf(s)); - + if (coursePackageDiscount.getType() == 1 || coursePackageDiscount.getType() == 2){ + return packageResponse; + } JSONArray jsonArray = JSON.parseArray(coursePackageDiscount.getContent()); JSONObject jsonObject = jsonArray.getJSONObject(0); CoursePackagePaymentConfig paymentConfig = cppcMapper.selectById(coursePackageDiscount.getCoursePackagePaymentConfigId()); @@ -334,37 +336,13 @@ packageResponse.setDiscountPrice(vipPrice); packageResponse.setWanpaiGold(paymentConfig.getPlayPaiCoin()); } - List<Integer> weeks = StrUtils.dealStrToList(coursePackage.getClassWeeks()); - if (weeks.size() > 0){ + String[] split = coursePackage.getClassWeeks().split(";"); + if (split.length > 0){ StringBuilder courWeeks = new StringBuilder("每"); - for (Integer integer : weeks) { - switch (integer){ - case 1: - courWeeks.append("周一、"); - break; - case 2: - courWeeks.append("周二、"); - break; - case 3: - courWeeks.append("周三、"); - break; - case 4: - courWeeks.append("周四、"); - break; - case 5: - courWeeks.append("周五、"); - break; - case 6: - courWeeks.append("周六、"); - break; - case 7: - courWeeks.append("周末、"); - break; - default: - break; - } + for (String integer : split) { + courWeeks.append(integer).append("、"); } - if (courWeeks.length() > 0 && courWeeks.charAt(courWeeks.length() - 1) == ','){ + if (courWeeks.length() > 0 && courWeeks.charAt(courWeeks.length() - 1) == '、'){ courWeeks.deleteCharAt(courWeeks.length() - 1); } packageResponse.setWeekTime(courWeeks.toString()); diff --git a/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/CouponClient.java b/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/CouponClient.java index 1728668..1593030 100644 --- a/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/CouponClient.java +++ b/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/CouponClient.java @@ -1,6 +1,7 @@ package com.dsh.course.feignClient.activity; +import com.dsh.course.feignClient.activity.model.Coupon; import com.dsh.course.feignClient.activity.model.CouponExamineListSearch; import com.dsh.course.feignClient.activity.model.CouponListOfSearch; import org.springframework.cloud.openfeign.FeignClient; @@ -25,4 +26,10 @@ @PostMapping("/base/coupon/couponExamineDetail") Map<String, Object> queryCouponExamineDetail(@RequestBody Integer id); + @PostMapping("/coupon/queryCouponById") + Coupon queryCouponById(@RequestBody Integer id); + + + @PostMapping("/base/coupon/updateCouponExamine") + boolean updateCouponData(@RequestBody Coupon coupon); } diff --git a/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/model/Coupon.java b/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/model/Coupon.java new file mode 100644 index 0000000..fa8977e --- /dev/null +++ b/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/model/Coupon.java @@ -0,0 +1,130 @@ +package com.dsh.course.feignClient.activity.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * <p> + * 优惠券 + * </p> + * + * @author jqs + * @since 2023-06-29 + */ +@Data +public class Coupon { + + + /** + * 主键 + */ + private Integer id; + /** + * 优惠券名称 + */ + private String name; + /** + * 优惠券类型(1=满减券,2=代金券,3=体验券) + */ + private Integer type; + /** + * 优惠券规则JSON + */ + private String content; + /** + * 优惠券说明 + */ + private String illustrate; + /** + * 发放方式(1=积分购买,2=注册赠送,3=自动发券) + */ + private Integer distributionMethod; + /** + * 兑换方式(1=积分,2=积分+现金) + */ + private Integer redemptionMethod; + /** + * 所需现金 + */ + private BigDecimal cash; + /** + * 所属积分 + */ + private BigDecimal integral; + /** + * 用户人群(1=全部用户,2=年度会员,3=已有学员用户) + */ + private Integer userPopulation; + /** + * 发放数量 + */ + private Integer quantityIssued; + /** + * 限领数量 + */ + private Integer pickUpQuantity; + /** + * 开始时间 + */ + private Date startTime; + /** + * 结束时间 + */ + private Date endTime; + /** + * 使用范围(1=全国,2=指定城市,3=指定门店) + */ + private Integer useScope; + /** + * 审核状态(1=待审核,2=已通过,3=已拒绝) + */ + private Integer auditStatus; + /** + * 审核人id + */ + private Integer auditUserId; + /** + * 审核备注 + */ + private String auditRemark; + /** + * 状态(1=未开始,2=已开始,3=已结束,4=已取消) + */ + private Integer status; + /** + * 状态(1=正常,2=冻结,3=删除) + */ + private Integer state; + /** + * 添加时间 + */ + private Date insertTime; + /** + * 封面图 + */ + private String cover; + /** + * 图片 + */ + private String productImages; + /** + * 发布人类型 1=城市管理者 2=平台管理者 + */ + private Integer publisherType; + /** + * 城市管理者id + */ + private Integer cityManagerId; + +} diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponExamineController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponExamineController.java index a7a7e02..c27a8fc 100644 --- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponExamineController.java +++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponExamineController.java @@ -3,9 +3,13 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.dsh.course.feignClient.activity.CouponClient; +import com.dsh.course.feignClient.activity.model.Coupon; import com.dsh.course.feignClient.activity.model.CouponExamineListSearch; import com.dsh.course.feignClient.activity.model.CouponListOfSearch; +import com.dsh.guns.core.base.controller.BaseController; import com.dsh.guns.core.common.constant.factory.PageFactory; +import com.dsh.guns.core.exception.GunsException; +import com.dsh.guns.core.util.ToolUtil; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PathVariable; @@ -22,7 +26,7 @@ @Controller @RequestMapping("/tCouponExamine") -public class TCouponExamineController { +public class TCouponExamineController extends BaseController { private String PREFIX = "/system/tCouponExamine/"; @@ -64,11 +68,41 @@ @ResponseBody public String detailOfCoupon(@PathVariable Integer id, Model model){ Map<String, Object> stringObjectMap = client.queryCouponExamineDetail(id); - model.addAllAttributes(stringObjectMap); + model.addAttribute(stringObjectMap); return PREFIX + "TCouponExamineInfo.html"; } + /** + * 获取 优惠券审核详情 + */ + @RequestMapping(value = "/couponExaminePage/{id}") + @ResponseBody + public String couponExaminePage(@PathVariable Integer id, Model model){ + model.addAttribute("id",id); + return PREFIX + "TCouponExamine.html"; + } + + @RequestMapping(value = "/examine") + @ResponseBody + public Object examine(Integer couponOfId, Integer state, String remark) { + Coupon coupon = client.queryCouponById(couponOfId); + try { + if (state == 1) { + coupon.setAuditStatus(2); + } + if (state == 2) { + coupon.setAuditStatus(3); + coupon.setAuditRemark(remark); + } + client.updateCouponData(coupon); + return SUCCESS_TIP; + }catch (Exception e){ + e.printStackTrace(); + return ERROR; + } + } + } diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCouponExamine/TCouponExamine.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCouponExamine/TCouponExamine.html new file mode 100644 index 0000000..1fef557 --- /dev/null +++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCouponExamine/TCouponExamine.html @@ -0,0 +1,45 @@ +@layout("/common/_container.html"){ +<div class="ibox float-e-margins"> + <div class="ibox-content"> + <div class="form-horizontal"> + + <div class="ibox-title"> + <h5>优惠券审核</h5> + </div> + + <input value="${id}"> + <div class="row"> + <div class="col-sm-5"> + <div class="form-group"> + <div class="initialLevel col-sm-12 control-label form-group"> + <label class="col-sm-3 control-label">*审核状态: </label> + <input class="col-sm-1 control-label" name="exchangeMethod" type="radio" + value="1" checked style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px"/> + <label class="col-sm-1" style="width: 20%;margin-top: 7px">通过</label> + <input class="col-sm-1 control-label" name="exchangeMethod" type="radio" + value="2" style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px"/> + <label class="col-sm-1" style="width: 20%;margin-top: 7px">拒绝</label> + </div> + </div> + </div> + </div> + + <div class="col-sm-12" style="display: none" id="detailBox"> + <div style="display: flex;justify-content: center;margin-top: 20px"> + <label>拒绝描述:</label> + <textarea style="width: 90%;height: 200px" type="text" id="detail"></textarea> + </div> + </div> + + <div class="row btn-group-m-t"> + <div class="col-sm-10" style="display: flex;justify-content: center"> + <#button btnCss="danger" name="关闭" style="float:right;margin-left: 20%" id="cancel" icon="fa-eraser" clickFun="CouponExamineInfoDlg.close()"/> + <#button btnCss="info" name="保存" style="float:left" id="ensure" icon="fa-check" clickFun="CouponExamineInfoDlg.addSubmitCoupon()"/> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/modular/system/tCouponExamine/TCouponExamine.js"></script> +<script src="${ctxPath}/modular/system/tCouponExamine/TCouponExamineInfo.js"></script> +@} diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCouponExamine/TCouponExamineInfo.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCouponExamine/TCouponExamineInfo.html index 090b1f0..1bd8cd3 100644 --- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCouponExamine/TCouponExamineInfo.html +++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCouponExamine/TCouponExamineInfo.html @@ -1,145 +1,213 @@ @layout("/common/_container.html"){ <div class="ibox float-e-margins"> - <div class="ibox-content"> - <div class="form-horizontal"> + <div class="ibox-content"> + <div class="form-horizontal"> - <div class="row"> - <div class="col-sm-5"> - <div class="form-group"> - <label class="col-sm-3 control-label"><font style="color:red">*</font>当前状态: </label> - <div class="col-sm-9"> - <label style="color: #c0a16b">待审核</label> - <label style="color: red">未通过</label> - </div> - </div> - </div> - </div> - <div class="row"> - <div class="col-sm-5"> - <div class="form-group"> - <label class="col-sm-3 control-label"><font style="color:red">*</font>发布省: </label> - <div class="col-sm-9"> - <label style="color: #c0a16b">待审核</label> - <label style="color: red">未通过</label> - </div> - </div> - </div> - </div> - <div class="row"> - <div class="col-sm-5"> - <div class="form-group"> - <label class="col-sm-3 control-label"><font style="color:red">*</font>发布城市: </label> - <div class="col-sm-9"> - <label style="color: #c0a16b">待审核</label> - <label style="color: red">未通过</label> - </div> - </div> - </div> - </div> + <input value="${id}"> - <div class="row"> - <div class="col-sm-5"> - <div class="form-group"> - <label class="col-sm-3 control-label"><font style="color:red">*</font>优惠券名称: </label> - <div class="col-sm-9"> - <label style="color: #c0a16b">待审核</label> - <label style="color: red">未通过</label> + <div class="row"> + <div class="col-sm-5"> + <div class="form-group"> + <label class="col-sm-3 control-label">*当前状态: </label> + <div class="col-sm-9"> + <label style="color: #c0a16b">待审核</label> + <label style="color: red">未通过</label> + </div> + </div> + </div> + </div> + <div class="row"> + <div class="col-sm-5"> + <div class="form-group"> + <label class="col-sm-3 control-label">*发布省: </label> + <div class="col-sm-9"> + <label style="color: #c0a16b">待审核</label> + <label style="color: red">未通过</label> + </div> + </div> + </div> + </div> + <div class="row"> + <div class="col-sm-5"> + <div class="form-group"> + <label class="col-sm-3 control-label">*发布城市: </label> + <div class="col-sm-9"> + <label style="color: #c0a16b">待审核</label> + <label style="color: red">未通过</label> + </div> + </div> + </div> + </div> + + <div class="row"> + <div class="col-sm-5"> + <div class="form-group"> + <label class="col-sm-3 control-label">*优惠券名称: </label> + <div class="col-sm-9"> + <label style="color: #c0a16b">待审核</label> + <label style="color: red">未通过</label> + </div> + </div> + </div> + </div> + + <div class="row"> + <div class="col-sm-5"> + <div class="form-group"> + <label class="col-sm-3 control-label">*优惠券类型: </label> + <div class="col-sm-9"> + <label style="color: #c0a16b">满减券:满</label> + <input value="${num1}"> + <label style="color: red">元,减</label> + <input value="${num2}"> + <label style="color: red">元</label> + </div> + <div class="col-sm-9"> + <label style="color: #c0a16b">代金券:可抵</label> + <input value="${num1}"> + <label style="color: red">元</label> + </div> + <div class="col-sm-9"> + <label style="color: #c0a16b">优惠券:满</label> + <input value="${num1}"> + <label style="color: red">元,减</label> + <input> + <label style="color: red">元</label> + </div> + </div> + </div> + </div> + + <div class="row"> + <div class="col-sm-5"> + <div class="form-group"> + <label class="col-sm-3 control-label">*优惠券说明: </label> + <div class="col-sm-9"> + <textarea type="checkbox" id="illustrate" style="margin-left: 1%;width: 75%;height: 120px" + placeholder="请输入优惠券名称"></textarea> + </div> + </div> + </div> + </div> + + <div class="row"> + <div class="col-sm-5"> + <div class="form-group"> + <label class="col-sm-3 control-label">*发放方式: </label> + <div class="col-sm-9"> + <label style="color: #c0a16b">待审核</label> + <label style="color: red">未通过</label> + </div> + </div> + </div> + </div> + + <div class="row"> + <div class="col-sm-5"> + <div class="form-group"> + <label class="col-sm-3 control-label">*所需积分: </label> + <div class="col-sm-9"> + <label style="color: #c0a16b">待审核</label> + <label style="color: red">未通过</label> + </div> + </div> + </div> + </div> + + <div class="row"> + <div class="col-sm-5"> + <div class="form-group"> + <label class="col-sm-3 control-label">*用户人群: </label> + <div class="col-sm-9"> + <label style="color: #c0a16b">待审核</label> + <label style="color: red">未通过</label> + </div> + </div> + </div> + </div> + + <div class="row"> + <div class="col-sm-5"> + <div class="form-group"> + <label class="col-sm-3 control-label">*发放数量: </label> + <div class="col-sm-9"> + <label style="color: #c0a16b">待审核</label> + <label style="color: red">未通过</label> + </div> + </div> + </div> + </div> + + <div class="row"> + <div class="col-sm-5"> + <div class="form-group"> + <label class="col-sm-3 control-label">*限领数量: </label> + <div class="col-sm-9"> + <label style="color: #c0a16b">待审核</label> + <label style="color: red">未通过</label> + </div> + </div> </div> </div> + + <div class="row"> + <div class="col-sm-5"> + <div class="form-group"> + <label class="col-sm-3 control-label">*有效期: </label> + <div class="col-sm-9"> + <label style="color: #c0a16b">待审核</label> + <label style="color: red">未通过</label> + </div> + </div> + </div> + </div> + + <div class="row"> + <div class="col-sm-5"> + <div class="form-group"> + <label class="col-sm-3 control-label">*指定门店: </label> + <div class="col-sm-9"> + <label style="color: #c0a16b">待审核</label> + <label style="color: red">未通过</label> + </div> + </div> + </div> + </div> + + <div class="row"> + <div class="col-sm-5"> + <div class="form-group"> + <div class="initialLevel col-sm-12 control-label form-group"> + <label class="col-sm-3 control-label">*审核状态: </label> + <input class="col-sm-1 control-label" name="exchangeMethod" type="radio" + value="1" checked style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px"/> + <label class="col-sm-1" style="width: 20%;margin-top: 7px">通过</label> + <input class="col-sm-1 control-label" name="exchangeMethod" type="radio" + value="2" style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px"/> + <label class="col-sm-1" style="width: 20%;margin-top: 7px">拒绝</label> + </div> + </div> + </div> + </div> + + <div class="col-sm-12" style="display: none" id="detailBox"> + <div style="display: flex;justify-content: center;margin-top: 20px"> + <label>拒绝描述:</label> + <textarea style="width: 90%;height: 200px" type="text" id="detail"></textarea> + </div> + </div> + + <div class="row btn-group-m-t"> + <div class="col-sm-10" style="display: flex;justify-content: center"> + <#button btnCss="danger" name="关闭" style="float:right;margin-left: 20%" id="cancel" + icon="fa-eraser" clickFun="CouponExamineInfoDlg.close()"/> + <#button btnCss="info" name="保存" style="float:left" id="ensure" icon="fa-check" + clickFun="CouponExamineInfoDlg.addSubmitCoupon()"/> + </div> + </div> + </div> - </div> - - <div class="row"> - <div class="col-sm-5"> - <div class="form-group"> - <label class="col-sm-3 control-label"><font style="color:red">*</font>优惠券类型: </label> - <div class="col-sm-9"> - <label style="color: #c0a16b">满减券:满</label> - <input value="${num1}"> - <label style="color: red">元,减</label> - <input value="${num2}"> - <label style="color: red">元</label> - </div> - <div class="col-sm-9"> - <label style="color: #c0a16b">代金券:可抵</label> - <input value="${num1}"> - <label style="color: red">元</label> - </div> - <div class="col-sm-9"> - <label style="color: #c0a16b">优惠券:满</label> - <input value="${num1}"> - <label style="color: red">元,减</label> - <input> - <label style="color: red">元</label> - </div> - </div> - </div> - </div> - - <div class="row"> - <div class="col-sm-5"> - <div class="form-group"> - <label class="col-sm-3 control-label"><font style="color:red">*</font>发布城市: </label> - <div class="col-sm-9"> - <label style="color: #c0a16b">待审核</label> - <label style="color: red">未通过</label> - </div> - </div> - </div> - </div> - - <div class="row"> - <div class="col-sm-5"> - <div class="form-group"> - <label class="col-sm-3 control-label"><font style="color:red">*</font>发布城市: </label> - <div class="col-sm-9"> - <label style="color: #c0a16b">待审核</label> - <label style="color: red">未通过</label> - </div> - </div> - </div> - </div> - - <div class="row"> - <div class="col-sm-5"> - <div class="form-group"> - <label class="col-sm-3 control-label"><font style="color:red">*</font>发布城市: </label> - <div class="col-sm-9"> - <label style="color: #c0a16b">待审核</label> - <label style="color: red">未通过</label> - </div> - </div> - </div> - </div> - - <div class="row"> - <div class="col-sm-5"> - <div class="form-group"> - <label class="col-sm-3 control-label"><font style="color:red">*</font>发布城市: </label> - <div class="col-sm-9"> - <label style="color: #c0a16b">待审核</label> - <label style="color: red">未通过</label> - </div> - </div> - </div> - </div> - - - <div class="row"> - <div class="row btn-group-m-t"> - <div class="col-sm-10" style="margin-left: 20%;"> - <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" - clickFun="couponInfoDlg.close()"/> - </div> - <div class="col-sm-10" style="margin-left: 35%;margin-top: -2.5%"> - <#button btnCss="info" name="保存" id="ensure" icon="fa-check" - clickFun="couponInfoDlg.addSubmit()"/> - </div> - </div> - </div> - </div> - </div> </div> <script src="${ctxPath}/modular/system/tCouponExamine/TCouponExamine.js"></script> @} diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCouponExamine/TCouponExamineList.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCouponExamine/TCouponExamineList.html index 58164ea..30b1e6d 100644 --- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCouponExamine/TCouponExamineList.html +++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCouponExamine/TCouponExamineList.html @@ -48,9 +48,9 @@ <#button name="重置" icon="fa-trash" clickFun="TCouponExamine.resetSearch()"/> </div> </div> - <div class="hidden-xs" id="TCouponExamineExamineTableToolbar" role="group"> - <#button name="审核" icon="fa-plus" clickFun="TCouponExamine.openAdd()"/> - <#button name="查看详情" icon="fa-remove" clickFun="TCouponExamine.openDetail()" space="true"/> + <div class="hidden-xs" id="TCouponExamineTableToolbar" role="group"> + <#button name="审核" icon="fa-check" clickFun="TCouponExamine.openExamine()"/> + <#button name="查看详情" icon="fa-info" clickFun="TCouponExamine.openDetail()" space="true"/> </div> <#table id="TCouponExamineTable"/> </div> diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tCouponExamine/TCouponExamine.js b/cloud-server-management/src/main/webapp/static/modular/system/tCouponExamine/TCouponExamine.js index 385b084..c21da7b 100644 --- a/cloud-server-management/src/main/webapp/static/modular/system/tCouponExamine/TCouponExamine.js +++ b/cloud-server-management/src/main/webapp/static/modular/system/tCouponExamine/TCouponExamine.js @@ -65,7 +65,7 @@ var index = layer.open({ type: 2, title: '详情', - area: ['800px', '420px'], //宽高 + area: ['95%', '95%'], //宽高 fix: false, //不固定 maxmin: true, content: Feng.ctxPath + '/tCouponExamine/couponOfDetail/' + TCouponExamine.seItem.id @@ -78,7 +78,7 @@ /** * 打开审核页面 */ -TCouponExamine.openCollectionRecord = function () { +TCouponExamine.openExamine = function () { if (this.check()) { var index = layer.open({ type: 2, @@ -86,7 +86,7 @@ area: ['800px', '420px'], //宽高 fix: false, //不固定 maxmin: true, - content: Feng.ctxPath + '/tCouponExamine/coupon_examine_page/' + TCouponExamine.seItem.id + content: Feng.ctxPath + '/tCouponExamine/couponExaminePage/' + TCouponExamine.seItem.id }); this.layerIndex = index; } diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tCouponExamine/TCouponExamineInfo.js b/cloud-server-management/src/main/webapp/static/modular/system/tCouponExamine/TCouponExamineInfo.js new file mode 100644 index 0000000..da7e184 --- /dev/null +++ b/cloud-server-management/src/main/webapp/static/modular/system/tCouponExamine/TCouponExamineInfo.js @@ -0,0 +1,59 @@ +/** + * 初始化详情对话框 + */ +var CouponExamineInfoDlg = { + CouponExamineInfoDlgTable : {} +}; + + +/** + * 关闭此对话框 + */ +CouponExamineInfoDlg.close = function() { + parent.layer.close(parent.layer.getFrameIndex(window.frameElement.id)); +} + + +function refush(){ + $("#detailBox").show() +} + +function agree(){ + $("#detailBox").hide() +} + +function ajax(orderNo,value,remark){ + var ajax = new $ax(Feng.ctxPath + "/tCouponExamine/examine", function(data){ + Feng.success("审核成功!"); + window.parent.Coupon.table.refresh(); + CouponExamineInfoDlg.close(); + },function(data){ + Feng.error("审核失败!" + data.responseJSON.message + "!"); + }); + ajax.setData({ + couponOfId:orderNo, + state:value, + remark:remark + }); + ajax.start(); +}; + +CouponExamineInfoDlg.addSubmitCoupon = function (){ + var value = $('input:radio:checked').val(); + let orderNo = $("#id").val(); + let remark = $('#detail').val(); + if (value == 1 ){ + ajax(orderNo,value,null); + } + if (value == 2 ){ + if (!remark){ + Feng.error("请输入拒绝理由!"); + return; + } + ajax(orderNo,value,remark); + } +} + +$(function() { + +}); -- Gitblit v1.7.1