yantian yue
2023-10-17 487b2f2a353b89ab46cd9b784226b600b7b915b8
提交 | 用户 | 时间
3d2401 1 /**
2  * 添加或者修改页面
3  */
4 var CustomInfoInfoDlg = {
5     data: {
6         id: "",
7         customerCode: "",
8         customerName: "",
9         customerType: "",
10         contact: "",
11         remarks: "",
12         createTime: "",
13         createUser: "",
14         updateTime: "",
15         updateUser: ""
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     form.on('submit(btnSubmit)', function (data) {
43         var ajax = new $ax(Feng.ctxPath + "/customInfo/addItem", function (data) {
44             Feng.success("添加成功!");
45             window.location.href = Feng.ctxPath + '/customInfo'
46         }, function (data) {
47             Feng.error("添加失败!" + data.responseJSON.message)
48         });
49         ajax.set(data.field);
50         ajax.start();
51
52         return false;
53     });
54
55     $('#cancel').click(function(){
56         window.location.href = Feng.ctxPath + '/customInfo'
57     });
58
59 });