Selaa lähdekoodia

4月12日bug修改

杨青 2 vuotta sitten
vanhempi
commit
519d69df35
1 muutettua tiedostoa jossa 44 lisäystä ja 26 poistoa
  1. 44 26
      src/xt_pages/management/components/RepairForm.vue

+ 44 - 26
src/xt_pages/management/components/RepairForm.vue Näytä tiedosto

52
           <el-button type="primary" @click="printCard">打印</el-button>
52
           <el-button type="primary" @click="printCard">打印</el-button>
53
       </el-col>
53
       </el-col>
54
     </el-row>
54
     </el-row>
55
-
55
+   
56
       <el-table
56
       <el-table
57
         ref="multipleTable"
57
         ref="multipleTable"
58
         @selection-change="handleSelectionChange"
58
         @selection-change="handleSelectionChange"
80
 
80
 
81
         <el-table-column prop="date" label= "型号" width="80" align="center">
81
         <el-table-column prop="date" label= "型号" width="80" align="center">
82
           <template slot-scope="scope">
82
           <template slot-scope="scope">
83
-            <span v-if="getRepairName(scope.row.equitment_id) == 1">透析机</span>
84
-            <span v-if="getRepairName(scope.row.equitment_id) == 2">水处理机</span>
85
-            <span v-if="getRepairName(scope.row.equitment_id) == 3">其他</span>
83
+            <span v-if="getRepairName(scope.row.equitment_id) == 1">透析机</span> 
84
+            <span v-if="getRepairName(scope.row.equitment_id) == 2">水处理机</span> 
85
+            <span v-if="getRepairName(scope.row.equitment_id) == 3">其他</span> 
86
           </template>
86
           </template>
87
         </el-table-column>
87
         </el-table-column>
88
 
88
 
135
               {{ scope.row.reason }}
135
               {{ scope.row.reason }}
136
               </template>
136
               </template>
137
            </el-table-column>
137
            </el-table-column>
138
-
139
-
140
-
138
+ 
139
+      
140
+        
141
         <el-table-column label="操作" align="center" min-width="150px">
141
         <el-table-column label="操作" align="center" min-width="150px">
142
           <template slot-scope="scope">
142
           <template slot-scope="scope">
143
             <el-tooltip
143
             <el-tooltip
574
                 >
574
                 >
575
                  保养维护内容
575
                  保养维护内容
576
                 </td>
576
                 </td>
577
-
577
+              
578
                 <td
578
                 <td
579
                   :colspan="3"
579
                   :colspan="3"
580
                   style="text-align:center;width:60px;font-size:15px;"
580
                   style="text-align:center;width:60px;font-size:15px;"
588
                 >
588
                 >
589
                  维修者
589
                  维修者
590
                 </td>
590
                 </td>
591
-
591
+              
592
                 <td
592
                 <td
593
                   :rowspan="2"
593
                   :rowspan="2"
594
                   style="text-align:center;width:120px;font-size:15px;"
594
                   style="text-align:center;width:120px;font-size:15px;"
604
                 </td>
604
                 </td>
605
 
605
 
606
 
606
 
607
-
608
-
607
+               
608
+               
609
               </tr>
609
               </tr>
610
               <tr>
610
               <tr>
611
-
611
+              
612
                 <td style="text-align:center;font-size:15px;height:30px">
612
                 <td style="text-align:center;font-size:15px;height:30px">
613
                   功能及附件检查
613
                   功能及附件检查
614
                 </td>
614
                 </td>
617
                   其他
617
                   其他
618
                 </td>
618
                 </td>
619
 
619
 
620
-
620
+                 
621
                 <td style="text-align:center;font-size:15px;height:30px">
621
                 <td style="text-align:center;font-size:15px;height:30px">
622
                   故障现象
622
                   故障现象
623
                 </td>
623
                 </td>
629
                 <td style="text-align:center;font-size:15px;height:30px">
629
                 <td style="text-align:center;font-size:15px;height:30px">
630
                   维修结果
630
                   维修结果
631
                 </td>
631
                 </td>
632
-
633
-
634
-
632
+           
633
+               
634
+            
635
               </tr>
635
               </tr>
636
               <tr v-for="item in this.tableData" :key="item.id">
636
               <tr v-for="item in this.tableData" :key="item.id">
637
                 <td style="text-align:center;font-size:15px;height:30px">
637
                 <td style="text-align:center;font-size:15px;height:30px">
639
                 </td>
639
                 </td>
640
 
640
 
