@ -15,7 +15,7 @@ if (!empty($form_key)) {
// 目前簽核進度:$st
// 目前簽核進度:$st
$db_query = "select sign1, sign2, sign3, sign4 from pricereview_sign where mid = '$id'";
$db_query = "select sign1, sign2, sign3, sign4 from pricereview_sign where mid = '$id'";
$res_s = mysqli_query($link ,$db_query);
$res_s = mysqli_query($link, $db_query);
if ($row_s = mysqli_fetch_row($res_s)) {
if ($row_s = mysqli_fetch_row($res_s)) {
list($sign1, $sign2, $sign3, $sign4) = $row_s;
list($sign1, $sign2, $sign3, $sign4) = $row_s;
$ss_arr = sign_status([$sign1, $sign2, $sign3, $sign4]);
$ss_arr = sign_status([$sign1, $sign2, $sign3, $sign4]);
@ -50,7 +50,7 @@ if ($res = mysqli_query($link, $db_query)) {
$res = mysqli_query($link, $db_query);
$res = mysqli_query($link, $db_query);
foreach ($res as $data) {
foreach ($res as $data) {
// 上層主管
// 上層主管
$sql = "select manager from account where accountid = '".$data["person"]."'";
$sql = "select manager from account where accountid = '" . $data["person"] . "'";
$res_a = mysqli_query($link, $sql);
$res_a = mysqli_query($link, $sql);
$row_a = mysqli_fetch_row($res_a);
$row_a = mysqli_fetch_row($res_a);
$manager = $row_a[0];
$manager = $row_a[0];
@ -70,7 +70,7 @@ foreach ($res as $data) {
if ($st == 2 & & (preg_match("/Y/", $row_s["sign2"]) || preg_match("/N/", $row_s["sign2"]))) {
if ($st == 2 & & (preg_match("/Y/", $row_s["sign2"]) || preg_match("/N/", $row_s["sign2"]))) {
echo "< script > " ;
echo "< script > " ;
echo "alert('請勿重覆審核!');";
echo "alert('請勿重覆審核!');";
echo "location.href='pricereview_renovate-index.php?function_name=pricereview_renovate&".$token_link."'; ";
echo "location.href='pricereview_renovate-index.php?function_name=pricereview_renovate& " . $token_link . "'; ";
echo "< / script > ";
echo "< / script > ";
exit;
exit;
}
}
@ -192,7 +192,7 @@ foreach ($res as $data) {
$item_arr[$row['item_no']]['note'] = $row['note'];
$item_arr[$row['item_no']]['note'] = $row['note'];
$item_arr[$row['item_no']]['mi_fix'] = $row['mi_fix'];
$item_arr[$row['item_no']]['mi_fix'] = $row['mi_fix'];
$data["qty_total"] += $row["item_qty"];
$data["qty_total"] += $row["item_qty"];
$sql_spec = "select sub_item_id from specsurvey_main where mid = '$mid' and pr_item_id = '".$row['item_no']."' order by sub_item_id";
$sql_spec = "select sub_item_id from specsurvey_main where mid = '$mid' and pr_item_id = '" . $row['item_no'] . "' order by sub_item_id";
$res_spec = mysqli_query($link, $sql_spec);
$res_spec = mysqli_query($link, $sql_spec);
while ($row_spec = mysqli_fetch_row($res_spec)) {
while ($row_spec = mysqli_fetch_row($res_spec)) {
$item_arr[$row['item_no']]['sub_item_id'][] = $row_spec[0];
$item_arr[$row['item_no']]['sub_item_id'][] = $row_spec[0];
@ -229,7 +229,7 @@ foreach ($res as $data) {
}
}
mysqli_free_result($res_i);
mysqli_free_result($res_i);
$data["price_total_broken"] = $data["price_total"] - $data["price_lowest"];
$data["price_total_broken"] = $data["price_total"] - $data["price_lowest"];
$data["price_broken"] = ($data["qty_total"]) ? round($data["price_total_broken"]/$data["qty_total"], 1) : 0;
$data["price_broken"] = ($data["qty_total"]) ? round($data["price_total_broken"] / $data["qty_total"], 1) : 0;
// 付款辦法
// 付款辦法
$pay_all_scale = $pay_all_amount = 0;
$pay_all_scale = $pay_all_amount = 0;
@ -244,31 +244,31 @@ foreach ($res as $data) {
$pay_all_amount += $row_p["pay_amount"];
$pay_all_amount += $row_p["pay_amount"];
}
}
mysqli_free_result($res_p);
mysqli_free_result($res_p);
?>
?>
< script src = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" > < / script >
< script src = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" > < / script >
< script >
< script >
function commafy(num) {
function commafy(num) {
num = num + "";
num = num + "";
var re = /(-?\d+)(\d{3})/
var re = /(-?\d+)(\d{3})/
while (re.test(num)) {
while (re.test(num)) {
num = num.replace(re, "$1,$2")
num = num.replace(re, "$1,$2")
}
}
return num;
return num;
}
}
function getMI(id) {
function getMI(id) {
var formdata = new FormData();
var formdata = new FormData();
formdata.append('pa', id+',R');
formdata.append('pa', id + ',R');
var xhr = new XMLHttpRequest();
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function(){
xhr.onreadystatechange = function() {
if(this.readyState == 4 & & this.status == 200){
if (this.readyState == 4 & & this.status == 200) {
data = JSON.parse(this.responseText);
data = JSON.parse(this.responseText);
//console.log(data);return false;
//console.log(data);return false;
if (data.st == 'err') {
if (data.st == 'err') {
//alert(data.err);
//alert(data.err);
return false;
return false;
}
}
Object.keys(data.content).forEach(function(k){
Object.keys(data.content).forEach(function(k) {
//console.log(data.content[k][0]);
//console.log(data.content[k][0]);
// 有值表示先前已寫入MI
// 有值表示先前已寫入MI
if ($("#tb1").find("input[name=mi_fix]").eq(k).val() == "") {
if ($("#tb1").find("input[name=mi_fix]").eq(k).val() == "") {
@ -277,40 +277,40 @@ function getMI(id) {
$("#tb1").find("input[name=mi_fix]").eq(k).keyup();
$("#tb1").find("input[name=mi_fix]").eq(k).keyup();
var mihtml = "";
var mihtml = "";
mihtml += "< h5 > 電梯設備< / h5 > ";
mihtml += "< h5 > 電梯設備< / h5 > ";
mihtml += "< li > 設備"+data.content[k][8]+":"+commafy(data.content[k][1])+"< / li > ";
mihtml += "< li > 設備" + data.content[k][8] + ":" + commafy(data.content[k][1]) + "< / li > ";
mihtml += "< li > 報關+運輸費:"+commafy(data.content[k][2])+"< / li > ";
mihtml += "< li > 報關+運輸費:" + commafy(data.content[k][2]) + "< / li > ";
mihtml += "< li > 工廠卸貨:"+commafy(data.content[k][3])+"< / li > ";
mihtml += "< li > 工廠卸貨:" + commafy(data.content[k][3]) + "< / li > ";
mihtml += "< li > 運輸至工地:"+commafy(data.content[k][4])+"< / li > ";
mihtml += "< li > 運輸至工地:" + commafy(data.content[k][4]) + "< / li > ";
mihtml += "< li > 安裝成本:"+commafy(data.content[k][5])+"< / li > ";
mihtml += "< li > 安裝成本:" + commafy(data.content[k][5]) + "< / li > ";
mihtml += "< li > 一年免保:"+commafy(data.content[k][6])+"< / li > ";
mihtml += "< li > 一年免保:" + commafy(data.content[k][6]) + "< / li > ";
mihtml += "< li > 起吊+木箱+耗材:"+commafy(data.content[k][7])+"< / li > ";
mihtml += "< li > 起吊+木箱+耗材:" + commafy(data.content[k][7]) + "< / li > ";
//mihtml += "< li > 加價:"+commafy(data.content[k][9])+"< / li > ";
//mihtml += "< li > 加價:"+commafy(data.content[k][9])+"< / li > ";
mihtml += "< li > 拆除電梯:"+commafy(data.content[k][10])+"< / li > ";
mihtml += "< li > 拆除電梯:" + commafy(data.content[k][10]) + "< / li > ";
mihtml += "< li > 美容抛光:"+commafy(data.content[k][11])+"< / li > ";
mihtml += "< li > 美容抛光:" + commafy(data.content[k][11]) + "< / li > ";
mihtml += "以上合計:"+commafy(data.content[k][12])+"/台";
mihtml += "以上合計:" + commafy(data.content[k][12]) + "/台";
mihtml += "< hr > ";
mihtml += "< hr > ";
mihtml += "< h5 > OPTION< / h5 > ";
mihtml += "< h5 > OPTION< / h5 > ";
Object.keys(data.content[k][14]).forEach(function(m){
Object.keys(data.content[k][14]).forEach(function(m) {
mihtml += "< li > "+data.content[k][14][m][0]+":"+commafy(data.content[k][14][m][1])+"< / li > ";
mihtml += "< li > " + data.content[k][14][m][0] + ":" + commafy(data.content[k][14][m][1]) + "< / li > ";
});
});
Object.keys(data.content[k][16]).forEach(function(m){
Object.keys(data.content[k][16]).forEach(function(m) {
mihtml += "< li > "+data.content[k][16][m][0]+":"+commafy(data.content[k][16][m][1])+"< / li > ";
mihtml += "< li > " + data.content[k][16][m][0] + ":" + commafy(data.content[k][16][m][1]) + "< / li > ";
});
});
Object.keys(data.content[k][18]).forEach(function(m){
Object.keys(data.content[k][18]).forEach(function(m) {
mihtml += "< li > "+data.content[k][18][m][0]+":"+commafy(data.content[k][18][m][1])+"< / li > ";
mihtml += "< li > " + data.content[k][18][m][0] + ":" + commafy(data.content[k][18][m][1]) + "< / li > ";
});
});
mihtml += "< li > "+data.content[k][19][0]+":"+commafy(data.content[k][19][1])+"< / li > ";
mihtml += "< li > " + data.content[k][19][0] + ":" + commafy(data.content[k][19][1]) + "< / li > ";
mihtml += "以上合計:"+commafy(data.content[k][13])+"< br > ";
mihtml += "以上合計:" + commafy(data.content[k][13]) + "< br > ";
$("#tb1").find("tr[name=facil_templ2]").eq(k).find('td').eq(1).html(mihtml);
$("#tb1").find("tr[name=facil_templ2]").eq(k).find('td').eq(1).html(mihtml);
//$("#tb1").find("input[name=mi_fix]").eq(k).closest('td').append(mihtml);
//$("#tb1").find("input[name=mi_fix]").eq(k).closest('td').append(mihtml);
});
});
}
}
}
}
xhr.open('POST','pricereview_mi-api.php',true);
xhr.open('POST', 'pricereview_mi-api.php', true);
xhr.send(formdata);
xhr.send(formdata);
}
}
$(function () {
$(function() {
<?php if ( $viewmi ) { ?>
<?php if ( $viewmi ) { ?>
getMI('<?php echo $id ; ?> ');
getMI('<?php echo $id ; ?> ');
<?php } ?>
<?php } ?>
@ -331,91 +331,112 @@ $(function () {
//$('input[name=item_price]').keyup(function(){ $(this).val($(this).val().replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')); });
//$('input[name=item_price]').keyup(function(){ $(this).val($(this).val().replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')); });
//$('input[name=mi_fix]').keyup(function(){ $(this).val($(this).val().replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')); });
//$('input[name=mi_fix]').keyup(function(){ $(this).val($(this).val().replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')); });
$('#tb1').on('focus', 'tr[name=facil_templ] a', function(){
$('#tb1').on('focus', 'tr[name=facil_templ] a', function() {
$(this).unbind().click(function(){
$(this).unbind().click(function() {
// 價審單序號,電梯項次,子項次
// 價審單序號,電梯項次,子項次
var pa = '';
var pa = '';
pa = '<?php echo $id ; ?> '+',';
pa = '<?php echo $id ; ?> ' + ',';
pa += $(this).closest('td').prev().find('input[name=item_no]').val()+',';
pa += $(this).closest('td').prev().find('input[name=item_no]').val() + ',';
pa += ',';
pa += ',';
pa += $(this).closest('td').prev().find('input[name=sub_item_id]').val();
pa += $(this).closest('td').prev().find('input[name=sub_item_id]').val();
var plink = '< iframe src = "specsurvey_renovate-view.php?pa='+pa+'&noheader=1& <?php echo $token_link ; ?> " width = "100%" height = "500" frameborder = "0" title = "" ></ iframe > ';
var plink = '< iframe src = "specsurvey_renovate-view.php?pa=' + pa + '&noheader=1& <?php echo $token_link ; ?> " width = "100%" height = "500" frameborder = "0" title = "" ></ iframe > ';
$('.modal-footer').find('button').prop('disabled',false);
$('.modal-footer').find('button').prop('disabled', false);
//$('.navbar').hide();
//$('.navbar').hide();
$("#specModal .modal-body").html(plink);
$("#specModal .modal-body").html(plink);
$("#specModal").modal('show');
$("#specModal").modal('show');
});
});
});
});
$('#tb1').on('keyup', 'input[name=mi_fix]', function(){
$('#tb1').on('keyup', 'input[name=mi_fix]', function() {
$(this).val($(this).val().replace(/\D/g, "").replace(/\B(?=(\d{3})+(?!\d))/g, ","));
$(this).val($(this).val().replace(/\D/g, "").replace(/\B(?=(\d{3})+(?!\d))/g, ","));
var mf = $(this).val().replace(/[,]+/g,"");
var mf = $(this).val().replace(/[,]+/g, "");
var ct = $(this).closest('td').parent().find('input[name=item_price_ct]').val().replace(/[,]+/g,"");
var ct = $(this).closest('td').parent().find('input[name=item_price_ct]').val().replace(/[,]+/g, "");
$(this).closest('td').parent().find('input[name=gross_profit]').val(commafy(ct-mf));
$(this).closest('td').parent().find('input[name=gross_profit]').val(commafy(ct - mf));
if (ct == 0) $(this).closest('td').parent().find('input[name=gross_profit_rate]').val(0.0);
if (ct == 0) $(this).closest('td').parent().find('input[name=gross_profit_rate]').val(0.0);
else $(this).closest('td').parent().find('input[name=gross_profit_rate]').val((((ct-mf)/ct)*100).toFixed(1));
else $(this).closest('td').parent().find('input[name=gross_profit_rate]').val((((ct - mf) / ct) * 100).toFixed(1));
});
});
$('button[name=status]').click(function(){
$('button[name=status]').click(function() {
var itemNoArr = [];
var itemNoArr = [];
$("input[name='item_no']").each(function(){ itemNoArr.push($(this).val()); })
$("input[name='item_no']").each(function() {
itemNoArr.push($(this).val());
})
$('#item_no_all').val(itemNoArr);
$('#item_no_all').val(itemNoArr);
var itemPriceArr = [];
var itemPriceArr = [];
$("input[name='item_price']").each(function(){ itemPriceArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='item_price']").each(function() {
itemPriceArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#item_price_all').val(itemPriceArr);
$('#item_price_all').val(itemPriceArr);
var pvRateArr = [];
var pvRateArr = [];
$("input[name='pv_rate']").each(function(){ pvRateArr.push($(this).val()); })
$("input[name='pv_rate']").each(function() {
pvRateArr.push($(this).val());
})
$('#pv_rate_all').val(pvRateArr);
$('#pv_rate_all').val(pvRateArr);
var allocateArr = [];
var allocateArr = [];
$("input[name='allocate']").each(function(){ allocateArr.push($(this).val()); })
$("input[name='allocate']").each(function() {
allocateArr.push($(this).val());
})
$('#allocate_all').val(allocateArr);
$('#allocate_all').val(allocateArr);
var grossProfitArr = [];
var grossProfitArr = [];
$("input[name='gross_profit']").each(function(){ grossProfitArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='gross_profit']").each(function() {
grossProfitArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#gross_profit_all').val(grossProfitArr);
$('#gross_profit_all').val(grossProfitArr);
var grossProfitRateArr = [];
var grossProfitRateArr = [];
$("input[name='gross_profit_rate']").each(function(){ grossProfitRateArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='gross_profit_rate']").each(function() {
grossProfitRateArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#gross_profit_rate_all').val(grossProfitRateArr);
$('#gross_profit_rate_all').val(grossProfitRateArr);
var noteArr = [];
var noteArr = [];
$("input[name='note']").each(function(){ noteArr.push($(this).val()); })
$("input[name='note']").each(function() {
noteArr.push($(this).val());
})
$('#note_all').val(noteArr);
$('#note_all').val(noteArr);
var miFixArr = [];
var miFixArr = [];
$("input[name='mi_fix']").each(function(){ miFixArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='mi_fix']").each(function() {
miFixArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#mi_fix_all').val(miFixArr);
$('#mi_fix_all').val(miFixArr);
});
});
$('#btn_close').click(function(){
$('#btn_close').click(function() {
window.location.href = 'pricereview_renovate-index.php?function=pricereview_renovate& <?php echo $token_link ; ?> ';
window.location.href = 'pricereview_renovate-index.php?function=pricereview_renovate& <?php echo $token_link ; ?> ';
});
});
$('#tb5').on('keyup', 'input[name=final_price_total]', function(){
$('#tb5').on('keyup', 'input[name=final_price_total]', function() {
$(this).val(commafy($(this).val()));
$(this).val(commafy($(this).val()));
});
});
});
});
< / script >
< / script >
< style >
< style >
.container {
.container {
width: 1350px;
width: 1350px;
}
}
.nextline {
.nextline {
width: 100%;
width: 100%;
height: 0;
height: 0;
}
}
.modal-dialog {
.modal-dialog {
width: 1200px;
width: 1200px;
}
}
.modal-content {
height:660px;
.modal-content {
}
height: 660px;
.dollar-right {
}
.dollar-right {
text-align: right;
text-align: right;
}
}
hr {
hr {
border: 0;
border: 0;
border-bottom: 1px dashed #ccc;
border-bottom: 1px dashed #ccc;
background: #999;
background: #999;
margin: 10px 0;
margin: 10px 0;
}
}
< / style >
< / style >
<!-- 子窗:規格調查 -->
<!-- 子窗:規格調查 -->
< div class = "modal fade" id = "specModal" tabindex = "-1" role = "dialog" aria-labelledby = "specModalTitle" aria-hidden = "true" >
< div class = "modal fade" id = "specModal" tabindex = "-1" role = "dialog" aria-labelledby = "specModalTitle" aria-hidden = "true" >
< div class = "modal-dialog" role = "document" >
< div class = "modal-dialog" role = "document" >
< div class = "modal-content" >
< div class = "modal-content" >
< div class = "modal-header" >
< div class = "modal-header" >
@ -428,11 +449,11 @@ hr {
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< div class = "container" >
< div class = "container" >
< form class = "form-inline" method = "post" action = "pricereview_renovate-record-check.php" enctype = "multipart/form-data" >
< form class = "form-inline" method = "post" action = "pricereview_renovate-record-check.php" enctype = "multipart/form-data" >
< input type = "hidden" name = "id" id = "id" value = " <? = $id ; ?> " >
< input type = "hidden" name = "id" id = "id" value = " <? = $id ; ?> " >
< input type = "hidden" name = "st" id = "st" value = " <? = $st ; ?> " >
< input type = "hidden" name = "st" id = "st" value = " <? = $st ; ?> " >
< div class = "table-responsive" >
< div class = "table-responsive" >
< table id = "tb1" class = "table table-bordered" >
< table id = "tb1" class = "table table-bordered" >
< thead >
< thead >
@ -465,22 +486,22 @@ hr {
foreach ($item_arr as $item_no => $val) {
foreach ($item_arr as $item_no => $val) {
$item_amt_A_all += $val["item_price_bp"];
$item_amt_A_all += $val["item_price_bp"];
if ($viewmi) {
if ($viewmi) {
for ($i=0; $i< $val["item_qty"]; $i++) {
for ($i = 0; $i < $val["item_qty"]; $i++) {
?>
?>
< tr name = "facil_templ" >
< tr name = "facil_templ" >
< td > <?php echo $idx ; ?> < input type = "hidden" name = "item_no" value = " <?php echo $item_no ; ?> " >< input type = "hidden" name = "sub_item_id" value = " <?php if ( isset ( $val [ "sub_item_id" ])) echo implode ( "@" , $val [ "sub_item_id" ]); ?> " ></ td >
< td > <?php echo $idx ; ?> < input type = "hidden" name = "item_no" value = " <?php echo $item_no ; ?> " >< input type = "hidden" name = "sub_item_id" value = " <?php if ( isset ( $val [ "sub_item_id" ])) echo implode ( "@" , $val [ "sub_item_id" ]); ?> " ></ td >
< td nowrap >< a href = "" data-toggle = "modal" > <? = $val [ "item_spec" ]; ?> [規調]</ a ></ td >
< td nowrap >< a href = "" data-toggle = "modal" > <? = $val [ "item_spec" ]; ?> [規調]</ a ></ td >
< td >< input type = "text" name = "item_unit_price" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $val [ "item_unit_price" ]); ?> " ></ td >
< td >< input type = "text" name = "item_unit_price" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $val [ "item_unit_price" ]); ?> " ></ td >
< td > < input type = "text" name = "item_qty" class = "form-control" size = "2" value = "1" > < / td >
< td > < input type = "text" name = "item_qty" class = "form-control" size = "2" value = "1" > < / td >
< td >< input type = "text" name = "item_price_bp" class = "form-control dollar-right" size = "9" value = " <? = number_format ( $val [ "item_unit_price" ]); ?> " ></ td >
< td >< input type = "text" name = "item_price_bp" class = "form-control dollar-right" size = "9" value = " <? = number_format ( $val [ "item_unit_price" ]); ?> " ></ td >
< td >< input type = "text" name = "mi_fix" class = "form-control dollar-right" size = "9" value = " <?php echo ( $val [ "mi_fix" ]) ? number_format ( $val [ "mi_fix" ]) : "" ; ?> " ></ td >
< td >< input type = "text" name = "mi_fix" class = "form-control dollar-right" size = "9" value = " <?php echo ( $val [ "mi_fix" ]) ? number_format ( $val [ "mi_fix" ]) : "" ; ?> " ></ td >
< td >< input type = "text" name = "item_price_ct" class = "form-control dollar-right" size = "9" value = " <? = number_format ( $val [ "item_price_ct" ] / $val [ "item_qty" ]); ?> " ></ td >
< td >< input type = "text" name = "item_price_ct" class = "form-control dollar-right" size = "9" value = " <? = number_format ( $val [ "item_price_ct" ] / $val [ "item_qty" ]); ?> " ></ td >
<!--<td><input type="text" name="item_price" class="form-control dollar-right" size="8" value=" <?php echo ( $val [ "item_price" ]) ? number_format ( $val [ "item_price" ]) : "" ; ?> "></td>
<!--<td><input type="text" name="item_price" class="form-control dollar-right" size="8" value=" <?php echo ( $val [ "item_price" ]) ? number_format ( $val [ "item_price" ]) : "" ; ?> "></td>
< td >< input type = "text" name = "pv_rate" class = "form-control" size = "1" value = " <? = $val [ "pv_rate" ]; ?> " ></ td >
< td >< input type = "text" name = "pv_rate" class = "form-control" size = "1" value = " <? = $val [ "pv_rate" ]; ?> " ></ td >
< td >< input type = "text" name = "allocate" class = "form-control" size = "6" value = " <? = $val [ "allocate" ]; ?> " ></ td > -->
< td >< input type = "text" name = "allocate" class = "form-control" size = "6" value = " <? = $val [ "allocate" ]; ?> " ></ td > -->
< td >< input type = "text" name = "gross_profit" class = "form-control dollar-right" size = "9" value = " <? = number_format ( $val [ "gross_profit" ]); ?> " ></ td >
< td >< input type = "text" name = "gross_profit" class = "form-control dollar-right" size = "9" value = " <? = number_format ( $val [ "gross_profit" ]); ?> " ></ td >
< td >< input type = "text" name = "gross_profit_rate" class = "form-control" size = "6" value = " <? = number_format ( $val [ "gross_profit_rate" ], 1 ); ?> " ></ td >
< td >< input type = "text" name = "gross_profit_rate" class = "form-control" size = "6" value = " <? = number_format ( $val [ "gross_profit_rate" ], 1 ); ?> " ></ td >
<!--<td><input type="text" name="note" class="form-control" size="17" value=" <? = $val [ "note" ]; ?> "></td>-->
<!--<td><input type="text" name="note" class="form-control" size="17" value=" <? = $val [ "note" ]; ?> "></td>-->
< / tr >
< / tr >
< tr name = "facil_templ2" >
< tr name = "facil_templ2" >
< td colspan = "5" > < / td >
< td colspan = "5" > < / td >
@ -492,10 +513,10 @@ hr {
?>
?>
< tr name = "facil_templ" >
< tr name = "facil_templ" >
< td > <?php echo $idx ; ?> < input type = "hidden" name = "item_no" value = " <?php echo $item_no ; ?> " >< input type = "hidden" name = "sub_item_id" value = " <?php if ( isset ( $val [ "sub_item_id" ])) echo implode ( "@" , $val [ "sub_item_id" ]); ?> " ></ td >
< td > <?php echo $idx ; ?> < input type = "hidden" name = "item_no" value = " <?php echo $item_no ; ?> " >< input type = "hidden" name = "sub_item_id" value = " <?php if ( isset ( $val [ "sub_item_id" ])) echo implode ( "@" , $val [ "sub_item_id" ]); ?> " ></ td >
< td nowrap >< a href = "" data-toggle = "modal" > <? = $val [ "item_spec" ]; ?> [規調]</ a ></ td >
< td nowrap >< a href = "" data-toggle = "modal" > <? = $val [ "item_spec" ]; ?> [規調]</ a ></ td >
< td >< input type = "text" name = "item_unit_price" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $val [ "item_unit_price" ]); ?> " ></ td >
< td >< input type = "text" name = "item_unit_price" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $val [ "item_unit_price" ]); ?> " ></ td >
< td >< input type = "text" name = "item_qty" class = "form-control" size = "2" value = " <? = number_format ( $val [ "item_qty" ]); ?> " ></ td >
< td >< input type = "text" name = "item_qty" class = "form-control" size = "2" value = " <? = number_format ( $val [ "item_qty" ]); ?> " ></ td >
< td >< input type = "text" name = "item_price_bp" class = "form-control dollar-right" size = "9" value = " <? = number_format ( $val [ "item_price_bp" ]); ?> " ></ td >
< td >< input type = "text" name = "item_price_bp" class = "form-control dollar-right" size = "9" value = " <? = number_format ( $val [ "item_price_bp" ]); ?> " ></ td >
< / tr >
< / tr >
<?php
<?php
}
}
@ -504,7 +525,7 @@ hr {
?>
?>
< tr >
< tr >
< td colspan = "4" > 小計< / td >
< td colspan = "4" > 小計< / td >
< td >< input type = "text" name = "amt" id = "amt" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $item_amt_A_all ); ?> " ></ td >
< td >< input type = "text" name = "amt" id = "amt" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $item_amt_A_all ); ?> " ></ td >
< / tr >
< / tr >
< / tbody >
< / tbody >
< / table >
< / table >
@ -537,11 +558,11 @@ hr {
?>
?>
< tr >
< tr >
< td > <?php echo $idx ; ?> </ td >
< td > <?php echo $idx ; ?> </ td >
< td >< input type = "text" name = "option_seat" class = "form-control" size = "30" value = " <? = $val [ 'item_spec' ]; ?> " ></ td >
< td >< input type = "text" name = "option_seat" class = "form-control" size = "30" value = " <? = $val [ 'item_spec' ]; ?> " ></ td >
< td >< input type = "text" name = "option_unit_price" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $val [ "item_unit_price" ]); ?> " ></ td >
< td >< input type = "text" name = "option_unit_price" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $val [ "item_unit_price" ]); ?> " ></ td >
< td >< input type = "text" name = "option_qty" class = "form-control" size = "2" value = " <? = number_format ( $val [ "item_qty" ]); ?> " ></ td >
< td >< input type = "text" name = "option_qty" class = "form-control" size = "2" value = " <? = number_format ( $val [ "item_qty" ]); ?> " ></ td >
< td >< input type = "text" name = "option_price_bp" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $val [ "item_price_bp" ]); ?> " ></ td >
< td >< input type = "text" name = "option_price_bp" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $val [ "item_price_bp" ]); ?> " ></ td >
< td >< input type = "text" name = "option_memo" class = "form-control" size = "20" value = " <? = $val [ "memo" ]; ?> " ></ td >
< td >< input type = "text" name = "option_memo" class = "form-control" size = "20" value = " <? = $val [ "memo" ]; ?> " ></ td >
< td > <?php echo $val [ "option_relate_spec" ]; ?> </ td >
< td > <?php echo $val [ "option_relate_spec" ]; ?> </ td >
< / tr >
< / tr >
<?php
<?php
@ -550,7 +571,7 @@ hr {
?>
?>
< tr >
< tr >
< td colspan = "4" > 小計< / td >
< td colspan = "4" > 小計< / td >
< td colspan = "3" >< input type = "text" name = "option_amt" id = "option_amt" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $item_amt_B_all ); ?> " ></ td >
< td colspan = "3" >< input type = "text" name = "option_amt" id = "option_amt" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $item_amt_B_all ); ?> " ></ td >
< / tr >
< / tr >
< / tbody >
< / tbody >
< / table >
< / table >
@ -584,9 +605,9 @@ hr {
< td > <?php echo $idx ; ?> </ td >
< td > <?php echo $idx ; ?> </ td >
< td >< input type = "text" name = "except_note" class = "form-control" size = "30" value = " <?php echo $val [ 'note' ]; ?> " ></ td >
< td >< input type = "text" name = "except_note" class = "form-control" size = "30" value = " <?php echo $val [ 'note' ]; ?> " ></ td >
< td >< input type = "text" name = "except_spec" class = "form-control" size = "30" value = " <?php echo $val [ 'item_spec' ]; ?> " ></ td >
< td >< input type = "text" name = "except_spec" class = "form-control" size = "30" value = " <?php echo $val [ 'item_spec' ]; ?> " ></ td >
< td >< input type = "text" name = "except_unit_price" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $val [ "item_unit_price" ]); ?> " ></ td >
< td >< input type = "text" name = "except_unit_price" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $val [ "item_unit_price" ]); ?> " ></ td >
< td >< input type = "text" name = "except_qty" class = "form-control" size = "2" value = " <? = number_format ( $val [ "item_qty" ]); ?> " ></ td >
< td >< input type = "text" name = "except_qty" class = "form-control" size = "2" value = " <? = number_format ( $val [ "item_qty" ]); ?> " ></ td >
< td >< input type = "text" name = "except_price_bp" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $val [ "item_price_bp" ]); ?> " ></ td >
< td >< input type = "text" name = "except_price_bp" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $val [ "item_price_bp" ]); ?> " ></ td >
< / tr >
< / tr >
<?php
<?php
$idx++;
$idx++;
@ -594,7 +615,7 @@ hr {
?>
?>
< tr >
< tr >
< td colspan = "5" > 小計< / td >
< td colspan = "5" > 小計< / td >
< td >< input type = "text" name = "ex_amt" id = "ex_amt" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $item_amt_E_all ); ?> " ></ td >
< td >< input type = "text" name = "ex_amt" id = "ex_amt" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $item_amt_E_all ); ?> " ></ td >
< / tr >
< / tr >
< / tbody >
< / tbody >
< / table >
< / table >
@ -636,10 +657,10 @@ hr {
< td >< input type = "text" name = "mn_seat" class = "form-control" size = "6" value = " <?php echo $mn_seat ; ?> " ></ td >
< td >< input type = "text" name = "mn_seat" class = "form-control" size = "6" value = " <?php echo $mn_seat ; ?> " ></ td >
< td >< input type = "text" name = "mn_numberofstop" class = "form-control" size = "6" value = " <?php echo $mn_numberofstop ; ?> " ></ td >
< td >< input type = "text" name = "mn_numberofstop" class = "form-control" size = "6" value = " <?php echo $mn_numberofstop ; ?> " ></ td >
< td >< input type = "text" name = "mn_speed" class = "form-control" size = "6" value = " <?php echo $mn_speed ; ?> " ></ td >
< td >< input type = "text" name = "mn_speed" class = "form-control" size = "6" value = " <?php echo $mn_speed ; ?> " ></ td >
< td >< input type = "text" name = "mn_unit_price" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $val [ "item_unit_price" ]); ?> " ></ td >
< td >< input type = "text" name = "mn_unit_price" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $val [ "item_unit_price" ]); ?> " ></ td >
< td >< input type = "text" name = "mn_qty" class = "form-control" size = "2" value = " <? = number_format ( $val [ "item_qty" ]); ?> " ></ td >
< td >< input type = "text" name = "mn_qty" class = "form-control" size = "2" value = " <? = number_format ( $val [ "item_qty" ]); ?> " ></ td >
< td >< input type = "text" name = "mn_price_bp" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $val [ "item_price_bp" ]); ?> " ></ td >
< td >< input type = "text" name = "mn_price_bp" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $val [ "item_price_bp" ]); ?> " ></ td >
< td >< input type = "text" name = "mn_memo" class = "form-control" size = "20" value = " <? = $val [ "memo" ]; ?> " ></ td >
< td >< input type = "text" name = "mn_memo" class = "form-control" size = "20" value = " <? = $val [ "memo" ]; ?> " ></ td >
< td > <?php echo $val [ "option_relate_spec" ]; ?> </ td >
< td > <?php echo $val [ "option_relate_spec" ]; ?> </ td >
< / tr >
< / tr >
<?php
<?php
@ -648,7 +669,7 @@ hr {
?>
?>
< tr >
< tr >
< td colspan = "7" > 小計< / td >
< td colspan = "7" > 小計< / td >
< td >< input type = "text" name = "mn_amt" id = "mn_amt" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $item_amt_D_all ); ?> " ></ td >
< td >< input type = "text" name = "mn_amt" id = "mn_amt" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $item_amt_D_all ); ?> " ></ td >
< td colspan = "2" > < / td >
< td colspan = "2" > < / td >
< / tr >
< / tr >
< / tbody >
< / tbody >
@ -685,13 +706,13 @@ hr {
< td >
< td >
< select name = "seat" class = "form-control" >
< select name = "seat" class = "form-control" >
< option value = "" > 請選擇< / option >
< option value = "" > 請選擇< / option >
< option value = "15人(含)以下" <?php if ( $val [ 'item_spec' ] == "15人(含)以下" ) {
< option value = "15人(含)以下" <?php if ( $val [ 'item_spec' ] == "15人(含)以下" ) {
echo " selected";
echo " selected";
} ?>>15人(含)以下/1000KGS< / option >
} ?>>15人(含)以下/1000KGS< / option >
< option value = "16~24人" <?php if ( $val [ 'item_spec' ] == "16~24人" ) {
< option value = "16~24人" <?php if ( $val [ 'item_spec' ] == "16~24人" ) {
echo " selected";
echo " selected";
} ?>>16~24人/1001~1600KGS< / option >
} ?>>16~24人/1001~1600KGS< / option >
< option value = "25~30人" <?php if ( $val [ 'item_spec' ] == "25~30人" ) {
< option value = "25~30人" <?php if ( $val [ 'item_spec' ] == "25~30人" ) {
echo " selected";
echo " selected";
} ?>>25~30人/1601~2500KGS< / option >
} ?>>25~30人/1601~2500KGS< / option >
< / select >
< / select >
@ -700,19 +721,19 @@ hr {
< select name = "floor" class = "form-control" >
< select name = "floor" class = "form-control" >
< option value = "" > 請選擇< / option >
< option value = "" > 請選擇< / option >
<?php
<?php
for ($j=4; $j< 41 ; $ j + + ) {
for ($j = 4; $j < 41 ; $ j + + ) {
echo '< option value = "'.$j.'" ' ;
echo '< option value = "' . $j . '" ' ;
if ($floor == $j) {
if ($floor == $j) {
echo ' selected';
echo ' selected';
}
}
echo '>'.$j.'< / option > ';
echo '>' . $j . '< / option > ';
}
}
?>
?>
< / select >
< / select >
< / td >
< / td >
< td >< input type = "text" name = "demolition_unit_price" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $val [ "item_unit_price" ]); ?> " ></ td >
< td >< input type = "text" name = "demolition_unit_price" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $val [ "item_unit_price" ]); ?> " ></ td >
< td >< input type = "text" name = "demolition_qty" class = "form-control" size = "1" value = " <? = number_format ( $val [ "item_qty" ]); ?> " ></ td >
< td >< input type = "text" name = "demolition_qty" class = "form-control" size = "1" value = " <? = number_format ( $val [ "item_qty" ]); ?> " ></ td >
< td >< input type = "text" name = "demolition_price_bp" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $val [ "item_price_bp" ]); ?> " ></ td >
< td >< input type = "text" name = "demolition_price_bp" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $val [ "item_price_bp" ]); ?> " ></ td >
< input type = "hidden" name = "fp_id" > < / td >
< input type = "hidden" name = "fp_id" > < / td >
< / tr >
< / tr >
<?php
<?php
@ -721,7 +742,7 @@ hr {
?>
?>
< tr >
< tr >
< td colspan = "5" > 小計< / td >
< td colspan = "5" > 小計< / td >
< td >< input type = "text" name = "demolition_amt" id = "demolition_amt" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $item_amt_C_all ); ?> " ></ td >
< td >< input type = "text" name = "demolition_amt" id = "demolition_amt" class = "form-control dollar-right" size = "8" value = " <? = number_format ( $item_amt_C_all ); ?> " ></ td >
< / tr >
< / tr >
< / tbody >
< / tbody >
< / table >
< / table >
@ -737,9 +758,9 @@ hr {
< tbody >
< tbody >
< tr >
< tr >
< td > < label > 數量< / label > < / td >
< td > < label > 數量< / label > < / td >
< td >< input type = "text" id = "cnt" value = " <? = number_format ( $data [ "qty_total" ]); ?> " ></ td >
< td >< input type = "text" id = "cnt" value = " <? = number_format ( $data [ "qty_total" ]); ?> " ></ td >
< td > < label > B/P(含稅)< / label > < / td >
< td > < label > B/P(含稅)< / label > < / td >
< td >< input type = "text" id = "amt" value = " <? = number_format ( $data [ "price_lowest" ]); ?> " ></ td >
< td >< input type = "text" id = "amt" value = " <? = number_format ( $data [ "price_lowest" ]); ?> " ></ td >
< / tr >
< / tr >
< / tbody >
< / tbody >
< / table > -->
< / table > -->
@ -763,13 +784,13 @@ hr {
< td >
< td >
< select name = "pay_period" class = "form-control" >
< select name = "pay_period" class = "form-control" >
< option value = "" > < / option >
< option value = "" > < / option >
< option value = "7" <?php if ( isset ( $pay_arr [ 1 ][ "pay_period" ]) && $pay_arr [ 1 ][ "pay_period" ] == "7" ) echo " selected" ; ?> > 7天</ option >
< option value = "7" <?php if ( isset ( $pay_arr [ 1 ][ "pay_period" ]) && $pay_arr [ 1 ][ "pay_period" ] == "7" ) echo " selected" ; ?> > 7天</ option >
< option value = "30" <?php if ( isset ( $pay_arr [ 1 ][ "pay_period" ]) && $pay_arr [ 1 ][ "pay_period" ] == "30" ) echo " selected" ; ?> > 30天</ option >
< option value = "30" <?php if ( isset ( $pay_arr [ 1 ][ "pay_period" ]) && $pay_arr [ 1 ][ "pay_period" ] == "30" ) echo " selected" ; ?> > 30天</ option >
< option value = "60" <?php if ( isset ( $pay_arr [ 1 ][ "pay_period" ]) && $pay_arr [ 1 ][ "pay_period" ] == "60" ) echo " selected" ; ?> > 60天</ option >
< option value = "60" <?php if ( isset ( $pay_arr [ 1 ][ "pay_period" ]) && $pay_arr [ 1 ][ "pay_period" ] == "60" ) echo " selected" ; ?> > 60天</ option >
< option value = "90" <?php if ( isset ( $pay_arr [ 1 ][ "pay_period" ]) && $pay_arr [ 1 ][ "pay_period" ] == "90" ) echo " selected" ; ?> > 90天</ option >
< option value = "90" <?php if ( isset ( $pay_arr [ 1 ][ "pay_period" ]) && $pay_arr [ 1 ][ "pay_period" ] == "90" ) echo " selected" ; ?> > 90天</ option >
< option value = "120" <?php if ( isset ( $pay_arr [ 1 ][ "pay_period" ]) && $pay_arr [ 1 ][ "pay_period" ] == "120" ) echo " selected" ; ?> > 120天</ option >
< option value = "120" <?php if ( isset ( $pay_arr [ 1 ][ "pay_period" ]) && $pay_arr [ 1 ][ "pay_period" ] == "120" ) echo " selected" ; ?> > 120天</ option >
< option value = "180" <?php if ( isset ( $pay_arr [ 1 ][ "pay_period" ]) && $pay_arr [ 1 ][ "pay_period" ] == "180" ) echo " selected" ; ?> > 180天</ option >
< option value = "180" <?php if ( isset ( $pay_arr [ 1 ][ "pay_period" ]) && $pay_arr [ 1 ][ "pay_period" ] == "180" ) echo " selected" ; ?> > 180天</ option >
< option value = "other" <?php if ( isset ( $pay_arr [ 1 ][ "pay_period" ]) && $pay_arr [ 1 ][ "pay_period" ] == "other" ) echo " selected" ; ?> > 其它</ option >
< option value = "other" <?php if ( isset ( $pay_arr [ 1 ][ "pay_period" ]) && $pay_arr [ 1 ][ "pay_period" ] == "other" ) echo " selected" ; ?> > 其它</ option >
< / select >
< / select >
< / td >
< / td >
< / tr >
< / tr >
@ -780,13 +801,13 @@ hr {
< td >
< td >
< select name = "pay_period" class = "form-control" >
< select name = "pay_period" class = "form-control" >
< option value = "" > < / option >
< option value = "" > < / option >
< option value = "7" <?php if ( isset ( $pay_arr [ 2 ][ "pay_period" ]) && $pay_arr [ 2 ][ "pay_period" ] == "7" ) echo " selected" ; ?> > 7天</ option >
< option value = "7" <?php if ( isset ( $pay_arr [ 2 ][ "pay_period" ]) && $pay_arr [ 2 ][ "pay_period" ] == "7" ) echo " selected" ; ?> > 7天</ option >
< option value = "30" <?php if ( isset ( $pay_arr [ 2 ][ "pay_period" ]) && $pay_arr [ 2 ][ "pay_period" ] == "30" ) echo " selected" ; ?> > 30天</ option >
< option value = "30" <?php if ( isset ( $pay_arr [ 2 ][ "pay_period" ]) && $pay_arr [ 2 ][ "pay_period" ] == "30" ) echo " selected" ; ?> > 30天</ option >
< option value = "60" <?php if ( isset ( $pay_arr [ 2 ][ "pay_period" ]) && $pay_arr [ 2 ][ "pay_period" ] == "60" ) echo " selected" ; ?> > 60天</ option >
< option value = "60" <?php if ( isset ( $pay_arr [ 2 ][ "pay_period" ]) && $pay_arr [ 2 ][ "pay_period" ] == "60" ) echo " selected" ; ?> > 60天</ option >
< option value = "90" <?php if ( isset ( $pay_arr [ 2 ][ "pay_period" ]) && $pay_arr [ 2 ][ "pay_period" ] == "90" ) echo " selected" ; ?> > 90天</ option >
< option value = "90" <?php if ( isset ( $pay_arr [ 2 ][ "pay_period" ]) && $pay_arr [ 2 ][ "pay_period" ] == "90" ) echo " selected" ; ?> > 90天</ option >
< option value = "120" <?php if ( isset ( $pay_arr [ 2 ][ "pay_period" ]) && $pay_arr [ 2 ][ "pay_period" ] == "120" ) echo " selected" ; ?> > 120天</ option >
< option value = "120" <?php if ( isset ( $pay_arr [ 2 ][ "pay_period" ]) && $pay_arr [ 2 ][ "pay_period" ] == "120" ) echo " selected" ; ?> > 120天</ option >
< option value = "180" <?php if ( isset ( $pay_arr [ 2 ][ "pay_period" ]) && $pay_arr [ 2 ][ "pay_period" ] == "180" ) echo " selected" ; ?> > 180天</ option >
< option value = "180" <?php if ( isset ( $pay_arr [ 2 ][ "pay_period" ]) && $pay_arr [ 2 ][ "pay_period" ] == "180" ) echo " selected" ; ?> > 180天</ option >
< option value = "other" <?php if ( isset ( $pay_arr [ 2 ][ "pay_period" ]) && $pay_arr [ 2 ][ "pay_period" ] == "other" ) echo " selected" ; ?> > 其它</ option >
< option value = "other" <?php if ( isset ( $pay_arr [ 2 ][ "pay_period" ]) && $pay_arr [ 2 ][ "pay_period" ] == "other" ) echo " selected" ; ?> > 其它</ option >
< / select >
< / select >
< / td >
< / td >
< / tr >
< / tr >
@ -797,13 +818,13 @@ hr {
< td >
< td >
< select name = "pay_period" class = "form-control" >
< select name = "pay_period" class = "form-control" >
< option value = "" > < / option >
< option value = "" > < / option >
< option value = "7" <?php if ( isset ( $pay_arr [ 3 ][ "pay_period" ]) && $pay_arr [ 3 ][ "pay_period" ] == "7" ) echo " selected" ; ?> > 7天</ option >
< option value = "7" <?php if ( isset ( $pay_arr [ 3 ][ "pay_period" ]) && $pay_arr [ 3 ][ "pay_period" ] == "7" ) echo " selected" ; ?> > 7天</ option >
< option value = "30" <?php if ( isset ( $pay_arr [ 3 ][ "pay_period" ]) && $pay_arr [ 3 ][ "pay_period" ] == "30" ) echo " selected" ; ?> > 30天</ option >
< option value = "30" <?php if ( isset ( $pay_arr [ 3 ][ "pay_period" ]) && $pay_arr [ 3 ][ "pay_period" ] == "30" ) echo " selected" ; ?> > 30天</ option >
< option value = "60" <?php if ( isset ( $pay_arr [ 3 ][ "pay_period" ]) && $pay_arr [ 3 ][ "pay_period" ] == "60" ) echo " selected" ; ?> > 60天</ option >
< option value = "60" <?php if ( isset ( $pay_arr [ 3 ][ "pay_period" ]) && $pay_arr [ 3 ][ "pay_period" ] == "60" ) echo " selected" ; ?> > 60天</ option >
< option value = "90" <?php if ( isset ( $pay_arr [ 3 ][ "pay_period" ]) && $pay_arr [ 3 ][ "pay_period" ] == "90" ) echo " selected" ; ?> > 90天</ option >
< option value = "90" <?php if ( isset ( $pay_arr [ 3 ][ "pay_period" ]) && $pay_arr [ 3 ][ "pay_period" ] == "90" ) echo " selected" ; ?> > 90天</ option >
< option value = "120" <?php if ( isset ( $pay_arr [ 3 ][ "pay_period" ]) && $pay_arr [ 3 ][ "pay_period" ] == "120" ) echo " selected" ; ?> > 120天</ option >
< option value = "120" <?php if ( isset ( $pay_arr [ 3 ][ "pay_period" ]) && $pay_arr [ 3 ][ "pay_period" ] == "120" ) echo " selected" ; ?> > 120天</ option >
< option value = "180" <?php if ( isset ( $pay_arr [ 3 ][ "pay_period" ]) && $pay_arr [ 3 ][ "pay_period" ] == "180" ) echo " selected" ; ?> > 180天</ option >
< option value = "180" <?php if ( isset ( $pay_arr [ 3 ][ "pay_period" ]) && $pay_arr [ 3 ][ "pay_period" ] == "180" ) echo " selected" ; ?> > 180天</ option >
< option value = "other" <?php if ( isset ( $pay_arr [ 3 ][ "pay_period" ]) && $pay_arr [ 3 ][ "pay_period" ] == "other" ) echo " selected" ; ?> > 其它</ option >
< option value = "other" <?php if ( isset ( $pay_arr [ 3 ][ "pay_period" ]) && $pay_arr [ 3 ][ "pay_period" ] == "other" ) echo " selected" ; ?> > 其它</ option >
< / select >
< / select >
< / td >
< / td >
< / tr >
< / tr >
@ -814,13 +835,13 @@ hr {
< td >
< td >
< select name = "pay_period" class = "form-control" >
< select name = "pay_period" class = "form-control" >
< option value = "" > < / option >
< option value = "" > < / option >
< option value = "7" <?php if ( isset ( $pay_arr [ 4 ][ "pay_period" ]) && $pay_arr [ 4 ][ "pay_period" ] == "7" ) echo " selected" ; ?> > 7天</ option >
< option value = "7" <?php if ( isset ( $pay_arr [ 4 ][ "pay_period" ]) && $pay_arr [ 4 ][ "pay_period" ] == "7" ) echo " selected" ; ?> > 7天</ option >
< option value = "30" <?php if ( isset ( $pay_arr [ 4 ][ "pay_period" ]) && $pay_arr [ 4 ][ "pay_period" ] == "30" ) echo " selected" ; ?> > 30天</ option >
< option value = "30" <?php if ( isset ( $pay_arr [ 4 ][ "pay_period" ]) && $pay_arr [ 4 ][ "pay_period" ] == "30" ) echo " selected" ; ?> > 30天</ option >
< option value = "60" <?php if ( isset ( $pay_arr [ 4 ][ "pay_period" ]) && $pay_arr [ 4 ][ "pay_period" ] == "60" ) echo " selected" ; ?> > 60天</ option >
< option value = "60" <?php if ( isset ( $pay_arr [ 4 ][ "pay_period" ]) && $pay_arr [ 4 ][ "pay_period" ] == "60" ) echo " selected" ; ?> > 60天</ option >
< option value = "90" <?php if ( isset ( $pay_arr [ 4 ][ "pay_period" ]) && $pay_arr [ 4 ][ "pay_period" ] == "90" ) echo " selected" ; ?> > 90天</ option >
< option value = "90" <?php if ( isset ( $pay_arr [ 4 ][ "pay_period" ]) && $pay_arr [ 4 ][ "pay_period" ] == "90" ) echo " selected" ; ?> > 90天</ option >
< option value = "120" <?php if ( isset ( $pay_arr [ 4 ][ "pay_period" ]) && $pay_arr [ 4 ][ "pay_period" ] == "120" ) echo " selected" ; ?> > 120天</ option >
< option value = "120" <?php if ( isset ( $pay_arr [ 4 ][ "pay_period" ]) && $pay_arr [ 4 ][ "pay_period" ] == "120" ) echo " selected" ; ?> > 120天</ option >
< option value = "180" <?php if ( isset ( $pay_arr [ 4 ][ "pay_period" ]) && $pay_arr [ 4 ][ "pay_period" ] == "180" ) echo " selected" ; ?> > 180天</ option >
< option value = "180" <?php if ( isset ( $pay_arr [ 4 ][ "pay_period" ]) && $pay_arr [ 4 ][ "pay_period" ] == "180" ) echo " selected" ; ?> > 180天</ option >
< option value = "other" <?php if ( isset ( $pay_arr [ 4 ][ "pay_period" ]) && $pay_arr [ 4 ][ "pay_period" ] == "other" ) echo " selected" ; ?> > 其它</ option >
< option value = "other" <?php if ( isset ( $pay_arr [ 4 ][ "pay_period" ]) && $pay_arr [ 4 ][ "pay_period" ] == "other" ) echo " selected" ; ?> > 其它</ option >
< / select >
< / select >
< / td >
< / td >
< / tr >
< / tr >
@ -832,13 +853,13 @@ hr {
< td >
< td >
< select name = "pay_period" class = "form-control" >
< select name = "pay_period" class = "form-control" >
< option value = "" > < / option >
< option value = "" > < / option >
< option value = "7" <?php if ( isset ( $pay_arr [ 5 ][ "pay_period" ]) && $pay_arr [ 5 ][ "pay_period" ] == "7" ) echo " selected" ; ?> > 7天</ option >
< option value = "7" <?php if ( isset ( $pay_arr [ 5 ][ "pay_period" ]) && $pay_arr [ 5 ][ "pay_period" ] == "7" ) echo " selected" ; ?> > 7天</ option >
< option value = "30" <?php if ( isset ( $pay_arr [ 5 ][ "pay_period" ]) && $pay_arr [ 5 ][ "pay_period" ] == "30" ) echo " selected" ; ?> > 30天</ option >
< option value = "30" <?php if ( isset ( $pay_arr [ 5 ][ "pay_period" ]) && $pay_arr [ 5 ][ "pay_period" ] == "30" ) echo " selected" ; ?> > 30天</ option >
< option value = "60" <?php if ( isset ( $pay_arr [ 5 ][ "pay_period" ]) && $pay_arr [ 5 ][ "pay_period" ] == "60" ) echo " selected" ; ?> > 60天</ option >
< option value = "60" <?php if ( isset ( $pay_arr [ 5 ][ "pay_period" ]) && $pay_arr [ 5 ][ "pay_period" ] == "60" ) echo " selected" ; ?> > 60天</ option >
< option value = "90" <?php if ( isset ( $pay_arr [ 5 ][ "pay_period" ]) && $pay_arr [ 5 ][ "pay_period" ] == "90" ) echo " selected" ; ?> > 90天</ option >
< option value = "90" <?php if ( isset ( $pay_arr [ 5 ][ "pay_period" ]) && $pay_arr [ 5 ][ "pay_period" ] == "90" ) echo " selected" ; ?> > 90天</ option >
< option value = "120" <?php if ( isset ( $pay_arr [ 5 ][ "pay_period" ]) && $pay_arr [ 5 ][ "pay_period" ] == "120" ) echo " selected" ; ?> > 120天</ option >
< option value = "120" <?php if ( isset ( $pay_arr [ 5 ][ "pay_period" ]) && $pay_arr [ 5 ][ "pay_period" ] == "120" ) echo " selected" ; ?> > 120天</ option >
< option value = "180" <?php if ( isset ( $pay_arr [ 5 ][ "pay_period" ]) && $pay_arr [ 5 ][ "pay_period" ] == "180" ) echo " selected" ; ?> > 180天</ option >
< option value = "180" <?php if ( isset ( $pay_arr [ 5 ][ "pay_period" ]) && $pay_arr [ 5 ][ "pay_period" ] == "180" ) echo " selected" ; ?> > 180天</ option >
< option value = "other" <?php if ( isset ( $pay_arr [ 5 ][ "pay_period" ]) && $pay_arr [ 5 ][ "pay_period" ] == "other" ) echo " selected" ; ?> > 其它</ option >
< option value = "other" <?php if ( isset ( $pay_arr [ 5 ][ "pay_period" ]) && $pay_arr [ 5 ][ "pay_period" ] == "other" ) echo " selected" ; ?> > 其它</ option >
< / select >
< / select >
< / td >
< / td >
< / tr >
< / tr >
@ -849,13 +870,13 @@ hr {
< td >
< td >
< select name = "pay_period" class = "form-control" >
< select name = "pay_period" class = "form-control" >
< option value = "" > < / option >
< option value = "" > < / option >
< option value = "7" <?php if ( isset ( $pay_arr [ 6 ][ "pay_period" ]) && $pay_arr [ 6 ][ "pay_period" ] == "7" ) echo " selected" ; ?> > 7天</ option >
< option value = "7" <?php if ( isset ( $pay_arr [ 6 ][ "pay_period" ]) && $pay_arr [ 6 ][ "pay_period" ] == "7" ) echo " selected" ; ?> > 7天</ option >
< option value = "30" <?php if ( isset ( $pay_arr [ 6 ][ "pay_period" ]) && $pay_arr [ 6 ][ "pay_period" ] == "30" ) echo " selected" ; ?> > 30天</ option >
< option value = "30" <?php if ( isset ( $pay_arr [ 6 ][ "pay_period" ]) && $pay_arr [ 6 ][ "pay_period" ] == "30" ) echo " selected" ; ?> > 30天</ option >
< option value = "60" <?php if ( isset ( $pay_arr [ 6 ][ "pay_period" ]) && $pay_arr [ 6 ][ "pay_period" ] == "60" ) echo " selected" ; ?> > 60天</ option >
< option value = "60" <?php if ( isset ( $pay_arr [ 6 ][ "pay_period" ]) && $pay_arr [ 6 ][ "pay_period" ] == "60" ) echo " selected" ; ?> > 60天</ option >
< option value = "90" <?php if ( isset ( $pay_arr [ 6 ][ "pay_period" ]) && $pay_arr [ 6 ][ "pay_period" ] == "90" ) echo " selected" ; ?> > 90天</ option >
< option value = "90" <?php if ( isset ( $pay_arr [ 6 ][ "pay_period" ]) && $pay_arr [ 6 ][ "pay_period" ] == "90" ) echo " selected" ; ?> > 90天</ option >
< option value = "120" <?php if ( isset ( $pay_arr [ 6 ][ "pay_period" ]) && $pay_arr [ 6 ][ "pay_period" ] == "120" ) echo " selected" ; ?> > 120天</ option >
< option value = "120" <?php if ( isset ( $pay_arr [ 6 ][ "pay_period" ]) && $pay_arr [ 6 ][ "pay_period" ] == "120" ) echo " selected" ; ?> > 120天</ option >
< option value = "180" <?php if ( isset ( $pay_arr [ 6 ][ "pay_period" ]) && $pay_arr [ 6 ][ "pay_period" ] == "180" ) echo " selected" ; ?> > 180天</ option >
< option value = "180" <?php if ( isset ( $pay_arr [ 6 ][ "pay_period" ]) && $pay_arr [ 6 ][ "pay_period" ] == "180" ) echo " selected" ; ?> > 180天</ option >
< option value = "other" <?php if ( isset ( $pay_arr [ 6 ][ "pay_period" ]) && $pay_arr [ 6 ][ "pay_period" ] == "other" ) echo " selected" ; ?> > 其它</ option >
< option value = "other" <?php if ( isset ( $pay_arr [ 6 ][ "pay_period" ]) && $pay_arr [ 6 ][ "pay_period" ] == "other" ) echo " selected" ; ?> > 其它</ option >
< / select >
< / select >
< / td >
< / td >
< / tr >
< / tr >
@ -866,13 +887,13 @@ hr {
< td >
< td >
< select name = "pay_period" class = "form-control" >
< select name = "pay_period" class = "form-control" >
< option value = "" > < / option >
< option value = "" > < / option >
< option value = "7" <?php if ( isset ( $pay_arr [ 7 ][ "pay_period" ]) && $pay_arr [ 7 ][ "pay_period" ] == "7" ) echo " selected" ; ?> > 7天</ option >
< option value = "7" <?php if ( isset ( $pay_arr [ 7 ][ "pay_period" ]) && $pay_arr [ 7 ][ "pay_period" ] == "7" ) echo " selected" ; ?> > 7天</ option >
< option value = "30" <?php if ( isset ( $pay_arr [ 7 ][ "pay_period" ]) && $pay_arr [ 7 ][ "pay_period" ] == "30" ) echo " selected" ; ?> > 30天</ option >
< option value = "30" <?php if ( isset ( $pay_arr [ 7 ][ "pay_period" ]) && $pay_arr [ 7 ][ "pay_period" ] == "30" ) echo " selected" ; ?> > 30天</ option >
< option value = "60" <?php if ( isset ( $pay_arr [ 7 ][ "pay_period" ]) && $pay_arr [ 7 ][ "pay_period" ] == "60" ) echo " selected" ; ?> > 60天</ option >
< option value = "60" <?php if ( isset ( $pay_arr [ 7 ][ "pay_period" ]) && $pay_arr [ 7 ][ "pay_period" ] == "60" ) echo " selected" ; ?> > 60天</ option >
< option value = "90" <?php if ( isset ( $pay_arr [ 7 ][ "pay_period" ]) && $pay_arr [ 7 ][ "pay_period" ] == "90" ) echo " selected" ; ?> > 90天</ option >
< option value = "90" <?php if ( isset ( $pay_arr [ 7 ][ "pay_period" ]) && $pay_arr [ 7 ][ "pay_period" ] == "90" ) echo " selected" ; ?> > 90天</ option >
< option value = "120" <?php if ( isset ( $pay_arr [ 7 ][ "pay_period" ]) && $pay_arr [ 7 ][ "pay_period" ] == "120" ) echo " selected" ; ?> > 120天</ option >
< option value = "120" <?php if ( isset ( $pay_arr [ 7 ][ "pay_period" ]) && $pay_arr [ 7 ][ "pay_period" ] == "120" ) echo " selected" ; ?> > 120天</ option >
< option value = "180" <?php if ( isset ( $pay_arr [ 7 ][ "pay_period" ]) && $pay_arr [ 7 ][ "pay_period" ] == "180" ) echo " selected" ; ?> > 180天</ option >
< option value = "180" <?php if ( isset ( $pay_arr [ 7 ][ "pay_period" ]) && $pay_arr [ 7 ][ "pay_period" ] == "180" ) echo " selected" ; ?> > 180天</ option >
< option value = "other" <?php if ( isset ( $pay_arr [ 7 ][ "pay_period" ]) && $pay_arr [ 7 ][ "pay_period" ] == "other" ) echo " selected" ; ?> > 其它</ option >
< option value = "other" <?php if ( isset ( $pay_arr [ 7 ][ "pay_period" ]) && $pay_arr [ 7 ][ "pay_period" ] == "other" ) echo " selected" ; ?> > 其它</ option >
< / select >
< / select >
< / td >
< / td >
< / tr >
< / tr >
@ -893,43 +914,43 @@ hr {
< div class = "nextline" > < / div >
< div class = "nextline" > < / div >
< div >
< div >
< label for = "contractno" > 卷號< / label >
< label for = "contractno" > 卷號< / label >
< input type = "text" name = "contractno" id = "contractno" maxlength = "7" value = " <? = $data [ "contractno" ]; ?> " >
< input type = "text" name = "contractno" id = "contractno" maxlength = "7" value = " <? = $data [ "contractno" ]; ?> " >
< / div >
< / div >
< div >
< div >
< label for = "person" > 營業員< / label >
< label for = "person" > 營業員< / label >
< input type = "text" name = "person" id = "person" value = " <? = accountid2name ( $data [ "person" ])[ $data [ "person" ]]; ?> " >
< input type = "text" name = "person" id = "person" value = " <? = accountid2name ( $data [ "person" ])[ $data [ "person" ]]; ?> " >
< / div >
< / div >
< div >
< div >
< label for = "company" > 客戶名稱< / label >
< label for = "company" > 客戶名稱< / label >
< input type = "text" name = "company" id = "company" value = " <? = $data [ "company" ]; ?> " >
< input type = "text" name = "company" id = "company" value = " <? = $data [ "company" ]; ?> " >
< / div >
< / div >
< div >
< div >
< label for = "case_name" > 案件名稱< / label >
< label for = "case_name" > 案件名稱< / label >
< input type = "text" name = "case_name" id = "case_name" value = " <? = $data [ "case_name" ]; ?> " >
< input type = "text" name = "case_name" id = "case_name" value = " <? = $data [ "case_name" ]; ?> " >
< / div >
< / div >
< div >
< div >
< label for = "address" > 地址< / label >
< label for = "address" > 地址< / label >
< input type = "text" name = "address" id = "address" value = " <? = $data [ "address" ]; ?> " size = "46" >
< input type = "text" name = "address" id = "address" value = " <? = $data [ "address" ]; ?> " size = "46" >
< / div >
< / div >
< div >
< div >
< label for = "price_lowest" > 牌價總額(A)< / label >
< label for = "price_lowest" > 牌價總額(A)< / label >
< input type = "text" name = "price_lowest" id = "price_lowest" class = "dollar-right" value = " <? = number_format ( $data [ "price_lowest" ]); ?> " >
< input type = "text" name = "price_lowest" id = "price_lowest" class = "dollar-right" value = " <? = number_format ( $data [ "price_lowest" ]); ?> " >
< / div >
< / div >
< div >
< div >
< label for = "price_total" > 售價總額(B)< / label >
< label for = "price_total" > 售價總額(B)< / label >
< input type = "text" name = "price_total" id = "price_total" class = "dollar-right" value = " <? = number_format ( $data [ "price_total" ]); ?> " >
< input type = "text" name = "price_total" id = "price_total" class = "dollar-right" value = " <? = number_format ( $data [ "price_total" ]); ?> " >
< / div >
< / div >
< div >
< div >
< label for = "price_total_broken" > 破價總額(B-A)< / label >
< label for = "price_total_broken" > 破價總額(B-A)< / label >
< input type = "text" name = "price_total_broken" id = "price_total_broken" class = "dollar-right" value = " <? = number_format ( $data [ "price_total_broken" ]); ?> " >
< input type = "text" name = "price_total_broken" id = "price_total_broken" class = "dollar-right" value = " <? = number_format ( $data [ "price_total_broken" ]); ?> " >
< / div >
< / div >
< div >
< div >
< label for = "price_rate" > 價率%(B/A)< / label >
< label for = "price_rate" > 價率%(B/A)< / label >
< input type = "text" name = "price_rate" id = "price_rate" value = " <? = number_format ( $data [ "price_rate" ], 1 ); ?> " >
< input type = "text" name = "price_rate" id = "price_rate" value = " <? = number_format ( $data [ "price_rate" ], 1 ); ?> " >
< / div >
< / div >
< div >
< div >
< label for = "qty_total" > 總台數< / label >
< label for = "qty_total" > 總台數< / label >
< input type = "text" name = "qty_total" id = "qty_total" value = " <? = number_format ( $data [ "qty_total" ]); ?> " >
< input type = "text" name = "qty_total" id = "qty_total" value = " <? = number_format ( $data [ "qty_total" ]); ?> " >
< / div >
< / div >
< div >
< div >
< label for = "special_fee" > 特殊費用< / label >
< label for = "special_fee" > 特殊費用< / label >
@ -937,32 +958,32 @@ hr {
< / div >
< / div >
< div >
< div >
< label for = "price_broken" > 破價(台)< / label >
< label for = "price_broken" > 破價(台)< / label >
< input type = "text" name = "price_broken" id = "price_broken" class = "dollar-right" value = " <? = number_format ( $data [ "price_broken" ]); ?> " >
< input type = "text" name = "price_broken" id = "price_broken" class = "dollar-right" value = " <? = number_format ( $data [ "price_broken" ]); ?> " >
< / div >
< / div >
< div >
< div >
< label for = "predeal_date" > 預定成交日< / label > < br >
< label for = "predeal_date" > 預定成交日< / label > < br >
< input type = "date" name = "predeal_date" id = "predeal_date" value = " <? = $data [ "predeal_date" ]; ?> " >
< input type = "date" name = "predeal_date" id = "predeal_date" value = " <? = $data [ "predeal_date" ]; ?> " >
< / div >
< / div >
< div >
< div >
< label for = "facilitok_date" > 預定出貨日< / label > < br >
< label for = "facilitok_date" > 預定出貨日< / label > < br >
< input type = "date" name = "facilitok_date" id = "facilitok_date" value = " <? = $data [ "facilitok_date" ]; ?> " >
< input type = "date" name = "facilitok_date" id = "facilitok_date" value = " <? = $data [ "facilitok_date" ]; ?> " >
< / div >
< / div >
< div class = "nextline" > < / div >
< div class = "nextline" > < / div >
< div >
< div >
< label for = "penalty" > 罰則< / label >
< label for = "penalty" > 罰則< / label >
< input type = "text" name = "penalty" id = "penalty" value = " <? = $data [ "penalty" ]; ?> " >
< input type = "text" name = "penalty" id = "penalty" value = " <? = $data [ "penalty" ]; ?> " >
< / div >
< / div >
< div >
< div >
< label for = "deposit_rate" > 訂金保證金(函)%< / label >
< label for = "deposit_rate" > 訂金保證金(函)%< / label >
< input type = "text" name = "deposit_rate" id = "deposit_rate" value = " <? = $data [ "deposit_rate" ]; ?> " >
< input type = "text" name = "deposit_rate" id = "deposit_rate" value = " <? = $data [ "deposit_rate" ]; ?> " >
< / div >
< / div >
< div >
< div >
< label for = "keep_rate" > 履約保證金(函)%< / label >
< label for = "keep_rate" > 履約保證金(函)%< / label >
< input type = "text" name = "keep_rate" id = "keep_rate" value = " <? = $data [ "keep_rate" ]; ?> " >
< input type = "text" name = "keep_rate" id = "keep_rate" value = " <? = $data [ "keep_rate" ]; ?> " >
< / div >
< / div >
< div >
< div >
< label for = "warranty_rate" > 保固保證金(函)%< / label >
< label for = "warranty_rate" > 保固保證金(函)%< / label >
< input type = "text" name = "warranty_rate" id = "warranty_rate" value = " <? = $data [ "warranty_rate" ]; ?> " >
< input type = "text" name = "warranty_rate" id = "warranty_rate" value = " <? = $data [ "warranty_rate" ]; ?> " >
< / div >
< / div >
< div class = "table-responsive" style = "width:100%;margin-top:10px;" >
< div class = "table-responsive" style = "width:100%;margin-top:10px;" >
< table class = "table" >
< table class = "table" >
@ -973,7 +994,7 @@ hr {
< / thead >
< / thead >
< tbody >
< tbody >
< tr >
< tr >
< td >< textarea name = "memo" id = "memo" rows = "6" cols = "100" class = "form-control" > <? = $data [ "memo" ]; ?> </ textarea ></ td >
< td >< textarea name = "memo" id = "memo" rows = "6" cols = "100" class = "form-control" > <? = $data [ "memo" ]; ?> </ textarea ></ td >
< / tr >
< / tr >
< / tbody >
< / tbody >
< / table >
< / table >
@ -1007,7 +1028,7 @@ hr {
} else {
} else {
$person2_name_str = "";
$person2_name_str = "";
foreach ($person2_arr as $pv) {
foreach ($person2_arr as $pv) {
$person2_name_str .= $accountname_arr[$pv]."/";
$person2_name_str .= $accountname_arr[$pv] . "/";
}
}
echo rtrim($person2_name_str, "/");
echo rtrim($person2_name_str, "/");
}
}
@ -1021,14 +1042,14 @@ hr {
< td >
< td >
<?php
<?php
require_once('./conn.php');
require_once('./conn.php');
if(!empty($accountname_arr[$person3])){
if (!empty($accountname_arr[$person3])) {
$sql_str = "SELECT account.accountid, account.department_id, account.role_id,department.* FROM account JOIN department ON account.department_id = department.department_id AND account.role_id = department.role_id WHERE account.name = :name";
$sql_str = "SELECT account.accountid, account.department_id, account.role_id,department.* FROM account JOIN department ON account.department_id = department.department_id AND account.role_id = department.role_id WHERE account.name = :name";
$stmt = $conn->prepare($sql_str);
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':name',$accountname_arr[$person3]);
$stmt->bindParam(':name', $accountname_arr[$person3]);
$stmt->execute();
$stmt->execute();
$user = $stmt->fetch(PDO::FETCH_ASSOC);
$user = $stmt->fetch(PDO::FETCH_ASSOC);
echo $user['role'];
echo $user['role'];
}else{
} else {
echo "業務部協理";
echo "業務部協理";
}
}
@ -1059,24 +1080,24 @@ hr {
< tbody >
< tbody >
< tr >
< tr >
< td > < textarea name = "sign_note" id = "sign_note" rows = "6" cols = "60" class = "form-control" > < / textarea > < / td >
< td > < textarea name = "sign_note" id = "sign_note" rows = "6" cols = "60" class = "form-control" > < / textarea > < / td >
< td >< input type = "text" name = "final_price_total" id = "final_price_total" class = "dollar-right" <?php if ( $user_id != "M0006" ) {
< td >< input type = "text" name = "final_price_total" id = "final_price_total" class = "dollar-right" <?php if ( $user_id != "M0006" ) {
echo " readonly";
echo " readonly";
} ?>>< / td >
} ?>>< / td >
< / tr >
< / tr >
< / tbody >
< / tbody >
< / table >
< / table >
< label > 審核人員< / label >
< label > 審核人員< / label >
< input type = "text" name = "checker" id = "checker" value = " <? = $user_id ; ?> " readonly >
< input type = "text" name = "checker" id = "checker" value = " <? = $user_id ; ?> " readonly >
< button type = "submit" name = "status" id = "status_n" value = "N" onclick = "if (!confirm('確定不同意?')) return false;" > <?php echo ( $sign_total == $st ) ? "結案(不同意)" : "不同意" ; ?> </ button >
< button type = "submit" name = "status" id = "status_n" value = "N" onclick = "if (!confirm('確定不同意?')) return false;" > <?php echo ( $sign_total == $st ) ? "結案(不同意)" : "不同意" ; ?> </ button >
< button type = "submit" name = "status" id = "status_y" value = "Y" onclick = "if (!confirm('確定同意?')) return false;" > <?php echo ( $sign_total == $st ) ? "結案(同意)" : "同意" ; ?> </ button >
< button type = "submit" name = "status" id = "status_y" value = "Y" onclick = "if (!confirm('確定同意?')) return false;" > <?php echo ( $sign_total == $st ) ? "結案(同意)" : "同意" ; ?> </ button >
<?php } else { ?>
<?php } else { ?>
< button type = "button" id = "btn_close" class = "btn btn-default" > 回上頁< / button >
< button type = "button" id = "btn_close" class = "btn btn-default" > 回上頁< / button >
<?php } ?>
<?php } ?>
<?php
<?php
if (empty($data["attatch1"])) $price_dn_str = "alert('無檔案!');";
if (empty($data["attatch1"])) $price_dn_str = "alert('無檔案!');";
else $price_dn_str = "window.open('".$data["attatch1"]."');";
else $price_dn_str = "window.open('" . $data["attatch1"] . "');";
if (empty($data["attatch2"])) $appendix_dn_str = "alert('無檔案!');";
if (empty($data["attatch2"])) $appendix_dn_str = "alert('無檔案!');";
else $appendix_dn_str = "window.open('".$data["attatch2"]."');";
else $appendix_dn_str = "window.open('" . $data["attatch2"] . "');";
?>
?>
< button type = "button" name = "btndownload" onclick = " <?php echo $price_dn_str ; ?> " > 下載報價單</ button >
< button type = "button" name = "btndownload" onclick = " <?php echo $price_dn_str ; ?> " > 下載報價單</ button >
< button type = "button" name = "btndownload" onclick = " <?php echo $appendix_dn_str ; ?> " > 下載附表一</ button >
< button type = "button" name = "btndownload" onclick = " <?php echo $appendix_dn_str ; ?> " > 下載附表一</ button >
@ -1089,10 +1110,10 @@ hr {
< input type = "hidden" name = "gross_profit_rate_all" id = "gross_profit_rate_all" >
< input type = "hidden" name = "gross_profit_rate_all" id = "gross_profit_rate_all" >
< input type = "hidden" name = "note_all" id = "note_all" >
< input type = "hidden" name = "note_all" id = "note_all" >
< input type = "hidden" name = "mi_fix_all" id = "mi_fix_all" >
< input type = "hidden" name = "mi_fix_all" id = "mi_fix_all" >
< input type = "hidden" name = "contractno_h" id = "contractno_h" value = " <?php echo $data [ "contractno" ]; ?> " >
< input type = "hidden" name = "contractno_h" id = "contractno_h" value = " <?php echo $data [ "contractno" ]; ?> " >
< input type = "hidden" name = "token" value = " <?php echo $token ; ?> " >
< input type = "hidden" name = "token" value = " <?php echo $token ; ?> " >
< / form >
< / form >
< / div >
< / div >
<?php
<?php
}
}
mysqli_free_result($res);
mysqli_free_result($res);