严智鑫
2025-03-14 c41e1c8b82b8f4c7b149e0576c9a37bc5b2dbb85
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
<%@ page contentType="text/html;charset=UTF-8" %>
 
<html>
<title>余料</title>
    <head>
 
       <script src="../static/js/jquery.min.js"></script>
              <script src="../static/js/ng/tb-2.0.js"></script>
       <style>
          .tl{
            font-weight:bold;
            margin-bottom:10px;
          }
 
          .tb{
            height:600px;
            width:90%;
            overflow:auto;
          }
 
          
          
          
       </style>
    </head>
    <body style="padding: 20px;background-color:#D5EAFF;height:90%" >
    <div id='app' >
        <div style="display: grid;height:100%; grid-template-columns: 30% 30% 30%; ">
        <div  style="width: 100%;">
            <h4 class="tl" id="t1">余料库1</h4>
            <div id="tb1" class="tb" >
                <table border=1 style="width:100%;border-collapse:collapse;">
                    <tr>
                        <th>库位</th>
                        <th>厚度</th>
                        <th>膜系</th>
                        <th>长边</th>
                        <th>短边</th>
                        <th>操作</th>
                    </tr>
                    <tr v-show="Object.keys(items).length!=0"  v-for="(items,index) in shuzu1.slice(0,50)">
                        <td v-show="indexs>2"    v-for="(item,key,indexs) in items">
                            {{item}}
                        </td>
                        <td>
                            <button @click="actionGlass(items[1])" v-if="items[4]==''">入库</button>
                            <button @click="outGlass(items[0])" v-else>出库</button>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div  style="width: 100%; height:600px;      ">
            <h4 class="tl" id="t2">余料库2</h4>
            <div id="tb2" class="tb">
                <table border=1 style="width:100%;border-collapse:collapse;">
                    <tr>
                        <th>库位</th>
                        <th>厚度</th>
                        <th>膜系</th>
                        <th>长边</th>
                        <th>短边</th>
                        <th>操作</th>
                    </tr>
                    <tr v-show="Object.keys(items).length!=0"  v-for="(items,index) in shuzu1.slice(50,100)">
                        <td v-show="indexs>2"    v-for="(item,key,indexs) in items">
                            {{item}}
                        </td>
                        <td>
                            <button @click="actionGlass(items[1])" v-if="items[4]==''">入库</button>
                            <button @click="outGlass(items[0])" v-else>出库</button>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div  style="width: 100%;">
            <h4 class="tl" id="t3">未入库</h4>
            <div id="tb3" class="tb">
                <table border=1 style="width:100%;border-collapse:collapse;">
                    <tr>
                        <th>厚度</th>
                        <th>膜系</th>
                        <th>长边</th>
                        <th>短边</th>
                        <th>操作</th>
                    </tr>
                    <tr :style="selid==items[0]?colors:''" v-show="Object.keys(items).length!=0"  v-for="(items,index) in shuzu">
                        <td v-show="indexs>1"    v-for="(item,key,indexs) in items">
                            {{item}}
                        </td>
                        <td>
                            <button @click="sel(items[0])">入库</button>
                            <button @click="clearGlass(items[0])">报废</button>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        </div>
</div>
</body>
    <script src="../js/vue.min.js"></script>
<script src="../js/mixins.js"></script>
<script>
 let app = new Vue({
      el:'#app',
      mixins:[mixin],
      data:{
          shuzu:[],
          shuzu1:[],
          selid:'',
          colors:{
              background:'rgb(92, 173, 254)'
          }
      },
      methods:{
          sel:function(ids){
             this.selid=ids;
          },
          clearGlass:function(ids){
              if(!confirm("确认报废此块玻璃")){
                  return
              }
              let canshu={
                      Id : ids,
                      tid : '0',
            }
              let sql="{call AXJ_qiegeguanli_yuliaoboli_baofei(?,?,?)}~"+JSON.stringify(canshu);
              this.connects('余料库报废'+ids+"号玻璃",sql,1,1);
              window.location.reload();
          },
          actionGlass:function(shelfid){
              let canshu={
                      Id : this.selid,
                      tid : shelfid,
            }
              let sql="{call AXJ_qiegeguanli_yuliaoboli_baofei(?,?,?)}~"+JSON.stringify(canshu);
              this.connects('余料库入库'+this.selid+"号玻璃",sql,1,1);
              window.location.reload();
          },
          outGlass:function(ids){
              if(!confirm("确认出库么?")){
                  return 
              }
              let canshu={
                      Id : ids,
            }
              let sql="{call AXJ_qiegeguanli_yuliaoboli_chuku(?,?)}~"+JSON.stringify(canshu);
              this.connects('余料库出库'+ids+"号架子",sql,1,1);
              window.location.reload();
          }
          
      },
      mounted:function(){
          $("#t3").text("入库列表");
          $("#t1").text("余料库1");
          $("#t2").text("余料库2");
          let sql="{call AXJ_qiegeguanli_yuliao_chaxun()}";
         let flag=2;
         loadAjxs('余料玻璃查询',sql,flag,"shuzu");
          sql="{call AXJ_qiegeguanli_yuliaoku_chaxun()}";
         loadAjxs('余料库查询',sql,flag,"shuzu1");  
      }
 
})
 </script>
</html>