XMLWAN před 4 roky
rodič
revize
8312bba3fa

+ 321 - 0
src/xt_pages/outpatientDoctorStation/printtwo.vue Zobrazit soubor

@@ -0,0 +1,321 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+       <template>
6
+        <el-button
7
+          :loading="loading"
8
+          size="small"
9
+          icon="el-icon-printer"
10
+          @click="printThisPage"
11
+          type="primary"
12
+          >打印</el-button
13
+        >
14
+      </template>
15
+    </div>
16
+    <div class="app-container" style="min-height:0;">
17
+        <el-container class="newContainer">
18
+            <div style="width:270px;margin-right:20px;">
19
+                <div class="cell clearfix" style="margin-bottom:10px;">
20
+                    <el-input size="small"  v-model.trim="search_input" class="filter-item"/>
21
+                    <el-button size="small" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
22
+                </div>
23
+                <el-table ref="tab"   @current-change="changePatient" highlight-current-row :data="patientTableData" 
24
+                 height="480" border style="width: 100%">
25
+                    <el-table-column prop="date"  label="患者">   
26
+                      <template slot-scope="scope">{{scope.row.patients?scope.row.patients.name:''}}</template> 
27
+                    </el-table-column>
28
+                    <el-table-column prop="name" label="就诊号">
29
+                        <template slot-scope="scope">{{ scope.row.his_patient ?scope.row.his_patient.number:''}}</template>
30
+                    </el-table-column>
31
+                </el-table>
32
+            </div>
33
+            
34
+            <div class='dialysisPage' style="flex: 1;height: calc(100vh - 178px);overflow-x:auto;::-webkit-scrollbar:height:15px">
35
+              <printTwo v-bind:childResponse="childResponse" :advicePrint="advicePrint" :patient="patient" :hisPatient="hisPatient"></printTwo>
36
+            </div>
37
+        </el-container>
38
+    </div>
39
+  </div>
40
+</template>
41
+
42
+<script>
43
+
44
+
45
+import { parseTime } from "@/utils";
46
+import { getDialysisRecord } from "@/api/dialysis";
47
+import { getDataConfig } from "@/utils/data";
48
+import { jsGetAge, uParseTime } from "@/utils/tools";
49
+
50
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
51
+import print from "print-js";
52
+import printTwo from "./template/printTwo"
53
+import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
54
+export default {
55
+  name: "dialysisPrintOrder",
56
+  components: {
57
+    BreadCrumb,
58
+    printTwo
59
+  },
60
+  data() {
61
+    return {
62
+       record_date:"",
63
+       patientTableData:[],
64
+       advicePrint:[],
65
+       hisPatient:{},
66
+       patient:{}
67
+    };
68
+  },
69
+  methods:{
70
+    getAllDoctorList(){
71
+      getAllDoctorList().then(response=>{
72
+        if(response.data.state == 1){
73
+               var doctor =  response.data.data.doctor
74
+               
75
+               this.doctorList = doctor
76
+             }
77
+         })   
78
+     },
79
+    getAllHisPatientList(){
80
+         const params = {
81
+           record_date:this.record_date
82
+         }
83
+      getAllHisPatientList(params).then(response=>{
84
+         if(response.data.state == 1){
85
+            this.patientTableData = response.data.data.list
86
+            this.patientTableDataTwo = response.data.data.list
87
+
88
+            console.log('222', this.patientTableData)
89
+            let cal_one = 0
90
+            let cal_two = 0
91
+            for (let i = 0; i < response.data.data.list.length; i++) {
92
+              if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
93
+                cal_one = cal_one + 1
94
+              }
95
+              if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
96
+                cal_two = cal_two + 1
97
+              }
98
+            }
99
+            this.$refs.tab.setCurrentRow(this.patientTableData[0])
100
+            console.log(this.patientTableData[0])
101
+            this.choosePatient(this.patientTableData[0])
102
+            this.cal_one = cal_one
103
+            this.cal_two = cal_two   
104
+         }
105
+      })
106
+    },
107
+
108
+    changePatient(row){
109
+      console.log("row",row)
110
+        var params = {
111
+          patient_id:row.patient_id,
112
+          record_date:this.record_date,
113
+        }
114
+      getPrescriptionPrint(params).then(response=>{
115
+          if(response.data.state == 1){
116
+            var advicePrint =  response.data.data.advicePrint
117
+            console.log("adviceprint",advicePrint)
118
+            this.advicePrint = advicePrint
119
+            // var hisPatient =  response.data.data.hisPatient
120
+            // console.log("hispatient",hisPatient)
121
+            // this.hisPatient = hisPatient
122
+            var patient =  response.data.data.patient
123
+            console.log("patient",patient)
124
+            this.patient = patient
125
+            var doctorPorject = response.data.data.doctorPorject
126
+            console.log("doctorporject",doctorPorject)
127
+          }
128
+      })
129
+    }
130
+    
131
+  },
132
+
133
+  created() {
134
+    this.getAllDoctorList()
135
+    var record_date = this.$route.query.record
136
+    this.record_date = record_date
137
+    console.log("record_date",record_date)
138
+    this.getAllHisPatientList(record_date)
139
+  },
140
+
141
+};
142
+</script>
143
+
144
+<style>
145
+.dialysis-print-order {
146
+  width: 960px;
147
+  margin: 0 auto;
148
+}
149
+
150
+.dialysis-print-order .order-yy-name {
151
+  margin: auto;
152
+  text-align: center;
153
+  font-size: 20px;
154
+  letter-spacing: 5px;
155
+}
156
+
157
+.dialysis-print-order .order-title {
158
+  margin: auto;
159
+  font-weight: 600;
160
+  text-align: center;
161
+  font-size: 22px;
162
+  padding: 10px;
163
+}
164
+
165
+.dialysis-print-order .table-box {
166
+  width: 100%;
167
+  line-height: 23px;
168
+  font-size: 14px;
169
+}
170
+
171
+.dialysis-print-order .print-table {
172
+  width: 100%;
173
+  text-align: center;
174
+  border-collapse: collapse;
175
+  line-height: 40px;
176
+  font-size: 14px;
177
+  border-color: #000;
178
+}
179
+
180
+.dialysis-print-order .print-table-no {
181
+  width: 100%;
182
+  text-align: center;
183
+  border-collapse: collapse;
184
+  font-size: 14px;
185
+}
186
+
187
+.dialysis-print-order .under-line {
188
+  border-bottom: 1px solid #999;
189
+  width: 95%;
190
+  text-align: center;
191
+  margin-left: 2px;
192
+}
193
+
194
+.dialysis-print-order .title-box {
195
+  text-align: center;
196
+  font-size: 16px;
197
+}
198
+
199
+.dialysis-print-order .radio-lebel-box {
200
+  font-weight: 400;
201
+  cursor: pointer;
202
+}
203
+
204
+.dialysis-print-order .radio-no {
205
+  opacity: 0;
206
+  outline: none;
207
+  position: absolute;
208
+  margin: 0;
209
+  width: 0;
210
+  height: 0;
211
+  z-index: -1;
212
+}
213
+
214
+.dialysis-print-order .radio-inner {
215
+  white-space: nowrap;
216
+  cursor: pointer;
217
+  outline: none;
218
+  display: inline-block;
219
+  line-height: 1;
220
+  position: relative;
221
+  vertical-align: middle;
222
+}
223
+
224
+.dialysis-print-order .radio-fang {
225
+  display: inline-block;
226
+  position: relative;
227
+  border: 1px solid #000;
228
+  box-sizing: border-box;
229
+  width: 14px;
230
+  height: 14px;
231
+  background-color: #fff;
232
+  z-index: 1;
233
+  transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
234
+    background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
235
+}
236
+
237
+.dialysis-print-order .is-checked-radio::after {
238
+  content: "√";
239
+  font-size: 15px;
240
+}
241
+
242
+.dialysis-print-order .print-table-no tr td {
243
+  padding: 8px 5px;
244
+  line-height: 25px;
245
+}
246
+
247
+.dialysis-print-order .print-table tr td {
248
+  padding: 1px 1px;
249
+  /*line-height: 25px;*/
250
+}
251
+
252
+.es-img {
253
+  height: 30px;
254
+}
255
+
256
+.advice-name {
257
+  text-align: left;
258
+}
259
+
260
+.advice-children {
261
+  display: flex;
262
+}
263
+
264
+.title-box-pro {
265
+  border: 0 #fff;
266
+  line-height: 25px;
267
+  height: 25px;
268
+  text-align: left;
269
+  padding-left: 10px !important;
270
+}
271
+.title-box-pro-tr {
272
+  border: 0 #fff;
273
+}
274
+.text-align-left {
275
+  text-align: left !important;
276
+  padding-left: 10px !important;
277
+  font-size: 14px !important;
278
+  line-height: 25px;
279
+}
280
+.print-table-tr-new td {
281
+  line-height: 20px !important;
282
+}
283
+.border-top-solid {
284
+  border: solid 1px #000;
285
+}
286
+.print-template-two tr {
287
+  line-height: 30px;
288
+}
289
+
290
+.table-box1 {
291
+  border: 1px solid #000;
292
+  width: 100%;
293
+  line-height: 30px;
294
+  font-size: 14px;
295
+  border-collapse: collapse;
296
+}
297
+.table-box1 tr {
298
+  border-bottom: 1px solid #000;
299
+}
300
+</style>
301
+
302
+<style lang="scss">
303
+
304
+.newContainer{
305
+  .dialysisPage::-webkit-scrollbar {
306
+    height: 15px;
307
+  }
308
+  
309
+  .el-date-editor{
310
+    .el-input__inner{
311
+      padding-right:0px;
312
+    }
313
+  }
314
+  .el-table td, .el-table th{
315
+    text-align: center;
316
+  }
317
+}
318
+.newContainer::-webkit-scrollbar{
319
+  height: 15px !important;
320
+}
321
+</style>

+ 152 - 0
src/xt_pages/outpatientDoctorStation/template/printTwo.vue Zobrazit soubor

@@ -0,0 +1,152 @@
1
+<template>
2
+    <div id='prescription-print' class="prescription-print">
3
+        <div class="printTitle">血液透析中心处方笺</div>
4
+        <div class="infoTitle">
5
+            <p>姓名:{{patient.name}}</p>
6
+            <p>性别:
7
+               <span v-if="patient.gender == 1">男</span>
8
+               <span v-if="patient.gender == 2">女</span>
9
+            </p>
10
+            <p>年龄:{{patient.age}}岁</p>
11
+        </div>
12
+        <div class="infoMain">
13
+            <p style="margin-bottom: 10px;">门诊号:</p>
14
+            <p style="margin-bottom: 10px;">科室:</p>
15
+            <p style="margin-bottom: 10px;">医保卡号:</p>
16
+            <p style="margin-bottom: 10px;">电话:{{patient.phone}}</p>
17
+            <p>地址:{{patient.home_address}}</p>
18
+            <p>临床诊断:{{patient.diagnose}}</p>
19
+        </div>
20
+        <div class="prescriptionBox">
21
+            <p class="Rp">Rp:</p>
22
+            <div class="drugsBox" v-for="(item,index) in advicePrint" :key="index">
23
+                <p class="drugsOne">{{item.advice_name}}&nbsp;&nbsp;{{item.single_dose}}{{item.single_dose_unit}}&nbsp;×&nbsp; {{item.prescribing_number}}{{item.prescribing_number_unit}}</p>
24
+                <p 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></p>
25
+            </div>
26
+        </div>
27
+        <div class="doctorBox">
28
+            <p>医师:{{getDoctor(advicePrint[0].advice_doctor)}}</p>
29
+            <p>日期:{{getTime(advicePrint[0].advice_date)}}</p>
30
+        </div>
31
+        <div class="actionBar">
32
+            <p>审核:{{getDoctor(advicePrint[0].advice_doctor)}}</p>
33
+            <p>配对:{{getDoctor(advicePrint[0].advice_doctor)}}</p>
34
+            <p>核对:{{getDoctor(advicePrint[0].checker)}}</p>
35
+            <p>发药:{{getDoctor(advicePrint[0].execution_staff)}}</p>
36
+            <p>药费:{{advicePrint[0].price}}</p>
37
+        </div>
38
+    </div>
39
+</template>
40
+<script>
41
+import { jsGetAge, uParseTime } from '@/utils/tools'
42
+  import {getAllDoctorList} from "@/api/project/project"
43
+export default {
44
+    props:{
45
+      patient:Object,
46
+      advicePrint:Array,
47
+      hisPatient:Object,
48
+    }, 
49
+    data(){
50
+      return{
51
+        doctorList:[]
52
+      }
53
+    },
54
+   methods:{
55
+     
56
+     getAllDoctorList(){
57
+      getAllDoctorList().then(response=>{
58
+        if(response.data.state == 1){
59
+               var doctor =  response.data.data.doctor
60
+               
61
+               this.doctorList = doctor
62
+             }
63
+         })   
64
+     },
65
+
66
+      getDoctor(id){
67
+        var name = ""
68
+        for(let i=0;i<this.doctorList.length;i++){
69
+          if(id == this.doctorList[i].admin_user_id){
70
+              name = this.doctorList[i].user_name
71
+          }
72
+        }
73
+        return name
74
+      },
75
+      getTime(value, temp) {
76
+        if (value != undefined) {
77
+            return uParseTime(value, temp)
78
+        }
79
+        return ''
80
+     },
81
+   },
82
+   created(){
83
+      this.getAllDoctorList()
84
+   }
85
+}
86
+</script>
87
+
88
+
89
+<style lang="scss" scoped>
90
+.printTitle{
91
+    font-size: 22px;
92
+    text-align: center;
93
+    font-weight: bold;
94
+}
95
+.infoTitle{
96
+    display: flex;
97
+    border-bottom: 2px solid #000;
98
+    margin-top:10px;
99
+    line-height: 24px;
100
+    padding:0 10px;
101
+}
102
+.infoTitle p{
103
+    width: 200px;
104
+}
105
+.infoMain{
106
+    display: flex;
107
+    flex-wrap: wrap;
108
+    border-bottom: 2px solid #000;
109
+    padding:0 10px;
110
+}
111
+.infoMain p{
112
+    width: 50%;
113
+    line-height: 24px;
114
+}
115
+.prescriptionBox{
116
+    padding:0 10px;
117
+    height:600px;
118
+}
119
+.Rp{
120
+    font-size: 22px;
121
+    font-weight: bold;
122
+}
123
+.drugsBox{
124
+    padding-left: 40px;
125
+    margin-bottom: 10px;
126
+}
127
+.drugsBox p{
128
+    line-height: 30px;
129
+}
130
+.drugsOne{
131
+    line-height: 24px;
132
+}
133
+.drugsOne span{
134
+    margin-right: 20px;
135
+}
136
+.doctorBox{
137
+    display: flex;
138
+    justify-content: space-between;
139
+    padding:0 10px;
140
+    line-height: 24px;
141
+    border-bottom: 2px solid #000;
142
+}
143
+.actionBar{
144
+    display: flex;
145
+    justify-content: space-between; 
146
+    line-height: 24px;
147
+    padding:0 10px;
148
+}
149
+.actionBar p{
150
+    width:150px;
151
+}
152
+</style>