Explorar el Código

Merge remote-tracking branch 'origin/20230223_pc_vue_new_branch' into 20230223_pc_vue_new_branch

yq1 hace 9 meses
padre
commit
3b4fe05dee
Se han modificado 36 ficheros con 9524 adiciones y 479 borrados
  1. 2 1
      src/api/dialysis_record.js
  2. 10 0
      src/api/drug/drug.js
  3. 8 0
      src/router/modules/selfPreparedMedicine.js
  4. 2 2
      src/xt_pages/dialysis/batch_print/batch_print_order_seventyfive.vue
  5. 3 1
      src/xt_pages/dialysis/batch_print/batch_print_order_six.vue
  6. 1 1
      src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue
  7. 1 1
      src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue
  8. 7 8
      src/xt_pages/dialysis/details/dialog/computer_dialog.vue
  9. 88 0
      src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue
  10. 59 5
      src/xt_pages/dialysis/details/dialog/monitor_dialog.vue
  11. 6 2
      src/xt_pages/dialysis/details/dialysisMonitoring.vue
  12. 2 1
      src/xt_pages/dialysis/template/DialysisPrintOrderSeventy.vue
  13. 2 2
      src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue
  14. 13 10
      src/xt_pages/dialysis/template/DialysisPrintOrderThirtyNine.vue
  15. 25 21
      src/xt_pages/dialysis/template/DialysisPrintOrderseventyfive.vue
  16. 364 352
      src/xt_pages/hospitalStation/components/deskPrescription.vue
  17. 11 11
      src/xt_pages/hospitalStation/components/prescriptionTable.vue
  18. 18 18
      src/xt_pages/hospitalStation/doctorDesk.vue
  19. 9 3
      src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue
  20. 18 17
      src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue
  21. 305 0
      src/xt_pages/outpatientTool/PrescriptionSmmary.vue
  22. 866 0
      src/xt_pages/outpatientTool/components/pdetail.vue
  23. 576 0
      src/xt_pages/outpatientTool/components/pgather.vue
  24. 9 2
      src/xt_pages/qcd/indicatorControlAnalysis/components/office.vue
  25. 20 0
      src/xt_pages/stock/drugs/drugStockOutOrder.vue
  26. 20 2
      src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue
  27. 20 1
      src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue
  28. 1107 0
      src/xt_pages/stock/selfPreparedMedicine/addWarehouseInfo.vue
  29. 1208 0
      src/xt_pages/stock/selfPreparedMedicine/addWarehouseOut.vue
  30. 1101 0
      src/xt_pages/stock/selfPreparedMedicine/editWarehouseInfo.vue
  31. 0 0
      src/xt_pages/stock/selfPreparedMedicine/editWarehouseOut.vue
  32. 934 0
      src/xt_pages/stock/selfPreparedMedicine/warehouseInfo.vue
  33. 2655 0
      src/xt_pages/stock/selfPreparedMedicine/warehouseOut.vue
  34. 13 0
      src/xt_pages/stock/stockOutOrder.vue
  35. 23 17
      src/xt_pages/stock/stockOutOrderAdd.vue
  36. 18 1
      src/xt_pages/stock/stockOutOrderEdit.vue

+ 2 - 1
src/api/dialysis_record.js Ver fichero

@@ -47,7 +47,7 @@ export function editMonitor(patient_id, schedule_date, data, mode) {
47 47
   })
48 48
 }
49 49
 
50
-export function startDialysis(patient_id, schedule_date, nurse_id, bed_id, lood_drawing, puncture_nurse_id, start_time, schedual_type, mode, washpipe_nurse, change_nurse, difficult_puncture_nurse, new_fistula_nurse, blood_drawing, quality_nurse, puncture_needle, puncture_way, dialysis_dialyszers, dialysis_irrigation, blood_access_id, nuclein_date, schedule_remark, order_remark,catheter_operation,blood_flow_volume,dialysis_strainer) {
50
+export function startDialysis(dialysis_strainer,patient_id, schedule_date, nurse_id, bed_id, lood_drawing, puncture_nurse_id, start_time, schedual_type, mode, washpipe_nurse, change_nurse, difficult_puncture_nurse, new_fistula_nurse, blood_drawing, quality_nurse, puncture_needle, puncture_way, dialysis_dialyszers, dialysis_irrigation, blood_access_id, nuclein_date, schedule_remark, order_remark,catheter_operation,blood_flow_volume) {
51 51
   var params = {
52 52
     patient_id: patient_id,
53 53
     date: schedule_date,
@@ -76,6 +76,7 @@ export function startDialysis(patient_id, schedule_date, nurse_id, bed_id, lood_
76 76
     blood_flow_volume:blood_flow_volume,
77 77
     dialysis_strainer:dialysis_strainer,
78 78
   }
79
+  console.log("dialysis_strainer",dialysis_strainer)
79 80
   console.log('params', params)
80 81
   return request({
81 82
     url: '/api/dialysis/start_record',

+ 10 - 0
src/api/drug/drug.js Ver fichero

@@ -754,4 +754,14 @@ export function toCheckSelfWarehousingInfo(params){
754 754
     method:"get",
755 755
     params:params,
756 756
   })
757
+}
758
+
759
+
760
+export function postSelfDrugOutInfoWarehouse(){
761
+  
762
+  return request({
763
+    url:"/api/drug/postselfdrugwarehouse",
764
+    method:"Get",
765
+    params:params,
766
+  })
757 767
 }

+ 8 - 0
src/router/modules/selfPreparedMedicine.js Ver fichero

@@ -42,6 +42,14 @@ export default {
42 42
       meta: { title: '自备药出库', noCache: true }
43 43
 
44 44
     },
45
+    {
46
+      path: '/stock/selfwarehouse/out/add',
47
+      component: () => import('@/xt_pages/stock/selfPreparedMedicine/addWarehouseOut'),
48
+      name: 'SelfeditWarehouseOut',
49
+      meta: { title: '自备药出库', noCache: true },
50
+      hidden: true,
51
+      is_menu: false,
52
+    },
45 53
     {
46 54
       path: '/stock/selfstockquery',
47 55
       component: () => import('@/xt_pages/stock/selfPreparedMedicine/stockquery'),

+ 2 - 2
src/xt_pages/dialysis/batch_print/batch_print_order_seventyfive.vue Ver fichero

@@ -151,9 +151,9 @@
151 151
                     white-space: normal;
152 152
                   "
153 153
                 >
154
-                {{ record.dialysis_order.dialysis_dialyszers ?  record.dialysis_order.dialysis_dialyszers : "/"}}
154
+                <span v-if="record.dialysis_order.dialysis_dialyszers!=''&& record.dialysis_order.dialysis_dialyszers!=0" > {{ record.dialysis_order.dialysis_dialyszers ?  record.dialysis_order.dialysis_dialyszers : "/"}}</span>
155 155
 
156
-                <span v-if="record.dialysis_order.dialysis_strainer!=''"> /{{ record.dialysis_order.dialysis_strainer ?  record.dialysis_order.dialysis_strainer : ""}}</span>
156
+                <span v-if="record.dialysis_order.dialysis_strainer!='' && record.dialysis_order.dialysis_strainer!=0"> /{{ record.dialysis_order.dialysis_strainer ?  record.dialysis_order.dialysis_strainer : ""}}</span>
157 157
                 </div>
158 158
               </div>
159 159
               <div class="inline_block" style="flex: 1;" >

+ 3 - 1
src/xt_pages/dialysis/batch_print/batch_print_order_six.vue Ver fichero

@@ -1644,7 +1644,9 @@
1644 1644
                             "
1645 1645
                             width="50"
1646 1646
                           >
1647
-                            置换量<br />(ml)
1647
+                            置换量<br />
1648
+                            <span v-if="org_id!=10598 && org_id!=10567">(ml)</span>
1649
+                            <span v-if="org_id==10598 || org_id == 10567">L</span>
1648 1650
                           </td>
1649 1651
                           <td v-if="org_id == 3877  || org_id == 10449" width="50">滤前压(mmHg)</td>
1650 1652
                           <td

+ 1 - 1
src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue Ver fichero

@@ -30,7 +30,7 @@
30 30
           <el-col :span="8" v-if="isShow('实际超滤量')">
31 31
             <el-form-item
32 32
               label="实际超滤量(ml): " :prop="isName('实际超滤量')" :rules="isCheckmust('实际超滤量')"
33
-              v-if=" this.template_id == 6 || this.template_id == 9 || this.template_id == 10 || this.template_id == 11  || this.template_id == 17 || this.template_id == 20 || this.template_id == 21 || this.template_id == 22 || this.template_id == 23 || this.template_id == 24 || this.template_id == 26 || this.template_id == 28 || this.template_id == 27 || this.template_id == 29 || this.template_id == 30 || this.template_id == 31 || this.template_id == 32 || this.template_id == 34 || this.template_id == 36 || this.template_id == 38 || this.template_id == 43 || this.template_id == 44 || this.template_id == 47 || this.template_id == 56 || this.template_id == 60 || this.$store.getters.xt_user.template_info.org_id == 10307 || this.$store.getters.xt_user.template_info.org_id == 10340 || this.$store.getters.xt_user.template_info.org_id == 9555 || this.$store.getters.xt_user.template_info.org_id == 10387 || this.$store.getters.xt_user.template_info.org_id == 10430 || this.$store.getters.xt_user.template_info.org_id == 10432 || this.$store.getters.xt_user.template_info.org_id == 10441 || this.$store.getters.xt_user.template_info.org_id == 10445 || this.$store.getters.xt_user.template_info.org_id == 10410 || this.$store.getters.xt_user.template_info.org_id == 10495 || this.$store.getters.xt_user.template_info.org_id == 10558 || this.$store.getters.xt_user.template_info.org_id == 10597 || this.$store.getters.xt_user.template_info.org_id == 10599 || this.$store.getters.xt_user.template_info.org_id == 10612 || this.$store.getters.xt_user.template_info.org_id == 10617"  >
33
+              v-if=" this.template_id == 6 || this.template_id == 9 || this.template_id == 10 || this.template_id == 11  || this.template_id == 17 || this.template_id == 20 || this.template_id == 21 || this.template_id == 22 || this.template_id == 23 || this.template_id == 24 || this.template_id == 26 || this.template_id == 28 || this.template_id == 27 || this.template_id == 29 || this.template_id == 30 || this.template_id == 31 || this.template_id == 32 || this.template_id == 34 || this.template_id == 36 || this.template_id == 38 || this.template_id == 43 || this.template_id == 44 || this.template_id == 47 || this.template_id == 56 || this.template_id == 60 || this.$store.getters.xt_user.template_info.org_id == 10307 || this.$store.getters.xt_user.template_info.org_id == 10340 || this.$store.getters.xt_user.template_info.org_id == 9555 || this.$store.getters.xt_user.template_info.org_id == 10387 || this.$store.getters.xt_user.template_info.org_id == 10430 || this.$store.getters.xt_user.template_info.org_id == 10432 || this.$store.getters.xt_user.template_info.org_id == 10441 || this.$store.getters.xt_user.template_info.org_id == 10445 || this.$store.getters.xt_user.template_info.org_id == 10410 || this.$store.getters.xt_user.template_info.org_id == 10495 || this.$store.getters.xt_user.template_info.org_id == 10558 || this.$store.getters.xt_user.template_info.org_id == 10597 || this.$store.getters.xt_user.template_info.org_id == 10599 || this.$store.getters.xt_user.template_info.org_id == 10612 || this.$store.getters.xt_user.template_info.org_id == 10617 || this.$store.getters.xt_user.template_info.org_id == 10480 || this.$store.getters.xt_user.template_info.org_id == 10693"  >
34 34
               <el-input v-model="form.actual_ultrafiltration"></el-input>
35 35
             </el-form-item>
36 36
             <el-form-item label="实际超滤量(L): " v-else :prop="isName('实际超滤量')" :rules="isCheckmust('实际超滤量')">

+ 1 - 1
src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue Ver fichero

@@ -1749,7 +1749,7 @@ export default {
1749 1749
           }
1750 1750
       }
1751 1751
 
1752
-      if(this.$store.getters.xt_user.org.id == 10579  || this.$store.getters.xt_user.org.id == 10585 || this.$store.getters.xt_user.org.id == 10587 || this.$store.getters.xt_user.org.id == 10597 || this.$store.getters.xt_user.org.id == 10551 || this.$store.getters.xt_user.org.id == 10679){
1752
+      if(this.$store.getters.xt_user.org.id == 10579  || this.$store.getters.xt_user.org.id == 10585 || this.$store.getters.xt_user.org.id == 10587 || this.$store.getters.xt_user.org.id == 10597 || this.$store.getters.xt_user.org.id == 10551 || this.$store.getters.xt_user.org.id == 10679 || this.$store.getters.xt_user.org.id == 10693 ||  this.$store.getters.xt_user.org.id == 10694){
1753 1753
         var date = new Date()
1754 1754
           var year = date.getFullYear()
1755 1755
           var month = date.getMonth() + 1

+ 7 - 8
src/xt_pages/dialysis/details/dialog/computer_dialog.vue Ver fichero

@@ -927,17 +927,16 @@ export default {
927 927
           }else{
928 928
             blood_drawing = ""
929 929
           }
930
-
931
-
932
-
933 930
           console.log("质控护士", this.form.quality_nurse_id);
934 931
           console.log("this.form.nuclein_date", this.form.nuclein_date);
935
-          console.log("dialysis_strainer------------------",this.form.dialysis_strainer)
932
+         
933
+
934
+          var dialysis_strainer = this.form.dialysis_strainer
935
+          console.log("dialysis_strainer------------------",dialysis_strainer)
936 936
           startDialysis(
937
+            dialysis_strainer,
937 938
             this.patient_id,
938
-            this.schedule_date
939
-              ? parseTime(this.schedule_date, "{y}-{m}-{d}")
940
-              : parseTime(new Date(), "{y}-{m}-{d}"),
939
+            this.schedule_date? parseTime(this.schedule_date, "{y}-{m}-{d}"): parseTime(new Date(), "{y}-{m}-{d}"),
941 940
             this.form.nurse_id,
942 941
             this.form.bed_id,
943 942
             this.form.lood_drawing,
@@ -959,7 +958,7 @@ export default {
959 958
             this.form.nuclein_date,
960 959
             this.form.catheter_operation,
961 960
             this.form.blood_flow_volume,
962
-            this.form.dialysis_strainer,
961
+            
963 962
           ).then((rs) => {
964 963
             this.loading = false;
965 964
             var resp = rs.data;

+ 88 - 0
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Ver fichero

@@ -2862,6 +2862,94 @@ mu
2862 2862
             var hours = date.getHours()
2863 2863
             var minites = date.getMinutes()
2864 2864
 
2865
+            if (month < 10) {
2866
+              month = '0' + month
2867
+            }
2868
+            if (day < 10) {
2869
+              day = '0' + day
2870
+            }
2871
+            if (hours < 10) {
2872
+              hours = '0' + hours
2873
+            }
2874
+            if (minites < 10) {
2875
+              minites = '0' + minites
2876
+            }
2877
+            this.start_time = year + '-' + month + '-' + day + ' ' + hours + ':' + minites
2878
+           }else if(this.$store.getters.xt_user.org.id == 10693){
2879
+            var date = new Date()
2880
+            var year = date.getFullYear()
2881
+            var month = date.getMonth() + 1
2882
+            var day = date.getDate()
2883
+
2884
+            var hours = date.getHours()
2885
+            var minites = date.getMinutes()
2886
+
2887
+            if (month < 10) {
2888
+              month = '0' + month
2889
+            }
2890
+            if (day < 10) {
2891
+              day = '0' + day
2892
+            }
2893
+            if (hours < 10) {
2894
+              hours = '0' + hours
2895
+            }
2896
+            if (minites < 10) {
2897
+              minites = '0' + minites
2898
+            }
2899
+            this.start_time = year + '-' + month + '-' + day + ' ' + hours + ':' + minites
2900
+           }else if(this.$store.getters.xt_user.org.id == 10694){
2901
+            var date = new Date()
2902
+            var year = date.getFullYear()
2903
+            var month = date.getMonth() + 1
2904
+            var day = date.getDate()
2905
+
2906
+            var hours = date.getHours()
2907
+            var minites = date.getMinutes()
2908
+
2909
+            if (month < 10) {
2910
+              month = '0' + month
2911
+            }
2912
+            if (day < 10) {
2913
+              day = '0' + day
2914
+            }
2915
+            if (hours < 10) {
2916
+              hours = '0' + hours
2917
+            }
2918
+            if (minites < 10) {
2919
+              minites = '0' + minites
2920
+            }
2921
+            this.start_time = year + '-' + month + '-' + day + ' ' + hours + ':' + minites
2922
+           }else if (this.$store.getters.xt_user.org.id == 10587){
2923
+            var date = new Date()
2924
+            var year = date.getFullYear()
2925
+            var month = date.getMonth() + 1
2926
+            var day = date.getDate()
2927
+
2928
+            var hours = date.getHours()
2929
+            var minites = date.getMinutes()
2930
+
2931
+            if (month < 10) {
2932
+              month = '0' + month
2933
+            }
2934
+            if (day < 10) {
2935
+              day = '0' + day
2936
+            }
2937
+            if (hours < 10) {
2938
+              hours = '0' + hours
2939
+            }
2940
+            if (minites < 10) {
2941
+              minites = '0' + minites
2942
+            }
2943
+            this.start_time = year + '-' + month + '-' + day + ' ' + hours + ':' + minites
2944
+           }else if (this.$store.getters.xt_user.org.id == 10587){
2945
+            var date = new Date()
2946
+            var year = date.getFullYear()
2947
+            var month = date.getMonth() + 1
2948
+            var day = date.getDate()
2949
+
2950
+            var hours = date.getHours()
2951
+            var minites = date.getMinutes()
2952
+
2865 2953
             if (month < 10) {
2866 2954
               month = '0' + month
2867 2955
             }

+ 59 - 5
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue Ver fichero

@@ -407,6 +407,8 @@
407 407
               }}
408 408
             </template>
409 409
           </el-table-column>
410
+
411
+
410 412
           <el-table-column
411 413
             prop="displacement_flow_quantity"
412 414
             align="center"
@@ -460,6 +462,23 @@
460 462
               }}
461 463
             </template>
462 464
           </el-table-column>
465
+
466
+
467
+          <el-table-column 
468
+            align="center"
469
+            label="超滤率(ml/h)"
470
+            width="100"
471
+            v-if="isShow('超滤率2')">
472
+            <template slot-scope="scope">
473
+              {{
474
+                scope.row.ultrafiltration_rate_one
475
+                  ? scope.row.ultrafiltration_rate_one
476
+                  : ""
477
+              }}
478
+            </template>
479
+
480
+          </el-table-column>
481
+
463 482
           <el-table-column
464 483
             prop="sodium_concentration"
465 484
             align="center"
@@ -582,7 +601,7 @@
582 601
                 org_id!=10558 &&
583 602
                 org_id!=10517 && 
584 603
                 org_id!=10414 && 
585
-                org_id!=10598 && org_id!=10694 && org_id!=10697) ||
604
+                org_id!=10598 && org_id!=10694 && org_id!=10697 && org_id!=10567) ||
586 605
                 org_id == 9779 ||
587 606
                 template_id == 11 ||
588 607
                 template_id == 20 ||
@@ -614,7 +633,7 @@
614 633
             width="100"
615 634
             v-if="
616 635
               isShow('置换量') &&
617
-              (template_id != 6 || org_id == 9919 || org_id == 10191 || org_id == 10478 || org_id == 10551 || org_id ==10558 || org_id ==10517 || org_id ==10598 || org_id ==10414 || org_id == 10694 || org_id == 10697) &&
636
+              (template_id != 6 || org_id == 9919 || org_id == 10191 || org_id == 10478 || org_id == 10551 || org_id ==10558 || org_id ==10517 || org_id ==10598 || org_id ==10414 || org_id == 10694 || org_id == 10697 || org_id ==10567) &&
618 637
               template_id != 9779 &&
619 638
               template_id != 11 &&
620 639
               template_id != 20 &&
@@ -954,7 +973,17 @@
954 973
             </template>
955 974
           </el-table-column>
956 975
 
957
-
976
+          <el-table-column
977
+            prop="heparin"
978
+            align="center"
979
+            label="剩余肝素(ml)"
980
+            width="140"
981
+            v-if="isShow('剩余肝素')"
982
+          >
983
+            <template slot-scope="scope">
984
+              {{ scope.row.heparin_one }}
985
+            </template>
986
+          </el-table-column>
958 987
 
959 988
 
960 989
           <el-table-column
@@ -1256,6 +1285,13 @@
1256 1285
             </el-form-item>
1257 1286
           </el-col>
1258 1287
 
1288
+          <el-col  :span="8" v-if="isShow('超滤率2')">
1289
+            <el-form-item label="超滤率(ml/min)" :prop="isName('超滤率')"
1290
+              :rules="isCheckmust('超滤率')">
1291
+              <el-input v-model="form.ultrafiltration_rate_one" style="width:200px"></el-input>
1292
+            </el-form-item>
1293
+          </el-col>
1294
+
1259 1295
           <el-col
1260 1296
             :span="8"
1261 1297
             v-if="
@@ -1474,7 +1510,7 @@
1474 1510
             :span="8"
1475 1511
             v-if="
1476 1512
               isShow('置换量') &&
1477
-              (template_id != 6 || org_id == 9919 || org_id == 10191 || org_id ==10551 || org_id ==10558 || org_id ==10346 || org_id ==10598 || org_id == 10694 || org_id == 10697) &&
1513
+              (template_id != 6 || org_id == 9919 || org_id == 10191 || org_id ==10551 || org_id ==10558 || org_id ==10346 || org_id ==10598 || org_id == 10694 || org_id == 10697 || org_id ==10567) &&
1478 1514
               org_id != 9779 &&
1479 1515
               template_id != 11 &&
1480 1516
               template_id != 20 &&
@@ -1506,7 +1542,7 @@
1506 1542
                 org_id != 9919 &&
1507 1543
                 org_id != 10191 &&
1508 1544
                 org_id != 10551 &&
1509
-                template_id != 43 && org_id!=10558 && org_id!=10346 && org_id!=10598 && org_id!=10414 && org_id !=10694 && org_id != 10697) ||
1545
+                template_id != 43 && org_id!=10558 && org_id!=10346 && org_id!=10598 && org_id!=10414 && org_id !=10694 && org_id != 10697&& org_id != 10567) ||
1510 1546
                 org_id == 9779 ||
