XMLWAN před 2 roky
rodič
revize
76b1ce0c79

+ 8 - 0
src/api/advice.js Zobrazit soubor

@@ -559,3 +559,11 @@ export function settleNewDoctorAdvice(params) {
559 559
     params: params
560 560
   })
561 561
 }
562
+
563
+export function excutionDoctorAdviceById(params) {
564
+  return request({
565
+    url: '/api/schedule/excutiondoctoradvicebyid',
566
+    method: 'get',
567
+    params: params
568
+  })
569
+}

+ 8 - 0
src/utils/tools.js Zobrazit soubor

@@ -152,6 +152,14 @@ export function uParseTime(time, cFormat) {
152 152
   return time_str
153 153
 }
154 154
 
155
+export function replacementFlow(bloodflowvolume) {
156
+  bloodflowvolume = parseFloat(bloodflowvolume)
157
+  if (isNaN(bloodflowvolume)) {
158
+    return 0
159
+  }
160
+  return bloodflowvolume * 0.25
161
+}
162
+
155 163
 export function calculateAnticoagulantZL(type, shouji, shichang, weichi, add_amount, reduce_amount) {
156 164
   console.log('t', type)
157 165
   var t = 0.5

+ 23 - 4
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue Zobrazit soubor

@@ -957,6 +957,12 @@
957 957
               this.showAdviceForm = false
958 958
               this.showAdvicePanel = true
959 959
               var advice = response.data.data.advice
960
+              var single_dose_unit = ""
961
+              if(advice.single_dose_unit > 0){
962
+                single_dose_unit = this.getUnit(advice.single_dose_unit)
963
+              }else{
964
+                single_dose_unit = advice.single_dose_unit
965
+              }
960 966
               this.doctor_advices[this.currentIndex].drug_spec = advice.drug_spec
961 967
               this.doctor_advices[this.currentIndex].drug_spec_unit =
962 968
                 advice.drug_spec_unit
@@ -968,8 +974,7 @@
968 974
                 advice.advice_desc
969 975
               this.doctor_advices[this.currentIndex].single_dose =
970 976
                 advice.single_dose
971
-              this.doctor_advices[this.currentIndex].single_dose_unit =
972
-                advice.single_dose_unit
977
+              this.doctor_advices[this.currentIndex].single_dose_unit = single_dose_unit
973 978
               this.doctor_advices[this.currentIndex].delivery_way =
974 979
                 advice.delivery_way
975 980
               this.doctor_advices[this.currentIndex].execution_frequency =
@@ -2575,14 +2580,28 @@
2575 2580
               this.schedulePatient = schedulePatient
2576 2581
            }
2577 2582
        })
2578
-     }
2583
+     },
2584
+      getDataConfig(module, filed_name) {
2585
+        return getDataConfig(module, filed_name)
2586
+      },
2587
+      getUnit(id){
2588
+         var name = ""
2589
+         for(let i=0;i<this.unitsOption.length;i++){
2590
+           if(id == this.unitsOption[i].id){
2591
+              name = this.unitsOption[i].name
2592
+           }
2593
+         }
2594
+         console.log("nam e23233232322323wo",name)
2595
+         return name
2596
+      }
2579 2597
     },
