Pārlūkot izejas kodu

Merge branch '20200710_pc_vue_new_branch' into 20200916_pc_vue_new_branch

csx 4 gadus atpakaļ
vecāks
revīzija
8d46946c48

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

@@ -452,4 +452,13 @@ export function changePatient(id,params){
452 452
       method:"Get",
453 453
       params:params
454 454
     })
455
-  } 
455
+  } 
456
+
457
+  export function getPrescriptionList(id,params){
458
+     
459
+    return request({
460
+      url:"/api/hispatient/getprescription?patient_id="+id,
461
+      method:"Get",
462
+      params:params
463
+    })
464
+  }

+ 10 - 1
src/router/modules/outpatientDoctorStation.js Parādīt failu

@@ -61,6 +61,15 @@ export default {
61 61
       is_menu: false,
62 62
       name: 'outpatientDoctorStationTreatPrint',
63 63
       meta: { title: 'outpatientDoctorStationTreatPrint', noCache: true }
64
-  },
64
+   },
65
+
66
+   {
67
+    path: '/outpatientDoctorStation/printone',
68
+    component: () => import('@/xt_pages/outpatientDoctorStation/template/printOne'),
69
+    hidden: true,
70
+    is_menu: false,
71
+    name: 'outpatientDoctorStationPrint',
72
+    meta: { title: 'outpatientDoctorStationPrint', noCache: true }
73
+   },
65 74
   ]
66 75
 }

+ 99 - 5
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Parādīt failu

@@ -78,6 +78,46 @@
78 78
       </div>
79 79
 
80 80
     </div>
81
+
82
+     <el-dialog
83
+      title="处方打印"
84
+      :visible.sync="centerDialogVisible"
85
+      width="600px"
86
+      center>
87
+     <el-table
88
+      ref="multipleTable"
89
+      :data="tableData"
90
+      tooltip-effect="dark"
91
+      style="width: 600px"
92
+
93
+      @selection-change="handleSelectionChange">
94
+      <el-table-column
95
+        type="selection"
96
+        width="50">
97
+      </el-table-column>
98
+      <el-table-column
99
+        label="处方编号"
100
+        width="120">
101
+        <template  slot-scope="scope">
102
+          <span>处方编号</span>
103
+        </template>
104
+      </el-table-column>
105
+      <el-table-column
106
+        label="处方号"
107
+        width="200">
108
+        <template slot-scope="scope">
109
+          <span>
110
+           <el-input v-model="scope.row.id"></el-input>
111
+          </span>
112
+        </template>
113
+      </el-table-column>
114
+    </el-table>
115
+      <span slot="footer" class="dialog-footer">
116
+        <el-button @click="centerDialogVisible = false">取 消</el-button>
117
+        <el-button type="primary" @click="savePrint">确 定</el-button>
118
+      </span>
119
+    </el-dialog>
120
+
81 121
   </div>
82 122
 </template>
83 123
 
@@ -90,6 +130,7 @@
90 130
   import medicalRecord from './components/medicalRecord'
91 131
   import saveRecordTemplate from './components/saveRecordTemplate'
92 132
   import { uParseTime } from '@/utils/tools'
133
+  import { getPrescriptionList } from "@/api/project/project"
93 134
   export default {
94 135
     components: {
95 136
       BreadCrumb,
@@ -133,6 +174,12 @@
133 174
         prescription_id:0,
134 175
         addtions_charge:[],
135 176
 
177
+        patientid:0,
178
+        prescriptionList:[],
179
+        centerDialogVisible:false,
180
+        tableData:[],
181
+        selecting_schs: [],
182
+        index:0
136 183
       }
137 184
     },
138 185
     methods: {
@@ -187,10 +234,14 @@
187 234
               this.choosePatient(this.patientTableData[0])
188 235
             }
189 236
 
237
+            this.prescriptionList = response.data.data.list.prescription
238
+            this.patientid = this.patientTableData[0].patient_id
239
+
190 240
           }
