935090232@qq.com
2021-01-27 6cf48be93aaf03a3fb0e977e0eaa2d84dc9d9128
Merge branch 'api' into hive2.0
5 files added
9 files modified
1202 ■■■■■ changed files
zq-erp/src/main/java/com/matrix/system/hive/dao/SysOrderFlowDao.java 6 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/dto/OrderFlowListDto.java 126 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java 37 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/statistics/OrderFlowAction.java 132 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/vo/OrderFlowVo.java 152 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml 5 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderFlowDao.xml 101 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml 2 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/static/css/styleOne/style.min.css 9 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/static/js/systools/AjaxProxyVue.js 11 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/jyls.html 314 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html 9 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html 12 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/hive/statistics/jyls.html 286 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/dao/SysOrderFlowDao.java
@@ -1,6 +1,8 @@
package com.matrix.system.hive.dao;
import com.matrix.system.hive.bean.SysOrderFlow;
import com.matrix.system.hive.dto.OrderFlowListDto;
import com.matrix.system.hive.vo.OrderFlowVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -12,4 +14,8 @@
    public List<SysOrderFlow> selectByOrderId(@Param("orderId") Long orderId);
    public List<SysOrderFlow> selectPayMethodsAmountByOrderId(@Param("orderId") Long orderId);
    List<OrderFlowVo> selectInPage(@Param("record") OrderFlowListDto orderFlowListDto);
    Integer selectTotal(@Param("record")OrderFlowListDto orderFlowListDto);
}
zq-erp/src/main/java/com/matrix/system/hive/dto/OrderFlowListDto.java
New file
@@ -0,0 +1,126 @@
package com.matrix.system.hive.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.matrix.core.pojo.PaginationDto;
import com.matrix.core.pojo.PaginationVO;
import com.matrix.core.tools.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotNull;
import java.util.Date;
/**
 * @author jyy
 * @date 2021-01-27
 **/
@ApiModel(value = "OrderFlowListDto", description = "交易流水查询参数")
public class OrderFlowListDto extends PaginationDto {
    @ApiModelProperty(value = "客户姓名/拼音/手机")
    private String queryKey;
    @ApiModelProperty(value ="操作人")
    private String oprationMan;
    @ApiModelProperty(value ="订单号")
    private String orderNo;
    @ApiModelProperty(value ="交易类型")
    private String flowType;
    @ApiModelProperty(value ="支付方式")
    private String payMethod;
    @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8")
    @ApiModelProperty(value = "查询参数开始时间", example = "2021-01-10")
    private Date startTime;
    @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8")
    @ApiModelProperty(value = "查询参数结束时间", example = "2021-01-10")
    private Date endTime;
    @ApiModelProperty(hidden = true)
    private Long shopId;
    @ApiModelProperty(hidden = true)
    private Long companyId;
    public String getQueryKey() {
        return queryKey;
    }
    public void setQueryKey(String queryKey) {
        this.queryKey = queryKey;
    }
    public String getOprationMan() {
        return oprationMan;
    }
    public void setOprationMan(String oprationMan) {
        this.oprationMan = oprationMan;
    }
    public String getOrderNo() {
        return orderNo;
    }
    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }
    public String getFlowType() {
        return flowType;
    }
    public void setFlowType(String flowType) {
        this.flowType = flowType;
    }
    public String getPayMethod() {
        return payMethod;
    }
    public void setPayMethod(String payMethod) {
        this.payMethod = payMethod;
    }
    public Date getStartTime() {
        return startTime;
    }
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }
    public Date getEndTime() {
        return endTime;
    }
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }
    public Long getShopId() {
        return shopId;
    }
    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }
    public Long getCompanyId() {
        return companyId;
    }
    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }
}
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
@@ -629,7 +629,6 @@
            if(moneyCardUse.getGiftMoney() >= flow.getAmount().doubleValue()) {
                double surplus = MoneyUtil.sub(moneyCardUse.getGiftMoney(), flow.getAmount().doubleValue());
                moneyCardUse.setGiftMoney(surplus);
                moneyCardUseFlow.setGiftMoney(0D - flow.getAmount().doubleValue());
            } else {
                throw new GlobleException(moneyCardUse.getCardName() + "余额不足");
@@ -638,13 +637,27 @@
            if(moneyCardUse.getRealMoney() >= flow.getAmount().doubleValue()) {
                double surplus = MoneyUtil.sub(moneyCardUse.getRealMoney(), flow.getAmount().doubleValue());
                moneyCardUse.setRealMoney(surplus);
                moneyCardUseFlow.setTotal(0 - flow.getAmount().doubleValue());
            } else {
                throw new GlobleException(moneyCardUse.getCardName() + "余额不足");
            }
        }
        if (moneyCardUse.getIsVipCar().equals(Dictionary.FLAG_NO_N)) {
            //余额为0时充值卡变为无效
            if(moneyCardUse.getRealMoney().equals(0D) && moneyCardUse.getGiftMoney().equals(0D)){
                moneyCardUse.setIsOver(Dictionary.FLAG_YES_Y);
                moneyCardUse.setStatus(Dictionary.MONEYCARD_STATUS_WX);
            }
        }
        ShoppingGoods shoppingGoods = shoppingGoodsService.findById(moneyCardUse.getGoodsId());
        if (shoppingGoods != null) {
            Date invalidTime = shoppingGoodsService.calInvalidTime(shoppingGoods, 2, moneyCardUse.getFailTime());
            moneyCardUse.setFailTime(invalidTime);
        }
        // 更新充值卡信息
        moneyCardUseDao.update(moneyCardUse);
        //设置卡项使用流水
        moneyCardUseFlow.setCarUseId(moneyCardUse.getId());
        moneyCardUseFlow.setOrderNo(sourceOrder.getOrderNo());
