From daa697719eb0ddfd170f1ab94c5422a4f5b93951 Mon Sep 17 00:00:00 2001
From: zhaoxiaohao <279049017@qq.com>
Date: Fri, 18 Sep 2020 14:36:54 +0800
Subject: [PATCH] Merge branch 'dev'

---
 kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/groupProduct.html |   65 ++++++++++++++++++++++++++++++++
 1 files changed, 65 insertions(+), 0 deletions(-)

diff --git a/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/groupProduct.html b/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/groupProduct.html
new file mode 100644
index 0000000..414aa09
--- /dev/null
+++ b/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/groupProduct.html
@@ -0,0 +1,65 @@
+<div class="layui-card">
+    <div class="layui-card-header">
+        <h2 class="header-title">产品消费统计</h2>
+        <span class="layui-breadcrumb pull-right">
+            <a href="#!console">首页</a>
+            <a><cite>产品消费统计</cite></a>
+        </span>
+    </div>
+    <div class="layui-card-body">
+        <div class="layui-form toolbar">&emsp;
+            <input type="text" name="date" id="datebegin" lay-verify="date"  autocomplete="off"
+                class="layui-input search-input">
+            至
+            <input type="text" name="date" id="dateend" lay-verify="date"  autocomplete="off"
+                class="layui-input search-input"> &emsp;
+            <button id="product-btn-search" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>搜索</button>
+        </div>
+        <table class="layui-table" id="product-table" lay-filter="product-table"></table>
+    </div>
+</div>
+
+<script>
+    layui.use(['table', 'config','laydate'], function () {
+        let table = layui.table;
+        let laydate = layui.laydate;
+        let config = layui.config;
+        //日期
+        laydate.render({
+            elem: '#datebegin'
+        });
+        laydate.render({
+            elem: '#dateend'
+        });
+        // 渲染表格
+        var renderTable = function () {
+            table.render({
+                elem: '#product-table',
+                url: config.base_server + 'api-opration/productorderrecord/group',
+                method: 'GET',
+                headers: { 'Authorization': 'Bearer ' + config.getToken().access_token },
+                page: true,
+                cols: [[
+                    { field: 'proName', width: 500, sort: true,title: '产品名称' },
+                    { field: 'proCount', width: 300, sort: true,title: '消费数量' }
+                ]]
+            });
+        }
+        renderTable();
+
+        // 搜索按钮点击事件
+        $('#product-btn-search').click(function () {
+            var createTime = $('#datebegin').val();
+            var updateTime = $('#dateend').val();
+            if (strUtil.isEmpty(datebegin) && !strUtil.isEmpty(updateTime)) {
+                createTime = dateUtil.getNowDate();
+                $('#datebegin').val(createTime);
+            }
+            if (!strUtil.isEmpty(createTime) && strUtil.isEmpty(updateTime)) {
+                updateTime = dateUtil.getNowDate();
+                $('#dateend').val(updateTime);
+            }
+            table.reload('product-table', { where: { createTime: createTime,updateTime: updateTime } });
+        });
+    });
+</script>
\ No newline at end of file

--
Gitblit v1.8.0