Przeglądaj źródła

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

XMLWAN 3 lat temu
rodzic
commit
106c403e9c

+ 1 - 1
src/xt_pages/outpatientDoctorStation/batch_print_checkTemplate/index.vue Wyświetl plik

@@ -13,7 +13,7 @@
13 13
       </template> -->
14 14
 
15 15
       <div class='dialysisPage' style="padding-top:40px;">
16
-        <printOne :printData="printData" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
16
+        <prisntOne :printData="printData"></prisntOne>
17 17
       </div>
18 18
   </div>
19 19
 </template>

+ 26 - 131
src/xt_pages/outpatientDoctorStation/batch_print_checkTemplate/printOne.vue Wyświetl plik

@@ -41,13 +41,13 @@
41 41
                     </div>
42 42
                 </div>
43 43
                 <div style="display:flex;justify-content: space-between;border-top:1px solid #000;line-height:40px;padding:0 10px;">
44
-                    <div>开单医生:{{ doctor ? doctor : '' }}</div>
44
+                    <div>开单医生:{{ i.info.doctor ? i.info.doctor : '' }}</div>
45 45
                     <div>开单日期:
46
-                        {{getTime(pre_time) ? getTime(pre_time).split(' ')[0] : ''}}
46
+                        {{getTime(i.info.ctime) ? getTime(i.info.ctime).split(' ')[0] : ''}}
47 47
                     </div>
48
-                    <div>医生签字:{{ doctor ? doctor : '' }}</div>
48
+                    <div>医生签字:{{ i.info.doctor ? i.info.doctor : '' }}</div>
49 49
                 </div>
50
-            </div>   
50
+            </div>
51 51
             <img style="width:100%;" v-if="org_id == 10138 || org_id == 10278" src="https://kuyi.shengws.com/bailin/blend.jpg" alt="">
52 52
         </div>
53 53
       </div>
@@ -56,16 +56,12 @@
56 56
 </template>
57 57
 <script>
58 58
 import { jsGetAge, uParseTime } from '@/utils/tools'
59
-import {getAllDoctorList,getPrescriptionPrint,getHisPatientDetail,getPatientCaseHistory} from "@/api/project/project"
59
+import {getAllDoctorList} from "@/api/project/project"
60 60
 import {getInitData} from "@/api/his/his"
61 61
 export default {
62 62
     props:{
63
-      patient_id:Number,
64
-      record_date:String,
65
-      prescription_id:Number,
66
-      ids:String,
67 63
       printData:Array
68
-    }, 
64
+    },
69 65
     data(){
70 66
       return {
71 67
         doctorList:[],
@@ -90,29 +86,16 @@ export default {
90 86
       }
91 87
     },
92 88
    methods:{
93
-    getPatientCaseHistory(){
94
-        const params = {
95
-          patient_id:this.patient_id
96
-        }
97
-        getPatientCaseHistory(params).then(response=>{
98
-            if(response.data.state == 1){
99
-                var history = response.data.data.history
100
-                console.log("中国history222222",history)
101
-                this.history = history
102
-            }
103
-        })
104
-    },
105 89
      getAllDoctorList(){
106 90
       getAllDoctorList().then(response=>{
107 91
         if(response.data.state == 1){
108 92
                var doctor =  response.data.data.doctor
109
-               
93
+
110 94
                this.doctorList = doctor
111 95
              }
112
-         })   
96
+         })
113 97
      },
