|
@@ -152,9 +152,10 @@
|
152
|
152
|
:visible.sync="centerDialogVisible"
|
153
|
153
|
width="600px"
|
154
|
154
|
center>
|
|
155
|
+ <el-button @click="allCheck">全选</el-button>
|
155
|
156
|
<div style="text-align:center;margin-top:10px;font-weight:bold;font-size:20px;">处方笺打印</div>
|
156
|
157
|
<el-table
|
157
|
|
- ref="multipleTable"
|
|
158
|
+ ref="multipleTable1"
|
158
|
159
|
:data="tableData1"
|
159
|
160
|
tooltip-effect="dark"
|
160
|
161
|
style="width: 600px"
|
|
@@ -183,7 +184,7 @@
|
183
|
184
|
</el-table>
|
184
|
185
|
<div style="text-align:center;margin-top:10px;font-weight:bold;font-size:20px;">治疗单打印</div>
|
185
|
186
|
<el-table
|
186
|
|
- ref="multipleTable"
|
|
187
|
+ ref="multipleTable2"
|
187
|
188
|
:data="tableData2"
|
188
|
189
|
tooltip-effect="dark"
|
189
|
190
|
style="width: 600px"
|
|
@@ -212,7 +213,7 @@
|
212
|
213
|
</el-table>
|
213
|
214
|
<div style="text-align:center;margin-top:10px;font-weight:bold;font-size:20px;">检验单打印</div>
|
214
|
215
|
<el-table
|
215
|
|
- ref="multipleTable"
|
|
216
|
+ ref="multipleTable3"
|
216
|
217
|
:data="tableData3"
|
217
|
218
|
tooltip-effect="dark"
|
218
|
219
|
style="width: 600px"
|
|
@@ -245,9 +246,23 @@
|
245
|
246
|
title="打印"
|
246
|
247
|
:visible.sync="innerVisible"
|
247
|
248
|
append-to-body>
|
248
|
|
- <print ref="print" v-if="selecting_schs1.length > 0" :paramsObj='paramsObj'></print>
|
249
|
|
- <treatPrint ref="treatPrint" v-if="selecting_schs2.length > 0" :paramsObj='paramsObj2'></treatPrint>
|
250
|
|
- <checkPrint ref="checkPrint" v-if="selecting_schs3.length > 0" :paramsObj='paramsObj3'></checkPrint>
|
|
249
|
+ <template>
|
|
250
|
+ <el-button
|
|
251
|
+ style="float:right;"
|
|
252
|
+ :loading="loading"
|
|
253
|
+ size="small"
|
|
254
|
+ icon="el-icon-printer"
|
|
255
|
+ @click="printThisPage"
|
|
256
|
+ type="primary"
|
|
257
|
+ >打印</el-button
|
|
258
|
+ >
|
|
259
|
+ </template>
|
|
260
|
+ <div id='printMain'>
|
|
261
|
+ <print ref="print" v-if="selecting_schs1.length > 0" :paramsObj='paramsObj'></print>
|
|
262
|
+ <treatPrint ref="treatPrint" v-if="selecting_schs2.length > 0" :paramsObj='paramsObj2'></treatPrint>
|
|
263
|
+ <checkPrint ref="checkPrint" v-if="selecting_schs3.length > 0" :paramsObj='paramsObj3'></checkPrint>
|
|
264
|
+ </div>
|
|
265
|
+
|
251
|
266
|
</el-dialog>
|
252
|
267
|
<span slot="footer" class="dialog-footer">
|
253
|
268
|
<el-button @click="centerDialogVisible = false">取 消</el-button>
|
|
@@ -382,12 +397,26 @@
|
382
|
397
|
// this.centerDialogVisible = true
|
383
|
398
|
this.getPrescriptionList(this.patientInfo.id)
|
384
|
399
|
},
|
|
400
|
+ allCheck(){
|
|
401
|
+ this.$refs.multipleTable1.toggleAllSelection();
|
|
402
|
+ this.$refs.multipleTable2.toggleAllSelection();
|
|
403
|
+ this.$refs.multipleTable3.toggleAllSelection();
|
|
404
|
+ },
|
385
|
405
|
printThisPage(){
|
386
|
|
- this.$nextTick(() => {
|
387
|
|
- this.$refs.print.printThisPage()
|
388
|
|
- this.$refs.treatPrint.printThisPage()
|
389
|
|
- this.$refs.checkPrint.printThisPage()
|
390
|
|
- })
|
|
406
|
+ const style =
|
|
407
|
+ '@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: 88%;}}#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: 87%;}}}';
|
|
408
|
+ printJS({
|
|
409
|
+ printable: "printMain",
|
|
410
|
+ type: "html",
|
|
411
|
+ style: style,
|
|
412
|
+ scanStyles: false
|
|
413
|
+ });
|
|
414
|
+ this.innerVisible = false
|
|
415
|
+ // this.$nextTick(() => {
|
|
416
|
+ // this.$refs.print.printThisPage()
|
|
417
|
+ // this.$refs.treatPrint.printThisPage()
|
|
418
|
+ // this.$refs.checkPrint.printThisPage()
|
|
419
|
+ // })
|
391
|
420
|
},
|
392
|
421
|
changeOther(patient_id){
|
393
|
422
|
this.radio = 2;
|
|
@@ -1247,6 +1276,7 @@
|
1247
|
1276
|
this.case_history = response.data.data.case_history
|
1248
|
1277
|
this.info = response.data.data.info
|
1249
|
1278
|
this.last_info = response.data.data.last_info
|
|
1279
|
+ this.schedule = response.data.data.schedule
|
1250
|
1280
|
|
1251
|
1281
|
this.doctors = response.data.data.doctors
|
1252
|
1282
|
this.department = response.data.data.department
|
|
@@ -1384,7 +1414,14 @@
|
1384
|
1414
|
var preTime = "";
|
1385
|
1415
|
|
1386
|
1416
|
if (prescription.pre_time == 0) {
|
1387
|
|
- preTime = nowTime
|
|
1417
|
+ if(this.schedule.schedule_type == 1){
|
|
1418
|
+ preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
|
|
1419
|
+ }else if(this.schedule.schedule_type == 2){
|
|
1420
|
+ preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
|
|
1421
|
+ }else if(this.schedule.schedule_type == 3){
|
|
1422
|
+ preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
|
|
1423
|
+ }
|
|
1424
|
+ // preTime = nowTime
|
1388
|
1425
|
} else {
|
1389
|
1426
|
preTime = this.getTime(prescription.pre_time, "{y}-{m}-{d} {h}:{i}")
|
1390
|
1427
|
}
|
|
@@ -1465,8 +1502,14 @@
|
1465
|
1502
|
tempProject.push(obj)
|
1466
|
1503
|
}
|
1467
|
1504
|
|
1468
|
|
-
|
1469
|
|
- var preTime = nowTime
|
|
1505
|
+ if(this.schedule.schedule_type == 1){
|
|
1506
|
+ var preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
|
|
1507
|
+ }else if(this.schedule.schedule_type == 2){
|
|
1508
|
+ var preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
|
|
1509
|
+ }else if(this.schedule.schedule_type == 3){
|
|
1510
|
+ var preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
|
|
1511
|
+ }
|
|
1512
|
+
|
1470
|
1513
|
|
1471
|
1514
|
|
1472
|
1515
|
let index = i + 1;
|
|
@@ -1551,6 +1594,19 @@
|
1551
|
1594
|
'p_type':2,
|
1552
|
1595
|
|
1553
|
1596
|
};
|
|
1597
|
+ var nowDate = new Date()
|
|
1598
|
+ var nowYear = nowDate.getFullYear()
|
|
1599
|
+ var nowMonth = nowDate.getMonth() + 1
|
|
1600
|
+ var nowDay = nowDate.getDate()
|
|
1601
|
+ var hours = nowDate.getHours()
|
|
1602
|
+ var min = nowDate.getMinutes()
|
|
1603
|
+ var nowTime =
|
|
1604
|
+ nowYear +
|
|
1605
|
+ '-' +
|
|
1606
|
+ (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
|
|
1607
|
+ '-' +
|
|
1608
|
+ (nowDay < 10 ? '0' + nowDay : nowDay) + ' ' + (hours < 10 ? '0' + hours : hours) +
|
|
1609
|
+ ':' + (min < 10 ? '0' + min : min)
|
1554
|
1610
|
getPatientInfo(params).then(response => {
|
1555
|
1611
|
if (response.data.state == 0) {
|
1556
|
1612
|
this.$message.error(response.data.msg);
|
|
@@ -1569,6 +1625,7 @@
|
1569
|
1625
|
this.case_history = response.data.data.case_history;
|
1570
|
1626
|
this.info = response.data.data.info;
|
1571
|
1627
|
this.last_info = response.data.data.last_info
|
|
1628
|
+ this.schedule = response.data.data.schedule
|
1572
|
1629
|
|
1573
|
1630
|
this.doctors = response.data.data.doctors;
|
1574
|
1631
|
this.department = response.data.data.department;
|
|
@@ -1700,7 +1757,14 @@
|
1700
|
1757
|
var preTime = "";
|
1701
|
1758
|
|
1702
|
1759
|
if (prescription.pre_time == 0) {
|
1703
|
|
- preTime = nowTime
|
|
1760
|
+ // preTime = nowTime
|
|
1761
|
+ if(this.schedule.schedule_type == 1){
|
|
1762
|
+ preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
|
|
1763
|
+ }else if(this.schedule.schedule_type == 2){
|
|
1764
|
+ preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
|
|
1765
|
+ }else if(this.schedule.schedule_type == 3){
|
|
1766
|
+ preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
|
|
1767
|
+ }
|
1704
|
1768
|
} else {
|
1705
|
1769
|
preTime = this.getTime(prescription.pre_time, "{y}-{m}-{d} {h}:{i}")
|
1706
|
1770
|
}
|
|
@@ -1783,8 +1847,15 @@
|
1783
|
1847
|
}
|
1784
|
1848
|
|
1785
|
1849
|
|
1786
|
|
- var preTime = nowTime
|
1787
|
|
-
|
|
1850
|
+ // var preTime = nowTime
|
|
1851
|
+ var preTime = ''
|
|
1852
|
+ if(this.schedule.schedule_type == 1){
|
|
1853
|
+ preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
|
|
1854
|
+ }else if(this.schedule.schedule_type == 2){
|
|
1855
|
+ preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
|
|
1856
|
+ }else if(this.schedule.schedule_type == 3){
|
|
1857
|
+ preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
|
|
1858
|
+ }
|
1788
|
1859
|
|
1789
|
1860
|
|
1790
|
1861
|
|
|
@@ -1824,7 +1895,6 @@
|
1824
|
1895
|
}
|
1825
|
1896
|
|
1826
|
1897
|
}else{
|
1827
|
|
-
|
1828
|
1898
|
let obj = {
|
1829
|
1899
|
id: 0,
|
1830
|
1900
|
name: '处方' + 1,
|
|
@@ -2811,8 +2881,7 @@
|
2811
|
2881
|
});
|
2812
|
2882
|
this.$refs.child.watchSign = 0
|
2813
|
2883
|
}
|
2814
|
|
- }
|
2815
|
|
- else{
|
|
2884
|
+ }else{
|
2816
|
2885
|
var nowDate = new Date();
|
2817
|
2886
|
var nowYear = nowDate.getFullYear();
|
2818
|
2887
|
var nowMonth = nowDate.getMonth() + 1;
|
|
@@ -2895,6 +2964,7 @@
|
2895
|
2964
|
this.setMonthPrescription(month_prescriptions)
|
2896
|
2965
|
this.doctors = response.data.data.doctors
|
2897
|
2966
|
this.department = response.data.data.department
|
|
2967
|
+ this.schedule = response.data.data.schedule
|
2898
|
2968
|
|
2899
|
2969
|
for (let i = 0; i < this.doctors.length; i++) {
|
2900
|
2970
|
if (this.doctors[i].user_type == 1) {
|
|
@@ -3027,7 +3097,14 @@
|
3027
|
3097
|
var preTime = "";
|
3028
|
3098
|
|
3029
|
3099
|
if (prescription.pre_time == 0) {
|
3030
|
|
- preTime = nowTime
|
|
3100
|
+ // preTime = nowTime
|
|
3101
|
+ if(this.schedule.schedule_type == 1){
|
|
3102
|
+ preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
|
|
3103
|
+ }else if(this.schedule.schedule_type == 2){
|
|
3104
|
+ preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
|
|
3105
|
+ }else if(this.schedule.schedule_type == 3){
|
|
3106
|
+ preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
|
|
3107
|
+ }
|
3031
|
3108
|
} else {
|
3032
|
3109
|
preTime = this.getTime(prescription.pre_time, "{y}-{m}-{d} {h}:{i}")
|
3033
|
3110
|
}
|
|
@@ -3110,7 +3187,15 @@
|
3110
|
3187
|
}
|
3111
|
3188
|
|
3112
|
3189
|
|
3113
|
|
- var preTime = nowTime
|
|
3190
|
+ // var preTime = nowTime
|
|
3191
|
+ var preTime = ''
|
|
3192
|
+ if(this.schedule.schedule_type == 1){
|
|
3193
|
+ preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
|
|
3194
|
+ }else if(this.schedule.schedule_type == 2){
|
|
3195
|
+ preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
|
|
3196
|
+ }else if(this.schedule.schedule_type == 3){
|
|
3197
|
+ preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
|
|
3198
|
+ }
|
3114
|
3199
|
|
3115
|
3200
|
let index = i + 1;
|
3116
|
3201
|
let obj = {
|
|
@@ -3145,7 +3230,6 @@
|
3145
|
3230
|
}
|
3146
|
3231
|
|
3147
|
3232
|
}else{
|
3148
|
|
-
|
3149
|
3233
|
let obj = {
|
3150
|
3234
|
id: 0,
|
3151
|
3235
|
name: '处方' + 1,
|
|
@@ -3317,7 +3401,7 @@
|
3317
|
3401
|
this.case_history = response.data.data.case_history
|
3318
|
3402
|
this.info = response.data.data.info
|
3319
|
3403
|
this.last_info = response.data.data.last_info
|
3320
|
|
-
|
|
3404
|
+ this.schedule = response.data.data.schedule
|
3321
|
3405
|
this.doctors = response.data.data.doctors
|
3322
|
3406
|
this.department = response.data.data.department
|
3323
|
3407
|
|
|
@@ -3446,9 +3530,17 @@
|
3446
|
3530
|
}
|
3447
|
3531
|
|
3448
|
3532
|
var preTime = "";
|
|
3533
|
+
|
3449
|
3534
|
|
3450
|
3535
|
if (prescription.pre_time == 0) {
|
3451
|
|
- preTime = nowTime
|
|
3536
|
+ // preTime = nowTime
|
|
3537
|
+ if(this.schedule.schedule_type == 1){
|
|
3538
|
+ preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
|
|
3539
|
+ }else if(this.schedule.schedule_type == 2){
|
|
3540
|
+ preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
|
|
3541
|
+ }else if(this.schedule.schedule_type == 3){
|
|
3542
|
+ preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
|
|
3543
|
+ }
|
3452
|
3544
|
} else {
|
3453
|
3545
|
preTime = this.getTime(prescription.pre_time, "{y}-{m}-{d} {h}:{i}")
|
3454
|
3546
|
}
|
|
@@ -3531,7 +3623,15 @@
|
3531
|
3623
|
}
|
3532
|
3624
|
|
3533
|
3625
|
|
3534
|
|
- var preTime = nowTime
|
|
3626
|
+ // var preTime = nowTime
|
|
3627
|
+ var preTime = ''
|
|
3628
|
+ if(this.schedule.schedule_type == 1){
|
|
3629
|
+ preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
|
|
3630
|
+ }else if(this.schedule.schedule_type == 2){
|
|
3631
|
+ preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
|
|
3632
|
+ }else if(this.schedule.schedule_type == 3){
|
|
3633
|
+ preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
|
|
3634
|
+ }
|
3535
|
3635
|
|
3536
|
3636
|
|
3537
|
3637
|
let index = i + 1;
|
|
@@ -3853,6 +3953,7 @@
|
3853
|
3953
|
})
|
3854
|
3954
|
},
|
3855
|
3955
|
handleSelectionChange1(val) {
|
|
3956
|
+ console.log('val',val)
|
3856
|
3957
|
this.selecting_schs1 = val
|
3857
|
3958
|
},
|
3858
|
3959
|
handleSelectionChange2(val) {
|