|
|
@ -185,6 +185,24 @@ |
|
|
|
|
|
|
|
console.log(item); |
|
|
|
|
|
|
|
// 检查服务日期是否已到 |
|
|
|
const today = new Date(); |
|
|
|
const serviceDate = new Date(item.serviceDate); |
|
|
|
|
|
|
|
// 将时间设置为当天的开始,避免时分秒的影响 |
|
|
|
today.setHours(0, 0, 0, 0); |
|
|
|
serviceDate.setHours(0, 0, 0, 0); |
|
|
|
|
|
|
|
if (serviceDate > today) { |
|
|
|
// 服务日期未到,显示提示 |
|
|
|
uni.showToast({ |
|
|
|
title: '服务日期未到,无法打卡', |
|
|
|
icon: 'none', |
|
|
|
duration: 2000 |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// 根据订单状态确定跳转路径 |
|
|
|
const paths = [ |
|
|
|
`/otherPages/myOrdersManage/clock/index?id=${item.id}`, |
|
|
|