Browse Source

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

XMLWAN 3 years ago
parent
commit
14783cfb4a

+ 2 - 0
src/xt_pages/outpatientDoctorStation/components/callPrescription.vue View File

346
               addition:tempAddition,
346
               addition:tempAddition,
347
               type:prescription.type,
347
               type:prescription.type,
348
               order_status:0,
348
               order_status:0,
349
+              med_type: parseInt(prescription.med_type)
350
+
349
             };
351
             };
350
             prescriptions.push(obj)
352
             prescriptions.push(obj)
351
           }
353
           }

+ 41 - 6
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

768
                 obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification
768
                 obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification
769
                 obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code
769
                 obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code
770
                 obj['project_name'] = project_month_prescriptions.project[a].project.project_name
770
                 obj['project_name'] = project_month_prescriptions.project[a].project.project_name
771
+                obj['project'] = project_month_prescriptions.project[a].project
772
+
773
+
771
 
774
 
772
               } else if (project_month_prescriptions.project[a].type == 3) {
775
               } else if (project_month_prescriptions.project[a].type == 3) {
773
                 obj['statistical_classification'] = ''
776
                 obj['statistical_classification'] = ''
774
                 obj['medical_code'] = project_month_prescriptions.project[a].good_info.medical_insurance_number
777
                 obj['medical_code'] = project_month_prescriptions.project[a].good_info.medical_insurance_number
775
                 obj['project_name'] = project_month_prescriptions.project[a].good_info.good_name
778
                 obj['project_name'] = project_month_prescriptions.project[a].good_info.good_name
779
+                obj['good_info'] = project_month_prescriptions.project[a].good_info
780
+
776
               }
781
               }
777
 
782
 
778
               // obj['project_name'] = project_month_prescriptions.project[a].project.project_name;
783
               // obj['project_name'] = project_month_prescriptions.project[a].project.project_name;
1095
                       obj['statistical_classification'] = prescription.project[b].project.statistical_classification
1100
                       obj['statistical_classification'] = prescription.project[b].project.statistical_classification
1096
                       obj['medical_code'] = prescription.project[b].project.medical_code
1101
                       obj['medical_code'] = prescription.project[b].project.medical_code
1097
                       obj['project_name'] = prescription.project[b].project.project_name
1102
                       obj['project_name'] = prescription.project[b].project.project_name
1103
+                      obj['project'] = prescription.project[b].project
1098
 
1104
 
1099
                     } else if (prescription.project[b].type == 3) {
1105
                     } else if (prescription.project[b].type == 3) {
1100
                       obj['statistical_classification'] = ''
1106
                       obj['statistical_classification'] = ''
1101
                       obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
1107
                       obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
1102
                       obj['project_name'] = prescription.project[b].good_info.good_name
1108
                       obj['project_name'] = prescription.project[b].good_info.good_name
1109
+                      obj['good_info'] =  prescription.project[b].good_info
1103
                     }
1110
                     }
1104
 
1111
 
1105
                     tempProject.push(obj)
1112
                     tempProject.push(obj)
1212
                       obj['statistical_classification'] = prescription.project[b].project.statistical_classification
1219
                       obj['statistical_classification'] = prescription.project[b].project.statistical_classification
1213
                       obj['medical_code'] = prescription.project[b].project.medical_code
1220
                       obj['medical_code'] = prescription.project[b].project.medical_code
1214
                       obj['project_name'] = prescription.project[b].project.project_name
1221
                       obj['project_name'] = prescription.project[b].project.project_name
1222
+                      obj['project'] = prescription.project[b].project
1223
+
1215
 
1224
 
1216
                     } else if (prescription.project[b].type == 3) {
1225
                     } else if (prescription.project[b].type == 3) {
1217
                       obj['statistical_classification'] = ''
1226
                       obj['statistical_classification'] = ''
1218
                       obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
1227
                       obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
1219
                       obj['project_name'] = prescription.project[b].good_info.good_name
1228
                       obj['project_name'] = prescription.project[b].good_info.good_name
1229
+                      obj['good_info'] = prescription.project[b].good_info
1230
+
1220
                     }
1231
                     }
1221
 
1232
 
1222
                     tempProject.push(obj)
1233
                     tempProject.push(obj)
1299
             ':' + (min < 10 ? '0' + min : min)
1310
             ':' + (min < 10 ? '0' + min : min)
1300
           this.prescriptions[i]['pre_time'] = nowTime
1311
           this.prescriptions[i]['pre_time'] = nowTime
1301
 
1312
 
1302
-          this.prescriptions[i]['med_type'] = 14
1303
-
1304
           this.prescriptions[i].name = '处方' + (i + 1)
1313
           this.prescriptions[i].name = '处方' + (i + 1)
1305
           if (i == 0) {
1314
           if (i == 0) {
1306
             if (this.prescriptions[0].advices.length > 0 && this.prescriptions[0].project.length == 0) {
1315
             if (this.prescriptions[0].advices.length > 0 && this.prescriptions[0].project.length == 0) {
2216
             }
2225
             }
2217
           }
2226
           }
2218
           if (index == 1) {
2227
           if (index == 1) {
2228
+
2229
+            for (let i = 0; i < this.prescriptions.length; i++) {
2230
+              for(let b = 0; b < this.prescriptions[i].advices.length; b++){
2231
+                if (this.prescriptions[i].med_type == 14 && this.prescriptions[i].advices[b].drug.is_special_diseases != 1) {
2232
+                  this.$message.error(this.prescriptions[i].name.toString() +"属于特病类型处方,开非特病类型的药")
2233
+                  return
2234
+                }
2235
+              }
2236
+              for(let c = 0; c < this.prescriptions[i].project.length; c++){
2237
+                if (this.prescriptions[i].med_type == 14 && this.prescriptions[i].project[c].type == 2  && this.prescriptions[i].project[c].project.disease_directory != 1) {
2238
+                  this.$message.error(this.prescriptions[i].name.toString() +"属于特病类型处方,请开特病类型的项目")
2239
+                  return
2240
+                }
2241
+
2242
+                if (this.prescriptions[i].med_type == 14 && this.prescriptions[i].project[c].type == 3  && this.prescriptions[i].project[c].good_info.is_special_diseases != 1) {
2243
+                  this.$message.error(this.prescriptions[i].name.toString() +"属于特病类型处方,请开特病类型的耗材")
2244
+                  return
2245
+                }
2246
+              }
2247
+            }
2248
+
2249
+
2219
             for (let i = 0; i < this.prescriptions.length; i++) {
2250
             for (let i = 0; i < this.prescriptions.length; i++) {
2220
               if (this.prescriptions[i].advices.length == 0 && this.prescriptions[i].project.length == 0) {
2251
               if (this.prescriptions[i].advices.length == 0 && this.prescriptions[i].project.length == 0) {
2221
                 this.$message.error('处方内容不能为空')
2252
                 this.$message.error('处方内容不能为空')
2924
                 unit: project[i].unit,
2955
                 unit: project[i].unit,
2925
                 type: 2,
2956
                 type: 2,
2926
                 total: project[i].total,
2957
                 total: project[i].total,
2927
-                is_special_diseases: project[i].disease_directory
2958
+                is_special_diseases: project[i].disease_directory,
2959
+                project: project[i],
2928
               }
2960
               }
2929
 
2961
 
2930
               this.tabProject.push(obj)
2962
               this.tabProject.push(obj)
2947
                 unit: this.getGoodUnit(good_info[i].good_unit),
2979
                 unit: this.getGoodUnit(good_info[i].good_unit),
2948
                 type: 3,
2980
                 type: 3,
2949
                 total: good_info[i].total,
2981
                 total: good_info[i].total,
2950
-                is_special_diseases: good_info[i].is_special_diseases
2982
+                is_special_diseases: good_info[i].is_special_diseases,
2983
+                good_info: good_info[i],
2951
               }
2984
               }
2952
               this.tabProject.push(obj)
2985
               this.tabProject.push(obj)
2953
             }
2986
             }