2580 2598
     created() {
2599
+    
2581 2600
       var date = this.$route.query && this.$route.query.date
2582 2601
       this.record_date = uParseTime(date, '{y}-{m}-{d}')
2583 2602
       this.form.advice_date = this.record_date
2584 2603
       this.getAdviceConfig()
2585
-      this.unitsOption = getDataConfig('hemodialysis', 'units')
2604
+      this.unitsOption = this.getDataConfig('hemodialysis', 'units')
2586 2605
       this.template_id = this.$store.getters.xt_user.template_info.template_id
2587 2606
       this.org_id = this.$store.getters.xt_user.org.id
2588 2607
       this.patientid = this.$route.query.patient_id

+ 22 - 5
src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue Zobrazit soubor

@@ -161,8 +161,10 @@
161 161
                 <template slot-scope="scope">
162 162
 <!--                  //从1到20-->
163 163
                   <span v-if="scope.row.single_dose != 0" @click="lili(scope.row)">
164
-<!--                    {{ scope.row.single_dose}}{{ scope.row.single_dose_unit }}-->
165
-                    <span v-if="scope.row.single_dose_unit == 1" >{{ scope.row.single_dose}}g</span>
164
+                   {{ scope.row.single_dose}}
165
+                   <span v-if="scope.row.single_dose_unit >0"> {{getUnit(scope.row.single_dose_unit )}}</span> 
166
+                   <span v-else>{{ scope.row.single_dose_unit }}</span> 
167
+                    <!-- <span v-if="scope.row.single_dose_unit == 1" >{{ scope.row.single_dose}}g</span>
166 168
                     <span v-else-if="scope.row.single_dose_unit == 2" >{{ scope.row.single_dose}}mg</span>
167 169
                     <span v-else-if="scope.row.single_dose_unit == 3" >{{ scope.row.single_dose}}u</span>
168 170
                     <span v-else-if="scope.row.single_dose_unit == 4" >{{ scope.row.single_dose}}ml</span>
@@ -182,7 +184,7 @@
182 184
                     <span v-else-if="scope.row.single_dose_unit == 18" >{{ scope.row.single_dose}}瓶</span>
183 185
                     <span v-else-if="scope.row.single_dose_unit == 19" >{{ scope.row.single_dose}}瓶(袋)</span>
184 186
                     <span v-else-if="scope.row.single_dose_unit == 20" >{{ scope.row.single_dose}}次</span>
185
-                    <span v-else >{{ scope.row.single_dose}}{{ scope.row.single_dose_unit }}</span>
187
+                    <span v-else >{{ scope.row.single_dose}}{{ scope.row.single_dose_unit }}</span> -->
186 188
                   </span>
187 189
 
188 190
 
@@ -569,7 +571,7 @@ import {
569 571
   getDoctorAdviceList,
570 572
   StopDoctorAdvice
571 573
 } from "@/api/advice";
572
-
574
+import { getDataConfig } from '@/utils/data'
573 575
 import {getSelfMedicalList,getDrugDescByDrugName } from "@/api/drug/drug"
574 576
 import { duration } from 'moment';
575 577
 export default {
@@ -653,6 +655,7 @@ export default {
653 655
       drug_name_id:"",
654 656
       src_type:"",
655 657
       private_drug_config:{},
658
+      units:[],
656 659
     };
657 660
   },
658 661
   props: {
@@ -1802,6 +1805,18 @@ export default {
1802 1805
       },
1803 1806
       handleSelect1(){
1804 1807
 
1808
+      },
1809
+      getDataConfig(module, filed_name) {
1810
+        return getDataConfig(module, filed_name)
1811
+      },
1812
+      getUnit(id){
1813
+         var name = ""
1814
+         for(let i=0;i<this.units.length;i++){
1815
+           if(id == this.units[i].id){
1816
+              name = this.units[i].name
1817
+           }
1818
+         }
1819
+         return name
1805 1820
       }
1806 1821
   },
1807 1822
   watch: {
@@ -1810,7 +1825,9 @@ export default {
1810 1825
     }
1811 1826
   },
1812 1827
   created(){
1813
-    //获取自备药
1828
+    this.units =  this.getDataConfig('hemodialysis','units')
1829
+    console.log("单位32322323232我的",this.units)
1830
+   //获取自备药
1814 1831
     this.getSelfMedicalList()
1815 1832
 
1816 1833
   }

+ 30 - 3
src/xt_pages/dialysis/details/dialog/adviceDialog/EditGroupAdvice.vue Zobrazit soubor

@@ -149,10 +149,13 @@
149 149
                 align="center"
150 150
               >
151 151
                 <template slot-scope="scope">
152
-                  <span v-if="scope.row.single_dose != 0"
152
+                  <!-- <span v-if="scope.row.single_dose != 0"
153 153
                     >{{ scope.row.single_dose
154 154
                     }}{{ scope.row.single_dose_unit }}</span
155
-                  >
155
+                  > -->
156
+                 {{ scope.row.single_dose}}
157
+                <span v-if="scope.row.single_dose_unit >0"> {{getUnit(scope.row.single_dose_unit )}}</span> 
158
+                <span v-else>{{ scope.row.single_dose_unit }}</span> 
156 159
                 </template>
157 160
               </el-table-column>
158 161
               <el-table-column
@@ -276,6 +279,7 @@
276 279
                   >{{ scope.row.single_dose
277 280
                   }}{{ scope.row.single_dose_unit }}</span
278 281
                 >
282
+               
279 283
               </template>
280 284
             </el-table-column>
281 285
             <el-table-column
@@ -574,6 +578,7 @@ import {
574 578
   StopDoctorAdvice,
575 579
   SaveEditAdvices
576 580
 } from "@/api/advice";
581
+import { getDataConfig } from '@/utils/data'
577 582
 import { jsGetAge, uParseTime } from "@/utils/tools";
578 583
 import { getSelfMedicalList,getDrugDescByDrugName } from "@/api/drug/drug"
579 584
 export default {
@@ -658,6 +663,7 @@ export default {
658 663
       drug_id: 0,
659 664
       src_type:"",
660 665
       drug_name_id:0,
666
+      units:[],
661 667
     };
662 668
   },
663 669
   props: {
@@ -896,6 +902,13 @@ export default {
896 902
       this.$refs[formName].validate(valid => {
897 903
         if (valid) {
898 904
           if (_this.nameForm.isEdit) {
905
+            var single_dose_unit = ""
906
+            if(_this.nameForm.single_dose_unit > 0){
907
+               single_dose_unit = this.getUnit(_this.nameForm.single_dose_unit)
908
+            }else{
909
+              single_dose_unit = _this.nameForm.single_dose_unit
910
+            }
911
+            console.log("single_dose_unit332323223",single_dose_unit)
899 912
             var submitForm = {
900 913
               advice_type: _this.groupForm.advice_type,
901 914
               advice_date: _this.groupForm.advice_date,
@@ -904,7 +917,7 @@ export default {
904 917
               advice_name: _this.nameForm.advice_name,
905 918
               advice_desc: _this.nameForm.advice_desc,
906 919
               single_dose: "" + _this.nameForm.single_dose,
907
-              single_dose_unit: _this.nameForm.single_dose_unit,
920
+              single_dose_unit: single_dose_unit,
908 921
               drug_spec: "" + _this.nameForm.drug_spec,
909 922
               drug_spec_unit: _this.nameForm.drug_spec_unit,
910 923
               prescribing_number: "" + _this.nameForm.prescribing_number,
@@ -2471,6 +2484,18 @@ export default {
2471 2484
         console.log('results',results)
2472 2485
         cb(results);
2473 2486
       },
2487
+     getDataConfig(module, filed_name) {
2488
+        return getDataConfig(module, filed_name)
2489
+    },
2490
+     getUnit(id){
2491
+         var name = ""
2492
+         for(let i=0;i<this.units.length;i++){
2493
+           if(id == this.units[i].id){
2494
+              name = this.units[i].name
2495
+           }
2496
+         }
2497
+         return name
2498
+      }
2474 2499
   },
2475 2500
   watch: {
2476 2501
     "selectedTemp.list": function() {
@@ -2478,6 +2503,8 @@ export default {
2478 2503
     }
2479 2504
   },
2480 2505
   created(){
2506
+    this.units =  this.getDataConfig('hemodialysis','units')
2507
+    console.log("32322323232我的",this.units)
2481 2508
      //获取自备药
2482 2509
     this.getSelfMedicalList()
2483 2510
   }

+ 48 - 15
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Zobrazit soubor

@@ -61,6 +61,18 @@
61 61
                         </el-form-item>
62 62
                     </el-col>
63 63
 
64
+                   <el-col :span="8" v-if="isShows('置换流量') &&  this.$store.getters.xt_user.template_info.org_id != 10340">
65
+                        <el-form-item label="置换流量(L/h):">
66
+                            <el-input v-model="dialysisPrescription.replacement_flow"></el-input>
67
+                        </el-form-item>
68
+                    </el-col>
69
+
70
+                    <el-col :span="8" v-if="isShows('置换流量')  &&  this.$store.getters.xt_user.template_info.org_id == 10340">
71
+                        <el-form-item label="置换流量(ml/min):">
72
+                            <el-input v-model="dialysisPrescription.replacement_flow"></el-input>
73
+                        </el-form-item>
74
+                    </el-col>
75
+
64 76
 
65 77
                     <el-col :span="8"
66 78
                             v-if="isShows('预冲量') && (this.$store.getters.xt_user.template_info.template_id == 17 || this.$store.getters.xt_user.template_info.template_id == 9 || this.$store.getters.xt_user.template_info.template_id == 20 || this.$store.getters.xt_user.template_info.template_id == 21 || this.$store.getters.xt_user.template_info.template_id == 22 || this.$store.getters.xt_user.template_info.template_id == 23 || this.$store.getters.xt_user.template_info.template_id == 36 ||  this.$store.getters.xt_user.template_info.org_id == 10345)">
@@ -245,7 +257,7 @@
245 257
                   <el-col :span="8" v-if="isShows('减肝素量')">
246 258
                        <el-form-item v-if="dialysisPrescription.anticoagulant == 2" :label="'减肝素量(mg) : '">
247 259
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
248
-                                          v-model="dialysisPrescription.reduce_amount" v-on:input="searchReduceAmount"></el-input>
260
+                                          v-model="dialysisPrescription.calculateAnticoagulantZL" v-on:input="searchReduceAmount"></el-input>
249 261
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
250 262
                                           v-model="dialysisPrescription.reduce_amount" v-on:input="searchReduceAmount"></el-input>
251 263
                             </el-form-item>
@@ -810,17 +822,7 @@
810 822
                     </el-col>
811 823
 
812 824
 
813
-                    <el-col :span="8" v-if="isShows('置换流量') &&  this.$store.getters.xt_user.template_info.org_id != 10340">
814
-                        <el-form-item label="置换流量(L/h):">
815
-                            <el-input v-model="dialysisPrescription.replacement_flow"></el-input>
816
-                        </el-form-item>
817
-                    </el-col>
818
-
819
-                    <el-col :span="8" v-if="isShows('置换流量')  &&  this.$store.getters.xt_user.template_info.org_id == 10340">
820
-                        <el-form-item label="置换流量(ml/min):">
821
-                            <el-input v-model="dialysisPrescription.replacement_flow"></el-input>
822
-                        </el-form-item>
823
-                    </el-col>
825
+               
824 826
 
825 827
                     <el-col :span="8" v-if="isShows('吸氧')">
826 828
                         <el-form-item label="吸氧:">
@@ -1091,7 +1093,7 @@
1091 1093
 <script>
1092 1094
   import { CreateGroupAdvice, GetSolution, postPrescription, postSoulution } from '@/api/dialysis'
1093 1095
   import { getDataConfig } from '@/utils/data'
1094
-  import { calculateAnticoagulantZL, uParseTime } from '@/utils/tools'
1096
+  import { calculateAnticoagulantZL, uParseTime,replacementFlow } from '@/utils/tools'
1095 1097
   import store from '@/store'
1096 1098
   import MsgTip from './MsgTip'
1097 1099
   import request from '@/utils/request'
@@ -2276,9 +2278,11 @@
2276 2278
           last_weight_after = this.last_record.weight_after
2277 2279
         }
2278 2280
         console.log("last2323232323232332wode",this.predialysis)
2279
-        if(this.dialysisPrescription!=null && this.dialysisPrescription.id == 0){
2281
+        if(this.predialysis!=null && this.predialysis.id == 0){
2280 2282
             if(this.$store.getters.xt_user.org.id == 9671 || this.$store.getters.xt_user.org.id == 9675 || this.$store.getters.xt_user.org.id == 10340 ){
2281 2283
               this.dialysisPrescription.sodium = 138
2284
+              this.dialysisPrescription.bicarbonate = 31.1
2285
+              this.dialysisPrescription.dialysate_flow = 500
2282 2286
             }
2283 2287
         }
2284 2288
         if (this.predialysis == null || this.predialysis.id == 0) {
@@ -3513,6 +3517,15 @@
3513 3517
                     response.data.data.solution[key]
3514 3518
                 }
3515 3519
               }
3520
+               if (this.$store.getters.xt_user.template_info.org_id== 9671 || this.$store.getters.xt_user.template_info.org_id == 9675 || this.$store.getters.xt_user.template_info.org_id == 10340) {
3521
+                console.log('抠门;哦啊', response.data.data.dialysisPrescription.remark)
3522
+                this.dialysisPrescription.sodium = 138
3523
+                this.dialysisPrescription.bicarbonate = 31.1
3524
+                this.dialysisPrescription.dialysate_flow = 500
3525
+                if (this.last_prescription != null && response.data.data.dialysisPrescription != null) {
3526
+                  this.dialysisPrescription.remark = response.data.data.dialysisPrescription.remark
3527
+                }
3528
+              }
3516 3529
             } else {
3517 3530
               if (response.data.data.prescription != null) {
3518 3531
                 // 临时处方不为空
@@ -3546,13 +3559,30 @@
3546 3559
                 }
3547 3560
                 this.dialysisPrescription.mode_id = id
3548 3561
               }
3562
+               if (this.$store.getters.xt_user.template_info.org_id == 9671 ||this.$store.getters.xt_user.template_info.org_id == 9675 ||this.$store.getters.xt_user.template_info.org_id== 10340) {
3563
+                this.dialysisPrescription.sodium = 138
3564
+                this.dialysisPrescription.bicarbonate = 31.1
3565
+                this.dialysisPrescription.dialysate_flow = 500
3566
+                if (this.last_prescription != null && response.data.data.system_prescription != null && response.data.data.system_prescription.remark == '') {
3567
+                  this.dialysisPrescription.remark = response.data.data.system_prescription.remark
3568
+                }
3569
+              }
3549 3570
             }
3550 3571
 
3551 3572
             if(response.data.data.dialysisPrescription!=null){
3552 3573
                this.dialysisPrescription.remark =  response.data.data.dialysisPrescription.remark 
3553 3574
             }
3554 3575
           }
3555
-
3576
+         if (response.data.data.solution == null) {
3577
+              if (this.$store.getters.xt_user.template_info.org_id== 9671 || this.$store.getters.xt_user.template_info.org_id == 9675 ||this.$store.getters.xt_user.template_info.org_id== 10340) {
3578
+                this.dialysisPrescription.sodium = 138
3579
+                this.dialysisPrescription.bicarbonate = 31.1
3580
+                this.dialysisPrescription.dialysate_flow = 500
3581
+                if (this.last_prescription != null) {
3582
+                  this.dialysisPrescription.remark = this.last_prescription.remark
3583
+                }
3584
+              }
3585
+            }
3556 3586
           if (
3557 3587
             this.dialysisPrescription.dialysis_duration_hour === '' ||
3558 3588
             this.dialysisPrescription.dialysis_duration_minute === ''
@@ -3667,6 +3697,9 @@
3667 3697
     },
3668 3698
 
3669 3699
     watch: {
3700
+      'dialysisPrescription.blood_flow_volume': function () {
3701
+        this.dialysisPrescription.replacement_flow = replacementFlow(this.dialysisPrescription.blood_flow_volume)
3702
+      },
3670 3703
       'dialysisPrescription.dialysis_duration_hour': function() {
3671 3704
         let dialysis_duration_minute = 0
3672 3705
         let dialysis_duration_hour = 0

+ 16 - 1
src/xt_pages/dialysis/details/index.vue Zobrazit soubor

@@ -238,7 +238,7 @@
238 238
               <div class="signPrint" style="width: 360px;font-size:16px;">
239 239
                 <div style="margin-left:50px;">姓名:
240 240
                   <span>{{main_collection.patient.name}} </span>
241
-                  ({{ main_collection.patient.dialysis_no }},{{ main_collection.patient.age }}岁)
241
+                  ({{ main_collection.patient.dialysis_no }},{{getNewAge(main_collection.patient.id_card_no)  }}岁)
242 242
                 </div>
243 243
                 <div class="printCell" style="display:flex;justify-content: space-around;">
244 244
                   <span style="display: block;width: 50%;">
@@ -920,6 +920,8 @@ export default {
920 920
     this.getInitData()
921 921
 
922 922
     this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
923
+
924
+
923 925
   },
924 926
   beforeMount() {
925 927
     if (this.websocket) {
@@ -1084,6 +1086,19 @@ export default {
1084 1086
     this.websocketSend(unObj)
1085 1087
   },
1086 1088
   methods: {
1089
+     getNewAge(UUserCard) {
1090
+      if (UUserCard != null && UUserCard != '') {
1091
+        // 获取年龄
1092
+        var myDate = new Date()
1093
+        var month = myDate.getMonth() + 1
1094
+        var day = myDate.getDate()
1095
+        var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1
1096
+        if (UUserCard.substring(10, 12) < month || UUserCard.substring(10, 12) == month && UUserCard.substring(12, 14) <= day) {
1097
+          age++
1098
+        }
1099
+        return age
1100
+      }
1101
+    },
1087 1102
     adviceFunc() {
1088 1103
       this.getScheduleDetail()
1089 1104
     },

+ 259 - 35
src/xt_pages/dialysis/newDoctorAdvice.vue Zobrazit soubor

@@ -62,12 +62,13 @@
62 62
         <label class="title">
63 63
           <span class="name">排序:</span>
64 64
         </label>
65
-        <el-select v-model="sort" placeholder="请选择">
65
+        <el-select v-model="sort" placeholder="请选择" @change="selectSortType">
66 66
           <el-option
67 67
             v-for="item in options"
68 68
             :key="item.name"
69 69
             :label="item.name"
70
-            :value="item.id">
70
+            :value="item.id"
71
+            >
71 72
           </el-option>
72 73
         </el-select>
73 74
       </div>
@@ -151,7 +152,7 @@
151 152
           </ul>
152 153
         </div>
153 154
       </div>
154
-      <div>
155
+      <div style="margin-top: 10px;margin-left:600px;margin-bottom:10px">
155 156
         <el-button type="primary" size="small" @click="toExcution">执行医嘱</el-button>
156 157
         <el-button type="primary" size="small" @click="toCheck">医嘱核对</el-button>
157 158
         <el-button type="primary" size="small" @click="toSettle">收费</el-button>
@@ -160,11 +161,13 @@
160 161
 
161 162
       <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
162 163
         @selection-change="handleSelectionChange"
163
-        :row-class-name="tableRowClassName"
164 164
         :span-method="objectSpanMethod"
165 165
         :cell-class-name="adviceNameShow"
166 166
         :modal-append-to-body="false"
167
-        v-show="show">
167
+        highlight-current-row
168
+        @current-change="handleCurrentChangeList"
169
+        v-show="show"
170
+        @row-click="handleRowClick">
168 171
         <el-table-column type="selection" width="55" align="center"></el-table-column>
169 172
         <el-table-column prop="date" label="姓名" align="center" min-width="26px">
170 173
           <template slot-scope="scope">
@@ -201,6 +204,7 @@
201 204
             <span v-if="scope.row.dialysis_irrigation!=''">{{scope.row.dialysis_irrigation}}</span>
202 205
           </template>
203 206
         </el-table-column>
207
+      
204 208
         <el-table-column prop="start_time" label="开始时间" align="center" min-width="35px">
205 209
           <template slot-scope="scope">
206 210
             <span>
@@ -286,12 +290,32 @@
286 290
             <span v-else></span>
287 291
           </template>
288 292
         </el-table-column>
293
+        <el-table-column
294
+          prop="created_time"
295
+          align="center"
296
+          min-width="30px"
297
+          label="收费状态"
298
+          sortable
299
+        >
300
+          <template slot-scope="scope">
301
+            <span v-if="scope.row.is_settle == 1">
302
+              已收费
303
+            </span>
304
+            <span v-if="scope.row.is_settle == 2 || scope.row.is_settle == 0">
305
+              未收费
306
+            </span>
307
+            <span v-else></span>
308
+          </template>
309
+        </el-table-column>
289 310
       </el-table>
290
-         <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
311
+
312
+
313
+     <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
291 314
         @selection-change="handleSelectionChangeOne"
292
-        :row-class-name="tableRowClassName"
315
+        @current-change="handleCurrentChangeList"
293 316
         :span-method="objectSpanMethod"
294 317
         :cell-class-name="adviceNameShow"
318
+        highlight-current-row
295 319
         :modal-append-to-body="false"
296 320
         v-show="showOne">
297 321
         <el-table-column type="selection" width="55" align="center"></el-table-column>
@@ -412,6 +436,24 @@
412 436
             <span v-else></span>
413 437
           </template>
414 438
         </el-table-column>
439
+
440
+       <el-table-column
441
+          prop="created_time"
442
+          align="center"
443
+          min-width="30px"
444
+          label="收费状态"
445
+          sortable
446
+        >
447
+          <template slot-scope="scope">
448
+            <span v-if="scope.row.is_settle == 1">
449
+              已收费
450
+            </span>
451
+            <span v-if="scope.row.is_settle == 2 || scope.row.is_settle == 0">
452
+              未收费
453
+            </span>
454
+            <span v-else></span>
455
+          </template>
456
+        </el-table-column>
415 457
       </el-table>
416 458
 
417 459
      <el-dialog
@@ -429,11 +471,32 @@
429 471
         style="width:100%"
430 472
       ></el-date-picker>
431 473
       <span slot="footer" class="dialog-footer">
432
-        <el-button @click="closeTimePanel" :loading="exceLoading">取 消</el-button>
474
+        <el-button @click="execTimeDialogVisible = false">取 消</el-button>
433 475
         <el-button type="primary" @click="excutionDoctorAdvice" :loading="exceLoading">保 存</el-button>
434 476
       </span>
435 477
     </el-dialog>
436 478
 
479
+
480
+   <el-dialog
481
+      title="选择执行时间"
482
+      :visible.sync="execTimeDialogVisibleOne"
483
+      width="400px"
484
+      :modal-append-to-body="false"
485
+    >
486
+      <el-date-picker
487
+        v-model="execTime"
488
+        format="yyyy-MM-dd HH:mm:00"
489
+        value-format="yyyy-MM-dd HH:mm:00"
490
+        type="datetime"
491
+        placeholder="选择执行时间"
492
+        style="width:100%"
493
+      ></el-date-picker>
494
+      <span slot="footer" class="dialog-footer">
495
+        <el-button @click="execTimeDialogVisibleOne = false">取 消</el-button>
496
+        <el-button type="primary" @click="excutionDoctorAdviceOne" :loading="exceLoading">保 存</el-button>
497
+      </span>
498
+    </el-dialog>
499
+
437 500
     </div>
438 501
 
439 502
   </div>
@@ -445,7 +508,7 @@ import { getSchedualPatient, GetAllZone } from "@/api/dialysis";
445 508
 import { parseTime } from "@/utils";
446 509
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
447 510
 import { getPrintTemplate } from "@/api/data";
448
-import { getNewSchedualDoctors,excutionDoctorAdvice,checkNewDoctorAdvice,settleNewDoctorAdvice } from '@/api/advice'
511
+import { getNewSchedualDoctors,excutionDoctorAdvice,checkNewDoctorAdvice,settleNewDoctorAdvice,excutionDoctorAdviceById } from '@/api/advice'
449 512
 import { PostSearch } from '@/api/patient'
450 513
 export default {
451 514
   name: "Patient",
@@ -514,6 +577,11 @@ export default {
514 577
       execTime: '',
515 578
       execTimeDialogVisible:false,
516 579
       exceLoading:false,
580
+      is_sort:0,
581
+      hoverOrderArr:[],
582
+      is_status:0,
583
+      execTimeDialogVisibleOne:false,
584
+      current_row:{},
517 585
     };
518 586
   },
519 587
   created() {
@@ -619,7 +687,7 @@ export default {
619 687
          var schedule_type = this.listQuery.schedul_type
620 688
          var partition_type = this.listQuery.partition_type
621 689
 
622
-        getNewSchedualDoctors({date: newTime,patient_type: 0,advice_type: 2,delivery_way:name,schedule_type:schedule_type,partition_type:partition_type,patient_id:this.patient_id,excution_way:this.excution_way}).then(rs => {
690
+        getNewSchedualDoctors({date: newTime,patient_type: 0,advice_type: 2,delivery_way:name,schedule_type:schedule_type,partition_type:partition_type,patient_id:this.patient_id,excution_way:this.excution_way,cost_type:this.costType}).then(rs => {
623 691
         var resp = rs.data
624 692
         if (resp.state == 1) {
625 693
             this.admin_users = resp.data.adminUser
@@ -664,7 +732,9 @@ export default {
664 732
                         id:it.id,
665 733
                         patient_id:it.patient_id,
666 734
                         parent_id:0,
667
-                        groupno:0
735
+                        groupno:0,
736
+                        sort:item.device_number.sort,
737
+                        assess_time:item.dialysisassesmentbefor?item.dialysisassesmentbefor.created_time:"3753619200"
668 738
                       }
669 739
                       item.doctor_advice.push(obj)
670 740
                     })
@@ -695,6 +765,8 @@ export default {
695 765
                     it.mode_id = item.mode_id
696 766
                     it.number = item.device_number.number
697 767
                     it.zone_name = item.device_number.zone.name
768
+                    it.sort = item.device_number.sort,
769
+                    it.assess_time = item.dialysisassesmentbefor?item.dialysisassesmentbefor.created_time:"3753619200"
698 770
                     arr.push(it)
699 771
                 })
700 772
             })
@@ -736,7 +808,24 @@ export default {
736 808
                 }
737 809
             })
738 810
             this.indexInfoList = newArr
811
+            
812
+            if(this.is_sort == 1){
813
+              var newList = []
814
+               newList =  this.scheduleMap.sort(this.compare('sort'))
815
+              
816
+               this.scheduleMap = []
817
+               this.scheduleMap = newList
818
+            }
819
+            if(this.is_sort == 2){
820
+              var newList = []
821
+               newList =  this.scheduleMap.sort(this.compare('assess_time'))
822
+               this.scheduleMap = []
823
+               this.scheduleMap = newList
824
+            }
825
+            console.log("this.scheduleMap", this.scheduleMap)
739 826
            }
827
+
828
+
740 829
            if(config.is_open == 1){
741 830
            
742 831
              this.show = false
@@ -760,6 +849,8 @@ export default {
760 849
                     it.mode_id = item.mode_id
761 850
                     it.number = item.device_number.number
762 851
                     it.zone_name = item.device_number.zone.name
852
+                    it.sort = item.device_number.sort,
853
+                    it.assess_time = item.dialysisassesmentbefor?item.dialysisassesmentbefor.created_time:"3753619200"
763 854
                     arr.push(it)
764 855
                 })
765 856
             })
@@ -800,12 +891,38 @@ export default {
800 891
                 }
801 892
             })
802 893
             this.indexInfoList = newArr
894
+            console.log("this.scheduleMap2222", this.scheduleMap)
895
+
896
+             if(this.is_sort == 1){
897
+            
898
+               var newList = []
899
+               newList =  this.scheduleMap.sort(this.compare('sort'))
900
+              
901
+               this.scheduleMap = []
902
+               this.scheduleMap = newList
903
+
904
+            }
905
+            if(this.is_sort == 2){
906
+              var newList = []
907
+               newList =  this.scheduleMap.sort(this.compare('assess_time'))
908
+              
909
+               this.scheduleMap = []
910
+               this.scheduleMap = newList
911
+            }
803 912
            }
804 913
          }
805 914
          
806 915
         })
807 916
         
808 917
     },
