| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.PrintWriter; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | @PostMapping("/base/appUser/getAllUser") |
| | | @ResponseBody |
| | | public List<TAppUser> getAllUser(){ |
| | | try { |
| | | return appUserService.list(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return new ArrayList<>(); |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.dsh.competition.entity.Participant; |
| | | import com.dsh.competition.entity.PaymentCompetition; |
| | | import com.dsh.competition.entity.UserCompetition; |
| | | import com.dsh.competition.feignclient.account.AppUserClient; |
| | | import com.dsh.competition.feignclient.account.model.AppUser; |
| | | import com.dsh.competition.feignclient.model.*; |
| | | import com.dsh.competition.model.CompetitionInfo; |
| | | import com.dsh.competition.model.CompetitionListVo; |
| | |
| | | |
| | | @Autowired |
| | | private IParticipantService participantService; |
| | | |
| | | @Autowired |
| | | private AppUserClient appUserClient; |
| | | |
| | | |
| | | @PostMapping("/base/competition/getPayedCompetitions") |
| | |
| | | |
| | | |
| | | @PostMapping("/base/competition/queryById") |
| | | public Competition queryById(Integer id){ |
| | | public Competition queryById(@RequestBody Integer id){ |
| | | try { |
| | | return cttService.getById(id); |
| | | }catch (Exception e){ |
| | |
| | | wrapper.lt(Competition::getEndTime,listQuery.getTime().split(" - ")[1]+" 23:59:59"); |
| | | } |
| | | if(ToolUtil.isNotEmpty(listQuery.getState())){ |
| | | wrapper.eq(Competition::getState,listQuery.getState()); |
| | | wrapper.eq(Competition::getStatus,listQuery.getState()); |
| | | } |
| | | if(ToolUtil.isNotEmpty(listQuery.getRegisterCondition())){ |
| | | wrapper.eq(Competition::getRegisterCondition,listQuery.getRegisterCondition()); |
| | | } |
| | | wrapper.in(Competition::getStoreId,listQuery.getIds()); |
| | | wrapper.eq(Competition::getAuditStatus,2); |
| | | wrapper.orderByDesc(Competition::getInsertTime); |
| | | |
| | | Page<Competition> page = cttService.page(competitionPage, wrapper); |
| | | return page; |
| | | }catch (Exception e){ |
| | |
| | | @PostMapping("/base/competition/add") |
| | | public void add(@RequestBody Competition competition){ |
| | | try { |
| | | competition.setInsertTime(new Date()); |
| | | cttService.save(competition); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | } |
| | | |
| | | |
| | | // @PostMapping("/base/competition/getPeopleFromId") |
| | | // public Page<Participant> getPeopleFromId(@RequestBody GetPeopleQuery getPeopleQuery){ |
| | | // try { |
| | | // Page<Participant> participantPage = new Page<>(); |
| | | // LambdaQueryWrapper<Participant> participantLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | // if(getPeopleQuery.getState()!=null){ |
| | | // participantLambdaQueryWrapper.eq(Participant::getState) |
| | | // } |
| | | // participantService.page() |
| | | // }catch (Exception e){ |
| | | // return null; |
| | | // } |
| | | // } |
| | | @PostMapping("/base/competition/getPeopleFromId") |
| | | public Page<CompetitionUser> getPeopleFromId(@RequestBody GetPeopleQuery getPeopleQuery){ |
| | | try { |
| | | Page<UserCompetition> participantPage = new Page<>(getPeopleQuery.getOffset(),getPeopleQuery.getLimit()); |
| | | Page<CompetitionUser> page = participantService.getPeopleFromId(participantPage,getPeopleQuery.getId(),getPeopleQuery.getState()); |
| | | return page; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | * 报名结束时间 |
| | | */ |
| | | @TableField("registerEndTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date registerEndTime; |
| | | /** |
| | | * 报名条件(1=全部用户,2=仅限年度会员参与,3=仅限学员参与) |
| | |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/6/29 14:09 |
| | |
| | | */ |
| | | @PostMapping("/base/appUser/updateAppUser") |
| | | void updateAppUser(AppUser appUser); |
| | | |
| | | @PostMapping("/base/appUser/getAllUser") |
| | | List<AppUser> getAllUser(); |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.competition.feignclient.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class CompetitionUser { |
| | | private String name; |
| | | |
| | | private Integer sex; |
| | | |
| | | private String phone; |
| | | private String idCard; |
| | | private Integer state; |
| | | } |
| | |
| | | package com.dsh.competition.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.competition.entity.Participant; |
| | | import com.dsh.competition.entity.UserCompetition; |
| | | import com.dsh.competition.feignclient.model.CompetitionUser; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/7/6 16:51 |
| | | */ |
| | | public interface ParticipantMapper extends BaseMapper<Participant> { |
| | | Page<CompetitionUser> getPeopleFromId(@Param("participantPage") Page<UserCompetition> participantPage, @Param("id") Integer id, @Param("state") Integer state); |
| | | } |
| | |
| | | package com.dsh.competition.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.competition.entity.Participant; |
| | | import com.dsh.competition.entity.UserCompetition; |
| | | import com.dsh.competition.feignclient.model.CompetitionUser; |
| | | import com.dsh.competition.model.AddParticipant; |
| | | import com.dsh.competition.model.EditParticipant; |
| | | import com.dsh.competition.model.ParticipantVo; |
| | |
| | | * @throws Exception |
| | | */ |
| | | void saveParticipant(SaveParticipant saveParticipant) throws Exception; |
| | | |
| | | Page<CompetitionUser> getPeopleFromId(Page<UserCompetition> participantPage, Integer id, Integer state); |
| | | } |
| | |
| | | package com.dsh.competition.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.competition.entity.Participant; |
| | | import com.dsh.competition.entity.UserCompetition; |
| | | import com.dsh.competition.feignclient.account.StudentClient; |
| | | import com.dsh.competition.feignclient.account.model.Student; |
| | | import com.dsh.competition.feignclient.course.CoursePackagePaymentClient; |
| | | import com.dsh.competition.feignclient.model.CompetitionUser; |
| | | import com.dsh.competition.mapper.ParticipantMapper; |
| | | import com.dsh.competition.model.AddParticipant; |
| | | import com.dsh.competition.model.EditParticipant; |
| | |
| | | this.save(one); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Page<CompetitionUser> getPeopleFromId(Page<UserCompetition> participantPage, Integer id, Integer state) { |
| | | return this.baseMapper.getPeopleFromId(participantPage,id,state); |
| | | } |
| | | } |
| | |
| | | <?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.competition.mapper.ParticipantMapper"> |
| | | <select id="getPeopleFromId" resultType="com.dsh.competition.feignclient.model.CompetitionUser"> |
| | | select t2.name,t2.gender sex,t2.phone ,t2.idcard idCard ,t3.payStatus state from t_user_competition t1 left join t_participant t2 on t1.participantId = t2.id left join t_payment_competition t3 on t1.paymentCompetitionId = t3.id |
| | | where t1.competitionId =#{id} and t2.id is not null and t3.id is not null |
| | | <if test="state !=null and state !='' and state ==1"> |
| | | and t3.payStatus in (1,2) |
| | | </if> |
| | | <if test="state !=null and state !='' and state ==3"> |
| | | and t3.payStatus =3 |
| | | </if> |
| | | |
| | | |
| | | |
| | | </select> |
| | | </mapper> |
| | |
| | | package com.dsh.course.feignClient.competition; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.competition.model.Competition; |
| | | import com.dsh.course.feignClient.competition.model.GetPeopleQuery; |
| | | import com.dsh.course.feignClient.competition.model.ListQuery; |
| | | import com.dsh.course.feignClient.competition.model.Participant; |
| | | import com.dsh.course.feignClient.competition.model.*; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | @PostMapping("/base/competition/cancel") |
| | | void cancel(Integer id); |
| | | @PostMapping("/base/competition/getPeopleFromId") |
| | | Page<Participant> getPeopleFromId(GetPeopleQuery getPeopleQuery); |
| | | Page<CompetitionUser> getPeopleFromId(GetPeopleQuery getPeopleQuery); |
| | | |
| | | @PostMapping("/base/competition/listUser") |
| | | Page<CompetitionUser> listUser(CompetitionUserQuery competitionUserQuery); |
| | | } |
| | | |
| | | |
| | |
| | | * 报名结束时间 |
| | | */ |
| | | @TableField("registerEndTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date registerEndTime; |
| | | /** |
| | | * 报名条件(1=全部用户,2=仅限年度会员参与,3=仅限学员参与) |
| | |
| | | |
| | | @TableField(exist = false) |
| | | private String storeName; |
| | | @TableField(exist = false) |
| | | private String sTime; |
| | | @TableField(exist = false) |
| | | private String eTime; |
| | | @TableField(exist = false) |
| | | private String rEndTime; |
| | | |
| | | |
| | | |
| | | @Override |
New file |
| | |
| | | package com.dsh.course.feignClient.competition.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class CompetitionUser { |
| | | private String name; |
| | | |
| | | private Integer sex; |
| | | |
| | | private String phone; |
| | | private String idCard; |
| | | private Integer state; |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.competition.model; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class CompetitionUserQuery { |
| | | private Integer id; |
| | | private Integer state; |
| | | } |
| | |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | |
| | | 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.feignClient.competition.model.Competition; |
| | | import com.dsh.course.feignClient.competition.model.GetPeopleQuery; |
| | | import com.dsh.course.feignClient.competition.model.ListQuery; |
| | | import com.dsh.course.feignClient.competition.model.Participant; |
| | | import com.dsh.course.feignClient.competition.model.*; |
| | | import com.dsh.course.mapper.UserMapper; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.core.base.tips.SuccessTip; |
| | |
| | | public Object getPeopleFromId(Integer id,Integer state) { |
| | | try { |
| | | Page<Object> page = new PageFactory<>().defaultPage(); |
| | | Page<Participant> data = competitionClient.getPeopleFromId(new GetPeopleQuery(page.getSize(),page.getCurrent(),id,state)); |
| | | Page<CompetitionUser> data = competitionClient.getPeopleFromId(new GetPeopleQuery(page.getSize(),page.getCurrent(),id,state)); |
| | | return super.packForBT(data); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | 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.GetPeopleQuery; |
| | | import com.dsh.course.feignClient.competition.model.ListQuery; |
| | | import com.dsh.course.feignClient.competition.model.Participant; |
| | | import com.dsh.course.feignClient.competition.model.*; |
| | | 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.support.HttpKit; |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.TCity; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.*; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | 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"; |
| | | } |
| | | |
| | |
| | | public String tCarUpdate(@PathVariable Integer id, Model model) { |
| | | Competition competition = competitionClient.queryById(id); |
| | | model.addAttribute("item",competition); |
| | | return PREFIX + "tCompetition_edit.html"; |
| | | 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",1); |
| | | 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 = "/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 SUCCESS_TIP; |
| | | 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 SUCCESS_TIP; |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | |
| | | public Object getPeopleFromId(Integer id,Integer state) { |
| | | try { |
| | | Page<Object> page = new PageFactory<>().defaultPage(); |
| | | Page<Participant> data = competitionClient.getPeopleFromId(new GetPeopleQuery(page.getSize(),page.getCurrent(),id,state)); |
| | | 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 = "/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; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | 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.feignClient.competition.model.Competition; |
| | | import com.dsh.course.feignClient.competition.model.GetPeopleQuery; |
| | | import com.dsh.course.feignClient.competition.model.Participant; |
| | | import com.dsh.course.mapper.StoreConfigMapper; |
| | | import com.dsh.course.mapper.UserMapper; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/getPeopleFromId") |
| | | public Object getPeopleFromId(Integer id,Integer state) { |
| | | try { |
| | | Page<Object> page = new PageFactory<>().defaultPage(); |
| | | Page<Participant> data = competitionClient.getPeopleFromId(new GetPeopleQuery(page.getSize(),page.getCurrent(),id,state)); |
| | | return super.packForBT(data); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | <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="门店名称" /> |
| | |
| | | <#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.delete()" space="true"/> |
| | | <#button name="查看详情" icon="fa-remove" clickFun="TCompetition.delete()" space="true"/> |
| | | <#button name="已报名人员" icon="fa-remove" clickFun="TCompetition.delete()" space="true"/> |
| | | <#button name="查看详情" icon="fa-remove" clickFun="TCompetition.info()" space="true"/> |
| | | <#button name="已报名人员" icon="fa-remove" clickFun="TCompetition.user()" space="true"/> |
| | | |
| | | </div> |
| | | <#table id="TCompetitionTable"/> |
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> |
| | | @} |
| | |
| | | @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-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">举办省:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="pCode" name="pCode"> |
| | | <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"> |
| | | <select class="form-control" id="cCode" name="cCode" onchange="TCarInfoDlg.oneChangeNext(this)"> |
| | | <option value="">选择市</option> |
| | | </select> |
| | | </div> |
| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">支付方式:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="checkbox"> 现金支付 |
| | | <input type="checkbox"> 玩湃币支付 |
| | | <input type="checkbox"> 课时支付 |
| | | <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"> |
| | | <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"> |
| | | <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"> |
| | | <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 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"> |
| | | <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"> |
| | | <textarea id="introduction"></textarea> |
| | | <textarea id="introduction" style="height: 203px; width: 506px;"></textarea> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tCompetition/tCompetition_info.js"></script> |
| | | <script> |
| | | |
| | | |
| | | laydate.render({ |
| | | elem: '#annualInspectionTime' |
| | | ,lang:"en" |
| | | elem: '#startTime' |
| | | ,type:"datetime" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#commercialInsuranceTime' |
| | | ,lang:"en" |
| | | elem: '#endTime' |
| | | ,type:"datetime" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#certifyDateA' |
| | | ,lang:"en" |
| | | elem: '#registerEndTime' |
| | | ,type:"datetime" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#transDateStart' |
| | | ,lang:"en" |
| | | ,type:"datetime" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#transDateStop' |
| | | ,lang:"en" |
| | | ,type:"datetime" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#certifyDateB' |
| | |
| | | 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> |
| | | @} |
| | |
| | | @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 type="hidden" id="id" name="id" value="${item.id}"> |
| | | |
| | | <input type="hidden" id="roleType" name="roleType" value="${roleType}"> |
| | | @if(language==1){ |
| | | <div class="row"> |
| | | <div class="col-sm-11"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">所属机构:</label> |
| | | <div class="col-sm-9" style="display: flex;align-items: center;"> |
| | | @if(roleType == 1){ |
| | | <div class="radio radio-info radio-inline"> |
| | | <input type="radio" id="companyType1" value="1" name="companyType" ${1 == companyType ? 'checked=checked' : ''} onclick="TCarInfoDlg.companyTypeClick(1)"> |
| | | <label for="companyType1"> 平台车辆 </label> |
| | | </div> |
| | | <div class="radio radio-success radio-inline"> |
| | | <input type="radio" id="companyTyp2" value="2" name="companyType" ${2 == companyType ? 'checked=checked' : ''} onclick="TCarInfoDlg.companyTypeClick(2)"> |
| | | <label for="companyTyp2"> 加盟车辆 </label> |
| | | </div> |
| | | <select class="form-control companyDiv" id="oneId" onchange="TCarInfoDlg.oneChange(this)" style="width: 200px"> |
| | | <option value="">选择所属分公司</option> |
| | | @for(obj in companyList!){ |
| | | <option value="${obj.id}" ${obj.id == item.companyId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | <select class="form-control companyDiv" id="twoId" style="width: 200px;margin-left: 30px;"> |
| | | <option value="">选择所属加盟商</option> |
| | | @for(obj in franchiseeList!){ |
| | | <option value="${obj.id}" ${obj.id == item.franchiseeId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | @}else if(roleType == 2){ |
| | | <span class="control-label">${objectName!}</span> |
| | | <select class="form-control" id="franchiseeId" style="width: 200px;margin-left: 30px;"> |
| | | <option value="">选择所属加盟商</option> |
| | | @for(obj in franchiseeList!){ |
| | | <option value="${obj.id}" ${obj.id == item.franchiseeId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | @}else if(roleType == 3){ |
| | | <span class="control-label">${objectName!}</span> |
| | | @} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <fieldset> |
| | | <label class="col-sm-3 control-label">服务模式:</label> |
| | | <div class="col-sm-9"> |
| | | <div class="checkbox checkbox-success checkbox-inline"> |
| | | <input type="checkbox" name="serverBox" id="serverBox1" value="1" ${2 == one ? 'checked=checked' : ''} onclick="TCarInfoDlg.zcServerClick()"> |
| | | <label for="serverBox1"> 摩托车 </label> |
| | | </div> |
| | | <div class="checkbox checkbox-success checkbox-inline"> |
| | | <input type="checkbox" name="serverBox" id="serverBox4" value="4" ${2 == four ? 'checked=checked' : ''}> |
| | | <label for="serverBox4"> 同城快送 </label> |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | <div class="form-group" id="zcModelDiv"> |
| | | <label class="col-sm-3 control-label">摩托车车型:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="zcModel" name="zcModel"> |
| | | <option value="">选择车型</option> |
| | | @for(obj in zcModelList){ |
| | | <option value="${obj.id}" ${obj.id == zcModel ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#select id="carBrandId" name="车辆品牌:" onchange="TCarInfoDlg.brandChange(this)"> |
| | | <option value="">选择车辆品牌</option> |
| | | @for(obj in brandList){ |
| | | <option value="${obj.id}" ${obj.id == item.carBrandId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </#select> |
| | | <#select id="carModelId" name="车辆类型:"> |
| | | <option value="">选择车辆类型</option> |
| | | @for(obj in modelList){ |
| | | <option value="${obj.id}" ${obj.id == item.carModelId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </#select> |
| | | <#select id="carColor" name="车辆颜色:"> |
| | | <option value="">选择车辆颜色</option> |
| | | <option value="1" ${'1' == item.carColor ? 'selected=selected' : ''}>黑色</option> |
| | | <option value="2" ${'2' == item.carColor ? 'selected=selected' : ''}>银色</option> |
| | | <option value="3" ${'3' == item.carColor ? 'selected=selected' : ''}>白色</option> |
| | | <option value="4" ${'4' == item.carColor ? 'selected=selected' : ''}>红色</option> |
| | | <option value="5" ${'5' == item.carColor ? 'selected=selected' : ''}>黄色</option> |
| | | <option value="6" ${'6' == item.carColor ? 'selected=selected' : ''}>橙色</option> |
| | | <option value="7" ${'7' == item.carColor ? 'selected=selected' : ''}>蓝色</option> |
| | | </#select> |
| | | <#input id="carLicensePlate" name="车牌号" value="${item.carLicensePlate}"/> |
| | | <#avatar id="carPhoto" name="车辆照片:" avatarImg="${item.carPhoto}"/> |
| | | <#input id="drivingLicenseNumber" name="行驶证编号" value="${item.drivingLicenseNumber}"/> |
| | | <#avatar id="drivingLicensePhoto" name="行驶证照片:" avatarImg="${item.drivingLicensePhoto}"/> |
| | | <#input id="annualInspectionTime" name="年检到期时间" type="text" value="${item.annualInspectionTime}"/> |
| | | <#input id="commercialInsuranceTime" name="商业保险到期时间" type="text" value="${item.commercialInsuranceTime}"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(language==2){ |
| | | <div class="row"> |
| | | <div class="col-sm-11"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">Affiliated organization:</label> |
| | | <div class="col-sm-9" style="display: flex;align-items: center;"> |
| | | @if(roleType == 1){ |
| | | <div class="radio radio-info radio-inline"> |
| | | <input type="radio" id="companyType1" value="1" name="companyType" ${1 == companyType ? 'checked=checked' : ''} onclick="TCarInfoDlg.companyTypeClick(1)"> |
| | | <label for="companyType1"> Platform vehicle </label> |
| | | </div> |
| | | <div class="radio radio-success radio-inline"> |
| | | <input type="radio" id="companyTyp2" value="2" name="companyType" ${2 == companyType ? 'checked=checked' : ''} onclick="TCarInfoDlg.companyTypeClick(2)"> |
| | | <label for="companyTyp2"> Franchised vehicles </label> |
| | | </div> |
| | | <select class="form-control companyDiv" id="oneId" onchange="TCarInfoDlg.oneChange(this)" style="width: 200px"> |
| | | <option value="">Select Branch</option> |
| | | @for(obj in companyList!){ |
| | | <option value="${obj.id}" ${obj.id == item.companyId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | <select class="form-control companyDiv" id="twoId" style="width: 200px;margin-left: 30px;"> |
| | | <option value="">Select the franchisee</option> |
| | | @for(obj in franchiseeList!){ |
| | | <option value="${obj.id}" ${obj.id == item.franchiseeId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | @}else if(roleType == 2){ |
| | | <span class="control-label">${objectName!}</span> |
| | | <select class="form-control" id="franchiseeId" style="width: 200px;margin-left: 30px;"> |
| | | <option value="">Select the franchisee</option> |
| | | @for(obj in franchiseeList!){ |
| | | <option value="${obj.id}" ${obj.id == item.franchiseeId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | @}else if(roleType == 3){ |
| | | <span class="control-label">${objectName!}</span> |
| | | @} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <fieldset> |
| | | <label class="col-sm-3 control-label">Service mode:</label> |
| | | <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="${type}"> |
| | | @if(type==2){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">举办省:</label> |
| | | <div class="col-sm-9"> |
| | | <div class="checkbox checkbox-success checkbox-inline"> |
| | | <input type="checkbox" name="serverBox" id="serverBox1" value="1" ${2 == one ? 'checked=checked' : ''} onclick="TCarInfoDlg.zcServerClick()"> |
| | | <label for="serverBox1"> motorcycle </label> |
| | | </div> |
| | | <div class="checkbox checkbox-success checkbox-inline"> |
| | | <input type="checkbox" name="serverBox" id="serverBox4" value="4" ${2 == four ? 'checked=checked' : ''}> |
| | | <label for="serverBox4"> Intra-city express delivery </label> |
| | | </div> |
| | | <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> |
| | | </fieldset> |
| | | </div> |
| | | <div class="form-group" id="zcModelDiv"> |
| | | <label class="col-sm-3 control-label">Motorcycle model setting:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="zcModel" name="zcModel"> |
| | | <option value="">Select vehicle type</option> |
| | | @for(obj in zcModelList){ |
| | | <option value="${obj.id}" ${obj.id == zcModel ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="kcModelDiv"> |
| | | <label class="col-sm-3 control-label">Cross city travel model:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="kcModel" name="kcModel"> |
| | | <option value="">Select vehicle type</option> |
| | | @for(obj in kcModelList){ |
| | | <option value="${obj.id}" ${obj.id == kcModel ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#select id="carBrandId" name="Vehicle brand:" onchange="TCarInfoDlg.brandChange(this)"> |
| | | <option value="">Select vehicle brand</option> |
| | | @for(obj in brandList){ |
| | | <option value="${obj.id}" ${obj.id == item.carBrandId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </#select> |
| | | <#select id="carModelId" name="Vehicle type:"> |
| | | <option value="">Select vehicle type</option> |
| | | @for(obj in modelList){ |
| | | <option value="${obj.id}" ${obj.id == item.carModelId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </#select> |
| | | <#select id="carColor" name="Vehicle color:"> |
| | | <option value="">Select vehicle color</option> |
| | | <option value="1" ${'1' == item.carColor ? 'selected=selected' : ''}>black</option> |
| | | <option value="2" ${'2' == item.carColor ? 'selected=selected' : ''}>silvery</option> |
| | | <option value="3" ${'3' == item.carColor ? 'selected=selected' : ''}>white</option> |
| | | <option value="4" ${'4' == item.carColor ? 'selected=selected' : ''}>red</option> |
| | | <option value="5" ${'5' == item.carColor ? 'selected=selected' : ''}>yellow</option> |
| | | <option value="6" ${'6' == item.carColor ? 'selected=selected' : ''}>orange</option> |
| | | <option value="7" ${'7' == item.carColor ? 'selected=selected' : ''}>blue</option> |
| | | </#select> |
| | | <#input id="carLicensePlate" name="License plate number" value="${item.carLicensePlate}"/> |
| | | <#avatar id="carPhoto" name="Vehicle photos:" avatarImg="${item.carPhoto}"/> |
| | | <#input id="drivingLicenseNumber" name="Driving license number" value="${item.drivingLicenseNumber}"/> |
| | | <#avatar id="drivingLicensePhoto" name="Photo of driving license:" avatarImg="${item.drivingLicensePhoto}"/> |
| | | <#input id="annualInspectionTime" name="Annual inspection expiration time" type="text" value="${item.annualInspectionTime}"/> |
| | | <#input id="commercialInsuranceTime" name="Expiration time of commercial insurance" type="text" value="${item.commercialInsuranceTime}"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="Submit" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="Cancel" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(language==3){ |
| | | <div class="row"> |
| | | <div class="col-sm-11"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">Organisasi Afiliasi:</label> |
| | | <div class="col-sm-9" style="display: flex;align-items: center;"> |
| | | @if(roleType == 1){ |
| | | <div class="radio radio-info radio-inline"> |
| | | <input type="radio" id="companyType1" value="1" name="companyType" ${1 == companyType ? 'checked=checked' : ''} onclick="TCarInfoDlg.companyTypeClick(1)"> |
| | | <label for="companyType1"> Kendaraan platform </label> |
| | | </div> |
| | | <div class="radio radio-success radio-inline"> |
| | | <input type="radio" id="companyTyp2" value="2" name="companyType" ${2 == companyType ? 'checked=checked' : ''} onclick="TCarInfoDlg.companyTypeClick(2)"> |
| | | <label for="companyTyp2"> Kendaraan waralaba </label> |
| | | </div> |
| | | <select class="form-control companyDiv" id="oneId" onchange="TCarInfoDlg.oneChange(this)" style="width: 200px"> |
| | | <option value="">Pilih Branch</option> |
| | | @for(obj in companyList!){ |
| | | <option value="${obj.id}" ${obj.id == item.companyId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | <select class="form-control companyDiv" id="twoId" style="width: 200px;margin-left: 30px;"> |
| | | <option value="">Pilih pemilik franchise</option> |
| | | @for(obj in franchiseeList!){ |
| | | <option value="${obj.id}" ${obj.id == item.franchiseeId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | @}else if(roleType == 2){ |
| | | <span class="control-label">${objectName!}</span> |
| | | <select class="form-control" id="franchiseeId" style="width: 200px;margin-left: 30px;"> |
| | | <option value="">Pilih pemilik franchise</option> |
| | | @for(obj in franchiseeList!){ |
| | | <option value="${obj.id}" ${obj.id == item.franchiseeId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | @}else if(roleType == 3){ |
| | | <span class="control-label">${objectName!}</span> |
| | | @} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <fieldset> |
| | | <label class="col-sm-3 control-label">Mode Layanan:</label> |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">举办市:</label> |
| | | <div class="col-sm-9"> |
| | | <div class="checkbox checkbox-success checkbox-inline"> |
| | | <input type="checkbox" name="serverBox" id="serverBox1" value="1" ${2 == one ? 'checked=checked' : ''} onclick="TCarInfoDlg.zcServerClick()"> |
| | | <label for="serverBox1"> sepeda motor </label> |
| | | </div> |
| | | <div class="checkbox checkbox-success checkbox-inline"> |
| | | <input type="checkbox" name="serverBox" id="serverBox4" value="4" ${2 == four ? 'checked=checked' : ''}> |
| | | <label for="serverBox4"> Pengiriman Ekspres Dalam Kota </label> |
| | | </div> |
| | | <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> |
| | | </fieldset> |
| | | </div> |
| | | <div class="form-group" id="zcModelDiv"> |
| | | <label class="col-sm-3 control-label">Pengaturan model sepeda motor:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="zcModel" name="zcModel"> |
| | | <option value="">Pilih Jenis Kendaraan</option> |
| | | @for(obj in zcModelList){ |
| | | <option value="${obj.id}" ${obj.id == zcModel ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="kcModelDiv"> |
| | | <label class="col-sm-3 control-label">Model perjalanan melintasi kota:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="kcModel" name="kcModel"> |
| | | <option value="">Pilih Jenis Kendaraan</option> |
| | | @for(obj in kcModelList){ |
| | | <option value="${obj.id}" ${obj.id == kcModel ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | @} |
| | | <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> |
| | | </div> |
| | | <#select id="carBrandId" name="Merek kendaraan:" onchange="TCarInfoDlg.brandChange(this)"> |
| | | <option value="">Pilih Merek Kendaraan</option> |
| | | @for(obj in brandList){ |
| | | <option value="${obj.id}" ${obj.id == item.carBrandId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </#select> |
| | | <#select id="carModelId" name="Jenis Kendaraan:"> |
| | | <option value="">Pilih Jenis Kendaraan</option> |
| | | @for(obj in modelList){ |
| | | <option value="${obj.id}" ${obj.id == item.carModelId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </#select> |
| | | <#select id="carColor" name="车辆颜色:"> |
| | | <option value="">选择车辆颜色</option> |
| | | <option value="1" ${'1' == item.carColor ? 'selected=selected' : ''}>hitam</option> |
| | | <option value="2" ${'2' == item.carColor ? 'selected=selected' : ''}>perak</option> |
| | | <option value="3" ${'3' == item.carColor ? 'selected=selected' : ''}>putih</option> |
| | | <option value="4" ${'4' == item.carColor ? 'selected=selected' : ''}>merah</option> |
| | | <option value="5" ${'5' == item.carColor ? 'selected=selected' : ''}>kuning</option> |
| | | <option value="6" ${'6' == item.carColor ? 'selected=selected' : ''}>oranye</option> |
| | | <option value="7" ${'7' == item.carColor ? 'selected=selected' : ''}>biru</option> |
| | | </#select> |
| | | <#input id="carLicensePlate" name="Nomor plat nomor" value="${item.carLicensePlate}"/> |
| | | <#avatar id="carPhoto" name="Foto kendaraan:" avatarImg="${item.carPhoto}"/> |
| | | <#input id="drivingLicenseNumber" name="Nomor SIM Mengemudi" value="${item.drivingLicenseNumber}"/> |
| | | <#avatar id="drivingLicensePhoto" name="Foto SIM:" avatarImg="${item.drivingLicensePhoto}"/> |
| | | <#input id="annualInspectionTime" name="Waktu Kedaluwarsa Inspeksi Tahunan" type="text" value="${item.annualInspectionTime}"/> |
| | | <#input id="commercialInsuranceTime" name="Waktu kedaluwarsa asuransi komersial" type="text" value="${item.commercialInsuranceTime}"/> |
| | | </div> |
| | | </div> |
| | | <#input id="name" name="赛事名称" type="text" value="${item.name}"/> |
| | | <#input id="startTime" name="开始时间" type="text" value="${item.startTime}"/> |
| | | <#input id="endTime" name="结束时间" type="text" value="${item.endTime}"/> |
| | | <#input id="registerEndTime" name="截止报名时间" type="text" value="${item.registerEndTime}"/> |
| | | @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"> 全部用户 |
| | | <input type="radio" name="registerCondition" value="2">仅限年度会员参与 |
| | | <input type="radio" name="registerCondition" value="3">仅限学员参与 |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="Kirim" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="Batal" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | </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}"> ~ <input class="form-control" style="width: 100px;" type="text" id="endAge" value="${item.endAge}"> |
| | | </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)"> 现金支付 |
| | | <input type="checkbox" id="t2" onclick="updateType(2,this)"> 玩湃币支付 |
| | | <input type="checkbox" id="t3" 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" value="${item.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" value="${item.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" value="${item.classPrice}"> |
| | | </div> |
| | | </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}"> |
| | | </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}"/> |
| | | <#input id="baseNumber" name="基础报名人数" type="text" value="${item.baseNumber}"/> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">是否实名:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="realName" value="1"> 是 |
| | | <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;">${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> |
| | | </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> |
| | | <script src="${ctxPath}/modular/system/tCar/tCar_info.js"></script> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tCompetition/tCompetition_info.js"></script> |
| | | <script> |
| | | window.onload = function() { |
| | | 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") |
| | | } |
| | | |
| | | } |
| | | |
| | | laydate.render({ |
| | | elem: '#annualInspectionTime' |
| | | ,lang:"en" |
| | | elem: '#startTime' |
| | | ,type:"datetime" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#commercialInsuranceTime' |
| | | ,lang:"en" |
| | | elem: '#endTime' |
| | | ,type:"datetime" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#certifyDateA' |
| | | ,lang:"en" |
| | | elem: '#registerEndTime' |
| | | ,type:"datetime" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#transDateStart' |
| | | ,lang:"en" |
| | | ,type:"datetime" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#transDateStop' |
| | | ,lang:"en" |
| | | ,type:"datetime" |
| | | }); |
| | | laydate.render({ |
| | | |
| | | elem: '#certifyDateB' |
| | | ,lang:"en" |
| | | }); |
| | |
| | | elem: '#registerDate' |
| | | ,lang:"en" |
| | | }); |
| | | </script> |
| | | <script type="application/javascript"> |
| | | $(function() { |
| | | var companyType = $("input[name='companyType']:checked").val(); |
| | | if (1 == companyType){ |
| | | $(".companyDiv").hide(); |
| | | } else if (2 == companyType){ |
| | | $(".companyDiv").show(); |
| | | |
| | | |
| | | function updateType(e,o) { |
| | | if(e==1){ |
| | | if($(o).is(":checked")){ |
| | | $("#payType1").show(); |
| | | }else { |
| | | $("#payType1").hide(); |
| | | } |
| | | } |
| | | |
| | | TCarInfoDlg.zcServerClick(); |
| | | TCarInfoDlg.kcServerClick(); |
| | | |
| | | }); |
| | | 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> |
| | | @} |
| | |
| | | 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> |
| | | <#input id="name" name="门店名称" type="text"/> |
| | | <#input id="phone" name="联系电话" type="text"/> |
| | | <#input id="address" 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"/> |
| | | <#input id="intro" name="门店介绍" type="text"/> |
| | | <#input id="userName" name="店长姓名" type="text"/> |
| | |
| | | @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}"> |
| | | |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | |
| | | <option value="">选择省</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}" ${obj.code == item.provinceCode ? 'selected=selected' : ''}>${obj.name}</option> |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | |
| | | </div> |
| | | <#input id="name" name="门店名称" type="text" value="${item.name}"/> |
| | | <#input id="phone" name="联系电话" type="text" value="${item.phone}"/> |
| | | <#input id="address" name="门店地址" type="text" value="${item.address}"/> |
| | | <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}"/> |
| | | <#input id="intro" name="门店介绍" type="text" value="${item.introduce}"/> |
| | | <#input id="userName" name="管理员姓名" type="text" value="${city.name}"/> |
| | |
| | | }); |
| | | </script> |
| | | <script type="application/javascript"> |
| | | |
| | | </script> |
| | | @} |
| | |
| | | return {1:"全部用户",2:"仅限年度会员参与",3:"仅限学员参与"}[data] |
| | | } |
| | | }, |
| | | {title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | formatter:function (data) { |
| | | return {1:"未开始",2:"已开始",3:"已结束",4:"已取消"}[data] |
| | | } |
| | | }, |
| | | ]; |
| | | }; |
| | | function currentTime(timestamp){ |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/TCompetition/TCompetition_update/' + TCompetition.seItem.id |
| | | 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.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.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(); |
| | | }; |
| | | |
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); |
| | | } |
| | | } |
| | |
| | | /** |
| | | * 初始化车辆管理详情对话框 |
| | | */ |
| | | var language=$("#language").val(); |
| | | var language=1; |
| | | var TCarInfoDlg = { |
| | | tCarInfoData : {}, |
| | | validateFields: { |
| | |
| | | * 关闭此对话框 |
| | | */ |
| | | TCarInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TCar.layerIndex); |
| | | parent.layer.close(window.parent.TCompetition.layerIndex); |
| | | } |
| | | |
| | | /** |
| | |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | var roleType = $("#roleType").val(); //1=平台 2=分公司 3=加盟商 |
| | | var companyType = $("input[name='companyType']:checked").val(); |
| | | if (1 == roleType){ |
| | | if (2 == companyType){ |
| | | var oneId = $("#oneId").val(); |
| | | if ("" == oneId){ |
| | | if(language==1){ |
| | | Feng.info("所属分公司不能为空!"); |
| | | }else if(language==2){ |
| | | Feng.info("The subordinate branch cannot be empty!"); |
| | | }else { |
| | | Feng.info("Cabang subordinat tidak dapat kosong!"); |
| | | } |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | var serverBox =[]; |
| | | $('input[name="serverBox"]:checked').each(function(){ |
| | | serverBox.push($(this).val()); |
| | | }); |
| | | if (serverBox.length == 0){ |
| | | if(language==1){ |
| | | Feng.info("请选择经营业务"); |
| | | }else if(language==2){ |
| | | Feng.info("Please select business"); |
| | | }else { |
| | | Feng.info("Pilih bisnis"); |
| | | } |
| | | |
| | | |
| | | |
| | | var pCode = $("#pCode").val(); |
| | | if(pCode==""){ |
| | | Feng.info("请选择省"); |
| | | return; |
| | | } |
| | | var carPhoto = $("#carPhoto").valueOf(); |
| | | if ("" == carPhoto){ |
| | | if(language==1){ |
| | | Feng.info("请上传车辆照片"); |
| | | }else if(language==2){ |
| | | Feng.info("Please upload a photo of the vehicle"); |
| | | }else { |
| | | Feng.info("Silakan mengunggah foto kendaraan"); |
| | | } |
| | | |
| | | var cCode = $("#cCode").val(); |
| | | if(cCode==""){ |
| | | Feng.info("请选择市"); |
| | | return; |
| | | } |
| | | var drivingLicensePhoto = $("#drivingLicensePhoto").valueOf(); |
| | | if ("" == drivingLicensePhoto){ |
| | | if(language==1){ |
| | | Feng.info("请上传行驶证照片"); |
| | | }else if(language==2){ |
| | | Feng.info("Please upload a photo of your vehicle. Please upload a photo of your driving license"); |
| | | }else { |
| | | Feng.info("Silakan mengunggah foto kendaraanmu. Silakan mengunggah foto dari lisensi mengemudi Anda"); |
| | | } |
| | | |
| | | 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 + "/tCar/add", function(data){ |
| | | if(data.status == 200){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/add", function(data){ |
| | | if(data.code == 200){ |
| | | if(language==1){ |
| | | Feng.success("添加成功!"); |
| | | }else if(language==2){ |
| | |
| | | }else { |
| | | Feng.success("Sangat berhasil ditambah!"); |
| | | } |
| | | window.parent.TCar.table.refresh(); |
| | | 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("serverBox",serverBox.toString()); |
| | | ajax.set("zcModel",$("#zcModel").val()); |
| | | ajax.set("kcModel",$("#kcModel").val()); |
| | | ajax.set("roleType",roleType); |
| | | if (1 == roleType){ |
| | | ajax.set("companyType",companyType); |
| | | ajax.set("oneId",$("#oneId").val()); |
| | | ajax.set("twoId",$("#twoId").val()); |
| | | ajax.set("franchiseeId",0); |
| | | } else if (2 == roleType) { |
| | | ajax.set("franchiseeId",$("#franchiseeId").val()); |
| | | ajax.set("companyType",0); |
| | | ajax.set("oneId",0); |
| | | ajax.set("twoId",0); |
| | | }else if (3 == roleType){ |
| | | ajax.set("franchiseeId",0); |
| | | ajax.set("companyType",0); |
| | | ajax.set("oneId",0); |
| | | ajax.set("twoId",0); |
| | | } |
| | | 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(); |
| | | } |
| | | |
| | |
| | | return ; |
| | | } |
| | | |
| | | var roleType = $("#roleType").val(); //1=平台 2=分公司 3=加盟商 |
| | | var companyType = $("input[name='companyType']:checked").val(); |
| | | if (1 == roleType){ |
| | | if (2 == companyType){ |
| | | var oneId = $("#oneId").val(); |
| | | if ("" == oneId){ |
| | | if(language==1){ |
| | | Feng.info("所属分公司不能为空!"); |
| | | }else if(language==2){ |
| | | Feng.info("The subordinate branch cannot be empty!"); |
| | | }else { |
| | | Feng.info("Cabang subordinat tidak dapat kosong!"); |
| | | } |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | var serverBox =[]; |
| | | $('input[name="serverBox"]:checked').each(function(){ |
| | | serverBox.push($(this).val()); |
| | | }); |
| | | if (serverBox.length == 0){ |
| | | if(language==1){ |
| | | Feng.info("请选择经营业务"); |
| | | }else if(language==2){ |
| | | Feng.info("Please select business"); |
| | | }else { |
| | | Feng.info("Pilih bisnis"); |
| | | } |
| | | var pCode = $("#pCode").val(); |
| | | if(pCode==""){ |
| | | Feng.info("请选择省"); |
| | | return; |
| | | } |
| | | var carPhoto = $("#carPhoto").valueOf(); |
| | | if ("" == carPhoto){ |
| | | if(language==1){ |
| | | Feng.info("请上传车辆照片"); |
| | | }else if(language==2){ |
| | | Feng.info("Please upload a photo of the vehicle"); |
| | | }else { |
| | | Feng.info("Silakan mengunggah foto kendaraan"); |
| | | } |
| | | var cCode = $("#cCode").val(); |
| | | if(cCode==""){ |
| | | Feng.info("请选择市"); |
| | | return; |
| | | } |
| | | var drivingLicensePhoto = $("#drivingLicensePhoto").valueOf(); |
| | | if ("" == drivingLicensePhoto){ |
| | | if(language==1){ |
| | | Feng.info("请上传行驶证照片"); |
| | | }else if(language==2){ |
| | | Feng.info("Please upload a photo of your vehicle. Please upload a photo of your driving license"); |
| | | }else { |
| | | Feng.info("Silakan mengunggah foto kendaraanmu. Silakan mengunggah foto dari lisensi mengemudi Anda"); |
| | | } |
| | | 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 + "/tCar/update", function(data){ |
| | | if(data.status == 200){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/update", function(data){ |
| | | if(data.code == 200){ |
| | | if(language==1){ |
| | | Feng.success("修改成功!"); |
| | | }else if(language==2){ |
| | |
| | | }else { |
| | | Feng.success("Mengubah dengan sukses!"); |
| | | } |
| | | window.parent.TCar.table.refresh(); |
| | | 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("serverBox",serverBox.toString()); |
| | | ajax.set("zcModel",$("#zcModel").val()); |
| | | ajax.set("kcModel",$("#kcModel").val()); |
| | | ajax.set("roleType",roleType); |
| | | if (1 == roleType){ |
| | | ajax.set("companyType",companyType); |
| | | ajax.set("oneId",$("#oneId").val()); |
| | | ajax.set("twoId",$("#twoId").val()); |
| | | ajax.set("franchiseeId",0); |
| | | } else if (2 == roleType) { |
| | | ajax.set("franchiseeId",$("#franchiseeId").val()); |
| | | ajax.set("companyType",0); |
| | | ajax.set("oneId",0); |
| | | ajax.set("twoId",0); |
| | | }else if (3 == roleType){ |
| | | ajax.set("franchiseeId",0); |
| | | ajax.set("companyType",0); |
| | | ajax.set("oneId",0); |
| | | ajax.set("twoId",0); |
| | | } |
| | | 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("carPhoto"); |
| | | var carPhoto = new $WebUpload("coverDrawing"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("registrationNotes"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var drivingLicensePhoto = new $WebUpload("drivingLicensePhoto"); |
| | | drivingLicensePhoto.setUploadBarId("progressBar"); |
| | | drivingLicensePhoto.init(); |
| | | TCarInfoDlg.searchByStationName(); |
| | | }); |
| | | |
| | | /** |
| | |
| | | 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.brandChange = function (e) { |
| | | var carBrandId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCar/brandChange", function(data){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/brandChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择车辆类型</option>'; |
| | |
| | | $("#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 { |
| | | //获取地址失败 |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | |
| | | 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; |
| | | // 地图实例 |
| | | 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 { |
| | | //获取地址失败 |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | |
| | | var drivingLicensePhoto = new $WebUpload("drivingLicensePhoto"); |
| | | drivingLicensePhoto.setUploadBarId("progressBar"); |
| | | drivingLicensePhoto.init(); |
| | | |
| | | //地图搜索 |
| | | TCarInfoDlg.searchByStationName(); |
| | | }); |
| | | |
| | | /** |