| | |
| | | |
| | | |
| | | @PostMapping("/base/city/add") |
| | | public void add(@RequestBody TCityManager manager){ |
| | | public Integer add(@RequestBody TCityManager manager){ |
| | | try { |
| | | cityService.save(manager); |
| | | return manager.getId(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | package com.dsh.activity.feignclient.model; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class QueryUserCouponByIdAndUserId { |
| | | private Long id; |
| | | |
| | | private Integer userId; |
| | | } |
| | |
| | | Page<TCityManager> list(CityListQuery listQuery); |
| | | |
| | | @PostMapping("/base/city/add") |
| | | void add(TCityManager manager); |
| | | Integer add(TCityManager manager); |
| | | |
| | | @PostMapping("/base/city/getById") |
| | | TCityManager getById(Integer id); |
New file |
| | |
| | | package com.dsh.course.mapper; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.guns.modular.system.model.StoreConfig; |
| | | |
| | | /** |
| | | * <p> |
| | | * 门店基础配置 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-06-14 |
| | | */ |
| | | public interface StoreConfigMapper extends BaseMapper<StoreConfig> { |
| | | |
| | | } |
| | |
| | | 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.mapper.UserMapper; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.core.base.tips.SuccessTip; |
| | | import com.dsh.guns.core.common.constant.factory.PageFactory; |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.TCity; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.model.User; |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | private IStoreService storeService; |
| | | @Autowired |
| | | private ICityService cityService; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | |
| | | /** |
| | |
| | | manager.setProvince(one.getName()); |
| | | TCity one1 = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, manager.getCityCode())); |
| | | manager.setCity(one1.getName()); |
| | | cityClient.add(manager); |
| | | List<User> users = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getAccount, manager.getPhone())); |
| | | if(users.size()>0){ |
| | | return "5001"; |
| | | } |
| | | Integer add = cityClient.add(manager); |
| | | User user = new User(); |
| | | user.setPhone(manager.getPhone()); |
| | | user.setAccount(manager.getPhone()); |
| | | user.setRoleid(manager.getPhone()); |
| | | user.setRoleid("3"); |
| | | user.setName(manager.getName()); |
| | | user.setPassword(SecureUtil.md5("a123456")); |
| | | user.setCreatetime(new Date()); |
| | | user.setObjectId(add); |
| | | user.setObjectType(2); |
| | | userMapper.insert(user); |
| | | |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | manager.setProvince(one.getName()); |
| | | TCity one1 = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, manager.getCityCode())); |
| | | manager.setCity(one1.getName()); |
| | | List<User> users = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getAccount, manager.getPhone()).ne(User::getObjectId,manager.getId())); |
| | | if(users.size()>0){ |
| | | return "5001"; |
| | | } |
| | | |
| | | User user = userMapper.selectOne(new LambdaQueryWrapper<User>().eq(User::getObjectType, 2).eq(User::getObjectId, manager.getId())); |
| | | user.setAccount(manager.getPhone()); |
| | | user.setName(manager.getName()); |
| | | user.setPhone(manager.getPhone()); |
| | | userMapper.updateById(user); |
| | | |
| | | cityClient.update(manager); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | |
| | | @ResponseBody |
| | | public Object pwd(Integer id) { |
| | | try { |
| | | TCityManager byId = cityClient.getById(id); |
| | | byId.setPassword(SecureUtil.md5("a123456")); |
| | | cityClient.update(byId); |
| | | userMapper.selectOne(new LambdaQueryWrapper<User>().eq(User::getObjectId,id).eq(User::getObjectType,2)); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.account.CityClient; |
| | | import com.dsh.course.feignClient.account.model.CityListQuery; |
| | | import com.dsh.course.feignClient.account.model.TCityManager; |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.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; |
| | | import com.dsh.guns.core.base.tips.SuccessTip; |
| | | import com.dsh.guns.core.common.constant.factory.PageFactory; |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.StoreConfigService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 车辆管理控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-05 17:25:12 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tShop") |
| | | public class TShopController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tShop/"; |
| | | |
| | | @Autowired |
| | | private CompetitionClient competitionClient; |
| | | |
| | | @Autowired |
| | | private CityClient cityClient; |
| | | |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | @Autowired |
| | | private ICityService cityService; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Resource |
| | | private StoreConfigService storeConfigService; |
| | | |
| | | |
| | | /** |
| | | * 跳转到车辆管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",roleid); |
| | | return PREFIX + "TShop.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加车辆管理 |
| | | */ |
| | | @RequestMapping("/tShop_add") |
| | | public String tCompetitionAdd(Model model) { |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",roleid); |
| | | return PREFIX + "tShop_add.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到修改车辆管理 |
| | | */ |
| | | @RequestMapping("/tShop_update/{id}") |
| | | public String tCityUpdate(@PathVariable Integer id, Model model) { |
| | | TStore byId = storeService.getById(id); |
| | | model.addAttribute("item",byId); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, byId.getProvinceCode())); |
| | | List<TCity> list1 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId())); |
| | | CityListQuery cityListQuery = new CityListQuery(); |
| | | cityListQuery.setOffset(1); |
| | | cityListQuery.setLimit(10000); |
| | | cityListQuery.setCityCode(byId.getCityCode()); |
| | | Page<TCityManager> list2 = cityClient.list(cityListQuery); |
| | | model.addAttribute("list1",list1); |
| | | model.addAttribute("list2",list2.getRecords()); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",roleid); |
| | | model.addAttribute("time",byId.getStartTime()+" - "+byId.getEndTime()); |
| | | User byId1 = userMapper.selectById(byId.getStoreStaffId()); |
| | | model.addAttribute("city",byId1); |
| | | model.addAttribute("type",1); |
| | | return PREFIX + "tShop_edit.html"; |
| | | } |
| | | @RequestMapping("/tShop_info/{id}") |
| | | public String tCityInfo(@PathVariable Integer id, Model model) { |
| | | TStore byId = storeService.getById(id); |
| | | model.addAttribute("item",byId); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, byId.getProvinceCode())); |
| | | List<TCity> list1 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId())); |
| | | CityListQuery cityListQuery = new CityListQuery(); |
| | | cityListQuery.setOffset(1); |
| | | cityListQuery.setLimit(10000); |
| | | cityListQuery.setCityCode(byId.getCityCode()); |
| | | Page<TCityManager> list2 = cityClient.list(cityListQuery); |
| | | model.addAttribute("list1",list1); |
| | | model.addAttribute("list2",list2.getRecords()); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",roleid); |
| | | model.addAttribute("time",byId.getStartTime()+" - "+byId.getEndTime()); |
| | | User byId1 = userMapper.selectById(byId.getStoreStaffId()); |
| | | model.addAttribute("city",byId1); |
| | | model.addAttribute("type",0); |
| | | return PREFIX + "tShop_edit.html"; |
| | | } |
| | | @RequestMapping("/tShop_gift/{id}") |
| | | public String tCityGift(@PathVariable Integer id, Model model) { |
| | | TStore byId = storeService.getById(id); |
| | | model.addAttribute("welfarePicture",byId.getWelfarePicture()); |
| | | model.addAttribute("id",id); |
| | | return PREFIX + "tShop_img.html"; |
| | | } |
| | | @RequestMapping("/tShop_indexSet/{id}") |
| | | public String tCityIndexSet(@PathVariable Integer id, Model model) { |
| | | StoreConfig c1 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,1)); |
| | | model.addAttribute("c1",c1); |
| | | StoreConfig c2 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,2)); |
| | | model.addAttribute("c2",c2); |
| | | StoreConfig c3 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,3)); |
| | | model.addAttribute("c3",c3); |
| | | StoreConfig c4 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,4)); |
| | | model.addAttribute("c4",c4); |
| | | StoreConfig c5 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,5)); |
| | | model.addAttribute("c5",c5); |
| | | StoreConfig c6 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,6)); |
| | | model.addAttribute("c6",c6); |
| | | StoreConfig c7 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,7)); |
| | | model.addAttribute("c7",c7); |
| | | StoreConfig c8 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,8)); |
| | | model.addAttribute("c8",c8); |
| | | model.addAttribute("id",id); |
| | | return PREFIX + "tShop_imgAll.html"; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String provinceCode, String cityCode , String name, String phone,String shopName) { |
| | | Page<TStoreListVo> page = new PageFactory<TStoreListVo>().defaultPage(); |
| | | List<TStoreListVo> list = storeService.listAll(page,provinceCode,cityCode,name,phone,shopName); |
| | | for (TStoreListVo tStoreListVo : list) { |
| | | TCityManager byId = cityClient.getById(tStoreListVo.getCityManagerId()); |
| | | tStoreListVo.setAccount(byId.getName()+"-"+byId.getPhone()); |
| | | |
| | | } |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object list(TStore tStore,String time,String userName,String userPhone) { |
| | | try { |
| | | if(ToolUtil.isNotEmpty(tStore.getProvinceCode())) { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, tStore.getProvinceCode())); |
| | | tStore.setProvince(one.getName()); |
| | | TCity one1 = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, tStore.getCityCode())); |
| | | tStore.setCity(one1.getName()); |
| | | } |
| | | tStore.setStartTime(time.split(" - ")[0]); |
| | | tStore.setEndTime(time.split(" - ")[1]); |
| | | tStore.setState(1); |
| | | User user = new User(); |
| | | List<User> users = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getAccount, userPhone)); |
| | | if(users.size()>0){ |
| | | return "5001"; |
| | | } |
| | | user.setAccount(userPhone); |
| | | user.setName(userName); |
| | | user.setRoleid("2"); |
| | | user.setPhone(userPhone); |
| | | user.setPassword(SecureUtil.md5("a123456")); |
| | | userMapper.insert(user); |
| | | tStore.setStoreStaffId(user.getId()); |
| | | storeService.save(tStore); |
| | | |
| | | ArrayList<StoreConfig> storeConfigs = new ArrayList<>(); |
| | | for (int i = 1; i < 9; i++) { |
| | | StoreConfig storeConfig = new StoreConfig(); |
| | | storeConfig.setIsOpen(1); |
| | | storeConfig.setSort(i); |
| | | storeConfig.setType(i); |
| | | storeConfig.setStoreId(tStore.getId()); |
| | | storeConfigs.add(storeConfig); |
| | | } |
| | | storeConfigService.saveBatch(storeConfigs); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TStore tStore,String time,String userName,String userPhone) { |
| | | try { |
| | | TStore byId = storeService.getById(tStore.getId()); |
| | | |
| | | if(ToolUtil.isNotEmpty(tStore.getProvinceCode())) { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, tStore.getProvinceCode())); |
| | | tStore.setProvince(one.getName()); |
| | | TCity one1 = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, tStore.getCityCode())); |
| | | tStore.setCity(one1.getName()); |
| | | } |
| | | tStore.setStartTime(time.split(" - ")[0]); |
| | | tStore.setEndTime(time.split(" - ")[1]); |
| | | if(ToolUtil.isEmpty(tStore.getCoverDrawing())){ |
| | | tStore.setCoverDrawing(byId.getCoverDrawing()); |
| | | } |
| | | User user = userMapper.selectById(byId.getStoreStaffId()); |
| | | List<User> users = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getAccount, userPhone).ne(User::getId,tStore.getStoreStaffId())); |
| | | if(users.size()>0){ |
| | | return "5001"; |
| | | } |
| | | user.setAccount(userPhone); |
| | | user.setName(userName); |
| | | user.setPhone(userPhone); |
| | | userMapper.updateById(user); |
| | | storeService.updateById(tStore); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/onChange") |
| | | @ResponseBody |
| | | public Object onChange(Integer oneId) { |
| | | try { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, oneId)); |
| | | return cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId())); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/saveImgAll") |
| | | @ResponseBody |
| | | public Object saveImgAll(Integer id,Integer px1,Integer px2,Integer px3,Integer px4,Integer px5,Integer px6,Integer px7,Integer px8, |
| | | String c1,String c2,String c3,String c4,String c5,String c6,String c7,String c8, |
| | | Integer r1,Integer r2,Integer r3,Integer r4,Integer r5,Integer r6,Integer r7,Integer r8) { |
| | | try { |
| | | ArrayList<StoreConfig> storeConfigs = new ArrayList<>(); |
| | | StoreConfig collect1 = collect(id, px1, r1, c1, 1); |
| | | StoreConfig collect2 = collect(id, px2, r2, c2, 2); |
| | | StoreConfig collect3 = collect(id, px3, r3, c3, 3); |
| | | StoreConfig collect4 = collect(id, px4, r4, c4, 4); |
| | | StoreConfig collect5 = collect(id, px5, r5, c5, 5); |
| | | StoreConfig collect6 = collect(id, px6, r6, c6, 6); |
| | | StoreConfig collect7 = collect(id, px7, r7, c7, 7); |
| | | StoreConfig collect8 = collect(id, px8, r8, c8, 8); |
| | | storeConfigs.add(collect1); |
| | | storeConfigs.add(collect2); |
| | | storeConfigs.add(collect3); |
| | | storeConfigs.add(collect4); |
| | | storeConfigs.add(collect5); |
| | | storeConfigs.add(collect6); |
| | | storeConfigs.add(collect7); |
| | | storeConfigs.add(collect8); |
| | | storeConfigService.updateBatchById(storeConfigs); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | private StoreConfig collect(Integer id,Integer sort,Integer isOpen,String img,int type){ |
| | | StoreConfig one = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType, type)); |
| | | one.setSort(sort); |
| | | one.setIsOpen(isOpen); |
| | | if(ToolUtil.isNotEmpty(img)){ |
| | | one.setBackgroundImage(img); |
| | | } |
| | | return one; |
| | | } |
| | | @RequestMapping(value = "/oneChangeNext") |
| | | @ResponseBody |
| | | public Object oneChangeNext(String oneId) { |
| | | |
| | | try { |
| | | CityListQuery cityListQuery = new CityListQuery(); |
| | | cityListQuery.setCityCode(oneId); |
| | | cityListQuery.setOffset(1); |
| | | cityListQuery.setLimit(100000); |
| | | Page<TCityManager> list = cityClient.list(cityListQuery); |
| | | List<TCityManager> records = list.getRecords(); |
| | | for (TCityManager record : records) { |
| | | record.setName(record.getName()+"-"+record.getPhone()); |
| | | } |
| | | return records; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/cancel") |
| | | public Object cancel(Integer id) { |
| | | try { |
| | | competitionClient.cancel(id); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/saveImg") |
| | | @ResponseBody |
| | | public Object saveImg(Integer id,String img) { |
| | | try { |
| | | TStore byId = storeService.getById(id); |
| | | byId.setWelfarePicture(img); |
| | | storeService.updateById(byId); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/freeze") |
| | | @ResponseBody |
| | | public Object freeze(Integer id) { |
| | | try { |
| | | TStore byId = storeService.getById(id); |
| | | byId.setState(2); |
| | | storeService.updateById(byId); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/unfreeze") |
| | | @ResponseBody |
| | | public Object unfreeze(Integer id) { |
| | | try { |
| | | TStore byId = storeService.getById(id); |
| | | byId.setState(1); |
| | | storeService.updateById(byId); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/pwd") |
| | | @ResponseBody |
| | | public Object pwd(Integer id) { |
| | | try { |
| | | TStore byId = storeService.getById(id); |
| | | User user = userMapper.selectById(byId.getStoreStaffId()); |
| | | user.setPassword(SecureUtil.md5("a123456")); |
| | | userMapper.updateById(user); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @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; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 门店基础配置 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-06-14 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_store_config") |
| | | public class StoreConfig extends Model<StoreConfig> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 门店id |
| | | */ |
| | | @TableField("storeId") |
| | | private Integer storeId; |
| | | /** |
| | | * 数据类型(1=报名玩湃课程,2=预约场地,3=报名赛事及活动,4=免费福利,5=线上课程积分,6=购买优惠门票,7=看视频得奖励,8=智慧球场) |
| | | */ |
| | | @TableField("type") |
| | | private Integer type; |
| | | /** |
| | | * 是否开启(0=否,1=是) |
| | | */ |
| | | @TableField("isOpen") |
| | | private Integer isOpen; |
| | | /** |
| | | * 排序 |
| | | */ |
| | | @TableField("sort") |
| | | private Integer sort; |
| | | /** |
| | | * 背景图 |
| | | */ |
| | | @TableField("backgroundImage") |
| | | private String backgroundImage; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @TableName("t_store") |
| | | @Data |
| | | public class TStoreListVo { |
| | | private Integer id; |
| | | private String name; |
| | | @TableField("storeStaffId") |
| | | private Integer storeStaffId; |
| | | @TableField("cityManagerId") |
| | | private Integer cityManagerId; |
| | | private String province; |
| | | @TableField("provinceCode") |
| | | private String provinceCode; |
| | | private String city; |
| | | @TableField("cityCode") |
| | | private String cityCode; |
| | | private String phone; |
| | | private String address; |
| | | private String lat; |
| | | private String lon; |
| | | @TableField("startTime") |
| | | private String startTime; |
| | | @TableField("endTime") |
| | | private String endTime; |
| | | @TableField("coverDrawing") |
| | | private String coverDrawing; |
| | | @TableField("realPicture") |
| | | private String realPicture; |
| | | private String introduce; |
| | | @TableField("welfarePicture") |
| | | private String welfarePicture; |
| | | private BigDecimal score; |
| | | private Integer state; |
| | | |
| | | private String userName; |
| | | private String userPhone; |
| | | |
| | | private String account; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.guns.modular.system.model.StoreConfig; |
| | | |
| | | |
| | | /** |
| | | * <p> |
| | | * 门店基础配置 服务类 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-06-14 |
| | | */ |
| | | public interface StoreConfigService extends IService<StoreConfig> { |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.service.impl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.course.mapper.StoreConfigMapper; |
| | | import com.dsh.guns.modular.system.model.StoreConfig; |
| | | import com.dsh.guns.modular.system.service.StoreConfigService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 门店基础配置 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-06-14 |
| | | */ |
| | | @Service |
| | | public class StoreConfigServiceImpl extends ServiceImpl<StoreConfigMapper, StoreConfig> implements StoreConfigService { |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dsh.course.mapper.StoreConfigMapper"> |
| | | |
| | | |
| | | </mapper> |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | |
| | | <div class="ibox-title"> |
| | | <h5>门店管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | @if(role=='1'){ |
| | | <div class="col-sm-3"> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 所在省 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="pCode" onchange="TCompetition.oneChange(this)"> |
| | | <option value="">全部</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(role=='1'){ |
| | | <div class="col-sm-3"> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 所在市 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="cCode"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="name" name="店长姓名" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="phone" name="店长手机号" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="shopName" name="门店名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCompetition.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TCompetition.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TCompetitionTableToolbar" role="group"> |
| | | <#button name="添加" icon="fa-plus" clickFun="TCompetition.openAddTCompetition()"/> |
| | | <#button name="编辑" icon="fa-edit" clickFun="TCompetition.openTCompetitionDetail()" space="true"/> |
| | | <#button name="冻结" icon="fa-remove" clickFun="TCompetition.freeze()" space="true"/> |
| | | <#button name="解冻" icon="fa-remove" clickFun="TCompetition.unfreeze()" space="true"/> |
| | | <#button name="查看详情" icon="fa-remove" clickFun="TCompetition.info()" space="true"/> |
| | | <#button name="重置密码" icon="fa-remove" clickFun="TCompetition.reload()" space="true"/> |
| | | <#button name="免费福利" icon="fa-remove" clickFun="TCompetition.gift()" space="true"/> |
| | | <#button name="首页设置" icon="fa-remove" clickFun="TCompetition.indexSet()" space="true"/> |
| | | |
| | | </div> |
| | | <#table id="TCompetitionTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#createTime' |
| | | ,range: true |
| | | ,lang:"en" |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style> |
| | | .avatar-uploader .el-upload { |
| | | border: 1px dashed #d9d9d9; |
| | | border-radius: 6px; |
| | | cursor: pointer; |
| | | position: relative; |
| | | height: 100px; |
| | | width: 100px; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .avatar-uploader .el-upload:hover { |
| | | border-color: #409EFF; |
| | | } |
| | | .avatar-uploader-icon { |
| | | font-size: 28px; |
| | | color: #8c939d; |
| | | width: 100px; |
| | | height: 100px; |
| | | line-height: 100px; |
| | | margin-top: 32px; |
| | | text-align: center; |
| | | } |
| | | .avatar { |
| | | width: 100px; |
| | | height: 100px; |
| | | display: block; |
| | | } |
| | | |
| | | .col-sm-12 { |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .col-sm-12 select { |
| | | height: 33px; |
| | | } |
| | | </style> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | |
| | | |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <input hidden id="role" value="${role}"> |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="pCode" name="pCode" onchange="TCarInfoDlg.oneChange(this)"> |
| | | <option value="">选择省</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="cCode" name="cCode" onchange="TCarInfoDlg.oneChangeNext(this)"> |
| | | <option value="">选择市</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">所属账号:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="account" name="account"> |
| | | <option value="">选择账号</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#input id="name" name="门店名称" type="text"/> |
| | | <#input id="phone" name="联系电话" type="text"/> |
| | | <#input id="address" name="门店地址" type="text"/> |
| | | <#input id="time" name="营业时间" type="text"/> |
| | | <#input id="intro" name="门店介绍" type="text"/> |
| | | <#input id="userName" name="店长姓名" type="text"/> |
| | | <#input id="userPhone" name="店长手机号" type="text"/> |
| | | <#avatar id="img" name="门店封面(推荐像素722*360px)" /> |
| | | <div class="row" id="app1"> |
| | | <div class="col-sm-6" style="width: 100%"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label" style="width: 15%;margin-left: 5%">*实景图片(请上传不超过五张图片): </label> |
| | | <div class="col-sm-2" style="width: 100%;margin-left: 11%;margin-top: 1%"> |
| | | <el-upload |
| | | :limit="5" |
| | | class="avatar-uploader" |
| | | action="/tCouponManage/uploadPic" |
| | | list-type="picture-card" |
| | | accept="." |
| | | :on-success="handleAvatarSuccess" |
| | | :on-remove="handleRemove"> |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | | <el-dialog :visible.sync="dialogVisible"> |
| | | <img width="100%" :src="imageUrl1" alt=""> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop_info.js"></script> |
| | | <script src="${ctxPath}/js/vue/vue.js"></script> |
| | | <script src="${ctxPath}/js/elementui/index.js"></script> |
| | | <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css"> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#time', |
| | | range:true |
| | | }); |
| | | |
| | | var vue2 = new Vue({ |
| | | el: '#app1', |
| | | props: { |
| | | // 数量限制 |
| | | limit: { |
| | | type: Number, |
| | | default: 2 |
| | | }, |
| | | }, |
| | | data: { |
| | | autoUpload: true,//自动上传 |
| | | imageUrl1: '',//模型数据,用于上传图片完成后图片预览 |
| | | dialogVisible: false |
| | | }, |
| | | methods: { |
| | | handleAvatarSuccess(res, file) { |
| | | couponInfoDlg.goodsPicArray.push(file); |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isLt2M = file.size / 1024 / 1024 < 10; |
| | | if (!isLt2M) { |
| | | this.$message.error('上传图片大小不能超过 10MB!'); |
| | | } |
| | | return isLt2M; |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | couponInfoDlg.goodsPicArray = couponInfoDlg.goodsPicArray.filter(item => { |
| | | return item.uid != file.uid; |
| | | }); |
| | | }, |
| | | }, |
| | | created() { |
| | | }, |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <input hidden id="id" value="${item.id}"> |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="pCode" name="pCode" onchange="TCarInfoDlg.oneChange(this)"> |
| | | <option value="">选择省</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}" ${obj.code == item.provinceCode ? 'selected=selected' : ''}>${obj.name}</option> |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="cCode" name="cCode" onchange="TCarInfoDlg.oneChangeNext(this)"> |
| | | <option value="">选择市</option> |
| | | @for(obj in list1){ |
| | | <option value="${obj.code}" ${obj.code == item.cityCode ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">所属账号:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="account" name="account"> |
| | | <option value="">选择账号</option> |
| | | @for(obj in list2){ |
| | | <option value="${obj.id}" ${obj.id == item.cityManagerId ? 'selected=selected' : ''}>${obj.name}-${obj.phone}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#input id="name" name="门店名称" type="text" value="${item.name}"/> |
| | | <#input id="phone" name="联系电话" type="text" value="${item.phone}"/> |
| | | <#input id="address" name="门店地址" type="text" value="${item.address}"/> |
| | | <#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}"/> |
| | | <#input id="userPhone" name="管理员手机号" type="text" value="${city.account}"/> |
| | | <#avatar id="img" name="门店封面(推荐像素722*360px)" avatarImg="${item.coverDrawing}"/> |
| | | <#input id="imgOne" name="实景照片" type="text" value="${item.realPicture}"/> |
| | | |
| | | |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | @if(type==1){ |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.editSubmit()"/> |
| | | @} |
| | | <#button btnCss="danger" name="关闭" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop_info.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#time', |
| | | range:true |
| | | }); |
| | | </script> |
| | | <script type="application/javascript"> |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <input hidden id="id" value="${id}"> |
| | | @if(welfarePicture==null){ |
| | | <#avatar id="welfarePicture" name="福利图片"/> |
| | | @} |
| | | @if(welfarePicture!=null){ |
| | | <#avatar id="welfarePicture" name="福利图片" avatarImg="${welfarePicture}"/> |
| | | @} |
| | | @if(welfarePicture==12321){ |
| | | <div class="form-group"> |
| | | <div class="col-sm-4"> |
| | | <div id="welfarePicturePreId"> |
| | | <div><img width="700px" height="800px" id="img" src="${welfarePicture}" ></div> |
| | | </div> |
| | | </div> |
| | | |
| | | <input type="hidden" id="welfarePicture"> |
| | | </div> |
| | | <div class="col-sm-2" style="margin-left: 280px"> |
| | | <div class="head-scu-btn upload-btn webuploader-container" id="welfarePictureBtnId"><div class="webuploader-pick"> |
| | | <i class="fa fa-upload"></i> Upload |
| | | </div><div id="rt_rt_1h6lka0hk9mucj87vf1t21qk31" style="position: absolute; inset: 0px auto auto 0px; width: 82px; height: 28px; overflow: hidden;"><input type="file" name="file" class="webuploader-element-invisible" accept="image/gif,image/jpg,image/jpeg,image/bmp,image/png"><label style="opacity: 0; width: 100%; height: 100%; display: block; cursor: pointer; background: rgb(255, 255, 255);"></label></div></div> |
| | | </div> |
| | | @} |
| | | |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.saveImg()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop_info.js"></script> |
| | | <script> |
| | | </script> |
| | | <script type="application/javascript"> |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <input hidden id="id" value="${id}"> |
| | | <input hidden id="s1" value="${c1.isOpen}"> |
| | | <input hidden id="s2" value="${c2.isOpen}"> |
| | | <input hidden id="s3" value="${c3.isOpen}"> |
| | | <input hidden id="s4" value="${c4.isOpen}"> |
| | | <input hidden id="s5" value="${c5.isOpen}"> |
| | | <input hidden id="s6" value="${c6.isOpen}"> |
| | | <input hidden id="s7" value="${c7.isOpen}"> |
| | | <input hidden id="s8" value="${c8.isOpen}"> |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 报名玩湃课程:<input type="radio" name="r1" value="1">开启 <input type="radio" name="r1" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px1" value="${c1.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c1==null){ |
| | | <#avatar id="c1" name="背景图" /> |
| | | @} |
| | | @if(c1!=null){ |
| | | <#avatar id="c1" name="背景图" avatarImg="${c1.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 预约场地:<input type="radio" name="r2" value="1">开启 <input type="radio" name="r2" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px2" value="${c2.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c2==null){ |
| | | <#avatar id="c2" name="背景图" /> |
| | | @} |
| | | @if(c2!=null){ |
| | | <#avatar id="c2" name="背景图" avatarImg="${c2.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 报名赛事及活动:<input type="radio" name="r3" value="1">开启 <input type="radio" name="r3" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px3" value="${c3.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c3==null){ |
| | | <#avatar id="c3" name="背景图" /> |
| | | @} |
| | | @if(c3!=null){ |
| | | <#avatar id="c3" name="背景图" avatarImg="${c3.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 免费福利:<input type="radio" name="r4" value="1">开启 <input type="radio" name="r4" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px4" value="${c4.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c4==null){ |
| | | <#avatar id="c4" name="背景图" /> |
| | | @} |
| | | @if(c4!=null){ |
| | | <#avatar id="c4" name="背景图" avatarImg="${c4.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 线上课得积分:<input type="radio" name="r5" value="1">开启 <input type="radio" name="r5" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px5" value="${c5.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c5==null){ |
| | | <#avatar id="c5" name="背景图" /> |
| | | @} |
| | | @if(c5!=null){ |
| | | <#avatar id="c5" name="背景图" avatarImg="${c5.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 购买优惠门票:<input type="radio" name="r6" value="1">开启 <input type="radio" name="r6" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px6" value="${c6.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c6==null){ |
| | | <#avatar id="c6" name="背景图" /> |
| | | @} |
| | | @if(c6!=null){ |
| | | <#avatar id="c6" name="背景图" avatarImg="${c6.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 看视频得奖励:<input type="radio" name="r7" value="1">开启 <input type="radio" name="r7" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px7" value="${c7.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c7==null){ |
| | | <#avatar id="c7" name="背景图" /> |
| | | @} |
| | | @if(c7!=null){ |
| | | <#avatar id="c7" name="背景图" avatarImg="${c7.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" style="margin-left: 96px"> |
| | | <label class="col-sm-4 control-label" > |
| | | 智慧球场:<input type="radio" name="r8" value="1">开启 <input type="radio" name="r8" value="0">关闭 |
| | | </label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" style="width: 200px;" type="text" id="px8" value="${c8.sort}"> |
| | | </div> |
| | | </div> |
| | | @if(c8==null){ |
| | | <#avatar id="c8" name="背景图" /> |
| | | @} |
| | | @if(c8!=null){ |
| | | <#avatar id="c8" name="背景图" avatarImg="${c8.backgroundImage}"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.saveAllImg()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop_info.js"></script> |
| | | |
| | | <script> |
| | | </script> |
| | | <script type="application/javascript"> |
| | | window.onload = function(){ |
| | | var OBJradio=document.getElementsByName("r1") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s1").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r2") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s2").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r3") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s3").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r4") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s4").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r5") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s5").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r6") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s6").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r7") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s7").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | var OBJradio=document.getElementsByName("r8") |
| | | for(i=0;i<OBJradio.length;i++){//循环查找这个radio |
| | | if($("#s8").val()==OBJradio[i].value){//判断是否与radio的值相同 |
| | | OBJradio[i].checked=true//修改选中状态 |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | </script> |
| | | @} |
| | |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/add", function(data){ |
| | | if(data=="5001"){ |
| | | Feng.error("改账号已经存在"); |
| | | }else |
| | | if(data.code == 200){ |
| | | if(language==1){ |
| | | Feng.success("添加成功!"); |
| | |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/update", function(data){ |
| | | if(data=="5001"){ |
| | | Feng.error("改账号已经存在"); |
| | | }else |
| | | if(data.code == 200){ |
| | | if(language==1){ |
| | | Feng.success("修改成功!"); |
New file |
| | |
| | | /** |
| | | * 车辆管理管理初始化 |
| | | */ |
| | | var TCompetition = { |
| | | id: "TCompetitionTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | var language =1 |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TCompetition.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '省', field: 'province', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '市', field: 'city', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '所属账号', field: 'account', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '门店名称', field: 'name', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '门店地址', field: 'address', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '店长姓名', field: 'userName', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '店长手机号', field: 'userPhone', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle' |
| | | ,formatter:function (data) { |
| | | return{1:"正常",2:"冻结"}[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 + '/tShop/tShop_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 + '/tShop/tShop_update/' + TCompetition.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | TCompetition.info = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tShop/tShop_info/' + TCompetition.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | TCompetition.gift = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'免费福利', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tShop/tShop_gift/' + TCompetition.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | TCompetition.indexSet = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'首页设置', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tShop/tShop_indexSet/' + TCompetition.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除车辆管理 |
| | | */ |
| | | TCompetition.delete = function () { |
| | | if (this.check()) { |
| | | var nickname = TCompetition.seItem.carLicensePlate; |
| | | if (nickname == "" || nickname == null || nickname == undefined){ |
| | | nickname = "该车辆"; |
| | | }else{ |
| | | nickname = "【"+nickname+"】"; |
| | | } |
| | | swal({ |
| | | title: language==1?"您是否确认删除" + nickname + "?":(language==2?"Are you sure to delete the" + nickname + "?":"Apakah Anda pasti akan menghapus" + nickname + "?"), |
| | | text: language==1?"请谨慎操作!":(language==2?' Please operate with caution!':'Harap beroperasi dengan hati -hati!'), |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: language==1?"删除":(language==2?'Delete':'Hapus'), |
| | | closeOnConfirm: true |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/TCompetition/delete", function (data) { |
| | | if(language==1){ |
| | | swal("删除成功", "您已经成功删除了" + nickname + "。", "success"); |
| | | }else if(language==2){ |
| | | swal("Delete succeeded!", "You have successfully deleted it" + nickname + "。", "success"); |
| | | }else { |
| | | swal("Hapus berhasil!", "Anda berhasil menghapus" + nickname + "。", "success"); |
| | | } |
| | | TCompetition.table.refresh(); |
| | | }, function (data) { |
| | | if(language==1){ |
| | | swal("删除失败", data.responseJSON.message + "!", "warning"); |
| | | }else if(language==2){ |
| | | swal("Failed to delete", data.responseJSON.message + "!", "warning"); |
| | | }else { |
| | | swal("Hapus Gagal", data.responseJSON.message + "!", "warning"); |
| | | } |
| | | |
| | | }); |
| | | ajax.set("TCompetitionId",TCompetition.seItem.id); |
| | | ajax.start(); |
| | | }); |
| | | } |
| | | }; |
| | | TCompetition.oneChange = function (e) { |
| | | console.log(111) |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | TCompetition.oneChangeNext = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/oneChangeNext", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择账号</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#account").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | TCompetition.freeze = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/freeze", function (data) { |
| | | Feng.success("冻结成功!"); |
| | | TCompetition.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("冻结失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | TCompetition.unfreeze = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/unfreeze", function (data) { |
| | | Feng.success("解冻成功!"); |
| | | TCompetition.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("解冻失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | TCompetition.reload = function () { |
| | | if (this.check()) { |
| | | let id = this.seItem.id |
| | | var operation = function(){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/pwd", function (data) { |
| | | Feng.success("重置成功!"); |
| | | TCompetition.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("重置失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",id); |
| | | ajax.start(); |
| | | } |
| | | Feng.confirm("确认重置密码?重置后密码为:a123456", operation); |
| | | } |
| | | |
| | | }; |
| | | |
| | | TCompetition.carInsurance = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: language==1?'车辆保险':(language==2?'Vehicle insurance':'Asuransi kendaraan'), |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/TCompetition/carInsurance?carId=' + TCompetition.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询车辆管理列表 |
| | | */ |
| | | TCompetition.search = function () { |
| | | var queryData = {}; |
| | | queryData['provinceCode'] = $("#pCode").val(); |
| | | queryData['cityCode'] = $("#cCode").val(); |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['phone'] = $("#phone").val(); |
| | | queryData['shopName'] = $("#shopName").val(); |
| | | TCompetition.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TCompetition.resetSearch = function () { |
| | | $("#pCode").val(""); |
| | | $("#cCode").val(""); |
| | | $("#name").val(""); |
| | | $("#phone").val(""); |
| | | $("#shopName").val(""); |
| | | TCompetition.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TCompetition.initColumn(); |
| | | var table = new BSTable(TCompetition.id, "/tShop/list", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | TCompetition.table = table.init(); |
| | | }); |
| | | |
| | | /** |
| | | * 下载模板 |
| | | */ |
| | | TCompetition.uploadCarModel = function () { |
| | | window.location.href = Feng.ctxPath + "/TCompetition/uploadCarModel"; |
| | | } |
| | | |
| | | var agreement = function(){ |
| | | this.init = function(){ |
| | | //模拟上传excel |
| | | $("#uploadEventBtn").unbind("click").bind("click",function(){ |
| | | $("#uploadEventFile").click(); |
| | | }); |
| | | }; |
| | | } |
| | | /** |
| | | * 导入合同 |
| | | */ |
| | | TCompetition.exporTCompetition = function () { |
| | | var uploadEventFile = $("#uploadEventFile").val(); |
| | | if(uploadEventFile == ''){ |
| | | if(language==1){ |
| | | Feng.info("请选择Excel,再上传"); |
| | | }else if(language==2){ |
| | | Feng.info("Please select Excel and upload"); |
| | | }else { |
| | | Feng.info("Silakan pilih Excel dan upload"); |
| | | } |
| | | }else if(uploadEventFile.lastIndexOf(".xls")<0){//可判断以.xls和.xlsx结尾的excel |
| | | if(language==1){ |
| | | Feng.info("只能上传Excel文件"); |
| | | }else if(language==2){ |
| | | Feng.info("Only Excel files can be uploaded"); |
| | | }else { |
| | | Feng.info("Hanya berkas Excel yang dapat diunggah"); |
| | | } |
| | | }else{ |
| | | var url = Feng.ctxPath + '/TCompetition/exporTCompetition'; |
| | | var file = document.querySelector('input[name=file]').files[0]; |
| | | var reader = new FileReader(); |
| | | if (file) { |
| | | var formData = new FormData(); |
| | | formData.append("myfile", file); |
| | | this.sendAjaxRequest(url, 'POST', formData); |
| | | } |
| | | } |
| | | } |
| | | TCompetition.sendAjaxRequest = function(url,type,data){ |
| | | $.ajax({ |
| | | url : url, |
| | | type : type, |
| | | data : data, |
| | | success : function(result) { |
| | | if(result.code==500) { |
| | | Feng.info(result.message); |
| | | }else { |
| | | if(language==1){ |
| | | Feng.success("导入成功!"); |
| | | }else if(language==2){ |
| | | Feng.success("SUCCESSFUL IMPORT!"); |
| | | }else { |
| | | Feng.success("Import berhasil!"); |
| | | } |
| | | } |
| | | TCompetition.table.refresh(); |
| | | }, |
| | | error : function() { |
| | | if(language==1){ |
| | | Feng.error("excel上传失败!"); |
| | | }else if(language==2){ |
| | | Feng.error("Uploading excel Fails. Procedure!"); |
| | | }else { |
| | | Feng.error("Gagal mengunggah excel!"); |
| | | } |
| | | }, |
| | | cache : false, |
| | | contentType : false, |
| | | processData : false |
| | | }); |
| | | }; |
| | | |
| | | var agreement; |
| | | $(function(){ |
| | | agreement = new agreement(); |
| | | agreement.init(); |
| | | }); |
| | | |
| | | /** |
| | | * 导出车辆操作 |
| | | */ |
| | | TCompetition.ouTCompetition = function () { |
| | | var operation = function() { |
| | | window.location.href = Feng.ctxPath + "/TCompetition/ouTCompetition"; |
| | | }; |
| | | if(language==1){ |
| | | Feng.confirm("是否确认导出车辆信息?", operation); |
| | | }else if(language==2){ |
| | | Feng.confirm("Are you sure to export vehicle information?", operation); |
| | | }else { |
| | | Feng.confirm("Apakah Anda pasti akan mengekspor informasi kendaraan?", operation); |
| | | } |
| | | } |
New file |
| | |
| | | /** |
| | | * 初始化车辆管理详情对话框 |
| | | */ |
| | | var language=1; |
| | | var TCarInfoDlg = { |
| | | tCarInfoData : {}, |
| | | validateFields: { |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 验证数据是否为空 |
| | | */ |
| | | TCarInfoDlg.validate = function () { |
| | | $('#carInfoForm').data("bootstrapValidator").resetForm(); |
| | | $('#carInfoForm').bootstrapValidator('validate'); |
| | | return $("#carInfoForm").data('bootstrapValidator').isValid(); |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TCarInfoDlg.clearData = function() { |
| | | this.tCarInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TCarInfoDlg.set = function(key, val) { |
| | | this.tCarInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TCarInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TCarInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TCompetition.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TCarInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('isPlatCar') |
| | | .set('companyId') |
| | | .set('franchiseeId') |
| | | .set('carColor') |
| | | .set('carModelId') |
| | | .set('carBrandId') |
| | | .set('carLicensePlate') |
| | | .set('carPhoto') |
| | | .set('drivingLicenseNumber') |
| | | .set('drivingLicensePhoto') |
| | | .set('annualInspectionTime') |
| | | .set('commercialInsuranceTime') |
| | | .set('createTime') |
| | | .set('state') |
| | | .set('addType') |
| | | .set('addObjectId') |
| | | .set('plateColor') |
| | | .set('vehicleType') |
| | | .set('ownerName') |
| | | .set('engineId') |
| | | .set('VIN') |
| | | .set('certifyDateA') |
| | | .set('fuelType') |
| | | .set('engineDisplace') |
| | | .set('certificate') |
| | | .set('transAgency') |
| | | .set('transArea') |
| | | .set('transDateStart') |
| | | .set('transDateStop') |
| | | .set('certifyDateB') |
| | | .set('fixState') |
| | | .set('nextFixDate') |
| | | .set('checkState') |
| | | .set('feePrintId') |
| | | .set('GPSBrand') |
| | | .set('GPSModel') |
| | | .set('GPSIMEI') |
| | | .set('GPSInstallDate') |
| | | .set('registerDate') |
| | | .set('commercialType'); |
| | | } |
| | | |
| | | TCarInfoDlg.oneChange = function (e) { |
| | | console.log(111) |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | TCarInfoDlg.oneChangeNext = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/oneChangeNext", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择账号</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#account").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | TCarInfoDlg.saveImg = function () { |
| | | var id=$("#id").val(); |
| | | var img=$("#welfarePicture").val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/saveImg", function(data){ |
| | | if(data.code == 200){ |
| | | Feng.success("保存成功") |
| | | } |
| | | }); |
| | | ajax.set("id",id); |
| | | ajax.set("img",img); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TCarInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | |
| | | let pCode = $("#pCode").val() |
| | | let cCode = $("#cCode").val() |
| | | let account = $("#account").val() |
| | | if(account==''){ |
| | | Feng.info("请选择所属账号") |
| | | return; |
| | | } |
| | | |
| | | let name = $("#name").val() |
| | | let phone = $("#phone").val() |
| | | |
| | | if(pCode=='' && $("#role")=="1"){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if(cCode=='' && $("#role")=="1"){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if(name==''){ |
| | | Feng.info("门店名称不能为空") |
| | | return; |
| | | } |
| | | if(phone==''){ |
| | | Feng.info("联系电话不能为空") |
| | | return; |
| | | } |
| | | |
| | | let address = $("#address").val() |
| | | |
| | | if(address==''){ |
| | | Feng.info("请输入地址") |
| | | return; |
| | | } |
| | | let time = $("#time").val() |
| | | |
| | | if(time==''){ |
| | | Feng.info("请填写营业时间") |
| | | return; |
| | | } |
| | | let intro = $("#intro").val() |
| | | |
| | | if(intro==''){ |
| | | Feng.info("请填写门店介绍") |
| | | return; |
| | | } |
| | | let userName = $("#userName").val() |
| | | |
| | | if(userName==''){ |
| | | Feng.info("请输入店长姓名") |
| | | return; |
| | | } |
| | | let userPhone = $("#userPhone").val() |
| | | |
| | | if(userPhone==''){ |
| | | Feng.info("请输入店长手机号") |
| | | return; |
| | | } |
| | | let img = $("#img").val() |
| | | |
| | | if(img==''){ |
| | | Feng.info("请上传门店封面") |
| | | return; |
| | | } |
| | | |
| | | let imgOne = $("#imgOne").val() |
| | | |
| | | if(imgOne==''){ |
| | | Feng.info("请上传实景图") |
| | | return; |
| | | } |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/add", function(data){ |
| | | if(data=="5001"){ |
| | | Feng.error("该店长手机号已经存在!") |
| | | }else |
| | | if(data.code == 200){ |
| | | if(language==1){ |
| | | Feng.success("添加成功!"); |
| | | }else if(language==2){ |
| | | Feng.success("Successfully added!"); |
| | | }else { |
| | | Feng.success("Sangat berhasil ditambah!"); |
| | | } |
| | | window.parent.TCompetition.table.refresh(); |
| | | TCarInfoDlg.close(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tCarInfoData); |
| | | ajax.set("provinceCode",pCode); |
| | | ajax.set("cityCode",cCode); |
| | | ajax.set("name",name); |
| | | ajax.set("phone",phone); |
| | | ajax.set("cityManagerId",account); |
| | | ajax.set("address",address); |
| | | ajax.set("time",time); |
| | | ajax.set("introduce",intro); |
| | | ajax.set("userName",userName); |
| | | ajax.set("userPhone",userPhone); |
| | | ajax.set("coverDrawing",img); |
| | | ajax.set("realPicture",imgOne); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TCarInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | |
| | | let pCode = $("#pCode").val() |
| | | let cCode = $("#cCode").val() |
| | | let account = $("#account").val() |
| | | if(account==''){ |
| | | Feng.info("请选择所属账号") |
| | | return; |
| | | } |
| | | |
| | | let name = $("#name").val() |
| | | let phone = $("#phone").val() |
| | | |
| | | if(pCode=='' && $("#role")=="1"){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if(cCode=='' && $("#role")=="1"){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if(name==''){ |
| | | Feng.info("门店名称不能为空") |
| | | return; |
| | | } |
| | | if(phone==''){ |
| | | Feng.info("联系电话不能为空") |
| | | return; |
| | | } |
| | | |
| | | let address = $("#address").val() |
| | | |
| | | if(address==''){ |
| | | Feng.info("请输入地址") |
| | | return; |
| | | } |
| | | let time = $("#time").val() |
| | | |
| | | if(time==''){ |
| | | Feng.info("请填写营业时间") |
| | | return; |
| | | } |
| | | let intro = $("#intro").val() |
| | | |
| | | if(intro==''){ |
| | | Feng.info("请填写门店介绍") |
| | | return; |
| | | } |
| | | let userName = $("#userName").val() |
| | | |
| | | if(userName==''){ |
| | | Feng.info("请输入店长姓名") |
| | | return; |
| | | } |
| | | let userPhone = $("#userPhone").val() |
| | | |
| | | if(userPhone==''){ |
| | | Feng.info("请输入店长手机号") |
| | | return; |
| | | } |
| | | let img = $("#img").val() |
| | | |
| | | |
| | | let imgOne = $("#imgOne").val() |
| | | |
| | | if(imgOne==''){ |
| | | Feng.info("请上传实景图") |
| | | return; |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/update", function(data){ |
| | | if(data=="5001"){ |
| | | Feng.error("该店长手机号已经存在!") |
| | | }else |
| | | if(data.code == 200){ |
| | | if(language==1){ |
| | | Feng.success("修改成功!"); |
| | | }else if(language==2){ |
| | | Feng.success("Modify successfully!"); |
| | | }else { |
| | | Feng.success("Mengubah dengan sukses!"); |
| | | } |
| | | window.parent.TCompetition.table.refresh(); |
| | | TCarInfoDlg.close(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("provinceCode",pCode); |
| | | ajax.set("cityCode",cCode); |
| | | ajax.set("name",name); |
| | | ajax.set("phone",phone); |
| | | ajax.set("cityManagerId",account); |
| | | ajax.set("address",address); |
| | | ajax.set("time",time); |
| | | ajax.set("introduce",intro); |
| | | ajax.set("userName",userName); |
| | | ajax.set("userPhone",userPhone); |
| | | ajax.set("coverDrawing",img); |
| | | ajax.set("realPicture",imgOne); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | Feng.initValidator("carInfoForm", TCarInfoDlg.validateFields); |
| | | // 初始化图片上传 |
| | | var carPhoto = new $WebUpload("c1"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("c2"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("c3"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("c4"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("c5"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("c6"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("c7"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("c8"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("img"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var drivingLicensePhoto = new $WebUpload("drivingLicensePhoto"); |
| | | drivingLicensePhoto.setUploadBarId("progressBar"); |
| | | drivingLicensePhoto.init(); |
| | | }); |
| | | |
| | | /** |
| | | * 选择分公司后执行 |
| | | */ |
| | | TCarInfoDlg.oneChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/onChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 类型改变执行 |
| | | * @param e |
| | | */ |
| | | TCarInfoDlg.companyTypeClick = function (e) { |
| | | if (1 == e){ |
| | | $(".companyDiv").hide(); |
| | | } else if (2 == e){ |
| | | $(".companyDiv").show(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 车辆品牌改变时执行 |
| | | */ |
| | | TCarInfoDlg.saveAllImg = function (e) { |
| | | var id = $("#id").val() |
| | | var px1 = $("#px1").val() |
| | | var px2 = $("#px2").val() |
| | | var px3 = $("#px3").val() |
| | | var px4 = $("#px4").val() |
| | | var px5 = $("#px5").val() |
| | | var px6 = $("#px6").val() |
| | | var px7 = $("#px7").val() |
| | | var px8 = $("#px8").val() |
| | | var c1 = $("#c1").val() |
| | | var c2 = $("#c2").val() |
| | | var c3 = $("#c3").val() |
| | | var c4 = $("#c4").val() |
| | | var c5 = $("#c5").val() |
| | | var c6 = $("#c6").val() |
| | | var c7 = $("#7").val() |
| | | var c8 = $("#c8").val() |
| | | var r1 = document.querySelector('input[name="r1"]').checked; |
| | | var r2 = document.querySelector('input[name="r2"]').checked; |
| | | var r3 = document.querySelector('input[name="r3"]').checked; |
| | | var r4 = document.querySelector('input[name="r4"]').checked; |
| | | var r5 = document.querySelector('input[name="r5"]').checked; |
| | | var r6 = document.querySelector('input[name="r6"]').checked; |
| | | var r7 = document.querySelector('input[name="r7"]').checked; |
| | | var r8 = document.querySelector('input[name="r8"]').checked; |
| | | if(r1){ |
| | | r1 =1 |
| | | }else{ |
| | | r1=0 |
| | | } |
| | | if(r2){ |
| | | r2 =1 |
| | | }else{ |
| | | r2=0 |
| | | } |
| | | if(r3){ |
| | | r3 =1 |
| | | }else{ |
| | | r3=0 |
| | | } |
| | | if(r4){ |
| | | r4 =1 |
| | | }else{ |
| | | r4=0 |
| | | } |
| | | if(r5){ |
| | | r5 =1 |
| | | }else{ |
| | | r5=0 |
| | | } |
| | | if(r6){ |
| | | r6 =1 |
| | | }else{ |
| | | r6=0 |
| | | } |
| | | if(r7){ |
| | | r7 =1 |
| | | }else{ |
| | | r7=0 |
| | | } |
| | | if(r8){ |
| | | r8 =1 |
| | | }else{ |
| | | r8=0 |
| | | } |
| | | |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/saveImgAll", function(data){ |
| | | if(data.code == 200){ |
| | | Feng.success("保存成功!"); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | },function(data){ |
| | | Feng.error("保存失败!" + data.responseJSON.message + "!"); |
| | | |
| | | }); |
| | | ajax.set("id",id); |
| | | ajax.set("px1",px1); |
| | | ajax.set("px2",px2); |
| | | ajax.set("px3",px3); |
| | | ajax.set("px4",px4); |
| | | ajax.set("px5",px5); |
| | | ajax.set("px6",px6); |
| | | ajax.set("px7",px7); |
| | | ajax.set("px8",px8); |
| | | ajax.set("c1",c1); |
| | | ajax.set("c2",c2); |
| | | ajax.set("c3",c3); |
| | | ajax.set("c4",c4); |
| | | ajax.set("c5",c5); |
| | | ajax.set("c6",c6); |
| | | ajax.set("c7",c7); |
| | | ajax.set("c8",c8); |
| | | ajax.set("r1",r1); |
| | | ajax.set("r2",r2); |
| | | ajax.set("r3",r3); |
| | | ajax.set("r4",r4); |
| | | ajax.set("r5",r5); |
| | | ajax.set("r6",r6); |
| | | ajax.set("r7",r7); |
| | | ajax.set("r8",r8); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 专车服务被点击 |
| | | */ |
| | | TCarInfoDlg.zcServerClick = function () { |
| | | var serverBox1 = $('#serverBox1').prop('checked'); |
| | | if (serverBox1){ |
| | | $("#zcModelDiv").show(); |
| | | } else { |
| | | $("#zcModelDiv").hide(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 跨城服务被点击 |
| | | */ |
| | | TCarInfoDlg.kcServerClick = function () { |
| | | var serverBox3 = $('#serverBox3').prop('checked'); |
| | | if (serverBox3){ |
| | | $("#kcModelDiv").show(); |
| | | } else { |
| | | $("#kcModelDiv").hide(); |
| | | } |
| | | } |
| | |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键ID', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: language==1?'添加时间':(language==2?'Add Time':'Tambahkan waktu'), field: 'insertTime', visible: true, align: 'center', valign: 'middle',width:'20%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.insertTime != '' && row.insertTime != null) { |
| | | var time = row.insertTime.replace(" ",'<br>'); |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.insertTime + '" onfocus="TUser.tooltip()">' + row.insertTime + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | {title: '省', field: 'insertTime', visible: true, align: 'center', valign: 'middle',width:'20%', |
| | | }, |
| | | {title: '站点名称', field: 'name', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.name != '' && row.name != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.name + '" onfocus="TUser.tooltip()">' + row.name + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | {title: '市', field: 'name', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '添加人ID', field: 'insertUserId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '创建者', field: 'insertUser', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.insertUser != '' && row.insertUser != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.insertUser + '" onfocus="TUser.tooltip()">' + row.insertUser + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | {title: '门店名称', field: 'insertUserId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '场地类型', field: 'insertUser', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '所属城市', field: 'province', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.province != '' && row.province != null) { |
| | | var str = ""; |
| | | if ("" != row.province && undefined != row.province){ |
| | | str = str + row.province+"-"; |
| | | } |
| | | if ("" != row.city && undefined != row.city){ |
| | | str = str + row.city+"-"; |
| | | } |
| | | if ("" != row.district && undefined != row.district){ |
| | | str = str + row.district+"-"; |
| | | } |
| | | str = str.substring(0,str.length-1); |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="'+ str +'" onfocus="TUser.tooltip()">' + str + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | {title: '场地名称', field: 'province', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '关联线路', field: 'lineNum', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.lineNum != '' && row.lineNum != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.lineNum + '" onfocus="TUser.tooltip()">' + row.lineNum + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | {title: '场地责任险有效期', field: 'lineNum', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: language==1?'状态':(language==2?'State':'Status'), field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.state != '' && row.state != null) { |
| | | if(row.state == 1){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="正常" onfocus="TUser.tooltip()">正常</p>'] |
| | | }else if(row.state == 2){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color: red;" title="冻结" onfocus="TUser.tooltip()">冻结</p>'] |
| | | } |
| | | } |
| | | return btn; |
| | | } |
| | | } |
| | | ]; |
| | | }; |
New file |
| | |
| | | package com.dsh.other.feignclient.activity.model; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class QueryUserCouponByIdAndUserId { |
| | | private Long id; |
| | | |
| | | private Integer userId; |
| | | } |