Browse Source

11月14日 库存扣减更新

XMLWAN 3 years ago
parent
commit
e00f2744dd

+ 8 - 0
src/api/schedule.js View File

@@ -237,3 +237,11 @@ export function synchroSchedule(params) {
237 237
     params: params
238 238
   })
239 239
 }
240
+
241
+export function getPatientScheduleTemplate(params) {
242
+  return request({
243
+    url: '/api/schedule/getpatientscheduletemplate',
244
+    method: 'get',
245
+    params: params
246
+  })
247
+}

+ 7 - 7
src/xt_pages/hospitalStation/components/deskPrescription.vue View File

@@ -286,10 +286,10 @@
286 286
                                         </el-table-column>
287 287
                                         <el-table-column label="库存" width="60">
288 288
                                             <template slot-scope="scope">
289
-                         <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919 || org_id ==10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 ">
290
-                             <span v-if="scope.row.count/scope.row.min_number>0">{{Math.floor(scope.row.count/scope.row.min_number)}}{{scope.row.max_unit}}</span>
291
-                             <span v-if="scope.row.count%scope.row.min_number>0"> {{scope.row.count%scope.row.min_number}}{{scope.row.min_unit}}</span>
292
-                          </span>
289
+                                          <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919 || org_id ==10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 ">
290
+                                              <span v-if="scope.row.count/scope.row.min_number>0">{{Math.floor(scope.row.count/scope.row.min_number)}}{{scope.row.max_unit}}</span>
291
+                                              <span v-if="scope.row.count%scope.row.min_number>0"> {{scope.row.count%scope.row.min_number}}{{scope.row.min_unit}}</span>
292
+                                            </span>
293 293
                                                 <span v-else> {{scope.row.total}}{{scope.row.total?scope.row.min_unit:''}}</span>
294 294
                                             </template>
295 295
                                         </el-table-column>
@@ -382,9 +382,9 @@
382 382
                                         </el-table-column>
383 383
                                         <el-table-column label="库存" width="40">
384 384
                                             <template slot-scope="scope">
385
-                         <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919 || org_id ==10106 || org_id == 9504 || org_id ==10215 || org_id == 10088">
386
-                            {{scope.row.stock_count}}
387
-                        </span>
385
+                                                <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919 || org_id ==10106 || org_id == 9504 || org_id ==10215 || org_id == 10088">
386
+                                                    {{scope.row.stock_count}}
387
+                                                </span>
388 388
                                                 <span v-else> {{ scope.row.total }}</span>
389 389
                                             </template>
390 390
                                         </el-table-column>

+ 12 - 7
src/xt_pages/stock/detail/print.vue View File

@@ -42,11 +42,9 @@
42 42
                 {{index+1}}
43 43
               </td>
44 44
               <td style="line-height: 50px">
45
-                <!-- <span>{{item.GoodInfo.good_name}}</span> -->
46 45
                 {{item.good_name}}
47 46
               </td>
48 47
               <td style="line-height: 50px">
49
-                <!-- <span>{{item.GoodInfo.specification_name}}</span> -->
50 48
                 {{item.specification_name}}
51 49
               </td>
52 50
              
@@ -60,18 +58,24 @@
60 58
                 <span v-if="type == 4"> {{ item.count }}</span>
61 59
               </td>
62 60
               <td style="line-height: 50px">
63
-                <!-- <span>{{item.GoodInfo.packing_unit}}</span> -->
64 61
                 {{item.packing_unit}}
65 62
               </td>
66 63
               <td style="line-height:50px">
67 64
                 <span v-if="type == 1"> {{ item.price }}</span>
68
-                <span v-if="type == 2"> {{ item.packing_price }}</span>
65
+                <span v-if="type == 2"> 
66
+                  <span v-if="org_id == 9919 || org_id == 9671">{{ item.buy_price }}</span>  
67
+                  <span v-else>
68
+                    {{ item.packing_price }} 
69
+                  </span>  
70
+                </span>
69 71
                  <span v-if="type == 4"> {{ item.price }}</span>
