|
@@ -286,25 +286,18 @@
|
286
|
286
|
</el-table-column>
|
287
|
287
|
<el-table-column label="库存" width="60">
|
288
|
288
|
<template slot-scope="scope">
|
289
|
|
- <!-- <span
|
290
|
|
- 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 == 10188 || org_id == 10245 || org_id == 9919 || org_id ==10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 || org_id == 10265 || org_id == 10164 || org_id == 9956 || org_id == 10191 || org_id == 10278">
|
291
|
|
- <span
|
292
|
|
- v-if="scope.row.count/scope.row.min_number>0">{{ Math.floor(scope.row.count / scope.row.min_number) }}{{ scope.row.max_unit }}</span>
|
293
|
|
- <span
|
294
|
|
- v-if="scope.row.count%scope.row.min_number>0"> {{ scope.row.count % scope.row.min_number }}{{ scope.row.min_unit }}</span>
|
295
|
|
- </span>
|
296
|
|
- <span v-else> {{ scope.row.total }}{{ scope.row.total ? scope.row.min_unit : '' }}</span> -->
|
297
|
|
-
|
298
|
|
- <span v-if="scope.row.sum_count/scope.row.min_number>0">{{ Math.floor(scope.row.sum_count / scope.row.min_number) }}{{ scope.row.max_unit }}</span>
|
299
|
|
- <span v-if="scope.row.sum_count%scope.row.min_number>0"> {{ scope.row.sum_count % scope.row.min_number }}{{ scope.row.min_unit }}</span>
|
300
|
|
-
|
|
289
|
+ <span
|
|
290
|
+ 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 == 10188 || org_id == 10245 || org_id == 9919 || org_id ==10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 || org_id == 10265 || org_id == 10164 || org_id == 9956 || org_id == 10191 || org_id == 10278 || org_id == 10217">
|
|
291
|
+ <span
|
|
292
|
+ v-if="scope.row.count/scope.row.min_number>0">{{ Math.floor(scope.row.count / scope.row.min_number) }}{{ scope.row.max_unit }}</span>
|
|
293
|
+ <span
|
|
294
|
+ v-if="scope.row.count%scope.row.min_number>0"> {{ scope.row.count % scope.row.min_number }}{{ scope.row.min_unit }}</span>
|
|
295
|
+ </span>
|
|
296
|
+ <span v-else> {{ scope.row.total }}{{ scope.row.total ? scope.row.min_unit : '' }}</span>
|
301
|
297
|
</template>
|
302
|
298
|
</el-table-column>
|
303
|
299
|
<el-table-column label="单价" width="40">
|
304
|
|
- <template slot-scope="scope">
|
305
|
|
- <span v-if="scope.row.batch_retai_price >0">{{scope.row.batch_retai_price}}</span>
|
306
|
|
- <span v-else>{{ scope.row.min_price }}</span>
|
307
|
|
- </template>
|
|
300
|
+ <template slot-scope="scope">{{ scope.row.min_price }}</template>
|
308
|
301
|
</el-table-column>
|
309
|
302
|
</el-table>
|
310
|
303
|
<!-- <div>{{3*(2/3)}}</div> -->
|
|
@@ -392,12 +385,11 @@
|
392
|
385
|
</el-table-column>
|
393
|
386
|
<el-table-column label="库存" width="40">
|
394
|
387
|
<template slot-scope="scope">
|
395
|
|
- <!-- <span
|
396
|
|
- 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 || org_id ==10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 || org_id == 10265 || org_id == 10164 || org_id == 9956 || org_id == 10191 || org_id == 10278">
|
397
|
|
- {{ scope.row.stock_count }}
|
398
|
|
- </span>
|
399
|
|
- <span v-else> {{ scope.row.total }}</span> -->
|
400
|
|
- <span>{{scope.row.sum_count}}</span>
|
|
388
|
+ <span
|
|
389
|
+ 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 || org_id ==10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 || org_id == 10265 || org_id == 10164 || org_id == 9956 || org_id == 10191 || org_id == 10278 || org_id == 10217">
|
|
390
|
+ {{ scope.row.stock_count }}
|
|
391
|
+ </span>
|
|
392
|
+ <span v-else> {{ scope.row.total }}</span>
|
401
|
393
|
</template>
|
402
|
394
|
</el-table-column>
|
403
|
395
|
<el-table-column label="单价" width="40">
|
|
@@ -2684,7 +2676,6 @@ export default {
|
2684
|
2676
|
this.$refs.additionalCharges.show()
|
2685
|
2677
|
},
|
2686
|
2678
|
selectDrugs(selection, row) {
|
2687
|
|
- if (row.sum_count <= 0) {
|
2688
|
2679
|
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 || this.org_id == 10106 || this.org_id == 9504 || this.org_id == 10215 || this.org_id == 10088 || this.org_id == 10188 || this.org_id == 10265 || this.org_id == 10164 || this.org_id == 9956 || this.org_id == 10191 || this.org_id == 10278 || this.org_id == 10217) {
|
2689
|
2680
|
if (row.count <= 0) {
|
2690
|
2681
|
if (selection) {
|
|
@@ -2699,33 +2690,19 @@ export default {
|
2699
|
2690
|
this.$message.error(row.drug_name + '库存不足')
|
2700
|
2691
|
return
|
2701
|
2692
|
}
|
2702
|
|
- // 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 || this.org_id == 10106 || this.org_id == 9504 || this.org_id == 10215 || this.org_id == 10088 || this.org_id == 10188 || this.org_id == 10265 || this.org_id == 10164 || this.org_id == 9956 || this.org_id == 10191 || this.org_id == 10278) {
|
2703
|
|
- // if (row.count <= 0) {
|
2704
|
|
- // if (selection) {
|
2705
|
|
- // selection.forEach(row => {
|
2706
|
|
- // if (row.count <= 0) {
|
2707
|
|
- // this.$refs.multipleTable.toggleRowSelection(row)
|
2708
|
|
- // }
|
2709
|
|
- // })
|
2710
|
|
- // } else {
|
2711
|
|
- // this.$refs.multipleTable.clearSelection()
|
2712
|
|
- // }
|
2713
|
|
- // this.$message.error(row.drug_name + '库存不足')
|
2714
|
|
- // return
|
2715
|
|
- // }
|
2716
|
|
- // } else {
|
2717
|
|
- // if (row.total <= 0) {
|
2718
|
|
- // if (selection) {
|
2719
|
|
- // selection.forEach(row => {
|
2720
|
|
- // if (row.total <= 0) {
|
2721
|
|
- // this.$refs.multipleTable.toggleRowSelection(row)
|
2722
|
|
- // }
|
2723
|
|
- // })
|
2724
|
|
- // } else {
|
2725
|
|
- // this.$refs.multipleTable.clearSelection()
|
2726
|
|
- // }
|
2727
|
|
- // this.$message.error(row.drug_name + '库存不足')
|
2728
|
|
- // return
|
|
2693
|
+ } else {
|
|
2694
|
+ if (row.total <= 0) {
|
|
2695
|
+ if (selection) {
|
|
2696
|
+ selection.forEach(row => {
|
|
2697
|
+ if (row.total <= 0) {
|
|
2698
|
+ this.$refs.multipleTable.toggleRowSelection(row)
|
|
2699
|
+ }
|
|
2700
|
+ })
|
|
2701
|
+ } else {
|
|
2702
|
+ this.$refs.multipleTable.clearSelection()
|
|
2703
|
+ }
|
|
2704
|
+ this.$message.error(row.drug_name + '库存不足')
|
|
2705
|
+ return
|
2729
|
2706
|
}
|
2730
|
2707
|
}
|
2731
|
2708
|
this.curDrugs = selection
|
|
@@ -2985,166 +2962,110 @@ export default {
|
2985
|
2962
|
this.teamList = row
|
2986
|
2963
|
},
|
2987
|
2964
|
selectChange(selection, row) {
|
2988
|
|
- if(row.type == 3){
|
2989
|
|
- if(row.sum_count <=0){
|
2990
|
|
- if(selection){
|
|
2965
|
+ console.log('row', row)
|
|
2966
|
+ 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 || this.org_id == 10106 || this.org_id == 9504 || this.org_id == 10215 || this.org_id == 10088 || this.org_id == 10265 || this.org_id == 10164 || this.org_id == 10188 || this.org_id == 9956 || this.org_id == 10191 || this.org_id == 10278 || this.org_id == 10217) {
|
|
2967
|
+ if (row.stock_count <= 0) {
|
|
2968
|
+ if (row.type == 3) {
|
|
2969
|
+ if (selection) {
|
2991
|
2970
|
selection.forEach(row => {
|
2992
|
|
- if (row.sum_count <= 0) {
|
|
2971
|
+ if (row.stock_count <= 0) {
|
2993
|
2972
|
this.$refs.tables.toggleRowSelection(row)
|
2994
|
|
- }else{
|
2995
|
|
- this.$refs.tables.clearSelection()
|
2996
|
2973
|
}
|
2997
|
|
- this.$message.error(row.project_name + '库存不足')
|
2998
|
|
- return
|
2999
|
2974
|
})
|
|
2975
|
+ } else {
|
|
2976
|
+ this.$refs.tables.clearSelection()
|
|
2977
|
+ }
|
|
2978
|
+ this.$message.error(row.project_name + '库存不足')
|
|
2979
|
+ return
|
|
2980
|
+ }
|
|
2981
|
+ }
|
|
2982
|
+ } else {
|
|
2983
|
+ if (row.total <= 0) {
|
|
2984
|
+ if (row.type == 3) {
|
|
2985
|
+ if (selection) {
|
|
2986
|
+ selection.forEach(row => {
|
|
2987
|
+ if (row.total <= 0) {
|
|
2988
|
+ this.$refs.tables.toggleRowSelection(row)
|
|
2989
|
+ }
|
|
2990
|
+ })
|
|
2991
|
+ } else {
|
|
2992
|
+ this.$refs.tables.clearSelection()
|
|
2993
|
+ }
|
|
2994
|
+ this.$message.error(row.project_name + '库存不足')
|
|
2995
|
+ return
|
3000
|
2996
|
}
|
3001
|
2997
|
}
|
3002
|
|
- }
|
3003
|
|
-
|
3004
|
|
- // 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 == 10188 || this.org_id ==10245 || this.org_id == 9919 || this.org_id == 10106 || this.org_id == 9504 || this.org_id ==10215 || this.org_id == 10188 || this.org_id == 10265 || this.org_id == 10164 || this.org_id == 9956 || this.org_id == 10188 || this.org_id == 10191 || this.org_id == 10278){
|
3005
|
|
- // if (row.stock_count <= 0) {
|
3006
|
|
- // if (row.type == 3) {
|
3007
|
|
- // if (selection) {
|
3008
|
|
- // selection.forEach(row => {
|
3009
|
|
- // if (row.stock_count <= 0) {
|
3010
|
|
- // this.$refs.tables.toggleRowSelection(row)
|
3011
|
|
- // }
|
3012
|
|
- // })
|
3013
|
|
- // } else {
|
3014
|
|
- // this.$refs.tables.clearSelection()
|
3015
|
|
- // }
|
3016
|
|
- // this.$message.error(row.project_name + '库存不足')
|
3017
|
|
- // return
|
3018
|
|
- // }
|
3019
|
|
- // }
|
3020
|
|
- // }else{
|
3021
|
|
- // if (row.total <= 0) {
|
3022
|
|
- // if (row.type == 3) {
|
3023
|
|
- // if (selection) {
|
3024
|
|
- // selection.forEach(row => {
|
3025
|
|
- // if (row.total <= 0) {
|
3026
|
|
- // this.$refs.tables.toggleRowSelection(row)
|
3027
|
|
- // }
|
3028
|
|
- // })
|
3029
|
|
- // } else {
|
3030
|
|
- // this.$refs.tables.clearSelection()
|
3031
|
|
- // }
|
3032
|
|
- // this.$message.error(row.project_name + '库存不足')
|
3033
|
|
- // return
|
3034
|
|
- // }
|
3035
|
|
- // }
|
3036
|
|
- // console.log('row', row)
|
3037
|
|
- // 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 == 10188 || this.org_id ==10245 || this.org_id == 9919 || this.org_id == 10106 || this.org_id == 9504 || this.org_id ==10215 || this.org_id == 10188 || this.org_id == 10265 || this.org_id == 10164 || this.org_id == 9956 || this.org_id == 10188 || this.org_id == 10191 || this.org_id == 10278 || this.org_id == 10217){
|
3038
|
|
- // if (row.stock_count <= 0) {
|
3039
|
|
- // if (row.type == 3) {
|
3040
|
|
- // if (selection) {
|
3041
|
|
- // selection.forEach(row => {
|
3042
|
|
- // if (row.stock_count <= 0) {
|
3043
|
|
- // this.$refs.tables.toggleRowSelection(row)
|
3044
|
|
- // }
|
3045
|
|
- // })
|
3046
|
|
- // } else {
|
3047
|
|
- // this.$refs.tables.clearSelection()
|
3048
|
|
- // }
|
3049
|
|
- // this.$message.error(row.project_name + '库存不足')
|
3050
|
|
- // return
|
3051
|
|
- // }
|
3052
|
|
- // }
|
3053
|
|
- // }else{
|
3054
|
|
- // if (row.total <= 0) {
|
3055
|
|
- // if (row.type == 3) {
|
3056
|
|
- // if (selection) {
|
3057
|
|
- // selection.forEach(row => {
|
3058
|
|
- // if (row.total <= 0) {
|
3059
|
|
- // this.$refs.tables.toggleRowSelection(row)
|
3060
|
|
- // }
|
3061
|
|
- // })
|
3062
|
|
- // } else {
|
3063
|
|
- // this.$refs.tables.clearSelection()
|
3064
|
|
- // }
|
3065
|
|
- // this.$message.error(row.project_name + '库存不足')
|
3066
|
|
- // return
|
3067
|
|
- // }
|
3068
|
|
- // }
|
3069
|
|
- // }
|
3070
|
|
- this.teamList.push(row)
|
3071
|
|
- },
|
3072
|
|
- getlist() {
|
3073
|
|
- this.tabProject = []
|
3074
|
|
- getHisProject().then(response => {
|
3075
|
|
- if (response.data.state == 1) {
|
3076
|
|
- var project = response.data.data.project
|
3077
|
|
- console.log("项目列表",project)
|
3078
|
|
- for (let i = 0; i < project.length; i++) {
|
3079
|
|
- let obj = {
|
3080
|
|
- id: project[i].id,
|
3081
|
|
- project_name: project[i].project_name,
|
3082
|
|
- statistical_classification: '',
|
3083
|
|
- single_dose: project[i].single_dose,
|
3084
|
|
- delivery_way: project[i].delivery_way,
|
3085
|
|
- execution_frequency: project[i].execution_frequency,
|
3086
|
|
- number_days: project[i].number_days,
|
3087
|
|
- price: project[i].price,
|
3088
|
|
- medical_code: project[i].medical_code,
|
3089
|
|
- cus_total: 1,
|
3090
|
|
- unit: project[i].unit,
|
3091
|
|
- type: 2,
|
3092
|
|
- total: project[i].total,
|
3093
|
|
- is_special_diseases: project[i].disease_directory,
|
3094
|
|
- project: project[i],
|
3095
|
|
- stock_count:0,
|
3096
|
|
- sum_count:0,
|
3097
|
|
- batch_retai_price:0,
|
3098
|
|
- }
|
3099
|
2998
|
|
3100
|
|
- this.tabProject.push(obj)
|
|
2999
|
+ }
|
|
3000
|
+ this.teamList.push(row)
|
|
3001
|
+ },
|
|
3002
|
+ getlist() {
|
|
3003
|
+ this.tabProject = []
|
|
3004
|
+ getHisProject().then(response => {
|
|
3005
|
+ if (response.data.state == 1) {
|
|
3006
|
+ var project = response.data.data.project
|
|
3007
|
+ for (let i = 0; i < project.length; i++) {
|
|
3008
|
+ let obj = {
|
|
3009
|
+ id: project[i].id,
|
|
3010
|
+ project_name: project[i].project_name,
|
|
3011
|
+ statistical_classification: '',
|
|
3012
|
+ single_dose: project[i].single_dose,
|
|
3013
|
+ delivery_way: project[i].delivery_way,
|
|
3014
|
+ execution_frequency: project[i].execution_frequency,
|
|
3015
|
+ number_days: project[i].number_days,
|
|
3016
|
+ price: project[i].price,
|
|
3017
|
+ medical_code: project[i].medical_code,
|
|
3018
|
+ cus_total: 1,
|
|
3019
|
+ unit: project[i].unit,
|
|
3020
|
+ type: 2,
|
|
3021
|
+ total: project[i].total,
|
|
3022
|
+ is_special_diseases: project[i].disease_directory,
|
|
3023
|
+ project: project[i],
|
|
3024
|
+ stock_count: 0
|
3101
|
3025
|
}
|
3102
|
3026
|
|
3103
|
|
- var good_info = response.data.data.good_info
|
3104
|
|
- console.log("good_info2323232323232323",good_info)
|
|
3027
|
+ this.tabProject.push(obj)
|
|
3028
|
+ }
|
3105
|
3029
|
|
3106
|
|
- for (let i = 0; i < good_info.length; i++) {
|
3107
|
|
- good_info[i].stock_count = 0
|
|
3030
|
+ var good_info = response.data.data.good_info
|
3108
|
3031
|
|
3109
|
|
- if(good_info[i].batch_retai_price > 0){
|
3110
|
|
- good_info[i].packing_price = 0
|
3111
|
|
- good_info[i].packing_price = good_info[i].batch_retai_price
|
3112
|
|
- }
|
3113
|
|
- if(good_info[i].good_stock_in&&good_info[i].good_stock_in.length >0 ){
|
3114
|
|
- for(let j=0;j<good_info[i].good_stock_in.length;j++){
|
3115
|
|
- good_info[i].stock_count += good_info[i].good_stock_in[j].stock_count
|
3116
|
|
- }
|
3117
|
|
- }
|
3118
|
|
- console.log("耗材列表2323232322332",good_info)
|
3119
|
|
- let obj = {
|
3120
|
|
- id: good_info[i].id,
|
3121
|
|
- project_name: good_info[i].good_name,
|
3122
|
|
- statistical_classification: '',
|
3123
|
|
- single_dose: good_info[i].specification_name,
|
3124
|
|
- delivery_way: '',
|
3125
|
|
- execution_frequency: '',
|
3126
|
|
- number_days: 1,
|
3127
|
|
- cus_total: 1,
|
3128
|
|
- price: good_info[i].packing_price,
|
3129
|
|
- medical_code: good_info[i].medical_insurance_number,
|
3130
|
|
- unit: this.getGoodUnit(good_info[i].good_unit),
|
3131
|
|
- type: 3,
|
3132
|
|
- total: good_info[i].total,
|
3133
|
|
- is_special_diseases: good_info[i].is_special_diseases,
|
3134
|
|
- good_info: good_info[i],
|
3135
|
|
- stock_count:good_info[i].stock_count,
|
3136
|
|
- sum_count:good_info[i].sum_count,
|
3137
|
|
- batch_retai_price:good_info[i].batch_retai_price
|
|
3032
|
+ for (let i = 0; i < good_info.length; i++) {
|
|
3033
|
+ good_info[i].stock_count = 0
|
|
3034
|
+ if (good_info[i].good_stock_in&&good_info[i].good_stock_in.length > 0) {
|
|
3035
|
+ for (let j = 0; j < good_info[i].good_stock_in.length; j++) {
|
|
3036
|
+ good_info[i].stock_count += good_info[i].good_stock_in[j].stock_count
|
3138
|
3037
|
}
|
3139
|
|
- this.tabProject.push(obj)
|
3140
|
3038
|
}
|
3141
|
|
-
|
3142
|
|
- console.log("猎豹33323232323223323223233223",this.tabProject)
|
3143
|
|
- this.allProject = this.tabProject
|
|
3039
|
+ let obj = {
|
|
3040
|
+ id: good_info[i].id,
|
|
3041
|
+ project_name: good_info[i].good_name,
|
|
3042
|
+ statistical_classification: '',
|
|
3043
|
+ single_dose: good_info[i].specification_name,
|
|
3044
|
+ delivery_way: '',
|
|
3045
|
+ execution_frequency: '',
|
|
3046
|
+ number_days: 1,
|
|
3047
|
+ cus_total: 1,
|
|
3048
|
+ price: good_info[i].packing_price,
|
|
3049
|
+ medical_code: good_info[i].medical_insurance_number,
|
|
3050
|
+ unit: this.getGoodUnit(good_info[i].good_unit),
|
|
3051
|
+ type: 3,
|
|
3052
|
+ total: good_info[i].total,
|
|
3053
|
+ is_special_diseases: good_info[i].is_special_diseases,
|
|
3054
|
+ good_info: good_info[i],
|
|
3055
|
+ stock_count: good_info[i].stock_count
|
|
3056
|
+ }
|
|
3057
|
+ this.tabProject.push(obj)
|
3144
|
3058
|
}
|
3145
|
|
- })
|
3146
|
|
- },
|
3147
|
|
- deepClone(source) {
|
|
3059
|
+
|
|
3060
|
+ this.allProject = this.tabProject
|
|
3061
|
+
|
|
3062
|
+
|
|
3063
|
+
|
|
3064
|
+
|
|
3065
|
+ }
|
|
3066
|
+ })
|
|
3067
|
+
|
|
3068
|
+ }, deepClone(source) {
|
3148
|
3069
|
if (!source && typeof source !== 'object') {
|
3149
|
3070
|
throw new Error('error arguments', 'shallowClone')
|
3150
|
3071
|
}
|
|
@@ -3177,7 +3098,7 @@ export default {
|
3177
|
3098
|
})
|
3178
|
3099
|
},
|
3179
|
3100
|
selectTeam(row) {
|
3180
|
|
- console.log("时间233232322322333232",row)
|
|
3101
|
+ console.log(row)
|
3181
|
3102
|
// var arr = []
|
3182
|
3103
|
// for (let i = 0; i < row.length; i++) {
|
3183
|
3104
|
// arr.push(row[i].item_id)
|