|
@@ -286,7 +286,7 @@
|
286
|
286
|
</el-table-column>
|
287
|
287
|
<el-table-column label="库存" width="60">
|
288
|
288
|
<template slot-scope="scope">
|
289
|
|
- <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877">
|
|
289
|
+ <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028">
|
290
|
290
|
<span v-if="scope.row.count/scope.row.min_number>0">{{Math.floor(scope.row.count/scope.row.min_number)}}{{scope.row.max_unit}}</span>
|
291
|
291
|
<span v-if="scope.row.count%scope.row.min_number>0"> {{scope.row.count%scope.row.min_number}}{{scope.row.min_unit}}</span>
|
292
|
292
|
</span>
|
|
@@ -383,7 +383,7 @@
|
383
|
383
|
</el-table-column>
|
384
|
384
|
<el-table-column label="库存" width="40">
|
385
|
385
|
<template slot-scope="scope">
|
386
|
|
- <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877">
|
|
386
|
+ <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028">
|
387
|
387
|
{{scope.row.stock_count}}
|
388
|
388
|
</span>
|
389
|
389
|
<span v-else> {{ scope.row.total }}</span>
|
|
@@ -2652,19 +2652,36 @@
|
2652
|
2652
|
selectDrugs(selection, row) {
|
2653
|
2653
|
console.log('selection', selection)
|
2654
|
2654
|
console.log('row', row)
|
2655
|
|
- if (row.total <= 0) {
|
2656
|
|
- if (selection) {
|
2657
|
|
- selection.forEach(row => {
|
2658
|
|
- if (row.total <= 0) {
|
2659
|
|
- this.$refs.multipleTable.toggleRowSelection(row)
|
|
2655
|
+ if(this.org_id == 10138 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 4 || this.org_id == 3877 || this.org_id == 10028 ){
|
|
2656
|
+ if (row.count <= 0) {
|
|
2657
|
+ if (selection) {
|
|
2658
|
+ selection.forEach(row => {
|
|
2659
|
+ if (row.count <= 0) {
|
|
2660
|
+ this.$refs.multipleTable.toggleRowSelection(row)
|
|
2661
|
+ }
|
|
2662
|
+ })
|
|
2663
|
+ } else {
|
|
2664
|
+ this.$refs.multipleTable.clearSelection()
|
2660
|
2665
|
}
|
2661
|
|
- })
|
2662
|
|
- } else {
|
2663
|
|
- this.$refs.multipleTable.clearSelection()
|
2664
|
|
- }
|
2665
|
|
- this.$message.error(row.drug_name + '库存不足')
|
2666
|
|
- return
|
|
2666
|
+ this.$message.error(row.drug_name + '库存不足')
|
|
2667
|
+ return
|
|
2668
|
+ }
|
|
2669
|
+ }else{
|
|
2670
|
+ if (row.total <= 0) {
|
|
2671
|
+ if (selection) {
|
|
2672
|
+ selection.forEach(row => {
|
|
2673
|
+ if (row.total <= 0) {
|
|
2674
|
+ this.$refs.multipleTable.toggleRowSelection(row)
|
|
2675
|
+ }
|
|
2676
|
+ })
|
|
2677
|
+ } else {
|
|
2678
|
+ this.$refs.multipleTable.clearSelection()
|
|
2679
|
+ }
|
|
2680
|
+ this.$message.error(row.drug_name + '库存不足')
|
|
2681
|
+ return
|
|
2682
|
+ }
|
2667
|
2683
|
}
|
|
2684
|
+
|
2668
|
2685
|
this.curDrugs = selection
|
2669
|
2686
|
},
|
2670
|
2687
|
|
|
@@ -2910,21 +2927,41 @@
|
2910
|
2927
|
},
|
2911
|
2928
|
selectChange(selection, row) {
|
2912
|
2929
|
console.log('row', row)
|
2913
|
|
- if (row.total <= 0) {
|
2914
|
|
- if (row.type == 3) {
|
2915
|
|
- if (selection) {
|
2916
|
|
- selection.forEach(row => {
|
2917
|
|
- if (row.total <= 0) {
|
2918
|
|
- this.$refs.tables.toggleRowSelection(row)
|
2919
|
|
- }
|
2920
|
|
- })
|
2921
|
|
- } else {
|
2922
|
|
- this.$refs.tables.clearSelection()
|
|
2930
|
+ if(this.org_id == 10138 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 4 || this.org_id ==3877 || this.org_id == 10028 ){
|
|
2931
|
+ if (row.stock_count <= 0) {
|
|
2932
|
+ if (row.type == 3) {
|
|
2933
|
+ if (selection) {
|
|
2934
|
+ selection.forEach(row => {
|
|
2935
|
+ if (row.stock_count <= 0) {
|
|
2936
|
+ this.$refs.tables.toggleRowSelection(row)
|
|
2937
|
+ }
|
|
2938
|
+ })
|
|
2939
|
+ } else {
|
|
2940
|
+ this.$refs.tables.clearSelection()
|
|
2941
|
+ }
|
|
2942
|
+ this.$message.error(row.project_name + '库存不足')
|
|
2943
|
+ return
|
2923
|
2944
|
}
|
2924
|
|
- this.$message.error(row.project_name + '库存不足')
|
2925
|
|
- return
|
2926
|
2945
|
}
|
|
2946
|
+ }else{
|
|
2947
|
+ if (row.total <= 0) {
|
|
2948
|
+ if (row.type == 3) {
|
|
2949
|
+ if (selection) {
|
|
2950
|
+ selection.forEach(row => {
|
|
2951
|
+ if (row.total <= 0) {
|
|
2952
|
+ this.$refs.tables.toggleRowSelection(row)
|
|
2953
|
+ }
|
|
2954
|
+ })
|
|
2955
|
+ } else {
|
|
2956
|
+ this.$refs.tables.clearSelection()
|
|
2957
|
+ }
|
|
2958
|
+ this.$message.error(row.project_name + '库存不足')
|
|
2959
|
+ return
|
|
2960
|
+ }
|
|
2961
|
+ }
|
|
2962
|
+
|
2927
|
2963
|
}
|
|
2964
|
+
|
2928
|
2965
|
this.teamList.push(row)
|
2929
|
2966
|
},
|
2930
|
2967
|
getlist() {
|