Преглед изворни кода

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

see999 пре 3 година
родитељ
комит
cfdb4ebdb2

+ 18 - 0
src/api/his/his.js Прегледај датотеку

@@ -528,6 +528,24 @@ export function getPrivateExpensesOrder(params) {
528 528
 }
529 529
 
530 530
 
531
+//
532
+export function getMonthCharge(params) {
533
+  return request({
534
+    url: "/api/monthcharge/info",
535
+    method: "get",
536
+    params:params,
537
+  });
538
+}
539
+
540
+export function getMonthHisPateintInfo(params) {
541
+  return request({
542
+    url: "/api/monthhispatient/get",
543
+    method: "get",
544
+    params:params,
545
+  });
546
+}
547
+
548
+
531 549
 
532 550
 
533 551
 

+ 8 - 0
src/api/stock.js Прегледај датотеку

@@ -922,3 +922,11 @@ export function getInventoryDetailPrintList(params) {
922 922
     params: params
923 923
   })
924 924
 }
925
+
926
+export function getGoodWarehouseList(params) {
927
+  return request({
928
+    url: '/api/stock/getgoodwarehouselist',
929
+    method: 'Get',
930
+    params: params
931
+  })
932
+}

+ 121 - 2
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue Прегледај датотеку

@@ -440,6 +440,67 @@
440 440
            </template>
441 441
           </el-table-column>
442 442
 
443
+           <el-table-column
444
+            prop="heparin"
445
+            align="center"
446
+            label="累计血容量"
447
+            width="140"
448
+            v-if="isShow('累计血容量')"
449
+          >
450
+           <template slot-scope="scope">
451
+              {{scope.row.accumulated_blood_volume}}
452
+           </template>
453
+          </el-table-column>
454
+
455
+           <el-table-column
456
+            prop="heparin"
457
+            align="center"
458
+            label="血温监测"
459
+            width="140"
460
+            v-if="isShow('血温监测')"
461
+          >
462
+           <template slot-scope="scope">
463
+              {{scope.row.blood_temperature}}
464
+           </template>
465
+          </el-table-column>
466
+
467
+           <el-table-column
468
+            prop="heparin"
469
+            align="center"
470
+            label="尿素监测"
471
+            width="140"
472
+            v-if="isShow('尿素监测')"
473
+          >
474
+           <template slot-scope="scope">
475
+              {{scope.row.urea_monitoring}}
476
+           </template>
477
+          </el-table-column>
478
+
479
+          <el-table-column
480
+            prop="heparin"
481
+            align="center"
482
+            label="血浓量"
483
+            width="140"
484
+            v-if="isShow('血浓量')"
485
+          >
486
+           <template slot-scope="scope">
487
+              {{scope.row.blood_thickness}}
488
+           </template>
489
+          </el-table-column>
490
+
491
+         <el-table-column
492
+            prop="heparin"
493
+            align="center"
494
+            label="血压监测"
495
+            width="140"
496
+            v-if="isShow('血压监测')"
497
+          >
498
+           <template slot-scope="scope">
499
+              {{scope.row.blood_monitor}}
500
+           </template>
501
+          </el-table-column>
502
+
503
+
443 504
 
444 505
            <el-table-column
445 506
             prop="heparin"
@@ -714,7 +775,35 @@
714 775
             </el-form-item>
715 776
          </el-col>
716 777
 
778
+          <el-col :span="8" v-if=" isShow('累计血容量')">
779
+            <el-form-item label="累计血容量:">
780
+              <el-input v-model="form.accumulated_blood_volume"></el-input>
781
+            </el-form-item>
782
+          </el-col>
783
+
784
+          <el-col :span="8" v-if=" isShow('血温监测')">
785
+            <el-form-item label="血温监测">
786
+              <el-input v-model="form.blood_temperature"></el-input>
787
+            </el-form-item>
788
+          </el-col>
789
+
790
+          <el-col :span="8" v-if=" isShow('尿素监测')">
791
+            <el-form-item label="尿素监测">
792
+              <el-input v-model="form.urea_monitoring"></el-input>
793
+            </el-form-item>
794
+          </el-col>
717 795
 
796
+          <el-col :span="8" v-if=" isShow('血浓量')">
797
+            <el-form-item label="血浓量">
798
+              <el-input v-model="form.blood_thickness"></el-input>
799
+            </el-form-item>
800
+          </el-col>
801
+
802
+          <el-col :span="8" v-if=" isShow('血压监测')">
803
+            <el-form-item label="血压监测">
804
+              <el-input v-model="form.blood_monitor"></el-input>
805
+            </el-form-item>
806
+          </el-col>
718 807
 
719 808
           <!-- </el-row>
720 809
 
@@ -907,7 +996,12 @@ export default {
907 996
         monitor_anticoagulant:'',
908 997
         monitor_anticoagulant_value:"",
909 998
         blood_pressure_monitoring_site:"",
910
-        complication:""
999
+        complication:"",
1000
+        accumulated_blood_volume:"",
1001
+        blood_temperature:"",
1002
+        urea_monitoring:"",
1003
+        blood_thickness:"",
1004
+        blood_monitor:"",
911 1005
       },
912 1006
 
913 1007
       table_current_row: null,
@@ -1126,7 +1220,11 @@ export default {
1126 1220
         this.form.conductivity = resp.monitor.conductivity?resp.monitor.conductivity:'';
1127 1221
         this.form.monitor_anticoagulant = resp.monitor.monitor_anticoagulant?resp.monitor.monitor_anticoagulant:"";
1128 1222
         this.form.monitor_anticoagulant_value = resp.monitor.monitor_anticoagulant_value?resp.monitor.monitor_anticoagulant_value:""
1129
-
1223
+        this.form.accumulated_blood_volume  = resp.monitor.accumulated_blood_volume?resp.monitor.accumulated_blood_volume:""
1224
+        this.form.blood_temperature = resp.monitor.blood_temperature?resp.monitor.blood_temperature:""
1225
+        this.form.urea_monitoring = resp.monitor.urea_monitoring?resp.monitor.urea_monitoring:""
1226
+        this.form.blood_thickness = resp.monitor.blood_thickness?resp.monitor.blood_thickness:""
1227
+        this.form.blood_monitor = resp.monitor.blood_monitor?resp.monitor.blood_monitor:""
1130 1228
       })
1131 1229
     },
1132 1230
 
@@ -1152,6 +1250,7 @@ export default {
1152 1250
       // console.log("tableCurrentRowChange", currentRow)
1153 1251
     },
