瀏覽代碼

订单字段传参/取消清空

贾宇博 4 月之前
父節點
當前提交
5e699694cb
共有 1 個文件被更改,包括 11 次插入6 次删除
  1. 11 6
      pages/goodsDetails/goodsDetails.vue

+ 11 - 6
pages/goodsDetails/goodsDetails.vue

@@ -234,6 +234,8 @@
 	};
 	const handlCancel = () => {
 		show.value = false; // 关闭第一个弹框
+		selectedTimes.value = []; // 清空已选时间
+		  totalTimes.value = 0;     // 重置点击次数
 	}
 	// 底部数据
 	const options = ref([{
@@ -310,7 +312,7 @@
 		} = params;
 		volunteerId.value = id;
 		serviceCategory.value = categoy;
-
+		businessManagementId.value = manage;
 		const res = await getDetailsvolunteerId({
 			volunteerId: id,
 			serviceCategory: categoy,
@@ -384,7 +386,7 @@
 			console.error('获取排班时间失败:', error);
 		}
 	};
-	
+
 	const getByTime = (timeObj) => {
 		if (timeObj.clicked) {
 			console.log('>>>>>> 已经点击过此时间');
@@ -406,9 +408,10 @@
 
 	// 立即购买显示时执行
 	const upPopupOpen = () => { //显示时初始化预存储信息数据
-		totalTimes.value = 0
-		currentTime.value = ''
-		currentDate.value = []
+		 selectedTimes.value = [];
+		  totalTimes.value = 0;
+		  currentTime.value = '';
+		  currentDate.value = [];
 	}
 
 	// 确认购买
@@ -426,7 +429,9 @@
 				paymentMethod: 1,
 				addressId: 7,
 				volunteerId: volunteerId.value,
-				remark: remark.value
+				remark: remark.value,
+				businessManagementId: businessManagementId.value,
+				volunteerInfoId: listData.value.volunteerInfoId,
 			},
 			workDateList: [
 				// {