XMLWAN 2 年之前
父節點
當前提交
03319138d3

+ 22 - 22
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue 查看文件

@@ -220,7 +220,7 @@
220 220
                                           v-model="dialysisPrescription.no_anticoagulant_shouji"></el-input>
221 221
                             </el-form-item>
222 222
 
223
-                           
223
+
224 224
 
225 225
                           </div>
226 226
 
@@ -246,14 +246,14 @@
246 246
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
247 247
                                           v-model="dialysisPrescription.no_anticoagulant_shouji"></el-input>
248 248
                             </el-form-item>
249
-                          
249
+
250 250
                             <el-form-item v-else :label="'首剂(' + anticoagulant.shouji_unit + ') : '">
251 251
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
252 252
                                           v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
253 253
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
254 254
                                           v-model="dialysisPrescription.no_anticoagulant_shouji"></el-input>
255 255
                             </el-form-item>
256
-                            
256
+
257 257
                         </div>
258 258
 
259 259
                     </el-col>
@@ -412,7 +412,7 @@
412 412
                     </el-col>
413 413
                     <el-col
414 414
                             :span="8"
415
-                            v-if="anticoagulant.gaijiliang != -1 && isShows('钙剂量')"
415
+                            v-if="isShows('钙剂量')"
416 416
                     >
417 417
                         <el-form-item label="钙剂量(ml) : ">
418 418
                             <el-input
@@ -1662,7 +1662,7 @@
1662 1662
         this.isVisibility = true
1663 1663
       },
