|
@@ -287,11 +287,11 @@
|
287
|
287
|
</el-table-column>
|
288
|
288
|
<el-table-column label="库存" width="60">
|
289
|
289
|
<template slot-scope="scope">
|
290
|
|
- {{scope.row.total}}{{scope.row.total?scope.row.min_unit:''}}
|
291
|
|
- <!--/ {{-->
|
292
|
|
- <!--scope.row.total * (scope.row.dose / scope.row.min_number)}}-->
|
293
|
|
- <!--{{(scope.row.total * (scope.row.dose /-->
|
294
|
|
- <!--scope.row.min_number))?scope.row.max_unit:''}}-->
|
|
290
|
+ <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919">
|
|
291
|
+ <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>
|
|
292
|
+ <span v-if="scope.row.count%scope.row.min_number>0"> {{scope.row.count%scope.row.min_number}}{{scope.row.min_unit}}</span>
|
|
293
|
+ </span>
|
|
294
|
+ <span v-else> {{scope.row.total}}{{scope.row.total?scope.row.min_unit:''}}</span>
|
295
|
295
|
</template>
|
296
|
296
|
</el-table-column>
|
297
|
297
|
<el-table-column label="单价" width="40">
|
|
@@ -382,7 +382,12 @@
|
382
|
382
|
<template slot-scope="scope">{{ scope.row.single_dose }}</template>
|
383
|
383
|
</el-table-column>
|
384
|
384
|
<el-table-column label="库存" width="40">
|
385
|
|
- <template slot-scope="scope">{{ scope.row.total }}</template>
|
|
385
|
+ <template slot-scope="scope">
|
|
386
|
+ <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919">
|
|
387
|
+ {{scope.row.stock_count}}
|
|
388
|
+ </span>
|
|
389
|
+ <span v-else> {{ scope.row.total }}</span>
|
|
390
|
+ </template>
|
386
|
391
|
</el-table-column>
|
387
|
392
|
<el-table-column label="单价" width="40">
|
388
|
393
|
<template slot-scope="scope">{{ scope.row.price }}</template>
|
|
@@ -503,6 +508,7 @@
|
503
|
508
|
month_prescriptions: Array,
|
504
|
509
|
isloading: false,
|
505
|
510
|
loading: false,
|
|
511
|
+ org_id:Number,
|
506
|
512
|
other_sick: {
|
507
|
513
|
type: Array,
|
508
|
514
|
default: function() {
|
|
@@ -2649,20 +2655,34 @@
|
2649
|
2655
|
this.$refs.additionalCharges.show()
|
2650
|
2656
|
},
|
2651
|
2657
|
selectDrugs(selection, row) {
|
2652
|
|
- console.log('selection', selection)
|
2653
|
|
- console.log('row', row)
|
2654
|
|
- if (row.total <= 0) {
|
2655
|
|
- if (selection) {
|
2656
|
|
- selection.forEach(row => {
|
2657
|
|
- if (row.total <= 0) {
|
2658
|
|
- this.$refs.multipleTable.toggleRowSelection(row)
|
|
2658
|
+ 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 || this.org_id == 10243 || this.org_id == 10088 || this.org_id == 10245 || this.org_id == 9919){
|
|
2659
|
+ if (row.count <= 0) {
|
|
2660
|
+ if (selection) {
|
|
2661
|
+ selection.forEach(row => {
|
|
2662
|
+ if (row.count <= 0) {
|
|
2663
|
+ this.$refs.multipleTable.toggleRowSelection(row)
|
|
2664
|
+ }
|
|
2665
|
+ })
|
|
2666
|
+ } else {
|
|
2667
|
+ this.$refs.multipleTable.clearSelection()
|
2659
|
2668
|
}
|
2660
|
|
- })
|
2661
|
|
- } else {
|
2662
|
|
- this.$refs.multipleTable.clearSelection()
|
2663
|
|
- }
|
2664
|
|
- this.$message.error(row.drug_name + '库存不足')
|
2665
|
|
- return
|
|
2669
|
+ this.$message.error(row.drug_name + '库存不足')
|
|
2670
|
+ return
|
|
2671
|
+ }
|
|
2672
|
+ }else{
|
|
2673
|
+ if (row.total <= 0) {
|
|
2674
|
+ if (selection) {
|
|
2675
|
+ selection.forEach(row => {
|
|
2676
|
+ if (row.total <= 0) {
|
|
2677
|
+ this.$refs.multipleTable.toggleRowSelection(row)
|
|
2678
|
+ }
|
|
2679
|
+ })
|
|
2680
|
+ } else {
|
|
2681
|
+ this.$refs.multipleTable.clearSelection()
|
|
2682
|
+ }
|
|
2683
|
+ this.$message.error(row.drug_name + '库存不足')
|
|
2684
|
+ return
|
|
2685
|
+ }
|
2666
|
2686
|
}
|
2667
|
2687
|
this.curDrugs = selection
|
2668
|
2688
|
},
|
|
@@ -2909,20 +2929,39 @@
|
2909
|
2929
|
},
|
2910
|
2930
|
selectChange(selection, row) {
|
2911
|
2931
|
console.log('row', row)
|
2912
|
|
- if (row.total <= 0) {
|
2913
|
|
- if (row.type == 3) {
|
2914
|
|
- if (selection) {
|
2915
|
|
- selection.forEach(row => {
|
2916
|
|
- if (row.total <= 0) {
|
2917
|
|
- this.$refs.tables.toggleRowSelection(row)
|
2918
|
|
- }
|
2919
|
|
- })
|
2920
|
|
- } else {
|
2921
|
|
- this.$refs.tables.clearSelection()
|
|
2932
|
+ 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 || this.org_id == 10243 || this.org_id == 10088 || this.org_id ==10245 || this.org_id == 9919 ){
|
|
2933
|
+ if (row.stock_count <= 0) {
|
|
2934
|
+ if (row.type == 3) {
|
|
2935
|
+ if (selection) {
|
|
2936
|
+ selection.forEach(row => {
|
|
2937
|
+ if (row.stock_count <= 0) {
|
|
2938
|
+ this.$refs.tables.toggleRowSelection(row)
|
|
2939
|
+ }
|
|
2940
|
+ })
|
|
2941
|
+ } else {
|
|
2942
|
+ this.$refs.tables.clearSelection()
|
|
2943
|
+ }
|
|
2944
|
+ this.$message.error(row.project_name + '库存不足')
|
|
2945
|
+ return
|
2922
|
2946
|
}
|
2923
|
|
- this.$message.error(row.project_name + '库存不足')
|
2924
|
|
- return
|
2925
|
2947
|
}
|
|
2948
|
+ }else{
|
|
2949
|
+ if (row.total <= 0) {
|
|
2950
|
+ if (row.type == 3) {
|
|
2951
|
+ if (selection) {
|
|
2952
|
+ selection.forEach(row => {
|
|
2953
|
+ if (row.total <= 0) {
|
|
2954
|
+ this.$refs.tables.toggleRowSelection(row)
|
|
2955
|
+ }
|
|
2956
|
+ })
|
|
2957
|
+ } else {
|
|
2958
|
+ this.$refs.tables.clearSelection()
|
|
2959
|
+ }
|
|
2960
|
+ this.$message.error(row.project_name + '库存不足')
|
|
2961
|
+ return
|
|
2962
|
+ }
|
|
2963
|
+ }
|
|
2964
|
+
|
2926
|
2965
|
}
|
2927
|
2966
|
this.teamList.push(row)
|
2928
|
2967
|
},
|
|
@@ -2948,6 +2987,7 @@
|
2948
|
2987
|
total: project[i].total,
|
2949
|
2988
|
is_special_diseases: project[i].disease_directory,
|
2950
|
2989
|
project: project[i],
|
|
2990
|
+ stock_count:0,
|
2951
|
2991
|
}
|
2952
|
2992
|
|
2953
|
2993
|
this.tabProject.push(obj)
|
|
@@ -2956,6 +2996,12 @@
|
2956
|
2996
|
var good_info = response.data.data.good_info
|
2957
|
2997
|
|
2958
|
2998
|
for (let i = 0; i < good_info.length; i++) {
|
|
2999
|
+ good_info[i].stock_count = 0
|
|
3000
|
+ if(good_info[i].good_stock_in.length >0 ){
|
|
3001
|
+ for(let j=0;j<good_info[i].good_stock_in.length;j++){
|
|
3002
|
+ good_info[i].stock_count += good_info[i].good_stock_in[j].stock_count
|
|
3003
|
+ }
|
|
3004
|
+ }
|
2959
|
3005
|
let obj = {
|
2960
|
3006
|
id: good_info[i].id,
|
2961
|
3007
|
project_name: good_info[i].good_name,
|
|
@@ -2972,6 +3018,7 @@
|
2972
|
3018
|
total: good_info[i].total,
|
2973
|
3019
|
is_special_diseases: good_info[i].is_special_diseases,
|
2974
|
3020
|
good_info: good_info[i],
|
|
3021
|
+ stock_count:good_info[i].stock_count,
|
2975
|
3022
|
}
|
2976
|
3023
|
this.tabProject.push(obj)
|
2977
|
3024
|
}
|
|
@@ -3154,7 +3201,9 @@
|
3154
|
3201
|
clearSelection() {
|
3155
|
3202
|
this.$refs.tabProjectTeam.clearSelection()
|
3156
|
3203
|
}
|
3157
|
|
- }, mounted() {
|
|
3204
|
+ },
|
|
3205
|
+ mounted() {
|
|
3206
|
+
|
3158
|
3207
|
this.request_record_date = this.record_date
|
3159
|
3208
|
// this.getInitData()
|
3160
|
3209
|
//获取所有项目
|
|
@@ -3183,6 +3232,10 @@
|
3183
|
3232
|
}, 400)
|
3184
|
3233
|
}
|
3185
|
3234
|
}
|
|
3235
|
+ },
|
|
3236
|
+ created(){
|
|
3237
|
+ console.log("中华任命工商过多水分我333323232",this.org_id)
|
|
3238
|
+ console.log("jjjjjjjjjjjjjjjjjjjjjjjjjjjj",this.drugs)
|
3186
|
3239
|
}
|
3187
|
3240
|
|
3188
|
3241
|
}
|