|
@@ -3362,87 +3362,88 @@ export default {
|
3362
|
3362
|
} else if (index == 5) {
|
3363
|
3363
|
this.$refs.saveTemplate.show()
|
3364
|
3364
|
}
|
3365
|
|
- } else if (this.dayorMonth == 'month') {
|
3366
|
|
- if (this.isShowDayPrescription) {
|
3367
|
|
- // if (this.curDayPrescriptions.order_status == 2) {
|
3368
|
|
- // this.$message.error('当前处方已经结算,无法保存')
|
3369
|
|
- // return
|
3370
|
|
- // }
|
3371
|
|
- if (this.doctorValue.length <= 0) {
|
3372
|
|
- this.$message.error('医生不能为空')
|
3373
|
|
- return
|
3374
|
|
- }
|
3375
|
|
-
|
3376
|
|
- if (this.departmentValue.length <= 0) {
|
3377
|
|
- this.$message.error('科室不能为空')
|
3378
|
|
- return
|
3379
|
|
- }
|
3380
|
|
-
|
3381
|
|
- var str = ''
|
3382
|
|
- if (patient_diagnose != '') {
|
3383
|
|
- str = this.patient_diagnose.join(',')
|
3384
|
|
- }
|
3385
|
|
- if (index == 1) {
|
3386
|
|
- let params = {
|
3387
|
|
- patient_id: this.patientInfo.id,
|
3388
|
|
- diagnose: this.diagnose.join(','),
|
3389
|
|
- sick_type: this.state1,
|
3390
|
|
- sick_history: this.state2,
|
3391
|
|
- doctor: this.doctorValue,
|
3392
|
|
- department: this.departmentValue,
|
3393
|
|
- record_date: this.end_time,
|
3394
|
|
- his_patient_id: this.hisPatientInfo.id,
|
3395
|
|
- reg_type: this.register_type,
|
3396
|
|
- p_type: 2,
|
3397
|
|
- patient_diagnose: str
|
3398
|
|
- }
|
3399
|
|
-
|
3400
|
|
- var month_prescriptions = this.deepClone(this.month_prescriptions)
|
3401
|
|
-
|
3402
|
|
- for (let i = 0; i < month_prescriptions.length; i++) {
|
3403
|
|
- if (month_prescriptions[i].advices.length > 0 && month_prescriptions[i].project.length == 0) {
|
3404
|
|
- month_prescriptions[i]['type'] = 1
|
3405
|
|
- }
|
3406
|
|
- if (month_prescriptions[i].advices.length == 0 && month_prescriptions[i].project.length > 0) {
|
3407
|
|
- month_prescriptions[i]['type'] = 2
|
3408
|
|
- }
|
3409
|
|
-
|
3410
|
|
- for (let b = 0; b < month_prescriptions[i].advices.length; b++) {
|
3411
|
|
- month_prescriptions[i].advices[b].single_dose = month_prescriptions[i].advices[b].single_dose.toString()
|
3412
|
|
- month_prescriptions[i].advices[b].prescribing_number = month_prescriptions[i].advices[b].prescribing_number.toString()
|
3413
|
|
- month_prescriptions[i].advices[b].retail_price = month_prescriptions[i].advices[b].retail_price.toString()
|
3414
|
|
- month_prescriptions[i].advices[b].day = parseInt(month_prescriptions[i].advices[b].day)
|
3415
|
|
-
|
3416
|
|
- }
|
3417
|
|
-
|
3418
|
|
- for (let b = 0; b < month_prescriptions[i].project.length; b++) {
|
3419
|
|
- month_prescriptions[i].project[b].price = month_prescriptions[i].project[b].price.toString()
|
3420
|
|
- month_prescriptions[i].project[b].total = month_prescriptions[i].project[b].total.toString()
|
3421
|
|
- month_prescriptions[i].project[b].delivery_way = month_prescriptions[i].project[b].delivery_way.toString()
|
3422
|
|
-
|
3423
|
|
- }
|
3424
|
|
-
|
3425
|
|
- for (let b = 0; b < month_prescriptions[i].addition.length; b++) {
|
3426
|
|
- month_prescriptions[i].addition[b].id = parseInt(month_prescriptions[i].addition[b].id)
|
3427
|
|
- month_prescriptions[i].addition[b].item_id = parseInt(month_prescriptions[i].addition[b].item_id)
|
3428
|
|
- month_prescriptions[i].addition[b].price = month_prescriptions[i].addition[b].price.toString()
|
3429
|
|
- month_prescriptions[i].addition[b].count = month_prescriptions[i].addition[b].count.toString()
|
3430
|
|
- }
|
3431
|
|
- }
|
3432
|
|
-
|
3433
|
|
- let data = {
|
3434
|
|
- 'prescriptions': month_prescriptions
|
3435
|
|
- }
|
3436
|
|
- editHisPrescription(data, params).then(response => {
|
3437
|
|
- if (response.data.state == 1) {
|
3438
|
|
- this.month_prescriptions = month_prescriptions
|
3439
|
|
- this.$message.success('编辑成功')
|
3440
|
|
- }
|
3441
|
|
- })
|
3442
|
|
-
|
3443
|
|
- }
|
3444
|
|
- }
|
3445
|
3365
|
}
|
|
3366
|
+ // if (this.dayorMonth == 'month') {
|
|
3367
|
+ // if (this.isShowDayPrescription) {
|
|
3368
|
+ // // if (this.curDayPrescriptions.order_status == 2) {
|
|
3369
|
+ // // this.$message.error('当前处方已经结算,无法保存')
|
|
3370
|
+ // // return
|
|
3371
|
+ // // }
|
|
3372
|
+ // if (this.doctorValue.length <= 0) {
|
|
3373
|
+ // this.$message.error('医生不能为空')
|
|
3374
|
+ // return
|
|
3375
|
+ // }
|
|
3376
|
+ //
|
|
3377
|
+ // if (this.departmentValue.length <= 0) {
|
|
3378
|
+ // this.$message.error('科室不能为空')
|
|
3379
|
+ // return
|
|
3380
|
+ // }
|
|
3381
|
+ //
|
|
3382
|
+ // var str = ''
|
|
3383
|
+ // if (patient_diagnose != '') {
|
|
3384
|
+ // str = this.patient_diagnose.join(',')
|
|
3385
|
+ // }
|
|
3386
|
+ // if (index == 1) {
|
|
3387
|
+ // let params = {
|
|
3388
|
+ // patient_id: this.patientInfo.id,
|
|
3389
|
+ // diagnose: this.diagnose.join(','),
|
|
3390
|
+ // sick_type: this.state1,
|
|
3391
|
+ // sick_history: this.state2,
|
|
3392
|
+ // doctor: this.doctorValue,
|
|
3393
|
+ // department: this.departmentValue,
|
|
3394
|
+ // record_date: this.end_time,
|
|
3395
|
+ // his_patient_id: this.hisPatientInfo.id,
|
|
3396
|
+ // reg_type: this.register_type,
|
|
3397
|
+ // p_type: 2,
|
|
3398
|
+ // patient_diagnose: str
|
|
3399
|
+ // }
|
|
3400
|
+ //
|
|
3401
|
+ // var month_prescriptions = this.deepClone(this.month_prescriptions)
|
|
3402
|
+ //
|
|
3403
|
+ // for (let i = 0; i < month_prescriptions.length; i++) {
|
|
3404
|
+ // if (month_prescriptions[i].advices.length > 0 && month_prescriptions[i].project.length == 0) {
|
|
3405
|
+ // month_prescriptions[i]['type'] = 1
|
|
3406
|
+ // }
|
|
3407
|
+ // if (month_prescriptions[i].advices.length == 0 && month_prescriptions[i].project.length > 0) {
|
|
3408
|
+ // month_prescriptions[i]['type'] = 2
|
|
3409
|
+ // }
|
|
3410
|
+ //
|
|
3411
|
+ // for (let b = 0; b < month_prescriptions[i].advices.length; b++) {
|
|
3412
|
+ // month_prescriptions[i].advices[b].single_dose = month_prescriptions[i].advices[b].single_dose.toString()
|
|
3413
|
+ // month_prescriptions[i].advices[b].prescribing_number = month_prescriptions[i].advices[b].prescribing_number.toString()
|
|
3414
|
+ // month_prescriptions[i].advices[b].retail_price = month_prescriptions[i].advices[b].retail_price.toString()
|
|
3415
|
+ // month_prescriptions[i].advices[b].day = parseInt(month_prescriptions[i].advices[b].day)
|
|
3416
|
+ //
|
|
3417
|
+ // }
|
|
3418
|
+ //
|
|
3419
|
+ // for (let b = 0; b < month_prescriptions[i].project.length; b++) {
|
|
3420
|
+ // month_prescriptions[i].project[b].price = month_prescriptions[i].project[b].price.toString()
|
|
3421
|
+ // month_prescriptions[i].project[b].total = month_prescriptions[i].project[b].total.toString()
|
|
3422
|
+ // month_prescriptions[i].project[b].delivery_way = month_prescriptions[i].project[b].delivery_way.toString()
|
|
3423
|
+ //
|
|
3424
|
+ // }
|
|
3425
|
+ //
|
|
3426
|
+ // for (let b = 0; b < month_prescriptions[i].addition.length; b++) {
|
|
3427
|
+ // month_prescriptions[i].addition[b].id = parseInt(month_prescriptions[i].addition[b].id)
|
|
3428
|
+ // month_prescriptions[i].addition[b].item_id = parseInt(month_prescriptions[i].addition[b].item_id)
|
|
3429
|
+ // month_prescriptions[i].addition[b].price = month_prescriptions[i].addition[b].price.toString()
|
|
3430
|
+ // month_prescriptions[i].addition[b].count = month_prescriptions[i].addition[b].count.toString()
|
|
3431
|
+ // }
|
|
3432
|
+ // }
|
|
3433
|
+ //
|
|
3434
|
+ // let data = {
|
|
3435
|
+ // 'prescriptions': month_prescriptions
|
|
3436
|
+ // }
|
|
3437
|
+ // editHisPrescription(data, params).then(response => {
|
|
3438
|
+ // if (response.data.state == 1) {
|
|
3439
|
+ // this.month_prescriptions = month_prescriptions
|
|
3440
|
+ // this.$message.success('编辑成功')
|
|
3441
|
+ // }
|
|
3442
|
+ // })
|
|
3443
|
+ //
|
|
3444
|
+ // }
|
|
3445
|
+ // }
|
|
3446
|
+ // }
|
3446
|
3447
|
}, judgmentsDrugStock(bby01, bbx01, name, count, isLoading) {
|
3447
|
3448
|
for (let i = 0; i < this.zuobiao_drug.length; i++) {
|
3448
|
3449
|
if (this.zuobiao_drug[i].bby01 == bby01) {
|
|
@@ -3865,8 +3866,27 @@ export default {
|
3865
|
3866
|
|
3866
|
3867
|
comfirm() {
|
3867
|
3868
|
|
|
3869
|
+ if (this.curDrugs.length > 0) {
|
|
3870
|
+ for (let i = 0; i < this.curDrugs.length; i++) {
|
|
3871
|
+ if (this.org_id != 10206 && this.org_id != 0) {
|
|
3872
|
+ if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
|
|
3873
|
+ this.$message.error('该处方属于特病类型处方,开非特病类型的药')
|
|
3874
|
+ return
|
|
3875
|
+ }
|
|
3876
|
+ }
|
|
3877
|
+ }
|
|
3878
|
+ }
|
|
3879
|
+ if (this.teamList.length > 0) {
|
|
3880
|
+ if (this.org_id != 10206 && this.org_id != 0) {
|
|
3881
|
+ for (let i = 0; i < this.teamList.length; i++) {
|
|
3882
|
+ if (this.curPrescriptions.med_type == 14 && this.teamList[i].is_special_diseases != 1) {
|
|
3883
|
+ this.$message.error('该处方属于特病类型处方,请开特病类型的项目')
|
|
3884
|
+ return
|
|
3885
|
+ }
|
|
3886
|
+ }
|
|
3887
|
+ }
|
|
3888
|
+ }
|
3868
|
3889
|
if (this.teamList.length > 0) {
|
3869
|
|
-
|
3870
|
3890
|
let arr = this.teamList
|
3871
|
3891
|
let newArr = []
|
3872
|
3892
|
arr.map(item => {
|
|
@@ -3880,17 +3900,6 @@ export default {
|
3880
|
3900
|
this.teamList = newArr
|
3881
|
3901
|
}
|
3882
|
3902
|
|
3883
|
|
- if (this.curDrugs.length > 0) {
|
3884
|
|
- for (let i = 0; i < this.curDrugs.length; i++) {
|
3885
|
|
- if (this.org_id != 10206 && this.org_id != 0) {
|
3886
|
|
- if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
|
3887
|
|
- this.$message.error('该处方属于特病类型处方,开非特病类型的药')
|
3888
|
|
- return
|
3889
|
|
- }
|
3890
|
|
- }
|
3891
|
|
- }
|
3892
|
|
- }
|
3893
|
|
-
|
3894
|
3903
|
if (this.curStatus == 1 && this.rightTab == 2) {
|
3895
|
3904
|
this.$message.error('该处方是药品,无法添加项目')
|
3896
|
3905
|
this.teamList = []
|
|
@@ -4730,6 +4739,7 @@ export default {
|
4730
|
4739
|
drug: advice[i].drug,
|
4731
|
4740
|
groupno: i,
|
4732
|
4741
|
type:1,
|
|
4742
|
+ is_special_diseases: advice[i].drug.is_special_diseases,
|
4733
|
4743
|
hosp_appr_flag: '1',
|
4734
|
4744
|
execution_state: 2,
|
4735
|
4745
|
is_medicine:0,
|