1664 1664
       handleAdviceCommit() {
1665
-       
1665
+
1666 1666
           let results = []
1667 1667
           for (let i = 0; i < this.targetAdvices.length; i++) {
1668 1668
             for (let a = 0; a < this.checkedCities.length; a++) {
@@ -1680,7 +1680,7 @@
1680 1680
           var date = new Date()
1681 1681
           var hour = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
1682 1682
           var minute = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
1683
-         
1683
+
1684 1684
           if (results.length > 0) {
1685 1685
             if(!this.isLoading){
1686 1686
               if (this.is_pre == 1) {
@@ -1691,10 +1691,10 @@
1691 1691
                 }
1692 1692
 
1693 1693
                 var arr = this.dialysisPrescription
1694
-               
1694
+
1695 1695
 
1696 1696
                 const ParamsQuery = arr
1697
-                
1697
+
1698 1698
 
1699 1699
                 ParamsQuery['patient'] = this.patient.id
1700 1700
                 ParamsQuery['record_date'] = this.record_date
@@ -1729,7 +1729,7 @@
1729 1729
                       duration: 2000
1730 1730
                     })
1731 1731
                     var date = new Date()
1732
-                    
1732
+
1733 1733
                     const params = {
1734 1734
                       advices: results,
1735 1735
                       advice_date: this.start_time.split(' ')[0],
@@ -1745,7 +1745,7 @@
1745 1745
                     }else{
1746 1746
                       patient_id = this.$route.query.patient_id
1747 1747
                     }
1748
-                  
1748
+
1749 1749
                     CreateGroupAdvice(patient_id, 0, params).then(
1750 1750
                       rs => {
1751 1751
                         var resp = rs.data
@@ -1775,9 +1775,9 @@
1775 1775
                   return
1776 1776
                 }
1777 1777
                 var arr = this.dialysisPrescription
1778
-                
1778
+
1779 1779
                 const ParamsQuery = arr
1780
-              
1780
+
1781 1781
                 ParamsQuery['patient'] = this.patient.id
1782 1782
                 ParamsQuery['record_date'] = this.record_date
1783 1783
                 ParamsQuery['mode'] = 1
@@ -1940,7 +1940,7 @@
1940 1940
 
1941 1941
           this.isShowRemindAdvice = false
1942 1942
           this.isVisibility = true
1943
-        
1943
+
1944 1944
       },
1945 1945
       handleAdviceCancle() {
1946 1946
         this.isShowRemindAdvice = false
@@ -1950,7 +1950,7 @@
1950 1950
         return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
1951 1951
       },
1952 1952
       show(pre, schedual, last, his_is_open,is_advice_open) {
1953
-        
1953
+
1954 1954
         if (pre != undefined) {
1955 1955
           if (pre.oxygen_uptake == 1) {
1956 1956
             this.oxygenShow = true
@@ -2106,7 +2106,7 @@
2106 2106
         console.log("last2323232323232332",last)
2107 2107
         if (this.predialysis == null || this.predialysis.id == 0) {
2108 2108
           if (last != null) {
2109
-            
2109
+
2110 2110
             this.dialysisPrescription.niprocart = last.niprocart
2111 2111
             this.dialysisPrescription.jms = last.jms
2112 2112
             this.dialysisPrescription.fistula_needle_set = last.fistula_needle_set
@@ -2181,7 +2181,7 @@
2181 2181
           this.dialysisPrescription.anticoagulant_zongliang = ""
2182 2182
           this.dialysisPrescription.anticoagulant_zongliang = parseInt(this.dialysisPrescription.anticoagulant_shouji) +  parseInt(this.dialysisPrescription.anticoagulant_weichi)
2183 2183
         }
2184
-     
2184
+
2185 2185
 
2186 2186
       },
2187 2187
 
@@ -2224,7 +2224,7 @@
2224 2224
               const ParamsQuery = arr
2225 2225
               // console.log('night', ParamsQuery)
2226 2226
               ParamsQuery['patient'] = this.patient.id
2227
-             
2227
+
2228 2228
               ParamsQuery['record_date'] = this.record_date
2229 2229
               ParamsQuery['mode'] = '1'
2230 2230
               ParamsQuery['patient_id'] = this.patient.id
@@ -2320,7 +2320,7 @@
2320 2320
                 ParamsQuery['mode'] = '1'
2321 2321
                 ParamsQuery['patient_id'] = this.patient.id
2322 2322
                 console.log('第三')
2323
-              
2323
+
2324 2324
                 postPrescription(ParamsQuery).then(response => {
2325 2325
                   if (response.data.state == 0) {
2326 2326
                     this.$message.error(response.data.msg)
@@ -2599,7 +2599,7 @@
2599 2599
                   ParamsQuery['mode'] = '1'
2600 2600
                   ParamsQuery['patient_id'] = this.patient.id
2601 2601
                   console.log('第八')
2602
-                  
2602
+
2603 2603
                   postPrescription(ParamsQuery).then(response => {
2604 2604
                     if (response.data.state == 0) {
2605 2605
                       this.$message.error(response.data.msg)
@@ -2639,7 +2639,7 @@
2639 2639
               ParamsQuery['record_date'] = this.record_date
2640 2640
               ParamsQuery['mode'] = '2'
2641 2641
               ParamsQuery['patient_id'] = this.patient.id
2642
-            
2642
+
2643 2643
               if (
2644 2644
                 this.$store.getters.xt_user.user.id !=
2645 2645
                 this.dialysisPrescription.creater
@@ -3192,7 +3192,7 @@
3192 3192
       isShows(name) {
3193 3193
         var filedList = store.getters.xt_user.fileds
3194 3194
         for (let i = 0; i < filedList.length; i++) {
3195
-         
3195
+
3196 3196
           if (filedList[i].module == 1 && filedList[i].filed_name_cn == name && filedList[i].is_show == 1) {
3197 3197
 
3198 3198
             return true
@@ -3572,7 +3572,7 @@
3572 3572
         if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
3573 3573
           this.dialysisPrescription.anticoagulant_zongliang = ''
3574 3574
         }
3575
-       
3575
+
3576 3576
         if(this.$store.getters.xt_user.template_info.template_id == 41 && this.dialysisPrescription.anticoagulant == 2){
3577 3577
          this.dialysisPrescription.anticoagulant_zongliang = ""
3578 3578
          this.dialysisPrescription.anticoagulant_zongliang = parseInt(this.dialysisPrescription.anticoagulant_shouji) +  parseInt(this.dialysisPrescription.anticoagulant_weichi)

+ 66 - 63
src/xt_pages/stock/drugs/components/drugOutDetail.vue 查看文件

@@ -22,7 +22,7 @@
22 22
       type="primary"
23 23
       >汇总导出
24 24
     </el-button>
25
-   
25
+
26 26
     <div class="cell clearfix">
27 27
        <label class="title"><span class="name">仓库</span> :</label>
28 28
       <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changeHouseList">
@@ -32,7 +32,7 @@
32 32
             :label="option.storehouse_name"
33 33
             :value="option.id">
34 34
           </el-option>
35
-      </el-select>  
35
+      </el-select>
36 36
       <el-input
37 37
         size="small"
38 38
         style="width: 200px;"
@@ -76,10 +76,10 @@
76 76
           value-format="yyyy-MM-dd"
77 77
           @change="endTimeChange"
78 78
         ></el-date-picker>
79
-     
79
+
80 80
     </div>
81 81
 
82
-  
82
+
83 83
     <el-row :gutter="12" style="margin-top: 10px">
84 84
       <el-table
85 85
         :data="tableData"
@@ -122,7 +122,7 @@
122 122
           </template>
123 123
         </el-table-column>
124 124
 
125
-       
125
+
126 126
         <el-table-column label="操作时间" align="center">
127 127
           <template slot-scope="scope">
128 128
            <span>{{getTime(scope.row.ctime)}}</span>
@@ -140,7 +140,7 @@
140 140
         </el-table-column>
141 141
         <el-table-column label="出货价" align="center">
142 142
           <template slot-scope="scope">
143
-           <span v-if="org_id == 9919">{{scope.row.last_price}} </span> 
143
+           <span v-if="org_id == 9919">{{scope.row.last_price}} </span>
144 144
            <span v-else>
145 145
              <span v-if="scope.row.price >0"> {{scope.row.price}}</span>
146 146
             <span v-if="scope.row.price  == 0"> {{getPrice(scope.row.drug_id)}}</span>
@@ -149,20 +149,20 @@
149 149
         </el-table-column>
150 150
         <el-table-column label="数量" align="center">
151 151
           <template slot-scope="scope">
152
-            {{scope.row.count}} 
152
+            {{scope.row.count}}
153 153
           </template>
154 154
         </el-table-column>
155 155
          <el-table-column label="单位" align="center">
156 156
           <template slot-scope="scope">
157
-            {{scope.row.count_unit}} 
157
+            {{scope.row.count_unit}}
158 158
           </template>
159 159
         </el-table-column>
160 160
         <el-table-column label="总价" align="center">
161 161
           <template slot-scope="scope">
162 162
             <span v-if="scope.row.is_total !=1">
163
-              <span v-if="org_id == 9919">{{(scope.row.last_price * scope.row.count).toFixed(2)}} </span> 
164
-              <span v-if="org_id == 10210 ">{{(scope.row.price * scope.row.count).toFixed(2)}} </span> 
165
-              <span v-if="org_id == 9671 ">{{(scope.row.price * scope.row.count).toFixed(2)}} </span> 
163
+              <span v-if="org_id == 9919">{{(scope.row.last_price * scope.row.count).toFixed(2)}} </span>
164
+              <span v-if="org_id == 10210 ">{{(scope.row.price * scope.row.count).toFixed(2)}} </span>
165
+              <span v-if="org_id == 9671 ">{{(scope.row.price * scope.row.count).toFixed(2)}} </span>
166 166
               <span v-if ="org_id!=9919 && org_id!=10210 && org_id!=9671">
167 167
                  {{scope.row.total_price}}
168 168
                </span>
@@ -200,7 +200,7 @@ export default {
200 200
 
201 201
   created() {
202 202
     this.org_id = this.$store.getters.xt_user.org.id
203
-   
203
+
204 204
     var nowDate = new Date();
205 205
     var nowYear = nowDate.getFullYear();
206 206
     var nowMonth = nowDate.getMonth() + 1;
@@ -224,19 +224,19 @@ export default {
224 224
     var start_time = window.sessionStorage.getItem('start_out_time')
225 225
      var end_time =  window.sessionStorage.getItem('end_out_time')
226 226
     if(start_time!=null){
227
-       this.start_time = start_time   
227
+       this.start_time = start_time
228 228
     }
229 229
     if(end_time!=null){
230
-     
230
+
231 231
       this.end_time = end_time
232 232
     }
233
-    
233
+
234 234
     this.getDrugOutOrderPrint()
235 235
     this.GetConfigInfo();
236 236
     this.fetchAllAdminUsers();
237 237
     this.getlist()
238 238
     this.getBaseDrugLibList()
239
- 
239
+
240 240
   },
241 241
   data() {
242 242
     return {
@@ -327,7 +327,7 @@ export default {
327 327
     },
328 328
     fetchAllAdminUsers() {
329 329
       fetchAllAdminUsers().then(response => {
330
-       
330
+
331 331
         if (response.data.state == 1) {
332 332
           this.adminUserOptions = response.data.data.users;
333 333
         }
@@ -384,7 +384,7 @@ export default {
384 384
         }
385 385
       });
386 386
     },
387
-   
387
+
388 388
     getTime: function(val) {
389 389
       if (val == 0) {
390 390
         return "";
@@ -407,7 +407,7 @@ export default {
407 407
          page:this.page,
408 408
          limit:this.limit,
409 409
          storehouse_id:this.storehouse_id,
410
-      }  
410
+      }
411 411
       getDrugOutDetail(params).then(response=>{
412 412
         this.tableData = []
413 413
         this.tableList = []
@@ -443,29 +443,29 @@ export default {
443 443
                  }
444 444
 
445 445
                 total_price += order[i].total_price
446
-                
446
+
447 447
                }
448 448
 
449 449
                if(order[i].price ==0 ){
450 450
                  if(order[i].count_unit == order[i].min_unit && order[i].max_unit!=order[i].min_unit){
451 451
                     order[i].total_price = order[i].count * this.getPrice(order[i].drug_id)
452
-                  
452
+
453 453
                     order[i].price = this.getPrice(order[i].drug_id)
454 454
                  }
455
-                
455
+
456 456
                 if(order[i].count_unit == order[i].max_unit){
457 457
                    if(order[i].is_sys == 0){
458
-                     order[i].total_price += order[i].count * this.getPrice(order[i].drug_id) 
458
+                     order[i].total_price += order[i].count * this.getPrice(order[i].drug_id)
459 459
                    }else{
460 460
                      order[i].total_price += order[i].count * this.getPrice(order[i].drug_id) * order[i].min_number
461 461
                    }
462 462
                    order[i].price = this.getPrice(order[i].drug_id)
463 463
                 }
464 464
                 total_price +=order[i].total_price
465
-               } 
466
-               
465
+               }
466
+
467 467
              }
468
-            
468
+
469 469
           }
470 470
            console.log("toal_p3232332332233232",total_price)
471 471
            order.push({
@@ -475,11 +475,11 @@ export default {
475 475
             ctime:"",
476 476
             total_price:total_price,
477 477
           });
478
-         
478
+
479 479
           for(let i=0;i<order.length;i++){
480 480
             order[i].total_price = order[i].total_price.toFixed(2)
481 481
           }
482
-       
482
+
483 483
           console.log("233223322323322332232323",order)
484 484
           this.tableData = order
485 485
 
@@ -523,10 +523,10 @@ export default {
523 523
                 }
524 524
               }
525 525
              }
526
-            
526
+
527 527
           })
528 528
           let list = Object.values(objInfo);
529
-          
529
+
530 530
           for(let i=0;i<order.length;i++){
531 531
             list.map(item=>{
532 532
               if(order[i].drug_id == item.drug_id){
@@ -534,8 +534,8 @@ export default {
534 534
               }
535 535
             })
536 536
           }
537
-          
538
-         
537
+
538
+
539 539
           for(let i=0;i<list.length;i++){
540 540
             for(let j=0;j<list[i].child.length;j++){
541 541
               if(list[i].child[j].count!=null || list[i].child[j].count != "" || list[i].child[j].count!=0){
@@ -547,16 +547,16 @@ export default {
547 547
            for(let i=0;i<list.length;i++){
548 548
               list[i].total_price = list[i].count * list[i].price
549 549
             }
550
-          
551
-          this.tableList = list 
550
+
551
+          this.tableList = list
552 552
           var total = response.data.data.total
553 553
           this.total = total
554
-        } 
555
-      }) 
554
+        }
555
+      })
556 556
     },
557 557
 
558 558
    select(){
559
-       
559
+
560 560
    },
561 561
 
562 562
     getAdminUser(id){
@@ -570,13 +570,13 @@ export default {
570 570
     },
571 571
 
572 572
      exportList(){
573
-    
573
+
574 574
         for(let i=0;i<this.tablePrint.length;i++){
575 575
           this.tablePrint[i].index = i+1
576 576
         }
577 577
         for(let i=0;i<this.tablePrint.length;i++){
578 578
            if(this.org_id == 9919){
579
-           
579
+
580 580
              this.tablePrint[i].count = this.getCountSix(this.tablePrint[i].drug_id,this.tablePrint[i].child)
581 581
              this.tablePrint[i].total_price = this.getCountSenven(this.tablePrint.drug_id,this.tablePrint[i].child,this.tablePrint[i].price)
582 582
              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
@@ -585,11 +585,11 @@ export default {
585 585
               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)
586 586
               this.tablePrint[i].total_price = this.getTotalPrice(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_number,this.tablePrint[i].min_price)
587 587
               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
588
-              this.tablePrint[i].total = this.getTotalPriceOne(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_number,this.tablePrint[i].min_price) 
588
+              this.tablePrint[i].total = this.getTotalPriceOne(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_number,this.tablePrint[i].min_price)
589 589
            }
590 590
         }
591
-  
592
-       
591
+
592
+
593 593
        import('@/vendor/Export2Excel').then(excel => {
594 594
        const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','备注']
595 595
        const filterVal = ['index','drug_name', 'unit', 'min_unit','count','min_price','total_price','remark']
@@ -600,8 +600,8 @@ export default {
600 600
        obj.total_price = obj.total_price.toFixed(2)
601 601
        this.tablePrint.push(obj)
602 602
        const data = this.formatJson(filterVal, this.tablePrint)
603
-  
604
-       
603
+
604
+
605 605
        excel.export_json_to_excel({
606 606
            header: tHeader,
607 607
            data,
@@ -610,7 +610,7 @@ export default {
610 610
           this.downloadLoading = false
611 611
         })
612 612
        },
613
-      
613
+
614 614
      formatJson(filterVal, jsonData) {
615 615
         return jsonData.map(v => filterVal.map(j => v[j]));
616 616
      },
@@ -641,28 +641,31 @@ export default {
641 641
               }else{
642 642
                 this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].last_price)
643 643
               }
644
-              
644
+
645 645
             }else{
646 646
               this.tableData[i].total = (this.tableData[i].count * this.tableData[i].price)
647 647
               if(this.tableData[i].count_unit == this.tableData[i].min_unit && this.tableData[i].max_unit!=this.tableData[i].min_unit){
648 648
                  this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)
649 649
               }
650
-              if(this.tableData[i].count_unit == this.tableData[i].max_unit){
650
+              if(this.tableData[i].count_unit == this.tableData[i].max_unit && this.tableData[i].max_unit !=this.tableData[i].min_unit){
651
+                this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)*this.tableData[i].min_number
652
+              }
653
+              if(this.tableData[i].count_unit == this.tableData[i].max_unit && this.tableData[i].max_unit ==this.tableData[i].min_unit){
651 654
                 this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)*this.tableData[i].min_number
652 655
               }
653 656
             }
654 657
          }
655 658
        }
656 659
        const data = this.formatJson(filterVal, this.tableData)
657
-  
658
-     
660
+
661
+
659 662
        excel.export_json_to_excel({
660 663
            header: tHeader,
661 664
            data,
662 665
            filename: '药品出库明细'
663 666
          })
664 667
           this.downloadLoading = false
665
-      }) 
668
+      })
666 669
     },
667 670
 
668 671
     getBaseDrugLibList() {
@@ -685,7 +688,7 @@ export default {
685 688
             for (let i = 0; i < response.data.data.list.length; i++) {
686 689
               this.drugList.push(response.data.data.list[i])
687 690
             }
688
- 
691
+
689 692
           }
690 693
         })
691 694
       },
@@ -694,7 +697,7 @@ export default {
694 697
          start_time:this.start_time,
695 698
          end_time:this.end_time,
696 699
          order_type:2,
697
-      }  
700
+      }
698 701
      getDrugOutOrderPrint(params).then(response=>{
699 702
         if(response.data.state == 1){
700 703
             var list = response.data.data.list
@@ -744,7 +747,7 @@ export default {
744 747
               }
745 748
             })
746 749
             }
747
-           
750
+
748 751
             let newArr = Object.values(objInfo);
749 752
             for(let i=0;i<newArr.length;i++){
750 753
               for(let j=0;j<list.length;j++){
@@ -754,7 +757,7 @@ export default {
754 757
               }
755 758
             }
756 759
            this.tablePrint = newArr
757
-          
760
+
758 761
         }
759 762
      })
760 763
     },
@@ -793,11 +796,11 @@ export default {
793 796
           }else{
794 797
             arr[i].count = arr[i].count
795 798
           }
796
-        }  
799
+        }
797 800
         for(let j=0;j<arr.length;j++){
798 801
           total +=arr[j].count
799 802
         }
