AgvOperate.html
3.92 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!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="transform: scale(1.1, 1.1);">
<label class="col-sm-3 control-label">站台选择:</label>
<div class="col-sm-8">
<div class="radio radio-info radio-inline">
<input type="radio" id="task1" name="task" value="1" checked="checked" class="radio_select">
<label for="task1">1号站台</label>
</div>
<div class="radio radio-danger radio-inline">
<input type="radio" id="task2" name="task" value="2">
<label for="task2">2号站台</label>
</div>
</div>
</div>
<div class="form-group" style="transform: scale(1.1, 1.1);">
<label class="col-sm-3 control-label">任务类型:</label>
<div class="col-sm-8">
<div class="radio radio-info radio-inline">
<input type="radio" id="taskType1" name="taskType" value="1" checked="checked" class="radio_select">
<label for="taskType1">整盘入库</label>
</div>
<div class="radio radio-danger radio-inline">
<input type="radio" id="taskType2" name="taskType" value="2">
<label for="taskType2">补充入库</label>
</div>
</div>
</div>
<div class="form-group">
<div class="form-control-static col-sm-offset-9">
<input type="button" onclick="typeSubmit()" 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 typeSubmit() {
let id=$("input[name='task']:checked").val();
let code=window.parent.$("#code").val();
let containerCode=window.parent.$("#re_con").val();
let materialCode=$("#re_code").val();
let taskType=$("input[name='taskType']:checked").val();
if (code === "" || containerCode === "" || materialCode === "") {
$.modal.msgWarning("主单号、容器编码、物料编码不能为空!")
}
else if (id === '1') {
$.ajax({
url:prefix+'/TaskAssignsOne',
type:'post',
data:{
code:code,
containerCode:containerCode,
materialCode:materialCode,
taskType:taskType
},
success:function (res) {
if (res.code === 200) {
$.modal.msgSuccess(res.msg);
$.modal.close();
}
else {
$.modal.msgError(res.msg);
}
}
})
}
else if (id === '2') {
$.ajax({
url:prefix+'/TaskAssignsTwo',
type:'post',
data:{
code:code,
containerCode:containerCode,
materialCode:materialCode,
taskType:taskType
},
success:function (res) {
if (res.code === 200) {
$.modal.msgSuccess(res.msg);
$.modal.close();
}
else {
$.modal.msgError(res.msg);
}
}
})
}
}
</script>
</body>
</html>