AgvOperate.html
2.52 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
51
52
53
54
55
56
57
58
59
<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body>
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-receiving-add">
<div class="form-group" style="text-align: center;transform: scale(1.2, 1.2);">
<div class="col-sm-8" id="stationBind">
<div class="radio radio-info radio-inline">
<input type="radio" id="task1" name="task" value="1" data-info="1号站台" checked="checked" class="radio_select">
<label for="task1">1号站台</label>
</div>
</div>
</div>
<div class="form-group" style="position: absolute;right: 120px">
<div class="form-control-static col-sm-offset-9">
<input type="button" onclick="typeSelect()" class="btn btn-primary" value="确定">
<!--<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>-->
</div>
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
var prefix = ctx + "receipt/AgvReceiving";
$(function () {
$.ajax({
url:prefix+'/getStation',
type:'post',
success:function (res) {
if(res.code===200){
$("#task1").attr("data-station",res.data[0].code);
let len=res.data.length;
for (let i = 2; i <= len; i++) {
let dom="<div class='radio radio-info radio-inline'><input type='radio' id='task"+ i +"' name='task' value='"+ i+"' " +
"data-info='"+ i +"号站台' data-station='"+ res.data[i-1].code+"'>" + "<label for='task"+ i+"'>"+ i+"号站台</label></div>";
$("#stationBind").append(dom);
}
}
}
})
});
//站台选择
function typeSelect() {
let stationSelect=$("input[name='task']:checked").attr("data-info");
let stationVal=$("input[name='task']:checked").val();
let stationCode=$("input[name='task']:checked").attr("data-station");
window.parent.$("#stationInfo").text(stationSelect);
window.parent.$("#stationInfo").attr("data-info",stationVal);
window.parent.$("#stationInfo").attr("data-station",stationCode);
window.parent.station=stationVal;
$.modal.close()
}
</script>
</body>
</html>