diff --git a/app/api/controller/OaApprove.php b/app/api/controller/OaApprove.php index 807ec29..3a6b35c 100644 --- a/app/api/controller/OaApprove.php +++ b/app/api/controller/OaApprove.php @@ -38,4 +38,112 @@ class OaApprove extends ApiController $list = Db::name('FlowType')->whereOr([$map1,$map2])->fetchSql(false)->select()->toArray(); $this->apiSuccess('获取成功', $list); } + + //获取审批应用字段 + public function app_field() + { + $this->uid = JWT_UID; + $loginAdmin = Db::name('Admin')->where(['id' => $this->uid])->find(); + $this->did = $loginAdmin['did']; + $param = get_params(); + $id = isset($param['id']) ? $param['id'] : 0; + $type = isset($param['type']) ? $param['type'] : 0; + if($id > 0){ + $detail = Db::name('Approve')->where('id',$id)->find(); + $detail['start_time_a'] = date('Y-m-d',$detail['start_time']); + $detail['start_time_b'] = date('H:i',$detail['start_time']); + $detail['end_time_a'] = date('Y-m-d',$detail['end_time']); + $detail['end_time_b'] = date('H:i',$detail['end_time']); + $detail['detail_time'] = date('Y-m-d',$detail['detail_time']); + + $detail['days'] = floor($detail['duration']*10/80); + $detail['hours'] = (($detail['duration']*10)%80)/10; + $type = $detail['type']; + if($detail['file_ids'] !=''){ + $fileArray = Db::name('File')->where('id','in',$detail['file_ids'])->select(); + $detail['fileArray'] = $fileArray; + } + } + + // * 动态表单展示 + $flows = get_cate_department_flows($type, $this->did); + $flowMap = []; + foreach ($flows as $item) { + $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' => 'input', + '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)[] + ], + ]; + $moban = Db::name('FlowType')->where('id',$type)->value('name'); + $this->apiSuccess('获取成功', [ + 'type' => $type, + 'moban' => $moban, + 'field' => $field + ]); + } } diff --git a/public/storage/202311/0489d2d039d23e68ae2b6c68cbaa4966.txt b/public/storage/202311/0489d2d039d23e68ae2b6c68cbaa4966.txt new file mode 100644 index 0000000..0cf0cc4 --- /dev/null +++ b/public/storage/202311/0489d2d039d23e68ae2b6c68cbaa4966.txt @@ -0,0 +1,46 @@ +================ 勿删 ================ +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() +} +================ 勿删 ================ + + +rtmp://push-live.lihaink.cn/ceshi/202310171552401735?auth_key=1697546420-0-0-b5edb41b740a63bcf0fcb466358c134b + + +situtu +zhangjingli +lihai + + +http://127.0.0.1:30003/oa/approve/add + +detail_type: 3 +start_time: 2023-11-01 00:00:00 +end_time: 2023-11-02 00:00:00 +duration: 8 +content: 哈哈哈 +file: +file_ids: +flow_id: 1 +check_admin_name: 张经理 +check_admin_ids: 3 +copy_names: 李人事 +copy_uids: 4 +id: 0 +type: 1 \ No newline at end of file diff --git a/public/storage/202311/15dd9056315e3ab96ab47b5c75153cee.txt b/public/storage/202311/15dd9056315e3ab96ab47b5c75153cee.txt new file mode 100644 index 0000000..6035523 --- /dev/null +++ b/public/storage/202311/15dd9056315e3ab96ab47b5c75153cee.txt @@ -0,0 +1,10 @@ +php think swoole +php think swoole restart +php think queue:work + +composer require overtrue/pinyin:4.1.0 +composer require jpush/jpush + +git config --global credential.helper store +alias graph="git log --graph --oneline --decorate --all" + diff --git a/public/storage/avatars/avatar_256_4ekcbjs5zf1698806960.png b/public/storage/avatars/avatar_256_4ekcbjs5zf1698806960.png new file mode 100644 index 0000000..41bbe00 Binary files /dev/null and b/public/storage/avatars/avatar_256_4ekcbjs5zf1698806960.png differ