Pārlūkot izejas kodu

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

csx 4 gadus atpakaļ
vecāks
revīzija
b48b278cd2
29 mainītis faili ar 1292 papildinājumiem un 195 dzēšanām
  1. 2 0
      .idea/.gitignore
  2. 1 1
      config/index.js
  3. 1 1
      package-lock.json
  4. 1 1
      src/api/consumable.js
  5. 9 0
      src/api/project/project.js
  6. 9 0
      src/api/schedule.js
  7. 37 9
      src/xt_pages/dialysis/components/consumables.vue
  8. 6 3
      src/xt_pages/dialysis/components/dialysisParameters.vue
  9. 4 4
      src/xt_pages/dialysis/template/DialysisPrintOrderTen.vue
  10. 3 3
      src/xt_pages/outpatientCharges/outpatientChargesManagement.vue
  11. 3 3
      src/xt_pages/outpatientCharges/treatTemplate/printOne.vue
  12. 2 1
      src/xt_pages/outpatientDoctorStation/components/additionalCharges.vue
  13. 7 5
      src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue
  14. 3 3
      src/xt_pages/outpatientDoctorStation/components/deskRecord.vue
  15. 19 13
      src/xt_pages/outpatientDoctorStation/doctorDesk.vue
  16. 2 2
      src/xt_pages/outpatientDoctorStation/print.vue
  17. 2 2
      src/xt_pages/outpatientDoctorStation/recordPrint.vue
  18. 22 2
      src/xt_pages/outpatientDoctorStation/recordTemplate/printOne.vue
  19. 83 56
      src/xt_pages/outpatientDoctorStation/template/printOne.vue
  20. 16 12
      src/xt_pages/outpatientDoctorStation/treatPrint.vue
  21. 199 47
      src/xt_pages/outpatientDoctorStation/treatTemplate/printOne.vue
  22. 65 14
      src/xt_pages/outpatientRegistration/index.vue
  23. 6 4
      src/xt_pages/outpatientRegistration/registrationHistory.vue
  24. 1 1
      src/xt_pages/workforce/components/ScheduleItem.vue
  25. 416 0
      src/xt_pages/workforce/components/nextTableWeeks.vue
  26. 1 0
      src/xt_pages/workforce/components/tableData.vue
  27. 3 2
      src/xt_pages/workforce/components/tableWeeks.vue
  28. 348 0
      src/xt_pages/workforce/next_remind_print.vue
  29. 21 6
      src/xt_pages/workforce/remind.vue

+ 2 - 0
.idea/.gitignore Parādīt failu

@@ -0,0 +1,2 @@
1
+# Default ignored files
2
+/workspace.xml

+ 1 - 1
config/index.js Parādīt failu

@@ -30,7 +30,7 @@ module.exports = {
30 30
     //  host: 'xt.test.sgjyun.com',
31 31
     //  host: 'xt.kuyicloud.com',
32 32
     // host: 'xt.test.sgjyun.com',
33
-    host: 'localhost',
33
+    host: 'xt.test.sgjyun.com',
34 34
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
35 35
     autoOpenBrowser: true,
36 36
     errorOverlay: true,

+ 1 - 1
package-lock.json Parādīt failu

@@ -7943,7 +7943,7 @@
7943 7943
     },
7944 7944
     "normalize-wheel": {
7945 7945
       "version": "1.0.1",
7946
-      "resolved": "http://registry.npm.taobao.org/normalize-wheel/download/normalize-wheel-1.0.1.tgz",
7946
+      "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
7947 7947
       "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
7948 7948
     },
7949 7949
     "normalize.css": {

+ 1 - 1
src/api/consumable.js Parādīt failu

@@ -14,7 +14,7 @@ export function GetAllZone(params){
14 14
 //获取透析参数
15 15
 
16 16
 export function getDialysisParameters(params){
17
-   console.log("params============heyuan",params)
17
+   
18 18
   return request({
19 19
      url:"/api/dialysis/getdialysisparameters",
20 20
      method:"Get",

+ 9 - 0
src/api/project/project.js Parādīt failu

@@ -461,4 +461,13 @@ export function changePatient(id,params){
461 461
       method:"Get",
462 462
       params:params
463 463
     })
464
+  }
465
+
466
+  export function getPatientDetail(id,params){
467
+    
468
+     return request({
469
+       url:"/api/histpatient/getpatientdetail?id="+id,
470
+       method:"Get",
471
+       params:params
472
+     })
464 473
   }

+ 9 - 0
src/api/schedule.js Parādīt failu

@@ -113,3 +113,12 @@ export function exportScheduleTemplate(params) {
113 113
   })
114 114
 }
115 115
 
116
+
117
+export function getNextScheduleWeekDay(params){
118
+  
119
+  return request({
120
+    url:"/api/schedule/getnextscheduleweekday",
121
+    method:"get",
122
+    params:params
123
+  })
124
+}

+ 37 - 9
src/xt_pages/dialysis/components/consumables.vue Parādīt failu

@@ -42,7 +42,7 @@
42 42
         </div>
43 43
       </div>
44 44
       <div>
45
-        <!--<el-button size="small" icon="el-icon-printer" type="primary">打印</el-button>-->
45
+        <!-- <el-button size="small" icon="el-icon-printer" @click="exportList" type="primary">导出</el-button> -->
46 46
         <el-button size="small" type="primary" @click="statistics">统计表</el-button>
47 47
       </div>
48 48
     </div>
@@ -138,6 +138,7 @@
138 138
         new_list:[],
139 139
 
140 140
         good_types: [],
141
+        arrKey:[],
141 142
 
142 143
       }
143 144
     },
@@ -178,18 +179,19 @@
178 179
 
179 180
       },
180 181
       getGoodUserInfo(good_type_id,good_user,last_good_user) {
182
+        var arrlist =[] 
181 183
         if (good_user != null && good_user.length > 0) {
182 184
           let desc = ""
183 185
           for (let b = 0; b < good_user.length; b++){
184 186
             if(good_type_id == good_user[b].good_type_id)
185 187
               desc = desc + "\n" + good_user[b].info.specification_name +"*" +good_user[b].count
186 188
           }
187
-
188
-
189
+          arrlist.push(desc)
189 190
           return desc
190 191
         }
192
+       console.log("arrlist---------",arrlist)
191 193
         return ""
192
-
194
+       
193 195
         // else if (good_user != null && good_user.length <= 0) {
194 196
         //   if (last_good_user != null && last_good_user.length > 0) {
195 197
         //     let desc = ""
@@ -219,13 +221,20 @@
219 221
             var res = response.data
220 222
             this.total = res.data.total
221 223
             this.good_types.push("姓名")
222
-
224
+            var arr = []
225
+            arr.push("name")
223 226
             for (let a = 0; a <  res.data.good_type.length; a++){
227
+              Object.keys(res.data.good_type[a]).map(item => {
228
+                if(item == 'type_name'){
229
+                  arr.push(item)
230
+                }
231
+              })
224 232
               this.good_types.push(res.data.good_type[a].type_name)
225 233
             }
226
-            console.log("res====",res.data.good_type)
234
+            this.arrKey.push(...arr)
235
+          
227 236
             this.allGoodInfo = res.data.dialysis_goods
228
-            console.log("dis===",res.data.dialysis_goods)
237
+           
229 238
             for(let i = 0; i < res.data.dialysis_goods.length; i++){
230 239
               let arr =[]
231 240
               let obj = {
@@ -271,7 +280,7 @@
271 280
 
272 281
           }
273 282
 
274
-         console.log("list",this.list)
283
+         console.log("list222222",this.list)
275 284
 
276 285
         })
277 286
 
@@ -320,7 +329,26 @@
320 329
       search() {
321 330
         this.query.page = 1
322 331
         this.GetDialysisgoods()
323
-      }
332
+      },
333
+
334
+       exportList(){
335
+         import('@/vendor/Export2Excel').then(excel => {
336
+         const tHeader = this.good_types
337
+         const filterVal = this.arrKey
338
+        
339
+         const data = this.formatJson(filterVal, this.list)
340
+         excel.export_json_to_excel({
341
+           header: tHeader,
342
+           data,
343
+           filename: '透析耗材查询'
344
+         })
345
+          this.downloadLoading = false
346
+        })
347
+       },
348
+       formatJson(filterVal, jsonData) {
349
+        return jsonData.map(v => filterVal.map(j => v[j]));
350
+      },
351
+
324 352
     }
325 353
   }
326 354
 </script>

+ 6 - 3
src/xt_pages/dialysis/components/dialysisParameters.vue Parādīt failu

