cl
2024-01-19 e0fac38b26845f25de479783e0c76cf12a5311e0
提交 | 用户 | 时间
71e81e 1 /**
2  * 详情对话框
3  */
4 var KanbanConfInfoDlg = {
5     data: {
6         id: "",
7         pageCode: "",
8         ipAddress: "",
9         macAddress: "",
10         workshopCode: "",
11         workshopName: "",
12         lineCode: "",
13         lineName: "",
14         locationCode: "",
15         locationName: "",
16         warehouseCode: "",
17         warehouseName: ""
18     }
19 };
20
21 layui.use(['table','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     var table = layui.table;
27     var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
28
29
30     /**
31      * bom信息管理
32      */
33     var EquipmentTable = {
34         tableId: "equipmentTable"
35     };
36
37     $('#serch').click(function(){
38         var queryData = {};
39         queryData['equipmentNo'] = $("#equipmentNo").val();
40         queryData['equipmentName'] = $("#equipmentName").val();
41         table.reload(EquipmentTable.tableId, {
42             where: queryData, page: {curr: 1}
43         });
44     });
45     /**
46      * 缺料报警初始化表格的列
47      */
48     EquipmentTable.initColumn = function () {
49         return [[
50             {type: 'radio'},
51             {field: 'equipmentNo', sort: true, title: '设备编号'},
52             {field: 'equipmentName', sort: true, title: '设备名称'},
53             {field: 'workshopCode', sort: true, title: '车间编号'},
54             {field: 'productionLineCode', sort: true, title: '产线编号'},
55             {field: 'locationCode', sort: true, title: '工位编号'},
56             {field: 'equipmentType', sort: true, title: '设备类型'},
57             {field: 'equipmentModel', sort: true, title: '规格型号'},
58         ]];
59     };
60
61     var tableResult = table.render({
62         elem: '#' + EquipmentTable.tableId,
63         url: Feng.ctxPath + '/equipmentInfo/list',
64         page: true,
65         cellMinWidth: 80,
66         cols: EquipmentTable.initColumn()
67     });
68     let Msg='';
69     table.on('row(equipmentTable)',function (data) {
70         Msg = data.data;
71     })
72     $('#btnSubmit').focus(function(){
73         if (Msg !='' ){
74             // 判断是否点击的是确定
75             var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
76             window.localStorage.setItem('message',JSON.stringify(Msg));
77             parent.layer.close(index);
78         }
79         else {
80             Feng.error("请选择一条数据!")
81         }
82     });
83
84
85 });