1511 1547
                 template_id == 11 ||
1512 1548
                 template_id == 20 ||
@@ -1739,6 +1775,12 @@
1739 1775
             </el-form-item>
1740 1776
           </el-col>
1741 1777
 
1778
+          <el-col :span="8" v-if="isShow('剩余肝素')">
1779
+            <el-form-item label="剩余肝素(ml):" :prop="isName('剩余肝素')"
1780
+              :rules="isCheckmust('剩余肝素')">
1781
+              <el-input  v-model="form.heparin_one" ></el-input>
1782
+            </el-form-item>
1783
+          </el-col>
1742 1784
 
1743 1785
 
1744 1786
           <!-- </el-row>
@@ -1759,6 +1801,9 @@
1759 1801
           </el-col>
1760 1802
 
1761 1803
 
1804
+          
1805
+
1806
+
1762 1807
 
1763 1808
           <!-- </el-row>
1764 1809
 
@@ -1996,6 +2041,8 @@ export default {
1996 2041
         replacement_speed:"",
1997 2042
         dicarbonate:"",
1998 2043
         is_pressure:"",
2044
+        ultrafiltration_rate_one:"",
2045
+        heparin_one:""
1999 2046
       },
2000 2047
 
2001 2048
       table_current_row: null,
@@ -2724,6 +2771,10 @@ export default {
2724 2771
        this.form.dicarbonate =parseFloat(this.form.dicarbonate) == NaN ? 0: parseFloat(this.form.dicarbonate);
2725 2772
        this.form.is_pressure = this.form.is_pressure
2726 2773
 
2774
+      this.form.ultrafiltration_rate_one = this.form.ultrafiltration_rate_one
2775
+
2776
+      this.form.heparin_one = this.form.heparin_one
2777
+
2727 2778
       let mode = "1";
2728 2779
       if (this.form.id > 0) {
2729 2780
         mode = "2";
@@ -2882,6 +2933,9 @@ export default {
2882 2933
               parseFloat(this.form.heparin_amount) == NaN
2883 2934
                 ? 0
2884 2935
                 : parseFloat(this.form.heparin_amount);
2936
+              this.form.ultrafiltration_rate_one = this.form.ultrafiltration_rate_one
2937
+              this.form.heparin_one = this.form.heparin_one
2938
+
2885 2939
             this.$message.error(resp.msg);
2886 2940
             if(resp.code == 600000008){
2887 2941
               this.infoDialogVisible = true

+ 6 - 2
src/xt_pages/dialysis/details/dialysisMonitoring.vue Ver fichero

@@ -19,13 +19,14 @@
19 19
           <th v-if=" isShow('超滤量') && (template_id != 6 && template_id != 9 && template_id != 10 && template_id != 11 && template_id != 13 && template_id != 17 && template_id != 18 && template_id != 19 && template_id != 20 && template_id != 21 && template_id != 22 && template_id != 23 && template_id != 24 && template_id != 26 && template_id !=27 && template_id!=28 && template_id!=29 && template_id!=30 && template_id!=31 && template_id!=32 && template_id!=34 && template_id!=35 && template_id!=36 && template_id!=38 && template_id != 39 && template_id != 40  && template_id != 41 && template_id != 43 && template_id != 44 && template_id != 46  && template_id != 47 && template_id != 48 && template_id != 53  && template_id != 54  && template_id != 56  && template_id != 60 && template_id != 65 && this.$store.getters.xt_user.template_info.org_id != 9555 &&  this.$store.getters.xt_user.template_info.org_id != 10340 && this.$store.getters.xt_user.template_info.org_id!=10432  && this.$store.getters.xt_user.template_info.org_id!=10445 && this.$store.getters.xt_user.template_info.org_id!=10410 && this.$store.getters.xt_user.template_info.org_id!=10485  && this.$store.getters.xt_user.template_info.org_id!=10375 && this.$store.getters.xt_user.template_info.org_id!=10480 && this.$store.getters.xt_user.template_info.org_id!=10599  && this.$store.getters.xt_user.template_info.org_id!=10597 && this.$store.getters.xt_user.template_info.org_id!=10612 && this.$store.getters.xt_user.template_info.org_id!=10617 && this.$store.getters.xt_user.template_info.org_id!=10580 && this.$store.getters.xt_user.template_info.org_id!=10629 && this.$store.getters.xt_user.template_info.org_id!=10679 && this.$store.getters.xt_user.template_info.org_id!=10667) || this.$store.getters.xt_user.template_info.org_id == 10387"  width="76px"> 超滤量(L) </th>
20 20
           <th v-if="isShow('超滤率') && (template_id ==6 || template_id == 65 || template_id == 10 || template_id == 11 || template_id == 12 || template_id == 13 || template_id == 17 || template_id == 18 || template_id == 19 || template_id == 20 || template_id == 21 || template_id == 22 || template_id == 23 || template_id == 24 || template_id == 26 || template_id == 29 || template_id == 30 || template_id == 31 || template_id == 34 || template_id == 35 || template_id == 38 || template_id == 41 || template_id == 43 || template_id == 44 || template_id == 46 || template_id == 47  || template_id == 48  || template_id == 53 || template_id == 54 || template_id == 56  || template_id == 60 || this.$store.getters.xt_user.template_info.org_id == 10432 || this.$store.getters.xt_user.template_info.org_id == 10445 || this.$store.getters.xt_user.template_info.org_id == 10410 || this.$store.getters.xt_user.template_info.org_id == 10485 || this.$store.getters.xt_user.template_info.org_id == 10375 || this.$store.getters.xt_user.template_info.org_id == 10480 || this.$store.getters.xt_user.template_info.org_id == 10597 || this.$store.getters.xt_user.template_info.org_id == 10599  || this.$store.getters.xt_user.template_info.org_id == 10612 || this.$store.getters.xt_user.template_info.org_id == 10617 || this.$store.getters.xt_user.template_info.org_id == 10580 || this.$store.getters.xt_user.template_info.org_id == 10629 || this.$store.getters.xt_user.template_info.org_id == 10677 || this.$store.getters.xt_user.template_info.org_id == 10667 || this.$store.getters.xt_user.template_info.org_id == 10693) && this.$store.getters.xt_user.template_info.org_id!=10387" width="50px"> 超滤率 <br />(ml/h) </th>
21 21
           <th v-if="isShow('超滤率') && (template_id !=6 && template_id !=65 && template_id !=10 && template_id !=11 && template_id !=12 && template_id !=13 && template_id !=17 && template_id !=18 && template_id !=19 && template_id !=20 && template_id !=21 && template_id !=22 && template_id !=23 && template_id !=24 && template_id !=26 && template_id !=29 && template_id !=30 && template_id !=31 && template_id !=34 && template_id !=35 && template_id !=38  && template_id !=41 && template_id !=43 && template_id !=44 && template_id !=46 && template_id !=47 &&  template_id !=48 &&  template_id !=53 &&  template_id !=54 &&  template_id !=56 &&  template_id !=60 && this.$store.getters.xt_user.template_info.org_id!=10432  && this.$store.getters.xt_user.template_info.org_id!=10445 && this.$store.getters.xt_user.template_info.org_id!=10410 &&this.$store.getters.xt_user.template_info.org_id!=10485 &&this.$store.getters.xt_user.template_info.org_id!=10375 && this.$store.getters.xt_user.template_info.org_id!=10480 && this.$store.getters.xt_user.template_info.org_id!=10597 && this.$store.getters.xt_user.template_info.org_id!=10599 && this.$store.getters.xt_user.template_info.org_id!=10612 && this.$store.getters.xt_user.template_info.org_id!=10617 && this.$store.getters.xt_user.template_info.org_id!=10580 && this.$store.getters.xt_user.template_info.org_id!=10629 && this.$store.getters.xt_user.template_info.org_id!=10679 && this.$store.getters.xt_user.template_info.org_id!=10667 && this.$store.getters.xt_user.template_info.org_id!=10693 ) || this.$store.getters.xt_user.template_info.org_id==10387" width="50px"> 超滤率 <br />(L/h) </th>
22
+          <th v-if="isShow('超滤率2')" width="92px">超滤率(ml/h)</th>
22 23
           <th v-if="isShow('钠浓度')" width="92px">钠浓度(mmol/L)</th>
23 24
           <th v-if="isShow('透析液温度')" width="92px">透析液温度(℃)</th>
24 25
           <th v-if=" isShow('置换率') && (template_id == 6 || template_id == 10 || template_id == 11 || template_id == 20 || template_id == 26 || template_id == 29 || template_id == 46  || template_id == 48 || template_id == 53  || template_id == 54 || template_id == 56 || org_id == 10432 || org_id == 10445 || org_id == 10410 || org_id ==10617 || org_id==10677) && org_id!=10558 && org_id!=10598 && org_id!=10414" width="92px" > 置换率(ml/min) </th>
25 26
           <th v-if=" isShow('置换率') && (template_id != 6 && template_id != 10 && template_id != 11 && template_id != 20 && template_id != 26 && template_id != 29 && template_id != 46 && template_id != 48 && template_id != 53 && template_id != 54 && template_id != 56 && org_id!=10432 && org_id!=10445 && org_id!=10410 && org_id!=10617  && org_id!=10677) || org_id == 10558 || org_id ==10598 || org_id ==10414" width="92px" > 置换率(L/h)  </th>
26 27
           <th v-if=" isShow('置换量') && (template_id == 43)" width="92px"> 置换量(ml/h)  </th>
27
-          <th v-if=" isShow('置换量') && ((template_id == 6 && org_id != 9919 && org_id !=10191 && org_id!=10478 && org_id!=10346 && org_id!=10517) || org_id == 9779 || template_id == 11 || template_id == 20 || template_id == 26 || template_id == 29 || template_id == 46 || template_id == 48 || template_id == 53 || template_id == 54 || template_id == 56 || this.$store.getters.xt_user.template_info.org_id == 10340 || this.$store.getters.xt_user.template_info.org_id == 10432  || this.$store.getters.xt_user.template_info.org_id == 10445 ) && org_id!=10558 && org_id!=10598  && org_id!=10414 && org_id!=10694 && org_id!=10697" width="92px"  > 置换量(ml)  </th>
28
-          <th v-if=" isShow('置换量') && ((template_id != 6 || org_id == 9919 || org_id == 10191 || org_id == 10478 || org_id ==10346 || org_id ==10517) && org_id != 9779 && template_id != 11 && template_id != 20 && template_id != 26 && template_id != 29 && template_id != 46 && template_id != 48 && template_id != 53 && template_id != 54 && template_id != 56 && this.$store.getters.xt_user.template_info.org_id != 10340 && this.$store.getters.xt_user.template_info.org_id != 10432  && this.$store.getters.xt_user.template_info.org_id != 10445) || org_id == 10558 || org_id ==10598 || org_id ==10414 || org_id == 10694 || org_id == 10697" width="92px" > 置换量(L) </th>
28
+          <th v-if=" isShow('置换量') && ((template_id == 6 && org_id != 9919 && org_id !=10191 && org_id!=10478 && org_id!=10346 && org_id!=10517) || org_id == 9779 || template_id == 11 || template_id == 20 || template_id == 26 || template_id == 29 || template_id == 46 || template_id == 48 || template_id == 53 || template_id == 54 || template_id == 56 || this.$store.getters.xt_user.template_info.org_id == 10340 || this.$store.getters.xt_user.template_info.org_id == 10432  || this.$store.getters.xt_user.template_info.org_id == 10445 ) && org_id!=10558 && org_id!=10598  && org_id!=10414 && org_id!=10694 && org_id!=10697 && org_id!=10567" width="92px"  > 置换量(ml)  </th>
29
+          <th v-if=" isShow('置换量') && ((template_id != 6 || org_id == 9919 || org_id == 10191 || org_id == 10478 || org_id ==10346 || org_id ==10517) && org_id != 9779 && template_id != 11 && template_id != 20 && template_id != 26 && template_id != 29 && template_id != 46 && template_id != 48 && template_id != 53 && template_id != 54 && template_id != 56 && this.$store.getters.xt_user.template_info.org_id != 10340 && this.$store.getters.xt_user.template_info.org_id != 10432  && this.$store.getters.xt_user.template_info.org_id != 10445) || org_id == 10558 || org_id ==10598 || org_id ==10414 || org_id == 10694 || org_id == 10697 || org_id == 10567" width="92px" > 置换量(L) </th>
29 30
           <th v-if=" isShow('SpO₂') && template_id != 6 && template_id != 10 && template_id != 11  " width="92px" > SpO₂(%) </th>
30 31
           <th v-if=" isShow('SpO₂') && org_id == 9829" width="92px" > SpO₂(%) </th>
31 32
           <th v-if="isShow('电导度')" width="92px">电导度(mS/m)</th>
@@ -33,6 +34,7 @@
33 34
           <th v-if="isShow('置换液流量') && (template_id == 27 ||  template_id == 60)" width="92px">置换液流量(ml/min)</th>
34 35
           <th v-if="isShow('透析液流量')" width="92px">透析液流量(ml/h)</th>
35 36
           <th v-if="isShow('肝素用量余量')" width="92px">肝素用量余量(ml)</th>
37
+          <th v-if="isShow('剩余肝素')" width="92px">剩余肝素(ml)</th>
36 38
           <th v-if="isShow('抗凝剂')" width="92px">抗凝剂</th>
37 39
           <th v-if="isShow('累计血容量') && org_id!=10340 && org_id!=0" width="92px">累计血容量 
38 40
             <span v-if="template_id !=41 && org_id!=9671 && org_id!=9538 && org_id!=10340">(ml)</span>
@@ -69,6 +71,7 @@
69 71
             <span v-if="org_id ==9671 || org_id==10440">{{ monitor.ultrafiltration_volume ? monitor.ultrafiltration_volume : "0" }}  </span> 
70 72
           </td>
71 73
           <td v-if="isShow('超滤率')" >{{monitor.ultrafiltration_rate?monitor.ultrafiltration_rate:''}}</td>
74
+          <td v-if="isShow('超滤率2')" >{{monitor.ultrafiltration_rate_one?monitor.ultrafiltration_rate_one:''}}</td>
72 75
           <td v-if="isShow('钠浓度')"> {{ monitor.sodium_concentration ? monitor.sodium_concentration : "" }} </td>
73 76
           <td v-if="isShow('透析液温度')"> {{ monitor.dialysate_temperature ? monitor.dialysate_temperature : "" }} </td>
74 77
           <td v-if="isShow('置换率')"> {{ monitor.replacement_rate ? monitor.replacement_rate : "" }} </td>
@@ -79,6 +82,7 @@
79 82
           <td v-if="isShow('置换液流量')"> {{ monitor.displacement_flow_quantity  ? monitor.displacement_flow_quantity : "" }} </td>
80 83
           <td v-if="isShow('透析液流量')"> {{ monitor.dialysate_flow  ? monitor.dialysate_flow : "" }} </td>
81 84
           <td v-if="isShow('肝素用量余量')"> {{ monitor.heparin ? monitor.heparin : "" }} </td>
85
+          <th v-if="isShow('剩余肝素')">{{ monitor.heparin_one?monitor.heparin_one:"" }}</th>
82 86
           <td v-if="isShow('抗凝剂')">
83 87
             <span v-if="monitor.monitor_anticoagulant == 1">无肝素</span>
84 88
             <span v-if="monitor.monitor_anticoagulant == 2">普通肝素</span>

+ 2 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderSeventy.vue Ver fichero

@@ -2310,7 +2310,8 @@
2310 2310
                         </span>
2311 2311
                         <img
2312 2312
                           :style="{'height':org_id==10597 ? '25px':'35px'}"
2313
-                          :src="setAdminUserES(check == null ? 0 : check.modifier)
2313
+                          :src="
2314
+                            setAdminUserES(check == null ? 0 : check.modifier)
2314 2315
                           "
2315 2316
                           alt=""
2316 2317
                           srcset=""

+ 2 - 2
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue Ver fichero

@@ -1734,8 +1734,8 @@
1734 1734
                         <td width="50" v-if="org_id ==3877 || org_id == 10449 || org_id ==0">累计超滤量<br />(ml)</td>
1735 1735
                         <td v-if="(prescription.mode_id == 2 ||prescription.mode_id == 5 ||prescription.mode_id == 12) &&org_id!=10478 && org_id!=0 && org_id!=10206" width="50">
1736 1736
                           置换量<br />
1737
-                          <span v-if="org_id!=10598">(ml)</span>
1738
-                          <span v-if="org_id==10598">(L)</span>
1737
+                          <span v-if="org_id!=10598 && org_id!=10567">(ml)</span>
1738
+                          <span v-if="org_id==10598 || org_id == 10567">(L)</span>
1739 1739
                         </td>
1740 1740
                         <td width="50" v-if="org_id == 3877 || org_id == 10449">滤前压(mmHg)</td>
1741 1741
                         <td width="50" v-if="org_id == 9538 || org_id ==10600 || org_id ==10629 || org_id ==10510 || org_id == 10580 || org_id == 0 || org_id == 10598">KT/V</td>

+ 13 - 10
src/xt_pages/dialysis/template/DialysisPrintOrderThirtyNine.vue Ver fichero

@@ -844,18 +844,21 @@ export default {
844 844
              }
845 845
           }
846 846
           console.log("医嘱天天吞吞吐吐",this.tableAdvice)
847
-          if (tableAdvice.length <= 8) {
848
-            const length = 8 - tableAdvice.length
849
-            var obj = { advice_name: '', start_time: '' }
850
-            for (i = 0; i < length; i++) {
851
-              console.log(1)
852
-              tableAdvice.push(obj)
853
-            }
847
+          if(this.tableAdvice!=null && this.tableAdvice.length >0){
848
+            if (tableAdvice.length <= 8) {
849
+              const length = 8 - tableAdvice.length
850
+              var obj = { advice_name: '', start_time: '' }
851
+              for (i = 0; i < length; i++) {
852
+                console.log(1)
853
+                tableAdvice.push(obj)
854
+              }
854 855
 
855
-            this.tableAdvice = tableAdvice
856
-          }else{
857
-            this.tableAdvice = tableAdvice
856
+             this.tableAdvice = tableAdvice
857
+            }else{
858
+              this.tableAdvice = tableAdvice
859
+            }
858 860
           }
861
+        
859 862
           console.log("tableAdvice", this.tableAdvice);
860 863
           this.afterdialysis = response.data.data.AssessmentAfterDislysis;
861 864
           console.log("透后评估", this.afterdialysis);

+ 25 - 21
src/xt_pages/dialysis/template/DialysisPrintOrderseventyfive.vue Ver fichero

@@ -92,7 +92,7 @@
92 92
             </div>
93 93
           </div>
94 94
         </div>
95
-        <div style="text-align: center;border: 1px solid black;width: 99%;padding: 3px 0;font-size: 18px;">
95
+        <div style="text-align: center;border: 1px solid black;width: 99%;padding: 5px 0;">
96 96
           透前情况
97 97
         </div>
98 98
         <div style="border: 1px solid black;border-top: none;width: 99%;border-bottom: none;">
@@ -124,7 +124,7 @@
124 124
               }}
125 125
               </div>
126 126
             </div>
127
-            <div class="inline_block" style="flex: 2;" >
127
+            <div class="inline_block" style="flex: 1;" >
128 128
               透析(滤)器:
129 129
               <div class="under_line"
130 130
                 style=" width: 40%;
@@ -132,13 +132,15 @@
132 132
                   white-space: normal;
133 133
                 "
134 134
               >
135
-                <span v-if="dialysisOrder !=null" >
135
+                <span v-if="dialysisOrder !=null&&dialysisOrder.dialysis_dialyszers!='' && dialysisOrder.dialysis_dialyszers!=0" >
136
+
136 137
                   {{dialysisOrder.dialysis_dialyszers ? dialysisOrder.dialysis_dialyszers : "/" }}
137 138
                 </span>
138
-                <span v-if="dialysisOrder !=null && dialysisOrder.dialysis_strainer!=''" >
139
-                   /{{dialysisOrder.dialysis_strainer ? dialysisOrder.dialysis_strainer : "" }}
140
-                </span>
139
+                <span v-if="dialysisOrder !=null && dialysisOrder.dialysis_strainer!='' && dialysisOrder.dialysis_strainer!=0" >
141 140
 
141
+                    /{{dialysisOrder.dialysis_strainer ? dialysisOrder.dialysis_strainer : "" }}
142
+                </span>
143
+              
142 144
               </div>
143 145
             </div>
144 146
             <div class="inline_block" style="flex: 1;" >
@@ -368,7 +370,7 @@
368 370
             </div>
369 371
           </div>
370 372
           <!-- 特殊医嘱 -->
371
-          <div class="row" style="padding-bottom: 10px;">
373
+          <div class="row" >
372 374
             <div class="inline_block" style="width: 100%;">
373 375
               特殊医嘱:
374 376
               <div class="under_line"
@@ -402,8 +404,8 @@
402 404
                     letter-spacing: 5px;
403 405
                     text-align: center;
404 406
                     font-weight: 520;
405
-                    font-size: 18px;
406
-                    padding: 3px 8px;
407
+                    font-size: 16px;
408
+                    padding: 0px 8px;
407 409
                     line-height: 30px;
408 410
                   "
409 411
                 >
@@ -515,17 +517,17 @@
515 517
         </div>
516 518
         <!-- 透析监测 -->
517 519
         <div style="width: 99%;">
518
-          <table class="inside_table" border="1" style="border-collapse: collapse;width: 100%;text-align: center;">
520
+          <table class="inside_table" border="1" style="border-collapse: collapse;width: 100%;text-align: center;border-top: none;">
519 521
             <tbody>
520
-              <tr style="line-height: 30px;">
522
+              <tr style="line-height: 30px; padding: 8px 5px">
521 523
                 <td
522 524
                   colspan="13"
523 525
                   style="
524 526
                     letter-spacing: 5px;
525 527
                     text-align: center;
526 528
                     font-weight: 520;
527
-                    font-size: 18px;
528
-                    padding: 3px 8px;
529
+                    font-size: 16px;
530
+                    padding: 0px 8px;
529 531
                     line-height: 30px;
530 532
                   "
531 533
                 >
@@ -562,7 +564,7 @@
562 564
                 <td width="50">{{monitor.blood_flow_volume ? monitor.blood_flow_volume: "/"}}</td>
563 565
                 <td width="50">{{ monitor.conductivity ? monitor.conductivity : "/" }}</td>
564 566
                 <td width="50">
565
-                  <span v-if="monindex == 0">
567
+                  <!-- <span v-if="monindex == 0">
566 568
                     {{ monitor.ultrafiltration_rate? monitor.ultrafiltration_rate: "0" }}
567 569
                   </span>
568 570
                   <span v-else-if="monindex == ( monitors.length-1)">
@@ -570,8 +572,8 @@
570 572
                   </span>
571 573
                   <span v-else>
572 574
                     {{ monitor.ultrafiltration_rate ? monitor.ultrafiltration_rate : '/' }}
573
-                  </span>
574
-
575
+                  </span> -->
576
+                  {{ monitor.ultrafiltration_rate_one ? monitor.ultrafiltration_rate_one:"" }}
575 577
                 </td>
576 578
                 <td width="50">
577 579
                   <span v-if="monindex == 0">
@@ -586,7 +588,7 @@
586 588
                 </td>
587 589
                 <!-- 剩余肝素 -->
588 590
                 <td width="65">
589
-                  <span v-if="monindex == 0">
591
+                  <!-- <span v-if="monindex == 0">
590 592
                     {{ monitor.heparin ? monitor.heparin :'0' }}
591 593
                   </span>
592 594
                   <span v-else-if="monindex == ( monitors.length-1)">
@@ -594,8 +596,10 @@
594 596
                   </span>
595 597
                   <span v-else>
596 598
                     {{ monitor.heparin ? monitor.heparin: "/" }}
597
-                  </span>
599
+                  </span>  -->
598 600
                   <!-- {{ monitor.heparin != '' ? monitor.heparin :'/' }}-->
601
+                    <!-- {{ monitor.heparin?monitor.heparin:"" }} -->
602
+                      {{ monitor.heparin_one?monitor.heparin_one:"" }}
599 603
                 </td>
600 604
                 <td width="200">
601 605
                   <template v-if=" (dialysisOrder && monitor.operate_time == dialysisOrder.start_time)">
@@ -739,7 +743,7 @@
739 743
             </div>
740 744
           </div>
741 745
 
742
-          <div class="row" style="display: flex;padding-bottom: 10px;">
746
+          <div class="row" style="display: flex;">
743 747
             <div class="inline_block" style="flex: 1">
744 748
               透后体重:
745 749
               <div class="under_line"
@@ -789,8 +793,8 @@
789 793
           </div>
790 794
         </div>
791 795
         <!-- 透析小结 -->
792
-        <div style="width: 99%;border: 1px solid black;height: 100px;white-space: normal;">
793
-          <div style="height: 60px;padding: 5px;">
796
+        <div style="width: 99%;border: 1px solid black;height: 120px;white-space: normal;">
797
+          <div style="height: 80px;padding: 5px;">
794 798
             <div style="margin-bottom: 10px;">
795 799
               宣教知识:
796 800
               <span class="under_line"style="white-space: normal;width: 80%;">

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 364 - 352
src/xt_pages/hospitalStation/components/deskPrescription.vue


+ 11 - 11
src/xt_pages/hospitalStation/components/prescriptionTable.vue Ver fichero

@@ -6,7 +6,7 @@
6 6
       <el-table-column align="center" prop="day" width="70" label="序号">
7 7
         <template slot-scope="scope">
8 8
           <div style="display:flex;align-items:center;">
9
-            <el-input :disabled="prescription.is_medicine_status"  v-model="scope.row.groupno" placeholder=""></el-input>
9
+            <el-input :disabled="scope.row.is_medicine == 1"  v-model="scope.row.groupno" placeholder=""></el-input>
10 10
           </div>
11 11
         </template>
12 12
       </el-table-column>
@@ -28,10 +28,10 @@
28 28
       <el-table-column align="center" prop="single_dose" width="120" label="单次用量">
29 29
         <template slot-scope="scope">
30 30
           <div style="display:flex;align-items:center;">
31
-            <el-input :disabled="prescription.is_medicine_status"  v-model="scope.row.single_dose" @input="getAllChange(scope)"
31
+            <el-input :disabled="scope.row.is_medicine == 1"  v-model="scope.row.single_dose" @input="getAllChange(scope)"
32 32
                       style="width:50%;"></el-input>
33 33
             <!-- <div>{{scope.row.single_dose_unit}}</div> -->
34
-            <el-select :disabled="prescription.is_medicine_status"  v-model="scope.row.single_dose_unit" placeholder="请选择" style="width:50%;"
34
+            <el-select :disabled="scope.row.is_medicine == 1"  v-model="scope.row.single_dose_unit" placeholder="请选择" style="width:50%;"
35 35
                        @change="getAllChange(scope)">
36 36
               <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
37 37
               <el-option :label="scope.row.drug.dose_unit"
@@ -43,7 +43,7 @@
43 43
       </el-table-column>
44 44
       <el-table-column align="center" prop="delivery_way" width="100" label="用法">
45 45
         <template slot-scope="scope">
46
-          <el-select :disabled="prescription.is_medicine_status"  v-model="scope.row.delivery_way" placeholder="请选择">
46
+          <el-select :disabled="scope.row.is_medicine == 1"  v-model="scope.row.delivery_way" placeholder="请选择">
47 47
             <el-option
48 48
                     v-for="(item,index) in drugways"
49 49
                     :key="index"
@@ -55,7 +55,7 @@
55 55
       </el-table-column>
56 56
       <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
57 57
         <template slot-scope="scope">
58
-          <el-select  :disabled="prescription.is_medicine_status"  v-model="scope.row.execution_frequency" placeholder="请选择" @change="getAllChange(scope)">
58
+          <el-select  :disabled="scope.row.is_medicine == 1"  v-model="scope.row.execution_frequency" placeholder="请选择" @change="getAllChange(scope)">
59 59
             <el-option
60 60
                     v-for="item,index in efs"
61 61
                     :key="index"
@@ -70,7 +70,7 @@
70 70
       <el-table-column align="center" prop="day" width="70" label="天数">
71 71
         <template slot-scope="scope">
72 72
           <div style="display:flex;align-items:center;">
73
-            <el-input  :disabled="prescription.is_medicine_status"  v-model="scope.row.day" @input="getAllChange(scope)" placeholder=""></el-input>
73
+            <el-input  :disabled="scope.row.is_medicine == 1"  v-model="scope.row.day" @input="getAllChange(scope)" placeholder=""></el-input>
74 74
             {{'天'}}
75 75
           </div>
76 76
         </template>
@@ -79,10 +79,10 @@
79 79
       <el-table-column align="center" prop="prescribing_number" width="120" label="总量">
80 80
         <template slot-scope="scope">
81 81
           <div style="display:flex;align-items:center;">
82
-            <el-input :disabled="prescription.is_medicine_status"  v-model="scope.row.prescribing_number" @input="changePrescribingNumber(scope)"
82
+            <el-input :disabled="scope.row.is_medicine == 1"  v-model="scope.row.prescribing_number" @input="changePrescribingNumber(scope)"
83 83
                       style="width:50%" placeholder=""></el-input>
84 84
             <!-- <div> {{scope.row.prescribing_number_unit}}</div> -->
85
-            <el-select :disabled="prescription.is_medicine_status"  v-model="scope.row.prescribing_number_unit" placeholder="请选择" style="width:50%;"
85
+            <el-select :disabled="scope.row.is_medicine == 1"  v-model="scope.row.prescribing_number_unit" placeholder="请选择" style="width:50%;"
86 86
                        @change="getPrescribingNumberUnit(scope)">
87 87
               <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
88 88
               <el-option :label="scope.row.drug.max_unit"
@@ -103,7 +103,7 @@
103 103
       </el-table-column>
104 104
       <el-table-column align="center" prop="hosp_appr_flag" width="100" label="医院审批标志">
105 105
         <template slot-scope="scope">
106
-          <el-select :disabled="prescription.is_medicine_status"  v-model="scope.row.hosp_appr_flag" placeholder="请选择">
106
+          <el-select :disabled="scope.row.is_medicine == 1"  v-model="scope.row.hosp_appr_flag" placeholder="请选择">
107 107
             <el-option label="审批通过" value="1"></el-option>
108 108
             <el-option label="无须审批" value="3"></el-option>
109 109
             <el-option label="审批不通过" value="2"></el-option>
@@ -112,7 +112,7 @@
112 112
       </el-table-column>
113 113
       <el-table-column align="center" prop="remark" width="50" label="备注">
114 114
         <template slot-scope="scope">
115
-          <el-input :disabled="prescription.is_medicine_status"  v-model="scope.row.remark" :title="scope.row.remark" placeholder=""></el-input>
115
+          <el-input :disabled="scope.row.is_medicine == 1"  v-model="scope.row.remark" :title="scope.row.remark" placeholder=""></el-input>
116 116
         </template>
117 117
       </el-table-column>
118 118
       <el-table-column align="center" width="40" prop="name" label="操作">
@@ -335,7 +335,7 @@
335 335
         })
