Merge remote-tracking branch 'origin/develop' into feature/hant
# Conflicts: # application/extra/site.php
This commit is contained in:
commit
bc9c013b80
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -12,3 +12,4 @@
|
|||
.vscode
|
||||
node_modules
|
||||
.user.ini
|
||||
/application/extra/site.php
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ class Dispatch2 extends Backend
|
|||
}
|
||||
}else{
|
||||
//已上门 完成时间超了
|
||||
if($row->estimated_finish_time > $now)
|
||||
if($row->estimated_finish_time < $now)
|
||||
{ //预估完成时间过了
|
||||
$row->btn_record = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,13 @@ class Auth extends \fast\Auth
|
|||
$this->setError('Admin is forbidden');
|
||||
return false;
|
||||
}
|
||||
|
||||
//ip白名单校验
|
||||
if (!$this->allowIpCheck($admin)) {
|
||||
$this->setError('登录失败:您的IP地址不在公司允许范围内!');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Config::get('fastadmin.login_failure_retry') && $admin->loginfailure >= 10 && time() - $admin->updatetime < 86400) {
|
||||
$this->setError('Please try again after 1 day');
|
||||
return false;
|
||||
|
|
@ -68,6 +75,29 @@ class Auth extends \fast\Auth
|
|||
return true;
|
||||
}
|
||||
|
||||
public function allowIpCheck($admin){
|
||||
|
||||
if (in_array('*', $this->getRuleIds($admin->id))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$allowIpCheck = Config::get('site.allowip_check');
|
||||
if ($allowIpCheck != 1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$allowIp = Config::get('site.allowip');
|
||||
$allowIp = explode("\r\n", $allowIp);
|
||||
if (empty($allowIp)) {
|
||||
return false;
|
||||
}
|
||||
$ip = request()->ip();
|
||||
if (!in_array($ip, $allowIp)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出登录
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -31,8 +31,14 @@ class CheckOrdeRecordCommand extends Command
|
|||
foreach ($list as $item) {
|
||||
$ids[] = $item->id;
|
||||
$dispatchIds[] = $item->dispatch_id;
|
||||
|
||||
$existDispatchIds = [];
|
||||
|
||||
//修改状态
|
||||
if($item->need_notice == 1){ //需要通知
|
||||
if(in_array($item->dispatch_id,$existDispatchIds)){
|
||||
continue;
|
||||
}
|
||||
$dispatch = OrderDispatch::get($item->dispatch_id,['orderb']);
|
||||
Message::create([
|
||||
'to_id' => $dispatch->admin_id,
|
||||
|
|
@ -40,6 +46,8 @@ class CheckOrdeRecordCommand extends Command
|
|||
'title' => '派单任务跟进提示',
|
||||
'content' => '【订单跟进提示】您有一条待跟进订单,订单编号:'.$dispatch->orderb->order_no.',请及时关注。'
|
||||
]);
|
||||
|
||||
$existDispatchIds[] = $item->dispatch_id;
|
||||
}
|
||||
}
|
||||
OrderDispatchRecord::whereIn('id',$ids)->where('status',0)->update(['status'=>1]);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
<?php
|
||||
|
||||
return array (
|
||||
|
|
@ -7,20 +8,20 @@ return array (
|
|||
'version' => '1.0.2',
|
||||
'timezone' => 'Asia/Shanghai',
|
||||
'forbiddenip' => '',
|
||||
'languages' =>
|
||||
'languages' =>
|
||||
array (
|
||||
'backend' => 'zh-cn',
|
||||
'frontend' => 'zh-cn',
|
||||
),
|
||||
'fixedpage' => 'dashboard',
|
||||
'categorytype' =>
|
||||
'categorytype' =>
|
||||
array (
|
||||
'default' => 'Default',
|
||||
'page' => 'Page',
|
||||
'article' => 'Article',
|
||||
'test' => 'Test',
|
||||
),
|
||||
'configgroup' =>
|
||||
'configgroup' =>
|
||||
array (
|
||||
'basic' => 'Basic',
|
||||
'email' => 'Email',
|
||||
|
|
@ -35,7 +36,7 @@ return array (
|
|||
'mail_smtp_pass' => '',
|
||||
'mail_verify_type' => '2',
|
||||
'mail_from' => '',
|
||||
'attachmentcategory' =>
|
||||
'attachmentcategory' =>
|
||||
array (
|
||||
'category1' => 'Category1',
|
||||
'category2' => 'Category2',
|
||||
|
|
@ -43,4 +44,4 @@ return array (
|
|||
),
|
||||
'ip_check' => '0',
|
||||
'allowip' => '',
|
||||
);
|
||||
);
|
||||
|
|
@ -154,7 +154,7 @@ class OrderDispatchService extends BaseService
|
|||
try {
|
||||
//接单
|
||||
$orderDispatch->status = $orderDispatchStatus;
|
||||
|
||||
$orderDispatch->follow = 1;
|
||||
//拒接原因
|
||||
if ($type == 'reject') {
|
||||
if (empty($params['reject_reason'])) {
|
||||
|
|
@ -290,6 +290,7 @@ class OrderDispatchService extends BaseService
|
|||
$orderDispatch = $this->getOrderDispatchInfo($workerId, $orderDispatchId);
|
||||
$orderDispatch->status = OrderDispatch::STATUS_PLANIT;
|
||||
$orderDispatch->plan_time = $planTime;
|
||||
$orderDispatch->follow = 1;
|
||||
$orderDispatch->save();
|
||||
|
||||
$orderDispatch->admin_user = '师傅:'. $orderDispatch->worker_name;
|
||||
|
|
@ -336,6 +337,7 @@ class OrderDispatchService extends BaseService
|
|||
$orderDispatch->status = OrderDispatch::STATUS_CLOCK;
|
||||
$orderDispatch->arrive_images = $this->removeStrCdnUrl($images);
|
||||
$orderDispatch->arrive_time = $time;
|
||||
$orderDispatch->follow = 1;
|
||||
$orderDispatch->save();
|
||||
|
||||
$orderDispatch->admin_user = '师傅:'. $orderDispatch->worker_name;
|
||||
|
|
@ -390,6 +392,7 @@ class OrderDispatchService extends BaseService
|
|||
$orderDispatch = $this->getOrderDispatchInfo($workerId, $params['order_dispatch_id']);
|
||||
$orderDispatch->status = OrderDispatch::STATUS_FINISH;
|
||||
$orderDispatch->images = $this->removeStrCdnUrl($params['complete_images']);
|
||||
$orderDispatch->follow = 2;
|
||||
$orderDispatch->finish_time = $time;
|
||||
|
||||
// 材料相关
|
||||
|
|
@ -463,7 +466,7 @@ class OrderDispatchService extends BaseService
|
|||
$orderDispatch = $this->getOrderDispatchInfo($workerId, $params['order_dispatch_id']);
|
||||
$orderDispatch->is_finish_today = $params['is_finish_today'];
|
||||
$orderDispatch->estimated_finish_time = $params['estimated_finish_time'];
|
||||
|
||||
$orderDispatch->follow = 1;
|
||||
if ($params['is_finish_today'] == 0) {
|
||||
$orderDispatch->work_progress = $params['work_progress'];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user