70 72
               </td>
71 73
               <td style="line-height:50px">
72 74
                 <span v-if="type == 1">{{(item.warehousing_count * item.price).toFixed(2)}}</span>
73 75
                 <span v-if="type == 2">
74
-                  <span v-if="org_id == 3907 || org_id ==9919">{{(getStockCount(item.good_id) * item.packing_price).toFixed(2) }}</span>
76
+                  <span v-if="org_id == 3907 || org_id ==9919 || org_id == 9671">
77
+                     {{(getStockCount(item.good_id) * item.buy_price).toFixed(2) }}
78
+                  </span>
75 79
                   <span v-else>{{(item.count * item.packing_price).toFixed(2)}}</span>
76 80
                 </span>
77 81
                 <span v-if="type == 4">{{(item.count * item.price).toFixed(2)}}</span>
@@ -93,7 +97,7 @@
93 97
               <td style="line-height: 50px"  width="80">
94 98
                 <span v-if="type == 1">{{getWareInfoTotal().toFixed(2)}}</span> 
95 99
                 <span v-if="type == 2">
96
-                  <span v-if="org_id == 3907 || org_id == 9919">{{getWareOutTotalOne().toFixed(2)}}</span>
100
+                  <span v-if="org_id == 3907 || org_id == 9919 || org_id == 9671">{{getWareOutTotalOne().toFixed(2)}}</span>
97 101
                   <span v-else> {{getWareOutTotal().toFixed(2)}}</span>
98 102
                  </span> 
99 103
                 <span v-if="type == 4">{{getWareOutTotal().toFixed(2)}}</span> 
@@ -402,9 +406,10 @@
402 406
        return total
403 407
      },
404 408
      getWareOutTotalOne(){
409
+       console.log("数据23332323",this.stockDatas)
405 410
        var total = 0
406 411
        for(let i=0;i<this.stockDatas.length;i++){
407
-         total+= this.getStockCount(this.stockDatas[i].good_id) * this.stockDatas[i].packing_price
412
+         total+= this.getStockCount(this.stockDatas[i].good_id) * this.stockDatas[i].buy_price
408 413
        }
409 414
        return total
410 415
      }

+ 58 - 37
src/xt_pages/stock/detail/stockOutDetail.vue View File

@@ -126,7 +126,8 @@
126 126
         </el-table-column>
127 127
         <el-table-column label="出货价" align="center">
128 128
           <template slot-scope="scope">
129
-            {{ scope.row.price }}
129
+            <span v-if="scope.row.is_total == 0 && (orgId == 9919 || orgId == 9671)">{{scope.row.GoodInfo.buy_price}}</span>
130
+            <span v-else> {{ scope.row.price }} </span>
130 131
           </template>
131 132
         </el-table-column>
132 133
         <el-table-column label="数量" align="center">
@@ -199,13 +200,14 @@ export default {
199 200
     }
200 201
     window.sessionStorage.removeItem('start')
201 202
     window.sessionStorage.removeItem('end')  
203
+    this.getGoodDetailPrintList()
202 204
     this.GetCancelStock();
203 205
     this.GetConfigInfo();
204 206
     this.fetchAllAdminUsers();
205 207
     this.goodUnit = this.$store.getters.good_unit
206 208
     var org_id = this.$store.getters.xt_user.org.id
207 209
     this.orgId = org_id
208
-    this.getGoodDetailPrintList()
210
+    
209 211
     
210 212
   },
211 213
   data() {
@@ -366,9 +368,10 @@ export default {
366 368
             total += response.data.data.list[i].price * response.data.data.list[i].count
367 369
             obj["is_total"] = 0;
368 370
             this.cancelStockDate.push(obj);
369
-            
370 371
           }
372
+          
371 373
           this.tableDataList = response.data.data.list
374
+           console.log("耗材出库数据323323323232232323232",this.tableDataList)
372 375
           this.cancelStockDate.push({
373 376
             warehouse_out_order_number: "合计",
374 377
             is_total: 1,
@@ -624,27 +627,27 @@ export default {
624 627
         }
625 628
       });
626 629
     },
