cl
2024-01-19 e0fac38b26845f25de479783e0c76cf12a5311e0
提交 | 用户 | 时间
71e81e 1 /**
2  * 详情对话框
3  */
4 var CollectionParamConfInfoDlg = {
5     data: {
6         id: "",
7         paramCode: "",
8         paramName: "",
9         productionLine: "",
10         locationCode: "",
11         equipmentNo: "",
12         dataType: "",
13         unit: "",
14         paramUpper: "",
15         paramLower: "",
16         paramCentral: "",
17         spareField1: "",
18         spareField2: "",
19         remarks: "",
20         createUser: "",
21         createTime: "",
22         updateUser: "",
23         productCode: "",
24         gatherAddress: "",
25         gatherSequence: "",
26         updateTime: ""
27     }
28 };
29
30 layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () {
31     var $ = layui.jquery;
32     var $ax = layui.ax;
33     var form = layui.form;
34     var admin = layui.admin;
35
36     //获取详情信息,填充表单
37     var ajax = new $ax(Feng.ctxPath + "/collectionParamConf/detail?id=" + Feng.getUrlParam("id"));
38     var result = ajax.start();
39     form.val('collectionParamConfForm', result.data);
40
41     //表单提交事件
42     form.on('submit(btnSubmit)', function (data) {
43         var ajax = new $ax(Feng.ctxPath + "/collectionParamConf/editItem", function (data) {
44             Feng.success("更新成功!");
45             window.location.href = Feng.ctxPath + '/collectionParamConf'
46
47         }, function (data) {
48             Feng.error("更新失败!" + data.responseJSON.message)
49         });
50         ajax.set(data.field);
51         ajax.start();
52
53         return false;
54     });
55
56     $('#cancel').click(function(){
57         window.location.href = Feng.ctxPath + '/collectionParamConf'
58     });
59
60 });