index-rbb.html
1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>x-spreadsheet</title>
<link href="xspreadsheet.css" rel="stylesheet"></head>
<body onload="load()">
开始时间:<input type="input" id="starttime"></input>
结束时间:<input type="input" id="endtime"></input>
厂站:<input type="input" id="factoryId"></input>
<input type="button" name="test" onclick="submitData()" value="确定"></input>
<div id="x-spreadsheet-demo"></div>
<h1>效果如下</h1>
<table id="test" border="1" style="margin: 0 30px;border-collapse: collapse;"></table>
<br>
<br>
<script>
var result;
function submitData(){
var startTime = $("#starttime").val();
var endtime = $("#endtime").val();
var factoryId = $("#factoryId").val();
$.ajax({
type : "GET",
url : "/fmboot/v1/custom/fCustomReportInfo/reportShow?reportId=71073776cc83f1c9b15d623434d7607c&startTime="+startTime+"&endTime="+endtime+"&factoryId="+factoryId,
contentType:"application/json",
dataType : "json",
success : function(msg) {
$("#test").html(msg.result);
}
});
}
function load(){
// x.spreadsheet.locale('zh-cn');
var xs = x.spreadsheet('#x-spreadsheet-demo', {showToolbar: true, showGrid: true})
.loadData().change((cdata) => {
console.log(cdata);
console.log(xs.validate());
result=cdata;
});
alert("aaa");
}
</script>
<!--script type="text/javascript" src="https://unpkg.com/x-data-spreadsheet@1.0.20/dist/locale/zh-cn.js"></script-->
<script type="text/javascript" src="xspreadsheet.js"></script>
<script type="text/javascript" src="../generic/build/jquery-2.1.1.js"></script>
</body>
</html>