懒羊羊
2024-01-11 be26d5065b4a07123638c220c0792e9250a458e6
提交 | 用户 | 时间
71e81e 1 /**
2  * 添加或者修改页面
3  */
4 var SerialNumbersConfInfoDlg = {
5     data: {
6         id: "",
7         years: "",
8         serialNumber: "",
9         lengths: "",
10         state: "",
11         createTime: "",
12         createUser: "",
13         updateTime: "",
14         updateUser: ""
15     }
16 };
17
18 layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () {
19     var $ = layui.jquery;
20     var $ax = layui.ax;
21     var form = layui.form;
22     var admin = layui.admin;
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37     //表单提交事件
38     form.on('submit(btnSubmit)', function (data) {
39         var ajax = new $ax(Feng.ctxPath + "/serialNumbersConf/addItem", function (data) {
40             Feng.success("添加成功!");
41             window.location.href = Feng.ctxPath + '/serialNumbersConf'
42         }, function (data) {
43             Feng.error("添加失败!" + data.responseJSON.message)
44         });
45         ajax.set(data.field);
46         ajax.start();
47
48         return false;
49     });
50
51     $('#cancel').click(function(){
52         window.location.href = Feng.ctxPath + '/serialNumbersConf'
53     });
54
55 });