瀏覽代碼

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

see999 4 年之前
父節點
當前提交
b9aa71847b
共有 2 個文件被更改,包括 169 次插入27 次删除
  1. 148 5
      src/xt_pages/outpatientCharges/outpatientChargesManagement.vue
  2. 21 22
      src/xt_pages/workforce/appointment.vue

+ 148 - 5
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue 查看文件

@@ -71,15 +71,20 @@
71 71
 
72 72
           <el-button v-loading="loadingtwo" v-if="this.hisPatientInfo.id > 0 && this.order.id == 0" size="small"
73 73
                      @click="open(20)"
74
-                     type="primary">收费
74
+                     type="primary">预结算!
75 75
           </el-button>
76 76
 
77
-
78 77
           <el-button v-loading="loadingtwo" v-if="this.hisPatientInfo.id > 0 && this.order.id == 0" size="small"
79
-                     @click="open(4)"
80
-                     type="primary">预结算
78
+                     @click="open(21)"
79
+                     type="primary">收费!
81 80
           </el-button>
82 81
 
82
+
83
+          <!--<el-button v-loading="loadingtwo" v-if="this.hisPatientInfo.id > 0 && this.order.id == 0" size="small"-->
84
+                     <!--@click="open(4)"-->
85
+                     <!--type="primary">收费-->
86
+          <!--</el-button>-->
87
+
83 88
           <el-button size="small" @click="open(5)" type="primary"
84 89
                      v-if="this.hisPatientInfo.id > 0 && this.order.id > 0 &&  this.order.order_status == 2">退费
85 90
           </el-button>
@@ -562,7 +567,7 @@
562 567
         this.loadingtwo = true