@@ -655,26 +668,6 @@
        moneyCardUseFlow.setOperationId(user.getSuId());
        moneyCardUseFlow.setBalance(moneyCardUse.getGiftMoney()+moneyCardUse.getRealMoney());
        moneyCardUseFlowDao.insert(moneyCardUseFlow);
        // 达到使用次数后自动清空余额
        if (!moneyCardUse.getIsVipCar().equals(Dictionary.FLAG_YES_Y)
                && moneyCardUse.getLastCount() <= 0) {
            moneyCardUse.setIsOver(Dictionary.FLAG_YES_Y);
            moneyCardUse.setLastCount(0);
            moneyCardUse.setStatus(Dictionary.MONEYCARD_STATUS_WX);
        }
        if (moneyCardUse.getRealMoney().equals(0D) && moneyCardUse.getGiftMoney().equals(0D)) {
            moneyCardUse.setIsOver(Dictionary.FLAG_YES_Y);
            moneyCardUse.setStatus(Dictionary.MONEYCARD_STATUS_WX);
        }
        ShoppingGoods shoppingGoods = shoppingGoodsService.findById(moneyCardUse.getGoodsId());
        if (shoppingGoods != null) {
            Date invalidTime = shoppingGoodsService.calInvalidTime(shoppingGoods, 2, moneyCardUse.getFailTime());
            moneyCardUse.setFailTime(invalidTime);
        }
        // 更新充值卡信息
        moneyCardUseDao.update(moneyCardUse);
    }
    /**
zq-erp/src/main/java/com/matrix/system/hive/statistics/OrderFlowAction.java
New file
@@ -0,0 +1,132 @@
package com.matrix.system.hive.statistics;
import com.matrix.core.pojo.AjaxResult;
import com.matrix.core.tools.DateUtil;
import com.matrix.core.tools.LogUtil;
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.tools.DataAuthUtil;
import com.matrix.system.hive.action.util.QueryUtil;
import com.matrix.system.hive.dao.SysOrderFlowDao;
import com.matrix.system.hive.dto.OrderFlowListDto;
import com.matrix.system.hive.vo.OrderFlowVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
 * 交易流水统计
 */
