Преглед на файлове

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

csx преди 3 години
родител
ревизия
eb365f411a

+ 2 - 250
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Целия файл

@@ -510,9 +510,8 @@
510 510
     refunddetail,
511 511
     refundNumber,
512 512
     register,
513
-    upload,
514
-    getMonthCharge
515
-  } from '@api/his/his'
513
+    upload
514
+  } from '@/api/his/his'
516 515
   import RegisterDialog from './components/registerDialog'
517 516
   import treatPrint from './treatPrint'
518 517
   import statementPrint from './statementPrint'
@@ -3244,253 +3243,6 @@
3244 3243
           }
3245 3244
         }
3246 3245
       },
3247
-      getMonthPatientInformation(id, batch_number, his_patient_id, order_id) {
3248
-        const params = {
3249
-          'record_date': this.record_date,
3250
-          'patient_id': id,
3251
-          'his_patient_id': his_patient_id,
3252
-          'number': batch_number,
3253
-          'start_time': this.other_start_time,
3254
-          'end_time': this.other_end_time,
3255
-          'type': this.radio,
3256
-          'p_type': 2,
3257
-          'order_id': order_id
3258
-
3259
-        }
3260
-        this.loading = true
3261
-        getChargeHisPatientInfo(params).then(response => {
3262
-          if (response.data.state == 0) {
3263
-            this.loading = false
3264
-
3265
-            this.$message.error(response.data.msg)
3266
-            return false
3267
-          } else {
3268
-            this.prescriptions = []
3269
-            this.month_prescriptions = []
3270
-            this.big_month_prescriptions = []
3271
-            this.big_prescriptions = []
3272
-            this.curPrescriptions = {}
3273
-            this.curMonthPrescriptions = {}
3274
-            this.loading = false
3275
-            this.patientInfo = response.data.data.xt_info
3276
-            this.hisPatientInfo = response.data.data.his_info
3277
-            this.info = response.data.data.info
3278
-            this.order = response.data.data.order
3279
-            this.p_type = ''
3280
-            this.sick_type = ''
3281
-            this.diagnosis = []
3282
-            this.sick_history = ''
3283
-            this.form.diagnosis = []
3284
-            if (this.info.id > 0) {
3285
-              this.form.p_type = response.data.data.info.register_type
3286
-              this.form.sick_type = response.data.data.info.sick_type
3287
-              if (response.data.data.info.diagnosis.length == 0) {
3288
-                this.form.diagnosis = []
3289
-              } else {
3290
-                for (let i = 0; i < response.data.data.info.diagnosis.split(',').length; i++) {
3291
-                  this.form.diagnosis.push(parseInt(response.data.data.info.diagnosis.split(',')[i]))
3292
-                }
3293
-              }
3294
-              this.sick_history = this.info.sick_history
3295
-              if (this.info.register_type == 0) {
3296
-                this.form.p_type = ''
3297
-              }
3298
-
3299
-              if (this.info.sick_type == 0) {
3300
-                this.form.sick_type = ''
3301
-              }
3302
-            } else {
3303
-              this.form.p_type = 14
3304
-              this.form.sick_type = this.sick[0].id
3305
-              if (response.data.data.last_info.diagnoses.length == 0) {
3306
-                this.form.diagnosis = []
3307
-              } else {
3308
-                for (let i = 0; i < response.data.data.last_info.diagnosis.split(',').length; i++) {
3309
-                  this.form.diagnosis.push(parseInt(response.data.data.last_info.diagnosis.split(',')[i]))
3310
-                }
3311
-              }
3312
-
3313
-              this.sick_history = ''
3314
-            }
3315
-            this.addtions_charge = response.data.data.addtions_charge
3316
-            this.setMonthPrescription(response.data.data.month_prescriptions)
3317
-
3318
-            if (response.data.data.prescription.length > 0 && response.data.data.prescription[0].advices.length > 0) {
3319
-              this.prescription_id = response.data.data.prescription[0].advices[0].prescription_id
3320
-            } else {
3321
-              this.prescription_id = 0
3322
-            }
3323
-
3324
-            const big_prescriptions = []
3325
-
3326
-            for (let i = 0; i < this.unique_three(response.data.data.prescription).length; i++) {
3327
-              const obj = {
3328
-                med_type: this.unique_three(response.data.data.prescription)[i].med_type,
3329
-                prescriptions: []
3330
-              }
3331
-              big_prescriptions.push(obj)
3332
-            }
3333
-
3334
-            for (let c = 0; c < big_prescriptions.length; c++) {
3335
-              const inner_prescription = []
3336
-              for (let i = 0; i < response.data.data.prescription.length; i++) {
3337
-                var prescription = response.data.data.prescription[i]
3338
-
3339
-                if (big_prescriptions[c].med_type == prescription.med_type) {
3340
-                  const tempAdvice = []
3341
-                  const tempProject = []
3342
-                  const tempAddition = []
3343
-                  for (let b = 0; b < prescription.advices.length; b++) {
3344
-                    const obj = {
3345
-                      advice_id: prescription.advices[b].id,
3346
-                      drug_name: prescription.advices[b].advice_name,
3347
-                      single_dose: prescription.advices[b].single_dose,
3348
-                      delivery_way: prescription.advices[b].delivery_way,
3349
-                      execution_frequency: prescription.advices[b].execution_frequency,
3350
-                      retail_price: prescription.advices[b].price.toString(),
3351
-                      remark: prescription.advices[b].remark,
3352
-                      day: prescription.advices[b].day,
3353
-                      prescribing_number: prescription.advices[b].prescribing_number.toString(),
3354
-                      single_dose_unit: prescription.advices[b].single_dose_unit,
3355
-                      prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
3356
-                      medical_insurance_number: prescription.advices[b].med_list_codg
3357
-
3358
-                    }
3359
-                    tempAdvice.push(obj)
3360
-                  }
3361
-
3362
-                  for (let b = 0; b < prescription.project.length; b++) {
3363
-                    const obj = {
3364
-                      id: prescription.project[b].id,
3365
-                      project_id: prescription.project[b].project.id,
3366
-                      // project_name: prescription.project[b].project.project_name,
3367
-                      // statistical_classification: prescription.project[b].project.statistical_classification,
3368
-                      single_dose: prescription.project[b].single_dose,
3369
-                      delivery_way: prescription.project[b].delivery_way,
3370
-                      execution_frequency: prescription.project[b].execution_frequency,
3371
-                      number_days: prescription.project[b].day,
3372
-                      total: prescription.project[b].count.toString(),
3373
-                      price: prescription.project[b].price,
3374
-                      remark: prescription.project[b].remark,
3375
-                      // medical_code: prescription.project[b].project.medical_code,
3376
-                      unit: prescription.project[b].unit,
3377
-                      type: prescription.project[b].type
3378
-                    }
3379
-
3380
-                    if (prescription.project[b].type == 2) {
3381
-                      obj['statistical_classification'] = prescription.project[b].project.statistical_classification
3382
-                      obj['medical_code'] = prescription.project[b].project.medical_code
3383
-                      obj['project_name'] = prescription.project[b].project.project_name
3384
-
3385
-                    } else if (prescription.project[b].type == 3) {
3386
-                      obj['statistical_classification'] = ''
3387
-                      obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
3388
-                      obj['project_name'] = prescription.project[b].good_info.good_name
3389
-                    }
3390
-
3391
-                    tempProject.push(obj)
3392
-                  }
3393
-
3394
-                  for (let b = 0; b < prescription.addition.length; b++) {
3395
-                    const obj = {
3396
-                      id: prescription.addition[b].id,
3397
-                      item_name: prescription.addition[b].item_name,
3398
-                      price: prescription.addition[b].price,
3399
-                      count: prescription.addition[b].count,
3400
-                      item_id: prescription.addition[b].item_id
3401
-                    }
3402
-                    tempAddition.push(obj)
3403
-                  }
3404
-                  const index = i + 1
3405
-                  console.log('~~~~~~~~')
3406
-                  console.log(prescription.order)
3407
-                  prescription.order.order_status = prescription.order.order_status.toString()
3408
-                  prescription.order.order_status = parseInt(prescription.order.order_status)
3409
-
3410
-                  const obj = {
3411
-                    id: prescription.id,
3412
-                    name: this.getPName(prescription.med_type, index),
3413
-                    advices: tempAdvice,
3414
-                    project: tempProject,
3415
-                    addition: tempAddition,
3416
-                    order_status: prescription.order_status,
3417
-                    type: prescription.type,
3418
-                    med_type: prescription.med_type,
3419
-                    order: prescription.order
3420
-                  }
3421
-                  // inner_prescription.push(obj)
3422
-                  big_prescriptions[c].prescriptions.push(obj)
3423
-
3424
-                  this.prescriptions.push(obj)
3425
-                }
3426
-              }
3427
-            }
3428
-
3429
-            this.big_prescriptions = JSON.parse(JSON.stringify(big_prescriptions))
3430
-
3431
-            for (let i = 0; i < this.big_prescriptions.length; i++) {
3432
-              if (this.big_prescriptions[i].med_type == '11') {
3433
-                this.big_prescriptions[i]['is_true'] = 1
3434
-              }
3435
-            }
3436
-
3437
-            for (let i = 0; i < this.big_prescriptions.length; i++) {
3438
-              if (this.big_prescriptions[i].is_true == 1) {
3439
-                for (let b = 0; b < this.big_prescriptions[i].prescriptions.length; b++) {
3440
-                  const obj = {
3441
-                    med_type: '11',
3442
-                    prescriptions: []
3443
-                  }
3444
-                  const arr = []
3445
-                  arr.push(this.big_prescriptions[i].prescriptions[b])
3446
-                  obj.prescriptions = arr
3447
-                  this.big_prescriptions.push(obj)
3448
-                }
3449
-              }
3450
-            }
3451
-
3452
-            console.log(this.big_prescriptions)
3453
-            //
3454
-            for (let i = 0; i < this.big_prescriptions.length; i++) {
3455
-              if (this.big_prescriptions[i].is_true == 1) {
3456
-                this.big_prescriptions.splice(i, 1)
3457
-              }
3458
-            }
3459
-            // console.log(this.big_prescriptions)
3460
-
3461
-            for (let i = 0; i < this.big_prescriptions.length; i++) {
3462
-              if (this.big_prescriptions[i].prescriptions.length > 0) {
3463
-                this.big_prescriptions[i]['curPrescriptions'] = JSON.parse(JSON.stringify(this.big_prescriptions[i].prescriptions[0]))
3464
-              } else {
3465
-                this.big_prescriptions[i]['curPrescriptions'] = {}
3466
-              }
3467
-              this.big_prescriptions[i]['total'] = this.getTotalThree(this.big_prescriptions[i])
3468
-            }
3469
-
3470
-            if (this.big_prescriptions.length > 0) {
3471
-              this.editableTabsValue = this.getPName(this.big_prescriptions[0].med_type, 1)
3472
-            }
3473
-
3474
-            console.log(this.big_prescriptions)
3475
-            console.log(this.big_prescriptions[0].curPrescriptions.order_status)
3476
-
3477
-            //
3478
-            // if (this.prescriptions.length > 0) {
3479
-            //   this.curPrescriptions = this.prescriptions[0]
3480
-            // } else {
3481
-            //   this.curPrescriptions = {}
3482
-            // }
3483
-            // if (this.month_prescriptions.length > 0) {
3484
-            //   this.curMonthPrescriptions = this.month_prescriptions[0]
3485
-            // } else {
3486
-            //   this.curMonthPrescriptions = {}
3487
-            // }
3488
-
3489
-            // this.month_total = this.getMonthTotalOne()
3490
-          }
3491
-        })
3492
-      },
3493
-
3494 3246
       // 获取患者的基本信息