563 568
         if (this.$store.getters.xt_user.org_id == 9919) {
564 569
           var that = this
565
-          axios.get('http://127.0.0.1:9532/api/upload/get', {
570
+          axios.get('http://127.0.0.1:9532/api/settle/get', {
566 571
             params: form
567 572
           })
568 573
             .then(function(response) {
@@ -1511,10 +1516,148 @@
1511 1516
           }
1512 1517
 
1513 1518
         }else if(index == 20){
1519
+          if (this.patientInfo.id == 0) {
1520
+            this.$message({ message: '该选择要收费的患者', type: 'error' })
1521
+            return
1522
+          }
1523
+
1524
+          if (this.hisPatientInfo.id == 0) {
1525
+            this.$message({ message: '该患者尚未挂号,请先挂号', type: 'error' })
1526
+            return
1527
+          }
1528
+
1529
+          let ids = []
1530
+          if (this.activeName == 'first') {
1531
+            for (let i = 0; i < this.prescriptions.length; i++) {
1532
+              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
1533
+                ids.push(this.prescriptions[i].advices[a].id)
1534
+              }
1535
+              for (let a = 0; a < this.prescriptions[i].addition.length; a++) {
1536
+                ids.push(this.prescriptions[i].addition[a].id)
1537
+              }
1538
+
1539
+              for (let a = 0; a < this.prescriptions[i].project.length; a++) {
1540
+                ids.push(this.prescriptions[i].project[a].id)
1541
+              }
1542
+            }
1543
+            if (ids.length == 0) {
1544
+              this.$message.error('请先到医生工作站开处方再来结算')
1545
+              return
1546
+            }
1547
+          } else {
1548
+            for (let i = 0; i < this.month_prescriptions.length; i++) {
1549
+              for (let a = 0; a < this.month_prescriptions[i].advices.length; a++) {
1550
+                ids.push(this.month_prescriptions[i].advices[a].id)
1551
+              }
1552
+
1553
+              for (let a = 0; a < this.month_prescriptions[i].addition.length; a++) {
1554
+                ids.push(this.month_prescriptions[i].addition[a].id)
1555
+              }
1556
+
1557
+              for (let a = 0; a < this.month_prescriptions[i].project.length; a++) {
1558
+                ids.push(this.month_prescriptions[i].project[a].id)
1559
+              }
1560
+            }
1561
+            if (ids.length == 0) {
1562
+              this.$message.error('请先到医生工作站开处方再来结算')
1563
+              return
1564
+            }
1565
+          }
1566
+
1514 1567
 
1568
+          var form = {}
1569
+          form['id'] = this.patientInfo.id
1570
+          form['record_time'] = this.record_date
1571
+          form['admin_user_id'] = this.$store.getters.xt_user.user.id
1515 1572
 
1573
+          if (this.activeName == 'first') {
1574
+            form['settle_accounts_type'] = 1
1516 1575
 
1576
+          } else {
1577
+            form['start_time'] = this.other_start_time
1578
+            form['end_time'] = this.other_end_time
1579
+            form['settle_accounts_type'] = 2
1517 1580
 
1581
+          }
1582
+          this.loadingtwo = true
1583
+          if (this.$store.getters.xt_user.org_id == 9919) {
1584
+            var that = this
1585
+            axios.get('http://127.0.0.1:9532/api/upload/get', {
1586
+              params: form
1587
+            })
1588
+              .then(function(response) {
1589
+                if (response.data.state == 0) {
1590
+                  that.$message.error(response.data.msg)
1591
+                  that.loadingtwo = false
1592
+                  that.$refs.charge.hide()
1593
+                  return false
1594
+                } else {
1595
+                  that.loadingtwo = false
1596
+                  that.state = '预结算'
1597
+                  that.$message({ message: '预结算成功', type: 'success' })
1598
+                }
1599
+              })
1600
+              .catch(function(error) {
1601
+
1602
+              })
1603
+          } else {
1604
+
1605
+          }
1606
+        }else if(index == 21){
1607
+
1608
+          if (this.patientInfo.id == 0) {
1609
+            this.$message({ message: '该选择要收费的患者', type: 'error' })
1610
+            return
1611
+          }
1612
+
1613
+          if (this.hisPatientInfo.id == 0) {
1614
+            this.$message({ message: '该患者尚未挂号,请先挂号', type: 'error' })
1615
+            return
1616
+          }
1617
+
1618
+          let ids = []
1619
+          if (this.activeName == 'first') {
1620
+            for (let i = 0; i < this.prescriptions.length; i++) {
1621
+              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
1622
+                ids.push(this.prescriptions[i].advices[a].id)
1623
+              }
1624
+              for (let a = 0; a < this.prescriptions[i].addition.length; a++) {
1625
+                ids.push(this.prescriptions[i].addition[a].id)
1626
+              }
1627
+
1628
+              for (let a = 0; a < this.prescriptions[i].project.length; a++) {
1629
+                ids.push(this.prescriptions[i].project[a].id)
1630
+              }
1631
+            }
1632
+            if (ids.length == 0) {
1633
+              this.$message.error('请先到医生工作站开处方再来结算')
1634
+              return
1635
+            }
1636
+
1637
+          } else {
1638
+            for (let i = 0; i < this.month_prescriptions.length; i++) {
1639
+              for (let a = 0; a < this.month_prescriptions[i].advices.length; a++) {
1640
+                ids.push(this.month_prescriptions[i].advices[a].id)
1641
+              }
1642
+
1643
+              for (let a = 0; a < this.month_prescriptions[i].addition.length; a++) {
1644
+                ids.push(this.month_prescriptions[i].addition[a].id)
1645
+              }
1646
+
1647
+              for (let a = 0; a < this.month_prescriptions[i].project.length; a++) {
1648
+                ids.push(this.month_prescriptions[i].project[a].id)
1649
+              }
1650
+            }
1651
+            if (ids.length == 0) {
1652
+              this.$message.error('请先到医生工作站开处方再来结算')
1653
+              return
1654
+            }
1655
+          }
1656
+          if (this.activeName == 'first') {
1657
+            this.$refs.charge.show(this.getTotal())
1658
+          } else {
1659
+            this.$refs.charge.show(this.getTotalTwo())
1660
+          }
1518 1661
         }
1519 1662
       },
1520 1663
 

+ 21 - 22
src/xt_pages/workforce/appointment.vue 查看文件

@@ -142,7 +142,7 @@
142 142
                 <el-button @click="newVisible=false">取 消</el-button>
143 143
                 <el-button type="primary" @click="submitAction('form')">保 存</el-button>
144 144
             </div>
145
-      </el-dialog>            
145
+      </el-dialog>
146 146
     </div>
147 147
   </div>
148 148
 </template>
@@ -209,7 +209,7 @@
209 209
         clen:7,
210 210
         nowYear: new Date().getFullYear(),
211 211
         schedule_week:0,
212
-       
212
+
213 213
       }
214 214
     },
215 215
     components: {
@@ -219,7 +219,7 @@
219 219
       UploadExcel
220 220
     },
