You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
168 lines
5.1 KiB
168 lines
5.1 KiB
<?php
|
|
error_reporting(E_ALL);
|
|
ini_set("display_errors", "on");
|
|
/**
|
|
* 显示所有的待签 员工所有待签
|
|
*/
|
|
|
|
|
|
// 載入db.php來連結資料庫
|
|
require_once "../database.php";
|
|
require_once "../header.php";
|
|
|
|
|
|
|
|
$system_id = $_SERVER['REQUEST_METHOD'] == 'GET' ? @$_GET['system_id'] : @$_POST['system_id'];
|
|
$where_system_id = " and a.system_id like '" . $system_id . "%'";
|
|
|
|
$flow_id = $_SERVER['REQUEST_METHOD'] == 'GET' ? @$_GET['flow_id'] : @$_POST['flow_id'];
|
|
$where_flow_id = " and b.flow_id like '" . $flow_id . "%'";
|
|
|
|
$sql_get = "select c.form_key, a.system_id,b.flow_id ,a.system_name,c.current_assigner,
|
|
concat(c.current_assigner ,'-',f_return_name(c.current_assigner)) current_assigner_name ,
|
|
flow_name,c.update_date ,c.create_date from system_main a,flow_main b ,subflow c,flow d
|
|
where a.system_id=b.system_id
|
|
and b.flow_id=d.flow_id
|
|
and d.flow_id=b.flow_id
|
|
and c.form_key=d.form_key
|
|
$where_system_id
|
|
$where_flow_id
|
|
";
|
|
//echo $sql_get;
|
|
$res_get = mysqli_fetch_all(mysqli_query($link, $sql_get), MYSQLI_ASSOC);
|
|
|
|
$system_name_opt = array_map(function ($item) {
|
|
return array('system_id' => $item['system_id'], 'system_name' => $item['system_name']);
|
|
}, $res_get);
|
|
$system_name_opt = (array_unique($system_name_opt, SORT_REGULAR));
|
|
|
|
|
|
$flow_name_opt = array_map(function ($item) {
|
|
return array('flow_id' => $item['flow_id'], 'flow_name' => $item['flow_name']);
|
|
}, $res_get);
|
|
$flow_name_opt = (array_unique($flow_name_opt, SORT_REGULAR));
|
|
|
|
?>
|
|
<style>
|
|
table {
|
|
table-layout: fixed;
|
|
width: 90%;
|
|
}
|
|
|
|
td {
|
|
word-wrap: break-word;
|
|
}
|
|
|
|
img {
|
|
width: 125px;
|
|
}
|
|
|
|
.width_style_1 {
|
|
width: 125px;
|
|
}
|
|
|
|
.table>tbody>tr>td,
|
|
.table>tbody>tr>th,
|
|
.table>tfoot>tr>td,
|
|
.table>tfoot>tr>th,
|
|
.table>thead>tr>td,
|
|
.table>thead>tr>th {
|
|
vertical-align: middle !important;
|
|
}
|
|
|
|
#table_index_filter {
|
|
float: right;
|
|
}
|
|
|
|
#table_index_paginate {
|
|
float: right;
|
|
}
|
|
|
|
|
|
table.query-table th {
|
|
text-align: right;
|
|
}
|
|
</style>
|
|
<form method='post' action='#'>
|
|
<table class='table query-table table-striped table-bordered display compact' style='width:90%;text-align:center;margin:0 auto'>
|
|
<thead>
|
|
<tr>
|
|
<td colspan="8">
|
|
<h3 style='text-align:center'>待签查询</h3>
|
|
</td>
|
|
</tr>
|
|
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<th style='width:50px'>系统名称</th>
|
|
<td colspan='1'>
|
|
<select class='form-control' name='system_id'>
|
|
<?php
|
|
echo " <option class='form-control' value='%' >全部</option>";
|
|
foreach ($system_name_opt as $opt) {
|
|
echo " <option class='form-control' value=" . $opt['system_id'] . " >" . $opt['system_name'] . "</option>";
|
|
}
|
|
?>
|
|
</select>
|
|
</td>
|
|
<th>流程名称</th>
|
|
<td colspan='1'> <select class='form-control' name='flow_id'>
|
|
<?php
|
|
echo " <option class='form-control' value='%' >全部</option>";
|
|
foreach ($flow_name_opt as $opt) {
|
|
echo " <option class='form-control' value=" . $opt['flow_id'] . " >" . $opt['flow_name'] . "</option>";
|
|
}
|
|
?>
|
|
</select> </td>
|
|
|
|
</tr>
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="8" style='text-align:center'>
|
|
<button type="submit" style='text-align:center; margin:0 auto;width:50px' class="btn btn-primary">查询</button>
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
<div style="overflow-x:auto;width:92%;margin:0 auto">
|
|
<table id="table_index" style='width:100%;margin:0 auto' class="table table-striped table-bordered display compact">
|
|
<thead>
|
|
<tr>
|
|
<th>序号</th>
|
|
<th>系统名称</th>
|
|
<th>流程名称</th>
|
|
<th>接收日期</th>
|
|
<th>当前签核者</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<?php
|
|
$rowspan = 1;
|
|
foreach ($res_get as $key => $data) :
|
|
?>
|
|
<tr>
|
|
<td><a href="sign_form.php?form_key=<?= $data['form_key']; ?>"><?= $data['form_key']; ?></a></td>
|
|
<td><?php echo $data['system_name']; ?></td>
|
|
<td><?php echo $data['flow_name']; ?></td>
|
|
<td><?php echo $data['update_date']; ?></td>
|
|
<td><?php echo $data['current_assigner_name']; ?></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</form>
|
|
<?php
|
|
#代錶結束連線
|
|
mysqli_close($link);
|
|
require_once "../footer.php";
|
|
|
|
|
|
?>
|