WmsInventoryDetailForm.jsp
11.1 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" session="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<%--
- Author(s): lty
- Date: 2024-04-28 16:32:28
- Description:
--%>
<head>
<title>
WmsInventoryDetail录入
</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script src="<%= request.getContextPath() %>/common/nui/nui.js" type="text/javascript">
</script>
</head>
<body>
<!-- 标识页面是查看(query)、修改(edit)、新增(add) -->
<input name="pageType" class="nui-hidden"/>
<div id="dataform1" style="padding-top:5px;">
<!-- hidden域 -->
<input class="nui-hidden" name="wmsinventorydetail.id"/>
<table style="width:100%;height:100%;table-layout:fixed;" class="nui-form-table">
<tr>
<td class="form_label">
库存所属工厂:
</td>
<td colspan="1">
<input class="nui-textbox" name="wmsinventorydetail.enterpriseCode"/>
</td>
<td class="form_label">
库存状态:
</td>
<td colspan="1">
<input class="nui-textbox" name="wmsinventorydetail.inventoryStatus"/>
</td>
</tr>
<tr>
<td class="form_label">
巷道:
</td>
<td colspan="1">
<input class="nui-textbox" name="wmsinventorydetail.roadWay"/>
</td>
<td class="form_label">
库位编码:
</td>
<td colspan="1">
<input class="nui-textbox" name="wmsinventorydetail.locationCode"/>
</td>
</tr>
<tr>
<td class="form_label">
容器编码:
</td>
<td colspan="1">
<input class="nui-textbox" name="wmsinventorydetail.containerCode"/>
</td>
<td class="form_label">
容器状态:
</td>
<td colspan="1">
<input class="nui-textbox" name="wmsinventorydetail.containerStatus"/>
</td>
</tr>
<tr>
<td class="form_label">
物料编码:
</td>
<td colspan="1">
<input class="nui-textbox" name="wmsinventorydetail.materialCode"/>
</td>
<td class="form_label">
物料名称:
</td>
<td colspan="1">
<input class="nui-textbox" name="wmsinventorydetail.materialName"/>
</td>
</tr>
<tr>
<td class="form_label">
qty:
</td>
<td colspan="1">
<input class="nui-textbox" name="wmsinventorydetail.qty"/>
</td>
<td class="form_label">
工单号:
</td>
<td colspan="1">
<input class="nui-textbox" name="wmsinventorydetail.orderNumber"/>
</td>
</tr>
<tr>
<td class="form_label">
图号:
</td>
<td colspan="1">
<input class="nui-textbox" name="wmsinventorydetail.drawingNumber"/>
</td>
<td class="form_label">
完工工序号:
</td>
<td colspan="1">
<input class="nui-textbox" name="wmsinventorydetail.processNumber"/>
</td>
</tr>
<tr>
<td class="form_label">
完工工序版本:
</td>
<td colspan="1">
<input class="nui-textbox" name="wmsinventorydetail.processVersion"/>
</td>
<td class="form_label">
批次号:
</td>
<td colspan="1">
<input class="nui-textbox" name="wmsinventorydetail.batchNumber"/>
</td>
</tr>
<tr>
<td class="form_label">
料箱号:
</td>
<td colspan="1">
<input class="nui-textbox" name="wmsinventorydetail.binNumber"/>
</td>
<td class="form_label">
序列号:
</td>
<td colspan="1">
<input class="nui-textbox" name="wmsinventorydetail.serialNumber"/>
</td>
</tr>
<tr>
<td class="form_label">
加工单元:
</td>
<td colspan="1">
<input class="nui-textbox" name="wmsinventorydetail.processingUnit"/>
</td>
<td class="form_label">
库存所属项目:
</td>
<td colspan="1">
<input class="nui-textbox" name="wmsinventorydetail.projectNo"/>
</td>
</tr>
<tr>
<td class="form_label">
创建人:
</td>
<td colspan="1">
<input class="nui-textbox" name="wmsinventorydetail.createBy"/>
</td>
<td class="form_label">
创建日期:
</td>
<td colspan="1">
<input class="nui-datepicker" name="wmsinventorydetail.createTime"/>
</td>
</tr>
<tr>
<td class="form_label">
更新人:
</td>
<td colspan="1">
<input class="nui-textbox" name="wmsinventorydetail.updateBy"/>
</td>
<td class="form_label">
更新日期:
</td>
<td colspan="1">
<input class="nui-datepicker" name="wmsinventorydetail.updateTime"/>
</td>
</tr>
</table>
<div class="nui-toolbar" style="padding:0px;" borderStyle="border:0;">
<table width="100%">
<tr>
<td style="text-align:center;" colspan="4">
<a class="nui-button" iconCls="icon-save" onclick="onOk()">
保存
</a>
<span style="display:inline-block;width:25px;">
</span>
<a class="nui-button" iconCls="icon-cancel" onclick="onCancel()">
取消
</a>
</td>
</tr>
</table>
</div>
</div>
<script type="text/javascript">
nui.parse();
function saveData(){
var form = new nui.Form("#dataform1");
form.setChanged(false);
//保存
var urlStr = "com.huaheng.wms.wmsinventorydetailbiz.addWmsInventoryDetail.biz.ext";
var pageType = nui.getbyName("pageType").getValue();//获取当前页面是编辑还是新增状态
//编辑
if(pageType=="edit"){
urlStr = "com.huaheng.wms.wmsinventorydetailbiz.updateWmsInventoryDetail.biz.ext";
}
form.validate();
if(form.isValid()==false) return;
var data = form.getData(false,true);
var json = nui.encode(data);
$.ajax({
url:urlStr,
type:'POST',
data:json,
cache:false,
contentType:'text/json',
success:function(text){
var returnJson = nui.decode(text);
if(returnJson.exception == null){
CloseWindow("saveSuccess");
}else{
nui.alert("保存失败", "系统提示", function(action){
if(action == "ok" || action == "close"){
//CloseWindow("saveFailed");
}
});
}
}
});
}
//页面间传输json数据
function setFormData(data){
//跨页面传递的数据对象,克隆后才可以安全使用
var infos = nui.clone(data);
//保存list页面传递过来的页面类型:add表示新增、edit表示编辑
nui.getbyName("pageType").setValue(infos.pageType);
//如果是点击编辑类型页面
if (infos.pageType == "edit") {
var json = infos.record;
var form = new nui.Form("#dataform1");//将普通form转为nui的form
form.setData(json);
form.setChanged(false);
}
}
//关闭窗口
function CloseWindow(action) {
if (action == "close" && form.isChanged()) {
if (confirm("数据被修改了,是否先保存?")) {
saveData();
}
}
if (window.CloseOwnerWindow)
return window.CloseOwnerWindow(action);
else window.close();
}
//确定保存或更新
function onOk() {
saveData();
}
//取消
function onCancel() {
CloseWindow("cancel");
}
</script>
</body>
</html>