严智鑫
2024-05-13 cedce4883f0d204f5bf7bf87c0bf4858dabb0c23
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<%@ page language="java" pageEncoding="UTF-8"%>
<!-- 流程卡详情 -->
<div class="modal fade" id="lck_Info" tabindex="-1" role="dialog"
    aria-labelledby="myModalLabel" aria-hidden="true"
    style="overflow-y: auto; height: 99%">
    <div class="modal-dialog" style="width: 80%; height: 100%">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                    aria-hidden="true" data-backdrop="static">&times;</button>
 
                <p class="modal-title">
                    <span id="modal_title" style="font-weight: bolder; font-size: 25px"></span>
                    <span id="modal_prices" style="font-weight: bolder; font-size: 25px"></span>
                    <!--     &nbsp;&nbsp;&nbsp;&nbsp; <small id="cz_alert"
                        style="font-weight: bolder; font-size: 15px; color: red">设置破损后的玻璃可以在【钢化前管理-在线队列】中重新上片</small> -->
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <button id = "btnLCKBGQR" type="button" class='btn btn-large btn-success' style="display:none">报工确认</button>
                </p>
                
                
                
            </div>
 
            <div class="modal-body">
                <div class="no-padding" id="lck_detail"></div>
            </div>
            <div class="modal-footer"></div>
        </div>
    </div>
</div>
 
 
<!-- 流程卡详情 -->
<script>
     var url = "";  
    var p_url = "/gmms2/mesview/data/_public_manage";
    
    var current_lck = null;
    var lck_opt = {
        table : {
            style : "width:100%",
            "class" : "table table-striped table-hover"
        },
        columns : [
{
            name : "流程卡号",
            binding : 0,
            //editAble:true,//设置列可编辑
            filter : {}
        //设置列可搜索
        }, {
            name : "宽度",
            binding : 3,
            filter : {}
        }, {
            name : "高度",
            binding : 4,
            filter : {}
        }, {
            name : "订单片数",
            binding : 1,
            //type : "element",
            filter : {}
        }, {
            name : "库内片数",
            binding : 2,
            //type : "element",
            filter : {}
        }, {
            name : "膜系",
            binding : 5,
            filter : {}
        } ]
    };
 
    //创建表
    var lck_db = createTable(document.getElementById("lck_detail"), lck_opt);
 
    //加载表格内容        
    function LoadLCKTable(Id) {
        $.ajax({
                    type : "post",
                    data : {
                        leixing : "流程卡详情",
                        caozuo : "查询",
                        line : group,
                        lckh:Id,
                        gongyi:"仓储配对"
                    },
                    dataType : "json",
                    url : p_url,
                    success : function(data) {
                        var d = data;
                        var pricesk=0;
                        var pricesd=0;
                        var typez=0;
                        for (var i = 0; i < d.length; i++) {
                            pricesd+=d[i][1];
                            pricesk+=d[i][2];
                            typez+=1;
                        }
                        lck_db.update(d);
                        $("#modal_prices").html("       订单片数:" + pricesd+"       库内片数:" + pricesk+"    规格种类:"+typez);
 
                    },
                    error : function(data) {
 
                        //$("#lck_Info").modal('toggle');
                    }
                });
        //a = true;
    }
    
    function set_posun(gId, Id, rI) {
        $("#c_banzu").text(current_bz);
        $("#cp-warring-info").text("");
        $("#blID").text(gId);
        $("#tID").text(Id);
        var r = rI+2;
        var tRow = $("#lck_detail table").find('tr').eq(r);
        $("#lckNO").text(current_lck);
        $("#blSize").text(
                tRow.find('td').eq(2).text() + " * "
                        + tRow.find('td').eq(3).text());
        $("#blType").text(tRow.find('td').eq(4).text());
 
        $('#div_cipo').modal('toggle');
    }
 
    function look_detail(Id) {
        //$("#modal_title").html(lck_No + " 流程钢化前上片任务详情")
        LoadLCKTable(Id);
        /* $("#lck_Info").modal({
            
             keyboard: false,  //为true时键盘上的 esc 键被按下时关闭模态框。
                backdrop:false   //为true时点击模态框外的灰色背景将关闭模态框
        }); */
        if (Id!=null && Id!="") {
            var lckNo = current_lck = Id;
            $("#modal_title").html("流程卡玻璃小片详情 流程卡号:" + Id);
        } else {
 
            $("#modal_title").html("流程卡玻璃小片详情 流程卡号:");
        }
        
        $("#lck_Info").modal('toggle');
    }
 
    function set_glass_posun(glassId, sId) {
        $.ajax({
                    type : "post",
                    data : {
                        moshi : 2,
                        Id : glassId,
                        name : "设置破损",
                        line : group
                    },
                    url : gh_url,
                    dataType : "text",
                    success : function(data) {
                        var d = data;
                        if (data == 1) {
                            LoadLCKTable(sId);
                        } else if (data > 1) {
                            $("#CZ_Msg").modal('toggle');
                            $("#cz_Ming").html("设置玻璃破损:");
                            $("#cz_Zhuangtai").html("设置可能存在异常!");
                            $("#cz_Zhuangtai").attr("style", "color:red;");
                            $("#cz_mingxi").html(
                                    "玻璃编号:" + glassId + ",返回值:" + data
                                            + ",可能修改了多条数据,请检查原因!");
 
                        } else {
 
                            $("#CZ_Msg").modal('toggle');
                            $("#cz_Ming").html("设置玻璃破损:");
                            $("#cz_Zhuangtai").html("设置可能失败!");
                            $("#cz_Zhuangtai").attr("style", "color:red;");
                            $("#cz_mingxi").html(
                                    "玻璃编号:" + glassId + ",返回值:" + data
                                            + ",设置可能失败,请检查原因!");
                        }
                    },
                    error : function(data) {
                        $("#CZ_Msg").modal('toggle');
                        $("#cz_Ming").html("设置玻璃破损:");
                        $("#cz_Zhuangtai").html("设置失败!");
                        $("#cz_Zhuangtai").attr("style", "color:red;");
                        $("#cz_mingxi").html(
                                "玻璃编号:" + glassId + ",请检查原因后刷新页面!" + data);
 
                    }
                })
    }
</script>