XMLWAN 4 vuotta sitten
vanhempi
commit
bf5104b756

+ 1 - 0
src/xt_pages/outpatientDoctorStation/components/additionalCharges.vue Näytä tiedosto

59
       },
59
       },
60
       show() {
60
       show() {
61
         this.chargeTable = []
61
         this.chargeTable = []
62
+       
62
         this.visible = true
63
         this.visible = true
63
         if (this.addtions_charge == null || this.addtions_charge.length == 0) {
64
         if (this.addtions_charge == null || this.addtions_charge.length == 0) {
64
           for (let i = 0; i < this.additions.length; i++) {
65
           for (let i = 0; i < this.additions.length; i++) {

+ 4 - 2
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Näytä tiedosto

376
 
376
 
377
         }
377
         }
378
 
378
 
379
-      }, getTotalOne() {
379
+      }, 
380
+      getTotalOne() {
380
         var total = 0
381
         var total = 0
381
         console.log(this.prescriptions)
382
         console.log(this.prescriptions)
382
         for (let i = 0; i < this.prescriptions.length; i++) {
383
         for (let i = 0; i < this.prescriptions.length; i++) {
398
         }
399
         }
399
         return total
400
         return total
400
 
401
 
401
-      }, getCurTotal() {
402
+      }, 
403
+      getCurTotal() {
402
         var total = 0
404
         var total = 0
403
         console.log(this.editableTabsValue)
405
         console.log(this.editableTabsValue)
404
 
406
 

+ 1 - 1
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Näytä tiedosto

371
       },
371
       },
372
       open(index) {
372
       open(index) {
373
         console.log("index0999999",this.prescriptions)
373
         console.log("index0999999",this.prescriptions)
374
-         if(this.prescriptions[0].advices.length == 0){
374
+         if(this.prescriptions[0].advices.length == 0 && this.prescriptions[0].project.length == 0){
375
            this.$message.error("请先开处方")
375
            this.$message.error("请先开处方")
376
            return
376
            return
377
           }
377
           }

+ 38 - 21
src/xt_pages/outpatientDoctorStation/template/printOne.vue Näytä tiedosto

24
                 <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>
24
                 <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>
25
                 <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>
25
                 <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>
26
             </div>
26
             </div>
27
+            <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
28
+                <div class="drugsOne">{{it.item_name?it.item_name:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
29
+            </div>
27
         </div>
30
         </div>
28
         <div class="doctorBox">
31
         <div class="doctorBox">
29
-            <p>医师:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</p>
32
+            <p>医师:{{item.doctor?item.doctor:""}}</p>
30
             <p>日期:{{getTime(item.ctime)?getTime(item.ctime):""}}</p>
33
             <p>日期:{{getTime(item.ctime)?getTime(item.ctime):""}}</p>
31
         </div>
34
         </div>
32
         <div class="actionBar">
35
         <div class="actionBar">
33
             <p>审核:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
36
             <p>审核:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
34
-            <p>配对:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</p>
37
+            <p>配对:{{getDoctor(item.advices[0].advice_doctor)?getDoctor(item.advices[0].advice_doctor):""}}</p>
35
             <p>核对:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
38
             <p>核对:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
36
             <p>发药:{{getDoctor(item.advices[0].execution_staff)?getDoctor(item.advices[0].execution_staff):""}}</p>
39
             <p>发药:{{getDoctor(item.advices[0].execution_staff)?getDoctor(item.advices[0].execution_staff):""}}</p>
37
-            <p>药费:</p>
40
+            <p>药费:{{getTotalOne(item.id)?getTotalOne(item.id):0}}元</p>
38
         </div>
41
         </div>
39
     </div>
42
     </div>
40
 
43
 
62
         tableData:[],
65
         tableData:[],
63
         prescriptionInfo:[],
66
         prescriptionInfo:[],
64
         hisPatient:{},
67
         hisPatient:{},
65
-        department:[]
68
+        department:[],
69
+        prescriptions:[]
66
       }
70
       }
67
     },
71
     },
68
    methods:{
72
    methods:{
71
       getAllDoctorList().then(response=>{
75
       getAllDoctorList().then(response=>{
72
         if(response.data.state == 1){
76
         if(response.data.state == 1){
73
                var doctor =  response.data.data.doctor
77
                var doctor =  response.data.data.doctor
74
-               
78
+               console.log("医生列表数据",doctor)
75
                this.doctorList = doctor
79
                this.doctorList = doctor
76
              }
80
              }
77
          })   
81
          })   
108
             var advicePrint =  response.data.data.advicePrint
112
             var advicePrint =  response.data.data.advicePrint
109
             console.log("adviceprint9999",advicePrint)
113
             console.log("adviceprint9999",advicePrint)
110
             this.advicePrint = advicePrint
114
             this.advicePrint = advicePrint
111
-            // var patient =  response.data.data.patient
112
-            // console.log("patient",patient)
113
-            // this.patient = patient
114
-            // var doctorPorject = response.data.data.doctorPorject
115
-          
116
-            // var arr = doctorPorject.project
117
-            //   console.log("我的中谷歌",arr)
118
-            // for(let i=0;i<arr.length;i++){
119
-            //   console.log("arr",arr[i].project_name)
120
-            // }
121
-            // this.tableData = arr
122
-            // console.log("3333",this.tableData)
123
-            // var prescriptioninfo = response.data.data.prescriptionInfo
124
-            // console.log("prescriptioninfo",prescriptioninfo)
125
-            // this.prescriptionInfo = prescriptioninfo
115
+            this.prescriptions = advicePrint
116
+           
126
           }
117
           }
127
        })
