Browse Source

提交代码

陈少旭 1 year ago
parent
commit
11d843883a
1 changed files with 101 additions and 97 deletions
  1. 101 97
      src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue

+ 101 - 97
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

12
     <div class="mainCenter" v-loading="loading">
12
     <div class="mainCenter" v-loading="loading">
13
       <div class="centerLeft">
13
       <div class="centerLeft">
14
         <div v-if="prescriptions[0].id >0 && (org_id == 10454) ">
14
         <div v-if="prescriptions[0].id >0 && (org_id == 10454) ">
15
-        <el-button style="width: 100px" size="small" @click="callElePre(1)" type="primary">处方预核验</el-button>
16
-        <el-button style="width: 100px"  size="small" @click="callElePre(2)" type="primary">处方签名</el-button>
17
-        <el-button style="width: 100px"  size="small" @click="callElePre(3)" type="primary">处方上传</el-button>
18
-        <el-button style="width: 100px"  size="small" @click="callElePre(4)" type="primary">处方撤销</el-button>
19
-        <el-button style="width: 100px"  size="small" @click="callElePre(5)" type="primary">处方信息查询</el-button>
20
-        <el-button style="width: 100px"  size="small" @click="callElePre(6)" type="primary">处方审核结果查询</el-button>
21
-          <el-button style="width: 100px"  size="small" @click="callElePre(7)" type="primary">处方取药结果查询</el-button>
22
-          <el-button style="width: 100px"  size="small" @click="callElePre(8)" type="primary">药品在售查询</el-button>
15
+          <el-button style="width: 100px" size="small" @click="callElePre(1)" type="primary">处方预核验</el-button>
16
+          <el-button style="width: 100px" size="small" @click="callElePre(2)" type="primary">处方签名</el-button>
17
+          <el-button style="width: 100px" size="small" @click="callElePre(3)" type="primary">处方上传</el-button>
18
+          <el-button style="width: 100px" size="small" @click="callElePre(4)" type="primary">处方撤销</el-button>
19
+          <el-button style="width: 100px" size="small" @click="callElePre(5)" type="primary">处方信息查询</el-button>
20
+          <el-button style="width: 100px" size="small" @click="callElePre(6)" type="primary">处方审核结果查询
21
+          </el-button>
22
+          <el-button style="width: 100px" size="small" @click="callElePre(7)" type="primary">处方取药结果查询
23
+          </el-button>
24
+          <el-button style="width: 100px" size="small" @click="callElePre(8)" type="primary">药品在售查询</el-button>
23
 
25
 
24
 
26
 
25
         </div>
27
         </div>
329
                     <el-table-column label="规格" width="60" v-if="org_id != 10206">
331
                     <el-table-column label="规格" width="60" v-if="org_id != 10206">
330
                       <template slot-scope="scope">
332
                       <template slot-scope="scope">
331
                         <span
333
                         <span
332
-                          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 }}
334
+                          v-if="scope.row.min_unit != scope.row.dose_unit">{{ scope.row.dose }}{{ scope.row.dose_unit }}&nbsp;* &nbsp;</span>{{
335
+                          scope.row.min_number
336
+                        }}{{ scope.row.min_unit }}/{{ scope.row.max_unit }}
333
                       </template>
337
                       </template>
334
                     </el-table-column>
338
                     </el-table-column>
335
 
339
 
341
                        </span>
345
                        </span>
342
                        <span v-else> {{scope.row.total}}{{scope.row.total?scope.row.min_unit:''}}</span> -->
346
                        <span v-else> {{scope.row.total}}{{scope.row.total?scope.row.min_unit:''}}</span> -->
343
                         <span
347
                         <span
344
-                          v-if="scope.row.sum_count >0 && scope.row.max_unit!=scope.row.min_unit && scope.row.sum_count/scope.row.min_number >0">{{ Math.floor(scope.row.sum_count / scope.row.min_number) }}{{ scope.row.max_unit }}</span>
348
+                          v-if="scope.row.sum_count >0 && scope.row.max_unit!=scope.row.min_unit && scope.row.sum_count/scope.row.min_number >0">{{
349
+                            Math.floor(scope.row.sum_count / scope.row.min_number)
350
+                          }}{{ scope.row.max_unit }}</span>
345
                         <span
