更新审批表单

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