懒羊羊
2023-10-10 cd500a4dab1bf530072ff6da83b907eebb48108a
提交 | 用户 | 时间
1ac2bc 1 /**
2  * 添加或者修改页面
3  */
4 var WorkshopInfoInfoDlg = {
5     data: {
6         id: "",
7         workshopCode: "",
8         workshopName: "",
9         spareField1: "",
10         spareField2: "",
11         remarks: "",
12         createUser: "",
13         createTime: "",
14         updateUser: "",
15         updateTime: ""
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     form.on('submit(btnSubmit)', function (data) {
46         var ajax = new $ax(Feng.ctxPath + "/workshopInfo/addItem", function (data) {
47             Feng.success("添加成功!");
48             window.location.href = Feng.ctxPath + '/workshopInfo'
49         }, function (data) {
50             Feng.error("添加失败!" + data.responseJSON.message)
51         });
52         ajax.set(data.field);
53         ajax.start();
54
55         return false;
56     });
57
58     $('#cancel').click(function(){
59         window.location.href = Feng.ctxPath + '/workshopInfo'
60     });
61
62 });