admin
2024-01-10 7f291910791bdb9a545dc12ef36c3c359cfa4e59
提交 | 用户 | 时间
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?productionLine='+lineCodes+'&orderStatus=3',
71         url: Feng.ctxPath + '/productionOrdeInfo/list?orderStatus=3',
72         page: true,
73         cellMinWidth: 80,
74         cols: MaterialShortage.initColumn()
75     });
76     let Msg='';
77     table.on('row(materialShortageTable2)',function (data) {
78         Msg = data.data;
79     })
80     $('#btnSubmit').click(function(){
81         if (Msg !='' ){
82             // 判断是否点击的是确定
83             var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
84             window.localStorage.setItem('message',JSON.stringify(Msg));
85             parent.layer.close(index);
86         }
87         else {
88             Feng.error("请选择一条数据!")
89         }
90     });
91
92
93 });