Przeglądaj źródła

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

csx 4 lat temu
rodzic
commit
23653496b6
46 zmienionych plików z 5913 dodań i 190 usunięć
  1. 92 0
      src/api/patient.js
  2. 3 1
      src/router/index_路由未分离前.js
  3. 12 0
      src/router/modules/dialysis.js
  4. 23 0
      src/router/modules/patient.js
  5. 28 2
      src/router/modules/selfPreparedMedicine.js
  6. 36 1
      src/router/modules/stock.js
  7. 23 0
      src/xt_pages/dialysis/batch_print/batch_print_order.vue
  8. 1 1
      src/xt_pages/dialysis/batch_print/batch_print_order_thirteen.vue
  9. 1949 0
      src/xt_pages/dialysis/batch_print/batch_print_order_twentyEight.vue
  10. 12 0
      src/xt_pages/dialysis/bloodPresssWatch.vue
  11. 10 0
      src/xt_pages/dialysis/details/DialysisPrescription.vue
  12. 11 2
      src/xt_pages/dialysis/details/NavIgation.vue
  13. 36 0
      src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue
  14. 51 4
      src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue
  15. 19 16
      src/xt_pages/dialysis/details/index.vue
  16. 15 1
      src/xt_pages/dialysis/template/DialysisPrintOrderOne.vue
  17. 3 7
      src/xt_pages/dialysis/template/DialysisPrintOrderTwentyEight.vue
  18. 60 12
      src/xt_pages/dialysis/template/DialysisPrintOrderTwentyFour.vue
  19. 11 11
      src/xt_pages/qcd/workAnalysis/nurse.vue
  20. 3 3
      src/xt_pages/stock/detail/cancelStockDetail.vue
  21. 1 0
      src/xt_pages/stock/detail/print.vue
  22. 3 3
      src/xt_pages/stock/detail/salesReturnDetail.vue
  23. 115 46
      src/xt_pages/stock/detail/stockInDetail.vue
  24. 113 16
      src/xt_pages/stock/detail/stockOutDetail.vue
  25. 52 4
      src/xt_pages/stock/drugs/components/drugInOrder.vue
  26. 51 4
      src/xt_pages/stock/drugs/components/drugOutDetail.vue
  27. 42 9
      src/xt_pages/stock/drugs/drugOutOrderPrint.vue
  28. 42 3
      src/xt_pages/stock/drugs/drugPrint.vue
  29. 419 0
      src/xt_pages/stock/drugs/drugQueryPrint.vue
  30. 8 3
      src/xt_pages/stock/drugs/drugStockInOrderDetail.vue
  31. 382 0
      src/xt_pages/stock/drugs/drugStockInOrderDetailPrint.vue
  32. 4 1
      src/xt_pages/stock/drugs/drugStockOutOrder.vue
  33. 8 4
      src/xt_pages/stock/drugs/drugStockOutOrderDetail.vue
  34. 374 0
      src/xt_pages/stock/drugs/drugStockOutOrderDetailPrint.vue
  35. 24 6
      src/xt_pages/stock/drugs/query.vue
  36. 17 11
      src/xt_pages/stock/stockInOrderDetail.vue
  37. 311 0
      src/xt_pages/stock/stockInOrderDetailPrint.vue
  38. 16 5
      src/xt_pages/stock/stockOutOrderDetail.vue
  39. 326 0
      src/xt_pages/stock/stockOutOrderDetailPrint.vue
  40. 9 0
      src/xt_pages/stock/stockPrint.vue
  41. 20 3
      src/xt_pages/stock/stockQuery.vue
  42. 12 1
      src/xt_pages/user/components/PatientSidebar.vue
  43. 1 0
      src/xt_pages/user/dialysisRecord.vue
  44. 19 10
      src/xt_pages/user/dialysisSolution.vue
  45. 721 0
      src/xt_pages/user/vascularAccess.vue
  46. 425 0
      src/xt_pages/user/vascularAccessDetail.vue

+ 92 - 0
src/api/patient.js Wyświetl plik

@@ -70,6 +70,7 @@ export function createPatientDialysisSolution(id, solution, mode) {
70 70
 }
71 71
 
72 72
 export function editPatientDialysisSolution(patient, id, solution, mode) {
73
+  
73 74
   return request({
74 75
     url: '/api/patients/dialysissolution/edit?patient=' + patient + '&id=' + id + '&mode=' + mode,
75 76
     method: 'put',
@@ -380,3 +381,94 @@ export function deleteDryWeight(id, data) {
380 381
     data: data
381 382
   })
382 383
 }
384
+
385
+
386
+export function saveVasularAccess(params){
387
+   
388
+  return request({
389
+    url:"/api/patient/savevasularaccess",
390
+    method:"Get",
391
+    params:params
392
+  })
393
+} 
394
+
395
+export function getAllVascularAccessList(params){
396
+  
397
+  return request({
398
+    url:"/api/patient/getallvascualraccesslist",
399
+    method:"Get",
400
+    params:params
401
+  })
402
+}
403
+
404
+export function getVascularAccessByDetail(id,params){
405
+  
406
+  return request({
407
+    url:"/api/patient/getvascularaccessbydetial?id="+id,
408
+    method:"get",
409
+    params:params,
410
+  })
411
+}
412
+
413
+export function updatedVasularAccess(params){
414
+  
415
+  return request({
416
+    url:"/api/patient/updatevasularaccess",
417
+    method:"get",
418
+    params:params
419
+  })
420
+}
421
+
422
+export function DeleteVascularAccess(id,params){
423
+  
424
+  return request({
425
+    url:"/api/patient/deletevascularaccess?id="+id,
426
+    method:"get",
427
+    params:params
428
+  })
429
+}
430
+
431
+export function savePasswayAssessment(params){
432
+  
433
+  return request({
434
+    url:"/api/patient/savepasswayassessment",
435
+    method:"get",
436
+    params:params
437
+  })
438
+}
439
+
440
+export function getAllPassWayAssessmentList(params){
441
+  
442
+  return request({
443
+    url:"/api/patient/getallpasswayassessment",
444
+    method:"get",
445
+    params:params
446
+  })
447
+}
448
+
449
+export function getPassWayAssessmentById(id,params){
450
+  
451
+  return request({
452
+    url:"/api/patient/getpasswayassmentbyid?id="+id,
453
+    method:"Get",
454
+    params:params,
455
+  })
456
+}
457
+
458
+export function updatePasswayAssessment(params){
459
+  
460
+  return request({
461
+    url:"/api/patient/updatepasswayassesment",
462
+    method:"get",
463
+    params:params
464
+  })
465
+}
466
+
467
+export function DeletePassWayAssessMent(id,params){
468
+  
469
+  return request({
470
+    url:"/api/patient/deletepasswayassessment?id="+id,
471
+    method:"get",
472
+    params:params
473
+  })
474
+}

+ 3 - 1
src/router/index_路由未分离前.js Wyświetl plik

@@ -604,6 +604,7 @@ export const xt_asyncRouterMap = [
604 604
         name: 'weight',
605 605
         meta: { title: 'weight', noCache: true }
606 606
       },
607
+   
607 608
       {
608 609
         path: '/patients/patient/:id/dialysisRecord',
609 610
         component: () => import('@/xt_pages/user/dialysisRecord'),
@@ -886,7 +887,8 @@ export const xt_asyncRouterMap = [
886 887
         component: () => import('@/xt_pages/stock/index'),
887 888
         name: 'config',
888 889
         meta: { title: 'config' }
889
-      }
890
+      },
891
+     
890 892
     ]
891 893
   },
892 894
   {

+ 12 - 0
src/router/modules/dialysis.js Wyświetl plik

@@ -328,6 +328,18 @@ export default {
328 328
         noCache: true
329 329
       }
330 330
     },
331
+    {
332
+      path: '/dialysis/print/batch/twentyEight',
333
+      component: () =>
334
+      import('@/xt_pages/dialysis/batch_print/batch_print_order_twentyEight'),
335
+      hidden: true,
336
+      is_menu: false,
337
+      name: 'dialysis_batch_twentyFive',
338
+      meta: {
339
+        title: '批量打印',
340
+        noCache: true
341
+      }
342
+    },
331 343
     {
332 344
       path: '/dialysis/print/batch/thirty',
333 345
       component: () =>

+ 23 - 0
src/router/modules/patient.js Wyświetl plik

@@ -62,6 +62,29 @@ export default {
62 62
       noCache: true
63 63
     }
64 64
   },
65
+
66
+  {
67
+    path: '/patients/patient/:id/vascularAccess',
68
+    component: () => import('@/xt_pages/user/vascularAccess'),
69
+    hidden: true,
70
+    is_menu: false,
71
+    name: 'vascularAccess',
72
+    meta: {
73
+      title: 'vascularAccess',
74
+      noCache: true
75
+    }
76
+  },
77
+  {
78
+    path: '/patients/patient/:mid/vascularAccessDetail/:pid',
79
+    component: () => import('@/xt_pages/user/vascularAccessDetail'),
80
+    hidden: true,
81
+    is_menu: false,
82
+    name: 'vascularAccessDetail',
83
+    meta: {
84
+      title: 'vascularAccessDetail',
85
+      noCache: true
86
+    }
87
+  },
65 88
   {
66 89
     path: '/patients/patient/:id/dialysisRecord',
67 90
     component: () => import('@/xt_pages/user/dialysisRecord'),

+ 28 - 2
src/router/modules/selfPreparedMedicine.js Wyświetl plik

@@ -16,7 +16,7 @@ export default {
16 16
       path: '/stock/selfstockquery',
17 17
       component: () => import('@/xt_pages/stock/selfPreparedMedicine/stockquery'),
18 18
       name: 'stockquery',
19
-      meta: { title: '库存查询', noCache: true } 
19
+      meta: { title: '库存查询', noCache: true }
20 20
 
21 21
     },
22 22
 
@@ -61,6 +61,32 @@ export default {
61 61
        hidden:true,
62 62
        is_menu:false,
63 63
        meta:{title:'selfStockPrint',noCache:true}
64
-     }
64
+     },
65
+
66
+     {
67
+      path: '/stock/stockprint',
68
+      component: () => import('@/xt_pages/stock/stockPrint'),
69
+      name: 'stockqueryprint',
70
+      hidden: true,
71
+      is_menu: false,
72
+      meta: { title: 'stockprint', noCache: true }
73
+     },
74
+
75
+     {
76
+      path: '/stock/in/detail/print',
77
+      component: () => import('@/xt_pages/stock/stockInOrderDetailPrint'),
78
+      name: 'stockInDetailPrint',
79
+      hidden: true,
80
+      is_menu: false,
81
+      meta: { title: 'stockInDetailPrint',noCache: true }
82
+    },
83
+    {
84
+      path: '/stock/out/detail',
85
+      component: () => import('@/xt_pages/stock/stockOutOrderDetailPrint'),
86
+      name: 'stockOutDetailPrint',
87
+      hidden: true,
88
+      is_menu: false,
89
+      meta: { title: 'stockOutDetailPrint',noCache: true }
90
+    },
65 91
   ]
66 92
 }

+ 36 - 1
src/router/modules/stock.js Wyświetl plik

@@ -233,6 +233,41 @@ export default {
233 233
         title: '出库打印',
234 234
         noCache: true
235 235
       }
236
-    }
236
+    },
237
+
238
+    {
239
+      path: '/stock/drugStockInOrderDetailPrint',
240
+      component: () => import('@/xt_pages/stock/drugs/drugStockInOrderDetailPrint'),
241
+      hidden: true,
242
+      is_menu: false,
243
+      name: 'drugInOrderDetailPrint',
244
+      meta: {
245
+        title: '药品入库单打印',
246
+        noCache: true
247
+      }
248
+    },
249
+    {
250
+      path: '/stock/drugStockOutOrderDetailPrint',
251
+      component: () => import('@/xt_pages/stock/drugs/drugStockOutOrderDetailPrint'),
252
+      hidden: true,
253
+      is_menu: false,
254
+      name: 'drugOutOrderDetailPrint',
255
+      meta: {
256
+        title: '药品入库单打印',
257
+        noCache: true
258
+      }
259
+    },
260
+
261
+    {
262
+      path: '/stock/drugQueryPrint',
263
+      component: () => import('@/xt_pages/stock/drugs/drugQueryPrint'),
264
+      hidden: true,
265
+      is_menu: false,
266
+      name: 'drugQueryPrint',
267
+      meta: {
268
+        title: '药品入库单打印',
269
+        noCache: true
270
+      }
271
+    },
237 272
   ]
238 273
 }

+ 23 - 0
src/xt_pages/dialysis/batch_print/batch_print_order.vue Wyświetl plik

@@ -249,6 +249,17 @@
249 249
                         <!--"-->
250 250
                         <!--&gt;</check-box>-->
251 251
                       </div>
252
+                      <div v-if="org_id == 9987" class="inline_block" style="width:200px;margin-left: 30px;">
253
+                          透前血压:
254
+                          <span class="under_line" style="width:50px;">
255
+                              &nbsp;{{ record.assessment_before_dislysis.systolic_blood_pressure ? record.assessment_before_dislysis.systolic_blood_pressure : ""}}
256
+                          </span>
257
+                          <span style='width:10px'>/</span>
258
+                          <span class="under_line" style="width:50px;">
259
+                              &nbsp;{{ record.assessment_before_dislysis.diastolic_blood_pressure ? record.assessment_before_dislysis.diastolic_blood_pressure : "" }}
260
+                          </span>
261
+                          <span style='width:30px'>mmHg</span>
262
+                        </div>
252 263
                     </div>
253 264
                     <div class="row" style="padding: 2px 0;">
254 265
                       <div class="inline_block">
@@ -1399,6 +1410,17 @@
1399 1410
                             )
1400 1411
                           "
1401 1412
                         ></check-box>
1413
+                        <check-box
1414
+                          v-if="org_id == 9987"
1415
+                          text="低血糖"
1416
+                          :checked="
1417
+                            isValueIndexOfCheck(
1418
+                              record.assessment_after_dislysis,
1419
+                              'complication',
1420
+                              '低血糖'
1421
+                            )
1422
+                          "
1423
+                        ></check-box>
1402 1424
                       </div>
1403 1425
                     </div>
1404 1426
                     <div class="row" style="padding: 2px 0;">
@@ -1960,6 +1982,7 @@ export default {
1960 1982
   },
