懒羊羊
2023-08-30 1ac2bc1590406d9babec036e154d8d08f34a6aa1
提交 | 用户 | 时间
1ac2bc 1 /**
2  * 详情对话框
3  */
4 var ProductBomInfoInfoDlg = {
5     data: {
6         id: "",
7         bomCode: "",
8         bomName: "",
9         productCode: "",
10         productName: "",
11         version: "",
12         status: "",
13         spareField1: "",
14         spareField2: "",
15         remark: "",
16         createUser: "",
17         createTime: "",
18         updateUser: "",
19         updateTime: ""
20     }
21 };
22
23 layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () {
24     var $ = layui.jquery;
25     var $ax = layui.ax;
26     var form = layui.form;
27     var admin = layui.admin;
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     var ajax = new $ax(Feng.ctxPath + "/productBomInfo/detail?id=" + Feng.getUrlParam("id"));
59     var result = ajax.start();
60     form.val('productBomInfoForm', result.data);
61
62     //表单提交事件
63     form.on('submit(btnSubmit)', function (data) {
64         var ajax = new $ax(Feng.ctxPath + "/productBomInfo/editItem", function (data) {
65             Feng.success("更新成功!");
66             window.location.href = Feng.ctxPath + '/productBomInfo'
67         }, function (data) {
68             Feng.error("更新失败!" + data.responseJSON.message)
69         });
70         ajax.set(data.field);
71         ajax.start();
72
73         return false;
74     });
75
76     $('#cancel').click(function(){
77         window.location.href = Feng.ctxPath + '/productBomInfo'
78     });
79 });