Browse Source

批量打印

XMLWAN 4 years ago
parent
commit
a2353dc4d3

+ 1 - 1
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

@@ -31,7 +31,7 @@
31 31
               </el-option>
32 32
             </el-select>
33 33
           </el-form-item>
34
-          <el-form-item label="病类型:" prop="name" label-position="right">
34
+          <el-form-item label="病类型:" prop="name" label-position="right">
35 35
 
36 36
             <el-select style="width:100%;" v-model="state1" placeholder="">
37 37
               <el-option

+ 24 - 4
src/xt_pages/outpatientDoctorStation/components/deskRecord.vue View File

@@ -74,6 +74,8 @@
74 74
     </el-form>
75 75
     <div class="mainTitle">病历信息:</div>
76 76
     <el-form class="recordForm" :model="case_history" ref="form" label-width="80px">
77
+     
78
+
77 79
       <el-form-item label="发病日期: " prop="name">
78 80
         <el-date-picker
79 81
           style="width:100%;"
@@ -341,7 +343,10 @@
341 343
         valueFour:'',
342 344
         valueFive:'',
343 345
         valueSix:'',
344
-        valueSeven:''
346
+        valueSeven:'',
347
+        diagnoses:[],
348
+        state1:"",
349
+        diagnose:""
345 350
       }
346 351
     },
347 352
     methods: {
@@ -390,7 +395,9 @@
390 395
             "diagnostic":this.case_history.diagnostic,
391 396
             "breathing":this.case_history.breathing,
392 397
             "doctor_advice":this.case_history.doctor_advice,
393
-            "remark":this.case_history.remark
398
+            "remark":this.case_history.remark,
399
+            "sick":this.case_history.sick,
400
+            "diagnose":this.case_history.diagnose
394 401
           }
395 402
 
396 403
           createCaseHistory(params).then(response => {
@@ -425,6 +432,8 @@
425 432
                 this.case_history.diagnostic = templatedetail.diagnostic
426 433
                 this.case_history.doctor_advice = templatedetail.doctor_advice
427 434
                 this.case_history.remark = templatedetail.remark
435
+                this.sick = templatedetail.sick
436
+                this.diagnose = templatedetail.diagnose
428 437
               }
429 438
           })
430 439
         },
@@ -538,7 +547,18 @@
538 547
           }
539 548
         }
540 549
       },
541
-     
550
+      getInitData() {
551
+        getInitData().then(response => {
552
+          if (response.data.state == 0) {
553
+            this.$message.error(response.data.msg)
554
+            return false
555
+          } else {
556
+            this.sick = response.data.data.sick
557
+            this.diagnoses = response.data.data.diagnose
558
+          }
559
+        })
560
+
561
+      },
542 562
     },
543 563
     created(){
544 564
        this.getlist()
@@ -549,7 +569,7 @@
549 569
        }else if(this.patientInfo.gender = 2){
550 570
           this.patientInfo.gender = '女'
551 571
         }
552
-     
572
+     this.getInitData()
553 573
     },
554 574
     watch:{
555 575
       detalid:function(val){

+ 23 - 4
src/xt_pages/outpatientDoctorStation/template/printOne.vue View File

@@ -158,11 +158,29 @@ export default {
158 158
        }
159 159
        return name
160 160
      },
161
-     getTotalOne(id) {
162
-        console.log("处方数据",this.prescriptions)
161
+    getTotalOne(id) {
162
+
163 163
         var total = 0
164 164
         var addtotal = 0
165 165
         for (let i = 0; i < this.prescriptions.length; i++) {
166
+          if(id == this.prescriptions[i].id){
167
+            if (this.prescriptions[i].project != null) {
168
+              for (let a = 0; a < this.prescriptions[i].project.length; a++) {
169
+                total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
170
+              }
171
+            }
172
+
173
+            if (this.prescriptions[i].additionalcharge != null) {
174
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
175
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
176
+              }
177
+            }
178
+              addtotal =  Math.floor(addtotal * 100) / 100
179
+        }
180
+       
181
+       }
182
+
183
+      for (let i = 0; i < this.prescriptions.length; i++) {
166 184
           if(id == this.prescriptions[i].id){
167 185
             if (this.prescriptions[i].advices != null) {
168 186
               for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
@@ -178,8 +196,9 @@ export default {
178 196
               addtotal =  Math.floor(addtotal * 100) / 100
179 197
         }
180 198
        }
181
-       return total + addtotal
182
-      }, 
199
+
200
+        return total + addtotal
201
+      },
183 202
 
184 203
 
185 204
    },