1154 1252
     setEditMonitor: function(monitor) {
1253
+      console.log("monitor23223322332",monitor)
1155 1254
       if (monitor == null || monitor == undefined) {
1156 1255
         this.form.id = 0;
1157 1256
         // this.form.operate_date = parseInt((new Date()).getTime() / 1000)
@@ -1190,6 +1289,11 @@ export default {
1190 1289
         this.form.blood_sugar = '';
1191 1290
         this.form.monitor_anticoagulant = '';
1192 1291
         this.form.monitor_anticoagulant_value = ''
1292
+        this.form.accumulated_blood_volume  = ""
1293
+        this.form.blood_temperature = ""
1294
+        this.form.urea_monitoring = ""
1295
+        this.form.blood_thickness = ""
1296
+        this.form.blood_monitor = ""
1193 1297
       } else {
1194 1298
         (this.form.id = monitor.id),
1195 1299
         // this.form.operate_date = monitor.operate_date
@@ -1227,6 +1331,11 @@ export default {
1227 1331
         this.form.blood_sugar = monitor.blood_sugar?monitor.blood_sugar:'';
1228 1332
         this.form.monitor_anticoagulant = monitor.monitor_anticoagulant?monitor.monitor_anticoagulant:'';
1229 1333
         this.form.monitor_anticoagulant_value = monitor.monitor_anticoagulant_value?monitor.monitor_anticoagulant_value:"";
1334
+        this.form.accumulated_blood_volume  = monitor.accumulated_blood_volume?monitor.accumulated_blood_volume:""
1335
+        this.form.blood_temperature = monitor.blood_temperature?monitor.blood_temperature:""
1336
+        this.form.urea_monitoring = monitor.urea_monitoring?monitor.urea_monitoring:""
1337
+        this.form.blood_thickness = monitor.blood_thickness?monitor.blood_thickness:""
1338
+        this.form.blood_monitor = monitor.blood_monitor?monitor.blood_monitor:""
1230 1339
         // 设置三个下拉框的值,直接调用事件偷懒
1231 1340
         this.symptomTextareaBlur();
1232 1341
         this.disposeTextareaBlur();
@@ -1269,6 +1378,11 @@ export default {
1269 1378
       this.form.monitor_anticoagulant_value = this.form.monitor_anticoagulant_value;
1270 1379
       this.form.blood_pressure_monitoring_site = parseInt(this.form.blood_pressure_monitoring_site);
1271 1380
       this.form.complication = parseInt(this.form.complication);
1381
+      this.form.blood_temperature = parseFloat(this.form.blood_temperature) == NaN ? 0 : parseFloat(this.form.blood_temperature);
1382
+      this.form.accumulated_blood_volume = parseFloat(this.form.accumulated_blood_volume) == NaN ? 0 : parseFloat(this.form.accumulated_blood_volume);
1383
+      this.form.urea_monitoring = parseFloat(this.form.urea_monitoring) == NaN ? 0 : parseFloat(this.form.urea_monitoring);
1384
+      this.form.blood_thickness = parseFloat(this.form.blood_thickness) == NaN ? 0 : parseFloat(this.form.blood_thickness);
1385
+      this.form.blood_monitor = parseFloat(this.form.blood_monitor) == NaN ? 0 : parseFloat(this.form.blood_monitor);
1272 1386
       let mode = '1';
1273 1387
       if (this.form.id > 0) {
1274 1388
         mode = '2';
@@ -1329,6 +1443,11 @@ export default {
1329 1443
             this.form.monitor_anticoagulant_value = this.form.monitor_anticoagulant_value;
1330 1444
             this.form.blood_pressure_monitoring_site = this.form.blood_pressure_monitoring_site;
1331 1445
             this.form.complication = this.form.complication;
1446
+            this.form.blood_temperature = parseFloat(this.form.blood_temperature) == NaN ? 0 : parseFloat(this.form.blood_temperature);
1447
+            this.form.accumulated_blood_volume = parseFloat(this.form.accumulated_blood_volume) == NaN ? 0 : parseFloat(this.form.accumulated_blood_volume);
1448
+            this.form.urea_monitoring = parseFloat(this.form.urea_monitoring) == NaN ? 0 : parseFloat(this.form.urea_monitoring);
1449
+            this.form.blood_thickness = parseFloat(this.form.blood_thickness) == NaN ? 0 : parseFloat(this.form.blood_thickness);
1450
+            this.form.blood_monitor = parseFloat(this.form.blood_monitor) == NaN ? 0 : parseFloat(this.form.blood_monitor);
1332 1451
             this.$message.error(resp.msg)
1333 1452
           }
1334 1453
         }

+ 10 - 0
src/xt_pages/dialysis/details/dialysisMonitoring.vue Прегледај датотеку

@@ -31,6 +31,11 @@
31 31
           <th v-if="isShow('透析液流量')" width="92px">透析液流量(ml/h)</th>
32 32
           <th v-if="isShow('肝素用量余量')" width="92px">肝素用量余量(ml)</th>
33 33
           <th v-if="isShow('抗凝剂')" width="92px">抗凝剂</th>
34
+          <th v-if="isShow('累计血容量')" width="92px">累计血容量</th>
35
+          <th v-if="isShow('血温监测')" width="92px">血温监测</th>
36
+          <th v-if="isShow('尿素监测')" width="92px">尿素监测</th>
37
+          <th v-if="isShow('血浓量')" width="92px">血浓量</th>
38
+          <th v-if="isShow('血压监测')" width="92px">血压监测</th>
34 39
           <!-- <th v-if="isShow('血压监测部位')" width="92px">血压监测部位</th>
35 40
           <th v-if="isShow('并发症')" width="92px">并发症</th> -->
36 41
           <th v-if="isShow('KT/V') && org_id == 9987" width="92px">KT/V</th>
@@ -74,6 +79,11 @@
74 79
           </td>
75 80
           <!-- <th v-if="isShow('血压监测部位')">{{getBloodPressure(monitor.blood_pressure_monitoring_site)}}</th>
76 81
           <th v-if="isShow('并发症')">{{getComplication(monitor.complication)}}</th> -->
82
+          <th v-if="isShow('累计血容量')" width="92px">{{monitor.accumulated_blood_volume ? monitor.accumulated_blood_volume : ""}}</th>
83
+          <th v-if="isShow('血温监测')" width="92px">{{monitor.blood_temperature ? monitor.blood_temperature : ""}}</th>
84
+          <th v-if="isShow('尿素监测')" width="92px">{{monitor.urea_monitoring ? monitor.urea_monitoring : ""}}</th>
85
+          <th v-if="isShow('血浓量')" width="92px">{{monitor.blood_thickness ? monitor.blood_thickness : ""}}</th>
86
+          <th v-if="isShow('血压监测')" width="92px">{{monitor.blood_monitor ? monitor.blood_monitor : ""}}</th>
77 87
           <td v-if="isShow('KT/V') && org_id == 9987">{{ monitor.ktv?monitor.ktv:""}}</td>
78 88
           <td v-if="isShow('病情变化')">{{ monitor.symptom }}</td>
79 89
           <td v-if="isShow('处理')">{{ monitor.dispose }}</td>

+ 318 - 192
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Прегледај датотеку

@@ -510,7 +510,8 @@
510 510
     refunddetail,
511 511
     refundNumber,
512 512
     register,
513
-    upload
513
+    upload,
514
+    getMonthCharge
514 515
   } from '@/api/his/his'
515 516
   import RegisterDialog from './components/registerDialog'
516 517
   import treatPrint from './treatPrint'
@@ -537,7 +538,7 @@
537 538
       prescriptionTable,
538 539
       additionalCharges,
539 540
       treatPrint,
540
-      statementPrint
541
+      statementPrint,
541 542
 
542 543
     },
543 544
     data() {
@@ -1637,7 +1638,79 @@
1637 1638
         if (this.activeName == 'first') {
1638 1639
           this.getPatientList()
1639 1640
         } else if (this.activeName == 'second') {
1640
-          this.getMonthPatientList()
1641
+          // this.getMonthPatientList()
1642
+          const params = {
1643
+            'record_date': this.record_date,
1644
+            'patient_id': this.patientInfo.id,
1645
+            'his_patient_id': this.hisPatientInfo.id,
1646
+            'start_time': this.other_start_time,
1647
+            'end_time': this.other_end_time,
1648
+            'type': this.radio,
1649
+            'p_type': 2,
1650
+            'order_id': this.order.id
1651
+          }
1652
+
1653
+          getMonthCharge(params).then(response => {
1654
+            if (response.data.state == 0) {
1655
+              this.loading = false
1656
+
1657
+              this.$message.error(response.data.msg)
1658
+              return false
1659
+            } else {
1660
+              this.prescriptions = []
1661
+              this.month_prescriptions = []
1662
+              this.big_month_prescriptions = []
1663
+              this.big_prescriptions = []
1664
+              this.curPrescriptions = {}
1665
+              this.curMonthPrescriptions = {}
1666
+              this.loading = false
1667
+              this.patientInfo = response.data.data.xt_info
1668
+              this.hisPatientInfo = response.data.data.his_info
1669
+              this.info = response.data.data.info
1670
+              this.order = response.data.data.order
1671
+              this.p_type = ''
1672
+              this.sick_type = ''
1673
+              this.diagnosis = []
1674
+              this.sick_history = ''
1675
+              this.form.diagnosis = []
1676
+              if (this.info.id > 0) {
1677
+                this.form.p_type = response.data.data.info.register_type
1678
+                this.form.sick_type = response.data.data.info.sick_type
1679
+                if (response.data.data.info.diagnosis.length == 0) {
1680
+                  this.form.diagnosis = []
1681
+                } else {
1682
+                  for (let i = 0; i < response.data.data.info.diagnosis.split(',').length; i++) {
1683
+                    this.form.diagnosis.push(parseInt(response.data.data.info.diagnosis.split(',')[i]))
1684
+                  }
1685
+                }
1686
+                this.sick_history = this.info.sick_history
1687
+                if (this.info.register_type == 0) {
1688
+                  this.form.p_type = ''
1689
+                }
1690
+
1691
+                if (this.info.sick_type == 0) {
1692
+                  this.form.sick_type = ''
1693
+                }
1694
+              } else {
1695
+                this.form.p_type = 14
1696
+                this.form.sick_type = this.sick[0].id
1697
+                if (response.data.data.last_info.diagnoses.length == 0) {
1698
+                  this.form.diagnosis = []
1699
+                } else {
1700
+                  for (let i = 0; i < response.data.data.last_info.diagnosis.split(',').length; i++) {
1701
+                    this.form.diagnosis.push(parseInt(response.data.data.last_info.diagnosis.split(',')[i]))
1702
+                  }
1703
+                }
1704
+
1705
+                this.sick_history = ''
1706
+              }
1707
+              this.addtions_charge = response.data.data.addtions_charge
1708
+              this.setMonthPrescription(response.data.data.month_prescriptions)
1709
+
1710
+            }
1711
+          })
1712
+
1713
+
1641 1714
         }
1642 1715
       },
1643 1716
       searchAction() {
@@ -3258,237 +3331,290 @@
3258 3331
 
3259 3332
         }
3260 3333
         this.loading = true
3261
-        getChargeHisPatientInfo(params).then(response => {
3262
-          if (response.data.state == 0) {
3263
-            this.loading = false
3334
+        if(this.activeName == 'first'){
3264 3335
 
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 = []
3336
+          getChargeHisPatientInfo(params).then(response => {
3337
+            if (response.data.state == 0) {
3338
+              this.loading = false
3339
+
3340
+              this.$message.error(response.data.msg)
3341
+              return false
3342
+            } else {
3343
+              this.prescriptions = []
3344
+              this.month_prescriptions = []
3345
+              this.big_month_prescriptions = []
3346
+              this.big_prescriptions = []
3347
+              this.curPrescriptions = {}
3348
+              this.curMonthPrescriptions = {}
3349
+              this.loading = false
3350
+              this.patientInfo = response.data.data.xt_info
3351
+              this.hisPatientInfo = response.data.data.his_info
3352
+              this.info = response.data.data.info
3353
+              this.order = response.data.data.order
3354
+              this.p_type = ''
3355
+              this.sick_type = ''
3356
+              this.diagnosis = []
3357
+              this.sick_history = ''
3358
+              this.form.diagnosis = []
3359
+              if (this.info.id > 0) {
3360
+                this.form.p_type = response.data.data.info.register_type
3361
+                this.form.sick_type = response.data.data.info.sick_type
3362
+                if (response.data.data.info.diagnosis.length == 0) {
3363
+                  this.form.diagnosis = []
3364
+                } else {
3365
+                  for (let i = 0; i < response.data.data.info.diagnosis.split(',').length; i++) {
3366
+                    this.form.diagnosis.push(parseInt(response.data.data.info.diagnosis.split(',')[i]))
3367
+                  }
3368
+                }
3369
+                this.sick_history = this.info.sick_history
3370
+                if (this.info.register_type == 0) {
3371
+                  this.form.p_type = ''
3372
+                }
3373
+
3374
+                if (this.info.sick_type == 0) {
3375
+                  this.form.sick_type = ''
3376
+                }
3289 3377
               } 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]))
3378
+                this.form.p_type = 14
3379
+                this.form.sick_type = this.sick[0].id
3380
+                if (response.data.data.last_info.diagnoses.length == 0) {
3381
+                  this.form.diagnosis = []
3382
+                } else {
3383
+                  for (let i = 0; i < response.data.data.last_info.diagnosis.split(',').length; i++) {
3384
+                    this.form.diagnosis.push(parseInt(response.data.data.last_info.diagnosis.split(',')[i]))
3385
+                  }
3292 3386
                 }
3293
-              }
3294
-              this.sick_history = this.info.sick_history
3295
-              if (this.info.register_type == 0) {
3296
-                this.form.p_type = ''
3297
-              }
3298 3387
 
3299
-              if (this.info.sick_type == 0) {
3300
-                this.form.sick_type = ''
3388
+                this.sick_history = ''
3301 3389
               }
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 = []
3390
+              this.addtions_charge = response.data.data.addtions_charge
3391
+              // this.setMonthPrescription(response.data.data.month_prescriptions)
3392
+
3393
+              if (response.data.data.prescription.length > 0 && response.data.data.prescription[0].advices.length > 0) {
3394
+                this.prescription_id = response.data.data.prescription[0].advices[0].prescription_id
3307 3395
               } 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]))
3396
+                this.prescription_id = 0
3397
+              }
3398
+
3399
+              const big_prescriptions = []
3400
+
3401
+              for (let i = 0; i < this.unique_three(response.data.data.prescription).length; i++) {
3402
+                const obj = {
3403
+                  med_type: this.unique_three(response.data.data.prescription)[i].med_type,
3404
+                  prescriptions: []
3310 3405
                 }
3406
+                big_prescriptions.push(obj)
3311 3407
               }
3312 3408
 
3313
-              this.sick_history = ''
3314
-            }
3315
-            this.addtions_charge = response.data.data.addtions_charge
3316
-            this.setMonthPrescription(response.data.data.month_prescriptions)
3409
+              for (let c = 0; c < big_prescriptions.length; c++) {
3410
+                const inner_prescription = []
3411
+                for (let i = 0; i < response.data.data.prescription.length; i++) {
3412
+                  var prescription = response.data.data.prescription[i]
3413
+
3414
+                  if (big_prescriptions[c].med_type == prescription.med_type) {
3415
+                    const tempAdvice = []
3416
+                    const tempProject = []
3417
+                    const tempAddition = []
3418
+                    for (let b = 0; b < prescription.advices.length; b++) {
3419
+                      const obj = {
3420
+                        advice_id: prescription.advices[b].id,
3421
+                        drug_name: prescription.advices[b].advice_name,
3422
+                        single_dose: prescription.advices[b].single_dose,
3423
+                        delivery_way: prescription.advices[b].delivery_way,
3424
+                        execution_frequency: prescription.advices[b].execution_frequency,
3425
+                        retail_price: prescription.advices[b].price.toString(),
3426
+                        remark: prescription.advices[b].remark,
3427
+                        day: prescription.advices[b].day,
3428
+                        prescribing_number: prescription.advices[b].prescribing_number.toString(),
3429
+                        single_dose_unit: prescription.advices[b].single_dose_unit,
3430
+                        prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
3431
+                        medical_insurance_number: prescription.advices[b].med_list_codg
3317 3432
 
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
-            }
3433
+                      }
3434
+                      tempAdvice.push(obj)
3435
+                    }
3323 3436
 
3324
-            const big_prescriptions = []
3437
+                    for (let b = 0; b < prescription.project.length; b++) {
3438
+                      const obj = {
3439
+                        id: prescription.project[b].id,
3440
+                        project_id: prescription.project[b].project.id,
3441
+                        // project_name: prescription.project[b].project.project_name,
3442
+                        // statistical_classification: prescription.project[b].project.statistical_classification,
3443
+                        single_dose: prescription.project[b].single_dose,
3444
+                        delivery_way: prescription.project[b].delivery_way,
3445
+                        execution_frequency: prescription.project[b].execution_frequency,
3446
+                        number_days: prescription.project[b].day,
3447
+                        total: prescription.project[b].count.toString(),
3448
+                        price: prescription.project[b].price,
3449
+                        remark: prescription.project[b].remark,
3450
+                        // medical_code: prescription.project[b].project.medical_code,
3451
+                        unit: prescription.project[b].unit,
3452
+                        type: prescription.project[b].type
3453
+                      }
3325 3454
 
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
-            }
3455
+                      if (prescription.project[b].type == 2) {
3456
+                        obj['statistical_classification'] = prescription.project[b].project.statistical_classification
3457
+                        obj['medical_code'] = prescription.project[b].project.medical_code
3458
+                        obj['project_name'] = prescription.project[b].project.project_name
3333 3459
 
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]
3460
+                      } else if (prescription.project[b].type == 3) {
3461
+                        obj['statistical_classification'] = ''
3462
+                        obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
3463
+                        obj['project_name'] = prescription.project[b].good_info.good_name
3464
+                      }
3338 3465
 
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
3466
+                      tempProject.push(obj)
3467
+                    }
3357 3468
 
3469
+                    for (let b = 0; b < prescription.addition.length; b++) {
3470
+                      const obj = {
3471
+                        id: prescription.addition[b].id,
3472
+                        item_name: prescription.addition[b].item_name,
3473
+                        price: prescription.addition[b].price,
3474
+                        count: prescription.addition[b].count,
3475
+                        item_id: prescription.addition[b].item_id
3476
+                      }
3477
+                      tempAddition.push(obj)
3358 3478
                     }
3359
-                    tempAdvice.push(obj)
3360
-                  }
3479
+                    const index = i + 1
3480
+                    console.log('~~~~~~~~')
3481
+                    console.log(prescription.order)
3482
+                    prescription.order.order_status = prescription.order.order_status.toString()
3483
+                    prescription.order.order_status = parseInt(prescription.order.order_status)
3361 3484
 
