|
|
@ -52,17 +52,22 @@ $pinzheng = getPinzhengStatus($link, $user_department_id, $role_id); |
|
|
|
$tab = getTabNo($user_department_id); |
|
|
|
|
|
|
|
// 工務助理 |
|
|
|
if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193'])) { |
|
|
|
if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193', 'M0170', 'M0188'])) { |
|
|
|
$warehouse2 = ""; |
|
|
|
$tab = 5; |
|
|
|
} |
|
|
|
|
|
|
|
// 暫時可編輯及刪除權限 |
|
|
|
$update_delete_status = "disabled"; |
|
|
|
if (in_array($user_id, ['M0175', 'M0079'])) { |
|
|
|
if (in_array($user_id, ['M0175', 'M0079', 'M0060'])) { |
|
|
|
$update_delete_status = ""; |
|
|
|
} |
|
|
|
|
|
|
|
// 許協業務項編輯權限 |
|
|
|
if (in_array($user_id, ['M0060'])) { |
|
|
|
$yewu = ""; |
|
|
|
} |
|
|
|
|
|
|
|
// select => options 開門方式 |
|
|
|
$opendoor_options = getOpendoorOptions($link); |
|
|
|
// select => options 確認人 |
|
|
@ -260,6 +265,17 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<?php |
|
|
|
if (in_array($user_id, ['M0175', 'M0079', 'M0060'])) { |
|
|
|
?> |
|
|
|
<tr> |
|
|
|
<td colspan="8"> |
|
|
|
<button onclick="savedata()" type="button" class="btn btn-primary pull-right" style="margin-left:3px;" <?php echo $update_delete_status; ?>>存檔</button> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<?php |
|
|
|
} |
|
|
|
?> |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
</div> |
|
|
@ -279,7 +295,7 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle;width:auto;">營業/契約確認規格</td> |
|
|
|
<td style="width:150px;"> |
|
|
|
<select name="sales_spec_verify" id="sales_spec_verify" <?= $marketing; ?>> |
|
|
|
<select class="disabled_select" name="sales_spec_verify" id="sales_spec_verify" <?= $marketing; ?>> |
|
|
|
<option <?php if ($row["sales_spec_verify"] == "1") echo " selected"; ?> value="1">請選擇</option> |
|
|
|
<option <?php if ($row["sales_spec_verify"] == "0") echo " selected"; ?> value="0">已完成</option> |
|
|
|
<option <?php if ($row["sales_spec_verify"] == "1") echo " selected"; ?> value="1">進行中</option> |
|
|
@ -295,7 +311,7 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認時間</td> |
|
|
|
<td> |
|
|
|
<input class="form-control " type="datetime-local" id="sales_spec_verify_at" name="sales_spec_verify_at" value="<?= $row['sales_spec_verify_at']; ?>" readonly> |
|
|
|
<input class="form-control disabled_select" type="datetime-local" id="sales_spec_verify_at" name="sales_spec_verify_at" value="<?= $row['sales_spec_verify_at']; ?>" readonly> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認人</td> |
|
|
|
<td> |
|
|
@ -339,7 +355,7 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
?> |
|
|
|
</td> |
|
|
|
<td> |
|
|
|
<select name="customer_planning_verify" id="customer_planning_verify" <?= $marketing; ?>> |
|
|
|
<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> |
|
|
@ -348,7 +364,7 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
</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 |
|
|
|
<!-- <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 { |
|
|
@ -357,10 +373,17 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
?>> |
|
|
|
<?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>" : ""; |
|
|
|
?> --> |
|
|
|
<?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['create_at'] . "</a><br/>"; |
|
|
|
endforeach; |
|
|
|
?> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認時間</td> |
|
|
|
<td><input class="form-control " type="datetime-local" id="customer_planning_verify_at" name="customer_planning_verify_at" value="<?= $row['customer_planning_verify_at']; ?>" readonly></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> |
|
|
@ -373,7 +396,7 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">客戶顏色</td> |
|
|
|
<td> |
|
|
|
<select name="customer_color_verify" id="customer_color_verify" <?= $marketing; ?>> |
|
|
|
<select class="disabled_select" name="customer_color_verify" id="customer_color_verify" <?= $marketing; ?>> |
|
|
|
<option <?php if ($row["customer_color_verify"] == "1") echo " selected"; ?> value="1">請選擇</option> |
|
|
|
<option <?php if ($row["customer_color_verify"] == "0") echo " selected"; ?> value="0">已完成</option> |
|
|
|
<option <?php if ($row["customer_color_verify"] == "1") echo " selected"; ?> value="1">進行中</option> |
|
|
@ -388,7 +411,7 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
?> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認時間</td> |
|
|
|
<td><input class="form-control " type="datetime-local" id="customer_color_verify_at" name="customer_color_verify_at" value="<?= $row['customer_color_verify_at']; ?>" readonly></td> |
|
|
|
<td><input class="form-control disabled_select" type="datetime-local" id="customer_color_verify_at" name="customer_color_verify_at" value="<?= $row['customer_color_verify_at']; ?>" readonly></td> |
|
|
|
<td style="vertical-align: middle">確認人</td> |
|
|
|
<td> |
|
|
|
<select name="customer_color_verify_owner" class="disabled_select" id="customer_color_verify_owner" disabled> |
|
|
@ -400,7 +423,7 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">客戶樣式</td> |
|
|
|
<td> |
|
|
|
<select name="customer_style_verify" id="customer_style_verify" <?= $marketing; ?>> |
|
|
|
<select class="disabled_select" name="customer_style_verify" id="customer_style_verify" <?= $marketing; ?>> |
|
|
|
<option <?php if ($row["customer_style_verify"] == "1") echo " selected"; ?> value="1">請選擇</option> |
|
|
|
<option <?php if ($row["customer_style_verify"] == "0") echo " selected"; ?> value="0">已完成</option> |
|
|
|
<option <?php if ($row["customer_style_verify"] == "1") echo " selected"; ?> value="1">進行中</option> |
|
|
@ -415,7 +438,7 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
?> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認時間</td> |
|
|
|
<td><input class="form-control " type="datetime-local" id="customer_style_verify_at" name="customer_style_verify_at" value="<?= $row['customer_style_verify_at']; ?>" readonly></td> |
|
|
|
<td><input class="form-control disabled_select" type="datetime-local" id="customer_style_verify_at" name="customer_style_verify_at" value="<?= $row['customer_style_verify_at']; ?>" readonly></td> |
|
|
|
<td style="vertical-align: middle">確認人</td> |
|
|
|
<td> |
|
|
|
<select name="customer_style_verify_owner" class="disabled_select" id="customer_style_verify_owner" disabled> |
|
|
@ -427,7 +450,7 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">工勘聯絡表</td> |
|
|
|
<td> |
|
|
|
<select name="site_survey_contact_form_verify" id="site_survey_contact_form_verify" <?= $marketing; ?>> |
|
|
|
<select class="disabled_select" name="site_survey_contact_form_verify" id="site_survey_contact_form_verify" <?= $marketing; ?>> |
|
|
|
<option <?php if ($row["site_survey_contact_form_verify"] == "1") echo " selected"; ?> value="1">請選擇</option> |
|
|
|
<option <?php if ($row["site_survey_contact_form_verify"] == "0") echo " selected"; ?> value="0">已完成</option> |
|
|
|
<option <?php if ($row["site_survey_contact_form_verify"] == "1") echo " selected"; ?> value="1">進行中</option> |
|
|
@ -442,7 +465,7 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
?> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle">確認時間</td> |
|
|
|
<td style="vertical-align: middle"><input class="form-control " type="datetime-local" id="site_survey_contact_form_verify_at" name="site_survey_contact_form_verify_at" value="<?= $row['site_survey_contact_form_verify_at']; ?>" readonly></td> |
|
|
|
<td style="vertical-align: middle"><input class="form-control disabled_select" type="datetime-local" id="site_survey_contact_form_verify_at" name="site_survey_contact_form_verify_at" value="<?= $row['site_survey_contact_form_verify_at']; ?>" readonly></td> |
|
|
|
<td style="vertical-align: middle">確認人</td> |
|
|
|
<td> |
|
|
|
<select name="site_survey_contact_form_verify_owner" class="disabled_select" id="site_survey_contact_form_verify_owner" disabled> |
|
|
@ -454,14 +477,14 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
<tr> |
|
|
|
<td>備註</td> |
|
|
|
<td colspan="7"> |
|
|
|
<textarea class="form-control " name="marketing_remark" <?= $marketing; ?>><?php echo $row['marketing_remark']; ?></textarea> |
|
|
|
<textarea class="form-control disabled_select" name="marketing_remark" <?= $marketing; ?>><?php echo $row['marketing_remark']; ?></textarea> |
|
|
|
</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="delivery_date" name="delivery_date" value="<?= $row['delivery_date']; ?>" <?= $marketing; ?>> |
|
|
|
<input class="form-control disabled_select" type="date" id="delivery_date" name="delivery_date" value="<?= $row['delivery_date']; ?>" <?= $marketing; ?>> |
|
|
|
<span class="input-group-btn"> |
|
|
|
<button class="btn btn-default" type='button' onclick='$("#delivery_date").val("");' <?= $marketing; ?>>清除</button> |
|
|
|
</span> |
|
|
@ -501,7 +524,7 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">設計規格</td> |
|
|
|
<td> |
|
|
|
<select name="desin_spec_verify" id="desin_spec_verify" <?= $desin; ?>> |
|
|
|
<select class="disabled_select" name="desin_spec_verify" id="desin_spec_verify" <?= $desin; ?>> |
|
|
|
<option <?php if ($row["desin_spec_verify"] == "1") echo " selected"; ?> value="1">請選擇</option> |
|
|
|
<option <?php if ($row["desin_spec_verify"] == "0") echo " selected"; ?> value="0">已完成</option> |
|
|
|
<option <?php if ($row["desin_spec_verify"] == "1") echo " selected"; ?> value="1">進行中</option> |
|
|
@ -537,7 +560,11 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
<td style="vertical-align: middle;">附件</td> |
|
|
|
<td style="vertical-align: middle;"> |
|
|
|
<?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>" : ""; |
|
|
|
// 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>" : ""; |
|
|
|
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['create_at'] . "</a><br/>"; |
|
|
|
endforeach; |
|
|
|
?> |
|
|
|
</td> |
|
|
|
<td style="vertical-align: middle"> 確認時間</td> |
|
|
@ -1114,7 +1141,7 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
<button class="btn btn-primary btn-lg pull-right" type="button" style="margin-left:3px;" disabled>日程已結案</button> |
|
|
|
<?php |
|
|
|
} else { |
|
|
|
if (($user_department_id == 220 || ($user_department_id == 321 && $role_id !== '5'))) { |
|
|
|
if (($user_department_id == 220 || ($user_department_id == 321 && $role_id !== '5') || $user_id == 'M0060')) { |
|
|
|
?> |
|
|
|
<button onclick="savedata()" type="button" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;">存檔</button> |
|
|
|
<?php |
|
|
@ -1202,7 +1229,7 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">實際出貨日(到工地)</td> |
|
|
|
<td> |
|
|
|
<input class="form-control" type="date" id="real_arrival_date_tmp" value="<?= SUBSTR($row['real_arrival_date'],0,10); ?>" <?php echo $shengguan; ?>> |
|
|
|
<input class="form-control" type="date" id="real_arrival_date_tmp" value="<?= SUBSTR($row['real_arrival_date'], 0, 10); ?>" <?php echo $shengguan; ?>> |
|
|
|
</td> |
|
|
|
<td colspan="4"> |
|
|
|
<button onclick="updateRealArrivalDate()" type="button" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;" <?php echo $shengguan2; ?>>出貨日調整</button> |
|
|
@ -1300,6 +1327,24 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
(工務助理項目) |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<!-- <tr> |
|
|
|
<td style="vertical-align: middle">發包類型</td> |
|
|
|
<td> |
|
|
|
<input type='radio' name='outsourcer_type' id='outsourcer_type_I' value='I' /> |
|
|
|
<label for='outsourcer_type_I'>安裝</label> |
|
|
|
<input type='radio' name='outsourcer_type' id='outsourcer_type_T' value='T' /> |
|
|
|
<label for='outsourcer_type_T'>試車</label> |
|
|
|
<input type='radio' name='outsourcer_type' id='outsourcer_type_IT' value='IT' /> |
|
|
|
<label for='outsourcer_type_IT'>安裝+試車</label> |
|
|
|
<?php |
|
|
|
if (getSaveEstimateInstallData($user_department_id, $role_id)) { |
|
|
|
?> |
|
|
|
<button type='button' class='btn btn-default' onclick='setOutSourcerDate();'>帶入日期</button> |
|
|
|
<?php |
|
|
|
} |
|
|
|
?> |
|
|
|
</td> |
|
|
|
</tr> --> |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: middle">安裝發包廠商</td> |
|
|
|
<td> |
|
|
@ -1855,4 +1900,29 @@ include "wipwhole-rec-invoice-edit-submit.php"; |
|
|
|
$('#update_install_date_form').submit(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// function setOutSourcerDate() { |
|
|
|
|
|
|
|
// // 發包類型 |
|
|
|
// let outsourcer_type = $("input[name^='outsourcer_type']").val(); |
|
|
|
// // 預計出貨日(到工地) |
|
|
|
// let real_contract_arrival_date = $("#real_contract_arrival_date").val(); |
|
|
|
// // 樓停 |
|
|
|
// let numberofstop = $("#numberofstop").val(); |
|
|
|
|
|
|
|
// if (outsourcer_type === 'I') { |
|
|
|
// // 預計安裝開工日 |
|
|
|
// Date.prototype.addDays = function(days) { |
|
|
|
// this.setDate(this.getDate() + days); |
|
|
|
// return this; |
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
// if (outsourcer_type === 'T') { |
|
|
|
|
|
|
|
// } |
|
|
|
// if (outsourcer_type === 'IT') { |
|
|
|
|
|
|
|
// } |
|
|
|
// } |
|
|
|
</script> |