3046
                     unit: project[i].project.unit,
3079
                     unit: project[i].project.unit,
3047
                     type: project[i].type,
3080
                     type: project[i].type,
3048
                     is_special_diseases: project[i].project.disease_directory,
3081
                     is_special_diseases: project[i].project.disease_directory,
3049
-                    team_id: team_id
3082
+                    team_id: team_id,
3083
+                    project:project[i].project,
3050
                   }
3084
                   }
3051
                   if (obj.cus_total == 0 || obj.cus_total == undefined) {
3085
                   if (obj.cus_total == 0 || obj.cus_total == undefined) {
3052
                     obj.cus_total = 1
3086
                     obj.cus_total = 1
3077
                     unit: project[i].good_info.unit,
3111
                     unit: project[i].good_info.unit,
3078
                     type: project[i].type,
3112
                     type: project[i].type,
3079
                     is_special_diseases: project[i].good_info.is_special_diseases,
3113
                     is_special_diseases: project[i].good_info.is_special_diseases,
3080
-                    team_id: team_id
3114
+                    team_id: team_id,
3115
+                    good_info: project[i].good_info,
3081
 
3116
 
3082
                   }
3117
                   }
3083
                   if (obj.cus_total == 0 || obj.cus_total == undefined) {
3118
                   if (obj.cus_total == 0 || obj.cus_total == undefined) {

+ 1 - 0
src/xt_pages/outpatientDoctorStation/components/nextOrLastPrescription.vue View File

397
               project: tempProject,
397
               project: tempProject,
398
               addition:tempAddition,
398
               addition:tempAddition,
399
               order_status:0,
399
               order_status:0,
400
+              med_type: parseInt(prescription.med_type)
400
               // type: type,
401
               // type: type,
401
             };
402
             };
402
             prescriptions.push(obj)
403
             prescriptions.push(obj)

+ 123 - 94
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

295
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
295
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
296
   import deskPrescription from './components/deskPrescription'
296
   import deskPrescription from './components/deskPrescription'
297
   import deskRecord from './components/deskRecord'
297
   import deskRecord from './components/deskRecord'
298
-  import { createCaseHistory, getPatientInfo, getSchedulePatientList,getMonthHisPateintInfo } from '@/api/his/his'
298
+  import { createCaseHistory, getMonthHisPateintInfo, getPatientInfo, getSchedulePatientList } from '@/api/his/his'
299
   import { getDictionaryDataConfig } from '@/utils/data'
299
   import { getDictionaryDataConfig } from '@/utils/data'
300
   import medicalRecord from './components/medicalRecord'
300
   import medicalRecord from './components/medicalRecord'
301
   import saveRecordTemplate from './components/saveRecordTemplate'
301
   import saveRecordTemplate from './components/saveRecordTemplate'
918
                 obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification
918
                 obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification
919
                 obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code
919
                 obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code
920
                 obj['project_name'] = project_month_prescriptions.project[a].project.project_name
920
                 obj['project_name'] = project_month_prescriptions.project[a].project.project_name
921
+                obj['project'] =  project_month_prescriptions.project[a].project
922
+
921
 
923
 
922
               } else if (project_month_prescriptions.project[a].type == 3) {
924
               } else if (project_month_prescriptions.project[a].type == 3) {
923
                 obj['statistical_classification'] = ''
925
                 obj['statistical_classification'] = ''
924
                 obj['medical_code'] = project_month_prescriptions.project[a].good_info.medical_insurance_number
926
                 obj['medical_code'] = project_month_prescriptions.project[a].good_info.medical_insurance_number
925
                 obj['project_name'] = project_month_prescriptions.project[a].good_info.good_name
927
                 obj['project_name'] = project_month_prescriptions.project[a].good_info.good_name
928
+                obj['good_info'] =  project_month_prescriptions.project[a].good_info
929
+
926
 
930
 
927
               }
931
               }
928
 
932
 
1354
                     id: prescription.advices[b].drug_id,
1358
                     id: prescription.advices[b].drug_id,
1355
                     drug: prescription.advices[b].drug,
1359
                     drug: prescription.advices[b].drug,
1356
                     groupno: prescription.advices[b].groupno,
1360
                     groupno: prescription.advices[b].groupno,
1357
-                    hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString(),
1361
+                    hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString()
1358
 
1362
 
1359
                   }
1363
                   }
1360
                   tempAdvice.push(obj)
1364
                   tempAdvice.push(obj)
1376
                     remark: prescription.project[b].remark,
1380
                     remark: prescription.project[b].remark,
1377
                     medical_code: prescription.project[b].project.medical_code,
1381
                     medical_code: prescription.project[b].project.medical_code,
1378
                     unit: prescription.project[b].project.unit,
1382
                     unit: prescription.project[b].project.unit,
1379
-                    type: prescription.project[b].type,
1383
+                    type: prescription.project[b].type
1380
 
1384
 
1381
                   }
1385
                   }
1382
 
1386
 
1384
                     obj['statistical_classification'] = prescription.project[b].project.statistical_classification
1388
                     obj['statistical_classification'] = prescription.project[b].project.statistical_classification
1385
                     obj['medical_code'] = prescription.project[b].project.medical_code
1389
                     obj['medical_code'] = prescription.project[b].project.medical_code
1386
                     obj['project_name'] = prescription.project[b].project.project_name
1390
                     obj['project_name'] = prescription.project[b].project.project_name
1391
+                    obj['project'] = prescription.project[b].project
1387
 
1392
 
1388
                   } else if (prescription.project[b].type == 3) {
1393
                   } else if (prescription.project[b].type == 3) {
1389
                     obj['statistical_classification'] = ''
1394
                     obj['statistical_classification'] = ''
1390
                     obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
1395
                     obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
1391
                     obj['project_name'] = prescription.project[b].good_info.good_name
1396
                     obj['project_name'] = prescription.project[b].good_info.good_name
1397
+                    obj['good_info'] = prescription.project[b].good_info
1398
+
1392
                   }
1399
                   }
1393
                   tempProject.push(obj)
1400
                   tempProject.push(obj)
1394
                 }
1401
                 }
1437
 
1444
 
1438
               if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
1445
               if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
1439
                 for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
1446
                 for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
