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.
180 lines
6.2 KiB
180 lines
6.2 KiB
<?php
|
|
include "header.php";
|
|
|
|
// 部門職別
|
|
$db_query = "select department_id, name, role_id, role from department order by department_id";
|
|
$res = mysqli_query($link, $db_query);
|
|
while ($row = mysqli_fetch_assoc($res)) {
|
|
$depart_arr[$row["department_id"]] = $row["name"];
|
|
$role_arr[$row["department_id"]][$row["role_id"]] = $row["role"];
|
|
}
|
|
mysqli_free_result($res);
|
|
?>
|
|
<script>
|
|
$(function(){
|
|
var jroleStr = '<?php echo json_encode($role_arr); ?>';
|
|
var jroleArr = JSON.parse(jroleStr);
|
|
var optStr = "";
|
|
$("select[name=department_id]").change(function(){
|
|
if ($(this).val() != "") {
|
|
optStr = "";
|
|
for (var i in jroleArr[$(this).val()]) {
|
|
if ('undefined' !== jroleArr[$(this).val()][i]) {
|
|
optStr += '<option value="'+i+'">'+jroleArr[$(this).val()][i]+'</option>';
|
|
}
|
|
}
|
|
$("select[name=role_id]").html(optStr);
|
|
} else $("select[name=role_id]").html('<option value="">請選擇</option>');
|
|
})
|
|
});
|
|
</script>
|
|
<div class="container">
|
|
|
|
<?php
|
|
|
|
include "account-record-submit.php";
|
|
/*
|
|
if($_SERVER["REQUEST_METHOD"] == "POST"){
|
|
if(empty($_POST["id"]) && empty($_POST["expert_id"]) && empty($_POST["personal_id"])){
|
|
echo "<p class='error'>Please fill up the required field!</p>";
|
|
} else {
|
|
echo "<p class='success'>Record has added successfully</p>";
|
|
}
|
|
}
|
|
*/
|
|
?>
|
|
|
|
|
|
|
|
<form class="form-inline" method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
|
|
|
|
|
|
<div>
|
|
<label for="accounttype">帳號類別(必選)</label>
|
|
<select name="accounttype" id="accounttype" required>
|
|
<option selected="selected" disabled="disabled" style="display: none" value=""></option>
|
|
<option value="A">客戶(A)</option>
|
|
<option value="B">保養人員(B)</option>
|
|
<!--
|
|
<option value="C">檢查人員</option>
|
|
<option value="D">契約人員</option>
|
|
-->
|
|
<option value="E">管理人員(E)</option>
|
|
<option value="M">永佳捷員工(M)</option>
|
|
<option value="X">未分類(X)</option>
|
|
</select>
|
|
<!-- <input type="text" name="accounttype" id="accounttype" placeholder="帳號類別..." required> -->
|
|
|
|
</div>
|
|
|
|
<div>
|
|
<label for="accountid">請輸入員工、個人客戶ID或公司客戶統編(必填)</label>
|
|
<input type="text" name="accountid" id="accountid" placeholder="請輸入員工、個人客戶ID或公司客戶統編...(必填)" maxlength="10" required>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
<label for="pwd">密碼(必填)</label>
|
|
<input type="text" name="pwd" id="pwd" required>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="name">姓名(必填)</label>
|
|
<input type="text" name="name" id="name" required>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
<label for="tel">電話</label>
|
|
<input type="text" name="tel" id="tel" maxlength="16">
|
|
|
|
</div>
|
|
|
|
<div>
|
|
<label for="address">地址</label>
|
|
<input type="text" name="address" id="address">
|
|
|
|
</div>
|
|
|
|
<div>
|
|
<label for="email">電子郵箱</label>
|
|
<input type="text" name="email" id="email">
|
|
|
|
</div>
|
|
|
|
<div>
|
|
<label for="lineid">Line ID</label>
|
|
<input type="text" name="lineid" id="lineid">
|
|
|
|
</div>
|
|
|
|
<div>
|
|
<label for="wechatid">微信ID</label>
|
|
<input type="text" name="wechatid" id="wechatid">
|
|
|
|
</div>
|
|
|
|
<div>
|
|
<label for="phone_call_help">保養員聯絡手機號(客戶必填)</label>
|
|
<input type="text" name="phone_call_help" id="phone_call_help" maxlength="16">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="chat_for_help">線上文字客服</label>
|
|
<input type="text" name="chat_for_help" id="chat_for_help">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="remote_help">遠端視頻帳號</label>
|
|
<input type="text" name="remote_help" id="remote_help">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="repairerid">服務與支持人員工號(客戶必填)</label>
|
|
<input type="text" name="repairerid" id="repairerid" maxlength="10">
|
|
|
|
</div>
|
|
|
|
<div>
|
|
<label for="manager">直屬主管工號(員工必填)</label>
|
|
<input type="text" name="manager" id="manager" maxlength="10">
|
|
|
|
</div>
|
|
<div>
|
|
<label for="department_id">部門(員工必填)</label>
|
|
<select name="department_id">
|
|
<option value="">請選擇</option>
|
|
<?php
|
|
foreach ($depart_arr as $k => $v) {
|
|
echo "<option value=\"".$k."\">".$v."</option>";
|
|
}
|
|
?>
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label for="role_id">職別(員工必填)</label>
|
|
<select name="role_id">
|
|
<option value="">請選擇</option>
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label for="creater">建檔人</label>
|
|
<input type="text" name="creater" id="creater" value="<?php echo $user_id; ?>" readonly>
|
|
<p class="error"><?php echo $creater_error; ?></p>
|
|
</div>
|
|
|
|
<div>
|
|
<!-- <label for="create_at">create_at</label> -->
|
|
<input type="hidden" name="create_at" id="create_at" value="<?php date('Y/m/d H:i:s'); ?>">
|
|
<p class="error"><?php echo $create_at_error; ?></p>
|
|
</div>
|
|
<?php if ($user_auth&2) { ?>
|
|
<div>
|
|
<button type="submit" name="submit">確定</button>
|
|
</div>
|
|
<?php } ?>
|
|
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
|
</form>
|
|
</div>
|
|
|
|
<?php include "footer.php"; ?>
|
|
|