Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/PlayPai
81个文件已修改
1个文件已删除
80个文件已添加
| | |
| | | package com.dsh.account.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.dsh.account.entity.TAppUser; |
| | | import com.dsh.account.model.*; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.PrintWriter; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | return new TAppUser(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据名称模糊搜索用户 |
| | | * @param name |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/appUser/queryAppUserListByName") |
| | | public List<TAppUser> queryAppUserListByName(@RequestBody String name){ |
| | | return appUserService.list(new QueryWrapper<TAppUser>().eq("state", 1).like("name", name)); |
| | | } |
| | | } |
| | |
| | | TStudent student = studentService.getById(id); |
| | | return student; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据名称模糊搜索学员 |
| | | * @param name |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/student/queryStudentListByName") |
| | | public List<TStudent> queryStudentListByName(@RequestBody String name){ |
| | | return studentService.list(new QueryWrapper<TStudent>().eq("state", 1).like("name", name)); |
| | | } |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.activity.entity.Coupon; |
| | | import com.dsh.activity.entity.CouponCity; |
| | | import com.dsh.activity.entity.CouponStore; |
| | | import com.dsh.activity.entity.UserCoupon; |
| | | import com.dsh.activity.feignclient.account.AppUserClient; |
| | | import com.dsh.activity.feignclient.account.CityClient; |
| | | import com.dsh.activity.feignclient.account.StoreStaffClient; |
| | | import com.dsh.activity.feignclient.account.model.TCityManager; |
| | |
| | | import com.dsh.activity.feignclient.other.model.CityDataAndProvinceDataVo; |
| | | import com.dsh.activity.feignclient.other.model.Store; |
| | | import com.dsh.activity.model.CouponListVo; |
| | | import com.dsh.activity.model.CouponRecordQuery; |
| | | import com.dsh.activity.model.request.CommodityRequest; |
| | | import com.dsh.activity.model.request.CouponDataVo; |
| | | import com.dsh.activity.model.request.CouponPackageReq; |
| | |
| | | import com.dsh.activity.util.ResultUtil; |
| | | import com.dsh.activity.util.TokenUtil; |
| | | import com.dsh.activity.util.ToolUtil; |
| | | import com.google.gson.Gson; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | |
| | | @Resource |
| | | private CouponCityService cityService; |
| | | |
| | | @Autowired |
| | | private AppUserClient appUserClient; |
| | | |
| | | |
| | | |
| | |
| | | @ResponseBody |
| | | @PostMapping("/base/coupon/insertIntoCouponData") |
| | | public boolean saveCouponData(@RequestBody CouponDataVo dataVo){ |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | try { |
| | | System.out.println(dataVo); |
| | | Coupon coupon = new Coupon(); |
| | | coupon.setName(dataVo.getCouponName()); |
| | | coupon.setType(dataVo.getPrescription()); |
| | | HashMap<String, Object> stringObjectHashMap = new HashMap<>(); |
| | | Gson gson = new Gson(); |
| | | switch (dataVo.getPrescription()){ |
| | | // {"conditionalAmount":50,"deductionAmount":10,"experienceName":""} |
| | | case 1: |
| | | stringObjectHashMap.put("conditionalAmount",dataVo.getCondition()); |
| | | stringObjectHashMap.put("deductionAmount",dataVo.getSubtraction()); |
| | | coupon.setContent(stringObjectHashMap.toString()); |
| | | coupon.setContent(gson.toJson(stringObjectHashMap)); |
| | | break; |
| | | case 2: |
| | | stringObjectHashMap.put("conditionalAmount",dataVo.getDiscount()); |
| | | coupon.setContent(stringObjectHashMap.toString()); |
| | | coupon.setContent(gson.toJson(stringObjectHashMap)); |
| | | break; |
| | | case 3: |
| | | stringObjectHashMap.put("experienceName",dataVo.getExperience()); |
| | | coupon.setContent(stringObjectHashMap.toString()); |
| | | coupon.setContent(gson.toJson(stringObjectHashMap)); |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | coupon.setIllustrate(dataVo.getIllustrate()); |
| | | coupon.setDistributionMethod(dataVo.getDistributionMethod()); |
| | | coupon.setRedemptionMethod(dataVo.getExchangeMethod()); |
| | | switch (dataVo.getExchangeMethod()){ |
| | | case 1: |
| | | coupon.setIntegral(BigDecimal.valueOf(dataVo.getRequiredPoints())); |
| | | break; |
| | | case 2: |
| | | coupon.setCash(dataVo.getRequiredCash()); |
| | | coupon.setIntegral(BigDecimal.valueOf(dataVo.getRequiredPoints())); |
| | | break; |
| | | case 3: |
| | | coupon.setCash(dataVo.getRequiredCash()); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | coupon.setQuantityIssued(dataVo.getQuantityIssued()); |
| | | coupon.setPickUpQuantity(dataVo.getPickUpQuantity()); |
| | | coupon.setUseScope(dataVo.getCompany()); |
| | | coupon.setUserPopulation(dataVo.getUserGroup()); |
| | | String timeDeal = dataVo.getPeriodOfValidity(); |
| | | if (ToolUtil.isNotEmpty(timeDeal)){ |
| | | String[] split = timeDeal.split(" - "); |
| | | coupon.setStartTime(simpleDateFormat.parse(split[0])); |
| | | coupon.setEndTime(simpleDateFormat.parse(split[1])); |
| | | } |
| | | coupon.setAuditStatus(1); |
| | | coupon.setStatus(1); |
| | | coupon.setState(1); |
| | | coupon.setInsertTime(new Date()); |
| | | coupon.setCover(dataVo.getGoodImg()); |
| | | List<String> goodImgs = dataVo.getGoodImgs(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | if (goodImgs.size() > 0){ |
| | | if (goodImgs.size() == 1){ |
| | | coupon.setProductImages(goodImgs.get(0)); |
| | | String goodImgs = dataVo.getGoodImgs(); |
| | | String[] imgsSplit = goodImgs.split(","); |
| | | if (imgsSplit.length > 0){ |
| | | if (imgsSplit.length == 1){ |
| | | coupon.setProductImages(imgsSplit[0]); |
| | | }else { |
| | | for (String goodImg : goodImgs) { |
| | | builder.append(goodImg).append(","); |
| | | } |
| | | builder.deleteCharAt(builder.lastIndexOf(",")); |
| | | coupon.setProductImages(builder.toString()); |
| | | coupon.setProductImages(goodImgs); |
| | | } |
| | | } |
| | | coupon.setPublisherType(dataVo.getUserType()); |
| | | if (dataVo.getUserType() == 1){ |
| | | coupon.setPublisherType(2); |
| | | } |
| | | if (dataVo.getUserType() == 2){ |
| | | coupon.setPublisherType(1); |
| | | coupon.setCityManagerId(dataVo.getCityManagerId()); |
| | | } |
| | | boolean save = couponService.save(coupon); |
| | | if (save){ |
| | | if (dataVo.getCompany() == 2){ |
| | | for (Integer storeId : dataVo.getStoreIds()) { |
| | | if (dataVo.getCompany() == 3){ |
| | | String[] split = dataVo.getStoreIds().split(","); |
| | | for (String storeId : split) { |
| | | CouponStore couponStore = new CouponStore(); |
| | | couponStore.setCouponId(coupon.getId()); |
| | | couponStore.setStoreId(storeId); |
| | | couponStore.setStoreId(Integer.parseInt(storeId)); |
| | | couStoreService.save(couponStore); |
| | | } |
| | | } |
| | | List<Integer> cityIds = dataVo.getCityIds(); |
| | | if (dataVo.getCompany() == 3 && cityIds.size() > 0 ){ |
| | | List<CityDataAndProvinceDataVo> cityAndProvince = regionClient.getCityAndProvince(cityIds); |
| | | String cityIds = dataVo.getCityIds(); |
| | | String[] split = cityIds.split(","); |
| | | List<Integer> cityIdss = new ArrayList<>(); |
| | | if (dataVo.getCompany() == 2 && split.length > 0 ){ |
| | | for (String s : split) { |
| | | int intValue = Integer.parseInt(s); |
| | | cityIdss.add(intValue); |
| | | } |
| | | List<CityDataAndProvinceDataVo> cityAndProvince = regionClient.getCityAndProvince(cityIdss); |
| | | for (CityDataAndProvinceDataVo cityId : cityAndProvince) { |
| | | CouponCity couponCity = new CouponCity(); |
| | | couponCity.setCouponId(coupon.getId()); |
| | |
| | | couponCity.setCity(cityId.getCityName()); |
| | | couponCity.setProvinceCode(cityId.getProvinceCode()); |
| | | couponCity.setProvince(cityId.getProvinceName()); |
| | | System.out.println(couponCity); |
| | | cityService.save(couponCity); |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/coupon/queryCity") |
| | | public List<CouponCity> queryCity(@RequestBody Integer id){ |
| | | List<CouponCity> list = cityService.list(new LambdaQueryWrapper<CouponCity>().eq(CouponCity::getCouponId, id)); |
| | | return list; |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/coupon/queryStore") |
| | | public List<Integer> queryStore(@RequestBody Integer id){ |
| | | return couStoreService.list(new LambdaQueryWrapper<CouponStore>().eq(CouponStore::getCouponId,id)).stream().map(CouponStore::getStoreId).collect(Collectors.toList()); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/base/coupon/listRecord") |
| | | @ResponseBody |
| | | public List<Map<String,Object>> listRecord(@RequestBody CouponRecordQuery ofSearch){ |
| | | Page<Object> objectPage = new Page<>(ofSearch.getOffset(), ofSearch.getLimit()); |
| | | return couponService.listRecord(objectPage,ofSearch.getId(),ofSearch.getIds(),ofSearch.getType()); |
| | | } |
| | | |
| | | |
| | | |
| | | @PostMapping("/base/coupon/updateType") |
| | | public void updateType(@RequestBody Long id){ |
| | | couponService.updateType(id); |
| | | } |
| | | } |
| | |
| | | import com.dsh.activity.feignclient.other.StoreClient; |
| | | import com.dsh.activity.feignclient.other.model.StoreDetailOfCourse; |
| | | import com.dsh.activity.model.PointMerchandiseVo; |
| | | import com.dsh.activity.model.request.AppUserGoodResp; |
| | | import com.dsh.activity.model.request.CommodityRequest; |
| | | import com.dsh.activity.model.request.*; |
| | | import com.dsh.activity.service.*; |
| | | import com.dsh.activity.util.GDMapGeocodingUtil; |
| | | import com.dsh.activity.util.StrUtils; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.xml.crypto.Data; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/pointMerchars/queryGoodsListSearch") |
| | | public List<Map<String,Object>> getIntegralGoodsListOfSearch(@RequestBody IntegralGoodsOfSearch ofSearch){ |
| | | System.out.println(ofSearch); |
| | | List<Map<String, Object>> mapList = pmdsService.queryGoodsListOfSearch(ofSearch); |
| | | if (mapList.size() > 0){ |
| | | for (Map<String, Object> stringObjectMap : mapList) { |
| | | Integer o = (Integer) stringObjectMap.get("id"); |
| | | String startTime = (String) stringObjectMap.get("startTime"); |
| | | String endTime = (String) stringObjectMap.get("endTime"); |
| | | stringObjectMap.put("timeValue",startTime + "至"+endTime); |
| | | int count1 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>() |
| | | .eq(UserPointsMerchandise::getPointsMerchandiseId, o)); |
| | | int count2 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>() |
| | | .eq(UserPointsMerchandise::getPointsMerchandiseId, o) |
| | | .eq(UserPointsMerchandise::getStatus,2)); |
| | | stringObjectMap.put("hasExchangeQty",count1); |
| | | stringObjectMap.put("hasPickQty",count2); |
| | | |
| | | stringObjectMap.put("activeStatus",dealTimeStatus(startTime,endTime)); |
| | | } |
| | | if (ToolUtil.isNotEmpty(ofSearch.getActiveStatus())){ |
| | | mapList = dealTimeData(mapList,ofSearch.getActiveStatus()); |
| | | } |
| | | } |
| | | System.out.println("mapList->"+mapList); |
| | | return mapList; |
| | | } |
| | | |
| | | public int dealTimeStatus(String startTime, String endTime){ |
| | | LocalDate now = LocalDate.now(); |
| | | LocalDate start = LocalDate.parse(startTime); |
| | | LocalDate end = LocalDate.parse(endTime); |
| | | if (now.isBefore(start)) { |
| | | return 1; // 未开始 |
| | | } else if (now.isAfter(end)) { |
| | | return 3; // 已结束 |
| | | } else { |
| | | return 2; // 已开始 |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param mapLists |
| | | * @param timeType 1=未开始 2=已开始 3=已结束 |
| | | * @return |
| | | */ |
| | | public List<Map<String, Object>> dealTimeData(List<Map<String, Object>> mapLists,Integer timeType){ |
| | | Date currentDate = new Date(); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | switch (timeType){ |
| | | case 1: |
| | | return mapLists.stream() |
| | | .filter(event -> { |
| | | try { |
| | | return simpleDateFormat.parse((String) event.get("startTime")).after(currentDate); |
| | | } catch (ParseException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | case 2: |
| | | return mapLists.stream() |
| | | .filter(event -> { |
| | | try { |
| | | return simpleDateFormat.parse((String) event.get("startTime")).before(currentDate) && simpleDateFormat.parse((String) event.get("endTime")).after(currentDate); |
| | | } catch (ParseException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | case 3: |
| | | return mapLists.stream() |
| | | .filter(event -> { |
| | | try { |
| | | return simpleDateFormat.parse((String) event.get("endTime")).before(currentDate); |
| | | } catch (ParseException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | default: |
| | | break; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | @PostMapping("/base/pointMerchars/queryPointMerchaseDetailOfId") |
| | | public PointMercharsVo queryPointMerchaseDetailOfId(@RequestBody Integer pointMercharsId){ |
| | | PointMercharsVo vo = new PointMercharsVo(); |
| | | PointsMerchandise byId = pmdsService.getById(pointMercharsId); |
| | | if (ToolUtil.isNotEmpty(byId)){ |
| | | vo.setName(byId.getName()); |
| | | vo.setCover(byId.getCover()); |
| | | vo.setPics(byId.getProductImages()); |
| | | vo.setQuantityIssued(byId.getQuantityIssued()); |
| | | vo.setPickUpQuantity(byId.getPickUpQuantity()); |
| | | vo.setSort(byId.getSort()); |
| | | vo.setContent(byId.getRedemptionInstructions()); |
| | | } |
| | | return vo; |
| | | } |
| | | |
| | | |
| | | @PostMapping("/base/pointMerchars/updateGoodsGroudingStatus") |
| | | boolean updateGoodsGroudingStatus(@RequestBody Map<String,Integer> map){ |
| | | Integer id = map.get("id"); |
| | | Integer type = map.get("type"); |
| | | System.out.println(id); |
| | | System.out.println(type); |
| | | try { |
| | | PointsMerchandise byId = pmdsService.getById(id); |
| | | byId.setShelves(type); |
| | | pmdsService.updateById(byId); |
| | | return true; |
| | | }catch (Exception e){ |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/pointMerchars/queryUserPayedGoodsList") |
| | | public List<Map<String, Object>> queryUserPayedGoodsList(@RequestBody PointMercharsPayedVo pointMercharsPayedVo){ |
| | | System.out.println(pointMercharsPayedVo); |
| | | List<Map<String, Object>> mapList = new ArrayList<>(); |
| | | LambdaQueryWrapper<UserPointsMerchandise> userPointsMerchandiseLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | userPointsMerchandiseLambdaQueryWrapper.eq(UserPointsMerchandise::getPointsMerchandiseId,pointMercharsPayedVo.getId()); |
| | | if (ToolUtil.isNotEmpty(pointMercharsPayedVo.getStatus())){ |
| | | userPointsMerchandiseLambdaQueryWrapper.eq(UserPointsMerchandise::getStatus,pointMercharsPayedVo.getStatus()); |
| | | } |
| | | List<UserPointsMerchandise> list = upmseService.list(userPointsMerchandiseLambdaQueryWrapper); |
| | | System.out.println(list); |
| | | if (list.size() > 0 ){ |
| | | for (UserPointsMerchandise pointsMerchandise : list) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id",pointsMerchandise.getId()); |
| | | map.put("userId",pointsMerchandise.getUserId()); |
| | | map.put("status", pointsMerchandise.getStatus()); |
| | | mapList.add(map); |
| | | } |
| | | } |
| | | System.out.println(mapList); |
| | | return mapList; |
| | | } |
| | | |
| | | } |
| | |
| | | @TableName("t_coupon_city") |
| | | public class CouponCity extends Model<CouponCity> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | |
| | | /** |
| | | * 优惠券id |
| | | */ |
| | | @TableField("couponId") |
| | | private Integer couponId; |
| | | /** |
| | | * 省 |
| | |
| | | */ |
| | | @PostMapping("/base/appUser/queryAppUser") |
| | | AppUser queryAppUser(Integer appUserId); |
| | | |
| | | } |
| | |
| | | @Param("page")Page<Map<String, Object>> page); |
| | | |
| | | |
| | | List<Map<String, Object>> listRecord(@Param("objectPage") Page<Object> objectPage, @Param("id") Integer id, @Param("ids") List<Integer> ids, @Param("type") Integer type); |
| | | |
| | | |
| | | void updateType(@Param("id") Long id); |
| | | } |
| | |
| | | package com.dsh.activity.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.activity.entity.PointsMerchandise; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface PointsMerchandiseMapper extends BaseMapper<PointsMerchandise> { |
| | | |
| | | List<Map<String, Object>> queryGoodsListOfSearch(@Param("name")String name, |
| | | @Param("type")Integer type, |
| | | @Param("redemptionMethod")Integer redemptionMethod, |
| | | @Param("userPopulation") Integer userPopulation, |
| | | @Param("activeStatus") Integer activeStatus, |
| | | @Param("state") Integer state, |
| | | @Param("page") Page<Map<String, Object>> page); |
| | | |
| | | } |
| | |
| | | package com.dsh.activity.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.activity.entity.UserPointsMerchandise; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
New file |
| | |
| | | package com.dsh.activity.model; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Data |
| | | public class CouponRecordQuery { |
| | | |
| | | private long offset; |
| | | |
| | | private long limit; |
| | | |
| | | private Integer id; |
| | | |
| | | private List<Integer> ids; |
| | | |
| | | private Integer type; |
| | | |
| | | } |
| | |
| | | @Data |
| | | public class CouponDataVo { |
| | | /** |
| | | * 用户类型1=城市管理者 2=平台管理者 |
| | | * 用户类型2=城市管理者 1=平台管理者 |
| | | */ |
| | | Integer userType; |
| | | /** |
| | |
| | | /** |
| | | * 图片列表 |
| | | */ |
| | | List<String> goodImgs; |
| | | String goodImgs; |
| | | /** |
| | | * 适用范围 |
| | | */ |
| | |
| | | /** |
| | | * 城市code |
| | | */ |
| | | List<Integer> cityIds; |
| | | String cityIds; |
| | | /** |
| | | * 门店列表 |
| | | */ |
| | | List<Integer> storeIds; |
| | | String storeIds; |
| | | } |
New file |
| | |
| | | package com.dsh.activity.model.request; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.util.Map; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class IntegralGoodsOfSearch { |
| | | |
| | | private String name; |
| | | |
| | | private Integer type; |
| | | |
| | | private Integer redemptionMethod; |
| | | |
| | | private Integer userPopulation; |
| | | |
| | | private Integer activeStatus; |
| | | |
| | | private Integer state; |
| | | |
| | | private Page<Map<String, Object>> page; |
| | | } |
New file |
| | |
| | | package com.dsh.activity.model.request; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.util.Map; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class PointMercharsPayedVo { |
| | | |
| | | Integer id; |
| | | |
| | | String name; |
| | | |
| | | String phone; |
| | | |
| | | Integer status; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.activity.model.request; |
| | | |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class PointMercharsVo { |
| | | |
| | | String name; |
| | | /** |
| | | * 封面图 |
| | | */ |
| | | String cover; |
| | | /** |
| | | * 图片 |
| | | */ |
| | | String pics; |
| | | /** |
| | | * 发放数量 |
| | | */ |
| | | Integer quantityIssued; |
| | | /** |
| | | * 限领数量 |
| | | */ |
| | | Integer pickUpQuantity; |
| | | /** |
| | | * 商品说明 |
| | | */ |
| | | String content; |
| | | /** |
| | | * 排序 |
| | | */ |
| | | Integer sort; |
| | | } |
| | |
| | | package com.dsh.activity.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.activity.entity.Coupon; |
| | | import com.dsh.activity.feignclient.model.CouponExamineListSearch; |
| | | import com.dsh.activity.feignclient.model.CouponListOfSearch; |
| | | import com.dsh.activity.model.CouponListVo; |
| | | import com.dsh.activity.model.request.IntegralGoodsOfSearch; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | List<Map<String, Object>> queryCouponExamineList(CouponExamineListSearch ofSearch); |
| | | |
| | | List<Map<String, Object>> listRecord(Page<Object> objectPage, Integer id, List<Integer> ids, Integer type); |
| | | |
| | | void updateType(Long id); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.activity.entity.PointsMerchandise; |
| | | import com.dsh.activity.model.request.IntegralGoodsOfSearch; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface PointsMerchandiseService extends IService<PointsMerchandise> { |
| | | |
| | | List<Map<String, Object>> queryGoodsListOfSearch(IntegralGoodsOfSearch ofSearch); |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.activity.entity.UserPointsMerchandise; |
| | | import com.dsh.activity.model.request.PointMercharsPayedVo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.activity.entity.Coupon; |
| | | import com.dsh.activity.feignclient.account.AppUserClient; |
| | |
| | | import com.dsh.activity.feignclient.model.CouponListOfSearch; |
| | | import com.dsh.activity.mapper.CouponMapper; |
| | | import com.dsh.activity.model.CouponListVo; |
| | | import com.dsh.activity.model.request.IntegralGoodsOfSearch; |
| | | import com.dsh.activity.service.ICouponService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | return this.baseMapper.queryCouponExamineList(ofSearch.getName(),ofSearch.getType(),ofSearch.getUserPopulation(),ofSearch.getDistributionMethod(),ofSearch.getAuditStatus(),ofSearch.getPage()); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> listRecord(Page<Object> objectPage, Integer id, List<Integer> ids, Integer type) { |
| | | return this.baseMapper.listRecord(objectPage,id,ids,type); |
| | | } |
| | | |
| | | @Override |
| | | public void updateType(Long id) { |
| | | this.baseMapper.updateType(id); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.activity.entity.PointsMerchandise; |
| | | import com.dsh.activity.mapper.PointsMerchandiseMapper; |
| | | import com.dsh.activity.model.request.IntegralGoodsOfSearch; |
| | | import com.dsh.activity.service.PointsMerchandiseService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class PointsMerchandiseServiceImpl extends ServiceImpl<PointsMerchandiseMapper, PointsMerchandise> implements PointsMerchandiseService { |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> queryGoodsListOfSearch(IntegralGoodsOfSearch ofSearch) { |
| | | return this.baseMapper.queryGoodsListOfSearch(ofSearch.getName(),ofSearch.getType(),ofSearch.getRedemptionMethod(), |
| | | ofSearch.getUserPopulation(),ofSearch.getActiveStatus(),ofSearch.getState(),ofSearch.getPage()); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.activity.entity.UserPointsMerchandise; |
| | | import com.dsh.activity.mapper.UserPointsMerchandiseMapper; |
| | | import com.dsh.activity.model.request.PointMercharsPayedVo; |
| | | import com.dsh.activity.service.UserPointsMerchandiseService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户积分商品领取记录 服务实现类 |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dsh.activity.mapper.CouponMapper"> |
| | | <update id="updateType"> |
| | | update t_user_coupon set status = 2 where id =#{id} |
| | | </update> |
| | | |
| | | <select id="queryConponRuleOfJson" resultType="java.util.Map"> |
| | | SELECT JSON_EXTRACT(content, "$.conditionalAmount") as conditionalAmount, |
| | |
| | | quantityIssued, |
| | | pickUpQuantity, |
| | | `status`, |
| | | state |
| | | state, |
| | | illustrate |
| | | from t_coupon |
| | | where 1 = 1 |
| | | <if test="name != null"> |
| | |
| | | </if> |
| | | order by insertTime desc |
| | | </select> |
| | | <select id="listRecord" resultType="java.util.Map"> |
| | | select id,userId,status from t_user_coupon where couponId =#{id} |
| | | and userId in <foreach collection="ids" separator="," open="(" item="i" close=")"> |
| | | #{i} |
| | | </foreach> |
| | | <if test="type !=null"> |
| | | and status =#{type} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | <mapper namespace="com.dsh.activity.mapper.PointsMerchandiseMapper"> |
| | | |
| | | |
| | | <select id="queryGoodsListOfSearch" resultType="java.util.Map"> |
| | | SELECT id, |
| | | `name`, |
| | | `cover`, |
| | | `type`, |
| | | date_format(startTime ,'%Y-%m-%d') as startTime, |
| | | date_format(endTime ,'%Y-%m-%d') as endTime, |
| | | useScope, |
| | | userPopulation, |
| | | quantityIssued, |
| | | pickUpQuantity, |
| | | `sort`, |
| | | shelves |
| | | from t_points_merchandise |
| | | where 1 = 1 |
| | | <if test="name != null"> |
| | | and `name` like concat('%', #{name}, '%') |
| | | </if> |
| | | <if test="type != null"> |
| | | and type = #{type} |
| | | </if> |
| | | <if test="redemptionMethod != null"> |
| | | and redemptionMethod = #{redemptionMethod} |
| | | </if> |
| | | <if test="userPopulation != null"> |
| | | and userPopulation = #{userPopulation} |
| | | </if> |
| | | <if test="state != null"> |
| | | and `state` = #{state} |
| | | </if> |
| | | order by insertTime desc |
| | | </select> |
| | | </mapper> |
| | |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Import; |
| | | import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | |
| | | * @author jason |
| | | */ |
| | | @EnableSwagger2 |
| | | @EnableScheduling |
| | | @EnableFeignClients |
| | | @MBCloudApplication |
| | | @Import({WebConfig.class}) |
| | |
| | | props4.setProperty("algorithm-expression", "t_user_video_details$->{appUserId % 5 + 1}"); |
| | | result1.getShardingAlgorithms().put("t_user_video_details-inline", new AlgorithmConfiguration("INLINE", props4)); |
| | | result1.getKeyGenerators().put("t_user_video_details-snowflake", new AlgorithmConfiguration("SNOWFLAKE", new Properties())); |
| | | |
| | | //分片规则配置 |
| | | result1.getTables().add(getCoursePackageSchedulingTableRuleConfiguration()); |
| | | Properties props5 = new Properties(); |
| | | props5.setProperty("algorithm-expression", "t_course_package_scheduling$->{coursePackageId % 5 + 1}"); |
| | | result1.getShardingAlgorithms().put("t_course_package_scheduling-inline", new AlgorithmConfiguration("INLINE", props5)); |
| | | result1.getKeyGenerators().put("t_course_package_scheduling-snowflake", new AlgorithmConfiguration("SNOWFLAKE", new Properties())); |
| | | |
| | | linkedList.add(result1); |
| | | |
| | | return linkedList; |
| | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 分片算法配置 |
| | | * @return |
| | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 分片算法配置 |
| | | * @return |
| | | */ |
| | | private ShardingTableRuleConfiguration getCoursePackageSchedulingTableRuleConfiguration() { |
| | | ShardingTableRuleConfiguration result = new ShardingTableRuleConfiguration("t_course_package_scheduling", "m_$->{0}.t_course_package_scheduling$->{1..5}");//30 |
| | | result.setTableShardingStrategy(new StandardShardingStrategyConfiguration("coursePackageId", "t_course_package_scheduling-inline")); |
| | | result.setKeyGenerateStrategy(new KeyGenerateStrategyConfiguration("id", "t_course_package_scheduling-snowflake")); |
| | | return result; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.controller; |
| | | |
| | | import com.dsh.course.entity.CancelledClasses; |
| | | import com.dsh.course.service.CancelledClassesService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/12 3:47 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("") |
| | | public class CancelledClassesController { |
| | | |
| | | @Autowired |
| | | private CancelledClassesService cancelledClassesService; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 添加数据 |
| | | * @param cancelledClasses |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/cancelledClasses/addCancelledClasses") |
| | | public void addCancelledClasses(@RequestBody CancelledClasses cancelledClasses){ |
| | | cancelledClassesService.save(cancelledClasses); |
| | | } |
| | | } |
| | |
| | | courseService.updateById(course); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据类型获取数据 |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/course/queryCourseByType") |
| | | public List<TCourse> queryCourseByType(@RequestBody Integer type){ |
| | | return courseService.list(new QueryWrapper<TCourse>().eq("type", type).eq("state", 1)); |
| | | } |
| | | } |
| | |
| | | import com.dsh.course.feignclient.other.model.Store; |
| | | import com.dsh.course.model.BaseVo; |
| | | import com.dsh.course.model.QueryCoursePackageLists; |
| | | import com.dsh.course.model.QueryExamineCoursePackageLists; |
| | | import com.dsh.course.model.vo.response.Details; |
| | | import com.dsh.course.model.vo.response.ExchangeCoursePackageResponse; |
| | | import com.dsh.course.service.ICoursePackagePaymentConfigService; |
| | |
| | | Page<Map<String, Object>> mapPage = page.setRecords(coursePackageService.queryCoursePackageLists(page, queryCoursePackageLists)); |
| | | return mapPage; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加数据 |
| | | * @param coursePackage |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackage/addCoursePackage") |
| | | public Integer addCoursePackage(@RequestBody TCoursePackage coursePackage){ |
| | | return coursePackageService.addCoursePackage(coursePackage); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * @param coursePackage |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackage/updateCoursePackageById") |
| | | public void updateCoursePackageById(@RequestBody TCoursePackage coursePackage){ |
| | | coursePackageService.updateCoursePackageById(coursePackage); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取课包审核列表 |
| | | * @param queryExamineCoursePackageLists |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackage/queryExamineCoursePackageLists") |
| | | public Page<Map<String, Object>> queryExamineCoursePackageLists(@RequestBody QueryExamineCoursePackageLists queryExamineCoursePackageLists){ |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(queryExamineCoursePackageLists.getLimit(), queryExamineCoursePackageLists.getOffset(), |
| | | queryExamineCoursePackageLists.getSort(), queryExamineCoursePackageLists.getOrder()); |
| | | Page<Map<String, Object>> mapPage = page.setRecords(coursePackageService.queryExamineCoursePackageLists(page, queryExamineCoursePackageLists)); |
| | | return mapPage; |
| | | } |
| | | } |
New file |
| | |
| | | package com.dsh.course.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.course.entity.TCoursePackageDiscount; |
| | | import com.dsh.course.service.TCoursePackageDiscountService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/8 14:50 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("") |
| | | public class CoursePackageDiscountController { |
| | | |
| | | @Autowired |
| | | private TCoursePackageDiscountService coursePackageDiscountService; |
| | | |
| | | |
| | | /** |
| | | * 获取课包折扣 |
| | | * @param coursePackagePaymentConfigId |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackageDiscount/queryCoursePackageDiscount") |
| | | public List<TCoursePackageDiscount> queryCoursePackageDiscount(@RequestBody Integer coursePackagePaymentConfigId){ |
| | | return coursePackageDiscountService.list(new QueryWrapper<TCoursePackageDiscount>().eq("coursePackagePaymentConfigId", coursePackagePaymentConfigId) |
| | | .eq("auditStatus", 2)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 编辑课包折扣 |
| | | * @param list |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackageDiscount/setCoursePackageDiscount") |
| | | public void setCoursePackageDiscount(@RequestBody List<TCoursePackageDiscount> list){ |
| | | TCoursePackageDiscount tCoursePackageDiscount = list.get(0); |
| | | coursePackageDiscountService.remove(new QueryWrapper<TCoursePackageDiscount>().eq("coursePackageId", tCoursePackageDiscount.getCoursePackageId())); |
| | | if(list.size() > 0){ |
| | | coursePackageDiscountService.saveBatch(list); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.course.entity.CoursePackagePaymentConfig; |
| | | import com.dsh.course.service.ICoursePackagePaymentConfigService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/7 11:46 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("") |
| | | public class CoursePackagePaymentConfigController { |
| | | |
| | | @Autowired |
| | | private ICoursePackagePaymentConfigService coursePackagePaymentConfigService; |
| | | |
| | | |
| | | /** |
| | | * 添加数据 |
| | | * @param coursePackagePaymentConfig |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackagePaymentConfig/addCoursePackagePaymentConfig") |
| | | public void addCoursePackagePaymentConfig(@RequestBody CoursePackagePaymentConfig coursePackagePaymentConfig){ |
| | | coursePackagePaymentConfigService.save(coursePackagePaymentConfig); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据课包id获取价格配置 |
| | | * @param coursePackageId |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackagePaymentConfig/queryCoursePackagePaymentConfigList") |
| | | public List<CoursePackagePaymentConfig> queryCoursePackagePaymentConfigList(@RequestBody Integer coursePackageId){ |
| | | return coursePackagePaymentConfigService.list(new QueryWrapper<CoursePackagePaymentConfig>().eq("coursePackageId", coursePackageId)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * @param coursePackageId |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackagePaymentConfig/delCoursePackagePaymentConfig") |
| | | public void delCoursePackagePaymentConfig(@RequestBody Integer coursePackageId){ |
| | | coursePackagePaymentConfigService.remove(new QueryWrapper<CoursePackagePaymentConfig>().eq("coursePackageId", coursePackageId)); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.entity.*; |
| | | import com.dsh.course.feignclient.account.AppUserClient; |
| | | import com.dsh.course.feignclient.account.StudentClient; |
| | |
| | | import com.dsh.course.feignclient.other.StoreClient; |
| | | import com.dsh.course.feignclient.other.model.Store; |
| | | import com.dsh.course.model.BaseVo; |
| | | import com.dsh.course.model.QueryRegistrationRecord; |
| | | import com.dsh.course.model.QueryWalkInStudentList; |
| | | import com.dsh.course.model.BillingRequest; |
| | | import com.dsh.course.model.BillingRequestVo; |
| | | import com.dsh.course.model.dto.DiscountJsonDto; |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取课包报名信息列表 |
| | | * @param queryRegistrationRecord |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackagePayment/queryRegistrationRecord") |
| | | public Page<Map<String, Object>> queryRegistrationRecord(@RequestBody QueryRegistrationRecord queryRegistrationRecord){ |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(queryRegistrationRecord.getLimit(), queryRegistrationRecord.getOffset(), queryRegistrationRecord.getSort(), queryRegistrationRecord.getOrder()); |
| | | Page<Map<String, Object>> mapPage = page.setRecords(packagePaymentService.queryRegistrationRecord(page, queryRegistrationRecord)); |
| | | return mapPage; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取未预约排课学员列表 |
| | | * @param queryWalkInStudentList |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackagePayment/queryWalkInStudentList") |
| | | public Page<Map<String, Object>> queryWalkInStudentList(@RequestBody QueryWalkInStudentList queryWalkInStudentList){ |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(queryWalkInStudentList.getLimit(), queryWalkInStudentList.getOffset(), queryWalkInStudentList.getSort(), queryWalkInStudentList.getOrder()); |
| | | Page<Map<String, Object>> mapPage = page.setRecords(packagePaymentService.queryWalkInStudentList(page, queryWalkInStudentList)); |
| | | return mapPage; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据id获取数据 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackagePayment/queryCoursePackagePaymentById") |
| | | public TCoursePackagePayment queryCoursePackagePaymentById(@RequestBody Long id){ |
| | | return packagePaymentService.getById(id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * @param coursePackagePayment |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackagePayment/editCoursePackagePayment") |
| | | public void editCoursePackagePayment(TCoursePackagePayment coursePackagePayment){ |
| | | packagePaymentService.updateById(coursePackagePayment); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 上课主页-预约操作 |
| | |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | TCoursePackagePayment packagePayment = packagePaymentService.getOne(new LambdaQueryWrapper<TCoursePackagePayment>() |
| | | .eq(TCoursePackagePayment::getId,courseID ) |
| | | .eq(TCoursePackagePayment::getCoursePackageId,courseID ) |
| | | .eq(TCoursePackagePayment::getAppUserId,appUserId) |
| | | .eq(TCoursePackagePayment::getStudentId,stuId) |
| | | ); |
| | |
| | | coursePackageStudent.setInsertTime(simpleDateFormat.parse(time)); |
| | | cspsService.updateById(coursePackageStudent); |
| | | }else { |
| | | coursePackageStudent = new CoursePackageStudent(); |
| | | coursePackageStudent.setAppUserId(appUserId); |
| | | coursePackageStudent.setStudentId(stuId); |
| | | coursePackageStudent.setCoursePackageId(packagePayment.getCoursePackageId()); |
New file |
| | |
| | | package com.dsh.course.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.entity.CoursePackageScheduling; |
| | | import com.dsh.course.model.QueryCoursePackageSchedulingList; |
| | | import com.dsh.course.service.ICoursePackageSchedulingService; |
| | | import com.dsh.course.util.PageFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/11 10:58 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("") |
| | | public class CoursePackageSchedulingController { |
| | | |
| | | @Autowired |
| | | private ICoursePackageSchedulingService coursePackageSchedulingService; |
| | | |
| | | |
| | | /** |
| | | * 获取课包排课列表 |
| | | * @param queryCoursePackageSchedulingList |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackageScheduling/queryCoursePackageSchedulingList") |
| | | public Page<Map<String, Object>> queryCoursePackageSchedulingList(@RequestBody QueryCoursePackageSchedulingList queryCoursePackageSchedulingList){ |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(queryCoursePackageSchedulingList.getLimit(), queryCoursePackageSchedulingList.getOffset(), |
| | | queryCoursePackageSchedulingList.getSort(), queryCoursePackageSchedulingList.getOrder()); |
| | | Page<Map<String, Object>> mapPage = page.setRecords(coursePackageSchedulingService.queryCoursePackageSchedulingList(page, queryCoursePackageSchedulingList)); |
| | | return mapPage; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据id获取数据 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackageScheduling/queryCoursePackageSchedulingById") |
| | | public CoursePackageScheduling queryCoursePackageSchedulingById(@RequestBody Long id){ |
| | | return coursePackageSchedulingService.getById(id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 编辑数据 |
| | | * @param coursePackageScheduling |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackageScheduling/editCoursePackageScheduling") |
| | | public void editCoursePackageScheduling(@RequestBody CoursePackageScheduling coursePackageScheduling){ |
| | | coursePackageSchedulingService.updateById(coursePackageScheduling); |
| | | } |
| | | } |
New file |
| | |
| | | package com.dsh.course.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.entity.CoursePackageStudent; |
| | | import com.dsh.course.model.QueryCoursePackageStudent; |
| | | import com.dsh.course.model.QueryCoursePackageStudentList; |
| | | import com.dsh.course.service.CoursePackageStudentService; |
| | | import com.dsh.course.util.PageFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/11 17:39 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("") |
| | | public class CoursePackageStudentController { |
| | | |
| | | @Autowired |
| | | private CoursePackageStudentService coursePackageStudentService; |
| | | |
| | | |
| | | /** |
| | | * 根据排课id获取预约数据 |
| | | * @param queryCoursePackageStudentList |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackageStudent/queryCoursePackageStudentList") |
| | | public Page<Map<String, Object>> queryCoursePackageStudentList(@RequestBody QueryCoursePackageStudentList queryCoursePackageStudentList){ |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(queryCoursePackageStudentList.getLimit(), queryCoursePackageStudentList.getOffset(), |
| | | queryCoursePackageStudentList.getSort(), queryCoursePackageStudentList.getOrder()); |
| | | Page<Map<String, Object>> mapPage = page.setRecords(coursePackageStudentService.queryCoursePackageStudentList(page, queryCoursePackageStudentList)); |
| | | return mapPage; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据id获取数据 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackageStudent/queryCoursePackageStudentById") |
| | | public CoursePackageStudent queryCoursePackageStudentById(@RequestBody Long id){ |
| | | return coursePackageStudentService.getById(id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * @param coursePackageStudent |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackageStudent/editCoursePackageStudent") |
| | | public void editCoursePackageStudent(@RequestBody CoursePackageStudent coursePackageStudent){ |
| | | coursePackageStudentService.updateById(coursePackageStudent); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据排课id获取预约数据 |
| | | * @param coursePackageSchedulingId |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackageStudent/queryByCoursePackageSchedulingId") |
| | | public List<CoursePackageStudent> queryByCoursePackageSchedulingId(@RequestBody Long coursePackageSchedulingId){ |
| | | return coursePackageStudentService.list(new QueryWrapper<CoursePackageStudent>().eq("coursePackageSchedulingId", coursePackageSchedulingId)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取上课记录数据 |
| | | * @param queryCoursePackageStudent |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackageStudent/queryCoursePackageStudent") |
| | | public List<CoursePackageStudent> queryCoursePackageStudent(@RequestBody QueryCoursePackageStudent queryCoursePackageStudent){ |
| | | QueryWrapper<CoursePackageStudent> wrapper = new QueryWrapper<>(); |
| | | if(null != queryCoursePackageStudent.getAppUserId()){ |
| | | wrapper.eq("appUserId", queryCoursePackageStudent.getAppUserId()); |
| | | } |
| | | if(null != queryCoursePackageStudent.getStudentId()){ |
| | | wrapper.eq("studentId", queryCoursePackageStudent.getStudentId()); |
| | | } |
| | | if(null != queryCoursePackageStudent.getCoursePackageId()){ |
| | | wrapper.eq("coursePackageId", queryCoursePackageStudent.getCoursePackageId()); |
| | | } |
| | | if(null != queryCoursePackageStudent.getCoursePackagePaymentId()){ |
| | | wrapper.eq("coursePackagePaymentId", queryCoursePackageStudent.getCoursePackagePaymentId()); |
| | | } |
| | | if(null != queryCoursePackageStudent.getCoursePackageSchedulingId()){ |
| | | wrapper.eq("coursePackageSchedulingId", queryCoursePackageStudent.getCoursePackageSchedulingId()); |
| | | } |
| | | if(null != queryCoursePackageStudent.getSignInOrNot()){ |
| | | wrapper.eq("signInOrNot", queryCoursePackageStudent.getSignInOrNot()); |
| | | } |
| | | if(null != queryCoursePackageStudent.getReservationStatus()){ |
| | | wrapper.eq("reservationStatus", queryCoursePackageStudent.getReservationStatus()); |
| | | } |
| | | return coursePackageStudentService.list(wrapper); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加学员上课数据 |
| | | * @param coursePackageStudent |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackageStudent/addCoursePackageStudent") |
| | | public void addCoursePackageStudent(@RequestBody CoursePackageStudent coursePackageStudent){ |
| | | coursePackageStudentService.save(coursePackageStudent); |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | @TableField("coursePackagePaymentId") |
| | | private Long coursePackagePaymentId; |
| | | /** |
| | | * 排课记录id |
| | | */ |
| | | @TableField("coursePackageSchedulingId") |
| | | private Long coursePackageSchedulingId; |
| | | /** |
| | | * 消课凭证 |
| | | */ |
| | | @TableField("voucher") |
| | |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | |
| | | |
New file |
| | |
| | | package com.dsh.course.entity; |
| | | |
| | | 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.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 课包排课记录 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-06-30 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_course_package_scheduling") |
| | | public class CoursePackageScheduling extends Model<CoursePackageScheduling> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.NONE) |
| | | private Long id; |
| | | /** |
| | | * 课包id |
| | | */ |
| | | @TableField("coursePackageId") |
| | | private Integer coursePackageId; |
| | | /** |
| | | * 上课日期 |
| | | */ |
| | | @TableField("classDate") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date classDate; |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @TableField("endDate") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date endDate; |
| | | /** |
| | | * 课后练习课程id |
| | | */ |
| | | @TableField("courseId") |
| | | private Integer courseId; |
| | | /** |
| | | * 可获得积分 |
| | | */ |
| | | @TableField("integral") |
| | | private Integer integral; |
| | | /** |
| | | * 消课凭证 |
| | | */ |
| | | @TableField("cancelClasses") |
| | | private String cancelClasses; |
| | | /** |
| | | * 扣除课时 |
| | | */ |
| | | @TableField("deductClassHour") |
| | | private Integer deductClassHour; |
| | | /** |
| | | * 状态(1=未开始,2=已开始,3=已结束,4=已取消) |
| | | */ |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
| | |
| | | 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; |
| | |
| | | @TableField("coursePackagePaymentId") |
| | | private Long coursePackagePaymentId; |
| | | /** |
| | | * 排课记录id |
| | | */ |
| | | @TableField("coursePackageSchedulingId") |
| | | private Long coursePackageSchedulingId; |
| | | /** |
| | | * 到课状态(0=否,1=是) |
| | | */ |
| | | @TableField("signInOrNot") |
| | |
| | | @TableField("reservationStatus") |
| | | private Integer reservationStatus; |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | |
| | | |
| | |
| | | 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; |
| | |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | |
| | | |
| | |
| | | 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; |
| | |
| | | @TableField("absencesNumber") |
| | | private Integer absencesNumber; |
| | | /** |
| | | * 退课课时 |
| | | */ |
| | | @TableField("dropoutsNumber") |
| | | private Integer dropoutsNumber; |
| | | /** |
| | | * 支付用户类型(1=用户,2=管理员) |
| | | */ |
| | | @TableField("payUserType") |
| | |
| | | * 退课时间 |
| | | */ |
| | | @TableField("withdrawalTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date withdrawalTime; |
| | | /** |
| | | * 退课凭证 |
| | |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | |
| | | } |
| | |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/6/29 14:09 |
| | |
| | | */ |
| | | @PostMapping("/base/appUser/updateAppUser") |
| | | void updateAppUser(AppUser appUser); |
| | | |
| | | |
| | | /** |
| | | * 根据名称模糊查询用户信息 |
| | | * @param name |
| | | * @return |
| | | */ |
| | | @PostMapping("/appUser/queryAppUserListByName") |
| | | List<AppUser> queryAppUserListByName(String name); |
| | | } |
| | |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/7/4 23:38 |
| | |
| | | */ |
| | | @PostMapping("/student/queryStudentById") |
| | | Student queryStudentById(Integer id); |
| | | |
| | | |
| | | /** |
| | | * 根据名称模糊搜索数据 |
| | | * @param name |
| | | * @return |
| | | */ |
| | | @PostMapping("/student/queryStudentListByName") |
| | | List<Student> queryStudentListByName(String name); |
| | | } |
New file |
| | |
| | | package com.dsh.course.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.entity.CoursePackageScheduling; |
| | | import com.dsh.course.model.QueryCoursePackageSchedulingList; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/11 10:55 |
| | | */ |
| | | public interface CoursePackageSchedulingMapper extends BaseMapper<CoursePackageScheduling> { |
| | | |
| | | |
| | | /** |
| | | * 获取课包排课数据 |
| | | * @param page |
| | | * @param queryCoursePackageSchedulingList |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> queryCoursePackageSchedulingList(Page<Map<String, Object>> page, @Param("item") QueryCoursePackageSchedulingList queryCoursePackageSchedulingList); |
| | | } |
| | |
| | | package com.dsh.course.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.entity.CoursePackageStudent; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | public interface CoursePackageStudentMapper extends BaseMapper<CoursePackageStudent> { |
| | | |
| | | |
| | | /** |
| | | * 获取排课预约信息 |
| | | * @param page |
| | | * @param coursePackageSchedulingId |
| | | * @param userId |
| | | * @param studentId |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> queryCoursePackageStudentList(Page<Map<String, Object>> page, @Param("coursePackageSchedulingId") Long coursePackageSchedulingId, |
| | | @Param("userId") List<Integer> userId, @Param("studentId") List<Integer> studentId); |
| | | } |
| | |
| | | import com.dsh.course.entity.TCoursePackage; |
| | | import com.dsh.course.feignclient.model.CourseOfStoreVo; |
| | | import com.dsh.course.model.QueryCoursePackageLists; |
| | | import com.dsh.course.model.QueryExamineCoursePackageLists; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | */ |
| | | List<Map<String, Object>> queryCoursePackageLists(Page<Map<String, Object>> page, @Param("item") QueryCoursePackageLists queryCoursePackageLists); |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取课包审核列表 |
| | | * @param page |
| | | * @param queryExamineCoursePackageLists |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> queryExamineCoursePackageLists(Page<Map<String, Object>> page, @Param("item") QueryExamineCoursePackageLists queryExamineCoursePackageLists); |
| | | |
| | | } |
| | |
| | | package com.dsh.course.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.entity.TCoursePackagePayment; |
| | | import com.dsh.course.model.QueryRegistrationRecord; |
| | | import com.dsh.course.model.BillingRequest; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | @Param("monthStart")String monthStart, |
| | | @Param("monthEnd")String monthEnd); |
| | | |
| | | |
| | | /** |
| | | * 获取课包报名信息 |
| | | * @param page |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> queryRegistrationRecord(Page<Map<String, Object>> page, @Param("coursePackageId") Integer coursePackageId, |
| | | @Param("userIds") List<Integer> userIds, @Param("studentIds") List<Integer> studentIds); |
| | | |
| | | |
| | | /** |
| | | * 获取未预约排课学员列表 |
| | | * @param page |
| | | * @param coursePackagePaymentId |
| | | * @param userIds |
| | | * @param studentIds |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> queryWalkInStudentList(Page<Map<String, Object>> page, @Param("coursePackageId") Integer coursePackageId, @Param("coursePackagePaymentId") List<Long> coursePackagePaymentId, |
| | | @Param("userIds") List<Integer> userIds, @Param("studentIds") List<Integer> studentIds); |
| | | } |
New file |
| | |
| | | package com.dsh.course.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/11 11:00 |
| | | */ |
| | | @Data |
| | | public class QueryCoursePackageSchedulingList { |
| | | /** |
| | | * 课包id |
| | | */ |
| | | private Integer coursePackageId; |
| | | |
| | | private String order; |
| | | private Integer offset; |
| | | private Integer limit; |
| | | private String sort; |
| | | } |
New file |
| | |
| | | package com.dsh.course.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/12 3:12 |
| | | */ |
| | | @Data |
| | | public class QueryCoursePackageStudent { |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Integer appUserId; |
| | | /** |
| | | * 学员id |
| | | */ |
| | | private Integer studentId; |
| | | /** |
| | | * 课包id |
| | | */ |
| | | private Integer coursePackageId; |
| | | /** |
| | | * 课包购买记录id |
| | | */ |
| | | private Long coursePackagePaymentId; |
| | | /** |
| | | * 排课记录id |
| | | */ |
| | | private Long coursePackageSchedulingId; |
| | | /** |
| | | * 到课状态(0=否,1=是) |
| | | */ |
| | | private Integer signInOrNot; |
| | | /** |
| | | * 预约状态(0=取消,1=预约) |
| | | */ |
| | | private Integer reservationStatus; |
| | | } |
New file |
| | |
| | | package com.dsh.course.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/11 17:07 |
| | | */ |
| | | @Data |
| | | public class QueryCoursePackageStudentList { |
| | | /** |
| | | * 排课id |
| | | */ |
| | | private Long coursePackageSchedulingId; |
| | | /** |
| | | * 用户姓名 |
| | | */ |
| | | private String userName; |
| | | /** |
| | | * 学员姓名 |
| | | */ |
| | | private String studentName; |
| | | |
| | | private String order; |
| | | private Integer offset; |
| | | private Integer limit; |
| | | private String sort; |
| | | } |
New file |
| | |
| | | package com.dsh.course.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/13 3:22 |
| | | */ |
| | | @Data |
| | | public class QueryExamineCoursePackageLists { |
| | | /** |
| | | * 省编号 |
| | | */ |
| | | private String provinceCode; |
| | | /** |
| | | * 市编号 |
| | | */ |
| | | private String cityCode; |
| | | /** |
| | | * 课程类型id |
| | | */ |
| | | private Integer coursePackageTypeId; |
| | | /** |
| | | * 课程名称 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 审核状态(1=待审核,2=已同意,3=已拒绝) |
| | | */ |
| | | private Integer auditStatus; |
| | | |
| | | private String order; |
| | | private Integer offset; |
| | | private Integer limit; |
| | | private String sort; |
| | | } |
New file |
| | |
| | | package com.dsh.course.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/10 19:47 |
| | | */ |
| | | @Data |
| | | public class QueryRegistrationRecord { |
| | | /** |
| | | * 课程id |
| | | */ |
| | | private Integer coursePackageId; |
| | | /** |
| | | * 用户名称 |
| | | */ |
| | | private String userName; |
| | | /** |
| | | * 学员名称 |
| | | */ |
| | | private String studentName; |
| | | |
| | | private String order; |
| | | private Integer offset; |
| | | private Integer limit; |
| | | private String sort; |
| | | } |
New file |
| | |
| | | package com.dsh.course.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/12 2:46 |
| | | */ |
| | | @Data |
| | | public class QueryWalkInStudentList { |
| | | /** |
| | | * 课程id |
| | | */ |
| | | private Long coursePackageSchedulingId; |
| | | /** |
| | | * 用户名称 |
| | | */ |
| | | private String userName; |
| | | /** |
| | | * 学员名称 |
| | | */ |
| | | private String studentName; |
| | | |
| | | private String order; |
| | | private Integer offset; |
| | | private Integer limit; |
| | | private String sort; |
| | | } |
New file |
| | |
| | | package com.dsh.course.model; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/11 14:05 |
| | | */ |
| | | public enum WeekEnum { |
| | | Sunday(1, "周日"), |
| | | Monday(2, "周一"), |
| | | Tuesday(3, "周二"), |
| | | Wednesday(4, "周三"), |
| | | Thursday(5, "周四"), |
| | | Friday(6, "周五"), |
| | | Saturday(7, "周六"); |
| | | |
| | | |
| | | WeekEnum(Integer week, String chineseName) { |
| | | this.week = week; |
| | | this.chineseName = chineseName; |
| | | } |
| | | |
| | | private Integer week; |
| | | private String chineseName; |
| | | |
| | | public Integer getWeek() { |
| | | return week; |
| | | } |
| | | |
| | | public void setWeek(Integer week) { |
| | | this.week = week; |
| | | } |
| | | |
| | | public String getChineseName() { |
| | | return chineseName; |
| | | } |
| | | |
| | | public void setChineseName(String chineseName) { |
| | | this.chineseName = chineseName; |
| | | } |
| | | |
| | | |
| | | public static WeekEnum getWeekEnum(Integer week){ |
| | | WeekEnum[] values = WeekEnum.values(); |
| | | for (WeekEnum value : values) { |
| | | if(week == value.getWeek()){ |
| | | return value; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.dsh.course.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.course.entity.CoursePackageScheduling; |
| | | |
| | | /** |
| | | * <p> |
| | | * 课包排课 服务类 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-06-30 |
| | | */ |
| | | public interface CoursePackageSchedulingService extends IService<CoursePackageScheduling> { |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.dsh.course.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.course.entity.CoursePackageStudent; |
| | | import com.dsh.course.model.QueryCoursePackageStudentList; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | public interface CoursePackageStudentService extends IService<CoursePackageStudent> { |
| | | |
| | | |
| | | /** |
| | | * 获取排课预约数据 |
| | | * @param queryCoursePackageStudentList |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> queryCoursePackageStudentList(Page<Map<String, Object>> page, QueryCoursePackageStudentList queryCoursePackageStudentList); |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.course.entity.CoursePackageScheduling; |
| | | import com.dsh.course.model.QueryCoursePackageSchedulingList; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/11 10:57 |
| | | */ |
| | | public interface ICoursePackageSchedulingService extends IService<CoursePackageScheduling> { |
| | | |
| | | |
| | | /** |
| | | * 获取课包排课数据 |
| | | * @param page |
| | | * @param queryCoursePackageSchedulingList |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> queryCoursePackageSchedulingList(Page<Map<String, Object>> page, QueryCoursePackageSchedulingList queryCoursePackageSchedulingList); |
| | | |
| | | |
| | | /** |
| | | * 定时任务添加排课数据 |
| | | */ |
| | | void taskAddData(); |
| | | |
| | | |
| | | /** |
| | | * 定时修改状态 |
| | | */ |
| | | void taskSetStatus(); |
| | | } |
| | |
| | | package com.dsh.course.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.course.entity.TCoursePackagePayment; |
| | | import com.dsh.course.feignclient.model.RecordAppoint; |
| | | import com.dsh.course.model.QueryRegistrationRecord; |
| | | import com.dsh.course.model.QueryWalkInStudentList; |
| | | import com.dsh.course.model.BillingRequest; |
| | | import com.dsh.course.model.vo.RegisterCourseVo; |
| | | import com.dsh.course.model.vo.request.ClasspaymentRequest; |
| | |
| | | import com.dsh.course.util.ResultUtil; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | |
| | | List<BillingRequest> queryAmountDatas(Integer appUserId, String monthStart, String monthEnd); |
| | | |
| | | |
| | | /** |
| | | * 获取课包报名信息 |
| | | * @param page |
| | | * @param queryRegistrationRecord |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> queryRegistrationRecord(Page<Map<String, Object>> page, QueryRegistrationRecord queryRegistrationRecord); |
| | | |
| | | |
| | | /** |
| | | * 获取未预约排课学员列表 |
| | | * @param page |
| | | * @param queryWalkInStudentList |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> queryWalkInStudentList(Page<Map<String, Object>> page, QueryWalkInStudentList queryWalkInStudentList); |
| | | } |
| | |
| | | import com.dsh.course.feignclient.model.CourseOfStoreVo; |
| | | import com.dsh.course.model.*; |
| | | import com.dsh.course.util.ResultUtil; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> queryCoursePackageLists(Page<Map<String, Object>> page, QueryCoursePackageLists queryCoursePackageLists); |
| | | |
| | | |
| | | /** |
| | | * 添加课包 |
| | | * @param coursePackage |
| | | * @return |
| | | */ |
| | | Integer addCoursePackage(TCoursePackage coursePackage); |
| | | |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * @param coursePackage |
| | | */ |
| | | void updateCoursePackageById(TCoursePackage coursePackage); |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取课包审核列表 |
| | | * @param queryExamineCoursePackageLists |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> queryExamineCoursePackageLists(Page<Map<String, Object>> page, QueryExamineCoursePackageLists queryExamineCoursePackageLists); |
| | | } |
New file |
| | |
| | | package com.dsh.course.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.course.entity.CoursePackageScheduling; |
| | | import com.dsh.course.entity.CoursePackageStudent; |
| | | import com.dsh.course.entity.TCoursePackage; |
| | | import com.dsh.course.mapper.CoursePackageSchedulingMapper; |
| | | import com.dsh.course.model.QueryCoursePackageSchedulingList; |
| | | import com.dsh.course.service.CoursePackageStudentService; |
| | | import com.dsh.course.service.ICoursePackageSchedulingService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/11 10:58 |
| | | */ |
| | | @Service |
| | | public class CoursePackageSchedulingServiceImpl extends ServiceImpl<CoursePackageSchedulingMapper, CoursePackageScheduling> implements ICoursePackageSchedulingService { |
| | | |
| | | @Autowired |
| | | private CoursePackageStudentService coursePackageStudentService; |
| | | |
| | | @Autowired |
| | | private TCoursePackageServiceImpl coursePackageService; |
| | | |
| | | @Resource |
| | | private CoursePackageSchedulingMapper coursePackageSchedulingMapper; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取课包排课数据 |
| | | * @param page |
| | | * @param queryCoursePackageSchedulingList |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> queryCoursePackageSchedulingList(Page<Map<String, Object>> page, QueryCoursePackageSchedulingList queryCoursePackageSchedulingList) { |
| | | List<Map<String, Object>> list = this.baseMapper.queryCoursePackageSchedulingList(page, queryCoursePackageSchedulingList); |
| | | for (Map<String, Object> map : list) { |
| | | Long id = Long.valueOf(map.get("id").toString()); |
| | | int count = coursePackageStudentService.count(new QueryWrapper<CoursePackageStudent>().eq("coursePackageSchedulingId", id).eq("reservationStatus", 1)); |
| | | map.put("registered", count); |
| | | int count1 = coursePackageStudentService.count(new QueryWrapper<CoursePackageStudent>().eq("coursePackageSchedulingId", id).eq("signInOrNot", 1)); |
| | | map.put("actualArrival", count1); |
| | | map.put("nonArrival", count - count1); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 定时添加排课数据 |
| | | */ |
| | | @Override |
| | | public void taskAddData() { |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | try { |
| | | List<TCoursePackage> list = coursePackageService.list(new QueryWrapper<TCoursePackage>().eq("status", 2).eq("auditStatus", 2).eq("state", 1)); |
| | | for (TCoursePackage tCoursePackage : list) { |
| | | CoursePackageScheduling coursePackageScheduling = coursePackageSchedulingMapper.selectOne(new QueryWrapper<CoursePackageScheduling>().eq("coursePackageId", tCoursePackage.getId()).last(" order by classDate desc limit 0, 1")); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | if(null != coursePackageScheduling){ |
| | | calendar.setTime(sdf1.parse(sdf.format(coursePackageScheduling.getClassDate()) + " 00:00:00")); |
| | | calendar.set(Calendar.DAY_OF_YEAR, calendar.get(Calendar.DAY_OF_YEAR) + 1); |
| | | }else{ |
| | | calendar.setTime(sdf1.parse(sdf.format(new Date()) + " 00:00:00")); |
| | | } |
| | | coursePackageScheduling = new CoursePackageScheduling(); |
| | | coursePackageScheduling.setCoursePackageId(tCoursePackage.getId()); |
| | | coursePackageScheduling.setClassDate(calendar.getTime()); |
| | | coursePackageScheduling.setStatus(1); |
| | | coursePackageSchedulingMapper.insert(coursePackageScheduling); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | }).start(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 定时修改状态 |
| | | */ |
| | | @Override |
| | | public void taskSetStatus() { |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | //开始数据 |
| | | List<CoursePackageScheduling> coursePackageSchedulings = coursePackageSchedulingMapper.selectList(new QueryWrapper<CoursePackageScheduling>().eq("status", 1).last(" and now() >= classDate and now() < endDate")); |
| | | for (CoursePackageScheduling coursePackageScheduling : coursePackageSchedulings) { |
| | | coursePackageScheduling.setStatus(2); |
| | | coursePackageScheduling.setCoursePackageId(null); |
| | | coursePackageSchedulingMapper.updateById(coursePackageScheduling); |
| | | |
| | | TCoursePackage coursePackage = coursePackageService.getById(coursePackageScheduling.getCoursePackageId()); |
| | | if(coursePackage.getStatus() == 1){ |
| | | coursePackage.setStatus(2); |
| | | coursePackageService.updateById(coursePackage); |
| | | } |
| | | } |
| | | |
| | | //结束数据 |
| | | coursePackageSchedulings = coursePackageSchedulingMapper.selectList(new QueryWrapper<CoursePackageScheduling>().eq("status", 2).last(" and now() >= endDate")); |
| | | for (CoursePackageScheduling coursePackageScheduling : coursePackageSchedulings) { |
| | | coursePackageScheduling.setStatus(3); |
| | | coursePackageScheduling.setCoursePackageId(null); |
| | | coursePackageSchedulingMapper.updateById(coursePackageScheduling); |
| | | } |
| | | } |
| | | }).start(); |
| | | } |
| | | } |
| | |
| | | package com.dsh.course.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.course.entity.CoursePackageStudent; |
| | | import com.dsh.course.feignclient.account.AppUserClient; |
| | | import com.dsh.course.feignclient.account.StudentClient; |
| | | import com.dsh.course.feignclient.account.model.AppUser; |
| | | import com.dsh.course.feignclient.account.model.Student; |
| | | import com.dsh.course.mapper.CoursePackageStudentMapper; |
| | | import com.dsh.course.model.QueryCoursePackageStudentList; |
| | | import com.dsh.course.service.CoursePackageStudentService; |
| | | import com.dsh.course.util.ToolUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class CoursePackageStudentServiceImpl extends ServiceImpl<CoursePackageStudentMapper, CoursePackageStudent> implements CoursePackageStudentService { |
| | | |
| | | @Resource |
| | | private AppUserClient appUserClient; |
| | | |
| | | @Resource |
| | | private StudentClient studentClient; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取排课预约数据 |
| | | * @param queryCoursePackageStudentList |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> queryCoursePackageStudentList(Page<Map<String, Object>> page, QueryCoursePackageStudentList queryCoursePackageStudentList) { |
| | | List<Integer> userId = null; |
| | | List<Integer> studentId = null; |
| | | if(ToolUtil.isNotEmpty(queryCoursePackageStudentList.getUserName())){ |
| | | List<AppUser> appUsers = appUserClient.queryAppUserListByName(queryCoursePackageStudentList.getUserName()); |
| | | if(appUsers.size() > 0){ |
| | | userId = appUsers.stream().map(AppUser::getId).collect(Collectors.toList()); |
| | | } |
| | | } |
| | | if(ToolUtil.isNotEmpty(queryCoursePackageStudentList.getStudentName())){ |
| | | List<Student> students = studentClient.queryStudentListByName(queryCoursePackageStudentList.getStudentName()); |
| | | if(students.size() > 0){ |
| | | studentId = students.stream().map(Student::getId).collect(Collectors.toList()); |
| | | } |
| | | } |
| | | List<Map<String, Object>> list = this.baseMapper.queryCoursePackageStudentList(page, queryCoursePackageStudentList.getCoursePackageSchedulingId(), userId, studentId); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy"); |
| | | Integer now = Integer.valueOf(sdf.format(new Date())); |
| | | for (Map<String, Object> map : list) { |
| | | Integer appUserId = Integer.valueOf(map.get("appUserId").toString()); |
| | | Integer student_Id = Integer.valueOf(map.get("studentId").toString()); |
| | | AppUser appUser = appUserClient.queryAppUser(appUserId); |
| | | Student student = studentClient.queryStudentById(student_Id); |
| | | map.put("userName", appUser.getName()); |
| | | map.put("phone", student.getPhone()); |
| | | map.put("studentName", student.getName()); |
| | | map.put("age", null != student.getBirthday() ? now - Integer.valueOf(sdf.format(student.getBirthday())) : "-"); |
| | | map.put("sex", student.getSex()); |
| | | } |
| | | return list; |
| | | } |
| | | } |
| | |
| | | import com.alipay.api.domain.Person; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.course.entity.*; |
| | | import com.dsh.course.feignclient.account.AppUserClient; |
| | | import com.dsh.course.feignclient.account.CoachClient; |
| | | import com.dsh.course.feignclient.account.StudentClient; |
| | | import com.dsh.course.feignclient.account.model.AppUser; |
| | | import com.dsh.course.feignclient.account.model.Coach; |
| | | import com.dsh.course.feignclient.account.model.Student; |
| | | import com.dsh.course.feignclient.activity.BenefitVideoClient; |
| | | import com.dsh.course.feignclient.activity.CouponClient; |
| | | import com.dsh.course.feignclient.activity.model.BenefitsVideos; |
| | |
| | | import com.dsh.course.feignclient.other.model.Store; |
| | | import com.dsh.course.mapper.*; |
| | | import com.dsh.course.model.BillingRequest; |
| | | import com.dsh.course.model.QueryRegistrationRecord; |
| | | import com.dsh.course.model.QueryWalkInStudentList; |
| | | import com.dsh.course.model.dto.DiscountJsonDto; |
| | | import com.dsh.course.model.vo.RegisterCourseVo; |
| | | import com.dsh.course.model.vo.request.ClasspaymentRequest; |
| | |
| | | import com.dsh.course.model.vo.response.AppUserVideoResponse; |
| | | import com.dsh.course.model.vo.response.CourseDetailsResponse; |
| | | import com.dsh.course.model.vo.response.CourseOfVideoResponse; |
| | | import com.dsh.course.service.ICoursePackageSchedulingService; |
| | | import com.dsh.course.service.TCoursePackagePaymentService; |
| | | import com.dsh.course.util.*; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | @Resource |
| | | private BenefitVideoClient bfvoClient; |
| | | |
| | | |
| | | @Resource |
| | | private UserVideoDetailsMapper uvdmapper; |
| | | |
| | |
| | | @Resource |
| | | private TCoursePackageDiscountMapper tcpdMapper; |
| | | |
| | | |
| | | @Resource |
| | | private CoursePackagePaymentConfigMapper cpConfigMapper; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private AppUserClient appuClient; |
| | | |
| | | @Resource |
| | | private StudentClient studentClient; |
| | | |
| | | @Autowired |
| | | private ICoursePackageSchedulingService coursePackageSchedulingService; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取课包报名信息 |
| | | * @param page |
| | | * @param queryRegistrationRecord |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> queryRegistrationRecord(Page<Map<String, Object>> page, QueryRegistrationRecord queryRegistrationRecord) { |
| | | Integer coursePackageId = queryRegistrationRecord.getCoursePackageId(); |
| | | String userName = queryRegistrationRecord.getUserName(); |
| | | List<Integer> userIds = null; |
| | | List<Integer> studentIds = null; |
| | | if(ToolUtil.isNotEmpty(userName)){ |
| | | List<AppUser> appUsers = appuClient.queryAppUserListByName(userName); |
| | | if(appUsers.size() > 0){ |
| | | userIds = appUsers.stream().map(AppUser::getId).collect(Collectors.toList()); |
| | | } |
| | | } |
| | | String studentName = queryRegistrationRecord.getStudentName(); |
| | | if(ToolUtil.isNotEmpty(studentName)){ |
| | | List<Student> students = studentClient.queryStudentListByName(studentName); |
| | | if(students.size() > 0){ |
| | | studentIds = students.stream().map(Student::getId).collect(Collectors.toList()); |
| | | } |
| | | } |
| | | List<Map<String, Object>> list = this.baseMapper.queryRegistrationRecord(page, 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 = Integer.valueOf(map.get("studentId").toString()); |
| | | AppUser appUser = appuClient.queryAppUser(appUserId); |
| | | map.put("userName", null != appUser ? appUser.getName() : ""); |
| | | map.put("phone", null != appUser ? appUser.getPhone() : ""); |
| | | Student student = studentClient.queryStudentById(studentId); |
| | | map.put("studentName", null != student ? student.getName() : ""); |
| | | Integer integer = cpsMapper.selectCount(new QueryWrapper<CoursePackageStudent>().eq("appUserId", appUserId) |
| | | .eq("studentId", studentId).eq("coursePackagePaymentId", id).eq("signInOrNot", 1)); |
| | | map.put("already", integer); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取未预约排课学员列表 |
| | | * @param page |
| | | * @param queryWalkInStudentList |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> queryWalkInStudentList(Page<Map<String, Object>> page, QueryWalkInStudentList queryWalkInStudentList) { |
| | | Long coursePackageSchedulingId = queryWalkInStudentList.getCoursePackageSchedulingId(); |
| | | CoursePackageScheduling coursePackageScheduling = coursePackageSchedulingService.getById(coursePackageSchedulingId); |
| | | String userName = queryWalkInStudentList.getUserName(); |
| | | List<Integer> userIds = null; |
| | | List<Integer> studentIds = null; |
| | | if(ToolUtil.isNotEmpty(userName)){ |
| | | List<AppUser> appUsers = appuClient.queryAppUserListByName(userName); |
| | | if(appUsers.size() > 0){ |
| | | userIds = appUsers.stream().map(AppUser::getId).collect(Collectors.toList()); |
| | | } |
| | | } |
| | | String studentName = queryWalkInStudentList.getStudentName(); |
| | | if(ToolUtil.isNotEmpty(studentName)){ |
| | | List<Student> students = studentClient.queryStudentListByName(studentName); |
| | | if(students.size() > 0){ |
| | | studentIds = students.stream().map(Student::getId).collect(Collectors.toList()); |
| | | } |
| | | } |
| | | List<Long> coursePackagePaymentId = null; |
| | | List<CoursePackageStudent> coursePackageStudents = cpsMapper.selectList(new QueryWrapper<CoursePackageStudent>().eq("coursePackageSchedulingId", coursePackageSchedulingId).eq("reservationStatus", 1)); |
| | | if(coursePackageStudents.size() > 0){ |
| | | coursePackagePaymentId = coursePackageStudents.stream().map(CoursePackageStudent::getCoursePackagePaymentId).collect(Collectors.toList()); |
| | | } |
| | | |
| | | List<Map<String, Object>> list = this.baseMapper.queryWalkInStudentList(page, coursePackageScheduling.getCoursePackageId(), coursePackagePaymentId, userIds, studentIds); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy"); |
| | | Integer now = Integer.valueOf(sdf.format(new Date())); |
| | | for (Map<String, Object> map : list) { |
| | | Integer appUserId = Integer.valueOf(map.get("appUserId").toString()); |
| | | Integer student_Id = Integer.valueOf(map.get("studentId").toString()); |
| | | AppUser appUser = appuClient.queryAppUser(appUserId); |
| | | Student student = studentClient.queryStudentById(student_Id); |
| | | map.put("userName", appUser.getName()); |
| | | map.put("phone", student.getPhone()); |
| | | map.put("studentName", student.getName()); |
| | | map.put("age", null != student.getBirthday() ? now - Integer.valueOf(sdf.format(student.getBirthday())) : "-"); |
| | | map.put("sex", student.getSex()); |
| | | } |
| | | return list; |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.course.entity.CoursePackagePaymentConfig; |
| | | import com.dsh.course.entity.TCoursePackage; |
| | | import com.dsh.course.entity.TCoursePackageDiscount; |
| | | import com.dsh.course.entity.TCoursePackagePayment; |
| | | import com.dsh.course.entity.*; |
| | | import com.dsh.course.feignclient.account.AppUserClient; |
| | | import com.dsh.course.feignclient.account.StudentClient; |
| | | import com.dsh.course.feignclient.account.model.AppUser; |
| | |
| | | import com.dsh.course.mapper.TCoursePackageMapper; |
| | | import com.dsh.course.feignclient.model.CourseOfStoreVo; |
| | | import com.dsh.course.model.*; |
| | | import com.dsh.course.service.ICoursePackagePaymentConfigService; |
| | | import com.dsh.course.service.TCoursePackageDiscountService; |
| | | import com.dsh.course.service.TCoursePackagePaymentService; |
| | | import com.dsh.course.service.TCoursePackageService; |
| | | import com.dsh.course.service.*; |
| | | import com.dsh.course.util.*; |
| | | import com.dsh.course.util.httpClinet.HttpResult; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private PayMoneyUtil payMoneyUtil; |
| | | |
| | | @Autowired |
| | | private ICoursePackageSchedulingService coursePackageSchedulingService; |
| | | |
| | | @Autowired |
| | | private CoursePackageStudentService coursePackageStudentService; |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加课包 |
| | | * @param coursePackage |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Integer addCoursePackage(TCoursePackage coursePackage) { |
| | | try { |
| | | this.baseMapper.insert(coursePackage); |
| | | //生成排课数据 |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | Date date = sdf1.parse(sdf.format(new Date()) + " 00:00:00"); |
| | | List<String> list = Arrays.asList(coursePackage.getClassWeeks().split(";")); |
| | | String classStartTime = coursePackage.getClassStartTime(); |
| | | String[] split = classStartTime.split(":"); |
| | | String classEndTime = coursePackage.getClassEndTime(); |
| | | String[] split1 = classEndTime.split(":"); |
| | | Calendar s = Calendar.getInstance(); |
| | | s.setTime(date); |
| | | s.set(Calendar.DAY_OF_YEAR, s.get(Calendar.DAY_OF_YEAR) + 1); |
| | | s.set(Calendar.HOUR_OF_DAY, Integer.valueOf(split[0])); |
| | | s.set(Calendar.MINUTE, Integer.valueOf(split[1])); |
| | | s.set(Calendar.SECOND, 0); |
| | | |
| | | Calendar e = Calendar.getInstance(); |
| | | e.setTime(date); |
| | | e.set(Calendar.DAY_OF_YEAR, s.get(Calendar.DAY_OF_YEAR) + 13); |
| | | long timeInMillis = e.getTimeInMillis(); |
| | | |
| | | while (true){ |
| | | int w = s.get(Calendar.DAY_OF_WEEK); |
| | | WeekEnum weekEnum = WeekEnum.getWeekEnum(w); |
| | | if(list.contains(weekEnum.getChineseName())){ |
| | | Calendar classDate = Calendar.getInstance(); |
| | | classDate.setTime(s.getTime()); |
| | | classDate.set(Calendar.HOUR_OF_DAY, Integer.valueOf(split[0])); |
| | | classDate.set(Calendar.MINUTE, Integer.valueOf(split[1])); |
| | | classDate.set(Calendar.SECOND, 0); |
| | | |
| | | Calendar endDate = Calendar.getInstance(); |
| | | endDate.setTime(s.getTime()); |
| | | endDate.set(Calendar.HOUR_OF_DAY, Integer.valueOf(split1[0])); |
| | | endDate.set(Calendar.MINUTE, Integer.valueOf(split1[1])); |
| | | endDate.set(Calendar.SECOND, 0); |
| | | |
| | | CoursePackageScheduling coursePackageScheduling = new CoursePackageScheduling(); |
| | | coursePackageScheduling.setCoursePackageId(coursePackage.getId()); |
| | | coursePackageScheduling.setClassDate(classDate.getTime()); |
| | | coursePackageScheduling.setEndDate(endDate.getTime()); |
| | | coursePackageScheduling.setStatus(1); |
| | | coursePackageSchedulingService.save(coursePackageScheduling); |
| | | } |
| | | s.set(Calendar.DAY_OF_YEAR, s.get(Calendar.DAY_OF_YEAR) + 1); |
| | | if(s.getTimeInMillis() > timeInMillis){ |
| | | break; |
| | | } |
| | | } |
| | | return coursePackage.getId(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * @param coursePackage |
| | | */ |
| | | @Override |
| | | public void updateCoursePackageById(TCoursePackage coursePackage) { |
| | | try { |
| | | List<CoursePackageStudent> coursePackageStudents = coursePackageStudentService.list(new QueryWrapper<CoursePackageStudent>().eq("coursePackageId", coursePackage.getId())); |
| | | List<Long> collect = coursePackageStudents.stream().map(CoursePackageStudent::getCoursePackageSchedulingId).collect(Collectors.toList()); |
| | | |
| | | QueryWrapper<CoursePackageScheduling> coursePackageSchedulingQueryWrapper = new QueryWrapper<CoursePackageScheduling>().eq("coursePackageId", coursePackage.getId()); |
| | | if(collect.size() > 0){ |
| | | coursePackageSchedulingQueryWrapper.notIn("id", collect); |
| | | } |
| | | coursePackageSchedulingService.remove(coursePackageSchedulingQueryWrapper); |
| | | |
| | | this.baseMapper.updateById(coursePackage); |
| | | //生成排课数据 |
| | | Date date = null; |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | CoursePackageScheduling coursePackageScheduling = coursePackageSchedulingService.getOne(new QueryWrapper<CoursePackageScheduling>().eq("coursePackageId", coursePackage.getId()).last(" and classDate > now() order by classDate desc limit 0, 1")); |
| | | if(null != coursePackageScheduling){ |
| | | date = sdf1.parse(sdf.format(coursePackageScheduling.getClassDate()) + " 00:00:00"); |
| | | }else{ |
| | | date = sdf1.parse(sdf.format(new Date()) + " 00:00:00"); |
| | | } |
| | | List<String> list = Arrays.asList(coursePackage.getClassWeeks().split(";")); |
| | | String classStartTime = coursePackage.getClassStartTime(); |
| | | String[] split = classStartTime.split(":"); |
| | | String classEndTime = coursePackage.getClassEndTime(); |
| | | String[] split1 = classEndTime.split(":"); |
| | | Calendar s = Calendar.getInstance(); |
| | | s.setTime(date); |
| | | s.set(Calendar.DAY_OF_YEAR, s.get(Calendar.DAY_OF_YEAR) + 1); |
| | | |
| | | Calendar e = Calendar.getInstance(); |
| | | e.setTime(date); |
| | | if(null != coursePackageScheduling){ |
| | | long time = sdf1.parse(sdf.format(new Date()) + " 00:00:00").getTime(); |
| | | int d = Long.valueOf(14L - ((s.getTimeInMillis() - time) / 86400000L)).intValue(); |
| | | e.set(Calendar.DAY_OF_YEAR, s.get(Calendar.DAY_OF_YEAR) + d); |
| | | }else{ |
| | | e.set(Calendar.DAY_OF_YEAR, s.get(Calendar.DAY_OF_YEAR) + 13); |
| | | } |
| | | long timeInMillis = e.getTimeInMillis(); |
| | | |
| | | while (true){ |
| | | int w = s.get(Calendar.DAY_OF_WEEK); |
| | | WeekEnum weekEnum = WeekEnum.getWeekEnum(w); |
| | | if(list.contains(weekEnum.getChineseName())){ |
| | | Calendar classDate = Calendar.getInstance(); |
| | | classDate.setTime(s.getTime()); |
| | | classDate.set(Calendar.HOUR_OF_DAY, Integer.valueOf(split[0])); |
| | | classDate.set(Calendar.MINUTE, Integer.valueOf(split[1])); |
| | | classDate.set(Calendar.SECOND, 0); |
| | | |
| | | Calendar endDate = Calendar.getInstance(); |
| | | endDate.setTime(s.getTime()); |
| | | endDate.set(Calendar.HOUR_OF_DAY, Integer.valueOf(split1[0])); |
| | | endDate.set(Calendar.MINUTE, Integer.valueOf(split1[1])); |
| | | endDate.set(Calendar.SECOND, 0); |
| | | |
| | | CoursePackageScheduling coursePackageScheduling1 = new CoursePackageScheduling(); |
| | | coursePackageScheduling1.setCoursePackageId(coursePackage.getId()); |
| | | coursePackageScheduling1.setClassDate(classDate.getTime()); |
| | | coursePackageScheduling1.setEndDate(endDate.getTime()); |
| | | coursePackageScheduling1.setStatus(1); |
| | | coursePackageSchedulingService.save(coursePackageScheduling1); |
| | | } |
| | | s.set(Calendar.DAY_OF_YEAR, s.get(Calendar.DAY_OF_YEAR) + 1); |
| | | if(s.getTimeInMillis() > timeInMillis){ |
| | | break; |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取课包审核列表 |
| | | * @param page |
| | | * @param queryExamineCoursePackageLists |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> queryExamineCoursePackageLists(Page<Map<String, Object>> page, QueryExamineCoursePackageLists queryExamineCoursePackageLists) { |
| | | List<Map<String, Object>> list = this.baseMapper.queryExamineCoursePackageLists(page, queryExamineCoursePackageLists); |
| | | for (Map<String, Object> map : list) { |
| | | Integer id = Integer.valueOf(map.get("id").toString()); |
| | | boolean cash = false; |
| | | boolean coin = false; |
| | | List<CoursePackagePaymentConfig> coursePackagePaymentConfigs = coursePackagePaymentConfigService.list(new QueryWrapper<CoursePackagePaymentConfig>().eq("coursePackageId", id)); |
| | | for (CoursePackagePaymentConfig coursePackagePaymentConfig : coursePackagePaymentConfigs) { |
| | | if(0 != coursePackagePaymentConfig.getCashPayment()){ |
| | | cash = true; |
| | | } |
| | | if(0 != coursePackagePaymentConfig.getPlayPaiCoin()){ |
| | | coin = true; |
| | | } |
| | | } |
| | | map.put("payType", (cash ? "现金支付" : "") + (coin ? cash ? "&玩湃币支付" : "玩湃币支付" : "")); |
| | | } |
| | | return list; |
| | | } |
| | | } |
New file |
| | |
| | | package com.dsh.course.util; |
| | | |
| | | import com.dsh.course.service.ICoursePackageSchedulingService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/11 15:01 |
| | | */ |
| | | @Component |
| | | public class TaskUtil { |
| | | |
| | | @Autowired |
| | | private ICoursePackageSchedulingService coursePackageSchedulingService; |
| | | |
| | | /** |
| | | * 每隔一分钟去处理的定时任务 |
| | | */ |
| | | @Scheduled(fixedRate = 60000) |
| | | public void taskMinute(){ |
| | | try { |
| | | //定时修改排课状态 |
| | | coursePackageSchedulingService.taskSetStatus(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 零时任务 |
| | | */ |
| | | @Scheduled(cron = "0 0 0 * * *") |
| | | public void zeroTask(){ |
| | | //定时添加排课数据 |
| | | coursePackageSchedulingService.taskAddData(); |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dsh.course.mapper.CoursePackageSchedulingMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.dsh.course.entity.CoursePackageScheduling"> |
| | | <id column="id" property="id" /> |
| | | <result column="coursePackageId" property="coursePackageId" /> |
| | | <result column="classDate" property="classDate" /> |
| | | <result column="courseId" property="courseId" /> |
| | | <result column="integral" property="integral" /> |
| | | <result column="cancelClasses" property="cancelClasses" /> |
| | | <result column="deductClassHour" property="deductClassHour" /> |
| | | <result column="status" property="status" /> |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | <select id="queryCoursePackageSchedulingList" resultType="map"> |
| | | select |
| | | CAST(id AS CHAR(20)) as id, |
| | | DATE_FORMAT(classDate, '%Y-%m-%d') as classDate, |
| | | courseId, |
| | | `status`, |
| | | cancelClasses, |
| | | deductClassHour, |
| | | integral |
| | | from t_course_package_scheduling where coursePackageId = #{item.coursePackageId} order by classDate desc |
| | | </select> |
| | | </mapper> |
| | |
| | | <mapper namespace="com.dsh.course.mapper.CoursePackageStudentMapper"> |
| | | |
| | | |
| | | |
| | | <select id="queryCoursePackageStudentList" resultType="map"> |
| | | select |
| | | CAST(id AS CHAR(20)) as id, |
| | | appUserId, |
| | | studentId, |
| | | signInOrNot, |
| | | reservationStatus |
| | | from t_course_package_student where coursePackageSchedulingId = #{coursePackageSchedulingId} |
| | | <if test="null != userId"> |
| | | and appUserId in |
| | | <foreach collection="appUserId" item="item" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="null != studentId"> |
| | | and studentId in |
| | | <foreach collection="studentId" item="item" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | order by insertTime desc |
| | | </select> |
| | | </mapper> |
| | |
| | | a.state |
| | | from t_course_package a |
| | | left join t_course_package_type b on (a.coursePackageTypeId = b.id) |
| | | where a.state != 3 |
| | | where a.state != 3 and a.auditStatus = 2 |
| | | <if test="null != item.provinceCode and '' != item.provinceCode"> |
| | | and a.provinceCode = #{item.provinceCode} |
| | | </if> |
| | |
| | | </if> |
| | | order by a.insertTime desc |
| | | </select> |
| | | |
| | | |
| | | <select id="queryExamineCoursePackageLists" resultType="map"> |
| | | select |
| | | a.id, |
| | | CONCAT(a.province, a.city) as city, |
| | | a.storeId, |
| | | b.`name` as coursePackageType, |
| | | a.`name`, |
| | | a.maxSubscribeNumber, |
| | | CONCAT('购买后', a.validDays, '天内有效') as validDays, |
| | | a.sort, |
| | | a.auditStatus |
| | | from t_course_package a |
| | | left join t_course_package_type b on (a.coursePackageTypeId = b.id) |
| | | where a.state = 1 and a.auditStatus != 2 |
| | | <if test="null != item.provinceCode and '' != item.provinceCode"> |
| | | and a.provinceCode = #{item.provinceCode} |
| | | </if> |
| | | <if test="null != item.cityCode and '' != item.cityCode"> |
| | | and a.cityCode = #{item.cityCode} |
| | | </if> |
| | | <if test="null != item.coursePackageTypeId"> |
| | | and a.coursePackageTypeId = #{item.coursePackageTypeId} |
| | | </if> |
| | | <if test="null != item.name and '' != item.name"> |
| | | and a.name line CONCAT('%', #{item.name}, '%') |
| | | </if> |
| | | <if test="null != item.auditStatus"> |
| | | and a.auditStatus = #{item.auditStatus} |
| | | </if> |
| | | order by a.insertTime desc |
| | | </select> |
| | | </mapper> |
| | |
| | | and appUserId = #{appUserId} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="queryRegistrationRecord" resultType="map"> |
| | | select |
| | | CAST(id AS CHAR(20)) as id, |
| | | appUserId, |
| | | studentId, |
| | | DATE_FORMAT(insertTime, '%Y-%m-%d %H:%i') as insertTime, |
| | | totalClassHours, |
| | | absencesNumber, |
| | | `status` |
| | | from t_course_package_payment where payStatus = 2 and state = 1 |
| | | <if test="null != coursePackageId"> |
| | | and coursePackageId = #{coursePackageId} |
| | | </if> |
| | | <if test="null != userIds"> |
| | | and appUserId in |
| | | <foreach collection="userIds" item="item" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="null != studentIds"> |
| | | and studentId in |
| | | <foreach collection="studentIds" item="item" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | order by insertTime desc |
| | | </select> |
| | | |
| | | |
| | | <select id="queryWalkInStudentList" resultType="map"> |
| | | select |
| | | CAST(id AS CHAR(20)) as id, |
| | | appUserId, |
| | | studentId |
| | | from t_course_package_payment where payStatus = 2 and state = 1 |
| | | <if test="null != coursePackageId"> |
| | | and coursePackageId = #{coursePackageId} |
| | | </if> |
| | | <if test="null != coursePackagePaymentId"> |
| | | and id not in |
| | | <foreach collection="coursePackagePaymentId" item="item" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="null != userIds"> |
| | | and appUserId in |
| | | <foreach collection="userIds" item="item" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="null != studentIds"> |
| | | and studentId in |
| | | <foreach collection="studentIds" item="item" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | order by insertTime desc |
| | | </select> |
| | | </mapper> |
| | |
| | | */ |
| | | @PostMapping("/coach/queryCoachByCity") |
| | | List<Coach> queryCoachByCity(String cityCode); |
| | | |
| | | |
| | | /** |
| | | * 根据id获取教练 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @PostMapping("/coach/queryCoachById") |
| | | Coach queryCoachById(Integer id); |
| | | } |
| | |
| | | package com.dsh.course.feignClient.account; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.account.model.*; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | |
| | | |
| | | @PostMapping("/userIntegralChanges/list") |
| | | List<UserIntegral> list(IntegralListQuery integralListQuery); |
| | | Page<UserIntegral> list(IntegralListQuery integralListQuery); |
| | | |
| | | } |
| | |
| | | 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 com.dsh.course.feignClient.activity.model.*; |
| | | import com.dsh.guns.modular.system.model.CouponDataVo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | @PostMapping("/base/coupon/insertIntoCouponData") |
| | | void insertIntoData(@RequestBody CouponDataVo dataVo); |
| | | |
| | | @PostMapping("/base/coupon/queryCity") |
| | | List<CouponCity> queryCity(Integer id); |
| | | @PostMapping("/base/coupon/queryStore") |
| | | List<Integer> queryStore(Integer id); |
| | | |
| | | @PostMapping("/base/coupon/listRecord") |
| | | List<Map<String,Object>> listRecord(CouponRecordQuery ofSearch); |
| | | |
| | | @PostMapping("/base/coupon/updateType") |
| | | void updateType(Long id); |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.activity; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.activity.model.IntegralGoodsOfSearch; |
| | | import com.dsh.course.feignClient.activity.model.PointMercharsPayedVo; |
| | | import com.dsh.course.feignClient.activity.model.PointMercharsVo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @FeignClient(value = "mb-cloud-activity") |
| | | public interface PointMercharsClient { |
| | | |
| | | @PostMapping("/base/pointMerchars/queryGoodsListSearch") |
| | | List<Map<String,Object>> getIntegralGoodsListOfSearch(@RequestBody IntegralGoodsOfSearch ofSearch); |
| | | |
| | | @PostMapping("/base/pointMerchars/queryPointMerchaseDetailOfId") |
| | | PointMercharsVo queryPointMerchaseDetailOfId(@RequestBody Integer pointMercharsId); |
| | | |
| | | @PostMapping("/base/pointMerchars/updateGoodsGroudingStatus") |
| | | boolean updateGoodsGroudingStatus(@RequestBody Map<String,Integer> map); |
| | | |
| | | @PostMapping("/base/pointMerchars/queryUserPayedGoodsList") |
| | | List<Map<String, Object>> queryUserPayedGoodsList(@RequestBody PointMercharsPayedVo pointMercharsPayedVo); |
| | | |
| | | } |
| | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date startTime; |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date endTime; |
| | | /** |
| | | * 使用范围(1=全国,2=指定城市,3=指定门店) |
New file |
| | |
| | | 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 lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 优惠券使用门店关系数据 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-07 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_coupon_city") |
| | | public class CouponCity extends Model<CouponCity> { |
| | | |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 优惠券id |
| | | */ |
| | | private Integer couponId; |
| | | /** |
| | | * 省 |
| | | */ |
| | | @TableField("province") |
| | | private String province; |
| | | /** |
| | | * 省编号 |
| | | */ |
| | | @TableField("provinceCode") |
| | | private String provinceCode; |
| | | /** |
| | | * 市 |
| | | */ |
| | | @TableField("city") |
| | | private String city; |
| | | /** |
| | | * 市编号 |
| | | */ |
| | | @TableField("cityCode") |
| | | private String cityCode; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.activity.model; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Data |
| | | public class CouponRecordQuery { |
| | | |
| | | private long offset; |
| | | |
| | | private long limit; |
| | | |
| | | private Integer id; |
| | | |
| | | private List<Integer> ids; |
| | | |
| | | private Integer type; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.activity.model; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.util.Map; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class IntegralGoodsOfSearch { |
| | | |
| | | private String name; |
| | | |
| | | private Integer type; |
| | | |
| | | private Integer redemptionMethod; |
| | | |
| | | private Integer userPopulation; |
| | | |
| | | private Integer activeStatus; |
| | | |
| | | private Integer state; |
| | | |
| | | private Page<Map<String, Object>> page; |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.activity.model; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.util.Map; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class PointMercharsPayedVo { |
| | | |
| | | Integer id; |
| | | |
| | | String name; |
| | | |
| | | String phone; |
| | | |
| | | Integer status; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.activity.model; |
| | | |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class PointMercharsVo { |
| | | |
| | | String name; |
| | | /** |
| | | * 封面图 |
| | | */ |
| | | String cover; |
| | | /** |
| | | * 图片 |
| | | */ |
| | | String pics; |
| | | /** |
| | | * 发放数量 |
| | | */ |
| | | Integer quantityIssued; |
| | | /** |
| | | * 限领数量 |
| | | */ |
| | | Integer pickUpQuantity; |
| | | /** |
| | | * 商品说明 |
| | | */ |
| | | String content; |
| | | /** |
| | | * 排序 |
| | | */ |
| | | Integer sort; |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.course; |
| | | |
| | | import com.dsh.course.feignClient.course.model.CancelledClasses; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/12 3:45 |
| | | */ |
| | | @FeignClient("mb-cloud-course") |
| | | public interface CancelledClassesClient { |
| | | |
| | | |
| | | /** |
| | | * 添加数据 |
| | | * @param cancelledClasses |
| | | */ |
| | | @PostMapping("/cancelledClasses/addCancelledClasses") |
| | | void addCancelledClasses(CancelledClasses cancelledClasses); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/course/editCourseState") |
| | | void editCourseState(EditCourseState editCourseState); |
| | | |
| | | |
| | | /** |
| | | * 根据类型获取数据 |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @PostMapping("/course/queryCourseByType") |
| | | List<TCourse> queryCourseByType(Integer type); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.course.model.QueryCoursePackageLists; |
| | | import com.dsh.course.feignClient.course.model.QueryExamineCoursePackageLists; |
| | | import com.dsh.course.feignClient.course.model.QueryRegistrationRecord; |
| | | import com.dsh.course.feignClient.course.model.TCoursePackage; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | |
| | | */ |
| | | @PostMapping("/coursePackage/queryCoursePackageLists") |
| | | Page<Map<String, Object>> queryCoursePackageLists(QueryCoursePackageLists queryCoursePackageLists); |
| | | |
| | | |
| | | /** |
| | | * 添加数据 |
| | | * @param coursePackage |
| | | */ |
| | | @PostMapping("/coursePackage/addCoursePackage") |
| | | Integer addCoursePackage(TCoursePackage coursePackage); |
| | | |
| | | |
| | | /** |
| | | * 根据id查询数据 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @PostMapping("/base/coursePackage/queryCoursePackageById") |
| | | TCoursePackage queryById(Integer id); |
| | | |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * @param coursePackage |
| | | */ |
| | | @PostMapping("/coursePackage/updateCoursePackageById") |
| | | void updateCoursePackage(TCoursePackage coursePackage); |
| | | |
| | | |
| | | /** |
| | | * 获取课包审核列表 |
| | | * @param queryExamineCoursePackageLists |
| | | * @return |
| | | */ |
| | | @PostMapping("/coursePackage/queryExamineCoursePackageLists") |
| | | Page<Map<String, Object>> queryExamineCoursePackageLists(QueryExamineCoursePackageLists queryExamineCoursePackageLists); |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.course; |
| | | |
| | | import com.dsh.course.feignClient.course.model.TCoursePackageDiscount; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/8 14:46 |
| | | */ |
| | | @FeignClient("mb-cloud-course") |
| | | public interface CoursePackageDiscountClient { |
| | | |
| | | /** |
| | | * 获取课包折扣 |
| | | * @param coursePackagePaymentConfigId |
| | | * @return |
| | | */ |
| | | @PostMapping("/coursePackageDiscount/queryCoursePackageDiscount") |
| | | List<TCoursePackageDiscount> queryCoursePackageDiscount(Integer coursePackagePaymentConfigId); |
| | | |
| | | |
| | | /** |
| | | * 配置课包折扣数据 |
| | | * @param list |
| | | */ |
| | | @PostMapping("/coursePackageDiscount/setCoursePackageDiscount") |
| | | void setCoursePackageDiscount(List<TCoursePackageDiscount> list); |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.course; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.course.model.QueryRegistrationRecord; |
| | | import com.dsh.course.feignClient.course.model.QueryWalkInStudentList; |
| | | import com.dsh.course.feignClient.course.model.TCoursePackagePayment; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/10 19:51 |
| | | */ |
| | | @FeignClient("mb-cloud-course") |
| | | public interface CoursePackagePaymentClient { |
| | | |
| | | |
| | | /** |
| | | * 获取课程报名信息列表 |
| | | * @param queryRegistrationRecord |
| | | * @return |
| | | */ |
| | | @PostMapping("/coursePackagePayment/queryRegistrationRecord") |
| | | Page<Map<String, Object>> queryRegistrationRecord(QueryRegistrationRecord queryRegistrationRecord); |
| | | |
| | | |
| | | /** |
| | | * 获取未预约排课学员列表 |
| | | * @param queryWalkInStudentList |
| | | * @return |
| | | */ |
| | | @PostMapping("/coursePackagePayment/queryWalkInStudentList") |
| | | Page<Map<String, Object>> queryWalkInStudentList(QueryWalkInStudentList queryWalkInStudentList); |
| | | |
| | | |
| | | /** |
| | | * 根据id获取数据 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @PostMapping("/coursePackagePayment/queryCoursePackagePaymentById") |
| | | TCoursePackagePayment queryCoursePackagePaymentById(Long id); |
| | | |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * @param coursePackagePayment |
| | | */ |
| | | @PostMapping("/coursePackagePayment/editCoursePackagePayment") |
| | | void editCoursePackagePayment(TCoursePackagePayment coursePackagePayment); |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.course; |
| | | |
| | | import com.dsh.course.feignClient.course.model.CoursePackagePaymentConfig; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/7 11:45 |
| | | */ |
| | | @FeignClient("mb-cloud-course") |
| | | public interface CoursePackagePaymentConfigClient { |
| | | |
| | | |
| | | /** |
| | | * 添加数据 |
| | | * @param coursePackagePaymentConfig |
| | | */ |
| | | @PostMapping("/coursePackagePaymentConfig/addCoursePackagePaymentConfig") |
| | | void addCoursePackagePaymentConfig(CoursePackagePaymentConfig coursePackagePaymentConfig); |
| | | |
| | | |
| | | /** |
| | | * 根据课包id获取价格配置 |
| | | * @param coursePackageId |
| | | * @return |
| | | */ |
| | | @PostMapping("/coursePackagePaymentConfig/queryCoursePackagePaymentConfigList") |
| | | List<CoursePackagePaymentConfig> queryCoursePackagePaymentConfigList(Integer coursePackageId); |
| | | |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * @param coursePackageId |
| | | */ |
| | | @PostMapping("/coursePackagePaymentConfig/delCoursePackagePaymentConfig") |
| | | void delCoursePackagePaymentConfig(Integer coursePackageId); |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.course; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.course.model.CoursePackageScheduling; |
| | | import com.dsh.course.feignClient.course.model.QueryCoursePackageSchedulingList; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/11 10:59 |
| | | */ |
| | | @FeignClient("mb-cloud-course") |
| | | public interface CoursePackageSchedulingClient { |
| | | |
| | | |
| | | /** |
| | | * 获取课包排课记录 |
| | | * @param queryCoursePackageSchedulingList |
| | | * @return |
| | | */ |
| | | @PostMapping("/coursePackageScheduling/queryCoursePackageSchedulingList") |
| | | Page<Map<String, Object>> queryCoursePackageSchedulingList(QueryCoursePackageSchedulingList queryCoursePackageSchedulingList); |
| | | |
| | | |
| | | /** |
| | | * 根据id查询排课数据 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @PostMapping("/coursePackageScheduling/queryCoursePackageSchedulingById") |
| | | CoursePackageScheduling queryCoursePackageSchedulingById(Long id); |
| | | |
| | | |
| | | /** |
| | | * 编辑数据 |
| | | * @param coursePackageScheduling |
| | | */ |
| | | @PostMapping("/coursePackageScheduling/editCoursePackageScheduling") |
| | | void editCoursePackageScheduling(CoursePackageScheduling coursePackageScheduling); |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.course; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.course.model.CoursePackageStudent; |
| | | import com.dsh.course.feignClient.course.model.QueryCoursePackageStudent; |
| | | import com.dsh.course.feignClient.course.model.QueryCoursePackageStudentList; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/11 17:38 |
| | | */ |
| | | @FeignClient("mb-cloud-course") |
| | | public interface CoursePackageStudentClient { |
| | | |
| | | |
| | | /** |
| | | * 获取课程排课预约数据 |
| | | * @param queryCoursePackageStudentList |
| | | * @return |
| | | */ |
| | | @PostMapping("/coursePackageStudent/queryCoursePackageStudentList") |
| | | Page<Map<String, Object>> queryCoursePackageStudentList(QueryCoursePackageStudentList queryCoursePackageStudentList); |
| | | |
| | | |
| | | /** |
| | | * 根据id查询数据 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @PostMapping("/coursePackageStudent/queryCoursePackageStudentById") |
| | | CoursePackageStudent queryCoursePackageStudentById(Long id); |
| | | |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * @param coursePackageStudent |
| | | */ |
| | | @PostMapping("/coursePackageStudent/editCoursePackageStudent") |
| | | void editCoursePackageStudent(CoursePackageStudent coursePackageStudent); |
| | | |
| | | |
| | | /** |
| | | * 根据排课id获取预约数据 |
| | | * @param coursePackageSchedulingId |
| | | * @return |
| | | */ |
| | | @PostMapping("/coursePackageStudent/queryByCoursePackageSchedulingId") |
| | | List<CoursePackageStudent> queryByCoursePackageSchedulingId(Long coursePackageSchedulingId); |
| | | |
| | | |
| | | /** |
| | | * 获取学员上课数据 |
| | | * @param queryCoursePackageStudent |
| | | * @return |
| | | */ |
| | | @PostMapping("/coursePackageStudent/queryCoursePackageStudent") |
| | | List<CoursePackageStudent> queryCoursePackageStudent(QueryCoursePackageStudent queryCoursePackageStudent); |
| | | |
| | | |
| | | /** |
| | | * 添加学员上课数据 |
| | | * @param coursePackageStudent |
| | | */ |
| | | @PostMapping("/coursePackageStudent/addCoursePackageStudent") |
| | | void addCoursePackageStudent(CoursePackageStudent coursePackageStudent); |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.course.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.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 课包消课记录 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-06-29 |
| | | */ |
| | | @Data |
| | | public class CancelledClasses extends Model<CancelledClasses> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Integer id; |
| | | /** |
| | | * 消课类型(1=上课消课,2=支付消课) |
| | | */ |
| | | private Integer type; |
| | | /** |
| | | * 课包id |
| | | */ |
| | | private Integer coursePackageId; |
| | | /** |
| | | * 课程支付记录id |
| | | */ |
| | | private Long coursePackagePaymentId; |
| | | /** |
| | | * 排课记录id |
| | | */ |
| | | private Long coursePackageSchedulingId; |
| | | /** |
| | | * 消课凭证 |
| | | */ |
| | | private String voucher; |
| | | /** |
| | | * 消课数量 |
| | | */ |
| | | private Integer cancelledClassesNumber; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.course.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 lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/6/29 10:42 |
| | | */ |
| | | @Data |
| | | public class CoursePackagePaymentConfig { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Integer id; |
| | | /** |
| | | * 课包id |
| | | */ |
| | | private Integer coursePackageId; |
| | | /** |
| | | * 课时数 |
| | | */ |
| | | private Integer classHours; |
| | | /** |
| | | * 现金支付价格 |
| | | */ |
| | | private Double cashPayment; |
| | | /** |
| | | * 玩湃币价格 |
| | | */ |
| | | private Integer playPaiCoin; |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.course.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.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/11 10:46 |
| | | */ |
| | | @Data |
| | | public class CoursePackageScheduling { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 课包id |
| | | */ |
| | | private Integer coursePackageId; |
| | | /** |
| | | * 上课日期 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date classDate; |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date endDate; |
| | | /** |
| | | * 课后练习课程id |
| | | */ |
| | | private Integer courseId; |
| | | /** |
| | | * 可获得积分 |
| | | */ |
| | | private Integer integral; |
| | | /** |
| | | * 消课凭证 |
| | | */ |
| | | private String cancelClasses; |
| | | /** |
| | | * 扣除课时 |
| | | */ |
| | | private Integer deductClassHour; |
| | | /** |
| | | * 状态(1=未开始,2=已开始,3=已结束,4=已取消) |
| | | */ |
| | | private Integer status; |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.course.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.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 学员上课记录 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-06-30 |
| | | */ |
| | | @Data |
| | | public class CoursePackageStudent extends Model<CoursePackageStudent> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Integer appUserId; |
| | | /** |
| | | * 学员id |
| | | */ |
| | | private Integer studentId; |
| | | /** |
| | | * 课包id |
| | | */ |
| | | private Integer coursePackageId; |
| | | /** |
| | | * 课包购买记录id |
| | | */ |
| | | private Long coursePackagePaymentId; |
| | | /** |
| | | * 排课记录id |
| | | */ |
| | | private Long coursePackageSchedulingId; |
| | | /** |
| | | * 到课状态(0=否,1=是) |
| | | */ |
| | | private Integer signInOrNot; |
| | | /** |
| | | * 预约状态(0=取消,1=预约) |
| | | */ |
| | | private Integer reservationStatus; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.course.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/11 11:00 |
| | | */ |
| | | @Data |
| | | public class QueryCoursePackageSchedulingList { |
| | | /** |
| | | * 课包id |
| | | */ |
| | | private Integer coursePackageId; |
| | | |
| | | private String order; |
| | | private Integer offset; |
| | | private Integer limit; |
| | | private String sort; |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.course.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/12 3:12 |
| | | */ |
| | | @Data |
| | | public class QueryCoursePackageStudent { |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Integer appUserId; |
| | | /** |
| | | * 学员id |
| | | */ |
| | | private Integer studentId; |
| | | /** |
| | | * 课包id |
| | | */ |
| | | private Integer coursePackageId; |
| | | /** |
| | | * 课包购买记录id |
| | | */ |
| | | private Long coursePackagePaymentId; |
| | | /** |
| | | * 排课记录id |
| | | */ |
| | | private Long coursePackageSchedulingId; |
| | | /** |
| | | * 到课状态(0=否,1=是) |
| | | */ |
| | | private Integer signInOrNot; |
| | | /** |
| | | * 预约状态(0=取消,1=预约) |
| | | */ |
| | | private Integer reservationStatus; |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.course.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/11 17:07 |
| | | */ |
| | | @Data |
| | | public class QueryCoursePackageStudentList { |
| | | /** |
| | | * 排课id |
| | | */ |
| | | private Long coursePackageSchedulingId; |
| | | /** |
| | | * 用户姓名 |
| | | */ |
| | | private String userName; |
| | | /** |
| | | * 学员姓名 |
| | | */ |
| | | private String studentName; |
| | | |
| | | private String order; |
| | | private Integer offset; |
| | | private Integer limit; |
| | | private String sort; |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.course.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/13 3:22 |
| | | */ |
| | | @Data |
| | | public class QueryExamineCoursePackageLists { |
| | | /** |
| | | * 省编号 |
| | | */ |
| | | private String provinceCode; |
| | | /** |
| | | * 市编号 |
| | | */ |
| | | private String cityCode; |
| | | /** |
| | | * 课程类型id |
| | | */ |
| | | private Integer coursePackageTypeId; |
| | | /** |
| | | * 课程名称 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 审核状态(1=待审核,2=已同意,3=已拒绝) |
| | | */ |
| | | private Integer auditStatus; |
| | | |
| | | private String order; |
| | | private Integer offset; |
| | | private Integer limit; |
| | | private String sort; |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.course.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/10 19:47 |
| | | */ |
| | | @Data |
| | | public class QueryRegistrationRecord { |
| | | /** |
| | | * 课程id |
| | | */ |
| | | private Integer coursePackageId; |
| | | /** |
| | | * 用户名称 |
| | | */ |
| | | private String userName; |
| | | /** |
| | | * 学员名称 |
| | | */ |
| | | private String studentName; |
| | | |
| | | private String order; |
| | | private Integer offset; |
| | | private Integer limit; |
| | | private String sort; |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.course.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/12 2:46 |
| | | */ |
| | | @Data |
| | | public class QueryWalkInStudentList { |
| | | /** |
| | | * 课程id |
| | | */ |
| | | private Long coursePackageSchedulingId; |
| | | /** |
| | | * 用户名称 |
| | | */ |
| | | private String userName; |
| | | /** |
| | | * 学员名称 |
| | | */ |
| | | private String studentName; |
| | | |
| | | private String order; |
| | | private Integer offset; |
| | | private Integer limit; |
| | | private String sort; |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.course.model; |
| | | |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 课包 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2023-06-14 |
| | | */ |
| | | @Data |
| | | public class TCoursePackage extends Model<TCoursePackage>{ |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Integer id; |
| | | /** |
| | | * 省 |
| | | */ |
| | | private String province; |
| | | /** |
| | | * 省编号 |
| | | */ |
| | | private String provinceCode; |
| | | /** |
| | | * 市 |
| | | */ |
| | | private String city; |
| | | /** |
| | | * 市编号 |
| | | */ |
| | | private String cityCode; |
| | | /** |
| | | * 门店id |
| | | */ |
| | | private Integer storeId; |
| | | /** |
| | | * 课包类型id |
| | | */ |
| | | private Integer coursePackageTypeId; |
| | | /** |
| | | * 课包名称 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 上课场地id |
| | | */ |
| | | private Integer siteId; |
| | | /** |
| | | * 教练id |
| | | */ |
| | | private Integer coachId; |
| | | /** |
| | | * 最多预约人数 |
| | | */ |
| | | private Integer maxSubscribeNumber; |
| | | /** |
| | | * 上课开始时间 |
| | | */ |
| | | private String classStartTime; |
| | | /** |
| | | * 上课结束时段 |
| | | */ |
| | | private String classEndTime; |
| | | /** |
| | | * 上课周,多个分号分隔 |
| | | */ |
| | | private String classWeeks; |
| | | /** |
| | | * 封面图 |
| | | */ |
| | | private String coverDrawing; |
| | | /** |
| | | * 详情图 |
| | | */ |
| | | private String detailDrawing; |
| | | /** |
| | | * 介绍图 |
| | | */ |
| | | private String introduceDrawing; |
| | | /** |
| | | * 排序 |
| | | */ |
| | | private Integer sort; |
| | | /** |
| | | * 支付方式(1=现金,2=玩湃币) |
| | | */ |
| | | private Integer payType; |
| | | /** |
| | | * 有效天数 |
| | | */ |
| | | private Integer validDays; |
| | | /** |
| | | * 课程状态(1=未开始,2=进行中,3=已结束,4=已取消) |
| | | */ |
| | | private Integer status; |
| | | /** |
| | | * 审核状态(1=待审核,2=已同意,3=已拒绝) |
| | | */ |
| | | private Integer auditStatus; |
| | | /** |
| | | * 审核人id |
| | | */ |
| | | private Integer auditUserId; |
| | | /** |
| | | * 审核备注 |
| | | */ |
| | | private String authRemark; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | private Integer state; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.course.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.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 课包折扣 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2023-06-14 |
| | | */ |
| | | @Data |
| | | public class TCoursePackageDiscount extends Model<TCoursePackageDiscount>{ |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Integer id; |
| | | /** |
| | | * 课包id |
| | | */ |
| | | private Integer coursePackageId; |
| | | /** |
| | | * 课包价格规则id |
| | | */ |
| | | private Integer coursePackagePaymentConfigId; |
| | | /** |
| | | * 折扣类型(1=会员折扣,2=续课优惠,3=限时折扣,4=赠送课时) |
| | | */ |
| | | private Integer type; |
| | | /** |
| | | * 折扣优惠规则JSON ->详见 DiscountJsonDto类 |
| | | */ |
| | | private String content; |
| | | /** |
| | | * 审核状态(1=待审核,2=已通过,3=已拒绝) |
| | | */ |
| | | private Integer auditStatus; |
| | | /** |
| | | * 审核人id |
| | | */ |
| | | private Integer auditUserId; |
| | | /** |
| | | * 审核备注 |
| | | */ |
| | | private String auditRemark; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.course.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.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户课程包购买记录 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2023-06-14 |
| | | */ |
| | | @Data |
| | | public class TCoursePackagePayment extends Model<TCoursePackagePayment>{ |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 业务编号 |
| | | */ |
| | | private String code; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Integer appUserId; |
| | | /** |
| | | * 学员id |
| | | */ |
| | | private Integer studentId; |
| | | /** |
| | | * 课包id |
| | | */ |
| | | private Integer coursePackageId; |
| | | /** |
| | | * 支付方式(1=微信,2=支付宝,3=玩湃币,4=积分,5=积分+微信,6=积分+支付宝) |
| | | */ |
| | | private Integer payType; |
| | | /** |
| | | * 课时数 |
| | | */ |
| | | private Integer classHours; |
| | | /** |
| | | * 原价 |
| | | */ |
| | | private Double originalPrice; |
| | | /** |
| | | * 优惠券id |
| | | */ |
| | | private Long userCouponId; |
| | | /** |
| | | * 现金支付价格 |
| | | */ |
| | | private BigDecimal cashPayment; |
| | | /** |
| | | * 玩湃币价格/积分 |
| | | */ |
| | | private Integer playPaiCoin; |
| | | /** |
| | | * 总课时 |
| | | */ |
| | | private Integer totalClassHours; |
| | | /** |
| | | * 剩余课时 |
| | | */ |
| | | private Integer laveClassHours; |
| | | /** |
| | | * 缺课次数 |
| | | */ |
| | | private Integer absencesNumber; |
| | | /** |
| | | * 退课课时 |
| | | */ |
| | | private Integer dropoutsNumber; |
| | | /** |
| | | * 支付用户类型(1=用户,2=管理员) |
| | | */ |
| | | private Integer payUserType; |
| | | /** |
| | | * 支付状态(1=待支付,2=已支付) |
| | | */ |
| | | private Integer payStatus; |
| | | /** |
| | | * 第三方支付流水号 |
| | | */ |
| | | private String orderNumber; |
| | | /** |
| | | * 支付用户id |
| | | */ |
| | | private Integer payUserId; |
| | | /** |
| | | * 课程状态(1=正常,2=已退课) |
| | | */ |
| | | private Integer status; |
| | | /** |
| | | * 退课时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date withdrawalTime; |
| | | /** |
| | | * 退课凭证 |
| | | */ |
| | | private String certificate; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | private Integer state; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | |
| | | } |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.account.AppUserClient; |
| | | import com.dsh.course.feignClient.account.CityManagerClient; |
| | | import com.dsh.course.feignClient.account.model.CityManager; |
| | | import com.dsh.course.feignClient.account.model.QueryByNamePhone; |
| | | import com.dsh.course.feignClient.account.model.TAppUser; |
| | | import com.dsh.course.feignClient.activity.CouponClient; |
| | | import com.dsh.course.feignClient.activity.model.Coupon; |
| | | import com.dsh.course.feignClient.activity.model.CouponCity; |
| | | import com.dsh.course.feignClient.activity.model.CouponListOfSearch; |
| | | import com.dsh.course.feignClient.activity.model.CouponRecordQuery; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.tips.SuccessTip; |
| | | import com.dsh.guns.core.common.constant.factory.PageFactory; |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.CouponDataVo; |
| | | import com.dsh.guns.modular.system.model.Region; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.service.IRegionService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.util.OBSUploadUtil; |
| | | import org.apache.commons.beanutils.ConvertUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.IOException; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | /** |
| | |
| | | @Resource |
| | | private CityManagerClient cmgrClient; |
| | | |
| | | @Autowired |
| | | private AppUserClient appUserClient; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | |
| | | @RequestMapping("/coupon_record/{id}") |
| | | public String memberCouponAdd(@PathVariable Integer id,Model model) { |
| | | Coupon coupon = client.queryCouponById(id); |
| | | |
| | | model.addAttribute("id",id); |
| | | model.addAttribute("type",coupon.getType()); |
| | | return PREFIX + "TCouponRecord.html"; |
| | | } |
| | | |
| | | |
| | | |
| | | @RequestMapping("/coupon_detail/{id}") |
| | | public String memberCouponDetail(@PathVariable Integer id,Model model) { |
| | | Coupon coupon = client.queryCouponById(id); |
| | | String content = coupon.getContent(); |
| | | JSONObject jsonObject = JSONObject.parseObject(content); |
| | | String one =""; |
| | | String two =""; |
| | | String three =""; |
| | | if(coupon.getType()==1){ |
| | | one = jsonObject.get("conditionalAmount").toString(); |
| | | two = jsonObject.get("deductionAmount").toString(); |
| | | } |
| | | if(coupon.getType()==2){ |
| | | one = jsonObject.get("conditionalAmount").toString(); |
| | | } |
| | | if(coupon.getType()==3){ |
| | | three = jsonObject.get("experienceName").toString(); |
| | | } |
| | | List<CouponCity> list = new ArrayList<>(); |
| | | List<Integer> list1=null; |
| | | List<TStore> list2=new ArrayList<>(); |
| | | if(coupon.getUseScope()==2){ |
| | | list = client.queryCity(coupon.getId()); |
| | | } |
| | | if(coupon.getUseScope()==3){ |
| | | list1 = client.queryStore(coupon.getId()); |
| | | list2 = storeService.list(new LambdaQueryWrapper<TStore>().in(TStore::getId, list1)); |
| | | for (TStore tStore : list2) { |
| | | CityManager cityManager = cmgrClient.queryCityManagerById(tStore.getCityManagerId()); |
| | | if (ToolUtil.isNotEmpty(cityManager)){ |
| | | tStore.setProvince(tStore.getProvince()+tStore.getCity()); |
| | | tStore.setPhone(cityManager.getName()+"-"+cityManager.getPhone()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | model.addAttribute("city",list); |
| | | model.addAttribute("store",list2); |
| | | model.addAttribute("s",new SimpleDateFormat("yyyy-MM-dd").format(coupon.getStartTime())); |
| | | model.addAttribute("e",new SimpleDateFormat("yyyy-MM-dd").format(coupon.getEndTime())); |
| | | model.addAttribute("one",one); |
| | | model.addAttribute("two",two); |
| | | model.addAttribute("three",three); |
| | | ArrayList<String> strings = new ArrayList<>(); |
| | | String productImages = coupon.getProductImages(); |
| | | for (String s : productImages.split(",")) { |
| | | strings.add(s); |
| | | } |
| | | |
| | | model.addAttribute("img",strings); |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | System.out.println(objectType); |
| | | model.addAttribute("item",coupon); |
| | | return PREFIX + "TCouponInfo.html"; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跳转到门店管理列表页 |
| | |
| | | @RequestMapping("/storeList") |
| | | public String storePage(Model model) { |
| | | return PREFIX + "TQuestionEdit.html"; |
| | | } |
| | | @RequestMapping("/updateType") |
| | | @ResponseBody |
| | | public Object updateType(Long id) { |
| | | client.updateType(id); |
| | | return new SuccessTip<>(); |
| | | } |
| | | |
| | | @RequestMapping("/storeDetailsOfSearch") |
| | |
| | | ofSearch.setState(state); |
| | | return client.getCouponListOfSearch(ofSearch); |
| | | } |
| | | @RequestMapping(value = "/listRecord") |
| | | @ResponseBody |
| | | public Object listRecord(Integer id,String name, Integer type, String phone) { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | List<TAppUser> tAppUsers = appUserClient.queryByNamePhone(new QueryByNamePhone(name, phone)); |
| | | if(tAppUsers.size()==0){ |
| | | return new ArrayList<>(); |
| | | } |
| | | CouponRecordQuery ofSearch = new CouponRecordQuery(); |
| | | ofSearch.setId(id); |
| | | ofSearch.setLimit(page.getSize()); |
| | | ofSearch.setOffset(page.getCurrent()); |
| | | ofSearch.setIds(tAppUsers.stream().map(TAppUser::getId).collect(Collectors.toList())); |
| | | ofSearch.setType(type); |
| | | List<Map<String, Object>> maps = client.listRecord(ofSearch); |
| | | for (Map<String, Object> map : maps) { |
| | | map.put("id",map.get("id").toString()); |
| | | for (TAppUser tAppUser : tAppUsers) { |
| | | if(map.get("userId").equals(tAppUser.getId())){ |
| | | map.put("name",tAppUser.getName()); |
| | | map.put("phone",tAppUser.getPhone()); |
| | | } |
| | | } |
| | | } |
| | | return maps; |
| | | } |
| | | |
| | | @RequestMapping(value = "/getProvince") |
| | | @ResponseBody |
| | | public Object getProvince(){ |
| | | return regiService.list(new LambdaQueryWrapper<Region>() |
| | | .eq(Region::getParentId,0)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/onShelf") |
| | | @ResponseBody |
| | | public Object onShelf(Integer id,Integer type){ |
| | | Coupon coupon = client.queryCouponById(id); |
| | | coupon.setState(type); |
| | | client.updateCouponData(coupon); |
| | | return new SuccessTip<>(); |
| | | } |
| | | |
| | | |
| | |
| | | client.insertIntoData(dataVo); |
| | | return new SuccessTip<>(); |
| | | } |
| | | @PostMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update( Integer id,Integer num,Integer num1,String text){ |
| | | Coupon coupon = client.queryCouponById(id); |
| | | coupon.setQuantityIssued(num); |
| | | coupon.setPickUpQuantity(num1); |
| | | coupon.setIllustrate(text); |
| | | client.updateCouponData(coupon); |
| | | return new SuccessTip<>(); |
| | | } |
| | | } |
| | |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | courseService.editCourseState(id, state); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据类型获取数据 |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/queryCourseByType") |
| | | public List<TCourse> queryCourseByType(Integer type){ |
| | | return courseService.queryCourseByType(type); |
| | | } |
| | | } |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.account.CityManagerClient; |
| | | import com.dsh.course.feignClient.account.CoachClient; |
| | | import com.dsh.course.feignClient.account.model.CityManager; |
| | | import com.dsh.course.feignClient.account.model.Coach; |
| | | import com.dsh.course.feignClient.course.CoursePackageClient; |
| | | import com.dsh.course.feignClient.course.CoursePackageDiscountClient; |
| | | import com.dsh.course.feignClient.course.CoursePackagePaymentConfigClient; |
| | | import com.dsh.course.feignClient.course.CoursePackageTypeClient; |
| | | import com.dsh.course.feignClient.course.model.TCoursePackageType; |
| | | import com.dsh.course.feignClient.course.model.*; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.TSite; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.service.ICoursePackageService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.ITSiteService; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | @Resource |
| | | private CoachClient coachClient; |
| | | |
| | | @Resource |
| | | private CoursePackagePaymentConfigClient coursePackagePaymentConfigClient; |
| | | |
| | | @Resource |
| | | private CoursePackageDiscountClient coursePackageDiscountClient; |
| | | |
| | | @Resource |
| | | private CoursePackageClient coursePackageClient; |
| | | |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跳转到添加页 |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @GetMapping("/openAddCoursePackage") |
| | | public String openAddCoursePackage(Model model){ |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到编辑页 |
| | | * @param model |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/openEditCoursePackage") |
| | | public String openEditCoursePackage(Model model, Integer id){ |
| | | TCoursePackage tCoursePackage = coursePackageService.queryById(id); |
| | | model.addAttribute("item", tCoursePackage); |
| | | model.addAttribute("classTime", tCoursePackage.getClassStartTime() + ":00 - " + tCoursePackage.getClassEndTime() + ":00"); |
| | | String[] split = tCoursePackage.getClassWeeks().split(";"); |
| | | List<String> list5 = Arrays.asList("周一", "周二", "周三", "周四", "周五", "周六", "周日"); |
| | | List<Map<String, Object>> classWeeks = new ArrayList<>(); |
| | | for (String s : list5) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("value", s); |
| | | map.put("checked", false); |
| | | for (String s1 : split) { |
| | | if(s.equals(s1)){ |
| | | map.put("checked", true); |
| | | } |
| | | } |
| | | classWeeks.add(map); |
| | | } |
| | | model.addAttribute("classWeeks", classWeeks); |
| | | List<TCoursePackageType> tCoursePackageTypes = coursePackageTypeClient.queryAllCoursePackageType(); |
| | | model.addAttribute("coursePackageType", tCoursePackageTypes); |
| | | String cityCode = tCoursePackage.getCityCode(); |
| | | String provinceCode = tCoursePackage.getProvinceCode(); |
| | | List<Map<String, Object>> list = storeService.queryProvince(cityCode); |
| | | model.addAttribute("province", list); |
| | | List<Map<String, Object>> list1 = storeService.queryCity(provinceCode, cityCode); |
| | | model.addAttribute("city", list1); |
| | | List<TStore> list2 = storeService.list(new QueryWrapper<TStore>().eq("cityCode", cityCode).eq("state", 1)); |
| | | model.addAttribute("store", list2); |
| | | List<TSite> list3 = siteService.list(new QueryWrapper<TSite>().eq("storeId", tCoursePackage.getStoreId()).eq("state", 1)); |
| | | model.addAttribute("site", list3); |
| | | List<Coach> coaches = coachClient.queryCoachByCity(cityCode); |
| | | model.addAttribute("coach", coaches); |
| | | List<CoursePackagePaymentConfig> list4 = coursePackagePaymentConfigClient.queryCoursePackagePaymentConfigList(id); |
| | | model.addAttribute("coursePackagePaymentConfig", list4.remove(0)); |
| | | model.addAttribute("coursePackagePaymentConfigs", list4); |
| | | CoursePackagePaymentConfig coursePackagePaymentConfig = list4.get(0); |
| | | model.addAttribute("cashPayment", coursePackagePaymentConfig.getCashPayment() == 0 ? false : true); |
| | | model.addAttribute("playPaiCoin", coursePackagePaymentConfig.getPlayPaiCoin() == 0 ? false : true); |
| | | return PREFIX + "coursePackage_edit.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转详情页 |
| | | * @param model |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/showCoursePackageDetails") |
| | | public String showCoursePackageDetails(Model model, Integer id){ |
| | | TCoursePackage tCoursePackage = coursePackageService.queryById(id); |
| | | model.addAttribute("item", tCoursePackage); |
| | | model.addAttribute("classTime", tCoursePackage.getClassStartTime() + ":00 - " + tCoursePackage.getClassEndTime() + ":00"); |
| | | String[] split = tCoursePackage.getClassWeeks().split(";"); |
| | | List<String> list5 = Arrays.asList("周一", "周二", "周三", "周四", "周五", "周六", "周日"); |
| | | List<Map<String, Object>> classWeeks = new ArrayList<>(); |
| | | for (String s : list5) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("value", s); |
| | | map.put("checked", false); |
| | | for (String s1 : split) { |
| | | if(s.equals(s1)){ |
| | | map.put("checked", true); |
| | | } |
| | | } |
| | | classWeeks.add(map); |
| | | } |
| | | model.addAttribute("classWeeks", classWeeks); |
| | | List<TCoursePackageType> tCoursePackageTypes = coursePackageTypeClient.queryAllCoursePackageType(); |
| | | model.addAttribute("coursePackageType", tCoursePackageTypes); |
| | | String cityCode = tCoursePackage.getCityCode(); |
| | | String provinceCode = tCoursePackage.getProvinceCode(); |
| | | List<Map<String, Object>> list = storeService.queryProvince(cityCode); |
| | | model.addAttribute("province", list); |
| | | List<Map<String, Object>> list1 = storeService.queryCity(provinceCode, cityCode); |
| | | model.addAttribute("city", list1); |
| | | List<TStore> list2 = storeService.list(new QueryWrapper<TStore>().eq("cityCode", cityCode).eq("state", 1)); |
| | | model.addAttribute("store", list2); |
| | | List<TSite> list3 = siteService.list(new QueryWrapper<TSite>().eq("storeId", tCoursePackage.getStoreId()).eq("state", 1)); |
| | | model.addAttribute("site", list3); |
| | | List<Coach> coaches = coachClient.queryCoachByCity(cityCode); |
| | | model.addAttribute("coach", coaches); |
| | | List<CoursePackagePaymentConfig> list4 = coursePackagePaymentConfigClient.queryCoursePackagePaymentConfigList(id); |
| | | model.addAttribute("coursePackagePaymentConfig", list4.remove(0)); |
| | | model.addAttribute("coursePackagePaymentConfigs", list4); |
| | | CoursePackagePaymentConfig coursePackagePaymentConfig = list4.get(0); |
| | | model.addAttribute("cashPayment", coursePackagePaymentConfig.getCashPayment() == 0 ? false : true); |
| | | model.addAttribute("playPaiCoin", coursePackagePaymentConfig.getPlayPaiCoin() == 0 ? false : true); |
| | | return PREFIX + "coursePackage_info.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到折扣页 |
| | | * @param model |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/showCoursePackageDiscount") |
| | | public String showCoursePackageDiscount(Model model, Integer id){ |
| | | TCoursePackage tCoursePackage = coursePackageService.queryById(id); |
| | | model.addAttribute("item", tCoursePackage); |
| | | List<CoursePackagePaymentConfig> list4 = coursePackagePaymentConfigClient.queryCoursePackagePaymentConfigList(id); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | for (CoursePackagePaymentConfig coursePackagePaymentConfig : list4) { |
| | | if(coursePackagePaymentConfig.getCashPayment() == 0){ |
| | | continue; |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("coursePackagePaymentConfigId", coursePackagePaymentConfig.getId()); |
| | | map.put("classHours", coursePackagePaymentConfig.getClassHours()); |
| | | String payment = ""; |
| | | if(coursePackagePaymentConfig.getCashPayment() > 0){ |
| | | payment += "现金支付"; |
| | | } |
| | | if(coursePackagePaymentConfig.getPlayPaiCoin() > 0){ |
| | | payment += (ToolUtil.isNotEmpty(payment) ? "、" : "") + "玩湃币支付"; |
| | | } |
| | | map.put("payment", payment); |
| | | map.put("cashPayment", coursePackagePaymentConfig.getCashPayment()); |
| | | List<TCoursePackageDiscount> tCoursePackageDiscounts = coursePackageDiscountClient.queryCoursePackageDiscount(coursePackagePaymentConfig.getId()); |
| | | map.put("coursePackageDiscount", tCoursePackageDiscounts); |
| | | list.add(map); |
| | | } |
| | | model.addAttribute("coursePackagePaymentConfig", JSON.toJSONString(list)); |
| | | return PREFIX + "coursePackageDiscount.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到报名列表页 |
| | | * @param model |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/registrationRecord") |
| | | public String registrationRecord(Model model, Integer id){ |
| | | TCoursePackage tCoursePackage = coursePackageService.queryById(id); |
| | | model.addAttribute("item", tCoursePackage); |
| | | return PREFIX + "registrationRecord.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到上课记录列表页 |
| | | * @param model |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/openClassRecord") |
| | | public String openClassRecord(Model model, Integer id){ |
| | | TCoursePackage tCoursePackage = coursePackageClient.queryById(id); |
| | | TStore store = storeService.getById(tCoursePackage.getStoreId()); |
| | | Coach coach = coachClient.queryCoachById(tCoursePackage.getCoachId()); |
| | | model.addAttribute("item", tCoursePackage); |
| | | model.addAttribute("store", store); |
| | | model.addAttribute("coach", coach); |
| | | return PREFIX + "classRecord.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到查看学员列表 |
| | | * @param model |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/openCoursePackageStudent") |
| | | public String openCoursePackageStudent(Model model, Long id){ |
| | | model.addAttribute("id", id); |
| | | return PREFIX + "coursePackageStudent.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到手动预约列表 |
| | | * @param model |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/openManualReservation") |
| | | public String openManualReservation(Model model, Long id){ |
| | | model.addAttribute("id", id); |
| | | return PREFIX + "manualReservation.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到课包审核列表页 |
| | | * @return |
| | | */ |
| | | @GetMapping("/examineCoursePackage") |
| | | public String examineCoursePackage(Model model){ |
| | | List<TCoursePackageType> tCoursePackageTypes = coursePackageTypeClient.queryAllCoursePackageType(); |
| | | model.addAttribute("coursePackageType", tCoursePackageTypes); |
| | | List<Map<String, Object>> list = storeService.queryProvince(null); |
| | | model.addAttribute("province", list); |
| | | return PREFIX + "examineCoursePackage.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到审核详情页 |
| | | * @param model |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/showExamineCoursePackageDetails") |
| | | public String showExamineCoursePackageDetails(Model model, Integer id){ |
| | | TCoursePackage tCoursePackage = coursePackageService.queryById(id); |
| | | model.addAttribute("item", tCoursePackage); |
| | | model.addAttribute("classTime", tCoursePackage.getClassStartTime() + ":00 - " + tCoursePackage.getClassEndTime() + ":00"); |
| | | String[] split = tCoursePackage.getClassWeeks().split(";"); |
| | | List<String> list5 = Arrays.asList("周一", "周二", "周三", "周四", "周五", "周六", "周日"); |
| | | List<Map<String, Object>> classWeeks = new ArrayList<>(); |
| | | for (String s : list5) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("value", s); |
| | | map.put("checked", false); |
| | | for (String s1 : split) { |
| | | if(s.equals(s1)){ |
| | | map.put("checked", true); |
| | | } |
| | | } |
| | | classWeeks.add(map); |
| | | } |
| | | model.addAttribute("classWeeks", classWeeks); |
| | | List<TCoursePackageType> tCoursePackageTypes = coursePackageTypeClient.queryAllCoursePackageType(); |
| | | model.addAttribute("coursePackageType", tCoursePackageTypes); |
| | | String cityCode = tCoursePackage.getCityCode(); |
| | | String provinceCode = tCoursePackage.getProvinceCode(); |
| | | List<Map<String, Object>> list = storeService.queryProvince(cityCode); |
| | | model.addAttribute("province", list); |
| | | List<Map<String, Object>> list1 = storeService.queryCity(provinceCode, cityCode); |
| | | model.addAttribute("city", list1); |
| | | List<TStore> list2 = storeService.list(new QueryWrapper<TStore>().eq("cityCode", cityCode).eq("state", 1)); |
| | | model.addAttribute("store", list2); |
| | | List<TSite> list3 = siteService.list(new QueryWrapper<TSite>().eq("storeId", tCoursePackage.getStoreId()).eq("state", 1)); |
| | | model.addAttribute("site", list3); |
| | | List<Coach> coaches = coachClient.queryCoachByCity(cityCode); |
| | | model.addAttribute("coach", coaches); |
| | | List<CoursePackagePaymentConfig> list4 = coursePackagePaymentConfigClient.queryCoursePackagePaymentConfigList(id); |
| | | model.addAttribute("coursePackagePaymentConfig", list4.remove(0)); |
| | | model.addAttribute("coursePackagePaymentConfigs", list4); |
| | | CoursePackagePaymentConfig coursePackagePaymentConfig = list4.get(0); |
| | | model.addAttribute("cashPayment", coursePackagePaymentConfig.getCashPayment() == 0 ? false : true); |
| | | model.addAttribute("playPaiCoin", coursePackagePaymentConfig.getPlayPaiCoin() == 0 ? false : true); |
| | | return PREFIX + "examineCoursePackage_info.html"; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | return storeService.queryCity(code, cityCode); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据城市code获取门店 |
| | | * @param cityCode |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/queryStore") |
| | | public List<TStore> queryStore(String cityCode){ |
| | | List<TStore> list = storeService.list(new QueryWrapper<TStore>().eq("cityCode", cityCode).eq("state", 1)); |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 根据门店id获取场地 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/querySite") |
| | | public List<TSite> querySite(Integer storeId){ |
| | | List<TSite> list = siteService.list(new QueryWrapper<TSite>().eq("storeId", storeId).eq("state", 1)); |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 获取城市教练 |
| | | * @param cityCode |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/queryCoach") |
| | | public List<Coach> queryCoach(String cityCode){ |
| | | List<Coach> coaches = coachClient.queryCoachByCity(cityCode); |
| | | return coaches; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加课包数据 |
| | | * @param coursePackage |
| | | * @param coursePackagePaymentConfig |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/addCoursePackage") |
| | | public ResultUtil addCoursePackage(TCoursePackage coursePackage, String coursePackagePaymentConfig){ |
| | | String classStartTime = coursePackage.getClassStartTime(); |
| | | String classEndTime = coursePackage.getClassEndTime(); |
| | | classStartTime = classStartTime.substring(0, classStartTime.lastIndexOf(":")); |
| | | classEndTime = classEndTime.substring(0, classEndTime.lastIndexOf(":")); |
| | | coursePackage.setClassStartTime(classStartTime); |
| | | coursePackage.setClassEndTime(classEndTime); |
| | | coursePackage.setAuditStatus(1); |
| | | coursePackage.setStatus(1); |
| | | coursePackage.setState(1); |
| | | coursePackage.setInsertTime(new Date()); |
| | | coursePackageService.addCoursePackage(coursePackage, coursePackagePaymentConfig); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * @param coursePackage |
| | | * @param coursePackagePaymentConfig |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/updateCoursePackage") |
| | | public ResultUtil updateCoursePackage(TCoursePackage coursePackage, String coursePackagePaymentConfig){ |
| | | String classStartTime = coursePackage.getClassStartTime(); |
| | | String classEndTime = coursePackage.getClassEndTime(); |
| | | classStartTime = classStartTime.substring(0, classStartTime.lastIndexOf(":")); |
| | | classEndTime = classEndTime.substring(0, classEndTime.lastIndexOf(":")); |
| | | coursePackage.setClassStartTime(classStartTime); |
| | | coursePackage.setClassEndTime(classEndTime); |
| | | coursePackageService.updateCoursePackage(coursePackage, coursePackagePaymentConfig); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改数据状态 |
| | | * @param id |
| | | * @param state |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/editCoursePackageState") |
| | | public ResultUtil editCoursePackageState(Integer id, Integer state){ |
| | | TCoursePackage coursePackage = new TCoursePackage(); |
| | | coursePackage.setId(id); |
| | | coursePackage.setState(state); |
| | | coursePackageService.editCoursePackageState(coursePackage); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 编辑课包折扣 |
| | | * @param json |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/setCoursePackageDiscount") |
| | | public ResultUtil setCoursePackageDiscount(Integer id, String json){ |
| | | return coursePackageService.setCoursePackageDiscount(id, json); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取课包报名信息列表 |
| | | * @param id |
| | | * @param userName |
| | | * @param studentName |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/queryRegistrationRecord") |
| | | public Object queryRegistrationRecord(Integer id, String userName, String studentName){ |
| | | Page<Map<String, Object>> mapPage = coursePackageService.queryRegistrationRecord(id, userName, studentName); |
| | | return super.packForBT(mapPage); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取课包排课数据 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/queryClassRecord") |
| | | public Object queryClassRecord(Integer id){ |
| | | Page<Map<String, Object>> page = coursePackageService.queryCoursePackageSchedulingList(id); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据排课id获取学员预约数据列表 |
| | | * @param id |
| | | * @param userName |
| | | * @param studentName |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/queryCoursePackageStudentList") |
| | | public Object queryCoursePackageStudentList(Long id, String userName, String studentName){ |
| | | Page<Map<String, Object>> page = coursePackageService.queryCoursePackageStudentList(id, userName, studentName); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 取消预约 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/cancelReservation") |
| | | public ResultUtil cancelReservation(Long id){ |
| | | return coursePackageService.cancelReservation(id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改缺席状态 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/setAbsenceStatus") |
| | | public ResultUtil setAbsenceStatus(Long id){ |
| | | return coursePackageService.setAbsenceStatus(id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 取消排课记录 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/cancelClassSchedule") |
| | | public ResultUtil cancelClassSchedule(Long id){ |
| | | return coursePackageService.cancelClassSchedule(id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 发布课后练习 |
| | | * @param id |
| | | * @param courseId |
| | | * @param integral |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/afterClassExercises") |
| | | public ResultUtil afterClassExercises(Long id, Integer courseId, Integer integral){ |
| | | return coursePackageService.afterClassExercises(id, courseId, integral); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加消课凭证 |
| | | * @param id |
| | | * @param cancelClasses |
| | | * @param deductClassHour |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/cancellationRecord") |
| | | public ResultUtil cancellationRecord(Long id, String cancelClasses, Integer deductClassHour){ |
| | | return coursePackageService.cancellationRecord(id, cancelClasses, deductClassHour); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取未预约排课学员列表 |
| | | * @param coursePackageSchedulingId |
| | | * @param userName |
| | | * @param studentName |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/queryWalkInStudentList") |
| | | public Object queryWalkInStudentList(Long coursePackageSchedulingId, String userName, String studentName){ |
| | | Page<Map<String, Object>> page = coursePackageService.queryWalkInStudentList(coursePackageSchedulingId, userName, studentName); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 手动预约课程 |
| | | * @param coursePackagePaymentId |
| | | * @param coursePackageSchedulingId |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/courseReservation") |
| | | public ResultUtil courseReservation(Long coursePackagePaymentId, Long coursePackageSchedulingId){ |
| | | return coursePackageService.courseReservation(coursePackagePaymentId, coursePackageSchedulingId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 退课操作 |
| | | * @param coursePackagePaymentId |
| | | * @param certificate |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/dropTheClass") |
| | | public ResultUtil dropTheClass(Long coursePackagePaymentId, String certificate){ |
| | | return coursePackageService.dropTheClass(coursePackagePaymentId, certificate); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 补课操作 |
| | | * @param coursePackagePaymentId |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/makeUpMissedLessons") |
| | | public ResultUtil makeUpMissedLessons(Long coursePackagePaymentId){ |
| | | return coursePackageService.makeUpMissedLessons(coursePackagePaymentId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取课包审核列表 |
| | | * @param provinceCode |
| | | * @param cityCode |
| | | * @param coursePackageTypeId |
| | | * @param name |
| | | * @param auditStatus |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/queryExamineCoursePackageLists") |
| | | public Object queryExamineCoursePackageLists(String provinceCode, String cityCode, Integer coursePackageTypeId, String name, Integer auditStatus){ |
| | | Page<Map<String, Object>> mapPage = coursePackageService.queryExamineCoursePackageLists(provinceCode, cityCode, coursePackageTypeId, name, auditStatus); |
| | | return super.packForBT(mapPage); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 审核课包 |
| | | * @param id |
| | | * @param auditStatus |
| | | * @param authRemark |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/setCoursePackageAuditStatus") |
| | | public ResultUtil setCoursePackageAuditStatus(Integer id, Integer auditStatus, String authRemark){ |
| | | return coursePackageService.setCoursePackageAuditStatus(id, auditStatus, authRemark); |
| | | } |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.account.AppUserClient; |
| | | import com.dsh.course.feignClient.account.CityManagerClient; |
| | | import com.dsh.course.feignClient.account.model.CityManager; |
| | | import com.dsh.course.feignClient.account.model.QueryByNamePhone; |
| | | import com.dsh.course.feignClient.account.model.TAppUser; |
| | | import com.dsh.course.feignClient.account.model.TCityManager; |
| | | import com.dsh.course.feignClient.activity.CouponClient; |
| | | import com.dsh.course.feignClient.activity.PointMercharsClient; |
| | | import com.dsh.course.feignClient.activity.model.*; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.tips.ErrorTip; |
| | | import com.dsh.guns.core.base.tips.SuccessTip; |
| | | import com.dsh.guns.core.common.constant.factory.PageFactory; |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.CouponDataVo; |
| | | import com.dsh.guns.modular.system.model.Region; |
| | | 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.IRegionService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.util.OBSUploadUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.IOException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | /** |
| | | * 优惠券管理 控制器 |
| | | */ |
| | | |
| | | @Controller |
| | | @RequestMapping("/tGoods") |
| | | public class TGoodsController { |
| | | |
| | | |
| | | |
| | | private String PREFIX = "/system/tGoods/"; |
| | | |
| | | |
| | | @Resource |
| | | private IRegionService regiService; |
| | | |
| | | @Resource |
| | | private IStoreService storeService; |
| | | |
| | | @Resource |
| | | private CouponClient client; |
| | | |
| | | @Resource |
| | | private CityManagerClient cmgrClient; |
| | | |
| | | @Autowired |
| | | private AppUserClient appUserClient; |
| | | @Autowired |
| | | private ICityService cityService; |
| | | |
| | | @Resource |
| | | private PointMercharsClient pointMercharsClient; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跳转到优惠券管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | |
| | | return PREFIX + "TGoods.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tGoods_add") |
| | | public String memberCouponAdd(Model model) { |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | System.out.println(objectType); |
| | | model.addAttribute("userType",objectType); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | return PREFIX + "TGoods_add.html"; |
| | | } |
| | | |
| | | |
| | | @RequestMapping("/coupon_record/{id}") |
| | | public String memberCouponAdd(@PathVariable Integer id,Model model) { |
| | | Coupon coupon = client.queryCouponById(id); |
| | | |
| | | model.addAttribute("id",id); |
| | | model.addAttribute("type",coupon.getType()); |
| | | return PREFIX + "TCouponRecord.html"; |
| | | } |
| | | |
| | | |
| | | |
| | | @RequestMapping("/coupon_detail/{id}") |
| | | public String memberCouponDetail(@PathVariable Integer id,Model model) { |
| | | Coupon coupon = client.queryCouponById(id); |
| | | String content = coupon.getContent(); |
| | | JSONObject jsonObject = JSONObject.parseObject(content); |
| | | String one =""; |
| | | String two =""; |
| | | String three =""; |
| | | if(coupon.getType()==1){ |
| | | one = jsonObject.get("conditionalAmount").toString(); |
| | | two = jsonObject.get("deductionAmount").toString(); |
| | | } |
| | | if(coupon.getType()==2){ |
| | | one = jsonObject.get("conditionalAmount").toString(); |
| | | } |
| | | if(coupon.getType()==3){ |
| | | three = jsonObject.get("experienceName").toString(); |
| | | } |
| | | List<CouponCity> list = new ArrayList<>(); |
| | | List<Integer> list1=null; |
| | | List<TStore> list2=new ArrayList<>(); |
| | | if(coupon.getUseScope()==2){ |
| | | list = client.queryCity(coupon.getId()); |
| | | } |
| | | if(coupon.getUseScope()==3){ |
| | | list1 = client.queryStore(coupon.getId()); |
| | | list2 = storeService.list(new LambdaQueryWrapper<TStore>().in(TStore::getId, list1)); |
| | | for (TStore tStore : list2) { |
| | | CityManager cityManager = cmgrClient.queryCityManagerById(tStore.getCityManagerId()); |
| | | if (ToolUtil.isNotEmpty(cityManager)){ |
| | | tStore.setProvince(tStore.getProvince()+tStore.getCity()); |
| | | tStore.setPhone(cityManager.getName()+"-"+cityManager.getPhone()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | model.addAttribute("city",list); |
| | | model.addAttribute("store",list2); |
| | | model.addAttribute("s",new SimpleDateFormat("yyyy-MM-dd").format(coupon.getStartTime())); |
| | | model.addAttribute("e",new SimpleDateFormat("yyyy-MM-dd").format(coupon.getEndTime())); |
| | | model.addAttribute("one",one); |
| | | model.addAttribute("two",two); |
| | | model.addAttribute("three",three); |
| | | ArrayList<String> strings = new ArrayList<>(); |
| | | String productImages = coupon.getProductImages(); |
| | | for (String s : productImages.split(",")) { |
| | | strings.add(s); |
| | | } |
| | | |
| | | model.addAttribute("img",strings); |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | System.out.println(objectType); |
| | | model.addAttribute("item",coupon); |
| | | return PREFIX + "TCouponInfo.html"; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跳转到门店管理列表页 |
| | | */ |
| | | @RequestMapping("/storeList") |
| | | public String storePage(Model model) { |
| | | return PREFIX + "TStoreList.html"; |
| | | } |
| | | @RequestMapping("/updateType") |
| | | @ResponseBody |
| | | public Object updateType(Long id) { |
| | | client.updateType(id); |
| | | return new SuccessTip<>(); |
| | | } |
| | | |
| | | @RequestMapping("/storeDetailsOfSearch") |
| | | @ResponseBody |
| | | public Object listOfStore(Integer provinceId,Integer cityId,Integer cityManagerId,String storeName){ |
| | | System.out.println("provinceId"+provinceId); |
| | | System.out.println("cityId"+cityId); |
| | | System.out.println("cityManagerId"+cityManagerId); |
| | | System.out.println("storeName"+storeName); |
| | | String provinceCode = null; |
| | | String cityCode = null; |
| | | if (ToolUtil.isNotEmpty(provinceId)){ |
| | | Region provinceRegion = regiService.getById(provinceId); |
| | | provinceCode = provinceRegion.getCode(); |
| | | } |
| | | if (ToolUtil.isNotEmpty(cityId)){ |
| | | Region cityRegion = regiService.getById(cityId); |
| | | cityCode = cityRegion.getCode(); |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | List<Map<String,Object>> storeList = storeService.queryListOfpage(provinceCode,cityCode,cityManagerId,storeName,page); |
| | | if (storeList.size() > 0 ){ |
| | | for (Map<String, Object> stringObjectMap : storeList) { |
| | | String provinceName = (String) stringObjectMap.get("province"); |
| | | String cityName = (String) stringObjectMap.get("city"); |
| | | stringObjectMap.put("provinceCity",provinceName+cityName); |
| | | Integer managerId = (Integer) stringObjectMap.get("cityManagerId"); |
| | | CityManager cityManager = cmgrClient.queryCityManagerById(managerId); |
| | | if (ToolUtil.isNotEmpty(cityManager)){ |
| | | stringObjectMap.put("accountName",cityManager.getName()+"+"+cityManager.getPhone()); |
| | | } |
| | | } |
| | | } |
| | | return storeList; |
| | | } |
| | | |
| | | @RequestMapping(value = "/listRecord") |
| | | @ResponseBody |
| | | public Object listRecord(Integer id,String name, Integer type, String phone) { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | List<TAppUser> tAppUsers = appUserClient.queryByNamePhone(new QueryByNamePhone(name, phone)); |
| | | if(tAppUsers.size()==0){ |
| | | return new ArrayList<>(); |
| | | } |
| | | CouponRecordQuery ofSearch = new CouponRecordQuery(); |
| | | ofSearch.setId(id); |
| | | ofSearch.setLimit(page.getSize()); |
| | | ofSearch.setOffset(page.getCurrent()); |
| | | ofSearch.setIds(tAppUsers.stream().map(TAppUser::getId).collect(Collectors.toList())); |
| | | ofSearch.setType(type); |
| | | List<Map<String, Object>> maps = client.listRecord(ofSearch); |
| | | for (Map<String, Object> map : maps) { |
| | | map.put("id",map.get("id").toString()); |
| | | for (TAppUser tAppUser : tAppUsers) { |
| | | if(map.get("userId").equals(tAppUser.getId())){ |
| | | map.put("name",tAppUser.getName()); |
| | | map.put("phone",tAppUser.getPhone()); |
| | | } |
| | | } |
| | | } |
| | | return maps; |
| | | } |
| | | |
| | | @RequestMapping(value = "/getProvince") |
| | | @ResponseBody |
| | | public Object getProvince(){ |
| | | return regiService.list(new LambdaQueryWrapper<Region>() |
| | | .eq(Region::getParentId,0)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/onShelf") |
| | | @ResponseBody |
| | | public Object onShelf(Integer id,Integer type){ |
| | | Coupon coupon = client.queryCouponById(id); |
| | | coupon.setState(type); |
| | | client.updateCouponData(coupon); |
| | | return new SuccessTip<>(); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/getCity") |
| | | @ResponseBody |
| | | public Object getCity(Integer province){ |
| | | return regiService.list(new LambdaQueryWrapper<Region>() |
| | | .eq(Region::getParentId,province)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/uploadPic") |
| | | @ResponseBody |
| | | public Object add(@RequestParam("file") MultipartFile imgFile) throws IOException { |
| | | String originalFilename = imgFile.getOriginalFilename(); |
| | | String newName = originalFilename.substring(imgFile.getOriginalFilename().lastIndexOf(".")); |
| | | String url = OBSUploadUtil.inputStreamUpload(imgFile); |
| | | Map<String, String> map = new HashMap<String, String>(); |
| | | //是否上传成功 |
| | | map.put("state", "SUCCESS"); |
| | | //现在文件名称 |
| | | map.put("title", newName); |
| | | //文件原名称 |
| | | map.put("original", originalFilename); |
| | | //文件类型 .+后缀名 |
| | | map.put("type", originalFilename.substring(imgFile.getOriginalFilename().lastIndexOf("."))); |
| | | //文件路径 |
| | | map.put("url", url); |
| | | //文件大小(字节数) |
| | | map.put("size", imgFile.getSize() + ""); |
| | | System.out.println(map); |
| | | return url; |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | @PostMapping(value = "/commitData") |
| | | @ResponseBody |
| | | public Object commitData( CouponDataVo dataVo){ |
| | | System.out.println(dataVo); |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | dataVo.setUserType(objectType); |
| | | client.insertIntoData(dataVo); |
| | | return new SuccessTip<>(); |
| | | } |
| | | @PostMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update( Integer id,Integer num,Integer num1,String text){ |
| | | Coupon coupon = client.queryCouponById(id); |
| | | coupon.setQuantityIssued(num); |
| | | coupon.setPickUpQuantity(num1); |
| | | coupon.setIllustrate(text); |
| | | client.updateCouponData(coupon); |
| | | return new SuccessTip<>(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取 积分商品列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object listOfIntegralGoods(String name, Integer type, Integer redemptionMethod , Integer userPopulation, Integer activeStatus, Integer state) { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | |
| | | IntegralGoodsOfSearch ofSearch = new IntegralGoodsOfSearch(); |
| | | ofSearch.setPage(page); |
| | | ofSearch.setName(name); |
| | | ofSearch.setType(type); |
| | | ofSearch.setRedemptionMethod(redemptionMethod); |
| | | ofSearch.setUserPopulation(userPopulation); |
| | | ofSearch.setActiveStatus(activeStatus); |
| | | ofSearch.setState(state); |
| | | System.out.println(ofSearch); |
| | | return pointMercharsClient.getIntegralGoodsListOfSearch(ofSearch); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跳转到修改车辆管理 |
| | | */ |
| | | @RequestMapping("/tGoods_update/{id}") |
| | | public String tCityUpdate(@PathVariable Integer id, Model model) { |
| | | System.out.println("id:"+id); |
| | | PointMercharsVo pointMercharsVo = pointMercharsClient.queryPointMerchaseDetailOfId(id); |
| | | System.out.println("pointMercharsVo:"+pointMercharsVo); |
| | | String[] split = pointMercharsVo.getPics().split(","); |
| | | model.addAttribute("item",pointMercharsVo); |
| | | model.addAttribute("pictures",split); |
| | | return PREFIX + "TGoods_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 上下架处理操作 |
| | | * @param id 商品id |
| | | * @param type 1=上架操作 2=下架操作 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/grounding") |
| | | @ResponseBody |
| | | public Object updateGrounding(Integer id,Integer type) { |
| | | System.out.println(id); |
| | | System.out.println(type); |
| | | Map<String,Integer> map = new HashMap<>(); |
| | | map.put("id",id); |
| | | map.put("type",type); |
| | | boolean b = pointMercharsClient.updateGoodsGroudingStatus(map); |
| | | System.out.println(b); |
| | | return new SuccessTip<>(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 购买详情 |
| | | * @param id 商品id |
| | | * @return |
| | | */ |
| | | @RequestMapping("/tPay_detail/{id}") |
| | | public String payOfDetails(@PathVariable(value = "id") Integer id,Model model) { |
| | | System.out.println(id); |
| | | model.addAttribute("id",id); |
| | | return PREFIX + "TGoods_pay.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取 购买记录列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/payList/{id}") |
| | | public Object payList(@PathVariable(value = "id") Integer id, String name, String phone, Integer status) { |
| | | PointMercharsPayedVo payedVo = new PointMercharsPayedVo(); |
| | | payedVo.setId(id); |
| | | payedVo.setName(name); |
| | | payedVo.setPhone(phone); |
| | | payedVo.setStatus(status); |
| | | List<Map<String,Object>> points = pointMercharsClient.queryUserPayedGoodsList(payedVo); |
| | | System.out.println(points); |
| | | if (points.size() > 0 ){ |
| | | for (Map<String, Object> point : points) { |
| | | Integer userId = (Integer) point.get("userId"); |
| | | TAppUser tAppUser = appUserClient.queryById(userId); |
| | | if (ToolUtil.isNotEmpty(tAppUser)){ |
| | | point.put("name",tAppUser.getName()); |
| | | point.put("phone",tAppUser.getPhone()); |
| | | } |
| | | } |
| | | if (ToolUtil.isNotEmpty(name)){ |
| | | points = points.stream() |
| | | .filter(data -> { |
| | | String obtName = (String) data.get("name"); |
| | | return obtName != null && obtName.contains(name); |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | if (ToolUtil.isNotEmpty(phone)){ |
| | | points = points.stream() |
| | | .filter(data -> { |
| | | String obtPhone = (String) data.get("phone"); |
| | | return obtPhone != null && obtPhone.contains(phone); |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | } |
| | | return points; |
| | | } |
| | | |
| | | /** |
| | | * 核销操作 |
| | | * @param id 商品id |
| | | * @return |
| | | */ |
| | | @RequestMapping("/write_off") |
| | | @ResponseBody |
| | | public Object GoodsWriteOff(Integer id){ |
| | | System.out.println(id); |
| | | // TODO: 2023/8/15 核销操作 |
| | | return new SuccessTip<>(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | public Object list(String name, String phone,Integer type,Integer category,String time) { |
| | | Page<UserIntegral> page = new PageFactory<UserIntegral>().defaultPage(); |
| | | IntegralListQuery integralListQuery = new IntegralListQuery(page.getSize(), page.getCurrent(), name, phone, type, category, time); |
| | | List<UserIntegral> list = client.list(integralListQuery); |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | Page<UserIntegral> list = client.list(integralListQuery); |
| | | return super.packForBT(list); |
| | | } |
| | | @RequestMapping("/tIntegral_add") |
| | | public String tCompetitionAdd(Model model) { |
| | | return PREFIX + "TIntegral_add.html"; |
| | | } |
| | | |
| | | |
| | |
| | | /** |
| | | * 体验券名称 |
| | | */ |
| | | BigDecimal experience; |
| | | String experience; |
| | | /** |
| | | * 说明 |
| | | */ |
| | |
| | | /** |
| | | * 图片列表 |
| | | */ |
| | | List<String> goodImgs; |
| | | String goodImgs; |
| | | /** |
| | | * 适用范围 |
| | | */ |
| | |
| | | /** |
| | | * 城市code |
| | | */ |
| | | List<Integer> cityIds; |
| | | String cityIds; |
| | | /** |
| | | * 门店列表 |
| | | */ |
| | | List<Integer> storeIds; |
| | | String storeIds; |
| | | } |
| | |
| | | package com.dsh.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.course.model.CoursePackageScheduling; |
| | | import com.dsh.course.feignClient.course.model.TCoursePackage; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | |
| | | import java.util.Map; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | Page<Map<String, Object>> queryCoursePackageLists(String provinceCode, String cityCode, Integer coursePackageTypeId, Integer storeId, String name, Integer status, Integer state); |
| | | |
| | | |
| | | /** |
| | | * 添加数据 |
| | | * @param coursePackage |
| | | * @param coursePackagePaymentConfig |
| | | */ |
| | | void addCoursePackage(TCoursePackage coursePackage, String coursePackagePaymentConfig); |
| | | |
| | | |
| | | /** |
| | | * 获取数据 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | TCoursePackage queryById(Integer id); |
| | | |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * @param coursePackage |
| | | * @param coursePackagePaymentConfig |
| | | */ |
| | | void updateCoursePackage(TCoursePackage coursePackage, String coursePackagePaymentConfig); |
| | | |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * @param coursePackage |
| | | */ |
| | | void editCoursePackageState(TCoursePackage coursePackage); |
| | | |
| | | |
| | | /** |
| | | * 编辑课包折扣 |
| | | * @param json |
| | | * @return |
| | | */ |
| | | ResultUtil setCoursePackageDiscount(Integer id, String json); |
| | | |
| | | |
| | | /** |
| | | * 获取课程报名信息 |
| | | * @param id |
| | | * @param userName |
| | | * @param studentName |
| | | * @return |
| | | */ |
| | | Page<Map<String, Object>> queryRegistrationRecord(Integer id, String userName, String studentName); |
| | | |
| | | |
| | | /** |
| | | * 获取课包上课信息列表 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Page<Map<String, Object>> queryCoursePackageSchedulingList(Integer id); |
| | | |
| | | |
| | | /** |
| | | * 获取排课对应学员数据 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Page<Map<String, Object>> queryCoursePackageStudentList(Long id, String userName, String studentName); |
| | | |
| | | |
| | | /** |
| | | * 取消学员预约数据 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | ResultUtil cancelReservation(Long id); |
| | | |
| | | |
| | | /** |
| | | * 修改缺席状态 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | ResultUtil setAbsenceStatus(Long id); |
| | | |
| | | |
| | | /** |
| | | * 取消本次排课数据 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | ResultUtil cancelClassSchedule(Long id); |
| | | |
| | | |
| | | /** |
| | | * 添加课后练习 |
| | | * @param id |
| | | * @param courseId |
| | | * @param integral |
| | | * @return |
| | | */ |
| | | ResultUtil afterClassExercises(Long id, Integer courseId, Integer integral); |
| | | |
| | | |
| | | /** |
| | | * 上传消课凭证 |
| | | * @param id |
| | | * @param cancelClasses |
| | | * @param deductClassHour |
| | | * @return |
| | | */ |
| | | ResultUtil cancellationRecord(Long id, String cancelClasses, Integer deductClassHour); |
| | | |
| | | |
| | | /** |
| | | * 获取未预约排课学员列表 |
| | | * @param coursePackageSchedulingId |
| | | * @param userName |
| | | * @param studentName |
| | | * @return |
| | | */ |
| | | Page<Map<String, Object>> queryWalkInStudentList(Long coursePackageSchedulingId, String userName, String studentName); |
| | | |
| | | |
| | | /** |
| | | * 手动预约课程 |
| | | * @param coursePackagePaymentId |
| | | * @param coursePackageSchedulingId |
| | | * @return |
| | | */ |
| | | ResultUtil courseReservation(Long coursePackagePaymentId, Long coursePackageSchedulingId); |
| | | |
| | | |
| | | /** |
| | | * 退课操作 |
| | | * @param coursePackagePaymentId |
| | | * @param certificate |
| | | * @return |
| | | */ |
| | | ResultUtil dropTheClass(Long coursePackagePaymentId, String certificate); |
| | | |
| | | |
| | | /** |
| | | * 补课操作 |
| | | * @param coursePackagePaymentId |
| | | * @return |
| | | */ |
| | | ResultUtil makeUpMissedLessons(Long coursePackagePaymentId); |
| | | |
| | | |
| | | /** |
| | | * 获取课包审核列表 |
| | | * @param provinceCode |
| | | * @param cityCode |
| | | * @param coursePackageTypeId |
| | | * @param name |
| | | * @param auditStatus |
| | | * @return |
| | | */ |
| | | Page<Map<String, Object>> queryExamineCoursePackageLists(String provinceCode, String cityCode, Integer coursePackageTypeId, String name, Integer auditStatus); |
| | | |
| | | |
| | | /** |
| | | * 审核课包 |
| | | * @param id |
| | | * @param auditStatus |
| | | * @param authRemark |
| | | * @return |
| | | */ |
| | | ResultUtil setCoursePackageAuditStatus(Integer id, Integer auditStatus, String authRemark); |
| | | } |
| | |
| | | * @param state |
| | | */ |
| | | void editCourseState(Integer id, Integer state); |
| | | |
| | | |
| | | /** |
| | | * 根据类型获取数据 |
| | | * @param type |
| | | * @return |
| | | */ |
| | | List<TCourse> queryCourseByType(Integer type); |
| | | } |
| | |
| | | package com.dsh.guns.modular.system.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.course.CoursePackageClient; |
| | | import com.dsh.course.feignClient.course.model.QueryCoursePackageLists; |
| | | import com.dsh.course.feignClient.course.*; |
| | | import com.dsh.course.feignClient.course.model.*; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.support.HttpKit; |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.service.ICoursePackageService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | |
| | | @Resource |
| | | private CoursePackagePaymentConfigClient coursePackagePaymentConfigClient; |
| | | |
| | | @Resource |
| | | private CoursePackageDiscountClient coursePackageDiscountClient; |
| | | |
| | | @Resource |
| | | private CoursePackagePaymentClient coursePackagePaymentClient; |
| | | |
| | | @Resource |
| | | private CoursePackageSchedulingClient coursePackageSchedulingClient; |
| | | |
| | | @Resource |
| | | private CoursePackageStudentClient coursePackageStudentClient; |
| | | |
| | | @Resource |
| | | private CancelledClassesClient cancelledClassesClient; |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | return mapPage; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加课包数据 |
| | | * @param coursePackage |
| | | * @param coursePackagePaymentConfig |
| | | */ |
| | | @Override |
| | | public void addCoursePackage(TCoursePackage coursePackage, String coursePackagePaymentConfig) { |
| | | Integer integer = coursePackageClient.addCoursePackage(coursePackage); |
| | | JSONArray jsonArray = JSON.parseArray(coursePackagePaymentConfig); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i); |
| | | Integer classHours = jsonObject.getInteger("classHours"); |
| | | Double cashPayment = jsonObject.getDouble("cashPayment"); |
| | | Integer playPaiCoin = jsonObject.getInteger("playPaiCoin"); |
| | | CoursePackagePaymentConfig coursePackagePaymentConfig1 = new CoursePackagePaymentConfig(); |
| | | coursePackagePaymentConfig1.setCoursePackageId(integer); |
| | | coursePackagePaymentConfig1.setClassHours(classHours); |
| | | coursePackagePaymentConfig1.setCashPayment(cashPayment); |
| | | coursePackagePaymentConfig1.setPlayPaiCoin(playPaiCoin); |
| | | coursePackagePaymentConfigClient.addCoursePackagePaymentConfig(coursePackagePaymentConfig1); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据id获取数据 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public TCoursePackage queryById(Integer id) { |
| | | return coursePackageClient.queryById(id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 编辑数据 |
| | | * @param coursePackage |
| | | * @param coursePackagePaymentConfig |
| | | */ |
| | | @Override |
| | | public void updateCoursePackage(TCoursePackage coursePackage, String coursePackagePaymentConfig) { |
| | | coursePackageClient.updateCoursePackage(coursePackage); |
| | | coursePackagePaymentConfigClient.delCoursePackagePaymentConfig(coursePackage.getId()); |
| | | JSONArray jsonArray = JSON.parseArray(coursePackagePaymentConfig); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i); |
| | | Integer classHours = jsonObject.getInteger("classHours"); |
| | | Double cashPayment = jsonObject.getDouble("cashPayment"); |
| | | Integer playPaiCoin = jsonObject.getInteger("playPaiCoin"); |
| | | CoursePackagePaymentConfig coursePackagePaymentConfig1 = new CoursePackagePaymentConfig(); |
| | | coursePackagePaymentConfig1.setCoursePackageId(coursePackage.getId()); |
| | | coursePackagePaymentConfig1.setClassHours(classHours); |
| | | coursePackagePaymentConfig1.setCashPayment(cashPayment); |
| | | coursePackagePaymentConfig1.setPlayPaiCoin(playPaiCoin); |
| | | coursePackagePaymentConfigClient.addCoursePackagePaymentConfig(coursePackagePaymentConfig1); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * @param coursePackage |
| | | */ |
| | | @Override |
| | | public void editCoursePackageState(TCoursePackage coursePackage) { |
| | | coursePackageClient.updateCoursePackage(coursePackage); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 编辑课包折扣 |
| | | * @param json |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResultUtil setCoursePackageDiscount(Integer id, String json) { |
| | | List<TCoursePackageDiscount> list = new ArrayList<>(); |
| | | JSONArray jsonArray = JSON.parseArray(json); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i); |
| | | Integer coursePackagePaymentConfigId = jsonObject.getInteger("coursePackagePaymentConfigId"); |
| | | JSONArray coursePackageDiscount = jsonObject.getJSONArray("coursePackageDiscount"); |
| | | if(coursePackageDiscount.size() == 0){ |
| | | continue; |
| | | } |
| | | for (int j = 0; j < coursePackageDiscount.size(); j++) { |
| | | JSONObject cpd = coursePackageDiscount.getJSONObject(j); |
| | | Integer type = cpd.getInteger("type"); |
| | | switch (type){ |
| | | case 1: |
| | | JSONObject content1 = cpd.getJSONObject("content"); |
| | | if(null == content1){ |
| | | return ResultUtil.error("请填写有效的会员折扣"); |
| | | } |
| | | Double discountMember = content1.getDouble("discountMember"); |
| | | if(null == discountMember){ |
| | | return ResultUtil.error("请填写有效的会员折扣价格"); |
| | | } |
| | | break; |
| | | case 2: |
| | | JSONObject content2 = cpd.getJSONObject("content"); |
| | | if(null == content2){ |
| | | return ResultUtil.error("请填写有效的续课优惠"); |
| | | } |
| | | Double continuingMember = content2.getDouble("continuingMember"); |
| | | if(null == continuingMember){ |
| | | return ResultUtil.error("请填写有效的会员续课价格"); |
| | | } |
| | | Double continuingUser = content2.getDouble("continuingUser"); |
| | | if(null == continuingUser){ |
| | | return ResultUtil.error("请填写有效的用户续课价格"); |
| | | } |
| | | break; |
| | | case 3: |
| | | JSONArray content3 = cpd.getJSONArray("content"); |
| | | if(content3.size() == 0){ |
| | | return ResultUtil.error("请配置有效的限时折扣"); |
| | | } |
| | | for (int k = 0; k < content3.size(); k++) { |
| | | JSONObject jsonObject1 = content3.getJSONObject(k); |
| | | String startDate = jsonObject1.getString("startDate"); |
| | | String endDate = jsonObject1.getString("endDate"); |
| | | String startTime = jsonObject1.getString("startTime"); |
| | | String endTime = jsonObject1.getString("endTime"); |
| | | JSONArray weeks = jsonObject1.getJSONArray("weeks"); |
| | | Double cashPayment = jsonObject1.getDouble("cashPayment"); |
| | | if(ToolUtil.isEmpty(startDate)){ |
| | | return ResultUtil.error("请填写有效的折扣有效期"); |
| | | } |
| | | if(ToolUtil.isEmpty(endDate)){ |
| | | return ResultUtil.error("请填写有效的折扣有效期"); |
| | | } |
| | | if(ToolUtil.isEmpty(startTime)){ |
| | | return ResultUtil.error("请填写有效的折扣时间"); |
| | | } |
| | | if(ToolUtil.isEmpty(endTime)){ |
| | | return ResultUtil.error("请填写有效的折扣时间"); |
| | | } |
| | | if(null == weeks || weeks.size() == 0){ |
| | | return ResultUtil.error("请选择有效的折扣时间星期天"); |
| | | } |
| | | if(null == cashPayment){ |
| | | return ResultUtil.error("请填写有效的折扣金额"); |
| | | } |
| | | } |
| | | break; |
| | | case 4: |
| | | JSONArray content4 = cpd.getJSONArray("content"); |
| | | if(content4.size() == 0){ |
| | | return ResultUtil.error("请配置有效的赠送课时"); |
| | | } |
| | | for (int k = 0; k < content4.size(); k++) { |
| | | JSONObject jsonObject1 = content4.getJSONObject(k); |
| | | String startDate = jsonObject1.getString("startDate"); |
| | | String endDate = jsonObject1.getString("endDate"); |
| | | String startTime = jsonObject1.getString("startTime"); |
| | | String endTime = jsonObject1.getString("endTime"); |
| | | JSONArray weeks = jsonObject1.getJSONArray("weeks"); |
| | | Double hour = jsonObject1.getDouble("hour"); |
| | | if(ToolUtil.isEmpty(startDate)){ |
| | | return ResultUtil.error("请填写有效的赠送有效期"); |
| | | } |
| | | if(ToolUtil.isEmpty(endDate)){ |
| | | return ResultUtil.error("请填写有效的赠送有效期"); |
| | | } |
| | | if(ToolUtil.isEmpty(startTime)){ |
| | | return ResultUtil.error("请填写有效的赠送时间"); |
| | | } |
| | | if(ToolUtil.isEmpty(endTime)){ |
| | | return ResultUtil.error("请填写有效的赠送时间"); |
| | | } |
| | | if(null == weeks || weeks.size() == 0){ |
| | | return ResultUtil.error("请选择有效的赠送时间星期天"); |
| | | } |
| | | if(null == hour){ |
| | | return ResultUtil.error("请填写有效的赠送课时数"); |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | |
| | | TCoursePackageDiscount coursePackageDiscount1 = new TCoursePackageDiscount(); |
| | | coursePackageDiscount1.setCoursePackageId(id); |
| | | coursePackageDiscount1.setCoursePackagePaymentConfigId(coursePackagePaymentConfigId); |
| | | coursePackageDiscount1.setType(type); |
| | | coursePackageDiscount1.setContent(cpd.getString("content")); |
| | | coursePackageDiscount1.setAuditStatus(2); |
| | | coursePackageDiscount1.setInsertTime(new Date()); |
| | | list.add(coursePackageDiscount1); |
| | | } |
| | | } |
| | | coursePackageDiscountClient.setCoursePackageDiscount(list); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取课程报名信息 |
| | | * @param id |
| | | * @param userName |
| | | * @param studentName |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Page<Map<String, Object>> queryRegistrationRecord(Integer id, String userName, String studentName) { |
| | | QueryRegistrationRecord queryRegistrationRecord = new QueryRegistrationRecord(); |
| | | queryRegistrationRecord.setCoursePackageId(id); |
| | | queryRegistrationRecord.setUserName(userName); |
| | | queryRegistrationRecord.setStudentName(studentName); |
| | | HttpServletRequest request = HttpKit.getRequest(); |
| | | queryRegistrationRecord.setLimit(Integer.valueOf(request.getParameter("limit"))); |
| | | queryRegistrationRecord.setOffset(Integer.valueOf(request.getParameter("offset"))); |
| | | queryRegistrationRecord.setSort(request.getParameter("sort")); |
| | | queryRegistrationRecord.setOrder(request.getParameter("order")); |
| | | Page<Map<String, Object>> mapPage = coursePackagePaymentClient.queryRegistrationRecord(queryRegistrationRecord); |
| | | return mapPage; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取课包上课信息 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Page<Map<String, Object>> queryCoursePackageSchedulingList(Integer id) { |
| | | QueryCoursePackageSchedulingList queryClassRecord = new QueryCoursePackageSchedulingList(); |
| | | queryClassRecord.setCoursePackageId(id); |
| | | HttpServletRequest request = HttpKit.getRequest(); |
| | | queryClassRecord.setLimit(Integer.valueOf(request.getParameter("limit"))); |
| | | queryClassRecord.setOffset(Integer.valueOf(request.getParameter("offset"))); |
| | | queryClassRecord.setSort(request.getParameter("sort")); |
| | | queryClassRecord.setOrder(request.getParameter("order")); |
| | | Page<Map<String, Object>> mapPage = coursePackageSchedulingClient.queryCoursePackageSchedulingList(queryClassRecord); |
| | | return mapPage; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取排课对应学员数据 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Page<Map<String, Object>> queryCoursePackageStudentList(Long id, String userName, String studentName) { |
| | | QueryCoursePackageStudentList queryCoursePackageStudentList = new QueryCoursePackageStudentList(); |
| | | queryCoursePackageStudentList.setCoursePackageSchedulingId(id); |
| | | queryCoursePackageStudentList.setUserName(userName); |
| | | queryCoursePackageStudentList.setStudentName(studentName); |
| | | HttpServletRequest request = HttpKit.getRequest(); |
| | | queryCoursePackageStudentList.setLimit(Integer.valueOf(request.getParameter("limit"))); |
| | | queryCoursePackageStudentList.setOffset(Integer.valueOf(request.getParameter("offset"))); |
| | | queryCoursePackageStudentList.setSort(request.getParameter("sort")); |
| | | queryCoursePackageStudentList.setOrder(request.getParameter("order")); |
| | | return coursePackageStudentClient.queryCoursePackageStudentList(queryCoursePackageStudentList); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 取消预约 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResultUtil cancelReservation(Long id) { |
| | | CoursePackageStudent coursePackageStudent = coursePackageStudentClient.queryCoursePackageStudentById(id); |
| | | if(coursePackageStudent.getSignInOrNot() == 1){ |
| | | return ResultUtil.error("无法取消预约"); |
| | | } |
| | | coursePackageStudent = new CoursePackageStudent(); |
| | | coursePackageStudent.setId(id); |
| | | coursePackageStudent.setReservationStatus(0); |
| | | coursePackageStudentClient.editCoursePackageStudent(coursePackageStudent); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改缺席状态 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResultUtil setAbsenceStatus(Long id) { |
| | | CoursePackageStudent coursePackageStudent = coursePackageStudentClient.queryCoursePackageStudentById(id); |
| | | if(coursePackageStudent.getReservationStatus() == 0){ |
| | | return ResultUtil.error("该数据已取消预约"); |
| | | } |
| | | coursePackageStudent = new CoursePackageStudent(); |
| | | coursePackageStudent.setId(id); |
| | | coursePackageStudent.setSignInOrNot(0); |
| | | coursePackageStudentClient.editCoursePackageStudent(coursePackageStudent); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 取消本次排课 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResultUtil cancelClassSchedule(Long id) { |
| | | CoursePackageScheduling coursePackageScheduling = coursePackageSchedulingClient.queryCoursePackageSchedulingById(id); |
| | | if(coursePackageScheduling.getStatus() != 1){ |
| | | return ResultUtil.error("不能取消本次"); |
| | | } |
| | | List<CoursePackageStudent> coursePackageStudents = coursePackageStudentClient.queryByCoursePackageSchedulingId(id); |
| | | if(coursePackageStudents.size() > 0){ |
| | | return ResultUtil.error("不能取消本次"); |
| | | } |
| | | coursePackageScheduling = new CoursePackageScheduling(); |
| | | coursePackageScheduling.setId(id); |
| | | coursePackageScheduling.setStatus(4); |
| | | coursePackageSchedulingClient.editCoursePackageScheduling(coursePackageScheduling); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加课后练习 |
| | | * @param id |
| | | * @param courseId |
| | | * @param integral |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResultUtil afterClassExercises(Long id, Integer courseId, Integer integral) { |
| | | CoursePackageScheduling coursePackageScheduling = coursePackageSchedulingClient.queryCoursePackageSchedulingById(id); |
| | | if(coursePackageScheduling.getStatus() != 3){ |
| | | return ResultUtil.error("不能发布课后练习"); |
| | | } |
| | | coursePackageScheduling.setCourseId(courseId); |
| | | coursePackageScheduling.setIntegral(integral); |
| | | coursePackageSchedulingClient.editCoursePackageScheduling(coursePackageScheduling); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 上传消课凭证 |
| | | * @param id |
| | | * @param cancelClasses |
| | | * @param deductClassHour |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResultUtil cancellationRecord(Long id, String cancelClasses, Integer deductClassHour) { |
| | | CoursePackageScheduling coursePackageScheduling = coursePackageSchedulingClient.queryCoursePackageSchedulingById(id); |
| | | if(coursePackageScheduling.getStatus() == 1 || coursePackageScheduling.getStatus() == 4){ |
| | | return ResultUtil.error("不能添加消课凭证"); |
| | | } |
| | | coursePackageScheduling.setCancelClasses(cancelClasses); |
| | | coursePackageScheduling.setDeductClassHour(deductClassHour); |
| | | coursePackageSchedulingClient.editCoursePackageScheduling(coursePackageScheduling); |
| | | |
| | | List<CoursePackageStudent> coursePackageStudents = coursePackageStudentClient.queryByCoursePackageSchedulingId(id); |
| | | for (CoursePackageStudent coursePackageStudent : coursePackageStudents) { |
| | | if(coursePackageStudent.getReservationStatus() == 0){ |
| | | continue; |
| | | } |
| | | TCoursePackagePayment tCoursePackagePayment = coursePackagePaymentClient.queryCoursePackagePaymentById(coursePackageStudent.getCoursePackagePaymentId()); |
| | | tCoursePackagePayment.setLaveClassHours(tCoursePackagePayment.getLaveClassHours() - deductClassHour); |
| | | if(coursePackageStudent.getSignInOrNot() == 0){ |
| | | tCoursePackagePayment.setAbsencesNumber(tCoursePackagePayment.getAbsencesNumber() + 1); |
| | | } |
| | | coursePackagePaymentClient.editCoursePackagePayment(tCoursePackagePayment); |
| | | |
| | | CancelledClasses cancelledClasses = new CancelledClasses(); |
| | | cancelledClasses.setType(1); |
| | | cancelledClasses.setCoursePackageId(coursePackageStudent.getCoursePackageId()); |
| | | cancelledClasses.setCoursePackagePaymentId(coursePackageStudent.getCoursePackagePaymentId()); |
| | | cancelledClasses.setCoursePackageSchedulingId(coursePackageStudent.getCoursePackageSchedulingId()); |
| | | cancelledClasses.setVoucher(cancelClasses); |
| | | cancelledClasses.setCancelledClassesNumber(deductClassHour); |
| | | cancelledClasses.setInsertTime(new Date()); |
| | | cancelledClassesClient.addCancelledClasses(cancelledClasses); |
| | | } |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取未预约排课学员列表 |
| | | * @param coursePackageSchedulingId |
| | | * @param userName |
| | | * @param studentName |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Page<Map<String, Object>> queryWalkInStudentList(Long coursePackageSchedulingId, String userName, String studentName) { |
| | | QueryWalkInStudentList queryWalkInStudentList = new QueryWalkInStudentList(); |
| | | queryWalkInStudentList.setCoursePackageSchedulingId(coursePackageSchedulingId); |
| | | queryWalkInStudentList.setUserName(userName); |
| | | queryWalkInStudentList.setStudentName(studentName); |
| | | HttpServletRequest request = HttpKit.getRequest(); |
| | | queryWalkInStudentList.setLimit(Integer.valueOf(request.getParameter("limit"))); |
| | | queryWalkInStudentList.setOffset(Integer.valueOf(request.getParameter("offset"))); |
| | | queryWalkInStudentList.setSort(request.getParameter("sort")); |
| | | queryWalkInStudentList.setOrder(request.getParameter("order")); |
| | | return coursePackagePaymentClient.queryWalkInStudentList(queryWalkInStudentList); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 手动预约课程 |
| | | * @param coursePackagePaymentId |
| | | * @param coursePackageSchedulingId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResultUtil courseReservation(Long coursePackagePaymentId, Long coursePackageSchedulingId) { |
| | | QueryCoursePackageStudent queryCoursePackageStudent = new QueryCoursePackageStudent(); |
| | | queryCoursePackageStudent.setCoursePackagePaymentId(coursePackagePaymentId); |
| | | queryCoursePackageStudent.setCoursePackageSchedulingId(coursePackageSchedulingId); |
| | | queryCoursePackageStudent.setReservationStatus(1); |
| | | List<CoursePackageStudent> coursePackageStudents = coursePackageStudentClient.queryCoursePackageStudent(queryCoursePackageStudent); |
| | | if(coursePackageStudents.size() > 0){ |
| | | return ResultUtil.error("不能重复预约"); |
| | | } |
| | | |
| | | CoursePackageScheduling coursePackageScheduling = coursePackageSchedulingClient.queryCoursePackageSchedulingById(coursePackageSchedulingId); |
| | | TCoursePackage tCoursePackage = coursePackageClient.queryById(coursePackageScheduling.getCoursePackageId()); |
| | | queryCoursePackageStudent = new QueryCoursePackageStudent(); |
| | | queryCoursePackageStudent.setCoursePackageId(coursePackageScheduling.getCoursePackageId()); |
| | | queryCoursePackageStudent.setReservationStatus(1); |
| | | List<CoursePackageStudent> coursePackageStudents1 = coursePackageStudentClient.queryCoursePackageStudent(queryCoursePackageStudent); |
| | | if(coursePackageStudents1.size() >= tCoursePackage.getMaxSubscribeNumber()){ |
| | | return ResultUtil.error("已达到最多预约人数"); |
| | | } |
| | | |
| | | TCoursePackagePayment coursePackagePayment = coursePackagePaymentClient.queryCoursePackagePaymentById(coursePackagePaymentId); |
| | | CoursePackageStudent coursePackageStudent = new CoursePackageStudent(); |
| | | coursePackageStudent.setAppUserId(coursePackagePayment.getAppUserId()); |
| | | coursePackageStudent.setStudentId(coursePackagePayment.getStudentId()); |
| | | coursePackageStudent.setCoursePackageId(coursePackagePayment.getCoursePackageId()); |
| | | coursePackageStudent.setCoursePackagePaymentId(coursePackagePaymentId); |
| | | coursePackageStudent.setCoursePackageSchedulingId(coursePackageSchedulingId); |
| | | coursePackageStudent.setSignInOrNot(1); |
| | | coursePackageStudent.setReservationStatus(1); |
| | | coursePackageStudent.setInsertTime(new Date()); |
| | | coursePackageStudentClient.addCoursePackageStudent(coursePackageStudent); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 退课操作 |
| | | * @param coursePackagePaymentId |
| | | * @param certificate |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResultUtil dropTheClass(Long coursePackagePaymentId, String certificate) { |
| | | TCoursePackagePayment coursePackagePayment = coursePackagePaymentClient.queryCoursePackagePaymentById(coursePackagePaymentId); |
| | | if(coursePackagePayment.getStatus() == 2){ |
| | | return ResultUtil.error("不能重复操作"); |
| | | } |
| | | coursePackagePayment.setStatus(2); |
| | | coursePackagePayment.setCertificate(certificate); |
| | | coursePackagePayment.setWithdrawalTime(new Date()); |
| | | //修改课时,费用线下自己处理不走线上 |
| | | Integer laveClassHours = coursePackagePayment.getLaveClassHours(); |
| | | if(laveClassHours == 0){ |
| | | return ResultUtil.error("无可退数量"); |
| | | } |
| | | coursePackagePayment.setDropoutsNumber(laveClassHours); |
| | | coursePackagePayment.setLaveClassHours(0); |
| | | coursePackagePaymentClient.editCoursePackagePayment(coursePackagePayment); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 补课操作 |
| | | * @param coursePackagePaymentId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResultUtil makeUpMissedLessons(Long coursePackagePaymentId) { |
| | | TCoursePackagePayment coursePackagePayment = coursePackagePaymentClient.queryCoursePackagePaymentById(coursePackagePaymentId); |
| | | if(coursePackagePayment.getStatus() == 2){ |
| | | return ResultUtil.error("该学员已退课"); |
| | | } |
| | | if(coursePackagePayment.getAbsencesNumber() == 0){ |
| | | return ResultUtil.error("当前不需要补课"); |
| | | } |
| | | coursePackagePayment.setAbsencesNumber(coursePackagePayment.getAbsencesNumber() - 1); |
| | | coursePackagePaymentClient.editCoursePackagePayment(coursePackagePayment); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取课包审核列表 |
| | | * @param provinceCode |
| | | * @param cityCode |
| | | * @param coursePackageTypeId |
| | | * @param name |
| | | * @param auditStatus |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Page<Map<String, Object>> queryExamineCoursePackageLists(String provinceCode, String cityCode, Integer coursePackageTypeId, String name, Integer auditStatus) { |
| | | QueryExamineCoursePackageLists queryExamineCoursePackageLists = new QueryExamineCoursePackageLists(); |
| | | queryExamineCoursePackageLists.setProvinceCode(provinceCode); |
| | | queryExamineCoursePackageLists.setCityCode(cityCode); |
| | | queryExamineCoursePackageLists.setCoursePackageTypeId(coursePackageTypeId); |
| | | queryExamineCoursePackageLists.setName(name); |
| | | queryExamineCoursePackageLists.setAuditStatus(auditStatus); |
| | | HttpServletRequest request = HttpKit.getRequest(); |
| | | queryExamineCoursePackageLists.setLimit(Integer.valueOf(request.getParameter("limit"))); |
| | | queryExamineCoursePackageLists.setOffset(Integer.valueOf(request.getParameter("offset"))); |
| | | queryExamineCoursePackageLists.setSort(request.getParameter("sort")); |
| | | queryExamineCoursePackageLists.setOrder(request.getParameter("order")); |
| | | Page<Map<String, Object>> mapPage = coursePackageClient.queryExamineCoursePackageLists(queryExamineCoursePackageLists); |
| | | List<Map<String, Object>> records = mapPage.getRecords(); |
| | | for (Map<String, Object> record : records) { |
| | | TStore store = storeService.getById(Integer.valueOf(record.get("storeId").toString())); |
| | | record.put("store", store.getName()); |
| | | } |
| | | return mapPage; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 审核课包 |
| | | * @param id |
| | | * @param auditStatus |
| | | * @param authRemark |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResultUtil setCoursePackageAuditStatus(Integer id, Integer auditStatus, String authRemark) { |
| | | TCoursePackage tCoursePackage = coursePackageClient.queryById(id); |
| | | if(tCoursePackage.getAuditStatus() != 1){ |
| | | return ResultUtil.error("不能重复审核"); |
| | | } |
| | | tCoursePackage.setAuditStatus(auditStatus); |
| | | tCoursePackage.setAuditUserId(UserExt.getUser().getId()); |
| | | tCoursePackage.setAuthRemark(authRemark); |
| | | coursePackageClient.updateCoursePackage(tCoursePackage); |
| | | return ResultUtil.success(); |
| | | } |
| | | } |
| | |
| | | editCourseState.setState(state); |
| | | courseClient.editCourseState(editCourseState); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据类型获取数据 |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<TCourse> queryCourseByType(Integer type) { |
| | | return courseClient.queryCourseByType(type); |
| | | } |
| | | } |
| | |
| | | }) |
| | | }); |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script> |
| | | @} |
| | | |
| | |
| | | @layout("/common/_container.html"){ |
| | | <link rel="stylesheet" href="${ctxPath}/static/js/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="${ctxPath}/layui/css/layui.css" media="all"> |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/course/course.js"></script> |
| | | <script src="${ctxPath}/js/layui/layui.js" charset="utf-8"></script> |
| | | <script src="${ctxPath}/layui/layui.js" charset="utf-8"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#beginTime' |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <link rel="stylesheet" href="${ctxPath}/layui/css/layui.css" media="all"> |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <h3>课包信息</h3> |
| | | <input type="hidden" id="id" value="${item.id}"> |
| | | <div class="form-group" style="height: 10px;"> |
| | | <label class="col-sm-1 control-label" style="text-align: right;">所属门店:</label> |
| | | <span class="col-sm-2" style="text-align: left;">${store.name}</span> |
| | | </div> |
| | | <div class="form-group" style="height: 10px;"> |
| | | <label class="col-sm-1 control-label" style="text-align: right;">课包名称:</label> |
| | | <span class="col-sm-1" style="text-align: left;" id="name">${item.name}</span> |
| | | </div> |
| | | <div class="form-group" style="height: 10px;"> |
| | | <label class="col-sm-1 control-label" style="text-align: right;">授课教师:</label> |
| | | <span class="col-sm-2" style="text-align: left;">${coach.name}</span> |
| | | </div> |
| | | <div class="form-group" style="height: 10px;"> |
| | | <label class="col-sm-1 control-label" style="text-align: right;">上课时间:</label> |
| | | <span class="col-sm-2" style="text-align: left;">${item.classWeeks}</span> |
| | | </div> |
| | | <div class="form-group" style="height: 10px;"> |
| | | <label class="col-sm-1 control-label" style="text-align: right;"></label> |
| | | <span class="col-sm-2" style="text-align: left;">${item.classStartTime + ' - ' + item.classEndTime}</span> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="managerTableToolbar" role="group"> |
| | | <#button name="查看学员" icon="fa-plus" clickFun="ClassRecord.classRecord()"/> |
| | | <#button name="取消本次" icon="fa-edit" clickFun="ClassRecord.cancelClassSchedule()" space="true"/> |
| | | <#button name="发布课后练习" icon="fa-refresh" clickFun="ClassRecord.afterClassExercises()" space="true"/> |
| | | <#button name="上传消课记录" icon="fa-refresh" clickFun="ClassRecord.cancellationRecord()" space="true"/> |
| | | <#button name="查看消课记录" icon="fa-refresh" clickFun="ClassRecord.lookCancellationRecord()" space="true"/> |
| | | <#button name="手动预约" icon="fa-refresh" clickFun="ClassRecord.manualReservation()" space="true"/> |
| | | </div> |
| | | <#table id="managerTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/coursePackage/classRecord.js"></script> |
| | | <script src="${ctxPath}/layui/layui.js" charset="utf-8"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#beginTime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#endTime' |
| | | }); |
| | | </script> |
| | | @} |
| | |
| | | @layout("/common/_container.html"){ |
| | | <link rel="stylesheet" href="${ctxPath}/static/js/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="${ctxPath}/layui/css/layui.css" media="all"> |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | |
| | | <#button name="下架" icon="fa-warning" clickFun="CoursePackage.editCoursePackageState(2)" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/coursePackage/coursePackageDiscount")){ |
| | | <#button name="折扣管理" icon="fa-check-circle" clickFun="CoursePackage.detailsCoursePackage()" space="true"/> |
| | | <#button name="折扣管理" icon="fa-check-circle" clickFun="CoursePackage.coursePackageDiscount()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/coursePackage/detailsCoursePackage")){ |
| | | <#button name="详情" icon="fa-check-circle" clickFun="CoursePackage.detailsCoursePackage()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/coursePackage/registrationRecord")){ |
| | | <#button name="报名信息" icon="fa-check-circle" clickFun="CoursePackage.detailsCoursePackage()" space="true"/> |
| | | <#button name="报名信息" icon="fa-check-circle" clickFun="CoursePackage.registrationRecord()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="managerTable"/> |
| | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/coursePackage/coursePackage.js"></script> |
| | | <script src="${ctxPath}/js/layui/layui.js" charset="utf-8"></script> |
| | | <script src="${ctxPath}/layui/layui.js" charset="utf-8"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#beginTime' |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | <div class="row"> |
| | | <input type="hidden" id="id" value="${item.id}"> |
| | | <input type="hidden" id="coursePackagePaymentConfig" value='${coursePackagePaymentConfig}'> |
| | | <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>${item.name}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <div class="col-sm-2"></div> |
| | | <div class="col-sm-10"> |
| | | <div class="col-sm-2"> |
| | | </div> |
| | | <div class="col-sm-6" id="classHours" style="margin-top: 6px;"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <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 id="payment"></span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <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 id="cashPayment"></span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <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-6" id="types" style="margin-top: 6px;"> |
| | | <input type="checkbox" name="type" value="1"> 会员折扣 |
| | | <input type="checkbox" name="type" value="2"> 续课优惠 |
| | | <input type="checkbox" name="type" value="3"> 限时折扣 |
| | | <input type="checkbox" name="type" value="4"> 赠送课时 |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div id="memberDiscount"> |
| | | |
| | | </div> |
| | | <div id="renewalOffer"> |
| | | |
| | | </div> |
| | | <div id="limitedTimeDiscount"> |
| | | |
| | | </div> |
| | | <div id="complimentaryClass"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="CoursePackageDiscount.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="CoursePackageDiscount.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/coursePackage/coursePackageDiscount.js"></script> |
| | | <script type="text/javascript"> |
| | | laydate.render({ |
| | | elem: '#classStartTime' |
| | | ,type: 'time' |
| | | ,range: true |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <link rel="stylesheet" href="${ctxPath}/layui/css/layui.css" media="all"> |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <input type="hidden" id="id" value="${id}"> |
| | | <div class="row"> |
| | | <div class="col-lg-10 col-sm-9"> |
| | | <div class="row"> |
| | | <div class="col-lg-4 col-sm-12"> |
| | | <#NameCon id="userName" name="所属用户"/> |
| | | </div> |
| | | <div class="col-lg-4 col-sm-12"> |
| | | <#NameCon id="studentName" name="姓名"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-lg-2 col-sm-3"> |
| | | <div class="row"> |
| | | <div class="col-lg-12 col-sm-12"> |
| | | <#button name="搜索" icon="fa-search" clickFun="CoursePackageStudent.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="CoursePackageStudent.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="managerTableToolbar" role="group"> |
| | | <#button name="取消预约" icon="fa-plus" clickFun="CoursePackageStudent.cancelReservation()"/> |
| | | <#button name="未到" icon="fa-edit" clickFun="CoursePackageStudent.absence()" space="true"/> |
| | | </div> |
| | | <#table id="managerTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/coursePackage/coursePackageStudent.js"></script> |
| | | <script src="${ctxPath}/layui/layui.js" charset="utf-8"></script> |
| | | @} |
| | |
| | | <label class="col-sm-3 control-label">*授课教师:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="coachId" name="coachId"> |
| | | <option value="">请选择</option> |
| | | @for(obj in coach){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*最多预约人数:</label> |
| | | <div class="col-sm-4"> |
| | | <input class="form-control" id="maxSubscribeNumber" name="maxSubscribeNumber" type="number" min="0"> |
| | | <input class="form-control" id="maxSubscribeNumber" name="maxSubscribeNumber" type="number" min="0" placeholder="请输入最多预约人数"> |
| | | </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-4"> |
| | | <textarea class="form-control" id="introduce" name="introduce" style="height: 200px;"></textarea> |
| | | <input class="form-control" id="classStartTime" name="classStartTime" placeholder="请选择"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label">*课程封面</label> |
| | | <label class="col-sm-3 control-label"></label> |
| | | <div class="col-sm-8"> |
| | | <input type="checkbox" name="classWeeks" value="周一"> 周一 |
| | | <input type="checkbox" name="classWeeks" value="周二"> 周二 |
| | | <input type="checkbox" name="classWeeks" value="周三"> 周三 |
| | | <input type="checkbox" name="classWeeks" value="周四"> 周四 |
| | | <input type="checkbox" name="classWeeks" value="周五"> 周五 |
| | | <input type="checkbox" name="classWeeks" value="周六"> 周六 |
| | | <input type="checkbox" name="classWeeks" value="周日"> 周日 |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课包封面:</label> |
| | | <div class="col-sm-4"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label">*列表页</label> |
| | | <div class="col-sm-2"> |
| | | <div id="coverDrawingPreId"> |
| | | <div><img width="100px" height="100px" src="${ctxPath}/img/NoPIC.png"></div> |
| | |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label"></label> |
| | | <label>推荐像素:340 x 254px</label> |
| | | <label>推荐像素:210x280px</label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label">*课程介绍</label> |
| | | <label class="col-sm-3 control-label head-scu-label">*详情页</label> |
| | | <div class="col-sm-2"> |
| | | <div id="introductionDrawingPreId"> |
| | | <div id="detailDrawingPreId"> |
| | | <div><img width="100px" height="100px" src="${ctxPath}/img/NoPIC.png"></div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <div class="head-scu-btn upload-btn" id="introductionDrawingBtnId"> |
| | | <div class="head-scu-btn upload-btn" id="detailDrawingBtnId"> |
| | | <i class="fa fa-upload"></i> 上传 |
| | | </div> |
| | | </div> |
| | | <input type="hidden" id="introductionDrawing" value=""/> |
| | | <input type="hidden" id="detailDrawing" value=""/> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label"></label> |
| | | <label>推荐像素:宽780px</label> |
| | | <label>推荐像素:780x440px</label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label">*课程内容</label> |
| | | <div class="col-sm-2" style="padding-top: 30px;"> |
| | | <input type="file" id="upFile" name="upFile" style="display: none"> |
| | | <input class="form-control" id="courseVideo" readonly/> |
| | | <label class="col-sm-3 control-label head-scu-label">*课包介绍</label> |
| | | <div class="col-sm-2"> |
| | | <div id="introduceDrawingPreId"> |
| | | <div><img width="100px" height="100px" src="${ctxPath}/img/NoPIC.png"></div> |
| | | </div> |
| | | <div class="col-sm-2" style="padding-top: 30px;"> |
| | | <button class="btn btn-outline btn-success" type="file" onclick="UploadFileFn()"><i class="fa fa-upload"></i>上传视频</button> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <div class="head-scu-btn upload-btn" id="introduceDrawingBtnId"> |
| | | <i class="fa fa-upload"></i> 上传 |
| | | </div> |
| | | </div> |
| | | <input type="hidden" id="introduceDrawing" value=""/> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label"></label> |
| | | <label>推荐像素:宽780x</label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-4"> |
| | | <input class="form-control" id="sort" name="sort" type="number" placeholder="请输入排序"> |
| | | </div> |
| | | </div> |
| | | <div class="hr-line-dashed"></div> |
| | | <h3>课时设置</h3> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*支付方式:</label> |
| | | <div class="col-sm-4" style="margin-top: 6px;"> |
| | | <input type="checkbox" name="payType" value="1"> 现金 |
| | | <input type="checkbox" name="payType" value="2"> 玩湃币 |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课时有效期:</label> |
| | | <div class="col-sm-4"> |
| | | 购买后 <input id="validDays" name="validDays" type="number" min="0" placeholder="天数" style="width: 80px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> 天内有效 |
| | | </div> |
| | | </div> |
| | | <div id="price"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课时数:</label> |
| | | <div class="col-sm-8"> |
| | | <span class="classNumber_span"><input class="classNumber" type="number" min="0" placeholder="请输入" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> </span> |
| | | <span class="cash_span"></span> |
| | | <span class="paiCoin_span"></span> |
| | | <i class="fa fa-plus-circle" style="font-size:24px" onclick="addPrice()"></i> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="CourseInfo.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="CourseInfo.close()"/> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="CoursePackageInfo.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="CoursePackageInfo.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/course/course_info.js"></script> |
| | | <script src="${ctxPath}/modular/system/coursePackage/coursePackage_info.js"></script> |
| | | <script type="text/javascript"> |
| | | laydate.render({ |
| | | elem: '#classStartTime' |
| | | ,type: 'time' |
| | | ,range: true |
| | | }); |
| | | var avatarUp = new $WebUpload("coverDrawing"); |
| | | avatarUp.setUploadBarId("progressBar"); |
| | | avatarUp.init(); |
| | | |
| | | var avatarUp1 = new $WebUpload("introductionDrawing"); |
| | | var avatarUp1 = new $WebUpload("detailDrawing"); |
| | | avatarUp1.setUploadBarId("progressBar"); |
| | | avatarUp1.init(); |
| | | |
| | | var avatarUp1 = new $WebUpload("introduceDrawing"); |
| | | avatarUp1.setUploadBarId("progressBar"); |
| | | avatarUp1.init(); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | <div class="row"> |
| | | <input type="hidden" id="id" value="${item.id}"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="provinceCode" name="provinceCode"> |
| | | @for(obj in province){ |
| | | <option value="${obj.code}" ${item.provinceCode == obj.code ? 'selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所在市:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="cityCode" name="cityCode"> |
| | | @for(obj in city){ |
| | | <option value="${obj.code}" ${item.cityCode == obj.code ? 'selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所属门店:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="storeId" name="storeId"> |
| | | @for(obj in store){ |
| | | <option value="${obj.id}" ${item.storeId == obj.id ? 'selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课程类型:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="coursePackageTypeId" name="coursePackageTypeId"> |
| | | @for(obj in coursePackageType){ |
| | | <option value="${obj.id}" ${item.coursePackageTypeId == obj.id ? 'selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课包名称:</label> |
| | | <div class="col-sm-4"> |
| | | <input class="form-control" id="name" name="name" value="${item.name}"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*上课场地:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="siteId" name="siteId"> |
| | | @for(obj in site){ |
| | | <option value="${obj.id}" ${item.siteId == obj.id ? 'selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*授课教师:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="coachId" name="coachId"> |
| | | <option value="">请选择</option> |
| | | @for(obj in coach){ |
| | | <option value="${obj.id}" ${item.coachId == obj.id ? 'selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*最多预约人数:</label> |
| | | <div class="col-sm-4"> |
| | | <input class="form-control" id="maxSubscribeNumber" name="maxSubscribeNumber" value="${item.maxSubscribeNumber}" type="number" min="0" placeholder="请输入最多预约人数"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*上课时间:</label> |
| | | <div class="col-sm-4"> |
| | | <input class="form-control" id="classStartTime" name="classStartTime" value="${classTime}" placeholder="请选择"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label"></label> |
| | | <div class="col-sm-8"> |
| | | @for(obj in classWeeks){ |
| | | <input type="checkbox" name="classWeeks" value="${obj.value}" ${obj.checked ? 'checked' : ''}> ${obj.value} |
| | | @} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课包封面:</label> |
| | | <div class="col-sm-4"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label">*列表页</label> |
| | | <div class="col-sm-2"> |
| | | <div id="coverDrawingPreId"> |
| | | <div><img width="100px" height="100px" src="${item.coverDrawing}"></div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <div class="head-scu-btn upload-btn" id="coverDrawingBtnId"> |
| | | <i class="fa fa-upload"></i> 上传 |
| | | </div> |
| | | </div> |
| | | <input type="hidden" id="coverDrawing" value="${item.coverDrawing}"/> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label"></label> |
| | | <label>推荐像素:210x280px</label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label">*详情页</label> |
| | | <div class="col-sm-2"> |
| | | <div id="detailDrawingPreId"> |
| | | <div><img width="100px" height="100px" src="${item.detailDrawing}"></div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <div class="head-scu-btn upload-btn" id="detailDrawingBtnId"> |
| | | <i class="fa fa-upload"></i> 上传 |
| | | </div> |
| | | </div> |
| | | <input type="hidden" id="detailDrawing" value="${item.detailDrawing}"/> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label"></label> |
| | | <label>推荐像素:780x440px</label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label">*课包介绍</label> |
| | | <div class="col-sm-2"> |
| | | <div id="introduceDrawingPreId"> |
| | | <div><img width="100px" height="100px" src="${item.introduceDrawing}"></div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <div class="head-scu-btn upload-btn" id="introduceDrawingBtnId"> |
| | | <i class="fa fa-upload"></i> 上传 |
| | | </div> |
| | | </div> |
| | | <input type="hidden" id="introduceDrawing" value="${item.introduceDrawing}"/> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label"></label> |
| | | <label>推荐像素:宽780x</label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-4"> |
| | | <input class="form-control" id="sort" name="sort" value="${item.sort}" type="number" placeholder="请输入排序"> |
| | | </div> |
| | | </div> |
| | | <div class="hr-line-dashed"></div> |
| | | <h3>课时设置</h3> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*支付方式:</label> |
| | | <div class="col-sm-4" style="margin-top: 6px;"> |
| | | <input type="checkbox" name="payType" value="1" ${cashPayment ? 'checked' : ''}> 现金 |
| | | <input type="checkbox" name="payType" value="2" ${playPaiCoin ? 'checked' : ''}> 玩湃币 |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课时有效期:</label> |
| | | <div class="col-sm-4"> |
| | | 购买后 <input id="validDays" name="validDays" type="number" value="${item.validDays}" min="0" placeholder="天数" style="width: 80px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> 天内有效 |
| | | </div> |
| | | </div> |
| | | <div id="price"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课时数:</label> |
| | | <div class="col-sm-8"> |
| | | <span class="classNumber_span"><input class="classNumber" type="number" value="${coursePackagePaymentConfig.classHours}" min="0" placeholder="请输入" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> </span> |
| | | <span class="cash_span"> |
| | | @if(cashPayment){ |
| | | 现金支付:<input class="cash" type="number" value="${coursePackagePaymentConfig.cashPayment}" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> ¥ |
| | | @} |
| | | </span> |
| | | <span class="paiCoin_span"> |
| | | @if(playPaiCoin){ |
| | | 玩湃币支付:<input class="paiCoin" type="number" value="${coursePackagePaymentConfig.playPaiCoin}" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> 币 |
| | | @} |
| | | </span> |
| | | <i class="fa fa-plus-circle" style="font-size:24px" onclick="addPrice()"></i> |
| | | </div> |
| | | </div> |
| | | @for(obj in coursePackagePaymentConfigs){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课时数:</label> |
| | | <div class="col-sm-8"> |
| | | <span class="classNumber_span"><input class="classNumber" type="number" value="${obj.classHours}" min="0" placeholder="请输入" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> </span> |
| | | <span class="cash_span"> |
| | | @if(cashPayment){ |
| | | 现金支付:<input class="cash" type="number" value="${obj.cashPayment}" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> ¥ |
| | | @} |
| | | </span> |
| | | <span class="paiCoin_span"> |
| | | @if(playPaiCoin){ |
| | | 玩湃币支付:<input class="paiCoin" type="number" value="${obj.playPaiCoin}" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> 币 |
| | | @} |
| | | </span> |
| | | <i class="fa fa-trash-o" style="font-size:24px" onclick="removePrice(4, this)"></i> |
| | | </div> |
| | | </div> |
| | | @} |
| | | </div> |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="CoursePackageInfo.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="CoursePackageInfo.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/coursePackage/coursePackage_info.js"></script> |
| | | <script type="text/javascript"> |
| | | laydate.render({ |
| | | elem: '#classStartTime' |
| | | ,type: 'time' |
| | | ,range: true |
| | | }); |
| | | var avatarUp = new $WebUpload("coverDrawing"); |
| | | avatarUp.setUploadBarId("progressBar"); |
| | | avatarUp.init(); |
| | | |
| | | var avatarUp1 = new $WebUpload("detailDrawing"); |
| | | avatarUp1.setUploadBarId("progressBar"); |
| | | avatarUp1.init(); |
| | | |
| | | var avatarUp1 = new $WebUpload("introduceDrawing"); |
| | | avatarUp1.setUploadBarId("progressBar"); |
| | | avatarUp1.init(); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | <div class="row"> |
| | | <input type="hidden" id="id" value="${item.id}"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="provinceCode" name="provinceCode" disabled> |
| | | @for(obj in province){ |
| | | <option value="${obj.code}" ${item.provinceCode == obj.code ? 'selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所在市:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="cityCode" name="cityCode" disabled> |
| | | @for(obj in city){ |
| | | <option value="${obj.code}" ${item.cityCode == obj.code ? 'selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所属门店:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="storeId" name="storeId" disabled> |
| | | @for(obj in store){ |
| | | <option value="${obj.id}" ${item.storeId == obj.id ? 'selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课程类型:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="coursePackageTypeId" name="coursePackageTypeId" disabled> |
| | | @for(obj in coursePackageType){ |
| | | <option value="${obj.id}" ${item.coursePackageTypeId == obj.id ? 'selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课包名称:</label> |
| | | <div class="col-sm-4"> |
| | | <input class="form-control" id="name" name="name" value="${item.name}" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*上课场地:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="siteId" name="siteId" disabled> |
| | | @for(obj in site){ |
| | | <option value="${obj.id}" ${item.siteId == obj.id ? 'selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*授课教师:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="coachId" name="coachId" disabled> |
| | | <option value="">请选择</option> |
| | | @for(obj in coach){ |
| | | <option value="${obj.id}" ${item.coachId == obj.id ? 'selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*最多预约人数:</label> |
| | | <div class="col-sm-4"> |
| | | <input class="form-control" id="maxSubscribeNumber" name="maxSubscribeNumber" value="${item.maxSubscribeNumber}" type="number" min="0" placeholder="请输入最多预约人数" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*上课时间:</label> |
| | | <div class="col-sm-4"> |
| | | <input class="form-control" id="classStartTime" name="classStartTime" value="${classTime}" placeholder="请选择" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label"></label> |
| | | <div class="col-sm-8"> |
| | | @for(obj in classWeeks){ |
| | | <input type="checkbox" name="classWeeks" value="${obj.value}" ${obj.checked ? 'checked' : ''}> ${obj.value} |
| | | @} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课包封面:</label> |
| | | <div class="col-sm-4"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label">*列表页</label> |
| | | <div class="col-sm-2"> |
| | | <div id="coverDrawingPreId"> |
| | | <div><img width="100px" height="100px" src="${item.coverDrawing}"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label"></label> |
| | | <label>推荐像素:210x280px</label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label">*详情页</label> |
| | | <div class="col-sm-2"> |
| | | <div id="detailDrawingPreId"> |
| | | <div><img width="100px" height="100px" src="${item.detailDrawing}"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label"></label> |
| | | <label>推荐像素:780x440px</label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label">*课包介绍</label> |
| | | <div class="col-sm-2"> |
| | | <div id="introduceDrawingPreId"> |
| | | <div><img width="100px" height="100px" src="${item.introduceDrawing}"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label"></label> |
| | | <label>推荐像素:宽780x</label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-4"> |
| | | <input class="form-control" id="sort" name="sort" value="${item.sort}" type="number" placeholder="请输入排序"> |
| | | </div> |
| | | </div> |
| | | <div class="hr-line-dashed"></div> |
| | | <h3>课时设置</h3> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*支付方式:</label> |
| | | <div class="col-sm-4" style="margin-top: 6px;"> |
| | | <input type="checkbox" name="payType" value="1" ${cashPayment ? 'checked' : ''}> 现金 |
| | | <input type="checkbox" name="payType" value="2" ${playPaiCoin ? 'checked' : ''}> 玩湃币 |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课时有效期:</label> |
| | | <div class="col-sm-4"> |
| | | 购买后 <input id="validDays" name="validDays" type="number" value="${item.validDays}" min="0" placeholder="天数" style="width: 80px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> 天内有效 |
| | | </div> |
| | | </div> |
| | | <div id="price"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课时数:</label> |
| | | <div class="col-sm-8"> |
| | | <span class="classNumber_span"><input class="classNumber" type="number" value="${coursePackagePaymentConfig.classHours}" min="0" placeholder="请输入" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> </span> |
| | | <span class="cash_span"> |
| | | @if(cashPayment){ |
| | | 现金支付:<input class="cash" type="number" value="${coursePackagePaymentConfig.cashPayment}" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> ¥ |
| | | @} |
| | | </span> |
| | | <span class="paiCoin_span"> |
| | | @if(playPaiCoin){ |
| | | 玩湃币支付:<input class="paiCoin" type="number" value="${coursePackagePaymentConfig.playPaiCoin}" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> 币 |
| | | @} |
| | | </span> |
| | | </div> |
| | | </div> |
| | | @for(obj in coursePackagePaymentConfigs){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课时数:</label> |
| | | <div class="col-sm-8"> |
| | | <span class="classNumber_span"><input class="classNumber" type="number" value="${obj.classHours}" min="0" placeholder="请输入" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> </span> |
| | | <span class="cash_span"> |
| | | @if(cashPayment){ |
| | | 现金支付:<input class="cash" type="number" value="${obj.cashPayment}" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> ¥ |
| | | @} |
| | | </span> |
| | | <span class="paiCoin_span"> |
| | | @if(playPaiCoin){ |
| | | 玩湃币支付:<input class="paiCoin" type="number" value="${obj.playPaiCoin}" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> 币 |
| | | @} |
| | | </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="CoursePackageInfo.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/coursePackage/coursePackage_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <link rel="stylesheet" href="${ctxPath}/layui/css/layui.css" media="all"> |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>课包审核</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-lg-10 col-sm-9"> |
| | | <div class="row"> |
| | | <div class="col-lg-4 col-sm-12"> |
| | | <#SelectCon id="provinceCode" name="所在省"> |
| | | <option value="">全部</option> |
| | | @for(obj in province){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-lg-4 col-sm-12"> |
| | | <#SelectCon id="cityCode" name="所在市"> |
| | | <option value="">全部</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-lg-4 col-sm-12"> |
| | | <#SelectCon id="coursePackageTypeId" name="课包类型"> |
| | | <option value="">全部</option> |
| | | @for(obj in coursePackageType){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-lg-4 col-sm-12"> |
| | | <#NameCon id="name" name="课包名称"/> |
| | | </div> |
| | | <div class="col-lg-4 col-sm-12"> |
| | | <#SelectCon id="auditStatus" name="审核状态"> |
| | | <option value="">全部</option> |
| | | <option value="1">待审核</option> |
| | | <option value="3">未通过</option> |
| | | </#SelectCon> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-lg-2 col-sm-3"> |
| | | <div class="row"> |
| | | <div class="col-lg-12 col-sm-12"> |
| | | <#button name="搜索" icon="fa-search" clickFun="ExamineCoursePackage.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="ExamineCoursePackage.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="managerTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/coursePackage/examineCoursePackage")){ |
| | | <#button name="审核" icon="fa-plus" clickFun="ExamineCoursePackage.examineCoursePackage()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/coursePackage/detailsExamineCoursePackage")){ |
| | | <#button name="详情" icon="fa-check-circle" clickFun="ExamineCoursePackage.detailsExamineCoursePackage()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="managerTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/coursePackage/examineCoursePackage.js"></script> |
| | | <script src="${ctxPath}/layui/layui.js" charset="utf-8"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#beginTime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#endTime' |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | <div class="row"> |
| | | <input type="hidden" id="id" value="${item.id}"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">当前状态:</label> |
| | | <div class="col-sm-4"> |
| | | @if(item.auditStatus == 1){ |
| | | <span style="color: #D99A0D;">待审核</span> |
| | | @} |
| | | @if(item.auditStatus == 3){ |
| | | <span style="color: #F11B1B;">未通过</span> |
| | | @} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="provinceCode" name="provinceCode" disabled> |
| | | @for(obj in province){ |
| | | <option value="${obj.code}" ${item.provinceCode == obj.code ? 'selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所在市:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="cityCode" name="cityCode" disabled> |
| | | @for(obj in city){ |
| | | <option value="${obj.code}" ${item.cityCode == obj.code ? 'selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所属门店:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="storeId" name="storeId" disabled> |
| | | @for(obj in store){ |
| | | <option value="${obj.id}" ${item.storeId == obj.id ? 'selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课程类型:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="coursePackageTypeId" name="coursePackageTypeId" disabled> |
| | | @for(obj in coursePackageType){ |
| | | <option value="${obj.id}" ${item.coursePackageTypeId == obj.id ? 'selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课包名称:</label> |
| | | <div class="col-sm-4"> |
| | | <input class="form-control" id="name" name="name" value="${item.name}" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*上课场地:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="siteId" name="siteId" disabled> |
| | | @for(obj in site){ |
| | | <option value="${obj.id}" ${item.siteId == obj.id ? 'selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*授课教师:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="coachId" name="coachId" disabled> |
| | | <option value="">请选择</option> |
| | | @for(obj in coach){ |
| | | <option value="${obj.id}" ${item.coachId == obj.id ? 'selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*最多预约人数:</label> |
| | | <div class="col-sm-4"> |
| | | <input class="form-control" id="maxSubscribeNumber" name="maxSubscribeNumber" value="${item.maxSubscribeNumber}" type="number" min="0" placeholder="请输入最多预约人数" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*上课时间:</label> |
| | | <div class="col-sm-4"> |
| | | <input class="form-control" id="classStartTime" name="classStartTime" value="${classTime}" placeholder="请选择" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label"></label> |
| | | <div class="col-sm-8"> |
| | | @for(obj in classWeeks){ |
| | | <input type="checkbox" name="classWeeks" value="${obj.value}" ${obj.checked ? 'checked' : ''}> ${obj.value} |
| | | @} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课包封面:</label> |
| | | <div class="col-sm-4"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label">*列表页</label> |
| | | <div class="col-sm-2"> |
| | | <div id="coverDrawingPreId"> |
| | | <div><img width="100px" height="100px" src="${item.coverDrawing}"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label"></label> |
| | | <label>推荐像素:210x280px</label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label">*详情页</label> |
| | | <div class="col-sm-2"> |
| | | <div id="detailDrawingPreId"> |
| | | <div><img width="100px" height="100px" src="${item.detailDrawing}"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label"></label> |
| | | <label>推荐像素:780x440px</label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label">*课包介绍</label> |
| | | <div class="col-sm-2"> |
| | | <div id="introduceDrawingPreId"> |
| | | <div><img width="100px" height="100px" src="${item.introduceDrawing}"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label"></label> |
| | | <label>推荐像素:宽780x</label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-4"> |
| | | <input class="form-control" id="sort" name="sort" value="${item.sort}" type="number" placeholder="请输入排序"> |
| | | </div> |
| | | </div> |
| | | <div class="hr-line-dashed"></div> |
| | | <h3>课时设置</h3> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*支付方式:</label> |
| | | <div class="col-sm-4" style="margin-top: 6px;"> |
| | | <input type="checkbox" name="payType" value="1" ${cashPayment ? 'checked' : ''}> 现金 |
| | | <input type="checkbox" name="payType" value="2" ${playPaiCoin ? 'checked' : ''}> 玩湃币 |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课时有效期:</label> |
| | | <div class="col-sm-4"> |
| | | 购买后 <input id="validDays" name="validDays" type="number" value="${item.validDays}" min="0" placeholder="天数" style="width: 80px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> 天内有效 |
| | | </div> |
| | | </div> |
| | | <div id="price"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课时数:</label> |
| | | <div class="col-sm-8"> |
| | | <span class="classNumber_span"><input class="classNumber" type="number" value="${coursePackagePaymentConfig.classHours}" min="0" placeholder="请输入" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> </span> |
| | | <span class="cash_span"> |
| | | @if(cashPayment){ |
| | | 现金支付:<input class="cash" type="number" value="${coursePackagePaymentConfig.cashPayment}" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> ¥ |
| | | @} |
| | | </span> |
| | | <span class="paiCoin_span"> |
| | | @if(playPaiCoin){ |
| | | 玩湃币支付:<input class="paiCoin" type="number" value="${coursePackagePaymentConfig.playPaiCoin}" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> 币 |
| | | @} |
| | | </span> |
| | | </div> |
| | | </div> |
| | | @for(obj in coursePackagePaymentConfigs){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课时数:</label> |
| | | <div class="col-sm-8"> |
| | | <span class="classNumber_span"><input class="classNumber" type="number" value="${obj.classHours}" min="0" placeholder="请输入" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> </span> |
| | | <span class="cash_span"> |
| | | @if(cashPayment){ |
| | | 现金支付:<input class="cash" type="number" value="${obj.cashPayment}" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> ¥ |
| | | @} |
| | | </span> |
| | | <span class="paiCoin_span"> |
| | | @if(playPaiCoin){ |
| | | 玩湃币支付:<input class="paiCoin" type="number" value="${obj.playPaiCoin}" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> 币 |
| | | @} |
| | | </span> |
| | | </div> |
| | | </div> |
| | | @} |
| | | </div> |
| | | <div class="hr-line-dashed"></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*审核状态:</label> |
| | | <div class="col-sm-8" style="margin-top: 6px;"> |
| | | <input name="auditStatus" type="radio" value="2"/> 通过 |
| | | <input name="auditStatus" type="radio" value="3"/> 拒绝 |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*拒绝理由:</label> |
| | | <div class="col-sm-8" style="margin-top: 6px;"> |
| | | <textarea id="authRemark" style="width: 100%;height: 200px;" placeholder="请输入拒绝理由"></textarea> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="CoursePackageInfo.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="CoursePackageInfo.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/coursePackage/examineCoursePackage_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <link rel="stylesheet" href="${ctxPath}/layui/css/layui.css" media="all"> |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <input type="hidden" id="id" value="${id}"> |
| | | <div class="row"> |
| | | <div class="col-lg-10 col-sm-9"> |
| | | <div class="row"> |
| | | <div class="col-lg-4 col-sm-12"> |
| | | <#NameCon id="userName" name="所属用户"/> |
| | | </div> |
| | | <div class="col-lg-4 col-sm-12"> |
| | | <#NameCon id="studentName" name="姓名"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-lg-2 col-sm-3"> |
| | | <div class="row"> |
| | | <div class="col-lg-12 col-sm-12"> |
| | | <#button name="搜索" icon="fa-search" clickFun="ManualReservation.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="ManualReservation.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="managerTableToolbar" role="group"> |
| | | <#button name="保存" icon="fa-plus" clickFun="ManualReservation.submit()"/> |
| | | </div> |
| | | <#table id="managerTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/coursePackage/manualReservation.js"></script> |
| | | <script src="${ctxPath}/layui/layui.js" charset="utf-8"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <link rel="stylesheet" href="${ctxPath}/layui/css/layui.css" media="all"> |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <input type="hidden" id="id" value="${item.id}"> |
| | | <input type="hidden" id="name" value="${item.name}"> |
| | | <div class="col-lg-10 col-sm-9"> |
| | | <div class="row"> |
| | | <div class="col-lg-4 col-sm-12"> |
| | | <#NameCon id="userName" name="购买用户"/> |
| | | </div> |
| | | <div class="col-lg-4 col-sm-12"> |
| | | <#NameCon id="studentName" name="购买学员"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-lg-2 col-sm-3"> |
| | | <div class="row"> |
| | | <div class="col-lg-12 col-sm-12"> |
| | | <#button name="搜索" icon="fa-search" clickFun="RegistrationRecord.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="RegistrationRecord.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="managerTableToolbar" role="group"> |
| | | <#button name="上课记录" icon="fa-plus" clickFun="RegistrationRecord.classRecord()"/> |
| | | <#button name="退课" icon="fa-edit" clickFun="RegistrationRecord.dropClass()" space="true"/> |
| | | <#button name="补课" icon="fa-refresh" clickFun="RegistrationRecord.makeUpMissedLessons()" space="true"/> |
| | | </div> |
| | | <#table id="managerTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/coursePackage/registrationRecord.js"></script> |
| | | <script src="${ctxPath}/layui/layui.js" charset="utf-8"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#beginTime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#endTime' |
| | | }); |
| | | </script> |
| | | @} |
| | |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/dept/dept_info.js"></script> |
| | | <script src="${ctxPath}/modular/system/dept/dept_info.js"></script> |
| | | @} |
| | |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/dept/dept_info.js"></script> |
| | | <script src="${ctxPath}/modular/system/dept/dept_info.js"></script> |
| | | @} |
| | |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/menu/menu_info.js"></script> |
| | | <script src="${ctxPath}/modular/system/menu/menu_info.js"></script> |
| | | @} |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tAuditRecord/tAuditRecord.js"></script> |
| | | <script src="${ctxPath}/modular/system/tAuditRecord/tAuditRecord.js"></script> |
| | | @} |
| | |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tAuditRecord/tAuditRecord_info.js"></script> |
| | | <script src="${ctxPath}/modular/system/tAuditRecord/tAuditRecord_info.js"></script> |
| | | @} |
| | |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tAuditRecord/tAuditRecord_info.js"></script> |
| | | <script src="${ctxPath}/modular/system/tAuditRecord/tAuditRecord_info.js"></script> |
| | | @} |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#input id="name" name="管理员姓名" type="text" value="${item.name}"/> |
| | | <#input id="name" name="发放数量" type="text" value="${item.name}"/> |
| | | <#input id="phone" name="管理员手机号" type="text" value="${item.phone}"/> |
| | | |
| | | |
| | |
| | | <h5>优惠券管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | |
| | | <div class="hidden-xs" id="TCouponTableToolbar" role="group"> |
| | | <#button name="添加" icon="fa-plus" clickFun="TCoupon.openAdd()"/> |
| | | <#button name="编辑" icon="fa-edit" clickFun="TCoupon.openChange()" space="true"/> |
| | | <#button name="上架" icon="fa-remove" clickFun="TCoupon.onShelf()" space="true"/> |
| | | <#button name="下架" icon="fa-remove" clickFun="TCoupon.offShelf()" space="true"/> |
| | | <#button name="上架" icon="fa-remove" clickFun="TCoupon.onShelf(1)" space="true"/> |
| | | <#button name="下架" icon="fa-remove" clickFun="TCoupon.onShelf(2)" space="true"/> |
| | | <#button name="查看详情" icon="fa-remove" clickFun="TCoupon.openDetail()" space="true"/> |
| | | <#button name="领取记录" icon="fa-remove" clickFun="TCoupon.openCollectionRecord()" space="true"/> |
| | | </div> |
| | |
| | | <label class="col-sm-3">*适用范围: </label> |
| | | <div class="col-sm-3" id="belongsNationwide" hidden="hidden"> |
| | | <input class="col-sm-1" onclick="scopeOfApplication1()" name="company" type="radio" |
| | | value="0" checked style="margin-top: 10px"/> |
| | | value="1" checked style="margin-top: 10px"/> |
| | | <label class="col-sm-2" style="width: 68%;margin-top: 7px">全国通用</label> |
| | | </div> |
| | | <div class="col-sm-3" id="belongsCity" hidden="hidden"> |
| | | <input class="col-sm-1" name="company" onclick="scopeOfApplication2()" type="radio" |
| | | value="1" style="margin-top: 10px"/> |
| | | value="2" style="margin-top: 10px"/> |
| | | <label class="col-sm-2" style="width: 64%;margin-top: 7px">指定城市</label> |
| | | </div> |
| | | <div class="col-sm-3" id="belongsStore" hidden="hidden"> |
| | | <input class="col-sm-1" name="company" onclick="scopeOfApplication3()" type="radio" |
| | | value="1" style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px"/> |
| | | value="3" style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px"/> |
| | | <label class="col-sm-2" style="width: 64%;margin-top: 6px;">指定门店</label> |
| | | </div> |
| | | </div> |
| | |
| | | }, |
| | | methods: { |
| | | handleAvatarSuccess(res, file) { |
| | | couponInfoDlg.goodsPicArray.push(file); |
| | | couponInfoDlg.goodsPicArray.push(file.response); |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isLt2M = file.size / 1024 / 1024 < 10; |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style> |
| | | .avatar-uploader .el-upload { |
| | | border: 1px dashed #d9d9d9; |
| | | border-radius: 6px; |
| | | cursor: pointer; |
| | | position: relative; |
| | | height: 100px; |
| | | width: 100px; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .avatar-uploader .el-upload:hover { |
| | | border-color: #409eff; |
| | | } |
| | | .avatar-uploader-icon { |
| | | font-size: 28px; |
| | | color: #8c939d; |
| | | width: 100px; |
| | | height: 100px; |
| | | line-height: 100px; |
| | | margin-top: 34px; |
| | | text-align: center; |
| | | } |
| | | .avatar { |
| | | width: 100px; |
| | | height: 100px; |
| | | display: block; |
| | | } |
| | | |
| | | .col-sm-12 { |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .col-sm-12 select { |
| | | height: 33px; |
| | | } |
| | | </style> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <input hidden id="t1" value="${item.type}"> |
| | | <input hidden id="t2" value="${item.distributionMethod}"> |
| | | <input hidden id="t3" value="${item.redemptionMethod}"> |
| | | <input hidden id="t4" value="${item.userPopulation}"> |
| | | <input hidden id="t5" value="${item.useScope}"> |
| | | <input hidden id="one" value="${one}"> |
| | | <input hidden id="two" value="${two}"> |
| | | <input hidden id="three" value="${three}"> |
| | | <input hidden id="city" value="${city}"> |
| | | <div class="form-horizontal"> |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*优惠券名称: </label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="name" name="name" autocomplete="off" placeholder="请输入优惠券名称" value="${item.name}" readonly> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*优惠券类型: </label> |
| | | <input class="col-sm-1" style="margin-left: 2.7%;width: 13px;height: 13px;" |
| | | name="prescription" onclick="radio1()" checked disabled |
| | | value="1" type="radio"> |
| | | <label class="col-sm-1" style="margin-left: 10px;width: 17%">满减券: 满</label> |
| | | <input type="text" class="col-sm-1" id="conditionalAmount" readonly |
| | | onkeyup="value=value.replace(/\D/g,'')"/> |
| | | <label class="col-sm-1" style="margin-left: -1.5%;width: 14%"> 元 , 减 </label> |
| | | <input type="text" class="col-sm-1" id="deductionAmount" readonly |
| | | onkeyup="value=value.replace(/\D/g,'')"/> |
| | | <label class="col-sm-1" style="margin-left: -1.5%"> 元</label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <input class="col-sm-1" name="prescription" type="radio" value="2" disabled |
| | | onclick="radio2()" |
| | | style="margin-left: 24.7%;"> |
| | | <label class="col-sm-1" style="margin-left: -17px;width: 20%;">代金券: 可抵</label> |
| | | <input class="col-sm-1" id="voucherAmount" readonly /> |
| | | <label class="col-sm-1">元</label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <input class="col-sm-1" name="prescription" type="radio" value="3" disabled |
| | | onclick="radio3()" |
| | | style="margin-left: 24.7%;"> |
| | | <label class="col-sm-1 control-label" style="margin-left: -1%;width: 14%;margin-top: -5px">体验券: </label> |
| | | <input class="col-sm-1" style="width: 35%" id="experienceName" name="name" |
| | | autocomplete="off" placeholder="请输入体验券名称" readonly> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <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="请输入优惠券说明" disabled>${item.illustrate}</textarea> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <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="distributionMethod" type="radio" disabled |
| | | value="1" checked style="margin-top: 10px"/> |
| | | <label class="col-sm-1" style="margin-left: -15px;width: 16%;margin-top: 7px">积分购买</label> |
| | | <input class="col-sm-1 control-label" name="distributionMethod" type="radio" disabled |
| | | value="2" style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px"/> |
| | | <label class="col-sm-1" style="width: 16%;margin-top: 7px">注册赠送</label> |
| | | <input class="col-sm-1 control-label" name="distributionMethod" type="radio" disabled |
| | | value="3" style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px"/> |
| | | <label class="col-sm-1" style="width: 16%;margin-top: 7px">自动发券</label> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row" id="exchangeType" > |
| | | <div class="col-sm-6"> |
| | | <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" onclick="exchangeMethod1()" name="exchangeMethod" type="radio" disabled |
| | | value="1" style="margin-top: 10px"/> |
| | | <label class="col-sm-1" style="margin-left: -15px;width: 16%;margin-top: 7px">积分</label> |
| | | <input class="col-sm-1 control-label" name="exchangeMethod" onclick="exchangeMethod2()" type="radio" disabled |
| | | 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> |
| | | <input class="col-sm-1 control-label" name="exchangeMethod" onclick="exchangeMethod3()" type="radio" disabled |
| | | value="3" style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px"/> |
| | | <label class="col-sm-1" style="width: 9%;margin-top: 7px">现金</label> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row" id="needAmount" > |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所需现金</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="requiredCash" placeholder="请输入所需现金" name="requiredCash" autocomplete="off" type="text" value="${item.cash}" readonly |
| | | onkeyup="this.value=this.value.replace(/\D/g,'')"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row" id="needIntegral" > |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所需积分</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="requiredPoints" placeholder="请输入所需积分" name="requiredPoints" autocomplete="off" type="text" value="${item.integral}" readonly |
| | | onkeyup="this.value=this.value.replace(/\D/g,'')"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <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="userGroup" type="radio" disabled |
| | | value="1" checked style="margin-top: 10px"/> |
| | | <label class="col-sm-1" style="margin-left: -15px;width: 16%;margin-top: 7px">全部用户</label> |
| | | <input class="col-sm-1 control-label" name="userGroup" type="radio" disabled |
| | | value="2" style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px"/> |
| | | <label class="col-sm-1" style="width: 16%;margin-top: 7px">年度会员</label> |
| | | <input class="col-sm-1 control-label" name="userGroup" type="radio" disabled |
| | | value="3" style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px"/> |
| | | <label class="col-sm-1" style="width: 18%;margin-top: 5px">已有学员用户</label> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*发放数量</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="quantityIssued" placeholder="请输入发放数量" name="quantityIssued" autocomplete="off" type="text" value="${item.quantityIssued}" readonly |
| | | onkeyup="this.value=this.value.replace(/\D/g,'')"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*限领数量</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="pickUpQuantity" placeholder="请输入限领数量" name="pickUpQuantity" autocomplete="off" type="text" value="${item.pickUpQuantity}" readonly |
| | | onkeyup="this.value=this.value.replace(/\D/g,'')"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <label class="col-sm-3 control-label">*有效期: </label> |
| | | <input type="text" style="width: 30%;margin-left: 1%" class="col-sm-3" id="periodOfValidity" value="${s} - ${e}" disabled |
| | | placeholder="请选择"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row" id="app" > |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*商品封面: </label> |
| | | <div class="col-sm-2" style="margin-top: 2%"> |
| | | <img src=${item.cover}> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row" id="app1" > |
| | | <div class="col-sm-6" style="width: 100%"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label" style="width: 15%;margin-left: 7%">*商品图片(请上传不超过五张图片): </label> |
| | | <div class="col-sm-2" style="width: 100%;margin-left: 12%;margin-top: 1%"> |
| | | @for(i in img){ |
| | | <img src=${i} style="width: 150px"> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row" id="belongsCon" > |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <div class="initialLevel col-sm-12 control-label form-group"> |
| | | <label class="col-sm-3">*适用范围: </label> |
| | | <div class="col-sm-3" id="belongsNationwide" > |
| | | <input class="col-sm-1" onclick="scopeOfApplication1()" name="company" type="radio" disabled |
| | | value="1" style="margin-top: 10px"/> |
| | | <label class="col-sm-2" style="width: 68%;margin-top: 7px">全国通用</label> |
| | | </div> |
| | | <div class="col-sm-3" id="belongsCity" > |
| | | <input class="col-sm-1" name="company" onclick="scopeOfApplication2()" type="radio" disabled |
| | | value="2" style="margin-top: 10px"/> |
| | | <label class="col-sm-2" style="width: 64%;margin-top: 7px">指定城市</label> |
| | | </div> |
| | | <div class="col-sm-3" id="belongsStore" > |
| | | <input class="col-sm-1" name="company" onclick="scopeOfApplication3()" type="radio" disabled |
| | | value="3" style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px"/> |
| | | <label class="col-sm-2" style="width: 64%;margin-top: 6px;">指定门店</label> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row" id="citySelect" hidden="hidden"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*指定城市: </label> |
| | | <table class="table table-bordered" style="width: 70%;margin-left: 228px;" id=""> |
| | | <thead> |
| | | <tr> |
| | | <td>省</td> |
| | | <td>市</td> |
| | | </tr> |
| | | @for(c in city){ |
| | | <td>${c.province}</td> |
| | | <td>${c.city}</td> |
| | | @} |
| | | </thead> |
| | | </table> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row" id="storeSelect" hidden="hidden"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <div class="col-sm-12"> |
| | | <label class="col-sm-3 control-label">*指定门店: </label> |
| | | </div> |
| | | <div class="col-sm-12" style="margin-left: -57px;margin-top: 20px"> |
| | | <table class="table table-bordered" style="width: 70%;margin-left: 228px;" id="storeTable"> |
| | | <thead> |
| | | <tr> |
| | | <td>所在省市</td> |
| | | <td>所属账号</td> |
| | | <td>门店名称</td> |
| | | </tr> |
| | | @for(s in store){ |
| | | <td>${s.province}</td> |
| | | <td>${s.phone}</td> |
| | | <td>${s.name}</td> |
| | | @} |
| | | </thead> |
| | | </table> |
| | | </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> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/js/vue/vue.js"></script> |
| | | <script src="${ctxPath}/js/elementui/index.js"></script> |
| | | <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css"> |
| | | <script src="${ctxPath}/modular/system/tCoupon/TCouponInfo.js"></script> |
| | | <script src="${ctxPath}/modular/system/tCoupon/TStoreInfo.js"></script> |
| | | <script type="text/javascript"> |
| | | window.onload = function() { |
| | | console.log(12312) |
| | | } |
| | | laydate.render({ |
| | | elem: '#periodOfValidity', |
| | | type: 'date', |
| | | range: true |
| | | }); |
| | | var vue1 = new Vue({ |
| | | el: '#app', |
| | | data: { |
| | | autoUpload: true,//自动上传 |
| | | imageUrl: '',//模型数据,用于上传图片完成后图片预览 |
| | | dialogVisible: false |
| | | }, |
| | | methods: { |
| | | handleAvatarSuccess(res, file) { |
| | | this.imageUrl = URL.createObjectURL(file.raw); |
| | | couponInfoDlg.goodsCover = file.response; |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isLt2M = file.size / 1024 / 1024 < 10; |
| | | if (!isLt2M) { |
| | | this.$message.error('上传图片大小不能超过 10MB!'); |
| | | } |
| | | return isLt2M; |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | couponInfoDlg.goodsCover = ''; |
| | | console.log(couponInfoDlg.goodsCover) |
| | | }, |
| | | }, |
| | | created() { |
| | | }, |
| | | }); |
| | | |
| | | var vue2 = new Vue({ |
| | | el: '#app1', |
| | | data: { |
| | | autoUpload: true,//自动上传 |
| | | imageUrl1: '',//模型数据,用于上传图片完成后图片预览 |
| | | dialogVisible: false |
| | | }, |
| | | methods: { |
| | | handleAvatarSuccess(res, file) { |
| | | couponInfoDlg.goodsPicArray.push(file); |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isLt2M = file.size / 1024 / 1024 < 10; |
| | | if (!isLt2M) { |
| | | this.$message.error('上传图片大小不能超过 10MB!'); |
| | | } |
| | | return isLt2M; |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | couponInfoDlg.goodsPicArray = couponInfoDlg.goodsPicArray.filter(item => { |
| | | return item.uid != file.uid; |
| | | }); |
| | | }, |
| | | }, |
| | | created() { |
| | | }, |
| | | }); |
| | | |
| | | |
| | | |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>领取详情</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <input hidden id="id" value="${id}"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="name" name="姓名" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="phone" name="联系方式" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="type" name="状态" > |
| | | <option value="">全部</option> |
| | | <option value="2">已使用</option> |
| | | <option value="1">未使用</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCoupon.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TCoupon.resetSearch()"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TCouponTableToolbar" role="group"> |
| | | @if(type==3){ |
| | | <#button name="核销" icon="fa-plus" clickFun="TCoupon.updateType()"/> |
| | | @} |
| | | </div> |
| | | <#table id="TCouponTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tCoupon/TCouponRecord.js"></script> |
| | | @} |
| | |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tEnsureIncomeRule/tEnsureIncomeRule_info.js"></script> |
| | | <script src="${ctxPath}/modular/system/tEnsureIncomeRule/tEnsureIncomeRule_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <input hidden id="id" value="${item.id}"> |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="pCode" name="pCode" onchange="TCarInfoDlg.oneChange(this)"> |
| | | <option value="">选择省</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}" ${obj.code == item.provinceCode ? 'selected=selected' : ''}>${obj.name}</option> |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="cCode" name="cCode"> |
| | | <option value="">选择市</option> |
| | | @for(obj in list1){ |
| | | <option value="${obj.code}" ${obj.code == item.cityCode ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#input id="name" name="管理员姓名" type="text" value="${item.name}"/> |
| | | <#input id="phone" name="管理员手机号" type="text" value="${item.phone}"/> |
| | | |
| | | |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tCity/tCity_info.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#annualInspectionTime' |
| | | ,lang:"en" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#commercialInsuranceTime' |
| | | ,lang:"en" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#certifyDateA' |
| | | ,lang:"en" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#transDateStart' |
| | | ,lang:"en" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#transDateStop' |
| | | ,lang:"en" |
| | | }); |
| | | laydate.render({ |
| | | |
| | | elem: '#certifyDateB' |
| | | ,lang:"en" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#nextFixDate' |
| | | ,lang:"en" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#GPSInstallDate' |
| | | ,lang:"en" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#registerDate' |
| | | ,lang:"en" |
| | | }); |
| | | </script> |
| | | <script type="application/javascript"> |
| | | $(function() { |
| | | var companyType = $("input[name='companyType']:checked").val(); |
| | | if (1 == companyType){ |
| | | $(".companyDiv").hide(); |
| | | } else if (2 == companyType){ |
| | | $(".companyDiv").show(); |
| | | } |
| | | |
| | | TCarInfoDlg.zcServerClick(); |
| | | TCarInfoDlg.kcServerClick(); |
| | | |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | |
| | | <div class="ibox-title"> |
| | | <h5>积分商品管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="name" name="商品名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="type" name="商品类型"> |
| | | <option value="">全部</option> |
| | | <option value="1">实体商品</option> |
| | | <option value="2">课包商品</option> |
| | | <option value="3">门票商品</option> |
| | | <option value="4">优惠券</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="redemptionMethod" name="兑换方式"> |
| | | <option value="">全部</option> |
| | | <option value="1">积分</option> |
| | | <option value="2">现金+积分</option> |
| | | <option value="3">现金</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="userPopulation" name="用户人群"> |
| | | <option value="">全部</option> |
| | | <option value="1">全部用户</option> |
| | | <option value="2">年度会员</option> |
| | | <option value="3">已有学员用户</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="activeStatus" name="活动状态"> |
| | | <option value="">全部</option> |
| | | <option value="1">未开始</option> |
| | | <option value="2">已开始</option> |
| | | <option value="3">已结束</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="state" name="可售状态"> |
| | | <option value="">全部</option> |
| | | <option value="1">上架</option> |
| | | <option value="2">下架</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TPointProducts.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TPointProducts.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TPointProductsTableToolbar" role="group"> |
| | | <#button name="添加" icon="fa-plus" clickFun="TPointProducts.openAddTPointProducts()"/> |
| | | <#button name="编辑" icon="fa-edit" clickFun="TPointProducts.openEditPage()" space="true"/> |
| | | <#button name="上架" icon="fa-remove" clickFun="TPointProducts.grounding(1)" space="true"/> |
| | | <#button name="下架" icon="fa-remove" clickFun="TPointProducts.grounding(2)" space="true"/> |
| | | <#button name="查看详情" icon="fa-remove" clickFun="TPointProducts.detail()" space="true"/> |
| | | <#button name="购买详情" icon="fa-remove" clickFun="TPointProducts.payDetail()" space="true"/> |
| | | </div> |
| | | <#table id="TPointProductsTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tGoods/tGoods.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style> |
| | | .avatar-uploader .el-upload { |
| | | border: 1px dashed #d9d9d9; |
| | | border-radius: 6px; |
| | | cursor: pointer; |
| | | position: relative; |
| | | height: 100px; |
| | | width: 100px; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .avatar-uploader .el-upload:hover { |
| | | border-color: #409eff; |
| | | } |
| | | .avatar-uploader-icon { |
| | | font-size: 28px; |
| | | color: #8c939d; |
| | | width: 100px; |
| | | height: 100px; |
| | | line-height: 100px; |
| | | margin-top: 34px; |
| | | text-align: center; |
| | | } |
| | | .avatar { |
| | | width: 100px; |
| | | height: 100px; |
| | | display: block; |
| | | } |
| | | |
| | | .col-sm-12 { |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .col-sm-12 select { |
| | | height: 33px; |
| | | } |
| | | </style> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">商品类型:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="type" value="1" checked onclick="updateType(1)"> 实体商品 |
| | | <input type="radio" name="type" value="2"onclick="updateType(2)" > 课包商品 |
| | | <input type="radio" name="type" value="3" onclick="updateType(1)"> 门票商品 |
| | | </div> |
| | | </div> |
| | | <div id="b1"> |
| | | <#input id="name" name="商品名称" type="text"/> |
| | | <#input id="price" name="原价" type="text"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">兑换方式:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="redemptionMethod" value="1" checked> 积分 |
| | | <input type="radio" name="redemptionMethod" value="2" > 现金+积分 |
| | | <input type="radio" name="redemptionMethod" value="3" > 现金 |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <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="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="text"> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <#avatar id="cover" name="商品封面" /> |
| | | <div class="row" id="app" style="margin-left: 225px;" > |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">商品图片: </label> |
| | | <div class="col-sm-2" style="margin-top: 2%"> |
| | | <el-upload |
| | | class="avatar-uploader" |
| | | action="/tCouponManage/uploadPic" |
| | | :on-success="handleAvatarSuccess" |
| | | accept=".jpg,.jpeg,.png,.JPG,.JPEG" |
| | | :on-remove="handleRemove" |
| | | :before-upload="beforeAvatarUpload"> |
| | | <img v-if="imageUrl" :src="imageUrl" class="avatar"> |
| | | <i v-else class="el-icon-plus avatar-uploader-icon"></i> |
| | | </el-upload> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">用户人群:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="userPopulation" value="1" checked> 全部用户 |
| | | <input type="radio" name="userPopulation" value="2" > 年度会员 |
| | | <input type="radio" name="userPopulation" value="3" > 已有学员用户 |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">发放数量:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="quantityIssued" name="quantityIssued" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">限领数量:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="pickUpQuantity" name="pickUpQuantity" type="text"> |
| | | </div> |
| | | </div> |
| | | <#input id="startTime" name="有效期" type="text"/> |
| | | |
| | | <div class="row" id="belongsCon" > |
| | | <div class="form-group"> |
| | | <div class="form-group"> |
| | | <div class="initialLevel col-sm-12 control-label form-group"> |
| | | <label class="col-sm-3">*适用范围: </label> |
| | | <div class="col-sm-2" id="belongsNationwide" > |
| | | <input class="col-sm-1" onclick="scopeOfApplication1()" name="company" type="radio" |
| | | value="0" checked style="margin-top: 10px"/> |
| | | <label class="col-sm-1" style="width: 38%;margin-top: 7px">全国通用</label> |
| | | </div> |
| | | <div class="col-sm-2" id="belongsCity" > |
| | | <input class="col-sm-1" name="company" onclick="scopeOfApplication2()" type="radio" |
| | | value="1" style="margin-top: 10px"/> |
| | | <label class="col-sm-1" style="width: 38%;margin-top: 7px">指定城市</label> |
| | | </div> |
| | | <div class="col-sm-2" id="belongsStore" > |
| | | <input class="col-sm-1" name="company" onclick="scopeOfApplication3()" type="radio" |
| | | value="1" style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px"/> |
| | | <label class="col-sm-1" style="width: 38%;margin-top: 6px;">指定门店</label> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row" id="citySelect" hidden="hidden"> |
| | | <div class="form-group"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*指定城市: </label> |
| | | <div class="col-sm-9 control-label"> |
| | | <select class="col-sm-1" id="provinceData" style="margin-top: 1%;width: 25%" onchange="changeCity(null)"> |
| | | <option value="">请选择</option> |
| | | </select> |
| | | <label class="col-sm-1" style="width: 9%;margin-top: 7px">省</label> |
| | | <select class="col-sm-1" style="margin-top: 1%;width: 25%" id="cityData"> |
| | | <option value="">请选择</option> |
| | | </select> |
| | | <label class="col-sm-1" style="width: 7%;margin-top: 7px">市</label> |
| | | <label name="addBranch" class="col-sm-1" onclick="TCarInfoDlg.addBranch()" style="border: 0px;cursor: pointer;margin-top: 1%"><i class="fa fa-plus-circle"></i></label> |
| | | </div> |
| | | <div id="cityDemo"></div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row" id="storeSelect" hidden="hidden"> |
| | | <div class="form-group"> |
| | | <div class="form-group"> |
| | | <div class="col-sm-12"> |
| | | <label class="col-sm-3 control-label">*指定门店: </label> |
| | | <button onclick="storeList()" |
| | | style="height: 22px;width: 82px;background-color: #4a8ff1;color: white;z-index: 15;position:relative;border: none;margin-top: 1%"> |
| | | 选择门店 |
| | | </button> |
| | | </div> |
| | | <div class="col-sm-12" style="margin-left: -57px;margin-top: 20px"> |
| | | <table class="table table-bordered" style="width: 70%;margin-left: 228px;" id="storeTable"> |
| | | <thead> |
| | | <tr> |
| | | <td>所在省市</td> |
| | | <td>所属账号</td> |
| | | <td>门店名称</td> |
| | | <td>操作</td> |
| | | </tr> |
| | | </thead> |
| | | <tbody id="coun"></tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="form-group" style="margin-left:262px"> |
| | | <label class="col-sm-1 control-label">兑换说明:</label> |
| | | <div class="col-sm-5"> |
| | | <textarea type="text/plain" id="editor" style="height: 300px;width: 800px;"></textarea> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="sort" name="sort" type="text"> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="b2" hidden> |
| | | |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="pCode" name="pCode" onchange="TCarInfoDlg.oneChange(this)"> |
| | | <option value="">选择省</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="cCode" name="cCode"> |
| | | <option value="">选择市</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/js/vue/vue.js"></script> |
| | | <script src="${ctxPath}/js/elementui/index.js"></script> |
| | | <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css"> |
| | | <script src="${ctxPath}/modular/system/tGoods/tGoods_info.js"></script> |
| | | <script src="${ctxPath}/modular/system/tGoods/TStoreInfo.js"></script> |
| | | <script> |
| | | |
| | | function updateType(e) { |
| | | if(e==2){ |
| | | $("#b1").hide() |
| | | $("#b2").show() |
| | | }else { |
| | | $("#b2 ").hide() |
| | | $("#b1").show() |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | function changeCity(n){ |
| | | |
| | | var provinceSelect = null; |
| | | if (n === undefined || n === null || n === ''){ |
| | | provinceSelect = document.getElementById("provinceData"); |
| | | }else { |
| | | provinceSelect = document.getElementById("provinceData"+n); |
| | | } |
| | | |
| | | var citySelect = null; |
| | | if (n === undefined || n === null || n === ''){ |
| | | citySelect = document.getElementById("cityData"); |
| | | }else { |
| | | citySelect = document.getElementById("cityData"+n); |
| | | } |
| | | |
| | | var selectedProvince = provinceSelect.value; |
| | | // 清空城市下拉框 |
| | | citySelect.innerHTML = '<option value="">请选择</option>'; |
| | | if (selectedProvince === "") { |
| | | return; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/tCouponManage/getCity", function(data){ |
| | | data.forEach(province => { |
| | | var option = document.createElement("option"); |
| | | option.value = province.id; // 根据你的数据结构确定省份的id字段 |
| | | option.text = province.name; // 根据你的数据结构确定省份的name字段 |
| | | citySelect.appendChild(option); |
| | | }); |
| | | },function(data){ |
| | | console.log('data:',data) |
| | | Feng.error("获取失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set('province',selectedProvince); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 全国通用 |
| | | */ |
| | | function scopeOfApplication1() { |
| | | $("#storeSelect").hide(); |
| | | $("#citySelect").hide(); |
| | | } |
| | | /** |
| | | * 指定城市 |
| | | */ |
| | | function scopeOfApplication2() { |
| | | $("#storeSelect").hide(); |
| | | $("#citySelect").show(); |
| | | } |
| | | /** |
| | | * 指定门店 |
| | | */ |
| | | function scopeOfApplication3() { |
| | | $("#storeSelect").show(); |
| | | $("#citySelect").hide(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | var vue2 = new Vue({ |
| | | el: '#app', |
| | | data: { |
| | | autoUpload: true,//自动上传 |
| | | imageUrl1: '',//模型数据,用于上传图片完成后图片预览 |
| | | dialogVisible: false |
| | | }, |
| | | methods: { |
| | | handleAvatarSuccess(res, file) { |
| | | TCarInfoDlg.goodsPicArray.push(file); |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isLt2M = file.size / 1024 / 1024 < 10; |
| | | if (!isLt2M) { |
| | | this.$message.error('上传图片大小不能超过 10MB!'); |
| | | } |
| | | return isLt2M; |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | couponInfoDlg.goodsPicArray = couponInfoDlg.goodsPicArray.filter(item => { |
| | | return item.uid != file.uid; |
| | | }); |
| | | }, |
| | | }, |
| | | created() { |
| | | }, |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style> |
| | | .avatar-uploader .el-upload { |
| | | border: 1px dashed #d9d9d9; |
| | | border-radius: 6px; |
| | | cursor: pointer; |
| | | position: relative; |
| | | height: 100px; |
| | | width: 100px; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .avatar-uploader .el-upload:hover { |
| | | border-color: #409eff; |
| | | } |
| | | |
| | | .avatar-uploader-icon { |
| | | font-size: 28px; |
| | | color: #8c939d; |
| | | width: 100px; |
| | | height: 100px; |
| | | line-height: 110px; |
| | | margin-top: 40px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .avatar { |
| | | width: 100px; |
| | | height: 100px; |
| | | display: block; |
| | | } |
| | | |
| | | .col-sm-12 { |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .col-sm-12 select { |
| | | height: 33px; |
| | | } |
| | | </style> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <div id="b1"> |
| | | |
| | | <#input id="name" name="商品名称" type="text" value="${item.name}" readonly="true" /> |
| | | |
| | | <#avatar id="cover" name="商品封面:" avatarImg="${item.cover}" /> |
| | | |
| | | |
| | | <div class="row" id="app" style="margin-left: 225px;"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">商品图片(请上传不超过五张图片): </label> |
| | | <div class="col-sm-2" style="width: 100%;margin-left: 12%;margin-top: 1%"> |
| | | <el-upload |
| | | :limit="5" |
| | | class="avatar-uploader" |
| | | action="/tCouponManage/uploadPic" |
| | | list-type="picture-card" |
| | | accept=".jpg,.jpeg,.png,.JPG,.JPEG" |
| | | :on-success="handleAvatarSuccess" |
| | | :on-remove="handleRemove"> |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | | <el-dialog :visible.sync="dialogVisible"> |
| | | <!-- <img width="100%" :src="imageUrl1" alt="">--> |
| | | @for(im in pictures){ |
| | | <img width="100%" src="${im}"> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">发放数量:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="quantityIssued" name="quantityIssued" type="text" value="${item.quantityIssued}"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">限领数量:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="pickUpQuantity" name="pickUpQuantity" type="text" value="${item.pickUpQuantity}"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" style="margin-left:262px"> |
| | | <label class="col-sm-1 control-label">兑换说明:</label> |
| | | <div class="col-sm-5"> |
| | | <textarea type="text/plain" id="editor" style="height: 300px;width: 800px;">${item.content}</textarea> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="sort" name="sort" type="text" value="${item.sort}"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/js/vue/vue.js"></script> |
| | | <script src="${ctxPath}/js/elementui/index.js"></script> |
| | | <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css"> |
| | | <script src="${ctxPath}/modular/system/tGoods/tGoods_info.js"></script> |
| | | <script> |
| | | var vue2 = new Vue({ |
| | | el: '#app', |
| | | data: { |
| | | autoUpload: true,//自动上传 |
| | | imageUrl1: '',//模型数据,用于上传图片完成后图片预览 |
| | | dialogVisible: false |
| | | }, |
| | | methods: { |
| | | handleAvatarSuccess(res, file) { |
| | | TCarInfoDlg.goodsPicArray.push(file); |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isLt2M = file.size / 1024 / 1024 < 10; |
| | | if (!isLt2M) { |
| | | this.$message.error('上传图片大小不能超过 10MB!'); |
| | | } |
| | | return isLt2M; |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | TCarInfoDlg.goodsPicArray = TCarInfoDlg.goodsPicArray.filter(item => { |
| | | return item.uid != file.uid; |
| | | }); |
| | | }, |
| | | }, |
| | | created() { |
| | | }, |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <input id="id" value="${id}" hidden="hidden"> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="name" name="姓名" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="phone" name="联系方式:" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="status" name="状态:"> |
| | | <option value="">全部</option> |
| | | <option value="1">未使用</option> |
| | | <option value="2">已使用</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TPayInfo.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TPayInfo.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TPayInfoTableToolbar" role="group"> |
| | | <#button name="核销" icon="fa-plus" clickFun="TPayInfo.WriteOff()"/> |
| | | </div> |
| | | <#table id="TPayInfoTable"/> |
| | | |
| | | <div style="margin-left: 40%"> |
| | | <button type="button" class="btn btn-info button-margin" onclick="TPayInfo.close()" |
| | | id="submit" style="width: 30%;height: 40px;background: #0d8ddb;color: white;border: none;"> |
| | | <i class="fa fa-check"></i> 关闭 |
| | | </button> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tGoods/tPay_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>所在门店</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <select class="form-control" id="province"> |
| | | <option value="">全部</option> |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <select class="form-control" id="city"> |
| | | <option value="">全部</option> |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="userPopulation" name="所属账号" > |
| | | <option value="">全部</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="storeName" name="门店名称" placeholder="请输入门店名称"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TStoreProvince.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TStoreProvince.resetSearch()"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TStoreProvinceTableToolbar" role="group"> |
| | | </div> |
| | | <#table id="TStoreProvinceTable"/> |
| | | <div style="margin-left: 30%"> |
| | | <button type="button" class="btn btn-info button-margin" onclick="TStoreProvince.storeOfClosePage()" |
| | | id="closePage" style="width: 30%;height: 40px;background: #0d8ddb;color: white;border: none;"> |
| | | <i class="fa fa-check"></i> 关闭 |
| | | </button> |
| | | |
| | | <button type="button" class="btn btn-info button-margin" onclick="TStoreProvince.saveSelectStores()" |
| | | id="submit" style="margin-left: 5%;width: 30%;height: 40px;background: #0d8ddb;color: white;border: none;"> |
| | | <i class="fa fa-check"></i> 保存 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tGoods/TStoreInfo.js"></script> |
| | | <script src="${ctxPath}/modular/system/tGoods/TCouponInfo.js"></script> |
| | | @} |
| | |
| | | <#NameCon id="time" name="变动时间" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCompetition.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TCompetition.resetSearch()" space="true"/> |
| | | <#button name="搜索" icon="fa-search" clickFun="TSite.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TSite.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TCompetitionTableToolbar" role="group"> |
| | | <#button name="赠送积分" icon="fa-plus" clickFun="TCompetition.openAddTCompetition()"/> |
| | | <#button name="赠送积分" icon="fa-plus" clickFun="TSite.openAdd()"/> |
| | | |
| | | </div> |
| | | <#table id="TSiteTable"/> |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <div class="row" id="app1"> |
| | | <#input id="phone" name="用户手机号" type="text" /> |
| | | <#input id="number" name="赠送数量" type="text" /> |
| | | |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tIntegral/tIntegral.js"></script> |
| | | @} |
| | |
| | | @layout("/common/_container.html"){ |
| | | <link rel="stylesheet" href="${ctxPath}/static/js/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="${ctxPath}/layui/css/layui.css" media="all"> |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/user/user.js"></script> |
| | | <script src="${ctxPath}/static/js/layui/layui.js" charset="utf-8"></script> |
| | | <script src="${ctxPath}/modular/system/user/user.js"></script> |
| | | <script src="${ctxPath}/layui/layui.js" charset="utf-8"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#beginTime' |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/user/user_info.js"></script> |
| | | <script src="${ctxPath}/modular/system/user/user_info.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#birthday' |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/user/user_info.js"></script> |
| | | <script src="${ctxPath}/modular/system/user/user_info.js"></script> |
| | | @} |
| | |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/user/user_info.js"></script> |
| | | <script src="${ctxPath}/modular/system/user/user_info.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#birthday' |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/user/user_info.js"></script> |
| | | <script src="${ctxPath}/modular/system/user/user_info.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#birthday' |
| | |
| | | ajax.start(); |
| | | }; |
| | | |
| | | /** |
| | | * 修改密码 |
| | | */ |
| | | CourseInfo.chPwd = function () { |
| | | let oldPwd = $('#oldPwd').val(); |
| | | let newPwd = $('#newPwd').val(); |
| | | if(oldPwd == newPwd){ |
| | | Feng.error("新密码不能和原始密码相同"); |
| | | return |
| | | } |
| | | let patt = /(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[^a-zA-Z0-9]).{8,30}/; |
| | | if(!patt.test(newPwd)){ |
| | | Feng.error("密码中必须包含大小字母、数字、特称字符,至少8个字符,最多30个字符"); |
| | | return |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/mgr/changePwd", function (data) { |
| | | Feng.success("修改成功!"); |
| | | }, function (data) { |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("oldPwd"); |
| | | ajax.set("newPwd"); |
| | | ajax.set("rePwd"); |
| | | ajax.start(); |
| | | |
| | | }; |
| | | |
| | | function onBodyDown(event) { |
| | | if (!(event.target.id == "menuBtn" || event.target.id == "menuContent" || $( |
New file |
| | |
| | | /** |
| | | * 系统管理--用户管理的单例对象 |
| | | */ |
| | | let ClassRecord = { |
| | | id: "managerTable",//表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1, |
| | | courseList: null |
| | | }; |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | ClassRecord.initColumn = function () { |
| | | let columns = [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '日期', field: 'classDate', align: 'center', valign: 'middle'}, |
| | | {title: '报名学员', field: 'registered', align: 'center', valign: 'middle'}, |
| | | {title: '实到学员', field: 'actualArrival', align: 'center', valign: 'middle'}, |
| | | {title: '未到学员', field: 'nonArrival', align: 'center', valign: 'middle'}, |
| | | {title: '课后练习', field: 'courseId', align: 'center', valign: 'middle', |
| | | formatter: function (v) { |
| | | if(typeof v == "undefined"){ |
| | | return '未布置'; |
| | | }else{ |
| | | return '已布置'; |
| | | } |
| | | } |
| | | }, |
| | | {title: '状态', field: 'status', align: 'center', valign: 'middle', |
| | | formatter: function (v) { |
| | | switch (v) { |
| | | case 1: |
| | | return '未开始'; |
| | | case 2: |
| | | return '已开始'; |
| | | case 3: |
| | | return '已结束'; |
| | | case 4: |
| | | return '已取消'; |
| | | } |
| | | } |
| | | }, |
| | | {title: '扣除课时', field: 'deductClassHour', align: 'center', valign: 'middle'}, |
| | | {title: '取消记录', field: 'absencesNumber', align: 'center', valign: 'middle', |
| | | formatter: function (v) { |
| | | if(typeof v == "undefined"){ |
| | | return '未上传'; |
| | | }else{ |
| | | return '已上传'; |
| | | } |
| | | } |
| | | }, |
| | | ]; |
| | | return columns; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | ClassRecord.check = function () { |
| | | let selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if (selected.length == 0) { |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | } else { |
| | | ClassRecord.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 点击修改按钮时 |
| | | * @param userId 管理员id |
| | | */ |
| | | ClassRecord.classRecord = function () { |
| | | if (this.check()) { |
| | | let index = layer.open({ |
| | | type: 2, |
| | | title: '查看学员', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/coursePackage/openCoursePackageStudent?id=' + this.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 删除用户 |
| | | */ |
| | | ClassRecord.cancelClassSchedule = function () { |
| | | if (this.check()) { |
| | | let operation = function(){ |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/cancelClassSchedule", function (res) { |
| | | if(res.code == 200){ |
| | | Feng.success("取消成功!"); |
| | | ClassRecord.table.refresh(); |
| | | }else{ |
| | | Feng.error(res.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("取消失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id", ClassRecord.seItem.id); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | Feng.confirm("确定取消本次",operation); |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | ClassRecord.afterClassExercises = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/course/queryCourseByType", function (data) { |
| | | ClassRecord.courseList = data; |
| | | let htmlStr = |
| | | '<div class="form-horizontal">' + |
| | | ' <div class="col-sm-11" style="padding: 20px;">' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">视频类型:</label>\n' + |
| | | ' <div class="col-sm-9" style="margin-top: 6px;">\n' + |
| | | ' <span>课后练习</span>' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">视频名称:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <select class="form-control" id="courseId">' + |
| | | ' <option value="">请选择</option>'; |
| | | for (let i = 0; i < data.length; i++) { |
| | | htmlStr += '<option value="' + data[i].id + '">' + data[i].name + '</option>'; |
| | | } |
| | | htmlStr += ' </select>' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">视频封面:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <img src="" style="height: 150px;" id="coverDrawing"/>' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">视频简介:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <textarea class="form-control" id="introduce" style="height: 200px;"></textarea>' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">可获得积分:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <input class="form-control" id="integral" type="number" min="0">' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' </div>' + |
| | | '</div>'; |
| | | layer.open({ |
| | | type: 1 |
| | | , title: '选择课程' |
| | | , area: ['50%', '90%'] |
| | | , offset: 'auto' //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset |
| | | , id: 'layerDemo' //防止重复弹出cge |
| | | , content: htmlStr |
| | | , btn: ['保存', '关闭'] |
| | | , btnAlign: 'c' //按钮居中 |
| | | , shade: 0.5 //不显示遮罩 |
| | | , yes: function () { |
| | | let courseId = $('#courseId').val(); |
| | | let integral = $('#integral').val(); |
| | | if(null == courseId || '' == courseId){ |
| | | Feng.error("请选择有效的课程"); |
| | | return |
| | | } |
| | | if(null == integral || '' == integral){ |
| | | Feng.error("请输入有效的积分"); |
| | | return |
| | | } |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/afterClassExercises", function (res) { |
| | | if(res.code == 200){ |
| | | Feng.success("保存成功!"); |
| | | layer.closeAll(); |
| | | RegistrationRecord.table.refresh(); |
| | | }else{ |
| | | Feng.error(res.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("保存失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id", ClassRecord.seItem.id); |
| | | ajax.set("courseId", courseId); |
| | | ajax.set("integral", integral); |
| | | ajax.start(); |
| | | }, |
| | | }); |
| | | |
| | | $('#courseId').change(function () { |
| | | let id = $(this).val(); |
| | | for (let i = 0; i < ClassRecord.courseList.length; i++) { |
| | | if(ClassRecord.courseList[i].id == id){ |
| | | $('#coverDrawing').attr("src", ClassRecord.courseList[i].coverDrawing); |
| | | $('#introduce').text(ClassRecord.courseList[i].introduce); |
| | | } |
| | | } |
| | | }) |
| | | |
| | | $('#courseId').val(ClassRecord.seItem.courseId); |
| | | $('#integral').val(ClassRecord.seItem.integral); |
| | | |
| | | }, function (data) { |
| | | Feng.error("获取失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set('type', 1); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | |
| | | ClassRecord.cancellationRecord = function(){ |
| | | if(this.check()){ |
| | | let htmlStr = |
| | | '<div class="form-horizontal">' + |
| | | ' <div class="col-sm-11" style="padding: 20px;">' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-2"></label>'+ |
| | | ' <label class="col-sm-8 control-label" style="text-align: left;">课程名称:' + $("#name").text() + '</label>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-2"></label>'+ |
| | | ' <label class="col-sm-8 control-label" style="text-align: left;">*上传凭证(请上传小于5张图片):</label>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-2"></label>'+ |
| | | ' <div class="col-sm-8" style="min-height: 200px;">\n' + |
| | | ' <div id="cancelClasses"></div>' + |
| | | ' <input type="file" id="file" style="display: none;"/>' + |
| | | ' <button onclick="uploadImgs()" style="width: 60px;padding: 10px; color: white;background-color: #0d8ddb;border-radius: 5px;border: none;bottom: 50%;position: absolute;"> 上传 </button>' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-2"></label>'+ |
| | | ' <label class="control-label" style="text-align: left;">扣除课时数:</label>\n' + |
| | | ' <input id="deductClassHour" type="number" min="0" style="background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;">' + |
| | | ' </div>' + |
| | | ' </div>' + |
| | | '</div>'; |
| | | layer.open({ |
| | | type: 1 |
| | | , title: '上传消课记录' |
| | | , area: ['80%', '90%'] |
| | | , offset: 'auto' //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset |
| | | , id: 'layerDemo' //防止重复弹出cge |
| | | , content: htmlStr |
| | | , btn: ['保存', '关闭'] |
| | | , btnAlign: 'c' //按钮居中 |
| | | , shade: 0.5 //不显示遮罩 |
| | | , yes: function () { |
| | | let cancelClasses = $('#cancelClasses').html(); |
| | | let deductClassHour = $('#deductClassHour').val(); |
| | | if(null == cancelClasses || '' == cancelClasses){ |
| | | Feng.error("请上传凭证图片"); |
| | | return |
| | | } |
| | | if(null == deductClassHour || '' == deductClassHour){ |
| | | Feng.error("请输入有效的扣除课时数"); |
| | | return |
| | | } |
| | | let div_array = $('#cancelClasses').find('div'); |
| | | let str = ''; |
| | | for (let i = 0; i < div_array.length; i++) { |
| | | let v = $($(div_array[i]).find('img')[0]).attr('src'); |
| | | str += v + ";"; |
| | | } |
| | | |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/cancellationRecord", function (res) { |
| | | if(res.code == 200){ |
| | | Feng.success("保存成功!"); |
| | | layer.closeAll(); |
| | | RegistrationRecord.table.refresh(); |
| | | }else{ |
| | | Feng.error(res.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("保存失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id", ClassRecord.seItem.id); |
| | | ajax.set("cancelClasses", str.substring(0, str.length - 1)); |
| | | ajax.set("deductClassHour", deductClassHour); |
| | | ajax.start(); |
| | | }, |
| | | }); |
| | | |
| | | $('#file').on('change', function () { |
| | | var formData = new FormData() //创建一个forData |
| | | formData.append('file', $('#file')[0].files[0]) //把file添加进去 name命名为img |
| | | layer.load(); //上传loading |
| | | $.ajax({ |
| | | url: Feng.ctxPath + '/mgr/uploadImg', |
| | | data: formData, |
| | | type: "POST", |
| | | async: true, |
| | | cache: false, |
| | | contentType: false, |
| | | processData: false, |
| | | success: function(res) { |
| | | layer.closeAll('loading'); //关闭loading |
| | | $('#file').val(''); |
| | | $('#cancelClasses').append('' + |
| | | '<div style="float: left; margin: 10px; width: 200px;">' + |
| | | ' <i class="fa fa-close" style="font-size:24px;color: red;position: relative;top: 10px;right: -190px" onclick="removeImg(this)"></i>' + |
| | | ' <div style="width: 100%;"><img src="' + res + '" style="width: 100%;"/></div>' + |
| | | '</div>') |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | |
| | | |
| | | ClassRecord.lookCancellationRecord = function(){ |
| | | if(this.check()){ |
| | | if(ClassRecord.seItem.cancelClasses == '' || ClassRecord.seItem.cancelClasses == null){ |
| | | Feng.error("请先上传消课凭证"); |
| | | return |
| | | } |
| | | let imgs = ClassRecord.seItem.cancelClasses.split(";"); |
| | | let htmlStr = |
| | | '<div class="form-horizontal">' + |
| | | ' <div class="col-sm-11" style="padding: 20px;">' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-8 control-label">课程名称:' + $("#name").text() + '</label>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-8 control-label">*上传凭证(请上传小于5张图片):</label>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <div class="col-sm-8" style="min-height: 200px;">\n' + |
| | | ' <div id="cancelClasses">'; |
| | | |
| | | for (let i = 0; i < imgs.length; i++) { |
| | | htmlStr += '<div><img src="' + imgs[i] + '" style="height: 150px;"/></div> '; |
| | | } |
| | | |
| | | htmlStr += '</div>' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">扣除课时数:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <input class="form-control" id="deductClassHour" value="' + ClassRecord.seItem.deductClassHour + '" type="number" min="0">' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' </div>' + |
| | | '</div>'; |
| | | layer.open({ |
| | | type: 1 |
| | | , title: '查看消课记录' |
| | | , area: ['50%', '90%'] |
| | | , offset: 'auto' //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset |
| | | , id: 'layerDemo' //防止重复弹出cge |
| | | , content: htmlStr |
| | | , btnAlign: 'c' //按钮居中 |
| | | , shade: 0.5 //不显示遮罩 |
| | | , yes: function () { |
| | | }, |
| | | }); |
| | | } |
| | | } |
| | | |
| | | ClassRecord.manualReservation = function(){ |
| | | if(this.check()){ |
| | | let index = layer.open({ |
| | | type: 2, |
| | | title: '手动预约', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/coursePackage/openManualReservation?id=' + this.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | |
| | | function uploadImgs(){ |
| | | let num = $('#cancelClasses>div').length; |
| | | if(num >= 5){ |
| | | Feng.error("最多只能上传5张图片"); |
| | | return; |
| | | } |
| | | $('#file').click(); |
| | | } |
| | | |
| | | |
| | | function removeImg(e){ |
| | | $(e).parent('div').remove(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | ClassRecord.resetSearch = function () { |
| | | ClassRecord.search(); |
| | | } |
| | | |
| | | ClassRecord.search = function () { |
| | | let queryData = {}; |
| | | queryData['id'] = $('#id').val(); |
| | | ClassRecord.table.refresh({query: queryData}); |
| | | } |
| | | |
| | | |
| | | $(function () { |
| | | let defaultColunms = ClassRecord.initColumn(); |
| | | let table = new BSTable(ClassRecord.id, "/coursePackage/queryClassRecord", defaultColunms); |
| | | // 设置物理分页server(逻辑分页client) |
| | | table.setPaginationType("server"); |
| | | table.setQueryParams({ |
| | | id: $('#id').val() |
| | | }) |
| | | ClassRecord.table = table.init(); |
| | | }); |
| | |
| | | id: "managerTable",//表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1, |
| | | deptid:0 |
| | | layerIndex: -1 |
| | | }; |
| | | let language =$("#language").val() |
| | | |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | |
| | | {title: '课程有效期', field: 'validDays', align: 'center', valign: 'middle'}, |
| | | {title: '支付方式', field: 'payType', align: 'center', valign: 'middle'}, |
| | | {title: '排序', field: 'sort', align: 'center', valign: 'middle'}, |
| | | {title: '课程封面', field: 'status', align: 'center', valign: 'middle', |
| | | {title: '课包状态', field: 'status', align: 'center', valign: 'middle', |
| | | formatter: function (v) { |
| | | switch (v) { |
| | | case 1: |
| | |
| | | */ |
| | | CoursePackage.editCoursePackage = function () { |
| | | if (this.check()) { |
| | | if(CoursePackage.seItem.status != 1){ |
| | | Feng.error("该状态不能编辑"); |
| | | return |
| | | } |
| | | let index = layer.open({ |
| | | type: 2, |
| | | title: '编辑', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/course/showEditCoursePackage?id=' + this.seItem.id |
| | | content: Feng.ctxPath + '/coursePackage/openEditCoursePackage?id=' + this.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | |
| | | CoursePackage.delCoursePackage = function () { |
| | | if (this.check()) { |
| | | let operation = function(){ |
| | | let ajax = new $ax(Feng.ctxPath + "/course/delCoursePackage", function () { |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/delCoursePackage", function () { |
| | | Feng.success("删除成功!"); |
| | | CoursePackage.table.refresh(); |
| | | }, function (data) { |
| | |
| | | Feng.error("不能重复操作"); |
| | | return |
| | | } |
| | | let ajax = new $ax(Feng.ctxPath + "/course/editCoursePackageState", function (data) { |
| | | Feng.success("下架成功!"); |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/editCoursePackageState", function (data) { |
| | | Feng.success(state == 1 ? '上架' : "下架" + "成功!"); |
| | | CoursePackage.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("下架失败!" + data.responseJSON.message + "!"); |
| | | Feng.error(state == 1 ? '上架' : "下架" + "失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id", CoursePackage.seItem.id); |
| | | ajax.set("state", state); |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/course/showCoursePackageDetails?id=' + this.seItem.id |
| | | content: Feng.ctxPath + '/coursePackage/showCoursePackageDetails?id=' + this.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | |
| | | CoursePackage.coursePackageDiscount = function () { |
| | | if (this.check()) { |
| | | let payType = CoursePackage.seItem.payType; |
| | | if(payType.indexOf("现金支付") < 0){ |
| | | Feng.error("该课程不能配置折扣"); |
| | | return |
| | | } |
| | | let index = layer.open({ |
| | | type: 2, |
| | | title: '折扣管理', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/coursePackage/showCoursePackageDiscount?id=' + this.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | CoursePackage.registrationRecord = function () { |
| | | if (this.check()) { |
| | | let index = layer.open({ |
| | | type: 2, |
| | | title: '报名信息', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/coursePackage/registrationRecord?id=' + this.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | |
| | | |
| | | $('#provinceCode').change(function () { |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/queryCity", function (data) { |
| | | let htmlStr = '<option value="">全部</option>'; |
| | | let htmlStr = ''; |
| | | for (let i = 0; i < data.length; i++) { |
| | | htmlStr += '<option value="' + data[i].code + '">' + data[i].name + '</option>' |
| | | } |
New file |
| | |
| | | /** |
| | | * 用户详情对话框(可用于添加和修改对话框) |
| | | */ |
| | | var CoursePackageDiscount = { |
| | | userInfoData: {}, |
| | | coursePackagePaymentConfig: {} |
| | | }; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | CoursePackageDiscount.close = function () { |
| | | parent.layer.close(window.parent.CoursePackage.layerIndex); |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | CoursePackageDiscount.editSubmit = function () { |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/coursePackage/setCoursePackageDiscount", function (data) { |
| | | if(data.code == 200){ |
| | | Feng.success("编辑成功!"); |
| | | CoursePackageDiscount.close(); |
| | | window.parent.CoursePackage.table.refresh(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("编辑失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set('json', JSON.stringify(CoursePackageDiscount.coursePackagePaymentConfig)); |
| | | ajax.set('id', $('#id').val()); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | function addPrice(type){ |
| | | let index = $('#classHours').find('button[checked]').attr('index'); |
| | | if(type == 3){ |
| | | let ll = $('#limitedTimeDiscount .limitedTimeDiscount').length; |
| | | let htmlStr = |
| | | ' <div class="form-group limitedTimeDiscount" index="' + ll + '">' + |
| | | ' <div class="col-sm-2"></div>\n' + |
| | | ' <div class="col-sm-8" style="border: 1px solid; padding: 20px;">\n' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-2 control-label">折扣有效期:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <input class="startAndEndDay" style="width: 300px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/>' + |
| | | ' </div>\n' + |
| | | ' <div class="col-sm-1"><i class="fa fa-trash-o" style="font-size:24px;color: red;" onclick="removePrice(3, this)"></i></div>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-2 control-label">*折扣时间:</label>\n' + |
| | | ' <div class="col-sm-5">\n' + |
| | | ' <input class="time" style="width: 200px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/>\n' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-2 control-label"></label>\n' + |
| | | ' <div class="col-sm-8" style="margin-top: 6px;">\n' + |
| | | ' <input type="checkbox" name="week" value="1" onclick="addPriceValue(3, this, \'weeks\')"/> 周一 ' + |
| | | ' <input type="checkbox" name="week" value="2" onclick="addPriceValue(3, this, \'weeks\')"/> 周二 ' + |
| | | ' <input type="checkbox" name="week" value="3" onclick="addPriceValue(3, this, \'weeks\')"/> 周三 ' + |
| | | ' <input type="checkbox" name="week" value="4" onclick="addPriceValue(3, this, \'weeks\')"/> 周四 ' + |
| | | ' <input type="checkbox" name="week" value="5" onclick="addPriceValue(3, this, \'weeks\')"/> 周五 ' + |
| | | ' <input type="checkbox" name="week" value="6" onclick="addPriceValue(3, this, \'weeks\')"/> 周六 ' + |
| | | ' <input type="checkbox" name="week" value="7" onclick="addPriceValue(3, this, \'weeks\')"/> 周日 ' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-2 control-label">*现金支付:</label>\n' + |
| | | ' <div class="col-sm-4">\n' + |
| | | ' <input type="number" class="price" onblur="addPriceValue(3, this, \'cashPayment\')" min="0" placeholder="请输入折扣后支付价格" style="width: 180px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/> ¥\n' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' </div>' + |
| | | ' </div>'; |
| | | |
| | | $('#limitedTimeDiscount').append(htmlStr); |
| | | let arr = CoursePackageDiscount.coursePackagePaymentConfig[index].coursePackageDiscount; |
| | | for(let k in arr){ |
| | | if(arr[k].type == 3){ |
| | | arr[k].content.push({}) |
| | | } |
| | | } |
| | | lay('.startAndEndDay').each(function(i, e){ |
| | | laydate.render({ |
| | | elem: this |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | ,done: function(value, date, endDate){ |
| | | let index = $('#classHours').find('button[checked]').attr('index'); |
| | | 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){ |
| | | 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]; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | lay('.time').each(function(i, e){ |
| | | laydate.render({ |
| | | elem: this |
| | | ,type: 'time' |
| | | ,range: true |
| | | ,done: function(value, date, endDate){ |
| | | let index = $('#classHours').find('button[checked]').attr('index'); |
| | | 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){ |
| | | 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]['startTime'] = arr[0]; |
| | | obj.coursePackageDiscount[i].content[j]['endTime'] = arr[1]; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | if(type == 4){ |
| | | let ll = $('#complimentaryClass .complimentaryClass').length; |
| | | let htmlStr = |
| | | ' <div class="form-group complimentaryClass" index="' + ll + '">' + |
| | | ' <div class="col-sm-2"></div>\n' + |
| | | ' <div class="col-sm-8" style="border: 1px solid; padding: 20px;">\n' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-2 control-label">*赠送有效期:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <input class="startAndEndDay" style="width: 300px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/>' + |
| | | ' </div>\n' + |
| | | ' <div class="col-sm-1"><i class="fa fa-trash-o" style="font-size:24px;color: red;" onclick="removePrice(4, this)"></i></div>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-2 control-label">*赠送时间:</label>\n' + |
| | | ' <div class="col-sm-5">\n' + |
| | | ' <input class="time" style="width: 200px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/>\n' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-2 control-label"></label>\n' + |
| | | ' <div class="col-sm-8" style="margin-top: 6px;">\n' + |
| | | ' <input type="checkbox" name="week" value="1" onclick="addPriceValue(4, this, \'weeks\')"/> 周一 ' + |
| | | ' <input type="checkbox" name="week" value="2" onclick="addPriceValue(4, this, \'weeks\')"/> 周二 ' + |
| | | ' <input type="checkbox" name="week" value="3" onclick="addPriceValue(4, this, \'weeks\')"/> 周三 ' + |
| | | ' <input type="checkbox" name="week" value="4" onclick="addPriceValue(4, this, \'weeks\')"/> 周四 ' + |
| | | ' <input type="checkbox" name="week" value="5" onclick="addPriceValue(4, this, \'weeks\')"/> 周五 ' + |
| | | ' <input type="checkbox" name="week" value="6" onclick="addPriceValue(4, this, \'weeks\')"/> 周六 ' + |
| | | ' <input type="checkbox" name="week" value="7" onclick="addPriceValue(4, this, \'weeks\')"/> 周日 ' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-2 control-label">*赠送课时数:</label>\n' + |
| | | ' <div class="col-sm-4">\n' + |
| | | ' <input type="number" class="price" onblur="addPriceValue(4, this, \'hour\')" min="0" placeholder="请输入赠送课时数" style="width: 180px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/> ¥\n' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' </div>' + |
| | | ' </div>'; |
| | | $('#complimentaryClass').append(htmlStr); |
| | | let arr = CoursePackageDiscount.coursePackagePaymentConfig[index].coursePackageDiscount; |
| | | for(let k in arr){ |
| | | if(arr[k].type == 4){ |
| | | arr[k].content.push({}) |
| | | } |
| | | } |
| | | lay('.startAndEndDay').each(function(i, e){ |
| | | laydate.render({ |
| | | elem: this |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | ,done: function(value, date, endDate){ |
| | | let index = $('#classHours').find('button[checked]').attr('index'); |
| | | 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){ |
| | | 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]; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | lay('.time').each(function(i, e){ |
| | | laydate.render({ |
| | | elem: this |
| | | ,type: 'time' |
| | | ,range: true |
| | | ,done: function(value, date, endDate){ |
| | | let index = $('#classHours').find('button[checked]').attr('index'); |
| | | 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){ |
| | | 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]['startTime'] = arr[0]; |
| | | obj.coursePackageDiscount[i].content[j]['endTime'] = arr[1]; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | |
| | | function removePrice(type, e){ |
| | | let index = $('#classHours').find('button[checked]').attr('index'); |
| | | let object = $(e).parent('div').parent('div').parent('div').parent('div'); |
| | | let ii = object.attr('index'); |
| | | let obj = CoursePackageDiscount.coursePackagePaymentConfig[index]; |
| | | for (let i = 0; i < obj.coursePackageDiscount.length; i++) { |
| | | if(type == obj.coursePackageDiscount[i].type){ |
| | | let jsonArray = null; |
| | | if(typeof obj.coursePackageDiscount[i].content == "string"){ |
| | | jsonArray = JSON.parse(obj.coursePackageDiscount[i].content); |
| | | }else{ |
| | | jsonArray = obj.coursePackageDiscount[i].content; |
| | | } |
| | | |
| | | let arr = []; |
| | | for (let j = 0; j < jsonArray.length; j++) { |
| | | if(j == ii){ |
| | | continue |
| | | } |
| | | arr.push(jsonArray[j]); |
| | | } |
| | | CoursePackageDiscount.coursePackagePaymentConfig[index].coursePackageDiscount[i].content = arr; |
| | | } |
| | | } |
| | | object.remove(); |
| | | } |
| | | |
| | | |
| | | function addPriceValue(type, e, name){ |
| | | let index = $('#classHours').find('button[checked]').attr('index'); |
| | | if(type == 1){ |
| | | let obj = CoursePackageDiscount.coursePackagePaymentConfig[index]; |
| | | for (let i = 0; i < obj.coursePackageDiscount.length; i++) { |
| | | if(type == obj.coursePackageDiscount[i].type){ |
| | | let content = null; |
| | | if(typeof obj.coursePackageDiscount[i].content == "string"){ |
| | | content = JSON.parse(obj.coursePackageDiscount[i].content); |
| | | }else{ |
| | | content = obj.coursePackageDiscount[i].content; |
| | | } |
| | | content[name] = parseFloat($(e).val()); |
| | | CoursePackageDiscount.coursePackagePaymentConfig[index].coursePackageDiscount[i].content = content; |
| | | } |
| | | } |
| | | } |
| | | if(type == 2){ |
| | | let obj = CoursePackageDiscount.coursePackagePaymentConfig[index]; |
| | | for (let i = 0; i < obj.coursePackageDiscount.length; i++) { |
| | | if(type == obj.coursePackageDiscount[i].type){ |
| | | let content = null; |
| | | if(typeof obj.coursePackageDiscount[i].content == "string"){ |
| | | content = JSON.parse(obj.coursePackageDiscount[i].content); |
| | | }else{ |
| | | content = obj.coursePackageDiscount[i].content; |
| | | } |
| | | content[name] = parseFloat($(e).val()); |
| | | CoursePackageDiscount.coursePackagePaymentConfig[index].coursePackageDiscount[i].content = content; |
| | | } |
| | | } |
| | | } |
| | | if(type == 3){ |
| | | 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){ |
| | | let jsonArray = null; |
| | | if(typeof obj.coursePackageDiscount[i].content == "string"){ |
| | | jsonArray = JSON.parse(obj.coursePackageDiscount[i].content); |
| | | }else{ |
| | | jsonArray = obj.coursePackageDiscount[i].content; |
| | | } |
| | | |
| | | for (let j = 0; j < jsonArray.length; j++) { |
| | | if(j == ii){ |
| | | if('weeks' == name){ |
| | | let weeks = jsonArray[j].weeks; |
| | | let v = parseInt($(e).val()); |
| | | if(null != weeks && typeof weeks != "undefined"){ |
| | | if(e.checked){ |
| | | weeks.push(v); |
| | | }else{ |
| | | let arr = []; |
| | | for (let k = 0; k < weeks.length; k++) { |
| | | if(weeks[k] == v){ |
| | | continue |
| | | } |
| | | arr.push(weeks[k]); |
| | | } |
| | | weeks = arr; |
| | | } |
| | | }else{ |
| | | weeks = [v]; |
| | | } |
| | | jsonArray[j].weeks = weeks; |
| | | }else{ |
| | | jsonArray[j][name] = parseFloat($(e).val()); |
| | | } |
| | | } |
| | | } |
| | | CoursePackageDiscount.coursePackagePaymentConfig[index].coursePackageDiscount[i].content = jsonArray; |
| | | } |
| | | } |
| | | } |
| | | if(type == 4){ |
| | | 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){ |
| | | let jsonArray = null; |
| | | if(typeof obj.coursePackageDiscount[i].content == "string"){ |
| | | jsonArray = JSON.parse(obj.coursePackageDiscount[i].content); |
| | | }else{ |
| | | jsonArray = obj.coursePackageDiscount[i].content; |
| | | } |
| | | for (let j = 0; j < jsonArray.length; j++) { |
| | | if(j == ii){ |
| | | if('weeks' == name){ |
| | | let weeks = jsonArray[j].weeks; |
| | | let v = parseInt($(e).val()); |
| | | if(null != weeks && typeof weeks != "undefined"){ |
| | | if(e.checked){ |
| | | weeks.push(v); |
| | | }else{ |
| | | let arr = []; |
| | | for (let k = 0; k < weeks.length; k++) { |
| | | if(weeks[k] == v){ |
| | | continue |
| | | } |
| | | arr.push(weeks[k]); |
| | | } |
| | | weeks = arr; |
| | | } |
| | | }else{ |
| | | weeks = [v]; |
| | | } |
| | | jsonArray[j].weeks = weeks; |
| | | }else{ |
| | | jsonArray[j][name] = parseFloat($(e).val()); |
| | | } |
| | | } |
| | | } |
| | | CoursePackageDiscount.coursePackagePaymentConfig[index].coursePackageDiscount[i].content = jsonArray; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | function selectedPperiod(e){ |
| | | $('#classHours').find('button[checked]').attr('style', 'width: 60px;height: 30px;border: none;border-radius: 5px;'); |
| | | $('#classHours').find('button[checked]').removeAttr('checked'); |
| | | if(typeof e != "undefined"){ |
| | | $(e).attr('style', 'width: 60px;height: 30px;background-color: #0086F6;border: none;border-radius: 5px;color: white;'); |
| | | $(e).attr('checked', true); |
| | | }else{ |
| | | $($('#classHours').find('button')[0]).attr('style', 'width: 60px;height: 30px;background-color: #0086F6;border: none;border-radius: 5px;color: white;'); |
| | | $($('#classHours').find('button')[0]).attr('checked', true); |
| | | } |
| | | |
| | | let index = $('#classHours').find('button[checked]').attr('index'); |
| | | let obj = CoursePackageDiscount.coursePackagePaymentConfig[index]; |
| | | $('#payment').text(obj.payment); |
| | | $('#cashPayment').text(obj.cashPayment); |
| | | |
| | | $('#memberDiscount').html(''); |
| | | $('#renewalOffer').html(''); |
| | | $('#limitedTimeDiscount').html(''); |
| | | $('#complimentaryClass').html(''); |
| | | let objv = CoursePackageDiscount.coursePackagePaymentConfig[index]; |
| | | $('input[name="type"]').each(function (i, e) { |
| | | e.checked = false; |
| | | let v = $(e).val(); |
| | | for (let i = 0; i < objv.coursePackageDiscount.length; i++) { |
| | | if(v == objv.coursePackageDiscount[i].type){ |
| | | $(e).click(); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | $(function () { |
| | | CoursePackageDiscount.coursePackagePaymentConfig = JSON.parse($('#coursePackagePaymentConfig').val()); |
| | | let htmlStr = ''; |
| | | for (let i = 0; i < CoursePackageDiscount.coursePackagePaymentConfig.length; i++) { |
| | | let obj = CoursePackageDiscount.coursePackagePaymentConfig[i]; |
| | | if(i == 0){ |
| | | htmlStr += '<button checked onclick="selectedPperiod(this)" index="' + i + '" style="width: 60px;height: 30px;background-color: #0086F6;border: none;border-radius: 5px;color: white;">' + obj.classHours + '课时</button> '; |
| | | }else{ |
| | | htmlStr += '<button onclick="selectedPperiod(this)" index="' + i + '" style="width: 60px;height: 30px;border: none;border-radius: 5px;">' + obj.classHours + '课时</button> '; |
| | | } |
| | | } |
| | | $('#classHours').html(htmlStr); |
| | | |
| | | $('input[name="type"]').click(function () { |
| | | let v = $(this).val(); |
| | | let index = $('#classHours').find('button[checked]').attr('index'); |
| | | if(this.checked && v == '1'){ |
| | | let discountMember = true; |
| | | let hh = '<div class="hr-line-dashed"></div>' + |
| | | '<h3>会员折扣</h3>\n' + |
| | | ' <div class="form-group">\n' + |
| | | ' <div class="col-sm-2"></div>'+ |
| | | ' <div class="col-sm-10">' + |
| | | ' <label class="col-sm-2 control-label">*现金支付:</label>\n' + |
| | | ' <div class="col-sm-3">\n' + |
| | | ' <input type="number" min="0" value="'; |
| | | let obj = CoursePackageDiscount.coursePackagePaymentConfig[index]; |
| | | for (let i = 0; i < obj.coursePackageDiscount.length; i++) { |
| | | if(v == obj.coursePackageDiscount[i].type){ |
| | | let jsonObject = null; |
| | | if(typeof obj.coursePackageDiscount[i].content == "string"){ |
| | | jsonObject = JSON.parse(obj.coursePackageDiscount[i].content); |
| | | }else{ |
| | | jsonObject = obj.coursePackageDiscount[i].content; |
| | | } |
| | | hh += (null == jsonObject.discountMember ? '' : jsonObject.discountMember); |
| | | discountMember = false; |
| | | } |
| | | } |
| | | hh += '" placeholder="请输入会员支付价格" onblur="addPriceValue(1, this, \'discountMember\')" style="width: 180px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/> ¥\n' + |
| | | ' </div>\n' + |
| | | ' </div>'+ |
| | | ' </div>'; |
| | | |
| | | $('#memberDiscount').html(hh); |
| | | if(discountMember){ |
| | | CoursePackageDiscount.coursePackagePaymentConfig[index].coursePackageDiscount.push({ |
| | | type: 1, |
| | | content:{ |
| | | discountMember: null |
| | | } |
| | | }); |
| | | } |
| | | }else if(!this.checked && v == '1'){ |
| | | $('#memberDiscount').html(''); |
| | | let datas = CoursePackageDiscount.coursePackagePaymentConfig[index].coursePackageDiscount; |
| | | let arra = []; |
| | | for (let i = 0; i < datas.length; i++){ |
| | | if(datas[i].type == v){ |
| | | continue; |
| | | } |
| | | arra.push(datas[i]); |
| | | } |
| | | CoursePackageDiscount.coursePackagePaymentConfig[index].coursePackageDiscount = arra; |
| | | } |
| | | if(this.checked && v == '2'){ |
| | | let continuingMember = true; |
| | | let hh = '<div class="hr-line-dashed"></div>' + |
| | | '<h3>续课优惠</h3>\n' + |
| | | ' <div class="form-group">\n' + |
| | | ' <div class="col-sm-2"></div>'+ |
| | | ' <div class="col-sm-10">' + |
| | | ' <label class="col-sm-2 control-label">会员续课:</label>\n' + |
| | | ' <div class="col-sm-3">\n' + |
| | | ' </div>\n' + |
| | | ' <label class="col-sm-2 control-label">用户续课:</label>\n' + |
| | | ' <div class="col-sm-3">\n' + |
| | | ' </div>\n' + |
| | | ' </div>'+ |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <div class="col-sm-2"></div>'+ |
| | | ' <div class="col-sm-10">' + |
| | | ' <label class="col-sm-2 control-label">*现金支付:</label>\n' + |
| | | ' <div class="col-sm-3">\n' + |
| | | ' <input type="number" min="0" value="'; |
| | | let obj = CoursePackageDiscount.coursePackagePaymentConfig[index]; |
| | | for (let i = 0; i < obj.coursePackageDiscount.length; i++) { |
| | | if(v == obj.coursePackageDiscount[i].type){ |
| | | let jsonObject = null; |
| | | if(typeof obj.coursePackageDiscount[i].content == "string"){ |
| | | jsonObject = JSON.parse(obj.coursePackageDiscount[i].content); |
| | | }else{ |
| | | jsonObject = obj.coursePackageDiscount[i].content; |
| | | } |
| | | hh += (null == jsonObject.continuingMember ? '' : jsonObject.continuingMember); |
| | | continuingMember = false; |
| | | } |
| | | } |
| | | hh += '" placeholder="请输入会员支付价格" onblur="addPriceValue(2, this, \'continuingMember\')" style="width: 180px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/> ¥\n' + |
| | | ' </div>\n' + |
| | | ' <label class="col-sm-2 control-label">*现金支付:</label>\n' + |
| | | ' <div class="col-sm-3">\n' + |
| | | ' <input type="number" min="0" value="'; |
| | | let obje = CoursePackageDiscount.coursePackagePaymentConfig[index]; |
| | | for (let i = 0; i < obje.coursePackageDiscount.length; i++) { |
| | | if(v == obje.coursePackageDiscount[i].type){ |
| | | let jsonObject = null; |
| | | if(typeof obje.coursePackageDiscount[i].content == "string"){ |
| | | jsonObject = JSON.parse(obje.coursePackageDiscount[i].content); |
| | | }else{ |
| | | jsonObject = obje.coursePackageDiscount[i].content; |
| | | } |
| | | hh += (null == jsonObject.continuingUser ? '' : jsonObject.continuingUser); |
| | | } |
| | | } |
| | | hh += '" placeholder="请输入用户支付价格" onblur="addPriceValue(2, this, \'continuingUser\')" style="width: 180px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/> ¥\n' + |
| | | ' </div>\n' + |
| | | ' </div>'+ |
| | | ' </div>'; |
| | | $('#renewalOffer').html(hh); |
| | | if(continuingMember){ |
| | | CoursePackageDiscount.coursePackagePaymentConfig[index].coursePackageDiscount.push({ |
| | | type: 2, |
| | | content: { |
| | | continuingMember: null, |
| | | continuingUser: null |
| | | } |
| | | }) |
| | | } |
| | | }else if(!this.checked && v == '2'){ |
| | | $('#renewalOffer').html(''); |
| | | let datas = CoursePackageDiscount.coursePackagePaymentConfig[index].coursePackageDiscount; |
| | | let arra = []; |
| | | for (let i = 0; i < datas.length; i++){ |
| | | if(datas[i].type == v){ |
| | | continue; |
| | | } |
| | | arra.push(datas[i]); |
| | | } |
| | | CoursePackageDiscount.coursePackagePaymentConfig[index].coursePackageDiscount = arra; |
| | | } |
| | | if(this.checked && v == '3'){ |
| | | let data_value = true; |
| | | let hh = '<div class="hr-line-dashed"></div>' + |
| | | '<span style="font-size: 16px;font-weight: 500;">限时折扣</span> <i class="fa fa-plus-circle" style="font-size:24px" onclick="addPrice(3)"></i>\n'; |
| | | let obje = CoursePackageDiscount.coursePackagePaymentConfig[index]; |
| | | for (let i = 0; i < obje.coursePackageDiscount.length; i++) { |
| | | if(v == obje.coursePackageDiscount[i].type){ |
| | | data_value = false |
| | | let jsonArray = null; |
| | | if(typeof obje.coursePackageDiscount[i].content == "string"){ |
| | | jsonArray = JSON.parse(obje.coursePackageDiscount[i].content); |
| | | }else{ |
| | | jsonArray = obje.coursePackageDiscount[i].content; |
| | | } |
| | | |
| | | for (let j = 0; j < jsonArray.length; j++) { |
| | | hh += '' + |
| | | ' <div class="form-group limitedTimeDiscount" index="' + j + '">' + |
| | | ' <div class="col-sm-2"></div>\n' + |
| | | ' <div class="col-sm-8" style="border: 1px solid; padding: 20px;">\n' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-2 control-label">折扣有效期:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <input class="startAndEndDay" value="' + (jsonArray[j].startDate + " - " + jsonArray[j].endDate) + '" style="width: 300px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/>' + |
| | | ' </div>\n' + |
| | | ' <div class="col-sm-1"><i class="fa fa-trash-o" style="font-size:24px;color: red;" onclick="removePrice(3, this)"></i></div>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-2 control-label">*折扣时间:</label>\n' + |
| | | ' <div class="col-sm-5">\n' + |
| | | ' <input class="time" value="' + jsonArray[j].startTime + " - " + jsonArray[j].endTime + '" style="width: 200px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/>\n' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-2 control-label"></label>\n' + |
| | | ' <div class="col-sm-8" style="margin-top: 6px;">\n' + |
| | | ' <input type="checkbox" name="week" value="1"'; |
| | | for (let k = 0; k < jsonArray[j].weeks.length; k++) { |
| | | let w = jsonArray[j].weeks[k]; |
| | | if(w == 1){ |
| | | hh += 'checked'; |
| | | } |
| | | } |
| | | hh += '/> 周一 ' + |
| | | ' <input type="checkbox" name="week" value="2"'; |
| | | for (let k = 0; k < jsonArray[j].weeks.length; k++) { |
| | | let w = jsonArray[j].weeks[k]; |
| | | if(w == 2){ |
| | | hh += 'checked'; |
| | | } |
| | | } |
| | | hh += '/> 周二 ' + |
| | | ' <input type="checkbox" name="week" value="3"'; |
| | | for (let k = 0; k < jsonArray[j].weeks.length; k++) { |
| | | let w = jsonArray[j].weeks[k]; |
| | | if(w == 3){ |
| | | hh += 'checked'; |
| | | } |
| | | } |
| | | hh += '/> 周三 ' + |
| | | ' <input type="checkbox" name="week" value="4"'; |
| | | for (let k = 0; k < jsonArray[j].weeks.length; k++) { |
| | | let w = jsonArray[j].weeks[k]; |
| | | if(w == 4){ |
| | | hh += 'checked'; |
| | | } |
| | | } |
| | | hh += '/> 周四 ' + |
| | | ' <input type="checkbox" name="week" value="5"'; |
| | | for (let k = 0; k < jsonArray[j].weeks.length; k++) { |
| | | let w = jsonArray[j].weeks[k]; |
| | | if(w == 5){ |
| | | hh += 'checked'; |
| | | } |
| | | } |
| | | hh += '/> 周五 ' + |
| | | ' <input type="checkbox" name="week" value="6"'; |
| | | for (let k = 0; k < jsonArray[j].weeks.length; k++) { |
| | | let w = jsonArray[j].weeks[k]; |
| | | if(w == 6){ |
| | | hh += 'checked'; |
| | | } |
| | | } |
| | | hh += '/> 周六 ' + |
| | | ' <input type="checkbox" name="week" value="7"'; |
| | | for (let k = 0; k < jsonArray[j].weeks.length; k++) { |
| | | let w = jsonArray[j].weeks[k]; |
| | | if(w == 7){ |
| | | hh += 'checked'; |
| | | } |
| | | } |
| | | hh += '/> 周日 ' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-2 control-label">*现金支付:</label>\n' + |
| | | ' <div class="col-sm-4">\n' + |
| | | ' <input type="number" min="0" value="' + jsonArray[j].cashPayment + '" onblur="addPriceValue(3, this, \'cashPayment\')" placeholder="请输入折扣后支付价格" style="width: 180px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/> ¥\n' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' </div>' + |
| | | ' </div>'; |
| | | } |
| | | |
| | | } |
| | | } |
| | | $('#limitedTimeDiscount').html(hh); |
| | | if(data_value){ |
| | | CoursePackageDiscount.coursePackagePaymentConfig[index].coursePackageDiscount.push({ |
| | | type: 3, |
| | | content: [] |
| | | }) |
| | | } |
| | | }else if(!this.checked && v == '3'){ |
| | | $('#limitedTimeDiscount').html(''); |
| | | let datas = CoursePackageDiscount.coursePackagePaymentConfig[index].coursePackageDiscount; |
| | | let arra = []; |
| | | for (let i = 0; i < datas.length; i++){ |
| | | if(datas[i].type == v){ |
| | | continue; |
| | | } |
| | | arra.push(datas[i]); |
| | | } |
| | | CoursePackageDiscount.coursePackagePaymentConfig[index].coursePackageDiscount = arra; |
| | | } |
| | | if(this.checked && v == '4'){ |
| | | let data_value = true; |
| | | let hh = |
| | | '<div class="hr-line-dashed"></div>' + |
| | | '<span style="font-size: 16px;font-weight: 500;">赠送课时</span> <i class="fa fa-plus-circle" style="font-size:24px" onclick="addPrice(4)"></i>\n'; |
| | | let obje = CoursePackageDiscount.coursePackagePaymentConfig[index]; |
| | | for (let i = 0; i < obje.coursePackageDiscount.length; i++) { |
| | | if (v == obje.coursePackageDiscount[i].type) { |
| | | data_value = false; |
| | | let jsonArray = null; |
| | | if(typeof obje.coursePackageDiscount[i].content == "string"){ |
| | | jsonArray = JSON.parse(obje.coursePackageDiscount[i].content); |
| | | }else{ |
| | | jsonArray = obje.coursePackageDiscount[i].content; |
| | | } |
| | | for (let j = 0; j < jsonArray.length; j++) { |
| | | hh += |
| | | ' <div class="form-group complimentaryClass" index="' + j + '">' + |
| | | ' <div class="col-sm-2"></div>\n' + |
| | | ' <div class="col-sm-8" style="border: 1px solid; padding: 20px;">\n' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-2 control-label">*赠送有效期:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <input class="startAndEndDay" value="' + (jsonArray[j].startDate + " - " + jsonArray[j].endDate) + '" style="width: 300px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/>' + |
| | | ' </div>\n' + |
| | | ' <div class="col-sm-1"><i class="fa fa-trash-o" style="font-size:24px;color: red;" onclick="removePrice(4, this)"></i></div>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-2 control-label">*赠送时间:</label>\n' + |
| | | ' <div class="col-sm-5">\n' + |
| | | ' <input class="time" value="' + jsonArray[j].startTime + " - " + jsonArray[j].endTime + '" style="width: 200px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/>\n' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-2 control-label"></label>\n' + |
| | | ' <div class="col-sm-8" style="margin-top: 6px;">\n' + |
| | | ' <input type="checkbox" name="week" value="1"'; |
| | | for (let k = 0; k < jsonArray[j].weeks.length; k++) { |
| | | let w = jsonArray[j].weeks[k]; |
| | | if(w == 1){ |
| | | hh += 'checked'; |
| | | } |
| | | } |
| | | hh += '/> 周一 ' + |
| | | ' <input type="checkbox" name="week" value="2"'; |
| | | for (let k = 0; k < jsonArray[j].weeks.length; k++) { |
| | | let w = jsonArray[j].weeks[k]; |
| | | if(w == 2){ |
| | | hh += 'checked'; |
| | | } |
| | | } |
| | | hh += '/> 周二 ' + |
| | | ' <input type="checkbox" name="week" value="3"'; |
| | | for (let k = 0; k < jsonArray[j].weeks.length; k++) { |
| | | let w = jsonArray[j].weeks[k]; |
| | | if(w == 3){ |
| | | hh += 'checked'; |
| | | } |
| | | } |
| | | hh += '/> 周三 ' + |
| | | ' <input type="checkbox" name="week" value="4"'; |
| | | for (let k = 0; k < jsonArray[j].weeks.length; k++) { |
| | | let w = jsonArray[j].weeks[k]; |
| | | if(w == 4){ |
| | | hh += 'checked'; |
| | | } |
| | | } |
| | | hh += '/> 周四 ' + |
| | | ' <input type="checkbox" name="week" value="5"'; |
| | | for (let k = 0; k < jsonArray[j].weeks.length; k++) { |
| | | let w = jsonArray[j].weeks[k]; |
| | | if(w == 5){ |
| | | hh += 'checked'; |
| | | } |
| | | } |
| | | hh += '/> 周五 ' + |
| | | ' <input type="checkbox" name="week" value="6"'; |
| | | for (let k = 0; k < jsonArray[j].weeks.length; k++) { |
| | | let w = jsonArray[j].weeks[k]; |
| | | if(w == 6){ |
| | | hh += 'checked'; |
| | | } |
| | | } |
| | | hh += '/> 周六 ' + |
| | | ' <input type="checkbox" name="week" value="7"'; |
| | | for (let k = 0; k < jsonArray[j].weeks.length; k++) { |
| | | let w = jsonArray[j].weeks[k]; |
| | | if(w == 7){ |
| | | hh += 'checked'; |
| | | } |
| | | } |
| | | hh += '/> 周日 ' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-2 control-label">*赠送课时数:</label>\n' + |
| | | ' <div class="col-sm-4">\n' + |
| | | ' <input type="number" value="' + jsonArray[j].hour + '" onblur="addPriceValue(4, this, \'hour\')" min="0" placeholder="请输入赠送课时数" style="width: 180px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/> ¥\n' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' </div>' + |
| | | ' </div>'; |
| | | } |
| | | } |
| | | } |
| | | $('#complimentaryClass').html(hh); |
| | | if(data_value){ |
| | | CoursePackageDiscount.coursePackagePaymentConfig[index].coursePackageDiscount.push({ |
| | | type: 4, |
| | | content: [] |
| | | }) |
| | | } |
| | | }else if(!this.checked && v == '4'){ |
| | | $('#complimentaryClass').html(''); |
| | | let datas = CoursePackageDiscount.coursePackagePaymentConfig[index].coursePackageDiscount; |
| | | let arra = []; |
| | | for (let i = 0; i < datas.length; i++){ |
| | | if(datas[i].type == v){ |
| | | continue; |
| | | } |
| | | arra.push(datas[i]); |
| | | } |
| | | CoursePackageDiscount.coursePackagePaymentConfig[index].coursePackageDiscount = arra; |
| | | } |
| | | }) |
| | | |
| | | |
| | | selectedPperiod(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 系统管理--用户管理的单例对象 |
| | | */ |
| | | let CoursePackageStudent = { |
| | | id: "managerTable",//表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | CoursePackageStudent.initColumn = function () { |
| | | let columns = [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '所属用户', field: 'userName', align: 'center', valign: 'middle'}, |
| | | {title: '姓名', field: 'studentName', align: 'center', valign: 'middle'}, |
| | | {title: '联系电话', field: 'phone', align: 'center', valign: 'middle'}, |
| | | {title: '年龄', field: 'age', align: 'center', valign: 'middle'}, |
| | | {title: '性别', field: 'sex', align: 'center', valign: 'middle', |
| | | formatter: function (v) { |
| | | if(v == 1){ |
| | | return '男'; |
| | | }else{ |
| | | return '女'; |
| | | } |
| | | } |
| | | }, |
| | | {title: '到课状态', field: 'signInOrNot', align: 'center', valign: 'middle', |
| | | formatter: function (v) { |
| | | switch (v) { |
| | | case 0: |
| | | return '未到'; |
| | | case 1: |
| | | return '已到'; |
| | | } |
| | | } |
| | | }, |
| | | {title: '预定状态', field: 'reservationStatus', align: 'center', valign: 'middle', |
| | | formatter: function (v) { |
| | | if(v == 0){ |
| | | return '已取消'; |
| | | }else{ |
| | | return '正常'; |
| | | } |
| | | } |
| | | }, |
| | | ]; |
| | | return columns; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | CoursePackageStudent.check = function () { |
| | | let selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if (selected.length == 0) { |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | } else { |
| | | CoursePackageStudent.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 取消预约 |
| | | */ |
| | | CoursePackageStudent.cancelReservation = function () { |
| | | if (this.check()) { |
| | | if(CoursePackageStudent.seItem.reservationStatus == 0){ |
| | | Feng.error("不能重复操作"); |
| | | return |
| | | } |
| | | if(CoursePackageStudent.seItem.signInOrNot == 1){ |
| | | Feng.error("不能取消预约操作"); |
| | | return |
| | | } |
| | | let operation = function(){ |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/cancelReservation", function (res) { |
| | | if(res.code == 200){ |
| | | Feng.success("取消成功!"); |
| | | CoursePackageStudent.table.refresh(); |
| | | }else{ |
| | | Feng.error(res.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("取消失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id", CoursePackageStudent.seItem.id); |
| | | ajax.start(); |
| | | }; |
| | | Feng.confirm("是否取消预约",operation); |
| | | } |
| | | }; |
| | | |
| | | |
| | | CoursePackageStudent.absence = function () { |
| | | if (this.check()) { |
| | | if(CoursePackageStudent.seItem.signInOrNot == 0){ |
| | | Feng.error("不能重复操作"); |
| | | return |
| | | } |
| | | if(CoursePackageStudent.seItem.reservationStatus == 0){ |
| | | Feng.error("该数据已取消预约"); |
| | | return |
| | | } |
| | | let operation = function(){ |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/setAbsenceStatus", function (res) { |
| | | if(res.code == 200){ |
| | | Feng.success("修改成功!"); |
| | | CoursePackageStudent.table.refresh(); |
| | | }else{ |
| | | Feng.error(res.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id", CoursePackageStudent.seItem.id); |
| | | ajax.start(); |
| | | }; |
| | | Feng.confirm("是否标注未到",operation); |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | CoursePackageStudent.resetSearch = function () { |
| | | $('#userName').val(''); |
| | | $('#studentName').val(''); |
| | | CoursePackageStudent.search(); |
| | | } |
| | | |
| | | CoursePackageStudent.search = function () { |
| | | let queryData = {}; |
| | | queryData['id'] = $('#id').val(); |
| | | queryData['userName'] = $('#userName').val(); |
| | | queryData['studentName'] = $('#studentName').val(); |
| | | CoursePackageStudent.table.refresh({query: queryData}); |
| | | } |
| | | |
| | | |
| | | $(function () { |
| | | let defaultColunms = CoursePackageStudent.initColumn(); |
| | | let table = new BSTable(CoursePackageStudent.id, "/coursePackage/queryCoursePackageStudentList", defaultColunms); |
| | | // 设置物理分页server(逻辑分页client) |
| | | table.setPaginationType("server"); |
| | | table.setQueryParams({ |
| | | id: $('#id').val() |
| | | }) |
| | | CoursePackageStudent.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 用户详情对话框(可用于添加和修改对话框) |
| | | */ |
| | | var CoursePackageInfo = { |
| | | userInfoData: {}, |
| | | }; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | CoursePackageInfo.close = function () { |
| | | parent.layer.close(window.parent.CoursePackage.layerIndex); |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 提交添加用户 |
| | | */ |
| | | CoursePackageInfo.addSubmit = function () { |
| | | let province = $('#provinceCode option:checked').text(); |
| | | let provinceCode = $('#provinceCode').val(); |
| | | let city = $('#cityCode option:checked').text(); |
| | | let cityCode = $('#cityCode').val(); |
| | | let storeId = $('#storeId').val(); |
| | | let coursePackageTypeId = $('#coursePackageTypeId').val(); |
| | | let name = $('#name').val(); |
| | | let siteId = $('#siteId').val(); |
| | | let coachId = $('#coachId').val(); |
| | | let maxSubscribeNumber = $('#maxSubscribeNumber').val(); |
| | | let classStartTime = $('#classStartTime').val(); |
| | | let classWeeks = ''; |
| | | $('input[name="classWeeks"]:checked').each(function (index, e) { |
| | | classWeeks += $(e).val() + ";"; |
| | | }) |
| | | let coverDrawing = $('#coverDrawing').val(); |
| | | let detailDrawing = $('#detailDrawing').val(); |
| | | let introduceDrawing = $('#introduceDrawing').val(); |
| | | let sort = $('#sort').val(); |
| | | let validDays = $('#validDays').val(); |
| | | let price = []; |
| | | $('#price>.form-group').each(function (i, e) { |
| | | let classHours = $($(e).find(".classNumber_span input[class='classNumber']")[0]).val(); |
| | | let cash = $($(e).find(".cash_span input[class='cash']")[0]).val(); |
| | | let paiCoin = $($(e).find(".paiCoin_span input[class='paiCoin']")[0]).val(); |
| | | price.push({ |
| | | classHours: classHours, |
| | | cashPayment: typeof cash == "undefined" ? 0 : cash, |
| | | playPaiCoin: typeof paiCoin == "undefined" ? 0 : paiCoin |
| | | }) |
| | | }); |
| | | if(null == provinceCode || '' == provinceCode){ |
| | | Feng.error("所在省不能为空"); |
| | | return |
| | | } |
| | | if(null == cityCode || '' == cityCode){ |
| | | Feng.error("所在市不能为空"); |
| | | return |
| | | } |
| | | if(null == storeId || '' == storeId){ |
| | | Feng.error("所属门店不能为空"); |
| | | return |
| | | } |
| | | if(null == coursePackageTypeId || '' == coursePackageTypeId){ |
| | | Feng.error("课程类型不能为空"); |
| | | return |
| | | } |
| | | if(null == name || '' == name){ |
| | | Feng.error("课包名称不能为空"); |
| | | return |
| | | } |
| | | if(null == siteId || '' == siteId){ |
| | | Feng.error("上课场地不能为空"); |
| | | return |
| | | } |
| | | if(null == coachId || '' == coachId){ |
| | | Feng.error("授课教师不能为空"); |
| | | return |
| | | } |
| | | if(null == maxSubscribeNumber || '' == maxSubscribeNumber){ |
| | | Feng.error("最多预约人数不能为空"); |
| | | return |
| | | } |
| | | if(null == classStartTime || '' == classStartTime){ |
| | | Feng.error("上课时间不能为空"); |
| | | return |
| | | } |
| | | if(null == classWeeks || '' == classWeeks){ |
| | | Feng.error("上课时间不能为空"); |
| | | return |
| | | } |
| | | classWeeks = classWeeks.substring(0, classWeeks.length - 1); |
| | | |
| | | if(null == coverDrawing || '' == coverDrawing){ |
| | | Feng.error("课包封面不能为空"); |
| | | return |
| | | } |
| | | if(null == detailDrawing || '' == detailDrawing){ |
| | | Feng.error("详情页不能为空"); |
| | | return |
| | | } |
| | | if(null == introduceDrawing || '' == introduceDrawing){ |
| | | Feng.error("课包介绍不能为空"); |
| | | return |
| | | } |
| | | if(null == validDays || '' == validDays){ |
| | | Feng.error("课时有效期不能为空"); |
| | | return |
| | | } |
| | | |
| | | let obj = { |
| | | province: province, |
| | | provinceCode: provinceCode, |
| | | city: city, |
| | | cityCode: cityCode, |
| | | storeId: storeId, |
| | | coursePackageTypeId: coursePackageTypeId, |
| | | name: name, |
| | | siteId: siteId, |
| | | coachId: coachId, |
| | | maxSubscribeNumber: maxSubscribeNumber, |
| | | classStartTime: classStartTime.split(" - ")[0], |
| | | classEndTime: classStartTime.split(" - ")[1], |
| | | classWeeks: classWeeks, |
| | | coverDrawing: coverDrawing, |
| | | detailDrawing: detailDrawing, |
| | | introduceDrawing: introduceDrawing, |
| | | sort: sort, |
| | | validDays: validDays, |
| | | coursePackagePaymentConfig: JSON.stringify(price) |
| | | } |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/coursePackage/addCoursePackage", function (data) { |
| | | if(data.code == 200){ |
| | | Feng.success("添加成功!"); |
| | | CoursePackageInfo.close(); |
| | | window.parent.CoursePackage.table.refresh(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(obj); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | CoursePackageInfo.editSubmit = function () { |
| | | let id = $('#id').val(); |
| | | let province = $('#provinceCode option:checked').text(); |
| | | let provinceCode = $('#provinceCode').val(); |
| | | let city = $('#cityCode option:checked').text(); |
| | | let cityCode = $('#cityCode').val(); |
| | | let storeId = $('#storeId').val(); |
| | | let coursePackageTypeId = $('#coursePackageTypeId').val(); |
| | | let name = $('#name').val(); |
| | | let siteId = $('#siteId').val(); |
| | | let coachId = $('#coachId').val(); |
| | | let maxSubscribeNumber = $('#maxSubscribeNumber').val(); |
| | | let classStartTime = $('#classStartTime').val(); |
| | | let classWeeks = ''; |
| | | $('input[name="classWeeks"]:checked').each(function (index, e) { |
| | | classWeeks += $(e).val() + ";"; |
| | | }) |
| | | let coverDrawing = $('#coverDrawing').val(); |
| | | let detailDrawing = $('#detailDrawing').val(); |
| | | let introduceDrawing = $('#introduceDrawing').val(); |
| | | let sort = $('#sort').val(); |
| | | let validDays = $('#validDays').val(); |
| | | let price = []; |
| | | $('#price>.form-group').each(function (i, e) { |
| | | let classHours = $($(e).find(".classNumber_span input[class='classNumber']")[0]).val(); |
| | | let cash = $($(e).find(".cash_span input[class='cash']")[0]).val(); |
| | | let paiCoin = $($(e).find(".paiCoin_span input[class='paiCoin']")[0]).val(); |
| | | price.push({ |
| | | classHours: classHours, |
| | | cashPayment: typeof cash == "undefined" ? 0 : cash, |
| | | playPaiCoin: typeof paiCoin == "undefined" ? 0 : paiCoin |
| | | }) |
| | | }); |
| | | if(null == provinceCode || '' == provinceCode){ |
| | | Feng.error("所在省不能为空"); |
| | | return |
| | | } |
| | | if(null == cityCode || '' == cityCode){ |
| | | Feng.error("所在市不能为空"); |
| | | return |
| | | } |
| | | if(null == storeId || '' == storeId){ |
| | | Feng.error("所属门店不能为空"); |
| | | return |
| | | } |
| | | if(null == coursePackageTypeId || '' == coursePackageTypeId){ |
| | | Feng.error("课程类型不能为空"); |
| | | return |
| | | } |
| | | if(null == name || '' == name){ |
| | | Feng.error("课包名称不能为空"); |
| | | return |
| | | } |
| | | if(null == siteId || '' == siteId){ |
| | | Feng.error("上课场地不能为空"); |
| | | return |
| | | } |
| | | if(null == coachId || '' == coachId){ |
| | | Feng.error("授课教师不能为空"); |
| | | return |
| | | } |
| | | if(null == maxSubscribeNumber || '' == maxSubscribeNumber){ |
| | | Feng.error("最多预约人数不能为空"); |
| | | return |
| | | } |
| | | if(null == classStartTime || '' == classStartTime){ |
| | | Feng.error("上课时间不能为空"); |
| | | return |
| | | } |
| | | if(null == classWeeks || '' == classWeeks){ |
| | | Feng.error("上课时间不能为空"); |
| | | return |
| | | } |
| | | classWeeks = classWeeks.substring(0, classWeeks.length - 1); |
| | | |
| | | if(null == coverDrawing || '' == coverDrawing){ |
| | | Feng.error("课包封面不能为空"); |
| | | return |
| | | } |
| | | if(null == detailDrawing || '' == detailDrawing){ |
| | | Feng.error("详情页不能为空"); |
| | | return |
| | | } |
| | | if(null == introduceDrawing || '' == introduceDrawing){ |
| | | Feng.error("课包介绍不能为空"); |
| | | return |
| | | } |
| | | if(null == validDays || '' == validDays){ |
| | | Feng.error("课时有效期不能为空"); |
| | | return |
| | | } |
| | | |
| | | let obj = { |
| | | id: id, |
| | | province: province, |
| | | provinceCode: provinceCode, |
| | | city: city, |
| | | cityCode: cityCode, |
| | | storeId: storeId, |
| | | coursePackageTypeId: coursePackageTypeId, |
| | | name: name, |
| | | siteId: siteId, |
| | | coachId: coachId, |
| | | maxSubscribeNumber: maxSubscribeNumber, |
| | | classStartTime: classStartTime.split(" - ")[0], |
| | | classEndTime: classStartTime.split(" - ")[1], |
| | | classWeeks: classWeeks, |
| | | coverDrawing: coverDrawing, |
| | | detailDrawing: detailDrawing, |
| | | introduceDrawing: introduceDrawing, |
| | | sort: sort, |
| | | validDays: validDays, |
| | | coursePackagePaymentConfig: JSON.stringify(price) |
| | | } |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/coursePackage/updateCoursePackage", function (data) { |
| | | if(data.code == 200){ |
| | | Feng.success("编辑成功!"); |
| | | CoursePackageInfo.close(); |
| | | window.parent.CoursePackage.table.refresh(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("编辑失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(obj); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | function queryStore() { |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/queryStore", function (data) { |
| | | let htmlStr = ''; |
| | | for (let i = 0; i < data.length; i++) { |
| | | htmlStr += '<option value="' + data[i].id + '">' + data[i].name + '</option>' |
| | | } |
| | | $('#storeId').html(htmlStr); |
| | | |
| | | querySite(); |
| | | }, function (data) { |
| | | Feng.error("获取失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("cityCode", $('#cityCode').val()); |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | | |
| | | function querySite(){ |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/querySite", function (data) { |
| | | let htmlStr = ''; |
| | | for (let i = 0; i < data.length; i++) { |
| | | htmlStr += '<option value="' + data[i].id + '">' + data[i].name + '</option>' |
| | | } |
| | | $('#siteId').html(htmlStr); |
| | | }, function (data) { |
| | | Feng.error("获取失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("storeId", $('#storeId').val()); |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | | function queryCoach(){ |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/queryCoach", function (data) { |
| | | let htmlStr = ''; |
| | | for (let i = 0; i < data.length; i++) { |
| | | htmlStr += '<option value="' + data[i].id + '">' + data[i].name + '</option>' |
| | | } |
| | | $('#coachId').html(htmlStr); |
| | | }, function (data) { |
| | | Feng.error("获取失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("cityCode", $('#cityCode').val()); |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | | function addPrice(){ |
| | | let cash = false; |
| | | let paiCoin = false; |
| | | $('input[name="payType"]:checked').each(function (index, e) { |
| | | let v = $(e).val(); |
| | | if(v == 1){ |
| | | cash = true; |
| | | } |
| | | if(v == 2){ |
| | | paiCoin = true; |
| | | } |
| | | }) |
| | | |
| | | let htmlStr = '' + |
| | | '<div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">*课时数:</label>\n' + |
| | | ' <div class="col-sm-8">\n' + |
| | | ' <span class="classNumber_span"><input class="classNumber" type="number" min="0" placeholder="请输入" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> </span> <span class="cash_span">\n'; |
| | | if(cash){ |
| | | htmlStr += '现金支付:<input class="cash" type="number" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> ¥ \n'; |
| | | } |
| | | htmlStr += '</span> <span class="paiCoin_span">'; |
| | | if(paiCoin){ |
| | | htmlStr += '玩湃币支付:<input class="paiCoin" type="number" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> 币 \n'; |
| | | } |
| | | htmlStr += '</span> <i class="fa fa-trash-o" style="font-size:24px" onclick="removePrice(this)"></i>\n' + |
| | | '</div>\n' + |
| | | '</div>'; |
| | | $('#price').append(htmlStr); |
| | | } |
| | | |
| | | |
| | | function removePrice(e){ |
| | | $(e).parent('div').parent('div').remove(); |
| | | } |
| | | |
| | | |
| | | $(function () { |
| | | $('#provinceCode').change(function () { |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/queryCity", function (data) { |
| | | let htmlStr = ''; |
| | | for (let i = 0; i < data.length; i++) { |
| | | htmlStr += '<option value="' + data[i].code + '">' + data[i].name + '</option>' |
| | | } |
| | | $('#cityCode').html(htmlStr); |
| | | |
| | | queryStore(); |
| | | queryCoach(); |
| | | }, function (data) { |
| | | Feng.error("获取失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("code", $(this).val()); |
| | | ajax.start(); |
| | | }) |
| | | |
| | | |
| | | $('#cityCode').change(function () { |
| | | queryStore(); |
| | | }) |
| | | |
| | | |
| | | $('#storeId').change(function () { |
| | | querySite(); |
| | | }) |
| | | |
| | | $('input[name="payType"]').click(function () { |
| | | $('input[name="payType"]').each(function (index, e) { |
| | | let v = $(e).val(); |
| | | if(v == 1) { |
| | | if (e.checked) { |
| | | $('span[class="cash_span"]').each(function (index, e) { |
| | | $(e).html('现金支付:<input class="cash" type="number" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> ¥ '); |
| | | }) |
| | | } else { |
| | | $('span[class="cash_span"]').each(function (index, e) { |
| | | $(e).html(''); |
| | | }) |
| | | } |
| | | } |
| | | |
| | | if(v == 2){ |
| | | if (e.checked) { |
| | | $('span[class="paiCoin_span"]').each(function (index, e) { |
| | | $(e).html('玩湃币支付:<input class="paiCoin" type="number" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> 币 ') |
| | | }) |
| | | } else { |
| | | $('span[class="paiCoin_span"]').each(function (index, e) { |
| | | $(e).html(''); |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | |
| | | }); |
New file |
| | |
| | | /** |
| | | * 系统管理--用户管理的单例对象 |
| | | */ |
| | | let ExamineCoursePackage = { |
| | | id: "managerTable",//表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | ExamineCoursePackage.initColumn = function () { |
| | | let columns = [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '所在省市', field: 'city', align: 'center', valign: 'middle'}, |
| | | {title: '所属门店', field: 'store', align: 'center', valign: 'middle'}, |
| | | {title: '课包类型', field: 'coursePackageType', align: 'center', valign: 'middle'}, |
| | | {title: '课包名称', field: 'name', align: 'center', valign: 'middle'}, |
| | | {title: '最多预约人数', field: 'maxSubscribeNumber', align: 'center', valign: 'middle'}, |
| | | {title: '课程有效期', field: 'validDays', align: 'center', valign: 'middle'}, |
| | | {title: '支付方式', field: 'payType', align: 'center', valign: 'middle'}, |
| | | {title: '排序', field: 'sort', align: 'center', valign: 'middle'}, |
| | | {title: '审核状态', field: 'auditStatus', align: 'center', valign: 'middle', |
| | | formatter: function (v) { |
| | | switch (v) { |
| | | case 1: |
| | | return '待审核'; |
| | | case 3: |
| | | return '未通过'; |
| | | } |
| | | } |
| | | } |
| | | ]; |
| | | return columns; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | ExamineCoursePackage.check = function () { |
| | | let selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if (selected.length == 0) { |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | } else { |
| | | ExamineCoursePackage.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 点击修改按钮时 |
| | | * @param userId 管理员id |
| | | */ |
| | | ExamineCoursePackage.examineCoursePackage = function () { |
| | | if (this.check()) { |
| | | if(ExamineCoursePackage.seItem.auditStatus != 1){ |
| | | Feng.error("不能重复审核"); |
| | | return |
| | | } |
| | | let htmlStr = |
| | | '<div class="form-horizontal">' + |
| | | ' <div class="col-sm-11" style="padding: 10px;">' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">*审核状态:</label>\n' + |
| | | ' <div class="col-sm-8">\n' + |
| | | ' <input name="auditStatus" type="radio" value="2"/> 通过 ' + |
| | | ' <input name="auditStatus" type="radio" value="3"/> 拒绝 ' + |
| | | ' </div>' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">*拒绝理由:</label>\n' + |
| | | ' <div class="col-sm-8">\n' + |
| | | ' <textarea id="authRemark" style="width: 100%;height: 200px;" placeholder="请输入拒绝理由"></textarea>' + |
| | | ' </div>' + |
| | | ' </div>' + |
| | | ' </div>' + |
| | | '</div>'; |
| | | layer.open({ |
| | | type: 1 |
| | | , title: '课包审核' |
| | | , area: ['800px', '400px'] |
| | | , offset: 'auto' //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset |
| | | , id: 'layerDemo' //防止重复弹出cge |
| | | , content: htmlStr |
| | | , btn: ['保存', '关闭'] |
| | | , btnAlign: 'c' //按钮居中 |
| | | , shade: 0.5 //不显示遮罩 |
| | | , yes: function () { |
| | | let auditStatus = $('input[name="auditStatus"]:checked').val(); |
| | | if(typeof auditStatus == "undefined"){ |
| | | Feng.error("请选择审核结果"); |
| | | return |
| | | } |
| | | let authRemark = $('#authRemark').text(); |
| | | if(3 == auditStatus && '' == authRemark){ |
| | | Feng.error("请输入拒绝理由"); |
| | | return |
| | | } |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/setCoursePackageAuditStatus", function (res) { |
| | | if(res.code == 200){ |
| | | Feng.success("审核成功!"); |
| | | layer.closeAll(); |
| | | ExamineCoursePackage.table.refresh(); |
| | | }else{ |
| | | Feng.error(res.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("审核失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id", ExamineCoursePackage.seItem.id); |
| | | ajax.set("auditStatus", auditStatus); |
| | | ajax.set("authRemark", authRemark); |
| | | ajax.start(); |
| | | }, |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | |
| | | ExamineCoursePackage.detailsExamineCoursePackage = function () { |
| | | if (this.check()) { |
| | | let index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/coursePackage/showExamineCoursePackageDetails?id=' + this.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | ExamineCoursePackage.resetSearch = function () { |
| | | $("#provinceCode").val(""); |
| | | $("#cityCode").val(""); |
| | | $("#coursePackageTypeId").val(""); |
| | | $("#name").val(""); |
| | | $("#auditStatus").val(""); |
| | | ExamineCoursePackage.search(); |
| | | } |
| | | |
| | | ExamineCoursePackage.search = function () { |
| | | let queryData = {}; |
| | | queryData['provinceCode'] = $("#provinceCode").val(); |
| | | queryData['cityCode'] = $("#cityCode").val(); |
| | | queryData['coursePackageTypeId'] = $("#coursePackageTypeId").val(); |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['auditStatus'] = $("#auditStatus").val(); |
| | | ExamineCoursePackage.table.refresh({query: queryData}); |
| | | } |
| | | |
| | | |
| | | $(function () { |
| | | let defaultColunms = ExamineCoursePackage.initColumn(); |
| | | let table = new BSTable(ExamineCoursePackage.id, "/coursePackage/queryExamineCoursePackageLists", defaultColunms); |
| | | // 设置物理分页server(逻辑分页client) |
| | | table.setPaginationType("server"); |
| | | ExamineCoursePackage.table = table.init(); |
| | | |
| | | |
| | | $('#provinceCode').change(function () { |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/queryCity", function (data) { |
| | | let htmlStr = ''; |
| | | for (let i = 0; i < data.length; i++) { |
| | | htmlStr += '<option value="' + data[i].code + '">' + data[i].name + '</option>' |
| | | } |
| | | $('#cityCode').html(htmlStr); |
| | | }, function (data) { |
| | | Feng.error("获取失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("code", $(this).val()); |
| | | ajax.start(); |
| | | }) |
| | | }); |
New file |
| | |
| | | /** |
| | | * 用户详情对话框(可用于添加和修改对话框) |
| | | */ |
| | | var ExamineCoursePackageInfo = { |
| | | userInfoData: {}, |
| | | }; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | ExamineCoursePackageInfo.close = function () { |
| | | parent.layer.close(window.parent.ExamineCoursePackage.layerIndex); |
| | | }; |
| | | |
| | | |
| | | ExamineCoursePackageInfo.addSubmit = function () { |
| | | let auditStatus = $('input[name="auditStatus"]:checked').val();; |
| | | if(typeof auditStatus == "undefined"){ |
| | | Feng.error("请选择审核结果"); |
| | | return |
| | | } |
| | | let authRemark = $('#authRemark').text(); |
| | | if(3 == auditStatus && '' == authRemark){ |
| | | Feng.error("请输入拒绝理由"); |
| | | return |
| | | } |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/setCoursePackageAuditStatus", function (res) { |
| | | if(res.code == 200){ |
| | | Feng.success("审核成功!"); |
| | | ExamineCoursePackageInfo.close(); |
| | | }else{ |
| | | Feng.error(res.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("审核失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id", $('#id').val()); |
| | | ajax.set("auditStatus", auditStatus); |
| | | ajax.set("authRemark", authRemark); |
| | | ajax.start(); |
| | | }; |
New file |
| | |
| | | /** |
| | | * 系统管理--用户管理的单例对象 |
| | | */ |
| | | let ManualReservation = { |
| | | id: "managerTable",//表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | ManualReservation.initColumn = function () { |
| | | let columns = [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '所属用户', field: 'userName', align: 'center', valign: 'middle'}, |
| | | {title: '姓名', field: 'studentName', align: 'center', valign: 'middle'}, |
| | | {title: '联系电话', field: 'phone', align: 'center', valign: 'middle'}, |
| | | {title: '年龄', field: 'age', align: 'center', valign: 'middle'}, |
| | | {title: '性别', field: 'sex', align: 'center', valign: 'middle', |
| | | formatter: function (v) { |
| | | if(v == 1){ |
| | | return '男'; |
| | | }else{ |
| | | return '女'; |
| | | } |
| | | } |
| | | } |
| | | ]; |
| | | return columns; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | ManualReservation.check = function () { |
| | | let selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if (selected.length == 0) { |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | } else { |
| | | ManualReservation.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | ManualReservation.submit = function () { |
| | | if (this.check()) { |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/courseReservation", function (res) { |
| | | if(res.code == 200){ |
| | | Feng.success("预约成功!"); |
| | | ManualReservation.table.refresh(); |
| | | }else{ |
| | | Feng.error(res.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("预约失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("coursePackageSchedulingId", $('#id').val()); |
| | | ajax.set("coursePackagePaymentId", ManualReservation.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ManualReservation.resetSearch = function () { |
| | | $('#userName').val(''); |
| | | $('#studentName').val(''); |
| | | ManualReservation.search(); |
| | | } |
| | | |
| | | ManualReservation.search = function () { |
| | | let queryData = {}; |
| | | queryData['coursePackageSchedulingId'] = $('#id').val(); |
| | | queryData['userName'] = $('#userName').val(); |
| | | queryData['studentName'] = $('#studentName').val(); |
| | | ManualReservation.table.refresh({query: queryData}); |
| | | } |
| | | |
| | | |
| | | $(function () { |
| | | let defaultColunms = ManualReservation.initColumn(); |
| | | let table = new BSTable(ManualReservation.id, "/coursePackage/queryWalkInStudentList", defaultColunms); |
| | | // 设置物理分页server(逻辑分页client) |
| | | table.setPaginationType("server"); |
| | | table.setQueryParams({ |
| | | coursePackageSchedulingId: $('#id').val() |
| | | }) |
| | | ManualReservation.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 系统管理--用户管理的单例对象 |
| | | */ |
| | | let RegistrationRecord = { |
| | | id: "managerTable",//表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | let language =$("#language").val() |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | RegistrationRecord.initColumn = function () { |
| | | let columns = [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: 'id', field: 'id', visible: false, 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: 'already', align: 'center', valign: 'middle'}, |
| | | {title: '缺课次数', field: 'absencesNumber', align: 'center', valign: 'middle'}, |
| | | {title: '状态', field: 'status', align: 'center', valign: 'middle', |
| | | formatter: function (v) { |
| | | switch (v) { |
| | | case 1: |
| | | return '正常'; |
| | | case 2: |
| | | return '<a href="#" onclick="">已退课-查看凭证</a>'; |
| | | } |
| | | } |
| | | } |
| | | ]; |
| | | return columns; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | RegistrationRecord.check = function () { |
| | | let selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if (selected.length == 0) { |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | } else { |
| | | RegistrationRecord.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 上课记录 |
| | | */ |
| | | RegistrationRecord.classRecord = function () { |
| | | let index = layer.open({ |
| | | type: 2, |
| | | title: '上课记录', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/coursePackage/openClassRecord?id=' + $('#id').val() |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 点击修改按钮时 |
| | | * @param userId 管理员id |
| | | */ |
| | | RegistrationRecord.dropClass = function () { |
| | | if (this.check()) { |
| | | if(ClassRecord.seItem.status == 2){ |
| | | Feng.error("不能重复退课"); |
| | | return |
| | | } |
| | | let htmlStr = |
| | | '<div class="form-horizontal">' + |
| | | ' <div class="col-sm-11">' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-8 control-label">课程名称:' + $("#name").text() + '</label>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-8 control-label">用户姓名:' + ClassRecord.seItem.userName + '</label>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-8 control-label">学员姓名:' + ClassRecord.seItem.studentName + '</label>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-8 control-label">*上传凭证:</label>\n' + |
| | | ' </div>' + |
| | | ' <div class="form-group">\n' + |
| | | ' <div class="col-sm-8">\n' + |
| | | ' <img id="certificate" src="" style="height: 100px;">' + |
| | | ' <input type="file" id="file" style="display: none;"/>' + |
| | | ' <button onclick="uploadImgs()" style="width: 20px;padding: 10px; color: white;background-color: #0d8ddb;border-radius: 5px;"> 上传 </button>' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' </div>' + |
| | | '</div>'; |
| | | layer.open({ |
| | | type: 1 |
| | | , title: '退课' |
| | | , area: ['50%', '50%'] |
| | | , offset: 'auto' //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset |
| | | , id: 'layerDemo' //防止重复弹出cge |
| | | , content: htmlStr |
| | | , btn: ['保存', '关闭'] |
| | | , btnAlign: 'c' //按钮居中 |
| | | , shade: 0.5 //不显示遮罩 |
| | | , yes: function () { |
| | | let certificate = $('#certificate').attr('img'); |
| | | if(null == certificate || '' == certificate){ |
| | | Feng.error("请上传凭证图片"); |
| | | return |
| | | } |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/dropTheClass", function (res) { |
| | | if(res.code == 200){ |
| | | Feng.success("退课成功!"); |
| | | layer.closeAll(); |
| | | RegistrationRecord.table.refresh(); |
| | | }else{ |
| | | Feng.error(res.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("退课失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("coursePackagePaymentId", ClassRecord.seItem.id); |
| | | ajax.set("certificate", certificate); |
| | | ajax.start(); |
| | | }, |
| | | }); |
| | | |
| | | $('#file').on('change', function () { |
| | | var formData = new FormData() //创建一个forData |
| | | formData.append('file', $('#file')[0].files[0]) //把file添加进去 name命名为img |
| | | layer.load(); //上传loading |
| | | $.ajax({ |
| | | url: Feng.ctxPath + '/mgr/uploadImg', |
| | | data: formData, |
| | | type: "POST", |
| | | async: true, |
| | | cache: false, |
| | | contentType: false, |
| | | processData: false, |
| | | success: function(res) { |
| | | layer.closeAll('loading'); //关闭loading |
| | | $('#file').val(''); |
| | | $('#certificate').attr('src', res); |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | function uploadImgs(){ |
| | | $('#file').click(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除用户 |
| | | */ |
| | | RegistrationRecord.makeUpMissedLessons = function () { |
| | | if (this.check()) { |
| | | let operation = function(){ |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/makeUpMissedLessons", function () { |
| | | Feng.success("补课成功!"); |
| | | RegistrationRecord.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("补课失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id", RegistrationRecord.seItem.id); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | Feng.confirm("是否补课",operation); |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | RegistrationRecord.resetSearch = function () { |
| | | $("#userName").val(""); |
| | | $("#studentName").val(""); |
| | | RegistrationRecord.search(); |
| | | } |
| | | |
| | | RegistrationRecord.search = function () { |
| | | let queryData = {}; |
| | | queryData['userName'] = $("#userName").val(); |
| | | queryData['studentName'] = $("#studentName").val(); |
| | | queryData['id'] = $('#id').val(); |
| | | RegistrationRecord.table.refresh({query: queryData}); |
| | | } |
| | | |
| | | |
| | | $(function () { |
| | | let defaultColunms = RegistrationRecord.initColumn(); |
| | | let table = new BSTable(RegistrationRecord.id, "/coursePackage/queryRegistrationRecord", defaultColunms); |
| | | // 设置物理分页server(逻辑分页client) |
| | | table.setPaginationType("server"); |
| | | table.setQueryParams({ |
| | | id: $('#id').val() |
| | | }) |
| | | RegistrationRecord.table = table.init(); |
| | | }); |
| | |
| | | */ |
| | | TCoupon.openChange = function () { |
| | | if (this.check()){ |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '编辑', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCouponManage/tCouponManage_add' |
| | | let id = TCoupon.seItem.id |
| | | let name = TCoupon.seItem.name |
| | | let quantityIssued = TCoupon.seItem.quantityIssued |
| | | let pickUpQuantity = TCoupon.seItem.pickUpQuantity |
| | | let illustrate = TCoupon.seItem.illustrate |
| | | let hasPickQty = TCoupon.seItem.hasPickQty |
| | | var index = layer.load(1,{ |
| | | type: 1 |
| | | , title: '编辑优惠券' |
| | | , area: ['50%', '50%'] |
| | | , offset: 'auto' //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset |
| | | , id: 'layerDemo' //防止重复弹出cge |
| | | , content: '<div class="form-horizontal">' + |
| | | ' <div class="col-sm-11" >' + |
| | | ' <div class="col-sm-11">' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">优惠券名称:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <label class="form-control" id="name" >'+name+'</label> '+ |
| | | ' </div>\n' + |
| | | ' </div>\n'+ |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">发放数量:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <input class="form-control" id="num" value="'+quantityIssued+'" > '+ |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">限领数量:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <input class="form-control" id="num1" value="'+pickUpQuantity+'" > '+ |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">优惠券说明:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <textarea class="form-control" id="text" >'+illustrate+'</textarea> '+ |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' </div>' + |
| | | '</div>' |
| | | , btn: ['关闭', '保存'] |
| | | , btnAlign: 'c' //按钮居中 |
| | | , shade: 0.5 //不显示遮罩 |
| | | ,load:1 |
| | | , yes: function () { |
| | | layer.closeAll(); |
| | | }, |
| | | btn2:function () { |
| | | let num = $("#num").val() |
| | | if(num==''){ |
| | | Feng.info("请输入发放数量") |
| | | return false; |
| | | } |
| | | let num1 = $("#num1").val() |
| | | if(num1==''){ |
| | | Feng.info("请输入限领数量") |
| | | return false; |
| | | } |
| | | let text = $("#text").val() |
| | | if(text==''){ |
| | | Feng.info("请输入优惠券说明") |
| | | return false; |
| | | } |
| | | |
| | | if(num<hasPickQty){ |
| | | Feng.info("发放数量不能小于已领取数量") |
| | | return false; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/tCouponManage/update", function (data) { |
| | | if (data.code == 200) { |
| | | Feng.success("操作成功!"); |
| | | window.location.reload(); |
| | | window.parent.layer.closeAll(); |
| | | } else if(data=="repeat"){ |
| | | window.location.reload(); |
| | | window.parent.layer.closeAll(); |
| | | Feng.error("请勿重复操作"); |
| | | }else { |
| | | return Feng.error(data.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("操作失败!") |
| | | window.location.reload(); |
| | | window.parent.layer.closeAll(); |
| | | return Feng.error("操作失败!"); |
| | | }); |
| | | ajax.set("id", id); |
| | | ajax.set("num", num); |
| | | ajax.set("num1", num1); |
| | | ajax.set("text", text); |
| | | ajax.start(); |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | |
| | | /** |
| | | * 上架 |
| | | */ |
| | | TCoupon.onShelf = function () { |
| | | |
| | | |
| | | }; |
| | | |
| | | |
| | | /** |
| | |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCouponManage/coupon_detail/' + TCoupon.seItem.id |
| | |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | TCoupon.onShelf = function (e) { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tCouponManage/onShelf", function(data){ |
| | | if(data.code==200){ |
| | | Feng.success("操作成功!") |
| | | TCoupon.table.refresh(); |
| | | } |
| | | },function(data){ |
| | | Feng.error("操作失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",TCoupon.seItem.id) |
| | | ajax.set("type",e) |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | |
| | | function scopeOfApplication1() { |
| | | $("#storeSelect").hide(); |
| | | $("#citySelect").hide(); |
| | | |
| | | //移除指定门店的数据: |
| | | // 找到 tbody 元素 |
| | | var tbody = document.getElementById("coun"); |
| | | |
| | | // 移除所有子元素(即行) |
| | | while (tbody.firstChild) { |
| | | tbody.removeChild(tbody.firstChild); |
| | | } |
| | | couponInfoDlg.storeIds = []; |
| | | |
| | | //移除指城市的数据: |
| | | num = 0; |
| | | var cityDemoDiv = document.getElementById("cityDemo"); |
| | | |
| | | cityDemoDiv.innerHTML = ""; // 将内容置为空字符串 |
| | | var provinceSelect = document.getElementById("provinceData"); |
| | | var cityDataSelect = document.getElementById("cityData"); |
| | | provinceSelect.innerHTML = '<option value="">请选择</option>'; |
| | | cityDataSelect.innerHTML = '<option value="">请选择</option>'; |
| | | getProvince(null); |
| | | } |
| | | /** |
| | | * 指定城市 |
| | |
| | | function scopeOfApplication2() { |
| | | $("#storeSelect").hide(); |
| | | $("#citySelect").show(); |
| | | |
| | | //移除指定门店的数据: |
| | | // 找到 tbody 元素 |
| | | var tbody = document.getElementById("coun"); |
| | | // 移除所有子元素(即行) |
| | | while (tbody.firstChild) { |
| | | tbody.removeChild(tbody.firstChild); |
| | | } |
| | | couponInfoDlg.storeIds = []; |
| | | |
| | | |
| | | |
| | | } |
| | | /** |
| | | * 指定门店 |
| | |
| | | function scopeOfApplication3() { |
| | | $("#storeSelect").show(); |
| | | $("#citySelect").hide(); |
| | | |
| | | //移除指城市的数据: |
| | | num = 0; |
| | | var cityDemoDiv = document.getElementById("cityDemo"); |
| | | |
| | | cityDemoDiv.innerHTML = ""; // 将内容置为空字符串 |
| | | var provinceSelect = document.getElementById("provinceData"); |
| | | var cityDataSelect = document.getElementById("cityData"); |
| | | provinceSelect.innerHTML = '<option value="">请选择</option>'; |
| | | cityDataSelect.innerHTML = '<option value="">请选择</option>'; |
| | | getProvince(null); |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | |
| | | var num = 0; |
| | | let num = 0; |
| | | couponInfoDlg.addBranch = function () { |
| | | num=num+1; |
| | | var a= ""; |
| | |
| | | '<td><input type="hidden" id="id" name="id" value="'+arrays[i].id+'"><input type="hidden" id="provinceCity" name="provinceCity" value="'+arrays[i].provinceCity+'">' + arrays[i].provinceCity + '</td>' + |
| | | '<td><input type="hidden" id="accountName" name="accountName" value="'+arrays[i].accountName+'">' + arrays[i].accountName + '</td>' + |
| | | '<td><input type="hidden" id="name" name="name" value="'+arrays[i].name+'">' + arrays[i].name + '</td><td><button onclick="deleteSub(this)">移除</button></td></tr>'; |
| | | this.storeIds.push(arrays[i].id); |
| | | } |
| | | } |
| | | $("#coun").append(str); |
| | | console.log('storeIds',this.storeIds) |
| | | } |
| | | |
| | | function deleteSub(e) { |
| | | console.log(e); |
| | | var row = $(e).closest('tr'); |
| | | var idValue = row.find('#id').val(); |
| | | var index = this.storeIds.indexOf(idValue.toString()); |
| | | if (index !== -1) { |
| | | this.storeIds.splice(index, 1); |
| | | } |
| | | var value = row.find('#id').val(); |
| | | couponInfoDlg.storeIds.splice(couponInfoDlg.storeIds.indexOf(parseInt(value)), 1) |
| | | $(e).parent().parent().remove(); |
| | | console.log('storeIds',this.storeIds) |
| | | } |
| | | |
| | | |
| | |
| | | var cityIds = []; |
| | | // 优惠券名称 |
| | | var couponName = $('#name').val(); |
| | | if (couponName === undefined || couponName === '' || couponName === null){ |
| | | return Feng.error('优惠券名称不能为空'); |
| | | } |
| | | // 优惠券类型 |
| | | var prescription = $('#prescription').val(); |
| | | let prescription = $(":radio[name='prescription']:checked").val(); |
| | | // 满xx金额 |
| | | let conditionalAmount = $('#conditionalAmount').val(); |
| | | // 减xx金额 |
| | | let deductionAmount = $('#deductionAmount').val(); |
| | | // 可抵扣xx金额 |
| | | let voucherAmount = $('#voucherAmount').val(); |
| | | // 体验券名称 |
| | | let experienceName = $('#experienceName').val(); |
| | | if (prescription === '1'){ |
| | | if (conditionalAmount === undefined || conditionalAmount === '' || conditionalAmount === null){ |
| | | return Feng.error('条件金额不能为空'); |
| | | } |
| | | if (deductionAmount === undefined || deductionAmount === '' || deductionAmount === null){ |
| | | return Feng.error('减扣金额不能为空'); |
| | | } |
| | | } |
| | | if (prescription === '2'){ |
| | | if (voucherAmount === undefined || voucherAmount === '' || voucherAmount === null){ |
| | | return Feng.error('抵扣金额不能为空'); |
| | | } |
| | | } |
| | | if (prescription === '3'){ |
| | | if (experienceName === undefined || experienceName === '' || experienceName === null){ |
| | | return Feng.error('体验券名称不能为空'); |
| | | } |
| | | } |
| | | |
| | | |
| | | // 说明 |
| | | var illustrate = $('#illustrate').val(); |
| | | if (illustrate === undefined || illustrate === '' || illustrate === null){ |
| | | return Feng.error('优惠券说明不能为空'); |
| | | } |
| | | // 发放方式 |
| | | var distributionMethod = $('#distributionMethod').val(); |
| | | let distributionMethod = $(":radio[name='distributionMethod']:checked").val(); |
| | | if (distributionMethod === undefined || distributionMethod === '' || distributionMethod === null){ |
| | | return Feng.error('发放方式不能为空'); |
| | | } |
| | | // 所需积分 |
| | | var requiredPoints = $('#requiredPoints').val(); |
| | | // 所需现金 |
| | | var requiredCash = $('#requiredCash').val(); |
| | | // 用户人群 |
| | | let userGroup = $(':radio[name="userGroup"]:checked').val(); |
| | | |
| | | // 发放数量 |
| | | var quantityIssued = $('#quantityIssued').val(); |
| | | if (quantityIssued === undefined || quantityIssued === '' || quantityIssued === null){ |
| | | return Feng.error('发放数量不能为空'); |
| | | } |
| | | // 限领数量 |
| | | var pickUpQuantity = $('#pickUpQuantity').val(); |
| | | if (pickUpQuantity === undefined || pickUpQuantity === '' || pickUpQuantity === null){ |
| | | return Feng.error('限领数量不能为空'); |
| | | } |
| | | // 有效期 |
| | | var periodOfValidity = $('#periodOfValidity').val(); |
| | | |
| | | if (periodOfValidity === undefined || periodOfValidity === '' || periodOfValidity === null){ |
| | | return Feng.error('有效期不能为空'); |
| | | } |
| | | // 兑换方式 |
| | | let exchangeMethod = $(':radio[name="exchangeMethod"]:checked').val(); |
| | | if (exchangeMethod === '' || exchangeMethod === undefined || exchangeMethod === null){ |
| | | return Feng.error('兑换方式不能为空'); |
| | | } |
| | | if (exchangeMethod === '1'){ |
| | | if (requiredPoints === undefined || requiredPoints === '' || requiredPoints === null){ |
| | | return Feng.error('所需积分不能为空'); |
| | | } |
| | | } |
| | | if (exchangeMethod === '2'){ |
| | | if (requiredPoints === undefined || requiredPoints === '' || requiredPoints === null){ |
| | | return Feng.error('所需积分不能为空'); |
| | | } |
| | | if (requiredCash === undefined || requiredCash === '' || requiredCash === null){ |
| | | return Feng.error('所需现金不能为空'); |
| | | } |
| | | } |
| | | if (exchangeMethod === '3'){ |
| | | if (requiredCash === undefined || requiredCash === '' || requiredCash === null){ |
| | | return Feng.error('所需现金不能为空'); |
| | | } |
| | | } |
| | | |
| | | var requiredCash = $('#requiredCash').val(); |
| | | |
| | | var company = $('#company').val(); |
| | | let company = $(':radio[name="company"]:checked').val(); |
| | | var cts = ""; |
| | | if (company === '2'){ |
| | | var myselect=document.getElementById('cityData'); |
| | | var seCity = myselect.options[myselect.selectedIndex].value; |
| | |
| | | return Feng.error('请选中一个省市'); |
| | | } |
| | | cityIds.push(seCity); |
| | | if (this.num > 0){ |
| | | if (num > 0){ |
| | | for (let i = 1; i <= num; i++) { |
| | | var insSelect=document.getElementById('cityData'+i); |
| | | var inData = insSelect.options[insSelect.selectedIndex].value; |
| | |
| | | cityIds.push(inData); |
| | | } |
| | | } |
| | | cts = cityIds.join(','); |
| | | } |
| | | } |
| | | |
| | | const commaSeparatedString = this.goodsPicArray.join(','); |
| | | |
| | | var stores = ""; |
| | | if (company === '3'){ |
| | | |
| | | console.log('3---this.storeIds',this.storeIds); |
| | | if (couponInfoDlg.storeIds.length === 0 ){ |
| | | return Feng.error('请至少选择一个门店'); |
| | | } |
| | | |
| | | console.log('11111111') |
| | | |
| | | stores = this.storeIds.join(','); |
| | | console.log('stores--===--',stores) |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tCouponManage/commitData", function (data) { |
| | | Feng.success("添加成功!"); |
| | |
| | | ajax.set("cityManagerId",1); |
| | | ajax.set("couponName",couponName); |
| | | ajax.set("prescription",prescription); |
| | | ajax.set("condition",$('#conditionalAmount').val()); |
| | | ajax.set("subtraction",$('#deductionAmount').val()); |
| | | ajax.set("discount",$('#voucherAmount').val()); |
| | | ajax.set("experience",$('#experienceName').val()); |
| | | ajax.set("condition",conditionalAmount); |
| | | ajax.set("subtraction",deductionAmount); |
| | | ajax.set("discount",voucherAmount); |
| | | ajax.set("experience",experienceName); |
| | | ajax.set("illustrate",illustrate); |
| | | ajax.set("distributionMethod",distributionMethod); |
| | | ajax.set("requiredPoints",requiredPoints); |
| | |
| | | ajax.set("periodOfValidity",periodOfValidity); |
| | | ajax.set("exchangeMethod",exchangeMethod); |
| | | ajax.set("goodImg",this.goodsCover); |
| | | ajax.set("goodImgs",this.goodsPicArray); |
| | | ajax.set("company",$('#company').val()); |
| | | ajax.set("cityIds",cityIds); |
| | | ajax.set("storeIds",this.storeIds); |
| | | ajax.set("goodImgs",commaSeparatedString); |
| | | ajax.set("company",company); |
| | | ajax.set("cityIds",cts); |
| | | ajax.set("storeIds",stores); |
| | | ajax.start(); |
| | | |
| | | } |
| | |
| | | $(function () { |
| | | getProvince(null); |
| | | radio1(); |
| | | var OBJradio = document.getElementsByName("prescription") |
| | | for (i = 0; i < OBJradio.length; i++) {//循环查找这个radio |
| | | if ($("#t1").val() == OBJradio[i].value) {//判断是否与radio的值相同 |
| | | OBJradio[i].checked = true//修改选中状态 |
| | | } |
| | | } |
| | | |
| | | var OBJradio = document.getElementsByName("distributionMethod") |
| | | for (i = 0; i < OBJradio.length; i++) {//循环查找这个radio |
| | | if ($("#t2").val() == OBJradio[i].value) {//判断是否与radio的值相同 |
| | | OBJradio[i].checked = true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio = document.getElementsByName("exchangeMethod") |
| | | for (i = 0; i < OBJradio.length; i++) {//循环查找这个radio |
| | | if ($("#t3").val() == OBJradio[i].value) {//判断是否与radio的值相同 |
| | | OBJradio[i].checked = true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio = document.getElementsByName("userGroup") |
| | | for (i = 0; i < OBJradio.length; i++) {//循环查找这个radio |
| | | if ($("#t4").val() == OBJradio[i].value) {//判断是否与radio的值相同 |
| | | OBJradio[i].checked = true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio = document.getElementsByName("company") |
| | | for (i = 0; i < OBJradio.length; i++) {//循环查找这个radio |
| | | if ($("#t5").val() == OBJradio[i].value) {//判断是否与radio的值相同 |
| | | OBJradio[i].checked = true//修改选中状态 |
| | | } |
| | | } |
| | | if($("#t5").val() ==2){ |
| | | $("#citySelect").show(); |
| | | } |
| | | if($("#t5").val() ==3){ |
| | | $("#storeSelect").show(); |
| | | } |
| | | if($("#t1").val()==1){ |
| | | console.log(1) |
| | | $("#conditionalAmount").val($("#one").val()) |
| | | $("#deductionAmount").val($("#two").val()) |
| | | } |
| | | if($("#t1").val()==2){ |
| | | radio2() |
| | | $("#voucherAmount").val($("#one").val()) |
| | | } |
| | | if($("#t1").val()==3){ |
| | | console.log(3) |
| | | $("#experienceName").val($("#three").val()) |
| | | } |
| | | |
| | | var userType = $('#userType').val(); |
| | | if (userType === '1'){ |
| | | // 兑换方式 |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TCoupon = { |
| | | id: "TCouponTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TCoupon.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '联系方式', field: 'phone', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '使用状态', field: 'status', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {2: "已使用", 1: "未使用"}[value] |
| | | }}, |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TCoupon.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TCoupon.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TCoupon.openAdd = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCouponManage/coupon_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 点击编辑 |
| | | */ |
| | | TCoupon.openChange = function () { |
| | | if (this.check()){ |
| | | let id = TCoupon.seItem.id |
| | | let name = TCoupon.seItem.name |
| | | let quantityIssued = TCoupon.seItem.quantityIssued |
| | | let pickUpQuantity = TCoupon.seItem.pickUpQuantity |
| | | let illustrate = TCoupon.seItem.illustrate |
| | | let hasPickQty = TCoupon.seItem.hasPickQty |
| | | var index = layer.load(1,{ |
| | | type: 1 |
| | | , title: '编辑优惠券' |
| | | , area: ['50%', '50%'] |
| | | , offset: 'auto' //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset |
| | | , id: 'layerDemo' //防止重复弹出cge |
| | | , content: '<div class="form-horizontal">' + |
| | | ' <div class="col-sm-11" >' + |
| | | ' <div class="col-sm-11">' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">优惠券名称:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <label class="form-control" id="name" >'+name+'</label> '+ |
| | | ' </div>\n' + |
| | | ' </div>\n'+ |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">发放数量:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <input class="form-control" id="num" value="'+quantityIssued+'" > '+ |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">限领数量:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <input class="form-control" id="num1" value="'+pickUpQuantity+'" > '+ |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">优惠券说明:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <textarea class="form-control" id="text" >'+illustrate+'</textarea> '+ |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' </div>' + |
| | | '</div>' |
| | | , btn: ['关闭', '保存'] |
| | | , btnAlign: 'c' //按钮居中 |
| | | , shade: 0.5 //不显示遮罩 |
| | | ,load:1 |
| | | , yes: function () { |
| | | layer.closeAll(); |
| | | }, |
| | | btn2:function () { |
| | | let num = $("#num").val() |
| | | if(num==''){ |
| | | Feng.info("请输入发放数量") |
| | | return false; |
| | | } |
| | | let num1 = $("#num1").val() |
| | | if(num1==''){ |
| | | Feng.info("请输入限领数量") |
| | | return false; |
| | | } |
| | | let text = $("#text").val() |
| | | if(text==''){ |
| | | Feng.info("请输入优惠券说明") |
| | | return false; |
| | | } |
| | | |
| | | if(num<hasPickQty){ |
| | | Feng.info("发放数量不能小于已领取数量") |
| | | return false; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/tCouponManage/update", function (data) { |
| | | if (data.code == 200) { |
| | | Feng.success("操作成功!"); |
| | | window.location.reload(); |
| | | window.parent.layer.closeAll(); |
| | | } else if(data=="repeat"){ |
| | | window.location.reload(); |
| | | window.parent.layer.closeAll(); |
| | | Feng.error("请勿重复操作"); |
| | | }else { |
| | | return Feng.error(data.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("操作失败!") |
| | | window.location.reload(); |
| | | window.parent.layer.closeAll(); |
| | | return Feng.error("操作失败!"); |
| | | }); |
| | | ajax.set("id", id); |
| | | ajax.set("num", num); |
| | | ajax.set("num1", num1); |
| | | ajax.set("text", text); |
| | | ajax.start(); |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 上架 |
| | | */ |
| | | |
| | | |
| | | /** |
| | | * 下架 |
| | | */ |
| | | TCoupon.offShelf = function () { |
| | | |
| | | |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TCoupon.openDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCouponManage/coupon_detail/' + TCoupon.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 打开领取记录 |
| | | */ |
| | | TCoupon.openCollectionRecord = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCouponManage/coupon_record/' + TCoupon.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | TCoupon.updateType = function () { |
| | | if (this.check()) { |
| | | if(TCoupon.seItem.status==2){ |
| | | Feng.info("该券已核销") |
| | | return false; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/tCouponManage/updateType", function(data){ |
| | | if(data.code==200){ |
| | | Feng.success("核销成功!") |
| | | TCoupon.table.refresh(); |
| | | } |
| | | },function(data){ |
| | | Feng.error("核销失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",TCoupon.seItem.id) |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TCoupon.search = function () { |
| | | var queryData = {}; |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['type'] = $("#type").val(); |
| | | queryData['phone'] = $("#state").val(); |
| | | TCoupon.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 重置搜索 |
| | | */ |
| | | TCoupon.resetSearch = function () { |
| | | $("#name").val(''); |
| | | $("#type").val(''); |
| | | $("#phone").val(''); |
| | | TCoupon.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TCoupon.initColumn(); |
| | | var table = new BSTable(TCoupon.id, "/tCouponManage/listRecord?id="+$("#id").val(), defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TCoupon.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TStoreProvince = { |
| | | id: "TStoreProvinceTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1, |
| | | storeList: [] |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TStoreProvince.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: '选择', field: '', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '所属账号', field: 'accountName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '所在省市', field: 'provinceCity', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '门店名称', field: 'name', visible: true, align: 'center', valign: 'middle'}, |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TStoreProvince.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TStoreProvince.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | |
| | | TStoreProvince.storeOfClosePage = function (){ |
| | | parent.layer.close(parent.layer.getFrameIndex(window.frameElement.id)); |
| | | } |
| | | |
| | | TStoreProvince.saveSelectStores = function (){ |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if (selected.length == 0) { |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | } |
| | | var arr = []; |
| | | console.log('selected--->',selected) |
| | | for(var i in selected){ |
| | | if(typeof selected[i].id != "undefined"){ |
| | | arr.push({ |
| | | id: selected[i].id, |
| | | provinceCity: typeof selected[i].provinceCity != "undefined" ? selected[i].provinceCity : "", |
| | | accountName: typeof selected[i].accountName != "undefined" ? selected[i].accountName : "", |
| | | name: typeof selected[i].name != "undefined" ? selected[i].name : "" |
| | | }) |
| | | } |
| | | } |
| | | window.parent.TCarInfoDlg.selecUserOpt(arr); |
| | | TStoreProvince.storeOfClosePage(); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TStoreProvince.search = function () { |
| | | var queryData = {}; |
| | | |
| | | var provinceElement = document.getElementById("province"); |
| | | var provinceId = provinceElement.value; |
| | | |
| | | var cityElement = document.getElementById("city"); |
| | | var cityElementId = cityElement.value; |
| | | |
| | | queryData['provinceId'] = provinceId; |
| | | queryData['cityId'] = cityElementId; |
| | | queryData['cityManagerId'] = $("#userPopulation").val(); |
| | | queryData['storeName'] = $("#storeName").val(); |
| | | TStoreProvince.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 重置搜索 |
| | | */ |
| | | TStoreProvince.resetSearch = function () { |
| | | var provinceSelect = document.getElementById("province"); |
| | | provinceSelect.innerHTML = '<option value="">全部</option>'; |
| | | |
| | | var citySelect = document.getElementById("city"); |
| | | citySelect.innerHTML = '<option value="">全部</option>'; |
| | | |
| | | queryProvince(); |
| | | |
| | | $("#userPopulation").val(''); |
| | | $("#storeName").val(''); |
| | | TStoreProvince.search(); |
| | | }; |
| | | |
| | | function queryProvince(){ |
| | | // 发送AJAX请求到后台获取省份数据 |
| | | // 假设后台返回的数据格式为一个包含省份ID和名称的数组 |
| | | var provinceSelect = document.getElementById("province"); |
| | | |
| | | var ajax = new $ax(Feng.ctxPath + "/tCouponManage/getProvince", function(data){ |
| | | data.forEach(province => { |
| | | var option = document.createElement("option"); |
| | | option.value = province.id; // 根据你的数据结构确定省份的id字段 |
| | | option.text = province.name; // 根据你的数据结构确定省份的name字段 |
| | | provinceSelect.appendChild(option); |
| | | }); |
| | | },function(data){ |
| | | Feng.error("下拉失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.start(); |
| | | provinceSelect.addEventListener("change", queryCity); |
| | | } |
| | | |
| | | |
| | | // 获取城市数据 |
| | | function queryCity() { |
| | | var selectedProvinceId = this.value; // 获取选择的省份ID |
| | | // 发送AJAX请求到后台获取对应省份的城市数据 |
| | | // 假设后台返回的数据格式为一个包含城市ID和名称的数组 |
| | | |
| | | var citySelect = document.getElementById("city"); |
| | | citySelect.innerHTML = ""; |
| | | var ajax = new $ax(Feng.ctxPath + "/tCouponManage/getCity", function(data){ |
| | | data.forEach(province => { |
| | | var option = document.createElement("option"); |
| | | option.value = province.id; // 根据你的数据结构确定省份的id字段 |
| | | option.text = province.name; // 根据你的数据结构确定省份的name字段 |
| | | citySelect.appendChild(option); |
| | | }); |
| | | },function(data){ |
| | | console.log('data:',data) |
| | | Feng.error("获取失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set('province',selectedProvinceId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function () { |
| | | var defaultColunms = TStoreProvince.initColumn(); |
| | | var table = new BSTable(TStoreProvince.id, "/tCouponManage/storeDetailsOfSearch", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TStoreProvince.table = table.init(); |
| | | |
| | | queryProvince(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 车辆管理管理初始化 |
| | | */ |
| | | var TPointProducts = { |
| | | id: "TPointProductsTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | var language =1 |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TPointProducts.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '商品类型', field: 'type', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {1: "实体商品", 2: "课包商品", 3: "门票商品", 4: "优惠券"}[value] |
| | | } |
| | | }, |
| | | {title: '商品名称', field: 'name', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '商品封面', field: 'cover', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | value = typeof value == "undefined" || value == '' ? '/static/img/NoPIC.png' : value; |
| | | return '<img src="' + value + '" style="height: 100px;"/>' |
| | | } |
| | | }, |
| | | {title: '有效期', field: 'timeValue', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '兑换地点', field: 'useScope', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {1: "全国", 2: "指定城市", 3: "指定门店"}[value] |
| | | } |
| | | }, |
| | | {title: '用户人群', field: 'userPopulation', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {1: "全部用户", 2: "年度会员", 3: "已有学员用户"}[value] |
| | | } |
| | | }, |
| | | {title: '发放数量', field: 'quantityIssued', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '限领数量', field: 'pickUpQuantity', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '已领数量', field: 'hasPickQty', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '已兑换数量', field: 'hasExchangeQty', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '排序', field: 'sort', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '活动状态', field: 'activeStatus', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {1: "未开始", 2: "已开始", 3: "已结束"}[value] |
| | | } |
| | | }, |
| | | {title: '可售状态', field: 'shelves', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {1: "上架", 2: "下架"}[value] |
| | | } |
| | | }, |
| | | ]; |
| | | }; |
| | | function currentTime(timestamp){ |
| | | var time = timestamp + ''; |
| | | if(time.length != 13){ |
| | | timestamp = timestamp * 1000; |
| | | } |
| | | var date = new Date(timestamp);; |
| | | var Y = date.getFullYear() + '-'; |
| | | var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; |
| | | var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' '; |
| | | |
| | | var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':'; |
| | | var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':'; |
| | | var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()); |
| | | var strDate = Y + M + D + h + m + s; |
| | | return strDate |
| | | } |
| | | |
| | | function currentTime1(timestamp){ |
| | | var time = timestamp + ''; |
| | | if(time.length != 13){ |
| | | timestamp = timestamp * 1000; |
| | | } |
| | | var date = new Date(timestamp);; |
| | | var Y = date.getFullYear() + '-'; |
| | | var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; |
| | | var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' '; |
| | | |
| | | var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':'; |
| | | var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':'; |
| | | var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()); |
| | | var strDate = Y + M + D ; |
| | | return strDate |
| | | } |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TPointProducts.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TPointProducts.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 添加 |
| | | */ |
| | | TPointProducts.openAddTPointProducts = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tGoods/tGoods_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 查看详情 |
| | | */ |
| | | TPointProducts.detail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'编辑', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tGoods/tCity_update/' + TPointProducts.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 购买详情 |
| | | */ |
| | | TPointProducts.payDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'购买详情', |
| | | area: ['70%', '70%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tGoods/tPay_detail/' + TPointProducts.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 编辑页面 |
| | | */ |
| | | TPointProducts.openEditPage = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'编辑', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tGoods/tGoods_update/' + TPointProducts.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 上下架处理 |
| | | * @param m |
| | | */ |
| | | TPointProducts.grounding = function (m) { |
| | | console.log('m:',m); |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tGoods/grounding", function (data) { |
| | | Feng.success("操作成功!"); |
| | | TPointProducts.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("操作失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",this.seItem.id); |
| | | ajax.set("type",m); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询车辆管理列表 |
| | | */ |
| | | TPointProducts.search = function () { |
| | | var queryData = {}; |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['type'] = $("#type").val(); |
| | | queryData['redemptionMethod'] = $("#redemptionMethod").val(); |
| | | queryData['userPopulation'] = $("#userPopulation").val(); |
| | | queryData['activeStatus'] = $("#activeStatus").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | TPointProducts.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TPointProducts.resetSearch = function () { |
| | | $("#name").val(""); |
| | | $("#type").val(""); |
| | | $("#redemptionMethod").val(""); |
| | | $("#userPopulation").val(""); |
| | | $("#activeStatus").val(""); |
| | | $("#state").val(""); |
| | | TPointProducts.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TPointProducts.initColumn(); |
| | | var table = new BSTable(TPointProducts.id, "/tGoods/list", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TPointProducts.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化车辆管理详情对话框 |
| | | */ |
| | | var language=1; |
| | | var TCarInfoDlg = { |
| | | tCarInfoData : {}, |
| | | validateFields: { |
| | | }, |
| | | goodsPicArray:[], |
| | | storeIds: [], |
| | | |
| | | }; |
| | | |
| | | /** |
| | | * 验证数据是否为空 |
| | | */ |
| | | TCarInfoDlg.validate = function () { |
| | | $('#carInfoForm').data("bootstrapValidator").resetForm(); |
| | | $('#carInfoForm').bootstrapValidator('validate'); |
| | | return $("#carInfoForm").data('bootstrapValidator').isValid(); |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TCarInfoDlg.clearData = function() { |
| | | this.tCarInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TCarInfoDlg.set = function(key, val) { |
| | | this.tCarInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TCarInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TCarInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TPointProducts.layerIndex); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TCarInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('isPlatCar') |
| | | .set('companyId') |
| | | .set('franchiseeId') |
| | | .set('carColor') |
| | | .set('carModelId') |
| | | .set('carBrandId') |
| | | .set('carLicensePlate') |
| | | .set('carPhoto') |
| | | .set('drivingLicenseNumber') |
| | | .set('drivingLicensePhoto') |
| | | .set('annualInspectionTime') |
| | | .set('commercialInsuranceTime') |
| | | .set('createTime') |
| | | .set('state') |
| | | .set('addType') |
| | | .set('addObjectId') |
| | | .set('plateColor') |
| | | .set('vehicleType') |
| | | .set('ownerName') |
| | | .set('engineId') |
| | | .set('VIN') |
| | | .set('certifyDateA') |
| | | .set('fuelType') |
| | | .set('engineDisplace') |
| | | .set('certificate') |
| | | .set('transAgency') |
| | | .set('transArea') |
| | | .set('transDateStart') |
| | | .set('transDateStop') |
| | | .set('certifyDateB') |
| | | .set('fixState') |
| | | .set('nextFixDate') |
| | | .set('checkState') |
| | | .set('feePrintId') |
| | | .set('GPSBrand') |
| | | .set('GPSModel') |
| | | .set('GPSIMEI') |
| | | .set('GPSInstallDate') |
| | | .set('registerDate') |
| | | .set('commercialType'); |
| | | } |
| | | function storeList(){ |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '门店列表', |
| | | area: ['80%', '80%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tGoods/storeList' |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | TCarInfoDlg.selecUserOpt = function (arrays){ |
| | | console.log(arrays) |
| | | //获取所有的值 |
| | | var subArr= this.storeIds; |
| | | $(".timeClass").each(function () { |
| | | subArr.push($(this).find("input[name*='id']").val()); |
| | | }); |
| | | var str = ''; |
| | | for(var i in arrays){ |
| | | var b = true; |
| | | for(var j in subArr){ |
| | | if(arrays[i].id === Number(subArr[j])){ |
| | | b = false; |
| | | break |
| | | } |
| | | } |
| | | if(b){ |
| | | this.storeIds.push(arrays[i].id) |
| | | str += '<tr class="timeClass">' + |
| | | '<td><input type="hidden" id="id" name="id" value="'+arrays[i].id+'"><input type="hidden" id="provinceCity" name="provinceCity" value="'+arrays[i].provinceCity+'">' + arrays[i].provinceCity + '</td>' + |
| | | '<td><input type="hidden" id="accountName" name="accountName" value="'+arrays[i].accountName+'">' + arrays[i].accountName + '</td>' + |
| | | '<td><input type="hidden" id="name" name="name" value="'+arrays[i].name+'">' + arrays[i].name + '</td><td><button onclick="deleteSub(this)">移除</button></td></tr>'; |
| | | } |
| | | } |
| | | $("#coun").append(str); |
| | | console.log('storeIds',this.storeIds) |
| | | } |
| | | function deleteSub(e) { |
| | | console.log(e); |
| | | var row = $(e).closest('tr'); |
| | | var value = row.find('#id').val(); |
| | | TCarInfoDlg.storeIds.splice(TCarInfoDlg.storeIds.indexOf(parseInt(value)), 1) |
| | | $(e).parent().parent().remove(); |
| | | console.log('storeIds',TCarInfoDlg.storeIds) |
| | | } |
| | | TCarInfoDlg.delete = function (o) { |
| | | $(o).parent("div").remove() |
| | | } |
| | | var num = 0; |
| | | TCarInfoDlg.addBranch = function () { |
| | | num=num+1; |
| | | var a= ""; |
| | | a = "<div style=\'margin-left: 25%\' class=\"col-sm-9 control-label\">\n" + |
| | | " <select class=\"col-sm-1\" id=\'provinceData"+num+"\' style=\"margin-top: 1%;width: 25%\" onchange=\'changeCity("+num+")\'>\n" + |
| | | " <option value=\"\">请选择</option>\n" + |
| | | " </select>\n" + |
| | | " <label class=\"col-sm-1\" style=\"width: 9%;margin-top: 7px\">省</label>\n" + |
| | | " <select class=\"col-sm-1\" style=\"margin-top: 1%;width: 25%\" id=\'cityData"+num+"\'>\n" + |
| | | " <option value=\"\">请选择</option>\n" + |
| | | " </select>\n" + |
| | | " <label class=\"col-sm-1\" style=\"width: 7%;margin-top: 7px\">市</label>\n" + |
| | | " <label name=\"addBranch\" class=\"col-sm-1\" onclick=\"TCarInfoDlg.delete(this)\" style=\"border: 0px;cursor: pointer;margin-top: 1%\"><i class=\"fa fa-trash\"></i></label>"+ |
| | | " </div>"; |
| | | $("#cityDemo").append($(a)); |
| | | getProvince(num); |
| | | } |
| | | function changeCity(n){ |
| | | |
| | | var provinceSelect = null; |
| | | if (n === undefined || n === null || n === ''){ |
| | | provinceSelect = document.getElementById("provinceData"); |
| | | }else { |
| | | provinceSelect = document.getElementById("provinceData"+n); |
| | | } |
| | | |
| | | var citySelect = null; |
| | | if (n === undefined || n === null || n === ''){ |
| | | citySelect = document.getElementById("cityData"); |
| | | }else { |
| | | citySelect = document.getElementById("cityData"+n); |
| | | } |
| | | |
| | | var selectedProvince = provinceSelect.value; |
| | | // 清空城市下拉框 |
| | | citySelect.innerHTML = '<option value="">请选择</option>'; |
| | | if (selectedProvince === "") { |
| | | return; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/tCouponManage/getCity", function(data){ |
| | | data.forEach(province => { |
| | | var option = document.createElement("option"); |
| | | option.value = province.id; // 根据你的数据结构确定省份的id字段 |
| | | option.text = province.name; // 根据你的数据结构确定省份的name字段 |
| | | citySelect.appendChild(option); |
| | | }); |
| | | },function(data){ |
| | | console.log('data:',data) |
| | | Feng.error("获取失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set('province',selectedProvince); |
| | | ajax.start(); |
| | | } |
| | | function getProvince(n){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tCouponManage/getProvince", function(data){ |
| | | console.log(data) |
| | | var provinceSelect = null; |
| | | if (n === undefined || n === null || ''){ |
| | | provinceSelect = document.getElementById("provinceData"); |
| | | }else { |
| | | provinceSelect = document.getElementById("provinceData"+n); |
| | | } |
| | | data.forEach(province => { |
| | | var option = document.createElement("option"); |
| | | option.value = province.id; // 根据你的数据结构确定省份的id字段 |
| | | option.text = province.name; // 根据你的数据结构确定省份的name字段 |
| | | provinceSelect.appendChild(option); |
| | | }); |
| | | },function(data){ |
| | | Feng.error("下拉失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.start(); |
| | | } |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TCarInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | |
| | | let pCode = $("#pCode").val() |
| | | let cCode = $("#cCode").val() |
| | | let name = $("#name").val() |
| | | let phone = $("#phone").val() |
| | | |
| | | if(pCode==''){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if(cCode==''){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if(name==''){ |
| | | Feng.info("管理员姓名不能为空") |
| | | return; |
| | | } |
| | | if(phone==''){ |
| | | Feng.info("管理员手机号不能为空") |
| | | return; |
| | | } |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/add", function(data){ |
| | | if(data=="5001"){ |
| | | Feng.error("改账号已经存在"); |
| | | }else |
| | | if(data.code == 200){ |
| | | if(language==1){ |
| | | Feng.success("添加成功!"); |
| | | }else if(language==2){ |
| | | Feng.success("Successfully added!"); |
| | | }else { |
| | | Feng.success("Sangat berhasil ditambah!"); |
| | | } |
| | | window.parent.TCompetition.table.refresh(); |
| | | TCarInfoDlg.close(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tCarInfoData); |
| | | ajax.set("provinceCode",pCode); |
| | | ajax.set("cityCode",cCode); |
| | | ajax.set("name",name); |
| | | ajax.set("phone",phone); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TCarInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | let pCode = $("#pCode").val() |
| | | let cCode = $("#cCode").val() |
| | | let name = $("#name").val() |
| | | let phone = $("#phone").val() |
| | | |
| | | if(pCode==''){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if(cCode==''){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if(name==''){ |
| | | Feng.info("管理员姓名不能为空") |
| | | return; |
| | | } |
| | | if(phone==''){ |
| | | Feng.info("管理员手机号不能为空") |
| | | return; |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/update", function(data){ |
| | | if(data=="5001"){ |
| | | Feng.error("改账号已经存在"); |
| | | }else |
| | | if(data.code == 200){ |
| | | if(language==1){ |
| | | Feng.success("修改成功!"); |
| | | }else if(language==2){ |
| | | Feng.success("Modify successfully!"); |
| | | }else { |
| | | Feng.success("Mengubah dengan sukses!"); |
| | | } |
| | | window.parent.TCompetition.table.refresh(); |
| | | TCarInfoDlg.close(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("provinceCode",pCode); |
| | | ajax.set("cityCode",cCode); |
| | | ajax.set("name",name); |
| | | ajax.set("phone",phone); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | getProvince(null); |
| | | Feng.initValidator("carInfoForm", TCarInfoDlg.validateFields); |
| | | // 初始化图片上传 |
| | | var carPhoto = new $WebUpload("cover"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var drivingLicensePhoto = new $WebUpload("drivingLicensePhoto"); |
| | | drivingLicensePhoto.setUploadBarId("progressBar"); |
| | | drivingLicensePhoto.init(); |
| | | TCarInfoDlg.editor = UE.getEditor('editor'); |
| | | }); |
| | | |
| | | /** |
| | | * 选择分公司后执行 |
| | | */ |
| | | TCarInfoDlg.oneChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/onChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 类型改变执行 |
| | | * @param e |
| | | */ |
| | | TCarInfoDlg.companyTypeClick = function (e) { |
| | | if (1 == e){ |
| | | $(".companyDiv").hide(); |
| | | } else if (2 == e){ |
| | | $(".companyDiv").show(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 车辆品牌改变时执行 |
| | | */ |
| | | TCarInfoDlg.brandChange = function (e) { |
| | | var carBrandId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCar/brandChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择车辆类型</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Please select the vehicle type</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih Jenis Kendaraan</option>'; |
| | | } |
| | | |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#carModelId").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("carBrandId",carBrandId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 专车服务被点击 |
| | | */ |
| | | TCarInfoDlg.zcServerClick = function () { |
| | | var serverBox1 = $('#serverBox1').prop('checked'); |
| | | if (serverBox1){ |
| | | $("#zcModelDiv").show(); |
| | | } else { |
| | | $("#zcModelDiv").hide(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 跨城服务被点击 |
| | | */ |
| | | TCarInfoDlg.kcServerClick = function () { |
| | | var serverBox3 = $('#serverBox3').prop('checked'); |
| | | if (serverBox3){ |
| | | $("#kcModelDiv").show(); |
| | | } else { |
| | | $("#kcModelDiv").hide(); |
| | | } |
| | | } |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TPayInfo = { |
| | | id: "TPayInfoTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1, |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TPayInfo.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '选择', field: '', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '联系方式', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '使用状态', field: 'status', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {1: "未使用", 2: "待核销"}[value] |
| | | } |
| | | }, |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TPayInfo.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TPayInfo.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 核销操作 |
| | | * @constructor |
| | | */ |
| | | TPayInfo.WriteOff = function (){ |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tGoods/write_off", function (data) { |
| | | Feng.success("核销成功!"); |
| | | TPayInfo.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("核销失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TPayInfo.close = function() { |
| | | parent.layer.close(window.parent.TPointProducts.layerIndex); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TPayInfo.search = function () { |
| | | var queryData = {}; |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['phone'] = $("#phone").val(); |
| | | queryData['status'] = $("#status").val(); |
| | | queryData['id'] = $("#id").val(); |
| | | TPayInfo.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 重置搜索 |
| | | */ |
| | | TPayInfo.resetSearch = function () { |
| | | $("#name").val(''); |
| | | $("#phone").val(''); |
| | | $("#status").val(''); |
| | | TPayInfo.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | let goodsId = $("#id").val(); |
| | | var defaultColunms = TPayInfo.initColumn(); |
| | | var table = new BSTable(TPayInfo.id, "/tGoods/payList/"+goodsId, defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TPayInfo.table = table.init(); |
| | | }); |
| | |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键ID', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '省', field: 'insertTime', visible: true, align: 'center', valign: 'middle',width:'20%', |
| | | {title: '省', field: 'province', visible: true, align: 'center', valign: 'middle',width:'20%', |
| | | }, |
| | | {title: '市', field: 'name', visible: true, align: 'center', valign: 'middle', |
| | | {title: '市', field: 'city', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '姓名', field: 'insertUserId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '联系电话', field: 'insertUser', visible: true, align: 'center', valign: 'middle', |
| | | {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '联系电话', field: 'phone', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '积分类型', field: 'province', visible: true, align: 'center', valign: 'middle', |
| | | {title: '积分类型', field: 'type', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return{1:"赠送积分", 2:"兑换商品",3:"完成课后练习",4:"观看教学视频"}[data] |
| | | } |
| | | }, |
| | | {title: '积分明细', field: 'lineNum', visible: true, align: 'center', valign: 'middle', |
| | | {title: '积分明细', field: 'integral', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '变动类型', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | {title: '变动类型', field: 'category', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return{1:"增加", 2:"减少"}[data] |
| | | } |
| | | }, |
| | | {title: '时间', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | {title: '时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '备注', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | {title: '备注', field: 'remark', visible: true, align: 'center', valign: 'middle', |
| | | } |
| | | ]; |
| | | }; |
| | |
| | | /** |
| | | * 点击添加跨城站点管理 |
| | | */ |
| | | TSite.openAddTSite = function () { |
| | | let language =1 |
| | | TSite.openAdd = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: language==1?'添加':(language==2?'Add':'Tambahkan'), |
| | | area: ['100%', '100%'], //宽高 |
| | | title: language==1?'赠送积分':(language==2?'Add':'Tambahkan'), |
| | | area: ['50%', '50%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tSite/tSite_add' |
| | | content: Feng.ctxPath + '/tIntegral/tIntegral_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | |
| | | */ |
| | | TSite.search = function () { |
| | | var queryData = {}; |
| | | queryData['insertTime'] = $("#insertTime").val(); |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['insertUser'] = $("#insertUser").val(); |
| | | queryData['city'] = $("#city").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | queryData['phone'] = $("#phone").val(); |
| | | queryData['type'] = $("#type").val(); |
| | | queryData['category'] = $("#category").val(); |
| | | queryData['time'] = $("#time").val(); |
| | | TSite.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TSite.resetSearch = function () { |
| | | $("#insertTime").val(""); |
| | | $("#name").val(""); |
| | | $("#insertUser").val(""); |
| | | $("#city").val(""); |
| | | $("#state").val(""); |
| | | $("#name").val(''); |
| | | $("#phone").val(''); |
| | | $("#type").val(''); |
| | | $("#category").val(''); |
| | | $("#time").val(''); |
| | | TSite.search(); |
| | | }; |
| | | |