627
-    getPrintStockGood(){
628
-      const params = {
629
-        start_time:this.start_time,
630
-        end_time:this.end_time,
631
-        type:3,
632
-      }
633
-      getPrintStockGood(params).then(response=>{
634
-          if(response.data.state == 1){
635
-            var stockTotal =  response.data.data.stockTotal
630
+    // getPrintStockGood(){
631
+    //   const params = {
632
+    //     start_time:this.start_time,
633
+    //     end_time:this.end_time,
634
+    //     type:3,
635
+    //   }
636
+    //   getPrintStockGood(params).then(response=>{
637
+    //       if(response.data.state == 1){
638
+    //         var stockTotal =  response.data.data.stockTotal
636 639
           
637
-            this.stockTotal = stockTotal
638
-            var list =  response.data.data.list
639
-            this.tableList = []
640
-            for(let i=0;i<list.length;i++){
641
-              if (list[i].query_warehouseout_info.length > 0) {
642
-                this.tableList.push(list[i])
643
-              }
644
-            }
645
-          }
646
-      })
647
-    },
640
+    //         this.stockTotal = stockTotal
641
+    //         var list =  response.data.data.list
642
+    //         this.tableList = []
643
+    //         for(let i=0;i<list.length;i++){
644
+    //           if (list[i].query_warehouseout_info.length > 0) {
645
+    //             this.tableList.push(list[i])
646
+    //           }
647
+    //         }
648
+    //       }
649
+    //   })
650
+    // },
648 651
      calCount(stock) {
649 652
         let total = 0
650 653
         var array = []
@@ -679,15 +682,6 @@ export default {
679 682
         }
680 683
         return Math.floor(amountPrice* 100) / 100
681 684
       },
