wzy
2021-01-19 4077244f201da6ee518e2646be05dc086f69b42b
modify
1 files added
157 ■■■■■ changed files
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-sale-list.html 157 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-sale-list.html
New file
@@ -0,0 +1,157 @@
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
    content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<LINK rel="Bookmark" href="../images/favicon.ico">
<!-- 本框架基本脚本和样式 -->
<script type="text/javascript"
        th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
<script type="text/javascript" th:src="@{/js/systools/MBase.js}"></script>
</head>
<body class="gray-bg">
    <div class="ibox-content">
        <!-- 搜索框部分start -->
        <form class="form-inline" id="serchform">
            <div class="form-group mr-20">
                <label>日期范围</label>
                <input name="beginTime" type="text" class="form-control datetimepicker" id="beginTime">-
                <input name="endTime"  type="text" class="form-control datetimepicker" id="endTime">
            </div>
            <div class="form-group mr-20">
                <label>门店</label>
                <select class="form-control autoFull" data-filed="shopName" name="shopId" id="shopId"
                        th:data-url="@{/admin/shopInfo/findShops}">
                    <option value=''>--请选择部所属门店--</option>
                </select>
            </div>
            <div class="row mb-10">
                <div class="col-sm-8">
                    <button  onclick="myGrid.serchData()" type="button" class="btn btn-info btn-sm"><i class="fa fa-search" ></i> 搜索</button>
                    <button  type="reset"   class="btn btn-default btn-sm"><i class="fa fa-refresh " ></i> 重置</button>
<!--                    <button  matrix:btn="ygyjbb-exportExcel"  onclick="exportExcel()" type="button" class="btn btn-default btn-sm"><i class="fa fa-download" ></i> 导出</button>-->
                </div>
            </div>
        </form>
        <table id="mgrid">
            <thead>
                <tr>
                    <th data-formatter="MGrid.indexfn" data-align="center"
                        data-width="30px">序号</th>
                    <th data-field="dataTime">日期</th>
                    <th data-field="shopName">门店名称</th>
                    <th data-field="shouldPay" data-formatter="shouldPayFormat">应收金额</th>
                    <th data-field="totalPay">实收金额</th>
                    <th data-field="shouldPay" data-formatter="zkAmountFormat">折扣金额</th>
                    <th data-field="perCustomCnt">客单数</th>
                    <th data-field="customGoodsCnt">客品数</th>
                    <th data-field="cost">成本</th>
                    <th data-field="grossProfit">毛利</th>
                    <th data-field="grossProfitRate">毛利率</th>
                    <th data-field="wechat">微信</th>
                    <th data-field="alipay">支付宝</th>
                    <th data-field="cash">现金</th>
                    <th data-field="bankCard">银行卡</th>
                    <th data-field="tuan">团购</th>
                    <th data-field="cardBj">本金收款</th>
                    <th data-field="cardFree">赠金收款</th>
                    <th data-field="arrears">欠款</th>
                </tr>
            </thead>
        </table>
    </div>
    <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
    <script type="text/javascript" th:src="@{/js/function/public.js}"></script>
    <script type="text/javascript">
        var myGrid;
        var initParam = {
                format : "yyyy-mm-dd", //默认显示年与日,如果想显示十分秒:"yyyy-mm-dd hh:ii:ss"
                minView: "month",     //"month",只显示年月日的选择,不会再跳转去选择时分秒;如果想要选择时分秒的:"hour"
            }
         MTools.ininDatetimepicker(initParam);
        //限制结束时间不小于开始时间
         MTools.limitStartEndTime({});
        $(function() {
            MTools.autoFullSelect();
            $(".select2").select2();
            myGrid = MGrid.initGrid({
                url : basePath+"/admin/sysBusinessData/findDailySaleData",
                showExport : true,
                showFooter : false,
                height:'auto',
                width:'auto',
                exportDataType : "basic", //basic', 'all', 'selected'.
                exportTypes : [ 'excel', 'xlsx' ], //导出类型
                exportOptions : {
                    ignoreColumn : [ 0 ],
                    fileName : "客户消费统计" + MTools.getTime(), //文件名称设置
                    worksheetName : 'Sheet1', //表格工作区名称
                    tableName : '客户消费统计',
                    excelstyles : [ 'background-color', 'color', 'font-size',
                            'font-weight' ],
                }
            });
            $('[data-toggle="tooltip"]').tooltip()
        });
        function shouldPayFormat(value, row, index) {
            return row.shouldPay + row.refund;
        }
        function zkAmountFormat(value, row, index) {
            return row.shouldPay + row.refund - row.arrears - row.totalPay;
        }
        function footCountTitle(data) {
            return "<b>合计</b>";
        };
        function countColumn(data) {
            if (data) {
                var resultsumQuantity = parseFloat(data).toFixed(2);//保留有效数字
                return resultsumQuantity;
            } else {
                return "-";
            }
        };
        function buildVipNameJump(value, row, index) {
            return '<a  onClick="vipDetail(\'' + row.t9 +'\')"   class="text-primary " >'+value+'</a>';
        }
        function vipDetail(value) {
            layer.full(layer.open({
                type : 2,
                title : "订单详情",
                maxmin : true,
                area : MUI.SIZE_M,
                content : [basePath+'/admin/redirect/hive/beautySalon/vip?vipPhone=' + value ]
            }));
        }
        function exportExcel(){
            var param=MForm.toUrlParam("#serchform");
            window.location.href=basePath+"/admin/achieve/exportDailyInfoNew?"+param;
        }
    </script>
</body>
</html>