Browse Source

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

csx 4 years ago
parent
commit
6628ff81f5

+ 148 - 5
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue View File

@@ -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
 

+ 10 - 10
src/xt_pages/workforce/appointment.vue View File

@@ -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>
@@ -279,8 +279,8 @@
279 279
           }
280 280
           var partitions = response.data.data.partitions
281 281
           console.log("分区",partitions)
282
-          this.theWeek.lastWeek = this.theWeek.thisWeek - 1
283 282
           this.theWeek.thisWeek = response.data.data.theWeek
283
+          this.theWeek.lastWeek = this.theWeek.thisWeek - 1
284 284
           this.theWeek.nextWeek = this.theWeek.thisWeek + 1
285 285
           this.theWeek.nextTwoWeek = this.theWeek.thisWeek + 2
286 286
           // 在控制变量改变的时候进行 强制渲染更新
@@ -544,7 +544,7 @@
544 544
        return jsonData.map(v => filterVal.map(j => v[j]))
545 545
       },
546 546
 
547
-     
547
+
548 548
       printScheduleAction: function() {
549 549
         var date = new Date().getTime()
550 550
         if (this.activeName == 'lastWeek') {
@@ -1024,7 +1024,7 @@
1024 1024
               return cur
1025 1025
             }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1026 1026
 
1027
-           
1027
+
1028 1028
             if (tempObjArr[i][key].length > arr.length) {    //比对原数组和去重后的原数组总数,不同的话则存在重复元素
1029 1029
               is_exist_repeat = true
1030 1030
             }
@@ -1037,7 +1037,7 @@
1037 1037
 
1038 1038
 
1039 1039
         if (headers.length > 65 || !is_system_zone || !is_device_number) {
1040
-         
1040
+
1041 1041
 
1042 1042
           this.dialogVisible = true
1043 1043
           return
@@ -2098,7 +2098,7 @@
2098 2098
                var end = this.getTimestamp(end_time) - 28800
2099 2099
               console.log("end",end)
2100 2100
               var scheduleList = response.data.data.list
2101
-             
2101
+
2102 2102
               var week= []
2103 2103
               var nextWeek = []
2104 2104
               var lastWeek = []
@@ -2470,7 +2470,7 @@
2470 2470
       getTime(val) {
2471 2471
         return uParseTime(val, '{y}-{m}-{d}')
2472 2472
       },
2473
-      
2473
+
2474 2474
       copySchedule(){
2475 2475
         this.newVisible = true
2476 2476
       },
@@ -2550,7 +2550,7 @@
2550 2550
               copy_endtime:copy_endtime,
2551 2551
             }
2552 2552
            console.log("parasm",params)
2553
-        
2553
+
2554 2554
            this.$refs[formName].validate(valid=>{
2555 2555
               if(valid){
2556 2556
                 copyPatientSchedule(params).then(response=>{
@@ -2570,7 +2570,7 @@
2570 2570
      var start_time = moment().weekday(1).format('YYYY-MM-DD');
2571 2571
      console.log("开始时间",start_time)
2572 2572
      this.start_time = start_time
2573
-    
2573
+
2574 2574
      var end_time = this.getNextWeek(2)
2575 2575
      console.log("结束时间222222",end_time)
2576 2576
      this.end_time = end_time
@@ -2609,7 +2609,7 @@
2609 2609
           }
2610 2610
 
2611 2611
         }
2612
-       
2612
+
2613 2613
     }
2614 2614
   }
2615 2615
 </script>