1961 1983
   created() {
1962 1984
     var xtuser = this.$store.getters.xt_user;
1985
+    this.org_id = xtuser.org.id
1963 1986
     this.orgname = xtuser.org.org_name;
1964 1987
     //   this.orgname = "遂溪方济医院";
1965 1988
     this.modeOptions = this.$store.getters.treatment_mode;

+ 1 - 1
src/xt_pages/dialysis/batch_print/batch_print_order_thirteen.vue Wyświetl plik

@@ -539,7 +539,7 @@
539 539
                                 {{ monitor.dialysate_flow ? monitor.dialysate_flow : "" }}
540 540
                             </span>
541 541
                         </td>
542
-                        <td>&nbsp;{{monitor.ultrafiltration_volume?monitor.ultrafiltration_volume:''}}</td>
542
+                        <td>&nbsp;{{monitor.ultrafiltration_rate?monitor.ultrafiltration_rate:''}}</td>
543 543
                         <td>
544 544
                             <span v-if="monitor.symptom || monitor.dispose || monitor.result">
545 545
                                 {{ monitor.symptom + "," + monitor.dispose + "," + monitor.result }}

Plik diff jest za duży
+ 1949 - 0
src/xt_pages/dialysis/batch_print/batch_print_order_twentyEight.vue


+ 12 - 0
src/xt_pages/dialysis/bloodPresssWatch.vue Wyświetl plik

@@ -209,6 +209,16 @@
209 209
           >批量打印</el-button
210 210
         >
211 211
       </template>
212
+      <template v-if="this.template_id == 28">
213
+        <el-button
214
+          size="small"
215
+          icon="el-icon-printer"
216
+          :disabled="selecting_schs.length == 0"
217
+          @click="batchPrintAction"
218
+          type="primary"
219
+          >批量打印</el-button
220
+        >
221
+      </template>
212 222
       <template v-if="this.template_id == 30">
213 223
         <el-button
214 224
           size="small"
@@ -797,6 +807,8 @@ export default {
797 807
         this.$router.push({ path: "/dialysis/print/batch/twentyTwo" });
798 808
       } else if (this.template_id == 25) {
799 809
         this.$router.push({ path: "/dialysis/print/batch/twentyFive" });
810
+      }else if(this.template_id == 28){
811
+         this.$router.push({path:"/dialysis/print/batch/twentyEight"})
800 812
       } else if (this.template_id == 30) {
801 813
         this.$router.push({ path: "/dialysis/print/batch/thirty" });
802 814
       } else if (this.template_id == 32) {

+ 10 - 0
src/xt_pages/dialysis/details/DialysisPrescription.vue Wyświetl plik

@@ -20,6 +20,13 @@
20 20
 
21 21
         </li>
22 22
 
23
+         <li v-if="isShow('置换速度')">
24
+          <label>置换速度 : </label>
25
+          <span class="content">{{displace_speed }}</span>
26
+            <span class="unit">ml/min</span>
27
+        </li>
28
+
29
+
23 30
         <li v-if="isShow('透析液配方')">
24 31
           <label>透析液配方 : </label>
25 32
           <span class="content">{{ dialysate_formulation }}</span>
@@ -559,6 +566,9 @@ export default {
559 566
     },
560 567
     antioxidant_commodity_name:function(){
561 568
       return this.getValueStr('antioxidant_commodity_name','antioxidant_commodity_name')
569
+    },
570
+    displace_speed:function(){
571
+      return this.getValueStr('displace_speed','displace_speed')
562 572
     }
563 573
   },
564 574
   created() {

+ 11 - 2
src/xt_pages/dialysis/details/NavIgation.vue Wyświetl plik

@@ -88,6 +88,7 @@
88 88
       :last_prescription="last_dialysis_prescribe"
89 89
       :dry_weight="last_dryWeight_dislysis"
90 90
       :schedual="temp_schedual"
91
+      :lastAssessment="lastAssessment"
91 92
     ></dialysis-prescription-dialog>
92 93
 
93 94
     <double-check-dialog
@@ -113,6 +114,7 @@
113 114
       :predialysis_evaluation="predialysis_evaluation"
114 115
       :admin_users="admin_users"
115 116
       :dry_weight="last_dryWeight_dislysis"
117
+      :lastAssessment="lastAssessment"
116 118
     ></assessment-before-dislysis-dialog>
117 119
 
118 120
     <treatment-summary-dialog
@@ -506,6 +508,13 @@ export default {
506 508
       default: () => {
507 509
         return [];
508 510
       }
511
+    },
512
+    lastAssessment:{
513
+     // 最后一条血管通路(处理今天录的)
514
+     type: Object,
515
+      default: () => {
516
+        return { id: 0 };
517
+      }
509 518
     }
510 519
   },
511 520
   methods: {
@@ -542,7 +551,7 @@ export default {
542 551
       lastDialysisPrescribe,
543 552
       lastDryWeightDislysis,
544 553
       schedual,
545
-      system_prescribe
554
+      system_prescribe,
546 555
     ) {
547 556
 
548 557
       this.$refs.assessmentBefore.setLastRecord(
@@ -598,7 +607,7 @@ export default {
598 607
     showAssessmentBefore: function() {
599 608
       console.log(this.last_predialysis_evaluation)
600 609
 
601
-      this.$refs.assessmentBefore.show(this.predialysis_evaluation,this.last_dryWeight_dislysis,this.last_predialysis_evaluation);
610
+      this.$refs.assessmentBefore.show(this.predialysis_evaluation,this.last_dryWeight_dislysis,this.last_predialysis_evaluation,this.lastAssessment);
602 611
     },
603 612
     showDoubleCheck: function() {
604 613
       this.$refs.doubleCheck.show();

+ 36 - 0
src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue Wyświetl plik

@@ -743,6 +743,12 @@
743 743
         default: () => {
744 744
           return []
745 745
         }
746
+      },
747
+      lastAssessment:{
748
+        type:Array,
749
+         default: () => {
750
+          return []
751
+        }
746 752
       }
747 753
 
748 754
     },
@@ -752,6 +758,7 @@
752 758
         this.lastDryWeightDislysis = lastDryWeightDislysis
753 759
       },
754 760
       isShow(name) {
761
+        
755 762
         var filedList = store.getters.xt_user.fileds
756 763
         for (let i = 0; i < filedList.length; i++) {
757 764
           if (filedList[i].module == 3 && filedList[i].filed_name_cn == name && filedList[i].is_show == 1) {
@@ -760,6 +767,7 @@
760 767
         }
761 768
         return false
762 769
       },
770
+
763 771
       show(assessment, lastDryWeightDislysis,last_predialysis_evaluation) {
764 772
         this.lastPredialysisEvaluation = last_predialysis_evaluation
765 773
        
@@ -812,6 +820,7 @@
812 820
 
813 821
           if (lastDryWeightDislysis != null) {
814 822
             this.weight_adjust.weight = lastDryWeightDislysis.dry_weight
823
+           
815 824
             this.$set(
816 825
               this.assessmentBeforeDislysis,
817 826
               'dry_weight',
@@ -825,6 +834,9 @@
825 834
             }
826 835
           }
827 836
 
837
+
838
+
839
+
828 840
           if (this.lastPredialysisEvaluation != null) {
829 841
             for (var key in this.lastPredialysisEvaluation){
830 842
               if (key != 'systolic_blood_pressure' && key != 'diastolic_blood_pressure' && key != 'pulse_frequency' && key != 'dry_weight' && key != 'weight_before'){
@@ -837,6 +849,30 @@
837 849
               }
838 850
             }
839 851
           }
852
+          
853
+         //最后一次血管通路
854
+
855
+         if(this.lastAssessment!=null){
856
+           var blood_id = 0
857
+           for(let i= 0;i<this.blood_access_part_opera.length;i++){
858
+              if(this.lastAssessment.blood_access_part_opera_id == this.blood_access_part_opera[i].name){
859
+                 blood_id = this.blood_access_part_opera[i].id
860
+              }
861
+           }
862
+            this.assessmentBeforeDislysis.blood_access_part_opera_id = blood_id
863
+            this.assessmentBeforeDislysis.blood_access_part_id = this.lastAssessment.blood_access_part_id
864
+          } else {
865
+            if (this.lastPredialysisEvaluation != null) {
866
+               var blood_id = 0
867
+                for(let i= 0;i<this.blood_access_part_opera.length;i++){
868
+                    if(this.lastAssessment.blood_access_part_opera_id == this.blood_access_part_opera[i].name){
869
+                      blood_id = this.blood_access_part_opera[i].id
870
+                    }
871
+                }
872
+              this.assessmentBeforeDislysis.blood_access_part_opera_id = blood_id
873
+              this.assessmentBeforeDislysis.blood_access_part_id = this.lastPredialysisEvaluation.blood_access_part_id
874
+            }
875
+          }
840 876
 
841 877
         } else {
842 878
          

+ 51 - 4
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Wyświetl plik

@@ -252,7 +252,17 @@
252 252
               ></el-input>
253 253
             </el-form-item>
254 254
           </el-col>
255
+          
255 256
 
257
+           <el-col :span="8" v-if="isShows('置换速度')" v-show="totalShow">
258
+            <el-form-item label="置换速度(ml/min)">
259
+               <el-input
260
+                v-model="dialysisPrescription.displace_speed"
261
+              ></el-input>
262
+            </el-form-item>
263
+          </el-col>
264
+
265
+ 
256 266
           <el-col
257 267
             :span="8"
258 268
             v-if="anticoagulant.gaimingcheng != -1 && isShows('钙名称')"
@@ -454,14 +464,14 @@
454 464
             </el-form-item>
455 465
           </el-col>
456 466
 
457
-          <el-col :span="8" v-if="isShows('置换液总量') && (this.$store.getters.xt_user.template_info.template_id == 21 || this.$store.getters.xt_user.template_info.template_id == 29)" v-show="totalShow">
467
+          <el-col :span="8" v-if="isShows('置换液总量') && (this.$store.getters.xt_user.template_info.template_id == 21 || this.$store.getters.xt_user.template_info.template_id == 29 || this.$store.getters.xt_user.template_info.template_id ==24)" v-show="totalShow">
458 468
             <el-form-item label="置换液总量(ml)">
459 469
               <el-input
460 470
                 v-model="dialysisPrescription.displace_liqui_value"
461 471
               ></el-input>
462 472
             </el-form-item>
463 473
           </el-col>
464
-          <el-col :span="8" v-if="isShows('置换液总量') && this.$store.getters.xt_user.template_info.template_id != 21 && this.$store.getters.xt_user.template_info.template_id != 29" v-show="totalShow">
474
+          <el-col :span="8" v-if="isShows('置换液总量') && this.$store.getters.xt_user.template_info.template_id != 21 && this.$store.getters.xt_user.template_info.template_id != 29 && this.$store.getters.xt_user.template_info.template_id !=24" v-show="totalShow">
465 475
             <el-form-item label="置换液总量(L)">
466 476
               <el-input
467 477
                 v-model="dialysisPrescription.displace_liqui_value"
@@ -1151,7 +1161,13 @@
1151 1161
           return { id: 0 }
1152 1162
         }
1153 1163
       },
1154
-      scheudle_mode:Number
1164
+      scheudle_mode:Number,
1165
+      lastAssessment: {
1166
+        type: Object,
1167
+        default: () => {
1168
+          return { id: 0 }
1169
+        }
1170
+      },
1155 1171
     },
1156 1172
     computed: {
1157 1173
       dialysis_date: function() {
@@ -1273,6 +1289,7 @@
1273 1289
           blood:"",
1274 1290
           irrigation:"",
1275 1291
           antioxidant_commodity_name:"",
1292
+          displace_speed:"",
1276 1293
         },
1277 1294
 
1278 1295
         anticoagulant: {
@@ -1423,7 +1440,7 @@
1423 1440
       setLastRecord: function(schedual,lastAssessmentAfterDislysis,lastPredialysisEvaluation,lastDialysisPrescribe,lastDryWeightDislysis,system_prescribe) {
1424 1441
 
1425 1442
         this.treatment_mode = this.$store.getters.treatment_mode
1426
-        console.log("99999",this.treatment_mode)
1443
+        // console.log("99999",this.treatment_mode)
1427 1444
         this.perfusion_apparatus = getDataConfig(
1428 1445
           'hemodialysis',
1429 1446
           'perfusion_apparatus'
@@ -1821,6 +1838,7 @@
1821 1838
         return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
1822 1839
       },
1823 1840
       show(pre,schedual,last,his_is_open) {
1841
+     
1824 1842
         if(his_is_open == 1){
1825 1843
           this.is_open = 0
1826 1844
         }
@@ -1893,6 +1911,8 @@
1893 1911
         } else {
1894 1912
           last_weight_after = this.last_record.weight_after
1895 1913
         }
1914
+        
1915
+ 
1896 1916
 
1897 1917
         if (this.predialysis == null || this.predialysis.id == 0) {
1898 1918
           if(last != null) {
@@ -1911,7 +1931,10 @@
1911 1931
             this.dialysisPrescription.tubing_hemodialysis = last.tubing_hemodialysis
1912 1932
             this.dialysisPrescription.package = last.package
1913 1933
             this.dialysisPrescription.a_liquid = last.a_liquid
1934
+
1914 1935
             weight_before = 0
1936
+
1937
+           
1915 1938
           }
1916 1939
 
1917 1940
         } else {
@@ -1919,6 +1942,30 @@
1919 1942
         }
1920 1943
 
1921 1944
 
1945
+          //获取最后一次血管通路
1946
+         if(this.predialysis!=null){
1947
+            if(this.lastAssessment!=null){
1948
+              var blood_id = 0
1949
+              for(let i= 0;i<this.blood_access_option.length;i++){
1950
+                  if(this.lastAssessment.blood_access_part_opera_id == this.blood_access_option[i].name){
1951
+                    blood_id = this.blood_access_option[i].id
1952
+                  }
1953
+              }
1954
+               console.log("中国人名职员",this.lastAssessment)
1955
+               this.dialysisPrescription.blood_access = blood_id
1956
+            }else{
1957
+              if(this.last_prescription!=null){
1958
+                  var blood_id = 0
1959
+                  for(let i= 0;i<this.blood_access_option.length;i++){
1960
+                      if(this.last_prescription.blood_access_part_opera_id == this.blood_access_option[i].name){
1961
+                        blood_id = this.blood_access_option[i].id
1962
+                      }
1963
+                  }   
1964
+                   this.dialysisPrescription.blood_access = blood_id
1965
+              }
1966
+            }
1967
+           
1968
+         }
1922 1969
 
1923 1970
         if (weight_before > 0 && last_weight_after > 0) {
1924 1971
           this.add_weight = parseFloat(weight_before - last_weight_after).toFixed(

+ 19 - 16
src/xt_pages/dialysis/details/index.vue Wyświetl plik

@@ -217,6 +217,7 @@
217 217
         <span v-if="newTime != ''">&nbsp;&nbsp;|&nbsp;&nbsp;</span>
218 218
         <span v-if="newTime != ''">签到时间:{{ newTime }}</span>
219 219
       </div>
220
+
220 221
       <nav-igation
221 222
         ref="nav"
222 223
         title="弹窗导航"
@@ -265,9 +266,12 @@
265 266
         @assessmentAfterDislysis="assessmentAfterDislysisFunc"
266 267
         :system_prescribe="system_prescribe"
267 268
         :his_is_open="his_is_open"
269
+        :lastAssessment="lastAssessment"
268 270
       >
269 271
       </nav-igation>
270 272
 
273
+
274
+
271 275
       <basic-infor
272 276
         :patient="patient"
273 277
         :device_number="schedual.id == 0 ? '' : schedual.device_number.number"
@@ -630,6 +634,7 @@ export default {
630 634
       lastMonitorRecord: { id: 0 },
631 635
       lastAssessmentAfterDislysis: { id: 0 },
632 636
       lastDryWeightDislysis: { id: 0 },
637
+      lastAssessment:{id:0},
633 638
       headNurses: [],
634 639
       lastDialysisPrescribe: { id: 0 },
635 640
       //
@@ -971,21 +976,19 @@ export default {
971 976
         if (resp.state == 1) {
972 977
           var patient = resp.data.patient // 患者信息
973 978
           var schedual = resp.data.schedual // 患者排班信息
974
-          // console.log("患者排班信息99999999",schedual)
979
+        
975 980
           var prescription = resp.data.prescription // 透析处方
976 981
           if (prescription != null) {
977 982
             if (prescription.body_fluid == -2) {
978 983
               prescription.body_fluid = 0
979 984
             }
980 985
           }
981
-          // console.log('透析处方', prescription)
986
+        
982 987
           var solution = resp.data.solution // 透析方案
983 988
           var receiver_treatment_access = resp.data.receiver_treatment_access // 接诊评估
984
-          // console.log('receiver_treatment_access', receiver_treatment_access)
989
+         
985 990
           var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
986 991
          
987
-        
988
-
989 992
           if (predialysis_evaluation != null) {
990 993
             if (predialysis_evaluation.blood_access_part_id == -2) {
991 994
               predialysis_evaluation.blood_access_part_id = 0
@@ -1015,20 +1018,21 @@ export default {
1015 1018
           var aliquid_info = resp.data.aliquid_info
1016 1019
 
1017 1020
           var lastPredialysisEvaluation = resp.data.lastPredialysisEvaluation
1018
-          // console.log('上次透前评估', lastPredialysisEvaluation)
1021
+        
1019 1022
           if (lastPredialysisEvaluation != null) {
1020 1023
             if (lastPredialysisEvaluation.blood_access_part_id == -2) {
1021 1024
               lastPredialysisEvaluation.blood_access_part_id = 0
1022 1025
             }
1023 1026
           }
1024 1027
           var lastMonitorRecord = resp.data.lastMonitorRecord
1025
-          var lastAssessmentAfterDislysis =
1026
-            resp.data.lastAssessmentAfterDislysis
1028
+          var lastAssessmentAfterDislysis = resp.data.lastAssessmentAfterDislysis
1027 1029
           var lastDialysisPrescribe = resp.data.lastDialysisPrescribe
1028 1030
           var lastDryWeightDislysis = resp.data.lastDryWeightDislysis
1029
-          // console.log("最后一次干体重",lastDryWeightDislysis)
1031
+         
1030 1032
           var system_prescribe = resp.data.system_prescribe
1031
-
1033
+           
1034
+          var lastAssessment =  resp.data.lastAssessment
1035
+          console.log("最后一次血管通路",lastAssessment)
1032 1036
           this.$refs.nav.setLastRecord(
1033 1037
             lastPredialysisEvaluation,
1034 1038
             lastMonitorRecord,
@@ -1036,7 +1040,8 @@ export default {
1036 1040
             lastDialysisPrescribe,
1037 1041
             lastDryWeightDislysis,
1038 1042
             schedual,
1039
-            system_prescribe
1043
+            system_prescribe,
1044
+            lastAssessment,
1040 1045
           )
1041 1046
 
1042 1047
           var headNurses = resp.data.headNurse
@@ -1047,6 +1052,7 @@ export default {
1047 1052
           this.lastAssessmentAfterDislysis = lastAssessmentAfterDislysis
1048 1053
           this.lastDialysisPrescribe = lastDialysisPrescribe
1049 1054
           this.lastDryWeightDislysis = lastDryWeightDislysis
1055
+          this.lastAssessment = lastAssessment
1050 1056
           this.headNurses = headNurses
1051 1057
           this.system_prescribe = system_prescribe
1052 1058
 
@@ -1109,8 +1115,7 @@ export default {
1109 1115
           this.dialysis_order =
1110 1116
             dialysis_order == null ? { id: 0 } : dialysis_order
1111 1117
 
1112
-          // this.$refs.stat_order.setAdvices(this.doctor_advices)
1113
-          // this.$refs.monitoring.setRecords(this.monitor_records)
1118
+         
1114 1119
 
1115 1120
           this.admin_users = resp.data.doctors
1116 1121
           this.devices = resp.data.devices
@@ -1121,9 +1126,7 @@ export default {
1121 1126
           this.his_is_open = resp.data.is_open_config.is_open
1122 1127
           console.log(this.his_is_open)
1123 1128
           
1124
-          // var stockType =  resp.data.stockType
1125
-          // this.stockType = stockType
1126
-          // console.log("stockTYPW",stockType)
1129
+      
1127 1130
           
1128 1131
           for (let i = 0; i <  this.doctor_advices.length; i++){
1129 1132
             this.doctor_advices[i]['origin'] = 1

+ 15 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderOne.vue Wyświetl plik

@@ -137,6 +137,19 @@
137 137
                         <!--&nbsp;-->
138 138
                       </div>
139 139
                     </td>
140
+                    <td v-if="org_id == 9987" width="80">透前血压:</td>
141
+                    <td v-if="org_id == 9987" width="50">
142
+                      <div class="under-line">
143
+                        &nbsp;{{ predialysis.systolic_blood_pressure ? predialysis.systolic_blood_pressure : ""}}
144
+                      </div>
145
+                    </td>
146
+                    <td v-if="org_id == 9987" width='10'>/</td>
147
+                    <td v-if="org_id == 9987" width="50">
148
+                      <div class="under-line">
149
+                        &nbsp;{{ predialysis.diastolic_blood_pressure ? predialysis.diastolic_blood_pressure : "" }}
150
+                      </div>
151
+                    </td>
152
+                    <td v-if="org_id == 9987" width='30'>mmHg</td>
140 153
                     <td></td>
141 154
                   </tr>
142 155
                 </tbody>
@@ -702,7 +715,7 @@
702 715
                 <tbody>
703 716
                   <tr>
704 717
                     <td width="55">并发症:</td>
705
-                    <td width="600">
718
+                    <td :width="org_id == 9987 ? 670 : 600">
706 719
                       <label-box :isChecked="afterdialysis.complication&&afterdialysis.complication.indexOf('低血压') > -1 ? true : false" showValue="低血压"></label-box>
707 720
                       <label-box :isChecked="afterdialysis.complication&&afterdialysis.complication.indexOf('高血压') > -1 ? true : false" showValue="高血压"></label-box>
708 721
                       <label-box :isChecked="afterdialysis.complication&&afterdialysis.complication.indexOf('心律失常') > -1 ? true : false" showValue="心律失常"></label-box>
@@ -714,6 +727,7 @@
714 727
                       <label-box :isChecked="afterdialysis.complication&&afterdialysis.complication.indexOf('心衰') > -1 ? true : false" showValue="心衰"></label-box>
715 728
                       <label-box :isChecked="afterdialysis.complication&&afterdialysis.complication.indexOf('腹痛') > -1 ? true : false" showValue="腹痛"></label-box>
716 729
                       <label-box :isChecked="afterdialysis.complication&&afterdialysis.complication.indexOf('无') > -1 ? true : false" showValue="无"></label-box>
730
+                      <label-box v-if="org_id == 9987" :isChecked="afterdialysis.complication&&afterdialysis.complication.indexOf('低血糖') > -1 ? true : false" showValue="低血糖"></label-box>
717 731
                     </td>
718 732
                     <td></td>
719 733
                   </tr>

+ 3 - 7
src/xt_pages/dialysis/template/DialysisPrintOrderTwentyEight.vue Wyświetl plik

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <div id="dialysis-print-box">
3 3
     <div class="dialysis-print-order">
4
-      <!-- <div class="order-yy-name">{{ orgname }}</div> -->
4
+    
5 5
       <div class="order-title">{{ orgname }}&nbsp;&nbsp;血液净化治疗记录单</div>
6 6
       <table class="table-box" style="margin-top: 10px;">
7 7
         <tbody>
@@ -39,12 +39,7 @@
39 39
         </tr>
40 40
         </tbody>
41 41
       </table>
42
-      <!-- <div style="display:flex:font-size:14px">
43
-        <span style="width:50px;text-align:text-algin">诊 断:</span>
44
-        <div class="under-line" style="text-align:left">
45
-          &nbsp;{{ patientInfo.diagnose }}
46
-        </div>
47
-      </div> -->
42
+     
48 43
       <table class="table-box" style="margin-top: 10px;">
49 44
         <tbody>
50 45
         <tr>
@@ -63,6 +58,7 @@
63 58
         </tr>
64 59
         </tbody>
65 60
       </table>
61
+
66 62
       <table class="print-table" border="1">
67 63
         <tbody>
68 64
         <tr>

+ 60 - 12
src/xt_pages/dialysis/template/DialysisPrintOrderTwentyFour.vue Wyświetl plik

@@ -377,11 +377,11 @@
377 377
                       <div>
378 378
                         <label-box :isChecked="predialysis.catheter.indexOf('血流量-好') > -1 ? true : false" showValue="好"></label-box>
379 379
                         &nbsp;
380
-                        <label-box :isChecked="predialysis.catheter.indexOf('血流量差-A') > -1 ? true : false" showValue="A"></label-box>
380
+                        <label-box :isChecked="predialysis.catheter.indexOf('A端血流量差') > -1 ? true : false" showValue="A"></label-box>
381 381
                         /
382
-                        <label-box :isChecked="predialysis.catheter.indexOf('血流量差-V') > -1 ? true : false" showValue="V"></label-box>
382
+                        <label-box :isChecked="predialysis.catheter.indexOf('V端血流量差') > -1 ? true : false" showValue="V"></label-box>
383 383
                         差&nbsp;
384
-                        <label-box :isChecked="predialysis.catheter.indexOf('血流量-AV反接') > -1 ? true : false" showValue="AV反接"></label-box>
384
+                        <label-box :isChecked="predialysis.catheter.indexOf('AV反接') > -1 ? true : false" showValue="AV反接"></label-box>
385 385
                       </div>
386 386
                     </td>
387 387
                   </tr>
@@ -559,7 +559,7 @@
559 559
                 <table class="table-box">
560 560
                     <tbody>
561 561
                         <tr>
562
-                            <td width='110'>透析频率(次/周)</td>
562
+                            <td width='120'>透析频率(次/周)</td>
563 563
                             <td width='50'>
564 564
                                 <div class="under-line">
565 565
                                     &nbsp;{{ predialysis.dialysis_count ? predialysis.dialysis_count : "" }}
@@ -583,12 +583,18 @@
583 583
                             </td>
584 584
                             <td width='20'></td>
585 585
                             <td width='80'>灌流器</td>
586
-                            <td width='120'>
586
+                            <td width='100'>
587 587
                                 <div class="under-line">
588 588
                                     &nbsp;{{ prescription.dialyzer_perfusion_apparatus ? getDialyzerPerfusionApparatus(prescription.dialyzer_perfusion_apparatus,'灌流器') : '' }}
589 589
                                 </div>
590 590
                             </td>
591
-                            <td></td>
591
+                            <td width='70'>置换速度</td>
592
+                            <td width='90'>
593
+                                <div class="under-line">
594
+                                    &nbsp;{{ prescription.displace_speed ? prescription.displace_speed:'' }}
595
+                                </div>
596
+                            </td>
597
+                            
592 598
                         </tr>
593 599
                     </tbody>
594 600
                 </table>
@@ -649,14 +655,14 @@
649 655
                                     &nbsp;<span v-if="prescription.anticoagulant == 2">{{ prescription.anticoagulant_shouji }}</span>
650 656
                                 </div>
651 657
                             </td>
652
-                            <td width='10'>mg</td>
658
+                            <td width='10'>U</td>
653 659
                             <td width='40'>追加</td>
654 660
                             <td width='50'>
655 661
                                 <div class="under-line">
656 662
                                     &nbsp;<span v-if="prescription.anticoagulant == 2">{{ prescription.anticoagulant_weichi }}</span>
657 663
                                 </div>
658 664
                             </td>
659
-                            <td width='20'>mg/h</td>
665
+                            <td width='20'>U/h</td>
660 666
                             <td width='40'>提前</td>
661 667
                             <td width='50'>
662 668
                                 <div class="under-line">
@@ -682,8 +688,8 @@
682 688
                     <td width="20">钙</td>
683 689
                     <td width="180">
684 690
                       (
685
-                        <label-box :isChecked="prescription.dialysate_formulation_name.indexOf('常规') > -1 ? true : false" showValue="1.25"></label-box>
686
-                        <label-box :isChecked="prescription.dialysate_formulation_name.indexOf('低钙') > -1 ? true : false" showValue="1.5"></label-box>
691
+                        <label-box :isChecked="false" showValue="1.25"></label-box>
692
+                        <label-box :isChecked="prescription.dialysate_formulation_name.indexOf('常规') > -1 ? true : false" showValue="1.5"></label-box>
687 693
                         <label-box :isChecked="prescription.dialysate_formulation_name.indexOf('高钙') > -1 ? true : false" showValue="1.75"></label-box>
688 694
                       )
689 695
                     </td>
@@ -728,7 +734,7 @@
728 734
                     <td width='50'>
729 735
                         <div class="under-line">
730 736
                             &nbsp;<span v-if="afterdialysis.sealing_fluid_dispose.indexOf('肝素')>-1">
731
-                                {{ afterdialysis.sealing_fluid_dispose ? getSealingFluidDispose(afterdialysis.sealing_fluid_dispose).replace(/[^0-9]/ig,"") : '' }}
737
+                                {{ afterdialysis.sealing_fluid_dispose ? getSealingFluidDispose(afterdialysis.sealing_fluid_dispose).replace(/[^\d.]/g,"") : '' }}
732 738
                             </span>
733 739
                         </div>
734 740
                     </td>
@@ -741,7 +747,7 @@
741 747
                     <td width='50'>
742 748
                         <div class="under-line">
743 749
                             &nbsp;<span v-if="afterdialysis.sealing_fluid_dispose.indexOf('+NS')>-1">
744
-                                {{ afterdialysis.sealing_fluid_dispose ? getSealingFluidDisposetwo(afterdialysis.sealing_fluid_dispose).replace(/[^0-9]/ig,"") : '' }}
750
+                                {{ afterdialysis.sealing_fluid_dispose ? getSealingFluidDisposetwo(afterdialysis.sealing_fluid_dispose).replace(/[^\d.]/g,"") : '' }}
745 751
                             </span>
746 752
                         </div>
747 753
                     </td>
@@ -1547,6 +1553,27 @@ export default {
1547 1553
         if(arr[i] == "肝素10ml"){
1548 1554
           strname = "肝素10ml"
1549 1555
         }
1556
+        if(arr[i] == "肝素1.1ml"){
1557
+          strname = "肝素1.1ml"
1558
+        }
1559
+        if(arr[i] == "肝素1.2ml"){
1560
+          strname = "肝素1.2ml"
1561
+        }
1562
+       if(arr[i] == "肝素1.3ml"){
1563
+          strname = "肝素1.3ml"
1564
+        }
1565
+        if(arr[i] == "肝素1.4ml"){
1566
+          strname = "肝素1.4ml"
1567
+        }
1568
+       if(arr[i] == "肝素1.5ml"){
1569
+          strname = "肝素1.5ml"
1570
+        }
1571
+       if(arr[i] == "肝素1.6ml"){
1572
+          strname = "肝素1.6ml"
1573
+        }
1574
+       if(arr[i] == "肝素1.7ml"){
1575
+          strname = "肝素1.7ml"
1576
+        }
1550 1577
       }
1551 1578
       return strname
1552 1579
     },
@@ -1564,6 +1591,27 @@ export default {
1564 1591
         if(arr[i] == "+NS10ml"){
1565 1592
           strname = "+NS10ml"
1566 1593
         }
1594
+        if(arr[i] == "+NS1.1ml"){
1595
+          strname = "+NS1.1ml"
1596
+        }
1597
+        if(arr[i] == "+NS1.2ml"){
1598
+          strname = "+NS1.2ml"
1599
+        }
1600
+       if(arr[i] == "+NS1.3ml"){
1601
+          strname = "+NS1.3ml"
1602
+        }
1603
+       if(arr[i] == "+NS1.4ml"){
1604
+          strname = "+NS1.4ml"
1605
+        }
1606
+       if(arr[i] == "+NS1.5ml"){
1607
+          strname = "+NS1.5ml"
1608
+        }
1609
+       if(arr[i] == "+NS1.6ml"){
1610
+          strname = "+NS1.6ml"
1611
+        }
1612
+      if(arr[i] == "+NS1.7ml"){
1613
+          strname = "+NS1.7ml"
1614
+        }
1567 1615
       }
1568 1616
       return strname
1569 1617
     },

+ 11 - 11
src/xt_pages/qcd/workAnalysis/nurse.vue Wyświetl plik

@@ -169,7 +169,7 @@
169 169
                 {{scope.row.mission_count?scope.row.mission_count:''}}
170 170
               </template>
171 171
             </el-table-column>
172
-             
172
+
173 173
               <!-- change_nurse_count:total_change_nurse,
174 174
                 diffcult_nurse_count:total_diffcult_nurse,
175 175
                 new_fistula_nurse_count:total_new_fistula_nurse,
@@ -390,13 +390,13 @@
390 390
         this.loading = true
391 391
         this.tableData = []
392 392
         this.modeList = []
393
-        console.log("params",params)
393
+        // console.log("params",params)
394 394
         GetNurseWorkloadTableData(params)
395 395
           .then(rs => {
396 396
             var resp = rs.data
397
-             
397
+
398 398
             if (resp.state == 1) {
399
-            
399
+
400 400
               let total_cure = 0
401 401
               let total_puncture = 0
402 402
               let total_mission = 0
@@ -405,12 +405,12 @@
405 405
               let total_new_fistula_nurse = 0
406 406
               let total_start_nurse = 0
407 407
               this.loading = false
408
-              
408
+
409 409
               for (let i = 0; i < resp.data.data.length; i++) {
410 410
                 total_cure = total_cure + resp.data.data[i].cure_count
411 411
                 total_puncture = total_puncture + resp.data.data[i].puncture_count
412 412
                 total_mission = total_mission + resp.data.data[i].mission_count
413
-                
413
+
414 414
                 total_change_nurse = total_change_nurse + resp.data.data[i].change_nuser_count
415 415
                 total_diffcult_nurse = total_diffcult_nurse + resp.data.data[i].difficult_nuser_count
416 416
                 total_new_fistula_nurse = total_new_fistula_nurse + resp.data.data[i].new_nuser_count
@@ -427,7 +427,7 @@
427 427
                 new_nuser_count:total_new_fistula_nurse,
428 428
                 start_nuser_count:total_start_nurse,
429 429
               })
430
-             
430
+
431 431
               var dialysisCount = resp.data.dialysisCount
432 432
                 console.log("dialysisCount",dialysisCount)
433 433
               for(let i=0;i<dialysisCount.length;i++){
@@ -522,13 +522,13 @@
522 522
           this.monthValue = ''
523 523
           sessionStorage.setItem("nurse_start_time", val)
524 524
           sessionStorage.removeItem("nurseMonth");
525
-          
525
+
526 526
           this.GetNurseWorkloadChartData(this.query)
527 527
           this.GetNurseWorkloadTableData(this.query)
528 528
 
529 529
         }
530 530
 
531
-      }, 
531
+      },
532 532
        GetNurseWorkloadChartData(params) {
533 533
 
534 534
         this.bar.xAxis.data = []
@@ -666,7 +666,7 @@
666 666
       this.query.end_time = year + '-' + month + '-' + day
667 667
       this.query.start_time = year + '-' + last_month + '-' + day
668 668
       this.query.statistics_type = 1
669
-      
669
+
670 670
       this.start_time = year + '-' + last_month + '-' + day
671 671
       this.end_time = year + '-' + month + '-' + day
672 672
 
@@ -699,7 +699,7 @@
699 699
         this.end_time = ''
700 700
       }
701 701
       // console.log('this.query2',this.query)
702
-      
702
+
703 703
       this.GetAllNurse()
704 704
       this.GetNurseWorkloadChartData(this.query)
705 705
       this.GetNurseWorkloadTableData(this.query)

+ 3 - 3
src/xt_pages/stock/detail/cancelStockDetail.vue Wyświetl plik

@@ -8,14 +8,14 @@
8 8
       type="primary"
9 9
       >打印
10 10
     </el-button>
11
-    <!-- <el-button
11
+    <el-button
12 12
       style="float: right;margin-right:10px"
13 13
       size="small"
14 14
       icon="el-icon-printer"
15 15
       @click="exportList"
16 16
       type="primary"
17 17
       >导出
18
-    </el-button> -->
18
+    </el-button>
19 19
     <div class="cell clearfix">
20 20
       <el-input
21 21
         size="small"
@@ -575,7 +575,7 @@ export default {
575 575
         excel.export_json_to_excel({
576 576
            header: tHeader,
577 577
            data,
578
-           filename: '耗材库明细'
578
+           filename: '耗材退库明细'
579 579
          })
580 580
           this.downloadLoading = false
581 581
         })

+ 1 - 0
src/xt_pages/stock/detail/print.vue Wyświetl plik

@@ -171,6 +171,7 @@
171 171
             var stockTotal = response.data.data.stockTotal
172 172
             console.log("stocktOTl",stockTotal)
173 173
             this.stockTotal = stockTotal
174
+            console.log("导出数据",response.data.data.list)
174 175
             for (let i = 0; i < response.data.data.list.length; i++) {
175 176
               if (this.type == 1) {
176 177
                 if (response.data.data.list[i].query_warehousing_info.length > 0) {

+ 3 - 3
src/xt_pages/stock/detail/salesReturnDetail.vue Wyświetl plik

@@ -9,14 +9,14 @@
9 9
       >打印
10 10
     </el-button>
11 11
 
12
-    <!-- <el-button
12
+    <el-button
13 13
       style="float: right;margin-right:10px"
14 14
       size="small"
15 15
       icon="el-icon-printer"
16 16
       @click="exportList"
17 17
       type="primary"
18 18
       >导出
19
-    </el-button> -->
19
+    </el-button>
20 20
     <div class="cell clearfix">
21 21
       <el-input
22 22
         size="small"
@@ -576,7 +576,7 @@ export default {
576 576
         excel.export_json_to_excel({
577 577
            header: tHeader,
578 578
            data,
579
-           filename: '耗材出库明细'
579
+           filename: '耗材退货明细'
580 580
          })
581 581
           this.downloadLoading = false
582 582
         })

+ 115 - 46
src/xt_pages/stock/detail/stockInDetail.vue Wyświetl plik

@@ -9,14 +9,14 @@
9 9
       >打印
10 10
     </el-button>
11 11
 
12
-    <!-- <el-button
12
+    <el-button
13 13
       style="float: right;margin-right:10px"
14 14
       size="small"
15 15
       icon="el-icon-printer"
16 16
       @click="exportList"
17 17
       type="primary"
18 18
       >导出
19
-    </el-button> -->
19
+    </el-button>
20 20
 
21 21
     <div class="cell clearfix">
22 22
       <el-input
@@ -201,7 +201,8 @@ import {
201 201
   deleteCancelStock,
202 202
   GetAllConfig,
203 203
   getStockDetail,
204
-  getPrintStockGood
204
+  getPrintStockGood,
205
+  
205 206
 } from "@/api/stock";
206 207
 
207 208
 export default {
@@ -232,6 +233,8 @@ export default {
232 233
     this.GetConfigInfo();
233 234
     this.fetchAllAdminUsers();
234 235
     this.goodUnit = this.$store.getters.good_unit
236
+
237
+    this.getPrintStockGood()
235 238
   },
236 239
   data() {
237 240
     return {
@@ -264,21 +267,25 @@ export default {
264 267
       selectedTableData: [],
265 268
       dealer: [],
266 269
       tableList:[],
267
-      goodUnit:[]
270
+      goodUnit:[],
271
+      stockTotal:[]
268 272
     };
269 273
   },
270 274
   methods: {
271 275
     changeType: function(val) {
272 276
       this.order_type = val;
273 277
       this.GetCancelStock();
278
+      this.getPrintStockGood()
274 279
     },
275 280
     changeManufacturer: function(val) {
276 281
       this.manufacturer_id = val;
277 282
       this.GetCancelStock();
283
+      this.getPrintStockGood()
278 284
     },
279 285
     changeDealer: function(val) {
280 286
       this.dealer_id = val;
281 287
       this.GetCancelStock();
288
+      this.getPrintStockGood()
282 289
     },
283 290
     getTypeName: function(row) {
284 291
       let name = "";
@@ -388,7 +395,7 @@ export default {
388 395
             var obj = response.data.data.list[i];
389 396
             obj["is_total"] = 0;
390 397
             this.cancelStockDate.push(obj);
391
-            this.tableList.push(obj)
398
+            // this.tableList.push(obj)
392 399
           }
393 400
           this.cancelStockDate.push({
394 401
             warehousing_order: "合计",
@@ -444,10 +451,12 @@ export default {
444 451
     handleSizeChange(val) {
445 452
       this.limit = val;
446 453
       this.GetCancelStock();
454
+      this.getPrintStockGood()
447 455
     },
448 456
     handleCurrentChange(val) {
449 457
       this.page = val;
450 458
       this.GetCancelStock();
459
+      this.getPrintStockGood()
451 460
     },
452 461
     startTimeChange(val) {
453 462
       var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
@@ -456,6 +465,7 @@ export default {
456 465
         this.start_time = "";
457 466
       } else {
458 467
         this.GetCancelStock();
468
+        this.getPrintStockGood()
459 469
       }
460 470
     },
461 471
     endTimeChange(val) {
@@ -465,6 +475,7 @@ export default {
465 475
         this.end_time = "";
466 476
       } else {
467 477
         this.GetCancelStock();
478
+        this.getPrintStockGood()
468 479
       }
469 480
     },
470 481
     getTimestamp(time) {
@@ -625,57 +636,115 @@ export default {
625 636
         }
626 637
       });
627 638
     },
628
-    exportList(){
639
+   getPrintStockGood(){
640
+     const params = {
641
+       start_time:this.start_time,
642
+       end_time:this.end_time,
643
+       type:1,
644
+     }
645
+   
646
+     getPrintStockGood(params).then(response=>{
647
+        if(response.data.state == 1){
648
+          var stockTotal =  response.data.data.stockTotal
649
+        
650
+          this.stockTotal = stockTotal
651
+          var list =  response.data.data.list
652
+         
653
+          for(let i=0;i<list.length;i++){
654
+            if (list[i].query_warehousing_info.length > 0) {
655
+               this.tableList.push(list[i])
656
+             }
657
+          }
658
+         
629 659
        
630
-     let dataInfo = {}
631
-     this.tableList.forEach((item, index) => {
632
-     let { good_id } = item
633
-     if (!dataInfo[good_id]) {
634
-        dataInfo[good_id] = {
635
-        child: [],
636
-        good_id: item.good_id,
637
-        count:0,
638
-        total:0,
639
-        price:0.0,
640
-        remark:""
641
-      }
642
-      }
660
+       
661
+        }
643 662
      })
644
-     let list = Object.values(dataInfo)
645
-    
646
-     list.map(item=>{
647
-     for(let i=0;i<this.tableList.length;i++){
648
-       if(item.good_id == this.tableList[i].good_id){
649
-           item.child.push(this.tableList[i])
650
-         }
663
+   },
664
+
665
+    calCount(stock) {
666
+        let total = 0
667
+        var array = []
668
+        array = stock.query_warehousing_info
669
+        for (let i = 0; i < array.length; i++) {
670
+         total = total + array[i].warehousing_count
651 671
         }
652
-      })
672
+        return total
673
+      },
653 674
 
654
-     for(let k=0;k<list.length;k++){
655
-       for(let z=0;z<list[k].child.length;z++){
656
-          if(list[k].good_id == list[k].child[z].good_id){
657
-             list[k].count += list[k].child[z].warehousing_count
658
-             list[k].price = list[k].child[0].price
659
-             list[k].remark = list[k].child[0].remark
675
+     calTotal(stock) {
676
+       var array = []
677
+       array = stock.query_warehousing_info
678
+        let total_price = 0.0
679
+        for (let i = 0; i < array.length; i++) {
680
+         total_price = total_price + array[i].warehousing_count * array[i].price  
681
+        }
682
+        return  Math.floor(total_price * 100) / 100
683
+      }, 
684
+      calTotalPrice() {
685
+        var amountPrice = 0
686
+        for (let i = 0; i < this.tableList.length; i++) {
687
+          var obj = this.tableList[i]
688
+          var len = 0
689
+          len = obj.query_warehousing_info.length
690
+          let total_price = 0.0
691
+          for (let a = 0; a < len; a++) {
692
+           total_price = total_price + obj.query_warehousing_info[a].total_price   
660 693
           }
694
+
695
+          amountPrice = amountPrice +  Math.floor(total_price* 100) / 100
696
+        }
697
+        return Math.floor(amountPrice* 100) / 100
698
+      }, 
699
+      getStockCount(id){
700
+        
701
+        var count = ""
702
+        for(let i=0;i<this.stockTotal.length;i++){
703
+            if(id == this.stockTotal[i].good_id){
704
+              count = this.stockTotal[i].count
705
+            }
706
+        }
707
+        return count
708
+      },
709
+      getTotal: function(price, total) {
710
+        var m = 0, r1, r2
711
+        var s1 = price.toString()
712
+        var s2 = total.toString()
713
+        try {
714
+          m += s1.split('.')[1].length
715
+        } catch (e) {
716
+
717
+        }
718
+        try {
719
+        } catch (e) {
720
+          m += s2.split('.')[1].length
721
+        }
722
+        r1 = Number(price.toString().replace('.', ''))
723
+        r2 = Number(total.toString().replace('.', ''))
724
+        return r1 * r2 / Math.pow(10, m)
725
+      },
726
+    
727
+    exportList(){
728
+       var obj = {index:"合计",total:0}
729
+       obj.total = this.calTotalPrice()
730
+      for(let i=0;i<this.tableList.length;i++){
731
+        this.tableList[i].index = i+1
732
+        this.tableList[i].min_unit = this.getUnit(this.tableList[i].good_unit)
733
+        this.tableList[i].count = this.calCount(this.tableList[i])
734
+        this.tableList[i].total = this.calTotal(this.tableList[i])
735
+        this.tableList[i].price = this.tableList[i].query_warehousing_info[0].price
736
+        this.tableList[i].remark = this.tableList[i].query_warehousing_info[0].remark
737
+
661 738
        }
662
-     }
739
+       this.tableList.push(obj)
740
+       console.log("数据222222",this.tableList)
663 741
     
664
-      
665
-      for(let i=0;i<list.length;i++){
666
-          list[i].index = i+1
667
-          list[i].drug_name =  this.typeNameOne(list[i].good_id) 
668
-          list[i].drug_spec =  this.specificationName(list[i].good_id)
669
-          list[i].min_unit = this.getUnit(list[i].child[0].GoodInfo.good_unit)
670
-          list[i].total = list[i].price * list[i].count
671
-        }
672 742
        import('@/vendor/Export2Excel').then(excel => {
673 743
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
674
-       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','count','price','total','remark']
744
+       const filterVal = ['index','good_name', 'specification_name', 'min_unit','count','price','total','remark']
745
+       
746
+       const data = this.formatJson(filterVal, this.tableList)
675 747
        
676
-       const data = this.formatJson(filterVal, list)
677
-       console.log("data",data)
678
-      
679 748
         excel.export_json_to_excel({
680 749
            header: tHeader,
681 750
            data,

+ 113 - 16
src/xt_pages/stock/detail/stockOutDetail.vue Wyświetl plik

@@ -8,14 +8,14 @@
8 8
       type="primary"
9 9
       >打印
10 10
     </el-button>
11
-     <!-- <el-button
11
+     <el-button
12 12
       style="float: right;margin-right:10px"
13 13
       size="small"
14 14
       icon="el-icon-printer"
15 15
       @click="exportList"
16 16
       type="primary"
17 17
       >导出
18
-    </el-button> -->
18
+    </el-button>
19 19
     <div class="cell clearfix">
20 20
       <el-input
21 21
         size="small"
@@ -195,7 +195,7 @@
195 195
 <script>
196 196
 import { uParseTime } from "@/utils/tools";
197 197
 import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from "@/api/doctor";
198
-import { deleteCancelStock, GetAllConfig, getStockDetail } from "@/api/stock";
198
+import { deleteCancelStock, GetAllConfig, getStockDetail,getPrintStockGood } from "@/api/stock";
199 199
 
200 200
 export default {
201 201
   name: "stockOutDetail",
@@ -225,6 +225,7 @@ export default {
225 225
     this.GetConfigInfo();
226 226
     this.fetchAllAdminUsers();
227 227
     this.goodUnit = this.$store.getters.good_unit
228
+    this.getPrintStockGood()
228 229
   },
229 230
   data() {
230 231
     return {
@@ -256,17 +257,20 @@ export default {
256 257
       selectedTableData: [],
257 258
       dealer: [],
258 259
       goodUnit:[],
259
-      tableList:[]
260
+      tableList:[],
261
+      stockTotal:[]
260 262
     };
261 263
   },
262 264
   methods: {
263 265
     changeType: function(val) {
264 266
       this.order_type = val;
265 267
       this.GetCancelStock();
268
+      this.getPrintStockGood()
266 269
     },
267 270
     changeManufacturer: function(val) {
268 271
       this.manufacturer_id = val;
269 272
       this.GetCancelStock();
273
+      this.getPrintStockGood()
270 274
     },
271 275
     getTypeName: function(row) {
272 276
       let name = "";
@@ -328,7 +332,7 @@ export default {
328 332
             var obj = response.data.data.list[i];
329 333
             obj["is_total"] = 0;
330 334
             this.cancelStockDate.push(obj);
331
-            this.tableList.push(obj)
335
+            
332 336
           }
333 337
           this.cancelStockDate.push({
334 338
             warehouse_out_order_number: "合计",
@@ -372,7 +376,7 @@ export default {
372 376
             var obj = response.data.data.list[i];
373 377
             obj["is_total"] = 0;
374 378
             this.cancelStockDate.push(obj);
375
-            this.tableList.push(obj)
379
+           
376 380
           }
377 381
           this.cancelStockDate.push({
378 382
             warehouse_out_order_number: "合计",
@@ -429,10 +433,12 @@ export default {
429 433
     handleSizeChange(val) {
430 434
       this.limit = val;
431 435
       this.GetCancelStock();
436
+      this.getPrintStockGood()
432 437
     },
433 438
     handleCurrentChange(val) {
434 439
       this.page = val;
435 440
       this.GetCancelStock();
441
+      this.getPrintStockGood()
436 442
     },
437 443
     startTimeChange(val) {
438 444
       var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
@@ -441,6 +447,7 @@ export default {
441 447
         this.start_time = "";
442 448
       } else {
443 449
         this.GetCancelStock();
450
+        this.getPrintStockGood()
444 451
       }
445 452
     },
446 453
     endTimeChange(val) {
@@ -450,6 +457,7 @@ export default {
450 457
         this.end_time = "";
451 458
       } else {
452 459
         this.GetCancelStock();
460
+        this.getPrintStockGood()
453 461
       }
454 462
     },
455 463
     getTimestamp(time) {
@@ -617,26 +625,115 @@ export default {
617 625
         }
618 626
       });
619 627
     },
628
+    getPrintStockGood(){
629
+      const params = {
630
+        start_time:this.start_time,
631
+        end_time:this.end_time,
632
+        type:3,
633
+      }
634
+      console.log("params",params)
635
+      getPrintStockGood(params).then(response=>{
636
+          if(response.data.state == 1){
637
+            var stockTotal =  response.data.data.stockTotal
638
+            console.log("stockTotal",stockTotal)
639
+            this.stockTotal = stockTotal
640
+            var list =  response.data.data.list
641
+            console.log("导出数据",list)
642
+            for(let i=0;i<list.length;i++){
643
+              if (list[i].query_warehouseout_info.length > 0) {
644
+                this.tableList.push(list[i])
645
+              }
646
+            }
647
+          console.log("表哥",this.tableList)
648
+          }
649
+      })
650
+    },
651
+     calCount(stock) {
652
+        let total = 0
653
+        var array = []
654
+        array = stock.query_warehousing_info
655
+        for (let i = 0; i < array.length; i++) {
656
+         total = total + array[i].warehousing_count
657
+        }
658
+        return total
659
+      },
660
+
661
+     calTotal(stock) {
662
+       var array = []
663
+       array = stock.query_warehousing_info
664
+        let total_price = 0.0
665
+        for (let i = 0; i < array.length; i++) {
666
+         total_price = total_price + array[i].warehousing_count * array[i].price  
667
+        }
668
+        return  Math.floor(total_price * 100) / 100
669
+      }, 
670
+      calTotalPrice() {
671
+        var amountPrice = 0
672
+        for (let i = 0; i < this.tableList.length; i++) {
673
+          var obj = this.tableList[i]
674
+          var len = 0
675
+          len = obj.query_warehouseout_info.length
676
+          let total_price = 0.0
677
+          for (let a = 0; a < len; a++) {
678
+           total_price = total_price + obj.query_warehouseout_info[a].total_price   
679
+          }
680
+
681
+          amountPrice = amountPrice +  Math.floor(total_price* 100) / 100
682
+        }
683
+        return Math.floor(amountPrice* 100) / 100
684
+      }, 
685
+      getStockCount(id){
686
+        
687
+        var count = ""
688
+        for(let i=0;i<this.stockTotal.length;i++){
689
+            if(id == this.stockTotal[i].good_id){
690
+              count = this.stockTotal[i].count
691
+            }
692
+        }
693
+        return count
694
+      },
695
+      getTotal: function(price, total) {
696
+        var m = 0, r1, r2
697
+        var s1 = price.toString()
698
+        var s2 = total.toString()
699
+        try {
700
+          m += s1.split('.')[1].length
701
+        } catch (e) {
702
+
703
+        }
704
+        try {
705
+        } catch (e) {
706
+          m += s2.split('.')[1].length
707
+        }
708
+        r1 = Number(price.toString().replace('.', ''))
709
+        r2 = Number(total.toString().replace('.', ''))
710
+        return r1 * r2 / Math.pow(10, m)
711
+      },
712
+   
713
+
620 714
      exportList(){
621 715
      
622
-        for(let i=0;i<this.tableList.length;i++){
623
-          this.tableList[i].index = i+1
624
-          this.tableList[i].drug_name =  this.typeNameOne(this.tableList[i].good_id) 
625
-          this.tableList[i].drug_spec =  this.specificationName(this.tableList[i].good_id)
626
-          this.tableList[i].min_unit = this.getUnit(this.tableList[i].GoodInfo.good_unit)
627
-          this.tableList[i].total_price = this.getTotal(this.tableList[i].price,this.tableList[i].count)
628
-         
629
-        }
716
+      var obj = {index:"合计",total:0}
717
+       obj.total = this.calTotalPrice()
718
+       for(let i=0;i<this.tableList.length;i++){
719
+        this.tableList[i].index = i+1
720
+        this.tableList[i].min_unit = this.getUnit(this.tableList[i].good_unit)
721
+        this.tableList[i].count = this.getStockCount(this.tableList[i].id)
722
+        this.tableList[i].price = this.tableList[i].query_warehouseout_info[0].price
723
+        this.tableList[i].total = (this.getStockCount(this.tableList[i].id) * this.tableList[i].query_warehouseout_info[0].price).toFixed(2)
724
+        this.tableList[i].remark = this.tableList[i].query_warehouseout_info[0].remark
725
+       }
726
+       this.tableList.push(obj)
630 727
        import('@/vendor/Export2Excel').then(excel => {
631 728
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
632
-       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','count','price','total_price','remark']
729
+       const filterVal = ['index','good_name', 'specification_name', 'min_unit','count','price','total','remark']
633 730
        
634 731
 
635 732
       
636 733
 
637 734
        const data = this.formatJson(filterVal, this.tableList)
638 735
        console.log("data",data)
639
-       
736
+     
640 737
         excel.export_json_to_excel({
641 738
            header: tHeader,
642 739
            data,

+ 52 - 4
src/xt_pages/stock/drugs/components/drugInOrder.vue Wyświetl plik

@@ -366,7 +366,46 @@ export default {
366 366
           var drugInOrder = response.data.data.detail
367 367
           console.log("drug3434444",drugInOrder)
368 368
           this.cancelStockDate = drugInOrder
369
-          this.tableList = drugInOrder
369
+           let objInfo = {}
370
+          drugInOrder.forEach((item,index)=>{
371
+             let { drug_id } = item
372
+             if(!objInfo[drug_id]){
373
+               objInfo[drug_id] = {
374
+                 drug_id,
375
+                 child:[],
376
+                 drug_name:item.drug_name,
377
+                 drug_spec:item.drug_spec,
378
+                 min_unit:item.min_unit,
379
+                 warehousing_count:0,
380
+                 price:item.price,
381
+                 remark:item.remark,
382
+                 total_price:0
383
+               }
384
+             }
385
+          })
386
+          let list = Object.values(objInfo);
387
+          console.log("list22333333",list)
388
+         for(let i=0;i<drugInOrder.length;i++){
389
+            list.map(item=>{
390
+              if(drugInOrder[i].drug_id == item.drug_id){
391
+                 item.child.push(drugInOrder[i])
392
+              }
393
+            })
394
+          }
395
+          console.log("list2334444",list)
396
+          for(let i=0;i<list.length;i++){
397
+            for(let j=0;j<list[i].child.length;j++){
398
+              if(list[i].child[j].warehousing_count!=null || list[i].child[j].warehousing_count != "" || list[i].child[j].warehousing_count!=0){
399
+                list[i].warehousing_count += list[i].child[j].warehousing_count
400
+                
401
+              }
402
+            }
403
+          }
404
+          for(let i=0;i<list.length;i++){
405
+            list[i].total_price = list[i].warehousing_count * list[i].price  
406
+          }
407
+          console.log("list666666666",list)
408
+          this.tableList = list
370 409
           var total = response.data.data.total
371 410
           this.total = total
372 411
         }
@@ -392,9 +431,18 @@ export default {
392 431
           this.tableList[i].index = i+1
393 432
         }
394 433
        import('@/vendor/Export2Excel').then(excel => {
395
-       const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','备注']
396
-       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','warehousing_count','price','remark']
397
-       
434
+       const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','备注']
435
+       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','warehousing_count','price','total_price','remark']
436
+       console.log("表格22222222",this.tableList)
437
+       let obj = {'index':'合计','total_price':0}
438
+       for(let i=0;i<this.tableList.length;i++){
439
+         obj.total_price += this.tableList[i].price * this.tableList[i].warehousing_count
440
+       }
441
+       for(let j=0;j<this.tableList.length;j++){
442
+         this.tableList[j].total_price = this.tableList[j].total_price.toFixed(2)
443
+       }
444
+       obj.total_price = obj.total_price.toFixed(2)
445
+       this.tableList.push(obj)
398 446
        const data = this.formatJson(filterVal, this.tableList)
399 447
        console.log("data",data)
400 448
        

+ 51 - 4
src/xt_pages/stock/drugs/components/drugOutDetail.vue Wyświetl plik

@@ -388,7 +388,46 @@ export default {
388 388
           var order = response.data.data.order
389 389
           console.log("出库数据",order)
390 390
           this.tableData = order
391
-          this.tableList = order
391
+           let objInfo = {}
392
+          order.forEach((item,index)=>{
393
+             let { drug_id } = item
394
+             if(!objInfo[drug_id]){
395
+               objInfo[drug_id] = {
396
+                 drug_id,
397
+                 child:[],
398
+                 drug_name:item.drug_name,
399
+                 drug_spec:item.drug_spec,
400
+                 min_unit:item.min_unit,
401
+                 count:0,
402
+                 price:item.price,
403
+                 remark:item.remark,
404
+                 total_price:0,
405
+               }
406
+             }
407
+          })
408
+          let list = Object.values(objInfo);
409
+          console.log("list2334444",list)
410
+          for(let i=0;i<order.length;i++){
411
+            list.map(item=>{
412
+              if(order[i].drug_id == item.drug_id){
413
+                 item.child.push(order[i])
414
+              }
415
+            })
416
+          }
417
+          
418
+          console.log("list22333333",list)
419
+          for(let i=0;i<list.length;i++){
420
+            for(let j=0;j<list[i].child.length;j++){
421
+              if(list[i].child[j].count!=null || list[i].child[j].count != "" || list[i].child[j].count!=0){
422
+                list[i].count += list[i].child[j].count
423
+              }
424
+            }
425
+          }
426
+          for(let i=0;i<list.length;i++){
427
+             list[i].total_price = list[i].count * list[i].price
428
+          }
429
+          console.log("list666666666",list)
430
+          this.tableList = list
392 431
           var total = response.data.data.total
393 432
           this.total = total
394 433
         } 
@@ -414,9 +453,17 @@ export default {
414 453
           this.tableList[i].index = i+1
415 454
         }
416 455
        import('@/vendor/Export2Excel').then(excel => {
417
-       const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','备注']
418
-       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','count','price','remark']
419
-       
456
+       const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','备注']
457
+       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','count','price','total_price','remark']
458
+       let obj = {'index':'合计','total_price':0}
459
+       for(let i=0;i<this.tableList.length;i++){
460
+         obj.total_price += this.tableList[i].price * this.tableList[i].count
461
+       }
462
+       for(let j=0;j<this.tableList.length;j++){
463
+          this.tableList[j].total_price = this.tableList[j].total_price.toFixed(2)
464
+       }
465
+       obj.total_price = obj.total_price.toFixed(2)
466
+       this.tableList.push(obj)
420 467
        const data = this.formatJson(filterVal, this.tableList)
421 468
        console.log("data",data)
422 469
        

+ 42 - 9
src/xt_pages/stock/drugs/drugOutOrderPrint.vue Wyświetl plik

@@ -22,7 +22,6 @@
22 22
               <td style="line-height: 50px" width="50">单位</td>
23 23
               <td style="line-height: 50px" width="80">数量</td>
24 24
               <td style="line-height:50px" width="80">单价</td>
25
-               <td style="line-height: 50px" width="80">出货价</td>
26 25
               <td style="line-height:50px" width="80">总价</td>
27 26
               <td style="line-height: 50px" width="">备 注</td>
28 27
             </tr>
@@ -48,10 +47,7 @@
48 47
                   {{item.price}}
49 48
               </td>
50 49
               <td style="line-height:50px">
51
-                  {{item.price}}
52
-              </td>
53
-              <td style="line-height:50px">
54
-                  {{item.total_price}}
50
+                  {{(item.count * item.price).toFixed(2)}}
55 51
               </td>
56 52
               <td style="line-height: 50px">
57 53
                  {{item.remark}}
@@ -63,7 +59,7 @@
63 59
             <tbody>
64 60
             <tr>
65 61
               <td width="633" style="line-height: 50px">合计</td>
66
-              <td width="80" style="line-height: 50px">{{getTotal()}}</td>
62
+              <td width="80" style="line-height: 50px">{{getTotal().toFixed(2)}}</td>
67 63
               <td></td>
68 64
             </tr>
69 65
 
@@ -171,15 +167,52 @@
171 167
       getDrugOutDetail(params).then(response=>{
172 168
         if(response.data.state == 1){
173 169
           var drugInOrder = response.data.data.order
174
-          console.log("drug3434444",drugInOrder)
175
-          this.cancelStockDate = drugInOrder
170
+          console.log("出库数据22",drugInOrder)
171
+          let objInfo = {}
172
+          drugInOrder.forEach((item,index)=>{
173
+             let { drug_id } = item
174
+             if(!objInfo[drug_id]){
175
+               objInfo[drug_id] = {
176
+                 drug_id,
177
+                 child:[],
178
+                 drug_name:item.drug_name,
179
+                 drug_spec:item.drug_spec,
180
+                 min_unit:item.min_unit,
181
+                 count:0,
182
+                 price:item.price,
183
+                 remark:item.remark,
184
+                 total_price:"",
185
+               }
186
+             }
187
+          })
188
+          let list = Object.values(objInfo);
189
+          console.log("list2334444",list)
190
+          for(let i=0;i<drugInOrder.length;i++){
191
+            list.map(item=>{
192
+              if(drugInOrder[i].drug_id == item.drug_id){
193
+                 item.child.push(drugInOrder[i])
194
+              }
195
+            })
196
+          }
197
+          
198
+          console.log("list22333333",list)
199
+            for(let i=0;i<list.length;i++){
200
+            for(let j=0;j<list[i].child.length;j++){
201
+              if(list[i].child[j].count!=null || list[i].child[j].count != "" || list[i].child[j].count!=0){
202
+                list[i].count += list[i].child[j].count
203
+              }
204
+            }
205
+          }
206
+          console.log("list666666666",list)
207
+          this.cancelStockDate = list
208
+        
176 209
         }
177 210
       })  
178 211
       },
179 212
       getTotal(){
180 213
          var total = 0
181 214
          for(let i=0;i<this.cancelStockDate.length;i++){
182
-            total += this.cancelStockDate[i].total_price
215
+            total += this.cancelStockDate[i].price * this.cancelStockDate[i].count
183 216
          }
184 217
          return total
185 218
       }

+ 42 - 3
src/xt_pages/stock/drugs/drugPrint.vue Wyświetl plik

@@ -22,6 +22,7 @@
22 22
               <td style="line-height: 50px" width="50">单位</td>
23 23
               <td style="line-height: 50px" width="80">数量</td>
24 24
               <td style="line-height:50px" width="80">单价</td>
25
+              <td style="line-height:50px" width="80">总价</td>
25 26
               <td style="line-height: 50px" width="">备 注</td>
26 27
             </tr>
27 28
 
@@ -45,6 +46,9 @@
45 46
               <td style="line-height:50px">
46 47
                   {{item.price}}
47 48
               </td>
49
+              <td style="line-height:50px">
50
+                 {{(item.warehousing_count*item.price).toFixed(2)}}
51
+              </td>
48 52
               <td style="line-height: 50px">
49 53
                  {{item.remark}}
50 54
               </td>
@@ -55,7 +59,7 @@
55 59
             <tbody>
56 60
             <tr>
57 61
               <td width="633" style="line-height: 50px">合计</td>
58
-              <td width="80" style="line-height: 50px">{{getTotal()}}</td>
62
+              <td width="80" style="line-height: 50px">{{getTotal().toFixed(2)}}</td>
59 63
               <td></td>
60 64
             </tr>
61 65
 
@@ -164,7 +168,42 @@
164 168
         if(response.data.state == 1){
165 169
           var drugInOrder = response.data.data.detail
166 170
           console.log("drug3434444",drugInOrder)
167
-          this.cancelStockDate = drugInOrder
171
+
172
+          let objInfo = {}
173
+          drugInOrder.forEach((item,index)=>{
174
+             let { drug_id } = item
175
+             if(!objInfo[drug_id]){
176
+               objInfo[drug_id] = {
177
+                 drug_id,
178
+                 child:[],
179
+                 drug_name:item.drug_name,
180
+                 drug_spec:item.drug_spec,
181
+                 min_unit:item.min_unit,
182
+                 warehousing_count:0,
183
+                 price:item.price,
184
+                 remark:item.remark,
185
+               }
186
+             }
187
+          })
188
+          let list = Object.values(objInfo);
189
+          console.log("list22333333",list)
190
+         for(let i=0;i<drugInOrder.length;i++){
191
+            list.map(item=>{
192
+              if(drugInOrder[i].drug_id == item.drug_id){
193
+                 item.child.push(drugInOrder[i])
194
+              }
195
+            })
196
+          }
197
+          console.log("list2334444",list)
198
+          for(let i=0;i<list.length;i++){
199
+            for(let j=0;j<list[i].child.length;j++){
200
+              if(list[i].child[j].warehousing_count!=null || list[i].child[j].warehousing_count != "" || list[i].child[j].warehousing_count!=0){
201
+                list[i].warehousing_count += list[i].child[j].warehousing_count
202
+              }
203
+            }
204
+          }
205
+          console.log("list666666666",list)
206
+          this.cancelStockDate = list
168 207
           var total = response.data.data.total
169 208
           this.total = total
170 209
         }
@@ -174,7 +213,7 @@
174 213
       getTotal(){
175 214
         var total = 0
176 215
         for(let i=0;i<this.cancelStockDate.length;i++){
177
-           total += this.cancelStockDate[i].price
216
+           total += this.cancelStockDate[i].price*this.cancelStockDate[i].warehousing_count
178 217
         }
179 218
         return total
180 219
       }

+ 419 - 0
src/xt_pages/stock/drugs/drugQueryPrint.vue Wyświetl plik

@@ -0,0 +1,419 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <el-button :loading="loading" size="small" icon="el-icon-printer" @click="printThisPage" type="primary">打印
6
+      </el-button>
7
+    </div>
8
+    <div class="app-container ">
9
+      <div id="dialysis-print-box">
10
+        <div class="dialysis-print-order">
11
+          <div class="order-title">药品管理查询表</div>
12
+          <div style="float: right;margin-bottom: 10px;">{{getDateTwo()}}</div>
13
+
14
+          <table class="print-table" border="1">
15
+            <tbody>
16
+            <tr>
17
+              <td style="line-height: 50px" width="50">序号</td>
18
+              <td style="line-height: 50px" width="250">药品名称</td>
19
+              <td style="line-height: 50px" width="250">规格型号</td>
20
+              <td style="line-height: 50px" width="50">单位</td>
21
+              <td style="line-height: 50px" width="80">入库数量</td>
22
+              <td style="line-height: 50px" width="80">出库数量</td>
23
+              <td style="line-height: 50px" width="80">入库退货</td>
24
+              <td style="line-height: 50px" width="80">出库退库</td>
25
+              <td style="line-height: 50px" width="80">剩余库存</td>
26
+              <td style="line-height:50px" width="80">单价</td>
27
+           
28
+            </tr>
29
+
30
+            <tr v-for="(item,index) in WarehouseInfo.warehouseInfoDate" :key="item.id">
31
+              <td style="line-height: 50px">&nbsp;
32
+                {{index+1}}
33
+              </td>
34
+              <td style="line-height: 50px">
35
+                <span> {{ item.drug_name }}</span>
36
+              </td>
37
+              <td style="line-height: 50px">
38
+                   <span>{{ item.drug_spec }}</span>
39
+              </td>
40
+              <td style="line-height: 50px">
41
+                <span>{{getUnit(item.id)}}</span>
42
+              </td>
43
+            
44
+              <td style="line-height: 50px">
45
+                  <span>{{ stockInCount(item) }}</span>
46
+              </td>
47
+              <td style="line-height: 50px">
48
+                  <span>{{ stockOutCount(item) }}</span>
49
+              </td>
50
+              <td> <span>{{ salesReturnCount(item) }}</span ></td>
51
+              <td> <span>{{ cancelStockCount(item) }}</span></td>
52
+              <td>
53
+                <span>{{stockInCount(item) -salesReturnCount(item) -stockOutCount(item) +cancelStockCount(item)}}</span>
54
+             </td> 
55
+              <td style="line-height:50px">
56
+                  {{item.last_price}}
57
+              </td>
58
+            </tr>
59
+            </tbody>
60
+          </table>
61
+        
62
+        </div>
63
+
64
+      </div>
65
+
66
+    </div>
67
+  </div>
68
+
69
+</template>
70
+
71
+<script>
72
+  import { jsGetAge, uParseTime } from '@/utils/tools'
73
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
74
+  import print from 'print-js'
75
+  import { getAllDrugStockQueryList } from '@/api/drug/drug_stock'
76
+  import { getDictionaryDataConfig } from "@/utils/data";
77
+  import {getBaseDrugLibList} from '@/api/data'
78
+  export default {
79
+    name: 'dialysisPrintOrder',
80
+    components: {
81
+      BreadCrumb
82
+
83
+    },
84
+    data() {
85
+      return {
86
+        crumbs: [
87
+          { path: false, name: '出入库明细' },
88
+          { path: false, name: '打印单' }
89
+        ],
90
+        keywords: '',
91
+        total: 0,
92
+        multipleSelection: [],
93
+        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
94
+        start_time: '',
95
+        end_time: '',
96
+        page: 1,
97
+        limit: 10000,
98
+        goodType: [],
99
+        goodInfo: [],
100
+        tempArr: [],
101
+        sameRowArr: [],
102
+        WarehouseInfo: {
103
+          loading: false,
104
+          warehouseInfoDate: []
105
+        },
106
+        tableData:[],
107
+        drug_category:0,
108
+        drugCategory:[],
109
+        drug_category:"",
110
+        start_time:"",
111
+        end_time:"",
112
+        list:[],
113
+        is_use:"",
114
+        is_charge:"",
115
+        is_inject:"",
116
+      }
117
+    },
118
+    methods: {
119
+      getDateTwo(){
120
+        var ptime = Math.round(new Date().getTime() / 1000)
121
+        return "打印单日期:"+uParseTime(ptime, '{y}-{m}-{d}')
122
+      },
123
+      getTime(value, temp) {
124
+        if (value == 0) {
125
+          return ''
126
+        }
127
+        if (value != undefined) {
128
+          return uParseTime(value, temp)
129
+        }
130
+        return ''
131
+      },
132
+      printThisPage() {
133
+        var ptime = Math.round(new Date().getTime() / 1000)
134
+        this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')
135
+        const style = '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}'
136
+        printJS({
137
+          printable: 'dialysis-print-box',
138
+          type: 'html',
139
+          style: style,
140
+          scanStyles: false
141
+        })
142
+      },
143
+   
144
+      getUnit(id){
145
+        var name = ""
146
+        for(let i=0;i<this.list.length;i++){
147
+          if(this.list[i].id == id){
148
+            name = this.list[i].min_unit
149
+          }
150
+        }
151
+        return name
152
+      },
153
+   
154
+       GetAllDrugStockQueryList() {
155
+        const Params = {
156
+          page: this.page,
157
+          limit: this.limit,
158
+          keyword: this.$route.query.keyword,
159
+          drug_category:this.$route.query.drug_category,
160
+          start_time:this.$route.query.start_time,
161
+          end_time:this.$route.query.end_time,
162
+        }
163
+        console.log("parasm22222",Params)
164
+        this.WarehouseInfo.warehouseInfoDate = []
165
+        getAllDrugStockQueryList(Params).then(response => {
166
+          if (response.data.state == 0) {
167
+            
168
+            this.$message.error(response.data.msg)
169
+            return false
170
+          } else {
171
+            
172
+            this.total = response.data.data.total
173
+            var arr = []
174
+            for (let i = 0; i < response.data.data.list.length; i++) {
175
+              this.WarehouseInfo.warehouseInfoDate.push(response.data.data.list[i])
176
+              
177
+            }
178
+            console.log("数据源头",this.WarehouseInfo.warehouseInfoDate)
179
+          }
180
+        })
181
+      },
182
+     getSpecificationName: function(id) {
183
+        let name = ''
184
+        for (let i = 0; i < this.goodInfo.length; i++) {
185
+          if (this.goodInfo[i].id == id) {
186
+            name = this.goodInfo[i].specification_name
187
+          }
188
+        }
189
+        return name
190
+      },
191
+      getTypeName: function(id) {
192
+        let name = ''
193
+        for (let i = 0; i < this.goodType.length; i++) {
194
+          if (this.goodType[i].id == id) {
195
+            name = this.goodType[i].type_name
196
+          }
197
+        }
198
+        return name
199
+      },
200
+      stockInCount: function(row) {
201
+        let total = 0
202
+        for (let i = 0; i < row.query_drug_warehousing_info.length; i++) {
203
+          total = total + row.query_drug_warehousing_info[i].warehousing_count
204
+        }
205
+        return total
206
+      },
207
+      salesReturnCount: function(row) {
208
+        let total = 0
209
+
210
+        for (let i = 0; i < row.query_drug_sales_return_info.length; i++) {
211
+          total = total + row.query_drug_sales_return_info[i].count
212
+        }
213
+        return total
214
+      },
215
+      stockOutCount: function(row) {
216
+        let total = 0
217
+
218
+        for (let i = 0; i < row.query_drug_warehouseout_info.length; i++) {
219
+          total = total + row.query_drug_warehouseout_info[i].count
220
+        }
221
+        return total
222
+      },
223
+      cancelStockCount: function(row) {
224
+        let total = 0
225
+        for (let i = 0; i < row.query_drug_cancel_stock_info.length; i++) {
226
+          total = total + row.query_drug_cancel_stock_info[i].count
227
+        }
228
+        return total
229
+      },
230
+      getDictionaryDataConfig(module, filed_name) {
231
+        return getDictionaryDataConfig(module, filed_name)
232
+      },
233
+      getList() {
234
+        let params = {
235
+          page: this.page,
236
+          limit: this.limit,
237
+          keyword: this.keywords,
238
+          is_use: this.is_use,
239
+          is_charge: this.is_charge,
240
+          is_inject: this.is_inject
241
+        }
242
+        getBaseDrugLibList(params).then(response => {
243
+          if (response.data.state == 0) {
244
+            this.$message.error(response.data.msg)
245
+            return false
246
+          } else {
247
+            this.total = response.data.data.total
248
+            this.list = []
249
+            for (let i = 0; i < response.data.data.list.length; i++) {
250
+              this.list.push(response.data.data.list[i])
251
+            }
252
+            console.log("list222222",this.list)
253
+          }
254
+        })
255
+      },
256
+    },
257
+    created() {
258
+      this.GetAllDrugStockQueryList()
259
+      var drugCategory = getDictionaryDataConfig('system','drug_category')
260
+      this.drugCategory.push(...drugCategory)
261
+      this.getList()
262
+    }
263
+
264
+  }
265
+</script>
266
+
267
+<style>
268
+  .dialysis-print-order {
269
+    width: 960px;
270
+    margin: 0 auto
271
+  }
272
+
273
+  .dialysis-print-order .order-yy-name {
274
+    margin: auto;
275
+    text-align: center;
276
+    font-size: 20px;
277
+    letter-spacing: 5px;
278
+  }
279
+
280
+  .dialysis-print-order .order-title {
281
+    margin: auto;
282
+    font-weight: 600;
283
+    text-align: center;
284
+    font-size: 22px;
285
+    padding: 10px 20px 20px 20px;
286
+  }
287
+
288
+  .dialysis-print-order .table-box {
289
+
290
+    width: 100%;
291
+    line-height: 23px;
292
+    font-size: 14px;
293
+  }
294
+
295
+  .dialysis-print-order .print-table {
296
+    width: 100%;
297
+    text-align: center;
298
+    border-collapse: collapse;
299
+    line-height: 40px;
300
+    font-size: 14px;
301
+  }
302
+
303
+  .dialysis-print-order .print-table-no {
304
+    width: 100%;
305
+    text-align: center;
306
+    border-collapse: collapse;
307
+    font-size: 14px;
308
+  }
309
+
310
+  .dialysis-print-order .under-line {
311
+    border-bottom: 1px solid #999;
312
+    width: 95%;
313
+    text-align: center;
314
+    margin-left: 2px;
315
+
316
+
317
+  }
318
+
319
+  .dialysis-print-order .title-box {
320
+    text-align: center;
321
+    font-size: 16px;
322
+  }
323
+
324
+  .dialysis-print-order .radio-lebel-box {
325
+    font-weight: 400;
326
+    cursor: pointer;
327
+  }
328
+
329
+  .dialysis-print-order .radio-no {
330
+    opacity: 0;
331
+    outline: none;
332
+    position: absolute;
333
+    margin: 0;
334
+    width: 0;
335
+    height: 0;
336
+    z-index: -1;
337
+  }
338
+
339
+  .dialysis-print-order .radio-inner {
340
+    white-space: nowrap;
341
+    cursor: pointer;
342
+    outline: none;
343
+    display: inline-block;
344
+    line-height: 1;
345
+    position: relative;
346
+    vertical-align: middle;
347
+  }
348
+
349
+  .dialysis-print-order .radio-fang {
350
+    display: inline-block;
351
+    position: relative;
352
+    border: 1px solid #000;
353
+    box-sizing: border-box;
354
+    width: 14px;
355
+    height: 14px;
356
+    background-color: #fff;
357
+    z-index: 1;
358
+    transition: border-color .25s cubic-bezier(.71, -.46, .29, 1.46), background-color .25s cubic-bezier(.71, -.46, .29, 1.46);
359
+  }
360
+
361
+  .dialysis-print-order .is-checked-radio::after {
362
+    content: "√";
363
+    font-size: 15px;
364
+  }
365
+
366
+
367
+  .dialysis-print-order .print-table-no tr td {
368
+    padding: 8px 5px;
369
+    line-height: 25px;
370
+  }
371
+
372
+  .dialysis-print-order .print-table tr td {
373
+    padding: 1px 1px;
374
+    /*line-height: 25px;*/
375
+  }
376
+
377
+  .es-img {
378
+    height: 25px;
379
+  }
380
+
381
+  .advice-name {
382
+    text-align: left;
383
+  }
384
+
385
+  .advice-children {
386
+    display: flex;
387
+  }
388
+
389
+  .title-box-pro {
390
+    border: 0 #fff;
391
+    line-height: 25px;
392
+    height: 25px;
393
+    text-align: left;
394
+    padding-left: 10px !important;
395
+  }
396
+
397
+  .title-box-pro-tr {
398
+    border: 0 #fff;
399
+  }
400
+
401
+  .text-align-left {
402
+    text-align: left !important;
403
+    padding-left: 10px !important;
404
+    font-size: 14px !important;
405
+    line-height: 25px;
406
+  }
407
+
408
+  .print-table-tr-new td {
409
+    line-height: 20px !important;
410
+  }
411
+
412
+  .border-top-solid {
413
+    border: solid 1px #000;
414
+  }
415
+
416
+  .print-template-two tr {
417
+    line-height: 30px;
418
+  }
419
+</style>

+ 8 - 3
src/xt_pages/stock/drugs/drugStockInOrderDetail.vue Wyświetl plik

@@ -14,9 +14,8 @@
14 14
       <div class="filter-container">
15 15
         <span style="font-size: 18px;color: #606266">入库单详情</span>
16 16
         <el-row style="float:right;">
17
-          <span style="color: #606266"
18
-            >入库单号: {{ WarehouseInfo.warehouse.warehousing_order }}</span
19
-          >
17
+          <span style="color: #606266">入库单号: {{ WarehouseInfo.warehouse.warehousing_order }}</span>&nbsp;&nbsp;
18
+          <span><el-button size="small" type="primary" @click="printOrder">打印</el-button></span>
20 19
         </el-row>
21 20
       </div>
22 21
 
@@ -243,6 +242,12 @@ export default {
243 242
     },
244 243
     editRecord: function() {
245 244
       this.$emit("edit-record");
245
+    },
246
+    printOrder(){
247
+      this.$router.push({
248
+        name: "drugInOrderDetailPrint",
249
+        query: { id: this.$route.query.id }
250
+      });
246 251
     }
247 252
   }
248 253
 };

+ 382 - 0
src/xt_pages/stock/drugs/drugStockInOrderDetailPrint.vue Wyświetl plik

@@ -0,0 +1,382 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <el-button :loading="loading" size="small" icon="el-icon-printer" @click="printThisPage" type="primary">打印
6
+      </el-button>
7
+    </div>
8
+    <div class="app-container ">
9
+      <div id="dialysis-print-box">
10
+        <div class="dialysis-print-order">
11
+          <div class="order-title">药品入库登记表</div>
12
+         
13
+          <div style="float: right;margin-bottom: 10px;">{{getDateTwo()}}</div>
14
+
15
+          <table class="print-table" border="1">
16
+            <tbody>
17
+            <tr>
18
+              <td style="line-height: 50px" width="50">序号</td>
19
+              <td style="line-height: 50px" width="250">药品名称</td>
20
+              <td style="line-height: 50px" width="250">规格型号</td>
21
+              <td style="line-height: 50px" width="50">单位</td>
22
+              <td style="line-height: 50px" width="80">数量</td>
23
+              <td style="line-height:50px" width="80">单价</td>
24
+              <td style="line-height:50px" width="80">总价</td>
25
+            </tr>
26
+
27
+            <tr v-for="(item,index) in WarehouseInfo.warehouseInfoDate" :key="item.id">
28
+              <td style="line-height: 50px">&nbsp;
29
+                {{index+1}}
30
+              </td>
31
+              <td style="line-height: 50px">
32
+                 <span v-if="item.drug_id != 0">{{item.drug.drug_name}}</span>
33
+              </td>
34
+              <td style="line-height: 50px">
35
+                 <span v-if="item.drug_id != 0">{{item.drug?item.drug.drug_spec:''}}</span>
36
+              </td>
37
+              <td style="line-height: 50px">
38
+                <span>{{getUnit(item.drug_id)}}</span>
39
+              </td>
40
+            
41
+              <td style="line-height: 50px">
42
+                   <span>{{ item.warehousing_count }}</span>
43
+              </td>
44
+              <td style="line-height:50px">
45
+                  {{item.price}}
46
+              </td>
47
+             <td style="line-height:50px">
48
+                <span>{{(item.warehousing_count * item.price).toFixed(2)}}</span>
49
+             </td>
50
+            </tr>
51
+            <tr>
52
+              <td>合计</td>
53
+              <td colspan="5"></td>
54
+              <td>{{allPrice.toFixed(2)}}</td>
55
+            </tr>
56
+            </tbody>
57
+          </table>
58
+        
59
+
60
+          <div style="display:flex;margin-top:20px;float:right;">
61
+            <div style="width:50px;">审批:</div><div style="width:100px;"></div>
62
+            <div style="width:80px;">药材主任:</div><div style="width:100px;"></div>
63
+            <div style="width:50px;">会计:</div><div style="width:100px;"></div>
64
+            <div style="width:50px;">审核:</div><div style="width:100px;"></div>
65
+            <div style="width:70px;">制单人:</div><div style="width:100px;"></div>
66
+          </div>
67
+        </div>
68
+
69
+      </div>
70
+
71
+    </div>
72
+  </div>
73
+
74
+</template>
75
+
76
+<script>
77
+  import { getPrintStockGood } from '@/api/stock'
78
+  import { getDataConfig } from '@/utils/data'
79
+  import { jsGetAge, uParseTime } from '@/utils/tools'
80
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
81
+  import print from 'print-js'
82
+  import {getDrugWarehouseInfoList} from "@/api/drug/drug_stock";
83
+  import {getBaseDrugLibList} from '@/api/data'
84
+  export default {
85
+    name: 'dialysisPrintOrder',
86
+    components: {
87
+      BreadCrumb
88
+
89
+    },
90
+    data() {
91
+      return {
92
+        crumbs: [
93
+          { path: false, name: '出入库明细' },
94
+          { path: false, name: '打印单' }
95
+        ],
96
+        isEdit: 0,
97
+        checked: false,
98
+        signAndWeighBoxPatients: "sign-and-weigh-box-patients",
99
+        goodType: [],
100
+        goodInfo: [],
101
+        manufacturer: [],
102
+        dealer: [],
103
+        Warehouse: {
104
+          loading: false,
105
+          warehouseDate: [],
106
+          tableCurrentIndex: ""
107
+        },
108
+
109
+        WarehouseInfo: {
110
+          loading: false,
111
+          warehouseInfoDate: [],
112
+          warehouse: {}
113
+        },
114
+        allPrice:0,
115
+        start_time:"",
116
+        end_time:"",
117
+        list:[],
118
+        is_use:"",
119
+        is_charge:"",
120
+        is_inject:"",
121
+        page:1,
122
+        limit:10000,
123
+        keywords:""
124
+      }
125
+    },
126
+    methods: {
127
+      getDateOne(){
128
+        return "入库日期: "+this.start_time +"~"+this.end_time
129
+      },
130
+      getDateTwo(){
131
+        var ptime = Math.round(new Date().getTime() / 1000)
132
+        return "打印单日期:"+uParseTime(ptime, '{y}-{m}-{d}')
133
+      },
134
+      getTime(value, temp) {
135
+        if (value == 0) {
136
+          return ''
137
+        }
138
+        if (value != undefined) {
139
+          return uParseTime(value, temp)
140
+        }
141
+        return ''
142
+      },
143
+     
144
+      printThisPage() {
145
+        var ptime = Math.round(new Date().getTime() / 1000)
146
+        this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')
147
+        const style = '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}'
148
+        printJS({
149
+          printable: 'dialysis-print-box',
150
+          type: 'html',
151
+          style: style,
152
+          scanStyles: false
153
+        })
154
+      },
155
+   
156
+      getUnit(id){
157
+        var name = ""
158
+        for(let i=0;i<this.goodUnit.length;i++){
159
+          if(this.goodUnit[i].id == id){
160
+            name = this.goodUnit[i].name
161
+          }
162
+        }
163
+        return name
164
+      },
165
+      GetOrderDetail: function(order_id) {
166
+        const params = {
167
+          id: order_id
168
+        };
169
+      getDrugWarehouseInfoList(params).then(response => {
170
+        if (response.data.state == 0) {
171
+          this.$message.error(response.data.msg);
172
+          return false;
173
+        } else {
174
+          for (let i = 0; i < response.data.data.info.length; i++) {
175
+            this.WarehouseInfo.warehouseInfoDate.push(response.data.data.info[i]);
176
+          }
177
+          console.log("数据源",this.WarehouseInfo.warehouseInfoDate)
178
+          var total_price = 0
179
+          for(let i=0;i<this.WarehouseInfo.warehouseInfoDate.length;i++){
180
+            total_price += this.WarehouseInfo.warehouseInfoDate[i].warehousing_count * this.WarehouseInfo.warehouseInfoDate[i].price
181
+          }
182
+          console.log("total_price",total_price)
183
+          this.allPrice = total_price
184
+          this.WarehouseInfo.warehouse = response.data.data.warehousing;
185
+        }
186
+      });
187
+    },
188
+     getList() {
189
+        let params = {
190
+          page: this.page,
191
+          limit: this.limit,
192
+          keyword: this.keywords,
193
+          is_use: this.is_use,
194
+          is_charge: this.is_charge,
195
+          is_inject: this.is_inject
196
+        }
197
+        getBaseDrugLibList(params).then(response => {
198
+          if (response.data.state == 0) {
199
+            this.$message.error(response.data.msg)
200
+            return false
201
+          } else {
202
+            this.total = response.data.data.total
203
+            this.list = []
204
+            for (let i = 0; i < response.data.data.list.length; i++) {
205
+              this.list.push(response.data.data.list[i])
206
+            }
207
+            console.log("list222222",this.list)
208
+          }
209
+        })
210
+      },
211
+      getUnit(id){
212
+        var name = ""
213
+        for(let i=0;i<this.list.length;i++){
214
+          if(this.list[i].id == id){
215
+            name = this.list[i].min_unit
216
+          }
217
+        }
218
+        return name
219
+      },
220
+    },
221
+    created() {
222
+      const order_id = this.$route.query.id;
223
+      this.GetOrderDetail(order_id);
224
+      this.getList()
225
+    }
226
+
227
+  }
228
+</script>
229
+
230
+<style>
231
+  .dialysis-print-order {
232
+    width: 960px;
233
+    margin: 0 auto
234
+  }
235
+
236
+  .dialysis-print-order .order-yy-name {
237
+    margin: auto;
238
+    text-align: center;
239
+    font-size: 20px;
240
+    letter-spacing: 5px;
241
+  }
242
+
243
+  .dialysis-print-order .order-title {
244
+    margin: auto;
245
+    font-weight: 600;
246
+    text-align: center;
247
+    font-size: 22px;
248
+    padding: 10px 20px 20px 20px;
249
+  }
250
+
251
+  .dialysis-print-order .table-box {
252
+
253
+    width: 100%;
254
+    line-height: 23px;
255
+    font-size: 14px;
256
+  }
257
+
258
+  .dialysis-print-order .print-table {
259
+    width: 100%;
260
+    text-align: center;
261
+    border-collapse: collapse;
262
+    line-height: 40px;
263
+    font-size: 14px;
264
+  }
265
+
266
+  .dialysis-print-order .print-table-no {
267
+    width: 100%;
268
+    text-align: center;
269
+    border-collapse: collapse;
270
+    font-size: 14px;
271
+  }
272
+
273
+  .dialysis-print-order .under-line {
274
+    border-bottom: 1px solid #999;
275
+    width: 95%;
276
+    text-align: center;
277
+    margin-left: 2px;
278
+
279
+
280
+  }
281
+
282
+  .dialysis-print-order .title-box {
283
+    text-align: center;
284
+    font-size: 16px;
285
+  }
286
+
287
+  .dialysis-print-order .radio-lebel-box {
288
+    font-weight: 400;
289
+    cursor: pointer;
290
+  }
291
+
292
+  .dialysis-print-order .radio-no {
293
+    opacity: 0;
294
+    outline: none;
295
+    position: absolute;
296
+    margin: 0;
297
+    width: 0;
298
+    height: 0;
299
+    z-index: -1;
300
+  }
301
+
302
+  .dialysis-print-order .radio-inner {
303
+    white-space: nowrap;
304
+    cursor: pointer;
305
+    outline: none;
306
+    display: inline-block;
307
+    line-height: 1;
308
+    position: relative;
309
+    vertical-align: middle;
310
+  }
311
+
312
+  .dialysis-print-order .radio-fang {
313
+    display: inline-block;
314
+    position: relative;
315
+    border: 1px solid #000;
316
+    box-sizing: border-box;
317
+    width: 14px;
318
+    height: 14px;
319
+    background-color: #fff;
320
+    z-index: 1;
321
+    transition: border-color .25s cubic-bezier(.71, -.46, .29, 1.46), background-color .25s cubic-bezier(.71, -.46, .29, 1.46);
322
+  }
323
+
324
+  .dialysis-print-order .is-checked-radio::after {
325
+    content: "√";
326
+    font-size: 15px;
327
+  }
328
+
329
+
330
+  .dialysis-print-order .print-table-no tr td {
331
+    padding: 8px 5px;
332
+    line-height: 25px;
333
+  }
334
+
335
+  .dialysis-print-order .print-table tr td {
336
+    padding: 1px 1px;
337
+    /*line-height: 25px;*/
338
+  }
339
+
340
+  .es-img {
341
+    height: 25px;
342
+  }
343
+
344
+  .advice-name {
345
+    text-align: left;
346
+  }
347
+
348
+  .advice-children {
349
+    display: flex;
350
+  }
351
+
352
+  .title-box-pro {
353
+    border: 0 #fff;
354
+    line-height: 25px;
355
+    height: 25px;
356
+    text-align: left;
357
+    padding-left: 10px !important;
358
+  }
359
+
360
+  .title-box-pro-tr {
361
+    border: 0 #fff;
362
+  }
363
+
364
+  .text-align-left {
365
+    text-align: left !important;
366
+    padding-left: 10px !important;
367
+    font-size: 14px !important;
368
+    line-height: 25px;
369
+  }
370
+
371
+  .print-table-tr-new td {
372
+    line-height: 20px !important;
373
+  }
374
+
375
+  .border-top-solid {
376
+    border: solid 1px #000;
377
+  }
378
+
379
+  .print-template-two tr {
380
+    line-height: 30px;
381
+  }
382
+</style>

+ 4 - 1
src/xt_pages/stock/drugs/drugStockOutOrder.vue Wyświetl plik

@@ -686,8 +686,10 @@ export default {
686 686
     },
687 687
 
688 688
     jump(id){
689
+    
689 690
       this.GetOrderDetailTwo(id)
690 691
       this.userList=[]
692
+      this.dialogVisibleTwo = true
691 693
     },
692 694
 
693 695
      GetOrderDetailTwo(order_id) {
@@ -699,6 +701,7 @@ export default {
699 701
             this.$message.error(response.data.msg)
700 702
             return false
701 703
           } else {
704
+            this.userList=[]
702 705
             var total = 0
703 706
             for (let i = 0; i < response.data.data.list.length; i++) {
704 707
               var obj = response.data.data.list[i]
@@ -706,7 +709,7 @@ export default {
706 709
               this.userList.push(obj)
707 710
               total = total + response.data.data.list[i].count
708 711
             }
709
-            this.userList=[]
712
+           
710 713
             this.userList.push({
711 714
               is_total: 1,
712 715
               total: total,

+ 8 - 4
src/xt_pages/stock/drugs/drugStockOutOrderDetail.vue Wyświetl plik

@@ -11,7 +11,8 @@
11 11
       <div class="filter-container">
12 12
         <span style="font-size: 18px;color: #606266">出库单详情</span>
13 13
         <el-row style="float:right;">
14
-          <span style="color: #606266">{{warehousingOutInfo.info.warehouse_out_order_number}}</span>
14
+          <span style="color: #606266">{{warehousingOutInfo.info.warehouse_out_order_number}}</span>&nbsp;&nbsp;
15
+          <span><el-button size="small" type="primary" @click="printOrder">打印</el-button></span>
15 16
         </el-row>
16 17
       </div>
17 18
 
@@ -253,9 +254,12 @@
253 254
           }
254 255
         })
255 256
         this.sameRowArr = sameRowArr
256
-
257
-
258
-
257
+      },
258
+      printOrder(){
259
+        this.$router.push({
260
+          name: "drugOutOrderDetailPrint",
261
+          query: { id: this.$route.query.id }
262
+        });
259 263
       }
260 264
     }
261 265
   }

+ 374 - 0
src/xt_pages/stock/drugs/drugStockOutOrderDetailPrint.vue Wyświetl plik

@@ -0,0 +1,374 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <el-button :loading="loading" size="small" icon="el-icon-printer" @click="printThisPage" type="primary">打印
6
+      </el-button>
7
+    </div>
8
+    <div class="app-container ">
9
+      <div id="dialysis-print-box">
10
+        <div class="dialysis-print-order">
11
+         <div class="order-yy-name">{{orgname}}</div>
12
+          <div class="order-title">药品出库登记表</div>
13
+         
14
+          <div style="float: right;margin-bottom: 10px;">{{getDateTwo()}}</div>
15
+
16
+          <table class="print-table" border="1">
17
+            <tbody>
18
+            <tr>
19
+              <td style="line-height: 50px" width="50">序号</td>
20
+              <td style="line-height: 50px" width="250">药品名称</td>
21
+              <td style="line-height: 50px" width="250">规格型号</td>
22
+              <td style="line-height: 50px" width="50">单位</td>
23
+              <td style="line-height: 50px" width="80">数量</td>
24
+              <td style="line-height:50px" width="80">单价</td>
25
+              <td style="line-height: 50px" width="">总价</td>
26
+            </tr>
27
+
28
+            <tr v-for="(item,index) in warehousingOutInfo.warehousingOutData" :key="item.id">
29
+              <td style="line-height: 50px">&nbsp;
30
+                {{index+1}}
31
+              </td>
32
+              <td style="line-height: 50px">
33
+                <span v-if="item.drug_id != 0">{{item.drug.drug_name}}</span>
34
+              </td>
35
+              <td style="line-height: 50px">
36
+                  <span v-if="item.drug_id != 0">{{item.drug?item.drug.drug_spec:''}}</span>
37
+              </td>
38
+              <td style="line-height: 50px">
39
+                <span>{{getUnit(item.drug_id)}}</span>
40
+              </td>
41
+            
42
+              <td style="line-height: 50px">
43
+                  {{item.count}}
44
+              </td>
45
+              <td style="line-height:50px">
46
+                  {{item.price}}
47
+              </td>
48
+             <td  style="line-height:50px">
49
+                {{(item.count * item.price).toFixed(2)}}
50
+             </td>
51
+            </tr>
52
+             <tr>
53
+               <td style="line-height:50px">合计</td>
54
+               <td colspan="5"></td>
55
+               <td>{{allPrice.toFixed(2)}}</td>
56
+             </tr>
57
+            </tbody>
58
+          </table>
59
+        
60
+
61
+          <div style="display:flex;margin-top:20px;float:right;">
62
+            <div style="width:50px;">审批:</div><div style="width:100px;"></div>
63
+            <div style="width:80px;">药材主任:</div><div style="width:100px;"></div>
64
+            <div style="width:50px;">会计:</div><div style="width:100px;"></div>
65
+            <div style="width:50px;">审核:</div><div style="width:100px;"></div>
66
+            <div style="width:70px;">制单人:</div><div style="width:100px;"></div>
67
+          </div>
68
+        </div>
69
+
70
+      </div>
71
+
72
+    </div>
73
+  </div>
74
+
75
+</template>
76
+
77
+<script>
78
+  import { getPrintStockGood } from '@/api/stock'
79
+  import { getDataConfig } from '@/utils/data'
80
+  import { jsGetAge, uParseTime } from '@/utils/tools'
81
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
82
+  import print from 'print-js'
83
+  import {  getDrugWarehouseOutInfo } from '@/api/drug/drug_stock'
84
+  import {getBaseDrugLibList} from '@/api/data'
85
+  export default {
86
+    name: 'dialysisPrintOrder',
87
+    components: {
88
+      BreadCrumb
89
+
90
+    },
91
+    data() {
92
+      return {
93
+        crumbs: [
94
+          { path: false, name: '出入库明细' },
95
+          { path: false, name: '打印单' }
96
+        ],
97
+        isEdit: 0,
98
+        checked: false,
99
+        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
100
+        goodType: [],
101
+        goodInfo: [],
102
+        manufacturer: [],
103
+        dealer: [],
104
+
105
+        warehousingOutInfo: {
106
+          loading: false,
107
+          warehousingOutData: [],
108
+          info: {}
109
+        },
110
+        allPrice:0,
111
+        start_time:"",
112
+        end_time:"",
113
+        list:[],
114
+        is_use:"",
115
+        is_charge:"",
116
+        is_inject:"",
117
+        page:1,
118
+        limit:10000,
119
+        keywords:""
120
+      }
121
+    },
122
+    methods: {
123
+      getDateTwo(){
124
+        var ptime = Math.round(new Date().getTime() / 1000)
125
+        return "打印单日期:"+uParseTime(ptime, '{y}-{m}-{d}')
126
+      },
127
+      getTime(value, temp) {
128
+        if (value == 0) {
129
+          return ''
130
+        }
131
+        if (value != undefined) {
132
+          return uParseTime(value, temp)
133
+        }
134
+        return ''
135
+      },
136
+      printThisPage() {
137
+        var ptime = Math.round(new Date().getTime() / 1000)
138
+        this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')
139
+        const style = '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}'
140
+        printJS({
141
+          printable: 'dialysis-print-box',
142
+          type: 'html',
143
+          style: style,
144
+          scanStyles: false
145
+        })
146
+      },
147
+   
148
+      getUnit(id){
149
+        var name = ""
150
+        for(let i=0;i<this.goodUnit.length;i++){
151
+          if(this.goodUnit[i].id == id){
152
+            name = this.goodUnit[i].name
153
+          }
154
+        }
155
+        return name
156
+      },
157
+    GetOrderDetail: function(order_id) {
158
+            const params = {
159
+            'id': order_id
160
+            }
161
+            getDrugWarehouseOutInfo(params).then(response => {
162
+            if (response.data.state == 0) {
163
+
164
+                this.$message.error(response.data.msg)
165
+                return false
166
+            } else {
167
+              for (let i = 0; i < response.data.data.list.length; i++) {
168
+                this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
169
+               }
170
+               var total_price = 0
171
+               for(let i=0;i<this.warehousingOutInfo.warehousingOutData.length;i++){
172
+                 total_price += this.warehousingOutInfo.warehousingOutData[i].count * this.warehousingOutInfo.warehousingOutData[i].price
173
+               }
174
+               this.allPrice = total_price
175
+               this.warehousingOutInfo.info = response.data.data.info
176
+               this.handleSpanTempArr()
177
+            }
178
+            })
179
+        },
180
+        getList() {
181
+        let params = {
182
+          page: this.page,
183
+          limit: this.limit,
184
+          keyword: this.keywords,
185
+          is_use: this.is_use,
186
+          is_charge: this.is_charge,
187
+          is_inject: this.is_inject
188
+        }
189
+        getBaseDrugLibList(params).then(response => {
190
+          if (response.data.state == 0) {
191
+            this.$message.error(response.data.msg)
192
+            return false
193
+          } else {
194
+            this.total = response.data.data.total
195
+            this.list = []
196
+            for (let i = 0; i < response.data.data.list.length; i++) {
197
+              this.list.push(response.data.data.list[i])
198
+            }
199
+            console.log("list222222",this.list)
200
+          }
201
+        })
202
+      },
203
+      getUnit(id){
204
+        var name = ""
205
+        for(let i=0;i<this.list.length;i++){
206
+          if(this.list[i].id == id){
207
+            name = this.list[i].min_unit
208
+          }
209
+        }
210
+        return name
211
+      },
212
+    },
213
+    created() {
214
+      const order_id = this.$route.query.id
215
+      this.GetOrderDetail(order_id)
216
+      this.getList()
217
+    }
218
+
219
+  }
220
+</script>
221
+
222
+<style>
223
+  .dialysis-print-order {
224
+    width: 960px;
225
+    margin: 0 auto
226
+  }
227
+
228
+  .dialysis-print-order .order-yy-name {
229
+    margin: auto;
230
+    text-align: center;
231
+    font-size: 20px;
232
+    letter-spacing: 5px;
233
+  }
234
+
235
+  .dialysis-print-order .order-title {
236
+    margin: auto;
237
+    font-weight: 600;
238
+    text-align: center;
239
+    font-size: 22px;
240
+    padding: 10px 20px 20px 20px;
241
+  }
242
+
243
+  .dialysis-print-order .table-box {
244
+
245
+    width: 100%;
246
+    line-height: 23px;
247
+    font-size: 14px;
248
+  }
249
+
250
+  .dialysis-print-order .print-table {
251
+    width: 100%;
252
+    text-align: center;
253
+    border-collapse: collapse;
254
+    line-height: 40px;
255
+    font-size: 14px;
256
+  }
257
+
258
+  .dialysis-print-order .print-table-no {
259
+    width: 100%;
260
+    text-align: center;
261
+    border-collapse: collapse;
262
+    font-size: 14px;
263
+  }
264
+
265
+  .dialysis-print-order .under-line {
266
+    border-bottom: 1px solid #999;
267
+    width: 95%;
268
+    text-align: center;
269
+    margin-left: 2px;
270
+
271
+
272
+  }
273
+
274
+  .dialysis-print-order .title-box {
275
+    text-align: center;
276
+    font-size: 16px;
277
+  }
278
+
279
+  .dialysis-print-order .radio-lebel-box {
280
+    font-weight: 400;
281
+    cursor: pointer;
282
+  }
283
+
284
+  .dialysis-print-order .radio-no {
285
+    opacity: 0;
286
+    outline: none;
287
+    position: absolute;
288
+    margin: 0;
289
+    width: 0;
290
+    height: 0;
291
+    z-index: -1;
292
+  }
293
+
294
+  .dialysis-print-order .radio-inner {
295
+    white-space: nowrap;
296
+    cursor: pointer;
297
+    outline: none;
298
+    display: inline-block;
299
+    line-height: 1;
300
+    position: relative;
301
+    vertical-align: middle;
302
+  }
303
+
304
+  .dialysis-print-order .radio-fang {
305
+    display: inline-block;
306
+    position: relative;
307
+    border: 1px solid #000;
308
+    box-sizing: border-box;
309
+    width: 14px;
310
+    height: 14px;
311
+    background-color: #fff;
312
+    z-index: 1;
313
+    transition: border-color .25s cubic-bezier(.71, -.46, .29, 1.46), background-color .25s cubic-bezier(.71, -.46, .29, 1.46);
314
+  }
315
+
316
+  .dialysis-print-order .is-checked-radio::after {
317
+    content: "√";
318
+    font-size: 15px;
319
+  }
320
+
321
+
322
+  .dialysis-print-order .print-table-no tr td {
323
+    padding: 8px 5px;
324
+    line-height: 25px;
325
+  }
326
+
327
+  .dialysis-print-order .print-table tr td {
328
+    padding: 1px 1px;
329
+    /*line-height: 25px;*/
330
+  }
331
+
332
+  .es-img {
333
+    height: 25px;
334
+  }
335
+
336
+  .advice-name {
337
+    text-align: left;
338
+  }
339
+
340
+  .advice-children {
341
+    display: flex;
342
+  }
343
+
344
+  .title-box-pro {
345
+    border: 0 #fff;
346
+    line-height: 25px;
347
+    height: 25px;
348
+    text-align: left;
349
+    padding-left: 10px !important;
350
+  }
351
+
352
+  .title-box-pro-tr {
353
+    border: 0 #fff;
354
+  }
355
+
356
+  .text-align-left {
357
+    text-align: left !important;
358
+    padding-left: 10px !important;
359
+    font-size: 14px !important;
360
+    line-height: 25px;
361
+  }
362
+
363
+  .print-table-tr-new td {
364
+    line-height: 20px !important;
365
+  }
366
+
367
+  .border-top-solid {
368
+    border: solid 1px #000;
369
+  }
370
+
371
+  .print-template-two tr {
372
+    line-height: 30px;
373
+  }
374
+</style>

+ 24 - 6
src/xt_pages/stock/drugs/query.vue Wyświetl plik

@@ -12,6 +12,14 @@
12 12
         >设置
13 13
         </el-button
14 14
         >
15
+      <el-button
16
+          size="small"
17
+          class="filter-item"
18
+          type="primary"
19
+          icon="el-icon-search"
20
+          @click="printOrder"
21
+        >打印
22
+      </el-button>
15 23
       <el-button
16 24
           size="small"
17 25
           class="filter-item"
@@ -106,6 +114,12 @@
106 114
             >{{ stockInCount(scope.row) }}</span
107 115
             >
108 116
           </template>
117
+        </el-table-column>
118
+         <el-table-column label="单价" align="center">
119
+          <template slot-scope="scope">
120
+            <span>{{ scope.row.last_price}}</span
121
+            >
122
+          </template>
109 123
         </el-table-column>
110 124
         <el-table-column label="入库退货" align="center">
111 125
           <template slot-scope="scope">
@@ -292,9 +306,7 @@
292 306
             this.total = response.data.data.total
293 307
             var arr = []
294 308
             for (let i = 0; i < response.data.data.list.length; i++) {
295
-              this.WarehouseInfo.warehouseInfoDate.push(
296
-                response.data.data.list[i]
297
-              )
309
+              this.WarehouseInfo.warehouseInfoDate.push(response.data.data.list[i])
298 310
               arr.push(response.data.data.list[i])
299 311
             }
300 312
             console.log("数据源头",arr)
@@ -413,8 +425,8 @@
413 425
       },
414 426
        exportStock(){
415 427
          import('@/vendor/Export2Excel').then(excel => {
416
-         const tHeader = ['药品名称', '规格名称', '入库数量','入库退货','实际入库','出库数量','出库退库','实际出库','剩余库存']
417
-         const filterVal = ['drug_name', 'drug_spec', 'stockInCount','salesReturnCount','reactCount','stockOutCount','cancelStockCount','reactOutCount','overplusCount']
428
+         const tHeader = ['药品名称', '规格名称', '入库数量','单价','入库退货','实际入库','出库数量','出库退库','实际出库','剩余库存']
429
+         const filterVal = ['drug_name', 'drug_spec', 'stockInCount','last_price','salesReturnCount','reactCount','stockOutCount','cancelStockCount','reactOutCount','overplusCount']
418 430
        
419 431
         
420 432
          const data = this.formatJson(filterVal, this.tableData)
@@ -423,7 +435,7 @@
423 435
          excel.export_json_to_excel({
424 436
            header: tHeader,
425 437
            data,
426
-           filename: '自备药查询'
438
+           filename: '药查询'
427 439
          })
428 440
           this.downloadLoading = false
429 441
         })
@@ -439,6 +451,12 @@
439 451
       },
440 452
       changeDrug(){
441 453
        this.GetAllDrugStockQueryList()
454
+      },
455
+      printOrder(){
456
+        this.$router.push({
457
+          name: "drugQueryPrint",
458
+          query: {drug_category:this.drug_category,keyword:this.keywords,start_time:this.start_time,end_time:this.end_time}
459
+        });
442 460
       }
443 461
     }
444 462
   }

+ 17 - 11
src/xt_pages/stock/stockInOrderDetail.vue Wyświetl plik

@@ -14,9 +14,7 @@
14 14
       <div class="filter-container">
15 15
         <span style="font-size: 18px;color: #606266">入库单详情</span>
16 16
         <el-row style="float:right;">
17
-          <span style="color: #606266"
18
-            >入库单号: {{ WarehouseInfo.warehouse.warehousing_order }}</span
19
-          >
17
+          <span style="color: #606266">入库单号: {{ WarehouseInfo.warehouse.warehousing_order }}</span>
20 18
         </el-row>
21 19
       </div>
22 20
 
@@ -36,14 +34,16 @@
36 34
         >
37 35
       </div>
38 36
 
39
-      <div class="cell clearfix" style="margin-top: 10px">
40
-     
41
-        <el-button size="small" icon="el-icon-edit" @click="editRecord"
42
-          >编辑</el-button
43
-        >
44
-        <el-button size="small" icon="el-icon-delete" @click="deleteRecord"
45
-          >删除</el-button
46
-        >
37
+      <div style="display:flex;justify-content: space-between;align-items: center;margin: 12px 0;">
38
+        <div>
39
+          <el-button size="small" icon="el-icon-edit" @click="editRecord"
40
+            >编辑</el-button
41
+          >
42
+          <el-button size="small" icon="el-icon-delete" @click="deleteRecord"
43
+            >删除</el-button
44
+          >
45
+        </div>
46
+        <el-button size="small" type="primary" @click="printOrder">打印</el-button>
47 47
       </div>
48 48
 
49 49
       <el-row :gutter="12" style="margin-top: 10px">
@@ -309,6 +309,12 @@ export default {
309 309
     },
310 310
     editRecord: function() {
311 311
       this.$emit("edit-record");
312
+    },
313
+    printOrder(){
314
+       this.$router.push({
315
+        name: "stockInDetailPrint",
316
+        query: { id: this.$route.query.id }
317
+      });
312 318
     }
313 319
   }
314 320
 };

+ 311 - 0
src/xt_pages/stock/stockInOrderDetailPrint.vue Wyświetl plik

@@ -0,0 +1,311 @@
1
+<template>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        <el-row style="float:right;">
6
+            <el-col :span="24">
7
+            <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
8
+            </el-col>
9
+        </el-row>
10
+        </div>
11
+        <div class="app-container" style="background-color: white;">
12
+            <div id="print_content">
13
+                <div class="print_main_content">
14
+                    <div class="order_title_panl">
15
+                        <span class="main_title">耗材入库登记单</span>
16
+                    </div>
17
+                    <div style="text-align:right;margin-bottom:20px;font-size: 18px;">
18
+                      打印时间:{{time_now}}
19
+                    </div>
20
+                    <div class="table_panel">
21
+                        <table class="table">
22
+                            <thead>
23
+                                <tr>
24
+                                    <td width="80">耗材名称</td>
25
+                                    <td width="80">规格型号</td>
26
+                                    <td width="80">单位</td>
27
+                                     <td width="80">进货价</td>
28
+                                    <td width="80">入库数量</td> 
29
+                                    <td width="80">总价</td>
30
+                                </tr>
31
+                            </thead>
32
+                            <tbody>
33
+                                <tr v-for='(item,index) in WarehouseInfo.warehouseInfoDate' :key="index">
34
+                                    <td><span v-if="item.good_id != 0">{{getTypeNameOne(item.good_id)}}</span></td>
35
+                                    <td><span v-if="item.good_id != 0">{{getSpecificationName(item.good_id)}}</span></td>
36
+                                    <td><span v-if="item.good_id!=0">{{getUnit(item.good_id)}}</span></td>
37
+                                    <td>{{item.price}}</td>
38
+                                    <td>{{item.warehousing_count}}</td> 
39
+                                    <td>{{(item.warehousing_count*item.price).toFixed(2)}}</td>
40
+                                </tr>
41
+                                <tr>
42
+                                  <td>合计</td>
43
+                                  <td colspan="4"></td>
44
+                                  <td>{{allPrice.toFixed(2)}}</td>
45
+                               </tr>
46
+                            </tbody>
47
+                        </table>
48
+
49
+                        <div style="display:flex;margin-top:20px;float:right;">
50
+                            <div style="width:50px;">审批:</div><div style="width:100px;"></div>
51
+                            <div style="width:80px;">药材主任:</div><div style="width:100px;"></div>
52
+                            <div style="width:50px;">会计:</div><div style="width:100px;"></div>
53
+                            <div style="width:50px;">审核:</div><div style="width:100px;"></div>
54
+                            <div style="width:70px;">制单人:</div><div style="width:100px;"></div>
55
+                       </div>
56
+                    </div>
57
+                </div>
58
+            </div>
59
+        </div>
60
+    </div>
61
+</template>
62
+
63
+<script>
64
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
65
+import {
66
+  GetAllConfig,
67
+  getWarehouseInfoList,
68
+  getGoodInfoList
69
+} from "@/api/stock";
70
+import print from 'print-js'
71
+const moment = require('moment')
72
+export default {
73
+    components:{
74
+        BreadCrumb
75
+    },
76
+    data(){
77
+        return{
78
+          crumbs: [
79
+            { path: false, name: '库存管理' },
80
+            { path: false, name: '耗材管理' },
81
+            { path: false, name: '入库单打印' },
82
+          ],
83
+            isEdit: 0,
84
+            checked: false,
85
+            signAndWeighBoxPatients: "sign-and-weigh-box-patients",
86
+            goodType: [],
87
+            goodInfo: [],
88
+            manufacturer: [],
89
+            dealer: [],
90
+            Warehouse: {
91
+                loading: false,
92
+                warehouseDate: [],
93
+                tableCurrentIndex: ""
94
+            },
95
+
96
+            WarehouseInfo: {
97
+                loading: false,
98
+                warehouseInfoDate: [],
99
+                warehouse: {}
100
+            },
101
+            time_now:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
102
+            allPrice:0,
103
+            page: 1,
104
+            limit: 10000,
105
+            keyword: "",
106
+            is_use:"",
107
+            good_kind:"",
108
+            is_charge:"",
109
+            list:[]
110
+        }
111
+    },
112
+    methods:{
113
+      printAction: function() {
114
+          const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 10px 5px; white-space: pre-line;} .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
115
+          printJS({
116
+          printable: 'print_content',
117
+          type: 'html',
118
+          documentTitle: '  ',
119
+          style: style,
120
+          scanStyles: false
121
+          })
122
+      },
123
+      
124
+        GetConfigInfo: function() {
125
+        GetAllConfig().then(response => {
126
+            if (response.data.state == 0) {
127
+            this.$message.error(response.data.msg);
128
+            return false;
129
+            } else {
130
+            this.manufacturer = response.data.data.manufacturer;
131
+            this.dealer = response.data.data.dealer;
132
+            this.goodInfo = response.data.data.goodInfo;
133
+            this.goodType = response.data.data.goodType;
134
+            }
135
+        });
136
+        },
137
+       
138
+     GetOrderDetail: function(order_id) {
139
+        const params = {
140
+            id: order_id
141
+        };
142
+        getWarehouseInfoList(params).then(response => {
143
+            if (response.data.state == 0) {
144
+            this.$message.error(response.data.msg);
145
+            return false;
146
+            } else {
147
+             var obj = ""
148
+            for (let i = 0; i < response.data.data.info.length; i++) {
149
+                this.WarehouseInfo.warehouseInfoDate.push(response.data.data.info[i]);
150
+            }
151
+            this.WarehouseInfo.warehouse = response.data.data.warehousing;
152
+            var total_price = 0
153
+            for(let i=0;i<this.WarehouseInfo.warehouseInfoDate.length;i++){
154
+               total_price += this.WarehouseInfo.warehouseInfoDate[i].warehousing_count * this.WarehouseInfo.warehouseInfoDate[i].price   
155
+            }
156
+            this.allPrice = total_price
157
+            console.log("total_price",total_price)
158
+            console.log("数据222222222",this.WarehouseInfo.warehouseInfoDate)
159
+            }
160
+        });
161
+       },
162
+      
163
+    getSpecificationName: function(id) {
164
+      let name = "";
165
+      for (let i = 0; i < this.goodInfo.length; i++) {
166
+        if (this.goodInfo[i].id == id) {
167
+          name = this.goodInfo[i].specification_name;
168
+        }
169
+      }
170
+      return name;
171
+    },
172
+    getTypeName: function(id) {
173
+      let name = "";
174
+      for (let i = 0; i < this.goodType.length; i++) {
175
+        if (this.goodType[i].id == id) {
176
+          name = this.goodType[i].type_name;
177
+        }
178
+      }
179
+      return name;
180
+    },
181
+    getTypeNameOne:function(id){
182
+      let name = "";
183
+      for (let i = 0; i < this.goodInfo.length; i++) {
184
+        if (this.goodInfo[i].id == id) {
185
+          name = this.goodInfo[i].good_name;
186
+        }
187
+      }
188
+      return name;
189
+     },
190
+     getList() {
191
+        this.goodInfo.loading = true
192
+        let params = {
193
+          page: this.page,
194
+          limit: this.limit,
195
+          keyword: this.keywords,
196
+          is_use:this.is_use,
197
+          good_kind:this.good_kind,
198
+          is_charge: this.is_charge,
199
+        }
200
+        getGoodInfoList(params).then(response => {
201
+          if (response.data.state == 0) {
202
+           
203
+            this.$message.error(response.data.msg)
204
+            return false
205
+          } else {
206
+            this.list = []
207
+            for (let i = 0; i < response.data.data.list.length; i++) {
208
+              this.list.push(response.data.data.list[i])
209
+            }
210
+            console.log("list22222",this.list)
211
+          }
212
+        })
213
+      },
214
+      getUnit(id){
215
+        var name = ""
216
+        for(let i=0;i<this.list.length;i++){
217
+          if(id == this.list[i].id){
218
+             name = this.list[i].good_unit
219
+          }
220
+        }
221
+        return this.getGoodUnit(name)
222
+      },
223
+      getGoodUnit(id){
224
+        for (let i = 0; i <this.$store.getters.good_unit.length; i++ ){
225
+          if(id == this.$store.getters.good_unit[i].id){
226
+
227
+            return this.$store.getters.good_unit[i].name
228
+          }
229
+        }
230
+        return ""
231
+      },
232
+    },
233
+    created(){
234
+
235
+      const order_id = this.$route.query.id;
236
+      this.GetConfigInfo();
237
+      this.GetOrderDetail(order_id);
238
+      this.getList()
239
+    }
240
+}
241
+</script>
242
+
243
+
244
+<style rel="stylesheet/scss" lang="scss" scoped>
245
+.print_main_content {
246
+  background-color: white;
247
+  max-width: 1500px;
248
+  margin: 0 auto;
249
+  padding: 0 0 20px 0;
250
+
251
+  .order_title_panl {
252
+    text-align: center;
253
+
254
+    .main_title {
255
+      font-size: 18px;
256
+      line-height: 40px;
257
+      font-weight: 500;
258
+    }
259
+  }
260
+  .table_panel {
261
+    .table {
262
+      width: 100%;
263
+      border: 1px solid;
264
+      border-collapse: collapse;
265
+      padding: 2px;
266
+      
267
+
268
+      thead {
269
+        tr {
270
+          td {
271
+            border: 1px solid;
272
+            text-align: center;
273
+            font-size: 18px;
274
+            padding: 15px 5px;
275
+          }
276
+        }
277
+      }
278
+      tbody {
279
+        tr {
280
+          td {
281
+            border: 1px solid;
282
+            text-align: center;
283
+            font-size: 18px;
284
+            padding: 10px 5px;
285
+            white-space: pre-line;
286
+            .proj {
287
+              padding: 5px 0;
288
+              text-align: left;
289
+
290
+              .proj_title {
291
+                font-size: 16px;
292
+                font-weight: 500;
293
+                line-height: 25px;
294
+              }
295
+
296
+              .proj_item {
297
+                font-size: 15px;
298
+                line-height: 20px;
299
+
300
+                .zone_name {
301
+                  font-weight: 500;
302
+                }
303
+              }
304
+            }
305
+          }
306
+        }
307
+      }
308
+    }
309
+  }
310
+}
311
+</style>

+ 16 - 5
src/xt_pages/stock/stockOutOrderDetail.vue Wyświetl plik

@@ -11,7 +11,7 @@
11 11
       <div class="filter-container">
12 12
         <span style="font-size: 18px;color: #606266">出库单详情</span>
13 13
         <el-row style="float:right;">
14
-          <span style="color: #606266">{{warehousingOutInfo.info.warehouse_out_order_number}}</span>
14
+          <span style="color: #606266">出库单号:{{warehousingOutInfo.info.warehouse_out_order_number}}</span>
15 15
         </el-row>
16 16
       </div>
17 17
 
@@ -22,9 +22,12 @@
22 22
         <span style="width: 300px;color: #606266">经销商 {{getDealerName(warehousingOutInfo.info.dealer)}}</span>
23 23
       </div>
24 24
 
25
-      <div class="filter-container" style="margin-top: 10px">
26
-        <el-button size="small" icon="el-icon-edit" @click="editRecord" v-if="warehousingOutInfo.info.is_sys != 1">编辑</el-button>
27
-        <el-button size="small" icon="el-icon-delete" @click="deleteRecord" v-if="warehousingOutInfo.info.is_sys != 1">删除</el-button>
25
+      <div style="display:flex;justify-content: space-between;align-items: center;margin: 12px 0;">
26
+        <div>
27
+          <el-button size="small" icon="el-icon-edit" @click="editRecord" v-if="warehousingOutInfo.info.is_sys != 1">编辑</el-button>
28
+          <el-button size="small" icon="el-icon-delete" @click="deleteRecord" v-if="warehousingOutInfo.info.is_sys != 1">删除</el-button>
29
+        </div>
30
+        <el-button size="small" type="primary" @click="printOrder">打印</el-button>
28 31
       </div>
29 32
 
30 33
       <el-row :gutter="12" style="margin-top: 10px">
@@ -230,6 +233,7 @@
230 233
               this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
231 234
             }
232 235
             this.warehousingOutInfo.info = response.data.data.info
236
+          
233 237
             console.log("数据源头9999999999",this.warehousingOutInfo.warehousingOutData)
234 238
             this.handleSpanTempArr()
235 239
           }
@@ -340,7 +344,14 @@
340 344
             }
341 345
          }
342 346
          return count
343
-      }
347
+      },
348
+
349
+     printOrder(){
350
+       this.$router.push({
351
+        name: "stockOutDetailPrint",
352
+        query: { id: this.$route.query.id,warehouse_out_time:this.$route.query.warehouse_out_time }
353
+      });
354
+    }
344 355
     }
345 356
   }
346 357
 </script>

+ 326 - 0
src/xt_pages/stock/stockOutOrderDetailPrint.vue Wyświetl plik

@@ -0,0 +1,326 @@
1
+<template>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        <el-row style="float:right;">
6
+            <el-col :span="24">
7
+            <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
8
+            </el-col>
9
+        </el-row>
10
+        </div>
11
+        <div class="app-container" style="background-color: white;">
12
+            <div id="print_content">
13
+                <div class="print_main_content">
14
+                    <div class="order_title_panl">
15
+                        <span class="main_title">耗材出库登记单</span>
16
+                    </div>
17
+                    <div style="text-align:right;margin-bottom:20px;font-size: 18px;">
18
+                      打印时间:{{time_now}}
19
+                    </div>
20
+                    <div class="table_panel">
21
+                        <table class="table">
22
+                            <thead>
23
+                                <tr>
24
+                                    <td width="80">耗材名称</td>
25
+                                    <td width="80">规格型号</td>
26
+                                    <td width="80">单位</td>
27
+                                     <td width="80">出货价</td>
28
+                                    <td width="80">出库数量</td> 
29
+                                    <td width="80">总价</td>
30
+                                </tr>
31
+                            </thead>
32
+                            <tbody>
33
+                                <tr v-for='(item,index) in warehousingOutInfo.warehousingOutData' :key="index">
34
+                                    <td><span v-if="item.good_id != 0">{{getTypeNameOne(item.good_id)}}</span></td>
35
+                                    <td><span v-if="item.good_id != 0">{{getSpecificationName(item.good_id)}}</span></td>
36
+                                    <td><span v-if="item.good_id!=0">{{getUnit(item.good_id)}}</span></td>
37
+                                    <td>{{item.price}}</td>
38
+                                    <td>{{getOutStockCount(item.good_id)}}</td> 
39
+                                    <td>{{(getOutStockCount(item.good_id)*item.price).toFixed(2)}}</td>
40
+                                </tr>
41
+                                <tr>
42
+                                  <td>合计</td>
43
+                                  <td colspan="4"></td>
44
+                                  <td>{{allPrice.toFixed(2)}}</td>
45
+                               </tr>
46
+                            </tbody>
47
+                        </table>
48
+
49
+                        <div style="display:flex;margin-top:20px;float:right;">
50
+                            <div style="width:50px;">审批:</div><div style="width:100px;"></div>
51
+                            <div style="width:80px;">药材主任:</div><div style="width:100px;"></div>
52
+                            <div style="width:50px;">会计:</div><div style="width:100px;"></div>
53
+                            <div style="width:50px;">审核:</div><div style="width:100px;"></div>
54
+                            <div style="width:70px;">制单人:</div><div style="width:100px;"></div>
55
+                       </div>
56
+                    </div>
57
+                </div>
58
+            </div>
59
+        </div>
60
+    </div>
61
+</template>
62
+
63
+<script>
64
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
65
+import { GetAllConfig,getWarehouseOutInfo,GetOutStockTotalCount,getGoodInfoList } from "@/api/stock";
66
+import print from 'print-js'
67
+const moment = require('moment')
68
+export default {
69
+    components:{
70
+        BreadCrumb
71
+    },
72
+    data(){
73
+        return{
74
+          crumbs: [
75
+            { path: false, name: '库存管理' },
76
+            { path: false, name: '耗材管理' },
77
+            { path: false, name: '入库单打印' },
78
+          ],
79
+           isEdit: 0,
80
+            checked: false,
81
+            signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
82
+            goodType: [],
83
+            goodInfo: [],
84
+            manufacturer: [],
85
+            dealer: [],
86
+
87
+            warehousingOutInfo: {
88
+            loading: false,
89
+            warehousingOutData: [],
90
+            info: {}
91
+            },
92
+            stockCount:[],
93
+            time_now:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
94
+            allPrice:0,
95
+            page: 1,
96
+            limit: 10000,
97
+            keyword: "",
98
+            is_use:"",
99
+            good_kind:"",
100
+            is_charge:"",
101
+            list:[]
102
+        }
103
+    },
104
+    methods:{
105
+      printAction: function() {
106
+          const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 10px 5px; white-space: pre-line;} .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
107
+          printJS({
108
+          printable: 'print_content',
109
+          type: 'html',
110
+          documentTitle: '  ',
111
+          style: style,
112
+          scanStyles: false
113
+          })
114
+      },
115
+
116
+        GetConfigInfo() {
117
+            GetAllConfig().then(response => {
118
+            if (response.data.state == 0) {
119
+                this.$message.error(response.data.msg)
120
+                return false
121
+            } else {
122
+                this.manufacturer = response.data.data.manufacturer
123
+                this.dealer = response.data.data.dealer
124
+                this.goodInfo = response.data.data.goodInfo
125
+                this.goodType = response.data.data.goodType
126
+            }
127
+            })
128
+        },
129
+       GetOrderDetail: function(order_id) {
130
+        const params = {
131
+          'id': order_id
132
+        }
133
+        getWarehouseOutInfo(params).then(response => {
134
+          if (response.data.state == 0) {
135
+
136
+            this.$message.error(response.data.msg)
137
+            return false
138
+          } else {
139
+           
140
+            for (let i = 0; i < response.data.data.list.length; i++) {
141
+              this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
142
+            }
143
+            this.warehousingOutInfo.info = response.data.data.info
144
+            console.log("数据源头9999999999",this.warehousingOutInfo.warehousingOutData)
145
+            var total_price = 0
146
+            for(let i=0;i<this.warehousingOutInfo.warehousingOutData.length;i++){
147
+              total_price += this.getOutStockCount(this.warehousingOutInfo.warehousingOutData[i].good_id)*this.warehousingOutInfo.warehousingOutData[i].price
148
+            }
149
+           this.allPrice = total_price
150
+          }
151
+        })
152
+      },
153
+
154
+       GetTotalCount(time){
155
+          var params = {
156
+           warehouse_out_time:time
157
+          }
158
+        GetOutStockTotalCount(params).then(response=>{
159
+           if(response.data.state == 1){
160
+              var stockCount = response.data.data.stockCount
161
+              console.log("stockCount",stockCount)
162
+              this.stockCount = stockCount
163
+           }
164
+        })
165
+      },
166
+      
167
+       getSpecificationName: function(id) {
168
+        let name = ''
169
+        for (let i = 0; i < this.goodInfo.length; i++) {
170
+          if (this.goodInfo[i].id == id) {
171
+            name = this.goodInfo[i].specification_name
172
+          }
173
+        }
174
+        return name
175
+      },
176
+       getTypeName: function(id) {
177
+        let name = ''
178
+        for (let i = 0; i < this.goodType.length; i++) {
179
+          if (this.goodType[i].id == id) {
180
+            name = this.goodType[i].type_name
181
+          }
182
+        }
183
+        return name
184
+      },
185
+       getTypeNameOne: function(id) {
186
+        let name = ''
187
+        for (let i = 0; i < this.goodInfo.length; i++) {
188
+          if (this.goodInfo[i].id == id) {
189
+            name = this.goodInfo[i].good_name
190
+          }
191
+        }
192
+        return name
193
+      },
194
+      getOutStockCount(id){
195
+         var count = 0 
196
+         for(let i=0;i<this.stockCount.length;i++){
197
+            if(id == this.stockCount[i].good_id){
198
+              count = this.stockCount[i].count
199
+            }
200
+         }
201
+         return count
202
+      },
203
+       getList() {
204
+        this.goodInfo.loading = true
205
+        let params = {
206
+          page: this.page,
207
+          limit: this.limit,
208
+          keyword: this.keywords,
209
+          is_use:this.is_use,
210
+          good_kind:this.good_kind,
211
+          is_charge: this.is_charge,
212
+        }
213
+        getGoodInfoList(params).then(response => {
214
+          if (response.data.state == 0) {
215
+            this.$message.error(response.data.msg)
216
+            return false
217
+          } else {
218
+            this.list = []
219
+            for (let i = 0; i < response.data.data.list.length; i++) {
220
+              this.list.push(response.data.data.list[i])
221
+            }
222
+            console.log("list22222",this.list)
223
+          }
224
+        })
225
+      },
226
+      getUnit(id){
227
+        var name = ""
228
+        for(let i=0;i<this.list.length;i++){
229
+          if(id == this.list[i].id){
230
+             name = this.list[i].good_unit
231
+          }
232
+        }
233
+        return this.getGoodUnit(name)
234
+      },
235
+      getGoodUnit(id){
236
+        for (let i = 0; i <this.$store.getters.good_unit.length; i++ ){
237
+          if(id == this.$store.getters.good_unit[i].id){
238
+
239
+            return this.$store.getters.good_unit[i].name
240
+          }
241
+        }
242
+        return ""
243
+      },
244
+      
245
+    },
246
+    created(){
247
+
248
+      const order_id = this.$route.query.id;
249
+      const warehouse_out_time = this.$route.query.warehouse_out_time
250
+      this.GetConfigInfo()
251
+      this.GetOrderDetail(order_id)
252
+      this.GetTotalCount(warehouse_out_time)
253
+      this.getList()
254
+    }
255
+}
256
+</script>
257
+
258
+
259
+<style rel="stylesheet/scss" lang="scss" scoped>
260
+.print_main_content {
261
+  background-color: white;
262
+  max-width: 1500px;
263
+  margin: 0 auto;
264
+  padding: 0 0 20px 0;
265
+
266
+  .order_title_panl {
267
+    text-align: center;
268
+
269
+    .main_title {
270
+      font-size: 18px;
271
+      line-height: 40px;
272
+      font-weight: 500;
273
+    }
274
+  }
275
+  .table_panel {
276
+    .table {
277
+      width: 100%;
278
+      border: 1px solid;
279
+      border-collapse: collapse;
280
+      padding: 2px;
281
+      
282
+
283
+      thead {
284
+        tr {
285
+          td {
286
+            border: 1px solid;
287
+            text-align: center;
288
+            font-size: 18px;
289
+            padding: 15px 5px;
290
+          }
291
+        }
292
+      }
293
+      tbody {
294
+        tr {
295
+          td {
296
+            border: 1px solid;
297
+            text-align: center;
298
+            font-size: 18px;
299
+            padding: 10px 5px;
300
+            white-space: pre-line;
301
+            .proj {
302
+              padding: 5px 0;
303
+              text-align: left;
304
+
305
+              .proj_title {
306
+                font-size: 16px;
307
+                font-weight: 500;
308
+                line-height: 25px;
309
+              }
310
+
311
+              .proj_item {
312
+                font-size: 15px;
313
+                line-height: 20px;
314
+
315
+                .zone_name {
316
+                  font-weight: 500;
317
+                }
318
+              }
319
+            }
320
+          }
321
+        }
322
+      }
323
+    }
324
+  }
325
+}
326
+</style>

+ 9 - 0
src/xt_pages/stock/stockPrint.vue Wyświetl plik

@@ -26,6 +26,7 @@
26 26
                                     <td width="80">耗材类型</td>
27 27
                                     <td width="80">规格型号</td>
28 28
                                     <td width="80">入库数量</td>
29
+                                    <td width="80">进货价</td>
29 30
                                     <td width="80">入库退货</td>
30 31
                                     <td width="80">实际入库</td>
31 32
                                     <td width="80">出库数量</td>
@@ -41,6 +42,7 @@
41 42
                                     <td>{{item.type.type_name}}</td>
42 43
                                     <td>{{item.specification_name}}</td>
43 44
                                     <td>{{stockInCount(item)}}</td>
45
+                                    <td>{{item.price}}</td>
44 46
                                     <td>{{salesReturnCount(item)}}</td>
45 47
                                     <td> {{ stockInCount(item) - salesReturnCount(item) }}</td>
46 48
                                     <td>{{ stockOutCount(item) }}</td>
@@ -122,6 +124,13 @@ export default {
122 124
           for (let i = 0; i < response.data.data.list.length; i++) {
123 125
             this.WarehouseInfo.warehouseInfoDate.push( response.data.data.list[i]);
124 126
           }
127
+          for(let i=0;i<this.WarehouseInfo.warehouseInfoDate.length;i++){
128
+            if(this.WarehouseInfo.warehouseInfoDate[i].query_warehousing_info.length>0){
129
+              this.WarehouseInfo.warehouseInfoDate[i].price = this.WarehouseInfo.warehouseInfoDate[i].query_warehousing_info[0].price
130
+            }else{
131
+              this.WarehouseInfo.warehouseInfoDate[i].price = ""
132
+            }
133
+          }
125 134
          }
126 135
             console.log("打印数据源头",this.WarehouseInfo.warehouseInfoDate)
127 136
           });

+ 20 - 3
src/xt_pages/stock/stockQuery.vue Wyświetl plik

@@ -100,6 +100,11 @@
100 100
             <span>{{getUnit(scope.row.good_unit)}}</span>
101 101
           </template>
102 102
         </el-table-column>
103
+        <el-table-column label="进货价" align="center">
104
+          <template slot-scope="scope">
105
+            <span v-if="scope.row.query_warehousing_info.length>0">{{scope.row.query_warehousing_info[0].price?scope.row.query_warehousing_info[0].price:""}}</span>
106
+          </template>
107
+        </el-table-column>
103 108
         <el-table-column label="入库数量" align="center">
104 109
           <template slot-scope="scope">
105 110
             <span
@@ -259,6 +264,16 @@ export default {
259 264
             this.WarehouseInfo.warehouseInfoDate[i].realOutCount =  this.stockOutCount(this.WarehouseInfo.warehouseInfoDate[i]) -  this.cancelStockCount(this.WarehouseInfo.warehouseInfoDate[i])
260 265
 
261 266
             this.WarehouseInfo.warehouseInfoDate[i].overplus = this.stockInCount(this.WarehouseInfo.warehouseInfoDate[i]) -this.salesReturnCount(this.WarehouseInfo.warehouseInfoDate[i]) - this.stockOutCount(this.WarehouseInfo.warehouseInfoDate[i]) + this.cancelStockCount(this.WarehouseInfo.warehouseInfoDate[i])
267
+
268
+            if(this.WarehouseInfo.warehouseInfoDate[i].query_warehousing_info.length>0){
269
+              this.WarehouseInfo.warehouseInfoDate[i].price = this.WarehouseInfo.warehouseInfoDate[i].query_warehousing_info[0].price
270
+              this.WarehouseInfo.warehouseInfoDate[i].all_price = (this.stockInCount(this.WarehouseInfo.warehouseInfoDate[i]) * this.WarehouseInfo.warehouseInfoDate[i].query_warehousing_info[0].price).toFixed(2)
271
+            }else{
272
+             this.WarehouseInfo.warehouseInfoDate[i].price = ""
273
+             this.WarehouseInfo.warehouseInfoDate[i].all_price = ""
274
+            }
275
+
276
+
262 277
          }
263 278
         
264 279
         console.log("数据2222222",this.WarehouseInfo.warehouseInfoDate)
@@ -368,11 +383,13 @@ export default {
368 383
     },
369 384
 
370 385
     exportList(){
386
+         console.log("2222222",this.WarehouseInfo.warehouseInfoDate)
371 387
          import('@/vendor/Export2Excel').then(excel => {
372
-         const tHeader = ['商品编码', '耗材名称', '耗材类型','规格型号','入库数量','入库退货','实际入库','出库数量','出库退库','实际出库','剩余库存']
373
-         const filterVal = ['good_code', 'good_name', 'type_name','specification_name','stockInCount','salesReturnCount','realCount','stockOutCount','cancelStockCount','realOutCount','overplus'] 
388
+         const tHeader = ['商品编码', '耗材名称', '耗材类型','规格型号','入库数量','进货价','入库退货','实际入库','出库数量','出库退库','实际出库','剩余库存']
389
+         const filterVal = ['good_code', 'good_name', 'type_name','specification_name','stockInCount','price','salesReturnCount','realCount','stockOutCount','cancelStockCount','realOutCount','overplus'] 
374 390
          const data = this.formatJson(filterVal, this.WarehouseInfo.warehouseInfoDate)
375
-      
391
+         console.log("data",data)
392
+         
376 393
          excel.export_json_to_excel({
377 394
            header: tHeader,
378 395
            data,

+ 12 - 1
src/xt_pages/user/components/PatientSidebar.vue Wyświetl plik

@@ -94,6 +94,10 @@ export default {
94 94
               name: '1-6',
95 95
               label: '干体重'
96 96
             },
97
+            {
98
+              name:'1-7',
99
+              label:'血管通路'
100
+            },
97 101
             {
98 102
               name: '1-2',
99 103
               label: '病程管理'
@@ -171,6 +175,8 @@ export default {
171 175
         this.$router.push({
172 176
           path: '/patients/patient/' + this.id + '/proeducation'
173 177
         })
178
+      }else if (name == '1-7'){
179
+        this.$router.push({path:'/patients/patient/'+this.id+'/vascularAccess'})
174 180
       }
175 181
     },
176 182
     changePatient(value) {
@@ -216,6 +222,7 @@ export default {
216 222
       return sex
217 223
     },
218 224
     querySearchAsync(keyword, cb) {
225
+      
219 226
       let key = ''
220 227
       if (keyword != undefined) {
221 228
         key = keyword
@@ -258,8 +265,10 @@ export default {
258 265
   },
259 266
   created() {
260 267
     var patientKey =  window.sessionStorage.getItem('patientKey')
268
+  
261 269
     console.log("patient",patientKey)
262 270
     var query = this.$route.path
271
+    console.log("query",this.$route.path)
263 272
     if(patientKey){
264 273
      this.treeKey = patientKey
265 274
      if(query.indexOf('edit') == -1){ 
@@ -277,7 +286,8 @@ export default {
277 286
         this.$router.push({
278 287
           path: '/patients/patient/' + this.id + '/dryWeight'
279 288
         })
280
-      } else if (patientKey == '1-5') {
289
+      }
290
+       else if (patientKey == '1-5') {
281 291
         this.$router.push({ path: '/patients/rescue?id=' + this.id })
282 292
       }else if (patientKey == '2-1') {
283 293
         this.$router.push({
@@ -296,6 +306,7 @@ export default {
296 306
           path: '/patients/patient/' + this.id + '/proeducation'
297 307
         })
298 308
       }
309
+    
299 310
      }else{
300 311
        this.treeKey = "1-1"
301 312
        

+ 1 - 0
src/xt_pages/user/dialysisRecord.vue Wyświetl plik

@@ -413,6 +413,7 @@ export default {
413 413
       this.getPatientDialysisRecords();
414 414
     },
415 415
     getPatientDialysisRecords() {
416
+      console.log("prams",this.queryParams)
416 417
       getPatientDialysisRecords(this.queryParams).then(response => {
417 418
         if (response.data.state == 1) {
418 419
           this.total = response.data.data.total;

+ 19 - 10
src/xt_pages/user/dialysisSolution.vue Wyświetl plik

@@ -85,6 +85,17 @@
85 85
             <span>{{ getAdminUserName(scope.row.registrars_id) }}</span>
86 86
           </template>
87 87
         </el-table-column>
88
+        
89
+        <el-table-column
90
+          prop="created_time"
91
+          align="center"
92
+          label="创建日期"
93
+          min-width="60"
94
+        >
95
+          <template slot-scope="scope">
96
+            <span>{{ scope.row.created_time | parseTime("{y}-{m}-{d}") }}</span>
97
+          </template>
98
+        </el-table-column>
88 99
 
89 100
         <el-table-column
90 101
           prop="updated_time"
@@ -1176,13 +1187,9 @@ export default {
1176 1187
           ) {
1177 1188
             mode = '3'
1178 1189
           }
1179
-
1180
-          editPatientDialysisSolution(
1181
-            this.patientID,
1182
-            this.addPlan.id,
1183
-            this.addPlan,
1184
-            mode
1185
-          ).then(response => {
1190
+          console.log("2233333",this.addPlan)
1191
+          
1192
+          editPatientDialysisSolution(this.patientID,this.addPlan.id,this.addPlan, mode).then(response => {
1186 1193
             if (response.data.state == 0) {
1187 1194
               this.$message.error(response.data.msg)
1188 1195
               return false
@@ -1216,6 +1223,7 @@ export default {
1216 1223
       })
1217 1224
     },
1218 1225
     submitNewSolution(formName) {
1226
+     
1219 1227
       this.addPlan.anticoagulant_zongliang = this.addPlan.anticoagulant_zongliang.toString()
1220 1228
       this.$refs[formName].validate(valid => {
1221 1229
         if (valid) {
@@ -1260,7 +1268,7 @@ export default {
1260 1268
       this.fetchPatientDialysisSolutions()
1261 1269
     },
1262 1270
     openEdit(index, row) {
1263
-     
1271
+      console.log("ro2333333",row)
1264 1272
       this.current_index = index
1265 1273
 
1266 1274
       this.addPlan.id = row.id
@@ -1324,7 +1332,7 @@ export default {
1324 1332
       this.addPlan.blood_access = row.blood_access
1325 1333
 
1326 1334
       this.addPlan.registrars_id = row.registrars_id
1327
-
1335
+      this.addPlan.created_time =  row.created_time
1328 1336
       this.dialogVisible = true
1329 1337
       this.isEdit = true
1330 1338
       if(row.dialysate_formulation==0){
@@ -1398,7 +1406,8 @@ export default {
1398 1406
 
1399 1407
         dialysis_duration: '3.30',
1400 1408
         dialysis_duration_hour: '3',
1401
-        dialysis_duration_minute: '30'
1409
+        dialysis_duration_minute: '30',
1410
+        created_time:"",
1402 1411
       }
1403 1412
       this.addPlanTypeChange()
1404 1413
 

+ 721 - 0
src/xt_pages/user/vascularAccess.vue Wyświetl plik

@@ -0,0 +1,721 @@
1
+<template>
2
+  <div class="patient-container">
3
+    <patient-sidebar :id="patientID" defaultActive="1-6" v-on:tran-patient="onTranPatient"></patient-sidebar>
4
+    <div class="patient-app-container advice-container app-container">
5
+      <div style="display:flex;justify-content: space-between;align-items: center;margin-bottom: 12px;">
6
+         <span style="font-weight:bold;">血管通路列表</span>
7
+         <el-button size="medium" type="primary" @click="dialogVisible =true">新增</el-button>
8
+      </div>
9
+      <el-table class="oictable" :data="tableData" border style="width:100%">
10
+      <el-table-column prop="start_time" label="建立日期" width="100" align="center">
11
+          <template slot-scope="scope">
12
+            <span>{{ getTime(scope.row.start_time, "{y}-{m}-{d}")}}</span>
13
+          </template>
14
+     </el-table-column>
15
+      <el-table-column prop="blood_access_part_opera_id" label="血管通路" align="center" width="120">
16
+        <template slot-scope="scope">
17
+           <router-link
18
+              :to="'/patients/patient/' + scope.row.patient_id+'/vascularAccessDetail/'+scope.row.id"
19
+              style="color:#409eff;width:100%;display:block;"
20
+            >{{ scope.row.blood_access_part_opera_id }}
21
+            </router-link
22
+            >
23
+        </template>
24
+     </el-table-column>
25
+     <el-table-column prop="blood_access_part_id" label="血管通路部位" width="200" align="center">
26
+        <template slot-scope="scope">
27
+           <span>{{scope.row.blood_access_part_id}}</span>  
28
+        </template>
29
+     </el-table-column>
30
+      <el-table-column prop="inflow_pass" label="流入-流出道" width="100" align="center">
31
+         <template slot-scope="scope">
32
+            <span>{{scope.row.inflow_pass}}</span>
33
+         </template>
34
+      </el-table-column>
35
+      <el-table-column prop="date" label="首次启用日期" width="120" align="center">
36
+          <template slot-scope="scope">
37
+            <span>{{ getTime(scope.row.first_start_time, "{y}-{m}-{d}")}}</span>
38
+          </template>
39
+      </el-table-column>
40
+      <el-table-column prop="date" label="默认到处方" align="center" width="100">
41
+          <template slot-scope="scope">
42
+             <span v-if="scope.row.user_status == 1">启用</span>
43
+             <span v-if="scope.row.user_status == 2">停用</span>
44
+          </template>
45
+      </el-table-column>
46
+       <el-table-column prop="date" label="停用日期" align="center" width="100">
47
+          <template slot-scope="scope">
48
+            <span v-if="scope.row.stop_time>0">{{ getTime(scope.row.stop_time, "{y}-{m}-{d}")}}</span>
49
+             <span v-if="scope.row.stop_time<0"></span>
50
+          </template>
51
+      </el-table-column>
52
+       <el-table-column prop="date" label="停用原因" align="center" width="120">
53
+          <template slot-scope="scope">
54
+             <span>{{scope.row.stop_reason}}</span>
55
+          </template>
56
+      </el-table-column>
57
+       <el-table-column prop="date" label="使用寿命(天)" align="center" width="120">
58
+          <template slot-scope="scope">
59
+           <span v-if="scope.row.stop_time>0&&(scope.row.stop_time - scope.row.start_time)/86400 == 0"></span> 
60
+           <span v-if="scope.row.stop_time>0&&(scope.row.stop_time - scope.row.start_time)/86400 != 0">{{(scope.row.stop_time - scope.row.start_time)/86400}}</span>
61
+          </template>
62
+      </el-table-column>
63
+       <el-table-column prop="date" label="备注" align="center" width="180">
64
+          <template slot-scope="scope">
65
+             <span>{{scope.row.remark}}</span>
66
+          </template>
67
+      </el-table-column>
68
+      <el-table-column prop="date" label="创始人" align="center" width="100">
69
+          <template slot-scope="scope">
70
+            <span>{{getDoctor(scope.row.creator)}}</span>
71
+          </template>
72
+      </el-table-column>
73
+       <el-table-column prop="date" fixed="right" label="操作" width="140" align="center">
74
+          <template slot-scope="scope">
75
+             <el-tooltip class="item" effect="dark" content="编辑" placement="top">
76
+               <el-button
77
+                  type="primary"
78
+                  size="small"
79
+                  icon="el-icon-edit-outline"
80
+                 
81
+                  @click="handleUpdateAdviceTemplate(scope.row.id)"
82
+                  >
83
+               </el-button>
84
+             </el-tooltip>
85
+              <el-tooltip class="item" effect="dark" content="删除" placement="top">
86
+                 <el-button
87
+                  size="small"
88
+                  type="danger"
89
+                  icon="el-icon-delete"
90
+                  @click="handleDeleteAdviceTemplate(scope.row.id, scope.$index)"
91
+                  >
92
+                 </el-button>
93
+              </el-tooltip>
94
+           </template>
95
+      </el-table-column>
96
+  </el-table>
97
+    <el-pagination
98
+        @size-change="handleSizeChange"
99
+        @current-change="handleCurrentChange"
100
+        :page-sizes="[10,20,50,100]"
101
+        :page-size="10"
102
+        background
103
+        style="margin-top:20px;"
104
+        align="right"
105
+        layout="total, sizes, prev, pager, next, jumper"
106
+        :total="total"></el-pagination>
107
+
108
+     <el-dialog
109
+         title="新增通路"
110
+         :visible.sync="dialogVisible"
111
+         width="60%"
112
+         center>
113
+      <el-form label-width="120px" :model="form" ref="form" :rules="rules" >
114
+         <el-row :gutter="24">
115
+            <el-col :span="24">
116
+                <el-form-item label="通路项目:" :required="true" prop="access_project">
117
+                    <el-radio v-model="form.access_project" label="1">内瘘</el-radio>
118
+                    <el-radio v-model="form.access_project" label="2">导管</el-radio>
119
+                </el-form-item>
120
+            </el-col>
121
+         </el-row>
122
+         <el-row :gutter="24">
123
+            <el-col :span="8">
124
+               <el-form-item label="建立日期:" :required="true" prop="start_time">
125
+                 <el-date-picker
126
+                    type="datetime"
127
+                    format="yyyy-MM-dd"
128
+                    value-format="yyyy-MM-dd"
129
+                    placeholder="选择时间"
130
+                    v-model="form.start_time"
131
+                    style="width:150px">
132
+                 </el-date-picker>
133
+               </el-form-item>
134
+            </el-col>
135
+             <el-col :span="8">
136
+               <el-form-item label="血管通路类型:" :required="true" prop="blood_access_part_opera_id">
137
+                 <el-select v-model="form.blood_access_part_opera_id" placeholder="请选择"  style="width:150px">
138
+                    <el-option
139
+                        v-for="item in blood_access_part_opera"
140
+                        :key="item.id"
141
+                        :label="item.name"
142
+                        :value="item.id"
143
+                        >
144
+                    </el-option>
145
+                  </el-select>
146
+               </el-form-item>
147
+            </el-col>
148
+             <el-col :span="8">
149
+               <el-form-item label="血管通路部位:" :required="true" prop="blood_access_part_id">
150
+                  <el-input v-model="form.blood_access_part_id" readonly @focus="showInnerDialog('17')" style="width:150px"></el-input>
151
+               </el-form-item>
152
+            </el-col>
153
+         </el-row>
154
+          <el-row :gutter="24">
155
+            <el-col :span="8">
156
+               <el-form-item label="流入-流出道:" :required="true" prop="inflow_pass">
157
+                 <el-select v-model="form.inflow_pass" placeholder="请选择" style="width:150px">
158
+                    <el-option
159
+                        v-for="item in optionsPass"
160
+                        :key="item.id"
161
+                        :label="item.name"
162
+                        :value="item.id">
163
+                    </el-option>
164
+                  </el-select>
165
+               </el-form-item>
166
+            </el-col>
167
+             <el-col :span="8">
168
+               <el-form-item label="首次启用日期:" :required="true" prop="first_start_time">
169
+                  <el-date-picker
170
+                    type="datetime"
171
+                    format="yyyy-MM-dd"
172
+                    value-format="yyyy-MM-dd"
173
+                    placeholder="选择时间"
174
+                    v-model="form.first_start_time"
175
+                    style="width:150px">
176
+                 </el-date-picker>
177
+               </el-form-item>
178
+            </el-col>
179
+             <el-col :span="8">
180
+               <el-form-item label="使用状态:" :required="true" prop="user_status">
181
+                 <el-select v-model="form.user_status" placeholder="请选择" style="width:150px" @change="changeStatus">
182
+                    <el-option
183
+                        v-for="item in options"
184
+                        :key="item.id"
185
+                        :label="item.name"
186
+                        :value="item.id">
187
+                    </el-option>
188
+                  </el-select>
189
+               </el-form-item>
190
+            </el-col>
191
+         </el-row>
192
+         <el-row v-show="show">
193
+            <el-col :span="8">
194
+               <el-form-item label="停用日期:">
195
+                  <el-date-picker
196
+                    type="datetime"
197
+                    format="yyyy-MM-dd"
198
+                    value-format="yyyy-MM-dd"
199
+                    placeholder="选择时间"
200
+                    v-model="form.stop_time"
201
+                    style="width:150px">
202
+                 </el-date-picker>
203
+               </el-form-item>
204
+            </el-col>
205
+         </el-row>
206
+         <el-row v-show="show">
207
+           <el-col>
208
+            <el-form-item label="停用原因:">
209
+               <el-input v-model="form.stop_reason"></el-input>
210
+            </el-form-item>
211
+           </el-col>  
212
+         </el-row>
213
+           <el-row>
214
+            <el-col>
215
+                <el-form-item label="备注:">
216
+                 <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
217
+                </el-form-item>
218
+            </el-col>  
219
+         </el-row>
220
+      </el-form>
221
+
222
+     <span slot="footer" class="dialog-footer">
223
+        <el-button @click="dialogVisible = false">取 消</el-button>
224
+        <el-button type="primary" @click="saveVasularAccess('form')">保存</el-button>
225
+     </span>
226
+     </el-dialog>
227
+
228
+
229
+
230
+      <el-dialog
231
+         title="编辑通路"
232
+         :visible.sync="editDialogVisible"
233
+         width="60%"
234
+         center>
235
+      <el-form label-width="120px" :model="form" ref="form" :rules="rules" >
236
+         <el-row :gutter="24">
237
+            <el-col :span="24">
238
+                <el-form-item label="通路项目:" :required="true" prop="access_project">
239
+                    <el-radio v-model="form.access_project" label="1">内瘘</el-radio>
240
+                    <el-radio v-model="form.access_project" label="2">导管</el-radio>
241
+                </el-form-item>
242
+            </el-col>
243
+         </el-row>
244
+         <el-row :gutter="24">
245
+            <el-col :span="8">
246
+               <el-form-item label="建立日期:" :required="true" prop="start_time">
247
+                 <el-date-picker
248
+                    type="datetime"
249
+                    format="yyyy-MM-dd"
250
+                    value-format="yyyy-MM-dd"
251
+                    placeholder="选择时间"
252
+                    v-model="form.start_time"
253
+                    style="width:150px">
254
+                 </el-date-picker>
255
+               </el-form-item>
256
+            </el-col>
257
+             <el-col :span="8">
258
+               <el-form-item label="血管通路类型:" :required="true" prop="blood_access_part_opera_id">
259
+                 <el-select v-model="form.blood_access_part_opera_id" placeholder="请选择"  style="width:150px">
260
+                    <el-option
261
+                        v-for="item in blood_access_part_opera"
262
+                        :key="item.id"
263
+                        :label="item.name"
264
+                        :value="item.id"
265
+                        >
266
+                    </el-option>
267
+                  </el-select>
268
+               </el-form-item>
269
+            </el-col>
270
+             <el-col :span="8">
271
+               <el-form-item label="血管通路部位:" :required="true" prop="blood_access_part_id">
272
+                 <!-- <el-select v-model="form.blood_access_part_id" placeholder="请选择" style="width:150px">
273
+                    <el-option
274
+                        v-for="item in blood_access_part"
275
+                        :key="item.id"
276
+                        :label="item.name"
277
+                        :value="item.id">
278
+                    </el-option>
279
+                  </el-select> -->
280
+
281
+                   <el-input v-model="form.blood_access_part_id" readonly @focus="showInnerDialog('17')" style="width:150px"></el-input>
282
+               </el-form-item>
283
+            </el-col>
284
+         </el-row>
285
+          <el-row :gutter="24">
286
+            <el-col :span="8">
287
+               <el-form-item label="流入-流出道:" :required="true" prop="inflow_pass">
288
+                 <el-select v-model="form.inflow_pass" placeholder="请选择" style="width:150px">
289
+                    <el-option
290
+                        v-for="item in optionsPass"
291
+                        :key="item.id"
292
+                        :label="item.name"
293
+                        :value="item.id">
294
+                    </el-option>
295
+                  </el-select>
296
+               </el-form-item>
297
+            </el-col>
298
+             <el-col :span="8">
299
+               <el-form-item label="首次启用日期:" :required="true" prop="first_start_time">
300
+                  <el-date-picker
301
+                    type="datetime"
302
+                    format="yyyy-MM-dd"
303
+                    value-format="yyyy-MM-dd"
304
+                    placeholder="选择时间"
305
+                    v-model="form.first_start_time"
306
+                    style="width:150px">
307
+                 </el-date-picker>
308
+               </el-form-item>
309
+            </el-col>
310
+             <el-col :span="8">
311
+               <el-form-item label="使用状态:" :required="true" prop="user_status">
312
+                 <el-select v-model="form.user_status" placeholder="请选择" style="width:150px" @change="changeStatus">
313
+                    <el-option
314
+                        v-for="item in options"
315
+                        :key="item.id"
316
+                        :label="item.name"
317
+                        :value="item.id">
318
+                    </el-option>
319
+                  </el-select>
320
+               </el-form-item>
321
+            </el-col>
322
+         </el-row>
323
+         <el-row v-show="show">
324
+            <el-col :span="8">
325
+               <el-form-item label="停用日期:">
326
+                  <el-date-picker
327
+                    type="datetime"
328
+                    format="yyyy-MM-dd"
329
+                    value-format="yyyy-MM-dd"
330
+                    placeholder="选择时间"
331
+                    v-model="form.stop_time"
332
+                    style="width:150px">
333
+                 </el-date-picker>
334
+               </el-form-item>
335
+            </el-col>
336
+         </el-row>
337
+         <el-row v-show="show">
338
+           <el-col>
339
+            <el-form-item label="停用原因:">
340
+               <el-input v-model="form.stop_reason"></el-input>
341
+            </el-form-item>
342
+           </el-col>  
343
+         </el-row>
344
+           <el-row>
345
+            <el-col>
346
+                <el-form-item label="备注:">
347
+                 <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
348
+                </el-form-item>
349
+            </el-col>  
350
+         </el-row>
351
+      </el-form>
352
+
353
+     <span slot="footer" class="dialog-footer">
354
+        <el-button @click="editDialogVisible= false">取 消</el-button>
355
+        <el-button type="primary" @click="updatedVasularAccess('form')">保存</el-button>
356
+     </span>
357
+     </el-dialog>
358
+
359
+    </div>
360
+
361
+     <multi-select-box
362
+        :propsForm="InnerDialogProps"
363
+        v-on:dialog-comfirm="innerDialogComfirm"
364
+        v-on:dialog-cancle="innerDialogCancle"
365
+      ></multi-select-box>
366
+  </div>
367
+</template>
368
+<script>
369
+  const moment = require('moment')
370
+  import PatientSidebar from './components/PatientSidebar'
371
+  import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
372
+  import { saveVasularAccess,getAllVascularAccessList,getVascularAccessByDetail,updatedVasularAccess,DeleteVascularAccess } from '@/api/patient'
373
+
374
+  import { jsGetAge, uParseTime } from '@/utils/tools'
375
+  import { getDataConfig } from '@/utils/data'
376
+  import multiSelectBox from '../dialysis/details/dialog/MultiSelectBox'
377
+    
378
+  export default {
379
+    name: 'doctorAdvice',
380
+    components: {
381
+      PatientSidebar,
382
+      multiSelectBox
383
+    },
384
+    data() {
385
+      return {
386
+        tableData: [],
387
+        nowtime: moment(new Date()).format('YYYY-MM-DD'),
388
+        page: 1,
389
+        limit: 10,
390
+        total: 0,
391
+        rules: {
392
+          start_time: [{ required: true, message: '请输入建立日期' }],
393
+          access_project: [{ required: true, message: '请选择通路项目' }],
394
+          blood_access_part_opera_id:[{required:true,message:'请选择血管通路类型'}],
395
+          blood_access_part_id:[{required:true,message:"请选择血管通路"}],
396
+          inflow_pass:[{required:true,message:"请选择流入-流出道"}],
397
+          first_start_time:[{required:true,message:"请选择首次启用日期"}],
398
+          user_status:[{required:true,message:"请选择使用状态"}]
399
+        },
400
+        dialogVisible:false,
401
+        editDialogVisible:false,
402
+        form:{
403
+         id:0,
404
+         access_project:"1",
405
+         blood_access_part_id:"",
406
+         blood_access_part_opera_id:"",
407
+         inflow_pass:"",
408
+         start_time:moment(new Date()).format('YYYY-MM-DD'),
409
+         first_start_time:moment(new Date()).format('YYYY-MM-DD'),
410
+         stop_reason:"",
411
+         user_status:1,
412
+         remark:"",
413
+         stop_time:"",
414
+        },
415
+        options:[
416
+         {id:1,name:"启用"},
417
+         {id:2,name:"停用"}
418
+        ],
419
+        optionsPass:[
420
+          {id:1,name:"流入-动脉"},
421
+          {id:2,name:"流出-静脉"},
422
+        ],
423
+        blood_access_part_opera:[],
424
+        blood_access_part:[],
425
+        show:false,
426
+        doctorList:[],
427
+        InnerDialogProps: {
428
+          values: [],
429
+          visibility: false,
430
+          isShowTextArea: true,
431
+          customContent: '',
432
+          titles: '',
433
+          type: '' // 不同弹框类型,用来匹配数据
434
+        },
435
+      }
436
+    },
437
+    methods: {
438
+      clickuseradvicecell(row, column, cell, event) {
439
+      },
440
+      onTranPatient: function(tranPatient) {
441
+        this.currentPatient = tranPatient
442
+      },
443
+      CreateTime(time) {
444
+        return uParseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
445
+      },
446
+   
447
+     
448
+    
449
+     
450
+      handleSizeChange(limit) {
451
+        this.limit = limit
452
+        this.getlist()
453
+      },
454
+      handleCurrentChange(page) {
455
+        this.page = page
456
+      
457
+        this.getlist()
458
+      },
459
+      changeStatus(val){
460
+        if(val == 1 ){
461
+          this.show = false
462
+        }
463
+        if(val == 2){
464
+          this.show = true
465
+        }
466
+      },
467
+      saveVasularAccess(formName){
468
+         this.$refs[formName].validate((valid)=>{
469
+           if(valid){
470
+              var blood_name = ""
471
+              for(let i=0;i<this.blood_access_part_opera.length;i++){
472
+                 if(this.blood_access_part_opera[i].id == this.form.blood_access_part_opera_id){
473
+                     blood_name = this.blood_access_part_opera[i].name
474
+                 }
475
+              }
476
+              var inflow_pass = ""
477
+              for(let i=0;i<this.optionsPass.length;i++){
478
+                 if(this.optionsPass[i].id == this.form.inflow_pass){
479
+                     inflow_pass = this.optionsPass[i].name
480
+                 }
481
+              }
482
+              console.log("params",this.form.blood_access_part_id)
483
+              
484
+              var params = {
485
+                patient_id:this.patientID,
486
+                access_project:parseInt(this.form.access_project),
487
+                start_time:this.form.start_time,
488
+                blood_access_part_opera_id:blood_name,
489
+                blood_access_part_id:this.form.blood_access_part_id,
490
+                inflow_pass:inflow_pass,
491
+                first_start_time:this.form.first_start_time,
492
+                user_status:this.form.user_status,
493
+                stop_reason:this.form.stop_reason,
494
+                remark:this.form.remark,
495
+                stop_time:this.form.stop_time
496
+              }
497
+              console.log("params",params)
498
+             saveVasularAccess(params).then(response=>{
499
+                if(response.data.state == 1){
500
+                   var access =  response.data.data.access
501
+                   console.log("access",access)
502
+                   this.$message.success("保存成功")
503
+                   this.dialogVisible = false
504
+                   this.getlist()
505
+                   this.form.blood_access_part_opera_id=""
506
+                   this.form.blood_access_part_id = ""
507
+                   this.inflow_pass = ""
508
+                   this.user_status = ""
509
+                   this.stop_reason = ""
510
+                   this.remark = ""
511
+                }
512
+             })
513
+           }  
514
+         })
515
+      },
516
+      getlist(){
517
+         var params = {
518
+               page:this.page,
519
+               limit:this.limit,
520
+               patient_id:this.patientID,
521
+           }
522
+        getAllVascularAccessList(params).then(response=>{
523
+           if(response.data.state == 1){
524
+             var list =  response.data.data.list
525
+             console.log("list",list)
526
+             this.tableData = list
527
+             var total = response.data.data.total
528
+             console.log("total",total)
529
+             this.total = total
530
+             var doctor = response.data.data.doctor
531
+             console.log("doctor",doctor)
532
+             this.doctorList = doctor
533
+           }  
534
+        })   
535
+      },
536
+     getTime(value, temp) {
537
+        if (value != undefined) {
538
+            return uParseTime(value, temp);
539
+        }
540
+        return "";
541
+     },
542
+     handleUpdateAdviceTemplate(id){
543
+        getVascularAccessByDetail(id).then(response=>{
544
+           if(response.data.state ==1){
545
+             var accessDetail =  response.data.data.accessDetail
546
+             console.log("accessDetail",accessDetail)
547
+             this.form.id = accessDetail.id
548
+             this.form.access_project = accessDetail.access_project.toString()
549
+             
550
+            
551
+
552
+             this.form.blood_access_part_id = accessDetail.blood_access_part_id
553
+             
554
+              var blood_part = 0
555
+              for(let i=0;i<this.blood_access_part_opera.length;i++){
556
+                 if(accessDetail.blood_access_part_opera_id == this.blood_access_part_opera[i].name){
557
+                    blood_part = this.blood_access_part_opera[i].id
558
+                 }
559
+              }
560
+             this.form.blood_access_part_opera_id = blood_part
561
+             this.form.first_start_time = this.getTime(accessDetail.first_start_time,"{y}-{m}-{d}")
562
+
563
+             var inflow_id = 0
564
+             for(let i=0;i<this.optionsPass.length;i++){
565
+               if(this.optionsPass[i].name == accessDetail.inflow_pass){
566
+                  inflow_id = this.optionsPass[i].id
567
+               }
568
+             }
569
+             this.form.inflow_pass = inflow_id
570
+             this.form.remark = accessDetail.remark
571
+             this.form.start_time = this.getTime(accessDetail.start_time,"{y}-{m}-{d}")
572
+             this.form.stop_reason = accessDetail.stop_reason
573
+             this.form.stop_time = this.getTime(accessDetail.stop_time,"{y}-{m}-{d}")
574
+
575
+             this.form.user_status = accessDetail.user_status
576
+             if(accessDetail.user_status == 1){
577
+               this.show = false
578
+             }
579
+             if(accessDetail.user_status == 2){
580
+               this.show = true
581
+             }
582
+             this.editDialogVisible = true
583
+           }
584
+        }) 
585
+     },
586
+     getDoctor(id){
587
+       var name = ""
588
+       for(let i=0;i<this.doctorList.length;i++){
589
+          if(id == this.doctorList[i].admin_user_id){
590
+             name = this.doctorList[i].user_name
591
+          }
592
+       }
593
+       return name
594
+     },
595
+     handleDeleteAdviceTemplate(id,index){
596
+       this.$confirm("确认删除吗?", "删除", {
597
+        confirmButtonText: "确 定",
598
+        cancelButtonText: "取 消",
599
+        type: "warning"
600
+      })
601
+        .then(() => {
602
+          DeleteVascularAccess(id).then(response => {
603
+            if(response.data.state == 1){
604
+              var msg = response.data.data.msg
605
+              this.tableData.splice(index, 1);
606
+              this.$message.success("删除成功!")
607
+            }
608
+             
609
+            
610
+          });
611
+        })
612
+        .catch(() => {});
613
+     },
614
+     updatedVasularAccess(formName){
615
+        this.$refs[formName].validate((valid)=>{
616
+           if(valid){
617
+              var blood_name = ""
618
+              for(let i=0;i<this.blood_access_part_opera.length;i++){
619
+                 if(this.blood_access_part_opera[i].id == this.form.blood_access_part_opera_id){
620
+                     blood_name = this.blood_access_part_opera[i].name
621
+                 }
622
+              }
623
+            //   var blood_part = ""
624
+            //   for(let i=0;i<this.blood_access_part.length;i++){
625
+            //      if(this.form.blood_access_part_id == this.blood_access_part[i].id){
626
+            //         blood_part = this.blood_access_part[i].name
627
+            //      }
628
+            //   }
629
+              var inflow_pass = ""
630
+              for(let i=0;i<this.optionsPass.length;i++){
631
+                 if(this.optionsPass[i].id == this.form.inflow_pass){
632
+                     inflow_pass = this.optionsPass[i].name
633
+                 }
634
+              }
635
+              var params = {
636
+                id:this.form.id,
637
+                patient_id:this.patientID,
638
+                access_project:parseInt(this.form.access_project),
639
+                start_time:this.form.start_time,
640
+                blood_access_part_opera_id:blood_name,
641
+                blood_access_part_id:this.form.blood_access_part_id,
642
+                inflow_pass:inflow_pass,
643
+                first_start_time:this.form.first_start_time,
644
+                user_status:this.form.user_status,
645
+                stop_reason:this.form.stop_reason,
646
+                remark:this.form.remark,
647
+                stop_time:this.form.stop_time
648
+              }
649
+              console.log("编辑",params)
650
+              updatedVasularAccess(params).then(response=>{
651
+                if(response.data.state == 1){
652
+                  var access =  response.data.data.access
653
+                  console.log("access",access)
654
+                  this.$message.success("保存成功")
655
+                  this.editDialogVisible = false
656
+                  this.getlist()
657
+                }
658
+              })
659
+           }
660
+        })
661
+     },
662
+     rowClick(row){
663
+       console.log("row",row)
664
+       this.$router.push({path:'/patients/patient/'+this.patientID+'/vascularAccessDetail/'+row.id})
665
+     },
666
+       showInnerDialog: function(val) {
667
+        this.InnerDialogProps.visibility = true
668
+        switch (val) {
669
+        
670
+          case '17': // 血管通路
671
+            this.InnerDialogProps.values = this.blood_access_part
672
+            this.InnerDialogProps.titles = '血管通路部位'
673
+            this.InnerDialogProps.type = 'blood_access_part_id'
674
+            this.InnerDialogProps.selected = this.form.blood_access_part_id
675
+            this.InnerDialogProps.isShowTextArea = false
676
+            break
677
+
678
+        
679
+        }
680
+      },
681
+       innerDialogComfirm: function(val) {
682
+         this.InnerDialogProps.visibility = false
683
+         switch (val.type) {
684
+           case 'blood_access_part_id':
685
+           this.form.blood_access_part_id = val.value.join(',')
686
+           break
687
+        }
688
+      },
689
+      innerDialogCancle: function() {
690
+        this.InnerDialogProps.visibility = false
691
+      },
692
+    },
693
+    created() {
694
+      const id = this.$route.params && this.$route.params.id
695
+      console.log('id是设么', id)
696
+      this.patientID = parseInt(id)
697
+      
698
+      //血管通路
699
+      this.blood_access_part_opera = getDataConfig('hemodialysis', 'vascular_access_desc')
700
+      console.log("血管通路",this.blood_access_part_opera)
701
+      //血管通路部位
702
+      this.blood_access_part = getDataConfig('hemodialysis', 'vascular_access')
703
+      console.log("血管通路部位",this.blood_access_part)
704
+      this.getlist()
705
+    }
706
+  }
707
+</script>
708
+
709
+<style>
710
+  .oictable ::-webkit-scrollbar {
711
+    height: 15px;
712
+  }
713
+</style>
714
+
715
+<style rel="stylesheet/scss" lang="scss">
716
+   ::-webkit-scrollbar{
717
+      height:15px;
718
+   }
719
+
720
+</style>
721
+

+ 425 - 0
src/xt_pages/user/vascularAccessDetail.vue Wyświetl plik

@@ -0,0 +1,425 @@
1
+<template>
2
+  <div class="patient-container">
3
+    <patient-sidebar :id="patientID" defaultActive="1-6" v-on:tran-patient="onTranPatient"></patient-sidebar>
4
+    <div class="patient-app-container advice-container app-container">
5
+      <div style="display:flex;justify-content: space-between;align-items: center;margin-bottom: 12px;">
6
+         <span style="font-weight:bold;">通路详情</span>
7
+         <el-button size="medium" type="primary" @click="dialogVisible =true" style="margin-left:800px" >新增</el-button>
8
+      </div>
9
+      <div class="cell clearfix">
10
+         <span>启用日期:{{getTime(start_time,"{y}-{m}-{d}")}} &nbsp; 血管通路类型:{{blood_access_part_opera_id}}</span> 
11
+      </div>
12
+      <el-table  :data="tableData" border style="width:100%" >
13
+      <el-table-column  prop="start_time"   label="日期"  width="150"    align="center">
14
+          <template  slot-scope="scope">
15
+            <span>{{getTime(scope.row.start_time,"{y}-{m}-{d}")}}</span>
16
+          </template>
17
+     </el-table-column>
18
+      <el-table-column   prop="blood_access_part_opera_id" label="项目"   align="center" width="200">
19
+        <template slot-scope="scope">
20
+           <span>{{scope.row.blood_project}}</span>  
21
+        </template>
22
+     </el-table-column>
23
+      <el-table-column     prop="inflow_pass"    label="结果"    align="center">
24
+         <template slot-scope="scope">
25
+            <span>{{scope.row.blood_result}}</span>
26
+         </template>
27
+      </el-table-column>
28
+      <el-table-column     prop="date"    label="处理" width="120"     align="center">
29
+          <template slot-scope="scope">
30
+            <span>{{scope.row.blood_dealwith}}</span>
31
+          </template>
32
+      </el-table-column>
33
+      <el-table-column     prop="date"    label="评估人"      align="center">
34
+          <template slot-scope="scope">
35
+           {{getDoctor(scope.row.creator)}}
36
+          </template>
37
+      </el-table-column>
38
+  
39
+       <el-table-column   prop="date"  label="操作" width="140" align="center">
40
+          <template slot-scope="scope">
41
+             <el-tooltip class="item" effect="dark" content="编辑" placement="top">
42
+               <el-button
43
+                  type="primary"
44
+                  size="small"
45
+                  icon="el-icon-edit-outline"
46
+                 
47
+                  @click="handleUpdateAdviceTemplate(scope.row.id)"
48
+                  >
49
+               </el-button>
50
+             </el-tooltip>
51
+              <el-tooltip class="item" effect="dark" content="删除" placement="top">
52
+                 <el-button
53
+                  size="small"
54
+                  type="danger"
55
+                  icon="el-icon-delete"
56
+                  @click="handleDeleteAdviceTemplate(scope.row.id, scope.$index)"
57
+                  >
58
+                 </el-button>
59
+              </el-tooltip>
60
+           </template>
61
+      </el-table-column>
62
+  </el-table>
63
+    <el-pagination
64
+        @size-change="handleSizeChange"
65
+        @current-change="handleCurrentChange"
66
+        :page-sizes="[10,20,50,100]"
67
+        :page-size="10"
68
+        background
69
+        style="margin-top:20px;"
70
+        align="right"
71
+        layout="total, sizes, prev, pager, next, jumper"
72
+        :total="total"></el-pagination>
73
+
74
+     <el-dialog
75
+         title="新增通路评估"
76
+         :visible.sync="dialogVisible"
77
+         width="60%"
78
+         center>
79
+      <el-form label-width="120px" :model="form" ref="form" :rules="rules" >
80
+         <el-row :gutter="24">
81
+            <el-col :span="8">
82
+               <el-form-item label="建立日期:" :required="true" prop="start_time">
83
+                 <el-date-picker
84
+                    type="datetime"
85
+                    format="yyyy-MM-dd"
86
+                    value-format="yyyy-MM-dd"
87
+                    placeholder="选择时间"
88
+                    v-model="form.start_time"
89
+                    style="width:150px">
90
+                 </el-date-picker>
91
+               </el-form-item>
92
+            </el-col>
93
+             <el-col :span="8">
94
+               <el-form-item label="评估人:" :required="true" prop="creator">
95
+                 <el-select v-model="form.creator" placeholder="请选择"  style="width:150px">
96
+                    <el-option
97
+                        v-for="item in doctorList"
98
+                        :key="item.admin_user_id"
99
+                        :label="item.user_name"
100
+                        :value="item.admin_user_id"
101
+                        >
102
+                    </el-option>
103
+                  </el-select>
104
+               </el-form-item>
105
+            </el-col>
106
+         </el-row>
107
+       
108
+         <el-row>
109
+            <el-col>
110
+                <el-form-item label="项目:">
111
+                 <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.blood_project"></el-input>
112
+                </el-form-item>
113
+            </el-col>  
114
+         </el-row>
115
+          <el-row>
116
+            <el-col>
117
+                <el-form-item label="结果:">
118
+                 <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.blood_result"></el-input>
119
+                </el-form-item>
120
+            </el-col>  
121
+         </el-row>
122
+         <el-row>
123
+            <el-col>
124
+                <el-form-item label="处理:">
125
+                 <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.blood_dealwith"></el-input>
126
+                </el-form-item>
127
+            </el-col>  
128
+         </el-row>
129
+      </el-form>
130
+
131
+     <span slot="footer" class="dialog-footer">
132
+        <el-button @click="dialogVisible = false">取 消</el-button>
133
+        <el-button type="primary" @click="savePasswayAssessment('form')">保存</el-button>
134
+     </span>
135
+     </el-dialog>
136
+
137
+     
138
+       <el-dialog
139
+         title="编辑通路评估"
140
+         :visible.sync="editDialogVisible"
141
+         width="60%"
142
+         center>
143
+      <el-form label-width="120px" :model="form" ref="form" :rules="rules" >
144
+         <el-row :gutter="24">
145
+            <el-col :span="8">
146
+               <el-form-item label="建立日期:" :required="true" prop="start_time">
147
+                 <el-date-picker
148
+                    type="datetime"
149
+                    format="yyyy-MM-dd"
150
+                    value-format="yyyy-MM-dd"
151
+                    placeholder="选择时间"
152
+                    v-model="form.start_time"
153
+                    style="width:150px">
154
+                 </el-date-picker>
155
+               </el-form-item>
156
+            </el-col>
157
+             <el-col :span="8">
158
+               <el-form-item label="评估人:" :required="true" prop="creator">
159
+                 <el-select v-model="form.creator" placeholder="请选择"  style="width:150px">
160
+                    <el-option
161
+                        v-for="item in doctorList"
162
+                        :key="item.admin_user_id"
163
+                        :label="item.user_name"
164
+                        :value="item.admin_user_id"
165
+                        >
166
+                    </el-option>
167
+                  </el-select>
168
+               </el-form-item>
169
+            </el-col>
170
+         </el-row>
171
+       
172
+         <el-row>
173
+            <el-col>
174
+                <el-form-item label="项目:">
175
+                 <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.blood_project"></el-input>
176
+                </el-form-item>
177
+            </el-col>  
178
+         </el-row>
179
+          <el-row>
180
+            <el-col>
181
+                <el-form-item label="结果:">
182
+                 <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.blood_result"></el-input>
183
+                </el-form-item>
184
+            </el-col>  
185
+         </el-row>
186
+         <el-row>
187
+            <el-col>
188
+                <el-form-item label="处理:">
189
+                 <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.blood_dealwith"></el-input>
190
+                </el-form-item>
191
+            </el-col>  
192
+         </el-row>
193
+      </el-form>
194
+
195
+     <span slot="footer" class="dialog-footer">
196
+        <el-button @click="editDialogVisible = false">取 消</el-button>
197
+        <el-button type="primary" @click="updatePasswayAssessment('form')">保存</el-button>
198
+     </span>
199
+     </el-dialog>
200
+
201
+      
202
+
203
+    </div>
204
+
205
+     
206
+  </div>
207
+</template>
208
+<script>
209
+  const moment = require('moment')
210
+  import PatientSidebar from './components/PatientSidebar'
211
+  import {getVascularAccessByDetail,savePasswayAssessment,getAllPassWayAssessmentList,getPassWayAssessmentById,updatePasswayAssessment,DeletePassWayAssessMent} from '@/api/patient'
212
+  import { uParseTime } from '@/utils/tools'
213
+  import { getDataConfig } from '@/utils/data'
214
+ 
215
+  export default {
216
+    name: 'doctorAdvice',
217
+    components: {
218
+      PatientSidebar,
219
+    },
220
+    data() {
221
+      return {
222
+        tableData: [],
223
+        nowtime: moment(new Date()).format('YYYY-MM-DD'),
224
+        page: 1,
225
+        limit: 10,
226
+        total: 0,
227
+        rules: {
228
+          start_time: [{ required: true, message: '请输入建立日期' }],
229
+          creator: [{ required: true, message: '请选择评估人' }],
230
+        },
231
+        dialogVisible:false,
232
+        editDialogVisible:false,
233
+        form:{
234
+         id:0,
235
+         start_time:moment(new Date()).format('YYYY-MM-DD'),
236
+         creator:this.$store.getters.xt_user.user.id,
237
+         blood_project:"",
238
+         blood_result:"",
239
+         blood_dealwith:"",
240
+        },
241
+        doctorList:[],
242
+        start_time:"",
243
+        blood_access_part_opera_id:"",
244
+        parent_id:"",
245
+        patientID:""
246
+      }
247
+    },
248
+    methods: {
249
+     clickuseradvicecell(row, column, cell, event) {
250
+      },
251
+      onTranPatient: function(tranPatient) {
252
+        this.currentPatient = tranPatient
253
+      },
254
+      handleSizeChange(limit) {
255
+        this.limit = limit
256
+        this.getlist()
257
+      },
258
+      handleCurrentChange(page) {
259
+        this.page = page
260
+      
261
+        this.getlist()
262
+      },
263
+   
264
+    
265
+    
266
+     getTime(value, temp) {
267
+        if (value != undefined) {
268
+            return uParseTime(value, temp);
269
+        }
270
+        return "";
271
+     },
272
+
273
+ 
274
+     getVascularAccessByDetail(id){
275
+        getVascularAccessByDetail(id).then(response=>{
276
+           if(response.data.state ==1){
277
+             var accessDetail =  response.data.data.accessDetail
278
+             console.log("accessDetail",accessDetail)
279
+             this.start_time = accessDetail.start_time
280
+             this.blood_access_part_opera_id = accessDetail.blood_access_part_opera_id
281
+             var doctor = response.data.data.doctor
282
+             console.log("意思",doctor)
283
+             this.doctorList = doctor
284
+           }
285
+        }) 
286
+     },
287
+     getDoctor(id){
288
+       var name = ""
289
+       for(let i=0;i<this.doctorList.length;i++){
290
+          if(id == this.doctorList[i].admin_user_id){
291
+             name = this.doctorList[i].user_name
292
+          }
293
+       }
294
+       return name
295
+     },
296
+     handleDeleteAdviceTemplate(id,index){
297
+       this.$confirm("确认删除吗?", "删除", {
298
+        confirmButtonText: "确 定",
299
+        cancelButtonText: "取 消",
300
+        type: "warning"
301
+      })
302
+        .then(() => {
303
+          DeletePassWayAssessMent(id).then(response => {
304
+            if(response.data.state == 1){
305
+              var msg = response.data.data.msg
306
+              this.tableData.splice(index, 1);
307
+              this.$message.success("删除成功!")
308
+            }
309
+             
310
+            
311
+          });
312
+        })
313
+        .catch(() => {});
314
+     },
315
+    savePasswayAssessment(formName){
316
+       this.$refs[formName].validate((valid)=>{
317
+          if(valid){
318
+              var params = {
319
+                start_time:this.form.start_time,
320
+                creator:this.form.creator,
321
+                blood_project:this.form.blood_project,
322
+                blood_result:this.form.blood_result,
323
+                blood_dealwith:this.form.blood_dealwith,
324
+                patient_id:this.patientID,
325
+                parent_id:this.parent_id,
326
+              }
327
+              console.log("parasm",params)
328
+            savePasswayAssessment(params).then(response=>{
329
+               if(response.data.state == 1){
330
+                 var assessment =  response.data.data.assessment
331
+                 console.log("assessment",assessment)
332
+                 this.form.blood_project = ""
333
+                 this.form.blood_result = ""
334
+                 this.form.blood_dealwith = ""
335
+                 this.dialogVisible = false
336
+                 this.$message.success("保存成功")
337
+                 this.getlist()
338
+               }
339
+            })
340
+          }
341
+       })
342
+    },
343
+    getlist(){
344
+        const params = {
345
+          parent_id:this.parent_id,
346
+          patient_id:this.patientID, 
347
+          page:this.page,
348
+          limit:this.limit,
349
+        }
350
+       getAllPassWayAssessmentList(params).then(response=>{
351
+          if(response.data.state == 1){
352
+             var list =  response.data.data.list
353
+             console.log("列表",list)
354
+             this.tableData = list
355
+             var total =  response.data.data.total
356
+             console.log("total",total)
357
+             this.total = total
358
+           }
359
+       }) 
360
+    },
361
+
362
+    handleUpdateAdviceTemplate(id){
363
+      console.log("id2222222",id)
364
+       getPassWayAssessmentById(id).then(response=>{
365
+           if(response.data.state == 1){
366
+              var assessment =  response.data.data.assessment
367
+              console.log("assesment",assessment)
368
+              this.editDialogVisible = true
369
+              this.form.id = assessment.id
370
+              this.form.start_time = this.getTime(assessment.start_time,"{y}-{m}-{d}")
371
+              this.form.creator = assessment.creator
372
+              this.form.blood_dealwith = assessment.blood_dealwith
373
+              this.form.blood_project = assessment.blood_project
374
+              this.form.blood_result = assessment.blood_result
375
+           }
376
+       })
377
+    },
378
+
379
+    updatePasswayAssessment(formName){
380
+       this.$refs[formName].validate((valid)=>{
381
+         if(valid){
382
+              var params = {
383
+                start_time:this.form.start_time,
384
+                creator:this.form.creator,
385
+                blood_project:this.form.blood_project,
386
+                blood_result:this.form.blood_result,
387
+                blood_dealwith:this.form.blood_dealwith,
388
+                id:this.form.id
389
+              }
390
+              console.log("parasm",params)  
391
+            updatePasswayAssessment(params).then(response=>{
392
+               if(response.data.state == 1){
393
+                  var assesment = response.data.data.assessment
394
+                  this.$message.success("保存成功")
395
+                  this.editDialogVisible = false
396
+                  this.getlist()
397
+               }
398
+            })
399
+         }
400
+       })
401
+    }
402
+   
403
+    },
404
+    created() {
405
+      const id = this.$route.params && this.$route.params.mid
406
+      this.patientID = parseInt(id)
407
+      const pid = this.$route.params&& this.$route.params.pid 
408
+      this.parent_id = parseInt(pid)
409
+      this.getVascularAccessByDetail(pid) 
410
+      this.getlist()
411
+    }
412
+  }
413
+</script>
414
+
415
+<style>
416
+  #oictable ::-webkit-scrollbar {
417
+    height: 15px;
418
+  }
419
+</style>
420
+
421
+<style rel="stylesheet/scss" lang="scss" scoped>
422
+   
423
+
424
+</style>
425
+