| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.dsh.account.dto.SelectDto; |
| | | import com.dsh.account.entity.Coach; |
| | | import com.dsh.account.entity.TAppUser; |
| | | import com.dsh.account.entity.TCourseInfoRecord; |
| | | import com.dsh.account.model.*; |
| | | import com.dsh.account.model.query.appUserQuery.QueryAppUser; |
| | | import com.dsh.account.model.vo.QueryAppUserVO; |
| | | import com.dsh.account.service.IVipPaymentService; |
| | | import com.dsh.account.service.TAppUserService; |
| | | import com.dsh.account.service.TCourseInfoRecordService; |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.PrintWriter; |
| | | import java.util.ArrayList; |
| | | import java.util.*; |
| | | import java.util.List; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | private TCourseInfoRecordService courseInfoRecordService; |
| | | |
| | | |
| | | /** |
| | | * 后台添加 |
| | | */ |
| | | @RequestMapping("/base/appUser/addAppUser1") |
| | | public Object addAppUser1(@RequestBody TAppUser query){ |
| | | // 修改 |
| | | if (query.getId()!=null){ |
| | | TAppUser phone = appUserService.getOne(new QueryWrapper<TAppUser>().eq("phone", query.getPhone()).ne("id",query.getId())); |
| | | if (null != phone){ |
| | | return 5001; |
| | | } |
| | | } |
| | | query.setIsVip(0); |
| | | query.setPassword("111111"); |
| | | query.setInsertTime(new Date()); |
| | | return appUserService.saveOrUpdate(query); |
| | | } |
| | | |
| | | /** |
| | | * 获取用户信息列表数据 |
| | | */ |
| | | @RequestMapping("/base/appUser/listAll") |
| | | public List<QueryAppUserVO> listAll(@RequestBody QueryAppUser query){ |
| | | |
| | | return appUserService.listAll(query); |
| | | } |
| | | |
| | | /** |
| | | * 根据用户手机号获取用户id |
| | | */ |
| | | @ResponseBody |
| | | @GetMapping("/base/appUser/getAppUserByPhone/{phone}") |
| | | public TAppUser getAppUserByPhone(@PathVariable("phone") String phone){ |
| | | TAppUser appUser = appUserService.getOne(new QueryWrapper<TAppUser>().eq("phone", phone)); |
| | | return appUser; |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/appUser/getSMSCode") |
| | |
| | | import com.dsh.account.entity.TStudent; |
| | | import com.dsh.account.feignclient.competition.model.PurchaseRecordVo; |
| | | import com.dsh.account.feignclient.course.model.RecordAppoint; |
| | | import com.dsh.account.model.vo.DetailsListVo; |
| | | import com.dsh.account.model.vo.classDetails.*; |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.*; |
| | | import com.dsh.account.model.vo.commentDetail.StuCommentsVo; |
| | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | import com.dsh.account.dto.TStudentDto; |
| | | import com.dsh.account.entity.TStudent; |
| | | import com.dsh.account.model.StudentVo; |
| | | import com.dsh.account.service.TAppUserService; |
| | | import com.dsh.account.service.TStudentService; |
| | | import com.dsh.account.util.ResultUtil; |
| | | import com.dsh.account.util.TokenUtil; |
| | | import io.micrometer.core.instrument.search.Search; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import jdk.nashorn.internal.ir.annotations.Ignore; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | public void createHistory(@RequestBody CreateHistoryDto createHistoryDto){ |
| | | createHistoryDto.setDate(new Date()); |
| | | studentService.createHistory(createHistoryDto); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/student/getHisory") |
| | | public List<GetHistoryDto> getHisory(){ |
| | | |
| | | List<GetHistoryDto> getHistoryDtos = studentService.getHistory(); |
| | | |
| | | return getHistoryDtos; |
| | | } |
| | | } |
| | |
| | | * 生日 |
| | | */ |
| | | @TableField("birthday") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date birthday; |
| | | /** |
| | | * 性别(1=男,2=女) |
| | |
| | | package com.dsh.account.entity; |
| | | |
| | | import java.util.Date; |
| | | import java.io.Serializable; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 学员信息 |
| | |
| | | package com.dsh.account.model.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | |
| | | * {title: '玩湃币数量', field: 'playPaiCoins', visible: true, align: 'center', valign: 'middle'}, |
| | | * {title: '充值类型', field: 'type', visible: true, align: 'center', valign: 'middle'}, |
| | | */ |
| | | private Integer id; |
| | | @JsonFormat(shape = JsonFormat.Shape.STRING) |
| | | private Long id; |
| | | private String provinceAndCity; |
| | | private String name; |
| | | private String phone; |
| | |
| | | import com.dsh.account.feignclient.other.model.StoreDetailList; |
| | | import com.dsh.account.feignclient.other.model.StoreInfo; |
| | | import com.dsh.account.feignclient.other.model.SysNotice; |
| | | import com.dsh.account.model.vo.classDetails.AppointmentRecordVo; |
| | | import com.dsh.account.model.vo.classDetails.ClasspaymentRequest; |
| | | import com.dsh.account.model.vo.classDetails.StuEditInfoReq; |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.ClassDetailsInsVo; |
| | |
| | | import com.dsh.account.mapper.TStudentMapper; |
| | | import com.dsh.account.model.vo.commentDetail.StuCommentsVo; |
| | | import com.dsh.account.service.EvaluateStudentService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | import com.dsh.account.mapper.CoachMapper; |
| | | import com.dsh.account.mapper.TAppUserMapper; |
| | | import com.dsh.account.mapper.TStudentMapper; |
| | | import com.dsh.account.model.vo.classDetails.AppointmentRecordVo; |
| | | import com.dsh.account.model.vo.classDetails.ClasspaymentRequest; |
| | | import com.dsh.account.model.vo.classDetails.StuEditInfoReq; |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.ClassDetailsInsVo; |
| | |
| | | import com.dsh.account.model.vo.sourceDetail.CouponStuAvailableVo; |
| | | import com.dsh.account.model.vo.sourceDetail.CourseDetailsOfContinuationResp; |
| | | import com.dsh.account.model.vo.sourceDetail.RecordTimeRequest; |
| | | import com.dsh.account.model.vo.userBenefitDetail.Goods; |
| | | import com.dsh.account.service.TCourseInfoRecordService; |
| | | import com.dsh.account.service.TStudentService; |
| | | import com.dsh.account.util.*; |
| | |
| | | <select id="rechargeList" resultType="com.dsh.account.model.vo.RechargeRecordsVO"> |
| | | select t1.id as id,t1.appUserId,t1.payTime as `time`,t1.amount as amount, |
| | | t1.playPaiCoins as playPaiCoins,CONCAT(t2.province,t2.city) as provinceAndCity, |
| | | t2.`name` as `name`,t2.phone as phone,t2.isVip as `type` from t_recharge_records t1 |
| | | t2.`name` as `name`,t2.phone as phone,t2.isVip as `type` from t_recharge_records3 t1 |
| | | left join t_app_user t2 on t2.id = t1.appUserId |
| | | <where> |
| | | <if test="query.city!=null and query.city!= ''"> |
| | | and t1.city = #{query.city} |
| | | and t2.city = #{query.city} |
| | | </if> |
| | | <if test="query.province!=null and query.province!= ''"> |
| | | and t1.province = #{query.province} |
| | | and t2.province = #{query.province} |
| | | </if> |
| | | <if test="query.name!=null and query.name!= ''"> |
| | | AND t1.name LIKE concat('%',#{query.name},'%') |
| | |
| | | and t2.isVip = #{query.type} |
| | | </if> |
| | | <if test="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''"> |
| | | and t1.payTime between #{sTime} and #{eTime} |
| | | and t1.insertTime between #{sTime} and #{eTime} |
| | | </if> |
| | | and t1.state != 3 |
| | | </where> |
| | |
| | | <if test="query.isVip!=null and query.isVip!= ''"> |
| | | and t1.isVip = #{query.isVip} |
| | | </if> |
| | | <if test="query.isVip!=null and query.isVip!= ''"> |
| | | and t1.isVip = #{query.isVip} |
| | | </if> |
| | | and t1.state != 3 |
| | | </where> |
| | | </select> |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.bouncycastle.math.Primes; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | return null; |
| | | } |
| | | } |
| | | /** |
| | | * 根据id获取课包 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/coursePackage/getCoursePackageByStoreId") |
| | | public List<TCoursePackage> getCoursePackageByStoreId(@RequestBody Integer storeId){ |
| | | |
| | | return coursePackageService.list(new QueryWrapper<TCoursePackage>().eq("storeId", storeId)); |
| | | } |
| | | /** |
| | | * 根据课包类型获取课包 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/coursePackage/getCoursePackageByType") |
| | | public List<TCoursePackage> getCoursePackageByType(@RequestBody Integer typeId){ |
| | | return coursePackageService.list(new QueryWrapper<TCoursePackage>().eq("coursePackageTypeId", typeId)); |
| | | } |
| | | /** |
| | | * 本周福利列表 |
| | | */ |
| | |
| | | @Autowired |
| | | private TCoursePackageDiscountService coursePackageDiscountService; |
| | | |
| | | |
| | | /** |
| | | * 获取根据课包id获取课包折扣 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackageDiscount/queryByCoursePackageId") |
| | | public List<TCoursePackageDiscount> queryByCoursePackageId(@RequestBody Integer coursePackageId){ |
| | | return coursePackageDiscountService.list(new QueryWrapper<TCoursePackageDiscount>().eq("coursePackageId", coursePackageId) |
| | | .eq("auditStatus", 2)); |
| | | } |
| | | /** |
| | | * 获取课包折扣 |
| | | * @param coursePackagePaymentConfigId |
| | |
| | | import com.dsh.course.feignclient.account.model.AppUser; |
| | | import com.dsh.course.feignclient.account.model.Student; |
| | | import com.dsh.course.feignclient.account.model.TCourseInfoRecord; |
| | | import com.dsh.course.feignclient.activity.CouponClient; |
| | | import com.dsh.course.feignclient.activity.model.Coupon; |
| | | import com.dsh.course.feignclient.model.*; |
| | | import com.dsh.course.feignclient.other.StoreClient; |
| | | import com.dsh.course.feignclient.other.model.Store; |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import net.bytebuddy.asm.Advice; |
| | | import org.aspectj.weaver.ast.Var; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | |
| | | @Autowired |
| | | private RestTemplate internalRestTemplate; |
| | | |
| | | |
| | | @Autowired |
| | | private CouponClient couponClient; |
| | | @Autowired |
| | | private StoreClient storeClient; |
| | | @Autowired |
| | | private TCoursePackageDiscountService discountService; |
| | | private final SimpleDateFormat format = new SimpleDateFormat("MM-dd HH:mm"); |
| | | |
| | | /** |
| | | * 手动支付 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/base/coursePackagePayment/changeState") |
| | | public Object changeState(@RequestBody CoursePackagePayDTO dto){ |
| | | |
| | | return packagePaymentService.changeState(dto); |
| | | } |
| | | /** |
| | | * 获取购课记录 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("/coursePackagePayment/listAll") |
| | | public List<CoursePackagePaymentVO> listAll(@RequestBody CoursePackagePaymentQuery query){ |
| | | List<CoursePackagePaymentVO> res = packagePaymentService.listAll(query); |
| | | List<CoursePackagePaymentVO> result = new ArrayList<>(); |
| | | for (CoursePackagePaymentVO re : res) { |
| | | if (re.getCashPayment()==null){ |
| | | String value = String.valueOf(re.getPlayPaiCoin()); |
| | | re.setCashPayment(new BigDecimal(value)); |
| | | } |
| | | |
| | | Store store = storeClient.queryStoreById(re.getStoreId()); |
| | | AppUser appUser = appUserClient.queryAppUser(re.getAppUserId()); |
| | | Student student = studentClient.queryStudentById(re.getStudentId()); |
| | | re.setPayStudent(student.getName()); |
| | | re.setPayUser(appUser.getName()); |
| | | re.setPhone(appUser.getPhone()); |
| | | re.setStoreName(store.getName()); |
| | | if (query.getPayUser()== null || query.getPayUser().equals("") ){ |
| | | }else{ |
| | | List<AppUser> appUsers = appUserClient.queryAppUserListByName(query.getPayUser()); |
| | | for (AppUser user : appUsers) { |
| | | if (appUser.getName().equals(user.getName())){ |
| | | result.add(re); |
| | | } |
| | | } |
| | | } |
| | | if (query.getPayStudent()== null || query.getPayStudent().equals("")){ |
| | | }else{ |
| | | List<Student> students = studentClient.queryStudentListByName(query.getPayStudent()); |
| | | for (Student student1 : students) { |
| | | if (student.getName().equals(student1.getName())){ |
| | | result.add(re); |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (re.getPayType()==1){ |
| | | re.setBuyTypeName("微信支付"); |
| | | }else if(re.getPayType()==2){ |
| | | re.setBuyTypeName("支付宝支付"); |
| | | }else if(re.getPayType()==3){ |
| | | re.setBuyTypeName("玩湃币支付"); |
| | | }else if(re.getPayType()==4){ |
| | | re.setBuyTypeName("积分支付"); |
| | | }else if(re.getPayType()==5){ |
| | | re.setBuyTypeName("积分+微信支付"); |
| | | }else if(re.getPayType()==6){ |
| | | re.setBuyTypeName("积分+支付宝支付"); |
| | | }else if(re.getPayType()==7){ |
| | | re.setBuyTypeName("手动支付"+"-"+re.getBuyTypeName()); |
| | | } |
| | | // 如果支付用户类型为平台 则购买方式则为1线下购买 |
| | | if (re.getPayUserType()== 2){ |
| | | re.setBuyType(1); |
| | | }else{ |
| | | // 如果当前课包有折扣 则为3折扣购买 |
| | | if (discountService.list(new QueryWrapper<TCoursePackageDiscount>() |
| | | .eq("coursePackageId",re.getCoursePackageId()).eq("auditStatus",2)).size()>0){ |
| | | re.setBuyType(3); |
| | | re.setDiscountAmount(re.getOriginalPrice().subtract(re.getPayMoney())); |
| | | }else{ |
| | | re.setBuyType(2); |
| | | } |
| | | } |
| | | // 不为空则计算 |
| | | if (re.getUserCouponId()!=null){ |
| | | |
| | | } |
| | | // todo 计算优惠金额 |
| | | // Coupon coupon = couponClient.queryCouponById(re.getUserCouponId().intValue()); |
| | | } |
| | | if (query.getPayStudent()== null || query.getPayStudent().equals("")){ |
| | | if (query.getPayUser()== null || query.getPayUser().equals("")){ |
| | | return res; |
| | | }else{ |
| | | return result; |
| | | } |
| | | }else{ |
| | | return result; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取 没有学员信息的图片配置 |
| | | * @param stuId 学员id |
| | | * @return 课包列表 |
| | |
| | | @Autowired |
| | | private TCoursePackageService tCoursePackageService; |
| | | |
| | | |
| | | /** |
| | | * 根据ids获取类型 |
| | | */ |
| | | @RequestMapping("/coursePackageType/getByCourseIds") |
| | | public List<TCoursePackageType> getByCourseIds(@RequestBody List<Integer> ids){ |
| | | return coursePackageTypeService.list(new QueryWrapper<TCoursePackageType>().in("id",ids)); |
| | | } |
| | | /** |
| | | * 新增课包类型 |
| | | */ |
| | |
| | | @TableField("useTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date useTime; |
| | | |
| | | /** |
| | | * 平台手动支付时使用 |
| | | */ |
| | | @TableField("payUserName") |
| | | private String payUserName; |
| | | } |
| | |
| | | |
| | | |
| | | /** |
| | | * 根据管理员id获取 |
| | | */ |
| | | /** |
| | | * 根据名称模糊搜索门店 |
| | | * @param name |
| | | * @return |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.course.entity.CoursePackagePaymentConfig; |
| | | import com.dsh.course.model.CoursePackagePayDTO; |
| | | import com.dsh.course.model.CoursePackagePaymentQuery; |
| | | import com.dsh.course.model.CoursePackagePaymentVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/6/29 10:44 |
| | | */ |
| | | public interface CoursePackagePaymentConfigMapper extends BaseMapper<CoursePackagePaymentConfig> { |
| | | List<CoursePackagePaymentVO> listAll(@Param("query") CoursePackagePaymentQuery query); |
| | | |
| | | int changeState(@Param("ids") List<Long> ids,@Param("payUserName") String payUserName,@Param("payUserId") Integer payUserId); |
| | | } |
New file |
| | |
| | | package com.dsh.course.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 购课记录 手动支付dto |
| | | */ |
| | | @Data |
| | | public class CoursePackagePayDTO { |
| | | private List<String> ids; |
| | | private String payUserName; |
| | | // 操作人id |
| | | private Integer userId; |
| | | // 操作人类型 1 = 平台 2 = 城市管理员 3 = 门店 |
| | | private Integer type; |
| | | } |
New file |
| | |
| | | package com.dsh.course.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 购课记录列表查询Query |
| | | */ |
| | | @Data |
| | | public class CoursePackagePaymentQuery { |
| | | // 省 |
| | | private String province; |
| | | // 市 |
| | | private String city; |
| | | // 门店名称 |
| | | private String storeName; |
| | | // 门店id |
| | | private List<Integer> storeIds; |
| | | // 课包类型 |
| | | private Integer coursePackageTypeId; |
| | | // 课包名称 |
| | | private String coursePackageTypeName; |
| | | // 支付状态 1=待支付 2=已支付 |
| | | private Integer payStatus; |
| | | // 购买用户 |
| | | private String payUser; |
| | | // 购买学员 |
| | | private String payStudent; |
| | | } |
New file |
| | |
| | | package com.dsh.course.model; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * 购课记录列表VO |
| | | */ |
| | | @Data |
| | | public class CoursePackagePaymentVO { |
| | | /** |
| | | * |
| | | {title: 'ID', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '所在省市', field: 'provinceAndCity', visible: role==1?true:false, align: 'center', valign: 'middle'}, |
| | | {title: '门店名称', field: 'storeName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '课包类型', field: 'coursePackageType', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '课包名称', field: 'coursePackage', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '购买用户', field: 'payUser', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '联系方式', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '购课学员', field: 'payStudent', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '购买方式', field: 'buyType', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付方式', field: 'payType', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) {return{1:"微信",2:"支付宝",3:"玩湃币",4:"积分",5:"积分+微信",6:"积分+支付宝"}[data]}}, |
| | | {title: '总金额', field: 'originalPrice'+'元', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠金额', field: 'discountAmount'+'元', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付价格', field: 'cashPayment'+'元', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付状态', field: 'payStatus', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '赠送课时', field: 'giftClassHours', visible: true, align: 'center', valign: 'middle'}, |
| | | */ |
| | | @JsonFormat(shape = JsonFormat.Shape.STRING) |
| | | private Long id; |
| | | private String provinceAndCity; |
| | | // 门店id |
| | | private Integer storeId; |
| | | private String storeName; |
| | | private Integer coursePackageTypeId; |
| | | private String coursePackageType; |
| | | private String coursePackage; |
| | | private Integer coursePackageId; |
| | | // 用户id |
| | | private Integer appUserId; |
| | | private String payUser; |
| | | private String phone; |
| | | // 学员id |
| | | private Integer studentId; |
| | | private String payStudent; |
| | | private Integer payType; |
| | | private BigDecimal originalPrice; |
| | | // 优惠券id |
| | | private Long userCouponId; |
| | | // 优惠金额 |
| | | private BigDecimal discountAmount; |
| | | // 支付状态 |
| | | private Integer payStatus; |
| | | private Integer giftClassHours; |
| | | // 1= 用户支付 2= 管理员支付 |
| | | private Integer payUserType; |
| | | // 支付用户id |
| | | private Integer payUserId; |
| | | // 支付金额 |
| | | private BigDecimal payMoney; |
| | | // 现金支付金额 |
| | | private BigDecimal cashPayment; |
| | | // 玩湃币价格/积分 |
| | | private Integer playPaiCoin; |
| | | // 购买方式 1 线下 2线上 3折扣 |
| | | private Integer buyType; |
| | | // 当状态为手动支付时使用 用于显示手动支付时显示操作人 |
| | | private String buyTypeName; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.course.entity.TCoursePackagePayment; |
| | | import com.dsh.course.feignclient.model.RecordAppoint; |
| | | import com.dsh.course.model.QueryRegistrationRecord; |
| | | import com.dsh.course.model.QueryWalkInStudentList; |
| | | import com.dsh.course.model.BillingRequest; |
| | | import com.dsh.course.model.*; |
| | | import com.dsh.course.model.vo.RegisterCourseVo; |
| | | import com.dsh.course.model.vo.request.*; |
| | | import com.dsh.course.model.vo.response.*; |
| | |
| | | void updateUseTime(Long id, Date date); |
| | | |
| | | List<Integer> getStudentIds(Integer payId); |
| | | |
| | | List<CoursePackagePaymentVO> listAll(CoursePackagePaymentQuery query); |
| | | |
| | | int changeState(CoursePackagePayDTO dto); |
| | | } |
| | |
| | | import com.dsh.course.entity.TCoursePackageType; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 课程包类型 服务类 |
| | |
| | | import com.dsh.course.feignclient.other.StoreClient; |
| | | import com.dsh.course.feignclient.other.model.Store; |
| | | import com.dsh.course.mapper.*; |
| | | import com.dsh.course.model.BillingRequest; |
| | | import com.dsh.course.model.QueryRegistrationRecord; |
| | | import com.dsh.course.model.QueryWalkInStudentList; |
| | | import com.dsh.course.model.*; |
| | | import com.dsh.course.model.dto.DiscountJsonDto; |
| | | import com.dsh.course.model.vo.RegisterCourseVo; |
| | | import com.dsh.course.model.vo.request.*; |
| | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<CoursePackagePaymentVO> listAll(CoursePackagePaymentQuery query) { |
| | | return cpConfigMapper.listAll(query); |
| | | } |
| | | |
| | | @Override |
| | | public int changeState(CoursePackagePayDTO dto) { |
| | | List<String> ids = dto.getIds(); |
| | | List<Long> list = new ArrayList<>(); |
| | | for (String id : ids) { |
| | | long value = Long.parseLong(id); |
| | | list.add(value); |
| | | } |
| | | return cpConfigMapper.changeState(list,dto.getPayUserName(),dto.getUserId()); |
| | | } |
| | | |
| | | /** |
| | | * 获取课包购买人数 |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | <mapper namespace="com.dsh.course.mapper.CancelledClassesMapper"> |
| | | |
| | | <select id="listAll" resultType="com.dsh.course.model.CancelClassesVO"> |
| | | select t1.insertTime as insertTime,t2.coachId as coachId,CONCAT(t2.province,t2.city) as provinceAndCity, |
| | | t2.storeId as storeId,CONCAT(t3.classDate,t3.endDate) as startAndEnd, |
| | | t5.name as `courseName`,t4.appUserId as studentId from t_cancelled_classes t1 |
| | | left join t_course_package t2 on t1.coursePackageId = t2.id |
| | | left join t_course_package_scheduling t3 on t3.coursePackageId = t2.id |
| | | left join t_course_package_student t4 on t4.coursePackageSchedulingId = t3.id |
| | | left join t_course t5 on t3.courseId = t5.id |
| | | SELECT |
| | | t1.*, |
| | | t2.name, |
| | | CONCAT(t2.province, t2.city) AS provinceAndCity, |
| | | t2.storeId, |
| | | CONCAT(t3.classDate, t3.endDate) AS startAndEnd |
| | | FROM |
| | | t_cancelled_classes t1 |
| | | LEFT JOIN |
| | | t_course_package t2 ON t1.coursePackageId = t2.id |
| | | LEFT JOIN (SELECT id,classDate,endDate FROM t_course_package_scheduling |
| | | ) t3 |
| | | ON t1.coursePackageSchedulingId = t3.id |
| | | <where> |
| | | <if test="query.courseName!=null and query.courseName!= ''"> |
| | | and t5.name = #{query.courseName} |
| | |
| | | <result column="cashPayment" property="cashPayment" /> |
| | | <result column="playPaiCoin" property="playPaiCoin" /> |
| | | </resultMap> |
| | | <update id="changeState"> |
| | | update t_course_package_payment2 set |
| | | payStatus = 2,payUserName = #{payUserName},payType = 7,payUserId=#{payUserId} |
| | | <where> |
| | | <if test="ids != null and ids.size()>0"> |
| | | AND t_course_package_payment2.id IN |
| | | <foreach collection="ids" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </update> |
| | | |
| | | <select id="listAll" resultType="com.dsh.course.model.CoursePackagePaymentVO"> |
| | | select t1.id,t1.studentId,t1.payUserType,t1.payStatus,t1.payType,t1.originalPrice,t1.userCouponId,t1.payUserId,t1.giftClassHours,t1.studentId,t1.appUserId,t1.cashPayment,t1.playPaiCoin, |
| | | t1.payUserName as buyTypeName, |
| | | CONCAT(t2.province,t2.city) as provinceAndCity,t2.coursePackageTypeId,t2.storeId,t2.name as coursePackage, |
| | | t3.name as coursePackageType |
| | | from t_course_package_payment2 t1 |
| | | left join t_course_package t2 on t1.coursePackageId = t2.id |
| | | left join t_course_package_type t3 on t2.coursePackageTypeId = t3.id |
| | | <where> |
| | | <if test="query.province!=null and query.province!= ''"> |
| | | and t2.province = #{query.province} |
| | | </if> |
| | | <if test="query.city!=null and query.city!= ''"> |
| | | and t2.city = #{query.city} |
| | | </if> |
| | | <if test="query.coursePackageTypeId!=null and query.coursePackageTypeId!= ''"> |
| | | and t3.id = #{query.coursePackageTypeId} |
| | | </if> |
| | | <if test="query.coursePackageTypeName!=null and query.coursePackageTypeName!= ''"> |
| | | and t2.name like concat('%',#{query.coursePackageTypeName},'%') |
| | | </if> |
| | | <if test="query.payStatus!=null and query.payStatus!= ''"> |
| | | and t1.payStatus = #{query.payStatus} |
| | | </if> |
| | | <if test="query.payStatus!=null and query.payStatus!= ''"> |
| | | and t1.payStatus = #{query.payStatus} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | import com.dsh.course.feignClient.account.model.TAppUser; |
| | | import com.dsh.guns.modular.system.model.TStudent; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.util.List; |
| | | |
| | | @FeignClient("mb-cloud-account") |
| | | public interface AppUserClient { |
| | | |
| | | /** |
| | | * 后台添加 |
| | | */ |
| | | @RequestMapping("/base/appUser/addAppUser1") |
| | | Object addAppUser1(@RequestBody TAppUser query); |
| | | /** |
| | | * 获取用户学员列表 |
| | | * @param appUserId |
| | | * @return |
| | | */ |
| | | @PostMapping("/student/queryStudentList") |
| | | List<TStudent> queryStudentList(@RequestBody Integer appUserId); |
| | | /** |
| | | * 根据用户手机号获取用户id |
| | | */ |
| | | @GetMapping("/base/appUser/getAppUserByPhone/{phone}") |
| | | TAppUser getAppUserByPhone(@PathVariable("phone") String phone); |
| | | |
| | | @PostMapping("/base/appUser/queryByNamePhone") |
| | | List<TAppUser> queryByNamePhone(QueryByNamePhone queryByNamePhone); |
| | |
| | | * 生日 |
| | | */ |
| | | @TableField("birthday") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date birthday; |
| | | /** |
| | | * 性别(1=男,2=女) |
| | |
| | | import com.dsh.course.feignClient.course.model.TCoursePackage; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | |
| | | |
| | | /** |
| | | * 根据课包类型获取课包 |
| | | */ |
| | | @PostMapping("/base/coursePackage/getCoursePackageByType") |
| | | List<TCoursePackage> getCoursePackageByType(@RequestBody Integer typeId); |
| | | /** |
| | | * 根据门店id获取课包 |
| | | */ |
| | | @PostMapping("/base/coursePackage/getCoursePackageByStoreId") |
| | | List<TCoursePackage> getCoursePackageByStoreId(@RequestBody Integer storeId); |
| | | /** |
| | | * 获取课包管理列表数据 |
| | | * @param queryCoursePackageLists |
| | | * @return |
| | |
| | | import com.dsh.course.feignClient.course.model.TCoursePackageDiscount; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | public interface CoursePackageDiscountClient { |
| | | |
| | | /** |
| | | * 获取根据课包id获取课包折扣 |
| | | */ |
| | | @PostMapping("/coursePackageDiscount/queryByCoursePackageId") |
| | | List<TCoursePackageDiscount> queryByCoursePackageId(@RequestBody Integer coursePackageId); |
| | | /** |
| | | * 获取课包折扣 |
| | | * @param coursePackagePaymentConfigId |
| | | * @return |
| | |
| | | import com.dsh.course.feignClient.course.model.QueryRegistrationRecord; |
| | | import com.dsh.course.feignClient.course.model.QueryWalkInStudentList; |
| | | import com.dsh.course.feignClient.course.model.TCoursePackagePayment; |
| | | import com.dsh.guns.modular.system.model.CoursePackagePayDTO; |
| | | import com.dsh.guns.modular.system.model.CoursePackagePaymentQuery; |
| | | import com.dsh.guns.modular.system.model.CoursePackagePaymentVO; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | @FeignClient("mb-cloud-course") |
| | | public interface CoursePackagePaymentClient { |
| | | |
| | | /** |
| | | * 获取学员剩余课时 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @PostMapping("/coursePackagePayment/queryResidueClassHourById") |
| | | public Integer queryResidueClassHourById(@RequestBody Long id); |
| | | |
| | | /** |
| | | * 手动支付 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/base/coursePackagePayment/changeState") |
| | | Object changeState(@RequestBody CoursePackagePayDTO dto); |
| | | /** |
| | | * 获取购课记录 |
| | | */ |
| | | @RequestMapping("/coursePackagePayment/listAll") |
| | | List<CoursePackagePaymentVO> listAll(@RequestBody CoursePackagePaymentQuery query); |
| | | /** |
| | | * 获取课程报名信息列表 |
| | | * @param queryRegistrationRecord |
| | | * @return |
| | |
| | | @FeignClient("mb-cloud-course") |
| | | public interface CoursePackageTypeClient { |
| | | |
| | | |
| | | /** |
| | | * 根据ids获取类型 |
| | | */ |
| | | @RequestMapping("/coursePackageType/getByCourseIds") |
| | | List<TCoursePackageType> getByCourseIds(@RequestBody List<Integer> ids); |
| | | /** |
| | | * 删除课包类型 |
| | | * @param |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 位置(1=首页,2=首页底部,3=线上课得积分,4=看视频得奖励,5=常见问题) |
| | | * 位置(1=首页,2=线上课得积分,3=看视频得奖励,4=常见问题) |
| | | */ |
| | | @TableField("position") |
| | | private Integer position; |
| | |
| | | @TableField("img") |
| | | private String img; |
| | | /** |
| | | * 跳转页面 |
| | | * 跳转页面id |
| | | */ |
| | | @TableField("jumpPage") |
| | | private String jumpPage; |
| | | private Integer jumpPage; |
| | | /** |
| | | * 排序 |
| | | */ |
| | |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date insertTime; |
| | | /** |
| | | * 跳转模块 |
| | |
| | | @TableField("turnId") |
| | | private String turnId; |
| | | /** |
| | | * 跳转页面id |
| | | * 跳转页面 |
| | | */ |
| | | @TableField("pageId") |
| | | private Integer pageId; |
| | | @TableField("page") |
| | | private String page; |
| | | /** |
| | | * 跳转类型id |
| | | */ |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.model.TStoreListVo; |
| | | import com.dsh.guns.modular.system.model.TTurn; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | void delete1(@Param("id") Integer id); |
| | | |
| | | List<TTurn> pageList(); |
| | | |
| | | List<TTurn> getPage(@Param("ids") List<Integer> ids); |
| | | } |
| | |
| | | import com.dsh.course.feignClient.other.model.Banner; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.modular.system.model.AdvertisementChangeStateDTO; |
| | | import com.dsh.guns.modular.system.model.AdvertisementQuery; |
| | | import com.dsh.guns.modular.system.model.CoachQuery; |
| | | import com.dsh.guns.modular.system.model.User; |
| | | 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.util.ResultUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 广告管理控制器 |
| | |
| | | private CityManagerClient cityManagerClient; |
| | | @Autowired |
| | | private BannerClient bannerClient; |
| | | |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | /** |
| | | * 跳转到广告页面 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | |
| | | model.addAttribute("pages",1); |
| | | List<TTurn> pages = storeService.pageList(); |
| | | List<Integer> ids = new ArrayList<>(); |
| | | for (TTurn page : pages) { |
| | | ids.add(page.getId()); |
| | | } |
| | | List<TTurn> res = storeService.getPage(ids); |
| | | model.addAttribute("pages",res); |
| | | model.addAttribute("models",1); |
| | | |
| | | return PREFIX + "advertisement.html"; |
| | | } |
| | | /** |
| | |
| | | @RequestMapping("/update/{id}/{type}") |
| | | public String store(Model model, @PathVariable("id") Integer id,@PathVariable("type")Integer type) { |
| | | Banner data = bannerClient.getById(id); |
| | | List<Map<String, Object>> pages = storeService.typeChange(data.getModel()); |
| | | List<Map<String, Object>> types = storeService.typeChangeOne(data.getJumpPage()); |
| | | // type=1 查看详情 type=2 编辑 |
| | | if (type == 1){ |
| | | model.addAttribute("type",1); |
| | |
| | | Integer roleType = UserExt.getUser().getObjectType(); |
| | | model.addAttribute("roleType",roleType); |
| | | model.addAttribute("data",data); |
| | | model.addAttribute("pages",pages); |
| | | model.addAttribute("types",types); |
| | | return PREFIX + "advertisement_edit.html"; |
| | | } |
| | | |
| | |
| | | * 广告上下架 |
| | | */ |
| | | @RequestMapping("/changeState") |
| | | public Object changeState(AdvertisementChangeStateDTO dto) { |
| | | |
| | | return bannerClient.changeState(dto); |
| | | @ResponseBody |
| | | public Object changeState(@RequestBody AdvertisementChangeStateDTO dto) { |
| | | bannerClient.changeState(dto); |
| | | return ResultUtil.success(); |
| | | } |
| | | /** |
| | | * 添加广告 |
| | |
| | | @ResponseBody |
| | | @RequestMapping(value = "/addAdvertisement") |
| | | public ResultUtil addAdvertisement(@RequestBody Banner banner) { |
| | | banner.setInsertTime(new Date()); |
| | | bannerClient.addAdvertisement(banner); |
| | | return ResultUtil.success("添加成功"); |
| | | } |
| | | /** |
| | | * 添加广告 |
| | | * 编辑广告 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/updateAdvertisement") |
| | | public ResultUtil updateAdvertisement(@RequestBody Banner banner) { |
| | | |
| | | Banner byId = bannerClient.getById(banner.getId()); |
| | | // 如果为空 则没有改变图片 |
| | | if (banner.getImg().equals("")||banner==null){ |
| | | banner.setImg(byId.getImg()); |
| | | } |
| | | bannerClient.updateAdvertisement(banner); |
| | | return ResultUtil.success("添加成功"); |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.dsh.course.feignClient.account.AppUserClient; |
| | | import com.dsh.course.feignClient.account.CityManagerClient; |
| | | import com.dsh.course.feignClient.account.model.CityManager; |
| | | import com.dsh.course.feignClient.account.model.Coach; |
| | | import com.dsh.course.feignClient.account.model.TAppUser; |
| | | import com.dsh.course.feignClient.course.*; |
| | | import com.dsh.course.feignClient.course.model.*; |
| | | import com.dsh.course.feignClient.other.BannerClient; |
| | | import com.dsh.course.feignClient.other.SiteClient; |
| | | import com.dsh.course.feignClient.other.StoreClient; |
| | | import com.dsh.course.feignClient.other.model.Banner; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.ICoursePackageService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 广告管理控制器 |
| | | * |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/cpPayment") |
| | | public class CoursePackagePaymentController extends BaseController { |
| | | private String PREFIX = "/system/cpPayment/"; |
| | | @Autowired |
| | | private BannerClient bannerClient; |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | @Autowired |
| | | private ICityService cityService; |
| | | @Autowired |
| | | private CoursePackageTypeClient coursePackageTypeClient; |
| | | @Autowired |
| | | private CoursePackagePaymentClient coursePackagePaymentClient; |
| | | @Autowired |
| | | private AppUserClient appUserClient; |
| | | @Autowired |
| | | private StoreClient storeClient; |
| | | @Autowired |
| | | private CoursePackageDiscountClient coursePackageDiscountClient; |
| | | @Autowired |
| | | private CoursePackagePaymentConfigClient coursePackagePaymentConfigClient; |
| | | @Autowired |
| | | private CoursePackageClient coursePackageClient; |
| | | @Autowired |
| | | private SiteClient siteClient; |
| | | /** |
| | | * 跳转到购课记录页面 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | List<TCoursePackageType> coursePackage = coursePackageTypeClient.queryAllCoursePackageType(); |
| | | model.addAttribute("coursePackage",coursePackage); |
| | | model.addAttribute("list",list); |
| | | Integer roleType = UserExt.getUser().getObjectType(); |
| | | model.addAttribute("roleType",roleType); |
| | | return PREFIX + "cpPayment.html"; |
| | | } |
| | | /** |
| | | * 跳转到广告添加页面 |
| | | */ |
| | | @RequestMapping("/add") |
| | | public String operator(Model model) { |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | Integer roleType = UserExt.getUser().getObjectType(); |
| | | model.addAttribute("roleType",roleType); |
| | | return PREFIX + "cpPayment_add.html"; |
| | | } |
| | | /** |
| | | * 添加购课记录 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/addCoursePackagePayment") |
| | | public ResultUtil addCoach(@RequestBody TCoursePackagePayment tCoursePackagePayment) { |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | tCoursePackagePayment.setPayUserId(objectId); |
| | | // 获取课包id |
| | | Integer coursePackageId = tCoursePackagePayment.getCoursePackageId(); |
| | | |
| | | List<TCoursePackageDiscount> list = coursePackageDiscountClient.queryByCoursePackageId(coursePackageId); |
| | | TCoursePackageDiscount tCoursePackageDiscount1 = list.get(0); |
| | | Integer coursePackagePaymentConfigId = tCoursePackageDiscount1.getCoursePackagePaymentConfigId(); |
| | | List<CoursePackagePaymentConfig> coursePackagePaymentConfigs = coursePackagePaymentConfigClient.queryCoursePackagePaymentConfigList(coursePackageId); |
| | | // 获取siteId 判断预约人数 |
| | | // todo |
| | | Integer coursePackageId1 = tCoursePackagePayment.getCoursePackageId(); |
| | | TCoursePackage tCoursePackage = coursePackageClient.queryById(coursePackageId1); |
| | | Integer siteId = tCoursePackage.getSiteId(); |
| | | // tCoursePackagePayment.setCashPayment(); |
| | | // tCoursePackagePayment.setPlayPaiCoin(); |
| | | return ResultUtil.success("添加成功"); |
| | | } |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/listAll") |
| | | @ResponseBody |
| | | public List<CoursePackagePaymentVO> listAll(CoursePackagePaymentQuery query) { |
| | | return coursePackagePaymentClient.listAll(query); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/pay") |
| | | @ResponseBody |
| | | public Object pay(@RequestBody CoursePackagePayDTO dto) { |
| | | |
| | | String name = UserExt.getUser().getName(); |
| | | dto.setPayUserName(name); |
| | | dto.setUserId(UserExt.getUser().getId()); |
| | | coursePackagePaymentClient.changeState(dto); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | /** |
| | | * 根据用户电话 获取用户 |
| | | */ |
| | | @RequestMapping(value = "/getUserByPhone/{phone}") |
| | | @ResponseBody |
| | | public TAppUser getUserByPhone(@PathVariable("phone") String phone) { |
| | | return appUserClient.getAppUserByPhone(phone); |
| | | } |
| | | /** |
| | | * 根据用户id 获取用户电话 |
| | | */ |
| | | @RequestMapping(value = "/queryStudentList") |
| | | @ResponseBody |
| | | public List<TStudent> queryStudentList(Integer appUserId) { |
| | | return appUserClient.queryStudentList(appUserId); |
| | | } |
| | | |
| | | /** |
| | | * 根据市获取门店 |
| | | */ |
| | | @RequestMapping(value = "/getStore") |
| | | @ResponseBody |
| | | public List<Store> getStore(String city) { |
| | | return storeClient.getStore(city); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | import com.dsh.course.feignClient.activity.model.QueryBodySideAppointmentVO; |
| | | import com.dsh.course.feignClient.other.StoreClient; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.modular.system.model.Store; |
| | | import com.dsh.guns.modular.system.model.TCity; |
| | | import com.dsh.guns.modular.system.model.TSiteType; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.IRoleService; |
| | | import com.dsh.guns.modular.system.service.IUserService; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | public class TAppUserController { |
| | | private String PREFIX = "/system/appUser/"; |
| | | @Autowired |
| | | private IUserService userService; |
| | | @Autowired |
| | | private StoreClient storeClient; |
| | | @Autowired |
| | | private BodySideAppointmentClient bodySideAppointmentClient; |
| | |
| | | private AppUserClient appUserClient; |
| | | @Autowired |
| | | private ICityService cityService; |
| | | @Autowired |
| | | private IRoleService roleService; |
| | | |
| | | /** |
| | | * 跳转体测预约管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | Integer roleType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | List<Role> deptid = roleService.list(new QueryWrapper<Role>().eq("deptid", 2)); |
| | | model.addAttribute("roleType",roleType); |
| | | model.addAttribute("objectId",objectId); |
| | | List<CityManager> province = cityManagerClient.listAll(); |
| | | // 已有城市管理的省 |
| | | ArrayList<String> list1 = new ArrayList<>(); |
| | | // 已有城市管理的市 |
| | | ArrayList<String> list2 = new ArrayList<>(); |
| | | for (CityManager cityManager : province) { |
| | | list1.add(cityManager.getProvince()); |
| | | list2.add(cityManager.getCity()); |
| | | } |
| | | HashSet<String> set = new HashSet<String>(list1); |
| | | model.addAttribute("list",set); |
| | | model.addAttribute("sales",deptid); |
| | | model.addAttribute("list",list); |
| | | return PREFIX + "TAppUser.html"; |
| | | } |
| | | /** |
| | |
| | | @RequestMapping("/add") |
| | | public String add(Model model) { |
| | | Integer roleType = UserExt.getUser().getObjectType(); |
| | | List<CityManager> province = cityManagerClient.listAll(); |
| | | Set<String> seenNames = new HashSet<>(); |
| | | List<CityManager> result = new ArrayList<>(); |
| | | for (CityManager cityManager : province) { |
| | | if(!seenNames.contains(cityManager.getProvince())){ |
| | | result.add(cityManager); |
| | | seenNames.add(cityManager.getProvince()); |
| | | } |
| | | } |
| | | if (roleType == 2){ |
| | | Integer cityManagerId = UserExt.getUser().getObjectId(); |
| | | CityManager cityManager = cityManagerClient.queryCityManagerById(cityManagerId); |
| | | List<Store> stores = storeClient.getStoreByCityManagerId(cityManagerId); |
| | | model.addAttribute("stores",stores); |
| | | } |
| | | model.addAttribute("list",result); |
| | | |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | List<User> sales = userService.list(new QueryWrapper<User>().eq("deptid", 2)); |
| | | model.addAttribute("list",list); |
| | | model.addAttribute("roleType",roleType); |
| | | model.addAttribute("sales",sales); |
| | | return PREFIX + "TAppUser_add.html"; |
| | | } |
| | | |
| | |
| | | } |
| | | /** |
| | | * 跳转体测预约管理编辑页面 |
| | | * @param type 1 = 用户管理编辑 2 = 用户管理详情-非会员 3 = 用户管理详情-会员 |
| | | * @param type 1 = 用户管理编辑 2 = 用户管理详情 |
| | | */ |
| | | @RequestMapping("/update/{id}/{type}") |
| | | public String update(Model model,@PathVariable("id") Integer id,@PathVariable("type") Integer type) { |
| | | Integer roleType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | BodySideAppointment data = bodySideAppointmentClient.getInfoById(id); |
| | | if (roleType == 1){ |
| | | List<CityManager> cityManagers = cityManagerClient.listAll(); |
| | | List<CityManager> province = new ArrayList<>(); |
| | | List<CityManager> city = new ArrayList<>(); |
| | | Set<String> seenNames = new HashSet<>(); |
| | | Set<String> c = new HashSet<>(); |
| | | // 省列表 |
| | | List<CityManager> result = new ArrayList<>(); |
| | | // 市列表 |
| | | List<CityManager> cities = new ArrayList<>(); |
| | | // 对省/市去重 |
| | | for (CityManager cityManager : cityManagers) { |
| | | if(!seenNames.contains(cityManager.getProvince())){ |
| | | result.add(cityManager); |
| | | seenNames.add(cityManager.getProvince()); |
| | | } |
| | | if(!c.contains(cityManager.getProvince())){ |
| | | cities.add(cityManager); |
| | | c.add(cityManager.getProvince()); |
| | | } |
| | | } |
| | | List<Store> stores = storeClient.getStore(data.getCity()); |
| | | model.addAttribute("stores",stores); |
| | | model.addAttribute("list",result); |
| | | model.addAttribute("cities",cities); |
| | | }else if (roleType == 2){ |
| | | List<Store> stores = storeClient.getStoreByCityManagerId(objectId); |
| | | model.addAttribute("stores",stores); |
| | | } |
| | | String birthday = new SimpleDateFormat("yyyy-MM-dd").format(data.getBirthday()); |
| | | String appointmentTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(data.getAppointmentTime()); |
| | | model.addAttribute("birthday",birthday); |
| | | model.addAttribute("appointmentTime",appointmentTime); |
| | | model.addAttribute("data",data); |
| | | TAppUser data = appUserClient.queryById(id); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | String province = data.getProvince(); |
| | | TCity province1 = cityService.getOne(new QueryWrapper<TCity>().eq("name", data.getProvince())); |
| | | List<TCity> city = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, province1.getId())); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String format1 = format.format(data.getBirthday()); |
| | | List<User> sales = userService.list(new QueryWrapper<User>().eq("deptid", 2)); |
| | | model.addAttribute("list",list); |
| | | model.addAttribute("roleType",roleType); |
| | | model.addAttribute("sales",sales); |
| | | model.addAttribute("data",data); |
| | | model.addAttribute("birthday",format1); |
| | | model.addAttribute("city",city); |
| | | model.addAttribute("type",type); |
| | | model.addAttribute("isVip",data.getIsVip()); |
| | | if (data.getVipEndTime()!=null){ |
| | | SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String format3 = format2.format(data.getVipEndTime()); |
| | | model.addAttribute("vipEndTime",format3); |
| | | } |
| | | return PREFIX + "TAppUser_edit.html"; |
| | | } |
| | | |
| | |
| | | queryAppUser.setPhone(phone); |
| | | queryAppUser.setIsVip(isVip); |
| | | queryAppUser.setSalesmanUserName(salesmanUserName); |
| | | return appUserClient.listAll(queryAppUser); |
| | | if (province!=null && (!province.equals(""))){ |
| | | TCity p = cityService.getOne(new QueryWrapper<TCity>().eq("code", province)); |
| | | queryAppUser.setProvince(p.getName()); |
| | | } |
| | | |
| | | if (city!=null && (!city.equals(""))){ |
| | | TCity c = cityService.getOne(new QueryWrapper<TCity>().eq("code", city)); |
| | | queryAppUser.setCity(c.getName()); |
| | | } |
| | | List<QueryAppUserVO> queryAppUserVOS = appUserClient.listAll(queryAppUser); |
| | | for (QueryAppUserVO queryAppUserVO : queryAppUserVOS) { |
| | | if (queryAppUserVO.getSalesmanUserId()!=null){ |
| | | queryAppUserVO.setSalesmanUserName(userService.getById(queryAppUserVO.getSalesmanUserId()).getName()); |
| | | } |
| | | } |
| | | if (salesmanUserName!=null && (!salesmanUserName.equals(""))){ |
| | | List<QueryAppUserVO> result = new ArrayList<>(); |
| | | List<User> sales = userService.list(new QueryWrapper<User>().like("name", salesmanUserName)); |
| | | for (QueryAppUserVO queryAppUserVO : queryAppUserVOS) { |
| | | if (queryAppUserVO.getSalesmanUserId()!=null){ |
| | | for (User sale : sales) { |
| | | if (queryAppUserVO.getSalesmanUserId() == sale.getId()){ |
| | | result.add(queryAppUserVO); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | return queryAppUserVOS; |
| | | } |
| | | /** |
| | | * 新增用户信息 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/addAppUser") |
| | | @ResponseBody |
| | | public ResultUtil addAppUser(TAppUser appUser){ |
| | | appUserClient.addAppUser(appUser); |
| | | return ResultUtil.success("添加成功"); |
| | | public Object addAppUser(@RequestBody TAppUser appUser){ |
| | | Object o = appUserClient.addAppUser1(appUser); |
| | | return o; |
| | | } |
| | | /** |
| | | * 添加/修改体测预约记录 |
| | |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.ITSiteService; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import org.aspectj.weaver.ast.Var; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据门店获取课程 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("/getCoursePackageByStoreId") |
| | | public List<TCoursePackageType> getCoursePackageByStoreId(Integer storeId){ |
| | | List<TCoursePackage> list = coursePackageClient.getCoursePackageByStoreId(storeId); |
| | | List<Integer> ids = new ArrayList<>(); |
| | | for (TCoursePackage tCoursePackage : list) { |
| | | ids.add(tCoursePackage.getCoursePackageTypeId()); |
| | | } |
| | | return coursePackageTypeClient.getByCourseIds(ids); |
| | | } |
| | | /** |
| | | * 根据课包类型获取课包 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("/getCoursePackageByType") |
| | | public List<TCoursePackage> getCoursePackageByType(Integer storeId){ |
| | | return coursePackageClient.getCoursePackageByType(storeId); |
| | | } |
| | | /** |
| | | * 跳转到列表页 |
| | | * @param model |
| | |
| | | import com.dsh.guns.core.common.constant.factory.PageFactory; |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.IEvaluationService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.StoreConfigService; |
| | | import com.dsh.guns.modular.system.service.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | |
| | | @Autowired |
| | | private ICityService cityService; |
| | | @Autowired |
| | | private IRegionService regionService; |
| | | @Autowired |
| | | private FinanceClient financeClient; |
| | | @Autowired |
| | | private CancelledClassesClient cancelledClassesClient; |
| | |
| | | */ |
| | | @RequestMapping("/rechargeRecords") |
| | | public String index(Model model) { |
| | | |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | model.addAttribute("userType",objectType); |
| | | // 去重 |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("objectType",objectType); |
| | | return PREFIX + "RechargeRecords.html"; |
| | |
| | | @ResponseBody |
| | | public List<RechargeRecordsVO> list(String province, String city, String name, String phone,String time,Integer type) { |
| | | RechargeRecordsQuery coachQuery = new RechargeRecordsQuery(); |
| | | Region provinceCode = regionService.getOne(new QueryWrapper<Region>().eq("code", province)); |
| | | Region cityCode = regionService.getOne(new QueryWrapper<Region>().eq("code", city)); |
| | | if (provinceCode!=null){ |
| | | coachQuery.setProvince(provinceCode.getName()); |
| | | }else{ |
| | | coachQuery.setProvince(province); |
| | | } |
| | | if (cityCode!=null){ |
| | | coachQuery.setCity(cityCode.getName()); |
| | | }else{ |
| | | coachQuery.setCity(city); |
| | | } |
| | | coachQuery.setName(name); |
| | | |
| | | coachQuery.setPhone(phone); |
| | | coachQuery.setTime(time); |
| | | coachQuery.setType(type); |
| | |
| | | coachQuery.setType(type); |
| | | List<RechargeRecordsVO> rechargeRecordsVOS = financeClient.rechargeList(coachQuery); |
| | | BigDecimal total = new BigDecimal("0.00"); |
| | | BigDecimal result = new BigDecimal("0.00"); |
| | | for (RechargeRecordsVO rechargeRecordsVO : rechargeRecordsVOS) { |
| | | BigDecimal amount = rechargeRecordsVO.getAmount(); |
| | | total.add(amount); |
| | | total = total.add(amount); // 将新的值赋给total |
| | | result = result.add(amount); // 将新的值赋给result |
| | | } |
| | | return total; |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(method = RequestMethod.POST, path = "/uploadImg") |
| | | @ResponseBody |
| | | public ResultUtil uploadImg(@RequestPart("file") MultipartFile picture, HttpServletResponse response) { |
| | | String value = ""; |
| | | public String uploadImg(@RequestPart("file") MultipartFile picture) { |
| | | String pictureName = ""; |
| | | try { |
| | | value = OssUploadUtil.ossUpload("img/", picture); |
| | | pictureName = OssUploadUtil.ossUpload("img/", picture); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | System.out.println("图片返回地址-------"+value); |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("value",value); |
| | | // return ResultUtil.success(0,map); |
| | | return ResultUtil.getResult(0,null,null,map); |
| | | return pictureName; |
| | | } |
| | | |
| | | |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 购课记录 手动支付dto |
| | | */ |
| | | @Data |
| | | public class CoursePackagePayDTO { |
| | | private List<String> ids; |
| | | private String payUserName; |
| | | // 操作人id |
| | | private Integer userId; |
| | | // 操作人类型 1 = 平台 2 = 城市管理员 3 = 门店 |
| | | private Integer type; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 购课记录列表查询Query |
| | | */ |
| | | @Data |
| | | public class CoursePackagePaymentQuery { |
| | | // 省 |
| | | private String province; |
| | | // 市 |
| | | private String city; |
| | | // 门店名称 |
| | | private String storeName; |
| | | // 门店id |
| | | private List<Integer> storeIds; |
| | | // 课包类型 |
| | | private Integer coursePackageTypeId; |
| | | // 课包名称 |
| | | private String coursePackageTypeName; |
| | | // 支付状态 1=待支付 2=已支付 |
| | | private Integer payStatus; |
| | | // 购买用户 |
| | | private String payUser; |
| | | // 购买学员 |
| | | private String payStudent; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 购课记录列表VO |
| | | */ |
| | | @Data |
| | | public class CoursePackagePaymentVO { |
| | | /** |
| | | * |
| | | {title: 'ID', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '所在省市', field: 'provinceAndCity', visible: role==1?true:false, align: 'center', valign: 'middle'}, |
| | | {title: '门店名称', field: 'storeName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '课包类型', field: 'coursePackageType', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '课包名称', field: 'coursePackage', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '购买用户', field: 'payUser', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '联系方式', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '购课学员', field: 'payStudent', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '购买方式', field: 'buyType', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付方式', field: 'payType', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) {return{1:"微信",2:"支付宝",3:"玩湃币",4:"积分",5:"积分+微信",6:"积分+支付宝"}[data]}}, |
| | | {title: '总金额', field: 'originalPrice'+'元', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠金额', field: 'discountAmount'+'元', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付价格', field: 'cashPayment'+'元', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付状态', field: 'payStatus', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '赠送课时', field: 'giftClassHours', visible: true, align: 'center', valign: 'middle'}, |
| | | */ |
| | | @JsonFormat(shape = JsonFormat.Shape.STRING) |
| | | private Long id; |
| | | private String provinceAndCity; |
| | | // 门店id |
| | | private Integer storeId; |
| | | private String storeName; |
| | | private Integer coursePackageTypeId; |
| | | private String coursePackageType; |
| | | private String coursePackage; |
| | | private Integer coursePackageId; |
| | | // 用户id |
| | | private Integer appUserId; |
| | | private String payUser; |
| | | private String phone; |
| | | // 学员id |
| | | private Integer studentId; |
| | | private String payStudent; |
| | | private Integer payType; |
| | | |
| | | private BigDecimal originalPrice; |
| | | // 优惠券id |
| | | private Long userCouponId; |
| | | // 优惠金额 |
| | | private BigDecimal discountAmount; |
| | | // 支付状态 |
| | | private Integer payStatus; |
| | | private Integer giftClassHours; |
| | | private Integer payUserType; |
| | | // 支付用户id |
| | | private Integer payUserId; |
| | | // 支付金额 |
| | | private BigDecimal payMoney; |
| | | private BigDecimal cashPayment; |
| | | // 玩湃币价格/积分 |
| | | private Integer playPaiCoin; |
| | | // 购买方式 |
| | | private Integer buyType; |
| | | // 当状态为手动支付时使用 用于显示手动支付时显示操作人 |
| | | private String buyTypeName; |
| | | } |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | * {title: '玩湃币数量', field: 'playPaiCoins', visible: true, align: 'center', valign: 'middle'}, |
| | | * {title: '充值类型', field: 'type', visible: true, align: 'center', valign: 'middle'}, |
| | | */ |
| | | private Integer id; |
| | | |
| | | @JsonFormat(shape = JsonFormat.Shape.STRING) |
| | | private Long id; |
| | | private String provinceAndCity; |
| | | private String name; |
| | | private String phone; |
| | |
| | | import com.dsh.guns.modular.system.model.Dict; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.model.TStoreListVo; |
| | | import com.dsh.guns.modular.system.model.TTurn; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | |
| | | void delete1(Integer id); |
| | | |
| | | |
| | | /** |
| | | * 获取所有跳转页面 |
| | | * @return |
| | | */ |
| | | List<TTurn> pageList(); |
| | | |
| | | List<TTurn> getPage(List<Integer> ids); |
| | | } |
| | |
| | | import com.dsh.course.mapper.StoreMapper; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.model.TStoreListVo; |
| | | import com.dsh.guns.modular.system.model.TTurn; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | public void delete1(Integer id) { |
| | | this.baseMapper.delete1(id); |
| | | } |
| | | |
| | | @Override |
| | | public List<TTurn> pageList() { |
| | | return this.baseMapper.pageList(); |
| | | } |
| | | |
| | | @Override |
| | | public List<TTurn> getPage(List<Integer> ids) { |
| | | return this.baseMapper.getPage(ids); |
| | | } |
| | | } |
| | |
| | | <select id="listTwo" resultType="java.util.Map"> |
| | | select id,url,name , page,sort from t_store_other_config |
| | | </select> |
| | | |
| | | <select id="getPage" resultType="com.dsh.guns.modular.system.model.TTurn"> |
| | | select * from t_turn |
| | | <where> |
| | | <if test="ids != null and ids.size()>0"> |
| | | AND t_turn.pid IN |
| | | <foreach collection="ids" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="pageList" resultType="com.dsh.guns.modular.system.model.TTurn"> |
| | | select * from t_turn where pid = 0 |
| | | </select> |
| | | </mapper> |
| | |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="page" name="跳转页面" > |
| | | <option value="">请选择</option> |
| | | |
| | | @for(obj in pages){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | |
| | | <input hidden id="roleType" value="${roleType}"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | |
| | | |
| | | @if(roleType==1){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*广告类型:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="position" name = "position"> |
| | | <select style="width: 300px" class="form-control" id="position" onchange="updatePosition(this)" name = "position"> |
| | | <option value="">选择类型</option> |
| | | <option value="1">首页类型</option> |
| | | <option value="1">首页banner</option> |
| | | <option value="2">线上课得积分</option> |
| | | <option value="3">看视频得奖励</option> |
| | | <option value="4">常见问题</option> |
| | |
| | | <input style="width: 300px" class="form-control" id="name" name="name" placeholder="请输入广告名称" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*广告图片:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <#avatar id="img" name="" avatarImg=""/><span id = "imgPX">推荐像素:</span> |
| | | </div> |
| | | </div> |
| | | @if(roleType == 1){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*跳转模块:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="model" name = "model" onchange="TSite.oneChange()"> |
| | | <select style="width: 300px" class="form-control" id="model" name = "model" onchange="updateType(this)"> |
| | | <option value=" ">请选择</option> |
| | | <option value="0">不跳转</option> |
| | | @for(obj in models){ |
| | | <option style="width: 300px" value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | <option value="1">加入玩湃</option> |
| | | <option value="2">开始课程</option> |
| | | <option value="3">使用福利</option> |
| | | <option value="4">探索玩湃</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <div class="form-group"> |
| | | <div class="form-group" id="t1"> |
| | | <label class="col-sm-3 control-label">*跳转页面:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="page" name = "page"> |
| | | <select style="width: 300px" class="form-control" id="page" name = "page" onchange="updateOne(this)"> |
| | | <option value="">请选择</option> |
| | | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @if(roleType == 1){ |
| | | <div class="form-group"> |
| | | <div class="form-group" id="t2"> |
| | | <label class="col-sm-3 control-label">*跳转类型:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="type" name = "page"> |
| | | <select style="width: 300px" class="form-control" id="type" name = "page" onchange="updateT(this)"> |
| | | <option value="">请选择</option> |
| | | @for(obj in types){ |
| | | <option style="width: 300px" value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <div class="form-group" id="t3"> |
| | | <label class="col-sm-3 control-label">*跳转ID:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="pageId" name="name" placeholder="请输入跳转id" type="number"> |
| | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5" > |
| | | |
| | | @if(type==2){ |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSite.addSubmit()"/> |
| | | @} |
| | | <#button btnCss="danger" name="关闭" id="cancel" icon="fa-eraser" clickFun="TSite.close()"/> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | </div> |
| | | |
| | | <script src="${ctxPath}/modular/system/tSite/tSite.js"></script> |
| | | <script src="${ctxPath}/modular/system/advertisement/advertisement.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 |
| | | }); |
| | | |
| | | function updateType(e) { |
| | | let name = $("#model").val(); |
| | | console.log(name); |
| | | if(name =='0'){ |
| | | $("#t1").hide() |
| | | $("#t2").hide() |
| | | $("#t3").hide() |
| | | }else { |
| | | $("#t1").show() |
| | | $("#t2").show() |
| | | $("#t3").show() |
| | | |
| | | var oneId = $('#model option:selected').text(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/typeChange", function(data){ |
| | | if(data!=null){ |
| | | var content = '<option value="">请选择</option>'; |
| | | $.each(data, function(k,v) { |
| | | |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#page").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("name",oneId); |
| | | ajax.start(); |
| | | } |
| | | } |
| | | |
| | | |
| | | function updateOne(e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/typeChangeOne", function(data){ |
| | | if(data!=null){ |
| | | var content1 = '<option value="">请选择</option>'; |
| | | $.each(data, function(k,v) { |
| | | content1 += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#type").empty().append(content1); |
| | | } |
| | | }); |
| | | ajax.set("id",oneId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | function updatePosition(e) { |
| | | var oneId=$(e).val(); |
| | | var res= document.getElementById("imgPX"); |
| | | console.log(res) |
| | | if (oneId == "1"){ |
| | | res.innerHTML ="推荐像素:780x472px"; |
| | | }else{ |
| | | res.innerHTML ="推荐像素:780x440px"; |
| | | } |
| | | console.log(oneId) |
| | | } |
| | | function updateT(e) { |
| | | var oneId = $('#type option:selected').text(); |
| | | console.log(oneId); |
| | | if (oneId!="详情"){ |
| | | $("#t3").hide() |
| | | }else{ |
| | | $("#t3").show() |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | @} |
| | |
| | | margin-left: 255px; |
| | | } |
| | | |
| | | |
| | | </style> |
| | | <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script> |
| | | <div class="ibox float-e-margins"> |
| | | <input hidden id="objectType" value="${objectType}"> |
| | | <input hidden id="objectId" value="${objectId}"> |
| | | <input hidden id="roleType" value="${roleType}"> |
| | | <input hidden id="type" value="${type}"> |
| | | <input hidden id="turnId" value="${data.turnId}"> |
| | | <input hidden id="id" value="${data.id}"> |
| | | <input hidden id="img1" value="${data.img}"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | |
| | | @if(roleType == 1){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*广告类型:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="position" name = "position"> |
| | | <option value="1"${data.position==1 ? 'selected=selected' : ''}>首页类型</option> |
| | | <select style="width: 300px" class="form-control" id="position" onchange="updatePosition(this)" name = "position"> |
| | | <option value="">选择类型</option> |
| | | <option value="1" ${data.position == 1 ? 'selected=selected' : ''}>首页banner</option> |
| | | <option value="2"${data.position==2 ? 'selected=selected' : ''}>线上课得积分</option> |
| | | <option value="3"${data.position==3 ? 'selected=selected' : ''}>看视频得奖励</option> |
| | | <option value="4"${data.position==4 ? 'selected=selected' : ''}>常见问题</option> |
| | |
| | | <input style="width: 300px" class="form-control" value="${data.name}" id="name" name="name" placeholder="请输入广告名称" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*广告图片:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <#avatar id="img" name="" avatarImg="${data.img}"/><span id = "imgPX">推荐像素:</span> |
| | | </div> |
| | | </div> |
| | | @if(roleType == 1){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*跳转模块:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="model" name = "model"> |
| | | <option value="0">不跳转</option> |
| | | @for(obj in models){ |
| | | <option style="width: 300px" value="${obj.id}">${obj.name}</option> |
| | | <option value="${obj.id}" ${obj.name == data.models ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | <select style="width: 300px" class="form-control" id="model" name = "model" onchange="updateType(this)"> |
| | | <option value="">请选择</option> |
| | | <option value="0"${data.model == '不跳转' ? 'selected=selected' : ''}>不跳转</option> |
| | | <option value="1"${data.model == '加入玩湃' ? 'selected=selected' : ''}>加入玩湃</option> |
| | | <option value="2"${data.model == '开始课程' ? 'selected=selected' : ''}>开始课程</option> |
| | | <option value="3"${data.model == '使用福利' ? 'selected=selected' : ''}>使用福利</option> |
| | | <option value="4"${data.model == '探索玩湃' ? 'selected=selected' : ''}>探索玩湃</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <div class="form-group"> |
| | | <div class="form-group" id="t1"> |
| | | <label class="col-sm-3 control-label">*跳转页面:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="page" name = "page"> |
| | | <select style="width: 300px" class="form-control" id="page" name = "page" onchange="updateOne(this)"> |
| | | <option value="">请选择</option> |
| | | @for(obj in pages){ |
| | | <option value="${obj.id}" ${obj.id == data.pageId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | <option value="${obj.id}" ${obj.id == data.jumpPage ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | @if(roleType == 1){ |
| | | <div class="form-group" id="t2"> |
| | | <label class="col-sm-3 control-label">*跳转类型:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="type" name = "page"> |
| | | <select style="width: 300px" class="form-control" id="type" name = "page" onchange="updateT(this)"> |
| | | <option value="">请选择</option> |
| | | @for(obj in types){ |
| | | <option value="${obj.id}" ${obj.id == data.typeId ? 'selected=selected' : ''}>${obj.name}</option> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <div class="form-group" id="t3"> |
| | | <label class="col-sm-3 control-label">*跳转ID:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="pageId" value="${data.turnId}" name="name" placeholder="请输入跳转id" type="number"> |
| | | <input style="width: 300px" value="${data.turnId}" class="form-control" id="pageId" name="name" placeholder="请输入跳转id" type="number"> |
| | | </div> |
| | | </div> |
| | | |
| | | @} |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*排序:</label> |
| | |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5" > |
| | | |
| | | @if(type==2){ |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSite.addSubmit()"/> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSite.updateSubmit()"/> |
| | | @} |
| | | <#button btnCss="danger" name="关闭" id="cancel" icon="fa-eraser" clickFun="TSite.close()"/> |
| | | </div> |
| | |
| | | |
| | | </div> |
| | | |
| | | <script src="${ctxPath}/modular/system/tSite/tSite.js"></script> |
| | | <script src="${ctxPath}/modular/system/advertisement/advertisement.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 |
| | | }); |
| | | |
| | | function updateType(e) { |
| | | let name = $("#model").val(); |
| | | console.log(name); |
| | | if(name =='0'){ |
| | | $("#t1").hide() |
| | | $("#t2").hide() |
| | | $("#t3").hide() |
| | | }else { |
| | | $("#t1").show() |
| | | $("#t2").show() |
| | | $("#t3").show() |
| | | |
| | | var oneId = $('#model option:selected').text(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/typeChange", function(data){ |
| | | if(data!=null){ |
| | | var content = '<option value="">请选择</option>'; |
| | | $.each(data, function(k,v) { |
| | | |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#page").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("name",oneId); |
| | | ajax.start(); |
| | | } |
| | | } |
| | | |
| | | |
| | | function updateOne(e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/typeChangeOne", function(data){ |
| | | if(data!=null){ |
| | | var content1 = '<option value="">请选择</option>'; |
| | | $.each(data, function(k,v) { |
| | | content1 += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#type").empty().append(content1); |
| | | } |
| | | }); |
| | | ajax.set("id",oneId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | function updatePosition(e) { |
| | | var oneId=$(e).val(); |
| | | var res= document.getElementById("imgPX"); |
| | | console.log(res) |
| | | if (oneId == "1"){ |
| | | res.innerHTML ="推荐像素:780x472px"; |
| | | }else{ |
| | | res.innerHTML ="推荐像素:780x440px"; |
| | | } |
| | | console.log(oneId) |
| | | } |
| | | function updateT(e) { |
| | | var oneId = $('#type option:selected').text(); |
| | | console.log(oneId); |
| | | if (oneId!="详情"){ |
| | | $("#t3").hide() |
| | | }else{ |
| | | $("#t3").show() |
| | | } |
| | | } |
| | | window.onload = function() { |
| | | var temp = $("#turnId").val(); |
| | | var res= document.getElementById("imgPX"); |
| | | res.innerHTML ="推荐像素:780x472px"; |
| | | console.log("看看temp",temp); |
| | | if (temp==""){ |
| | | $("#t3").hide(); |
| | | } |
| | | } |
| | | </script> |
| | | @} |
| | |
| | | 所在省 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="pCode" onchange="TQuestion.oneChange(1)"> |
| | | <option value="">全部</option> |
| | | <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TQuestion.oneChange(this)"> |
| | | <option value="">请选择省</option> |
| | | @for(obj in list){ |
| | | <option value="${obj}">${obj}</option> |
| | | <option style="width: 300px" value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | |
| | | 所在市 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="cCode"> |
| | | <option value="">请先选择省</option> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="cCode" name="cCode" > |
| | | <option value="">请选择市</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | @} |
| | |
| | | <#SelectCon id="isVip" name="年度会员" > |
| | | <option value="">全部</option> |
| | | <option value="1">是</option> |
| | | <option value="2">否</option> |
| | | <option value="0">否</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | |
| | | <div style="margin-top: 10px" class="hidden-xs" id="TCouponTableToolbar" role="group"> |
| | | <#button name="添加" icon="fa-plus" clickFun="TQuestion.openAdd()"/> |
| | | <#button name="编辑" icon="fa-edit" clickFun="TQuestion.openChange()" space="true"/> |
| | | <#button name="查看详情" icon="fa-edit" clickFun="TQuestion.openChange()" space="true"/> |
| | | <#button name="查看详情" icon="fa-edit" clickFun="TQuestion.openInfo()" space="true"/> |
| | | <#button name="冻结" icon="fa-check" clickFun="TQuestion.onShelf()" space="true"/> |
| | | <#button name="解冻" icon="fa-check" clickFun="TQuestion.onShelf()" space="true"/> |
| | | <#button name="添加学员" icon="fa-edit" clickFun="TQuestion.openChange()" space="true"/> |
| | |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TQuestion.oneChange()"> |
| | | <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TQuestion.oneChange(this)"> |
| | | <option value="">请选择省</option> |
| | | @for(obj in list){ |
| | | <option style="width: 300px" value="${obj.provinceCode}">${obj.province}</option> |
| | | <option style="width: 300px" value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">*所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="cCode" name="cCode" onchange="TQuestion.oneChangeNext(this)"> |
| | | <select style="width: 300px" class="form-control" id="cCode" name="cCode" > |
| | | <option value="">请选择市</option> |
| | | </select> |
| | | </div> |
| | |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="salesmanUserName" name="salesmanUserName"> |
| | | <option value="">请选择</option> |
| | | @for(obj in list){ |
| | | <option style="width: 300px" value="${obj.provinceCode}">${obj.province}</option> |
| | | @for(obj in sales){ |
| | | <option style="width: 300px" value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | |
| | | <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script> |
| | | <div class="ibox float-e-margins"> |
| | | <input hidden id="id" value="${data.id}"> |
| | | <input hidden id="roleType" value="${roleType}"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | @if(roleType == 1){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TQuestion.oneChange()"> |
| | | <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TQuestion.oneChange(this)"> |
| | | <option value="">请选择省</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.provinceCode}" ${obj.province == data.province ? 'selected=selected' : ''}>${obj.province}</option> |
| | | <option style="width: 300px" value="${obj.code}" ${obj.name == data.province ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">*所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="cCode" name="cCode" onchange="TQuestion.oneChangeNext(this)"> |
| | | @for(obj in cities){ |
| | | <option value="${obj.cityCode}" ${obj.city == data.city ? 'selected=selected' : ''}>${obj.city}</option> |
| | | <select style="width: 300px" class="form-control" id="cCode" name="cCode" > |
| | | @for(obj in city){ |
| | | <option style="width: 300px" value="${obj.code}"${obj.name == data.province ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(roleType != 3){ |
| | | |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*所属门店:</label> |
| | | <label class="col-sm-3 control-label">*姓名:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" value="${data.name}" id="learnerName" placeholder="请输入姓名" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*生日:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" value="${birthday}" id="birthday" placeholder="请选择" type="date"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*性别:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="store" name="account"> |
| | | @for(obj in stores){ |
| | | <option value="${obj.id}" ${obj.id == data.storeId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | <select style="width: 300px" class="form-control" id="gender" name = "gender"> |
| | | <option value="" style="color: #b6b6b6" disabled selected>请选择性别</option> |
| | | <option value="1" ${data.gender == 1 ? 'selected=selected' : ''}>男</option> |
| | | <option value="2" ${data.gender == 2 ? 'selected=selected' : ''}>女</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*联系电话:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" value="${data.phone}" id="phone" placeholder="请输入联系电话" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*销售人员:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="salesmanUserName" name="salesmanUserName"> |
| | | <option value="">请选择</option> |
| | | @for(obj in sales){ |
| | | <option style="width: 300px" value="${obj.id}" ${obj.id == data.salesmanUserId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @if(isVip == 1){ |
| | | <div class="form-horizontal" id="carInfoForm1"> |
| | | <h2>会员信息</h2> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*到期时间:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" value="${vipEndTime}" id="vipEndTime" placeholder="请选择" type="date"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*性别:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="viplevelId" name = "gender"> |
| | | <option value="" style="color: #b6b6b6" disabled selected>请选择性别</option> |
| | | <option value="1" ${data.viplevelId == 1 ? 'selected=selected' : ''}>青铜</option> |
| | | <option value="2" ${data.viplevelId == 2 ? 'selected=selected' : ''}>白银</option> |
| | | <option value="3" ${data.viplevelId == 3 ? 'selected=selected' : ''}>黄金</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*家长姓名:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.parentName}" class="form-control" id="parentName" placeholder="请输入家长姓名" type="text"> |
| | | <div class="form-horizontal" id="carInfoForm2"> |
| | | <h2>学员信息</h2> |
| | | <div class="form-group" style="display: flex"> |
| | | @for(obj in students){ |
| | | <label class="col-sm-3 control-label">*姓名:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" value="${obj.name}" id="studentName" type="text"> |
| | | </div> |
| | | <label class="col-sm-3 control-label">*联系电话:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" value="${obj.phone}" id="studentPhone" type="text"> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*家长联系方式:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.phone}" class="form-control" id="phone" placeholder="请输入家长联系方式" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*学员姓名:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.learnerName}" class="form-control" id="learnerName" placeholder="请输入学员姓名" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*学员年龄:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.learnerAge}" class="form-control" id="learnerAge" placeholder="请输入学员年龄" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*学员生日:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${birthday}" class="form-control" id="birthday" placeholder="请选择" type="date"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*预约时间:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${appointmentTime}" class="form-control" id="appointmentTime" placeholder="请选择" type="datetime-local"> |
| | | <#button btnCss="info" name="查看详情" id="ensure" icon="fa-check" clickFun="TQuestion.studentInfo(${obj.id})"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5" > |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="TQuestion.addSubmit()"/> |
| | | @if(type == 1){ |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="TQuestion.updateSubmit()"/> |
| | | @} |
| | | <#button btnCss="danger" name="关闭" id="cancel" icon="fa-eraser" clickFun="TQuestion.close()"/> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | </div> |
| | | |
| | | <script src="${ctxPath}/modular/system/bodySideAppointment/tBodySideAppointment_edit.js"></script> |
| | | <script src="${ctxPath}/modular/system/appUser/tAppUser.js"></script> |
| | | <script src="${ctxPath}/js/vue/vue.js"></script> |
| | | <script src="${ctxPath}/js/elementui/index.js"></script> |
| | | <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css"> |
| | |
| | | <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script> |
| | | <div class="ibox float-e-margins"> |
| | | <input hidden id="id" value="${data.id}"> |
| | | <input hidden id="roleType" value="${roleType}"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | @if(roleType == 1){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TQuestion.oneChange()"> |
| | | <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TQuestion.oneChange(this)"> |
| | | <option value="">请选择省</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.provinceCode}" ${obj.province == data.province ? 'selected=selected' : ''}>${obj.province}</option> |
| | | <option style="width: 300px" value="${obj.code}" ${obj.name == data.province ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">*所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="cCode" name="cCode" onchange="TQuestion.oneChangeNext(this)"> |
| | | @for(obj in cities){ |
| | | <option value="${obj.cityCode}" ${obj.city == data.city ? 'selected=selected' : ''}>${obj.city}</option> |
| | | <select style="width: 300px" class="form-control" id="cCode" name="cCode" > |
| | | @for(obj in city){ |
| | | <option style="width: 300px" value="${obj.code}"${obj.name == data.province ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(roleType != 3){ |
| | | |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*所属门店:</label> |
| | | <label class="col-sm-3 control-label">*姓名:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" value="${data.name}" id="learnerName" placeholder="请输入姓名" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*生日:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" value="${birthday}" id="birthday" placeholder="请选择" type="date"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*性别:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="store" name="account"> |
| | | @for(obj in stores){ |
| | | <option value="${obj.id}" ${obj.id == data.storeId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | <select style="width: 300px" class="form-control" id="gender" name = "gender"> |
| | | <option value="" style="color: #b6b6b6" disabled selected>请选择性别</option> |
| | | <option value="1" ${data.gender == 1 ? 'selected=selected' : ''}>男</option> |
| | | <option value="2" ${data.gender == 2 ? 'selected=selected' : ''}>女</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*联系电话:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" value="${data.phone}" id="phone" placeholder="请输入联系电话" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*销售人员:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="salesmanUserName" name="salesmanUserName"> |
| | | <option value="">请选择</option> |
| | | @for(obj in sales){ |
| | | <option style="width: 300px" value="${obj.id}" ${obj.id == data.salesmanUserId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @if(isVip == 1){ |
| | | <div class="form-horizontal" id="carInfoForm1"> |
| | | <h2>会员信息</h2> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*到期时间:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" value="${vipEndTime}" id="vipEndTime" placeholder="请选择" type="date"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*性别:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="viplevelId" name = "gender"> |
| | | <option value="" style="color: #b6b6b6" disabled selected>请选择性别</option> |
| | | <option value="1" ${data.viplevelId == 1 ? 'selected=selected' : ''}>青铜</option> |
| | | <option value="2" ${data.viplevelId == 2 ? 'selected=selected' : ''}>白银</option> |
| | | <option value="3" ${data.viplevelId == 3 ? 'selected=selected' : ''}>黄金</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*家长姓名:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.parentName}" class="form-control" id="parentName" placeholder="请输入家长姓名" type="text"> |
| | | <div class="form-horizontal" id="carInfoForm2"> |
| | | <h2>学员信息</h2> |
| | | <div class="form-group" style="display: flex"> |
| | | @for(obj in students){ |
| | | <label class="col-sm-3 control-label">*姓名:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" value="${obj.name}" id="studentName" type="text"> |
| | | </div> |
| | | <label class="col-sm-3 control-label">*联系电话:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" value="${obj.phone}" id="studentPhone" type="text"> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*家长联系方式:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.phone}" class="form-control" id="phone" placeholder="请输入家长联系方式" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*学员姓名:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.learnerName}" class="form-control" id="learnerName" placeholder="请输入学员姓名" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*学员年龄:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${data.learnerAge}" class="form-control" id="learnerAge" placeholder="请输入学员年龄" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*学员生日:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${birthday}" class="form-control" id="birthday" placeholder="请选择" type="date"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*预约时间:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" value="${appointmentTime}" class="form-control" id="appointmentTime" placeholder="请选择" type="datetime-local"> |
| | | <#button btnCss="info" name="查看详情" id="ensure" icon="fa-check" clickFun="TQuestion.studentInfo(${obj.id})"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5" > |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="TQuestion.addSubmit()"/> |
| | | @if(type == 1){ |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="TQuestion.updateSubmit()"/> |
| | | @} |
| | | <#button btnCss="danger" name="关闭" id="cancel" icon="fa-eraser" clickFun="TQuestion.close()"/> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | </div> |
| | | |
| | | <script src="${ctxPath}/modular/system/bodySideAppointment/tBodySideAppointment_edit.js"></script> |
| | | <script src="${ctxPath}/modular/system/appUser/tAppUser.js"></script> |
| | | <script src="${ctxPath}/js/vue/vue.js"></script> |
| | | <script src="${ctxPath}/js/elementui/index.js"></script> |
| | | <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css"> |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <input hidden id="roleType" value="${roleType}"> |
| | | <div class="ibox-title"> |
| | | <h5>购课记录</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | @if(roleType==1){ |
| | | <div class="col-sm-3"> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 所在省 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="pCode" onchange="TCompetition.oneChange(this)"> |
| | | <option value="">全部</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(roleType==1){ |
| | | <div class="col-sm-3"> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 所在市 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="cCode"> |
| | | </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="coursePackage"> |
| | | <option value="">全部</option> |
| | | @for(obj in coursePackage){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="coursePackageName" name="课包名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="state" name="支付状态" > |
| | | <option value="">全部</option> |
| | | <option value="1">待支付</option> |
| | | <option value="2">已支付</option> |
| | | <option value="3">已取消</option> |
| | | </#SelectCon> |
| | | </div> |
| | | |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="payUser" name="购买用户" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="payStudent" 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-remove" clickFun="TCompetition.unfreeze()" space="true"/> |
| | | </div> |
| | | <#table id="TCompetitionTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/cpPayment/cpPayment.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; |
| | | } |
| | | |
| | | |
| | | |
| | | /* 提示框样式 */ |
| | | #dialog { |
| | | text-align: center; |
| | | background-color: #fff; |
| | | border: 1px solid #ccc; |
| | | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); |
| | | padding: 20px; |
| | | max-width: 400px; |
| | | } |
| | | .avatar-uploader .el-upload:hover { |
| | | border-color: #409EFF; |
| | | } |
| | | .avatar-uploader-icon { |
| | | font-size: 28px; |
| | | color: #8c939d; |
| | | width: 100px; |
| | | height: 100px; |
| | | line-height: 100px; |
| | | margin-top: 32px; |
| | | text-align: center; |
| | | } |
| | | .avatar { |
| | | width: 100px; |
| | | height: 100px; |
| | | display: block; |
| | | } |
| | | |
| | | .col-sm-12 { |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .col-sm-12 select { |
| | | height: 33px; |
| | | } |
| | | </style> |
| | | <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm1"> |
| | | <h2>选择学员信息</h2> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">会员手机号:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="vipPhone" name="vipPhone" placeholder="请输入家长会员手机号" type="number"> |
| | | <#button btnCss="info" name="查询" id="ensure" icon="fa-check" clickFun="TCompetition.getStudent()"/> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">请选择学员:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="student" name="student" > |
| | | <option value="">选择学员</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <h2>选择课包信息</h2> |
| | | <input hidden id="roleType" value="${roleType}"> |
| | | @if(roleType==1){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TCompetition.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 style="width: 300px" class="form-control" id="cCode" name="cCode" > |
| | | <option value="">选择市</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(roleType !=3){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所属门店:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="store" name="store" onchange="TCompetition.nextStore(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 style="width: 300px" class="form-control" id="coursePackageType" name="store" onchange="TCompetition.getCoursePackage(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 style="width: 300px" class="form-control" id="coursePackageName" name="store" onchange="TCompetition.getCoursePackage(this)" > |
| | | <option value="">选择课包</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @if(roleType == 1){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课时规格:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="courseTime" name="store"> |
| | | <option value="">选择规格</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*支付金额:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="cashPayment" name="cashPayment" placeholder="请输入金额" type="number"> |
| | | <span style="margin-left: 5px;margin-top: 5px">¥</span> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*玩湃币支付:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="playPaiCoin" name="playPaiCoin" placeholder="请输入金额" type="number"> |
| | | <span style="margin-left: 5px;margin-top: 5px">币</span> |
| | | </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="TCompetition.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/cpPayment/cpPayment.js"></script> |
| | | <script src="${ctxPath}/js/vue/vue.js"></script> |
| | | <script src="${ctxPath}/js/elementui/index.js"></script> |
| | | <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css"> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#time', |
| | | range:true |
| | | }); |
| | | |
| | | var vue2 = new Vue({ |
| | | el: '#app1', |
| | | props: { |
| | | // 数量限制 |
| | | limit: { |
| | | type: Number, |
| | | default: 2 |
| | | }, |
| | | }, |
| | | data: { |
| | | autoUpload: true,//自动上传 |
| | | imageUrl1: '',//模型数据,用于上传图片完成后图片预览 |
| | | dialogVisible: false |
| | | }, |
| | | methods: { |
| | | handleAvatarSuccess(res, file) { |
| | | TCarInfoDlg.goodsPicArray.push(file); |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isLt2M = file.size / 1024 / 1024 < 10; |
| | | if (!isLt2M) { |
| | | this.$message.error('上传图片大小不能超过 10MB!'); |
| | | } |
| | | return isLt2M; |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | TCarInfoDlg.goodsPicArray = TCarInfoDlg.goodsPicArray.filter(item => { |
| | | return item.uid != file.uid; |
| | | }); |
| | | }, |
| | | }, |
| | | created() { |
| | | }, |
| | | }); |
| | | |
| | | |
| | | function updateType(o) { |
| | | if(o==1){ |
| | | $("#yys").hide() |
| | | }else { |
| | | $("#yys").show() |
| | | |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | @} |
| | |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#TimeCon id="beginTime" name="有效期" isTime="false"/> |
| | | <#TimeCon id="beginTime" name="充值时间" isTime="false"/> |
| | | </div> |
| | | |
| | | |
| | |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#beginTime' |
| | | , trigger: 'click' |
| | | ,range: true |
| | | ,lang:"en" |
| | | }); |
| | | </script> |
| | | |
| | |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <input id="id" value="${item.id}" hidden> |
| | | <input id="name1" value="${item.name}" hidden> |
| | | |
| | | |
| | | <#avatar id="url" name="图片(推荐像素宽度316px)" avatarImg="${item.url}"/> |
| | | |
| | | <div class="input-group" style="margin-left: 342px;"> |
| | | <div class="input-group-btn"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button"> |
| | |
| | | <div class="form-horizontal" id="userInfoForm"> |
| | | <input type="hidden" id="id" value=""> |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="account" name="账户" underline="true"/> |
| | | <#select id="sex" name="性别" underline="true"> |
| | | <option value="1">男</option> |
| | | <option value="2">女</option> |
| | | </#select> |
| | | <#input id="password" name="密码" underline="true" type="password"/> |
| | | <!-- <#input id="roleid" name="角色" underline="true" disabled="disabled"/>--> |
| | | <#input id="email" name="邮箱" type="email" underline="true"/> |
| | | <div class="form-group" ${companyId!=1? "hidden" :" "} > |
| | | <label class="col-sm-3 control-label">所属公司</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="companyId" name="companyId"> |
| | | @if(companyIds!=null){ |
| | | @for(item in companyIds){ |
| | | @if(companyId!=1&&item.id==companyId){ |
| | | <option value="${item.id}">${item.name}</option> |
| | | @}else if(companyId==1){ |
| | | <option value="${item.id}">${item.name}</option> |
| | | @} |
| | | @} |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="hr-line-dashed" ${companyId!=1? "hidden" :" "} ></div> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <div id="driverInfoContent"> |
| | | <#input id="name" name="姓名" underline="true"/> |
| | |
| | | }, |
| | | {title: '跳转模块', field: 'model', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '跳转页面', field: 'jumpPage', visible: true, align: 'center', valign: 'middle', |
| | | {title: '跳转页面', field: 'page', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '排序', field: 'sort', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | |
| | | TSite.openAddTSite = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: "添加场地", |
| | | title: "添加广告", |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: "编辑场地", |
| | | title: "编辑广告", |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | |
| | | id:null, |
| | | position:null, |
| | | img:"", |
| | | jumpPage:"", |
| | | jumpPage:null, |
| | | sort:null, |
| | | state:1, |
| | | name:"", |
| | | type:"" |
| | | type:"", |
| | | page:"", |
| | | model:null, |
| | | typeId:null, |
| | | turnId:null, |
| | | }; |
| | | let name = $("#model").val(); |
| | | data1.name = $("#name").val(); |
| | | data1.position = $("#position").val(); |
| | | data1.img = $("#img").val(); |
| | | data1.model = $('#model option:selected').text(); |
| | | data1.page = $('#page option:selected').text(); |
| | | data1.jumpPage = $("#page").val(); |
| | | data1.typeId = $("#type").val(); |
| | | data1.type = $('#type option:selected').text(); |
| | | data1.turnId = $("#pageId").val(); |
| | | data1.sort = $("#sort").val(); |
| | | |
| | | if ( $("#roleType").val()==1){ |
| | | if($("#position").val()==''){ |
| | | data1.position = $("#position").val(); |
| | | Feng.info("请选择广告类型") |
| | | return; |
| | | } |
| | | } |
| | | |
| | | |
| | | if($("#name").val()==''){ |
| | | |
| | | Feng.info("请输入广告名称") |
| | | return; |
| | | } |
| | |
| | | return; |
| | | } |
| | | } |
| | | if(name !='0'){ |
| | | if($("#page").val()=='' ){ |
| | | Feng.info("请选择跳转页面") |
| | | return; |
| | | } |
| | | } |
| | | if(name !='0') { |
| | | if ( $("#roleType").val()==1) { |
| | | if ($("#type").val() == '') { |
| | | Feng.info("请选择跳转类型") |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | if(name !='0') { |
| | | if ( $("#roleType").val()==1) { |
| | | if ($('#type option:selected').text()=="详情"){ |
| | | if($("#pageId").val()=='' ){ |
| | | Feng.info("请输入跳转ID") |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | contentType: "application/json", // 设置请求头的 Content-Type |
| | | data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | Feng.success("下架成功!"); |
| | | TSite.search(); |
| | | window.parent.TSite.table.refresh(); |
| | | TSite.close(); |
| | | Feng.success("添加成功!"); |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "下架失败!"; |
| | | Feng.error("您的网络异常!"); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | TSite.updateSubmit = function(){ |
| | | |
| | | console.log("kankan") |
| | | console.log($("#img").val()) |
| | | var data1 = { |
| | | id:null, |
| | | position:null, |
| | | img:"", |
| | | jumpPage:null, |
| | | sort:null, |
| | | state:1, |
| | | name:"", |
| | | type:"", |
| | | page:"", |
| | | model:null, |
| | | typeId:null, |
| | | turnId:null, |
| | | }; |
| | | let name = $("#model").val(); |
| | | data1.name = $("#name").val(); |
| | | data1.id = $("#id").val(); |
| | | data1.position = $("#position").val(); |
| | | data1.img = $("#img").val(); |
| | | data1.model = $('#model option:selected').text(); |
| | | data1.page = $('#page option:selected').text(); |
| | | data1.jumpPage = $("#page").val(); |
| | | data1.typeId = $("#type").val(); |
| | | data1.type = $('#type option:selected').text(); |
| | | data1.turnId = $("#pageId").val(); |
| | | data1.sort = $("#sort").val(); |
| | | |
| | | if ( $("#roleType").val()==1){ |
| | | if($("#position").val()==''){ |
| | | data1.position = $("#position").val(); |
| | | Feng.info("请选择广告类型") |
| | | return; |
| | | } |
| | | } |
| | | if($("#name").val()==''){ |
| | | Feng.info("请输入广告名称") |
| | | return; |
| | | } |
| | | |
| | | if ( $("#roleType").val()==1) { |
| | | if ($("#model").val() == '') { |
| | | Feng.info("请选择跳转模块") |
| | | return; |
| | | } |
| | | } |
| | | if(name !='0'){ |
| | | if($("#page").val()=='' ){ |
| | | Feng.info("请选择跳转页面") |
| | | return; |
| | | } |
| | | } |
| | | if(name !='0') { |
| | | if ($("#roleType").val() == 1) { |
| | | if ($("#type").val() == '') { |
| | | Feng.info("请选择跳转类型") |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | if(name !='0') { |
| | | if ($("#roleType").val() == 1) { |
| | | if ($('#type option:selected').text() == "详情") { |
| | | if ($("#pageId").val() == '') { |
| | | Feng.info("请输入跳转ID") |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if($("#sort").val()=='' ){ |
| | | Feng.info("请输入排序") |
| | | return; |
| | | } |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/advertisement/updateAdvertisement", |
| | | type: "POST", |
| | | contentType: "application/json", // 设置请求头的 Content-Type |
| | | data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | window.parent.TSite.table.refresh(); |
| | | TSite.close(); |
| | | Feng.success("添加成功!"); |
| | | |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "下架失败!"; |
| | |
| | | var table = new BSTable(TSite.id, "/advertisement/listAll", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TSite.table = table.init(); |
| | | var carPhoto = new $WebUpload("img"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | }); |
| | |
| | | return {1:"是",0:"否"}[data] |
| | | } |
| | | }, |
| | | {title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle', |
| | | {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return {1:"正常",2:"冻结",3:"已删除"}[data] |
| | | return {1:"正常",2:"冻结",3:"已注销"}[data] |
| | | }} |
| | | ]; |
| | | }; |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/bodySideAppointment/update/' + TQuestion.seItem.id |
| | | content: Feng.ctxPath + '/appUser/update/' + TQuestion.seItem.id+"/"+1 |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查看详情 |
| | | */ |
| | | TQuestion.openInfo = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length >1 ){ |
| | | Feng.info("只能选择一个问题进行编辑!"); |
| | | }else { |
| | | if (this.check()){ |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '编辑分类', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/appUser/update/' + TQuestion.seItem.id+"/"+2 |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | }; |
| | | /** |
| | | * 上架 |
| | | */ |
| | |
| | | }); |
| | | } |
| | | }; |
| | | TQuestion.oneChange = function () { |
| | | var province = $('#pCode option:selected').text(); |
| | | var citySelect = document.getElementById("cCode"); |
| | | var ajax = new $ax(Feng.ctxPath + "/tSite/getCity", function(data){ |
| | | |
| | | |
| | | |
| | | TQuestion.oneChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | console.log(oneId) |
| | | console.log("!!!!!!!!!!!!!") |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){ |
| | | if(data!=null){ |
| | | var content='<option value="">选择市</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.cityCode+"'>"+v.city+"</option>"; |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | if (province === ""){ |
| | | citySelect.innerHTML = '<option value="">请先选择省</option>'; |
| | | } |
| | | ajax.set("province",province); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | TQuestion.oneChangeNext = function (e) { |
| | | var oneId=$(e).val(); |
| | | var city = $('#cCode option:selected').text(); |
| | | |
| | | var citySelect = document.getElementById("account"); |
| | | var storeSelect = document.getElementById("store"); |
| | | if (oneId === ""){ |
| | | citySelect.innerHTML = '<option style="width: 300px" value="">请先选择省/市</option>'; |
| | | storeSelect.innerHTML = '<option style="width: 300px" value="">请先选择省/市</option>'; |
| | | } |
| | | var ajax1 = new $ax(Feng.ctxPath + "/tSite/storeChangeNext", function(data){ |
| | | if(data!=null && data.length !== 0){ |
| | | var content='<option value="">选择门店</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option style='width: 300px' value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#store").empty().append(content); |
| | | }else { |
| | | storeSelect.innerHTML = '<option value="">当前所选市没有门店</option>'; |
| | | } |
| | | }); |
| | | ajax1.set("oneId",city); |
| | | ajax1.start(); |
| | | }; |
| | | TQuestion.addSubmit = function(){ |
| | | var data = { |
| | |
| | | provinceCode:"", |
| | | city:"", |
| | | cityCode:"", |
| | | storeId:null, |
| | | storeName:"", |
| | | parentName:"", |
| | | phone:"", |
| | | learnerName:"", |
| | | learnerAge:null, |
| | | name:"", |
| | | birthday:"", |
| | | appointmentTime:"", |
| | | status:null, |
| | | state:null |
| | | gender:null, |
| | | salesmanUserId:null |
| | | |
| | | }; |
| | | data.id = $("#name").val() |
| | | data.province = $('#pCode option:selected').text(); |
| | | data.provinceCode = $("#pCode").val() |
| | | data.city = $('#cCode option:selected').text(); |
| | | data.cityCode = $("#cCode").val() |
| | | data.storeId = $("#store").val() |
| | | data.storeName = $('#store option:selected').text(); |
| | | data.parentName = $("#parentName").val() |
| | | data.phone = $("#phone").val() |
| | | data.learnerName = $("#learnerName").val() |
| | | data.learnerAge = $("#learnerAge").val() |
| | | data.name = $("#learnerName").val() |
| | | data.birthday = $("#birthday").val() |
| | | data.appointmentTime = $("#appointmentTime").val().replace("T"," ") |
| | | console.log("看看") |
| | | console.log(data.appointmentTime); |
| | | data.gender = $("#gender").val() |
| | | data.salesmanUserId = $("#salesmanUserName").val() |
| | | |
| | | if($("#pCode").val()==''){ |
| | | Feng.info("请选择省") |
| | | return; |
| | |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if($("#store").val()=='' ){ |
| | | Feng.info("请选择门店") |
| | | return; |
| | | } |
| | | if($("#parentName").val()=='' ){ |
| | | Feng.info("请输入家长姓名") |
| | | return; |
| | | } |
| | | |
| | | if($("#phone").val()=='' ){ |
| | | Feng.info("请输入家长联系方式") |
| | | Feng.info("请输入联系方式") |
| | | return; |
| | | } |
| | | if($("#learnerName").val()=='' ){ |
| | | Feng.info("请输入学员姓名") |
| | | return; |
| | | } |
| | | if($("#learnerAge").val()=='' ){ |
| | | Feng.info("请输入学员年龄") |
| | | return; |
| | | } |
| | | if($("#birthday").val()=='' ){ |
| | | Feng.info("请选择学员生日") |
| | | Feng.info("请选择生日") |
| | | return; |
| | | } |
| | | if($("#appointmentTime").val()=='' ){ |
| | | Feng.info("请选择预约时间") |
| | | if($("#gender").val()=='' ){ |
| | | Feng.info("请选择性别") |
| | | return; |
| | | } |
| | | if($("#salesmanUserName").val()=='' ){ |
| | | Feng.info("请选择销售人员") |
| | | return; |
| | | } |
| | | |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/appUser/addAppUser" , |
| | | type: "POST", |
| | | data: JSON.stringify(data), |
| | | contentType: "application/json", |
| | | success: function (response) { |
| | | if (response=="5001"){ |
| | | Feng.error("当前手机号 已被注册") |
| | | }else{ |
| | | window.parent.TQuestion.table.refresh(); |
| | | TQuestion.close(); |
| | | Feng.success("添加成功"); |
| | | } |
| | | |
| | | }, |
| | | error: function (xhr, status, error) { |
| | | Feng.error("添加失败!" + error); |
| | |
| | | TQuestion.updateSubmit = function(){ |
| | | var data = { |
| | | id:null, |
| | | province:"", |
| | | provinceCode:"", |
| | | city:"", |
| | | cityCode:"", |
| | | phone:"", |
| | | name:"", |
| | | position:"", |
| | | sort:"", |
| | | birthday:"", |
| | | gender:null, |
| | | salesmanUserId:null |
| | | |
| | | }; |
| | | data.name = $("#name").val() |
| | | data.position = $("#position").val() |
| | | data.sort = $("#sort").val() |
| | | data.id = $("#dataId").val() |
| | | if($("#name").val()==''){ |
| | | Feng.info("请输入分类名称") |
| | | data.id = $("#id").val() |
| | | data.province = $('#pCode option:selected').text(); |
| | | data.provinceCode = $("#pCode").val() |
| | | data.city = $('#cCode option:selected').text(); |
| | | data.cityCode = $("#cCode").val() |
| | | data.phone = $("#phone").val() |
| | | data.name = $("#learnerName").val() |
| | | data.birthday = $("#birthday").val() |
| | | data.gender = $("#gender").val() |
| | | data.salesmanUserId = $("#salesmanUserName").val() |
| | | |
| | | if($("#pCode").val()==''){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if($("#cCode").val()==''){ |
| | | Feng.info("请选择所在位置") |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if($("#account").val()=='' ){ |
| | | Feng.info("请输入排序") |
| | | if($("#phone").val()=='' ){ |
| | | Feng.info("请输入联系方式") |
| | | return; |
| | | } |
| | | if($("#learnerName").val()=='' ){ |
| | | Feng.info("请输入学员姓名") |
| | | return; |
| | | } |
| | | if($("#birthday").val()=='' ){ |
| | | Feng.info("请选择生日") |
| | | return; |
| | | } |
| | | if($("#gender").val()=='' ){ |
| | | Feng.info("请选择性别") |
| | | return; |
| | | } |
| | | if($("#salesmanUserName").val()=='' ){ |
| | | Feng.info("请选择销售人员") |
| | | return; |
| | | } |
| | | |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/benefits/addBenefits" , |
| | | url: Feng.ctxPath + "/appUser/addAppUser" , |
| | | type: "POST", |
| | | data: JSON.stringify(data), |
| | | contentType: "application/json", |
| | | success: function (response) { |
| | | if (response=="5001"){ |
| | | Feng.error("当前手机号 已被注册") |
| | | }else{ |
| | | window.parent.TQuestion.table.refresh(); |
| | | TQuestion.close(); |
| | | Feng.success("添加成功"); |
| | | } |
| | | |
| | | }, |
| | | error: function (xhr, status, error) { |
| | | Feng.error("添加失败!" + error); |
| | | } |
| | | }); |
| | | |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
New file |
| | |
| | | /** |
| | | * 车辆管理管理初始化 |
| | | */ |
| | | var TCompetition = { |
| | | id: "TCompetitionTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | var role =$("#roleType").val() |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TCompetition.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: 'id', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '所在省市', field: 'provinceAndCity', visible: role==1?true:false, align: 'center', valign: 'middle'}, |
| | | {title: '门店名称', field: 'storeName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '课包类型', field: 'coursePackageType', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '课包名称', field: 'coursePackage', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '购买用户', field: 'payUser', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '联系方式', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '购课学员', field: 'payStudent', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '购买方式', field: 'buyType', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return{1:"线下",2:"线上",3:"折扣"}[data] |
| | | } |
| | | }, |
| | | {title: '支付方式', field: 'buyTypeName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '总金额', field: 'originalPrice', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠金额', field: 'discountAmount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付价格', field: 'cashPayment', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付状态', field: 'payStatus', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return{1:"待支付",2:"已支付"}[data] |
| | | } |
| | | }, |
| | | {title: '赠送课时', field: 'giftClassHours', visible: true, align: 'center', valign: 'middle'} |
| | | ]; |
| | | }; |
| | | function currentTime(timestamp){ |
| | | var time = timestamp + ''; |
| | | if(time.length != 13){ |
| | | timestamp = timestamp * 1000; |
| | | } |
| | | var date = new Date(timestamp);; |
| | | var Y = date.getFullYear() + '-'; |
| | | var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; |
| | | var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' '; |
| | | |
| | | var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':'; |
| | | var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':'; |
| | | var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()); |
| | | var strDate = Y + M + D + h + m + s; |
| | | return strDate |
| | | } |
| | | |
| | | function currentTime1(timestamp){ |
| | | var time = timestamp + ''; |
| | | if(time.length != 13){ |
| | | timestamp = timestamp * 1000; |
| | | } |
| | | var date = new Date(timestamp);; |
| | | var Y = date.getFullYear() + '-'; |
| | | var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; |
| | | var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' '; |
| | | |
| | | var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':'; |
| | | var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':'; |
| | | var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()); |
| | | var strDate = Y + M + D ; |
| | | return strDate |
| | | } |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TCompetition.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TCompetition.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加车辆管理 |
| | | */ |
| | | TCompetition.openAddTCompetition = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/cpPayment/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(); |
| | | console.log(oneId) |
| | | var content = "<option value=''>请选择</option>"; |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){ |
| | | if(data!=null){ |
| | | |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.name+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | TCompetition.nextStore = function (e) { |
| | | var oneId=$(e).val(); |
| | | console.log(oneId) |
| | | var content = "<option value=''>请选择</option>"; |
| | | var ajax = new $ax(Feng.ctxPath + "/coursePackage/getCoursePackageByStoreId", function(data){ |
| | | if(data!=null){ |
| | | |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#coursePackageType").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("storeId",oneId); |
| | | ajax.start(); |
| | | }; |
| | | TCompetition.addSubmit = function(){ |
| | | var data = { |
| | | appUserId:"", |
| | | studentId:"", |
| | | coursePackageId:"", |
| | | payType:7, |
| | | classHours:"", |
| | | originalPrice:"", |
| | | cashPayment:null, |
| | | playPaiCoin:null, |
| | | totalClassHours:null, |
| | | laveClassHours:null, |
| | | absencesNumber:null, |
| | | payUserType:2, |
| | | payStatus:1, |
| | | orderNumber:2, |
| | | payUserId:2, |
| | | status:null, |
| | | withdrawalTime:"", |
| | | certificate:"", |
| | | state:1, |
| | | giftClassHours:null, |
| | | useTime:"", |
| | | payUserName:"", |
| | | }; |
| | | data.appUserId = appUserId |
| | | data.studentId = $("#student").val() |
| | | data.coursePackageId = $("#coursePackageName").val() |
| | | data.cashPayment = $("#cashPayment").val() |
| | | data.playPaiCoin = $("#playPaiCoin").val() |
| | | |
| | | if($("#studentId").val()=='' ){ |
| | | Feng.info("请选择学员") |
| | | return; |
| | | } |
| | | if($("#pCode").val()=='' ){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if($("#cCode").val()=='' ){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if($("#store").val()==''){ |
| | | Feng.info("请选择门店") |
| | | return; |
| | | } |
| | | if($("#coursePackageType").val()=='' ){ |
| | | Feng.info("请选择课包类型") |
| | | return; |
| | | } |
| | | if($("#coursePackageName").val()==''){ |
| | | Feng.info("请选择课包名称") |
| | | return; |
| | | } |
| | | if($("#courseTime").val()==''){ |
| | | Feng.info("请选择课时规格") |
| | | return; |
| | | } |
| | | if($("#cashPayment").val()=='' || $("#playPaiCoin").val()==''){ |
| | | Feng.info("请输入支付金额或请输入玩湃币支付") |
| | | return; |
| | | } |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/tSite/changeState", |
| | | type: "POST", |
| | | contentType: "application/json", // 设置请求头的 Content-Type |
| | | data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | Feng.success("上架成功!"); |
| | | TSite.search(); |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "上架失败!"; |
| | | Feng.error("您的网络异常!"); |
| | | } |
| | | }); |
| | | |
| | | }; |
| | | TCompetition.getCoursePackage = function (e) { |
| | | var oneId=$(e).val(); |
| | | console.log(oneId) |
| | | var content = "<option value=''>请选择</option>"; |
| | | var ajax = new $ax(Feng.ctxPath + "/coursePackage/getCoursePackageByType", function(data){ |
| | | if(data!=null){ |
| | | |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#coursePackageName").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("storeId",oneId); |
| | | ajax.start(); |
| | | }; |
| | | TCompetition.twoChange = function (e) { |
| | | var oneId=e; |
| | | var content = "<option value=''>请选择</option>"; |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){ |
| | | if(data!=null){ |
| | | |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.name+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | }; |
| | | TCompetition.threeChange = function (e) { |
| | | var oneId=e; |
| | | console.log("看看奥") |
| | | console.log(oneId) |
| | | var content1 = "<option value=''>请选择门店</option>"; |
| | | var ajax2=new $ax(Feng.ctxPath + "/cpPayment/getStore", function(data){ |
| | | console.log("看看返回数据") |
| | | console.log(data) |
| | | $.each(data, function(k,v) { |
| | | content1 += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#store").empty().append(content1); |
| | | }); |
| | | ajax2.set("city",oneId); |
| | | ajax2.start(); |
| | | }; |
| | | var appUserId ; |
| | | TCompetition.getStudent = function () { |
| | | var phone = $("#vipPhone").val(); |
| | | var phoneRegex = /^1[3456789]\d{9}$/; |
| | | // 使用正则表达式进行验证 |
| | | if (!phoneRegex.test(phone)) { |
| | | Feng.error("手机号不合法"); |
| | | return; |
| | | } |
| | | // 回填省市 |
| | | var province; |
| | | var city; |
| | | var c; |
| | | var content = "<option value=''>请选择学员</option>"; |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/cpPayment/getUserByPhone/"+phone, |
| | | type: "GET", |
| | | contentType: "application/json", // 设置请求头的 Content-Type |
| | | success: function(response) { |
| | | console.log("==================="); |
| | | console.log(response) |
| | | if (response==""){ |
| | | let htmlStr = |
| | | '<div class="form-horizontal">' + |
| | | ' <div class="col-sm-11" style="padding: 20px;">' + |
| | | ' <div class="form-group">\n' + |
| | | ' <h2>验证失败,当前手机号未注册玩湃会员</h2>\n' + |
| | | ' </div>'; |
| | | |
| | | layer.open({ |
| | | type: 1 |
| | | , title: '提示' |
| | | , area: ['50%', '90%'] |
| | | , offset: 'auto' //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset |
| | | , id: 'layerDemo' //防止重复弹出cge |
| | | , content: htmlStr |
| | | , btn: ['去添加', '关闭'] |
| | | , btnAlign: 'c' //按钮居中 |
| | | , shade: 0.5 //不显示遮罩 |
| | | , yes: function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'首页设置', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | // todo 写用户管理路径 |
| | | content: Feng.ctxPath + '/cpPayment/add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }, |
| | | }); |
| | | }else{ |
| | | province = response.province; |
| | | city = response.city; |
| | | appUserId = response.id; |
| | | var ajax1=new $ax(Feng.ctxPath + "/cpPayment/queryStudentList", function(data){ |
| | | |
| | | if (data.length==0){ |
| | | let htmlStr = |
| | | '<div class="form-horizontal">' + |
| | | ' <div class="col-sm-11" style="padding: 20px;">' + |
| | | ' <div class="form-group">\n' + |
| | | ' <h2>验证失败,当前用户未添加学员信息</h2>\n' + |
| | | ' </div>'; |
| | | |
| | | layer.open({ |
| | | type: 1 |
| | | , title: '提示' |
| | | , area: ['50%', '90%'] |
| | | , offset: 'auto' //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset |
| | | , id: 'layerDemo' //防止重复弹出cge |
| | | , content: htmlStr |
| | | , btn: ['去添加', '关闭'] |
| | | , btnAlign: 'c' //按钮居中 |
| | | , shade: 0.5 //不显示遮罩 |
| | | , yes: function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'首页设置', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | // todo 写用户管理路径 |
| | | content: Feng.ctxPath + '/cpPayment/add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }, |
| | | }); |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#student").empty().append(content); |
| | | var provinceSelect = document.getElementById("pCode"); |
| | | for (var i = 0; i < provinceSelect.options.length; i++) { |
| | | var option = provinceSelect.options[i]; |
| | | if (option.text === province) { |
| | | option.selected = true; |
| | | console.log(option.value) |
| | | TCompetition.twoChange(option.value); |
| | | break; // 找到匹配的选项后,可以选择停止遍历 |
| | | } |
| | | } |
| | | |
| | | var content1 = "<option value=''>请选择门店</option>"; |
| | | var citySelect = document.getElementById("cCode"); |
| | | for (var i = 0; i < citySelect.options.length; i++) { |
| | | var option = citySelect.options[i]; |
| | | if (option.text === city) { |
| | | option.selected = true; |
| | | c = option.text; |
| | | |
| | | TCompetition.threeChange(c) |
| | | |
| | | break; // 找到匹配的选项后,可以选择停止遍历 |
| | | } |
| | | } |
| | | }); |
| | | ajax1.set("appUserId",appUserId); |
| | | ajax1.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 selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | console.log("看看选择") |
| | | console.log(selected) |
| | | const data1 = { |
| | | ids:[], |
| | | payUserName:"" |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | var id = ""; |
| | | id = obj.id; |
| | | data1.ids.push(id); |
| | | }); |
| | | console.log(data1) |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/cpPayment/pay", |
| | | type: "POST", |
| | | contentType: "application/json", // 设置请求头的 Content-Type |
| | | data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | Feng.success("支付成功!"); |
| | | TCompetition.table.refresh(); |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "上架失败!"; |
| | | Feng.error("您的网络异常!"); |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | 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 = {}; |
| | | if ($('#pCode option:selected').text()!="全部"){ |
| | | queryData['province'] = $('#pCode option:selected').text(); |
| | | }else{ |
| | | queryData['province'] = ""; |
| | | } |
| | | |
| | | queryData['city'] = $("#cCode").val(); |
| | | queryData['coursePackageTypeId'] = $("#coursePackage").val(); |
| | | queryData['coursePackageTypeName'] = $("#coursePackageName").val(); |
| | | queryData['payStatus'] = $("#state").val(); |
| | | queryData['payUser'] = $("#payUser").val(); |
| | | queryData['payStudent'] = $("#payStudent").val(); |
| | | TCompetition.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TCompetition.resetSearch = function () { |
| | | $("#pCode").val(""); |
| | | $("#cCode").val(""); |
| | | $("#coursePackage").val(""); |
| | | $("#coursePackageName").val(""); |
| | | $("#state").val(""); |
| | | $("#payUser").val(""); |
| | | $("#payStudent").val(""); |
| | | TCompetition.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TCompetition.initColumn(); |
| | | var table = new BSTable(TCompetition.id, "/cpPayment/listAll", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TCompetition.table = table.init(); |
| | | }); |
| | | |
| | | |
New file |
| | |
| | | /** |
| | | * 初始化车辆管理详情对话框 |
| | | */ |
| | | var language=1; |
| | | var TCarInfoDlg = { |
| | | goodsPicArray: [], |
| | | tCarInfoData : {}, |
| | | validateFields: { |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 验证数据是否为空 |
| | | */ |
| | | TCarInfoDlg.validate = function () { |
| | | $('#carInfoForm').data("bootstrapValidator").resetForm(); |
| | | $('#carInfoForm').bootstrapValidator('validate'); |
| | | return $("#carInfoForm").data('bootstrapValidator').isValid(); |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TCarInfoDlg.clearData = function() { |
| | | this.tCarInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TCarInfoDlg.set = function(key, val) { |
| | | this.tCarInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TCarInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TCarInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TCompetition.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TCarInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('isPlatCar') |
| | | .set('companyId') |
| | | .set('franchiseeId') |
| | | .set('carColor') |
| | | .set('carModelId') |
| | | .set('carBrandId') |
| | | .set('carLicensePlate') |
| | | .set('carPhoto') |
| | | .set('drivingLicenseNumber') |
| | | .set('drivingLicensePhoto') |
| | | .set('annualInspectionTime') |
| | | .set('commercialInsuranceTime') |
| | | .set('createTime') |
| | | .set('state') |
| | | .set('addType') |
| | | .set('addObjectId') |
| | | .set('plateColor') |
| | | .set('vehicleType') |
| | | .set('ownerName') |
| | | .set('engineId') |
| | | .set('VIN') |
| | | .set('certifyDateA') |
| | | .set('fuelType') |
| | | .set('engineDisplace') |
| | | .set('certificate') |
| | | .set('transAgency') |
| | | .set('transArea') |
| | | .set('transDateStart') |
| | | .set('transDateStop') |
| | | .set('certifyDateB') |
| | | .set('fixState') |
| | | .set('nextFixDate') |
| | | .set('checkState') |
| | | .set('feePrintId') |
| | | .set('GPSBrand') |
| | | .set('GPSModel') |
| | | .set('GPSIMEI') |
| | | .set('GPSInstallDate') |
| | | .set('registerDate') |
| | | .set('commercialType'); |
| | | } |
| | | |
| | | TCarInfoDlg.oneChange = function (e) { |
| | | console.log(111) |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | TCarInfoDlg.oneChangeNext = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/oneChangeNext", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择账号</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#account").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | TCarInfoDlg.saveImg = function () { |
| | | var id=$("#id").val(); |
| | | var img=$("#welfarePicture").val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/saveImg", function(data){ |
| | | if(data.code == 200){ |
| | | Feng.success("保存成功") |
| | | } |
| | | }); |
| | | ajax.set("id",id); |
| | | ajax.set("img",img); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TCarInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | |
| | | var OBJradio= $("input[name='type']:checked").val(); |
| | | if(OBJradio==2){ |
| | | let account = $("#account").val() |
| | | if(account==''){ |
| | | Feng.info("请选择所属运营商") |
| | | return; |
| | | } |
| | | } |
| | | let pCode = $("#pCode").val() |
| | | let cCode = $("#cCode").val() |
| | | |
| | | |
| | | let name = $("#name").val() |
| | | let phone = $("#phone").val() |
| | | |
| | | if(pCode=='' && $("#role")=="1"){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if(cCode=='' && $("#role")=="1"){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if(name==''){ |
| | | Feng.info("门店名称不能为空") |
| | | return; |
| | | } |
| | | if(phone==''){ |
| | | Feng.info("联系电话不能为空") |
| | | return; |
| | | } |
| | | |
| | | let address = $("#address").val() |
| | | |
| | | if(address==''){ |
| | | Feng.info("请输入地址") |
| | | return; |
| | | } |
| | | let time = $("#time").val() |
| | | |
| | | if(time==''){ |
| | | Feng.info("请填写营业时间") |
| | | return; |
| | | } |
| | | let intro = $("#intro").val() |
| | | |
| | | if(intro==''){ |
| | | Feng.info("请填写门店介绍") |
| | | return; |
| | | } |
| | | let userName = $("#userName").val() |
| | | |
| | | if(userName==''){ |
| | | Feng.info("请输入店长姓名") |
| | | return; |
| | | } |
| | | let userPhone = $("#userPhone").val() |
| | | |
| | | if(userPhone==''){ |
| | | Feng.info("请输入店长手机号") |
| | | return; |
| | | } |
| | | let img = $("#img").val() |
| | | |
| | | if(img==''){ |
| | | Feng.info("请上传门店封面") |
| | | return; |
| | | } |
| | | var goodImgs = this.goodsPicArray; |
| | | if(goodImgs.length==0){ |
| | | Feng.info("请上传实景图") |
| | | return; |
| | | } |
| | | var imgOne =""; |
| | | for (let i = 0; i <goodImgs.length; i++) { |
| | | if(i==goodImgs.length-1){ |
| | | imgOne += (goodImgs[i].response) |
| | | }else { |
| | | imgOne+=(goodImgs[i].response+",") |
| | | } |
| | | |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/add", function(data){ |
| | | if(data=="5001"){ |
| | | Feng.error("该店长手机号已经存在!") |
| | | }else |
| | | if(data.code == 200){ |
| | | if(language==1){ |
| | | Feng.success("添加成功!"); |
| | | }else if(language==2){ |
| | | Feng.success("Successfully added!"); |
| | | }else { |
| | | Feng.success("Sangat berhasil ditambah!"); |
| | | } |
| | | window.parent.TCompetition.table.refresh(); |
| | | TCarInfoDlg.close(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tCarInfoData); |
| | | ajax.set("provinceCode",pCode); |
| | | ajax.set("cityCode",cCode); |
| | | ajax.set("name",name); |
| | | ajax.set("phone",phone); |
| | | ajax.set("cityManagerId",null); |
| | | 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("lat",$("#latitude").val()); |
| | | ajax.set("lon",$("#longitude").val()); |
| | | ajax.set("ids",$("#ids").val()); |
| | | ajax.set("type",OBJradio); |
| | | ajax.set("yyId",$("#account").val()); |
| | | ajax.start(); |
| | | } |
| | | var map = new AMap.Map('container', { |
| | | resizeEnable: true, // 允许缩放 |
| | | zoom: 15 // 设置地图的缩放级别,0 - 20 |
| | | }); |
| | | var marker; |
| | | //搜索地图 |
| | | TCarInfoDlg.searchByStationName = function(e,type){ |
| | | var keyword="成都"; |
| | | if(type==2){ |
| | | keyword = $(e).parent().prev().find("input").val(); |
| | | }else { |
| | | if($("#address").val()!=null && $("#address").val()!=''){ |
| | | keyword = $("#address").val(); |
| | | } |
| | | } |
| | | type=1; |
| | | AMap.plugin('AMap.Geocoder', function() { |
| | | var geocoder = new AMap.Geocoder(); |
| | | console.log(geocoder) |
| | | console.log(keyword) |
| | | geocoder.getLocation(keyword, function(status, result) { |
| | | console.log(status,result) |
| | | if (status === 'complete' && result.info === 'OK') { |
| | | // 经纬度 |
| | | var lng = result.geocodes[0].location.lng; |
| | | var lat = result.geocodes[0].location.lat; |
| | | $("#longitude").val(lng) |
| | | $("#latitude").val(lat) |
| | | // 地图实例 |
| | | map = new AMap.Map('container', { |
| | | resizeEnable: true, // 允许缩放 |
| | | center: [lng, lat], // 设置地图的中心点 |
| | | zoom: 15 // 设置地图的缩放级别,0 - 20 |
| | | }); |
| | | //地图画点 |
| | | //addMarker(lng,lat); |
| | | if(type==1 || type==2){ |
| | | showInfoClick(); |
| | | if(lng == null){ |
| | | }else{ |
| | | addMarker(lng,lat); |
| | | } |
| | | }else{ |
| | | addMarker(lng,lat); |
| | | } |
| | | } else { |
| | | console.log('定位失败!'); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | } |
| | | //地图点击事件 |
| | | function showInfoClick(){ |
| | | map.on('click', function (e) { |
| | | addMarker(e.lnglat.getLng(),e.lnglat.getLat()); |
| | | }); |
| | | } |
| | | //删除点 |
| | | function removeMarkers(){ |
| | | if(marker!=null){ |
| | | map.remove(marker); |
| | | } |
| | | |
| | | } |
| | | // 实例化点标记 |
| | | function addMarker(lon,lat) { |
| | | removeMarkers(); |
| | | marker = new AMap.Marker({ |
| | | map: map, |
| | | position: new AMap.LngLat(lon, lat), // 经纬度 |
| | | }); |
| | | //加经纬度 |
| | | $("#lon").val(lon); |
| | | $("#lat").val(lat); |
| | | var lnglatXY = [lon, lat];//地图上所标点的坐标 |
| | | AMap.service('AMap.Geocoder',function() {//回调函数 |
| | | geocoder = new AMap.Geocoder({ |
| | | }); |
| | | geocoder.getAddress(lnglatXY, function (status, result) { |
| | | if (status === 'complete' && result.info === 'OK') { |
| | | //获得了有效的地址信息: |
| | | //即,result.regeocode.formattedAddress |
| | | // alert(result.regeocode.formattedAddress) |
| | | //document.getElementById("address").value=result.regeocode.formattedAddress;//将获取到的地址信息赋值给文本框,保存进数据库 |
| | | |
| | | var address = result.regeocode.formattedAddress; |
| | | var city = result.regeocode.addressComponent.city; |
| | | var province = result.regeocode.addressComponent.province; |
| | | var district = result.regeocode.addressComponent.district; |
| | | $("#address").val(address); |
| | | } else { |
| | | //获取地址失败 |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TCarInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | |
| | | let pCode = $("#pCode").val() |
| | | let cCode = $("#cCode").val() |
| | | let account = $("#account").val() |
| | | var OBJradio= $("input[name='type']:checked").val(); |
| | | if(OBJradio==2){ |
| | | let account = $("#account").val() |
| | | if(account==''){ |
| | | Feng.info("请选择所属运营商") |
| | | return; |
| | | } |
| | | } |
| | | |
| | | let name = $("#name").val() |
| | | let phone = $("#phone").val() |
| | | |
| | | if(pCode=='' && $("#role")=="1"){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if(cCode=='' && $("#role")=="1"){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if(name==''){ |
| | | Feng.info("门店名称不能为空") |
| | | return; |
| | | } |
| | | if(phone==''){ |
| | | Feng.info("联系电话不能为空") |
| | | return; |
| | | } |
| | | |
| | | let address = $("#address").val() |
| | | |
| | | if(address==''){ |
| | | Feng.info("请输入地址") |
| | | return; |
| | | } |
| | | let time = $("#time").val() |
| | | |
| | | if(time==''){ |
| | | Feng.info("请填写营业时间") |
| | | return; |
| | | } |
| | | let intro = $("#intro").val() |
| | | |
| | | if(intro==''){ |
| | | Feng.info("请填写门店介绍") |
| | | return; |
| | | } |
| | | let userName = $("#userName").val() |
| | | |
| | | if(userName==''){ |
| | | Feng.info("请输入店长姓名") |
| | | return; |
| | | } |
| | | let userPhone = $("#userPhone").val() |
| | | |
| | | if(userPhone==''){ |
| | | Feng.info("请输入店长手机号") |
| | | return; |
| | | } |
| | | let img = $("#img").val() |
| | | |
| | | |
| | | let imgOne = $("#imgOne").val() |
| | | |
| | | if(imgOne==''){ |
| | | Feng.info("请上传实景图") |
| | | return; |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/update", function(data){ |
| | | if(data=="5001"){ |
| | | Feng.error("该店长手机号已经存在!") |
| | | }else |
| | | if(data.code == 200){ |
| | | if(language==1){ |
| | | Feng.success("修改成功!"); |
| | | }else if(language==2){ |
| | | Feng.success("Modify successfully!"); |
| | | }else { |
| | | Feng.success("Mengubah dengan sukses!"); |
| | | } |
| | | window.parent.TCompetition.table.refresh(); |
| | | TCarInfoDlg.close(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("provinceCode",pCode); |
| | | ajax.set("cityCode",cCode); |
| | | ajax.set("name",name); |
| | | ajax.set("phone",phone); |
| | | ajax.set("cityManagerId",account); |
| | | ajax.set("address",address); |
| | | ajax.set("time",time); |
| | | ajax.set("introduce",intro); |
| | | ajax.set("userName",userName); |
| | | ajax.set("userPhone",userPhone); |
| | | ajax.set("coverDrawing",img); |
| | | ajax.set("realPicture",imgOne); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | Feng.initValidator("carInfoForm", TCarInfoDlg.validateFields); |
| | | // 初始化图片上传 |
| | | var carPhoto = new $WebUpload("c1"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("c2"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("c3"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("c4"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("c5"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("c6"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("c7"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("c8"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("img"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var drivingLicensePhoto = new $WebUpload("drivingLicensePhoto"); |
| | | drivingLicensePhoto.setUploadBarId("progressBar"); |
| | | drivingLicensePhoto.init(); |
| | | |
| | | //地图搜索 |
| | | TCarInfoDlg.searchByStationName(); |
| | | }); |
| | | |
| | | /** |
| | | * 选择分公司后执行 |
| | | */ |
| | | TCarInfoDlg.oneChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/onChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 类型改变执行 |
| | | * @param e |
| | | */ |
| | | TCarInfoDlg.companyTypeClick = function (e) { |
| | | if (1 == e){ |
| | | $(".companyDiv").hide(); |
| | | } else if (2 == e){ |
| | | $(".companyDiv").show(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 车辆品牌改变时执行 |
| | | */ |
| | | TCarInfoDlg.saveAllImg = function (e) { |
| | | var id = $("#id").val() |
| | | var px1 = $("#px1").val() |
| | | var px2 = $("#px2").val() |
| | | var px3 = $("#px3").val() |
| | | var px4 = $("#px4").val() |
| | | var px5 = $("#px5").val() |
| | | var px6 = $("#px6").val() |
| | | var px7 = $("#px7").val() |
| | | var px8 = $("#px8").val() |
| | | var c1 = $("#c1").val() |
| | | var c2 = $("#c2").val() |
| | | var c3 = $("#c3").val() |
| | | var c4 = $("#c4").val() |
| | | var c5 = $("#c5").val() |
| | | var c6 = $("#c6").val() |
| | | var c7 = $("#7").val() |
| | | var c8 = $("#c8").val() |
| | | var r1 = document.querySelector('input[name="r1"]').checked; |
| | | var r2 = document.querySelector('input[name="r2"]').checked; |
| | | var r3 = document.querySelector('input[name="r3"]').checked; |
| | | var r4 = document.querySelector('input[name="r4"]').checked; |
| | | var r5 = document.querySelector('input[name="r5"]').checked; |
| | | var r6 = document.querySelector('input[name="r6"]').checked; |
| | | var r7 = document.querySelector('input[name="r7"]').checked; |
| | | var r8 = document.querySelector('input[name="r8"]').checked; |
| | | if(r1){ |
| | | r1 =1 |
| | | }else{ |
| | | r1=0 |
| | | } |
| | | if(r2){ |
| | | r2 =1 |
| | | }else{ |
| | | r2=0 |
| | | } |
| | | if(r3){ |
| | | r3 =1 |
| | | }else{ |
| | | r3=0 |
| | | } |
| | | if(r4){ |
| | | r4 =1 |
| | | }else{ |
| | | r4=0 |
| | | } |
| | | if(r5){ |
| | | r5 =1 |
| | | }else{ |
| | | r5=0 |
| | | } |
| | | if(r6){ |
| | | r6 =1 |
| | | }else{ |
| | | r6=0 |
| | | } |
| | | if(r7){ |
| | | r7 =1 |
| | | }else{ |
| | | r7=0 |
| | | } |
| | | if(r8){ |
| | | r8 =1 |
| | | }else{ |
| | | r8=0 |
| | | } |
| | | |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/saveImgAll", function(data){ |
| | | if(data.code == 200){ |
| | | Feng.success("保存成功!"); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | },function(data){ |
| | | Feng.error("保存失败!" + data.responseJSON.message + "!"); |
| | | |
| | | }); |
| | | ajax.set("id",id); |
| | | ajax.set("px1",px1); |
| | | ajax.set("px2",px2); |
| | | ajax.set("px3",px3); |
| | | ajax.set("px4",px4); |
| | | ajax.set("px5",px5); |
| | | ajax.set("px6",px6); |
| | | ajax.set("px7",px7); |
| | | ajax.set("px8",px8); |
| | | ajax.set("c1",c1); |
| | | ajax.set("c2",c2); |
| | | ajax.set("c3",c3); |
| | | ajax.set("c4",c4); |
| | | ajax.set("c5",c5); |
| | | ajax.set("c6",c6); |
| | | ajax.set("c7",c7); |
| | | ajax.set("c8",c8); |
| | | ajax.set("r1",r1); |
| | | ajax.set("r2",r2); |
| | | ajax.set("r3",r3); |
| | | ajax.set("r4",r4); |
| | | ajax.set("r5",r5); |
| | | ajax.set("r6",r6); |
| | | ajax.set("r7",r7); |
| | | ajax.set("r8",r8); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 专车服务被点击 |
| | | */ |
| | | TCarInfoDlg.zcServerClick = function () { |
| | | var serverBox1 = $('#serverBox1').prop('checked'); |
| | | if (serverBox1){ |
| | | $("#zcModelDiv").show(); |
| | | } else { |
| | | $("#zcModelDiv").hide(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 跨城服务被点击 |
| | | */ |
| | | TCarInfoDlg.kcServerClick = function () { |
| | | var serverBox3 = $('#serverBox3').prop('checked'); |
| | | if (serverBox3){ |
| | | $("#kcModelDiv").show(); |
| | | } else { |
| | | $("#kcModelDiv").hide(); |
| | | } |
| | | } |
| | |
| | | {title: '所在省市', field: 'provinceAndCity', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '充值用户', field: 'name', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '联系方式', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '充值时间', field: 'time', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '充值时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '充值金额', field: 'amount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '玩湃币数量', field: 'playPaiCoins', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '充值类型', field: 'type', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '充值类型', field: 'type', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return {1:"会员充值",0:"非会员充值"}[data] |
| | | } |
| | | }, |
| | | ]; |
| | | }; |
| | | function currentTime(timestamp){ |
| | |
| | | TCompetition.table.refresh({query: queryData}); |
| | | }; |
| | | TCompetition.getAmount = function () { |
| | | |
| | | var ajax = new $ax(Feng.ctxPath + "/finance/getAmount", function (data) { |
| | | var amountElement = document.getElementById("amount"); |
| | | amountElement.innerText = data; |
| | | }, function (data) { |
| | | |
| | | amountElement.innerText = "充值总金额:"+data+"元"; |
| | | }); |
| | | ajax.set("province",$("#pCode").val()); |
| | | ajax.set("city",$("#cCode").val()); |
| | | ajax.set("name",$("#name").val()); |
| | | ajax.set("phone",$("#phone").val()); |
| | | ajax.set("time",$("#beginTime").val()); |
| | | ajax.set("beginTime",$("#beginTime").val()); |
| | | ajax.set("type",$("#type").val()); |
| | | ajax.start(); |
| | | }; |
| | |
| | | $("#cCode").val(""); |
| | | $("#name").val(""); |
| | | $("#phone").val(""); |
| | | $("#shopName").val(""); |
| | | $("#type").val(""); |
| | | $("#beginTime").val(""); |
| | | TCompetition.search(); |
| | | }; |
| | | |
| | |
| | | $(function () { |
| | | var defaultColunms = TCompetition.initColumn(); |
| | | var table = new BSTable(TCompetition.id, "/finance/listAll", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | table.setPaginationType("client"); |
| | | TCompetition.table = table.init(); |
| | | TCompetition.getAmount(); |
| | | |
| | | }); |
| | | |
| | | /** |
| | |
| | | Feng.info("请输入场地责任险有效期") |
| | | return; |
| | | } |
| | | |
| | | if($("#img").val()==''){ |
| | | Feng.info("请上传场地责任有效期图片") |
| | | return; |
| | |
| | | password: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: language==1?'密码不能为空':(language==2?"The password cannot be empty.":"Kata sandi tidak bisa kosong.") |
| | | }, |
| | | identical: { |
| | | field: 'rePassword', |
| | | message: language==1?'两次密码不一致':(language==2?"The password entered twice are inconsistent.":"Kata sandi yang dimasukkan dua kali tidak konsisten.") |
| | | message: '密码不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[^a-zA-Z0-9]).{8,30}/, |
| | | message: language==1?'密码中必须包含大小字母、数字、特称字符,至少8个字符,最多30个字符':(language==2?"The name cannot be empty. The password must contain letters, numbers, and special characters. At least 8 characters and at most 30 characters.":"Namanya tidak bisa kosong. Kata sandi harus mengandung huruf, nomor, dan karakter khusus. Setidaknya 8 karakter dan paling tidak 30 karakter.") |
| | | message: '密码中必须包含大小字母、数字、特称字符,至少8个字符,最多30个字符' |
| | | }, |
| | | } |
| | | }, |
| | | rePassword: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: language==1?'密码不能为空':(language==2?"The password cannot be empty.":"Kata sandi tidak bisa kosong.") |
| | | }, |
| | | identical: { |
| | | field: 'password', |
| | | message: language==1?'两次密码不一致':(language==2?"The password entered twice are inconsistent.":"Kata sandi yang dimasukkan dua kali tidak konsisten.") |
| | | message: '密码不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[^a-zA-Z0-9]).{8,30}/, |
| | | message: language==1?'密码中必须包含大小字母、数字、特称字符,至少8个字符,最多30个字符':(language==2?"The name cannot be empty. The password must contain letters, numbers, and special characters. At least 8 characters and at most 30 characters.":"Namanya tidak bisa kosong. Kata sandi harus mengandung huruf, nomor, dan karakter khusus. Setidaknya 8 karakter dan paling tidak 30 karakter.") |
| | | message: '密码中必须包含大小字母、数字、特称字符,至少8个字符,最多30个字符' |
| | | }, |
| | | } |
| | | } |
| | |
| | | return; |
| | | } |
| | | |
| | | if (!this.validatePwd()) { |
| | | if(language==1){ |
| | | Feng.error("两次密码输入不一致"); |
| | | }else if(language==2){ |
| | | Feng.error("The two password entries are inconsistent"); |
| | | }else { |
| | | Feng.error("Dua entri kata sandi tidak konsisten"); |
| | | } |
| | | |
| | | return; |
| | | } |
| | | |
| | | var birthday = $("#birthday").val(); |
| | | if ("" == birthday){ |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.models.auth.In; |
| | | import lombok.Data; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import java.util.Date; |
| | | |
| | | |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 位置(1=首页,2=首页底部,3=线上课得积分,4=看视频得奖励,5=常见问题) |
| | | * 位置(1=首页,2=线上课得积分,3=看视频得奖励,4=常见问题) |
| | | */ |
| | | @TableField("position") |
| | | private Integer position; |
| | |
| | | @TableField("img") |
| | | private String img; |
| | | /** |
| | | * 跳转页面 |
| | | * 跳转页面id |
| | | */ |
| | | @TableField("jumpPage") |
| | | private String jumpPage; |
| | | private Integer jumpPage; |
| | | /** |
| | | * 排序 |
| | | */ |
| | |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date insertTime; |
| | | /** |
| | | * 跳转模块 |
| | |
| | | @TableField("turnId") |
| | | private String turnId; |
| | | /** |
| | | * 跳转页面id |
| | | * 跳转页面 |
| | | */ |
| | | @TableField("pageId") |
| | | private Integer pageId; |
| | | @TableField("page") |
| | | private String page; |
| | | /** |
| | | * 跳转类型id |
| | | */ |
| | | @TableField("typeId") |
| | | private Integer typeId; |
| | | } |
| | | |
| | |
| | | package com.dsh.other.feignclient.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | update t_banner set |
| | | state = #{state} |
| | | <where> |
| | | <if test="ids != null and questionIds.size()>0"> |
| | | <if test="ids != null and ids.size()>0"> |
| | | AND t_banner.id IN |
| | | <foreach collection="ids" separator="," item="id" open="(" close=")"> |
| | | #{id} |