cl
2024-01-19 e0fac38b26845f25de479783e0c76cf12a5311e0
提交 | 用户 | 时间
71e81e 1 /**
2  * 添加或者修改页面
3  */
4 var BadCollectionInfoDlg = {
5     data: {
6         id: "",
7         workOrderNo: "",
8         sfcCode: "",
9         workshopCode: "",
10         productCode: "",
11         productionLine: "",
12         locationCode: "",
13         equipmentNo: "",
14         typeCode: "",
15         typeName: "",
16         badCode: "",
17         badDesc: "",
18         collectionTime: "",
19         collectionUser: "",
20         spareField1: "",
21         spareField2: "",
22         createUser: "",
23         createTime: "",
24         updateUser: "",
25         updateTime: ""
26     }
27 };
28
29 layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () {
30     var $ = layui.jquery;
31     var $ax = layui.ax;
32     var form = layui.form;
33     var admin = layui.admin;
34
35     //表单提交事件
36     form.on('submit(btnSubmit)', function (data) {
37         console.log("11111111111");
38         var ajax = new $ax(Feng.ctxPath + "/badCollection/addItem", function (data) {
39             Feng.success("添加成功!");
40             //传给上个页面,刷新table用
41             admin.putTempData('formOk', true);
42             //关掉对话框
43             admin.closeThisDialog();
44         }, function (data) {
45             Feng.error("添加失败!" + data.responseJSON.message)
46         });
47         ajax.set(data.field);
48         ajax.start();
49
50         return false;
51     });
52
53
54 });