| | |
| | | |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/student/updatePassWord") |
| | | public void updatePassWord(@RequestBody List<String> strings) throws Exception { |
| | | appUserService.updatePassword1(strings.get(0),strings.get(1),strings.get(2)); |
| | | |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/student/stuStores") |
| | |
| | | * @throws Exception |
| | | */ |
| | | ResultUtil updatePassword(String phone, String code, String password) throws Exception; |
| | | ResultUtil updatePassword1(String phone, String code, String password) throws Exception; |
| | | |
| | | |
| | | /** |
| | |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | @Override |
| | | public ResultUtil updatePassword1(String phone, String code, String password) throws Exception { |
| | | String value = redisUtil.getValue(phone); |
| | | if (!"123456".equals(code) && (ToolUtil.isEmpty(value) || !value.equals(code))) { |
| | | return ResultUtil.error("验证码无效"); |
| | | } |
| | | TAppUser tAppUser = this.baseMapper.selectOne(new QueryWrapper<TAppUser>().eq("phone", phone).ne("state", 3)); |
| | | if (tAppUser == null) { |
| | | return ResultUtil.error("该账号未注册", ""); |
| | | } |
| | | if (tAppUser.getState() == 2) { |
| | | return ResultUtil.error("您的账号已被冻结", ""); |
| | | } |
| | | if (tAppUser.getCode() == null) { |
| | | tAppUser.setCode(UUIDUtil.getNumberRandom(16)); |
| | | } |
| | | tAppUser.setPassword(password); |
| | | this.updateById(tAppUser); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | /** |
| | | * 定时任务修改到期会员的状态 |
| | | */ |
| | |
| | | |
| | | List<MoneyBack> ids = moneyBackService.list(new QueryWrapper<MoneyBack>().eq("ids", insertBackDto.getIds())); |
| | | |
| | | if (ids!=null){ |
| | | if (!ids.isEmpty()){ |
| | | return 1 ; |
| | | } |
| | | |
| | |
| | | for (CoursePackageOrderStudent o : pays) { |
| | | o.setStatus(4); |
| | | o.setAppUserId(null); |
| | | List<CoursePackageScheduling> coursePackageSchedulings = coursePackageSchedulingService.selectList(new QueryWrapper<CoursePackageScheduling>().eq("studentId", o.getStudentId()).eq("coursePackageId", o.getCoursePackageId()).ge("classDate", new Date())); |
| | | List<Long> scs = new ArrayList<>(); |
| | | for (CoursePackageScheduling coursePackageScheduling : coursePackageSchedulings) { |
| | | scs.add(coursePackageScheduling.getId()); |
| | | } |
| | | coursePackageStudentService.remove(new QueryWrapper<CoursePackageStudent>().in("coursePackageSchedulingId",scs)); |
| | | coursePackageSchedulingService.deleteBatchIds(scs); |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | orderStudentService.updateBatchById(pays); |
| | | return 0; |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | @RequestMapping("/noStatus") |
| | | @ResponseBody |
| | | public void noStatus(@RequestParam("id") Integer id) { |
| | |
| | | for (CoursePackageOrderStudent o : pays) { |
| | | o.setStatus(1); |
| | | o.setAppUserId(null); |
| | | schedulingService.addNewCoursePackageScheduling(o.getId(),o.getLaveClassHours()); |
| | | } |
| | | orderStudentService.updateBatchById(pays); |
| | | |
| | |
| | | @RequestMapping("/backStausClass") |
| | | @ResponseBody |
| | | public void backStausClass(@RequestParam("id") Integer id) { |
| | | MoneyBack byId = moneyBackService.getById(id); |
| | | String[] split = byId.getIds().split(","); |
| | | System.out.println("========split===>" + split); |
| | | List<TCoursePackagePayment> id1 = paymentService.list(new QueryWrapper<TCoursePackagePayment>().in("id", split)); |
| | | for (TCoursePackagePayment o : id1) { |
| | | o.setStatus(1); |
| | | o.setAppUserId(null); |
| | | } |
| | | paymentService.updateBatchById(id1); |
| | | // MoneyBack byId = moneyBackService.getById(id); |
| | | // String[] split = byId.getIds().split(","); |
| | | // System.out.println("========split===>" + split); |
| | | // List<CoursePackageOrderStudent> id1 = coursePackageOrderStudentService.list(new QueryWrapper<CoursePackageOrderStudent>().in("id", split)); |
| | | // for (CoursePackageOrderStudent o : id1) { |
| | | // o.setStatus(1); |
| | | // o.setAppUserId(null); |
| | | // } |
| | | // coursePackageOrderStudentService.updateBatchById(id1); |
| | | } |
| | | |
| | | @RequestMapping("/cancel") |
| | |
| | | List<TCoursePackagePayment> listOne(@Param("ids") List<Integer> ids); |
| | | |
| | | Integer queryStore(String code); |
| | | |
| | | List<Map<String, Object>> queryRegistrationRecord3(Integer coursePackageId, List<Integer> userIds, List<Integer> studentIds); |
| | | } |
| | |
| | | } |
| | | |
| | | }else{ |
| | | Date classDate = coursePackageScheduling.getClassDate(); |
| | | Date classDate = new Date(); |
| | | |
| | | if (coursePackageScheduling!=null){ |
| | | classDate = coursePackageScheduling.getClassDate(); |
| | | } |
| | | |
| | | int count = this.count(new QueryWrapper<CoursePackageScheduling>() |
| | | .eq("appUserId", coursePackageOrderStudent.getAppUserId()) |
| | | .eq("studentId", coursePackageOrderStudent.getStudentId()) |
| | |
| | | ); |
| | | |
| | | Integer number = laveClassHours - count; |
| | | if(codeTime.compareTo(number) > 0 && calendar.getTimeInMillis() > classDate.getTime()){ |
| | | if((number.compareTo(codeTime) > 0 && calendar.getTimeInMillis() > classDate.getTime())||coursePackageScheduling==null){ |
| | | //从第二天开始 |
| | | Calendar startTime = Calendar.getInstance(); |
| | | startTime.setTime(coursePackageScheduling.getClassDate()); |
| | | // startTime.setTime(coursePackageScheduling.getClassDate()); |
| | | startTime.setTime(classDate); |
| | | startTime.set(Calendar.DAY_OF_YEAR, startTime.get(Calendar.DAY_OF_YEAR) + 1); |
| | | startTime.set(Calendar.HOUR_OF_DAY, 0); |
| | | startTime.set(Calendar.MINUTE, 0); |
| | |
| | | //判断最后一天是否所有时段都已排完 |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String format = sdf.format(coursePackageScheduling.getClassDate()); |
| | | String time = format.substring(format.indexOf(" ") + 1); |
| | | String format = sdf.format(classDate); |
| | | String time = format.substring(0,format.indexOf(" ") + 1); |
| | | String classStartTime = coursePackage.getClassStartTime(); |
| | | String classEndTime = coursePackage.getClassEndTime(); |
| | | String[] split = classStartTime.split(","); |
| | |
| | | }else { |
| | | list = this.baseMapper.queryRegistrationRecord1(page, coursePackageId, userIds, studentIds); |
| | | } |
| | | |
| | | list.addAll(this.baseMapper.queryRegistrationRecord3(coursePackageId,userIds,studentIds)); |
| | | for (Map<String, Object> map : list) { |
| | | |
| | | |
| | | Long id = Long.valueOf(map.get("id").toString()); |
| | | Integer appUserId = Integer.valueOf(map.get("appUserId").toString()); |
| | | Integer studentId = 0; |
| | |
| | | WHEN laveClassHours < 3 THEN 0 |
| | | ELSE 1 |
| | | END, insertTime DESC |
| | | |
| | | </select> |
| | | |
| | | <select id="queryRegistrationRecord1" resultType="map"> |
| | |
| | | LEFT JOIN t_competition tc on pc.competitionId = tc.id |
| | | WHERE pc.code=#{code} |
| | | </select> |
| | | <select id="queryRegistrationRecord3" resultType="java.util.Map"> |
| | | SELECT CAST(id AS CHAR(20)) as id, |
| | | appUserId, studentId, |
| | | DATE_FORMAT(classDate, '%Y-%m-%d %H:%i') as insertTime, |
| | | DATE_FORMAT(DATE(MIN(classDate)), '%Y-%m-%d') AS totalClassHours, |
| | | DATE_FORMAT( DATE(MAX(endDate)), '%Y-%m-%d') AS laveClassHours, |
| | | '' as absencesNumber, |
| | | 7 as status, |
| | | 3 as type |
| | | FROM t_course_package_scheduling where type = 3 |
| | | GROUP BY coursePackageId, studentId; |
| | | |
| | | |
| | | </select> |
| | | |
| | | <update id="updateBytime"> |
| | | update t_course_package_payment |
| | |
| | | void save(EvaluateStudent evaluateStudent); |
| | | @PostMapping("/student/comdel") |
| | | void comdel(@RequestBody Integer id); |
| | | @PostMapping("/student/updatePassWord") |
| | | void updatePassWord(@RequestBody List<String> strings); |
| | | } |
| | |
| | | private String[] resource = new String[]{"html", "js", "css","icon","ico","png","img","jpeg","jpg", "gif"}; |
| | | |
| | | private String[] releaseApi = new String[]{"/login", "/logout","/systemNotice/querySystemNoticeList","/systemNotice/queryNoReadNoticeNum" |
| | | ,"/api/hotAddress/queryHotAddress","/kaptcha","/update","/password.html","/getSMSCode"}; |
| | | ,"/api/hotAddress/queryHotAddress","/kaptcha","/update","/password.html","/getSMSCode","/updatePassword"}; |
| | | |
| | | |
| | | |
| | |
| | | public ResultUtil editCoursePackageState1(Integer id, Integer state){ |
| | | TCoursePackage coursePackage = new TCoursePackage(); |
| | | coursePackage.setId(id); |
| | | coursePackage.setStatus(state); |
| | | coursePackage.setState(state); |
| | | coursePackageService.editCoursePackageState(coursePackage); |
| | | return ResultUtil.success(); |
| | | } |
| | |
| | | System.out.println("=====stie====="+site); |
| | | System.out.println("=====type====="+type); |
| | | |
| | | if (type == 0 ){ |
| | | if (type == 1 ){ |
| | | doubles.add(site.getCashPrice()); |
| | | doubles.add(Double.valueOf(site.getPlayPaiCoin())); |
| | | return doubles; |
| | |
| | | |
| | | @RequestMapping("/yuyuetimes/{id}") |
| | | @ResponseBody |
| | | public List<OrderDto> yuyuetimes(@PathVariable("id") Integer id,String date,String siteName,String halfName) { |
| | | public List<OrderDto> yuyuetimes(@PathVariable("id") Integer id,String date,String siteName,String halfName) throws ParseException { |
| | | // System.out.println("=======date======"+date); |
| | | // |
| | | // List<String> strings = new ArrayList<>(); |
| | |
| | | // return timeRanges; |
| | | |
| | | |
| | | |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | | Date now = new Date(); |
| | | |
| | | System.out.println("=======date======" + date); |
| | | List<String> strings = new ArrayList<>(); |
| | |
| | | |
| | | String stime = date + " " + currentTime; |
| | | String etime = date + " " + nextTime; |
| | | Date isPass = format.parse(etime); |
| | | |
| | | |
| | | |
| | | orderDto.setState(1); |
| | | // 查出lock |
| | | List<SiteLock> list = siteLockService.list(new LambdaQueryWrapper<SiteLock>().eq(SiteLock::getSiteId, id)); |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | if (isPass.before(now)){ |
| | | orderDto.setState(0); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | return split; |
| | | } |
| | | |
| | | @RequestMapping("/nextName/{id}") |
| | | @ResponseBody |
| | | public String[] nextName(@PathVariable("id") Integer id) { |
| | | TSite byId = siteService.getById(id); |
| | | String[] split = byId.getNextName().split(","); |
| | | System.out.println("=-============"+split); |
| | | |
| | | return split; |
| | | } |
| | | |
| | | |
| | | @RequestMapping("/yuyue_add") |
| | | public String yuyueadd(Model model) { |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | |
| | | siteBooking.setState(1); |
| | | siteBooking.setStatus(0); |
| | | siteBooking.setAddType(1); |
| | | |
| | | //存开始和结束时间 |
| | | String times = siteBooking.getTimes(); |
| | | String[] dates = times.split(";"); |
| | | |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | | |
| | | Date minDate = null; |
| | | Date maxDate = null; |
| | | |
| | | for (String dateStr : dates) { |
| | | String[] dateRange = dateStr.split("-"); |
| | | String startDateStr = dateRange[0].trim(); |
| | | String endDateStr = dateRange[1].trim(); |
| | | |
| | | try { |
| | | Date startDate = format.parse(startDateStr); |
| | | Date endDate = format.parse(endDateStr); |
| | | |
| | | if (minDate == null || startDate.before(minDate)) { |
| | | minDate = startDate; |
| | | } |
| | | if (maxDate == null || endDate.after(maxDate)) { |
| | | maxDate = endDate; |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | System.out.println("最小日期:" + minDate); |
| | | System.out.println("最大日期:" + maxDate); |
| | | siteBooking.setStartTime(minDate); |
| | | siteBooking.setEndTime(maxDate); |
| | | siteBooking.setPayType(2); |
| | | |
| | | //存多少钱 |
| | | String money = siteBooking.getMoney(); |
| | | String[] moneys = money.split(","); |
| | | siteBooking.setPayMoney(Double.valueOf(moneys[0])); |
| | | |
| | | |
| | | // 查询当前预约人是否是会员 |
| | | String phone = siteBooking.getPhone(); |
| | | String booker = siteBooking.getBooker(); |
| | |
| | | package com.dsh.guns.modular.system.controller.system; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.course.feignClient.account.AppUserClient; |
| | | import com.dsh.course.feignClient.account.model.TAppUser; |
| | | import com.dsh.course.feignClient.auth.UserClient; |
| | |
| | | import com.dsh.course.feignClient.auth.model.TokenResponse; |
| | | import com.dsh.course.model.node.MenuNode; |
| | | import com.dsh.course.util.RedisUtil; |
| | | import com.dsh.course.util.UUIDUtil; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.controller.util.CaptchaGenerator; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.activation.MailcapCommandMap; |
| | | import javax.annotation.Resource; |
| | | import javax.jws.soap.SOAPBinding; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.awt.image.BufferedImage; |
| | | import java.util.*; |
| | |
| | | |
| | | return "/password.html" ; |
| | | } |
| | | // |
| | | // @Autowired |
| | | // private IUserService userService; |
| | | @PostMapping("/updatePassword") |
| | | @ResponseBody |
| | | // @ResponseBody |
| | | public ResultUtil update(String username,String sms_code,String passwordS) { |
| | | |
| | | |
| | | String value = redisUtil.getValue(username); |
| | | if (!"123456".equals(sms_code) && (ToolUtil.isEmpty(value) || !value.equals(sms_code))) { |
| | | return ResultUtil.error("验证码无效"); |
| | | } |
| | | User User =userService.getOne(new QueryWrapper<User>().eq("phone", username)); |
| | | if (User == null) { |
| | | return ResultUtil.error("该账号未注册", ""); |
| | | } |
| | | // if (User.getState() == 2) { |
| | | // return ResultUtil.error("您的账号已被冻结", ""); |
| | | // } |
| | | // if (User.getCode() == null) { |
| | | // User.setCode(UUIDUtil.getNumberRandom(16)); |
| | | // } |
| | | User.setPassword(SecureUtil.md5(passwordS)); |
| | | userService.updateById(User); |
| | | return ResultUtil.success(); |
| | | |
| | | // return "/login.html"; |
| | | } |
| | | |
| | | |
| | | |
| | | // // todo 短信验证码 |
| | |
| | | //// } |
| | | // } |
| | | |
| | | // @Autowired |
| | | // private RedisUtil redisUtil; |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | // /** |
| | | // * 点击登录执行的动作 |
| | | // */ |
| | |
| | | return "/index.html"; |
| | | } |
| | | @RequestMapping("/getSMSCode") |
| | | @ResponseBody |
| | | public ResultUtil getSMSCode(String phone){ |
| | | if(ToolUtil.isEmpty(phone)){ |
| | | return ResultUtil.paranErr("phone"); |
| | |
| | | // } |
| | | //验证验证码是否正确 |
| | | //Verify if the verification code is correct. |
| | | |
| | | if (password.equals("38B8/EBdihRzcFNtJYSH+g==")){ |
| | | return "/password.html"; |
| | | } |
| | | User user = userService.getByAccount(username); |
| | | password = AESUtils.decrypt(password); |
| | | String s = MD5.md5(password); |
| | |
| | | model.addAttribute("back",false); |
| | | }else { |
| | | model.addAttribute("back",true); |
| | | |
| | | } |
| | | |
| | | return PREFIX + "tStudentEdit.html"; |
| | |
| | | <input class="itemInput" type="password" name="password" id="password" placeholder="请输入密码" required="" value=""> |
| | | </div> |
| | | |
| | | <!-- <div class="form-group" style="float: left;">--> |
| | | <!-- <div class="col-sm-8" style="padding-left: 0px; padding-right: 0px;">--> |
| | | <!-- <input class="form-control" type="text" name="kaptcha" placeholder="验证码" required="">--> |
| | | <!-- </div>--> |
| | | <!-- <div class="col-sm-4" style="padding-left: 0px; padding-right: 0px;">--> |
| | | <!-- <img src="${ctxPath}/kaptcha" id="kaptcha" width="90px" height="34px"/>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- <h4 style="color: #0e9aef;text-align: right" onclick="updatePassword1()">修改密码</h4>--> |
| | | <div class="form-group" style="float: left;"> |
| | | <div class="col-sm-8" style="padding-left: 0px; padding-right: 0px;"> |
| | | <input class="form-control" type="text" name="kaptcha" placeholder="验证码" required=""> |
| | | </div> |
| | | <div class="col-sm-4" style="padding-left: 0px; padding-right: 0px;"> |
| | | <img src="${ctxPath}/kaptcha" id="kaptcha" width="90px" height="34px"/> |
| | | </div> |
| | | </div> |
| | | <h4 style="color: #0e9aef;text-align: right" onclick="updatePassword1()">修改密码</h4> |
| | | <button onclick="login()" class="btn full-width m-b" style="background-color: #0573EA;color: white;">登 录</button> |
| | | <button type="submit" id="submit" style="display: none;"></button> |
| | | </p> |
| | |
| | | <script src="${ctxPath}/js/common/ajax-object.js"></script> |
| | | <script src="${ctxPath}/js/common/Feng.js"></script> |
| | | <script src="${ctxPath}/crypto-js/crypto-js.js"></script> |
| | | <script src="${ctxPath}/layui/layui.all.js"></script> |
| | | <script> |
| | | function updatePassword1(e) { |
| | | console.log("调用") |
| | | |
| | | $.ajax({ |
| | | url: Feng.ctxPath + '/update', |
| | | type: 'POST', |
| | | success: function (res) { |
| | | } |
| | | let index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/update' |
| | | }); |
| | | this.layerIndex = index; |
| | | |
| | | // $.ajax({ |
| | | // url: Feng.ctxPath + '/update', |
| | | // type: 'GET', |
| | | // success: function (res) { |
| | | // } |
| | | // }); |
| | | } |
| | | |
| | | $(function () { |
| | |
| | | } |
| | | |
| | | function login(){ |
| | | |
| | | let password = $('#password').val(); |
| | | console.log("password=="+password) |
| | | if (password=="a123456") { |
| | | alert("当前为默认密码,请修改密码!"); |
| | | } |
| | | |
| | | password = encrypt(password); |
| | | $('#password').val(password); |
| | | $('#submit').submit(); |
| | |
| | | <img style="margin-left: 44px" src="${ctxPath}/img/logo.png" width="100px" height="120px"/> |
| | | <br/> |
| | | <h4 style="color: red;">${tips!}</h4> |
| | | <form class="m-t" role="form" action="${ctxPath}/login" method="post"> |
| | | <form class="m-t" role="form" action="${ctxPath}/updatePassword" method="post"> |
| | | <div class="item"> |
| | | <img src="${ctxPath}/img/account.png" /> |
| | | <input class="itemInput" type="text" name="username" id="username" placeholder="请输入账号" required="" value=""> |
| | | </div> |
| | | <div class="item"> |
| | | <input class="itemInput" name="sms_code" id="sms_code" placeholder="请输入验证码" required="" value="" style="padding-left: 0px; text-align: center;"> |
| | | <input type="hidden" id="code"> |
| | | <button id="btn" type="button" onclick="sendSMSCode(this)" style="width: 150px; font-size: 14px;">获取验证码</button> |
| | | </div> |
| | | <div class="item"> |
| | |
| | | var key = CryptoJS.enc.Utf8.parse("c53fd327353a09a1"); |
| | | var iv = CryptoJS.enc.Utf8.parse("3a0565e3b1d8ae3d"); |
| | | |
| | | function sendSMSCode() { |
| | | var phone = $("#username").val() |
| | | var ajax = new $ax(Feng.ctxPath + "/getSMSCode", function(data){ |
| | | if(data!=null){ |
| | | |
| | | } |
| | | }); |
| | | ajax.set("phone",phone); |
| | | ajax.start(); |
| | | } |
| | | |
| | | //aes加密 |
| | | function encrypt(context) { |
| | | var encrypted = ''; |
| | |
| | | return decryptedStr.toString(); |
| | | } |
| | | |
| | | function update(){ |
| | | function update() { |
| | | let password = $('#password').val(); |
| | | password = encrypt(password); |
| | | $('#password').val(password); |
| | | $('#submit').submit(); |
| | | } |
| | | |
| | | $.ajax({ |
| | | url: 'your-submit-url', |
| | | type: 'POST', |
| | | data: $('#submit').serialize(), |
| | | success: function(response) { |
| | | // 根据响应的msg字段设置对应的提示 |
| | | // 成功提示 |
| | | alert("修改成功"); |
| | | window.location.href = Feng.ctxPath+"/login"; |
| | | }, |
| | | error: function() { |
| | | // 错误处理 |
| | | alert('当前账号不存在'); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | window.addEventListener( |
| | | "mousewheel", |
| | |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TCompetitionTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/advertisement/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TSite.openAddTSite()"/> |
| | | @} |
| | | |
| | | |
| | | @if(shiro.hasPermission("/advertisement/update")){ |
| | | <#button name="编辑" icon="fa-edit" clickFun="TSite.openEditTSite()" space="true"/> |
| | | @} |
| | | |
| | | @if(shiro.hasPermission("/advertisement/info")){ |
| | | <#button name="查看详情" icon="fa-search" clickFun="TSite.openInfo()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/advertisement/changeState")){ |
| | | <#button name="上架" icon="fa-check" clickFun="TSite.onShelf()" space="true"/> |
| | | |
| | | <#button name="下架" icon="fa-remove" clickFun="TSite.offShelf()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="TSiteTable"/> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" id="nextSite1" hidden="hidden"> |
| | | <label class="col-sm-3 control-label">*选择场地:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" name="nextSite" id="nextSite"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="form-group" id="half1" hidden="hidden"> |
| | | <label class="col-sm-3 control-label">*选择半场:</label> |
| | |
| | | $("#ttt2").empty().append(content); |
| | | } |
| | | }) |
| | | var siteId = document.getElementById("nextSite"); |
| | | var siteName = siteId.options[siteId.selectedIndex].text; |
| | | ajax.set("siteName",siteName); |
| | | if (siteName ==""){ |
| | | var siteId = document.getElementById("siteId"); |
| | | var siteName = siteId.options[siteId.selectedIndex].text; |
| | | ajax.set("siteName",siteName); |
| | | } |
| | | |
| | | var radios = document.getElementsByName("type"); |
| | | var selectedValue; |
| | | |
| | | for (var i = 0; i < radios.length; i++) { |
| | | if (radios[i].checked) { |
| | | selectedValue = radios[i].value; |
| | | break; |
| | | } |
| | | } |
| | | console.log("typeselectedValue" +selectedValue) |
| | | if (selectedValue==2){ |
| | | var halfId = document.getElementById("half"); |
| | | var halfName = halfId.options[halfId.selectedIndex].text; |
| | | ajax.set("halfName",halfName); |
| | | } |
| | | |
| | | |
| | | |
| | | ajax.set("date",$('#time').val()); |
| | | ajax.start() |
| | | |
| | | var ajax1 = new $ax(Feng.ctxPath + "/ball/halfName/"+ $('#siteId').val(), function(data){ |
| | | console.log("================"+data) |
| | | if(data!=null){ |
| | | let htmlStr = ''; |
| | | for (let i = 0; i < data.length; i++) { |
| | | htmlStr += '<option value="' + data[i] + '">' + data[i] + '</option>' |
| | | } |
| | | $("#half").empty().append(htmlStr); |
| | | } |
| | | }) |
| | | ajax1.start() |
| | | // var ajax1 = new $ax(Feng.ctxPath + "/ball/halfName/"+ $('#siteId').val(), function(data){ |
| | | // console.log("================"+data) |
| | | // if(data!=null){ |
| | | // let htmlStr = ''; |
| | | // for (let i = 0; i < data.length; i++) { |
| | | // htmlStr += '<option value="' + data[i] + '">' + data[i] + '</option>' |
| | | // } |
| | | // $("#half").empty().append(htmlStr); |
| | | // } |
| | | // }) |
| | | // ajax1.start() |
| | | |
| | | } |
| | | }); |
| | |
| | | @} |
| | | <#button name="报名信息" icon="fa-check-circle" clickFun="CoursePackage.registrationRecord()" space="true"/> |
| | | @if(objectType !=3){ |
| | | <#button name="暂停" icon="fa-refresh" clickFun="CoursePackage.editCoursePackageState1(1)" space="true"/> |
| | | <#button name="开课" icon="fa-warning" clickFun="CoursePackage.editCoursePackageState1(2)" space="true"/> |
| | | <#button name="暂停" icon="fa-refresh" clickFun="CoursePackage.editCoursePackageState1(4)" space="true"/> |
| | | <#button name="开课" icon="fa-warning" clickFun="CoursePackage.editCoursePackageState1(1)" space="true"/> |
| | | @} |
| | | |
| | | </div> |
| | |
| | | @if(shiro.hasPermission("/tStudent/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TStudent.openAddTStudent()"/> |
| | | @} |
| | | |
| | | @if(shiro.hasPermission("/tStudent/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="TStudent.openTStudentDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tStudent/info")){ |
| | | <#button name="查看详情" icon="fa-edit" clickFun="TStudent.openTStudentDetail1()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tStudent/comit")){ |
| | | <#button name="学员评语" icon="fa-edit" clickFun="TStudent.openTStudentDetail2()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tStudent/frozen")){ |
| | | <#button name="冻结" icon="fa-edit" clickFun="TStudent.editCoursePackageState(2)" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tStudent/frozen")){ |
| | | <#button name="解冻" icon="fa-edit" clickFun="TStudent.editCoursePackageState(1)" space="true"/> |
| | | |
| | | |
| | | @} |
| | | @if(shiro.hasPermission("/tStudent/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="TStudent.delete()" space="true"/> |
| | | @} |
| | |
| | | "id": "u:38a6f5402e72", |
| | | "level": "link" |
| | | }, |
| | | @if(shiro.hasPermission("//backpass")){ |
| | | @if(shiro.hasPermission("/backpass")){ |
| | | |
| | | { |
| | | "type": "button", |
| | |
| | | ]; |
| | | }; |
| | | TQuestion.close = function() { |
| | | parent.layer.close(window.parent.TQuestion.layerIndex); |
| | | window.close(); |
| | | // window.parent.layer.close(); |
| | | var index = parent.layer.getFrameIndex(window.name); |
| | | parent.layer.close(index); |
| | | |
| | | |
| | | // parent.layer.close(window.parent.parent.TQuestion.layerIndex); |
| | | // console.log("======"+window.parent.TQuestion.layerIndex) |
| | | // window.close(); |
| | | } |
| | | /** |
| | | * 检查是否选中 |
| | |
| | | ajax.set("date",$('#time').val()); |
| | | var siteId = document.getElementById("siteId"); |
| | | var siteName = siteId.options[siteId.selectedIndex].text; |
| | | ajax.set("siteName",siteName); |
| | | |
| | | var halfId = document.getElementById("half"); |
| | | var halfName = halfId.options[halfId.selectedIndex].text; |
| | | ajax.set("siteName",siteName); |
| | | ajax.set("halfName",halfName); |
| | | |
| | | ajax.start() |
| | |
| | | for (let i = 0; i < data.length; i++) { |
| | | htmlStr += '<option value="' + data[i] + '">' + data[i] + '</option>' |
| | | } |
| | | |
| | | $("#half").empty().append(htmlStr); |
| | | } |
| | | }) |
| | | ajax1.start() |
| | | |
| | | |
| | | var ajax2 = new $ax(Feng.ctxPath + "/ball/nextName/"+ $('#siteId').val(), function(data){ |
| | | console.log("================"+data) |
| | | if(data!=null){ |
| | | let htmlStr = ''; |
| | | if (data.length>0){ |
| | | for (let i = 0; i < data.length; i++) { |
| | | htmlStr += '<option value="' + data[i] + '">' + data[i] + '</option>' |
| | | } |
| | | $("#nextSite1").show() |
| | | $("#nextSite").empty().append(htmlStr); |
| | | |
| | | |
| | | }else { |
| | | $("#nextSite1").hidden() |
| | | $("#nextSite").empty() |
| | | } |
| | | } |
| | | }) |
| | | ajax2.start() |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | ajax.set("city",city); |
| | | ajax.set("cityCode",cityCode); |
| | | ajax.set("storeId",storeId); |
| | | ajax.set("isHalf",type); |
| | | if (type ==1){ |
| | | ajax.set("isHalf",2); |
| | | }else { |
| | | ajax.set("isHalf",1); |
| | | |
| | | } |
| | | ajax.set("siteId",siteId); |
| | | ajax.set("nextName",site); |
| | | ajax.set("halfName",half); |
| | |
| | | |
| | | $('#storeId').change(function () { |
| | | querySite(); |
| | | CoursePackageInfo.queryHalf(); |
| | | |
| | | }) |
| | | $('#siteId').change(function () { |
| | | if ($('#time').val()!="") |
| | |
| | | console.log("最终结果"); |
| | | console.log(res); |
| | | // 获取当前时间 |
| | | let now = new Date(); |
| | | // 将指定时间转换为 Date 对象 |
| | | let specifiedTime = new Date(res); |
| | | |
| | | // 比较当前时间是否大于指定时间 |
| | | if (now > specifiedTime) { |
| | | console.log("当前时间大于指定时间"); |
| | | Feng.error("当前课程还未结束,不能上传消课记录") |
| | | return |
| | | } |
| | | |
| | | let htmlStr = |
| | | '<div class="form-horizontal">' + |
| | | ' <div class="col-sm-11" style="padding: 20px;">' + |
| | |
| | | return '已上架'; |
| | | case 2: |
| | | return '已下架'; |
| | | case 4: |
| | | return '已暂停'; |
| | | } |
| | | } |
| | | } |
| | |
| | | Feng.error("请选择常规课") |
| | | return; |
| | | } |
| | | if(CoursePackage.seItem.status == state){ |
| | | Feng.error("不能重复操作"); |
| | | return |
| | | } |
| | | parent.layer.confirm(state == 1 ? '是否暂停' : "是否开课" , { |
| | | |
| | | parent.layer.confirm(state == 4 ? '是否暂停' : "是否开课" , { |
| | | btn: ['确定', '取消'] |
| | | }, function (index) { |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/editCoursePackageState1", function (data) { |
| | | Feng.success(state == 1 ? '暂停' : "开课" + "成功!"); |
| | | Feng.success(state == 4 ? '暂停' : "开课" + "成功!"); |
| | | CoursePackage.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error(state == 1 ? '暂停' : "开课" + "失败!" + data.responseJSON.message + "!"); |
| | | Feng.error(state == 4 ? '暂停' : "开课" + "失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id", CoursePackage.seItem.id); |
| | | ajax.set("state", state); |
| | |
| | | lay('.startAndEndDay').each(function(i, e){ |
| | | laydate.render({ |
| | | trigger: 'click', |
| | | elem: this |
| | | elem: e |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | ,done: function(value, date, endDate){ |
| | |
| | | lay('.startAndEndDay').each(function(i, e){ |
| | | laydate.render({ |
| | | trigger: 'click', |
| | | elem: this |
| | | elem: e |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | ,done: function(value, date, endDate){ |
| | |
| | | let obj = CoursePackageDiscount.coursePackagePaymentConfig[index]; |
| | | let ii = $(e).parent('div').parent('div').parent('div').parent('div').attr('index'); |
| | | for (let i = 0; i < obj.coursePackageDiscount.length; i++) { |
| | | if(type == obj.coursePackageDiscount[i].type){ |
| | | if(3 == obj.coursePackageDiscount[i].type){ |
| | | let jsonArray = obj.coursePackageDiscount[i].content; |
| | | for (let j = 0; j < jsonArray.length; j++) { |
| | | if(j == ii){ |
| | | let arr = value.split(" - "); |
| | | obj.coursePackageDiscount[i].content[j]['startDate'] = arr[0]; |
| | | obj.coursePackageDiscount[i].content[j]['endDate'] = arr[1]; |
| | | } |
| | | } |
| | | } if(4 == obj.coursePackageDiscount[i].type){ |
| | | let jsonArray = obj.coursePackageDiscount[i].content; |
| | | for (let j = 0; j < jsonArray.length; j++) { |
| | | if(j == ii){ |
| | |
| | | RegistrationRecord.initColumn = function () { |
| | | let columns = [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '购买用户', field: 'userName', align: 'center', valign: 'middle'}, |
| | | {title: '联系方式', field: 'phone', align: 'center', valign: 'middle'}, |
| | | {title: '购课学员', field: 'studentName', align: 'center', valign: 'middle'}, |
| | | {title: '报名时间', field: 'insertTime', align: 'center', valign: 'middle'}, |
| | | {title: '总课时数', field: 'totalClassHours', align: 'center', valign: 'middle'}, |
| | | {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (row.status ==7){ |
| | | return '<div style="color: blue;">' + value + '</div>'; |
| | | } |
| | | else { |
| | | return value; |
| | | } |
| | | }}, |
| | | {title: '购买用户', field: 'userName', align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (row.status ==7){ |
| | | return '<div style="color: blue;">' + value + '</div>'; |
| | | } |
| | | else { |
| | | return value; |
| | | } |
| | | }}, |
| | | {title: '联系方式', field: 'phone', align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (row.status ==7){ |
| | | return '<div style="color: blue;">' + value + '</div>'; |
| | | } |
| | | else { |
| | | return value; |
| | | } |
| | | }}, |
| | | {title: '购课学员', field: 'studentName', align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (row.status ==7){ |
| | | return '<div style="color: blue;">' + value + '</div>'; |
| | | } |
| | | else { |
| | | return value; |
| | | } |
| | | }}, |
| | | {title: '报名时间', field: 'insertTime', align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (row.status ==7){ |
| | | return '<div style="color: blue;">' + value + '</div>'; |
| | | } |
| | | else { |
| | | return value; |
| | | } |
| | | }}, |
| | | {title: '总课时数', field: 'totalClassHours', align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (row.status ==7){ |
| | | return '<div style="color: blue;">' + value + '</div>'; |
| | | } |
| | | else { |
| | | return value; |
| | | } |
| | | }}, |
| | | { |
| | | title: '剩余课时数', |
| | | field: 'laveClassHours', |
| | |
| | | formatter: function (value, row) { |
| | | if (value < 3) { |
| | | return '<div style="color: red;">' + value + '</div>'; |
| | | } else { |
| | | }else if (row.status ==7){ |
| | | return '<div style="color: blue;">' + value + '</div>'; |
| | | } |
| | | else { |
| | | return value; |
| | | } |
| | | } |
| | |
| | | align: 'center', |
| | | valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var totalClassHours = row.totalClassHours; |
| | | var laveClassHours = row.laveClassHours; |
| | | var alreadyClassHours = totalClassHours - laveClassHours; |
| | | return alreadyClassHours; |
| | | if (row.status ==7){ |
| | | return '<div style="color: blue;">' + value + '</div>'; |
| | | } |
| | | else { |
| | | return value; |
| | | } |
| | | } |
| | | // , |
| | | // formatter: function (value, row) { |
| | | // var totalClassHours = row.totalClassHours; |
| | | // var laveClassHours = row.laveClassHours; |
| | | // var alreadyClassHours = totalClassHours - laveClassHours; |
| | | // return alreadyClassHours; |
| | | // } |
| | | }, |
| | | {title: '请假次数', field: 'absencesNumber', align: 'center', valign: 'middle'}, |
| | | {title: '请假次数', field: 'absencesNumber', align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (row.status ==7){ |
| | | return '<div style="color: blue;">' + value + '</div>'; |
| | | } |
| | | else { |
| | | return value; |
| | | } |
| | | }}, |
| | | { |
| | | title: '状态', |
| | | field: 'status', |
| | |
| | | case 5: |
| | | return '已转移'; |
| | | case 6: |
| | | return '已赠课'; |
| | | return '已赠课' |
| | | case 7: |
| | | return '体验购课'; |
| | | default: |
| | | return ''; |
| | | } |
| | |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/appUser/add' |
| | | }); |
| | | layer.closeAll('page'); |
| | | // layer.closeAll('page'); |
| | | }, |
| | | btn2:function () { |
| | | } |
| | |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/appUser/addStudent/'+appUserId |
| | | }); |
| | | layer.closeAll('page'); |
| | | // layer.closeAll('page'); |
| | | }, |
| | | }); |
| | | } |