Browse Source

修正大日程 工務助理項目 bug

gary
gary_chen\gary_chen 1 year ago
parent
commit
7e7723fd58
  1. 5
      wms/wipwhole-change-contractdate.php
  2. 24
      wms/wipwhole-rec-invoice-edit-submit.php
  3. 142
      wms/wipwhole-rec-invoice-edit.php
  4. 21
      wms/wipwhole-renovate-rec-invoice-edit-submit.php
  5. 36
      wms/wipwhole-renovate-rec-invoice-edit.php

5
wms/wipwhole-change-contractdate.php

@ -259,9 +259,10 @@ if (!empty(checkNowFormStatus($link)))
<?php echo substr($row["estimated_shipping_schedule_date"], 0, 10); ?>
<input type='hidden' name='estimated_shipping_schedule_date' value='<?php echo $row['estimated_shipping_schedule_date']; ?>' />
</td>
<th></th>
<th>實際到貨日<br />(到觀音廠日)</th>
<td>
<?php echo substr($row["actual_tofactory_date"], 0, 10); ?>
<input type='hidden' name='actual_tofactory_date' value='<?php echo $row['estimated_shipping_schedule_date']; ?>' />
</td>
</tr>
<tr>

24
wms/wipwhole-rec-invoice-edit-submit.php

@ -286,7 +286,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
}
}
$updatesql = "
UPDATE wipwholestatus
SET
@ -484,7 +484,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (!empty($official_check_file))
$updatesql .= "official_check_file = '$official_check_file', ";
}
// 暫時可編輯及刪除權限
if (in_array($user_id, ['M0175', 'M0079', 'M0060'])) {
$updatesql .= "
@ -509,7 +509,8 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
}
// 工務助理
$updatesql .= "
if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193', 'M0170', 'M0188'])) {
$updatesql .= "
install_outsourcer = '$install_outsourcer',
install_outsourcer_owner = '$install_outsourcer_owner',
install_outsourcer_date = '$install_outsourcer_date',
@ -528,11 +529,13 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
estimate_tryrun_end_date_owner = '$estimate_tryrun_end_date_owner',
warehouse_assistant_remark = '$warehouse_assistant_remark',
";
if (!empty($plan_diagram_file)) {
$updatesql .= "plan_diagram_file = '$plan_diagram_file', ";
$updatesql .= "
if (!empty($plan_diagram_file)) {
$updatesql .= "plan_diagram_file = '$plan_diagram_file', ";
$updatesql .= "
all_remark = CONCAT('" . $user_id . accountidToName($user_id) . "_" . $datetime . "<br/>上傳了安裝圖附件<br/><br/>',IF(all_remark IS NULL,'',all_remark)),
";
}
}
// 許協更新業務確認項目權限
@ -560,6 +563,15 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
";
}
// 生管 小雯 預計到貨日(到觀音廠日)權限
if ($user_id == 'M0168') {
$updatesql .= "
estimated_shipping_schedule_date_verify = '$estimated_shipping_schedule_date_verify',
estimated_shipping_schedule_date = '$estimated_shipping_schedule_date',
estimated_shipping_schedule_date_owner = '$estimated_shipping_schedule_date_owner',
";
}
$updatesql .= "
creater = '$creater',
create_at = '$create_at'

142
wms/wipwhole-rec-invoice-edit.php