114
-
115
-      getDoctor(id){
98
+     getDoctor(id){
116 99
         var name = ""
117 100
         for(let i=0;i<this.doctorList.length;i++){
118 101
           if(id == this.doctorList[i].admin_user_id){
@@ -121,82 +104,11 @@ export default {
121 104
         }
122 105
         return name
123 106
       },
124
-      getTime(value, temp) {
107
+     getTime(value, temp) {
125 108
         if (value != undefined) {
126 109
             return uParseTime(value, temp)
127 110
         }
128 111
         return ''
129
-     },
130
-       getPrescriptionPrint(){
131
-         var params = {
132
-          // patient_id:this.patient_id,
133
-          // record_date:this.record_date,
134
-          // prescription_id:this.prescription_id,
135
-          patient_id:this.patient_id,
136
-          record_date:this.record_date,
137
-          prescription_id:this.prescription_id,
138
-          ids:this.ids
139
-        }
140
-        console.log("params",params)
141
-       getPrescriptionPrint(params).then(response=>{
142
-         if(response.data.state == 1){
143
-            var advicePrint =  response.data.data.advicePrint
144
-            console.log("adviceprint9999",advicePrint)
145
-            this.advicePrint = advicePrint
146
-            this.prescriptions = advicePrint
147
-            console.log("处方222222",this.prescriptions)
148
-            var hisPatient = response.data.data.hisPatient
149
-            console.log("hisPatient",hisPatient)
150
-            this.hisPatient = hisPatient
151
-            let projectPrint = []
152
-            let total = 0
153
-            this.advicePrint.map(item => {
154
-              console.log("imte233232323232323223",item.project)
155
-              if(item.project.length > 0){
156
-                  item.project.map(it => {
157
-                        if(it.type == 2){
158
-                            if(it.project.cost_classify == 3){
159
-                                projectPrint.push(it)
160
-                                total += (it.project.price*parseInt(it.count))
161
-                            }
162
-                        }
163
-                  })
164
-                
165
-              }
166
-            })
167
-            let data = []
168
-            let data2 = []
169
-            projectPrint.map(item => {
170
-              if(item.team.id != 0){
171
-                let status = data.some(it => (it.team.id == item.team.id))
172
-                if(!status){
173
-                  data.push(item)
174
-                }
175
-              }
176
-              if(item.team.id == 0){
177
-                data2.push(item)
178
-              }
179
-              
180
-            })
181
-          
182
-            this.total = total.toFixed(2)
183
-            this.pre_time = this.advicePrint[0].pre_time
184
-            this.doctor = this.advicePrint[0].doctor
185
-            this.projectPrint = data
186
-            this.singleProjectPrint = data2
187
-            console.log('99999999999999999',projectPrint)
188
-            var projectlist =  response.data.data.projectlist
189
-
190
-            var projectlist =  response.data.data.projectlist
191
-            console.log("所有项目列表",projectlist)
192
-            this.projectList = projectlist
193
-            this.getPage()
194
-            let outputlist1Name = response.data.data.his.patient_info ? JSON.parse(response.data.data.his.patient_info) : {};
195
-            this.faber = outputlist1Name
196
-
197
-            
198
-          }
199
-       })
200 112
      },
201 113
      getTeam(prescriptions){
202 114
         let projectPrint = []
@@ -211,7 +123,7 @@ export default {
211 123
                         }
212 124
                     }
213 125
               })
214
-            
126
+
215 127
           }
216 128
         })
217 129
         let data = []
@@ -222,9 +134,9 @@ export default {
222 134
               data.push(item)
223 135
             }
224 136
           }
225
-          
137
+
226 138
         })
227
-      
139
+
228 140
         this.total = total.toFixed(2)
229 141
         this.pre_time = prescriptions[0].pre_time
230 142
         this.doctor = prescriptions[0].doctor
@@ -244,7 +156,7 @@ export default {
244 156
                         }
245 157
                     }
246 158
               })
247
-            
159
+
248 160
           }
249 161
         })
250 162
         let data = []
@@ -252,30 +164,18 @@ export default {
252 164
           if(item.team.id == 0){
253 165
                 data.push(item)
254 166
               }
255
-          
167
+
256 168
         })
257
-      
169
+
258 170
         this.total = total.toFixed(2)
259 171
         return data
260 172
      },