918
+    compare:function (k) {
919
+          return function (a, b) {
920
+              var M = a[k];
921
+              var N = b[k];
922
+              return M - N;      // 从低向高排
923
+              // return N - M;   // 从高向低排
924
+          }
925
+      },
809 926
     getValue: function(val) {
810 927
       if (val != undefined) {
811 928
         return val.value;
@@ -934,19 +1051,19 @@ export default {
934 1051
         return value1 - value2
935 1052
       }
936 1053
     },
937
-    tableRowClassName({ row, rowIndex }) {
938
-        // if (row.stop_state == 1 || row.execution_state == 1) {
939
-        //     return 'stoped-row';
940
-        // }
941
-        // return 'success-rows'
942
-        // row.index = rowIndex
943
-        // const arr = this.hoverOrderArr
944
-        // for (let i = 0; i < arr.length; i++) {
945
-        //   if (rowIndex == arr[i]) {
946
-        //     return 'success-row'
947
-        //   }
948
-        // }
949
-    },
1054
+    // tableRowClassName({ row, rowIndex }) {
1055
+    //     if (row.stop_state == 1 || row.execution_state == 1) {
1056
+    //         return 'stoped-row';
1057
+    //     }
1058
+    //     return 'success-rows'
1059
+    //     row.index = rowIndex
1060
+    //     const arr = this.hoverOrderArr
1061
+    //     for (let i = 0; i < arr.length; i++) {
1062
+    //       if (rowIndex == arr[i]) {
1063
+    //         return 'success-row'
1064
+    //       }
1065
+    //     }
1066
+    // },
950 1067
     objectSpanMethod({ row, column, rowIndex, columnIndex }) {
951 1068
         if (columnIndex === 0) {
952 1069
             let index = this.indexInfoList.findIndex(item => {  //遍历数组
@@ -1082,12 +1199,14 @@ export default {
1082 1199
         }
1083 1200
     },
1084 1201
     handleSelectionChange(val){
1085
-      console.log("val23323232",val)
1202
+      console.log("val88888888",val)
1086 1203
       this.selecting_schs = val;
1204
+      this.is_status = 1
1087 1205
     },
1088 1206
     handleSelectionChangeOne(val){
1089
-      console.log("val888888",val)
1090 1207
       this.selecting_schs = val;
1208
+      this.is_status = 1
1209
+      console.log("val32323323223",val)
1091 1210
     },
1092 1211
 
1093 1212
     querySearchAsync(keyword, cb) {
@@ -1118,8 +1237,15 @@ export default {
1118 1237
          this.$message.error("请勾选需要执行的医嘱")
1119 1238
          return false
1120 1239
        }
1121
-      this.execTimeDialogVisible = true
1240
+       console.log("hhhahhhahhh",this.is_status)
1241
+       if(this.is_status == 1){
1242
+         this.execTimeDialogVisible = true
1243
+       }
1244
+       if(this.is_status == 2){
1245
+         this.execTimeDialogVisibleOne = true
1246
+        }
1122 1247
      },
1248
+
1123 1249
      excutionDoctorAdvice(){
1124 1250
 
1125 1251
        if (this.execTime.length == 0) {
@@ -1137,7 +1263,7 @@ export default {
1137 1263
 
1138 1264
        var params = {
1139 1265
         str:str,
1140
-        advice_date: moment(time).format('YYYY-MM-DD'),
1266
+        advice_date: moment(this.time).format('YYYY-MM-DD'),
1141 1267
         is_open:this.config.is_open,
1142 1268
         exec_time:execTime
1143 1269
        }
@@ -1155,17 +1281,37 @@ export default {
1155 1281
             var str = drug_name + " "+dose+dose_unit +"*"+min_number +max_unit +"/"+min_unit
1156 1282
             this.$message.error(str +"库存不足,执行失败!")
1157 1283
             this.exceLoading = false
1284
+            this.execTimeDialogVisible = false
1285
+            this.requestSchedualDoctors(this.time)
1286
+           }else{
1287
+            var msg = response.data.data.msg
1288
+            this.$message.success("执行成功!")
1289
+            this.exceLoading = false
1290
+            this.execTimeDialogVisible = false
1291
+            this.requestSchedualDoctors(this.time)
1158 1292
            }
1159
-           var msg = response.data.data.msg
1160
-           this.$message.success("保存成功!")
1161
-           this.exceLoading = false
1293
+         
1162 1294
           }
1163 1295
        })
1164 1296
      },
1165 1297
      toCheck(){
1298
+
1299
+      if(this.selecting_schs.length ==0){
1300
+         this.$message.error("请勾选需要执行的医嘱")
1301
+         return false
1302
+       }
1303
+
1304
+    
1305
+       var ids=[]
1306
+       if(this.selecting_schs!=null && this.selecting_schs.length >0){
1307
+          for(let i=0;i<this.selecting_schs.length;i++){
1308
+             ids.push(this.selecting_schs[i].patient_id)
1309
+          }
1310
+       }
1311
+       var str = ids.join(",")
1166 1312
       var params = {
1167 1313
         str:str,
1168
-        advice_date: moment(time).format('YYYY-MM-DD'),
1314
+        advice_date: moment(this.time).format('YYYY-MM-DD'),
1169 1315
         is_open:this.config.is_open,
1170 1316
        }
1171 1317
        checkNewDoctorAdvice(params).then(response=>{
@@ -1173,23 +1319,101 @@ export default {
1173 1319
             if(response.data.data.msg == 2){
1174 1320
               var advice = response.data.data.advice
1175 1321
               this.$message.error(advice.advice_name +"执行人和核对人不能是同一个人,核对失败!")
1322
+              this.requestSchedualDoctors(this.time)
1323
+            }else{
1324
+              this.$message.success("核对成功!")
1325
+              this.requestSchedualDoctors(this.time)
1176 1326
             }
1177
-            this.$message.error("核对成功!")
1327
+           
1178 1328
           }
1179 1329
        })
1180 1330
      },
1181 1331
      toSettle(){
1332
+       if(this.selecting_schs.length ==0){
1333
+         this.$message.error("请勾选需要执行的医嘱")
1334
+         return false
1335
+       }
1336
+       var ids=[]
1337
+       if(this.selecting_schs!=null && this.selecting_schs.length >0){
1338
+          for(let i=0;i<this.selecting_schs.length;i++){
1339
+             ids.push(this.selecting_schs[i].patient_id)
1340
+          }
1341
+       }
1342
+       var str = ids.join(",")
1182 1343
        var params = {
1183 1344
         str:str,
1184
-        advice_date: moment(time).format('YYYY-MM-DD'),
1345
+        advice_date: moment(this.time).format('YYYY-MM-DD'),
1185 1346
         is_open:this.config.is_open,
1186 1347
        }
1187 1348
        settleNewDoctorAdvice(params).then(response=>{
1188 1349
           if(response.data.state == 1){
1189 1350
             this.$message.success("收费成功!")
1351
+            this.requestSchedualDoctors(this.time)
1190 1352
           }
1191 1353
        })
1192
-     }
1354
+     },
1355
+     selectSortType(id){
1356
+       this.is_sort = id
1357
+       this.requestSchedualDoctors(this.time);
1358
+     },
1359
+    handleRowClick (row) {
1360
+     console.log("row232323232",row)
1361
+    },
1362
+    tableRowClassName({row, rowIndex}) {
1363
+        row.index = rowIndex
1364
+        if(row.index = rowIndex){
1365
+         return 'success-row'
1366
+        }
1367
+       
1368
+      },
1369
+    handleCurrentChangeList(row){
1370
+      console.log("row233232232332",row)
1371
+      this.selecting_schs.push(row)
1372
+      this.current_row= row
1373
+      this.is_status = 2
1374
+    
1375
+    },
1376
+    excutionDoctorAdviceOne(){
1377
+      if(this.current_row.execution_state == 1){
1378
+        this.$message.error("所选医嘱已核对,无需再核对!")
1379
+        return false
1380
+      }
1381
+     if (this.execTime.length == 0) {
1382
+          this.$message.error('请选择执行时间!')
1383
+          return false
1384
+        }
1385
+       var execTime = Math.round(new Date(this.execTime).getTime() / 1000)
1386
+      console.log("param2332323",this.current_row)
1387
+      var params= {
1388
+        advice_id:this.current_row.id,
1389
+        advice_date: moment(this.time).format('YYYY-MM-DD'),
1390
+        exec_time:execTime,
1391
+      }
1392
+      console.log("prams232323",params)
1393
+      excutionDoctorAdviceById(params).then(response=>{
1394
+        if(response.data.state == 1){
1395
+          if(response.data.data.msg == 2){
1396
+            var drug_name = response.data.data.drug.drug_name
1397
+            var dose = response.data.data.drug.dose
1398
+            var dose_unit = response.data.data.drug.dose_unit
1399
+            var min_number = response.data.data.drug.min_number
1400
+            var max_unit = response.data.data.drug.max_unit
1401
+            var min_unit = response.data.data.drug.min_unit
1402
+            var str = drug_name + " "+dose+dose_unit +"*"+min_number +max_unit +"/"+min_unit
1403
+            this.$message.error(str +"库存不足,执行失败!")
1404
+            this.exceLoading = false
1405
+            this.execTimeDialogVisibleOne = false
1406
+            this.requestSchedualDoctors(this.time)
1407
+           }else{
1408
+            var msg = response.data.data.msg
1409
+            this.$message.success("执行成功!")
1410
+            this.exceLoading = false
1411
+            this.execTimeDialogVisibleOne = false
1412
+            this.requestSchedualDoctors(this.time)
1413
+           }
1414
+        }
1415
+      })
1416
+    }
1193 1417
   },
1194 1418
   components: {
1195 1419
     BreadCrumb

+ 5 - 5
src/xt_pages/outpatientCharges/allListPrint.vue Zobrazit soubor

@@ -82,7 +82,7 @@
82 82
             this.admin = response.data.data.admin_info
83 83
             this.his_hospital = response.data.data.his_hospital
84 84
             var order_info = response.data.data.order_info
85
-            
85
+
86 86
             if(this.$store.getters.xt_user.org_id == 10215 || this.$store.getters.xt_user.org_id == 0){
87 87
               //获取所有项目类型进行去重
88 88
               let med_chrgitm_types = []
@@ -209,7 +209,7 @@
209 209
                 obj['name'] = details[a].advice.advice_name
210 210
                 // obj['spec'] = details[a].advice.drug.drug_spec
211 211
                 obj['spec'] =   details[a].advice.drug.dose +   details[a].advice.drug.dose_unit+"*" +  details[a].advice.drug.min_number +   details[a].advice.drug.min_unit+"/"+ details[a].advice.drug.max_unit
212
-                obj['unit'] = details[a].advice.drug.min_unit
212
+                obj['unit'] = details[a].advice.prescribing_number_unit
213 213
                 obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
214 214
                 obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
215 215
                 obj['price'] = parseFloat(details[a].pric)
@@ -362,7 +362,7 @@
362 362
           '@media print {.allListTitle{font-size: 24px;text-align: center;font-weight: bold;margin-bottom: 10px;}.allListInfo{display: flex;font-size: 16px;justify-content: space-between;margin: 10px 0;} .allListTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 20px;font-size: 14px;border-color: #000;text-align:left;}.allListTable tr td {padding: 0 5px;}.tableBottom{font-size: 16px;display: flex;margin-top: 20px;}.tableBottomOne{margin-right: 40px;}}'
363 363
          const style1 =
364 364
           '@media print {.allListTitle{font-size: 24px;text-align: center;font-weight: bold;margin-bottom: 10px;}.allListInfo{display: flex;font-size: 16px;justify-content: space-between;margin: 10px 0;} .allListTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 20px;font-size: 14px;border-color: #000;text-align:left;} .allListTable tr td {padding: 0 5px;} .allListTable .allListTable_1{border: none;width: 100%;text-align: center;border-collapse: collapse;line-height: 20px;font-size: 14px;border-color: #000;text-align:left;} .allListTable_1 tr{page-break-inside:avoid;} .allListTable_1 tr td {padding: 0 5px;border: 1px solid #000;} .tableBottom{font-size: 16px;display: flex;margin-top: 20px;}.tableBottomOne{margin-right: 40px;}}'
365
-        
365
+
366 366
         if(this.org_id == 10215 || this.org_id == 0 ||this.org_id == 9675){
367 367
           printJS({
368 368
           printable: 'allList-print',
@@ -379,8 +379,8 @@
379 379
         })
380 380
         }
381 381
 
382
-        
383
-        
382
+
383
+
384 384
 
385 385
         // if (this.org_template_info.template_id == 1) {
386 386
         //   printJS({

+ 1 - 1
src/xt_pages/outpatientCharges/costComparison.vue Zobrazit soubor

@@ -208,7 +208,7 @@ c<template>
208 208
                     </el-select>
209 209
                   </el-form-item>
210 210
 
211
-                  <el-form-item label="清算类别" :label-width="formLabelWidth" v-if="this.$store.getters.xt_user.org.id == 9919">
211
+                  <el-form-item label="清算类别" :label-width="formLabelWidth" >
212 212
                     <el-select v-model="clr_type" placeholder="请选择" style="width: 200px;">
213 213
                       <el-option
214 214
                           v-for="item in clrOptions"

+ 161 - 161
src/xt_pages/outpatientCharges/invoiceTemplate/printEight.vue Zobrazit soubor

@@ -1,66 +1,66 @@
1 1
 <template>
2
-  <div id='invoice-print'>
3
-    <div style="display:flex;">
4
-      <!-- <div style="position: absolute;top:70px;left:70px;">{{ list.order_number }}</div> -->
5
-      <!-- <div>{{ list.id_card_no }}</div> -->
6
-    </div>
7
-    <!-- <div style="display:flex;justify-content: space-between;">
8
-        <div>{{ list.department_name }}</div>
9
-        <div  style="position: absolute;top:70px;left:300px">{{ list.number }}</div>
10
-        <div></div>
11
-        <div  style="position: absolute;left:560px;top:70px;">
12
-            <span>{{ printDate.slice(0,4) }}</span>
13
-            <span>{{ printDate.slice(5,7) }}</span>
14
-            <span>{{ printDate.slice(8,11) }}</span>
2
+    <div id='invoice-print'>
3
+        <div style="display:flex;">
4
+            <!-- <div style="position: absolute;top:70px;left:70px;">{{ list.order_number }}</div> -->
5
+            <!-- <div>{{ list.id_card_no }}</div> -->
15 6
         </div>
16
-    </div> -->
17
-    <div style="display:flex;justify-content: space-between;">
18
-      <div style="position: absolute;top:90px;left:40px;"> {{ paramsObj.name }}</div>
19
-      <div  style="position: absolute;top:90px;left:340px">{{ list.number }}</div>
20
-      <!-- <div style="position: absolute;top:90px;left:240px;">√</div> -->
21
-      <!-- <div>{{ list.pay_way }}</div> -->
22
-      <!-- <div style="position: absolute;top:70px;left:460px;">{{ paramsObj.setl_time.split(' ')[0] }}</div>
23
-      <div style="position: absolute;top:70px;left:560px;">{{ paramsObj.setl_time.split(' ')[0] }}</div> -->
24
-    </div>
25
-    <!-- <div style="display:flex;justify-content: space-between;">
7
+        <!-- <div style="display:flex;justify-content: space-between;">
8
+            <div>{{ list.department_name }}</div>
9
+            <div  style="position: absolute;top:70px;left:300px">{{ list.number }}</div>
10
+            <div></div>
11
+            <div  style="position: absolute;left:560px;top:70px;">
12
+                <span>{{ printDate.slice(0,4) }}</span>
13
+                <span>{{ printDate.slice(5,7) }}</span>
14
+                <span>{{ printDate.slice(8,11) }}</span>
15
+            </div>
16
+        </div> -->
17
+        <div style="display:flex;justify-content: space-between;">
18
+            <div style="position: absolute;top:90px;left:40px;"> {{ paramsObj.name }}</div>
19
+            <div  style="position: absolute;top:90px;left:340px">{{ list.number }}</div>
20
+            <!-- <div style="position: absolute;top:90px;left:240px;">√</div> -->
21
+            <!-- <div>{{ list.pay_way }}</div> -->
22
+            <!-- <div style="position: absolute;top:70px;left:460px;">{{ paramsObj.setl_time.split(' ')[0] }}</div>
23
+            <div style="position: absolute;top:70px;left:560px;">{{ paramsObj.setl_time.split(' ')[0] }}</div> -->
24
+        </div>
25
+        <!-- <div style="display:flex;justify-content: space-between;">
26 26
 
27
-        <div style="position: absolute;top:110px;left:260px;">{{ totalPrice - list.psn_cash_money }}</div>
28
-        <div style="position: absolute;top:110px;left:440px;">{{ list.psn_cash_money }}</div>
29
-        <div style="position: absolute;top:110px;left:580px;">门慢结算</div>
30
-    </div> -->
31
-    <div style="display:flex;justify-content: space-between;">
32
-      <div style="position: absolute;top:160px;left:40px">西药</div>
33
-      <div style="position: absolute;top:160px;left:110px">{{ list.westernMedicineCostTotal }}</div>
34
-      <div style="position: absolute;top:160px;left:180px">检查费</div>
35
-      <div style="position: absolute;top:160px;left:260px">{{ list.checkCostTotal }}</div>
36
-      <div style="position: absolute;top:160px;left:340px">治疗费</div>
37
-      <div style="position: absolute;top:160px;left:420px">{{ list.treatCostTotal }}</div>
38
-      <div style="position: absolute;top:160px;left:500px">床位费</div>
39
-      <div style="position: absolute;top:160px;left:580px">{{ list.bedCostTotal }}</div>
40
-    </div>
41
-    <div style="display:flex;justify-content: space-between;">
42
-      <div style="position: absolute;top:190px;left:40px">中成药</div>
43
-      <div style="position: absolute;top:190px;left:110px">{{ list.chineseTraditionalMedicineCostTotal }}</div>
44
-      <div style="position: absolute;top:190px;left:180px">化验费</div>
45
-      <div style="position: absolute;top:190px;left:260px">{{ list.laboratoryCostTotal }}</div>
46
-      <div style="position: absolute;top:190px;left:340px">手术费</div>
47
-      <div style="position: absolute;top:190px;left:420px">{{ list.operationCostTotal }}</div>
48
-      <div style="position: absolute;top:190px;left:500px">其他费</div>
49
-      <div style="position: absolute;top:190px;left:580px">{{ list.otherCostTotal }}</div>
50
-    </div>
51
-    <div style="display:flex;justify-content: space-between;">
52
-      <div style="position: absolute;top:210px;left:40px"></div>
53
-      <div style="position: absolute;top:210px;left:110px"></div>
54
-      <div style="position: absolute;top:210px;left:180px"></div>
55
-      <div style="position: absolute;top:210px;left:260px"></div>
56
-      <div style="position: absolute;top:210px;left:340px">材料费</div>
57
-      <div style="position: absolute;top:210px;left:420px">{{ list.materialCostTotal }}</div>
58
-      <div style="position: absolute;top:210px;left:500px"></div>
59
-      <div style="position: absolute;top:210px;left:580px"></div>
60
-    </div>
61
-    <div>
62
-      <span style="position: absolute;top:240px;left:180px">{{ totalPrice }}</span>
63
-      <span>
27
+            <div style="position: absolute;top:110px;left:260px;">{{ totalPrice - list.psn_cash_money }}</div>
28
+            <div style="position: absolute;top:110px;left:440px;">{{ list.psn_cash_money }}</div>
29
+            <div style="position: absolute;top:110px;left:580px;">门慢结算</div>
30
+        </div> -->
31
+        <div style="display:flex;justify-content: space-between;">
32
+            <div style="position: absolute;top:160px;left:40px">西药</div>
33
+            <div style="position: absolute;top:160px;left:110px">{{ list.westernMedicineCostTotal }}</div>
34
+            <div style="position: absolute;top:160px;left:180px">检查费</div>
35
+            <div style="position: absolute;top:160px;left:260px">{{ list.checkCostTotal }}</div>
36
+            <div style="position: absolute;top:160px;left:340px">治疗费</div>
37
+            <div style="position: absolute;top:160px;left:420px">{{ list.treatCostTotal }}</div>
38
+            <div style="position: absolute;top:160px;left:500px">床位费</div>
39
+            <div style="position: absolute;top:160px;left:580px">{{ list.bedCostTotal }}</div>
40
+        </div>
41
+        <div style="display:flex;justify-content: space-between;">
42
+            <div style="position: absolute;top:190px;left:40px">中成药</div>
43
+            <div style="position: absolute;top:190px;left:110px">{{ list.chineseTraditionalMedicineCostTotal }}</div>
44
+            <div style="position: absolute;top:190px;left:180px">化验费</div>
45
+            <div style="position: absolute;top:190px;left:260px">{{ list.laboratoryCostTotal }}</div>
46
+            <div style="position: absolute;top:190px;left:340px">手术费</div>
47
+            <div style="position: absolute;top:190px;left:420px">{{ list.operationCostTotal }}</div>
48
+            <div style="position: absolute;top:190px;left:500px">其他费</div>
49
+            <div style="position: absolute;top:190px;left:580px">{{ list.otherCostTotal }}</div>
50
+        </div>
51
+        <div style="display:flex;justify-content: space-between;">
52
+            <div style="position: absolute;top:210px;left:40px"></div>
53
+            <div style="position: absolute;top:210px;left:110px"></div>
54
+            <div style="position: absolute;top:210px;left:180px"></div>
55
+            <div style="position: absolute;top:210px;left:260px"></div>
56
+            <div style="position: absolute;top:210px;left:340px">材料费</div>
57
+            <div style="position: absolute;top:210px;left:420px">{{ list.materialCostTotal }}</div>
58
+            <div style="position: absolute;top:210px;left:500px"></div>
59
+            <div style="position: absolute;top:210px;left:580px"></div>
60
+        </div>
61
+        <div>
62
+            <span style="position: absolute;top:240px;left:180px">{{ totalPrice.toFixed(2) }}</span>
63
+            <span>
64 64
             <span  style="position: absolute;top:260px;left:180px">
65 65
                 <span v-if="zhongwen.indexOf('万') > -1 && zhongwen.indexOf('拾') > -1 && zhongwen.indexOf('拾') == 1">
66 66
                     {{ zhongwen.substring(0,1) }}
@@ -110,129 +110,129 @@
110 110
                 <span v-else>零</span>
111 111
             </span>
112 112
             </span>
113
-    </div>
114
-    <!-- <div style="position: absolute;top:300px;left:460px">现金:{{ list.psn_cash_money }}</div> -->
115
-    <!-- <div>
116
-        <div style="position: absolute;top:340px;left:120px">{{ org_name }}</div>
117
-        <div v-if="org_id == 9990" style="position: absolute;top:340px;left:300px">钱玉玲</div>
118
-        <div v-if="org_id == 9990" style="position: absolute;top:340px;left:420px">陈国杰</div>
119
-    </div> -->
113
+        </div>
114
+        <!-- <div style="position: absolute;top:300px;left:460px">现金:{{ list.psn_cash_money }}</div> -->
115
+        <!-- <div>
116
+            <div style="position: absolute;top:340px;left:120px">{{ org_name }}</div>
117
+            <div v-if="org_id == 9990" style="position: absolute;top:340px;left:300px">钱玉玲</div>
118
+            <div v-if="org_id == 9990" style="position: absolute;top:340px;left:420px">陈国杰</div>
119
+        </div> -->
120 120
 
121
-    <div style="position: absolute;left:60px;top:300px;">
122
-      <span style="padding-right:20px;">{{ printDate.slice(0,4) }}</span>
123
-      <span style="padding-right:20px;">{{ printDate.slice(5,7) }}</span>
124
-      <span>{{ printDate.slice(8,11) }}</span>
121
+           <div style="position: absolute;left:60px;top:300px;">
122
+                <span style="padding-right:20px;">{{ printDate.slice(0,4) }}</span>
123
+                <span style="padding-right:20px;">{{ printDate.slice(5,7) }}</span>
124
+                <span>{{ printDate.slice(8,11) }}</span>
125
+            </div>
126
+            <div style="position: absolute;top:300px;left:300px">{{'罗佳菊'}}</div>
125 127
     </div>
126
-    <div style="position: absolute;top:300px;left:300px">{{'罗佳菊'}}</div>
127
-  </div>
128 128
 </template>
129 129
 
130 130
 
131 131
 <script>
132
-  import { getInvoice } from '@/api/project/project'
133
-  export default {
132
+import { getInvoice } from '@/api/project/project'
133
+export default {
134 134
     props:{
135
-      paramsObj:Object
135
+        paramsObj:Object
136 136
     },
137 137
     data(){
138
-      return{
139
-        list:{},
140
-        printDate:'',
141
-        zhongwen:'',
142
-        totalPrice:0.0,
143
-        org_id:'',
144
-        org_name:''
145
-      }
138
+        return{
139
+            list:{},
140
+            printDate:'',
141
+            zhongwen:'',
142
+            totalPrice:0.0,
143
+            org_id:'',
144
+            org_name:''
145
+        }
146 146
     },
147 147
     created(){
148
-      console.log('paramsObj',this.paramsObj)
149
-      let params = {
150
-        order_id: this.paramsObj.order_id,
151
-        patient_id: this.paramsObj.patient_id,
152
-        number: this.paramsObj.number,
153
-      }
154
-      this.getInvoice(params)
155
-      // var data = new Date();
156
-      // var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
157
-      // var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
158
-      // this.printDate = data.getFullYear() + "-" + month + "-" + date;
159
-      // this.smalltoBIG(982732.21)
160
-      this.org_id = this.$store.getters.xt_user.org_id
161
-      this.org_name = this.$store.getters.xt_user.org.org_name
148
+        console.log('paramsObj',this.paramsObj)
149
+        let params = {
150
+            order_id: this.paramsObj.order_id,
151
+            patient_id: this.paramsObj.patient_id,
152
+            number: this.paramsObj.number,
153
+        }
154
+        this.getInvoice(params)
155
+        // var data = new Date();
156
+        // var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
157
+        // var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
158
+        // this.printDate = data.getFullYear() + "-" + month + "-" + date;
159
+        // this.smalltoBIG(982732.21)
160
+        this.org_id = this.$store.getters.xt_user.org_id
161
+        this.org_name = this.$store.getters.xt_user.org.org_name
162 162
     },
163 163
     methods:{
164
-      getInvoice(params){
165
-        getInvoice(params).then((res) => {
166
-          console.log('res',res)
167
-          this.list = res.data.data
168
-          this.totalPrice = this.list.westernMedicineCostTotal + this.list.checkCostTotal + this.list.treatCostTotal + this.list.bedCostTotal + this.list.chineseTraditionalMedicineCostTotal +
169
-            this.list.laboratoryCostTotal + this.list.operationCostTotal + this.list.otherCostTotal + this.list.materialCostTotal
170
-          this.smalltoBIG(this.totalPrice)
171
-          var data = new Date(res.data.data.date * 1000);
172
-          var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
173
-          var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
174
-          this.printDate = data.getFullYear() + "-" + month + "-" + date;
175
-        })
176
-      },
177
-      smalltoBIG(n) {
178
-        // let fraction = ['角', '分'];
179
-        // let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
180
-        // let unit = [['元.', '万,', '亿,'], ["元",'拾', '佰', '仟']];
181
-        // let head = price < 0 ? '欠' : '';
182
-        // price = Math.abs(price);
183
-        // let upper = '';
184
-        // for (let i = 0; i < fraction.length; i++) {
185
-        // upper += (digit[Math.floor(price * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
186
-        // }
187
-        // upper = upper || '整';
188
-        // price = Math.floor(price);
189
-        // for (let i = 0; i < unit[0].length && price > 0; i++) {
190
-        // let p = '';
191
-        // for (let j = 0; j < unit[1].length && price > 0; j++) {
192
-        //     p = digit[price % 10] + unit[1][j] + p;
193
-        //     price = Math.floor(price / 10);
194
-        // }
195
-        // upper = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + upper;
196
-        // }
197
-        // this.zhongwen = head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整')
198
-        // console.log('6666',head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整'))
199
-        if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(n)){
200
-          return "数据非法";  //判断数据是否大于0
201
-        }
164
+        getInvoice(params){
165
+            getInvoice(params).then((res) => {
166
+                console.log('res',res)
167
+                this.list = res.data.data
168
+                this.totalPrice = this.list.westernMedicineCostTotal + this.list.checkCostTotal + this.list.treatCostTotal + this.list.bedCostTotal + this.list.chineseTraditionalMedicineCostTotal +
169
+                                    this.list.laboratoryCostTotal + this.list.operationCostTotal + this.list.otherCostTotal + this.list.materialCostTotal
170
+                this.smalltoBIG(this.totalPrice)
171
+                var data = new Date(res.data.data.date * 1000);
172
+                var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
173
+                var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
174
+                this.printDate = data.getFullYear() + "-" + month + "-" + date;
175
+            })
176
+        },
177
+        smalltoBIG(n) {
178
+            // let fraction = ['角', '分'];
179
+            // let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
180
+            // let unit = [['元.', '万,', '亿,'], ["元",'拾', '佰', '仟']];
181
+            // let head = price < 0 ? '欠' : '';
182
+            // price = Math.abs(price);
183
+            // let upper = '';
184
+            // for (let i = 0; i < fraction.length; i++) {
185
+            // upper += (digit[Math.floor(price * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
186
+            // }
187
+            // upper = upper || '整';
188
+            // price = Math.floor(price);
189
+            // for (let i = 0; i < unit[0].length && price > 0; i++) {
190
+            // let p = '';
191
+            // for (let j = 0; j < unit[1].length && price > 0; j++) {
192
+            //     p = digit[price % 10] + unit[1][j] + p;
193
+            //     price = Math.floor(price / 10);
194
+            // }
195
+            // upper = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + upper;
196
+            // }
197
+            // this.zhongwen = head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整')
198
+            // console.log('6666',head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整'))
199
+            if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(n)){
200
+                return "数据非法";  //判断数据是否大于0
201
+            }
202 202
 
203
-        var unit = "仟佰拾亿仟佰拾万仟佰拾元角分", str = "";
204
-        n += "00";
203
+            var unit = "仟佰拾亿仟佰拾万仟佰拾元角分", str = "";
204
+            n += "00";
205 205
 
206
-        var indexpoint = n.indexOf('.');  // 如果是小数,截取小数点前面的位数
206
+            var indexpoint = n.indexOf('.');  // 如果是小数,截取小数点前面的位数
207 207
 
208
-        if (indexpoint >= 0){
208
+            if (indexpoint >= 0){
209 209
 
210
-          n = n.substring(0, indexpoint) + n.substr(indexpoint+1, 2);   // 若为小数,截取需要使用的unit单位
211
-        }
210
+                n = n.substring(0, indexpoint) + n.substr(indexpoint+1, 2);   // 若为小数,截取需要使用的unit单位
211
+            }
212 212
 
213
-        unit = unit.substr(unit.length - n.length);  // 若为整数,截取需要使用的unit单位
214
-        for (var i=0; i < n.length; i++){
215
-          str += "零壹贰叁肆伍陆柒捌玖".charAt(n.charAt(i)) + unit.charAt(i);  //遍历转化为大写的数字
216
-        }
213
+            unit = unit.substr(unit.length - n.length);  // 若为整数,截取需要使用的unit单位
214
+            for (var i=0; i < n.length; i++){
215
+                str += "零壹贰叁肆伍陆柒捌玖".charAt(n.charAt(i)) + unit.charAt(i);  //遍历转化为大写的数字
216
+            }
217 217
 
218
-        this.zhongwen =  str.replace(/零(仟|佰|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|壹(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");
219
-        console.log(this.zhongwen)
220
-      },
218
+            this.zhongwen =  str.replace(/零(仟|佰|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|壹(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");
219
+            console.log(this.zhongwen)
220
+        },
221 221
 
222 222
     },
223 223
     watch:{
224
-      paramsObj:{//深度监听,可监听到对象、数组的变化
225
-        handler(val, oldVal){
226
-          let params = {
227
-            order_id: val.order_id,
228
-            patient_id: val.patient_id,
229
-            number: val.number,
230
-          }
231
-          this.getInvoice(params)
224
+        paramsObj:{//深度监听,可监听到对象、数组的变化
225
+            handler(val, oldVal){
226
+                let params = {
227
+                    order_id: val.order_id,
228
+                    patient_id: val.patient_id,
229
+                    number: val.number,
230
+                }
231
+                this.getInvoice(params)
232 232
 
233
-        },
234
-        deep:true
235
-      }
233
+            },
234
+            deep:true
235
+        }
236 236
     }
237
-  }
237
+}
238 238
 </script>

+ 15 - 1
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Zobrazit soubor

@@ -342,7 +342,7 @@
342 342
               <div class="signPrint" style="width: 360px;font-size:16px;">
343 343
                 <div style="margin-left:50px;">姓名:
344 344
                   <span>{{main_collection.patient.name}} </span>
345
-                  ({{ main_collection.patient.dialysis_no }},{{ main_collection.patient.age }}岁)
345
+                  ({{ main_collection.patient.dialysis_no }},{{getNewAge(main_collection.patient.id_card_no)}}岁)
346 346
                 </div>
347 347
                 <div class="printCell" style="display:flex;justify-content: space-around;">
348 348
                   <span style="display: block;width: 50%;">
@@ -5227,6 +5227,20 @@ export default {
5227 5227
         scanStyles: false
5228 5228
       })
5229 5229
     },
5230
+    getNewAge(UUserCard) {
5231
+      if (UUserCard != null && UUserCard != '') {
5232
+        // 获取年龄
5233
+        var myDate = new Date()
5234
+        var month = myDate.getMonth() + 1
5235
+        var day = myDate.getDate()
5236
+        var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1
5237
+        if (UUserCard.substring(10, 12) < month || UUserCard.substring(10, 12) == month && UUserCard.substring(12, 14) <= day) {
5238
+          age++
5239
+        }
5240
+        return age
5241
+      }
5242
+    },
5243
+
5230 5244
   },
5231 5245
   created() {
5232 5246
     this.anticoagulants_confit = this.$store.getters.anticoagulants_confit