创建版本

This commit is contained in:
2021-02-22 12:17:00 +08:00
commit af555f49c3
2332 changed files with 369202 additions and 0 deletions
@@ -0,0 +1,37 @@
<div class="wrapper">
<form class="form-horizontal" name="myform" id="myform" method="post">
<div class="form-group">
<label class="col-sm-2 control-label">工作文号</label>
<div class="col-sm-10">
<input class="form-control input-sm" name="name" id="process_name" placeholder="编号规则" value="{{$row['title']}}({{date('Y-m-d H:i')}})" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">工作主题</label>
<div class="col-sm-10">
<input class="form-control input-sm" name="title" id="process_title" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">工作描述</label>
<div class="col-sm-10">
<textarea class="form-control input-sm" name="description" id="process_description"></textarea>
</div>
</div>
<div class="form-group m-b-none">
<label class="col-sm-2 control-label">重要等级</label>
<div class="col-sm-10">
<select class="form-control input-sm" name="level" id="process_level">
<option value="1">普通</option>
<option value="2">重要</option>
<option value="3">紧急</option>
</select>
</div>
</div>
<input type="hidden" name="work_id" value="{{$row['id']}}">
</form>
</div>
@@ -0,0 +1,34 @@
<div class="wrapper">
<form class="form-horizontal" name="nextform" id="nextform" method="post">
<div class="form-group">
<label class="col-sm-2 control-label">选择下一步</label>
<div class="col-sm-10">
@if($rows)
@foreach($rows as $row)
<div class="radio">
<label class="i-checks i-checks-sm">
<input onclick="getStep();" type="radio" name="next_step_id" value="{{$row['id']}}"><i></i> @if($row['number']>0) 第 <span class="badge bg-primary">{{$row['number']}}</span>@endif {{$row['title']}}
</label>
</div>
@endforeach
@endif
</div>
</div>
<span id="next-step-box"></span>
<input type="hidden" name="step_type" value="{{$step_type}}" />
</form>
</div>
<script type="text/javascript">
function getStep()
{
var myform = $('#myform,#nextform').serialize();
$.post('{{url("step")}}', myform,function(res) {
$('#next-step-box').html(res.data);
},'json');
}
</script>
@@ -0,0 +1,285 @@
<style type="text/css">
.content-body {
margin: 0;
}
@media screen and (max-width: 767px) {
.table-responsive td, .table-responsive th {
white-space: normal !important;
}
}
</style>
<div class="form-panel">
<div class="form-panel-header">
<div class="pull-right">
</div>
<a href="javascript:;" onclick="draft();" class="btn btn-sm btn-dark"><i class="icon icon-floppy-saved"></i> 保存草稿</a>
@if($work['step_number'] == 1)
<a href="javascript:;" onclick="nextStep();" class="btn btn-sm btn-info"><i class="icon icon-chevron-right"></i> 转下一步</a>
@else
<a href="javascript:;" onclick="nextStep();" class="btn btn-sm btn-info"><i class="fa fa-check-circle"></i> 审批</a>
@endif
@if($work['last'] > 0 && $work['opflag'] == 1)
<a href="javascript:;" onclick="lastStep();" class="btn btn-sm btn-default"><i class="fa fa-chevron-left"></i> 退回</a>
@endif
@if($work['deny'] > 0 && $work['opflag'] == 1)
<a href="javascript:;" class="btn btn-sm btn-danger"><i class="icon icon-ban-circle"></i> 拒绝</a>
@endif
@if($work['print'] > 0)
<a target="_blank" href="{{url('print')}}?process_id={{$process['id']}}" class="btn btn-sm btn-primary"><i class="icon icon-print"></i> 打印</a>
@endif
</div>
<div class="form-panel-body">
<div class="panel">
<div class="panel-heading text-base">
<i class="fa fa-file-text"></i> 工作主题
</div>
<div class="table-responsive">
<table class="table">
<tr>
<th align="right">工作主题</th>
<td>{{$process['title']}}</td>
<th align="right">工作ID</th>
<td>{{$process['id']}}</td>
</tr>
<tr>
<th width="15%" align="right">工作文号</th>
<td width="35%">{{$process['name']}}</td>
<th width="15%" align="right">重要等级</th>
<td width="35%">
{{:$levels = array(1=>'普通',2=>'重要',3=>'紧急')}}
{{$levels[$process['level']]}}
</td>
</tr>
<tr>
<th align="right">发起人</th>
<td>{{get_user($process['start_user_id'], 'name')}}</td>
<th align="right">工作描述</th>
<td>{{$process['description']}}</td>
</tr>
</table>
</div>
</div>
<form name="myform" id="myform" method="post">
<div class="panel">
<div class="panel-heading text-base">
<i class="fa fa-list-alt"></i> 工作表单
</div>
<div class="table-responsive">
<table class="table no-border">
<tr>
<td style="border:0;background:url('{{$asset_url}}/images/form_sheetbg.png');">
<div style="width:960px;margin:0 auto;padding:15px;">
<div class="shadow">
<span class="z corner_41"></span>
<span class="y corner_12"></span>
<div class="workflow" style="margin:10px;">
{{$template}}
</div>
<span class="z corner_34"></span>
<span class="y corner_23"></span>
</div>
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="panel">
<div class="panel-heading text-base">
<i class="icon icon-paperclip"></i> 公共附件区
</div>
<div class="panel-body b-t">
@if($attach['auth']['view'] == true)
@include('attachment/file')
@endif
</div>
</div>
<div class="panel">
<div class="panel-heading text-base">
<i class="fa fa-comments"></i> 会签意见区
</div>
<!--
<ul class="list-group list-group-lg no-bg auto">
<li class="list-group-item clearfix">
<span class="pull-left m-r">
<h6>会签步骤 <span class="badge bg-dark">1</span></h6>
</span>
<span class="clear">
<span>管理员 <span class="text-muted">2015-03-18</span> 说</span>
<small class="text-muted clear text-ellipsis">我是会签</small>
</span>
</li>
</ul>
<div class="clearfix panel-footer">
<span class="pull-left m-r">
<h6>当前步骤 <span class="badge bg-info">{{$work['step_number']}}</span></h6>
</span>
<span class="clear">
<textarea rows="3" name="feedback[content]" placeholder="输入会签内容" class="form-control"></textarea>
</span>
</div>
-->
</div>
</div>
</div>
<input type="hidden" name="work_id" id="work_id" value="{{$work['work_id']}}">
<input type="hidden" name="step_id" id="step_id" value="{{$work['step_id']}}">
<input type="hidden" name="step_number" id="step_number" value="{{$work['step_number']}}">
<input type="hidden" name="data_id" id="data_id" value="{{$process['data_id']}}">
<input type="hidden" name="process_id" id="process_id" value="{{$process['id']}}">
</form>
<script type="text/javascript">
$(function() {
$('tbody').on('change',function(i) {
listView.rowUpdate(i);
});
{{$jsonload}}
});
// 工作流全局对象
var workFlow = {{$work['js']}};
// 工作流js定义区域
{{$js}}
</script>
<script type="text/javascript">
function draft()
{
var myform = $('#myform').serialize();
$.post('{{url("draft")}}', myform, function(res) {
if (res.status) {
toastrSuccess('草稿保存成功。');
} else {
toastrError('草稿保存失败。');
}
},'json');
}
function nextStep()
{
var myform = $('#myform').serialize();
$.post('{{url("check")}}', myform, function(res) {
if (res.status) {
if (res.data == null) {
toastrError('转交步骤为空,或流程节点类型不正确。');
return;
}
top.$.dialog({
title: '工作办理',
dialogClass:'modal-md',
onShow:function() {
var self = this;
$.get('{{url("next")}}?'+$.param(res.data),function(html) {
if (html) {
self.html(html);
}
});
},
buttons:[{
text: '确定',
'class': 'btn-primary',
click: function() {
var me = this;
var nextform = top.$('#nextform').serialize();
var myform = $('#myform').serialize();
$.post('{{url("next")}}', nextform + '&' + myform, function(res1) {
if (res1.status) {
top.$(me).dialog('close');
var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
parent.location.reload();
} else {
toastrError(res1.data);
}
},'json');
}
},{
text: '取消',
'class': 'btn-default',
click: function() {
top.$(this).dialog('close');
}
}]
});
} else {
toastrError(res.data);
}
},'json');
}
function lastStep()
{
var data = {};
data.work_id = $('#work_id').val();
data.step_id = $('#step_id').val();
top.$.dialog({
title: '回退工作',
dialogClass: 'modal-md',
onShow: function() {
var self = this;
$.get('{{url("last")}}?'+$.param(data),function(res) {
self.html(res);
});
},
buttons:[{
text: '确定',
'class': 'btn-primary',
click: function() {
var nextform = top.$('#nextform').serialize();
var myform = $('#myform').serialize();
$.post('{{url("last")}}', nextform + '&' + myform, function(res1) {
if (res1.status) {
top.$(me).dialog('close');
var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
parent.location.reload();
} else {
toastrError(res1.data);
}
},'json');
/*
var myform = $('#myform, #nextform').serialize();
$.post('{{url("last")}}', myform, function(res1) {
if (res1.status) {
//location.href = res1.data;
top.$(me).dialog('close');
var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
parent.location.reload();
} else {
toastrError(res1.data);
}
},'json');
*/
}
},{
text: '取消',
'class': 'btn-default',
click: function() {
top.$(this).dialog('close');
}
}]
});
}
</script>
@@ -0,0 +1,29 @@
<table id="condition" class="bg-white table table-condensed table-bordered table-hover">
<thead>
<tr>
@foreach($columns as $column)
@if($column)
<th nowrap>{{$column}}</th>
@endif
@endforeach
</tr>
</thead>
@foreach($rows as $row)
<tr>
@foreach($row as $key => $row)
@if($key == 'id')
<td align="center">{{$row}}</td>
@elseif($key == 'start_time')
<td align="center">{{$row}}</td>
@elseif($key == 'end_user_id')
<td align="center">{{$row}}</td>
@else
<td>{{$row}}</td>
@endif
@endforeach
</tr>
@endforeach
</table>
@@ -0,0 +1,131 @@
<div class="panel">
<div class="panel-heading tabs-box">
<ul class="nav nav-tabs">
@foreach($options as $k => $v)
<li class="@if($search['query']['option'] == $k) active @endif">
<a class="text-sm" href="{{url('index',['option'=>$k])}}">{{$v}}</a>
</li>
@endforeach
</ul>
</div>
<div class="wrapper">
<form id="search-form" class="form-inline" name="mysearch" action="{{url()}}" method="get">
<div class="pull-right">
@if(isset($access['delete']))
<a class="btn btn-sm btn-danger" href="javascript:optionDelete('#myform','{{url('delete',['status'=>'0'])}}','确定将流程放入回收站?');"><i class="icon icon-remove"></i> 删除</a>
@endif
@if(isset($access['trash']))
<a href="{{url('trash')}}" class="btn btn-sm btn-default"><i class="icon icon-trash"></i> 回收站</a>
@endif
</div>
@if(isset($access['list']))
<a data-toggle="layer-frame-url" href="javascript:;" data-skin="gdoo" data-url="{{url('list')}}" class="btn btn-sm btn-info"><i class="icon icon-plus"></i> 新建</a>
@endif
@include('workflow/select')
</form>
</div>
<form method="post" id="myform" name="myform">
<div class="table-responsive">
<table class="table m-b-none table-striped b-t table-hover">
<thead>
<tr>
<th align="center">
<input class="select-all" type="checkbox">
</th>
<th align="left">主题 / 文号</th>
<th>发起人</th>
<th>发起时间</th>
<th align="left">步骤(点击查看)</th>
<th align="center">当前办理人</th>
<th>状态</th>
<th align="center">ID</th>
<th>发起到现在时间</th>
<th></th>
</tr>
</thead>
<tbody>
@if($rows)
@foreach($rows as $row)
<tr>
<td align="center">
@if(isset($access['delete']) && ($row['start_user_id'] == Auth::id() || $access['delete'] == 4))
<input class="select-row" type="checkbox" name="id[]" value="{{$row['id']}}">
@else
<input type="checkbox" disabled>
@endif
</td>
<td>
@if($search['query']['option'] == 'todo')
<a data-toggle="layer-frame-url" href="#{{$row['id']}}" data-skin="gdoo" data-url="{{url('edit')}}?process_id={{$row['id']}}">{{$row['title']}}</a>
@else
<a data-toggle="layer-frame-url" href="#{{$row['id']}}" data-skin="gdoo" data-url="{{url('view')}}?process_id={{$row['id']}}">{{$row['title']}}</a>
@endif
<div class="text-muted">{{$row['name']}}</div>
</td>
<td align="center">{{get_user($row['start_user_id'], 'name')}}</td>
<td align="center">@datetime($row['start_time'])</td>
<td>
<span class="badge">{{$row['step_number']}}</span>
<a href="javascript:viewBox('process-log','流程记录','{{url('log', ['process_id' => $row['id']])}}');">{{$row['step_name']}}</a>
<div>
<?php
/*
if ($row['step']['timeout']) {
$timeout = 6 * 60;
$start = Carbon\Carbon::createFromTimeStamp($row['step_add_time']);
echo Carbon\Carbon::now()->diffInHours($start);
}
*/
?>
</div>
</td>
<td align="center">
{{get_user($row['step_user_id'], 'name')}}
</td>
<td align="center">
@if($row['end_time'])
<span class="label label-info">已结束</span>
@else
<span class="label label-success">执行中</span>
@endif
</td>
<td align="center">{{$row['id']}}</td>
<td align="center"><?php echo time_day_hour($row['start_time']); ?></td>
<td align="center">
@if($search['query']['option'] == 'todo')
<a data-toggle="layer-frame-url" href="#{{$row['id']}}" data-skin="gdoo" data-url="{{url('edit')}}?process_id={{$row['id']}}" class="option">办理</a>
@else
<a data-toggle="layer-frame-url" href="#{{$row['id']}}" data-skin="gdoo" data-url="{{url('view')}}?process_id={{$row['id']}}" class="option">查看</a>
@endif
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</form>
<footer class="panel-footer">
<div class="row">
<div class="col-sm-1 hidden-xs">
</div>
<div class="col-sm-11 text-right text-center-xs">
{{$rows->render()}}
</div>
</div>
</footer>
</div>
@@ -0,0 +1,83 @@
<style type="text/css">
.content-body {
margin: 0;
}
</style>
<div class="form-panel">
<div class="form-panel-header">
<div class="pull-right">
</div>
<div class="h5 m-l-xs"><i class="fa fa-list"></i> 可用流程列表</div>
</div>
<div class="form-panel-body">
<div class="panel">
<div class="panel-body">
<div class="row">
@if($categorys)
@foreach($categorys as $k => $cat)
<div class="col-md-4 col-sm-6 m-b">
<div class="panel panel-info">
<div class="panel-heading text-base">
<i class="fa fa-file-text-o"></i> {{$cat['title']}}
</div>
<table class="table table-hover m-b-none">
@if($rows[$cat['id']])
@foreach($rows[$cat['id']] as $row)
<tr>
<td><a class="pull-right" href="{{url('form/view', ['id' => $row['id']])}}"><i class="fa fa-eye"></i> 预览</a> <a onclick="workStart({{$row['id']}});" href="javascript:;">{{$row['title']}}</a></td>
</tr>
@endforeach
@endif
</table>
</div>
</div>
@endforeach
@endif
</div>
</div>
</div>
</div>
</div>
<style>
.col-md-4,.col-sm-6 {
padding-left: 10px;
padding-right: 10px;
}
</style>
<script type="text/javascript">
function workStart(id)
{
top.$.dialog({
title: '新建工作',
url:'{{url("add")}}?id='+id,
dialogClass:'modal-md',
buttons:[{
text: '确定',
'class': 'btn-primary',
click: function() {
var me = this;
var myform = top.$('#myform').serialize();
$.post('{{url("add")}}', myform, function(res) {
if (res.status) {
window.location.href='{{url("edit")}}?process_id='+res.data.process_id;
top.$(me).dialog('close');
} else {
toastrError(res.data);
}
},'json');
}
},{
text: '取消',
'class': 'btn-default',
click: function() {
top.$(this).dialog('close');
}
}]
});
}
</script>
@@ -0,0 +1,59 @@
<table class="table m-b-none">
<thead>
<tr>
<th align="center">序号</th>
<th align="left">步骤</th>
<th align="left">办理内容</th>
<th align="center">办理人</th>
<th align="center">办理类型</th>
<th align="center">办理时间</th>
<th align="center">办理效率</th>
</tr>
</thead>
@foreach($rows as $i => $row)
<tr>
<td align="center">
{{$row['number']}}
</td>
<td align="left">
@if($row['flag'] == 1)
<span class="red">{{$row['step_name']}}</span>
@else
<span>{{$row['step_name']}}</span>
@endif
</td>
<td align="left">
{{$row[description]}}
</td>
<td align="center">
{{get_user($row['user_id'], 'name')}}
</td>
<td align="center">
@if($row[step_status] == 'back')
退回
@else
审批
@endif
</td>
<td align="center">
@datetime($row[deliver_time])
</td>
<td align="center">
<?php
$start = $row['deliver_time'];
if ($start) {
if ($end) {
$s = Carbon\Carbon::createFromTimeStamp($start);
$e = Carbon\Carbon::createFromTimeStamp($end);
echo $s->diffInHours($e).'小时';
} else {
echo '无';
}
$end = $start;
}
?>
</td>
</tr>
@endforeach
</table>
@@ -0,0 +1,274 @@
<style type="text/css">
@media screen and (max-width: 767px) {
.table-responsive td, .table-responsive th {
white-space: normal !important;
}
}
</style>
<div class="panel">
<div class="panel-heading text-base">
<i class="fa fa-file-text"></i> 工作主题
</div>
<div class="table-responsive">
<table class="table">
<tr>
<th width="15%" align="right">工作主题</th>
<td width="35%">{{$process['title']}}</td>
<th width="15%" align="right">工作ID</th>
<td width="35%">{{$process['id']}}</td>
</tr>
<tr>
<th align="right">工作文号</th>
<td>{{$process['name']}}</td>
<th align="right">重要等级</th>
<td>
{{:$levels = array(1=>'普通',2=>'重要',3=>'紧急')}}
{{$levels[$process['level']]}}
</td>
</tr>
<tr>
<th align="right">发起人</th>
<td>{{get_user($process['start_user_id'], 'name')}}</td>
<th align="right">工作描述</th>
<td>{{$process['description']}}</td>
</tr>
</table>
</div>
</div>
<form name="myform" id="myform" method="post">
<div class="panel">
<div class="panel-heading text-base">
<i class="fa fa-list-alt"></i> 工作表单
</div>
<div class="table-responsive">
<table class="table no-border">
<tr>
<td style="border:0;background:url('{{$asset_url}}/images/form_sheetbg.png');">
<div style="width:960px;margin:0 auto;padding:15px;">
<div class="shadow">
<span class="z corner_41"></span>
<span class="y corner_12"></span>
<div style="margin:10px;">
{{$template}}
</div>
<span class="z corner_34"></span>
<span class="y corner_23"></span>
</div>
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="panel">
<div class="panel-heading text-base">
<i class="icon icon-paperclip"></i> 公共附件区
</div>
<div class="panel-body b-t">
@if($attach['auth']['view'] == true)
@include('attachment/mobile/file')
@endif
</div>
</div>
<div class="panel">
<div class="panel-heading text-base">
<i class="fa fa-comments"></i> 会签意见区
</div>
<!--
<ul class="list-group list-group-lg no-bg auto">
<li class="list-group-item clearfix">
<span class="pull-left m-r">
<h6>会签步骤 <span class="badge bg-dark">1</span></h6>
</span>
<span class="clear">
<span>管理员 <span class="text-muted">2015-03-18</span> 说</span>
<small class="text-muted clear text-ellipsis">我是会签</small>
</span>
</li>
</ul>
<div class="clearfix panel-footer">
<span class="pull-left m-r">
<h6>当前步骤 <span class="badge bg-info">{{$work['step_number']}}</span></h6>
</span>
<span class="clear">
<textarea rows="3" name="feedback[content]" placeholder="输入会签内容" class="form-control"></textarea>
</span>
</div>
-->
</div>
<div class="panel">
<div class="panel-body">
<input type="hidden" name="work_id" id="work_id" value="{{$work['work_id']}}">
<input type="hidden" name="step_id" id="step_id" value="{{$work['step_id']}}">
<input type="hidden" name="step_number" id="step_number" value="{{$work['step_number']}}">
<input type="hidden" name="data_id" id="data_id" value="{{$process['data_id']}}">
<input type="hidden" name="process_id" id="process_id" value="{{$process['id']}}">
<a href="javascript:;" onclick="draft();" class="btn btn-dark"><i class="icon icon-floppy-saved"></i> 保存草稿</a>
@if($work['step_number'] == 1)
<a href="javascript:;" onclick="nextStep();" class="btn btn-info"><i class="icon icon-chevron-right"></i> 转下一步</a>
@else
<a href="javascript:;" onclick="nextStep();" class="btn btn-info"><i class="fa fa-check-circle"></i> 审批</a>
@endif
@if($work['last'] > 0 && $work['opflag'] == 1)
<a href="javascript:;" onclick="lastStep();" class="btn btn-default"><i class="fa fa-chevron-left"></i> 退回</a>
@endif
@if($work['deny'] > 0 && $work['opflag'] == 1)
<a href="javascript:;" class="btn btn-danger"><i class="icon icon-ban-circle"></i> 拒绝</a>
@endif
</div>
</div>
</form>
<script type="text/javascript">
$(function() {
$('tbody').on('change',function(i) {
listView.rowUpdate(i);
});
{{$jsonload}}
});
// 工作流全局对象
var workFlow = {{$work['js']}};
// 工作流js定义区域
{{$js}}
</script>
<script type="text/javascript">
var donf = null;
var doapp = null;
var dopage = null;
window.onDeviceOneLoaded = function() {
donf = sm("do_Notification");
doapp = sm("do_App");
dopage = sm("do_Page");
}
function draft()
{
var myform = $('#myform').serialize();
$.post('{{url("draft")}}', myform, function(res) {
if (res.status) {
donf.toast('保存成功。');
} else {
donf.toast('保存失败。');
}
},'json');
}
function nextStep()
{
var myform = $('#myform').serialize();
$.post('{{url("check")}}', myform, function(res) {
if (res.status) {
if (res.data == null) {
donf.alert('转交步骤为空,或流程节点类型不正确。');
return;
}
$.dialog({
title: '工作办理',
dialogClass:'modal-md',
onShow:function() {
var self = this;
$.get('{{url("next")}}?'+$.param(res.data),function(html) {
if (html) {
self.html(html);
}
});
},
buttons:[{
text: '确定',
'class': 'btn-primary',
click: function() {
var myform = $('#myform,#nextform').serialize();
$.post('{{url("next")}}', myform, function(res1) {
if (res1.status) {
donf.toast('审批成功。');
doapp.closePage('reload');
} else {
donf.alert(res1.data);
}
},'json');
}
},{
text: '取消',
'class': 'btn-default',
click: function() {
$(this).dialog('close');
}
}]
});
}
else
{
donf.alert(res.data);
}
},'json');
}
function lastStep()
{
var data = {};
data.work_id = $('#work_id').val();
data.step_id = $('#step_id').val();
$.dialog({
title: '回退工作',
dialogClass:'modal-md',
onShow:function() {
var self = this;
$.get('{{url("last")}}?'+$.param(data),function(res) {
self.html(res);
});
},
buttons:[{
text: '确定',
'class': 'btn-primary',
click: function() {
var myform = $('#myform,#nextform').serialize();
$.post('{{url("last")}}', myform, function(res) {
if (res.status) {
donf.toast('退回成功。');
doapp.closePage('reload');
} else {
donf.alert(res.data);
}
},'json');
}
},{
text: '取消',
'class': 'btn-default',
click: function() {
$(this).dialog('close');
}
}]
});
}
</script>
@@ -0,0 +1,75 @@
<div class="row" style="margin-left:0;margin-right:0;">
@if($categorys)
@foreach($categorys as $key => $category)
<div class="col-md-4 col-sm-6 m-b">
@if($category)
@foreach($category as $k => $cat)
<div class="panel b-a">
<div class="panel-heading text-base b-b">
<i class="fa fa-file-text-o"></i> {{$cat['title']}}
</div>
<table class="table table-hover m-b-none">
@if($rows[$cat['id']])
@foreach($rows[$cat['id']] as $row)
<tr>
<td onclick="workStart({{$row['id']}});"><a onclick="workStart({{$row['id']}});" href="javascript:;">{{$row['title']}}</a></td>
</tr>
@endforeach
@endif
</table>
</div>
@endforeach
@endif
</div>
@endforeach
@endif
</div>
<script type="text/javascript">
var donf = null;
var doapp = null;
var dopage = null;
window.onDeviceOneLoaded = function() {
donf = sm("do_Notification");
doapp = sm("do_App");
dopage = sm("do_Page");
}
function workStart(id)
{
$.dialog({
title: '新建工作',
url:'{{url("add")}}?id='+id,
dialogClass:'modal-md',
buttons:[{
text: '确定',
'class': 'btn-primary',
click: function() {
var myform = $('#myform').serialize();
$.post('{{url("add")}}', myform, function(res) {
if (res.status) {
donf.toast('新建成功。');
doapp.closePage('reload');
} else {
donf.alert(res.data);
}
},'json');
}
},{
text: '取消',
'class': 'btn-default',
click: function() {
$(this).dialog('close');
}
}]
});
}
</script>
@@ -0,0 +1,96 @@
<style type="text/css">
@media screen and (max-width: 767px) {
.table-responsive td, .table-responsive th {
white-space: normal !important;
}
}
</style>
<script type="text/javascript">
$(function() {
$('tbody').on('change',function(i) {
listView.rowUpdate(i);
});
{{$jsonload}}
});
// 工作流全局对象
var workFlow = {{$work['js']}};
// 工作流js定义区域
{{$js}}
</script>
<div class="panel">
<div class="panel-heading text-base">
<i class="fa fa-file-text"></i> 工作主题
</div>
<div class="table-responsive">
<table class="table">
<tr>
<th width="15%" align="right">工作主题</th>
<td width="35%">{{$process['title']}}</td>
<th width="15%" align="right">工作ID</th>
<td width="35%">{{$process['id']}}</td>
</tr>
<tr>
<th align="right">工作文号</th>
<td>{{$process['name']}}</td>
<th align="right">重要等级</th>
<td>
{{:$levels = array(1=>'普通',2=>'重要',3=>'紧急')}}
{{$levels[$process['level']]}}
</td>
</tr>
<tr>
<th align="right">发起人</th>
<td>{{get_user($process['start_user_id'], 'name')}}</td>
<th align="right">工作描述</th>
<td>{{$process['description']}}</td>
</tr>
</table>
</div>
</div>
<div class="panel">
<div class="panel-heading text-base">
<i class="fa fa-list-alt"></i> 工作表单
</div>
<div class="table-responsive no-borders">
<table class="table">
<tr>
<td style="background:url('{{$asset_url}}/images/form_sheetbg.png');">
<div style="width:960px;margin:0 auto;padding:15px;">
<div class="shadow">
<span class="z corner_41"></span>
<span class="y corner_12"></span>
<div style="margin:10px;">
{{$template}}
</div>
<span class="z corner_34"></span>
<span class="y corner_23"></span>
</div>
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="panel">
<div class="panel-heading text-base">
<i class="icon icon-paperclip"></i> 公共附件区
</div>
<div class="panel-body b-t">
@if($attach['auth']['view'] == true)
@include('attachment/mobile/file')
@endif
</div>
</div>
@@ -0,0 +1,131 @@
<div class="panel">
<div class="panel-heading tabs-box">
<ul class="nav nav-tabs">
<li class="@if($search['query']['done'] == 0) active @endif">
<a class="text-sm" href="{{url('',['done'=>0])}}">执行中</a>
</li>
<li class="@if($search['query']['done'] == 1) active @endif">
<a class="text-sm" href="{{url('',['done'=>1])}}">已结束</a>
</li>
</ul>
</div>
<div class="wrapper">
@include('workflow/select_monitor')
</div>
<form method="post" id="myform" name="myform">
<div class="table-responsive">
<table class="table m-b-none table-striped b-t table-hover">
<thead>
<tr>
<th align="center">
<input class="select-all" type="checkbox">
</th>
<th align="left">主题 / 文号</th>
<th>发起人</th>
<th>发起时间</th>
<th>当前主办人</th>
<th align="left">步骤(点击可查看各岗位处理时间)</th>
<th>状态</th>
<th>发起到现在时间</th>
<th align="center">ID</th>
<th></th>
</tr>
</thead>
<tbody>
@if($rows)
@foreach($rows as $row)
<tr>
<td align="center">
<input class="select-row" type="checkbox" name="id[]" value="{{$row['id']}}">
</td>
<td>
<a href="{{url('view')}}?process_id={{$row['id']}}">{{$row['title']}}</a>
<div class="text-muted">{{$row['name']}}</div>
</td>
<td align="center">{{get_user($row['start_user_id'], 'name')}}</td>
<td align="center">@datetime($row['start_time'])</td>
<td align="center">
{{get_user($row['step']['user_id'], 'name')}}
</td>
<td>
<span class="badge">{{$row['step']['number']}}</span>
<a href="javascript:viewBox('process-log','流程记录','{{url('log', ['process_id' => $row['id']])}}');">{{$row['step']['name']}}</a>
</td>
<td align="center">
@if($row['end_time'])
<span class="label label-info">已结束</span>
@else
<span class="label label-success">执行中</span>
@endif
</td>
<td align="center"><?php echo time_day_hour($row['start_time']); ?></td>
<td align="center">{{$row['id']}}</td>
<td align="center">
<a class="option" href="javascript:correct('{{$row['step']['id']}}');">纠正</a>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</form>
<footer class="panel-footer">
<div class="row">
<div class="col-sm-1 hidden-xs">
</div>
<div class="col-sm-11 text-right text-center-xs">
{{$rows->render()}}
</div>
</div>
</footer>
</div>
<script type="text/javascript">
function correct(id)
{
$.dialog({
title: '工作纠正',
dialogClass:'modal-md',
onShow:function() {
var self = this;
$.get('{{url("correct")}}', {id:id}, function(html) {
if (html) {
self.html(html);
}
});
},
buttons:[{
text: '确定',
'class': 'btn-primary',
click: function() {
var myform = $('#myform,#nextform').serialize();
$.post('{{url("next")}}', myform, function(res1) {
if (res1.status) {
location.href = res1.data;
} else {
toastrError(res1.data);
}
},'json');
}
},{
text: '取消',
'class': 'btn-default',
click: function() {
$(this).dialog('close');
}
}]
});
}
</script>
@@ -0,0 +1,32 @@
<div class="wrapper">
<form class="form-horizontal" name="nextform" id="nextform" method="post">
<div class="form-group">
<label class="col-sm-2 control-label">选择下一步</label>
<div class="col-sm-10">
@if($rows)
@foreach($rows as $row)
<div class="radio">
<label class="i-checks i-checks-sm">
<input onclick="getStep();" type="radio" name="next_step_id" value="{{$row['id']}}"><i></i> @if($row['number']>0) 第 <span class="badge bg-primary">{{$row['number']}}</span>@endif {{$row['title']}}
</label>
</div>
@endforeach
@endif
</div>
</div>
<span id="next-step-box"></span>
<input type="hidden" name="step_type" value="{{$step_type}}" />
</form>
</div>
<script type="text/javascript">
function getStep()
{
var myform = $('#myform,#nextform').serialize();
$.post('{{url("step")}}', myform,function(res) {
$('#next-step-box').html(res.data);
},'json');
}
</script>
@@ -0,0 +1,35 @@
<style type="text/css">
body {
background-color: #fff;
}
table,
table td,
table th {
border-color: #222 !important;
}
</style>
<style type="text/css">
@media screen and (max-width: 767px) {
.table-responsive td, .table-responsive th {
white-space: normal !important;
}
}
</style>
<script type="text/javascript">
$(function() {
$('tbody').on('change',function(i) {
listView.rowUpdate(i);
});
{{$jsonload}}
});
// 工作流全局对象
var workFlow = {{$work['js']}};
// 工作流js定义区域
{{$js}}
</script>
<div class="workflow">
{{$template}}
</div>
@@ -0,0 +1,365 @@
<form method="post" id="queryform" name="queryform" class="form-horizontal">
<div class="panel">
<div class="wrapper-sm h5 b-b b-light">
<i class="fa fa-list"></i> 统计报表选项
</div>
<div class="panel-body">
<div class="form-group">
<label class="col-sm-2 control-label">流程名称</label>
<div class="col-sm-10">
<input class="input-sm form-control" type="text" name="name" readonly="readonly" value="{{$work['title']}}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">工作流状态</label>
<div class="col-sm-10">
<select name="status" class="input-sm form-control">
<option value="all" @if($work_type_field['status'] == 'all') selected @endif>全部</option>
<option value="0" @if($work_type_field['status'] == '0') selected @endif>执行中</option>
<option value="1" @if($work_type_field['status'] == '1') selected @endif>已结束</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">查询范围</label>
<div class="col-sm-10">
<select class="input-sm form-control" name="user_type">
<option value="all" @if($work_type_field['user_type']=='all') selected @endif>全部</option>
<option value="1" @if($work_type_field['user_type']=='1') selected @endif>我发起的</option>
<option value="2" @if($work_type_field['user_type']=='2') selected @endif>我经办的</option>
<option value="3" @if($work_type_field['user_type']=='3') selected @endif>我管理的</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">流程发起人</label>
<div class="col-sm-10">
{{App\Support\Dialog::user('user','start_user_id',$row->start_user_id, 0, 0)}}
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">名称/文号</label>
<div class="col-sm-10">
<input type="text" class="input-sm form-control" name="run_name" value="{{$work_type_field['run_name']}}" maxlenth="100">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">流程开始日期</label>
<div class="col-sm-10 form-inline">
<div class="input-group">
<div class="bg-white input-group-addon">从</div>
<input data-toggle="date" class="input-sm form-control" name="date_start_a" type="text" value="@date($row->add_time)">
</div>
<div class="input-group">
<div class="bg-white input-group-addon">至</div>
<input data-toggle="date" class="input-sm form-control" name="date_start_b" type="text" value="@date($row->expired_time)">
</div>
</div>
</div>
<!--
<div class="form-group">
<label class="col-sm-2 control-label">流程结束日期</label>
<div class="col-sm-10 form-inline">
<div class="input-group">
<div class="bg-white input-group-addon">从</div>
<input data-toggle="date" class="input-sm form-control" name="date_end_a" type="text" value="@date($row->add_time)">
</div>
<div class="input-group">
<div class="bg-white input-group-addon">至</div>
<input data-toggle="date" class="input-sm form-control" name="date_end_b" type="text" value="@date($row->expired_time)">
</div>
</div>
</div>
-->
<div class="form-group">
<label class="col-sm-2 control-label">公共附件名称</label>
<div class="col-sm-10">
<input type="text" class="input-sm form-control" name="attach_name" value="{{$work_type_field['attach_name']}}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><i class="fa fa-file-text-o"></i> 表单数据条件</label>
<div class="col-sm-10">
<table id="condition" class="table table-condensed table-bordered table-hover">
<thead>
<tr>
<th style="width:90px;">左括号</th>
<th style="width:140px;">字段</th>
<th style="width:130px;">条件</th>
<th>值</th>
<th style="width:90px;">右括号</th>
<th style="width:100px;">逻辑</th>
<th style="width:120px;">
<button type="button" data-condition="add" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> 新增</button>
</th>
</tr>
<tr data-condition="tpl" style="display:none;">
<td>
<select name="conditions[@id][left]" class="input-sm form-control">
<option value=""></option>
<option value="(">(</option>
</select>
</td>
<td>
<select name="conditions[@id][field]" class="input-sm form-control">
<option value=""></option>
@foreach($fields as $field)
<option value="d.{{$field['name']}}">{{$field['title']}}</option>
@endforeach
</select>
</td>
<td>
<select name="conditions[@id][condition]" class="input-sm form-control">
<option value="=">等于</option>
<option value="<>">不等于</option>
<option value=">">大于</option>
<option value="<">小于</option>
<option value=">=">大于等于</option>
<option value="<=">小于等于</option>
<option value="like">包含</option>
<option value="not like">不包含</option>
</select>
</td>
<td>
<input name="conditions[@id][value]" class="input-sm form-control">
</td>
<td>
<select name="conditions[@id][right]" class="input-sm form-control">
<option value=""></option>
<option value=")">)</option>
</select>
</td>
<td>
<select name="conditions[@id][logic]" class="input-sm form-control">
<option value="and">and</option>
<option value="or">or</option>
</select>
</td>
<td align="center">
<div class="btn-group">
<button type="button" data-condition="up" class="btn btn-default btn-xs"><i class="fa fa-angle-up"></i></button>
<button type="button" data-condition="down" class="btn btn-default btn-xs"><i class="fa fa-angle-down"></i></button>
<button type="button" data-condition="delete" class="btn btn-default btn-xs"><i class="fa fa-times"></i></button>
</div>
</td>
</tr>
</thead>
<tbody data-condition="body"></tbody>
</table>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><i class="fa fa-bar-chart-o"></i> 统计报表选项</label>
<div class="col-sm-10">
<table id="condition" class="table table-condensed table-bordered table-hover">
<thead>
<tr>
<th style="width:60px;">显示</th>
<th>字段</th>
<th style="width:100px;">格式</th>
<th style="width:100px;">合计</th>
<th style="width:100px;">排序</th>
</tr>
</thead>
@foreach($columns as $key => $column)
<tr>
<td align="center">
<input type="checkbox" value="{{$column['field']}}" name="columns[{{$key}}][field]" checked>
</td>
<td>
[{{$column['name']}}]
</td>
<td align="center">
{{$column['format']}}
</td>
<td align="center">
<input type="checkbox" name="columns[{{$key}}][total]">
</td>
<td>
<input name="columns[{{$key}}][sort]" class="input-sm form-control">
<input type="hidden" name="columns[{{$key}}][format]" value="{{$column['format']}}" class="input-sm form-control">
<input type="hidden" name="columns[{{$key}}][name]" value="{{$column['name']}}">
</td>
</tr>
@endforeach
@foreach($fields as $field)
<tr>
<td align="center">
<input type="checkbox" value="d.{{$field['name']}}" name="columns[{{$field['name']}}][field]" checked>
</td>
<td>
{{$field['title']}}
@if($field['class'] == 'listview')
<?php
$field['lv_title'];
$trs = explode('`', $field['lv_title']);
?>
<div>
@foreach($trs as $i => $tr)
@if($tr)
<label><input name="columns[{{$field['name']}}][field1][{{$i}}]" type="checkbox" value="1" checked="checked" />{{$tr}} </label>&nbsp;
@endif
@endforeach
@endif
</div>
</td>
<td>
<select name="columns[{{$field['name']}}][format]" class="input-sm form-control">
<option value="text">文本</option>
<option value="number">数字</option>
</select>
</td>
<td align="center">
<input type="checkbox" name="columns[{{$field['name']}}][total]">
</td>
<td>
<input name="columns[{{$field['name']}}][sort]" class="input-sm form-control">
<input type="hidden" name="columns[{{$field['name']}}][name]" value="{{$field['title']}}">
<input type="hidden" name="columns[{{$field['name']}}][class]" value="{{$field['class']}}">
</td>
</tr>
@endforeach
</table>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">排序字段</label>
<div class="col-sm-10 form-inline">
<select class="input-sm form-control" name="order_by">
@foreach($columns as $column)
<option value="{{$column['field']}}">[{{$column['name']}}]</option>
@endforeach
@foreach($fields as $field)
<option value="{{$field['name']}}">{{$field['title']}}</option>
@endforeach
</select>
&nbsp;
<select class="input-sm form-control" name="sort_by">
<option value="asc" @if($sort_by['sort'] == 'asc') selected @endif>升序</option>
<option value="desc" @if($sort_by['sort'] == 'desc') selected @endif>降序</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">分组字段</label>
<div class="col-sm-10 form-inline">
<select class="input-sm form-control" name="group_by">
@foreach($columns as $column)
<option value="{{$column['field']}}">[{{$column['name']}}]</option>
@endforeach
@foreach($fields as $field)
<option value="{{$field['name']}}">{{$field['title']}}</option>
@endforeach
</select>
</div>
</div>
<input type="hidden" name="work_id" value="{{$work_id}}">
<div class="col-sm-10 col-sm-offset-2">
<button type="button" onclick="querySubmit('list');" class="btn btn-info">查询列表</button>
<button type="button" onclick="querySubmit('excel');" class="btn btn-default">导出EXCEL统计列表</button>
<button type="button" onclick="querySubmit('html');" class="btn btn-default">导出HTML统计列表</button>
</div>
</div>
</form>
<script type="text/javascript">
/**
* 数据条件插件
*/
(function($) {
$.fn.condition = function()
{
var self = this;
self.index = 0;
var tpl = self.find('[data-condition="tpl"]').html();
var body = self.find('[data-condition="body"]');
self.on('click', '[data-condition="add"]', function()
{
self.index++;
body.append('<tr>' + tpl.replace(/\@id/g, self.index) + '</tr>');
});
self.on('click','[data-condition="delete"]', function()
{
$(this).closest('tr').remove();
});
self.on('click', '[data-condition="up"]', function()
{
var tr = $(this).closest('tr');
var prev = tr.prev();
if (prev.length > 0)
{
prev.insertAfter(tr);
}
else
{
return;
}
});
self.on('click', '[data-condition="down"]', function()
{
var tr = $(this).closest('tr');
var next = tr.next();
if (next.length > 0)
{
next.insertBefore(tr);
}
else
{
return;
}
});
}
})(jQuery);
$(function()
{
$('#condition').condition();
});
function querySubmit(action)
{
document.queryform.target='_blank';
document.queryform.action = app.url('workflow/workflow/export',{action:action});
document.queryform.submit();
}
</script>
@@ -0,0 +1,33 @@
<div class="row">
@if($categorys)
@foreach($categorys as $key => $category)
<div class="col-sm-6">
@if($category)
@foreach($category as $k => $cat)
<div class="panel">
<div class="panel-heading text-base b-b b-light">
<i class="fa fa-file-text-o"></i>
{{$cat['title']}}
</div>
<table class="table table-hover m-b-none">
@if($rows[$cat['id']])
@foreach($rows[$cat['id']] as $row)
<tr>
<td><a href="{{url('query', ['id' => $row['id']])}}">{{$row['title']}}</a></td>
</tr>
@endforeach
@endif
</table>
</div>
@endforeach
@endif
</div>
@endforeach
@endif
</div>
@@ -0,0 +1,89 @@
@include('searchForm')
<script type="text/javascript">
$(function() {
$('#search-form').searchForm({
data:{{json_encode($search['forms'])}},
init:function(e) {
var self = this;
var category = null;
var work = null;
var step = null;
var category_id = 0;
var work_id = 0;
var step_id = 0;
e.category = function(i) {
var element = self.element[i];
category = self.attr(i, 0);
work = self.attr(i, 1);
step = self.attr(i, 2);
category_id = category.value;
work_id = work.value;
step_id = step.value;
element.value.append('<select name="'+category.name+'" id="'+category.id+'" class="form-control input-sm"></select>&nbsp;<select name="'+work.name+'" id="'+work.id+'" class="form-control input-sm"></select>&nbsp;<select name="'+step.name+'" id="'+step.id+'" class="form-control input-sm"></select>');
var res = {{json_encode($categorys)}};
var option = '<option value=""> - </option>';
$.map(res, function(row) {
option += '<option value="'+row.id+'">'+row.title+'</option>';
});
var e = $('#'+category.id).html(option);
if(category_id) {
e.val(category_id);
}
_work(i);
_step(i);
self.on('change', '#' + category.id, function() {
category_id = this.value;
work_id = 0;
step_id = 0;
_work(i);
_step(i);
});
self.on('change', '#' + work.id, function() {
work_id = this.value;
step_id = 0;
_step(i);
});
}
function _work(i) {
$.get(app.url('workflow/workflow/dialog', {category_id: category_id}), function(res) {
var option = '<option value=""> - </option>';
$.map(res.data, function(row) {
option += '<option value="'+row.id+'">'+row.title+'</option>';
});
var e = $('#'+work.id).html(option);
if(work_id) {
e.val(work_id);
}
});
}
function _step(i) {
$.get(app.url('workflow/step/dialog', {work_id:work_id}), function(res) {
var option = '<option value=""> - </option>';
$.map(res.data, function(row) {
option += '<option value="'+row.id+'">'+row.title+'</option>';
});
var e = $('#'+step.id).html(option);
if(step_id) {
e.val(step_id);
}
});
}
}
});
});
</script>
@@ -0,0 +1,106 @@
<form id="search-form" class="form-inline" name="mysearch" action="{{url()}}" method="get">
<div class="input-group">
<button type="button" class="btn btn-sm btn-default" data-toggle="dropdown">
批量操作
<span class="caret"></span>
</button>
<ul class="dropdown-menu text-xs">
@if(isset($access['delete']))
<li><a href="javascript:optionDelete('#myform','{{url('end')}}', '流程将被强行结束吗?');"><i class="icon icon-stop"></i> 结束</a></li>
<li class="divider"></li>
<li><a href="javascript:optionDelete('#myform','{{url('delete',['status'=>'0'])}}','确定要删除流程吗?');"><i class="icon icon-trash"></i> 删除</a></li>
@endif
</ul>
</div>
@include('searchForm')
</form>
<script type="text/javascript">
$(function() {
$('#search-form').searchForm({
data: {{json_encode($search['forms'])}},
init: function(e) {
var self = this;
var category = null;
var work = null;
var step = null;
var category_id = 0;
var work_id = 0;
var step_id = 0;
e.category = function(i) {
var element = self.element[i];
category = self.attr(i, 0);
work = self.attr(i, 1);
step = self.attr(i, 2);
category_id = category.value;
work_id = work.value;
step_id = step.value;
element.value.append('<select name="'+category.name+'" id="'+category.id+'" class="form-control input-sm"></select>&nbsp;<select name="'+work.name+'" id="'+work.id+'" class="form-control input-sm"></select>&nbsp;<select name="'+step.name+'" id="'+step.id+'" class="form-control input-sm"></select>');
var res = {{json_encode($categorys)}};
var option = '';
$.map(res, function(row) {
option += '<option value="'+row.id+'">'+row.title+'</option>';
});
var e = $('#'+category.id).html(option);
if(category_id) {
e.val(category_id);
}
_work(i);
_step(i);
self.on('change', '#' + category.id, function() {
category_id = this.value;
work_id = 0;
step_id = 0;
_work(i);
_step(i);
});
self.on('change', '#' + work.id, function() {
work_id = this.value;
step_id = 0;
_step(i);
});
}
function _work(i) {
$.get(app.url('workflow/workflow/dialog', {category_id: category_id}), function(res) {
var option = '<option value=""> - </option>';
$.map(res.data, function(row) {
option += '<option value="'+row.id+'">'+row.title+'</option>';
});
var e = $('#'+work.id).html(option);
if(work_id) {
e.val(work_id);
}
});
}
function _step(i) {
$.get(app.url('workflow/step/dialog', {work_id:work_id}), function(res) {
var option = '<option value=""> - </option>';
$.map(res.data, function(row) {
option += '<option value="'+row.id+'">'+row.title+'</option>';
});
var e = $('#'+step.id).html(option);
if(step_id) {
e.val(step_id);
}
});
}
}
});
});
</script>
@@ -0,0 +1,61 @@
<div class="panel">
<div class="panel-heading tabs-box">
<ul class="nav nav-tabs">
@foreach(Workflow::$_timeout as $_key => $_option)
<li class="@if($query['option'] == $_key) active @endif">
<a class="text-sm" href="{{url('timeout',['option'=>$_key])}}">{{$_option}}</a>
</li>
@endforeach
</ul>
</div>
<div class="row wrapper">
<div class="col-sm-12">
<form id="myform" role="form" class="pull-right form-inline" name="myform" action="{{url()}}" method="get">
<!--
办理状态
<select id='flag' name='flag' data-toggle="redirect" rel="{{url($action, $query)}}">
<option value="1" @if($query['flag'] == 1) selected @endif>办理中</option>
<option value="2" @if($query['flag'] == 2) selected @endif>已办理</option>
</select>
-->
<button type="submit" class="btn btn-default btn-sm">过滤</button>
</form>
</div>
</div>
<div class="table-responsive">
<table class="table table-hover b-t">
<thead>
<tr>
<th align="left">人员</th>
<th align="right" width="160">办理总数</th>
<th align="right" width="160">超时数量(办理中)</th>
<th align="right" width="160">超时数量(已办理)</th>
<th align="right" width="160">超时总计</th>
</tr>
</thead>
<tbody>
@if($rows)
@foreach($rows as $user_id => $row)
<tr>
<td align="left">{{get_user($user_id, 'name')}}</td>
<td align="right">{{$row['count']}}</td>
<td align="right">
{{(int)$row['timeout_1']}}
</td>
<td align="right">
{{(int)$row['timeout_2']}}
</td>
<td align="right">
{{(int)$row['timeout_1'] + $row['timeout_2']}}
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</div>
@@ -0,0 +1,78 @@
<div class="panel">
<div class="panel-heading tabs-box">
<ul class="nav nav-tabs">
@foreach(Workflow::$_timeout as $_key => $_option)
<li class="@if($query['option'] == $_key) active @endif">
<a class="text-sm" href="{{url('timeout',['option'=>$_key])}}">{{$_option}}</a>
</li>
@endforeach
</ul>
</div>
<div class="row wrapper">
<div class="col-sm-12">
<form id="myform" role="form" class="pull-right form-inline" name="myform" action="{{url()}}" method="get">
办理状态
<select id='flag' name='flag' data-toggle="redirect" rel="{{url($action, $query)}}">
<option value="1" @if($query['flag'] == 1) selected @endif>办理中</option>
<option value="2" @if($query['flag'] == 2) selected @endif>已办理</option>
</select>
<button type="submit" class="btn btn-default btn-sm">过滤</button>
</form>
</div>
</div>
<div class="table-responsive">
<table class="table table-hover b-t">
<thead>
<tr>
<th align="center" width="60">编号</th>
<th align="left">主题 / 文号</th>
<th width="120">主办人</th>
<th align="left" width="240">步骤</th>
<th width="80">状态</th>
<th width="140">超时 / 办理时限</th>
</tr>
</thead>
<tbody>
@if($rows)
@foreach($rows as $row)
<tr>
<td align="center">{{$row['id']}}</td>
<td>
<a href="{{url('view')}}?process_id={{$row['id']}}">{{$row['title']}}</a>
<div class="text-muted">{{$row['name']}}</div>
</td>
<td align="center">{{get_user($row['user_id'], 'name')}}</td>
<td>
<span class="badge">{{$row['step_number']}}</span>
<a href="javascript:;">{{$row['step_name']}}</a>
</td>
<td align="center">
@if($row['flag'] == 2)
<div class="label label-success">已办理</div>
@else
<div class="label label-danger">办理中</div>
@endif
</td>
<td align="center">
{{remain_time(time(), $row['timeout_diff'] + time())}}
<div class="text-muted">{{$row['step_timeout']}}小时</div>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
<footer class="panel-footer">
<div class="row">
<div class="col-sm-12 text-right text-center-xs">
{{$rows->render()}}
</div>
</div>
</footer>
</div>
@@ -0,0 +1,99 @@
<div class="panel">
<div class="wrapper">
<form id="search-form" class="form-inline" name="mysearch" action="{{url()}}" method="get">
<div class="input-group">
<button type="button" class="btn btn-sm btn-default" data-toggle="dropdown">
批量操作
<span class="caret"></span>
</button>
<ul class="dropdown-menu text-xs">
@if(isset($access['delete']))
<li><a href="javascript:optionDelete('#myform','{{url('delete',['status'=>'1'])}}','确定要恢复流程吗?');"><i class="icon icon-play"></i> 恢复</a></li>
@endif
@if(isset($access['destroy']))
<li class="divider"></li>
<li><a href="javascript:optionDelete('#myform','{{url('destroy')}}', '流程将被永久删除?');"><i class="icon icon-remove"></i> 销毁</a></li>
@endif
</ul>
</div>
@include('workflow/select')
</form>
</div>
<form method="post" id="myform" name="myform">
<div class="table-responsive">
<table class="table m-b-none b-t table-hover">
<thead>
<tr>
<th align="center">
<input class="select-all" type="checkbox">
</th>
<th align="left">主题 / 文号</th>
<th>发起人</th>
<th>当前主办人</th>
<th align="left">步骤</th>
<th>状态</th>
<th align="center">ID</th>
</tr>
</thead>
<tbody>
@if($rows)
@foreach($rows as $row)
<tr>
<td align="center">
@if(isset($access['delete']) && ($row['start_user_id'] == Auth::id() || $access['trash'] == 4))
<input class="select-row" type="checkbox" name="id[]" value="{{$row['id']}}">
@else
<input type="checkbox" disabled>
@endif
</td>
<td>
<a data-toggle="layer-frame-url" href="#{{$row['id']}}" data-skin="gdoo" data-url="{{url('view')}}?process_id={{$row['id']}}">{{$row['title']}}</a>
<div class="text-muted">{{$row['name']}}</div>
</td>
<td align="center">{{get_user($row['start_user_id'], 'name')}}</td>
<td align="center">{{get_user($row['step']['user_id'], 'name')}}</td>
<td>
<span class="badge">{{$row['step']['number']}}</span>
<a href="javascript:viewBox('process-log','流程记录','{{url('log', ['process_id' => $row['id']])}}');">{{$row['step']['name']}}</a>
<div class="">
<?php /*
if ($row['step']['timeout'])
{
$timeout = 6 * 60;
$start = Carbon\Carbon::createFromTimeStamp($row['step']['add_time']);
echo Carbon\Carbon::now()->diffInHours($start);
} */
?>
</div>
</td>
<td align="center">
@if($row['end_time'])
<span class="label label-info">已结束</span>
@else
<span class="label label-success">执行中</span>
@endif
</td>
<td align="center">{{$row['id']}}</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</form>
<footer class="panel-footer">
<div class="row">
<div class="col-sm-1 hidden-xs">
</div>
<div class="col-sm-11 text-right text-center-xs">
{{$rows->render()}}
</div>
</div>
</footer>
</div>
@@ -0,0 +1,132 @@
<style type="text/css">
.content-body {
margin: 0;
}
@media screen and (max-width: 767px) {
.table-responsive td, .table-responsive th {
white-space: normal !important;
}
}
</style>
<div class="form-panel">
<div class="form-panel-header">
<div class="pull-right">
</div>
<a href="javascript:addMarketCost();" class="btn btn-sm btn-info"><i class="fa fa-check"></i> 提取费用</a>
@if($work['print'] > 0)
<a target="_blank" href="{{url('print', ['process_id' => $process['id']])}}" class="btn btn-sm btn-primary"><i class="icon icon-print"></i> 打印</a>
@endif
</div>
<div class="form-panel-body">
<div class="panel">
<div class="panel-heading text-base">
<i class="fa fa-file-text"></i> 工作主题
</div>
<div class="table-responsive">
<table class="table">
<tr>
<th align="right">工作主题</th>
<td>{{$process['title']}}</td>
<th align="right">工作ID</th>
<td>{{$process['id']}}</td>
</tr>
<tr>
<th width="15%" align="right">工作文号</th>
<td width="35%">{{$process['name']}}</td>
<th width="15%" align="right">重要等级</th>
<td width="35%">
{{:$levels = array(1=>'普通',2=>'重要',3=>'紧急')}}
{{$levels[$process['level']]}}
</td>
</tr>
<tr>
<th align="right">发起人</th>
<td>{{get_user($process['start_user_id'], 'name')}}</td>
<th align="right">工作描述</th>
<td>{{$process['description']}}</td>
</tr>
</table>
</div>
</div>
<div class="panel">
<div class="panel-heading text-base">
<i class="fa fa-list-alt"></i> 工作表单
</div>
<div class="table-responsive no-borders">
<table class="table">
<tr>
<td style="background:url('{{$asset_url}}/images/form_sheetbg.png');">
<div style="width:960px;margin:0 auto;padding:15px;">
<div class="shadow">
<span class="z corner_41"></span>
<span class="y corner_12"></span>
<div class="workflow" style="margin:10px;">
{{$template}}
</div>
<span class="z corner_34"></span>
<span class="y corner_23"></span>
</div>
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="panel">
<div class="panel-heading text-base">
<i class="icon icon-paperclip"></i> 公共附件区
</div>
<div class="panel-body b-t">
@if($attach['auth']['view'] == true)
@include('attachment/file')
@endif
</div>
</div>
</div>
</div>
<script type="text/javascript">
function addCustomerCost() {
formDialog({
title: '新建费用记录',
url: app.url('customerCost/cost/create', {content:'测试内容', money: '21212'}),
id: 'customer_cost',
table: 'customer_cost',
dialogClass: 'modal-lg',
success: function(res) {
toastrSuccess(res.data);
$(this).dialog("close");
},
error: function(res) {
toastrError(res.data);
}
});
}
$(function() {
$('tbody').on('change',function(i) {
listView.rowUpdate(i);
});
{{$jsonload}}
});
// 工作流全局对象
var workFlow = {{$work['js']}};
// 工作流js定义区域
{{$js}}
</script>