@ -1,5 +1,5 @@
<?php
ini_set('display_errors', 'on');
// ini_set('display_errors', 'on');
/**
* (新梯)流程規則:
* 1. A:營業員確認中 生管建立大日程 (或是系統洗入)
@ -53,7 +53,7 @@ $pinzheng = getPinzhengStatus($link, $user_department_id, $role_id);
$tab = getTabNo($user_department_id);
// 工務助理
if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193', 'M0170', 'M0188'])) {
if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193', 'M0170', 'M0188', 'M0117' ])) {
$warehouse2 = "";
$tab = 5;
}
@ -1252,6 +1252,17 @@ include "wipwhole-rec-invoice-edit-submit.php";
< div id = "tabs-5" >
< table class = "table table-bordered" style = "width:100%" >
< tbody style = "font-weight: bolder;margin-bottom: 20px" >
< tr >
< td style = "vertical-align: middle" > QC及官檢類型< / td >
< td >
< input type = 'radio' disabled <?php echo $row [ 'qc_official_type' ] == 'Q' ? "checked" : "" ; ?> />
< label for = 'outsourcer_type_I' > 只需QC< / label >
< input type = 'radio' disabled <?php echo $row [ 'qc_official_type' ] == 'O' ? "checked" : "" ; ?> />
< label for = 'outsourcer_type_T' > 只需官檢< / label >
< input type = 'radio' disabled <?php echo $row [ 'qc_official_type' ] == 'QO' ? "checked" : "" ; ?> />
< label for = 'outsourcer_type_IT' > QC+官檢< / label >
< / td >
< / tr >
< tr >
< td style = "vertical-align: middle" > 內部QC日< / td >
< td style = "vertical-align: middle" >
@ -1360,6 +1371,23 @@ include "wipwhole-rec-invoice-edit-submit.php";
?>
< / td >
< / tr >
< tr >
< td style = "vertical-align: middle;" > 合約上傳< / td >
< td id = "ocfi_td" style = "vertical-align: middle;" >
< button type = "button" onclick = "addOutsourcerContractFileItem()" class = "btn btn-primary btn-lg pull-right" style = "margin-left:3px;" > +< / button >
< input style = "width:70%;display:inline;" type = "file" id = "outsourcer_contract_file_0" name = "outsourcer_contract_file[]" multiple >
< button type = "button" class = "btn btn-danger" id = "outsourcer_contract_file_del_0" onclick = "delOutsourcerContractFileItem(0)" > x< / button >
<?php
if (!empty($row['outsourcer_contract_file'])) {
$outsourcer_contract_file_tmp = json_decode($row['outsourcer_contract_file']);
foreach ($outsourcer_contract_file_tmp as $val) {
echo "< br / > < a style = 'color:#00F;' target = '_blank' href = '" . $val . "' > " . str_replace("public-wipwhole/", "", $val) . "< / a > ";
}
echo "< / br > ";
}
?>
< / td >
< / tr >
< tr >
< td style = "vertical-align: middle" > 安裝發包廠商< / td >
< td >
@ -1509,6 +1537,15 @@ include "wipwhole-rec-invoice-edit-submit.php";
?>
< / td >
< / tr >
< tr >
< td style = "vertical-align: middle;" > 完工驗收單附件< / td >
< td colspan = "5" style = "vertical-align: middle;" >
< input style = "width:70%;display:inline;" type = "file" name = "completion_acceptance_file" <? = $warehouse2 ; ?> >
<?php
echo !empty($row['completion_acceptance_file']) ? "< a id = 'plan_diagram_file_a' style = 'color:#00F;' href = '" . $row[' completion_acceptance_file ' ] . " ' target = '_blank' > 下載附件< / a > " : "";
?>
< / td >
< / tr >
< tr >
< td colspan = "4" >
<?php
@ -2057,4 +2094,18 @@ include "wipwhole-rec-invoice-edit-submit.php";
return resultDateString;
}
var ocfi_id = 0;
function addOutsourcerContractFileItem() {
ocfi_id++;
let html = "< input style = 'width:70%;display:inline;' type = 'file' id = 'outsourcer_contract_file_" + ocfi_id + "' name = 'outsourcer_contract_file[]' multiple > ";
html += "< button type = 'button' class = 'btn btn-danger' id = 'outsourcer_contract_file_del_" + ocfi_id + "' onclick = 'delOutsourcerContractFileItem(" + ocfi_id + ")' > x< / button > ";
$("#ocfi_td").append(html);
}
function delOutsourcerContractFileItem(id) {
$("#outsourcer_contract_file_del_" + id).remove();
$("#outsourcer_contract_file_" + id).remove();
}
< / script >