|
|
@ -1,12 +1,13 @@ |
|
|
|
<?php |
|
|
|
// ini_set('display_errors', 'on'); |
|
|
|
ini_set('display_errors', 'on'); |
|
|
|
/** |
|
|
|
* (汰改)流程規則: |
|
|
|
* 1. A:工務組長確認中 生管建立大日程 (或是系統洗入) |
|
|
|
* 工務:宜蘭=高培軒(M0087) 北=吳宗紘(M0040) 中=林瑋隆(M0113) 南=韋宗榮(M0039)改鄭存邑(M0102) |
|
|
|
* 2. B:營業員確認中 |
|
|
|
* 3. F:營業員主管確認中 |
|
|
|
* 3. C:設計部門確認中 (郭承瑋) |
|
|
|
* 4. D:設計部門主管確認中 (N0019江京鴻) |
|
|
|
* 4. D:設計部門主管確認中 (M0019江京鴻) |
|
|
|
* 5. E:生管確認中 (M0024伃廷) |
|
|
|
* 6. Z:本單結案 (00000) |
|
|
|
*/ |
|
|
@ -234,12 +235,12 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; |
|
|
|
$assign_status = array( |
|
|
|
'A' => '工務確認中', |
|
|
|
'B' => '工務部門已確認<br/>營業部門確認中', |
|
|
|
'F' => '營業部門已確認<br/>營業主管確認中', |
|
|
|
'C' => '營業部門已確認<br/>設計部門確認中', |
|
|
|
'D' => '設計部門已確認<br/>設計部門主管確認中', |
|
|
|
'E' => '營業部門主管已確認<br/>生管部門確認中', |
|
|
|
'Z' => '此作番大日程已結案', |
|
|
|
); |
|
|
|
|
|
|
|
if (checkNowFormStatus($link) == '') { |
|
|
|
echo "此作番大日程已結案"; |
|
|
|
} else { |
|
|
@ -283,6 +284,78 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; |
|
|
|
<div id="tabs-3"> |
|
|
|
<table class="table table-bordered" style="width:100%"> |
|
|
|
<tbody style="font-weight: bolder;margin-bottom: 20px"> |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">工勘人員</td> |
|
|
|
<td> |
|
|
|
<input type="hidden" name="old_warehouseid" id="old_warehouseid" value="<?= $row["warehouseid"]; ?>"> |
|
|
|
<?php |
|
|
|
// 北區 |
|
|
|
if (in_array($row['warehouseid'], ['M0040', 'M0040', 'M0150'])) { |
|
|
|
?> |
|
|
|
<select name="warehouseid" id="warehouseid" <?= $warehouse; ?>> |
|
|
|
<option value="">請選擇</option> |
|
|
|
<option value="M0040" <?php if ($row["warehouseid"] == "M0040") echo " selected"; ?>>吳宗紘</option> |
|
|
|
<option value="M0150" <?php if ($row["warehouseid"] == "M0150") echo " selected"; ?>>羅盛騰</option> |
|
|
|
</select> |
|
|
|
<?php |
|
|
|
} |
|
|
|
?> |
|
|
|
<?php |
|
|
|
// 中區 |
|
|
|
if (in_array($row['warehouseid'], ['M0198', 'M0158'])) { |
|
|
|
?> |
|
|
|
<select name="warehouseid" id="warehouseid" <?= $warehouse; ?>> |
|
|
|
<option value="">請選擇</option> |
|
|
|
<option value="M0198" <?php if ($row["warehouseid"] == "M0198") echo " selected"; ?>>廖堉勝</option> |
|
|
|
<option value="M0158" <?php if ($row["warehouseid"] == "M0158") echo " selected"; ?>>劉子睿</option> |
|
|
|
</select> |
|
|
|
<?php |
|
|
|
} |
|
|
|
?> |
|
|
|
<?php |
|
|
|
// 南區 |
|
|
|
if (in_array($row['warehouseid'], ['M0078', 'M0102', 'M0187'])) { |
|
|
|
?> |
|
|
|
<select name="warehouseid" id="warehouseid" <?= $warehouse; ?>> |
|
|
|
<option value="">請選擇</option> |
|
|
|
<option value="M0078" <?php if ($row["warehouseid"] == "M0078") echo " selected"; ?>>許益連</option> |
|
|
|
<option value="M0102" <?php if ($row["warehouseid"] == "M0102") echo " selected"; ?>>鄭存邑</option> |
|
|
|
<option value="M0187" <?php if ($row["warehouseid"] == "M0187") echo " selected"; ?>>田祖豪</option> |
|
|
|
</select> |
|
|
|
<?php |
|
|
|
} |
|
|
|
?> |
|
|
|
<?php |
|
|
|
// 宜蘭 |
|
|
|
if (in_array($row['warehouseid'], ['M0087'])) { |
|
|
|
?> |
|
|
|
<select name="warehouseid" id="warehouseid" <?= $warehouse; ?>> |
|
|
|
<option value="">請選擇</option> |
|
|
|
<option value="M0087" <?php if ($row["warehouseid"] == "M0087") echo " selected"; ?>>高培軒</option> |
|
|
|
</select> |
|
|
|
<?php |
|
|
|
} |
|
|
|
?> |
|
|
|
<?php |
|
|
|
// 南區 |
|
|
|
if (!in_array($row['warehouseid'], ['M0040', 'M0150', 'M0078', 'M0102', 'M0187', 'M0198', 'M0087', 'M0158'])) { |
|
|
|
?> |
|
|
|
<select name="warehouseid" id="warehouseid" <?= $warehouse; ?>> |
|
|
|
<option value="">請選擇</option> |
|
|
|
<option value="M0040" <?php if ($row["warehouseid"] == "M0040") echo " selected"; ?>>張潘榮</option> |
|
|
|
<option value="M0150" <?php if ($row["warehouseid"] == "M0150") echo " selected"; ?>>羅盛騰</option> |
|
|
|
<option value="M0078" <?php if ($row["warehouseid"] == "M0078") echo " selected"; ?>>許益連</option> |
|
|
|
<option value="M0102" <?php if ($row["warehouseid"] == "M0102") echo " selected"; ?>>鄭存邑</option> |
|
|
|
<option value="M0198" <?php if ($row["warehouseid"] == "M0198") echo " selected"; ?>>廖堉勝</option> |
|
|
|
<option value="M0187" <?php if ($row["warehouseid"] == "M0187") echo " selected"; ?>>田祖豪</option> |
|
|
|
<option value="M0087" <?php if ($row["warehouseid"] == "M0087") echo " selected"; ?>>高培軒</option> |
|
|
|
<option value="M0158" <?php if ($row["warehouseid"] == "M0158") echo " selected"; ?>>劉子睿</option> |
|
|
|
</select> |
|
|
|
<?php |
|
|
|
} |
|
|
|
?> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">樓高通報</td> |
|
|
|
<td> |
|
|
@ -373,78 +446,6 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle"> |
|
|
|
客戶計劃圖 |
|
|
|
<br /> |
|
|
|
(意匠圖) |
|
|
|
<?php |
|
|
|
$result2 = getWipwholeChangePlanningCustomerDetailsStatus($link, $id); |
|
|
|
$row2 = mysqli_fetch_assoc($result2); |
|
|
|
if (empty($row2['change_status'])) { |
|
|
|
$show_tmp_arr = [ |
|
|
|
'311', '312', '313', '314', '315', |
|
|
|
'501', '511', '512', '513', '514', |
|
|
|
'220', '320' |
|
|
|
]; |
|
|
|
if (in_array($user_department_id, $show_tmp_arr)) |
|
|
|
echo "<br/>"; |
|
|
|
echo "<a target='_blank' style='color:#00F;' href='wipwhole-change-planning-customer-name.php?function_name=wipwholerenstatus&$token_link&id=$id'>申請上傳</a>"; |
|
|
|
} else { |
|
|
|
if (in_array($row2['change_status'], ['A', 'B', 'D'])) { |
|
|
|
echo "<br/>"; |
|
|
|
echo "<a target='_blank' style='color:#00F;' href='wipwhole-change-planning-customer-name.php?function_name=wipwholerenstatus&$token_link&id=$id'>客戶姓名:" . $row2['custom_name'] . "<br/>狀態:審核中</a>"; |
|
|
|
} |
|
|
|
if ($row2['change_status'] == 'C') { |
|
|
|
echo "<br/>"; |
|
|
|
echo "<a target='_blank' style='color:#00F;' href='wipwhole-change-planning-customer-name.php?function_name=wipwholerenstatus&$token_link&id=$id'>客戶姓名:" . $row2['custom_name'] . "<br/>狀態:已取消</a>"; |
|
|
|
} |
|
|
|
if ($row2['change_status'] == 'Z') { |
|
|
|
echo "<br/>"; |
|
|
|
echo "<a target='_blank' style='color:#00F;' href='wipwhole-change-planning-customer-name.php?function_name=wipwholerenstatus&$token_link&id=$id'>客戶姓名:" . $row2['custom_name'] . "<br/>狀態:審核通過</a>"; |
|
|
|
} |
|
|
|
} |
|
|
|
?> |
|
|
|
</td> |
|
|
|
<td> |
|
|
|
<select class="disabled_select" name="customer_planning_verify" id="customer_planning_verify" <?= $warehouse; ?>> |
|
|
|
<option <?php if ($row["customer_planning_verify"] == "1") echo " selected"; ?> value="1">請選擇</option> |
|
|
|
<option <?php if ($row["customer_planning_verify"] == "0") echo " selected"; ?> value="0">已完成</option> |
|
|
|
<option <?php if ($row["customer_planning_verify"] == "1") echo " selected"; ?> value="1">進行中</option> |
|
|
|
<option <?php if ($row["customer_planning_verify"] == "2") echo " selected"; ?> value="2">無需求</option> |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle;">附件</td> |
|
|
|
<td style="vertical-align: middle;"> |
|
|
|
<input style="width:70%;display:inline;" type="file" id="customer_planning_verify_file" name="customer_planning_verify_file" <?php |
|
|
|
if (isset($row2['change_status'])) { |
|
|
|
echo $row2['change_status'] === 'Z' ? "" : "disabled"; |
|
|
|
} else { |
|
|
|
echo "disabled"; |
|
|
|
} |
|
|
|
?>> |
|
|
|
<?php |
|
|
|
// echo !empty($row['customer_planning_verify_file']) ? "<a id='customer_planning_verify_file_a' style='color:#00F;' href='" . $row['customer_planning_verify_file'] . "' target='_blank'>下載附件</a>" : ""; |
|
|
|
?> |
|
|
|
<br /> |
|
|
|
<?php |
|
|
|
$customer_planning_verify_files = getAllCustomerPlanningVerify($link, $id); |
|
|
|
foreach ($customer_planning_verify_files as $row2) : |
|
|
|
echo "<a id='customer_planning_verify_file_a' style='color:#00F;' |
|
|
|
href='" . $row2['customer_planning_verify_file'] . "' target='_blank'>下載附件_" . $row2['custom_name'] . "_" . $row2['create_at'] . "</a></br>"; |
|
|
|
endforeach; |
|
|
|
?> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認時間</td> |
|
|
|
<td><input class="form-control disabled_select" type="datetime-local" id="customer_planning_verify_at" name="customer_planning_verify_at" value="<?= $row['customer_planning_verify_at']; ?>" readonly></td> |
|
|
|
<td style="vertical-align: middle">確認人</td> |
|
|
|
<td> |
|
|
|
<select name="customer_planning_verify_owner" class="disabled_select" id="customer_planning_verify_owner" disabled> |
|
|
|
<option value="">請選擇</option> |
|
|
|
<?php echo getSelectOptionHtml($all_users_options, $row['customer_planning_verify_owner']); ?> |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td colspan="8"> |
|
|
|
<i>如有複數檔案請放置同個壓縮檔後再上傳</i> |
|
|
@ -549,6 +550,28 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">移交日</td> |
|
|
|
<td style="vertical-align: middle"> |
|
|
|
<div class="input-group"> |
|
|
|
<input class="form-control disabled_select" type="date" id="delivery_date_tmp" value="<?= $row['delivery_date']; ?>" <?= $warehouse2; ?>> |
|
|
|
<span class="input-group-btn"> |
|
|
|
<button class="btn btn-default" type='button' onclick='$("#delivery_date_tmp").val("");' <?= $warehouse2; ?>>清除</button> |
|
|
|
</span> |
|
|
|
<input type="hidden" id="old_delivery_date_tmp" value="<?= $row['delivery_date']; ?>"> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認人</td> |
|
|
|
<td> |
|
|
|
<select class="disabled_select" id="delivery_date_owner_tmp" disabled> |
|
|
|
<option value="">請選擇</option> |
|
|
|
<?php echo getSelectOptionHtml($all_users_options, $row['delivery_date_owner']); ?> |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
<td colspan='4'> |
|
|
|
<span class="text-danger">有官檢日或QC合格日後才可填寫</span> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td colspan="4"> |
|
|
|
<?php |
|
|
@ -566,6 +589,20 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; |
|
|
|
<div id="tabs-1"> |
|
|
|
<table class="table table-bordered" style="width:100%"> |
|
|
|
<tbody style="font-weight: bolder;margin-bottom: 20px"> |
|
|
|
<tr> |
|
|
|
<td>營業人員確認項</td> |
|
|
|
<td> |
|
|
|
<?php |
|
|
|
echo "營業擔當:" . $row['salesid'] . accountid2name()[$row['salesid']]; |
|
|
|
?> |
|
|
|
<br /> |
|
|
|
<?php |
|
|
|
if (!checkUseridIsManager($row['salesid'])) { |
|
|
|
echo "營業擔當主管:" . manage_class($row['salesid'])[0] . accountid2name(manage_class($row['salesid'])[0])[manage_class($row['salesid'])[0]]; |
|
|
|
} |
|
|
|
?> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle;width:auto;">營業確認規格</td> |
|
|
|
<td style="width:150px;"> |
|
|
@ -597,6 +634,78 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
|
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle"> |
|
|
|
客戶計劃圖 |
|
|
|
<br /> |
|
|
|
(意匠圖) |
|
|
|
<?php |
|
|
|
// $result2 = getWipwholeChangePlanningCustomerDetailsStatus($link, $id); |
|
|
|
// $row2 = mysqli_fetch_assoc($result2); |
|
|
|
// if (empty($row2['change_status'])) { |
|
|
|
// $show_tmp_arr = [ |
|
|
|
// '311', '312', '313', '314', '315', |
|
|
|
// '501', '511', '512', '513', '514', |
|
|
|
// '220', '320' |
|
|
|
// ]; |
|
|
|
// if (in_array($user_department_id, $show_tmp_arr)) |
|
|
|
// echo "<br/>"; |
|
|
|
// echo "<a target='_blank' style='color:#00F;' href='wipwhole-change-planning-customer-name.php?function_name=wipwholerenstatus&$token_link&id=$id'>申請上傳</a>"; |
|
|
|
// } else { |
|
|
|
// if (in_array($row2['change_status'], ['A', 'B', 'D'])) { |
|
|
|
// echo "<br/>"; |
|
|
|
// echo "<a target='_blank' style='color:#00F;' href='wipwhole-change-planning-customer-name.php?function_name=wipwholerenstatus&$token_link&id=$id'>客戶姓名:" . $row2['custom_name'] . "<br/>狀態:審核中</a>"; |
|
|
|
// } |
|
|
|
// if ($row2['change_status'] == 'C') { |
|
|
|
// echo "<br/>"; |
|
|
|
// echo "<a target='_blank' style='color:#00F;' href='wipwhole-change-planning-customer-name.php?function_name=wipwholerenstatus&$token_link&id=$id'>客戶姓名:" . $row2['custom_name'] . "<br/>狀態:已取消</a>"; |
|
|
|
// } |
|
|
|
// if ($row2['change_status'] == 'Z') { |
|
|
|
// echo "<br/>"; |
|
|
|
// echo "<a target='_blank' style='color:#00F;' href='wipwhole-change-planning-customer-name.php?function_name=wipwholerenstatus&$token_link&id=$id'>客戶姓名:" . $row2['custom_name'] . "<br/>狀態:審核通過</a>"; |
|
|
|
// } |
|
|
|
// } |
|
|
|
?> |
|
|
|
</td> |
|
|
|
<td> |
|
|
|
<select class="disabled_select" name="customer_planning_verify" id="customer_planning_verify" <?= $marketing; ?>> |
|
|
|
<option <?php if ($row["customer_planning_verify"] == "1") echo " selected"; ?> value="1">請選擇</option> |
|
|
|
<option <?php if ($row["customer_planning_verify"] == "0") echo " selected"; ?> value="0">已完成</option> |
|
|
|
<option <?php if ($row["customer_planning_verify"] == "1") echo " selected"; ?> value="1">進行中</option> |
|
|
|
<option <?php if ($row["customer_planning_verify"] == "2") echo " selected"; ?> value="2">無需求</option> |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle;">附件</td> |
|
|
|
<td style="vertical-align: middle;"> |
|
|
|
客戶姓名:<input type="text" name="real_custom_name" id="real_custom_name" style="width:70%;display:inline;" value="<?= $row["real_custom_name"]; ?>" placeholder="輸入後即可上傳附件" <?= $marketing; ?> /> |
|
|
|
<br /> |
|
|
|
<input style="width:70%;display:inline;" type="file" id="customer_planning_verify_file" name="customer_planning_verify_file" disabled> |
|
|
|
<?php |
|
|
|
// echo !empty($row['customer_planning_verify_file']) ? "<a id='customer_planning_verify_file_a' style='color:#00F;' href='" . $row['customer_planning_verify_file'] . "' target='_blank'>下載附件</a>" : ""; |
|
|
|
?> |
|
|
|
<br /> |
|
|
|
<?php |
|
|
|
$customer_planning_verify_files = getAllCustomerPlanningVerify($link, $id); |
|
|
|
foreach ($customer_planning_verify_files as $row2) : |
|
|
|
echo "<a id='customer_planning_verify_file_a' style='color:#00F;' |
|
|
|
href='" . $row2['customer_planning_verify_file'] . "' target='_blank'>下載附件_" . $row2['custom_name'] . "_" . $row2['create_at'] . "</a></br>"; |
|
|
|
endforeach; |
|
|
|
?> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認時間</td> |
|
|
|
<td><input class="form-control disabled_select" type="datetime-local" id="customer_planning_verify_at" name="customer_planning_verify_at" value="<?= $row['customer_planning_verify_at']; ?>" readonly></td> |
|
|
|
<td style="vertical-align: middle">確認人</td> |
|
|
|
<td> |
|
|
|
<select name="customer_planning_verify_owner" class="disabled_select" id="customer_planning_verify_owner" disabled> |
|
|
|
<option value="">請選擇</option> |
|
|
|
<?php echo getSelectOptionHtml($all_users_options, $row['customer_planning_verify_owner']); ?> |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">客戶顏色</td> |
|
|
|
<td> |
|
|
@ -690,7 +799,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; |
|
|
|
<td colspan="7"> |
|
|
|
<textarea class="form-control " name="marketing_remark" <?= $marketing; ?>><?php echo $row['marketing_remark']; ?></textarea> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<!-- <tr> |
|
|
|
<td style="vertical-align: middle">移交日</td> |
|
|
|
<td style="vertical-align: middle"> |
|
|
|
<div class="input-group"> |
|
|
@ -698,6 +807,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; |
|
|
|
<span class="input-group-btn"> |
|
|
|
<button class="btn btn-default" type='button' onclick='$("#delivery_date").val("");' <?= $marketing2; ?>>清除</button> |
|
|
|
</span> |
|
|
|
<input type="hidden" id="old_delivery_date" name="old_delivery_date" value="<?= $row['delivery_date']; ?>"> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認人</td> |
|
|
@ -707,7 +817,10 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; |
|
|
|
<?php echo getSelectOptionHtml($all_users_options, $row['delivery_date_owner']); ?> |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<td colspan='4'> |
|
|
|
<span class="text-danger">有官檢日或QC合格日後才可填寫</span> |
|
|
|
</td> |
|
|
|
</tr> --> |
|
|
|
<tr> |
|
|
|
<td colspan="8"> |
|
|
|
<input class="form-control " type="hidden" name="creater" value="<?= $user_id; ?>"> |
|
|
@ -1258,6 +1371,36 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; |
|
|
|
<button onclick="updateRealArrivalDate()" type="button" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;" <?php echo $shengguan2; ?>>出貨日調整</button> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">官檢日</td> |
|
|
|
<td style="vertical-align: middle"> |
|
|
|
<div class="input-group"> |
|
|
|
<input class="form-control" type="date" value="<?= $row['official_check_date']; ?>" disabled> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認人</td> |
|
|
|
<td> |
|
|
|
<select disabled> |
|
|
|
<option value="">請選擇</option> |
|
|
|
<?php echo getSelectOptionHtml($all_users_options, $row['official_check_date_owner']); ?> |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">移交日</td> |
|
|
|
<td style="vertical-align: middle"> |
|
|
|
<div class="input-group"> |
|
|
|
<input class="form-control " type="date" value="<?= $row['delivery_date']; ?>" disabled> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認人</td> |
|
|
|
<td> |
|
|
|
<select disabled> |
|
|
|
<option value="">請選擇</option> |
|
|
|
<?php echo getSelectOptionHtml($all_users_options, $row['delivery_date_owner']); ?> |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
</div> |
|
|
@ -1267,12 +1410,12 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">QC及官檢類型</td> |
|
|
|
<td> |
|
|
|
<input type='radio' disabled <?php echo $row['qc_official_type'] == 'Q' ? "checked" : ""; ?> /> |
|
|
|
<label for='outsourcer_type_I'>只需QC</label> |
|
|
|
<input type='radio' disabled <?php echo $row['qc_official_type'] == 'O' ? "checked" : ""; ?> /> |
|
|
|
<label for='outsourcer_type_T'>只需官檢</label> |
|
|
|
<input type='radio' disabled <?php echo $row['qc_official_type'] == 'QO' ? "checked" : ""; ?> /> |
|
|
|
<label for='outsourcer_type_IT'>QC+官檢</label> |
|
|
|
<input type='radio' id="qc_official_type_Q" name='qc_official_type' value="Q" <?= $pinzheng; ?> <?php echo $row['qc_official_type'] == 'Q' ? "checked" : ""; ?> /> |
|
|
|
<label for='qc_official_type_Q'>只需QC</label> |
|
|
|
<input type='radio' id="qc_official_type_O" name='qc_official_type' value="O" <?= $pinzheng; ?> <?php echo $row['qc_official_type'] == 'O' ? "checked" : ""; ?> /> |
|
|
|
<label for='qc_official_type_O'>只需官檢</label> |
|
|
|
<input type='radio' id="qc_official_type_QO" name='qc_official_type' value="QO" <?= $pinzheng; ?> <?php echo $row['qc_official_type'] == 'QO' ? "checked" : ""; ?> /> |
|
|
|
<label for='qc_official_type_QO'>QC+官檢</label> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
@ -1363,6 +1506,96 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; |
|
|
|
(工務助理項目) |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<?php |
|
|
|
if ($user_id == 'M0193') { |
|
|
|
?> |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">QC及官檢類型</td> |
|
|
|
<td> |
|
|
|
<input type='radio' id="qc_official_type_Q2" name='qc_official_type2' value='Q' <?= $warehouse2; ?> <?php echo $row['qc_official_type'] == 'Q' ? "checked" : ""; ?> /> |
|
|
|
<label for='qc_official_type_Q2'>只需QC</label> |
|
|
|
<input type='radio' id="qc_official_type_O2" name='qc_official_type2' value='O' <?= $warehouse2; ?> <?php echo $row['qc_official_type'] == 'O' ? "checked" : ""; ?> /> |
|
|
|
<label for='qc_official_type_O2'>只需官檢</label> |
|
|
|
<input type='radio' id="qc_official_type_QO2" name='qc_official_type2' value='QO' <?= $warehouse2; ?> <?php echo $row['qc_official_type'] == 'QO' ? "checked" : ""; ?> /> |
|
|
|
<label for='qc_official_type_QO2'>QC+官檢</label> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">內部QC日</td> |
|
|
|
<td style="vertical-align: middle"> |
|
|
|
<div class="input-group"> |
|
|
|
<input class="form-control" type="date" id="qc_date2" name="qc_date2" value="<?= $row['qc_date']; ?>" <?= $warehouse2; ?>> |
|
|
|
<span class="input-group-btn"> |
|
|
|
<button class="btn btn-default" type='button' onclick='$("#qc_date2").val("");' <?= $warehouse2; ?>>清除</button> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認人</td> |
|
|
|
<td> |
|
|
|
<select class="disabled_select" id="qc_date2_owner" name="qc_date2_owner" disabled> |
|
|
|
<option value="">請選擇</option> |
|
|
|
<?php echo getSelectOptionHtml($all_users_options, $row['qc_date_owner']); ?> |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">QC合格日</td> |
|
|
|
<td style="vertical-align: middle"> |
|
|
|
<div class="input-group"> |
|
|
|
<input class="form-control" type="date" id="end_qc_date2" name="end_qc_date2" value="<?= $row['end_qc_date']; ?>" <?= $warehouse2; ?>> |
|
|
|
<span class="input-group-btn"> |
|
|
|
<button class="btn btn-default" type='button' onclick='$("#end_qc_date2").val("");' <?= $warehouse2; ?>>清除</button> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認人</td> |
|
|
|
<td> |
|
|
|
<select class="disabled_select" id="end_qc_date2_owner" name="end_qc_date2_owner" disabled> |
|
|
|
<option value="">請選擇</option> |
|
|
|
<?php echo getSelectOptionHtml($all_users_options, $row['end_qc_date_owner']); ?> |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">官檢日</td> |
|
|
|
<td style="vertical-align: middle"> |
|
|
|
<div class="input-group"> |
|
|
|
<input class="form-control" type="date" id="official_check_date2" name="official_check_date2" value="<?= $row['official_check_date']; ?>" <?= $warehouse2; ?>> |
|
|
|
<input type="hidden" id="old_official_check_date2" name="old_official_check_date2" value="<?= $row['official_check_date']; ?>" <?= $warehouse2; ?>> |
|
|
|
<span class="input-group-btn"> |
|
|
|
<button class="btn btn-default" type='button' onclick='$("#official_check_date2").val("");' <?= $warehouse2; ?>>清除</button> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認人</td> |
|
|
|
<td> |
|
|
|
<select class="disabled_select" id="official_check_date2_owner" name="official_check_date2_owner" disabled> |
|
|
|
<option value="">請選擇</option> |
|
|
|
<?php echo getSelectOptionHtml($all_users_options, $row['official_check_date_owner']); ?> |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">移交日</td> |
|
|
|
<td style="vertical-align: middle"> |
|
|
|
<div class="input-group"> |
|
|
|
<input class="form-control disabled_select" type="date" id="delivery_date2" name="delivery_date2" value="<?= $row['delivery_date']; ?>" <?= $warehouse2; ?>> |
|
|
|
<span class="input-group-btn"> |
|
|
|
<button class="btn btn-default" type='button' onclick='$("#delivery_date2").val("");' <?= $warehouse2; ?>>清除</button> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認人</td> |
|
|
|
<td> |
|
|
|
<select class="disabled_select" id="delivery_date2_owner" name="delivery_date2_owner" disabled> |
|
|
|
<option value="">請選擇</option> |
|
|
|
<?php echo getSelectOptionHtml($all_users_options, $row['delivery_date_owner']); ?> |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<?php |
|
|
|
} |
|
|
|
?> |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">發包類型</td> |
|
|
|
<td> |
|
|
@ -1536,6 +1769,84 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<?php |
|
|
|
if ($user_id == 'M0193') { |
|
|
|
?> |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">實際安裝開工日</td> |
|
|
|
<td style="vertical-align: middle"> |
|
|
|
<div class="input-group"> |
|
|
|
<input class="form-control" type="date" name="install_start_date2" id="install_start_date2" value="<?= $row['install_start_date']; ?>" <?= $warehouse2; ?>> |
|
|
|
<span class="input-group-btn"> |
|
|
|
<button class="btn btn-default" type='button' onclick='$("#install_start_date2").val("");' <?= $warehouse2; ?>>清除</button> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認人</td> |
|
|
|
<td> |
|
|
|
<select class="disabled_select" name="install_start_date2_owner" id="install_start_date2_owner" disabled> |
|
|
|
<option value="">請選擇</option> |
|
|
|
<?php echo getSelectOptionHtml($all_users_options, $row['install_start_date_owner']); ?> |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">實際安裝完工日</td> |
|
|
|
<td style="vertical-align: middle"> |
|
|
|
<div class="input-group"> |
|
|
|
<input class="form-control" type="date" name="install_end_date2" id="install_end_date2" value="<?= $row['install_end_date']; ?>" <?= $warehouse2; ?>> |
|
|
|
<span class="input-group-btn"> |
|
|
|
<button class="btn btn-default" type='button' onclick='$("#install_end_date2").val("");' <?= $warehouse2; ?>>清除</button> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認人</td> |
|
|
|
<td> |
|
|
|
<select class="disabled_select" name="install_end_date2_owner" id="install_end_date2_owner" disabled> |
|
|
|
<option value="">請選擇</option> |
|
|
|
<?php echo getSelectOptionHtml($all_users_options, $row['install_end_date_owner']); ?> |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">實際試車開工日</td> |
|
|
|
<td style="vertical-align: middle"> |
|
|
|
<div class="input-group"> |
|
|
|
<input class="form-control" type="date" name="tryrun_start_date2" id="tryrun_start_date2" value="<?= $row['tryrun_start_date']; ?>" <?= $warehouse2; ?>> |
|
|
|
<span class="input-group-btn"> |
|
|
|
<button class="btn btn-default" type='button' onclick='$("#tryrun_start_date2").val("");' <?= $warehouse2; ?>>清除</button> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認人</td> |
|
|
|
<td> |
|
|
|
<select class="disabled_select" name="tryrun_start_date2_owner" id="tryrun_start_date2_owner" disabled> |
|
|
|
<option value="">請選擇</option> |
|
|
|
<?php echo getSelectOptionHtml($all_users_options, $row['tryrun_start_date_owner']); ?> |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">實際試車完工日</td> |
|
|
|
<td style="vertical-align: middle"> |
|
|
|
<div class="input-group"> |
|
|
|
<input class="form-control" type="date" name="tryrun_end_date2" id="tryrun_end_date2" value="<?= $row['tryrun_end_date']; ?>" <?= $warehouse2; ?>> |
|
|
|
<span class="input-group-btn"> |
|
|
|
<button class="btn btn-default" type='button' onclick='$("#tryrun_end_date2").val("");' <?= $warehouse2; ?>>清除</button> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認人</td> |
|
|
|
<td> |
|
|
|
<select class="disabled_select" name="tryrun_end_date2_owner" id="tryrun_end_date2_owner" disabled> |
|
|
|
<option value="">請選擇</option> |
|
|
|
<?php echo getSelectOptionHtml($all_users_options, $row['tryrun_end_date_owner']); ?> |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<?php |
|
|
|
} |
|
|
|
?> |
|
|
|
<tr> |
|
|
|
<td>備註</td> |
|
|
|
<td colspan="3"> |
|
|
@ -1574,15 +1885,19 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; |
|
|
|
</form> |
|
|
|
<form method="post" id="assign_form" enctype="multipart/form-data"> |
|
|
|
<input type="hidden" name='form_name' value="assign_form" /> |
|
|
|
<input type="hidden" name='id' value="<?php echo $id; ?>" /> |
|
|
|
</form> |
|
|
|
<form method="post" id="back_marketing_assign_form" enctype="multipart/form-data"> |
|
|
|
<input type="hidden" name='salesid' value="<?php echo $row['salesid']; ?>" /> |
|
|
|
<input type="hidden" name='id' value="<?php echo $id; ?>" /> |
|
|
|
<input type="hidden" name='form_name' value="back_marketing_assign_form" /> |
|
|
|
</form> |
|
|
|
<form method="post" id="back_design_assign_form" enctype="multipart/form-data"> |
|
|
|
<input type="hidden" name='id' value="<?php echo $id; ?>" /> |
|
|
|
<input type="hidden" name='form_name' value="back_design_assign_form" /> |
|
|
|
</form> |
|
|
|
<form method="post" id="warehouse_assign_form" enctype="multipart/form-data"> |
|
|
|
<input type="hidden" name='id' value="<?php echo $id; ?>" /> |
|
|
|
<input type="hidden" name='form_name' value="warehouse_assign_form" /> |
|
|
|
</form> |
|
|
|
<form method="post" id="update_contract_date_form" enctype="multipart/form-data"> |
|
|
@ -1614,6 +1929,12 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; |
|
|
|
<input type="hidden" id="tryrun_start_date_owner" name='tryrun_start_date_owner' value="<?php echo $row['tryrun_start_date_owner']; ?>" /> |
|
|
|
<input type="hidden" id="tryrun_end_date" name='tryrun_end_date' value="<?php echo $row['tryrun_end_date']; ?>" /> |
|
|
|
<input type="hidden" id="tryrun_end_date_owner" name='tryrun_end_date_owner' value="<?php echo $row['tryrun_end_date_owner']; ?>" /> |
|
|
|
<input type="hidden" id="delivery_date" name='delivery_date' value="<?php echo $row['delivery_date']; ?>" /> |
|
|
|
<input type="hidden" id="old_delivery_date" name='old_delivery_date' value="<?php echo $row['delivery_date']; ?>" /> |
|
|
|
<input type="hidden" id="delivery_date_owner" name='delivery_date_owner' value="<?php echo $row['delivery_date_owner']; ?>" /> |
|
|
|
<input type="hidden" id="facilityno" name='facilityno' value="<?php echo $row['facilityno']; ?>" /> |
|
|
|
<input type="hidden" id="contractno" name='contractno' value="<?php echo $row['contractno']; ?>" /> |
|
|
|
<input type="hidden" name='salesid' value="<?php echo $row['salesid']; ?>" /> |
|
|
|
<input type="hidden" name='form_name' value="update_install_date_form" /> |
|
|
|
</form> |
|
|
|
<form method="post" id="update_shengguan_form" enctype="multipart/form-data"> |
|
|
@ -1646,7 +1967,34 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; |
|
|
|
$('#renovate_type').select2(); |
|
|
|
$("#renovate_type").val(jsonData).trigger("change"); |
|
|
|
$('#site_survey_contact_verify').select2(); |
|
|
|
checkCustomerPlanningVerifyFileKeyinStatus(); |
|
|
|
checkDeliveryDateKeyinStatus(); |
|
|
|
}); |
|
|
|
|
|
|
|
function checkCustomerPlanningVerifyFileKeyinStatus() { |
|
|
|
checkCustomerPlanningVerifyFileDisabled(); |
|
|
|
$("#real_custom_name").keyup(function() { |
|
|
|
checkCustomerPlanningVerifyFileDisabled(); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
function checkCustomerPlanningVerifyFileDisabled() { |
|
|
|
if ($("#real_custom_name").val() !== "") { |
|
|
|
$("#customer_planning_verify_file").prop("disabled", false); |
|
|
|
} else { |
|
|
|
$("#customer_planning_verify_file").prop("disabled", true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function checkDeliveryDateKeyinStatus() { |
|
|
|
$("#delivery_date,#delivery_date_tmp").prop("disabled", true); |
|
|
|
if ($("#end_qc_date").val() !== "") { |
|
|
|
$("#delivery_date,#delivery_date_tmp").prop("disabled", false); |
|
|
|
} |
|
|
|
if ($("#official_check_date").val() !== "") { |
|
|
|
$("#delivery_date,#delivery_date_tmp").prop("disabled", false); |
|
|
|
} |
|
|
|
} |
|
|
|
$(function() { |
|
|
|
var tab = $('#tab').val(); |
|
|
|
$("#tabs").tabs({ |
|
|
@ -1670,7 +2018,15 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; |
|
|
|
'qc_date', |
|
|
|
'end_qc_date', |
|
|
|
'official_check_date', |
|
|
|
'delivery_date' |
|
|
|
// 'delivery_date', |
|
|
|
'qc_date2', |
|
|
|
'end_qc_date2', |
|
|
|
'official_check_date2', |
|
|
|
'delivery_date2', |
|
|
|
'install_start_date2', |
|
|
|
'install_end_date2', |
|
|
|
'tryrun_start_date2', |
|
|
|
'tryrun_end_date2', |
|
|
|
] |
|
|
|
for (var i = 0; i < catchTime_input_arr.length; i++) { |
|
|
|
inputChangeCatchTime(catchTime_input_arr[i]); |
|
|
@ -1700,6 +2056,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; |
|
|
|
'install_end_date', |
|
|
|
'tryrun_start_date', |
|
|
|
'tryrun_end_date', |
|
|
|
'delivery_date' |
|
|
|
] |
|
|
|
for (var i = 0; i < oursourcer_input_arr.length; i++) { |
|
|
|
inputChangeOutsourcer(oursourcer_input_arr[i]); |
|
|
@ -1772,6 +2129,8 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; |
|
|
|
} |
|
|
|
|
|
|
|
function getDoMarketingAssignStatus() { |
|
|
|
if ($("#customer_planning_verify").val() == '1') |
|
|
|
return 2; |
|
|
|
if ($("#sales_spec_verify").val() == '1') |
|
|
|
return 2; |
|
|
|
if ($("#customer_style_verify").val() == '1') |
|
|
@ -1847,8 +2206,6 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; |
|
|
|
return 2; |
|
|
|
if ($("#site_survey_contact_verify").val() == '1') |
|
|
|
return 2; |
|
|
|
if ($("#customer_planning_verify").val() == '1') |
|
|
|
return 2; |
|
|
|
if ($("#building_heigh_verify").val() == '0' && !$('#building_heigh_verify_file_a').length) |
|
|
|
return 3; |
|
|
|
if ($("#site_survey_contact_verify").val() == '0' && !$('#site_survey_contact_verify_file_a').length) |
|
|
@ -2001,6 +2358,8 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; |
|
|
|
$("#tryrun_start_date_owner").val($("#tryrun_start_date_owner_tmp").val()); |
|
|
|
$("#tryrun_end_date").val($("#tryrun_end_date_tmp").val()); |
|
|
|
$("#tryrun_end_date_owner").val($("#tryrun_end_date_owner_tmp").val()); |
|
|
|
$("#delivery_date").val($("#delivery_date_tmp").val()); |
|
|
|
$("#delivery_date_owner").val($("#delivery_date_owner_tmp").val()); |
|
|
|
$('#update_install_date_form').submit(); |
|
|
|
} |
|
|
|
} else { |
|
|
@ -2012,6 +2371,8 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; |
|
|
|
$("#tryrun_start_date_owner").val($("#tryrun_start_date_owner_tmp").val()); |
|
|
|
$("#tryrun_end_date").val($("#tryrun_end_date_tmp").val()); |
|
|
|
$("#tryrun_end_date_owner").val($("#tryrun_end_date_owner_tmp").val()); |
|
|
|
$("#delivery_date").val($("#delivery_date_tmp").val()); |
|
|
|
$("#delivery_date_owner").val($("#delivery_date_owner_tmp").val()); |
|
|
|
$('#update_install_date_form').submit(); |
|
|
|
} |
|
|
|
} |
|
|
|