Browse Source

新增作番大日程工務部門"經理"權限

gary
gary_chen\gary_chen 1 year ago
parent
commit
db70e5c632
  1. 8
      wms/wipwhole-index-function.php
  2. 28
      wms/wipwhole-rec-invoice-edit.php
  3. 8
      wms/wipwhole-renovate-index-function.php
  4. 2
      wms/wipwhole-renovate-rec-invoice-edit.php
  5. 16
      wms/wipwholeinstall-index-function.php
  6. 19
      wms/wipwholeinstall-renovate-index-function.php

8
wms/wipwhole-index-function.php

@ -1076,11 +1076,11 @@ function getSaveEstimateInstallData($user_department_id, $role_id)
return true;
if ($user_department_id == '542' && in_array($role_id, ['1', '5', '6']))
return true;
if ($user_department_id == '544' && $role_id == '3')
if ($user_department_id == '544' && in_array($role_id, ['3', '6']))
return true;
if ($user_department_id == '543' && $role_id == '2')
return true;
if ($user_department_id == '545' && $role_id == '6')
if ($user_department_id == '545' && in_array($role_id, ['3', '6']))
return true;
return false;
}
@ -1095,9 +1095,9 @@ function saveInstallData($user_department_id, $role_id)
return true;
if ($user_department_id == '543' && $role_id == '2')
return true;
if ($user_department_id == '544' && $role_id == '3')
if ($user_department_id == '544' && in_array($role_id, ['3', '6']))
return true;
if ($user_department_id == '545' && $role_id == '6')
if ($user_department_id == '545' && in_array($role_id, ['3', '6']))
return true;
if ($user_department_id == '220')
return true;

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

@ -52,7 +52,7 @@ $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'])) {
$warehouse2 = "";
$tab = 5;
}
@ -279,7 +279,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 +295,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 +339,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>
@ -360,7 +360,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_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 +373,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 +388,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 +400,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 +415,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 +427,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 +442,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 +454,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 +501,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>

8
wms/wipwhole-renovate-index-function.php

@ -1057,11 +1057,11 @@ function getSaveEstimateInstallData($user_department_id, $role_id)
return true;
if ($user_department_id == '542' && in_array($role_id, ['1', '5', '6']))
return true;
if ($user_department_id == '544' && $role_id == '3')
if ($user_department_id == '544' && in_array($role_id, ['3', '6']))
return true;
if ($user_department_id == '543' && $role_id == '2')
return true;
if ($user_department_id == '545' && $role_id == '6')
if ($user_department_id == '545' && in_array($role_id, ['3', '6']))
return true;
return false;
}
@ -1076,9 +1076,9 @@ function getSaveInstallDataButtonStatus($user_department_id, $role_id)
return true;
if ($user_department_id == '543' && $role_id == '2')
return true;
if ($user_department_id == '544' && $role_id == '3')
if ($user_department_id == '544' && in_array($role_id, ['3', '6']))
return true;
if ($user_department_id == '545' && $role_id == '6')
if ($user_department_id == '545' && in_array($role_id, ['3', '6']))
return true;
if ($user_department_id == '220')
return true;

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

@ -50,7 +50,7 @@ $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'])) {
$warehouse2 = "";
$tab = 5;
}

16
wms/wipwholeinstall-index-function.php

@ -120,6 +120,9 @@ function getEditFlag($department_id, $role_id, $user_id)
// 南區營銷部 工務助理
if ($department_id == '314' && $role_id == '4')
return 4;
// 宜花東營銷部 工務助理
if ($department_id == '315' && $role_id == '2')
return 4;
// 安裝開發支援部 工務助理
if ($department_id == '521' && $role_id == '11')
return 4;
@ -219,6 +222,19 @@ function getDataSql($department_id, $role_id, $user_id)
";
return $sql;
}
// 宜花東營銷部 工務助理
if ($department_id == '314' && $role_id == '4') {
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('台東','宜蘭','花蓮')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
}
// 安裝開發支援部 工務助理
if ($department_id == '521' && $role_id == '11') {
$sql = "

19
wms/wipwholeinstall-renovate-index-function.php

@ -123,6 +123,9 @@ function getEditFlag($department_id, $role_id, $user_id)
// 南區營銷部 工務助理
if ($department_id == '314' && $role_id == '4')
return 4;
// 宜花東營銷部 工務助理
if ($department_id == '315' && $role_id == '2')
return 4;
// 安裝開發支援部 工務助理
if ($department_id == '521' && $role_id == '11')
return 4;
@ -219,6 +222,19 @@ function getDataSql($department_id, $role_id, $user_id)
";
return $sql;
}
// 宜花東營銷部 工務助理
if ($department_id == '315' && $role_id == '2') {
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
}
// 安裝開發支援部 工務助理
if ($department_id == '521' && $role_id == '11') {
$sql = "
@ -881,6 +897,9 @@ function getWarehouseStatus($link, $user_department_id, $role_id)
// 南區營銷部 工務助理
if ($user_department_id == '314' && $role_id == '4')
return "";
// 宜花東營銷部 工務助理
if ($user_department_id == '315' && $role_id == '2')
return "";
// 安裝開發支援部 工務助理
if ($user_department_id == '521' && $role_id == '11')
return "";

Loading…
Cancel
Save