261
-     getHisPatientDetail(){
262
-          const params = {
263
-              patient_id:this.patient_id
264
-          }
265
-       getHisPatientDetail(params).then(response=>{
266
-          if(response.data.state == 1){
267
-             var hisPatient =  response.data.data.hisPatient
268
-             console.log("挂号病人",hisPatient)
269
-             this.hisPatient = hisPatient
270
-          }
271
-       })
272
-     },
173
+
273 174
      getInitData(){
274 175
        getInitData().then(response=>{
275 176
           if(response.data.state == 1){
276 177
             this.department = response.data.data.department
277 178
             this.diagnoses = response.data.data.diagnose.sort(this.compare('id'))
278
-            console.log("争端",this.diagnoses)
279 179
           }
280 180
        })
281 181
      },
@@ -307,7 +207,7 @@ export default {
307 207
             }
308 208
               addtotal =  Math.floor(addtotal * 100) / 100
309 209
         }
310
-       
210
+
311 211
        }
312 212
 
313 213
       for (let i = 0; i < this.prescriptions.length; i++) {
@@ -317,7 +217,7 @@ export default {
317 217
                 total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
318 218
               }
319 219
             }
320
-          
220
+
321 221
             if (this.prescriptions[i].additionalcharge != null) {
322 222
               for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
323 223
                 addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
@@ -329,7 +229,7 @@ export default {
329 229
 
330 230
         return total + addtotal
331 231
       },
332
-      
232
+
333 233
      getProjectName(id){
334 234
         var project_name = ""
335 235
         for(let i=0;i<this.projectList.length;i++){
@@ -344,14 +244,9 @@ export default {
344 244
         let newIds = ids.split(',').sort(function(a,b){
345 245
           return a-b;
346 246
         })
347
-        
348
-        var name = ""
247
+
349 248
         let nameArr = []
350 249
         for(let i=0;i<this.diagnoses.length;i++){
351
-          // if(id == this.diagnoses[i].id){
352
-          //    name = this.diagnoses[i].class_name
353
-          // }
354
-          
355 250
           if(newIds.indexOf(this.diagnoses[i].id.toString()) > -1){
356 251
             // name += diagnoses[i].class_name + ' '
357 252
             nameArr.push(this.diagnoses[i].class_name)
@@ -361,7 +256,7 @@ export default {
361 256
         nameArr.map((item,index) => {
362 257
           if(item == '尿毒症'){
363 258
             newNameArr.push(item)
364
-            nameArr.splice(index,1,'') 
259
+            nameArr.splice(index,1,'')
365 260
           }
366 261
         })
367 262
         newNameArr.push(...nameArr)
@@ -385,7 +280,7 @@ export default {
385 280
             this.page = 1
386 281
             arr.push(item.advices.length)
387 282
             item.pageArr.push(arr)
388
-            
283
+
389 284
           }else if(item.advices.length > 5){
390 285
             this.page = parseInt(item.advices.length / 5)
391 286
             let num = item.advices.length % 5
@@ -483,7 +378,7 @@ export default {
483 378
       var xtuser = this.$store.getters.xt_user;
484 379
       this.orgname = xtuser.org.org_name;
485 380
       this.org_id = this.$store.getters.xt_user.org_id
486
-     
381
+
487 382
    },
488 383
    watch:{
489 384
      ids:function(val){
@@ -498,7 +393,7 @@ export default {
498 393
 <style lang="scss" scoped>
499 394
 .prescription-print{
500 395
   -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
501
-    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset; 
396
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
502 397
     box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
503 398
     margin-bottom: 20px;
504 399
     padding:20px 10px;
@@ -556,7 +451,7 @@ export default {
556 451
 }
557 452
 .actionBar{
558 453
     display: flex;
559
-    justify-content: space-between; 
454
+    justify-content: space-between;
560 455
     line-height: 24px;
561 456
     padding:0 10px;
562 457
 }

+ 1 - 1
src/xt_pages/outpatientDoctorStation/print.vue Wyświetl plik

@@ -53,7 +53,7 @@
53 53
 
54 54
         <!-- <printSix v-if="org_id != 10088 && org_id != 10215" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printSix> -->
55 55
       </div>
56
-      <div v-else-if="org_id == 10243 || org_id == 9675">
56
+      <div v-else-if="org_id == 10243 || org_id == 9675 || org_id == 0 ">
57 57
         <printSix
58 58
           v-bind:childResponse="childResponse"
59 59
           :advicePrint="advicePrint"

+ 11 - 14
src/xt_pages/outpatientDoctorStation/template/printSix.vue Wyświetl plik

@@ -13,14 +13,15 @@
13 13
           {{ orgname }}第二类精神处方笺
14 14
         </div>
15 15
         <div
16
+            v-if="prescriptions[0].med_type != '1112' && prescriptions[0].med_type != '1111'"
16 17
           class="printTitle"
17 18
         >
18
-        <div style="line-height: 60px;font-size: 30px;">{{ orgname }}处方笺</div>
19
-          
20
-          <img class="logo" src="../assets/shuiyin.jpg" alt="加载失败..">
19
+          {{ orgname }}处方笺  普通
20
+<!--        <div v-else style="line-height: 60px;font-size: 30px;">{{ orgname }}处方笺</div>-->
21
+<!--          <img class="logo" src="../assets/shuiyin.jpg" alt="加载失败..">-->
21 22
         </div>
22 23
 
23
-        
24
+
24 25
 
25 26
         <div class="infoTitle" style="border-bottom:1px solid #000;">
26 27
           <p>科室:{{ item.info ? getDepart(item.info.departments) : "" }}</p>
@@ -129,10 +130,10 @@
129 130
           <div class="actionBar_list">
130 131
             医师:
131 132
            <span>{{ item.doctor ? item.doctor : "" }}
132
-             </span> 
133
+             </span>
133 134
 
134 135
             <!-- <p class="actionBar_val" style="border-bottom:3px solid red">
135
-              
136
+
136 137
             </p> -->
137 138
           </div>
138 139
           <div class="actionBar_list">
@@ -142,7 +143,7 @@
142 143
                 : ""
143 144
             }}
144 145
             <!-- <div class="actionBar_val">
145
-              
146
+
146 147
             </div> -->
147 148
           </div>
148 149
 
@@ -154,7 +155,7 @@
154 155
                 : 0
155 156
             }}
156 157
             <!-- <div class="actionBar_val">
157
-           
158
+
158 159
             </div> -->
159 160
           </div>
160 161
         </div>
@@ -172,7 +173,7 @@
172 173
               }}
173 174
             </div>
174 175
             <!-- <div class="actionBar_val">
175
-              
176
+
176 177
             </div> -->
177 178
           </div>
178 179
           <div class="actionBar_list">
@@ -184,7 +185,7 @@
184 185
               }}
185 186
             </div>
186 187
             <!-- <div class="actionBar_val">
187
-              
188
+
188 189
             </div> -->
189 190
           </div>
190 191
         </div>
@@ -284,15 +285,11 @@ export default {
284 285
       getPrescriptionPrint(params).then((response) => {
285 286
         if (response.data.state == 1) {
286 287
           var advicePrint = response.data.data.advicePrint;
287
-          console.log("adviceprint9999", advicePrint);
288 288
           this.advicePrint = advicePrint;
289 289
           this.prescriptions = advicePrint;
290
-          console.log("处方222222", this.prescriptions);
291 290
           var hisPatient = response.data.data.hisPatient;
292
-          console.log("hisPatient", hisPatient);
293 291
           this.hisPatient = hisPatient;
294 292
           var projectlist = response.data.data.projectlist;
295
-          console.log("所有项目列表", projectlist);
296 293
           this.projectList = projectlist;
297 294
         }
298 295
       });