Browse Source

1.修正未上傳檔案卻產生日期戳記bug

2.大日程新增許協理更改業務項目的權限
gary
gary_chen\gary_chen 1 year ago
parent
commit
fb4710f637
  1. 4
      wms/wipwhole-rec-invoice-edit-fileupload.php
  2. 10
      wms/wipwhole-rec-invoice-edit-submit.php
  3. 13
      wms/wipwhole-rec-invoice-edit.php
  4. 12
      wms/wipwhole-renovate-rec-invoice-edit-submit.php
  5. 13
      wms/wipwhole-renovate-rec-invoice-edit.php

4
wms/wipwhole-rec-invoice-edit-fileupload.php

@ -11,10 +11,14 @@ function fileIUpload($post_name)
if (file_exists($sales_spec_verify_file)) if (file_exists($sales_spec_verify_file))
unlink($sales_spec_verify_file); unlink($sales_spec_verify_file);
move_uploaded_file($temp_file_name, $sales_spec_verify_file); move_uploaded_file($temp_file_name, $sales_spec_verify_file);
if (!empty($file_name)) {
return strtolower($target_dir . basename($datetime . $file_name)); return strtolower($target_dir . basename($datetime . $file_name));
} else { } else {
return ""; return "";
} }
} else {
return "";
}
} }
// 營業 // 營業

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

@ -483,13 +483,8 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
"; ";
if (!empty($official_check_file)) if (!empty($official_check_file))
$updatesql .= "official_check_file = '$official_check_file', "; $updatesql .= "official_check_file = '$official_check_file', ";
} else { } else if (in_array($user_id, ['M0175', 'M0079', 'M0060'])) {
echo "暫無權限";
exit();
}
// 暫時可編輯及刪除權限 // 暫時可編輯及刪除權限
if (in_array($user_id, ['M0175', 'M0079'])) {
$updatesql .= " $updatesql .= "
contractno = '$contractno', contractno = '$contractno',
facility_temp_no = '$facility_temp_no', facility_temp_no = '$facility_temp_no',
@ -509,6 +504,9 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
contract_arrival_date = '$contract_arrival_date', contract_arrival_date = '$contract_arrival_date',
facility_kind = '$facility_kind', facility_kind = '$facility_kind',
"; ";
}else{
echo "暫無權限";
exit();
} }
// 工務助理 // 工務助理

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

@ -59,7 +59,7 @@ if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193', 'M0170', 'M0188']))
// 暫時可編輯及刪除權限 // 暫時可編輯及刪除權限
$update_delete_status = "disabled"; $update_delete_status = "disabled";
if (in_array($user_id, ['M0175', 'M0079'])) { if (in_array($user_id, ['M0175', 'M0079', 'M0060'])) {
$update_delete_status = ""; $update_delete_status = "";
} }
@ -260,6 +260,17 @@ include "wipwhole-rec-invoice-edit-submit.php";
</div> </div>
</td> </td>
</tr> </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> </tbody>
</table> </table>
</div> </div>

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

@ -463,14 +463,8 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
"; ";
if (!empty($official_check_file)) if (!empty($official_check_file))
$updatesql .= "official_check_file = '$official_check_file', "; $updatesql .= "official_check_file = '$official_check_file', ";
} else { } else if (in_array($user_id, ['M0175', 'M0079', 'M0060'])) {
echo "暫無權限";
exit();
}
// 暫時可編輯及刪除權限 // 暫時可編輯及刪除權限
if (in_array($user_id, ['M0175', 'M0079'])) {
$updatesql .= " $updatesql .= "
contractno = '$contractno', contractno = '$contractno',
facility_temp_no = '$facility_temp_no', facility_temp_no = '$facility_temp_no',
@ -490,9 +484,11 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
contract_arrival_date = '$contract_arrival_date', contract_arrival_date = '$contract_arrival_date',
facility_kind = '$facility_kind', facility_kind = '$facility_kind',
"; ";
} else {
echo "暫無權限";
exit();
} }
// 工務助理 // 工務助理
$updatesql .= " $updatesql .= "
install_outsourcer = '$install_outsourcer', install_outsourcer = '$install_outsourcer',

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

@ -57,7 +57,7 @@ if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193', 'M0170', 'M0188']))
// 暫時可編輯及刪除權限 // 暫時可編輯及刪除權限
$update_delete_status = "disabled"; $update_delete_status = "disabled";
if (in_array($user_id, ['M0175', 'M0079'])) { if (in_array($user_id, ['M0175', 'M0079', 'M0060'])) {
$update_delete_status = ""; $update_delete_status = "";
} }
@ -249,6 +249,17 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
</div> </div>
</td> </td>
</tr> </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> </tbody>
</table> </table>
</div> </div>

Loading…
Cancel
Save