118
        })
128
      },
119
      },
154
            }
145
            }
155
        }
146
        }
156
        return name
147
        return name
157
-     }
148
+     },
149
+
150
+     getTotalOne(id) {
151
+        
152
+        var total = 0
153
+        var addtotal = 0
154
+        for (let i = 0; i < this.prescriptions.length; i++) {
155
+          if(id == this.prescriptions[i].id){
156
+            if (this.prescriptions[i].advices != null) {
157
+              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
158
+                total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
159
+              }
160
+            }
161
+          
162
+            if (this.prescriptions[i].additionalcharge != null) {
163
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
164
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
165
+              }
166
+            }
167
+              addtotal =  Math.floor(addtotal * 100) / 100
168
+        }
169
+        return total + addtotal
170
+       }
171
+      }, 
172
+
173
+
174
+      
158
    },
175
    },
159
    created(){
176
    created(){
160
       this.getAllDoctorList()
177
       this.getAllDoctorList()

+ 31 - 5
src/xt_pages/outpatientDoctorStation/treatTemplate/printOne.vue Näytä tiedosto

57
             </table>
57
             </table>
58
         </div>
58
         </div>
59
         <div class="infoTitle">
59
         <div class="infoTitle">
60
-            <p>开单医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</p>
60
+            <p>开单医生:{{item.doctor?item.doctor:""}}</p>
61
             <p>签章:</p>
61
             <p>签章:</p>
62
         </div>
62
         </div>
63
         <div class="actionBar">
63
         <div class="actionBar">
64
-            <p>执行医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</p>
65
-            <p>费用:</p>
64
+            <p>执行医生:{{item.doctor?item.doctor:""}}</p>
65
+            <p>费用:{{getTotalOne(item.id)?getTotalOne(item.id):''}}元</p>
66
         </div>
66
         </div>
67
         <table style="width:100%;text-align:center;line-height:25px;border-collapse: collapse;" border="1">
67
         <table style="width:100%;text-align:center;line-height:25px;border-collapse: collapse;" border="1">
68
             <tr>
68
             <tr>
109
         patient:{},
109
         patient:{},
110
         tableData:[],
110
         tableData:[],
111
         prescriptionInfo:[],
111
         prescriptionInfo:[],
112
-        projectList:[]
112
+        projectList:[],
113
+        prescriptions:[]
113
       }
114
       }
114
     },
115
     },
115
    methods:{
116
    methods:{
167
             var advicePrint =  response.data.data.advicePrint
168
             var advicePrint =  response.data.data.advicePrint
168
             console.log("adviceprint",advicePrint)
169
             console.log("adviceprint",advicePrint)
169
             this.advicePrint = advicePrint
170
             this.advicePrint = advicePrint
171
+            this.prescriptions = advicePrint
170
             var projectlist =  response.data.data.projectlist
172
             var projectlist =  response.data.data.projectlist
171
             console.log("所有项目列表",projectlist)
173
             console.log("所有项目列表",projectlist)
172
             this.projectList = projectlist
174
             this.projectList = projectlist
175
+            
173
           }
176
           }
174
        })
177
        })
175
      },
178
      },
190
            }
193
            }
191
         }
194
         }
192
         return unit
195
         return unit
193
-     }
196
+     },
197
+
198
+       getTotalOne(id) {
199
+        
200
+        var total = 0
201
+        var addtotal = 0
202
+        for (let i = 0; i < this.prescriptions.length; i++) {
203
+          if(id == this.prescriptions[i].id){
204
+            if (this.prescriptions[i].project != null) {
205
+              for (let a = 0; a < this.prescriptions[i].project.length; a++) {
206
+                total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
207
+              }
208
+            }
209
+          
210
+            if (this.prescriptions[i].additionalcharge != null) {
211
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
212
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
213
+              }
214
+            }
215
+              addtotal =  Math.floor(addtotal * 100) / 100
216
+        }
217
+        return total + addtotal
218
+       }
219
+      }, 
194
    },
220
    },
195
    created(){
221
    created(){
196
       this.getAllDoctorList()
222
       this.getAllDoctorList()