|
@@ -6,68 +6,71 @@
|
6
|
6
|
</template>
|
7
|
7
|
|
8
|
8
|
<script>
|
9
|
|
-import { post, SM } from "../../http/http.js";
|
10
|
|
-export default {
|
11
|
|
- data(){
|
12
|
|
- return {
|
13
|
|
- SMFlag:true,
|
14
|
|
- }
|
15
|
|
- },
|
16
|
|
- methods: {
|
17
|
|
- // 底部扫描
|
18
|
|
- Scanning() {
|
19
|
|
- if (!this.SMFlag) {
|
20
|
|
- return;
|
|
9
|
+ import {
|
|
10
|
+ post,
|
|
11
|
+ SM
|
|
12
|
+ } from "../../http/http.js";
|
|
13
|
+ export default {
|
|
14
|
+ data() {
|
|
15
|
+ return {
|
|
16
|
+ SMFlag: true,
|
21
|
17
|
}
|
22
|
|
- this.SMFlag = false;
|
23
|
|
- SM().then((content) => {
|
24
|
|
- uni.showLoading({
|
25
|
|
- title: "加载中",
|
26
|
|
- mask: true,
|
27
|
|
- });
|
28
|
|
- //检验二维码的有效性(扫码前必须验证)
|
29
|
|
- post("/dept/scanning", {
|
30
|
|
- content,
|
31
|
|
- })
|
32
|
|
- .then((result) => {
|
33
|
|
- this.SMFlag = true;
|
34
|
|
- // 200检测通过,201没有有效期也通过。
|
35
|
|
- if (result.state == 200 || result.state == 201) {
|
36
|
|
- let data = {
|
37
|
|
- code: result.code, //二维码
|
38
|
|
- };
|
39
|
|
- //微信—大扫描(科室码,患者码,标本码,快捷建单码,药包码)
|
40
|
|
- post("/workerOrder/scanCode", data)
|
41
|
|
- .then((res) => {
|
42
|
|
- uni.hideLoading();
|
43
|
|
- if (res.status == 200) {
|
44
|
|
- // 扫描标本码
|
45
|
|
- if (res.type == "specimen") {
|
46
|
|
- let infoDATA = {
|
47
|
|
- stype: res.data.stype,
|
48
|
|
- scode: res.data.scode,
|
49
|
|
- patientName: res.data.patientName,
|
50
|
|
- sickRoom: res.data.sickRoom
|
51
|
|
- ? res.data.sickRoom.dept
|
52
|
|
- : "-",
|
53
|
|
- checkDept: res.data.checkDept
|
54
|
|
- ? res.data.checkDept.dept
|
55
|
|
- : "-",
|
56
|
|
- bedNum: res.data.bedNum,
|
57
|
|
- };
|
58
|
|
- uni.navigateTo({
|
59
|
|
- url: `../scanning_B/scanning_B?status=${
|
60
|
|
- res.status
|
61
|
|
- }&msg=${res.msg}&infoDATA=${encodeURIComponent(
|
|
18
|
+ },
|
|
19
|
+ methods: {
|
|
20
|
+ // 底部扫描
|
|
21
|
+ Scanning() {
|
|
22
|
+ if (!this.SMFlag) {
|
|
23
|
+ return;
|
|
24
|
+ }
|
|
25
|
+ this.SMFlag = false;
|
|
26
|
+ SM().then((content) => {
|
|
27
|
+ uni.showLoading({
|
|
28
|
+ title: "加载中",
|
|
29
|
+ mask: true,
|
|
30
|
+ });
|
|
31
|
+ //检验二维码的有效性(扫码前必须验证)
|
|
32
|
+ post("/dept/scanning", {
|
|
33
|
+ content,
|
|
34
|
+ })
|
|
35
|
+ .then((result) => {
|
|
36
|
+ this.SMFlag = true;
|
|
37
|
+ // 200检测通过,201没有有效期也通过。
|
|
38
|
+ if (result.state == 200 || result.state == 201) {
|
|
39
|
+ let data = {
|
|
40
|
+ code: result.code, //二维码
|
|
41
|
+ };
|
|
42
|
+ //微信—大扫描(科室码,患者码,标本码,快捷建单码,药包码)
|
|
43
|
+ post("/workerOrder/scanCode", data)
|
|
44
|
+ .then((res) => {
|
|
45
|
+ uni.hideLoading();
|
|
46
|
+ if (res.status == 200) {
|
|
47
|
+ // 扫描标本码
|
|
48
|
+ if (res.type == "specimen") {
|
|
49
|
+ let infoDATA = {
|
|
50
|
+ stype: res.data.stype,
|
|
51
|
+ scode: res.data.scode,
|
|
52
|
+ patientName: res.data.patientName,
|
|
53
|
+ sickRoom: res.data.sickRoom ?
|
|
54
|
+ res.data.sickRoom.dept :
|
|
55
|
+ "-",
|
|
56
|
+ checkDept: res.data.checkDept ?
|
|
57
|
+ res.data.checkDept.dept :
|
|
58
|
+ "-",
|
|
59
|
+ bedNum: res.data.bedNum,
|
|
60
|
+ };
|
|
61
|
+ uni.navigateTo({
|
|
62
|
+ url: `../scanning_B/scanning_B?res=${encodeURIComponent(
|
|
63
|
+ JSON.stringify(res)
|
|
64
|
+ )}&infoDATA=${encodeURIComponent(
|
62
|
65
|
JSON.stringify(infoDATA)
|
63
|
66
|
)}`,
|
64
|
|
- });
|
65
|
|
- } else if (res.type == "patient") {
|
66
|
|
- //如果是患者腕带码
|
67
|
|
- // code: data.code //二维码
|
68
|
|
- res.workOrder = res.workOrder ? res.workOrder : []; //liao
|
69
|
|
- uni.navigateTo({
|
70
|
|
- url: `../scanning_ins/scanning_ins?code=${
|
|
67
|
+ });
|
|
68
|
+ } else if (res.type == "patient") {
|
|
69
|
+ //如果是患者腕带码
|
|
70
|
+ // code: data.code //二维码
|
|
71
|
+ res.workOrder = res.workOrder ? res.workOrder : []; //liao
|
|
72
|
+ uni.navigateTo({
|
|
73
|
+ url: `../scanning_ins/scanning_ins?code=${
|
71
|
74
|
data.code
|
72
|
75
|
}&infoDATA=${encodeURIComponent(
|
73
|
76
|
JSON.stringify(res.data)
|
|
@@ -76,80 +79,80 @@ export default {
|
76
|
79
|
)}&patientOrders=${encodeURIComponent(
|
77
|
80
|
JSON.stringify(res.patientOrders)
|
78
|
81
|
)}`,
|
79
|
|
- });
|
80
|
|
- } else if (res.type == "quickOrder") {
|
81
|
|
- //快捷建单
|
82
|
|
- uni.navigateTo({
|
83
|
|
- url: `../shortcutbuildOrders/shortcutbuildOrders?infoDATA=${encodeURIComponent(
|
|
82
|
+ });
|
|
83
|
+ } else if (res.type == "quickOrder") {
|
|
84
|
+ //快捷建单
|
|
85
|
+ uni.navigateTo({
|
|
86
|
+ url: `../shortcutbuildOrders/shortcutbuildOrders?infoDATA=${encodeURIComponent(
|
84
|
87
|
JSON.stringify(res.data)
|
85
|
88
|
)}`,
|
86
|
|
- });
|
87
|
|
- } else if (res.type == "dept") {
|
88
|
|
- // 扫描科室码
|
89
|
|
- // code: data.code //二维码
|
90
|
|
- let infoDATA = res.data;
|
91
|
|
- uni.navigateTo({
|
92
|
|
- url: `../scanning_all/scanning_all?infoDATA=${encodeURIComponent(
|
|
89
|
+ });
|
|
90
|
+ } else if (res.type == "dept") {
|
|
91
|
+ // 扫描科室码
|
|
92
|
+ // code: data.code //二维码
|
|
93
|
+ let infoDATA = res.data;
|
|
94
|
+ uni.navigateTo({
|
|
95
|
+ url: `../scanning_all/scanning_all?infoDATA=${encodeURIComponent(
|
93
|
96
|
JSON.stringify(infoDATA)
|
94
|
97
|
)}&code=${data.code}`,
|
95
|
|
- });
|
96
|
|
- }else if(res.type == 'drugsBag'){
|
97
|
|
- //扫药包码
|
|
98
|
+ });
|
|
99
|
+ } else if (res.type == 'drugsBag') {
|
|
100
|
+ //扫药包码
|
|
101
|
+ uni.navigateTo({
|
|
102
|
+ url: `/pages/scanning_drug/scanning_drug?drugsBagId=${res.drugsBagId}`,
|
|
103
|
+ });
|
|
104
|
+ }
|
|
105
|
+ } else {
|
98
|
106
|
uni.navigateTo({
|
99
|
|
- url: `/pages/scanning_drug/scanning_drug?drugsBagId=${res.drugsBagId}`,
|
|
107
|
+ url: `../scanning_Result/scanning_Result?status=${res.status}&msg=${res.msg}`,
|
100
|
108
|
});
|
101
|
109
|
}
|
102
|
|
- } else {
|
103
|
|
- uni.navigateTo({
|
104
|
|
- url: `../scanning_Result/scanning_Result?status=${res.status}&msg=${res.msg}`,
|
105
|
|
- });
|
106
|
|
- }
|
|
110
|
+ });
|
|
111
|
+ } else {
|
|
112
|
+ uni.hideLoading();
|
|
113
|
+ uni.showToast({
|
|
114
|
+ icon: "none",
|
|
115
|
+ title: '请求失败',
|
107
|
116
|
});
|
108
|
|
- } else {
|
109
|
|
- uni.hideLoading();
|
110
|
|
- uni.showToast({
|
111
|
|
- icon: "none",
|
112
|
|
- title: '请求失败',
|
113
|
|
- });
|
114
|
|
- }
|
115
|
|
- })
|
116
|
|
- }).catch(err=>{
|
117
|
|
- this.SMFlag = true;
|
118
|
|
- });
|
|
117
|
+ }
|
|
118
|
+ })
|
|
119
|
+ }).catch(err => {
|
|
120
|
+ this.SMFlag = true;
|
|
121
|
+ });
|
|
122
|
+ },
|
119
|
123
|
},
|
120
|
|
- },
|
121
|
|
- onShow(){
|
122
|
|
- this.SMFlag = true;
|
123
|
|
- }
|
124
|
|
-};
|
|
124
|
+ onShow() {
|
|
125
|
+ this.SMFlag = true;
|
|
126
|
+ }
|
|
127
|
+ };
|
125
|
128
|
</script>
|
126
|
129
|
|
127
|
130
|
<style lang="less">
|
128
|
|
-// 底部扫一扫
|
129
|
|
-.toolbar {
|
130
|
|
- position: fixed;
|
131
|
|
- left: 0;
|
132
|
|
- right: 0;
|
133
|
|
- bottom: 0;
|
134
|
|
- z-index: 999;
|
135
|
|
- height: 88rpx;
|
136
|
|
- display: flex;
|
137
|
|
- justify-content: center;
|
138
|
|
- align-items: center;
|
139
|
|
- box-sizing: border-box;
|
140
|
|
- border-radius: 4rpx;
|
141
|
|
- box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.24);
|
142
|
|
- background-color: #e5e9ed;
|
|
131
|
+ // 底部扫一扫
|
|
132
|
+ .toolbar {
|
|
133
|
+ position: fixed;
|
|
134
|
+ left: 0;
|
|
135
|
+ right: 0;
|
|
136
|
+ bottom: 0;
|
|
137
|
+ z-index: 999;
|
|
138
|
+ height: 88rpx;
|
|
139
|
+ display: flex;
|
|
140
|
+ justify-content: center;
|
|
141
|
+ align-items: center;
|
|
142
|
+ box-sizing: border-box;
|
|
143
|
+ border-radius: 4rpx;
|
|
144
|
+ box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.24);
|
|
145
|
+ background-color: #e5e9ed;
|
143
|
146
|
|
144
|
|
- .toolbar-icon {
|
145
|
|
- font-size: 52rpx;
|
146
|
|
- margin-right: 16rpx;
|
147
|
|
- color: #07863c;
|
148
|
|
- }
|
|
147
|
+ .toolbar-icon {
|
|
148
|
+ font-size: 52rpx;
|
|
149
|
+ margin-right: 16rpx;
|
|
150
|
+ color: #07863c;
|
|
151
|
+ }
|
149
|
152
|
|
150
|
|
- .toolbar-sao {
|
151
|
|
- font-size: 36rpx;
|
152
|
|
- color: #333;
|
|
153
|
+ .toolbar-sao {
|
|
154
|
+ font-size: 36rpx;
|
|
155
|
+ color: #333;
|
|
156
|
+ }
|
153
|
157
|
}
|
154
|
|
-}
|
155
|
158
|
</style>
|