351
                         <span
346
-                          v-if="scope.row.sum_count >0 && scope.row.max_unit!=scope.row.min_unit && scope.row.sum_count%scope.row.min_number >0">{{ Math.floor(scope.row.sum_count % scope.row.min_number) }}{{ scope.row.min_unit }}</span>
352
+                          v-if="scope.row.sum_count >0 && scope.row.max_unit!=scope.row.min_unit && scope.row.sum_count%scope.row.min_number >0">{{
353
+                            Math.floor(scope.row.sum_count % scope.row.min_number)
354
+                          }}{{ scope.row.min_unit }}</span>
347
                         <span
355
                         <span
348
-                          v-if="scope.row.sum_count >0 && scope.row.max_unit == scope.row.min_unit">{{ scope.row.sum_count }}{{ scope.row.max_unit }}</span>
356
+                          v-if="scope.row.sum_count >0 && scope.row.max_unit == scope.row.min_unit">{{
357
+                            scope.row.sum_count
358
+                          }}{{ scope.row.max_unit }}</span>
349
                       </template>
359
                       </template>
350
                     </el-table-column>
360
                     </el-table-column>
351
 
361
 
452
                         </span>
462
                         </span>
453
                         <span v-else> {{ scope.row.total }}</span> -->
463
                         <span v-else> {{ scope.row.total }}</span> -->
454
                         <span
464
                         <span
455
-                          v-if="org_id != 10206 && scope.row.type == 3 && scope.row.good_info.sum_count > 0">{{ scope.row.good_info.sum_count }}</span>
465
+                          v-if="org_id != 10206 && scope.row.type == 3 && scope.row.good_info.sum_count > 0">{{
466
+                            scope.row.good_info.sum_count
467
+                          }}</span>
456
                         <!--                                            //针对坐标系统的库存数据-->
468
                         <!--                                            //针对坐标系统的库存数据-->
457
                         <span v-if="org_id == 10206 && scope.row.type == 3">{{ scope.row.zuobiao_stock_num }}</span>
469
                         <span v-if="org_id == 10206 && scope.row.type == 3">{{ scope.row.zuobiao_stock_num }}</span>
458
 
470
 
1523
         var hours = nowDate.getHours()
1535
         var hours = nowDate.getHours()
1524
         var min = nowDate.getMinutes()
1536
         var min = nowDate.getMinutes()
1525
 
1537
 
1526
-        var preTime = ""
1538
+        var preTime = ''
1527
         var nowTime =
1539
         var nowTime =
1528
           nowYear +
1540
           nowYear +
1529
           '-' +
1541
           '-' +
1531
           '-' +
1543
           '-' +
1532
           (nowDay < 10 ? '0' + nowDay : nowDay) + ' ' + (hours < 10 ? '0' + hours : hours) +
1544
           (nowDay < 10 ? '0' + nowDay : nowDay) + ' ' + (hours < 10 ? '0' + hours : hours) +
1533
           ':' + (min < 10 ? '0' + min : min)
1545
           ':' + (min < 10 ? '0' + min : min)