1440
-                  var prescription = response.data.data.sch_prescriptions[i];
1447
+                  var prescription = response.data.data.sch_prescriptions[i]
1441
                   for (let b = 0; b < prescription.advices.length; b++) {
1448
                   for (let b = 0; b < prescription.advices.length; b++) {
1442
                     console.log(prescription.advices[b].drug.is_special_diseases)
1449
                     console.log(prescription.advices[b].drug.is_special_diseases)
1443
-                    if (prescription.med_type == "14" && prescription.advices[b].drug.is_special_diseases != 1) {
1444
-                      prescription.advices.splice(b--,1)
1450
+                    if (prescription.med_type == '14' && prescription.advices[b].drug.is_special_diseases != 1) {
1451
+                      prescription.advices.splice(b--, 1)
1445
                     }
1452
                     }
1446
                   }
1453
                   }
1447
                   for (let b = 0; b < prescription.project.length; b++) {
1454
                   for (let b = 0; b < prescription.project.length; b++) {
1448
-                    if(prescription.project[b].type == 2){
1449
-                      if (prescription.med_type == "14" && prescription.project[b].project.disease_directory != 1) {
1450
-                        prescription.project.splice(b--,1)
1455
+                    if (prescription.project[b].type == 2) {
1456
+                      if (prescription.med_type == '14' && prescription.project[b].project.disease_directory != 1) {
1457
+                        prescription.project.splice(b--, 1)
1451
                       }
1458
                       }
1452
-                    }else if(prescription.project[b].type == 3){
1453
-                      if (prescription.med_type == "14" && prescription.project[b].good_info.is_special_diseases != 1) {
1454
-                        prescription.project.splice(b--,1)
1459
+                    } else if (prescription.project[b].type == 3) {
1460
+                      if (prescription.med_type == '14' && prescription.project[b].good_info.is_special_diseases != 1) {
1461
+                        prescription.project.splice(b--, 1)
1455
                       }
1462
                       }
1456
                     }
1463
                     }
1457
                   }
1464
                   }
1458
                 }
1465
                 }
1459
 
1466
 
1460
-
1461
-
1462
-
1463
                 for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
1467
                 for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
1464
                   var prescription = response.data.data.sch_prescriptions[i]
1468
                   var prescription = response.data.data.sch_prescriptions[i]
1465
                   let tempAdvice = []
1469
                   let tempAdvice = []
1485
                       id: prescription.advices[b].drug_id,
1489
                       id: prescription.advices[b].drug_id,
1486
                       drug: prescription.advices[b].drug,
1490
                       drug: prescription.advices[b].drug,
1487
                       groupno: index,
1491
                       groupno: index,
1488
-                      hosp_appr_flag:"1",
1489
-
1492
+                      hosp_appr_flag: '1'
1490
 
1493
 
1491
                     }
1494
                     }
1492
 
1495
 
1531
                       remark: prescription.project[b].remark,
1534
                       remark: prescription.project[b].remark,
1532
                       medical_code: prescription.project[b].project.medical_code,
1535
                       medical_code: prescription.project[b].project.medical_code,
1533
                       unit: prescription.project[b].project.unit,
1536
                       unit: prescription.project[b].project.unit,
1534
-                      type: prescription.project[b].type
1537
+                      type: prescription.project[b].type,
1538
+
1539
+
1535
 
1540
 
1536
                     }
1541
                     }
1537
 
1542
 
1540
                       obj['medical_code'] = prescription.project[b].project.medical_code
1545
                       obj['medical_code'] = prescription.project[b].project.medical_code
1541
                       obj['project_name'] = prescription.project[b].project.project_name
1546
                       obj['project_name'] = prescription.project[b].project.project_name
1542
                       obj['price'] = prescription.project[b].project.price
1547
                       obj['price'] = prescription.project[b].project.price
1548
+                      obj['project'] =  prescription.project[b].project
1543
 
1549
 
1544
                     } else if (prescription.project[b].type == 3) {
1550
                     } else if (prescription.project[b].type == 3) {
1545
                       obj['statistical_classification'] = ''
1551
                       obj['statistical_classification'] = ''
1546
                       obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
1552
                       obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
1547
                       obj['project_name'] = prescription.project[b].good_info.good_name
1553
                       obj['project_name'] = prescription.project[b].good_info.good_name
1548
                       obj['price'] = prescription.project[b].good_info.packing_price
1554
                       obj['price'] = prescription.project[b].good_info.packing_price
1549
-
1555
+                      obj['good_info'] =  prescription.project[b].good_info
1550
                     }
1556
                     }
1551
                     tempProject.push(obj)
1557
                     tempProject.push(obj)
1552
                   }
1558
                   }
1737
                           id: prescription.advices[b].drug_id,
1743
                           id: prescription.advices[b].drug_id,
1738
                           drug: prescription.advices[b].drug,
1744
                           drug: prescription.advices[b].drug,
1739
                           groupno: prescription.advices[b].groupno,
1745
                           groupno: prescription.advices[b].groupno,
1740
-                          hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString(),
1741
-
1746
+                          hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString()
1742
 
1747
 
1743
                         }
1748
                         }
1744
                         tempAdvice.push(obj)
1749
                         tempAdvice.push(obj)
1767
                           obj['statistical_classification'] = prescription.project[b].project.statistical_classification
1772
                           obj['statistical_classification'] = prescription.project[b].project.statistical_classification
1768
                           obj['medical_code'] = prescription.project[b].project.medical_code
1773
                           obj['medical_code'] = prescription.project[b].project.medical_code
1769
                           obj['project_name'] = prescription.project[b].project.project_name
1774
                           obj['project_name'] = prescription.project[b].project.project_name
1775
+                          obj['project'] =  prescription.project[b].project
1770
 
1776
 
1771
                         } else if (prescription.project[b].type == 3) {
1777
                         } else if (prescription.project[b].type == 3) {
1772
                           obj['statistical_classification'] = ''
1778
                           obj['statistical_classification'] = ''
1773
                           obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
1779
                           obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
1774
                           obj['project_name'] = prescription.project[b].good_info.good_name
1780
                           obj['project_name'] = prescription.project[b].good_info.good_name
1781
+                          obj['good_info'] =  prescription.project[b].good_info
1782
+
1775
                         }
1783
                         }
1776
                         tempProject.push(obj)
1784
                         tempProject.push(obj)
1777
                       }
1785
                       }
1821
                     if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
1829
                     if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
1822
 
1830
 
1823
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
1831
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
1824
-                        var prescription = response.data.data.sch_prescriptions[i];
1832
+                        var prescription = response.data.data.sch_prescriptions[i]
1825
                         for (let b = 0; b < prescription.advices.length; b++) {
1833
                         for (let b = 0; b < prescription.advices.length; b++) {
1826
                           console.log(prescription.advices[b].drug.is_special_diseases)
1834
                           console.log(prescription.advices[b].drug.is_special_diseases)
1827
-                          if (prescription.med_type == "14" && prescription.advices[b].drug.is_special_diseases != 1) {
1828
-                            prescription.advices.splice(b--,1)
1835
+                          if (prescription.med_type == '14' && prescription.advices[b].drug.is_special_diseases != 1) {
1836
+                            prescription.advices.splice(b--, 1)
1829
                           }
1837
                           }
1830
                         }
1838
                         }
