|
@@ -0,0 +1,490 @@
|
|
1
|
+<template>
|
|
2
|
+ <view class="patientInformationList">
|
|
3
|
+ <view class="page_tab">
|
|
4
|
+ <view class="page_tab_bar active">
|
|
5
|
+ <view class="tab_dept">血制品选择页面</view>
|
|
6
|
+ </view>
|
|
7
|
+ </view>
|
|
8
|
+ <view v-if="zxzData.length == 0" class="zwsj">
|
|
9
|
+ <image class="zwsj-img" mode="widthFix" src="../../static/img/zanwushuju.png"></image>
|
|
10
|
+ <view class="zwsj-txt">暂无数据</view>
|
|
11
|
+ </view>
|
|
12
|
+ <view v-if="zxzData.length" class="page_items">
|
|
13
|
+ <scroll-view class="page_items_scroll" scroll-y :refresher-enabled="scroll_refresher_enabled"
|
|
14
|
+ :refresher-triggered="triggered" @refresherrefresh="refresherrefresh" @refresherrestore="refresherrestore"
|
|
15
|
+ @scrolltolower="scrolltolower" :scroll-top="scroll_top" @refresherabort="refresherabort" @scroll="scroll"
|
|
16
|
+ refresher-background="transport">
|
|
17
|
+ <view class="page_item_wrap" v-for="(item, index) of zxzData" :key="index" @click="itemInfo(item)">
|
|
18
|
+ <view class="page_item">
|
|
19
|
+ <view class="L"></view>
|
|
20
|
+ <view class="R"></view>
|
|
21
|
+ <view class="page_item_top">
|
|
22
|
+ <view class="page_item_top_L">
|
|
23
|
+ <text>{{ item.bloodCode }}<text v-if="item.productCode">({{ item.productCode }})</text></text>
|
|
24
|
+ </view>
|
|
25
|
+ <view class="send_wrap"></view>
|
|
26
|
+ </view>
|
|
27
|
+ <view class="page_item_cont">
|
|
28
|
+ <view class="page_item_conts">
|
|
29
|
+ <view>{{ item.patientName }}({{ item.patientNo }})</view>
|
|
30
|
+ </view>
|
|
31
|
+ </view>
|
|
32
|
+ </view>
|
|
33
|
+ <view class="L-l"></view>
|
|
34
|
+ <view class="R-l"></view>
|
|
35
|
+ </view>
|
|
36
|
+ </scroll-view>
|
|
37
|
+ </view>
|
|
38
|
+ <!-- 弹窗 -->
|
|
39
|
+ <showModel :title="models1.title" :icon="models1.icon" :disjunctor="models1.disjunctor" :content="models1.content"
|
|
40
|
+ :operate="models1.operate" @ok="ok1" @cancel="cancel1"></showModel>
|
|
41
|
+ </view>
|
|
42
|
+</template>
|
|
43
|
+<script>
|
|
44
|
+ import {
|
|
45
|
+ get,
|
|
46
|
+ post,
|
|
47
|
+ SM,
|
|
48
|
+ deleteIt,
|
|
49
|
+ webHandle
|
|
50
|
+ } from "../../http/http.js";
|
|
51
|
+ export default {
|
|
52
|
+ data() {
|
|
53
|
+ return {
|
|
54
|
+ SMFlag:true,
|
|
55
|
+ hosId: uni.getStorageSync("userData").user.currentHospital.id,
|
|
56
|
+ // 选中的患者项
|
|
57
|
+ currentItem: {},
|
|
58
|
+ // 弹窗model
|
|
59
|
+ models1: {
|
|
60
|
+ disjunctor: false,
|
|
61
|
+ },
|
|
62
|
+ scrollYY: 0, //滚动条滚动的距离
|
|
63
|
+ options: {},
|
|
64
|
+ //列表数据
|
|
65
|
+ zxzData: [],
|
|
66
|
+ //分页页码
|
|
67
|
+ idx: 0,
|
|
68
|
+ // 列表项总数
|
|
69
|
+ totalNum: -1,
|
|
70
|
+ triggered: false, //下拉刷新状态
|
|
71
|
+ freshing: false, //上拉加载开关
|
|
72
|
+ scroll_top: 0, //距离顶部的距离
|
|
73
|
+ scroll_refresher_enabled: true, //是否开启自定义下拉刷新
|
|
74
|
+ };
|
|
75
|
+ },
|
|
76
|
+ methods: {
|
|
77
|
+ ok1() {
|
|
78
|
+ this.models1.disjunctor = false;
|
|
79
|
+ if(this.options.navigateTo === 'scanning_blood_process'){
|
|
80
|
+ uni.showLoading({
|
|
81
|
+ title: "加载中",
|
|
82
|
+ mask: true,
|
|
83
|
+ });
|
|
84
|
+ post("/transflow/scanBind", {type: 'blood',orderId: this.options.orderId, id: this.currentItem.id}).then((ress) => {
|
|
85
|
+ uni.hideLoading();
|
|
86
|
+ if (ress.state == 200 && ress.data.state != 400) {
|
|
87
|
+ //todo
|
|
88
|
+ uni.redirectTo({
|
|
89
|
+ url: `../scanning_blood_process/scanning_blood_process?orderId=${this.options.orderId}&bloodDTO=${encodeURIComponent(JSON.stringify(ress.data.dto))}&scanCount=${ress.data.scanCount}&status=200&scanOrHand=${this.options.scanOrHand}&isSelect=1`,
|
|
90
|
+ });
|
|
91
|
+ } else {
|
|
92
|
+ uni.redirectTo({
|
|
93
|
+ url: `../scanning_blood_process/scanning_blood_process?orderId=${this.options.orderId}&status=500&scanOrHand=${this.options.scanOrHand}&qrcode=${this.options.qrcode}`,
|
|
94
|
+ });
|
|
95
|
+ }
|
|
96
|
+ });
|
|
97
|
+ }else{
|
|
98
|
+ uni.navigateTo({
|
|
99
|
+ url: `../${this.options.navigateTo}/${this.options.navigateTo}?id=${this.currentItem.id}`,
|
|
100
|
+ });
|
|
101
|
+ }
|
|
102
|
+ },
|
|
103
|
+ cancel1() {
|
|
104
|
+ this.models1.disjunctor = false;
|
|
105
|
+ },
|
|
106
|
+ // 进入详情页
|
|
107
|
+ itemInfo(item) {
|
|
108
|
+ // #ifdef H5
|
|
109
|
+ document.body.removeEventListener("touchmove", this.stop, {
|
|
110
|
+ passive: false,
|
|
111
|
+ });
|
|
112
|
+ // #endif
|
|
113
|
+ console.log(item)
|
|
114
|
+ this.currentItem = item;
|
|
115
|
+ this.models1 = {
|
|
116
|
+ disjunctor: true,
|
|
117
|
+ title: "提示",
|
|
118
|
+ content: `您确认是此血袋号【${item.bloodCode}】;产品码【${item.productCode}】;患者【${item.patientName}】吗?`,
|
|
119
|
+ icon: "warn",
|
|
120
|
+ operate: {
|
|
121
|
+ ok: "确认",
|
|
122
|
+ cancel: "取消",
|
|
123
|
+ },
|
|
124
|
+ };
|
|
125
|
+ },
|
|
126
|
+ //血制品列表数据获取
|
|
127
|
+ waitingOrders(idx) {
|
|
128
|
+ if (this.zxzData.length == this.totalNum) {
|
|
129
|
+ uni.showToast({
|
|
130
|
+ icon: "none",
|
|
131
|
+ title: "没有更多数据了!",
|
|
132
|
+ });
|
|
133
|
+ this.freshing = true;
|
|
134
|
+ return;
|
|
135
|
+ }
|
|
136
|
+ uni.showLoading({
|
|
137
|
+ title: "加载中",
|
|
138
|
+ mask: true,
|
|
139
|
+ });
|
|
140
|
+ // 请求列表数据
|
|
141
|
+ post("/transflow/scanCheckList", {
|
|
142
|
+ type: 'blood',
|
|
143
|
+ code: this.options.qrcode,
|
|
144
|
+ }).then((res) => {
|
|
145
|
+ uni.hideLoading();
|
|
146
|
+ if (res.state == 200) {
|
|
147
|
+ this.triggered = false;
|
|
148
|
+ this.freshing = true;
|
|
149
|
+ this.totalNum = res.data ? res.data.length : 0;
|
|
150
|
+ if (idx === 0) {
|
|
151
|
+ this.zxzData = res.data;
|
|
152
|
+ } else {
|
|
153
|
+ this.zxzData.push(...res.data);
|
|
154
|
+ }
|
|
155
|
+ } else {
|
|
156
|
+ uni.showToast({
|
|
157
|
+ icon: "none",
|
|
158
|
+ title: "请求失败!",
|
|
159
|
+ });
|
|
160
|
+ }
|
|
161
|
+ });
|
|
162
|
+ },
|
|
163
|
+ //刷新
|
|
164
|
+ refresherrefresh() {
|
|
165
|
+ if (this.triggered) {
|
|
166
|
+ return;
|
|
167
|
+ }
|
|
168
|
+ console.log("下拉刷新");
|
|
169
|
+ this.triggered = true;
|
|
170
|
+ this.idx = 0;
|
|
171
|
+ this.totalNum = -1;
|
|
172
|
+ this.waitingOrders(0);
|
|
173
|
+ },
|
|
174
|
+ // 下拉刷新复位
|
|
175
|
+ refresherrestore() {
|
|
176
|
+ this.triggered = false;
|
|
177
|
+ console.log("下拉刷新复位");
|
|
178
|
+ },
|
|
179
|
+ //下拉刷新中止
|
|
180
|
+ refresherabort() {
|
|
181
|
+ this.triggered = false;
|
|
182
|
+ console.log("下拉刷新中止");
|
|
183
|
+ },
|
|
184
|
+ //分页,上拉加载
|
|
185
|
+ scrolltolower() {
|
|
186
|
+ if (this.freshing) {
|
|
187
|
+ console.log("上拉加载");
|
|
188
|
+ this.freshing = false;
|
|
189
|
+ // this.waitingOrders(++this.idx);
|
|
190
|
+ }
|
|
191
|
+ },
|
|
192
|
+ // 滚动
|
|
193
|
+ scroll(e) {
|
|
194
|
+ this.scrollYY = e.detail.scrollTop;
|
|
195
|
+ if (e.detail.scrollTop < 20) {
|
|
196
|
+ this.scroll_refresher_enabled = true;
|
|
197
|
+ } else {
|
|
198
|
+ this.scroll_refresher_enabled = false;
|
|
199
|
+ }
|
|
200
|
+ },
|
|
201
|
+ // 阻止浏览器滑动
|
|
202
|
+ stop(e) {
|
|
203
|
+ e.preventDefault();
|
|
204
|
+ },
|
|
205
|
+ },
|
|
206
|
+ onLoad(options) {
|
|
207
|
+ console.log(options);
|
|
208
|
+ this.options = options;
|
|
209
|
+ //滚动条位置设置
|
|
210
|
+ if (options.scrollYY !== undefined) {
|
|
211
|
+ this.scroll_top = options.scrollYY;
|
|
212
|
+ }
|
|
213
|
+ this.waitingOrders(0);
|
|
214
|
+ // #ifdef APP-PLUS
|
|
215
|
+ webHandle("no", "app");
|
|
216
|
+ // #endif
|
|
217
|
+ // #ifdef H5
|
|
218
|
+ webHandle("no", "wx");
|
|
219
|
+ // #endif
|
|
220
|
+ },
|
|
221
|
+ onShow() {
|
|
222
|
+ this.SMFlag = true;
|
|
223
|
+ // #ifdef H5
|
|
224
|
+ document.body.addEventListener("touchmove", this.stop, {
|
|
225
|
+ passive: false,
|
|
226
|
+ });
|
|
227
|
+ // #endif
|
|
228
|
+ },
|
|
229
|
+ onHide() {
|
|
230
|
+ // #ifdef H5
|
|
231
|
+ document.body.removeEventListener("touchmove", this.stop, {
|
|
232
|
+ passive: false,
|
|
233
|
+ });
|
|
234
|
+ // #endif
|
|
235
|
+ },
|
|
236
|
+ };
|
|
237
|
+</script>
|
|
238
|
+<style lang="less">
|
|
239
|
+ .patientInformationList {
|
|
240
|
+ width: 100%;
|
|
241
|
+ height: 100%;
|
|
242
|
+ position: relative;
|
|
243
|
+
|
|
244
|
+ .icon_transport {
|
|
245
|
+ color: #49b856;
|
|
246
|
+ font-size: 50rpx;
|
|
247
|
+
|
|
248
|
+ &.colorRed {
|
|
249
|
+ color: red;
|
|
250
|
+ font-size: 40rpx;
|
|
251
|
+ }
|
|
252
|
+ }
|
|
253
|
+
|
|
254
|
+ .page_tab {
|
|
255
|
+ width: 100%;
|
|
256
|
+ height: 96rpx;
|
|
257
|
+ display: flex;
|
|
258
|
+ position: fixed;
|
|
259
|
+ left: 0;
|
|
260
|
+ top: 0;
|
|
261
|
+ z-index: 999;
|
|
262
|
+
|
|
263
|
+ .page_tab_bar {
|
|
264
|
+ flex: 1;
|
|
265
|
+ font-size: 36rpx;
|
|
266
|
+ background: #fff;
|
|
267
|
+ display: flex;
|
|
268
|
+ justify-content: center;
|
|
269
|
+ align-items: center;
|
|
270
|
+ position: relative;
|
|
271
|
+
|
|
272
|
+ &:after {
|
|
273
|
+ content: "";
|
|
274
|
+ position: absolute;
|
|
275
|
+ left: 0;
|
|
276
|
+ bottom: 0;
|
|
277
|
+ height: 2rpx;
|
|
278
|
+ width: 100%;
|
|
279
|
+ background-color: transparent;
|
|
280
|
+ }
|
|
281
|
+
|
|
282
|
+ .tab_dept {
|
|
283
|
+ position: relative;
|
|
284
|
+
|
|
285
|
+ .changeDept {
|
|
286
|
+ white-space: nowrap;
|
|
287
|
+ margin: 0;
|
|
288
|
+ position: absolute;
|
|
289
|
+ right: 0;
|
|
290
|
+ top: 50%;
|
|
291
|
+ transform: translate(105%, -50%);
|
|
292
|
+ padding: 0 0.5em;
|
|
293
|
+ line-height: 2;
|
|
294
|
+ }
|
|
295
|
+ }
|
|
296
|
+
|
|
297
|
+ &.active {
|
|
298
|
+ color: #49b856;
|
|
299
|
+
|
|
300
|
+ &:after {
|
|
301
|
+ background-color: #49b856;
|
|
302
|
+ }
|
|
303
|
+ }
|
|
304
|
+ }
|
|
305
|
+ }
|
|
306
|
+
|
|
307
|
+ .zwsj {
|
|
308
|
+ position: absolute;
|
|
309
|
+ left: 50%;
|
|
310
|
+ top: 180rpx;
|
|
311
|
+ transform: translateX(-50%);
|
|
312
|
+
|
|
313
|
+ .zwsj-img {
|
|
314
|
+ width: 560rpx;
|
|
315
|
+ }
|
|
316
|
+
|
|
317
|
+ .zwsj-txt {
|
|
318
|
+ font-size: 36rpx;
|
|
319
|
+ font-weight: 700;
|
|
320
|
+ margin-top: 20rpx;
|
|
321
|
+ text-align: center;
|
|
322
|
+ }
|
|
323
|
+ }
|
|
324
|
+
|
|
325
|
+ .page_items {
|
|
326
|
+ // height: calc(100vh - 184rpx);
|
|
327
|
+ height: calc(100vh - 96rpx);
|
|
328
|
+ padding: 0 20rpx;
|
|
329
|
+ padding-top: 96rpx;
|
|
330
|
+
|
|
331
|
+ .page_items_scroll {
|
|
332
|
+ height: 100%;
|
|
333
|
+
|
|
334
|
+ .page_item_wrap {
|
|
335
|
+ position: relative;
|
|
336
|
+ margin-bottom: 32rpx;
|
|
337
|
+
|
|
338
|
+ .page_item {
|
|
339
|
+ margin-bottom: 16rpx;
|
|
340
|
+ // height: 276rpx;
|
|
341
|
+ height: 200rpx;
|
|
342
|
+ background: #fff;
|
|
343
|
+ border-radius: 8rpx;
|
|
344
|
+ overflow: hidden;
|
|
345
|
+ border: 2rpx solid #e5e9ed;
|
|
346
|
+ display: flex;
|
|
347
|
+ flex-direction: column;
|
|
348
|
+ justify-content: space-between;
|
|
349
|
+
|
|
350
|
+ .L {
|
|
351
|
+ width: 40rpx;
|
|
352
|
+ height: 40rpx;
|
|
353
|
+ border-radius: 50%;
|
|
354
|
+ background: #f9fafb;
|
|
355
|
+ position: absolute;
|
|
356
|
+ left: -24rpx;
|
|
357
|
+ top: 68rpx;
|
|
358
|
+ border: 2rpx solid #e5e9ed;
|
|
359
|
+ }
|
|
360
|
+
|
|
361
|
+ .R {
|
|
362
|
+ width: 40rpx;
|
|
363
|
+ height: 40rpx;
|
|
364
|
+ border-radius: 50%;
|
|
365
|
+ background: #f9fafb;
|
|
366
|
+ position: absolute;
|
|
367
|
+ float: right;
|
|
368
|
+ right: -24rpx;
|
|
369
|
+ top: 68rpx;
|
|
370
|
+ border: 2rpx solid #e5e9ed;
|
|
371
|
+ }
|
|
372
|
+
|
|
373
|
+ .page_item_top {
|
|
374
|
+ height: 86rpx;
|
|
375
|
+ border-bottom: 2rpx dashed #e5e9ed;
|
|
376
|
+ padding: 0 16rpx;
|
|
377
|
+ display: flex;
|
|
378
|
+ align-items: center;
|
|
379
|
+ justify-content: space-between;
|
|
380
|
+
|
|
381
|
+ .send_wrap {
|
|
382
|
+ display: flex;
|
|
383
|
+ justify-content: space-between;
|
|
384
|
+ align-items: center;
|
|
385
|
+ }
|
|
386
|
+
|
|
387
|
+ .sendBack {
|
|
388
|
+ button {
|
|
389
|
+ font-size: 28rpx;
|
|
390
|
+ height: 52rpx;
|
|
391
|
+ line-height: 52rpx;
|
|
392
|
+ margin: 0;
|
|
393
|
+ color: rgb(7, 134, 60);
|
|
394
|
+ }
|
|
395
|
+ }
|
|
396
|
+
|
|
397
|
+ .page_item_top_L {
|
|
398
|
+ height: 100%;
|
|
399
|
+ float: left;
|
|
400
|
+ display: flex;
|
|
401
|
+ align-items: center;
|
|
402
|
+ line-height: 88rpx;
|
|
403
|
+
|
|
404
|
+ .L_time {
|
|
405
|
+ color: #6cc076;
|
|
406
|
+ font-size: 32rpx;
|
|
407
|
+ }
|
|
408
|
+ }
|
|
409
|
+
|
|
410
|
+ .page_item_top_R {
|
|
411
|
+ height: 40rpx;
|
|
412
|
+ float: right;
|
|
413
|
+ line-height: 40rpx;
|
|
414
|
+ font-size: 24rpx;
|
|
415
|
+ padding: 0 8rpx;
|
|
416
|
+ background-color: red;
|
|
417
|
+ color: #fff;
|
|
418
|
+ }
|
|
419
|
+ }
|
|
420
|
+
|
|
421
|
+ .page_item_cont {
|
|
422
|
+ min-height: 100rpx;
|
|
423
|
+ max-height: 344rpx;
|
|
424
|
+ padding: 0 16rpx;
|
|
425
|
+ text-align: left;
|
|
426
|
+ position: relative;
|
|
427
|
+
|
|
428
|
+ .page_item_conts {
|
|
429
|
+ color: rgb(102, 102, 102);
|
|
430
|
+ font-size: 28rpx;
|
|
431
|
+ display: flex;
|
|
432
|
+ align-items: center;
|
|
433
|
+ min-height: 100rpx;
|
|
434
|
+ max-height: 344rpx;
|
|
435
|
+
|
|
436
|
+ view {
|
|
437
|
+ margin-bottom: 10rpx;
|
|
438
|
+ margin-left: 40rpx;
|
|
439
|
+
|
|
440
|
+ &:first-of-type {
|
|
441
|
+ margin-left: 0;
|
|
442
|
+ }
|
|
443
|
+ }
|
|
444
|
+
|
|
445
|
+ text {
|
|
446
|
+ color: #49b856;
|
|
447
|
+ }
|
|
448
|
+
|
|
449
|
+ .num {
|
|
450
|
+ float: right;
|
|
451
|
+ }
|
|
452
|
+ }
|
|
453
|
+ }
|
|
454
|
+
|
|
455
|
+ .page_item_btn {
|
|
456
|
+ height: 88rpx;
|
|
457
|
+ background-image: linear-gradient(to right, #72c172, #3bb197);
|
|
458
|
+ border-radius: 8rpx;
|
|
459
|
+ line-height: 88rpx;
|
|
460
|
+ color: #fff;
|
|
461
|
+ font-size: 36rpx;
|
|
462
|
+ font-weight: 700;
|
|
463
|
+ text-align: center;
|
|
464
|
+ }
|
|
465
|
+ }
|
|
466
|
+
|
|
467
|
+ .L-l {
|
|
468
|
+ width: 2rpx;
|
|
469
|
+ height: 40rpx;
|
|
470
|
+ background: #f9fafb;
|
|
471
|
+ position: absolute;
|
|
472
|
+ left: 20rpx;
|
|
473
|
+ top: 72rpx;
|
|
474
|
+ display: none;
|
|
475
|
+ }
|
|
476
|
+
|
|
477
|
+ .R-l {
|
|
478
|
+ width: 2rpx;
|
|
479
|
+ height: 40rpx;
|
|
480
|
+ background: #f9fafb;
|
|
481
|
+ position: absolute;
|
|
482
|
+ right: 20rpx;
|
|
483
|
+ top: 72rpx;
|
|
484
|
+ display: none;
|
|
485
|
+ }
|
|
486
|
+ }
|
|
487
|
+ }
|
|
488
|
+ }
|
|
489
|
+ }
|
|
490
|
+</style>
|