| | |
| | | } |
| | | if (dataVo.getUserType() == 3){ |
| | | coupon.setPublisherType(3); |
| | | coupon.setAuditStatus(2); |
| | | coupon.setAuditStatus(1); |
| | | coupon.setCityManagerId(dataVo.getCityManagerId()); |
| | | } |
| | | |
| | |
| | | @RequestMapping("/base/introduce/addIntroduce") |
| | | public Object addIntroduce(@RequestBody IntroduceRewards introduceRewards){ |
| | | |
| | | |
| | | if (introduceRewards.getId()!=null){ |
| | | IntroduceRewards byId = idrService.getById(introduceRewards.getId()); |
| | | // 判断当前活动有没有开始 如果开始了不能编辑赠送课时数 不能编辑活动开始时间 |
| | | Date endTime = byId.getEndTime(); |
| | | Date startTime = byId.getStartTime(); |
| | | Date local = new Date(); |
| | | if (startTime.before(local)&&endTime.after(local)){ |
| | | // 证明当前活动已开始 |
| | | // 判断有没有修改开始时间 |
| | | if (!introduceRewards.getStartTime().equals(byId.getStartTime())){ |
| | | // 表示不能修改开始时间 |
| | | return 5002; |
| | | } |
| | | if (!introduceRewards.getGiveClass().equals(byId.getGiveClass())){ |
| | | // 表示不能修改赠送课时数 |
| | | return 5001; |
| | | } |
| | | } |
| | | return idrService.updateById(introduceRewards); |
| | | }else { |
| | | introduceRewards.setInsertTime(new Date()); |
| | |
| | | |
| | | @Autowired |
| | | private TCoursePackageDiscountService discountService; |
| | | @Autowired |
| | | private ICoursePackagePaymentConfigService coursePackagePaymentConfigService; |
| | | |
| | | /** |
| | | * 上/下架 1为上架 2为下架 3为删除 |
| | |
| | | return strings; |
| | | |
| | | } |
| | | |
| | | // 获取课包商品的价格配置 |
| | | @PostMapping("/course/getHoursByPackageId") |
| | | @ResponseBody |
| | | public List<CoursePackagePaymentConfig> getHoursByPackageId(@RequestBody Integer coursePackageId1){ |
| | | List<CoursePackagePaymentConfig> coursePackageId = coursePackagePaymentConfigService.list(new QueryWrapper<CoursePackagePaymentConfig>() |
| | | .eq("coursePackageId", coursePackageId1)); |
| | | return coursePackageId; |
| | | } |
| | | @PostMapping("/course/getHours") |
| | | public List<Integer> getHours(@RequestBody Integer coursePackageId1){ |
| | | return coursePackageService.getHours(coursePackageId1); |
| | |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8") |
| | | Date insertTime; |
| | | @TableField("appUserId") |
| | | Integer appUserId; |
| | | } |
| | |
| | | ids.add(-1); |
| | | queryDiscountList.setIds(ids); |
| | | } |
| | | List<DiscountList> discountLists = this.baseMapper.queryDiscountList(discountListPage, queryDiscountList.getPCode(), queryDiscountList.getCCode(), queryDiscountList.getName(), queryDiscountList.getType(), queryDiscountList.getIds()); |
| | | List<DiscountList> discountLists = this.baseMapper.queryDiscountList(discountListPage, |
| | | queryDiscountList.getPCode(), queryDiscountList.getCCode(), |
| | | queryDiscountList.getName(), queryDiscountList.getType(), queryDiscountList.getIds()); |
| | | for (DiscountList discountList : discountLists) { |
| | | List<TCoursePackageDiscount> tCoursePackageDiscounts = this.baseMapper.selectList |
| | | (new LambdaQueryWrapper<TCoursePackageDiscount>() |
| | |
| | | </resultMap> |
| | | |
| | | <select id="queryDiscountList" resultType="com.dsh.course.model.DiscountList"> |
| | | select t1.id,t1.type,t1.status,t2.province pName,t2.city cName,t2.name,t2.storeId,t2.id courseId from t_course_package_discount t1 left join t_course_package t2 on t1.coursePackageId = t2.id |
| | | select t1.id,t1.type,t1.status,t2.province pName,t2.city cName,t2.name,t2.storeId,t2.id courseId |
| | | from t_course_package_discount t1 |
| | | left join t_course_package t2 on t1.coursePackageId = t2.id |
| | | where t2.storeId in <foreach collection="ids" close=")" item="id" open="(" separator=","> |
| | | #{id} |
| | | </foreach> |
| | |
| | | */ |
| | | @FeignClient("mb-cloud-course") |
| | | public interface CourseClient { |
| | | |
| | | // 获取课包商品的价格配置 |
| | | @PostMapping("/course/getHoursByPackageId") |
| | | List<CoursePackagePaymentConfig> getHoursByPackageId(@RequestBody Integer coursePackageId1); |
| | | /** |
| | | * 上/下架 1为上架 2为下架 3为删除 |
| | | * |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.course.feignClient.account.CityManagerClient; |
| | | import com.dsh.course.feignClient.account.StoreStaffClient; |
| | | import com.dsh.course.feignClient.account.model.CityManager; |
| | |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.modular.system.model.CoachQuery; |
| | | import com.dsh.guns.modular.system.model.Store; |
| | | import com.dsh.guns.modular.system.model.TCity; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private CityManagerClient cityManagerClient; |
| | | @Autowired |
| | | private StoreStaffClient storeStaffClient; |
| | | @Autowired |
| | | private ICityService cityService; |
| | | /** |
| | | * 跳转体测预约管理首页 |
| | | */ |
| | |
| | | @RequestMapping("/add") |
| | | public String add(Model model) { |
| | | Integer roleType = UserExt.getUser().getObjectType(); |
| | | List<CityManager> province = cityManagerClient.listAll(); |
| | | Set<String> seenNames = new HashSet<>(); |
| | | List<CityManager> result = new ArrayList<>(); |
| | | for (CityManager cityManager : province) { |
| | | if(!seenNames.contains(cityManager.getProvince())){ |
| | | result.add(cityManager); |
| | | seenNames.add(cityManager.getProvince()); |
| | | } |
| | | } |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | if (roleType == 2){ |
| | | Integer cityManagerId = UserExt.getUser().getObjectId(); |
| | | CityManager cityManager = cityManagerClient.queryCityManagerById(cityManagerId); |
| | | List<Store> stores = storeClient.getStoreByCityManagerId(cityManagerId); |
| | | model.addAttribute("stores",stores); |
| | | } |
| | | model.addAttribute("list",result); |
| | | model.addAttribute("list",list); |
| | | |
| | | model.addAttribute("roleType",roleType); |
| | | return PREFIX + "TBodySideAppointment_add.html"; |
| | |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | BodySideAppointment data = bodySideAppointmentClient.getInfoById(id); |
| | | if (roleType == 1){ |
| | | List<CityManager> cityManagers = cityManagerClient.listAll(); |
| | | List<CityManager> province = new ArrayList<>(); |
| | | List<CityManager> city = new ArrayList<>(); |
| | | Set<String> seenNames = new HashSet<>(); |
| | | Set<String> c = new HashSet<>(); |
| | | // 省列表 |
| | | List<CityManager> result = new ArrayList<>(); |
| | | // 市列表 |
| | | List<CityManager> cities = new ArrayList<>(); |
| | | // 对省/市去重 |
| | | for (CityManager cityManager : cityManagers) { |
| | | if(!seenNames.contains(cityManager.getProvince())){ |
| | | result.add(cityManager); |
| | | seenNames.add(cityManager.getProvince()); |
| | | } |
| | | if(!c.contains(cityManager.getProvince())){ |
| | | cities.add(cityManager); |
| | | c.add(cityManager.getProvince()); |
| | | } |
| | | } |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | TCity province1 = cityService.getOne(new QueryWrapper<TCity>().eq("name", data.getProvince())); |
| | | List<TCity> city = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, province1.getId())); |
| | | model.addAttribute("list",list); |
| | | List<Store> stores = storeClient.getStore(data.getCity()); |
| | | model.addAttribute("stores",stores); |
| | | model.addAttribute("list",result); |
| | | model.addAttribute("cities",cities); |
| | | model.addAttribute("cities",city); |
| | | }else if (roleType == 2){ |
| | | List<Store> stores = storeClient.getStoreByCityManagerId(objectId); |
| | | model.addAttribute("stores",stores); |
| | |
| | | model.addAttribute("item", tCoursePackage); |
| | | List<CoursePackagePaymentConfig> list4 = coursePackagePaymentConfigClient.queryCoursePackagePaymentConfigList(id); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | // 拒绝理由 |
| | | StringBuilder reasons = new StringBuilder(""); |
| | | int a =0; |
| | | for (CoursePackagePaymentConfig coursePackagePaymentConfig : list4) { |
| | | if(coursePackagePaymentConfig.getCashPayment() == 0){ |
| | | continue; |
| | |
| | | } |
| | | map.put("payment", payment); |
| | | map.put("cashPayment", coursePackagePaymentConfig.getCashPayment()); |
| | | |
| | | List<TCoursePackageDiscount> tCoursePackageDiscounts = coursePackageDiscountClient.queryCoursePackageDiscount(coursePackagePaymentConfig.getId()); |
| | | for (TCoursePackageDiscount tCoursePackageDiscount : tCoursePackageDiscounts) { |
| | | if (tCoursePackageDiscount.getAuditStatus()==3){ |
| | | a = 3; |
| | | model.addAttribute("type1",3); |
| | | break; |
| | | }else if (tCoursePackageDiscount.getAuditStatus()==2){ |
| | | a=2; |
| | | model.addAttribute("type1",-1); |
| | | }else{ |
| | | a=1; |
| | | model.addAttribute("type1",-1); |
| | | break; |
| | | } |
| | | } |
| | | for (TCoursePackageDiscount tCoursePackageDiscount : tCoursePackageDiscounts) { |
| | | if (tCoursePackageDiscount.getAuditStatus()==3){ |
| | | reasons.append(tCoursePackageDiscount.getAuditRemark()+","); |
| | | } |
| | | } |
| | | map.put("coursePackageDiscount", tCoursePackageDiscounts); |
| | | list.add(map); |
| | | } |
| | | model.addAttribute("role",UserExt.getUser().getObjectType()); |
| | | model.addAttribute("type",tCoursePackage.getType()); |
| | | Integer type1 = tCoursePackage.getType(); |
| | | // 审核状态 |
| | | StringBuilder stringBuilder = new StringBuilder(""); |
| | | |
| | | switch (a){ |
| | | case 1: |
| | | stringBuilder.append("待审核"); |
| | | break; |
| | | case 2: |
| | | stringBuilder.append("已通过"); |
| | | break; |
| | | case 3: |
| | | stringBuilder.append("未通过"); |
| | | break; |
| | | } |
| | | model.addAttribute("type",stringBuilder); |
| | | |
| | | String string = reasons.toString(); |
| | | if (!string.equals("")){ |
| | | int index = string.indexOf(","); |
| | | String result = string.substring(0, index); |
| | | model.addAttribute("reasons", result); |
| | | }else{ |
| | | model.addAttribute("reasons", ""); |
| | | } |
| | | model.addAttribute("coursePackagePaymentConfig", JSON.toJSONString(list)); |
| | | model.addAttribute("type2",tCoursePackage.getType()); |
| | | return PREFIX + "coursePackageDiscount.html"; |
| | | } |
| | | @RequestMapping("/infoOne") |
| | |
| | | |
| | | String string = reasons.toString(); |
| | | if (!string.equals("")){ |
| | | String substring = string.substring(0, string.length() - 1); |
| | | model.addAttribute("reasons", substring); |
| | | int index = string.indexOf(","); |
| | | String result = string.substring(0, index); |
| | | model.addAttribute("reasons", result); |
| | | }else{ |
| | | model.addAttribute("reasons", ""); |
| | | } |
| | |
| | | import com.dsh.course.feignClient.activity.PointMercharsClient; |
| | | import com.dsh.course.feignClient.activity.model.*; |
| | | import com.dsh.course.feignClient.course.CourseClient; |
| | | import com.dsh.course.feignClient.course.CoursePackageClient; |
| | | import com.dsh.course.feignClient.course.model.CoursePackagePaymentConfig; |
| | | import com.dsh.course.feignClient.course.model.TCoursePackage; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.core.base.tips.ErrorTip; |
| | |
| | | |
| | | @Autowired |
| | | private CourseClient courseClient; |
| | | @Autowired |
| | | private CoursePackageClient coursePackageClient; |
| | | |
| | | @Resource |
| | | private PointMercharsClient pointMercharsClient; |
| | |
| | | Integer coursePackageId = pointMercharsVo.getCoursePackageId(); |
| | | List<String> name = courseClient.queryPackageById(coursePackageId); |
| | | Integer coursePackageId1 = pointMercharsVo.getCoursePackageId(); |
| | | List<Integer> classHours = courseClient.getHours(coursePackageId1); |
| | | List<CoursePackagePaymentConfig> hoursByPackageId = courseClient.getHoursByPackageId(coursePackageId1); |
| | | model.addAttribute("typeName",name.get(0)); |
| | | model.addAttribute("pageName",name.get(1)); |
| | | model.addAttribute("classHours",classHours); |
| | | model.addAttribute("classHours",hoursByPackageId); |
| | | String productImages = pointMercharsVo.getProductImages(); |
| | | ArrayList<String> strings = new ArrayList<>(); |
| | | for (String s : productImages.split(",")) { |
| | |
| | | Double price,Integer type,Integer integral,Double cash,String cover,String imgOne,Integer userPopulation,Integer quantityIssued,Integer pickUpQuantity, |
| | | String startTime,String text,Integer sort,String name,Integer useScope,String cityIds,String storeIds,Integer cardType |
| | | ) throws ParseException { |
| | | // 判断当前选择的课包 是不是假期课 然后判断选择的有效期是否在假期课有效期内 |
| | | TCoursePackage tCoursePackage = coursePackageClient.queryById(coursePackageId); |
| | | if (tCoursePackage.getType()==2){ |
| | | // 如果是假期课 获取到当前课包的开始时间和结束时间 |
| | | Date endTime = tCoursePackage.getEndTime(); |
| | | Date startTime1 = tCoursePackage.getStartTime(); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | Date s = format.parse(startTime.split(" - ")[0]); |
| | | Date e = format.parse(startTime.split(" - ")[1]); |
| | | if (s.before(startTime1)){ |
| | | // 有效期开始时间小于假期课开始时间 |
| | | return 5009; |
| | | } |
| | | if (e.after(endTime)){ |
| | | // 有效期结束时间大于假期课结束时间 |
| | | return 5008; |
| | | } |
| | | } |
| | | PointsMerchandise pointsMerchandise = new PointsMerchandise(); |
| | | pointsMerchandise.setType(typeAll); |
| | | pointsMerchandise.setName(name); |
| | |
| | | }else if(useScope==1){ |
| | | Integer id = pointMercharsClient.add(pointsMerchandise); |
| | | } |
| | | |
| | | |
| | | |
| | | }else { |
| | | // ? |
| | | pointsMerchandise.setShelves(storeId); |
| | |
| | | @RequestMapping("/addIntroduce") |
| | | @ResponseBody |
| | | public Object addAppUser(@RequestBody IntroduceRewards introduceRewards){ |
| | | |
| | | return introduceClient.addIntroduce(introduceRewards); |
| | | } |
| | | } |
| | |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TQuestion.oneChange()"> |
| | | <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TQuestion.oneChange(this)"> |
| | | <option value="">请选择省</option> |
| | | @for(obj in list){ |
| | | <option style="width: 300px" value="${obj.provinceCode}">${obj.province}</option> |
| | | <option style="width: 300px" value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" id="cityCode"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="cCode" name="cCode" onchange="TQuestion.oneChangeNext(this)"> |
| | | <option value="">请选择市</option> |
| | | <select style="width: 300px" class="form-control" id="cCode" name="pCode" onchange="TQuestion.oneChangeNext(this)" > |
| | | <option value="">请选择省</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TQuestion.oneChange()"> |
| | | <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TQuestion.oneChange(this)"> |
| | | @for(obj in list){ |
| | | <option value="${obj.provinceCode}" ${obj.province == data.province ? 'selected=selected' : ''}>${obj.province}</option> |
| | | <option value="${obj.code}" ${obj.name == data.province ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="cCode" name="cCode" onchange="TQuestion.oneChangeNext(this)"> |
| | | @for(obj in cities){ |
| | | <option value="${obj.cityCode}" ${obj.city == data.city ? 'selected=selected' : ''}>${obj.city}</option> |
| | | <option value="${obj.code}" ${obj.name == data.city ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <label class="col-sm-3 control-label">*所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="cCode" name="pCode" > |
| | | <option value="">请选择省</option> |
| | | |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | } |
| | | } |
| | | |
| | | if($("#q1").val()>0 && $("#type").val()==2){ |
| | | if(Number($("#q1").val())>0){ |
| | | $("#payType1").show(); |
| | | $("input[id='t1']").attr("checked", "checked") |
| | | }else{ |
| | | console.log("看看现金") |
| | | console.log($("#q1").val()); |
| | | $("#payType1").hide(); |
| | | var checkbox = document.getElementById("t1"); |
| | | // 取消选中 |
| | | checkbox.checked = false; |
| | | } |
| | | if($("#q2").val()>0 && $("#type").val()==2){ |
| | | |
| | | if(Number($("#q2").val())>0 ){ |
| | | |
| | | $("#payType2").show(); |
| | | $("input[id='t2']").attr("checked", "checked") |
| | | }else{ |
| | | console.log("看看玩湃比") |
| | | console.log($("#q2").val()); |
| | | $("#payType2").hide(); |
| | | var checkbox = document.getElementById("t2"); |
| | | // 取消选中 |
| | | checkbox.checked = false; |
| | | } |
| | | if($("#q3").val()>0 && $("#type").val()==2){ |
| | | if(Number($("#q3").val())>0 ){ |
| | | $("#payType3").show(); |
| | | $("input[id='t3']").attr("checked", "checked") |
| | | }else{ |
| | | console.log("看看课时") |
| | | console.log($("#q3").val()); |
| | | var checkbox = document.getElementById("t3"); |
| | | // 取消选中 |
| | | checkbox.checked = false; |
| | | $("#payType3").hide(); |
| | | } |
| | | |
| | | } |
| | |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TCompetitionTableToolbar" role="group"> |
| | | @if(role != 3){ |
| | | <#button name="上架" icon="fa-plus" clickFun="TCompetition.updateState(1)"/> |
| | | <#button name="下架" icon="fa-edit" clickFun="TCompetition.updateState(2)" space="true"/> |
| | | @if(role == 1){ |
| | | <#button name="查看详情" icon="fa-remove" clickFun="TCompetition.info()" space="true"/> |
| | | @} |
| | | <#button name="查看详情" icon="fa-remove" clickFun="TCompetition.info()" space="true"/> |
| | | </div> |
| | | <#table id="TCompetitionTable"/> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | @if(type==3){ |
| | | @if(type1==3){ |
| | | <div class="form-group"> |
| | | <div class="col-sm-2"></div> |
| | | <div class="col-sm-10"> |
| | | <label class="col-sm-2 control-label">拒绝理由:</label> |
| | | <div class="col-sm-4" style="margin-top: 6px;"> |
| | | <span>拒绝理由:</span> |
| | | <span>${reasons}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="danger" name="关闭" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | <#button btnCss="danger" name="关闭" |
| | | id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="coursePackageConfigId" name="coursePackageConfigId"> |
| | | @for(obj in classHours){ |
| | | <option value="">${obj}</option> |
| | | <option value="" ${obj.id == item.coursePackageConfigId ? 'selected=selected' : ''}>${obj.classHours}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | |
| | | |
| | | function updateT(e) { |
| | | var oneId = $('#type option:selected').text(); |
| | | |
| | | console.log(oneId); |
| | | if (oneId!="详情"&&oneId!="指定商品"&&oneId!="指定折扣"){ |
| | | $("#t3").hide() |
| | |
| | | $("#t1").val("") |
| | | $("#t2").val("") |
| | | $("#t3").val("") |
| | | $("#type").val("") |
| | | $("#page").val("") |
| | | }else { |
| | | $("#t1").show() |
| | | $("#t2").show() |
| | | $("#t3").show() |
| | | |
| | | $("#type").val("") |
| | | $("#page").val("") |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/typeChange", function(data){ |
| | | if(data!=null){ |
| | | var content; |
| | | var content= "<option value=''>请选择</option>"; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | |
| | | if(data!=null&&data.length>0){ |
| | | $("#t2").show() |
| | | |
| | | var content1; |
| | | var content1= "<option value=''>请选择</option>"; |
| | | $.each(data, function(k,v) { |
| | | content1 += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | |
| | | }); |
| | | |
| | | |
| | | document.addEventListener('DOMContentLoaded', function() { |
| | | var selectElement = document.getElementById('page'); |
| | | selectElement.onchange(); |
| | | }); |
| | | |
| | | |
| | | function updateType(e) { |
| | | let name = $("#name").val() |
| | |
| | | $("#t1").val("") |
| | | $("#t2").val("") |
| | | $("#t3").val("") |
| | | $("#type").val("") |
| | | $("#page").val("") |
| | | }else { |
| | | $("#t1").show() |
| | | $("#t2").show() |
| | | $("#t3").show() |
| | | $("#type").val("") |
| | | $("#page").val("") |
| | | |
| | | console.log("页面") |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/typeChange", function(data){ |
| | | if(data!=null){ |
| | |
| | | } |
| | | |
| | | function updateOne(e) { |
| | | console.log("类型") |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/typeChangeOne", function(data){ |
| | | if(data!=null&&data.length>0){ |
| | |
| | | console.log("=-======0000") |
| | | $("#t2").hide() |
| | | $("#t2").val("") |
| | | |
| | | |
| | | } |
| | | }); |
| | | if (oneId==2 || oneId==25|| oneId==27){ |
| | |
| | | <div class="form-group" id="y1" hidden> |
| | | <label class="col-sm-3 control-label">所需现金:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="cash" name="cash" type="number"> |
| | | <input class="form-control" id="cash" name="cash" oninput="validateNumber(this)" type="text"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="y2"> |
| | | <label class="col-sm-3 control-label">所需积分:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="integral" name="integral" type="number"> |
| | | <input class="form-control" id="integral" name="integral" type="number"> |
| | | |
| | | </div> |
| | | </div> |
| | |
| | | } |
| | | } |
| | | |
| | | function validateNumber(input) { |
| | | // 获取输入的值 |
| | | var value = input.value; |
| | | |
| | | // 使用正则表达式匹配数字和最多两位小数 |
| | | var regex = /^\d*\.?\d{0,2}/; |
| | | var match = value.match(regex); |
| | | |
| | | // 更新输入框的值为匹配的结果(最多两位小数) |
| | | input.value = match |
| | | } |
| | | |
| | | function changeCity(n){ |
| | | |
| | |
| | | Feng.error("当前手机号 已被注册") |
| | | }else{ |
| | | window.parent.TQuestion.table.refresh(); |
| | | layer.closeAll('page'); |
| | | TQuestion.close(); |
| | | Feng.success("添加成功"); |
| | | } |
| | |
| | | * 选择视频 回显视频封面 |
| | | * @param e |
| | | */ |
| | | TQuestion.oneChange = function (e) { |
| | | var id = $("#name").val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/benefits/getCoverDrawing/"+id, function(data){ |
| | | document.getElementById('img').src = data.coverDrawing; |
| | | $("#introduce").val(data.introduce); |
| | | TCompetition.oneChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){ |
| | | if(data!=null){ |
| | | var content='<option value="">选择市</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("id",id); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | }; |
| | | /** |
| | |
| | | TQuestion.dataCount = 0; |
| | | TQuestion.phone = ""; |
| | | TQuestion.phoneId = ""; |
| | | |
| | | TQuestion.oneChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){ |
| | | if(data!=null){ |
| | | var content='<option value="">选择市</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | }; |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | |
| | | }); |
| | | } |
| | | }; |
| | | TQuestion.oneChange = function () { |
| | | var province = $('#pCode option:selected').text(); |
| | | var citySelect = document.getElementById("cCode"); |
| | | var ajax = new $ax(Feng.ctxPath + "/tSite/getCity", function(data){ |
| | | if(data!=null){ |
| | | var content='<option value="">选择市</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.cityCode+"'>"+v.city+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | if (province === ""){ |
| | | citySelect.innerHTML = '<option value="">请先选择省</option>'; |
| | | } |
| | | ajax.set("province",province); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | |
| | | TQuestion.oneChangeNext = function (e) { |
| | | var oneId=$(e).val(); |
| | |
| | | ]; |
| | | }; |
| | | |
| | | TQuestion.oneChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){ |
| | | if(data!=null){ |
| | | var content='<option value="">选择市</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | }; |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | |
| | | TQuestion.phone = ""; |
| | | TQuestion.phoneId = ""; |
| | | // 选择省 获取对应市区 |
| | | TQuestion.oneChange = function () { |
| | | var province = $('#pCode option:selected').text(); |
| | | var citySelect = document.getElementById("cCode"); |
| | | var storeSelect = document.getElementById("store"); |
| | | var ajax = new $ax(Feng.ctxPath + "/tSite/getCity", function(data){ |
| | | if(data!=null){ |
| | | var content='<option value="">选择市</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.cityCode+"'>"+v.city+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | if (province === ""){ |
| | | citySelect.innerHTML = '<option value="">请先选择省</option>'; |
| | | storeSelect.innerHTML = '<option value="">请先选择省</option>'; |
| | | }else{ |
| | | citySelect.innerHTML = '<option value="">请选择市</option>'; |
| | | storeSelect.innerHTML = '<option value="">请先选择市区</option>'; |
| | | } |
| | | ajax.set("province",province); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | |
| | | // 选择市 获取对应门店 |
| | | TQuestion.oneChangeNext = function (e) { |
| | |
| | | , yes: function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'首页设置', |
| | | title:'添加用户', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | |
| | | }); |
| | | layer.closeAll('page'); |
| | | }, |
| | | btn2:function () { |
| | | } |
| | | }); |
| | | }else{ |
| | | province = response.province; |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | // todo 写用户管理路径 |
| | | content: Feng.ctxPath + '/appUser/addStudent/'+appUserId |
| | | }); |
| | | layer.closeAll('page'); |
| | |
| | | Feng.info("只能选择一条进行查看!"); |
| | | }else { |
| | | if (this.check()) { |
| | | |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | |
| | | data: JSON.stringify(data), |
| | | contentType: "application/json", |
| | | success: function (response) { |
| | | if (response==5001){ |
| | | Feng.error("当前活动已开始,不能编辑赠送课时数!") |
| | | return; |
| | | } |
| | | if (response==5002){ |
| | | Feng.error("当前活动已开始,不能编辑开始时间!") |
| | | return; |
| | | } |
| | | window.parent.TCompetition.table.refresh(); |
| | | TCompetition.close(); |
| | | Feng.success("修改成功"); |
| | |
| | | }else if(data=="5003"){ |
| | | console.log("请选择相同运营商门店") |
| | | Feng.info("请选择相同运营商门店"); |
| | | |
| | | }else |
| | | if(data.code == 200){ |
| | | }else if (data=="5009"){ |
| | | Feng.info("有效期开始时间不应小于假期课开始时间"); |
| | | }else if (data=="5008"){ |
| | | Feng.info("有效期结束时间不应大于假期课结束时间"); |
| | | } else if(data.code == 200){ |
| | | if(language==1){ |
| | | Feng.success("添加成功!"); |
| | | }else if(language==2){ |
| | |
| | | |
| | | } |
| | | TGoodsInfoDlg.addSubmit1 = function() { |
| | | console.log("看看进入") |
| | | let company = 3; |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | var cityIds = []; |
| | | var cts = ""; |
| | | if (company === '2'){ |
| | |
| | | TGoodsInfoDlg.editor = UE.getEditor('editor'); |
| | | TGoodsInfoDlg.editor1 = UE.getEditor('editor1'); |
| | | getProvince(null); |
| | | Feng.initValidator("carInfoForm", TGoodsInfoDlg.validateFields); |
| | | var drivingLicensePhoto = new $WebUpload("drivingLicensePhoto"); |
| | | drivingLicensePhoto.setUploadBarId("progressBar"); |
| | | drivingLicensePhoto.init(); |
| | |
| | | ajax.set("limit",100); |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | | TGoodsInfoDlg.timeChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/timeChange", function(data){ |
| | |
| | | */ |
| | | TPointProducts.payDetail = function () { |
| | | if (this.check()) { |
| | | var state = TPointProducts.seItem.status; |
| | | if (state=="3"){ |
| | | Feng.error("当前门票不能再次审核!") |
| | | return; |
| | | } |
| | | layer.open({ |
| | | type: 1 |
| | | , title: '审核' |
| | |
| | | , btnAlign: 'c' //按钮居中 |
| | | , shade: 0.5 //不显示遮罩 |
| | | , yes: function () { |
| | | var state = TPointProducts.seItem.status; |
| | | if (state=="3"){ |
| | | Feng.error("当前门票不能再次审核!") |
| | | return; |
| | | } |
| | | |
| | | var OBJradio= $("input[name='type1']:checked").val(); |
| | | console.log(OBJradio) |
| | | let remark = $("#remark").val() |
| | |
| | | Feng.info("请输入合法手机号") |
| | | return ; |
| | | } |
| | | if ($("#phone").val()==""){ |
| | | Feng.error("请输入手机号!") |
| | | return; |
| | | } |
| | | if ($("#number").val()==""){ |
| | | Feng.error("请输入赠送积分!") |
| | | return; |
| | | } |
| | | |
| | | var ajax = new $ax(Feng.ctxPath + "/tIntegral/add", function(data){ |
| | | console.log("看看返回") |
| | | console.log(data) |
| | |
| | | let turnId = $("#turnId").val() |
| | | |
| | | |
| | | if ($('#type option:selected').text() == "详情"&&$('#type option:selected').text() == "指定商品"&&$('#type option:selected').text() == "指定折扣") { |
| | | if ($('#type option:selected').text() == "详情"||$('#type option:selected').text() == "指定商品"||$('#type option:selected').text() == "指定折扣") { |
| | | if ($("#turnId").val() == '') { |
| | | Feng.info("请输入跳转ID") |
| | | return; |