| | |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | private Long id; |
| | | private String city; |
| | | private String province; |
| | | private String name; |
| | |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class IntegralListQuery { |
| | | private long offset; |
| | | private long limit; |
| | | private long offset; |
| | | |
| | | private String name; |
| | | |
| | |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date insertTime; |
| | | |
| | | |
New file |
| | |
| | | package com.dsh.course.feignClient.account; |
| | | |
| | | 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 java.util.List; |
| | | |
| | | @FeignClient("mb-cloud-account") |
| | | public interface AppUserClient { |
| | | |
| | | |
| | | @PostMapping("/base/appUser/queryByNamePhone") |
| | | List<TAppUser> queryByNamePhone(QueryByNamePhone queryByNamePhone); |
| | | |
| | | @PostMapping("/base/appUser/queryById") |
| | | TAppUser queryById(Integer appUserId); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.account; |
| | | |
| | | import com.dsh.course.feignClient.account.model.*; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | import java.util.List; |
| | | |
| | | @FeignClient("mb-cloud-account") |
| | | public interface IntegralClient { |
| | | |
| | | |
| | | |
| | | @PostMapping("/userIntegralChanges/list") |
| | | List<UserIntegral> list(IntegralListQuery integralListQuery); |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.account.model; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class IntegralListQuery { |
| | | private long limit; |
| | | private long offset; |
| | | |
| | | private String name; |
| | | |
| | | private String phone; |
| | | |
| | | private Integer type; |
| | | private Integer category; |
| | | private String time; |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.account.model; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class QueryByNamePhone { |
| | | private String name; |
| | | |
| | | private String phone; |
| | | } |
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; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户信息 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2023-06-14 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_app_user") |
| | | public class TAppUser { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @TableField("code") |
| | | private String code; |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | @TableField("name") |
| | | private String name; |
| | | /** |
| | | * 电话 |
| | | */ |
| | | @TableField("phone") |
| | | private String phone; |
| | | /** |
| | | * 密码 |
| | | */ |
| | | @TableField("password") |
| | | private String password; |
| | | /** |
| | | * 生日 |
| | | */ |
| | | @TableField("birthday") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date birthday; |
| | | /** |
| | | * 性别(1=男,2=女) |
| | | */ |
| | | @TableField("gender") |
| | | private Integer gender; |
| | | /** |
| | | * 身高 |
| | | */ |
| | | @TableField("height") |
| | | private Double height; |
| | | /** |
| | | * 体重 |
| | | */ |
| | | @TableField("weight") |
| | | private Double weight; |
| | | /** |
| | | * bmi健康值 |
| | | */ |
| | | @TableField("bmi") |
| | | private Double bmi; |
| | | /** |
| | | * 身份证号 |
| | | */ |
| | | @TableField("idCard") |
| | | private String idCard; |
| | | /** |
| | | * 微信openid |
| | | */ |
| | | @TableField("openid") |
| | | private String openid; |
| | | /** |
| | | * 省 |
| | | */ |
| | | @TableField("province") |
| | | private String province; |
| | | /** |
| | | * 省编号 |
| | | */ |
| | | @TableField("provinceCode") |
| | | private String provinceCode; |
| | | /** |
| | | * 市 |
| | | */ |
| | | @TableField("city") |
| | | private String city; |
| | | /** |
| | | * 市编号 |
| | | */ |
| | | @TableField("cityCode") |
| | | private String cityCode; |
| | | /** |
| | | * 是否是年度会员(0=否,1=是) |
| | | */ |
| | | @TableField("isVip") |
| | | private Integer isVip; |
| | | /** |
| | | * 会员有效期 |
| | | */ |
| | | @TableField("vipEndTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date vipEndTime; |
| | | /** |
| | | * 会员等级id |
| | | */ |
| | | @TableField("viplevelId") |
| | | private Integer viplevelId; |
| | | /** |
| | | * 推荐用户id |
| | | */ |
| | | @TableField("referralUserId") |
| | | private Integer referralUserId; |
| | | /** |
| | | * 销售员id |
| | | */ |
| | | @TableField("salesmanUserId") |
| | | private Integer salesmanUserId; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | @TableField("state") |
| | | private Integer state; |
| | | /** |
| | | * 剩余积分 |
| | | */ |
| | | @TableField("integral") |
| | | private Integer integral; |
| | | /** |
| | | * 玩湃币 |
| | | */ |
| | | @TableField("playPaiCoins") |
| | | private Integer playPaiCoins; |
| | | /** |
| | | * 用户头像 |
| | | */ |
| | | @TableField("headImg") |
| | | private String headImg; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | |
| | | |
| | | } |
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.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户积分变动记录 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-10 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_user_integral_changes") |
| | | public class UserIntegral extends Model<UserIntegral> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | private String city; |
| | | private String province; |
| | | private String name; |
| | | private String phone; |
| | | private Integer type; |
| | | private Integer oldIntegral; |
| | | private Integer newIntegral; |
| | | private Integer integral; |
| | | private Integer category; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | private String remark; |
| | | |
| | | |
| | | } |
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.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户积分变动记录 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-10 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_user_integral_changes") |
| | | public class UserIntegralChanges extends Model<UserIntegralChanges> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @TableField("appUserId") |
| | | private Integer appUserId; |
| | | /** |
| | | * 积分类型(1=赠送积分,2=兑换商品,3=完成课后练习,4=观看教学视频) |
| | | */ |
| | | @TableField("type") |
| | | private Integer type; |
| | | /** |
| | | * 历史积分 |
| | | */ |
| | | @TableField("oldIntegral") |
| | | private Integer oldIntegral; |
| | | /** |
| | | * 新积分 |
| | | */ |
| | | @TableField("newIntegral") |
| | | private Integer newIntegral; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @TableField("remark") |
| | | private String remark; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | |
| | | private Integer category; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @PostMapping("/base/competition/listUser") |
| | | Page<CompetitionUser> listUser(CompetitionUserQuery competitionUserQuery); |
| | | |
| | | @PostMapping("/base/competition/listAudit") |
| | | Page<Competition> listAudit(ListQuery listQuery); |
| | | } |
| | | |
| | | |
| | |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date insertTime; |
| | | |
| | | @TableField(exist = false) |
New file |
| | |
| | | package com.dsh.course.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.guns.modular.system.model.TEvaluation; |
| | | import com.dsh.guns.modular.system.model.TEvaluationListVo; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.model.TStoreListVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/7/6 16:51 |
| | | */ |
| | | public interface EvaluationMapper extends BaseMapper<TEvaluation> { |
| | | |
| | | |
| | | List<TEvaluationListVo> listAll(@Param("page") Page<TEvaluationListVo> page, @Param("provinceCode") String provinceCode, @Param("cityCode") String cityCode, @Param("name") String name, @Param("phone") String phone, @Param("shopName") String shopName); |
| | | |
| | | TEvaluationListVo info(@Param("id") Integer id); |
| | | } |
New file |
| | |
| | | package com.dsh.course.mapper; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.guns.modular.system.model.Protocol; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/6/14 15:03 |
| | | */ |
| | | public interface ProtocolMapper extends BaseMapper<Protocol> { |
| | | } |
New file |
| | |
| | | package com.dsh.course.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.guns.modular.system.model.Notice; |
| | | import com.dsh.guns.modular.system.model.TNotice; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 通知表 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2017-07-11 |
| | | */ |
| | | public interface TNoticeMapper extends BaseMapper<TNotice> { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.guns.modular.system.model.TSite; |
| | | import com.dsh.guns.modular.system.model.TSiteType; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/1 17:45 |
| | | */ |
| | | public interface TSiteTypeMapper extends BaseMapper<TSiteType> { |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.account.CityClient; |
| | | import com.dsh.course.feignClient.account.model.CityListQuery; |
| | | import com.dsh.course.feignClient.account.model.TCityManager; |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.mapper.UserMapper; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | 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.service.*; |
| | | 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.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 车辆管理控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-05 17:25:12 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tAgree") |
| | | public class TAgreeController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tAgreement/"; |
| | | |
| | | |
| | | @Autowired |
| | | private IProtocolService protocolService; |
| | | |
| | | /** |
| | | * 跳转到车辆管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | Protocol one = protocolService.getOne(new LambdaQueryWrapper<Protocol>().eq(Protocol::getType, 1)); |
| | | Protocol two = protocolService.getOne(new LambdaQueryWrapper<Protocol>().eq(Protocol::getType, 2)); |
| | | Protocol three = protocolService.getOne(new LambdaQueryWrapper<Protocol>().eq(Protocol::getType, 3)); |
| | | Protocol four = protocolService.getOne(new LambdaQueryWrapper<Protocol>().eq(Protocol::getType, 4)); |
| | | model.addAttribute("one",one); |
| | | model.addAttribute("two",two); |
| | | model.addAttribute("three",three); |
| | | model.addAttribute("four",four); |
| | | return PREFIX + "tAgreementDriver.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加车辆管理 |
| | | */ |
| | | @RequestMapping("/notice_add") |
| | | public String tNoticeAdd(Model model) { |
| | | return PREFIX + "notice_add.html"; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @RequestMapping(value = "/updateAppParam") |
| | | @ResponseBody |
| | | public Object update(Integer id,String context) { |
| | | try { |
| | | Protocol byId = protocolService.getById(id); |
| | | byId.setContent(context); |
| | | protocolService.updateById(byId); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.feignClient.competition.model.Competition; |
| | | import com.dsh.course.feignClient.competition.model.CompetitionUser; |
| | | import com.dsh.course.feignClient.competition.model.GetPeopleQuery; |
| | | import com.dsh.course.feignClient.competition.model.ListQuery; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | 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.TCity; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import 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.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 车辆管理控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-05 17:25:12 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tCompetitionAudit") |
| | | public class TCompetitionAuditController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tCompetitionAudit/"; |
| | | |
| | | @Autowired |
| | | private CompetitionClient competitionClient; |
| | | |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | |
| | | @Autowired |
| | | private ICityService cityService; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跳转到车辆管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | return PREFIX + "TCompetition.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加车辆管理 |
| | | */ |
| | | @RequestMapping("/tCompetition_add") |
| | | public String tCompetitionAdd(Model model) { |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | return PREFIX + "TCompetition_add.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到修改车辆管理 |
| | | */ |
| | | @RequestMapping("/tCompetition_update/{id}") |
| | | public String tCarUpdate(@PathVariable Integer id, Model model) { |
| | | Competition competition = competitionClient.queryById(id); |
| | | model.addAttribute("item",competition); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, competition.getProvinceCode())); |
| | | List<TCity> list1 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId())); |
| | | |
| | | List<TStore> list2 = storeService.list(new LambdaQueryWrapper<TStore>().eq(TStore::getCityCode,competition.getCityCode())); |
| | | model.addAttribute("list",list); |
| | | model.addAttribute("list1",list1); |
| | | model.addAttribute("list2",list2); |
| | | model.addAttribute("type",2); |
| | | return PREFIX + "TCompetition_edit.html"; |
| | | } |
| | | @RequestMapping("/tCompetition_info/{id}") |
| | | public String tCarInfo(@PathVariable Integer id, Model model) { |
| | | Competition competition = competitionClient.queryById(id); |
| | | model.addAttribute("item",competition); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, competition.getProvinceCode())); |
| | | List<TCity> list1 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId())); |
| | | |
| | | List<TStore> list2 = storeService.list(new LambdaQueryWrapper<TStore>().eq(TStore::getCityCode,competition.getCityCode())); |
| | | model.addAttribute("list",list); |
| | | model.addAttribute("list1",list1); |
| | | model.addAttribute("list2",list2); |
| | | model.addAttribute("type",2); |
| | | |
| | | return PREFIX + "TCompetition_edit.html"; |
| | | } |
| | | @RequestMapping("/tCompetition_user/{id}") |
| | | public String tCarUser(@PathVariable Integer id, Model model) { |
| | | model.addAttribute("id",id); |
| | | return PREFIX + "TCompetitionUser.html"; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String provinceCode, String cityCode, String shopName, String eventName, String time, Integer state, Integer registerCondition) { |
| | | List<Integer> ids = new ArrayList<>(); |
| | | List<TStore> list = null; |
| | | // 获取门店id |
| | | if(ToolUtil.isNotEmpty(shopName)){ |
| | | list = storeService.list(new LambdaQueryWrapper<TStore>().like(TStore::getName, shopName)); |
| | | ids = list.stream().map(TStore::getId).collect(Collectors.toList()); |
| | | }else { |
| | | list = storeService.list(); |
| | | ids = storeService.list().stream().map(TStore::getId).collect(Collectors.toList()); |
| | | } |
| | | if(ids.size()==0){ |
| | | ids.add(-1); |
| | | } |
| | | Page<Competition> page = new PageFactory<Competition>().defaultPage(); |
| | | ListQuery listQuery = new ListQuery(page.getSize(),page.getCurrent(),provinceCode,cityCode,eventName,time,state,registerCondition,ids); |
| | | Page<Competition> competitions = competitionClient.listAudit(listQuery); |
| | | for (Competition competition : competitions.getRecords()) { |
| | | for (TStore tStore : list) { |
| | | if(competition.getStoreId().equals(tStore.getId())){ |
| | | competition.setStoreName(tStore.getName()); |
| | | } |
| | | } |
| | | } |
| | | return super.packForBT(competitions); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/listUser/{id}") |
| | | @ResponseBody |
| | | public Object listUser(@PathVariable Integer id,Integer state) { |
| | | try { |
| | | Page<Object> page = new PageFactory<>().defaultPage(); |
| | | Page<CompetitionUser> data = competitionClient.getPeopleFromId(new GetPeopleQuery(page.getSize(),page.getCurrent(),id,state)); |
| | | return super.packForBT(data); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object list(Competition competition) { |
| | | try { |
| | | if(ToolUtil.isNotEmpty(competition.getProvinceCode())) { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, competition.getProvinceCode())); |
| | | competition.setProvince(one.getName()); |
| | | TCity one1 = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, competition.getCityCode())); |
| | | competition.setCity(one1.getName()); |
| | | } |
| | | competition.setAuditStatus(1); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | competition.setStartTime(format.parse(competition.getSTime())); |
| | | competition.setEndTime(format.parse(competition.getETime())); |
| | | competition.setRegisterEndTime(format.parse(competition.getREndTime())); |
| | | competitionClient.add(competition); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(Competition competition) { |
| | | try { |
| | | Competition competition1 = competitionClient.queryById(competition.getId()); |
| | | if(ToolUtil.isNotEmpty(competition.getProvinceCode())) { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, competition.getProvinceCode())); |
| | | competition.setProvince(one.getName()); |
| | | TCity one1 = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, competition.getCityCode())); |
| | | competition.setCity(one1.getName()); |
| | | } |
| | | if(ToolUtil.isEmpty(competition.getCoverDrawing())){ |
| | | competition.setCoverDrawing(competition1.getCoverDrawing()); |
| | | } |
| | | if(ToolUtil.isEmpty(competition.getRegistrationNotes())){ |
| | | competition.setRegistrationNotes(competition1.getRegistrationNotes()); |
| | | } |
| | | competitionClient.update(competition); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/cancel") |
| | | public Object cancel(Integer id) { |
| | | try { |
| | | competitionClient.cancel(id); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/audit") |
| | | @ResponseBody |
| | | public Object cancel(Integer id,Integer audit,String text) { |
| | | try { |
| | | Competition competition = competitionClient.queryById(id); |
| | | competition.setAuditStatus(audit); |
| | | competition.setAuditRemark(text); |
| | | competitionClient.update(competition); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/getPeopleFromId") |
| | | public Object getPeopleFromId(Integer id,Integer state) { |
| | | try { |
| | | Page<Object> page = new PageFactory<>().defaultPage(); |
| | | Page<CompetitionUser> data = competitionClient.getPeopleFromId(new GetPeopleQuery(page.getSize(),page.getCurrent(),id,state)); |
| | | return super.packForBT(data); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/onChange") |
| | | @ResponseBody |
| | | public Object onChange(Integer oneId) { |
| | | try { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, oneId)); |
| | | return cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId())); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/oneChangeNext") |
| | | @ResponseBody |
| | | public Object oneChangeNext(Integer oneId) { |
| | | try { |
| | | return storeService.list(new LambdaQueryWrapper<TStore>().eq(TStore::getCityCode, oneId)); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.account.CityClient; |
| | | import com.dsh.course.feignClient.account.IntegralClient; |
| | | import com.dsh.course.feignClient.account.model.*; |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.mapper.UserMapper; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | 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.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.ITNoticeService; |
| | | import com.dsh.guns.modular.system.service.StoreConfigService; |
| | | 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.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 车辆管理控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-05 17:25:12 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tIntegral") |
| | | public class TIntegralController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tIntegral/"; |
| | | |
| | | |
| | | @Autowired |
| | | private IntegralClient client; |
| | | |
| | | /** |
| | | * 跳转到车辆管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | return PREFIX + "TIntegral.html"; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String name, String phone,Integer type,Integer category,String time) { |
| | | Page<UserIntegral> page = new PageFactory<UserIntegral>().defaultPage(); |
| | | IntegralListQuery integralListQuery = new IntegralListQuery(page.getSize(), page.getCurrent(), name, phone, type, category, time); |
| | | List<UserIntegral> list = client.list(integralListQuery); |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object list(String name,String text,Integer sort) { |
| | | try { |
| | | TNotice tNotice = new TNotice(); |
| | | tNotice.setContent(text); |
| | | tNotice.setInsertTime(new Date()); |
| | | tNotice.setContent(text); |
| | | tNotice.setName(name); |
| | | tNotice.setSort(sort); |
| | | tNotice.setState(1); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.account.CityClient; |
| | | import com.dsh.course.feignClient.account.model.CityListQuery; |
| | | import com.dsh.course.feignClient.account.model.TCityManager; |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.mapper.UserMapper; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | 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.service.*; |
| | | 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.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 车辆管理控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-05 17:25:12 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tNotice") |
| | | public class TNoticController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/notice/"; |
| | | |
| | | @Autowired |
| | | private CompetitionClient competitionClient; |
| | | |
| | | @Autowired |
| | | private CityClient cityClient; |
| | | |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | @Autowired |
| | | private ICityService cityService; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Resource |
| | | private StoreConfigService storeConfigService; |
| | | |
| | | @Autowired |
| | | private ITNoticeService noticeService; |
| | | |
| | | /** |
| | | * 跳转到车辆管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | return PREFIX + "notice.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加车辆管理 |
| | | */ |
| | | @RequestMapping("/notice_add") |
| | | public String tNoticeAdd(Model model) { |
| | | return PREFIX + "notice_add.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到修改车辆管理 |
| | | */ |
| | | @RequestMapping("/notice_update/{id}") |
| | | public String tCityUpdate(@PathVariable Integer id, Model model) { |
| | | TNotice byId = noticeService.getById(id); |
| | | model.addAttribute("item",byId); |
| | | model.addAttribute("type",1); |
| | | return PREFIX + "notice_edit.html"; |
| | | } |
| | | @RequestMapping("/notice_info/{id}") |
| | | public String tInfo(@PathVariable Integer id, Model model) { |
| | | TNotice byId = noticeService.getById(id); |
| | | model.addAttribute("item",byId); |
| | | model.addAttribute("type",2); |
| | | return PREFIX + "notice_edit.html"; |
| | | } |
| | | @RequestMapping("/tShop_info/{id}") |
| | | public String tCityInfo(@PathVariable Integer id, Model model) { |
| | | TStore byId = storeService.getById(id); |
| | | model.addAttribute("item",byId); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, byId.getProvinceCode())); |
| | | List<TCity> list1 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId())); |
| | | CityListQuery cityListQuery = new CityListQuery(); |
| | | cityListQuery.setOffset(1); |
| | | cityListQuery.setLimit(10000); |
| | | cityListQuery.setCityCode(byId.getCityCode()); |
| | | Page<TCityManager> list2 = cityClient.list(cityListQuery); |
| | | model.addAttribute("list1",list1); |
| | | model.addAttribute("list2",list2.getRecords()); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",roleid); |
| | | model.addAttribute("time",byId.getStartTime()+" - "+byId.getEndTime()); |
| | | User byId1 = userMapper.selectById(byId.getStoreStaffId()); |
| | | model.addAttribute("city",byId1); |
| | | model.addAttribute("type",0); |
| | | return PREFIX + "tShop_edit.html"; |
| | | } |
| | | @RequestMapping("/tShop_gift/{id}") |
| | | public String tCityGift(@PathVariable Integer id, Model model) { |
| | | TStore byId = storeService.getById(id); |
| | | model.addAttribute("welfarePicture",byId.getWelfarePicture()); |
| | | model.addAttribute("id",id); |
| | | return PREFIX + "tShop_img.html"; |
| | | } |
| | | @RequestMapping("/tShop_indexSet/{id}") |
| | | public String tCityIndexSet(@PathVariable Integer id, Model model) { |
| | | StoreConfig c1 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,1)); |
| | | model.addAttribute("c1",c1); |
| | | StoreConfig c2 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,2)); |
| | | model.addAttribute("c2",c2); |
| | | StoreConfig c3 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,3)); |
| | | model.addAttribute("c3",c3); |
| | | StoreConfig c4 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,4)); |
| | | model.addAttribute("c4",c4); |
| | | StoreConfig c5 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,5)); |
| | | model.addAttribute("c5",c5); |
| | | StoreConfig c6 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,6)); |
| | | model.addAttribute("c6",c6); |
| | | StoreConfig c7 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,7)); |
| | | model.addAttribute("c7",c7); |
| | | StoreConfig c8 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,8)); |
| | | model.addAttribute("c8",c8); |
| | | model.addAttribute("id",id); |
| | | return PREFIX + "tShop_imgAll.html"; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String name, Integer type) { |
| | | Page<TNotice> page = new PageFactory<TNotice>().defaultPage(); |
| | | LambdaQueryWrapper<TNotice> tNoticeLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | if(ToolUtil.isNotEmpty(name)){ |
| | | tNoticeLambdaQueryWrapper.like(TNotice::getName,name); |
| | | } |
| | | if(ToolUtil.isNotEmpty(type)){ |
| | | tNoticeLambdaQueryWrapper.eq(TNotice::getUpOrDown,type); |
| | | } |
| | | tNoticeLambdaQueryWrapper.eq(TNotice::getState,1); |
| | | Page<TNotice> page1 = noticeService.page(page, tNoticeLambdaQueryWrapper); |
| | | return super.packForBT(page1); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object list(String name,String text,Integer sort) { |
| | | try { |
| | | TNotice tNotice = new TNotice(); |
| | | tNotice.setContent(text); |
| | | tNotice.setInsertTime(new Date()); |
| | | tNotice.setContent(text); |
| | | tNotice.setName(name); |
| | | tNotice.setSort(sort); |
| | | tNotice.setState(1); |
| | | noticeService.save(tNotice); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(Integer id,String name,String text,Integer sort) { |
| | | try { |
| | | TNotice byId = noticeService.getById(id); |
| | | byId.setName(name); |
| | | byId.setContent(text); |
| | | byId.setSort(sort); |
| | | noticeService.updateById(byId); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/onChange") |
| | | @ResponseBody |
| | | public Object onChange(Integer oneId) { |
| | | try { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, oneId)); |
| | | return cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId())); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/saveImgAll") |
| | | @ResponseBody |
| | | public Object saveImgAll(Integer id,Integer px1,Integer px2,Integer px3,Integer px4,Integer px5,Integer px6,Integer px7,Integer px8, |
| | | String c1,String c2,String c3,String c4,String c5,String c6,String c7,String c8, |
| | | Integer r1,Integer r2,Integer r3,Integer r4,Integer r5,Integer r6,Integer r7,Integer r8) { |
| | | try { |
| | | ArrayList<StoreConfig> storeConfigs = new ArrayList<>(); |
| | | StoreConfig collect1 = collect(id, px1, r1, c1, 1); |
| | | StoreConfig collect2 = collect(id, px2, r2, c2, 2); |
| | | StoreConfig collect3 = collect(id, px3, r3, c3, 3); |
| | | StoreConfig collect4 = collect(id, px4, r4, c4, 4); |
| | | StoreConfig collect5 = collect(id, px5, r5, c5, 5); |
| | | StoreConfig collect6 = collect(id, px6, r6, c6, 6); |
| | | StoreConfig collect7 = collect(id, px7, r7, c7, 7); |
| | | StoreConfig collect8 = collect(id, px8, r8, c8, 8); |
| | | storeConfigs.add(collect1); |
| | | storeConfigs.add(collect2); |
| | | storeConfigs.add(collect3); |
| | | storeConfigs.add(collect4); |
| | | storeConfigs.add(collect5); |
| | | storeConfigs.add(collect6); |
| | | storeConfigs.add(collect7); |
| | | storeConfigs.add(collect8); |
| | | storeConfigService.updateBatchById(storeConfigs); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | private StoreConfig collect(Integer id,Integer sort,Integer isOpen,String img,int type){ |
| | | StoreConfig one = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType, type)); |
| | | one.setSort(sort); |
| | | one.setIsOpen(isOpen); |
| | | if(ToolUtil.isNotEmpty(img)){ |
| | | one.setBackgroundImage(img); |
| | | } |
| | | return one; |
| | | } |
| | | @RequestMapping(value = "/oneChangeNext") |
| | | @ResponseBody |
| | | public Object oneChangeNext(String oneId) { |
| | | |
| | | try { |
| | | CityListQuery cityListQuery = new CityListQuery(); |
| | | cityListQuery.setCityCode(oneId); |
| | | cityListQuery.setOffset(1); |
| | | cityListQuery.setLimit(100000); |
| | | Page<TCityManager> list = cityClient.list(cityListQuery); |
| | | List<TCityManager> records = list.getRecords(); |
| | | for (TCityManager record : records) { |
| | | record.setName(record.getName()+"-"+record.getPhone()); |
| | | } |
| | | return records; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(Integer id) { |
| | | try { |
| | | TNotice byId = noticeService.getById(id); |
| | | byId.setState(3); |
| | | noticeService.updateById(byId); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/updateType") |
| | | @ResponseBody |
| | | public Object updateType(Integer id,Integer state) { |
| | | try { |
| | | TNotice byId = noticeService.getById(id); |
| | | byId.setUpOrDown(state); |
| | | noticeService.updateById(byId); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/saveImg") |
| | | @ResponseBody |
| | | public Object saveImg(Integer id,String img) { |
| | | try { |
| | | TStore byId = storeService.getById(id); |
| | | byId.setWelfarePicture(img); |
| | | storeService.updateById(byId); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/freeze") |
| | | @ResponseBody |
| | | public Object freeze(Integer id) { |
| | | try { |
| | | TStore byId = storeService.getById(id); |
| | | byId.setState(2); |
| | | storeService.updateById(byId); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/unfreeze") |
| | | @ResponseBody |
| | | public Object unfreeze(Integer id) { |
| | | try { |
| | | TStore byId = storeService.getById(id); |
| | | byId.setState(1); |
| | | storeService.updateById(byId); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/pwd") |
| | | @ResponseBody |
| | | public Object pwd(Integer id) { |
| | | try { |
| | | TStore byId = storeService.getById(id); |
| | | User user = userMapper.selectById(byId.getStoreStaffId()); |
| | | user.setPassword(SecureUtil.md5("a123456")); |
| | | userMapper.updateById(user); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.account.CityClient; |
| | | import com.dsh.course.feignClient.account.model.CityListQuery; |
| | | import com.dsh.course.feignClient.account.model.TCityManager; |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.mapper.UserMapper; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | 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.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.IEvaluationService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.StoreConfigService; |
| | | import org.apache.ibatis.ognl.Evaluation; |
| | | 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.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 车辆管理控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-05 17:25:12 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tShopEvaluation") |
| | | public class TShopEvaluationController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tShopEvaluation/"; |
| | | |
| | | @Autowired |
| | | private CompetitionClient competitionClient; |
| | | |
| | | @Autowired |
| | | private CityClient cityClient; |
| | | |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | @Autowired |
| | | private ICityService cityService; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Resource |
| | | private StoreConfigService storeConfigService; |
| | | @Autowired |
| | | private IEvaluationService evaluationService; |
| | | |
| | | |
| | | /** |
| | | * 跳转到车辆管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | return PREFIX + "TShop.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加车辆管理 |
| | | */ |
| | | @RequestMapping("/tShop_add") |
| | | public String tCompetitionAdd(Model model) { |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",roleid); |
| | | return PREFIX + "tShop_add.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到修改车辆管理 |
| | | */ |
| | | @RequestMapping("/tShop_update/{id}") |
| | | public String tCityUpdate(@PathVariable Integer id, Model model) { |
| | | TStore byId = storeService.getById(id); |
| | | model.addAttribute("item",byId); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, byId.getProvinceCode())); |
| | | List<TCity> list1 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId())); |
| | | CityListQuery cityListQuery = new CityListQuery(); |
| | | cityListQuery.setOffset(1); |
| | | cityListQuery.setLimit(10000); |
| | | cityListQuery.setCityCode(byId.getCityCode()); |
| | | Page<TCityManager> list2 = cityClient.list(cityListQuery); |
| | | model.addAttribute("list1",list1); |
| | | model.addAttribute("list2",list2.getRecords()); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",roleid); |
| | | model.addAttribute("time",byId.getStartTime()+" - "+byId.getEndTime()); |
| | | User byId1 = userMapper.selectById(byId.getStoreStaffId()); |
| | | model.addAttribute("city",byId1); |
| | | model.addAttribute("type",1); |
| | | return PREFIX + "tShop_edit.html"; |
| | | } |
| | | @RequestMapping("/tShop_info/{id}") |
| | | public String tCityInfo(@PathVariable Integer id, Model model) { |
| | | TEvaluationListVo vo = evaluationService.info(id); |
| | | model.addAttribute("item",vo); |
| | | ArrayList<String> strings = new ArrayList<>(); |
| | | String imgs = vo.getImgs(); |
| | | for (String s : imgs.split(",")) { |
| | | strings.add(s); |
| | | } |
| | | model.addAttribute("imgs",strings); |
| | | model.addAttribute("name1",vo.getPName()); |
| | | model.addAttribute("name2",vo.getCName()); |
| | | return PREFIX + "tShop_edit.html"; |
| | | } |
| | | @RequestMapping("/tShop_gift/{id}") |
| | | public String tCityGift(@PathVariable Integer id, Model model) { |
| | | TStore byId = storeService.getById(id); |
| | | model.addAttribute("welfarePicture",byId.getWelfarePicture()); |
| | | model.addAttribute("id",id); |
| | | return PREFIX + "tShop_img.html"; |
| | | } |
| | | @RequestMapping("/tShop_indexSet/{id}") |
| | | public String tCityIndexSet(@PathVariable Integer id, Model model) { |
| | | StoreConfig c1 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,1)); |
| | | model.addAttribute("c1",c1); |
| | | StoreConfig c2 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,2)); |
| | | model.addAttribute("c2",c2); |
| | | StoreConfig c3 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,3)); |
| | | model.addAttribute("c3",c3); |
| | | StoreConfig c4 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,4)); |
| | | model.addAttribute("c4",c4); |
| | | StoreConfig c5 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,5)); |
| | | model.addAttribute("c5",c5); |
| | | StoreConfig c6 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,6)); |
| | | model.addAttribute("c6",c6); |
| | | StoreConfig c7 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,7)); |
| | | model.addAttribute("c7",c7); |
| | | StoreConfig c8 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,8)); |
| | | model.addAttribute("c8",c8); |
| | | model.addAttribute("id",id); |
| | | return PREFIX + "tShop_imgAll.html"; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String provinceCode, String cityCode ,String shopName, String name, String phone) { |
| | | Page<TEvaluationListVo> page = new PageFactory<TEvaluationListVo>().defaultPage(); |
| | | List<TEvaluationListVo> list = evaluationService.listAll(page,provinceCode,cityCode,name,phone,shopName); |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | @RequestMapping(value = "/updateState") |
| | | @ResponseBody |
| | | public Object updateState(Integer id, Integer state) { |
| | | TEvaluation byId = evaluationService.getById(id); |
| | | byId.setState(state); |
| | | evaluationService.updateById(byId); |
| | | return new SuccessTip<>(); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object list(TStore tStore,String time,String userName,String userPhone) { |
| | | try { |
| | | if(ToolUtil.isNotEmpty(tStore.getProvinceCode())) { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, tStore.getProvinceCode())); |
| | | tStore.setProvince(one.getName()); |
| | | TCity one1 = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, tStore.getCityCode())); |
| | | tStore.setCity(one1.getName()); |
| | | } |
| | | tStore.setStartTime(time.split(" - ")[0]); |
| | | tStore.setEndTime(time.split(" - ")[1]); |
| | | tStore.setState(1); |
| | | User user = new User(); |
| | | List<User> users = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getAccount, userPhone)); |
| | | if(users.size()>0){ |
| | | return "5001"; |
| | | } |
| | | user.setAccount(userPhone); |
| | | user.setName(userName); |
| | | user.setRoleid("2"); |
| | | user.setPhone(userPhone); |
| | | user.setPassword(SecureUtil.md5("a123456")); |
| | | userMapper.insert(user); |
| | | tStore.setStoreStaffId(user.getId()); |
| | | storeService.save(tStore); |
| | | |
| | | ArrayList<StoreConfig> storeConfigs = new ArrayList<>(); |
| | | for (int i = 1; i < 9; i++) { |
| | | StoreConfig storeConfig = new StoreConfig(); |
| | | storeConfig.setIsOpen(1); |
| | | storeConfig.setSort(i); |
| | | storeConfig.setType(i); |
| | | storeConfig.setStoreId(tStore.getId()); |
| | | storeConfigs.add(storeConfig); |
| | | } |
| | | storeConfigService.saveBatch(storeConfigs); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TStore tStore,String time,String userName,String userPhone) { |
| | | try { |
| | | TStore byId = storeService.getById(tStore.getId()); |
| | | |
| | | if(ToolUtil.isNotEmpty(tStore.getProvinceCode())) { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, tStore.getProvinceCode())); |
| | | tStore.setProvince(one.getName()); |
| | | TCity one1 = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, tStore.getCityCode())); |
| | | tStore.setCity(one1.getName()); |
| | | } |
| | | tStore.setStartTime(time.split(" - ")[0]); |
| | | tStore.setEndTime(time.split(" - ")[1]); |
| | | if(ToolUtil.isEmpty(tStore.getCoverDrawing())){ |
| | | tStore.setCoverDrawing(byId.getCoverDrawing()); |
| | | } |
| | | User user = userMapper.selectById(byId.getStoreStaffId()); |
| | | List<User> users = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getAccount, userPhone).ne(User::getId,tStore.getStoreStaffId())); |
| | | if(users.size()>0){ |
| | | return "5001"; |
| | | } |
| | | user.setAccount(userPhone); |
| | | user.setName(userName); |
| | | user.setPhone(userPhone); |
| | | userMapper.updateById(user); |
| | | storeService.updateById(tStore); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/onChange") |
| | | @ResponseBody |
| | | public Object onChange(Integer oneId) { |
| | | try { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, oneId)); |
| | | return cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId())); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/saveImgAll") |
| | | @ResponseBody |
| | | public Object saveImgAll(Integer id,Integer px1,Integer px2,Integer px3,Integer px4,Integer px5,Integer px6,Integer px7,Integer px8, |
| | | String c1,String c2,String c3,String c4,String c5,String c6,String c7,String c8, |
| | | Integer r1,Integer r2,Integer r3,Integer r4,Integer r5,Integer r6,Integer r7,Integer r8) { |
| | | try { |
| | | ArrayList<StoreConfig> storeConfigs = new ArrayList<>(); |
| | | StoreConfig collect1 = collect(id, px1, r1, c1, 1); |
| | | StoreConfig collect2 = collect(id, px2, r2, c2, 2); |
| | | StoreConfig collect3 = collect(id, px3, r3, c3, 3); |
| | | StoreConfig collect4 = collect(id, px4, r4, c4, 4); |
| | | StoreConfig collect5 = collect(id, px5, r5, c5, 5); |
| | | StoreConfig collect6 = collect(id, px6, r6, c6, 6); |
| | | StoreConfig collect7 = collect(id, px7, r7, c7, 7); |
| | | StoreConfig collect8 = collect(id, px8, r8, c8, 8); |
| | | storeConfigs.add(collect1); |
| | | storeConfigs.add(collect2); |
| | | storeConfigs.add(collect3); |
| | | storeConfigs.add(collect4); |
| | | storeConfigs.add(collect5); |
| | | storeConfigs.add(collect6); |
| | | storeConfigs.add(collect7); |
| | | storeConfigs.add(collect8); |
| | | storeConfigService.updateBatchById(storeConfigs); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | private StoreConfig collect(Integer id,Integer sort,Integer isOpen,String img,int type){ |
| | | StoreConfig one = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType, type)); |
| | | one.setSort(sort); |
| | | one.setIsOpen(isOpen); |
| | | if(ToolUtil.isNotEmpty(img)){ |
| | | one.setBackgroundImage(img); |
| | | } |
| | | return one; |
| | | } |
| | | @RequestMapping(value = "/oneChangeNext") |
| | | @ResponseBody |
| | | public Object oneChangeNext(String oneId) { |
| | | |
| | | try { |
| | | CityListQuery cityListQuery = new CityListQuery(); |
| | | cityListQuery.setCityCode(oneId); |
| | | cityListQuery.setOffset(1); |
| | | cityListQuery.setLimit(100000); |
| | | Page<TCityManager> list = cityClient.list(cityListQuery); |
| | | List<TCityManager> records = list.getRecords(); |
| | | for (TCityManager record : records) { |
| | | record.setName(record.getName()+"-"+record.getPhone()); |
| | | } |
| | | return records; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/cancel") |
| | | public Object cancel(Integer id) { |
| | | try { |
| | | competitionClient.cancel(id); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/saveImg") |
| | | @ResponseBody |
| | | public Object saveImg(Integer id,String img) { |
| | | try { |
| | | TStore byId = storeService.getById(id); |
| | | byId.setWelfarePicture(img); |
| | | storeService.updateById(byId); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/freeze") |
| | | @ResponseBody |
| | | public Object freeze(Integer id) { |
| | | try { |
| | | TStore byId = storeService.getById(id); |
| | | byId.setState(2); |
| | | storeService.updateById(byId); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/unfreeze") |
| | | @ResponseBody |
| | | public Object unfreeze(Integer id) { |
| | | try { |
| | | TStore byId = storeService.getById(id); |
| | | byId.setState(1); |
| | | storeService.updateById(byId); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/pwd") |
| | | @ResponseBody |
| | | public Object pwd(Integer id) { |
| | | try { |
| | | TStore byId = storeService.getById(id); |
| | | User user = userMapper.selectById(byId.getStoreStaffId()); |
| | | user.setPassword(SecureUtil.md5("a123456")); |
| | | userMapper.updateById(user); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.account.CityClient; |
| | | import com.dsh.course.feignClient.account.model.CityListQuery; |
| | | import com.dsh.course.feignClient.account.model.TCityManager; |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.mapper.UserMapper; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | 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.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.ITSiteService; |
| | | import com.dsh.guns.modular.system.service.StoreConfigService; |
| | | 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.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 车辆管理控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-05 17:25:12 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tSite") |
| | | public class TSiteController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tSite/"; |
| | | |
| | | @Autowired |
| | | private CompetitionClient competitionClient; |
| | | |
| | | @Autowired |
| | | private CityClient cityClient; |
| | | |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | @Autowired |
| | | private ICityService cityService; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Resource |
| | | private StoreConfigService storeConfigService; |
| | | |
| | | @Autowired |
| | | private ITSiteService siteService; |
| | | |
| | | |
| | | /** |
| | | * 跳转到车辆管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",1); |
| | | return PREFIX + "TSite.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加车辆管理 |
| | | */ |
| | | @RequestMapping("/tShop_add") |
| | | public String tCompetitionAdd(Model model) { |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",2); |
| | | return PREFIX + "tShop_add.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到修改车辆管理 |
| | | */ |
| | | @RequestMapping("/tShop_update/{id}") |
| | | public String tCityUpdate(@PathVariable Integer id, Model model) { |
| | | TStore byId = storeService.getById(id); |
| | | model.addAttribute("item",byId); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, byId.getProvinceCode())); |
| | | List<TCity> list1 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId())); |
| | | CityListQuery cityListQuery = new CityListQuery(); |
| | | cityListQuery.setOffset(1); |
| | | cityListQuery.setLimit(10000); |
| | | cityListQuery.setCityCode(byId.getCityCode()); |
| | | Page<TCityManager> list2 = cityClient.list(cityListQuery); |
| | | model.addAttribute("list1",list1); |
| | | model.addAttribute("list2",list2.getRecords()); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",2); |
| | | model.addAttribute("time",byId.getStartTime()+" - "+byId.getEndTime()); |
| | | User byId1 = userMapper.selectById(byId.getStoreStaffId()); |
| | | model.addAttribute("city",byId1); |
| | | model.addAttribute("type",1); |
| | | return PREFIX + "tShop_edit.html"; |
| | | } |
| | | @RequestMapping("/tShop_info/{id}") |
| | | public String tCityInfo(@PathVariable Integer id, Model model) { |
| | | TStore byId = storeService.getById(id); |
| | | model.addAttribute("item",byId); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, byId.getProvinceCode())); |
| | | List<TCity> list1 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId())); |
| | | CityListQuery cityListQuery = new CityListQuery(); |
| | | cityListQuery.setOffset(1); |
| | | cityListQuery.setLimit(10000); |
| | | cityListQuery.setCityCode(byId.getCityCode()); |
| | | Page<TCityManager> list2 = cityClient.list(cityListQuery); |
| | | model.addAttribute("list1",list1); |
| | | model.addAttribute("list2",list2.getRecords()); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",roleid); |
| | | model.addAttribute("time",byId.getStartTime()+" - "+byId.getEndTime()); |
| | | User byId1 = userMapper.selectById(byId.getStoreStaffId()); |
| | | model.addAttribute("city",byId1); |
| | | model.addAttribute("type",0); |
| | | return PREFIX + "tShop_edit.html"; |
| | | } |
| | | @RequestMapping("/tShop_gift/{id}") |
| | | public String tCityGift(@PathVariable Integer id, Model model) { |
| | | TStore byId = storeService.getById(id); |
| | | model.addAttribute("welfarePicture",byId.getWelfarePicture()); |
| | | model.addAttribute("id",id); |
| | | return PREFIX + "tShop_img.html"; |
| | | } |
| | | @RequestMapping("/tShop_indexSet/{id}") |
| | | public String tCityIndexSet(@PathVariable Integer id, Model model) { |
| | | StoreConfig c1 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,1)); |
| | | model.addAttribute("c1",c1); |
| | | StoreConfig c2 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,2)); |
| | | model.addAttribute("c2",c2); |
| | | StoreConfig c3 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,3)); |
| | | model.addAttribute("c3",c3); |
| | | StoreConfig c4 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,4)); |
| | | model.addAttribute("c4",c4); |
| | | StoreConfig c5 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,5)); |
| | | model.addAttribute("c5",c5); |
| | | StoreConfig c6 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,6)); |
| | | model.addAttribute("c6",c6); |
| | | StoreConfig c7 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,7)); |
| | | model.addAttribute("c7",c7); |
| | | StoreConfig c8 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,8)); |
| | | model.addAttribute("c8",c8); |
| | | model.addAttribute("id",id); |
| | | return PREFIX + "tShop_imgAll.html"; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String provinceCode, String cityCode , String name, String phone,String shopName) { |
| | | Page<TStoreListVo> page = new PageFactory<TStoreListVo>().defaultPage(); |
| | | List<TStoreListVo> list = storeService.listAll(page,provinceCode,cityCode,name,phone,shopName); |
| | | for (TStoreListVo tStoreListVo : list) { |
| | | TCityManager byId = cityClient.getById(tStoreListVo.getCityManagerId()); |
| | | tStoreListVo.setAccount(byId.getName()+"-"+byId.getPhone()); |
| | | |
| | | } |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object list(TStore tStore,String time,String userName,String userPhone) { |
| | | try { |
| | | if(ToolUtil.isNotEmpty(tStore.getProvinceCode())) { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, tStore.getProvinceCode())); |
| | | tStore.setProvince(one.getName()); |
| | | TCity one1 = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, tStore.getCityCode())); |
| | | tStore.setCity(one1.getName()); |
| | | } |
| | | tStore.setStartTime(time.split(" - ")[0]); |
| | | tStore.setEndTime(time.split(" - ")[1]); |
| | | tStore.setState(1); |
| | | User user = new User(); |
| | | List<User> users = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getAccount, userPhone)); |
| | | if(users.size()>0){ |
| | | return "5001"; |
| | | } |
| | | user.setAccount(userPhone); |
| | | user.setName(userName); |
| | | user.setRoleid("2"); |
| | | user.setPhone(userPhone); |
| | | user.setPassword(SecureUtil.md5("a123456")); |
| | | userMapper.insert(user); |
| | | tStore.setStoreStaffId(user.getId()); |
| | | storeService.save(tStore); |
| | | |
| | | ArrayList<StoreConfig> storeConfigs = new ArrayList<>(); |
| | | for (int i = 1; i < 9; i++) { |
| | | StoreConfig storeConfig = new StoreConfig(); |
| | | storeConfig.setIsOpen(1); |
| | | storeConfig.setSort(i); |
| | | storeConfig.setType(i); |
| | | storeConfig.setStoreId(tStore.getId()); |
| | | storeConfigs.add(storeConfig); |
| | | } |
| | | storeConfigService.saveBatch(storeConfigs); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TStore tStore,String time,String userName,String userPhone) { |
| | | try { |
| | | TStore byId = storeService.getById(tStore.getId()); |
| | | |
| | | if(ToolUtil.isNotEmpty(tStore.getProvinceCode())) { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, tStore.getProvinceCode())); |
| | | tStore.setProvince(one.getName()); |
| | | TCity one1 = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, tStore.getCityCode())); |
| | | tStore.setCity(one1.getName()); |
| | | } |
| | | tStore.setStartTime(time.split(" - ")[0]); |
| | | tStore.setEndTime(time.split(" - ")[1]); |
| | | if(ToolUtil.isEmpty(tStore.getCoverDrawing())){ |
| | | tStore.setCoverDrawing(byId.getCoverDrawing()); |
| | | } |
| | | User user = userMapper.selectById(byId.getStoreStaffId()); |
| | | List<User> users = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getAccount, userPhone).ne(User::getId,tStore.getStoreStaffId())); |
| | | if(users.size()>0){ |
| | | return "5001"; |
| | | } |
| | | user.setAccount(userPhone); |
| | | user.setName(userName); |
| | | user.setPhone(userPhone); |
| | | userMapper.updateById(user); |
| | | storeService.updateById(tStore); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/onChange") |
| | | @ResponseBody |
| | | public Object onChange(Integer oneId) { |
| | | try { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, oneId)); |
| | | return cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId())); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/saveImgAll") |
| | | @ResponseBody |
| | | public Object saveImgAll(Integer id,Integer px1,Integer px2,Integer px3,Integer px4,Integer px5,Integer px6,Integer px7,Integer px8, |
| | | String c1,String c2,String c3,String c4,String c5,String c6,String c7,String c8, |
| | | Integer r1,Integer r2,Integer r3,Integer r4,Integer r5,Integer r6,Integer r7,Integer r8) { |
| | | try { |
| | | ArrayList<StoreConfig> storeConfigs = new ArrayList<>(); |
| | | StoreConfig collect1 = collect(id, px1, r1, c1, 1); |
| | | StoreConfig collect2 = collect(id, px2, r2, c2, 2); |
| | | StoreConfig collect3 = collect(id, px3, r3, c3, 3); |
| | | StoreConfig collect4 = collect(id, px4, r4, c4, 4); |
| | | StoreConfig collect5 = collect(id, px5, r5, c5, 5); |
| | | StoreConfig collect6 = collect(id, px6, r6, c6, 6); |
| | | StoreConfig collect7 = collect(id, px7, r7, c7, 7); |
| | | StoreConfig collect8 = collect(id, px8, r8, c8, 8); |
| | | storeConfigs.add(collect1); |
| | | storeConfigs.add(collect2); |
| | | storeConfigs.add(collect3); |
| | | storeConfigs.add(collect4); |
| | | storeConfigs.add(collect5); |
| | | storeConfigs.add(collect6); |
| | | storeConfigs.add(collect7); |
| | | storeConfigs.add(collect8); |
| | | storeConfigService.updateBatchById(storeConfigs); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | private StoreConfig collect(Integer id,Integer sort,Integer isOpen,String img,int type){ |
| | | StoreConfig one = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType, type)); |
| | | one.setSort(sort); |
| | | one.setIsOpen(isOpen); |
| | | if(ToolUtil.isNotEmpty(img)){ |
| | | one.setBackgroundImage(img); |
| | | } |
| | | return one; |
| | | } |
| | | @RequestMapping(value = "/oneChangeNext") |
| | | @ResponseBody |
| | | public Object oneChangeNext(String oneId) { |
| | | |
| | | try { |
| | | CityListQuery cityListQuery = new CityListQuery(); |
| | | cityListQuery.setCityCode(oneId); |
| | | cityListQuery.setOffset(1); |
| | | cityListQuery.setLimit(100000); |
| | | Page<TCityManager> list = cityClient.list(cityListQuery); |
| | | List<TCityManager> records = list.getRecords(); |
| | | for (TCityManager record : records) { |
| | | record.setName(record.getName()+"-"+record.getPhone()); |
| | | } |
| | | return records; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/cancel") |
| | | public Object cancel(Integer id) { |
| | | try { |
| | | competitionClient.cancel(id); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/saveImg") |
| | | @ResponseBody |
| | | public Object saveImg(Integer id,String img) { |
| | | try { |
| | | TStore byId = storeService.getById(id); |
| | | byId.setWelfarePicture(img); |
| | | storeService.updateById(byId); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/freeze") |
| | | @ResponseBody |
| | | public Object freeze(Integer id) { |
| | | try { |
| | | TStore byId = storeService.getById(id); |
| | | byId.setState(2); |
| | | storeService.updateById(byId); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/unfreeze") |
| | | @ResponseBody |
| | | public Object unfreeze(Integer id) { |
| | | try { |
| | | TStore byId = storeService.getById(id); |
| | | byId.setState(1); |
| | | storeService.updateById(byId); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/pwd") |
| | | @ResponseBody |
| | | public Object pwd(Integer id) { |
| | | try { |
| | | TStore byId = storeService.getById(id); |
| | | User user = userMapper.selectById(byId.getStoreStaffId()); |
| | | user.setPassword(SecureUtil.md5("a123456")); |
| | | userMapper.updateById(user); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.account.CityClient; |
| | | import com.dsh.course.feignClient.account.model.CityListQuery; |
| | | import com.dsh.course.feignClient.account.model.TCityManager; |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.mapper.UserMapper; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | 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.service.*; |
| | | 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.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 车辆管理控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-05 17:25:12 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tSiteType") |
| | | public class TSiteTypeController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tSiteType/"; |
| | | |
| | | @Autowired |
| | | private CompetitionClient competitionClient; |
| | | |
| | | @Autowired |
| | | private CityClient cityClient; |
| | | |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | @Autowired |
| | | private ICityService cityService; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Resource |
| | | private StoreConfigService storeConfigService; |
| | | |
| | | @Autowired |
| | | private ITSiteTypeService siteTypeService; |
| | | |
| | | |
| | | /** |
| | | * 跳转到车辆管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | return PREFIX + "TSite.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加车辆管理 |
| | | */ |
| | | @RequestMapping("/tShop_add") |
| | | public String tCompetitionAdd(Model model) { |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",2); |
| | | return PREFIX + "tShop_add.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到修改车辆管理 |
| | | */ |
| | | @RequestMapping("/tShop_update/{id}") |
| | | public String tCityUpdate(@PathVariable Integer id, Model model) { |
| | | TStore byId = storeService.getById(id); |
| | | model.addAttribute("item",byId); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, byId.getProvinceCode())); |
| | | List<TCity> list1 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId())); |
| | | CityListQuery cityListQuery = new CityListQuery(); |
| | | cityListQuery.setOffset(1); |
| | | cityListQuery.setLimit(10000); |
| | | cityListQuery.setCityCode(byId.getCityCode()); |
| | | Page<TCityManager> list2 = cityClient.list(cityListQuery); |
| | | model.addAttribute("list1",list1); |
| | | model.addAttribute("list2",list2.getRecords()); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",2); |
| | | model.addAttribute("time",byId.getStartTime()+" - "+byId.getEndTime()); |
| | | User byId1 = userMapper.selectById(byId.getStoreStaffId()); |
| | | model.addAttribute("city",byId1); |
| | | model.addAttribute("type",1); |
| | | return PREFIX + "tShop_edit.html"; |
| | | } |
| | | @RequestMapping("/tShop_info/{id}") |
| | | public String tCityInfo(@PathVariable Integer id, Model model) { |
| | | TStore byId = storeService.getById(id); |
| | | model.addAttribute("item",byId); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, byId.getProvinceCode())); |
| | | List<TCity> list1 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId())); |
| | | CityListQuery cityListQuery = new CityListQuery(); |
| | | cityListQuery.setOffset(1); |
| | | cityListQuery.setLimit(10000); |
| | | cityListQuery.setCityCode(byId.getCityCode()); |
| | | Page<TCityManager> list2 = cityClient.list(cityListQuery); |
| | | model.addAttribute("list1",list1); |
| | | model.addAttribute("list2",list2.getRecords()); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",roleid); |
| | | model.addAttribute("time",byId.getStartTime()+" - "+byId.getEndTime()); |
| | | User byId1 = userMapper.selectById(byId.getStoreStaffId()); |
| | | model.addAttribute("city",byId1); |
| | | model.addAttribute("type",0); |
| | | return PREFIX + "tShop_edit.html"; |
| | | } |
| | | @RequestMapping("/tShop_gift/{id}") |
| | | public String tCityGift(@PathVariable Integer id, Model model) { |
| | | TStore byId = storeService.getById(id); |
| | | model.addAttribute("welfarePicture",byId.getWelfarePicture()); |
| | | model.addAttribute("id",id); |
| | | return PREFIX + "tShop_img.html"; |
| | | } |
| | | @RequestMapping("/tShop_indexSet/{id}") |
| | | public String tCityIndexSet(@PathVariable Integer id, Model model) { |
| | | StoreConfig c1 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,1)); |
| | | model.addAttribute("c1",c1); |
| | | StoreConfig c2 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,2)); |
| | | model.addAttribute("c2",c2); |
| | | StoreConfig c3 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,3)); |
| | | model.addAttribute("c3",c3); |
| | | StoreConfig c4 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,4)); |
| | | model.addAttribute("c4",c4); |
| | | StoreConfig c5 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,5)); |
| | | model.addAttribute("c5",c5); |
| | | StoreConfig c6 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,6)); |
| | | model.addAttribute("c6",c6); |
| | | StoreConfig c7 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,7)); |
| | | model.addAttribute("c7",c7); |
| | | StoreConfig c8 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,8)); |
| | | model.addAttribute("c8",c8); |
| | | model.addAttribute("id",id); |
| | | return PREFIX + "tShop_imgAll.html"; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list() { |
| | | Page<TSiteType> page = new PageFactory<TSiteType>().defaultPage(); |
| | | Page<TSiteType> page1 = siteTypeService.page(page, new LambdaQueryWrapper<TSiteType>().ne(TSiteType::getState,3)); |
| | | return super.packForBT(page1); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object list(String name) { |
| | | try { |
| | | List<TSiteType> list = siteTypeService.list(new LambdaQueryWrapper<TSiteType>().eq(TSiteType::getName, name)); |
| | | if(list.size()>0){ |
| | | return "5001"; |
| | | } |
| | | TSiteType tSiteType = new TSiteType(); |
| | | tSiteType.setName(name); |
| | | tSiteType.setState(1); |
| | | siteTypeService.save(tSiteType); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(Integer id,String name) { |
| | | try { |
| | | |
| | | List<TSiteType> list = siteTypeService.list(new LambdaQueryWrapper<TSiteType>().eq(TSiteType::getName, name).ne(TSiteType::getId,id)); |
| | | if(list.size()>0){ |
| | | return "5001"; |
| | | } |
| | | TSiteType byId = siteTypeService.getById(id); |
| | | byId.setName(name); |
| | | siteTypeService.updateById(byId); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/onChange") |
| | | @ResponseBody |
| | | public Object onChange(Integer oneId) { |
| | | try { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, oneId)); |
| | | return cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId())); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/saveImgAll") |
| | | @ResponseBody |
| | | public Object saveImgAll(Integer id,Integer px1,Integer px2,Integer px3,Integer px4,Integer px5,Integer px6,Integer px7,Integer px8, |
| | | String c1,String c2,String c3,String c4,String c5,String c6,String c7,String c8, |
| | | Integer r1,Integer r2,Integer r3,Integer r4,Integer r5,Integer r6,Integer r7,Integer r8) { |
| | | try { |
| | | ArrayList<StoreConfig> storeConfigs = new ArrayList<>(); |
| | | StoreConfig collect1 = collect(id, px1, r1, c1, 1); |
| | | StoreConfig collect2 = collect(id, px2, r2, c2, 2); |
| | | StoreConfig collect3 = collect(id, px3, r3, c3, 3); |
| | | StoreConfig collect4 = collect(id, px4, r4, c4, 4); |
| | | StoreConfig collect5 = collect(id, px5, r5, c5, 5); |
| | | StoreConfig collect6 = collect(id, px6, r6, c6, 6); |
| | | StoreConfig collect7 = collect(id, px7, r7, c7, 7); |
| | | StoreConfig collect8 = collect(id, px8, r8, c8, 8); |
| | | storeConfigs.add(collect1); |
| | | storeConfigs.add(collect2); |
| | | storeConfigs.add(collect3); |
| | | storeConfigs.add(collect4); |
| | | storeConfigs.add(collect5); |
| | | storeConfigs.add(collect6); |
| | | storeConfigs.add(collect7); |
| | | storeConfigs.add(collect8); |
| | | storeConfigService.updateBatchById(storeConfigs); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | private StoreConfig collect(Integer id,Integer sort,Integer isOpen,String img,int type){ |
| | | StoreConfig one = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType, type)); |
| | | one.setSort(sort); |
| | | one.setIsOpen(isOpen); |
| | | if(ToolUtil.isNotEmpty(img)){ |
| | | one.setBackgroundImage(img); |
| | | } |
| | | return one; |
| | | } |
| | | @RequestMapping(value = "/oneChangeNext") |
| | | @ResponseBody |
| | | public Object oneChangeNext(String oneId) { |
| | | |
| | | try { |
| | | CityListQuery cityListQuery = new CityListQuery(); |
| | | cityListQuery.setCityCode(oneId); |
| | | cityListQuery.setOffset(1); |
| | | cityListQuery.setLimit(100000); |
| | | Page<TCityManager> list = cityClient.list(cityListQuery); |
| | | List<TCityManager> records = list.getRecords(); |
| | | for (TCityManager record : records) { |
| | | record.setName(record.getName()+"-"+record.getPhone()); |
| | | } |
| | | return records; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/cancel") |
| | | public Object cancel(Integer id) { |
| | | try { |
| | | competitionClient.cancel(id); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/saveImg") |
| | | @ResponseBody |
| | | public Object saveImg(Integer id,String img) { |
| | | try { |
| | | TStore byId = storeService.getById(id); |
| | | byId.setWelfarePicture(img); |
| | | storeService.updateById(byId); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/freeze") |
| | | @ResponseBody |
| | | public Object freeze(Integer id) { |
| | | try { |
| | | TStore byId = storeService.getById(id); |
| | | byId.setState(2); |
| | | storeService.updateById(byId); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/unfreeze") |
| | | @ResponseBody |
| | | public Object unfreeze(Integer id) { |
| | | try { |
| | | TStore byId = storeService.getById(id); |
| | | byId.setState(1); |
| | | storeService.updateById(byId); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(Integer id) { |
| | | try { |
| | | TSiteType byId = siteTypeService.getById(id); |
| | | byId.setState(3); |
| | | siteTypeService.updateById(byId); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | try { |
| | | //文件上传,具体根据实际替换 |
| | | //File upload, replace according to actual situation |
| | | pictureName = OBSUploadUtil.inputStreamUpload(picture); |
| | | |
| | | pictureName = OssUploadUtil.ossUpload("img/", picture); |
| | | String result = "{'original': '" + picture.getOriginalFilename() + "', 'state': 'SUCCESS', 'url': '" + pictureName + "'}"; |
| | | if (callback == null) { |
| | | return JSON.parseObject(result); |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/6/14 14:59 |
| | | */ |
| | | @Data |
| | | @TableName("t_protocol") |
| | | public class Protocol { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 数据类型(1=用户协议,2=隐私协议,3=运动安全公告书) |
| | | */ |
| | | @TableField("type") |
| | | private Integer type; |
| | | /** |
| | | * 内容 |
| | | */ |
| | | @TableField("content") |
| | | private String content; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | private Date insertTime; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("t_store_evaluation") |
| | | public class TEvaluation { |
| | | |
| | | private Integer id; |
| | | |
| | | @TableField("appUserId") |
| | | private Integer appUserId; |
| | | @TableField("storeId") |
| | | private Integer storeId; |
| | | private Double score; |
| | | private String content; |
| | | private String imgs; |
| | | private Integer state; |
| | | @TableField("insertTime") |
| | | private Date insertTime; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class TEvaluationListVo { |
| | | private Integer id; |
| | | |
| | | private String pName; |
| | | |
| | | private String cName; |
| | | |
| | | private String shopName; |
| | | |
| | | private String name; |
| | | |
| | | private String phone; |
| | | |
| | | private Double score; |
| | | |
| | | private String time; |
| | | |
| | | private Integer appUserId; |
| | | private String imgs; |
| | | private String content; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 通知表 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2017-07-11 |
| | | */ |
| | | @TableName("t_notice") |
| | | @Data |
| | | public class TNotice extends Model<TNotice> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value="id", type= IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 标题 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 类型 |
| | | */ |
| | | private Integer sort; |
| | | /** |
| | | * 内容 |
| | | */ |
| | | private String content; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Integer state; |
| | | @TableField("upOrDown") |
| | | private Integer upOrDown; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/1 17:43 |
| | | */ |
| | | @Data |
| | | @TableName("t_site_type") |
| | | public class TSiteType { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 门店id |
| | | */ |
| | | @TableField("state") |
| | | private Integer state; |
| | | /** |
| | | * 场地名称 |
| | | */ |
| | | @TableField("name") |
| | | private String name; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.guns.modular.system.model.TEvaluation; |
| | | import com.dsh.guns.modular.system.model.TEvaluationListVo; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.model.TStoreListVo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * 字典服务 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-04-27 17:00 |
| | | */ |
| | | public interface IEvaluationService extends IService<TEvaluation> { |
| | | |
| | | |
| | | List<TEvaluationListVo> listAll(Page<TEvaluationListVo> page, String provinceCode, String cityCode, String name, String phone, String shopName); |
| | | |
| | | TEvaluationListVo info(Integer id); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.service; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.guns.modular.system.model.Protocol; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/6/14 15:04 |
| | | */ |
| | | public interface IProtocolService extends IService<Protocol> { |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.guns.modular.system.model.Notice; |
| | | import com.dsh.guns.modular.system.model.TNotice; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 通知表 服务类 |
| | | * </p> |
| | | * |
| | | * @author stylefeng123 |
| | | * @since 2018-02-22 |
| | | */ |
| | | public interface ITNoticeService extends IService<TNotice> { |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.guns.modular.system.model.TSite; |
| | | import com.dsh.guns.modular.system.model.TSiteType; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/1 17:49 |
| | | */ |
| | | public interface ITSiteTypeService extends IService<TSiteType> { |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.course.feignClient.account.AppUserClient; |
| | | import com.dsh.course.feignClient.account.model.QueryByNamePhone; |
| | | import com.dsh.course.feignClient.account.model.TAppUser; |
| | | import com.dsh.course.feignClient.auth.UserClient; |
| | | import com.dsh.course.mapper.EvaluationMapper; |
| | | import com.dsh.course.mapper.StoreMapper; |
| | | import com.dsh.guns.modular.system.model.TEvaluation; |
| | | import com.dsh.guns.modular.system.model.TEvaluationListVo; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.model.TStoreListVo; |
| | | import com.dsh.guns.modular.system.service.IEvaluationService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | public class EvaluationServiceImpl extends ServiceImpl<EvaluationMapper, TEvaluation> implements IEvaluationService { |
| | | |
| | | @Autowired |
| | | private AppUserClient appUserClient; |
| | | |
| | | @Override |
| | | public List<TEvaluationListVo> listAll(Page<TEvaluationListVo> page, String provinceCode, String cityCode, String name, String phone, String shopName) { |
| | | List<TAppUser> list = appUserClient.queryByNamePhone(new QueryByNamePhone(name,phone)); |
| | | if(list.size()==0){ |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | List<TEvaluationListVo> tEvaluationListVos = this.baseMapper.listAll(page, provinceCode, cityCode, name, phone, shopName); |
| | | for (TEvaluationListVo tEvaluationListVo : tEvaluationListVos) { |
| | | for (TAppUser tAppUser : list) { |
| | | if(tEvaluationListVo.getAppUserId().equals(tAppUser.getId())){ |
| | | tEvaluationListVo.setName(tAppUser.getName()); |
| | | tEvaluationListVo.setPhone(tAppUser.getPhone()); |
| | | } |
| | | } |
| | | } |
| | | return tEvaluationListVos; |
| | | } |
| | | |
| | | @Override |
| | | public TEvaluationListVo info(Integer id) { |
| | | TEvaluationListVo info = this.baseMapper.info(id); |
| | | Integer appUserId = info.getAppUserId(); |
| | | TAppUser tAppUser = appUserClient.queryById(appUserId); |
| | | info.setName(tAppUser.getName()); |
| | | info.setPhone(tAppUser.getPhone()); |
| | | return info; |
| | | } |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.course.mapper.ProtocolMapper; |
| | | import com.dsh.guns.modular.system.model.Protocol; |
| | | import com.dsh.guns.modular.system.service.IProtocolService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/6/14 15:05 |
| | | */ |
| | | @Service |
| | | public class ProtocolServiceImpl extends ServiceImpl<ProtocolMapper, Protocol> implements IProtocolService { |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.course.mapper.NoticeMapper; |
| | | import com.dsh.course.mapper.TNoticeMapper; |
| | | import com.dsh.guns.modular.system.model.Notice; |
| | | import com.dsh.guns.modular.system.model.TNotice; |
| | | import com.dsh.guns.modular.system.service.INoticeService; |
| | | import com.dsh.guns.modular.system.service.ITNoticeService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 通知表 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author stylefeng123 |
| | | * @since 2018-02-22 |
| | | */ |
| | | @Service |
| | | public class TNoticeServiceImpl extends ServiceImpl<TNoticeMapper, TNotice> implements ITNoticeService { |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.course.mapper.TSiteMapper; |
| | | import com.dsh.course.mapper.TSiteTypeMapper; |
| | | import com.dsh.guns.modular.system.model.TSite; |
| | | import com.dsh.guns.modular.system.model.TSiteType; |
| | | import com.dsh.guns.modular.system.service.ITSiteService; |
| | | import com.dsh.guns.modular.system.service.ITSiteTypeService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/1 17:50 |
| | | */ |
| | | @Service |
| | | public class TSiteTypeServiceImpl extends ServiceImpl<TSiteTypeMapper, TSiteType> implements ITSiteTypeService { |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dsh.guns.modular.system.model.Protocol"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dsh.course.mapper.EvaluationMapper"> |
| | | |
| | | <select id="listAll" resultType="com.dsh.guns.modular.system.model.TEvaluationListVo"> |
| | | select t1.id,t1.appUserId,t1.score,t1.insertTime time,t2.name shopName,t2.province pName,t2.city cName from t_store_evaluation t1 left join t_store t2 on t1.storeId =t2.id |
| | | where t1.state !=3 |
| | | <if test="provinceCode!=null and provinceCode !=''"> |
| | | and t2.provinceCode =#{provinceCode} |
| | | </if> |
| | | <if test="cityCode!=null and cityCode !=''"> |
| | | and t2.cityCode =#{cityCode} |
| | | </if> |
| | | <if test="shopName!=null and shopName !=''"> |
| | | and t2.name like concat("%",#{shopName},"%") |
| | | </if> |
| | | <if test="shopName!=null and shopName !=''"> |
| | | and t2.name like concat("%",#{shopName},"%") |
| | | </if> |
| | | </select> |
| | | <select id="info" resultType="com.dsh.guns.modular.system.model.TEvaluationListVo"> |
| | | select t1.id,t1.appUserId,t1.score,t1.insertTime time,t1.imgs,t1.content,t2.name shopName,t2.province pName,t2.city cName from t_store_evaluation t1 left join t_store t2 on t1.storeId =t2.id |
| | | where t1.id =#{id} |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dsh.course.mapper.TNoticeMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dsh.course.mapper.TSiteTypeMapper"> |
| | | |
| | | </mapper> |
| | |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>通知管理</h5> |
| | | <h5>公告管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="condition" name="名称" /> |
| | | <#NameCon id="name" name="公告名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="type" name="状态"> |
| | | <option value="">全部</option> |
| | | <option value="1">已上架</option> |
| | | <option value="0">已下架</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="Notice.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="Notice.research()"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="NoticeTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/notice/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="Notice.openAddNotice()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/notice/update")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="Notice.openAdd()"/> |
| | | <#button name="修改" icon="fa-plus" clickFun="Notice.openNoticeDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/notice/delete")){ |
| | | <#button name="删除" icon="fa-plus" clickFun="Notice.delete()" space="true"/> |
| | | @} |
| | | <#button name="查看详情" icon="fa-plus" clickFun="Notice.info()" space="true"/> |
| | | <#button name="上架" icon="fa-plus" clickFun="Notice.updateType(1)" space="true"/> |
| | | <#button name="下架" icon="fa-plus" clickFun="Notice.updateType(0)" space="true"/> |
| | | </div> |
| | | <#table id="NoticeTable"/> |
| | | </div> |
| | |
| | | <input type="hidden" id="id" value=""> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-1 control-label">标题</label> |
| | | <div class="col-sm-11"> |
| | | <input class="form-control" id="title" name="title" type="text"> |
| | | <label class="col-sm-1 control-label">公告名称</label> |
| | | <div class="col-sm-5"> |
| | | <input class="form-control" id="name" name="name" type="text"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-1 control-label">内容</label> |
| | | <div class="col-sm-11"> |
| | | <div id="editor" class="editorHeight"> |
| | | <label class="col-sm-1 control-label">公告内容:</label> |
| | | <div class="col-sm-5"> |
| | | <textarea type="text/plain" id="editor" style="height: 300px;width: 800px;"></textarea> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-1 control-label">排序:</label> |
| | | <div class="col-sm-5"> |
| | | <input class="form-control" type="text" id="sort" name="sort"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | </div> |
| | | </div> |
| | | <script type="text/javascript" src="//unpkg.com/wangeditor/release/wangEditor.min.js"></script> |
| | | <script src="${ctxPath}/modular/system/notice/notice_info.js"></script> |
| | | @} |
| | |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="noticeInfoForm"> |
| | | |
| | | <input type="hidden" id="id" value="${notice.id}"> |
| | | <input type="hidden" id="contentVal" value='${notice.content}'> |
| | | <input type="hidden" id="id" value="${item.id}"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-1 control-label">标题</label> |
| | | <div class="col-sm-11"> |
| | | <input class="form-control" id="title" name="title" type="text" value="${notice.title}"> |
| | | <label class="col-sm-1 control-label">公告名称</label> |
| | | <div class="col-sm-5"> |
| | | <input class="form-control" id="name" name="name" type="text" value="${item.name}"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-1 control-label">内容</label> |
| | | <div class="col-sm-11"> |
| | | <div id="editor" class="editorHeight"> |
| | | <label class="col-sm-1 control-label">公告内容:</label> |
| | | <div class="col-sm-5"> |
| | | <textarea type="text/plain" id="editor" style="height: 300px;width: 800px;">${item.content}</textarea> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-1 control-label">排序:</label> |
| | | <div class="col-sm-5"> |
| | | <input class="form-control" type="text" id="sort" name="sort" value="${item.sort}"> |
| | | </div> |
| | | </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="NoticeInfoDlg.editSubmit()"/> |
| | | @} |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="NoticeInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="col-sm-12"> |
| | | <div class="tabs-container"> |
| | | <ul class="nav nav-tabs"> |
| | | <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">注册协议</a></li> |
| | | <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">用户协议</a></li> |
| | | <li class=""><a data-toggle="tab" href="#tab-3" aria-expanded="false">隐私协议</a></li> |
| | | <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">用户协议</a></li> |
| | | <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">隐私协议</a></li> |
| | | <li class=""><a data-toggle="tab" href="#tab-3" aria-expanded="false">运动安全告知书</a></li> |
| | | <li class=""><a data-toggle="tab" href="#tab-4" aria-expanded="false">注销账号说明</a></li> |
| | | </ul> |
| | | <div class="tab-content"> |
| | | <div id="tab-1" class="tab-pane active"> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="tab-4" class="tab-pane"> |
| | | <div class="panel-body"> |
| | | <textarea type="text/plain" id="editor_4" style="width:1200px;height:400px;">${four.content}</textarea> |
| | | <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="update_4(${four.id});"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | function submitData(content,id) { |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tAgreement/updateAppParam", function(data){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tAgree/updateAppParam", function(data){ |
| | | Feng.success("编辑成功!"); |
| | | },function(data){ |
| | | Feng.error("编辑失败!" + data.responseJSON.message + "!"); |
| | |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="shopId" name="shopId"> |
| | | <option value="">选择门店</option> |
| | | @for(obj in list2){ |
| | | <option value="${obj.id}" ${obj.id == item.storeId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | |
| | | <div class="ibox-title"> |
| | | <h5>赛事审核</h5> |
| | | </div> |
| | | |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <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="TCompetition.oneChange(this)"> |
| | | <option value="">全部</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <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"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="shopName" name="门店名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="eventName" name="赛事名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="state" name="状态" > |
| | | <option value="">全部</option> |
| | | <option value="1">待审核</option> |
| | | <option value="3">未通过</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="registerCondition" name="报名条件" > |
| | | <option value="">全部</option> |
| | | <option value="1">全部用户</option> |
| | | <option value="2">仅限年度会员参与</option> |
| | | <option value="3">仅限学员参与</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCompetition.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TCompetition.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TCompetitionTableToolbar" role="group"> |
| | | <#button name="审核" icon="fa-plus" clickFun="TCompetition.openTCompetitionDetail()"/> |
| | | <#button name="查看详情" icon="fa-remove" clickFun="TCompetition.openAddTCompetition()" space="true"/> |
| | | </div> |
| | | <#table id="TCompetitionTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tCompetitionAudit/tCompetition.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#createTime' |
| | | ,range: true |
| | | ,lang:"en" |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | |
| | | <div class="ibox-title"> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <input hidden id="id" value="${id}"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="state" name="状态" > |
| | | <option value="">全部</option> |
| | | <option value="1">正常</option> |
| | | <option value="3">已取消</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCompetition.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TCompetition.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TCompetitionTableToolbar" role="group"> |
| | | <#button name="导出" icon="fa-plus" clickFun="TCompetition.export()"/> |
| | | </div> |
| | | <#table id="TCompetitionTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tCompetition/tCompetitionUser.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#createTime' |
| | | ,range: true |
| | | ,lang:"en" |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <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"> |
| | | |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">举办省:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="pCode" name="pCode" onchange="TCarInfoDlg.oneChange(this)"> |
| | | <option value="">选择省</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">举办市:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="cCode" name="cCode" onchange="TCarInfoDlg.oneChangeNext(this)"> |
| | | <option value="">选择市</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="shop"> |
| | | <label class="col-sm-3 control-label">举办门店:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="shopId" name="shopId"> |
| | | <option value="">选择门店</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#input id="name" name="赛事名称" type="text"/> |
| | | <#input id="startTime" name="开始时间" type="text"/> |
| | | <#input id="endTime" name="结束时间" type="text"/> |
| | | <#input id="registerEndTime" name="截止报名时间" type="text"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">报名条件:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="registerCondition" value="1" checked> 全部用户 |
| | | <input type="radio" name="registerCondition" value="2">仅限年度会员参与 |
| | | <input type="radio" name="registerCondition" value="3">仅限学员参与 |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">报名年龄:</label> |
| | | <div class="col-sm-9" style="display: flex"> |
| | | <input class="form-control" style="width: 100px;" type="text" id="startAge"> ~ <input class="form-control" style="width: 100px;" type="text" id="endAge"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">支付方式:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="checkbox" onclick="updateType(1,this)"> 现金支付 |
| | | <input type="checkbox" onclick="updateType(2,this)"> 玩湃币支付 |
| | | <input type="checkbox" onclick="updateType(3,this)"> 课时支付 |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" id="payType1" style="display: none"> |
| | | <label class="col-sm-3 control-label">现金支付:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="cashPrice"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" id="payType2" style="display: none"> |
| | | <label class="col-sm-3 control-label">玩湃币支付:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="playPaiCoin"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" id="payType3" style="display: none"> |
| | | <label class="col-sm-3 control-label">课时支付:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="classPrice"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">参加地点:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 500px;" type="text" id="address" onchange="TCarInfoDlg.searchByStationName(this,1)"> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-10" style="margin-left: 397px;width: 70%;" > |
| | | <!-- 创建地图容器--> |
| | | <div id="container" style="height: 500px;" ></div> |
| | | </div> |
| | | <div hidden id="longitude"></div> |
| | | <div hidden id="latitude"></div> |
| | | |
| | | <#input id="applicantsNumber" name="报名人数" type="text"/> |
| | | <#input id="baseNumber" name="基础报名人数" type="text"/> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">是否实名:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="realName" value="1" checked> 是 |
| | | <input type="radio" name="realName" value="0"> 否 |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">赛事简介:</label> |
| | | <div class="col-sm-9"> |
| | | <textarea id="introduction" style="height: 203px; width: 506px;"></textarea> |
| | | </div> |
| | | </div> |
| | | |
| | | <#avatar id="coverDrawing" name="赛事封面(推荐像素:210*280px):" /> |
| | | <#avatar id="imgs" name="赛事图片(推荐像素:780*440px):" /> |
| | | <#avatar id="registrationNotes" name="报名须知(推荐像素:宽780px):" /> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tCompetition/tCompetition_info.js"></script> |
| | | <script> |
| | | |
| | | |
| | | laydate.render({ |
| | | elem: '#startTime' |
| | | ,type:"datetime" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#endTime' |
| | | ,type:"datetime" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#registerEndTime' |
| | | ,type:"datetime" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#transDateStart' |
| | | ,type:"datetime" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#transDateStop' |
| | | ,type:"datetime" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#certifyDateB' |
| | | ,lang:"en" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#nextFixDate' |
| | | ,lang:"en" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#GPSInstallDate' |
| | | ,lang:"en" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#registerDate' |
| | | ,lang:"en" |
| | | }); |
| | | |
| | | |
| | | function updateType(e,o) { |
| | | if(e==1){ |
| | | if($(o).is(":checked")){ |
| | | $("#payType1").show(); |
| | | }else { |
| | | $("#payType1").hide(); |
| | | } |
| | | } |
| | | if(e==2){ |
| | | if($(o).is(":checked")){ |
| | | $("#payType2").show(); |
| | | }else { |
| | | $("#payType2").hide(); |
| | | } |
| | | } |
| | | if(e==3){ |
| | | if($(o).is(":checked")){ |
| | | $("#payType3").show(); |
| | | }else { |
| | | $("#payType3").hide(); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <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"> |
| | | <input hidden id="id" value="${item.id}"> |
| | | <input hidden id="s1" value="${item.registerCondition}"> |
| | | <input hidden id="q1" value="${item.cashPrice}"> |
| | | <input hidden id="q2" value="${item.playPaiCoin}"> |
| | | <input hidden id="q3" value="${item.classPrice}"> |
| | | <input hidden id="rname" value="${item.realName}"> |
| | | <input hidden id="type" value="${item.auditStatus}"> |
| | | @if(type==2){ |
| | | <#label id="types" name="当前状态" type="text" /> |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">举办省:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="pCode" name="pCode" onchange="TCarInfoDlg.oneChange(this)"> |
| | | <option value="">选择省</option> |
| | | @for(obj in list){ |
| | | <option disabled value="${obj.code}" ${obj.code == item.provinceCode ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">举办市:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="cCode" name="cCode" onchange="TCarInfoDlg.oneChangeNext(this)"> |
| | | <option value="">选择市</option> |
| | | @for(obj in list1){ |
| | | <option disabled value="${obj.code}" ${obj.code == item.cityCode ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <div class="form-group" id="shop"> |
| | | <label class="col-sm-3 control-label">举办门店:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="shopId" name="shopId"> |
| | | <option value="">选择门店</option> |
| | | @for(obj in list2){ |
| | | <option disabled value="${obj.id}" ${obj.id == item.storeId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#input id="name" name="赛事名称" type="text" value="${item.name}" readonly="true"/> |
| | | <#input id="startTime" name="开始时间" type="text" value="${item.startTime}" readonly="true"/> |
| | | <#input id="endTime" name="结束时间" type="text" value="${item.endTime}" readonly="true"/> |
| | | <#input id="registerEndTime" name="截止报名时间" type="text" value="${item.registerEndTime}" readonly="true"/> |
| | | @if(type==2){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">报名条件:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="registerCondition" value="1" disabled> 全部用户 |
| | | <input type="radio" name="registerCondition" value="2" disabled>仅限年度会员参与 |
| | | <input type="radio" name="registerCondition" value="3" disabled>仅限学员参与 |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">报名年龄:</label> |
| | | <div class="col-sm-9" style="display: flex"> |
| | | <input class="form-control" style="width: 100px;" type="text" id="startAge" value="${item.startAge}" readonly> ~ <input class="form-control" style="width: 100px;" type="text" id="endAge" value="${item.endAge}" readonly> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">支付方式:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="checkbox" id="t1" onclick="updateType(1,this)" disabled> 现金支付 |
| | | <input type="checkbox" id="t2" onclick="updateType(2,this)" disabled> 玩湃币支付 |
| | | <input type="checkbox" id="t3" onclick="updateType(3,this)" disabled> 课时支付 |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" id="payType1" style="display: none"> |
| | | <label class="col-sm-3 control-label">现金支付:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="cashPrice" value="${item.cashPrice}" readonly> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" id="payType2" style="display: none"> |
| | | <label class="col-sm-3 control-label">玩湃币支付:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="playPaiCoin" value="${item.playPaiCoin}"readonly> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" id="payType3" style="display: none"> |
| | | <label class="col-sm-3 control-label">课时支付:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="classPrice" value="${item.classPrice}" readonly> |
| | | </div> |
| | | </div> |
| | | @} |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">参加地点:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 500px;" type="text" id="address" onchange="TCarInfoDlg.searchByStationName(this,1)" value="${item.address}" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-10" style="margin-left: 397px;width: 70%;" > |
| | | <!-- 创建地图容器--> |
| | | <div id="container" style="height: 500px;" ></div> |
| | | </div> |
| | | <div hidden id="longitude" value="${item.longitude}"></div> |
| | | <div hidden id="latitude" value="${item.latitude}"></div> |
| | | |
| | | <#input id="applicantsNumber" name="报名人数" type="text" value="${item.applicantsNumber}" readonly="true"/> |
| | | <#input id="baseNumber" name="基础报名人数" type="text" value="${item.baseNumber}" readonly="true"/> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">是否实名:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="realName" value="1" disabled> 是 |
| | | <input type="radio" name="realName" value="0" disabled> 否 |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">赛事简介:</label> |
| | | <div class="col-sm-9"> |
| | | <textarea id="introduction" style="height: 203px; width: 506px;" readonly>${item.introduction}</textarea> |
| | | </div> |
| | | </div> |
| | | |
| | | <#avatar id="coverDrawing" name="赛事封面(推荐像素:210*280px):" avatarImg="${item.coverDrawing}" /> |
| | | <#avatar id="imgs" name="赛事图片(推荐像素:780*440px):" /> |
| | | <#avatar id="registrationNotes" name="报名须知(推荐像素:宽780px):" avatarImg="${item.registrationNotes}"/> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">审核状态:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="auditType" value="2" checked> 通过 <input type="radio" name="auditType" value="3" > 拒绝 |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">拒绝理由:</label> |
| | | <div class="col-sm-9"> |
| | | <textarea id="text" style="height: 203px; width: 506px;"></textarea> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tCompetitionAudit/tCompetition_info.js"></script> |
| | | <script> |
| | | |
| | | window.onload = function() { |
| | | if($("#type").val()==1){ |
| | | $("#types").html("待审核").css("color","goldenrod") |
| | | }else if($("#type").val()==3){ |
| | | $("#types").html("未通过").css("color","red") |
| | | } |
| | | |
| | | |
| | | |
| | | var OBJradio = document.getElementsByName("registerCondition") |
| | | for (i = 0; i < OBJradio.length; i++) {//循环查找这个radio |
| | | if ($("#s1").val() == OBJradio[i].value) {//判断是否与radio的值相同 |
| | | OBJradio[i].checked = true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio = document.getElementsByName("realName") |
| | | for (i = 0; i < OBJradio.length; i++) {//循环查找这个radio |
| | | if ($("#rname").val() == OBJradio[i].value) {//判断是否与radio的值相同 |
| | | OBJradio[i].checked = true//修改选中状态 |
| | | } |
| | | } |
| | | |
| | | if($("#q1").val()>0 && $("#type").val()==2){ |
| | | $("#payType1").show(); |
| | | $("input[id='t1']").attr("checked", "checked") |
| | | } |
| | | if($("#q2").val()>0 && $("#type").val()==2){ |
| | | $("#payType2").show(); |
| | | $("input[id='t2']").attr("checked", "checked") |
| | | } |
| | | if($("#q3").val()>0 && $("#type").val()==2){ |
| | | $("#payType3").show(); |
| | | $("input[id='t3']").attr("checked", "checked") |
| | | } |
| | | |
| | | } |
| | | |
| | | function editSubmit(){ |
| | | let audit = document.querySelector('input[name="auditType"]:checked').value; |
| | | let text = $("#text").val() |
| | | if(audit==3){ |
| | | if(text==''){ |
| | | Feng.info("请输入拒绝理由") |
| | | return false; |
| | | } |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetitionAudit/audit", function (data) { |
| | | if (data.code == 200) { |
| | | Feng.success("操作成功!"); |
| | | window.location.reload(); |
| | | window.parent.layer.closeAll(); |
| | | } else if(data=="repeat"){ |
| | | window.location.reload(); |
| | | window.parent.layer.closeAll(); |
| | | Feng.error("请勿重复操作"); |
| | | }else { |
| | | return Feng.error(data.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("操作失败!") |
| | | window.location.reload(); |
| | | window.parent.layer.closeAll(); |
| | | return Feng.error("操作失败!"); |
| | | }, function (data) { |
| | | if(language==1){ |
| | | swal("删除失败", data.responseJSON.message + "!", "warning"); |
| | | }else if(language==2){ |
| | | swal("Failed to delete", data.responseJSON.message + "!", "warning"); |
| | | }else { |
| | | swal("Hapus Gagal", data.responseJSON.message + "!", "warning"); |
| | | } |
| | | |
| | | }); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.set("audit",audit); |
| | | ajax.set("text",text); |
| | | ajax.start(); |
| | | } |
| | | |
| | | laydate.render({ |
| | | elem: '#startTime' |
| | | ,type:"datetime" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#endTime' |
| | | ,type:"datetime" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#registerEndTime' |
| | | ,type:"datetime" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#transDateStart' |
| | | ,type:"datetime" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#transDateStop' |
| | | ,type:"datetime" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#certifyDateB' |
| | | ,lang:"en" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#nextFixDate' |
| | | ,lang:"en" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#GPSInstallDate' |
| | | ,lang:"en" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#registerDate' |
| | | ,lang:"en" |
| | | }); |
| | | |
| | | |
| | | function updateType(e,o) { |
| | | if(e==1){ |
| | | if($(o).is(":checked")){ |
| | | $("#payType1").show(); |
| | | }else { |
| | | $("#payType1").hide(); |
| | | } |
| | | } |
| | | if(e==2){ |
| | | if($(o).is(":checked")){ |
| | | $("#payType2").show(); |
| | | }else { |
| | | $("#payType2").hide(); |
| | | } |
| | | } |
| | | if(e==3){ |
| | | if($(o).is(":checked")){ |
| | | $("#payType3").show(); |
| | | }else { |
| | | $("#payType3").hide(); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>积分管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="name" name="用户姓名" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="phone" name="联系电话" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="type" name="积分类型"> |
| | | <option value="">全部</option> |
| | | <option value="1">赠送积分</option> |
| | | <option value="2">兑换商品</option> |
| | | <option value="3">完成课后练习</option> |
| | | <option value="4">观看教学视频</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="category" name="变动类型"> |
| | | <option value="">全部</option> |
| | | <option value="1">增加</option> |
| | | <option value="2">扣除</option> |
| | | </#SelectCon> |
| | | |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="time" name="变动时间" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCompetition.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TCompetition.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TCompetitionTableToolbar" role="group"> |
| | | <#button name="赠送积分" icon="fa-plus" clickFun="TCompetition.openAddTCompetition()"/> |
| | | |
| | | </div> |
| | | <#table id="TSiteTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tIntegral/tIntegral.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#time' |
| | | ,range: true |
| | | }); |
| | | </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"> |
| | | <input hidden id="role" value="${role}"> |
| | | @if(role=='1'){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="pCode" name="pCode" onchange="TCarInfoDlg.oneChange(this)"> |
| | | <option value="">选择省</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="cCode" name="cCode" onchange="TCarInfoDlg.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"> |
| | | <select class="form-control" id="account" name="account"> |
| | | <option value="">选择账号</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <#input id="name" name="门店名称" type="text"/> |
| | | <#input id="phone" name="联系电话" type="text"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">门店地址:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="address" name="address" type="text" onchange="TCarInfoDlg.searchByStationName(this,1)"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-10" style="margin-left: 397px;width: 70%;" > |
| | | <!-- 创建地图容器--> |
| | | <div id="container" style="height: 500px;" ></div> |
| | | </div> |
| | | <#input id="time" name="营业时间" type="text"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">门店介绍:</label> |
| | | <div class="col-sm-9"> |
| | | <textarea id="introduce" style="width: 617px; height: 180px;"></textarea> |
| | | </div> |
| | | </div> |
| | | <#input id="userName" name="店长姓名" type="text"/> |
| | | <#input id="userPhone" name="店长手机号" type="text"/> |
| | | <#avatar id="img" name="门店封面(推荐像素722*360px)" /> |
| | | <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: 5%">*实景图片(请上传不超过五张图片): </label> |
| | | <div class="col-sm-2" style="width: 100%;margin-left: 11%;margin-top: 1%"> |
| | | <el-upload |
| | | :limit="5" |
| | | class="avatar-uploader" |
| | | action="/tCouponManage/uploadPic" |
| | | list-type="picture-card" |
| | | accept="." |
| | | :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=""> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop_info.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"> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#time', |
| | | range:true |
| | | }); |
| | | |
| | | var vue2 = new Vue({ |
| | | el: '#app1', |
| | | props: { |
| | | // 数量限制 |
| | | limit: { |
| | | type: Number, |
| | | default: 2 |
| | | }, |
| | | }, |
| | | data: { |
| | | autoUpload: true,//自动上传 |
| | | imageUrl1: '',//模型数据,用于上传图片完成后图片预览 |
| | | dialogVisible: false |
| | | }, |
| | | methods: { |
| | | handleAvatarSuccess(res, file) { |
| | | couponInfoDlg.goodsPicArray.push(file); |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isLt2M = file.size / 1024 / 1024 < 10; |
| | | if (!isLt2M) { |
| | | this.$message.error('上传图片大小不能超过 10MB!'); |
| | | } |
| | | return isLt2M; |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | couponInfoDlg.goodsPicArray = couponInfoDlg.goodsPicArray.filter(item => { |
| | | return item.uid != file.uid; |
| | | }); |
| | | }, |
| | | }, |
| | | created() { |
| | | }, |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <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"> |
| | | <input hidden id="id" value="${item.id}"> |
| | | <input hidden id="role" value="${role}"> |
| | | @if(role=='1'){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="pCode" name="pCode" onchange="TCarInfoDlg.oneChange(this)"> |
| | | <option value="">选择省</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}" ${obj.code == item.provinceCode ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="cCode" name="cCode" onchange="TCarInfoDlg.oneChangeNext(this)"> |
| | | <option value="">选择市</option> |
| | | @for(obj in list1){ |
| | | <option value="${obj.code}" ${obj.code == item.cityCode ? '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"> |
| | | <select class="form-control" id="account" name="account"> |
| | | <option value="">选择账号</option> |
| | | @for(obj in list2){ |
| | | <option value="${obj.id}" ${obj.id == item.cityManagerId ? 'selected=selected' : ''}>${obj.name}-${obj.phone}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <#input id="name" name="门店名称" type="text" value="${item.name}"/> |
| | | <#input id="phone" name="联系电话" type="text" value="${item.phone}"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">门店地址:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="address" name="address" type="text" value="${item.address}" onchange="TCarInfoDlg.searchByStationName(this,1)"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-10" style="margin-left: 397px;width: 70%;" > |
| | | <!-- 创建地图容器--> |
| | | <div id="container" style="height: 500px;" ></div> |
| | | </div> |
| | | <#input id="time" name="营业时间" type="text" value="${time}"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">门店介绍:</label> |
| | | <div class="col-sm-9"> |
| | | <textarea id="introduce" style="width: 617px; height: 180px;">${item.introduce}</textarea> |
| | | </div> |
| | | </div> |
| | | <#input id="userName" name="管理员姓名" type="text" value="${city.name}"/> |
| | | <#input id="userPhone" name="管理员手机号" type="text" value="${city.account}"/> |
| | | <#avatar id="img" name="门店封面(推荐像素722*360px)" avatarImg="${item.coverDrawing}"/> |
| | | <#input id="imgOne" name="实景照片" type="text" value="${item.realPicture}"/> |
| | | |
| | | |
| | | </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="TCarInfoDlg.editSubmit()"/> |
| | | @} |
| | | <#button btnCss="danger" name="关闭" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop_info.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#time', |
| | | range:true |
| | | }); |
| | | </script> |
| | | <script type="application/javascript"> |
| | | |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <input hidden id="id" value="${id}"> |
| | | @if(welfarePicture==null){ |
| | | <#avatar id="welfarePicture" name="福利图片"/> |
| | | @} |
| | | @if(welfarePicture!=null){ |
| | | <#avatar id="welfarePicture" name="福利图片" avatarImg="${welfarePicture}"/> |
| | | @} |
| | | @if(welfarePicture==12321){ |
| | | <div class="form-group"> |
| | | <div class="col-sm-4"> |
| | | <div id="welfarePicturePreId"> |
| | | <div><img width="700px" height="800px" id="img" src="${welfarePicture}" ></div> |
| | | </div> |
| | | </div> |
| | | |
| | | <input type="hidden" id="welfarePicture"> |
| | | </div> |
| | | <div class="col-sm-2" style="margin-left: 280px"> |
| | | <div class="head-scu-btn upload-btn webuploader-container" id="welfarePictureBtnId"><div class="webuploader-pick"> |
| | | <i class="fa fa-upload"></i> Upload |
| | | </div><div id="rt_rt_1h6lka0hk9mucj87vf1t21qk31" style="position: absolute; inset: 0px auto auto 0px; width: 82px; height: 28px; overflow: hidden;"><input type="file" name="file" class="webuploader-element-invisible" accept="image/gif,image/jpg,image/jpeg,image/bmp,image/png"><label style="opacity: 0; width: 100%; height: 100%; display: block; cursor: pointer; background: rgb(255, 255, 255);"></label></div></div> |
| | | </div> |
| | | @} |
| | | |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.saveImg()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop_info.js"></script> |
| | | <script> |
| | | </script> |
| | | <script type="application/javascript"> |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <input hidden id="id" value="${id}"> |
| | | <input hidden id="s1" value="${c1.isOpen}"> |
| | | <input hidden id="s2" value="${c2.isOpen}"> |
| | | <input hidden id="s3" value="${c3.isOpen}"> |
| | | <input hidden id="s4" value="${c4.isOpen}"> |
| | | <input hidden id="s5" value="${c5.isOpen}"> |
| | | <input hidden id="s6" value="${c6.isOpen}"> |
| | | <input hidden id="s7" value="${c7.isOpen}"> |
| | | <input hidden id="s8" value="${c8.isOpen}"> |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 报名玩湃课程:<input type="radio" name="r1" value="1">开启 <input type="radio" name="r1" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px1" value="${c1.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c1==null){ |
| | | <#avatar id="c1" name="背景图" /> |
| | | @} |
| | | @if(c1!=null){ |
| | | <#avatar id="c1" name="背景图" avatarImg="${c1.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 预约场地:<input type="radio" name="r2" value="1">开启 <input type="radio" name="r2" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px2" value="${c2.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c2==null){ |
| | | <#avatar id="c2" name="背景图" /> |
| | | @} |
| | | @if(c2!=null){ |
| | | <#avatar id="c2" name="背景图" avatarImg="${c2.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 报名赛事及活动:<input type="radio" name="r3" value="1">开启 <input type="radio" name="r3" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px3" value="${c3.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c3==null){ |
| | | <#avatar id="c3" name="背景图" /> |
| | | @} |
| | | @if(c3!=null){ |
| | | <#avatar id="c3" name="背景图" avatarImg="${c3.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 免费福利:<input type="radio" name="r4" value="1">开启 <input type="radio" name="r4" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px4" value="${c4.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c4==null){ |
| | | <#avatar id="c4" name="背景图" /> |
| | | @} |
| | | @if(c4!=null){ |
| | | <#avatar id="c4" name="背景图" avatarImg="${c4.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 线上课得积分:<input type="radio" name="r5" value="1">开启 <input type="radio" name="r5" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px5" value="${c5.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c5==null){ |
| | | <#avatar id="c5" name="背景图" /> |
| | | @} |
| | | @if(c5!=null){ |
| | | <#avatar id="c5" name="背景图" avatarImg="${c5.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 购买优惠门票:<input type="radio" name="r6" value="1">开启 <input type="radio" name="r6" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px6" value="${c6.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c6==null){ |
| | | <#avatar id="c6" name="背景图" /> |
| | | @} |
| | | @if(c6!=null){ |
| | | <#avatar id="c6" name="背景图" avatarImg="${c6.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 看视频得奖励:<input type="radio" name="r7" value="1">开启 <input type="radio" name="r7" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px7" value="${c7.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c7==null){ |
| | | <#avatar id="c7" name="背景图" /> |
| | | @} |
| | | @if(c7!=null){ |
| | | <#avatar id="c7" name="背景图" avatarImg="${c7.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 智慧球场:<input type="radio" name="r8" value="1">开启 <input type="radio" name="r8" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px8" value="${c8.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c8==null){ |
| | | <#avatar id="c8" name="背景图" /> |
| | | @} |
| | | @if(c8!=null){ |
| | | <#avatar id="c8" name="背景图" avatarImg="${c8.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.saveAllImg()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop_info.js"></script> |
| | | |
| | | <script> |
| | | </script> |
| | | <script type="application/javascript"> |
| | | window.onload = function(){ |
| | | var OBJradio=document.getElementsByName("r1") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s1").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r2") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s2").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r3") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s3").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r4") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s4").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r5") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s5").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r6") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s6").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r7") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s7").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r8") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s8").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | </script> |
| | | @} |
| | |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | |
| | | <input hidden id="role" value="${role}"> |
| | | <div class="ibox-title"> |
| | | <h5>门店管理</h5> |
| | | </div> |
| | |
| | | |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <input hidden id="role" value="${role}"> |
| | | @if(role=='1'){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <#input id="name" name="门店名称" type="text"/> |
| | | <#input id="phone" name="联系电话" type="text"/> |
| | | <div class="form-group"> |
| | |
| | | <!-- 创建地图容器--> |
| | | <div id="container" style="height: 500px;" ></div> |
| | | </div> |
| | | <div hidden id="longitude"></div> |
| | | <div hidden id="latitude"></div> |
| | | |
| | | <#input id="time" name="营业时间" type="text"/> |
| | | <#input id="intro" name="门店介绍" type="text"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">门店介绍:</label> |
| | | <div class="col-sm-9"> |
| | | <textarea id="introduce" style="width: 617px; height: 180px;"></textarea> |
| | | </div> |
| | | </div> |
| | | <#input id="userName" name="店长姓名" type="text"/> |
| | | <#input id="userPhone" name="店长手机号" type="text"/> |
| | | <#avatar id="img" name="门店封面(推荐像素722*360px)" /> |
| | |
| | | }, |
| | | methods: { |
| | | handleAvatarSuccess(res, file) { |
| | | couponInfoDlg.goodsPicArray.push(file); |
| | | TCarInfoDlg.goodsPicArray.push(file); |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isLt2M = file.size / 1024 / 1024 < 10; |
| | |
| | | return isLt2M; |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | couponInfoDlg.goodsPicArray = couponInfoDlg.goodsPicArray.filter(item => { |
| | | TCarInfoDlg.goodsPicArray = TCarInfoDlg.goodsPicArray.filter(item => { |
| | | return item.uid != file.uid; |
| | | }); |
| | | }, |
| | |
| | | |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <input hidden id="id" value="${item.id}"> |
| | | |
| | | <input hidden id="role" value="${role}"> |
| | | @if(role=='1'){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <#input id="name" name="门店名称" type="text" value="${item.name}"/> |
| | | <#input id="phone" name="联系电话" type="text" value="${item.phone}"/> |
| | | <div class="form-group"> |
| | |
| | | <div id="container" style="height: 500px;" ></div> |
| | | </div> |
| | | <#input id="time" name="营业时间" type="text" value="${time}"/> |
| | | <#input id="intro" name="门店介绍" type="text" value="${item.introduce}"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">门店介绍:</label> |
| | | <div class="col-sm-9"> |
| | | <textarea id="introduce" style="width: 617px; height: 180px;">${item.introduce}</textarea> |
| | | </div> |
| | | </div> |
| | | <#input id="userName" name="管理员姓名" type="text" value="${city.name}"/> |
| | | <#input id="userPhone" name="管理员手机号" type="text" value="${city.account}"/> |
| | | <#avatar id="img" name="门店封面(推荐像素722*360px)" avatarImg="${item.coverDrawing}"/> |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>评价管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <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="TCompetition.oneChange(this)"> |
| | | <option value="">全部</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <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"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="shopName" name="门店名称" /> |
| | | </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"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCompetition.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TCompetition.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TCompetitionTableToolbar" role="group"> |
| | | <#button name="上架" icon="fa-plus" clickFun="TCompetition.updateState(1)"/> |
| | | <#button name="下架" icon="fa-edit" clickFun="TCompetition.updateState(2)" space="true"/> |
| | | <#button name="查看详情" icon="fa-remove" clickFun="TCompetition.info()" space="true"/> |
| | | </div> |
| | | <#table id="TCompetitionTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShopEvaluation/tShop.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#createTime' |
| | | ,range: true |
| | | ,lang:"en" |
| | | }); |
| | | </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"> |
| | | <input hidden id="role" value="${role}"> |
| | | @if(role=='1'){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="pCode" name="pCode" onchange="TCarInfoDlg.oneChange(this)"> |
| | | <option value="">选择省</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="cCode" name="cCode" onchange="TCarInfoDlg.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"> |
| | | <select class="form-control" id="account" name="account"> |
| | | <option value="">选择账号</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <#input id="name" name="门店名称" type="text"/> |
| | | <#input id="phone" name="联系电话" type="text"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">门店地址:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="address" name="address" type="text" onchange="TCarInfoDlg.searchByStationName(this,1)"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-10" style="margin-left: 397px;width: 70%;" > |
| | | <!-- 创建地图容器--> |
| | | <div id="container" style="height: 500px;" ></div> |
| | | </div> |
| | | <div hidden id="longitude"></div> |
| | | <div hidden id="latitude"></div> |
| | | |
| | | <#input id="time" name="营业时间" type="text"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">门店介绍:</label> |
| | | <div class="col-sm-9"> |
| | | <textarea id="introduce" style="width: 617px; height: 180px;"></textarea> |
| | | </div> |
| | | </div> |
| | | <#input id="userName" name="店长姓名" type="text"/> |
| | | <#input id="userPhone" name="店长手机号" type="text"/> |
| | | <#avatar id="img" name="门店封面(推荐像素722*360px)" /> |
| | | <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: 5%">*实景图片(请上传不超过五张图片): </label> |
| | | <div class="col-sm-2" style="width: 100%;margin-left: 11%;margin-top: 1%"> |
| | | <el-upload |
| | | :limit="5" |
| | | class="avatar-uploader" |
| | | action="/tCouponManage/uploadPic" |
| | | list-type="picture-card" |
| | | accept="." |
| | | :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=""> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop_info.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"> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#time', |
| | | range:true |
| | | }); |
| | | |
| | | var vue2 = new Vue({ |
| | | el: '#app1', |
| | | props: { |
| | | // 数量限制 |
| | | limit: { |
| | | type: Number, |
| | | default: 2 |
| | | }, |
| | | }, |
| | | data: { |
| | | autoUpload: true,//自动上传 |
| | | imageUrl1: '',//模型数据,用于上传图片完成后图片预览 |
| | | dialogVisible: false |
| | | }, |
| | | methods: { |
| | | handleAvatarSuccess(res, file) { |
| | | TCarInfoDlg.goodsPicArray.push(file); |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isLt2M = file.size / 1024 / 1024 < 10; |
| | | if (!isLt2M) { |
| | | this.$message.error('上传图片大小不能超过 10MB!'); |
| | | } |
| | | return isLt2M; |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | TCarInfoDlg.goodsPicArray = TCarInfoDlg.goodsPicArray.filter(item => { |
| | | return item.uid != file.uid; |
| | | }); |
| | | }, |
| | | }, |
| | | created() { |
| | | }, |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <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"> |
| | | <#label id="name" name="所在省" type="text" value="${name1}"/> |
| | | <#label id="name" name="所在市" type="text" value="${name2}"/> |
| | | <#label id="name" name="所属门店" type="text" value="${item.shopName}"/> |
| | | <#label id="name" name="评价用户" type="text" value="${item.name}"/> |
| | | <#label id="name" name="评价时间" type="text" value="${item.time}"/> |
| | | <#label id="name" name="总体评分" type="text" value="${item.score}"/> |
| | | <#label id="name" name="评价内容" type="text" value="${item.content}"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">评价图片:</label> |
| | | <div class="col-sm-9"> |
| | | @for(o in imgs){ |
| | | <img src=${o} style="width: 163px;height: 96px;"> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="danger" name="关闭" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop_info.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#time', |
| | | range:true |
| | | }); |
| | | </script> |
| | | <script type="application/javascript"> |
| | | |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <input hidden id="id" value="${id}"> |
| | | @if(welfarePicture==null){ |
| | | <#avatar id="welfarePicture" name="福利图片"/> |
| | | @} |
| | | @if(welfarePicture!=null){ |
| | | <#avatar id="welfarePicture" name="福利图片" avatarImg="${welfarePicture}"/> |
| | | @} |
| | | @if(welfarePicture==12321){ |
| | | <div class="form-group"> |
| | | <div class="col-sm-4"> |
| | | <div id="welfarePicturePreId"> |
| | | <div><img width="700px" height="800px" id="img" src="${welfarePicture}" ></div> |
| | | </div> |
| | | </div> |
| | | |
| | | <input type="hidden" id="welfarePicture"> |
| | | </div> |
| | | <div class="col-sm-2" style="margin-left: 280px"> |
| | | <div class="head-scu-btn upload-btn webuploader-container" id="welfarePictureBtnId"><div class="webuploader-pick"> |
| | | <i class="fa fa-upload"></i> Upload |
| | | </div><div id="rt_rt_1h6lka0hk9mucj87vf1t21qk31" style="position: absolute; inset: 0px auto auto 0px; width: 82px; height: 28px; overflow: hidden;"><input type="file" name="file" class="webuploader-element-invisible" accept="image/gif,image/jpg,image/jpeg,image/bmp,image/png"><label style="opacity: 0; width: 100%; height: 100%; display: block; cursor: pointer; background: rgb(255, 255, 255);"></label></div></div> |
| | | </div> |
| | | @} |
| | | |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.saveImg()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop_info.js"></script> |
| | | <script> |
| | | </script> |
| | | <script type="application/javascript"> |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <input hidden id="id" value="${id}"> |
| | | <input hidden id="s1" value="${c1.isOpen}"> |
| | | <input hidden id="s2" value="${c2.isOpen}"> |
| | | <input hidden id="s3" value="${c3.isOpen}"> |
| | | <input hidden id="s4" value="${c4.isOpen}"> |
| | | <input hidden id="s5" value="${c5.isOpen}"> |
| | | <input hidden id="s6" value="${c6.isOpen}"> |
| | | <input hidden id="s7" value="${c7.isOpen}"> |
| | | <input hidden id="s8" value="${c8.isOpen}"> |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 报名玩湃课程:<input type="radio" name="r1" value="1">开启 <input type="radio" name="r1" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px1" value="${c1.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c1==null){ |
| | | <#avatar id="c1" name="背景图" /> |
| | | @} |
| | | @if(c1!=null){ |
| | | <#avatar id="c1" name="背景图" avatarImg="${c1.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 预约场地:<input type="radio" name="r2" value="1">开启 <input type="radio" name="r2" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px2" value="${c2.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c2==null){ |
| | | <#avatar id="c2" name="背景图" /> |
| | | @} |
| | | @if(c2!=null){ |
| | | <#avatar id="c2" name="背景图" avatarImg="${c2.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 报名赛事及活动:<input type="radio" name="r3" value="1">开启 <input type="radio" name="r3" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px3" value="${c3.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c3==null){ |
| | | <#avatar id="c3" name="背景图" /> |
| | | @} |
| | | @if(c3!=null){ |
| | | <#avatar id="c3" name="背景图" avatarImg="${c3.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 免费福利:<input type="radio" name="r4" value="1">开启 <input type="radio" name="r4" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px4" value="${c4.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c4==null){ |
| | | <#avatar id="c4" name="背景图" /> |
| | | @} |
| | | @if(c4!=null){ |
| | | <#avatar id="c4" name="背景图" avatarImg="${c4.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 线上课得积分:<input type="radio" name="r5" value="1">开启 <input type="radio" name="r5" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px5" value="${c5.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c5==null){ |
| | | <#avatar id="c5" name="背景图" /> |
| | | @} |
| | | @if(c5!=null){ |
| | | <#avatar id="c5" name="背景图" avatarImg="${c5.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 购买优惠门票:<input type="radio" name="r6" value="1">开启 <input type="radio" name="r6" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px6" value="${c6.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c6==null){ |
| | | <#avatar id="c6" name="背景图" /> |
| | | @} |
| | | @if(c6!=null){ |
| | | <#avatar id="c6" name="背景图" avatarImg="${c6.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 看视频得奖励:<input type="radio" name="r7" value="1">开启 <input type="radio" name="r7" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px7" value="${c7.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c7==null){ |
| | | <#avatar id="c7" name="背景图" /> |
| | | @} |
| | | @if(c7!=null){ |
| | | <#avatar id="c7" name="背景图" avatarImg="${c7.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 智慧球场:<input type="radio" name="r8" value="1">开启 <input type="radio" name="r8" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px8" value="${c8.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c8==null){ |
| | | <#avatar id="c8" name="背景图" /> |
| | | @} |
| | | @if(c8!=null){ |
| | | <#avatar id="c8" name="背景图" avatarImg="${c8.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.saveAllImg()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop_info.js"></script> |
| | | |
| | | <script> |
| | | </script> |
| | | <script type="application/javascript"> |
| | | window.onload = function(){ |
| | | var OBJradio=document.getElementsByName("r1") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s1").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r2") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s2").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r3") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s3").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r4") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s4").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r5") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s5").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r6") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s6").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r7") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s7").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r8") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s8").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | </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"> |
| | | <input hidden id="role" value="${role}"> |
| | | @if(role=='1'){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="pCode" name="pCode" onchange="TCarInfoDlg.oneChange(this)"> |
| | | <option value="">选择省</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="cCode" name="cCode" onchange="TCarInfoDlg.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"> |
| | | <select class="form-control" id="account" name="account"> |
| | | <option value="">选择账号</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <#input id="name" name="门店名称" type="text"/> |
| | | <#input id="phone" name="联系电话" type="text"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">门店地址:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="address" name="address" type="text" onchange="TCarInfoDlg.searchByStationName(this,1)"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-10" style="margin-left: 397px;width: 70%;" > |
| | | <!-- 创建地图容器--> |
| | | <div id="container" style="height: 500px;" ></div> |
| | | </div> |
| | | <#input id="time" name="营业时间" type="text"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">门店介绍:</label> |
| | | <div class="col-sm-9"> |
| | | <textarea id="introduce" style="width: 617px; height: 180px;"></textarea> |
| | | </div> |
| | | </div> |
| | | <#input id="userName" name="店长姓名" type="text"/> |
| | | <#input id="userPhone" name="店长手机号" type="text"/> |
| | | <#avatar id="img" name="门店封面(推荐像素722*360px)" /> |
| | | <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: 5%">*实景图片(请上传不超过五张图片): </label> |
| | | <div class="col-sm-2" style="width: 100%;margin-left: 11%;margin-top: 1%"> |
| | | <el-upload |
| | | :limit="5" |
| | | class="avatar-uploader" |
| | | action="/tCouponManage/uploadPic" |
| | | list-type="picture-card" |
| | | accept="." |
| | | :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=""> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop_info.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"> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#time', |
| | | range:true |
| | | }); |
| | | |
| | | var vue2 = new Vue({ |
| | | el: '#app1', |
| | | props: { |
| | | // 数量限制 |
| | | limit: { |
| | | type: Number, |
| | | default: 2 |
| | | }, |
| | | }, |
| | | data: { |
| | | autoUpload: true,//自动上传 |
| | | imageUrl1: '',//模型数据,用于上传图片完成后图片预览 |
| | | dialogVisible: false |
| | | }, |
| | | methods: { |
| | | handleAvatarSuccess(res, file) { |
| | | couponInfoDlg.goodsPicArray.push(file); |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isLt2M = file.size / 1024 / 1024 < 10; |
| | | if (!isLt2M) { |
| | | this.$message.error('上传图片大小不能超过 10MB!'); |
| | | } |
| | | return isLt2M; |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | couponInfoDlg.goodsPicArray = couponInfoDlg.goodsPicArray.filter(item => { |
| | | return item.uid != file.uid; |
| | | }); |
| | | }, |
| | | }, |
| | | created() { |
| | | }, |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <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"> |
| | | <input hidden id="id" value="${item.id}"> |
| | | <input hidden id="role" value="${role}"> |
| | | @if(role=='1'){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="pCode" name="pCode" onchange="TCarInfoDlg.oneChange(this)"> |
| | | <option value="">选择省</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}" ${obj.code == item.provinceCode ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="cCode" name="cCode" onchange="TCarInfoDlg.oneChangeNext(this)"> |
| | | <option value="">选择市</option> |
| | | @for(obj in list1){ |
| | | <option value="${obj.code}" ${obj.code == item.cityCode ? '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"> |
| | | <select class="form-control" id="account" name="account"> |
| | | <option value="">选择账号</option> |
| | | @for(obj in list2){ |
| | | <option value="${obj.id}" ${obj.id == item.cityManagerId ? 'selected=selected' : ''}>${obj.name}-${obj.phone}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <#input id="name" name="门店名称" type="text" value="${item.name}"/> |
| | | <#input id="phone" name="联系电话" type="text" value="${item.phone}"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">门店地址:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="address" name="address" type="text" value="${item.address}" onchange="TCarInfoDlg.searchByStationName(this,1)"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-10" style="margin-left: 397px;width: 70%;" > |
| | | <!-- 创建地图容器--> |
| | | <div id="container" style="height: 500px;" ></div> |
| | | </div> |
| | | <#input id="time" name="营业时间" type="text" value="${time}"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">门店介绍:</label> |
| | | <div class="col-sm-9"> |
| | | <textarea id="introduce" style="width: 617px; height: 180px;">${item.introduce}</textarea> |
| | | </div> |
| | | </div> |
| | | <#input id="userName" name="管理员姓名" type="text" value="${city.name}"/> |
| | | <#input id="userPhone" name="管理员手机号" type="text" value="${city.account}"/> |
| | | <#avatar id="img" name="门店封面(推荐像素722*360px)" avatarImg="${item.coverDrawing}"/> |
| | | <#input id="imgOne" name="实景照片" type="text" value="${item.realPicture}"/> |
| | | |
| | | |
| | | </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="TCarInfoDlg.editSubmit()"/> |
| | | @} |
| | | <#button btnCss="danger" name="关闭" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop_info.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#time', |
| | | range:true |
| | | }); |
| | | </script> |
| | | <script type="application/javascript"> |
| | | |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <input hidden id="id" value="${id}"> |
| | | @if(welfarePicture==null){ |
| | | <#avatar id="welfarePicture" name="福利图片"/> |
| | | @} |
| | | @if(welfarePicture!=null){ |
| | | <#avatar id="welfarePicture" name="福利图片" avatarImg="${welfarePicture}"/> |
| | | @} |
| | | @if(welfarePicture==12321){ |
| | | <div class="form-group"> |
| | | <div class="col-sm-4"> |
| | | <div id="welfarePicturePreId"> |
| | | <div><img width="700px" height="800px" id="img" src="${welfarePicture}" ></div> |
| | | </div> |
| | | </div> |
| | | |
| | | <input type="hidden" id="welfarePicture"> |
| | | </div> |
| | | <div class="col-sm-2" style="margin-left: 280px"> |
| | | <div class="head-scu-btn upload-btn webuploader-container" id="welfarePictureBtnId"><div class="webuploader-pick"> |
| | | <i class="fa fa-upload"></i> Upload |
| | | </div><div id="rt_rt_1h6lka0hk9mucj87vf1t21qk31" style="position: absolute; inset: 0px auto auto 0px; width: 82px; height: 28px; overflow: hidden;"><input type="file" name="file" class="webuploader-element-invisible" accept="image/gif,image/jpg,image/jpeg,image/bmp,image/png"><label style="opacity: 0; width: 100%; height: 100%; display: block; cursor: pointer; background: rgb(255, 255, 255);"></label></div></div> |
| | | </div> |
| | | @} |
| | | |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.saveImg()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop_info.js"></script> |
| | | <script> |
| | | </script> |
| | | <script type="application/javascript"> |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <input hidden id="id" value="${id}"> |
| | | <input hidden id="s1" value="${c1.isOpen}"> |
| | | <input hidden id="s2" value="${c2.isOpen}"> |
| | | <input hidden id="s3" value="${c3.isOpen}"> |
| | | <input hidden id="s4" value="${c4.isOpen}"> |
| | | <input hidden id="s5" value="${c5.isOpen}"> |
| | | <input hidden id="s6" value="${c6.isOpen}"> |
| | | <input hidden id="s7" value="${c7.isOpen}"> |
| | | <input hidden id="s8" value="${c8.isOpen}"> |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 报名玩湃课程:<input type="radio" name="r1" value="1">开启 <input type="radio" name="r1" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px1" value="${c1.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c1==null){ |
| | | <#avatar id="c1" name="背景图" /> |
| | | @} |
| | | @if(c1!=null){ |
| | | <#avatar id="c1" name="背景图" avatarImg="${c1.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 预约场地:<input type="radio" name="r2" value="1">开启 <input type="radio" name="r2" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px2" value="${c2.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c2==null){ |
| | | <#avatar id="c2" name="背景图" /> |
| | | @} |
| | | @if(c2!=null){ |
| | | <#avatar id="c2" name="背景图" avatarImg="${c2.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 报名赛事及活动:<input type="radio" name="r3" value="1">开启 <input type="radio" name="r3" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px3" value="${c3.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c3==null){ |
| | | <#avatar id="c3" name="背景图" /> |
| | | @} |
| | | @if(c3!=null){ |
| | | <#avatar id="c3" name="背景图" avatarImg="${c3.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 免费福利:<input type="radio" name="r4" value="1">开启 <input type="radio" name="r4" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px4" value="${c4.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c4==null){ |
| | | <#avatar id="c4" name="背景图" /> |
| | | @} |
| | | @if(c4!=null){ |
| | | <#avatar id="c4" name="背景图" avatarImg="${c4.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 线上课得积分:<input type="radio" name="r5" value="1">开启 <input type="radio" name="r5" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px5" value="${c5.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c5==null){ |
| | | <#avatar id="c5" name="背景图" /> |
| | | @} |
| | | @if(c5!=null){ |
| | | <#avatar id="c5" name="背景图" avatarImg="${c5.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 购买优惠门票:<input type="radio" name="r6" value="1">开启 <input type="radio" name="r6" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px6" value="${c6.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c6==null){ |
| | | <#avatar id="c6" name="背景图" /> |
| | | @} |
| | | @if(c6!=null){ |
| | | <#avatar id="c6" name="背景图" avatarImg="${c6.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 看视频得奖励:<input type="radio" name="r7" value="1">开启 <input type="radio" name="r7" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px7" value="${c7.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c7==null){ |
| | | <#avatar id="c7" name="背景图" /> |
| | | @} |
| | | @if(c7!=null){ |
| | | <#avatar id="c7" name="背景图" avatarImg="${c7.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 智慧球场:<input type="radio" name="r8" value="1">开启 <input type="radio" name="r8" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px8" value="${c8.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c8==null){ |
| | | <#avatar id="c8" name="背景图" /> |
| | | @} |
| | | @if(c8!=null){ |
| | | <#avatar id="c8" name="背景图" avatarImg="${c8.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.saveAllImg()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop_info.js"></script> |
| | | |
| | | <script> |
| | | </script> |
| | | <script type="application/javascript"> |
| | | window.onload = function(){ |
| | | var OBJradio=document.getElementsByName("r1") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s1").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r2") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s2").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r3") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s3").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r4") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s4").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r5") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s5").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r6") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s6").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r7") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s7").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r8") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s8").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <input hidden id="role" value="${role}"> |
| | | <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(role=='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="TSite.oneChange(this)"> |
| | | <option value="">全部</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(role=='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"> |
| | | </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"> |
| | | <#NameCon id="shopName" name="门店名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCompetition.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TCompetition.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TCompetitionTableToolbar" role="group"> |
| | | <#button name="添加" icon="fa-plus" clickFun="TCompetition.openAddTCompetition()"/> |
| | | <#button name="编辑" icon="fa-edit" clickFun="TCompetition.openTCompetitionDetail()" space="true"/> |
| | | <#button name="冻结" icon="fa-remove" clickFun="TCompetition.freeze()" space="true"/> |
| | | <#button name="解冻" icon="fa-remove" clickFun="TCompetition.unfreeze()" space="true"/> |
| | | <#button name="查看详情" icon="fa-remove" clickFun="TCompetition.info()" space="true"/> |
| | | <#button name="重置密码" icon="fa-remove" clickFun="TCompetition.reload()" space="true"/> |
| | | <#button name="免费福利" icon="fa-remove" clickFun="TCompetition.gift()" space="true"/> |
| | | <#button name="首页设置" icon="fa-remove" clickFun="TCompetition.indexSet()" space="true"/> |
| | | |
| | | </div> |
| | | <#table id="TCompetitionTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tSite/tSite.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#createTime' |
| | | ,range: true |
| | | ,lang:"en" |
| | | }); |
| | | </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"> |
| | | <input hidden id="role" value="${role}"> |
| | | @if(role=='1'){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="pCode" name="pCode" onchange="TCarInfoDlg.oneChange(this)"> |
| | | <option value="">选择省</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="cCode" name="cCode" onchange="TCarInfoDlg.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"> |
| | | <select class="form-control" id="account" name="account"> |
| | | <option value="">选择账号</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <#input id="name" name="门店名称" type="text"/> |
| | | <#input id="phone" name="联系电话" type="text"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">门店地址:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="address" name="address" type="text" onchange="TCarInfoDlg.searchByStationName(this,1)"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-10" style="margin-left: 397px;width: 70%;" > |
| | | <!-- 创建地图容器--> |
| | | <div id="container" style="height: 500px;" ></div> |
| | | </div> |
| | | <#input id="time" name="营业时间" type="text"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">门店介绍:</label> |
| | | <div class="col-sm-9"> |
| | | <textarea id="introduce" style="width: 617px; height: 180px;"></textarea> |
| | | </div> |
| | | </div> |
| | | <#input id="userName" name="店长姓名" type="text"/> |
| | | <#input id="userPhone" name="店长手机号" type="text"/> |
| | | <#avatar id="img" name="门店封面(推荐像素722*360px)" /> |
| | | <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: 5%">*实景图片(请上传不超过五张图片): </label> |
| | | <div class="col-sm-2" style="width: 100%;margin-left: 11%;margin-top: 1%"> |
| | | <el-upload |
| | | :limit="5" |
| | | class="avatar-uploader" |
| | | action="/tCouponManage/uploadPic" |
| | | list-type="picture-card" |
| | | accept="." |
| | | :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=""> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop_info.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"> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#time', |
| | | range:true |
| | | }); |
| | | |
| | | var vue2 = new Vue({ |
| | | el: '#app1', |
| | | props: { |
| | | // 数量限制 |
| | | limit: { |
| | | type: Number, |
| | | default: 2 |
| | | }, |
| | | }, |
| | | data: { |
| | | autoUpload: true,//自动上传 |
| | | imageUrl1: '',//模型数据,用于上传图片完成后图片预览 |
| | | dialogVisible: false |
| | | }, |
| | | methods: { |
| | | handleAvatarSuccess(res, file) { |
| | | couponInfoDlg.goodsPicArray.push(file); |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isLt2M = file.size / 1024 / 1024 < 10; |
| | | if (!isLt2M) { |
| | | this.$message.error('上传图片大小不能超过 10MB!'); |
| | | } |
| | | return isLt2M; |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | couponInfoDlg.goodsPicArray = couponInfoDlg.goodsPicArray.filter(item => { |
| | | return item.uid != file.uid; |
| | | }); |
| | | }, |
| | | }, |
| | | created() { |
| | | }, |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <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"> |
| | | <input hidden id="id" value="${item.id}"> |
| | | <input hidden id="role" value="${role}"> |
| | | @if(role=='1'){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="pCode" name="pCode" onchange="TCarInfoDlg.oneChange(this)"> |
| | | <option value="">选择省</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}" ${obj.code == item.provinceCode ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="cCode" name="cCode" onchange="TCarInfoDlg.oneChangeNext(this)"> |
| | | <option value="">选择市</option> |
| | | @for(obj in list1){ |
| | | <option value="${obj.code}" ${obj.code == item.cityCode ? '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"> |
| | | <select class="form-control" id="account" name="account"> |
| | | <option value="">选择账号</option> |
| | | @for(obj in list2){ |
| | | <option value="${obj.id}" ${obj.id == item.cityManagerId ? 'selected=selected' : ''}>${obj.name}-${obj.phone}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <#input id="name" name="门店名称" type="text" value="${item.name}"/> |
| | | <#input id="phone" name="联系电话" type="text" value="${item.phone}"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">门店地址:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="address" name="address" type="text" value="${item.address}" onchange="TCarInfoDlg.searchByStationName(this,1)"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-10" style="margin-left: 397px;width: 70%;" > |
| | | <!-- 创建地图容器--> |
| | | <div id="container" style="height: 500px;" ></div> |
| | | </div> |
| | | <#input id="time" name="营业时间" type="text" value="${time}"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">门店介绍:</label> |
| | | <div class="col-sm-9"> |
| | | <textarea id="introduce" style="width: 617px; height: 180px;">${item.introduce}</textarea> |
| | | </div> |
| | | </div> |
| | | <#input id="userName" name="管理员姓名" type="text" value="${city.name}"/> |
| | | <#input id="userPhone" name="管理员手机号" type="text" value="${city.account}"/> |
| | | <#avatar id="img" name="门店封面(推荐像素722*360px)" avatarImg="${item.coverDrawing}"/> |
| | | <#input id="imgOne" name="实景照片" type="text" value="${item.realPicture}"/> |
| | | |
| | | |
| | | </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="TCarInfoDlg.editSubmit()"/> |
| | | @} |
| | | <#button btnCss="danger" name="关闭" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop_info.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#time', |
| | | range:true |
| | | }); |
| | | </script> |
| | | <script type="application/javascript"> |
| | | |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <input hidden id="id" value="${id}"> |
| | | @if(welfarePicture==null){ |
| | | <#avatar id="welfarePicture" name="福利图片"/> |
| | | @} |
| | | @if(welfarePicture!=null){ |
| | | <#avatar id="welfarePicture" name="福利图片" avatarImg="${welfarePicture}"/> |
| | | @} |
| | | @if(welfarePicture==12321){ |
| | | <div class="form-group"> |
| | | <div class="col-sm-4"> |
| | | <div id="welfarePicturePreId"> |
| | | <div><img width="700px" height="800px" id="img" src="${welfarePicture}" ></div> |
| | | </div> |
| | | </div> |
| | | |
| | | <input type="hidden" id="welfarePicture"> |
| | | </div> |
| | | <div class="col-sm-2" style="margin-left: 280px"> |
| | | <div class="head-scu-btn upload-btn webuploader-container" id="welfarePictureBtnId"><div class="webuploader-pick"> |
| | | <i class="fa fa-upload"></i> Upload |
| | | </div><div id="rt_rt_1h6lka0hk9mucj87vf1t21qk31" style="position: absolute; inset: 0px auto auto 0px; width: 82px; height: 28px; overflow: hidden;"><input type="file" name="file" class="webuploader-element-invisible" accept="image/gif,image/jpg,image/jpeg,image/bmp,image/png"><label style="opacity: 0; width: 100%; height: 100%; display: block; cursor: pointer; background: rgb(255, 255, 255);"></label></div></div> |
| | | </div> |
| | | @} |
| | | |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.saveImg()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop_info.js"></script> |
| | | <script> |
| | | </script> |
| | | <script type="application/javascript"> |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <input hidden id="id" value="${id}"> |
| | | <input hidden id="s1" value="${c1.isOpen}"> |
| | | <input hidden id="s2" value="${c2.isOpen}"> |
| | | <input hidden id="s3" value="${c3.isOpen}"> |
| | | <input hidden id="s4" value="${c4.isOpen}"> |
| | | <input hidden id="s5" value="${c5.isOpen}"> |
| | | <input hidden id="s6" value="${c6.isOpen}"> |
| | | <input hidden id="s7" value="${c7.isOpen}"> |
| | | <input hidden id="s8" value="${c8.isOpen}"> |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 报名玩湃课程:<input type="radio" name="r1" value="1">开启 <input type="radio" name="r1" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px1" value="${c1.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c1==null){ |
| | | <#avatar id="c1" name="背景图" /> |
| | | @} |
| | | @if(c1!=null){ |
| | | <#avatar id="c1" name="背景图" avatarImg="${c1.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 预约场地:<input type="radio" name="r2" value="1">开启 <input type="radio" name="r2" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px2" value="${c2.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c2==null){ |
| | | <#avatar id="c2" name="背景图" /> |
| | | @} |
| | | @if(c2!=null){ |
| | | <#avatar id="c2" name="背景图" avatarImg="${c2.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 报名赛事及活动:<input type="radio" name="r3" value="1">开启 <input type="radio" name="r3" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px3" value="${c3.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c3==null){ |
| | | <#avatar id="c3" name="背景图" /> |
| | | @} |
| | | @if(c3!=null){ |
| | | <#avatar id="c3" name="背景图" avatarImg="${c3.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 免费福利:<input type="radio" name="r4" value="1">开启 <input type="radio" name="r4" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px4" value="${c4.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c4==null){ |
| | | <#avatar id="c4" name="背景图" /> |
| | | @} |
| | | @if(c4!=null){ |
| | | <#avatar id="c4" name="背景图" avatarImg="${c4.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 线上课得积分:<input type="radio" name="r5" value="1">开启 <input type="radio" name="r5" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px5" value="${c5.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c5==null){ |
| | | <#avatar id="c5" name="背景图" /> |
| | | @} |
| | | @if(c5!=null){ |
| | | <#avatar id="c5" name="背景图" avatarImg="${c5.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 购买优惠门票:<input type="radio" name="r6" value="1">开启 <input type="radio" name="r6" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px6" value="${c6.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c6==null){ |
| | | <#avatar id="c6" name="背景图" /> |
| | | @} |
| | | @if(c6!=null){ |
| | | <#avatar id="c6" name="背景图" avatarImg="${c6.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 看视频得奖励:<input type="radio" name="r7" value="1">开启 <input type="radio" name="r7" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px7" value="${c7.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c7==null){ |
| | | <#avatar id="c7" name="背景图" /> |
| | | @} |
| | | @if(c7!=null){ |
| | | <#avatar id="c7" name="背景图" avatarImg="${c7.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 智慧球场:<input type="radio" name="r8" value="1">开启 <input type="radio" name="r8" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px8" value="${c8.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c8==null){ |
| | | <#avatar id="c8" name="背景图" /> |
| | | @} |
| | | @if(c8!=null){ |
| | | <#avatar id="c8" name="背景图" avatarImg="${c8.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.saveAllImg()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop_info.js"></script> |
| | | |
| | | <script> |
| | | </script> |
| | | <script type="application/javascript"> |
| | | window.onload = function(){ |
| | | var OBJradio=document.getElementsByName("r1") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s1").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r2") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s2").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r3") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s3").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r4") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s4").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r5") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s5").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r6") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s6").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r7") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s7").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r8") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s8").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>场地类型管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | </div> |
| | | <div class="hidden-xs" id="TCompetitionTableToolbar" role="group"> |
| | | <#button name="添加" icon="fa-plus" clickFun="TSite.openAddTSite()"/> |
| | | <#button name="编辑" icon="fa-edit" clickFun="TSite.openTSiteDetail()" space="true"/> |
| | | <#button name="删除" icon="fa-remove" clickFun="TSite.del()" space="true"/> |
| | | </div> |
| | | <#table id="TSiteTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tSiteType/tSiteType.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#createTime' |
| | | ,range: true |
| | | ,lang:"en" |
| | | }); |
| | | </script> |
| | | @} |
| | |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | var language =$("#language").val() |
| | | var language =1 |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '标题', field: 'title', align: 'center', valign: 'middle', sortable: true}, |
| | | {title: '内容', field: 'content', align: 'center', valign: 'middle', sortable: true}, |
| | | {title: '发布者', field: 'createrName', align: 'center', valign: 'middle', sortable: true}, |
| | | {title: language==1?'创建时间':(language==2?'Creation time':'Waktu penciptaan'), field: 'createtime', align: 'center', valign: 'middle', sortable: true} |
| | | {title: '公告名称', field: 'name', visible: true,align: 'center', valign: 'middle'}, |
| | | {title: '发布时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle', }, |
| | | {title: '排序', field: 'sort', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '状态', field: 'upOrDown', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return {0:"已下架",1:"已上架"}[data] |
| | | }}, |
| | | ]; |
| | | }; |
| | | |
| | |
| | | /** |
| | | * 点击添加通知 |
| | | */ |
| | | Notice.openAddNotice = function () { |
| | | Notice.openAdd = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: language==1?'添加':(language==2?'Add':'Tambahkan'), |
| | | area: ['800px', '500px'], //宽高 |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/notice/notice_add' |
| | | content: Feng.ctxPath + '/tNotice/notice_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: language==1?'详情':(language==2?'details':'details'), |
| | | area: ['800px', '420px'], //宽高 |
| | | title: language==1?'编辑':(language==2?'details':'details'), |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/notice/notice_update/' + Notice.seItem.id |
| | | content: Feng.ctxPath + '/tNotice/notice_update/' + Notice.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | Notice.info = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: language==1?'详情':(language==2?'details':'details'), |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tNotice/notice_info/' + Notice.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | Notice.updateType = function (e) { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tNotice/updateType", function (data) { |
| | | if(language==1){ |
| | | Feng.success("操作成功!"); |
| | | } |
| | | Notice.table.refresh(); |
| | | }, function (data) { |
| | | if(language==1){ |
| | | Feng.error("操作失败!" + data.responseJSON.message + "!"); |
| | | } |
| | | }); |
| | | ajax.set("id", Notice.seItem.id); |
| | | ajax.set("state", e); |
| | | ajax.start(); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | |
| | | if (this.check()) { |
| | | |
| | | var operation = function(){ |
| | | var ajax = new $ax(Feng.ctxPath + "/notice/delete", function (data) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tNotice/delete", function (data) { |
| | | if(language==1){ |
| | | Feng.success("删除成功!"); |
| | | }else if(language==2){ |
| | |
| | | Feng.error("Hapus gagal!" + data.responseJSON.message + "!"); |
| | | } |
| | | }); |
| | | ajax.set("noticeId", Notice.seItem.id); |
| | | ajax.set("id", Notice.seItem.id); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | Feng.confirm("是否删除通知 " + Notice.seItem.title + "?", operation); |
| | | Feng.confirm("是否删除该公告? ", operation); |
| | | } |
| | | }; |
| | | |
| | |
| | | */ |
| | | Notice.search = function () { |
| | | var queryData = {}; |
| | | queryData['condition'] = $("#condition").val(); |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['type'] = $("#type").val(); |
| | | Notice.table.refresh({query: queryData}); |
| | | }; |
| | | Notice.research = function () { |
| | | $("#name").val(''); |
| | | $("#type").val(''); |
| | | Notice.search() |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = Notice.initColumn(); |
| | | var table = new BSTable(Notice.id, "/notice/list", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | var table = new BSTable(Notice.id, "/tNotice/list", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | Notice.table = table.init(); |
| | | }); |
| | |
| | | /** |
| | | * 初始化通知详情对话框 |
| | | */ |
| | | var language =$("#language").val() |
| | | var language =1 |
| | | var NoticeInfoDlg = { |
| | | noticeInfoData: {}, |
| | | editor: null, |
| | | validateFields: { |
| | | title: { |
| | | name: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '标题不能为空' |
| | | message: '公告名称不能为空' |
| | | } |
| | | } |
| | | }, |
| | | sort: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '排序不能为空' |
| | | } |
| | | } |
| | | } |
| | |
| | | * 收集数据 |
| | | */ |
| | | NoticeInfoDlg.collectData = function () { |
| | | this.noticeInfoData['content'] = NoticeInfoDlg.editor.txt.html(); |
| | | this.noticeInfoData['content'] = NoticeInfoDlg.editor.txt; |
| | | this.set('id').set('title'); |
| | | } |
| | | |
| | |
| | | NoticeInfoDlg.addSubmit = function () { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | if (!this.validate()) { |
| | | return; |
| | | } |
| | | |
| | | let text = NoticeInfoDlg.editor.getContent(); |
| | | console.log(text) |
| | | if(text==""){ |
| | | Feng.info("请输入公告内容") |
| | | return; |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/notice/add", function (data) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tNotice/add", function (data) { |
| | | Feng.success("添加成功!"); |
| | | window.parent.Notice.table.refresh(); |
| | | NoticeInfoDlg.close(); |
| | |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.noticeInfoData); |
| | | ajax.set("name",$("#name").val()); |
| | | ajax.set("text",text); |
| | | ajax.set("sort",$("#sort").val()); |
| | | ajax.start(); |
| | | } |
| | | |
| | |
| | | if (!this.validate()) { |
| | | return; |
| | | } |
| | | |
| | | let text = NoticeInfoDlg.editor.getContent(); |
| | | console.log(text) |
| | | if(text==""){ |
| | | Feng.info("请输入公告内容") |
| | | return; |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/notice/update", function (data) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tNotice/update", function (data) { |
| | | Feng.success("修改成功!"); |
| | | window.parent.Notice.table.refresh(); |
| | | NoticeInfoDlg.close(); |
| | |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.noticeInfoData); |
| | | ajax.set("name",$("#name").val()); |
| | | ajax.set("text",text); |
| | | ajax.set("sort",$("#sort").val()); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.start(); |
| | | } |
| | | |
| | |
| | | Feng.initValidator("noticeInfoForm", NoticeInfoDlg.validateFields); |
| | | |
| | | //初始化编辑器 |
| | | var E = window.wangEditor; |
| | | var editor = new E('#editor'); |
| | | editor.create(); |
| | | editor.txt.html($("#contentVal").val()); |
| | | NoticeInfoDlg.editor = editor; |
| | | NoticeInfoDlg.editor = UE.getEditor('editor'); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 车辆管理管理初始化 |
| | | */ |
| | | var TCompetition = { |
| | | id: "TCompetitionTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | var language =1 |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TCompetition.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '所在省', field: 'province', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | }, |
| | | {title: '所在市', field: 'city', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '举办门店', field: 'storeName', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | }, |
| | | {title: '赛事名称', field: 'name', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | }, |
| | | {title: '开始时间', field: 'startTime', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | }, |
| | | {title: '结束时间', field: 'endTime', visible: true, align: 'center', valign: 'middle',width:'5%', |
| | | }, |
| | | {title: '报名条件', field: 'registerCondition', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | formatter:function (data) { |
| | | return {1:"全部用户",2:"仅限年度会员参与",3:"仅限学员参与"}[data] |
| | | } |
| | | }, |
| | | {title: '状态', field: 'auditStatus', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | formatter:function (data) { |
| | | return {1:"待审核",3:"未通过"}[data] |
| | | } |
| | | }, |
| | | ]; |
| | | }; |
| | | function currentTime(timestamp){ |
| | | var time = timestamp + ''; |
| | | if(time.length != 13){ |
| | | timestamp = timestamp * 1000; |
| | | } |
| | | var date = new Date(timestamp);; |
| | | var Y = date.getFullYear() + '-'; |
| | | var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; |
| | | var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' '; |
| | | |
| | | var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':'; |
| | | var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':'; |
| | | var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()); |
| | | var strDate = Y + M + D + h + m + s; |
| | | return strDate |
| | | } |
| | | |
| | | function currentTime1(timestamp){ |
| | | var time = timestamp + ''; |
| | | if(time.length != 13){ |
| | | timestamp = timestamp * 1000; |
| | | } |
| | | var date = new Date(timestamp);; |
| | | var Y = date.getFullYear() + '-'; |
| | | var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; |
| | | var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' '; |
| | | |
| | | var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':'; |
| | | var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':'; |
| | | var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()); |
| | | var strDate = Y + M + D ; |
| | | return strDate |
| | | } |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TCompetition.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TCompetition.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加车辆管理 |
| | | */ |
| | | TCompetition.openAddTCompetition = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCompetitionAudit/tCompetition_update/' + TCompetition.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看车辆管理详情 |
| | | */ |
| | | TCompetition.openTCompetitionDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.load(1,{ |
| | | type: 1 |
| | | , title: '赛事审核' |
| | | , area: ['50%', '50%'] |
| | | , offset: 'auto' //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset |
| | | , id: 'layerDemo' //防止重复弹出cge |
| | | , content: '<div class="form-horizontal">' + |
| | | ' <div class="col-sm-11" >' + |
| | | ' <div class="col-sm-11">' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">审核状态:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <input type="radio" name="r1" value="2" checked> 通过 <input type="radio" name="r1" value="3" > 拒绝 '+ |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">拒绝理由:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <textarea id="text" style="width: 460px; height: 138px;"></textarea> '+ |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' </div>' + |
| | | '</div>' |
| | | , btn: ['关闭', '保存'] |
| | | , btnAlign: 'c' //按钮居中 |
| | | , shade: 0.5 //不显示遮罩 |
| | | ,load:1 |
| | | , yes: function () { |
| | | layer.closeAll(); |
| | | }, |
| | | btn2:function () { |
| | | let audit = document.querySelector('input[name="r1"]:checked').value; |
| | | let text = $("#text").val() |
| | | if(audit==3){ |
| | | if(text==''){ |
| | | Feng.info("请输入拒绝理由") |
| | | return false; |
| | | } |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetitionAudit/audit", function (data) { |
| | | if (data.code == 200) { |
| | | Feng.success("操作成功!"); |
| | | window.location.reload(); |
| | | window.parent.layer.closeAll(); |
| | | } else if(data=="repeat"){ |
| | | window.location.reload(); |
| | | window.parent.layer.closeAll(); |
| | | Feng.error("请勿重复操作"); |
| | | }else { |
| | | return Feng.error(data.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("操作失败!") |
| | | window.location.reload(); |
| | | window.parent.layer.closeAll(); |
| | | return Feng.error("操作失败!"); |
| | | }); |
| | | ajax.set("id", TCompetition.seItem.id); |
| | | ajax.set("audit", audit); |
| | | ajax.set("text", text); |
| | | ajax.start(); |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | TCompetition.info = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCompetition/tCompetition_info/' + TCompetition.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | TCompetition.user = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCompetition/tCompetition_user/' + TCompetition.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除车辆管理 |
| | | */ |
| | | TCompetition.delete = function () { |
| | | if (this.check()) { |
| | | var nickname = TCompetition.seItem.carLicensePlate; |
| | | if (nickname == "" || nickname == null || nickname == undefined){ |
| | | nickname = "该车辆"; |
| | | }else{ |
| | | nickname = "【"+nickname+"】"; |
| | | } |
| | | swal({ |
| | | title: language==1?"您是否确认删除" + nickname + "?":(language==2?"Are you sure to delete the" + nickname + "?":"Apakah Anda pasti akan menghapus" + nickname + "?"), |
| | | text: language==1?"请谨慎操作!":(language==2?' Please operate with caution!':'Harap beroperasi dengan hati -hati!'), |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: language==1?"删除":(language==2?'Delete':'Hapus'), |
| | | closeOnConfirm: true |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/TCompetition/delete", function (data) { |
| | | if(language==1){ |
| | | swal("删除成功", "您已经成功删除了" + nickname + "。", "success"); |
| | | }else if(language==2){ |
| | | swal("Delete succeeded!", "You have successfully deleted it" + nickname + "。", "success"); |
| | | }else { |
| | | swal("Hapus berhasil!", "Anda berhasil menghapus" + nickname + "。", "success"); |
| | | } |
| | | TCompetition.table.refresh(); |
| | | }, function (data) { |
| | | if(language==1){ |
| | | swal("删除失败", data.responseJSON.message + "!", "warning"); |
| | | }else if(language==2){ |
| | | swal("Failed to delete", data.responseJSON.message + "!", "warning"); |
| | | }else { |
| | | swal("Hapus Gagal", data.responseJSON.message + "!", "warning"); |
| | | } |
| | | |
| | | }); |
| | | ajax.set("TCompetitionId",TCompetition.seItem.id); |
| | | ajax.start(); |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | |
| | | TCompetition.carInsurance = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: language==1?'车辆保险':(language==2?'Vehicle insurance':'Asuransi kendaraan'), |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/TCompetition/carInsurance?carId=' + TCompetition.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询车辆管理列表 |
| | | */ |
| | | TCompetition.search = function () { |
| | | var queryData = {}; |
| | | queryData['provinceCode'] = $("#pCode").val(); |
| | | queryData['cityCode'] = $("#cCode").val(); |
| | | queryData['shopName'] = $("#shopName").val(); |
| | | queryData['eventName'] = $("#eventName").val(); |
| | | queryData['time'] = $("#createTime").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | queryData['registerCondition'] = $("#registerCondition").val(); |
| | | TCompetition.table.refresh({query: queryData}); |
| | | }; |
| | | TCompetition.oneChange = function (e) { |
| | | console.log(111) |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | TCompetition.resetSearch = function () { |
| | | $("#pCode").val(""); |
| | | $("#cCode").val(""); |
| | | $("#shopName").val(""); |
| | | $("#eventName").val(""); |
| | | $("#createTime").val(""); |
| | | $("#state").val(""); |
| | | $("#registerCondition").val(""); |
| | | TCompetition.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TCompetition.initColumn(); |
| | | var table = new BSTable(TCompetition.id, "/tCompetitionAudit/list", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | TCompetition.table = table.init(); |
| | | }); |
| | | |
| | | /** |
| | | * 下载模板 |
| | | */ |
| | | TCompetition.uploadCarModel = function () { |
| | | window.location.href = Feng.ctxPath + "/TCompetition/uploadCarModel"; |
| | | } |
| | | |
| | | var agreement = function(){ |
| | | this.init = function(){ |
| | | //模拟上传excel |
| | | $("#uploadEventBtn").unbind("click").bind("click",function(){ |
| | | $("#uploadEventFile").click(); |
| | | }); |
| | | }; |
| | | } |
| | | /** |
| | | * 导入合同 |
| | | */ |
| | | TCompetition.exporTCompetition = function () { |
| | | var uploadEventFile = $("#uploadEventFile").val(); |
| | | if(uploadEventFile == ''){ |
| | | if(language==1){ |
| | | Feng.info("请选择Excel,再上传"); |
| | | }else if(language==2){ |
| | | Feng.info("Please select Excel and upload"); |
| | | }else { |
| | | Feng.info("Silakan pilih Excel dan upload"); |
| | | } |
| | | }else if(uploadEventFile.lastIndexOf(".xls")<0){//可判断以.xls和.xlsx结尾的excel |
| | | if(language==1){ |
| | | Feng.info("只能上传Excel文件"); |
| | | }else if(language==2){ |
| | | Feng.info("Only Excel files can be uploaded"); |
| | | }else { |
| | | Feng.info("Hanya berkas Excel yang dapat diunggah"); |
| | | } |
| | | }else{ |
| | | var url = Feng.ctxPath + '/TCompetition/exporTCompetition'; |
| | | var file = document.querySelector('input[name=file]').files[0]; |
| | | var reader = new FileReader(); |
| | | if (file) { |
| | | var formData = new FormData(); |
| | | formData.append("myfile", file); |
| | | this.sendAjaxRequest(url, 'POST', formData); |
| | | } |
| | | } |
| | | } |
| | | TCompetition.sendAjaxRequest = function(url,type,data){ |
| | | $.ajax({ |
| | | url : url, |
| | | type : type, |
| | | data : data, |
| | | success : function(result) { |
| | | if(result.code==500) { |
| | | Feng.info(result.message); |
| | | }else { |
| | | if(language==1){ |
| | | Feng.success("导入成功!"); |
| | | }else if(language==2){ |
| | | Feng.success("SUCCESSFUL IMPORT!"); |
| | | }else { |
| | | Feng.success("Import berhasil!"); |
| | | } |
| | | } |
| | | TCompetition.table.refresh(); |
| | | }, |
| | | error : function() { |
| | | if(language==1){ |
| | | Feng.error("excel上传失败!"); |
| | | }else if(language==2){ |
| | | Feng.error("Uploading excel Fails. Procedure!"); |
| | | }else { |
| | | Feng.error("Gagal mengunggah excel!"); |
| | | } |
| | | }, |
| | | cache : false, |
| | | contentType : false, |
| | | processData : false |
| | | }); |
| | | }; |
| | | |
| | | var agreement; |
| | | $(function(){ |
| | | agreement = new agreement(); |
| | | agreement.init(); |
| | | }); |
| | | |
| | | /** |
| | | * 导出车辆操作 |
| | | */ |
| | | TCompetition.ouTCompetition = function () { |
| | | var operation = function() { |
| | | window.location.href = Feng.ctxPath + "/TCompetition/ouTCompetition"; |
| | | }; |
| | | if(language==1){ |
| | | Feng.confirm("是否确认导出车辆信息?", operation); |
| | | }else if(language==2){ |
| | | Feng.confirm("Are you sure to export vehicle information?", operation); |
| | | }else { |
| | | Feng.confirm("Apakah Anda pasti akan mengekspor informasi kendaraan?", operation); |
| | | } |
| | | } |
New file |
| | |
| | | /** |
| | | * 车辆管理管理初始化 |
| | | */ |
| | | var TCompetition = { |
| | | id: "TCompetitionTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | var language =1 |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TCompetition.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | }, |
| | | {title: '性别', field: 'sex', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '联系电话', field: 'phone', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | }, |
| | | {title: '身份证号', field: 'idCard', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | }, |
| | | {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | formatter:function (data) { |
| | | return {1:"正常",2:"正常",3:"已取消"}[data] |
| | | } |
| | | }, |
| | | ]; |
| | | }; |
| | | function currentTime(timestamp){ |
| | | var time = timestamp + ''; |
| | | if(time.length != 13){ |
| | | timestamp = timestamp * 1000; |
| | | } |
| | | var date = new Date(timestamp);; |
| | | var Y = date.getFullYear() + '-'; |
| | | var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; |
| | | var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' '; |
| | | |
| | | var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':'; |
| | | var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':'; |
| | | var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()); |
| | | var strDate = Y + M + D + h + m + s; |
| | | return strDate |
| | | } |
| | | |
| | | function currentTime1(timestamp){ |
| | | var time = timestamp + ''; |
| | | if(time.length != 13){ |
| | | timestamp = timestamp * 1000; |
| | | } |
| | | var date = new Date(timestamp);; |
| | | var Y = date.getFullYear() + '-'; |
| | | var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; |
| | | var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' '; |
| | | |
| | | var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':'; |
| | | var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':'; |
| | | var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()); |
| | | var strDate = Y + M + D ; |
| | | return strDate |
| | | } |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TCompetition.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TCompetition.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加车辆管理 |
| | | */ |
| | | TCompetition.openAddTCompetition = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCompetition/tCompetition_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看车辆管理详情 |
| | | */ |
| | | TCompetition.openTCompetitionDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'编辑', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCompetition/tCompetition_update/' + TCompetition.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | TCompetition.info = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCompetition/tCompetition_info/' + TCompetition.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除车辆管理 |
| | | */ |
| | | TCompetition.delete = function () { |
| | | if (this.check()) { |
| | | var nickname = TCompetition.seItem.carLicensePlate; |
| | | if (nickname == "" || nickname == null || nickname == undefined){ |
| | | nickname = "该车辆"; |
| | | }else{ |
| | | nickname = "【"+nickname+"】"; |
| | | } |
| | | swal({ |
| | | title: language==1?"您是否确认删除" + nickname + "?":(language==2?"Are you sure to delete the" + nickname + "?":"Apakah Anda pasti akan menghapus" + nickname + "?"), |
| | | text: language==1?"请谨慎操作!":(language==2?' Please operate with caution!':'Harap beroperasi dengan hati -hati!'), |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: language==1?"删除":(language==2?'Delete':'Hapus'), |
| | | closeOnConfirm: true |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/TCompetition/delete", function (data) { |
| | | if(language==1){ |
| | | swal("删除成功", "您已经成功删除了" + nickname + "。", "success"); |
| | | }else if(language==2){ |
| | | swal("Delete succeeded!", "You have successfully deleted it" + nickname + "。", "success"); |
| | | }else { |
| | | swal("Hapus berhasil!", "Anda berhasil menghapus" + nickname + "。", "success"); |
| | | } |
| | | TCompetition.table.refresh(); |
| | | }, function (data) { |
| | | if(language==1){ |
| | | swal("删除失败", data.responseJSON.message + "!", "warning"); |
| | | }else if(language==2){ |
| | | swal("Failed to delete", data.responseJSON.message + "!", "warning"); |
| | | }else { |
| | | swal("Hapus Gagal", data.responseJSON.message + "!", "warning"); |
| | | } |
| | | |
| | | }); |
| | | ajax.set("TCompetitionId",TCompetition.seItem.id); |
| | | ajax.start(); |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | |
| | | TCompetition.carInsurance = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: language==1?'车辆保险':(language==2?'Vehicle insurance':'Asuransi kendaraan'), |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/TCompetition/carInsurance?carId=' + TCompetition.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询车辆管理列表 |
| | | */ |
| | | TCompetition.search = function () { |
| | | var queryData = {}; |
| | | queryData['provinceCode'] = $("#pCode").val(); |
| | | queryData['cityCode'] = $("#cCode").val(); |
| | | queryData['shopName'] = $("#shopName").val(); |
| | | queryData['eventName'] = $("#eventName").val(); |
| | | queryData['time'] = $("#createTime").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | queryData['registerCondition'] = $("#registerCondition").val(); |
| | | TCompetition.table.refresh({query: queryData}); |
| | | }; |
| | | TCompetition.oneChange = function (e) { |
| | | console.log(111) |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | TCompetition.resetSearch = function () { |
| | | $("#pCode").val(""); |
| | | $("#cCode").val(""); |
| | | $("#shopName").val(""); |
| | | $("#eventName").val(""); |
| | | $("#createTime").val(""); |
| | | $("#state").val(""); |
| | | $("#registerCondition").val(""); |
| | | TCompetition.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TCompetition.initColumn(); |
| | | var table = new BSTable(TCompetition.id, "/tCompetition/listUser/"+$("#id").val(), defaultColunms); |
| | | table.setPaginationType("server"); |
| | | TCompetition.table = table.init(); |
| | | }); |
| | | |
| | | /** |
| | | * 下载模板 |
| | | */ |
| | | TCompetition.uploadCarModel = function () { |
| | | window.location.href = Feng.ctxPath + "/TCompetition/uploadCarModel"; |
| | | } |
| | | |
| | | var agreement = function(){ |
| | | this.init = function(){ |
| | | //模拟上传excel |
| | | $("#uploadEventBtn").unbind("click").bind("click",function(){ |
| | | $("#uploadEventFile").click(); |
| | | }); |
| | | }; |
| | | } |
| | | /** |
| | | * 导入合同 |
| | | */ |
| | | TCompetition.exporTCompetition = function () { |
| | | var uploadEventFile = $("#uploadEventFile").val(); |
| | | if(uploadEventFile == ''){ |
| | | if(language==1){ |
| | | Feng.info("请选择Excel,再上传"); |
| | | }else if(language==2){ |
| | | Feng.info("Please select Excel and upload"); |
| | | }else { |
| | | Feng.info("Silakan pilih Excel dan upload"); |
| | | } |
| | | }else if(uploadEventFile.lastIndexOf(".xls")<0){//可判断以.xls和.xlsx结尾的excel |
| | | if(language==1){ |
| | | Feng.info("只能上传Excel文件"); |
| | | }else if(language==2){ |
| | | Feng.info("Only Excel files can be uploaded"); |
| | | }else { |
| | | Feng.info("Hanya berkas Excel yang dapat diunggah"); |
| | | } |
| | | }else{ |
| | | var url = Feng.ctxPath + '/TCompetition/exporTCompetition'; |
| | | var file = document.querySelector('input[name=file]').files[0]; |
| | | var reader = new FileReader(); |
| | | if (file) { |
| | | var formData = new FormData(); |
| | | formData.append("myfile", file); |
| | | this.sendAjaxRequest(url, 'POST', formData); |
| | | } |
| | | } |
| | | } |
| | | TCompetition.sendAjaxRequest = function(url,type,data){ |
| | | $.ajax({ |
| | | url : url, |
| | | type : type, |
| | | data : data, |
| | | success : function(result) { |
| | | if(result.code==500) { |
| | | Feng.info(result.message); |
| | | }else { |
| | | if(language==1){ |
| | | Feng.success("导入成功!"); |
| | | }else if(language==2){ |
| | | Feng.success("SUCCESSFUL IMPORT!"); |
| | | }else { |
| | | Feng.success("Import berhasil!"); |
| | | } |
| | | } |
| | | TCompetition.table.refresh(); |
| | | }, |
| | | error : function() { |
| | | if(language==1){ |
| | | Feng.error("excel上传失败!"); |
| | | }else if(language==2){ |
| | | Feng.error("Uploading excel Fails. Procedure!"); |
| | | }else { |
| | | Feng.error("Gagal mengunggah excel!"); |
| | | } |
| | | }, |
| | | cache : false, |
| | | contentType : false, |
| | | processData : false |
| | | }); |
| | | }; |
| | | |
| | | var agreement; |
| | | $(function(){ |
| | | agreement = new agreement(); |
| | | agreement.init(); |
| | | }); |
| | | |
| | | /** |
| | | * 导出车辆操作 |
| | | */ |
| | | TCompetition.ouTCompetition = function () { |
| | | var operation = function() { |
| | | window.location.href = Feng.ctxPath + "/TCompetition/ouTCompetition"; |
| | | }; |
| | | if(language==1){ |
| | | Feng.confirm("是否确认导出车辆信息?", operation); |
| | | }else if(language==2){ |
| | | Feng.confirm("Are you sure to export vehicle information?", operation); |
| | | }else { |
| | | Feng.confirm("Apakah Anda pasti akan mengekspor informasi kendaraan?", operation); |
| | | } |
| | | } |
New file |
| | |
| | | /** |
| | | * 初始化车辆管理详情对话框 |
| | | */ |
| | | var language=1; |
| | | var TCarInfoDlg = { |
| | | tCarInfoData : {}, |
| | | validateFields: { |
| | | carBrandId: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: language==1?'请选择车辆品牌':(language==2?"Please select the vehicle brand":"Silakan pilih tanda kendaraan") |
| | | } |
| | | } |
| | | }, |
| | | carModelId: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: language==1?'请选择车辆类型':(language==2?"Please select the vehicle type":"Silakan pilih tipe kendaraan") |
| | | } |
| | | } |
| | | }, |
| | | zcModel: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: language==1?'请选择摩托车车型':(language==2?"Please select a motorcycle model":"Silakan pilih model motor") |
| | | } |
| | | } |
| | | }, |
| | | carColor: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: language==1?'车辆颜色不能为空':(language==2?"The vehicle color cannot be empty.":"Warna kendaraan tidak bisa kosong.") |
| | | } |
| | | } |
| | | }, |
| | | drivingLicenseNumber: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: language==1?'行驶证编号不能为空':(language==2?"The driving license number cannot be empty":"Nomor SIM Tidak Bisa Kosong") |
| | | } |
| | | } |
| | | }, |
| | | annualInspectionTime: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: language==1?'年检到期时间不能为空':(language==2?"The annual inspection expiration time cannot be empty":"Waktu kedaluwarsa inspeksi tahunan tidak bisa kosong") |
| | | } |
| | | } |
| | | }, |
| | | commercialInsuranceTime: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: language==1?'商业保险到期时间不能为空':(language==2?"The commercial insurance expiration time cannot be empty":"Waktu kedaluwarsa asuransi komersial tidak bisa kosong") |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 验证数据是否为空 |
| | | */ |
| | | TCarInfoDlg.validate = function () { |
| | | $('#carInfoForm').data("bootstrapValidator").resetForm(); |
| | | $('#carInfoForm').bootstrapValidator('validate'); |
| | | return $("#carInfoForm").data('bootstrapValidator').isValid(); |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TCarInfoDlg.clearData = function() { |
| | | this.tCarInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TCarInfoDlg.set = function(key, val) { |
| | | this.tCarInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TCarInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TCarInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TCompetition.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TCarInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('isPlatCar') |
| | | .set('companyId') |
| | | .set('franchiseeId') |
| | | .set('carColor') |
| | | .set('carModelId') |
| | | .set('carBrandId') |
| | | .set('carLicensePlate') |
| | | .set('carPhoto') |
| | | .set('drivingLicenseNumber') |
| | | .set('drivingLicensePhoto') |
| | | .set('annualInspectionTime') |
| | | .set('commercialInsuranceTime') |
| | | .set('createTime') |
| | | .set('state') |
| | | .set('addType') |
| | | .set('addObjectId') |
| | | .set('plateColor') |
| | | .set('vehicleType') |
| | | .set('ownerName') |
| | | .set('engineId') |
| | | .set('VIN') |
| | | .set('certifyDateA') |
| | | .set('fuelType') |
| | | .set('engineDisplace') |
| | | .set('certificate') |
| | | .set('transAgency') |
| | | .set('transArea') |
| | | .set('transDateStart') |
| | | .set('transDateStop') |
| | | .set('certifyDateB') |
| | | .set('fixState') |
| | | .set('nextFixDate') |
| | | .set('checkState') |
| | | .set('feePrintId') |
| | | .set('GPSBrand') |
| | | .set('GPSModel') |
| | | .set('GPSIMEI') |
| | | .set('GPSInstallDate') |
| | | .set('registerDate') |
| | | .set('commercialType'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TCarInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | |
| | | |
| | | |
| | | var pCode = $("#pCode").val(); |
| | | if(pCode==""){ |
| | | Feng.info("请选择省"); |
| | | return; |
| | | } |
| | | var cCode = $("#cCode").val(); |
| | | if(cCode==""){ |
| | | Feng.info("请选择市"); |
| | | return; |
| | | } |
| | | var shopId = $("#shopId").val(); |
| | | var name = $("#name").val(); |
| | | if(name==""){ |
| | | Feng.info("请输入赛事名称"); |
| | | return; |
| | | } |
| | | var startTime = $("#startTime").val(); |
| | | console.log(startTime) |
| | | if(startTime==""){ |
| | | Feng.info("请选择开始时间"); |
| | | return; |
| | | } |
| | | var endTime = $("#endTime").val(); |
| | | if(endTime==""){ |
| | | Feng.info("请选择结束时间"); |
| | | return; |
| | | } |
| | | var registerEndTime = $("#registerEndTime").val(); |
| | | let registerCondition = document.querySelector('input[name="registerCondition"]:checked').value; |
| | | var startAge = $("#startAge").val(); |
| | | var endAge = $("#endAge").val(); |
| | | var cashPrice = $("#cashPrice").val(); |
| | | var playPaiCoin = $("#playPaiCoin").val(); |
| | | var classPrice = $("#classPrice").val(); |
| | | var address = $("#address").val(); |
| | | if(address==""){ |
| | | Feng.info("请输入参加地点"); |
| | | return; |
| | | } |
| | | var applicantsNumber = $("#applicantsNumber").val(); |
| | | if(applicantsNumber==""){ |
| | | Feng.info("请输入报名人数"); |
| | | return; |
| | | } |
| | | var baseNumber = $("#baseNumber").val(); |
| | | let realName = document.querySelector('input[name="realName"]:checked').value; |
| | | var introduction = $("#introduction").val(); |
| | | if(introduction==""){ |
| | | Feng.info("请输入赛事简介"); |
| | | return; |
| | | } |
| | | |
| | | var coverDrawing = $("#coverDrawing").val(); |
| | | var coverDrawing = $("#coverDrawing").val(); |
| | | var registrationNotes = $("#registrationNotes").val() |
| | | if(registrationNotes==""){ |
| | | Feng.info("请上传报名须知图片"); |
| | | return; |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/add", function(data){ |
| | | if(data.code == 200){ |
| | | if(language==1){ |
| | | Feng.success("添加成功!"); |
| | | }else if(language==2){ |
| | | Feng.success("Successfully added!"); |
| | | }else { |
| | | Feng.success("Sangat berhasil ditambah!"); |
| | | } |
| | | window.parent.TCompetition.table.refresh(); |
| | | TCarInfoDlg.close(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("provinceCode",pCode); |
| | | ajax.set("cityCode",cCode); |
| | | ajax.set("storeId",shopId); |
| | | ajax.set("name",name); |
| | | ajax.set("sTime",startTime); |
| | | ajax.set("eTime",endTime); |
| | | ajax.set("rEndTime",registerEndTime); |
| | | ajax.set("registerCondition",registerCondition); |
| | | ajax.set("startAge",startAge); |
| | | ajax.set("endAge",endAge); |
| | | ajax.set("cashPrice",cashPrice); |
| | | ajax.set("playPaiCoin",playPaiCoin); |
| | | ajax.set("classPrice",classPrice); |
| | | ajax.set("address",address); |
| | | ajax.set("applicantsNumber",applicantsNumber); |
| | | ajax.set("baseNumber",baseNumber); |
| | | ajax.set("realName",realName); |
| | | ajax.set("coverDrawing",coverDrawing); |
| | | ajax.set("introduction",introduction); |
| | | ajax.set("imgs",introduction); |
| | | ajax.set("registrationNotes",registrationNotes); |
| | | ajax.set("longitude", $("#longitude").val()); |
| | | ajax.set("latitude", $("#latitude").val()); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TCarInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | |
| | | var pCode = $("#pCode").val(); |
| | | if(pCode==""){ |
| | | Feng.info("请选择省"); |
| | | return; |
| | | } |
| | | var cCode = $("#cCode").val(); |
| | | if(cCode==""){ |
| | | Feng.info("请选择市"); |
| | | return; |
| | | } |
| | | var shopId = $("#shopId").val(); |
| | | var name = $("#name").val(); |
| | | if(name==""){ |
| | | Feng.info("请输入赛事名称"); |
| | | return; |
| | | } |
| | | var startTime = $("#startTime").val(); |
| | | console.log(startTime) |
| | | if(startTime==""){ |
| | | Feng.info("请选择开始时间"); |
| | | return; |
| | | } |
| | | var endTime = $("#endTime").val(); |
| | | if(endTime==""){ |
| | | Feng.info("请选择结束时间"); |
| | | return; |
| | | } |
| | | var registerEndTime = $("#registerEndTime").val(); |
| | | let registerCondition = document.querySelector('input[name="registerCondition"]:checked').value; |
| | | var startAge = $("#startAge").val(); |
| | | var endAge = $("#endAge").val(); |
| | | var cashPrice = $("#cashPrice").val(); |
| | | var playPaiCoin = $("#playPaiCoin").val(); |
| | | var classPrice = $("#classPrice").val(); |
| | | var address = $("#address").val(); |
| | | if(address==""){ |
| | | Feng.info("请输入参加地点"); |
| | | return; |
| | | } |
| | | var applicantsNumber = $("#applicantsNumber").val(); |
| | | if(applicantsNumber==""){ |
| | | Feng.info("请输入报名人数"); |
| | | return; |
| | | } |
| | | var baseNumber = $("#baseNumber").val(); |
| | | let realName = document.querySelector('input[name="realName"]:checked').value; |
| | | var introduction = $("#introduction").val(); |
| | | if(introduction==""){ |
| | | Feng.info("请输入赛事简介"); |
| | | return; |
| | | } |
| | | |
| | | var coverDrawing = $("#coverDrawing").val(); |
| | | var coverDrawing = $("#coverDrawing").val(); |
| | | var registrationNotes = $("#registrationNotes").val() |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/update", function(data){ |
| | | if(data.code == 200){ |
| | | if(language==1){ |
| | | Feng.success("修改成功!"); |
| | | }else if(language==2){ |
| | | Feng.success("Modify successfully!"); |
| | | }else { |
| | | Feng.success("Mengubah dengan sukses!"); |
| | | } |
| | | window.parent.TCompetition.table.refresh(); |
| | | TCarInfoDlg.close(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.set("provinceCode",pCode); |
| | | ajax.set("cityCode",cCode); |
| | | ajax.set("storeId",shopId); |
| | | ajax.set("name",name); |
| | | ajax.set("sTime",startTime); |
| | | ajax.set("eTime",endTime); |
| | | ajax.set("rEndTime",registerEndTime); |
| | | ajax.set("registerCondition",registerCondition); |
| | | ajax.set("startAge",startAge); |
| | | ajax.set("endAge",endAge); |
| | | ajax.set("cashPrice",cashPrice); |
| | | ajax.set("playPaiCoin",playPaiCoin); |
| | | ajax.set("classPrice",classPrice); |
| | | ajax.set("address",address); |
| | | ajax.set("applicantsNumber",applicantsNumber); |
| | | ajax.set("baseNumber",baseNumber); |
| | | ajax.set("realName",realName); |
| | | ajax.set("coverDrawing",coverDrawing); |
| | | ajax.set("introduction",introduction); |
| | | ajax.set("imgs",introduction); |
| | | ajax.set("registrationNotes",registrationNotes); |
| | | ajax.set("longitude", $("#longitude").val()); |
| | | ajax.set("latitude", $("#latitude").val()); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | Feng.initValidator("carInfoForm", TCarInfoDlg.validateFields); |
| | | // 初始化图片上传 |
| | | var carPhoto = new $WebUpload("1"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("1"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var drivingLicensePhoto = new $WebUpload("1"); |
| | | drivingLicensePhoto.setUploadBarId("progressBar"); |
| | | drivingLicensePhoto.init(); |
| | | TCarInfoDlg.searchByStationName(); |
| | | }); |
| | | |
| | | /** |
| | | * 选择分公司后执行 |
| | | */ |
| | | TCarInfoDlg.oneChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriver/oneChange", 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>"; |
| | | }); |
| | | $("#twoId").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | TCarInfoDlg.oneChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | TCarInfoDlg.oneChangeNext = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/oneChangeNext", 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>"; |
| | | }); |
| | | $("#shopId").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | /** |
| | | * 类型改变执行 |
| | | * @param e |
| | | */ |
| | | TCarInfoDlg.companyTypeClick = function (e) { |
| | | if (1 == e){ |
| | | $(".companyDiv").hide(); |
| | | } else if (2 == e){ |
| | | $(".companyDiv").show(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 车辆品牌改变时执行 |
| | | */ |
| | | TCarInfoDlg.brandChange = function (e) { |
| | | var carBrandId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/brandChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择车辆类型</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Please select the vehicle type</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih Jenis Kendaraan</option>'; |
| | | } |
| | | |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#carModelId").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("carBrandId",carBrandId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 专车服务被点击 |
| | | */ |
| | | TCarInfoDlg.zcServerClick = function () { |
| | | var serverBox1 = $('#serverBox1').prop('checked'); |
| | | if (serverBox1){ |
| | | $("#zcModelDiv").show(); |
| | | } else { |
| | | $("#zcModelDiv").hide(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 跨城服务被点击 |
| | | */ |
| | | TCarInfoDlg.kcServerClick = function () { |
| | | var serverBox3 = $('#serverBox3').prop('checked'); |
| | | if (serverBox3){ |
| | | $("#kcModelDiv").show(); |
| | | } else { |
| | | $("#kcModelDiv").hide(); |
| | | } |
| | | } |
| | | var map = new AMap.Map('container', { |
| | | resizeEnable: true, // 允许缩放 |
| | | zoom: 15 // 设置地图的缩放级别,0 - 20 |
| | | }); |
| | | var marker; |
| | | //搜索地图 |
| | | TCarInfoDlg.searchByStationName = function(e,type){ |
| | | var keyword="成都"; |
| | | if(type==2){ |
| | | keyword = $(e).parent().prev().find("input").val(); |
| | | }else { |
| | | if($("#address").val()!=null && $("#address").val()!=''){ |
| | | keyword = $("#address").val(); |
| | | } |
| | | } |
| | | type=1; |
| | | AMap.plugin('AMap.Geocoder', function() { |
| | | var geocoder = new AMap.Geocoder(); |
| | | console.log(geocoder) |
| | | console.log(keyword) |
| | | geocoder.getLocation(keyword, function(status, result) { |
| | | console.log(status,result) |
| | | if (status === 'complete' && result.info === 'OK') { |
| | | // 经纬度 |
| | | var lng = result.geocodes[0].location.lng; |
| | | var lat = result.geocodes[0].location.lat; |
| | | $("#longitude").val(lng) |
| | | $("#latitude").val(lat) |
| | | // 地图实例 |
| | | map = new AMap.Map('container', { |
| | | resizeEnable: true, // 允许缩放 |
| | | center: [lng, lat], // 设置地图的中心点 |
| | | zoom: 15 // 设置地图的缩放级别,0 - 20 |
| | | }); |
| | | //地图画点 |
| | | //addMarker(lng,lat); |
| | | if(type==1 || type==2){ |
| | | showInfoClick(); |
| | | if(lng == null){ |
| | | }else{ |
| | | addMarker(lng,lat); |
| | | } |
| | | }else{ |
| | | addMarker(lng,lat); |
| | | } |
| | | } else { |
| | | console.log('定位失败!'); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | } |
| | | //地图点击事件 |
| | | function showInfoClick(){ |
| | | map.on('click', function (e) { |
| | | addMarker(e.lnglat.getLng(),e.lnglat.getLat()); |
| | | }); |
| | | } |
| | | //删除点 |
| | | function removeMarkers(){ |
| | | if(marker!=null){ |
| | | map.remove(marker); |
| | | } |
| | | |
| | | } |
| | | // 实例化点标记 |
| | | function addMarker(lon,lat) { |
| | | removeMarkers(); |
| | | marker = new AMap.Marker({ |
| | | map: map, |
| | | position: new AMap.LngLat(lon, lat), // 经纬度 |
| | | }); |
| | | //加经纬度 |
| | | $("#lon").val(lon); |
| | | $("#lat").val(lat); |
| | | var lnglatXY = [lon, lat];//地图上所标点的坐标 |
| | | AMap.service('AMap.Geocoder',function() {//回调函数 |
| | | geocoder = new AMap.Geocoder({ |
| | | }); |
| | | geocoder.getAddress(lnglatXY, function (status, result) { |
| | | if (status === 'complete' && result.info === 'OK') { |
| | | //获得了有效的地址信息: |
| | | //即,result.regeocode.formattedAddress |
| | | // alert(result.regeocode.formattedAddress) |
| | | //document.getElementById("address").value=result.regeocode.formattedAddress;//将获取到的地址信息赋值给文本框,保存进数据库 |
| | | |
| | | var address = result.regeocode.formattedAddress; |
| | | var city = result.regeocode.addressComponent.city; |
| | | var province = result.regeocode.addressComponent.province; |
| | | var district = result.regeocode.addressComponent.district; |
| | | $("#address").val(address); |
| | | } else { |
| | | //获取地址失败 |
| | | } |
| | | }); |
| | | }) |
| | | } |
New file |
| | |
| | | var map = new AMap.Map('container',{ |
| | | resizeEnable: true, |
| | | zoom:10 |
| | | }); |
| | | |
| | | |
| | | var value = ""; |
| | | map.getCity( |
| | | callback=function (result) { |
| | | value = result.city; |
| | | drawBounds(); |
| | | } |
| | | ); |
| | | |
| | | |
| | | var mouseTool = new AMap.MouseTool(map); |
| | | //监听draw事件可获取画好的覆盖物 |
| | | var overlays = []; |
| | | var name = null; |
| | | var coordinate = '';//存储坐标 |
| | | var objs = {//存储各种类型的覆盖物对象 |
| | | "polyline":[], |
| | | "polygon":[], |
| | | "rectangle":[], |
| | | "circle":[] |
| | | }; |
| | | var editors = []; |
| | | mouseTool.on('draw',function(e){ |
| | | overlays.push(e.obj); |
| | | |
| | | switch (name) { |
| | | case 'polyline':{//折线图 |
| | | var polyline = e.obj.getPath(); |
| | | getCoordinate(polyline); |
| | | objs.polyline.push(e.obj); |
| | | break; |
| | | } |
| | | case 'polygon':{//多边形 |
| | | var polygon = e.obj.getPath(); |
| | | getCoordinate(polygon); |
| | | objs.polygon.push(e.obj); |
| | | break; |
| | | } |
| | | case 'rectangle':{//矩形 |
| | | var rectangle = e.obj.getPath(); |
| | | getCoordinate(rectangle); |
| | | objs.rectangle.push(e.obj); |
| | | break; |
| | | } |
| | | case 'circle':{//圆形 |
| | | var center = e.obj.getCenter(); |
| | | var radius = e.obj.getRadius(); |
| | | if(radius > 5000){ |
| | | Feng.error("创建电子围栏失败,圆半径不能大于5000米"); |
| | | return; |
| | | } |
| | | coordinate += center.lng + ',' + center.lat + ';' + radius + "_"; |
| | | objs.circle.push(e.obj); |
| | | break; |
| | | } |
| | | } |
| | | }) |
| | | |
| | | |
| | | var district = null; |
| | | var polygons=[]; |
| | | function drawBounds() { |
| | | if(value == ''){ |
| | | value = '北京市'; |
| | | } |
| | | |
| | | //加载行政区划插件 |
| | | if(!district){ |
| | | //实例化DistrictSearch |
| | | var opts = { |
| | | subdistrict: 0, //获取边界不需要返回下级行政区 |
| | | extensions: 'all', //返回行政区边界坐标组等具体信息 |
| | | level: 'district' //查询行政级别为 市 |
| | | }; |
| | | district = new AMap.DistrictSearch(opts); |
| | | } |
| | | //行政区查询 |
| | | district.setLevel(document.getElementById('level').value) |
| | | district.search(value, function(status, result) { |
| | | map.remove(polygons)//清除上次结果 |
| | | polygons = []; |
| | | var bounds = result.districtList[0].boundaries; |
| | | if (bounds) { |
| | | for (var i = 0, l = bounds.length; i < l; i++) { |
| | | //生成行政区划polygon |
| | | var polygon = new AMap.Polygon({ |
| | | strokeWeight: 1, |
| | | path: bounds[i], |
| | | fillOpacity: 0.4, |
| | | fillColor: '#80d8ff', |
| | | strokeColor: '#0091ea' |
| | | }); |
| | | polygons.push(polygon); |
| | | } |
| | | } |
| | | map.add(polygons) |
| | | map.setFitView(polygons);//视口自适应 |
| | | }); |
| | | } |
| | | |
| | | document.getElementById('find').onclick = function () { |
| | | value = document.getElementById('district').value; |
| | | if(value == ''){ |
| | | value = "北京市"; |
| | | } |
| | | drawBounds() |
| | | }; |
| | | document.getElementById('district').onkeydown = function(e) { |
| | | if (e.keyCode === 13) { |
| | | value = document.getElementById('district').value; |
| | | if(value == ''){ |
| | | value = "北京市"; |
| | | } |
| | | drawBounds(); |
| | | return false; |
| | | } |
| | | return true; |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | //处理坐标结果 |
| | | function getCoordinate(arr){ |
| | | var str = ''; |
| | | for(var i = 0; i < arr.length; i++){ |
| | | var lng = arr[i].lng; |
| | | var lat = arr[i].lat; |
| | | str += lng + ',' + lat + ';'; |
| | | } |
| | | coordinate += str.substring(0, str.length - 1) + "_"; |
| | | } |
| | | |
| | | |
| | | function draw(type){ |
| | | switch(type){ |
| | | case 'marker':{ |
| | | mouseTool.marker({ |
| | | //同Marker的Option设置 |
| | | }); |
| | | break; |
| | | } |
| | | case 'polyline':{ |
| | | mouseTool.polyline({ |
| | | strokeColor:'#80d8ff' |
| | | //同Polyline的Option设置 |
| | | }); |
| | | break; |
| | | } |
| | | case 'polygon':{ |
| | | mouseTool.polygon({ |
| | | fillColor:'#00b0ff', |
| | | strokeColor:'#80d8ff' |
| | | //同Polygon的Option设置 |
| | | }); |
| | | break; |
| | | } |
| | | case 'rectangle':{ |
| | | mouseTool.rectangle({ |
| | | fillColor:'#00b0ff', |
| | | strokeColor:'#80d8ff' |
| | | //同Polygon的Option设置 |
| | | }); |
| | | break; |
| | | } |
| | | case 'circle':{ |
| | | mouseTool.circle({ |
| | | fillColor:'#00b0ff', |
| | | strokeColor:'#80d8ff' |
| | | //同Circle的Option设置 |
| | | }); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | var radios = document.getElementsByName('func'); |
| | | for(var i=0;i<radios.length;i+=1){ |
| | | radios[i].onchange = function(e){ |
| | | draw(e.target.value) |
| | | name = e.target.value; |
| | | } |
| | | } |
| | | // draw('marker') |
| | | |
| | | document.getElementById('clear').onclick = function(){ |
| | | map.remove(overlays) |
| | | overlays = []; |
| | | coordinate = ''; |
| | | objs.circle = []; |
| | | objs.rectangle = []; |
| | | objs.polygon = []; |
| | | objs.polyline = []; |
| | | closeEdit(); |
| | | } |
| | | document.getElementById('close').onclick = function(){ |
| | | mouseTool.close()//关闭,并清除覆盖物 |
| | | for(var i=0;i<radios.length;i+=1){ |
| | | radios[i].checked = false; |
| | | } |
| | | closeEdit(); |
| | | } |
| | | |
| | | |
| | | //点击提交处理函数 |
| | | function submitCoordinate(){ |
| | | var name = $('#addressName').val(); |
| | | if('' == name){ |
| | | Feng.error('请填写地址名称'); |
| | | return; |
| | | } |
| | | if('' == coordinate){ |
| | | Feng.error('请在地图上规划区域'); |
| | | return; |
| | | } |
| | | coordinate = coordinate.substring(0, coordinate.length - 1); |
| | | |
| | | } |
| | | |
| | | function editAll() { |
| | | coordinate = ''; |
| | | editors = []; |
| | | //折线 |
| | | for(var i in objs.polyline){ |
| | | var polyline = objs.polyline[i]; |
| | | var polyEditor = new AMap.PolyEditor(map, polyline) |
| | | polyEditor.on('addnode', function(event) { |
| | | // log.info('触发事件:addnode') |
| | | }) |
| | | |
| | | polyEditor.on('adjust', function(event) { |
| | | // log.info('触发事件:adjust') |
| | | }) |
| | | |
| | | polyEditor.on('removenode', function(event) { |
| | | // log.info('触发事件:removenode') |
| | | }) |
| | | |
| | | polyEditor.on('end', function(e) { |
| | | var polyline = e.target.getPath(); |
| | | getCoordinate(polyline); |
| | | }) |
| | | editors.push(polyEditor); |
| | | polyEditor.open(); |
| | | } |
| | | |
| | | //多边形 |
| | | for(var i in objs.polygon){ |
| | | var polygon = objs.polygon[i]; |
| | | var polyEditor = new AMap.PolyEditor(map, polygon) |
| | | |
| | | polyEditor.on('addnode', function(event) { |
| | | // log.info('触发事件:addnode') |
| | | }) |
| | | |
| | | polyEditor.on('adjust', function(event) { |
| | | // log.info('触发事件:adjust') |
| | | }) |
| | | |
| | | polyEditor.on('removenode', function(event) { |
| | | // log.info('触发事件:removenode') |
| | | }) |
| | | |
| | | polyEditor.on('end', function(e) { |
| | | var polygon = e.target.getPath(); |
| | | getCoordinate(polygon); |
| | | }) |
| | | editors.push(polyEditor); |
| | | polyEditor.open(); |
| | | } |
| | | |
| | | |
| | | //矩形 |
| | | for(var i in objs.rectangle){ |
| | | var rectangle = objs.rectangle[i]; |
| | | var rectangleEditor = new AMap.RectangleEditor(map, rectangle) |
| | | |
| | | rectangleEditor.on('adjust', function(event) { |
| | | // log.info('触发事件:adjust') |
| | | }) |
| | | |
| | | rectangleEditor.on('end', function(e) { |
| | | var polygon = e.target.getPath(); |
| | | getCoordinate(polygon); |
| | | }) |
| | | editors.push(rectangleEditor); |
| | | rectangleEditor.open(); |
| | | } |
| | | |
| | | //圆形 |
| | | for(var i in objs.circle){ |
| | | var circle = objs.circle[i]; |
| | | var circleEditor = new AMap.CircleEditor(map, circle) |
| | | |
| | | circleEditor.on('move', function(event) { |
| | | // log.info('触发事件:move') |
| | | }) |
| | | |
| | | circleEditor.on('adjust', function(e) { |
| | | var radius = e.target.getRadius(); |
| | | if(radius > 5000){ |
| | | Feng.error("创建电子围栏失败,圆半径不能大于5000米"); |
| | | return; |
| | | } |
| | | }) |
| | | |
| | | circleEditor.on('end', function(e) { |
| | | var center = e.target.getCenter(); |
| | | var radius = e.target.getRadius(); |
| | | coordinate += center.lng + ',' + center.lat + ';' + radius + "_"; |
| | | }) |
| | | editors.push(circleEditor); |
| | | circleEditor.open(); |
| | | } |
| | | } |
| | | |
| | | |
| | | function closeEdit() { |
| | | for(var i in editors){ |
| | | var editor = editors[i]; |
| | | editor.close(); |
| | | } |
| | | } |
New file |
| | |
| | | /** |
| | | * 跨城站点管理管理初始化 |
| | | */ |
| | | var TSite = { |
| | | id: "TSiteTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TSite.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键ID', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '省', field: 'insertTime', visible: true, align: 'center', valign: 'middle',width:'20%', |
| | | }, |
| | | {title: '市', field: 'name', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '姓名', field: 'insertUserId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '联系电话', field: 'insertUser', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '积分类型', field: 'province', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '积分明细', field: 'lineNum', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '变动类型', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '时间', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '备注', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | } |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TSite.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TSite.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | TSite.oneChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/onChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | /** |
| | | * 点击添加跨城站点管理 |
| | | */ |
| | | TSite.openAddTSite = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: language==1?'添加':(language==2?'Add':'Tambahkan'), |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tSite/tSite_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看跨城站点管理详情 |
| | | */ |
| | | TSite.openTSiteDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: language==1?'编辑':(language==2?'Edit':'Edit'), |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tSite/tSite_update/' + TSite.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 操作跨城站点管理 |
| | | */ |
| | | TSite.opt = function (type) { |
| | | if (this.check()) { |
| | | var name = TSite.seItem.name; |
| | | if (name == "" || name == null || name == undefined) { |
| | | name = "该站点"; |
| | | } else { |
| | | name = "【" + name + "】"; |
| | | } |
| | | var str = ""; |
| | | var text = "请谨慎操作!"; |
| | | var title = "请谨慎操作!"; |
| | | if (1 == type){ |
| | | str = "删除"; |
| | | title = "您是否确认删除"+name+"?"; |
| | | text = "请谨慎操作,删除后数据无法恢复!"; |
| | | } else if (2 == type){ |
| | | str = "冻结"; |
| | | title = "您是否确认冻结"+name+"?"; |
| | | } else if (3 == type){ |
| | | str = "解冻"; |
| | | title = "您是否确认解冻"+name+"?"; |
| | | } |
| | | if (1 == type){ |
| | | if (TSite.seItem.lineNum != "" && TSite.seItem.lineNum != null && TSite.seItem.lineNum > 0) { |
| | | swal("删除失败", "该站点还有关联线路!", "warning"); |
| | | return; |
| | | } |
| | | } |
| | | if(2 == type){ |
| | | if (TSite.seItem.state != 1) { |
| | | swal("冻结失败", "【正常】状态下才能执行此操作!", "warning"); |
| | | return; |
| | | } |
| | | } |
| | | if (3 == type){ |
| | | if (TSite.seItem.state != 2){ |
| | | swal("解冻失败", "【冻结】状态下才能执行此操作!", "warning"); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | swal({ |
| | | title: title, |
| | | text: text, |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: str, |
| | | closeOnConfirm: true |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tSite/opt", function (data) { |
| | | swal(str+"成功", "您已经"+str+"了" + name + "。", "success"); |
| | | TSite.table.refresh(); |
| | | }, function (data) { |
| | | swal(str+"失败", data.responseJSON.message + "!", "warning"); |
| | | }); |
| | | ajax.set("tSiteId",TSite.seItem.id); |
| | | ajax.set("optType", type); |
| | | ajax.start(); |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询跨城站点管理列表 |
| | | */ |
| | | TSite.search = function () { |
| | | var queryData = {}; |
| | | queryData['insertTime'] = $("#insertTime").val(); |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['insertUser'] = $("#insertUser").val(); |
| | | queryData['city'] = $("#city").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | TSite.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TSite.resetSearch = function () { |
| | | $("#insertTime").val(""); |
| | | $("#name").val(""); |
| | | $("#insertUser").val(""); |
| | | $("#city").val(""); |
| | | $("#state").val(""); |
| | | TSite.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TSite.initColumn(); |
| | | var table = new BSTable(TSite.id, "/tIntegral/list", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | TSite.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化跨城站点管理详情对话框 |
| | | */ |
| | | var TSiteInfoDlg = { |
| | | tSiteInfoData : {}, |
| | | validateFields: { |
| | | name: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '站点名称不能为空' |
| | | } |
| | | } |
| | | }, |
| | | provinceCode: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '请选择站点所属省' |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 验证数据是否为空 |
| | | */ |
| | | TSiteInfoDlg.validate = function () { |
| | | $('#siteInfoForm').data("bootstrapValidator").resetForm(); |
| | | $('#siteInfoForm').bootstrapValidator('validate'); |
| | | return $("#siteInfoForm").data('bootstrapValidator').isValid(); |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TSiteInfoDlg.clearData = function() { |
| | | this.tSiteInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TSiteInfoDlg.set = function(key, val) { |
| | | this.tSiteInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TSiteInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TSiteInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TSite.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TSiteInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('name') |
| | | .set('province') |
| | | .set('provinceCode') |
| | | .set('city') |
| | | .set('cityCode') |
| | | .set('district') |
| | | .set('districtCode') |
| | | .set('state') |
| | | .set('insertTime') |
| | | .set('insertUserId'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TSiteInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | var name = $("#name").val(); |
| | | var provinceCode = $("#provinceCode").val(); |
| | | var cityCode = $("#cityCode").val(); |
| | | var districtCode = $("#districtCode").val(); |
| | | if ("" == provinceCode){ |
| | | Feng.error("请选择所属城市"); |
| | | return; |
| | | } |
| | | var subArr=[]; |
| | | $(".areaValueClass").each(function () { |
| | | subArr.push({ |
| | | id:$(this).find("input[name*='id']").val(), |
| | | areaType:$(this).find("input[name*='areaType1']").val(), |
| | | time:$(this).find("input[name*='time']").val(), |
| | | name:$(this).find("input[name*='name']").val(), |
| | | province:$(this).find("input[name*='province1']").val(), |
| | | provinceCode:$(this).find("input[name*='provinceCode1']").val(), |
| | | city:$(this).find("input[name*='city1']").val(), |
| | | cityCode:$(this).find("input[name*='cityCode1']").val(), |
| | | district:$(this).find("input[name*='district1']").val(), |
| | | districtCode:$(this).find("input[name*='districtCode1']").val(), |
| | | coordinate:$(this).find("input[name*='coordinate1']").val(), |
| | | }) |
| | | }); |
| | | if(subArr.length <= 0){ |
| | | Feng.error("请至少填写一条站点区域"); |
| | | return; |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tSite/add", function(data){ |
| | | if(data.status == 200){ |
| | | Feng.success("添加成功!"); |
| | | window.parent.TSite.table.refresh(); |
| | | TSiteInfoDlg.close(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("name",name); |
| | | ajax.set("provinceCode",provinceCode); |
| | | ajax.set("province",$("#provinceCode option:selected").text()); |
| | | if ("" != cityCode && null != cityCode && undefined != cityCode){ |
| | | ajax.set("cityCode",cityCode); |
| | | ajax.set("city",$("#cityCode option:selected").text()); |
| | | } |
| | | if ("" != districtCode && null != districtCode && undefined != districtCode){ |
| | | ajax.set("districtCode",$("#districtCode").val()); |
| | | ajax.set("district",$("#districtCode option:selected").text()); |
| | | } |
| | | ajax.set("subArr",JSON.stringify(subArr)); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TSiteInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | var name = $("#name").val(); |
| | | var provinceCode = $("#provinceCode").val(); |
| | | var cityCode = $("#cityCode").val(); |
| | | var districtCode = $("#districtCode").val(); |
| | | if ("" == provinceCode){ |
| | | Feng.error("请选择所属城市"); |
| | | return; |
| | | } |
| | | var subArr=[]; |
| | | $(".areaValueClass").each(function () { |
| | | subArr.push({ |
| | | id:$(this).find("input[name*='id']").val(), |
| | | areaType:$(this).find("input[name*='areaType1']").val(), |
| | | time:$(this).find("input[name*='time']").val(), |
| | | name:$(this).find("input[name*='name']").val(), |
| | | province:$(this).find("input[name*='province1']").val(), |
| | | provinceCode:$(this).find("input[name*='provinceCode1']").val(), |
| | | city:$(this).find("input[name*='city1']").val(), |
| | | cityCode:$(this).find("input[name*='cityCode1']").val(), |
| | | district:$(this).find("input[name*='district1']").val(), |
| | | districtCode:$(this).find("input[name*='districtCode1']").val(), |
| | | coordinate:$(this).find("input[name*='coordinate1']").val(), |
| | | }) |
| | | }); |
| | | if(subArr.length <= 0){ |
| | | Feng.error("请至少填写一条站点区域"); |
| | | return; |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tSite/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | | window.parent.TSite.table.refresh(); |
| | | TSiteInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.set("name",name); |
| | | ajax.set("provinceCode",provinceCode); |
| | | ajax.set("province",$("#provinceCode option:selected").text()); |
| | | if ("" != cityCode && null != cityCode && undefined != cityCode){ |
| | | ajax.set("cityCode",cityCode); |
| | | ajax.set("city",$("#cityCode option:selected").text()); |
| | | } |
| | | if ("" != districtCode && null != districtCode && undefined != districtCode){ |
| | | ajax.set("districtCode",$("#districtCode").val()); |
| | | ajax.set("district",$("#districtCode option:selected").text()); |
| | | } |
| | | ajax.set("subArr",JSON.stringify(subArr)); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | Feng.initValidator("siteInfoForm", TSiteInfoDlg.validateFields); |
| | | }); |
| | | |
| | | |
| | | //省改变 |
| | | TSiteInfoDlg.provinceChange = function (e) { |
| | | var provinceCode=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompany/change", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Please select a city</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih Kota</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cityCode").empty().append(content); |
| | | $("#districtCode").empty().append('<option value="">选择区</option>'); |
| | | } |
| | | }); |
| | | ajax.set("code",provinceCode); |
| | | ajax.start(); |
| | | } |
| | | //市改变 |
| | | TSiteInfoDlg.cityChange = function (e) { |
| | | var cityCode=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompany/change", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择区</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Please select a city</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih Kota</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#districtCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("code",cityCode); |
| | | ajax.start(); |
| | | } |
| | | /** |
| | | * 类型改变执行 |
| | | * @param e |
| | | */ |
| | | TSiteInfoDlg.areaTypeClick = function (e) { |
| | | if (1 == e){//行政区域 |
| | | $("#areaType1Div").show(); |
| | | $("#areaType2Div").hide(); |
| | | } else if (2 == e){ |
| | | $("#areaType2Div").show(); |
| | | $("#areaType1Div").hide(); |
| | | } |
| | | } |
| | | |
| | | //站点区域省改变 |
| | | TSiteInfoDlg.provinceChange1 = function (e) { |
| | | var provinceCode=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompany/change", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Please select a city</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih Kota</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cityCode1").empty().append(content); |
| | | $("#districtCode1").empty().append('<option value="">选择区</option>'); |
| | | } |
| | | }); |
| | | ajax.set("code",provinceCode); |
| | | ajax.start(); |
| | | } |
| | | //站点区域市改变 |
| | | TSiteInfoDlg.cityChange1 = function (e) { |
| | | var cityCode=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompany/change", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择区</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Please select a city</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih Kota</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#districtCode1").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("code",cityCode); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 添加区域 |
| | | */ |
| | | TSiteInfoDlg.addArea = function () { |
| | | var areaName = $("#areaName").val(); |
| | | if ("" == areaName || null == areaName){ |
| | | Feng.error("区域名称不能为空"); |
| | | return; |
| | | } |
| | | var areaType = $("input[name='areaType']:checked").val(); |
| | | var b = false; |
| | | $(".areaValueClass").each(function () { |
| | | var areaType1 = $(this).find("input[name*='areaType1']").val(); |
| | | if(areaType != areaType1){ |
| | | b = true; |
| | | return |
| | | } |
| | | }); |
| | | if(b){ |
| | | Feng.error("电子围栏和行政区域不能混合使用"); |
| | | return; |
| | | } |
| | | |
| | | if (1 == areaType){ |
| | | var provinceCode1 = $("#provinceCode1").val(); |
| | | var province1 = $("#provinceCode1 option:selected").text(); |
| | | var cityCode1 = $("#cityCode1").val(); |
| | | var city1 = $("#cityCode1 option:selected").text(); |
| | | var districtCode1 = $("#districtCode1").val(); |
| | | var district1 = $("#districtCode1 option:selected").text(); |
| | | if ("" == provinceCode1){ |
| | | Feng.error("请选择行政区域所属省"); |
| | | return; |
| | | } |
| | | }else if (2 == areaType) { |
| | | if("" == coordinate){ |
| | | Feng.error('请在地图上规划区域'); |
| | | return; |
| | | } |
| | | } |
| | | var subArr=[]; |
| | | $(".areaValueClass").each(function () { |
| | | subArr.push({ |
| | | areaType:$(this).find("input[name*='areaType1']").val(), |
| | | time:$(this).find("input[name*='time']").val(), |
| | | name:$(this).find("input[name*='name']").val(), |
| | | province:$(this).find("input[name*='province1']").val(), |
| | | provinceCode:$(this).find("input[name*='provinceCode1']").val(), |
| | | city:$(this).find("input[name*='city1']").val(), |
| | | cityCode:$(this).find("input[name*='cityCode1']").val(), |
| | | district:$(this).find("input[name*='district1']").val(), |
| | | districtCode:$(this).find("input[name*='districtCode1']").val(), |
| | | coordinate:$(this).find("input[name*='coordinate1']").val(), |
| | | }) |
| | | }); |
| | | var str = '<tr class="areaValueClass">' + |
| | | // '<td>' + (subArr.length+1) + '</td>' + |
| | | '<td style="text-align: center;">' + |
| | | '<input type="hidden" id="areaType1" name="areaType1" value="'+areaType+'">' + |
| | | '<input type="hidden" id="time" name="time" value="'+getNowFormatDate()+'">' + getNowFormatDate() + '</td>' + |
| | | |
| | | '<td style="text-align: center;">' + |
| | | '<input type="hidden" id="name" name="name" value="'+areaName+'">' + |
| | | '<input type="hidden" id="provinceCode1" name="provinceCode1" value="'+provinceCode1+'">' + |
| | | '<input type="hidden" id="province1" name="province1" value="'+province1+'">' + |
| | | '<input type="hidden" id="cityCode1" name="cityCode1" value="'+cityCode1+'">' + |
| | | '<input type="hidden" id="city1" name="city1" value="'+city1+'">' + |
| | | '<input type="hidden" id="districtCode1" name="districtCode1" value="'+districtCode1+'">' + |
| | | '<input type="hidden" id="district1" name="district1" value="'+district1+'">' + |
| | | '<input type="hidden" id="coordinate1" name="coordinate1" value="'+coordinate+'">' + areaName + '</td>' + |
| | | |
| | | '<td style="text-align: center;"><button onclick="deleteSub(this)">移除</button></td></tr>'; |
| | | $("#areaValue").append(str); |
| | | |
| | | //清除电子围栏数据 |
| | | $("#clear").click(); |
| | | } |
| | | //删除数据 |
| | | function deleteSub(e) { |
| | | $(e).parent().parent().remove(); |
| | | } |
| | |
| | | layerIndex: -1 |
| | | }; |
| | | var language =1 |
| | | var role =$("#role").val() |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TCompetition.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '省', field: 'province', visible: true, align: 'center', valign: 'middle' |
| | | {title: '省', field: 'province', visible: role==1?true:false, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '市', field: 'city', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '所属账号', field: 'account', visible: true, align: 'center', valign: 'middle' |
| | | {title: '市', field: 'city', visible: role==1?true:false, align: 'center', valign: 'middle'}, |
| | | {title: '所属账号', field: 'account', visible: role==1?true:false, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '门店名称', field: 'name', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | |
| | | */ |
| | | var language=1; |
| | | var TCarInfoDlg = { |
| | | goodsPicArray: [], |
| | | tCarInfoData : {}, |
| | | validateFields: { |
| | | } |
| | |
| | | Feng.info("请上传门店封面") |
| | | return; |
| | | } |
| | | |
| | | let imgOne = $("#imgOne").val() |
| | | |
| | | if(imgOne==''){ |
| | | var goodImgs = this.goodsPicArray; |
| | | if(goodImgs.length==0){ |
| | | Feng.info("请上传实景图") |
| | | return; |
| | | } |
| | | var imgOne =""; |
| | | for (let i = 0; i <goodImgs.length; i++) { |
| | | if(i==goodImgs.length-1){ |
| | | imgOne += (goodImgs[i].response) |
| | | }else { |
| | | imgOne+=(goodImgs[i].response+",") |
| | | } |
| | | |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/add", function(data){ |
| | | if(data=="5001"){ |
| | |
| | | // 经纬度 |
| | | var lng = result.geocodes[0].location.lng; |
| | | var lat = result.geocodes[0].location.lat; |
| | | $("#longitude").val(lng) |
| | | $("#latitude").val(lat) |
| | | // 地图实例 |
| | | map = new AMap.Map('container', { |
| | | resizeEnable: true, // 允许缩放 |
New file |
| | |
| | | /** |
| | | * 车辆管理管理初始化 |
| | | */ |
| | | var TCompetition = { |
| | | id: "TCompetitionTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | var language =1 |
| | | var role =$("#role").val() |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TCompetition.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '省', field: 'pname', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '市', field: 'cname', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '门店名称', field: 'shopName', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '评价用户', field: 'name', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '联系方式', field: 'phone', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '总体评分', field: 'score', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '评价时间', field: 'time', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | ]; |
| | | }; |
| | | function currentTime(timestamp){ |
| | | var time = timestamp + ''; |
| | | if(time.length != 13){ |
| | | timestamp = timestamp * 1000; |
| | | } |
| | | var date = new Date(timestamp);; |
| | | var Y = date.getFullYear() + '-'; |
| | | var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; |
| | | var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' '; |
| | | |
| | | var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':'; |
| | | var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':'; |
| | | var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()); |
| | | var strDate = Y + M + D + h + m + s; |
| | | return strDate |
| | | } |
| | | |
| | | function currentTime1(timestamp){ |
| | | var time = timestamp + ''; |
| | | if(time.length != 13){ |
| | | timestamp = timestamp * 1000; |
| | | } |
| | | var date = new Date(timestamp);; |
| | | var Y = date.getFullYear() + '-'; |
| | | var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; |
| | | var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' '; |
| | | |
| | | var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':'; |
| | | var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':'; |
| | | var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()); |
| | | var strDate = Y + M + D ; |
| | | return strDate |
| | | } |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TCompetition.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TCompetition.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加车辆管理 |
| | | */ |
| | | TCompetition.updateState = function (e) { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tShopEvaluation/updateState", function (data) { |
| | | if(data.code==200){ |
| | | Feng.success("操作成功") |
| | | }else{ |
| | | Feng.error("操作失败") |
| | | } |
| | | TCompetition.table.refresh(); |
| | | }, function (data) { |
| | | swal("删除失败", data.responseJSON.message + "!", "warning"); |
| | | |
| | | }); |
| | | ajax.set("id",TCompetition.seItem.id); |
| | | ajax.set("state",e); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看车辆管理详情 |
| | | */ |
| | | TCompetition.openTCompetitionDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'编辑', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tShop/tShop_update/' + TCompetition.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | TCompetition.info = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tShopEvaluation/tShop_info/' + TCompetition.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | TCompetition.gift = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'免费福利', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tShop/tShop_gift/' + TCompetition.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | TCompetition.indexSet = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'首页设置', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tShop/tShop_indexSet/' + TCompetition.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除车辆管理 |
| | | */ |
| | | TCompetition.delete = function () { |
| | | if (this.check()) { |
| | | var nickname = TCompetition.seItem.carLicensePlate; |
| | | if (nickname == "" || nickname == null || nickname == undefined){ |
| | | nickname = "该车辆"; |
| | | }else{ |
| | | nickname = "【"+nickname+"】"; |
| | | } |
| | | swal({ |
| | | title: language==1?"您是否确认删除" + nickname + "?":(language==2?"Are you sure to delete the" + nickname + "?":"Apakah Anda pasti akan menghapus" + nickname + "?"), |
| | | text: language==1?"请谨慎操作!":(language==2?' Please operate with caution!':'Harap beroperasi dengan hati -hati!'), |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: language==1?"删除":(language==2?'Delete':'Hapus'), |
| | | closeOnConfirm: true |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/TCompetition/delete", function (data) { |
| | | if(language==1){ |
| | | swal("删除成功", "您已经成功删除了" + nickname + "。", "success"); |
| | | }else if(language==2){ |
| | | swal("Delete succeeded!", "You have successfully deleted it" + nickname + "。", "success"); |
| | | }else { |
| | | swal("Hapus berhasil!", "Anda berhasil menghapus" + nickname + "。", "success"); |
| | | } |
| | | TCompetition.table.refresh(); |
| | | }, function (data) { |
| | | if(language==1){ |
| | | swal("删除失败", data.responseJSON.message + "!", "warning"); |
| | | }else if(language==2){ |
| | | swal("Failed to delete", data.responseJSON.message + "!", "warning"); |
| | | }else { |
| | | swal("Hapus Gagal", data.responseJSON.message + "!", "warning"); |
| | | } |
| | | |
| | | }); |
| | | ajax.set("TCompetitionId",TCompetition.seItem.id); |
| | | ajax.start(); |
| | | }); |
| | | } |
| | | }; |
| | | TCompetition.oneChange = function (e) { |
| | | console.log(111) |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | TCompetition.oneChangeNext = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/oneChangeNext", 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>"; |
| | | }); |
| | | $("#account").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | TCompetition.freeze = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/freeze", function (data) { |
| | | Feng.success("冻结成功!"); |
| | | TCompetition.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("冻结失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | TCompetition.unfreeze = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/unfreeze", function (data) { |
| | | Feng.success("解冻成功!"); |
| | | TCompetition.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("解冻失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | TCompetition.reload = function () { |
| | | if (this.check()) { |
| | | let id = this.seItem.id |
| | | var operation = function(){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/pwd", function (data) { |
| | | Feng.success("重置成功!"); |
| | | TCompetition.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("重置失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",id); |
| | | ajax.start(); |
| | | } |
| | | Feng.confirm("确认重置密码?重置后密码为:a123456", operation); |
| | | } |
| | | |
| | | }; |
| | | |
| | | TCompetition.carInsurance = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: language==1?'车辆保险':(language==2?'Vehicle insurance':'Asuransi kendaraan'), |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/TCompetition/carInsurance?carId=' + TCompetition.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询车辆管理列表 |
| | | */ |
| | | TCompetition.search = function () { |
| | | var queryData = {}; |
| | | queryData['provinceCode'] = $("#pCode").val(); |
| | | queryData['cityCode'] = $("#cCode").val(); |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['phone'] = $("#phone").val(); |
| | | queryData['shopName'] = $("#shopName").val(); |
| | | TCompetition.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TCompetition.resetSearch = function () { |
| | | $("#pCode").val(""); |
| | | $("#cCode").val(""); |
| | | $("#name").val(""); |
| | | $("#phone").val(""); |
| | | $("#shopName").val(""); |
| | | TCompetition.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TCompetition.initColumn(); |
| | | var table = new BSTable(TCompetition.id, "/tShopEvaluation/list", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | TCompetition.table = table.init(); |
| | | }); |
| | | |
| | | /** |
| | | * 下载模板 |
| | | */ |
| | | TCompetition.uploadCarModel = function () { |
| | | window.location.href = Feng.ctxPath + "/TCompetition/uploadCarModel"; |
| | | } |
| | | |
| | | var agreement = function(){ |
| | | this.init = function(){ |
| | | //模拟上传excel |
| | | $("#uploadEventBtn").unbind("click").bind("click",function(){ |
| | | $("#uploadEventFile").click(); |
| | | }); |
| | | }; |
| | | } |
| | | /** |
| | | * 导入合同 |
| | | */ |
| | | TCompetition.exporTCompetition = function () { |
| | | var uploadEventFile = $("#uploadEventFile").val(); |
| | | if(uploadEventFile == ''){ |
| | | if(language==1){ |
| | | Feng.info("请选择Excel,再上传"); |
| | | }else if(language==2){ |
| | | Feng.info("Please select Excel and upload"); |
| | | }else { |
| | | Feng.info("Silakan pilih Excel dan upload"); |
| | | } |
| | | }else if(uploadEventFile.lastIndexOf(".xls")<0){//可判断以.xls和.xlsx结尾的excel |
| | | if(language==1){ |
| | | Feng.info("只能上传Excel文件"); |
| | | }else if(language==2){ |
| | | Feng.info("Only Excel files can be uploaded"); |
| | | }else { |
| | | Feng.info("Hanya berkas Excel yang dapat diunggah"); |
| | | } |
| | | }else{ |
| | | var url = Feng.ctxPath + '/TCompetition/exporTCompetition'; |
| | | var file = document.querySelector('input[name=file]').files[0]; |
| | | var reader = new FileReader(); |
| | | if (file) { |
| | | var formData = new FormData(); |
| | | formData.append("myfile", file); |
| | | this.sendAjaxRequest(url, 'POST', formData); |
| | | } |
| | | } |
| | | } |
| | | TCompetition.sendAjaxRequest = function(url,type,data){ |
| | | $.ajax({ |
| | | url : url, |
| | | type : type, |
| | | data : data, |
| | | success : function(result) { |
| | | if(result.code==500) { |
| | | Feng.info(result.message); |
| | | }else { |
| | | if(language==1){ |
| | | Feng.success("导入成功!"); |
| | | }else if(language==2){ |
| | | Feng.success("SUCCESSFUL IMPORT!"); |
| | | }else { |
| | | Feng.success("Import berhasil!"); |
| | | } |
| | | } |
| | | TCompetition.table.refresh(); |
| | | }, |
| | | error : function() { |
| | | if(language==1){ |
| | | Feng.error("excel上传失败!"); |
| | | }else if(language==2){ |
| | | Feng.error("Uploading excel Fails. Procedure!"); |
| | | }else { |
| | | Feng.error("Gagal mengunggah excel!"); |
| | | } |
| | | }, |
| | | cache : false, |
| | | contentType : false, |
| | | processData : false |
| | | }); |
| | | }; |
| | | |
| | | var agreement; |
| | | $(function(){ |
| | | agreement = new agreement(); |
| | | agreement.init(); |
| | | }); |
| | | |
| | | /** |
| | | * 导出车辆操作 |
| | | */ |
| | | TCompetition.ouTCompetition = function () { |
| | | var operation = function() { |
| | | window.location.href = Feng.ctxPath + "/TCompetition/ouTCompetition"; |
| | | }; |
| | | if(language==1){ |
| | | Feng.confirm("是否确认导出车辆信息?", operation); |
| | | }else if(language==2){ |
| | | Feng.confirm("Are you sure to export vehicle information?", operation); |
| | | }else { |
| | | Feng.confirm("Apakah Anda pasti akan mengekspor informasi kendaraan?", operation); |
| | | } |
| | | } |
New file |
| | |
| | | /** |
| | | * 初始化车辆管理详情对话框 |
| | | */ |
| | | var language=1; |
| | | var TCarInfoDlg = { |
| | | goodsPicArray: [], |
| | | tCarInfoData : {}, |
| | | validateFields: { |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 验证数据是否为空 |
| | | */ |
| | | TCarInfoDlg.validate = function () { |
| | | $('#carInfoForm').data("bootstrapValidator").resetForm(); |
| | | $('#carInfoForm').bootstrapValidator('validate'); |
| | | return $("#carInfoForm").data('bootstrapValidator').isValid(); |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TCarInfoDlg.clearData = function() { |
| | | this.tCarInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TCarInfoDlg.set = function(key, val) { |
| | | this.tCarInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TCarInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TCarInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TCompetition.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TCarInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('isPlatCar') |
| | | .set('companyId') |
| | | .set('franchiseeId') |
| | | .set('carColor') |
| | | .set('carModelId') |
| | | .set('carBrandId') |
| | | .set('carLicensePlate') |
| | | .set('carPhoto') |
| | | .set('drivingLicenseNumber') |
| | | .set('drivingLicensePhoto') |
| | | .set('annualInspectionTime') |
| | | .set('commercialInsuranceTime') |
| | | .set('createTime') |
| | | .set('state') |
| | | .set('addType') |
| | | .set('addObjectId') |
| | | .set('plateColor') |
| | | .set('vehicleType') |
| | | .set('ownerName') |
| | | .set('engineId') |
| | | .set('VIN') |
| | | .set('certifyDateA') |
| | | .set('fuelType') |
| | | .set('engineDisplace') |
| | | .set('certificate') |
| | | .set('transAgency') |
| | | .set('transArea') |
| | | .set('transDateStart') |
| | | .set('transDateStop') |
| | | .set('certifyDateB') |
| | | .set('fixState') |
| | | .set('nextFixDate') |
| | | .set('checkState') |
| | | .set('feePrintId') |
| | | .set('GPSBrand') |
| | | .set('GPSModel') |
| | | .set('GPSIMEI') |
| | | .set('GPSInstallDate') |
| | | .set('registerDate') |
| | | .set('commercialType'); |
| | | } |
| | | |
| | | TCarInfoDlg.oneChange = function (e) { |
| | | console.log(111) |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | TCarInfoDlg.oneChangeNext = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/oneChangeNext", 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>"; |
| | | }); |
| | | $("#account").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | TCarInfoDlg.saveImg = function () { |
| | | var id=$("#id").val(); |
| | | var img=$("#welfarePicture").val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/saveImg", function(data){ |
| | | if(data.code == 200){ |
| | | Feng.success("保存成功") |
| | | } |
| | | }); |
| | | ajax.set("id",id); |
| | | ajax.set("img",img); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TCarInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | |
| | | let pCode = $("#pCode").val() |
| | | let cCode = $("#cCode").val() |
| | | let account = $("#account").val() |
| | | if(account==''){ |
| | | Feng.info("请选择所属账号") |
| | | return; |
| | | } |
| | | |
| | | let name = $("#name").val() |
| | | let phone = $("#phone").val() |
| | | |
| | | if(pCode=='' && $("#role")=="1"){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if(cCode=='' && $("#role")=="1"){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if(name==''){ |
| | | Feng.info("门店名称不能为空") |
| | | return; |
| | | } |
| | | if(phone==''){ |
| | | Feng.info("联系电话不能为空") |
| | | return; |
| | | } |
| | | |
| | | let address = $("#address").val() |
| | | |
| | | if(address==''){ |
| | | Feng.info("请输入地址") |
| | | return; |
| | | } |
| | | let time = $("#time").val() |
| | | |
| | | if(time==''){ |
| | | Feng.info("请填写营业时间") |
| | | return; |
| | | } |
| | | let intro = $("#intro").val() |
| | | |
| | | if(intro==''){ |
| | | Feng.info("请填写门店介绍") |
| | | return; |
| | | } |
| | | let userName = $("#userName").val() |
| | | |
| | | if(userName==''){ |
| | | Feng.info("请输入店长姓名") |
| | | return; |
| | | } |
| | | let userPhone = $("#userPhone").val() |
| | | |
| | | if(userPhone==''){ |
| | | Feng.info("请输入店长手机号") |
| | | return; |
| | | } |
| | | let img = $("#img").val() |
| | | |
| | | if(img==''){ |
| | | Feng.info("请上传门店封面") |
| | | return; |
| | | } |
| | | var goodImgs = this.goodsPicArray; |
| | | if(goodImgs.length==0){ |
| | | Feng.info("请上传实景图") |
| | | return; |
| | | } |
| | | var imgOne =""; |
| | | for (let i = 0; i <goodImgs.length; i++) { |
| | | if(i==goodImgs.length-1){ |
| | | imgOne += (goodImgs[i].response) |
| | | }else { |
| | | imgOne+=(goodImgs[i].response+",") |
| | | } |
| | | |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/add", function(data){ |
| | | if(data=="5001"){ |
| | | Feng.error("该店长手机号已经存在!") |
| | | }else |
| | | if(data.code == 200){ |
| | | if(language==1){ |
| | | Feng.success("添加成功!"); |
| | | }else if(language==2){ |
| | | Feng.success("Successfully added!"); |
| | | }else { |
| | | Feng.success("Sangat berhasil ditambah!"); |
| | | } |
| | | window.parent.TCompetition.table.refresh(); |
| | | TCarInfoDlg.close(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tCarInfoData); |
| | | ajax.set("provinceCode",pCode); |
| | | ajax.set("cityCode",cCode); |
| | | ajax.set("name",name); |
| | | ajax.set("phone",phone); |
| | | ajax.set("cityManagerId",account); |
| | | ajax.set("address",address); |
| | | ajax.set("time",time); |
| | | ajax.set("introduce",intro); |
| | | ajax.set("userName",userName); |
| | | ajax.set("userPhone",userPhone); |
| | | ajax.set("coverDrawing",img); |
| | | ajax.set("realPicture",imgOne); |
| | | ajax.start(); |
| | | } |
| | | var map = new AMap.Map('container', { |
| | | resizeEnable: true, // 允许缩放 |
| | | zoom: 15 // 设置地图的缩放级别,0 - 20 |
| | | }); |
| | | var marker; |
| | | //搜索地图 |
| | | TCarInfoDlg.searchByStationName = function(e,type){ |
| | | var keyword="成都"; |
| | | if(type==2){ |
| | | keyword = $(e).parent().prev().find("input").val(); |
| | | }else { |
| | | if($("#address").val()!=null && $("#address").val()!=''){ |
| | | keyword = $("#address").val(); |
| | | } |
| | | } |
| | | type=1; |
| | | AMap.plugin('AMap.Geocoder', function() { |
| | | var geocoder = new AMap.Geocoder(); |
| | | console.log(geocoder) |
| | | console.log(keyword) |
| | | geocoder.getLocation(keyword, function(status, result) { |
| | | console.log(status,result) |
| | | if (status === 'complete' && result.info === 'OK') { |
| | | // 经纬度 |
| | | var lng = result.geocodes[0].location.lng; |
| | | var lat = result.geocodes[0].location.lat; |
| | | $("#longitude").val(lng) |
| | | $("#latitude").val(lat) |
| | | // 地图实例 |
| | | map = new AMap.Map('container', { |
| | | resizeEnable: true, // 允许缩放 |
| | | center: [lng, lat], // 设置地图的中心点 |
| | | zoom: 15 // 设置地图的缩放级别,0 - 20 |
| | | }); |
| | | //地图画点 |
| | | //addMarker(lng,lat); |
| | | if(type==1 || type==2){ |
| | | showInfoClick(); |
| | | if(lng == null){ |
| | | }else{ |
| | | addMarker(lng,lat); |
| | | } |
| | | }else{ |
| | | addMarker(lng,lat); |
| | | } |
| | | } else { |
| | | console.log('定位失败!'); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | } |
| | | //地图点击事件 |
| | | function showInfoClick(){ |
| | | map.on('click', function (e) { |
| | | addMarker(e.lnglat.getLng(),e.lnglat.getLat()); |
| | | }); |
| | | } |
| | | //删除点 |
| | | function removeMarkers(){ |
| | | if(marker!=null){ |
| | | map.remove(marker); |
| | | } |
| | | |
| | | } |
| | | // 实例化点标记 |
| | | function addMarker(lon,lat) { |
| | | removeMarkers(); |
| | | marker = new AMap.Marker({ |
| | | map: map, |
| | | position: new AMap.LngLat(lon, lat), // 经纬度 |
| | | }); |
| | | //加经纬度 |
| | | $("#lon").val(lon); |
| | | $("#lat").val(lat); |
| | | var lnglatXY = [lon, lat];//地图上所标点的坐标 |
| | | AMap.service('AMap.Geocoder',function() {//回调函数 |
| | | geocoder = new AMap.Geocoder({ |
| | | }); |
| | | geocoder.getAddress(lnglatXY, function (status, result) { |
| | | if (status === 'complete' && result.info === 'OK') { |
| | | //获得了有效的地址信息: |
| | | //即,result.regeocode.formattedAddress |
| | | // alert(result.regeocode.formattedAddress) |
| | | //document.getElementById("address").value=result.regeocode.formattedAddress;//将获取到的地址信息赋值给文本框,保存进数据库 |
| | | |
| | | var address = result.regeocode.formattedAddress; |
| | | var city = result.regeocode.addressComponent.city; |
| | | var province = result.regeocode.addressComponent.province; |
| | | var district = result.regeocode.addressComponent.district; |
| | | $("#address").val(address); |
| | | } else { |
| | | //获取地址失败 |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TCarInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | |
| | | let pCode = $("#pCode").val() |
| | | let cCode = $("#cCode").val() |
| | | let account = $("#account").val() |
| | | if(account==''){ |
| | | Feng.info("请选择所属账号") |
| | | return; |
| | | } |
| | | |
| | | let name = $("#name").val() |
| | | let phone = $("#phone").val() |
| | | |
| | | if(pCode=='' && $("#role")=="1"){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if(cCode=='' && $("#role")=="1"){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if(name==''){ |
| | | Feng.info("门店名称不能为空") |
| | | return; |
| | | } |
| | | if(phone==''){ |
| | | Feng.info("联系电话不能为空") |
| | | return; |
| | | } |
| | | |
| | | let address = $("#address").val() |
| | | |
| | | if(address==''){ |
| | | Feng.info("请输入地址") |
| | | return; |
| | | } |
| | | let time = $("#time").val() |
| | | |
| | | if(time==''){ |
| | | Feng.info("请填写营业时间") |
| | | return; |
| | | } |
| | | let intro = $("#intro").val() |
| | | |
| | | if(intro==''){ |
| | | Feng.info("请填写门店介绍") |
| | | return; |
| | | } |
| | | let userName = $("#userName").val() |
| | | |
| | | if(userName==''){ |
| | | Feng.info("请输入店长姓名") |
| | | return; |
| | | } |
| | | let userPhone = $("#userPhone").val() |
| | | |
| | | if(userPhone==''){ |
| | | Feng.info("请输入店长手机号") |
| | | return; |
| | | } |
| | | let img = $("#img").val() |
| | | |
| | | |
| | | let imgOne = $("#imgOne").val() |
| | | |
| | | if(imgOne==''){ |
| | | Feng.info("请上传实景图") |
| | | return; |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/update", function(data){ |
| | | if(data=="5001"){ |
| | | Feng.error("该店长手机号已经存在!") |
| | | }else |
| | | if(data.code == 200){ |
| | | if(language==1){ |
| | | Feng.success("修改成功!"); |
| | | }else if(language==2){ |
| | | Feng.success("Modify successfully!"); |
| | | }else { |
| | | Feng.success("Mengubah dengan sukses!"); |
| | | } |
| | | window.parent.TCompetition.table.refresh(); |
| | | TCarInfoDlg.close(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("provinceCode",pCode); |
| | | ajax.set("cityCode",cCode); |
| | | ajax.set("name",name); |
| | | ajax.set("phone",phone); |
| | | ajax.set("cityManagerId",account); |
| | | ajax.set("address",address); |
| | | ajax.set("time",time); |
| | | ajax.set("introduce",intro); |
| | | ajax.set("userName",userName); |
| | | ajax.set("userPhone",userPhone); |
| | | ajax.set("coverDrawing",img); |
| | | ajax.set("realPicture",imgOne); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | Feng.initValidator("carInfoForm", TCarInfoDlg.validateFields); |
| | | // 初始化图片上传 |
| | | var carPhoto = new $WebUpload("c1"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("c2"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("c3"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("c4"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("c5"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("c6"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("c7"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("c8"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("img"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var drivingLicensePhoto = new $WebUpload("drivingLicensePhoto"); |
| | | drivingLicensePhoto.setUploadBarId("progressBar"); |
| | | drivingLicensePhoto.init(); |
| | | |
| | | //地图搜索 |
| | | TCarInfoDlg.searchByStationName(); |
| | | }); |
| | | |
| | | /** |
| | | * 选择分公司后执行 |
| | | */ |
| | | TCarInfoDlg.oneChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/onChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 类型改变执行 |
| | | * @param e |
| | | */ |
| | | TCarInfoDlg.companyTypeClick = function (e) { |
| | | if (1 == e){ |
| | | $(".companyDiv").hide(); |
| | | } else if (2 == e){ |
| | | $(".companyDiv").show(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 车辆品牌改变时执行 |
| | | */ |
| | | TCarInfoDlg.saveAllImg = function (e) { |
| | | var id = $("#id").val() |
| | | var px1 = $("#px1").val() |
| | | var px2 = $("#px2").val() |
| | | var px3 = $("#px3").val() |
| | | var px4 = $("#px4").val() |
| | | var px5 = $("#px5").val() |
| | | var px6 = $("#px6").val() |
| | | var px7 = $("#px7").val() |
| | | var px8 = $("#px8").val() |
| | | var c1 = $("#c1").val() |
| | | var c2 = $("#c2").val() |
| | | var c3 = $("#c3").val() |
| | | var c4 = $("#c4").val() |
| | | var c5 = $("#c5").val() |
| | | var c6 = $("#c6").val() |
| | | var c7 = $("#7").val() |
| | | var c8 = $("#c8").val() |
| | | var r1 = document.querySelector('input[name="r1"]').checked; |
| | | var r2 = document.querySelector('input[name="r2"]').checked; |
| | | var r3 = document.querySelector('input[name="r3"]').checked; |
| | | var r4 = document.querySelector('input[name="r4"]').checked; |
| | | var r5 = document.querySelector('input[name="r5"]').checked; |
| | | var r6 = document.querySelector('input[name="r6"]').checked; |
| | | var r7 = document.querySelector('input[name="r7"]').checked; |
| | | var r8 = document.querySelector('input[name="r8"]').checked; |
| | | if(r1){ |
| | | r1 =1 |
| | | }else{ |
| | | r1=0 |
| | | } |
| | | if(r2){ |
| | | r2 =1 |
| | | }else{ |
| | | r2=0 |
| | | } |
| | | if(r3){ |
| | | r3 =1 |
| | | }else{ |
| | | r3=0 |
| | | } |
| | | if(r4){ |
| | | r4 =1 |
| | | }else{ |
| | | r4=0 |
| | | } |
| | | if(r5){ |
| | | r5 =1 |
| | | }else{ |
| | | r5=0 |
| | | } |
| | | if(r6){ |
| | | r6 =1 |
| | | }else{ |
| | | r6=0 |
| | | } |
| | | if(r7){ |
| | | r7 =1 |
| | | }else{ |
| | | r7=0 |
| | | } |
| | | if(r8){ |
| | | r8 =1 |
| | | }else{ |
| | | r8=0 |
| | | } |
| | | |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/saveImgAll", function(data){ |
| | | if(data.code == 200){ |
| | | Feng.success("保存成功!"); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | },function(data){ |
| | | Feng.error("保存失败!" + data.responseJSON.message + "!"); |
| | | |
| | | }); |
| | | ajax.set("id",id); |
| | | ajax.set("px1",px1); |
| | | ajax.set("px2",px2); |
| | | ajax.set("px3",px3); |
| | | ajax.set("px4",px4); |
| | | ajax.set("px5",px5); |
| | | ajax.set("px6",px6); |
| | | ajax.set("px7",px7); |
| | | ajax.set("px8",px8); |
| | | ajax.set("c1",c1); |
| | | ajax.set("c2",c2); |
| | | ajax.set("c3",c3); |
| | | ajax.set("c4",c4); |
| | | ajax.set("c5",c5); |
| | | ajax.set("c6",c6); |
| | | ajax.set("c7",c7); |
| | | ajax.set("c8",c8); |
| | | ajax.set("r1",r1); |
| | | ajax.set("r2",r2); |
| | | ajax.set("r3",r3); |
| | | ajax.set("r4",r4); |
| | | ajax.set("r5",r5); |
| | | ajax.set("r6",r6); |
| | | ajax.set("r7",r7); |
| | | ajax.set("r8",r8); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 专车服务被点击 |
| | | */ |
| | | TCarInfoDlg.zcServerClick = function () { |
| | | var serverBox1 = $('#serverBox1').prop('checked'); |
| | | if (serverBox1){ |
| | | $("#zcModelDiv").show(); |
| | | } else { |
| | | $("#zcModelDiv").hide(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 跨城服务被点击 |
| | | */ |
| | | TCarInfoDlg.kcServerClick = function () { |
| | | var serverBox3 = $('#serverBox3').prop('checked'); |
| | | if (serverBox3){ |
| | | $("#kcModelDiv").show(); |
| | | } else { |
| | | $("#kcModelDiv").hide(); |
| | | } |
| | | } |
| | |
| | | }, |
| | | {title: '场地责任险有效期', field: 'lineNum', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: language==1?'状态':(language==2?'State':'Status'), field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return {1:"上架中",2:"下架中"}[data] |
| | | } |
| | | } |
| | | ]; |
| | | }; |
| | |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | TSite.oneChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/onChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | /** |
| | | * 点击添加跨城站点管理 |
| | | */ |
New file |
| | |
| | | var map = new AMap.Map('container',{ |
| | | resizeEnable: true, |
| | | zoom:10 |
| | | }); |
| | | |
| | | |
| | | var value = ""; |
| | | map.getCity( |
| | | callback=function (result) { |
| | | value = result.city; |
| | | drawBounds(); |
| | | } |
| | | ); |
| | | |
| | | |
| | | var mouseTool = new AMap.MouseTool(map); |
| | | //监听draw事件可获取画好的覆盖物 |
| | | var overlays = []; |
| | | var name = null; |
| | | var coordinate = '';//存储坐标 |
| | | var objs = {//存储各种类型的覆盖物对象 |
| | | "polyline":[], |
| | | "polygon":[], |
| | | "rectangle":[], |
| | | "circle":[] |
| | | }; |
| | | var editors = []; |
| | | mouseTool.on('draw',function(e){ |
| | | overlays.push(e.obj); |
| | | |
| | | switch (name) { |
| | | case 'polyline':{//折线图 |
| | | var polyline = e.obj.getPath(); |
| | | getCoordinate(polyline); |
| | | objs.polyline.push(e.obj); |
| | | break; |
| | | } |
| | | case 'polygon':{//多边形 |
| | | var polygon = e.obj.getPath(); |
| | | getCoordinate(polygon); |
| | | objs.polygon.push(e.obj); |
| | | break; |
| | | } |
| | | case 'rectangle':{//矩形 |
| | | var rectangle = e.obj.getPath(); |
| | | getCoordinate(rectangle); |
| | | objs.rectangle.push(e.obj); |
| | | break; |
| | | } |
| | | case 'circle':{//圆形 |
| | | var center = e.obj.getCenter(); |
| | | var radius = e.obj.getRadius(); |
| | | if(radius > 5000){ |
| | | Feng.error("创建电子围栏失败,圆半径不能大于5000米"); |
| | | return; |
| | | } |
| | | coordinate += center.lng + ',' + center.lat + ';' + radius + "_"; |
| | | objs.circle.push(e.obj); |
| | | break; |
| | | } |
| | | } |
| | | }) |
| | | |
| | | |
| | | var district = null; |
| | | var polygons=[]; |
| | | function drawBounds() { |
| | | if(value == ''){ |
| | | value = '北京市'; |
| | | } |
| | | |
| | | //加载行政区划插件 |
| | | if(!district){ |
| | | //实例化DistrictSearch |
| | | var opts = { |
| | | subdistrict: 0, //获取边界不需要返回下级行政区 |
| | | extensions: 'all', //返回行政区边界坐标组等具体信息 |
| | | level: 'district' //查询行政级别为 市 |
| | | }; |
| | | district = new AMap.DistrictSearch(opts); |
| | | } |
| | | //行政区查询 |
| | | district.setLevel(document.getElementById('level').value) |
| | | district.search(value, function(status, result) { |
| | | map.remove(polygons)//清除上次结果 |
| | | polygons = []; |
| | | var bounds = result.districtList[0].boundaries; |
| | | if (bounds) { |
| | | for (var i = 0, l = bounds.length; i < l; i++) { |
| | | //生成行政区划polygon |
| | | var polygon = new AMap.Polygon({ |
| | | strokeWeight: 1, |
| | | path: bounds[i], |
| | | fillOpacity: 0.4, |
| | | fillColor: '#80d8ff', |
| | | strokeColor: '#0091ea' |
| | | }); |
| | | polygons.push(polygon); |
| | | } |
| | | } |
| | | map.add(polygons) |
| | | map.setFitView(polygons);//视口自适应 |
| | | }); |
| | | } |
| | | |
| | | document.getElementById('find').onclick = function () { |
| | | value = document.getElementById('district').value; |
| | | if(value == ''){ |
| | | value = "北京市"; |
| | | } |
| | | drawBounds() |
| | | }; |
| | | document.getElementById('district').onkeydown = function(e) { |
| | | if (e.keyCode === 13) { |
| | | value = document.getElementById('district').value; |
| | | if(value == ''){ |
| | | value = "北京市"; |
| | | } |
| | | drawBounds(); |
| | | return false; |
| | | } |
| | | return true; |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | //处理坐标结果 |
| | | function getCoordinate(arr){ |
| | | var str = ''; |
| | | for(var i = 0; i < arr.length; i++){ |
| | | var lng = arr[i].lng; |
| | | var lat = arr[i].lat; |
| | | str += lng + ',' + lat + ';'; |
| | | } |
| | | coordinate += str.substring(0, str.length - 1) + "_"; |
| | | } |
| | | |
| | | |
| | | function draw(type){ |
| | | switch(type){ |
| | | case 'marker':{ |
| | | mouseTool.marker({ |
| | | //同Marker的Option设置 |
| | | }); |
| | | break; |
| | | } |
| | | case 'polyline':{ |
| | | mouseTool.polyline({ |
| | | strokeColor:'#80d8ff' |
| | | //同Polyline的Option设置 |
| | | }); |
| | | break; |
| | | } |
| | | case 'polygon':{ |
| | | mouseTool.polygon({ |
| | | fillColor:'#00b0ff', |
| | | strokeColor:'#80d8ff' |
| | | //同Polygon的Option设置 |
| | | }); |
| | | break; |
| | | } |
| | | case 'rectangle':{ |
| | | mouseTool.rectangle({ |
| | | fillColor:'#00b0ff', |
| | | strokeColor:'#80d8ff' |
| | | //同Polygon的Option设置 |
| | | }); |
| | | break; |
| | | } |
| | | case 'circle':{ |
| | | mouseTool.circle({ |
| | | fillColor:'#00b0ff', |
| | | strokeColor:'#80d8ff' |
| | | //同Circle的Option设置 |
| | | }); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | var radios = document.getElementsByName('func'); |
| | | for(var i=0;i<radios.length;i+=1){ |
| | | radios[i].onchange = function(e){ |
| | | draw(e.target.value) |
| | | name = e.target.value; |
| | | } |
| | | } |
| | | // draw('marker') |
| | | |
| | | document.getElementById('clear').onclick = function(){ |
| | | map.remove(overlays) |
| | | overlays = []; |
| | | coordinate = ''; |
| | | objs.circle = []; |
| | | objs.rectangle = []; |
| | | objs.polygon = []; |
| | | objs.polyline = []; |
| | | closeEdit(); |
| | | } |
| | | document.getElementById('close').onclick = function(){ |
| | | mouseTool.close()//关闭,并清除覆盖物 |
| | | for(var i=0;i<radios.length;i+=1){ |
| | | radios[i].checked = false; |
| | | } |
| | | closeEdit(); |
| | | } |
| | | |
| | | |
| | | //点击提交处理函数 |
| | | function submitCoordinate(){ |
| | | var name = $('#addressName').val(); |
| | | if('' == name){ |
| | | Feng.error('请填写地址名称'); |
| | | return; |
| | | } |
| | | if('' == coordinate){ |
| | | Feng.error('请在地图上规划区域'); |
| | | return; |
| | | } |
| | | coordinate = coordinate.substring(0, coordinate.length - 1); |
| | | |
| | | } |
| | | |
| | | function editAll() { |
| | | coordinate = ''; |
| | | editors = []; |
| | | //折线 |
| | | for(var i in objs.polyline){ |
| | | var polyline = objs.polyline[i]; |
| | | var polyEditor = new AMap.PolyEditor(map, polyline) |
| | | polyEditor.on('addnode', function(event) { |
| | | // log.info('触发事件:addnode') |
| | | }) |
| | | |
| | | polyEditor.on('adjust', function(event) { |
| | | // log.info('触发事件:adjust') |
| | | }) |
| | | |
| | | polyEditor.on('removenode', function(event) { |
| | | // log.info('触发事件:removenode') |
| | | }) |
| | | |
| | | polyEditor.on('end', function(e) { |
| | | var polyline = e.target.getPath(); |
| | | getCoordinate(polyline); |
| | | }) |
| | | editors.push(polyEditor); |
| | | polyEditor.open(); |
| | | } |
| | | |
| | | //多边形 |
| | | for(var i in objs.polygon){ |
| | | var polygon = objs.polygon[i]; |
| | | var polyEditor = new AMap.PolyEditor(map, polygon) |
| | | |
| | | polyEditor.on('addnode', function(event) { |
| | | // log.info('触发事件:addnode') |
| | | }) |
| | | |
| | | polyEditor.on('adjust', function(event) { |
| | | // log.info('触发事件:adjust') |
| | | }) |
| | | |
| | | polyEditor.on('removenode', function(event) { |
| | | // log.info('触发事件:removenode') |
| | | }) |
| | | |
| | | polyEditor.on('end', function(e) { |
| | | var polygon = e.target.getPath(); |
| | | getCoordinate(polygon); |
| | | }) |
| | | editors.push(polyEditor); |
| | | polyEditor.open(); |
| | | } |
| | | |
| | | |
| | | //矩形 |
| | | for(var i in objs.rectangle){ |
| | | var rectangle = objs.rectangle[i]; |
| | | var rectangleEditor = new AMap.RectangleEditor(map, rectangle) |
| | | |
| | | rectangleEditor.on('adjust', function(event) { |
| | | // log.info('触发事件:adjust') |
| | | }) |
| | | |
| | | rectangleEditor.on('end', function(e) { |
| | | var polygon = e.target.getPath(); |
| | | getCoordinate(polygon); |
| | | }) |
| | | editors.push(rectangleEditor); |
| | | rectangleEditor.open(); |
| | | } |
| | | |
| | | //圆形 |
| | | for(var i in objs.circle){ |
| | | var circle = objs.circle[i]; |
| | | var circleEditor = new AMap.CircleEditor(map, circle) |
| | | |
| | | circleEditor.on('move', function(event) { |
| | | // log.info('触发事件:move') |
| | | }) |
| | | |
| | | circleEditor.on('adjust', function(e) { |
| | | var radius = e.target.getRadius(); |
| | | if(radius > 5000){ |
| | | Feng.error("创建电子围栏失败,圆半径不能大于5000米"); |
| | | return; |
| | | } |
| | | }) |
| | | |
| | | circleEditor.on('end', function(e) { |
| | | var center = e.target.getCenter(); |
| | | var radius = e.target.getRadius(); |
| | | coordinate += center.lng + ',' + center.lat + ';' + radius + "_"; |
| | | }) |
| | | editors.push(circleEditor); |
| | | circleEditor.open(); |
| | | } |
| | | } |
| | | |
| | | |
| | | function closeEdit() { |
| | | for(var i in editors){ |
| | | var editor = editors[i]; |
| | | editor.close(); |
| | | } |
| | | } |
New file |
| | |
| | | /** |
| | | * 跨城站点管理管理初始化 |
| | | */ |
| | | var TSite = { |
| | | id: "TSiteTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TSite.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键ID', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '类型名称', field: 'name', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TSite.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TSite.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | TSite.oneChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/onChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | TSite.del = function () { |
| | | if (this.check()) { |
| | | let id = this.seItem.id |
| | | var operation = function(){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tSiteType/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TSite.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",id); |
| | | ajax.start(); |
| | | } |
| | | Feng.confirm("确认删除该信息?", operation); |
| | | } |
| | | |
| | | }; |
| | | /** |
| | | * 点击添加跨城站点管理 |
| | | */ |
| | | TSite.openAddTSite = function () { |
| | | var index = layer.load(1,{ |
| | | type: 1 |
| | | , title: '添加场地类型' |
| | | , area: ['50%', '50%'] |
| | | , offset: 'auto' //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset |
| | | , id: 'layerDemo' //防止重复弹出cge |
| | | , content: '<div class="form-horizontal">' + |
| | | ' <div class="col-sm-11" >' + |
| | | ' <div class="col-sm-11">' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">类型名称:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <input class="form-control" type="text" id="name"> '+ |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' </div>' + |
| | | '</div>' |
| | | , btn: ['关闭', '保存'] |
| | | , btnAlign: 'c' //按钮居中 |
| | | , shade: 0.5 //不显示遮罩 |
| | | ,load:1 |
| | | , yes: function () { |
| | | layer.closeAll(); |
| | | }, |
| | | btn2:function () { |
| | | let name = $("#name").val() |
| | | if(name==''){ |
| | | Feng.info("请输入类型名称") |
| | | return false; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/tSiteType/add", function (data) { |
| | | if(data=="5001"){ |
| | | Feng.info("该场地名称已经存在") |
| | | return false; |
| | | }else |
| | | if (data.code == 200) { |
| | | Feng.success("操作成功!"); |
| | | window.location.reload(); |
| | | window.parent.layer.closeAll(); |
| | | } else if(data=="repeat"){ |
| | | window.location.reload(); |
| | | window.parent.layer.closeAll(); |
| | | Feng.error("请勿重复操作"); |
| | | }else { |
| | | return Feng.error(data.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("操作失败!") |
| | | window.location.reload(); |
| | | window.parent.layer.closeAll(); |
| | | return Feng.error("操作失败!"); |
| | | }); |
| | | ajax.set("name", name); |
| | | ajax.start(); |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 打开查看跨城站点管理详情 |
| | | */ |
| | | TSite.openTSiteDetail = function () { |
| | | |
| | | if (this.check()) { |
| | | let id = TSite.seItem.id |
| | | |
| | | let name = TSite.seItem.name |
| | | var index = layer.load(1,{ |
| | | type: 1 |
| | | , title: '编辑场地类型' |
| | | , area: ['50%', '50%'] |
| | | , offset: 'auto' //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset |
| | | , id: 'layerDemo' //防止重复弹出cge |
| | | , content: '<div class="form-horizontal">' + |
| | | ' <div class="col-sm-11" >' + |
| | | ' <div class="col-sm-11">' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">类型名称:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <input class="form-control" type="text" id="name" value='+name+'> '+ |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' </div>' + |
| | | '</div>' |
| | | , btn: ['关闭', '保存'] |
| | | , btnAlign: 'c' //按钮居中 |
| | | , shade: 0.5 //不显示遮罩 |
| | | ,load:1 |
| | | , yes: function () { |
| | | layer.closeAll(); |
| | | }, |
| | | btn2:function () { |
| | | let name = $("#name").val() |
| | | if(name==''){ |
| | | Feng.info("请输入类型名称") |
| | | return false; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/tSiteType/update", function (data) { |
| | | if(data=="5001"){ |
| | | Feng.info("该场地名称已经存在") |
| | | return false; |
| | | }else |
| | | if (data.code == 200) { |
| | | Feng.success("操作成功!"); |
| | | window.location.reload(); |
| | | window.parent.layer.closeAll(); |
| | | } else if(data=="repeat"){ |
| | | window.location.reload(); |
| | | window.parent.layer.closeAll(); |
| | | Feng.error("请勿重复操作"); |
| | | }else { |
| | | return Feng.error(data.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("操作失败!") |
| | | window.location.reload(); |
| | | window.parent.layer.closeAll(); |
| | | return Feng.error("操作失败!"); |
| | | }); |
| | | ajax.set("name", name); |
| | | ajax.set("id", id); |
| | | ajax.start(); |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 操作跨城站点管理 |
| | | */ |
| | | TSite.opt = function (type) { |
| | | if (this.check()) { |
| | | var name = TSite.seItem.name; |
| | | if (name == "" || name == null || name == undefined) { |
| | | name = "该站点"; |
| | | } else { |
| | | name = "【" + name + "】"; |
| | | } |
| | | var str = ""; |
| | | var text = "请谨慎操作!"; |
| | | var title = "请谨慎操作!"; |
| | | if (1 == type){ |
| | | str = "删除"; |
| | | title = "您是否确认删除"+name+"?"; |
| | | text = "请谨慎操作,删除后数据无法恢复!"; |
| | | } else if (2 == type){ |
| | | str = "冻结"; |
| | | title = "您是否确认冻结"+name+"?"; |
| | | } else if (3 == type){ |
| | | str = "解冻"; |
| | | title = "您是否确认解冻"+name+"?"; |
| | | } |
| | | if (1 == type){ |
| | | if (TSite.seItem.lineNum != "" && TSite.seItem.lineNum != null && TSite.seItem.lineNum > 0) { |
| | | swal("删除失败", "该站点还有关联线路!", "warning"); |
| | | return; |
| | | } |
| | | } |
| | | if(2 == type){ |
| | | if (TSite.seItem.state != 1) { |
| | | swal("冻结失败", "【正常】状态下才能执行此操作!", "warning"); |
| | | return; |
| | | } |
| | | } |
| | | if (3 == type){ |
| | | if (TSite.seItem.state != 2){ |
| | | swal("解冻失败", "【冻结】状态下才能执行此操作!", "warning"); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | swal({ |
| | | title: title, |
| | | text: text, |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: str, |
| | | closeOnConfirm: true |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tSite/opt", function (data) { |
| | | swal(str+"成功", "您已经"+str+"了" + name + "。", "success"); |
| | | TSite.table.refresh(); |
| | | }, function (data) { |
| | | swal(str+"失败", data.responseJSON.message + "!", "warning"); |
| | | }); |
| | | ajax.set("tSiteId",TSite.seItem.id); |
| | | ajax.set("optType", type); |
| | | ajax.start(); |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询跨城站点管理列表 |
| | | */ |
| | | TSite.search = function () { |
| | | var queryData = {}; |
| | | queryData['insertTime'] = $("#insertTime").val(); |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['insertUser'] = $("#insertUser").val(); |
| | | queryData['city'] = $("#city").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | TSite.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TSite.resetSearch = function () { |
| | | $("#insertTime").val(""); |
| | | $("#name").val(""); |
| | | $("#insertUser").val(""); |
| | | $("#city").val(""); |
| | | $("#state").val(""); |
| | | TSite.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TSite.initColumn(); |
| | | var table = new BSTable(TSite.id, "/tSiteType/list", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | TSite.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化跨城站点管理详情对话框 |
| | | */ |
| | | var TSiteInfoDlg = { |
| | | tSiteInfoData : {}, |
| | | validateFields: { |
| | | name: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '站点名称不能为空' |
| | | } |
| | | } |
| | | }, |
| | | provinceCode: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '请选择站点所属省' |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 验证数据是否为空 |
| | | */ |
| | | TSiteInfoDlg.validate = function () { |
| | | $('#siteInfoForm').data("bootstrapValidator").resetForm(); |
| | | $('#siteInfoForm').bootstrapValidator('validate'); |
| | | return $("#siteInfoForm").data('bootstrapValidator').isValid(); |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TSiteInfoDlg.clearData = function() { |
| | | this.tSiteInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TSiteInfoDlg.set = function(key, val) { |
| | | this.tSiteInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TSiteInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TSiteInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TSite.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TSiteInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('name') |
| | | .set('province') |
| | | .set('provinceCode') |
| | | .set('city') |
| | | .set('cityCode') |
| | | .set('district') |
| | | .set('districtCode') |
| | | .set('state') |
| | | .set('insertTime') |
| | | .set('insertUserId'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TSiteInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | var name = $("#name").val(); |
| | | var provinceCode = $("#provinceCode").val(); |
| | | var cityCode = $("#cityCode").val(); |
| | | var districtCode = $("#districtCode").val(); |
| | | if ("" == provinceCode){ |
| | | Feng.error("请选择所属城市"); |
| | | return; |
| | | } |
| | | var subArr=[]; |
| | | $(".areaValueClass").each(function () { |
| | | subArr.push({ |
| | | id:$(this).find("input[name*='id']").val(), |
| | | areaType:$(this).find("input[name*='areaType1']").val(), |
| | | time:$(this).find("input[name*='time']").val(), |
| | | name:$(this).find("input[name*='name']").val(), |
| | | province:$(this).find("input[name*='province1']").val(), |
| | | provinceCode:$(this).find("input[name*='provinceCode1']").val(), |
| | | city:$(this).find("input[name*='city1']").val(), |
| | | cityCode:$(this).find("input[name*='cityCode1']").val(), |
| | | district:$(this).find("input[name*='district1']").val(), |
| | | districtCode:$(this).find("input[name*='districtCode1']").val(), |
| | | coordinate:$(this).find("input[name*='coordinate1']").val(), |
| | | }) |
| | | }); |
| | | if(subArr.length <= 0){ |
| | | Feng.error("请至少填写一条站点区域"); |
| | | return; |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tSite/add", function(data){ |
| | | if(data.status == 200){ |
| | | Feng.success("添加成功!"); |
| | | window.parent.TSite.table.refresh(); |
| | | TSiteInfoDlg.close(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("name",name); |
| | | ajax.set("provinceCode",provinceCode); |
| | | ajax.set("province",$("#provinceCode option:selected").text()); |
| | | if ("" != cityCode && null != cityCode && undefined != cityCode){ |
| | | ajax.set("cityCode",cityCode); |
| | | ajax.set("city",$("#cityCode option:selected").text()); |
| | | } |
| | | if ("" != districtCode && null != districtCode && undefined != districtCode){ |
| | | ajax.set("districtCode",$("#districtCode").val()); |
| | | ajax.set("district",$("#districtCode option:selected").text()); |
| | | } |
| | | ajax.set("subArr",JSON.stringify(subArr)); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TSiteInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | var name = $("#name").val(); |
| | | var provinceCode = $("#provinceCode").val(); |
| | | var cityCode = $("#cityCode").val(); |
| | | var districtCode = $("#districtCode").val(); |
| | | if ("" == provinceCode){ |
| | | Feng.error("请选择所属城市"); |
| | | return; |
| | | } |
| | | var subArr=[]; |
| | | $(".areaValueClass").each(function () { |
| | | subArr.push({ |
| | | id:$(this).find("input[name*='id']").val(), |
| | | areaType:$(this).find("input[name*='areaType1']").val(), |
| | | time:$(this).find("input[name*='time']").val(), |
| | | name:$(this).find("input[name*='name']").val(), |
| | | province:$(this).find("input[name*='province1']").val(), |
| | | provinceCode:$(this).find("input[name*='provinceCode1']").val(), |
| | | city:$(this).find("input[name*='city1']").val(), |
| | | cityCode:$(this).find("input[name*='cityCode1']").val(), |
| | | district:$(this).find("input[name*='district1']").val(), |
| | | districtCode:$(this).find("input[name*='districtCode1']").val(), |
| | | coordinate:$(this).find("input[name*='coordinate1']").val(), |
| | | }) |
| | | }); |
| | | if(subArr.length <= 0){ |
| | | Feng.error("请至少填写一条站点区域"); |
| | | return; |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tSite/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | | window.parent.TSite.table.refresh(); |
| | | TSiteInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.set("name",name); |
| | | ajax.set("provinceCode",provinceCode); |
| | | ajax.set("province",$("#provinceCode option:selected").text()); |
| | | if ("" != cityCode && null != cityCode && undefined != cityCode){ |
| | | ajax.set("cityCode",cityCode); |
| | | ajax.set("city",$("#cityCode option:selected").text()); |
| | | } |
| | | if ("" != districtCode && null != districtCode && undefined != districtCode){ |
| | | ajax.set("districtCode",$("#districtCode").val()); |
| | | ajax.set("district",$("#districtCode option:selected").text()); |
| | | } |
| | | ajax.set("subArr",JSON.stringify(subArr)); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | Feng.initValidator("siteInfoForm", TSiteInfoDlg.validateFields); |
| | | }); |
| | | |
| | | |
| | | //省改变 |
| | | TSiteInfoDlg.provinceChange = function (e) { |
| | | var provinceCode=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompany/change", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Please select a city</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih Kota</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cityCode").empty().append(content); |
| | | $("#districtCode").empty().append('<option value="">选择区</option>'); |
| | | } |
| | | }); |
| | | ajax.set("code",provinceCode); |
| | | ajax.start(); |
| | | } |
| | | //市改变 |
| | | TSiteInfoDlg.cityChange = function (e) { |
| | | var cityCode=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompany/change", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择区</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Please select a city</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih Kota</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#districtCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("code",cityCode); |
| | | ajax.start(); |
| | | } |
| | | /** |
| | | * 类型改变执行 |
| | | * @param e |
| | | */ |
| | | TSiteInfoDlg.areaTypeClick = function (e) { |
| | | if (1 == e){//行政区域 |
| | | $("#areaType1Div").show(); |
| | | $("#areaType2Div").hide(); |
| | | } else if (2 == e){ |
| | | $("#areaType2Div").show(); |
| | | $("#areaType1Div").hide(); |
| | | } |
| | | } |
| | | |
| | | //站点区域省改变 |
| | | TSiteInfoDlg.provinceChange1 = function (e) { |
| | | var provinceCode=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompany/change", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Please select a city</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih Kota</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cityCode1").empty().append(content); |
| | | $("#districtCode1").empty().append('<option value="">选择区</option>'); |
| | | } |
| | | }); |
| | | ajax.set("code",provinceCode); |
| | | ajax.start(); |
| | | } |
| | | //站点区域市改变 |
| | | TSiteInfoDlg.cityChange1 = function (e) { |
| | | var cityCode=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompany/change", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择区</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Please select a city</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih Kota</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#districtCode1").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("code",cityCode); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 添加区域 |
| | | */ |
| | | TSiteInfoDlg.addArea = function () { |
| | | var areaName = $("#areaName").val(); |
| | | if ("" == areaName || null == areaName){ |
| | | Feng.error("区域名称不能为空"); |
| | | return; |
| | | } |
| | | var areaType = $("input[name='areaType']:checked").val(); |
| | | var b = false; |
| | | $(".areaValueClass").each(function () { |
| | | var areaType1 = $(this).find("input[name*='areaType1']").val(); |
| | | if(areaType != areaType1){ |
| | | b = true; |
| | | return |
| | | } |
| | | }); |
| | | if(b){ |
| | | Feng.error("电子围栏和行政区域不能混合使用"); |
| | | return; |
| | | } |
| | | |
| | | if (1 == areaType){ |
| | | var provinceCode1 = $("#provinceCode1").val(); |
| | | var province1 = $("#provinceCode1 option:selected").text(); |
| | | var cityCode1 = $("#cityCode1").val(); |
| | | var city1 = $("#cityCode1 option:selected").text(); |
| | | var districtCode1 = $("#districtCode1").val(); |
| | | var district1 = $("#districtCode1 option:selected").text(); |
| | | if ("" == provinceCode1){ |
| | | Feng.error("请选择行政区域所属省"); |
| | | return; |
| | | } |
| | | }else if (2 == areaType) { |
| | | if("" == coordinate){ |
| | | Feng.error('请在地图上规划区域'); |
| | | return; |
| | | } |
| | | } |
| | | var subArr=[]; |
| | | $(".areaValueClass").each(function () { |
| | | subArr.push({ |
| | | areaType:$(this).find("input[name*='areaType1']").val(), |
| | | time:$(this).find("input[name*='time']").val(), |
| | | name:$(this).find("input[name*='name']").val(), |
| | | province:$(this).find("input[name*='province1']").val(), |
| | | provinceCode:$(this).find("input[name*='provinceCode1']").val(), |
| | | city:$(this).find("input[name*='city1']").val(), |
| | | cityCode:$(this).find("input[name*='cityCode1']").val(), |
| | | district:$(this).find("input[name*='district1']").val(), |
| | | districtCode:$(this).find("input[name*='districtCode1']").val(), |
| | | coordinate:$(this).find("input[name*='coordinate1']").val(), |
| | | }) |
| | | }); |
| | | var str = '<tr class="areaValueClass">' + |
| | | // '<td>' + (subArr.length+1) + '</td>' + |
| | | '<td style="text-align: center;">' + |
| | | '<input type="hidden" id="areaType1" name="areaType1" value="'+areaType+'">' + |
| | | '<input type="hidden" id="time" name="time" value="'+getNowFormatDate()+'">' + getNowFormatDate() + '</td>' + |
| | | |
| | | '<td style="text-align: center;">' + |
| | | '<input type="hidden" id="name" name="name" value="'+areaName+'">' + |
| | | '<input type="hidden" id="provinceCode1" name="provinceCode1" value="'+provinceCode1+'">' + |
| | | '<input type="hidden" id="province1" name="province1" value="'+province1+'">' + |
| | | '<input type="hidden" id="cityCode1" name="cityCode1" value="'+cityCode1+'">' + |
| | | '<input type="hidden" id="city1" name="city1" value="'+city1+'">' + |
| | | '<input type="hidden" id="districtCode1" name="districtCode1" value="'+districtCode1+'">' + |
| | | '<input type="hidden" id="district1" name="district1" value="'+district1+'">' + |
| | | '<input type="hidden" id="coordinate1" name="coordinate1" value="'+coordinate+'">' + areaName + '</td>' + |
| | | |
| | | '<td style="text-align: center;"><button onclick="deleteSub(this)">移除</button></td></tr>'; |
| | | $("#areaValue").append(str); |
| | | |
| | | //清除电子围栏数据 |
| | | $("#clear").click(); |
| | | } |
| | | //删除数据 |
| | | function deleteSub(e) { |
| | | $(e).parent().parent().remove(); |
| | | } |