|
@@ -33,6 +33,15 @@ class ApproveFlow extends Controller
|
|
|
protected $table = 'ApproveFlow';
|
|
|
|
|
|
/**
|
|
|
+ * 控制器初始化
|
|
|
+ */
|
|
|
+ protected function initialize()
|
|
|
+ {
|
|
|
+ $this->get_module_list = CommonConstant::get_module_list();
|
|
|
+ $this->get_type_list = CommonConstant::get_type_list();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 列表
|
|
|
* @auth true
|
|
|
* @menu true
|
|
@@ -44,21 +53,7 @@ class ApproveFlow extends Controller
|
|
|
public function index()
|
|
|
{
|
|
|
$module = input('module');
|
|
|
- $get_item_list = [];
|
|
|
- switch ($module){
|
|
|
- case CommonConstant::MODULE_5:
|
|
|
- $get_item_list = EvectionConstant::get_type_list();
|
|
|
- break;
|
|
|
- case CommonConstant::MODULE_6:
|
|
|
- $get_item_list = LeaveConstant::get_time_list();
|
|
|
- break;
|
|
|
- case CommonConstant::MODULE_8:
|
|
|
- $get_item_list = MaintainConstant::get_type_list();
|
|
|
- break;
|
|
|
- }
|
|
|
- $this->get_item_list = $get_item_list;
|
|
|
- $this->get_type_list = CommonConstant::get_type_list();
|
|
|
- $this->get_module_list = CommonConstant::get_module_list();
|
|
|
+ $this->get_item_list = self::get_item_list($module);
|
|
|
$this->title = $this->get_module_list[$module].'审批流程';
|
|
|
$query = $this->_query($this->table)
|
|
|
->where('module',$module);
|
|
@@ -76,6 +71,7 @@ class ApproveFlow extends Controller
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 编辑
|
|
|
* @auth true
|
|
@@ -87,9 +83,7 @@ class ApproveFlow extends Controller
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 数据处理
|
|
|
- * @auth true
|
|
|
- * @menu true
|
|
|
+ * 表单处理
|
|
|
* @param array $data
|
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
@@ -98,6 +92,7 @@ class ApproveFlow extends Controller
|
|
|
protected function _form_filter(&$data)
|
|
|
{
|
|
|
if($this->request->isGet()) {
|
|
|
+// return false;
|
|
|
// $this->all_user = User::where('is_deleted',0)->column('name','id');
|
|
|
}
|
|
|
}
|
|
@@ -111,4 +106,21 @@ class ApproveFlow extends Controller
|
|
|
$list = CommonConstant::get_module_list();
|
|
|
return $this->fetch('', compact("list"));
|
|
|
}
|
|
|
+
|
|
|
+ public function get_item_list($module){
|
|
|
+ $get_item_list = [];
|
|
|
+ switch ($module){
|
|
|
+ case CommonConstant::MODULE_5:
|
|
|
+ $get_item_list = EvectionConstant::get_type_list();
|
|
|
+ break;
|
|
|
+ case CommonConstant::MODULE_6:
|
|
|
+ $get_item_list = LeaveConstant::get_time_list();
|
|
|
+ break;
|
|
|
+ case CommonConstant::MODULE_8:
|
|
|
+ $get_item_list = MaintainConstant::get_type_list();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return $get_item_list;
|
|
|
+ }
|
|
|
+
|
|
|
}
|