191 241
         })
192 242
       },
193 243
       choosePatient(val) {
244
+        this.patientid = val.patients.id
194 245
         let params = {
195 246
           'record_date': this.record_date,
196 247
           'patient_id': val.patients.id
@@ -244,6 +295,7 @@
244 295
             } else {
245 296
               this.case_history.is_infect = false
246 297
             }
298
+            this.prescriptionList =response.data.data.prescription
247 299
             if (response.data.data.prescription.length > 0) {
248 300
               for (let i = 0; i < response.data.data.prescription.length; i++) {
249 301
                 var prescription = response.data.data.prescription[i]
@@ -319,17 +371,26 @@
319 371
         })
320 372
       },
321 373
       open(index) {
322
-        console.log("index",index)
374
+        if(this.prescriptionList.length == 0){
375
+           this.$message.error("请先开处方")
376
+           return
377
+        }
378
+        this.index = index
323 379
         if (index == 1) {
324 380
           this.$refs.prescriptions.open(1)
325 381
         } else if (index == 2) {
326
-          this.$router.push("/outpatientDoctorStation/print?record="+this.record_date+"&prescription_id="+this.prescription_id)
382
+
383
+          this.getPrescriptionList(this.patientid)
384
+          // this.$router.push("/outpatientDoctorStation/print?record="+this.record_date+"&prescription_id="+this.prescription_id)
327 385
         } else if (index == 3) {
328 386
           this.$refs.prescriptions.open(3)
329 387
         } else if (index == 4) {
330 388
           this.$refs.prescriptions.open(4)
331 389
         }else if(index == 6){
332
-          this.$router.push("/outpatientDoctorStation/treatPrint?record="+this.record_date+"&prescription_id="+this.prescription_id)
390
+          // this.$router.push("/outpatientDoctorStation/treatPrint?record="+this.record_date+"&prescription_id="+this.prescription_id)
391
+
392
+          this.getPrescriptionList(this.patientid)
393
+          // this.$router.push("/outpatientDoctorStation/treatPrint?record="+this.record_date+"&prescription_id="+this.prescription_id)
333 394
 
334 395
         }
335 396
 
@@ -359,13 +420,13 @@
359 420
       // }
360 421
 
361 422
       getMsgFormSon(id){
362
-        console.log("id----------",id)
423
+
363 424
         this.detalid = id
364 425
       },
365 426
       changetwo(data){
366 427
         console.log("data000000",data)
367 428
         this.prescription_id = data
368
-      }
429
+      },
369 430
       //  getTemplateDetail(id){
370 431
       //     getTemplateDetail(id).then(response=>{
371 432
       //         if(response.data.state == 1){
@@ -377,6 +438,38 @@
377 438
       //         }
378 439
       //     })
379 440
       //   },
441
+      getPrescriptionList(id){
442
+        getPrescriptionList(id).then(response=>{
443
+           if(response.data.state == 1){
444
+             this.centerDialogVisible = true
445
+             var list = response.data.data.list
446
+             console.log("list9999999",list)
447
+             this.tableData = list
448
+           }
449
+        })
450
+      },
451
+      handleSelectionChange(val){
452
+       this.selecting_schs = val
453
+       console.log("99999",this.selecting_schs)
454
+      },
455
+      handleClick(){
456
+
457
+      },
458
+      savePrint(){
459
+        var arr = []
460
+        for(let i=0;i<this.selecting_schs.length;i++){
461
+             arr.push(this.selecting_schs[i].id)
462
+          }
463
+          console.log("arr",arr)
464
+         var ids = arr.join(",")
465
+         console.log("ids",ids)
466
+         if(this.index == 2){
467
+           this.$router.push("/outpatientDoctorStation/print?record="+this.record_date+"&prescription_id="+this.prescription_id+"&ids="+ids+"&patient_id="+this.patientid)
468
+         }
469
+         if(this.index == 6){
470
+            this.$router.push("/outpatientDoctorStation/treatPrint?record="+this.record_date+"&prescription_id="+this.prescription_id+"&ids="+ids+"&patient_id="+this.patientid)
471
+         }
472
+      }
380 473
     },