3495 3247
       getPatientInformation(id, batch_number, his_patient_id, order_id) {
3496 3248
         const params = {

+ 101 - 315
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Целия файл

@@ -24,18 +24,18 @@
24 24
                         <el-input v-model="patientInfo.id_card_no" placeholder="" readonly></el-input>
25 25
                     </el-form-item>
26 26
                     <!--<el-form-item label="处方类型: " prop="name" label-position="right">-->
27
-                        <!--<el-select style="width:100%;" v-model="register_type" placeholder="">-->
28
-                            <!--<el-option-->
29
-                                    <!--v-for="(item,index) in register"-->
30
-                                    <!--:key="index"-->
31
-                                    <!--:label="item.label"-->
32
-                                    <!--:value="item.value">-->
33
-                            <!--</el-option>-->
34
-                        <!--</el-select>-->
27
+                    <!--<el-select style="width:100%;" v-model="register_type" placeholder="">-->
28
+                    <!--<el-option-->
29
+                    <!--v-for="(item,index) in register"-->
30
+                    <!--:key="index"-->
31
+                    <!--:label="item.label"-->
32
+                    <!--:value="item.value">-->
33
+                    <!--</el-option>-->
34
+                    <!--</el-select>-->
35 35
                     <!--</el-form-item>-->
36 36
                     <el-form-item label="疾病类型:" prop="name" label-position="right">
37 37
 
38
-                        <el-select  filterable style="width:100%;" v-model="state1" placeholder="">
38
+                        <el-select filterable style="width:100%;" v-model="state1" placeholder="">
39 39
                             <el-option
40 40
                                     v-for="(item,index) in sick"
41 41
                                     :key="index"
@@ -48,7 +48,7 @@
48 48
 
49 49
                     <el-form-item label="诊断:" prop="name" label-position="right" style="width:66.6%;">
50 50
 
51
-                        <el-select style="width:100%;"  v-model="diagnose" placeholder="" multiple filterable>
51
+                        <el-select style="width:100%;" v-model="diagnose" placeholder="" multiple filterable>
52 52
                             <el-option
53 53
                                     v-for="(item,index) in diagnoses"
54 54
                                     :key="index"
@@ -128,7 +128,8 @@
128 128
                                 </el-date-picker>
129 129
 
130 130
 
131
-                                <el-select style="width:50%;" v-model="item.med_type" placeholder="医疗类型"   @change="changevalue" >
131
+                                <el-select style="width:50%;" v-model="item.med_type" placeholder="医疗类型"
132
+                                           @change="changevalue">
132 133
                                     <el-option
133 134
                                             v-for="(item,index) in register"
134 135
                                             :key="index"
@@ -280,8 +281,8 @@
280 281
                                         </el-table-column>
281 282
                                         <el-table-column label="规格" width="60">
282 283
                                             <template slot-scope="scope">
283
-                                              <!-- {{ scope.row.drug_spec }} -->
284
-                                              <span v-if="scope.row.min_unit != scope.row.dose_unit">{{scope.row.dose}}{{scope.row.dose_unit}}&nbsp;* &nbsp;</span>{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
284
+                                                <!-- {{ scope.row.drug_spec }} -->
285
+                                                <span v-if="scope.row.min_unit != scope.row.dose_unit">{{scope.row.dose}}{{scope.row.dose_unit}}&nbsp;* &nbsp;</span>{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
285 286
                                             </template>
286 287
                                         </el-table-column>
287 288
                                         <el-table-column label="库存" width="60">
@@ -519,25 +520,25 @@
519 520
           { value: 11, label: '普通门诊' },
520 521
           // { value: 12, label: '门诊挂号' },
521 522
           // { value: 13, label: '急诊' },
522
-          { value: 14, label: '门诊特殊病' },
523
+          { value: 14, label: '门诊特殊病' }
523 524
           // { value: 15, label: '门诊统筹' },
524 525
           // { value: 16, label: '门诊慢性病' },
525 526
           // { value: 21, label: '普通住院' }
526 527
 
527 528
         ],
528
-        medical_care:[
529
-          {value: 11, label: "普通门诊"},
530
-          {value: 12, label: '家庭通道'},
531
-          {value: 13, label: "门诊大病"},
532
-          {value: 14, label: "重疾特药"},
533
-          {value: 15, label: "门诊慢病"},
534
-          {value: 16, label: "门诊特检"},
535
-          {value: 17, label: "健康体检"},
536
-          {value: 18, label: "预防接种"},
537
-          {value: 19, label: "门诊输血"},
538
-          {value: 91, label: "新冠肺炎门诊"},
539
-          {value: 1111, label: "精一"},
540
-          {value: 1112, label: "精二"},
529
+        medical_care: [
530
+          { value: 11, label: '普通门诊' },
531
+          { value: 12, label: '家庭通道' },
532
+          { value: 13, label: '门诊大病' },
533
+          { value: 14, label: '重疾特药' },
534
+          { value: 15, label: '门诊慢病' },
535
+          { value: 16, label: '门诊特检' },
536
+          { value: 17, label: '健康体检' },
537
+          { value: 18, label: '预防接种' },
538
+          { value: 19, label: '门诊输血' },
539
+          { value: 91, label: '新冠肺炎门诊' },
540
+          { value: 1111, label: '精一' },
541
+          { value: 1112, label: '精二' }
541 542
 
542 543
         ],
543 544
 
@@ -546,7 +547,7 @@
546 547
         register_type: '',
547 548
         value: '0',
548 549
         search_project_keyword: '',
549
-        search_project_team_keyword:"",
550
+        search_project_team_keyword: '',
550 551
         form: {
551 552
           name: ''
552 553
         },
@@ -588,7 +589,7 @@
588 589
         showTwo: false,
589 590
         tableData: [],
590 591
         tabPrjectTeam: [],
591
-        allTabPrjectTeam:[],
592
+        allTabPrjectTeam: [],
592 593
         teamList: [],
593 594
         doctors: [],
594 595
         departMent: [],
@@ -746,7 +747,6 @@
746 747
               // obj['single_dose_unit'] = drug_month_prescriptions.advices[a].single_dose_unit
747 748
               obj['single_dose_unit'] = drug_month_prescriptions.advices[a].drug.dose_unit
748 749
 
749
-
750 750
               // obj['retail_price'] = obj['retail_price'] +  drug_month_prescriptions.advices[a].drug.retail_price
751 751
               obj['retail_price'] = parseFloat(drug_month_prescriptions.advices[a].price)
752 752
               obj['drug'] = drug_month_prescriptions.advices[a].drug
@@ -1299,8 +1299,7 @@
1299 1299
             ':' + (min < 10 ? '0' + min : min)
1300 1300
           this.prescriptions[i]['pre_time'] = nowTime
1301 1301
 
1302
-            this.prescriptions[i]['med_type'] = 14
1303
-
1302
+          this.prescriptions[i]['med_type'] = 14
1304 1303
 
1305 1304
           this.prescriptions[i].name = '处方' + (i + 1)
1306 1305
           if (i == 0) {
@@ -1324,7 +1323,7 @@
1324 1323
         this.$refs.call_prescription.close()
1325 1324
         this.$emit('setData', this.prescriptions)
1326 1325
 
1327
-      },changevalue(val){
1326
+      }, changevalue(val) {
1328 1327
 
1329 1328
         this.$forceUpdate()
1330 1329
 
@@ -1359,10 +1358,7 @@
1359 1358
           this.prescriptions[i].name = '处方' + (i + 1)
1360 1359
           this.prescriptions[i]['pre_time'] = nowTime
1361 1360
 
1362
-
1363
-
1364
-            this.prescriptions[i]['med_type'] = 14
1365
-
1361
+          this.prescriptions[i]['med_type'] = 14
1366 1362
 
1367 1363
           if (i == 0) {
1368 1364
             if (this.prescriptions[0].advices.length > 0 && this.prescriptions[0].project.length == 0) {
@@ -1526,7 +1522,7 @@
1526 1522
         this.$refs.additionalCharges.hide()
1527 1523
 
1528 1524
       }, searchProjectAction() {
1529
-        console.log("~~~~")
1525
+        console.log('~~~~')
1530 1526
         console.log(this.allProject)
1531 1527
 
1532 1528
         if (this.search_project_keyword.length == 0) {
@@ -1543,7 +1539,7 @@
1543 1539
 
1544 1540
         }
1545 1541
 
1546
-      },searchProjectTeamAction(){
1542
+      }, searchProjectTeamAction() {
1547 1543
         if (this.search_project_team_keyword.length == 0) {
1548 1544
           this.tabPrjectTeam = this.allTabPrjectTeam
1549 1545
 
@@ -1742,7 +1738,6 @@
1742 1738
             this.diagnoses = response.data.data.diagnose
1743 1739
             this.additions = response.data.data.additions
1744 1740
 
1745
-
1746 1741
           }
1747 1742
         })
1748 1743
 
@@ -1847,12 +1842,11 @@
1847 1842
         this.teamList = []
1848 1843
 
1849 1844
       },
1850
-      setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data,last_info) {
1845
+      setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data, last_info) {
1851 1846
         this.curMonthPrescriptions = {}
1852 1847
         this.curPrescriptions = {}
1853 1848
         // this.$refs.tabProjectTeam.clearSelection()
1854 1849
 
1855
-
1856 1850
         for (let i = 0; i < doctors.length; i++) {
1857 1851
           if (doctors[i].user_type == 1) {
1858 1852
             doctors.splice(i, 1)
@@ -1865,12 +1859,9 @@
1865 1859
         this.$emit('event1', this.prescription_id)
1866 1860
         this.curStatus = 0
1867 1861
         if (month_data && month_data.length > 0) {
1868
-
1869 1862
           this.curMonthPrescriptions = month_data[0]
1870
-
1871 1863
         } else {
1872 1864
           this.curMonthPrescriptions = {}
1873
-
1874 1865
         }
1875 1866
 
1876 1867
         if (data && data.length > 0) {
@@ -1880,7 +1871,6 @@
1880 1871
           this.curPrescriptions = {}
1881 1872
         }
1882 1873
 
1883
-
1884 1874
         if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
1885 1875
           this.curStatus = 1
1886 1876
           this.customTabIndex = 1
@@ -1897,7 +1887,6 @@
1897 1887
           this.showTwo = true
1898 1888
         }
1899 1889
 
1900
-
1901 1890
         if (this.curPrescriptions.project.length == 0 && this.curPrescriptions.advices.length == 0) {
1902 1891
           this.curStatus = 1
1903 1892
           this.customTabIndex = 1
@@ -1906,9 +1895,6 @@
1906 1895
           this.showTwo = false
1907 1896
         }
1908 1897
 
1909
-
1910
-
1911
-
1912 1898
         if (info.prescription_status == 0) {
1913 1899
           this.order_status = ''
1914 1900
         }
@@ -1924,8 +1910,6 @@
1924 1910
           this.order_status = '已退费'
1925 1911
         }
1926 1912
 
1927
-
1928
-
1929 1913
         getInitData().then(response => {
1930 1914
           if (response.data.state == 0) {
1931 1915
             this.$message.error(response.data.msg)
@@ -1945,26 +1929,21 @@
1945 1929
             this.diagnoses = response.data.data.diagnose
1946 1930
             this.additions = response.data.data.additions
1947 1931
 
1948
-
1949
-
1950
-
1951
-
1952 1932
             if (info.id > 0) {
1953 1933
               this.doctorValue = info.doctor_id
1954 1934
               this.departmentValue = info.departments
1955 1935
             } else {
1956
-              if(admin_info.id > 0 && admin_info.user_type == 2){
1936
+              if (admin_info.id > 0 && admin_info.user_type == 2) {
1957 1937
                 this.doctorValue = admin_info.admin_user_id
1958 1938
                 this.departmentValue = this.department[0].id
1959 1939
 
1960
-              }else{
1940
+              } else {
1961 1941
 
1962 1942
                 this.doctorValue = this.doctors[0].admin_user_id
1963 1943
                 this.departmentValue = this.department[0].id
1964 1944
 
1965 1945
               }
1966 1946
 
1967
-
1968 1947
             }
1969 1948
 
1970 1949
             if (info.register_type == 0) {
@@ -1976,217 +1955,32 @@
1976 1955
             }
1977 1956
             this.diagnose = []
1978 1957
 
1979
-            if(info.id == 0){
1980
-              if(last_info.diagnosis.length == 0){
1958
+            if (info.id == 0) {
1959
+              if (last_info.diagnosis.length == 0) {
1981 1960
                 this.diagnose = []
1982
-              }else{
1983
-                for(let i = 0; i < last_info.diagnosis.split(",").length;i++){
1984
-                  this.diagnose.push(parseInt(last_info.diagnosis.split(",")[i]))
1961
+              } else {
1962
+                for (let i = 0; i < last_info.diagnosis.split(",").length; i++) {
1963
+                  this.diagnose.push(parseInt(last_info.diagnosis.split(',')[i]))
1985 1964
 
1986 1965
                 }
1987 1966
               }
1988 1967
 
1989
-              if(last_info.sick_history == 0){
1968
+              if (last_info.sick_history == 0) {
1990 1969
                 this.state2 = ''
1991
-              }else{
1970
+              } else {
1992 1971
                 this.state2 = last_info.sick_history
1993 1972
               }
1994 1973
 
1995
-
1996
-            }else{
1997
-              this.state2 = info.sick_history
1998
-              if (this.state2 == 0) {
1999
-                this.state2 = ''
2000
-              }
2001
-              if(info.diagnosis.length == 0){
2002
-                this.diagnose = []
2003
-              }else{
2004
-                for(let i = 0; i < info.diagnosis.split(",").length;i++){
2005
-                  this.diagnose.push(parseInt(info.diagnosis.split(",")[i]))
2006
-
2007
-                }
2008
-
2009
-              }
2010
-
2011
-            }
2012
-
2013
-
2014
-
2015
-            this.state1 = info.sick_type
2016
-            if (this.state1 == 0 || this.state1 == "") {
2017
-              this.state1 = ''
2018
-              for (let i = 0; i < this.sick.length; i++) {
2019
-                this.state1 = this.sick[0].id
2020
-              }
2021
-            }
2022
-
2023
-            if(this.departmentValue == "" || this.departmentValue == 0){
2024
-              if(this.department.length > 0){
2025
-                this.departmentValue = this.department[0].id
2026
-
2027
-              }
2028
-            }
2029
-
2030
-          }
2031
-        })
2032
-
2033
-      },
2034
-      setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data,last_info) {
2035
-        this.curMonthPrescriptions = {}
2036
-        this.curPrescriptions = {}
2037
-        // this.$refs.tabProjectTeam.clearSelection()
2038
-
2039
-
2040
-        for (let i = 0; i < doctors.length; i++) {
2041
-          if (doctors[i].user_type == 1) {
2042
-            doctors.splice(i, 1)
2043
-          }
2044
-        }
2045
-
2046
-        this.prescription_id = data[0].id
2047
-        this.editableTabsValue = '处方1'
2048
-        this.dayorMonth = 'day'
2049
-        this.$emit('event1', this.prescription_id)
2050
-        this.curStatus = 0
2051
-        if (month_data && month_data.length > 0) {
2052
-
2053
-          this.curMonthPrescriptions = month_data[0]
2054
-
2055
-        } else {
2056
-          this.curMonthPrescriptions = {}
2057
-
2058
-        }
2059
-
2060
-        if (data && data.length > 0) {
2061
-          this.curPrescriptions = data[0]
2062
-
2063
-        } else {
2064
-          this.curPrescriptions = {}
2065
-        }
2066
-
2067
-
2068
-        if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
2069
-          this.curStatus = 1
2070
-          this.customTabIndex = 1
2071
-          this.rightTab = 1
2072
-          this.showOne = true
2073
-          this.showTwo = false
2074
-        }
2075
-
2076
-        if (this.curPrescriptions.project.length > 0 && this.curPrescriptions.advices.length == 0) {
2077
-          this.curStatus = 2
2078
-          this.customTabIndex = 2
2079
-          this.rightTab = 2
2080
-          this.showOne = false
2081
-          this.showTwo = true
2082
-        }
2083
-
2084
-
2085
-        if (this.curPrescriptions.project.length == 0 && this.curPrescriptions.advices.length == 0) {
2086
-          this.curStatus = 1
2087
-          this.customTabIndex = 1
2088
-          this.rightTab = 1
2089
-          this.showOne = true
2090
-          this.showTwo = false
2091
-        }
2092
-
2093
-
2094
-
2095
-
2096
-        if (info.prescription_status == 0) {
2097
-          this.order_status = ''
2098
-        }
2099
-
2100
-        if (this.curPrescriptions.order_status == 1) {
2101
-          this.order_status = '未收费'
2102
-        }
2103
-        if (this.curPrescriptions.order_status == 2) {
2104
-          this.order_status = '已结算'
2105
-        }
2106
-
2107
-        if (this.curPrescriptions.order_status == 3) {
2108
-          this.order_status = '已退费'
2109
-        }
2110
-
2111
-
2112
-
2113
-        getInitData().then(response => {
2114
-          if (response.data.state == 0) {
2115
-            this.$message.error(response.data.msg)
2116
-            return false
2117
-          } else {
2118
-            this.drugs = response.data.data.drugs
2119
-            this.allDrugs = response.data.data.drugs
2120
-            this.advices_template = response.data.data.advices_template
2121
-            this.doctors = response.data.data.doctors
2122
-            for (let i = 0; i < this.doctors.length; i++) {
2123
-              if (this.doctors[i].user_type == 1) {
2124
-                this.doctors.splice(i, 1)
2125
-              }
2126
-            }
2127
-            this.department = response.data.data.department
2128
-            this.sick = response.data.data.sick
2129
-            this.diagnoses = response.data.data.diagnose
2130
-            this.additions = response.data.data.additions
2131
-
2132
-
2133
-
2134
-
2135
-
2136
-            if (info.id > 0) {
2137
-              this.doctorValue = info.doctor_id
2138
-              this.departmentValue = info.departments
2139 1974
             } else {
2140
-              if(admin_info.id > 0 && admin_info.user_type == 2){
2141
-                this.doctorValue = admin_info.admin_user_id
2142
-                this.departmentValue = this.department[0].id
2143
-
2144
-              }else{
2145
-
2146
-                this.doctorValue = this.doctors[0].admin_user_id
2147
-                this.departmentValue = this.department[0].id
2148
-
2149
-              }
2150
-
2151
-
2152
-            }
2153
-
2154
-            if (info.register_type == 0) {
2155
-              for (let i = 0; i < this.register.length; i++) {
2156
-                this.register_type = this.register[0].value
2157
-              }
2158
-            } else {
2159
-              this.register_type = info.register_type
2160
-            }
2161
-            this.diagnose = []
2162
-
2163
-            if(info.id == 0){
2164
-              if(last_info.diagnosis.length == 0){
2165
-                this.diagnose = []
2166
-              }else{
2167
-                for(let i = 0; i < last_info.diagnosis.split(",").length;i++){
2168
-                  this.diagnose.push(parseInt(last_info.diagnosis.split(",")[i]))
2169
-
2170
-                }
2171
-              }
2172
-
2173
-              if(last_info.sick_history == 0){
2174
-                this.state2 = ''
2175
-              }else{
2176
-                this.state2 = last_info.sick_history
2177
-              }
2178
-
2179
-
2180
-            }else{
2181 1975
               this.state2 = info.sick_history
2182 1976
               if (this.state2 == 0) {
2183 1977
                 this.state2 = ''
2184 1978
               }
2185
-              if(info.diagnosis.length == 0){
1979
+              if (info.diagnosis.length == 0) {
2186 1980
                 this.diagnose = []
2187
-              }else{
2188
-                for(let i = 0; i < info.diagnosis.split(",").length;i++){
2189
-                  this.diagnose.push(parseInt(info.diagnosis.split(",")[i]))
1981
+              } else {
1982
+                for (let i = 0; i < info.diagnosis.split(",").length; i++) {
1983
+                  this.diagnose.push(parseInt(info.diagnosis.split(',')[i]))
2190 1984
 
2191 1985
                 }
2192 1986
 
@@ -2194,18 +1988,16 @@
2194 1988
 
2195 1989
             }
2196 1990
 
2197
-
2198
-
2199 1991
             this.state1 = info.sick_type
2200
-            if (this.state1 == 0 || this.state1 == "") {
1992
+            if (this.state1 == 0 || this.state1 == '') {
2201 1993
               this.state1 = ''
2202 1994
               for (let i = 0; i < this.sick.length; i++) {
2203 1995
                 this.state1 = this.sick[0].id
2204 1996
               }
2205 1997
             }
2206 1998
 
2207
-            if(this.departmentValue == "" || this.departmentValue == 0){
2208
-              if(this.department.length > 0){
1999
+            if (this.departmentValue == '' || this.departmentValue == 0) {
2000
+              if (this.department.length > 0) {
2209 2001
                 this.departmentValue = this.department[0].id
2210 2002
 
2211 2003
               }
@@ -2215,7 +2007,6 @@
2215 2007
         })
2216 2008
 
2217 2009
       },
2218
-
2219 2010
       moreState(tab, event) {
2220 2011
         if (tab == 'more') {
2221 2012
           return false
@@ -2308,16 +2099,16 @@
2308 2099
             }
2309 2100
           }
2310 2101
           for (let i = 0; i < this.prescriptions.length; i++) {
2311
-              if (this.prescriptions[i].med_type == 0 || this.prescriptions[i].med_type == '') {
2312
-                this.$message.error('处方医疗类型不能为空')
2313
-                return
2314
-              }
2102
+            if (this.prescriptions[i].med_type == 0 || this.prescriptions[i].med_type == '') {
2103
+              this.$message.error('处方医疗类型不能为空')
2104
+              return
2105
+            }
2315 2106
           }
2316 2107
           if (index == 1) {
2317 2108
             let params = {
2318 2109
               p_type: 2,
2319 2110
               patient_id: this.patientInfo.id,
2320
-              diagnose: this.diagnose.join(","),
2111
+              diagnose: this.diagnose.join(','),
2321 2112
               sick_type: this.state1,
2322 2113
               sick_history: this.state2,
2323 2114
               doctor: this.doctorValue,
@@ -2342,7 +2133,6 @@
2342 2133
                 this.prescriptions[i].advices[b].day = parseInt(this.prescriptions[i].advices[b].day)
2343 2134
                 this.prescriptions[i].advices[b].groupno = parseInt(this.prescriptions[i].advices[b].groupno)
2344 2135
 
2345
-
2346 2136
               }
2347 2137
 
2348 2138
               for (let b = 0; b < this.prescriptions[i].project.length; b++) {
@@ -2364,21 +2154,21 @@
2364 2154
               'prescriptions': this.prescriptions
2365 2155
             }
2366 2156
             isLoading = true
2367
-            console.log('this.prescriptionsthis.prescriptions',this.prescriptions)
2157
+            console.log('this.prescriptionsthis.prescriptions', this.prescriptions)
2368 2158
             let num = 0
2369 2159
             this.prescriptions.map(item => {
2370
-              if(item.advices.length > 0){
2160
+              if (item.advices.length > 0) {
2371 2161
                 item.advices.map(it => {
2372
-                  if(it.drug.total <= 0){
2162
+                  if (it.drug.total <= 0) {
2373 2163
                     num++
2374
-                    setTimeout(() =>{
2164
+                    setTimeout(() => {
2375 2165
                       this.$message.error(it.drug.drug_name + '库存不足')
2376
-                    },100)
2166
+                    }, 100)
2377 2167
                   }
2378 2168
                 })
2379 2169
               }
2380 2170
             })
2381
-            if(num == 0){
2171
+            if (num == 0) {
2382 2172
               createHisPrescription(data, params).then(response => {
2383 2173
                 if (response.data.state == 1) {
2384 2174
                   this.$emit('change', this.patientInfo.id)
@@ -2415,7 +2205,7 @@
2415 2205
             if (index == 1) {
2416 2206
               let params = {
2417 2207
                 patient_id: this.patientInfo.id,
2418
-                diagnose: this.diagnose.join(","),
2208
+                diagnose: this.diagnose.join(','),
2419 2209
                 sick_type: this.state1,
2420 2210
                 sick_history: this.state2,
2421 2211
                 doctor: this.doctorValue,
@@ -2510,17 +2300,14 @@
2510 2300
           advices: [],
2511 2301
           project: [],
2512 2302
           addition: [],
2513
-          pre_time: this.prescriptions[0].pre_time,
2514
-
2303
+          pre_time: this.prescriptions[0].pre_time
2515 2304
 
2516 2305
         }
2517 2306
 
2518
-          obj.med_type = 14
2519
-
2307
+        obj.med_type = 14
2520 2308
 
2521 2309
         this.prescriptions.push(obj)
2522 2310
 
2523
-
2524 2311
         this.editableTabsValue = newTabName
2525 2312
         this.curPrescriptions = this.prescriptions[this.prescriptions.length - 1]
2526 2313
         this.curStatus = 0
@@ -2719,17 +2506,17 @@
2719 2506
         this.$refs.additionalCharges.show()
2720 2507
       },
2721 2508
       selectDrugs(selection, row) {
2722
-        console.log('selection',selection)
2723
-        console.log('row',row)
2724
-        if(row.total <= 0){
2509
+        console.log('selection', selection)
2510
+        console.log('row', row)
2511
+        if (row.total <= 0) {
2725 2512
           if (selection) {
2726 2513
             selection.forEach(row => {
2727
-              if(row.total <= 0){
2728
-                this.$refs.multipleTable.toggleRowSelection(row);
2514
+              if (row.total <= 0) {
2515
+                this.$refs.multipleTable.toggleRowSelection(row)
2729 2516
               }
2730
-            });
2517
+            })
2731 2518
           } else {
2732
-            this.$refs.multipleTable.clearSelection();
2519
+            this.$refs.multipleTable.clearSelection()
2733 2520
           }
2734 2521
           this.$message.error(row.drug_name + '库存不足')
2735 2522
           return
@@ -2739,8 +2526,8 @@
2739 2526
 
2740 2527
       comfirm() {
2741 2528
 
2742
-       if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0){
2743
-          if(this.$store.getters.xt_user.org_id == 10138) {
2529
+        if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
2530
+          if (this.$store.getters.xt_user.org_id == 10138) {
2744 2531
             for (let i = 0; i < this.curDrugs.length; i++) {
2745 2532
               if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
2746 2533
                 this.$message.error('该处方属于特病类型处方,开非特病类型的药')
@@ -2751,9 +2538,8 @@
2751 2538
           }
2752 2539
         }
2753 2540
 
2754
-
2755
-        if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0){
2756
-          if(this.$store.getters.xt_user.org_id == 10138) {
2541
+        if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
2542
+          if (this.$store.getters.xt_user.org_id == 10138) {
2757 2543
             for (let i = 0; i < this.curDrugs.length; i++) {
2758 2544
               if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
2759 2545
                 this.$message.error('该处方属于特病类型处方,开非特病类型的药')
@@ -2764,7 +2550,6 @@
2764 2550
           }
2765 2551
         }
2766 2552
 
2767
-
2768 2553
         // if (this.curPrescriptions.order_status == 2) {
2769 2554
         //   this.$message.error('该处方已经结算,无法继续添加药品或者项目')
2770 2555
         //   this.teamList = []
@@ -2836,9 +2621,9 @@
2836 2621
             var temp2 = this.deepClone(this.teamList)
2837 2622
 
2838 2623
             var temp3 = this.deepClone(templateDrugs)
2839
-            console.log("hhhhhhhhhhhhhh",temp)
2840
-            console.log("hhhh23",temp2)
2841
-            console.log("hhhh23",temp3)
2624
+            console.log('hhhhhhhhhhhhhh', temp)
2625
+            console.log('hhhh23', temp2)
2626
+            console.log('hhhh23', temp3)
2842 2627
             if (temp3.length > 0) {
2843 2628
               for (let b = 0; b < temp3.length; b++) {
2844 2629
                 let obj = {
@@ -2850,7 +2635,7 @@
2850 2635
                   execution_frequency: temp3[b].execution_frequency,
2851 2636
                   retail_price: temp3[b].drug.retail_price.toString(),
2852 2637
                   remark: '',
2853
-                  day: "1",
2638
+                  day: '1',
2854 2639
                   prescribing_number: temp3[b].prescribing_number,
2855 2640
                   single_dose_unit: temp3[b].drug.dose_unit,
2856 2641
                   prescribing_number_unit: temp3[b].drug.prescribing_number_unit,
@@ -2868,7 +2653,7 @@
2868 2653
 
2869 2654
             let index = 0
2870 2655
 
2871
-            if(this.curPrescriptions.advices.length > 0){
2656
+            if (this.curPrescriptions.advices.length > 0) {
2872 2657
               index = this.curPrescriptions.advices.length
2873 2658
             }
2874 2659
 
@@ -2890,13 +2675,13 @@
2890 2675
                   prescribing_number_unit: temp[b].prescribing_number_unit,
2891 2676
                   medical_insurance_number: temp[b].medical_insurance_number,
2892 2677
                   drug: temp[b],
2893
-                  groupno:index+temp_index,
2678
+                  groupno: index + temp_index
2894 2679
                 }
2895 2680
 
2896 2681
                 if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {
2897 2682
                   obj.prescribing_number = 1
2898 2683
                 }
2899
-                console.log('obj',obj)
2684
+                console.log('obj', obj)
2900 2685
                 this.prescriptions[i].advices.push(obj)
2901 2686
               }
2902 2687
               this.curStatus = 1
@@ -2925,7 +2710,7 @@
2925 2710
                   delivery_way: temp2[b].delivery_way,
2926 2711
                   execution_frequency: temp2[b].execution_frequency,
2927 2712
                   number_days: temp2[b].number_days.toString(),
2928
-                  total:  temp2[b].cus_total,
2713
+                  total: temp2[b].cus_total,
2929 2714
                   price: temp2[b].price,
2930 2715
                   remark: '',
2931 2716
                   medical_code: temp2[b].medical_code,
@@ -2938,7 +2723,7 @@
2938 2723
                 if (obj.type == 3) {
2939 2724
                   obj.single_dose = 1
2940 2725
                 }
2941
-                console.log('项目obj',temp2)
2726
+                console.log('项目obj', temp2)
2942 2727
                 this.prescriptions[i].project.push(obj)
2943 2728
               }
2944 2729
               this.curStatus = 2
@@ -2959,15 +2744,15 @@
2959 2744
         this.teamList = row
2960 2745
       },
2961 2746
       selectChange(selection, row) {
2962
-        if(row.total <= 0){
2747
+        if (row.total <= 0) {
2963 2748
           if (selection) {
2964 2749
             selection.forEach(row => {
2965
-              if(row.total <= 0){
2966
-                this.$refs.tables.toggleRowSelection(row);
2750
+              if (row.total <= 0) {
2751
+                this.$refs.tables.toggleRowSelection(row)
2967 2752
               }
2968
-            });
2753
+            })
2969 2754
           } else {
2970
-            this.$refs.tables.clearSelection();
2755
+            this.$refs.tables.clearSelection()
2971 2756
           }
2972 2757
           this.$message.error(row.project_name + '库存不足')
2973 2758
           return
@@ -2990,10 +2775,10 @@
2990 2775
                 number_days: project[i].number_days,
2991 2776
                 price: project[i].price,
2992 2777
                 medical_code: project[i].medical_code,
2993
-                cus_total:1,
2778
+                cus_total: 1,
2994 2779
                 unit: project[i].unit,
2995 2780
                 type: 2,
2996
-                total:project[i].total
2781
+                total: project[i].total
2997 2782
               }
2998 2783
 
2999 2784
               this.tabProject.push(obj)
@@ -3010,12 +2795,12 @@
3010 2795
                 delivery_way: '',
3011 2796
                 execution_frequency: '',
3012 2797
                 number_days: 1,
3013
-                cus_total:1,
2798
+                cus_total: 1,
3014 2799
                 price: good_info[i].packing_price,
3015 2800
                 medical_code: good_info[i].medical_insurance_number,
3016 2801
                 unit: this.getGoodUnit(good_info[i].good_unit),
3017 2802
                 type: 3,
3018
-                total:good_info[i].total
2803
+                total: good_info[i].total
3019 2804
               }
3020 2805
               this.tabProject.push(obj)
3021 2806
             }
@@ -3053,7 +2838,6 @@
3053 2838
             this.tabPrjectTeam = team
3054 2839
             this.allTabPrjectTeam = team
3055 2840
 
3056
-
3057 2841
             this.projectList = team
3058 2842
           }
3059 2843
         })
@@ -3104,7 +2888,7 @@
3104 2888
                   delivery_way: project[i].project.delivery_way,
3105 2889
                   execution_frequency: project[i].project.execution_frequency,
3106 2890
                   number_days: project[i].project.number_days,
3107
-                  cus_total:project[i].number,
2891
+                  cus_total: project[i].number,
3108 2892
                   price: project[i].project.price,
3109 2893
                   remark: '',
3110 2894
                   medical_code: project[i].project.medical_code,
@@ -3156,13 +2940,15 @@
3156 2940
       },
3157 2941
       changeDayOrMonth(tab) {
3158 2942
         if (this.dayorMonth == 'day') {
3159
-
2943
+          this.$emit('day')
3160 2944
         } else if (this.dayorMonth == 'month') {
2945
+          console.log('~~~~~~')
3161 2946
           let form = {
3162 2947
             id: this.patientInfo.id,
3163
-            his_patient_id: this.hisPatientInfo.id,
2948
+            his_patient_id: this.hisPatientInfo.id
3164 2949
           }
3165
-          this.$emit("change-month",form)
2950
+          console.log(form)
2951
+          this.$emit('month', form)
3166 2952
         }
3167 2953
       },
3168 2954
       getAllProjectList() {

Файловите разлики са ограничени, защото са твърде много
+ 1600 - 1637
src/xt_pages/outpatientDoctorStation/doctorDesk.vue