|
@@ -0,0 +1,461 @@
|
|
1
|
+<template>
|
|
2
|
+ <view class="pharmacyDetails" v-show="nucleicAcidDto.batchNo">
|
|
3
|
+ <view class="pharmacyDetails_title">核酸信息</view>
|
|
4
|
+ <view class="page_item_wrap">
|
|
5
|
+ <view class="page_item">
|
|
6
|
+ <view class="page_item_top">
|
|
7
|
+ <view class="page_item_top-inner">
|
|
8
|
+ <view class="page_item_top_L">
|
|
9
|
+ <text class="L_text">批次号:{{ nucleicAcidDto.batchNo||'-' }}</text>
|
|
10
|
+ </view>
|
|
11
|
+ <view class="page_item_top_R">
|
|
12
|
+ <text class="L_iocn">{{
|
|
13
|
+ nucleicAcidDto.state == 1 ? "已闭环" : "未闭环"
|
|
14
|
+ }}</text>
|
|
15
|
+ </view>
|
|
16
|
+ </view>
|
|
17
|
+ </view>
|
|
18
|
+ <view class="page_item_cont">
|
|
19
|
+ <view class="page_item_cont_B">
|
|
20
|
+ <view class="page_item_cont_title">
|
|
21
|
+ <text>楼栋名称</text>
|
|
22
|
+ <text class="text_big">
|
|
23
|
+ <text>
|
|
24
|
+ {{nucleicAcidDto.BuildName || "-"}}
|
|
25
|
+ </text>
|
|
26
|
+ </text>
|
|
27
|
+ </view>
|
|
28
|
+ </view>
|
|
29
|
+ <view class="page_item_cont_C">
|
|
30
|
+ <view class="page_item_cont_title_C">
|
|
31
|
+ <text>工单总数</text>
|
|
32
|
+ <text class="text_big">
|
|
33
|
+ <text>{{ nucleicAcidDto.orderCount||'-' }}</text>
|
|
34
|
+ </text>
|
|
35
|
+ </view>
|
|
36
|
+ </view>
|
|
37
|
+ <view class="page_item_cont_C">
|
|
38
|
+ <view class="page_item_cont_title_C">
|
|
39
|
+ <text style="flex: 1;flex-shrink: 0;">起点科室</text>
|
|
40
|
+ <text class="text_big" style="flex: 1;text-align:justify;overflow:hidden;">
|
|
41
|
+ <text style="float:right;">{{
|
|
42
|
+ nucleicAcidDto.deptNames ? nucleicAcidDto.deptNames.toString() : "-"
|
|
43
|
+ }}</text>
|
|
44
|
+ </text>
|
|
45
|
+ </view>
|
|
46
|
+ </view>
|
|
47
|
+ </view>
|
|
48
|
+ <view class="L"></view>
|
|
49
|
+ <view class="R"></view>
|
|
50
|
+ </view>
|
|
51
|
+ <view class="L-l"></view>
|
|
52
|
+ <view class="R-l"></view>
|
|
53
|
+ </view>
|
|
54
|
+ <view class="foot_btn">
|
|
55
|
+ <view class="btn3" v-if="nucleicAcidDto.state == 0" @click="closedLoop()">闭环工单</view>
|
|
56
|
+ <view class="btn3" @click="goBack()">知道了</view>
|
|
57
|
+ </view>
|
|
58
|
+ <!-- 弹窗 -->
|
|
59
|
+ <nucleicAcidCollection v-if="changeSpeModels.disjunctor" :title="changeSpeModels.title" :content="changeSpeModels.content"
|
|
60
|
+ :disjunctor="changeSpeModels.disjunctor" @ok="changeSpeOk" @cancel="changeSpeCancel">
|
|
61
|
+ </nucleicAcidCollection>
|
|
62
|
+ </view>
|
|
63
|
+</template>
|
|
64
|
+<script>
|
|
65
|
+ import {
|
|
66
|
+ webHandle,
|
|
67
|
+ post
|
|
68
|
+ } from "../../http/http.js";
|
|
69
|
+ export default {
|
|
70
|
+ data() {
|
|
71
|
+ return {
|
|
72
|
+ options:{},
|
|
73
|
+ // 弹窗
|
|
74
|
+ changeSpeModels: {
|
|
75
|
+ disjunctor: false,
|
|
76
|
+ },
|
|
77
|
+ nucleicAcidDto: {}, //核酸信息
|
|
78
|
+ gotoFlag: true,
|
|
79
|
+ };
|
|
80
|
+ },
|
|
81
|
+ methods: {
|
|
82
|
+ // 闭环工单 - 确定
|
|
83
|
+ changeSpeOk(data) {
|
|
84
|
+ console.log(data);
|
|
85
|
+ const pathUrl = uni.getStorageSync("path");
|
|
86
|
+ const {
|
|
87
|
+ reason,
|
|
88
|
+ imageValue
|
|
89
|
+ } = data;
|
|
90
|
+ this.changeSpeModels.disjunctor = false;
|
|
91
|
+ uni.showLoading({
|
|
92
|
+ mask: true,
|
|
93
|
+ title: "加载中",
|
|
94
|
+ });
|
|
95
|
+ let postData = {
|
|
96
|
+ qrcode: this.options.qrcode,
|
|
97
|
+ remark: reason,
|
|
98
|
+ };
|
|
99
|
+ post("/api/closedLoopNucleicAcid", postData).then((res) => {
|
|
100
|
+ this.gotoFlag = true;
|
|
101
|
+ if (res.status == 200) {
|
|
102
|
+ console.log(imageValue);
|
|
103
|
+ if (!imageValue.length) {
|
|
104
|
+ uni.hideLoading();
|
|
105
|
+ uni.navigateTo({
|
|
106
|
+ url: "../receiptpage/receiptpage",
|
|
107
|
+ });
|
|
108
|
+ return;
|
|
109
|
+ }
|
|
110
|
+ let n = 0;
|
|
111
|
+ imageValue.forEach((v) => {
|
|
112
|
+ // 图片上传 start
|
|
113
|
+ console.log("压缩前");
|
|
114
|
+ let canvasWidth = v.image.width; //图片原始长宽
|
|
115
|
+ let canvasHeight = v.image.height;
|
|
116
|
+ let img = new Image();
|
|
117
|
+ img.src = v.path;
|
|
118
|
+ let canvas = document.createElement("canvas");
|
|
119
|
+ let ctx = canvas.getContext("2d");
|
|
120
|
+ canvas.width = canvasWidth;
|
|
121
|
+ canvas.height = canvasHeight;
|
|
122
|
+ ctx.drawImage(img, 0, 0, canvasWidth, canvasHeight);
|
|
123
|
+ canvas.toBlob(
|
|
124
|
+ (fileSrc) => {
|
|
125
|
+ let tp = window.URL.createObjectURL(fileSrc);
|
|
126
|
+ console.log("压缩后");
|
|
127
|
+ n++;
|
|
128
|
+ uni.uploadFile({
|
|
129
|
+ url: pathUrl +
|
|
130
|
+ "/common/common/uploadAttachment/nucleicAcidPhotos/" +
|
|
131
|
+ res.nucleicAcidId +
|
|
132
|
+ "/666",
|
|
133
|
+ filePath: tp,
|
|
134
|
+ name: "file",
|
|
135
|
+ formData: {
|
|
136
|
+ filename: v.name,
|
|
137
|
+ },
|
|
138
|
+ success: (uploadFileRes) => {
|
|
139
|
+ console.log(uploadFileRes);
|
|
140
|
+ if (--n === 0) {
|
|
141
|
+ uni.hideLoading();
|
|
142
|
+ uni.navigateTo({
|
|
143
|
+ url: "../receiptpage/receiptpage",
|
|
144
|
+ });
|
|
145
|
+ }
|
|
146
|
+ },
|
|
147
|
+ fail: (err) => {
|
|
148
|
+ n--;
|
|
149
|
+ console.error(err);
|
|
150
|
+ uni.hideLoading();
|
|
151
|
+ uni.showToast({
|
|
152
|
+ icon: "none",
|
|
153
|
+ title: "上传失败",
|
|
154
|
+ duration: 2000,
|
|
155
|
+ });
|
|
156
|
+ },
|
|
157
|
+ });
|
|
158
|
+ },
|
|
159
|
+ "image/jpeg",
|
|
160
|
+ 0.3
|
|
161
|
+ );
|
|
162
|
+ // 图片上传 end
|
|
163
|
+ });
|
|
164
|
+ } else {
|
|
165
|
+ uni.hideLoading();
|
|
166
|
+ uni.showToast({
|
|
167
|
+ icon: "none",
|
|
168
|
+ title: "请求失败!",
|
|
169
|
+ });
|
|
170
|
+ }
|
|
171
|
+ });
|
|
172
|
+ },
|
|
173
|
+ // 闭环工单-取消
|
|
174
|
+ changeSpeCancel() {
|
|
175
|
+ this.gotoFlag = true;
|
|
176
|
+ this.changeSpeModels.disjunctor = false;
|
|
177
|
+ },
|
|
178
|
+ goBack() {
|
|
179
|
+ uni.navigateTo({
|
|
180
|
+ url: "../receiptpage/receiptpage",
|
|
181
|
+ });
|
|
182
|
+ },
|
|
183
|
+ // 闭环工单
|
|
184
|
+ closedLoop() {
|
|
185
|
+ if (!this.gotoFlag) {
|
|
186
|
+ return;
|
|
187
|
+ }
|
|
188
|
+ this.gotoFlag = false;
|
|
189
|
+ this.changeSpeModels = {
|
|
190
|
+ title: "提示",
|
|
191
|
+ content: `您确定要闭环${this.nucleicAcidDto.BuildName}的关联工单吗,您可填写备注和图片`,
|
|
192
|
+ disjunctor: true,
|
|
193
|
+ };
|
|
194
|
+ },
|
|
195
|
+ //获取信息
|
|
196
|
+ showNucleicAcid(qrcode) {
|
|
197
|
+ uni.showLoading({
|
|
198
|
+ title: "加载中",
|
|
199
|
+ mask: true,
|
|
200
|
+ });
|
|
201
|
+ post("/api/showNucleicAcid", {
|
|
202
|
+ code:qrcode,
|
|
203
|
+ }).then((res) => {
|
|
204
|
+ uni.hideLoading();
|
|
205
|
+ if (res.status == 200) {
|
|
206
|
+ this.nucleicAcidDto = res || {};
|
|
207
|
+ console.log(this.nucleicAcidDto)
|
|
208
|
+ } else {
|
|
209
|
+ uni.showToast({
|
|
210
|
+ icon: "none",
|
|
211
|
+ title: "请求失败",
|
|
212
|
+ });
|
|
213
|
+ }
|
|
214
|
+ });
|
|
215
|
+ },
|
|
216
|
+ },
|
|
217
|
+ onShow() {
|
|
218
|
+ this.gotoFlag = true;
|
|
219
|
+ },
|
|
220
|
+ onLoad(options) {
|
|
221
|
+ console.log(options);
|
|
222
|
+ this.options = options;
|
|
223
|
+ let { qrcode } = options;
|
|
224
|
+ qrcode && this.showNucleicAcid(qrcode);
|
|
225
|
+ // #ifdef APP-PLUS
|
|
226
|
+ webHandle("no", "app");
|
|
227
|
+ // #endif
|
|
228
|
+ // #ifdef H5
|
|
229
|
+ webHandle("no", "wx");
|
|
230
|
+ // #endif
|
|
231
|
+ },
|
|
232
|
+ };
|
|
233
|
+</script>
|
|
234
|
+<style lang="less" scoped>
|
|
235
|
+ .pharmacyDetails {
|
|
236
|
+ background-color: rgb(249, 250, 251);
|
|
237
|
+ padding-top: 10%;
|
|
238
|
+ margin-bottom: 100rpx;
|
|
239
|
+
|
|
240
|
+ .pharmacyDetails_title {
|
|
241
|
+ font-size: 46rpx;
|
|
242
|
+ font-weight: 550;
|
|
243
|
+ text-align: center;
|
|
244
|
+ }
|
|
245
|
+
|
|
246
|
+ .page_item_wrap {
|
|
247
|
+ position: relative;
|
|
248
|
+ margin-top: 32rpx;
|
|
249
|
+
|
|
250
|
+ .page_item {
|
|
251
|
+ margin-top: 16rpx;
|
|
252
|
+ margin-bottom: 124rpx;
|
|
253
|
+ background: #fff;
|
|
254
|
+ border-radius: 8rpx;
|
|
255
|
+ margin: 0 20rpx;
|
|
256
|
+ border: 2rpx solid #e5e9ed;
|
|
257
|
+ position: relative;
|
|
258
|
+ overflow: hidden;
|
|
259
|
+ padding: 0 16rpx;
|
|
260
|
+
|
|
261
|
+ .L {
|
|
262
|
+ width: 40rpx;
|
|
263
|
+ height: 40rpx;
|
|
264
|
+ border-radius: 50%;
|
|
265
|
+ background: #f9fafb;
|
|
266
|
+ position: absolute;
|
|
267
|
+ left: -20rpx;
|
|
268
|
+ top: 68rpx;
|
|
269
|
+ border: 2rpx solid #e5e9ed;
|
|
270
|
+ }
|
|
271
|
+
|
|
272
|
+ .R {
|
|
273
|
+ width: 40rpx;
|
|
274
|
+ height: 40rpx;
|
|
275
|
+ border-radius: 50%;
|
|
276
|
+ background: #f9fafb;
|
|
277
|
+ position: absolute;
|
|
278
|
+ float: right;
|
|
279
|
+ right: -20rpx;
|
|
280
|
+ top: 68rpx;
|
|
281
|
+ border: 2rpx solid #e5e9ed;
|
|
282
|
+ }
|
|
283
|
+
|
|
284
|
+ .page_item_top {
|
|
285
|
+ height: 88rpx;
|
|
286
|
+ border-bottom: 2rpx dashed #e5e9ed;
|
|
287
|
+ padding: 0 16rpx;
|
|
288
|
+
|
|
289
|
+ .page_item_top-inner {
|
|
290
|
+ display: flex;
|
|
291
|
+ justify-content: space-between;
|
|
292
|
+ align-items: center;
|
|
293
|
+ height: 100%;
|
|
294
|
+
|
|
295
|
+ .page_item_top_L {
|
|
296
|
+ .L_text {
|
|
297
|
+ font-size: 32rpx;
|
|
298
|
+ font-weight: 700;
|
|
299
|
+ }
|
|
300
|
+ }
|
|
301
|
+
|
|
302
|
+ .page_item_top_R {
|
|
303
|
+ font-size: 32rpx;
|
|
304
|
+
|
|
305
|
+ .L_iocn {
|
|
306
|
+ color: rgb(7, 134, 60);
|
|
307
|
+ font-size: 36rpx;
|
|
308
|
+ font-weight: 700;
|
|
309
|
+ }
|
|
310
|
+ }
|
|
311
|
+ }
|
|
312
|
+ }
|
|
313
|
+
|
|
314
|
+ .page_item_cont {
|
|
315
|
+ min-height: 180rpx;
|
|
316
|
+ // max-height: 424rpx;
|
|
317
|
+ padding: 0 16rpx;
|
|
318
|
+ text-align: left;
|
|
319
|
+ position: relative;
|
|
320
|
+
|
|
321
|
+ .text_big {
|
|
322
|
+ font-size: 32rpx;
|
|
323
|
+ font-weight: 700;
|
|
324
|
+
|
|
325
|
+ text {
|
|
326
|
+ font-weight: 700;
|
|
327
|
+ line-height: 1.5;
|
|
328
|
+ }
|
|
329
|
+ }
|
|
330
|
+
|
|
331
|
+ .line {
|
|
332
|
+ height: 20rpx;
|
|
333
|
+ width: 2rpx;
|
|
334
|
+ border-left: 2rpx solid #e5e9ed;
|
|
335
|
+ position: absolute;
|
|
336
|
+ top: 82rpx;
|
|
337
|
+ left: 40rpx;
|
|
338
|
+ }
|
|
339
|
+
|
|
340
|
+ .page_item_cont_T {
|
|
341
|
+ padding-top: 28rpx;
|
|
342
|
+ font-size: 28rpx;
|
|
343
|
+
|
|
344
|
+ .page_item_cont_title {
|
|
345
|
+ height: 100%;
|
|
346
|
+ font-size: 32rpx;
|
|
347
|
+ display: flex;
|
|
348
|
+ justify-content: space-between;
|
|
349
|
+ }
|
|
350
|
+ }
|
|
351
|
+
|
|
352
|
+ .page_item_cont_B {
|
|
353
|
+ padding-top: 28rpx;
|
|
354
|
+ margin-bottom: 28rpx;
|
|
355
|
+
|
|
356
|
+ .page_item_cont_title {
|
|
357
|
+ font-size: 32rpx;
|
|
358
|
+ display: flex;
|
|
359
|
+ justify-content: space-between;
|
|
360
|
+ align-items: center;
|
|
361
|
+ }
|
|
362
|
+ }
|
|
363
|
+
|
|
364
|
+ .page_item_cont_C {
|
|
365
|
+ margin-bottom: 28rpx;
|
|
366
|
+
|
|
367
|
+ .page_item_cont_title_C {
|
|
368
|
+ font-size: 32rpx;
|
|
369
|
+ display: flex;
|
|
370
|
+ justify-content: space-between;
|
|
371
|
+ align-items: center;
|
|
372
|
+ }
|
|
373
|
+ }
|
|
374
|
+
|
|
375
|
+ #infos {
|
|
376
|
+ display: none;
|
|
377
|
+ }
|
|
378
|
+ }
|
|
379
|
+ }
|
|
380
|
+
|
|
381
|
+ .L-l {
|
|
382
|
+ width: 2rpx;
|
|
383
|
+ height: 40rpx;
|
|
384
|
+ background: #f9fafb;
|
|
385
|
+ position: absolute;
|
|
386
|
+ left: 20rpx;
|
|
387
|
+ top: 72rpx;
|
|
388
|
+ }
|
|
389
|
+
|
|
390
|
+ .R-l {
|
|
391
|
+ width: 2rpx;
|
|
392
|
+ height: 40rpx;
|
|
393
|
+ background: #f9fafb;
|
|
394
|
+ position: absolute;
|
|
395
|
+ right: 20rpx;
|
|
396
|
+ top: 72rpx;
|
|
397
|
+ }
|
|
398
|
+ }
|
|
399
|
+
|
|
400
|
+ .cube-toolbar-item {
|
|
401
|
+ width: 710rpx;
|
|
402
|
+ height: 68rpx;
|
|
403
|
+ line-height: 68rpx;
|
|
404
|
+ position: fixed;
|
|
405
|
+ left: 20rpx;
|
|
406
|
+ bottom: 160rpx;
|
|
407
|
+ border-radius: 8rpx;
|
|
408
|
+ background: linear-gradient(to right, #72c172, #3bb197);
|
|
409
|
+ font-size: 36rpx;
|
|
410
|
+ color: #fff;
|
|
411
|
+ text-align: center;
|
|
412
|
+ }
|
|
413
|
+
|
|
414
|
+ .btn-wrap {
|
|
415
|
+ display: flex;
|
|
416
|
+ justify-content: space-between;
|
|
417
|
+ position: fixed;
|
|
418
|
+ left: 20rpx;
|
|
419
|
+ bottom: 160rpx;
|
|
420
|
+ }
|
|
421
|
+
|
|
422
|
+ .cube-toolbar-item1 {
|
|
423
|
+ width: 350rpx;
|
|
424
|
+ height: 68rpx;
|
|
425
|
+ line-height: 68rpx;
|
|
426
|
+ border-radius: 8rpx;
|
|
427
|
+ margin: 0 5rpx;
|
|
428
|
+ background: linear-gradient(to right, #72c172, #3bb197);
|
|
429
|
+ font-size: 36rpx;
|
|
430
|
+ color: #fff;
|
|
431
|
+ text-align: center;
|
|
432
|
+ }
|
|
433
|
+ .foot_btn {
|
|
434
|
+ background-color: #fff;
|
|
435
|
+ position: fixed;
|
|
436
|
+ bottom: 0;
|
|
437
|
+ width: 100%;
|
|
438
|
+ line-height: 88rpx;
|
|
439
|
+ height: 100rpx;
|
|
440
|
+ margin: 40rpx 16rpx 0;
|
|
441
|
+ display: flex;
|
|
442
|
+ justify-content: center;
|
|
443
|
+
|
|
444
|
+ .btn3 {
|
|
445
|
+ flex: 1;
|
|
446
|
+ height: 88rpx;
|
|
447
|
+ background-image: linear-gradient(to right, #72c172, #3bb197);
|
|
448
|
+ color: #fff;
|
|
449
|
+ border-radius: 8rpx;
|
|
450
|
+ font-size: 32rpx;
|
|
451
|
+ margin-top: 16rpx;
|
|
452
|
+ margin-right: 16rpx;
|
|
453
|
+ text-align: center;
|
|
454
|
+
|
|
455
|
+ &:last-of-type {
|
|
456
|
+ margin-right: 0;
|
|
457
|
+ }
|
|
458
|
+ }
|
|
459
|
+ }
|
|
460
|
+ }
|
|
461
|
+</style>
|