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.
 
 
 
 
 
 

601 lines
28 KiB

<?php
error_reporting(E_ALL);
ini_set("display_errors", "On");
require_once './wf_common.php';
$form_key = $_GET['form_key'];
$flow = new Flow($form_key);
$wf = new WorkFlow($flow->system_id, $flow->flow_id, 'form_id', $form_key);
#获取签核意见
$assign_opinions = Assign::get_records($form_key);
#会签部门意见
$subflow_assign_opinions = SubflowManager::getCounterSignComments($form_key);
$flowName = $wf->getFlowName();
$assigner = $wf->getAssignerList();
$assign_status = $wf->getAssignStatus($assigner);
$if_show_assign = true;
//加载流程图
$fc = WorkFLowItems::get_records($flow->getSystemID(), $flow->getFlowID());
#是否可会签
$isSplitable = $wf->isSplitable();
function base_url($url)
{
return "https://www.masada.com.tw/fds/" . $url;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title> <?php echo $flowName; ?></title>
<link rel="stylesheet" type="text/css" href="<?php echo base_url('css/jquery.cleditor.css'); ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url('js/bootstrap/css/bootstrap.min.css'); ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url('css/selectpage.bootstrap3.css'); ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url('css/designflow.css'); ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url('css/style.css'); ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url('css/zTreeStyle.css?') . rand(10, 100);; ?>" />
<script type="text/javascript" src="<?php echo base_url('js/jquery-1.7.2.min.js'); ?>"></script>
<script type="text/javascript" src="<?php echo base_url('js/jquery-1.7.2.min.js'); ?>"></script>
<script type="text/javascript" src="<?php echo base_url('js/jquery-ui-1.9.2-min.js'); ?>"></script>
<script type="text/javascript" src="<?php echo base_url('js/jquery.jsPlumb-1.3.16-all-min.js'); ?>"></script>
<script type="text/javascript" src="<?php echo base_url('js/selectpage.min.js'); ?>"></script>
<script type="text/javascript" src="<?php echo base_url('js/jquery.cleditor.min.js'); ?>"></script>
<script type="text/javascript" src="<?php echo base_url('js/jquery.ztree.core.js'); ?>"></script>
<script type="text/javascript" src="<?php echo base_url('js/ztree_toc.js'); ?>"></script>
<script type="text/javascript" src="<?php echo base_url('js/bootstrap/js/bootstrap.min.js'); ?>"></script>
<script type="text/javascript" src="<?php echo base_url('js/wf_property.js?') . rand(10, 100); ?>"></script>
<script type="text/javascript" src="<?php echo base_url('js/flow_chart.js?' . rand(10, 100)); ?>"></script>
<script type="text/javascript">
$(document).ready(function() {
var tag_data;
$.ajax({
url: 'https://www.masada.com.tw/fds/index.php/DesignFlow/get_assigner',
type: 'post',
dataType: 'json',
success: function(data) {
window.tag_data = data;
$('#selectPage').selectPage({
showField: 'show_name',
keyField: 'val',
data: data,
multiple: true,
multipleControlbar: true,
pagination: false,
focusDropList: false
});
}
});
$(document).ready(function() {
$('#helper_tree').ztree_toc({
ztreeStyle: {
width: '260px',
overflow: 'hidden',
position: 'relative',
'z-index': 2147483647,
border: '0px none',
left: '0px',
}
});
});
var assigner = eval('<?= json_encode($assigner) ?>');
$('.sp_element_box').attr("disabled", true);
$("#assign_opinion").cleditor({
height: 100, // height not including margins, borders or padding
controls: // controls to add to the toolbar
"bold italic underline strikethrough subscript superscript | font size " +
"style | color highlight removeformat | bullets numbering | outdent " +
"indent | alignleft center alignright justify | undo redo | "
});
$('#assign_status').change(function() {
$("#next_users").empty();
var _selected_status = $(this).children('option:selected').val(); //获取被选择的状态
var _option_tmp = ""; //获取下拉列表
for (a in assigner) { //遍历assigner
if (assigner[a][0] == _selected_status) {
_tmp = assigner[a][1].split(',');
for (var b in _tmp) {
if (_tmp[b] == '') {
continue;
}
_uname = _tmp[b].split('-')[1];
_uid = _tmp[b].split('-')[0];
/* console.log(_tmp[b]);*/
_option_tmp += '<option value=' + _uid + '>' + _tmp[b] + '</option>';
}
}
}
$("#next_users").append(_option_tmp);
});
});
</script>
</head>
<body>
<div id="toolbarmenu">
<span id="objName" style="font-size:16px;margin-bottom:0px;margin-top:1px">流程:<?php echo $flowName; ?></span>
<!-- 导航栏 -->
<div style="float:right;position:relative;bottom:-30px;margin-right:10px ">
<a href="#">打印表单</a>
</div>
<ul class="nav nav-tabs" role="tablist" id="tablist">
<li role="presentation" class="active">
<a href="#tabassign" aria-controls="tabassign" role="tab" data-toggle="tab">签核表单</a>
</li>
<li role="presentation" id="li_tabflow">
<a href="#tabflow" aria-controls="tabflow" role="tab" data-toggle="tab">签核流程</a>
</li>
<li role="presentation" style="visibility: hidden">
<a href="#helper" aria-controls="helper" role="tab" data-toggle="tab">帮助资源</a>
</li>
</ul>
</div>
<!-- 导航栏 END-->
<div class="tab-content">
<div class="tab-pane active" class="assign_content" role="mainpanel" id="tabassign">
<form action="submit.php" method="post">
<!-- hidden域 -->
<input type="hidden" name="form_key" value='<?php echo $form_key; ?>' />
<input type="hidden" value="" name="sheet_no" />
<!-- 表单基本信息 每个TR包含12个TD-->
<style>
.form-content-table {
margin: auto;
width: 1000px;
font-family: '微软雅黑';
font-size: 14px;
color: #333333;
border: 1px grey;
border-collapse: collapse;
table-layout: fixed;
}
.form-content-table thead {
width: 100%;
}
.form-content-table tbody td {
padding: 5px;
border: 1px solid;
background-color: #ffffff;
}
.form-content-table th,
.form-content-table thead th {
padding: 5px;
border: 1px solid;
background-color: #6d9eeb;
text-align: center;
font-size: 14px;
}
.form-content-table tbody th {
background-color: rgb(204, 228, 248);
font-size: 12px;
}
.form-content-table tr.no-border td,
tr.no-border th {
background-color: #ffffff;
border-width: 0px;
padding: 0 0 0 0;
margin-bottom: 0px;
}
.form-content-table tbody th {
width: 1000px;
}
#basic_info tbody th {
height: 25px;
}
</style>
<table id='basic_info' class="form-content-table">
<thead>
<tr class="no-border">
<th colspan="12">
<h4> 測試表單</h4>
</th>
</tr>
<tr class="no-border">
<th colspan="12">
<span style="float: left"><b> 表單流水號:</b><?php echo $form_key ?></span>
<span style="float: right">
<b>申请日期:</b> <?php echo date('Y-m-d', time()); ?>
</span>
</th>
</tr>
<tr>
<th colspan="12">基本信息</th>
</tr>
</thead>
<tbody>
<tr>
<th> 申請單號</th>
<td colspan="3"><?php echo $form_key ?></td>
<th> 申請人</th>
<td colspan="3"></td>
<th> 部門</th>
<td colspan="3"></td>
</tr>
<tr>
<th>請假開始日期</th>
<td colspan="3"></td>
<th> 請假結束日期</th>
<td colspan="3"></td>
<th>請假時數</th>
<td colspan="3"></td>
</tr>
</tbody>
</table>
<?php if (false) { ?>
<!-- 表单附件区 每个TR包含12个TD -->
<table id="file_area" class="form-content-table">
<thead>
<tr>
<th colspan="12">
<b>表单附件 </b>
</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="12"><input type="file">
<button>上传</button>
</td>
</tr>
<tr style="text-align:center;">
<td colspan="12">
<div style="float: left"><a href="">附件1.jpg</a></div>
</td>
</tr>
</tbody>
</table>
<? } ?>
<!-- 签核区 每个TR包含12个TD -->
<table id="assign_area" class="form-content-table ">
<thead>
<tr>
<th colspan="12"><b>簽核操作 </b></th>
</tr>
</thead>
<tbody>
<tr>
<th> 签核意见</th>
<td colspan="11" style="padding:0px">
<textarea id="assign_opinion" name="assign_opinion"> </textarea>
</td>
</tr>
<?php if ($isSplitable) {
echo '<tr>
<th> 会签人员:</th>
<td colspan="11">
<input type="text" id="selectPage" name="split_members" style="width:100%"/>
</td>
</tr>';
} ?>
<?php
if (!empty($subflowMembers)) {
echo '<tr>
<td class="td_title"> 签核接收人员:</td>
<td class="cont" colspan="11">';
echo implode(" ", $subflowMembers);
echo "</td></tr>";
}
?>
<tr>
<th> 簽核狀態</th>
<td colspan="2">
<select name="assign_status" id="assign_status">
<?php echo $assign_status; ?>
</select>
</td>
<th class="td_title" colspan="2"> 下位簽核者</th>
<td colspan="7">
<select name="next_users" id="next_users">
</select>
<input type="submit" value="提交" style="" />
</td>
</tr>
</tbody>
</table>
<!-- 签核意见区 每个TR包含12个TD,开始节点不显示 -->
<?php if ($if_show_assign) { ?>
<div id="opinion_area" class="form-content-table" style='margin-top:10px'>
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active">
<a href="#main_flow_assign" aria-controls="main_flow_assign" role="tab" data-toggle="tab">簽核意見</a>
</li>
<li role="presentation">
<a href="#subflow_assign" aria-controls="subflow_assign" role="tab" data-toggle="tab">会签单位意见</a>
</li>
</ul>
<div class="tab-content" style="margin-top:0;">
<!--签核意见 开始!-->
<div role="tabpanel" style="" class="tab-pane active" id="main_flow_assign">
<style>
.comment-items .comment-item .comment-title {
width: 100%;
background-color: #6d9eeb;
margin-top: 20px;
text-align: center;
font-family: "Microsoft YaHei UI";
font-size: 15px;
margin-bottom: 5px;
height: 20px;
}
.comment-item {
padding: 0;
margin-bottom: 2px;
}
.comment-title b {
text-align: center;
}
.comment-content-body p {
font-family: "Microsoft YaHei UI";
font-size: small;
margin: 0;
word-wrap: break-word;
word-break: break-all;
overflow: hidden;
}
.comment-content-header {
width: 100%;
padding-left: 0px;
padding-top: 0px;
font-size: 14px;
}
.comment-content-body {
margin: 0;
}
.comment-content {
border-bottom: grey dashed 1px;
}
.comment-odd {
background-color: white;
}
.comment-content-header-time {
font-size: 9px
}
.comment-content-tags,
.comment-content-tags li {
display: inline;
}
.comment-content-tags li {
border: grey;
background-color: #6d9eeb;
color: white;
font-size: 12px;
padding: 2px;
margin-right: 5px;
border-radius: 5px;
}
.comment-content-tag {
display: inline;
border: grey;
background-color: #6d9eeb;
color: white;
font-size: 12px;
padding: 2px;
margin-right: 5px;
border-radius: 5px;
}
li.comment-content-tag-alert {
background-color: red;
border-radius: 5px;
}
.red-tag {
color: yellow;
background: red;
}
.blue-tag {
color: white;
background: blue;
}
</style>
<div class="comment-items">
<?php $cnt = 1;
$tmp_code = "0";
foreach ($assign_opinions as $as) { ?>
<div class="comment-item">
<!-- <div class="comment-title">
<b>大 </b>
</div>-->
<?php
if (($as['flow_code']) != $tmp_code)
echo ' <div class="comment-title">
<b>' . $wf->getNodeDescriptions($as['flow_code']) . '</b>
</div>';
$tmp_code = $as['flow_code'];
?>
<div class="comment-content <?php if ($cnt++ % 2 == 0) echo "comment-odd" ?>">
<div class="comment-content-header">
<span>
<strong>
<?php echo Employee::get_employee($as['assigner'], 'name-employee_no') ?>
&nbsp;
<?php if ($as['lead_code'] < 90) echo
" <label class='comment-content-tag'>" . $as['position_name'] . " </label>"; ?>
</strong>
</span>
<span>
<strong>
&nbsp;
<?php if ($as['assign_status'] == 'S') echo
" <label class='comment-content-tag'>申请人 </label>"; ?>
<?php if (substr($as['assign_status'], 0, 1) == 'B')
echo " <label class='comment-content-tag red-tag'>退回</label>"; ?>
<?php if (substr($as['assign_status'], 0, 2) == 'X3')
echo " <label class='comment-content-tag red-tag'>会签</label>"; ?>
</strong>
</span>
<span class="comment-content-header-time">
签核于:<?= $as['assign_date'] ?>
</span>
<!-- <ul class="comment-content-tags">
<li class="">不同意</li>
<li class="comment-content-tag-alert">退回</li>
</ul>-->
</div>
<div class="comment-content-body">
<p><?= $as['assign_opinion'] ?></p>
</div>
<!-- <div class="comment-content-footer">
<span>已上传附件:&nbsp;</span><a href="#">附件1</a>
</div>-->
</div>
</div>
<?php } ?>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="subflow_assign">
<div class="comment-items">
<?php $cnt = 1;
$cs_seq = "0";
foreach ($subflow_assign_opinions as $key => $as) { ?>
<div class="comment-item">
<?php
if ((++$as['cs_seq']) != $cs_seq)
echo ' <div class="comment-title">
<b>第' . $as['cs_seq'] . '次会签</b>
</div>';
$cs_seq = $as['cs_seq'];
?>
<div class="comment-content <?php if ($cnt++ % 2 == 0) echo "comment-odd" ?>">
<div class="comment-content-header">
<span>
<strong>
<?php echo Employee::get_employee($as['assigner'], 'name-employee_no') ?>
&nbsp;
<?php if ($as['lead_code'] < 90) echo
" <label class='comment-content-tag'>" . $as['position_name'] . " </label>"; ?>
</strong>
</span>
<span>
<strong>
<?php if (substr($as['assign_status'], 0, 1) == 'Y')
echo " <label class='comment-content-tag red-tag'>不同意</label>"; ?>
<?php if (substr($as['assign_status'], 0, 1) == 'F')
echo " <label class='comment-content-tag '>同意</label>"; ?>
<?php if (substr($as['assign_status'], 0, 1) == 'A')
echo " <label class='comment-content-tag '>未回复</label>"; ?>
</strong>
</span>
<span class="comment-content-header-time">
签核于:<?= $as['assign_date'] ?>
</span>
</div>
<div class="comment-content-body">
<p><?= $as['assign_opinion'] ?></p>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
<?php } ?>
<!-- 签核意见区 每个TR包含12个TD -->
</form>
</div>
<style>
#draw {
width: 100%;
overflow: scroll;
height: 1000px;
}
</style>
<div role="mainpanel" class="tab-pane" id="tabflow">
<div id='draw'></div>
</div>
<div role="mainpanel" class="tab-pane" style="padding: 0px" id="helper">
<!-- <iframe style="width:100% ; height: 600px" id='helper_frame'
frameborder="0" src="<?php /*echo site_url('TestAssign2/helper')*/ ?>" >
</iframe>
-->
</div>
</div>
</body>