|
|
@ -1,5 +1,5 @@ |
|
|
|
<?php |
|
|
|
ini_set('display_errors', 'on'); |
|
|
|
// ini_set('display_errors', 'on'); |
|
|
|
/** |
|
|
|
* (新梯)流程規則: |
|
|
|
* 1. A:營業員確認中 業務建立大日程 (或是系統洗入) |
|
|
@ -44,18 +44,19 @@ $warehouse = getWarehouseStatus($link, $user_department_id, $role_id, 1); |
|
|
|
$marketing = getMarketingStatus($link, $user_department_id, $role_id, 1); |
|
|
|
$marketing2 = getMarketingStatus($link, $user_department_id, $role_id, 2); |
|
|
|
$desin = getDesinStatus($link, $user_department_id, $role_id); |
|
|
|
$desin2 = $user_department_id == '911' ? "" : "disabled"; |
|
|
|
$desin_leader = getDesinLeaderStatus($link, $user_department_id, $role_id); |
|
|
|
$shengguan = getShengguanStatus($link, $user_department_id, $role_id, 1); |
|
|
|
$warehouse2 = getWarehouseStatus($link, $user_department_id, $role_id, 2); |
|
|
|
$shengguan2 = getShengguanStatus($link, $user_department_id, $role_id, 2); |
|
|
|
$pinzheng = getPinzhengStatus($link, $user_department_id, $role_id); |
|
|
|
$pinzheng2 = $user_department_id == '912' ? "" : "disabled"; |
|
|
|
|
|
|
|
// 取得分頁頁碼 |
|
|
|
$user_department_id; |
|
|
|
$tab = getTabNo($user_department_id); |
|
|
|
|
|
|
|
// 工務助理 |
|
|
|
if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193', 'M0170', 'M0188', 'M0117'])) { |
|
|
|
if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193', 'M0170', 'M0188'])) { |
|
|
|
$warehouse2 = ""; |
|
|
|
$tab = 5; |
|
|
|
} |
|
|
@ -79,6 +80,44 @@ $all_users_options = getAllUsersOptions($link); |
|
|
|
// 更新數據 接收 post 命令 |
|
|
|
include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
|
|
|
|
//補丁 避免新梯跑到此頁面 |
|
|
|
if (!empty($row['contract_type'])) { |
|
|
|
if ($row['contract_type'] == 'B') { |
|
|
|
echo "<script type ='text/JavaScript'>"; |
|
|
|
echo "location.href='wipwhole-renovate-rec-invoice-edit.php?function_name=wipwholestatus&id=$id&" . $token_link . "';"; |
|
|
|
echo "</script>"; |
|
|
|
} |
|
|
|
} else { |
|
|
|
echo "此大日程未選擇新梯或是汰改種類,請通知資訊人員處理!"; |
|
|
|
} |
|
|
|
|
|
|
|
$official_check_file_yingye_count = 0; |
|
|
|
$official_check_file_design_count = 0; |
|
|
|
$official_check_file_pinzheng_count = 0; |
|
|
|
|
|
|
|
if (!empty($row['official_check_1_file'])) |
|
|
|
$official_check_file_yingye_count++; |
|
|
|
if (!empty($row['official_check_2_file'])) |
|
|
|
$official_check_file_yingye_count++; |
|
|
|
if (!empty($row['official_check_3_file'])) |
|
|
|
$official_check_file_yingye_count++; |
|
|
|
if (!empty($row['official_check_4_file'])) |
|
|
|
$official_check_file_yingye_count++; |
|
|
|
if (!empty($row['official_check_5_file'])) |
|
|
|
$official_check_file_yingye_count++; |
|
|
|
if (!empty($row['official_check_6_file'])) |
|
|
|
$official_check_file_yingye_count++; |
|
|
|
if (!empty($row['official_check_7_file'])) |
|
|
|
$official_check_file_yingye_count++; |
|
|
|
|
|
|
|
if (!empty($row['official_check_8_file'])) |
|
|
|
$official_check_file_design_count++; |
|
|
|
if (!empty($row['official_check_9_file'])) |
|
|
|
$official_check_file_design_count++; |
|
|
|
|
|
|
|
if (!empty($row['official_check_file'])) |
|
|
|
$official_check_file_pinzheng_count++; |
|
|
|
|
|
|
|
?> |
|
|
|
|
|
|
|
<form method="post" id="form" enctype="multipart/form-data"> |
|
|
@ -502,7 +541,9 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr class="official_check_tr"> |
|
|
|
<td colspan="8" style="vertical-align: middle">官檢資料上傳</td> |
|
|
|
<td colspan="8" style="vertical-align: middle">官檢資料上傳 |
|
|
|
<a href="./pdf/【範本】營業提供官檢資料.pdf" style='color:#00F;' download>範例下載</a> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr class="official_check_tr"> |
|
|
|
<td colspan="8">項目 1 <B-17>建築物昇降設備竣工檢查申請書(正本)X3</td> |
|
|
@ -843,13 +884,12 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
<tr> |
|
|
|
<tr> |
|
|
|
<td style='width:180px;'>追加技術文件</td> |
|
|
|
<td> |
|
|
|
<td colspan='7'> |
|
|
|
<input style="width:70%;display:inline;" type="file" id="desin_documents_verify_file" name="desin_documents_verify_file" <?= $desin; ?>> |
|
|
|
<?php |
|
|
|
echo !empty($row['desin_documents_verify_file']) ? "<a id='desin_documents_verify_file' style='color:#00F;' href='" . $row['desin_documents_verify_file'] . "' target='_blank'>下載附件</a>" : ""; |
|
|
|
?> |
|
|
|
</td> |
|
|
|
<td colspan='6'></td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td colspan="8"> |
|
|
@ -905,7 +945,7 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
</tr> |
|
|
|
<tr class="official_check_tr"> |
|
|
|
<td colspan="2" style="vertical-align: middle;"> |
|
|
|
<input style="width:70%;display:inline;" type="file" id="official_check_8_file" name="official_check_8_file" <?= $marketing; ?>> |
|
|
|
<input style="width:70%;display:inline;" type="file" id="official_check_8_file" name="official_check_8_file" <?= $desin2; ?>> |
|
|
|
<?php |
|
|
|
echo !empty($row['official_check_8_file']) ? "<a id='official_check_8_file_a' style='color:#00F;' href='" . $row['official_check_8_file'] . "' target='_blank'>下載附件</a>" : ""; |
|
|
|
?> |
|
|
@ -925,7 +965,7 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
</tr> |
|
|
|
<tr class="official_check_tr"> |
|
|
|
<td colspan="2" style="vertical-align: middle;"> |
|
|
|
<input style="width:70%;display:inline;" type="file" id="official_check_9_file" name="official_check_9_file" <?= $marketing; ?>> |
|
|
|
<input style="width:70%;display:inline;" type="file" id="official_check_9_file" name="official_check_9_file" <?= $desin2; ?>> |
|
|
|
<?php |
|
|
|
echo !empty($row['official_check_9_file']) ? "<a id='official_check_9_file_a' style='color:#00F;' href='" . $row['official_check_9_file'] . "' target='_blank'>下載附件</a>" : ""; |
|
|
|
?> |
|
|
@ -985,16 +1025,15 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
<td colspan="8"> |
|
|
|
<input class="form-control " type="hidden" name="creater" value="<?= $user_id; ?>" readonly> |
|
|
|
<input class="form-control " type="hidden" name="create_at" value="<?= $row["create_at"]; ?>" readonly> |
|
|
|
<button onclick="savedata()" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;">存檔</button> |
|
|
|
<?php |
|
|
|
if (checkNowFormYDStatus($link) == 'B' && ($user_department_id == 220 || $user_department_id == 911)) { |
|
|
|
?> |
|
|
|
<button onclick="savedata()" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;">存檔</button> |
|
|
|
<button onclick="doDesignLeaderAssign()" type="button" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;">提交至設計主管</button> |
|
|
|
<button onclick="doBackMarketingAssign()" type="button" class="btn btn-danger btn-lg pull-right" style="margin-left:3px;">退回營業</button> |
|
|
|
<?php |
|
|
|
} else if (checkNowFormYDStatus($link) == 'C' && ($user_department_id == 220 || ($user_department_id == 911 && $role_id == 1))) { |
|
|
|
?> |
|
|
|
<button onclick="savedata()" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;">存檔</button> |
|
|
|
<button onclick="doDesignAssign()" type="button" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;">提交至生管</button> |
|
|
|
<button onclick="doBackMarketingAssign()" type="button" class="btn btn-danger btn-lg pull-right" style="margin-left:3px;">退回營業</button> |
|
|
|
<button onclick="doBackDesignAssign()" type="button" class="btn btn-danger btn-lg pull-right" style="margin-left:3px;">退回設計部門</button> |
|
|
@ -1256,7 +1295,7 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
<td style="vertical-align: middle"> |
|
|
|
<div class="input-group"> |
|
|
|
<input type="hidden" name="old_tryrun_end_date" value="<?= $row['tryrun_end_date']; ?>"> |
|
|
|
<input class="form-control" type="date" id="tryrun_end_date" name="tryrun_end_date" value="<?= $row['tryrun_end_date']; ?>" <?= $warehouse2; ?>> |
|
|
|
<input class="form-control disabled_select" type="date" id="tryrun_end_date" name="tryrun_end_date" value="<?= $row['tryrun_end_date']; ?>" <?= $warehouse2; ?>> |
|
|
|
<span class="input-group-btn"> |
|
|
|
<button class="btn btn-default" type='button' onclick='$("#tryrun_end_date").val("");' <?= $warehouse2; ?>>清除</button> |
|
|
|
</span> |
|
|
@ -1643,8 +1682,8 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
<table class="table table-bordered" style="width:100%"> |
|
|
|
<tbody style="font-weight: bolder;margin-bottom: 20px"> |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">QC及官檢類型</td> |
|
|
|
<td> |
|
|
|
<td style="vertical-align: middle;width:160px;">QC及官檢類型</td> |
|
|
|
<td colspan="7"> |
|
|
|
<input type='radio' id="qc_official_type_0" disabled <?php echo $row['association_check_type'] == '0' ? "checked" : ""; ?> /> |
|
|
|
<label for='qc_official_type_0'>未選擇</label> |
|
|
|
<input type='radio' id="qc_official_type_2" disabled <?php echo $row['association_check_type'] == '2' ? "checked" : ""; ?> /> |
|
|
@ -1665,11 +1704,12 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認人</td> |
|
|
|
<td> |
|
|
|
<select class="disabled_select" id="qc_date_owner" name="qc_date_owner" disabled> |
|
|
|
<select class="disabled_select" style="width:180px;" id="qc_date_owner" name="qc_date_owner" disabled> |
|
|
|
<option value="">請選擇</option> |
|
|
|
<?php echo getSelectOptionHtml($all_users_options, $row['qc_date_owner']); ?> |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
<td colspan="4"></td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">QC合格日</td> |
|
|
@ -1688,6 +1728,7 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
<?php echo getSelectOptionHtml($all_users_options, $row['end_qc_date_owner']); ?> |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
<td colspan="4"></td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">官檢日</td> |
|
|
@ -1708,22 +1749,35 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
<?php echo getSelectOptionHtml($all_users_options, $row['official_check_date_owner']); ?> |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
<td colspan="4"></td> |
|
|
|
</tr> |
|
|
|
<tr class="official_check_tr"> |
|
|
|
<td colspan="8" style="vertical-align: middle">官檢資料上傳</td> |
|
|
|
</tr> |
|
|
|
<tr class="official_check_tr"> |
|
|
|
<td colspan="8">試驗報告表X1</td> |
|
|
|
<td colspan="1">試驗報告表X1</td> |
|
|
|
<td colspan="4"> |
|
|
|
營業確認項目 <?php echo $official_check_file_yingye_count; ?>/7 設計確認項目<?php echo $official_check_file_design_count; ?>/2 品證確認項目 <?php echo $official_check_file_pinzheng_count; ?>/1 |
|
|
|
<br /> |
|
|
|
<br /> |
|
|
|
</td> |
|
|
|
<td colspan="2"> |
|
|
|
<input type="radio" id="office_check_file_currect" name="office_check_file_check_status" value="1" <?= $pinzheng2; ?> <?php echo $row['office_check_file_check_status'] == '1' ? "checked" : ""; ?>> |
|
|
|
<label for="office_check_file_currect">正確</label> |
|
|
|
<input type="radio" id="office_check_file_error" name="office_check_file_check_status" value="2" <?= $pinzheng2; ?> <?php echo $row['office_check_file_check_status'] == '2' ? "checked" : ""; ?>> |
|
|
|
<label for="office_check_file_error">不正確</label> |
|
|
|
</td> |
|
|
|
<td> |
|
|
|
<textarea placeholder="意見描述" name="pinzheng_remark"><?php echo $row['pinzheng_remark']; ?></textarea> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr class="official_check_tr"> |
|
|
|
<td colspan="2" style="vertical-align: middle;"> |
|
|
|
<input style="width:70%;display:inline;" type="file" id="official_check_file" name="official_check_file" <?= $marketing; ?>> |
|
|
|
<input style="width:70%;display:inline;" type="file" id="official_check_file" name="official_check_file" <?= $pinzheng2; ?>> |
|
|
|
<?php |
|
|
|
echo !empty($row['official_check_file']) ? "<a id='official_check_file_a' style='color:#00F;' href='" . $row['official_check_file'] . "' target='_blank'>下載附件</a>" : ""; |
|
|
|
?> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認時間</td> |
|
|
|
<td><input class="form-control disabled_select" type="datetime-local" id="official_check_file_date" name="official_check_file_date" value="<?= $row['official_check_file_date']; ?>" readonly></td> |
|
|
|
<td style="vertical-align: middle">確認人</td> |
|
|
|
<td> |
|
|
|
<select name="official_check_file_owner" class="disabled_select" id="official_check_file_owner" disabled> |
|
|
@ -1731,6 +1785,8 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
<?php echo getSelectOptionHtml($all_users_options, $row['official_check_file_owner']); ?> |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認時間</td> |
|
|
|
<td><input class="form-control disabled_select" type="datetime-local" id="official_check_file_date" name="official_check_file_date" value="<?= $row['official_check_file_date']; ?>" readonly></td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td colspan="8"> |
|
|
@ -2175,25 +2231,6 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
<input type="hidden" name='form_name' value="update_date_form" /> |
|
|
|
</form> |
|
|
|
|
|
|
|
<!-- <form method="post" id="update_install_date_form" enctype="multipart/form-data"> |
|
|
|
<input type="hidden" id="change_all_contractno" name='change_all_contractno' value="0" /> |
|
|
|
<input type="hidden" id="contractno2" name='contractno2' value="<?php echo $row['contractno']; ?>" /> |
|
|
|
<input type="hidden" id="install_start_date" name='install_start_date' value="<?php echo $row['install_start_date']; ?>" /> |
|
|
|
<input type="hidden" id="install_start_date_owner" name='install_start_date_owner' value="<?php echo $row['install_start_date_owner']; ?>" /> |
|
|
|
<input type="hidden" id="install_end_date" name='install_end_date' value="<?php echo $row['install_end_date']; ?>" /> |
|
|
|
<input type="hidden" id="install_end_date_owner" name='install_end_date_owner' value="<?php echo $row['install_end_date_owner']; ?>" /> |
|
|
|
<input type="hidden" id="tryrun_start_date" name='tryrun_start_date' value="<?php echo $row['tryrun_start_date']; ?>" /> |
|
|
|
<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"> |
|
|
|
<input class="form-control " type="hidden" name="creater" value="<?= $user_id; ?>"> |
|
|
|
<input type="hidden" id="arrival_date_verify" name='arrival_date_verify' value="<?php echo $row['arrival_date_verify']; ?>" /> |
|
|
@ -2623,42 +2660,6 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// function saveInstallData() { |
|
|
|
// if (confirm('確定要更改實際安裝日程嗎?') == true) { |
|
|
|
// if ($("#change_all_contractno_tmp").prop('checked')) { |
|
|
|
// if ($("#contractno").val() == '' || $("#contractno").val() == null) { |
|
|
|
// alert("合約號空白"); |
|
|
|
// } else { |
|
|
|
// $("#change_all_contractno").val($("#change_all_contractno_tmp").prop('checked')); |
|
|
|
// $("#contractno2").val($("#contractno").val()); |
|
|
|
// $("#install_start_date").val($("#install_start_date_tmp").val()); |
|
|
|
// $("#install_start_date_owner").val($("#install_start_date_owner_tmp").val()); |
|
|
|
// $("#install_end_date").val($("#install_end_date_tmp").val()); |
|
|
|
// $("#install_end_date_owner").val($("#install_end_date_owner_tmp").val()); |
|
|
|
// $("#tryrun_start_date").val($("#tryrun_start_date_tmp").val()); |
|
|
|
// $("#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 { |
|
|
|
// $("#install_start_date").val($("#install_start_date_tmp").val()); |
|
|
|
// $("#install_start_date_owner").val($("#install_start_date_owner_tmp").val()); |
|
|
|
// $("#install_end_date").val($("#install_end_date_tmp").val()); |
|
|
|
// $("#install_end_date_owner").val($("#install_end_date_owner_tmp").val()); |
|
|
|
// $("#tryrun_start_date").val($("#tryrun_start_date_tmp").val()); |
|
|
|
// $("#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(); |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
function setOutSourcerDate() { |
|
|
|
|
|
|
|
// 發包類型 |
|
|
|