9 files modified
6 files added
| | |
| | | List<EnumsShowVo> getEnumsShowVos(); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | /** |
| | | * 查询所有员工 |
| | | */ |
| | | @RequestMapping(value = "/allUser") |
| | | public @ResponseBody |
| | | AjaxResult allUser() { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, sysUsersService.findByRoleName(false, null)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据角色名称查询店铺的员工 |
| | | */ |
| | | @RequestMapping(value = "/getShopStaffByRoleName") |
| | |
| | | package com.matrix.system.common.actions; |
| | | |
| | | import com.matrix.core.enums.EnumsManager; |
| | | import com.matrix.core.enums.EnumsShowVo; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.system.common.bean.reqVO.EnumCodeReqVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author 姜友瑶 |
| | |
| | | @Autowired |
| | | private EnumsManager enumsManager; |
| | | |
| | | @RequestMapping("/getEnums/{enumCode}") |
| | | @RequestMapping("/getEnum/{enumCode}") |
| | | public AjaxResult getEnums(@PathVariable String enumCode) throws ClassNotFoundException { |
| | | return AjaxResult.buildSuccessInstance(enumsManager.getShowEnum(enumCode)); |
| | | } |
| | | |
| | | @RequestMapping("/getEnums") |
| | | public AjaxResult getEnums(@RequestBody @Validated EnumCodeReqVo reqVo) throws ClassNotFoundException { |
| | | |
| | | Map<String,List<EnumsShowVo>> enumsMap=new HashMap<>(); |
| | | for (String enumCode : reqVo.getEnumCodes()) { |
| | | List<EnumsShowVo> showEnum = enumsManager.getShowEnum(enumCode); |
| | | enumsMap.put(enumCode,showEnum); |
| | | } |
| | | return AjaxResult.buildSuccessInstance(enumsMap); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.common.bean.reqVO; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class EnumCodeReqVo { |
| | | /** |
| | | * 枚举编码 |
| | | */ |
| | | @NotEmpty |
| | | List<String> enumCodes; |
| | | } |
New file |
| | |
| | | package com.matrix.system.common.bean.reqVO; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class OperationLogReqVo { |
| | | |
| | | /** |
| | | *公司id |
| | | */ |
| | | private Long companyId; |
| | | |
| | | /** |
| | | *门店id |
| | | */ |
| | | private Long shopId; |
| | | |
| | | /** |
| | | *操作用户id |
| | | */ |
| | | private Long opeUserId; |
| | | |
| | | /** |
| | | * 会员id |
| | | */ |
| | | private String vipQueryKey; |
| | | |
| | | /** |
| | | * 操作功能 |
| | | */ |
| | | private Integer opeFunction; |
| | | |
| | | /** |
| | | * 单据按钮 |
| | | */ |
| | | private Integer opeBut; |
| | | |
| | | /** |
| | | * 单据号 |
| | | */ |
| | | private String billNo; |
| | | |
| | | /** |
| | | * 操作人ip |
| | | */ |
| | | private String ip; |
| | | |
| | | /** |
| | | * 操作备注 |
| | | */ |
| | | private String note; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm", timezone="GMT+8") |
| | | private Date startTime; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm", timezone="GMT+8") |
| | | private Date endTime; |
| | | |
| | | private Integer pageNum = 0; |
| | | |
| | | private Integer pageSize = 20; |
| | | |
| | | private String order = "desc"; |
| | | |
| | | /** |
| | | * 排序-根据哪些字段排序 默认'create_time |
| | | */ |
| | | private String sort = "create_time"; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.common.bean.respVO; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class OperationLogRespVo { |
| | | |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | |
| | | /** |
| | | *门店名称 |
| | | */ |
| | | private String shopName; |
| | | |
| | | /** |
| | | *操作用户 |
| | | */ |
| | | private String opeUser; |
| | | |
| | | |
| | | /** |
| | | * 会员 |
| | | */ |
| | | private String vipName; |
| | | |
| | | /** |
| | | * 操作功能 |
| | | */ |
| | | private Integer opeFunction; |
| | | private String opeFunctionLabel; |
| | | |
| | | /** |
| | | * 单据按钮 |
| | | */ |
| | | private Integer opeBut; |
| | | private String opeButLabel; |
| | | |
| | | /** |
| | | * 单据号 |
| | | */ |
| | | private String billNo; |
| | | |
| | | /** |
| | | * 操作人ip |
| | | */ |
| | | private String ip; |
| | | |
| | | /** |
| | | * 操作备注 |
| | | */ |
| | | private String note; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date createTime; |
| | | |
| | | } |
| | |
| | | package com.matrix.system.common.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.system.common.bean.OperationLog; |
| | | import com.matrix.system.common.bean.reqVO.OperationLogReqVo; |
| | | import com.matrix.system.common.bean.respVO.OperationLogRespVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @description 单据操作记录 |
| | |
| | | public interface OperationLogDao extends BaseMapper<OperationLog> { |
| | | |
| | | |
| | | |
| | | Page<OperationLogRespVo> selectPageList(Page<OperationLogReqVo> page,@Param("param") OperationLogReqVo operationLogReqVo); |
| | | } |
| | |
| | | package com.matrix.system.common.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.matrix.system.common.bean.OperationLog; |
| | | import com.matrix.system.common.bean.reqVO.OperationLogReqVo; |
| | | import com.matrix.system.common.bean.respVO.OperationLogRespVo; |
| | | import com.matrix.system.enums.OperationButtonEnum; |
| | | import com.matrix.system.enums.OperationFunctionEnum; |
| | | |
| | |
| | | Long billId, String billNo, Long vipId); |
| | | |
| | | void saveOperation(Long companyId, Long shopId, Long suId, OperationFunctionEnum operationFunctionEnum, OperationButtonEnum operationButtonEnum,String note); |
| | | |
| | | Page<OperationLogRespVo> selectPage(Page<OperationLogReqVo> page, OperationLogReqVo operationLogReqVo); |
| | | } |
| | |
| | | package com.matrix.system.common.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.OperationLog; |
| | | import com.matrix.system.common.bean.reqVO.OperationLogReqVo; |
| | | import com.matrix.system.common.bean.respVO.OperationLogRespVo; |
| | | import com.matrix.system.common.dao.OperationLogDao; |
| | | import com.matrix.system.common.service.OperationLogService; |
| | | import com.matrix.system.enums.OperationButtonEnum; |
| | | import com.matrix.system.enums.OperationFunctionEnum; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Service |
| | | public class OperationLogServiceImpl extends ServiceImpl<OperationLogDao, OperationLog> implements OperationLogService { |
| | | |
| | | @Autowired |
| | | OperationLogDao operationLogDao; |
| | | |
| | | @Override |
| | | public void saveOperation(Long companyId, Long shopId, Long userId, OperationFunctionEnum operationFunctionEnum, OperationButtonEnum operationButtonEnum, |
| | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public Page<OperationLogRespVo> selectPage(Page<OperationLogReqVo> page, OperationLogReqVo operationLogReqVo) { |
| | | |
| | | Page<OperationLogRespVo> voPage=operationLogDao.selectPageList(page, operationLogReqVo); |
| | | voPage.getRecords().stream().forEach(e->{ |
| | | e.setOpeFunctionLabel(OperationFunctionEnum.getByValue(e.getOpeFunction())); |
| | | e.setOpeButLabel(OperationButtonEnum.getByValue(e.getOpeBut())); |
| | | }); |
| | | |
| | | return voPage; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.google.common.collect.Lists; |
| | | import com.matrix.core.enums.EnumApiShowAble; |
| | | import com.matrix.core.enums.EnumsShowVo; |
| | | import com.matrix.core.exception.GlobleException; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | |
| | | this.displayName = displayName; |
| | | } |
| | | |
| | | public static String getByValue(Integer value) { |
| | | for (int i = 0; i < values().length; i++) { |
| | | if (value.equals(values()[i].getValue())) { |
| | | return values()[i].displayName; |
| | | } |
| | | } |
| | | throw new GlobleException("无效枚举值"); |
| | | } |
| | | |
| | | @Override |
| | | public String getEnumCode() { |
| | | return "operationButton"; |
| | |
| | | import com.google.common.collect.Lists; |
| | | import com.matrix.core.enums.EnumApiShowAble; |
| | | import com.matrix.core.enums.EnumsShowVo; |
| | | import com.matrix.core.exception.GlobleException; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 操作功能枚举 |
| | | * |
| | | * @author jyy |
| | | */ |
| | | public enum OperationFunctionEnum implements EnumApiShowAble { |
| | | |
| | | ORDER(1, "订单"), |
| | | SERVICE_ORDER(2, "服务单"), |
| | | VIP_PROJECT(3, "会员套餐卡项"), |
| | | VIP_CARD(4, "会员卡"); |
| | | ; |
| | | |
| | | private Integer value; |
| | | |
| | |
| | | ).collect(Collectors.toList()); |
| | | } |
| | | |
| | | public static String getByValue(Integer value) { |
| | | for (int i = 0; i < values().length; i++) { |
| | | if (value.equals(values()[i].getValue())) { |
| | | return values()[i].displayName; |
| | | } |
| | | } |
| | | throw new GlobleException("无效枚举值"); |
| | | } |
| | | |
| | | |
| | | public Integer getValue() { |
| | | return value; |
| | | } |
| | |
| | | * @date 2016年9月19日 |
| | | */ |
| | | public void addMoneyCardUse(SysOrder sourceOrder) { |
| | | |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | List<SysOrderItem> orderItemList = sourceOrder.getItems(); |
| | | for (SysOrderItem sysOrderItem : orderItemList) { |
| | | // 如果购买的是充值卡 |
| | |
| | | moneyCardUse.setFailTime(invalidTime); |
| | | |
| | | moneyCardUseDao.insert(moneyCardUse); |
| | | |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.hiveErp.action; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.excl.ExcelSheetPO; |
| | | import com.matrix.core.tools.excl.ExcelUtil; |
| | | import com.matrix.core.tools.excl.ExcelVersion; |
| | | import com.matrix.system.common.bean.reqVO.OperationLogReqVo; |
| | | import com.matrix.system.common.bean.respVO.OperationLogRespVo; |
| | | import com.matrix.system.common.service.OperationLogService; |
| | | import com.matrix.system.common.tools.ResponseHeadUtil; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.ui.ModelMap; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping(value = "admin/operation") |
| | | public class OperationLogController { |
| | | |
| | | |
| | | @Autowired |
| | | private OperationLogService operationLogService; |
| | | |
| | | /** |
| | | * 查询单据操作记录 |
| | | * |
| | | * @param operationLogReqVo |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "/getOperation") |
| | | public |
| | | AjaxResult getOperation(@RequestBody OperationLogReqVo operationLogReqVo) { |
| | | QueryUtil.setQueryLimitCom(operationLogReqVo); |
| | | Page<OperationLogReqVo> page = new Page<>(operationLogReqVo.getPageNum(),operationLogReqVo.getPageSize()); |
| | | |
| | | Page<OperationLogRespVo> pageResult = operationLogService.selectPage(page,operationLogReqVo); |
| | | |
| | | return AjaxResult.buildSuccessInstance(pageResult.getRecords(),pageResult.getTotal()); |
| | | } |
| | | |
| | | /** |
| | | * 导出操作记录 |
| | | */ |
| | | @RequestMapping(value = "/exportExcel") |
| | | public void exportExcel(ModelMap model, HttpServletRequest request, HttpServletResponse response,OperationLogReqVo operationLogReqVo) throws Exception { |
| | | |
| | | doExportExcel(response, operationLogReqVo); |
| | | } |
| | | |
| | | |
| | | private void doExportExcel(HttpServletResponse response, OperationLogReqVo operationLogReqVo) throws IOException { |
| | | |
| | | |
| | | |
| | | List<ExcelSheetPO> res = new ArrayList<>(); |
| | | ExcelSheetPO orderSheet = new ExcelSheetPO(); |
| | | String title = "系统操作记录"; |
| | | orderSheet.setSheetName(title); |
| | | orderSheet.setTitle(title); |
| | | String[] header = {"门店","操作用户", "操作时间", "操作功能","操作按钮", "单据号","操作会员","备注","IP地址"}; |
| | | orderSheet.setHeaders(header); |
| | | |
| | | QueryUtil.setQueryLimitCom(operationLogReqVo); |
| | | Page<OperationLogReqVo> page = new Page<>(operationLogReqVo.getPageNum(),operationLogReqVo.getPageSize()); |
| | | |
| | | Page<OperationLogRespVo> pageResult = operationLogService.selectPage(page,operationLogReqVo); |
| | | |
| | | List<List<Object>> list = new ArrayList<>(); |
| | | if (pageResult.getRecords().size() > 0) { |
| | | for (OperationLogRespVo item : pageResult.getRecords()) { |
| | | List<Object> temp = new ArrayList<>(); |
| | | temp.add(item.getShopName()); |
| | | temp.add(item.getOpeUser()); |
| | | temp.add(DateUtil.dateToString(item.getCreateTime(), DateUtil.DATE_FORMAT_MM)); |
| | | temp.add(item.getOpeFunctionLabel()); |
| | | temp.add(item.getOpeButLabel()); |
| | | temp.add(item.getBillNo()); |
| | | temp.add(item.getVipName()); |
| | | temp.add(item.getNote()); |
| | | temp.add(item.getIp()); |
| | | list.add(temp); |
| | | } |
| | | } |
| | | orderSheet.setDataList(list); |
| | | res.add(orderSheet); |
| | | response = ResponseHeadUtil.setExcelHead(response); |
| | | response.setHeader("Content-Disposition", |
| | | "attachment;filename=" + URLEncoder.encode(title + DateUtil.getTimeMark() + ".xlsx".trim(), "UTF-8")); |
| | | OutputStream os = response.getOutputStream(); |
| | | ExcelUtil.createWorkbookAtOutStream(ExcelVersion.V2007, res, os, true); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | <?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.common.dao.OperationLogDao"> |
| | | |
| | | |
| | | <select id="selectPageList" resultType="com.matrix.system.common.bean.respVO.OperationLogRespVo"> |
| | | |
| | | SELECT |
| | | a.id, |
| | | a.ope_function, |
| | | a.ope_but, |
| | | d.shop_short_name as shop_name, |
| | | b.su_name AS opeUser, |
| | | c.vip_name, |
| | | a.bill_no, |
| | | a.ip, |
| | | a.note, |
| | | a.create_time |
| | | FROM |
| | | sys_operation_log a |
| | | LEFT JOIN sys_users b ON a.ope_user_id = b.su_id |
| | | LEFT JOIN sys_vip_info c ON a.vip_id = c.id |
| | | LEFT JOIN sys_shop_info d ON a.shop_id = d.id |
| | | <where> |
| | | a.company_id=#{param.companyId} |
| | | <if test="param.shopId != null and param.shopId != 0 "> |
| | | and a.shop_id=#{param.shopId} |
| | | </if> |
| | | <if test="param.opeUserId != null"> |
| | | and a.ope_user_id=#{param.opeUserId} |
| | | </if> |
| | | |
| | | <if test="param.vipQueryKey != null and param.vipQueryKey != '' "> |
| | | and c.VIP_NAME like concat('%',#{param.vipQueryKey},'%') |
| | | or (c.VIP_NO like concat('%',#{param.vipQueryKey},'%') |
| | | or c.PHONE like concat('%',#{param.vipQueryKey},'%') |
| | | ) |
| | | </if> |
| | | <if test="param.opeFunction != null"> |
| | | and a.ope_function=#{param.opeFunction} |
| | | </if> |
| | | |
| | | <if test="param.opeBut != null"> |
| | | and a.ope_but=#{param.opeBut} |
| | | </if> |
| | | <if test="param.billNo != null and param.billNo != ''"> |
| | | and a.bill_no like concat('%',#{param.billNo},'%') |
| | | </if> |
| | | <if test="param.ip != null and param.ip != ''"> |
| | | and a.ip like concat('%',#{param.ip},'%') |
| | | </if> |
| | | <if test="param.note != null and param.note != ''"> |
| | | and a.note like concat('%',#{param.note},'%') |
| | | </if> |
| | | <if test="param.startTime != null "> |
| | | and a.create_time <![CDATA[>=]]> #{param.startTime} |
| | | </if> |
| | | <if test="param.endTime != null"> |
| | | and a.create_time <![CDATA[<=]]> #{param.endTime} |
| | | </if> |
| | | order by ${param.sort} ${param.order} |
| | | </where> |
| | | |
| | | |
| | | </select> |
| | | </mapper> |
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"/> |
| | | <LINK rel="Bookmark" href="../images/favicon.ico"> |
| | | <!-- 本框架基本脚本和样式 --> |
| | | <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script> |
| | | <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}"> |
| | | <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/> |
| | | <title></title> |
| | | <style> |
| | | .panel-body{ |
| | | overflow: hidden; |
| | | } |
| | | .buttonPanel{ |
| | | background: #ffffff; |
| | | padding: 10px 10px ; |
| | | margin: 0px 0px 10px 0px; |
| | | } |
| | | .rowPanel{ |
| | | background: #ffffff; |
| | | padding: 0px 10px ; |
| | | padding-top: 10px; |
| | | margin: 0px 0px 10px 0px; |
| | | } |
| | | .paginationStyle{ |
| | | background: #ffffff; |
| | | padding: 10px 10px; |
| | | margin: 0px 0px 10px 0px; |
| | | text-align: right; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="panel-body" id="app"> |
| | | |
| | | <el-row class="buttonPanel"> |
| | | <el-button @click="exportExcel" type="primary" >导出</el-button> |
| | | </el-row> |
| | | |
| | | <el-row class="rowPanel" > |
| | | <el-form ref="form" :model="form" inline > |
| | | |
| | | <el-form-item label="操作人" prop="flowType"> |
| | | <el-select v-model="form.opeUserId" placeholder=""> |
| | | <el-option |
| | | v-for="item in userList" |
| | | :key="item.suId" |
| | | :label="item.suName" |
| | | :value="item.suId"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="操作功能" prop="flowType"> |
| | | <el-select v-model="form.opeFunction" placeholder=""> |
| | | <el-option |
| | | v-for="item in functionList" |
| | | :key="item.value" |
| | | :label="item.displayName" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="操作按钮" prop="flowType"> |
| | | <el-select v-model="form.opeBut" placeholder=""> |
| | | <el-option |
| | | v-for="item in btnList" |
| | | :key="item.value" |
| | | :label="item.displayName" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="会员" prop="vipQueryKey"> |
| | | <el-input v-model="form.vipQueryKey" placeholder="请输入会员姓名/编号/手机"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="门店" prop="shopId"> |
| | | <el-select v-model="form.shopId" placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in shopList" |
| | | :key="item.shopShortName" |
| | | :label="item.shopShortName" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="订单号" prop="billNo"> |
| | | <el-input v-model="form.billNo"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="IP" prop="ip"> |
| | | <el-input v-model="form.ip"></el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="备注" prop="note"> |
| | | <el-input v-model="form.note"></el-input> |
| | | </el-form-item> |
| | | |
| | | |
| | | <el-form-item label="时间" prop="datetimeArr"> |
| | | <el-date-picker |
| | | v-model="form.datetimeArr" |
| | | type="daterange" |
| | | range-separator="至" format="yyyy-MM-dd HH:mm" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <el-button type="primary" @click="search" >搜索</el-button> |
| | | <el-button @click="resetForm('form')">重置</el-button> |
| | | </el-form> |
| | | </el-row> |
| | | |
| | | <el-row class="table-style" > |
| | | |
| | | <el-table id="proj" :data="table.rows" :height="height" stripe @sort-change="sortChange"> |
| | | <el-table-column |
| | | prop="shopName" |
| | | label="门店" |
| | | width="180"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="opeUser" |
| | | label="操作用户" |
| | | width="240"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="createTime" |
| | | sortable="custom" |
| | | label="操作时间" |
| | | show-overflow-tooltip |
| | | width="180"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="opeFunctionLabel" |
| | | label="操作功能"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="opeButLabel" |
| | | label="操作按钮"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="billNo" |
| | | label="单据号"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="vipName" |
| | | label="操作会员"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="note" |
| | | label="备注"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="ip" |
| | | label="IP地址"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-row> |
| | | <el-row class="paginationStyle" > |
| | | <el-pagination background |
| | | @size-change="changePageSize" |
| | | @current-change="changeCurrentPage" |
| | | :current-page="table.currentPage" |
| | | :page-sizes="[10, 20, 30, 50]" |
| | | :page-size="table.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="table.total"> |
| | | </el-pagination> |
| | | </el-row> |
| | | |
| | | </div> |
| | | </body> |
| | | <script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script> |
| | | <script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script> |
| | | <script type="text/javascript" th:src="@{/plugin/layer/layer.js}"></script> |
| | | <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="@{/plugin/moment.min.js}"></script> |
| | | <script type="text/javascript" th:inline="javascript"> |
| | | |
| | | var vue = new Vue({ |
| | | el: '#app', |
| | | data: { |
| | | table:{ |
| | | rows:[], |
| | | total:0, |
| | | pageSize:10, |
| | | currentPage:1, |
| | | }, |
| | | form:{ |
| | | name:null, |
| | | datetimeArr:'', |
| | | payMethod:'', |
| | | flowType:'', |
| | | orderNo:'', |
| | | oprationMan:'', |
| | | queryKey:'', |
| | | shopId:'', |
| | | }, |
| | | userList: [], |
| | | height:'calc(100vh - 240px)', |
| | | functionList:[], |
| | | btnList:[], |
| | | shopList:[{id:0,shopShortName:'全部'}], |
| | | }, |
| | | created: function () { |
| | | let _this=this; |
| | | //用户列表 |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | url: basePath + '/admin/allUser', |
| | | callback: function (data) { |
| | | _this.userList = data.rows; |
| | | } |
| | | }); |
| | | //获取枚举列表 |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | url: basePath + '/common/data/getEnums', |
| | | data:{"enumCodes":["operationFunction","operationButton"]}, |
| | | callback: function (data) { |
| | | _this.btnList = data.data.operationButton; |
| | | _this.functionList = data.data.operationFunction; |
| | | _this.form.opeFunction=_this.functionList[0].value; |
| | | } |
| | | }); |
| | | |
| | | //加载门店 |
| | | AjaxProxy.requst({ |
| | | app:_this, |
| | | url:basePath+"/admin/shopInfo/findAll", |
| | | callback:function (data) { |
| | | data.rows.forEach(shop=>{ |
| | | _this.shopList.push(shop); |
| | | }); |
| | | } |
| | | |
| | | }) |
| | | |
| | | this.loadData(); |
| | | window.addEventListener("keydown", this.keydown); |
| | | }, |
| | | methods: { |
| | | changePageSize(val) { |
| | | this.table.pageSize = val; |
| | | this.loadData(); |
| | | }, |
| | | changeCurrentPage(val) { |
| | | this.table.currentPage = val; |
| | | this.loadData(); |
| | | }, |
| | | resetForm(formName) { |
| | | this.$refs[formName].resetFields(); |
| | | }, |
| | | sortChange:function (column){ |
| | | if(column.order){ |
| | | if(column.order.indexOf("desc")){ |
| | | this.form.order="desc"; |
| | | }else{ |
| | | this.form.order="asc"; |
| | | } |
| | | this.form.sort=column.prop; |
| | | this.loadData(); |
| | | } |
| | | }, |
| | | loadData:function(){ |
| | | let _this = this; |
| | | let data=_this.getRequestParam(); |
| | | data.pageSize=_this.table.pageSize; |
| | | data.pageNum=_this.table.currentPagey56u; |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | data:data, |
| | | url: basePath + '/admin/operation/getOperation', |
| | | callback: function (data) { |
| | | _this.table.rows = data.rows; |
| | | _this.table.total=data.total; |
| | | } |
| | | }); |
| | | }, |
| | | getRequestParam(){ |
| | | let _this = this; |
| | | let data= { |
| | | shopId:_this.form.shopId, |
| | | opeUserId:_this.form.opeUserId, |
| | | vipQueryKey:_this.form.vipQueryKey, |
| | | opeFunction:_this.form.opeFunction, |
| | | opeBut:_this.form.opeBut, |
| | | billNo:_this.form.billNo, |
| | | ip:_this.form.ip, |
| | | note:_this.form.note, |
| | | startTime:_this.form.datetimeArr?moment(_this.form.datetimeArr[0]).format("YYYY-MM-DD HH:mm"):'', |
| | | endTime:_this.form.datetimeArr?moment(_this.form.datetimeArr[1]).format("YYYY-MM-DD HH:mm"):'', |
| | | order:_this.form.order, |
| | | } |
| | | console.log(data); |
| | | return data; |
| | | }, |
| | | search:function(){ |
| | | this.table.currentPage=1; |
| | | this.loadData(); |
| | | }, |
| | | keydown(evt){ |
| | | if(evt.keyCode==13) { |
| | | this.search(); |
| | | } |
| | | }, |
| | | |
| | | //导出 |
| | | exportExcel(){ |
| | | window.location.href=basePath+"/admin/operation/exportExcel?"+MTools.jsonToUrlParam(this.getRequestParam()); |
| | | } |
| | | |
| | | } |
| | | }); |
| | | |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |