2 文件已重命名
61个文件已修改
35个文件已删除
16个文件已添加
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.account.entity.TAppUser; |
| | | import com.dsh.account.model.query.appUserQuery.QueryAppUser; |
| | | import com.dsh.account.model.vo.QueryAppUserVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | void membershipEnd(); |
| | | |
| | | List<QueryAppUserVO> listAll(@Param("query") QueryAppUser query); |
| | | } |
New file |
| | |
| | | package com.dsh.account.model.query.appUserQuery; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 用户信息查询Query |
| | | */ |
| | | @Data |
| | | public class QueryAppUser { |
| | | private String province; |
| | | private String city; |
| | | private String name; |
| | | private String phone; |
| | | private Integer isVip; |
| | | private Integer state; |
| | | private String salesmanUserName; |
| | | } |
New file |
| | |
| | | package com.dsh.account.model.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 用户信息列表VO |
| | | */ |
| | | @Data |
| | | public class QueryAppUserVO { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Integer id; |
| | | /** |
| | | * 编号 |
| | | */ |
| | | private String code; |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 电话 |
| | | */ |
| | | private String phone; |
| | | /** |
| | | * 密码 |
| | | */ |
| | | private String password; |
| | | /** |
| | | * 生日 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date birthday; |
| | | /** |
| | | * 性别(1=男,2=女) |
| | | */ |
| | | private Integer gender; |
| | | /** |
| | | * 身高 |
| | | */ |
| | | private Double height; |
| | | /** |
| | | * 体重 |
| | | */ |
| | | private Double weight; |
| | | /** |
| | | * bmi健康值 |
| | | */ |
| | | private Double bmi; |
| | | /** |
| | | * 身份证号 |
| | | */ |
| | | private String idCard; |
| | | /** |
| | | * 微信openid |
| | | */ |
| | | private String openid; |
| | | /** |
| | | * 省 |
| | | */ |
| | | private String province; |
| | | /** |
| | | * 省编号 |
| | | */ |
| | | private String provinceCode; |
| | | /** |
| | | * 市 |
| | | */ |
| | | private String city; |
| | | /** |
| | | * 市编号 |
| | | */ |
| | | private String cityCode; |
| | | /** |
| | | * 是否是年度会员(0=否,1=是) |
| | | */ |
| | | private Integer isVip; |
| | | /** |
| | | * 会员有效期 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date vipEndTime; |
| | | /** |
| | | * 会员等级id |
| | | */ |
| | | private Integer viplevelId; |
| | | /** |
| | | * 推荐用户id |
| | | */ |
| | | private Integer referralUserId; |
| | | /** |
| | | * 销售员id |
| | | */ |
| | | private Integer salesmanUserId; |
| | | |
| | | private String salesmanUserName; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | private Integer state; |
| | | /** |
| | | * 剩余积分 |
| | | */ |
| | | private Integer integral; |
| | | /** |
| | | * 玩湃币 |
| | | */ |
| | | private Integer playPaiCoins; |
| | | /** |
| | | * 用户头像 |
| | | */ |
| | | private String headImg; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | import com.dsh.account.model.JoinPlayPaiVo; |
| | | import com.dsh.account.model.LoginSMSCodeVo; |
| | | import com.dsh.account.model.LoginWeChatVo; |
| | | import com.dsh.account.model.query.appUserQuery.QueryAppUser; |
| | | import com.dsh.account.model.vo.QueryAppUserVO; |
| | | import com.dsh.account.model.vo.classDetails.CourseVenue; |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.ClassInfoVo; |
| | | import com.dsh.account.model.vo.userBenefitDetail.*; |
| | |
| | | List<StoreResponse> queryStoresOfExchange(Integer goodsType,Integer pointsMerId); |
| | | |
| | | List<CourseVenue> queryWeekOfCourseDetails(Integer appUserId ,Integer stuId, String time, String longitude, String latitude); |
| | | |
| | | List<QueryAppUserVO> listAll(QueryAppUser query); |
| | | } |
| | |
| | | import com.dsh.account.mapper.*; |
| | | import com.dsh.account.model.*; |
| | | import com.dsh.account.model.dto.Coupon; |
| | | import com.dsh.account.model.query.appUserQuery.QueryAppUser; |
| | | import com.dsh.account.model.vo.QueryAppUserVO; |
| | | import com.dsh.account.model.vo.classDetails.CourseVenue; |
| | | import com.dsh.account.model.vo.classDetails.ExerciseVideo; |
| | | import com.dsh.account.model.vo.classDetails.RegisteredCourse; |
| | |
| | | |
| | | @Resource |
| | | private SiteClient stClient; |
| | | @Autowired |
| | | private TAppUserMapper appUserMapper; |
| | | |
| | | @Override |
| | | public List<QueryAppUserVO> listAll(QueryAppUser query) { |
| | | return appUserMapper.listAll(query); |
| | | } |
| | | @Override |
| | | public ClassInfoVo queryUserOfStus(Integer id) { |
| | | TAppUser tAppUser = this.baseMapper.selectById(id); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | <update id="membershipEnd"> |
| | | update t_app_user set isVip = 0 where isVip = 1 and now() >= vipEndTime |
| | | </update> |
| | | <select id="listAll" resultType="com.dsh.account.model.vo.QueryAppUserVO"> |
| | | select t1.* from t_app_user t1 |
| | | <where> |
| | | <if test="query.city!=null and query.city!= ''"> |
| | | and t1.city = #{query.city} |
| | | </if> |
| | | <if test="query.province!=null and query.province!= ''"> |
| | | and t1.province = #{query.province} |
| | | </if> |
| | | <if test="query.name!=null and query.name!= ''"> |
| | | AND t1.name LIKE concat('%',#{query.name},'%') |
| | | </if> |
| | | <if test="query.phone!=null and query.phone!= ''"> |
| | | and t1.phone LIKE concat('%',#{query.phone},'%') |
| | | </if> |
| | | <if test="query.isVip!=null and query.isVip!= ''"> |
| | | and t1.isVip = #{query.isVip} |
| | | </if> |
| | | and t1.state != 3 |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | |
| | | for (QueryBodySideAppointmentVO queryBodySideAppointmentVO : queryBodySideAppointmentVOS) { |
| | | list.add(queryBodySideAppointmentVO.getStoreId()); |
| | | } |
| | | list.add(1); |
| | | list.add(2); |
| | | List<Store> stores = storeClient.queryStoreByIds(list); |
| | | for (QueryBodySideAppointmentVO queryBodySideAppointmentVO : queryBodySideAppointmentVOS) { |
| | | for (Store store : stores) { |
| | |
| | | import com.dsh.activity.feignclient.course.model.CoursePackagePaymentConfig; |
| | | import com.dsh.activity.feignclient.model.*; |
| | | import com.dsh.activity.feignclient.other.StoreClient; |
| | | import com.dsh.activity.feignclient.other.model.Store; |
| | | import com.dsh.activity.feignclient.other.model.StoreDetailOfCourse; |
| | | import com.dsh.activity.model.PointMerchandiseVo; |
| | | import com.dsh.activity.model.request.*; |
| | | import com.dsh.activity.model.response.GoodsInfoOneVo; |
| | | import com.dsh.activity.model.response.StoreVos; |
| | | import com.dsh.activity.service.*; |
| | | import com.dsh.activity.util.GDMapGeocodingUtil; |
| | | import com.dsh.activity.util.StrUtils; |
| | |
| | | |
| | | @Resource |
| | | private CouponCityService ccityService; |
| | | |
| | | @Resource |
| | | private PointsMerchandiseCityService pmdsCityService; |
| | | |
| | | |
| | | @ResponseBody |
| | |
| | | |
| | | @PostMapping("/base/pointMerchars/updateDetailsUserPointMercase") |
| | | public void updateDetailsUserPointMercase(@RequestBody UserPointsMerchandise merchandise){ |
| | | upmseService.update(merchandise,new LambdaQueryWrapper<UserPointsMerchandise>() |
| | | .eq(UserPointsMerchandise::getUserId,merchandise.getUserId()) |
| | | .eq(UserPointsMerchandise::getId,merchandise.getId())); |
| | | |
| | | upmseService.updateById(merchandise); |
| | | } |
| | | |
| | | @PostMapping("/base/pointMerchars/queryUserPointMerchaseByCode") |
| | |
| | | if (list.size() > 0 ){ |
| | | for (UserPointsMerchandise pointsMerchandise : list) { |
| | | pointsMerchandise.setState(2); |
| | | upmseService.update(pointsMerchandise,new LambdaQueryWrapper<UserPointsMerchandise>() |
| | | .eq(UserPointsMerchandise::getUserId,pointsMerchandise.getUserId()) |
| | | .eq(UserPointsMerchandise::getId,pointsMerchandise.getId())); |
| | | upmseService.updateById(pointsMerchandise); |
| | | } |
| | | } |
| | | |
| | |
| | | public PointMercharsVo queryPointMerchaseDetailOfId(@RequestBody Integer pointMercharsId){ |
| | | PointMercharsVo vo = new PointMercharsVo(); |
| | | PointsMerchandise byId = pmdsService.getById(pointMercharsId); |
| | | List<UserPointsMerchandise> list = upmseService.list(new LambdaQueryWrapper<UserPointsMerchandise>() |
| | | .eq(UserPointsMerchandise::getPointsMerchandiseId, pointMercharsId)); |
| | | if (ToolUtil.isNotEmpty(byId)){ |
| | | vo.setName(byId.getName()); |
| | | vo.setCover(byId.getCover()); |
| | | vo.setPics(byId.getProductImages()); |
| | | vo.setQuantityHas(list.size()); |
| | | vo.setQuantityIssued(byId.getQuantityIssued()); |
| | | vo.setPickUpQuantity(byId.getPickUpQuantity()); |
| | | vo.setSort(byId.getSort()); |
| | |
| | | if (list.size() > 0 ){ |
| | | for (UserPointsMerchandise pointsMerchandise : list) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id",pointsMerchandise.getId().toString()); |
| | | map.put("id",pointsMerchandise.getId()); |
| | | map.put("userId",pointsMerchandise.getUserId()); |
| | | map.put("status", pointsMerchandise.getStatus()); |
| | | mapList.add(map); |
| | |
| | | } |
| | | System.out.println(mapList); |
| | | return mapList; |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/pointMerchars/writeOffGoodsStatus") |
| | | public boolean writeOffGoodsStatus(@RequestBody Map<String, Object> map){ |
| | | try { |
| | | String o = (String) map.get("goodsId"); |
| | | Integer managerId = (Integer) map.get("managerId"); |
| | | UserPointsMerchandise byId = upmseService.getOne(new LambdaQueryWrapper<UserPointsMerchandise>() |
| | | .eq(UserPointsMerchandise::getId,Long.parseLong(o) )); |
| | | if (byId.getStatus() == 2){ |
| | | return false; |
| | | } |
| | | byId.setStatus(2); |
| | | byId.setVerificationUserId(managerId); |
| | | byId.setVerificationTime(new Date()); |
| | | upmseService.update(byId,new LambdaQueryWrapper<UserPointsMerchandise>() |
| | | .eq(UserPointsMerchandise::getUserId,byId.getUserId()) |
| | | .eq(UserPointsMerchandise::getId,byId.getId())); |
| | | System.out.println(byId); |
| | | return true; |
| | | }catch (Exception e){ |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/pointMerchars/updateGoodsDetail") |
| | | public boolean updateGoodsDetail(@RequestBody Map<String, Object> map){ |
| | | try { |
| | | Integer pointMerchandiseId = (Integer) map.get("pointMerchandiseId"); |
| | | PointsMerchandise byId1 = pmdsService.getById(pointMerchandiseId); |
| | | |
| | | Integer quantityIssued = (Integer) map.get("quantityIssued"); |
| | | Integer pickUpQuantity = (Integer) map.get("pickUpQuantity"); |
| | | String redemptionInstructions = (String) map.get("redemptionInstructions"); |
| | | String cover = (String) map.get("cover"); |
| | | String productImages = (String) map.get("productImages"); |
| | | Integer sort = (Integer) map.get("sort"); |
| | | |
| | | byId1.setQuantityIssued(quantityIssued); |
| | | byId1.setPickUpQuantity(pickUpQuantity); |
| | | byId1.setRedemptionInstructions(redemptionInstructions); |
| | | if (ToolUtil.isNotEmpty(cover)){ |
| | | byId1.setCover(cover); |
| | | } |
| | | if (ToolUtil.isNotEmpty(productImages)){ |
| | | byId1.setProductImages(productImages); |
| | | } |
| | | byId1.setSort(sort); |
| | | pmdsService.updateById(byId1); |
| | | return true; |
| | | }catch (Exception e){ |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | @PostMapping("/base/pointMerchars/queryDetailsOfGoods") |
| | | public GoodsInfoOneVo queryDetailsOfGoods(@RequestBody Integer id){ |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | GoodsInfoOneVo infoOneVo = new GoodsInfoOneVo(); |
| | | PointsMerchandise byId = pmdsService.getById(id); |
| | | |
| | | if (ToolUtil.isNotEmpty(byId)){ |
| | | infoOneVo.setName(byId.getName()); |
| | | infoOneVo.setCover(byId.getCover()); |
| | | infoOneVo.setPics(byId.getProductImages()); |
| | | infoOneVo.setPrice(byId.getPrice()); |
| | | infoOneVo.setExchangeMethod(byId.getRedemptionMethod()); |
| | | switch (byId.getRedemptionMethod()){ |
| | | case 1: |
| | | infoOneVo.setIntegral(byId.getIntegral()); |
| | | break; |
| | | case 2: |
| | | infoOneVo.setIntegral(byId.getIntegral()); |
| | | infoOneVo.setCash(byId.getCash()); |
| | | break; |
| | | case 3: |
| | | infoOneVo.setCash(byId.getCash()); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | switch (byId.getUserPopulation()){ |
| | | case 1: |
| | | infoOneVo.setUserPopulation("全部用户"); |
| | | break; |
| | | case 2: |
| | | infoOneVo.setUserPopulation("年度会员"); |
| | | break; |
| | | case 3: |
| | | infoOneVo.setUserPopulation("已有学员用户"); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | infoOneVo.setQuantityIssued(byId.getQuantityIssued()); |
| | | List<UserPointsMerchandise> list = upmseService.list(new LambdaQueryWrapper<UserPointsMerchandise>() |
| | | .eq(UserPointsMerchandise::getPointsMerchandiseId,byId.getId())); |
| | | infoOneVo.setUseScope(byId.getUseScope()); |
| | | switch (byId.getUseScope()){ |
| | | case 1: |
| | | infoOneVo.setExchangeArea("全国通用"); |
| | | break; |
| | | case 2: |
| | | infoOneVo.setExchangeArea("指定城市"); |
| | | break; |
| | | case 3: |
| | | infoOneVo.setExchangeArea("指定门店"); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | infoOneVo.setHasPicked(list.size()); |
| | | infoOneVo.setPickUpQuantity(byId.getPickUpQuantity()); |
| | | infoOneVo.setValidTime(simpleDateFormat.format(byId.getStartTime())+"至"+ simpleDateFormat.format(byId.getEndTime())); |
| | | infoOneVo.setRedemptionInstructions(byId.getRedemptionInstructions()); |
| | | infoOneVo.setSort(byId.getSort()); |
| | | } |
| | | return infoOneVo; |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/pointMerchars/getStoreList") |
| | | public List<StoreVos> getStoreList(@RequestBody Integer id){ |
| | | List<StoreVos> storeVos = new ArrayList<>(); |
| | | List<PointsMerchandiseStore> list = pmdstoService.list(new QueryWrapper<PointsMerchandiseStore>() |
| | | .eq("pointsMerchandiseId",id)); |
| | | if (list.size() > 0 ){ |
| | | List<Integer> collect = list.stream().map(PointsMerchandiseStore::getStoreId).collect(Collectors.toList()); |
| | | List<Store> stores = stoClient.queryStoreByIds(collect); |
| | | if (stores.size() > 0 ){ |
| | | for (Store store : stores) { |
| | | StoreVos storeVos1 = new StoreVos(); |
| | | storeVos1.setNum1(store.getProvince() +"省"+ store.getCity() +"市"); |
| | | storeVos1.setNum2(store.getName()); |
| | | storeVos.add(storeVos1); |
| | | } |
| | | } |
| | | } |
| | | return storeVos; |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/pointMerchars/getProvinces") |
| | | public List<StoreVos> getProvinces(@RequestBody Integer id){ |
| | | List<StoreVos> storeVos = new ArrayList<>(); |
| | | List<PointsMerchandiseCity> list = pmdsCityService.list(new LambdaQueryWrapper<PointsMerchandiseCity>() |
| | | .eq(PointsMerchandiseCity::getPointsMerchandiseId,id)); |
| | | if (list.size() > 0 ){ |
| | | for (PointsMerchandiseCity pointsMerchandiseCity : list) { |
| | | StoreVos storeVos1 = new StoreVos(); |
| | | storeVos1.setNum1(pointsMerchandiseCity.getProvince()); |
| | | storeVos1.setNum2(pointsMerchandiseCity.getCity()); |
| | | storeVos.add(storeVos1); |
| | | } |
| | | } |
| | | return storeVos; |
| | | } |
| | | |
| | | @PostMapping("/base/pointMerchars/add") |
| | | public Integer add(@RequestBody PointsMerchandise pointsMerchandise){ |
| | | Integer storeId = pointsMerchandise.getShelves(); |
| | | pointsMerchandise.setShelves(2); |
| | | boolean save = pmdsService.save(pointsMerchandise); |
| | | if(save && ToolUtil.isNotEmpty(storeId) && pointsMerchandise.getType()==2){ |
| | | PointsMerchandiseStore pointsMerchandiseStore = new PointsMerchandiseStore(); |
| | | pointsMerchandiseStore.setPointsMerchandiseId(pointsMerchandise.getId()); |
| | | pointsMerchandiseStore.setStoreId(storeId); |
| | | save = pmdstoService.save(pointsMerchandiseStore); |
| | | } |
| | | if(save && pointsMerchandise.getType()==2 && ToolUtil.isNotEmpty(pointsMerchandise.getProvinceCode())){ |
| | | pmdsService.saveCity(pointsMerchandise.getId(),pointsMerchandise.getProvince(),pointsMerchandise.getProvinceCode(),pointsMerchandise.getCity(),pointsMerchandise.getCityCode()); |
| | | } |
| | | if(save){ |
| | | return pointsMerchandise.getId(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | @PostMapping("/base/pointMerchars/addOther") |
| | | public Boolean addOther(@RequestBody String pam){ |
| | | Boolean save =false; |
| | | String[] split = pam.split("_"); |
| | | for (String s : split[1].split(",")) { |
| | | PointsMerchandiseStore pointsMerchandiseStore = new PointsMerchandiseStore(); |
| | | pointsMerchandiseStore.setPointsMerchandiseId(Integer.valueOf(split[0])); |
| | | pointsMerchandiseStore.setStoreId(Integer.valueOf(s)); |
| | | save = pmdstoService.save(pointsMerchandiseStore); |
| | | } |
| | | return save; |
| | | } |
| | | |
| | | @PostMapping("/base/pointMerchars/addCitys") |
| | | public Boolean addCitys(@RequestBody ArrayList<Map<String, String>> objects){ |
| | | try { |
| | | for (Map<String, String> object : objects) { |
| | | pmdsService.saveCity(Integer.valueOf(object.get("id")),object.get("pName"),object.get("pCode"),object.get("cName"),object.get("cCode")); |
| | | } |
| | | return true; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | @PostMapping("/base/pointMerchars/queryPointMerchaseById") |
| | | public PointsMerchandise queryPointMerchaseById(@RequestBody Integer id){ |
| | | return pmdsService.getById(id); |
| | | } |
| | | |
| | | |
| | | |
| | | @PostMapping("/base/pointMerchars/getshopName") |
| | | public Integer getshopName(@RequestBody Integer id){ |
| | | List<PointsMerchandiseStore> list = pmdstoService.list(new LambdaQueryWrapper<PointsMerchandiseStore>().eq(PointsMerchandiseStore::getPointsMerchandiseId, id)); |
| | | PointsMerchandiseStore pointsMerchandiseStore = list.get(0); |
| | | Integer storeId = pointsMerchandiseStore.getStoreId(); |
| | | return storeId; |
| | | } |
| | | |
| | | } |
| | |
| | | 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("startTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date startTime; |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @TableField("endTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date endTime; |
| | | /** |
| | | * 使用范围(1=全国,2=指定城市,3=指定门店) |
| | |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | /** |
| | | * 课包支付配置id |
| | |
| | | @Param("state") Integer state, |
| | | @Param("page") Page<Map<String, Object>> page); |
| | | |
| | | void saveCity(@Param("id") Integer id, @Param("province") String province, @Param("provinceCode") String provinceCode, @Param("city") String city, @Param("cityCode") String cityCode); |
| | | } |
| | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 接收查询参数VO |
| | | */ |
| | |
| | | private Integer state; |
| | | // 1=今日内预约 2=明日预约 7=七日内 |
| | | private Integer day; |
| | | // 门店id集合 |
| | | private List<Integer> ids; |
| | | } |
| | |
| | | */ |
| | | Integer quantityIssued; |
| | | /** |
| | | * 已领数量 |
| | | */ |
| | | Integer quantityHas; |
| | | /** |
| | | * 限领数量 |
| | | */ |
| | | Integer pickUpQuantity; |
| | |
| | | |
| | | List<Map<String, Object>> queryGoodsListOfSearch(IntegralGoodsOfSearch ofSearch); |
| | | |
| | | void saveCity(Integer id, String province, String provinceCode, String city, String cityCode); |
| | | } |
| | |
| | | return this.baseMapper.queryGoodsListOfSearch(ofSearch.getName(),ofSearch.getType(),ofSearch.getRedemptionMethod(), |
| | | ofSearch.getUserPopulation(),ofSearch.getActiveStatus(),ofSearch.getState(),ofSearch.getPage()); |
| | | } |
| | | |
| | | @Override |
| | | public void saveCity(Integer id, String province, String provinceCode, String city, String cityCode) { |
| | | this.baseMapper.saveCity(id,province,provinceCode,city,cityCode); |
| | | } |
| | | } |
| | |
| | | t1.parentName like concat('%',#{query.parentName},'%') |
| | | </if> |
| | | <if test="query.state!=null and query.state!= ''"> |
| | | and t1.state = #{query.state} |
| | | and t1.status = #{query.state} |
| | | </if> |
| | | |
| | | <if test="query.day!=null and query.day!= '' and query.day==1" > |
| | | and DATE(t1.appointmentTime) = CURDATE() |
| | | </if> |
| | | <if test="query.day!=null and query.day!= '' and query.day==2" > |
| | | and DATE(t1.appointmentTime) = DATE_ADD(CURDATE(), INTERVAL 1 DAY) |
| | | </if> |
| | | <if test="query.day!=null and query.day!= '' and query.day==7" > |
| | | AND DATE(t1.appointmentTime) BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 7 DAY) |
| | | </if> |
| | | <if test="query.ids != null and query.ids.size()>0"> |
| | | AND t1.storeId IN |
| | | <foreach collection="query.ids" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | |
| | | <?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.PointsMerchandiseMapper"> |
| | | <insert id="saveCity"> |
| | | insert into t_points_merchandise_city (id,pointsMerchandiseId,city,cityCode,province,provinceCode) value (null ,#{id},#{city},#{cityCode},#{province},#{provinceCode}) |
| | | </insert> |
| | | |
| | | |
| | | <select id="queryGoodsListOfSearch" resultType="java.util.Map"> |
| | |
| | | |
| | | |
| | | import cn.mb.cloud.common.data.controller.BaseController; |
| | | 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.entity.TCourse; |
| | | import com.dsh.course.entity.TCoursePackagePayment; |
| | | import com.dsh.course.entity.TCoursePackageType; |
| | | import com.dsh.course.feignclient.model.ExerciseVideo; |
| | | import com.dsh.course.model.*; |
| | | import com.dsh.course.model.dto.CourseChangeStateDTO; |
| | |
| | | import com.dsh.course.service.TCoursePackageService; |
| | | import com.dsh.course.service.TCoursePackageTypeService; |
| | | import com.dsh.course.service.TCourseService; |
| | | import com.dsh.course.service.*; |
| | | import com.dsh.course.util.PageFactory; |
| | | import com.dsh.course.util.PayMoneyUtil; |
| | | import com.dsh.course.util.ResultUtil; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.PrintWriter; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | @Autowired |
| | | private TCoursePackagePaymentService coursePackagePaymentService; |
| | | |
| | | @Autowired |
| | | private TCoursePackageDiscountService discountService; |
| | | /** |
| | | * 上/下架 1为上架 2为下架 3为删除 |
| | | * |
| | |
| | | @RequestMapping("/base/course/changeState") |
| | | @ResponseBody |
| | | public Object changeState(@RequestBody CourseChangeStateDTO dto){ |
| | | |
| | | |
| | | |
| | | |
| | | return courseService.changeState(dto); |
| | | } |
| | |
| | | @PostMapping("/course/queryCourseByType") |
| | | public List<TCourse> queryCourseByType(@RequestBody Integer type){ |
| | | return courseService.list(new QueryWrapper<TCourse>().eq("type", type).eq("state", 1)); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/course/queryDiscountList") |
| | | public List<DiscountList> queryDiscountList(@RequestBody QueryDiscountList queryDiscountList){ |
| | | return discountService.queryDiscountList(queryDiscountList); |
| | | } |
| | | @PostMapping("/course/queryDiscountListAudit") |
| | | public List<DiscountList> queryDiscountListAudit(@RequestBody QueryDiscountList queryDiscountList){ |
| | | return discountService.queryDiscountListAudit(queryDiscountList); |
| | | } |
| | | |
| | | @PostMapping("/course/updateState") |
| | | public Boolean updateState( @RequestBody DiscountUpdateState discountUpdateState){ |
| | | TCoursePackageDiscount byId = discountService.getById(discountUpdateState.getId()); |
| | | List<TCoursePackageDiscount> list = discountService.list(new LambdaQueryWrapper<TCoursePackageDiscount>().eq(TCoursePackageDiscount::getCoursePackageId, byId.getCoursePackageId())); |
| | | list.forEach(e->e.setStatus(discountUpdateState.getStatus())); |
| | | return discountService.updateBatchById(list); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/course/auditDiscount") |
| | | public Boolean auditDiscount( @RequestBody AuditDiscount auditDiscount){ |
| | | TCoursePackageDiscount byId = discountService.getById(auditDiscount.getId()); |
| | | List<TCoursePackageDiscount> list = discountService.list(new LambdaQueryWrapper<TCoursePackageDiscount>().eq(TCoursePackageDiscount::getCoursePackageId, byId.getCoursePackageId())); |
| | | for (TCoursePackageDiscount tCoursePackageDiscount : list) { |
| | | tCoursePackageDiscount.setAuditStatus(auditDiscount.getType()); |
| | | tCoursePackageDiscount.setAuditRemark(auditDiscount.getText()); |
| | | } |
| | | |
| | | return discountService.updateBatchById(list); |
| | | } |
| | | |
| | | @PostMapping("/course/queryByDiscountId") |
| | | public TCoursePackage queryByDiscountId(@RequestBody Integer id){ |
| | | TCoursePackageDiscount byId = discountService.getById(id); |
| | | TCoursePackage byId1 = coursePackageService.getById(byId.getCoursePackageId()); |
| | | return byId1; |
| | | } |
| | | |
| | | @PostMapping("/course/queryDiscountById") |
| | | public Integer queryDiscountById(@RequestBody Integer id){ |
| | | TCoursePackageDiscount byId = discountService.getById(id); |
| | | return byId.getAuditStatus(); |
| | | } |
| | | |
| | | |
| | | |
| | | @PostMapping("/course/getPageageType") |
| | | public List<Map<String, Object>> getPageageType(){ |
| | | List<TCoursePackageType> list = coursePackageTypeService.list(new LambdaQueryWrapper<TCoursePackageType>().eq(TCoursePackageType::getState, 1)); |
| | | ArrayList<Map<String, Object>> objects = new ArrayList<>(); |
| | | for (TCoursePackageType tCoursePackageType : list) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("id",tCoursePackageType.getId()); |
| | | map.put("name",tCoursePackageType.getName()); |
| | | objects.add(map); |
| | | } |
| | | return objects; |
| | | } |
| | | |
| | | |
| | | @PostMapping("/course/queryByTypeId") |
| | | public List<TCoursePackage> queryByTypeId(@RequestBody Integer oneId){ |
| | | return coursePackageService.list(new LambdaQueryWrapper<TCoursePackage>().eq(TCoursePackage::getCoursePackageTypeId,oneId).eq(TCoursePackage::getAuditStatus,2).eq(TCoursePackage::getState,1)); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/course/queryByConfigId") |
| | | public List<Map<String, Object>> queryByConfigId(@RequestBody Integer oneId){ |
| | | return coursePackageService.queryByConfigId(oneId); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/course/queryPackageById") |
| | | public List<String> queryPackageById(@RequestBody Integer coursePackageId){ |
| | | ArrayList<String> strings = new ArrayList<>(); |
| | | TCoursePackage byId = coursePackageService.getById(coursePackageId); |
| | | Integer coursePackageTypeId = byId.getCoursePackageTypeId(); |
| | | strings.add(coursePackageTypeService.getById(coursePackageTypeId).getName()); |
| | | strings.add(byId.getName()); |
| | | |
| | | return strings; |
| | | |
| | | } |
| | | |
| | | @PostMapping("/course/getHours") |
| | | public String getHours(@RequestBody Integer coursePackageId1){ |
| | | return coursePackageService.getHours(coursePackageId1); |
| | | } |
| | | } |
| | |
| | | return coursePackageDiscountService.list(new QueryWrapper<TCoursePackageDiscount>().eq("coursePackagePaymentConfigId", coursePackagePaymentConfigId) |
| | | .eq("auditStatus", 2)); |
| | | } |
| | | @PostMapping("/coursePackageDiscount/queryCoursePackageDiscountOne") |
| | | public List<TCoursePackageDiscount> queryCoursePackageDiscountOne(@RequestBody Integer id){ |
| | | return coursePackageDiscountService.list(new QueryWrapper<TCoursePackageDiscount>().eq("coursePackagePaymentConfigId", id) |
| | | .ne("auditStatus", 2)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 编辑课包折扣 |
| | |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | |
| | | } |
| | |
| | | package com.dsh.course.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.entity.TCoursePackageDiscount; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.course.model.DiscountList; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TCoursePackageDiscountMapper extends BaseMapper<TCoursePackageDiscount> { |
| | | |
| | | List<DiscountList> queryDiscountList(@Param("discountListPage") Page<DiscountList> discountListPage, @Param("pCode") String pCode, @Param("cCode") String cCode, @Param("name") String name, @Param("type") Integer type, @Param("ids") List<Integer> ids); |
| | | |
| | | List<DiscountList> queryDiscountListAudit(@Param("discountListPage") Page<DiscountList> discountListPage, @Param("pCode") String pCode, @Param("cCode") String cCode, @Param("name") String name, @Param("type") Integer type, @Param("ids") List<Integer> ids); |
| | | } |
| | |
| | | */ |
| | | List<Map<String, Object>> queryExamineCoursePackageLists(Page<Map<String, Object>> page, @Param("item") QueryExamineCoursePackageLists queryExamineCoursePackageLists); |
| | | |
| | | List<Map<String, Object>> queryByConfigId(@Param("oneId") Integer oneId); |
| | | |
| | | String getHours(@Param("coursePackageId") Integer coursePackageId); |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.course.entity.TCoursePackageDiscount; |
| | | import com.dsh.course.model.DiscountList; |
| | | import com.dsh.course.model.QueryDiscountList; |
| | | import com.dsh.course.model.vo.response.Details; |
| | | import com.dsh.course.model.vo.response.ExchangeCoursePackageResponse; |
| | | |
| | |
| | | |
| | | ExchangeCoursePackageResponse getWeekFreeCourseDetails(Integer coursePackageDiscountId,String lat,String lon); |
| | | |
| | | |
| | | List<DiscountList> queryDiscountList(QueryDiscountList queryDiscountList); |
| | | |
| | | |
| | | List<DiscountList> queryDiscountListAudit(QueryDiscountList queryDiscountList); |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> queryExamineCoursePackageLists(Page<Map<String, Object>> page, QueryExamineCoursePackageLists queryExamineCoursePackageLists); |
| | | |
| | | List<Map<String, Object>> queryByConfigId(Integer oneId); |
| | | |
| | | String getHours(Integer coursePackageId); |
| | | |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | 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.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.course.entity.CoursePackagePaymentConfig; |
| | | import com.dsh.course.entity.TCoursePackage; |
| | |
| | | import com.dsh.course.mapper.TCoursePackageDiscountMapper; |
| | | import com.dsh.course.mapper.TCoursePackageMapper; |
| | | import com.dsh.course.mapper.TCoursePackagePaymentMapper; |
| | | import com.dsh.course.model.DiscountList; |
| | | import com.dsh.course.model.QueryDiscountList; |
| | | import com.dsh.course.model.vo.response.Details; |
| | | import com.dsh.course.model.vo.response.ExchangeCoursePackageResponse; |
| | | import com.dsh.course.service.TCoursePackageDiscountService; |
| | |
| | | return packageResponse; |
| | | } |
| | | |
| | | @Override |
| | | public List<DiscountList> queryDiscountList(QueryDiscountList queryDiscountList) { |
| | | Page<DiscountList> discountListPage = new Page<>(queryDiscountList.getOffset(), queryDiscountList.getLimit()); |
| | | List<DiscountList> discountLists = this.baseMapper.queryDiscountList(discountListPage, queryDiscountList.getPCode(), queryDiscountList.getCCode(), queryDiscountList.getName(), queryDiscountList.getType(), queryDiscountList.getIds()); |
| | | for (DiscountList discountList : discountLists) { |
| | | List<TCoursePackageDiscount> tCoursePackageDiscounts = this.baseMapper.selectList(new LambdaQueryWrapper<TCoursePackageDiscount>().eq(TCoursePackageDiscount::getCoursePackageId, discountList.getCourseId()).eq(TCoursePackageDiscount::getAuditStatus,2).orderByAsc(TCoursePackageDiscount::getType)); |
| | | long count = tCoursePackageDiscounts.stream().filter(e -> e.getStatus().equals(2)).count(); |
| | | if(count>0){ |
| | | discountList.setStatus(2); |
| | | }else { |
| | | discountList.setStatus(1); |
| | | } |
| | | String type=""; |
| | | for (int i = 0; i < tCoursePackageDiscounts.size(); i++) { |
| | | if(tCoursePackageDiscounts.get(i).getType()==1){ |
| | | type += "会员折扣、"; |
| | | }else if(tCoursePackageDiscounts.get(i).getType()==3){ |
| | | type += "限时折扣、"; |
| | | }else if(tCoursePackageDiscounts.get(i).getType()==4){ |
| | | type += "赠送课时、"; |
| | | } |
| | | } |
| | | if(type.length()>0){ |
| | | type = type.substring(0,type.length()-1); |
| | | } |
| | | discountList.setType(type); |
| | | } |
| | | return discountLists; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | String a ="1312dsad132"; |
| | | a = a.substring(0,a.length()-1); |
| | | System.out.println(a); |
| | | } |
| | | @Override |
| | | public List<DiscountList> queryDiscountListAudit(QueryDiscountList queryDiscountList) { |
| | | Page<DiscountList> discountListPage = new Page<>(queryDiscountList.getOffset(), queryDiscountList.getLimit()); |
| | | List<DiscountList> discountLists = this.baseMapper.queryDiscountListAudit(discountListPage, queryDiscountList.getPCode(), queryDiscountList.getCCode(), queryDiscountList.getName(), queryDiscountList.getType(), queryDiscountList.getIds()); |
| | | for (DiscountList discountList : discountLists) { |
| | | List<TCoursePackageDiscount> tCoursePackageDiscounts = this.baseMapper.selectList(new LambdaQueryWrapper<TCoursePackageDiscount>().eq(TCoursePackageDiscount::getCoursePackageId, discountList.getCourseId()).ne(TCoursePackageDiscount::getAuditStatus,2).orderByAsc(TCoursePackageDiscount::getType)); |
| | | long count = tCoursePackageDiscounts.stream().filter(e -> e.getAuditStatus().equals(2)).count(); |
| | | if(count>0){ |
| | | discountList.setStatus(2); |
| | | }else { |
| | | discountList.setStatus(1); |
| | | } |
| | | String type=""; |
| | | for (int i = 0; i < tCoursePackageDiscounts.size(); i++) { |
| | | if(tCoursePackageDiscounts.get(i).getType()==1){ |
| | | type += "会员折扣、"; |
| | | }else if(tCoursePackageDiscounts.get(i).getType()==3){ |
| | | type += "限时折扣、"; |
| | | }else if(tCoursePackageDiscounts.get(i).getType()==4){ |
| | | type += "赠送课时、"; |
| | | } |
| | | } |
| | | if(type.length()>0){ |
| | | type = type.substring(0,type.length()-1); |
| | | } |
| | | discountList.setType(type); |
| | | } |
| | | return discountLists; |
| | | } |
| | | |
| | | |
| | | private static boolean isDateWithinRange(Date date, Date startTime, Date endTime) { |
| | |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> queryByConfigId(Integer oneId) { |
| | | return this.baseMapper.queryByConfigId(oneId); |
| | | } |
| | | |
| | | @Override |
| | | public String getHours(Integer coursePackageId) { |
| | | return this.baseMapper.getHours(coursePackageId); |
| | | } |
| | | } |
| | |
| | | <result column="auditRemark" property="auditRemark" /> |
| | | <result column="insertTime" property="insertTime" /> |
| | | </resultMap> |
| | | <select id="queryDiscountList" resultType="com.dsh.course.model.DiscountList"> |
| | | select t1.id,t1.type,t1.status,t2.province pName,t2.city cName,t2.name,t2.storeId,t2.id courseId from t_course_package_discount t1 left join t_course_package t2 on t1.coursePackageId = t2.id |
| | | where t2.storeId in <foreach collection="ids" close=")" item="id" open="(" separator=","> |
| | | #{id} and t1.auditStatus =2 |
| | | </foreach> |
| | | <if test="pCode !=null and pCode !=''"> |
| | | and t2.provinceCode =#{pCode} |
| | | </if> |
| | | <if test="cCode !=null and cCode !=''"> |
| | | and t2.cityCode =#{cCode} |
| | | </if> |
| | | <if test="name !=null and name !=''"> |
| | | and t2.name like concat("%",#{name},"%") |
| | | </if> |
| | | <if test="type !=null "> |
| | | and t1.type =#{type} |
| | | </if> |
| | | group by t1.coursePackageId |
| | | </select> |
| | | <select id="queryDiscountListAudit" resultType="com.dsh.course.model.DiscountList"> |
| | | select t1.id,t1.type,t1.auditStatus status,t2.province pName,t2.city cName,t2.name,t2.storeId,t2.id courseId from t_course_package_discount t1 left join t_course_package t2 on t1.coursePackageId = t2.id |
| | | where t2.storeId in <foreach collection="ids" close=")" item="id" open="(" separator=","> |
| | | #{id} and t1.auditStatus !=2 |
| | | </foreach> |
| | | <if test="pCode !=null and pCode !=''"> |
| | | and t2.provinceCode =#{pCode} |
| | | </if> |
| | | <if test="cCode !=null and cCode !=''"> |
| | | and t2.cityCode =#{cCode} |
| | | </if> |
| | | <if test="name !=null and name !=''"> |
| | | and t2.name like concat("%",#{name},"%") |
| | | </if> |
| | | <if test="type !=null "> |
| | | and t1.type =#{type} |
| | | </if> |
| | | group by t1.coursePackageId |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </if> |
| | | order by a.insertTime desc |
| | | </select> |
| | | <select id="queryByConfigId" resultType="java.util.Map"> |
| | | select id,classHours from t_course_package_payment_config where coursePackageId =#{oneId} |
| | | </select> |
| | | <select id="getHours" resultType="java.lang.String"> |
| | | select classHours from t_course_package_payment_config where id =#{coursePackageId} |
| | | </select> |
| | | </mapper> |
| | |
| | | package com.dsh.course.feignClient.account; |
| | | |
| | | import com.dsh.course.feignClient.account.model.QueryAppUser; |
| | | import com.dsh.course.feignClient.account.model.QueryAppUserVO; |
| | | import com.dsh.course.feignClient.account.model.QueryByNamePhone; |
| | | import com.dsh.course.feignClient.account.model.TAppUser; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | @PostMapping("/base/appUser/queryById") |
| | | TAppUser queryById(Integer appUserId); |
| | | |
| | | /** |
| | | * 获取用户信息列表数据 |
| | | */ |
| | | @RequestMapping("/base/appUser/listAll") |
| | | List<QueryAppUserVO> listAll(@RequestBody QueryAppUser query); |
| | | /** |
| | | * 新增用户信息 |
| | | */ |
| | | @RequestMapping("/base/appUser/addAppUser") |
| | | Object addAppUser(@RequestBody TAppUser query); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.account.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 用户信息查询Query |
| | | */ |
| | | @Data |
| | | public class QueryAppUser { |
| | | private String province; |
| | | private String city; |
| | | private String name; |
| | | private String phone; |
| | | private Integer isVip; |
| | | private Integer state; |
| | | private String salesmanUserName; |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.account.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 lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 用户信息列表VO |
| | | */ |
| | | @Data |
| | | public class QueryAppUserVO { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Integer id; |
| | | /** |
| | | * 编号 |
| | | */ |
| | | private String code; |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 电话 |
| | | */ |
| | | private String phone; |
| | | /** |
| | | * 密码 |
| | | */ |
| | | private String password; |
| | | /** |
| | | * 生日 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date birthday; |
| | | /** |
| | | * 性别(1=男,2=女) |
| | | */ |
| | | private Integer gender; |
| | | /** |
| | | * 身高 |
| | | */ |
| | | private Double height; |
| | | /** |
| | | * 体重 |
| | | */ |
| | | private Double weight; |
| | | /** |
| | | * bmi健康值 |
| | | */ |
| | | private Double bmi; |
| | | /** |
| | | * 身份证号 |
| | | */ |
| | | private String idCard; |
| | | /** |
| | | * 微信openid |
| | | */ |
| | | private String openid; |
| | | /** |
| | | * 省 |
| | | */ |
| | | private String province; |
| | | /** |
| | | * 省编号 |
| | | */ |
| | | private String provinceCode; |
| | | /** |
| | | * 市 |
| | | */ |
| | | private String city; |
| | | /** |
| | | * 市编号 |
| | | */ |
| | | private String cityCode; |
| | | /** |
| | | * 是否是年度会员(0=否,1=是) |
| | | */ |
| | | private Integer isVip; |
| | | /** |
| | | * 会员有效期 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date vipEndTime; |
| | | /** |
| | | * 会员等级id |
| | | */ |
| | | private Integer viplevelId; |
| | | /** |
| | | * 推荐用户id |
| | | */ |
| | | private Integer referralUserId; |
| | | /** |
| | | * 销售员id |
| | | */ |
| | | private Integer salesmanUserId; |
| | | |
| | | private String salesmanUserName; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | private Integer state; |
| | | /** |
| | | * 剩余积分 |
| | | */ |
| | | private Integer integral; |
| | | /** |
| | | * 玩湃币 |
| | | */ |
| | | private Integer playPaiCoins; |
| | | /** |
| | | * 用户头像 |
| | | */ |
| | | private String headImg; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | |
| | | |
| | | } |
| | |
| | | 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 com.dsh.course.feignClient.activity.model.PointsMerchandise; |
| | | import com.dsh.guns.modular.system.model.GoodsInfoOneVo; |
| | | import com.dsh.guns.modular.system.model.StoreVos; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | @PostMapping("/base/pointMerchars/queryUserPayedGoodsList") |
| | | List<Map<String, Object>> queryUserPayedGoodsList(@RequestBody PointMercharsPayedVo pointMercharsPayedVo); |
| | | |
| | | @PostMapping("/base/pointMerchars/add") |
| | | Integer add(PointsMerchandise pointsMerchandise); |
| | | |
| | | @PostMapping("/base/pointMerchars/addOther") |
| | | Boolean addOther(@RequestBody String pam); |
| | | |
| | | @PostMapping("/base/pointMerchars/addCitys") |
| | | Boolean addCitys(@RequestBody List<Map<String, String>> objects); |
| | | |
| | | @PostMapping("/base/pointMerchars/queryPointMerchaseById") |
| | | PointsMerchandise queryPointMerchaseById(Integer id); |
| | | |
| | | |
| | | @PostMapping("/base/pointMerchars/getshopName") |
| | | Integer getshopName(Integer id); |
| | | |
| | | @PostMapping("/base/pointMerchars/writeOffGoodsStatus") |
| | | boolean writeOffGoodsStatus(@RequestBody Map<String, Object> map); |
| | | |
| | | @PostMapping("/base/pointMerchars/updateGoodsDetail") |
| | | boolean updateGoodsDetail(@RequestBody Map<String, Object> stringObjectHashMap); |
| | | |
| | | |
| | | @PostMapping("/base/pointMerchars/queryDetailsOfGoods") |
| | | GoodsInfoOneVo queryDetailsOfGoods(@RequestBody Integer id); |
| | | |
| | | |
| | | @PostMapping("/base/pointMerchars/getStoreList") |
| | | List<StoreVos> getStoreList(@RequestBody Integer id); |
| | | |
| | | @PostMapping("/base/pointMerchars/getProvinces") |
| | | List<StoreVos> getProvinces(@RequestBody Integer id); |
| | | |
| | | } |
| | |
| | | */ |
| | | Integer quantityIssued; |
| | | /** |
| | | * 已领数量 |
| | | */ |
| | | Integer quantityHas; |
| | | /** |
| | | * 限领数量 |
| | | */ |
| | | Integer pickUpQuantity; |
| | |
| | | package com.dsh.course.feignClient.activity.model; |
| | | |
| | | import io.swagger.models.auth.In; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 接收查询参数VO |
| | |
| | | private Integer state; |
| | | // 1=今日内预约 2=明日预约 7=七日内 |
| | | private Integer day; |
| | | // 门店id集合 |
| | | private List<Integer> ids; |
| | | } |
| | |
| | | package com.dsh.course.feignClient.course; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.course.model.*; |
| | | import com.dsh.course.feignClient.course.model.CourseChangeStateDTO; |
| | | import com.dsh.course.feignClient.course.model.QueryCourseList; |
| | | import com.dsh.course.feignClient.course.model.*; |
| | | import com.dsh.guns.modular.system.model.EditCourseState; |
| | | import com.dsh.guns.modular.system.model.TCourse; |
| | | import com.dsh.guns.modular.system.model.TQueryBenefitsVideosDTO; |
| | | import com.dsh.guns.modular.system.model.TQueryBenefitsVideosVO; |
| | | import com.dsh.guns.modular.system.model.TQueryBenefitsVideosVO; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | |
| | | */ |
| | | @PostMapping("/course/queryCourseByType") |
| | | List<TCourse> queryCourseByType(Integer type); |
| | | |
| | | |
| | | @PostMapping("/course/queryDiscountList") |
| | | List<DiscountList> queryDiscountList(QueryDiscountList queryDiscountList); |
| | | |
| | | @PostMapping("/course/updateState") |
| | | Boolean updateState(DiscountUpdateState discountUpdateState); |
| | | |
| | | @PostMapping("/course/queryDiscountListAudit") |
| | | List<DiscountList> queryDiscountListAudit(QueryDiscountList queryDiscountList); |
| | | |
| | | @PostMapping("/course/auditDiscount") |
| | | Boolean auditDiscount(AuditDiscount auditDiscount); |
| | | |
| | | @PostMapping("/course/queryByDiscountId") |
| | | TCoursePackage queryByDiscountId(Integer id); |
| | | @PostMapping("/course/queryDiscountById") |
| | | Integer queryDiscountById(Integer id); |
| | | |
| | | @PostMapping("/course/getPageageType") |
| | | List<Map<String, Object>> getPageageType(); |
| | | |
| | | @PostMapping("/course/queryByTypeId") |
| | | List<TCoursePackage> queryByTypeId(Integer oneId); |
| | | |
| | | @PostMapping("/course/queryByConfigId") |
| | | List<Map<String, Object>> queryByConfigId(Integer oneId); |
| | | |
| | | @PostMapping("/course/queryPackageById") |
| | | List<String> queryPackageById(Integer coursePackageId); |
| | | |
| | | @PostMapping("/course/getHours") |
| | | String getHours(Integer coursePackageId1); |
| | | |
| | | } |
| | |
| | | * 配置课包折扣数据 |
| | | * @param list |
| | | */ |
| | | |
| | | @PostMapping("/coursePackageDiscount/setCoursePackageDiscount") |
| | | void setCoursePackageDiscount(List<TCoursePackageDiscount> list); |
| | | |
| | | @PostMapping("/coursePackageDiscount/queryCoursePackageDiscountOne") |
| | | List<TCoursePackageDiscount> queryCoursePackageDiscountOne(Integer id); |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.other; |
| | | |
| | | import com.dsh.course.feignClient.other.model.Site; |
| | | import com.dsh.guns.modular.system.model.Store; |
| | | import com.dsh.guns.modular.system.model.StoredValueConfig; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 储值管理 |
| | | */ |
| | | @FeignClient(value = "mb-cloud-other") |
| | | public interface StoreValueConfigClient { |
| | | |
| | | /** |
| | | * 添加储值规则 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/base/storeValueConfig/addStoreValueConfig") |
| | | Object addStoreValueConfig(@RequestBody StoredValueConfig storedValueConfig); |
| | | |
| | | /** |
| | | * 获取储值规则 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/base/storeValueConfig/getStoreValueConfig") |
| | | StoredValueConfig getStoreValueConfig(); |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.course.feignClient.account.AppUserClient; |
| | | import com.dsh.course.feignClient.account.CityManagerClient; |
| | | import com.dsh.course.feignClient.account.StoreStaffClient; |
| | | import com.dsh.course.feignClient.account.model.*; |
| | | import com.dsh.course.feignClient.activity.BodySideAppointmentClient; |
| | | import com.dsh.course.feignClient.activity.model.BodySideAppointment; |
| | | import com.dsh.course.feignClient.activity.model.QueryBodySideAppointment; |
| | | import com.dsh.course.feignClient.activity.model.QueryBodySideAppointmentVO; |
| | | import com.dsh.course.feignClient.other.StoreClient; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.modular.system.model.Store; |
| | | import com.dsh.guns.modular.system.model.TCity; |
| | | import com.dsh.guns.modular.system.model.TSiteType; |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | 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.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 用户管理控制器 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/appUser") |
| | | public class TAppUserController { |
| | | private String PREFIX = "/system/appUser/"; |
| | | @Autowired |
| | | private StoreClient storeClient; |
| | | @Autowired |
| | | private BodySideAppointmentClient bodySideAppointmentClient; |
| | | @Autowired |
| | | private CityManagerClient cityManagerClient; |
| | | @Autowired |
| | | private StoreStaffClient storeStaffClient; |
| | | @Autowired |
| | | private AppUserClient appUserClient; |
| | | @Autowired |
| | | private ICityService cityService; |
| | | /** |
| | | * 跳转体测预约管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | Integer roleType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | model.addAttribute("roleType",roleType); |
| | | model.addAttribute("objectId",objectId); |
| | | List<CityManager> province = cityManagerClient.listAll(); |
| | | // 已有城市管理的省 |
| | | ArrayList<String> list1 = new ArrayList<>(); |
| | | // 已有城市管理的市 |
| | | ArrayList<String> list2 = new ArrayList<>(); |
| | | for (CityManager cityManager : province) { |
| | | list1.add(cityManager.getProvince()); |
| | | list2.add(cityManager.getCity()); |
| | | } |
| | | HashSet<String> set = new HashSet<String>(list1); |
| | | model.addAttribute("list",set); |
| | | return PREFIX + "TAppUser.html"; |
| | | } |
| | | /** |
| | | * 跳转用户信息管理添加页面 |
| | | */ |
| | | @RequestMapping("/add") |
| | | public String add(Model model) { |
| | | Integer roleType = UserExt.getUser().getObjectType(); |
| | | List<CityManager> province = cityManagerClient.listAll(); |
| | | Set<String> seenNames = new HashSet<>(); |
| | | List<CityManager> result = new ArrayList<>(); |
| | | for (CityManager cityManager : province) { |
| | | if(!seenNames.contains(cityManager.getProvince())){ |
| | | result.add(cityManager); |
| | | seenNames.add(cityManager.getProvince()); |
| | | } |
| | | } |
| | | if (roleType == 2){ |
| | | Integer cityManagerId = UserExt.getUser().getObjectId(); |
| | | CityManager cityManager = cityManagerClient.queryCityManagerById(cityManagerId); |
| | | List<Store> stores = storeClient.getStoreByCityManagerId(cityManagerId); |
| | | model.addAttribute("stores",stores); |
| | | } |
| | | model.addAttribute("list",result); |
| | | |
| | | model.addAttribute("roleType",roleType); |
| | | return PREFIX + "TAppUser_add.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转体测预约管理添加页面 |
| | | */ |
| | | @RequestMapping("/addStudent") |
| | | public String addStudent(Model model) { |
| | | Integer roleType = UserExt.getUser().getObjectType(); |
| | | List<CityManager> province = cityManagerClient.listAll(); |
| | | Set<String> seenNames = new HashSet<>(); |
| | | List<CityManager> result = new ArrayList<>(); |
| | | for (CityManager cityManager : province) { |
| | | if(!seenNames.contains(cityManager.getProvince())){ |
| | | result.add(cityManager); |
| | | seenNames.add(cityManager.getProvince()); |
| | | } |
| | | } |
| | | if (roleType == 2){ |
| | | Integer cityManagerId = UserExt.getUser().getObjectId(); |
| | | CityManager cityManager = cityManagerClient.queryCityManagerById(cityManagerId); |
| | | List<Store> stores = storeClient.getStoreByCityManagerId(cityManagerId); |
| | | model.addAttribute("stores",stores); |
| | | } |
| | | model.addAttribute("list",result); |
| | | |
| | | model.addAttribute("roleType",roleType); |
| | | return PREFIX + "TAppUser_addStudent.html"; |
| | | } |
| | | /** |
| | | * 跳转体测预约管理编辑页面 |
| | | * @param type 1 = 用户管理编辑 2 = 用户管理详情-非会员 3 = 用户管理详情-会员 |
| | | */ |
| | | @RequestMapping("/update/{id}/{type}") |
| | | public String update(Model model,@PathVariable("id") Integer id,@PathVariable("type") Integer type) { |
| | | Integer roleType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | BodySideAppointment data = bodySideAppointmentClient.getInfoById(id); |
| | | if (roleType == 1){ |
| | | List<CityManager> cityManagers = cityManagerClient.listAll(); |
| | | List<CityManager> province = new ArrayList<>(); |
| | | List<CityManager> city = new ArrayList<>(); |
| | | Set<String> seenNames = new HashSet<>(); |
| | | Set<String> c = new HashSet<>(); |
| | | // 省列表 |
| | | List<CityManager> result = new ArrayList<>(); |
| | | // 市列表 |
| | | List<CityManager> cities = new ArrayList<>(); |
| | | // 对省/市去重 |
| | | for (CityManager cityManager : cityManagers) { |
| | | if(!seenNames.contains(cityManager.getProvince())){ |
| | | result.add(cityManager); |
| | | seenNames.add(cityManager.getProvince()); |
| | | } |
| | | if(!c.contains(cityManager.getProvince())){ |
| | | cities.add(cityManager); |
| | | c.add(cityManager.getProvince()); |
| | | } |
| | | } |
| | | List<Store> stores = storeClient.getStore(data.getCity()); |
| | | model.addAttribute("stores",stores); |
| | | model.addAttribute("list",result); |
| | | model.addAttribute("cities",cities); |
| | | }else if (roleType == 2){ |
| | | List<Store> stores = storeClient.getStoreByCityManagerId(objectId); |
| | | model.addAttribute("stores",stores); |
| | | } |
| | | String birthday = new SimpleDateFormat("yyyy-MM-dd").format(data.getBirthday()); |
| | | String appointmentTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(data.getAppointmentTime()); |
| | | model.addAttribute("birthday",birthday); |
| | | model.addAttribute("appointmentTime",appointmentTime); |
| | | model.addAttribute("data",data); |
| | | model.addAttribute("roleType",roleType); |
| | | return PREFIX + "TAppUser_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取所有用户信息 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/listAll") |
| | | @ResponseBody |
| | | public List<QueryAppUserVO> listAll(String province, String city,String name, |
| | | String phone,Integer isVip, String salesmanUserName){ |
| | | QueryAppUser queryAppUser = new QueryAppUser(); |
| | | queryAppUser.setProvince(province); |
| | | queryAppUser.setCity(city); |
| | | queryAppUser.setName(name); |
| | | queryAppUser.setPhone(phone); |
| | | queryAppUser.setIsVip(isVip); |
| | | queryAppUser.setSalesmanUserName(salesmanUserName); |
| | | return appUserClient.listAll(queryAppUser); |
| | | } |
| | | |
| | | /** |
| | | * 新增用户信息 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/addAppUser") |
| | | @ResponseBody |
| | | public ResultUtil addAppUser(TAppUser appUser){ |
| | | appUserClient.addAppUser(appUser); |
| | | return ResultUtil.success("添加成功"); |
| | | } |
| | | /** |
| | | * 添加/修改体测预约记录 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/addBodySideAppointments") |
| | | public ResultUtil addBodySideAppointments(@RequestBody QueryBodySideAppointmentVO vo) { |
| | | Integer roleType = UserExt.getUser().getObjectType(); |
| | | // 获取当前登录人id |
| | | Integer cityManagerId = UserExt.getUser().getObjectId(); |
| | | if (roleType == 2){ |
| | | CityManager cityManager = cityManagerClient.queryCityManagerById(cityManagerId); |
| | | vo.setProvince(cityManager.getProvince()); |
| | | vo.setProvinceCode(cityManager.getProvinceCode()); |
| | | vo.setCity(cityManager.getCity()); |
| | | vo.setCityCode(cityManager.getCityCode()); |
| | | }else if (roleType == 3){ |
| | | TStoreStaff storeByStoreStaffId = storeStaffClient.getStoreByStoreStaffId(cityManagerId); |
| | | Store storeById = storeClient.getStoreById(storeByStoreStaffId.getStoreId()); |
| | | vo.setProvince(storeById.getProvince()); |
| | | vo.setProvinceCode(storeById.getProvinceCode()); |
| | | vo.setCity(storeById.getCity()); |
| | | vo.setCityCode(storeById.getCityCode()); |
| | | } |
| | | bodySideAppointmentClient.addBodySideAppointments(vo); |
| | | return ResultUtil.success("添加成功"); |
| | | } |
| | | |
| | | /** |
| | | * 添加/修改体测预约记录 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/getInfoById") |
| | | public BodySideAppointment getInfoById(@RequestBody Integer id) { |
| | | return bodySideAppointmentClient.getInfoById(id); |
| | | } |
| | | |
| | | /** |
| | | * 手动标记用户已经到店并完成体测 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/changeState") |
| | | public Object changeState(@RequestBody List<Integer> ids) { |
| | | return bodySideAppointmentClient.changeState(ids); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | import com.dsh.course.feignClient.account.CityManagerClient; |
| | | import com.dsh.course.feignClient.account.StoreStaffClient; |
| | | import com.dsh.course.feignClient.account.model.CityManager; |
| | | import com.dsh.course.feignClient.account.model.Coach; |
| | | import com.dsh.course.feignClient.account.model.TStoreStaff; |
| | | import com.dsh.course.feignClient.activity.BodySideAppointmentClient; |
| | | import com.dsh.course.feignClient.activity.model.BodySideAppointment; |
| | | import com.dsh.course.feignClient.activity.model.QueryBodySideAppointment; |
| | |
| | | import com.dsh.course.feignClient.other.StoreClient; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.modular.system.model.CoachQuery; |
| | | import com.dsh.guns.modular.system.model.Store; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 体测预约管理控制器 |
| | |
| | | private BodySideAppointmentClient bodySideAppointmentClient; |
| | | @Autowired |
| | | private CityManagerClient cityManagerClient; |
| | | @Autowired |
| | | private StoreStaffClient storeStaffClient; |
| | | /** |
| | | * 跳转体测预约管理首页 |
| | | */ |
| | |
| | | */ |
| | | @RequestMapping("/add") |
| | | public String add(Model model) { |
| | | Integer roleType = UserExt.getUser().getObjectType(); |
| | | List<CityManager> province = cityManagerClient.listAll(); |
| | | Set<String> seenNames = new HashSet<>(); |
| | | List<CityManager> result = new ArrayList<>(); |
| | |
| | | seenNames.add(cityManager.getProvince()); |
| | | } |
| | | } |
| | | if (roleType == 2){ |
| | | Integer cityManagerId = UserExt.getUser().getObjectId(); |
| | | CityManager cityManager = cityManagerClient.queryCityManagerById(cityManagerId); |
| | | List<Store> stores = storeClient.getStoreByCityManagerId(cityManagerId); |
| | | model.addAttribute("stores",stores); |
| | | } |
| | | model.addAttribute("list",result); |
| | | |
| | | model.addAttribute("roleType",roleType); |
| | | return PREFIX + "TBodySideAppointment_add.html"; |
| | | } |
| | | /** |
| | | * 跳转体测预约管理编辑页面 |
| | | */ |
| | | @RequestMapping("/update") |
| | | public String update(Model model) { |
| | | @RequestMapping("/update/{id}") |
| | | public String update(Model model,@PathVariable("id") Integer id) { |
| | | Integer roleType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | BodySideAppointment data = bodySideAppointmentClient.getInfoById(id); |
| | | if (roleType == 1){ |
| | | List<CityManager> cityManagers = cityManagerClient.listAll(); |
| | | List<CityManager> province = new ArrayList<>(); |
| | | List<CityManager> city = new ArrayList<>(); |
| | | Set<String> seenNames = new HashSet<>(); |
| | | Set<String> c = new HashSet<>(); |
| | | // 省列表 |
| | | List<CityManager> result = new ArrayList<>(); |
| | | // 市列表 |
| | | List<CityManager> cities = new ArrayList<>(); |
| | | // 对省/市去重 |
| | | for (CityManager cityManager : cityManagers) { |
| | | if(!seenNames.contains(cityManager.getProvince())){ |
| | | result.add(cityManager); |
| | | seenNames.add(cityManager.getProvince()); |
| | | } |
| | | if(!c.contains(cityManager.getProvince())){ |
| | | cities.add(cityManager); |
| | | c.add(cityManager.getProvince()); |
| | | } |
| | | } |
| | | List<Store> stores = storeClient.getStore(data.getCity()); |
| | | model.addAttribute("stores",stores); |
| | | model.addAttribute("list",result); |
| | | model.addAttribute("cities",cities); |
| | | }else if (roleType == 2){ |
| | | List<Store> stores = storeClient.getStoreByCityManagerId(objectId); |
| | | model.addAttribute("stores",stores); |
| | | } |
| | | String birthday = new SimpleDateFormat("yyyy-MM-dd").format(data.getBirthday()); |
| | | String appointmentTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(data.getAppointmentTime()); |
| | | model.addAttribute("birthday",birthday); |
| | | model.addAttribute("appointmentTime",appointmentTime); |
| | | model.addAttribute("data",data); |
| | | model.addAttribute("roleType",roleType); |
| | | return PREFIX + "TBodySideAppointment_edit.html"; |
| | | } |
| | | |
| | |
| | | */ |
| | | @RequestMapping("/listAll") |
| | | @ResponseBody |
| | | public List<QueryBodySideAppointmentVO> listAll(String phone,String parentName,Integer state){ |
| | | public List<QueryBodySideAppointmentVO> listAll(String phone,String parentName,Integer state,Integer day){ |
| | | QueryBodySideAppointment vo = new QueryBodySideAppointment(); |
| | | vo.setParentName(parentName); |
| | | vo.setPhone(phone); |
| | | vo.setState(state); |
| | | vo.setDay(day); |
| | | Integer roleType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | if (roleType == 2){ |
| | | // 获取门店集合 |
| | | List<Integer> collect = storeClient.getStoreByCityManagerId(objectId) |
| | | .stream().map(Store::getId).collect(Collectors.toList()); |
| | | vo.setIds(collect); |
| | | }else if(roleType == 3){ |
| | | List<Integer> list = new ArrayList<>(); |
| | | TStoreStaff storeByStoreStaffId = storeStaffClient.getStoreByStoreStaffId(objectId); |
| | | list.add(storeByStoreStaffId.getStoreId()); |
| | | vo.setIds(list); |
| | | } |
| | | List<QueryBodySideAppointmentVO> queryBodySideAppointmentVOS = bodySideAppointmentClient.listAll(vo); |
| | | for (QueryBodySideAppointmentVO queryBodySideAppointmentVO : queryBodySideAppointmentVOS) { |
| | | queryBodySideAppointmentVO.setProvinceAndCity(queryBodySideAppointmentVO.getProvince()+queryBodySideAppointmentVO.getCity()); |
| | | } |
| | | |
| | | return queryBodySideAppointmentVOS; |
| | | } |
| | | |
| | |
| | | @ResponseBody |
| | | @RequestMapping(value = "/addBodySideAppointments") |
| | | public ResultUtil addBodySideAppointments(@RequestBody QueryBodySideAppointmentVO vo) { |
| | | Integer roleType = UserExt.getUser().getObjectType(); |
| | | // 获取当前登录人id |
| | | Integer cityManagerId = UserExt.getUser().getObjectId(); |
| | | if (roleType == 2){ |
| | | CityManager cityManager = cityManagerClient.queryCityManagerById(cityManagerId); |
| | | vo.setProvince(cityManager.getProvince()); |
| | | vo.setProvinceCode(cityManager.getProvinceCode()); |
| | | vo.setCity(cityManager.getCity()); |
| | | vo.setCityCode(cityManager.getCityCode()); |
| | | }else if (roleType == 3){ |
| | | TStoreStaff storeByStoreStaffId = storeStaffClient.getStoreByStoreStaffId(cityManagerId); |
| | | Store storeById = storeClient.getStoreById(storeByStoreStaffId.getStoreId()); |
| | | vo.setProvince(storeById.getProvince()); |
| | | vo.setProvinceCode(storeById.getProvinceCode()); |
| | | vo.setCity(storeById.getCity()); |
| | | vo.setCityCode(storeById.getCityCode()); |
| | | } |
| | | bodySideAppointmentClient.addBodySideAppointments(vo); |
| | | return ResultUtil.success("添加成功"); |
| | | } |
| | |
| | | import com.dsh.course.feignClient.account.model.TCityManager; |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.feignClient.competition.model.*; |
| | | import com.dsh.course.feignClient.course.CourseClient; |
| | | import com.dsh.course.feignClient.course.model.TCoursePackage; |
| | | import com.dsh.course.mapper.UserMapper; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.core.base.tips.SuccessTip; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Autowired |
| | | private CourseClient courseClient; |
| | | |
| | | |
| | | /** |
| | |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getId, oneId)); |
| | | QueryWrapper<TCity> query = new QueryWrapper<TCity>().eq("parent_id", one.getId()); |
| | | return cityService.list(query); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/storeChange") |
| | | @ResponseBody |
| | | public Object storeChange(Integer oneId) { |
| | | try { |
| | | return storeService.list(new LambdaQueryWrapper<TStore>().eq(TStore::getCityCode, oneId)); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/packageChange") |
| | | @ResponseBody |
| | | public Object packageChange(Integer oneId) { |
| | | try { |
| | | List<TCoursePackage> list = courseClient.queryByTypeId(oneId); |
| | | return list; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/timeChange") |
| | | @ResponseBody |
| | | public Object timeChange(Integer oneId) { |
| | | try { |
| | | List<Map<String,Object>> list = courseClient.queryByConfigId(oneId); |
| | | return list; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | |
| | | import com.dsh.course.feignClient.activity.CouponClient; |
| | | import com.dsh.course.feignClient.activity.PointMercharsClient; |
| | | import com.dsh.course.feignClient.activity.model.*; |
| | | import com.dsh.course.feignClient.course.CourseClient; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | 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.*; |
| | | 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 javax.annotation.Resource; |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | 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 extends BaseController { |
| | | public class TGoodsController { |
| | | |
| | | |
| | | |
| | |
| | | private AppUserClient appUserClient; |
| | | @Autowired |
| | | private ICityService cityService; |
| | | |
| | | @Autowired |
| | | private CourseClient courseClient; |
| | | |
| | | @Resource |
| | | private PointMercharsClient pointMercharsClient; |
| | |
| | | model.addAttribute("userType",objectType); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | List<Map<String,Object>> listOne = courseClient.getPageageType(); |
| | | model.addAttribute("courseType",listOne); |
| | | |
| | | |
| | | return PREFIX + "TGoods_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tGoods_info") |
| | | public String tGoodsInfo(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_detail_one.html"; |
| | | } |
| | | |
| | | @RequestMapping("/goods_info/{id}") |
| | | public String memberCouponInfo(@PathVariable Integer id, Model model) { |
| | | PointsMerchandise pointMercharsVo = pointMercharsClient.queryPointMerchaseById(id); |
| | | model.addAttribute("item",pointMercharsVo); |
| | | if(pointMercharsVo.getType()==2){ |
| | | Date startTime = pointMercharsVo.getStartTime(); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | model.addAttribute("sTime",format.format(startTime)); |
| | | model.addAttribute("eTime",format.format(pointMercharsVo.getEndTime())); |
| | | Integer shopId = pointMercharsClient.getshopName(id); |
| | | TStore byId = storeService.getById(shopId); |
| | | model.addAttribute("shopName",byId.getName()); |
| | | Integer coursePackageId = pointMercharsVo.getCoursePackageId(); |
| | | List<String> name = courseClient.queryPackageById(coursePackageId); |
| | | Integer coursePackageId1 = pointMercharsVo.getCoursePackageId(); |
| | | String classHours = courseClient.getHours(coursePackageId1); |
| | | model.addAttribute("typeName",name.get(0)); |
| | | model.addAttribute("pageName",name.get(1)); |
| | | model.addAttribute("classHours",classHours); |
| | | String productImages = pointMercharsVo.getProductImages(); |
| | | ArrayList<String> strings = new ArrayList<>(); |
| | | for (String s : productImages.split(",")) { |
| | | strings.add(s); |
| | | } |
| | | model.addAttribute("pictures",strings); |
| | | return PREFIX + "TGoods_detail_two.html"; |
| | | }else { |
| | | GoodsInfoOneVo infoOneVo = pointMercharsClient.queryDetailsOfGoods(id); |
| | | System.out.println("pointMercharsVo:"+infoOneVo); |
| | | model.addAttribute("item",infoOneVo); |
| | | String[] split = infoOneVo.getPics().split(","); |
| | | List<String> list = Arrays.asList(split); |
| | | if (infoOneVo.getUseScope() == 2){ |
| | | List<StoreVos> provinces = pointMercharsClient.getProvinces(id); |
| | | model.addAttribute("city",provinces); |
| | | } |
| | | if (infoOneVo.getUseScope() == 2){ |
| | | List<StoreVos> storeVos = pointMercharsClient.getStoreList(id); |
| | | model.addAttribute("store",storeVos); |
| | | } |
| | | model.addAttribute("pictures",list); |
| | | model.addAttribute("exchangeMethod",infoOneVo.getExchangeMethod()); |
| | | return PREFIX + "TGoods_detail_one.html"; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | client.insertIntoData(dataVo); |
| | | return new SuccessTip<>(); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 商品详情 |
| | | * @param pointMerchandiseId 商品Id |
| | | * @param quantityIssued 发放数量 |
| | | * @param pickUpQuantity 限领数量 |
| | | * @param redemptionInstructions 说明 |
| | | * @param cover 封面图 |
| | | * @param productImages 商品图片 |
| | | * @param sort 排序 |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update( Integer pointMerchandiseId,Integer quantityIssued,Integer pickUpQuantity,String redemptionInstructions,String cover,String productImages,Integer sort){ |
| | | Map<String, Object> stringObjectHashMap = new HashMap<>(); |
| | | stringObjectHashMap.put("pointMerchandiseId",pointMerchandiseId); |
| | | stringObjectHashMap.put("quantityIssued",quantityIssued); |
| | | stringObjectHashMap.put("pickUpQuantity",pickUpQuantity); |
| | | stringObjectHashMap.put("redemptionInstructions",redemptionInstructions); |
| | | stringObjectHashMap.put("cover",cover); |
| | | stringObjectHashMap.put("productImages",productImages); |
| | | stringObjectHashMap.put("sort",sort); |
| | | System.out.println(stringObjectHashMap); |
| | | pointMercharsClient.updateGoodsDetail(stringObjectHashMap); |
| | | 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<>(); |
| | | } |
| | | /* |
| | | ajax.set("typeAll",typeAll); |
| | | ajax.set("provinceCode",pCode); |
| | | ajax.set("cityCode",cCode); |
| | | ajax.set("storeId",storeId); |
| | | ajax.set("coursePackageTypeId",coursePackageTypeId); |
| | | ajax.set("coursePackageId",coursePackageId); |
| | | ajax.set("coursePackageConfigId",coursePackageConfigId); |
| | | ajax.set("price",price); |
| | | ajax.set("type",type); |
| | | ajax.set("integral",integral); |
| | | ajax.set("cash",cash); |
| | | ajax.set("cover",cover1); |
| | | ajax.set("imgOne",imgOne); |
| | | ajax.set("userPopulation",userPopulation); |
| | | ajax.set("quantityIssued",quantityIssued); |
| | | ajax.set("pickUpQuantity",pickUpQuantity); |
| | | ajax.set("startTime",startTime); |
| | | ajax.set("text",text); |
| | | ajax.set("sort",sort); |
| | | ajax.set("useScope",company); |
| | | ajax.set("cityIds",cts); |
| | | ajax.set("storeIds",stores); |
| | | */ |
| | | @PostMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add( Integer typeAll,String provinceCode,String cityCode,Integer storeId,Integer coursePackageTypeId,Integer coursePackageId,Integer coursePackageConfigId, |
| | | Double price,Integer type,Integer integral,Double cash,String cover,String imgOne,Integer userPopulation,Integer quantityIssued,Integer pickUpQuantity, |
| | | String startTime,String text,Integer sort,String name,Integer useScope,String cityIds,String storeIds |
| | | ) throws ParseException { |
| | | PointsMerchandise pointsMerchandise = new PointsMerchandise(); |
| | | pointsMerchandise.setType(typeAll); |
| | | pointsMerchandise.setName(name); |
| | | pointsMerchandise.setCoursePackageId(coursePackageId); |
| | | pointsMerchandise.setPrice(new BigDecimal(price)); |
| | | pointsMerchandise.setRedemptionMethod(type); |
| | | if(type==2 || type==3){ |
| | | pointsMerchandise.setCash(new BigDecimal(cash)); |
| | | } |
| | | if(type==1 || type==2){ |
| | | pointsMerchandise.setIntegral(integral); |
| | | } |
| | | pointsMerchandise.setCover(cover); |
| | | pointsMerchandise.setProductImages(imgOne); |
| | | pointsMerchandise.setUserPopulation(userPopulation); |
| | | pointsMerchandise.setQuantityIssued(quantityIssued); |
| | | pointsMerchandise.setPickUpQuantity(pickUpQuantity); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | pointsMerchandise.setStartTime(format.parse(startTime.split(" - ")[0])); |
| | | pointsMerchandise.setEndTime(format.parse(startTime.split(" - ")[1])); |
| | | pointsMerchandise.setUseScope(useScope); |
| | | if(ToolUtil.isNotEmpty(provinceCode)){ |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, provinceCode)); |
| | | pointsMerchandise.setProvinceCode(provinceCode); |
| | | pointsMerchandise.setProvince(one.getName()); |
| | | } |
| | | if(ToolUtil.isNotEmpty(cityCode)){ |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, cityCode)); |
| | | pointsMerchandise.setCityCode(cityCode); |
| | | pointsMerchandise.setCity(one.getName()); |
| | | } |
| | | pointsMerchandise.setRedemptionInstructions(text); |
| | | pointsMerchandise.setSort(sort); |
| | | pointsMerchandise.setState(1); |
| | | pointsMerchandise.setInsertTime(new Date()); |
| | | pointsMerchandise.setCoursePackageConfigId(coursePackageConfigId); |
| | | // 代替storeId |
| | | pointsMerchandise.setShelves(storeId); |
| | | Integer id = pointMercharsClient.add(pointsMerchandise); |
| | | if(typeAll!=2){ |
| | | if(useScope==2){ |
| | | ArrayList<Map<String,String>> objects = new ArrayList<>(); |
| | | for (String s : cityIds.split(",")) { |
| | | TCity tCity = cityService.getById(Integer.valueOf(s)); |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | TCity pCity = cityService.getById(tCity.getParentId()); |
| | | map.put("pName",pCity.getName()); |
| | | map.put("pCode",pCity.getCode()); |
| | | map.put("cName",tCity.getName()); |
| | | map.put("cCode",tCity.getCode()); |
| | | map.put("id",id.toString()); |
| | | objects.add(map); |
| | | } |
| | | pointMercharsClient.addCitys(objects); |
| | | }else if(useScope==3){ |
| | | String pam = id+"_"+storeIds; |
| | | // 添加多个城市 门店 |
| | | try{ |
| | | pointMercharsClient.addOther(pam); |
| | | |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | return new SuccessTip<>(); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * 跳转到修改商品详情 |
| | | * 跳转到修改车辆管理 |
| | | */ |
| | | @RequestMapping("/tGoods_update/{id}") |
| | | public String tCityUpdate(@PathVariable Integer id, Model model) { |
| | |
| | | PointMercharsVo pointMercharsVo = pointMercharsClient.queryPointMerchaseDetailOfId(id); |
| | | System.out.println("pointMercharsVo:"+pointMercharsVo); |
| | | String[] split = pointMercharsVo.getPics().split(","); |
| | | List<String> list = Arrays.asList(split); |
| | | model.addAttribute("id",id); |
| | | model.addAttribute("item",pointMercharsVo); |
| | | model.addAttribute("pictures",list); |
| | | System.out.println(list); |
| | | model.addAttribute("pictures",split); |
| | | return PREFIX + "TGoods_edit.html"; |
| | | } |
| | | |
| | |
| | | */ |
| | | @RequestMapping("/write_off") |
| | | @ResponseBody |
| | | public Object GoodsWriteOff(String id){ |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Map<String, Object> stringObjectHashMap = new HashMap<>(); |
| | | stringObjectHashMap.put("goodsId",id); |
| | | stringObjectHashMap.put("managerId",objectType); |
| | | boolean b = pointMercharsClient.writeOffGoodsStatus(stringObjectHashMap); |
| | | System.out.println(b); |
| | | if (b){ |
| | | public Object GoodsWriteOff(Integer id){ |
| | | System.out.println(id); |
| | | // TODO: 2023/8/15 核销操作 |
| | | return new SuccessTip<>(); |
| | | }else { |
| | | return ERROR; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | |
| | | |
| | | import com.dsh.course.feignClient.account.model.CityManager; |
| | | import com.dsh.course.feignClient.account.model.TStoreStaff; |
| | | import com.dsh.course.feignClient.activity.model.QueryBodySideAppointmentVO; |
| | | import com.dsh.course.feignClient.other.StoreValueConfigClient; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.modular.system.model.Store; |
| | | import com.dsh.guns.modular.system.model.StoredValueConfig; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import org.json.JSONArray; |
| | | import org.json.JSONObject; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | /** |
| | | * 储值规则配置控制器 |
| | | */ |
| | | |
| | | @Controller |
| | | @RequestMapping("/storeValueConfig") |
| | | public class TStoredValueConfigController { |
| | | |
| | | private String PREFIX = "/system/storeValueConfig/"; |
| | | @Autowired |
| | | private StoreValueConfigClient storeValueConfigClient; |
| | | /** |
| | | * 跳转储值管理页面 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | StoredValueConfig storeValueConfig = storeValueConfigClient.getStoreValueConfig(); |
| | | |
| | | model.addAttribute("description",storeValueConfig.getDescription()); |
| | | // 解析json串 获取时间 |
| | | JSONObject jsonObject = new JSONObject(storeValueConfig.getContent()); |
| | | JSONArray timeRulesArray = jsonObject.getJSONArray("time_rules"); |
| | | model.addAttribute("content",jsonObject); |
| | | if (timeRulesArray.length() > 0) { |
| | | JSONObject timeRule = timeRulesArray.getJSONObject(0); |
| | | String startTime = timeRule.getString("startTime"); |
| | | String endTime = timeRule.getString("endTime"); |
| | | model.addAttribute("time",startTime+" - " + endTime); |
| | | System.out.println("StartTime: " + startTime); |
| | | System.out.println("EndTime: " + endTime); |
| | | } |
| | | return PREFIX + "StoreValueConfig.html"; |
| | | } |
| | | /** |
| | | * 添加储值规则 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/addStoreValueConfig") |
| | | public ResultUtil addStoreValueConfig(@RequestBody StoredValueConfig storedValueConfig) { |
| | | storeValueConfigClient.addStoreValueConfig(storedValueConfig); |
| | | return ResultUtil.success(); |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | User user = userService.getByAccount(username); |
| | | password = AESUtils.decrypt(password); |
| | | String s = MD5.md5(password); |
| | | if(!user.getPassword().equals(s)){ |
| | | model.addAttribute("tips", "账号密码错误"); |
| | | return "/login.html"; |
| | | } |
| | | // todo 记得该回去!!!!!!!!!! |
| | | // password = AESUtils.decrypt(password); |
| | | // String s = MD5.md5(password); |
| | | // if(!user.getPassword().equals(s)){ |
| | | // model.addAttribute("tips", "账号密码错误"); |
| | | // return "/login.html"; |
| | | // } |
| | | |
| | | |
| | | GetTokenRequest tokenRequest = new GetTokenRequest(); |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | 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-10 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_stored_value_config") |
| | | public class StoredValueConfig extends Model<StoredValueConfig> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 规则配置JSON |
| | | { |
| | | "rules": [{ |
| | | "money": "100.0", |
| | | "usersCoins": "100.0", |
| | | "MemberCoins": "100.0", |
| | | "startTime": "", |
| | | "endTime": "" |
| | | }, { |
| | | "money": "200.0", |
| | | "usersCoins": "200.0", |
| | | "MemberCoins": "200.0", |
| | | "startTime": "", |
| | | "endTime": "" |
| | | }], |
| | | "time_rules": [{ |
| | | "sameTime": [{ |
| | | "money": "100.0", |
| | | "usersCoins": "100.0", |
| | | "MemberCoins": "200.0", |
| | | "startTime": "2023-06-01", |
| | | "endTime": "2023-06-15" |
| | | }, { |
| | | "money": "200.0", |
| | | "usersCoins": "200.0", |
| | | "MemberCoins": "400.0", |
| | | "startTime": "2023-06-01", |
| | | "endTime": "2023-06-15" |
| | | }] |
| | | }, { |
| | | "sameTime": [{ |
| | | "money": "100.0", |
| | | "usersCoins": "100.0", |
| | | "MemberCoins": "300.0", |
| | | "startTime": "2023-07-01", |
| | | "endTime": "2023-07-15" |
| | | }, { |
| | | "money": "200.0", |
| | | "usersCoins": "200.0", |
| | | "MemberCoins": "600.0", |
| | | "startTime": "2023-07-01", |
| | | "endTime": "2023-07-15" |
| | | }] |
| | | }] |
| | | } |
| | | */ |
| | | private String content; |
| | | /** |
| | | * 储值说明 |
| | | */ |
| | | private String description; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style> |
| | | .data-item { |
| | | position: relative; |
| | | border: 1px solid #ccc; |
| | | padding: 10px; |
| | | margin-bottom: 10px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | max-width: 200px; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | .delete-button { |
| | | position: absolute; |
| | | top: -10px; |
| | | right: -10px; |
| | | cursor: pointer; |
| | | color: black; |
| | | width: 20px; |
| | | height: 20px; |
| | | text-align: center; |
| | | line-height: 20px; |
| | | border-radius: 50%; |
| | | } |
| | | </style> |
| | | <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"> |
| | | @if(roleType==1){ |
| | | <div class="col-sm-3"> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 所在省 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="pCode" onchange="TQuestion.oneChange(1)"> |
| | | <option value="">全部</option> |
| | | @for(obj in list){ |
| | | <option value="${obj}">${obj}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(roleType==1){ |
| | | <div class="col-sm-3"> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 所在市 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="cCode"> |
| | | <option value="">请先选择省</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | |
| | | <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="isVip" name="年度会员" > |
| | | <option value="">全部</option> |
| | | <option value="1">是</option> |
| | | <option value="2">否</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="salesmanUserName" name="销售人员" /> |
| | | </div> |
| | | |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TQuestion.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TQuestion.resetSearch()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="margin-top: 10px" class="hidden-xs" id="TCouponTableToolbar" role="group"> |
| | | <#button name="添加" icon="fa-plus" clickFun="TQuestion.openAdd()"/> |
| | | <#button name="编辑" icon="fa-edit" clickFun="TQuestion.openChange()" space="true"/> |
| | | <#button name="查看详情" icon="fa-edit" clickFun="TQuestion.openChange()" space="true"/> |
| | | <#button name="冻结" icon="fa-check" clickFun="TQuestion.onShelf()" space="true"/> |
| | | <#button name="解冻" icon="fa-check" clickFun="TQuestion.onShelf()" space="true"/> |
| | | <#button name="添加学员" icon="fa-edit" clickFun="TQuestion.openChange()" space="true"/> |
| | | <#button name="查看学员信息" icon="fa-edit" clickFun="TQuestion.openChange()" space="true"/> |
| | | </div> |
| | | <#table id="TQuestionTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <input hidden id="roleType" value="${roleType}"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/appUser/tAppUser.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: 32px; |
| | | text-align: center; |
| | | } |
| | | .avatar { |
| | | width: 100px; |
| | | height: 100px; |
| | | display: block; |
| | | } |
| | | |
| | | .col-sm-12 { |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .col-sm-12 select { |
| | | height: 33px; |
| | | } |
| | | </style> |
| | | <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script> |
| | | <div class="ibox float-e-margins"> |
| | | |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | @if(roleType == 1){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TQuestion.oneChange()"> |
| | | <option value="">请选择省</option> |
| | | @for(obj in list){ |
| | | <option style="width: 300px" value="${obj.provinceCode}">${obj.province}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">*所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="cCode" name="cCode" onchange="TQuestion.oneChangeNext(this)"> |
| | | <option value="">请选择市</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*姓名:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="learnerName" placeholder="请输入姓名" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*生日:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="birthday" placeholder="请选择" type="date"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*性别:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="gender" name = "gender"> |
| | | <option value="" style="color: #b6b6b6" disabled selected>请选择性别</option> |
| | | <option value="1">男</option> |
| | | <option value="2">女</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*联系电话:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="phone" placeholder="请输入联系电话" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*销售人员:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="salesmanUserName" name="salesmanUserName"> |
| | | <option value="">请选择</option> |
| | | @for(obj in list){ |
| | | <option style="width: 300px" value="${obj.provinceCode}">${obj.province}</option> |
| | | @} |
| | | </select> |
| | | </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="TQuestion.addSubmit()"/> |
| | | <#button btnCss="danger" name="关闭" id="cancel" icon="fa-eraser" clickFun="TQuestion.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <script src="${ctxPath}/modular/system/appUser/tAppUser.js"></script> |
| | | <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"> |
| | | |
| | | @} |
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: 32px; |
| | | text-align: center; |
| | | } |
| | | .avatar { |
| | | width: 100px; |
| | | height: 100px; |
| | | display: block; |
| | | } |
| | | |
| | | .col-sm-12 { |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .col-sm-12 select { |
| | | height: 33px; |
| | | } |
| | | </style> |
| | | <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script> |
| | | <div class="ibox float-e-margins"> |
| | | |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | @if(roleType == 1){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TQuestion.oneChange()"> |
| | | <option value="">请选择省</option> |
| | | @for(obj in list){ |
| | | <option style="width: 300px" value="${obj.provinceCode}">${obj.province}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">*所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="cCode" name="cCode" onchange="TQuestion.oneChangeNext(this)"> |
| | | <option value="">请选择市</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | |
| | | @if(roleType != 3){ |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*所属门店:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="store" name="account"> |
| | | <option value="" style="color: #676A6C" disabled selected>请选择门店</option> |
| | | @if(roleType == 2){ |
| | | @for(obj in stores){ |
| | | <option style="width: 300px" value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*家长姓名:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="parentName" placeholder="请输入家长姓名" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*家长联系方式:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="phone" placeholder="请输入家长联系方式" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*学员姓名:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="learnerName" placeholder="请输入学员姓名" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*学员年龄:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="learnerAge" placeholder="请输入学员年龄" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*学员生日:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="birthday" placeholder="请选择" type="date"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*预约时间:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="appointmentTime" placeholder="请选择" type="datetime-local"> |
| | | </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="TQuestion.addSubmit()"/> |
| | | <#button btnCss="danger" name="关闭" id="cancel" icon="fa-eraser" clickFun="TQuestion.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <script src="${ctxPath}/modular/system/bodySideAppointment/tBodySideAppointment.js"></script> |
| | | <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"> |
| | | |
| | | @} |
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: 32px; |
| | | text-align: center; |
| | | } |
| | | .avatar { |
| | | width: 100px; |
| | | height: 100px; |
| | | display: block; |
| | | } |
| | | |
| | | .col-sm-12 { |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .col-sm-12 select { |
| | | height: 33px; |
| | | } |
| | | </style> |
| | | <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script> |
| | | <div class="ibox float-e-margins"> |
| | | <input hidden id="id" value="${data.id}"> |
| | | <input hidden id="roleType" value="${roleType}"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | @if(roleType == 1){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TQuestion.oneChange()"> |
| | | @for(obj in list){ |
| | | <option value="${obj.provinceCode}" ${obj.province == data.province ? 'selected=selected' : ''}>${obj.province}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">*所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="cCode" name="cCode" onchange="TQuestion.oneChangeNext(this)"> |
| | | @for(obj in cities){ |
| | | <option value="${obj.cityCode}" ${obj.city == data.city ? 'selected=selected' : ''}>${obj.city}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(roleType != 3){ |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*所属门店:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="store" name="account"> |
| | | @for(obj in stores){ |
| | | <option value="${obj.id}" ${obj.id == data.storeId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*家长姓名:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.parentName}" class="form-control" id="parentName" placeholder="请输入家长姓名" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*家长联系方式:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.phone}" class="form-control" id="phone" placeholder="请输入家长联系方式" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*学员姓名:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.learnerName}" class="form-control" id="learnerName" placeholder="请输入学员姓名" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*学员年龄:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.learnerAge}" class="form-control" id="learnerAge" placeholder="请输入学员年龄" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*学员生日:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${birthday}" class="form-control" id="birthday" placeholder="请选择" type="date"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*预约时间:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${appointmentTime}" class="form-control" id="appointmentTime" placeholder="请选择" type="datetime-local"> |
| | | </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="TQuestion.addSubmit()"/> |
| | | <#button btnCss="danger" name="关闭" id="cancel" icon="fa-eraser" clickFun="TQuestion.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <script src="${ctxPath}/modular/system/bodySideAppointment/tBodySideAppointment_edit.js"></script> |
| | | <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"> |
| | | |
| | | @} |
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: 32px; |
| | | text-align: center; |
| | | } |
| | | .avatar { |
| | | width: 100px; |
| | | height: 100px; |
| | | display: block; |
| | | } |
| | | |
| | | .col-sm-12 { |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .col-sm-12 select { |
| | | height: 33px; |
| | | } |
| | | </style> |
| | | <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script> |
| | | <div class="ibox float-e-margins"> |
| | | <input hidden id="id" value="${data.id}"> |
| | | <input hidden id="roleType" value="${roleType}"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | @if(roleType == 1){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TQuestion.oneChange()"> |
| | | @for(obj in list){ |
| | | <option value="${obj.provinceCode}" ${obj.province == data.province ? 'selected=selected' : ''}>${obj.province}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">*所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="cCode" name="cCode" onchange="TQuestion.oneChangeNext(this)"> |
| | | @for(obj in cities){ |
| | | <option value="${obj.cityCode}" ${obj.city == data.city ? 'selected=selected' : ''}>${obj.city}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(roleType != 3){ |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*所属门店:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="store" name="account"> |
| | | @for(obj in stores){ |
| | | <option value="${obj.id}" ${obj.id == data.storeId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*家长姓名:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.parentName}" class="form-control" id="parentName" placeholder="请输入家长姓名" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*家长联系方式:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.phone}" class="form-control" id="phone" placeholder="请输入家长联系方式" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*学员姓名:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.learnerName}" class="form-control" id="learnerName" placeholder="请输入学员姓名" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*学员年龄:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.learnerAge}" class="form-control" id="learnerAge" placeholder="请输入学员年龄" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*学员生日:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${birthday}" class="form-control" id="birthday" placeholder="请选择" type="date"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*预约时间:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${appointmentTime}" class="form-control" id="appointmentTime" placeholder="请选择" type="datetime-local"> |
| | | </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="TQuestion.addSubmit()"/> |
| | | <#button btnCss="danger" name="关闭" id="cancel" icon="fa-eraser" clickFun="TQuestion.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <script src="${ctxPath}/modular/system/bodySideAppointment/tBodySideAppointment_edit.js"></script> |
| | | <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"> |
| | | |
| | | @} |
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: 32px; |
| | | text-align: center; |
| | | } |
| | | .avatar { |
| | | width: 100px; |
| | | height: 100px; |
| | | display: block; |
| | | } |
| | | |
| | | .col-sm-12 { |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .col-sm-12 select { |
| | | height: 33px; |
| | | } |
| | | </style> |
| | | <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script> |
| | | <div class="ibox float-e-margins"> |
| | | <input hidden id="id" value="${data.id}"> |
| | | <input hidden id="roleType" value="${roleType}"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | @if(roleType == 1){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TQuestion.oneChange()"> |
| | | @for(obj in list){ |
| | | <option value="${obj.provinceCode}" ${obj.province == data.province ? 'selected=selected' : ''}>${obj.province}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">*所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="cCode" name="cCode" onchange="TQuestion.oneChangeNext(this)"> |
| | | @for(obj in cities){ |
| | | <option value="${obj.cityCode}" ${obj.city == data.city ? 'selected=selected' : ''}>${obj.city}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(roleType != 3){ |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*所属门店:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="store" name="account"> |
| | | @for(obj in stores){ |
| | | <option value="${obj.id}" ${obj.id == data.storeId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*家长姓名:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.parentName}" class="form-control" id="parentName" placeholder="请输入家长姓名" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*家长联系方式:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.phone}" class="form-control" id="phone" placeholder="请输入家长联系方式" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*学员姓名:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.learnerName}" class="form-control" id="learnerName" placeholder="请输入学员姓名" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*学员年龄:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.learnerAge}" class="form-control" id="learnerAge" placeholder="请输入学员年龄" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*学员生日:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${birthday}" class="form-control" id="birthday" placeholder="请选择" type="date"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*预约时间:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${appointmentTime}" class="form-control" id="appointmentTime" placeholder="请选择" type="datetime-local"> |
| | | </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="TQuestion.addSubmit()"/> |
| | | <#button btnCss="danger" name="关闭" id="cancel" icon="fa-eraser" clickFun="TQuestion.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <script src="${ctxPath}/modular/system/bodySideAppointment/tBodySideAppointment_edit.js"></script> |
| | | <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"> |
| | | |
| | | @} |
| | |
| | | </div> |
| | | <div class="hidden-xs" style="margin-top: 10px" role="group"> |
| | | <label>预约时间:</label> |
| | | <#button name="今日" icon="fa-search" clickFun="TQuestion.day(1)"/> |
| | | <#button name="明日" icon="fa-search" clickFun="TQuestion.day(2)"/> |
| | | <#button name="最近7天" icon="fa-search" clickFun="TQuestion.day(7)"/> |
| | | <#button name="今日" icon="fa-search" clickFun="TQuestion.search(1)"/> |
| | | <#button name="明日" icon="fa-search" clickFun="TQuestion.search(2)"/> |
| | | <#button name="最近7天" icon="fa-search" clickFun="TQuestion.search(7)"/> |
| | | </div> |
| | | |
| | | <div style="margin-top: 10px" class="hidden-xs" id="TCouponTableToolbar" role="group"> |
| | |
| | | |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | @if(roleType == 1){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <div class="col-sm-9"> |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | |
| | | @if(roleType != 3){ |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*所属门店:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="store" name="account"> |
| | | <option value="" style="color: #676A6C" disabled selected>请选择门店</option> |
| | | @if(roleType == 2){ |
| | | @for(obj in stores){ |
| | | <option style="width: 300px" value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*家长姓名:</label> |
| | |
| | | </style> |
| | | <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script> |
| | | <div class="ibox float-e-margins"> |
| | | <input hidden id="dataId" value="${data.id}"> |
| | | <input hidden id="id" value="${data.id}"> |
| | | <input hidden id="roleType" value="${roleType}"> |
| | | <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" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" value="${data.name}" id="name" placeholder="请输入分类名称" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*所在位置:</label> |
| | | @if(roleType == 1){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="position" name = "gender"> |
| | | <option value="" style="color: #b6b6b6" disabled selected>请选择所在位置</option> |
| | | <option value="1" ${data.position == 1 ? 'selected' : ''}>线上课得积分</option> |
| | | <option value="2" ${data.position == 2 ? 'selected' : ''}>看视频得奖励</option> |
| | | |
| | | <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TQuestion.oneChange()"> |
| | | @for(obj in list){ |
| | | <option value="${obj.provinceCode}" ${obj.province == data.province ? 'selected=selected' : ''}>${obj.province}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">*所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="cCode" name="cCode" onchange="TQuestion.oneChangeNext(this)"> |
| | | @for(obj in cities){ |
| | | <option value="${obj.cityCode}" ${obj.city == data.city ? 'selected=selected' : ''}>${obj.city}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(roleType != 3){ |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*排序:</label> |
| | | <label class="col-sm-3 control-label">*所属门店:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="store" name="account"> |
| | | @for(obj in stores){ |
| | | <option value="${obj.id}" ${obj.id == data.storeId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*家长姓名:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="sort" value="${data.sort}" placeholder="请输入排序" type="text"> |
| | | <input style="width: 300px" value="${data.parentName}" class="form-control" id="parentName" placeholder="请输入家长姓名" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*家长联系方式:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.phone}" class="form-control" id="phone" placeholder="请输入家长联系方式" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*学员姓名:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.learnerName}" class="form-control" id="learnerName" placeholder="请输入学员姓名" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*学员年龄:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.learnerAge}" class="form-control" id="learnerAge" placeholder="请输入学员年龄" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*学员生日:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${birthday}" class="form-control" id="birthday" placeholder="请选择" type="date"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*预约时间:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${appointmentTime}" class="form-control" id="appointmentTime" placeholder="请选择" type="datetime-local"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5" > |
| | | @if(type!=1){ |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TQuestion.updateSubmit()"/> |
| | | @} |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TQuestion.close()"/> |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="TQuestion.addSubmit()"/> |
| | | <#button btnCss="danger" name="关闭" id="cancel" icon="fa-eraser" clickFun="TQuestion.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <script src="${ctxPath}/modular/system/benefits/TBenefits.js"></script> |
| | | <script src="${ctxPath}/modular/system/bodySideAppointment/tBodySideAppointment_edit.js"></script> |
| | | <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"> |
| | |
| | | <div class="form-horizontal" id="roleInfoForm"> |
| | | |
| | | <input type="hidden" id="id" value=""> |
| | | @if(language==1){ |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="name" name="角色名称" underline="true"/> |
| | |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="RolInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(language==2){ |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="name" name="Role name" underline="true"/> |
| | | <#input id="pName" name="Parent Name" underline="true" hidden="pid" readonly="readonly" |
| | | clickFun="RolInfoDlg.showPNameSelectTree(); return false;" |
| | | style="background-color: #ffffff !important;"/> |
| | | <#input id="deptName" name="Name of a department" hidden="deptid" readonly="readonly" |
| | | clickFun="RolInfoDlg.showDeptSelectTree(); return false;" |
| | | style="background-color: #ffffff !important;"/> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <#input id="tips" name="Another name" underline="true"/> |
| | | <#input id="num" name="Sort"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 这是部门下拉框 --> |
| | | <div id="deptContent" class="menuContent" |
| | | style="display: none; position: absolute; z-index: 200;"> |
| | | <ul id="deptTree" class="ztree tree-box" style="width: 250px !important;"></ul> |
| | | </div> |
| | | |
| | | <!-- 这是父级菜单下拉框 --> |
| | | <div id="pNameContent" class="menuContent" |
| | | style="display: none; position: absolute; z-index: 200;"> |
| | | <ul id="pNameTree" class="ztree tree-box" style="width: 250px !important;"></ul> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="Submit" id="ensure" icon="fa-check" clickFun="RolInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="Cancel" id="cancel" icon="fa-eraser" clickFun="RolInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(language==3){ |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="name" name="Peran" underline="true"/> |
| | | <#input id="pName" name="Nama Orangtua" underline="true" hidden="pid" readonly="readonly" |
| | | clickFun="RolInfoDlg.showPNameSelectTree(); return false;" |
| | | style="background-color: #ffffff !important;"/> |
| | | <#input id="deptName" name="Nama departemen" hidden="deptid" readonly="readonly" |
| | | clickFun="RolInfoDlg.showDeptSelectTree(); return false;" |
| | | style="background-color: #ffffff !important;"/> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <#input id="tips" name="Nama lain" underline="true"/> |
| | | <#input id="num" name="Urutkan"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 这是部门下拉框 --> |
| | | <div id="deptContent" class="menuContent" |
| | | style="display: none; position: absolute; z-index: 200;"> |
| | | <ul id="deptTree" class="ztree tree-box" style="width: 250px !important;"></ul> |
| | | </div> |
| | | |
| | | <!-- 这是父级菜单下拉框 --> |
| | | <div id="pNameContent" class="menuContent" |
| | | style="display: none; position: absolute; z-index: 200;"> |
| | | <ul id="pNameTree" class="ztree tree-box" style="width: 250px !important;"></ul> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="Kirim" id="ensure" icon="fa-check" clickFun="RolInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="Batal" id="cancel" icon="fa-eraser" clickFun="RolInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | @} |
| | | |
| | | </div> |
| | | |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style> |
| | | .newWidth, .single-line{ |
| | | max-width:350px !important;display: initial !important; |
| | | } |
| | | </style> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | |
| | | <div class="ibox-title"> |
| | | <h5>储值管理</h5> |
| | | </div> |
| | | <input type="hidden" id="content" value="${content}"> |
| | | <!-- <input type="hidden" id="description" value="${description}">--> |
| | | <!-- <input type="hidden" id="time" value="${time}">--> |
| | | |
| | | <div class="ibox-title"> |
| | | <div style="display: flex"> |
| | | <label for="editor_1">*常规储值:</label> |
| | | <div class="col-sm-2"> |
| | | <#button btnCss="info" name="添加" id="ensure" icon="fa-check" /> |
| | | </div> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-6"> |
| | | <div style="height: 200px;width: 1100px; border: 1px solid #e5e6e7;overflow-y: auto;"> |
| | | <table class="table table-striped table-bordered table-hover table-condensed"> |
| | | <thead> |
| | | <tr> |
| | | </tr> |
| | | </thead> |
| | | <tbody id="rules"> |
| | | <!-- <tr class="rulesClass" style="display: flex; justify-content: space-between;">--> |
| | | <!-- <td style="text-align: center;">*充值金额:<input placeholder="请输入充值金额" id="recharge" name="recharge" value=""></td>--> |
| | | <!-- <td style="text-align: center;">*用户兑换玩湃币:<input placeholder="请输入兑换玩湃币" id="user" name="user" value=""></td>--> |
| | | <!-- <td style="text-align: center;">*会员兑换玩湃币:<input placeholder="请输入兑换玩湃币" id="vip" name="vip" value=""></td>--> |
| | | <!-- <td style="text-align: center;"><button onclick="deleteSub(this)">删除</button></td>--> |
| | | <!-- </tr>--> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="ibox-title"> |
| | | <div style="display: flex"> |
| | | <label for="editor_1">*特殊时间储值:</label> |
| | | |
| | | <div class="col-sm-2"> |
| | | <#button btnCss="info" name="添加" id="ensureTime" icon="fa-check" /> |
| | | </div> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-6"> |
| | | <div style="height: 200px;width: 1100px; border: 1px solid #e5e6e7;overflow-y: auto;"> |
| | | <#TimeCon id="beginTime" name="有效期" isTime="false"/> |
| | | |
| | | <table class="table table-striped table-bordered table-hover table-condensed"> |
| | | <thead> |
| | | <tr> |
| | | </tr> |
| | | </thead> |
| | | <tbody id="rulesTime"> |
| | | <!-- <tr class="rulesTimeClass" style="display: flex; justify-content: space-between;">--> |
| | | <!-- <td style="text-align: center;">*充值金额:<input placeholder="请输入充值金额" id="rechargeTime" name="rechargeTime" value=""></td>--> |
| | | <!-- <td style="text-align: center;">*用户兑换玩湃币:<input placeholder="请输入兑换玩湃币" id="userTime" name="userTime" value=""></td>--> |
| | | <!-- <td style="text-align: center;">*会员兑换玩湃币:<input placeholder="请输入兑换玩湃币" id="vipTime" name="vipTime" value=""></td>--> |
| | | <!-- <td style="text-align: center;"><button onclick="deleteSub(this)">删除</button></td>--> |
| | | <!-- </tr>--> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="tab-content"> |
| | | <div id="tab-1" class="tab-pane active"> |
| | | <div class="panel-body"> |
| | | <div> |
| | | <label for="editor_1">*储值说明:</label> |
| | | <textarea id="editor_1" type="text/plain" style="width:1200px;height:400px;"></textarea> |
| | | </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="add();" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/javascript"> |
| | | |
| | | laydate.render({ |
| | | elem: '#beginTime' |
| | | , trigger: 'click' |
| | | , range: true |
| | | }); |
| | | |
| | | const data1 = { |
| | | content:"", |
| | | sort:null, |
| | | answer:"" |
| | | }; |
| | | var editor_1 = null; |
| | | $(function () { |
| | | |
| | | var c = $("#content").val() |
| | | var d= $("#description").val() |
| | | var t = $("#time").val(); |
| | | // 将json串解析为对象 |
| | | // var jsonData = c; |
| | | // var data = JSON.parse(jsonData); |
| | | var rulesTable = document.getElementById("rules"); |
| | | var rulesTimeTable = document.getElementById("rulesTime"); |
| | | |
| | | console.log(c) |
| | | $("#beginTime").val(t); |
| | | //初始化编辑器 |
| | | editor_1 = UE.getEditor('editor_1'); |
| | | var addButton = document.getElementById('ensure'); |
| | | addButton.addEventListener('click', function () { |
| | | if ($("#recharge").val() == ""){ |
| | | Feng.error("请输入充值金额") |
| | | return; |
| | | } |
| | | if ($("#user").val() == ""){ |
| | | Feng.error("请输入兑换玩湃币-用户") |
| | | return; |
| | | } |
| | | if ($("#vip").val() == ""){ |
| | | Feng.error("请输入兑换玩湃币-会员") |
| | | return; |
| | | } |
| | | //封装数据 |
| | | var str = '<tr class="rulesClass" style="display: flex; justify-content: space-between;">' + |
| | | '<td style="text-align: center;">*充值金额:<input placeholder="请输入充值金额" id="recharge" name="rulesClassValue" value=""></td>' + |
| | | '<td style="text-align: center;">*用户兑换玩湃币:<input placeholder="请输入兑换玩湃币" id="user" name="rulesClassValue" value=""></td>' + |
| | | '<td style="text-align: center;">*会员兑换玩湃币:<input placeholder="请输入兑换玩湃币" id="vip" name="rulesClassValue" value=""></td>' + |
| | | '<td style="text-align: center;"><button onclick="deleteSub(this)">移除</button></td></tr>'; |
| | | $("#rules").append(str); |
| | | }); |
| | | |
| | | var addButtonTime = document.getElementById('ensureTime'); |
| | | addButtonTime.addEventListener('click', function () { |
| | | //封装数据 |
| | | var str = '<tr class="rulesTimeClass" style="display: flex; justify-content: space-between;">' + |
| | | '<td style="text-align: center;">*充值金额:<input placeholder="请输入充值金额" id="rechargeTime" name="rulesTimeClassValue" value=""></td>' + |
| | | '<td style="text-align: center;">*用户兑换玩湃币:<input placeholder="请输入兑换玩湃币" id="userTime" name="rulesTimeClassValue" value=""></td>' + |
| | | '<td style="text-align: center;">*会员兑换玩湃币:<input placeholder="请输入兑换玩湃币" id="vipTime" name="rulesTimeClassValue" value=""></td>' + |
| | | '<td style="text-align: center;"><button onclick="deleteSub(this)">移除</button></td></tr>'; |
| | | $("#rulesTime").append(str); |
| | | }) |
| | | }); |
| | | |
| | | |
| | | function deleteSub(e) { |
| | | console.log("删除") |
| | | $(e).parent().parent().remove(); |
| | | } |
| | | function add(){ |
| | | var id = $("#id").val(); |
| | | |
| | | var data = { |
| | | rules: [], |
| | | time_rules: [] |
| | | }; |
| | | var res = { |
| | | id:null, |
| | | content:"", |
| | | description : "" |
| | | }; |
| | | var time = $("#beginTime").val(); |
| | | var startTime = time.split(" - ")[0]; |
| | | var endTime = time.split(" - ")[1]; |
| | | var rulesClassElements = document.querySelectorAll('#rules .rulesClass'); |
| | | rulesClassElements.forEach(function(rulesTimeClassElement) { |
| | | var recharge = rulesTimeClassElement.querySelector("#recharge").value; |
| | | var user = rulesTimeClassElement.querySelector("#user").value; |
| | | var vip = rulesTimeClassElement.querySelector("#vip").value; |
| | | if (recharge ===""){ |
| | | Feng.error("请输入充值金额"); |
| | | } |
| | | if (recharge ===""){ |
| | | Feng.error("请输入用户兑换玩湃币"); |
| | | } |
| | | if (recharge ===""){ |
| | | Feng.error("请输入会员兑换玩湃币"); |
| | | } |
| | | var rulesArr={ |
| | | money:recharge, |
| | | usersCoins:user, |
| | | MemberCoins:vip, |
| | | startTime:"", |
| | | endTime:"", |
| | | }; |
| | | data.rules.push(rulesArr); |
| | | }); |
| | | |
| | | var rulesTimeClassElements = document.querySelectorAll('#rulesTime .rulesTimeClass'); |
| | | rulesTimeClassElements.forEach(function(rulesTimeClassElement) { |
| | | var recharge = rulesTimeClassElement.querySelector("#rechargeTime").value; |
| | | var user = rulesTimeClassElement.querySelector("#userTime").value; |
| | | var vip = rulesTimeClassElement.querySelector("#vipTime").value; |
| | | if (recharge ===""){ |
| | | Feng.error("请输入充值金额"); |
| | | } |
| | | if (user ===""){ |
| | | Feng.error("请输入用户兑换玩湃币"); |
| | | } |
| | | if (vip ===""){ |
| | | Feng.error("请输入会员兑换玩湃币"); |
| | | } |
| | | if (time ===""){ |
| | | Feng.error("请选择有效期"); |
| | | } |
| | | var rulesTimeArr={ |
| | | money:recharge, |
| | | usersCoins:user, |
| | | MemberCoins:vip, |
| | | startTime:startTime, |
| | | endTime:endTime, |
| | | }; |
| | | data.time_rules.push(rulesTimeArr); |
| | | }); |
| | | if (editor_1.getContent() === ""){ |
| | | Feng.error("储值说明不能为空!"); |
| | | return; |
| | | } |
| | | var result = JSON.stringify(data); |
| | | res.content = result; |
| | | var description = editor_1.getContent(); |
| | | res.description = description; |
| | | |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/storeValueConfig/addStoreValueConfig", |
| | | type: "POST", |
| | | contentType: "application/json", // 设置请求头的 Content-Type |
| | | data: JSON.stringify(res), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | Feng.success("添加成功!"); |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "添加失败!"; |
| | | Feng.error(errorMessage); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | </script> |
| | | @} |
| | |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | | <el-dialog :visible.sync="dialogVisible"> |
| | | <img width="100%" :src="imageUrl1" alt=""></el-dialog> |
| | | </el-dialog> |
| | | <img width="100%" :src="imageUrl1" alt=""> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">兑换方式:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="redemptionMethod" value="1" onclick="updateMethod(3)" checked> 积分 |
| | | <input type="radio" name="redemptionMethod" value="2" onclick="updateMethod(4)"> 现金+积分 |
| | | <input type="radio" name="redemptionMethod" value="3" onclick="updateMethod(5)"> 现金 |
| | | <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> |
| | | |
| | | <#avatar id="cover" name="商品封面" /> |
| | | |
| | | <div class="row" id="app" > |
| | | <div class="col-sm-6" style="width: 100%"> |
| | | <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" style="width: 15%;margin-left: 7%">*商品图片(请上传不超过五张图片): </label> |
| | | <div class="col-sm-2" style="width: 100%;margin-left: 12%;margin-top: 1%"> |
| | | <label class="col-sm-3 control-label">商品图片: </label> |
| | | <div class="col-sm-2" style="margin-top: 2%"> |
| | | <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> |
| | | 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> |
| | | <el-dialog :visible.sync="dialogVisible"> |
| | | <img width="100%" :src="imageUrl1" alt=""></el-dialog> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <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="1" checked style="margin-top: 10px"/> |
| | | 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="2" style="margin-top: 10px"/> |
| | | 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="3" style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px"/> |
| | | 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 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" onchange="TCarInfoDlg.storeChange(this)"> |
| | | <select class="form-control" id="cCode" name="cCode"> |
| | | <option value="">选择市</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">所属门店:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="storeId" name="storeId"> |
| | | <option value="">选择门店</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">课包类型:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="coursePackageTypeId" name="pCode" onchange="TCarInfoDlg.packageChange(this)"> |
| | | <option value="">选择课包类型</option> |
| | | @for(obj in courseType){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">课包名称:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="coursePackageId" name="coursePackageId" onchange="TCarInfoDlg.timeChange(this)"> |
| | | <option value="">选择课包</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">课时数:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="coursePackageConfigId" name="coursePackageConfigId"> |
| | | <option value="">选择课时数</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">原价:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="price1" name="price" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <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 onclick="updateMethod(1)"> 积分 |
| | | <input type="radio" name="redemptionMethod" value="2" onclick="updateMethod(2)"> 现金+积分 |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" id="y3" hidden> |
| | | <label class="col-sm-3 control-label">所需现金:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="cash1" name="cash" type="text"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="y4"> |
| | | <label class="col-sm-3 control-label">所需积分:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="integral1" name="integral" type="text"> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <#avatar id="cover1" name="*商品封面" /> |
| | | <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%"> |
| | | <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=""></el-dialog> |
| | | </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="quantityIssued1" 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="pickUpQuantity1" name="pickUpQuantity" type="text"> |
| | | </div> |
| | | </div> |
| | | <#input id="startTime1" name="有效期" type="text"/> |
| | | |
| | | <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="editor1" 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="sort1" name="sort" type="text"> |
| | | |
| | | </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> |
| | | laydate.render({ |
| | | elem: '#startTime', |
| | | range: true |
| | | }); |
| | | laydate.render({ |
| | | elem: '#startTime1', |
| | | range: true |
| | | }); |
| | | function updateMethod(e) { |
| | | console.log(e) |
| | | if(e==1){ |
| | | $("#y3").hide() |
| | | $("#y4").show() |
| | | }else if(e==2){ |
| | | $("#y4").show() |
| | | $("#y3").show() |
| | | }else if(e==3){ |
| | | $("#y1").hide() |
| | | $("#y2").show() |
| | | }else if(e==4){ |
| | | $("#y1").show() |
| | | $("#y2").show() |
| | | }else if(e==5) { |
| | | $("#y2").hide() |
| | | $("#y1").show() |
| | | } |
| | | |
| | | } |
| | | let i =1; |
| | | function updateType(e) { |
| | | |
| | | if(e==2){ |
| | | $("#b1").hide() |
| | | $("#b2").show() |
| | | if(i==1){ |
| | | var drivingLicensePhoto = new $WebUpload("cover1"); |
| | | drivingLicensePhoto.setUploadBarId("progressBar"); |
| | | drivingLicensePhoto.init(); |
| | | i++; |
| | | } |
| | | |
| | | }else { |
| | | $("#b2").hide() |
| | | $("#b1").show() |
| | |
| | | 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() { |
| | | }, |
| | | }); |
| | | var vue2 = new Vue({ |
| | | el: '#app1', |
| | | data: { |
| | | autoUpload: true,//自动上传 |
| | | imageUrl1: '',//模型数据,用于上传图片完成后图片预览 |
| | | dialogVisible: false |
| | | }, |
| | | methods: { |
| | | handleAvatarSuccess(res, file) { |
| | | TCarInfoDlg.goodsPicArray1.push(file); |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isLt2M = file.size / 1024 / 1024 < 10; |
| | |
| | | height: 100px; |
| | | width: 100px; |
| | | overflow: hidden; |
| | | display: inline-block; |
| | | } |
| | | |
| | | .avatar-uploader .el-upload:hover { |
| | |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <div id="b1"> |
| | | <input id="goodsId" value="${id}" hidden="hidden"> |
| | | |
| | | <#input id="name" name="商品名称" type="text" value="${item.name}" readonly="true" /> |
| | | |
| | | <#avatar id="cover" name="商品封面:" avatarImg="${item.cover}" /> |
| | |
| | | <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: 24%;margin-top: 1%"> |
| | | <div class="avatar-uploader" style="display: flex;"> |
| | | @for(im in pictures){ |
| | | <div style="margin-right: 16px;position: relative"> |
| | | <img height="100px" width="100px" src="${im}"> |
| | | <i class="el-icon-delete" onclick="delImg(this)" style="color: red;font-size: 18px;position: absolute;left: 0;right: 0;top: 0;bottom: 0"></i> |
| | | </div> |
| | | @} |
| | | <div class="col-sm-2" style="width: 100%;margin-left: 12%;margin-top: 1%"> |
| | | <el-upload |
| | | :limit="5" |
| | | class="avatar-uploader" |
| | |
| | | :on-remove="handleRemove"> |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | | </div> |
| | | <el-dialog :visible.sync="dialogVisible"> |
| | | <!-- <img width="100%" :src="imageUrl1" alt="">--> |
| | | @for(im in pictures){ |
| | | <img width="100%" src="${im}"> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <input id="quantityHas" value="${item.quantityHas}" hidden="hidden"> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">发放数量:</label> |
| | | <div class="col-sm-9"> |
| | |
| | | |
| | | <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="TGoodsInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TGoodsInfoDlg.close()"/> |
| | | <#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> |
| | | |
| | |
| | | }, |
| | | methods: { |
| | | handleAvatarSuccess(res, file) { |
| | | TGoodsInfoDlg.goodsPicArray.push(file.response); |
| | | TCarInfoDlg.goodsPicArray.push(file); |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isLt2M = file.size / 1024 / 1024 < 10; |
| | |
| | | return isLt2M; |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | TGoodsInfoDlg.goodsPicArray = TGoodsInfoDlg.goodsPicArray.filter(item => { |
| | | TCarInfoDlg.goodsPicArray = TCarInfoDlg.goodsPicArray.filter(item => { |
| | | return item.uid != file.uid; |
| | | }); |
| | | }, |
| | |
| | | <label for="editor_1">*答复内容:</label> |
| | | <textarea id="editor_1" type="text/plain" style="width:1200px;height:400px;"></textarea> |
| | | </div> |
| | | |
| | | <label for="sort">*排 序:</label> |
| | | <input type="text" id="sort" placeholder="请输入排序"><span> 数字越大,权重越大</span> |
| | | <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="add();" /> |
| | | <#button btnCss="info" name="关闭" id="close" icon="fa-check" clickFun="closeD();" /> |
| | | </div> |
| | | </div> |
| | | <label for="sort">*排 序:</label> |
| | | <input type="text" id="sort" placeholder="请输入排序"><span> 数字越大,权重越大</span> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | data: JSON.stringify(data), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | Feng.success("添加成功!"); |
| | | window.parent.TQuestion.table.refresh(); }, |
| | | window.parent.TQuestion.table.refresh(); |
| | | closeD(); |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "添加失败!"; |
| | | Feng.error(errorMessage); |
| | |
| | | <label for="editor_1">*答复内容:</label> |
| | | <textarea id="editor_1" type="text/plain" style="width:1200px;height:400px;">${info.answer}</textarea> |
| | | </div> |
| | | |
| | | <label for="sort">*排 序:</label> |
| | | <input type="text" id="sort" value="${info.sort}" placeholder="请输入排序"><span> 数字越大,权重越大</span> |
| | | <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="edit();" /> |
| | | <#button btnCss="info" name="关闭" id="close" icon="fa-check" clickFun="closeD();" /> |
| | | </div> |
| | | </div> |
| | | <label for="sort">*排 序:</label> |
| | | <input type="text" id="sort" value="${info.sort}" placeholder="请输入排序"><span> 数字越大,权重越大</span> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | data: JSON.stringify(data), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | window.parent.TQuestion.table.refresh(); |
| | | closeD(); |
| | | Feng.success("修改成功!"); |
| | | }, |
| | | error: function(xhr, status, error) { |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TQuestion = { |
| | | id: "TQuestionTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | var roleType = $("#roleType").val() |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TQuestion.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '省', field: 'province', visible: roleType==1?true:false, align: 'center', valign: 'middle'}, |
| | | {title: '市', field: 'city', visible: roleType==1?true: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: 'birthday', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '性别', field: 'gender', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return {1:"男",2:"女"}[data] |
| | | } |
| | | }, |
| | | {title: '销售人员', field: 'salesmanUserName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '是否为年度会员', field: 'isVip', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return {1:"是",0:"否"}[data] |
| | | } |
| | | }, |
| | | {title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return {1:"正常",2:"冻结",3:"已删除"}[data] |
| | | }} |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TQuestion.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TQuestion.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | TQuestion.dataCount = 0; |
| | | TQuestion.phone = ""; |
| | | TQuestion.phoneId = ""; |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TQuestion.openAdd = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加分类', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/appUser/add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 点击编辑 |
| | | */ |
| | | TQuestion.openChange = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length >1 ){ |
| | | Feng.info("只能选择一个问题进行编辑!"); |
| | | }else { |
| | | if (this.check()){ |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '编辑分类', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/bodySideAppointment/update/' + TQuestion.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 上架 |
| | | */ |
| | | |
| | | TQuestion.onShelf = function () { |
| | | if (this.check()){ |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | |
| | | var ids=[]; |
| | | selected.forEach(function(obj) { |
| | | var id = obj.id; |
| | | ids.push(id); |
| | | }); |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/bodySideAppointment/changeState", |
| | | type: "POST", |
| | | contentType: "application/json", // 设置请求头的 Content-Type |
| | | data: JSON.stringify(ids), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | Feng.success("修改成功!"); |
| | | TQuestion.search(); |
| | | |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "修改失败!"; |
| | | Feng.error("您的网络异常!"); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 下架 |
| | | */ |
| | | TQuestion.offShelf = function () { |
| | | |
| | | if (this.check()){ |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | const data1 = { |
| | | ids:[], |
| | | state:null |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | var id = obj.id; |
| | | data1.ids.push(id); |
| | | }); |
| | | data1.state = 2; |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/bodySideAppointment/changeState", |
| | | type: "POST", |
| | | contentType: "application/json", // 设置请求头的 Content-Type |
| | | data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | Feng.success("修改成功!"); |
| | | TQuestion.search(); |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "修改失败!"; |
| | | Feng.error("您的网络异常!"); |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查看视频详情 |
| | | */ |
| | | TQuestion.getInfo = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length >1 ){ |
| | | Feng.info("只能选择一条进行查看!"); |
| | | }else { |
| | | if (this.check()){ |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/benefits/getBenefitsVideos/' + TQuestion.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TQuestion.delete = function () { |
| | | if (this.check()){ |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | const data1 = { |
| | | ids:[], |
| | | state:null |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | var id = obj.id; |
| | | data1.ids.push(id); |
| | | }); |
| | | data1.state = 3; |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/benefits/changeState", |
| | | type: "POST", |
| | | contentType: "application/json", // 设置请求头的 Content-Type |
| | | data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | Feng.success("删除成功!"); |
| | | TQuestion.search(); |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "删除失败!"; |
| | | Feng.error(errorMessage); |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | TQuestion.oneChange = function () { |
| | | var province = $('#pCode option:selected').text(); |
| | | var citySelect = document.getElementById("cCode"); |
| | | var ajax = new $ax(Feng.ctxPath + "/tSite/getCity", function(data){ |
| | | if(data!=null){ |
| | | var content='<option value="">选择市</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.cityCode+"'>"+v.city+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | if (province === ""){ |
| | | citySelect.innerHTML = '<option value="">请先选择省</option>'; |
| | | } |
| | | ajax.set("province",province); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | TQuestion.oneChangeNext = function (e) { |
| | | var oneId=$(e).val(); |
| | | var city = $('#cCode option:selected').text(); |
| | | |
| | | var citySelect = document.getElementById("account"); |
| | | var storeSelect = document.getElementById("store"); |
| | | if (oneId === ""){ |
| | | citySelect.innerHTML = '<option style="width: 300px" value="">请先选择省/市</option>'; |
| | | storeSelect.innerHTML = '<option style="width: 300px" value="">请先选择省/市</option>'; |
| | | } |
| | | var ajax1 = new $ax(Feng.ctxPath + "/tSite/storeChangeNext", function(data){ |
| | | if(data!=null && data.length !== 0){ |
| | | var content='<option value="">选择门店</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option style='width: 300px' value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#store").empty().append(content); |
| | | }else { |
| | | storeSelect.innerHTML = '<option value="">当前所选市没有门店</option>'; |
| | | } |
| | | }); |
| | | ajax1.set("oneId",city); |
| | | ajax1.start(); |
| | | }; |
| | | TQuestion.addSubmit = function(){ |
| | | var data = { |
| | | id:null, |
| | | province:"", |
| | | provinceCode:"", |
| | | city:"", |
| | | cityCode:"", |
| | | storeId:null, |
| | | storeName:"", |
| | | parentName:"", |
| | | phone:"", |
| | | learnerName:"", |
| | | learnerAge:null, |
| | | birthday:"", |
| | | appointmentTime:"", |
| | | status:null, |
| | | state:null |
| | | }; |
| | | data.id = $("#name").val() |
| | | data.province = $('#pCode option:selected').text(); |
| | | data.provinceCode = $("#pCode").val() |
| | | data.city = $('#cCode option:selected').text(); |
| | | data.cityCode = $("#cCode").val() |
| | | data.storeId = $("#store").val() |
| | | data.storeName = $('#store option:selected').text(); |
| | | data.parentName = $("#parentName").val() |
| | | data.phone = $("#phone").val() |
| | | data.learnerName = $("#learnerName").val() |
| | | data.learnerAge = $("#learnerAge").val() |
| | | data.birthday = $("#birthday").val() |
| | | data.appointmentTime = $("#appointmentTime").val().replace("T"," ") |
| | | console.log("看看") |
| | | console.log(data.appointmentTime); |
| | | if($("#pCode").val()==''){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if($("#cCode").val()==''){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if($("#store").val()=='' ){ |
| | | Feng.info("请选择门店") |
| | | return; |
| | | } |
| | | if($("#parentName").val()=='' ){ |
| | | Feng.info("请输入家长姓名") |
| | | return; |
| | | } |
| | | |
| | | if($("#phone").val()=='' ){ |
| | | Feng.info("请输入家长联系方式") |
| | | return; |
| | | } |
| | | if($("#learnerName").val()=='' ){ |
| | | Feng.info("请输入学员姓名") |
| | | return; |
| | | } |
| | | if($("#learnerAge").val()=='' ){ |
| | | Feng.info("请输入学员年龄") |
| | | return; |
| | | } |
| | | if($("#birthday").val()=='' ){ |
| | | Feng.info("请选择学员生日") |
| | | return; |
| | | } |
| | | if($("#appointmentTime").val()=='' ){ |
| | | Feng.info("请选择预约时间") |
| | | return; |
| | | } |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/appUser/addAppUser" , |
| | | type: "POST", |
| | | data: JSON.stringify(data), |
| | | contentType: "application/json", |
| | | success: function (response) { |
| | | window.parent.TQuestion.table.refresh(); |
| | | TQuestion.close(); |
| | | Feng.success("添加成功"); |
| | | }, |
| | | error: function (xhr, status, error) { |
| | | Feng.error("添加失败!" + error); |
| | | } |
| | | }); |
| | | |
| | | }; |
| | | TQuestion.updateSubmit = function(){ |
| | | var data = { |
| | | id:null, |
| | | name:"", |
| | | position:"", |
| | | sort:"", |
| | | }; |
| | | data.name = $("#name").val() |
| | | data.position = $("#position").val() |
| | | data.sort = $("#sort").val() |
| | | data.id = $("#dataId").val() |
| | | if($("#name").val()==''){ |
| | | Feng.info("请输入分类名称") |
| | | return; |
| | | } |
| | | if($("#cCode").val()==''){ |
| | | Feng.info("请选择所在位置") |
| | | return; |
| | | } |
| | | if($("#account").val()=='' ){ |
| | | Feng.info("请输入排序") |
| | | return; |
| | | } |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/benefits/addBenefits" , |
| | | type: "POST", |
| | | data: JSON.stringify(data), |
| | | contentType: "application/json", |
| | | success: function (response) { |
| | | window.parent.TQuestion.table.refresh(); |
| | | TQuestion.close(); |
| | | Feng.success("添加成功"); |
| | | }, |
| | | error: function (xhr, status, error) { |
| | | Feng.error("添加失败!" + error); |
| | | } |
| | | }); |
| | | }; |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TQuestion.search = function (e) { |
| | | var queryData = {}; |
| | | queryData['province'] = $("#pCode").val(); |
| | | queryData['city'] = $("#cCode").val(); |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['phone'] = $("#phone").val(); |
| | | queryData['isVip'] = $("#isVip").val(); |
| | | queryData['salesmanUserName'] = $("#salesmanUserName").val(); |
| | | TQuestion.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TQuestion.close = function() { |
| | | parent.layer.close(window.parent.TQuestion.layerIndex); |
| | | } |
| | | /** |
| | | * 重置搜索 |
| | | */ |
| | | TQuestion.resetSearch = function () { |
| | | $("#pCode").val(''); |
| | | $("#cCode").val(''); |
| | | $("#name").val(''); |
| | | $("#phone").val(''); |
| | | $("#isVip").val(''); |
| | | $("#salesmanUserName").val(''); |
| | | TQuestion.search(null); |
| | | }; |
| | | |
| | | |
| | | $(function () { |
| | | var defaultColunms = TQuestion.initColumn(); |
| | | var table = new BSTable(TQuestion.id, "/appUser/listAll", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TQuestion.table = table.init(); |
| | | }); |
| | |
| | | }} |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TQuestion.close = function() { |
| | | parent.layer.close(window.parent.TQuestion.layerIndex); |
| | | } |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | |
| | | data: JSON.stringify(data), |
| | | contentType: "application/json", |
| | | success: function (response) { |
| | | window.parent.TQuestion.table.refresh(); |
| | | TQuestion.close(); |
| | | Feng.success("添加成功"); |
| | | |
| | | }, |
| | |
| | | Feng.error("添加失败!" + error); |
| | | } |
| | | }); |
| | | TSite.search(); |
| | | |
| | | }; |
| | | TQuestion.updateSubmit = function(){ |
| | | var data = { |
| | |
| | | data: JSON.stringify(data), |
| | | contentType: "application/json", |
| | | success: function (response) { |
| | | window.parent.TQuestion.table.refresh(); |
| | | TQuestion.close(); |
| | | Feng.success("添加成功"); |
| | | }, |
| | | error: function (xhr, status, error) { |
| | | Feng.error("添加失败!" + error); |
| | | } |
| | | }); |
| | | TSite.search(); |
| | | |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | TQuestion.close = function() { |
| | | parent.layer.close(window.parent.TQuestion.layerIndex); |
| | | } |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | |
| | | data: JSON.stringify(data), |
| | | contentType: "application/json", |
| | | success: function (response) { |
| | | window.parent.TQuestion.table.refresh(); |
| | | TQuestion.close(); |
| | | Feng.success("添加成功"); |
| | | |
| | | }, |
| | |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | TQuestion.close = function() { |
| | | parent.layer.close(window.parent.TQuestion.layerIndex); |
| | | } |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | |
| | | success: function (response) { |
| | | if (response === 500){ |
| | | Feng.error("所选视频已经存在于当前福利视频分类下!"); |
| | | window.parent.TQuestion.table.refresh(); |
| | | TQuestion.close(); |
| | | |
| | | }else{ |
| | | Feng.success("添加成功"); |
| | | } |
| | |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | TQuestion.close = function() { |
| | | parent.layer.close(window.parent.TQuestion.layerIndex); |
| | | } |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | |
| | | data: JSON.stringify(data), |
| | | contentType: "application/json", |
| | | success: function (response) { |
| | | window.parent.TQuestion.table.refresh(); |
| | | TQuestion.close(); |
| | | Feng.success("添加成功"); |
| | | |
| | | }, |
| | |
| | | }); |
| | | TSite.search(); |
| | | }; |
| | | TQuestion.close = function() { |
| | | parent.layer.close(window.parent.TQuestion.layerIndex); |
| | | }; |
| | | TQuestion.updateSubmit = function(){ |
| | | var data = { |
| | | id:null, |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/benefits/update/' + TQuestion.seItem.id |
| | | content: Feng.ctxPath + '/bodySideAppointment/update/' + TQuestion.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | |
| | | contentType: "application/json", // 设置请求头的 Content-Type |
| | | data: JSON.stringify(ids), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | Feng.success("上架成功!"); |
| | | Feng.success("修改成功!"); |
| | | TQuestion.search(); |
| | | |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "上架失败!"; |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "修改失败!"; |
| | | Feng.error("您的网络异常!"); |
| | | } |
| | | }); |
| | |
| | | contentType: "application/json", // 设置请求头的 Content-Type |
| | | data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | Feng.success("下架成功!"); |
| | | Feng.success("修改成功!"); |
| | | TQuestion.search(); |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "下架失败!"; |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "修改失败!"; |
| | | Feng.error("您的网络异常!"); |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | /** |
| | | * 查看详情 |
| | | */ |
| | | TQuestion.getInfo = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length >1 ){ |
| | | Feng.info("只能选择一条进行查看!"); |
| | | }else { |
| | | if (this.check()){ |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/benefits/info/' + TQuestion.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | }; |
| | | |
| | |
| | | ajax1.start(); |
| | | }; |
| | | TQuestion.addSubmit = function(){ |
| | | |
| | | var data = { |
| | | id:null, |
| | | province:"", |
| | |
| | | data: JSON.stringify(data), |
| | | contentType: "application/json", |
| | | success: function (response) { |
| | | window.parent.TQuestion.table.refresh(); |
| | | TQuestion.close(); |
| | | Feng.success("添加成功"); |
| | | }, |
| | | error: function (xhr, status, error) { |
| | |
| | | data: JSON.stringify(data), |
| | | contentType: "application/json", |
| | | success: function (response) { |
| | | window.parent.TQuestion.table.refresh(); |
| | | TQuestion.close(); |
| | | Feng.success("添加成功"); |
| | | }, |
| | | error: function (xhr, status, error) { |
| | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TQuestion.search = function () { |
| | | TQuestion.search = function (e) { |
| | | |
| | | var queryData = {}; |
| | | |
| | | queryData['phone'] = $("#phone").val(); |
| | | queryData['parentName'] = $("#parentName").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | queryData['day'] = e; |
| | | TQuestion.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | |
| | | TQuestion.close = function() { |
| | | parent.layer.close(window.parent.TQuestion.layerIndex); |
| | | } |
| | | /** |
| | | * 重置搜索 |
| | | */ |
| | |
| | | $("#phone").val(''); |
| | | $("#parentName").val(''); |
| | | $("#state").val(''); |
| | | TQuestion.search(); |
| | | TQuestion.search(null); |
| | | }; |
| | | |
| | | |
| | | $(function () { |
| | | var defaultColunms = TQuestion.initColumn(); |
| | | var table = new BSTable(TQuestion.id, "/bodySideAppointment/listAll", defaultColunms); |
| | |
| | | TQuestion.dataCount = 0; |
| | | TQuestion.phone = ""; |
| | | TQuestion.phoneId = ""; |
| | | // 选择省 获取对应市区 |
| | | TQuestion.oneChange = function () { |
| | | var province = $('#pCode option:selected').text(); |
| | | var citySelect = document.getElementById("cCode"); |
| | | var storeSelect = document.getElementById("store"); |
| | | var ajax = new $ax(Feng.ctxPath + "/tSite/getCity", function(data){ |
| | | if(data!=null){ |
| | | var content='<option value="">选择市</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.cityCode+"'>"+v.city+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | if (province === ""){ |
| | | citySelect.innerHTML = '<option value="">请先选择省</option>'; |
| | | storeSelect.innerHTML = '<option value="">请先选择省</option>'; |
| | | }else{ |
| | | citySelect.innerHTML = '<option value="">请选择市</option>'; |
| | | storeSelect.innerHTML = '<option value="">请先选择市区</option>'; |
| | | } |
| | | ajax.set("province",province); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | // 选择市 获取对应门店 |
| | | TQuestion.oneChangeNext = function (e) { |
| | | var oneId=$(e).val(); |
| | | var city = $('#cCode option:selected').text(); |
| | | |
| | | var citySelect = document.getElementById("account"); |
| | | var storeSelect = document.getElementById("store"); |
| | | if (oneId === ""){ |
| | | citySelect.innerHTML = '<option style="width: 300px" value="">请先选择省/市</option>'; |
| | | storeSelect.innerHTML = '<option style="width: 300px" value="">请先选择省/市</option>'; |
| | | } |
| | | var ajax1 = new $ax(Feng.ctxPath + "/tSite/storeChangeNext", function(data){ |
| | | if(data!=null && data.length !== 0){ |
| | | var content='<option value="">选择门店</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option style='width: 300px' value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#store").empty().append(content); |
| | | }else { |
| | | storeSelect.innerHTML = '<option value="">当前所选市没有门店</option>'; |
| | | } |
| | | }); |
| | | ajax1.set("oneId",city); |
| | | ajax1.start(); |
| | | }; |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | TQuestion.close = function() { |
| | | parent.layer.close(window.parent.TQuestion.layerIndex); |
| | | }; |
| | | TQuestion.addSubmit = function(){ |
| | | var data = { |
| | | id:null, |
| | | name:"", |
| | | position:"", |
| | | sort:"", |
| | | province:"", |
| | | provinceCode:"", |
| | | city:"", |
| | | cityCode:"", |
| | | storeId:null, |
| | | storeName:"", |
| | | parentName:"", |
| | | phone:"", |
| | | learnerName:"", |
| | | learnerAge:null, |
| | | birthday:"", |
| | | appointmentTime:"", |
| | | status:null, |
| | | state:null |
| | | }; |
| | | data.name = $("#name").val() |
| | | data.position = $("#position").val() |
| | | data.sort = $("#sort").val() |
| | | data.id = $("#id").val() |
| | | data.province = $('#pCode option:selected').text(); |
| | | data.provinceCode = $("#pCode").val() |
| | | data.city = $('#cCode option:selected').text(); |
| | | data.cityCode = $("#cCode").val() |
| | | data.storeId = $("#store").val() |
| | | data.storeName = $('#store option:selected').text(); |
| | | data.parentName = $("#parentName").val() |
| | | data.phone = $("#phone").val() |
| | | data.learnerName = $("#learnerName").val() |
| | | data.learnerAge = $("#learnerAge").val() |
| | | data.birthday = $("#birthday").val() |
| | | data.appointmentTime = $("#appointmentTime").val().replace("T"," ") |
| | | var roleType = $("#roleType").val() |
| | | |
| | | |
| | | if($("#name").val()==''){ |
| | | Feng.info("请输入分类名称") |
| | | if(roleType == 1){ |
| | | if($("#pCode").val()==''){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if($("#cCode").val()==''){ |
| | | Feng.info("请选择所在位置") |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if($("#account").val()=='' ){ |
| | | Feng.info("请输入排序") |
| | | } |
| | | if(roleType == 1 || roleType == 2) { |
| | | if ($("#store").val() == '') { |
| | | Feng.info("请选择门店") |
| | | return; |
| | | } |
| | | } |
| | | if($("#parentName").val()=='' ){ |
| | | Feng.info("请输入家长姓名") |
| | | return; |
| | | } |
| | | |
| | | if($("#phone").val()=='' ){ |
| | | Feng.info("请输入家长联系方式") |
| | | return; |
| | | } |
| | | if($("#learnerName").val()=='' ){ |
| | | Feng.info("请输入学员姓名") |
| | | return; |
| | | } |
| | | if($("#learnerAge").val()=='' ){ |
| | | Feng.info("请输入学员年龄") |
| | | return; |
| | | } |
| | | if($("#birthday").val()=='' ){ |
| | | Feng.info("请选择学员生日") |
| | | return; |
| | | } |
| | | if($("#appointmentTime").val()=='' ){ |
| | | Feng.info("请选择预约时间") |
| | | return; |
| | | } |
| | | |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/benefits/addBenefits" , |
| | | url: Feng.ctxPath + "/bodySideAppointment/addBodySideAppointments" , |
| | | type: "POST", |
| | | data: JSON.stringify(data), |
| | | contentType: "application/json", |
| | | success: function (response) { |
| | | Feng.success("添加成功"); |
| | | |
| | | window.parent.TQuestion.table.refresh(); |
| | | TQuestion.close(); |
| | | Feng.success("修改成功"); |
| | | }, |
| | | error: function (xhr, status, error) { |
| | | Feng.error("添加失败!" + error); |
| | | Feng.error("修改失败!" + error); |
| | | } |
| | | }); |
| | | TSite.search(); |
| | | }; |
| | | TQuestion.updateSubmit = function(){ |
| | | var data = { |
| | | id:null, |
| | | name:"", |
| | | position:"", |
| | | sort:"", |
| | | }; |
| | | data.name = $("#name").val() |
| | | data.position = $("#position").val() |
| | | data.sort = $("#sort").val() |
| | | data.id = $("#dataId").val() |
| | | if($("#name").val()==''){ |
| | | Feng.info("请输入分类名称") |
| | | return; |
| | | } |
| | | if($("#cCode").val()==''){ |
| | | Feng.info("请选择所在位置") |
| | | return; |
| | | } |
| | | if($("#account").val()=='' ){ |
| | | Feng.info("请输入排序") |
| | | return; |
| | | } |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/benefits/addBenefits" , |
| | | type: "POST", |
| | | data: JSON.stringify(data), |
| | | contentType: "application/json", |
| | | success: function (response) { |
| | | Feng.success("添加成功"); |
| | | }, |
| | | error: function (xhr, status, error) { |
| | | Feng.error("添加失败!" + error); |
| | | } |
| | | }); |
| | | TSite.search(); |
| | | }; |
| | | /** |
| | | * 查询列表 |
| | |
| | | var em = "";// 门店经营结束时间:分钟 |
| | | |
| | | TSite.addSubmit = function(){ |
| | | |
| | | var data = { |
| | | province:"", |
| | | city:"", |
| | |
| | | data: JSON.stringify(data), |
| | | contentType: "application/json", |
| | | success: function (response) { |
| | | window.parent.TSite.table.refresh(); |
| | | Feng.success("添加成功"); |
| | | TSite.search(); |
| | | TSite.close(); |
| | | }, |
| | | error: function (xhr, status, error) { |
| | | Feng.error("添加失败!" + error); |
| | |
| | | data: JSON.stringify(data), |
| | | contentType: "application/json", |
| | | success: function (response) { |
| | | window.parent.TSite.table.refresh(); |
| | | TSite.close(); |
| | | Feng.success("添加成功"); |
| | | |
| | | }, |
| | |
| | | Feng.error("添加失败!" + error); |
| | | } |
| | | }); |
| | | TSite.search(); |
| | | }; |
| | | |
| | | TSite.search = function () { |
| | |
| | | data: JSON.stringify(data), |
| | | contentType: "application/json", |
| | | success: function (response) { |
| | | window.parent.TSite.table.refresh(); |
| | | TSiteInfo.close(); |
| | | Feng.success("修改成功"); |
| | | }, |
| | | error: function (xhr, status, error) { |
| | |
| | | } |
| | | } |
| | | cts = cityIds.join(','); |
| | | }else { |
| | | cts = cityIds; |
| | | } |
| | | } |
| | | |
| | |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'详情', |
| | | title:'编辑', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tGoods/goods_info/' + TPointProducts.seItem.id |
| | | content: Feng.ctxPath + '/tGoods/tCity_update/' + TPointProducts.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | |
| | | * 初始化车辆管理详情对话框 |
| | | */ |
| | | var language=1; |
| | | var TGoodsInfoDlg = { |
| | | tGoodsInfoData : {}, |
| | | var TCarInfoDlg = { |
| | | tCarInfoData : {}, |
| | | validateFields: { |
| | | }, |
| | | goodsPicArray:[], |
| | | goodsPicArray1:[], |
| | | storeIds: [], |
| | | |
| | | }; |
| | |
| | | /** |
| | | * 验证数据是否为空 |
| | | */ |
| | | TGoodsInfoDlg.validate = function () { |
| | | TCarInfoDlg.validate = function () { |
| | | $('#carInfoForm').data("bootstrapValidator").resetForm(); |
| | | $('#carInfoForm').bootstrapValidator('validate'); |
| | | return $("#carInfoForm").data('bootstrapValidator').isValid(); |
| | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TGoodsInfoDlg.clearData = function() { |
| | | this.tGoodsInfoData = {}; |
| | | TCarInfoDlg.clearData = function() { |
| | | this.tCarInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TGoodsInfoDlg.set = function(key, val) { |
| | | this.tGoodsInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | TCarInfoDlg.set = function(key, val) { |
| | | this.tCarInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TGoodsInfoDlg.get = function(key) { |
| | | TCarInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TGoodsInfoDlg.close = function() { |
| | | TCarInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TPointProducts.layerIndex); |
| | | } |
| | | |
| | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TGoodsInfoDlg.collectData = function() { |
| | | TCarInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('isPlatCar') |
| | |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | TGoodsInfoDlg.selecUserOpt = function (arrays){ |
| | | TCarInfoDlg.selecUserOpt = function (arrays){ |
| | | console.log(arrays) |
| | | //获取所有的值 |
| | | var subArr= this.storeIds; |
| | |
| | | console.log(e); |
| | | var row = $(e).closest('tr'); |
| | | var value = row.find('#id').val(); |
| | | TGoodsInfoDlg.storeIds.splice(TGoodsInfoDlg.storeIds.indexOf(parseInt(value)), 1) |
| | | TCarInfoDlg.storeIds.splice(TCarInfoDlg.storeIds.indexOf(parseInt(value)), 1) |
| | | $(e).parent().parent().remove(); |
| | | console.log('storeIds',TGoodsInfoDlg.storeIds) |
| | | console.log('storeIds',TCarInfoDlg.storeIds) |
| | | } |
| | | TGoodsInfoDlg.delete = function (o) { |
| | | TCarInfoDlg.delete = function (o) { |
| | | $(o).parent("div").remove() |
| | | } |
| | | var num = 0; |
| | | TGoodsInfoDlg.addBranch = function () { |
| | | TCarInfoDlg.addBranch = function () { |
| | | num=num+1; |
| | | var a= ""; |
| | | a = "<div style=\'margin-left: 25%\' class=\"col-sm-9 control-label\">\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=\"TGoodsInfoDlg.delete(this)\" style=\"border: 0px;cursor: pointer;margin-top: 1%\"><i class=\"fa fa-trash\"></i></label>"+ |
| | | " <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); |
| | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TGoodsInfoDlg.addSubmit = function() { |
| | | TCarInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | let typeAll = document.querySelector('input[name="type"]:checked').value; |
| | | if(typeAll==2){ |
| | | |
| | | let pCode = $("#pCode").val() |
| | | let cCode = $("#cCode").val() |
| | | let name = $("#name").val() |
| | | let phone = $("#phone").val() |
| | | |
| | | if(pCode==''){ |
| | | Feng.info("请选择省") |
| | | return; |
| | |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | let storeId = $("#storeId").val() |
| | | if(storeId==''){ |
| | | Feng.info("请选择门店") |
| | | if(name==''){ |
| | | Feng.info("管理员姓名不能为空") |
| | | return; |
| | | } |
| | | let coursePackageTypeId = $("#coursePackageTypeId").val() |
| | | if(coursePackageTypeId==''){ |
| | | Feng.info("请选择课包类型") |
| | | if(phone==''){ |
| | | Feng.info("管理员手机号不能为空") |
| | | return; |
| | | } |
| | | let coursePackageId = $("#coursePackageId").val() |
| | | if(coursePackageId==''){ |
| | | Feng.info("请选择课包") |
| | | return; |
| | | } |
| | | let coursePackageConfigId = $("#coursePackageConfigId").val() |
| | | if(coursePackageConfigId==''){ |
| | | Feng.info("请选择课时数") |
| | | return; |
| | | } |
| | | let price = $("#price1").val() |
| | | if(price==''){ |
| | | Feng.info("请填写原价") |
| | | return; |
| | | } |
| | | let type = document.querySelector('input[name="redemptionMethod"]:checked').value; |
| | | if(type==''){ |
| | | Feng.info("请选择兑换方式") |
| | | return; |
| | | } |
| | | let integral=''; |
| | | let cash=''; |
| | | if(type==1){ |
| | | integral = $("#integral1").val() |
| | | if(integral==''){ |
| | | Feng.info("请填写所需积分") |
| | | return; |
| | | } |
| | | } |
| | | if(type==2){ |
| | | integral = $("#integral1").val() |
| | | if(integral==''){ |
| | | Feng.info("请填写所需积分") |
| | | return; |
| | | } |
| | | cash = $("#cash1").val() |
| | | if(cash==''){ |
| | | Feng.info("请填写所需现金") |
| | | return; |
| | | } |
| | | } |
| | | |
| | | let cover1 = $("#cover1").val() |
| | | // if(cover1==''){ |
| | | // Feng.info("请上传封面") |
| | | // return; |
| | | // } |
| | | var goodImgs = this.goodsPicArray1; |
| | | var imgOne =""; |
| | | if(goodImgs.length==0){ |
| | | }else { |
| | | for (let i = 0; i <goodImgs.length; i++) { |
| | | if(i==goodImgs.length-1){ |
| | | imgOne += (goodImgs[i].response) |
| | | }else { |
| | | imgOne+=(goodImgs[i].response+",") |
| | | } |
| | | } |
| | | } |
| | | |
| | | let userPopulation = document.querySelector('input[name="userPopulation"]:checked').value; |
| | | if(userPopulation==''){ |
| | | Feng.info("请选择用户人群") |
| | | return; |
| | | } |
| | | |
| | | let quantityIssued = $("#quantityIssued1").val() |
| | | if(quantityIssued==''){ |
| | | Feng.info("请填写发放数量") |
| | | return; |
| | | } |
| | | let pickUpQuantity = $("#pickUpQuantity1").val() |
| | | if(pickUpQuantity==''){ |
| | | Feng.info("请填写限领数量") |
| | | return; |
| | | } |
| | | let startTime = $("#startTime1").val() |
| | | if(startTime==''){ |
| | | Feng.info("请选择有效期") |
| | | return; |
| | | } |
| | | let text = TGoodsInfoDlg.editor1.getContent(); |
| | | console.log(text) |
| | | if(text==""){ |
| | | Feng.info("请输入兑换说明") |
| | | return; |
| | | } |
| | | |
| | | let sort = $("#sort1").val() |
| | | if(sort==''){ |
| | | Feng.info("请填写排序") |
| | | return; |
| | | } |
| | | |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tGoods/add", function(data){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/add", function(data){ |
| | | if(data=="5001"){ |
| | | Feng.error("改账号已经存在"); |
| | | }else |
| | |
| | | }else { |
| | | Feng.success("Sangat berhasil ditambah!"); |
| | | } |
| | | window.parent.TPointProducts.table.refresh(); |
| | | TGoodsInfoDlg.close(); |
| | | window.parent.TCompetition.table.refresh(); |
| | | TCarInfoDlg.close(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("typeAll",typeAll); |
| | | ajax.set(this.tCarInfoData); |
| | | ajax.set("provinceCode",pCode); |
| | | ajax.set("cityCode",cCode); |
| | | ajax.set("storeId",storeId); |
| | | ajax.set("coursePackageTypeId",coursePackageTypeId); |
| | | ajax.set("coursePackageId",coursePackageId); |
| | | ajax.set("coursePackageConfigId",coursePackageConfigId); |
| | | ajax.set("price",price); |
| | | ajax.set("type",type); |
| | | ajax.set("integral",integral); |
| | | ajax.set("cash",cash); |
| | | ajax.set("cover",cover1); |
| | | ajax.set("imgOne",imgOne); |
| | | ajax.set("userPopulation",userPopulation); |
| | | ajax.set("quantityIssued",quantityIssued); |
| | | ajax.set("pickUpQuantity",pickUpQuantity); |
| | | ajax.set("startTime",startTime); |
| | | ajax.set("text",text); |
| | | ajax.set("sort",sort); |
| | | ajax.start(); |
| | | |
| | | }else { |
| | | let name = $("#name").val() |
| | | if(name==''){ |
| | | Feng.info("请填写商品名称") |
| | | return; |
| | | } |
| | | let price = $("#price").val() |
| | | if(price==''){ |
| | | Feng.info("请填写原价") |
| | | return; |
| | | } |
| | | let type = document.querySelector('input[name="redemptionMethod"]:checked').value; |
| | | if(type==''){ |
| | | Feng.info("请选择兑换方式") |
| | | return; |
| | | } |
| | | |
| | | let integral=''; |
| | | let cash=''; |
| | | if(type==1){ |
| | | integral = $("#integral").val() |
| | | if(integral==''){ |
| | | Feng.info("请填写所需积分") |
| | | return; |
| | | } |
| | | } |
| | | if(type==2){ |
| | | integral = $("#integral").val() |
| | | if(integral==''){ |
| | | Feng.info("请填写所需积分") |
| | | return; |
| | | } |
| | | cash = $("#cash").val() |
| | | if(cash==''){ |
| | | Feng.info("请填写所需现金") |
| | | return; |
| | | } |
| | | } |
| | | if(type==3){ |
| | | cash = $("#cash").val() |
| | | if(cash==''){ |
| | | Feng.info("请填写所需现金") |
| | | return; |
| | | } |
| | | } |
| | | |
| | | let cover1 = $("#cover").val() |
| | | var goodImgs = this.goodsPicArray; |
| | | var imgOne =""; |
| | | if(goodImgs.length==0){ |
| | | }else { |
| | | for (let i = 0; i <goodImgs.length; i++) { |
| | | if(i==goodImgs.length-1){ |
| | | imgOne += (goodImgs[i].response) |
| | | }else { |
| | | imgOne+=(goodImgs[i].response+",") |
| | | } |
| | | } |
| | | } |
| | | |
| | | let userPopulation = document.querySelector('input[name="userPopulation"]:checked').value; |
| | | if(userPopulation==''){ |
| | | Feng.info("请选择用户人群") |
| | | return; |
| | | } |
| | | |
| | | let quantityIssued = $("#quantityIssued").val() |
| | | if(quantityIssued==''){ |
| | | Feng.info("请填写发放数量") |
| | | return; |
| | | } |
| | | let pickUpQuantity = $("#pickUpQuantity").val() |
| | | if(pickUpQuantity==''){ |
| | | Feng.info("请填写限领数量") |
| | | return; |
| | | } |
| | | let startTime = $("#startTime").val() |
| | | if(startTime==''){ |
| | | Feng.info("请选择有效期") |
| | | return; |
| | | } |
| | | |
| | | let company = document.querySelector('input[name="company"]:checked').value; |
| | | |
| | | var cityIds = []; |
| | | var cts = ""; |
| | | if (company === '2'){ |
| | | var myselect=document.getElementById('cityData'); |
| | | var seCity = myselect.options[myselect.selectedIndex].value; |
| | | if (seCity === null || seCity === undefined || seCity === ''){ |
| | | return Feng.error('请选中一个省市'); |
| | | } |
| | | cityIds.push(seCity); |
| | | if (num > 0){ |
| | | for (let i = 1; i <= num; i++) { |
| | | var insSelect=document.getElementById('cityData'+i); |
| | | var inData = insSelect.options[insSelect.selectedIndex].value; |
| | | if (inData !== undefined || inData !== null || inData !== ''){ |
| | | cityIds.push(inData); |
| | | } |
| | | } |
| | | cts = cityIds.join(','); |
| | | }else { |
| | | cts = cityIds |
| | | } |
| | | } |
| | | |
| | | const commaSeparatedString = this.goodsPicArray.join(','); |
| | | |
| | | var stores = ""; |
| | | if (company === '3'){ |
| | | console.log('3---this.storeIds',this.storeIds); |
| | | if (TGoodsInfoDlg.storeIds.length === 0 ){ |
| | | return Feng.error('请至少选择一个门店'); |
| | | } |
| | | stores = this.storeIds.join(','); |
| | | console.log('stores--===--',stores) |
| | | } |
| | | |
| | | let text = TGoodsInfoDlg.editor.getContent(); |
| | | console.log(text) |
| | | if(text==""){ |
| | | Feng.info("请输入兑换说明") |
| | | return; |
| | | } |
| | | |
| | | let sort = $("#sort").val() |
| | | if(sort==''){ |
| | | Feng.info("请填写排序") |
| | | return; |
| | | } |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tGoods/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.TPointProducts.table.refresh(); |
| | | TGoodsInfoDlg.close(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("typeAll",typeAll); |
| | | ajax.set("name",name); |
| | | ajax.set("price",price); |
| | | ajax.set("type",type); |
| | | ajax.set("integral",integral); |
| | | ajax.set("cash",cash); |
| | | ajax.set("cover",cover1); |
| | | ajax.set("imgOne",imgOne); |
| | | ajax.set("userPopulation",userPopulation); |
| | | ajax.set("quantityIssued",quantityIssued); |
| | | ajax.set("pickUpQuantity",pickUpQuantity); |
| | | ajax.set("startTime",startTime); |
| | | ajax.set("useScope",company); |
| | | ajax.set("cityIds",cts); |
| | | ajax.set("storeIds",stores); |
| | | ajax.set("text",text); |
| | | ajax.set("sort",sort); |
| | | ajax.set("phone",phone); |
| | | ajax.start(); |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 删除图片的函数 |
| | | * @param e |
| | | */ |
| | | function delImg(e){ |
| | | |
| | | $(e).parent().remove(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TGoodsInfoDlg.editSubmit = function() { |
| | | let cover = $("#cover").val(); |
| | | let goodsId = $("#goodsId").val(); |
| | | var productImages = ""; |
| | | if (TGoodsInfoDlg.goodsPicArray.length > 0){ |
| | | productImages = TGoodsInfoDlg.goodsPicArray.join(','); |
| | | } |
| | | let quantityIssued = $("#quantityIssued").val(); |
| | | let pickUpQuantity = $("#pickUpQuantity").val(); |
| | | let editor = jQuery.trim(TGoodsInfoDlg.editor.getContent()); |
| | | console.log('editor:',editor) |
| | | TCarInfoDlg.editSubmit = function() { |
| | | |
| | | let sort = $("#sort").val(); |
| | | 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 (quantityIssued === undefined || quantityIssued === null || quantityIssued === ''){ |
| | | return Feng.error('发放数量不能为空!'); |
| | | if(pCode==''){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if (pickUpQuantity === undefined || pickUpQuantity === null || pickUpQuantity === ''){ |
| | | return Feng.error('限领数量不能为空!'); |
| | | if(cCode==''){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | let quantityHas = $("#quantityHas").val(); |
| | | if (quantityIssued <= quantityHas){ |
| | | return Feng.error('发放数量小于已领数量!'); |
| | | if(name==''){ |
| | | Feng.info("管理员姓名不能为空") |
| | | return; |
| | | } |
| | | |
| | | |
| | | if (editor === undefined || editor === null || editor === ''){ |
| | | return Feng.error('兑换说明不能为空!'); |
| | | if(phone==''){ |
| | | Feng.info("管理员手机号不能为空") |
| | | return; |
| | | } |
| | | if (sort === undefined || sort === null || sort === ''){ |
| | | return Feng.error('排序不能为空!'); |
| | | } |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tGoods/update", function(data){ |
| | | 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("修改成功!"); |
| | | window.parent.TPointProducts.table.refresh(); |
| | | TGoodsInfoDlg.close(); |
| | | }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("pointMerchandiseId",goodsId); |
| | | ajax.set("quantityIssued",quantityIssued); |
| | | ajax.set("pickUpQuantity",pickUpQuantity); |
| | | ajax.set("redemptionInstructions",editor); |
| | | ajax.set("cover",cover); |
| | | ajax.set("productImages",productImages); |
| | | ajax.set("sort",sort); |
| | | 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", TGoodsInfoDlg.validateFields); |
| | | Feng.initValidator("carInfoForm", TCarInfoDlg.validateFields); |
| | | // 初始化图片上传 |
| | | var carPhoto = new $WebUpload("cover"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | |
| | | var drivingLicensePhoto = new $WebUpload("drivingLicensePhoto"); |
| | | drivingLicensePhoto.setUploadBarId("progressBar"); |
| | | drivingLicensePhoto.init(); |
| | | var drivingLicensePhoto = new $WebUpload("drivingLicensePhoto"); |
| | | drivingLicensePhoto.setUploadBarId("progressBar"); |
| | | drivingLicensePhoto.init(); |
| | | TGoodsInfoDlg.editor = UE.getEditor('editor'); |
| | | TGoodsInfoDlg.editor1 = UE.getEditor('editor1'); |
| | | TCarInfoDlg.editor = UE.getEditor('editor'); |
| | | }); |
| | | |
| | | /** |
| | | * 选择分公司后执行 |
| | | */ |
| | | TGoodsInfoDlg.oneChange = function (e) { |
| | | TCarInfoDlg.oneChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/onChange", function(data){ |
| | | if(data!=null){ |
| | |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | TGoodsInfoDlg.storeChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/storeChange", 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.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#storeId").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | TGoodsInfoDlg.packageChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/packageChange", 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.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#coursePackageId").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | TGoodsInfoDlg.timeChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/timeChange", 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.id+"'>"+v.classHours+"</option>"; |
| | | }); |
| | | $("#coursePackageConfigId").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 类型改变执行 |
| | | * @param e |
| | | */ |
| | | TGoodsInfoDlg.companyTypeClick = function (e) { |
| | | TCarInfoDlg.companyTypeClick = function (e) { |
| | | if (1 == e){ |
| | | $(".companyDiv").hide(); |
| | | } else if (2 == e){ |
| | |
| | | /** |
| | | * 车辆品牌改变时执行 |
| | | */ |
| | | TGoodsInfoDlg.brandChange = function (e) { |
| | | TCarInfoDlg.brandChange = function (e) { |
| | | var carBrandId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCar/brandChange", function(data){ |
| | | if(data!=null){ |
| | |
| | | /** |
| | | * 专车服务被点击 |
| | | */ |
| | | TGoodsInfoDlg.zcServerClick = function () { |
| | | TCarInfoDlg.zcServerClick = function () { |
| | | var serverBox1 = $('#serverBox1').prop('checked'); |
| | | if (serverBox1){ |
| | | $("#zcModelDiv").show(); |
| | |
| | | /** |
| | | * 跨城服务被点击 |
| | | */ |
| | | TGoodsInfoDlg.kcServerClick = function () { |
| | | TCarInfoDlg.kcServerClick = function () { |
| | | var serverBox3 = $('#serverBox3').prop('checked'); |
| | | if (serverBox3){ |
| | | $("#kcModelDiv").show(); |
| | |
| | | {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] |
| | | return {1: "未使用", 2: "待核销"}[value] |
| | | } |
| | | }, |
| | | ]; |
| | |
| | | * @constructor |
| | | */ |
| | | TPayInfo.WriteOff = function (){ |
| | | if (TPayInfo.check()) { |
| | | if (TPayInfo.seItem.status === 2){ |
| | | return Feng.error("重复核销!"); |
| | | } |
| | | 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",TPayInfo.seItem.id); |
| | | ajax.set("id",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | } |
| | |
| | | var em = "";// 门店经营结束时间:分钟 |
| | | |
| | | TSite.addSubmit = function(){ |
| | | |
| | | var data = { |
| | | province:"", |
| | | city:"", |
| | |
| | | var sm =data.appointmentStartTime.split(':')[1]; |
| | | var eh =data.appointmentEndTime.split(':')[0]; |
| | | var em =data.appointmentEndTime.split(':')[1]; |
| | | |
| | | if($("#pCode").val()==''){ |
| | | Feng.info("请选择省") |
| | | return; |
| | |
| | | data: JSON.stringify(data), |
| | | contentType: "application/json", |
| | | success: function (response) { |
| | | window.parent.TSite.table.refresh(); |
| | | TSite.close(); |
| | | Feng.success("添加成功"); |
| | | TSite.search(); |
| | | }, |
| | | error: function (xhr, status, error) { |
| | | Feng.error("添加失败!" + error); |
| | |
| | | data: JSON.stringify(data), |
| | | contentType: "application/json", |
| | | success: function (response) { |
| | | window.parent.TSite.table.refresh(); |
| | | TSiteInfo.close(); |
| | | Feng.success("修改成功"); |
| | | }, |
| | | error: function (xhr, status, error) { |
| | |
| | | package com.dsh.other.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.other.entity.StoredValueConfig; |
| | | import com.dsh.other.service.StoredValueConfigService; |
| | | import com.dsh.other.util.ResultUtil; |
| | |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | |
| | | @Autowired |
| | | private StoredValueConfigService svconfigService; |
| | | |
| | | @RequestMapping("/base/storeValueConfig/addStoreValueConfig") |
| | | public Object addStoreValueConfig(@RequestBody StoredValueConfig storedValueConfig){ |
| | | StoredValueConfig one = svconfigService.getOne(new QueryWrapper<>()); |
| | | one.setContent(storedValueConfig.getContent()); |
| | | one.setDescription(storedValueConfig.getDescription()); |
| | | return svconfigService.updateById(one); |
| | | |
| | | } |
| | | |
| | | @RequestMapping("/base/storeValueConfig/getStoreValueConfig") |
| | | public StoredValueConfig getStoreValueConfig(){ |
| | | return svconfigService.getOne(new QueryWrapper<>()); |
| | | } |
| | | @ResponseBody |
| | | @PostMapping("/base/stored/getRechargeArrange") |
| | | public List<Map<String,Object>> getRechargeConfig(){ |