Browse Source

接单筛选bug修复

maotao 9 months ago
parent
commit
551a38f23c
4 changed files with 45 additions and 28 deletions
  1. 5 5
      package-lock.json
  2. 1 1
      package.json
  3. 30 19
      pages/receiptpage/receiptpage.vue
  4. 9 3
      pages/search/search.vue

+ 5 - 5
package-lock.json

@@ -12,7 +12,7 @@
12 12
         "big.js": "^6.2.1",
13 13
         "crypto-js": "^4.1.1",
14 14
         "dayjs": "^1.11.10",
15
-        "js-base64": "^3.7.5",
15
+        "js-base64": "^3.0.0",
16 16
         "spinkit": "^2.0.1",
17 17
         "weixin-jsapi": "^1.1.0"
18 18
       },
@@ -222,9 +222,9 @@
222 222
       }
223 223
     },
224 224
     "node_modules/js-base64": {
225
-      "version": "3.7.7",
226
-      "resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.7.tgz",
227
-      "integrity": "sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw=="
225
+      "version": "3.0.0",
226
+      "resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.0.0.tgz",
227
+      "integrity": "sha512-mm6+q5LzUWw8jABsLkg7J5A0YL/SL3RgkzIKQaXN+LTaH3x3LQ+ALPM0jnINUtdsVNNpJuKubtecczlHIi92uQ=="
228 228
     },
229 229
     "node_modules/minimatch": {
230 230
       "version": "3.1.2",
@@ -465,4 +465,4 @@
465 465
       "dev": true
466 466
     }
467 467
   }
468
-}
468
+}

+ 1 - 1
package.json

@@ -17,7 +17,7 @@
17 17
     "big.js": "^6.2.1",
18 18
     "crypto-js": "^4.1.1",
19 19
     "dayjs": "^1.11.10",
20
-    "js-base64": "^3.7.5",
20
+    "js-base64": "^3.0.0",
21 21
     "spinkit": "^2.0.1",
22 22
     "weixin-jsapi": "^1.1.0"
23 23
   },

+ 30 - 19
pages/receiptpage/receiptpage.vue

@@ -1121,26 +1121,40 @@
1121 1121
 				});
1122 1122
 			},
1123 1123
 			closeDrawer() {
1124
-				this.execFilterReset()
1125 1124
 				this.isShowExecFilter = false;
1125
+				let data = uni.getStorageSync("admStore")
1126
+				data.isSearch = false
1127
+				uni.setStorageSync("admStore",data)
1126 1128
 			},
1127 1129
       // 执行中筛选
1128 1130
       execFilter() {
1129 1131
 				this.getTaskData()
1130 1132
         this.isShowExecFilter = true;
1131 1133
       },
1134
+			// 筛选确定之后数据操作
1135
+			setScreenData(){
1136
+				let data = {
1137
+					deptName:this.deptName,
1138
+					deptId:this.deptId,
1139
+					currentId:this.currentId, //工单状态
1140
+					taskType:this.taskTypeId, //任务类型
1141
+					selectedLabelSlots:this.selectedLabelSlots, //tab选中状态
1142
+					taskData:JSON.stringify(this.taskData),
1143
+					isSearch:false
1144
+				}
1145
+				uni.setStorageSync("admStore",data)
1146
+			},
1132 1147
       // 执行中确定
1133 1148
       execFilterOk() {
1134 1149
         this.isShowExecFilter = false;
1135 1150
         this.zxzData = [];
1136 1151
         this.totalNum = -1;
1137 1152
         this.idx = 0;
1138
-        // this.selectedLabelSlots = "执行中";
1139
-        // this.executingOrders(0);
1153
+				this.setScreenData()
1140 1154
 				if (this.selectedLabelSlots == "待接单") {
1141
-				  this.waitingOrders(0,'submit');
1155
+				  this.waitingOrders(0);
1142 1156
 				} else if (this.selectedLabelSlots == "执行中") {
1143
-				  this.executingOrders(0,'submit');
1157
+				  this.executingOrders(0);
1144 1158
 				}
1145 1159
       },
1146 1160
       // 执行中重置
@@ -2240,13 +2254,10 @@
2240 2254
               title: res.msg || "接口获取数据失败!",
2241 2255
             });
2242 2256
           }
2243
-					if(type=='submit'){
2244
-						this.execFilterReset()
2245
-					}
2246 2257
         });
2247 2258
       },
2248 2259
       //待抢单列表数据获取
2249
-      waitingOrders(idx,type) {
2260
+      waitingOrders(idx) {
2250 2261
         if (this.zxzData.length == this.totalNum) {
2251 2262
           uni.showToast({
2252 2263
             icon: "none",
@@ -2259,7 +2270,6 @@
2259 2270
           idx,
2260 2271
           sum: 20,
2261 2272
         };
2262
-				
2263 2273
 				if (this.deptId) {
2264 2274
 				  data.deptId = this.deptId;
2265 2275
 				} else {
@@ -2295,9 +2305,6 @@
2295 2305
               title: res.msg || "接口获取数据失败!",
2296 2306
             });
2297 2307
           }
2298
-					if(type=='submit'){
2299
-						this.execFilterReset()
2300
-					}
2301 2308
         });
2302 2309
       },
2303 2310
       //刷新
@@ -2425,15 +2432,18 @@
2425 2432
           }
2426 2433
         })
2427 2434
       },
2428
-    },
2429 2435
     onLoad(options) {
2430
-			if(options.type=='searchAdm'){
2431
-				let admStore = uni.getStorageSync("admStore");
2436
+			let admStore = uni.getStorageSync("admStore");
2437
+			if(admStore.type=='searchAdm'){
2432 2438
 				if(Object.keys(admStore).length != 0){
2433
-					this.deptName = options.dept //科室名称
2434
-					this.deptId = options.deptId //科室id
2435
-					this.isShowExecFilter = true
2436 2439
 					this.$nextTick(_=>{
2440
+						if(admStore.isSearch){
2441
+							this.isShowExecFilter = true
2442
+						}else{
2443
+							this.isShowExecFilter = false
2444
+						}
2445
+						this.deptName = admStore.dept //科室名称
2446
+						this.deptId = admStore.deptId //科室id
2437 2447
 						this.currentId = admStore.currentId //工单状态
2438 2448
 						this.taskTypeId = admStore.taskType //任务类型
2439 2449
 						this.selectedLabelSlots = admStore.selectedLabelSlots //tab选中状态
@@ -2506,6 +2516,7 @@
2506 2516
       });
2507 2517
       // #endif
2508 2518
     },
2519
+		}
2509 2520
   };
2510 2521
 </script>
2511 2522
 <style lang="less">

+ 9 - 3
pages/search/search.vue

@@ -480,9 +480,15 @@
480 480
               });
481 481
             }
482 482
           } else if (this.type == "takeOrder") { //接单
483
-					  uni.navigateTo({
484
-					    url: `../receiptpage/receiptpage?deptId=${arr[0].id}&dept=${arr[0].dept}&type=searchAdm`,
485
-					  });
483
+						let data = uni.getStorageSync("admStore")
484
+						data.deptId = arr[0].id
485
+						data.dept = arr[0].dept
486
+						data.type = 'searchAdm'
487
+						data.isSearch = true
488
+						uni.setStorageSync("admStore",data)
489
+						uni.navigateTo({
490
+							url: `../receiptpage/receiptpage`,
491
+						});
486 492
 					}
487 493
         }
488 494
       },