381 474
     created() {
382 475
       var nowDate = new Date()
@@ -399,6 +492,7 @@
399 492
       this.tableHeight = tableHeight
400 493
 
401 494
     },
495
+
402 496
     mounted(){
403 497
       const that = this
404 498
       window.onresize = () => {

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

@@ -15,7 +15,7 @@
15 15
     </div>
16 16
     <div class="app-container" style="min-height:0;">
17 17
         <el-container class="newContainer">
18
-            <div style="width:270px;margin-right:20px;">
18
+            <!-- <div style="width:270px;margin-right:20px;">
19 19
                 <div class="cell clearfix" style="margin-bottom:10px;">
20 20
                     <el-input size="small"  v-model.trim="search_input" class="filter-item"/>
21 21
                     <el-button size="small" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
@@ -29,9 +29,9 @@
29 29
                         <template slot-scope="scope">{{ scope.row.his_patient ?scope.row.his_patient.number:''}}</template>
30 30
                     </el-table-column>
31 31
                 </el-table>
32
-            </div>
32
+            </div> -->
33 33
             
34
-            <div class='dialysisPage' style="flex: 1;height: calc(100vh - 178px);overflow-x:auto;::-webkit-scrollbar:height:15px">
34
+            <div class='dialysisPage' style="flex: 1;height: calc(100vh - 178px);overflow-x:auto;::-webkit-scrollbar:height:15px;margin:0 auto;width:960px;">
35 35
               <printOne v-bind:childResponse="childResponse" :advicePrint="advicePrint" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
36 36
             </div>
37 37
         </el-container>

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

@@ -2,12 +2,12 @@
2 2
     <div id='prescription-print' class="prescription-print">
3 3
         <div class="printTitle">血液透析中心处方笺</div>
4 4
         <div class="infoTitle">
5
-            <p>姓名:{{patient.name}}</p>
5
+            <p>姓名:{{patient.name?patient.name:""}}</p>
6 6
             <p>性别:
7 7
                <span v-if="patient.gender == 1">男</span>
8 8
                <span v-if="patient.gender == 2">女</span>
9 9
             </p>
10
-            <p>年龄:{{patient.age}}岁</p>
10
+            <p>年龄:{{patient.age?patient.age:""}}岁</p>
11 11
         </div>
12 12
         <div class="infoMain">
13 13
             <div style="margin-bottom: 10px;">门诊号:{{this.hisPatient.number?this.hisPatient.number:""}}</div>
@@ -87,9 +87,12 @@ export default {
87 87
      },
88 88
        getPrescriptionPrint(){
89 89
          var params = {
90
-          patient_id:this.patient_id,
91
-          record_date:this.record_date,
92
-          prescription_id:this.prescription_id,
90
+          // patient_id:this.patient_id,
91
+          // record_date:this.record_date,
92
+          // prescription_id:this.prescription_id,
93
+          patient_id:this.$route.query.patient_id,
94
+          record_date:this.$route.query.record,
95
+          prescription_id:this.$route.query.prescription_id 
93 96
         }
94 97
         console.log("params---",params)
95 98
        getPrescriptionPrint(params).then(response=>{
@@ -148,14 +151,16 @@ export default {
148 151
    created(){
149 152
       this.getAllDoctorList()
150 153
       this.getInitData()
154
+      this.getPrescriptionPrint()
155
+      this.getHisPatientDetail()
151 156
    },
152
-   watch:{
153
-     patient_id:function(val){
154
-       console.log("101000010101010",this.patient_id,this.record_date,this.prescription_id)
155
-       this.getPrescriptionPrint()
156
-       this.getHisPatientDetail()
157
-     }
158
-   }
157
+  //  watch:{
158
+  //    patient_id:function(val){
159
+  //      console.log("101000010101010",this.patient_id,this.record_date,this.prescription_id)
160
+  //      this.getPrescriptionPrint()
161
+  //      this.getHisPatientDetail()
162
+  //    }
163
+  //  }
159 164
 }
160 165
 </script>
161 166
 

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

@@ -15,7 +15,7 @@
15 15
     </div>
16 16
     <div class="app-container" style="min-height:0;">
17 17
         <el-container class="newContainer">
18
-            <div style="width:270px;margin-right:20px;">
18
+            <!-- <div style="width:270px;margin-right:20px;">
19 19
                 <div class="cell clearfix" style="margin-bottom:10px;">
20 20
                     <el-input size="small"  v-model.trim="search_input" class="filter-item"/>
21 21
                     <el-button size="small" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
@@ -29,9 +29,9 @@
29 29
                         <template slot-scope="scope">{{ scope.row.his_patient ?scope.row.his_patient.number:''}}</template>
30 30
                     </el-table-column>
31 31
                 </el-table>
32
-            </div>
32
+            </div> -->
33 33
             
34
-            <div class='dialysisPage' style="flex: 1;height: calc(100vh - 178px);overflow-x:auto;::-webkit-scrollbar:height:15px">
34
+            <div class='dialysisPage' style="flex: 1;height: calc(100vh - 178px);overflow-x:auto;::-webkit-scrollbar:height:15px;margin:0 auto;width:960px;">
35 35
               <printOne v-bind:childResponse="childResponse" :advicePrint="advicePrint" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
36 36
             </div>
37 37
         </el-container>

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

@@ -150,11 +150,14 @@ export default {
150 150
      },
151 151
      getPrescriptionPrint(){
152 152
          var params = {
153
-          patient_id:this.patient_id,
154
-          record_date:this.record_date,
155
-          prescription_id:this.prescription_id,
153
+        //   patient_id:this.patient_id,
154
+        //   record_date:this.record_date,
155
+        //   prescription_id:this.prescription_id,
156
+          patient_id:this.$route.query.patient_id,
157
+          record_date:this.$route.query.record,
158
+          prescription_id:this.$route.query.prescription_id 
156 159
         }
157
-        console.log("params---",params)
160
+        console.log("999999",params)
158 161
        getPrescriptionPrint(params).then(response=>{
159 162
          if(response.data.state == 1){
160 163
             var advicePrint =  response.data.data.advicePrint
@@ -163,29 +166,31 @@ export default {
163 166
             var patient =  response.data.data.patient
164 167
             console.log("patient",patient)
165 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
174
+
166 175
             var doctorPorject = response.data.data.doctorPorject
167 176
           
168 177
             var arr = doctorPorject.project
169
-              console.log("我的中谷歌",arr)
178
+              console.log("治疗单",arr)
170 179
             for(let i=0;i<arr.length;i++){
171 180
               console.log("arr",arr[i].project_name)
172 181
             }
173
-            this.tableData = arr
174
-            console.log("3333",this.tableData)
175
-            var prescriptioninfo = response.data.data.prescriptionInfo
176
-            console.log("prescriptioninfo",prescriptioninfo)
177
-            this.prescriptionInfo = prescriptioninfo
178 182
           }
179 183
        })
180 184
      }
181 185
    },
182 186
    created(){
183 187
       this.getAllDoctorList()
188
+      this.getPrescriptionPrint()
184 189
    },
185 190
    watch:{
186 191
      patient_id:function(val){
187 192
        console.log("101000010101010",this.patient_id,this.record_date,this.prescription_id)
188
-       this.getPrescriptionPrint()
193
+    //    this.getPrescriptionPrint()
189 194
      }
190 195
    }
191 196
 }