cl
2024-01-23 6dadf36ef118fbb3b2cd5aca94cde88e29fb55dc
提交 | 用户 | 时间
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     var lineCodes = parent.lineCode;
30
31     /**
32      * bom信息管理
33      */
34     var MaterialShortage = {
35         tableId: "materialShortageTable2"
36     };
37
38     $(document).ready(function() {
39         console.log(lineCodes);
40     });
41
42
43         $('#serch').click(function(){
44         var queryData = {};
45         queryData['workOrderNo'] = $("#workOrderCode").val();
46         queryData['materialCode'] = $("#materialCode").val();
47         table.reload(MaterialShortage.tableId, {
48             where: queryData, page: {curr: 1}
49         });
50     });
51     /**
52      * 缺料报警初始化表格的列
53      */
54     MaterialShortage.initColumn = function () {
55         return [[
56             {type:'radio'},
57             {field: 'id', hide: true, title: 'ID'},
58             {field: 'workOrderNo', sort: true, title: '生产工单号',minWidth:140},
59             {field: 'materialCode', sort: true, title: '产品编号',minWidth:140},
60             {field: 'materialName', sort: true, title: '产品名称',minWidth:280},
61             {field: 'planQty', sort: true, title: '计划数',minWidth:120},
62             {field: 'createTime', sort: true, title: '创建时间',minWidth:160},
63             {field: 'actualQty', sort: true, title: '完成数量',align:'center',minWidth:120},
64         ]];
65     };
66
67     table =  $.extend(table, {config: {checkName: 'checked'}});
68     var tableResult = table.render({
69         elem: '#' + MaterialShortage.tableId,
70         url: Feng.ctxPath + '/productionOrdeInfo/list?orderStatus=3',
71         page: true,
72         cellMinWidth: 80,
73         cols: MaterialShortage.initColumn()
74     });
75     let Msg='';
76     table.on('row(materialShortageTable2)',function (data) {
77         Msg = data.data;
78     })
79     $('#btnSubmit').click(function(){
80         if (Msg !='' ){
81             // 判断是否点击的是确定
82             var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
83             window.localStorage.setItem('message',JSON.stringify(Msg));
84             parent.layer.close(index);
85         }
86         else {
87             Feng.error("请选择一条数据!")
88         }
89     });
90
91
92 });