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