Browse Source

1.統編改非必填

2.修改瀏覽權限
gary
jrbin 1 year ago
parent
commit
1221f77c72
  1. 5
      wms/mkt/pricereview_repair-check.php
  2. 29
      wms/mkt/pricereview_repair-create.php
  3. 16
      wms/mkt/pricereview_repair-index.php

5
wms/mkt/pricereview_repair-check.php

@ -91,6 +91,9 @@ input[type=submit], input[type=button] {
.dollar-right {
text-align: right;
}
.star {
color: red;
}
</style>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script>
@ -230,7 +233,7 @@ $(function(){
<table class="table table-bordered">
<thead>
<tr>
<th colspan="10">簽核操作</th>
<th colspan="10">簽核操作<span class="star">*</span></th>
</tr>
</thead>
<tbody>

29
wms/mkt/pricereview_repair-create.php

@ -116,6 +116,9 @@ input[type=submit], input[type=button] {
.dollar-right {
text-align: right;
}
.star {
color: red;
}
</style>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script>
@ -342,7 +345,7 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){
?>
<form class="form-inline" method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" enctype="multipart/form-data">
<div>
<label for="contractno">客戶合約號</label>
<label for="contractno">客戶合約號<span class="star">*</span></label>
<input type="text" name="contractno" id="contractno" required>
</div>
<div>
@ -351,16 +354,16 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){
</div>
<div class="nextline"></div>
<div>
<label for="repair_no">報價單編號</label>
<label for="repair_no">報價單編號<span class="star">*</span></label>
<input type="text" name="repair_no" id="repair_no" value="<?php echo $repair_no; ?>" readonly>
</div>
<div class="nextline"></div>
<div>
<label for="sign_date">簽訂日期</label><br>
<label for="sign_date">簽訂日期<span class="star">*</span></label><br>
<input type="date" name="sign_date" id="sign_date" value="<?php echo date('Y-m-d'); ?>" required>
</div>
<div>
<label for="company">公司地址</label>
<label for="company">公司地址<span class="star">*</span></label>
<select name="masada_addr" id="masada_addr" required>
<option value=""></option>
<?php
@ -371,11 +374,11 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){
</select>
</div>
<div>
<label for="company">客戶名稱</label>
<label for="company">客戶名稱<span class="star">*</span></label>
<input type="text" name="company" id="company" size="30" required>
</div>
<div>
<label for="facilityno">電梯編號</label>
<label for="facilityno">電梯編號<span class="star">*</span></label>
<input type="text" name="facilityno" required>
<select name="facilityno" required>
<option value=""></option>
@ -383,19 +386,19 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){
</div>
<div class="nextline"></div>
<div>
<label for="address">工程地址</label>
<label for="address">工程地址<span class="star">*</span></label>
<input type="text" name="address" id="address" size="50" required>
</div>
<div>
<label for="taxid">客戶統一編號</label>
<input type="text" name="taxid" id="taxid" maxlength="8" required>
<label for="taxid">客戶統一編號<span></span></label>
<input type="text" name="taxid" id="taxid" maxlength="8">
</div>
<div>
<label for="invoice">客戶發票抬頭</label>
<label for="invoice">客戶發票抬頭<span class="star">*</span></label>
<input type="text" name="invoice" id="invoice" size="30" required>
</div>
<div>
<label for="repairerid">申請人</label>
<label for="repairerid">申請人<span class="star">*</span></label>
<select name="repairerid" id="repairerid" required>
<option value=""></option>
<?php
@ -418,7 +421,7 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){
<table id="tb1" class="table table-bordered">
<thead>
<tr>
<th colspan="10"><a href="javascript:void(0);" id="btnadd" class="btn btn-primary btn-sm">新增</a></th>
<th colspan="10"><a href="javascript:void(0);" id="btnadd" class="btn btn-primary btn-sm">新增備品</a> <span class="star">*</span></th>
</tr>
<tr>
<th nowrap>名稱</th>
@ -476,7 +479,7 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){
<table class="table table-bordered">
<thead>
<tr>
<th colspan="10">簽核操作</th>
<th colspan="10">簽核操作<span class="star">*</span></th>
</tr>
</thead>
<tbody>

16
wms/mkt/pricereview_repair-index.php

@ -9,24 +9,16 @@ $psta_arr = ["A" => "簽核中", "B1" => "已同意", "B2" => "已完工", "X" =
// 設置一個空陣列來放資料
$data = array();
// sql語法存在變數中
$sql_cmd = sql_myself($user_id, "repairerid");
$sql_cmd = "where (repairerid = '$user_id' or checker = '$user_id')";
$is_manager = 0;
// 宜:M0054-陳志文
$repman_arr[0] = ["M0177"];
// 北:M0137-劉永德
$repman_arr[1] = ["M0059","M0083","M0084","M0090","M0064","M0106","M0092","M0120","M0147","M0139","M0194","M0210"];
// 桃:M0026-張莉凱
$repman_arr[2] = ["M0018", "M0045","M0089","M0104","M0111"];
// 中:M0086-李烘銘
$repman_arr[3] = ["M0148","M0114","M0161"];
// 南:M0033-吳育宗
$repman_arr[4] = ["M0196","M0195","M0190","M0094","M0123","M0124"];
if ($user_id == "M0054") { $is_manager = 1; $sql_cmd = "where repairerid in ('".implode("','", $repman_arr[0])."')"; }
elseif ($user_id == "M0137") { $is_manager = 1; $sql_cmd = "where repairerid in ('".implode("','", $repman_arr[1])."')"; }
elseif ($user_id == "M0026") { $is_manager = 1; $sql_cmd = "where repairerid in ('".implode("','", $repman_arr[2])."')"; }
elseif ($user_id == "M0086") { $is_manager = 1; $sql_cmd = "where repairerid in ('".implode("','", $repman_arr[3])."')"; }
elseif ($user_id == "M0033") { $is_manager = 1; $sql_cmd = "where repairerid in ('".implode("','", $repman_arr[4])."')"; }
elseif ($user_id == "M0012") $sql_cmd = "";
$manager_arr = ["M0054", "M0137", "M0026", "M0086", "M0033"];
if (in_array($user_id, $manager_arr)) $is_manager = 1;
if ($user_id == "M0012") $sql_cmd = "";
$sql = "select * from pricereview_repair_main $sql_cmd order by id";
$data = mysqli_query($link,$sql);
$para = "function_name=pricereview_repair&".$token_link;

Loading…
Cancel
Save