3362
-                  for (let b = 0; b < prescription.project.length; b++) {
3363 3485
                     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
3486
+                      id: prescription.id,
3487
+                      name: this.getPName(prescription.med_type, index),
3488
+                      advices: tempAdvice,
3489
+                      project: tempProject,
3490
+                      addition: tempAddition,
3491
+                      order_status: prescription.order_status,
3492
+                      type: prescription.type,
3493
+                      med_type: prescription.med_type,
3494
+                      order: prescription.order
3378 3495
                     }
3496
+                    // inner_prescription.push(obj)
3497
+                    big_prescriptions[c].prescriptions.push(obj)
3379 3498
 
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
3499
+                    this.prescriptions.push(obj)
3500
+                  }
3501
+                }
3502
+              }
3384 3503
 
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
-                    }
3504
+              this.big_prescriptions = JSON.parse(JSON.stringify(big_prescriptions))
3390 3505
 
3391
-                    tempProject.push(obj)
3392
-                  }
3506
+              for (let i = 0; i < this.big_prescriptions.length; i++) {
3507
+                if (this.big_prescriptions[i].med_type == '11') {
3508
+                  this.big_prescriptions[i]['is_true'] = 1
3509
+                }
3510
+              }
3393 3511
 
3394
-                  for (let b = 0; b < prescription.addition.length; b++) {
3512
+              for (let i = 0; i < this.big_prescriptions.length; i++) {
3513
+                if (this.big_prescriptions[i].is_true == 1) {
3514
+                  for (let b = 0; b < this.big_prescriptions[i].prescriptions.length; b++) {
3395 3515
                     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
3516
+                      med_type: '11',
3517
+                      prescriptions: []
3401 3518
                     }
3402
-                    tempAddition.push(obj)
3519
+                    const arr = []
3520
+                    arr.push(this.big_prescriptions[i].prescriptions[b])
3521
+                    obj.prescriptions = arr
3522
+                    this.big_prescriptions.push(obj)
3403 3523
                   }
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 3524
                 }
3426 3525
               }
