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