XMLWAN 4 年 前
コミット
0987584e4a
共有2 個のファイルを変更した84 個の追加74 個の削除を含む
  1. 47 37
      src/xt_pages/outpatientDoctorStation/template/printOne.vue
  2. 37 37
      src/xt_pages/outpatientDoctorStation/treatTemplate/printOne.vue

+ 47 - 37
src/xt_pages/outpatientDoctorStation/template/printOne.vue ファイルの表示

@@ -1,41 +1,48 @@
1 1
 <template>
2
-    <div id='prescription-print' class="prescription-print">
2
+  <div>
3
+    <div id='prescription-print' class="prescription-print"  v-for="(item,index) in advicePrint" :key="index">
3 4
         <div class="printTitle">血液透析中心处方笺</div>
4 5
         <div class="infoTitle">
5
-            <p>姓名:{{patient.name?patient.name:""}}</p>
6
+            <p>姓名:{{item.patient.name?item.patient.name:""}}</p>
6 7
             <p>性别:
7
-               <span v-if="patient.gender == 1">男</span>
8
-               <span v-if="patient.gender == 2">女</span>
8
+               <span v-if="item.patient.gender == 1">男</span>
9
+               <span v-if="item.patient.gender == 2">女</span>
9 10
             </p>
10
-            <p>年龄:{{patient.age?patient.age:""}}岁</p>
11
+            <p>年龄:{{item.patient.age?item.patient.age:""}}岁</p>
11 12
         </div>
12 13
         <div class="infoMain">
13
-            <div style="margin-bottom: 10px;">门诊号:{{this.hisPatient.number?this.hisPatient.number:""}}</div>
14
-            <div style="margin-bottom: 10px;">科室:{{getDepart(this.hisPatient.departments?this.hisPatient.departments:"")}}</div>
15
-            <div style="margin-bottom: 10px;">医保卡号:{{this.hisPatient.number?this.hisPatient.number:""}}</div>
16
-            <div style="margin-bottom: 10px;">电话:{{patient.phone}}</div>
17
-            <div>地址:{{patient.home_address}}</div>
18
-            <div style="display:flex;width:50%;">临床诊断:{{patient.diagnose}}</div>
14
+            <div style="margin-bottom: 10px;">门诊号:{{item.hisPatient.number?item.hisPatient.number:""}}</div>
15
+            <div style="margin-bottom: 10px;">科室:{{getDepart(item.hisPatient.departments?item.hisPatient.departments:"")}}</div>
16
+            <div style="margin-bottom: 10px;">医保卡号:{{item.hisPatient.number?item.hisPatient.number:""}}</div>
17
+            <div style="margin-bottom: 10px;">电话:{{item.patient.phone}}</div>
18
+            <div>地址:{{item.patient.home_address}}</div>
19
+            <div style="display:flex;width:50%;">临床诊断:{{item.patient.diagnose}}</div>
19 20
         </div>
20 21
         <div class="prescriptionBox">
21 22
             <div class="Rp">Rp:</div>
