Explorar o código

增加判断,未接单不允许进行别的操作

lichao %!s(int64=3) %!d(string=hai) anos
pai
achega
9bab9e8816
Modificáronse 1 ficheiros con 17 adicións e 3 borrados
  1. 17 3
      pages/home/myorder/orderDetails/index.vue

+ 17 - 3
pages/home/myorder/orderDetails/index.vue

@@ -224,9 +224,23 @@
 				})
 			},
 			receiving(res) {
-				uni.navigateTo({
-					url: '../operation/index?res=' + res + '&id=' + this.id
-				});
+				if (res !== 1) {
+					if (!this.form.acceptDate) {
+						uni.showToast({
+							icon: 'none',
+							title: '未接单,请先接单',
+							position: "bottom"
+						})
+					} else {
+						uni.navigateTo({
+							url: '../operation/index?res=' + res + '&id=' + this.id
+						});
+					}
+				} else {
+					uni.navigateTo({
+						url: '../operation/index?res=' + res + '&id=' + this.id
+					});
+				}
 			}
 		}
 	};