@CrossOrigin(origins = "*")
@Api(value = "OrderFlowAction", tags = "交易流水")
@RestController
@RequestMapping(value = "/admin/orderFlow")
public class OrderFlowAction {
    @Resource
    private SysOrderFlowDao orderFlowDao;
    /**
     * 交易流水查询
     */
    @ApiOperation(value = "查询交易流水")
    @ApiResponses({
            @ApiResponse(code = 200, message = "OK",  response = OrderFlowListDto.class)
    })
    @PostMapping(value = "/findOrderFlow")
    public @ResponseBody
    AjaxResult findOrderFlow(@RequestBody OrderFlowListDto orderFlowListDto) {
        if (!DataAuthUtil.hasAllShopAuth()) {
            QueryUtil.setQueryLimit(orderFlowListDto);
        } else {
            QueryUtil.setQueryLimitCom(orderFlowListDto);
        }
        List<OrderFlowVo> rows = orderFlowDao.selectInPage(orderFlowListDto);
        Integer total = orderFlowDao.selectTotal(orderFlowListDto);
        AjaxResult result = AjaxResult.buildSuccessInstance(rows, total);
        return result;
    }
    /**
     * 导出Excel
     */
    @GetMapping(value = "/exportOrderFlowExcel")
    public void exportOrderFlowExcel(OrderFlowListDto orderFlowListDto, HttpServletResponse res) {
        OutputStream os = null;
        try {
            if (!DataAuthUtil.hasAllShopAuth()) {
                QueryUtil.setQueryLimit(orderFlowListDto);
            } else {
                QueryUtil.setQueryLimitCom(orderFlowListDto);
            }
            orderFlowListDto.setLimit(null);
            List<OrderFlowVo> rows = orderFlowDao.selectInPage(orderFlowListDto);
            res.setCharacterEncoding("UTF-8");
            res.setHeader("content-type", "application/octet-stream;charset=UTF-8");
            res.setContentType("application/octet-stream;charset=UTF-8");
            Date date = new Date();
            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日HH时mm分ss");
            res.setHeader("Content-Disposition", "attachment;filename=" +
                    java.net.URLEncoder.encode("交易流水" + dateFormat.format(date) + ".xlsx".trim(), "UTF-8"));
            os = res.getOutputStream();
            ExcelUtil.createWorkbookAtOutStream(ExcelVersion.V2007, disPoseExcelData(rows), os, true);
        } catch (Exception e) {
            LogUtil.error("交易流水导出异常", e);
        } finally {
            if (os != null) {
                try {
                    os.close();
                } catch (IOException e) {
                    LogUtil.error("关闭资源异常", e);
                }
            }
        }
    }
    private List<ExcelSheetPO> disPoseExcelData(List<OrderFlowVo> orderFlowVos) {
        List<ExcelSheetPO> res = new ArrayList<>();
        ExcelSheetPO orderSheet = new ExcelSheetPO();
        orderSheet.setSheetName("交易流水");
        orderSheet.setTitle("交易流水");
        String[] header = new String[]{"订单编号", "交易内容", "交易时间", "交易类型", "交易金额", "会员姓名",
                "支付方式", "支付流水号", "操作人",  "门店名称"};
        orderSheet.setHeaders(header);
        List<List<Object>> body = new ArrayList<>();
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
        for (OrderFlowVo flowVo : orderFlowVos) {
                List<Object> bodyItem = new ArrayList<>();
                bodyItem.add(flowVo.getOrderNo());
                bodyItem.add(flowVo.getFlowContent());
                bodyItem.add(DateUtil.dateFormatStr(flowVo.getCreateTime(),DateUtil.DATE_FORMAT_MM));
                bodyItem.add(flowVo.getFlowType());
                bodyItem.add(flowVo.getAmount());
                bodyItem.add(flowVo.getVipName());
                bodyItem.add(flowVo.getPayMethod());
                bodyItem.add(flowVo.getFlowNo());
                bodyItem.add(flowVo.getStaffName());
                bodyItem.add(flowVo.getShopName());
                body.add(bodyItem);
        }
        orderSheet.setDataList(body);
        res.add(orderSheet);
        return res;
    }
}
zq-erp/src/main/java/com/matrix/system/hive/vo/OrderFlowVo.java
New file
@@ -0,0 +1,152 @@
package com.matrix.system.hive.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.matrix.core.tools.DateUtil;
import com.matrix.system.app.vo.OrderDetailItemVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
 * @author jyy
 * @date 2021-01-27
 **/
