You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
3.2 KiB
66 lines
3.2 KiB
<?php
|
|
#設定系統名稱
|
|
$system_name = "day_off";
|
|
|
|
$flow_id = "day_off_01";
|
|
|
|
# 設定table schema
|
|
$sql = "
|
|
CREATE TABLE IF NOT EXISTS ". $system_name . "(
|
|
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Key值(系統預設)',
|
|
`form_key` varchar(11) NOT NULL,
|
|
`application_no` varchar(30) DEFAULT NULL COMMENT '單據編號(系統預設)',
|
|
`leave_staff_id` varchar(10) DEFAULT NULL COMMENT '請假人員工號',
|
|
`day_off_type` varchar(30) DEFAULT NULL COMMENT '假別\r\n001=特休假\r\n002=補修\r\n003=公出假\r\n004公假',
|
|
`start_date` timestamp DEFAULT NULL COMMENT '開始日期與時間',
|
|
`end_date` timestamp DEFAULT NULL COMMENT '結束日期與時間',
|
|
`substitute_id` varchar(10) DEFAULT NULL COMMENT '代理人員工號',
|
|
`reason` text DEFAULT NULL COMMENT '請假原因',
|
|
`creater` varchar(10) DEFAULT NULL COMMENT '建檔人(系統預設)',
|
|
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '單據建檔時間(系統預設)',
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='請假單';
|
|
";
|
|
|
|
|
|
/* 設定html schema
|
|
格式:type(必填), label顯示名稱, name(需填), id, title停駐時的提示字, placeHolder輸入盒的提示字, value值, other其他屬性(checked required disabled readonly)
|
|
範例如下:
|
|
text
|
|
password
|
|
textarea
|
|
file
|
|
multipleFile
|
|
hidden
|
|
checkbox
|
|
radio
|
|
option
|
|
*/
|
|
|
|
$html_schema = array(
|
|
array("type" => "hidden", "id" => "id", "label" => "ID", "placeHolder" => "", "value" => "", "others" => "readonly required"),
|
|
array("type" => "text", "id" => "application_no", "label" => "單據編號", "placeHolder" => "", "value" => "", "others" => "readonly required"),
|
|
array("type" => "text", "id" => "leave_staff_id", "label" => "請假人員工號", "placeHolder" => "", "value" => "", "others" => " required"),
|
|
array("type" => "single_select", "id" => "day_off_type", "label" => "假別", "placeHolder" => "", "size" => 1,
|
|
"options_string" =>
|
|
"<option value='001-特休假' selected>001-特休假1</option>
|
|
<option value='002-特休假'>002-特休假2</option>
|
|
<option value='003-特休假'>003-特休假3</option>
|
|
<option value='004-特休假'>004-公假1</option>
|
|
<option value='005-特休假'>005-公假2</option>
|
|
<option value='006-特休假'>006-公假3</option>",
|
|
"others" => " required"),
|
|
array("type" => "datetime-local", "id" => "start_date", "label" => "開始日期與時間", "placeHolder" => "", "value" => "", "others" => " required"),
|
|
array("type" => "datetime-local", "id" => "end_date", "label" => "結束日期與時間", "placeHolder" => "", "value" => "", "others" => " required"),
|
|
array("type" => "text", "id" => "substitute_id", "label" => "代理人員工號", "placeHolder" => "", "value" => "", "others" => " required"),
|
|
array("type" => "text", "id" => "reason", "label" => "請假原因", "placeHolder" => "", "value" => "", "others" => "required"),
|
|
array("type" => "text", "id" => "creater", "label" => "建檔人", "placeHolder" => "", "value" => "", "others" => "readonly required"),
|
|
array("type" => "text", "id" => "create_at", "label" => "單據時間", "placeHolder" => "", "value" => "", "others" => "readonly required")
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
?>
|