严智鑫
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
<%@ page contentType="text/html;charset=UTF-8"%>
 
<html>
<head>
<script type="text/javascript" src="../static/jquery/jquery-3.1.0.min.js"></script>
<title>补片详细</title>
    <style>
    td{
        text-align:center;
    }
    </style>
 
</head>
<body style="padding: 20px;background-color:#D5EAFF;height:100%">
<div id='app'>
 <div style="margin-bottom:10px;">
 <p>补片</p>
   <span>材料</span>
   
   <form action="ajtab" method="get"  style="display: inline">
   <select v-model='select' style="width:100px" id="combo" name="select">
           <option :value="'all'" >全部</option>
        <option v-for='items in color' :value="items[0]" >{{items[0]}}</option>
   </select>
  <input @click='selectGlass' type="button" value="查询" style="height:28px;border:none;background-color:#5CADFE;padding-left:8px;padding-right:8px;border-radius:3px;margin-right:30px"/>
</form>
   
   <button @click="showGlass($event)" style="height:28px;border:none;background-color:#5CADFE;padding-left:8px;padding-right:8px;border-radius:3px">仅显选择</button>
   <button @click="closeGlass('cancel','补片作废')" style="height:28px;border:none;background-color:#5CADFE;padding-left:8px;padding-right:8px;border-radius:3px">补片作废</button>
   <button @click="closeGlass('create','生成补片单')"  style="height:28px;border:none;background-color:#5CADFE;padding-left:8px;padding-right:8px;border-radius:3px">生成补片单</button>
 </div>
 <div>
 <table border="1" id="tab1" style="border-collapse:collapse;width:100%" >
     <thead>
         <tr>
             <th style="width:40px">选择</th>
            <th style="width:150px">流程卡</th>
            <th style="width:60px">报补时间</th>
            <th style="width:80px">客户</th>
            <th style="width:80px">产品</th>
            <th style="width:50px">材料</th>
            <th style="width:50px">高度</th>
            <th style="width:50px">宽度</th>
            <th style="width:50px">数量</th>
         </tr>
        
    </thead>
    <tbody>
        <tr v-show="Object.keys(items).length!=0 && (selectShow==1?1:!items[0] ) "  v-for="(items,indexArr) in shuzu">
            <td><input v-model="ids" :value="items[1]" type="checkbox" @click="checkGlass($event,indexArr)" /></td>
            <td v-show='index>1'    v-for="(item,key,index) in items">
                {{item}}
            </td>
        </tr>
    </tbody>
  </table>
  </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:[],
          color:[],
          select:"",
          checkType:{
             color:"rgba(161,203,237,255)",
             color1:"rgba(0,0,0,0)"
          },
          selectShow:1,
          ids:[]
      },
      methods:{
          selectGlass:function(){
              let canshu={
                         color:this.select
                 }
                 let sql="{call AXJ_bupian_chaxun(?,?)}~"+JSON.stringify(canshu);
                  loadAjxs('补片详细',sql,2,"shuzu");
          },
          checkGlass:function(event,index){
              const check=$(event.currentTarget).prop('checked');
              if(check==true){
                  $(event.currentTarget).parents('tr').css("background-color",this.checkType.color);
                  this.shuzu[index][0]=0
              }else{
                  $(event.currentTarget).parents('tr').css("background-color",this.checkType.color1);
                  this.shuzu[index][0]=1
              }
              
          },
          showGlass:function(){
              this.selectShow=!this.selectShow;
              const check=$(event.currentTarget).text();
              if(check=="仅显选择"){
                  $(event.currentTarget).text('显示全部');
              }else{
                  $(event.currentTarget).text('仅显选择')
              }
          },
          closeGlass:function(type,type1){
              if(this.ids.length<1){
                  alert('请先选择相应流程卡')
                  return false;
              }
              if(!confirm("确认补片作废")){
                  return false;
              }
              let canshu = {
                      'action':type,
                      'ids':this.ids.join(',') 
              }
              let sql="{call supplement_action(?,?,?)}~"+JSON.stringify(canshu);
              this.connects(type1,sql,1,1);
          }
      },
      mounted:function(){
         let canshu={
                 color:""
         }
         let sql="{call AXJ_bupian_chaxun(?,?)}~"+JSON.stringify(canshu);
         let flag=2;
         loadAjxs('补片详细',sql,flag,"shuzu");
         sql="{call AXJ_bupian_yansechaxun(?)}";
         loadAjxs('补片详细颜色',sql,flag,"color");
      }
})
</script>
</html>