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