项目时间编辑错误bug修正

This commit is contained in:
hdm 2022-08-06 00:49:20 +08:00
parent ac2af80089
commit 36708df6fa
2 changed files with 3 additions and 1 deletions
app
customer/view/index
project/controller

@ -138,7 +138,7 @@
obj.del();
}
}
tool.post("/customer/index/distribute", {id: data.id,uid:ids,did:dids}, callback);
tool.post("/customer/api/distribute", {id: data.id,uid:ids,did:dids}, callback);
layer.close(index);
});
}

@ -225,11 +225,13 @@ class Index extends BaseController
if (request()->isPost()) {
if ($this->uid == $detail['admin_id'] || $this->uid == $detail['director_uid']) {
if (isset($param['start_time'])) {
$param['start_time'] = strtotime(urldecode($param['start_time']));
if ($param['start_time'] >= $detail['end_time']) {
return to_assign(1, '开始时间不能大于计划结束时间');
}
}
if (isset($param['end_time'])) {
$param['end_time'] = strtotime(urldecode($param['end_time']));
if ($param['end_time'] <= $detail['start_time']) {
return to_assign(1, '计划结束时间不能小于开始时间');
}