641
                 <td style="text-align:center;font-size:15px;height:30px">
641
                 <td style="text-align:center;font-size:15px;height:30px">
642
-                  <span v-if="getRepairName(item.equitment_id) == 1">透析机</span>
643
-                  <span v-if="getRepairName(item.equitment_id) == 2">水处理机</span>
644
-                  <span v-if="getRepairName(item.equitment_id) == 3">其他</span>
642
+                  <span v-if="getRepairName(item.equitment_id) == 1">透析机</span> 
643
+                  <span v-if="getRepairName(item.equitment_id) == 2">水处理机</span> 
644
+                  <span v-if="getRepairName(item.equitment_id) == 3">其他</span> 
645
                 </td>
645
                 </td>
646
-
646
+                
647
                 <td style="text-align:center;font-size:15px;height:30px">
647
                 <td style="text-align:center;font-size:15px;height:30px">
648
                   {{item.function_accessories_inspection }}
648
                   {{item.function_accessories_inspection }}
649
                 </td>
649
                 </td>
651
                 <td style="text-align:center;font-size:15px;height:30px">
651
                 <td style="text-align:center;font-size:15px;height:30px">
652
                   {{ item.other_information }}
652
                   {{ item.other_information }}
653
                 </td>
653
                 </td>
654
-
654
+                 
655
                 <td style="text-align:center;font-size:15px;height:30px">
655
                 <td style="text-align:center;font-size:15px;height:30px">
656
                   {{ item.fault_description }}
656
                   {{ item.fault_description }}
657
                 </td>
657
                 </td>
658
-
658
+                
659
                 <td style="text-align:center;font-size:15px;height:30px">
659
                 <td style="text-align:center;font-size:15px;height:30px">
660
                    {{item.cause_analysis }}
660
                    {{item.cause_analysis }}
661
                 </td>
661
                 </td>
668
                 <td style="text-align:center;font-size:15px;height:30px">
668
                 <td style="text-align:center;font-size:15px;height:30px">
669
                   {{ getName(item.admin_user_id) }}
669
                   {{ getName(item.admin_user_id) }}
670
                 </td>
670
                 </td>
671
-
671
+                
672
                 <td style="text-align:center;font-size:15px;height:30px">
672
                 <td style="text-align:center;font-size:15px;height:30px">
673
                   {{ getTime(item.guarantee_date) }}
673
                   {{ getTime(item.guarantee_date) }}
674
                 </td>
674
                 </td>
676
                 <td style="text-align:center;font-size:15px;height:30px">
676
                 <td style="text-align:center;font-size:15px;height:30px">
677
                   {{item.reason }}
677
                   {{item.reason }}
678
                 </td>
678
                 </td>
679
-
679
+             
680
               </tr>
680
               </tr>
681
             </table>
681
             </table>
682
           </div>
682
           </div>
1081
     },
1081
     },
1082
     printCard(){
1082
     printCard(){
1083
       console.log('sadfgadsf');
1083
       console.log('sadfgadsf');
1084
-    }
1085
-  },
1084
+      }
1085
+    },
1086
+    printCard() {
1087
+        this.hiddenShow = true;
1088
+        var ptime = Math.round(new Date().getTime() / 1000);
1089
+        this.print_time = uParseTime(ptime, "{y}年{m}月{d}日");
1090
+
1091
+        const style =
1092
+          "@media print { .print_main_content { background-color: white; width:960px; margin:0 auto; padding: 0 0 20px 0;font-size:15px } .print_main_content .order_title { text-align: center; font-size: 15px; line-height: 50px;} .print_main_content table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px;font-size:15px } .print_main_content table tbody tr td { border: 1px solid; text-align: center; padding: 10px 8px;font-size:15px } .td_proj_title { font-size: 15px; line-height: 25px;} .td_proj_content { font-size: 15px; line-height: 25px; } .td_align_left { text-align: left; } .print_footnote_panel { font-size: 15px; line-height: 40px; } .print_footnote_panel .proj { display: inline-block; width: 49%; } .print_footnote_panel .proj}";
1093
+
1094
+        setTimeout(() => {
1095
+          printJS({
1096
+            printable: "print-card-info-one",
1097
+            type: "html",
1098
+            style: style,
1099
+            scanStyles: false
1100
+          });
1101
+        }, 1);
1102
+      },
1103
+ 
1086
   created() {
1104
   created() {
1087
     this.getAllSubregion();
1105
     this.getAllSubregion();
1088
     this.getAllRepair();
1106
     this.getAllRepair();