wanglm 5 years ago
parent
commit
d39700131e
1 changed files with 74 additions and 0 deletions
  1. 74 0
      src/main/webapp/admin/salesDataManage/salesData.html

+ 74 - 0
src/main/webapp/admin/salesDataManage/salesData.html

@@ -0,0 +1,74 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <title>销售数据</title>
+    <script src="../../js/min-loader-next.js"></script>
+</head>
+<body class="content">
+<div class="order-body">
+</div>
+<div class="shadow-content" style="margin:1.5rem;">
+    <table id="salesManage" lay-filter="tableFilter"></table>
+</div>
+<script type="text/html" id="switch">
+    <div  style="width:90px;height:70px">
+        {{#
+        if(!isEmpty(d.fmPic)&& d.fmPic != "null"){ }}
+        <img  src="{{ d.fmPic}}">
+        {{# } }}
+    </div>
+</script>
+<script>
+	layui.use(['table','laydate','form'], function(){
+		var laydate = layui.laydate;
+		$.request({
+			action : '../../invCardManageAction/selectAllIncome',
+			data : { },
+			success : function(data) {
+				var orderNum = data.orderNum;
+			    var countIncome = data.countIncome;
+			    var countDevice = data.countDevice;
+<!--				$("#orderNum").html(orderNum);-->
+<!--				$("#countIncome").html(countIncome);-->
+<!--				$("#countDevice").html(countDevice);-->
+				form.render();
+			}
+		});
+		form.render();
+	})
+
+	var table;
+	layui.use('table', function(){
+		table = layui.table;
+		table.render({
+			id : 'salesManage'
+		    ,elem: '#salesManage'
+		    ,limit:10
+		    ,url: 'invCardManageAction/selectSalesData' //数据接口
+		    ,method: 'post'
+		    ,where:{MINView:"JSON", token: 'sasasas'}
+		    ,page: true //开启分页
+		    ,cols: [[ //表头
+				{type:'numbers',title: '序号',width:'5%'}
+		      	,{field: 'fmPic', title: '商品照片', width:"8%",align:'center',templet:'#switch'}
+				,{field: 'logonname', title: '商品名称', width:'12%'}
+		      	,{field: 'name', title: '类别', width:'12%'}
+		      	,{field: 'rolename', title: '总销售', width:'15%'}
+		      	,{field: 'createdate', title: '出货数量',width:'15%'}
+		      	,{field: 'lastlogon', title: '利润分析',width:'15%'}
+		    ]]
+		    ,done: function(res, curr, count){
+		        //如果是异步请求数据方式,res即为你接口返回的信息。
+		        console.log(res);
+		        //得到当前页码
+		        console.log(curr);
+		        //得到数据总量
+		        console.log(count);
+		    }
+		    ,even: true //开启隔行背景
+		});
+	});
+</script>
+</body>
+</html>