@ApiModel(value = "OrderFlowVo", description = "订单流水返回参数类")
public class OrderFlowVo {
    @ApiModelProperty(value = "流水id")
    private Long id;
    @ApiModelProperty(value = "订单ID")
    private String orderId;
    @ApiModelProperty(value = "订单号")
    private String orderNo;
    @ApiModelProperty(value ="交易类型")
    private String flowType;
    @ApiModelProperty(value ="支付方式")
    private String payMethod;
    @ApiModelProperty(value = "会员姓名")
    private String vipName;
    @ApiModelProperty(value = "交易内容")
    private String flowContent;
    @ApiModelProperty(value = "交易金额")
    private BigDecimal amount;
    @ApiModelProperty(value = "操作人姓名")
    private String staffName;
    @ApiModelProperty(value = "支付流水号")
    private String flowNo;
    @ApiModelProperty(value = "门店名称")
    private String shopName;
    @JsonFormat(pattern = DateUtil.DATE_FORMAT_SS, timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getOrderId() {
        return orderId;
    }
    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }
    public String getOrderNo() {
        return orderNo;
    }
    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }
    public String getFlowType() {
        return flowType;
    }
    public void setFlowType(String flowType) {
        this.flowType = flowType;
    }
    public String getPayMethod() {
        return payMethod;
    }
    public void setPayMethod(String payMethod) {
        this.payMethod = payMethod;
    }
    public String getVipName() {
        return vipName;
    }
    public void setVipName(String vipName) {
        this.vipName = vipName;
    }
    public String getFlowContent() {
        return flowContent;
    }
    public void setFlowContent(String flowContent) {
        this.flowContent = flowContent;
    }
    public BigDecimal getAmount() {
        return amount;
    }
    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }
    public String getStaffName() {
        return staffName;
    }
    public void setStaffName(String staffName) {
        this.staffName = staffName;
    }
    public String getFlowNo() {
        return flowNo;
    }
    public void setFlowNo(String flowNo) {
        this.flowNo = flowNo;
    }
    public String getShopName() {
        return shopName;
    }
    public void setShopName(String shopName) {
        this.shopName = shopName;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml
@@ -1260,7 +1260,7 @@
                      (  a.headquarters=1 and  ( ISNULL(a.use_shop) or LENGTH(trim(a.use_shop))<1 or FIND_IN_SET(#{record.shopId},a.use_shop))))]]>
        </if>
        <if test="record.companyId != null and record.companyId !='' ">
            a.company_id=#{record.companyId}
            and a.company_id=#{record.companyId}
        </if>
        <if test="record.goodType!=null">
            and a.good_type=#{record.goodType}
@@ -1289,6 +1289,9 @@
            <![CDATA[    and ( a.shop_id = #{record.shopId} or
                      (  a.headquarters=1 and  ( ISNULL(a.use_shop) or LENGTH(trim(a.use_shop))<1 or FIND_IN_SET(#{record.shopId},a.use_shop))))]]>
        </if>
        <if test="record.companyId != null and record.companyId !='' ">
            and a.company_id=#{record.companyId}
        </if>
        <if test="record.goodType!=null">
            and a.good_type=#{record.goodType}
        </if>
zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderFlowDao.xml
@@ -75,4 +75,105 @@
        where order_id=#{orderId}
        group by pay_method
    </select>
    <select id="selectInPage" resultType="com.matrix.system.hive.vo.OrderFlowVo">
        SELECT
        a.id,
        b.id as orderId,
        a.create_time as createTime,
        b.ORDER_NO as orderNo,
        a.flow_content as flowContent,
        a.flow_type as flowType,
        a.amount as amount,
        c.VIP_NAME as vipName,
        a.pay_method as payMethod,
        a.flow_no as flowNo,
        d.shop_short_name as shopName,
        e.su_name as staffName
        from sys_order_flow a
        LEFT JOIN sys_order b on a.order_id=b.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
        LEFT JOIN sys_users e on e.su_id=b.STAFF_ID
        <where>
                and a.company_id=#{record.companyId}
            <if test="record.queryKey != null and record.queryKey != ''">
                and (instr(c.vip_name, #{record.queryKey}) or instr(c.phone, #{record.queryKey}) )
            </if>
            <if test="record.oprationMan != null and record.oprationMan != ''">
                and instr(e.su_name, #{record.oprationMan})
            </if>
            <if test="record.orderNo != null and record.orderNo != ''">
                and instr(b.ORDER_NO, #{record.orderNo})
            </if>
            <if test="record.payMethod != null and record.payMethod != ''">
                and a.pay_method=#{record.payMethod}
            </if>
            <if test="record.flowType != null and record.flowType != ''">
                and a.flow_type=#{record.flowType}
            </if>
            <if test="record.startTime != null ">
                and a.create_time >= #{record.startTime}
            </if>
            <if test="record.endTime != null   ">
                <![CDATA[and a.create_time <= #{record.endTime}]]>
            </if>
            <if test="record.shopId != null and record.shopId != ''">
                and a.shop_id=#{record.shopId}
            </if>
        </where>
        <if test="record.offset >=0  and record.limit >0">
            limit
            #{record.offset},#{record.limit}
        </if>
    </select>
    <select id="selectTotal" resultType="java.lang.Integer">
        SELECT count(*)
        from sys_order_flow a
        LEFT JOIN sys_order b on a.order_id=b.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
        LEFT JOIN sys_users e on e.su_id=b.STAFF_ID
        <where>
            and a.company_id=#{record.companyId}
            <if test="record.queryKey != null and record.queryKey != ''">
                and (instr(c.vip_name, #{record.queryKey}) or instr(c.phone, #{record.queryKey}) )
            </if>
            <if test="record.oprationMan != null and record.oprationMan != ''">
                and instr(e.su_name, #{record.oprationMan})
            </if>
            <if test="record.orderNo != null and record.orderNo != ''">
                and instr(b.ORDER_NO, #{record.orderNo})
            </if>
            <if test="record.payMethod != null and record.payMethod != ''">
                and a.pay_method=#{record.payMethod}
            </if>
            <if test="record.flowType != null and record.flowType != ''">
                and a.flow_type=#{record.flowType}
            </if>
            <if test="record.startTime != null ">
                and a.create_time >= #{record.startTime}
            </if>
            <if test="record.endTime != null   ">
                <![CDATA[and a.create_time <= #{record.endTime}]]>
            </if>
            <if test="record.shopId != null and record.shopId != ''">
                and a.shop_id=#{record.shopId}
            </if>
        </where>
    </select>
</mapper>
zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml
@@ -549,6 +549,7 @@
        left join sys_proj_use g on b.puse_id=g.ID
        left join sys_shop_info h on a.SHOP_ID=h.ID
        <where>
            and a.company_id=#{record.companyId}
            <if test="record.queryKey != null and record.queryKey != ''">
                and (instr(a.SERVICE_NO, #{record.queryKey}) or instr(e.phone, #{record.queryKey}) or instr(e.vip_name, #{record.queryKey}) )
            </if>
@@ -585,6 +586,7 @@
        left join sys_users f on f.su_id=b.STAFF_ID
        left join sys_proj_use g on b.puse_id=g.ID
        <where>
            and a.company_id=#{record.companyId}
            <if test="record.queryKey != null and record.queryKey != ''">
                and (instr(a.SERVICE_NO, #{record.queryKey}) or instr(e.phone, #{record.queryKey}) or instr(e.vip_name, #{record.queryKey}) )
            </if>
zq-erp/src/main/resources/static/css/styleOne/style.min.css
@@ -3013,6 +3013,7 @@
body, body.full-height-layout #page-wrapper, body.full-height-layout #wrapper,
    html {
    height: 100%;
    overflow: hidden;
}
#page-wrapper {
@@ -9157,4 +9158,10 @@
    line-height: 50px;
}
/*===========鑷畾涔夋牱寮廵nd==============================*/
/*===========鑷畾涔夋牱寮廵nd==============================*/
/**
* 覆盖elementui一些无用样式
*/
.el-form-item{
    margin-bottom:10px !important;
}
zq-erp/src/main/resources/static/js/systools/AjaxProxyVue.js
@@ -240,7 +240,16 @@
      return root.children;
    },
    /** json对象转Url参数**/
    jsonToUrlParam:function(obj){
        let str="";
        for(item in obj){
            if(obj[item]){
                str+=item+"="+obj[item]+"&"
            }
        }
        return str;
    }
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/jyls.html
New file
@@ -0,0 +1,314 @@
<!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="queryKey">
                <el-input v-model="form.queryKey" placeholder="请输入会员姓名/手机"></el-input>
            </el-form-item>
            <el-form-item label="操作人" prop="oprationMan" >
                <el-input v-model="form.oprationMan"></el-input>
            </el-form-item>
            <el-form-item label="订单号" prop="orderNo">
                <el-input v-model="form.orderNo"></el-input>
            </el-form-item>
            <el-form-item label="交易类型" prop="flowType">
                <el-select v-model="form.flowType" placeholder="请选择">
                    <el-option
                            v-for="item in flowTypeList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                            >
                    </el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="支付方式" prop="payMethod">
                <el-select v-model="form.payMethod" placeholder="请选择">
                    <el-option
                            v-for="item in payMethodList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                    </el-option>
                </el-select>
            </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-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-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>
            <el-table-column
                    prop="orderNo"
                    label="订单号"
                    width="180">
            </el-table-column>
            <el-table-column
                    prop="flowContent"
                    label="交易内容"
                    show-overflow-tooltip
                    width="240">
            </el-table-column>
            <el-table-column
                    prop="createTime"
                    label="交易时间"
                    show-overflow-tooltip
                    width="180">
            </el-table-column>
            <el-table-column
                    prop="flowType"
                    label="交易类型">
            </el-table-column>
            <el-table-column
                    prop="amount"
                    label="交易金额">
            </el-table-column>
            <el-table-column
                    prop="vipName"
                    label="会员姓名">
            </el-table-column>
            <el-table-column
                    prop="payMethod"
                    label="支付方式">
            </el-table-column>
            <el-table-column
                    prop="flowNo"
                    label="支付流水号">
            </el-table-column>
            <el-table-column
                    prop="staffName"
                    label="操作人">
            </el-table-column>
            <el-table-column
                    prop="shopName"
                    label="门店名称">
            </el-table-column>
            <el-table-column label="操作">
                <template slot-scope="scope">
                    <el-button type="text" @click="openOrder(scope.$index, scope.row)" size="small">订单详情</el-button>
                </template>
            </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:'',
            },
            height:'calc(100vh - 240px)',
            shopList:[{id:0,shopShortName:'全部'}],
            flowTypeList:[
                {value:'',label:'全部'},
                {value:'购买',label:'购买'},
                {value:'退款',label:'退款'},
                {value:'还款',label:'还款'}
            ],
            payMethodList:[
                {value:'',label:'全部'},
                {value:'现金',label:'现金'},
                {value:'微信',label:'微信'},
                {value:'支付宝',label:'支付宝'},
                {value:'银行卡',label:'银行卡'},
                {value:'团购',label:'团购'},
                {value:'储值卡',label:'储值卡'},
                {value:'欠款',label:'欠款'}
            ],
        },
        created: function () {
            let _this=this;
           this.loadData();
            window.addEventListener("keydown", this.keydown);
            AjaxProxy.requst({
                app:_this,
                url:basePath+"/admin/shopInfo/findAll",
                callback:function (data) {
                    data.rows.forEach(shop=>{
                        _this.shopList.push(shop);
                    });
                }
            })
        },
        methods: {
            changePageSize(val) {
                this.table.pageSize = val;
                this.loadData();
            },
            changeCurrentPage(val) {
                this.table.currentPage = val;
                this.loadData();
            },
            resetForm(formName) {
                this.$refs[formName].resetFields();
            },
            loadData:function(){
                let _this = this;
                let data=_this.getRequestParam();
                data.limit=_this.table.pageSize;
                data.offset=_this.table.pageSize*(_this.table.currentPage-1);
                AjaxProxy.requst({
                    app: _this,
                    data:data,
                    url: basePath + '/admin/orderFlow/findOrderFlow',
                    callback: function (data) {
                        _this.table.rows = data.rows;
                        _this.table.total=data.total;
                    }
                });
            },
            getRequestParam(){
                let _this = this;
             return   {
                    name:_this.form.name,
                    payMethod:_this.form.payMethod,
                    flowType:_this.form.flowType,
                    orderNo:_this.form.orderNo,
                    oprationMan:_this.form.oprationMan,
                    queryKey:_this.form.queryKey,
                    shopId:_this.form.shopId,
                    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"):'',
                }
            },
            search:function(){
                this.table.currentPage=1;
                this.loadData();
            },
            keydown(evt){
                if(evt.keyCode==13) {
                    this.search();
                }
            },
            openOrder(index,row){
                layer.full(layer.open({
                    type : 2,
                    title : "订单详情",
                    maxmin : true,
                    content : [ basePath + '/admin/order/orderItem?id=' + row.orderId ]
                }));
            },
            //导出
            exportExcel(){
                window.location.href=basePath+"/admin/orderFlow/exportOrderFlowExcel?"+MTools.jsonToUrlParam(this.getRequestParam());
            }
        }
    });
</script>
</body>
</html>
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html
@@ -62,7 +62,7 @@
        <el-row type="flex" align="middle" style="padding: 0 0 10px 0;">
            <el-col :span="5" style="text-align: center;">充值金额</el-col>
            <el-col :span="10" style="text-align: center; line-height: 50px;">
                <el-input v-model="rechargeMoney" placeholder="0.1元起充"></el-input>
                <el-input v-model="rechargeMoney" @change="changeRechargeMoney"  placeholder="0.1元起充"></el-input>
            </el-col>
        </el-row>
@@ -236,6 +236,13 @@
            });
        },
        methods : {
            //修改充值金额同步修改业绩
            changeRechargeMoney(){
                let aMoeny=(this.rechargeMoney/this.achieveList.length).toFixed(2);
                this.achieveList.forEach(item=>{
                    item.achieveMoney=aMoeny;
                });
            },
            submitRecharge() {
                let _this = this;
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html
@@ -1071,8 +1071,8 @@
                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");
                    params.beginTime = serviceOrderTab.selectTime?moment(serviceOrderTab.selectTime[0]).format("YYYY-MM-DD HH:mm"):'';
                    params.closureTime = serviceOrderTab.selectTime?moment(serviceOrderTab.selectTime[1]).format("YYYY-MM-DD HH:mm"):'';
                }
                $.AjaxProxy({
                    p:params
@@ -1154,8 +1154,8 @@
                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");
                    params.beginTimeVo = orderTab.selectTime?moment(orderTab.selectTime[0]).format("YYYY-MM-DD HH:mm"):'';
                    params.endTimeVo = orderTab.selectTime?moment(orderTab.selectTime[1]).format("YYYY-MM-DD HH:mm"):'';
                }
                $.AjaxProxy({
                    p:params
@@ -1229,8 +1229,8 @@
                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");
                    params.beginTime = skinTab.selectTime?moment(skinTab.selectTime[0]).format("YYYY-MM-DD"):'';
                    params.endTime = skinTab.selectTime?moment(skinTab.selectTime[1]).format("YYYY-MM-DD"):'';
                }
                $.AjaxProxy({
                    p:params
zq-erp/src/main/resources/templates/views/admin/hive/statistics/jyls.html
New file
@@ -0,0 +1,286 @@
<!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="queryKey">
                <el-input v-model="form.queryKey" placeholder="请输入会员姓名/手机"></el-input>
            </el-form-item>
            <el-form-item label="操作人" prop="oprationMan" >
                <el-input v-model="form.oprationMan"></el-input>
            </el-form-item>
            <el-form-item label="订单号" prop="orderNo">
                <el-input v-model="form.orderNo"></el-input>
            </el-form-item>
            <el-form-item label="交易类型" prop="flowType">
                <el-select v-model="form.flowType" placeholder="请选择">
                    <el-option
                            v-for="item in flowTypeList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                            >
                    </el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="支付方式" prop="payMethod">
                <el-select v-model="form.payMethod" placeholder="请选择">
                    <el-option
                            v-for="item in payMethodList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                    </el-option>
                </el-select>
            </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>
            <el-table-column
                    prop="orderNo"
                    label="订单号"
                    width="180">
            </el-table-column>
            <el-table-column
                    prop="flowContent"
                    label="交易内容"
                    show-overflow-tooltip
                    width="240">
            </el-table-column>
            <el-table-column
                    prop="createTime"
                    label="交易时间"
                    show-overflow-tooltip
                    width="180">
            </el-table-column>
            <el-table-column
                    prop="flowType"
                    label="交易类型">
            </el-table-column>
            <el-table-column
                    prop="amount"
                    label="交易金额">
            </el-table-column>
            <el-table-column
                    prop="vipName"
                    label="会员姓名">
            </el-table-column>
            <el-table-column
                    prop="payMethod"
                    label="支付方式">
            </el-table-column>
            <el-table-column
                    prop="flowNo"
                    label="支付流水号">
            </el-table-column>
            <el-table-column
                    prop="staffName"
                    label="操作人">
            </el-table-column>
            <el-table-column
                    prop="shopName"
                    label="门店名称">
            </el-table-column>
            <el-table-column label="操作">
                <template slot-scope="scope">
                    <el-button type="text" @click="openOrder(scope.$index, scope.row)" size="small">订单详情</el-button>
                </template>
            </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:'',
            },
            height:'calc(100vh - 240px)',
            flowTypeList:[
                {value:'',label:'全部'},
                {value:'购买',label:'购买'},
                {value:'退款',label:'退款'},
                {value:'还款',label:'还款'}
            ],
            payMethodList:[
                {value:'',label:'全部'},
                {value:'现金',label:'现金'},
                {value:'微信',label:'微信'},
                {value:'支付宝',label:'支付宝'},
                {value:'银行卡',label:'银行卡'},
                {value:'团购',label:'团购'},
                {value:'储值卡',label:'储值卡'},
                {value:'欠款',label:'欠款'}
            ],
        },
        created: function () {
           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();
            },
            loadData:function(){
                let _this = this;
                let data=_this.getRequestParam();
                data.limit=_this.table.pageSize;
                data.offset=_this.table.pageSize*(_this.table.currentPage-1);
                AjaxProxy.requst({
                    app: _this,
                    data:data,
                    url: basePath + '/admin/orderFlow/findOrderFlow',
                    callback: function (data) {
                        _this.table.rows = data.rows;
                        _this.table.total=data.total;
                    }
                });
            },
            search:function(){
                this.table.currentPage=1;
                this.loadData();
            },
            keydown(evt){
                if(evt.keyCode==13) {
                    this.search();
                }
            },
            openOrder(index,row){
                layer.full(layer.open({
                    type : 2,
                    title : "订单详情",
                    maxmin : true,
                    content : [ basePath + '/admin/order/orderItem?id=' + row.orderId ]
                }));
            },
            getRequestParam(){
                let _this = this;
                return   {
                    name:_this.form.name,
                    payMethod:_this.form.payMethod,
                    flowType:_this.form.flowType,
                    orderNo:_this.form.orderNo,
                    oprationMan:_this.form.oprationMan,
                    queryKey:_this.form.queryKey,
                    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"):'',
                }
            },
            //导出
          exportExcel(){
            window.location.href=basePath+"/admin/orderFlow/exportOrderFlowExcel?"+MTools.jsonToUrlParam(this.getRequestParam());
        }
        }
    });
</script>
</body>
</html>