@ -203,7 +203,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
</td>
<td style="vertical-align: middle">樓停</td>
<td>
<input class="form-control disabled_select" type="number" name="numberofstop" min="0" value="<?= $row["numberofstop"]; ?>" <?php echo $update_delete_status; ?>>
<input class="form-control disabled_select" type="number" name="numberofstop" id="numberofstop" min="0" value="<?= $row["numberofstop"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">樓層</td>
<td>
@ -374,6 +374,7 @@ 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>" : "";
?>
<br />
<?php
$customer_planning_verify_files = getAllCustomerPlanningVerify($link, $id);
foreach ($customer_planning_verify_files as $row2) :
@ -853,7 +854,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
<tr>
<td>備註</td>
<td colspan="7">
<textarea class="form-control" name="warehouse_remark" <?= $warehouse; ?>><?php echo $row['warehouse_remark']; ?></textarea>
<textarea class="form-control" name="warehouse_remark" <?= $warehouse2; ?>><?php echo $row['warehouse_remark']; ?></textarea>
</td>
</tr>
<tr>
@ -1038,7 +1039,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
<tr>
<td style="vertical-align: middle">預計到貨日<br />(到觀音廠日)</td>
<td>
<select name="estimated_shipping_schedule_date_verify" id="estimated_shipping_schedule_date_verify" <?= $yewu; ?>>
<select name="estimated_shipping_schedule_date_verify" id="estimated_shipping_schedule_date_verify" <?= $user_id == 'M0168' ? "" : $yewu; ?>>
<option <?php if ($row["estimated_shipping_schedule_date_verify"] == "1") echo " selected"; ?> value="1">請選擇</option>
<option <?php if ($row["estimated_shipping_schedule_date_verify"] == "0") echo " selected"; ?> value="0">已完成</option>
<option <?php if ($row["estimated_shipping_schedule_date_verify"] == "1") echo " selected"; ?> value="1">進行中</option>
@ -1047,9 +1048,9 @@ include "wipwhole-rec-invoice-edit-submit.php";
</td>
<td>
<div class="input-group">
<input class="form-control" type="date" id="estimated_shipping_schedule_date" name="estimated_shipping_schedule_date" value="<?= $row['estimated_shipping_schedule_date']; ?>" <?= $yewu; ?>>
<input class="form-control" type="date" id="estimated_shipping_schedule_date" name="estimated_shipping_schedule_date" value="<?= $row['estimated_shipping_schedule_date']; ?>" <?= $user_id == 'M0168' ? "" : $yewu; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimated_shipping_schedule_date").val("");' <?= $yewu; ?>>清除</button>
<button class="btn btn-default" type='button' onclick='$("#estimated_shipping_schedule_date").val("");' <?= $user_id == 'M0168' ? "" : $yewu; ?>>清除</button>
</span>
</div>
</td>
@ -1141,6 +1142,12 @@ 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_id == 'M0168') {
?>
<button onclick="savedata()" type="button" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;">存檔</button>
<?php
}
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>
@ -1330,7 +1337,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
<!-- <tr>
<td style="vertical-align: middle">發包類型</td>
<td>
<input type='radio' name='outsourcer_type' id='outsourcer_type_I' value='I' checked />
<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>
@ -1340,6 +1347,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
if (getSaveEstimateInstallData($user_department_id, $role_id)) {
?>
<button type='button' class='btn btn-default' onclick='setOutSourcerDate();'>帶入日期</button>
<button type='button' class='btn btn-default' onclick='resetAllOutSourcerDate();'>清除日期</button>
<?php
}
?>
@ -1348,7 +1356,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
<tr>
<td style="vertical-align: middle">安裝發包廠商</td>
<td>
<input name="install_outsourcer" id="install_outsourcer" class="form-control disabled_select" type="text" value="<?php echo $row['install_outsourcer']; ?>" <?= $warehouse2; ?> />
<input name="install_outsourcer disabled_select" id="install_outsourcer" class="form-control disabled_select" type="text" value="<?php echo $row['install_outsourcer']; ?>" <?= $warehouse2; ?> />
</td>
<td style="vertical-align: middle;">確認人</td>
<td>
@ -1362,7 +1370,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
<td style="vertical-align: middle">安裝發包日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="install_outsourcer_date" id="install_outsourcer_date" value="<?= $row['install_outsourcer_date']; ?>" <?= $warehouse2; ?>>
<input class="form-control disabled_select" type="date" name="install_outsourcer_date" id="install_outsourcer_date" value="<?= $row['install_outsourcer_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#install_outsourcer_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
@ -1380,7 +1388,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
<td style="vertical-align: middle">預計安裝開工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="estimate_install_start_date" id="estimate_install_start_date" value="<?= $row['estimate_install_start_date']; ?>" <?= $warehouse2; ?>>
<input class="form-control disabled_select" type="date" name="estimate_install_start_date" id="estimate_install_start_date" value="<?= $row['estimate_install_start_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_install_start_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
@ -1398,7 +1406,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
<td style="vertical-align: middle">預計安裝完工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="estimate_install_end_date" id="estimate_install_end_date" value="<?= $row['estimate_install_end_date']; ?>" <?= $warehouse2; ?>>
<input class="form-control disabled_select" type="date" name="estimate_install_end_date" id="estimate_install_end_date" value="<?= $row['estimate_install_end_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_install_end_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
@ -1415,7 +1423,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
<tr>
<td style="vertical-align: middle">試車發包廠商</td>
<td>
<input name="tryrun_outsourcer" id="tryrun_outsourcer" class="form-control disabled_select" type="text" value="<?php echo $row['tryrun_outsourcer']; ?>" <?= $warehouse2; ?> />
<input name="tryrun_outsourcer disabled_select" id="tryrun_outsourcer" class="form-control disabled_select" type="text" value="<?php echo $row['tryrun_outsourcer']; ?>" <?= $warehouse2; ?> />
</td>
<td style="vertical-align: middle;">確認人</td>
<td>
@ -1429,7 +1437,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
<td style="vertical-align: middle">試車發包日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="tryrun_outsourcer_date" id="tryrun_outsourcer_date" value="<?= $row['tryrun_outsourcer_date']; ?>" <?= $warehouse2; ?>>
<input class="form-control disabled_select" type="date" name="tryrun_outsourcer_date" id="tryrun_outsourcer_date" value="<?= $row['tryrun_outsourcer_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#tryrun_outsourcer_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
@ -1447,7 +1455,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
<td style="vertical-align: middle">預計試車開工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="estimate_tryrun_start_date" id="estimate_tryrun_start_date" value="<?= $row['estimate_tryrun_start_date']; ?>" <?= $warehouse2; ?>>
<input class="form-control disabled_select" type="date" name="estimate_tryrun_start_date" id="estimate_tryrun_start_date" value="<?= $row['estimate_tryrun_start_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_tryrun_start_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
@ -1465,7 +1473,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
<td style="vertical-align: middle">預計試車完工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="estimate_tryrun_end_date" id="estimate_tryrun_end_date" value="<?= $row['estimate_tryrun_end_date']; ?>" <?= $warehouse2; ?>>
<input class="form-control disabled_select" type="date" name="estimate_tryrun_end_date" id="estimate_tryrun_end_date" value="<?= $row['estimate_tryrun_end_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_tryrun_end_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
@ -1482,7 +1490,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
<tr>
<td>備註</td>
<td colspan="3">
<textarea class="form-control" name="warehouse_assistant_remark" id="warehouse_assistant_remark" <?= $warehouse2; ?>><?php echo $row['warehouse_assistant_remark']; ?></textarea>
<textarea class="form-control disabled_select" name="warehouse_assistant_remark" id="warehouse_assistant_remark" <?= $warehouse2; ?>><?php echo $row['warehouse_assistant_remark']; ?></textarea>
</td>
</tr>
<tr>
@ -1861,7 +1869,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
if (confirm('確定要更改日期嗎?') == true) {
var estimated_shipping_schedule_date = $("#estimated_shipping_schedule_date").val();
var real_contract_arrival_date = $("#real_contract_arrival_date_tmp").val();
if (real_contract_arrival_date <= estimated_shipping_schedule_date) {
if (real_contract_arrival_date < estimated_shipping_schedule_date) {
alert("日期不可以比預計到貨日(到觀音日)早");
} else {
$("#real_contract_arrival_date").val($("#real_contract_arrival_date_tmp").val());
@ -1901,29 +1909,91 @@ include "wipwhole-rec-invoice-edit-submit.php";
}
}
// function setOutSourcerDate() {
function setOutSourcerDate() {
// 發包類型
let outsourcer_type = $("input[name^='outsourcer_type']:checked").val();
// 預計出貨日(到工地)
let real_contract_arrival_date = $("#real_contract_arrival_date").val();
// 樓停
let numberofstop = $("#numberofstop").val();
// 目前操作者
let user_id = '<?php echo $user_id; ?>';
if (outsourcer_type === 'I') {
resetTOutSourcerDate();
$("#estimate_install_start_date").val(dateAddDays(real_contract_arrival_date, 5));
$("#estimate_install_start_date_owner").val(user_id);
$("#estimate_install_end_date").val(
dateAddDays($("#estimate_install_start_date").val(), specificationDayFormula(numberofstop))
);
$("#estimate_install_end_date_owner").val(user_id);
}
if (outsourcer_type === 'T') {
resetIOutSourcerDate();
$("#estimate_tryrun_start_date").val(dateAddDays(real_contract_arrival_date, 5));
$("#estimate_tryrun_start_date_owner").val(user_id);
$("#estimate_tryrun_end_date").val(
dateAddDays($("#estimate_tryrun_start_date").val(), specificationDayFormula(numberofstop))
);
$("#estimate_tryrun_end_date_owner").val(user_id);
}
if (outsourcer_type === 'IT') {
$("#estimate_install_start_date").val(dateAddDays(real_contract_arrival_date, 5));
$("#estimate_install_start_date_owner").val(user_id);
$("#estimate_install_end_date").val(
dateAddDays($("#estimate_install_start_date").val(), specificationDayFormula(numberofstop))
);
$("#estimate_install_end_date_owner").val(user_id);
$("#estimate_tryrun_start_date").val(dateAddDays($("#estimate_install_end_date").val(), 1));
$("#estimate_tryrun_start_date_owner").val(user_id);
$("#estimate_tryrun_end_date").val(
dateAddDays($("#estimate_tryrun_start_date").val(), specificationDayFormula(numberofstop))
);
$("#estimate_tryrun_end_date_owner").val(user_id);
}
}
function resetIOutSourcerDate() {
$("#estimate_install_start_date").val("");
$("#estimate_install_end_date").val("");
}
function resetTOutSourcerDate() {
$("#estimate_tryrun_start_date").val("");
$("#estimate_tryrun_end_date").val("");
}
// // 發包類型
// 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') {
// // 預計安裝開工日
// let tmp = Date.prototype.addDays = function(days) {
// this.setDate(this.getDate() + days);
// return this;
// }
// alert(tmp);
function resetAllOutSourcerDate() {
resetIOutSourcerDate();
resetTOutSourcerDate();
}
// }
// if (outsourcer_type === 'T') {
function specificationDayFormula(numberofstop) {
if (numberofstop > 0 && numberofstop <= 7)
return 7;
if (numberofstop > 7 && numberofstop < 14)
return numberofstop;
if (numberofstop >= 14)
return 14;
return 0
}
// }
// if (outsourcer_type === 'IT') {
function dateAddDays(dateString, daysToAdd = 0) {
daysToAdd = Number(daysToAdd);
// 將日期字串轉換為日期物件
var initialDate = new Date(dateString);
// 增加指定天數
initialDate.setDate(initialDate.getDate() + daysToAdd);
// }
// }
// 將結果轉換為所需的日期格式(例如:yyyy-mm-dd)
var year = initialDate.getFullYear();
var month = String(initialDate.getMonth() + 1).padStart(2, "0"); // 月份從0開始,需要加1
var day = String(initialDate.getDate()).padStart(2, "0");
var resultDateString = year + "-" + month + "-" + day;
return resultDateString;
}
</script>

21
wms/wipwhole-renovate-rec-invoice-edit-submit.php

@ -464,7 +464,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (!empty($official_check_file))
$updatesql .= "official_check_file = '$official_check_file', ";
}
if (in_array($user_id, ['M0175', 'M0079', 'M0060'])) {
// 暫時可編輯及刪除權限
$updatesql .= "
@ -489,7 +489,8 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
}
// 工務助理
$updatesql .= "
if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193', 'M0170', 'M0188'])) {
$updatesql .= "
install_outsourcer = '$install_outsourcer',
install_outsourcer_owner = '$install_outsourcer_owner',
install_outsourcer_date = '$install_outsourcer_date',
@ -508,11 +509,12 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
estimate_tryrun_end_date_owner = '$estimate_tryrun_end_date_owner',
warehouse_assistant_remark = '$warehouse_assistant_remark',
";
if (!empty($plan_diagram_file)) {
$updatesql .= "plan_diagram_file = '$plan_diagram_file', ";
$updatesql .= "
if (!empty($plan_diagram_file)) {
$updatesql .= "plan_diagram_file = '$plan_diagram_file', ";
$updatesql .= "
all_remark = CONCAT('" . $user_id . accountidToName($user_id) . "_" . $datetime . "<br/>上傳了安裝圖附件<br/><br/>',IF(all_remark IS NULL,'',all_remark)),
";
}
}
// 許協更新業務確認項目權限
@ -540,6 +542,15 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
";
}
// 生管 小雯 預計到貨日(到觀音廠日)權限
if ($user_id == 'M0168') {
$updatesql .= "
estimated_shipping_schedule_date_verify = '$estimated_shipping_schedule_date_verify',
estimated_shipping_schedule_date = '$estimated_shipping_schedule_date',
estimated_shipping_schedule_date_owner = '$estimated_shipping_schedule_date_owner',
";
}
$updatesql .= "
creater = '$creater',
create_at = '$create_at'

