|
@@ -114,44 +114,60 @@
|
114
|
114
|
</div>
|
115
|
115
|
<div class="mainRight">
|
116
|
116
|
<div class="titlelist">
|
117
|
|
- 班次:
|
118
|
|
- <el-select v-model="shift" placeholder="请选择" @change="getdrugsdetails02">
|
|
117
|
+ <!-- 班次:
|
|
118
|
+ <el-select
|
|
119
|
+ v-model="shift"
|
|
120
|
+ placeholder="请选择"
|
|
121
|
+ @change="getdrugsdetails"
|
|
122
|
+ >
|
119
|
123
|
<el-option
|
120
|
124
|
v-for="item in banshift"
|
121
|
125
|
:key="item.value"
|
122
|
126
|
:label="item.text"
|
123
|
|
- :value="item.value">
|
|
127
|
+ :value="item.value"
|
|
128
|
+ >
|
124
|
129
|
</el-option>
|
125
|
130
|
</el-select>
|
126
|
131
|
分区:
|
127
|
|
- <el-select v-model="partition" placeholder="请选择" @change="getdrugsdetails">
|
|
132
|
+ <el-select
|
|
133
|
+ v-model="partition"
|
|
134
|
+ placeholder="请选择"
|
|
135
|
+ @change="getdrugsdetails"
|
|
136
|
+ >
|
128
|
137
|
<el-option
|
129
|
138
|
v-for="item in fen"
|
130
|
139
|
:key="item.id"
|
131
|
140
|
:label="item.name"
|
132
|
|
- :value="item.id">
|
|
141
|
+ :value="item.id"
|
|
142
|
+ >
|
133
|
143
|
</el-option>
|
134
|
144
|
</el-select>
|
135
|
145
|
给药途径:
|
136
|
|
- <el-select v-model="deliveryway" placeholder="请选择" @change="getdruglist02">
|
|
146
|
+ <el-select
|
|
147
|
+ v-model="deliveryway"
|
|
148
|
+ placeholder="请选择"
|
|
149
|
+ @change="getdruglist02"
|
|
150
|
+ >
|
137
|
151
|
<el-option
|
138
|
152
|
v-for="item in routeofadministration"
|
139
|
153
|
:key="item.name"
|
140
|
154
|
:label="item.name"
|
141
|
|
- :value="item.name">
|
|
155
|
+ :value="item.name"
|
|
156
|
+ >
|
142
|
157
|
</el-option>
|
143
|
|
- </el-select>
|
144
|
|
- <el-button type="primary" @click="toExport" v-if="state == 2">导出</el-button>
|
|
158
|
+ </el-select> -->
|
|
159
|
+ <el-button type="primary" @click="toExport" v-if="state == 2"
|
|
160
|
+ >导出</el-button
|
|
161
|
+ >
|
145
|
162
|
<!-- <el-button type="primary" @click="tt">调试</el-button>-->
|
146
|
163
|
<el-button type="primary" @click="dispense" v-if="state == 1"
|
147
|
164
|
>发药</el-button
|
148
|
165
|
>
|
149
|
|
- <el-button type="primary" @click="toPrint">打印</el-button>
|
150
|
|
-<!-- <el-button @click="tt">调试</el-button>-->
|
151
|
|
-
|
|
166
|
+ <!-- <el-button type="primary" @click="toPrint">打印</el-button> -->
|
|
167
|
+ <!-- <el-button @click="tt">调试</el-button>-->
|
152
|
168
|
</div>
|
153
|
169
|
<el-divider></el-divider>
|
154
|
|
- <div>
|
|
170
|
+ <div class="right_table">
|
155
|
171
|
<el-table
|
156
|
172
|
:height="tableHeight"
|
157
|
173
|
:data="tableData"
|
|
@@ -347,8 +363,8 @@
|
347
|
363
|
</el-table-column>
|
348
|
364
|
</el-table>
|
349
|
365
|
</div>
|
350
|
|
- <div style="background-color: #f5f7fa;display:flex;padding: 10px;justify-content:space-around;position:absolute;width:75.6%;margin-top: 27.5%;
|
351
|
|
-"><div style="width: 40%;padding-left:3%">合计 </div> <div style="width: 40%;display: flex;justify-content:center;padding-left: 37%">{{total}}</div></div>
|
|
366
|
+ <!-- <div style="background-color: #f5f7fa;display:flex;padding: 10px;justify-content:space-around;position:absolute;width:75.6%;margin-top: 27.5%;
|
|
367
|
+"><div style="width: 40%;padding-left:3%">合计 </div> <div style="width: 40%;display: flex;justify-content:center;padding-left: 37%">{{total}}</div></div> -->
|
352
|
368
|
<div style="margin-top: 25px" v-if="state == 1">
|
353
|
369
|
领药人:
|
354
|
370
|
<el-select v-model="admin_user_id" placeholder="请选择">
|
|
@@ -429,7 +445,7 @@ export default {
|
429
|
445
|
{ path: false, name: "药房管理" },
|
430
|
446
|
{ path: "/Pharmacy/DrugDispensing", name: "药品发药" },
|
431
|
447
|
],
|
432
|
|
- tableHeight: 400,
|
|
448
|
+ tableHeight: 490,
|
433
|
449
|
datepick: "",
|
434
|
450
|
state: 1,
|
435
|
451
|
waitmount: 0,
|
|
@@ -451,18 +467,18 @@ export default {
|
451
|
467
|
issued_drug: [], //已发药列表
|
452
|
468
|
currentRow: null,
|
453
|
469
|
tmp: 0,
|
454
|
|
- banshift:[
|
455
|
|
- {value:0,text:'全部班'},
|
456
|
|
- {value:1,text:'上午'},
|
457
|
|
- {value:2,text: '下午'},
|
458
|
|
- {value:3,text: '晚上'}
|
|
470
|
+ banshift: [
|
|
471
|
+ { value: 0, text: "全部班" },
|
|
472
|
+ { value: 1, text: "上午" },
|
|
473
|
+ { value: 2, text: "下午" },
|
|
474
|
+ { value: 3, text: "晚上" },
|
459
|
475
|
],
|
460
|
|
- shift:0,//班次
|
461
|
|
- fen:[],
|
462
|
|
- partition:0,//分区
|
463
|
|
- routeofadministration:[],
|
464
|
|
- deliveryway:"全部",//给药途径
|
465
|
|
- total:"",//合计
|
|
476
|
+ shift: 0, //班次
|
|
477
|
+ fen: [],
|
|
478
|
+ partition: 0, //分区
|
|
479
|
+ routeofadministration: [],
|
|
480
|
+ deliveryway: "全部", //给药途径
|
|
481
|
+ total: "", //合计
|
466
|
482
|
};
|
467
|
483
|
},
|
468
|
484
|
|
|
@@ -510,26 +526,15 @@ export default {
|
510
|
526
|
sums[index] = "合计";
|
511
|
527
|
return;
|
512
|
528
|
}
|
513
|
|
- console.log(data, "合计data1");
|
514
|
|
- const values = data.map((item) => Number(item[column.property]));
|
515
|
|
-
|
516
|
|
- if (!values.every((value) => isNaN(value))) {
|
517
|
|
- sums[index] = values.reduce((prev, curr) => {
|
518
|
|
- const value = Number(curr);
|
519
|
|
- if (!isNaN(value)) {
|
520
|
|
- return prev + curr;
|
521
|
|
- } else {
|
522
|
|
- return prev;
|
523
|
|
- }
|
524
|
|
- }, 0);
|
525
|
|
- sums[index] += " 元";
|
526
|
|
- } else {
|
527
|
|
- sums[index] = "N/A";
|
|
529
|
+ if (index === 7) {
|
|
530
|
+ sums[index] = this.total;
|
|
531
|
+ return;
|
528
|
532
|
}
|
529
|
533
|
});
|
530
|
534
|
|
531
|
535
|
return sums;
|
532
|
536
|
},
|
|
537
|
+
|
533
|
538
|
changeTimes() {
|
534
|
539
|
// alert("aa")
|
535
|
540
|
// this.getdruglist();
|
|
@@ -608,12 +613,12 @@ export default {
|
608
|
613
|
// }
|
609
|
614
|
// }
|
610
|
615
|
|
611
|
|
- if(this.state == 1){
|
|
616
|
+ if (this.state == 1) {
|
612
|
617
|
import("@/vendor/Export2Excel").then((excel) => {
|
613
|
618
|
for (let i = 0; i < this.multipleSelection.length; i++) {
|
614
|
619
|
this.multipleSelection[i].index = i + 1;
|
615
|
|
- this.multipleSelection[i].time = this.start_time
|
616
|
|
- this.multipleSelection[i].yname = this.currentRow.name
|
|
620
|
+ this.multipleSelection[i].time = this.start_time;
|
|
621
|
+ this.multipleSelection[i].yname = this.currentRow.name;
|
617
|
622
|
}
|
618
|
623
|
|
619
|
624
|
const tHeader = [
|
|
@@ -649,12 +654,12 @@ export default {
|
649
|
654
|
});
|
650
|
655
|
this.downloadLoading = false;
|
651
|
656
|
});
|
652
|
|
- }else if(this.state == 2){
|
|
657
|
+ } else if (this.state == 2) {
|
653
|
658
|
import("@/vendor/Export2Excel").then((excel) => {
|
654
|
659
|
for (let i = 0; i < this.tableData.length; i++) {
|
655
|
660
|
this.tableData[i].index = i + 1;
|
656
|
|
- this.tableData[i].time = this.start_time
|
657
|
|
- this.tableData[i].yname = this.currentRow.name
|
|
661
|
+ this.tableData[i].time = this.start_time;
|
|
662
|
+ this.tableData[i].yname = this.currentRow.name;
|
658
|
663
|
}
|
659
|
664
|
|
660
|
665
|
const tHeader = [
|
|
@@ -692,7 +697,7 @@ export default {
|
692
|
697
|
});
|
693
|
698
|
this.downloadLoading = false;
|
694
|
699
|
});
|
695
|
|
- }else{
|
|
700
|
+ } else {
|
696
|
701
|
this.$message.error("药品状态异常");
|
697
|
702
|
return;
|
698
|
703
|
}
|
|
@@ -825,7 +830,7 @@ export default {
|
825
|
830
|
this.issued_drug = res.data.data.list;
|
826
|
831
|
}
|
827
|
832
|
});
|
828
|
|
- if(this.state == 2){
|
|
833
|
+ if (this.state == 2) {
|
829
|
834
|
this.handleCurrentChange(this.currentRow);
|
830
|
835
|
// this.fun5(tps);
|
831
|
836
|
}else{
|
|
@@ -905,8 +910,8 @@ export default {
|
905
|
910
|
},
|
906
|
911
|
handleCurrentChange(val) {
|
907
|
912
|
this.currentRow = val;
|
908
|
|
- console.log("currentRow",this.currentRow)
|
909
|
|
- this.total = ""
|
|
913
|
+ console.log("currentRow", this.currentRow);
|
|
914
|
+ this.total = "";
|
910
|
915
|
if (this.state == 1) {
|
911
|
916
|
this.getdrugsdetails(0);
|
912
|
917
|
}
|
|
@@ -914,29 +919,6 @@ export default {
|
914
|
919
|
this.getdrugsdetails(1);
|
915
|
920
|
}
|
916
|
921
|
},
|
917
|
|
- getdrugsdetails02(val) {
|
918
|
|
- if(this.state == 1){
|
919
|
|
- val = 0
|
920
|
|
- }else{
|
921
|
|
- val = 1
|
922
|
|
- }
|
923
|
|
- var params = {
|
924
|
|
- drug_id: this.currentRow.id,
|
925
|
|
- is_medicine: val,
|
926
|
|
- time: this.start_time,
|
927
|
|
- shift: this.shift,
|
928
|
|
- partition: this.partition,
|
929
|
|
- deliveryway: this.deliveryway,
|
930
|
|
- };
|
931
|
|
- getpatientswithdrugs(params).then((res) => {
|
932
|
|
- if (res.data.state == 1) {
|
933
|
|
- this.tableData = res.data.data.list; //列表数据
|
934
|
|
- this.total = res.data.data.total;//合计
|
935
|
|
- } else {
|
936
|
|
- this.$message.error(res.data.msg);
|
937
|
|
- }
|
938
|
|
- });
|
939
|
|
- },
|
940
|
922
|
getdrugsdetails(val) {
|
941
|
923
|
if(this.state == 1){
|
942
|
924
|
val = 0
|
|
@@ -954,7 +936,7 @@ export default {
|
954
|
936
|
getpatientswithdrugs(params).then((res) => {
|
955
|
937
|
if (res.data.state == 1) {
|
956
|
938
|
this.tableData = res.data.data.list; //列表数据
|
957
|
|
- this.total = res.data.data.total;//合计
|
|
939
|
+ this.total = res.data.data.total; //合计
|
958
|
940
|
} else {
|
959
|
941
|
this.$message.error(res.data.msg);
|
960
|
942
|
}
|
|
@@ -982,19 +964,19 @@ export default {
|
982
|
964
|
}
|
983
|
965
|
});
|
984
|
966
|
},
|
985
|
|
- getrouteofadministration(){
|
986
|
|
- var params = {}
|
987
|
|
- routeofadministration(params).then((res) =>{
|
988
|
|
- if(res.data.state == 1){
|
|
967
|
+ getrouteofadministration() {
|
|
968
|
+ var params = {};
|
|
969
|
+ routeofadministration(params).then((res) => {
|
|
970
|
+ if (res.data.state == 1) {
|
989
|
971
|
this.routeofadministration = res.data.data.list;
|
990
|
972
|
}
|
991
|
|
- })
|
|
973
|
+ });
|
992
|
974
|
},
|
993
|
|
- getgetpartitionlist(){
|
994
|
|
- var params = {}
|
995
|
|
- getpartitionlist(params).then((res) =>{
|
|
975
|
+ getgetpartitionlist() {
|
|
976
|
+ var params = {};
|
|
977
|
+ getpartitionlist(params).then((res) => {
|
996
|
978
|
this.fen = res.data.data.list;
|
997
|
|
- })
|
|
979
|
+ });
|
998
|
980
|
},
|
999
|
981
|
getUserlist(drug_id) {
|
1000
|
982
|
var params = {
|
|
@@ -1084,6 +1066,12 @@ export default {
|
1084
|
1066
|
overflow-y: auto;
|
1085
|
1067
|
overflow-x: hidden;
|
1086
|
1068
|
}
|
|
1069
|
+.right_table{
|
|
1070
|
+ /deep/ .el-table--scrollable-x .el-table__body-wrapper {
|
|
1071
|
+ overflow-y: auto;
|
|
1072
|
+ overflow-x: scroll;
|
|
1073
|
+}
|
|
1074
|
+}
|
1087
|
1075
|
/deep/ .gutter {
|
1088
|
1076
|
width: 15px !important;
|
1089
|
1077
|
display: inline-block !important;
|