682
-      getStockCount(id){
683
-        var count = ""
684
-        for(let i=0;i<this.stockTotal.length;i++){
685
-            if(id == this.stockTotal[i].good_id){
686
-              count = this.stockTotal[i].count
687
-            }
688
-        }
689
-        return count
690
-      },
691 685
       getTotal: function(price, total) {
692 686
         var m = 0, r1, r2
693 687
         var s1 = price.toString()
@@ -741,15 +735,23 @@ export default {
741 735
         this.tableOut[i].good_name = this.tableOut[i].good_name
742 736
         this.tableOut[i].specification_name = this.tableOut[i].specification_name
743 737
         this.tableOut[i].packing_unit = this.tableOut[i].packing_unit
744
-        this.tableOut[i].total_price = (this.tableOut[i].count * this.tableOut[i].packing_price).toFixed(2)
738
+        if(this.orgId == 9919 || this.orgId == 9671){
739
+          this.tableOut[i].total_price = (this.tableOut[i].count * this.tableOut[i].buy_price).toFixed(2)
740
+          this.tableOut[i].packing_price = this.tableOut[i].buy_price
741
+        }else{
742
+          this.tableOut[i].total_price = (this.tableOut[i].count * this.tableOut[i].packing_price).toFixed(2)
743
+        }
744
+      
745 745
         this.tableOut[i].out_count = this.getStockCount(this.tableOut[i].good_id)
746 746
        }
747 747
        import('@/vendor/Export2Excel').then(excel => {
748 748
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
749
+
749 750
        const filterVal = ['index','good_name', 'specification_name', 'packing_unit','out_count','packing_price','total_price','remark']
750 751
 
751 752
        const data = this.formatJson(filterVal, this.tableOut)
752
-       
753
+       console.log("date2332323232",data)
754
+        return
753 755
         excel.export_json_to_excel({
754 756
            header: tHeader,
755 757
            data,
@@ -770,8 +772,15 @@ export default {
770 772
           this.tableDataList[i].time = this.getTime(this.tableDataList[i].WarehouseOut.warehouse_out_time)
771 773
           this.tableDataList[i].user_name = this.getXuserName(this.tableDataList[i].WarehouseOut.creater)
772 774
           this.tableDataList[i].out_count = this.tableDataList[i].count
773
-          this.tableDataList[i].total_price = (this.tableDataList[i].count * this.tableDataList[i].price).toFixed(2)
774
-          total += this.tableDataList[i].count * this.tableDataList[i].price
775
+          if(this.orgId == 9919 || this.orgId == 9671){
776
+             this.tableDataList[i].total_price = (this.tableDataList[i].count * this.tableDataList[i].GoodInfo.buy_price).toFixed(2)
777
+             total += this.tableDataList[i].count * this.tableDataList[i].buy_price
778
+          }else{
779
+            this.tableDataList[i].total_price = (this.tableDataList[i].count * this.tableDataList[i].price).toFixed(2)
780
+            total += this.tableDataList[i].count * this.tableDataList[i].price
781
+          }
782
+         
783
+         
775 784
         }
776 785
         obj.total_price = total.toFixed(2)
777 786
         this.tableDataList.push(obj)
@@ -820,12 +829,24 @@ export default {
820 829
       getGoodDetailPrintList(params).then(response=>{
821 830
         if(response.data.state == 1){
822 831
           var list = response.data.data.list
832
+        
823 833
           this.tableOut = list
824 834
           var stockTotal = response.data.data.stockTotal
835
+          console.log("list88888888888888888888",stockTotal)
825 836
           this.stockTotal = stockTotal
826 837
         }
827 838
       })
828
-     } 
839
+     },
840
+     getStockCount(id){
841
+     
842
+        var count = ""
843
+        for(let i=0;i<this.stockTotal.length;i++){
844
+            if(id == this.stockTotal[i].good_id){
845
+              count = this.stockTotal[i].count
846
+            }
847
+        }
848
+        return count
849
+    }, 
829 850
   }
830 851
 };
831 852
 </script>

+ 68 - 36
src/xt_pages/stock/drugs/components/drugOutDetail.vue View File

@@ -153,13 +153,7 @@
153 153
           </template>
154 154
         </el-table-column>
155 155
 
156
-        <!-- <el-table-column label="单据类型" align="center">
157
-          <template slot-scope="scope">
158
-            <span v-if="scope.row.type == 1">药品出库单</span>
159
-            <span v-if="scope.row.type == 2">其他</span>
160
-          </template>
161
-        </el-table-column> -->
162
-
156
+       
163 157
         <el-table-column label="操作时间" align="center">
164 158
           <template slot-scope="scope">
165 159
            <span>{{getTime(scope.row.ctime)}}</span>
@@ -172,7 +166,8 @@
172 166
         </el-table-column>
173 167
         <el-table-column label="出货价" align="center">
174 168
           <template slot-scope="scope">
175
-           {{scope.row.price}}
169
+           <span v-if="org_id == 9919 || org_id == 9671">{{scope.row.last_price}} </span> 
170
+           <span v-else>{{scope.row.price}}</span>
176 171
           </template>
177 172
         </el-table-column>
178 173
         <el-table-column label="数量" align="center">
@@ -429,9 +424,16 @@ export default {
429 424
           for(let i=0;i<order.length;i++){
430 425
              order[i].specification_name  = order[i].dose + order[i].dose_unit + "*" + order[i].min_number +  order[i].min_unit + "/" + order[i].max_unit
431 426
              order[i].is_total = 0
432
-             order[i].total_price = order[i].count * order[i].price
433
-             total_price += order[i].count * order[i].price
427
+             if(this.org_id == 9919 || this.org_id == 9671){
428
+               order[i].total_price = order[i].count * order[i].last_price
429
+               total_price += order[i].count * order[i].last_price
430
+             }else{
431
+                order[i].total_price = order[i].count * order[i].price
432
+                total_price += order[i].count * order[i].price
433
+             }
434
+            
434 435
           }
436
+          console.log("total_price23322332232332323232",order)
435 437
            order.push({
436 438
             warehouse_out_order_number: "合计",
437 439
             is_total: 1,
@@ -443,29 +445,50 @@ export default {
443 445
           for(let i=0;i<order.length;i++){
444 446
             order[i].total_price = order[i].total_price.toFixed(2)
445 447
           }
446
-        //  this.drugTypeList = response.data.data.drugTypeList
447
-          
448
+       
449
+          console.log("order232233232232323232332",order)
448 450
           this.tableData = order
449 451
            let objInfo = {}
450 452
           order.forEach((item,index)=>{
451 453
              let { drug_id } = item
452
-             if(!objInfo[drug_id]){
453
-               objInfo[drug_id] = {
454
-                 drug_id,
455
-                 child:[],
456
-                 drug_name:item.drug_name,
457
-                 drug_spec:item.drug_spec,
458
-                 min_unit:item.min_unit,
459
-                 count:0,
460
-                 price:item.price,
461
-                 remark:item.remark,
462
-                 total_price:0.0,
463
-                 dose:item.dose,
464
-                 dose_unit:item.dose_unit,
465
-                 min_number:item.min_number,
466
-                 max_unit:item.max_unit
467
-               }
454
+             if(this.org_id == 9671 || this.org_id == 9919){
455
+              if(!objInfo[drug_id]){
456
+                objInfo[drug_id] = {
457
+                  drug_id,
458
+                  child:[],
459
+                  drug_name:item.drug_name,
460
+                  drug_spec:item.drug_spec,
461
+                  min_unit:item.min_unit,
462
+                  count:0,
463
+                  price:item.last_price,
464
+                  remark:item.remark,
465
+                  total_price:0.0,
466
+                  dose:item.dose,
467
+                  dose_unit:item.dose_unit,
468
+                  min_number:item.min_number,
469
+                  max_unit:item.max_unit
470
+                }
471
+              }
472
+             }else{
473
+               if(!objInfo[drug_id]){
474
+                objInfo[drug_id] = {
475
+                  drug_id,
476
+                  child:[],
477
+                  drug_name:item.drug_name,
478
+                  drug_spec:item.drug_spec,
479
+                  min_unit:item.min_unit,
480
+                  count:0,
481
+                  price:item.price,
482
+                  remark:item.remark,
483
+                  total_price:0.0,
484
+                  dose:item.dose,
485
+                  dose_unit:item.dose_unit,
486
+                  min_number:item.min_number,
487
+                  max_unit:item.max_unit
488
+                }
489
+              }
468 490
              }
491
+            
469 492
           })
470 493
           let list = Object.values(objInfo);
471 494
           
@@ -485,10 +508,11 @@ export default {
485 508
               }
486 509
             }
487 510
           }
488
-          for(let i=0;i<list.length;i++){
489
-             list[i].total_price = list[i].count * list[i].price
490
-          }
491
-       
511
+
512
+           for(let i=0;i<list.length;i++){
513
+              list[i].total_price = list[i].count * list[i].price
514
+            }
515
+        
492 516
           this.tableList = list 
493 517
           var total = response.data.data.total
494 518
           this.total = total
@@ -517,10 +541,11 @@ export default {
517 541
         }
518 542
         for(let i=0;i<this.tablePrint.length;i++){
519 543
            if(this.org_id == 9671 || this.org_id == 9919 ){
544
+             this.tablePrint[i].price = this.tablePrint[i].last_price
520 545
              this.tablePrint[i].count = this.getCountSix(this.tablePrint[i].drug_id,this.tablePrint[i].child)
521
-             this.tablePrint[i].total_price = this.getCountSenven(this.tablePrint.drug_id,this.tablePrint[i].child,this.tablePrint[i].price)
546
+             this.tablePrint[i].total_price = this.getCountSenven(this.tablePrint.drug_id,this.tablePrint[i].child,this.tablePrint[i].last_price)
522 547
              this.tablePrint[i].unit = this.tablePrint[i].dose + this.tablePrint[i].dose_unit + "*" + this.tablePrint[i].min_number +this.tablePrint[i].min_unit +"/"+this.tablePrint[i].max_unit
523
-             this.tablePrint[i].total = this.getCountSenvenOne(this.tablePrint.drug_id,this.tablePrint[i].child,this.tablePrint[i].price)
548
+             this.tablePrint[i].total = this.getCountSenvenOne(this.tablePrint.drug_id,this.tablePrint[i].child,this.tablePrint[i].last_price)
524 549
            }else{
525 550
               this.tablePrint[i].count = this.getCount(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_unit,this.tablePrint[i].min_number)
526 551
               this.tablePrint[i].total_price = this.getTotalPrice(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_number,this.tablePrint[i].price)
@@ -567,8 +592,15 @@ export default {
567 592
         this.tableData[i].specification_name = this.tableData[i].dose + this.tableData[i].dose_unit +"*" + this.tableData[i].min_number + this.tableData[i].min_unit +  "/" + this.tableData[i].max_unit
568 593
         this.tableData[i].time = this.getTime(this.tableData[i].ctime)
569 594
         this.tableData[i].user_name = this.getAdminUser(this.tableData[i].creater)
570
-        this.tableData[i].total = (this.tableData[i].count * this.tableData[i].price)
571
-        this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)
595
+        if(this.org_id == 9671 || this.org_id == 9919){
596
+          this.tableData[i].total = (this.tableData[i].count * this.tableData[i].last_price)
597
+          this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].last_price)
598
+        }else{
599
+          this.tableData[i].total = (this.tableData[i].count * this.tableData[i].price)
600
+          this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)
601
+        }
602
+      
603
+       
572 604
        }
573 605
        let obj = {'index':'合计','total_price':0.00}
574 606
        for(let i=0;i<this.tableData.length;i++){

+ 2 - 2
src/xt_pages/stock/drugs/drugOutOrderPrint.vue View File

@@ -279,7 +279,7 @@
279 279
         return str + min_str
280 280
       },
281 281
       getCountOne(arr,max_unit,min_unit,min_number){
282
-        console.log("arr2332332233232",arr)
282
+       
283 283
         var total = 0
284 284
         var str = ""
285 285
         var min_str = ""
@@ -295,7 +295,7 @@
295 295
         for(let i=0;i<arr.length;i++){
296 296
           total+= parseInt(arr[i].total_count)
297 297
         }
298
-       console.log("total233223232323",total,min_number)
298
+     
299 299
         return total
300 300
       },
301 301
       getTotalPrice(arr,max_unit,min_number,min_price){

+ 2 - 2
src/xt_pages/stock/stockQuery.vue View File

@@ -108,7 +108,7 @@
108 108
        </el-table-column>
109 109
        <el-table-column label="出库数量" align="center" v-if="showOne">
110 110
          <template slot-scope="scope">
111
-          <span v-if="org_id == 9671 || org_id == 10138 || org_id == 10028 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10243 || org_id == 10088 || org_id== 10245 || org_id == 9779 || org_id == 10106 || org_id == 9504 || org_id ==  10215 || org_id ==  10088 || org_id == 10191">
111
+          <span v-if="org_id == 9671 || org_id == 10138 || org_id == 10028 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10243 || org_id == 10088 || org_id== 10245 || org_id == 9779 || org_id == 10106 || org_id == 9504 || org_id ==  10215 || org_id ==  10088 || org_id == 10191 || org_id == 9919">
112 112
             <span>
113 113
               {{getWareInfo(scope.row.xt_warehouse_info) - getOverFlushInfo(scope.row.xt_warehouse_info) + getCancelSotckInfo(scope.row.cancel_stock_info) }}
114 114
             </span>
@@ -125,7 +125,7 @@
125 125
 
126 126
        <el-table-column label="剩余库存量" align="center" v-if="showThree">
127 127
          <template slot-scope="scope">
128
-          <span v-if="org_id == 9671 || org_id == 10138 || org_id == 10028 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9779 || org_id == 10106 || org_id == 9504 || org_id ==  10215 || org_id == 10088 || org_id == 10191">
128
+          <span v-if="org_id == 9671 || org_id == 10138 || org_id == 10028 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9779 || org_id == 10106 || org_id == 9504 || org_id ==  10215 || org_id == 10088 || org_id == 10191 || org_id == 9919">
129 129
             {{getOverFlushInfo(scope.row.xt_warehouse_info)}}
130 130
           </span>
131 131
           <span v-else>{{getWareInfo(scope.row.xt_warehouse_info) - getAutoCount(scope.row.id) - getOutCount(scope.row.id) + getCancelCount(scope.row.id) }}</span>

+ 22 - 5
src/xt_pages/workforce/template.vue View File

@@ -117,13 +117,19 @@
117 117
                           :patients="patients"></template-table>
118 118
         </el-tab-pane>
119 119
         <el-tab-pane name="first" :disabled="template_mode.mode == 0">
120
-          <span slot="label"> 第一周 </span>
120
+          <span slot="label"> 第一周
121
+             <span v-if="schedule.execute_times%2==0">(本周)</span>
122
+             <span v-if="schedule.execute_times%2!=0">(下一周)</span>
123
+          </span>
121 124
           <template-table :editable="true" :device_numbers="device_numbers" :template="first_template"
122 125
                           :patients="patients" @cancel_sch="refresh"></template-table>
123 126
         </el-tab-pane>
124 127
 
125 128
         <el-tab-pane name="second" :disabled="template_mode.mode != 2">
126
-          <span slot="label"> 第二周 </span>
129
+          <span slot="label"> 第二周
130
+             <span v-if="schedule.execute_times%2==0">(下一周)</span>
131
+             <span v-if="schedule.execute_times%2!=0">(本周)</span>
132
+           </span>
127 133
           <template-table :editable="true" :device_numbers="device_numbers" :template="second_template"
128 134
                           :patients="patients" @cancel_sch="refresh"></template-table>
129 135
         </el-tab-pane>
@@ -164,7 +170,7 @@
164 170
   import TemplateTable from './components/template_table'
165 171
   import { getTemplateInitData } from '@/api/schedule_template/patient'
166 172
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
167
-  import { exportScheduleTemplate, getWeekPanels,initDate,synchroSchedule } from '@/api/schedule'
173
+  import { exportScheduleTemplate, getWeekPanels,initDate,synchroSchedule,getPatientScheduleTemplate } from '@/api/schedule'
168 174
   import ScheduleTemplateUploadExcel from './components/scheduleTemplateUploadExcel/index'
169 175
   import { generateLog } from '@/api/config'
170 176
 
@@ -241,16 +247,18 @@
241 247
         },
242 248
         rules: {
243 249
           copyWeek: [{ required: true, message: "请选择同步时间段", trigger: "blur" }],
244
-        }
250
+        },
251
+        schedule:{},
245 252
       }
246 253
     },
247 254
     created() {
255
+      this.getPatientScheduleTemplate()
248 256
       let year = new Date().getFullYear()
249 257
      let month = new Date().getMonth() + 1
250 258
      let date = new Date().getDate()
251 259
      this.weekNum = this.getYearWeek(year,month,date)
252 260
      this.todayDate=this.formatDate(new Date())
253
-     this.setDate(new Date())
261
+     this.setDate(new Date(new Date().setDate((new Date().getDate()-7))))
254 262
 
255 263
      for (var i = 0; i <= 9; i++) {
256 264
        this.setDate1(this.addDate(this.currentDate, 7))
@@ -2768,6 +2776,15 @@
2768 2776
           }
2769 2777
         })
2770 2778
  
2779
+      },
2780
+      getPatientScheduleTemplate(){
2781
+        getPatientScheduleTemplate().then(response=>{
2782
+           if(response.data.state == 1){
2783
+             var schedule = response.data.data.schedule 
2784
+             console.log("schedule",schedule)
2785
+             this.schedule = schedule
2786
+           }
2787
+        })
2771 2788
       }
2772 2789
     }
2773 2790
   }