10994015 1 year ago
parent
commit
9cf3bfa102
  1. 4
      wms/mkt/pricereview_renovate-index.php
  2. 5
      wms/mkt/pricereview_repair-check.php
  3. 29
      wms/mkt/pricereview_repair-create.php
  4. 16
      wms/mkt/pricereview_repair-index.php

4
wms/mkt/pricereview_renovate-index.php

@ -10,8 +10,8 @@ $status_arr = ["Y1" => "暫存", "YS" => "簽核中", "YY" => "結案同意", "Y
$data = array(); $data = array();
// sql語法存在變數中 // sql語法存在變數中
$sql_cmd = sql_myself($user_id); $sql_cmd = sql_myself($user_id);
// M0024許伃廷,M0107許紓晴權限全開 // M0024許伃廷,M0107許紓晴,M0012李盈瑩權限全開
if ($user_id == "M0024" || $user_id == "M0107") { if ($user_id == "M0024" || $user_id == "M0107" || $user_id == "M0012") {
$sql_cmd = "where create_at >= '2023-01-01 00:00:00'"; $sql_cmd = "where create_at >= '2023-01-01 00:00:00'";
} }
if ($user_id == "M0008") { if ($user_id == "M0008") {

5
wms/mkt/pricereview_repair-check.php

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

29
wms/mkt/pricereview_repair-create.php

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

16
wms/mkt/pricereview_repair-index.php

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

Loading…
Cancel
Save