Browse Source

20231024(二)更新CODE

gary
IA2301\M0117 2 years ago
parent
commit
c157aacff5
  1. 24
      wms/wipwhole-index-table-html.php
  2. 27
      wms/wipwhole-renovate-index-table-html.php
  3. 112
      wms/wipwhole-renovate-index.php

24
wms/wipwhole-index-table-html.php

@ -1,9 +1,20 @@
<table id="table_index2" class="table table-striped table-bordered" style="width:98.5%"> <?php
$tableArr = array(
"All" => "table_index2",
"A" => "table_index3",
"B" => "table_index4",
"G" => "table_index5",
"CH" => "table_index6",
"Z" => "table_index7"
);
?>
<table id="<?php echo $tableArr[$key]; ?>" class="table table-striped table-bordered" style="width:98.5%">
<thead> <thead>
<tr> <tr>
<th style="vertical-align: middle;text-align:center;">合約號</th> <th style="vertical-align: middle;text-align:center;">合約號</th>
<th style="vertical-align: middle;text-align:center;">電梯編號</th> <th style="vertical-align: middle;text-align:center;">電梯編號</th>
<th style="vertical-align: middle;text-align:center;">客戶姓名</th> <th style="vertical-align: middle;text-align:center;">客戶姓名</th>
<th style="vertical-align: middle;text-align:center;">規格</th>
<th style="vertical-align: middle;text-align:center;">地址</th> <th style="vertical-align: middle;text-align:center;">地址</th>
<th style="vertical-align: middle;text-align:center;">工勘狀態</th> <th style="vertical-align: middle;text-align:center;">工勘狀態</th>
<th style="vertical-align: middle;text-align:center;">下單日<br />(普來特富)</th> <th style="vertical-align: middle;text-align:center;">下單日<br />(普來特富)</th>
@ -20,6 +31,16 @@
<?php <?php
foreach ($dataDetailsArr as $key => $data) : foreach ($dataDetailsArr as $key => $data) :
//規格
$Specification = $data['facility_kind'];
$Specification .= !empty($data['numberofpassenger']) ? "-" . $data['numberofpassenger'] : "";
$Specification .= !empty($data['weight']) ? "-" . $data['weight'] : "";
$Specification .= !empty($data['numberofstop']) ? "-" . $data['numberofstop'] : "";
$Specification .= !empty($data['numberoffloor']) ? "/" . $data['numberoffloor'] : "";
$Specification .= !empty($data['opentype']) ? "-" . $data['opentype'] : "";
$Specification .= !empty($data['speed']) ? $data['speed'] : "";
//工務 //工務
$data['gongwuok'] = 0; $data['gongwuok'] = 0;
// 營業 // 營業
@ -104,6 +125,7 @@
</td> </td>
<td><?php echo $data['facilityno']; ?></td> <td><?php echo $data['facilityno']; ?></td>
<td><?php echo $data['custom']; ?></td> <td><?php echo $data['custom']; ?></td>
<td><?php echo $Specification; ?></td>
<td><?php echo $data['address']; ?></td> <td><?php echo $data['address']; ?></td>
<?php <?php
foreach ($site_survey_status as $key => $val) { foreach ($site_survey_status as $key => $val) {

27
wms/wipwhole-renovate-index-table-html.php

@ -1,10 +1,21 @@
<table id="table_index2" class="table table-striped table-bordered dt-responsive nowrap" style="width:98.5%"> <?php
$tableArr = array(
"All" => "table_index2",
"A" => "table_index3",
"B" => "table_index4",
"C" => "table_index5",
"D" => "table_index6",
"Z" => "table_index7"
);
?>
<table id="<?php echo $tableArr[$key]; ?>" class="table table-striped table-bordered dt-responsive nowrap" style="width:98.5%">
<thead> <thead>
<tr> <tr>
<th style="vertical-align: middle;text-align:center;">合約號</th> <th style="vertical-align: middle;text-align:center;">合約號</th>
<th style="vertical-align: middle;text-align:center;">汰改種類</th> <th style="vertical-align: middle;text-align:center;">汰改種類</th>
<th style="vertical-align: middle;text-align:center;">電梯編號</th> <th style="vertical-align: middle;text-align:center;">電梯編號</th>
<th style="vertical-align: middle;text-align:center;">客戶姓名</th> <th style="vertical-align: middle;text-align:center;">客戶姓名</th>
<th style="vertical-align: middle;text-align:center;">規格</th>
<th style="vertical-align: middle;text-align:center;">地址</th> <th style="vertical-align: middle;text-align:center;">地址</th>
<th style="vertical-align: middle;text-align:center;">工勘狀態</th> <th style="vertical-align: middle;text-align:center;">工勘狀態</th>
<th style="vertical-align: middle;text-align:center;">下單日<br />(普來特富)</th> <th style="vertical-align: middle;text-align:center;">下單日<br />(普來特富)</th>
@ -20,6 +31,17 @@
<tbody> <tbody>
<?php <?php
foreach ($dataDetailsArr as $key => $data) : foreach ($dataDetailsArr as $key => $data) :
//規格
$Specification = $data['facility_kind'];
$Specification .= !empty($data['numberofpassenger']) ? "-" . $data['numberofpassenger'] : "";
$Specification .= !empty($data['weight']) ? "-" . $data['weight'] : "";
$Specification .= !empty($data['numberofstop']) ? "-" . $data['numberofstop'] : "";
$Specification .= !empty($data['numberoffloor']) ? "/" . $data['numberoffloor'] : "";
$Specification .= !empty($data['opentype']) ? "-" . $data['opentype'] : "";
$Specification .= !empty($data['speed']) ? $data['speed'] : "";
// 營業 // 營業
$data['yingyeok'] = 0; $data['yingyeok'] = 0;
// 設計 // 設計
@ -81,7 +103,7 @@
<tr> <tr>
<td> <td>
<?php <?php
if (in_array($department_id, [311, 312, 313, 314,315, 501, 511, 512, 513, 514, 220, 911])) { if (in_array($department_id, [311, 312, 313, 314, 315, 501, 511, 512, 513, 514, 220, 911])) {
$sql = " $sql = "
SELECT SELECT
mid, mid,
@ -110,6 +132,7 @@
</td> </td>
<td><?php echo $data['facilityno']; ?></td> <td><?php echo $data['facilityno']; ?></td>
<td><?php echo $data['custom']; ?></td> <td><?php echo $data['custom']; ?></td>
<td><?php echo $Specification; ?></td>
<td><?php echo $data['address']; ?></td> <td><?php echo $data['address']; ?></td>
<?php <?php
foreach ($site_survey_status as $key => $val) { foreach ($site_survey_status as $key => $val) {

112
wms/wipwhole-renovate-index.php

@ -319,36 +319,92 @@ mysqli_close($link);
} }
$('#table_index2,#table_index3,#table_index4,#table_index5,#table_index6,#table_index7').DataTable({ $('#table_index2,#table_index3,#table_index4,#table_index5,#table_index6,#table_index7').DataTable({
"language": { // columnDefs: [{
"emptyTable": "無資料...", // width: 100,
"processing": "處理中...", // targets: 0
"loadingRecords": "載入中...", // },{
"lengthMenu": "顯示_MENU_ 筆", // width: 100,
"zeroRecords": "沒有符合的結果", // targets: 1
"info": "第 _START_ 至 _END_ 項,共 _TOTAL_ 項", // },{
"infoEmpty": "第 0 至 0 項,共 0 項", // width: 100,
"infoFiltered": "(從 _MAX_ 項結果中過濾)", // targets: 2
"infoPostFix": "", // },{
"search": "", // width: 200,
"paginate": { // targets: 3
"first": "第一頁", // },{
"previous": "上一頁", // width: 230,
"next": "下一頁", // targets: 4
"last": "最後一頁" // },{
}, // width: 250,
"aria": { // targets: 5
"sortAscending": ": 升冪排列", // },{
"sortDescending": ": 降冪排列" // width: 100,
} // targets: 6
// }
// ,{
// width: 100,
// targets: 7
// }
// ,{
// width: 100,
// targets: 8
// }
// ,{
// width: 100,
// targets: 9
// }
// ,{
// width: 100,
// targets: 10
// }
// ,{
// width: 100,
// targets: 11
// }
// ,{
// width: 100,
// targets: 12
// }
// ,{
// width: 100,
// targets: 13
// }
// ,{
// width: 100,
// targets: 14
// }],
// fixedColumns: true,
// paging: false,
// scrollCollapse: true,
// scrollX: true,
"language": {
"emptyTable": "無資料...",
"processing": "處理中...",
"loadingRecords": "載入中...",
"lengthMenu": "顯示_MENU_ 筆",
"zeroRecords": "沒有符合的結果",
"info": "第 _START_ 至 _END_ 項,共 _TOTAL_ 項",
"infoEmpty": "第 0 至 0 項,共 0 項",
"infoFiltered": "(從 _MAX_ 項結果中過濾)",
"infoPostFix": "",
"search": "",
"paginate": {
"first": "第一頁",
"previous": "上一頁",
"next": "下一頁",
"last": "最後一頁"
},
"aria": {
"sortAscending": ": 升冪排列",
"sortDescending": ": 降冪排列"
} }
}, {
"order": [
[4, "desc"],
[8, "asc"]
]
} }
}, {
); "order": [
[4, "desc"],
[8, "asc"]
]
});
function showAllTable() { function showAllTable() {

Loading…
Cancel
Save