1831
                         for (let b = 0; b < prescription.project.length; b++) {
1839
                         for (let b = 0; b < prescription.project.length; b++) {
1832
-                          if(prescription.project[b].type == 2){
1833
-                            if (prescription.med_type == "14" && prescription.project[b].project.disease_directory != 1) {
1834
-                              prescription.project.splice(b--,1)
1840
+                          if (prescription.project[b].type == 2) {
1841
+                            if (prescription.med_type == '14' && prescription.project[b].project.disease_directory != 1) {
1842
+                              prescription.project.splice(b--, 1)
1835
                             }
1843
                             }
1836
-                          }else if(prescription.project[b].type == 3){
1837
-                            if (prescription.med_type == "14" && prescription.project[b].good_info.is_special_diseases != 1) {
1838
-                              prescription.project.splice(b--,1)
1844
+                          } else if (prescription.project[b].type == 3) {
1845
+                            if (prescription.med_type == '14' && prescription.project[b].good_info.is_special_diseases != 1) {
1846
+                              prescription.project.splice(b--, 1)
1839
                             }
1847
                             }
1840
                           }
1848
                           }
1841
                         }
1849
                         }
1842
                       }
1850
                       }
1843
 
1851
 
1844
-
1845
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
1852
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
1846
                         var prescription = response.data.data.sch_prescriptions[i]
1853
                         var prescription = response.data.data.sch_prescriptions[i]
1847
                         let tempAdvice = []
1854
                         let tempAdvice = []
1867
                             id: prescription.advices[b].drug_id,
1874
                             id: prescription.advices[b].drug_id,
1868
                             drug: prescription.advices[b].drug,
1875
                             drug: prescription.advices[b].drug,
1869
                             groupno: index,
1876
                             groupno: index,
1870
-                            hosp_appr_flag: "1",
1871
-
1877
+                            hosp_appr_flag: '1'
1872
 
1878
 
1873
                           }
1879
                           }
1874
                           console.log('看看数据1:')
1880
                           console.log('看看数据1:')
1922
                             obj['medical_code'] = prescription.project[b].project.medical_code
1928
                             obj['medical_code'] = prescription.project[b].project.medical_code
1923
                             obj['project_name'] = prescription.project[b].project.project_name
1929
                             obj['project_name'] = prescription.project[b].project.project_name
1924
                             obj['price'] = prescription.project[b].project.price
1930
                             obj['price'] = prescription.project[b].project.price
1931
+                            obj['project'] =  prescription.project[b].project
1932
+
1925
 
1933
 
1926
                           } else if (prescription.project[b].type == 3) {
1934
                           } else if (prescription.project[b].type == 3) {
1927
                             obj['statistical_classification'] = ''
1935
                             obj['statistical_classification'] = ''
1928
                             obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
1936
                             obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
1929
                             obj['project_name'] = prescription.project[b].good_info.good_name
1937
                             obj['project_name'] = prescription.project[b].good_info.good_name
1930
                             obj['price'] = prescription.project[b].good_info.packing_price
1938
                             obj['price'] = prescription.project[b].good_info.packing_price
1939
+                            obj['good_info'] =  prescription.project[b].good_info
1940
+
1931
 
1941
 
1932
                           }
1942
                           }
1933
                           tempProject.push(obj)
1943
                           tempProject.push(obj)
2216
                           id: prescription.advices[b].drug_id,
2226
                           id: prescription.advices[b].drug_id,
2217
                           drug: prescription.advices[b].drug,
2227
                           drug: prescription.advices[b].drug,
2218
                           groupno: prescription.advices[b].groupno,
2228
                           groupno: prescription.advices[b].groupno,
2219
-                          hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString(),
2220
-
2229
+                          hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString()
2221
 
2230
 
2222
                         }
2231
                         }
2223
                         tempAdvice.push(obj)
2232
                         tempAdvice.push(obj)
2246
                           obj['statistical_classification'] = prescription.project[b].project.statistical_classification
2255
                           obj['statistical_classification'] = prescription.project[b].project.statistical_classification
2247
                           obj['medical_code'] = prescription.project[b].project.medical_code
2256
                           obj['medical_code'] = prescription.project[b].project.medical_code
2248
                           obj['project_name'] = prescription.project[b].project.project_name
2257
                           obj['project_name'] = prescription.project[b].project.project_name
2258
+                          obj['project'] =  prescription.project[b].project
2259
+
2249
 
2260
 
2250
                         } else if (prescription.project[b].type == 3) {
2261
                         } else if (prescription.project[b].type == 3) {
2251
                           obj['statistical_classification'] = ''
2262
                           obj['statistical_classification'] = ''
2252
                           obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
2263
                           obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
2253
                           obj['project_name'] = prescription.project[b].good_info.good_name
2264
                           obj['project_name'] = prescription.project[b].good_info.good_name
2265
+                          obj['good_info'] =  prescription.project[b].good_info
2266
+
2254
                         }
2267
                         }
2255
                         tempProject.push(obj)
2268
                         tempProject.push(obj)
2256
                       }
2269
                       }
2292
 
2305
 
2293
                     if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
2306
                     if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
2294
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
2307
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
2295
-                        var prescription = response.data.data.sch_prescriptions[i];
2308
+                        var prescription = response.data.data.sch_prescriptions[i]
2296
                         for (let b = 0; b < prescription.advices.length; b++) {
2309
                         for (let b = 0; b < prescription.advices.length; b++) {
2297
                           console.log(prescription.advices[b].drug.is_special_diseases)
2310
                           console.log(prescription.advices[b].drug.is_special_diseases)
2298
-                          if (prescription.med_type == "14" && prescription.advices[b].drug.is_special_diseases != 1) {
2299
-                            prescription.advices.splice(b--,1)
2311
+                          if (prescription.med_type == '14' && prescription.advices[b].drug.is_special_diseases != 1) {
2312
+                            prescription.advices.splice(b--, 1)
2300
                           }
2313
                           }
2301
                         }
2314
                         }
2302
                         for (let b = 0; b < prescription.project.length; b++) {
2315
                         for (let b = 0; b < prescription.project.length; b++) {
2303
-                          if(prescription.project[b].type == 2){
2304
-                            if (prescription.med_type == "14" && prescription.project[b].project.disease_directory != 1) {
2305
-                              prescription.project.splice(b--,1)
2316
+                          if (prescription.project[b].type == 2) {
2317
+                            if (prescription.med_type == '14' && prescription.project[b].project.disease_directory != 1) {
2318
+                              prescription.project.splice(b--, 1)
2306
                             }
2319
                             }
2307
-                          }else if(prescription.project[b].type == 3){
2308
-                            if (prescription.med_type == "14" && prescription.project[b].good_info.is_special_diseases != 1) {
2309
-                              prescription.project.splice(b--,1)
2320
+                          } else if (prescription.project[b].type == 3) {
2321
+                            if (prescription.med_type == '14' && prescription.project[b].good_info.is_special_diseases != 1) {
2322
+                              prescription.project.splice(b--, 1)
2310
                             }
2323
                             }
2311
                           }
2324
                           }
2312
                         }
2325
                         }