22
-            <div class="drugsBox" v-for="(item,index) in advicePrint" :key="index">
23
-                <div class="drugsOne">{{item.advice_name?item.advice_name:""}}&nbsp;&nbsp;{{item.single_dose}}{{item.single_dose_unit}}&nbsp;×&nbsp; {{item.prescribing_number}}{{item.prescribing_number_unit}}</div>
24
-                <div style="margin-left:100px;"><span>用法:{{item.single_dose}}{{item.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{item.execution_frequency}}</span>&nbsp;&nbsp;<span>{{item.advice_desc}}</span></div>
23
+            <div class="drugsBox" v-for="(it,index) in item.advices" :key="index">
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 26
             </div>
26 27
         </div>
27 28
         <div class="doctorBox">
28
-            <p>医师:{{getDoctor(advicePrint[0].advice_doctor)?getDoctor(advicePrint[0].advice_doctor):""}}</p>
29
-            <p>日期:{{getTime(advicePrint[0].advice_date)?getTime(advicePrint[0].advice_date):""}}</p>
29
+            <p>医师:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</p>
30
+            <p>日期:{{getTime(item.ctime)?getTime(item.ctime):""}}</p>
30 31
         </div>
31 32
         <div class="actionBar">
32
-            <p>审核:{{getDoctor(advicePrint[0].advice_doctor)?getDoctor(advicePrint[0].advice_doctor):""}}</p>
33
-            <p>配对:{{getDoctor(advicePrint[0].advice_doctor)?getDoctor(advicePrint[0].advice_doctor):""}}</p>
34
-            <p>核对:{{getDoctor(advicePrint[0].checker)?getDoctor(advicePrint[0].checker):""}}</p>
35
-            <p>发药:{{getDoctor(advicePrint[0].execution_staff)?getDoctor(advicePrint[0].execution_staff):""}}</p>
36
-            <p>药费:{{advicePrint[0].price?advicePrint[0].price:""}}</p>
33
+            <p>审核:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</p>
34
+            <p>配对:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</p>
35
+            <p>核对:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</p>
36
+            <p>发药:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</p>
37
+            <p>药费:</p>
37 38
         </div>
38 39
     </div>
40
+
41
+
42
+    
43
+</div>
44
+
45
+    
39 46
 </template>
40 47
 <script>
41 48
 import { jsGetAge, uParseTime } from '@/utils/tools'
@@ -92,29 +99,30 @@ export default {
92 99
           // prescription_id:this.prescription_id,
93 100
           patient_id:this.$route.query.patient_id,
94 101
           record_date:this.$route.query.record,
95
-          prescription_id:this.$route.query.prescription_id 
102
+          prescription_id:this.$route.query.prescription_id,
103
+          ids:this.$route.query.ids
96 104
         }
97 105
         console.log("params---",params)
98 106
        getPrescriptionPrint(params).then(response=>{
99 107
          if(response.data.state == 1){
100 108
             var advicePrint =  response.data.data.advicePrint
101
-            console.log("adviceprint",advicePrint)
109
+            console.log("adviceprint9999",advicePrint)
102 110
             this.advicePrint = advicePrint
103
-            var patient =  response.data.data.patient
104
-            console.log("patient",patient)
105
-            this.patient = patient
106
-            var doctorPorject = response.data.data.doctorPorject
111
+            // var patient =  response.data.data.patient
112
+            // console.log("patient",patient)
113
+            // this.patient = patient
114
+            // var doctorPorject = response.data.data.doctorPorject
107 115
           
108
-            var arr = doctorPorject.project
109
-              console.log("我的中谷歌",arr)
110
-            for(let i=0;i<arr.length;i++){
111
-              console.log("arr",arr[i].project_name)
112
-            }
113
-            this.tableData = arr
114
-            console.log("3333",this.tableData)
115
-            var prescriptioninfo = response.data.data.prescriptionInfo
116
-            console.log("prescriptioninfo",prescriptioninfo)
117
-            this.prescriptionInfo = prescriptioninfo
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
118 126
           }
119 127
        })
120 128
      },
@@ -153,6 +161,8 @@ export default {
153 161
       this.getInitData()
154 162
       this.getPrescriptionPrint()
155 163
       this.getHisPatientDetail()
164
+
165
+     
156 166
    },
157 167
   //  watch:{
158 168
   //    patient_id:function(val){

+ 37 - 37
src/xt_pages/outpatientDoctorStation/treatTemplate/printOne.vue ファイルの表示

@@ -1,5 +1,6 @@
1 1
 <template>
2
-    <div id='prescription-print' class="prescription-print">
2
+   <div>
3
+    <div id='prescription-print' class="prescription-print" v-for="(item,index) in advicePrint" :key="index">
3 4
         <div style="display:flex;justify-content: space-between;font-weight:bold;">
4 5
             <p style="width:300px;display:flex;justify-content: space-between;font-weight:bold;">
5 6
                 <span>费别</span>
@@ -8,27 +9,27 @@
8 9
                 <span>保险</span>
9 10
                 <span>其他</span>
10 11
             </p>
11
-            <p>就诊日期:{{this.$route.query.record}}</p>
12
+            <p>就诊日期:{{getTime(item.ctime)}}</p>
12 13
         </div>
13 14
         <div class="printTitle">血液透析中心</div>
14 15
         <div class="printTitle">处方、治疗单</div>
15 16
         <div class="infoTitle">
16
-            <p>门诊编号:34567876532345678</p>
17
+            <p>门诊编号:</p>
17 18
             <p>电脑号:</p>
18 19
         </div>
19 20
         <div class="infoMain">
20
-            <p style="margin-bottom: 10px;width:25%">姓名:{{patient.name}}</p>
21
+            <p style="margin-bottom: 10px;width:25%">姓名:{{item.patient.name}}</p>
21 22
             <p style="margin-bottom: 10px;width:25%">性别:
22
-                <span v-if="patient.gender == 1">男</span>
23
-                <span v-if="patient.gender == 2">女</span>
23
+                <span v-if="item.patient.gender == 1">男</span>
24
+                <span v-if="item.patient.gender == 2">女</span>
24 25
             </p>
25 26
             <p style="margin-bottom: 10px;width:25%">年龄:
26
-                <span>{{patient.age}}</span>
27
+                <span>{{item.patient.age}}</span>
27 28
             </p>