36
wms/wipwhole-renovate-rec-invoice-edit.php

@ -424,6 +424,7 @@ include "wipwhole-renovate-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>" : "";
?>
<br />
<?php
$customer_planning_verify_files = getAllCustomerPlanningVerify($link, $id);
foreach ($customer_planning_verify_files as $row2) :
@ -450,7 +451,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
<tr>
<td>備註</td>
<td colspan="7">
<textarea class="form-control " name="warehouse_remark" <?= $warehouse; ?>><?php echo $row['warehouse_remark']; ?></textarea>
<textarea class="form-control " name="warehouse_remark2" <?= $warehouse; ?>><?php echo $row['warehouse_remark']; ?></textarea>
</td>
</tr>
<tr>
@ -1041,7 +1042,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
<tr>
<td style="vertical-align: middle">預計到貨日<br />(到觀音廠日)</td>
<td>
<select name="estimated_shipping_schedule_date_verify" id="estimated_shipping_schedule_date_verify" <?= $yewu; ?>>
<select name="estimated_shipping_schedule_date_verify" id="estimated_shipping_schedule_date_verify" <?= $user_id == 'M0168' ? "" : $yewu; ?>>
<option <?php if ($row["estimated_shipping_schedule_date_verify"] == "1") echo " selected"; ?> value="1">請選擇</option>
<option <?php if ($row["estimated_shipping_schedule_date_verify"] == "0") echo " selected"; ?> value="0">已完成</option>
<option <?php if ($row["estimated_shipping_schedule_date_verify"] == "1") echo " selected"; ?> value="1">進行中</option>
@ -1050,9 +1051,9 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
</td>
<td>
<div class="input-group">
<input class="form-control" type="date" id="estimated_shipping_schedule_date" name="estimated_shipping_schedule_date" value="<?= $row['estimated_shipping_schedule_date']; ?>" <?= $yewu; ?>>
<input class="form-control" type="date" id="estimated_shipping_schedule_date" name="estimated_shipping_schedule_date" value="<?= $row['estimated_shipping_schedule_date']; ?>" <?= $user_id == 'M0168' ? "" : $yewu; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimated_shipping_schedule_date").val("");' <?= $yewu; ?>>清除</button>
<button class="btn btn-default" type='button' onclick='$("#estimated_shipping_schedule_date").val("");' <?= $user_id == 'M0168' ? "" : $yewu; ?>>清除</button>
</span>
</div>
</td>
@ -1144,6 +1145,13 @@ include "wipwhole-renovate-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_id == 'M0168')
{
?>
<button onclick="savedata()" type="button" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;">存檔</button>
<?php
}
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>
@ -1327,7 +1335,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
<tr>
<td style="vertical-align: middle">安裝發包廠商</td>
<td>
<input name="install_outsourcer" id="install_outsourcer" class="form-control disabled_select" type="text" value="<?php echo $row['install_outsourcer']; ?>" <?= $warehouse2; ?> />
<input name="install_outsourcer disabled_select" id="install_outsourcer" class="form-control disabled_select" type="text" value="<?php echo $row['install_outsourcer']; ?>" <?= $warehouse2; ?> />
</td>
<td style="vertical-align: middle;">確認人</td>
<td>
@ -1341,7 +1349,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
<td style="vertical-align: middle">安裝發包日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="install_outsourcer_date" id="install_outsourcer_date" value="<?= $row['install_outsourcer_date']; ?>" <?= $warehouse2; ?>>
<input class="form-control disabled_select" type="date" name="install_outsourcer_date" id="install_outsourcer_date" value="<?= $row['install_outsourcer_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#install_outsourcer_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
@ -1359,7 +1367,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
<td style="vertical-align: middle">預計安裝開工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="estimate_install_start_date" id="estimate_install_start_date" value="<?= $row['estimate_install_start_date']; ?>" <?= $warehouse2; ?>>
<input class="form-control disabled_select" type="date" name="estimate_install_start_date" id="estimate_install_start_date" value="<?= $row['estimate_install_start_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_install_start_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
@ -1377,7 +1385,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
<td style="vertical-align: middle">預計安裝完工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="estimate_install_end_date" id="estimate_install_end_date" value="<?= $row['estimate_install_end_date']; ?>" <?= $warehouse2; ?>>
<input class="form-control disabled_select" type="date" name="estimate_install_end_date" id="estimate_install_end_date" value="<?= $row['estimate_install_end_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_install_end_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
@ -1394,7 +1402,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
<tr>
<td style="vertical-align: middle">試車發包廠商</td>
<td>
<input name="tryrun_outsourcer" id="tryrun_outsourcer" class="form-control disabled_select" type="text" value="<?php echo $row['tryrun_outsourcer']; ?>" <?= $warehouse2; ?> />
<input name="tryrun_outsourcer disabled_select" id="tryrun_outsourcer" class="form-control disabled_select" type="text" value="<?php echo $row['tryrun_outsourcer']; ?>" <?= $warehouse2; ?> />
</td>
<td style="vertical-align: middle;">確認人</td>
<td>
@ -1408,7 +1416,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
<td style="vertical-align: middle">試車發包日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="tryrun_outsourcer_date" id="tryrun_outsourcer_date" value="<?= $row['tryrun_outsourcer_date']; ?>" <?= $warehouse2; ?>>
<input class="form-control disabled_select" type="date" name="tryrun_outsourcer_date" id="tryrun_outsourcer_date" value="<?= $row['tryrun_outsourcer_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#tryrun_outsourcer_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
@ -1426,7 +1434,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
<td style="vertical-align: middle">預計試車開工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="estimate_tryrun_start_date" id="estimate_tryrun_start_date" value="<?= $row['estimate_tryrun_start_date']; ?>" <?= $warehouse2; ?>>
<input class="form-control disabled_select" type="date" name="estimate_tryrun_start_date" id="estimate_tryrun_start_date" value="<?= $row['estimate_tryrun_start_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_tryrun_start_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
@ -1444,7 +1452,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
<td style="vertical-align: middle">預計試車完工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="estimate_tryrun_end_date" id="estimate_tryrun_end_date" value="<?= $row['estimate_tryrun_end_date']; ?>" <?= $warehouse2; ?>>
<input class="form-control disabled_select" type="date" name="estimate_tryrun_end_date" id="estimate_tryrun_end_date" value="<?= $row['estimate_tryrun_end_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_tryrun_end_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
@ -1461,7 +1469,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
<tr>
<td>備註</td>
<td colspan="3">
<textarea class="form-control" name="warehouse_assistant_remark" id="warehouse_assistant_remark" <?= $warehouse2; ?>><?php echo $row['warehouse_assistant_remark']; ?></textarea>
<textarea class="form-control disabled_select" name="warehouse_assistant_remark" id="warehouse_assistant_remark" <?= $warehouse2; ?>><?php echo $row['warehouse_assistant_remark']; ?></textarea>
</td>
</tr>
<tr>
@ -1847,7 +1855,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
if (confirm('確定要更改日期嗎?') == true) {
var estimated_shipping_schedule_date = $("#estimated_shipping_schedule_date").val();
var real_contract_arrival_date = $("#real_contract_arrival_date_tmp").val();
if (real_contract_arrival_date <= estimated_shipping_schedule_date) {
if (real_contract_arrival_date < estimated_shipping_schedule_date) {
alert("日期不可以比預計到貨日(到觀音日)早");
} else {
$("#real_contract_arrival_date").val($("#real_contract_arrival_date_tmp").val());

Loading…
Cancel
Save