2313
                       }
2326
                       }
2314
 
2327
 
2315
-
2316
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
2328
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
2317
                         var prescription = response.data.data.sch_prescriptions[i]
2329
                         var prescription = response.data.data.sch_prescriptions[i]
2318
                         let tempAdvice = []
2330
                         let tempAdvice = []
2338
                             id: prescription.advices[b].drug_id,
2350
                             id: prescription.advices[b].drug_id,
2339
                             drug: prescription.advices[b].drug,
2351
                             drug: prescription.advices[b].drug,
2340
                             groupno: index,
2352
                             groupno: index,
2341
-                            hosp_appr_flag: "1",
2342
-
2343
-
2353
+                            hosp_appr_flag: '1'
2344
 
2354
 
2345
                           }
2355
                           }
2346
                           console.log('看看数据2:')
2356
                           console.log('看看数据2:')
2391
                             obj['medical_code'] = prescription.project[b].project.medical_code
2401
                             obj['medical_code'] = prescription.project[b].project.medical_code
2392
                             obj['project_name'] = prescription.project[b].project.project_name
2402
                             obj['project_name'] = prescription.project[b].project.project_name
2393
                             obj['price'] = prescription.project[b].project.price
2403
                             obj['price'] = prescription.project[b].project.price
2404
+                            obj['project'] =  prescription.project[b].project
2405
+
2394
 
2406
 
2395
                           } else if (prescription.project[b].type == 3) {
2407
                           } else if (prescription.project[b].type == 3) {
2396
                             obj['statistical_classification'] = ''
2408
                             obj['statistical_classification'] = ''
2397
                             obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
2409
                             obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
2398
                             obj['project_name'] = prescription.project[b].good_info.good_name
2410
                             obj['project_name'] = prescription.project[b].good_info.good_name
2399
                             obj['price'] = prescription.project[b].good_info.packing_price
2411
                             obj['price'] = prescription.project[b].good_info.packing_price
2412
+                            obj['good_info'] =  prescription.project[b].good_info
2413
+
2400
 
2414
 
2401
                           }
2415
                           }
2402
                           tempProject.push(obj)
2416
                           tempProject.push(obj)
2675
                         id: prescription.advices[b].drug_id,
2689
                         id: prescription.advices[b].drug_id,
2676
                         drug: prescription.advices[b].drug,
2690
                         drug: prescription.advices[b].drug,
2677
                         groupno: prescription.advices[b].groupno,
2691
                         groupno: prescription.advices[b].groupno,
2678
-                        hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString(),
2679
-
2692
+                        hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString()
2680
 
2693
 
2681
                       }
2694
                       }
2682
                       tempAdvice.push(obj)
2695
                       tempAdvice.push(obj)
2705
                         obj['statistical_classification'] = prescription.project[b].project.statistical_classification
2718
                         obj['statistical_classification'] = prescription.project[b].project.statistical_classification
2706
                         obj['medical_code'] = prescription.project[b].project.medical_code
2719
                         obj['medical_code'] = prescription.project[b].project.medical_code
2707
                         obj['project_name'] = prescription.project[b].project.project_name
2720
                         obj['project_name'] = prescription.project[b].project.project_name
2721
+                        obj['project'] =  prescription.project[b].project
2722
+
2708
 
2723
 
2709
                       } else if (prescription.project[b].type == 3) {
2724
                       } else if (prescription.project[b].type == 3) {
2710
                         obj['statistical_classification'] = ''
2725
                         obj['statistical_classification'] = ''
2711
                         obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
2726
                         obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
2712
                         obj['project_name'] = prescription.project[b].good_info.good_name
2727
                         obj['project_name'] = prescription.project[b].good_info.good_name
2728
+                        obj['good_info'] =  prescription.project[b].good_info
2729
+
2713
                       }
2730
                       }
2714
                       tempProject.push(obj)
2731
                       tempProject.push(obj)
2715
                     }
2732
                     }
2751
 
2768
 
2752
                   if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
2769
                   if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
2753
                     for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
2770
                     for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
2754
-                      var prescription = response.data.data.sch_prescriptions[i];
2771
+                      var prescription = response.data.data.sch_prescriptions[i]
2755
                       for (let b = 0; b < prescription.advices.length; b++) {
2772
                       for (let b = 0; b < prescription.advices.length; b++) {
2756
                         console.log(prescription.advices[b].drug.is_special_diseases)
2773
                         console.log(prescription.advices[b].drug.is_special_diseases)
2757
-                        if (prescription.med_type == "14" && prescription.advices[b].drug.is_special_diseases != 1) {
2758
-                          prescription.advices.splice(b--,1)
2774
+                        if (prescription.med_type == '14' && prescription.advices[b].drug.is_special_diseases != 1) {
2775
+                          prescription.advices.splice(b--, 1)
2759
                         }
2776
                         }
2760
                       }
2777
                       }
2761
                       for (let b = 0; b < prescription.project.length; b++) {
2778
                       for (let b = 0; b < prescription.project.length; b++) {
2762
-                        if(prescription.project[b].type == 2){
2763
-                          if (prescription.med_type == "14" && prescription.project[b].project.disease_directory != 1) {
2764
-                            prescription.project.splice(b--,1)
2779
+                        if (prescription.project[b].type == 2) {
2780
+                          if (prescription.med_type == '14' && prescription.project[b].project.disease_directory != 1) {
2781
+                            prescription.project.splice(b--, 1)
2765
                           }
2782
                           }
2766
-                        }else if(prescription.project[b].type == 3){
2767
-                          if (prescription.med_type == "14" && prescription.project[b].good_info.is_special_diseases != 1) {
2768
-                            prescription.project.splice(b--,1)
2783
+                        } else if (prescription.project[b].type == 3) {
2784
+                          if (prescription.med_type == '14' && prescription.project[b].good_info.is_special_diseases != 1) {
2785
+                            prescription.project.splice(b--, 1)
2769
                           }
2786
                           }
2770
                         }
2787
                         }
2771
                       }
2788
                       }
2772
                     }
2789
                     }
2773
 
2790
 
2774
-
2775
                     for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
2791
                     for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
2776
                       var prescription = response.data.data.sch_prescriptions[i]
2792
                       var prescription = response.data.data.sch_prescriptions[i]
2777
                       let tempAdvice = []
2793
                       let tempAdvice = []
2797
                           id: prescription.advices[b].drug_id,
2813
                           id: prescription.advices[b].drug_id,
2798
                           drug: prescription.advices[b].drug,
2814
                           drug: prescription.advices[b].drug,
2799
                           groupno: index,
2815
                           groupno: index,
2800
-                          hosp_appr_flag: "1",
2816
+                          hosp_appr_flag: '1'
2801
 
2817
 
2802
                         }
2818
                         }
2803
                         console.log('看看数据3:')
2819
                         console.log('看看数据3:')
2848
                           obj['medical_code'] = prescription.project[b].project.medical_code
2864
                           obj['medical_code'] = prescription.project[b].project.medical_code
2849
                           obj['project_name'] = prescription.project[b].project.project_name
