懒羊羊
2023-11-14 8286c62256f23bc2367a6729c0f46f84215e380b
提交 | 用户 | 时间
8286c6 1 /**
2  * 详情对话框
3  */
4 var PlcInteractiveDataInfoDlg = {
5     data: {
6         id: "",
7         snCode: "",
8         grade: "",
9         stationCode: "",
10         workID: "",
11         palletID: "",
12         stationStatus: "",
13         spare: "",
14         createTime: "",
15         updateTime: "",
16         createUser: "",
17         updateUser: ""
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     var ajax = new $ax(Feng.ctxPath + "/plcInteractiveData/detail?id=" + Feng.getUrlParam("id"));
29     var result = ajax.start();
30     form.val('plcInteractiveDataForm', result.data);
31
32     //表单提交事件
33     form.on('submit(btnSubmit)', function (data) {
34         var ajax = new $ax(Feng.ctxPath + "/plcInteractiveData/editItem", function (data) {
35             Feng.success("更新成功!");
36             window.location.href = Feng.ctxPath + '/plcInteractiveData'
37         }, function (data) {
38             Feng.error("更新失败!" + data.responseJSON.message)
39         });
40         ajax.set(data.field);
41         ajax.start();
42
43         return false;
44     });
45
46     $('#cancel').click(function(){
47         window.location.href = Feng.ctxPath + '/plcInteractiveData'
48     });
49 });