3427
-            }
3428
-
3429
-            this.big_prescriptions = JSON.parse(JSON.stringify(big_prescriptions))
3430 3526
 
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
3527
+              console.log(this.big_prescriptions)
3528
+              //
3529
+              for (let i = 0; i < this.big_prescriptions.length; i++) {
3530
+                if (this.big_prescriptions[i].is_true == 1) {
3531
+                  this.big_prescriptions.splice(i, 1)
3532
+                }
3434 3533
               }
3435
-            }
3534
+              // console.log(this.big_prescriptions)
3436 3535
 
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)
3536
+              for (let i = 0; i < this.big_prescriptions.length; i++) {
3537
+                if (this.big_prescriptions[i].prescriptions.length > 0) {
3538
+                  this.big_prescriptions[i]['curPrescriptions'] = JSON.parse(JSON.stringify(this.big_prescriptions[i].prescriptions[0]))
3539
+                } else {
3540
+                  this.big_prescriptions[i]['curPrescriptions'] = {}
3448 3541
                 }
3542
+                this.big_prescriptions[i]['total'] = this.getTotalThree(this.big_prescriptions[i])
3449 3543
               }
3450
-            }
3451 3544
 
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)
3545
+              if (this.big_prescriptions.length > 0) {
3546
+                this.editableTabsValue = this.getPName(this.big_prescriptions[0].med_type, 1)
3457 3547
               }
3548
+
3549
+
3458 3550
             }
3459
-            // console.log(this.big_prescriptions)
3551
+          })
3552
+
3460 3553
 
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]))
3554
+        }else{
3555
+
3556
+          getMonthCharge(params).then(response => {
3557
+            if (response.data.state == 0) {
3558
+              this.loading = false
3559
+
3560
+              this.$message.error(response.data.msg)
3561
+              return false
3562
+            } else {
3563
+              this.prescriptions = []
3564
+              this.month_prescriptions = []
3565
+              this.big_month_prescriptions = []
3566
+              this.big_prescriptions = []
3567
+              this.curPrescriptions = {}
3568
+              this.curMonthPrescriptions = {}
3569
+              this.loading = false
3570
+              this.patientInfo = response.data.data.xt_info
3571
+              this.hisPatientInfo = response.data.data.his_info
3572
+              this.info = response.data.data.info
3573
+              this.order = response.data.data.order
3574
+              this.p_type = ''
3575
+              this.sick_type = ''
3576
+              this.diagnosis = []
3577
+              this.sick_history = ''
3578
+              this.form.diagnosis = []
3579
+              if (this.info.id > 0) {
3580
+                this.form.p_type = response.data.data.info.register_type
3581
+                this.form.sick_type = response.data.data.info.sick_type
3582
+                if (response.data.data.info.diagnosis.length == 0) {
3583
+                  this.form.diagnosis = []
3584
+                } else {
3585
+                  for (let i = 0; i < response.data.data.info.diagnosis.split(',').length; i++) {
3586
+                    this.form.diagnosis.push(parseInt(response.data.data.info.diagnosis.split(',')[i]))
3587
+                  }
3588
+                }
3589
+                this.sick_history = this.info.sick_history
3590
+                if (this.info.register_type == 0) {
3591
+                  this.form.p_type = ''
3592
+                }
3593
+
3594
+                if (this.info.sick_type == 0) {
3595
+                  this.form.sick_type = ''
3596
+                }
3464 3597
               } else {
3465
-                this.big_prescriptions[i]['curPrescriptions'] = {}
3598
+                this.form.p_type = 14
3599
+                this.form.sick_type = this.sick[0].id
3600
+                if (response.data.data.last_info.diagnoses.length == 0) {
3601
+                  this.form.diagnosis = []
3602
+                } else {
3603
+                  for (let i = 0; i < response.data.data.last_info.diagnosis.split(',').length; i++) {
3604
+                    this.form.diagnosis.push(parseInt(response.data.data.last_info.diagnosis.split(',')[i]))
3605
+                  }
3606
+                }
3607
+
3608
+                this.sick_history = ''
3466 3609
               }
3467
-              this.big_prescriptions[i]['total'] = this.getTotalThree(this.big_prescriptions[i])
3468
-            }
3610
+              this.addtions_charge = response.data.data.addtions_charge
3611
+              this.setMonthPrescription(response.data.data.month_prescriptions)
3469 3612
 
3470
-            if (this.big_prescriptions.length > 0) {
3471
-              this.editableTabsValue = this.getPName(this.big_prescriptions[0].med_type, 1)
3472 3613
             }
3614
+          })
3473 3615
 
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
-        })
3616
+
3617
+        }
3492 3618
       }
3493 3619
       // sz_open(index, med_type, order, prescriptions) {
3494 3620
       //   switch (index) {

+ 173 - 88
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
 
@@ -1742,7 +1741,6 @@
1742 1741
             this.diagnoses = response.data.data.diagnose
1743 1742
             this.additions = response.data.data.additions
1744 1743
 
1745
-
1746 1744
           }
1747 1745
         })
1748 1746
 
@@ -1847,12 +1845,11 @@
1847 1845
         this.teamList = []
1848 1846
 
1849 1847
       },
1850
-      setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data,last_info) {
1848
+      setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data, last_info) {
1851 1849
         this.curMonthPrescriptions = {}
1852 1850
         this.curPrescriptions = {}
1853 1851
         // this.$refs.tabProjectTeam.clearSelection()
1854 1852
 
1855
-
1856 1853
         for (let i = 0; i < doctors.length; i++) {
1857 1854
           if (doctors[i].user_type == 1) {
1858 1855
             doctors.splice(i, 1)
@@ -1865,12 +1862,9 @@
1865 1862
         this.$emit('event1', this.prescription_id)
1866 1863
         this.curStatus = 0
1867 1864
         if (month_data && month_data.length > 0) {
1868
-
1869 1865
           this.curMonthPrescriptions = month_data[0]
1870
-
1871 1866
         } else {
1872 1867
           this.curMonthPrescriptions = {}
1873
-
1874 1868
         }
1875 1869
 
1876 1870
         if (data && data.length > 0) {
@@ -1880,7 +1874,6 @@
1880 1874
           this.curPrescriptions = {}
1881 1875
         }
1882 1876
 
1883
-
1884 1877
         if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
1885 1878
           this.curStatus = 1
1886 1879
           this.customTabIndex = 1
@@ -1897,7 +1890,6 @@
1897 1890
           this.showTwo = true
1898 1891
         }
1899 1892
 
1900
-
1901 1893
         if (this.curPrescriptions.project.length == 0 && this.curPrescriptions.advices.length == 0) {
1902 1894
           this.curStatus = 1
1903 1895
           this.customTabIndex = 1
@@ -1906,9 +1898,6 @@
1906 1898
           this.showTwo = false
1907 1899
         }
1908 1900
 
1909
-
1910
-
1911
-
1912 1901
         if (info.prescription_status == 0) {
1913 1902
           this.order_status = ''
1914 1903
         }
@@ -2002,7 +1991,7 @@
2002 1991
           }
2003 1992
         }
2004 1993
 
2005
-        
1994
+
2006 1995
           // getInitData().then(response => {
2007 1996
           //   if (response.data.state == 0) {
2008 1997
           //     this.$message.error(response.data.msg)
@@ -2109,6 +2098,103 @@
2109 2098
           // })
2110 2099
 
2111 2100
       },
