创建版本
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<form method="post" id="model_bill" name="model_bill">
|
||||
<table class="table table-form m-b-none">
|
||||
<tr>
|
||||
<td align="right" width="10%">流程名称</th>
|
||||
<td><input type="text" id="name" name="name" value="{{$bill->name}}" class="form-control input-sm"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right">流程编码</th>
|
||||
<td><input type="text" id="code" name="code" value="{{$bill->code}}" class="form-control input-sm"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right">流程类别</td>
|
||||
<td>
|
||||
<select class="form-control input-sm" name="category_id" id="category_id">
|
||||
@foreach($categorys as $category)
|
||||
<option value="{{$category->id}}" @if($category->id == $bill->category_id) selected @endif>{{$category->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right">编号前缀</th>
|
||||
<td><input type="text" id="sn_prefix" name="sn_prefix" value="{{$bill->sn_prefix}}" class="form-control input-sm"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right">编号规则</th>
|
||||
<td><input type="text" id="sn_rule" name="sn_rule" value="{{$bill->sn_rule}}" class="form-control input-sm"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right">编号长度</th>
|
||||
<td><input type="text" id="sn_length" name="sn_length" value="{{$bill->sn_length}}" class="form-control input-sm"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right">支持回收站</td>
|
||||
<td>
|
||||
<label class="radio-inline"><input type="radio" @if($bill['is_trash'] == 0) checked @endif value="0" name="is_trash"> 否 </label>
|
||||
<label class="radio-inline"><input type="radio" @if($bill['is_trash'] == 1) checked @endif value="1" name="is_trash"> 是 </label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<input type="hidden" name="id" value="{{$bill->id}}">
|
||||
</form>
|
||||
@@ -0,0 +1,95 @@
|
||||
{{$header["js"]}}
|
||||
|
||||
<div class="panel no-border" id="{{$header['master_table']}}-controller">
|
||||
@include('headers')
|
||||
<div class='list-jqgrid'>
|
||||
<div id="{{$header['master_table']}}-grid" style="width:100%;" class="ag-theme-balham"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
(function ($) {
|
||||
var table = '{{$header["master_table"]}}';
|
||||
var config = gdoo.grids[table];
|
||||
var action = config.action;
|
||||
var search = config.search;
|
||||
|
||||
action.dialogType = 'dialog';
|
||||
|
||||
// 自定义搜索方法
|
||||
search.searchInit = function (e) {
|
||||
var self = this;
|
||||
}
|
||||
|
||||
action.view = function(data) {
|
||||
var me = this;
|
||||
var grid = config.grid;
|
||||
var url = app.url('workflow/template/index', {bill_id: data.master_id});
|
||||
var index = layer.open({
|
||||
skin: 'layui-layer-frame',
|
||||
scrollbar: false,
|
||||
closeBtn: 2,
|
||||
title: data.master_name + '[视图]',
|
||||
type: 2,
|
||||
move: false,
|
||||
area: ['100%', '100%'],
|
||||
content: url,
|
||||
});
|
||||
}
|
||||
action.flow = function(data) {
|
||||
var me = this;
|
||||
var grid = config.grid;
|
||||
top.addTab('model/step/index2?bill_id=' + data.master_id, 'flow_step_index2', '单据流程');
|
||||
}
|
||||
action.permission = function(data) {
|
||||
var me = this;
|
||||
var grid = config.grid;
|
||||
var url = app.url('model/permission/index', {bill_id: data.master_id});
|
||||
var index = layer.open({
|
||||
skin: 'layui-layer-frame',
|
||||
scrollbar: false,
|
||||
closeBtn: 2,
|
||||
title: data.master_name + '[权限]',
|
||||
type: 2,
|
||||
move: false,
|
||||
area: ['100%', '100%'],
|
||||
content: url,
|
||||
});
|
||||
}
|
||||
|
||||
var options = new agGridOptions();
|
||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||
gridDiv.style.height = getPanelHeight(48);
|
||||
|
||||
options.remoteDataUrl = '{{url()}}';
|
||||
options.remoteParams = search.advanced.query;
|
||||
options.columnDefs = config.cols;
|
||||
options.onRowDoubleClicked = function (params) {
|
||||
if (params.node.rowPinned) {
|
||||
return;
|
||||
}
|
||||
if (params.data == undefined) {
|
||||
return;
|
||||
}
|
||||
if (params.data.master_id > 0) {
|
||||
action.edit(params.data);
|
||||
}
|
||||
};
|
||||
|
||||
new agGrid.Grid(gridDiv, options);
|
||||
|
||||
// 读取数据
|
||||
options.remoteData({page: 1});
|
||||
|
||||
// 绑定自定义事件
|
||||
var $gridDiv = $(gridDiv);
|
||||
$gridDiv.on('click', '[data-toggle="event"]', function () {
|
||||
var data = $(this).data();
|
||||
if (data.master_id > 0) {
|
||||
action[data.action](data);
|
||||
}
|
||||
});
|
||||
config.grid = options;
|
||||
})(jQuery);
|
||||
|
||||
</script>
|
||||
@include('footers')
|
||||
@@ -0,0 +1,20 @@
|
||||
<form method="post" id="model_bill_category" name="model_bill_category">
|
||||
<table class="table table-form m-b-none">
|
||||
<tr>
|
||||
<td align="right" width="10%">名称</th>
|
||||
<td><input type="text" id="name" name="name" value="{{$category->name}}" class="form-control input-sm"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right">备注</th>
|
||||
<td><textarea id="remark" name="remark" class="form-control input-sm">{{$category->remark}}</textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right">排序</th>
|
||||
<td><input type="text" id="sort" name="sort" value="{{$category->sort}}" class="form-control input-sm"></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<input type="hidden" name="id" value="{{$category->id}}">
|
||||
</form>
|
||||
@@ -0,0 +1,59 @@
|
||||
{{$header["js"]}}
|
||||
|
||||
<div class="panel no-border" id="{{$header['master_table']}}-controller">
|
||||
@include('headers')
|
||||
<div class='list-jqgrid'>
|
||||
<div id="{{$header['master_table']}}-grid" style="width:100%;" class="ag-theme-balham"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
(function ($) {
|
||||
var table = '{{$header["master_table"]}}';
|
||||
var config = gdoo.grids[table];
|
||||
var action = config.action;
|
||||
var search = config.search;
|
||||
|
||||
action.dialogType = 'dialog';
|
||||
|
||||
// 自定义搜索方法
|
||||
search.searchInit = function (e) {
|
||||
var self = this;
|
||||
}
|
||||
|
||||
var options = new agGridOptions();
|
||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||
gridDiv.style.height = getPanelHeight(48);
|
||||
|
||||
options.remoteDataUrl = '{{url()}}';
|
||||
options.remoteParams = search.advanced.query;
|
||||
options.columnDefs = config.cols;
|
||||
options.onRowDoubleClicked = function (params) {
|
||||
if (params.node.rowPinned) {
|
||||
return;
|
||||
}
|
||||
if (params.data == undefined) {
|
||||
return;
|
||||
}
|
||||
if (params.data.master_id > 0) {
|
||||
action.edit(params.data);
|
||||
}
|
||||
};
|
||||
|
||||
new agGrid.Grid(gridDiv, options);
|
||||
|
||||
// 读取数据
|
||||
options.remoteData({page: 1});
|
||||
|
||||
// 绑定自定义事件
|
||||
var $gridDiv = $(gridDiv);
|
||||
$gridDiv.on('click', '[data-toggle="event"]', function () {
|
||||
var data = $(this).data();
|
||||
if (data.master_id > 0) {
|
||||
action[data.action](data);
|
||||
}
|
||||
});
|
||||
config.grid = options;
|
||||
})(jQuery);
|
||||
|
||||
</script>
|
||||
@include('footers')
|
||||
@@ -0,0 +1,82 @@
|
||||
<div class="panel">
|
||||
<form method="post" action="{{url()}}" id="myform" name="myform">
|
||||
<table class="table table-form m-b-none">
|
||||
<tr>
|
||||
<td align="right" width="10%">流程名称 <span style="color:red;">*</span></td>
|
||||
<td><input type="text" id="title" name="title" value="{{$row['title']}}" class="form-control input-sm"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right">发起权限 <span style="color:red;">*</span></td>
|
||||
<td>
|
||||
{{App\Support\Dialog::search($row, 'id=auth_id&name=auth_name&multi=1')}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right">查询权限 <span style="color:red;">*</span></td>
|
||||
<td>
|
||||
{{App\Support\Dialog::search($row, 'id=query_id&name=query_name&multi=1')}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right">流程类型 <span style="color:red;">*</span></td>
|
||||
<td>
|
||||
<label class="radio-inline"><input type="radio" name="type" value="1" @if($row['id'] > 0) disabled @endif @if($row['type']==1) checked @endif>固定流程</label>
|
||||
<label class="radio-inline"><input type="radio" name="type" value="2" @if($row['id'] > 0) disabled @endif @if($row['type']==2) checked @endif>自由流程</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right">使用状态 <span style="color:red;">*</span></td>
|
||||
<td>
|
||||
<label class="radio-inline" title="所有用户都可以在前台新建工作里看到该流程,但无权限用户不能点击">
|
||||
<input name="state" value="1" type="radio" checked="checked">
|
||||
可见
|
||||
</label>
|
||||
<label class="radio-inline" title="只有拥有权限的用户才能在前台新建工作中看到,并可点击">
|
||||
<input name="state" value="2" type="radio">
|
||||
不可见
|
||||
</label>
|
||||
<label class="radio-inline" title="无论用户有无权限,都不会在前台新建工作中显示">
|
||||
<input name="state" value="3" type="radio">
|
||||
锁定
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right">所属类别 <span style="color:red;">*</span></td>
|
||||
<td align="left">
|
||||
<select class="form-control input-sm" name="category_id" id="category_id">
|
||||
<option value=""> - </option>
|
||||
@if($category)
|
||||
@foreach($category as $k => $v)
|
||||
<option value="{{$v['id']}}" @if($row['category_id']==$v['id']) selected @endif >{{$v['title']}}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right">流程备注</td>
|
||||
<td><textarea id="remark" name="remark" class="form-control input-sm">{{$row['remark']}}</textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right"></td>
|
||||
<td>
|
||||
<input type="hidden" name="id" value="{{$row['id']}}">
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check-circle"></i> 提交</button>
|
||||
<button type="button" onclick="history.back();" class="btn btn-default">返回</button>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,51 @@
|
||||
<div class="panel">
|
||||
|
||||
<div class="wrapper">
|
||||
@include('design/query')
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover b-t">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align="left">名称</th>
|
||||
<th align="center" width="140">类别</th>
|
||||
<th align="center" width="120">类型</th>
|
||||
<th align="center" width="80">数量</th>
|
||||
<th align="center" width="60">编号</th>
|
||||
<th align="center" width="300"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if($rows)
|
||||
@foreach($rows as $row)
|
||||
<tr>
|
||||
<td align="left">{{$row['title']}}</td>
|
||||
<td align="center">{{$categorys[$row->category_id]->title}}</td>
|
||||
<td align="center"> @if($row['type']==1) 固定 @else 自由 @endif 流程</td>
|
||||
<td align="center"><span class="badge bg-info">{{(int)$counts[$row->id]}}</span></td>
|
||||
<td align="center">{{$row['id']}}</td>
|
||||
<td align="center">
|
||||
<a class="option" href="{{url('form/index',['work_id'=>$row['id']])}}">表单设计</a>
|
||||
<a class="option" href="{{url('step/index',['work_id'=>$row['id']])}}">流程设计</a>
|
||||
<a class="option" href="{{url('form/view',['id'=>$row['id']])}}">预览</a>
|
||||
<a class="option" href="{{url('add',['id'=>$row['id']])}}">编辑</a>
|
||||
<a class="option" href="javascript:app.confirm('{{url('delete',['id'=>$row['id']])}}','确定要删除吗?');">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<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,27 @@
|
||||
<form id="search-form" class="form-inline" name="mysearch" action="{{url()}}" method="get">
|
||||
|
||||
@if(isset($access['add']))
|
||||
<a href="{{url('add')}}" class="btn btn-sm btn-info"><i class="icon icon-plus"></i> 新建</a>
|
||||
@endif
|
||||
|
||||
@include('searchForm')
|
||||
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('#search-form').searchForm({
|
||||
data:{{json_encode($search['forms'])}},
|
||||
init:function(e) {
|
||||
var self = this;
|
||||
e.category = function(i) {
|
||||
var rows = [];
|
||||
var categorys = {{json_encode($categorys)}};
|
||||
$.map(categorys, function(category) {
|
||||
rows.push({id:category.id,name:category.title});
|
||||
});
|
||||
self._select(rows, i);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,133 @@
|
||||
<script type="text/javascript">
|
||||
window.UEDITOR_HOME_URL = '{{$asset_url}}/vendor/ueditor/';
|
||||
</script>
|
||||
<script src="{{$asset_url}}/vendor/ueditor/ueditor.workflow.config.js"></script>
|
||||
<script src="{{$asset_url}}/vendor/ueditor/ueditor.all.min.js"></script>
|
||||
<script src="{{$asset_url}}/vendor/ueditor/ueditor.workflow.js"></script>
|
||||
|
||||
<form method="post" id="myform" name="myform">
|
||||
|
||||
<div class="panel">
|
||||
|
||||
<div class="panel-heading b-b b-light">
|
||||
<h4>{{$row['title']}}[{{$row['id']}}]</h4>
|
||||
<!--
|
||||
<div class="label label-info">表单智能设计器:首先将网页设计工具或Word编辑好的表格框架粘贴到表单设计区,然后创建表单控件</div>
|
||||
-->
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-10 m-b">
|
||||
<script type="text/plain" id="editor" name="template">{{$row['template']}}</script>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
|
||||
<div class="btn-group">
|
||||
<a onclick="tool.control('text');" class="btn btn-default btn-block btn-md"><i class="fa fa-font"></i> 单行文本</a>
|
||||
<a onclick="tool.control('textarea');" class="btn btn-default btn-block btn-md"><i class="fa fa-font"></i> 多行文本</a>
|
||||
<a onclick="tool.control('listmenu');" class="btn btn-default btn-block btn-md"><i class="fa fa-bars"></i> 下拉菜单</a>
|
||||
<a onclick="tool.control('radio');" class="btn btn-default btn-block btn-md"><i class="fa fa-check-circle"></i> 单选按钮</a>
|
||||
<a onclick="tool.control('checkbox');" class="btn btn-default btn-block btn-md"><i class="fa fa-check-square"></i> 复选按钮</a>
|
||||
<a onclick="tool.control('listview');" class="btn btn-default btn-block btn-md"><i class="fa fa-th"></i> 列表控件</a>
|
||||
<a onclick="tool.control('auto');" class="btn btn-default btn-block btn-md"><i class="fa fa-gear"></i> 宏控件</a>
|
||||
<a onclick="tool.control('calendar');" class="btn btn-default btn-block btn-md"><i class="fa fa-calendar"></i> 日历控件</a>
|
||||
<a onclick="tool.control('calc');" class="btn btn-default btn-block btn-md"><i class="fa fa-building"></i> 计算控件</a>
|
||||
<a onclick="tool.control('user');" class="btn btn-default btn-block btn-md"><i class="fa fa-group"></i> 部门人员控件</a>
|
||||
<a onclick="tool.control('imgupload');" class="btn btn-default btn-block btn-md"><i class="fa fa-photo"></i> 图片上传控件</a>
|
||||
<!--
|
||||
<a onclick="tool.control('sign');" class="btn btn-default btn-block btn-md ">签章控件</a>
|
||||
<a onclick="tool.control('data_select');" class="btn btn-default btn-block btn-md">数据选择控件</a>
|
||||
<a onclick="tool.control('data_fetch');" class="btn btn-default btn-block btn-md">表单数据控件</a>
|
||||
<a onclick="tool.control('progressbar');" class="btn btn-default btn-block btn-md">进度条控件</a>
|
||||
<a onclick="tool.control('qrcode');" class="btn btn-default btn-block btn-md"><span class="fa fa-qrcode"></span> 二维码控件</a>
|
||||
-->
|
||||
|
||||
</div>
|
||||
|
||||
<div class="m-t btn-group btn-group-justified">
|
||||
<a onclick="tool.review({{$row['id']}})" class="btn btn-primary">预览</a>
|
||||
<a onclick="tool.checkForm('ver')" class="btn btn-primary">版本</a>
|
||||
<a onclick="tool.close();" class="btn btn-primary">关闭</a>
|
||||
</div>
|
||||
|
||||
<div class="m-t btn-group btn-group-justified">
|
||||
<a autocomplete="off" onclick="tool.checkForm()" class="btn btn-lg btn-success"><i class="fa fa-check-circle"></i> 保存表单</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="work_id" id="work_id" value="{{$row['id']}}">
|
||||
<input type="hidden" name="count_item" id="count_item" value="{{url('count')}}?work_id={{$row['id']}}">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
var tool = {
|
||||
checkForm:function(type) {
|
||||
|
||||
// 显示loading
|
||||
if(editor.hasContents()) {
|
||||
|
||||
// 同步内容
|
||||
editor.sync();
|
||||
|
||||
if(typeof type !== 'undefined') {
|
||||
document.myform.type.value = type;
|
||||
}
|
||||
|
||||
var myform = $('#myform').serialize();
|
||||
$.post('{{url()}}', myform, function(res) {
|
||||
if(res.status) {
|
||||
toastrSuccess('保存成功。');
|
||||
}
|
||||
},'json');
|
||||
|
||||
} else {
|
||||
toastrError('表单内容不能为空。');
|
||||
return false;
|
||||
}
|
||||
},
|
||||
close:function() {
|
||||
$.messager.confirm('操作警告', '关闭表单前,您是否要保存?', function(btn) {
|
||||
if (btn == true) {
|
||||
this.checkForm('close');
|
||||
}
|
||||
});
|
||||
},
|
||||
control:function(method) {
|
||||
editor.execCommand(method);
|
||||
},
|
||||
review:function(id) {
|
||||
$.dialog({
|
||||
title:'表单预览',
|
||||
dialogClass:'modal-lg',
|
||||
url:app.url('workflow/form/view', {review:true,id:id}),
|
||||
buttons:[{
|
||||
text: '确定',
|
||||
'class': 'btn-primary',
|
||||
click: function() {
|
||||
$(this).dialog('close');
|
||||
}
|
||||
},{
|
||||
text: '取消',
|
||||
'class': 'btn-default',
|
||||
click: function() {
|
||||
$(this).dialog('close');
|
||||
}
|
||||
}]
|
||||
});
|
||||
},
|
||||
checkClose:function() {
|
||||
if(event.clientX > document.body.clientWidth-20 && event.clientY < 0 || event.altKey) {
|
||||
window.event.returnValue = '您确定退出表单设计器吗';
|
||||
}
|
||||
}
|
||||
}
|
||||
var editor = UE.getEditor('editor',{'minFrameHeight':480,'initialFrameWidth':'100%'});
|
||||
</script>
|
||||
<div onbeforeunload="tool.checkClose();">
|
||||
@@ -0,0 +1,18 @@
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('tbody').on('change',function(i) {
|
||||
listView.rowUpdate(i);
|
||||
});
|
||||
{{$jsonload}}
|
||||
});
|
||||
|
||||
// 工作流全局对象
|
||||
var workFlow = {{$work['js']}};
|
||||
|
||||
// 工作流js定义区域
|
||||
{{$js}}
|
||||
|
||||
</script>
|
||||
<div class="workflow" style="padding-top:10px;">
|
||||
{{$template}}
|
||||
</div>
|
||||
@@ -0,0 +1,44 @@
|
||||
<script type="text/javascript">
|
||||
$(document).ready(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-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>
|
||||
@@ -0,0 +1,97 @@
|
||||
<script type="text/javascript">
|
||||
var uploader = {
|
||||
file:function(fileId) {
|
||||
var id = $('#'+fileId).find(".id").val();
|
||||
location.href = '{{url('file/attachment/file')}}?model={{$attach['model']}}&id='+id;
|
||||
},
|
||||
cancel:function(fileId) {
|
||||
var id = $('#'+fileId).find(".id").val();
|
||||
if (id > 0) {
|
||||
var name = $('#'+fileId).find(".fileName a").text();
|
||||
$.messager.confirm('操作警告', '确定要删除 <strong>'+name+'</strong> 此文件吗', function(btn) {
|
||||
if (btn == true) {
|
||||
var url = "{{url('file/attachment/delete')}}";
|
||||
$.get(url,{model:"{{$attach['model']}}",id:id},function(res) {
|
||||
if(res == 1) {
|
||||
$('#'+fileId).remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('#'+fileId).remove();
|
||||
}
|
||||
},
|
||||
copyLink:function() {
|
||||
var clipBoardContent = this.location.href;
|
||||
window.clipboardData.setData("Text", clipBoardContent);
|
||||
alert("复制成功。");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script id="uploader-item-tpl" type="text/html">
|
||||
<div id="<%=fileId%>" class="uploadify-queue-item">
|
||||
<span class="file-name"><span class="text-danger" title="草稿状态">!</span> <a href="javascript:uploader.file('<%=fileId%>');"><%=title%></a></span>
|
||||
<span class="file-size">(<%=size%>)</span>
|
||||
<span class="cancel"><a class="option" href="javascript:uploader.cancel('<%=fileId%>');">删除</a></span>
|
||||
<input type="hidden" class="id" name="attachment[]" value="<%=id%>" />
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</script>
|
||||
|
||||
@if($attach['auth']['add'] == true)
|
||||
|
||||
<a class="btn btn-sm btn-info" href="javascript:viewBox('reader', '文件上传', '{{url('file/attachment/uploader', ['model' => $attach['model'], 'path' => $attach['path']])}}');"><i class="fa fa-cloud-upload"></i> 文件上传</a>
|
||||
<span class="uploader-size"> 文件大小限制{{$setting['upload_max']}} MB</span>
|
||||
<!--
|
||||
<input type="file" name="uploadify" id="uploadify">
|
||||
<div class="uploadify-info text-ellipsis"> 支持{{strtoupper($setting['upload_type'])}}, 不超过{{$setting['upload_max']}}MB</div>
|
||||
<div class="clear"></div>
|
||||
-->
|
||||
|
||||
@endif
|
||||
|
||||
<div id="fileQueue">
|
||||
@if($attach['queue'])
|
||||
@if($attach['queue'])
|
||||
@foreach($attach['queue'] as $v)
|
||||
<div id="file_queue_{{$v['id']}}" class="uploadify-queue-item">
|
||||
<span class="file-name"><a href="javascript:uploader.file('file_queue_{{$v['id']}}');">{{$v['title']}}</a></span>
|
||||
<span class="file-size">(
|
||||
上传者: {{get_user($v['add_user_id'], 'name')}}
|
||||
上传时间: @datetime($v['add_time'])
|
||||
大小: {{human_filesize($v['size'])}}
|
||||
)</span>
|
||||
|
||||
@if($attach['auth']['add'] == true)
|
||||
<span class="insert"><a class="option" href="javascript:uploader.cancel('file_queue_{{$v['id']}}');">删除</a></span>
|
||||
@endif
|
||||
|
||||
<input type="hidden" class="id" name="attachment[]" value="{{$v['id']}}">
|
||||
</div><div class="clearfix"></div>
|
||||
@endforeach
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div id="fileQueueDraft">
|
||||
@if($attach['draft'])
|
||||
@foreach($attach['draft'] as $k => $v)
|
||||
<div id="queue_draft_{{$v['id']}}" class="uploadify-queue-item">
|
||||
<span class="file-name"><strong class="red" title="草稿附件">!</strong> <a href="javascript:uploader.file('queue_draft_{{$v['id']}}');">{{$v['title']}}</a></span>
|
||||
<span class="file-size">(
|
||||
上传者: {{get_user($v['add_user_id'], 'name')}}
|
||||
上传时间: @datetime($v['add_time'])
|
||||
大小: {{human_filesize($v['size'])}}
|
||||
)</span>
|
||||
|
||||
@if($attach['auth']['add'] == true)
|
||||
<span class="insert"><a class="option" href="javascript:uploader.cancel('queue_draft_{{$v['id']}}');">删除</a></span>
|
||||
@endif
|
||||
|
||||
<input type="hidden" class="id" name="attachment[]" value="{{$v['id']}}">
|
||||
</div><div class="clearfix"></div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
@@ -0,0 +1,17 @@
|
||||
<form id="search-form" class="form-inline" name="mysearch" action="{{url()}}" method="get">
|
||||
@include('searchForm')
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('#search-form').searchForm({
|
||||
data: {{json_encode($search['forms'])}},
|
||||
init: function(e) {
|
||||
var self = this;
|
||||
e.category = function(i) {
|
||||
self._select({{search_select($categorys)}}, i);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,42 @@
|
||||
<div class="panel">
|
||||
|
||||
<div class="wrapper">
|
||||
@include('monitor/query')
|
||||
</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="left">姓名</th>
|
||||
<th align="right">待办数量</th>
|
||||
<th align="right">超过一天</th>
|
||||
<th align="right">超过三天</th>
|
||||
<th align="right">超过三十天</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($rows as $row)
|
||||
<tr>
|
||||
<td align="left">{{$row['name']}}</td>
|
||||
<td align="right">{{$row['total']}}</td>
|
||||
<td align="right">{{$row['a']}}</td>
|
||||
<td align="right">{{$row['b']}}</td>
|
||||
<td align="right">{{$row['c']}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</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">
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
@@ -0,0 +1,820 @@
|
||||
<script type="text/javascript">
|
||||
var rows = {{json_encode($rows)}};
|
||||
var condition = {
|
||||
// 检查公式
|
||||
checkExp:function(text)
|
||||
{
|
||||
if(text.indexOf("(") >= 0) {
|
||||
var num1 = text.split("(").length;
|
||||
var num2 = text.split(")").length;
|
||||
if(num1 != num2) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
/**
|
||||
* 增加左括号表达式,会断行
|
||||
*/
|
||||
addLeft:function(id)
|
||||
{
|
||||
var oObj = getId('condition_list_'+id);
|
||||
var current = 0;
|
||||
//检查是否有条件
|
||||
if(oObj.options.length > 0)
|
||||
{
|
||||
for( var i = 0;i < oObj.options.length;i++) {
|
||||
if(oObj.options[i].selected) {
|
||||
current = oObj.selectedIndex;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(current == 0) {
|
||||
current = oObj.options.length-1;
|
||||
}
|
||||
} else {
|
||||
//有条件才能添加左括号表达式
|
||||
toastrError('请先添加条件,再选择括号', '步骤设计');
|
||||
return;
|
||||
}
|
||||
var sText = oObj.options[current].text;
|
||||
//已经有条件的话
|
||||
if( (sText.trim().substr(-3,3) == 'AND') || (sText.trim().substr(-2,2) == 'OR'))
|
||||
{
|
||||
toastrError('无法编辑已经存在关系的条件', '步骤设计');
|
||||
return;
|
||||
}
|
||||
|
||||
var sRelation = getId('relation_'+id).value;
|
||||
if(sText.indexOf('(') >= 0)
|
||||
{
|
||||
if(!condition.CheckExp(sText))
|
||||
{
|
||||
toastrError('条件表达式书写错误,请检查括号匹配', '步骤设计');
|
||||
return;
|
||||
} else {
|
||||
sText = sText + " " + sRelation;
|
||||
}
|
||||
} else {
|
||||
sText = sText + " " + sRelation;
|
||||
}
|
||||
oObj.options[current].text = sText;
|
||||
var oMyop = document.createElement('option');
|
||||
oMyop.text = "(";
|
||||
var nPos = oObj.options.length;
|
||||
oObj.appendChild(oMyop,nPos);
|
||||
},
|
||||
/**
|
||||
* 增加右括号表达式
|
||||
*/
|
||||
addRight:function(id)
|
||||
{
|
||||
var oObj = getId('condition_list_'+id);
|
||||
var current = 0;
|
||||
if(oObj.options.length > 0) {
|
||||
for (var i = 0;i < oObj.options.length;i++) {
|
||||
if(oObj.options[i].selected) {
|
||||
current = oObj.selectedIndex;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(current == 0) {
|
||||
current = oObj.options.length-1;
|
||||
}
|
||||
} else {
|
||||
toastrError('请先添加条件,再选择括号');
|
||||
return;
|
||||
}
|
||||
var sText = oObj.options[current].text;
|
||||
if((sText.trim().substr(-3,3)=='AND') || (sText.trim().substr(-2,2)=='OR'))
|
||||
{
|
||||
toastrError('无法编辑已经存在关系的条件');
|
||||
return;
|
||||
}
|
||||
if(sText.trim().substr(-1,1)=='(')
|
||||
{
|
||||
toastrError('请添加条件');
|
||||
return;
|
||||
}
|
||||
if(!condition.checkExp(sText))
|
||||
{
|
||||
sText = sText + ")";
|
||||
}
|
||||
oObj.options[current].text = sText;
|
||||
},
|
||||
add:function(id)
|
||||
{
|
||||
var sField = $('#field_'+id).val(),sCon = $('#condition_'+id).val(),sValue = $('#item_value_'+id).val();
|
||||
var bAdd = true;
|
||||
if(sField !=='' && sCon !=='' && sValue !=='')
|
||||
{
|
||||
var oObj = getId('condition_list_'+id);
|
||||
if( oObj.length > 0) {
|
||||
var sLength = oObj.options.length;
|
||||
var sText = oObj.options[sLength-1].text;
|
||||
if(!condition.checkExp(sText)) {
|
||||
bAdd = false;
|
||||
}
|
||||
}
|
||||
|
||||
if(sValue.indexOf("'") >= 0) {
|
||||
toastrError("值中不能含有'号");
|
||||
return;
|
||||
}
|
||||
|
||||
// 字段有[]的时候不加`符号
|
||||
sField = sField.indexOf("[") == 0 ? sField : "`" + sField + "`";
|
||||
|
||||
var sNewText = sField + " " + sCon + " '" + sValue + "'";
|
||||
for( var i=0;i<oObj.options.length;i++ ) {
|
||||
if( oObj.options[i].text.indexOf(sNewText)>=0 ) {
|
||||
toastrError('条件重复');
|
||||
return;
|
||||
}
|
||||
}
|
||||
var sRelation = $('#relation_'+id).val();
|
||||
if(bAdd)
|
||||
{
|
||||
var oMyop = document.createElement('option');
|
||||
var nPos = oObj.options.length;
|
||||
oMyop.text = sNewText;
|
||||
oObj.appendChild(oMyop,nPos);
|
||||
if(nPos > 0) {
|
||||
oObj.options[nPos-1].text += " " + sRelation;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(oObj.options[sLength-1].text.trim().substr(-1,1)=='(')
|
||||
{
|
||||
oObj.options[sLength-1].text += sNewText;
|
||||
} else {
|
||||
oObj.options[sLength-1].text += " " + sRelation + " " + sNewText;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
toastrError('请补充完整条件');
|
||||
return;
|
||||
}
|
||||
},
|
||||
deleted:function(id)
|
||||
{
|
||||
var oObj = getId('condition_list_'+id);
|
||||
for (var i = 0;i < oObj.options.length;i++ ) {
|
||||
if(oObj.options[i].selected) {
|
||||
if(typeof oObj.options[i+1] == 'undefined') {
|
||||
if(typeof oObj.options[i-1] !== 'undefined') {
|
||||
oObj.options[i-1].text = oObj.options[i-1].text.replace(/(AND|OR)$/,'');
|
||||
}
|
||||
}
|
||||
oObj.removeChild(oObj.options[i]);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
},
|
||||
clear:function(id) {
|
||||
$('#condition_list_'+id).empty();
|
||||
},
|
||||
//根据基本信息的下一步骤,设置《条件设置》tab的条件列表
|
||||
init:function()
|
||||
{
|
||||
var step = $('#select_next_step input:checked');
|
||||
$('#ctbody').empty();
|
||||
for(var i = 0; i < step.length; i++)
|
||||
{
|
||||
var id = step[i].value;
|
||||
var text = step[i].title;
|
||||
var node = getId('tpl').innerHTML;
|
||||
var html = node.replace(/\@id/g,id);
|
||||
html = html.replace(/\@text/g,text);
|
||||
$('#ctbody').append(html);
|
||||
|
||||
var list = rows[id].condition.split("\n");
|
||||
for (var j = 0; j < list.length; j++) {
|
||||
if(list[j])
|
||||
{
|
||||
$('#condition_list_'+id).append('<option>'+list[j]+'</option>');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
//弹窗回调保存事件
|
||||
save:function()
|
||||
{
|
||||
var formData = $('#my_form_step').serialize();
|
||||
var nextStep = $('#select_next_step input:checked');
|
||||
var condition = {};
|
||||
for (var i = 0; i < nextStep.length; i++)
|
||||
{
|
||||
var id = nextStep[i].value;
|
||||
var list = getId('condition_list_'+id).options;
|
||||
var rows = [];
|
||||
for (var j = 0; j < list.length; j++) {
|
||||
if(list[j].text) {
|
||||
rows.push(list[j].text);
|
||||
}
|
||||
}
|
||||
// 空条件就赋值empty
|
||||
condition[id] = rows.length > 0 ? rows : 'empty';
|
||||
}
|
||||
var param = {conditions:condition};
|
||||
//console.log(formData);
|
||||
|
||||
$.post("{{url()}}",formData+'&'+$.param(param),function(data) {
|
||||
if(data.status) {
|
||||
workStep.init();
|
||||
toastrSuccess('操作成功', '步骤设计');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
function selectUser()
|
||||
{
|
||||
var value = getId('select_user_type').value;
|
||||
if(value == '0') {
|
||||
$('#lock_info').html("允许修改办理人相关选项");
|
||||
}
|
||||
else {
|
||||
$('#lock_info').html("允许修改办理人相关选项及默认会签人");
|
||||
}
|
||||
|
||||
$('#select_process_user').hide();
|
||||
$('#select_user').hide();
|
||||
$('#select_field_user').hide();
|
||||
|
||||
if(value == 6)
|
||||
$('#select_user').show();
|
||||
if(value == 7)
|
||||
$('#select_field_user').show();
|
||||
if(value == 8)
|
||||
$('#select_process_user').show();
|
||||
}
|
||||
|
||||
function getId(id) {
|
||||
return !id ? null : document.getElementById(id);
|
||||
}
|
||||
|
||||
$(function()
|
||||
{
|
||||
condition.init();
|
||||
|
||||
selectUser();
|
||||
|
||||
$("[data-toggle='tooltip']").tooltip();
|
||||
|
||||
// 表单字段 checkbox 点击交互函数
|
||||
$('#write').click(function()
|
||||
{
|
||||
if(this.checked)
|
||||
{
|
||||
check('write',true);
|
||||
$('#secret').attr({'disabled':true,'checked':false});
|
||||
$('#check').attr('checked',false).removeAttr('disabled');
|
||||
} else {
|
||||
check('write',false);
|
||||
$('#secret').attr('checked',false).removeAttr('disabled');
|
||||
$('#check').attr({'disabled':true,'checked':false});
|
||||
}
|
||||
});
|
||||
|
||||
$('#secret').click(function()
|
||||
{
|
||||
if(this.checked)
|
||||
{
|
||||
check('secret',true)
|
||||
$('#write').attr({'disabled':true,'checked':false});
|
||||
} else {
|
||||
check('secret',false);
|
||||
$('#write').attr('checked',false).removeAttr('disabled');
|
||||
}
|
||||
});
|
||||
|
||||
$('#check').click(function()
|
||||
{
|
||||
if(this.checked) {
|
||||
check('check',true)
|
||||
check('micro',true)
|
||||
} else {
|
||||
check('check',false);
|
||||
check('micro',false);
|
||||
}
|
||||
});
|
||||
|
||||
$("input[name='write[]']").click(function() {
|
||||
write_click(this);
|
||||
$('#write').removeAttr('disabled');
|
||||
if($('#write').attr('checked')==true) {
|
||||
$('#write').attr('checked',false)
|
||||
}
|
||||
});
|
||||
|
||||
$("input[name='secret[]']").click(function() {
|
||||
secret_click(this);
|
||||
$('#secret').removeAttr('disabled');
|
||||
if($('#secret').attr('checked')==true){
|
||||
$('#secret').attr('checked',false)
|
||||
}
|
||||
});
|
||||
|
||||
$("input[name='check[]']").click(function() {
|
||||
check_click(this);
|
||||
$('#check').removeAttr('disabled');
|
||||
if($('#check').attr('checked') == true) {
|
||||
$('#check').attr('checked',false)
|
||||
}
|
||||
});
|
||||
|
||||
$("input[name='micro[]']").click(function() {
|
||||
$('#check').removeAttr('disabled');
|
||||
if($('#check').attr('checked')==true){
|
||||
$('#check').attr('checked',false)
|
||||
}
|
||||
});
|
||||
|
||||
// 字段默认设置
|
||||
var process_str = '{{$field_select['write']}}';
|
||||
var parr = process_str.split(',');
|
||||
for( i=0;i<parr.length;i++ ) {
|
||||
if(parr[i]!=='') {
|
||||
$('#write_'+parr[i]).click();
|
||||
write_click(getId('write_'+parr[i]));
|
||||
}
|
||||
}
|
||||
var hidden_str = '{{$field_select['secret']}}';
|
||||
var harr = hidden_str.split(',');
|
||||
for(i=0;i<harr.length;i++) {
|
||||
if(harr[i]!=='') {
|
||||
$('#secret_'+harr[i]).click();
|
||||
secret_click(getId('secret_'+harr[i]));
|
||||
}
|
||||
}
|
||||
var micro_str = '{{$field_select['auto']}}';
|
||||
var marr = micro_str.split(',');
|
||||
for(i=0;i<marr.length;i++) {
|
||||
if(marr[i] !== '') {
|
||||
getId('micro_'+marr[i]).checked = true;
|
||||
}
|
||||
}
|
||||
@if($field_select['check'])
|
||||
var checkjson = jQuery.parseJSON('{{$field_select['check']}}');
|
||||
$.each(checkjson,function(i,n)
|
||||
{
|
||||
$('#regex_'+i).click();
|
||||
check_click(getId('regex_'+i));
|
||||
$('#regexList_'+i).val(n);
|
||||
});
|
||||
@endif
|
||||
});
|
||||
|
||||
// 表单字段 checkbox 点击交互函数
|
||||
//可写字段
|
||||
function write_click(d)
|
||||
{
|
||||
var id = $(d).attr('key');
|
||||
if(d.disabled == false)
|
||||
{
|
||||
if(d.checked)
|
||||
{
|
||||
$('#secret_'+id).attr('disabled',true);
|
||||
if($('#regex_'+id))
|
||||
{
|
||||
$('#regex_'+id).attr('checked',false).removeAttr('disabled');
|
||||
$('#regexList_'+id).hide();
|
||||
}
|
||||
if($('#micro_'+id))
|
||||
{
|
||||
$('#micro_'+id).attr('checked',false).removeAttr('disabled');
|
||||
$('#micro_'+id).parent().css('color','#000');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#secret_'+id).attr('checked',false).removeAttr('disabled');
|
||||
if($('#regex_'+id))
|
||||
{
|
||||
$('#regex_'+id).attr({'disabled':true,'checked':false});
|
||||
$('#regexList_'+id).attr('disabled',true).hide();
|
||||
}
|
||||
if($('#micro_'+id))
|
||||
{
|
||||
$('#micro_'+id).attr({'disabled':true,'checked':false});
|
||||
$('#micro_'+id).parent().css('color','#a0a0a0');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//字段验证
|
||||
function check_click(d)
|
||||
{
|
||||
if (d == null) {
|
||||
return;
|
||||
}
|
||||
var id = $(d).attr('key');
|
||||
if(d.disabled == false)
|
||||
{
|
||||
if(d.checked)
|
||||
{
|
||||
$('#regexList_'+id).removeAttr('disabled').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#regexList_'+id).attr('disabled',true).hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
//保密字段
|
||||
function secret_click(d)
|
||||
{
|
||||
var id = $(d).attr('key');
|
||||
if(d.disabled == false)
|
||||
{
|
||||
if(d.checked) {
|
||||
$('#write_'+id).attr({'disabled':true,'checked':false});
|
||||
} else {
|
||||
$('#write_'+id).removeAttr('disabled').attr('checked',false);
|
||||
}
|
||||
}
|
||||
}
|
||||
//checkbox全选及反选操作
|
||||
function check(desc, act)
|
||||
{
|
||||
if(desc == 'write') {
|
||||
$("input[name='write[]']").each(function() {
|
||||
if(this.disabled == false) {
|
||||
this.checked = act;
|
||||
}
|
||||
write_click(this);
|
||||
})
|
||||
} else if(desc == 'secret') {
|
||||
$("input[name='secret[]']").each(function() {
|
||||
if(this.disabled == false) {
|
||||
this.checked = act;
|
||||
}
|
||||
secret_click(this);
|
||||
})
|
||||
} else if(desc == 'check') {
|
||||
$("input[name='check[]']").each(function() {
|
||||
if(this.disabled == false) {
|
||||
this.checked = act;
|
||||
}
|
||||
check_click(this);
|
||||
})
|
||||
} else if(desc == 'micro') {
|
||||
$("input[name='micro[]']").each(function() {
|
||||
if(this.disabled == false) {
|
||||
this.checked = act;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<ul class="nav nav-tabs m-t padder" role="tablist">
|
||||
<li class="active"><a href="#tabs-1" data-toggle="tab">基本设置</a></li>
|
||||
<li><a href="#tabs-2" data-toggle="tab">办理权限</a></li>
|
||||
<li><a href="#tabs-3" data-toggle="tab">表单字段</a></li>
|
||||
<li><a href="#tabs-4" data-toggle="tab">条件设置</a></li>
|
||||
</ul>
|
||||
|
||||
<form class="form-horizontal" action="{{url()}}" method="post" id="my_form_step" name="my_form_step">
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane active" id="tabs-1">
|
||||
|
||||
<table class="table table-form">
|
||||
|
||||
<tr>
|
||||
<td width="15%">流程名称</td>
|
||||
<td><input type="text" id="title" name="title" value="{{$row['title']}}" class="form-control input-sm"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>步骤序号</td>
|
||||
<td><input type="text" id="number" name="number" value="{{$row['number']}}" class="form-control input-sm"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>办理时限</td>
|
||||
<td><div class="input-group">
|
||||
<span class="bg-white input-group-addon">小时</span>
|
||||
<input type="text" id="timeout" name="timeout" value="{{$row['timeout']}}" class="form-control input-sm">
|
||||
<span class="bg-white input-group-addon"><a href="javascript:;" class="hinted" title="允许为小数,表示接收工作后办理的时限,为空表示不限时。"><i class="icon icon-info-sign"></i></a></span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>步骤类型</td>
|
||||
<td><select name="type" class="form-control input-sm" id="type">
|
||||
<option value="1" @if($row['type']==1) selected @endif>普通节点</option>
|
||||
<option value="2" @if($row['type']==2) selected @endif>开始节点</option>
|
||||
<option value="3" @if($row['type']==3) selected @endif>结束节点</option>
|
||||
<option value="4" @if($row['type']==4) selected @endif>子流程节点</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>其他选项</td>
|
||||
<td><label class="checkbox-inline"><input type="checkbox" name="last" value="1" @if($row['last']==1) checked @endif> 允许退回</label>
|
||||
<label class="checkbox-inline"><input type="checkbox" name="deny" value="1" @if($row['deny']==1) checked @endif> 允许拒绝</label>
|
||||
<label class="checkbox-inline"><input type="checkbox" name="print" value="1" @if($row['print']==1) checked @endif> 允许打印</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>提醒发起人</td>
|
||||
<td><div class="input-group">
|
||||
<input name="notification_text[0]" type="text" class="form-control input-sm" value="{{$row['notification_text']['0']}}">
|
||||
<span class="bg-white input-group-addon">
|
||||
<label class="p-t-none checkbox-inline" title="短信提醒:发起人"><input type="checkbox" name="notification_type[0][]" @if(is_array($row['notification_type']['0']) && in_array(1,$row['notification_type']['0'])) checked @endif value="1"> 短信</label>
|
||||
<label class="p-t-none checkbox-inline" title="邮件提醒:发起人"><input type="checkbox" name="notification_type[0][]" @if(is_array($row['notification_type']['0']) && in_array(2,$row['notification_type']['0'])) checked @endif value="2"> 邮件</label>
|
||||
<label class="p-t-none checkbox-inline" title="即时通提醒:发起人"><input type="checkbox" name="notification_type[0][]" @if(is_array($row['notification_type']['0']) && in_array(3,$row['notification_type']['0'])) checked @endif value="3"> 即时通</label>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>提醒下一步经办人</td>
|
||||
<td><div class="input-group">
|
||||
<input name="notification_text[1]" type="text" class="form-control input-sm" value="{{$row['notification_text']['1']}}">
|
||||
<span class="bg-white input-group-addon">
|
||||
<label class="p-t-none checkbox-inline" title="短信提醒:下一步经办人"><input type="checkbox" name="notification_type[1][]" @if(is_array($row['notification_type']['1']) && in_array(1,(array)$row['notification_type']['1'])) checked @endif value="1"> 短信</label>
|
||||
<label class="p-t-none checkbox-inline" title="邮件提醒:下一步经办人"><input type="checkbox" name="notification_type[1][]" @if(is_array($row['notification_type']['1']) && in_array(2,(array)$row['notification_type']['1'])) checked @endif value="2"> 邮件</label>
|
||||
<label class="p-t-none checkbox-inline" title="即时通提醒:下一步经办人"><input type="checkbox" name="notification_type[1][]" @if(is_array($row['notification_type']['1']) && in_array(3,(array)$row['notification_type']['1'])) checked @endif value="3"> 即时通</label>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>提醒下一步会签人</td>
|
||||
<td><div class="input-group">
|
||||
<input name="notification_text[2]" type="text" class="form-control input-sm" value="{{$row['notification_text']['2']}}">
|
||||
<span class="bg-white input-group-addon">
|
||||
<label class="p-t-none checkbox-inline" title="短信提醒:下一步会签人"><input type="checkbox" name="notification_type[2][]" @if(is_array($row['notification_type']['2']) && in_array(1,$row['notification_type']['2'])) checked @endif value="1"> 短信</label>
|
||||
<label class="p-t-none checkbox-inline" title="邮件提醒:下一步会签人"><input type="checkbox" name="notification_type[2][]" @if(is_array($row['notification_type']['2']) && in_array(2,$row['notification_type']['2'])) checked @endif value="2"> 邮件</label>
|
||||
<label class="p-t-none checkbox-inline" title="即时通提醒:下一步会签人"><input type="checkbox" name="notification_type[2][]" @if(is_array($row['notification_type']['2']) && in_array(3,$row['notification_type']['2'])) checked @endif value="3"> 即时通</label>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>下一步骤</td>
|
||||
<td><div id="select_next_step">
|
||||
@if($rows)
|
||||
@foreach($rows as $k => $v)
|
||||
<label class="checkbox-inline"><input type="checkbox" id="step_{{$v['id']}}" value="{{$v['id']}}" title="{{$v['title']}}" @if(in_array($k,$row['joinArray'])) checked @endif disabled> {{$v['title']}}</label>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="tabs-2">
|
||||
|
||||
<table class="table table-form">
|
||||
|
||||
<tr>
|
||||
<td width="15%">经办权限</td>
|
||||
<td>{{App\Support\Dialog::search($row,'id=permission_id&name=permission_name&multi=1')}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>选人过滤范围</td>
|
||||
<td><div class="input-group">
|
||||
<select class="form-control input-sm" name="user_filter" id="user_filter">
|
||||
<option value="0">选择指定办理人</option>
|
||||
<option value="1">选择本部门</option>
|
||||
<option value="3">选择上级部门</option>
|
||||
<option value="4">选择下级部门</option>
|
||||
<option value="2">选择本岗位</option>
|
||||
</select>
|
||||
<span class="bg-white input-group-addon"><a href="javascript:;" class="hinted" title="选人过滤规则在流程转交选择办理人员时生效。默认设置为只能选择指定办理人员"><i class="icon icon-info-sign"></i></a></span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>自动选人规则</td>
|
||||
<td><div class="input-group">
|
||||
<select class="form-control input-sm" name="select_user_type" id="select_user_type" onchange="selectUser()">
|
||||
<option value="0" @if($row['select_user_type']==0) selected @endif >不自动选择</option>
|
||||
<option value="1" @if($row['select_user_type']==1) selected @endif >选择发起人</option>
|
||||
<option value="9" @if($row['select_user_type']==9) selected @endif >选择发起人本部门主管</option>
|
||||
<option value="10" @if($row['select_user_type']==10) selected @endif >选择发起人上级主管领导</option>
|
||||
<option value="11" @if($row['select_user_type']==11) selected @endif >选择发起人上级分管领导</option>
|
||||
<option value="12" @if($row['select_user_type']==12) selected @endif >选择发起人一级部门主管</option>
|
||||
<option value="13" @if($row['select_user_type']==13) selected @endif >选择发起人直属领导</option>
|
||||
<option value="2" @if($row['select_user_type']==2) selected @endif >选择经办人本部门主管</option>
|
||||
<option value="3" @if($row['select_user_type']==3) selected @endif >选择经办人上级主管领导</option>
|
||||
<option value="4" @if($row['select_user_type']==4) selected @endif >选择经办人上级分管领导</option>
|
||||
<option value="5" @if($row['select_user_type']==5) selected @endif >选择经办人一级部门主管</option>
|
||||
<option value="14" @if($row['select_user_type']==14) selected @endif >选择经办人直属领导</option>
|
||||
<option value="6" @if($row['select_user_type']==6) selected @endif >选择指定人员</option>
|
||||
<option value="7" @if($row['select_user_type']==7) selected @endif >选择表单字段</option>
|
||||
<option value="8" @if($row['select_user_type']==8) selected @endif >选择指定步骤办理人</option>
|
||||
</select>
|
||||
<span class="bg-white input-group-addon">
|
||||
<a href="javascript:;" class="hinted" title="自动选人规则,使流程办理人通过指定规则智能选择。默认设置为:不自动选择。注意,请同时设置好经办权限,自动选人规则才能生效。"> <i class="icon icon-info-sign"></i></a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="m-t" id="select_field_user" style="display:none;">
|
||||
<label>根据表单字段选择办理人</label>
|
||||
<select class="form-control input-sm" name="select_field_user">
|
||||
@if($fields)
|
||||
@foreach($fields as $k => $v)
|
||||
<option value="{{$v['itemid']}}" @if($row['select_user_sign']==$v['itemid']) selected @endif>{{$v['title']}}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="m-t" id="select_process_user" style="display:none;">
|
||||
<label>选择此步骤第一次办理时的办理人</label>
|
||||
<select class="form-control input-sm" name="select_process_user">
|
||||
@if($rows)
|
||||
@foreach($rows as $k => $v)
|
||||
<option value="{{$k}}" @if($row['select_user_sign']==$k) selected @endif>{{$v['title']}}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="m-t" id="select_user" style="display:none;">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">主办人</label>
|
||||
<div class="col-sm-10">
|
||||
{{App\Support\Dialog::user('user','select_user_id',$row['select_user_id'], 0, 0)}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">会签人</label>
|
||||
<div class="col-sm-10">
|
||||
{{App\Support\Dialog::user('user','select_user_sign',$row['select_user_sign'], 1, 0)}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="lock" class="m-t">
|
||||
<label id="lock_info"></label>
|
||||
<select class="form-control input-sm" name="select_user_lock">
|
||||
<option value="0" @if($row['select_user_lock'] == 0) selected @endif>允许</option>
|
||||
<option value="1" @if($row['select_user_lock'] == 1) selected @endif>不允许</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="tabs-3">
|
||||
|
||||
<table class="table m-b-none">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align="left" width="140">字段名称</th>
|
||||
<th align="left" width="140">控件类型</th>
|
||||
<th align="left" style="width:80px;"><label class="checkbox-inline"><input type="checkbox" id="write"> 可写字段</label></th>
|
||||
<th align="left" style="width:80px;"><label class="checkbox-inline"><input type="checkbox" id="secret"> 保密字段</label></th>
|
||||
<th align="left" style="width:120px;"><label class="checkbox-inline"><input type="checkbox" id="check"> 字段规则</label></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@if(isset($fields))
|
||||
<tbody id="loop">
|
||||
<tr>
|
||||
<td>[流程公共附件]</td>
|
||||
<td><span class="label label-info">公共附件</span></td>
|
||||
<td><label><input type="checkbox" name="write[]" key="attach" value="[attach@]" id="write_attach"></label></td>
|
||||
<td><label><input type="checkbox" name="secret[]" value="[attach@]" key="attach" id="secret_attach"></label></td>
|
||||
<td>无</td>
|
||||
</tr>
|
||||
|
||||
@if($fields)
|
||||
@foreach($fields as $k => $v)
|
||||
<tr>
|
||||
<td>{{$v['title']}}</td>
|
||||
<td>{{$v['desc']}}</td>
|
||||
<td><label><input type="checkbox" name="write[]" key="{{$v['itemid']}}" value="{{$v['title']}}" id="write_{{$v['itemid']}}"></label></td>
|
||||
<td><label><input type="checkbox" name="secret[]" value="{{$v['title']}}" key="{{$v['itemid']}}" id="secret_{{$v['itemid']}}"></label></td>
|
||||
<td class="form-inline">
|
||||
@if(!isset($v['datafld']))
|
||||
<label><input type="checkbox" key="{{$v['itemid']}}" disabled="true" value="{{$v['title']}}" name="check[]" id="regex_{{$v['itemid']}}"></label>
|
||||
<select class="input-sm form-control" style="display:none;" disabled name="check_select[]" id="regexList_{{$v['itemid']}}">
|
||||
@foreach(config('default.regular') as $i => $j)
|
||||
<option value="{{$i}}">{{$j['title']}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@else
|
||||
<label title="锁定将不允许修改宏控件的值">
|
||||
<input type="checkbox" key="{{$v['itemid']}}" value="{{$v['title']}}" disabled="true" name="micro[]" id="micro_{{$v['itemid']}}"> 锁定
|
||||
</label>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="tabs-4">
|
||||
|
||||
<div id="tpl" style="display:none;">
|
||||
|
||||
<table class="table m-b-none">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="h5">转入步骤 @text</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<div class="form-inline">
|
||||
<select class="input-sm form-control" id="field_@id">
|
||||
<option value="">字段</option>
|
||||
@if($fields)
|
||||
@foreach($fields as $k => $v)
|
||||
<option>{{$v['title']}}</option>
|
||||
@endforeach @endif
|
||||
<option value="[发起人姓名]">[发起人姓名]</option>
|
||||
<option value="[发起人职位]">[发起人职位]</option>
|
||||
<option value="[发起人岗位]">[发起人岗位]</option>
|
||||
<option value="[发起人部门]">[发起人部门]</option>
|
||||
<option value="[经办人姓名]">[经办人姓名]</option>
|
||||
<option value="[经办人职位]">[经办人职位]</option>
|
||||
<option value="[经办人岗位]">[经办人岗位]</option>
|
||||
<option value="[经办人部门]">[经办人部门]</option>
|
||||
<option value="[步骤号]">[步骤号]</option>
|
||||
<option value="[流程设计步骤号]">[流程设计步骤号]</option>
|
||||
<option value="[公共附件名称]">[公共附件名称]</option>
|
||||
<option value="[公共附件个数]">[公共附件个数]</option>
|
||||
</select>
|
||||
|
||||
<div class="input-group">
|
||||
<!--
|
||||
<span class="input-group-addon">条件</span>
|
||||
-->
|
||||
<select class="input-sm form-control" id="condition_@id">
|
||||
<option value="==">等于</option>
|
||||
<option value="<>">不等于</option>
|
||||
<option value=">">大于</option>
|
||||
<option value="<">小于</option>
|
||||
<option value=">=">大于等于</option>
|
||||
<option value="<=">小于等于</option>
|
||||
<option value="include">包含</option>
|
||||
<option value="exclude">不包含</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<!--
|
||||
<span class="input-group-addon">值</span>
|
||||
-->
|
||||
<input type="text" class="input-sm form-control" id="item_value_@id">
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<!--
|
||||
<span class="input-group-addon">关系</span>
|
||||
-->
|
||||
<select class="input-sm form-control" id="relation_@id">
|
||||
<option value="AND">与</option>
|
||||
<option value="OR">或</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-sm btn-default" onclick="condition.addLeft('@id')">(</a>
|
||||
<a class="btn btn-sm btn-default" onclick="condition.addRight('@id')">)</a>
|
||||
<a class="btn btn-sm btn-default" onclick="condition.add('@id')">新增</a>
|
||||
<a class="btn btn-sm btn-default" onclick="condition.deleted('@id')">删行</a>
|
||||
<a class="btn btn-sm btn-default" onclick="condition.clear('@id')">清空</a>
|
||||
</div>
|
||||
|
||||
<div class="m-t-sm">
|
||||
<select class="form-control input-sm" id="condition_list_@id" multiple="true" style="width:100%;height:80px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="ctbody"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="id" value="{{$row['id']}}">
|
||||
</form>
|
||||
@@ -0,0 +1,425 @@
|
||||
<script src="{{$asset_url}}/vendor/jquery.plumb.min.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var intervalTimer = null;
|
||||
var nowStepId = null;
|
||||
var normalStepSelector = ".wf-step:not(.wf-step-start,.wf-step-end)";
|
||||
|
||||
// 判断连接器是否指向了自己
|
||||
var isConnectToSelf = function(param) {
|
||||
return param.sourceId === param.targetId
|
||||
},
|
||||
isFromStartToEnd = function(param) {
|
||||
return param.sourceId === "step_-1" && param.targetId === "step_0"
|
||||
},
|
||||
// 判断连接步骤是否重复
|
||||
stepIsRepeat = function(param){
|
||||
// 获取同一scope下的链接器,判断当前链接是否有重复
|
||||
var cnts = jsPlumb.getConnections(param.scope);
|
||||
if(cnts.length > 0) {
|
||||
for(var i = 0, len = cnts.length; i < len; i++) {
|
||||
// 如果有链接器 sourceId 及 targetId 都相等,那大概也许可能就相等了。
|
||||
if(param.sourceId === cnts[i].sourceId && param.targetId === cnts[i].targetId) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
// 连接前的事件
|
||||
var beforeDropHandler = function(param) {
|
||||
|
||||
if(isConnectToSelf(param)) {
|
||||
toastrError('连接点不能是自己。');
|
||||
return false;
|
||||
}
|
||||
// 连接步骤是否重复
|
||||
if(stepIsRepeat(param)) {
|
||||
toastrError('连接点已经存在。');
|
||||
return false;
|
||||
}
|
||||
// 连接步骤是结束
|
||||
if(isFromStartToEnd(param)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
// 获取步骤图
|
||||
workStep.init();
|
||||
|
||||
$('#graph').contextmenu({'target':'#graph-menu'});
|
||||
|
||||
// 阻止非空白处的右键事件,不出现菜单
|
||||
//$container.on("contextmenu", "*", function(evt) {
|
||||
//evt.stopPropagation();
|
||||
//});
|
||||
|
||||
// 点击或双击事件,这里进行了一个单击事件延迟,因为同时绑定了双击事件
|
||||
$("#rows").on('click','div', function() {
|
||||
clearTimeout(intervalTimer);
|
||||
intervalTimer = setTimeout(function() {
|
||||
workStep.click();
|
||||
},300);
|
||||
|
||||
}).on('dblclick','div',function() {
|
||||
clearTimeout(intervalTimer);
|
||||
workStep.dblClick('base');
|
||||
});
|
||||
});
|
||||
|
||||
var workStep = {
|
||||
|
||||
init:function() {
|
||||
|
||||
jsPlumb.reset();
|
||||
|
||||
jsPlumb.bind("beforeDrop", beforeDropHandler);
|
||||
|
||||
$.post("{{url('index')}}",{work_id:'{{$work_id}}'},function(data)
|
||||
{
|
||||
$('#rows').empty();
|
||||
var nLastStepId = 0;
|
||||
|
||||
if(data.total > 0) {
|
||||
jsPlumb.importDefaults({
|
||||
DragOptions:{cursor:'pointer'},
|
||||
ConnectionOverlays:[
|
||||
["Arrow",{location:1,id:"arrow",width:10,length:8}]
|
||||
],
|
||||
Anchor:'Continuous',
|
||||
Endpoint :"Blank",
|
||||
EndpointStyle:{radius:3,strokeStyle:'#1e8151'},
|
||||
HoverPaintStyle:{radius:3,strokeStyle:'#999'},
|
||||
ConnectorZIndex:5,
|
||||
HoverPaintStyle:workStep.connectorHoverStyle
|
||||
});
|
||||
|
||||
if(!$.support.leadingWhitespace) {
|
||||
// ie9以下,用VML画图
|
||||
jsPlumb.setRenderMode(jsPlumb.VML);
|
||||
} else {
|
||||
// 其他浏览器用SVG
|
||||
jsPlumb.setRenderMode(jsPlumb.SVG);
|
||||
}
|
||||
|
||||
// 第一次循环,生成页面元素div
|
||||
var left = 0;
|
||||
var top = 0;
|
||||
$.each(data.rows, function(i, row) {
|
||||
if(row.posX == 0 && row.posY == 0) {
|
||||
left = 20;
|
||||
top = 20;
|
||||
if(nLastStepId == 0) {
|
||||
}
|
||||
else if(nLastStepId %5 == 0) {
|
||||
top += 60;
|
||||
left = 20;
|
||||
} else {
|
||||
left+= 160;
|
||||
}
|
||||
} else {
|
||||
left = row.posX;
|
||||
top = row.posY;
|
||||
}
|
||||
|
||||
var title = '<span class="ep">' + row.number + '</span> ' + row.title;
|
||||
if(row.number == -1) {
|
||||
title = '<span class="ep"><i class="icon icon-play"></i></span> ' + row.title;
|
||||
} else if(row.number == 0) {
|
||||
title = '<span class="ep"><i class="icon icon-stop"></i></span> ' + row.title;
|
||||
}
|
||||
|
||||
var css = 'wf-step';
|
||||
if(row.number == -1) {
|
||||
css = 'wf-step wf-step-start';
|
||||
} else if(row.number == 0) {
|
||||
css = 'wf-step wf-step-end';
|
||||
}
|
||||
|
||||
var nodeDiv = document.createElement('div');
|
||||
var $node = $(nodeDiv);
|
||||
|
||||
$node.attr("id", "step_"+row.id)
|
||||
.attr("join", row.join)
|
||||
.attr("step_id", row.id)
|
||||
.css({"left":left+'px',"top":top+'px',"cursor":"move"})
|
||||
.addClass(css)
|
||||
.html(title);
|
||||
|
||||
/*
|
||||
$(normalStepSelector).on('mousedown', function(e) {
|
||||
|
||||
//if(row.number > 0) {
|
||||
nowStepId = $(e.target).attr('step_id');
|
||||
// $(this).contextmenu({'target':'#step-menu'});
|
||||
//}
|
||||
//e.stopPropagation();
|
||||
});
|
||||
*/
|
||||
$("#rows").append($node);
|
||||
|
||||
// 索引变量
|
||||
nLastStepId++;
|
||||
|
||||
});
|
||||
|
||||
// 绑定右键操作菜单
|
||||
$(normalStepSelector).on('mousedown', function(e) {
|
||||
nowStepId = $(e.target).attr('step_id');
|
||||
$(this).contextmenu({'target':'#step-menu'});
|
||||
// e.stopPropagation();
|
||||
});
|
||||
|
||||
// 使之可拖动
|
||||
jsPlumb.draggable($(".wf-step"));
|
||||
|
||||
$(".ep").each(function(i,e) {
|
||||
var p = $(e).parent();
|
||||
jsPlumb.makeSource($(e), {
|
||||
parent:p,
|
||||
anchor:"Continuous",
|
||||
endpoint:"Blank",
|
||||
paintStyle:{
|
||||
strokeStyle:"#3399cc",
|
||||
fillStyle:"transparent",
|
||||
radius:2,
|
||||
lineWidth:2
|
||||
},
|
||||
// stub 线条弯曲角度 gap 距离节点位置 cornerRadius 线条圆角
|
||||
connector:["Flowchart",{stub:[10, 30], gap:0, cornerRadius:3, alwaysRespectStubs:true}],
|
||||
connectorStyle:workStep.connectorPaintStyle,
|
||||
hoverPaintStyle:workStep.endpointHoverStyle,
|
||||
connectorHoverStyle:workStep.connectorHoverStyle,
|
||||
dragOptions:{},
|
||||
maxConnections:-1
|
||||
});
|
||||
});
|
||||
|
||||
// 绑定删除确认操作
|
||||
jsPlumb.bind("click",function(e) {
|
||||
jsPlumb.detach(e);
|
||||
});
|
||||
|
||||
// 连接关联的步骤
|
||||
$('.wf-step').each(function(i) {
|
||||
|
||||
var id = $(this).attr('id');
|
||||
var join = $(this).attr('join');
|
||||
var joinArray = join.split(",");
|
||||
|
||||
$.each(joinArray,function(j, n) {
|
||||
if(n > 0) {
|
||||
jsPlumb.connect({source:id, target:"step_"+n});
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
jsPlumb.makeTarget($('.wf-step'), {
|
||||
dropOptions: {hoverClass:"dragHover", activeClass:"active"},
|
||||
anchor: "Continuous",
|
||||
maxConnections: 5
|
||||
});
|
||||
}
|
||||
},'json');
|
||||
},
|
||||
connectorPaintStyle:{
|
||||
lineWidth:2,
|
||||
strokeStyle:"#3399cc",
|
||||
joinstyle:"round",
|
||||
outlineColor:"white",
|
||||
dashstyle:"0",
|
||||
outlineWidth:2
|
||||
},
|
||||
connectorHoverStyle:{
|
||||
lineWidth:2,
|
||||
strokeStyle:"#999999",
|
||||
outlineWidth:2,
|
||||
dashstyle:"4 1",
|
||||
outlineColor:"white"
|
||||
},
|
||||
endpointHoverStyle:{
|
||||
strokeStyle:"#216477"
|
||||
},
|
||||
// 清空所有连接
|
||||
clear:function() {
|
||||
jsPlumb.detachEveryConnection();
|
||||
jsPlumb.deleteEveryEndpoint();
|
||||
},
|
||||
// 单击事件
|
||||
click:function() {
|
||||
if(nowStepId > 0)
|
||||
{
|
||||
$('#tree').hide();
|
||||
$.post('{{url("view")}}',{id:nowStepId,work_id:'{{$work_id}}'}, function(res)
|
||||
{
|
||||
$('#tree').html(res.data).show();
|
||||
})
|
||||
}
|
||||
},
|
||||
// 删除步骤
|
||||
deleted:function() {
|
||||
$.messager.confirm('操作警告','确认要删除该步骤吗?',function(btn) {
|
||||
if (btn == true) {
|
||||
$.post('{{url("delete")}}',{id:nowStepId,work_id:'{{$work_id}}'},function(data) {
|
||||
if(data.status) {
|
||||
workStep.init();
|
||||
toastrSuccess('操作成功');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
});
|
||||
},
|
||||
// 克隆步骤
|
||||
clone:function() {
|
||||
$.messager.confirm('操作警告','确认要克隆该步骤吗?',function(btn) {
|
||||
if (btn == true) {
|
||||
$.post('{{url("add")}}',{id:nowStepId,work_id:'{{$work_id}}'},function(data) {
|
||||
if(data.status) {
|
||||
workStep.init();
|
||||
toastrSuccess('操作成功');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
});
|
||||
},
|
||||
dblClick:function(tab) {
|
||||
if(nowStepId > 0) {
|
||||
var box = $.dialog({
|
||||
title:'步骤设计',
|
||||
dialogClass: 'modal-lg',
|
||||
backdrop: 'static',
|
||||
url:'{{url("edit")}}?work_id={{$work_id}}&id='+nowStepId+'&tab='+tab,
|
||||
buttons:[{
|
||||
text:'<i class="fa fa-check-circle"></i> 提交',
|
||||
click:function() {
|
||||
condition.save();
|
||||
$(this).dialog("close");
|
||||
}
|
||||
},{
|
||||
text:'<i class="icon icon-minus"></i> 取消',
|
||||
click:function() {
|
||||
$(this).dialog("close");
|
||||
//box.dialog('close');
|
||||
}
|
||||
}/*,{
|
||||
text:'刷新',handler:function() {
|
||||
box.dialog('refresh');
|
||||
}
|
||||
}*/]
|
||||
});
|
||||
}
|
||||
},
|
||||
add:function() {
|
||||
$.post('{{url("add")}}',{work_id:'{{$work_id}}'},function(data) {
|
||||
if(data.status) {
|
||||
workStep.init();
|
||||
toastrSuccess('操作成功');
|
||||
}
|
||||
},'json');
|
||||
},
|
||||
save:function() {
|
||||
var join = [],position = [];
|
||||
var rows = jsPlumb.getConnections();
|
||||
|
||||
if(rows.length == 0) {
|
||||
toastrError('请先建立连接');
|
||||
return;
|
||||
}
|
||||
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var sourceId = rows[i].sourceId.substring(5);
|
||||
var targetId = rows[i].targetId.substring(5);
|
||||
join[i] = {id:sourceId,target:targetId};
|
||||
}
|
||||
|
||||
$('#rows div').each(function(i) {
|
||||
if(this.id.substring(0,5) == 'step_') {
|
||||
var stepId = this.id.substring(5);
|
||||
var left = $(this).css('left');
|
||||
var top = $(this).css('top');
|
||||
position[i] = {'id':stepId,'posX':left,'posY':top};
|
||||
}
|
||||
});
|
||||
|
||||
$.post('{{url("save")}}',{join:join,position:position,work_id:'{{$work_id}}'},function(result) {
|
||||
if (result.status) {
|
||||
toastrSuccess('保存当前视图成功');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-heading b-b b-light">
|
||||
{{$work['title']}} <span class="badge badge-empty">{{$work['id']}}</span>
|
||||
</div>
|
||||
<div class="padder-v clearfix">
|
||||
|
||||
<div class="col-sm-10 m-b">
|
||||
|
||||
<div class="m-b">
|
||||
<a class="btn btn-info" onclick="workStep.add();" href="javascript:;">新建步骤</a>
|
||||
<a class="btn btn-default" onclick="workStep.init();" href="javascript:;">重新加载</a>
|
||||
<a href="javascript:;" onclick="workStep.clear();" class="btn btn-default"><i class="fa fa-ban"></i> 清空连接</a>
|
||||
</div>
|
||||
|
||||
<div class="graph" id="graph" data-toggle="context" data-target="#graph-menu">
|
||||
|
||||
<div id="rows"></div>
|
||||
<!--
|
||||
<a href="javascript:;" data-toggle="tooltip" title="" data-original-title="从步骤图形框序号上拖出一条链接线到想要的步骤上,双击步骤图形框设置基本属性,单击鼠标右键弹出功能菜单。"><i class="icon icon-info-sign"></i></a>
|
||||
-->
|
||||
</div>
|
||||
|
||||
<div id="graph-menu">
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li role="presentation"><a role="menuitem" onclick="workStep.add();" href="javascript:;">新建步骤</a></li>
|
||||
<li role="presentation" class="divider"></li>
|
||||
<li role="presentation"><a role="menuitem" onclick="workStep.save();" href="javascript:;">保存视图</a></li>
|
||||
<li role="presentation"><a role="menuitem" onclick="workStep.init();" href="javascript:;">重新加载</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="step-menu">
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li role="presentation"><a role="menuitem" onclick="workStep.dblClick('base');" href="javascript:;">基本设置</a></li>
|
||||
<li role="presentation"><a role="menuitem" onclick="workStep.dblClick('handle');" href="javascript:;">经办权限</a></li>
|
||||
<li role="presentation"><a role="menuitem" onclick="workStep.dblClick('field');" href="javascript:;">表单字段</a></li>
|
||||
<li role="presentation"><a role="menuitem" onclick="workStep.dblClick('condition');" href="javascript:;">条件设置</a></li>
|
||||
<li role="presentation" class="divider"></li>
|
||||
<li role="presentation"><a role="menuitem" onclick="workStep.clone();" href="javascript:;">克隆该步骤</a></li>
|
||||
<li role="presentation"><a role="menuitem" onclick="workStep.deleted();" href="javascript:;">删除该步骤</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">基本信息</div>
|
||||
<div class="panel-body">
|
||||
<div id="tree"></div>
|
||||
</div>
|
||||
<div class="panel-heading b-t">表单字段</div>
|
||||
<div class="panel-body">
|
||||
<div id="tree"></div>
|
||||
</div>
|
||||
<div class="panel-heading b-t">办理人员</div>
|
||||
<div class="panel-body">
|
||||
<div id="tree"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="m-b">
|
||||
<a href="javascript:;" onclick="workStep.save();" class="btn btn-lg btn-block btn-info"><i class="fa fa-random"></i> 保存连接和视图</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,48 @@
|
||||
<div class="panel">
|
||||
|
||||
<div class="wrapper-sm">
|
||||
<a class="btn btn-info btn-sm" href="{{url('create',['bill_id'=>$bill_id])}}"><i class="icon icon-plus"></i> 新建表单</a>
|
||||
<a class="btn btn-info btn-sm" href="{{url('create2',['bill_id'=>$bill_id])}}"><i class="icon icon-plus"></i> 新建列表</a>
|
||||
</div>
|
||||
|
||||
<form method="post" action="{{url()}}" id="myform" name="myform">
|
||||
|
||||
<div class="wrapper-sm b-t">
|
||||
<table class="table table-bordered table-hover m-b-none b-t" id="table-sortable" url="{{url()}}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align="left">视图名称</th>
|
||||
<th align="center">视图类型</th>
|
||||
<th align="center">客户端</th>
|
||||
<th align="center">权限范围</th>
|
||||
<th align="center">ID</th>
|
||||
<th align="center"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if($rows)
|
||||
@foreach($rows as $row)
|
||||
<tr id="{{$row['id']}}">
|
||||
<td align="left" class="move">{{$row['name']}}</td>
|
||||
<td align="center">{{$row['type']}}</td>
|
||||
<td align="center">{{$row['client']}}</td>
|
||||
<td align="center">{{$row['receive_name']}}</td>
|
||||
<td align="center">{{$row['id']}}</td>
|
||||
<td align="center">
|
||||
@if($row['type'] == 'list')
|
||||
<a class="option" href="{{url('create2',['bill_id'=>$bill_id,'id'=>$row['id']])}}">编辑</a>
|
||||
@else
|
||||
<a class="option" href="{{url('create',['bill_id'=>$bill_id,'id'=>$row['id']])}}">编辑</a>
|
||||
@endif
|
||||
@if($row['system'] == 0)
|
||||
<a class="option" onclick="app.confirm('{{url('delete',['bill_id'=>$bill_id,'id'=>$row['id']])}}','确定要删除吗?');" href="javascript:;">删除</a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,97 @@
|
||||
<div class="jqgrid-wrap-no-border jqgrid-body-no-border">
|
||||
<table id="widget-workflow-efficiency"></table>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.jqgrid-wrap-no-border .ui-jqgrid-hdiv {
|
||||
border: 0 !important;
|
||||
}
|
||||
.jqgrid-wrap-no-border .ui-jqgrid-bdiv {
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
}
|
||||
.jqgrid-wrap-no-border .ui-jqgrid-sdiv {
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
.jqgrid-body-no-border .ui-jqgrid-htable thead th.ui-th-column {
|
||||
border-right: 0 !important;
|
||||
}
|
||||
.jqgrid-body-no-border .ui-jqgrid-btable tbody tr.jqgrow td {
|
||||
border-right: 0 !important;
|
||||
}
|
||||
.jqgrid-body-no-border .ui-jqgrid-btable tbody tr.jqgrow td.jqgrid-rownum,
|
||||
.jqgrid-body-no-border .ui-jqgrid-ftable tbody tr.footrow td.jqgrid-rownum {
|
||||
border-right: 1px solid #ddd !important;
|
||||
}
|
||||
|
||||
.jqgrid-body-no-border .ui-jqgrid-ftable tbody tr.footrow td {
|
||||
border-right: 0 !important;
|
||||
}
|
||||
.jqgrid-body-no-border .ui-jqgrid-btable tbody tr.jqgrow td:last-child,
|
||||
.jqgrid-body-no-border .ui-jqgrid-ftable tbody tr.footrow td:last-child {
|
||||
border-right: 1px solid #ddd !important;
|
||||
}
|
||||
.jqgrid-body-no-border .ui-jqgrid-htable thead th.ui-th-column.active {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
(function($) {
|
||||
var t = $('#widget-workflow-efficiency');
|
||||
var model = [{
|
||||
name: 'user',
|
||||
index: 'user',
|
||||
label: '办理人',
|
||||
minWidth: 120,
|
||||
align: 'left'
|
||||
},{
|
||||
name: 'b',
|
||||
index: 'b',
|
||||
label: '超过3天',
|
||||
align: 'center',
|
||||
width: 90
|
||||
},{
|
||||
name: 'c',
|
||||
index: 'c',
|
||||
label: '超过30天',
|
||||
align: 'center',
|
||||
width: 90
|
||||
},{
|
||||
name: 'total',
|
||||
index: 'total',
|
||||
label: '合计',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
formatter: function(cellvalue, options, row) {
|
||||
return parseInt(row['b'] || 0) + parseInt(row['c'] || 0);
|
||||
}
|
||||
}];
|
||||
|
||||
var footerCalculate = function() {
|
||||
var b = $(this).getCol('b', false, 'sum');
|
||||
var c = $(this).getCol('c', false, 'sum');
|
||||
$(this).footerData('set',{b: b, c: c, total: b + c});
|
||||
}
|
||||
|
||||
t.jqGrid({
|
||||
caption: '',
|
||||
datatype: 'json',
|
||||
mtype: 'POST',
|
||||
url: '{{url("workflow/widget/efficiency")}}',
|
||||
colModel: model,
|
||||
rowNum: 1000,
|
||||
multiselect: false,
|
||||
viewrecords: true,
|
||||
rownumbers: true,
|
||||
height: 144,
|
||||
scrollOffset: 16,
|
||||
footerrow: true,
|
||||
loadonce: true,
|
||||
gridComplete: function() {
|
||||
footerCalculate.call(this);
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
@@ -0,0 +1,51 @@
|
||||
<div class="wrapper-sm p-t-none">
|
||||
<div class="list-jqgrid">
|
||||
<div id="workflow-widget" class="ag-theme-balham" style="width:100%;height:200px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function ($) {
|
||||
|
||||
function datetimeFormatter(params) {
|
||||
return format_datetime(params.value);
|
||||
}
|
||||
function tabFormatter(params) {
|
||||
return '<a href="javascript:;" data-toggle="addtab" data-url="'+app.url('workflow/workflow/edit', {process_id: params.data.id})+'" data-id="workflow_workflow_edit" data-name="待办流程">' + params.value + '</a>';
|
||||
}
|
||||
|
||||
var gridDiv = document.querySelector("#workflow-widget");
|
||||
var options = new agGridOptions();
|
||||
options.remoteDataUrl = '{{url()}}';
|
||||
options.remoteParams = {};
|
||||
var columnDefs = [
|
||||
{suppressMenu: true, type:'sn', cellClass:'text-center', headerName: '序号', width: 60},
|
||||
{suppressMenu: true, field: "title", headerName: '流程主题', width: 260},
|
||||
{suppressMenu: true, sortable: false, cellClass:'text-center', field: "step_title", headerName: '当前步骤', width: 160},
|
||||
{suppressMenu: true, valueFormatter: datetimeFormatter, sortable: false, field: "turn_time", headerName: '交办时间', width: 160},
|
||||
//{suppressMenu: true,field: "id", cellClass:'text-center', headerName: 'ID', width: 80}
|
||||
];
|
||||
|
||||
options.onGridReady = function(params) {
|
||||
};
|
||||
|
||||
options.columnDefs = columnDefs;
|
||||
options.onRowDoubleClicked = function (params) {
|
||||
if (params.node.rowPinned) {
|
||||
return;
|
||||
}
|
||||
if (params.data == undefined) {
|
||||
return;
|
||||
}
|
||||
if (params.data.id > 0) {
|
||||
top.addTab('workflow/workflow/edit?process_id=' + params.data.id, 'workflow_workflow_edit', '待办流程');
|
||||
}
|
||||
};
|
||||
new agGrid.Grid(gridDiv, options);
|
||||
|
||||
// 读取数据
|
||||
options.remoteData({page: 1});
|
||||
|
||||
gdoo.widgets['workflow_widget_index'] = options;
|
||||
})(jQuery);
|
||||
</script>
|
||||
@@ -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>
|
||||
@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>
|
||||
|
||||
<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> <select name="'+work.name+'" id="'+work.id+'" class="form-control input-sm"></select> <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> <select name="'+work.name+'" id="'+work.id+'" class="form-control input-sm"></select> <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>
|
||||
Reference in New Issue
Block a user