From a9bb3348487c4a75c6a74a4d84f3a8afe9858d0c Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Sat, 19 Dec 2020 15:53:24 +0800 Subject: [PATCH] Merge branch 'ty_urgent' into test --- zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml | 10 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/updateOrderTime.html | 8 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html | 1494 ++++++++++++++++++++++--- zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/servicceAddForm.html | 15 zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java | 8 zq-erp/src/main/java/com/matrix/system/hive/statistics/VipStatisticsAction.java | 43 zq-erp/src/main/resources/templates/views/admin/hive/statistics/store-inout-list.html | 33 zq-erp/src/main/java/com/matrix/system/hive/pojo/StoreInOutRecordVO.java | 9 zq-erp/src/main/java/com/matrix/system/hive/service/imp/ShoppingGoodsServiceImpl.java | 85 + zq-erp/src/main/resources/templates/views/admin/hive/store/projServiceStartpl-list.html | 8 zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjServices.java | 4 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html | 14 zq-erp/src/main/resources/static/js/plugin/moment.mini.js | 2 zq-erp/src/main/resources/templates/views/admin/hive/statistics/custom-consume-list.html | 155 ++ zq-erp/src/main/resources/templates/views/admin/hive/products/goods-form.html | 101 + zq-erp/src/main/java/com/matrix/system/hive/dao/SysOrderDao.java | 3 zq-erp/src/main/java/com/matrix/system/hive/service/SysOrderService.java | 2 zq-erp/src/main/resources/templates/views/admin/hive/instore/instoreinfo-list.html | 2 zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml | 19 zq-erp/src/main/resources/mybatis/mapper/hive/SysVipLabelDao.xml | 47 zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java | 2 zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml | 104 + zq-erp/src/main/java/com/matrix/system/hive/dao/AchieveNewDao.java | 4 zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipLabelDao.java | 17 zq-erp/src/main/resources/templates/views/admin/hive/vip/tc-form.html | 8 zq-erp/src/main/java/com/matrix/system/hive/dao/SysBeauticianStateDao.java | 4 zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrder.java | 13 zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjUseServiceImpl.java | 33 zq-erp/src/main/java/com/matrix/system/hive/action/SysVipLabelController.java | 60 + zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml | 29 zq-erp/src/main/java/com/matrix/system/hive/service/ShoppingGoodsService.java | 3 zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysInstoreInfoServiceImpl.java | 3 zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjUse.java | 16 zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUse.java | 2 zq-erp/src/main/java/com/matrix/system/hive/action/MoneyCardUseController.java | 2 zq-erp/src/main/resources/mybatis/mapper/hive/SysStoreInfoDao.xml | 2 zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java | 9 zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java | 35 zq-erp/src/main/java/com/matrix/system/hive/bean/SysSkinCheckRecord.java | 27 zq-erp/src/main/resources/mybatis/mapper/hive/SysSkinCheckRecordDao.xml | 6 zq-erp/src/main/resources/templates/views/admin/hive/vip/projUse-form.html | 8 zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml | 6 zq-erp/src/main/java/com/matrix/system/hive/action/ShopInfoController.java | 11 zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java | 96 + zq-erp/src/main/java/com/matrix/system/hive/bean/ShoppingGoods.java | 128 ++ zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html | 8 zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipLabel.java | 76 + zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip_bak.html | 285 +++++ zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml | 3 zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-list.html | 33 zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveNew.java | 19 zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java | 47 zq-erp/src/main/resources/templates/views/admin/hive/vip/moneyCardUse-form.html | 10 zq-erp/src/main/resources/templates/views/admin/hive/vip/sysSkinCheckRecord-form.html | 8 zq-erp/src/main/java/com/matrix/core/tools/DateUtil.java | 135 + zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/bj-form.html | 8 zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new.html | 27 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service-hk.html | 8 zq-erp/src/main/java/com/matrix/system/hive/service/AchieveNewService.java | 4 59 files changed, 3,022 insertions(+), 339 deletions(-) diff --git a/zq-erp/src/main/java/com/matrix/core/tools/DateUtil.java b/zq-erp/src/main/java/com/matrix/core/tools/DateUtil.java index bb10294..07a0984 100644 --- a/zq-erp/src/main/java/com/matrix/core/tools/DateUtil.java +++ b/zq-erp/src/main/java/com/matrix/core/tools/DateUtil.java @@ -5,6 +5,7 @@ import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; +import java.time.LocalDateTime; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; @@ -12,7 +13,7 @@ /** * 日期格式化,转换工具类 - * + * * @author Ron * @createTime 2014.08.30 */ @@ -90,7 +91,7 @@ /** * 返回年份 - * + * * @param date * 日期 * @return 返回年份 @@ -137,7 +138,7 @@ } /** * 返回月份 - * + * * @param date * 日期 * @return 返回月份 @@ -149,14 +150,14 @@ c.setTime(date); return c.get(Calendar.MONTH) + 1; } catch (Exception e) { - + } return 0; } /** * 日期转字符串 - * + * * @param date * @param format * @return @@ -172,7 +173,7 @@ /** * 字符串转日期 - * + * * @param dateStr * @param format * @return @@ -183,7 +184,7 @@ try { return fmt.parse(dateStr); } catch (ParseException e) { - + } return null; } @@ -199,7 +200,7 @@ /** * 判断给定的日期是一周中的第几天,注意:按照中国的习惯,周日是第七天 - * + * * @param date * @return */ @@ -225,7 +226,7 @@ /** * 指定时间的下一天 - * + * * @param date * @return */ @@ -241,7 +242,7 @@ cal.add(Calendar.DATE, 1); return cal.getTime(); } catch (Exception e) { - + } return null; @@ -249,7 +250,7 @@ /** * 指定时间的前一天 - * + * * @param date * @return */ @@ -265,7 +266,7 @@ cal.add(Calendar.DATE, -1); return cal.getTime(); } catch (Exception e) { - + } return null; @@ -273,7 +274,7 @@ /** * 指定时间的下N天 - * + * * @param date * @return */ @@ -289,7 +290,7 @@ cal.add(Calendar.DATE, nDay); return cal.getTime(); } catch (Exception e) { - + } return null; @@ -297,7 +298,7 @@ /** * 指定时间的前N天 - * + * * @param date * @return */ @@ -313,7 +314,7 @@ cal.add(Calendar.DATE, -nDay); return cal.getTime(); } catch (Exception e) { - + } return null; @@ -321,7 +322,7 @@ /** * 获取一天的起始时间 - * + * * @param date * @return */ @@ -338,7 +339,7 @@ try { return fmt.parse(dateStr); } catch (ParseException e) { - + } return date; @@ -346,7 +347,7 @@ /** * 获取一天的结束时间 - * + * * @param date * @return */ @@ -363,7 +364,7 @@ try { return fmt.parse(dateStr); } catch (ParseException e) { - + } return date; @@ -371,7 +372,7 @@ /** * currentDat是否在referenceDate日期之前 - * + * * @param referenceDate * @param currentDat * @return @@ -389,7 +390,7 @@ /** * currentDat是否在referenceDate日期之后 - * + * * @param referenceDate * @param currentDat * @return @@ -436,7 +437,7 @@ } /** * 判断currentDate是否在startDate和endDate之间,不包括startDate和endDate - * + * * @param startDate * @param endDate * @param currentDate @@ -454,11 +455,11 @@ return false; } - + /** * 获取startDate到endDate之间的星期day(中文星期)不包括startDate和endDate - * + * * @param startDate * @param endDate * @param day @@ -483,11 +484,11 @@ return listDate; } - + /** * date转换成Timestamp - * + * * @param date * @param format * @return @@ -507,7 +508,7 @@ /** * 获取早中晚 - * + * * @param time * @return */ @@ -530,7 +531,7 @@ /** * 获取早中晚的开始时间 - * + * * @param date * @param time * @return @@ -554,7 +555,7 @@ /** * 获取早中晚的结束时间 - * + * * @param date * @param time * @return @@ -578,7 +579,7 @@ /** * 得到几天前的时间 - * + * * @param d * @param day * @return @@ -592,7 +593,7 @@ /** * 得到几天后的时间 - * + * * @param d * @param day * @return @@ -606,7 +607,7 @@ /** * 将日期类型格式化成字符串 - * + * * @param date * @return 格式化后日期字符串 * @throws ParseException @@ -622,7 +623,7 @@ /** * 获取时间戳 - * + * * @return */ public static String getTimeMark() { @@ -694,4 +695,70 @@ } return um; } + + /** + * 根据单位计算目标日期 + * + * @param num 距离 + * @param unit 日期单位 Y/M/D + * @return + */ + public static Date calDate(Integer num, String unit) { + Calendar calendar = Calendar.getInstance(); + Date targetDate = null; + switch (unit) { + case "Y": + calendar.add(Calendar.YEAR, num); + targetDate = calendar.getTime(); + break; + case "M": + calendar.add(Calendar.MONTH, num); + targetDate = calendar.getTime(); + break; + case "D": + calendar.add(Calendar.DAY_OF_MONTH, num); + targetDate = calendar.getTime(); + break; + default: + targetDate = stringToDate("9999-12-31", DATE_FORMAT_DD); + + } + + return targetDate; + } + + public static String getAgeForBirthDay(Date birthDay) { + Calendar cal = Calendar.getInstance(); + if (birthDay == null) { + return "-"; + } + // 出生日期晚于当前时间,无法计算 + if (cal.before(birthDay)) { + return "-"; + } + // 当前年份 + int yearNow = cal.get(Calendar.YEAR); + // 当前月份 + int monthNow = cal.get(Calendar.MONTH); + // 当前日期 + int dayOfMonthNow = cal.get(Calendar.DAY_OF_MONTH); + cal.setTime(birthDay); + int yearBirth = cal.get(Calendar.YEAR); + int monthBirth = cal.get(Calendar.MONTH); + int dayOfMonthBirth = cal.get(Calendar.DAY_OF_MONTH); + // 计算整岁数 + Integer age = yearNow - yearBirth; + if (monthNow <= monthBirth) { + if (monthNow == monthBirth) { + if (dayOfMonthNow < dayOfMonthBirth) { + // 当前日期在生日之前,年龄减一 + age--; + } + } else { + age--; + } + } + + return age.toString(); + } } diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/MoneyCardUseController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/MoneyCardUseController.java index c4c732b..2744c37 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/action/MoneyCardUseController.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/action/MoneyCardUseController.java @@ -296,7 +296,7 @@ if (newDate != null && newDate.before(today)) { return new AjaxResult(AjaxResult.STATUS_FAIL, "有效期要大于当前日期"); } - if (newDate == null && failTime.before(today)) { + if (newDate == null && (failTime == null || failTime.before(today))) { //如果是已过期界面会提醒重新设置有效期 return new AjaxResult(AjaxResult.STATUS_SUCCESS, "已过期"); } diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ShopInfoController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ShopInfoController.java index 47e7a0b..755216d 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/action/ShopInfoController.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/action/ShopInfoController.java @@ -7,6 +7,7 @@ import com.matrix.core.pojo.PaginationVO; import com.matrix.core.tools.WebUtil; import com.matrix.system.common.bean.SysUsers; +import com.matrix.system.common.constance.AppConstance; import com.matrix.system.constance.Dictionary; import com.matrix.system.hive.action.util.QueryUtil; import com.matrix.system.hive.bean.SysShopInfo; @@ -108,6 +109,16 @@ QueryUtil.setQueryLimitCom(shopInfo); return new AjaxResult(AjaxResult.STATUS_SUCCESS, currentService.findByModel(shopInfo), null); } + + @RequestMapping(value = "/findAllWithPermi" ) + public @ResponseBody AjaxResult findAllWithPermi(SysShopInfo shopInfo) { + QueryUtil.setQueryLimitCom(shopInfo); + SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); + if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ + shopInfo.setId(sysUsers.getShopId()); + } + return new AjaxResult(AjaxResult.STATUS_SUCCESS, currentService.findByModel(shopInfo), null); + } /** * 查询非总店 商城店铺的门店 * TODO 微商城不应该调用这里的接口 diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/SysVipLabelController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/SysVipLabelController.java new file mode 100644 index 0000000..a93ef26 --- /dev/null +++ b/zq-erp/src/main/java/com/matrix/system/hive/action/SysVipLabelController.java @@ -0,0 +1,60 @@ +package com.matrix.system.hive.action; + +import com.matrix.core.pojo.AjaxResult; +import com.matrix.system.common.bean.SysUsers; +import com.matrix.system.hive.bean.SysVipLabel; +import com.matrix.system.hive.dao.SysVipLabelDao; +import com.matrix.system.hive.plugin.util.CollectionUtils; +import jodd.util.CollectionUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.Date; +import java.util.List; + +/** + * @author wzy + * @date 2020-12-17 + **/ +@Controller +@RequestMapping(value = "/admin/label") +public class SysVipLabelController extends BaseController{ + + @Autowired + private SysVipLabelDao sysVipLabelDao; + + @RequestMapping(value = "/add") + @ResponseBody + public AjaxResult add(SysVipLabel sysVipLabel) { + SysUsers sysUsers = getMe(); + + List<SysVipLabel> sysVipLabels = sysVipLabelDao.selectByModel(sysVipLabel); + if (CollectionUtils.isNotEmpty(sysVipLabels)) { + return AjaxResult.buildFailInstance("已存在该标签"); + } + + sysVipLabel.setCreateBy(sysUsers.getSuName()); + sysVipLabel.setCreateTime(new Date()); + + int i = sysVipLabelDao.insert(sysVipLabel); + if (i > 0) { + AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("添加成功"); + ajaxResult.putInMap("label", sysVipLabel); + return ajaxResult; + } + return AjaxResult.buildFailInstance("添加失败"); + } + + @RequestMapping(value = "/del") + @ResponseBody + public AjaxResult del(Long id) { + int i = sysVipLabelDao.deleteById(id); + if (i > 0) { + return AjaxResult.buildSuccessInstance("删除成功"); + } + return AjaxResult.buildFailInstance("删除失败"); + } +} diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java index fd508ef..69717d5 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java @@ -22,6 +22,7 @@ import com.matrix.system.hive.action.util.QueryUtil; import com.matrix.system.hive.bean.*; import com.matrix.system.hive.dao.MoneyCardUseDao; +import com.matrix.system.hive.dao.SysVipLabelDao; import com.matrix.system.hive.dao.VipAnswerDao; import com.matrix.core.tools.DateUtil; import com.matrix.system.hive.pojo.RegisterInfo; @@ -76,10 +77,15 @@ private MoneyCardUseDao moneyCardUseDao; @Autowired + private SysVipLabelDao sysVipLabelDao; + + @Autowired private SystemDictionaryService dataDictionaryService; @Autowired private CustomerDataDictionaryDao customerDataDictionaryDao; + @Resource + private SysOrderService sysOrderService; @RequestMapping(value = "/showVipLevel") @@ -124,6 +130,7 @@ List<SysVipInfo> vips = vipInfoService.findByVipNoOrTel(keyWord); if (vips.size() > 0) { // 在session存放当前查询的客户 + vips.get(0).setSysOrder(sysOrderService.findSysOrderTjByVipId(vips.get(0).getId())); vips.get(0).setLevelCard(cardUseService.findByVipId(vips.get(0).getId())); WebUtil.getSession().setAttribute(SystemConstance.CURRENT_CUSTOMER, vips.get(0)); // 满20后删除一个 @@ -140,6 +147,8 @@ if (isNoRepeat) { userList.add(vips.get(0)); } + vips.get(0).setLabels(sysVipLabelDao.selectByVipId(vips.get(0).getId())); + vips.get(0).setAge(DateUtil.getAgeForBirthDay(vips.get(0).getBirthday1())); vips.get(0).setBalance(moneyCardUseDao.selectVipCardTotalMoney(vips.get(0).getId())); AjaxResult result= new AjaxResult(AjaxResult.STATUS_SUCCESS, vips, 0); return result; diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveNew.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveNew.java index fee903f..957fea2 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveNew.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveNew.java @@ -200,6 +200,8 @@ private String day; + private String vipQueryKey; + /** * 订单编号 @@ -227,6 +229,8 @@ */ private String meiliao; + private Integer arriveCnt; + @@ -250,6 +254,21 @@ @Extend private Double achieveMoney; + public Integer getArriveCnt() { + return arriveCnt; + } + + public void setArriveCnt(Integer arriveCnt) { + this.arriveCnt = arriveCnt; + } + + public String getVipQueryKey() { + return vipQueryKey; + } + + public void setVipQueryKey(String vipQueryKey) { + this.vipQueryKey = vipQueryKey; + } public Long getCompanyId() { return companyId; diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUse.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUse.java index 3169b9d..99d661c 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUse.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUse.java @@ -1,5 +1,6 @@ package com.matrix.system.hive.bean; +import com.fasterxml.jackson.annotation.JsonFormat; import com.matrix.core.anotations.Extend; import com.matrix.core.tools.DateUtil; import com.matrix.system.hive.plugin.util.MoneyUtil; @@ -67,6 +68,7 @@ /** * 失效时间 */ + @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8") @DateTimeFormat(pattern= DateUtil.DATE_FORMAT_DD) private Date failTime; diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/ShoppingGoods.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/ShoppingGoods.java index e75be3b..7dfeeff 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/bean/ShoppingGoods.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/ShoppingGoods.java @@ -2,6 +2,7 @@ import com.matrix.core.anotations.Extend; import com.matrix.core.tools.DateUtil; +import com.matrix.core.tools.StringUtils; import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; @@ -393,7 +394,134 @@ */ private Integer isDel; + /** + * 购买有效期 + */ + private String buyValid; + /** + * 购买有效期单位 - 扩展字段用于参数接收 y/m/d + */ + private String buyDateUnit; + + /** + * 购买有效期时长 + */ + private Integer buyDateNum; + + /** + * 消耗有效期 + */ + private String useValid; + + /** + * 消耗有效期单位 - 扩展字段用于参数接收 y/m/d + */ + private String useDateUnit; + + /** + * 消耗有效期时长 + */ + private Integer useDateNum; + + /** + * 统一失效时间 + */ + private Date invalidTime; + + /** + * 任选套餐是否无限次 N-否 Y-是 + */ + private String isInfinite; + + /** + * 支付方式 1-充值本金 2-赠送金额 3-积分 + */ + private String payMethods; + + public String getPayMethods() { + return payMethods; + } + + public void setPayMethods(String payMethods) { + this.payMethods = payMethods; + } + + public String getIsInfinite() { + return isInfinite; + } + + public void setIsInfinite(String isInfinite) { + this.isInfinite = isInfinite; + } + + public Integer getBuyDateNum() { + return buyDateNum; + } + + public void setBuyDateNum(Integer buyDateNum) { + this.buyDateNum = buyDateNum; + } + + public Integer getUseDateNum() { + return useDateNum; + } + + public void setUseDateNum(Integer useDateNum) { + this.useDateNum = useDateNum; + } + + public String getBuyValid() { + return buyValid; + } + + public void setBuyValid(String buyValid) { + if (StringUtils.isNotBlank(buyValid)) { + if (buyValid.contains("Y") || buyValid.contains("M") || buyValid.contains("D")) { + this.buyDateUnit = buyValid.substring(buyValid.length() - 1); + this.buyDateNum = Integer.parseInt(buyValid.substring(0, buyValid.length() - 1)); + } + } + this.buyValid = buyValid; + } + + public String getBuyDateUnit() { + return buyDateUnit; + } + + public void setBuyDateUnit(String buyDateUnit) { + this.buyDateUnit = buyDateUnit; + } + + public String getUseValid() { + return useValid; + } + + public void setUseValid(String useValid) { + if (StringUtils.isNotBlank(useValid)) { + if (useValid.contains("Y") || useValid.contains("M") || useValid.contains("D")) { + this.useDateUnit = useValid.substring(useValid.length() - 1); + this.useDateNum = Integer.parseInt(useValid.substring(0, useValid.length() - 1)); + } + } + this.useValid = useValid; + } + + public String getUseDateUnit() { + return useDateUnit; + } + + public void setUseDateUnit(String useDateUnit) { + this.useDateUnit = useDateUnit; + } + + public Date getInvalidTime() { + return invalidTime; + } + + public void setInvalidTime(Date invalidTime) { + this.invalidTime = invalidTime; + } public Integer getIsDel() { return isDel; diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrder.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrder.java index bb4736d..663fa32 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrder.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrder.java @@ -1,5 +1,6 @@ package com.matrix.system.hive.bean; +import com.fasterxml.jackson.annotation.JsonFormat; import com.matrix.core.tools.DateUtil; import org.springframework.format.annotation.DateTimeFormat; @@ -155,6 +156,18 @@ @DateTimeFormat(pattern = DateUtil.DATE_FORMAT_MM) private Date endTimeVo; + /** + * 消费次数 + */ + private Integer times; + + public Integer getTimes() { + return times; + } + + public void setTimes(Integer times) { + this.times = times; + } public String getBeatuyId() { return beatuyId; diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjServices.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjServices.java index 252be5f..70cd5a4 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjServices.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjServices.java @@ -1,5 +1,6 @@ package com.matrix.system.hive.bean; +import com.fasterxml.jackson.annotation.JsonFormat; import com.matrix.core.anotations.Extend; import com.matrix.core.tools.DateUtil; import org.springframework.format.annotation.DateTimeFormat; @@ -36,6 +37,7 @@ /** * 订单创建时间 */ + @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") private Date createTime; /** @@ -287,12 +289,14 @@ /** * 扩展属性-预约查询开始时间 */ + @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") @DateTimeFormat(pattern = DateUtil.DATE_FORMAT_MM) private Date beginTime; /** * 扩展属性-预约查询结束时间 */ + @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") @DateTimeFormat(pattern = DateUtil.DATE_FORMAT_MM) private Date closureTime; diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjUse.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjUse.java index a0c163e..d331b5b 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjUse.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysProjUse.java @@ -44,14 +44,13 @@ /** * 有效期 */ + @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8") @DateTimeFormat(pattern = DateUtil.DATE_FORMAT_DD) private Date failTime; /** * 套餐id */ private Long taocanId; - - /** * 订单明细id 不明确 @@ -115,10 +114,23 @@ private String isCourse; /** + * 任选套餐 是否无限次 Y-是 N-否 + */ + private String isInfinite; + + /** * 单次划扣次数 */ private Integer deductionNum; + public String getIsInfinite() { + return isInfinite; + } + + public void setIsInfinite(String isInfinite) { + this.isInfinite = isInfinite; + } + public String getIsCourse() { return isCourse; } diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysSkinCheckRecord.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysSkinCheckRecord.java index 6f45a21..6fac369 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysSkinCheckRecord.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysSkinCheckRecord.java @@ -3,6 +3,8 @@ import com.fasterxml.jackson.annotation.JsonFormat; import com.matrix.core.pojo.EntityDTO; import com.matrix.core.anotations.Extend; +import com.matrix.core.tools.DateUtil; +import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; import java.util.List; @@ -55,7 +57,14 @@ private Date checkTime; private String checkTimeStr; - + + @DateTimeFormat(pattern = DateUtil.DATE_FORMAT_DD) + @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8") + private Date beginTime; + + @DateTimeFormat(pattern = DateUtil.DATE_FORMAT_DD) + @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8") + private Date endTime; /** * 扩展字段 */ @@ -94,6 +103,22 @@ @Extend private String checkUserName; + public Date getBeginTime() { + return beginTime; + } + + public void setBeginTime(Date beginTime) { + this.beginTime = beginTime; + } + + public Date getEndTime() { + return endTime; + } + + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + public List<SysSkinDetail> getAnalysisDetail() { return analysisDetail; } diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java index 92105d9..350d487 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java @@ -1,5 +1,6 @@ package com.matrix.system.hive.bean; +import com.fasterxml.jackson.annotation.JsonFormat; import com.matrix.core.tools.DateUtil; import com.matrix.system.hive.plugin.util.ExcelAnnotation; import org.springframework.format.annotation.DateTimeFormat; @@ -91,8 +92,11 @@ /** * 生日 */ + @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") @DateTimeFormat(pattern = DateUtil.DATE_FORMAT_DD) private Date birthday1; + + private String age; /** * 地址 @@ -139,6 +143,7 @@ /** * 注册时间 */ + @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") private Date createTime; /** * 备注 @@ -203,6 +208,15 @@ private Date createDistributionTime; + private SysOrder sysOrder; + + public SysOrder getSysOrder() { + return sysOrder; + } + + public void setSysOrder(SysOrder sysOrder) { + this.sysOrder = sysOrder; + } public Integer getIsDeal() { return isDeal; @@ -349,6 +363,27 @@ */ List<VipAnswer> vipAnswers; + /** + * 会员标签 + */ + List<SysVipLabel> labels; + + public List<SysVipLabel> getLabels() { + return labels; + } + + public void setLabels(List<SysVipLabel> labels) { + this.labels = labels; + } + + public String getAge() { + return age; + } + + public void setAge(String age) { + this.age = age; + } + public Long getCompanyId() { return companyId; } diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipLabel.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipLabel.java new file mode 100644 index 0000000..fe57323 --- /dev/null +++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipLabel.java @@ -0,0 +1,76 @@ +package com.matrix.system.hive.bean; + +import java.io.Serializable; +import java.util.Date; + +/** + * @author wzy + * @date 2020-12-17 + **/ +public class SysVipLabel implements Serializable { + /** + * 创建时间 + */ + private Date createTime; + + /** + * 创建人 + */ + private String createBy; + + /** + * 主键ID + */ + private Long id; + + /** + * 会员ID + */ + private Long vipId; + + /** + * 标签内容 + */ + private String label; + + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getVipId() { + return vipId; + } + + public void setVipId(Long vipId) { + this.vipId = vipId; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } +} diff --git a/zq-erp/src/main/java/com/matrix/system/hive/dao/AchieveNewDao.java b/zq-erp/src/main/java/com/matrix/system/hive/dao/AchieveNewDao.java index 01f07c0..f39cd28 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/dao/AchieveNewDao.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/dao/AchieveNewDao.java @@ -52,6 +52,8 @@ public List<AchieveNew> findSumDailyInfoNew(@Param("record") AchieveNew achieveNew, @Param("pageVo") PaginationVO pageVo); - + List<AchieveNew> selectVipConsumeStatisticsList(@Param("record") AchieveNew achieveNew, @Param("pageVo") PaginationVO pageVo); + + int selectVipConsumeStatisticsTotal(@Param("record") AchieveNew achieveNew); } \ No newline at end of file diff --git a/zq-erp/src/main/java/com/matrix/system/hive/dao/SysBeauticianStateDao.java b/zq-erp/src/main/java/com/matrix/system/hive/dao/SysBeauticianStateDao.java index c701b27..6a318c6 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/dao/SysBeauticianStateDao.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/dao/SysBeauticianStateDao.java @@ -2,6 +2,7 @@ import com.matrix.core.pojo.PaginationVO; import com.matrix.system.hive.bean.SysBeauticianState; +import com.matrix.system.hive.bean.SysProjUse; import org.apache.ibatis.annotations.Param; import java.util.Date; @@ -73,5 +74,8 @@ public int summaryItemDetailTotal(Map<String,Object> obj); + List<SysBeauticianState> selectByProjUse(@Param("list") List<SysProjUse> list, @Param("state") String state); + + List<SysBeauticianState> selectBeauticianStateByPuseIdAndNoStatus(@Param("puseId") Long puseId, @Param("state") String state); } \ No newline at end of file diff --git a/zq-erp/src/main/java/com/matrix/system/hive/dao/SysOrderDao.java b/zq-erp/src/main/java/com/matrix/system/hive/dao/SysOrderDao.java index 361420c..42475ae 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/dao/SysOrderDao.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/dao/SysOrderDao.java @@ -33,5 +33,6 @@ public int selectInPageCount(@Param("record") SysOrder sysOrder); public void updateOrderTime(@Param("orderTime") Date orderTime, @Param("id") Long id); - + + SysOrder selectVipOrderInfoTotal(@Param("vipId") Long vipId); } \ No newline at end of file diff --git a/zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipLabelDao.java b/zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipLabelDao.java new file mode 100644 index 0000000..cc99bcc --- /dev/null +++ b/zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipLabelDao.java @@ -0,0 +1,17 @@ +package com.matrix.system.hive.dao; + +import com.matrix.system.hive.bean.SysVipLabel; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface SysVipLabelDao { + + int insert(SysVipLabel sysVipLabel); + + int deleteById(@Param("id") Long id); + + List<SysVipLabel> selectByVipId(@Param("vipId") Long vipId); + + List<SysVipLabel> selectByModel(@Param("record") SysVipLabel sysVipLabel); +} diff --git a/zq-erp/src/main/java/com/matrix/system/hive/pojo/StoreInOutRecordVO.java b/zq-erp/src/main/java/com/matrix/system/hive/pojo/StoreInOutRecordVO.java index 12f25bd..3e84fff 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/pojo/StoreInOutRecordVO.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/pojo/StoreInOutRecordVO.java @@ -84,6 +84,15 @@ private Long goodsSortId; + private Long id; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } public Date getCreateTime() { return createTime; diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/AchieveNewService.java b/zq-erp/src/main/java/com/matrix/system/hive/service/AchieveNewService.java index 09757e9..0b2ec73 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/service/AchieveNewService.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/service/AchieveNewService.java @@ -8,6 +8,7 @@ import com.matrix.core.pojo.PaginationVO; import com.matrix.system.hive.plugin.util.BaseServices; +import org.apache.ibatis.annotations.Param; /** * @@ -108,5 +109,8 @@ public void modifyAchieveTime(AchieveNew achieveNew); + List<AchieveNew> findVipConsumeStatisticsList(AchieveNew achieveNew, PaginationVO pageVo); + + int findVipConsumeStatisticsTotal(AchieveNew achieveNew); } \ No newline at end of file diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/ShoppingGoodsService.java b/zq-erp/src/main/java/com/matrix/system/hive/service/ShoppingGoodsService.java index 61e0ace..16c6ad5 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/service/ShoppingGoodsService.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/service/ShoppingGoodsService.java @@ -4,6 +4,7 @@ import com.matrix.system.hive.bean.ShoppingGoods; import com.matrix.system.hive.plugin.util.BaseServices; +import java.util.Date; import java.util.List; /** * @@ -98,4 +99,6 @@ public List<ShoppingGoods> findAll(ShoppingGoods shoppingGoods); public ShoppingGoods findByCode(String goodsCode); + + Date calInvalidTime(ShoppingGoods shoppingGoods, Integer type, Date buyDate); } \ No newline at end of file diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/SysOrderService.java b/zq-erp/src/main/java/com/matrix/system/hive/service/SysOrderService.java index f9aa2a2..a283ccf 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/service/SysOrderService.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/service/SysOrderService.java @@ -126,4 +126,6 @@ * @return */ SysOrder checkAndSaveOrder(SysOrder sysOrder); + + SysOrder findSysOrderTjByVipId(Long vipId); } \ No newline at end of file diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java index 7211bb8..df7c66e 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java @@ -308,5 +308,13 @@ achieveNewDao.updateAchieveTime(achieveNew); } + @Override + public List<AchieveNew> findVipConsumeStatisticsList(AchieveNew achieveNew, PaginationVO pageVo) { + return achieveNewDao.selectVipConsumeStatisticsList(achieveNew, pageVo); + } + @Override + public int findVipConsumeStatisticsTotal(AchieveNew achieveNew) { + return achieveNewDao.selectVipConsumeStatisticsTotal(achieveNew); + } } \ No newline at end of file diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/ShoppingGoodsServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/ShoppingGoodsServiceImpl.java index fc8b5d5..d415e72 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/ShoppingGoodsServiceImpl.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/ShoppingGoodsServiceImpl.java @@ -3,6 +3,7 @@ import com.matrix.core.constance.MatrixConstance; import com.matrix.core.exception.GlobleException; import com.matrix.core.pojo.PaginationVO; +import com.matrix.core.tools.DateUtil; import com.matrix.core.tools.StringUtils; import com.matrix.core.tools.WebUtil; import com.matrix.system.common.bean.SysUsers; @@ -25,7 +26,9 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import javax.validation.constraints.NotNull; import java.awt.event.WindowStateListener; +import java.time.LocalDate; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -88,12 +91,15 @@ shoppingGoods.setCreateTime(new Date()); setPublicAttr(shoppingGoods); + + setShoppingGoodsInvalidTime(shoppingGoods); + if (shoppingGoods.getReferencePice() == null) { //赠送金额 shoppingGoods.setReferencePice(0D); } // 验证套餐卡卡必须填写最大使用次数 - if (Dictionary.FLAG_YES_Y.equals(shoppingGoods.getIsCourse())) { + if (Dictionary.FLAG_YES_Y.equals(shoppingGoods.getIsCourse()) && Dictionary.FLAG_NO_N.equals(shoppingGoods.getIsInfinite())) { if (shoppingGoods.getCarUseCount() == null) { shoppingGoods.setCarUseCount(0); } @@ -116,6 +122,36 @@ return i; + } + + private void setShoppingGoodsInvalidTime(ShoppingGoods shoppingGoods) { + // 若未设置购买有效期和消耗有效期,则默认永久有效 +// if (shoppingGoods.getBuyDateNum() == null && shoppingGoods.getUseDateNum() == null) { +// shoppingGoods.setInvalidTime(DateUtil.stringToDate("9999-12-31", DateUtil.DATE_FORMAT_DD)); +// } else { +// // 计算失效日期,判断购买有效期和消耗有效期哪个先失效,则为失效日期 +// Date buyValidDate = DateUtil.calDate(shoppingGoods.getBuyDateNum(), shoppingGoods.getBuyDateUnit()); +// Date useValidDate = DateUtil.calDate(shoppingGoods.getUseDateNum(), shoppingGoods.getUseDateUnit()); +// if (buyValidDate.after(useValidDate)) { +// shoppingGoods.setInvalidTime(useValidDate); +// } else { +// shoppingGoods.setInvalidTime(buyValidDate); +// } +// shoppingGoods.setBuyValid(shoppingGoods.getBuyDateNum() + shoppingGoods.getBuyDateUnit()); +// shoppingGoods.setUseValid(shoppingGoods.getUseDateNum() + shoppingGoods.getUseDateUnit()); +// } + + if (shoppingGoods.getBuyDateNum() != null && StringUtils.isNotBlank(shoppingGoods.getBuyDateUnit())) { + shoppingGoods.setBuyValid(shoppingGoods.getBuyDateNum() + shoppingGoods.getBuyDateUnit()); + } else { + shoppingGoods.setBuyValid(null); + } + + if (shoppingGoods.getUseDateNum() != null && StringUtils.isNotBlank(shoppingGoods.getUseDateUnit())) { + shoppingGoods.setUseValid(shoppingGoods.getUseDateNum() + shoppingGoods.getUseDateUnit()); + } else { + shoppingGoods.setUseValid(null); + } } private void setGoodsAssembles(ShoppingGoods shoppingGoods) { @@ -190,7 +226,7 @@ } } - + setShoppingGoodsInvalidTime(shoppingGoods); return shoppingGoodsDao.update(shoppingGoods); @@ -386,4 +422,49 @@ return shoppingGoodsDao.selectByModelData(shoppingGoods); } + + /** + * 计算失效时间 + * + * @param shoppingGoods + * @param type 1 - 购买时 2 - 消耗时 + * @param buyDate 购买日期, 当计算消耗日期时,不能为空 + * @return + */ + @Override + public Date calInvalidTime(ShoppingGoods shoppingGoods, @NotNull Integer type, Date buyDate) { + if (StringUtils.isBlank(shoppingGoods.getBuyValid()) && StringUtils.isBlank(shoppingGoods.getUseValid()) && shoppingGoods.getInvalidTime() == null) { + return DateUtil.stringToDate("9999-12-31", DateUtil.DATE_FORMAT_DD); + } + + if (type == 2 && buyDate == null) { + throw new GlobleException("购买日期不能为空"); + } + + Date target = null; + Date buyValidDate = null; + if (type == 1) { + buyValidDate = DateUtil.calDate(shoppingGoods.getBuyDateNum(), shoppingGoods.getBuyDateUnit()); + } else { + buyValidDate = buyDate; + } + + Date useValidDate = DateUtil.stringToDate("9999-12-31", DateUtil.DATE_FORMAT_DD); + if (type == 2) { + useValidDate = DateUtil.calDate(shoppingGoods.getUseDateNum(), shoppingGoods.getUseDateUnit()); + } + + if (buyValidDate.after(useValidDate)) { + target = useValidDate; + } else { + target = buyValidDate; + } + + if (shoppingGoods.getInvalidTime() != null) { + if (target.after(shoppingGoods.getInvalidTime())) { + target = shoppingGoods.getInvalidTime(); + } + } + return target; + } } diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysInstoreInfoServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysInstoreInfoServiceImpl.java index f1ca701..6ca75ad 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysInstoreInfoServiceImpl.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysInstoreInfoServiceImpl.java @@ -69,9 +69,10 @@ Long id = sysInstoreInfo.getId(); SysInstoreInfo getInstoreInfo = sysInstoreInfoDao.selectById(id); // 已经审核过的单据不能在修改 - if (!getInstoreInfo.getCheckStatus().equals(Dictionary.CHECK_STATUS_DSH)) { + if (!getInstoreInfo.getCheckStatus().equals(Dictionary.CHECK_STATUS_DSH) && !getInstoreInfo.getCheckStatus().equals(Dictionary.CHECK_STATUS_SHWTG)) { throw new GlobleException("已审核,不能再修改"); } + sysInstoreInfo.setCheckStatus(Dictionary.CHECK_STATUS_DSH); // 设置总金额 sysInstoreInfo.setSumall(savevDetatil(sysInstoreInfo)); return sysInstoreInfoDao.update(sysInstoreInfo); diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java index b0bf857..438b430 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java @@ -22,6 +22,7 @@ import com.matrix.system.hive.pojo.ShoppingCarItemsVo; import com.matrix.system.hive.service.AchieveNewService; import com.matrix.system.hive.service.CodeService; +import com.matrix.system.hive.service.ShoppingGoodsService; import com.matrix.system.hive.service.SysOrderService; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -80,6 +81,9 @@ @Autowired private WarehouseDao warehouseDao; + + @Autowired + private ShoppingGoodsService shoppingGoodsService; @Override public int add(SysOrder sysOrder) { @@ -625,6 +629,10 @@ moneyCardUse.setIsOver(Dictionary.FLAG_YES_Y); moneyCardUse.setStatus(Dictionary.MONEYCARD_STATUS_WX); } + + ShoppingGoods shoppingGoods = shoppingGoodsService.findById(moneyCardUse.getGoodsId()); + Date invalidTime = shoppingGoodsService.calInvalidTime(shoppingGoods, 2, moneyCardUse.getFailTime()); + moneyCardUse.setFailTime(invalidTime); // 更新充值卡信息 moneyCardUseDao.update(moneyCardUse); } @@ -732,14 +740,17 @@ moneyCardUse.setLastCount(moneyCar.getCarUseCount()); } moneyCardUse.setVipId(sourceOrder.getVipId()); - if (moneyCar.getValidity() == null || moneyCar.getValidity() == 0) { - // 设置失效时间 - Calendar cal = Calendar.getInstance(); - cal.set(2200, 1, 1); - moneyCardUse.setFailTime(cal.getTime()); - } else { - moneyCardUse.setFailTime(DateUtil.nextNDate(new Date(), 30 * moneyCar.getValidity())); - } +// if (moneyCar.getValidity() == null || moneyCar.getValidity() == 0) { +// // 设置失效时间 +// Calendar cal = Calendar.getInstance(); +// cal.set(2200, 1, 1); +// moneyCardUse.setFailTime(cal.getTime()); +// } else { +// moneyCardUse.setFailTime(DateUtil.nextNDate(new Date(), 30 * moneyCar.getValidity())); +// } + Date invalidTime = shoppingGoodsService.calInvalidTime(sysOrderItem.getShoppingGoods(), 1, null); + moneyCardUse.setFailTime(invalidTime); + moneyCardUseDao.insert(moneyCardUse); } } @@ -954,7 +965,6 @@ } - public void addZongheCarUse(SysOrder order, SysOrderItem sysOrderItem) { @@ -1046,16 +1056,16 @@ taocanProjUse.setStatus(Dictionary.TAOCAN_STATUS_YX); taocanProjUse.setType(Dictionary.SHOPPING_GOODS_TYPE_TC); taocanProjUse.setIsCourse(taocanShoppingGoods.getIsCourse()); + taocanProjUse.setIsInfinite(taocanShoppingGoods.getIsInfinite()); // 赠送和打折后金额为0的都视为赠送项目 if (sysOrderItem.getIsFree().equals(Dictionary.FLAG_NO) && sysOrderItem.getZkPrice() > 0) { taocanProjUse.setSource(Dictionary.TAOCAN_SOURCE_GM); } else { taocanProjUse.setSource(Dictionary.TAOCAN_SOURCE_ZS); } - // TODO 设置失效时间 - Calendar cal = Calendar.getInstance(); - cal.set(2200, 1, 1); - taocanProjUse.setFailTime(cal.getTime()); + // 失效时间 + Date invalidTime = shoppingGoodsService.calInvalidTime(taocanShoppingGoods, 1, null); + taocanProjUse.setFailTime(invalidTime); sysProjUseDao.insert(taocanProjUse); //计划次数 int surplusCount=0; @@ -1105,9 +1115,8 @@ puse.setSource(Dictionary.TAOCAN_SOURCE_ZS); } // 设置失效时间 - Calendar cal = Calendar.getInstance(); - cal.set(2300, 1, 1); - puse.setFailTime(cal.getTime()); + Date invalidTime = shoppingGoodsService.calInvalidTime(sysOrderItem.getShoppingGoods(), 1, null); + puse.setFailTime(invalidTime); sysProjUseDao.insert(puse); } @@ -1198,6 +1207,8 @@ } - - + @Override + public SysOrder findSysOrderTjByVipId(Long vipId) { + return sysOrderDao.selectVipOrderInfoTotal(vipId); + } } diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java index ada929f..ef69075 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java @@ -4,9 +4,7 @@ import com.matrix.core.exception.GlobleException; import com.matrix.core.pojo.PaginationVO; import com.matrix.core.pojo.VerifyResult; -import com.matrix.core.tools.DateUtil; -import com.matrix.core.tools.LogUtil; -import com.matrix.core.tools.WebUtil; +import com.matrix.core.tools.*; import com.matrix.system.common.bean.SysUsers; import com.matrix.system.common.dao.SysUsersDao; import com.matrix.system.constance.Dictionary; @@ -23,9 +21,7 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; +import java.util.*; import java.util.stream.Collectors; /** @@ -97,6 +93,8 @@ private SysOrderService sysOrderService; @Autowired WarehouseDao warehouseDao; + @Resource + private ShoppingGoodsService shoppingGoodsService; /** * 新增服务单 jyy @@ -118,7 +116,6 @@ sysProjServices.setServiceNo(codeService.getServiceOrderCode()); Double hkPrice = 0.0; int i = sysProjServicesDao.insert(sysProjServices); - // 计算项目总时长 int totalTime = 0; //处理订单明细 @@ -144,6 +141,14 @@ //本次消费金额 Double bcxfje = MoneyUtil.mul(sysProjUse.getPrice(), Double.valueOf(sysBeauticianState.getCount())); upProjUse.setBalance(MoneyUtil.sub(sysProjUse.getBalance(), bcxfje)); + + // 判断是否第一次使用该项目, 若是则根据商品消耗有效期更新到期时间 + List<SysBeauticianState> sysBeauticianStates = beauticianStateDao.selectBeauticianStateByPuseIdAndNoStatus(sysBeauticianState.getPuseId(), Dictionary.SERVICE_STATU_YYQX); + if (CollectionUtils.isEmpty(sysBeauticianStates)) { + Date useInvalidTime = shoppingGoodsService.calInvalidTime(sysProjInfo, 2, sysProjUse.getFailTime()); + upProjUse.setFailTime(useInvalidTime); + } + //更新余次信息 sysProjUseDao.updateSurplusCount(upProjUse); //如果项目是套餐 中项目则判断套餐是否失效 @@ -159,13 +164,28 @@ taocan.setSurplusCount(0); taocan.setStatus(Dictionary.TAOCAN_STATUS_WX); } else if (Dictionary.FLAG_YES_Y.equals(taocan.getIsCourse())) { - //任选套餐检查套餐整体剩余次数 - int tcSurplusCount = taocan.getSurplusCount() - sysProjUse.getDeductionNum(); - if (tcSurplusCount < 0) { - throw new GlobleException(taocan.getProjName() + "已经达到最大使用次数"); - } else { - taocan.setSurplusCount(tcSurplusCount); + if (StringUtils.isBlank(taocan.getIsInfinite()) || Dictionary.FLAG_NO_N.equals(taocan.getIsInfinite())) { + //任选套餐检查套餐整体剩余次数 + int tcSurplusCount = taocan.getSurplusCount() - sysBeauticianState.getCount(); + if (tcSurplusCount < 0) { + throw new GlobleException(taocan.getProjName() + "已经达到最大使用次数"); + } else { + taocan.setSurplusCount(tcSurplusCount); + } + + if (tcSurplusCount == 0) { + taocan.setIsOver(Dictionary.FLAG_YES_Y); + taocan.setStatus(Dictionary.TAOCAN_STATUS_WX); + } } + } + + // 根据套餐内所有项目查询该套餐是否第一次使用,若第一次使用则更新该套餐有效期 + List<SysBeauticianState> taocanHas = beauticianStateDao.selectByProjUse(taocanProjUses, Dictionary.SERVICE_STATU_YYQX); + if (CollectionUtils.isEmpty(taocanHas)) { + ShoppingGoods taocanInfo = shoppingGoodsDao.selectById(taocan.getProjId()); + Date useInvalidTime = shoppingGoodsService.calInvalidTime(taocanInfo, 2, sysProjUse.getFailTime()); + taocan.setFailTime(useInvalidTime); } sysProjUseDao.updateSurplusCount(taocan); } @@ -457,8 +477,14 @@ */ private void backProjCount(SysProjServices projServices) { List<SysBeauticianState> beauticianStateList = beauticianStateDao.selectBySerIds(projServices.getId()); + + Map<Long ,List<SysProjUse>> taocanMap = new HashMap<>(); // 回退项目余额 for (SysBeauticianState beauticianState : beauticianStateList) { + // 该修改为 有效日期判断更新所有 + beauticianState.setState(Dictionary.BEATUI_STATE_YYQX); + beauticianStateDao.update(beauticianState); + SysProjUse sysProjUse = sysProjUseDao.selectById(beauticianState.getPuseId()); if (sysProjUse != null && sysProjUse.getId() != null) { sysProjUse = sysProjUseDao.selectById(sysProjUse.getId()); @@ -471,14 +497,58 @@ upProjUse.setStatus(Dictionary.MONEYCARD_STATUS_YX); if (sysProjUse.getTaocanId() != null) { //TODO 更新套餐状态为有效 + SysProjUse taocanProjUse = sysProjUseDao.selectById(sysProjUse.getTaocanId()); + taocanProjUse.setIsOver(Dictionary.DELETED_N); + taocanProjUse.setStatus(Dictionary.MONEYCARD_STATUS_YX); + + if (Dictionary.FLAG_YES_Y.equals(taocanProjUse.getIsCourse())) { + if (StringUtils.isBlank(taocanProjUse.getIsInfinite()) || Dictionary.FLAG_NO_N.equals(taocanProjUse.getIsInfinite())) { + taocanProjUse.setSurplusCount(taocanProjUse.getSurplusCount() + beauticianState.getCount()); + } + } + sysProjUseDao.update(taocanProjUse); } } int surplus = sysProjUse.getSurplusCount() + beauticianState.getCount(); upProjUse.setSurplusCount(surplus); upProjUse.setBalance(MoneyUtil.add(sysProjUse.getBalance(), sysProjUse.getPrice())); + + // 取消时,判断该项目之前是否有使用过,若使用过则非第一次使用,则不更新有效日期,若未使用表明此次为第一次使用,则更新有效日期为购买日期或统一失效日期 + List<SysBeauticianState> hasBeautician = beauticianStateDao.selectBeauticianStateByPuseIdAndNoStatus(beauticianState.getPuseId(), Dictionary.BEATUI_STATE_YYQX); + if (hasBeautician.isEmpty()) { + ShoppingGoods shoppingGoods = shoppingGoodsDao.selectById(beauticianState.getProjId()); + Date useInvalidTime = shoppingGoodsService.calInvalidTime(shoppingGoods, 1, null); + upProjUse.setFailTime(useInvalidTime); + } + + if (sysProjUse.getTaocanId() != null) { + List<SysProjUse> sysProjUses = taocanMap.get(sysProjUse.getTaocanId()); + if (CollectionUtils.isEmpty(sysProjUses)) { + List<SysProjUse> taocanItems = new ArrayList<>(); + taocanItems.add(sysProjUse); + taocanMap.put(sysProjUse.getTaocanId(), taocanItems); + } else { + sysProjUses.add(sysProjUse); + taocanMap.put(sysProjUse.getTaocanId(), sysProjUses); + } + } sysProjUseDao.updateSurplusCount(upProjUse); } } + + if (taocanMap.size() != 0) { + for (Map.Entry<Long, List<SysProjUse>> entry : taocanMap.entrySet()) { + List<SysBeauticianState> taocanUse = beauticianStateDao.selectByProjUse(entry.getValue(), Dictionary.BEATUI_STATE_YYQX); + if (CollectionUtils.isEmpty(taocanUse)) { + SysProjUse taocan = sysProjUseDao.selectById(entry.getKey()); + ShoppingGoods shoppingGoods = shoppingGoodsDao.selectById(taocan.getProjId()); + Date buyInvalidDate = shoppingGoodsService.calInvalidTime(shoppingGoods, 1, null); + taocan.setFailTime(buyInvalidDate); + + sysProjUseDao.update(taocan); + } + } + } } // 划扣 jyy diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjUseServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjUseServiceImpl.java index 8e0556f..45f9083 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjUseServiceImpl.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjUseServiceImpl.java @@ -19,6 +19,7 @@ import org.springframework.transaction.annotation.Transactional; import javax.xml.crypto.Data; +import java.sql.Timestamp; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -198,24 +199,37 @@ @Override public AjaxResult activeTc(SysProjUse proj) { - + Date newDate = proj.getFailTime(); + Date today = new Date(); SysProjUse taocan = sysProjUseDao.selectById(proj.getId()); switch (taocan.getStatus()) { case Dictionary.TAOCAN_STATUS_WX: // 如果到期,需要重新设置有效期 - if (taocan.getFailTime().before(new Date())) { - taocan.setFailTime(DateUtil.getDateAfterMonth(new Date(),12)); + if (newDate != null && !newDate.equals("")) { + taocan.setFailTime(newDate); + if (newDate.before(today)) { + return new AjaxResult(AjaxResult.STATUS_FAIL, "有效期要大于当前日期"); + } + } + + if (newDate == null && (taocan.getFailTime() == null || taocan.getFailTime().before(today))) { + return new AjaxResult(AjaxResult.STATUS_SUCCESS, "已过期"); } break; - //TODO 如果是冻结状态则要算出冻结的天数,延长有效期 case Dictionary.TAOCAN_STATUS_DJ: + SysProjuseFreeze freeze = new SysProjuseFreeze(); + freeze.setOrderItemId(taocan.getId().toString()); + freeze.setVipId(taocan.getVipId()); + SysProjuseFreeze freezeProj = sysProjuseFreezeDao.selectByOrderItemId(freeze); + Date dateAfter = DateUtil.nextNDate(taocan.getFailTime(), freezeProj.getGapDays()); + taocan.setFailTime(dateAfter); break; default: return new AjaxResult(AjaxResult.STATUS_FAIL, "请选择无效或者冻结的套餐"); } taocan.setStatus(Dictionary.TAOCAN_STATUS_YX); - sysProjUseDao.updateTcStatus(taocan.getId(),"有效"); + sysProjUseDao.updateProjStatus(taocan); return new AjaxResult(AjaxResult.STATUS_SUCCESS, "操作成功"); } @@ -590,6 +604,7 @@ public AjaxResult activeProj(SysProjUse proj) { Date today = new Date(); Date newDate = proj.getFailTime(); + proj = sysProjUseDao.selectById(proj.getId()); switch (proj.getStatus()) { case Dictionary.TAOCAN_STATUS_WX: @@ -600,13 +615,19 @@ return new AjaxResult(AjaxResult.STATUS_FAIL, "有效期要大于当前日期"); } } - if (newDate == null && proj.getFailTime().before(today)) { + if (newDate == null && (proj.getFailTime() == null || proj.getFailTime().before(today))) { return new AjaxResult(AjaxResult.STATUS_SUCCESS, "已过期"); } break; //如果是冻结状态则要算出冻结的天数,延长有效期 case Dictionary.TAOCAN_STATUS_DJ: + SysProjuseFreeze freeze = new SysProjuseFreeze(); + freeze.setOrderItemId(proj.getId().toString()); + freeze.setVipId(proj.getVipId()); + SysProjuseFreeze freezeProj = sysProjuseFreezeDao.selectByOrderItemId(freeze); + Date dateAfter = DateUtil.nextNDate(proj.getFailTime(), freezeProj.getGapDays()); + proj.setFailTime(dateAfter); break; default: return new AjaxResult(AjaxResult.STATUS_FAIL, "请选择无效或者冻结的套餐"); diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java index 3a7c6df..d057117 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java @@ -101,7 +101,7 @@ sysVipInfo.setCompanyId(user.getCompanyId()); sysVipInfo.setCreateTime(new Date()); sysVipInfo.setPointAll(0); - sysVipInfo.setIsDeal(SysVipInfo.DEAL_VIP); + sysVipInfo.setIsDeal(SysVipInfo.UNDEAL_VIP); sysVipInfo.setZjm(StringUtils.toHanyuPinyin(sysVipInfo.getVipName())+","+StringUtils.toHeadWordHanyuPinyin(sysVipInfo.getVipName())); int i=sysVipInfoDao.insert(sysVipInfo); modifyVipWithOtherInfo(sysVipInfo); diff --git a/zq-erp/src/main/java/com/matrix/system/hive/statistics/VipStatisticsAction.java b/zq-erp/src/main/java/com/matrix/system/hive/statistics/VipStatisticsAction.java new file mode 100644 index 0000000..e3a384a --- /dev/null +++ b/zq-erp/src/main/java/com/matrix/system/hive/statistics/VipStatisticsAction.java @@ -0,0 +1,43 @@ +package com.matrix.system.hive.statistics; + +import com.matrix.core.constance.MatrixConstance; +import com.matrix.core.pojo.AjaxResult; +import com.matrix.core.pojo.PaginationVO; +import com.matrix.core.tools.WebUtil; +import com.matrix.system.common.bean.SysUsers; +import com.matrix.system.common.constance.AppConstance; +import com.matrix.system.hive.bean.AchieveNew; +import com.matrix.system.hive.service.AchieveNewService; +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.HashMap; +import java.util.List; + +/** + * 客户数据统计 + * + * @author wzy + * @date 2020-12-18 + **/ +@Controller +@RequestMapping(value = "/admin/vipStatistics") +public class VipStatisticsAction { + + @Autowired + private AchieveNewService achieveNewService; + + @RequestMapping(value = "/vipConsumeStatistics") + @ResponseBody + public AjaxResult vipConsumeStatistics(AchieveNew achieveNew, PaginationVO pageVo) { + SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); + if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ + achieveNew.setShopId(sysUsers.getShopId()); + } + List<AchieveNew> list = achieveNewService.findVipConsumeStatisticsList(achieveNew, pageVo); + int total = achieveNewService.findVipConsumeStatisticsTotal(achieveNew); + return AjaxResult.buildSuccessInstance(list, total); + } +} diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml index 361aeb2..c8ab5b1 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml @@ -48,6 +48,8 @@ <result property="meiliao" column="meiliao" /> <result property="zkTotal" column="zk_total" /> + <result property="arriveCnt" column="arrive_cnt" /> + </resultMap> @@ -113,8 +115,20 @@ <if test="(record.endTime!=null )"> and a.datatime <![CDATA[ < ]]> #{record.endTime} </if> + <if test="record.beaultId != null and record.beaultId !='' "> + and a.beault_id = #{record.beaultId} + </if> <if test="record.companyId != null and record.companyId !='' "> and a.company_id = #{record.companyId} + </if> + <if test="record.beaultId != null and record.beaultId !='' "> + and a.beault_id = #{record.beaultId} + </if> + <if test="record.vipQueryKey != null and record.vipQueryKey != '' "> + and c.VIP_NAME like concat('%',#{record.vipQueryKey},'%') + or (c.VIP_NO like concat('%',#{record.vipQueryKey},'%') + or c.PHONE like concat('%',#{record.vipQueryKey},'%') + ) </if> </if> </where> @@ -168,6 +182,15 @@ </if> <if test="record.companyId != null and record.companyId !='' "> and a.company_id = #{record.companyId} + </if> + <if test="record.beaultId != null and record.beaultId !='' "> + and a.beault_id = #{record.beaultId} + </if> + <if test="record.vipQueryKey != null and record.vipQueryKey != '' "> + and c.VIP_NAME like concat('%',#{record.vipQueryKey},'%') + or (c.VIP_NO like concat('%',#{record.vipQueryKey},'%') + or c.PHONE like concat('%',#{record.vipQueryKey},'%') + ) </if> </if> </where> @@ -819,4 +842,85 @@ where 1=1 <include refid="where_sql"></include> </select> + + + <select id="selectVipConsumeStatisticsList" resultMap="AchieveNewMap"> + select + a.VIP_NAME, + a.PHONE t9, + GROUP_CONCAT(DISTINCT e.su_name) meiliao, + d.cnt arrive_cnt, + sum(b.buyConsume) goods_cash, + sum(b.freeConsume) free_consume, + sum(b.hisConsume) his_consume + from sys_vip_info a + inner join ( + select vip_id,datatime, sum(a.free_consume) freeConsume, sum(a.his_consume) hisConsume, sum(IFNULL(goods_cash, 0) + IFNULL(card_cash, 0)) buyConsume from achieve_new a group by vip_id + ) b on a.ID = b.vip_id + inner join ( + select vip_id, count(1) cnt from ( + select vip_id, date_format(datatime, '%Y-%m-%d') + from achieve_new + group by date_format(datatime, '%Y-%m-%d'), vip_id + ) c group by vip_id + ) d on a.ID=d.vip_id + + left join sys_users e on find_in_set(e.su_id, a.BEATUY_ID) + where 1=1 + <if test="record.vipName != null and record.vipName !=''"> + and (a.vip_name like CONCAT(CONCAT('%', #{record.vipName}), '%') or a.vip_no=#{record.vipName} or a.phone = #{record.vipName}) + </if> + <if test="record.shopId != null"> + and a.shop_id=#{record.shopId} + </if> + <if test="record.beginTime != null and record.endTime!=null"> + and date_format(b.datatime, '%Y-%m-%d') between #{record.beginTime} and #{record.endTime} + </if> + + <if test="record.beaultId != null and record.beaultId!=''"> + and FIND_IN_SET(#{record.beaultId}, a.BEATUY_ID) + </if> + group by a.PHONE + <if test="pageVo !=null"><!-- 判断pageVo对象是否为空 --> + <if test="pageVo.sort !=null and pageVo.order !=null"> + order by + ${pageVo.sort} ${pageVo.order} + </if> + <if test="pageVo.offset >=0 and pageVo.limit >0"> + limit + #{pageVo.offset},#{pageVo.limit} + </if> + </if> + </select> + + <select id="selectVipConsumeStatisticsTotal" resultType="java.lang.Integer"> + select count(1) + from sys_vip_info a + inner join ( + select vip_id,datatime, sum(a.free_consume) freeConsume, sum(a.his_consume) hisConsume, sum(IFNULL(goods_cash, 0) + IFNULL(card_cash, 0)) buyConsume from achieve_new a group by vip_id + ) b on a.ID = b.vip_id + inner join ( + select vip_id, count(1) cnt from ( + select vip_id, date_format(datatime, '%Y-%m-%d') + from achieve_new + group by date_format(datatime, '%Y-%m-%d'), vip_id + ) c group by vip_id + ) d on a.ID=d.vip_id + + left join sys_users e on find_in_set(e.su_id, a.BEATUY_ID) + where 1=1 + <if test="record.vipName != null and record.vipName !=''"> + and (a.vip_name like CONCAT(CONCAT('%', #{record.vipName}), '%') or a.vip_no=#{record.vipName} or a.phone = #{record.vipName}) + </if> + <if test="record.shopId != null"> + and a.shop_id=#{record.shopId} + </if> + <if test="record.beginTime != null and record.endTime!=null"> + and date_format(b.datatime, '%Y-%m-%d') between #{record.beginTime} and #{record.endTime} + </if> + + <if test="record.beaultId != null and record.beaultId!=''"> + and FIND_IN_SET(#{record.beaultId}, a.BEATUY_ID) + </if> + </select> </mapper> \ No newline at end of file diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml index b03d791..b632b39 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml @@ -517,9 +517,9 @@ and c.shop_id =#{shopId} </if> <if test="vipQueryKey != null and vipQueryKey != '' "> - and e.VIP_NAME like concat('%',#{vipQueryKey},'%') - or (e.VIP_NO like concat('%',#{vipQueryKey},'%') - or e.PHONE like concat('%',#{vipQueryKey},'%') + and c.VIP_NAME like concat('%',#{vipQueryKey},'%') + or (c.VIP_NO like concat('%',#{vipQueryKey},'%') + or c.PHONE like concat('%',#{vipQueryKey},'%') ) </if> <if test="goodsName != null and goodsName != '' "> diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml index 09060f2..31bf0dc 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml @@ -86,6 +86,12 @@ <result property="goodsSortName" column="goodsSortName" /> + <result property="payMethods" column="pay_methods" /> + <result property="invalidTime" column="invalid_time" /> + <result property="useValid" column="use_valid" /> + <result property="buyValid" column="buy_valid" /> + <result property="isInfinite" column="is_infinite" /> + </resultMap> @@ -290,7 +296,12 @@ use_shop, headquarters, is_del, - zjm + zjm, + buy_valid, + use_valid, + invalid_time, + pay_methods, + is_infinite ) VALUES ( #{id}, @@ -346,7 +357,12 @@ #{useShop}, #{headquarters}, #{isDel}, - #{zjm} + #{zjm}, + #{buyValid}, + #{useValid}, + #{invalidTime}, + #{payMethods}, + #{isInfinite} ) </insert> @@ -519,8 +535,13 @@ <if test="isDel != null and isDel !='' "> is_del = #{isDel}, </if> - - + <if test="isInfinite != null and isInfinite !='' "> + is_infinite = #{isInfinite}, + </if> + invalid_time = #{invalidTime}, + buy_valid = #{buyValid}, + use_valid = #{useValid}, + pay_methods = #{payMethods}, </set> WHERE id=#{id} </update> diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml index 14241e6..baafcdc 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml @@ -355,9 +355,9 @@ SERVICES_ID, EXC_TIME, extract, - a.puse_id, - a.count, - a.proj_id + puse_id, + count, + proj_id </sql> <sql id="from"> from sys_beautician_state @@ -614,4 +614,17 @@ group by c.id,f.id) t </select> + <select id="selectByProjUse" resultMap="SysBeauticianStateMap"> + select * from sys_beautician_state + where state!=#{state} and puse_id in + <foreach collection="list" index="index" item="item" open="(" + separator="," close=")"> + #{item.id} + </foreach> + </select> + + <select id="selectBeauticianStateByPuseIdAndNoStatus" resultMap="SysBeauticianStateMap"> + select * from sys_beautician_state + where puse_id=#{puseId} and state!=#{state} + </select> </mapper> \ No newline at end of file diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml index 7569362..237c65c 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml @@ -465,4 +465,14 @@ </sql> + <select id="selectVipOrderInfoTotal" resultType="com.matrix.system.hive.bean.SysOrder"> + select + sum(ZK_TOTAL) zkTotal, + count(1) times, + MAX(pay_time) payTime, + GROUP_CONCAT(DISTINCT t2.shop_short_name) shopName + from sys_order t1 + left join sys_shop_info t2 on t1.SHOP_ID=t2.ID + where VIP_ID=#{vipId} and STATU='已付款'; + </select> </mapper> \ No newline at end of file diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml index 3914259..8dd31a1 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml @@ -179,6 +179,9 @@ <if test="deductionNum != null "> deductionNum = #{deductionNum}, </if> + <if test="failTime != null "> + fail_time = #{failTime}, + </if> </set> WHERE ID = #{id} diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysSkinCheckRecordDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysSkinCheckRecordDao.xml index 45a2a01..73519e7 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysSkinCheckRecordDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysSkinCheckRecordDao.xml @@ -294,6 +294,9 @@ <if test="(record.telphone!=null and record.telphone!='') or (record.telphone!='' and record.telphone==0) "> and telphone = #{record.telphone} </if> + <if test="record.beginTime != null and record.endTime!=null"> + and (date(check_time) between #{record.beginTime} and #{record.endTime}) + </if> </if> </where> <if test="pageVo !=null"><!-- 判断pageVo对象是否为空 --> @@ -331,6 +334,9 @@ <if test="(record.telphone!=null and record.telphone!='') or (record.telphone!='' and record.telphone==0) "> and telphone = #{record.telphone} </if> + <if test="record.beginTime != null and record.endTime!=null"> + and (date(check_time) between #{record.beginTime} and #{record.endTime}) + </if> </if> </where> </select> diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysStoreInfoDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysStoreInfoDao.xml index 1af5845..df354d5 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysStoreInfoDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysStoreInfoDao.xml @@ -657,6 +657,7 @@ FROM ( SELECT + b.id id, b.create_time as createTime, e.CODE, e.NAME, @@ -708,6 +709,7 @@ UNION ALL SELECT + t2_b.id id, t2_b.create_time, t2_e.CODE, t2_e.NAME, diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipLabelDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipLabelDao.xml new file mode 100644 index 0000000..aa566df --- /dev/null +++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipLabelDao.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + +<mapper namespace="com.matrix.system.hive.dao.SysVipLabelDao"> + <insert id="insert" parameterType="com.matrix.system.hive.bean.SysVipLabel" useGeneratedKeys="true" + keyProperty="id"> + insert sys_vip_label ( + create_time, + create_by, + id, + vip_id, + label + ) values ( + #{createTime}, + #{createBy}, + #{id}, + #{vipId}, + #{label} + ) + </insert> + + <delete id="deleteById"> + delete from sys_vip_label + where id=#{id} + </delete> + + + <select id="selectByVipId" resultType="com.matrix.system.hive.bean.SysVipLabel"> + select * + from sys_vip_label + where vip_id=#{vipId} + </select> + + <select id="selectByModel" resultType="com.matrix.system.hive.bean.SysVipLabel"> + select * from sys_vip_label + where 1=1 + <if test="record!=null"> + <if test="record.label!=null and record.label!=''"> + and label=#{record.label} + </if> + <if test="record.vipId!=null"> + and vip_id=#{record.vipId} + </if> + </if> + </select> +</mapper> \ No newline at end of file diff --git a/zq-erp/src/main/resources/static/js/plugin/moment.mini.js b/zq-erp/src/main/resources/static/js/plugin/moment.mini.js new file mode 100644 index 0000000..57cd2d4 --- /dev/null +++ b/zq-erp/src/main/resources/static/js/plugin/moment.mini.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,i;function f(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(m(e,t))return;return 1}function r(e){return void 0===e}function h(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function a(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){for(var n=[],s=0;s<e.length;++s)n.push(t(e[s],s));return n}function c(e,t){for(var n in t)m(t,n)&&(e[n]=t[n]);return m(t,"toString")&&(e.toString=t.toString),m(t,"valueOf")&&(e.valueOf=t.valueOf),e}function _(e,t,n,s){return xt(e,t,n,s,!0).utc()}function y(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function g(e){if(null==e._isValid){var t=y(e),n=i.call(t.parsedDateParts,function(e){return null!=e}),s=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return s;e._isValid=s}return e._isValid}function w(e){var t=_(NaN);return null!=e?c(y(t),e):y(t).userInvalidated=!0,t}i=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1};var p=f.momentProperties=[],t=!1;function v(e,t){var n,s,i;if(r(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),r(t._i)||(e._i=t._i),r(t._f)||(e._f=t._f),r(t._l)||(e._l=t._l),r(t._strict)||(e._strict=t._strict),r(t._tzm)||(e._tzm=t._tzm),r(t._isUTC)||(e._isUTC=t._isUTC),r(t._offset)||(e._offset=t._offset),r(t._pf)||(e._pf=y(t)),r(t._locale)||(e._locale=t._locale),0<p.length)for(n=0;n<p.length;n++)r(i=t[s=p[n]])||(e[s]=i);return e}function k(e){v(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===t&&(t=!0,f.updateOffset(this),t=!1)}function M(e){return e instanceof k||null!=e&&null!=e._isAMomentObject}function D(e){!1===f.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function n(i,r){var a=!0;return c(function(){if(null!=f.deprecationHandler&&f.deprecationHandler(null,i),a){for(var e,t,n=[],s=0;s<arguments.length;s++){if(e="","object"==typeof arguments[s]){for(t in e+="\n["+s+"] ",arguments[0])m(arguments[0],t)&&(e+=t+": "+arguments[0][t]+", ");e=e.slice(0,-2)}else e=arguments[s];n.push(e)}D(i+"\nArguments: "+Array.prototype.slice.call(n).join("")+"\n"+(new Error).stack),a=!1}return r.apply(this,arguments)},r)}var s,S={};function Y(e,t){null!=f.deprecationHandler&&f.deprecationHandler(e,t),S[e]||(D(t),S[e]=!0)}function O(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function b(e,t){var n,s=c({},e);for(n in t)m(t,n)&&(u(e[n])&&u(t[n])?(s[n]={},c(s[n],e[n]),c(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)m(e,n)&&!m(t,n)&&u(e[n])&&(s[n]=c({},s[n]));return s}function x(e){null!=e&&this.set(e)}f.suppressDeprecationWarnings=!1,f.deprecationHandler=null,s=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)m(e,t)&&n.push(t);return n};function T(e,t,n){var s=""+Math.abs(e),i=t-s.length;return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,P=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,R={},W={};function C(e,t,n,s){var i="string"==typeof s?function(){return this[s]()}:s;e&&(W[e]=i),t&&(W[t[0]]=function(){return T(i.apply(this,arguments),t[1],t[2])}),n&&(W[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function U(e,t){return e.isValid()?(t=H(t,e.localeData()),R[t]=R[t]||function(s){for(var e,i=s.match(N),t=0,r=i.length;t<r;t++)W[i[t]]?i[t]=W[i[t]]:i[t]=(e=i[t]).match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"");return function(e){for(var t="",n=0;n<r;n++)t+=O(i[n])?i[n].call(e,s):i[n];return t}}(t),R[t](e)):e.localeData().invalidDate()}function H(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(P.lastIndex=0;0<=n&&P.test(e);)e=e.replace(P,s),P.lastIndex=0,--n;return e}var F={};function L(e,t){var n=e.toLowerCase();F[n]=F[n+"s"]=F[t]=e}function V(e){return"string"==typeof e?F[e]||F[e.toLowerCase()]:void 0}function G(e){var t,n,s={};for(n in e)m(e,n)&&(t=V(n))&&(s[t]=e[n]);return s}var E={};function A(e,t){E[e]=t}function j(e){return e%4==0&&e%100!=0||e%400==0}function I(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Z(e){var t=+e,n=0;return 0!=t&&isFinite(t)&&(n=I(t)),n}function z(t,n){return function(e){return null!=e?(q(this,t,e),f.updateOffset(this,n),this):$(this,t)}}function $(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function q(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&j(e.year())&&1===e.month()&&29===e.date()?(n=Z(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),xe(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var B,J=/\d/,Q=/\d\d/,X=/\d{3}/,K=/\d{4}/,ee=/[+-]?\d{6}/,te=/\d\d?/,ne=/\d\d\d\d?/,se=/\d\d\d\d\d\d?/,ie=/\d{1,3}/,re=/\d{1,4}/,ae=/[+-]?\d{1,6}/,oe=/\d+/,ue=/[+-]?\d+/,le=/Z|[+-]\d\d:?\d\d/gi,he=/Z|[+-]\d\d(?::?\d\d)?/gi,de=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function ce(e,n,s){B[e]=O(n)?n:function(e,t){return e&&s?s:n}}function fe(e,t){return m(B,e)?B[e](t._strict,t._locale):new RegExp(me(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function me(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}B={};var _e={};function ye(e,n){var t,s=n;for("string"==typeof e&&(e=[e]),h(n)&&(s=function(e,t){t[n]=Z(e)}),t=0;t<e.length;t++)_e[e[t]]=s}function ge(e,i){ye(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}var we,pe=0,ve=1,ke=2,Me=3,De=4,Se=5,Ye=6,Oe=7,be=8;function xe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,s=(t%(n=12)+n)%n;return e+=(t-s)/12,1==s?j(e)?29:28:31-s%7%2}we=Array.prototype.indexOf?Array.prototype.indexOf:function(e){for(var t=0;t<this.length;++t)if(this[t]===e)return t;return-1},C("M",["MM",2],"Mo",function(){return this.month()+1}),C("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),C("MMMM",0,0,function(e){return this.localeData().months(this,e)}),L("month","M"),A("month",8),ce("M",te),ce("MM",te,Q),ce("MMM",function(e,t){return t.monthsShortRegex(e)}),ce("MMMM",function(e,t){return t.monthsRegex(e)}),ye(["M","MM"],function(e,t){t[ve]=Z(e)-1}),ye(["MMM","MMMM"],function(e,t,n,s){var i=n._locale.monthsParse(e,s,n._strict);null!=i?t[ve]=i:y(n).invalidMonth=e});var Te="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ne="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Pe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Re=de,We=de;function Ce(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=Z(t);else if(!h(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),xe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Ue(e){return null!=e?(Ce(this,e),f.updateOffset(this,!0),this):$(this,"Month")}function He(){function e(e,t){return t.length-e.length}for(var t,n=[],s=[],i=[],r=0;r<12;r++)t=_([2e3,r]),n.push(this.monthsShort(t,"")),s.push(this.months(t,"")),i.push(this.months(t,"")),i.push(this.monthsShort(t,""));for(n.sort(e),s.sort(e),i.sort(e),r=0;r<12;r++)n[r]=me(n[r]),s[r]=me(s[r]);for(r=0;r<24;r++)i[r]=me(i[r]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function Fe(e){return j(e)?366:365}C("Y",0,0,function(){var e=this.year();return e<=9999?T(e,4):"+"+e}),C(0,["YY",2],0,function(){return this.year()%100}),C(0,["YYYY",4],0,"year"),C(0,["YYYYY",5],0,"year"),C(0,["YYYYYY",6,!0],0,"year"),L("year","y"),A("year",1),ce("Y",ue),ce("YY",te,Q),ce("YYYY",re,K),ce("YYYYY",ae,ee),ce("YYYYYY",ae,ee),ye(["YYYYY","YYYYYY"],pe),ye("YYYY",function(e,t){t[pe]=2===e.length?f.parseTwoDigitYear(e):Z(e)}),ye("YY",function(e,t){t[pe]=f.parseTwoDigitYear(e)}),ye("Y",function(e,t){t[pe]=parseInt(e,10)}),f.parseTwoDigitYear=function(e){return Z(e)+(68<Z(e)?1900:2e3)};var Le=z("FullYear",!0);function Ve(e){var t,n;return e<100&&0<=e?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ge(e,t,n){var s=7+t-n;return s-(7+Ve(e,0,s).getUTCDay()-t)%7-1}function Ee(e,t,n,s,i){var r,a=1+7*(t-1)+(7+n-s)%7+Ge(e,s,i),o=a<=0?Fe(r=e-1)+a:a>Fe(e)?(r=e+1,a-Fe(e)):(r=e,a);return{year:r,dayOfYear:o}}function Ae(e,t,n){var s,i,r=Ge(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+je(i=e.year()-1,t,n):a>je(e.year(),t,n)?(s=a-je(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function je(e,t,n){var s=Ge(e,t,n),i=Ge(e+1,t,n);return(Fe(e)-s+i)/7}C("w",["ww",2],"wo","week"),C("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),A("week",5),A("isoWeek",5),ce("w",te),ce("ww",te,Q),ce("W",te),ce("WW",te,Q),ge(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=Z(e)});function Ie(e,t){return e.slice(t,7).concat(e.slice(0,t))}C("d",0,"do","day"),C("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),C("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),C("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),C("e",0,0,"weekday"),C("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),A("day",11),A("weekday",11),A("isoWeekday",11),ce("d",te),ce("e",te),ce("E",te),ce("dd",function(e,t){return t.weekdaysMinRegex(e)}),ce("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ce("dddd",function(e,t){return t.weekdaysRegex(e)}),ge(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:y(n).invalidWeekday=e}),ge(["d","e","E"],function(e,t,n,s){t[s]=Z(e)});var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$e="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),qe=de,Be=de,Je=de;function Qe(){function e(e,t){return t.length-e.length}for(var t,n,s,i,r=[],a=[],o=[],u=[],l=0;l<7;l++)t=_([2e3,1]).day(l),n=me(this.weekdaysMin(t,"")),s=me(this.weekdaysShort(t,"")),i=me(this.weekdays(t,"")),r.push(n),a.push(s),o.push(i),u.push(n),u.push(s),u.push(i);r.sort(e),a.sort(e),o.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Xe(){return this.hours()%12||12}function Ke(e,t){C(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function et(e,t){return t._meridiemParse}C("H",["HH",2],0,"hour"),C("h",["hh",2],0,Xe),C("k",["kk",2],0,function(){return this.hours()||24}),C("hmm",0,0,function(){return""+Xe.apply(this)+T(this.minutes(),2)}),C("hmmss",0,0,function(){return""+Xe.apply(this)+T(this.minutes(),2)+T(this.seconds(),2)}),C("Hmm",0,0,function(){return""+this.hours()+T(this.minutes(),2)}),C("Hmmss",0,0,function(){return""+this.hours()+T(this.minutes(),2)+T(this.seconds(),2)}),Ke("a",!0),Ke("A",!1),L("hour","h"),A("hour",13),ce("a",et),ce("A",et),ce("H",te),ce("h",te),ce("k",te),ce("HH",te,Q),ce("hh",te,Q),ce("kk",te,Q),ce("hmm",ne),ce("hmmss",se),ce("Hmm",ne),ce("Hmmss",se),ye(["H","HH"],Me),ye(["k","kk"],function(e,t,n){var s=Z(e);t[Me]=24===s?0:s}),ye(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ye(["h","hh"],function(e,t,n){t[Me]=Z(e),y(n).bigHour=!0}),ye("hmm",function(e,t,n){var s=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s)),y(n).bigHour=!0}),ye("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s,2)),t[Se]=Z(e.substr(i)),y(n).bigHour=!0}),ye("Hmm",function(e,t,n){var s=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s))}),ye("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s,2)),t[Se]=Z(e.substr(i))});var tt=z("Hours",!0);var nt,st={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Te,monthsShort:Ne,week:{dow:0,doy:6},weekdays:Ze,weekdaysMin:$e,weekdaysShort:ze,meridiemParse:/[ap]\.?m?\.?/i},it={},rt={};function at(e){return e?e.toLowerCase().replace("_","-"):e}function ot(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=at(e[r]).split("-")).length,n=(n=at(e[r+1]))?n.split("-"):null;0<t;){if(s=ut(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s<n;s+=1)if(e[s]!==t[s])return s;return n}(i,n)>=t-1)break;t--}r++}return nt}function ut(t){var e;if(void 0===it[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=nt._abbr,require("./locale/"+t),lt(e)}catch(e){it[t]=null}return it[t]}function lt(e,t){var n;return e&&((n=r(t)?dt(e):ht(e,t))?nt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),nt._abbr}function ht(e,t){if(null===t)return delete it[e],null;var n,s=st;if(t.abbr=e,null!=it[e])Y("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=it[e]._config;else if(null!=t.parentLocale)if(null!=it[t.parentLocale])s=it[t.parentLocale]._config;else{if(null==(n=ut(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return it[e]=new x(b(s,t)),rt[e]&&rt[e].forEach(function(e){ht(e.name,e.config)}),lt(e),it[e]}function dt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return nt;if(!o(e)){if(t=ut(e))return t;e=[e]}return ot(e)}function ct(e){var t,n=e._a;return n&&-2===y(e).overflow&&(t=n[ve]<0||11<n[ve]?ve:n[ke]<1||n[ke]>xe(n[pe],n[ve])?ke:n[Me]<0||24<n[Me]||24===n[Me]&&(0!==n[De]||0!==n[Se]||0!==n[Ye])?Me:n[De]<0||59<n[De]?De:n[Se]<0||59<n[Se]?Se:n[Ye]<0||999<n[Ye]?Ye:-1,y(e)._overflowDayOfYear&&(t<pe||ke<t)&&(t=ke),y(e)._overflowWeeks&&-1===t&&(t=Oe),y(e)._overflowWeekday&&-1===t&&(t=be),y(e).overflow=t),e}var ft=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,mt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/Z|[+-]\d\d(?::?\d\d)?/,yt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],gt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],wt=/^\/?Date\((-?\d+)/i,pt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,vt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function kt(e){var t,n,s,i,r,a,o=e._i,u=ft.exec(o)||mt.exec(o);if(u){for(y(e).iso=!0,t=0,n=yt.length;t<n;t++)if(yt[t][1].exec(u[1])){i=yt[t][0],s=!1!==yt[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=gt.length;t<n;t++)if(gt[t][1].exec(u[3])){r=(u[2]||" ")+gt[t][0];break}if(null==r)return void(e._isValid=!1)}if(!s&&null!=r)return void(e._isValid=!1);if(u[4]){if(!_t.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),Ot(e)}else e._isValid=!1}function Mt(e,t,n,s,i,r){var a=[function(e){var t=parseInt(e,10);{if(t<=49)return 2e3+t;if(t<=999)return 1900+t}return t}(e),Ne.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&a.push(parseInt(r,10)),a}function Dt(e){var t,n,s,i,r=pt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(r){if(t=Mt(r[4],r[3],r[2],r[5],r[6],r[7]),n=r[1],s=t,i=e,n&&ze.indexOf(n)!==new Date(s[0],s[1],s[2]).getDay()&&(y(i).weekdayMismatch=!0,!void(i._isValid=!1)))return;e._a=t,e._tzm=function(e,t,n){if(e)return vt[e];if(t)return 0;var s=parseInt(n,10),i=s%100;return 60*((s-i)/100)+i}(r[8],r[9],r[10]),e._d=Ve.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),y(e).rfc2822=!0}else e._isValid=!1}function St(e,t,n){return null!=e?e:null!=t?t:n}function Yt(e){var t,n,s,i,r,a,o,u=[];if(!e._d){for(a=e,o=new Date(f.now()),s=a._useUTC?[o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()]:[o.getFullYear(),o.getMonth(),o.getDate()],e._w&&null==e._a[ke]&&null==e._a[ve]&&function(e){var t,n,s,i,r,a,o,u,l;null!=(t=e._w).GG||null!=t.W||null!=t.E?(r=1,a=4,n=St(t.GG,e._a[pe],Ae(Tt(),1,4).year),s=St(t.W,1),((i=St(t.E,1))<1||7<i)&&(u=!0)):(r=e._locale._week.dow,a=e._locale._week.doy,l=Ae(Tt(),r,a),n=St(t.gg,e._a[pe],l.year),s=St(t.w,l.week),null!=t.d?((i=t.d)<0||6<i)&&(u=!0):null!=t.e?(i=t.e+r,(t.e<0||6<t.e)&&(u=!0)):i=r);s<1||s>je(n,r,a)?y(e)._overflowWeeks=!0:null!=u?y(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[pe]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=St(e._a[pe],s[pe]),(e._dayOfYear>Fe(r)||0===e._dayOfYear)&&(y(e)._overflowDayOfYear=!0),n=Ve(r,0,e._dayOfYear),e._a[ve]=n.getUTCMonth(),e._a[ke]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=u[t]=s[t];for(;t<7;t++)e._a[t]=u[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Me]&&0===e._a[De]&&0===e._a[Se]&&0===e._a[Ye]&&(e._nextDay=!0,e._a[Me]=0),e._d=(e._useUTC?Ve:function(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}).apply(null,u),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Me]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(y(e).weekdayMismatch=!0)}}function Ot(e){if(e._f!==f.ISO_8601)if(e._f!==f.RFC_2822){e._a=[],y(e).empty=!0;for(var t,n,s,i,r,a,o,u=""+e._i,l=u.length,h=0,d=H(e._f,e._locale).match(N)||[],c=0;c<d.length;c++)n=d[c],(t=(u.match(fe(n,e))||[])[0])&&(0<(s=u.substr(0,u.indexOf(t))).length&&y(e).unusedInput.push(s),u=u.slice(u.indexOf(t)+t.length),h+=t.length),W[n]?(t?y(e).empty=!1:y(e).unusedTokens.push(n),r=n,o=e,null!=(a=t)&&m(_e,r)&&_e[r](a,o._a,o,r)):e._strict&&!t&&y(e).unusedTokens.push(n);y(e).charsLeftOver=l-h,0<u.length&&y(e).unusedInput.push(u),e._a[Me]<=12&&!0===y(e).bigHour&&0<e._a[Me]&&(y(e).bigHour=void 0),y(e).parsedDateParts=e._a.slice(0),y(e).meridiem=e._meridiem,e._a[Me]=function(e,t,n){var s;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):(null!=e.isPM&&((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0)),t)}(e._locale,e._a[Me],e._meridiem),null!==(i=y(e).era)&&(e._a[pe]=e._locale.erasConvertYear(i,e._a[pe])),Yt(e),ct(e)}else Dt(e);else kt(e)}function bt(e){var t,n,s=e._i,i=e._f;return e._locale=e._locale||dt(e._l),null===s||void 0===i&&""===s?w({nullInput:!0}):("string"==typeof s&&(e._i=s=e._locale.preparse(s)),M(s)?new k(ct(s)):(a(s)?e._d=s:o(i)?function(e){var t,n,s,i,r,a,o=!1;if(0===e._f.length)return y(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<e._f.length;i++)r=0,a=!1,t=v({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],Ot(t),g(t)&&(a=!0),r+=y(t).charsLeftOver,r+=10*y(t).unusedTokens.length,y(t).score=r,o?r<s&&(s=r,n=t):(null==s||r<s||a)&&(s=r,n=t,a&&(o=!0));c(e,n||t)}(e):i?Ot(e):r(n=(t=e)._i)?t._d=new Date(f.now()):a(n)?t._d=new Date(n.valueOf()):"string"==typeof n?function(e){var t=wt.exec(e._i);null===t?(kt(e),!1===e._isValid&&(delete e._isValid,Dt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:f.createFromInputFallback(e)))):e._d=new Date(+t[1])}(t):o(n)?(t._a=d(n.slice(0),function(e){return parseInt(e,10)}),Yt(t)):u(n)?function(e){var t,n;e._d||(n=void 0===(t=G(e._i)).day?t.date:t.day,e._a=d([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),Yt(e))}(t):h(n)?t._d=new Date(n):f.createFromInputFallback(t),g(e)||(e._d=null),e))}function xt(e,t,n,s,i){var r,a={};return!0!==t&&!1!==t||(s=t,t=void 0),!0!==n&&!1!==n||(s=n,n=void 0),(u(e)&&l(e)||o(e)&&0===e.length)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=s,(r=new k(ct(bt(a))))._nextDay&&(r.add(1,"d"),r._nextDay=void 0),r}function Tt(e,t,n,s){return xt(e,t,n,s,!1)}f.createFromInputFallback=n("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),f.ISO_8601=function(){},f.RFC_2822=function(){};var Nt=n("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:w()}),Pt=n("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:w()});function Rt(e,t){var n,s;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Tt();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Wt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ct(e){var t=G(e),n=t.year||0,s=t.quarter||0,i=t.month||0,r=t.week||t.isoWeek||0,a=t.day||0,o=t.hour||0,u=t.minute||0,l=t.second||0,h=t.millisecond||0;this._isValid=function(e){var t,n,s=!1;for(t in e)if(m(e,t)&&(-1===we.call(Wt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<Wt.length;++n)if(e[Wt[n]]){if(s)return!1;parseFloat(e[Wt[n]])!==Z(e[Wt[n]])&&(s=!0)}return!0}(t),this._milliseconds=+h+1e3*l+6e4*u+1e3*o*60*60,this._days=+a+7*r,this._months=+i+3*s+12*n,this._data={},this._locale=dt(),this._bubble()}function Ut(e){return e instanceof Ct}function Ht(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){C(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+T(~~(e/60),2)+n+T(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),ce("Z",he),ce("ZZ",he),ye(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Vt(he,e)});var Lt=/([\+\-]|\d\d)/gi;function Vt(e,t){var n,s,i=(t||"").match(e);return null===i?null:0===(s=60*(n=((i[i.length-1]||[])+"").match(Lt)||["-",0,0])[1]+Z(n[2]))?0:"+"===n[0]?s:-s}function Gt(e,t){var n,s;return t._isUTC?(n=t.clone(),s=(M(e)||a(e)?e.valueOf():Tt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+s),f.updateOffset(n,!1),n):Tt(e).local()}function Et(e){return-Math.round(e._d.getTimezoneOffset())}function At(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}f.updateOffset=function(){};var jt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,It=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Zt(e,t){var n,s,i,r=e,a=null;return Ut(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:h(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(a=jt.exec(e))?(n="-"===a[1]?-1:1,r={y:0,d:Z(a[ke])*n,h:Z(a[Me])*n,m:Z(a[De])*n,s:Z(a[Se])*n,ms:Z(Ht(1e3*a[Ye]))*n}):(a=It.exec(e))?(n="-"===a[1]?-1:1,r={y:zt(a[2],n),M:zt(a[3],n),w:zt(a[4],n),d:zt(a[5],n),h:zt(a[6],n),m:zt(a[7],n),s:zt(a[8],n)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(i=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Gt(t,e),e.isBefore(t)?n=$t(e,t):((n=$t(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Tt(r.from),Tt(r.to)),(r={}).ms=i.milliseconds,r.M=i.months),s=new Ct(r),Ut(e)&&m(e,"_locale")&&(s._locale=e._locale),Ut(e)&&m(e,"_isValid")&&(s._isValid=e._isValid),s}function zt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function $t(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=t-e.clone().add(n.months,"M"),n}function qt(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(Y(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),Bt(this,Zt(e,t),s),this}}function Bt(e,t,n,s){var i=t._milliseconds,r=Ht(t._days),a=Ht(t._months);e.isValid()&&(s=null==s||s,a&&Ce(e,$(e,"Month")+a*n),r&&q(e,"Date",$(e,"Date")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s&&f.updateOffset(e,r||a))}Zt.fn=Ct.prototype,Zt.invalid=function(){return Zt(NaN)};var Jt=qt(1,"add"),Qt=qt(-1,"subtract");function Xt(e){return"string"==typeof e||e instanceof String}function Kt(e){return M(e)||a(e)||Xt(e)||h(e)||function(t){var e=o(t),n=!1;e&&(n=0===t.filter(function(e){return!h(e)&&Xt(t)}).length);return e&&n}(e)||function(e){var t,n,s=u(e)&&!l(e),i=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(t=0;t<r.length;t+=1)n=r[t],i=i||m(e,n);return s&&i}(e)||null==e}function en(e,t){if(e.date()<t.date())return-en(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(n,"months"),i=t-s<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(1+n,"months")-s);return-(n+i)||0}function tn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=dt(e))&&(this._locale=t),this)}f.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",f.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var nn=n("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function sn(){return this._locale}var rn=126227808e5;function an(e,t){return(e%t+t)%t}function on(e,t,n){return e<100&&0<=e?new Date(e+400,t,n)-rn:new Date(e,t,n).valueOf()}function un(e,t,n){return e<100&&0<=e?Date.UTC(e+400,t,n)-rn:Date.UTC(e,t,n)}function ln(e,t){return t.erasAbbrRegex(e)}function hn(){for(var e=[],t=[],n=[],s=[],i=this.eras(),r=0,a=i.length;r<a;++r)t.push(me(i[r].name)),e.push(me(i[r].abbr)),n.push(me(i[r].narrow)),s.push(me(i[r].name)),s.push(me(i[r].abbr)),s.push(me(i[r].narrow));this._erasRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}function dn(e,t){C(0,[e,e.length],0,t)}function cn(e,t,n,s,i){var r;return null==e?Ae(this,s,i).year:((r=je(e,s,i))<t&&(t=r),function(e,t,n,s,i){var r=Ee(e,t,n,s,i),a=Ve(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,s,i))}C("N",0,0,"eraAbbr"),C("NN",0,0,"eraAbbr"),C("NNN",0,0,"eraAbbr"),C("NNNN",0,0,"eraName"),C("NNNNN",0,0,"eraNarrow"),C("y",["y",1],"yo","eraYear"),C("y",["yy",2],0,"eraYear"),C("y",["yyy",3],0,"eraYear"),C("y",["yyyy",4],0,"eraYear"),ce("N",ln),ce("NN",ln),ce("NNN",ln),ce("NNNN",function(e,t){return t.erasNameRegex(e)}),ce("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),ye(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,s){var i=n._locale.erasParse(e,s,n._strict);i?y(n).era=i:y(n).invalidEra=e}),ce("y",oe),ce("yy",oe),ce("yyy",oe),ce("yyyy",oe),ce("yo",function(e,t){return t._eraYearOrdinalRegex||oe}),ye(["y","yy","yyy","yyyy"],pe),ye(["yo"],function(e,t,n,s){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[pe]=n._locale.eraYearOrdinalParse(e,i):t[pe]=parseInt(e,10)}),C(0,["gg",2],0,function(){return this.weekYear()%100}),C(0,["GG",2],0,function(){return this.isoWeekYear()%100}),dn("gggg","weekYear"),dn("ggggg","weekYear"),dn("GGGG","isoWeekYear"),dn("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),A("weekYear",1),A("isoWeekYear",1),ce("G",ue),ce("g",ue),ce("GG",te,Q),ce("gg",te,Q),ce("GGGG",re,K),ce("gggg",re,K),ce("GGGGG",ae,ee),ce("ggggg",ae,ee),ge(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=Z(e)}),ge(["gg","GG"],function(e,t,n,s){t[s]=f.parseTwoDigitYear(e)}),C("Q",0,"Qo","quarter"),L("quarter","Q"),A("quarter",7),ce("Q",J),ye("Q",function(e,t){t[ve]=3*(Z(e)-1)}),C("D",["DD",2],"Do","date"),L("date","D"),A("date",9),ce("D",te),ce("DD",te,Q),ce("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ye(["D","DD"],ke),ye("Do",function(e,t){t[ke]=Z(e.match(te)[0])});var fn=z("Date",!0);C("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),A("dayOfYear",4),ce("DDD",ie),ce("DDDD",X),ye(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Z(e)}),C("m",["mm",2],0,"minute"),L("minute","m"),A("minute",14),ce("m",te),ce("mm",te,Q),ye(["m","mm"],De);var mn=z("Minutes",!1);C("s",["ss",2],0,"second"),L("second","s"),A("second",15),ce("s",te),ce("ss",te,Q),ye(["s","ss"],Se);var _n,yn,gn=z("Seconds",!1);for(C("S",0,0,function(){return~~(this.millisecond()/100)}),C(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),C(0,["SSS",3],0,"millisecond"),C(0,["SSSS",4],0,function(){return 10*this.millisecond()}),C(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),C(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),C(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),C(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),C(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),L("millisecond","ms"),A("millisecond",16),ce("S",ie,J),ce("SS",ie,Q),ce("SSS",ie,X),_n="SSSS";_n.length<=9;_n+="S")ce(_n,oe);function wn(e,t){t[Ye]=Z(1e3*("0."+e))}for(_n="S";_n.length<=9;_n+="S")ye(_n,wn);yn=z("Milliseconds",!1),C("z",0,0,"zoneAbbr"),C("zz",0,0,"zoneName");var pn=k.prototype;function vn(e){return e}pn.add=Jt,pn.calendar=function(e,t){1===arguments.length&&(arguments[0]?Kt(arguments[0])?(e=arguments[0],t=void 0):function(e){for(var t=u(e)&&!l(e),n=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i=0;i<s.length;i+=1)n=n||m(e,s[i]);return t&&n}(arguments[0])&&(t=arguments[0],e=void 0):t=e=void 0);var n=e||Tt(),s=Gt(n,this).startOf("day"),i=f.calendarFormat(this,s)||"sameElse",r=t&&(O(t[i])?t[i].call(this,n):t[i]);return this.format(r||this.localeData().calendar(i,this,Tt(n)))},pn.clone=function(){return new k(this)},pn.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Gt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=V(t)){case"year":r=en(this,s)/12;break;case"month":r=en(this,s);break;case"quarter":r=en(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:I(r)},pn.endOf=function(e){var t,n;if(void 0===(e=V(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?un:on,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-an(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-an(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-an(t,1e3)-1;break}return this._d.setTime(t),f.updateOffset(this,!0),this},pn.format=function(e){e=e||(this.isUtc()?f.defaultFormatUtc:f.defaultFormat);var t=U(this,e);return this.localeData().postformat(t)},pn.from=function(e,t){return this.isValid()&&(M(e)&&e.isValid()||Tt(e).isValid())?Zt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},pn.fromNow=function(e){return this.from(Tt(),e)},pn.to=function(e,t){return this.isValid()&&(M(e)&&e.isValid()||Tt(e).isValid())?Zt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},pn.toNow=function(e){return this.to(Tt(),e)},pn.get=function(e){return O(this[e=V(e)])?this[e]():this},pn.invalidAt=function(){return y(this).overflow},pn.isAfter=function(e,t){var n=M(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},pn.isBefore=function(e,t){var n=M(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},pn.isBetween=function(e,t,n,s){var i=M(e)?e:Tt(e),r=M(t)?t:Tt(t);return!!(this.isValid()&&i.isValid()&&r.isValid())&&(("("===(s=s||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===s[1]?this.isBefore(r,n):!this.isAfter(r,n)))},pn.isSame=function(e,t){var n,s=M(e)?e:Tt(e);return!(!this.isValid()||!s.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()===s.valueOf():(n=s.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},pn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},pn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},pn.isValid=function(){return g(this)},pn.lang=nn,pn.locale=tn,pn.localeData=sn,pn.max=Pt,pn.min=Nt,pn.parsingFlags=function(){return c({},y(this))},pn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t,n=[];for(t in e)m(e,t)&&n.push({unit:t,priority:E[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=G(e)),s=0;s<n.length;s++)this[n[s].unit](e[n[s].unit]);else if(O(this[e=V(e)]))return this[e](t);return this},pn.startOf=function(e){var t,n;if(void 0===(e=V(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?un:on,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=an(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=an(t,6e4);break;case"second":t=this._d.valueOf(),t-=an(t,1e3);break}return this._d.setTime(t),f.updateOffset(this,!0),this},pn.subtract=Qt,pn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},pn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},pn.toDate=function(){return new Date(this.valueOf())},pn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||9999<n.year()?U(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):O(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",U(n,"Z")):U(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},pn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,s="moment",i="";return this.isLocal()||(s=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+s+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=i+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(pn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),pn.toJSON=function(){return this.isValid()?this.toISOString():null},pn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},pn.unix=function(){return Math.floor(this.valueOf()/1e3)},pn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},pn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},pn.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].name;if(t[n].until<=e&&e<=t[n].since)return t[n].name}return""},pn.eraNarrow=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].narrow;if(t[n].until<=e&&e<=t[n].since)return t[n].narrow}return""},pn.eraAbbr=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].abbr;if(t[n].until<=e&&e<=t[n].since)return t[n].abbr}return""},pn.eraYear=function(){for(var e,t,n=this.localeData().eras(),s=0,i=n.length;s<i;++s)if(e=n[s].since<=n[s].until?1:-1,t=this.clone().startOf("day").valueOf(),n[s].since<=t&&t<=n[s].until||n[s].until<=t&&t<=n[s].since)return(this.year()-f(n[s].since).year())*e+n[s].offset;return this.year()},pn.year=Le,pn.isLeapYear=function(){return j(this.year())},pn.weekYear=function(e){return cn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},pn.isoWeekYear=function(e){return cn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},pn.quarter=pn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},pn.month=Ue,pn.daysInMonth=function(){return xe(this.year(),this.month())},pn.week=pn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},pn.isoWeek=pn.isoWeeks=function(e){var t=Ae(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},pn.weeksInYear=function(){var e=this.localeData()._week;return je(this.year(),e.dow,e.doy)},pn.weeksInWeekYear=function(){var e=this.localeData()._week;return je(this.weekYear(),e.dow,e.doy)},pn.isoWeeksInYear=function(){return je(this.year(),1,4)},pn.isoWeeksInISOWeekYear=function(){return je(this.isoWeekYear(),1,4)},pn.date=fn,pn.day=pn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-s,"d")):s},pn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},pn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null==e)return this.day()||7;var t,n,s=(t=e,n=this.localeData(),"string"==typeof t?n.weekdaysParse(t)%7||7:isNaN(t)?null:t);return this.day(this.day()%7?s:s-7)},pn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},pn.hour=pn.hours=tt,pn.minute=pn.minutes=mn,pn.second=pn.seconds=gn,pn.millisecond=pn.milliseconds=yn,pn.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?i:Et(this);if("string"==typeof e){if(null===(e=Vt(he,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Et(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),i!==e&&(!t||this._changeInProgress?Bt(this,Zt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,f.updateOffset(this,!0),this._changeInProgress=null)),this},pn.utc=function(e){return this.utcOffset(0,e)},pn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Et(this),"m")),this},pn.parseZone=function(){var e;return null!=this._tzm?this.utcOffset(this._tzm,!1,!0):"string"==typeof this._i&&(null!=(e=Vt(le,this._i))?this.utcOffset(e):this.utcOffset(0,!0)),this},pn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Tt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},pn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},pn.isLocal=function(){return!!this.isValid()&&!this._isUTC},pn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},pn.isUtc=At,pn.isUTC=At,pn.zoneAbbr=function(){return this._isUTC?"UTC":""},pn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},pn.dates=n("dates accessor is deprecated. Use date instead.",fn),pn.months=n("months accessor is deprecated. Use month instead",Ue),pn.years=n("years accessor is deprecated. Use year instead",Le),pn.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),pn.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!r(this._isDSTShifted))return this._isDSTShifted;var e,t={};return v(t,this),(t=bt(t))._a?(e=(t._isUTC?_:Tt)(t._a),this._isDSTShifted=this.isValid()&&0<function(e,t,n){for(var s=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),r=0,a=0;a<s;a++)(n&&e[a]!==t[a]||!n&&Z(e[a])!==Z(t[a]))&&r++;return r+i}(t._a,e.toArray())):this._isDSTShifted=!1,this._isDSTShifted});var kn=x.prototype;function Mn(e,t,n,s){var i=dt(),r=_().set(s,t);return i[n](r,e)}function Dn(e,t,n){if(h(e)&&(t=e,e=void 0),e=e||"",null!=t)return Mn(e,t,n,"month");for(var s=[],i=0;i<12;i++)s[i]=Mn(e,i,n,"month");return s}function Sn(e,t,n,s){t=("boolean"==typeof e?h(t)&&(n=t,t=void 0):(t=e,e=!1,h(n=t)&&(n=t,t=void 0)),t||"");var i,r=dt(),a=e?r._week.dow:0,o=[];if(null!=n)return Mn(t,(n+a)%7,s,"day");for(i=0;i<7;i++)o[i]=Mn(t,(i+a)%7,s,"day");return o}kn.calendar=function(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return O(s)?s.call(t,n):s},kn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(N).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},kn.invalidDate=function(){return this._invalidDate},kn.ordinal=function(e){return this._ordinal.replace("%d",e)},kn.preparse=vn,kn.postformat=vn,kn.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return O(i)?i(e,t,n,s):i.replace(/%d/i,e)},kn.pastFuture=function(e,t){var n=this._relativeTime[0<e?"future":"past"];return O(n)?n(t):n.replace(/%s/i,t)},kn.set=function(e){var t,n;for(n in e)m(e,n)&&(O(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},kn.eras=function(e,t){for(var n,s=this._eras||dt("en")._eras,i=0,r=s.length;i<r;++i){switch(typeof s[i].since){case"string":n=f(s[i].since).startOf("day"),s[i].since=n.valueOf();break}switch(typeof s[i].until){case"undefined":s[i].until=1/0;break;case"string":n=f(s[i].until).startOf("day").valueOf(),s[i].until=n.valueOf();break}}return s},kn.erasParse=function(e,t,n){var s,i,r,a,o,u=this.eras();for(e=e.toUpperCase(),s=0,i=u.length;s<i;++s)if(r=u[s].name.toUpperCase(),a=u[s].abbr.toUpperCase(),o=u[s].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return u[s];break;case"NNNN":if(r===e)return u[s];break;case"NNNNN":if(o===e)return u[s];break}else if(0<=[r,a,o].indexOf(e))return u[s]},kn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?f(e.since).year():f(e.since).year()+(t-e.offset)*n},kn.erasAbbrRegex=function(e){return m(this,"_erasAbbrRegex")||hn.call(this),e?this._erasAbbrRegex:this._erasRegex},kn.erasNameRegex=function(e){return m(this,"_erasNameRegex")||hn.call(this),e?this._erasNameRegex:this._erasRegex},kn.erasNarrowRegex=function(e){return m(this,"_erasNarrowRegex")||hn.call(this),e?this._erasNarrowRegex:this._erasRegex},kn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Pe).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},kn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Pe.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},kn.monthsParse=function(e,t,n){var s,i,r;if(this._monthsParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=_([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=we.call(this._shortMonthsParse,a))?i:null:-1!==(i=we.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=we.call(this._shortMonthsParse,a))||-1!==(i=we.call(this._longMonthsParse,a))?i:null:-1!==(i=we.call(this._longMonthsParse,a))||-1!==(i=we.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=_([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},kn.monthsRegex=function(e){return this._monthsParseExact?(m(this,"_monthsRegex")||He.call(this),e?this._monthsStrictRegex:this._monthsRegex):(m(this,"_monthsRegex")||(this._monthsRegex=We),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},kn.monthsShortRegex=function(e){return this._monthsParseExact?(m(this,"_monthsRegex")||He.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(m(this,"_monthsShortRegex")||(this._monthsShortRegex=Re),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},kn.week=function(e){return Ae(e,this._week.dow,this._week.doy).week},kn.firstDayOfYear=function(){return this._week.doy},kn.firstDayOfWeek=function(){return this._week.dow},kn.weekdays=function(e,t){var n=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Ie(n,this._week.dow):e?n[e.day()]:n},kn.weekdaysMin=function(e){return!0===e?Ie(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},kn.weekdaysShort=function(e){return!0===e?Ie(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},kn.weekdaysParse=function(e,t,n){var s,i,r;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=_([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=we.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=we.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=we.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=we.call(this._weekdaysParse,a))||-1!==(i=we.call(this._shortWeekdaysParse,a))||-1!==(i=we.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=we.call(this._shortWeekdaysParse,a))||-1!==(i=we.call(this._weekdaysParse,a))||-1!==(i=we.call(this._minWeekdaysParse,a))?i:null:-1!==(i=we.call(this._minWeekdaysParse,a))||-1!==(i=we.call(this._weekdaysParse,a))||-1!==(i=we.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=_([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},kn.weekdaysRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(m(this,"_weekdaysRegex")||(this._weekdaysRegex=qe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},kn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(m(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Be),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},kn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(m(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Je),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},kn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},kn.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},lt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===Z(e%100/10)?"th":1==t?"st":2==t?"nd":3==t?"rd":"th")}}),f.lang=n("moment.lang is deprecated. Use moment.locale instead.",lt),f.langData=n("moment.langData is deprecated. Use moment.localeData instead.",dt);var Yn=Math.abs;function On(e,t,n,s){var i=Zt(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function bn(e){return e<0?Math.floor(e):Math.ceil(e)}function xn(e){return 4800*e/146097}function Tn(e){return 146097*e/4800}function Nn(e){return function(){return this.as(e)}}var Pn=Nn("ms"),Rn=Nn("s"),Wn=Nn("m"),Cn=Nn("h"),Un=Nn("d"),Hn=Nn("w"),Fn=Nn("M"),Ln=Nn("Q"),Vn=Nn("y");function Gn(e){return function(){return this.isValid()?this._data[e]:NaN}}var En=Gn("milliseconds"),An=Gn("seconds"),jn=Gn("minutes"),In=Gn("hours"),Zn=Gn("days"),zn=Gn("months"),$n=Gn("years");var qn=Math.round,Bn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Jn(e,t,n,s){var i=Zt(e).abs(),r=qn(i.as("s")),a=qn(i.as("m")),o=qn(i.as("h")),u=qn(i.as("d")),l=qn(i.as("M")),h=qn(i.as("w")),d=qn(i.as("y")),c=(r<=n.ss?["s",r]:r<n.s&&["ss",r])||a<=1&&["m"]||a<n.m&&["mm",a]||o<=1&&["h"]||o<n.h&&["hh",o]||u<=1&&["d"]||u<n.d&&["dd",u];return null!=n.w&&(c=c||h<=1&&["w"]||h<n.w&&["ww",h]),(c=c||l<=1&&["M"]||l<n.M&&["MM",l]||d<=1&&["y"]||["yy",d])[2]=t,c[3]=0<+e,c[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,c)}var Qn=Math.abs;function Xn(e){return(0<e)-(e<0)||+e}function Kn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,s,i,r,a,o,u=Qn(this._milliseconds)/1e3,l=Qn(this._days),h=Qn(this._months),d=this.asSeconds();return d?(e=I(u/60),t=I(e/60),u%=60,e%=60,n=I(h/12),h%=12,s=u?u.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",r=Xn(this._months)!==Xn(d)?"-":"",a=Xn(this._days)!==Xn(d)?"-":"",o=Xn(this._milliseconds)!==Xn(d)?"-":"",i+"P"+(n?r+n+"Y":"")+(h?r+h+"M":"")+(l?a+l+"D":"")+(t||e||u?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(u?o+s+"S":"")):"P0D"}var es=Ct.prototype;return es.isValid=function(){return this._isValid},es.abs=function(){var e=this._data;return this._milliseconds=Yn(this._milliseconds),this._days=Yn(this._days),this._months=Yn(this._months),e.milliseconds=Yn(e.milliseconds),e.seconds=Yn(e.seconds),e.minutes=Yn(e.minutes),e.hours=Yn(e.hours),e.months=Yn(e.months),e.years=Yn(e.years),this},es.add=function(e,t){return On(this,e,t,1)},es.subtract=function(e,t){return On(this,e,t,-1)},es.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=V(e))||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,n=this._months+xn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Tn(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},es.asMilliseconds=Pn,es.asSeconds=Rn,es.asMinutes=Wn,es.asHours=Cn,es.asDays=Un,es.asWeeks=Hn,es.asMonths=Fn,es.asQuarters=Ln,es.asYears=Vn,es.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*Z(this._months/12):NaN},es._bubble=function(){var e,t,n,s,i,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return 0<=r&&0<=a&&0<=o||r<=0&&a<=0&&o<=0||(r+=864e5*bn(Tn(o)+a),o=a=0),u.milliseconds=r%1e3,e=I(r/1e3),u.seconds=e%60,t=I(e/60),u.minutes=t%60,n=I(t/60),u.hours=n%24,a+=I(n/24),o+=i=I(xn(a)),a-=bn(Tn(i)),s=I(o/12),o%=12,u.days=a,u.months=o,u.years=s,this},es.clone=function(){return Zt(this)},es.get=function(e){return e=V(e),this.isValid()?this[e+"s"]():NaN},es.milliseconds=En,es.seconds=An,es.minutes=jn,es.hours=In,es.days=Zn,es.weeks=function(){return I(this.days()/7)},es.months=zn,es.years=$n,es.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,s,i=!1,r=Bn;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(r=Object.assign({},Bn,t),null!=t.s&&null==t.ss&&(r.ss=t.s-1)),n=this.localeData(),s=Jn(this,!i,r,n),i&&(s=n.pastFuture(+this,s)),n.postformat(s)},es.toISOString=Kn,es.toString=Kn,es.toJSON=Kn,es.locale=tn,es.localeData=sn,es.toIsoString=n("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Kn),es.lang=nn,C("X",0,0,"unix"),C("x",0,0,"valueOf"),ce("x",ue),ce("X",/[+-]?\d+(\.\d{1,3})?/),ye("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),ye("x",function(e,t,n){n._d=new Date(Z(e))}),f.version="2.29.1",e=Tt,f.fn=pn,f.min=function(){return Rt("isBefore",[].slice.call(arguments,0))},f.max=function(){return Rt("isAfter",[].slice.call(arguments,0))},f.now=function(){return Date.now?Date.now():+new Date},f.utc=_,f.unix=function(e){return Tt(1e3*e)},f.months=function(e,t){return Dn(e,t,"months")},f.isDate=a,f.locale=lt,f.invalid=w,f.duration=Zt,f.isMoment=M,f.weekdays=function(e,t,n){return Sn(e,t,n,"weekdays")},f.parseZone=function(){return Tt.apply(null,arguments).parseZone()},f.localeData=dt,f.isDuration=Ut,f.monthsShort=function(e,t){return Dn(e,t,"monthsShort")},f.weekdaysMin=function(e,t,n){return Sn(e,t,n,"weekdaysMin")},f.defineLocale=ht,f.updateLocale=function(e,t){var n,s,i;return null!=t?(i=st,null!=it[e]&&null!=it[e].parentLocale?it[e].set(b(it[e]._config,t)):(null!=(s=ut(e))&&(i=s._config),t=b(i,t),null==s&&(t.abbr=e),(n=new x(t)).parentLocale=it[e],it[e]=n),lt(e)):null!=it[e]&&(null!=it[e].parentLocale?(it[e]=it[e].parentLocale,e===lt()&<(e)):null!=it[e]&&delete it[e]),it[e]},f.locales=function(){return s(it)},f.weekdaysShort=function(e,t,n){return Sn(e,t,n,"weekdaysShort")},f.normalizeUnits=V,f.relativeTimeRounding=function(e){return void 0===e?qn:"function"==typeof e&&(qn=e,!0)},f.relativeTimeThreshold=function(e,t){return void 0!==Bn[e]&&(void 0===t?Bn[e]:(Bn[e]=t,"s"===e&&(Bn.ss=t-1),!0))},f.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},f.prototype=pn,f.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},f}); +//# sourceMappingURL=moment.min.js.map \ No newline at end of file diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/bj-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/bj-form.html index 169bc31..73e91ce 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/bj-form.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/bj-form.html @@ -276,7 +276,13 @@ var total = parseFloat($("#zkTotal").html()); }, afterSubmit : function() { - parent.myGrid.serchData(); + if(parent.myGrid) { + parent.myGrid.serchData(); + } + + if (parent.app) { + parent.app.orderQuery(); + } }, }); diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html index 43e5f22..c964927 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html @@ -818,7 +818,13 @@ } else { _this.$message.success(data.info); } - parent.myGrid.serchData(); + if(parent.myGrid) { + parent.myGrid.serchData(); + } + + if (parent.app) { + parent.app.orderQuery(); + } } }); } @@ -888,9 +894,9 @@ */ chouseGoods() { let _this = this; - this.multipleSelection.forEach(item => { - _this.pushToSelectGoods(item, BUY_TYPE_NOT_FREE); - }); + // this.multipleSelection.forEach(item => { + // _this.pushToSelectGoods(item, BUY_TYPE_NOT_FREE); + // }); this.closeXm(); this.calculationTotal(); }, diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/servicceAddForm.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/servicceAddForm.html index 7691049..db16e6c 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/servicceAddForm.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/servicceAddForm.html @@ -11,6 +11,7 @@ <!-- 本框架基本脚本和样式 --> <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script> <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}"> + <script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script> <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/> <!-- 富文本编辑器 --> @@ -125,7 +126,8 @@ <el-tab-pane label="套餐" name="tab2"> <template v-for="item in taocanList" > <p class="el-big-title">【{{item.isCourse=='N'?'固定套餐':'任选套餐'}}】{{item.projName}} - <code v-if="item.projInfo.isCourse=='Y'" > 剩余次数:{{item.surplusCount}} </code> + <span style="float: right" v-if="item.failTime != null">有效期:{{item.failTime}}</span> + <code v-if="item.projInfo.isCourse=='Y'" > 剩余次数:<span v-if="item.projInfo.isInfinite == 'Y'">无限次</span><span v-else>{{item.surplusCount}}</span> </code> </p> <el-table :data="item.taocanProjUse" @@ -143,10 +145,10 @@ prop="surplusCount" label="余次"> </el-table-column> - <el-table-column - prop="failTimeStr" - label="有效期"> - </el-table-column> +<!-- <el-table-column--> +<!-- prop="failTimeStr"--> +<!-- label="有效期">--> +<!-- </el-table-column>--> <el-table-column prop="source" label="来源"> @@ -176,6 +178,7 @@ <el-date-picker v-model="yyTime" type="date" + value-format="yyyy-MM-dd HH:mm" placeholder="选择预约时间"> </el-date-picker> @@ -260,7 +263,7 @@ } let formData={ vipId:id, - yyTime:_this.yyTime, + yyTime:moment(_this.yyTime).format("YYYY-DD-MM HH:mm"), serviceItems:[], } diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service-hk.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service-hk.html index e4f5269..da5709f 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service-hk.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service-hk.html @@ -176,7 +176,13 @@ c : false }).invoke(basePath+"/admin/projService/hkService?id="+id, function(loj) { layer.msg(loj.getValue("info"),{icon:1,time:2000},function(){ - parent.myGrid.serchData(); + if (parent.myGrid) { + parent.myGrid.serchData(); + } + + if (parent.app) { + parent.app.serviceOrderQuery(); + } MTools.closeForm() }); }); diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/updateOrderTime.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/updateOrderTime.html index e1c132d..9d7bdf9 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/updateOrderTime.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/updateOrderTime.html @@ -83,7 +83,13 @@ var myForm = MForm.initForm({ invokeUrl : basePath+"/admin/order/updateOrderTime", afterSubmit : function(loj) { - _p.myGrid.serchData(); + if(_p.myGrid) { + _p.myGrid.serchData(); + } + + if (_p.app) { + _p.app.orderQuery(); + } }, }); diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html index 6b949bb..001b3c0 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml"> +<html xmlns:th="http://www.thymeleaf.org"> <head> <meta charset="utf-8"> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> @@ -9,9 +9,12 @@ content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/> <meta http-equiv="Cache-Control" content="no-siteapp"/> <!-- 本框架基本脚本和样式 --> - <script type="text/javascript" - th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script> + <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script> + <script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script> + <script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script> <script type="text/javascript" th:src="@{/js/systools/MBase.js}"></script> + <script type="text/javascript" th:src="@{/js/function/vip.js}"></script> + <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}"> <script type="text/javascript" th:src="@{/js/function/vip.js}"></script> <script type="text/javascript" th:src="@{/js/function/meiduCommon.js}"></script> @@ -52,234 +55,1291 @@ .userList li:hover { background: #eee; } + + .ibox-content { + background-color: rgba(240, 242, 245, 1); + } + + .col-style { + line-height: 30px; + height: 30px; + text-align: center; + padding: 0 5px; + display: inline-block; + vertical-align: top; + } + + .el-tag + .el-tag { + margin-left: 10px; + margin-bottom: 10px; + } + .button-new-tag { + margin-left: 10px; + height: 24px; + line-height: 22px; + padding-top: 0; + padding-bottom: 0; + } + .input-new-tag { + width: 90px; + margin-left: 10px; + vertical-align: bottom; + } + + .table-style { + margin: 20px 0; + padding: 20px 10px; + border: 1px solid #DCDFE6; + } + + .el-autocomplete { + display: block !important; + } </style> </head> -<body class="ibox-content container-fluid" onkeypress="dosearch(event)"> +<body> +<div class="ibox-content container-fluid" id="app"> + <el-container> + <el-header style="background-color: white; margin: 15px; line-height: 60px"> + <el-col :span="7"> + <el-col :span="19"> + <el-autocomplete + :fetch-suggestions="querySearch" + :trigger-on-focus="false" + @select="handleSelect" + v-model="searchValue" placeholder="输入会员姓名/手机号码/编号" + @keyup.enter.native="searchVipInfo"></el-autocomplete> + </el-col> + <el-col :span="1"> + <el-button type="primary" @click="searchVipInfo">查询</el-button> + </el-col> + </el-col> + <el-col :span="8" style="float: right; margin-right: 20px;"> + <el-button type="primary" plain @click="recharge">充值</el-button> + <el-button type="warning" plain @click="addOrder">开单</el-button> + <el-button type="success" plain @click="addServiceOrder">开服务单</el-button> + <el-button type="danger" plain @click="returnMoney">退款</el-button> + </el-col> + </el-header> + <el-container> + <el-aside style="background-color: white; margin:0 15px; width: 400px"> + <el-row style="margin-left: 26px; margin-right: 26px;"> + <el-row type="flex" justify="center"> + <el-col :span="20" style="padding: 15px; text-align: center;"> + <el-avatar :size="150" :src="circleUrl"></el-avatar> + </el-col> + </el-row> + <el-row type="flex" justify="center"> + <el-col :span="4" style="text-align: center;"><span style="font-weight: bolder">{{vipInfo.vipName}}</span></el-col> + <el-col :span="5" style="text-align: center;">{{vipInfo.vipType}}</el-col> + </el-row> + <el-row type="flex" justify="center"> + <span class="col-style"><span v-if="vipInfo.age != null && vipInfo.age != ''">{{vipInfo.age}}</span><span v-else>-</span></span> + <span class="col-style"><span v-if="vipInfo.addr != null && vipInfo.addr != ''">{{vipInfo.addr}}</span><span v-else>-</span></span> + <span class="col-style">{{vipInfo.phone}}</span> + </el-row> + <el-row style="padding: 10px 20px;"> + <p>余额:<span v-if="vipInfo.balance != null">{{vipInfo.balance}}元</span></p> + <p>积分:<span v-if="vipInfo.pointAll != null">{{vipInfo.pointAll}}</span></p> + <p>累计消费金额:<span v-if="vipInfo.totalMoney != null">{{vipInfo.totalMoney}} 元</span></p> + <p>累计消费次数:<span v-if="vipInfo.totalTimes != null">{{vipInfo.totalTimes}} 次</span></p> + <p>上次消费时间:<span v-if="vipInfo.payTime">{{vipInfo.payTime}}</span></p> + </el-row> + <el-row style="border-top: 2px dashed #E4E7ED; border-bottom: 2px dashed #E4E7ED; padding: 10px 0px;"> + <h4>标签</h4> + <el-tag type="info" + size="small" + :key="tag.label" + v-for="tag in tags.tags" + closable + :disable-transitions="false" + @close="handleClose(tag)"> + {{tag.label}} + </el-tag> + <el-input + class="input-new-tag" + v-if="tags.inputVisible" + v-model="tags.inputValue" + ref="saveTagInput" + size="mini" + @keyup.enter.native="handleInputConfirm" + @blur="handleInputConfirm" + ></el-input> + <el-button v-else class="button-new-tag" size="mini" @click="showInput">+</el-button> + </el-row> + <el-row style="padding: 10px 0;"> + <h4>消费门店</h4> + <el-row style="text-align: center"> + <el-col :span="10" v-for="item in vipInfo.shopNames"> + <el-avatar size="small" :src="circleUrl"></el-avatar> + <span class="col-style">{{item}}</span> + </el-col> + </el-row> + </el-row> + </el-row> + </el-aside> + <el-main style="background-color: white; margin-right: 15px; padding: 20px 30px;"> + <el-tabs v-model="activeName" type="card" @tab-click="tabHandleClick"> + <el-tab-pane label="会员信息" name="vipInfo"> + <el-row> + <el-col :span="10"> + <p>生日 : {{vipInfo.birthday1}}</p> + <p>会员状态 : {{vipInfo.vipState}}</p> + <p>会员编号 : {{vipInfo.vipNo}}</p> + <p>注册时间 : {{vipInfo.createTime}}</p> + <p>到店途径 : {{vipInfo.arrivalWay}}</p> + </el-col> + <el-col :span="10"> + <p>会员卡类型 : {{vipInfo.vipType}}</p> + <p>会员等级 : {{vipInfo.levelName}}</p> + <p>生肖/星座 : {{vipInfo.constell}}</p> + <p>地址 : {{vipInfo.addr}}</p> + <p>健康顾问 : {{vipInfo.staffName}}</p> + </el-col> + </el-row> + </el-tab-pane> + <el-tab-pane label="项目/套餐" name="proj"> + <el-row style="line-height: 40px;"> + <el-col :span="10" style="margin-left: 20px;"> + <el-radio-group v-model="projTab.projType" @change="refreshTable(1)"> + <el-radio label="proj">项目</el-radio> + <el-radio label="taocan">套餐</el-radio> + <el-radio label="card">卡项</el-radio> + </el-radio-group> + </el-col> + <el-col :span="3" style="float: right; margin-right: 20px;"> + <el-select v-model="projTab.projIsValid" placeholder="请选择" @change="selectChange"> + <el-option + v-for="item in projTab.projOptions" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> + </el-col> + </el-row> + <el-row class="table-style"> + <el-table id="proj" v-show="projTab.projType=='proj'" :data="projTab.projTableData" + style="width: 100%"> + <el-table-column + prop="projName" + label="项目名称" + width="180"> + </el-table-column> + <el-table-column + prop="source" + label="来源" + width="180"> + </el-table-column> + <el-table-column + prop="status" + label="状态"> + </el-table-column> + <el-table-column + prop="balance" + label="项目余额"> + </el-table-column> + <el-table-column + prop="surplusCount" + label="余次"> + </el-table-column> + <el-table-column + prop="failTime" + label="到期时间"> + </el-table-column> + <el-table-column label="操作"> + <template slot-scope="scope"> + <el-button matrix:btn="vipInfo-youxiao" v-if="scope.row.status!='有效'" type="text" size="small" @click="tabProjValid(scope.$index, scope.row)">有效</el-button> + <el-button matrix:btn="vipInfo-wuxiao" v-if="scope.row.status!='无效'" type="text" size="small" @click="tabProjInvalid(scope.$index, scope.row)">无效</el-button> + <el-button matrix:btn="vipInfo-dongjie" v-if="scope.row.status!='冻结'" type="text" size="small" @click="tabProjCold(scope.$index, scope.row)">冻结</el-button> + <el-button matrix:btn="vipInfo-cardEdit" type="text" size="small" @click="tabProjEdit(scope.$index, scope.row)">编辑</el-button> + </template> + </el-table-column> + </el-table> -<div class="row"> - <div class="row "> + <el-table id="taocan" v-show="projTab.projType=='taocan'" :data="projTab.taocanTableData" + style="width: 100%;" + row-key="id" :tree-props="{children: 'taocanProjUse', hasChildren: 'hasChildren'}"> + <el-table-column + prop="projName" + label="名称" + width="240"> + </el-table-column> + <el-table-column + prop="status" + label="状态" + width="180"> + </el-table-column> + <el-table-column + prop="balance" + label="余额"> + </el-table-column> + <el-table-column + prop="surplusCount" + label="套餐余次"> + </el-table-column> + <el-table-column + prop="failTime" + label="到期时间"> + </el-table-column> + <el-table-column label="操作" fixed="right" width="160"> + <template slot-scope="scope"> + <el-button matrix:btn="vipInfo-youxiao" v-if="scope.row.status!='有效' && scope.row.taocanId == null" type="text" size="small" @click="tabProjValid(scope.$index, scope.row)">有效</el-button> + <el-button matrix:btn="vipInfo-wuxiao" v-if="scope.row.status!='无效' && scope.row.taocanId == null" type="text" size="small" @click="tabProjInvalid(scope.$index, scope.row)">无效</el-button> + <el-button matrix:btn="vipInfo-dongjie" v-if="scope.row.status!='冻结' && scope.row.taocanId == null" type="text" size="small" @click="tabProjCold(scope.$index, scope.row)">冻结</el-button> + <el-button matrix:btn="vipInfo-cardEdit" v-if="scope.row.taocanId == null" type="text" size="small" @click="tabProjEdit(scope.$index, scope.row)">编辑</el-button> + </template> + </el-table-column> + </el-table> - <div class="col-sm-12 ibox-content"> - <form method="post" id="dataform" class="dataform form-inline"> - <div class="pd-20 form-group"> - <div class="text-l "> - <input type="text" id="key" placeholder="输入会员姓名/手机号码/编号" autocomplete="off" - style="width: 400px" class="form-control"> - <button type="button" class="btn btn-success radius EXSerchBtn " - onclick="selectByKey();"> - <i class="fa fa-search"> </i> 查找 - </button> - <ul id="userList" class="userList " - style="width: 400px; display: none"> - </ul> + <el-table id="card" v-show="projTab.projType=='card'" :data="projTab.cardTableData" + style="width: 100%;"> + <el-table-column + type="index" + width="50"> + </el-table-column> + <el-table-column + prop="cardName" + label="充值卡名称" width="160"> + </el-table-column> + <el-table-column + prop="useTotal" + label="总次数"> + </el-table-column> + <el-table-column + prop="lastCount" + label="剩余次数"> + </el-table-column> + <el-table-column + prop="realMoney" + label="本金"> + </el-table-column> + <el-table-column + prop="giftMoney" + label="赠送金额"> + </el-table-column> + <el-table-column + prop="source" + label="来源"> + </el-table-column> + <el-table-column + prop="status" + label="状态"> + </el-table-column> + <el-table-column + prop="isVipCar" + label="是否是会籍卡" :formatter="cardIsVipFormatter"> + </el-table-column> + <el-table-column + prop="isOver" + label="是否使用完成" :formatter="cardIsOrderFormatter"> + </el-table-column> + <el-table-column + prop="failTime" + label="到期时间" width="160"> + </el-table-column> + <el-table-column + prop="remark" + label="备注"> + </el-table-column> + <el-table-column label="操作" fixed="right" width="160"> + <template slot-scope="scope"> + <el-button matrix:btn="vipInfo-youxiao" v-if="scope.row.status!='有效'" type="text" size="small" @click="tabProjValid(scope.$index, scope.row)">有效</el-button> + <el-button matrix:btn="vipInfo-wuxiao" v-if="scope.row.status!='无效'" type="text" size="small" @click="tabProjInvalid(scope.$index, scope.row)">无效</el-button> + <el-button matrix:btn="vipInfo-dongjie" v-if="scope.row.status!='冻结'" type="text" size="small" @click="tabProjCold(scope.$index, scope.row)">冻结</el-button> + <el-button matrix:btn="vipInfo-cardEdit" type="text" size="small" @click="tabProjEdit(scope.$index, scope.row)">编辑</el-button> + </template> + </el-table-column> + </el-table> + </el-row> + <el-row> + <el-pagination background + @size-change="projTabSizeChange" + @current-change="projTabCurrentPage" + :current-page="projTab.page.currentPage" + :page-sizes="[10, 20, 30, 50]" + :page-size="projTab.page.pageSize" + layout="total, sizes, prev, pager, next, jumper" + :total="projTab.page.total"> + </el-pagination> + </el-row> - </div> - </div> - </form> - - </div> - </div> - <input autocomplete="off" type="hidden" id="vipId"> - <div class="row"> - <div class=" col-sm-9 "> - <div class="panel panel-default"> - <div class="panel-heading">会员信息</div> - - <table class="table table-bordered table-striped " - style="width: 100%;"> - <tr> - <td width="10%" class="text-r"><b>会员姓名:</b></td> - <td width="20%" name="vipName" id="vipName"></td> - <td width="10%" class="text-r"><b>性别:</b></td> - <td width="20%" name="sex" id="sex"></td> - <td width="10%" class="text-r"><b>生日:</b></td> - <td width="20%" name="birthday1" id="birthday1"></td> - </tr> - - <tr> - <td width="10%" class="text-r"><b>会员类型:</b></td> - <td width="20%" name="vipType" id="vipType"></td> - <td width="10%" class="text-r"><b>会员状态:</b></td> - <td width="20%" name="vipState" id="vipState"></td> - <td width="10%" class="text-r"><b>会员等级:</b></td> - <td width="20%" name="levelName" id="levelName"></td> - - </tr> - <tr> - <td width="10%" class="text-r"><b>会员编号:</b></td> - <td width="20%" name="animalSign" id="vipNo"></td> - <td width="10%" class="text-r"><b>生肖/星座:</b></td> - <td width="20%" name="constell" id="constell"></td> - <td width="10%" class="text-r"><b>注册时间:</b></td> - <td width="20%" name="createTime" id="createTime"></td> - </tr> - <tr> - <td width="10%" class="text-r"><b>手机号码:</b></td> - <td width="20%" name="phone" id="phone"></td> - <td width="10%" class="text-r"><b>入会时间:</b></td> - <td width="20%" name="inDate" id="inDate"></td> - <td width="10%" class="text-r"><b>地址:</b></td> - <td width="20%" name="addr" id="addr"></td> - </tr> - <tr> - <td width="10%" class="text-r"><b>到店途径:</b></td> - <td width="20%" name="arrivalWay" id="arrivalWay"></td> - <td width="10%" class="text-r"><b>总佣金:</b></td> - <td width="20%" name="commissionAll" id="commissionAll"></td> - <td width="10%" class="text-r"><b>总积分:</b></td> - <td width="20%" name="pointAll" id="pointAll"></td> - </tr> - - <tr> - <td width="10%" class="text-r"><b>储值卡余额:</b></td> - <td width="20%" name="bal" id="bal"></td> - <td width="10%" class="text-r"><b>备注:</b></td> - <td width="20%" name="remark" id="remark"></td> - <td width="10%" class="text-r"><b>健康顾问:</b></td> - <td width="20%" name="staffName" id="staffName"></td> - <td style="display: none" id="id" name="id"></td> - </tr> - <tr> - <td class="text-center" colspan="6"> - - <button matrix:btn="vipinfoClub-recharge" class="btn btn-success radius size-S isActive " - disabled="disabled" onclick='openCz()'> - <i class="fa fa-jpy"></i> 充值 - </button> - - <button matrix:btn="vipinfoClub-payment" class="btn btn-success radius size-S isActive" - disabled="disabled" onclick='openOrderList("欠款")'> - <i class="fa fa-paypal"></i> 补交 - </button> - - <button matrix:btn="vipinfoClub-gathering" class="btn btn-success radius size-S isActive" - disabled="disabled" onclick='openOrderList("待付款")'> - <i class="fa fa-paypal"></i> 收款 - </button> - <button matrix:btn="vipinfoClub-newService" class="btn btn-success radius size-S isActive" - disabled="disabled" onclick='toRefundOrder()'> - <i class="fa fa-paypal"></i> 退款 - </button> - <button matrix:btn="vipinfoClub-newService" class="btn btn-success radius size-S isActive" - disabled="disabled" onclick='openAddOrder()'> - <i class="fa fa-paypal"></i> 开单 - </button> - <button matrix:btn="vipinfoClub-newService" class="btn btn-success radius size-S isActive" - disabled="disabled" onclick='openAddService()'> - <i class="fa fa-paypal"></i> 开服务单 - </button> - - </td> - </tr> - </table> - </div> - </div> - <div class="col-sm-3"> - <div class="panel panel-default "> - <div class="panel-heading">最近查询会员</div> - <ul class="list-group c " id="historyList"> - </ul> - </div> - </div> - </div> - <div class="row"> - <div class="col-sm-9 text-center"> - - - <button class="btn btn-success radius size-S isActive" - onclick='openOrderList("全部")' disabled="disabled"> - <i class="fa fa-arrows-alt "></i> 订单 - </button> - - <button class="btn btn-success radius size-S isActive" - onclick="openServiceList()" disabled="disabled"> - <i class="fa fa-arrows-alt "></i> 服务单 - </button> - || - <button matrix:btn="vipinfoClub-projTaocan" class="btn btn-success radius size-S isActive" - onclick="openProj()" disabled="disabled"> - <i class="fa fa-star-half-o "></i> 项目管理 - </button> - - - <button matrix:btn="vipinfoClub-projTaocan" class="btn btn-success radius size-S isActive" - onclick="openTc()" disabled="disabled"> - <i class="fa fa-share-alt-square "></i> 套餐管理 - </button> - - - <button matrix:btn="vipinfoClub-projTaocan" class="btn btn-success radius size-S isActive" - onclick="openMoneyCard()" disabled="disabled"> - <i class="fa fa-gbp "></i>充值卡管理 - </button> - || - <button matrix:fn="servicefollow" onclick="openFollow()" type="button" class="btn btn-success isActive" disabled="disabled"> - <i class="fa fa-edit"></i> 跟进记录 - </button> - - <button matrix:btn="vipInfo-edit" onclick="openArchieves()" type="button" class="btn btn-success isActive" disabled="disabled"><i - class="fa fa-edit"></i> 客户档案 - </button> - <button matrix:btn="vipInfo-edit" onclick="openEdit()" type="button" class="btn btn-success isActive" disabled="disabled"><i - class="fa fa-edit"></i> 基本资料 - </button> - - </div> - </div> - + <el-dialog title="设置过期时间" :visible.sync="projTab.failTimeDialog"> + <el-form> + <el-form-item label="选择过期时间"> + <el-date-picker v-model="projTab.failTime" + type="date" + format="yyyy-MM-dd" + placeholder="选择日期时间"> + </el-date-picker> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="updateFailTimeFn">确 定</el-button> + <el-button @click="projTab.failTimeDialog = false">取 消</el-button> + </div> + </el-dialog> + </el-tab-pane> + <el-tab-pane label="服务单" name="serviceOrder"> + <el-row style="line-height: 40px;"> + <el-col :span="11"> + <el-date-picker v-model="serviceOrderTab.selectTime" + type="datetimerange" + range-separator="至" format="yyyy-MM-dd HH:mm" + start-placeholder="开始日期" + end-placeholder="结束日期"> + </el-date-picker> + </el-col> + <el-col :span="5"> + <el-select v-model="serviceOrderTab.state" placeholder="请选择"> + <el-option + v-for="item in serviceOrderTab.states" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> + </el-col> + <el-col :span="1" style="margin-left: 5px;"> + <el-button type="primary" @click="serviceOrderQuery">查询</el-button> + </el-col> + </el-row> + <el-row class="table-style"> + <el-table :data="serviceOrderTab.tableData" + style="width: 100%;"> + <el-table-column + type="index" + width="50"> + </el-table-column> + <el-table-column + prop="serviceNo" + label="服务单号" + width="160"> + </el-table-column> + <el-table-column + prop="money" + label="消耗金额"> + </el-table-column> + <el-table-column + prop="createTime" + label="下单时间" width="160"> + </el-table-column> + <el-table-column + prop="yyTime" + label="预约时间" width="160" :formatter="dateFormat"> + </el-table-column> + <el-table-column + prop="totalTime" + label="服务时长"> + </el-table-column> + <el-table-column + prop="isOverTime" + label="超时时间"> + </el-table-column> + <el-table-column + prop="createStaffName" + label="下单顾问"> + </el-table-column> + <el-table-column + prop="state" + label="状态"> + </el-table-column> + <el-table-column fixed="right" label="操作" width="200"> + <template slot-scope="scope"> + <el-button type="text" size="small" @click="lookServiceOrder(scope.$index, scope.row)">查看</el-button> + <el-button matrix:btn="serviceClub-paiban" type="text" size="small" v-if="scope.row.state=='待预约'" @click="paiban(scope.$index, scope.row)">排班</el-button> + <el-button matrix:btn="serviceClub-paidan" type="text" size="small" v-if="scope.row.state=='预约成功待处理'" @click="giveServiceOrder(scope.$index, scope.row)">派单</el-button> + <el-button matrix:btn="serviceClub-edit" type="text" size="small" v-if="scope.row.state=='预约成功待处理'" @click="modifyServiceOrder(scope.$index, scope.row)">修改</el-button> + <el-button matrix:btn="serviceClub-peiliao" type="text" size="small" v-if="scope.row.state=='需配料'" @click="peiliao(scope.$index, scope.row)">配料</el-button> + <el-button matrix:btn="serviceClub-huakou" type="text" size="small" v-if="scope.row.state=='服务完成'" @click="openHKService(scope.$index, scope.row)">划扣</el-button> + <el-button matrix:btn="serviceClub-edit" type="text" size="small" @click="modifyTime(scope.$index, scope.row)">修改时间</el-button> + <el-button matrix:btn="serviceClub-del" type="text" size="small" v-if="scope.row.state!='预约取消'" @click="cancelServiceOrder(scope.$index, scope.row)">取消</el-button> + </template> + </el-table-column> + </el-table> + </el-row> + <el-row> + <el-pagination + background + @size-change="serviceOrderSizeChange" + @current-change="serviceOrderCurrentChange" + :current-page="serviceOrderTab.page.currentPage" + :page-sizes="[10, 20, 30, 50]" + :page-size="serviceOrderTab.page.pageSize" + layout="total, sizes, prev, pager, next, jumper" + :total="serviceOrderTab.page.total"> + </el-pagination> + </el-row> + </el-tab-pane> + <el-tab-pane label="订单" name="order"> + <el-row style="line-height: 40px;"> + <el-col :span="11"> + <el-date-picker v-model="orderTab.selectTime" + type="datetimerange" + range-separator="至" + format="yyyy-MM-dd HH:mm" + start-placeholder="开始日期" + end-placeholder="结束日期"> + </el-date-picker> + </el-col> + <el-col :span="5"> + <el-select v-model="orderTab.state" placeholder="请选择"> + <el-option + v-for="item in orderTab.states" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> + </el-col> + <el-col :span="1" style="margin-left: 5px;"> + <el-button type="primary" @click="orderQuery">查询</el-button> + </el-col> + </el-row> + <el-row class="table-style"> + <el-table :data="orderTab.orderTableData" + style="width: 100%;"> + <el-table-column + type="index" + width="50"> + </el-table-column> + <el-table-column + prop="orderNo" + label="订单号" width="180"> + </el-table-column> + <el-table-column + prop="orderTime" + label="下单时间" width="160" :formatter="oderTimeFormat"> + </el-table-column> + <el-table-column + prop="total" + label="总价"> + </el-table-column> + <el-table-column + prop="zkTotal" + label="折后价"> + </el-table-column> + <el-table-column + prop="staffName" + label="下单顾问"> + </el-table-column> + <el-table-column + prop="cashPay" + label="现金支付金额"> + </el-table-column> + <el-table-column + prop="cardPay" + label="卡支付金额"> + </el-table-column> + <el-table-column + prop="arrears" + label="欠款金额"> + </el-table-column> + <el-table-column + prop="statu" + label="订单状态"> + </el-table-column> + <el-table-column + prop="remark" + label="备注" width="100"> + </el-table-column> + <el-table-column label="操作" fixed="right" width="160"> + <template slot-scope="scope"> + <el-button type="text" size="small" @click="lookOrderInfo(scope.$index, scope.row)">查看</el-button> + <el-button matrix:btn="orderClub-payment" v-if="scope.row.statu == '欠款'" type="text" size="small" @click="bjMoney(scope.$index, scope.row)">补交</el-button> + <el-button matrix:btn="orderClub-gathering" v-if="scope.row.statu == '待付款'" type="text" size="small" @click="skMoney(scope.$index, scope.row)">收款</el-button> + <el-button matrix:btn="orderClub-edit" type="text" size="small" @click="updateTime(scope.$index, scope.row)">修改时间</el-button> + </template> + </el-table-column> + </el-table> + </el-row> + <el-row> + <el-pagination + background + @size-change="orderSizeChange" + @current-change="orderCurrentChange" + :current-page="orderTab.page.currentPage" + :page-sizes="[10, 20, 30, 50]" + :page-size="orderTab.page.pageSize" + layout="total, sizes, prev, pager, next, jumper" + :total="orderTab.page.total"> + </el-pagination> + </el-row> + </el-tab-pane> + <el-tab-pane label="皮肤检测" name="skinCheck"> + <el-row style="line-height: 40px;"> + <el-col :span="11"> + <el-date-picker v-model="skinTab.selectTime" + type="daterange" + range-separator="至" + format="yyyy-MM-dd" + start-placeholder="开始日期" + end-placeholder="结束日期"> + </el-date-picker> + </el-col> + <el-col :span="6" style="margin-left: 5px;"> + <el-button type="primary" @click="skinCheckQuery">查询</el-button> + <el-button type="success" @click="addSkinCheck">新增</el-button> + </el-col> + </el-row> + <el-row class="table-style"> + <el-table :data="skinTab.skinTableDate" + style="width: 100%;"> + <el-table-column + type="index" + width="50"> + </el-table-column> + <el-table-column + prop="checkUserName" + label="检测人员"> + </el-table-column> + <el-table-column + prop="shopName" + label="门店"> + </el-table-column> + <el-table-column + prop="checkTime" + label="检测时间"> + </el-table-column> + <el-table-column label="操作"> + <template slot-scope="scope"> + <el-button type="text" size="small" @click="editSkinCheck(scope.$index, scope.row)">编辑</el-button> + <el-button type="text" size="small" @click="delSkinCheck(scope.$index, scope.row)">删除</el-button> + </template> + </el-table-column> + </el-table> + </el-row> + <el-row> + <el-pagination + background + @size-change="skinCheckSizeChange" + @current-change="skinCheckCurrentChange" + :current-page="skinTab.page.currentPage" + :page-sizes="[10, 20, 30, 50]" + :page-size="skinTab.page.pageSize" + layout="total, sizes, prev, pager, next, jumper" + :total="skinTab.page.total"> + </el-pagination> + </el-row> + </el-tab-pane> + </el-tabs> + </el-main> + </el-container> + </el-container> </div> </body> - - +<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script> +<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script> +<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script> <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script> <script th:inline="javascript"> - //初始带入vip的电话 - var key = $.query.get("vipPhone"); - if(key){ - selectList(key); - } + var app = new Vue({ + el: '#app', + data : { + circleUrl : "https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png", + activeName : 'vipInfo', + tags : { + tags : [], + inputVisible: false, + inputValue: '' + }, + searchValue : "", + vipInfo : {}, + // 项目/套餐 tab + projTab : { + projType : "proj", + projTypeBak : "proj", + projOptions : [{ value : '', label : "全部" }, { value : '有效', label : "有效" }, { value : '无效', label : "无效" }, { value : "冻结", label : "冻结" }, { value : "转让", label : "转让" }, { value : "退款", label : "退款" }], + projIsValid : "", + failTimeDialog : false, + failTime : "", + row : '', - $(function () { - $("#key").keyup( - function () { - var $input = $("#key"); - if ($input.val().length > 1) { - $.AjaxProxy({ - p: { - keyWord: $input.val(), - }, - c: false, - }) - .invoke( - basePath + "/admin/vipInfo/findUserByPhotoOrName", - function (loj) { - var html = ""; - for (var i = 0; i < loj - .getRowCount(); i++) { - html += '<li onclick="selectList(\'' + loj.getString(i, 'phone') + '\')" >' - + loj.getString(i, 'phone') + "-" + loj.getString(i, 'vipName') - + "-" + loj.getString(i, 'vipNo') - + '</li>'; - } - $("#userList").html(html).show(); - }); - } else { - $("#userList").hide(); + projTableData : [], + taocanTableData : [], + cardTableData : [], + page : { + currentPage : 1, + pageSize : 10, + total : 0 } - }); - updateHistory(); - $("#userList").mouseleave(function () { - $(this).hide(); - }) - }) + }, + // 服务单tab + serviceOrderTab : { + tableData : [], + selectTime : '', + state : '', + states : [ { value : '', label : '全部' }, { value : '待预约', label : '待预约' },{ value : '预约成功待处理', label : '待派单' },{ value : '需配料', label : '待配料' }, + { value : '配料完成', label : '待服务' },{ value : '服务中', label : '服务中' }, + { value : '服务完成', label : '服务完成' },{ value : '服务单结束', label : '服务单结束' }, ], + page : { + currentPage : 1, + pageSize : 10, + total : 0 + } + }, + // 订单 tab + orderTab : { + orderTableData : [], + selectTime : '', + state : '', + states : [ { value : '', label : '全部' }, { value : '待付款', label : '待付款' }, { value : '已付款', label : '已付款' }, { value : '欠款', label : '欠款' }, { value : '已取消', label : '已取消' } ], + page : { + currentPage : 1, + pageSize : 10, + total : 0 + } + }, + // 皮肤检测tab + skinTab : { + skinTableDate : [], + selectTime : '', + page : { + currentPage : 1, + pageSize : 10, + total : 0 + } + } + }, + created : function() { + var key = $.query.get("vipPhone"); + let _this = this; + + if (key) { + _this.vipInfoFn(key); + } + }, + methods : { + querySearch(queryString, cb) { + $.AjaxProxy({ + p: { + keyWord: queryString, + }, + c: false, + }).invoke( basePath + "/admin/vipInfo/findUserByPhotoOrName", function (loj) { + var results = []; + for (var i = 0; i < loj.getRowCount(); i++) { + var result = {}; + result.value = loj.getString(i, 'phone') + "-" + loj.getString(i, 'vipName') + "-" + loj.getString(i, 'vipNo'); + result.key = loj.getString(i, 'phone'); + results.push(result); + } + cb(results); + }); + }, + handleSelect(row) { + this.vipInfoFn(row.key); + }, + // 请求会员信息 + vipInfoFn(key) { + let _this = this; + // 请求用户信息 + $.AjaxProxy({ + p: { + keyWord: key + } + }).invoke(basePath + "/admin/vipInfo/showVipInfo", function (loj) { + if (loj.getRowCount() == 0) { + layer.msg('未查询到客户信息', { + icon: 5 + }); + return false; + } + let data = loj[0].result.rows[0]; + _this.vipInfo = {}; + _this.vipInfo = data; + + if (data.sysOrder != null) { + _this.vipInfo.totalMoney = data.sysOrder.zkTotal; + _this.vipInfo.totalTimes = data.sysOrder.times; + _this.vipInfo.payTime = data.sysOrder.payTime; + + if (data.sysOrder.shopName) { + var shopNames = data.sysOrder.shopName.split(','); + _this.vipInfo.shopNames = shopNames; + } + } + + _this.tags.tags = data.labels; + _this.projTableQueryFn(); + }); + }, + addLabelFn(key) { + let _this = this; + // 请求用户信息 + $.AjaxProxy({ + p: { + vipId: _this.vipInfo.id, + label : key + } + }).invoke(basePath + "/admin/label/add", function (loj) { + let label = loj.getResult().mapInfo.label; + _this.tags.tags.push(label); + }); + }, + delLabelFn(id) { + $.AjaxProxy({ + p: { + id: id + } + }).invoke(basePath + "/admin/label/del", function (loj) { + }); + }, + searchVipInfo() { + let _this = this; + let inputVisible = _this.tags.inputVisible; + console.log(inputVisible) + if (!inputVisible) { + if (_this.searchValue) { + _this.vipInfoFn(_this.searchValue); + } + } + + }, + + /** ############## 项目/套餐Tab页 start #################### **/ + projTabTableParams() { + let _this = this; + let currentPage = _this.projTab.page.currentPage; + let pageSize = _this.projTab.page.pageSize + return { + vipId: _this.vipInfo.id, + offset: (currentPage - 1) * pageSize, + limit: pageSize, + status: _this.projTab.projIsValid, + }; + }, + // 项目tab页,请求项目数据 + projTableQueryFn() { + let _this = this; + $.AjaxProxy({ + p:_this.projTabTableParams() + }).invoke(basePath + "/admin/projUser/showList", function (loj) { + _this.projTab.page.total = loj.getResult().total; + _this.projTab.projTableData = loj.getValue("rows"); + }); + }, + // 套餐表格数据请求 + taocanTableQueryFn() { + let _this = this; + $.AjaxProxy({ + p:_this.projTabTableParams() + }).invoke(basePath + "/admin/taoCanUser/showTc", function (loj) { + _this.projTab.page.total = loj.getResult().total; + _this.projTab.taocanTableData = loj.getValue("rows"); + }); + }, + // 卡项表格数据请求 + cardTableQueryFn() { + let _this = this; + $.AjaxProxy({ + p:_this.projTabTableParams() + }).invoke(basePath + "/admin/moneyCardUse/showVipMoneyCardList", function (loj) { + _this.projTab.page.total = loj.getResult().total; + _this.projTab.cardTableData = loj.getValue("rows"); + }); + }, + cardIsVipFormatter (row, column) { + if (column.isVipCar === 'Y') { + return "是"; + } else { + return "否" + } + }, + cardIsOrderFormatter(row, column) { + if (column.isOver === 'Y') { + return '是'; + } else { + return "否"; + } + }, + projTabSizeChange(val) { + this.projTab.page.pageSize = val; + this.refreshTable(); + }, + projTabCurrentPage(val) { + this.projTab.page.currentPage = val; + this.refreshTable(); + }, + // 单选框切换 + refreshTable(val) { + let _this = this; + if (val) { + this.projTab.page = { + currentPage : 1, + pageSize : 10, + total : 0 + }; + } + + if (_this.projTab.projType === 'proj') { + _this.projTableQueryFn(); + } + + if (_this.projTab.projType === 'taocan') { + _this.taocanTableQueryFn(); + } + + if (_this.projTab.projType === 'card') { + _this.cardTableQueryFn(); + } - function selectList(phone) { - $("#userList").hide(); - $("#key").val(phone); - selectByKey(); - } + }, + // 下拉框选择 + selectChange() { + this.refreshTable(); + }, + tabProjValid(index, row, val) { + let _this = this; + let projType = _this.projTab.projType; + var url; + if (projType === 'proj') { + url = "/admin/projUser/activeProj"; + } + + if (projType === 'taocan') { + url = "/admin/taoCanUser/activeTc"; + } + + if (projType === 'card') { + url = "/admin/moneyCardUse/active"; + } + + var params = { + id : row.id, + }; + if (val === 1) { + if (_this.projTab.failTime) { + params.failTime = moment(_this.projTab.failTime).format("YYYY-MM-DD"); + } else { + this.$message.error('过期时间不能为空'); + return; + } + } + + $.AjaxProxy({ + p : params + }).invoke(basePath + url, function(loj) { + var rs = loj.attr("result"); + if (rs.info == '已过期') { + _this.projTab.failTimeDialog = true; + _this.projTab.row = row; + } else { + layer.alert(loj.getValue("info"), { + icon : 1 + }); + _this.refreshTable(); + } + + if (val === 1) { + _this.projTab.failTimeDialog = false; + } + }); + + }, + tabProjEdit(index, row) { + let _this = this; + let projType = _this.projTab.projType; + var url; + if (projType === 'proj') { + url = '/admin/projUser/editForm?id='; + } + + if (projType === 'taocan') { + url = '/admin/taoCanUser/editForm?id='; + } + + if (projType === 'card') { + url = '/admin/moneyCardUse/editForm?id='; + } + + layer.open({ + type : 2, + title : "编辑", + area : MUI.SIZE_M, + maxmin : true, + content : [ basePath + url + row.id ] + }); + }, + tabProjInvalid(index, row) { + let _this = this; + let projType = _this.projTab.projType; + var url; + if (projType === 'proj') { + url = '/admin/projUser/invalidProj'; + } + + if (projType === 'taocan') { + url = '/admin/taoCanUser/invalidTc'; + } + + if (projType === 'card') { + url = '/admin/moneyCardUse/invalid'; + } + + _this.projTabQuery(row.id, url); + }, + tabProjCold(index, row) { + let _this = this; + let projType = _this.projTab.projType; + var url; + if (projType === 'proj') { + url = '/admin/projUser/freezeProj'; + } + + if (projType === 'taocan') { + url = '/admin/taoCanUser/freezeTc'; + } + + if (projType === 'card') { + url = '/admin/moneyCardUse/freeze'; + } + + _this.projTabQuery(row.id, url); + }, + projTabQuery(id, url) { + let _this = this; + $.AjaxProxy({ + p : { + id : id + } + }).invoke(basePath + url, function(loj) { + layer.alert(loj.getValue("info"), { + icon : 1 + }); + _this.refreshTable(); + }); + }, + updateFailTimeFn() { + this.tabProjValid(1, this.projTab.row, 1); + }, + /** ############## 项目/套餐Tab页 end #################### **/ + + /********* 服务单tab start ***********/ + serviceOrderQuery() { + this.serviceOrderTableQueryFn() + }, + serviceOrderTableQueryFn() { + let _this = this; + let serviceOrderTab = _this.serviceOrderTab; + let page = serviceOrderTab.page; + var params = {}; + + if (!_this.vipInfo.id) { + return; + } + + params.limit = page.pageSize; + params.offset = (page.currentPage - 1) * page.pageSize; + params.state = serviceOrderTab.state; + params.vipId = _this.vipInfo.id; + if (serviceOrderTab.selectTime) { + params.beginTime = moment(serviceOrderTab.selectTime[0]).format("YYYY-MM-DD HH:mm"); + params.closureTime = moment(serviceOrderTab.selectTime[1]).format("YYYY-MM-DD HH:mm"); + } + $.AjaxProxy({ + p:params + }).invoke(basePath + "/admin/projService/showList", function (loj) { + serviceOrderTab.page.total = loj.getResult().total; + serviceOrderTab.tableData = loj.getValue("rows"); + }); + }, + serviceOrderSizeChange(val) { + this.serviceOrderTab.page.pageSize = val; + this.serviceOrderTableQueryFn() + }, + serviceOrderCurrentChange(val) { + this.serviceOrderTab.page.currentPage = val; + this.serviceOrderTableQueryFn() + }, + // 查看 + lookServiceOrder(index, row) { + selectFwz(row.id); + }, + // 排班 + paiban(index, row) { + openPb(row.id); + }, + // 派单 + giveServiceOrder(index, row) { + MTools.handleItem(basePath + "/admin/projService/paidan?id=" + row.id, "确定派单吗?", this.serviceOrderQuery) + }, + // 修改 + modifyServiceOrder(index, row) { + updatePd(row.id); + }, + // 配料 + peiliao(index, row) { + layer.full(layer.open({ + type: 2, + title: "开始配料", + maxmin: true, + area: [MUI.SIZE_L, '450px'], + content: [basePath + '/admin/projService/startpl?id=' + row.id] + })); + }, + // 划扣 + openHkService(index, row) { + openHkServcie(row.id); + }, + // 取消 + cancelServiceOrder(index, row) { + MTools.handleItem(basePath + "/admin/projService/cancelOrder?id=" + row.row, "确定取消订单吗?", this.serviceOrderQuery); + }, + // 修改时间 + modifyTime(index, row) { + layer.open({ + type: 2, + title: "修改订单时间", + maxmin: true, + area: [MUI.SIZE_L, '500px'], + content: [basePath + '/admin/projService/toServiceOrderUpdateTime?id=' + row.id] + }); + }, + /********* 服务单tab end ***********/ + + /********* 订单Tab start ***********/ + orderQuery() { + this.orderTableDataQueryFn(); + }, + orderTableDataQueryFn() { + let _this = this; + let orderTab = _this.orderTab; + let page = orderTab.page; + var params = {}; + + if (!_this.vipInfo.id) { + return; + } + + params.limit = page.pageSize; + params.offset = (page.currentPage - 1) * page.pageSize; + params.statu = orderTab.state; + params.vipId = _this.vipInfo.id; + if (orderTab.selectTime) { + params.beginTimeVo = moment(orderTab.selectTime[0]).format("YYYY-MM-DD HH:mm"); + params.endTimeVo = moment(orderTab.selectTime[1]).format("YYYY-MM-DD HH:mm"); + } + $.AjaxProxy({ + p:params + }).invoke(basePath + "/admin/order/showList", function (loj) { + orderTab.page.total = loj.getResult().total; + orderTab.orderTableData = loj.getValue("rows"); + }); + + }, + orderSizeChange(val) { + this.orderTab.page.pageSize = val; + this.orderTableDataQueryFn(); + }, + orderCurrentChange(val) { + this.orderTab.page.currentPage = val; + this.orderTableDataQueryFn(); + }, + lookOrderInfo(index, row) { + layer.full(layer.open({ + type : 2, + title : "订单详情", + maxmin : true, + area : [ MUI.SIZE_L, '500px' ], + content : [ basePath + '/admin/order/orderItem?id=' + row.id ] + })); + }, + bjMoney(index, row) { + layer.full(layer.open({ + type : 2, + title : "补交", + area : [ MUI.SIZE_L, '400px' ], + maxmin : true, + content : [ basePath+'/admin/moneyCardUse/toBj?id=' + row.id] + })); + }, + skMoney(index, row) { + layer.full(layer.open({ + type : 2, + title : "收款", + area : [ MUI.SIZE_L, '400px' ], + maxmin : true, + content : [ basePath+'/admin/redirect/hive/beautySalon/order-form?id=' + row.id] + })); + }, + updateTime(index, row) { + layer.open({ + type : 2, + title : "修改订单时间", + maxmin : true, + area : [ MUI.SIZE_L, '500px' ], + content : [ basePath + '/admin/order/toUpdateTime?id=' + row.id ] + }); + }, + /********* 订单Tab end ***********/ + + /************** 皮肤检测tab start **************/ + skinCheckQuery() { + this.skinCheckTableDataQueryFn(); + }, + skinCheckTableDataQueryFn() { + let _this = this; + let skinTab = _this.skinTab; + let page = skinTab.page; + var params = {}; + + if (!_this.vipInfo.id) { + return; + } + + params.limit = page.pageSize; + params.offset = (page.currentPage - 1) * page.pageSize; + params.userId = _this.vipInfo.id; + if (skinTab.selectTime) { + params.beginTime = moment(skinTab.selectTime[0]).format("YYYY-MM-DD"); + params.endTime = moment(skinTab.selectTime[1]).format("YYYY-MM-DD"); + } + $.AjaxProxy({ + p:params + }).invoke(basePath + "/admin/sysSkinCheckRecord/showList", function (loj) { + skinTab.page.total = loj.getResult().total; + skinTab.skinTableDate = loj.getValue("rows"); + }); + }, + skinCheckSizeChange(val) { + this.skinTab.page.pageSize = val; + this.skinCheckTableDataQueryFn() + }, + skinCheckCurrentChange(val) { + this.skinTab.page.currentPage = val; + this.skinCheckTableDataQueryFn() + }, + addSkinCheck() { + let _this = this; + if (!this.vipInfo.id) { + this.$message.error('请选择用户'); + return; + } + + layer.full(layer.open({ + type : 2, + title : "新增皮肤检测", + area : [ MUI.SIZE_L, '400px' ], + maxmin : true, + content : [ basePath+'/admin/redirect/hive/vip/sysSkinCheckRecord-form?vipId=' + _this.vipInfo.id] + })); + }, + delSkinCheck(index, row) { + let _this = this; + $.AjaxProxy().invoke(basePath + "/admin/sysSkinCheckRecord/del?keys=" + row.id, function (loj) { + _this.skinCheckQuery(); + }); + }, + editSkinCheck(index, row) { + let _this = this; + layer.full(layer.open({ + type : 2, + title : "编辑皮肤检测", + area : [ MUI.SIZE_L, '400px' ], + maxmin : true, + content : [ basePath+'/admin/redirect/hive/vip/sysSkinCheckRecord-form?vipId='+ _this.vipInfo.id +'&id=' + row.id] + })); + }, + /************** 皮肤检测tab end **************/ + + // tab标签切换 + tabHandleClick(tab, event) { + let _this = this; + if (tab.name === "serviceOrder") { + if (_this.serviceOrderTab.tableData.length <= 0) { + this.serviceOrderTableQueryFn(); + } + } + + if (tab.name === "order") { + if (_this.orderTab.orderTableData.length <= 0) { + this.orderTableDataQueryFn(); + } + } + + if (tab.name === "skinCheck") { + if (_this.skinTab.skinTableDate.length <= 0) { + this.skinCheckTableDataQueryFn(); + } + } + }, + + /********** 标签代码 start ************/ + handleClose(tag) { + this.tags.tags.splice(this.tags.tags.indexOf(tag), 1); + this.delLabelFn(tag.id); + }, + showInput() { + if(!this.vipInfo.id) { + this.$message.error('请选择用户'); + return; + } + + this.tags.inputVisible = true; + this.$nextTick(_ => { + this.$refs.saveTagInput.$refs.input.focus(); + }); + }, + handleInputConfirm() { + let inputValue = this.tags.inputValue; + if (inputValue) { + this.addLabelFn(inputValue); + } + this.tags.inputVisible = false; + this.tags.inputValue = ''; + }, + /********** 标签代码 end ************/ + + /********** 顶部按钮 start **********/ + // 充值 + recharge() { + if (!this.vipInfo.id) { + this.$message.error('请选择用户'); + return; + } + vipId = this.vipInfo.id; + openCz(); + }, + // 开服务单 + addServiceOrder() { + if (!this.vipInfo.id) { + this.$message.error('请选择用户'); + return; + } + vipId = this.vipInfo.id; + openAddService(); + }, + // 开订单 + addOrder() { + if (!this.vipInfo.id) { + this.$message.error('请选择用户'); + return; + } + vipId = this.vipInfo.id; + openAddOrder(); + }, + // 退款 + returnMoney() { + if (!this.vipInfo.id) { + this.$message.error('请选择用户'); + return; + } + vipId = this.vipInfo.id; + toRefundOrder(); + }, + /********** 顶部按钮 start **********/ + + dateFormat(row, column) { + return moment(column.yyTime).format("YYYY-MM-DD HH:mm"); + }, + oderTimeFormat(row, column) { + return moment(column.orderTime).format("YYYY-MM-DD HH:mm:ss"); + }, + } + }); </script> </body> </html> \ No newline at end of file diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip_bak.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip_bak.html new file mode 100644 index 0000000..6b949bb --- /dev/null +++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip_bak.html @@ -0,0 +1,285 @@ +<!DOCTYPE HTML> +<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml"> +<head> + <meta charset="utf-8"> + <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> + <meta name="renderer" content="webkit|ie-comp|ie-stand"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" + content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/> + <meta http-equiv="Cache-Control" content="no-siteapp"/> + <!-- 本框架基本脚本和样式 --> + <script type="text/javascript" + th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script> + <script type="text/javascript" th:src="@{/js/systools/MBase.js}"></script> + + <script type="text/javascript" th:src="@{/js/function/vip.js}"></script> + <script type="text/javascript" th:src="@{/js/function/meiduCommon.js}"></script> + + <style type="text/css"> + .c { + cursor: pointer; + overflow: scroll; + height: 258px; + overflow-x: hidden; + } + + .c li:HOVER { + background: #efefef; + } + + .userList { + list-style: none; + padding-left: 0px; + border: 1px solid rgb(238, 238, 238); + position: fixed; + z-index: 99999999; + background: #FFFFFF; + box-shadow: 1px 2px 10px 1px #BFBFBF; + height: 300px; + overflow: scroll; + overflow-x: hidden; + } + + .userList li { + padding-left: 13px; + padding-top: 5px; + padding-bottom: 5px; + cursor: pointer; + border-bottom: 1px solid #efefef; + } + + .userList li:hover { + background: #eee; + } + </style> + +</head> +<body class="ibox-content container-fluid" onkeypress="dosearch(event)"> + +<div class="row"> + <div class="row "> + + <div class="col-sm-12 ibox-content"> + <form method="post" id="dataform" class="dataform form-inline"> + <div class="pd-20 form-group"> + <div class="text-l "> + <input type="text" id="key" placeholder="输入会员姓名/手机号码/编号" autocomplete="off" + style="width: 400px" class="form-control"> + <button type="button" class="btn btn-success radius EXSerchBtn " + onclick="selectByKey();"> + <i class="fa fa-search"> </i> 查找 + </button> + <ul id="userList" class="userList " + style="width: 400px; display: none"> + </ul> + + </div> + </div> + </form> + + </div> + </div> + <input autocomplete="off" type="hidden" id="vipId"> + <div class="row"> + <div class=" col-sm-9 "> + <div class="panel panel-default"> + <div class="panel-heading">会员信息</div> + + <table class="table table-bordered table-striped " + style="width: 100%;"> + <tr> + <td width="10%" class="text-r"><b>会员姓名:</b></td> + <td width="20%" name="vipName" id="vipName"></td> + <td width="10%" class="text-r"><b>性别:</b></td> + <td width="20%" name="sex" id="sex"></td> + <td width="10%" class="text-r"><b>生日:</b></td> + <td width="20%" name="birthday1" id="birthday1"></td> + </tr> + + <tr> + <td width="10%" class="text-r"><b>会员类型:</b></td> + <td width="20%" name="vipType" id="vipType"></td> + <td width="10%" class="text-r"><b>会员状态:</b></td> + <td width="20%" name="vipState" id="vipState"></td> + <td width="10%" class="text-r"><b>会员等级:</b></td> + <td width="20%" name="levelName" id="levelName"></td> + + </tr> + <tr> + <td width="10%" class="text-r"><b>会员编号:</b></td> + <td width="20%" name="animalSign" id="vipNo"></td> + <td width="10%" class="text-r"><b>生肖/星座:</b></td> + <td width="20%" name="constell" id="constell"></td> + <td width="10%" class="text-r"><b>注册时间:</b></td> + <td width="20%" name="createTime" id="createTime"></td> + </tr> + <tr> + <td width="10%" class="text-r"><b>手机号码:</b></td> + <td width="20%" name="phone" id="phone"></td> + <td width="10%" class="text-r"><b>入会时间:</b></td> + <td width="20%" name="inDate" id="inDate"></td> + <td width="10%" class="text-r"><b>地址:</b></td> + <td width="20%" name="addr" id="addr"></td> + </tr> + <tr> + <td width="10%" class="text-r"><b>到店途径:</b></td> + <td width="20%" name="arrivalWay" id="arrivalWay"></td> + <td width="10%" class="text-r"><b>总佣金:</b></td> + <td width="20%" name="commissionAll" id="commissionAll"></td> + <td width="10%" class="text-r"><b>总积分:</b></td> + <td width="20%" name="pointAll" id="pointAll"></td> + </tr> + + <tr> + <td width="10%" class="text-r"><b>储值卡余额:</b></td> + <td width="20%" name="bal" id="bal"></td> + <td width="10%" class="text-r"><b>备注:</b></td> + <td width="20%" name="remark" id="remark"></td> + <td width="10%" class="text-r"><b>健康顾问:</b></td> + <td width="20%" name="staffName" id="staffName"></td> + <td style="display: none" id="id" name="id"></td> + </tr> + <tr> + <td class="text-center" colspan="6"> + + <button matrix:btn="vipinfoClub-recharge" class="btn btn-success radius size-S isActive " + disabled="disabled" onclick='openCz()'> + <i class="fa fa-jpy"></i> 充值 + </button> + + <button matrix:btn="vipinfoClub-payment" class="btn btn-success radius size-S isActive" + disabled="disabled" onclick='openOrderList("欠款")'> + <i class="fa fa-paypal"></i> 补交 + </button> + + <button matrix:btn="vipinfoClub-gathering" class="btn btn-success radius size-S isActive" + disabled="disabled" onclick='openOrderList("待付款")'> + <i class="fa fa-paypal"></i> 收款 + </button> + <button matrix:btn="vipinfoClub-newService" class="btn btn-success radius size-S isActive" + disabled="disabled" onclick='toRefundOrder()'> + <i class="fa fa-paypal"></i> 退款 + </button> + <button matrix:btn="vipinfoClub-newService" class="btn btn-success radius size-S isActive" + disabled="disabled" onclick='openAddOrder()'> + <i class="fa fa-paypal"></i> 开单 + </button> + <button matrix:btn="vipinfoClub-newService" class="btn btn-success radius size-S isActive" + disabled="disabled" onclick='openAddService()'> + <i class="fa fa-paypal"></i> 开服务单 + </button> + + </td> + </tr> + </table> + </div> + </div> + <div class="col-sm-3"> + <div class="panel panel-default "> + <div class="panel-heading">最近查询会员</div> + <ul class="list-group c " id="historyList"> + </ul> + </div> + </div> + </div> + <div class="row"> + <div class="col-sm-9 text-center"> + + + <button class="btn btn-success radius size-S isActive" + onclick='openOrderList("全部")' disabled="disabled"> + <i class="fa fa-arrows-alt "></i> 订单 + </button> + + <button class="btn btn-success radius size-S isActive" + onclick="openServiceList()" disabled="disabled"> + <i class="fa fa-arrows-alt "></i> 服务单 + </button> + || + <button matrix:btn="vipinfoClub-projTaocan" class="btn btn-success radius size-S isActive" + onclick="openProj()" disabled="disabled"> + <i class="fa fa-star-half-o "></i> 项目管理 + </button> + + + <button matrix:btn="vipinfoClub-projTaocan" class="btn btn-success radius size-S isActive" + onclick="openTc()" disabled="disabled"> + <i class="fa fa-share-alt-square "></i> 套餐管理 + </button> + + + <button matrix:btn="vipinfoClub-projTaocan" class="btn btn-success radius size-S isActive" + onclick="openMoneyCard()" disabled="disabled"> + <i class="fa fa-gbp "></i>充值卡管理 + </button> + || + <button matrix:fn="servicefollow" onclick="openFollow()" type="button" class="btn btn-success isActive" disabled="disabled"> + <i class="fa fa-edit"></i> 跟进记录 + </button> + + <button matrix:btn="vipInfo-edit" onclick="openArchieves()" type="button" class="btn btn-success isActive" disabled="disabled"><i + class="fa fa-edit"></i> 客户档案 + </button> + <button matrix:btn="vipInfo-edit" onclick="openEdit()" type="button" class="btn btn-success isActive" disabled="disabled"><i + class="fa fa-edit"></i> 基本资料 + </button> + + </div> + </div> + +</div> +</body> + + +<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script> +<script th:inline="javascript"> + //初始带入vip的电话 + var key = $.query.get("vipPhone"); + if(key){ + selectList(key); + } + + $(function () { + $("#key").keyup( + function () { + var $input = $("#key"); + if ($input.val().length > 1) { + $.AjaxProxy({ + p: { + keyWord: $input.val(), + }, + c: false, + }) + .invoke( + basePath + "/admin/vipInfo/findUserByPhotoOrName", + function (loj) { + var html = ""; + for (var i = 0; i < loj + .getRowCount(); i++) { + html += '<li onclick="selectList(\'' + loj.getString(i, 'phone') + '\')" >' + + loj.getString(i, 'phone') + "-" + loj.getString(i, 'vipName') + + "-" + loj.getString(i, 'vipNo') + + '</li>'; + } + $("#userList").html(html).show(); + }); + } else { + $("#userList").hide(); + } + }); + updateHistory(); + $("#userList").mouseleave(function () { + $(this).hide(); + }) + }) + + + function selectList(phone) { + $("#userList").hide(); + $("#key").val(phone); + selectByKey(); + } +</script> +</body> +</html> \ No newline at end of file diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html index 43e23bb..c8421ac 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html @@ -357,7 +357,13 @@ _this.closeFram(); } }); - parent.myGrid.serchData(); + if (parent.myGrid) { + parent.myGrid.serchData(); + } + + if (parent.app) { + parent.app.serviceOrderQuery(); + } } }); } diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/instore/instoreinfo-list.html b/zq-erp/src/main/resources/templates/views/admin/hive/instore/instoreinfo-list.html index 6bc7c70..a7befd8 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/instore/instoreinfo-list.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/instore/instoreinfo-list.html @@ -244,7 +244,9 @@ if (checkStatus == "待审核" || checkStatus == "审核未通过") { //没有审核并且登入者是审核者才显示审核的按钮, // if ((staffId == row.appmanId)) { + if (checkStatus == "待审核") { html += btns[2].replace('VALUE', value); + } // } if (isSame) { html += btns[1].replace('VALUE', value); diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/products/goods-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/products/goods-form.html index a4a4c29..225ed3c 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/products/goods-form.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/products/goods-form.html @@ -190,8 +190,16 @@ </el-radio-group> </el-form-item> </el-col> - <el-col :offset="2" :span="10"> - <el-form-item prop="carUseCount" label-width="120px" label="最大使用次数" v-if="form.isCourse=='Y'"> + <el-col :offset="2" :span="3"> + <el-form-item label="是否无限次数" v-if="form.isCourse=='Y'"> + <el-radio-group v-model="form.isInfinite"> + <el-radio label="N">否</el-radio> + <el-radio label="Y">是</el-radio> + </el-radio-group> + </el-form-item> + </el-col> + <el-col :offset="1" :span="5"> + <el-form-item prop="carUseCount" label-width="120px" label="最大使用次数" v-if="form.isCourse=='Y' && form.isInfinite=='N'"> <el-input v-model="form.carUseCount"></el-input> </el-form-item> </el-col> @@ -893,6 +901,76 @@ </el-form-item> </el-col> </el-row> + <el-row v-if="form.goodType!='家居产品'"> + <el-form-item label="购买有效期"> + <el-col :span="4"> + <el-form-item label="" prop="isNum"> + <el-input v-model.number="form.buyDateNum"></el-input> + </el-form-item> + </el-col> + <el-col :span="2"> + <el-form-item lable=""> + <el-select v-model="form.buyDateUnit" placeholder="请选择"> + <el-option + v-for="item in dateList" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> + </el-form-item> + </el-col> + <el-col :span="6" style="margin-left: 10px; color: #C0C4CC;"> + <span>用户从购买日开始计算多长时间自动失效</span> + </el-col> + </el-form-item> + </el-row> + <el-row v-if="form.goodType!='家居产品'"> + <el-form-item label="消耗有效期"> + <el-col :span="4"> + <el-form-item label="" prop="isNum"> + <el-input v-model.number="form.useDateNum"></el-input> + </el-form-item> + </el-col> + <el-col :span="2"> + <el-select v-model="form.useDateUnit" placeholder="请选择"> + <el-option + v-for="item in dateList" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> + </el-col> + <el-col :span="6" style="margin-left: 10px; color: #C0C4CC;"> + <span>用户从第一次使用后开始计算多长时间自动生效</span> + </el-col> + </el-form-item> + </el-row> + <el-row v-if="form.goodType!='家居产品'"> + <el-form-item label="统一到期时间"> + <el-col :span="6"> + <el-date-picker + v-model="form.invalidTime" + type="date" + placeholder="选择日期"> + </el-date-picker> + </el-col> + <el-col :span="10" style="margin-left: 10px; color: #C0C4CC;"> + <span>在指定日期所有购买过本商品的统一失效,且在统一失效时间之后产品会自动下架</span> + </el-col> + </el-form-item> + </el-row> + <p class="el-big-title">支付方式</p> + <el-row> + <el-col :offset="1"> + <el-checkbox-group v-model="payMethodList"> + <el-checkbox label="1">充值本金</el-checkbox> + <el-checkbox label="2">赠送金额</el-checkbox> + <el-checkbox label="3">积分</el-checkbox> + </el-checkbox-group> + </el-col> + </el-row> <el-row v-if="shopInfo.shopType==1"> <el-col :span="10"> <p class="el-big-title">产品可用门店<code>不选默认为所有门店可用</code></p> @@ -944,7 +1022,8 @@ var app = new Vue({ el: '#app', data: { - + payMethodList : ['1', '2', '3'], + dateList : [{value : 'Y', label : '年'}, {value : 'M', label : '月'}, { value : 'D' , label : '日' }], selectTreeParam: { holder: '请选择商品类型', treeData: [], @@ -1061,7 +1140,11 @@ cardAssembles: [], //充值卡绑定产品分类 isCourse: 'N', + isInfinite : 'N', carIsAll: '否', + useDateNum : '', + buyDateNum : '', + payMethods : '', }, submitUrl: '/admin/shoppinggoods/addShoppingGoods', modifySubmitUrl: '/admin/shoppinggoods/modifyShoppingGoods', @@ -1077,6 +1160,7 @@ isCourse: [{required: true, message: '请选择套餐类型', trigger: 'change'}], sealPice: [{required: true, message: '请填写售价', trigger: 'blur'}], timeLength: [{required: true, message: '请填写服务时长', trigger: 'blur'}], + isNum : [{ type : 'number', message: '请输入数字', trigger: 'blur' }], }, }, @@ -1471,6 +1555,11 @@ _this.form.useShop=_this.form.useShop.join(","); } + if (_this.payMethodList.length != 0) { + _this.form.payMethods = this.payMethodList.join(","); + } else { + _this.form.payMethods = ''; + } if (this.validFormData()) { @@ -1479,7 +1568,7 @@ if (valid) { - if ( _this.form.goodType == '套餐' && _this.form.isCourse == 'Y' && !_this.form.carUseCount) { + if ( _this.form.goodType == '套餐' && _this.form.isCourse == 'Y' && _this.form.isInfinite == 'N' && !_this.form.carUseCount) { this.$message.error('请输入套餐最大使用次数!'); _this.submiting = false; return false; @@ -1564,7 +1653,7 @@ ue.setContent(_this.form.description, true); } _this.form.useShop=MTools.strToArray(_this.form.useShop,",",true); - + _this.payMethodList = MTools.strToArray(_this.form.payMethods,",",false); _this.fileList[0].url = _this.form.img; _this.defaultCates = data.mapInfo.cates; _this.userAdbleEdit(); @@ -1572,8 +1661,6 @@ //如果是总产品加载总部分类信息 _this.getShoppinggoodscategory(1); _this.getGoodstype(1); - - } }); }, diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/custom-consume-list.html b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/custom-consume-list.html new file mode 100644 index 0000000..ab383d4 --- /dev/null +++ b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/custom-consume-list.html @@ -0,0 +1,155 @@ + +<!DOCTYPE HTML> +<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml"> +<head> +<meta charset="utf-8"> +<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> +<meta name="renderer" content="webkit|ie-comp|ie-stand"> +<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> +<meta name="viewport" + content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /> +<meta http-equiv="Cache-Control" content="no-siteapp" /> +<LINK rel="Bookmark" href="../images/favicon.ico"> +<!-- 本框架基本脚本和样式 --> +<script type="text/javascript" + th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script> +<script type="text/javascript" th:src="@{/js/systools/MBase.js}"></script> + +</head> +<body class="gray-bg"> + + + <div class="ibox-content"> + <!-- 搜索框部分start --> + <form class="form-inline" id="serchform"> + <div class="form-group mr-20"> + <label>日期范围</label> + <input name="beginTime" type="text" class="form-control datetimepicker" id="beginTime">- + <input name="endTime" type="text" class="form-control datetimepicker" id="endTime"> + </div> + + <div class="form-group mr-20"> + <label>会员</label> + <input autocomplete="off" placeholder="姓名/编号/电话" name="vipName" type="text" class="form-control" > + </div> + + <div class="form-group mr-20"> + <label>美疗师</label> + <select class="form-control autoFull select2" + th:data-url="@{/admin/getShopStaffByRoleName?roleName=美疗师}" + data-value="suId" + data-filed="suName" + name="beaultId" + id="beaultId"> + <option value="">--请选择美容师--</option> + </select> + </div> + + <div class="form-group mr-20"> + <label>门店</label> + <select class="form-control autoFull" data-filed="shopName" name="shopId" id="shopId" + th:data-url="@{/admin/shopInfo/findAllWithPermi}"> + <option value=''>--请选择部所属门店--</option> + </select> + </div> + + <div class="row mb-10"> + <div class="col-sm-8"> + <button onclick="myGrid.serchData()" type="button" class="btn btn-info btn-sm"><i class="fa fa-search" ></i> 搜索</button> + <button onclick="myGrid.resetForm()" type="button" class="btn btn-default btn-sm"><i class="fa fa-refresh " ></i> 重置</button> +<!-- <button matrix:btn="ygyjbb-exportExcel" onclick="exportExcel()" type="button" class="btn btn-default btn-sm"><i class="fa fa-download" ></i> 导出</button>--> + </div> + </div> + </form> + + + <table id="mgrid"> + <thead> + <tr> + <th data-formatter="MGrid.indexfn" data-align="center" + data-width="30px">序号</th> + <th data-field="vipName" data-formatter="buildVipNameJump">姓名</th> + <th data-field="meiliao">美疗师</th> + <th data-field="arriveCnt">到店次数</th> + <th data-field="goodsCash">消费金额</th> + <th data-field="hisConsume">消耗本金</th> + <th data-field="freeConsume">消耗赠送</th> + + </tr> + </thead> + </table> + </div> + + <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script> + <script type="text/javascript" th:src="@{/js/function/public.js}"></script> + <script type="text/javascript"> + var myGrid; + var initParam = { + format : "yyyy-mm-dd hh:ii", //默认显示年与日,如果想显示十分秒:"yyyy-mm-dd hh:ii:ss" + minView: "hour", //"month",只显示年月日的选择,不会再跳转去选择时分秒;如果想要选择时分秒的:"hour" + } + MTools.ininDatetimepicker(initParam); + //限制结束时间不小于开始时间 + MTools.limitStartEndTime({}); + + $(function() { + MTools.autoFullSelect(); + myGrid = MGrid.initGrid({ + url : basePath+"/admin/vipStatistics/vipConsumeStatistics", + showExport : true, + showFooter : false, + height:'auto', + width:'auto', + exportDataType : "basic", //basic', 'all', 'selected'. + exportTypes : [ 'excel', 'xlsx' ], //导出类型 + exportOptions : { + ignoreColumn : [ 0 ], + fileName : "客户消费统计" + MTools.getTime(), //文件名称设置 + worksheetName : 'Sheet1', //表格工作区名称 + tableName : '客户消费统计', + excelstyles : [ 'background-color', 'color', 'font-size', + 'font-weight' ], + } + }); + + $('[data-toggle="tooltip"]').tooltip() + + }); + + function footCountTitle(data) { + return "<b>合计</b>"; + }; + function countColumn(data) { + console.log(data) + field = this.field; + var resultsumQuantity = parseFloat((data.reduce(function(sum, row) { + console.log(sum,row[field]); + return sum + (+row[field]); + }, 0)).toFixed(2));//保留有效数字 + return "<b>"+resultsumQuantity+"</b>"; + }; + + function buildVipNameJump(value, row, index) { + return '<a onClick="vipDetail(\'' + row.t9 +'\')" class="text-primary " >'+value+'</a>'; + } + + function vipDetail(value) { + layer.full(layer.open({ + type : 2, + title : "订单详情", + maxmin : true, + area : MUI.SIZE_M, + content : [basePath+'/admin/redirect/hive/beautySalon/vip?vipPhone=' + value ] + })); + } + + function exportExcel(){ + + var param=MForm.toUrlParam("#serchform"); + + window.location.href=basePath+"/admin/achieve/exportDailyInfoNew?"+param; + } + + </script> +</body> +</html> diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new.html b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new.html index cb72dd9..e833811 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new.html @@ -71,6 +71,31 @@ <input name="beginTime" type="text" class="form-control datetimepicker" id="beginTime">- <input name="endTime" type="text" class="form-control datetimepicker" id="endTime"> </div> + + <div class="form-group mr-20"> + <label>会员</label> + <input autocomplete="off" placeholder="姓名/编号/电话" name="vipQueryKey" type="text" class="form-control" > + </div> + + <div class="form-group mr-20"> + <label>美疗师</label> + <select class="form-control autoFull select2" + th:data-url="@{/admin/getShopStaffByRoleName?roleName=美疗师}" + data-value="suId" + data-filed="suName" + name="beaultId" + id="beaultId"> + <option value="">--请选择美容师--</option> + </select> + </div> + + <div class="form-group mr-20"> + <label>门店</label> + <select class="form-control autoFull" data-filed="shopName" name="shopId" id="shopId" + th:data-url="@{/admin/shopInfo/findAllWithPermi}"> + <option value=''>--请选择部所属门店--</option> + </select> + </div> </form> @@ -136,7 +161,7 @@ } MTools.ininDatetimepicker(initParam); //限制结束时间不小于开始时间 - MTools.limitStartEndTime({}); + MTools.limitStartEndTime({}); var date = new Date(); var year = date.getFullYear(); diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/store-inout-list.html b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/store-inout-list.html index 224124e..04ef257 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/store-inout-list.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/store-inout-list.html @@ -77,7 +77,7 @@ <th data-field="amount" data-footer-formatter="countColumn">出库数量</th> <th data-field="goodsPrice" >出库单价</th> <th data-field="totalPrice" data-footer-formatter="countColumn">出库金额</th> - <th data-field="orderNo">单据编号</th> + <th data-field="orderNo" data-formatter="buildJumpToDetailInfo" >单据编号</th> <th data-field="orderType">单据类型</th> <th data-field="batch">库存批次</th> <th data-field="userName">操作人</th> @@ -162,7 +162,38 @@ }); } + function buildJumpToDetailInfo(value, row, index) { + console.log(row) + var html = []; + if (row.orderType.indexOf("入库") > 0) { + html[0] = '<a onClick="lookInstore( \'' + row.id +'\')" class="text-primary " >'+value+'</a>'; + } else { + html[0] = '<a onClick="lookOutstore( \'' + row.id +'\')" class="text-primary " >'+value+'</a>'; + } + return html; + } + function lookInstore(id) { + layer.full( + layer.open({ + type: 2, + title: "查看入库单", + area: [MUI.SIZE_L, '400px'], + maxmin: true, + content: [basePath+'/admin/instore/lookInfo?id=' + id] + })); + } + + function lookOutstore(id){ + layer.full( + layer.open({ + type : 2, + title : "查看出库单", + area : [ MUI.SIZE_L, '400px' ], + maxmin : true, + content : [ basePath+'/admin/outstore/lookForm?id=' + id] + })); + } </script> </body> diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/store/projServiceStartpl-list.html b/zq-erp/src/main/resources/templates/views/admin/hive/store/projServiceStartpl-list.html index 7333c1f..f547d4c 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/store/projServiceStartpl-list.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/store/projServiceStartpl-list.html @@ -80,7 +80,13 @@ var myForm=MForm.initForm({ invokeUrl:basePath+"/admin/projService/endPl", afterSubmit:function(){ - parent.myGrid.serchData(); + if (parent.myGrid) { + parent.myGrid.serchData(); + } + + if (parent.app) { + parent.app.serviceOrderQuery(); + } }, }); diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/vip/moneyCardUse-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/vip/moneyCardUse-form.html index 08ab9f2..56eeb3b 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/vip/moneyCardUse-form.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/vip/moneyCardUse-form.html @@ -114,8 +114,14 @@ var myForm = MForm.initForm({ invokeUrl: basePath + "/admin/moneyCardUse/modify", afterSubmit: function () { - parent.myGrid.serchData(); - parent.myGrid2.serchData(); + if(parent.myGrid) { + parent.myGrid.serchData(); + parent.myGrid2.serchData(); + } + + if (parent.app) { + parent.app.refreshTable(); + } }, }); diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/vip/projUse-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/vip/projUse-form.html index 9ef758e..9d530cd 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/vip/projUse-form.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/vip/projUse-form.html @@ -90,7 +90,13 @@ var myForm=MForm.initForm({ invokeUrl:basePath +"/admin/projUser/addOrModify", afterSubmit:function(){ - parent.myGrid.serchData(); + if(parent.myGrid) { + parent.myGrid.serchData(); + } + + if (parent.app) { + parent.app.refreshTable(); + } }, }); </script> diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/vip/sysSkinCheckRecord-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/vip/sysSkinCheckRecord-form.html index e41aa02..08d79ba 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/vip/sysSkinCheckRecord-form.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/vip/sysSkinCheckRecord-form.html @@ -540,7 +540,13 @@ _this.closeForm(); } }); - parent.myGrid.serchData(); + if (parent.myGrid) { + parent.myGrid.serchData(); + } + + if (parent.app) { + parent.app.skinCheckQuery(); + } } }); }, diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/vip/tc-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/vip/tc-form.html index c0e8b27..182a537 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/vip/tc-form.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/vip/tc-form.html @@ -121,7 +121,13 @@ myForm = MForm.initForm({ invokeUrl : basePath+"/admin/taoCanUser/addOrModify", afterSubmit : function() { - parent.myGrid.serchData(); + if(parent.myGrid) { + parent.myGrid.serchData(); + } + + if (parent.app) { + parent.app.refreshTable(); + } }, }); }); diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-list.html b/zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-list.html index fa3bdd4..eb9ef2a 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-list.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-list.html @@ -116,7 +116,7 @@ <button matrix:btn="vipInfo-projTaocan" onclick="openTc()" type="button" class="btn btn-info btn-sm"><i class="fa fa-cubes"></i> 套餐管理</button> <button matrix:btn="vipInfo-projTaocan" onclick="openMoneyCard()" type="button" class="btn btn-info btn-sm"><i class="fa fa-credit-card"></i> 充值卡管理</button> - <button onclick="importProjUse()" type="button" class="btn btn-info btn-sm"><i class="fa fa-history"></i> 导入项目</button> + <button onclick="importProjUse()" type="button" class="btn btn-info btn-sm"><i class="fa fa-history"></i> 导入项目</button> <button matrix:fn="orderClub" onclick="openOrder()" type="button" class="btn btn-info btn-sm"><i class="fa fa-history"></i> 消费订单</button> <button matrix:fn="serviceClub" onclick="openServiceOrder()" type="button" class="btn btn-info btn-sm"><i class="fa fa-history"></i> 服务单</button> @@ -142,6 +142,7 @@ <th data-field="vipState">会员活跃度</th> <th data-field="arrivalWay">到店途径</th> <th data-field="staffName">健康顾问</th> + <th data-field="staffName" data-formatter="buildOperation">操作</th> </tr> </thead> </table> @@ -168,6 +169,34 @@ }); }); + + var btns=[]; + btns[0]=""; + function buildOperation(value, row, index) { + var html = ""; + html += '<a class="text-info" href="javascript:void(0)" onClick="openVipDetail(\''+row.phone+'\')">查看详情</a> ' + return html; + } + + function openVipDetail(value) { + layer.full(layer.open({ + type : 2, + title : "会员详情", + area : [ MUI.SIZE_L, '450px' ], + maxmin : true, + content : [ basePath+'/admin/redirect/hive/beautySalon/vip?vipPhone=' + value ] + })); + } + + function openVipDetail2(value) { + layer.full(layer.open({ + type : 2, + title : "会员详情", + area : [ MUI.SIZE_L, '450px' ], + maxmin : true, + content : [ basePath+'/admin/redirect/hive/beautySalon/vip_detail?vipPhone=' + value ] + })); + } function updateVipInfos() { if(myGrid.getSelectItemsIds()==""){ layer.msg("请至少选择一名会员!", { @@ -190,7 +219,7 @@ * 构建会员名称 */ function getVipName(value, row, index){ - if(row.isDeal==1){ + if(row.isDeal==2){ return value+" <span class='label-danger'>新</span>" }else{ return value; -- Gitblit v1.9.1