2101
+      setMonthData(info, admin_info, doctors, department, hisPatientInfo, month_data, last_info) {
2102
+        this.curMonthPrescriptions = {}
2103
+        this.curPrescriptions = {}
2104
+        // this.$refs.tabProjectTeam.clearSelection()
2105
+
2106
+        for (let i = 0; i < doctors.length; i++) {
2107
+          if (doctors[i].user_type == 1) {
2108
+            doctors.splice(i, 1)
2109
+          }
2110
+        }
2111
+
2112
+        this.editableTabsValue = '处方1'
2113
+        this.curStatus = 0
2114
+        if (month_data && month_data.length > 0) {
2115
+          this.curMonthPrescriptions = month_data[0]
2116
+        } else {
2117
+          this.curMonthPrescriptions = {}
2118
+        }
2119
+
2120
+        if (info.prescription_status == 0) {
2121
+          this.order_status = ''
2122
+        }
2123
+
2124
+        if (info.id > 0) {
2125
+          this.doctorValue = info.doctor_id
2126
+          this.departmentValue = info.departments
2127
+        } else {
2128
+          if(admin_info.id > 0 && admin_info.user_type == 2){
2129
+            this.doctorValue = admin_info.admin_user_id
2130
+            this.departmentValue = this.department[0].id
2131
+
2132
+          }else{
2133
+
2134
+            this.doctorValue = this.doctors[0].admin_user_id
2135
+            this.departmentValue = this.department[0].id
2136
+
2137
+          }
2138
+
2139
+
2140
+        }
2141
+
2142
+        if (info.register_type == 0) {
2143
+          for (let i = 0; i < this.register.length; i++) {
2144
+            this.register_type = this.register[0].value
2145
+          }
2146
+        } else {
2147
+          this.register_type = info.register_type
2148
+        }
2149
+        this.diagnose = []
2150
+
2151
+        if(info.id == 0){
2152
+          if(last_info.diagnosis.length == 0){
2153
+            this.diagnose = []
2154
+          }else{
2155
+            for(let i = 0; i < last_info.diagnosis.split(",").length;i++){
2156
+              this.diagnose.push(parseInt(last_info.diagnosis.split(",")[i]))
2157
+
2158
+            }
2159
+          }
2160
+
2161
+          if(last_info.sick_history == 0){
2162
+            this.state2 = ''
2163
+          }else{
2164
+            this.state2 = last_info.sick_history
2165
+          }
2166
+
2167
+
2168
+        }else{
2169
+          this.state2 = info.sick_history
2170
+          if (this.state2 == 0) {
2171
+            this.state2 = ''
2172
+          }
2173
+          if(info.diagnosis.length == 0){
2174
+            this.diagnose = []
2175
+          }else{
2176
+            for(let i = 0; i < info.diagnosis.split(",").length;i++){
2177
+              this.diagnose.push(parseInt(info.diagnosis.split(",")[i]))
2178
+            }
2179
+          }
2180
+        }
2181
+        this.state1 = info.sick_type
2182
+        if (this.state1 == 0 || this.state1 == "") {
2183
+          this.state1 = ''
2184
+          for (let i = 0; i < this.sick.length; i++) {
2185
+            this.state1 = this.sick[0].id
2186
+          }
2187
+        }
2188
+
2189
+        if(this.departmentValue == "" || this.departmentValue == 0){
2190
+          if(this.department.length > 0){
2191
+            this.departmentValue = this.department[0].id
2192
+
2193
+          }
2194
+        }
2195
+
2196
+      },
2197
+
2112 2198
       moreState(tab, event) {
2113 2199
         if (tab == 'more') {
2114 2200
           return false
@@ -2257,21 +2343,21 @@
2257 2343
               'prescriptions': this.prescriptions
2258 2344
             }
2259 2345
             isLoading = true
2260
-            console.log('this.prescriptionsthis.prescriptions',this.prescriptions)
2346
+            console.log('this.prescriptionsthis.prescriptions', this.prescriptions)
2261 2347
             let num = 0
2262 2348
             this.prescriptions.map(item => {
2263
-              if(item.advices.length > 0){
2349
+              if (item.advices.length > 0) {
2264 2350
                 item.advices.map(it => {
2265
-                  if(it.drug.total <= 0){
2351
+                  if (it.drug.total <= 0) {
2266 2352
                     num++
2267
-                    setTimeout(() =>{
2353
+                    setTimeout(() => {
2268 2354
                       this.$message.error(it.drug.drug_name + '库存不足')
2269
-                    },100)
2355
+                    }, 100)
2270 2356
                   }
2271 2357
                 })
2272 2358
               }
2273 2359
             })
2274
-            if(num == 0){
2360
+            if (num == 0) {
2275 2361
               createHisPrescription(data, params).then(response => {
2276 2362
                 if (response.data.state == 1) {
2277 2363
                   this.$emit('change', this.patientInfo.id)
@@ -2308,7 +2394,7 @@
2308 2394
             if (index == 1) {
2309 2395
               let params = {
2310 2396
                 patient_id: this.patientInfo.id,
2311
-                diagnose: this.diagnose.join(","),
2397
+                diagnose: this.diagnose.join(','),
2312 2398
                 sick_type: this.state1,
2313 2399
                 sick_history: this.state2,
2314 2400
                 doctor: this.doctorValue,
@@ -2403,17 +2489,14 @@
2403 2489
           advices: [],
2404 2490
           project: [],
2405 2491
           addition: [],
2406
-          pre_time: this.prescriptions[0].pre_time,
2407
-
2492
+          pre_time: this.prescriptions[0].pre_time
2408 2493
 
2409 2494
         }
2410 2495
 
2411
-          obj.med_type = 14
2412
-
2496
+        obj.med_type = 14
2413 2497
 
2414 2498
         this.prescriptions.push(obj)
2415 2499
 
2416
-
2417 2500
         this.editableTabsValue = newTabName
2418 2501
         this.curPrescriptions = this.prescriptions[this.prescriptions.length - 1]
2419 2502
         this.curStatus = 0
@@ -2612,17 +2695,17 @@
2612 2695
         this.$refs.additionalCharges.show()
2613 2696
       },
2614 2697
       selectDrugs(selection, row) {
2615
-        console.log('selection',selection)
2616
-        console.log('row',row)
2617
-        if(row.total <= 0){
2698
+        console.log('selection', selection)
2699
+        console.log('row', row)
2700
+        if (row.total <= 0) {
2618 2701
           if (selection) {
2619 2702
             selection.forEach(row => {
2620
-              if(row.total <= 0){
2621
-                this.$refs.multipleTable.toggleRowSelection(row);
2703
+              if (row.total <= 0) {
2704
+                this.$refs.multipleTable.toggleRowSelection(row)
2622 2705
               }
2623
-            });
2706
+            })
2624 2707
           } else {
2625
-            this.$refs.multipleTable.clearSelection();
2708
+            this.$refs.multipleTable.clearSelection()
2626 2709
           }
2627 2710
           this.$message.error(row.drug_name + '库存不足')
2628 2711
           return
@@ -2632,8 +2715,8 @@
2632 2715
 
2633 2716
       comfirm() {
2634 2717
 
2635
-       if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0){
2636
-          if(this.$store.getters.xt_user.org_id == 10138) {
2718
+        if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
2719
+          if (this.$store.getters.xt_user.org_id == 10138) {
2637 2720
             for (let i = 0; i < this.curDrugs.length; i++) {
2638 2721
               if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
2639 2722
                 this.$message.error('该处方属于特病类型处方,开非特病类型的药')
@@ -2644,9 +2727,8 @@
2644 2727
           }
2645 2728
         }
2646 2729
 
2647
-
2648
-        if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0){
2649
-          if(this.$store.getters.xt_user.org_id == 10138) {
2730
+        if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
2731
+          if (this.$store.getters.xt_user.org_id == 10138) {
2650 2732
             for (let i = 0; i < this.curDrugs.length; i++) {
2651 2733
               if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
2652 2734
                 this.$message.error('该处方属于特病类型处方,开非特病类型的药')
@@ -2657,7 +2739,6 @@
2657 2739
           }
2658 2740
         }
2659 2741
 
2660
-
2661 2742
         // if (this.curPrescriptions.order_status == 2) {
2662 2743
         //   this.$message.error('该处方已经结算,无法继续添加药品或者项目')
2663 2744
         //   this.teamList = []
@@ -2729,9 +2810,9 @@
2729 2810
             var temp2 = this.deepClone(this.teamList)
2730 2811
 
2731 2812
             var temp3 = this.deepClone(templateDrugs)
2732
-            console.log("hhhhhhhhhhhhhh",temp)
2733
-            console.log("hhhh23",temp2)
2734
-            console.log("hhhh23",temp3)
2813
+            console.log('hhhhhhhhhhhhhh', temp)
2814
+            console.log('hhhh23', temp2)
2815
+            console.log('hhhh23', temp3)
2735 2816
             if (temp3.length > 0) {
2736 2817
               for (let b = 0; b < temp3.length; b++) {
2737 2818
                 let obj = {
@@ -2743,7 +2824,7 @@
2743 2824
                   execution_frequency: temp3[b].execution_frequency,
2744 2825
                   retail_price: temp3[b].drug.retail_price.toString(),
2745 2826
                   remark: '',
2746
-                  day: "1",
2827
+                  day: '1',
2747 2828
                   prescribing_number: temp3[b].prescribing_number,
2748 2829
                   single_dose_unit: temp3[b].drug.dose_unit,
2749 2830
                   prescribing_number_unit: temp3[b].drug.prescribing_number_unit,
@@ -2761,7 +2842,7 @@
2761 2842
 
2762 2843
             let index = 0
2763 2844
 
2764
-            if(this.curPrescriptions.advices.length > 0){
2845
+            if (this.curPrescriptions.advices.length > 0) {
2765 2846
               index = this.curPrescriptions.advices.length
2766 2847
             }
2767 2848
 
@@ -2783,13 +2864,13 @@
2783 2864
                   prescribing_number_unit: temp[b].prescribing_number_unit,
2784 2865
                   medical_insurance_number: temp[b].medical_insurance_number,
2785 2866
                   drug: temp[b],
2786
-                  groupno:index+temp_index,
2867
+                  groupno: index + temp_index
2787 2868
                 }
2788 2869
 
2789 2870
                 if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {
2790 2871
                   obj.prescribing_number = 1
2791 2872
                 }
2792
-                console.log('obj',obj)
2873
+                console.log('obj', obj)
2793 2874
                 this.prescriptions[i].advices.push(obj)
2794 2875
               }
2795 2876
               this.curStatus = 1
@@ -2818,7 +2899,7 @@
2818 2899
                   delivery_way: temp2[b].delivery_way,
2819 2900
                   execution_frequency: temp2[b].execution_frequency,
2820 2901
                   number_days: temp2[b].number_days.toString(),
2821
-                  total:  temp2[b].cus_total,
2902
+                  total: temp2[b].cus_total,
2822 2903
                   price: temp2[b].price,
2823 2904
                   remark: '',
2824 2905
                   medical_code: temp2[b].medical_code,
@@ -2831,7 +2912,7 @@
2831 2912
                 if (obj.type == 3) {
2832 2913
                   obj.single_dose = 1
2833 2914
                 }
2834
-                console.log('项目obj',temp2)
2915
+                console.log('项目obj', temp2)
2835 2916
                 this.prescriptions[i].project.push(obj)
2836 2917
               }
2837 2918
               this.curStatus = 2
@@ -2886,10 +2967,10 @@
2886 2967
                 number_days: project[i].number_days,
2887 2968
                 price: project[i].price,
2888 2969
                 medical_code: project[i].medical_code,
2889
-                cus_total:1,
2970
+                cus_total: 1,
2890 2971
                 unit: project[i].unit,
2891 2972
                 type: 2,
2892
-                total:project[i].total
2973
+                total: project[i].total
2893 2974
               }
2894 2975
 
2895 2976
               this.tabProject.push(obj)
@@ -2906,12 +2987,12 @@
2906 2987
                 delivery_way: '',
2907 2988
                 execution_frequency: '',
2908 2989
                 number_days: 1,
2909
-                cus_total:1,
2990
+                cus_total: 1,
2910 2991
                 price: good_info[i].packing_price,
2911 2992
                 medical_code: good_info[i].medical_insurance_number,
2912 2993
                 unit: this.getGoodUnit(good_info[i].good_unit),
2913 2994
                 type: 3,
2914
-                total:good_info[i].total
2995
+                total: good_info[i].total
2915 2996
               }
2916 2997
               this.tabProject.push(obj)
2917 2998
             }
@@ -2949,7 +3030,6 @@
2949 3030
             this.tabPrjectTeam = team
2950 3031
             this.allTabPrjectTeam = team
2951 3032
 
2952
-
2953 3033
             this.projectList = team
2954 3034
           }
2955 3035
         })
@@ -3001,7 +3081,7 @@
3001 3081
                   delivery_way: project[i].project.delivery_way,
3002 3082
                   execution_frequency: project[i].project.execution_frequency,
3003 3083
                   number_days: project[i].project.number_days,
3004
-                  cus_total:project[i].number,
3084
+                  cus_total: project[i].number,
3005 3085
                   price: project[i].project.price,
3006 3086
                   remark: '',
3007 3087
                   medical_code: project[i].project.medical_code,
@@ -3061,11 +3141,16 @@
3061 3141
       },
3062 3142
       changeDayOrMonth(tab) {
3063 3143
         if (this.dayorMonth == 'day') {
3064
-
3144
+          this.$emit('day')
3065 3145
         } else if (this.dayorMonth == 'month') {
3066
-
3146
+          console.log('~~~~~~')
3147
+          let form = {
3148
+            id: this.patientInfo.id,
3149
+            his_patient_id: this.hisPatientInfo.id
3150
+          }
3151
+          console.log(form)
3152
+          this.$emit('month', form)
3067 3153
         }
3068
-
3069 3154
       },
3070 3155
       getAllProjectList() {
3071 3156
         getAllProjectList().then(response => {

Разлика између датотеке није приказан због своје велике величине
+ 1789 - 1723
src/xt_pages/outpatientDoctorStation/doctorDesk.vue


+ 1 - 1
src/xt_pages/outpatientRegistration/registrationHistory.vue Прегледај датотеку

@@ -228,7 +228,7 @@
228 228
             <!--</el-dialog>-->
229 229
         <!--</div>-->
230 230
 
231
-        <div ]class="app-container">
231
+        <div class="app-container">
232 232
             <div class="cell clearfix">
233 233
                 <!-- <el-input style="width: 180px;" v-model.trim="search_input" class="filter-item"/> -->
234 234
                 <el-autocomplete

+ 90 - 23
src/xt_pages/stock/stockDamaged.vue Прегледај датотеку

@@ -130,6 +130,16 @@
130 130
             <el-form-item label="规格">
131 131
                 <el-input v-model="form.specification_name"></el-input>
132 132
             </el-form-item>
133
+            <el-form-item label="批号">
134
+                 <el-select v-model="form.number" filterable placeholder="请选择">
135
+                  <el-option
136
+                    v-for="(item,index) in numberList"
137
+                    :key="index"
138
+                    :label="item.number"
139
+                    :value="item.number">
140
+                  </el-option>
141
+                </el-select>
142
+            </el-form-item>
133 143
             <el-form-item label="单位">
134 144
                 <el-input v-model="form.warehousing_unit"></el-input>
135 145
             </el-form-item>
@@ -165,37 +175,37 @@
165 175
             </el-form-item>
166 176
         </el-form>
167 177
         <el-table :data="tableData" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }">
168
-            <el-table-column prop="date" label="耗材ID" width="100">
178
+            <el-table-column prop="date" label="耗材ID" width="100" align="center">
169 179
                <template  slot-scope="scope">
170 180
                  {{scope.row.good_id}}
171 181
                </template>
172 182
             </el-table-column>
173
-            <el-table-column prop="date" label="耗材名称" width="100">
183
+            <el-table-column prop="date" label="耗材名称" width="100" align="center">
174 184
                <template  slot-scope="scope">
175 185
                 {{scope.row.good_name}}
176 186
                </template>
177 187
             </el-table-column>
178
-            <el-table-column  prop="name" label="规格" width="100">
188
+            <el-table-column  prop="name" label="规格" width="100" align="center">
179 189
               <template  slot-scope="scope">
180 190
                 {{scope.row.specification_name}}
181 191
                </template>
182 192
             </el-table-column>
183
-            <el-table-column prop="name" label="单位" width="100">
193
+            <el-table-column prop="name" label="单位" width="100" align="center">
184 194
               <template  slot-scope="scope">
185 195
                 {{scope.row.warehousing_unit}}
186 196
                </template>
187 197
             </el-table-column>
188
-            <el-table-column prop="name" label="报损数量" width="100">
198
+            <el-table-column prop="name" label="报损数量" width="100" align="center">
189 199
               <template  slot-scope="scope">
190 200
                 {{scope.row.count}}
191 201
                </template>
192 202
             </el-table-column>
193
-            <el-table-column prop="name" label="原进货价" width="100">
203
+            <el-table-column prop="name" label="原进货价" width="100" align="center">
194 204
                <template  slot-scope="scope">
195 205
                 {{scope.row.buy_price}}
196 206
                </template>
197 207
             </el-table-column>
198
-            <el-table-column prop="name" label="原零售价" width="100">
208
+            <el-table-column prop="name" label="原零售价" width="100" align="center">
199 209
                <template  slot-scope="scope">
200 210
                 {{scope.row.packing_price}}
201 211
                </template>
@@ -205,22 +215,22 @@
205 215
                 {{scope.row.new_price}}
206 216
                </template>
207 217
             </el-table-column> -->
208
-            <el-table-column prop="name" label="生产厂商" width="100">
218
+            <el-table-column prop="name" label="生产厂商" width="100" align="center">
209 219
               <template  slot-scope="scope">
210 220
                 {{scope.row.manufacturer}}
211 221
                </template>
212 222
             </el-table-column>
213
-            <el-table-column prop="name" label="产地" width="100">
223
+            <el-table-column prop="name" label="产地" width="100" align="center">
214 224
                <template  slot-scope="scope">
215 225
                 {{scope.row.good_origin_place}}
216 226
                </template>
217 227
             </el-table-column>
218
-            <el-table-column prop="name" label="批准文号" width="100">
228
+            <el-table-column prop="name" label="批准文号" width="100" align="center">
219 229
               <template  slot-scope="scope">
220 230
                 {{scope.row.license_number}}
221 231
                </template>
222 232
             </el-table-column>
223
-            <el-table-column  prop="name" label="备注" width="100">
233
+            <el-table-column  prop="name" label="备注" width="100" align="center">
224 234
               <template  slot-scope="scope">
225 235
                 {{scope.row.remark}}
226 236
                </template>
@@ -364,7 +374,7 @@
364 374
 <script>
365 375
 import BreadCrumb from "../components/bread-crumb";
366 376
 import { uParseTime } from '@/utils/tools'
367
-import { postSearchGoodWarehouseList,saveReportStock,getReportStockList,SaveCheckedDamage,getStockDamageDetail,modifyPrice,deleteStockDamage} from "@/api/stock"
377
+import { postSearchGoodWarehouseList,saveReportStock,getReportStockList,SaveCheckedDamage,getStockDamageDetail,modifyPrice,deleteStockDamage,getStockBatchNumber,getGoodWarehouseList} from "@/api/stock"
368 378
 export default {
369 379
     name: "stockModifyPrice",
370 380
     components:{
@@ -401,6 +411,9 @@ export default {
401 411
                 good_origin_place:"",
402 412
                 report_count:"",
403 413
                 total:"",
414
+                number:"",
415
+                expiry_date:"",
416
+                product_date:"",
404 417
             },
405 418
             currentIndex: 0,
406 419
             manufacturerList:[],
@@ -420,6 +433,7 @@ export default {
420 433
             editPriceDialogVisible:false,
421 434
             modifyPriceDialogVisible:false,
422 435
             id:0,
436
+            numberList:[]
423 437
         }
424 438
     },
425 439
     methods:{
@@ -484,7 +498,9 @@ export default {
484 498
          })
485 499
         },
486 500
         handleSelect(val){
487
-          console.log("val23232323",val)
501
+          //获取当前耗材的批号
502
+          this.getStockBatchNumber(val.good_id)
503
+          this.getGoodWarehouseList(val.good_id)
488 504
           this.form.id = val.id
489 505
           this.form.good_id = val.good_id,
490 506
           this.form.good_name = val.good_name
@@ -499,6 +515,8 @@ export default {
499 515
           this.form.warehousing_unit = val.packing_unit  
500 516
           this.form.total = val.total
501 517
           this.form.new_price = val.new_price
518
+          this.form.expiry_date = val.expiry_date
519
+          this.form.product_date = val.product_date
502 520
       },
503 521
       addStock(){
504 522
         var obj = {
@@ -506,19 +524,37 @@ export default {
506 524
           good_name:this.form.good_name,
507 525
           specification_name:this.form.specification_name,
508 526
           warehousing_unit:this.form.warehousing_unit,
509
-          count:parseInt(this.form.count),
527
+          count:this.form.count,
510 528
           buy_price:this.form.buy_price.toString(),
511 529
           packing_price:this.form.packing_price.toString(),
512 530
           manufacturer:this.form.manufacturer,
513 531
           good_origin_place:this.form.good_origin_place,
514 532
           license_number:this.form.license_number,
515 533
           remark:this.form.remark,
516
-          // new_price:this.form.new_price.toString(),
517 534
           warehousing_order:this.form.warehousing_order,
518 535
           dealer:this.form.dealer,
519 536
           start_time:this.getTime(new Date()),
537
+          number:this.form.number,
538
+          warehousing_info_id:0,
539
+          product_date:val.product_date,
540
+          expiry_date:val.expiry_date,
520 541
         } 
521 542
         this.tableData.push(obj)
543
+        this.form.good_id = 0
544
+        this.form.good_name = ""
545
+        this.form.specification_name = ""
546
+        this.form.warehousing_unit = ""
547
+        this.form.count = ""
548
+        this.form.buy_price = ""
549
+        this.form.packing_price = ""
550
+        this.form.manufacturer = ""
551
+        this.form.good_origin_place = ""
552
+        this.form.license_number = ""
553
+        this.form.remark  = ""
554
+        this.form.warehousing_order = ""
555
+        this.form.dealer = ""
556
+        this.form.number = ""
557
+        this.form.good_id = ""
522 558
       },
523 559
       saveReportStock(){
524 560
          for(let i = 0;i<this.tableData.length;i++){
@@ -528,6 +564,19 @@ export default {
528 564
            if(this.tableData[i].dealer == 0){
529 565
               this.tableData[i].dealer = ""   
530 566
            }
567
+         }
568
+         console.log("比阿哥",this.tableData)
569
+         console.log("numberlist",this.numberList)
570
+         for(let i=0;i<this.tableData.length;i++){
571
+           this.tableData[i].count =  parseInt(this.tableData[i].count)
572
+           this.tableData[i].expiry_date = parseInt(this.tableData[i].expiry_date)
573
+           this.tableData[i].product_date = parseInt(this.tableData[i].product_date)
574
+           this.tableData[i].total = parseInt(this.tableData[i].total)
575
+           for(let j=0;j<this.numberList.length;j++){
576
+              if(this.tableData[i].number == this.numberList[j].number){
577
+                this.tableData[i].warehousing_info_id = this.numberList[j].id
578
+              }
579
+           }
531 580
          }
532 581
           var params = {
533 582
             tableData:this.tableData,
@@ -550,6 +599,7 @@ export default {
550 599
             this.form.buy_price = ""
551 600
             this.form.warehousing_unit = ""
552 601
             this.form.total = ""
602
+            this.form.number = ""
553 603
            
554 604
            }
555 605
         })
@@ -593,18 +643,12 @@ export default {
593 643
        }
594 644
      },
595 645
     changePrice(val){
596
-       console.log("val23232322323",val)
597
-      
598 646
        var arr = []
599
-      
600 647
        for(let i=0;i<val.length;i++){
601 648
          arr.push(val[i].id)
602 649
        }
603 650
       var str = arr.join(",")
604
-    
605
-      console.log("str",str)
606
-      this.ids = str
607
-     
651
+      this.ids = str 
608 652
      },
609 653
      SaveCheckedDamage(){
610 654
          var params = {
@@ -681,7 +725,6 @@ export default {
681 725
        modifyPrice(params).then(response=>{
682 726
          if(response.data.state ==1){
683 727
            var adjust = response.data.data.adjust
684
-
685 728
            this.modifyPriceDialogVisible = false
686 729
            this.$message.success("保存成功")
687 730
            this.getlist()
@@ -742,6 +785,30 @@ export default {
742 785
        formatJson(filterVal, jsonData) {
743 786
         return jsonData.map(v => filterVal.map(j => v[j]));
744 787
       },
788
+     getStockBatchNumber(id){
789
+       var params = {
790
+         id:id
791
+       }
792
+      getStockBatchNumber(params).then(response=>{
793
+        if(response.data.state == 1){
794
+          var list = response.data.data.list
795
+          console.log("批号列表",list)
796
+          this.numberList = list
797
+        }
798
+      })
799
+     },
800
+     getGoodWarehouseList(id){
801
+       var params = {
802
+          id:id,
803
+       }
804
+      getGoodWarehouseList(params).then(response=>{
805
+         if(response.data.state == 1){
806
+           var list = response.data.data.list
807
+           this.form.total =  list.stock_count
808
+           console.log("list23232",list)
809
+         }
810
+      })
811
+     }
745 812
     },
746 813
     created(){
747 814
         // var nowDate = new Date();

+ 73 - 98
src/xt_pages/stock/stockModifyPrice.vue Прегледај датотеку

@@ -39,8 +39,8 @@
39 39
         <div>
40 40
             <el-button size="small" type="primary" @click="dialogVisible = true">新增</el-button>
41 41
             <el-button size="small" type="primary" @click="toCheck">核对</el-button>
42
-            <el-button size="small" type="primary" @click="print">打印</el-button>
43
-            <el-button size="small" type="primary" @click="toExport">导出</el-button>
42
+            <!-- <el-button size="small" type="primary" @click="print">打印</el-button>
43
+            <el-button size="small" type="primary" @click="toExport">导出</el-button> -->
44 44
         </div>
45 45
       </div>
46 46
       <div>
@@ -67,11 +67,11 @@
67 67
                          {{scope.row.packing_unit}}
68 68
                       </template>
69 69
                     </el-table-column>
70
-                    <el-table-column label="调价数量" width="100" align="center">
70
+                    <!-- <el-table-column label="调价数量" width="100" align="center">
71 71
                       <template slot-scope="scope">
72 72
                        {{scope.row.count}}
73 73
                       </template>
74
-                    </el-table-column>
74
+                    </el-table-column> -->
75 75
                     <el-table-column label="原进货价" width="100" align="center">
76 76
                       <template slot-scope="scope">
77 77
                        {{scope.row.buy_price}}
@@ -142,80 +142,6 @@
142 142
                   :total="total">
143 143
                </el-pagination>
144 144
             </div>
145
-                <!-- <el-table :data="tableData" border :height="tableHeight" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }">
146
-                    <el-table-column
147
-                    fixed="left"
148
-                    prop="date"
149
-                    label="药品ID"
150
-                    width="80">
151
-                    </el-table-column>
152
-                    <el-table-column
153
-                    prop="date"
154
-                    label="药品名称"
155
-                    width="100">
156
-                    </el-table-column>
157
-                    <el-table-column
158
-                    prop="name"
159
-                    label="规格"
160
-                    width="100">
161
-                    </el-table-column>
162
-                    <el-table-column
163
-                    prop="name"
164
-                    label="生产厂家"
165
-                    width="100">
166
-                    </el-table-column>
167
-                    <el-table-column
168
-                    prop="name"
169
-                    label="批准文书"
170
-                    width="100">
171
-                    </el-table-column>
172
-                    <el-table-column
173
-                    prop="name"
174
-                    label="经销商"
175
-                    width="100">
176
-                    </el-table-column>
177
-                    <el-table-column
178
-                    prop="name"
179
-                    label="数量"
180
-                    width="100">
181
-                    </el-table-column>
182
-                    <el-table-column
183
-                    prop="name"
184
-                    label="原零价"
185
-                    width="100">
186
-                    </el-table-column>
187
-                    <el-table-column
188
-                    prop="name"
189
-                    label="现零价"
190
-                    width="100">
191
-                    </el-table-column>
192
-                    <el-table-column
193
-                    prop="name"
194
-                    label="进货价"
195
-                    width="100">
196
-                    </el-table-column>
197
-                    <el-table-column
198
-                    prop="name"
199
-                    label="零售总价"
200
-                    width="100">
201
-                    </el-table-column>
202
-                    <el-table-column
203
-                    prop="name"
204
-                    label="批号"
205
-                    width="100">
206
-                    </el-table-column>
207
-                    <el-table-column
208
-                    prop="name"
209
-                    label="生产日期"
210
-                    width="100">
211
-                    </el-table-column>
212
-                    <el-table-column
213
-                    prop="name"
214
-                    label="有效日期"
215
-                    width="100">
216
-                    </el-table-column>
217
-                </el-table> -->
218
-         
219 145
         </div>
220 146
     </div>
221 147
     <el-dialog
@@ -248,9 +174,9 @@
248 174
             <el-form-item label="现价格">
249 175
                 <el-input v-model="form.new_price"></el-input>
250 176
             </el-form-item>
251
-            <el-form-item label="调价数量">
252
-                <el-input v-model="form.count"></el-input>
253
-            </el-form-item>
177
+            <!-- <el-form-item label="调价数量">
178
+                <el-input v-model="form.count" type="number"></el-input>
179
+            </el-form-item> -->
254 180
             <el-form-item label="备注" style="width:66%;">
255 181
                 <div style="display:flex;">
256 182
                     <el-input v-model="form.remark"></el-input>
@@ -279,11 +205,11 @@
279 205
                {{scope.row.warehousing_unit}}
280 206
                </template>
281 207
             </el-table-column>
282
-            <el-table-column prop="name" label="调价数量" width="100" align="center">
208
+            <!-- <el-table-column prop="name" label="调价数量" width="100" align="center">
283 209
               <template slot-scope="scope">
284 210
                 {{scope.row.count}}
285 211
               </template> 
286
-            </el-table-column>
212
+            </el-table-column> -->
287 213
             <el-table-column prop="name" label="原进货价" width="100" align="center">
288 214
                <template slot-scope="scope">
289 215
                 {{scope.row.buy_price}}
@@ -370,7 +296,7 @@
370 296
                 </el-form-item>
371 297
              </el-col> 
372 298
             </el-row>
373
-            <el-row>
299
+            <!-- <el-row>
374 300
              <el-col>
375 301
                <el-form-item label="调价数量:">
376 302
                     <el-input v-model="form.count"  style="width:200px"></el-input>
@@ -381,7 +307,7 @@
381 307
                     </div>
382 308
                 </el-form-item>
383 309
               </el-col>  
384
-            </el-row>
310
+            </el-row> -->
385 311
           </el-form>
386 312
         </span>
387 313
         <span slot="footer" class="dialog-footer">
@@ -435,19 +361,44 @@
435 361
 
436 362
 
437 363
     <el-dialog
438
-        title="耗材调价核对"
364
+        title="耗材调价编辑"
439 365
         :visible.sync="modifyDialogVisible"
440 366
         width="30%"
441 367
         >
442 368
         <span>
443 369
           <el-form :model="form">
444
-            <el-row>
445
-              <el-col>
446
-                <el-form-item label="现价格">
447
-                  <el-input v-model="form.new_price" style="width:100px"></el-input>
448
-                </el-form-item>  
449
-              </el-col>
450
-            </el-row>  
370
+         <el-row>
371
+               <el-col>
372
+                <el-form-item label="耗材名称:">
373
+                    <el-autocomplete
374
+                        class="checkSearch"
375
+                        popper-class="my-autocomplete"
376
+                        v-model="form.good_name"
377
+                        :fetch-suggestions="querySearchAsync"
378
+                        :trigger-on-focus="true"
379
+                        placeholder="请输入耗材名称"
380
+                        @select="handleSelect"
381
+                        @input="changeGoodName(scope.$index)"
382
+                        :disabled="true"
383
+                        style="width:160px;"
384
+                    >
385
+                        <i class="el-icon-search el-input__icon" slot="suffix"></i>
386
+                    <template slot-scope="{ item }">
387
+                        <div class="name">{{ item.good_name +"  " +item.specification_name + "  "+item.manufacturer }}</div>
388
+                    </template>
389
+                    </el-autocomplete>
390
+                </el-form-item>
391
+               <el-form-item label="原价格:">
392
+                 <el-input v-model="form.packing_price" style="width:200px"></el-input>
393
+               </el-form-item>
394
+               <el-form-item label="现价格:">
395
+                    <el-input v-model="form.new_price" style="width:200px"></el-input>
396
+                </el-form-item>
397
+                <el-form-item label="备注:">
398
+                    <el-input v-model="form.remark" style="width:200px"></el-input>
399
+                </el-form-item>
400
+             </el-col> 
401
+            </el-row>
451 402
           </el-form>  
452 403
         </span>
453 404
         <span slot="footer" class="dialog-footer">
@@ -578,8 +529,16 @@ export default {
578 529
           this.form.packing_price = val.packing_price
579 530
           this.form.warehousing_order = val.warehousing_order
580 531
           this.form.license_number = val.license_number
581
-          this.form.dealer = val.dealer
582
-          this.form.manufacturer = val.manufacturer
532
+          if(val.dealer == 0){
533
+            this.form.dealer = ""
534
+          }else{
535
+            this.form.dealer = val.dealer
536
+          }
537
+          if(this.form.manufacturer == 0){
538
+            this.form.manufacturer = ""
539
+          }else{
540
+            this.form.manufacturer = val.manufacturer
541
+          }
583 542
           this.form.specification_name = val.specification_name
584 543
           this.form.remark = val.remark
585 544
           this.form.buy_price = val.buy_price
@@ -666,7 +625,8 @@ export default {
666 625
            this.tableData[i].buy_price = this.tableData[i].buy_price.toString()
667 626
            this.tableData[i].packing_price = this.tableData[i].packing_price.toString()
668 627
            this.tableData[i].new_price = this.tableData[i].new_price.toString()
669
-           this.tableData[i].count =  parseInt(this.tableData[i].count)
628
+          //  this.tableData[i].count =  parseInt(this.tableData[i].count)
629
+            this.tableData[i].count = 0
670 630
            if(this.tableData[i].dealer == 0){
671 631
              this.tableData[i].dealer = ""
672 632
            }
@@ -677,6 +637,7 @@ export default {
677 637
          var params= {
678 638
            tableData:this.tableData,
679 639
          }
640
+      
680 641
       console.log("parasm222",params)
681 642
       saveAdjustPrice(params).then(response=>{
682 643
         if(response.data.state == 1){
@@ -684,6 +645,7 @@ export default {
684 645
           console.log("msg",msg)
685 646
           this.$message.success("保存成功!")
686 647
           this.dialogVisible = false
648
+          this.tableData = []
687 649
           this.getAllStockPrice()
688 650
         }
689 651
       })  
@@ -800,7 +762,16 @@ export default {
800 762
            var info =  response.data.data.detail
801 763
            console.log("info",info)
802 764
            this.id = info.id
803
-           this.form.new_price = info.new_price
765
+           this.good_id = info.good_id,
766
+           this.form.good_name = info.good_name
767
+           if(info.new_price == 0){
768
+            this.form.new_price = ""
769
+           }else{
770
+             this.form.new_price = info.new_price
771
+           }
772
+          
773
+           this.form.packing_price = info.packing_price
774
+           this.form.remark = info.remark
804 775
            this.modifyDialogVisible = true
805 776
          }
806 777
        })
@@ -808,7 +779,11 @@ export default {
808 779
      updateStockPrice(){
809 780
          var params = {
810 781
            new_price:this.form.new_price.toString(),
811
-           id:this.id
782
+           id:this.id,
783
+           packing_price:this.form.packing_price.toString(),
784
+           remark:this.form.remark,
785
+           good_id:this.form.good_id,
786
+           good_name:this.form.good_name,
812 787
          }
813 788
          console.log("params",params)
814 789
        updateStockPrice(params).then(response=>{