Browse Source

補 select2 缺的 js檔

gary
gary_chen\gary_chen 1 year ago
parent
commit
082a80bb01
  1. 2
      wms/css/select2.min.js
  2. 28
      wms/wipwhole-index-function.php
  3. 38
      wms/wipwhole-renovate-index-function.php
  4. 24
      wms/wipwhole-renovate-rec-invoice-edit.php

2
wms/css/select2.min.js

File diff suppressed because one or more lines are too long

28
wms/wipwhole-index-function.php

@ -1016,19 +1016,23 @@ function getSelectOptionHtml($options, $selected_val)
function getSaveEstimateInstallData($user_department_id, $role_id)
{
if (in_array($user_department_id, ['50', '501', '315']) && $role_id == '2')
if (in_array($user_department_id, ['50', '501']) && $role_id == '2')
return true;
if ($user_department_id == '311' && $role_id == '4')
return true;
if ($user_department_id == '312' && $role_id == '3')
return true;
if ($user_department_id == '313' && $role_id == '3')
return true;
if (in_array($user_department_id, ['311', '314']) && $role_id == '4')
if ($user_department_id == '314' && $role_id == '4')
return true;
if ($user_department_id == '521' && $role_id == '11')
if ($user_department_id == '315' && in_array($role_id, ['1', '2']))
return true;
if (in_array($user_department_id, [220, 531]))
return true;
if ($user_department_id == '521' && in_array($role_id, ['9', '12']))
if ($user_department_id == '521' && in_array($role_id, ['11', '9', '12']))
return true;
if ($user_department_id == '542' && in_array($role_id, ['5', '6']))
if ($user_department_id == '542' && in_array($role_id, ['1', '5', '6']))
return true;
if ($user_department_id == '544' && $role_id == '3')
return true;
@ -1036,26 +1040,20 @@ function getSaveEstimateInstallData($user_department_id, $role_id)
return true;
if ($user_department_id == '545' && $role_id == '6')
return true;
if ($user_department_id == '312' && $role_id == '3')
return true;
if ($user_department_id == '541' && $role_id == '1')
return true;
return false;
}
function saveInstallData($user_department_id, $role_id)
{
if ($user_department_id == '521' && $role_id == '9')
return true;
if ($user_department_id == '541' && $role_id == '1')
if ($user_department_id == '315' && $role_id == '1')
return true;
if ($user_department_id == '542' && in_array($role_id, ['5', '6']))
if ($user_department_id == '521' && $role_id == '9')
return true;
if ($user_department_id == '544' && $role_id == '3')
if ($user_department_id == '542' && in_array($role_id, ['1', '5', '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 == '544' && $role_id == '3')
return true;
if ($user_department_id == '545' && $role_id == '6')
return true;

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

@ -999,13 +999,26 @@ function getWipwholeChangeButtonStatus($user_department_id)
return false;
}
function getSaveInstallDataButtonStatus($user_department_id, $role_id)
function getSaveEstimateInstallData($user_department_id, $role_id)
{
if ($user_department_id == '541' && $role_id == '1')
if (in_array($user_department_id, ['50', '501']) && $role_id == '2')
return true;
if ($user_department_id == '521' && $role_id == '9')
if ($user_department_id == '311' && $role_id == '4')
return true;
if ($user_department_id == '312' && $role_id == '3')
return true;
if ($user_department_id == '313' && $role_id == '3')
return true;
if ($user_department_id == '314' && $role_id == '4')
return true;
if ($user_department_id == '542' && in_array($role_id, ['5', '6']))
if ($user_department_id == '315' && in_array($role_id, ['1', '2']))
return true;
if (in_array($user_department_id, [220, 531]))
return true;
if ($user_department_id == '521' && in_array($role_id, ['11', '9', '12']))
return true;
if ($user_department_id == '542' && in_array($role_id, ['1', '5', '6']))
return true;
if ($user_department_id == '544' && $role_id == '3')
return true;
@ -1013,6 +1026,23 @@ function getSaveInstallDataButtonStatus($user_department_id, $role_id)
return true;
if ($user_department_id == '545' && $role_id == '6')
return true;
return false;
}
function getSaveInstallDataButtonStatus($user_department_id, $role_id)
{
if ($user_department_id == '315' && $role_id == '1')
return true;
if ($user_department_id == '521' && $role_id == '9')
return true;
if ($user_department_id == '542' && in_array($role_id, ['1', '5', '6']))
return true;
if ($user_department_id == '543' && $role_id == '2')
return true;
if ($user_department_id == '544' && $role_id == '3')
return true;
if ($user_department_id == '545' && $role_id == '6')
return true;
if ($user_department_id == '220')
return true;
return false;

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

@ -586,29 +586,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
<tr>
<td colspan="4">
<?php
if (in_array($user_department_id, ['50', '501', '315']) && $role_id == '2')
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
if ($user_department_id == '312' && $role_id == '3')
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
if ($user_department_id == '313' && $role_id == '3')
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
if (in_array($user_department_id, ['311', '314']) && $role_id == '4')
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
if ($user_department_id == '521' && $role_id == '11')
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
if (in_array($user_department_id, [220, 531]))
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
if ($user_department_id == '521' && in_array($role_id, ['9', '12']))
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
if ($user_department_id == '542' && in_array($role_id, ['5', '6']))
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
if ($user_department_id == '544' && $role_id == '3')
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
if ($user_department_id == '543' && $role_id == '2')
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
if ($user_department_id == '545' && $role_id == '6')
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
if ($user_department_id == '541' && $role_id == '1')
if (getSaveEstimateInstallData($user_department_id, $role_id))
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
?>
</td>

Loading…
Cancel
Save