From 78472da3395d1db45b6a76688c72a2c2a372c47a Mon Sep 17 00:00:00 2001 From: jyy <jyy> Date: Sat, 31 Jul 2021 17:42:05 +0800 Subject: [PATCH] Merge branch 'score_shop' into api_score_meger --- zq-erp/src/main/java/com/matrix/system/common/bean/SysUsers.java | 10 + zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java | 5 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/underlineOrder.html | 9 + zq-erp/src/main/java/com/matrix/system/common/tools/DataAuthUtil.java | 9 + zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java | 2 zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java | 9 zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpVipInfoController.java | 20 -- zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java | 21 +-- zq-erp/src/main/resources/templates/views/admin/hive-erp/vip/vipInfo-list.html | 23 +-- zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-list.html | 20 -- zq-erp/src/main/java/com/matrix/system/common/bean/SysRole.java | 13 ++ zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java | 25 +++- zq-erp/src/main/resources/mybatis/mapper/common/SysRoleDao.xml | 14 ++ /dev/null | 93 --------------- zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsController.java | 2 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html | 14 ++ zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service_all_list.html | 9 + zq-erp/src/main/resources/templates/views/admin/sys/sysRole-form.html | 8 + zq-erp/src/main/java/com/matrix/system/app/action/ApiVipInfoAction.java | 11 - zq-erp/src/main/java/com/matrix/system/common/tag/MatrixProcessorDialect.java | 1 zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml | 7 + 21 files changed, 145 insertions(+), 180 deletions(-) diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiVipInfoAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiVipInfoAction.java index d9987fd..e7e992d 100644 --- a/zq-erp/src/main/java/com/matrix/system/app/action/ApiVipInfoAction.java +++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiVipInfoAction.java @@ -2,8 +2,6 @@ import com.matrix.core.constance.MatrixConstance; import com.matrix.core.pojo.AjaxResult; -import com.matrix.core.pojo.PaginationVO; -import com.matrix.core.tools.EncrypUtil; import com.matrix.core.tools.StringUtils; import com.matrix.core.tools.WebUtil; import com.matrix.system.app.dto.AddVipDto; @@ -17,11 +15,9 @@ import com.matrix.system.common.bean.SysUsers; import com.matrix.system.common.dao.CustomerDataDictionaryDao; import com.matrix.system.common.tools.DataAuthUtil; -import com.matrix.system.common.tools.PasswordUtil; import com.matrix.system.hive.action.BaseController; 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.VipAnswerDao; import com.matrix.system.hive.plugin.util.CollectionUtils; import com.matrix.system.hive.service.MoneyCardUseService; @@ -36,8 +32,6 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import java.io.UnsupportedEncodingException; -import java.security.NoSuchAlgorithmException; import java.util.List; /** @@ -81,10 +75,15 @@ vipInfoListDto.setOrder("asc"); } + int offset = (vipInfoListDto.getPageNum() - 1) * vipInfoListDto.getPageSize(); int limit = vipInfoListDto.getPageSize(); vipInfoListDto.setOffset(offset); vipInfoListDto.setLimit(limit); + + + + return AjaxResult.buildSuccessInstance(sysVipInfoService.findVipAddressBook(vipInfoListDto)); } diff --git a/zq-erp/src/main/java/com/matrix/system/common/bean/SysRole.java b/zq-erp/src/main/java/com/matrix/system/common/bean/SysRole.java index 0e2d574..a6a67c6 100644 --- a/zq-erp/src/main/java/com/matrix/system/common/bean/SysRole.java +++ b/zq-erp/src/main/java/com/matrix/system/common/bean/SysRole.java @@ -59,6 +59,11 @@ private String plates; /** + * 所有客户权限 + */ + private String coustomer; + + /** * 功能集合 */ @Extend @@ -76,6 +81,14 @@ @Extend private String menuKeys; + public String getCoustomer() { + return coustomer; + } + + public void setCoustomer(String coustomer) { + this.coustomer = coustomer; + } + public Integer getIsDefault() { return isDefault; } diff --git a/zq-erp/src/main/java/com/matrix/system/common/bean/SysUsers.java b/zq-erp/src/main/java/com/matrix/system/common/bean/SysUsers.java index c8fe8d7..dcadb31 100644 --- a/zq-erp/src/main/java/com/matrix/system/common/bean/SysUsers.java +++ b/zq-erp/src/main/java/com/matrix/system/common/bean/SysUsers.java @@ -244,6 +244,7 @@ private String shopName; + private String allCustomer; private String roleName; @@ -272,6 +273,7 @@ private String departName; + /** * 入职时间区域查询 **/ @@ -286,6 +288,14 @@ @Extend private SysCompany company; + public String getAllCustomer() { + return allCustomer; + } + + public void setAllCustomer(String allCustomer) { + this.allCustomer = allCustomer; + } + public Long getSuId() { return suId; } diff --git a/zq-erp/src/main/java/com/matrix/system/common/tag/ButtonRoleJsTagProcessor.java b/zq-erp/src/main/java/com/matrix/system/common/tag/ButtonRoleJsTagProcessor.java deleted file mode 100644 index b7c86af..0000000 --- a/zq-erp/src/main/java/com/matrix/system/common/tag/ButtonRoleJsTagProcessor.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.matrix.system.common.tag; - -import com.matrix.core.tools.WebUtil; - -import com.matrix.system.common.authority.AuthorityManager; -import com.matrix.system.common.authority.DefaultAuthorityManager; -import com.matrix.system.common.constance.AppConstance; -import org.thymeleaf.IEngineConfiguration; -import org.thymeleaf.context.ITemplateContext; -import org.thymeleaf.engine.AttributeName; -import org.thymeleaf.model.IProcessableElementTag; -import org.thymeleaf.processor.element.AbstractAttributeTagProcessor; -import org.thymeleaf.processor.element.IElementTagStructureHandler; -import org.thymeleaf.standard.expression.IStandardExpression; -import org.thymeleaf.standard.expression.IStandardExpressionParser; -import org.thymeleaf.standard.expression.StandardExpressions; -import org.thymeleaf.templatemode.TemplateMode; - -/** - * 页面按钮权限类 - * - * @author jiangyouyao - * @email 512061637@qq.com - * @date 2019年2月25日 - */ -public class ButtonRoleJsTagProcessor extends AbstractAttributeTagProcessor { - - /** - * 标签名 - */ - private static final String ATTR_NAME = "bt"; - - /** - * 优先级 - */ - private static final int PRECEDENCE = 10000; - - public ButtonRoleJsTagProcessor(final String dialectPrefix) { - super( // This processor will apply only to HTML mode - TemplateMode.HTML, - // Prefix to be applied to name for matching - dialectPrefix, - // No tag name: match any tag name - null, - // No prefix to be applied to tag name - false, - // Name of the attribute that will be matched - ATTR_NAME, - // Apply dialect prefix to attribute name - true, - // Precedence (inside dialect's own precedence) - PRECEDENCE, - // Remove the matched attribute afterwards - true); - } - - /** - * 自定义标签主方法 - * - * @author jiangyouyao - * @email 512061637@qq.com - * @date 2019年1月12日 - * @param context - * @param tag - * @param attributeName - * @param attributeValue - * @param structureHandler - */ - @Override - protected void doProcess(ITemplateContext context, IProcessableElementTag tag, AttributeName attributeName, - String attributeValue, IElementTagStructureHandler structureHandler) { - final IEngineConfiguration configuration = context.getConfiguration(); - - // Obtain the Thymeleaf Standard Expression parser - final IStandardExpressionParser parser = StandardExpressions.getExpressionParser(configuration); - - // Parse the attribute value as a Thymeleaf Standard Expression - final IStandardExpression expression = parser.parseExpression(context, attributeValue); - - // 标签的值 功能code-add 这种类型 - final String attrValue = expression.execute(context).toString(); - - // 此时根据当前登录用户判断是否有该权限 - AuthorityManager authority = (DefaultAuthorityManager) WebUtil.getBean(AppConstance.DEFAULT_AUTHORITYMANAGER); - - if (!authority.isBtnPermitted(attrValue)) { - // 如果没有该按钮权限,则直接移除该模块 - structureHandler.removeElement(); - } - - } - -} diff --git a/zq-erp/src/main/java/com/matrix/system/common/tag/MatrixProcessorDialect.java b/zq-erp/src/main/java/com/matrix/system/common/tag/MatrixProcessorDialect.java index 69099cc..64fb884 100644 --- a/zq-erp/src/main/java/com/matrix/system/common/tag/MatrixProcessorDialect.java +++ b/zq-erp/src/main/java/com/matrix/system/common/tag/MatrixProcessorDialect.java @@ -47,7 +47,6 @@ public Set<IProcessor> getProcessors(final String dialectPrefix) { final Set<IProcessor> processors = new HashSet<IProcessor>(); processors.add(new ButtonRoleAttributeTagProcessor(dialectPrefix)); - processors.add(new ButtonRoleJsTagProcessor(dialectPrefix)); processors.add(new ButtonRoleFnTagProcessor(dialectPrefix)); // This will remove the xmlns:matrix attributes we might add for IDE validation processors.add(new StandardXmlNsTagProcessor(TemplateMode.HTML, dialectPrefix)); diff --git a/zq-erp/src/main/java/com/matrix/system/common/tools/DataAuthUtil.java b/zq-erp/src/main/java/com/matrix/system/common/tools/DataAuthUtil.java index 96be8be..9e0a932 100644 --- a/zq-erp/src/main/java/com/matrix/system/common/tools/DataAuthUtil.java +++ b/zq-erp/src/main/java/com/matrix/system/common/tools/DataAuthUtil.java @@ -25,4 +25,13 @@ } + /** + * 可以查询所有会员 + * @return + */ + public static boolean hasAllCustomerAuth() { + SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); + return user.getShopRole().equals(Dictionary.FLAG_YES_Y) || user.getSuUserType().equals(AppConstance.USER_TYPE_ADMIN); + + } } diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java index 4e5e2cd..f99ea96 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java @@ -14,6 +14,7 @@ import com.matrix.core.tools.excl.ExcelVersion; import com.matrix.system.common.bean.SysUsers; import com.matrix.system.common.dao.SysCompanyDao; +import com.matrix.system.common.tools.DataAuthUtil; import com.matrix.system.common.tools.ResponseHeadUtil; import com.matrix.system.constance.Dictionary; import com.matrix.system.hive.bean.*; @@ -204,7 +205,9 @@ if (StringUtils.isBlank(pageVo.getOrder())) { pageVo.setOrder("desc"); } - sysOrder.setShopId(getMe().getShopId()); + if (!DataAuthUtil.hasAllShopAuth()) { + sysOrder.setShopId(getMe().getShopId()); + } return new AjaxResult(AjaxResult.STATUS_SUCCESS, orderService.findInPage(sysOrder, pageVo), orderService.findTotal(sysOrder)); } diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java index e570d17..a8f8c09 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java @@ -278,7 +278,7 @@ List<Object> objects = taocanDataList.get(j); LogUtil.info("导入套餐第" + j + "行" + objects); Object vipName = objects.get(0); - String vipNameStr = vipName.toString(); + String vipNameStr = vipName==null?"":vipName.toString(); if (taocan == null || (taocan != null && StringUtils.isNotBlank(vipNameStr))) { //切换下一个套餐 diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsController.java index f70a262..ce3fe59 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsController.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsController.java @@ -23,7 +23,6 @@ import com.matrix.system.hive.dao.SysShopInfoDao; import com.matrix.system.hive.service.ShoppingGoodsService; import com.matrix.system.hive.service.SysShopInfoService; -import org.apache.poi.ss.formula.functions.T; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; @@ -191,6 +190,7 @@ } } shoppingGoods.setIsDel(ShoppingGoods.NORMAL); + shoppingGoods.setStaus(Dictionary.BUSINESS_STATE_UP); List<ShoppingGoods> dataList = shoppingGoodsService.findInPage(shoppingGoods, pageVo); AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList, shoppingGoodsService.findTotal(shoppingGoods)); return result; 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 3aefd94..9edf94f 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 @@ -18,6 +18,7 @@ import com.matrix.system.common.dao.CustomerDataDictionaryDao; import com.matrix.system.common.service.SysUsersService; import com.matrix.system.common.service.SystemDictionaryService; +import com.matrix.system.common.tools.DataAuthUtil; import com.matrix.system.common.tools.ResponseHeadUtil; import com.matrix.system.constance.Dictionary; import com.matrix.system.hive.action.util.QueryUtil; @@ -31,7 +32,6 @@ import com.matrix.system.score.dao.ScoreVipDetailDao; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -41,7 +41,6 @@ import java.io.File; import java.io.IOException; import java.io.OutputStream; -import java.net.URLDecoder; import java.net.URLEncoder; import java.util.ArrayList; import java.util.Arrays; @@ -548,25 +547,17 @@ } @RequestMapping(value = "/exportExcel") - public void report(ModelMap model, HttpServletRequest request, HttpServletResponse response, + public void report( HttpServletResponse response, SysVipInfo vipInfo) throws IOException { - if (vipInfo.getVipType() != null && !(vipInfo.getVipType().equals(""))) { - vipInfo.setVipType(URLDecoder.decode(vipInfo.getVipType(), "UTF-8")); - } - if (vipInfo.getVipName() != null && !"".equals(vipInfo.getVipName())) { - vipInfo.setVipName(URLDecoder.decode(vipInfo.getVipName(), "UTF-8")); - } - if (vipInfo.getArrivalWay() != null && !"".equals(vipInfo.getArrivalWay())) { - vipInfo.setArrivalWay(URLDecoder.decode(vipInfo.getArrivalWay(), "UTF-8")); - } - if (vipInfo.getVipState() != null && !"".equals(vipInfo.getVipState())) { - vipInfo.setVipState(URLDecoder.decode(vipInfo.getVipState(), "UTF-8")); + SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); + if(!DataAuthUtil.hasAllShopAuth()){ + vipInfo.setShopId(sysUsers.getShopId()); } List<ExcelSheetPO> res = new ArrayList<>(); ExcelSheetPO orderSheet = new ExcelSheetPO(); - String title = "每日单据明细"; + String title = "会员资料"; orderSheet.setSheetName(title); orderSheet.setTitle(title); String[] header = {"会员编号", "姓名", "性别", "手机号码", "会员类型", "会员活跃度", "到店途径", "健康顾问", "所属门店"}; 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 8882850..36773cc 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 @@ -1239,11 +1239,20 @@ //赠送项目是否计算消耗业绩否则 赠送产品按原价计算消耗 boolean zsConsumeAchieve = projServicesService.skipServiceOrderStep(Dictionary.ZS_CONSUME_ACHIEVE); if(zsConsumeAchieve){ - if (taocanId == null) { - puse.setPrice(goodsAssemble.getShoppingGoods().getPrice() ); - } else { - puse.setPrice(goodsAssemble.getPrice()); + if(sysOrderItem.getPrice()>0){ + + + + + }else{ + //等于0取原价 + if (taocanId == null) { + puse.setPrice(goodsAssemble.getShoppingGoods().getPrice() ); + } else { + puse.setPrice(goodsAssemble.getPrice()); + } } + }else{ puse.setPrice(0D); } @@ -1347,7 +1356,11 @@ //赠送项目是否计算消耗业绩否则 赠送产品按原价计算消耗 boolean zsConsumeAchieve = projServicesService.skipServiceOrderStep(Dictionary.ZS_CONSUME_ACHIEVE); if(zsConsumeAchieve){ - puse.setPrice(sysOrderItem.getShoppingGoods().getSealPice()); + if(sysOrderItem.getPrice()>0){ + puse.setPrice(sysOrderItem.getZkPrice()); + }else{ + puse.setPrice(sysOrderItem.getShoppingGoods().getSealPice()); + } }else{ puse.setPrice(0D); } @@ -1679,7 +1692,7 @@ int sub = sysProjUse.getSurplusCount() - item.getCount(); if (sub < 0) { - throw new GlobleException("项目余次不足"); + throw new GlobleException("项目余次不足"); }else if(sub==0){ sysProjUse.setIsOver(Dictionary.FLAG_YES_Y); sysProjUse.setStatus(Dictionary.TAOCAN_STATUS_WX); 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 927d041..8980936 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 @@ -17,6 +17,7 @@ import com.matrix.system.common.bean.BusParameterSettings; import com.matrix.system.common.bean.SysUsers; import com.matrix.system.common.dao.BusParameterSettingsDao; +import com.matrix.system.common.tools.DataAuthUtil; import com.matrix.system.common.tools.ServiceUtil; import com.matrix.system.constance.Dictionary; import com.matrix.system.constance.TableMapping; @@ -429,10 +430,10 @@ @Override public List<VipInfoListVo> findVipAddressBook(VipInfoListDto vipInfoListDto) { //todo 会员查询单独做控制 -// SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); -// if (!DataAuthUtil.hasAllShopAuth()) { -// vipInfoListDto.setShopId(sysUsers.getShopId()); -// } + SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); + if (!DataAuthUtil.hasAllCustomerAuth()) { + vipInfoListDto.setShopId(sysUsers.getShopId()); + } QueryUtil.setQueryLimitCom(vipInfoListDto); return sysVipInfoDao.selectVipAddressBookByList(vipInfoListDto); } diff --git a/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpVipInfoController.java b/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpVipInfoController.java index bc1e2a2..20c9780 100644 --- a/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpVipInfoController.java +++ b/zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpVipInfoController.java @@ -33,7 +33,6 @@ import com.matrix.system.hive.service.SysVipLevelService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; @@ -44,7 +43,6 @@ import java.io.IOException; import java.io.OutputStream; import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; import java.net.URLEncoder; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; @@ -401,26 +399,16 @@ } @RequestMapping(value = "/exportExcel") - public void report(ModelMap model, HttpServletRequest request, HttpServletResponse response, + public void report(HttpServletResponse response, SysVipInfo vipInfo) throws IOException { + QueryUtil.setQueryLimitCom(vipInfo ); - if (vipInfo.getVipType() != null && !(vipInfo.getVipType().equals(""))) { - vipInfo.setVipType(URLDecoder.decode(vipInfo.getVipType(), "UTF-8")); - } - if (vipInfo.getVipName() != null && !"".equals(vipInfo.getVipName())) { - vipInfo.setVipName(URLDecoder.decode(vipInfo.getVipName(), "UTF-8")); - } - if (vipInfo.getArrivalWay() != null && !"".equals(vipInfo.getArrivalWay())) { - vipInfo.setArrivalWay(URLDecoder.decode(vipInfo.getArrivalWay(), "UTF-8")); - } - if (vipInfo.getVipState() != null && !"".equals(vipInfo.getVipState())) { - vipInfo.setVipState(URLDecoder.decode(vipInfo.getVipState(), "UTF-8")); - } + List<ExcelSheetPO> res = new ArrayList<>(); ExcelSheetPO orderSheet = new ExcelSheetPO(); - String title = "每日单据明细"; + String title = "会员资料"; orderSheet.setSheetName(title); orderSheet.setTitle(title); String[] header = {"会员编号", "姓名", "性别", "手机号码", "会员类型", "会员活跃度", "到店途径", "健康顾问", "所属门店"}; diff --git a/zq-erp/src/main/resources/mybatis/mapper/common/SysRoleDao.xml b/zq-erp/src/main/resources/mybatis/mapper/common/SysRoleDao.xml index c4b7ee8..3aeda07 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/common/SysRoleDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/common/SysRoleDao.xml @@ -12,6 +12,7 @@ <result property="companyId" column="company_id" /> <result property="plates" column="plates" /> <result property="shopAble" column="shop_able" /> + <result property="coustomer" column="coustomer" /> </resultMap> @@ -31,6 +32,7 @@ company_id, plates, is_default, + coustomer, shop_able ) VALUES ( @@ -44,6 +46,7 @@ #{companyId}, #{plates}, #{isDefault}, + #{coustomer}, #{shopAble} ) </insert> @@ -63,6 +66,7 @@ company_id, plates, is_default, + coustomer, shop_able ) VALUES @@ -78,6 +82,7 @@ #{item.companyId}, #{item.plates}, #{item.isDefault}, + #{item.coustomer}, #{item.shopAble} ) </foreach> @@ -110,6 +115,9 @@ <if test="_parameter.containsKey('shopAble')"> shop_able = #{shopAble}, </if> + <if test="_parameter.containsKey('coustomer')"> + coustomer = #{coustomer}, + </if> </set> WHERE role_id=#{roleId} </update> @@ -141,6 +149,9 @@ </if> <if test="(shopAble!=null and shopAble!='') or (shopAble!='' and shopAble==0)"> shop_able = #{shopAble}, + </if> + <if test="(coustomer!=null and coustomer!='') or (coustomer!='' and coustomer==0)"> + coustomer = #{coustomer}, </if> </set> WHERE role_id=#{roleId} @@ -206,6 +217,7 @@ company_id, plates, is_default, + coustomer, shop_able from sys_role <where> @@ -291,6 +303,7 @@ company_id, plates, is_default, + coustomer, shop_able from sys_role where role_id=#{roleId} @@ -323,6 +336,7 @@ company_id, plates, is_default, + coustomer, shop_able from sys_role <where> diff --git a/zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml b/zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml index 0daf98d..615593d 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml @@ -56,6 +56,7 @@ <result property="signOrder" column="SIGN_ORDER"/> <result property="signDate" column="SIGN_DATE"/> <result property="salarGrad" column="salarGrad"/> + <result property="allCustomer" column="allCustomer"/> <!-- 扩展属性 --> <result property="shopName" column="SHOP_NAME"/> @@ -655,6 +656,8 @@ select *, (SELECT IF(COUNT(1)>0,'Y','N') FROM sys_role a WHERE FIND_IN_SET(a.role_id,role_ids) AND role_remark ='是') shopRole, + (SELECT IF(COUNT(1)>0,'Y','N') FROM sys_role a WHERE FIND_IN_SET(a.role_id,role_ids) AND customer ='是') + allCustomer, (select GROUP_CONCAT(role_name separator ',') from sys_role where find_in_set(role_id,role_ids) ) roleName, (select com_name from sys_company where com_id=company_id) as company_name, (select shop_name from sys_shop_info where shop_id=id) as SHOP_NAME @@ -937,6 +940,8 @@ <select id="selectById" resultMap="SysUsersMap"> select *, (SELECT IF(COUNT(1)>0,'Y','N') FROM sys_role a WHERE FIND_IN_SET(a.role_id,role_ids) AND role_remark ='是') shopRole, + (SELECT IF(COUNT(1)>0,'Y','N') FROM sys_role a WHERE FIND_IN_SET(a.role_id,role_ids) AND customer ='是') + allCustomer, (select GROUP_CONCAT(role_name separator ',') from sys_role where find_in_set(role_id,role_ids) ) roleName, role_ids from sys_users @@ -949,6 +954,8 @@ select *, (SELECT IF(COUNT(1)>0,'Y','N') FROM sys_role a WHERE FIND_IN_SET(a.role_id,role_ids) AND role_remark ='是') shopRole, + (SELECT IF(COUNT(1)>0,'Y','N') FROM sys_role a WHERE FIND_IN_SET(a.role_id,role_ids) AND customer ='是') + allCustomer, (select GROUP_CONCAT(role_name separator ',') from sys_role where find_in_set(role_id,role_ids) ) roleName, role_ids from sys_users diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/vip/vipInfo-list.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/vip/vipInfo-list.html index 53fea6a..c26f320 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/vip/vipInfo-list.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/vip/vipInfo-list.html @@ -110,12 +110,12 @@ <!-- 功能按钮部分 --> <div id="option-bar" > - <button matrix:fn="mdhyzl-edit" onclick="openEdit()" type="button" class="btn btn-success btn-sm "><i + <button matrix:btn="mdhyzl-edit" onclick="openEdit()" type="button" class="btn btn-success btn-sm "><i class="fa fa-edit"></i>编辑 </button> - <button matrix:fn="mdhyzl-gjjl" onclick="openFollow()" type="button" class="btn btn-info btn-sm"><i class="fa fa-edit" ></i> 跟进记录</button> - <button matrix:fn="mdhyzl-khda" onclick="openArchieves()" type="button" class="btn btn-info btn-sm"><i class="fa fa-edit" ></i> 客户档案</button> - <button matrix:btn="mdhyzl-excelOut" onclick="exportExcel()" type="button" class="btn btn-info btn-sm"><i class="fa fa-download" ></i> 导出</button> + <button matrix:btn="mdhyzl-gjjl" onclick="openFollow()" type="button" class="btn btn-info btn-sm"><i class="fa fa-edit" ></i> 跟进记录</button> + <button matrix:btn="mdhyzl-khda" onclick="openArchieves()" type="button" class="btn btn-info btn-sm"><i class="fa fa-edit" ></i> 客户档案</button> + <button matrix:btn="mdhyzl-exportExcel" onclick="exportExcel()" type="button" class="btn btn-info btn-sm"><i class="fa fa-download" ></i> 导出</button> </div> <!-- 数据表格部分 --> @@ -203,19 +203,8 @@ //导出 function exportExcel() { - var name = $("#search-text").attr("name"); - var value = $("#search-text").val(); - var vipType = $("#vipType").val(); - var arrivalWay = $("#arrivalWay").val(); - var vipState = $("#vipState").val(); - var staffId = $("#staffId").val(); - var shopId = $("#shopId").val(); - window.location.href = basePath+"/admin/vipInfo/exportExcel?vipType=" - + encodeURI(encodeURI(vipType)) + "&arrivalWay=" - + encodeURI(encodeURI(arrivalWay)) + "&"+name+"=" - + encodeURI(encodeURI(value)) + "&vipState=" - + encodeURI(encodeURI(vipState)) + "&shopId=" + shopId - + "&staffId=" + staffId; + var param=MForm.toUrlParam("#serchform"); + window.location.href=basePath+"/hiveErp/vipInfo/exportExcel?"+param; } //打开编辑界面 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 35fe872..6a86a31 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 @@ -175,6 +175,15 @@ </el-col> </el-row> <el-row class="vertical "> + <el-select v-model="goodsType" placeholder="商品类型" style="width: 120px" > + <el-option + v-for="item in goodsTypeList" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> <el-input class="searchInput" @input="searchGoods()" v-model="queryKey" placeholder="搜索添加产品"></el-input> <el-button @click="searchGoods()" type="primary">搜索</el-button> @@ -582,7 +591,8 @@ var app = new Vue({ el: '#app', data: { - + goodsType:"", + goodsTypeList:[{value:"",label:"全部"},{value:"套餐",label:"套餐"},{value:"项目",label:"项目"},{value:"充值卡",label:"充值卡"}], //业绩设置框 drawer: false, direction: 'rtl', @@ -1219,7 +1229,7 @@ app: _this, contentType: 'application/x-www-form-urlencoded', //TODO 优化下拉加载 - data: {name: _this.queryKey, limit: pageSize, offset : offset}, + data: {name: _this.queryKey,goodType:_this.goodsType , limit: pageSize, offset : offset}, url: basePath + "/admin/shoppinggoods/showList", callback: function (data) { _this.searchTableData = data.rows; diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service_all_list.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service_all_list.html index 17397a9..cfcf888 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service_all_list.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service_all_list.html @@ -71,7 +71,13 @@ <input autocomplete="off" name="closureTime" type="text" class="form-control datetimepicker" id="endTime"> </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/findAll}"> + <option value=''>--请选择部所属门店--</option> + </select> + </div> <input type="hidden" value="待预约" name="state" id="state"/> <div class="form-group mr-20"> <button type="button" class="btn btn-my btn-sm" id="btn4" value="">全部</button> @@ -115,6 +121,7 @@ <th data-field="totalTime" data-sortable="true">服务时长</th> <th data-field="isOverTime" data-formatter="overTime">超时时间</th> <th data-field="createStaffName">下单顾问</th> + <th data-field="shopName">门店</th> <th data-sortable="true" data-field="id" data-formatter="buidOperate">操作</th> </tr> </thead> diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/underlineOrder.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/underlineOrder.html index 787fd6f..5bc8e86 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/underlineOrder.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/underlineOrder.html @@ -40,6 +40,14 @@ <input autocomplete="off" name="endTimeVo" type="text" class="form-control datetimepicker" id="endTime"> </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/findAll}"> + <option value=''>--请选择部所属门店--</option> + </select> + </div> + <input autocomplete="off" type="hidden" name="statu" value="待付款" id="statu"/> <div class="form-group mr-20"> <button type="button" class="btn btn-my btn-sm" id="btn0" value="" >全部</button> @@ -89,6 +97,7 @@ <th data-field="statu">订单状态</th> <th data-field="remark">备注</th> + <th data-field="shopName">门店</th> </tr> </thead> 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 eb9ef2a..2ad4dad 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 @@ -121,7 +121,7 @@ <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> <button matrix:btn="vipInfo-add" onclick="openAdd()" type="button" class="btn btn-info btn-sm"><i class="fa fa-plus" ></i> 新增</button> - <button matrix:btn="vipInfo-excelOut" onclick="exportExcel()" type="button" class="btn btn-info btn-sm"><i class="fa fa-download" ></i> 导出</button> + <button matrix:btn="vipInfo-exportExcel" onclick="exportExcel()" type="button" class="btn btn-info btn-sm"><i class="fa fa-download" ></i> 导出</button> <button matrix:btn="vipInfo-allot" onclick="updateVipInfos()" type="button" class="btn btn-info btn-sm"><i class="" ></i>批量设置健康顾问</button> <button onclick="skinCheck()" type="button" class="btn btn-info btn-sm"><i class="" ></i>皮肤检测管理</button> <button onclick="importVipInfo()" type="button" class="btn btn-info btn-sm"><i class="" ></i>导入会员</button> @@ -402,20 +402,10 @@ } //导出 - function exportExcel() { - var name = $("#search-text").attr("name"); - var value = $("#search-text").val(); - var vipType = $("#vipType").val(); - var arrivalWay = $("#arrivalWay").val(); - var vipState = $("#vipState").val(); - var staffId = $("#staffId").val(); - window.location.href = basePath+"/admin/vipInfo/exportExcel?vipType=" - + encodeURI(encodeURI(vipType)) + "&arrivalWay=" - + encodeURI(encodeURI(arrivalWay)) + "&"+name+"=" - + encodeURI(encodeURI(value)) + "&vipState=" - + encodeURI(encodeURI(vipState)) - + "&staffId=" + staffId; - } + function exportExcel() { + var param=MForm.toUrlParam("#serchform"); + window.location.href=basePath+"/admin/vipInfo/exportExcel?"+param; + } </script> diff --git a/zq-erp/src/main/resources/templates/views/admin/sys/sysRole-form.html b/zq-erp/src/main/resources/templates/views/admin/sys/sysRole-form.html index f28fefb..6b1a93f 100644 --- a/zq-erp/src/main/resources/templates/views/admin/sys/sysRole-form.html +++ b/zq-erp/src/main/resources/templates/views/admin/sys/sysRole-form.html @@ -60,7 +60,13 @@ </div> </div> <div class="form-group"> - + <label class="col-sm-2 control-label">可查询所有门店客户</label> + <div class="col-sm-4"> + <select class="form-control" name="coustomer"> + <option th:selected="${obj?.coustomer == '是'}" >是</option> + <option th:selected="${obj?.coustomer == '否'}" >否</option> + </select> + </div> <label class="col-sm-2 control-label">是否允许门店分配本角色</label> <div class="col-sm-4"> <select class="form-control" name="shopAble"> -- Gitblit v1.9.1