|
@@ -1474,7 +1474,23 @@
|
1474
|
1474
|
}, changeAllGoodInfoTableDataTwo(row) {
|
1475
|
1475
|
this.teamList = row
|
1476
|
1476
|
},
|
1477
|
|
- selectChange(row) {
|
|
1477
|
+ selectChange(selection, row) {
|
|
1478
|
+ console.log('row',row)
|
|
1479
|
+ if(row.total <= 0){
|
|
1480
|
+ if(row.type == 3){
|
|
1481
|
+ if (selection) {
|
|
1482
|
+ selection.forEach(row => {
|
|
1483
|
+ if(row.total <= 0){
|
|
1484
|
+ this.$refs.tables.toggleRowSelection(row);
|
|
1485
|
+ }
|
|
1486
|
+ });
|
|
1487
|
+ } else {
|
|
1488
|
+ this.$refs.tables.clearSelection();
|
|
1489
|
+ }
|
|
1490
|
+ this.$message.error(row.project_name + '库存不足')
|
|
1491
|
+ return
|
|
1492
|
+ }
|
|
1493
|
+ }
|
1478
|
1494
|
this.teamList = row
|
1479
|
1495
|
}, getPrescriptionTemplateInfo() {
|
1480
|
1496
|
let params = {
|
|
@@ -1640,6 +1656,7 @@
|
1640
|
1656
|
price: good_info[i].retail_price,
|
1641
|
1657
|
medical_code: good_info[i].medical_insurance_number,
|
1642
|
1658
|
unit: this.getGoodUnit(good_info[i].good_unit),
|
|
1659
|
+ total: good_info[i].total,
|
1643
|
1660
|
type: 3
|
1644
|
1661
|
}
|
1645
|
1662
|
this.tabProject.push(obj)
|
|
@@ -1715,6 +1732,7 @@
|
1715
|
1732
|
getPojectListById(params).then(response => {
|
1716
|
1733
|
if (response.data.state == 1) {
|
1717
|
1734
|
this.teamList = []
|
|
1735
|
+ let num = 0
|
1718
|
1736
|
var project = response.data.data.project
|
1719
|
1737
|
for (let i = 0; i < project.length; i++) {
|
1720
|
1738
|
if (project[i].type == 2) {
|
|
@@ -1740,6 +1758,17 @@
|
1740
|
1758
|
|
1741
|
1759
|
this.teamList.push(obj)
|
1742
|
1760
|
} else if (project[i].type == 3) {
|
|
1761
|
+ if(project[i].good_info.total <= 0){
|
|
1762
|
+ num++
|
|
1763
|
+ this.$refs.tabProjectTeam.toggleRowSelection(row);
|
|
1764
|
+ setTimeout(() => {
|
|
1765
|
+ this.$message.error(project[i].good_info.good_name + '库存不足')
|
|
1766
|
+ },100)
|
|
1767
|
+ }
|
|
1768
|
+ if(num > 0){
|
|
1769
|
+ this.$refs.tabProjectTeam.clearSelection();
|
|
1770
|
+ }
|
|
1771
|
+
|
1743
|
1772
|
let obj = {
|
1744
|
1773
|
id: project[i].project_id,
|
1745
|
1774
|
project_name: project[i].good_info.good_name,
|