1534
-        if(nowTime.split(" ")[0] != this.record_date){
1535
-          if(this.org_id == 10206  || this.org_id == 0) {
1536
-            preTime = this.record_date+ ' '  + (hours < 10 ? '0' + hours : hours) +
1546
+        if (nowTime.split(' ')[0] != this.record_date) {
1547
+          if (this.org_id == 10206 || this.org_id == 0) {
1548
+            preTime = this.record_date + ' ' + (hours < 10 ? '0' + hours : hours) +
1537
               ':' + (min < 10 ? '0' + min : min)
1549
               ':' + (min < 10 ? '0' + min : min)
1538
-          }else {
1550
+          } else {
1539
             preTime = this.record_date + ' ' + (hours < 10 ? '0' + hours : hours) +
1551
             preTime = this.record_date + ' ' + (hours < 10 ? '0' + hours : hours) +
1540
               ':' + (min < 10 ? '0' + min : min)
1552
               ':' + (min < 10 ? '0' + min : min)
1541
           }
1553
           }
1596
         '-' +
1608
         '-' +
1597
         (nowDay < 10 ? '0' + nowDay : nowDay) + ' ' + (hours < 10 ? '0' + hours : hours) +
1609
         (nowDay < 10 ? '0' + nowDay : nowDay) + ' ' + (hours < 10 ? '0' + hours : hours) +
1598
         ':' + (min < 10 ? '0' + min : min)
1610
         ':' + (min < 10 ? '0' + min : min)
1599
-      var preTime  = ""
1600
-      console.log(nowTime.split(" ")[0] )
1611
+      var preTime = ''
1612
+      console.log(nowTime.split(' ')[0])
1601
       console.log(this.record_date)
1613
       console.log(this.record_date)
1602
 
1614
 
1603
-      if(nowTime.split(" ")[0] != this.record_date){
1604
-          preTime = this.record_date + ' ' + (hours < 10 ? '0' + hours : hours) +
1605
-            ':' + (min < 10 ? '0' + min : min)
1615
+      if (nowTime.split(' ')[0] != this.record_date) {
1616
+        preTime = this.record_date + ' ' + (hours < 10 ? '0' + hours : hours) +
1617
+          ':' + (min < 10 ? '0' + min : min)
1606
       } else {
1618
       } else {
1607
         preTime = nowTime
1619
         preTime = nowTime
1608
       }
1620
       }
1609
 
1621
 
1610
-
1611
-
1612
-
1613
       for (let i = 0; i < this.prescriptions.length; i++) {
1622
       for (let i = 0; i < this.prescriptions.length; i++) {
1614
         this.prescriptions[i].name = '处方' + (i + 1)
1623
         this.prescriptions[i].name = '处方' + (i + 1)
1615
         this.prescriptions[i]['pre_time'] = preTime
1624
         this.prescriptions[i]['pre_time'] = preTime
3268
         (nowDay < 10 ? '0' + nowDay : nowDay) + ' ' + (hours < 10 ? '0' + hours : hours) +
3277
         (nowDay < 10 ? '0' + nowDay : nowDay) + ' ' + (hours < 10 ? '0' + hours : hours) +
3269
         ':' + (min < 10 ? '0' + min : min)
3278
         ':' + (min < 10 ? '0' + min : min)
3270
 
3279
 
3271
-
3272
-      var preTime  = ""
3273
-      console.log(nowTime.split(" ")[0] )
3280
+      var preTime = ''
3281
+      console.log(nowTime.split(' ')[0])
3274
       console.log(this.record_date)
3282
       console.log(this.record_date)
3275
 
3283
 
3276
-      if(nowTime.split(" ")[0] != this.record_date){
3284
+      if (nowTime.split(' ')[0] != this.record_date) {
3277
 
3285
 
3278
-            preTime = this.record_date + ' ' + (hours < 10 ? '0' + hours : hours) +
3279
-              ':' + (min < 10 ? '0' + min : min)
3286
+        preTime = this.record_date + ' ' + (hours < 10 ? '0' + hours : hours) +
3287
+          ':' + (min < 10 ? '0' + min : min)
3280
 
3288
 
3281
       } else {
3289
       } else {
3282
         preTime = nowTime
3290
         preTime = nowTime
3283
       }
3291
       }
3284
 
3292
 
3285
-
3286
-
3287
       let obj = {
3293
       let obj = {
3288
         id: 0,
3294
         id: 0,
3289
         name: newTabName,
3295
         name: newTabName,
3533
       //     }
3539
       //     }
3534
       // }
3540
       // }
3535
 
3541
 
3536
-      if(row.is_user!=1 &&  this.org_id != 10206){
3537
-        console.log("row.sum_count",row)
3542
+      if (row.is_user != 1 && this.org_id != 10206) {
3543
+        console.log('row.sum_count', row)
3538
         if (row.sum_count <= 0) {
3544
         if (row.sum_count <= 0) {
3539
-        if (selection) {
3540
-          selection.forEach(row => {
3541
-            if(row.is_project!=1){
3542
-              if ( row.sum_count <= 0) {
3543
-                this.$refs.multipleTable.toggleRowSelection(row)
3545
+          if (selection) {
3546
+            selection.forEach(row => {
3547
+              if (row.is_project != 1) {
3548
+                if (row.sum_count <= 0) {
3549
+                  this.$refs.multipleTable.toggleRowSelection(row)
3550
+                }
3544
               }
3551
               }
3545
-            }
3546
 
3552
 
3547
-          })
3548
-        } else {
3549
-          this.$refs.multipleTable.clearSelection()
3550
-        }
3551
-        if (row.is_project == 0 || row.is_project == 2){
3552
-          this.$message.error(row.drug_name + '库存不足')
3553
-          return
3553
+            })
3554
+          } else {
3555
+            this.$refs.multipleTable.clearSelection()
3556
+          }
3557
+          if (row.is_project == 0 || row.is_project == 2) {
3558
+            this.$message.error(row.drug_name + '库存不足')
3559
+            return
3560
+          }
3554
         }
3561
         }
3555
-       }
3556
       }
3562
       }
3557
 
3563
 
3558
-
3559
-
3560
-      if(this.org_id == 10206){
3564
+      if (this.org_id == 10206) {
3561
         if (row.zuobiao_stock_num <= 0) {
3565
         if (row.zuobiao_stock_num <= 0) {
3562
           if (selection) {
3566
           if (selection) {
3563
             selection.forEach(row => {
3567
             selection.forEach(row => {
3753
               if (that.curPrescriptions.advices.length > 0) {
3757
               if (that.curPrescriptions.advices.length > 0) {
3754
                 index = that.curPrescriptions.advices.length
3758
                 index = that.curPrescriptions.advices.length
3755
               }
3759
               }
3756
-              let maxIndexAdvice =null
3760
+              let maxIndexAdvice = null
3757
               if (that.curPrescriptions.advices.length > 0) {
3761
               if (that.curPrescriptions.advices.length > 0) {
3758
                 for (let i = 0; i < that.curPrescriptions.advices.length; i++) {
3762
                 for (let i = 0; i < that.curPrescriptions.advices.length; i++) {
3759
                   // 获取当前对象
3763
                   // 获取当前对象
3934
             }
3938
             }
3935
 
3939
 
3936
             let tempMaxIndexAdvice = {
3940
             let tempMaxIndexAdvice = {
3937
-              groupno:0
3941
+              groupno: 0
3938
             }
3942
             }
3939
-            let maxIndexAdvice =null
3943
+            let maxIndexAdvice = null
3940
             if (this.curPrescriptions.advices.length > 0) {
3944
             if (this.curPrescriptions.advices.length > 0) {
3941
               for (let i = 0; i < this.curPrescriptions.advices.length; i++) {
3945
               for (let i = 0; i < this.curPrescriptions.advices.length; i++) {
3942
                 // 获取当前对象
3946
                 // 获取当前对象
4118
 
4122
 
4119
       // }
4123
       // }
4120
 
4124
 
4121
-      if (row.stock_count <= 0 &&  this.org_id != 10206 && this.org_id != 0) {
4122
-         if (row.type == 3) {
4123
-           if (selection) {
4124
-             selection.forEach(row => {
4125
-               if (row.stock_count <= 0) {
4126
-                 this.$refs.tables.toggleRowSelection(row)
4127
-               }
4128
-             })
4129
-           } else {
4130
-             this.$refs.tables.clearSelection()
4131
-           }
4132
-           this.$message.error(row.project_name + '库存不足')
4133
-           return
4134
-       }
4125
+      if (row.stock_count <= 0 && this.org_id != 10206 && this.org_id != 0) {
4126
+        if (row.type == 3) {
4127
+          if (selection) {
4128
+            selection.forEach(row => {
4129
+              if (row.stock_count <= 0) {
4130
+                this.$refs.tables.toggleRowSelection(row)
4131
+              }
4132
+            })
4133
+          } else {
4134
+            this.$refs.tables.clearSelection()
4135
+          }
4136
+          this.$message.error(row.project_name + '库存不足')
4137
+          return
4138
+        }
4135
       }
4139
       }
4136
 
4140
 
4137
-      if ( this.org_id == 10206 && row.zuobiao_stock_num <= 0) {
4141
+      if (this.org_id == 10206 && row.zuobiao_stock_num <= 0) {
4138
         if (row.type == 3) {
4142
         if (row.type == 3) {
4139
           if (selection) {
4143
           if (selection) {
4140
             selection.forEach(row => {
4144
             selection.forEach(row => {
4407
     },
4411
     },
4408
     clearSelection() {
4412
     clearSelection() {
4409
       this.$refs.tabProjectTeam.clearSelection()
4413
       this.$refs.tabProjectTeam.clearSelection()
4410
-    },callElePre(type){
4411
-      switch (type){
4414
+    }, callElePre(type) {
4415
+      switch (type) {
4412
         case 1:
4416
         case 1:
4413
-          var  that = this
4417
+          var that = this
4414
           let params = {
4418
           let params = {
4415
-            'admin_user_id':3626,
4419
+            'admin_user_id': 3626,
4416
             'patient_id': this.patientInfo.id,
4420
             'patient_id': this.patientInfo.id,
4417
             'his_patient_id': this.hisPatientInfo.id,
4421
             'his_patient_id': this.hisPatientInfo.id,
4418
-            'record_time':this.record_date
4422
+            'record_time': this.record_date
4419
           }
4423
           }
4420
           axios.get('http://127.0.0.1:9532/api/CFYLJG001', {
4424
           axios.get('http://127.0.0.1:9532/api/CFYLJG001', {
4421
             params: params
4425
             params: params
4449
 
4453
 
4450
           break
4454
           break
4451
         case 2:
4455
         case 2:
4452
-          var  that = this
4456
+          var that = this
4453
           let params2 = {
4457
           let params2 = {
4454
-            'admin_user_id':3626,
4458
+            'admin_user_id': 3626,
4455
             'patient_id': this.patientInfo.id,
4459
             'patient_id': this.patientInfo.id,
4456
             'his_patient_id': this.hisPatientInfo.id,
4460
             'his_patient_id': this.hisPatientInfo.id,
4457
-            'record_time':this.record_date
4461
+            'record_time': this.record_date
4458
           }
4462
           }
4459
           axios.get('http://127.0.0.1:9532/api/CFYLJG002', {
4463
           axios.get('http://127.0.0.1:9532/api/CFYLJG002', {
4460
             params: params2
4464
             params: params2
4487
             })
4491
             })
4488
           break
4492
           break
4489
         case 3:
4493
         case 3:
4490
-          var  that = this
4494
+          var that = this
4491
           let params3 = {
4495
           let params3 = {
4492
-            'admin_user_id':3626,
4496
+            'admin_user_id': 3626,
4493
             'patient_id': this.patientInfo.id,
4497
             'patient_id': this.patientInfo.id,
4494
             'his_patient_id': this.hisPatientInfo.id,
4498
             'his_patient_id': this.hisPatientInfo.id,
4495
-            'record_time':this.record_date
4499
+            'record_time': this.record_date
4496
           }
4500
           }
4497
           axios.get('http://127.0.0.1:9532/api/CFYLJG003', {
4501
           axios.get('http://127.0.0.1:9532/api/CFYLJG003', {
4498
             params: params3
4502
             params: params3
4525
             })
4529
             })
4526
           break
4530
           break
4527
         case 4:
4531
         case 4:
4528
-          var  that = this
4532
+          var that = this
4529
           let params4 = {
4533
           let params4 = {
4530
-            'admin_user_id':3626,
4534
+            'admin_user_id': 3626,
4531
             'patient_id': this.patientInfo.id,
4535
             'patient_id': this.patientInfo.id,
4532
             'his_patient_id': this.hisPatientInfo.id,
4536
             'his_patient_id': this.hisPatientInfo.id,
4533
-            'record_time':this.record_date
4537
+            'record_time': this.record_date
4534
           }
4538
           }
4535
           axios.get('http://127.0.0.1:9532/api/CFYLJG004', {
4539
           axios.get('http://127.0.0.1:9532/api/CFYLJG004', {
4536
             params: params4
4540
             params: params4
4563
             })
4567
             })
4564
           break
4568
           break
4565
         case 5:
4569
         case 5:
4566
-          var  that = this
4570
+          var that = this
4567
           let params5 = {
4571
           let params5 = {
4568
-            'admin_user_id':3626,
4572
+            'admin_user_id': 3626,
4569
             'patient_id': this.patientInfo.id,
4573
             'patient_id': this.patientInfo.id,
4570
             'his_patient_id': this.hisPatientInfo.id,
4574
             'his_patient_id': this.hisPatientInfo.id,
4571
-            'record_time':this.record_date
4575
+            'record_time': this.record_date
4572
           }
4576
           }
4573
           axios.get('http://127.0.0.1:9532/api/CFYLJG005', {
4577
           axios.get('http://127.0.0.1:9532/api/CFYLJG005', {
4574
             params: params5
4578
             params: params5
4601
             })
4605
             })
4602
           break
4606
           break
4603
         case 6:
4607
         case 6:
4604
-          var  that = this
4608
+          var that = this
4605
           let params6 = {
4609
           let params6 = {
4606
-            'admin_user_id':3626,
4610
+            'admin_user_id': 3626,
4607
             'patient_id': this.patientInfo.id,
4611
             'patient_id': this.patientInfo.id,
4608
             'his_patient_id': this.hisPatientInfo.id,
4612
             'his_patient_id': this.hisPatientInfo.id,
4609
-            'record_time':this.record_date
4613
+            'record_time': this.record_date
4610
           }
4614
           }
4611
           axios.get('http://127.0.0.1:9532/api/CFYLJG006', {
4615
           axios.get('http://127.0.0.1:9532/api/CFYLJG006', {
4612
             params: params6
4616
             params: params6
4639
             })
4643
             })
4640
           break
4644
           break
4641
         case 7:
4645
         case 7:
4642
-          var  that = this
4646
+          var that = this
4643
           let params7 = {
4647
           let params7 = {
4644
-            'admin_user_id':3626,
4648
+            'admin_user_id': 3626,
4645
             'patient_id': this.patientInfo.id,
4649
             'patient_id': this.patientInfo.id,
4646
             'his_patient_id': this.hisPatientInfo.id,
4650
             'his_patient_id': this.hisPatientInfo.id,
4647
-            'record_time':this.record_date
4651
+            'record_time': this.record_date
4648
           }
4652
           }
4649
           axios.get('http://127.0.0.1:9532/api/CFYLJG007', {
4653
           axios.get('http://127.0.0.1:9532/api/CFYLJG007', {
4650
             params: params7
4654
             params: params7
4677
             })
4681
             })
4678
           break
4682
           break
4679
         case 8:
4683
         case 8:
4680
-          var  that = this
4684
+          var that = this
4681
           let params8 = {
4685
           let params8 = {
4682
-            'admin_user_id':3626,
4686
+            'admin_user_id': 3626,
4683
             'patient_id': this.patientInfo.id,
4687
             'patient_id': this.patientInfo.id,
4684
             'his_patient_id': this.hisPatientInfo.id,
4688
             'his_patient_id': this.hisPatientInfo.id,
4685
-            'record_time':this.record_date
4689
+            'record_time': this.record_date
4686
           }
4690
           }
4687
           axios.get('http://127.0.0.1:9532/api/CFYLJG008', {
4691
           axios.get('http://127.0.0.1:9532/api/CFYLJG008', {
4688
             params: params8
4692
             params: params8