28 29
             <p style="margin-bottom: 10px;width:25%">参保类型:</p>
29
-            <p style="margin-bottom: 10px;width:50%;">联系电话:{{patient.phone}}</p>
30
-            <p style="width:50%;">地址:{{patient.unit_address}}</p>
31
-            <p style="width:50%;">诊断:{{patient.diagnose}}</p>
30
+            <p style="margin-bottom: 10px;width:50%;">联系电话:{{item.patient.phone}}</p>
31
+            <p style="width:50%;">地址:{{item.patient.unit_address}}</p>
32
+            <p style="width:50%;">诊断:{{item.patient.diagnose}}</p>
32 33
         </div>
33 34
         <div class="prescriptionBox">
34 35
             <table style="width:100%;text-align:center;line-height:25px;">
@@ -42,25 +43,25 @@
42 43
                     <td>备注</td>
43 44
                     <td>天数</td>
44 45
                 </tr>
45
-                <tr v-for="(item,index) in this.tableData" :key="index">
46
+                <tr v-for="(it,index) in item.project" :key="index">
46 47
                     <td>{{index+1}}</td>
47
-                    <td>{{item.project_name}}</td>
48
-                    <td>{{item.single_dose}}</td>
49
-                    <td>{{item.unit}}</td>
50
-                    <td>{{item.price}}</td>
48
+                    <td>{{getProjectName(it.project_id)}}</td>
49
+                    <td>{{it.single_dose}}</td>
50
+                    <td>{{it.unit}}</td>
51
+                    <td>{{it.price}}</td>
51 52
                     <td></td>
52
-                    <td>{{item.remark}}</td>
53
-                    <td>{{item.day}}</td>
53
+                    <td>{{it.remark}}</td>
54
+                    <td>{{it.day}}</td>
54 55
                    
55 56
                 </tr>
56 57
             </table>
57 58
         </div>
58 59
         <div class="infoTitle">
59
-            <p>开单医生:{{getDoctor(this.prescriptionInfo[0].creator)?getDoctor(this.prescriptionInfo[0].creator):""}}</p>
60
+            <p>开单医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</p>
60 61
             <p>签章:</p>
61 62
         </div>
62 63
         <div class="actionBar">
63
-            <p>执行医生:{{getDoctor(this.prescriptionInfo[0].creator)?getDoctor(this.prescriptionInfo[0].creator):""}}</p>
64
+            <p>执行医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</p>
64 65
             <p>费用:</p>
65 66
         </div>
66 67
         <table style="width:100%;text-align:center;line-height:25px;border-collapse: collapse;" border="1">
@@ -89,6 +90,7 @@
89 90
                 <td style="width:16px;"></td>
90 91
             </tr>
91 92
         </table>
93
+     </div>
92 94
     </div>
93 95
 </template>
94 96
 <script>
@@ -106,7 +108,8 @@ export default {
106 108
         advicePrint:{},
107 109
         patient:{},
108 110
         tableData:[],
109
-        prescriptionInfo:[]
111
+        prescriptionInfo:[],
112
+        projectList:[]
110 113
       }
111 114
     },
112 115
    methods:{
@@ -155,7 +158,8 @@ export default {
155 158
         //   prescription_id:this.prescription_id,
156 159
           patient_id:this.$route.query.patient_id,
157 160
           record_date:this.$route.query.record,
158
-          prescription_id:this.$route.query.prescription_id 
161
+          prescription_id:this.$route.query.prescription_id,
162
+          ids:this.$route.query.ids, 
159 163
         }
160 164
         console.log("999999",params)
161 165
        getPrescriptionPrint(params).then(response=>{
@@ -163,24 +167,20 @@ export default {
163 167
             var advicePrint =  response.data.data.advicePrint
164 168
             console.log("adviceprint",advicePrint)
165 169
             this.advicePrint = advicePrint
166
-            var patient =  response.data.data.patient
167
-            console.log("patient",patient)
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
-
175
-            var doctorPorject = response.data.data.doctorPorject
176
-          
177
-            var arr = doctorPorject.project
178
-              console.log("治疗单",arr)
179
-            for(let i=0;i<arr.length;i++){
180
-              console.log("arr",arr[i].project_name)
181
-            }
170
+            var projectlist =  response.data.data.projectlist
171
+            console.log("所有项目列表",projectlist)
172
+            this.projectList = projectlist
182 173
           }
183 174
        })
175
+     },
176
+     getProjectName(id){
177
+        var project_name = ""
178
+        for(let i=0;i<this.projectList.length;i++){
179
+           if(id == this.projectList[i].id){
180
+               project_name = this.projectList.project_name
181
+           }
182
+        }
183
+        return project_name
184 184
      }
185 185
    },
186 186
    created(){