|
@@ -46,12 +46,12 @@
|
46
|
46
|
<view class="R-l"></view>
|
47
|
47
|
</view>
|
48
|
48
|
<button class="cube-toolbar-item" :loading="isLoading" :disabled="isLoading" @click="dispensing(1)"
|
49
|
|
- v-if="infoDATA.drugsState && infoDATA.drugsState.name == '待配药'">
|
|
49
|
+ v-if="infoDATA.drugsState && infoDATA.drugsState.name == '待配药'&&infoDATA.launch.id==loginUser.dept.id">
|
50
|
50
|
开始配药
|
51
|
51
|
</button>
|
52
|
|
- <view v-if="infoDATA.drugsState && infoDATA.drugsState.name == '配药中'" class="btn-wrap">
|
|
52
|
+ <view v-if="infoDATA.drugsState && infoDATA.drugsState.name == '配药中'&&infoDATA.launch.id==loginUser.dept.id" class="btn-wrap">
|
53
|
53
|
<button class="cube-toolbar-item1" :loading="isLoading" :disabled="isLoading" @click="dispensing(2)">
|
54
|
|
- 完成配药
|
|
54
|
+ 进行核对
|
55
|
55
|
</button>
|
56
|
56
|
<button class="cube-toolbar-item1" :loading="isTLoading" :disabled="isTLoading" @click="replaceOperator()">
|
57
|
57
|
替换配药人
|
|
@@ -72,11 +72,12 @@
|
72
|
72
|
infoDATA: [],
|
73
|
73
|
isLoading: false,
|
74
|
74
|
isTLoading: false,
|
|
75
|
+ loginUser: {} //当前登录用户
|
75
|
76
|
};
|
76
|
77
|
},
|
77
|
78
|
methods: {
|
78
|
79
|
// 替换配药人
|
79
|
|
- replaceOperator(){
|
|
80
|
+ replaceOperator() {
|
80
|
81
|
this.isTLoading = true;
|
81
|
82
|
uni.showLoading({
|
82
|
83
|
title: "加载中",
|
|
@@ -87,7 +88,7 @@
|
87
|
88
|
}).then((result) => {
|
88
|
89
|
this.isTLoading = false;
|
89
|
90
|
uni.hideLoading();
|
90
|
|
- if(result.state == 200){
|
|
91
|
+ if (result.state == 200) {
|
91
|
92
|
uni.showModal({
|
92
|
93
|
title: '提示',
|
93
|
94
|
content: result.info,
|
|
@@ -100,7 +101,7 @@
|
100
|
101
|
}
|
101
|
102
|
}
|
102
|
103
|
});
|
103
|
|
- }else{
|
|
104
|
+ } else {
|
104
|
105
|
uni.showModal({
|
105
|
106
|
title: '提示',
|
106
|
107
|
content: "请求失败!",
|
|
@@ -116,7 +117,7 @@
|
116
|
117
|
}
|
117
|
118
|
})
|
118
|
119
|
},
|
119
|
|
- // 开始配药,完成配药,,,1是待配药,2是配药中
|
|
120
|
+ // 开始配药,进行核对,,,1是待配药,2是配药中
|
120
|
121
|
dispensing(type) {
|
121
|
122
|
this.isLoading = true;
|
122
|
123
|
uni.showLoading({
|
|
@@ -201,7 +202,7 @@
|
201
|
202
|
if (result.state == 200) {
|
202
|
203
|
uni.showModal({
|
203
|
204
|
title: '提示',
|
204
|
|
- content: result.info || "完成配药成功!",
|
|
205
|
+ content: result.info || "进行核对成功!",
|
205
|
206
|
showCancel: false,
|
206
|
207
|
success: function(res) {
|
207
|
208
|
if (res.confirm) {
|
|
@@ -232,6 +233,8 @@
|
232
|
233
|
},
|
233
|
234
|
},
|
234
|
235
|
onLoad(options) {
|
|
236
|
+ this.loginUser = uni.getStorageSync("userData").user;
|
|
237
|
+ console.log(this.loginUser,'loginUserloginUser')
|
235
|
238
|
// #ifdef APP-PLUS
|
236
|
239
|
webHandle("no", "app");
|
237
|
240
|
// #endif
|
|
@@ -251,6 +254,20 @@
|
251
|
254
|
uni.hideLoading();
|
252
|
255
|
if (result.state == 200) {
|
253
|
256
|
this.infoDATA = result.result;
|
|
257
|
+ if(this.loginUser.dept.id != this.infoDATA.launch.id){
|
|
258
|
+ uni.showModal({
|
|
259
|
+ title: '提示',
|
|
260
|
+ content: "您现在所在的科室是【"+this.loginUser.dept.dept+"】,药包所在的科室是【"+this.infoDATA.launch.dept+"】,您不能进行操作",
|
|
261
|
+ showCancel: false,
|
|
262
|
+ success: function(res) {
|
|
263
|
+ if (res.confirm) {
|
|
264
|
+ console.log('用户点击确定');
|
|
265
|
+ } else if (res.cancel) {
|
|
266
|
+ console.log('用户点击取消');
|
|
267
|
+ }
|
|
268
|
+ }
|
|
269
|
+ });
|
|
270
|
+ }
|
254
|
271
|
} else {
|
255
|
272
|
uni.showToast({
|
256
|
273
|
icon: "none",
|
|
@@ -270,6 +287,20 @@
|
270
|
287
|
uni.hideLoading();
|
271
|
288
|
if (res.status == 200) {
|
272
|
289
|
this.infoDATA = res.data;
|
|
290
|
+ if(this.loginUser.dept.id != this.infoDATA.launch.id){
|
|
291
|
+ uni.showModal({
|
|
292
|
+ title: '提示',
|
|
293
|
+ content: "您现在所在的科室是【"+this.loginUser.dept.dept+"】,药包所在的科室是【"+this.infoDATA.launch.dept+"】,您不能进行操作",
|
|
294
|
+ showCancel: false,
|
|
295
|
+ success: function(res) {
|
|
296
|
+ if (res.confirm) {
|
|
297
|
+ console.log('用户点击确定');
|
|
298
|
+ } else if (res.cancel) {
|
|
299
|
+ console.log('用户点击取消');
|
|
300
|
+ }
|
|
301
|
+ }
|
|
302
|
+ });
|
|
303
|
+ }
|
273
|
304
|
} else {
|
274
|
305
|
uni.showToast({
|
275
|
306
|
icon: "none",
|
|
@@ -459,13 +490,15 @@
|
459
|
490
|
color: #fff;
|
460
|
491
|
text-align: center;
|
461
|
492
|
}
|
462
|
|
- .btn-wrap{
|
|
493
|
+
|
|
494
|
+ .btn-wrap {
|
463
|
495
|
display: flex;
|
464
|
496
|
justify-content: space-between;
|
465
|
497
|
position: fixed;
|
466
|
498
|
left: 20rpx;
|
467
|
499
|
bottom: 160rpx;
|
468
|
500
|
}
|
|
501
|
+
|
469
|
502
|
.cube-toolbar-item1 {
|
470
|
503
|
width: 350rpx;
|
471
|
504
|
height: 68rpx;
|