Files
duolamaojiazhen/application/admin/controller/Configura.php
2025-12-22 13:59:40 +08:00

32 lines
985 B
PHP

<?php
namespace app\admin\controller;
use app\admin\logic\CollectionLogic;
use app\admin\logic\StaffLogic;
use think\Db;
class Configura extends AdminBase
{
public function lists(){
if ($this->request->isAjax()) {
$get = $this->request->get();
$lists = CollectionLogic::stafflists($get);
$this->_success('',$lists);
}
$this->assign('usertype',StaffLogic::staff_beed());
$this->assign('type',StaffLogic::type());
return $this->fetch();
}
public function distance(){
$post = $this->request->post();
$staff=Db::name('staff')->where('id',$post['id'])->update(['distance'=>$post['number']]);
$this->_success('增加距离成功');
}
public function transit(){
$post = $this->request->post();
$staff=Db::name('staff')->where('id',$post['id'])->update(['transit'=>$post['transit']]);
$this->_success('增加员工出行工具成功');
}
}