2865
                           obj['project_name'] = prescription.project[b].project.project_name
2850
                           obj['price'] = prescription.project[b].project.price
2866
                           obj['price'] = prescription.project[b].project.price
2867
+                          obj['project'] =  prescription.project[b].project
2868
+
2851
 
2869
 
2852
                         } else if (prescription.project[b].type == 3) {
2870
                         } else if (prescription.project[b].type == 3) {
2853
                           obj['statistical_classification'] = ''
2871
                           obj['statistical_classification'] = ''
2854
                           obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
2872
                           obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
2855
                           obj['project_name'] = prescription.project[b].good_info.good_name
2873
                           obj['project_name'] = prescription.project[b].good_info.good_name
2856
                           obj['price'] = prescription.project[b].good_info.packing_price
2874
                           obj['price'] = prescription.project[b].good_info.packing_price
2875
+                          obj['good_info'] =  prescription.project[b].good_info
2876
+
2857
 
2877
 
2858
                         }
2878
                         }
2859
                         tempProject.push(obj)
2879
                         tempProject.push(obj)
3030
           }
3050
           }
3031
         } else {
3051
         } else {
3032
 
3052
 
3033
-
3034
           var nowDate = new Date()
3053
           var nowDate = new Date()
3035
           var nowYear = nowDate.getFullYear()
3054
           var nowYear = nowDate.getFullYear()
3036
           var nowMonth = nowDate.getMonth() + 1
3055
           var nowMonth = nowDate.getMonth() + 1
3095
               'p_type': 2
3114
               'p_type': 2
3096
             }
3115
             }
3097
 
3116
 
3098
-
3099
-            if(this.current_tab == "day"){
3117
+            if (this.current_tab == 'day') {
3100
 
3118
 
3101
               getPatientInfo(params).then(response => {
3119
               getPatientInfo(params).then(response => {
3102
                 if (response.data.state == 0) {
3120
                 if (response.data.state == 0) {
3194
                           id: prescription.advices[b].drug_id,
3212
                           id: prescription.advices[b].drug_id,
3195
                           drug: prescription.advices[b].drug,
3213
                           drug: prescription.advices[b].drug,
3196
                           groupno: prescription.advices[b].groupno,
3214
                           groupno: prescription.advices[b].groupno,
3197
-                          hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString(),
3198
-
3215
+                          hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString()
3199
 
3216
 
3200
                         }
3217
                         }
3201
                         tempAdvice.push(obj)
3218
                         tempAdvice.push(obj)
3224
                           obj['statistical_classification'] = prescription.project[b].project.statistical_classification
3241
                           obj['statistical_classification'] = prescription.project[b].project.statistical_classification
3225
                           obj['medical_code'] = prescription.project[b].project.medical_code
3242
                           obj['medical_code'] = prescription.project[b].project.medical_code
3226
                           obj['project_name'] = prescription.project[b].project.project_name
3243
                           obj['project_name'] = prescription.project[b].project.project_name
3244
+                          obj['project'] =  prescription.project[b].project
3245
+
3227
 
3246
 
3228
                         } else if (prescription.project[b].type == 3) {
3247
                         } else if (prescription.project[b].type == 3) {
3229
                           obj['statistical_classification'] = ''
3248
                           obj['statistical_classification'] = ''
3230
                           obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
3249
                           obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
3231
                           obj['project_name'] = prescription.project[b].good_info.good_name
3250
                           obj['project_name'] = prescription.project[b].good_info.good_name
3251
+                          obj['good_info'] =  prescription.project[b].good_info
3252
+
3232
                         }
3253
                         }
3233
                         tempProject.push(obj)
3254
                         tempProject.push(obj)
3234
                       }
3255
                       }
3277
 
3298
 
3278
                     if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
3299
                     if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
3279
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
3300
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
3280
-                        var prescription = response.data.data.sch_prescriptions[i];
3301
+                        var prescription = response.data.data.sch_prescriptions[i]
3281
                         for (let b = 0; b < prescription.advices.length; b++) {
3302
                         for (let b = 0; b < prescription.advices.length; b++) {
3282
                           console.log(prescription.advices[b].drug.is_special_diseases)
3303
                           console.log(prescription.advices[b].drug.is_special_diseases)
3283
-                          if (prescription.med_type == "14" && prescription.advices[b].drug.is_special_diseases != 1) {
3284
-                            prescription.advices.splice(b--,1)
3304
+                          if (prescription.med_type == '14' && prescription.advices[b].drug.is_special_diseases != 1) {
3305
+                            prescription.advices.splice(b--, 1)
3285
                           }
3306
                           }
3286
                         }
3307
                         }
3287
                         for (let b = 0; b < prescription.project.length; b++) {
3308
                         for (let b = 0; b < prescription.project.length; b++) {
3288
-                          if(prescription.project[b].type == 2){
3289
-                            if (prescription.med_type == "14" && prescription.project[b].project.disease_directory != 1) {
3290
-                              prescription.project.splice(b--,1)
3309
+                          if (prescription.project[b].type == 2) {
3310
+                            if (prescription.med_type == '14' && prescription.project[b].project.disease_directory != 1) {
3311
+                              prescription.project.splice(b--, 1)
3291
                             }
3312
                             }
3292
-                          }else if(prescription.project[b].type == 3){
3293
-                            if (prescription.med_type == "14" && prescription.project[b].good_info.is_special_diseases != 1) {
3294
-                              prescription.project.splice(b--,1)
3313
+                          } else if (prescription.project[b].type == 3) {
3314
+                            if (prescription.med_type == '14' && prescription.project[b].good_info.is_special_diseases != 1) {
3315
+                              prescription.project.splice(b--, 1)
3295
                             }
3316
                             }
3296
                           }
3317
                           }
3297
                         }
3318
                         }
3298
                       }
3319
                       }
3299
 
3320
 
3300
-
3301
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
3321
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
3302
                         var prescription = response.data.data.sch_prescriptions[i]
3322
                         var prescription = response.data.data.sch_prescriptions[i]
3303
                         let tempAdvice = []
3323
                         let tempAdvice = []
3323
                             id: prescription.advices[b].drug_id,
3343
                             id: prescription.advices[b].drug_id,
3324
                             drug: prescription.advices[b].drug,
3344
                             drug: prescription.advices[b].drug,
3325
                             groupno: index,
3345
                             groupno: index,
3326
-                            hosp_appr_flag: "1",
3346
+                            hosp_appr_flag: '1'
3327
 
3347
 
3328
                           }
3348
                           }
3329
                           console.log('看看数据4:')
3349
                           console.log('看看数据4:')
3374
                             obj['medical_code'] = prescription.project[b].project.medical_code
3394
                             obj['medical_code'] = prescription.project[b].project.medical_code
3375
                             obj['project_name'] = prescription.project[b].project.project_name
3395
                             obj['project_name'] = prescription.project[b].project.project_name
3376
                             obj['price'] = prescription.project[b].project.price
3396
                             obj['price'] = prescription.project[b].project.price
3397
+                            obj['project'] =  prescription.project[b].project
3398
+
3377
 
3399
 
