Merge remote-tracking branch 'origin/api' into hive2.0
# Conflicts:
# zq-erp/src/main/resources/config/application.properties
14 files modified
2 files added
| | |
| | | SysShopInfo zbShop = shopInfoDao.selectZbShop(user.getCompanyId()); |
| | | ShoppingGoodsCategory category = new ShoppingGoodsCategory(); |
| | | category.setShopId(zbShop.getId()); |
| | | return AjaxResult.buildSuccessInstance(shoppingGoodsCategoryService.findByModel(category)); |
| | | List<ShoppingGoodsCategory> list = new ArrayList<>(); |
| | | List<ShoppingGoodsCategory> byModel = shoppingGoodsCategoryService.findByModel(category); |
| | | ShoppingGoodsCategory type = new ShoppingGoodsCategory(); |
| | | type.setName("全部"); |
| | | type.setParentId(0L); |
| | | list.add(type); |
| | | list.addAll(byModel); |
| | | return AjaxResult.buildSuccessInstance(list); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取商品列表", notes = "获取商品列表") |
| | |
| | | query.setCompanyId(sysUsers.getCompanyId()); |
| | | query.setShopId(sysUsers.getShopId()); |
| | | } |
| | | query.setSuUserType("employee"); |
| | | query.setSuName(usersQueryDto.getQueryKey()); |
| | | List<SysUsers> list = sysUsersService.findByModel(query); |
| | | List<BeauticianVo> dataList = SysUsersMapper.INSTANCE.usersListToBeautyList(list); |
| | |
| | | return result; |
| | | } |
| | | |
| | | @RequestMapping(value = "/getUserById") |
| | | public @ResponseBody |
| | | AjaxResult getUserById(Long id) { |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(""); |
| | | SysUsers user = sysUsersService.findById(id); |
| | | result.putInMap("user", user); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 条件查询所有员工,不分页 |
| | |
| | | |
| | | String SEX_MAN ="男"; |
| | | String SEX_WOMAN ="女"; |
| | | |
| | | String[] COLORS = { "#57c5d2", "#e3565e", "#2f343a", "#4d98db", "#4fbc9d", "#be9d4c"}; |
| | | } |
| | |
| | | orderService.updateReceiptMoney(sysOrder); |
| | | |
| | | //发送微信公众号提醒 |
| | | UniformMsgParam uniformMsgParam=new UniformMsgParam(user.getCompanyId(),UniformMsgParam.GZH_GMCG); |
| | | uniformMsgParam.put("orderId",sysOrder.getId()); |
| | | rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG+evn,uniformMsgParam.toJSONString()); |
| | | // UniformMsgParam uniformMsgParam=new UniformMsgParam(user.getCompanyId(),UniformMsgParam.GZH_GMCG); |
| | | // uniformMsgParam.put("orderId",sysOrder.getId()); |
| | | // rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG+evn,uniformMsgParam.toJSONString()); |
| | | |
| | | |
| | | //处理用户购买的产品 |
| | |
| | | package com.matrix.system.hive.action; |
| | | |
| | | 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.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.SysVipLabel; |
| | | import com.matrix.system.hive.dao.SysVipLabelDao; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | |
| | | /** |
| | | * @author wzy |
| | |
| | | @Autowired |
| | | private SysVipLabelDao sysVipLabelDao; |
| | | |
| | | |
| | | @RequestMapping(value = "/showList") |
| | | @ResponseBody |
| | | private AjaxResult showList(SysVipLabel sysVipLabel, PaginationVO pageVo) { |
| | | SysUsers user = getMe(); |
| | | sysVipLabel.setCompanyId(user.getCompanyId()); |
| | | return AjaxResult.buildSuccessInstance(sysVipLabelDao.selectInPage(sysVipLabel, pageVo), sysVipLabelDao.selectTotal(sysVipLabel)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public AjaxResult add(SysVipLabel sysVipLabel) { |
| | | SysUsers sysUsers = getMe(); |
| | | |
| | | sysVipLabel.setIsAll(1); |
| | | sysVipLabel.setCompanyId(sysUsers.getCompanyId()); |
| | | List<SysVipLabel> sysVipLabels = sysVipLabelDao.selectByModel(sysVipLabel); |
| | | if (CollectionUtils.isNotEmpty(sysVipLabels)) { |
| | | return AjaxResult.buildFailInstance("已存在该标签"); |
| | |
| | | |
| | | sysVipLabel.setCreateBy(sysUsers.getSuName()); |
| | | sysVipLabel.setCreateTime(new Date()); |
| | | sysVipLabel.setColor(Dictionary.COLORS[new Random().nextInt(6)]); |
| | | |
| | | int i = sysVipLabelDao.insert(sysVipLabel); |
| | | if (i > 0) { |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("添加成功"); |
| | | ajaxResult.putInMap("label", sysVipLabel); |
| | | return ajaxResult; |
| | | } |
| | | return AjaxResult.buildFailInstance("添加失败"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/modify") |
| | | @ResponseBody |
| | | public AjaxResult modify(SysVipLabel sysVipLabel) { |
| | | SysUsers sysUsers = getMe(); |
| | | |
| | | SysVipLabel hasExist = sysVipLabelDao.selectById(sysVipLabel.getId()); |
| | | if (!sysVipLabel.getLabel().equals(hasExist.getLabel())) { |
| | | SysVipLabel query = new SysVipLabel(); |
| | | query.setIsAll(1); |
| | | query.setCompanyId(sysUsers.getCompanyId()); |
| | | query.setLabel(sysVipLabel.getLabel()); |
| | | List<SysVipLabel> sysVipLabels = sysVipLabelDao.selectByModel(sysVipLabel); |
| | | if (CollectionUtils.isNotEmpty(sysVipLabels)) { |
| | | return AjaxResult.buildFailInstance("已存在该标签"); |
| | | } |
| | | } |
| | | |
| | | sysVipLabel.setColor(Dictionary.COLORS[new Random().nextInt(6)]); |
| | | |
| | | int i = sysVipLabelDao.update(sysVipLabel); |
| | | if (i > 0) { |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("添加成功"); |
| | | ajaxResult.putInMap("label", sysVipLabel); |
| | |
| | | } |
| | | return AjaxResult.buildFailInstance("删除失败"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/edit") |
| | | public String edit(Long id) { |
| | | if (id != null) { |
| | | SysVipLabel sysVipLabel = sysVipLabelDao.selectById(id); |
| | | WebUtil.getRequest().setAttribute("obj", sysVipLabel); |
| | | } |
| | | return "admin/hive/operate/label-form"; |
| | | } |
| | | } |
| | |
| | | |
| | | private String color; |
| | | |
| | | private String shopName; |
| | | |
| | | public String getShopName() { |
| | | return shopName; |
| | | } |
| | | |
| | | public void setShopName(String shopName) { |
| | | this.shopName = shopName; |
| | | } |
| | | |
| | | public Long getUserId() { |
| | | return userId; |
| | | } |
| | |
| | | package com.matrix.system.hive.dao; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.hive.bean.SysVipLabel; |
| | | import com.matrix.system.hive.bean.SysVipLabelRelate; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | |
| | | int update(SysVipLabel sysVipLabel); |
| | | |
| | | List<SysVipLabel> selectInPage(@Param("record") SysVipLabel sysVipLabel, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | int selectTotal(@Param("record") SysVipLabel sysVipLabel); |
| | | |
| | | int deleteById(@Param("id") Long id); |
| | | |
| | | List<SysVipLabel> selectByVipId(@Param("vipId") Long vipId); |
| | |
| | | List<SysVipLabel> selectByModel(@Param("record") SysVipLabel sysVipLabel); |
| | | |
| | | int deleteRelateByVipId(@Param("vipId") Long vipId); |
| | | |
| | | SysVipLabel selectById(@Param("id") Long id); |
| | | } |
| | |
| | | ShoppingGoodsDetailVo goodsDetailVo = new ShoppingGoodsDetailVo(); |
| | | goodsDetailVo.setImg(shoppingGoods.getImg()); |
| | | goodsDetailVo.setGoodsName(shoppingGoods.getName()); |
| | | goodsDetailVo.setGoodsNo(shoppingGoods.getGoodsNo()); |
| | | goodsDetailVo.setGoodsNo(shoppingGoods.getCode()); |
| | | goodsDetailVo.setGoodsType(shoppingGoods.getGoodType()); |
| | | goodsDetailVo.setDesc(shoppingGoods.getDescription()); |
| | | goodsDetailVo.setMaxSaleCnt(shoppingGoods.getCarMaxSaleCount()); |
| | |
| | | moneyCardUse.setVipId(order.getVipId()); |
| | | List<MoneyCardUse> cards = cardUseService.findByModel(moneyCardUse); |
| | | |
| | | WebUtil.getRequest().setAttribute("orderParam", id); |
| | | |
| | | WebUtil.getRequest().setAttribute("cards", cards); |
| | | return "admin/hive-erp/order/orderXq-form"; |
| | | } |
| | |
| | | |
| | | #线上测试环境 |
| | | |
| | | spring.datasource.username=chuhuan |
| | | spring.datasource.password=chuhuan |
| | | spring.datasource.url=jdbc:mysql://175.6.132.141:3306/hive_v2_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 |
| | | spring.datasource.username=ct_test |
| | | spring.datasource.password=123456 |
| | | spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 |
| | | |
| | | |
| | | #spring.datasource.username=chuhuan |
| | | #spring.datasource.password=chuhuan |
| | | #spring.datasource.url=jdbc:mysql://175.6.132.141:3306/hive_v2_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 |
| | | |
| | | |
| | | spring.datasource.type=com.alibaba.druid.pool.DruidDataSource |
| | |
| | | swagger.security.username=admin |
| | | swagger.security.password=admin |
| | | |
| | | |
| | | #默认头像 |
| | | default.vip.photo.woman=https://filehive2.jyymatrix.cc/uploadeFile/20210125/db53552e688040afb286686f081e1e68f3fe946f75624598828f01898635152e.png |
| | | default.vip.photo.man=https://filehive2.jyymatrix.cc/uploadeFile/20210125/3642f1d827c44c76832fea106c85e0f89e089c16cbcc4dd0a82bb52b9ac700f4.png |
| | | |
| | |
| | | b.SHOP_IMAG photo, |
| | | sum(IFNULL(a.free_consume,0) + IFNULL(a.his_consume,0)) amount |
| | | from achieve_new a |
| | | left join sys_shop_info b on a.shop_id=b.ID |
| | | left join sys_shop_info b on a.shop_id=b.ID and b.shop_type!=1 |
| | | <where> |
| | | <if test="record.companyId != null"> |
| | | and a.company_id=#{record.companyId} |
| | |
| | | b.SHOP_IMAG photo, |
| | | sum(IFNULL(a.consume,0) + IFNULL(a.card_cash,0)) amount |
| | | from achieve_new a |
| | | left join sys_shop_info b on a.shop_id=b.ID |
| | | left join sys_shop_info b on a.shop_id=b.ID and shop_type!=1 |
| | | <where> |
| | | <if test="record.companyId != null"> |
| | | and a.company_id=#{record.companyId} |
| | |
| | | ) |
| | | </insert> |
| | | |
| | | <select id="selectInPage" resultType="com.matrix.system.hive.bean.SysVipLabel"> |
| | | select |
| | | a.create_time createTime, |
| | | a.create_by createBy, |
| | | a.id, |
| | | a.label, |
| | | a.shop_id shopId, |
| | | a.company_id companyId, |
| | | a.is_all isAll, |
| | | a.user_id userId, |
| | | a.color, |
| | | b.shop_short_name shopName |
| | | from sys_vip_label a |
| | | left join sys_shop_info b on a.shop_id=b.id |
| | | where 1=1 |
| | | <if test="record!=null"> |
| | | <if test="record.label!=null and record.label!=''"> |
| | | and a.label like CONCAT('%', CONCAT(#{record.label},'%')) |
| | | </if> |
| | | <if test="record.isAll!=null and record.isAll!=0"> |
| | | and a.is_all=#{record.isAll} |
| | | </if> |
| | | <if test="record.userId!=null and record.userId!=''"> |
| | | and a.user_id=#{record.userId} |
| | | </if> |
| | | <if test="record.companyId!=null and record.companyId!=''"> |
| | | and a.company_id=#{record.companyId} |
| | | </if> |
| | | </if> |
| | | <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="selectTotal" resultType="java.lang.Integer"> |
| | | select |
| | | count(1) |
| | | from sys_vip_label |
| | | where 1=1 |
| | | <if test="record!=null"> |
| | | <if test="record.label!=null and record.label!=''"> |
| | | and label like CONCAT('%', CONCAT(#{record.label},'%')) |
| | | </if> |
| | | <if test="record.isAll!=null and record.isAll!=0"> |
| | | and is_all=#{record.isAll} |
| | | </if> |
| | | <if test="record.userId!=null and record.userId!=''"> |
| | | and user_id=#{record.userId} |
| | | </if> |
| | | <if test="record.companyId!=null and record.companyId!=''"> |
| | | and company_id=#{record.companyId} |
| | | </if> |
| | | </if> |
| | | </select> |
| | | |
| | | <update id="update"> |
| | | update sys_vip_label |
| | | <set> |
| | |
| | | delete from sys_vip_label_relate |
| | | where vip_id=#{vipId} |
| | | </delete> |
| | | |
| | | <select id="selectById" resultType="com.matrix.system.hive.bean.SysVipLabel"> |
| | | select |
| | | create_time createTime, |
| | | create_by createBy, |
| | | id, |
| | | label, |
| | | shop_id shopId, |
| | | company_id companyId, |
| | | is_all isAll, |
| | | user_id userId, |
| | | color |
| | | from sys_vip_label |
| | | where id=#{id} |
| | | </select> |
| | | </mapper> |
| | |
| | | direction: 'rtl', |
| | | //当前登录用户 |
| | | loginUser: {}, |
| | | staffUser:{}, |
| | | //业绩用户列表 |
| | | userList: [], |
| | | order: { |
| | |
| | | created: function () { |
| | | let _this = this; |
| | | |
| | | //获取登录用户信息 |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | url: basePath + '/admin/getLoginUser', |
| | | callback: function (data) { |
| | | _this.loginUser = data.mapInfo.user; |
| | | |
| | | if (id) { |
| | | //加载订单信息 |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | url: basePath + '/admin/order/findOrderById/' + id, |
| | | callback: function (data) { |
| | | _this.order = data.rows[0]; |
| | | //修改支付金额 |
| | | _this.changeVip(_this.order.vipId); |
| | | let items = _this.order.items; |
| | | let orderPayMoney = 0; |
| | | //设置欠款订单设置欠款金额等于支付金额,非欠款订单设置折扣金额等于支付金额 |
| | | items.forEach(item => { |
| | | if (item.arrears > 0) { |
| | | item.payMoney = item.arrears; |
| | | } else { |
| | | item.payMoney = item.zkPrice; |
| | | } |
| | | orderPayMoney += item.payMoney; |
| | | item.uuid = MTools.uuid(); |
| | | //业绩设置 |
| | | _this.achieveList.push({ |
| | | orderItem: item, |
| | | staff: _this.loginUser, |
| | | saleId: _this.loginUser.suId, |
| | | achieveMoney: item.payMoney, |
| | | commission : 0, |
| | | t3 : '现金业绩', |
| | | isShare: false, |
| | | }); |
| | | }); |
| | | _this.order.payMoney = orderPayMoney; |
| | | } |
| | | }); |
| | | |
| | | } else { |
| | | //获取门店信息 |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | url: basePath + '/admin/shopInfo/findUserShop', |
| | | callback: function (data) { |
| | | _this.order.shopName = data.rows[0].shopName; |
| | | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | } |
| | | }); |
| | | |
| | | _this.initMethod() |
| | | if (vipId) { |
| | | _this.changeVip(vipId); |
| | | } |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | initMethod() { |
| | | let _this = this; |
| | | |
| | | //获取登录用户信息 |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | url: basePath + '/admin/getLoginUser', |
| | | callback: function (data) { |
| | | _this.loginUser = data.mapInfo.user; |
| | | |
| | | if (id) { |
| | | //加载订单信息 |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | url: basePath + '/admin/order/findOrderById/' + id, |
| | | callback: function (data) { |
| | | _this.order = data.rows[0]; |
| | | //修改支付金额 |
| | | _this.changeVip(_this.order.vipId); |
| | | |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | url: basePath + '/admin/getUserById?id='+_this.order.staffId, |
| | | callback: function (data) { |
| | | _this.staffUser = data.mapInfo.user; |
| | | |
| | | let items = _this.order.items; |
| | | let orderPayMoney = 0; |
| | | //设置欠款订单设置欠款金额等于支付金额,非欠款订单设置折扣金额等于支付金额 |
| | | items.forEach(item => { |
| | | if (item.arrears > 0) { |
| | | item.payMoney = item.arrears; |
| | | } else { |
| | | item.payMoney = item.zkPrice; |
| | | } |
| | | orderPayMoney += item.payMoney; |
| | | item.uuid = MTools.uuid(); |
| | | //业绩设置 |
| | | _this.achieveList.push({ |
| | | orderItem: item, |
| | | staff: _this.staffUser, |
| | | saleId: _this.staffUser.suId, |
| | | achieveMoney: item.payMoney, |
| | | commission : 0, |
| | | t3 : '现金业绩', |
| | | isShare: false, |
| | | }); |
| | | }); |
| | | _this.order.payMoney = orderPayMoney; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | } else { |
| | | //获取门店信息 |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | url: basePath + '/admin/shopInfo/findUserShop', |
| | | callback: function (data) { |
| | | _this.order.shopName = data.rows[0].shopName; |
| | | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | //取消订单 |
| | | closeFram() { |
| | |
| | | if (submitType == 1) { |
| | | if (_this.printPaper) { |
| | | _this.print(); |
| | | } else { |
| | | _this.$message.success({ |
| | | message : data.info, |
| | | duration : 1000, |
| | | onClose() { |
| | | _this.closeFram(); |
| | | } |
| | | }); |
| | | } |
| | | // _this.closeFram(); |
| | | |
| | | // _this.$confirm('结算成功,是否立刻打印小票?', '提示', { |
| | | // confirmButtonText: '打印', |
| | | // cancelButtonText: '取消', |
| | |
| | | } else { |
| | | _this.$message.success(data.info); |
| | | } |
| | | |
| | | if(parent.myGrid) { |
| | | parent.myGrid.serchData(); |
| | | } |
New file |
| | |
| | | <!DOCTYPE HTML> |
| | | <html xmlns:th="http://www.thymeleaf.org"> |
| | | <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> |
| | | </head> |
| | | <body> |
| | | <div class="ibox-content"> |
| | | <form class="form-horizontal" id="dataform" onsubmit="javascript:return false;"> |
| | | <input autocomplete="off" type="hidden" name="id" th:value="${obj?.id}"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">标签<span class="text-danger">*</span></label> |
| | | <div class="col-sm-4"> |
| | | <input autocomplete="off" dataType="*" class="form-control" name="label" ></input> |
| | | <div class="Validform_checktip"></div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group "> |
| | | <div class="col-sm-12 text-center"> |
| | | <a href="javascript:;" onclick="myForm.submit()" |
| | | class="btn btn-success radius"><i class="fa fa-check"></i> 保存</a> <a |
| | | class="btn btn-danger radius" href="javascript:;" onclick="MTools.closeForm()" ><i class="fa fa-close"></i> 关闭</a> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </body> |
| | | <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script> |
| | | <script th:inline="javascript"> |
| | | MTools.autoFullSelect(); |
| | | $(".select2").select2(); |
| | | |
| | | /*<![CDATA[*/ |
| | | var obj=/*[[${obj}]]*/ |
| | | /*]]>*/ |
| | | |
| | | var invokeUrl=basePath+"/admin/operate/add"; |
| | | if(obj.id!=null){ |
| | | invokeUrl = basePath+"/admin/operate/modify"; |
| | | } |
| | | var myForm=MForm.initForm({ |
| | | invokeUrl:invokeUrl, |
| | | afterSubmit:function(){ |
| | | parent.myGrid.serchData(); |
| | | }, |
| | | }); |
| | | </script> |
| | | </body> |
| | | </html> |
New file |
| | |
| | | <!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> |
| | | </head> |
| | | <body class="container-fluid"> |
| | | <div class="pd-10"> |
| | | <!-- 搜索框部分start --> |
| | | <div class="row form-head"> |
| | | <form class="form-inline" id="serchform"> |
| | | <!-- <div class="input-group">--> |
| | | <!-- <div class="btn-group search-list " data-for="search-text">--> |
| | | <!-- <button type="button"--> |
| | | <!-- class="btn btn-default dropdown-toggle searchlist"--> |
| | | <!-- data-toggle="dropdown">--> |
| | | <!-- 用户姓名 <span class="caret "></span>--> |
| | | <!-- </button>--> |
| | | <!-- <ul class="dropdown-menu" role="menu">--> |
| | | <!-- <li data-field="suName"><a>用户姓名</a></li>--> |
| | | <!-- <li data-field="suAccount"><a>账号 </a></li>--> |
| | | <!-- </ul>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="form-group mr-20 ml-20">--> |
| | | <!-- <input id="search-text" name="suName" placeholder="输入查询关键词"--> |
| | | <!-- type="text" class="form-control">--> |
| | | <!-- </div>--> |
| | | <!-- <div class="form-group">--> |
| | | <!-- <button onclick="myGrid.serchData(1)" type="button"--> |
| | | <!-- class="btn btn-info">--> |
| | | <!-- <i class="fa fa-search "></i> 搜索--> |
| | | <!-- </button>--> |
| | | <!-- <button type="reset" class="btn btn-info ">--> |
| | | <!-- <i class="fa fa-refresh "></i> 重置--> |
| | | <!-- </button>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | </form> |
| | | </div> |
| | | |
| | | <div class="row mt-10" > |
| | | <div id="option-bar"> |
| | | <!-- 功能按钮部分 --> |
| | | <button onclick="openAdd()" type="button" class="btn btn-info btn-sm"><i class="fa fa-add" ></i> 新增</button> |
| | | </div> |
| | | <table id="mgrid"> |
| | | <thead> |
| | | <tr> |
| | | <th data-checkbox="true"></th> |
| | | <th data-formatter="MGrid.indexfn" data-align="center" data-width="30px" >序号</th> |
| | | <th data-align="center" data-formatter="buidOperate" data-field="id">操作</th> |
| | | <th data-field="label" data-align="center">标签内容</th> |
| | | <th data-field="createBy" data-align="center">创建人</th> |
| | | <th data-field="shopName" data-align="center">门店名称</th> |
| | | <th data-field="isAll" data-align="center" data-formatter="isAllFormat">是否所有门店</th> |
| | | </tr> |
| | | </thead> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | <script type="text/javascript" |
| | | th:src="@{/js/systools/MJsBase.js}"></script> |
| | | <script type="text/javascript"> |
| | | var myGrid; |
| | | $(function(){ |
| | | var delUrl=""; |
| | | delUrl=basePath+"/admin/label/del" ; |
| | | myGrid=MGrid.initGrid({ |
| | | url:basePath+"/admin/label/showList", |
| | | delUrl:delUrl, |
| | | }); |
| | | |
| | | }); |
| | | |
| | | |
| | | function del() { |
| | | var i = $("#mgrid").bootstrapTable('getSelections').length; |
| | | if (i > 1) { |
| | | layer.msg("仅可选择一条记录", { |
| | | icon: 5 |
| | | }); |
| | | return false; |
| | | } |
| | | myGrid.delItems(); |
| | | } |
| | | |
| | | function isAllFormat(value) { |
| | | if (value == 1) { |
| | | return "是" |
| | | } else { |
| | | return "否"; |
| | | } |
| | | } |
| | | |
| | | function buidOperate(value, row, index){ |
| | | var html = ""; |
| | | html += '<div class="btn-group">' |
| | | + '<button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">' |
| | | + '操作 <span class="caret"></span>' + '</button>' |
| | | + '<ul class="dropdown-menu" role="menu">' |
| | | + '<li><a href="javascript:void(0)" style="display:' |
| | | + value |
| | | + '" onClick="lookInfo(\'' |
| | | + value |
| | | + '\')" title="编辑">查看</a></li>' |
| | | html += ''; |
| | | return html; |
| | | } |
| | | //打开添加界面 |
| | | function openAdd() { |
| | | layer.open({ |
| | | type : 2, |
| | | title : "添加标签", |
| | | area : [ MUI.SIZE_L, '400px' ], |
| | | maxmin : true, |
| | | content : [ basePath+'/admin/label/edit'] |
| | | }); |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |