Browse Source

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

XMLWAN 3 years ago
parent
commit
8fee834b02

+ 8 - 0
src/api/his/his.js View File

@@ -650,6 +650,14 @@ export function getYidiClearRecord(params) {
650 650
   })
651 651
 }
652 652
 
653
+export function getBatchPrint(params) {
654
+  return request({
655
+    url: '/api/his/prescription/print',
656
+    method: 'get',
657
+    params: params
658
+  })
659
+}
660
+
653 661
 
654 662
 
655 663
 

+ 1 - 0
src/components/Popup/index.vue View File

@@ -31,6 +31,7 @@
31 31
             <li>
32 32
               购货单 {{ item.good_number}}<a @click="toClick(item.id)">点击查看</a>
33 33
             </li>
34
+            <li>购货单 <a @click="toClick(item.id)">点击查看</a></li>
34 35
           </div>
35 36
         </div>
36 37
       </div>

+ 6 - 4
src/xt_pages/outpatientCharges/statementTemplate/printThree.vue View File

@@ -3,7 +3,7 @@
3 3
         <div v-if="paramsObj.balance_accounts_type != 2" id='prescription-print' class="prescription-print"
4 4
              style="position: relative;">
5 5
             <img style="width:100%;height:80px" v-if="org_id != 10278" src="https://kuyi.shengws.com/bailin/bltotle.jpg" alt="">
6
-            <img style="width:100%;height:80px" v-if="org_id == 10278" src="https://kuyi.shengws.com/beierlog.png" alt="">
6
+            <img style="width:100%;height:80px" v-else src="https://kuyi.shengws.com/beierlog.png" alt="">
7 7
             <div class="printTitle" style="position: absolute;left: 40%;top: 50px;">门诊收费清单</div>
8 8
             <div style="display:flex;">
9 9
                 <div>单据号:<span
@@ -142,10 +142,12 @@
142 142
                 <div>操作日期:<span style="width:100px;display:inline-block;">{{info.setl_time ? info.setl_time.split(' ')[0] : ''}}</span>
143 143
                 </div>
144 144
             </div>
145
-            <img style="width:100%;" src="https://kuyi.shengws.com/bailin/blend.jpg" alt="">
145
+            <img style="width:100%;" v-if="org_id != 10278" src="https://kuyi.shengws.com/bailin/blend.jpg" alt="">
146
+            <img style="width:100%;" v-else src="https://kuyi.shengws.com/bailinbeier.png" alt="">
146 147
         </div>
147 148
         <div v-else id='prescription-print' class="prescription-print" style="position: relative;">
148
-            <img style="width:100%;height:80px" src="https://kuyi.shengws.com/bailin/bltotle.jpg" alt="">
149
+            <img style="width:100%;height:80px" v-if="org_id != 10278" src="https://kuyi.shengws.com/bailin/bltotle.jpg" alt="">
150
+            <img style="width:100%;height:80px" v-else src="https://kuyi.shengws.com/beierlog.png" alt="">
149 151
             <div class="printTitle" style="position: absolute;left: 40%;top: 50px;">门诊收费清单</div>
150 152
             <div style="display:flex;">
151 153
                 <div>单据号:<span style="display:inline-block;width:200px;">{{balanceAccounts.his.number ? balanceAccounts.his.number : ''}}</span>
@@ -284,7 +286,7 @@
284 286
                 </div>
285 287
             </div>
286 288
             <img style="width:100%;" v-if="org_id != 10278" src="https://kuyi.shengws.com/bailin/blend.jpg" alt="">
287
-            <img style="width:100%;" v-if="org_id == 10278" src="https://kuyi.shengws.com/bailinbeier.png" alt="">
289
+            <img style="width:100%;" v-else src="https://kuyi.shengws.com/bailinbeier.png" alt="">
288 290
         </div>
289 291
     </div>
290 292
 

+ 349 - 0
src/xt_pages/outpatientDoctorStation/batch_print_checkTemplate/index.vue View File

@@ -0,0 +1,349 @@
1
+<template>
2
+  <div>
3
+       <!-- <template>
4
+        <el-button
5
+          style="float:right;"
6
+          :loading="loading"
7
+          size="small"
8
+          icon="el-icon-printer"
9
+          @click="printThisPage"
10
+          type="primary"
11
+          >打印</el-button
12
+        >
13
+      </template> -->
14
+            
15
+      <div class='dialysisPage' style="padding-top:40px;">
16
+        <printOne :printData="printData" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
17
+      </div>
18
+  </div>
19
+</template>
20
+
21
+<script>
22
+import { jsGetAge, uParseTime } from "@/utils/tools";
23
+
24
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
25
+import print from "print-js";
26
+import printOne from "./printOne"
27
+import { getAllDoctorList,getAllHisPatientList } from "@/api/project/project"
28
+export default {
29
+  name: "dialysisPrintOrder",
30
+  components: {
31
+    BreadCrumb,
32
+    printOne,
33
+  },
34
+  props:{
35
+    paramsObj:Object,
36
+    printData:Array
37
+  },
38
+  data() {
39
+    return {
40
+      crumbs: [
41
+        { path: false, name: '门诊医生站' },
42
+        { path: false, name: '打印' }
43
+      ],
44
+      record_date:"",
45
+      patientTableData:[],
46
+      advicePrint:[],
47
+      hisPatient:{},
48
+      patient:{},
49
+      search_input:"",
50
+      loading:false,
51
+      patient_id:0,
52
+      prescription_id:0,
53
+      ids:''
54
+    };
55
+  },
56
+  methods:{
57
+    printThisPage() {
58
+        var ptime = Math.round(new Date().getTime() / 1000);
59
+        this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
60
+        setTimeout(() => {
61
+            const style =
62
+            '@media print {#prescription-print{font-size:14px;}.prescription-print:last-child {page-break-after: auto;}.prescription-print{font-size: 14px;}.printTitle{font-size: 18px;text-align: center;font-weight: bold;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:5px;padding:0 10px;}.infoTitle div{width: 300px;margin-bottom:5px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain div{width: 50%;}.prescriptionBox{padding:0 10px;min-height:380px;}.Rp{font-size: 22px;font-weight: bold;line-height:1px;}.drugsBox{padding-left: 40px;margin-bottom: 10px;margin-bottom: 10px;}.drugsBox p{line-height: 1px;padding-bottom:10px !important;} .drugsOne{line-height: 1px;margin-bottom:10px !important;} .drugsOne span{margin-right: 20px;} .doctorBox{display: flex; justify-content: space-between; padding:0 10px; border-bottom: 2px solid #000;} .actionBar{display: flex; justify-content: space-between; padding:0 10px;margin:5px 0;} .actionBar div{width:150px;}}';
63
+            printJS({
64
+                printable: "prescription-print3",
65
+                type: "html",
66
+                style: style,
67
+                scanStyles: false
68
+            });
69
+        },500)
70
+        
71
+    },
72
+    getAllDoctorList(){
73
+      getAllDoctorList().then(response=>{
74
+        if(response.data.state == 1){
75
+               var doctor =  response.data.data.doctor
76
+               
77
+               this.doctorList = doctor
78
+             }
79
+         })   
80
+     },
81
+    getAllHisPatientList(){
82
+         const params = {
83
+           record_date:this.record_date
84
+         }
85
+      getAllHisPatientList(params).then(response=>{
86
+         if(response.data.state == 1){
87
+            this.patientTableData = response.data.data.list
88
+            this.patientTableDataTwo = response.data.data.list
89
+
90
+            console.log('222', this.patientTableData)
91
+            let cal_one = 0
92
+            let cal_two = 0
93
+            for (let i = 0; i < response.data.data.list.length; i++) {
94
+              if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
95
+                cal_one = cal_one + 1
96
+              }
97
+              if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
98
+                cal_two = cal_two + 1
99
+              }
100
+            }
101
+            // this.$refs.tab.setCurrentRow(this.patientTableData[0])
102
+            // console.log(this.patientTableData[0])
103
+            // this.choosePatient(this.patientTableData[0])
104
+            this.cal_one = cal_one
105
+            this.cal_two = cal_two   
106
+         }
107
+      })
108
+    },
109
+
110
+    changePatient(row){
111
+      console.log("row",row)
112
+      this.patient_id = row.patient_id
113
+      this.record_date = this.record_date
114
+      this.prescription_id = this.prescription_id
115
+      //   var params = {
116
+      //     patient_id:row.patient_id,
117
+      //     record_date:this.record_date,
118
+      //     prescription_id:this.prescription_id,
119
+      //   }
120
+      // getPrescriptionPrint(params).then(response=>{
121
+      //     if(response.data.state == 1){
122
+      //       var advicePrint =  response.data.data.advicePrint
123
+      //       console.log("adviceprint",advicePrint)
124
+      //       this.advicePrint = advicePrint
125
+      //       // var hisPatient =  response.data.data.hisPatient
126
+      //       // console.log("hispatient",hisPatient)
127
+      //       // this.hisPatient = hisPatient
128
+      //       var patient =  response.data.data.patient
129
+      //       console.log("patient",patient)
130
+      //       this.patient = patient
131
+      //       var doctorPorject = response.data.data.doctorPorject
132
+      //       console.log("doctorporject",doctorPorject)
133
+      //     }
134
+      // })
135
+    },
136
+    searchAction(){
137
+
138
+    }
139
+    
140
+  },
141
+
142
+  created() {
143
+    this.org_id = this.$store.getters.xt_user.org_id
144
+    this.getAllDoctorList()
145
+    var record_date = this.paramsObj.record
146
+    this.record_date = record_date
147
+    console.log("record_date",record_date)
148
+    this.prescription_id = this.paramsObj.prescription_id
149
+    this.patient_id = this.paramsObj.patient_id
150
+    this.ids = this.paramsObj.ids
151
+    this.getAllHisPatientList(record_date)
152
+  },
153
+  watch:{
154
+    paramsObj:{//深度监听,可监听到对象、数组的变化
155
+      handler(val, oldVal){
156
+        this.paramsObj = val
157
+        this.patient_id = this.paramsObj.patient_id
158
+        var record_date = this.paramsObj.record
159
+        this.record_date = record_date
160
+        var prescription_id = this.paramsObj.prescription_id
161
+        this.prescription_id = prescription_id
162
+        this.ids = this.paramsObj.ids
163
+        
164
+      },
165
+      deep:true
166
+    }
167
+  }
168
+
169
+};
170
+</script>
171
+
172
+<style>
173
+.dialysis-print-order {
174
+  width: 960px;
175
+  margin: 0 auto;
176
+}
177
+
178
+.dialysis-print-order .order-yy-name {
179
+  margin: auto;
180
+  text-align: center;
181
+  font-size: 20px;
182
+  letter-spacing: 5px;
183
+}
184
+
185
+.dialysis-print-order .order-title {
186
+  margin: auto;
187
+  font-weight: 600;
188
+  text-align: center;
189
+  font-size: 22px;
190
+  padding: 10px;
191
+}
192
+
193
+.dialysis-print-order .table-box {
194
+  width: 100%;
195
+  line-height: 23px;
196
+  font-size: 14px;
197
+}
198
+
199
+.dialysis-print-order .print-table {
200
+  width: 100%;
201
+  text-align: center;
202
+  border-collapse: collapse;
203
+  line-height: 40px;
204
+  font-size: 14px;
205
+  border-color: #000;
206
+}
207
+
208
+.dialysis-print-order .print-table-no {
209
+  width: 100%;
210
+  text-align: center;
211
+  border-collapse: collapse;
212
+  font-size: 14px;
213
+}
214
+
215
+.dialysis-print-order .under-line {
216
+  border-bottom: 1px solid #999;
217
+  width: 95%;
218
+  text-align: center;
219
+  margin-left: 2px;
220
+}
221
+
222
+.dialysis-print-order .title-box {
223
+  text-align: center;
224
+  font-size: 16px;
225
+}
226
+
227
+.dialysis-print-order .radio-lebel-box {
228
+  font-weight: 400;
229
+  cursor: pointer;
230
+}
231
+
232
+.dialysis-print-order .radio-no {
233
+  opacity: 0;
234
+  outline: none;
235
+  position: absolute;
236
+  margin: 0;
237
+  width: 0;
238
+  height: 0;
239
+  z-index: -1;
240
+}
241
+
242
+.dialysis-print-order .radio-inner {
243
+  white-space: nowrap;
244
+  cursor: pointer;
245
+  outline: none;
246
+  display: inline-block;
247
+  line-height: 1;
248
+  position: relative;
249
+  vertical-align: middle;
250
+}
251
+
252
+.dialysis-print-order .radio-fang {
253
+  display: inline-block;
254
+  position: relative;
255
+  border: 1px solid #000;
256
+  box-sizing: border-box;
257
+  width: 14px;
258
+  height: 14px;
259
+  background-color: #fff;
260
+  z-index: 1;
261
+  transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
262
+    background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
263
+}
264
+
265
+.dialysis-print-order .is-checked-radio::after {
266
+  content: "√";
267
+  font-size: 15px;
268
+}
269
+
270
+.dialysis-print-order .print-table-no tr td {
271
+  padding: 8px 5px;
272
+  line-height: 25px;
273
+}
274
+
275
+.dialysis-print-order .print-table tr td {
276
+  padding: 1px 1px;
277
+  /*line-height: 25px;*/
278
+}
279
+
280
+.es-img {
281
+  height: 30px;
282
+}
283
+
284
+.advice-name {
285
+  text-align: left;
286
+}
287
+
288
+.advice-children {
289
+  display: flex;
290
+}
291
+
292
+.title-box-pro {
293
+  border: 0 #fff;
294
+  line-height: 25px;
295
+  height: 25px;
296
+  text-align: left;
297
+  padding-left: 10px !important;
298
+}
299
+.title-box-pro-tr {
300
+  border: 0 #fff;
301
+}
302
+.text-align-left {
303
+  text-align: left !important;
304
+  padding-left: 10px !important;
305
+  font-size: 14px !important;
306
+  line-height: 25px;
307
+}
308
+.print-table-tr-new td {
309
+  line-height: 20px !important;
310
+}
311
+.border-top-solid {
312
+  border: solid 1px #000;
313
+}
314
+.print-template-two tr {
315
+  line-height: 30px;
316
+}
317
+
318
+.table-box1 {
319
+  border: 1px solid #000;
320
+  width: 100%;
321
+  line-height: 30px;
322
+  font-size: 14px;
323
+  border-collapse: collapse;
324
+}
325
+.table-box1 tr {
326
+  border-bottom: 1px solid #000;
327
+}
328
+</style>
329
+
330
+<style lang="scss">
331
+
332
+.newContainer{
333
+  .dialysisPage::-webkit-scrollbar {
334
+    height: 15px;
335
+  }
336
+  
337
+  .el-date-editor{
338
+    .el-input__inner{
339
+      padding-right:0px;
340
+    }
341
+  }
342
+  .el-table td, .el-table th{
343
+    text-align: center;
344
+  }
345
+}
346
+.newContainer::-webkit-scrollbar{
347
+  height: 15px !important;
348
+}
349
+</style>

+ 571 - 0
src/xt_pages/outpatientDoctorStation/batch_print_checkTemplate/printOne.vue View File

@@ -0,0 +1,571 @@
1
+<template>
2
+    <div>
3
+        <div id='prescription-print3' class="prescription-print">
4
+          <div v-for="(i,index) in printData">
5
+            <img style="width:100%;height:80px" v-if="org_id == 10138 || org_id == 10278" src="https://kuyi.shengws.com/bailin/bltotle.jpg" alt="">
6
+            <div class="printTitle">检验申请单</div>
7
+
8
+            <div style="border:1px solid #000;">
9
+                <div style="display:flex;justify-content: space-between;border-bottom:1px solid #000;line-height:40px;padding:0 10px;">
10
+                    <div>是否急诊:否</div>
11
+                    <div>结算方式:{{ i.his_patient.id != 0 ? i.his_patient.balance_accounts_type == 1 ? '医保' : '自费' : '' }}</div>
12
+                    <div>金额:{{ total }}</div>
13
+                </div>
14
+                <div style="display:flex;justify-content: space-between;border-bottom:1px solid #000;line-height:40px;padding:0 10px;">
15
+                    <div>姓名:{{i.his_patient.id != 0?i.his_patient.name:i.name}}</div>
16
+                    <div>性别:
17
+                        <span v-if="i.his_patient.id != 0">
18
+                          <span v-if="i.his_patient.gend == 1">男</span>
19
+                          <span v-if="i.his_patient.gend == 2">女</span>
20
+                        </span>
21
+                        <span v-else>
22
+                          <span v-if="i.gender == 1">男</span>
23
+                          <span v-if="i.gender == 2">女</span>
24
+                        </span>
25
+                    </div>
26
+                    <div>年龄:{{i.age?i.age:""}}岁</div>
27
+                </div>
28
+                <!-- <div style="margin-bottom:20px;padding:10px 10px 0;">病史摘要:{{history.history_of_present_illness?history.history_of_present_illness:''}}</div> -->
29
+                <!-- <div style="margin-bottom:20px;padding:0 10px;">体格检查:
30
+                    <span>体温:{{ history.temperature ? history.temperature + '℃' : '/' }}</span>
31
+                    <span>脉搏:{{ history.pulse ? history.pulse + '次/分' : '/' }}</span>
32
+                    <span>呼吸:{{ history.breathing ? history.breathing + '次/分' : '/' }}</span>
33
+                    <span>血压:{{ history.sbp }}/{{ history.dbp }}mmHg</span>
34
+                </div> -->
35
+                <div style="margin:20px 0;padding:0 10px;">临床诊断:{{getDiagnosis(i.info.diagnosis)}}</div>
36
+                <div style="display:flex;margin-bottom:20px;padding:0 10px;">
37
+                    <div>检验项目:</div>
38
+                    <div>
39
+                        <div v-for="item in getTeam(i.prescriptions)" style="margin-bottom:10px;">{{ item.team.project_team }}</div>
40
+                        <div v-for="item in getSingleTeam(i.prescriptions)" style="margin-bottom:10px;">{{ item.project.project_name }}</div>
41
+                    </div>
42
+                </div>
43
+                <div style="display:flex;justify-content: space-between;border-top:1px solid #000;line-height:40px;padding:0 10px;">
44
+                    <div>开单医生:{{ doctor ? doctor : '' }}</div>
45
+                    <div>开单日期:
46
+                        {{getTime(pre_time) ? getTime(pre_time).split(' ')[0] : ''}}
47
+                    </div>
48
+                    <div>医生签字:{{ doctor ? doctor : '' }}</div>
49
+                </div>
50
+            </div>   
51
+            <img style="width:100%;" v-if="org_id == 10138 || org_id == 10278" src="https://kuyi.shengws.com/bailin/blend.jpg" alt="">
52
+        </div>
53
+      </div>
54
+    </div>
55
+
56
+</template>
57
+<script>
58
+import { jsGetAge, uParseTime } from '@/utils/tools'
59
+import {getAllDoctorList,getPrescriptionPrint,getHisPatientDetail,getPatientCaseHistory} from "@/api/project/project"
60
+import {getInitData} from "@/api/his/his"
61
+export default {
62
+    props:{
63
+      patient_id:Number,
64
+      record_date:String,
65
+      prescription_id:Number,
66
+      ids:String,
67
+      printData:Array
68
+    }, 
69
+    data(){
70
+      return {
71
+        doctorList:[],
72
+        advicePrint:{},
73
+        patient:{},
74
+        tableData:[],
75
+        prescriptionInfo:[],
76
+        hisPatient:{},
77
+        department:[],
78
+        prescriptions:[],
79
+        projectList:[],
80
+        orgname:"",
81
+        diagnoses:[],
82
+        pageArr:[],
83
+        faber:{},
84
+        total:0,
85
+        projectPrint:[],
86
+        time:'',
87
+        doctor:'',
88
+        org_id:'',
89
+        singleProjectPrint:[]
90
+      }
91
+    },
92
+   methods:{
93
+    getPatientCaseHistory(){
94
+        const params = {
95
+          patient_id:this.patient_id
96
+        }
97
+        getPatientCaseHistory(params).then(response=>{
98
+            if(response.data.state == 1){
99
+                var history = response.data.data.history
100
+                console.log("中国history222222",history)
101
+                this.history = history
102
+            }
103
+        })
104
+    },
105
+     getAllDoctorList(){
106
+      getAllDoctorList().then(response=>{
107
+        if(response.data.state == 1){
108
+               var doctor =  response.data.data.doctor
109
+               
110
+               this.doctorList = doctor
111
+             }
112
+         })   
113
+     },
114
+
115
+      getDoctor(id){
116
+        var name = ""
117
+        for(let i=0;i<this.doctorList.length;i++){
118
+          if(id == this.doctorList[i].admin_user_id){
119
+              name = this.doctorList[i].user_name
120
+          }
121
+        }
122
+        return name
123
+      },
124
+      getTime(value, temp) {
125
+        if (value != undefined) {
126
+            return uParseTime(value, temp)
127
+        }
128
+        return ''
129
+     },
130
+       getPrescriptionPrint(){
131
+         var params = {
132
+          // patient_id:this.patient_id,
133
+          // record_date:this.record_date,
134
+          // prescription_id:this.prescription_id,
135
+          patient_id:this.patient_id,
136
+          record_date:this.record_date,
137
+          prescription_id:this.prescription_id,
138
+          ids:this.ids
139
+        }
140
+        console.log("params",params)
141
+       getPrescriptionPrint(params).then(response=>{
142
+         if(response.data.state == 1){
143
+            var advicePrint =  response.data.data.advicePrint
144
+            console.log("adviceprint9999",advicePrint)
145
+            this.advicePrint = advicePrint
146
+            this.prescriptions = advicePrint
147
+            console.log("处方222222",this.prescriptions)
148
+            var hisPatient = response.data.data.hisPatient
149
+            console.log("hisPatient",hisPatient)
150
+            this.hisPatient = hisPatient
151
+            let projectPrint = []
152
+            let total = 0
153
+            this.advicePrint.map(item => {
154
+              console.log("imte233232323232323223",item.project)
155
+              if(item.project.length > 0){
156
+                  item.project.map(it => {
157
+                        if(it.type == 2){
158
+                            if(it.project.cost_classify == 3){
159
+                                projectPrint.push(it)
160
+                                total += (it.project.price*parseInt(it.count))
161
+                            }
162
+                        }
163
+                  })
164
+                
165
+              }
166
+            })
167
+            let data = []
168
+            let data2 = []
169
+            projectPrint.map(item => {
170
+              if(item.team.id != 0){
171
+                let status = data.some(it => (it.team.id == item.team.id))
172
+                if(!status){
173
+                  data.push(item)
174
+                }
175
+              }
176
+              if(item.team.id == 0){
177
+                data2.push(item)
178
+              }
179
+              
180
+            })
181
+          
182
+            this.total = total.toFixed(2)
183
+            this.pre_time = this.advicePrint[0].pre_time
184
+            this.doctor = this.advicePrint[0].doctor
185
+            this.projectPrint = data
186
+            this.singleProjectPrint = data2
187
+            console.log('99999999999999999',projectPrint)
188
+            var projectlist =  response.data.data.projectlist
189
+
190
+            var projectlist =  response.data.data.projectlist
191
+            console.log("所有项目列表",projectlist)
192
+            this.projectList = projectlist
193
+            this.getPage()
194
+            let outputlist1Name = response.data.data.his.patient_info ? JSON.parse(response.data.data.his.patient_info) : {};
195
+            this.faber = outputlist1Name
196
+
197
+            
198
+          }
199
+       })
200
+     },
201
+     getTeam(prescriptions){
202
+        let projectPrint = []
203
+        let total = 0
204
+        prescriptions.map(item => {
205
+          if(item.project.length > 0){
206
+              item.project.map(it => {
207
+                    if(it.type == 2){
208
+                        if(it.project.cost_classify == 3){
209
+                            projectPrint.push(it)
210
+                            total += (it.project.price*parseInt(it.count))
211
+                        }
212
+                    }
213
+              })
214
+            
215
+          }
216
+        })
217
+        let data = []
218
+        projectPrint.map(item => {
219
+          if(item.team.id != 0){
220
+            let status = data.some(it => (it.team.id == item.team.id))
221
+            if(!status){
222
+              data.push(item)
223
+            }
224
+          }
225
+          
226
+        })
227
+      
228
+        this.total = total.toFixed(2)
229
+        this.pre_time = prescriptions[0].pre_time
230
+        this.doctor = prescriptions[0].doctor
231
+        this.projectPrint = data
232
+        return data
233
+     },
234
+     getSingleTeam(prescriptions){
235
+        let projectPrint = []
236
+        let total = 0
237
+        prescriptions.map(item => {
238
+          if(item.project.length > 0){
239
+              item.project.map(it => {
240
+                    if(it.type == 2){
241
+                        if(it.project.cost_classify == 3){
242
+                            projectPrint.push(it)
243
+                            total += (it.project.price*parseInt(it.count))
244
+                        }
245
+                    }
246
+              })
247
+            
248
+          }
249
+        })
250
+        let data = []
251
+        projectPrint.map(item => {
252
+          if(item.team.id == 0){
253
+                data.push(item)
254
+              }
255
+          
256
+        })
257
+      
258
+        this.total = total.toFixed(2)
259
+        return data
260
+     },
261
+     getHisPatientDetail(){
262
+          const params = {
263
+              patient_id:this.patient_id
264
+          }
265
+       getHisPatientDetail(params).then(response=>{
266
+          if(response.data.state == 1){
267
+             var hisPatient =  response.data.data.hisPatient
268
+             console.log("挂号病人",hisPatient)
269
+             this.hisPatient = hisPatient
270
+          }
271
+       })
272
+     },
273
+     getInitData(){
274
+       getInitData().then(response=>{
275
+          if(response.data.state == 1){
276
+            this.department = response.data.data.department
277
+            this.diagnoses = response.data.data.diagnose.sort(this.compare('id'))
278
+            console.log("争端",this.diagnoses)
279
+          }
280
+       })
281
+     },
282
+     getDepart(id){
283
+         var name = ""
284
+       for(let i=0;i<this.department.length;i++){
285
+           if(id == this.department[i].id){
286
+               name = this.department[i].name
287
+           }
288
+       }
289
+       return name
290
+     },
291
+    getTotalOne(id) {
292
+
293
+        var total = 0
294
+        var addtotal = 0
295
+        for (let i = 0; i < this.prescriptions.length; i++) {
296
+          if(id == this.prescriptions[i].id){
297
+            if (this.prescriptions[i].project != null) {
298
+              for (let a = 0; a < this.prescriptions[i].project.length; a++) {
299
+                total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
300
+              }
301
+            }
302
+
303
+            if (this.prescriptions[i].additionalcharge != null) {
304
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
305
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
306
+              }
307
+            }
308
+              addtotal =  Math.floor(addtotal * 100) / 100
309
+        }
310
+       
311
+       }
312
+
313
+      for (let i = 0; i < this.prescriptions.length; i++) {
314
+          if(id == this.prescriptions[i].id){
315
+            if (this.prescriptions[i].advices != null) {
316
+              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
317
+                total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
318
+              }
319
+            }
320
+          
321
+            if (this.prescriptions[i].additionalcharge != null) {
322
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
323
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
324
+              }
325
+            }
326
+              addtotal =  Math.floor(addtotal * 100) / 100
327
+        }
328
+       }
329
+
330
+        return total + addtotal
331
+      },
332
+      
333
+     getProjectName(id){
334
+        var project_name = ""
335
+        for(let i=0;i<this.projectList.length;i++){
336
+           if(id == this.projectList[i].id){
337
+               project_name = this.projectList[i].project_name
338
+           }
339
+        }
340
+        return project_name
341
+     },
342
+
343
+     getDiagnosis(ids){
344
+        let newIds = ids.split(',').sort(function(a,b){
345
+          return a-b;
346
+        })
347
+        
348
+        var name = ""
349
+        let nameArr = []
350
+        for(let i=0;i<this.diagnoses.length;i++){
351
+          // if(id == this.diagnoses[i].id){
352
+          //    name = this.diagnoses[i].class_name
353
+          // }
354
+          
355
+          if(newIds.indexOf(this.diagnoses[i].id.toString()) > -1){
356
+            // name += diagnoses[i].class_name + ' '
357
+            nameArr.push(this.diagnoses[i].class_name)
358
+          }
359
+        }
360
+        let newNameArr = []
361
+        nameArr.map((item,index) => {
362
+          if(item == '尿毒症'){
363
+            newNameArr.push(item)
364
+            nameArr.splice(index,1,'') 
365
+          }
366
+        })
367
+        newNameArr.push(...nameArr)
368
+        return newNameArr.join(' ')
369
+     },
370
+     compare(property) {
371
+        return function(a,b){
372
+          var value1 = a[property];
373
+          var value2 = b[property];
374
+          return value1 - value2;//升序排序
375
+        }
376
+      },
377
+     getPage(){
378
+        this.page = 1
379
+        this.pageArr = []
380
+
381
+        this.advicePrint.map(item => {
382
+          let arr = []
383
+          item.pageArr = []
384
+          if(item.advices.length <= 5){
385
+            this.page = 1
386
+            arr.push(item.advices.length)
387
+            item.pageArr.push(arr)
388
+            
389
+          }else if(item.advices.length > 5){
390
+            this.page = parseInt(item.advices.length / 5)
391
+            let num = item.advices.length % 5
392
+            for (var i=0;i<this.page;i++){
393
+              item.pageArr.push([5])
394
+            }
395
+            if(num != 0){
396
+              item.pageArr.push([num])
397
+            }
398
+          }
399
+        })
400
+        // console.log('this.pageArr',this.pageArr)
401
+      },
402
+      getName(list) {
403
+        console.log('list',list)
404
+        let new_list = []
405
+        for (let i = 0; i < list.length; i++) {
406
+          if (list[i].aac031 == '1') {
407
+            new_list.push(list[i])
408
+          }
409
+        }
410
+
411
+        switch (new_list[0].bcc334) {
412
+          case "A31001":
413
+            return "深圳医保1档"
414
+            break
415
+          case "A31002":
416
+            return "深圳医保2档"
417
+
418
+            break
419
+          case "A31003":
420
+            return "深圳医保3档"
421
+
422
+            break
423
+          case "A31004":
424
+            return "二档(少儿)"
425
+
426
+            break
427
+          case "A31005":
428
+            return "学生二档"
429
+
430
+            break
431
+          case "A31006":
432
+            return "大学生二档"
433
+
434
+            break
435
+          case "A32001":
436
+            return "在职公务员"
437
+            break
438
+          case "A32002":
439
+            return "在职驻深公务员"
440
+
441
+            break
442
+          case "A39301":
443
+            return "家属统筹医疗"
444
+
445
+            break
446
+          case "A41001":
447
+            return "工伤在职"
448
+
449
+            break
450
+          case "A51001":
451
+            return "生育在职"
452
+
453
+            break
454
+          case "A52001":
455
+            return "生育医疗一档"
456
+
457
+            break
458
+          case "A52002":
459
+            return "生育医疗一档"
460
+
461
+            break
462
+          case "C31001":
463
+            return "一档医疗退休"
464
+
465
+            break
466
+          case "C31002":
467
+            return "二档医疗退休"
468
+            break
469
+
470
+        }
471
+
472
+
473
+
474
+      },
475
+
476
+   },
477
+   created(){
478
+      // this.getAllDoctorList()
479
+      this.getInitData()
480
+      // this.getPrescriptionPrint()
481
+      // this.getHisPatientDetail()
482
+      // this.getPatientCaseHistory()
483
+      var xtuser = this.$store.getters.xt_user;
484
+      this.orgname = xtuser.org.org_name;
485
+      this.org_id = this.$store.getters.xt_user.org_id
486
+     
487
+   },
488
+   watch:{
489
+     ids:function(val){
490
+      this.ids = val
491
+      this.getPrescriptionPrint()
492
+    }
493
+   }
494
+}
495
+</script>
496
+
497
+
498
+<style lang="scss" scoped>
499
+.prescription-print{
500
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
501
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset; 
502
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
503
+    margin-bottom: 20px;
504
+    padding:20px 10px;
505
+}
506
+.printTitle{
507
+    font-size: 22px;
508
+    text-align: center;
509
+    font-weight: bold;
510
+    margin-bottom: 10px;
511
+}
512
+.infoTitle{
513
+    display: flex;
514
+    margin-top:10px;
515
+    line-height: 24px;
516
+}
517
+.infoTitle div{
518
+    width: 200px;
519
+}
520
+.infoMain{
521
+    display: flex;
522
+    flex-wrap: wrap;
523
+    margin-top:10px;
524
+}
525
+.infoMain div{
526
+    width: 50%;
527
+    line-height: 24px;
528
+}
529
+.prescriptionBox{
530
+    padding:0 10px;
531
+    min-height:400px;
532
+}
533
+.Rp{
534
+    font-size: 22px;
535
+    font-weight: bold;
536
+}
537
+.drugsBox{
538
+    padding-left: 40px;
539
+    margin-bottom: 10px;
540
+}
541
+.drugsBox div{
542
+    line-height: 20px;
543
+}
544
+.drugsOne{
545
+    line-height: 24px;
546
+}
547
+.drugsOne span{
548
+    margin-right: 20px;
549
+}
550
+.doctorBox{
551
+    display: flex;
552
+    justify-content: space-between;
553
+    padding:0 10px;
554
+    line-height: 24px;
555
+    border-bottom: 2px solid #000;
556
+}
557
+.actionBar{
558
+    display: flex;
559
+    justify-content: space-between; 
560
+    line-height: 24px;
561
+    padding:0 10px;
562
+}
563
+.actionBar p{
564
+    width:150px;
565
+}
566
+.under_line{
567
+  display: inline-block;
568
+  border-bottom: 1px solid #000;
569
+  flex: 1;
570
+}
571
+</style>

+ 393 - 0
src/xt_pages/outpatientDoctorStation/batch_print_template/index.vue View File

@@ -0,0 +1,393 @@
1
+<template>
2
+  <div>
3
+      <!-- <template>
4
+        <el-button
5
+          style="float:right;"
6
+          :loading="loading"
7
+          size="small"
8
+          icon="el-icon-printer"
9
+          @click="printThisPage"
10
+          type="primary"
11
+          >打印</el-button
12
+        >
13
+      </template> -->
14
+
15
+    <div class='dialysisPage' style="padding-top:40px;">
16
+      <div v-if="org_id != 10138 && org_id != 10278">
17
+        <printOne v-if="org_id != 10088 && org_id != 10215" :printData="printData" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
18
+        <printFour v-if="org_id == 10088" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printFour>
19
+        <printFive v-if="org_id == 10215" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printFive>
20
+      </div>
21
+      <div v-else>
22
+        <printThree v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printThree>
23
+      </div>
24
+    </div>
25
+  </div>
26
+</template>
27
+
28
+<script>
29
+
30
+
31
+import { parseTime } from "@/utils";
32
+import { getDialysisRecord } from "@/api/dialysis";
33
+import { getDataConfig } from "@/utils/data";
34
+import { jsGetAge, uParseTime } from "@/utils/tools";
35
+
36
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
37
+import print from "print-js";
38
+import printOne from "./printOne"
39
+// import printThree from "./template/printThree"
40
+// import printFour from "./template/printFour"
41
+// import printFive from "./template/printFive"
42
+import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
43
+export default {
44
+  name: "dialysisPrintOrder",
45
+  components: {
46
+    BreadCrumb,
47
+    printOne
48
+  },
49
+  props:{
50
+    paramsObj:Object,
51
+    printData:Array
52
+  },
53
+  data() {
54
+    return {
55
+      crumbs: [
56
+        { path: false, name: '门诊医生站' },
57
+        { path: false, name: '打印' }
58
+      ],
59
+       record_date:"",
60
+       patientTableData:[],
61
+       advicePrint:[],
62
+       hisPatient:{},
63
+       patient:{},
64
+       doctorPorject:{},
65
+       search_input:"",
66
+       loading:false,
67
+       patient_id:"",
68
+       prescription_id:"",
69
+       ids:'',
70
+       paramsObj:{},
71
+       org_id:''
72
+    };
73
+  },
74
+  methods:{
75
+    printThisPage() {
76
+      var ptime = Math.round(new Date().getTime() / 1000);
77
+      this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
78
+
79
+      if(this.org_id == 10138 || this.org_id == 10278){
80
+        setTimeout(() => {
81
+          const style =
82
+          '@media print {#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 90%;}}}';
83
+          printJS({
84
+            printable: "prescriptionPrint1",
85
+            type: "html",
86
+            style: style,
87
+            scanStyles: false
88
+          });
89
+        },500)
90
+      }else{
91
+        const style =
92
+        '@media print {#prescription-print{font-size:14px;}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:10px;line-height: 1px; padding:0 10px;}.infoTitle p{width: 200px;font-size:14px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{padding:0 10px;min-height:450px;}.Rp{font-size: 22px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;} .drugsOne{line-height: 1px;} .drugsOne span{margin-right: 20px;} .doctorBox{display: flex; justify-content: space-between; padding:0 10px; line-height: 1px; border-bottom: 2px solid #000;} .actionBar{display: flex; justify-content: space-between; line-height: 1px; padding:0 10px;} .actionBar p{width:150px;}}';
93
+        printJS({
94
+          printable: "prescriptionPrint",
95
+          type: "html",
96
+          style: style,
97
+          scanStyles: false
98
+        });
99
+      }
100
+
101
+      // if (this.org_template_info.template_id == 1) {
102
+      //   printJS({
103
+      //     printable: "dialysis-print-box",
104
+      //     type: "html",
105
+      //     style: style,
106
+      //     scanStyles: false
107
+      //   });
108
+      // }
109
+    },
110
+    getAllDoctorList(){
111
+      getAllDoctorList().then(response=>{
112
+        if(response.data.state == 1){
113
+               var doctor =  response.data.data.doctor
114
+
115
+               this.doctorList = doctor
116
+             }
117
+         })
118
+     },
119
+    getAllHisPatientList(){
120
+         const params = {
121
+           record_date:this.record_date
122
+         }
123
+      getAllHisPatientList(params).then(response=>{
124
+         if(response.data.state == 1){
125
+            this.patientTableData = response.data.data.list
126
+            this.patientTableDataTwo = response.data.data.list
127
+
128
+            let cal_one = 0
129
+            let cal_two = 0
130
+            for (let i = 0; i < response.data.data.list.length; i++) {
131
+              if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
132
+                cal_one = cal_one + 1
133
+              }
134
+              if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
135
+                cal_two = cal_two + 1
136
+              }
137
+            }
138
+            // this.$refs.tab.setCurrentRow(this.patientTableData[0])
139
+            // console.log(this.patientTableData[0])
140
+            // this.choosePatient(this.patientTableData[0])
141
+            this.cal_one = cal_one
142
+            this.cal_two = cal_two
143
+         }
144
+      })
145
+    },
146
+
147
+    changePatient(row){
148
+      this.patient_id = row.patient_id
149
+      this.record_date = this.record_date
150
+      this.prescription_id = this.prescription_id
151
+      console.log("row",row)
152
+        // var params = {
153
+        //   patient_id:row.patient_id,
154
+        //   record_date:this.record_date,
155
+        //   prescription_id:this.prescription_id,
156
+        // }
157
+      // getPrescriptionPrint(params).then(response=>{
158
+      //     if(response.data.state == 1){
159
+      //       var advicePrint =  response.data.data.advicePrint
160
+      //       console.log("adviceprint",advicePrint)
161
+      //       this.advicePrint = advicePrint
162
+      //       var patient =  response.data.data.patient
163
+      //       console.log("patient",patient)
164
+      //       this.patient = patient
165
+      //       //  var hisPatient =  response.data.data.hisPatient
166
+      //       // console.log("hispatient",hisPatient)
167
+      //       // this.hisPatient = hisPatient
168
+      //       var doctorPorject = response.data.data.doctorPorject
169
+      //       console.log("doctorporject",doctorPorject)
170
+      //       this.doctorPorject = doctorPorject
171
+      //     }
172
+      // })
173
+    },
174
+    searchAction(){
175
+
176
+    }
177
+
178
+  },
179
+
180
+  created() {
181
+    this.org_id = this.$store.getters.xt_user.org_id
182
+    this.getAllDoctorList()
183
+    var record_date = this.paramsObj.record
184
+    this.record_date = record_date
185
+    console.log("record_date",record_date)
186
+    var prescription_id = this.paramsObj.prescription_id
187
+    this.prescription_id = prescription_id
188
+    this.patient_id = this.paramsObj.patient_id
189
+    this.ids = this.paramsObj.ids
190
+    // var record_date = this.$route.query.record
191
+    // this.record_date = record_date
192
+    // console.log("record_date",record_date)
193
+    // var prescription_id = this.$route.query.prescription_id
194
+    // this.prescription_id = prescription_id
195
+    this.getAllHisPatientList(record_date)
196
+  },
197
+  watch:{
198
+    // paramsObj:{//深度监听,可监听到对象、数组的变化
199
+    //   handler(val, oldVal){
200
+    //     this.paramsObj = val
201
+    //     this.patient_id = this.paramsObj.patient_id
202
+    //     var record_date = this.paramsObj.record
203
+    //     this.record_date = record_date
204
+    //     console.log("record_date",record_date)
205
+    //     var prescription_id = this.paramsObj.prescription_id
206
+    //     this.prescription_id = prescription_id
207
+    //     this.ids = this.paramsObj.ids
208
+    //   },
209
+    //   deep:true
210
+    // }
211
+  }
212
+
213
+};
214
+</script>
215
+
216
+<style>
217
+.dialysis-print-order {
218
+  width: 960px;
219
+  margin: 0 auto;
220
+}
221
+
222
+.dialysis-print-order .order-yy-name {
223
+  margin: auto;
224
+  text-align: center;
225
+  font-size: 20px;
226
+  letter-spacing: 5px;
227
+}
228
+
229
+.dialysis-print-order .order-title {
230
+  margin: auto;
231
+  font-weight: 600;
232
+  text-align: center;
233
+  font-size: 22px;
234
+  padding: 10px;
235
+}
236
+
237
+.dialysis-print-order .table-box {
238
+  width: 100%;
239
+  line-height: 23px;
240
+  font-size: 14px;
241
+}
242
+
243
+.dialysis-print-order .print-table {
244
+  width: 100%;
245
+  text-align: center;
246
+  border-collapse: collapse;
247
+  line-height: 40px;
248
+  font-size: 14px;
249
+  border-color: #000;
250
+}
251
+
252
+.dialysis-print-order .print-table-no {
253
+  width: 100%;
254
+  text-align: center;
255
+  border-collapse: collapse;
256
+  font-size: 14px;
257
+}
258
+
259
+.dialysis-print-order .under-line {
260
+  border-bottom: 1px solid #999;
261
+  width: 95%;
262
+  text-align: center;
263
+  margin-left: 2px;
264
+}
265
+
266
+.dialysis-print-order .title-box {
267
+  text-align: center;
268
+  font-size: 16px;
269
+}
270
+
271
+.dialysis-print-order .radio-lebel-box {
272
+  font-weight: 400;
273
+  cursor: pointer;
274
+}
275
+
276
+.dialysis-print-order .radio-no {
277
+  opacity: 0;
278
+  outline: none;
279
+  position: absolute;
280
+  margin: 0;
281
+  width: 0;
282
+  height: 0;
283
+  z-index: -1;
284
+}
285
+
286
+.dialysis-print-order .radio-inner {
287
+  white-space: nowrap;
288
+  cursor: pointer;
289
+  outline: none;
290
+  display: inline-block;
291
+  line-height: 1;
292
+  position: relative;
293
+  vertical-align: middle;
294
+}
295
+
296
+.dialysis-print-order .radio-fang {
297
+  display: inline-block;
298
+  position: relative;
299
+  border: 1px solid #000;
300
+  box-sizing: border-box;
301
+  width: 14px;
302
+  height: 14px;
303
+  background-color: #fff;
304
+  z-index: 1;
305
+  transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
306
+    background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
307
+}
308
+
309
+.dialysis-print-order .is-checked-radio::after {
310
+  content: "√";
311
+  font-size: 15px;
312
+}
313
+
314
+.dialysis-print-order .print-table-no tr td {
315
+  padding: 8px 5px;
316
+  line-height: 25px;
317
+}
318
+
319
+.dialysis-print-order .print-table tr td {
320
+  padding: 1px 1px;
321
+  /*line-height: 25px;*/
322
+}
323
+
324
+.es-img {
325
+  height: 30px;
326
+}
327
+
328
+.advice-name {
329
+  text-align: left;
330
+}
331
+
332
+.advice-children {
333
+  display: flex;
334
+}
335
+
336
+.title-box-pro {
337
+  border: 0 #fff;
338
+  line-height: 25px;
339
+  height: 25px;
340
+  text-align: left;
341
+  padding-left: 10px !important;
342
+}
343
+.title-box-pro-tr {
344
+  border: 0 #fff;
345
+}
346
+.text-align-left {
347
+  text-align: left !important;
348
+  padding-left: 10px !important;
349
+  font-size: 14px !important;
350
+  line-height: 25px;
351
+}
352
+.print-table-tr-new td {
353
+  line-height: 20px !important;
354
+}
355
+.border-top-solid {
356
+  border: solid 1px #000;
357
+}
358
+.print-template-two tr {
359
+  line-height: 30px;
360
+}
361
+
362
+.table-box1 {
363
+  border: 1px solid #000;
364
+  width: 100%;
365
+  line-height: 30px;
366
+  font-size: 14px;
367
+  border-collapse: collapse;
368
+}
369
+.table-box1 tr {
370
+  border-bottom: 1px solid #000;
371
+}
372
+</style>
373
+
374
+<style lang="scss">
375
+
376
+.newContainer{
377
+  .dialysisPage::-webkit-scrollbar {
378
+    height: 15px;
379
+  }
380
+
381
+  .el-date-editor{
382
+    .el-input__inner{
383
+      padding-right:0px;
384
+    }
385
+  }
386
+  .el-table td, .el-table th{
387
+    text-align: center;
388
+  }
389
+}
390
+.newContainer::-webkit-scrollbar{
391
+  height: 15px !important;
392
+}
393
+</style>

+ 344 - 0
src/xt_pages/outpatientDoctorStation/batch_print_template/printOne.vue View File

@@ -0,0 +1,344 @@
1
+<template>
2
+  <div id='prescriptionPrint'>
3
+    <div v-for="(i,index) in printData">
4
+      <div v-for="(item,index) in i.prescriptions" :key="index">
5
+        <div id='prescription-print' class="prescription-print" style="page-break-after: always;">
6
+            <div class="printTitle" v-if="item.med_type == '1111'">{{orgname}}第一类精神处方笺</div>
7
+            <div class="printTitle"  v-if="item.med_type == '1112'">{{orgname}}第二类精神处方笺</div>
8
+            <div class="printTitle" v-if="item.med_type != '1111' && item.med_type != '1112'">{{orgname}}处方笺</div>
9
+            <!--<div class="printTitle">{{orgname}}处方笺</div>-->
10
+            <div class="infoTitle">
11
+                <p>姓名:{{i.his_patient.id != 0?i.his_patient.name:i.name}}</p>
12
+                <p>性别:
13
+                  <span v-if="i.his_patient.id != 0">
14
+                    <span v-if="i.his_patient.gend == 1">男</span>
15
+                    <span v-if="i.his_patient.gend == 2">女</span>
16
+                  </span>
17
+                  <span v-else>
18
+                    <span v-if="i.gender == 1">男</span>
19
+                    <span v-if="i.gender == 2">女</span>
20
+                  </span>
21
+                </p>
22
+                <p>年龄:{{i.his_patient.id != 0?getAge(i.his_patient):i.age}}岁</p>
23
+            </div>
24
+            <div class="infoMain">
25
+                <div style="margin-bottom: 10px;">门诊号:{{i.his_patient.id != 0?i.his_patient.number:""}}</div>
26
+                <div style="margin-bottom: 10px;">科室:{{i.his_patient.id != 0?getDepart(i.his_patient.departments):''}}</div>
27
+                <div style="margin-bottom: 10px;">医保卡号:{{i.his_patient.id != 0?i.his_patient.id_card_no:""}}</div>
28
+                <div style="margin-bottom: 10px;" v-if="org_id != 10188">电话:{{i.his_patient.id != 0 ? i.his_patient.phone_number : i.phone}}</div>
29
+                <div style="margin-bottom: 10px;" v-else>日期:{{getTime(i.info.ctime)?getTime(i.info.ctime):""}}</div>
30
+                <div>地址:{{i.home_address}}</div>
31
+                <div style="display:flex;width:50%;">临床诊断:{{getDiagnosis(i.info.diagnosis)}}</div>
32
+            </div>
33
+            <div class="prescriptionBox">
34
+                <div class="Rp">Rp:</div>
35
+                <div class="drugsBox" v-for="(it,index) in item.advices" :key="index">
36
+                    <!-- <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{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> -->
37
+                    <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;<span v-if="it.drug.min_unit != it.drug.dose_unit">{{it.drug.dose}}{{it.drug.dose_unit}}&nbsp;* &nbsp;</span>{{it.drug.min_number}}{{it.drug.min_unit}}/{{it.drug.max_unit}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</div>
38
+                    <div style="margin-left:100px;"><span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.execution_frequency}}&nbsp;{{it.delivery_way}}&nbsp;</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
39
+                </div>
40
+                <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
41
+                  <div class="drugsOne">{{it.item_name?it.item_name:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
42
+                </div>
43
+
44
+                <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
45
+                    <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.type == 2?getProjectName(it.project_id)?getProjectName(it.project_id):"":it.good_info.good_name}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</div>
46
+                    <div style="margin-left:100px;"><span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.delivery_way}}</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
47
+                </div>
48
+                <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
49
+                  <div class="drugsOne">{{it.project_id?it.project_id:""}}:&nbsp;{{it.price.toFixed(2)}}元/{{it.count}}次</div>
50
+                </div>
51
+                <div style="text-align:center;" >(以下空白)</div>
52
+
53
+            </div>
54
+            <div class="doctorBox" v-if="org_id != 10188">
55
+                <p>医师:{{i.info.doctor?i.info.doctor:""}}</p>
56
+                <p>日期:{{getTime(i.info.ctime)?getTime(i.info.ctime):""}}</p>
57
+            </div>
58
+            <div class="doctorBox" v-else>
59
+              <p>药师:</p>
60
+              <p>医师:{{i.info.doctor?i.info.doctor:""}}</p>
61
+            </div>
62
+            <div class="actionBar" v-if="org_id != 10188">
63
+                  <!-- <p>审核:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
64
+                  <p>配对:</p>
65
+                  <p>核对:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
66
+                  <p>发药:{{getDoctor(item.advices[0].execution_staff)?getDoctor(item.advices[0].execution_staff):""}}</p>
67
+                  <p>药费:{{getTotalOne(item.id)?getTotalOne(item.id):0}}元</p> -->
68
+
69
+                  <p>审核:</p>
70
+                  <p>配对:</p>
71
+                  <p>核对:</p>
72
+                  <p>发药:</p>
73
+                  <p>药费:{{getTotalOne(item.advices).toFixed(2)?getTotalOne(item.advices).toFixed(2):0}}元</p>
74
+  <!--            <p>药费:466.2元</p>-->
75
+
76
+            </div>
77
+            <div class="actionBar" v-else>
78
+              <p style="visibility: hidden;">审核:</p>
79
+              <p style="visibility: hidden;">配对:</p>
80
+              <p style="visibility: hidden;">核对:</p>
81
+              <p style="visibility: hidden;">发药:</p>
82
+              <p>药费:{{getTotalOne(item.advices).toFixed(2)?getTotalOne(item.advices).toFixed(2):0}}元</p>
83
+  <!--            <p>药费:551.2元</p>-->
84
+  <!--            <p>药费:466.2元</p>-->
85
+
86
+
87
+            </div>
88
+            <div style="page-break-after:always"></div>
89
+        </div>
90
+      </div>
91
+    </div>
92
+  </div>
93
+
94
+
95
+</template>
96
+<script>
97
+import { jsGetAge, uParseTime } from '@/utils/tools'
98
+import {getAllDoctorList,getPrescriptionPrint,getHisPatientDetail} from "@/api/project/project"
99
+import {getInitData} from "@/api/his/his"
100
+export default {
101
+    props:{
102
+      patient_id:Number,
103
+      record_date:String,
104
+      prescription_id:Number,
105
+      ids:String,
106
+      printData:Array
107
+    },
108
+    data(){
109
+      return {
110
+        doctorList:[],
111
+        advicePrint:{},
112
+        patient:{},
113
+        tableData:[],
114
+        prescriptionInfo:[],
115
+        hisPatient:{},
116
+        department:[],
117
+        prescriptions:[],
118
+        projectList:[],
119
+        orgname:"",
120
+        diagnoses:[],
121
+        org_id: 0
122
+      }
123
+    },
124
+   methods:{
125
+     getAge(patient){
126
+       var thisLen = patient.id_card_no.length
127
+       var birth = ''
128
+       if (thisLen == 15) {
129
+         birth = '19' + patient.id_card_no.substr(6, 6)
130
+       } else {
131
+         birth = patient.id_card_no.substr(6, 8)
132
+       }
133
+       var births =
134
+         birth.substr(0, 4) +
135
+         '-' +
136
+         birth.substr(4, 2) +
137
+         '-' +
138
+         birth.substr(6, 2)
139
+       return jsGetAge(births, '-')
140
+
141
+     },
142
+
143
+     getAllDoctorList(){
144
+      getAllDoctorList().then(response=>{
145
+        if(response.data.state == 1){
146
+               var doctor =  response.data.data.doctor
147
+
148
+               this.doctorList = doctor
149
+             }
150
+         })
151
+     },
152
+
153
+      getDoctor(id){
154
+        var name = ""
155
+        for(let i=0;i<this.doctorList.length;i++){
156
+          if(id == this.doctorList[i].admin_user_id){
157
+              name = this.doctorList[i].user_name
158
+          }
159
+        }
160
+        return name
161
+      },
162
+      getTime(value, temp) {
163
+        if (value != undefined) {
164
+            return uParseTime(value, temp)
165
+        }
166
+        return ''
167
+     },
168
+       getPrescriptionPrint(){
169
+         var params = {
170
+          // patient_id:this.patient_id,
171
+          // record_date:this.record_date,
172
+          // prescription_id:this.prescription_id,
173
+          patient_id:this.patient_id,
174
+          record_date:this.record_date,
175
+          prescription_id:this.prescription_id,
176
+          ids:this.ids
177
+        }
178
+        console.log("params",params)
179
+       getPrescriptionPrint(params).then(response=>{
180
+         if(response.data.state == 1){
181
+            var advicePrint =  response.data.data.advicePrint
182
+            console.log("adviceprint9999",advicePrint)
183
+            this.advicePrint = advicePrint
184
+            this.prescriptions = advicePrint
185
+            console.log("处方222222",this.prescriptions)
186
+            var hisPatient = response.data.data.hisPatient
187
+            console.log("hisPatient",hisPatient)
188
+            this.hisPatient = hisPatient
189
+            var projectlist =  response.data.data.projectlist
190
+            console.log("所有项目列表",projectlist)
191
+            this.projectList = projectlist
192
+          }
193
+       })
194
+     },
195
+     getHisPatientDetail(){
196
+          const params = {
197
+              patient_id:this.patient_id
198
+          }
199
+       getHisPatientDetail(params).then(response=>{
200
+          if(response.data.state == 1){
201
+             var hisPatient =  response.data.data.hisPatient
202
+             console.log("挂号病人",hisPatient)
203
+             this.hisPatient = hisPatient
204
+          }
205
+       })
206
+     },
207
+     getInitData(){
208
+       getInitData().then(response=>{
209
+          if(response.data.state == 1){
210
+            this.department = response.data.data.department
211
+            this.diagnoses = response.data.data.diagnose
212
+            console.log("争端",this.diagnoses)
213
+          }
214
+       })
215
+     },
216
+     getDepart(id){
217
+         var name = ""
218
+       for(let i=0;i<this.department.length;i++){
219
+           if(id == this.department[i].id){
220
+               name = this.department[i].name
221
+           }
222
+       }
223
+       return name
224
+     },
225
+    getTotalOne(advices) {
226
+      let total = 0
227
+      advices.map(item => {
228
+        total += item.price * item.prescribing_number
229
+      })
230
+      return total
231
+    },
232
+
233
+     getProjectName(id){
234
+        var project_name = ""
235
+        for(let i=0;i<this.projectList.length;i++){
236
+           if(id == this.projectList[i].id){
237
+               project_name = this.projectList[i].project_name
238
+           }
239
+        }
240
+        return project_name
241
+     },
242
+
243
+     getDiagnosis(id){
244
+        var name = ""
245
+        for(let i=0;i<this.diagnoses.length;i++){
246
+          if(id == this.diagnoses[i].id){
247
+             name = this.diagnoses[i].class_name
248
+          }
249
+        }
250
+        return name
251
+     }
252
+
253
+   },
254
+   created(){
255
+      console.log('this.printData',this.printData)
256
+      // this.getAllDoctorList()
257
+      this.getInitData()
258
+      // this.getPrescriptionPrint()
259
+      // this.getHisPatientDetail()
260
+      var xtuser = this.$store.getters.xt_user;
261
+      this.orgname = xtuser.org.org_name;
262
+      this.org_id = xtuser.org.id
263
+   },
264
+   watch:{
265
+     ids:function(val){
266
+      this.ids = val
267
+      // this.getPrescriptionPrint()
268
+    }
269
+   }
270
+}
271
+</script>
272
+
273
+
274
+<style lang="scss" scoped>
275
+.prescription-print{
276
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
277
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
278
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
279
+    margin-bottom: 20px;
280
+    padding:20px 10px;
281
+}
282
+.printTitle{
283
+    font-size: 22px;
284
+    text-align: center;
285
+    font-weight: bold;
286
+}
287
+.infoTitle{
288
+    display: flex;
289
+    border-bottom: 2px solid #000;
290
+    margin-top:10px;
291
+    line-height: 24px;
292
+    padding:0 10px;
293
+}
294
+.infoTitle p{
295
+    width: 200px;
296
+}
297
+.infoMain{
298
+    display: flex;
299
+    flex-wrap: wrap;
300
+    border-bottom: 2px solid #000;
301
+    padding:0 10px;
302
+}
303
+.infoMain div{
304
+    width: 50%;
305
+    line-height: 24px;
306
+}
307
+.prescriptionBox{
308
+    padding:0 10px;
309
+    min-height:450px;
310
+}
311
+.Rp{
312
+    font-size: 22px;
313
+    font-weight: bold;
314
+}
315
+.drugsBox{
316
+    padding-left: 40px;
317
+    margin-bottom: 10px;
318
+}
319
+.drugsBox div{
320
+    line-height: 20px;
321
+}
322
+.drugsOne{
323
+    line-height: 24px;
324
+}
325
+.drugsOne span{
326
+    margin-right: 20px;
327
+}
328
+.doctorBox{
329
+    display: flex;
330
+    justify-content: space-between;
331
+    padding:0 10px;
332
+    line-height: 24px;
333
+    border-bottom: 2px solid #000;
334
+}
335
+.actionBar{
336
+    display: flex;
337
+    justify-content: space-between;
338
+    line-height: 24px;
339
+    padding:0 10px;
340
+}
341
+.actionBar p{
342
+    width:150px;
343
+}
344
+</style>

+ 378 - 0
src/xt_pages/outpatientDoctorStation/batch_print_treatTemplate/index.vue View File

@@ -0,0 +1,378 @@
1
+<template>
2
+  <div>
3
+       <!-- <template>
4
+        <el-button
5
+          style="float:right;"
6
+          :loading="loading"
7
+          size="small"
8
+          icon="el-icon-printer"
9
+          @click="printThisPage"
10
+          type="primary"
11
+          >打印</el-button
12
+        >
13
+      </template> -->
14
+            
15
+      <div class='dialysisPage' style="padding-top:40px;">
16
+        <printOne v-if="org_id != 10138 && org_id != 10278" :printData="printData" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
17
+        <printTwo v-else :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printTwo>
18
+      </div>
19
+  </div>
20
+</template>
21
+
22
+<script>
23
+
24
+
25
+import { parseTime } from "@/utils";
26
+import { getDialysisRecord } from "@/api/dialysis";
27
+import { getDataConfig } from "@/utils/data";
28
+import { jsGetAge, uParseTime } from "@/utils/tools";
29
+
30
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
31
+import print from "print-js";
32
+import printOne from "./printOne"
33
+// import printTwo from "./printTwo"
34
+import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
35
+export default {
36
+  name: "dialysisPrintOrder",
37
+  components: {
38
+    BreadCrumb,
39
+    printOne
40
+  },
41
+  props:{
42
+    paramsObj:Object,
43
+    printData:Array
44
+  },
45
+  data() {
46
+    return {
47
+      crumbs: [
48
+        { path: false, name: '门诊医生站' },
49
+        { path: false, name: '打印' }
50
+      ],
51
+      record_date:"",
52
+      patientTableData:[],
53
+      advicePrint:[],
54
+      hisPatient:{},
55
+      patient:{},
56
+      search_input:"",
57
+      loading:false,
58
+      patient_id:0,
59
+      prescription_id:0,
60
+      ids:''
61
+    };
62
+  },
63
+  methods:{
64
+    printThisPage() {
65
+      var ptime = Math.round(new Date().getTime() / 1000);
66
+      this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
67
+
68
+      if(this.org_id == 10138 || this.org_id == 10278){
69
+        setTimeout(() => {
70
+          const style =
71
+          '@media print {#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 90%;}}}';
72
+          printJS({
73
+            printable: "prescriptionPrint2",
74
+            type: "html",
75
+            style: style,
76
+            scanStyles: false
77
+          });
78
+        },500)
79
+        
80
+      }else{
81
+        const style =
82
+        '@media print {#prescription-print{font-size:14px;}.prescription-print:last-child {page-break-after: auto;}.prescription-print{font-size: 14px;}.printTitle{font-size: 18px;text-align: center;font-weight: bold;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:5px;padding:0 10px;}.infoTitle div{width: 300px;margin-bottom:5px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain div{width: 50%;}.prescriptionBox{padding:0 10px;min-height:380px;}.Rp{font-size: 22px;font-weight: bold;line-height:1px;}.drugsBox{padding-left: 40px;margin-bottom: 10px;margin-bottom: 10px;}.drugsBox p{line-height: 1px;padding-bottom:10px !important;} .drugsOne{line-height: 1px;margin-bottom:10px !important;} .drugsOne span{margin-right: 20px;} .doctorBox{display: flex; justify-content: space-between; padding:0 10px; border-bottom: 2px solid #000;} .actionBar{display: flex; justify-content: space-between; padding:0 10px;margin:5px 0;} .actionBar div{width:150px;}}';
83
+        printJS({
84
+          printable: "prescriptionPrint",
85
+          type: "html",
86
+          style: style,
87
+          scanStyles: false
88
+        });
89
+      }
90
+      
91
+
92
+      // if (this.org_template_info.template_id == 1) {
93
+      //   printJS({
94
+      //     printable: "dialysis-print-box",
95
+      //     type: "html",
96
+      //     style: style,
97
+      //     scanStyles: false
98
+      //   });
99
+      // }
100
+    },
101
+    getAllDoctorList(){
102
+      getAllDoctorList().then(response=>{
103
+        if(response.data.state == 1){
104
+               var doctor =  response.data.data.doctor
105
+               
106
+               this.doctorList = doctor
107
+             }
108
+         })   
109
+     },
110
+    getAllHisPatientList(){
111
+         const params = {
112
+           record_date:this.record_date
113
+         }
114
+      getAllHisPatientList(params).then(response=>{
115
+         if(response.data.state == 1){
116
+            this.patientTableData = response.data.data.list
117
+            this.patientTableDataTwo = response.data.data.list
118
+
119
+            console.log('222', this.patientTableData)
120
+            let cal_one = 0
121
+            let cal_two = 0
122
+            for (let i = 0; i < response.data.data.list.length; i++) {
123
+              if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
124
+                cal_one = cal_one + 1
125
+              }
126
+              if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
127
+                cal_two = cal_two + 1
128
+              }
129
+            }
130
+            // this.$refs.tab.setCurrentRow(this.patientTableData[0])
131
+            // console.log(this.patientTableData[0])
132
+            // this.choosePatient(this.patientTableData[0])
133
+            this.cal_one = cal_one
134
+            this.cal_two = cal_two   
135
+         }
136
+      })
137
+    },
138
+
139
+    changePatient(row){
140
+      console.log("row",row)
141
+      this.patient_id = row.patient_id
142
+      this.record_date = this.record_date
143
+      this.prescription_id = this.prescription_id
144
+      //   var params = {
145
+      //     patient_id:row.patient_id,
146
+      //     record_date:this.record_date,
147
+      //     prescription_id:this.prescription_id,
148
+      //   }
149
+      // getPrescriptionPrint(params).then(response=>{
150
+      //     if(response.data.state == 1){
151
+      //       var advicePrint =  response.data.data.advicePrint
152
+      //       console.log("adviceprint",advicePrint)
153
+      //       this.advicePrint = advicePrint
154
+      //       // var hisPatient =  response.data.data.hisPatient
155
+      //       // console.log("hispatient",hisPatient)
156
+      //       // this.hisPatient = hisPatient
157
+      //       var patient =  response.data.data.patient
158
+      //       console.log("patient",patient)
159
+      //       this.patient = patient
160
+      //       var doctorPorject = response.data.data.doctorPorject
161
+      //       console.log("doctorporject",doctorPorject)
162
+      //     }
163
+      // })
164
+    },
165
+    searchAction(){
166
+
167
+    }
168
+    
169
+  },
170
+
171
+  created() {
172
+    this.org_id = this.$store.getters.xt_user.org_id
173
+    this.getAllDoctorList()
174
+    var record_date = this.paramsObj.record
175
+    this.record_date = record_date
176
+    console.log("record_date",record_date)
177
+    this.prescription_id = this.paramsObj.prescription_id
178
+    this.patient_id = this.paramsObj.patient_id
179
+    this.ids = this.paramsObj.ids
180
+    this.getAllHisPatientList(record_date)
181
+  },
182
+  watch:{
183
+    paramsObj:{//深度监听,可监听到对象、数组的变化
184
+      handler(val, oldVal){
185
+        this.paramsObj = val
186
+        this.patient_id = this.paramsObj.patient_id
187
+        var record_date = this.paramsObj.record
188
+        this.record_date = record_date
189
+        var prescription_id = this.paramsObj.prescription_id
190
+        this.prescription_id = prescription_id
191
+        this.ids = this.paramsObj.ids
192
+        
193
+      },
194
+      deep:true
195
+    }
196
+  }
197
+
198
+};
199
+</script>
200
+
201
+<style>
202
+.dialysis-print-order {
203
+  width: 960px;
204
+  margin: 0 auto;
205
+}
206
+
207
+.dialysis-print-order .order-yy-name {
208
+  margin: auto;
209
+  text-align: center;
210
+  font-size: 20px;
211
+  letter-spacing: 5px;
212
+}
213
+
214
+.dialysis-print-order .order-title {
215
+  margin: auto;
216
+  font-weight: 600;
217
+  text-align: center;
218
+  font-size: 22px;
219
+  padding: 10px;
220
+}
221
+
222
+.dialysis-print-order .table-box {
223
+  width: 100%;
224
+  line-height: 23px;
225
+  font-size: 14px;
226
+}
227
+
228
+.dialysis-print-order .print-table {
229
+  width: 100%;
230
+  text-align: center;
231
+  border-collapse: collapse;
232
+  line-height: 40px;
233
+  font-size: 14px;
234
+  border-color: #000;
235
+}
236
+
237
+.dialysis-print-order .print-table-no {
238
+  width: 100%;
239
+  text-align: center;
240
+  border-collapse: collapse;
241
+  font-size: 14px;
242
+}
243
+
244
+.dialysis-print-order .under-line {
245
+  border-bottom: 1px solid #999;
246
+  width: 95%;
247
+  text-align: center;
248
+  margin-left: 2px;
249
+}
250
+
251
+.dialysis-print-order .title-box {
252
+  text-align: center;
253
+  font-size: 16px;
254
+}
255
+
256
+.dialysis-print-order .radio-lebel-box {
257
+  font-weight: 400;
258
+  cursor: pointer;
259
+}
260
+
261
+.dialysis-print-order .radio-no {
262
+  opacity: 0;
263
+  outline: none;
264
+  position: absolute;
265
+  margin: 0;
266
+  width: 0;
267
+  height: 0;
268
+  z-index: -1;
269
+}
270
+
271
+.dialysis-print-order .radio-inner {
272
+  white-space: nowrap;
273
+  cursor: pointer;
274
+  outline: none;
275
+  display: inline-block;
276
+  line-height: 1;
277
+  position: relative;
278
+  vertical-align: middle;
279
+}
280
+
281
+.dialysis-print-order .radio-fang {
282
+  display: inline-block;
283
+  position: relative;
284
+  border: 1px solid #000;
285
+  box-sizing: border-box;
286
+  width: 14px;
287
+  height: 14px;
288
+  background-color: #fff;
289
+  z-index: 1;
290
+  transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
291
+    background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
292
+}
293
+
294
+.dialysis-print-order .is-checked-radio::after {
295
+  content: "√";
296
+  font-size: 15px;
297
+}
298
+
299
+.dialysis-print-order .print-table-no tr td {
300
+  padding: 8px 5px;
301
+  line-height: 25px;
302
+}
303
+
304
+.dialysis-print-order .print-table tr td {
305
+  padding: 1px 1px;
306
+  /*line-height: 25px;*/
307
+}
308
+
309
+.es-img {
310
+  height: 30px;
311
+}
312
+
313
+.advice-name {
314
+  text-align: left;
315
+}
316
+
317
+.advice-children {
318
+  display: flex;
319
+}
320
+
321
+.title-box-pro {
322
+  border: 0 #fff;
323
+  line-height: 25px;
324
+  height: 25px;
325
+  text-align: left;
326
+  padding-left: 10px !important;
327
+}
328
+.title-box-pro-tr {
329
+  border: 0 #fff;
330
+}
331
+.text-align-left {
332
+  text-align: left !important;
333
+  padding-left: 10px !important;
334
+  font-size: 14px !important;
335
+  line-height: 25px;
336
+}
337
+.print-table-tr-new td {
338
+  line-height: 20px !important;
339
+}
340
+.border-top-solid {
341
+  border: solid 1px #000;
342
+}
343
+.print-template-two tr {
344
+  line-height: 30px;
345
+}
346
+
347
+.table-box1 {
348
+  border: 1px solid #000;
349
+  width: 100%;
350
+  line-height: 30px;
351
+  font-size: 14px;
352
+  border-collapse: collapse;
353
+}
354
+.table-box1 tr {
355
+  border-bottom: 1px solid #000;
356
+}
357
+</style>
358
+
359
+<style lang="scss">
360
+
361
+.newContainer{
362
+  .dialysisPage::-webkit-scrollbar {
363
+    height: 15px;
364
+  }
365
+  
366
+  .el-date-editor{
367
+    .el-input__inner{
368
+      padding-right:0px;
369
+    }
370
+  }
371
+  .el-table td, .el-table th{
372
+    text-align: center;
373
+  }
374
+}
375
+.newContainer::-webkit-scrollbar{
376
+  height: 15px !important;
377
+}
378
+</style>

+ 495 - 0
src/xt_pages/outpatientDoctorStation/batch_print_treatTemplate/printOne.vue View File

@@ -0,0 +1,495 @@
1
+<template>
2
+    <div id='prescriptionPrint'>
3
+      <div v-for="(i,index) in printData">
4
+        <div id='prescription-print' class="prescription-print" v-for="(item,index) in i.prescriptions" :key="index">
5
+
6
+            <div style="display:flex;justify-content: space-between;font-weight:bold;align-items:center;">
7
+                <div style="width:200px;display:flex;justify-content: space-between;font-weight:bold;">
8
+                    <span>费别</span>
9
+                    <span>自费</span>
10
+                    <span>公费</span>
11
+                    <span>保险</span>
12
+                    <span>其他</span>
13
+                </div>
14
+                <div>就诊日期:{{getTime(i.info.ctime,'{y}-{m}-{d}')}}</div>
15
+            </div>
16
+
17
+            <div class="printTitle">{{orgname}}</div>
18
+            <div class="printTitle">处方、治疗单</div>
19
+
20
+            <div class="infoTitle">
21
+                <div>门诊编号:</div>
22
+                <div>电脑号:</div>
23
+            </div>
24
+
25
+            <div class="infoMain">
26
+                <div style="margin-bottom: 10px;width:25%">姓名:{{i.his_patient.id != 0?i.his_patient.name:i.name}}</div>
27
+                <div style="margin-bottom: 10px;width:25%">性别:
28
+                    <span v-if="i.his_patient.id != 0">
29
+                    <span v-if="i.his_patient.gend == 1">男</span>
30
+                    <span v-if="i.his_patient.gend == 2">女</span>
31
+                  </span>
32
+                  <span v-else>
33
+                    <span v-if="i.gender == 1">男</span>
34
+                    <span v-if="i.gender == 2">女</span>
35
+                  </span>
36
+                </div>
37
+                <div style="margin-bottom: 10px;width:25%">年龄:
38
+                    <span>{{i.his_patient.id != 0?getAge(i.his_patient):i.age}}</span>
39
+                </div>
40
+                <div style="margin-bottom: 10px;width:25%">参保类型:{{i.his_patient.id != 0?i.his_patient.social_type:''}}
41
+                </div>
42
+                <div style="margin-bottom: 10px;width:50%;">联系电话:{{i.his_patient.id != 0 ? i.his_patient.phone_number : i.phone}}</div>
43
+                <div style="width:50%;">地址:{{i.home_address}}</div>
44
+                <div style="width:100%;">诊断:{{getDiagnosis(i.info.diagnosis)}}</div>
45
+            </div>
46
+
47
+            <div class="prescriptionBox">
48
+                <table style="width:100%;text-align:center;line-height:25px;">
49
+                    <tr>
50
+                        <td>序号</td>
51
+                        <td>项目名称</td>
52
+                        <td>数量</td>
53
+                        <td>单位</td>
54
+                        <td>单价</td>
55
+                        <td>部位</td>
56
+                        <td>备注</td>
57
+                        <td>天数</td>
58
+                    </tr>
59
+                    <tr v-for="(it,index) in item.project" :key="index">
60
+                        <td>{{index+1}}</td>
61
+                        <td>{{it.type == 2 ? it.project.project_name : it.good_info.good_name}}</td>
62
+                        <td>{{it.count}}</td>
63
+                        <td>{{getUnit(it.unit)}}</td>
64
+                        <td>{{it.price.toFixed(2)}}</td>
65
+                        <td></td>
66
+                        <td>{{it.remark}}</td>
67
+                        <td>{{it.day}}</td>
68
+
69
+                    </tr>
70
+
71
+                    <tr v-for="(it,index) in item.advices" :key="index">
72
+                        <td>{{index+1}}</td>
73
+                        <td>{{it.advice_name?it.advice_name:''}}</td>
74
+                        <td>{{it.single_dose?it.single_dose:''}}</td>
75
+                        <td>{{it.single_dose_unit?it.single_dose_unit:''}}</td>
76
+                        <td>{{it.price.toFixed(2)}}</td>
77
+                        <td></td>
78
+                        <td>{{it.remark}}</td>
79
+                        <td>{{it.day}}</td>
80
+
81
+                    </tr>
82
+                </table>
83
+            </div>
84
+
85
+            <div class="infoTitle">
86
+                <div>开单医生:{{i.info.doctor?i.info.doctor:''}}</div>
87
+                <div>签章:</div>
88
+            </div>
89
+
90
+            <div class="actionBar">
91
+                <div>执行医生:{{i.info.doctor?i.info.doctor:''}}</div>
92
+                <div>费用:{{getTotalOne(item.project).toFixed(2)?getTotalOne(item.project).toFixed(2):''}}元</div>
93
+            </div>
94
+
95
+            <table style="width:100%;text-align:center;line-height:25px;border-collapse: collapse;" border="1">
96
+                <tr>
97
+                    <td style="width:16%;">治疗时间</td>
98
+                    <td style="width:16%;"></td>
99
+                    <td style="width:16%;"></td>
100
+                    <td style="width:16%;"></td>
101
+                    <td style="width:16%;"></td>
102
+                    <td style="width:16%;"></td>
103
+                </tr>
104
+                <tr>
105
+                    <td style="width:16%;">医生签字</td>
106
+                    <td style="width:16%;"></td>
107
+                    <td style="width:16%;"></td>
108
+                    <td style="width:16%;"></td>
109
+                    <td style="width:16%;"></td>
110
+                    <td style="width:16%;"></td>
111
+                </tr>
112
+                <tr>
113
+                    <td style="width:16px;">患者签字</td>
114
+                    <td style="width:16px;"></td>
115
+                    <td style="width:16px;"></td>
116
+                    <td style="width:16px;"></td>
117
+                    <td style="width:16px;"></td>
118
+                    <td style="width:16px;"></td>
119
+                </tr>
120
+            </table>
121
+        </div>
122
+
123
+
124
+        <!-- <div id='prescriptionPrint'>
125
+
126
+            <div v-for="(item,index) in advicePrint" :key="index">
127
+                <div id='prescription-print' class="prescription-print" style="page-break-after: always;">
128
+                    <div style="display:flex;justify-content: space-between;font-weight:bold;">
129
+                        <div style="width:200px;display:flex;justify-content: space-between;font-weight:bold;">
130
+                            <span>费别</span>
131
+                            <span>自费</span>
132
+                            <span>公费</span>
133
+                            <span>保险</span>
134
+                            <span>其他</span>
135
+                        </div>
136
+                        <div>就诊日期:{{getTime(item.ctime)}}</div>
137
+                    </div>
138
+
139
+                    <div class="printTitle">血液透析中心</div>
140
+
141
+                    <div class="printTitle">处方、治疗单</div>
142
+
143
+                    <div class="infoTitle">
144
+                        <div>门诊编号:</div>
145
+                        <div>电脑号:</div>
146
+                    </div>
147
+
148
+                    <div class="infoMain">
149
+                        <div style="margin-bottom: 10px;width:25%">姓名:{{item.patient.name}}</div>
150
+                        <div style="margin-bottom: 10px;width:25%">性别:
151
+                            <span v-if="item.patient.gender == 1">男</span>
152
+                            <span v-if="item.patient.gender == 2">女</span>
153
+                        </div>
154
+                        <div style="margin-bottom: 10px;width:25%">年龄:
155
+                            <span>{{item.patient.age}}</span>
156
+                        </div>
157
+                        <div style="margin-bottom: 10px;width:25%">参保类型:</div>
158
+                        <div style="margin-bottom: 10px;width:50%;">联系电话:{{item.patient.phone}}</div>
159
+                        <div style="width:50%;">地址:{{item.patient.unit_address}}</div>
160
+                        <div style="width:100%;">诊断:{{item.patient.diagnose}}</div>
161
+                    </div>
162
+
163
+                    <div class="prescriptionBox">
164
+                        <table style="width:100%;text-align:center;line-height:25px;">
165
+                            <tr>
166
+                                <td>序号</td>
167
+                                <td>项目名称</td>
168
+                                <td>数量</td>
169
+                                <td>单位</td>
170
+                                <td>单价</td>
171
+                                <td>部位</td>
172
+                                <td>备注</td>
173
+                                <td>天数</td>
174
+                            </tr>
175
+                            <tr v-for="(it,index) in item.project" :key="index">
176
+                                <td>{{index+1}}</td>
177
+                                <td>{{getProjectName(it.project_id)}}</td>
178
+                                <td>{{it.single_dose}}</td>
179
+                                <td>{{getUnit(it.unit)}}</td>
180
+                                <td>{{it.price}}</td>
181
+                                <td></td>
182
+                                <td>{{it.remark}}</td>
183
+                                <td>{{it.day}}</td>
184
+
185
+                            </tr>
186
+                        </table>
187
+                    </div>
188
+                    <div class="infoTitle">
189
+                        <div>开单医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</div>
190
+                        <div>签章:</div>
191
+                    </div>
192
+                    <div class="actionBar">
193
+                        <div>执行医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</div>
194
+                        <div>费用:</div>
195
+                    </div>
196
+                    <table style="width:100%;text-align:center;line-height:25px;border-collapse: collapse;" border="1">
197
+                        <tr>
198
+                            <td style="width:16%;">治疗时间</td>
199
+                            <td style="width:16%;"></td>
200
+                            <td style="width:16%;"></td>
201
+                            <td style="width:16%;"></td>
202
+                            <td style="width:16%;"></td>
203
+                            <td style="width:16%;"></td>
204
+                        </tr>
205
+                        <tr>
206
+                            <td style="width:16%;">医生签字</td>
207
+                            <td style="width:16%;"></td>
208
+                            <td style="width:16%;"></td>
209
+                            <td style="width:16%;"></td>
210
+                            <td style="width:16%;"></td>
211
+                            <td style="width:16%;"></td>
212
+                        </tr>
213
+                        <tr>
214
+                            <td style="width:16px;">患者签字</td>
215
+                            <td style="width:16px;"></td>
216
+                            <td style="width:16px;"></td>
217
+                            <td style="width:16px;"></td>
218
+                            <td style="width:16px;"></td>
219
+                            <td style="width:16px;"></td>
220
+                        </tr>
221
+                    </table>
222
+                </div>
223
+
224
+            </div>
225
+
226
+        </div> -->
227
+      </div>
228
+    </div>
229
+</template>
230
+<script>
231
+  import { jsGetAge, uParseTime } from '@/utils/tools'
232
+  import { getAllDoctorList, getPrescriptionPrint } from '@/api/project/project'
233
+  import { getInitData } from '@/api/his/his'
234
+
235
+  export default {
236
+    props: {
237
+      patient_id: Number,
238
+      record_date: String,
239
+      prescription_id: Number,
240
+      ids: String,
241
+      printData:Array
242
+    },
243
+    data() {
244
+      return {
245
+        doctorList: [],
246
+        advicePrint: {},
247
+        patient: {},
248
+        tableData: [],
249
+        prescriptionInfo: [],
250
+        projectList: [],
251
+        prescriptions: [],
252
+        settlement:
253
+          [
254
+            { value: 1, label: '医保' },
255
+            { value: 2, label: '自费' },
256
+            { value: 3, label: '公费' },
257
+            { value: 4, label: '农保' },
258
+            { value: 5, label: '会员' },
259
+            { value: 6, label: '职工' },
260
+            { value: 7, label: '合同' },
261
+            { value: 8, label: '医保自费' }
262
+
263
+          ],
264
+        hisPatient: {},
265
+        diagnoses: []
266
+      }
267
+    },
268
+    methods: {
269
+      getAge(patient){
270
+        var thisLen = patient.id_card_no.length
271
+        var birth = ''
272
+        if (thisLen == 15) {
273
+          birth = '19' + patient.id_card_no.substr(6, 6)
274
+        } else {
275
+          birth = patient.id_card_no.substr(6, 8)
276
+        }
277
+        var births =
278
+          birth.substr(0, 4) +
279
+          '-' +
280
+          birth.substr(4, 2) +
281
+          '-' +
282
+          birth.substr(6, 2)
283
+        return jsGetAge(births, '-')
284
+
285
+      },
286
+      printThisPage() {
287
+        var ptime = Math.round(new Date().getTime() / 1000)
288
+        this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')
289
+
290
+        const style =
291
+          '@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;margin-top:10px;line-height: 1px;padding:0 10px;}.infoTitle p{width: 200px;}.otherInfo{display: flex;margin-top:10px;padding:0 10px;}.otherInfo span{display:inline-block;}.recordTitle{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;border-bottom: 2px solid #000;}.recordTitle p{width: 200px;}}'
292
+        printJS({
293
+          printable: 'prescription-print',
294
+          type: 'html',
295
+          style: style,
296
+          scanStyles: false
297
+        })
298
+      },
299
+      getAllDoctorList() {
300
+        getAllDoctorList().then(response => {
301
+          if (response.data.state == 1) {
302
+            var doctor = response.data.data.doctor
303
+
304
+            this.doctorList = doctor
305
+          }
306
+        })
307
+      },
308
+
309
+      getDoctor(id) {
310
+        var name = ''
311
+        for (let i = 0; i < this.doctorList.length; i++) {
312
+          if (id == this.doctorList[i].admin_user_id) {
313
+            name = this.doctorList[i].user_name
314
+          }
315
+        }
316
+        return name
317
+      },
318
+      getTime(value, temp) {
319
+        if (value != undefined) {
320
+          return uParseTime(value, temp)
321
+        }
322
+        return ''
323
+      },
324
+      getPrescriptionPrint() {
325
+        var params = {
326
+          patient_id: this.patient_id,
327
+          record_date: this.record_date,
328
+          prescription_id: this.prescription_id,
329
+          ids: this.ids
330
+        }
331
+        console.log('999999', params)
332
+        getPrescriptionPrint(params).then(response => {
333
+          if (response.data.state == 1) {
334
+            var advicePrint = response.data.data.advicePrint
335
+            console.log('adviceprint', advicePrint)
336
+            this.advicePrint = advicePrint
337
+            this.prescriptions = advicePrint
338
+            var projectlist = response.data.data.projectlist
339
+            console.log('所有项目列表', projectlist)
340
+            this.projectList = projectlist
341
+            this.hisPatient = response.data.data.hisPatient
342
+
343
+          }
344
+        })
345
+      },
346
+      getProjectName(id) {
347
+        var project_name = ''
348
+        for (let i = 0; i < this.projectList.length; i++) {
349
+          if (id == this.projectList[i].id) {
350
+            project_name = this.projectList[i].project_name
351
+          }
352
+        }
353
+        return project_name
354
+      },
355
+      getUnit(id) {
356
+        var unit = ''
357
+        for (let i = 0; i < this.projectList.length; i++) {
358
+          if (id == this.projectList[i].id) {
359
+            unit = this.projectList[i].unit
360
+          }
361
+        }
362
+        return unit
363
+      },
364
+
365
+      getTotalOne(project) {
366
+
367
+        let total = 0
368
+        project.map(item => {
369
+          total += item.price * item.count
370
+        })
371
+        return total
372
+      },
373
+      getInitData() {
374
+        getInitData().then(response => {
375
+          if (response.data.state == 1) {
376
+            this.diagnoses = response.data.data.diagnose
377
+            console.log('争端', this.diagnoses)
378
+          }
379
+        })
380
+      },
381
+      getDiagnosis(id) {
382
+        var name = ''
383
+        for (let i = 0; i < this.diagnoses.length; i++) {
384
+          if (id == this.diagnoses[i].id) {
385
+            name = this.diagnoses[i].class_name
386
+          }
387
+        }
388
+        return name
389
+      }
390
+    },
391
+    created() {
392
+      this.getInitData()
393
+      // this.getAllDoctorList()
394
+      // this.getPrescriptionPrint()
395
+      var xtuser = this.$store.getters.xt_user
396
+      this.orgname = xtuser.org.org_name
397
+
398
+    },
399
+    watch: {
400
+      // patient_id: function(val) {
401
+      //   console.log('101000010101010', this.patient_id, this.record_date, this.prescription_id)
402
+      //   //    this.getPrescriptionPrint()
403
+      // },
404
+      // ids: function(val) {
405
+      //   this.ids = val
406
+      //   console.log('this.idsids', this.ids)
407
+      //   this.getPrescriptionPrint()
408
+      // }
409
+    }
410
+  }
411
+</script>
412
+
413
+
414
+<style lang="scss" scoped>
415
+    .prescription-print {
416
+        -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
417
+        -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
418
+        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
419
+        margin-bottom: 20px;
420
+        padding: 20px 10px;
421
+    }
422
+
423
+    .prescription-print {
424
+        font-size: 14px;
425
+    }
426
+
427
+    .printTitle {
428
+        font-size: 18px;
429
+        text-align: center;
430
+        font-weight: bold;
431
+        margin-top: 10px;
432
+    }
433
+
434
+    .infoTitle {
435
+        display: flex;
436
+        border-bottom: 2px solid #000;
437
+        margin-top: 10px;
438
+        line-height: 24px;
439
+        padding: 0 10px;
440
+    }
441
+
442
+    .infoTitle div {
443
+        width: 300px;
444
+    }
445
+
446
+    .infoMain {
447
+        display: flex;
448
+        flex-wrap: wrap;
449
+        border-bottom: 2px solid #000;
450
+        padding: 0 10px;
451
+    }
452
+
453
+    .infoMain div {
454
+        width: 50%;
455
+        line-height: 24px;
456
+    }
457
+
458
+    .prescriptionBox {
459
+        padding: 0 10px;
460
+        min-height: 600px;
461
+    }
462
+
463
+    .Rp {
464
+        font-size: 22px;
465
+        font-weight: bold;
466
+    }
467
+
468
+    .drugsBox {
469
+        padding-left: 40px;
470
+        margin-bottom: 10px;
471
+    }
472
+
473
+    .drugsBox p {
474
+        line-height: 30px;
475
+    }
476
+
477
+    .drugsOne {
478
+        line-height: 24px;
479
+    }
480
+
481
+    .drugsOne span {
482
+        margin-right: 20px;
483
+    }
484
+
485
+    .actionBar {
486
+        display: flex;
487
+        justify-content: space-between;
488
+        line-height: 24px;
489
+        padding: 0 10px;
490
+    }
491
+
492
+    .actionBar div {
493
+        width: 150px;
494
+    }
495
+</style>

+ 71 - 5
src/xt_pages/outpatientDoctorStation/pastInquiries.vue View File

@@ -14,9 +14,13 @@
14 14
                         format="yyyy-MM-dd"
15 15
                         value-format="yyyy-MM-dd"
16 16
                         placeholder="选择日期时间" align="right"></el-date-picker>
17
+        <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="batchPrint(1)">处方筏批量打印</el-button>
18
+        <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="batchPrint(2)">治疗单批量打印</el-button>
19
+        <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="batchPrint(3)">检验单批量打印</el-button>
17 20
       </div>
18
-      <el-table :data="tableData" border ref="table" style="width: 100%;" :row-style="{ color: '#303133' }"
21
+      <el-table :data="tableData" border ref="table" style="width: 100%;" :row-style="{ color: '#303133' }" @selection-change="handleSelectionChange"
19 22
                 :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
23
+        <el-table-column align="center" type="selection" width="55"></el-table-column>
20 24
         <el-table-column align="center" label="序号" width="60" type="index"></el-table-column>
21 25
         <el-table-column align="center" prop="name" label="姓名" width="100">
22 26
           <template slot-scope="scope">{{scope.row.patients?scope.row.patients.name:''}}</template>
@@ -58,10 +62,33 @@
58 62
         style="margin-top:20px;float: right"
59 63
         layout="total, sizes, prev, pager, next, jumper"
60 64
         :total="total"
61
-
62 65
       >
63 66
       </el-pagination>
64 67
       <inquiries-detail ref="inquiriesDetail"></inquiries-detail>
68
+      <el-dialog
69
+          class="centerDialog"
70
+          width="600px"
71
+          title="打印"
72
+          :visible.sync="innerVisible"
73
+          append-to-body>
74
+        <template>
75
+          <el-button
76
+              style="float:right;"
77
+              :loading="loading"
78
+              size="small"
79
+              icon="el-icon-printer"
80
+              @click="printThisPage"
81
+              type="primary"
82
+          >打印
83
+          </el-button>
84
+        </template>
85
+        <div id='printMain'>
86
+          <print ref="print" v-if="printType == 1" :printData='printData'></print>
87
+          <treatPrint ref="treatPrint" v-if="printType == 2" :printData='printData'></treatPrint>
88
+          <checkPrint ref="checkPrint" v-if="printType == 3" :printData='printData'></checkPrint>
89
+        </div>
90
+
91
+      </el-dialog>
65 92
     </div>
66 93
   </div>
67 94
 </template>
@@ -71,11 +98,17 @@
71 98
   import inquiriesDetail from './components/inquiriesDetail'
72 99
   import { getHisPrescriptionList } from '@/api/his/his'
73 100
   import { uParseTime } from '@/utils/tools'
74
-  import { getInitData} from '@/api/his/his'
101
+  import { getInitData, getBatchPrint } from '@/api/his/his'
102
+  import print from './batch_print_template/index'
103
+  import treatPrint from './batch_print_treatTemplate/index'
104
+  import checkPrint from './batch_print_checkTemplate/index'
75 105
   export default {
76 106
     components: {
77 107
       BreadCrumb,
78
-      inquiriesDetail
108
+      inquiriesDetail,
109
+      print,
110
+      treatPrint,
111
+      checkPrint
79 112
     },
80 113
     data() {
81 114
       return {
@@ -89,7 +122,11 @@
89 122
           { path: false, name: '既往查询' }
90 123
         ],
91 124
         tableData: [],
92
-        diagnoses:[]
125
+        diagnoses:[],
126
+        innerVisible: false,
127
+        selecting_schs:[],
128
+        printData:[],
129
+        printType: 0
93 130
       }
94 131
     },
95 132
     methods: {
@@ -180,6 +217,35 @@
180 217
 
181 218
 
182 219
         return name
220
+      },
221
+      handleSelectionChange(val) {
222
+        
223
+        this.selecting_schs = val;
224
+        
225
+      },
226
+      batchPrint(type){
227
+        this.printType = type
228
+        if (this.selecting_schs.length === 0) {
229
+          this.$message.error("请至少选择一条需要打印的内容");
230
+          return false;
231
+        }
232
+        this.innerVisible = true
233
+        var sch_ids = [];
234
+
235
+        for (let index = 0; index < this.selecting_schs.length; index++) {
236
+          sch_ids.push(this.selecting_schs[index].patient_id);
237
+        }
238
+        console.log('sch_ids',sch_ids)
239
+        let params = {
240
+          record_date: this.record_date,
241
+          patient_ids: sch_ids.join(","),
242
+          type: type
243
+        }
244
+        getBatchPrint(params).then(res => {
245
+          console.log('res',res)
246
+          let printData = res.data.data.patients
247
+          this.printData = printData
248
+        })
183 249
       }
184 250
     }, created() {
185 251
       var nowDate = new Date()

+ 6 - 3
src/xt_pages/supply/components/addSupply.vue View File

@@ -383,12 +383,15 @@ export default {
383 383
             this.$refs[formName].validate((valid) => {
384 384
               if (valid) {
385 385
                 let params = {
386
-                  // ...this.supplier,
386
+                  suppliercode:this.supplier.supplierCode,
387 387
                   suppliername:this.supplier.supplierName,
388
+                  tmp:"测试",
388 389
                   // ...this.recordInfo
390
+                  id:this.supplier_ids,
391
+                  contacts:[...this.recordInfo.contacts]
389 392
                 };
390
-                let data = { ...this.recordInfo };
391
-                console.log(params, "dhas");
393
+                console.log(this.recordInfo, "dhas");
394
+                console.log(typeof(this.supplier_ids),'oo')
392 395
                 updatesupply(params).then((res) => {
393 396
                   console.log(res, "oo");
394 397
                 });