3378
                           } else if (prescription.project[b].type == 3) {
3400
                           } else if (prescription.project[b].type == 3) {
3379
                             obj['statistical_classification'] = ''
3401
                             obj['statistical_classification'] = ''
3380
                             obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
3402
                             obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
3381
                             obj['project_name'] = prescription.project[b].good_info.good_name
3403
                             obj['project_name'] = prescription.project[b].good_info.good_name
3382
                             obj['price'] = prescription.project[b].good_info.packing_price
3404
                             obj['price'] = prescription.project[b].good_info.packing_price
3405
+                            obj['good_info'] =  prescription.project[b].good_info
3406
+
3383
 
3407
 
3384
                           }
3408
                           }
3385
                           tempProject.push(obj)
3409
                           tempProject.push(obj)
3562
                 }
3586
                 }
3563
               })
3587
               })
3564
 
3588
 
3565
-            }else{
3589
+            } else {
3566
 
3590
 
3567
               getMonthHisPateintInfo(params).then(response => {
3591
               getMonthHisPateintInfo(params).then(response => {
3568
                 if (response.data.state == 0) {
3592
                 if (response.data.state == 0) {
3648
               'end_time': moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
3672
               'end_time': moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
3649
               'p_type': 2
3673
               'p_type': 2
3650
             }
3674
             }
3651
-            if(this.current_tab == "day") {
3675
+            if (this.current_tab == 'day') {
3652
 
3676
 
3653
               getPatientInfo(params).then(response => {
3677
               getPatientInfo(params).then(response => {
3654
                 if (response.data.state == 0) {
3678
                 if (response.data.state == 0) {
3741
                           id: prescription.advices[b].drug_id,
3765
                           id: prescription.advices[b].drug_id,
3742
                           drug: prescription.advices[b].drug,
3766
                           drug: prescription.advices[b].drug,
3743
                           groupno: prescription.advices[b].groupno,
3767
                           groupno: prescription.advices[b].groupno,
3744
-                          hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString(),
3745
-
3768
+                          hosp_appr_flag: prescription.advices[b].hosp_appr_flag.toString()
3746
 
3769
 
3747
                         }
3770
                         }
3748
                         tempAdvice.push(obj)
3771
                         tempAdvice.push(obj)
3771
                           obj['statistical_classification'] = prescription.project[b].project.statistical_classification
3794
                           obj['statistical_classification'] = prescription.project[b].project.statistical_classification
3772
                           obj['medical_code'] = prescription.project[b].project.medical_code
3795
                           obj['medical_code'] = prescription.project[b].project.medical_code
3773
                           obj['project_name'] = prescription.project[b].project.project_name
3796
                           obj['project_name'] = prescription.project[b].project.project_name
3797
+                          obj['project'] =  prescription.project[b].project
3798
+
3774
 
3799
 
3775
                         } else if (prescription.project[b].type == 3) {
3800
                         } else if (prescription.project[b].type == 3) {
3776
                           obj['statistical_classification'] = ''
3801
                           obj['statistical_classification'] = ''
3777
                           obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
3802
                           obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
3778
                           obj['project_name'] = prescription.project[b].good_info.good_name
3803
                           obj['project_name'] = prescription.project[b].good_info.good_name
3804
+                          obj['good_info'] =  prescription.project[b].good_info
3805
+
3779
                         }
3806
                         }
3780
                         tempProject.push(obj)
3807
                         tempProject.push(obj)
3781
                       }
3808
                       }
3824
 
3851
 
3825
                     if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
3852
                     if (response.data.data.count <= 1 && response.data.data.schedule.id > 0 && response.data.data.sch_prescriptions.length > 0) {
3826
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
3853
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
3827
-                        var prescription = response.data.data.sch_prescriptions[i];
3854
+                        var prescription = response.data.data.sch_prescriptions[i]
3828
                         for (let b = 0; b < prescription.advices.length; b++) {
3855
                         for (let b = 0; b < prescription.advices.length; b++) {
3829
                           console.log(prescription.advices[b].drug.is_special_diseases)
3856
                           console.log(prescription.advices[b].drug.is_special_diseases)
3830
-                          if (prescription.med_type == "14" && prescription.advices[b].drug.is_special_diseases != 1) {
3831
-                            prescription.advices.splice(b--,1)
3857
+                          if (prescription.med_type == '14' && prescription.advices[b].drug.is_special_diseases != 1) {
3858
+                            prescription.advices.splice(b--, 1)
3832
                           }
3859
                           }
3833
                         }
3860
                         }
3834
                         for (let b = 0; b < prescription.project.length; b++) {
3861
                         for (let b = 0; b < prescription.project.length; b++) {
3835
-                          if(prescription.project[b].type == 2){
3836
-                            if (prescription.med_type == "14" && prescription.project[b].project.disease_directory != 1) {
3837
-                              prescription.project.splice(b--,1)
3862
+                          if (prescription.project[b].type == 2) {
3863
+                            if (prescription.med_type == '14' && prescription.project[b].project.disease_directory != 1) {
3864
+                              prescription.project.splice(b--, 1)
3838
                             }
3865
                             }
3839
-                          }else if(prescription.project[b].type == 3){
3840
-                            if (prescription.med_type == "14" && prescription.project[b].good_info.is_special_diseases != 1) {
3841
-                              prescription.project.splice(b--,1)
3866
+                          } else if (prescription.project[b].type == 3) {
3867
+                            if (prescription.med_type == '14' && prescription.project[b].good_info.is_special_diseases != 1) {
3868
+                              prescription.project.splice(b--, 1)
3842
                             }
3869
                             }
3843
                           }
3870
                           }
3844
                         }
3871
                         }
3845
                       }
3872
                       }
3846
 
3873
 
3847
-
3848
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
3874
                       for (let i = 0; i < response.data.data.sch_prescriptions.length; i++) {
3849
                         var prescription = response.data.data.sch_prescriptions[i]
3875
                         var prescription = response.data.data.sch_prescriptions[i]
3850
                         let tempAdvice = []
3876
                         let tempAdvice = []
3870
                             id: prescription.advices[b].drug_id,
3896
                             id: prescription.advices[b].drug_id,
3871
                             drug: prescription.advices[b].drug,
3897
                             drug: prescription.advices[b].drug,
3872
                             groupno: index,
3898
                             groupno: index,
3873
-                            hosp_appr_flag: "1",
3899
+                            hosp_appr_flag: '1'
3874
 
3900
 
3875
                           }
3901
                           }
3876
                           console.log('看看数据5:')
3902
                           console.log('看看数据5:')
3921
                             obj['medical_code'] = prescription.project[b].project.medical_code
3947
                             obj['medical_code'] = prescription.project[b].project.medical_code
3922
                             obj['project_name'] = prescription.project[b].project.project_name
3948
                             obj['project_name'] = prescription.project[b].project.project_name
3923
                             obj['price'] = prescription.project[b].project.price
3949
                             obj['price'] = prescription.project[b].project.price
3950
+                            obj['project'] =  prescription.project[b].project
3951
+
3924
 
3952
 
3925
                           } else if (prescription.project[b].type == 3) {
3953
                           } else if (prescription.project[b].type == 3) {
3926
                             obj['statistical_classification'] = ''
3954
                             obj['statistical_classification'] = ''
3927
                             obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
3955
                             obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
3928
                             obj['project_name'] = prescription.project[b].good_info.good_name
3956
                             obj['project_name'] = prescription.project[b].good_info.good_name
3929
                             obj['price'] = prescription.project[b].good_info.packing_price
3957
                             obj['price'] = prescription.project[b].good_info.packing_price
3958
+                            obj['good_info'] =  prescription.project[b].good_info
3959
+
3930
 
3960
 
3931
                           }
3961
                           }
3932
                           tempProject.push(obj)
3962
                           tempProject.push(obj)
3991
                   this.$refs.prescriptions.setData(this.prescriptions, this.info, this.admin_info, this.doctors, this.department, this.hisPatientInfo, this.month_prescriptions, this.last_info)
4021
                   this.$refs.prescriptions.setData(this.prescriptions, this.info, this.admin_info, this.doctors, this.department, this.hisPatientInfo, this.month_prescriptions, this.last_info)
3992
                 }
4022
                 }
3993
               })
