seimin vor 1 Jahr
Ursprung
Commit
3d4959f6f4

+ 0 - 1
pages.json

@@ -396,7 +396,6 @@
396 396
   ],
397 397
   "globalStyle": {
398 398
     "navigationBarTextStyle": "black",
399
-    "navigationBarTitleText": "医疗服务中心转运系统",
400 399
     "navigationBarBackgroundColor": "#F8F8F8",
401 400
     "backgroundColor": "#F8F8F8"
402 401
   }

+ 7 - 6
pages/otherCompleteOrder/otherCompleteOrder.vue

@@ -167,6 +167,8 @@
167 167
           }else{
168 168
             this.postWorkerOrder(data, accountObj);
169 169
           }
170
+        }else{
171
+          uni.hideLoading();
170 172
         }
171 173
       },
172 174
       
@@ -267,7 +269,6 @@
267 269
           taskTypeId: data.taskType.id,
268 270
           gdState: data.gdState.id,
269 271
         }).then((result) => {
270
-          uni.hideLoading();
271 272
           this.currentCode = result.code;
272 273
           if (result.state == 200 || result.state == 201) {
273 274
             let accountObj = undefined;
@@ -291,8 +292,10 @@
291 292
               this.uploadToOther(data, accountObj, type);
292 293
             }
293 294
           } else if (result.state == '0000') {
295
+            uni.hideLoading();
294 296
             this.showSelectAccount();
295 297
           } else {
298
+            uni.hideLoading();
296 299
             uni.showToast({
297 300
               icon: "none",
298 301
               title: "请求失败!",
@@ -345,14 +348,12 @@
345 348
                     success: (uploadFileRes) => {
346 349
                       console.log(uploadFileRes);
347 350
                       if (--n === 0) {
348
-                        uni.hideLoading();
349 351
                         this.nextDeptOrder_ss(data, accountObj, type);
350 352
                       }
351 353
                     },
352 354
                     fail: (err) => {
353 355
                       n--;
354 356
                       console.error(err);
355
-                      uni.hideLoading();
356 357
                       uni.showToast({
357 358
                         icon: "none",
358 359
                         title: "上传失败",
@@ -362,7 +363,7 @@
362 363
                   });
363 364
                 },
364 365
                 "image/jpeg",
365
-                0.3
366
+                0.1
366 367
               );
367 368
               // 图片上传 end
368 369
             });
@@ -391,14 +392,12 @@
391 392
                     success: (uploadFileRes) => {
392 393
                       console.log(uploadFileRes);
393 394
                       if (--n === 0) {
394
-                        uni.hideLoading();
395 395
                         this.nextDeptOrder_ss(data, accountObj, type);
396 396
                       }
397 397
                     },
398 398
                     fail: (err) => {
399 399
                       n--;
400 400
                       console.error(err);
401
-                      uni.hideLoading();
402 401
                       uni.showToast({
403 402
                         icon: "none",
404 403
                         title: "上传失败",
@@ -419,6 +418,8 @@
419 418
               // 图片上传 end
420 419
             });
421 420
             //#endif
421
+          }else{
422
+            uni.hideLoading();
422 423
           }
423 424
         })
424 425
       },

+ 62 - 24
pages/receiptpage/receiptpage.vue

@@ -749,6 +749,7 @@
749 749
         }
750 750
         //#ifdef H5
