cl
2024-01-23 6dadf36ef118fbb3b2cd5aca94cde88e29fb55dc
提交 | 用户 | 时间
b26949 1 /**
2  * 详情对话框
3  */
4 var GreaseManageInfoDlg = {
5     data: {
6         id: "",
7         barcode: "",
8         locationCode: "",
9         duaDate: "",
10         state: "",
11         createUser: "",
12         createTime: "",
13         remarks: "",
14         spareField1: "",
15         spareField2: ""
16     }
17 };
18
19 layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () {
20     var $ = layui.jquery;
21     var $ax = layui.ax;
22     var form = layui.form;
23     var admin = layui.admin;
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     var ajax = new $ax(Feng.ctxPath + "/greaseManage/detail?id=" + Feng.getUrlParam("id"));
49     var result = ajax.start();
50     form.val('greaseManageForm', result.data);
51
52     //表单提交事件
53     form.on('submit(btnSubmit)', function (data) {
54         var ajax = new $ax(Feng.ctxPath + "/greaseManage/editItem", function (data) {
55             Feng.success("更新成功!");
56             window.location.href = Feng.ctxPath + '/greaseManage'
57         }, function (data) {
58             Feng.error("更新失败!" + data.responseJSON.message)
59         });
60         ajax.set(data.field);
61         ajax.start();
62
63         return false;
64     });
65
66     $('#cancel').click(function(){
67         window.location.href = Feng.ctxPath + '/greaseManage'
68     });
69 });