##獲取用戶基本信息
1. 獲得用戶uid : ` get_user_id()` 前臺使用方法: `{get_user_id()}`
2. 用戶名: `get_user_name()`
3. 部門id:`get_dept_id()`
4. 部門名稱:`get_dept_name()`
5. 用戶編號: `get_emp_no()`;
6. 取得用戶職級: `get_user_rank()`
7. 根據用戶id獲得用戶名 `get_user_ssk($id)`
8. 獲得職位: `get_position_name($id)`
9. 獲得職位ID: `get_position_id()`
10.流程/任務已發出、完成 $uid不填則為所有 `show_bottons_status($type,$typeid,$uid)`
##獲得任務狀態
~~~
function task_status($status) {
if ($status == 0) {
return "等待接受";
}
if ($status == 1) {
return "已接受";
}
if ($status == 2) {
return "進行中";
}
if ($status == 3) {
return "已完成";
}
if ($status == 4) {
return "已轉交";
}
if ($status == 5) {
return "不接受";
}
}
~~~
##獲得當前流程步驟
~~~
function show_step($step) {
if ($step == 40) {
return "通過";
}
if ($step > 30) {
return "協商中";
}
if ($step == 30) {
return "待協商";
}
if ($step > 20) {
return "審批中";
}
if ($step == 20) {
return "待審批";
}
if ($step == 10) {
return "臨時保管";
}
if ($step == 0) {
return "否決";
}
}
~~~
##審批結果flow_log
~~~
function show_result($result) {
if ($result == 1) {
return "同意";
}
if ($result == 0) {//0
return "否決";
}
if ($result == 2) {
return "退回";
}
if ($result == 3) {
return "待審批";
}
}
~~~