addCountDetailChild.html
4 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
101
102
103
104
105
106
107
108
109
110
<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m form-inline" id="form-countDetailsChild-add" autocomplete="off">
<div class="form-group">
<div class="col-sm-3">
<label>物料编码:</label>
<input id="materialCode" class="form-control" th:field="*{cycleCountDetailChild.materialCode}" readonly
name="materialCode"
type="text">
</div>
<div class="col-sm-3">
<label>物料名称:</label>
<input id="materialName" class="form-control" th:field="*{cycleCountDetailChild.materialName}" readonly
name="materialName"
type="text">
</div>
<div class="col-sm-3">
<label>物料单位:</label>
<input id="materialUnit" class="form-control" th:field="*{cycleCountDetailChild.materialUnit}" readonly
name="materialUnit"
type="text">
</div>
<div class="col-sm-3">
<label>库存状态:</label>
<select id="inventorySts" class="form-control" name="qualityStatus">
<option value="0">合格</option>
<option value="1">不合格</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-3">
<label style="width: 65px;">X坐标:</label>
<input id="locationNoX" class="form-control" name="locationNoX" type="text">
</div>
<div class="col-sm-3">
<label style="width: 65px;">Y坐标:</label>
<input id="locationNoY" class="form-control" name="locationNoY" type="text">
</div>
<div class="col-sm-3">
<label style="width: 65px;">追溯码:</label>
<input id="tracingNo" class="form-control" name="tracingNo" type="text">
</div>
</div>
<div class="form-control-static col-sm-offset-6" style="float: right">
<button type="submit" class="btn btn-primary">提交</button>
<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script th:inline="javascript">
let prefix = ctx + "inventory/cycleCountDetail"
let cycleCountDetailChild = [[${cycleCountDetailChild}]];
$("#form-countDetailsChild-add").validate({
rules: {
locationNoX: {
required: true,
},
locationNoY: {
required: true
},
},
submitHandler: function () {
let params = cycleCountDetailChild;
params.cycleCountDetailChildId = null;
params.locationNoX = $("#locationNoX").val();
params.locationNoY = $("#locationNoY").val();
params.tracingNo = $("#tracingNo").val();
params.qualityStatus = $("#qualityStatus").val();
$.modal.loading("正在处理中,请稍后...");
var config = {
url: prefix + "/saveCountDetailChild",
type: "post",
contentType: "application/json; charset=utf-8",
dataType: "json",
data: JSON.stringify(params),
success: function (result) {
$.operate.saveSuccess(result);
}
};
$.ajax(config)
}
});
</script>
</body>
<style>
label {
float: left;
line-height: 34px;
}
.form-group {
width: 100%;
}
select {
width: 160px !important;
}
input {
width: 160px !important;
}
</style>
</html>