更新审批表单

This commit is contained in:
yaooo 2023-11-01 18:49:38 +08:00
parent c403a96dcd
commit 30d6cf0c2b
2 changed files with 140 additions and 67 deletions

View File

@ -841,73 +841,80 @@ class OaApprove extends ApiController
$flowMap[$item['id']] = $item['name']; $flowMap[$item['id']] = $item['name'];
} }
//获取审批字段 //获取审批字段
$field = [ switch ($type)
'detail_type' => [ {
'title' => '请假类型', case 1:
'type' => 'select', $field = [
'item' => [ 'detail_type' => [
1 => '事假', 'title' => '请假类型',
2 => '年假', 'type' => 'select',
3 => '调休假', 'item' => [
4 => '病假', 1 => '事假',
5 => '婚假', 2 => '年假',
6 => '丧假', 3 => '调休假',
7 => '产假', 4 => '病假',
8 => '陪产假', 5 => '婚假',
9 => '其他', 6 => '丧假',
], 7 => '产假',
], 8 => '陪产假',
'start_time' => [ 9 => '其他',
'title' => '开始时间', ],
'type' => 'input', ],
'item' => (object)[] 'start_time' => [
], 'title' => '开始时间',
'end_time' => [ 'type' => 'input',
'title' => '结束时间', 'item' => (object)[]
'type' => 'input', ],
'item' => (object)[] 'end_time' => [
], 'title' => '结束时间',
'duration' => [ 'type' => 'input',
'title' => '请假工时', 'item' => (object)[]
'type' => 'input', ],
'item' => (object)[] 'duration' => [
], 'title' => '请假工时',
'content' => [ 'type' => 'input',
'title' => '请假事由', 'item' => (object)[]
'type' => 'textarea', ],
'item' => (object)[] 'content' => [
], 'title' => '请假事由',
'file_ids' => [ 'type' => 'textarea',
'title' => '附件', 'item' => (object)[]
'type' => 'file', ],
'item' => (object)[] 'file_ids' => [
], 'title' => '附件',
'flow_id' => [ 'type' => 'file',
'title' => '审批流程', 'item' => (object)[]
'type' => 'select', ],
'item' => $flowMap 'flow_id' => [
], 'title' => '审批流程',
'check_admin_ids' => [ 'type' => 'select',
'title' => '审核人ID', 'item' => $flowMap
'type' => 'select', ],
'item' => (object)[] 'check_admin_ids' => [
], 'title' => '审核人ID',
'check_admin_name' => [ 'type' => 'select',
'title' => '审核人', 'item' => (object)[]
'type' => 'select', ],
'item' => (object)[] 'check_admin_name' => [
], 'title' => '审核人',
'copy_uids' => [ 'type' => 'select',
'title' => '抄送人ID', 'item' => (object)[]
'type' => 'select', ],
'item' => (object)[] 'copy_uids' => [
], 'title' => '抄送人ID',
'copy_names' => [ 'type' => 'select',
'title' => '抄送人', 'item' => (object)[]
'type' => 'select', ],
'item' => (object)[] 'copy_names' => [
], 'title' => '抄送人',
]; 'type' => 'select',
'item' => (object)[]
],
];
break;
default:
$field = [];
}
return $field; return $field;
} }

View File

@ -0,0 +1,66 @@
================ 勿删 ================
php think swoole
php think swoole restart
php think queue:work
composer require alibabacloud/live-20161101 1.1.1 --ignore-platform-req=ext-sodium
composer require textalk/websocket
https://shop.lihaink.cn
admin lihaikeji0099
https://next.api.aliyun.com/api/live/2016-11-01/AddLiveDomain
try {
} catch (\Exception $e) {
$e->getMessage()
}
================ 勿删 ================
1请假 2出差 3外出 4加班 5会议室预定 6公文流转 7物品维修 8资质借用 9用章 10用车 11用车归还 12借款 13付款 14奖励 15采购 16活动经费 17入职 18转正 19离职 20转岗 21招聘需求 22通用审批
rtmp://push-live.lihaink.cn/ceshi/202310171552401735?auth_key=1697546420-0-0-b5edb41b740a63bcf0fcb466358c134b
http://127.0.0.1:30003/api/index/flow_check
id: 13
type: 1
check_node: 1 //审核结束
check_admin_ids:
check: 1
content: 同意
id: 14
type: 1
check_node: 2 //下一审批人
check_admin_ids: 2
check: 1
content: 继续
id: 14
type: 1
check_node: 1 //审核结束
check_admin_ids:
check: 1
content: ok
id: 1
type: 1
check_node: 0
check_admin_ids: 0
check: 2
content: 不同意
ttp://127.0.0.1:30003/api/index/get_flow_nodes?id=13
撤销申请
http://127.0.0.1:30003/api/index/flow_check
id: 1
type: 1
check: 3
content: 错误