4023
               })
3994
-            }else{
4024
+            } else {
3995
 
4025
 
3996
               getMonthHisPateintInfo(params).then(response => {
4026
               getMonthHisPateintInfo(params).then(response => {
3997
                 if (response.data.state == 0) {
4027
                 if (response.data.state == 0) {
4064
                 }
4094
                 }
4065
               })
4095
               })
4066
 
4096
 
4067
-
4068
             }
4097
             }
4069
 
4098
 
4070
           }
4099
           }

+ 15 - 7
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue View File

377
     },
377
     },
378
     methods: {
378
     methods: {
379
       save() {
379
       save() {
380
-
381
         if (this.prescriptions[0].advices.length == 0 && this.prescriptions[0].project.length == 0) {
380
         if (this.prescriptions[0].advices.length == 0 && this.prescriptions[0].project.length == 0) {
382
           this.$message.error('请先开处方')
381
           this.$message.error('请先开处方')
383
           return
382
           return
1400
           }
1399
           }
1401
         }
1400
         }
1402
 
1401
 
1403
-        console.log(this.curDrugs)
1404
-        console.log(this.curPrescriptions.advices)
1405
 
1402
 
1406
         for (let i = 0; i < this.curDrugs.length; i++) {
1403
         for (let i = 0; i < this.curDrugs.length; i++) {
1407
           for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
1404
           for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
1518
                   remark: '',
1515
                   remark: '',
1519
                   medical_code: temp2[b].medical_code,
1516
                   medical_code: temp2[b].medical_code,
1520
                   unit: temp2[b].unit,
1517
                   unit: temp2[b].unit,
1521
-                  type: temp2[b].type
1518
+                  type: temp2[b].type,
1519
+                  project:temp2[b],
1522
                 }
1520
                 }
1523
                 if (obj.total == 0 || obj.total == undefined) {
1521
                 if (obj.total == 0 || obj.total == undefined) {
1524
                   obj.total = 1
1522
                   obj.total = 1
1607
                     remark: prescription.project[b].remark,
1605
                     remark: prescription.project[b].remark,
1608
                     medical_code: prescription.project[b].project.medical_code,
1606
                     medical_code: prescription.project[b].project.medical_code,
1609
                     unit: prescription.project[b].project.unit,
1607
                     unit: prescription.project[b].project.unit,
1610
-                    type: prescription.project[b].type
1608
+                    type: prescription.project[b].type,
1611
                   }
1609
                   }
1612
 
1610
 
1613
                   if (prescription.project[b].type == 2) {
1611
                   if (prescription.project[b].type == 2) {
1614
                     obj['statistical_classification'] = prescription.project[b].project.statistical_classification
1612
                     obj['statistical_classification'] = prescription.project[b].project.statistical_classification
1615
                     obj['medical_code'] = prescription.project[b].project.medical_code
1613
                     obj['medical_code'] = prescription.project[b].project.medical_code
1616
                     obj['project_name'] = prescription.project[b].project.project_name
1614
                     obj['project_name'] = prescription.project[b].project.project_name
1615
+                    obj['project'] = prescription.project[b].project
1616
+
1617
+
1618
+
1617
 
1619
 
1618
                   } else if (prescription.project[b].type == 3) {
1620
                   } else if (prescription.project[b].type == 3) {
1619
                     obj['statistical_classification'] = ''
1621
                     obj['statistical_classification'] = ''
1620
                     obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
1622
                     obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
1621
                     obj['project_name'] = prescription.project[b].good_info.good_name
1623
                     obj['project_name'] = prescription.project[b].good_info.good_name
1624
+                    obj['good_info'] = prescription.project[b].good_info
1625
+
1622
                   }
1626
                   }
1623
                   tempProject.push(obj)
1627
                   tempProject.push(obj)
1624
                 }
1628
                 }
1692
                 medical_code: project[i].medical_code,
1696
                 medical_code: project[i].medical_code,
1693
                 unit: project[i].unit,
1697
                 unit: project[i].unit,
1694
                 type: 2,
1698
                 type: 2,
1695
-                is_special_diseases: project[i].disease_directory
1699
+                is_special_diseases: project[i].disease_directory,
1700
+                project: project[i],
1696
               }
1701
               }
1697
 
1702
 
1698
               this.tabProject.push(obj)
1703
               this.tabProject.push(obj)
1713
                 medical_code: good_info[i].medical_insurance_number,
1718
                 medical_code: good_info[i].medical_insurance_number,
1714
                 unit: this.getGoodUnit(good_info[i].good_unit),
1719
                 unit: this.getGoodUnit(good_info[i].good_unit),
1715
                 type: 3,
1720
                 type: 3,
1716
-                is_special_diseases: good_info[i].is_special_diseases
1721
+                is_special_diseases: good_info[i].is_special_diseases,
1722
+                good_info: good_info[i],
1717
               }
1723
               }
1718
               this.tabProject.push(obj)
1724
               this.tabProject.push(obj)
1719
             }
1725
             }
1807
                   unit: project[i].project.unit,
1813
                   unit: project[i].project.unit,
1808
                   type: project[i].type,
1814
                   type: project[i].type,
1809
                   is_special_diseases: project[i].project.disease_directory,
1815
                   is_special_diseases: project[i].project.disease_directory,
1816
+                  project:project[i].project,
1810
                 }
1817
                 }
1811
                 if (obj.total == 0 || obj.total == undefined) {
1818
                 if (obj.total == 0 || obj.total == undefined) {
1812
                   obj.total = 1
1819
                   obj.total = 1
1829
                   unit: project[i].good_info.unit,
1836
                   unit: project[i].good_info.unit,
1830
                   type: project[i].type,
1837
                   type: project[i].type,
1831
                   is_special_diseases: project[i].good_info.is_special_diseases,
1838
                   is_special_diseases: project[i].good_info.is_special_diseases,
1839
+                  good_info:project[i].good_info,
1832
                 }
1840
                 }
1833
                 if (obj.total == 0 || obj.total == undefined) {
1841
                 if (obj.total == 0 || obj.total == undefined) {
1834
                   obj.total = 1
1842
                   obj.total = 1