@@ -220,10 +220,12 @@ export default {
220 220
     methods:{
221 221
         selectSchedulType(scheduleType) {
222 222
             this.scheduleType = scheduleType;
223
+            this.tableData = []
223 224
             this.getlist()
224 225
         },
225 226
         selectPartitionType(partitionType) {
226 227
           this.partitionType = partitionType;
228
+          this.tableData = []
227 229
           this.getlist()
228 230
         },
229 231
         getAllZone: function() {
@@ -258,7 +260,7 @@ export default {
258 260
           getDialysisParameters(params).then(response=>{
259 261
              if(response.data.state == 1){
260 262
                 var schedule = response.data.data.schedule
261
-            
263
+              
262 264
                 this.tableData = schedule
263 265
                 var total = response.data.data.total
264 266
                 this.total = total
@@ -352,6 +354,7 @@ export default {
352 354
               limit:this.limit,
353 355
               page:this.page
354 356
             }
357
+           console.log("params9999999",params)
355 358
           getDialysisParameters(params).then(response=>{
356 359
              if(response.data.state == 1){
357 360
                 var schedule = response.data.data.schedule
@@ -478,7 +481,7 @@ export default {
478 481
              dryWeight = this.dialysisBefor[i].dry_weight
479 482
           }
480 483
         }
481
-        console.log("dryweight=====",dryWeight)
484
+       
482 485
        return dryWeight
483 486
      },
484 487
      getSysBloodPressure(id){
@@ -488,7 +491,7 @@ export default {
488 491
              sysBloodPressure = this.dialysisBefor[i].systolic_blood_pressure
489 492
           }
490 493
         }
491
-        console.log("sysBloodPressure=====",sysBloodPressure)
494
+      
492 495
         return sysBloodPressure
493 496
      },
494 497
      getTargetUltrafiltration(id){

+ 4 - 4
src/xt_pages/dialysis/template/DialysisPrintOrderTen.vue Parādīt failu

@@ -1399,8 +1399,8 @@ export default {
1399 1399
 
1400 1400
         this.prescription = response.data.data.dialysisPrescription;
1401 1401
 
1402
-        this.receiverTreatmentAccess =
1403
-          response.data.data.receiverTreatmentAccess;
1402
+        this.receiverTreatmentAccess =response.data.data.receiverTreatmentAccess;
1403
+        console.log("透析监测",this.receiverTreatmentAccess)
1404 1404
         this.prescription.mode = this.modeName(this.prescription.mode_id);
1405 1405
         var rwLen = this.replacementWays.length;
1406 1406
         this.prescription.replacement = "";
@@ -1738,10 +1738,10 @@ export default {
1738 1738
       }
1739 1739
     },
1740 1740
     "patientInfo.source": function() {
1741
-      if (this.patientInfo.source == 1) {
1741
+      if (this.receiverTreatmentAccess.condition == 2 ) {
1742 1742
         this.patientInfo_source_1 = true;
1743 1743
         this.patientInfo_source_2 = false;
1744
-      } else if (this.patientInfo.source == 2) {
1744
+      } else if (this.receiverTreatmentAccess.condition == 1) {
1745 1745
         this.patientInfo_source_2 = true;
1746 1746
         this.patientInfo_source_1 = false;
1747 1747
       } else {

+ 3 - 3
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Parādīt failu

@@ -44,9 +44,9 @@
44 44
       <div class="mainRight">
45 45
 
46 46
         <div class="mainCell" style="margin-bottom:10px;flex-direction: row-reverse;">
47
-          <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">打印处置单</el-button>
48
-          <el-button size="small" @click="open(2)" type="primary">打印治疗单</el-button>
49
-          <el-button size="small" @click="open(3)" type="primary">打印</el-button>
47
+          <!-- <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">打印处置单</el-button>
48
+          <el-button size="small" @click="open(2)" type="primary">打印治疗单</el-button> -->
49
+          <el-button size="small" @click="open(3)" type="primary" style="margin-left:10px;">打印</el-button>
50 50
           <el-button v-loading="loadingone" size="small"
51 51
                      @click="open(6)"
52 52
                      v-if="this.hisPatientInfo && this.hisPatientInfo.id == 0"

+ 3 - 3
src/xt_pages/outpatientCharges/treatTemplate/printOne.vue Parādīt failu

@@ -46,7 +46,7 @@
46 46
                     </div>
47 47
                     <div class="chargeUl" style="border-top:1px solid #000;border-bottom:1px solid #000;">
48 48
                         <p style="width:50%;">现金支付</p>
49
-                        <p style="width:50%;"></p>
49
+                        <p style="width:50%;">{{list.order_info.psn_cash_pay}}</p>
50 50
                     </div>
51 51
                 </div>
52 52
                 <div style="width:80%;display:flex;height:600px;">
@@ -71,8 +71,8 @@
71 71
             
72 72
         </div>
73 73
         <div class="moneyBox">
74
-            <p>实收金:</p>
75
-            <p>记账前金额:</p>
74
+            <p>实收金:{{list.order_info.medfee_sumamt}}</p>
75
+            <p>记账前金额:{{list.order_info.preselfpay_amt}}</p>
76 76
             <p>扣款金额:</p>
77 77
             <p>记账后金额:</p>
78 78
             <p>找赎金:</p>

+ 2 - 1
src/xt_pages/outpatientDoctorStation/components/additionalCharges.vue Parādīt failu

@@ -58,6 +58,7 @@
58 58
       },
59 59
       show() {
60 60
         this.chargeTable = []
61
+       
61 62
         this.visible = true
62 63
         for (let i = 0; i < this.additions.length; i++) {
63 64
           let obj = {
@@ -83,7 +84,7 @@
83 84
     },
84 85
     watch: {
85 86
       hisPatientInfo: function(val) {
86
-        // console.log('患者ID', this)
87
+        console.log('患者ID', this)
87 88
       }
88 89
     }
89 90
   }

+ 7 - 5
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Parādīt failu

@@ -56,7 +56,7 @@
56 56
         <div class="tabsBox">
57 57
 
58 58
           <el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>
59
-          <el-tabs class="preTabs" v-model="editableTabsValue" type="card" closable @tab-remove="removeTab"
59
+          <el-tabs class="preTabs" v-model="editableTabsValue" type="border-card" closable @tab-remove="removeTab"
60 60
                    :before-leave="moreState" @tab-click="tabclickEvent">
61 61
             <el-tab-pane
62 62
               v-for="(item, index) in prescriptions"
@@ -427,7 +427,8 @@
427 427
 
428 428
         }
429 429
 
430
-      }, getTotalOne() {
430
+      }, 
431
+      getTotalOne() {
431 432
         var total = 0
432 433
         console.log(this.prescriptions)
433 434
         for (let i = 0; i < this.prescriptions.length; i++) {
@@ -458,7 +459,8 @@
458 459
         }
459 460
         return total
460 461
 
461
-      }, getCurTotal() {
462
+      }, 
463
+      getCurTotal() {
462 464
         var total = 0
463 465
 
464 466
         if(this.curPrescriptions.type == 1) {
@@ -1265,8 +1267,8 @@
1265 1267
 
1266 1268
   .addTab {
1267 1269
     position: absolute;
1268
-    right: 0;
1269
-    top: 6px;
1270
+    right: 3px;
1271
+    top: 3px;
1270 1272
     z-index: 20;
1271 1273
   }
1272 1274
 

+ 3 - 3
src/xt_pages/outpatientDoctorStation/components/deskRecord.vue Parādīt failu

@@ -54,15 +54,15 @@
54 54
     </el-form>
55 55
     <div class="mainTitle">体格信息:</div>
56 56
     <el-form class="physiqueForm" :model="case_history" ref="form" label-width="80px">
57
-      <el-form-item label="体温:" prop="name">
57
+      <el-form-item label="体温:" prop="temperature">
58 58
         <el-input v-model="case_history.temperature" placeholder=""></el-input>
59 59
         <span>℃</span>
60 60
       </el-form-item>
61
-      <el-form-item label="脉搏: " prop="name">
61
+      <el-form-item label="脉搏: " prop="pulse">
62 62
         <el-input v-model="case_history.pulse" placeholder=""></el-input>
63 63
         (次/分)
64 64
       </el-form-item>
65
-      <el-form-item label="呼吸: " prop="name">
65
+      <el-form-item label="呼吸: " prop="breathing">
66 66
         <el-input v-model="case_history.breathing" placeholder=""></el-input>
67 67
         (次/分)
68 68
       </el-form-item>

+ 19 - 13
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Parādīt failu

@@ -67,14 +67,14 @@
67 67
         <!--<desk-prescription ref="prescriptions"   :prescriptions="prescriptions" :patientInfo="patientInfo" :hisPatientInfo="hisPatientInfo"-->
68 68
         <!--v-if="titleType == '处方'" style="flex:1;"></desk-prescription>-->
69 69
         <desk-prescription  :addtions_charge="addtions_charge" :diagnoses="diagnoses" :other_sick="other_sick" :record_date="record_date"
70
-                           ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo"
71
-                           :hisPatientInfo="hisPatientInfo" @event1="changetwo($event)"
72
-                           v-show="titleType == '电子处方'" style="flex:1;"></desk-prescription>
70
+                          ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo"
71
+                          :hisPatientInfo="hisPatientInfo" @event1="changetwo($event)"
72
+                          v-show="titleType == '电子处方'" style="flex:1;"></desk-prescription>
73 73
         <desk-record :record_date="record_date" :case_history="case_history" :patientInfo="patientInfo"
74
-                     :hisPatientInfo="hisPatientInfo"   v-show="titleType == '电子病历'" :detalid="detalid" ref="child"></desk-record>
74
+                    :hisPatientInfo="hisPatientInfo"   v-show="titleType == '电子病历'" :detalid="detalid" ref="child"></desk-record>
75 75
 
76
-         <medicalRecord ref='medicalRecord' @func="getMsgFormSon" ></medicalRecord>
77
-         <saveRecordTemplate ref='saveRecordTemplate'></saveRecordTemplate>
76
+        <medicalRecord ref='medicalRecord' @func="getMsgFormSon" ></medicalRecord>
77
+        <saveRecordTemplate ref='saveRecordTemplate'></saveRecordTemplate>
78 78
       </div>
79 79
 
80 80
     </div>
@@ -107,7 +107,7 @@
107 107
         width="200">
108 108
         <template slot-scope="scope">
109 109
           <span>
110
-           <el-input v-model="scope.row.id"></el-input>
110
+           <el-input v-model="scope.row.prescription_number" :disabled="true"></el-input>
111 111
           </span>
112 112
         </template>
113 113
       </el-table-column>
@@ -179,7 +179,7 @@
179 179
         centerDialogVisible:false,
180 180
         tableData:[],
181 181
         selecting_schs: [],
182
-        index:0
182
+        index:0,
183 183
       }
184 184
     },
185 185
     methods: {
@@ -401,6 +401,12 @@
401 401
             this.patientInfo = response.data.data.xt_info
402 402
             this.hisPatientInfo = response.data.data.his_info
403 403
             this.case_history = response.data.data.case_history
404
+            var case_history = response.data.data.case_history
405
+            console.log("case_history22222222",case_history)
406
+            if (case_history.breathing  == 0) {
407
+                case_history.breathing = ""
408
+            }
409
+            this.case_history = case_history
404 410
             this.info = response.data.data.info
405 411
             this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
406 412
             if (this.case_history.temperature <= 0) {
@@ -515,10 +521,11 @@
515 521
         })
516 522
       },
517 523
       open(index) {
518
-        if(this.prescriptions.length == 0){
524
+        console.log("index0999999",this.prescriptions)
525
+         if(this.prescriptions[0].advices.length == 0 && this.prescriptions[0].project.length == 0){
519 526
            this.$message.error("请先开处方")
520 527
            return
521
-        }
528
+          }
522 529
         this.index = index
523 530
         if (index == 1) {
524 531
           this.$refs.prescriptions.open(1)
@@ -532,7 +539,6 @@
532 539
           this.$refs.prescriptions.open(4)
533 540
         }else if(index == 6){
534 541
           // this.$router.push("/outpatientDoctorStation/treatPrint?record="+this.record_date+"&prescription_id="+this.prescription_id)
535
-
536 542
           this.getPrescriptionList(this.patientid)
537 543
           // this.$router.push("/outpatientDoctorStation/treatPrint?record="+this.record_date+"&prescription_id="+this.prescription_id)
538 544
 
@@ -549,7 +555,7 @@
549 555
           }
550 556
           this.$refs.child.createCaseHistory()
551 557
         } else if (index == 2) {
552
-          this.$router.push('/outpatientDoctorStation/recordPrint?record='+this.record_date)
558
+          this.$router.push('/outpatientDoctorStation/recordPrint?record='+this.record_date+"&patient_id="+this.patientid)
553 559
         } else if (index == 3) {
554 560
           this.$refs.medicalRecord.show()
555 561
         } else if (index == 4) {
@@ -587,7 +593,7 @@
587 593
            if(response.data.state == 1){
588 594
              this.centerDialogVisible = true
589 595
              var list = response.data.data.list
590
-             console.log("list9999999",list)
596
+             // console.log("list9999999",list)
591 597
              this.tableData = list
592 598
            }
593 599
         })

+ 2 - 2
src/xt_pages/outpatientDoctorStation/print.vue Parādīt failu

@@ -81,9 +81,9 @@ export default {
81 81
       this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
82 82
 
83 83
       const style =
84
-        '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:10px;line-height: 1px; padding:0 10px;}.infoTitle p{width: 200px;font-size:14px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{padding:0 10px;min-height:450px;}.Rp{font-size: 22px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;} .drugsOne{line-height: 1px;} .drugsOne span{margin-right: 20px;} .doctorBox{display: flex; justify-content: space-between; padding:0 10px; line-height: 1px; border-bottom: 2px solid #000;} .actionBar{display: flex; justify-content: space-between; line-height: 1px; padding:0 10px;} .actionBar p{width:150px;}}';
84
+        '@media print {#prescription-print{font-size:14px;}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:10px;line-height: 1px; padding:0 10px;}.infoTitle p{width: 200px;font-size:14px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{padding:0 10px;min-height:450px;}.Rp{font-size: 22px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;} .drugsOne{line-height: 1px;} .drugsOne span{margin-right: 20px;} .doctorBox{display: flex; justify-content: space-between; padding:0 10px; line-height: 1px; border-bottom: 2px solid #000;} .actionBar{display: flex; justify-content: space-between; line-height: 1px; padding:0 10px;} .actionBar p{width:150px;}}';
85 85
       printJS({
86
-        printable: "prescription-print",
86
+        printable: "prescriptionPrint",
87 87
         type: "html",
88 88
         style: style,
89 89
         scanStyles: false

+ 2 - 2
src/xt_pages/outpatientDoctorStation/recordPrint.vue Parādīt failu

@@ -14,7 +14,7 @@
14 14
     </div>
15 15
     <div class="app-container" style="min-height:0;">
16 16
         <el-container class="newContainer">
17
-            <div style="width:270px;margin-right:20px;">
17
+            <!-- <div style="width:270px;margin-right:20px;">
18 18
                 <div class="cell clearfix" style="margin-bottom:10px;">
19 19
                     <el-input size="small"  v-model.trim="search_input" class="filter-item"/>
20 20
                     <el-button size="small" class="filter-item" type="primary" :model="keyword" @click="searchAction">搜索</el-button>
@@ -31,7 +31,7 @@
31 31
                         </template>
32 32
                     </el-table-column>
33 33
                 </el-table>
34
-            </div>
34
+            </div> -->
35 35
             
36 36
             <div class='dialysisPage' style="flex: 1;height: calc(100vh - 178px);overflow-x:auto;::-webkit-scrollbar:height:15px">
37 37
               <printOne v-bind:childResponse="childResponse" :patient="patient" :hispatient = "hispatient" :history="history"></printOne>

+ 22 - 2
src/xt_pages/outpatientDoctorStation/recordTemplate/printOne.vue Parādīt failu

@@ -93,7 +93,7 @@
93 93
 <script>
94 94
 
95 95
 import { getDataConfig } from "@/utils/data";
96
-import { getAllDoctorList } from "@/api/project/project"
96
+import { getAllDoctorList,getPatientCaseHistory } from "@/api/project/project"
97 97
 export default {
98 98
     props:{
99 99
       patient:Object,
@@ -137,12 +137,32 @@ export default {
137 137
         }
138 138
         return name
139 139
       },
140
-      
140
+      getPatientCaseHistory(){
141
+
142
+        const params = {
143
+          patient_id:this.$route.query.patient_id
144
+        }
145
+      console.log("病历22222",params)
146
+      getPatientCaseHistory(params).then(response=>{
147
+         if(response.data.state == 1){
148
+           var patient = response.data.data.patient
149
+           console.log("patinet",patient)
150
+           this.patient = patient
151
+           var history = response.data.data.history
152
+           console.log("history",history)
153
+           this.history = history
154
+           var hispatient = response.data.data.hispatient
155
+           console.log("hispatient",hispatient)
156
+           this.hispatient = hispatient
157
+         }
158
+      })
159
+    },
141 160
     },
142 161
     created(){
143 162
       this.educationOptions = getDataConfig("patient", "education_types");
144 163
       console.log("22222",this.educationOptions)
145 164
       this.getAllDoctorList()
165
+      this.getPatientCaseHistory()
146 166
     }
147 167
 }
148 168
 </script>

+ 83 - 56
src/xt_pages/outpatientDoctorStation/template/printOne.vue Parādīt failu

@@ -1,41 +1,53 @@
1 1
 <template>
2
-    <div id='prescription-print' class="prescription-print">
3
-        <div class="printTitle">血液透析中心处方笺</div>
4
-        <div class="infoTitle">
5
-            <p>姓名:{{patient.name?patient.name:""}}</p>
6
-            <p>性别:
7
-               <span v-if="patient.gender == 1">男</span>
8
-               <span v-if="patient.gender == 2">女</span>
9
-            </p>
10
-            <p>年龄:{{patient.age?patient.age:""}}岁</p>
11
-        </div>
12
-        <div class="infoMain">
13
-            <div style="margin-bottom: 10px;">门诊号:{{this.hisPatient.number?this.hisPatient.number:""}}</div>
14
-            <div style="margin-bottom: 10px;">科室:{{getDepart(this.hisPatient.departments?this.hisPatient.departments:"")}}</div>
15
-            <div style="margin-bottom: 10px;">医保卡号:{{this.hisPatient.number?this.hisPatient.number:""}}</div>
16
-            <div style="margin-bottom: 10px;">电话:{{patient.phone}}</div>
17
-            <div>地址:{{patient.home_address}}</div>
18
-            <div style="display:flex;width:50%;">临床诊断:{{patient.diagnose}}</div>
19
-        </div>
20
-        <div class="prescriptionBox">
21
-            <div class="Rp">Rp:</div>
22
-            <div class="drugsBox" v-for="(item,index) in advicePrint" :key="index">
23
-                <div class="drugsOne">{{item.advice_name?item.advice_name:""}}&nbsp;&nbsp;{{item.single_dose}}{{item.single_dose_unit}}&nbsp;×&nbsp; {{item.prescribing_number}}{{item.prescribing_number_unit}}</div>
24
-                <div style="margin-left:100px;"><span>用法:{{item.single_dose}}{{item.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{item.execution_frequency}}</span>&nbsp;&nbsp;<span>{{item.advice_desc}}</span></div>
25
-            </div>
26
-        </div>
27
-        <div class="doctorBox">
28
-            <p>医师:{{getDoctor(advicePrint[0].advice_doctor)?getDoctor(advicePrint[0].advice_doctor):""}}</p>
29
-            <p>日期:{{getTime(advicePrint[0].advice_date)?getTime(advicePrint[0].advice_date):""}}</p>
30
-        </div>
31
-        <div class="actionBar">
32
-            <p>审核:{{getDoctor(advicePrint[0].advice_doctor)?getDoctor(advicePrint[0].advice_doctor):""}}</p>
33
-            <p>配对:{{getDoctor(advicePrint[0].advice_doctor)?getDoctor(advicePrint[0].advice_doctor):""}}</p>
34
-            <p>核对:{{getDoctor(advicePrint[0].checker)?getDoctor(advicePrint[0].checker):""}}</p>
35
-            <p>发药:{{getDoctor(advicePrint[0].execution_staff)?getDoctor(advicePrint[0].execution_staff):""}}</p>
36
-            <p>药费:{{advicePrint[0].price?advicePrint[0].price:""}}</p>
37
-        </div>
2
+  <div id='prescriptionPrint'>
3
+    <div v-for="(item,index) in advicePrint" :key="index">
4
+      <div id='prescription-print' class="prescription-print" style="page-break-after: always;">
5
+          <div class="printTitle">血液透析中心处方笺</div>
6
+          <div class="infoTitle">
7
+              <p>姓名:{{item.patient.name?item.patient.name:""}}</p>
8
+              <p>性别:
9
+                <span v-if="item.patient.gender == 1">男</span>
10
+                <span v-if="item.patient.gender == 2">女</span>
11
+              </p>
12
+              <p>年龄:{{item.patient.age?item.patient.age:""}}岁</p>
13
+          </div>
14
+          <div class="infoMain">
15
+              <div style="margin-bottom: 10px;">门诊号:{{item.hisPatient.number?item.hisPatient.number:""}}</div>
16
+              <div style="margin-bottom: 10px;">科室:{{getDepart(item.hisPatient.departments?item.hisPatient.departments:"")}}</div>
17
+              <div style="margin-bottom: 10px;">医保卡号:{{item.hisPatient.number?item.hisPatient.number:""}}</div>
18
+              <div style="margin-bottom: 10px;">电话:{{item.patient.phone}}</div>
19
+              <div>地址:{{item.patient.home_address}}</div>
20
+              <div style="display:flex;width:50%;">临床诊断:{{item.patient.diagnose}}</div>
21
+          </div>
22
+          <div class="prescriptionBox">
23
+              <div class="Rp">Rp:</div>
24
+              <div class="drugsBox" v-for="(it,index) in item.advices" :key="index">
25
+                  <div class="drugsOne">{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</div>
26
+                  <div style="margin-left:100px;"><span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.execution_frequency}}</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
27
+              </div>
28
+              <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
29
+                <div class="drugsOne">{{it.item_name?it.item_name:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
30
+               </div>
31
+
32
+          </div>
33
+          <div class="doctorBox">
34
+              <p>医师:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</p>
35
+              <p>日期:{{getTime(item.ctime)?getTime(item.ctime):""}}</p>
36
+          </div>
37
+          <div class="actionBar">
38
+                 <p>审核:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
39
+                 <p>配对:{{getDoctor(item.advices[0].advice_doctor)?getDoctor(item.advices[0].advice_doctor):""}}</p>
40
+                 <p>核对:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
41
+                 <p>发药:{{getDoctor(item.advices[0].execution_staff)?getDoctor(item.advices[0].execution_staff):""}}</p>
42
+                 <p>药费:{{getTotalOne(item.id)?getTotalOne(item.id):0}}元</p>
43
+          </div>
44
+          <div style="page-break-after:always"></div>
45
+      </div>
38 46
     </div>
47
+    
48
+  </div>
49
+
50
+    
39 51
 </template>
40 52
 <script>
41 53
 import { jsGetAge, uParseTime } from '@/utils/tools'
@@ -55,7 +67,9 @@ export default {
55 67
         tableData:[],
56 68
         prescriptionInfo:[],
57 69
         hisPatient:{},
58
-        department:[]
70
+        department:[],
71
+        prescriptions:[]
72
+
59 73
       }
60 74
     },
61 75
    methods:{
@@ -92,29 +106,16 @@ export default {
92 106
           // prescription_id:this.prescription_id,
93 107
           patient_id:this.$route.query.patient_id,
94 108
           record_date:this.$route.query.record,
95
-          prescription_id:this.$route.query.prescription_id 
109
+          prescription_id:this.$route.query.prescription_id,
110
+          ids:this.$route.query.ids
96 111
         }
97
-        console.log("params---",params)
112
+        console.log("params",params)
98 113
        getPrescriptionPrint(params).then(response=>{
99 114
          if(response.data.state == 1){
100 115
             var advicePrint =  response.data.data.advicePrint
101
-            console.log("adviceprint",advicePrint)
116
+            console.log("adviceprint9999",advicePrint)
102 117
             this.advicePrint = advicePrint
103
-            var patient =  response.data.data.patient
104
-            console.log("patient",patient)
105
-            this.patient = patient
106
-            var doctorPorject = response.data.data.doctorPorject
107
-          
108
-            var arr = doctorPorject.project
109
-              console.log("我的中谷歌",arr)
110
-            for(let i=0;i<arr.length;i++){
111
-              console.log("arr",arr[i].project_name)
112
-            }
113
-            this.tableData = arr
114
-            console.log("3333",this.tableData)
115
-            var prescriptioninfo = response.data.data.prescriptionInfo
116
-            console.log("prescriptioninfo",prescriptioninfo)
117
-            this.prescriptionInfo = prescriptioninfo
118
+            this.prescriptions = advicePrint
118 119
           }
119 120
        })
120 121
      },
@@ -146,13 +147,39 @@ export default {
146 147
            }
147 148
        }
148 149
        return name
149
-     }
150
+     },
151
+     getTotalOne(id) {
152
+        
153
+        var total = 0
154
+        var addtotal = 0
155
+        for (let i = 0; i < this.prescriptions.length; i++) {
156
+          if(id == this.prescriptions[i].id){
157
+            if (this.prescriptions[i].advices != null) {
158
+              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
159
+                total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
160
+              }
161
+            }
162
+          
163
+            if (this.prescriptions[i].additionalcharge != null) {
164
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
165
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
166
+              }
167
+            }
168
+              addtotal =  Math.floor(addtotal * 100) / 100
169
+        }
170
+        return total + addtotal
171
+       }
172
+      }, 
173
+
174
+
150 175
    },
151 176
    created(){
152 177
       this.getAllDoctorList()
153 178
       this.getInitData()
154 179
       this.getPrescriptionPrint()
155 180
       this.getHisPatientDetail()
181
+
182
+     
156 183
    },
157 184
   //  watch:{
158 185
   //    patient_id:function(val){

+ 16 - 12
src/xt_pages/outpatientDoctorStation/treatPrint.vue Parādīt failu

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <div class="main-contain">
3 3
     <div class="position">
4
-      <!-- <bread-crumb :crumbs="crumbs"></bread-crumb> -->
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5 5
        <template>
6 6
         <el-button
7 7
           :loading="loading"
@@ -59,15 +59,19 @@ export default {
59 59
   },
60 60
   data() {
61 61
     return {
62
-       record_date:"",
63
-       patientTableData:[],
64
-       advicePrint:[],
65
-       hisPatient:{},
66
-       patient:{},
67
-       search_input:"",
68
-       loading:false,
69
-       patient_id:0,
70
-       prescription_id:0
62
+      crumbs: [
63
+        { path: false, name: '门诊医生站' },
64
+        { path: false, name: '打印' }
65
+      ],
66
+      record_date:"",
67
+      patientTableData:[],
68
+      advicePrint:[],
69
+      hisPatient:{},
70
+      patient:{},
71
+      search_input:"",
72
+      loading:false,
73
+      patient_id:0,
74
+      prescription_id:0
71 75
     };
72 76
   },
73 77
   methods:{
@@ -76,9 +80,9 @@ export default {
76 80
       this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
77 81
 
78 82
       const style =
79
-        '@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:10px;line-height: 1px; padding:0 10px;}.infoTitle p{width: 300px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain p{width: 50%;line-height: 1px;}.prescriptionBox{padding:0 10px;min-height:600px;}.Rp{font-size: 22px;font-weight: bold;line-height:1px;}.drugsBox{padding-left: 40px;margin-bottom: 10px;margin-bottom: 10px;}.drugsBox p{line-height: 1px;padding-bottom:10px !important;} .drugsOne{line-height: 1px;margin-bottom:10px !important;} .drugsOne span{margin-right: 20px;} .doctorBox{display: flex; justify-content: space-between; padding:0 10px; line-height: 1px; border-bottom: 2px solid #000;} .actionBar{display: flex; justify-content: space-between; line-height: 1px; padding:0 10px;} .actionBar p{width:150px;}}';
83
+        '@media print {#prescription-print{font-size:14px;}.prescription-print:last-child {page-break-after: auto;}.prescription-print{font-size: 14px;}.printTitle{font-size: 18px;text-align: center;font-weight: bold;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:5px;padding:0 10px;}.infoTitle div{width: 300px;margin-bottom:5px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain div{width: 50%;}.prescriptionBox{padding:0 10px;min-height:380px;}.Rp{font-size: 22px;font-weight: bold;line-height:1px;}.drugsBox{padding-left: 40px;margin-bottom: 10px;margin-bottom: 10px;}.drugsBox p{line-height: 1px;padding-bottom:10px !important;} .drugsOne{line-height: 1px;margin-bottom:10px !important;} .drugsOne span{margin-right: 20px;} .doctorBox{display: flex; justify-content: space-between; padding:0 10px; border-bottom: 2px solid #000;} .actionBar{display: flex; justify-content: space-between; padding:0 10px;margin:5px 0;} .actionBar div{width:150px;}}';
80 84
       printJS({
81
-        printable: "prescription-print",
85
+        printable: "prescriptionPrint",
82 86
         type: "html",
83 87
         style: style,
84 88
         scanStyles: false

+ 199 - 47
src/xt_pages/outpatientDoctorStation/treatTemplate/printOne.vue Parādīt failu

@@ -1,5 +1,7 @@
1 1
 <template>
2
-    <div id='prescription-print' class="prescription-print">
2
+   <div>
3
+    <div id='prescription-print' class="prescription-print" v-for="(item,index) in advicePrint" :key="index">
4
+
3 5
         <div style="display:flex;justify-content: space-between;font-weight:bold;">
4 6
             <p style="width:300px;display:flex;justify-content: space-between;font-weight:bold;">
5 7
                 <span>费别</span>
@@ -8,28 +10,33 @@
8 10
                 <span>保险</span>
9 11
                 <span>其他</span>
10 12
             </p>
11
-            <p>就诊日期:{{this.$route.query.record}}</p>
13
+            <p>就诊日期:{{getTime(item.ctime)}}</p>
12 14
         </div>
15
+
13 16
         <div class="printTitle">血液透析中心</div>
17
+
14 18
         <div class="printTitle">处方、治疗单</div>
19
+
15 20
         <div class="infoTitle">
16
-            <p>门诊编号:34567876532345678</p>
21
+            <p>门诊编号:</p>
17 22
             <p>电脑号:</p>
18 23
         </div>
24
+
19 25
         <div class="infoMain">
20
-            <p style="margin-bottom: 10px;width:25%">姓名:{{patient.name}}</p>
26
+            <p style="margin-bottom: 10px;width:25%">姓名:{{item.patient.name}}</p>
21 27
             <p style="margin-bottom: 10px;width:25%">性别:
22
-                <span v-if="patient.gender == 1">男</span>
23
-                <span v-if="patient.gender == 2">女</span>
28
+                <span v-if="item.patient.gender == 1">男</span>
29
+                <span v-if="item.patient.gender == 2">女</span>
24 30
             </p>
25 31
             <p style="margin-bottom: 10px;width:25%">年龄:
26
-                <span>{{patient.age}}</span>
32
+                <span>{{item.patient.age}}</span>
27 33
             </p>
28 34
             <p style="margin-bottom: 10px;width:25%">参保类型:</p>
29
-            <p style="margin-bottom: 10px;width:50%;">联系电话:{{patient.phone}}</p>
30
-            <p style="width:50%;">地址:{{patient.unit_address}}</p>
31
-            <p style="width:50%;">诊断:{{patient.diagnose}}</p>
35
+            <p style="margin-bottom: 10px;width:50%;">联系电话:{{item.patient.phone}}</p>
36
+            <p style="width:50%;">地址:{{item.patient.unit_address}}</p>
37
+            <p style="width:50%;">诊断:{{item.patient.diagnose}}</p>
32 38
         </div>
39
+
33 40
         <div class="prescriptionBox">
34 41
             <table style="width:100%;text-align:center;line-height:25px;">
35 42
                 <tr>
@@ -42,27 +49,30 @@
42 49
                     <td>备注</td>
43 50
                     <td>天数</td>
44 51
                 </tr>
45
-                <tr v-for="(item,index) in this.tableData" :key="index">
52
+                <tr v-for="(it,index) in item.project" :key="index">
46 53
                     <td>{{index+1}}</td>
47
-                    <td>{{item.project_name}}</td>
48
-                    <td>{{item.single_dose}}</td>
49
-                    <td>{{item.unit}}</td>
50
-                    <td>{{item.price}}</td>
54
+                    <td>{{getProjectName(it.project_id)}}</td>
55
+                    <td>{{it.single_dose}}</td>
56
+                    <td>{{getUnit(it.unit)}}</td>
57
+                    <td>{{it.price}}</td>
51 58
                     <td></td>
52
-                    <td>{{item.remark}}</td>
53
-                    <td>{{item.day}}</td>
54
-                   
59
+                    <td>{{it.remark}}</td>
60
+                    <td>{{it.day}}</td>
61
+
55 62
                 </tr>
56 63
             </table>
57 64
         </div>
65
+
58 66
         <div class="infoTitle">
59
-            <p>开单医生:{{getDoctor(this.prescriptionInfo[0].creator)?getDoctor(this.prescriptionInfo[0].creator):""}}</p>
67
+            <p>开单医生:{{item.doctor?item.doctor:""}}</p>
60 68
             <p>签章:</p>
61 69
         </div>
70
+
62 71
         <div class="actionBar">
63
-            <p>执行医生:{{getDoctor(this.prescriptionInfo[0].creator)?getDoctor(this.prescriptionInfo[0].creator):""}}</p>
64
-            <p>费用:</p>
72
+            <p>执行医生:{{item.doctor?item.doctor:""}}</p>
73
+            <p>费用:{{getTotalOne(item.id)?getTotalOne(item.id):''}}元</p>
65 74
         </div>
75
+
66 76
         <table style="width:100%;text-align:center;line-height:25px;border-collapse: collapse;" border="1">
67 77
             <tr>
68 78
                 <td style="width:16%;">治疗时间</td>
@@ -89,7 +99,113 @@
89 99
                 <td style="width:16px;"></td>
90 100
             </tr>
91 101
         </table>
102
+     </div>
103
+
104
+
105
+    <div id='prescriptionPrint'>
106
+
107
+        <div v-for="(item,index) in advicePrint" :key="index">
108
+            <div id='prescription-print' class="prescription-print" style="page-break-after: always;">
109
+                <div style="display:flex;justify-content: space-between;font-weight:bold;">
110
+                    <div style="width:200px;display:flex;justify-content: space-between;font-weight:bold;">
111
+                        <span>费别</span>
112
+                        <span>自费</span>
113
+                        <span>公费</span>
114
+                        <span>保险</span>
115
+                        <span>其他</span>
116
+                    </div>
117
+                    <div>就诊日期:{{getTime(item.ctime)}}</div>
118
+                </div>
119
+
120
+                <div class="printTitle">血液透析中心</div>
121
+
122
+                <div class="printTitle">处方、治疗单</div>
123
+
124
+                <div class="infoTitle">
125
+                    <div>门诊编号:</div>
126
+                    <div>电脑号:</div>
127
+                </div>
128
+
129
+                <div class="infoMain">
130
+                    <div style="margin-bottom: 10px;width:25%">姓名:{{item.patient.name}}</div>
131
+                    <div style="margin-bottom: 10px;width:25%">性别:
132
+                        <span v-if="item.patient.gender == 1">男</span>
133
+                        <span v-if="item.patient.gender == 2">女</span>
134
+                    </div>
135
+                    <div style="margin-bottom: 10px;width:25%">年龄:
136
+                        <span>{{item.patient.age}}</span>
137
+                    </div>
138
+                    <div style="margin-bottom: 10px;width:25%">参保类型:</div>
139
+                    <div style="margin-bottom: 10px;width:50%;">联系电话:{{item.patient.phone}}</div>
140
+                    <div style="width:50%;">地址:{{item.patient.unit_address}}</div>
141
+                    <div style="width:100%;">诊断:{{item.patient.diagnose}}</div>
142
+                </div>
143
+                
144
+                <div class="prescriptionBox">
145
+                    <table style="width:100%;text-align:center;line-height:25px;">
146
+                        <tr>
147
+                            <td>序号</td>
148
+                            <td>项目名称</td>
149
+                            <td>数量</td>
150
+                            <td>单位</td>
151
+                            <td>单价</td>
152
+                            <td>部位</td>
153
+                            <td>备注</td>
154
+                            <td>天数</td>
155
+                        </tr>
156
+                        <tr v-for="(it,index) in item.project" :key="index">
157
+                            <td>{{index+1}}</td>
158
+                            <td>{{getProjectName(it.project_id)}}</td>
159
+                            <td>{{it.single_dose}}</td>
160
+                            <td>{{getUnit(it.unit)}}</td>
161
+                            <td>{{it.price}}</td>
162
+                            <td></td>
163
+                            <td>{{it.remark}}</td>
164
+                            <td>{{it.day}}</td>
165
+
166
+                        </tr>
167
+                    </table>
168
+                </div>
169
+                <div class="infoTitle">
170
+                    <div>开单医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</div>
171
+                    <div>签章:</div>
172
+                </div>
173
+                <div class="actionBar">
174
+                    <div>执行医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</div>
175
+                    <div>费用:</div>
176
+                </div>
177
+                <table style="width:100%;text-align:center;line-height:25px;border-collapse: collapse;" border="1">
178
+                    <tr>
179
+                        <td style="width:16%;">治疗时间</td>
180
+                        <td style="width:16%;"></td>
181
+                        <td style="width:16%;"></td>
182
+                        <td style="width:16%;"></td>
183
+                        <td style="width:16%;"></td>
184
+                        <td style="width:16%;"></td>
185
+                    </tr>
186
+                    <tr>
187
+                        <td style="width:16%;">医生签字</td>
188
+                        <td style="width:16%;"></td>
189
+                        <td style="width:16%;"></td>
190
+                        <td style="width:16%;"></td>
191
+                        <td style="width:16%;"></td>
192
+                        <td style="width:16%;"></td>
193
+                    </tr>
194
+                    <tr>
195
+                        <td style="width:16px;">患者签字</td>
196
+                        <td style="width:16px;"></td>
197
+                        <td style="width:16px;"></td>
198
+                        <td style="width:16px;"></td>
199
+                        <td style="width:16px;"></td>
200
+                        <td style="width:16px;"></td>
201
+                    </tr>
202
+                </table>
203
+            </div>
204
+
205
+        </div>
206
+
92 207
     </div>
208
+  </div>
93 209
 </template>
94 210
 <script>
95 211
 import { jsGetAge, uParseTime } from '@/utils/tools'
@@ -99,14 +215,16 @@ export default {
99 215
       patient_id:Number,
100 216
       record_date:String,
101 217
       prescription_id:Number
102
-    }, 
218
+    },
103 219
     data(){
104 220
       return {
105 221
         doctorList:[],
106 222
         advicePrint:{},
107 223
         patient:{},
108 224
         tableData:[],
109
-        prescriptionInfo:[]
225
+        prescriptionInfo:[],
226
+        projectList:[],
227
+        prescriptions:[]
110 228
       }
111 229
     },
112 230
    methods:{
@@ -127,10 +245,10 @@ export default {
127 245
       getAllDoctorList().then(response=>{
128 246
         if(response.data.state == 1){
129 247
                var doctor =  response.data.data.doctor
130
-               
248
+
131 249
                this.doctorList = doctor
132 250
              }
133
-         })   
251
+         })
134 252
      },
135 253
 
136 254
       getDoctor(id){
@@ -155,7 +273,8 @@ export default {
155 273
         //   prescription_id:this.prescription_id,
156 274
           patient_id:this.$route.query.patient_id,
157 275
           record_date:this.$route.query.record,
158
-          prescription_id:this.$route.query.prescription_id 
276
+          prescription_id:this.$route.query.prescription_id,
277
+          ids:this.$route.query.ids,
159 278
         }
160 279
         console.log("999999",params)
161 280
        getPrescriptionPrint(params).then(response=>{
@@ -163,25 +282,55 @@ export default {
163 282
             var advicePrint =  response.data.data.advicePrint
164 283
             console.log("adviceprint",advicePrint)
165 284
             this.advicePrint = advicePrint
166
-            var patient =  response.data.data.patient
167
-            console.log("patient",patient)
168
-            this.patient = patient
169
-            this.tableData = arr
170
-            console.log("3333",this.tableData)
171
-            var prescriptioninfo = response.data.data.prescriptionInfo
172
-            console.log("prescriptioninfo",prescriptioninfo)
173
-            this.prescriptionInfo = prescriptioninfo
285
+            this.prescriptions = advicePrint
286
+            var projectlist =  response.data.data.projectlist
287
+            console.log("所有项目列表",projectlist)
288
+            this.projectList = projectlist
174 289
 
175
-            var doctorPorject = response.data.data.doctorPorject
176
-          
177
-            var arr = doctorPorject.project
178
-              console.log("治疗单",arr)
179
-            for(let i=0;i<arr.length;i++){
180
-              console.log("arr",arr[i].project_name)
181
-            }
182 290
           }
183 291
        })
184
-     }
292
+     },
293
+     getProjectName(id){
294
+        var project_name = ""
295
+        for(let i=0;i<this.projectList.length;i++){
296
+           if(id == this.projectList[i].id){
297
+               project_name = this.projectList[i].project_name
298
+           }
299
+        }
300
+        return project_name
301
+     },
302
+     getUnit(id){
303
+        var unit=""
304
+       for(let i=0;i<this.projectList.length;i++){
305
+           if(id == this.projectList[i].id){
306
+               unit = this.projectList[i].unit
307
+           }
308
+        }
309
+        return unit
310
+     },
311
+
312
+       getTotalOne(id) {
313
+
314
+        var total = 0
315
+        var addtotal = 0
316
+        for (let i = 0; i < this.prescriptions.length; i++) {
317
+          if(id == this.prescriptions[i].id){
318
+            if (this.prescriptions[i].project != null) {
319
+              for (let a = 0; a < this.prescriptions[i].project.length; a++) {
320
+                total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
321
+              }
322
+            }
323
+
324
+            if (this.prescriptions[i].additionalcharge != null) {
325
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
326
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
327
+              }
328
+            }
329
+              addtotal =  Math.floor(addtotal * 100) / 100
330
+        }
331
+        return total + addtotal
332
+       }
333
+      },
185 334
    },
186 335
    created(){
187 336
       this.getAllDoctorList()
@@ -198,8 +347,11 @@ export default {
198 347
 
199 348
 
200 349
 <style lang="scss" scoped>
350
+.prescription-print{
351
+    font-size: 14px;
352
+}
201 353
 .printTitle{
202
-    font-size: 22px;
354
+    font-size: 18px;
203 355
     text-align: center;
204 356
     font-weight: bold;
205 357
 }
@@ -210,7 +362,7 @@ export default {
210 362
     line-height: 24px;
211 363
     padding:0 10px;
212 364
 }
213
-.infoTitle p{
365
+.infoTitle div{
214 366
     width: 300px;
215 367
 }
216 368
 .infoMain{
@@ -219,7 +371,7 @@ export default {
219 371
     border-bottom: 2px solid #000;
220 372
     padding:0 10px;
221 373
 }
222
-.infoMain p{
374
+.infoMain div{
223 375
     width: 50%;
224 376
     line-height: 24px;
225 377
 }
@@ -246,11 +398,11 @@ export default {
246 398
 }
247 399
 .actionBar{
248 400
     display: flex;
249
-    justify-content: space-between; 
401
+    justify-content: space-between;
250 402
     line-height: 24px;
251 403
     padding:0 10px;
252 404
 }
253
-.actionBar p{
405
+.actionBar div{
254 406
     width:150px;
255 407
 }
256 408
 </style>

+ 65 - 14
src/xt_pages/outpatientRegistration/index.vue Parādīt failu

@@ -9,12 +9,12 @@
9 9
                 <el-form class="basicForm" :model="form"  :rules="rules"  ref="form"  label-width="100px">
10 10
                     <el-form-item label="患者姓名:"  prop="name" :validate-event="is_Name">
11 11
                         <!-- <el-input  v-model="form.name"></el-input> -->
12
-                       <el-select v-model="form.name" placeholder="请选择">
12
+                       <el-select v-model="form.name" placeholder="请选择" @change="changeName">
13 13
                             <el-option
14 14
                             v-for="item in patient"
15 15
                             :key="item.patient_id"
16 16
                             :label="item.name"
17
-                            :value="item.name">
17
+                            :value="item.patient_id">
18 18
                             </el-option>
19 19
                         </el-select>
20 20
                     </el-form-item>
@@ -46,11 +46,17 @@
46 46
 
47 47
                       <el-form-item label="医疗类别:">
48 48
                         <el-select v-model="form.medicalCare" placeholder="请选择">
49
-                            <el-option
49
+                            <!-- <el-option
50 50
                             v-for="item in medicalCare"
51 51
                             :key="item.value"
52 52
                             :label="item.label"
53 53
                             :value="item.value">
54
+                            </el-option> -->
55
+                           <el-option
56
+                            v-for="(item,index) in getDictionaryDataConfig('system','social_type')"
57
+                            :key="index"
58
+                            :label="item.name"
59
+                            :value="item.id">
54 60
                             </el-option>
55 61
                         </el-select>
56 62
                     </el-form-item>
@@ -86,11 +92,17 @@
86 92
 
87 93
                    <el-form-item label="社保类型:">
88 94
                         <el-select v-model="form.social_type" placeholder="请选择">
89
-                            <el-option
95
+                            <!-- <el-option
90 96
                             v-for="(item,index) in getDictionaryDataConfig('system','social_type')"
91 97
                             :key="index"
92 98
                             :label="item.name"
93 99
                             :value="item.id">
100
+                            </el-option> -->
101
+                          <el-option
102
+                            v-for="item in medicalCare"
103
+                            :key="item.value"
104
+                            :label="item.label"
105
+                            :value="item.value">
94 106
                             </el-option>
95 107
                         </el-select>
96 108
                     </el-form-item>
@@ -117,7 +129,7 @@
117 129
                         </el-select>
118 130
                     </el-form-item>
119 131
                     <el-form-item label="医生:"  prop="doctor" :validate-event="is_Name" >
120
-                        <el-select v-model="form.doctor" placeholder="请选择">
132
+                        <el-select v-model="form.doctor" placeholder="请选择" @change="changeDoctor">
121 133
                             <el-option
122 134
                             v-for="item in doctorList"
123 135
                             :key="item.admin_user_id"
@@ -165,8 +177,9 @@
165 177
 <script>
166 178
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
167 179
 import { basename } from 'path'
168
-import { getAllDoctorList,saveHisPatient,getTodaySchedulePatient } from "@/api/project/project"
180
+import { getAllDoctorList,saveHisPatient,getTodaySchedulePatient,getPatientDetail } from "@/api/project/project"
169 181
 import { getDictionaryDataConfig } from '@/utils/data'
182
+import { uParseTime } from "@/utils/tools";
170 183
 const moment = require('moment')
171 184
 export default {
172 185
     components:{
@@ -199,13 +212,16 @@ export default {
199 212
                 phone:'',
200 213
                 social_type:'',
201 214
             },
202
-            settlement: [{
203
-                value: 1,
204
-                label: '医保'
205
-                }, {
206
-                value: 2,
207
-                label: '自费'
208
-            }],
215
+          settlement: 
216
+            [
217
+              {value: 1,label: '医保'},
218
+              {value: 2,label: '自费'},
219
+              {value: 3,label:'公费'},
220
+              {value: 4,label:'农保'},
221
+              {value: 5,label:'会员'},
222
+              {value: 6,label:'职工'},
223
+              {value: 7,label:'合同'}
224
+            ],
209 225
             sex: [{
210 226
                 value: 1,
211 227
                 label: '男'
@@ -394,6 +410,7 @@ export default {
394 410
            getAllDoctorList().then(response=>{
395 411
              if(response.data.state == 1){
396 412
                var doctor =  response.data.data.doctor
413
+               console.log("doctor-----",doctor)
397 414
                this.doctorList = doctor
398 415
                var department = response.data.data.department
399 416
                console.log("department",department)
@@ -446,6 +463,14 @@ export default {
446 463
              this.is_Name = true
447 464
              return
448 465
           }
466
+          var name = ""
467
+          for(let i=0;i<this.patient.length;i++){
468
+            if(this.form.name == this.patient[i].patient_id){
469
+                name = this.patient[i].name
470
+            }
471
+          }
472
+          console.log("name",name)
473
+          this.form.name  = name
449 474
           this.$refs[formName].validate((valid)=>{
450 475
              if(valid){
451 476
                   if(this.form.costChecked == true){
@@ -479,7 +504,7 @@ export default {
479 504
                     social_type:this.form.social_type
480 505
                 }
481 506
                 console.log("params",params)
482
-
507
+                
483 508
                 saveHisPatient(params).then(response=>{
484 509
                    if(response.data.state == 1){
485 510
                      var patient =  response.data.data.patient
@@ -520,8 +545,34 @@ export default {
520 545
        },
521 546
        getDictionaryDataConfig(module, filed_name) {
522 547
         return getDictionaryDataConfig(module, filed_name)
548
+      },
523 549
 
550
+      changeDoctor(id){
551
+          
552
+         for(let i=0;i<this.doctorList.length;i++){
553
+            if(this.doctorList[i].admin_user_id == id){
554
+              if(this.doctorList[i].department_id == 0){
555
+                 this.form.department = this.departmentList[0].id
556
+              }else{
557
+                this.form.department = this.doctorList[i].department_id
558
+              }
559
+             
560
+            }
561
+         }
524 562
       },
563
+      changeName(id){
564
+        getPatientDetail(id).then(response=>{
565
+           if(response.data.state == 1){
566
+             var patient =  response.data.data.patient
567
+             console.log("patient",patient)
568
+             this.form.sex = patient.gender 
569
+             this.form.age = patient.age
570
+             this.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
571
+             this.form.phone = patient.phone
572
+             this.form.idCard = patient.id_card_no
573
+          }
574
+        })
575
+      }
525 576
     },
526 577
     created(){
527 578
       //获取当前机构有人员信息

+ 6 - 4
src/xt_pages/outpatientRegistration/registrationHistory.vue Parādīt failu

@@ -79,8 +79,8 @@
79 79
                 <el-table-column align="center" prop="name" label="证件号" width='180'>
80 80
                     <template slot-scope="scope">{{ scope.row.id_card_no }}</template>
81 81
                 </el-table-column>
82
-                <el-table-column align="center" label="患者保险类型">
83
-                    <template slot-scope="scope">{{getMedicalTreatment(scope.row.medical_treatment_type)}}</template>
82
+                <el-table-column align="center" label="社保类型">
83
+                    <template slot-scope="scope">{{getMedicalTreatment(scope.row.social_type)}}</template>
84 84
                 </el-table-column>
85 85
                 <el-table-column align="center" prop="name" label="医生" width="80">
86 86
                     <template slot-scope="scope">{{getDoctor(scope.row.doctor) }}</template>
@@ -126,6 +126,7 @@ const moment = require('moment')
126 126
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
127 127
 import { getHisPatientHistory,changePatient,getHisPatient } from "@/api/project/project"
128 128
 import { uParseTime } from "@/utils/tools";
129
+
129 130
 export default {
130 131
     components:{
131 132
         BreadCrumb
@@ -148,8 +149,8 @@ export default {
148 149
                 {value: 4,label: "免收诊金"},
149 150
                 {value: 5,label: "专家"}
150 151
             ],
151
-            start_time:"",
152
-            end_time:"",
152
+            start_time:moment().format("YYYY-MM-DD"),
153
+            end_time:moment().format("YYYY-MM-DD"),
153 154
             limit:20,
154 155
             page:1,
155 156
             total:0,
@@ -178,6 +179,7 @@ export default {
178 179
                 id: 7,
179 180
                 name: "生育保险"
180 181
             }],
182
+            
181 183
             tablePatient:[]
182 184
         }
183 185
     },

+ 1 - 1
src/xt_pages/workforce/components/ScheduleItem.vue Parādīt failu

@@ -2,7 +2,7 @@
2 2
     <div >
3 3
         <el-tooltip placement="right" :disabled="scheduleDetail.patient.length>0?false:true" >
4 4
             <div slot="content">
5
-                {{scheduleDetail.patient}}11
5
+                {{scheduleDetail.patient}}
6 6
                 <br/>
7 7
                 <span v-if="scheduleDetail.mode_name.length>0">({{scheduleDetail.mode_name}})</span>
8 8
             </div>

+ 416 - 0
src/xt_pages/workforce/components/nextTableWeeks.vue Parādīt failu

@@ -0,0 +1,416 @@
1
+<template>
2
+  <div>
3
+    <div class="cell clearfix" style="float: right">
4
+      <el-button
5
+        style="float: right"
6
+        size="small"
7
+        icon="el-icon-printer"
8
+        @click="printAction()"
9
+        type="primary"
10
+        >打印
11
+      </el-button>
12
+    </div>
13
+
14
+    <div class="cell clearfix">
15
+      <label class="title"> <span class="name">时间</span> : </label>
16
+      <div class="time">
17
+        <ul class>
18
+          <li
19
+            :class="item.id == week_type ? 'active' : ''"
20
+            @click="selectWeekType(item.id)"
21
+            v-for="item in weekArr"
22
+            :key="item.id"
23
+          >
24
+            {{ item.name }}
25
+          </li>
26
+        </ul>
27
+      </div>
28
+      
29
+      <div  class="title"><span class="name">班 次</span> :</div>
30
+      <div class="time">
31
+        <ul class>
32
+          <li
33
+            :class="item.id == week_time ? 'active' : ''"
34
+            @click="selectWeekTime(item.id)"
35
+            v-for="item in weekTimes"
36
+            :key="item.id"
37
+          >
38
+            {{ item.name }}
39
+          </li>
40
+        </ul>
41
+      </div>
42
+    </div>
43
+    <el-table
44
+      :row-style="{ color: '#303133' }"
45
+      :data="scheduleData"
46
+      border
47
+      :header-cell-style="{
48
+        backgroundColor: 'rgb(245, 247, 250)',
49
+        color: '#606266'
50
+      }"
51
+      style="width: 100%"
52
+    >
53
+      <el-table-column label="姓名" min-width="100" align="center">
54
+        <template slot-scope="scope">
55
+          {{ scope.row.patient }}
56
+        </template>
57
+      </el-table-column>
58
+      <el-table-column label="分区" min-width="70" align="center">
59
+        <template slot-scope="scope">
60
+          {{ scope.row.zone.name }}
61
+        </template>
62
+      </el-table-column>
63
+      <el-table-column label="班次" min-width="70" align="center">
64
+        <template slot-scope="scope">
65
+          {{ getSchedulesType(scope.row.schedule_type) }}
66
+        </template>
67
+      </el-table-column>
68
+      <el-table-column label="机号" min-width="70" align="center">
69
+        <template slot-scope="scope">
70
+          {{ scope.row.number.number }}
71
+        </template>
72
+      </el-table-column>
73
+      <el-table-column label="透析模式" min-width="100" align="center">
74
+        <template slot-scope="scope">
75
+          {{
76
+            scope.row.mode_id && modeOptions[scope.row.mode_id]
77
+              ? modeOptions[scope.row.mode_id].name
78
+              : ""
79
+          }}
80
+        </template>
81
+      </el-table-column>
82
+      <el-table-column label="透析器" min-width="100" align="center">
83
+        <template slot-scope="scope">
84
+          {{ scope.row.prescription.dialyzer_perfusion_apparatus }}
85
+        </template>
86
+      </el-table-column>
87
+      <el-table-column label="抗凝剂" min-width="100" align="center">
88
+        <template slot-scope="scope">
89
+          <span v-if="scope.row.prescription.anticoagulant === 1">无肝素</span>
90
+          <span v-if="scope.row.prescription.anticoagulant === 2"
91
+            >普通肝素</span
92
+          >
93
+          <span v-if="scope.row.prescription.anticoagulant === 3"
94
+            >低分子肝素</span
95
+          >
96
+          <span v-if="scope.row.prescription.anticoagulant === 4"
97
+            >阿加曲班</span
98
+          >
99
+          <span v-if="scope.row.prescription.anticoagulant === 5"
100
+            >枸橼酸钠</span
101
+          >
102
+          <span v-if="scope.row.prescription.anticoagulant === 6"
103
+            >低分子肝素钙</span
104
+          >
105
+          <span v-if="scope.row.prescription.anticoagulant === 7"
106
+            >低分子肝素钠</span
107
+          >
108
+        </template>
109
+      </el-table-column>
110
+      <el-table-column label="总量" min-width="100" align="center">
111
+        <template slot-scope="scope">
112
+          <span v-if="scope.row.prescription.anticoagulant == 1">{{
113
+            scope.row.prescription.anticoagulant_zongliang
114
+              ? scope.row.prescription.anticoagulant_zongliang + "mg"
115
+              : ""
116
+          }}</span>
117
+          <span v-if="scope.row.prescription.anticoagulant == 2">{{
118
+            scope.row.prescription.anticoagulant_zongliang
119
+              ? scope.row.prescription.anticoagulant_zongliang + "iu"
120
+              : ""
121
+          }}</span>
122
+          <span v-if="scope.row.prescription.anticoagulant == 3">{{
123
+            scope.row.prescription.anticoagulant_zongliang
124
+              ? scope.row.prescription.anticoagulant_zongliang + "iu"
125
+              : ""
126
+          }}</span>
127
+          <span v-if="scope.row.prescription.anticoagulant == 4">{{
128
+            scope.row.prescription.anticoagulant_zongliang
129
+              ? scope.row.prescription.anticoagulant_zongliang + "mg"
130
+              : ""
131
+          }}</span>
132
+          <span v-if="scope.row.prescription.anticoagulant == 5">{{
133
+            scope.row.prescription.anticoagulant_zongliang
134
+              ? scope.row.prescription.anticoagulant_zongliang + "mg"
135
+              : ""
136
+          }}</span>
137
+          <span v-if="scope.row.prescription.anticoagulant == 6">{{
138
+            scope.row.prescription.anticoagulant_zongliang
139
+              ? scope.row.prescription.anticoagulant_zongliang + "iu"
140
+              : ""
141
+          }}</span>
142
+          <span v-if="scope.row.prescription.anticoagulant == 7">{{
143
+            scope.row.prescription.anticoagulant_zongliang
144
+              ? scope.row.prescription.anticoagulant_zongliang + "iu"
145
+              : ""
146
+          }}</span>
147
+        </template>
148
+      </el-table-column>
149
+
150
+      <el-table-column label="长期医嘱" min-width="440" align="center">
151
+        <template slot-scope="scope">
152
+          <span style="white-space: pre">{{
153
+            getAdvice(scope.row.doctor_advice)
154
+          }}</span>
155
+        </template>
156
+      </el-table-column>
157
+    </el-table>
158
+  </div>
159
+</template>
160
+
161
+<script>
162
+import { getNextScheduleWeekDay } from "@/api/schedule";
163
+import WeekItem from "./WeekItem";
164
+const moment = require('moment')
165
+export default {
166
+  name: "tableWeeks",
167
+  props: {
168
+    weekTime: {
169
+      type: String,
170
+      default: "thisWeek"
171
+    }
172
+  },
173
+
174
+  data() {
175
+    return {
176
+      weekArr: [
177
+        { id: 1, name: "周一" },
178
+        { id: 2, name: "周二" },
179
+        { id: 3, name: "周三" },
180
+        { id: 4, name: "周四" },
181
+        { id: 5, name: "周五" },
182
+        { id: 6, name: "周六" },
183
+        { id: 7, name: "周日" }
184
+      ],
185
+      anticoagulants_confit: null,
186
+
187
+      week_type: "1",
188
+      week_time:0,
189
+      weekTimes:[
190
+        {id:0,name:"全部"},
191
+        {id:1,name:"上午"},
192
+        {id:2,name:"下午"},
193
+        {id:3,name:"晚上"},
194
+      ],
195
+      weekTitle: ["", "", "", "", "", "", ""],
196
+      weekData: {
197
+        Monday: [],
198
+        Tuesday: [],
199
+        Wednesday: [],
200
+        Thursday: [],
201
+        Friday: [],
202
+        Saturday: [],
203
+        Sunday: []
204
+      },
205
+      scheduleData: [],
206
+      modeOptions: null
207
+    };
208
+  },
209
+  watch: {
210
+  
211
+    weekTime: function() {
212
+      
213
+      var theType = this.weekType(this.weekTime);
214
+      this.getSchedules(theType);
215
+    }
216
+  },
217
+
218
+  methods: {
219
+    printAction() {
220
+      this.$router.push({
221
+        path: "/schedule/remind/print/next?week_type=" + this.week_type+"&week_time="+this.week_time
222
+      });
223
+    },
224
+    getNextScheduleWeekDay() {
225
+        const params = {
226
+          start_time:moment().week(moment().week() + 1).startOf('week').unix(),
227
+          end_time:moment().week(moment().week() + 1).endOf('week').unix(),
228
+          week_type:this.week_type,
229
+          week_time:this.week_time,
230
+        }
231
+      
232
+      getNextScheduleWeekDay(params).then(response => {
233
+        this.scheduleData = [];
234
+        if (response.data.state == 1) {
235
+          this.scheduleData = response.data.data.schedule;
236
+          console.log("下周数据",response.data.data.schedule)
237
+         
238
+        } else {
239
+          this.$message.error("网络错误");
240
+          return false;
241
+        }
242
+      });
243
+    },
244
+
245
+    weekType(weekTime) {
246
+      var theType = 2;
247
+      switch (weekTime) {
248
+        case "lastWeek":
249
+          theType = 1;
250
+          break;
251
+        case "thisWeek":
252
+          theType = 2;
253
+          break;
254
+        case "nextWeek":
255
+          theType = 3;
256
+          break;
257
+        case "nextTwoWeek":
258
+          theType = 4;
259
+          break;
260
+        default:
261
+          theType = 2;
262
+          break;
263
+      }
264
+      return theType;
265
+    },
266
+    weekPath(week) {
267
+      var weekArr = {
268
+        1: "Monday",
269
+        2: "Tuesday",
270
+        3: "Wednesday",
271
+        4: "Thursday",
272
+        5: "Friday",
273
+        6: "Saturday",
274
+        7: "Sunday"
275
+      };
276
+      if (typeof weekArr[week] == "undefined") {
277
+        return "";
278
+      }
279
+      return weekArr[week];
280
+    },
281
+    selectWeekType(type) {
282
+      this.week_type = type;
283
+      // let params = {
284
+      //   week_type: this.week_type
285
+      // };
286
+      this.getNextScheduleWeekDay();
287
+    },
288
+    selectWeekTime(type){
289
+       this.week_time = type
290
+       this.getNextScheduleWeekDay()
291
+    },
292
+
293
+    getSchedulesType: function(type) {
294
+      let type_name = "";
295
+      switch (type) {
296
+        case 1:
297
+          type_name = "上午";
298
+          break;
299
+        case 2:
300
+          type_name = "下午";
301
+          break;
302
+        case 3:
303
+          type_name = "晚上";
304
+          break;
305
+      }
306
+      return type_name;
307
+    },
308
+    getAdvice: function(doctor_advice) {
309
+      if (doctor_advice != null) {
310
+        let name = "";
311
+        for (let i = 0; i < doctor_advice.length; i++) {
312
+          let prescribing_number = "";
313
+          let single_dose = "";
314
+          let drug_spec = "";
315
+
316
+          if (doctor_advice[i].prescribing_number > 0) {
317
+            prescribing_number =
318
+              doctor_advice[i].prescribing_number +
319
+              doctor_advice[i].prescribing_number_unit;
320
+          }
321
+          if (doctor_advice[i].single_dose > 0) {
322
+            single_dose =
323
+              " 单次用量 " +
324
+              doctor_advice[i].single_dose +
325
+              doctor_advice[i].single_dose_unit;
326
+          }
327
+
328
+          if (doctor_advice[i].drug_spec > 0) {
329
+            drug_spec =
330
+              doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit;
331
+          }
332
+
333
+          name =
334
+            name +
335
+            doctor_advice[i].advice_name +
336
+            " " +
337
+            drug_spec +
338
+            " " +
339
+            prescribing_number +
340
+            " " +
341
+            single_dose +
342
+            " " +
343
+            doctor_advice[i].delivery_way +
344
+            " " +
345
+            doctor_advice[i].execution_frequency +
346
+            " " +
347
+            doctor_advice[i].remark +
348
+            "\n";
349
+
350
+          if (doctor_advice[i].child.length > 0) {
351
+            for (let a = 0; a < doctor_advice[i].child.length; a++) {
352
+              if (doctor_advice[i].child[a].prescribing_number > 0) {
353
+                doctor_advice[i].child[a]["presc"] =
354
+                  doctor_advice[i].child[a].prescribing_number +
355
+                  doctor_advice[i].child[a].prescribing_number_unit;
356
+              } else {
357
+                doctor_advice[i].child[a]["presc"] = "";
358
+              }
359
+
360
+              if (doctor_advice[i].child[a].single_dose > 0) {
361
+                doctor_advice[i].child[a]["single"] =
362
+                  " " +
363
+                  " 单次用量 " +
364
+                  " " +
365
+                  doctor_advice[i].child[a].single_dose +
366
+                  doctor_advice[i].child[a].single_dose_unit;
367
+              } else {
368
+                doctor_advice[i].child[a]["single"] = "";
369
+              }
370
+
371
+              name =
372
+                name +
373
+                "▲" +
374
+                doctor_advice[i].child[a].advice_name +
375
+                "" +
376
+                doctor_advice[i].child[a].advice_desc +
377
+                doctor_advice[i].child[a].drug_spec_unit +
378
+                doctor_advice[i].child[a].presc +
379
+                doctor_advice[i].child[a].single +
380
+                "\n";
381
+            }
382
+          }
383
+        }
384
+        return name;
385
+      }
386
+    }
387
+  },
388
+  components: {
389
+    WeekItem
390
+  },
391
+  created() {
392
+    this.modeOptions = this.$store.getters.treatment_mode;
393
+    this.anticoagulants_confit = this.$store.getters.anticoagulants_confit;
394
+    console.log("抗凝机", this.anticoagulants_confit);
395
+    this.week_type = new Date().getDay();
396
+    if (this.week_type == 0) {
397
+      this.week_type = 7;
398
+    }
399
+    this.getNextScheduleWeekDay();
400
+  }
401
+};
402
+</script>
403
+
404
+<style rel="stylesheet/css" lang="scss">
405
+.el-table td,
406
+.el-table th.is-leaf,
407
+.el-table--border,
408
+.el-table--group {
409
+  border-color: #d0d3da;
410
+}
411
+.el-table--border::after,
412
+.el-table--group::after,
413
+.el-table::before {
414
+  background-color: #d0d3da;
415
+}
416
+</style>

+ 1 - 0
src/xt_pages/workforce/components/tableData.vue Parādīt failu

@@ -733,6 +733,7 @@ export default {
733 733
   watch: {
734 734
     weekTime: function() {
735 735
       var theType = this.weekType(this.weekTime);
736
+      console.log("999999999",theType)
736 737
       this.getSchedules(theType);
737 738
     },
738 739
     scheduleZoneRow: function() {

+ 3 - 2
src/xt_pages/workforce/components/tableWeeks.vue Parādīt failu

@@ -208,6 +208,7 @@ export default {
208 208
   },
209 209
   watch: {
210 210
     weekTime: function() {
211
+     
211 212
       var theType = this.weekType(this.weekTime);
212 213
       this.getSchedules(theType);
213 214
     }
@@ -224,12 +225,12 @@ export default {
224 225
           week_type:this.week_type,
225 226
           week_time:this.week_time,
226 227
         }
227
-        console.log("params------",params)
228
+       
228 229
       getScheduleWeekDay(params).then(response => {
229 230
         this.scheduleData = [];
230 231
         if (response.data.state == 1) {
231 232
           this.scheduleData = response.data.data.schdules;
232
-          console.log("排班-----", this.scheduleData);
233
+         
233 234
         } else {
234 235
           this.$message.error("网络错误");
235 236
           return false;

+ 348 - 0
src/xt_pages/workforce/next_remind_print.vue Parādīt failu

@@ -0,0 +1,348 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+      <el-row style="float:right;">
6
+        <el-col :span="24">
7
+          <el-button
8
+            size="small"
9
+            icon="el-icon-printer"
10
+            type="primary"
11
+            @click="printAction"
12
+            >打印</el-button
13
+          >
14
+        </el-col>
15
+      </el-row>
16
+    </div>
17
+    <div class="app-container" style="background-color: white;">
18
+      <div id="print_content">
19
+        <div class="print_main_content">
20
+          <div class="order_title_panl">
21
+            <span class="main_title">{{day}}排班提醒({{ currentDate }})</span>
22
+          </div>
23
+          <div class="table_panel">
24
+            <table class="table">
25
+              <thead>
26
+                <tr>
27
+                  <!-- <td :width="td_1_width">姓名</td>
28
+                  <td :width="td_1_width">分区</td>
29
+                  <td :width="td_1_width">班次</td>
30
+                  <td :width="td_1_width">机号</td>
31
+                  <td :width="td_1_width">透析模式</td>
32
+                  <td :width="td_2_width">透析器</td>
33
+                  <td :width="td_2_width">抗凝剂</td>
34
+                  <td :width="td_2_width">低分子肝素</td>
35
+                  <td :width="td_4_width">长期医嘱</td> -->
36
+                  <td width="100">姓名</td>
37
+                  <td width="70">分区</td>
38
+                  <td width="70">班次</td>
39
+                  <td width="70">机号</td>
40
+                  <td width="120">透析模式</td>
41
+                  <td width="100">透析器</td>
42
+                  <td width="120">抗凝剂</td>
43
+                  <td width="100">总量</td>
44
+                  <td width="300">长期医嘱</td>
45
+                </tr>
46
+              </thead>
47
+              <tbody>
48
+              <tr v-for="(main_collection, index) in scheduleData" :key="index">
49
+                <td :width="td_1_width">{{ main_collection.patient}}</td>
50
+                <td :width="td_1_width">{{ main_collection.zone.name }}</td>
51
+                <td :width="td_1_width">
52
+                  {{getSchedulesType(main_collection.schedule_type)}}
53
+                </td>
54
+                <td :width="td_1_width">
55
+                  {{main_collection.number.number}}
56
+
57
+                </td>
58
+                <td :width="td_1_width">
59
+                  {{modeOptions[main_collection.mode_id].name}}
60
+                </td>
61
+                <td :width="td_1_width">
62
+                  {{main_collection.prescription.dialyzer_perfusion_apparatus}}
63
+
64
+
65
+                </td>
66
+                <td :width="td_1_width">
67
+                  {{ main_collection.prescription.anticoagulant ? anticoagulants_confit[main_collection.prescription.anticoagulant].name : ''}}
68
+
69
+                </td>
70
+                <td :width="td_1_width">
71
+                  <span v-if="main_collection.prescription.anticoagulant == 1">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
72
+                  <span v-if="main_collection.prescription.anticoagulant == 2">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
73
+                  <span v-if="main_collection.prescription.anticoagulant == 3">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
74
+                  <span v-if="main_collection.prescription.anticoagulant == 4">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
75
+                  <span v-if="main_collection.prescription.anticoagulant == 5">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
76
+                  <span v-if="main_collection.prescription.anticoagulant == 6">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
77
+                  <span v-if="main_collection.prescription.anticoagulant == 7">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
78
+                </td>
79
+                <td :width="td_4_width" style="text-align:left" >
80
+                  <span style="white-space: pre">{{getAdvice(main_collection.doctor_advice)}}</span>
81
+                </td>
82
+              </tr>
83
+              </tbody>
84
+            </table>
85
+          </div>
86
+        </div>
87
+      </div>
88
+    </div>
89
+  </div>
90
+</template>
91
+
92
+<script>
93
+  import { getNextScheduleWeekDay } from '@/api/schedule'
94
+  import { parseTime } from '@/utils'
95
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
96
+  import print from 'print-js'
97
+  const moment = require('moment') 
98
+  export default {
99
+    name: 'SchedulePrint',
100
+    data() {
101
+      return {
102
+        crumbs: [
103
+          { path: false, name: '排班提醒' },
104
+          { path: false, name: '排班提醒打印' }
105
+        ],
106
+        scheduleData:[],
107
+        week_type: 0,
108
+        day:'',
109
+        td_1_width: '10%',
110
+        td_2_width: '10%',
111
+        td_3_width: '25%',
112
+        td_4_width: '45%',
113
+        modeOptions: null,
114
+        anticoagulants_confit:null,
115
+        currentDate:'',
116
+        start_time:moment().week(moment().week() + 1).startOf('week').unix(),
117
+        end_time:moment().week(moment().week() + 1).endOf('week').unix(),
118
+      }
119
+    },
120
+    components: {
121
+      BreadCrumb
122
+    },
123
+    created() {
124
+     this.currentDate = this.getCurrentDate()
125
+      this.modeOptions = this.$store.getters.treatment_mode
126
+      this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
127
+      this.week_type = this.$route.query.week_type
128
+      this.week_time  = this.$route.query.week_time
129
+      
130
+      const params = {
131
+          week_type:this.week_type,
132
+          week_time:this.week_time,
133
+          start_time:this.start_time,
134
+          end_time:this.end_time,
135
+        }
136
+      console.log("打印下周",params)
137
+      getNextScheduleWeekDay(params).then(rs => {
138
+        var resp = rs.data
139
+        console.log(resp)
140
+        if (resp.state == 1) {
141
+          this.scheduleData = resp.data.schedule
142
+        } else {
143
+          this.$message.error(resp.msg)
144
+        }
145
+      }).catch(err => {
146
+        this.$message.error(err)
147
+      })
148
+    },
149
+    methods: {
150
+      getAdvice:function(doctor_advice) {
151
+        if (doctor_advice != null) {
152
+
153
+        let name = ""
154
+        for (let i = 0; i< doctor_advice.length; i++) {
155
+
156
+          let prescribing_number = ''
157
+          let single_dose = ''
158
+          let drug_spec = ''
159
+
160
+          if (doctor_advice[i].prescribing_number > 0) {
161
+            prescribing_number = doctor_advice[i].prescribing_number + doctor_advice[i].prescribing_number_unit
162
+          }
163
+          if (doctor_advice[i].single_dose > 0) {
164
+            single_dose = ' 单次用量 ' + doctor_advice[i].single_dose + doctor_advice[i].single_dose_unit
165
+          }
166
+
167
+          if (doctor_advice[i].drug_spec > 0) {
168
+            drug_spec = doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
169
+          }
170
+
171
+          name = name + doctor_advice[i].advice_name + " " + drug_spec + " " + prescribing_number + " " + single_dose + " " + doctor_advice[i].delivery_way + " " + doctor_advice[i].execution_frequency + " " + doctor_advice[i].remark + "\n"
172
+
173
+          if (doctor_advice[i].child.length > 0) {
174
+
175
+            for (let a = 0; a < doctor_advice[i].child.length; a++) {
176
+
177
+              if (doctor_advice[i].child[a].prescribing_number > 0) {
178
+                doctor_advice[i].child[a]['presc'] = doctor_advice[i].child[a].prescribing_number + doctor_advice[i].child[a].prescribing_number_unit
179
+              } else {
180
+                doctor_advice[i].child[a]['presc'] = ''
181
+              }
182
+
183
+              if (doctor_advice[i].child[a].single_dose > 0) {
184
+                doctor_advice[i].child[a]['single'] = " " + ' 单次用量 ' + " " + doctor_advice[i].child[a].single_dose + doctor_advice[i].child[a].single_dose_unit
185
+              } else {
186
+                doctor_advice[i].child[a]['single'] = ''
187
+              }
188
+
189
+              name = name + "▲" + doctor_advice[i].child[a].advice_name + ""
190
+                + doctor_advice[i].child[a].advice_desc
191
+                + doctor_advice[i].child[a].drug_spec_unit
192
+                + doctor_advice[i].child[a].presc
193
+                + doctor_advice[i].child[a].single + "\n"
194
+            }
195
+
196
+          }
197
+        }
198
+          return name
199
+
200
+
201
+        }
202
+
203
+      },
204
+      printAction: function() {
205
+        const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
206
+
207
+        printJS({
208
+          printable: 'print_content',
209
+          type: 'html',
210
+          documentTitle: '  ',
211
+          style: style,
212
+          scanStyles: false
213
+        })
214
+      }, getSchedulesType: function(type) {
215
+        let type_name = ''
216
+        switch (type) {
217
+          case 1:
218
+            type_name = '上午'
219
+            break
220
+          case 2:
221
+            type_name = '下午'
222
+            break
223
+          case 3:
224
+            type_name = '晚上'
225
+            break
226
+        }
227
+        return type_name
228
+      },
229
+      getCurrentDate: function () {
230
+        console.log(this.$route.query.week_type)
231
+        var myDate = new Date();
232
+        var year = myDate.getFullYear(); //年
233
+        var month = myDate.getMonth() + 1; //月
234
+        var day = myDate.getDate() + 7; //日
235
+        var newday = myDate.getDay();
236
+        var days = parseInt(this.$route.query.week_type);
237
+        var dayNum = parseInt(this.$route.query.week_type);
238
+        switch(days) {
239
+          case 1:
240
+            days = '星期一';
241
+            break;
242
+          case 2:
243
+            days = '星期二';
244
+            break;
245
+          case 3:
246
+            days = '星期三';
247
+            break;
248
+          case 4:
249
+            days = '星期四';
250
+            break;
251
+          case 5:
252
+            days = '星期五';
253
+            break;
254
+          case 6:
255
+            days = '星期六';
256
+            break;
257
+          case 7:
258
+            days = '星期日';
259
+            break;
260
+        }
261
+        if(newday > dayNum){
262
+          let lastDay = day - (newday - dayNum)
263
+          console.log("lastDay1",lastDay)
264
+          var str = year + "年" + month + "月" + lastDay + "日  " + days;
265
+          return str;
266
+        }else if(newday < dayNum){
267
+          let lastDay = day + (dayNum - newday)
268
+          console.log("lastDay2",lastDay)
269
+          var str = year + "年" + month + "月" + lastDay + "日  " + days;
270
+          return str;
271
+        }else{
272
+          var str = year + "年" + month + "月" + day + "日  " + days;
273
+          return str;
274
+        }
275
+        
276
+        
277
+      }
278
+    }
279
+  }
280
+</script>
281
+
282
+<style rel="stylesheet/scss" lang="scss" scoped>
283
+.print_main_content {
284
+  background-color: white;
285
+  max-width: 1500px;
286
+  margin: 0 auto;
287
+  padding: 0 0 20px 0;
288
+
289
+  .order_title_panl {
290
+    text-align: center;
291
+
292
+    .main_title {
293
+      font-size: 18px;
294
+      line-height: 40px;
295
+      font-weight: 500;
296
+    }
297
+  }
298
+  .table_panel {
299
+    .table {
300
+      width: 100%;
301
+      border: 1px solid;
302
+      border-collapse: collapse;
303
+      padding: 2px;
304
+
305
+      thead {
306
+        tr {
307
+          td {
308
+            border: 1px solid;
309
+            text-align: center;
310
+            font-size: 20px;
311
+            padding: 15px 5px;
312
+          }
313
+        }
314
+      }
315
+      tbody {
316
+        tr {
317
+          td {
318
+            border: 1px solid;
319
+            text-align: center;
320
+            font-size: 18px;
321
+            padding: 10px 5px;
322
+
323
+            .proj {
324
+              padding: 5px 0;
325
+              text-align: left;
326
+
327
+              .proj_title {
328
+                font-size: 16px;
329
+                font-weight: 500;
330
+                line-height: 25px;
331
+              }
332
+
333
+              .proj_item {
334
+                font-size: 15px;
335
+                line-height: 20px;
336
+
337
+                .zone_name {
338
+                  font-weight: 500;
339
+                }
340
+              }
341
+            }
342
+          }
343
+        }
344
+      }
345
+    }
346
+  }
347
+}
348
+</style>

+ 21 - 6
src/xt_pages/workforce/remind.vue Parādīt failu

@@ -10,12 +10,15 @@
10 10
         <el-tab-pane name="thisWeek">
11 11
             <span slot="label"><i class="el-icon-date"></i> 本周({{theWeek.thisWeek}})</span>
12 12
         </el-tab-pane>
13
-        <!--<el-tab-pane name="nextWeek">-->
14
-            <!--<span slot="label"><i class="el-icon-date"></i> 下周({{theWeek.nextWeek}})</span>-->
15
-        <!--</el-tab-pane>-->
13
+        <el-tab-pane name="nextWeek">
14
+            <span slot="label"><i class="el-icon-date"></i> 下周({{theWeek.nextWeek}})</span>
15
+        </el-tab-pane> 
16 16
     </el-tabs>
17 17
     <table-push v-if="activeName=='pushTime'"></table-push>
18
-    <table-weeks v-else :week-time="activeName"> </table-weeks>
18
+    <!-- <table-weeks v-else :week-time="activeName"> </table-weeks> -->
19
+     
20
+   <table-weeks v-if="activeName == 'thisWeek'"> </table-weeks>
21
+   <nextTableWeeks v-if="activeName =='nextWeek'"></nextTableWeeks>
19 22
   </div>
20 23
 </div>
21 24
 </template>
@@ -23,6 +26,7 @@
23 26
 <script>
24 27
 import {getWeekPanels} from '@/api/schedule';
25 28
 import tableWeeks from './components/tableWeeks'
29
+import nextTableWeeks from './components/nextTableWeeks'
26 30
 import tablePush from './components/tablePush'
27 31
 import BreadCrumb from '../components/bread-crumb'
28 32
 export default {
@@ -40,7 +44,8 @@ export default {
40 44
     components:{
41 45
       BreadCrumb,
42 46
         tableWeeks,
43
-        tablePush
47
+        tablePush,
48
+        nextTableWeeks
44 49
     },
45 50
     methods: {
46 51
 
@@ -50,7 +55,8 @@ export default {
50 55
             return false
51 56
           }
52 57
           this.theWeek.thisWeek = response.data.data.theWeek;
53
-          this.theWeek.nextWeek = this.theWeek.thisWeek+1;
58
+         console.log("上一周",this.theWeek.thisWeek)
59
+        //  this.theWeek.nextWeek = this.theWeek.thisWeek+1;
54 60
 
55 61
           let childrenRefs = this.$refs.elTabs.$children
56 62
           this.$nextTick(() => {
@@ -60,10 +66,19 @@ export default {
60 66
       },
61 67
       handleClick(tab, event) {
62 68
         console.log(tab, event);
69
+      },
70
+      changeActiveName(val){
71
+        console.log("val------",val)
72
+        this.activeName = val
63 73
       }
64 74
     },
65 75
     created(){
66 76
         this.getWeekPanels();
77
+    },
78
+    watch:{
79
+      activeName:function(val){
80
+       console.log("val----",val)
81
+      }
67 82
     }
68 83
 };
69 84
 </script>