更新审批表单
This commit is contained in:
parent
f8341976fb
commit
e03d610064
|
@ -44,4 +44,50 @@ function isAuthProject($uid)
|
|||
$map[] = ['', 'exp', Db::raw("FIND_IN_SET('{$uid}',uids)")];
|
||||
$count = Db::name('DataAuth')->where($map)->count();
|
||||
return $count;
|
||||
}
|
||||
}
|
||||
|
||||
//读取会议室
|
||||
function oa_meeting_cate_column()
|
||||
{
|
||||
$list = Db::name('MeetingCate')->where(['status' => 1])->column('title', 'id');
|
||||
return $list;
|
||||
}
|
||||
|
||||
//读取部门列表
|
||||
function get_department_column()
|
||||
{
|
||||
$department = Db::name('Department')->order('sort desc,id asc')->where(['status' => 1])->column('title', 'id');
|
||||
return $department;
|
||||
}
|
||||
|
||||
//读取印章类型
|
||||
function oa_seal_cate_column()
|
||||
{
|
||||
$list = Db::name('SealCate')->where(['status' => 1])->column('title', 'id');
|
||||
return $list;
|
||||
}
|
||||
|
||||
//读取车辆类型
|
||||
function oa_car_cate_column()
|
||||
{
|
||||
$list = Db::name('CarCate')->where(['status' => 1])->column('title,name', 'id');
|
||||
$car = [];
|
||||
foreach($list as $k=>$v) {
|
||||
$car[$k] = $v['title'] . '[' . $v['name']. ']';
|
||||
}
|
||||
return $car;
|
||||
}
|
||||
|
||||
//读取费用类型
|
||||
function oa_cost_cate_column()
|
||||
{
|
||||
$list = Db::name('CostCate')->where(['status' => 1])->column('title', 'id');
|
||||
return $list;
|
||||
}
|
||||
|
||||
//读取职位
|
||||
function get_position_column()
|
||||
{
|
||||
$position = Db::name('Position')->where(['status' => 1])->column('title', 'id');
|
||||
return $position;
|
||||
}
|
||||
|
|
|
@ -1035,16 +1035,12 @@ class OaApprove extends ApiController
|
|||
break;
|
||||
case 5:
|
||||
//会议室预定
|
||||
// +++
|
||||
$meetingList = oa_meeting_cate_column();
|
||||
$field = [
|
||||
'detail_type' => [
|
||||
'title' => '选择会议室',
|
||||
'type' => 'select',
|
||||
'item' => [
|
||||
1 => '会议室一',
|
||||
2 => '会议室二',
|
||||
3 => '会议室三',
|
||||
],
|
||||
'item' => $meetingList,
|
||||
],
|
||||
'start_time' => [
|
||||
'title' => '开始时间',
|
||||
|
@ -1188,7 +1184,7 @@ class OaApprove extends ApiController
|
|||
break;
|
||||
case 8:
|
||||
//资质借用
|
||||
// +++
|
||||
$departmentList = get_department_column();
|
||||
$field = [
|
||||
'name' => [
|
||||
'title' => '借用人',
|
||||
|
@ -1203,7 +1199,7 @@ class OaApprove extends ApiController
|
|||
'department_type' => [
|
||||
'title' => '借用部门',
|
||||
'type' => 'select',
|
||||
'item' => (object)[]
|
||||
'item' => $departmentList
|
||||
],
|
||||
'detail_type' => [
|
||||
'title' => '借用类型',
|
||||
|
@ -1272,7 +1268,7 @@ class OaApprove extends ApiController
|
|||
break;
|
||||
case 9:
|
||||
//用章
|
||||
// +++
|
||||
$cateList = oa_seal_cate_column();
|
||||
$field = [
|
||||
'detail_time' => [
|
||||
'title' => '用印日期',
|
||||
|
@ -1282,12 +1278,7 @@ class OaApprove extends ApiController
|
|||
'detail_type' => [
|
||||
'title' => '印章类型',
|
||||
'type' => 'select',
|
||||
'item' => [
|
||||
1 => '公章',
|
||||
2 => '合同章',
|
||||
3 => '法人章',
|
||||
4 => '其他',
|
||||
],
|
||||
'item' => $cateList
|
||||
],
|
||||
'name' => [
|
||||
'title' => '文件名称',
|
||||
|
@ -1340,7 +1331,7 @@ class OaApprove extends ApiController
|
|||
break;
|
||||
case 10:
|
||||
//用车
|
||||
// +++
|
||||
$carList = oa_car_cate_column();
|
||||
$field = [
|
||||
'start_time' => [
|
||||
'title' => '开始时间',
|
||||
|
@ -1360,7 +1351,7 @@ class OaApprove extends ApiController
|
|||
'detail_type' => [
|
||||
'title' => '车辆选择',
|
||||
'type' => 'select',
|
||||
'item' => (object)[]
|
||||
'item' => $carList
|
||||
],
|
||||
'content' => [
|
||||
'title' => '用车事由',
|
||||
|
@ -1386,12 +1377,12 @@ class OaApprove extends ApiController
|
|||
break;
|
||||
case 11:
|
||||
//用车归还
|
||||
// +++
|
||||
$carList = oa_car_cate_column();
|
||||
$field = [
|
||||
'detail_type' => [
|
||||
'title' => '车辆选择',
|
||||
'type' => 'select',
|
||||
'item' => (object)[]
|
||||
'item' => $carList
|
||||
],
|
||||
'detail_time' => [
|
||||
'title' => '归还时间',
|
||||
|
@ -1432,7 +1423,7 @@ class OaApprove extends ApiController
|
|||
break;
|
||||
case 12:
|
||||
//借款申请
|
||||
// +++
|
||||
$cateList = oa_cost_cate_column();
|
||||
$field = [
|
||||
'amount' => [
|
||||
'title' => '借款金额',
|
||||
|
@ -1442,15 +1433,7 @@ class OaApprove extends ApiController
|
|||
'detail_type' => [
|
||||
'title' => '借款类型',
|
||||
'type' => 'select',
|
||||
'item' => [
|
||||
1 => '差旅费',
|
||||
2 => '办公费',
|
||||
3 => '招待费',
|
||||
4 => '交通费',
|
||||
5 => '通讯费',
|
||||
6 => '采购付款',
|
||||
7 => '其他',
|
||||
]
|
||||
'item' => $cateList
|
||||
],
|
||||
'detail_time' => [
|
||||
'title' => '申请日期',
|
||||
|
@ -1729,7 +1712,8 @@ class OaApprove extends ApiController
|
|||
break;
|
||||
case 17:
|
||||
//入职申请
|
||||
// +++
|
||||
$departmentList = get_department_column();
|
||||
$positionList = get_position_column();
|
||||
$field = [
|
||||
'name' => [
|
||||
'title' => '员工姓名',
|
||||
|
@ -1757,12 +1741,12 @@ class OaApprove extends ApiController
|
|||
'department_type' => [
|
||||
'title' => '入职部门',
|
||||
'type' => 'select',
|
||||
'item' => (object)[]
|
||||
'item' => $departmentList
|
||||
],
|
||||
'position_type' => [
|
||||
'title' => '担任职务',
|
||||
'type' => 'select',
|
||||
'item' => (object)[]
|
||||
'item' => $positionList
|
||||
],
|
||||
'remark' => [
|
||||
'title' => '备注',
|
||||
|
@ -1788,7 +1772,8 @@ class OaApprove extends ApiController
|
|||
break;
|
||||
case 18:
|
||||
//转正申请
|
||||
// +++
|
||||
$departmentList = get_department_column();
|
||||
$positionList = get_position_column();
|
||||
$field = [
|
||||
'name' => [
|
||||
'title' => '员工姓名',
|
||||
|
@ -1801,14 +1786,14 @@ class OaApprove extends ApiController
|
|||
'item' => (object)[]
|
||||
],
|
||||
'department_type' => [
|
||||
'title' => '入职部门',
|
||||
'title' => '所在部门',
|
||||
'type' => 'select',
|
||||
'item' => (object)[]
|
||||
'item' => $departmentList
|
||||
],
|
||||
'position_type' => [
|
||||
'title' => '担任职务',
|
||||
'type' => 'select',
|
||||
'item' => (object)[]
|
||||
'item' => $positionList
|
||||
],
|
||||
'content' => [
|
||||
'title' => '试用期评价',
|
||||
|
@ -1839,7 +1824,8 @@ class OaApprove extends ApiController
|
|||
break;
|
||||
case 19:
|
||||
//离职申请
|
||||
// +++
|
||||
$departmentList = get_department_column();
|
||||
$positionList = get_position_column();
|
||||
$field = [
|
||||
'name' => [
|
||||
'title' => '员工姓名',
|
||||
|
@ -1854,12 +1840,12 @@ class OaApprove extends ApiController
|
|||
'department_type' => [
|
||||
'title' => '所在部门',
|
||||
'type' => 'select',
|
||||
'item' => (object)[]
|
||||
'item' => $departmentList
|
||||
],
|
||||
'position_type' => [
|
||||
'title' => '担任职务',
|
||||
'type' => 'select',
|
||||
'item' => (object)[]
|
||||
'item' => $positionList
|
||||
],
|
||||
'start_time' => [
|
||||
'title' => '申请离职日期',
|
||||
|
@ -1900,7 +1886,8 @@ class OaApprove extends ApiController
|
|||
break;
|
||||
case 20:
|
||||
//转岗申请
|
||||
// +++
|
||||
$departmentList = get_department_column();
|
||||
$positionList = get_position_column();
|
||||
$field = [
|
||||
'name' => [
|
||||
'title' => '员工姓名',
|
||||
|
@ -1915,22 +1902,22 @@ class OaApprove extends ApiController
|
|||
'department_type' => [
|
||||
'title' => '所在部门',
|
||||
'type' => 'select',
|
||||
'item' => (object)[]
|
||||
'item' => $departmentList
|
||||
],
|
||||
'position_type' => [
|
||||
'title' => '担任职务',
|
||||
'type' => 'select',
|
||||
'item' => (object)[]
|
||||
'item' => $positionList
|
||||
],
|
||||
'num' => [
|
||||
'title' => '转岗后部门',
|
||||
'type' => 'select',
|
||||
'item' => (object)[]
|
||||
'item' => $departmentList
|
||||
],
|
||||
'num1' => [
|
||||
'title' => '转岗后职务',
|
||||
'type' => 'select',
|
||||
'item' => (object)[]
|
||||
'item' => $positionList
|
||||
],
|
||||
'start_time' => [
|
||||
'title' => '申请转岗日期',
|
||||
|
@ -1971,11 +1958,13 @@ class OaApprove extends ApiController
|
|||
break;
|
||||
case 21:
|
||||
//招聘需求
|
||||
$departmentList = get_department_column();
|
||||
$positionList = get_position_column();
|
||||
$field = [
|
||||
'department_type' => [
|
||||
'title' => '招聘部门',
|
||||
'type' => 'select',
|
||||
'item' => (object)[]
|
||||
'item' => $departmentList
|
||||
],
|
||||
'detail_time' => [
|
||||
'title' => '到岗日期',
|
||||
|
@ -1985,7 +1974,7 @@ class OaApprove extends ApiController
|
|||
'position_type' => [
|
||||
'title' => '招聘岗位',
|
||||
'type' => 'select',
|
||||
'item' => (object)[]
|
||||
'item' => $positionList
|
||||
],
|
||||
'num' => [
|
||||
'title' => '招聘人数',
|
||||
|
|
Loading…
Reference in New Issue