221 221
     methods: {
222
-    
222
+
223 223
       generateTxt: function(log) {
224 224
         var content = ''
225 225
         var errlog = log.err_logs
@@ -280,9 +280,9 @@
280 280
             return false
281 281
           }
282 282
           var partitions = response.data.data.partitions
283
-          // console.log("分区",partitions)
284
-          this.theWeek.lastWeek = this.theWeek.thisWeek - 1
283
+          console.log("分区",partitions)
285 284
           this.theWeek.thisWeek = response.data.data.theWeek
285
+          this.theWeek.lastWeek = this.theWeek.thisWeek - 1
286 286
           this.theWeek.nextWeek = this.theWeek.thisWeek + 1
287 287
           this.theWeek.nextTwoWeek = this.theWeek.thisWeek + 2
288 288
           // 在控制变量改变的时候进行 强制渲染更新
@@ -527,7 +527,7 @@
527 527
 
528 528
           var data = []
529 529
           console.log("33333",this.tableList)
530
-        
530
+
531 531
          this.tableList.map(item=>{
532 532
            data.push(Object.values(item))
533 533
 
@@ -548,7 +548,7 @@
548 548
        return jsonData.map(v => filterVal.map(j => v[j]))
549 549
       },
550 550
 
551
-     
551
+
552 552
       printScheduleAction: function() {
553 553
         var date = new Date().getTime()
554 554
         if (this.activeName == 'lastWeek') {
@@ -806,14 +806,14 @@
806 806
             isHas_56 && isHas_57 && isHas_58 && isHas_59 && isHas_60 &&
807 807
             isHas_61 && isHas_62 && isHas_63 && isHas_64 && isHas_65)) {
808 808
 
809
-         
809
+
810 810
 
811 811
             this.dialogVisible = true
812 812
             return
813 813
           }
814 814
         } else {
815 815
 
816
-        
816
+
817 817
 
818 818
           this.dialogVisible = true
819 819
           return
@@ -859,21 +859,21 @@
859 859
           }
860 860
         }
861 861
 
862
-      
862
+
863 863
         for (let i = 0; i < zones.length; i++) {
864
-         
864
+
865 865
 
866 866
           if (!total_zones.includes(zones[i])) {
867 867
             is_system_zone = false
868 868
           }
869 869
         }
870 870
 
871
-     
871
+
872 872
 
873 873
 
874 874
         for (let i = 0; i < deviceNumber.length; i++) {
875 875
           if (!total_device_number.includes(deviceNumber[i])) {
876
-           
876
+
877 877
             is_device_number = false
878 878
           }
879 879
         }
@@ -903,7 +903,7 @@
903 903
               let obj = {}
904 904
 
905 905
               obj['name'] = results[i + 1][key].replace(/\s/g, '')
906
-             
906
+
907 907
               if (tempObj[key] == '上午') {
908 908
                 obj['schedule_type'] = 1
909 909
               } else if (tempObj[key] == '下午') {
@@ -1022,7 +1022,7 @@
1022 1022
               return cur
1023 1023
             }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1024 1024
 
1025
-           
1025
+
1026 1026
             if (tempObjArr[i][key].length > arr.length) {    //比对原数组和去重后的原数组总数,不同的话则存在重复元素
1027 1027
               is_exist_repeat = true
1028 1028
             }
@@ -1035,7 +1035,7 @@
1035 1035
 
1036 1036
 
1037 1037
         if (headers.length > 65 || !is_system_zone || !is_device_number) {
1038
-         
1038
+
1039 1039
 
1040 1040
           this.dialogVisible = true
1041 1041
           return
@@ -2096,7 +2096,7 @@
2096 2096
                var end = this.getTimestamp(end_time) - 28800
2097 2097
               console.log("end",end)
2098 2098
               var scheduleList = response.data.data.list
2099
-             
2099
+
2100 2100
               var week= []
2101 2101
               var nextWeek = []
2102 2102
               var lastWeek = []
@@ -2433,7 +2433,6 @@
2433 2433
                   }
2434 2434
                 }
2435 2435
              }
2436
-             console.log("list22222222222",list)
2437 2436
              this.tableList = list
2438 2437
            }
2439 2438
          })
@@ -2469,7 +2468,7 @@
2469 2468
       getTime(val) {
2470 2469
         return uParseTime(val, '{y}-{m}-{d}')
2471 2470
       },
2472
-      
2471
+
2473 2472
       copySchedule(){
2474 2473
         this.newVisible = true
2475 2474
       },
@@ -2549,7 +2548,7 @@
2549 2548
               copy_endtime:copy_endtime,
2550 2549
             }
2551 2550
            console.log("parasm",params)
2552
-        
2551
+
2553 2552
            this.$refs[formName].validate(valid=>{
2554 2553
               if(valid){
2555 2554
                 copyPatientSchedule(params).then(response=>{
@@ -2569,7 +2568,7 @@
2569 2568
      var start_time = moment().weekday(1).format('YYYY-MM-DD');
2570 2569
      console.log("开始时间",start_time)
2571 2570
      this.start_time = start_time
2572
-    
2571
+
2573 2572
      var end_time = this.getNextWeek(2)
2574 2573
      console.log("结束时间222222",end_time)
2575 2574
      this.end_time = end_time
@@ -2608,7 +2607,7 @@
2608 2607
           }
2609 2608
 
2610 2609
         }
2611
-       
2610
+
2612 2611
     }
2613 2612
   }
2614 2613
 </script>