751 751
         uni.chooseImage({
752
+          count: 1,
752 753
           sourceType: ['camera'],
753 754
           success: (chooseImageRes) => {
754 755
             console.log(chooseImageRes, pathUrl)
@@ -828,7 +829,9 @@
828 829
         //#endif
829 830
         //#ifdef APP-PLUS
830 831
         uni.chooseImage({
832
+          count: 1,
831 833
           sourceType: ['camera'],
834
+          sizeType: ['compressed'],
832 835
           success: (chooseImageRes) => {
833 836
             console.log(chooseImageRes, pathUrl)
834 837
             const tempFilePaths = chooseImageRes.tempFilePaths;
@@ -897,40 +900,75 @@
897 900
         //#endif
898 901
       },
899 902
       // 拍照-其他
900
-      photographToOther(data, type) {
903
+      async photographToOther(data, type) {
901 904
         this.currentData = data;
902 905
         uni.showLoading({
903 906
           title: "加载中",
904 907
           mask: true,
905 908
         });
906 909
         // 其他临床服务
907
-        //检验二维码的有效性
908
-        post("/dept/scanning", {
910
+        let result = await post("/dept/scanning", {
909 911
           content: type === 'start' ? data.startDept.qrcode : data.endDepts[0].qrcode,
910 912
           taskTypeId: data.taskType.id,
911 913
           gdState: data.gdState.id,
912
-        }).then((result) => {
913
-          uni.hideLoading();
914
-          this.currentCode = result.code;
915
-          if (result.state == 200 || result.state == 201) {
916
-            if (result.account) {
917
-              this.uploadToOther(data, {
918
-                account: result.account,
919
-                accountName: result.name,
920
-                accountId: result.id,
921
-              }, type);
922
-            } else {
923
-              this.uploadToOther(data, undefined, type);
924
-            }
925
-          } else if (result.state == '0000') {
926
-            this.showSelectAccount();
927
-          } else {
928
-            uni.showToast({
929
-              icon: "none",
930
-              title: "请求失败!",
931
-            });
932
-          }
933 914
         });
915
+        uni.hideLoading();
916
+        this.currentCode = result.code;
917
+        if (result.state == 200 || result.state == 201) {
918
+          uni.showModal({
919
+          	title: '提示',
920
+          	content: '请尽量拍摄角度覆盖清洁区域?',
921
+          	success: (res) => {
922
+          		if (res.confirm) {
923
+          			if (result.account) {
924
+          			  this.uploadToOther(data, {
925
+          			    account: result.account,
926
+          			    accountName: result.name,
927
+          			    accountId: result.id,
928
+          			  }, type);
929
+          			} else {
930
+          			  this.uploadToOther(data, undefined, type);
931
+          			}
932
+          		} else if (res.cancel) {
933
+          			console.log('用户点击取消');
934
+          		}
935
+          	}
936
+          });
937
+        } else if (result.state == '0000') {
938
+          this.showSelectAccount();
939
+        } else {
940
+          uni.showToast({
941
+            icon: "none",
942
+            title: "请求失败!",
943
+          });
944
+        }
945
+        //检验二维码的有效性
946
+        // post("/dept/scanning", {
947
+        //   content: type === 'start' ? data.startDept.qrcode : data.endDepts[0].qrcode,
948
+        //   taskTypeId: data.taskType.id,
949
+        //   gdState: data.gdState.id,
950
+        // }).then((result) => {
951
+        //   uni.hideLoading();
952
+        //   this.currentCode = result.code;
953
+        //   if (result.state == 200 || result.state == 201) {
954
+        //     if (result.account) {
955
+        //       this.uploadToOther(data, {
956
+        //         account: result.account,
957
+        //         accountName: result.name,
958
+        //         accountId: result.id,
959
+        //       }, type);
960
+        //     } else {
961
+        //       this.uploadToOther(data, undefined, type);
962
+        //     }
963
+        //   } else if (result.state == '0000') {
964
+        //     this.showSelectAccount();
965
+        //   } else {
966
+        //     uni.showToast({
967
+        //       icon: "none",
968
+        //       title: "请求失败!",
969
+        //     });
970
+        //   }
971
+        // });
934 972
       },
935 973
       // 悬浮按钮点击事件
936 974
       trigger(e) {

+ 4 - 0
tools/photograph.js

@@ -19,6 +19,7 @@ export function photographTool(data, deptObj) {
19 19
   }
20 20
   //#ifdef H5
21 21
   uni.chooseImage({
22
+    count: 1,
22 23
     sourceType: ['camera'],
23 24
     success: (chooseImageRes) => {
24 25
       console.log(chooseImageRes, pathUrl)
@@ -26,6 +27,7 @@ export function photographTool(data, deptObj) {
26 27
       const tempFiles = chooseImageRes.tempFiles;
27 28
       let tp = tempFilePaths[0];
28 29
       uni.showLoading({
30
+        mask: true,
29 31
         title: '上传中'
30 32
       });
31 33
       post('/workerOrder/findPatientCodeByWorkOrderId', {
@@ -210,6 +212,7 @@ export function photographTool(data, deptObj) {
210 212
   //#endif
211 213
   // #ifdef APP-PLUS
212 214
   uni.chooseImage({
215
+    count: 1,
213 216
     sourceType: ['camera'],
214 217
     sizeType: ['compressed'],
215 218
     success: (chooseImageRes) => {
@@ -218,6 +221,7 @@ export function photographTool(data, deptObj) {
218 221
       const tempFiles = chooseImageRes.tempFiles;
219 222
       let tp = tempFilePaths[0];
220 223
       uni.showLoading({
224
+        mask: true,
221 225
         title: '上传中'
222 226
       });
223 227
       post('/workerOrder/findPatientCodeByWorkOrderId', {