seimin 2 lat temu
rodzic
commit
3d4959f6f4

+ 0 - 1
pages.json

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

+ 7 - 6
pages/otherCompleteOrder/otherCompleteOrder.vue

@@ -167,6 +167,8 @@
167
           }else{
167
           }else{
168
             this.postWorkerOrder(data, accountObj);
168
             this.postWorkerOrder(data, accountObj);
169
           }
169
           }
170
+        }else{
171
+          uni.hideLoading();
170
         }
172
         }
171
       },
173
       },
172
       
174
       
@@ -267,7 +269,6 @@
267
           taskTypeId: data.taskType.id,
269
           taskTypeId: data.taskType.id,
268
           gdState: data.gdState.id,
270
           gdState: data.gdState.id,
269
         }).then((result) => {
271
         }).then((result) => {
270
-          uni.hideLoading();
271
           this.currentCode = result.code;
272
           this.currentCode = result.code;
272
           if (result.state == 200 || result.state == 201) {
273
           if (result.state == 200 || result.state == 201) {
273
             let accountObj = undefined;
274
             let accountObj = undefined;
@@ -291,8 +292,10 @@
291
               this.uploadToOther(data, accountObj, type);
292
               this.uploadToOther(data, accountObj, type);
292
             }
293
             }
293
           } else if (result.state == '0000') {
294
           } else if (result.state == '0000') {
295
+            uni.hideLoading();
294
             this.showSelectAccount();
296
             this.showSelectAccount();
295
           } else {
297
           } else {
298
+            uni.hideLoading();
296
             uni.showToast({
299
             uni.showToast({
297
               icon: "none",
300
               icon: "none",
298
               title: "请求失败!",
301
               title: "请求失败!",
@@ -345,14 +348,12 @@
345
                     success: (uploadFileRes) => {
348
                     success: (uploadFileRes) => {
346
                       console.log(uploadFileRes);
349
                       console.log(uploadFileRes);
347
                       if (--n === 0) {
350
                       if (--n === 0) {
348
-                        uni.hideLoading();
349
                         this.nextDeptOrder_ss(data, accountObj, type);
351
                         this.nextDeptOrder_ss(data, accountObj, type);
350
                       }
352
                       }
351
                     },
353
                     },
352
                     fail: (err) => {
354
                     fail: (err) => {
353
                       n--;
355
                       n--;
354
                       console.error(err);
356
                       console.error(err);
355
-                      uni.hideLoading();
356
                       uni.showToast({
357
                       uni.showToast({
357
                         icon: "none",
358
                         icon: "none",
358
                         title: "上传失败",
359
                         title: "上传失败",
@@ -362,7 +363,7 @@
362
                   });
363
                   });
363
                 },
364
                 },
364
                 "image/jpeg",
365
                 "image/jpeg",
365
-                0.3
366
+                0.1
366
               );
367
               );
367
               // 图片上传 end
368
               // 图片上传 end
368
             });
369
             });
@@ -391,14 +392,12 @@
391
                     success: (uploadFileRes) => {
392
                     success: (uploadFileRes) => {
392
                       console.log(uploadFileRes);
393
                       console.log(uploadFileRes);
393
                       if (--n === 0) {
394
                       if (--n === 0) {
394
-                        uni.hideLoading();
395
                         this.nextDeptOrder_ss(data, accountObj, type);
395
                         this.nextDeptOrder_ss(data, accountObj, type);
396
                       }
396
                       }
397
                     },
397
                     },
398
                     fail: (err) => {
398
                     fail: (err) => {
399
                       n--;
399
                       n--;
400
                       console.error(err);
400
                       console.error(err);
401
-                      uni.hideLoading();
402
                       uni.showToast({
401
                       uni.showToast({
403
                         icon: "none",
402
                         icon: "none",
404
                         title: "上传失败",
403
                         title: "上传失败",
@@ -419,6 +418,8 @@
419
               // 图片上传 end
418
               // 图片上传 end
420
             });
419
             });
421
             //#endif
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
         //#ifdef H5
750
         //#ifdef H5
751
         uni.chooseImage({
751
         uni.chooseImage({
752
+          count: 1,
752
           sourceType: ['camera'],
753
           sourceType: ['camera'],
753
           success: (chooseImageRes) => {
754
           success: (chooseImageRes) => {
754
             console.log(chooseImageRes, pathUrl)
755
             console.log(chooseImageRes, pathUrl)
@@ -828,7 +829,9 @@
828
         //#endif
829
         //#endif
829
         //#ifdef APP-PLUS
830
         //#ifdef APP-PLUS
830
         uni.chooseImage({
831
         uni.chooseImage({
832
+          count: 1,
831
           sourceType: ['camera'],
833
           sourceType: ['camera'],
834
+          sizeType: ['compressed'],
832
           success: (chooseImageRes) => {
835
           success: (chooseImageRes) => {
833
             console.log(chooseImageRes, pathUrl)
836
             console.log(chooseImageRes, pathUrl)
834
             const tempFilePaths = chooseImageRes.tempFilePaths;
837
             const tempFilePaths = chooseImageRes.tempFilePaths;
@@ -897,40 +900,75 @@
897
         //#endif
900
         //#endif
898
       },
901
       },
899
       // 拍照-其他
902
       // 拍照-其他
900
-      photographToOther(data, type) {
903
+      async photographToOther(data, type) {
901
         this.currentData = data;
904
         this.currentData = data;
902
         uni.showLoading({
905
         uni.showLoading({
903
           title: "加载中",
906
           title: "加载中",
904
           mask: true,
907
           mask: true,
905
         });
908
         });
906
         // 其他临床服务
909
         // 其他临床服务
907
-        //检验二维码的有效性
908
-        post("/dept/scanning", {
910
+        let result = await post("/dept/scanning", {
909
           content: type === 'start' ? data.startDept.qrcode : data.endDepts[0].qrcode,
911
           content: type === 'start' ? data.startDept.qrcode : data.endDepts[0].qrcode,
910
           taskTypeId: data.taskType.id,
912
           taskTypeId: data.taskType.id,
911
           gdState: data.gdState.id,
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
       trigger(e) {
974
       trigger(e) {

+ 4 - 0
tools/photograph.js

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