yantian yue
2023-10-23 0d7d6a88080dc8759ef84ed5ad7875f25642df6c
提交 | 用户 | 时间
ffeba3 1 /**
2  * 详情对话框
3  */
4 var FormulaChildInfoInfoDlg = {
5     data: {
6         id: "",
7         formulaCode: "",
8         lineCode: "",
9         locationCode: "",
10         productCode: "",
11         operationSteps: "",
12         techRequirement: "",
13         operationType: "",
14         stepSort: "",
15         paramCode: "",
16         materialCode: "",
17         picture: "",
18         remarks: "",
19         spareField1: "",
20         spareField2: "",
21         spareField3: "",
22         spareField4: "",
23         createUser: "",
24         createTime: "",
25         updateUser: "",
26         updateTime: ""
27     }
28 };
29
30 layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () {
31     var $ = layui.jquery;
32     var $ax = layui.ax;
33     var form = layui.form;
34     var admin = layui.admin;
35
36     //获取详情信息,填充表单
37     var ajax = new $ax(Feng.ctxPath + "/formulaChildInfo/detail?id=" + Feng.getUrlParam("id"));
38     var result = ajax.start();
39     form.val('formulaChildInfoForm', result.data);
40
41     //表单提交事件
42     form.on('submit(btnSubmit)', function (data) {
43         var ajax = new $ax(Feng.ctxPath + "/formulaChildInfo/editItem", function (data) {
44             Feng.success("更新成功!");
45             // window.location.href = Feng.ctxPath + '/formulaChildInfo'
46             admin.putTempData('formOk', true);
47             //关掉对话框
48             admin.closeThisDialog();
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 + '/formulaChildInfo'
60         admin.closeThisDialog();
61     });
62 });