Browse Source

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

lichao 3 năm trước cách đây
mục cha
commit
9bab9e8816
1 tập tin đã thay đổi với 17 bổ sung3 xóa
  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
+					});
+				}
 			}
 		}
 	};