|
@@ -2592,7 +2592,33 @@ export default {
|
2592
|
2592
|
// }
|
2593
|
2593
|
// }
|
2594
|
2594
|
if (index == 1) {
|
2595
|
|
- console.log(this.prescriptions)
|
|
2595
|
+ // console.log(this.prescriptions)
|
|
2596
|
+
|
|
2597
|
+ if (this.org_id == 10206 || this.org_id == 0){
|
|
2598
|
+ console.log(this.prescriptions)
|
|
2599
|
+
|
|
2600
|
+ //药品
|
|
2601
|
+ for(let i = 0; i < this.prescriptions.length; i++){
|
|
2602
|
+ for(let b = 0; b < this.prescriptions[i].advices.length; b++){
|
|
2603
|
+ if(this.prescriptions[i].advices[b].advice_id == 0) {
|
|
2604
|
+ this.judgmentsDrugStock(this.prescriptions[i].advices[b].drug.bby01, this.prescriptions[i].advices[b].drug.bbx01,this.prescriptions[i].advices[b].drug_name,this.prescriptions[i].advices[b].prescribing_number)
|
|
2605
|
+ }
|
|
2606
|
+ }
|
|
2607
|
+ }
|
|
2608
|
+ //耗材
|
|
2609
|
+ for(let i = 0; i < this.prescriptions.length; i++){
|
|
2610
|
+
|
|
2611
|
+ for(let b = 0; b < this.prescriptions[i].project.length; b++){
|
|
2612
|
+ if(this.prescriptions[i].project[b].type == 3){
|
|
2613
|
+ if(this.prescriptions[i].project[b].id == 0) {
|
|
2614
|
+ this.judgmentsGoodStock(this.prescriptions[i].project[b].good_info.bby01, this.prescriptions[i].project[b].good_info.bbx01,this.prescriptions[i].project[b].good_info.good_name,this.prescriptions[i].project[b].good_info.specification_name,this.prescriptions[i].project[b].total)
|
|
2615
|
+ }
|
|
2616
|
+ }
|
|
2617
|
+ }
|
|
2618
|
+ }
|
|
2619
|
+ }
|
|
2620
|
+
|
|
2621
|
+
|
2596
|
2622
|
|
2597
|
2623
|
if (this.org_id != 10206 && this.org_id != 0) {
|
2598
|
2624
|
for (let i = 0; i < this.prescriptions.length; i++) {
|
|
@@ -2624,6 +2650,10 @@ export default {
|
2624
|
2650
|
}
|
2625
|
2651
|
}
|
2626
|
2652
|
|
|
2653
|
+ //库存限制
|
|
2654
|
+
|
|
2655
|
+
|
|
2656
|
+
|
2627
|
2657
|
|
2628
|
2658
|
this.$emit('editKeepLoad', true)
|
2629
|
2659
|
var str = ""
|
|
@@ -3013,19 +3043,19 @@ export default {
|
3013
|
3043
|
|
3014
|
3044
|
}
|
3015
|
3045
|
}
|
3016
|
|
- createHisPrescription(data, params).then(response => {
|
3017
|
|
- if (response.data.state == 1) {
|
3018
|
|
- this.$emit('change', this.patientInfo.id)
|
3019
|
|
- this.$message.success('保存成功!')
|
3020
|
|
- this.$emit('editKeepLoad', false)
|
3021
|
|
- this.$parent.getInitData()
|
3022
|
|
- this.getlist()
|
3023
|
|
- } else {
|
3024
|
|
- this.$message.error(response.data.msg)
|
3025
|
|
- this.$emit('editKeepLoad', false)
|
3026
|
|
-
|
3027
|
|
- }
|
3028
|
|
- })
|
|
3046
|
+ // createHisPrescription(data, params).then(response => {
|
|
3047
|
+ // if (response.data.state == 1) {
|
|
3048
|
+ // this.$emit('change', this.patientInfo.id)
|
|
3049
|
+ // this.$message.success('保存成功!')
|
|
3050
|
+ // this.$emit('editKeepLoad', false)
|
|
3051
|
+ // this.$parent.getInitData()
|
|
3052
|
+ // this.getlist()
|
|
3053
|
+ // } else {
|
|
3054
|
+ // this.$message.error(response.data.msg)
|
|
3055
|
+ // this.$emit('editKeepLoad', false)
|
|
3056
|
+ //
|
|
3057
|
+ // }
|
|
3058
|
+ // })
|
3029
|
3059
|
}
|
3030
|
3060
|
}
|
3031
|
3061
|
|
|
@@ -3119,6 +3149,25 @@ export default {
|
3119
|
3149
|
}
|
3120
|
3150
|
}
|
3121
|
3151
|
}
|
|
3152
|
+ },judgmentsDrugStock(bby01, bbx01,name,count){
|
|
3153
|
+ for (let i = 0; i < this.zuobiao_drug.length; i++) {
|
|
3154
|
+ if (this.zuobiao_drug[i].bby01 == bby01) {
|
|
3155
|
+ if (this.zuobiao_drug[i].sysl < parseInt(count)){
|
|
3156
|
+ this.$message.error(name + "库存不足,无法保存")
|
|
3157
|
+ return
|
|
3158
|
+ }
|
|
3159
|
+ }
|
|
3160
|
+ }
|
|
3161
|
+
|
|
3162
|
+ },judgmentsGoodStock(bby01, bbx01,name,specification_name,count){
|
|
3163
|
+ for (let i = 0; i < this.zuobiao_project.length; i++) {
|
|
3164
|
+ if (this.zuobiao_project[i].bbx01 == bbx01 && this.zuobiao_project[i].bby06 == specification_name) {
|
|
3165
|
+ if (this.zuobiao_project[i].lsqty < parseInt(count)){
|
|
3166
|
+ this.$message.error(name + "库存不足,无法保存")
|
|
3167
|
+ return
|
|
3168
|
+ }
|
|
3169
|
+ }
|
|
3170
|
+ }
|
3122
|
3171
|
},
|
3123
|
3172
|
addTab(targetName) {
|
3124
|
3173
|
|
|
@@ -3651,6 +3700,8 @@ export default {
|
3651
|
3700
|
groupno: index + temp_index,
|
3652
|
3701
|
hosp_appr_flag: '1',
|
3653
|
3702
|
execution_state:2,
|
|
3703
|
+
|
|
3704
|
+
|
3654
|
3705
|
}
|
3655
|
3706
|
if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {
|
3656
|
3707
|
obj.prescribing_number = 1
|
|
@@ -3840,6 +3891,7 @@ export default {
|
3840
|
3891
|
project_name: good_info[i].good_name,
|
3841
|
3892
|
statistical_classification: '',
|
3842
|
3893
|
single_dose: good_info[i].specification_name,
|
|
3894
|
+ specification_name: good_info[i].specification_name,
|
3843
|
3895
|
delivery_way: '',
|
3844
|
3896
|
execution_frequency: '',
|
3845
|
3897
|
number_days: 1,
|
|
@@ -3970,11 +4022,12 @@ export default {
|
3970
|
4022
|
this.$message.error(project[i].good_info.good_name + '库存不足')
|
3971
|
4023
|
}
|
3972
|
4024
|
|
3973
|
|
- if (project[i].good_info.zuobiao_stock_num <= 0 && this.org_id == 10206) {
|
3974
|
|
- num++
|
3975
|
|
- this.$refs.tabProjectTeam.toggleRowSelection(row)
|
3976
|
|
- this.$message.error(project[i].good_info.good_name + '库存不足')
|
3977
|
|
- }
|
|
4025
|
+ //TODO
|
|
4026
|
+ // if (project[i].good_info.zuobiao_stock_num <= 0 && this.org_id == 10206) {
|
|
4027
|
+ // num++
|
|
4028
|
+ // this.$refs.tabProjectTeam.toggleRowSelection(row)
|
|
4029
|
+ // this.$message.error(project[i].good_info.good_name + '库存不足')
|
|
4030
|
+ // }
|
3978
|
4031
|
|
3979
|
4032
|
if (num > 0) {
|
3980
|
4033
|
this.$refs.tabProjectTeam.clearSelection()
|