@ -72,10 +72,7 @@ f_return_content('payment_kind',payment_kind ) payment_kind FROM $table
where 1=1 $where ORDER BY vol_no";
where 1=1 $where ORDER BY vol_no";
// echo $sql;
// echo $sql;
$data = mysqli_query($link, $sql);
$data = mysqli_query($link, $sql);
// echo '< pre > ';
// print_r($data);
// echo '< / pre > ';
// echo '1';
?>
?>
@ -92,11 +89,97 @@ if ($data) :
}
}
?>
?>
< link rel = "stylesheet" href = "common.css" >
<!-- <link rel="stylesheet" href="common.css"> -->
< style >
#table_index2 {
table-layout: fixed;
width: 100%;
}
#table_index2_filter {
float: right;
}
#table_index2_paginate {
float: right;
}
div.dataTables_scrollHead table.dataTable {
margin-bottom: 0 !important;
border-bottom-width: 0;
}
div.dataTables_scrollBody table.dataTable {
border-top-width: 0;
}
/*
.col-sm-12 {
width: auto;
}
*/
img {
width: 125px;
}
.width_style_1 {
width: 125px;
}
label {
display: inline-flex;
margin-bottom: .5rem;
margin-top: .5rem;
}
div a:hover {
text-decoration: none;
}
.btn-sm {
font-size: 14px;
margin: 2px 0;
line-height: 90%;
}
.glyphicon-ok,
.glyphicon-ban-circle {
font-size: 130%;
}
.btn-secondary {
color: #fff;
background-color: #6c757d;
border-color: #6c757d;
}
.btn-secondary:hover {
color: #fff;
background-color: #5a6268;
border-color: #545b62;
}
< / style >
< script >
$(function() {
$('#table_index2').DataTable({
"scrollX": true,
"pageLength": 50
});
/*
var api = $('#table_index').dataTable().api();
//var order = api.order();
//console.log(order);
api
.order([0, "desc"])
.draw();
*/
});
< / script >
< link rel = "stylesheet" href = "common.css" >
< div style = "overflow-x:auto;" >
< div style = "overflow-x:auto;" >
< form method = 'get' action = '#' >
<!-- <form method='get' action='#'> -- >
< table class = 'table query-table table-striped table-bordered display compact' style = 'width:98%;text-align:center;margin:0 auto' >
<!-- <table class='table query - table table - striped table - bordered display compact' style='width:98%;text - align:center;margin:0 auto' >
< thead >
< thead >
< tr >
< tr >
< td colspan = "8" >
< td colspan = "8" >
@ -106,47 +189,57 @@ if ($data) :
< / thead >
< / thead >
< / table >
< / table > -->
< table id = "table_index" class = "table table-striped table-bordered" style = "width:98%" >
< div style = " white-space:nowrap;" >
< table id = "table_index2" class = "table table-striped table-bordered" style = "width:100%" >
< thead >
< thead >
<?php
< tr >
echo "< tr > ";
< th > 評審單號< / th >
foreach ($editableColumn as $key => $val) {
< th > 卷號< / th >
< th > 現場地址< / th >
echo "< th > " . $val['label'] . "< / th > ";
< th > 現場名稱< / th >
}
< th > 電梯品牌< / th >
echo "< th > 是否結案< / th > ";
< th > 電梯台數< / th >
// echo "< th > 刪除< / th > ";
< th > 營業員< / th >
echo "< / tr > ";
< th > 保養方式< / th >
?>
< th > 契約期限開始< / th >
< th > 契約期限結束< / th >
< th > 契約性質< / th >
< th > 加盟公司名稱< / th >
< th > 加盟公司電話< / th >
<!-- <th>加盟公司電話</th> -->
< th > 是否結案< / th >
< th > 合約下載< / th >
< / tr >
< / thead >
< / thead >
< tbody >
< tbody >
<?php foreach ( $data as $row ) : ?>
<?php foreach ( $data as $row ) : ?>
< tr >
< tr >
<?php
< td > <?php echo $row [ 'apply_key' ] ?> </ td >
foreach ($editableColumn as $key => $val) {
< td > <?php echo $row [ 'vol_no' ] ?> </ td >
if ($key == 'apply_key') {
< td > <?php echo $row [ 'address' ] ?> </ td >
echo "< td > < a href = 'query_form.php?apply_key=$row[$key]&token=" . $_GET[' token ' ] . " ' > " . $row[$key] . "< / td > ";
< td > <?php echo $row [ 'case_name' ] ?> </ td >
} elseif ($key == 'brand') {
< td > <?php echo $row [ 'brand' ] ?> </ td >
echo "< td > " . (!empty($row[$key]) ? $elevator_brand_arr[$row[$key]] : "") . "< / td > ";
< td > <?php echo $row [ 'num' ] ?> </ td >
} else {
< td > <?php echo $row [ 'salesman' ] ?> </ td >
echo "< td > " . $row[$key] . "< / td > ";
< td > <?php echo $row [ 'maintain_kindd' ] ?> </ td >
}
< td > <?php echo $row [ 'contract_begin_date' ] ?> </ td >
}
< td > <?php echo $row [ 'contract_end_date' ] ?> </ td >
//list($signer)=DB::fields(");
< td > <?php echo $row [ 'contract_kind' ] ?> </ td >
//echo " select f_return_name(current_assigner) signer from subflow where form_key='". $row['form_key'] ."'"; ". (is_array($row['form_key'])?'': $row['form_key']) ."
< td > <?php echo $row [ 'platform_company' ] ?> </ td >
list($signer) = mysqli_fetch_array(mysqli_query($link, "select max(f_return_name(current_assigner) ) signer from subflow where form_key='" . $row['form_key'] . "'"));
< td > <?php echo $row [ 'platforom_company_tel' ] ?> </ td >
echo "< td > " . (empty($signer) ? "結案" : "N") . "< / td > ";
<?php list ( $signer ) = mysqli_fetch_array ( mysqli_query ( $link , "select max(f_return_name(current_assigner) ) signer from subflow where form_key='" . $row [ 'form_key' ] . "'" )); ?>
< td > <?php echo empty ( $signer ) ? '結案' : 'N' ?> </ td >
?>
< td >
< button > 下載< / button >
< / td >
< / tr >
< / tr >
<?php endforeach ; ?>
<?php endforeach ; ?>
< / tbody >
< / tbody >
< / table >
< / table >
< / div >
< / div >
< / div >
<?php
<?php
else :
else :