336 336
 
337 337
       }, deleteDrug: function(index, row) {
338
-        if (this.prescription.is_medicine_status){
338
+        if (row.is_medicine == 1){
339 339
           this.$message.error('该处方包含已发药的药品,无法删除')
340 340
           return
341 341
         }

+ 18 - 18
src/xt_pages/hospitalStation/doctorDesk.vue Ver fichero

@@ -1332,7 +1332,7 @@ export default {
1332 1332
                 order_status: prescription.order_status,
1333 1333
                 pre_time: preTime,
1334 1334
                 med_type: parseInt(prescription.med_type),
1335
-                is_medicine_status: is_medicine,
1335
+                is_medicine_status: prescription.is_medicine,
1336 1336
 
1337 1337
               }
1338 1338
               this.prescriptions.push(obj)
@@ -1674,9 +1674,9 @@ export default {
1674 1674
 
1675 1675
                       }
1676 1676
                       tempAdvice.push(obj)
1677
-                      if (prescription.advices[b].is_medicine == 1){
1678
-                        is_medicine = true
1679
-                      }
1677
+                      // if (prescription.advices[b].is_medicine == 1){
1678
+                      //   is_medicine = true
1679
+                      // }
1680 1680
                     }
1681 1681
 
1682 1682
                     //项目
@@ -1756,7 +1756,7 @@ export default {
1756 1756
                       order_status: prescription.order_status,
1757 1757
                       pre_time: preTime,
1758 1758
                       med_type: parseInt(prescription.med_type),
1759
-                      is_medicine_status: is_medicine,
1759
+                      is_medicine: prescription.is_medicine,
1760 1760
 
1761 1761
                     }
1762 1762
                     this.prescriptions.push(obj)
@@ -1911,7 +1911,7 @@ export default {
1911 1911
                       order_status: 0,
1912 1912
                       pre_time: nowTime,
1913 1913
                       med_type: '',
1914
-                      is_medicine_status:false,
1914
+                      is_medicine_status:0,
1915 1915
                     }
1916 1916
 
1917 1917
                     obj.med_type = 14
@@ -2247,7 +2247,7 @@ export default {
2247 2247
                       order_status: prescription.order_status,
2248 2248
                       pre_time: preTime,
2249 2249
                       med_type: parseInt(prescription.med_type),
2250
-                      is_medicine_status: is_medicine,
2250
+                      is_medicine_status: prescription.is_medicine,
2251 2251
 
2252 2252
                     }
2253 2253
                     this.prescriptions.push(obj)
@@ -2359,7 +2359,7 @@ export default {
2359 2359
                         order_status: 1,
2360 2360
                         pre_time: preTime,
2361 2361
                         med_type: '',
2362
-                        is_medicine_status:false,
2362
+                        is_medicine_status:0,
2363 2363
 
2364 2364
                       }
2365 2365
                       if (prescription.med_type == 0 || prescription.med_type == '') {
@@ -2386,7 +2386,7 @@ export default {
2386 2386
                       order_status: 0,
2387 2387
                       pre_time: nowTime,
2388 2388
                       med_type: '',
2389
-                      is_medicine_status:false
2389
+                      is_medicine_status:0
2390 2390
 
2391 2391
                     }
2392 2392
 
@@ -2721,7 +2721,7 @@ export default {
2721 2721
                     order_status: prescription.order_status,
2722 2722
                     pre_time: preTime,
2723 2723
                     med_type: parseInt(prescription.med_type),
2724
-                    is_medicine_status: is_medicine,
2724
+                    is_medicine_status: prescription.is_medicine,
2725 2725
 
2726 2726
                   }
2727 2727
                   this.prescriptions.push(obj)
@@ -2832,7 +2832,7 @@ export default {
2832 2832
                       order_status: 1,
2833 2833
                       pre_time: preTime,
2834 2834
                       med_type: '',
2835
-                      is_medicine_status:false,
2835
+                      is_medicine_status:0,
2836 2836
 
2837 2837
                     }
2838 2838
                     if (prescription.med_type == 0 || prescription.med_type == '') {
@@ -2860,7 +2860,7 @@ export default {
2860 2860
                     order_status: 0,
2861 2861
                     pre_time: nowTime,
2862 2862
                     med_type: '',
2863
-                    is_medicine_status:false,
2863
+                    is_medicine_status:0,
2864 2864
 
2865 2865
                   }
2866 2866
 
@@ -3266,7 +3266,7 @@ export default {
3266 3266
                       order_status: prescription.order_status,
3267 3267
                       pre_time: preTime,
3268 3268
                       med_type: parseInt(prescription.med_type),
3269
-                      is_medicine_status: is_medicine,
3269
+                      is_medicine_status: prescription.is_medicine,
3270 3270
 
3271 3271
                     }
3272 3272
                     this.prescriptions.push(obj)
@@ -3385,7 +3385,7 @@ export default {
3385 3385
                         order_status: 1,
3386 3386
                         pre_time: preTime,
3387 3387
                         med_type: '',
3388
-                        is_medicine_status: false,
3388
+                        is_medicine_status: 0,
3389 3389
 
3390 3390
 
3391 3391
                       }
@@ -3415,7 +3415,7 @@ export default {
3415 3415
                       order_status: 0,
3416 3416
                       pre_time: nowTime,
3417 3417
                       med_type: '',
3418
-                      is_medicine_status: false,
3418
+                      is_medicine_status: 0,
3419 3419
 
3420 3420
 
3421 3421
                     }
@@ -3723,7 +3723,7 @@ export default {
3723 3723
                       order_status: prescription.order_status,
3724 3724
                       pre_time: preTime,
3725 3725
                       med_type: parseInt(prescription.med_type),
3726
-                      is_medicine_status: is_medicine,
3726
+                      is_medicine_status: prescription.is_medicine,
3727 3727
 
3728 3728
                     }
3729 3729
                     this.prescriptions.push(obj)
@@ -3844,7 +3844,7 @@ export default {
3844 3844
                         order_status: 1,
3845 3845
                         pre_time: preTime,
3846 3846
                         med_type: '',
3847
-                        is_medicine_status: false,
3847
+                        is_medicine_status: 0,
3848 3848
 
3849 3849
 
3850 3850
                       }
@@ -3873,7 +3873,7 @@ export default {
3873 3873
                       order_status: 0,
3874 3874
                       pre_time: nowTime,
3875 3875
                       med_type: '',
3876
-                      is_medicine_status: false,
3876
+                      is_medicine_status: 0,
3877 3877
 
3878 3878
 
3879 3879
                     }

+ 9 - 3
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Ver fichero

@@ -3366,10 +3366,16 @@ export default {
3366 3366
 
3367 3367
     },
3368 3368
     removeTab(targetName) {
3369
-      if (this.curPrescriptions.order_status == 2 || this.curPrescriptions.order_status == 5 || this.curPrescriptions.is_medicine_status) {
3370
-        this.$message.error('该处方已经结算或者记账或者已发药,无法删除')
3369
+      if (this.curPrescriptions.order_status == 2 || this.curPrescriptions.order_status == 5 ) {
3370
+        this.$message.error('该处方已经结算或者记账,无法删除')
3371 3371
         return
3372 3372
       }
3373
+      for(let i = 0; i < this.curPrescriptions.advices.length; i++){
3374
+        if(this.curPrescriptions.advices[i].is_medicine == 1){
3375
+          this.$message.error('该处方已发药,无法删除')
3376
+          return
3377
+        }
3378
+      }
3373 3379
       this.$confirm('处方删除后不可恢复,是否确认删除', '删除', {
3374 3380
         confirmButtonText: '确 定',
3375 3381
         cancelButtonText: '取 消',
@@ -3940,7 +3946,7 @@ export default {
3940 3946
             var temp2 = this.deepClone(this.teamList)
3941 3947
 
3942 3948
             var temp3 = this.deepClone(templateDrugs)
3943
-            
3949
+
3944 3950
             if (temp3.length > 0) {
3945 3951
               for (let b = 0; b < temp3.length; b++) {
3946 3952
                 let obj = {

+ 18 - 17
src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue Ver fichero

@@ -6,7 +6,7 @@
6 6
             <el-table-column align="center" prop="day" width="70" label="序号" fixed>
7 7
                 <template slot-scope="scope">
8 8
                     <div style="display:flex;align-items:center;">
9
-                        <el-input :disabled="prescription.is_medicine_status" v-model="scope.row.groupno" placeholder="" @input="getAllIndex(scope.row)"></el-input>
9
+                        <el-input :disabled="scope.row.is_medicine == 1" v-model="scope.row.groupno" placeholder="" @input="getAllIndex(scope.row)"></el-input>
10 10
                     </div>
11 11
                 </template>
12 12
             </el-table-column>
@@ -26,11 +26,11 @@
26 26
             <el-table-column align="center" prop="single_dose" width="120" label="单次用量">
27 27
                 <template slot-scope="scope">
28 28
                     <div style="display:flex;align-items:center;">
29
-                        <el-input :disabled="prescription.is_medicine_status" v-model="scope.row.single_dose" @input="getAllChangeTwo(scope)"
29
+                        <el-input :disabled="scope.row.is_medicine == 1" v-model="scope.row.single_dose" @input="getAllChangeTwo(scope)"
30 30
                                   style="width:50%;"></el-input>
31 31
                         <!-- <div>{{scope.row.single_dose_unit}}</div> -->
32 32
                         <el-select v-model="scope.row.single_dose_unit" placeholder="请选择" style="width:50%;"
33
-                                   @change="getAllChangeTwo(scope)" :disabled="prescription.is_medicine_status" >
33
+                                   @change="getAllChangeTwo(scope)" :disabled="scope.row.is_medicine == 1" >
34 34
                             <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
35 35
                           <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
36 36
 
@@ -43,7 +43,7 @@
43 43
             </el-table-column>
44 44
             <el-table-column align="center" prop="delivery_way" width="100" label="用法">
45 45
                 <template slot-scope="scope">
46
-                    <el-select :disabled="prescription.is_medicine_status" v-model="scope.row.delivery_way" placeholder="请选择">
46
+                    <el-select :disabled="scope.row.is_medicine == 1" v-model="scope.row.delivery_way" placeholder="请选择">
47 47
                         <el-option
48 48
                                 v-for="(item,index) in drugways"
49 49
                                 :key="index"
@@ -55,7 +55,7 @@
55 55
             </el-table-column>
56 56
             <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
57 57
                 <template slot-scope="scope">
58
-                    <el-select :disabled="prescription.is_medicine_status" v-model="scope.row.execution_frequency" placeholder="请选择" @change="getAllChangeTwo(scope)">
58
+                    <el-select :disabled="scope.row.is_medicine == 1" v-model="scope.row.execution_frequency" placeholder="请选择" @change="getAllChangeTwo(scope)">
59 59
                         <el-option
60 60
                                 v-for="item,index in efs"
61 61
                                 :key="index"
@@ -69,7 +69,7 @@
69 69
             <el-table-column align="center" prop="day" width="70" label="天数">
70 70
                 <template slot-scope="scope">
71 71
                     <div style="display:flex;align-items:center;">
72
-                        <el-input :disabled="prescription.is_medicine_status" v-model="scope.row.day" @input="getAllChangeTwo(scope)" placeholder=""></el-input>
72
+                        <el-input :disabled="scope.row.is_medicine == 1" v-model="scope.row.day" @input="getAllChangeTwo(scope)" placeholder=""></el-input>
73 73
                         {{'天'}}
74 74
                     </div>
75 75
                 </template>
@@ -78,11 +78,11 @@
78 78
             <el-table-column align="center" prop="prescribing_number" width="120" label="总量">
79 79
                 <template slot-scope="scope">
80 80
                     <div style="display:flex;align-items:center;">
81
-                        <el-input :disabled="prescription.is_medicine_status" v-model="scope.row.prescribing_number" @input="changePrescribingNumber(scope)"
81
+                        <el-input :disabled="scope.row.is_medicine == 1" v-model="scope.row.prescribing_number" @input="changePrescribingNumber(scope)"
82 82
                                   style="width:50%" placeholder=""></el-input>
83 83
                         <!-- <div> {{scope.row.prescribing_number_unit}}</div> -->
84
-                        <el-select :disabled="prescription.is_medicine_status" v-model="scope.row.prescribing_number_unit" placeholder="请选择" style="width:50%;"
85
-                                   @change="getPrescribingNumberUnit(scope)">
84
+                        <el-select :disabled="scope.row.is_medicine == 1" v-model="scope.row.prescribing_number_unit" placeholder="请选择" style="width:50%;"
85
+                                   @change="getPrescribingNumberUnit(scope.row)">
86 86
                             <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
87 87
                             <el-option :label="scope.row.drug.max_unit"
88 88
                                        v-if="scope.row.drug.min_unit != scope.row.drug.max_unit"
@@ -102,7 +102,7 @@
102 102
             </el-table-column>
103 103
             <el-table-column align="center" prop="hosp_appr_flag" width="100" label="医院审批标志">
104 104
                 <template slot-scope="scope">
105
-                    <el-select :disabled="prescription.is_medicine_status" v-model="scope.row.hosp_appr_flag" placeholder="请选择">
105
+                    <el-select :disabled="scope.row.is_medicine == 1" v-model="scope.row.hosp_appr_flag" placeholder="请选择">
106 106
                         <el-option label="审批通过" value="1"></el-option>
107 107
                         <el-option label="无须审批" value="3"></el-option>
108 108
                         <el-option label="审批不通过" value="2"></el-option>
@@ -117,7 +117,7 @@
117 117
 
118 118
           <el-table-column align="center" prop="is_self_drug" width="100" label="医嘱性质" v-if="this.$store.getters.xt_user.org_id == 10206 || this.$store.getters.xt_user.org_id == 0">
119 119
             <template slot-scope="scope">
120
-              <el-select :disabled="prescription.is_medicine_status" v-model="scope.row.is_self_drug" placeholder="请选择">
120
+              <el-select :disabled="scope.row.is_medicine == 1" v-model="scope.row.is_self_drug" placeholder="请选择">
121 121
                 <el-option label="非自备药" value="0"></el-option>
122 122
                 <el-option label="自备药" value="1"></el-option>
123 123
               </el-select>
@@ -127,13 +127,13 @@
127 127
 
128 128
           <el-table-column align="center" prop="drug_way_count" width="100" label="给药途径次数" >
129 129
             <template slot-scope="scope">
130
-              <el-input :disabled="prescription.is_medicine_status"  v-model="scope.row.drug_way_count" :title="scope.row.drug_way_count" placeholder=""></el-input>
130
+              <el-input :disabled="scope.row.is_medicine == 1"  v-model="scope.row.drug_way_count" :title="scope.row.drug_way_count" placeholder=""></el-input>
131 131
             </template>
132 132
           </el-table-column>
133 133
 
134 134
             <el-table-column align="center" prop="remark" width="50" label="备注">
135 135
                 <template slot-scope="scope">
136
-                    <el-input :disabled="prescription.is_medicine_status"  v-model="scope.row.remark" :title="scope.row.remark" placeholder=""></el-input>
136
+                    <el-input :disabled="scope.row.is_medicine == 1"  v-model="scope.row.remark" :title="scope.row.remark" placeholder=""></el-input>
137 137
                 </template>
138 138
             </el-table-column>
139 139
             <el-table-column align="center" width="40" prop="name" label="操作" fixed="right">
@@ -372,7 +372,8 @@
372 372
         })
373 373
 
374 374
       }, deleteDrug: function(index, row) {
375
-        if (this.prescription.is_medicine_status){
375
+        console.log(row)
376
+        if (row.is_medicine == 1){
376 377
           this.$message.error('该处方包含已发药的药品,无法删除')
377 378
           return
378 379
         }
@@ -526,7 +527,7 @@
526 527
       },
527 528
       getAllChangeTwo(scope) {
528 529
         console.log("战国阿道夫阿道夫阿道夫",scope)
529
-        if (this.prescription.is_medicine_status){
530
+        if (scope.row.is_medicine == 1){
530 531
           this.$message.error('该处方包含已发药的药品,无法修改')
531 532
           return
532 533
         }
@@ -574,7 +575,7 @@
574 575
       },
575 576
 
576 577
       getPrescribingNumberUnit(scope) {
577
-        if (this.prescription.is_medicine_status){
578
+        if (scope.row.is_medicine == 1){
578 579
           this.$message.error('该处方包含已发药的药品,无法修改')
579 580
           return
580 581
         }
@@ -608,7 +609,7 @@
608 609
         }
609 610
       },
610 611
       changePrescribingNumber(scope) {
611
-        if (this.prescription.is_medicine_status){
612
+        if (scope.row.is_medicine == 1){
612 613
           this.$message.error('该处方包含已发药的药品,无法修改')
613 614
           return
614 615
         }

+ 305 - 0
src/xt_pages/outpatientTool/PrescriptionSmmary.vue Ver fichero

@@ -0,0 +1,305 @@
1
+<template>
2
+  <div class="main-contain new-main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+    </div>
6
+    <div class="app-container" style="display:flex;flex: 1;padding: 10px 20px 0px 20px;">
7
+
8
+      <div class="mainRight">
9
+        <el-tabs v-model="titleType">
10
+          <el-tab-pane label="明细" name="明细"></el-tab-pane>
11
+          <el-tab-pane label="汇总" name="汇总"></el-tab-pane>
12
+        </el-tabs>
13
+<!--        <detail v-if="titleType == '明细'"></detail>-->
14
+<!--        <gather v-if="titleType == '汇总'"></gather>-->
15
+        <pdetail v-if="titleType == '明细'"></pdetail>
16
+        <pgather  v-if="titleType == '汇总'"></pgather>
17
+      </div>
18
+    </div>
19
+  </div>
20
+</template>
21
+
22
+<script>
23
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
24
+import Pdetail from './components/pdetail.vue'
25
+import Pgather from './components/pgather.vue'
26
+
27
+
28
+const moment = require('moment')
29
+
30
+export default {
31
+  components: {
32
+    Pgather,
33
+    Pdetail,
34
+    Gather,
35
+    Settle,
36
+    Detail,
37
+    SummaryDetail,
38
+    BreadCrumb
39
+
40
+  },
41
+  data() {
42
+    return {
43
+      titleType: '明细'
44
+    }
45
+  },
46
+  methods: {},
47
+  created() {
48
+
49
+  },
50
+
51
+  mounted() {
52
+
53
+  },
54
+  watch: {}
55
+}
56
+</script>
57
+
58
+<style lang="scss" scoped>
59
+.new-main-contain {
60
+  height: 100%;
61
+  display: flex;
62
+  flex-direction: column;
63
+}
64
+
65
+.app-container {
66
+  height: 100%;
67
+}
68
+
69
+.mainCell {
70
+  height: 36px;
71
+  display: flex;
72
+  align-items: center;
73
+}
74
+
75
+.mainLeft {
76
+  width: 200px;
77
+  height: 100%;
78
+  display: flex;
79
+  flex-direction: column;
80
+
81
+.el-radio {
82
+  margin-right: 5px;
83
+}
84
+
85
+}
86
+.mainRight {
87
+  margin-left: 10px;
88
+  flex: 1;
89
+  height: 100%;
90
+  display: flex;
91
+  flex-direction: column;
92
+  overflow-y: auto;
93
+
94
+.cellSpan {
95
+  min-width: 80px;
96
+  display: inline-block;
97
+  margin-right: 10px;
98
+}
99
+
100
+}
101
+.mainCenter {
102
+  display: flex;
103
+  flex: 1;
104
+}
105
+
106
+.centerLeft {
107
+  flex: 1;
108
+  display: flex;
109
+  flex-direction: column;
110
+  position: relative;
111
+
112
+.el-form-item {
113
+  width: 32%;
114
+  margin-right: 1%;
115
+  float: left;
116
+}
117
+
118
+.el-form-item__label {
119
+  text-align: left;
120
+}
121
+
122
+}
123
+.backColor {
124
+  background: #f6f8f9;
125
+  height: 5px;
126
+  margin-bottom: 5px;
127
+}
128
+
129
+.tabsBox {
130
+  position: relative;
131
+  height: 76%;
132
+  overflow-y: auto;
133
+  margin-bottom: 60px;
134
+
135
+.el-tabs__item {
136
+  padding: 0 10px;
137
+}
138
+
139
+}
140
+.preTabs {
141
+  height: 100%;
142
+  display: flex;
143
+  flex-direction: column;
144
+
145
+.el-tabs__content {
146
+  flex: 1;
147
+  overflow-y: auto;
148
+}
149
+
150
+}
151
+
152
+.costBox {
153
+  width: 100%;
154
+  height: 60px;
155
+  background: #fff;
156
+  position: absolute;
157
+  bottom: 0;
158
+  display: flex;
159
+  align-items: center;
160
+}
161
+
162
+.addTab {
163
+  position: absolute;
164
+  right: 0;
165
+  top: 14px;
166
+  z-index: 20;
167
+}
168
+
169
+.centerRight {
170
+  width: 300px;
171
+  margin-left: 10px;
172
+  display: flex;
173
+  flex-direction: column;
174
+  position: relative;
175
+}
176
+
177
+.rightTab {
178
+  height: 40px;
179
+  width: 100%;
180
+  border: 1px solid #d2d2d2;
181
+  box-sizing: border-box;
182
+
183
+p {
184
+  width: 50%;
185
+  height: 40px;
186
+  line-height: 40px;
187
+  text-align: center;
188
+  background: #eee;
189
+  float: left;
190
+}
191
+
192
+> p:last-child {
193
+  border-left: 1px solid #d2d2d2;
194
+  float: right;
195
+}
196
+
197
+.activeP {
198
+  background: #409EFF;
199
+  color: #fff;
200
+}
201
+
202
+}
203
+.comfirmBox {
204
+  width: 100%;
205
+  height: 60px;
206
+  background: #fff;
207
+  position: absolute;
208
+  bottom: 0;
209
+  display: flex;
210
+  align-items: center;
211
+  justify-content: space-between;
212
+}
213
+
214
+.mainHeader {
215
+  width: 100%;
216
+  background: #fff;
217
+  position: fixed;
218
+  z-index: 100;
219
+  height: 36px;
220
+}
221
+
222
+.titleBox {
223
+  position: fixed;
224
+  z-index: 99;
225
+  background: #fff;
226
+}
227
+
228
+.fixedCell {
229
+  position: fixed;
230
+  z-index: 99;
231
+  right: 30px;
232
+  background: #fff;
233
+  width: 300px;
234
+  display: flex;
235
+  justify-content: space-between;
236
+}
237
+</style>
238
+
239
+<style lang="scss">
240
+.centerLeft {
241
+
242
+.el-form-item__label {
243
+  text-align: left;
244
+}
245
+
246
+}
247
+.tabsBox {
248
+
249
+.el-tabs__item {
250
+  padding: 0 10px;
251
+}
252
+
253
+.el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom.el-tabs--border-card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top.el-tabs--border-card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2) {
254
+  padding: 0 10px;
255
+}
256
+
257
+.el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom.el-tabs--border-card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top.el-tabs--border-card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:last-child {
258
+  padding: 0 10px;
259
+}
260
+
261
+.el-tabs--card > .el-tabs__header .el-tabs__item.is-active.is-closable {
262
+  padding: 0 10px;
263
+}
264
+
265
+}
266
+.centerRight {
267
+
268
+.el-tabs__nav-scroll {
269
+  display: flex;
270
+}
271
+
272
+.el-tabs__nav {
273
+  margin: 0 auto;
274
+}
275
+
276
+.el-table th .cell, .el-table td .cell {
277
+  padding: 0 2px;
278
+}
279
+
280
+}
281
+.preTabs {
282
+
283
+.el-tabs__content {
284
+
285
+}
286
+
287
+}
288
+.rightTabs {
289
+  height: 100%;
290
+
291
+
292
+.el-tabs__content {
293
+
294
+}
295
+
296
+}
297
+.centerDialog {
298
+
299
+.el-dialog__body {
300
+  max-height: calc(100vh - 100px) !important;
301
+  padding: 0 20px;
302
+}
303
+
304
+}
305
+</style>

+ 866 - 0
src/xt_pages/outpatientTool/components/pdetail.vue Ver fichero

@@ -0,0 +1,866 @@
1
+<template>
2
+  <!-- <div class="main-contain outpatientChargesManagement">
3
+      <div class="position">
4
+          <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      </div> -->
6
+  <div>
7
+    <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
8
+      <div>
9
+        <!--<el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"-->
10
+        <!--@click="Action">-->
11
+        <!--导出-->
12
+        <!--</el-button>-->
13
+        <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"
14
+                  @keyup.enter.native='searchAction'
15
+                  placeholder="请输入患者姓名"
16
+                  class="filter-item"/>
17
+        <el-select size="small" v-model="item_type" placeholder="请选择"
18
+                   style="width:150px;margin-left:10px;" @change="changeItem">
19
+          <el-option
20
+            label="全部"
21
+            value="0">
22
+          </el-option>
23
+          <el-option
24
+            v-for="item,index in items"
25
+            :key="index"
26
+            :label="item.name"
27
+            :value="item.id">
28
+          </el-option>
29
+        </el-select>
30
+
31
+        <el-select size="small" v-model="item_time_type" placeholder="请选择"
32
+                   style="width:150px;margin-left:10px;" @change="changeTimeItem">
33
+          <el-option
34
+            label="处方时间"
35
+            value="0">
36
+          </el-option>
37
+          <el-option
38
+            label="结算时间"
39
+            value="1">
40
+          </el-option>
41
+        </el-select>
42
+
43
+        <el-date-picker
44
+          v-model="chargeDate"
45
+          type="daterange"
46
+          value-format="yyyy-MM-dd"
47
+          range-separator="至"
48
+          start-placeholder="开始日期"
49
+          @change="handleDateChange"
50
+          end-placeholder="结束日期">
51
+        </el-date-picker>
52
+        <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
53
+        <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
54
+      </div>
55
+      <div>
56
+        <!-- <el-popover
57
+          placement="bottom"
58
+          width="210"
59
+          trigger="click">
60
+          <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
61
+          <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
62
+          <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>
63
+
64
+        </el-popover> -->
65
+        <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
66
+      </div>
67
+    </div>
68
+    <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
69
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
70
+              :span-method="merge"
71
+              show-summary
72
+              :summary-method="getTotal"
73
+              max-height="600"
74
+
75
+              v-loading="detail_loading"
76
+              highlight-current-row>
77
+
78
+      <el-table-column align="center" prop="name" label="患者名字">
79
+        <template slot-scope="scope">{{ scope.row.name }}</template>
80
+      </el-table-column>
81
+      <el-table-column align="center" prop="name" label="处方日期">
82
+        <template slot-scope="scope">{{ scope.row.name }}</template>
83
+      </el-table-column>
84
+      <!--<el-table-column align="center" prop="name" label="患者类型">-->
85
+      <!--<template slot-scope="scope"></template>-->
86
+      <!--</el-table-column>-->
87
+      <el-table-column align="center" prop="name" label="费用类型">
88
+        <template slot-scope="scope">{{ scope.row.name }}</template>
89
+      </el-table-column>
90
+
91
+      <el-table-column align="center" prop="name" label="处方类型">
92
+        <template slot-scope="scope">{{ scope.row.name }}</template>
93
+      </el-table-column>
94
+
95
+
96
+      <el-table-column align="center" prop="name" label="项目名称">
97
+        <template slot-scope="scope">{{scope.row.item_name}}</template>
98
+      </el-table-column>
99
+
100
+      <el-table-column align="center" prop="name" label="规格型号">
101
+        <template slot-scope="scope">{{scope.row.item_spec}}</template>
102
+      </el-table-column>
103
+
104
+      <el-table-column align="center" prop="name" label="数量">
105
+        <template slot-scope="scope">{{scope.row.count}}</template>
106
+      </el-table-column>
107
+
108
+      <el-table-column align="center" prop="name" label="单位">
109
+        <template slot-scope="scope">{{scope.row.count}}</template>
110
+      </el-table-column>
111
+
112
+      <el-table-column align="center" prop="name" label="单价">
113
+        <template slot-scope="scope">{{scope.row.price.toFixed(2)}}</template>
114
+      </el-table-column>
115
+
116
+      <el-table-column align="center" prop="name" label="金额">
117
+        <template slot-scope="scope">
118
+          <div>{{((scope.row.price*scope.row.count).toFixed(2))}}</div>
119
+        </template>
120
+      </el-table-column>
121
+
122
+      <el-table-column align="center" prop="name" label="是否结算">
123
+        <template slot-scope="scope">{{scope.row.price.toFixed(2)}}</template>
124
+      </el-table-column>
125
+
126
+
127
+      <el-table-column align="center" prop="name" label="结算日期">
128
+        <template slot-scope="scope">{{scope.row.price.toFixed(2)}}</template>
129
+      </el-table-column>
130
+
131
+    </el-table>
132
+  </div>
133
+
134
+  <!-- </div> -->
135
+</template>
136
+
137
+
138
+<script>
139
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
140
+import { GetSummaryDetail } from '@/api/his/his'
141
+import { uParseTime } from '@/utils/tools'
142
+import axios from 'axios'
143
+import pako from 'pako';
144
+// import NewStatementPrint from './newStatementPrint'
145
+const moment = require('moment')
146
+export default {
147
+  components: {
148
+    BreadCrumb
149
+
150
+  },
151
+  data() {
152
+    return {
153
+      pickerOptions: {
154
+        disabledDate(time) {
155
+          // 获取当前日期
156
+          const now = new Date();
157
+
158
+          // 设置一个月后的日期
159
+          const oneMonthLater = new Date();
160
+          oneMonthLater.setMonth(oneMonthLater.getMonth() + 1);
161
+
162
+          // 如果当前日期在一个月后之后,则禁用
163
+          return time.getTime() > oneMonthLater.getTime() || time.getTime() < now.getTime();
164
+        },
165
+      },
166
+      detail_loading: false,
167
+      tempArr: [],
168
+      pos: 0,
169
+
170
+      sameRowArr: [],
171
+      keywords: '',
172
+      tableData: [],
173
+      chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
174
+      item_type: '0',
175
+      item_time_type:'0',
176
+      items: [
177
+        { id: 1, name: '未结算' },
178
+        { id: 2, name: '已结算' },
179
+      ]
180
+
181
+    }
182
+  },
183
+  methods: {
184
+    handleDateChangetwo(value) {
185
+      this.$confirm('提示', '接口优化升级,如有数据需要,请联系客服!', {
186
+        confirmButtonText: '确 定',
187
+        cancelButtonText: '取 消',
188
+        type: 'warning'
189
+      }).then(() => {
190
+
191
+
192
+      }).catch(() => {
193
+      })
194
+
195
+      // let start_time = this.chargeDate[0]
196
+      // let end_time = this.chargeDate[1]
197
+      // const dateObj1 = new Date(start_time);
198
+      // const dateObj2 = new Date(end_time);
199
+      //
200
+      // // 计算两个日期之间的月份差
201
+      // const monthDifference = (dateObj2.getFullYear() - dateObj1.getFullYear()) * 12 +
202
+      //   (dateObj2.getMonth() - dateObj1.getMonth());
203
+      // if (monthDifference >= 1){
204
+      //   this.$message.error("时间间隔不能超出一个月")
205
+      //   return
206
+      // }else{
207
+      //   this.getSummaryDetailList()
208
+      // }
209
+
210
+    },
211
+
212
+    handleDateChange(value) {
213
+      // let start_time = this.chargeDate[0]
214
+      // let end_time = this.chargeDate[1]
215
+      // const dateObj1 = new Date(start_time);
216
+      // const dateObj2 = new Date(end_time);
217
+      //
218
+      // // 计算两个日期之间的月份差
219
+      // const monthDifference = (dateObj2.getFullYear() - dateObj1.getFullYear()) * 12 +
220
+      //   (dateObj2.getMonth() - dateObj1.getMonth());
221
+      // if (monthDifference >= 1){
222
+      //   this.$message.error("时间间隔不能超出一个月")
223
+      //   return
224
+      // }else{
225
+      //   this.getSummaryDetailListtwo()
226
+      // }
227
+      this.getSummaryDetailList()
228
+
229
+
230
+    },
231
+    Action(){
232
+      var that = this
233
+      axios.get('http://127.0.0.1:9531/handelExcel', {
234
+        params: {}
235
+      })
236
+        .then(function(response) {
237
+          if (response.data.state == 0) {
238
+            that.$message.error(response.data.msg)
239
+
240
+
241
+            return false
242
+          } else {
243
+
244
+            var list = []
245
+            for(let i = 0; i < response.data.data.list.length; i++){
246
+              let team =  response.data.data.list[i]
247
+              for(let b = 0; b < team.list.length; b++){
248
+                let name = ""
249
+                if(team.list[b].type == 2){
250
+                  name = team.list[b].project.project_name
251
+                }else{
252
+
253
+                  name = team.list[b].good_info.good_name
254
+
255
+                }
256
+
257
+                let obj = {
258
+                  '客户组合编码': team.id,
259
+                  '客户组合名称': team.project_team,
260
+                  '客户单项编码': team.list[b].id,
261
+                  '客户单项名称': name,
262
+                  '中心组合编码': '',
263
+                  '中心组合名称': '',
264
+                  '中心单项编码': '',
265
+                  '中心单项名称': '',
266
+                }
267
+
268
+                list.push(obj)
269
+              }
270
+            }
271
+
272
+            import('@/vendor/Export2Excel').then(excel => {
273
+              const tHeader = [ '客户组合编码', '客户组合名称', '客户单项编码', '客户单项名称', '中心组合编码', '中心组合名称', '中心单项编码', '中心单项名称']
274
+              const filterVal = [ '客户组合编码', '客户组合名称', '客户单项编码', '客户单项名称', '中心组合编码', '中心组合名称', '中心单项编码', '中心单项名称']
275
+              const data = that.formatJson(filterVal, list)
276
+              excel.export_json_to_excel({
277
+                header: tHeader,
278
+                data,
279
+                filename: "消费明细"
280
+              })
281
+            })
282
+
283
+
284
+          }
285
+        })
286
+        .catch(function(error) {
287
+
288
+        })
289
+
290
+
291
+
292
+
293
+    },formatJson(filterVal, jsonData) {
294
+      return jsonData.map(v => filterVal.map(j => v[j]))
295
+    },
296
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
297
+      if (columnIndex === 0) {
298
+        if (rowIndex % 2 === 0) {
299
+          return {
300
+            rowspan: 2,
301
+            colspan: 1
302
+          }
303
+        } else {
304
+          return {
305
+            rowspan: 0,
306
+            colspan: 0
307
+          }
308
+        }
309
+      }
310
+    },
311
+    unique(arr) {
312
+      const res = new Map()
313
+      return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
314
+    },
315
+    uniquepid(arr) {
316
+      const res = new Map()
317
+      return arr.filter((arr) => !res.has(arr.p_id) && res.set(arr.p_id, 1))
318
+    },
319
+    changeDate() {
320
+      this.getSummaryDetailList()
321
+    },
322
+    changeItem() {
323
+      this.getSummaryDetailList()
324
+    },changeTimeItem(){
325
+
326
+      this.getSummaryDetailList()
327
+
328
+    },
329
+    searchAction() {
330
+      this.item_type = '0'
331
+      this.getSummaryDetailList()
332
+
333
+    },  getSummaryDetailListtwo() {
334
+      this.detail_loading = true
335
+      let start_time = this.chargeDate[0]
336
+      let end_time = this.chargeDate[1]
337
+      let params = {
338
+        start_time: start_time,
339
+        end_time: end_time,
340
+        type: this.item_type,
341
+        keyword: this.keywords
342
+      }
343
+      GetSummaryDetail(params).then(response => {
344
+        if (response.data.state == 0) {
345
+          this.detail_loading = false
346
+
347
+          this.$message.error(response.data.msg)
348
+          return false
349
+        } else {
350
+          this.detail_loading = false
351
+
352
+          this.$confirm('提示', '接口优化升级,如有数据需要,请联系客服!', {
353
+            confirmButtonText: '确 定',
354
+            cancelButtonText: '取 消',
355
+            type: 'warning'
356
+          }).then(() => {
357
+
358
+
359
+          }).catch(() => {
360
+          })
361
+
362
+
363
+        }
364
+
365
+
366
+
367
+
368
+        //
369
+        // console.log('去重前')
370
+        // console.log(advice)
371
+        // console.log(project)
372
+        // //
373
+        // //
374
+
375
+        // //
376
+        // console.log('去重后')
377
+        //
378
+        // console.log(advice.length)
379
+        // console.log(project.length)
380
+        //
381
+        // for (let i = 0; i < project.length; i++) {
382
+        //   let obj = {}
383
+        //   let count = 0
384
+        //   for (let a = 0; a < tempPatientsTwo.length; a++) {
385
+        //     if (project[i].patient_id == tempPatientsTwo[a].patient_id && project[i].item_id == tempPatientsTwo[a].item_id && project[i].price == tempPatientsTwo[a].price) {
386
+        //       count = count + tempPatientsTwo[a].count
387
+        //       obj['count'] = count
388
+        //
389
+        //     }
390
+        //     obj['price'] = project[i].price
391
+        //     obj['type'] = project[i].type
392
+        //     obj['item_name'] = project[i].item_name
393
+        //     obj['item_id'] = project[i].item_id
394
+        //     obj['name'] = project[i].name
395
+        //     obj['patient_id'] = project[i].patient_id
396
+        //     obj['count'] = count
397
+        //     this.tableData.push(obj)
398
+        //   }
399
+        // }
400
+        //
401
+        //
402
+        // for (let i = 0; i < advice.length; i++) {
403
+        //   let obj = {}
404
+        //   let count = 0
405
+        //   for (let a = 0; a < tempPatientsTwo.length; a++) {
406
+        //     if (advice[i].patient_id == tempPatientsTwo[a].patient_id && advice[i].item_id == tempPatientsTwo[a].item_id && advice[i].price == tempPatientsTwo[a].price) {
407
+        //       count = count + tempPatientsTwo[a].count
408
+        //       obj['count'] = count
409
+        //
410
+        //     }
411
+        //     obj['price'] = advice[i].price
412
+        //     obj['type'] = advice[i].type
413
+        //     obj['item_name'] = advice[i].item_name
414
+        //     obj['item_id'] = advice[i].item_id
415
+        //     obj['name'] = advice[i].name
416
+        //     obj['patient_id'] = advice[i].patient_id
417
+        //     this.tableData.push(obj)
418
+        //   }
419
+        // }
420
+        // console.log(this.tableData.length)
421
+        // this.tableData = this.sort(this.tableData)
422
+
423
+      })
424
+    },
425
+    getSummaryDetailList() {
426
+      this.detail_loading = true
427
+      let start_time = this.chargeDate[0]
428
+      let end_time = this.chargeDate[1]
429
+      let params = {
430
+        start_time: start_time,
431
+        end_time: end_time,
432
+        type: this.item_type,
433
+        keyword: this.keywords,
434
+        time_type:this.item_time_type
435
+      }
436
+      GetSummaryDetail(params).then(response => {
437
+        if (response.data.state == 0) {
438
+          this.detail_loading = false
439
+
440
+          this.$message.error(response.data.msg)
441
+          return false
442
+        } else {
443
+
444
+
445
+          this.detail_loading = false
446
+
447
+          this.tableData = []
448
+          let tempPatients = []
449
+          let tempPatientsTwo = []
450
+          //
451
+          let tempData = response.data
452
+          let allData =  response.data
453
+          tempData = this.uniquepid(tempData)
454
+          //
455
+          let order_infos = []
456
+          //
457
+          for (let i = 0; i < tempData.length; i++) {
458
+            let obj = {
459
+              patient_id: tempData[i].p_id,
460
+              name: tempData[i].p_name,
461
+              orders: []
462
+            }
463
+            for (let b = 0; b < allData.length; b++) {
464
+              if (tempData[i].p_id == allData[b].p_id) {
465
+                obj.orders = obj.orders.concat(allData[b])
466
+              }
467
+            }
468
+            tempPatients.push(obj)
469
+          }
470
+          console.log(tempPatients)
471
+          //
472
+          for (let i = 0; i < tempPatients.length; i++) {
473
+            let obj = {
474
+              patient_id: tempPatients[i].patient_id,
475
+              name: tempPatients[i].name,
476
+              order_info: []
477
+            }
478
+            let orders = tempPatients[i].orders
479
+
480
+            for (let c = 0; c < orders.length; c++) {
481
+              let newObj = {}
482
+              newObj['count'] = orders[c].cnt
483
+              newObj['price'] = orders[c].pric
484
+              newObj['item_total'] = orders[c].det_item_fee_sumamt
485
+
486
+              if (orders[c].advice_id > 0 && orders[c].project_id == 0) {
487
+                newObj['type'] = 1
488
+                newObj['item_name'] = orders[c].item_name
489
+                newObj['item_id'] = orders[c].item_id
490
+
491
+                if (orders[c].min_unit != orders[c].dose_unit) {
492
+                  newObj['item_spec'] =  orders[c].dose + orders[c].dose_unit + '*' + orders[c].min_number + orders[c].min_unit + '/' + orders[c].max_unit
493
+                } else {
494
+
495
+                  newObj['item_spec'] = ''
496
+                }
497
+
498
+              }
499
+              if (orders[c].advice_id == 0 && orders[c].project_id > 0) {
500
+                newObj['type'] = 2
501
+                newObj['item_id'] = orders[c].item_id
502
+
503
+                if (orders[c].p_type == 2) {
504
+                  newObj['item_spec'] =""
505
+                  newObj['item_name'] = orders[c].item_name
506
+
507
+
508
+                } else if (orders[c].p_type == 3) {
509
+                  newObj['item_spec'] =  orders[c].specification_name
510
+                  newObj['item_name'] = orders[c].item_name
511
+
512
+
513
+                }
514
+              }
515
+              obj.order_info.push(newObj)
516
+              order_infos.push(orders.order_info)
517
+            }
518
+            tempPatientsTwo.push(obj)
519
+          }
520
+          console.log(tempPatientsTwo)
521
+
522
+          //
523
+          for (let d = 0; d < tempPatientsTwo.length; d++) {
524
+            tempPatientsTwo[d]['new_order_info'] = []
525
+            let project = []
526
+            let advice = []
527
+            for (let b = 0; b < tempPatientsTwo[d].order_info.length; b++) {
528
+              if (tempPatientsTwo[d].order_info[b].type == 1) {
529
+                advice.push(tempPatientsTwo[d].order_info[b])
530
+              } else {
531
+                project.push(tempPatientsTwo[d].order_info[b])
532
+              }
533
+            }
534
+            project = this.uniqueProjectAndAdvice(project)
535
+            advice = this.uniqueProjectAndAdvice(advice)
536
+
537
+            for (let i = 0; i < project.length; i++) {
538
+              let obj = {}
539
+              let count = 0
540
+              for (let a = 0; a < tempPatientsTwo[d].order_info.length; a++) {
541
+                if (project[i].item_id == tempPatientsTwo[d].order_info[a].item_id && project[i].price == tempPatientsTwo[d].order_info[a].price) {
542
+                  count = count + tempPatientsTwo[d].order_info[a].count
543
+                }
544
+              }
545
+
546
+
547
+
548
+              obj['price'] = project[i].price
549
+              obj['type'] = project[i].type
550
+              obj['item_name'] = project[i].item_name
551
+              obj['item_spec'] = project[i].item_spec
552
+              obj['item_total'] = project[i].item_total
553
+
554
+              obj['item_id'] = project[i].item_id
555
+              obj['name'] = tempPatientsTwo[d].name
556
+              obj['patient_id'] = tempPatientsTwo[d].patient_id
557
+              obj['count'] = count
558
+              tempPatientsTwo[d].new_order_info.push(obj)
559
+            }
560
+
561
+            for (let i = 0; i < advice.length; i++) {
562
+              let obj = {}
563
+              let count = 0
564
+              for (let a = 0; a < tempPatientsTwo[d].order_info.length; a++) {
565
+                if (advice[i].item_id == tempPatientsTwo[d].order_info[a].item_id && advice[i].price == tempPatientsTwo[d].order_info[a].price) {
566
+                  count = count + tempPatientsTwo[d].order_info[a].count
567
+                }
568
+              }
569
+
570
+              obj['price'] = advice[i].price
571
+              obj['type'] = advice[i].type
572
+              obj['item_name'] = advice[i].item_name
573
+              obj['item_spec'] = advice[i].item_spec
574
+              obj['item_id'] = advice[i].item_id
575
+              obj['name'] = tempPatientsTwo[d].name
576
+              obj['item_total'] = advice[i].item_total
577
+              obj['patient_id'] = tempPatientsTwo[d].patient_id
578
+              obj['count'] = count
579
+              tempPatientsTwo[d].new_order_info.push(obj)
580
+            }
581
+
582
+          }
583
+          for (let i = 0; i < tempPatientsTwo.length; i++) {
584
+            let total = 0
585
+            for (let b = 0; b < tempPatientsTwo[i].new_order_info.length; b++) {
586
+              let new_name = tempPatientsTwo[i].new_order_info[b].item_name
587
+              if (new_name != undefined){
588
+                if (new_name.length != 0) {
589
+                  console.log(parseFloat(tempPatientsTwo[i].new_order_info[b].count) * parseFloat(tempPatientsTwo[i].new_order_info[b].price))
590
+                  total = parseFloat(total) + parseFloat((parseFloat(tempPatientsTwo[i].new_order_info[b].count) * parseFloat(tempPatientsTwo[i].new_order_info[b].price)).toFixed(2))
591
+                }
592
+
593
+
594
+
595
+              }
596
+
597
+
598
+            }
599
+            tempPatientsTwo[i]['total'] = total
600
+          }
601
+          for (let i = 0; i < tempPatientsTwo.length; i++) {
602
+            // console.log(111,tempPatientsTwo[i].total)
603
+            if (tempPatientsTwo[i].new_order_info.length > 0) {
604
+
605
+              for (let b = 0; b < tempPatientsTwo[i].new_order_info.length; b++) {
606
+                // let new_name = tempPatientsTwo[i].new_order_info[b].item_name
607
+                // console.log('2 ' + new_name)
608
+                //
609
+                // new_name = new_name.replace('( ', '')
610
+                // new_name = new_name.replace(' )', '')
611
+
612
+                let obj = {
613
+                  name: tempPatientsTwo[i].name,
614
+                  patient_id: tempPatientsTwo[i].patient_id,
615
+                  price: tempPatientsTwo[i].new_order_info[b].price,
616
+                  type: tempPatientsTwo[i].new_order_info[b].type,
617
+                  item_name: tempPatientsTwo[i].new_order_info[b].item_name,
618
+                  item_id: tempPatientsTwo[i].new_order_info[b].item_id,
619
+                  count: tempPatientsTwo[i].new_order_info[b].count,
620
+                  item_spec: tempPatientsTwo[i].new_order_info[b].item_spec
621
+                }
622
+
623
+
624
+                // if(b == 0){
625
+                obj['total'] = tempPatientsTwo[i].total
626
+                // }else{
627
+                //   obj['total'] = 0
628
+                // }
629
+                this.tableData.push(obj)
630
+
631
+
632
+
633
+
634
+              }
635
+            }
636
+          }
637
+          console.log( this.tableData)
638
+          this.handleSpanTempArr()
639
+          // this.tableData = tempPatientsTwo
640
+
641
+          // console.log(tempPatientsTwo.length)
642
+          //
643
+          let advices = []
644
+          let projects = []
645
+          let goods = []
646
+          for(let i = 0; i < order_infos.length; i++){
647
+            if(order_infos[i].advice_id > 0 && order_infos[i].project_id == 0){
648
+              advices.push(order_infos[i].advice)
649
+            }
650
+            if(order_infos[i].advice_id == 0 && order_infos[i].project_id > 0){
651
+              if(order_infos[i].project.type == 3){
652
+                goods.push(order_infos[i].project)
653
+              }
654
+            }
655
+            if(order_infos[i].advice_id == 0 && order_infos[i].project_id > 0){
656
+              if(order_infos[i].project.type == 2){
657
+                projects.push(order_infos[i].project)
658
+              }
659
+            }
660
+          }
661
+
662
+        }
663
+
664
+
665
+
666
+
667
+        //
668
+        // console.log('去重前')
669
+        // console.log(advice)
670
+        // console.log(project)
671
+        // //
672
+        // //
673
+
674
+        // //
675
+        // console.log('去重后')
676
+        //
677
+        // console.log(advice.length)
678
+        // console.log(project.length)
679
+        //
680
+        // for (let i = 0; i < project.length; i++) {
681
+        //   let obj = {}
682
+        //   let count = 0
683
+        //   for (let a = 0; a < tempPatientsTwo.length; a++) {
684
+        //     if (project[i].patient_id == tempPatientsTwo[a].patient_id && project[i].item_id == tempPatientsTwo[a].item_id && project[i].price == tempPatientsTwo[a].price) {
685
+        //       count = count + tempPatientsTwo[a].count
686
+        //       obj['count'] = count
687
+        //
688
+        //     }
689
+        //     obj['price'] = project[i].price
690
+        //     obj['type'] = project[i].type
691
+        //     obj['item_name'] = project[i].item_name
692
+        //     obj['item_id'] = project[i].item_id
693
+        //     obj['name'] = project[i].name
694
+        //     obj['patient_id'] = project[i].patient_id
695
+        //     obj['count'] = count
696
+        //     this.tableData.push(obj)
697
+        //   }
698
+        // }
699
+        //
700
+        //
701
+        // for (let i = 0; i < advice.length; i++) {
702
+        //   let obj = {}
703
+        //   let count = 0
704
+        //   for (let a = 0; a < tempPatientsTwo.length; a++) {
705
+        //     if (advice[i].patient_id == tempPatientsTwo[a].patient_id && advice[i].item_id == tempPatientsTwo[a].item_id && advice[i].price == tempPatientsTwo[a].price) {
706
+        //       count = count + tempPatientsTwo[a].count
707
+        //       obj['count'] = count
708
+        //
709
+        //     }
710
+        //     obj['price'] = advice[i].price
711
+        //     obj['type'] = advice[i].type
712
+        //     obj['item_name'] = advice[i].item_name
713
+        //     obj['item_id'] = advice[i].item_id
714
+        //     obj['name'] = advice[i].name
715
+        //     obj['patient_id'] = advice[i].patient_id
716
+        //     this.tableData.push(obj)
717
+        //   }
718
+        // }
719
+        // console.log(this.tableData.length)
720
+        // this.tableData = this.sort(this.tableData)
721
+
722
+      })
723
+    }, uniqueProjectAndAdvice(array) {
724
+      // res用来存储结果
725
+      var res = []
726
+      for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
727
+        for (var j = 0, resLen = res.length; j < resLen; j++) {
728
+          if (array[i].item_id === res[j].item_id && array[i].price === res[j].price) {
729
+            break
730
+          }
731
+        }
732
+        // 如果array[i]是唯一的,那么执行完循环,j等于resLen
733
+        if (j === resLen) {
734
+          res.push(array[i])
735
+        }
736
+      }
737
+      return res
738
+    }, sort(arr) {
739
+      for (var i = 0; i < arr.length - 1; i++) {
740
+        for (var j = 0; j < arr.length - i - 1; j++) {
741
+          if (arr[j].patient_id > arr[j + 1].patient_id) {// 相邻元素两两对比
742
+            var hand = arr[j]
743
+            arr[j] = arr[j + 1]
744
+            arr[j + 1] = hand
745
+
746
+          }
747
+        }
748
+      }
749
+      return arr
750
+    }, handleSpanTempArr() {
751
+      this.tempArr = []
752
+
753
+      for (let i = 0; i < this.tableData.length; i++) {
754
+        if (i === 0) {
755
+          this.tempArr.push(1)
756
+          this.pos = 0
757
+        } else {
758
+          // 判断当前元素与上一个元素是否相同
759
+          if (this.tableData[i].patient_id === this.tableData[i - 1].patient_id) {
760
+            this.tempArr[this.pos] += 1
761
+            this.tempArr.push(0)
762
+          } else {
763
+            this.tempArr.push(1)
764
+            this.pos = i
765
+          }
766
+        }
767
+      }
768
+
769
+      let sameRowArr = [], sIdx = 0
770
+      this.tableData.forEach((item, index) => {
771
+        item.index = index
772
+        if (index === 0) {
773
+          sameRowArr.push([index])
774
+        } else {
775
+          if (item.patient_id === this.tableData[index - 1].patient_id) {
776
+            sameRowArr[sIdx].push(index)
777
+          } else {
778
+            sIdx = sIdx + 1
779
+            sameRowArr.push([index])
780
+          }
781
+        }
782
+      })
783
+      this.sameRowArr = sameRowArr
784
+    }, merge({ row, column, rowIndex, columnIndex }) {
785
+      if (columnIndex === 0 || columnIndex === 6) {
786
+        const _row = this.tempArr[rowIndex]
787
+        const _col = _row > 0 ? 1 : 0
788
+        return {
789
+          rowspan: _row,
790
+          colspan: _col
791
+        }
792
+      }
793
+    }, export_detail() {
794
+
795
+      let list = []
796
+      for (let i = 0; i < this.tableData.length; i++) {
797
+        let order = this.tableData[i]
798
+        let name = order.name
799
+        let item_name = order.item_name
800
+        let count = order.count
801
+        let price = order.price.toFixed(2)
802
+        let pay_sumamt = (order.price.toFixed(2) * order.count).toFixed(2)
803
+        let total = order.total.toFixed(2)
804
+
805
+        let obj = {
806
+          '患者姓名': name,
807
+          '项目名称': item_name,
808
+          '数量': count,
809
+          '单价': price,
810
+          '费用': pay_sumamt,
811
+          '费用总额': total
812
+        }
813
+        list.push(obj)
814
+      }
815
+      import('@/vendor/Export2Excel').then(excel => {
816
+        const tHeader = ['患者姓名', '项目名称', '数量', '单价', '费用', '费用总额']
817
+        const filterVal = ['患者姓名', '项目名称', '数量', '单价', '费用', '费用总额']
818
+        const data = this.formatJson(filterVal, list)
819
+        excel.export_json_to_excel1({
820
+          header: tHeader,
821
+          data,
822
+          filename: '明细',
823
+          ref: this.$refs['table'].$el
824
+        })
825
+      })
826
+
827
+    }, formatJson(filterVal, jsonData) {
828
+      return jsonData.map(v => filterVal.map(j => v[j]))
829
+    }, getTotal(param) {
830
+      const { columns, data } = param
831
+      const sums = []
832
+      columns.forEach((column, index) => {
833
+        if (index === 0) {
834
+          sums[index] = '合计'
835
+          return
836
+        }
837
+        const values = data.map(item => Number(item[column.property]))
838
+        if (column.property === 'total') {
839
+          // sums[index] = values.reduce((prev, curr) => {
840
+          //   const value = Number(curr)
841
+          //   if (!isNaN(value)) {
842
+          //     return prev + curr
843
+          //   } else {
844
+          //     return prev
845
+          //   }
846
+          // }, 0)
847
+          // sums[index] = sums[index].toFixed(2)
848
+          let num = 0
849
+          data.map(item => {
850
+            num += item.price * item.count
851
+          })
852
+          sums[index] = num.toFixed(2)
853
+        } else {
854
+          sums[index] = ''
855
+        }
856
+      })
857
+
858
+      return sums
859
+    }
860
+  },
861
+  created() {
862
+    this.getSummaryDetailList()
863
+
864
+  }
865
+}
866
+</script>

+ 576 - 0
src/xt_pages/outpatientTool/components/pgather.vue Ver fichero

@@ -0,0 +1,576 @@
1
+<template>
2
+  <div>
3
+    <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
4
+      <div>
5
+        <!--<el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"-->
6
+        <!--@click="Action">-->
7
+        <!--导出-->
8
+        <!--</el-button>-->
9
+        <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"
10
+                  @keyup.enter.native='searchAction'
11
+                  placeholder="请输入患者姓名"
12
+
13
+                  class="filter-item"/>
14
+        <el-select size="small" v-model="item_type" placeholder="请选择"
15
+                   style="width:150px;margin-left:10px;" @change="changeItem">
16
+          <el-option
17
+            label="全部"
18
+            value="0">
19
+          </el-option>
20
+          <el-option
21
+            v-for="item,index in items"
22
+            :key="index"
23
+            :label="item.name"
24
+            :value="item.id">
25
+          </el-option>
26
+        </el-select>
27
+        <el-select size="small" v-model="item_time_type" placeholder="请选择"
28
+                   style="width:150px;margin-left:10px;" @change="changeTimeItem">
29
+          <el-option
30
+            label="处方时间"
31
+            value="0">
32
+          </el-option>
33
+          <el-option
34
+            label="结算时间"
35
+            value="1">
36
+          </el-option>
37
+        </el-select>
38
+        <el-date-picker
39
+          v-model="chargeDate"
40
+          type="daterange"
41
+          value-format="yyyy-MM-dd"
42
+          range-separator="至"
43
+          start-placeholder="开始日期"
44
+          @change="changeDate"
45
+          end-placeholder="结束日期">
46
+        </el-date-picker>
47
+        <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
48
+        <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
49
+      </div>
50
+      <div>
51
+        <!-- <el-popover
52
+          placement="bottom"
53
+          width="210"
54
+          trigger="click">
55
+          <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
56
+          <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
57
+          <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>
58
+
59
+        </el-popover> -->
60
+        <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
61
+      </div>
62
+    </div>
63
+    <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="tables"
64
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
65
+              v-loading="gather_loading"
66
+              show-summary
67
+              max-height="600"
68
+              :span-method="merge"
69
+              :summary-method="getTotal"
70
+              highlight-current-row>
71
+
72
+      <el-table-column align="center" prop="name" label="费用分类">
73
+        <template slot-scope="scope">{{ scope.row.name }}</template>
74
+      </el-table-column>
75
+      <!--<el-table-column align="center" prop="name" label="患者类型">-->
76
+      <!--<template slot-scope="scope"></template>-->
77
+      <!--</el-table-column>-->
78
+
79
+      <el-table-column align="center" prop="item_name" label="处方类型">
80
+        <template slot-scope="scope">{{scope.row.item_name}}</template>
81
+      </el-table-column>
82
+      <el-table-column align="center" prop="price" label="项目名称">
83
+        <template slot-scope="scope">{{scope.row.price.toFixed(2)}}</template>
84
+      </el-table-column>
85
+      <el-table-column align="center" prop="sum" label="费用总额">
86
+        <template slot-scope="scope">
87
+          <div>{{scope.row.sum.toFixed(2)}}</div>
88
+        </template>
89
+      </el-table-column>
90
+
91
+    </el-table>
92
+  </div>
93
+</template>
94
+
95
+
96
+<script>
97
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
98
+import { GetSummaryDetail } from '@/api/his/his'
99
+import { uParseTime } from '@/utils/tools'
100
+// import NewStatementPrint from './newStatementPrint'
101
+const moment = require('moment')
102
+export default {
103
+  components: {
104
+    BreadCrumb
105
+
106
+  },
107
+  data() {
108
+    return {
109
+      gather_loading:false,
110
+      crumbs: [],
111
+      tempArr: [],
112
+      sameRowArr: [],
113
+      keywords: '',
114
+      pos:0,
115
+
116
+      tableData: [],
117
+      chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
118
+      item_type: '0',
119
+      item_time_type:'0',
120
+      items: [
121
+        { id: 1, name: '药品' },
122
+        { id: 2, name: '所有项目' },
123
+        { id: 4, name: '检验费' },
124
+        { id: 5, name: '治疗费' },
125
+        { id: 6, name: '护理费' },
126
+        { id: 7, name: '其他' },
127
+
128
+        { id: 3, name: '耗材' },
129
+
130
+      ]
131
+
132
+    }
133
+  },
134
+  methods: {
135
+
136
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
137
+      if (columnIndex === 0) {
138
+        if (rowIndex % 2 === 0) {
139
+          return {
140
+            rowspan: 2,
141
+            colspan: 1
142
+          }
143
+        } else {
144
+          return {
145
+            rowspan: 0,
146
+            colspan: 0
147
+          }
148
+        }
149
+      }
150
+    },
151
+    unique(arr) {
152
+      const res = new Map()
153
+      return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
154
+    },
155
+    changeDate() {
156
+      // console.log(this.chargeDate)
157
+      this.getSummaryDetailList()
158
+    },changeTimeItem(){
159
+      this.getSummaryDetailList()
160
+    },
161
+    changeItem() {
162
+      this.getSummaryDetailList()
163
+    }, uniquepid(arr) {
164
+      const res = new Map()
165
+      return arr.filter((arr) => !res.has(arr.p_id) && res.set(arr.p_id, 1))
166
+    },
167
+    searchAction() {
168
+      this.item_type = '0'
169
+      this.getSummaryDetailList()
170
+    },
171
+    getSummaryDetailList() {
172
+      this.gather_loading = true
173
+      let start_time = this.chargeDate[0]
174
+      let end_time = this.chargeDate[1]
175
+      let params = {
176
+        start_time: start_time,
177
+        end_time: end_time,
178
+        type: this.item_type,
179
+        keyword: this.keywords,
180
+        time_type:this.item_time_type,
181
+      }
182
+      GetSummaryDetail(params).then(response => {
183
+        if (response.data.state == 0) {
184
+          this.gather_loading = false
185
+
186
+          this.$message.error(response.data.msg)
187
+          return false
188
+        } else {
189
+          this.gather_loading = false
190
+
191
+          let tempPatients = []
192
+          let tempPatientsTwo = []
193
+          this.tableData = []
194
+          let tempData = response.data
195
+          let data = response.data
196
+          let orders = this.uniquepid(tempData)
197
+          console.log(orders)
198
+
199
+          for (let i = 0; i < orders.length; i++) {
200
+            let obj = {
201
+              patient_id: orders[i].p_id,
202
+              name: orders[i].p_name,
203
+              orders: []
204
+            }
205
+            for (let b = 0; b < data.length; b++) {
206
+              if (orders[i].p_id == data[b].p_id) {
207
+                obj.orders = obj.orders.concat(data[b])
208
+              }
209
+            }
210
+            tempPatients.push(obj)
211
+          }
212
+          console.log(tempPatients)
213
+
214
+          for (let i = 0; i < tempPatients.length; i++) {
215
+            let obj = {
216
+              patient_id: tempPatients[i].patient_id,
217
+              name: tempPatients[i].name,
218
+              order_info: []
219
+            }
220
+            let orders = tempPatients[i].orders
221
+            for (let c = 0; c < orders.length; c++) {
222
+              let newObj = {}
223
+
224
+              newObj['count'] = orders[c].cnt
225
+              newObj['price'] = orders[c].pric
226
+              if (orders[c].advice_id > 0 && orders[c].project_id == 0) {
227
+                newObj['type'] = 1
228
+                newObj['item_name'] = orders[c].item_name
229
+                newObj['item_id'] = orders[c].item_id
230
+
231
+              }
232
+              if (orders[c].advice_id == 0 && orders[c].project_id > 0) {
233
+                newObj['item_id'] = orders[c].item_id
234
+                if (orders[c].p_type == 2) {
235
+                  newObj['type'] = 2
236
+                  newObj['item_name'] = orders[c].item_name
237
+                } else if (orders[c].p_type == 3) {
238
+                  newObj['type'] = 3
239
+                  newObj['item_name'] = orders[c].item_name
240
+                }
241
+              }
242
+              obj.order_info.push(newObj)
243
+            }
244
+            tempPatientsTwo.push(obj)
245
+          }
246
+          console.log(tempPatientsTwo)
247
+
248
+          for (let d = 0; d < tempPatientsTwo.length; d++) {
249
+            tempPatientsTwo[d]['new_order_info'] = []
250
+            let project = []
251
+            let advice = []
252
+            for (let b = 0; b < tempPatientsTwo[d].order_info.length; b++) {
253
+              if (tempPatientsTwo[d].order_info[b].type == 1) {
254
+                advice.push(tempPatientsTwo[d].order_info[b])
255
+              } else {
256
+                project.push(tempPatientsTwo[d].order_info[b])
257
+              }
258
+            }
259
+            // project = this.uniqueProjectAndAdvice(project)
260
+            // advice = this.uniqueProjectAndAdvice(advice)
261
+
262
+            let obj = {}
263
+            let price = 0
264
+
265
+            let obj2 = {}
266
+            let price2 = 0
267
+
268
+            let obj3 = {}
269
+            let price3 = 0
270
+
271
+            for (let i = 0; i < project.length; i++) {
272
+              if (project[i].type == 2) {
273
+                price = parseFloat(price.toString()) + parseFloat((parseFloat(project[i].count.toString()) * parseFloat(project[i].price.toString()).toFixed(2)).toString())
274
+              } else if (project[i].type == 3) {
275
+                price3 = parseFloat(price3.toString()) + parseFloat((parseFloat(project[i].count.toString()) * parseFloat(project[i].price.toString()).toFixed(2)).toString())
276
+              }
277
+            }
278
+
279
+
280
+            for (let i = 0; i < advice.length; i++) {
281
+              price2 = parseFloat(price2.toString()) + parseFloat((parseFloat(advice[i].count.toString()) * parseFloat(advice[i].price.toString()).toFixed(2)).toString())
282
+            }
283
+
284
+
285
+            switch (parseInt(this.item_type)) {
286
+              case 0:
287
+
288
+                obj['sum'] = price + price2 + price3
289
+                obj['price'] = price
290
+                obj['item_name'] = '项目'
291
+                obj['name'] = tempPatientsTwo[d].name
292
+                obj['patient_id'] = tempPatientsTwo[d].patient_id
293
+                this.tableData.push(obj)
294
+
295
+                obj2['sum'] = 0
296
+                obj2['price'] = price2
297
+                obj2['item_name'] = '药品'
298
+                obj2['name'] = tempPatientsTwo[d].name
299
+                obj2['patient_id'] = tempPatientsTwo[d].patient_id
300
+                this.tableData.push(obj2)
301
+
302
+                obj3['sum'] = 0
303
+                obj3['price'] = price3
304
+                obj3['item_name'] = '耗材'
305
+                obj3['name'] = tempPatientsTwo[d].name
306
+                obj3['patient_id'] = tempPatientsTwo[d].patient_id
307
+                this.tableData.push(obj3)
308
+                break
309
+              case 1:
310
+                obj2['sum'] = price2
311
+                obj2['price'] = price2
312
+                obj2['item_name'] = '药品'
313
+                obj2['name'] = tempPatientsTwo[d].name
314
+                obj2['patient_id'] = tempPatientsTwo[d].patient_id
315
+                this.tableData.push(obj2)
316
+                break
317
+              case 2:
318
+
319
+                obj['sum'] = price
320
+                obj['price'] = price
321
+                obj['item_name'] = '项目'
322
+                obj['name'] = tempPatientsTwo[d].name
323
+                obj['patient_id'] = tempPatientsTwo[d].patient_id
324
+                this.tableData.push(obj)
325
+                break
326
+              case 3:
327
+                obj3['sum'] = price3
328
+                obj3['price'] = price3
329
+                obj3['item_name'] = '耗材'
330
+                obj3['name'] = tempPatientsTwo[d].name
331
+                obj3['patient_id'] = tempPatientsTwo[d].patient_id
332
+                this.tableData.push(obj3)
333
+                break
334
+              case 4:
335
+
336
+                obj['sum'] = price
337
+                obj['price'] = price
338
+                obj['item_name'] = '检验'
339
+                obj['name'] = tempPatientsTwo[d].name
340
+                obj['patient_id'] = tempPatientsTwo[d].patient_id
341
+                this.tableData.push(obj)
342
+                break
343
+              case 5:
344
+
345
+                obj['sum'] = price
346
+                obj['price'] = price
347
+                obj['item_name'] = '治疗'
348
+                obj['name'] = tempPatientsTwo[d].name
349
+                obj['patient_id'] = tempPatientsTwo[d].patient_id
350
+                this.tableData.push(obj)
351
+                break
352
+              case 6:
353
+
354
+                obj['sum'] = price
355
+                obj['price'] = price
356
+                obj['item_name'] = '护理'
357
+                obj['name'] = tempPatientsTwo[d].name
358
+                obj['patient_id'] = tempPatientsTwo[d].patient_id
359
+                this.tableData.push(obj)
360
+                break
361
+              case 7:
362
+
363
+                obj['sum'] = price
364
+                obj['price'] = price
365
+                obj['item_name'] = '其他'
366
+                obj['name'] = tempPatientsTwo[d].name
367
+                obj['patient_id'] = tempPatientsTwo[d].patient_id
368
+                this.tableData.push(obj)
369
+                break
370
+
371
+            }
372
+
373
+
374
+
375
+          }
376
+
377
+          this.handleSpanTempArr()
378
+          // this.tableData = tempPatientsTwo
379
+
380
+          // console.log(tempPatientsTwo.length)
381
+          //
382
+
383
+        }
384
+        //
385
+        // console.log('去重前')
386
+        // console.log(advice)
387
+        // console.log(project)
388
+        // //
389
+        // //
390
+
391
+        // //
392
+        // console.log('去重后')
393
+        //
394
+        // console.log(advice.length)
395
+        // console.log(project.length)
396
+        //
397
+        // for (let i = 0; i < project.length; i++) {
398
+        //   let obj = {}
399
+        //   let count = 0
400
+        //   for (let a = 0; a < tempPatientsTwo.length; a++) {
401
+        //     if (project[i].patient_id == tempPatientsTwo[a].patient_id && project[i].item_id == tempPatientsTwo[a].item_id && project[i].price == tempPatientsTwo[a].price) {
402
+        //       count = count + tempPatientsTwo[a].count
403
+        //       obj['count'] = count
404
+        //
405
+        //     }
406
+        //     obj['price'] = project[i].price
407
+        //     obj['type'] = project[i].type
408
+        //     obj['item_name'] = project[i].item_name
409
+        //     obj['item_id'] = project[i].item_id
410
+        //     obj['name'] = project[i].name
411
+        //     obj['patient_id'] = project[i].patient_id
412
+        //     obj['count'] = count
413
+        //     this.tableData.push(obj)
414
+        //   }
415
+        // }
416
+        //
417
+        //
418
+        // for (let i = 0; i < advice.length; i++) {
419
+        //   let obj = {}
420
+        //   let count = 0
421
+        //   for (let a = 0; a < tempPatientsTwo.length; a++) {
422
+        //     if (advice[i].patient_id == tempPatientsTwo[a].patient_id && advice[i].item_id == tempPatientsTwo[a].item_id && advice[i].price == tempPatientsTwo[a].price) {
423
+        //       count = count + tempPatientsTwo[a].count
424
+        //       obj['count'] = count
425
+        //
426
+        //     }
427
+        //     obj['price'] = advice[i].price
428
+        //     obj['type'] = advice[i].type
429
+        //     obj['item_name'] = advice[i].item_name
430
+        //     obj['item_id'] = advice[i].item_id
431
+        //     obj['name'] = advice[i].name
432
+        //     obj['patient_id'] = advice[i].patient_id
433
+        //     this.tableData.push(obj)
434
+        //   }
435
+        // }
436
+        // console.log(this.tableData.length)
437
+        // this.tableData = this.sort(this.tableData)
438
+
439
+      })
440
+    }, uniqueProjectAndAdvice(array) {
441
+      // res用来存储结果
442
+      var res = []
443
+      for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
444
+        for (var j = 0, resLen = res.length; j < resLen; j++) {
445
+          if (array[i].item_id === res[j].item_id && array[i].price === res[j].price) {
446
+            break
447
+          }
448
+        }
449
+        // 如果array[i]是唯一的,那么执行完循环,j等于resLen
450
+        if (j === resLen) {
451
+          res.push(array[i])
452
+        }
453
+      }
454
+      return res
455
+    }, sort(arr) {
456
+      for (var i = 0; i < arr.length - 1; i++) {
457
+        for (var j = 0; j < arr.length - i - 1; j++) {
458
+          if (arr[j].patient_id > arr[j + 1].patient_id) {// 相邻元素两两对比
459
+            var hand = arr[j]
460
+            arr[j] = arr[j + 1]
461
+            arr[j + 1] = hand
462
+
463
+          }
464
+        }
465
+      }
466
+      return arr
467
+    }, handleSpanTempArr() {
468
+      this.tempArr = []
469
+
470
+      for (let i = 0; i < this.tableData.length; i++) {
471
+        if (i === 0) {
472
+          this.tempArr.push(1)
473
+          this.pos = 0
474
+        } else {
475
+          // 判断当前元素与上一个元素是否相同
476
+          if (this.tableData[i].patient_id === this.tableData[i - 1].patient_id) {
477
+            this.tempArr[this.pos] += 1
478
+            this.tempArr.push(0)
479
+          } else {
480
+            this.tempArr.push(1)
481
+            this.pos = i
482
+          }
483
+        }
484
+      }
485
+
486
+      let sameRowArr = [], sIdx = 0
487
+      this.tableData.forEach((item, index) => {
488
+        item.index = index
489
+        if (index === 0) {
490
+          sameRowArr.push([index])
491
+        } else {
492
+          if (item.patient_id === this.tableData[index - 1].patient_id) {
493
+            sameRowArr[sIdx].push(index)
494
+          } else {
495
+            sIdx = sIdx + 1
496
+            sameRowArr.push([index])
497
+          }
498
+        }
499
+      })
500
+      this.sameRowArr = sameRowArr
501
+    }, merge({ row, column, rowIndex, columnIndex }) {
502
+      if (columnIndex === 0 || columnIndex === 3) {
503
+        const _row = this.tempArr[rowIndex]
504
+        const _col = _row > 0 ? 1 : 0
505
+        return {
506
+          rowspan: _row,
507
+          colspan: _col
508
+        }
509
+      }
510
+    }, getTotal(param) {
511
+      const { columns, data } = param
512
+      const sums = []
513
+      columns.forEach((column, index) => {
514
+        if (index === 0) {
515
+          sums[index] = '合计'
516
+          return
517
+        }
518
+        console.log(data)
519
+        const values = data.map(item => Number(item[column.property]))
520
+        if (column.property === 'sum') {
521
+          sums[index] = values.reduce((prev, curr) => {
522
+            const value = Number(curr)
523
+            if (!isNaN(value)) {
524
+              return prev + curr
525
+            } else {
526
+              return prev
527
+            }
528
+          }, 0)
529
+          sums[index] = sums[index].toFixed(2)
530
+        } else {
531
+          sums[index] = ''
532
+        }
533
+      })
534
+
535
+      return sums
536
+    }, export_detail() {
537
+
538
+      let list = []
539
+      for (let i = 0; i < this.tableData.length; i++) {
540
+        let order = this.tableData[i]
541
+        let name = order.name
542
+        let item_name = order.item_name
543
+        let pay_sumamt = order.price.toFixed(2)
544
+        let total = order.sum.toFixed(2)
545
+
546
+
547
+        let obj = {
548
+          '患者姓名': name,
549
+          '项目类别': item_name,
550
+          '费用': pay_sumamt,
551
+          '费用总额':total,
552
+        }
553
+        list.push(obj)
554
+      }
555
+      import('@/vendor/Export2Excel').then(excel => {
556
+        const tHeader = [ '患者姓名', '项目名称', '费用', '费用总额']
557
+        const filterVal = [ '患者姓名', '项目名称', '费用', '费用总额']
558
+        const data = this.formatJson(filterVal, list)
559
+        excel.export_json_to_excel1({
560
+          header: tHeader,
561
+          data,
562
+          filename: '汇总',
563
+          ref:this.$refs['tables'].$el
564
+        })
565
+      })
566
+
567
+    }, formatJson(filterVal, jsonData) {
568
+      return jsonData.map(v => filterVal.map(j => v[j]))
569
+    }
570
+  },
571
+  created() {
572
+    this.getSummaryDetailList()
573
+
574
+  }
575
+}
576
+</script>

+ 9 - 2
src/xt_pages/qcd/indicatorControlAnalysis/components/office.vue Ver fichero

@@ -45,7 +45,7 @@
45 45
         :editable="false"
46 46
         style="width: 150px;"
47 47
         type="date"
48
-       
48
+
49 49
         placeholder="选择日期时间"
50 50
         align="right"
51 51
         format="yyyy-MM-dd"
@@ -57,7 +57,7 @@
57 57
         prefix-icon="el-icon-date"
58 58
         @change="changeEndTime"
59 59
         :editable="false"
60
-        
60
+
61 61
         style="width: 150px;"
62 62
         type="date"
63 63
         placeholder="选择日期时间"
@@ -323,6 +323,7 @@
323 323
         var projectInfo = this.getPojectInfo(this.query.project_id, val)
324 324
         console.log(projectInfo)
325 325
         this.item_name = projectInfo.item_name
326
+        this.query.range_type = projectInfo.range_type
326 327
 
327 328
         this.GetRangeValue(projectInfo.range_type, projectInfo.project_id, projectInfo.item_id)
328 329
 
@@ -384,8 +385,14 @@
384 385
 
385 386
       },
386 387
       getPojectInfo(project_id, item_id) {
388
+        console.log(project_id)
389
+        console.log(item_id)
390
+        console.log(this.all_inspection_reference)
391
+
392
+
387 393
         for (let i = 0; i < this.all_inspection_reference.length; i++) {
388 394
           if (this.all_inspection_reference[i].project_id == project_id && this.all_inspection_reference[i].item_id == item_id) {
395
+            console.log(this.all_inspection_reference[i])
389 396
             return this.all_inspection_reference[i]
390 397
           }
391 398
         }

+ 20 - 0
src/xt_pages/stock/drugs/drugStockOutOrder.vue Ver fichero

@@ -322,6 +322,15 @@
322 322
                </tr>
323 323
             </template>
324 324
           </el-table-column>
325
+          <el-table-column label="出库班次" align="center" v-if="is_sys == 0">
326
+            <template slot-scope="scope">
327
+                <tr style="background: none" v-for="(item,index) in scope.row.child" :key="index">
328
+                  <td style="border-right: none; border-inline-end: none;text-align: center">
329
+                    {{ getClassType(scope.row.drug_id)}}
330
+                  </td>
331
+               </tr>
332
+            </template>
333
+          </el-table-column>
325 334
           <el-table-column label="出库对象" align="center" v-if="is_sys == 0">
326 335
             <template slot-scope="scope">
327 336
                 <tr style="background: none" v-for="(item,index) in scope.row.child" :key="index">
@@ -867,6 +876,8 @@ export default {
867 876
             this.houseList.push(response.data.data.houseList[i]);
868 877
           }
869 878
           var objOne = {id:0,name:"系统"}
879
+          var objTwo = {id:-1,name:"血透室"}
880
+          this.patients.push(objTwo)
870 881
           this.patients.push(objOne)
871 882
           for(let i=0;i<response.data.data.patients.length;i++){
872 883
              this.patients.push(response.data.data.patients[i])
@@ -2547,6 +2558,15 @@ export default {
2547 2558
          }
2548 2559
       }
2549 2560
       return str
2561
+    },
2562
+    getClassType(drug_id){
2563
+      var str = ""
2564
+      for(let i=0;i<this.outList.length;i++){
2565
+         if(drug_id == this.outList[i].drug_id){
2566
+            str = this.outList[i].class_type
2567
+         }
2568
+      }
2569
+      return str
2550 2570
     }
2551 2571
   },
2552 2572
 };

+ 20 - 2
src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue Ver fichero

@@ -250,6 +250,21 @@
250 250
           </el-table-column>
251 251
 
252 252
 
253
+          <el-table-column label="使用班次"  width="100" align="center">
254
+            <template slot-scope="scope">
255
+               <el-select size="small" v-model="scope.row.class_type" filterable placeholder="请选择出库班次">
256
+                <el-option
257
+                  v-for="(option, index) in classType"
258
+                  :key="index"
259
+                  :label="option.name"
260
+                  :value="option.name">
261
+                </el-option>
262
+               </el-select>
263
+            </template>
264
+          </el-table-column>
265
+
266
+
267
+
253 268
           <el-table-column label="使用患者"  width="150" align="center">
254 269
             <template slot-scope="scope">
255 270
                <el-select size="small" v-model="scope.row.patient_id" filterable placeholder="请选择出库对象">
@@ -517,6 +532,7 @@ export default {
517 532
       showReturnCheck:false,
518 533
       warehouse_out_id:0,
519 534
       patients:[],
535
+      classType:[{id:1,name:"上午"},{id:2,name:"下午"},{id:3,name:"晚上"}],
520 536
     };
521 537
   },
522 538
   methods: {
@@ -560,15 +576,15 @@ export default {
560 576
           this.list = response.data.data.list;
561 577
           this.doctorList = response.data.data.doctorList;
562 578
           var obj ={id:0,name:"系统"}
579
+          var objOne = {id:-1,name:"血透室"}
563 580
           this.patients =[]
581
+          this.patients.push(objOne)
564 582
           this.patients.push(obj)
565 583
           if(response.data.data.patients!=null){
566 584
             for(let i=0;i<response.data.data.patients.length;i++){
567 585
               this.patients.push(response.data.data.patients[i])
568 586
             }
569 587
           }
570
-          // this.doctorList.push({index:999,user_name:"护士站", admin_user_id:999})
571
-        
572 588
         }
573 589
         loading.close();
574 590
       });
@@ -619,6 +635,7 @@ export default {
619 635
       tempObj["patient_id"] =0
620 636
       tempObj["expiry_date"] = ""
621 637
       tempObj["product_date"] = ""
638
+      tempObj["class_type"]= ""
622 639
       this.recordInfo.recordData.push(tempObj);
623 640
     },
624 641
     handleDelete: function (index, row) {
@@ -1236,6 +1253,7 @@ export default {
1236 1253
     tempObj["patient_id"] = 0
1237 1254
     tempObj["product_date"] = ""
1238 1255
     tempObj["expiry_date"]=""
1256
+    tempObj["class_type"] = ""
1239 1257
     this.recordInfo.recordData.push(tempObj);
1240 1258
     this.GetConfigInfo();
1241 1259
     this.propForm.goodUnit = this.$store.getters.good_unit;

+ 20 - 1
src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue Ver fichero

@@ -276,6 +276,19 @@
276 276
             </template>
277 277
           </el-table-column>
278 278
 
279
+          <el-table-column label="使用班次"  width="100" align="center">
280
+            <template slot-scope="scope">
281
+               <el-select size="small" v-model="scope.row.class_type" filterable placeholder="请选择出库班次">
282
+                <el-option
283
+                  v-for="(option, index) in classType"
284
+                  :key="index"
285
+                  :label="option.name"
286
+                  :value="option.name">
287
+                </el-option>
288
+               </el-select>
289
+            </template>
290
+          </el-table-column>
291
+
279 292
           <el-table-column label="使用患者" width="140" align="center">
280 293
             <template slot-scope="scope">
281 294
               <el-select
@@ -549,7 +562,8 @@ export default {
549 562
       storehouse_id: "",
550 563
       is_check:0,
551 564
       order_id:0,
552
-      patients:[]
565
+      patients:[],
566
+      classType:[{id:1,name:"上午"},{id:2,name:"下午"},{id:3,name:"晚上"}],
553 567
     };
554 568
   },
555 569
   methods: {
@@ -685,6 +699,7 @@ export default {
685 699
       tempObj["max_unit_fisrt"] = 0;
686 700
       tempObj["min_unit_fisrt"] = 0;
687 701
       tempObj["patient_id"] =0
702
+      tempObj["class_type"] = ""
688 703
       this.recordInfo.recordData.push(tempObj);
689 704
     },
690 705
     handleDelete: function (index, row) {
@@ -1004,6 +1019,8 @@ export default {
1004 1019
             response.data.data.list[i].stock_count = response.data.data.list[i].stock_count;
1005 1020
             response.data.data.list[i].last_price = response.data.data.list[i].last_price;
1006 1021
             response.data.data.list[i].patient_id = response.data.data.list[i].patient_id
1022
+            console.log("response.data.data.list[i].class_type",response.data.data.list[i])
1023
+            response.data.data.list[i].class_type =  response.data.data.list[i].class_type
1007 1024
             this.recordInfo.recordData.push(response.data.data.list[i]);
1008 1025
           }
1009 1026
 
@@ -1035,8 +1052,10 @@ export default {
1035 1052
           this.houstList = response.data.data.houstList;
1036 1053
           this.doctorList = response.data.data.doctorList;
1037 1054
           var obj ={id:0,name:"系统"}
1055
+          var objOne ={id:-1,name:"血透室"}
1038 1056
           this.patients =[]
1039 1057
           this.patients.push(obj)
1058
+          this.patients.push(objOne)
1040 1059
           if(response.data.data.patients!=null){
1041 1060
             for(let i=0;i<response.data.data.patients.length;i++){
1042 1061
               this.patients.push(response.data.data.patients[i])

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1107 - 0
src/xt_pages/stock/selfPreparedMedicine/addWarehouseInfo.vue


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1208 - 0
src/xt_pages/stock/selfPreparedMedicine/addWarehouseOut.vue


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1101 - 0
src/xt_pages/stock/selfPreparedMedicine/editWarehouseInfo.vue


+ 0 - 0
src/xt_pages/stock/selfPreparedMedicine/editWarehouseOut.vue Ver fichero


+ 934 - 0
src/xt_pages/stock/selfPreparedMedicine/warehouseInfo.vue Ver fichero

@@ -0,0 +1,934 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+      <el-button
6
+        size="small"
7
+        @click="handleWarehouse"
8
+        class="filter-item"
9
+        style="float: right"
10
+        type="primary"
11
+        icon="el-icon-circle-plus-outline"
12
+        >新增</el-button
13
+      >
14
+    </div>
15
+
16
+    <div class="app-container">
17
+      <div class="cell clearfix">
18
+        <label class="title"><span class="name">患者</span> :</label>
19
+        <el-select
20
+          size="small"
21
+          v-model="patient_id"
22
+          filterable
23
+          placeholder="请选择患者"
24
+          style="width: 200px"
25
+          @change="changeStoreHouse"
26
+        >
27
+          <el-option
28
+            v-for="(option, index) in patientList"
29
+            :key="index"
30
+            :label="option.name"
31
+            :value="option.id"
32
+          >
33
+          </el-option>
34
+        </el-select>
35
+        <el-input
36
+          size="small"
37
+          style="width: 200px"
38
+          v-model.trim="searchKey"
39
+          class="filter-item"
40
+          placeholder="单据编码/制单人/药品名称"
41
+        />
42
+        <el-button
43
+          size="small"
44
+          class="filter-item"
45
+          type="primary"
46
+          icon="el-icon-search"
47
+          @click="search"
48
+          >搜索</el-button
49
+        >
50
+        <div style="margin-left: 10px">
51
+          <label class="title"><span class="name">入库时间</span> : </label>
52
+          <el-date-picker
53
+            size="small"
54
+            v-model="start_time"
55
+            prefix-icon="el-icon-date"
56
+            :editable="false"
57
+            style="width: 196px"
58
+            type="date"
59
+            placeholder="选择日期时间"
60
+            align="right"
61
+            format="yyyy-MM-dd"
62
+            value-format="yyyy-MM-dd"
63
+            @change="startTimeChange"
64
+          ></el-date-picker>
65
+          <span class="cellLine"> - </span>
66
+          <el-date-picker
67
+            size="small"
68
+            v-model="end_time"
69
+            prefix-icon="el-icon-date"
70
+            :editable="false"
71
+            style="width: 196px"
72
+            type="date"
73
+            placeholder="选择日期时间"
74
+            align="right"
75
+            format="yyyy-MM-dd"
76
+            value-format="yyyy-MM-dd"
77
+            @change="endTimeChange"
78
+          ></el-date-picker>
79
+        </div>
80
+        <!-- <div style="margin-left: 10px">
81
+          <span>审核状态:</span>
82
+          <el-select
83
+            v-model="check_id"
84
+            style="width: 140px; margin-right: 10px"
85
+            placeholder="请选择"
86
+            @change="changeTypeName"
87
+          >
88
+            <el-option
89
+              v-for="item in checkList"
90
+              :key="item.id"
91
+              :label="item.name"
92
+              :value="item.id"
93
+            >
94
+            </el-option>
95
+          </el-select>
96
+        </div> -->
97
+      </div>
98
+
99
+      <div class="cell clearfix">
100
+        <el-checkbox
101
+          style="width: 70px"
102
+          v-model="checked"
103
+          @change="changeAllSelected"
104
+          >全选</el-checkbox
105
+        >
106
+        <el-button size="small" icon="el-icon-delete" @click="batchDelete"
107
+          >删除</el-button
108
+        >
109
+        <el-button size="small" type="primary" @click="drugPrint()"
110
+          >打印</el-button
111
+        >
112
+        <el-button size="small" type="primary" @click="toExport()" :disabled="exportLoding">导出</el-button>
113
+        <div>
114
+          <span>&nbsp;&nbsp;</span>
115
+          <label class="title"><span class="name">审核状态</span> :</label>
116
+          <el-select
117
+            size="small"
118
+            v-model="check_type"
119
+            filterable
120
+            placeholder="请选择仓库"
121
+            style="width: 200px"
122
+            @change="changeCheckType"
123
+          >
124
+            <el-option
125
+              v-for="(option, index) in checkList"
126
+              :key="index"
127
+              :label="option.name"
128
+              :value="option.id"
129
+            >
130
+            </el-option>
131
+          </el-select>
132
+        </div>
133
+      </div>
134
+
135
+      <el-table
136
+        :data="tableList"
137
+        :class="signAndWeighBoxPatients"
138
+        style="width: 100%"
139
+        border
140
+        highlight-current-row
141
+        v-loading="Warehouse.loading"
142
+        ref="multipleTable"
143
+        @selection-change="select"
144
+        :row-style="{ color: '#303133' }"
145
+        :header-cell-style="{
146
+          backgroundColor: 'rgb(245, 247, 250)',
147
+          color: '#606266',
148
+        }"
149
+        @current-change="handleCurrentChangeOne"
150
+      >
151
+        <el-table-column align="center" type="selection" width="55">
152
+        </el-table-column>
153
+
154
+        <el-table-column label="药品名称" align="center">
155
+          <template slot-scope="scope">
156
+             {{ scope.row.drug.drug_name }}
157
+          </template>
158
+        </el-table-column>
159
+
160
+        <el-table-column label="药品类型" align="center">
161
+          <template slot-scope="scope">
162
+             {{ GetDrugTypeName(scope.row.drug.drug_type) }}
163
+          </template>
164
+        </el-table-column>
165
+
166
+        <el-table-column label="规格" align="center">
167
+          <template slot-scope="scope">
168
+            {{ scope.row.drug.dose }} {{  scope.row.drug.dose_unit }} * {{ scope.row.drug.min_number}} {{ scope.row.drug.min_unit}} / {{ scope.row.max_unit }}
169
+          </template>
170
+        </el-table-column>
171
+
172
+        <el-table-column label="批号" align="center">
173
+          <template slot-scope="scope">
174
+             {{ scope.row.batch_number }}
175
+          </template>
176
+        </el-table-column>
177
+
178
+        <el-table-column label="入库数量" align="center">
179
+          <template slot-scope="scope">
180
+             {{ scope.row.warehousing_count }} {{ scope.row.max_unit }}
181
+          </template>
182
+        </el-table-column>
183
+
184
+      
185
+
186
+        <el-table-column label="生产厂家" align="center">
187
+          <template slot-scope="scope">
188
+            {{ getManufacturer(scope.row.manufacturer) }}
189
+          </template>
190
+        </el-table-column>
191
+
192
+        <el-table-column label="生产日期" align="center">
193
+          <template slot-scope="scope">
194
+             {{ getTime(scope.row.product_date) }}
195
+          </template>
196
+        </el-table-column>
197
+
198
+        <el-table-column label="有效日期" align="center">
199
+          <template slot-scope="scope">
200
+            {{ getTime(scope.row.expiry_date) }}
201
+          </template>
202
+        </el-table-column>
203
+
204
+        <el-table-column label="备注" align="center">
205
+          <template slot-scope="scope">
206
+             {{ scope.row.remark }}
207
+          </template>
208
+        </el-table-column>
209
+
210
+        <el-table-column label="操作" align="center" width="240">
211
+          <template slot-scope="scope">
212
+            <el-tooltip
213
+              class="item"
214
+              effect="dark"
215
+              content="编辑"
216
+              placement="top"
217
+            >
218
+              <el-button
219
+                size="small"
220
+                type="primary"
221
+                icon="el-icon-edit-outline"
222
+                @click="handleEdit(scope.$index, scope.row)"
223
+              >
224
+              </el-button>
225
+            </el-tooltip>
226
+            <el-tooltip
227
+              class="item"
228
+              effect="dark"
229
+              content="删除"
230
+              placement="top"
231
+            >
232
+              <el-button
233
+                size="small"
234
+                type="danger"
235
+                icon="el-icon-delete"
236
+                @click="handleDelete(scope.$index, scope.row)"
237
+              >
238
+              </el-button>
239
+            </el-tooltip>
240
+          </template>
241
+        </el-table-column>
242
+      </el-table>
243
+
244
+      <el-pagination
245
+        @size-change="handleSizeChange"
246
+        @current-change="handleCurrentChange"
247
+        :page-sizes="[5, 10, 50, 100]"
248
+        :page-size="5"
249
+        background
250
+        style="margin-top: 20px; text-align: right"
251
+        layout="total, sizes, prev, pager, next, jumper"
252
+        :total="total"
253
+      >
254
+      </el-pagination>
255
+    
256
+    </div>
257
+
258
+ 
259
+  </div>
260
+</template>
261
+
262
+<script>
263
+import { uParseTime } from "@/utils/tools";
264
+import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from "@/api/doctor";
265
+import {
266
+  deleteDrugWarehouseInfo,
267
+  getDrugWarehouseInfoList,
268
+  exportDrugList,
269
+
270
+} from "@/api/drug/drug_stock";
271
+import { getAllDrugList } from "@/api/data";
272
+import { getDictionaryDataConfig } from "@/utils/data";
273
+import BreadCrumb from "../../components/bread-crumb";
274
+  import { getallPatientList,getAllSelfDrugWarehouseInfoList,deleteSelfWarehouseInfo} from "@/api/drug/drug"
275
+export default {
276
+  name: "drugStockInOrder",
277
+  components: { BreadCrumb },
278
+  created() {
279
+    this.org_id = this.$store.getters.xt_user.org.id
280
+    if (this.$route.path == "/Pharmacy/drugs/stock/in") {
281
+      this.crumbs = [
282
+        { path: false, name: "药品管理" },
283
+        { path: "/stock/drugs/stock/query", name: "入库单·" },
284
+      ];
285
+    }
286
+    this.drugTypeList = getDictionaryDataConfig("system", "drug_type");
287
+    var nowDate = new Date();
288
+    var nowYear = nowDate.getFullYear();
289
+    var nowMonth = nowDate.getMonth() + 1;
290
+    var nowDay = nowDate.getDate();
291
+    this.end_time =
292
+      nowYear +
293
+      "-" +
294
+      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
295
+      "-" +
296
+      (nowDay < 10 ? "0" + nowDay : nowDay);
297
+    nowDate.setMonth(nowDate.getMonth() - 1);
298
+    nowYear = nowDate.getFullYear();
299
+    nowMonth = nowDate.getMonth() + 1;
300
+    nowDay = nowDate.getDate();
301
+    this.start_time =
302
+      nowYear +
303
+      "-" +
304
+      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
305
+      "-" +
306
+      (nowDay < 10 ? "0" + nowDay : nowDay);
307
+
308
+    this.getallPatientList() 
309
+
310
+    this.getAllSelfDrugWarehouseInfoList()
311
+  },
312
+  data() {
313
+    return {
314
+      crumbs: [
315
+        { path: false, name: "库存管理" },
316
+        { path: false, name: "入库单" },
317
+      ],
318
+      searchKey: "",
319
+      type: 1,
320
+      page: 1,
321
+      limit: 5,
322
+      checked: false,
323
+      total: 0,
324
+      pageTotal: 0,
325
+      pageSelect: 0,
326
+      adminUserOptions: [],
327
+      multipleSelection: [],
328
+      signAndWeighBoxPatients: "sign-and-weigh-box-patients",
329
+      start_time: "",
330
+      end_time: "",
331
+      selectedTableData: [],
332
+      Warehouse: {
333
+        loading: false,
334
+        warehouseDate: [],
335
+        tableCurrentIndex: "",
336
+      },
337
+
338
+      WarehouseInfo: {
339
+        loading: false,
340
+        warehouseInfoDate: [],
341
+      },
342
+      check_id: 0,
343
+
344
+      startTime: "",
345
+      dialogVisible: false,
346
+      showOne: false,
347
+      drugTypeList: [],
348
+      manufacturerList: [],
349
+      order_id: "",
350
+      dealerList: [],
351
+      exportList: [],
352
+      houseList: [],
353
+      storehouse_id: 0,
354
+      check_type: 0,
355
+      checkList: [
356
+        { id: 0, name: "全部" },
357
+        { id: 1, name: "已审核" },
358
+        { id: 2, name: "未审核" },
359
+      ],
360
+      exportLoding:false,
361
+      org_id:0,
362
+      patient_id:0,
363
+      patientList:[],
364
+      tableList:[],
365
+      manufacturerList:[],
366
+      dealerList:[],
367
+      drugTypeList:[],
368
+    };
369
+  },
370
+
371
+  methods: {
372
+    
373
+    getAllSelfDrugWarehouseInfoList(){
374
+        var params = {
375
+          keyword:this.searchKey,
376
+          patient_id:this.patient_id,
377
+        }
378
+        getAllSelfDrugWarehouseInfoList(params).then(response=>{
379
+          if(response.data.state ==1){
380
+            var infoList  =  response.data.data.infoList
381
+            console.log("infolist22222222222222",infoList)
382
+            this.tableList = infoList
383
+            this.manufacturerList = response.data.data.manufacturerList
384
+            this.dealerList = response.data.data.dealerList
385
+            this.drugTypeList = response.data.data.drugTypeList
386
+
387
+          }
388
+      })
389
+    },
390
+    tableRowClassName({ row, rowIndex }) {
391
+      // 把每一行的索引放进row
392
+      row.index = rowIndex;
393
+    },
394
+    onRowClick(row, event, column) {
395
+      this.WarehouseInfo.warehouseInfoDate = [];
396
+      this.Warehouse.tableCurrentIndex = row.index;
397
+      const params = {
398
+        id: row.id,
399
+      };
400
+      this.WarehouseInfo.loading = true;
401
+      getDrugWarehouseInfoList(params).then((response) => {
402
+        if (response.data.state == 0) {
403
+          this.WarehouseInfo.loading = false;
404
+          this.$message.error(response.data.msg);
405
+          return false;
406
+        } else {
407
+          this.WarehouseInfo.loading = false;
408
+          for (let i = 0; i < response.data.data.info.length; i++) {
409
+            this.WarehouseInfo.warehouseInfoDate.push(
410
+              response.data.data.info[i]
411
+            );
412
+          }
413
+        }
414
+      });
415
+    },
416
+    getXuserName(id) {
417
+      if (id <= 0) {
418
+        return "";
419
+      }
420
+      var name = "";
421
+      if (
422
+        this.adminUserOptions == null ||
423
+        typeof this.adminUserOptions.length === "undefined"
424
+      ) {
425
+        return name;
426
+      }
427
+      var leng = this.adminUserOptions.length;
428
+      if (leng == 0) {
429
+        return name;
430
+      }
431
+      for (let index = 0; index < leng; index++) {
432
+        if (this.adminUserOptions[index].id == id) {
433
+          name = this.adminUserOptions[index].name;
434
+          break;
435
+        }
436
+      }
437
+      return name;
438
+    },
439
+    fetchAllDoctorAndNurse() {
440
+      fetchAllDoctorAndNurse().then((response) => {
441
+        if (response.data.state == 1) {
442
+          this.doctorOptions = response.data.data.doctors;
443
+        }
444
+      });
445
+    },
446
+    fetchAllAdminUsers() {
447
+      fetchAllAdminUsers().then((response) => {
448
+        if (response.data.state == 1) {
449
+          this.adminUserOptions = response.data.data.users;
450
+
451
+          var alen = this.adminUserOptions.length;
452
+          for (let index = 0; index < alen; index++) {
453
+            if (this.adminUserOptions[index].user_type == 2) {
454
+              // this.doctorOptions.push(this.adminUserOptions[index]);
455
+            }
456
+          }
457
+        }
458
+      });
459
+    },
460
+    clicks: function () {},
461
+     handleWarehouse: function () {
462
+      this.$router.push({path:"/stock/selfwarehouse/info/add"})
463
+    },
464
+    handleSelectionChange: function (val) {
465
+      this.multipleSelection = val;
466
+    },
467
+    handleSizeChange(val) {
468
+      this.limit = val;
469
+      this.GetWarehouse();
470
+    },
471
+    handleCurrentChange(val) {
472
+      this.page = val;
473
+      this.GetWarehouse();
474
+    },
475
+    startTimeChange(val) {
476
+      var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
477
+      if (time > 0) {
478
+        this.$message.error("结束时间不能小于开始时间");
479
+        this.start_time = "";
480
+      } else {
481
+        this.startTime = this.getTimestamp(val);
482
+        this.start_time = val;
483
+        this.GetWarehouse();
484
+      }
485
+    },
486
+    endTimeChange(val) {
487
+      var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);
488
+      if (time < 0) {
489
+        this.$message.error("结束时间不能小于开始时间");
490
+        this.end_time = "";
491
+      } else {
492
+        this.end_time = val;
493
+        this.GetWarehouse();
494
+      }
495
+    },
496
+    getTimestamp(time) {
497
+      // 把时间日期转成时间戳
498
+      return new Date(time).getTime() / 1000;
499
+    },
500
+    calculate: function (val) {
501
+      return Math.round(parseFloat(val) * 100) / 100;
502
+    },
503
+
504
+    handleEdit: function (index, row) {
505
+
506
+      this.$router.push({path:"/stock/selfwarehouse/info/edit?id="+row.id+"&is_sys="+row.is_sys+"&is_check="+row.is_check})
507
+      
508
+    },
509
+    search(){
510
+
511
+    },
512
+    handleSearch(id) {
513
+      this.WarehouseInfo.warehouseInfoDate = [];
514
+      this.GetOrderDetail(id);
515
+      this.dialogVisible = true;
516
+    },
517
+    GetOrderDetail(order_id) {
518
+      const params = {
519
+        id: order_id,
520
+      };
521
+
522
+      this.WarehouseInfo.warehouseInfoDate = [];
523
+      getDrugWarehouseInfoList(params).then((response) => {
524
+        if (response.data.state == 0) {
525
+          this.$message.error(response.data.msg);
526
+          return false;
527
+        } else {
528
+          var obj = {total_count:0,is_total:1}
529
+          for (let i = 0; i < response.data.data.info.length; i++) {
530
+            response.data.data.info[i].is_total = 0
531
+            this.showOne = true;
532
+            this.WarehouseInfo.warehouseInfoDate.push(
533
+              response.data.data.info[i]
534
+            );
535
+            obj.total_count += (response.data.data.info[i].warehousing_count *response.data.data.info[i].price)
536
+          }
537
+          this.WarehouseInfo.warehouseInfoDate.push(obj)
538
+        
539
+          this.WarehouseInfo.warehouse = response.data.data.warehousing;
540
+          this.getAllDrugList();
541
+        }
542
+      });
543
+    },
544
+    handleDelete: function (index, row) {
545
+
546
+        this.$confirm('确定删除' + row.name + row.sub_name + '方案吗?', '提示', {
547
+          confirmButtonText: '确定',
548
+          cancelButtonText: '取消',
549
+          type: 'warning'
550
+        }).then(() => {
551
+          deleteSelfWarehouseInfo(row.id).then(response => {
552
+            if (response.data.state == 0) {
553
+              this.$message.error(response.data.msg)
554
+              return false
555
+            } else {
556
+              this.$notify({
557
+                title: '成功',
558
+                message: '删除成功',
559
+                type: 'success',
560
+                duration: 2000
561
+              })
562
+              this.tableData.splice(index, 1)
563
+
564
+            }
565
+          })
566
+        })
567
+     },
568
+    changeAllSelected: function (val) {
569
+      if (val) {
570
+        this.$refs.multipleTable.toggleAllSelection();
571
+      } else {
572
+        this.$refs.multipleTable.clearSelection();
573
+      }
574
+    },
575
+    select(selection) {
576
+      var ids = [];
577
+      for (let i = 0; i < selection.length; i++) {
578
+        ids.push(selection[i].id);
579
+      }
580
+      this.order_id = ids.join(",");
581
+      this.selectedTableData = selection;
582
+      this.exportDrugList();
583
+    },
584
+    batchDelete() {
585
+      if (this.selectedTableData.length <= 0) {
586
+        this.$message.error("请选择要删除的记录");
587
+        return;
588
+      }
589
+      const ids = [];
590
+      const idOne = [];
591
+      for (let i = 0; i < this.selectedTableData.length; i++) {
592
+        if (this.selectedTableData[i].is_check == 1) {
593
+          this.$message.error("已审核单据不能删除!");
594
+          return false;
595
+        }
596
+        if (this.selectedTableData[i].is_sys == 13) {
597
+          this.$message.error("调拨入库数据不能删除!");
598
+          return false;
599
+        }
600
+        ids.push(this.selectedTableData[i].id);
601
+        if (this.selectedTableData[i].supply_warehouse_id > 0) {
602
+          idOne.push(this.selectedTableData[i].supply_warehouse_id);
603
+        }
604
+      }
605
+
606
+      for (let i = 0; i < idOne.length; i++) {
607
+        if (idOne[i] > 0) {
608
+          this.$message.error("自动入库数据不能删除!");
609
+          return false;
610
+        }
611
+      }
612
+      const idStr = ids.join(",");
613
+      const params = {
614
+        ids: idStr,
615
+      };
616
+      this.$confirm("确认删除入库单记录?", "删除入库单记录", {
617
+        confirmButtonText: "确定",
618
+        cancelButtonText: "取消",
619
+        type: "warning",
620
+      })
621
+        .then(() => {
622
+          deleteDrugWarehouseInfo(params).then((response) => {
623
+            if (response.data.state == 0) {
624
+              this.$message.error(response.data.msg);
625
+              return false;
626
+            } else {
627
+              this.$notify({
628
+                title: "成功",
629
+                message: "删除成功",
630
+                type: "success",
631
+                duration: 2000,
632
+              });
633
+
634
+              for (let i = 0; i < ids.length; i++) {
635
+                for (let y = 0; y < this.Warehouse.warehouseDate.length; y++) {
636
+                  if (ids[i] == this.Warehouse.warehouseDate[y].id) {
637
+                    this.Warehouse.warehouseDate.splice(y, 1);
638
+                  }
639
+                }
640
+              }
641
+            }
642
+          });
643
+        })
644
+        .catch(() => {});
645
+    },
646
+    handleCurrentChangeOne(val) {
647
+      this.GetOrderDetail(val.id);
648
+    },
649
+    getTime(val) {
650
+      if (val < 0) {
651
+        return "";
652
+      }
653
+      if (val == "") {
654
+        return "";
655
+      } else {
656
+        return uParseTime(val, "{y}-{m}-{d}");
657
+      }
658
+    },
659
+    getDrugType(id) {
660
+      var name = "";
661
+      for (let i = 0; i < this.drugTypeList.length; i++) {
662
+        if (id == this.drugTypeList[i].id) {
663
+          name = this.drugTypeList[i].name;
664
+        }
665
+      }
666
+      return name;
667
+    },
668
+    getAllDrugList() {
669
+      getAllDrugList().then((response) => {
670
+        if (response.data.state == 1) {
671
+          var manufacturerList = response.data.data.manufacturerList;
672
+          this.manufacturerList = manufacturerList;
673
+          this.dealerList = response.data.data.dealerList;
674
+        }
675
+      });
676
+    },
677
+    getManufacturer(id) {
678
+      var name = "";
679
+      for (let i = 0; i < this.manufacturerList.length; i++) {
680
+        if (id == this.manufacturerList[i].id) {
681
+          name = this.manufacturerList[i].manufacturer_name;
682
+        }
683
+      }
684
+      return name;
685
+    },
686
+    getDealer(id) {
687
+      var name = "";
688
+      for (let i = 0; i < this.dealerList.length; i++) {
689
+        if (id == this.dealerList[i].id) {
690
+          name = this.dealerList[i].dealer_name;
691
+        }
692
+      }
693
+      return name;
694
+    },
695
+    getDictionaryDataConfig(module, filed_name) {
696
+      return getDictionaryDataConfig(module, filed_name);
697
+    },
698
+    drugPrint() {
699
+      if (this.order_id == "") {
700
+        this.$message.error("请选择入库单");
701
+      } else {
702
+        this.$router.push({
703
+          path: "/stock/drugStockInOrderDetailPrint?id=" + this.order_id,
704
+        });
705
+      }
706
+    },
707
+    exportDrugList() {
708
+      var params = {
709
+        order_id: this.order_id,
710
+      };
711
+      this.exportLoding = true
712
+      exportDrugList(params).then((response) => {
713
+        if (response.data.state == 1) {
714
+          var list = response.data.data.list;
715
+
716
+          for (let i = 0; i < list.length; i++) {
717
+            list[i].product_date = this.getTime(list[i].product_date);
718
+            list[i].expiry_date = this.getTime(list[i].expiry_date);
719
+          }
720
+          this.exportList = list;
721
+          this.exportLoding = false
722
+          var manufacturerList = response.data.data.manufacturerList;
723
+          this.manufacturerList = manufacturerList;
724
+          var dealerList = response.data.data.dealerList;
725
+
726
+          this.dealerList = dealerList;
727
+        }
728
+      });
729
+    },
730
+
731
+    lili(){
732
+      console.log("exportList",this.exportList)
733
+    },
734
+    toExport() {
735
+      if (this.order_id == "") {
736
+        this.$message.error("请勾选入库单");
737
+      }
738
+      for (let i = 0; i < this.exportList.length; i++) {
739
+        this.exportList[i].index = i + 1;
740
+        this.exportList[i].warehousing_time = this.getTime(this.exportList[i].warehousing_time)
741
+        this.exportList[i].unit =
742
+          this.exportList[i].dose +
743
+          this.exportList[i].dose_unit +
744
+          "*" +
745
+          this.exportList[i].min_number +
746
+          this.exportList[i].min_unit +
747
+          "/" +
748
+          this.exportList[i].max_unit;
749
+
750
+        this.exportList[i].total_price = (
751
+          this.exportList[i].warehousing_count * this.exportList[i].price
752
+        ).toFixed(2);
753
+        for (let j = 0; j < this.manufacturerList.length; j++) {
754
+          if (this.exportList[i].manufacturer == this.manufacturerList[j].id) {
755
+            this.exportList[i].manufacturer =
756
+              this.manufacturerList[j].manufacturer_name;
757
+          }
758
+          if (this.exportList[i].manufacturer == 0) {
759
+            this.exportList[i].manufacturer = "";
760
+          }
761
+        }
762
+
763
+        for (let z = 0; z < this.dealerList.length; z++) {
764
+          if (this.exportList[i].dealer == this.dealerList[z].id) {
765
+            this.exportList[i].dealer = this.dealerList[z].dealer_name;
766
+          }
767
+          if (this.exportList[i].dealer == 0) {
768
+            this.exportList[i].dealer = "";
769
+          }
770
+
771
+        }
772
+      }
773
+
774
+      import("@/vendor/Export2Excel").then((excel) => {
775
+        for (let i = 0; i < this.exportList.length; i++) {
776
+          for (let j = 0; j < this.drugTypeList.length; j++) {
777
+            if (this.exportList[i].drug_type == this.drugTypeList[j].id) {
778
+              this.exportList[i].drug_type = this.drugTypeList[j].name;
779
+            }
780
+          }
781
+        }
782
+
783
+        const tHeader = [
784
+          "序号",
785
+          "单据日期",
786
+          "药品名称",
787
+          "药品类型",
788
+          "规格&单位",
789
+          "批号",
790
+          "入库数量",
791
+          "进货价",
792
+          "总价",
793
+          "生产厂家",
794
+          "生产日期",
795
+          "有效日期",
796
+          "经销商",
797
+          "批注文号",
798
+          "备注",
799
+        ];
800
+        const filterVal = [
801
+          "index",
802
+          "warehousing_time",
803
+          "drug_name",
804
+          "drug_type",
805
+          "unit",
806
+          "batch_number",
807
+          "warehousing_count",
808
+          "price",
809
+          "total_price",
810
+          "manufacturer",
811
+          "product_date",
812
+          "expiry_date",
813
+          "dealer",
814
+          "number",
815
+          "remark",
816
+        ];
817
+
818
+        const data = this.formatJson(filterVal, this.exportList);
819
+        excel.export_json_to_excel({
820
+          header: tHeader,
821
+          data,
822
+          filename: "药品入库单详情",
823
+        });
824
+        this.downloadLoading = false;
825
+      });
826
+    },
827
+    formatJson(filterVal, jsonData) {
828
+      return jsonData.map((v) => filterVal.map((j) => v[j]));
829
+    },
830
+    getHouseName(id) {
831
+      var storehouse_name = "";
832
+      for (let i = 0; i < this.houseList.length; i++) {
833
+        if (id == this.houseList[i].id) {
834
+          storehouse_name = this.houseList[i].storehouse_name;
835
+        }
836
+      }
837
+      return storehouse_name;
838
+    },
839
+    changeStoreHouse() {
840
+      this.GetWarehouse();
841
+    },
842
+    changeCheckType() {
843
+      this.GetWarehouse();
844
+    },
845
+
846
+    getallPatientList(){
847
+        getallPatientList().then(response=>{
848
+          if(response.data.state ==1){
849
+            var patient = response.data.data.patient
850
+            console.log("patient====",patient)
851
+            this.patientList = []
852
+            var obj = {id:0,name:"全部"}
853
+            this.patientList.push(obj)
854
+            for(let i=0;i<patient.length;i++){
855
+              this.patientList.push(patient[i])
856
+            }
857
+          }
858
+        })    
859
+      },
860
+      GetDrugTypeName(drug_type){
861
+        var name = ""
862
+        for(let i=0;i<this.drugTypeList.length;i++){
863
+          if(drug_type == this.drugTypeList[i].value){
864
+             name = this.drugTypeList[i].name
865
+          }
866
+        }
867
+        return name
868
+      },
869
+      getManufacturer(id){
870
+         var manufacturer_name = ""
871
+         for(let i=0;i<this.manufacturerList.length;i++){
872
+           if(id == this.manufacturerList[i].id){
873
+            manufacturer_name = this.manufacturerList[i].manufacturer_name
874
+           }
875
+         }
876
+         return
877
+      },
878
+      getDealerName(id){
879
+        var dealer_name = ""
880
+        for(let i=0;i<this.dealerList.length;i++){
881
+          if(id == this.dealerList[i].dealer_name){
882
+              dealer_name = this.dealerList[i].dealer_name
883
+          }
884
+        }
885
+        return dealer_name
886
+      }
887
+    
888
+   
889
+  },
890
+};
891
+</script>
892
+
893
+<style rel="stylesheet/css" lang="scss" scoped>
894
+.information {
895
+  border: 1px #dcdfe6 solid;
896
+  padding: 30px 20px 30px 20px;
897
+
898
+  .border {
899
+    border-bottom: 1px #dcdfe6 solid;
900
+    margin: 0px 0 20px 0;
901
+  }
902
+}
903
+
904
+.edit_separater {
905
+  border-top: 1px solid rgb(233, 233, 233);
906
+  margin-top: 15px;
907
+  margin-bottom: 15px;
908
+}
909
+</style>
910
+
911
+<style>
912
+.sign-and-weigh-box .sign-and-weigh-box-patients .cell {
913
+  font-size: 12px;
914
+}
915
+
916
+.sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
917
+  background: #6fb5fa;
918
+}
919
+
920
+.count {
921
+  color: #bd2c00;
922
+}
923
+.el-table td,
924
+.el-table th.is-leaf,
925
+.el-table--border,
926
+.el-table--group {
927
+  border-color: #d0d3da;
928
+}
929
+.el-table--border::after,
930
+.el-table--group::after,
931
+.el-table::before {
932
+  background-color: #d0d3da;
933
+}
934
+</style>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 2655 - 0
src/xt_pages/stock/selfPreparedMedicine/warehouseOut.vue


+ 13 - 0
src/xt_pages/stock/stockOutOrder.vue Ver fichero

@@ -323,6 +323,17 @@
323 323
             </template>
324 324
           </el-table-column>
325 325
 
326
+          <el-table-column label="出库班次" align="center" v-if="is_sys == 0">
327
+            <template slot-scope="scope">
328
+            
329
+              <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
330
+                  <td style="border-right: none; border-inline-end: none;text-align: center">
331
+                    {{ scope.row.class_type }}
332
+                  </td>
333
+               </tr>
334
+            </template>
335
+          </el-table-column>
336
+
326 337
           <el-table-column label="使用患者" align="center" v-if="is_sys == 0">
327 338
             <template slot-scope="scope">
328 339
             
@@ -1224,6 +1235,8 @@ export default {
1224 1235
             this.houselist.push(response.data.data.houselist[i]);
1225 1236
           }
1226 1237
           var objOne = {id:0,name:"系统"}
1238
+          var objTwo = {id:-1,name:"血透室"}
1239
+          this.patients.push(objTwo)
1227 1240
           this.patients.push(objOne)
1228 1241
           for(let i=0;i<response.data.data.patients.length;i++){
1229 1242
              this.patients.push(response.data.data.patients[i])

+ 23 - 17
src/xt_pages/stock/stockOutOrderAdd.vue Ver fichero

@@ -104,21 +104,6 @@
104 104
                     <div class="name">{{item.good_name +"  " +item.specification_name + "  "+  item.manufacturer}}</div>
105 105
                   </template>
106 106
                 </el-autocomplete>
107
-
108
-                 <!-- <el-autocomplete
109
-                    v-model="scope.row.good_name"
110
-                    :fetch-suggestions="querySearchAsync"
111
-                    :trigger-on-focus="true"
112
-                    placeholder="请输入耗材名称"
113
-                    @select="handleSelect"
114
-                    :popper-append-to-body="true"
115
-                  >
116
-                  
117
-                  <i class="el-icon-search el-input__icon" slot="suffix"></i>
118
-                  <template slot-scope="{ item }">
119
-                    <div class="name">{{item.good_name +"  " +item.specification_name + "  "+  item.manufacturer}}</div>
120
-                  </template>
121
-                 </el-autocomplete> -->
122 107
               </el-form-item>
123 108
             </template>
124 109
           </el-table-column>
@@ -203,6 +188,20 @@
203 188
           </el-table-column>
204 189
 
205 190
 
191
+          <el-table-column label="使用班次"  width="100" align="center">
192
+            <template slot-scope="scope">
193
+               <el-select size="small" v-model="scope.row.class_type" filterable placeholder="请选择出库班次">
194
+                <el-option
195
+                  v-for="(option, index) in classType"
196
+                  :key="index"
197
+                  :label="option.name"
198
+                  :value="option.name">
199
+                </el-option>
200
+               </el-select>
201
+            </template>
202
+          </el-table-column>
203
+
204
+
206 205
           <el-table-column label="使用患者"  width="150" align="center">
207 206
             <template slot-scope="scope">
208 207
                <el-select size="small" v-model="scope.row.patient_id" filterable placeholder="请选择出库对象">
@@ -449,7 +448,9 @@ export default {
449 448
       warehouseOut_id:0,
450 449
       is_check:0,
451 450
       loading:false,
452
-      patients:[]
451
+      patients:[],
452
+      classType:[{id:1,name:"上午"},{id:2,name:"下午"},{id:3,name:"晚上"}],
453
+
453 454
     };
454 455
   },
455 456
   methods: {
@@ -516,8 +517,10 @@ export default {
516 517
           this.storehouse_id = response.data.data.configlist.storehouse_out_info
517 518
           this.doctorList =  response.data.data.doctorList
518 519
           var obj ={id:0,name:"系统"}
520
+          var objOne ={id:-1,name:"血透室"}
519 521
           this.patients =[]
520 522
           this.patients.push(obj)
523
+          this.patients.push(objOne)
521 524
           if(response.data.data.patients!=null){
522 525
             for(let i=0;i<response.data.data.patients.length;i++){
523 526
               this.patients.push(response.data.data.patients[i])
@@ -574,6 +577,7 @@ export default {
574 577
       tempObj["id"] = 0
575 578
       tempObj['register_number'] = ''
576 579
       tempObj['patient_id'] =0
580
+      tempObj["class_type"] = ""
577 581
       this.recordInfo.recordData.push(tempObj);
578 582
     },
579 583
     handleDelete: function(index, row) {
@@ -790,7 +794,7 @@ export default {
790 794
                var str = storehose_name + " " + good_name +"*" + specification_name +"无库存,请入库"
791 795
                var warehouseOut =  response.data.data.warehouseOut
792 796
                this.warehouseOut = warehouseOut
793
-              this.warehouseOut_id = warehouseOut.id
797
+               this.warehouseOut_id = warehouseOut.id
794 798
 
795 799
                if(msg == 1){
796 800
                   this.$message.error(str)
@@ -1085,6 +1089,8 @@ export default {
1085 1089
     tempObj["id"] = 0
1086 1090
     tempObj['register_number'] = ''
1087 1091
     tempObj['patient_id'] = 0
1092
+    tempObj["class_type"] = ""
1093
+   
1088 1094
     this.recordInfo.recordData.push(tempObj);
1089 1095
     this.GetConfigInfo();
1090 1096
     this.propForm.goodUnit = this.$store.getters.good_unit;

+ 18 - 1
src/xt_pages/stock/stockOutOrderEdit.vue Ver fichero

@@ -206,7 +206,19 @@
206 206
                </el-select>
207 207
             </template>
208 208
           </el-table-column>
209
-
209
+ 
210
+          <el-table-column label="使用班次"  width="100" align="center">
211
+            <template slot-scope="scope">
212
+               <el-select size="small" v-model="scope.row.class_type" filterable placeholder="请选择出库班次">
213
+                <el-option
214
+                  v-for="(option, index) in classType"
215
+                  :key="index"
216
+                  :label="option.name"
217
+                  :value="option.name">
218
+                </el-option>
219
+               </el-select>
220
+            </template>
221
+          </el-table-column>
210 222
           
211 223
           <el-table-column label="使用患者"  width="150" align="center">
212 224
             <template slot-scope="scope">
@@ -534,6 +546,7 @@ import patient from '../../router/modules/patient'
534 546
         tempObj["stock_count"] = ""
535 547
         tempObj['register_number'] = ''
536 548
         tempObj['patient_id'] =0
549
+        tempObj["class_type"] = ""
537 550
         this.recordInfo.recordData.push(tempObj)
538 551
       },
539 552
       handleDelete: function(index, row) {
@@ -897,7 +910,9 @@ import patient from '../../router/modules/patient'
897 910
         if(response.data.state == 1){
898 911
           this.patients =[]
899 912
           var obj ={id:0,name:"系统"}
913
+          var objOne ={id:-1,name:"血透室"}
900 914
           this.patients.push(obj)
915
+          this.patients.push(objOne)
901 916
           if(response.data.data.patients!=null){
902 917
             for(let i=0;i<response.data.data.patients.length;i++){
903 918
               this.patients.push(response.data.data.patients[i])
@@ -923,6 +938,8 @@ import patient from '../../router/modules/patient'
923 938
             response.data.data.list[i].remark = response.data.data.list[i].remark
924 939
             response.data.data.list[i].buy_price = response.data.data.list[i].buy_price.toString()
925 940
             response.data.data.list[i].stock_count = response.data.data.list[i].stock_count.toString()
941
+
942
+            response.data.data.list[i].class_type = response.data.data.list[i].class_type
926 943
           
927 944
             // response.data.data.list[i].patient_id = this.getPatientName(response.data.data.list[i].patient_id)
928 945