Browse Source

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

csx 4 years ago
parent
commit
8a05cf6a52

+ 6 - 3
src/xt_pages/outpatientDoctorStation/template/printOne.vue View File

12
               <p>年龄:{{item.patient.age?item.patient.age:""}}岁</p>
12
               <p>年龄:{{item.patient.age?item.patient.age:""}}岁</p>
13
           </div>
13
           </div>
14
           <div class="infoMain">
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>
15
+              <div style="margin-bottom: 10px;">门诊号:{{hisPatient.number?hisPatient.number:""}}</div>
16
+              <div style="margin-bottom: 10px;">科室:{{getDepart(hisPatient.departments)?getDepart(hisPatient.departments):''}}</div>
17
               <div style="margin-bottom: 10px;">医保卡号:{{item.hisPatient.number?item.hisPatient.number:""}}</div>
17
               <div style="margin-bottom: 10px;">医保卡号:{{item.hisPatient.number?item.hisPatient.number:""}}</div>
18
               <div style="margin-bottom: 10px;">电话:{{item.patient.phone}}</div>
18
               <div style="margin-bottom: 10px;">电话:{{item.patient.phone}}</div>
19
               <div>地址:{{item.patient.home_address}}</div>
19
               <div>地址:{{item.patient.home_address}}</div>
70
         hisPatient:{},
70
         hisPatient:{},
71
         department:[],
71
         department:[],
72
         prescriptions:[]
72
         prescriptions:[]
73
-
73
+        
74
       }
74
       }
75
     },
75
     },
76
    methods:{
76
    methods:{
117
             console.log("adviceprint9999",advicePrint)
117
             console.log("adviceprint9999",advicePrint)
118
             this.advicePrint = advicePrint
118
             this.advicePrint = advicePrint
119
             this.prescriptions = advicePrint
119
             this.prescriptions = advicePrint
120
+            var hisPatient = response.data.data.hisPatient
121
+            console.log("hisPatient",hisPatient)
122
+            this.hisPatient = hisPatient
120
           }
123
           }
121
        })
124
        })
122
      },
125
      },

+ 47 - 6
src/xt_pages/outpatientDoctorStation/treatTemplate/printOne.vue View File

30
             <div style="margin-bottom: 10px;width:25%">年龄:
30
             <div style="margin-bottom: 10px;width:25%">年龄:
31
                 <span>{{item.patient.age}}</span>
31
                 <span>{{item.patient.age}}</span>
32
             </div>
32
             </div>
33
-            <div style="margin-bottom: 10px;width:25%">参保类型:</div>
33
+            <div style="margin-bottom: 10px;width:25%">参保类型:{{hisPatient.social_type?hisPatient.social_type:''}}</div>
34
             <div style="margin-bottom: 10px;width:50%;">联系电话:{{item.patient.phone}}</div>
34
             <div style="margin-bottom: 10px;width:50%;">联系电话:{{item.patient.phone}}</div>
35
             <div style="width:50%;">地址:{{item.patient.unit_address}}</div>
35
             <div style="width:50%;">地址:{{item.patient.unit_address}}</div>
36
             <div style="width:100%;">诊断:{{item.patient.diagnose}}</div>
36
             <div style="width:100%;">诊断:{{item.patient.diagnose}}</div>
59
                     <td>{{it.day}}</td>
59
                     <td>{{it.day}}</td>
60
 
60
 
61
                 </tr>
61
                 </tr>
62
+
63
+                <tr v-for="(it,index) in item.advices" :key="index">
64
+                    <td>{{index+1}}</td>
65
+                    <td>{{it.advice_name?it.advice_name:''}}</td>
66
+                    <td>{{it.single_dose?it.single_dose:''}}</td>
67
+                    <td>{{it.single_dose_unit?it.single_dose_unit:''}}</td>
68
+                    <td>{{it.price}}</td>
69
+                    <td></td>
70
+                    <td>{{it.remark}}</td>
71
+                    <td>{{it.day}}</td>
72
+
73
+                </tr>
62
             </table>
74
             </table>
63
         </div>
75
         </div>
64
 
76
 
224
         tableData:[],
236
         tableData:[],
225
         prescriptionInfo:[],
237
         prescriptionInfo:[],
226
         projectList:[],
238
         projectList:[],
227
-        prescriptions:[]
239
+        prescriptions:[],
240
+        settlement: 
241
+         [
242
+          {value: 1,label: '医保'},
243
+          {value: 2,label: '自费'},
244
+          {value: 3,label:'公费'},
245
+          {value: 4,label:'农保'},
246
+          {value: 5,label:'会员'},
247
+          {value: 6,label:'职工'},
248
+          {value: 7,label:'合同'}
249
+         ],
250
+         hisPatient:{}
228
       }
251
       }
229
     },
252
     },
230
    methods:{
253
    methods:{
268
      },
291
      },
269
      getPrescriptionPrint(){
292
      getPrescriptionPrint(){
270
          var params = {
293
          var params = {
271
-        //   patient_id:this.patient_id,
272
-        //   record_date:this.record_date,
273
-        //   prescription_id:this.prescription_id,
274
           patient_id:this.patient_id,
294
           patient_id:this.patient_id,
275
           record_date:this.record_date,
295
           record_date:this.record_date,
276
           prescription_id:this.prescription_id,
296
           prescription_id:this.prescription_id,
286
             var projectlist =  response.data.data.projectlist
306
             var projectlist =  response.data.data.projectlist
287
             console.log("所有项目列表",projectlist)
307
             console.log("所有项目列表",projectlist)
288
             this.projectList = projectlist
308
             this.projectList = projectlist
309
+            console.log("hisPatient",hisPatient)
310
+            this.hisPatient = hisPatient
289
 
311
 
290
           }
312
           }
291
        })
313
        })
328
             }
350
             }
329
               addtotal =  Math.floor(addtotal * 100) / 100
351
               addtotal =  Math.floor(addtotal * 100) / 100
330
         }
352
         }
331
-        return total + addtotal
353
+       
332
        }
354
        }
355
+
356
+      for (let i = 0; i < this.prescriptions.length; i++) {
357
+          if(id == this.prescriptions[i].id){
358
+            if (this.prescriptions[i].advices != null) {
359
+              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
360
+                total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
361
+              }
362
+            }
363
+          
364
+            if (this.prescriptions[i].additionalcharge != null) {
365
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
366
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
367
+              }
368
+            }
369
+              addtotal =  Math.floor(addtotal * 100) / 100
370
+        }
371
+       }
372
+
373
+        return total + addtotal
333
       },
374
       },
334
    },
375
    },
335
    created(){
376
    created(){