yantian yue
2023-10-23 0d7d6a88080dc8759ef84ed5ad7875f25642df6c
提交 | 用户 | 时间
ffeba3 1 /**
2  * 添加或者修改页面
3  */
4 var FormulaInfoInfoDlg = {
5     data: {
6         id: "",
7         formulaCode: "",
8         formulaName: "",
9         status: "",
10         spareField1: "",
cd500a 11         productCode: "",
ffeba3 12         spareField2: "",
13         remark: "",
14         createUser: "",
15         createTime: "",
16         updateUser: "",
17         updateTime: ""
18     }
19 };
20
21 layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () {
22     var $ = layui.jquery;
23     var $ax = layui.ax;
24     var form = layui.form;
25     var admin = layui.admin;
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46     //表单提交事件
47     form.on('submit(btnSubmit)', function (data) {
48         var ajax = new $ax(Feng.ctxPath + "/formulaInfo/addItem", function (data) {
49             Feng.success("添加成功!");
50             window.location.href = Feng.ctxPath + '/formulaInfo'
51         }, function (data) {
52             Feng.error("添加失败!" + data.responseJSON.message)
53         });
54         ajax.set(data.field);
55         ajax.start();
56
57         return false;
58     });
59
60     $('#cancel').click(function(){
61         window.location.href = Feng.ctxPath + '/formulaInfo'
62     });
63
64 });