800
-        
803
+
801 804
         return (total*min_price).toFixed(2)
802 805
       },
803 806
 
@@ -809,30 +812,30 @@ export default {
809 812
           }else{
810 813
             arr[i].count = arr[i].count
811 814
           }
812
-        }  
815
+        }
813 816
         for(let j=0;j<arr.length;j++){
814 817
           total +=arr[j].count
815 818
         }
816
-     
819
+
817 820
         return total*min_price
818 821
       },
819 822
       getCountSix(drug_id,val){
820
-     
821
-        var count = 0 
823
+
824
+        var count = 0
822 825
         for(let i=0;i<val.length;i++){
823 826
           count+= val[i].count
824 827
         }
825 828
         return count
826 829
       },
827 830
       getCountSenven(drug_id,val,price){
828
-        var count = 0 
831
+        var count = 0
829 832
         for(let i=0;i<val.length;i++){
830 833
           count+= val[i].count
831 834
         }
832 835
         return (count*price).toFixed(2)
833 836
       },
834 837
       getCountSenvenOne(drug_id,val,price){
835
-        var count = 0 
838
+        var count = 0
836 839
         for(let i=0;i<val.length;i++){
837 840
           count+= val[i].count
838 841
         }
@@ -872,7 +875,7 @@ export default {
872 875
      changeHouseList(){
873 876
        this.houseList = []
874 877
        this.getlist()
875
-     } 
878
+     }
876 879
   }
877 880
 };
878 881
 </script>