New file |
| | |
| | | package com.dsh.course.feignClient.activity; |
| | | |
| | | import com.dsh.course.feignClient.activity.model.THuiminAgreement; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2025/3/29 |
| | | */ |
| | | @FeignClient(value = "mb-cloud-activity") |
| | | public interface HuiminAgreementClient { |
| | | @PostMapping("/tHuiminAgreement/save") |
| | | void insert(THuiminAgreement tHuiminAgreement); |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.activity; |
| | | |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2025/3/29 |
| | | */ |
| | | @FeignClient(value = "mb-cloud-activity") |
| | | public interface HuiminCardClient { |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.activity; |
| | | |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2025/3/29 |
| | | */ |
| | | @FeignClient(value = "mb-cloud-activity") |
| | | public interface HuiminRecordClient { |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.activity; |
| | | |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2025/3/29 |
| | | */ |
| | | @FeignClient(value = "mb-cloud-activity") |
| | | public interface PayHuiminClient { |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.activity.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 惠民卡协议管理 |
| | | * </p> |
| | | * |
| | | * @since 2023-07-12 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_huimin_agreement") |
| | | public class THuiminAgreement extends Model<THuiminAgreement> { |
| | | private static final long serialVersionUID = 1L; |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 运营商id 选择默认传null |
| | | */ |
| | | @TableField("operatorId") |
| | | private Integer operatorId; |
| | | /** |
| | | *添加人员说明文案 |
| | | */ |
| | | @TableField("addUserRemark") |
| | | private String addUserRemark; |
| | | /** |
| | | *选择人员说明文案 |
| | | */ |
| | | @TableField("selectUserRemark") |
| | | private String selectUserRemark; |
| | | |
| | | private String agreementSettings; |
| | | |
| | | private List<THuiminAgreementSetting> tHuiminAgreementSettingList; |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.activity.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 惠民卡协议配置 关联惠民卡协议管理 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-12 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_points_merchandise_city") |
| | | public class THuiminAgreementSetting extends Model<THuiminAgreementSetting> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 协议名称 |
| | | */ |
| | | @TableField("agreementName") |
| | | private String agreementName; |
| | | /** |
| | | *协议内容 |
| | | */ |
| | | @TableField("agreementContent") |
| | | private String agreementContent; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.activity.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 惠民卡 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-12 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_huimin_card") |
| | | public class THuiminCard extends Model<THuiminCard> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 惠民卡名称 |
| | | */ |
| | | @TableField("huiMinName") |
| | | private String huiMinName; |
| | | /** |
| | | *惠民卡类型1年度2年内 |
| | | */ |
| | | @TableField("huiMinType") |
| | | private String huiMinType; |
| | | /** |
| | | *售卖金额 |
| | | */ |
| | | @TableField("salesMoney") |
| | | private BigDecimal salesMoney; |
| | | /** |
| | | *已购买封面 |
| | | */ |
| | | @TableField("buyCover") |
| | | private String buyCover; |
| | | /** |
| | | *未购买封面 |
| | | */ |
| | | @TableField("unBuyCover") |
| | | private String unBuyCover; |
| | | /** |
| | | *已购买使用说明 |
| | | */ |
| | | @TableField("buyRemark") |
| | | private String buyRemark; |
| | | /** |
| | | *未购买使用说明 |
| | | */ |
| | | @TableField("unBuyRemark") |
| | | private String unBuyRemark; |
| | | /** |
| | | *发放数量 为空表示不限 |
| | | */ |
| | | @TableField("grantCount") |
| | | private Integer grantCount; |
| | | /** |
| | | * 限购数量 为空表示不限 |
| | | */ |
| | | @TableField("limitCount") |
| | | private Integer limitCount; |
| | | /** |
| | | *轮播图 逗号分隔 |
| | | */ |
| | | @TableField("banner") |
| | | private String banner; |
| | | /** |
| | | *有效期 不填表示永久 |
| | | */ |
| | | @TableField("endTime") |
| | | private Date endTime; |
| | | /** |
| | | *可使用时间段,周,多个逗号分隔 |
| | | */ |
| | | @TableField("useWeeks") |
| | | private String useWeeks; |
| | | /** |
| | | *可使用时间段,时分秒,多个逗号分隔 |
| | | */ |
| | | @TableField("useTimes") |
| | | private String useTimes; |
| | | /** |
| | | *不可用时间段,yyyy-MM-dd HH:mm:ss,多个逗号分隔 |
| | | */ |
| | | @TableField("unUseTimes") |
| | | private String unUseTimes; |
| | | /** |
| | | *使用范围1门店2场地 |
| | | */ |
| | | @TableField("useScope") |
| | | private String useScope; |
| | | /** |
| | | *根据适用范围,存储门店id或场地id,多个逗号分隔 |
| | | */ |
| | | @TableField("useIds") |
| | | private String useIds; |
| | | /** |
| | | *惠民卡介绍 |
| | | */ |
| | | @TableField("introduce") |
| | | private String introduce; |
| | | /** |
| | | *排序 |
| | | */ |
| | | @TableField("sort") |
| | | private String sort; |
| | | /** |
| | | *门店id |
| | | */ |
| | | @TableField("storeId") |
| | | private Integer storeId; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.activity.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 惠民卡 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-12 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_pay_huimin") |
| | | public class TPayHuimin extends Model<TPayHuimin> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 金额 |
| | | */ |
| | | @TableField("salesMoney") |
| | | private BigDecimal salesMoney; |
| | | /** |
| | | *购买用户id |
| | | */ |
| | | @TableField("appUserId") |
| | | private Integer appUserId; |
| | | /** |
| | | *绑定人员id,多个逗号拼接,关联student表 |
| | | */ |
| | | @TableField("studentId") |
| | | private String studentId; |
| | | /** |
| | | *有效期 |
| | | */ |
| | | @TableField("endTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date endTime; |
| | | /** |
| | | *创建时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date insertTime; |
| | | /** |
| | | *付款时间 |
| | | */ |
| | | @TableField("paymentTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date paymentTime; |
| | | /** |
| | | *退款时间 |
| | | */ |
| | | @TableField("refundTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date refundTime; |
| | | /** |
| | | *状态1使用中2已退款 |
| | | */ |
| | | @TableField("status") |
| | | private Integer status; |
| | | /** |
| | | *付款方式1微信2支付宝 |
| | | */ |
| | | @TableField("paymentType") |
| | | private Integer paymentType; |
| | | /** |
| | | *退款状态 1未退款 2已退款 3线下退款(使用过或超过七日退款) |
| | | */ |
| | | @TableField("refundStatus") |
| | | private Integer refundStatus; |
| | | /** |
| | | *惠民卡id |
| | | */ |
| | | @TableField("cardId") |
| | | private Integer cardId; |
| | | /** |
| | | *订单号 |
| | | */ |
| | | @TableField("code") |
| | | private String code; |
| | | /** |
| | | *第三方支付流水号 |
| | | */ |
| | | @TableField("orderNumber") |
| | | private String orderNumber; |
| | | |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | import com.dsh.course.feignClient.activity.HuiminAgreementClient; |
| | | import com.dsh.course.feignClient.activity.model.THuiminAgreement; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | /** |
| | | * 惠民卡控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2025-03-29 17:40:11 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tHuiminAgreement") |
| | | public class THuiminAgreementController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tHuiminAgreement/"; |
| | | |
| | | @Autowired |
| | | private HuiminAgreementClient huiminAgreementClient; |
| | | |
| | | /** |
| | | * 跳转到惠民卡首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | model.addAttribute("objectType", objectType); |
| | | return PREFIX + "tHuiminAgreement_add.html"; |
| | | } |
| | | @RequestMapping(value = "/save") |
| | | @ResponseBody |
| | | public Object save(THuiminAgreement tHuiminAgreement) { |
| | | huiminAgreementClient.insert(tHuiminAgreement); |
| | | return SUCCESS_TIP; |
| | | } |
| | | /* |
| | | *//** |
| | | * 跳转到修改惠民卡 |
| | | *//* |
| | | @RequestMapping("/tHuiminAgreement_update/{tHuiminAgreementId}") |
| | | public String tHuiminAgreementUpdate(@PathVariable Integer tHuiminAgreementId, Model model) { |
| | | THuiminAgreement tHuiminAgreement = huiminAgreementClient.selectById(tHuiminAgreementId); |
| | | model.addAttribute("item",tHuiminAgreement); |
| | | LogObjectHolder.me().set(tHuiminAgreement); |
| | | return PREFIX + "tHuiminAgreement_edit.html"; |
| | | } |
| | | |
| | | *//** |
| | | * 获取惠民卡列表 |
| | | *//* |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return huiminAgreementClient.selectList(null); |
| | | } |
| | | |
| | | *//** |
| | | * 新增惠民卡 |
| | | *//* |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(THuiminAgreement tHuiminAgreement) { |
| | | huiminAgreementClient.insert(tHuiminAgreement); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | *//** |
| | | * 删除惠民卡 |
| | | *//* |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tHuiminAgreementId) { |
| | | huiminAgreementClient.deleteById(tHuiminAgreementId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | *//** |
| | | * 修改惠民卡 |
| | | *//* |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(THuiminAgreement tHuiminAgreement) { |
| | | huiminAgreementClient.updateById(tHuiminAgreement); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | *//** |
| | | * 惠民卡详情 |
| | | *//* |
| | | @RequestMapping(value = "/detail/{tHuiminAgreementId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tHuiminAgreementId") Integer tHuiminAgreementId) { |
| | | return huiminAgreementClient.selectById(tHuiminAgreementId); |
| | | }*/ |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | import com.dsh.course.feignClient.activity.HuiminCardClient; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | /** |
| | | * 惠民卡控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2025-03-29 17:41:25 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tHuiminCard") |
| | | public class THuiminCardController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tHuiminCard/"; |
| | | |
| | | @Autowired |
| | | private HuiminCardClient huiminCardClient; |
| | | |
| | | /** |
| | | * 跳转到惠民卡首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tHuiminCard.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加惠民卡 |
| | | */ |
| | | @RequestMapping("/tHuiminCard_add") |
| | | public String tHuiminCardAdd() { |
| | | return PREFIX + "tHuiminCard_add.html"; |
| | | } |
| | | |
| | | /* *//** |
| | | * 跳转到修改惠民卡 |
| | | *//* |
| | | @RequestMapping("/tHuiminCard_update/{tHuiminCardId}") |
| | | public String tHuiminCardUpdate(@PathVariable Integer tHuiminCardId, Model model) { |
| | | THuiminCard tHuiminCard = huiminCardClient.selectById(tHuiminCardId); |
| | | model.addAttribute("item",tHuiminCard); |
| | | LogObjectHolder.me().set(tHuiminCard); |
| | | return PREFIX + "tHuiminCard_edit.html"; |
| | | } |
| | | |
| | | *//** |
| | | * 获取惠民卡列表 |
| | | *//* |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return huiminCardClient.selectList(null); |
| | | } |
| | | |
| | | *//** |
| | | * 新增惠民卡 |
| | | *//* |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(THuiminCard tHuiminCard) { |
| | | huiminCardClient.insert(tHuiminCard); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | *//** |
| | | * 删除惠民卡 |
| | | *//* |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tHuiminCardId) { |
| | | huiminCardClient.deleteById(tHuiminCardId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | *//** |
| | | * 修改惠民卡 |
| | | *//* |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(THuiminCard tHuiminCard) { |
| | | huiminCardClient.updateById(tHuiminCard); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | *//** |
| | | * 惠民卡详情 |
| | | *//* |
| | | @RequestMapping(value = "/detail/{tHuiminCardId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tHuiminCardId") Integer tHuiminCardId) { |
| | | return huiminCardClient.selectById(tHuiminCardId); |
| | | }*/ |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | import com.dsh.course.feignClient.activity.HuiminRecordClient; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | /** |
| | | * 惠民卡控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2025-03-29 17:41:38 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tHuiminRecord") |
| | | public class THuiminRecordController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tHuiminRecord/"; |
| | | |
| | | @Autowired |
| | | private HuiminRecordClient huiminRecordClient; |
| | | |
| | | /** |
| | | * 跳转到惠民卡首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tHuiminRecord.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加惠民卡 |
| | | */ |
| | | @RequestMapping("/tHuiminRecord_add") |
| | | public String tHuiminRecordAdd() { |
| | | return PREFIX + "tHuiminRecord_add.html"; |
| | | } |
| | | |
| | | /* *//** |
| | | * 跳转到修改惠民卡 |
| | | *//* |
| | | @RequestMapping("/tHuiminRecord_update/{tHuiminRecordId}") |
| | | public String tHuiminRecordUpdate(@PathVariable Integer tHuiminRecordId, Model model) { |
| | | THuiminRecord tHuiminRecord = huiminRecordClient.selectById(tHuiminRecordId); |
| | | model.addAttribute("item",tHuiminRecord); |
| | | LogObjectHolder.me().set(tHuiminRecord); |
| | | return PREFIX + "tHuiminRecord_edit.html"; |
| | | } |
| | | |
| | | *//** |
| | | * 获取惠民卡列表 |
| | | *//* |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return huiminRecordClient.selectList(null); |
| | | } |
| | | |
| | | *//** |
| | | * 新增惠民卡 |
| | | *//* |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(THuiminRecord tHuiminRecord) { |
| | | huiminRecordClient.insert(tHuiminRecord); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | *//** |
| | | * 删除惠民卡 |
| | | *//* |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tHuiminRecordId) { |
| | | huiminRecordClient.deleteById(tHuiminRecordId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | *//** |
| | | * 修改惠民卡 |
| | | *//* |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(THuiminRecord tHuiminRecord) { |
| | | huiminRecordClient.updateById(tHuiminRecord); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | *//** |
| | | * 惠民卡详情 |
| | | *//* |
| | | @RequestMapping(value = "/detail/{tHuiminRecordId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tHuiminRecordId") Integer tHuiminRecordId) { |
| | | return huiminRecordClient.selectById(tHuiminRecordId); |
| | | }*/ |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | import com.dsh.course.feignClient.activity.PayHuiminClient; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | /** |
| | | * 惠民卡控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2025-03-29 17:41:48 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tPayHuimin") |
| | | public class TPayHuiminController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tPayHuimin/"; |
| | | |
| | | @Autowired |
| | | private PayHuiminClient payHuiminClient; |
| | | |
| | | /** |
| | | * 跳转到惠民卡首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tPayHuimin.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加惠民卡 |
| | | */ |
| | | @RequestMapping("/tPayHuimin_add") |
| | | public String tPayHuiminAdd() { |
| | | return PREFIX + "tPayHuimin_add.html"; |
| | | } |
| | | |
| | | /* *//** |
| | | * 跳转到修改惠民卡 |
| | | *//* |
| | | @RequestMapping("/tPayHuimin_update/{tPayHuiminId}") |
| | | public String tPayHuiminUpdate(@PathVariable Integer tPayHuiminId, Model model) { |
| | | TPayHuimin tPayHuimin = payHuiminClient.selectById(tPayHuiminId); |
| | | model.addAttribute("item",tPayHuimin); |
| | | LogObjectHolder.me().set(tPayHuimin); |
| | | return PREFIX + "tPayHuimin_edit.html"; |
| | | } |
| | | |
| | | *//** |
| | | * 获取惠民卡列表 |
| | | *//* |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return payHuiminClient.selectList(null); |
| | | } |
| | | |
| | | *//** |
| | | * 新增惠民卡 |
| | | *//* |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TPayHuimin tPayHuimin) { |
| | | payHuiminClient.insert(tPayHuimin); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | *//** |
| | | * 删除惠民卡 |
| | | *//* |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tPayHuiminId) { |
| | | payHuiminClient.deleteById(tPayHuiminId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | *//** |
| | | * 修改惠民卡 |
| | | *//* |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TPayHuimin tPayHuimin) { |
| | | payHuiminClient.updateById(tPayHuimin); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | *//** |
| | | * 惠民卡详情 |
| | | *//* |
| | | @RequestMapping(value = "/detail/{tPayHuiminId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tPayHuiminId") Integer tPayHuiminId) { |
| | | return payHuiminClient.selectById(tPayHuiminId); |
| | | }*/ |
| | | } |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>惠民卡管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="condition" name="名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="THuiminAgreement.search()"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="THuiminAgreementTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tHuiminAgreement/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="THuiminAgreement.openAddTHuiminAgreement()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tHuiminAgreement/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="THuiminAgreement.openTHuiminAgreementDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tHuiminAgreement/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="THuiminAgreement.delete()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="THuiminAgreementTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tHuiminAgreement/tHuiminAgreement.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | <input type="hidden" id="id" value="${item.id!}"/> |
| | | <div class="row"> |
| | | @if(objectType == 1){ |
| | | <div class="tabs-container"> |
| | | <ul class="nav nav-tabs"> |
| | | <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">添加人员说明文案</a></li> |
| | | <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">选择人员说明文案</a></li> |
| | | </ul> |
| | | <div class="tab-content"> |
| | | <div id="tab-1" class="tab-pane active"> |
| | | <div class="panel-body"> |
| | | <textarea id="editor_1" type="text/plain" style="width:1200px;height:400px;"></textarea> |
| | | <!--<div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun=""/> |
| | | </div> |
| | | </div>--> |
| | | </div> |
| | | </div> |
| | | <div id="tab-2" class="tab-pane"> |
| | | <div class="panel-body"> |
| | | <textarea type="text/plain" id="editor_2" style="width:1200px;height:400px;"></textarea> |
| | | <!--<div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun=""/> |
| | | </div> |
| | | </div>--> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <hr> |
| | | @} |
| | | <div class="form-group"> |
| | | <label class="col-sm-1 control-label" for="operator">所属运营商:</label> |
| | | <div class="col-sm-9"> |
| | | <select id="operator" class="form-control"> |
| | | <option value="" selected>默认</option> |
| | | @if(isNotEmpty(operatorList)){ |
| | | @for(item in operatorList){ |
| | | <option value="${item.id}">${item.name}</option> |
| | | @} |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-1 control-label">门店无惠民卡介绍页</label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-1 control-label" for="agreement">协议配置:</label> |
| | | <div class="col-sm-9"> |
| | | <div class="input-group"> |
| | | <input type="text" id="agreement" name="agreement" class="form-control" placeholder="请输入协议配置标题"> |
| | | <span class="input-group-btn"> |
| | | <button type="button" id="agreementAdd" name="agreementAdd" class="btn btn-primary">添加</button> |
| | | </span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 动态添加的协议Tab --> |
| | | <div id="dynamic-editors-container" class="col-sm-12" style="margin-top: 20px;"> |
| | | <div class="tabs-container" id="dynamic-tabs-container" style="display: none;"> |
| | | <ul class="nav nav-tabs" id="agreement-tabs"> |
| | | <!-- 动态添加的Tab将在这里显示 --> |
| | | </ul> |
| | | <div class="tab-content" id="agreement-content"> |
| | | <!-- 动态添加的内容将在这里显示 --> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="submitData()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tHuiminAgreement/tHuiminAgreement_info.js"></script> |
| | | <script> |
| | | var editor_1 = null; |
| | | var editor_2 = null; |
| | | var dynamicEditors = []; // 存储动态创建的编辑器实例 |
| | | var editorCounter = 0; // 用于生成唯一ID |
| | | |
| | | $(function () { |
| | | //初始化编辑器 |
| | | editor_1 = UE.getEditor('editor_1'); |
| | | editor_2 = UE.getEditor('editor_2'); |
| | | |
| | | // 绑定添加按钮的点击事件 |
| | | $("#agreementAdd").click(function() { |
| | | var title = $("#agreement").val().trim(); |
| | | if(title === "") { |
| | | Feng.error("请输入协议配置标题"); |
| | | return; |
| | | } |
| | | |
| | | // 创建新的编辑器区域 |
| | | addNewEditor(title); |
| | | |
| | | // 清空输入框 |
| | | $("#agreement").val(""); |
| | | }); |
| | | }); |
| | | |
| | | // 添加新的编辑器函数 |
| | | function addNewEditor(title) { |
| | | editorCounter++; |
| | | var editorId = "dynamic-editor-" + editorCounter; |
| | | var tabId = "agreement-tab-" + editorCounter; |
| | | var isFirstTab = (dynamicEditors.length === 0); |
| | | |
| | | // 如果是第一个编辑器,显示tabs容器 |
| | | if(isFirstTab) { |
| | | $("#dynamic-tabs-container").show(); |
| | | } |
| | | |
| | | // 先将所有协议配置tab设为非激活状态 |
| | | $("#agreement-tabs li").removeClass("active"); |
| | | $("#agreement-content .tab-pane").removeClass("active"); |
| | | |
| | | // 创建新的Tab - 始终设置为激活状态 |
| | | var tabHtml = '<li class="active" id="tab-li-' + editorCounter + '">' + |
| | | '<a data-toggle="tab" href="#' + tabId + '" aria-expanded="true">' + title + |
| | | ' <i class="fa fa-times-circle delete-tab" data-editor-id="' + editorId + '" ' + |
| | | 'data-tab-id="' + tabId + '" data-counter="' + editorCounter + '"></i></a></li>'; |
| | | |
| | | // 创建Tab内容 - 始终设置为激活状态 |
| | | var contentHtml = '<div id="' + tabId + '" class="tab-pane active">' + |
| | | '<div class="panel-body">' + |
| | | '<textarea id="' + editorId + '" type="text/plain" style="width:100%;height:300px;"></textarea>' + |
| | | '</div></div>'; |
| | | |
| | | // 添加到容器中 |
| | | $("#agreement-tabs").append(tabHtml); |
| | | $("#agreement-content").append(contentHtml); |
| | | |
| | | // 创建一个新的编辑器实例对象 |
| | | var editor = UE.getEditor(editorId, { |
| | | initialFrameHeight: 300, |
| | | initialFrameWidth: '100%', |
| | | enableAutoSave: false, |
| | | autoHeightEnabled: false, |
| | | autoFloatEnabled: false |
| | | }); |
| | | |
| | | // 确保编辑器已准备好 |
| | | editor.ready(function() { |
| | | // 初始化为空内容 |
| | | editor.setContent(""); |
| | | |
| | | // 存储编辑器实例和标题信息 |
| | | dynamicEditors.push({ |
| | | id: editorId, |
| | | tabId: tabId, |
| | | counter: editorCounter, |
| | | title: title, |
| | | editor: editor |
| | | }); |
| | | |
| | | // 绑定删除按钮事件 |
| | | $(".delete-tab[data-editor-id='" + editorId + "']").click(function(e) { |
| | | e.preventDefault(); |
| | | e.stopPropagation(); |
| | | deleteEditor($(this).data("counter")); |
| | | }); |
| | | }); |
| | | |
| | | // 手动激活新添加的标签页 |
| | | $('#agreement-tabs a[href="#' + tabId + '"]').tab('show'); |
| | | } |
| | | |
| | | // 删除编辑器函数 |
| | | function deleteEditor(counter) { |
| | | var index = -1; |
| | | var isActive = $("#tab-li-" + counter).hasClass("active"); |
| | | var nextActive = null; |
| | | |
| | | // 查找编辑器索引 |
| | | for(var i = 0; i < dynamicEditors.length; i++) { |
| | | if(dynamicEditors[i].counter == counter) { |
| | | index = i; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if(index === -1) return; |
| | | |
| | | // 销毁编辑器实例 |
| | | if(dynamicEditors[index].editor) { |
| | | dynamicEditors[index].editor.destroy(); |
| | | } |
| | | |
| | | // 如果删除的是当前活跃tab,需要激活另一个tab |
| | | if(isActive && dynamicEditors.length > 1) { |
| | | // 优先选择下一个,如果没有则选择上一个 |
| | | if(index < dynamicEditors.length - 1) { |
| | | nextActive = dynamicEditors[index + 1].tabId; |
| | | } else { |
| | | nextActive = dynamicEditors[index - 1].tabId; |
| | | } |
| | | } |
| | | |
| | | // 完全清理DOM元素 |
| | | $("#tab-li-" + counter).remove(); |
| | | $("#" + dynamicEditors[index].tabId).remove(); |
| | | |
| | | // 确保UEditor容器被完全移除 |
| | | $("#" + dynamicEditors[index].id).parents(".edui-default").remove(); |
| | | $("#" + dynamicEditors[index].id).remove(); |
| | | |
| | | // 从数组中移除 |
| | | dynamicEditors.splice(index, 1); |
| | | |
| | | // 如果没有编辑器了,清空并隐藏tabs容器 |
| | | if(dynamicEditors.length === 0) { |
| | | $("#dynamic-tabs-container").hide(); |
| | | // 彻底清空容器内容,确保没有残留 |
| | | $("#agreement-tabs").empty(); |
| | | $("#agreement-content").empty(); |
| | | } else if(nextActive) { |
| | | // 激活下一个tab |
| | | $('a[href="#' + nextActive + '"]').tab('show'); |
| | | } |
| | | } |
| | | |
| | | //收集动态编辑器内容 |
| | | collectDynamicEditors = function() { |
| | | var agreements = []; |
| | | for(var i = 0; i < dynamicEditors.length; i++) { |
| | | agreements.push({ |
| | | title: dynamicEditors[i].title, |
| | | content: dynamicEditors[i].editor.getContent() |
| | | }); |
| | | } |
| | | return agreements; |
| | | }; |
| | | |
| | | function submitData() { |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tHuiminAgreement/save", function(data){ |
| | | Feng.success("保存成功!"); |
| | | },function(data){ |
| | | Feng.error("保存失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("addUserRemark", editor_1.getContent()); |
| | | ajax.set("selectUserRemark", editor_2.getContent()); |
| | | ajax.set("operatorId", $("#operator").val()); |
| | | ajax.set("agreementSettings", JSON.stringify(collectDynamicEditors())); |
| | | ajax.set("id", $("#id").val()); |
| | | ajax.start(); |
| | | } |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键id" value="${item.id}" underline="true"/> |
| | | <#input id="operatorId" name="运营商id 选择默认传null" value="${item.operatorId}" /> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="addUserRemark" name="添加人员说明文案" value="${item.addUserRemark}" underline="true"/> |
| | | <#input id="selectUserRemark" name="选择人员说明文案" value="${item.selectUserRemark}" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="THuiminAgreementInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="THuiminAgreementInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tHuiminAgreement/tHuiminAgreement_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>惠民卡管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="condition" name="名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="THuiminCard.search()"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="THuiminCardTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tHuiminCard/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="THuiminCard.openAddTHuiminCard()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tHuiminCard/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="THuiminCard.openTHuiminCardDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tHuiminCard/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="THuiminCard.delete()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="THuiminCardTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tHuiminCard/tHuiminCard.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键id" underline="true"/> |
| | | <#input id="huiMinName" name="惠民卡名称" underline="true"/> |
| | | <#input id="huiMinType" name="惠民卡类型1年度2年内" underline="true"/> |
| | | <#input id="salesMoney" name="售卖金额" underline="true"/> |
| | | <#input id="buyCover" name="已购买封面" underline="true"/> |
| | | <#input id="unBuyCover" name="未购买封面" underline="true"/> |
| | | <#input id="buyRemark" name="已购买使用说明" underline="true"/> |
| | | <#input id="unBuyRemark" name="未购买使用说明" underline="true"/> |
| | | <#input id="banner" name="轮播图 逗号分隔" underline="true"/> |
| | | <#input id="grantCount" name="发放数量 为空表示不限"/> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="limitCount" name=" 限购数量 为空表示不限" underline="true"/> |
| | | <#input id="endTime" name="有效期 不填表示永久" underline="true"/> |
| | | <#input id="useWeeks" name="可使用时间段,周,多个逗号分隔" underline="true"/> |
| | | <#input id="useTimes" name="可使用时间段,时分秒,多个逗号分隔" underline="true"/> |
| | | <#input id="unUseTimes" name="不可用时间段,yyyy-MM-dd HH:mm:ss,多个逗号分隔" underline="true"/> |
| | | <#input id="useScope" name="使用范围1门店2场地" underline="true"/> |
| | | <#input id="useIds" name="根据适用范围,存储门店id或场地id,多个逗号分隔" underline="true"/> |
| | | <#input id="introduce" name="惠民卡介绍" underline="true"/> |
| | | <#input id="sort" name="排序" underline="true"/> |
| | | <#input id="storeId" name="门店id" underline="true"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="THuiminCardInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="THuiminCardInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tHuiminCard/tHuiminCard_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键id" value="${item.id}" underline="true"/> |
| | | <#input id="huiMinName" name="惠民卡名称" value="${item.huiMinName}" underline="true"/> |
| | | <#input id="huiMinType" name="惠民卡类型1年度2年内" value="${item.huiMinType}" underline="true"/> |
| | | <#input id="salesMoney" name="售卖金额" value="${item.salesMoney}" underline="true"/> |
| | | <#input id="buyCover" name="已购买封面" value="${item.buyCover}" underline="true"/> |
| | | <#input id="unBuyCover" name="未购买封面" value="${item.unBuyCover}" underline="true"/> |
| | | <#input id="buyRemark" name="已购买使用说明" value="${item.buyRemark}" underline="true"/> |
| | | <#input id="unBuyRemark" name="未购买使用说明" value="${item.unBuyRemark}" underline="true"/> |
| | | <#input id="banner" name="轮播图 逗号分隔" value="${item.banner}" underline="true"/> |
| | | <#input id="grantCount" name="发放数量 为空表示不限" value="${item.grantCount}" /> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="limitCount" name=" 限购数量 为空表示不限" value="${item.limitCount}" underline="true"/> |
| | | <#input id="endTime" name="有效期 不填表示永久" value="${item.endTime}" underline="true"/> |
| | | <#input id="useWeeks" name="可使用时间段,周,多个逗号分隔" value="${item.useWeeks}" underline="true"/> |
| | | <#input id="useTimes" name="可使用时间段,时分秒,多个逗号分隔" value="${item.useTimes}" underline="true"/> |
| | | <#input id="unUseTimes" name="不可用时间段,yyyy-MM-dd HH:mm:ss,多个逗号分隔" value="${item.unUseTimes}" underline="true"/> |
| | | <#input id="useScope" name="使用范围1门店2场地" value="${item.useScope}" underline="true"/> |
| | | <#input id="useIds" name="根据适用范围,存储门店id或场地id,多个逗号分隔" value="${item.useIds}" underline="true"/> |
| | | <#input id="introduce" name="惠民卡介绍" value="${item.introduce}" underline="true"/> |
| | | <#input id="sort" name="排序" value="${item.sort}" underline="true"/> |
| | | <#input id="storeId" name="门店id" value="${item.storeId}" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="THuiminCardInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="THuiminCardInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tHuiminCard/tHuiminCard_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>惠民卡管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="condition" name="名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="THuiminRecord.search()"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="THuiminRecordTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tHuiminRecord/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="THuiminRecord.openAddTHuiminRecord()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tHuiminRecord/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="THuiminRecord.openTHuiminRecordDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tHuiminRecord/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="THuiminRecord.delete()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="THuiminRecordTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tHuiminRecord/tHuiminRecord.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键id"/> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="THuiminRecordInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="THuiminRecordInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tHuiminRecord/tHuiminRecord_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键id" value="${item.id}" /> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="THuiminRecordInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="THuiminRecordInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tHuiminRecord/tHuiminRecord_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>惠民卡管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="condition" name="名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TPayHuimin.search()"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TPayHuiminTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tPayHuimin/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TPayHuimin.openAddTPayHuimin()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tPayHuimin/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="TPayHuimin.openTPayHuiminDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tPayHuimin/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="TPayHuimin.delete()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="TPayHuiminTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tPayHuimin/tPayHuimin.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键id" underline="true"/> |
| | | <#input id="salesMoney" name="金额" underline="true"/> |
| | | <#input id="appUserId" name="购买用户id" underline="true"/> |
| | | <#input id="studentId" name="绑定人员id,多个逗号拼接,关联student表" underline="true"/> |
| | | <#input id="endTime" name="有效期" underline="true"/> |
| | | <#input id="status" name="状态1使用中2已退款" underline="true"/> |
| | | <#input id="insertTime" name="创建时间"/> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="paymentTime" name="付款时间" underline="true"/> |
| | | <#input id="paymentType" name="付款方式1微信2支付宝" underline="true"/> |
| | | <#input id="code" name="订单号" underline="true"/> |
| | | <#input id="orderNumber" name="第三方支付流水号" underline="true"/> |
| | | <#input id="refundTime" name="退款时间" underline="true"/> |
| | | <#input id="refundStatus" name="退款状态 1未退款 2已退款 3线下退款(使用过或超过七日退款)" underline="true"/> |
| | | <#input id="cardId" name="惠民卡id" underline="true"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TPayHuiminInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TPayHuiminInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tPayHuimin/tPayHuimin_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键id" value="${item.id}" underline="true"/> |
| | | <#input id="salesMoney" name="金额" value="${item.salesMoney}" underline="true"/> |
| | | <#input id="appUserId" name="购买用户id" value="${item.appUserId}" underline="true"/> |
| | | <#input id="studentId" name="绑定人员id,多个逗号拼接,关联student表" value="${item.studentId}" underline="true"/> |
| | | <#input id="endTime" name="有效期" value="${item.endTime}" underline="true"/> |
| | | <#input id="status" name="状态1使用中2已退款" value="${item.status}" underline="true"/> |
| | | <#input id="insertTime" name="创建时间" value="${item.insertTime}" /> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="paymentTime" name="付款时间" value="${item.paymentTime}" underline="true"/> |
| | | <#input id="paymentType" name="付款方式1微信2支付宝" value="${item.paymentType}" underline="true"/> |
| | | <#input id="code" name="订单号" value="${item.code}" underline="true"/> |
| | | <#input id="orderNumber" name="第三方支付流水号" value="${item.orderNumber}" underline="true"/> |
| | | <#input id="refundTime" name="退款时间" value="${item.refundTime}" underline="true"/> |
| | | <#input id="refundStatus" name="退款状态 1未退款 2已退款 3线下退款(使用过或超过七日退款)" value="${item.refundStatus}" underline="true"/> |
| | | <#input id="cardId" name="惠民卡id" value="${item.cardId}" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TPayHuiminInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TPayHuiminInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tPayHuimin/tPayHuimin_info.js"></script> |
| | | @} |
New file |
| | |
| | | /** |
| | | * 惠民卡管理初始化 |
| | | */ |
| | | var THuiminAgreement = { |
| | | id: "THuiminAgreementTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | THuiminAgreement.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键id', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '运营商id 选择默认传null', field: 'operatorId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '添加人员说明文案', field: 'addUserRemark', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '选择人员说明文案', field: 'selectUserRemark', visible: true, align: 'center', valign: 'middle'} |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | THuiminAgreement.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | THuiminAgreement.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加惠民卡 |
| | | */ |
| | | THuiminAgreement.openAddTHuiminAgreement = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加惠民卡', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tHuiminAgreement/tHuiminAgreement_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看惠民卡详情 |
| | | */ |
| | | THuiminAgreement.openTHuiminAgreementDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '惠民卡详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tHuiminAgreement/tHuiminAgreement_update/' + THuiminAgreement.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除惠民卡 |
| | | */ |
| | | THuiminAgreement.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tHuiminAgreement/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | THuiminAgreement.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tHuiminAgreementId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询惠民卡列表 |
| | | */ |
| | | THuiminAgreement.search = function () { |
| | | var queryData = {}; |
| | | queryData['condition'] = $("#condition").val(); |
| | | THuiminAgreement.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = THuiminAgreement.initColumn(); |
| | | var table = new BSTable(THuiminAgreement.id, "/tHuiminAgreement/list", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | THuiminAgreement.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化惠民卡详情对话框 |
| | | */ |
| | | var THuiminAgreementInfoDlg = { |
| | | tHuiminAgreementInfoData : {} |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | THuiminAgreementInfoDlg.clearData = function() { |
| | | this.tHuiminAgreementInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | THuiminAgreementInfoDlg.set = function(key, val) { |
| | | this.tHuiminAgreementInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | THuiminAgreementInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | THuiminAgreementInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.THuiminAgreement.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | THuiminAgreementInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('operatorId') |
| | | .set('addUserRemark') |
| | | .set('selectUserRemark'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | THuiminAgreementInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tHuiminAgreement/add", function(data){ |
| | | Feng.success("添加成功!"); |
| | | window.parent.THuiminAgreement.table.refresh(); |
| | | THuiminAgreementInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tHuiminAgreementInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | THuiminAgreementInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tHuiminAgreement/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | | window.parent.THuiminAgreement.table.refresh(); |
| | | THuiminAgreementInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tHuiminAgreementInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | |
| | | }); |
New file |
| | |
| | | /** |
| | | * 惠民卡管理初始化 |
| | | */ |
| | | var THuiminCard = { |
| | | id: "THuiminCardTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | THuiminCard.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键id', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '惠民卡名称', field: 'huiMinName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '惠民卡类型1年度2年内', field: 'huiMinType', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '售卖金额', field: 'salesMoney', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '已购买封面', field: 'buyCover', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '未购买封面', field: 'unBuyCover', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '已购买使用说明', field: 'buyRemark', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '未购买使用说明', field: 'unBuyRemark', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '轮播图 逗号分隔', field: 'banner', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '发放数量 为空表示不限', field: 'grantCount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: ' 限购数量 为空表示不限', field: 'limitCount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '有效期 不填表示永久', field: 'endTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '可使用时间段,周,多个逗号分隔', field: 'useWeeks', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '可使用时间段,时分秒,多个逗号分隔', field: 'useTimes', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '不可用时间段,yyyy-MM-dd HH:mm:ss,多个逗号分隔', field: 'unUseTimes', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '使用范围1门店2场地', field: 'useScope', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '根据适用范围,存储门店id或场地id,多个逗号分隔', field: 'useIds', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '惠民卡介绍', field: 'introduce', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '排序', field: 'sort', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '门店id', field: 'storeId', visible: true, align: 'center', valign: 'middle'} |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | THuiminCard.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | THuiminCard.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加惠民卡 |
| | | */ |
| | | THuiminCard.openAddTHuiminCard = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加惠民卡', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tHuiminCard/tHuiminCard_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看惠民卡详情 |
| | | */ |
| | | THuiminCard.openTHuiminCardDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '惠民卡详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tHuiminCard/tHuiminCard_update/' + THuiminCard.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除惠民卡 |
| | | */ |
| | | THuiminCard.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tHuiminCard/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | THuiminCard.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tHuiminCardId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询惠民卡列表 |
| | | */ |
| | | THuiminCard.search = function () { |
| | | var queryData = {}; |
| | | queryData['condition'] = $("#condition").val(); |
| | | THuiminCard.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = THuiminCard.initColumn(); |
| | | var table = new BSTable(THuiminCard.id, "/tHuiminCard/list", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | THuiminCard.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化惠民卡详情对话框 |
| | | */ |
| | | var THuiminCardInfoDlg = { |
| | | tHuiminCardInfoData : {} |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | THuiminCardInfoDlg.clearData = function() { |
| | | this.tHuiminCardInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | THuiminCardInfoDlg.set = function(key, val) { |
| | | this.tHuiminCardInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | THuiminCardInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | THuiminCardInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.THuiminCard.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | THuiminCardInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('huiMinName') |
| | | .set('huiMinType') |
| | | .set('salesMoney') |
| | | .set('buyCover') |
| | | .set('unBuyCover') |
| | | .set('buyRemark') |
| | | .set('unBuyRemark') |
| | | .set('banner') |
| | | .set('grantCount') |
| | | .set('limitCount') |
| | | .set('endTime') |
| | | .set('useWeeks') |
| | | .set('useTimes') |
| | | .set('unUseTimes') |
| | | .set('useScope') |
| | | .set('useIds') |
| | | .set('introduce') |
| | | .set('sort') |
| | | .set('storeId'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | THuiminCardInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tHuiminCard/add", function(data){ |
| | | Feng.success("添加成功!"); |
| | | window.parent.THuiminCard.table.refresh(); |
| | | THuiminCardInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tHuiminCardInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | THuiminCardInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tHuiminCard/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | | window.parent.THuiminCard.table.refresh(); |
| | | THuiminCardInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tHuiminCardInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | |
| | | }); |
New file |
| | |
| | | /** |
| | | * 惠民卡管理初始化 |
| | | */ |
| | | var THuiminRecord = { |
| | | id: "THuiminRecordTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | THuiminRecord.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键id', field: 'id', visible: true, align: 'center', valign: 'middle'} |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | THuiminRecord.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | THuiminRecord.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加惠民卡 |
| | | */ |
| | | THuiminRecord.openAddTHuiminRecord = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加惠民卡', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tHuiminRecord/tHuiminRecord_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看惠民卡详情 |
| | | */ |
| | | THuiminRecord.openTHuiminRecordDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '惠民卡详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tHuiminRecord/tHuiminRecord_update/' + THuiminRecord.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除惠民卡 |
| | | */ |
| | | THuiminRecord.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tHuiminRecord/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | THuiminRecord.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tHuiminRecordId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询惠民卡列表 |
| | | */ |
| | | THuiminRecord.search = function () { |
| | | var queryData = {}; |
| | | queryData['condition'] = $("#condition").val(); |
| | | THuiminRecord.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = THuiminRecord.initColumn(); |
| | | var table = new BSTable(THuiminRecord.id, "/tHuiminRecord/list", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | THuiminRecord.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化惠民卡详情对话框 |
| | | */ |
| | | var THuiminRecordInfoDlg = { |
| | | tHuiminRecordInfoData : {} |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | THuiminRecordInfoDlg.clearData = function() { |
| | | this.tHuiminRecordInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | THuiminRecordInfoDlg.set = function(key, val) { |
| | | this.tHuiminRecordInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | THuiminRecordInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | THuiminRecordInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.THuiminRecord.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | THuiminRecordInfoDlg.collectData = function() { |
| | | this |
| | | .set('id'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | THuiminRecordInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tHuiminRecord/add", function(data){ |
| | | Feng.success("添加成功!"); |
| | | window.parent.THuiminRecord.table.refresh(); |
| | | THuiminRecordInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tHuiminRecordInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | THuiminRecordInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tHuiminRecord/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | | window.parent.THuiminRecord.table.refresh(); |
| | | THuiminRecordInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tHuiminRecordInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | |
| | | }); |
New file |
| | |
| | | /** |
| | | * 惠民卡管理初始化 |
| | | */ |
| | | var TPayHuimin = { |
| | | id: "TPayHuiminTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TPayHuimin.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键id', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '金额', field: 'salesMoney', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '购买用户id', field: 'appUserId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '绑定人员id,多个逗号拼接,关联student表', field: 'studentId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '有效期', field: 'endTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '状态1使用中2已退款', field: 'status', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '创建时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '付款时间', field: 'paymentTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '付款方式1微信2支付宝', field: 'paymentType', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单号', field: 'code', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '第三方支付流水号', field: 'orderNumber', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '退款时间', field: 'refundTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '退款状态 1未退款 2已退款 3线下退款(使用过或超过七日退款)', field: 'refundStatus', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '惠民卡id', field: 'cardId', visible: true, align: 'center', valign: 'middle'} |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TPayHuimin.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TPayHuimin.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加惠民卡 |
| | | */ |
| | | TPayHuimin.openAddTPayHuimin = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加惠民卡', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tPayHuimin/tPayHuimin_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看惠民卡详情 |
| | | */ |
| | | TPayHuimin.openTPayHuiminDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '惠民卡详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tPayHuimin/tPayHuimin_update/' + TPayHuimin.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除惠民卡 |
| | | */ |
| | | TPayHuimin.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tPayHuimin/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TPayHuimin.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tPayHuiminId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询惠民卡列表 |
| | | */ |
| | | TPayHuimin.search = function () { |
| | | var queryData = {}; |
| | | queryData['condition'] = $("#condition").val(); |
| | | TPayHuimin.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TPayHuimin.initColumn(); |
| | | var table = new BSTable(TPayHuimin.id, "/tPayHuimin/list", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TPayHuimin.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化惠民卡详情对话框 |
| | | */ |
| | | var TPayHuiminInfoDlg = { |
| | | tPayHuiminInfoData : {} |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TPayHuiminInfoDlg.clearData = function() { |
| | | this.tPayHuiminInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TPayHuiminInfoDlg.set = function(key, val) { |
| | | this.tPayHuiminInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TPayHuiminInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TPayHuiminInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TPayHuimin.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TPayHuiminInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('salesMoney') |
| | | .set('appUserId') |
| | | .set('studentId') |
| | | .set('endTime') |
| | | .set('status') |
| | | .set('insertTime') |
| | | .set('paymentTime') |
| | | .set('paymentType') |
| | | .set('code') |
| | | .set('orderNumber') |
| | | .set('refundTime') |
| | | .set('refundStatus') |
| | | .set('cardId'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TPayHuiminInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tPayHuimin/add", function(data){ |
| | | Feng.success("添加成功!"); |
| | | window.parent.TPayHuimin.table.refresh(); |
| | | TPayHuiminInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tPayHuiminInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TPayHuiminInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tPayHuimin/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | | window.parent.TPayHuimin.table.refresh(); |
| | | TPayHuiminInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tPayHuiminInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | |
| | | }); |