提交 | 用户 | 时间
|
8286c6
|
1 |
/** |
懒 |
2 |
* 详情对话框 |
|
3 |
*/ |
|
4 |
var BatchCodeStorageInfoDlg = { |
|
5 |
data: { |
|
6 |
id: "", |
|
7 |
materialCode: "", |
|
8 |
materialName: "", |
|
9 |
batchCode: "", |
|
10 |
workOrderNo: "", |
|
11 |
productionLine: "", |
|
12 |
locationCode: "", |
|
13 |
isScan: "", |
|
14 |
quantity: "", |
|
15 |
spareField1: "", |
|
16 |
spareField2: "", |
|
17 |
remarks: "", |
|
18 |
createUser: "", |
|
19 |
createTime: "", |
|
20 |
erpSpec: "" |
|
21 |
} |
|
22 |
}; |
|
23 |
|
|
24 |
layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () { |
|
25 |
var $ = layui.jquery; |
|
26 |
var $ax = layui.ax; |
|
27 |
var form = layui.form; |
|
28 |
var admin = layui.admin; |
|
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 |
var ajax = new $ax(Feng.ctxPath + "/batchCodeStorage/detail?id=" + Feng.getUrlParam("id")); |
|
69 |
var result = ajax.start(); |
|
70 |
form.val('batchCodeStorageForm', result.data); |
|
71 |
|
|
72 |
//表单提交事件 |
|
73 |
form.on('submit(btnSubmit)', function (data) { |
|
74 |
var ajax = new $ax(Feng.ctxPath + "/batchCodeStorage/editItem", function (data) { |
|
75 |
Feng.success("更新成功!"); |
|
76 |
window.location.href = Feng.ctxPath + '/batchCodeStorage' |
|
77 |
|
|
78 |
}, function (data) { |
|
79 |
Feng.error("更新失败!" + data.responseJSON.message) |
|
80 |
}); |
|
81 |
ajax.set(data.field); |
|
82 |
ajax.start(); |
|
83 |
|
|
84 |
return false; |
|
85 |
}); |
|
86 |
|
|
87 |
$('#cancel').click(function(){ |
|
88 |
window.location.href = Feng.ctxPath + '/batchCodeStorage' |
|
89 |
}); |
|
90 |
|
|
91 |
}); |