更新审核机制
This commit is contained in:
parent
d80c4e8842
commit
901602acf9
|
@ -140,6 +140,12 @@
|
||||||
else if(flow_data[a].flow_type==2){
|
else if(flow_data[a].flow_type==2){
|
||||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||||
}
|
}
|
||||||
|
else if(flow_data[a].flow_type==5){
|
||||||
|
userList+= '<li style="padding:3px 0">当前部门分管领导</li>';
|
||||||
|
}
|
||||||
|
else if(flow_data[a].flow_type==6){
|
||||||
|
userList+= '<li style="padding:3px 0">上级部门分管领导</li>';
|
||||||
|
}
|
||||||
else{
|
else{
|
||||||
if(flow_data[a].flow_type==3){
|
if(flow_data[a].flow_type==3){
|
||||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>';
|
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>';
|
||||||
|
|
|
@ -52,6 +52,7 @@ class Flow extends BaseController
|
||||||
if (request()->isAjax()) {
|
if (request()->isAjax()) {
|
||||||
$param['flow_list'] = '';
|
$param['flow_list'] = '';
|
||||||
$flow_list=[];
|
$flow_list=[];
|
||||||
|
|
||||||
if($param['check_type']==1){
|
if($param['check_type']==1){
|
||||||
$flowTypeData = isset($param['flowType']) ? $param['flowType'] : '';
|
$flowTypeData = isset($param['flowType']) ? $param['flowType'] : '';
|
||||||
$flowUidsData = isset($param['flowUidsA']) ? $param['flowUidsA'] : '';
|
$flowUidsData = isset($param['flowUidsA']) ? $param['flowUidsA'] : '';
|
||||||
|
@ -59,7 +60,7 @@ class Flow extends BaseController
|
||||||
if (!$value) {
|
if (!$value) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if($value>2 && $flowUidsData[$key]==''){
|
if(($value==3 || $value==4) && $flowUidsData[$key]==''){
|
||||||
return to_assign(1, '第'.($key+1).'行的指定人未选择');
|
return to_assign(1, '第'.($key+1).'行的指定人未选择');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
.layui-form-item{margin-bottom:5px;}
|
.layui-form-item{margin-bottom:5px;}
|
||||||
.layui-form-item .layui-btn-danger{display:none; margin-top:-8px}
|
.layui-form-item .layui-btn-danger{display:none; margin-top:-8px}
|
||||||
.layui-form-item:hover .layui-btn-danger{display:inline-block;}
|
.layui-form-item:hover .layui-btn-danger{display:inline-block;}
|
||||||
.select-1,.select-2{display:none;}
|
.select-1,.select-2,.select-5,.select-6{display:none;}
|
||||||
</style>
|
</style>
|
||||||
{/block}
|
{/block}
|
||||||
<!-- 主体 -->
|
<!-- 主体 -->
|
||||||
|
@ -69,7 +69,9 @@
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<select name="flowType[]" lay-filter="flowtype">
|
<select name="flowType[]" lay-filter="flowtype">
|
||||||
<option value="1">当前部门负责人</option>
|
<option value="1">当前部门负责人</option>
|
||||||
|
<option value="5">当前部门分管领导</option>
|
||||||
<option value="2">上一级部门负责人</option>
|
<option value="2">上一级部门负责人</option>
|
||||||
|
<option value="6">上一级部门分管领导</option>
|
||||||
<option value="3">指定人员(多人或签)</option>
|
<option value="3">指定人员(多人或签)</option>
|
||||||
<option value="4">指定人员(多人会签)</option>
|
<option value="4">指定人员(多人会签)</option>
|
||||||
</select>
|
</select>
|
||||||
|
@ -201,7 +203,9 @@
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<select name="flowType[]" lay-filter="flowtype">
|
<select name="flowType[]" lay-filter="flowtype">
|
||||||
<option value="1" {eq name="$vo.flow_type" value="1"}selected=""{/eq}>当前部门负责人</option>
|
<option value="1" {eq name="$vo.flow_type" value="1"}selected=""{/eq}>当前部门负责人</option>
|
||||||
|
<option value="5" {eq name="$vo.flow_type" value="5"}selected=""{/eq}>当前部门分管领导</option>
|
||||||
<option value="2" {eq name="$vo.flow_type" value="2"}selected=""{/eq}>上一级部门负责人</option>
|
<option value="2" {eq name="$vo.flow_type" value="2"}selected=""{/eq}>上一级部门负责人</option>
|
||||||
|
<option value="6" {eq name="$vo.flow_type" value="6"}selected=""{/eq}>上一级部门分管领导</option>
|
||||||
<option value="3" {eq name="$vo.flow_type" value="3"}selected=""{/eq}>指定人员(多人或签)</option>
|
<option value="3" {eq name="$vo.flow_type" value="3"}selected=""{/eq}>指定人员(多人或签)</option>
|
||||||
<option value="4" {eq name="$vo.flow_type" value="4"}selected=""{/eq}>指定人员(多人会签)</option>
|
<option value="4" {eq name="$vo.flow_type" value="4"}selected=""{/eq}>指定人员(多人会签)</option>
|
||||||
</select>
|
</select>
|
||||||
|
@ -226,7 +230,9 @@
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<select name="flowType[]" lay-filter="flowtype">
|
<select name="flowType[]" lay-filter="flowtype">
|
||||||
<option value="1">当前部门负责人</option>
|
<option value="1">当前部门负责人</option>
|
||||||
|
<option value="5">当前部门分管领导</option>
|
||||||
<option value="2">上一级部门负责人</option>
|
<option value="2">上一级部门负责人</option>
|
||||||
|
<option value="6">上一级部门分管领导</option>
|
||||||
<option value="3">指定人员(多人或签)</option>
|
<option value="3">指定人员(多人或签)</option>
|
||||||
<option value="4">指定人员(多人会签)</option>
|
<option value="4">指定人员(多人会签)</option>
|
||||||
</select>
|
</select>
|
||||||
|
@ -245,11 +251,13 @@
|
||||||
<span id="addFlow1" class="layui-btn layui-btn-xs layui-btn-normal">+ 添加审批层级</span>
|
<span id="addFlow1" class="layui-btn layui-btn-xs layui-btn-normal">+ 添加审批层级</span>
|
||||||
<div style="padding:10px; margin-top:10px; font-size:12px; background-color:#fffcf0">
|
<div style="padding:10px; margin-top:10px; font-size:12px; background-color:#fffcf0">
|
||||||
<p><strong>温馨提示</strong></p>
|
<p><strong>温馨提示</strong></p>
|
||||||
<p>1、当选择<strong> “当前部门负责人” </strong>审批时。系统仅会通知当前部门的负责人。</p>
|
<p>1、当选择<strong> 当前部门负责人 </strong>审批时。系统仅会通知当前部门的负责人。</p>
|
||||||
<p>2、当选择<strong> “上一级部门负责人” </strong>审批时。系统仅会通知当前部门的上一级部门的负责人。</p>
|
<p>2、当选择<strong> 当前部门分管领导 </strong>审批时。系统仅会通知当前部门的分管领导。</p>
|
||||||
<p>3、当选择<strong> “指定人员(多人或签)” </strong>时,表示指定用户中任意一人审批即可,可单选或多选。</p>
|
<p>3、当选择<strong> 上一级部门负责人 </strong>审批时。系统仅会通知当前部门的上一级部门的负责人。</p>
|
||||||
<p>4、当选择<strong> “指定人员(多人会签)” </strong>时,表示指定人员中所有人都需要审批,可单选或多选。</p>
|
<p>4、当选择<strong> 上一级部门分管领导 </strong>审批时。系统仅会通知当前部门的上一级部门的分管领导。</p>
|
||||||
<p>5、如果指定用户没有分配查看审批模块的功能权限,系统会通知其审批,但是他无法查看此审批数据信息。</p>
|
<p>5、当选择<strong> 指定人员(多人或签) </strong>时,表示指定用户中任意一人审批即可,可单选或多选。</p>
|
||||||
|
<p>6、当选择<strong> 指定人员(多人会签) </strong>时,表示指定人员中所有人都需要审批,可单选或多选。</p>
|
||||||
|
<p>7、如果指定用户没有分配查看审批模块的功能权限,系统会通知其审批,但是他无法查看此审批数据信息。</p>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -408,7 +416,9 @@
|
||||||
<div class="layui-input-inline">\
|
<div class="layui-input-inline">\
|
||||||
<select name="flowType[]" lay-filter="flowtype">\
|
<select name="flowType[]" lay-filter="flowtype">\
|
||||||
<option value="1">当前部门负责人</option>\
|
<option value="1">当前部门负责人</option>\
|
||||||
|
<option value="5">当前部门分管领导</option>\
|
||||||
<option value="2">上一级部门负责人</option>\
|
<option value="2">上一级部门负责人</option>\
|
||||||
|
<option value="7">上一级部门分管领导</option>\
|
||||||
<option value="3">指定人员(多人或签)</option>\
|
<option value="3">指定人员(多人或签)</option>\
|
||||||
<option value="4">指定人员(多人会签)</option>\
|
<option value="4">指定人员(多人会签)</option>\
|
||||||
</select>\
|
</select>\
|
||||||
|
|
|
@ -253,6 +253,47 @@ class Approve extends BaseController
|
||||||
}
|
}
|
||||||
$flow_list = Db::name('Flow')->where('id',$param['flow_id'])->value('flow_list');
|
$flow_list = Db::name('Flow')->where('id',$param['flow_id'])->value('flow_list');
|
||||||
$flow = unserialize($flow_list);
|
$flow = unserialize($flow_list);
|
||||||
|
|
||||||
|
foreach($flow as $item) {
|
||||||
|
// 当前部门负责人
|
||||||
|
if ($item['flow_type'] == 1) {
|
||||||
|
$manager_id = Db::name('department')->where('id', $this->did)->value('manager_id');
|
||||||
|
if (empty($manager_id)) {
|
||||||
|
return to_assign(1,'当前部门负责人不存在');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 上一级部门负责人
|
||||||
|
if ($item['flow_type'] == 2) {
|
||||||
|
$pid = Db::name('department')->where('id', $this->did)->value('pid');
|
||||||
|
if (empty($pid)) {
|
||||||
|
return to_assign(1,'上一级部门不存在');
|
||||||
|
}
|
||||||
|
$manager_id = Db::name('department')->where('id', $pid)->value('manager_id');
|
||||||
|
if (empty($manager_id)) {
|
||||||
|
return to_assign(1,'上一级部门负责人不存在');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 当前部门分管领导
|
||||||
|
if ($item['flow_type'] == 5) {
|
||||||
|
$leader_id = Db::name('department')->where('id', $this->did)->value('leader_id');
|
||||||
|
if (empty($leader_id)) {
|
||||||
|
return to_assign(1,'当前部门分管领导不存在');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 上一级部门分管领导
|
||||||
|
if ($item['flow_type'] == 6) {
|
||||||
|
$pid = Db::name('department')->where('id', $this->did)->value('pid');
|
||||||
|
if (empty($pid)) {
|
||||||
|
return to_assign(1,'上一级部门不存在');
|
||||||
|
}
|
||||||
|
$leader_id = Db::name('department')->where('id', $pid)->value('leader_id');
|
||||||
|
if (empty($leader_id)) {
|
||||||
|
return to_assign(1,'当前部门分管领导不存在');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
halt($flow, $this->uid, $this->did);
|
||||||
if ($param['id'] > 0) {
|
if ($param['id'] > 0) {
|
||||||
$param['update_time'] = time();
|
$param['update_time'] = time();
|
||||||
$param['check_status'] = 0;
|
$param['check_status'] = 0;
|
||||||
|
|
|
@ -72,6 +72,12 @@ function flowStep(){
|
||||||
else if(flow_data[a].flow_type==2){
|
else if(flow_data[a].flow_type==2){
|
||||||
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
userList+= '<li style="padding:3px 0">上级部门负责人</li>';
|
||||||
}
|
}
|
||||||
|
else if(flow_data[a].flow_type==5){
|
||||||
|
userList+= '<li style="padding:3px 0">当前部门分管领导</li>';
|
||||||
|
}
|
||||||
|
else if(flow_data[a].flow_type==6){
|
||||||
|
userList+= '<li style="padding:3px 0">上级部门分管领导</li>';
|
||||||
|
}
|
||||||
else{
|
else{
|
||||||
if(flow_data[a].flow_type==3){
|
if(flow_data[a].flow_type==3){
|
||||||
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>';
|
sign_type= ' <span class="layui-badge layui-bg-blue">或签</span>';
|
||||||
|
|
|
@ -21,9 +21,10 @@ class Department extends BaseController
|
||||||
{
|
{
|
||||||
if (request()->isAjax()) {
|
if (request()->isAjax()) {
|
||||||
$cate = Db::name('Department')
|
$cate = Db::name('Department')
|
||||||
->field('d.*,a.name as leader')
|
->field('d.*,a.name as leader,b.name as manager')
|
||||||
->alias('d')
|
->alias('d')
|
||||||
->join('Admin a', 'a.id = d.leader_id', 'LEFT')
|
->join('Admin a', 'a.id = d.leader_id', 'LEFT')
|
||||||
|
->join('Admin b', 'b.id = d.manager_id', 'LEFT')
|
||||||
->order('d.sort desc,d.id asc')
|
->order('d.sort desc,d.id asc')
|
||||||
->select();
|
->select();
|
||||||
$list = generateTree($cate);
|
$list = generateTree($cate);
|
||||||
|
|
|
@ -53,15 +53,24 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="layui-td-gray-2">部门负责人</td>
|
<td class="layui-td-gray-2">分管领导</td>
|
||||||
<td>
|
<td>
|
||||||
<select name="leader_id">
|
<select name="leader_id">
|
||||||
<option value="0">请选择部门负责人</option>
|
<option value="0">请选择分管领导</option>
|
||||||
{volist name="users" id="v"}
|
{volist name="users" id="v"}
|
||||||
<option value="{$v.id}" {eq name="detail.leader_id" value="$v.id"} selected{/eq}>{$v.name}</option>
|
<option value="{$v.id}" {eq name="detail.leader_id" value="$v.id"} selected{/eq}>{$v.name}</option>
|
||||||
{/volist}
|
{/volist}
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
|
<td class="layui-td-gray-2">部门负责人</td>
|
||||||
|
<td>
|
||||||
|
<select name="manager_id">
|
||||||
|
<option value="0">请选择部门负责人</option>
|
||||||
|
{volist name="users" id="v"}
|
||||||
|
<option value="{$v.id}" {eq name="detail.manager_id" value="$v.id"} selected{/eq}>{$v.name}</option>
|
||||||
|
{/volist}
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
<td class="layui-td-gray-2">部门联系电话</td>
|
<td class="layui-td-gray-2">部门联系电话</td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<input type="text" name="phone" value="{$detail.phone}" placeholder="请输入部门联系电话,可空" autocomplete="off" class="layui-input">
|
<input type="text" name="phone" value="{$detail.phone}" placeholder="请输入部门联系电话,可空" autocomplete="off" class="layui-input">
|
||||||
|
|
|
@ -38,7 +38,8 @@
|
||||||
, { field: 'pid', title: '上级部门ID',width: 120, align: 'center'}
|
, { field: 'pid', title: '上级部门ID',width: 120, align: 'center'}
|
||||||
, { field: 'title', title: '部门名称'}
|
, { field: 'title', title: '部门名称'}
|
||||||
, { field: 'sort', title: '排序',width: 80, align: 'center'}
|
, { field: 'sort', title: '排序',width: 80, align: 'center'}
|
||||||
, { field: 'leader', title: '部门负责人',width: 120, align: 'center'}
|
, { field: 'leader', title: '分管领导',width: 120, align: 'center'}
|
||||||
|
, { field: 'manager', title: '部门负责人',width: 120, align: 'center'}
|
||||||
, { field: 'phone', title: '部门电话',width: 160,}
|
, { field: 'phone', title: '部门电话',width: 160,}
|
||||||
, { width:180, title: '操作', align: 'center', templet: function (d) {
|
, { width:180, title: '操作', align: 'center', templet: function (d) {
|
||||||
var html = '<span class="layui-btn-group"><button class="layui-btn layui-btn-xs" lay-event="add">添加下级部门</button><button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit">编辑</button><button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</button></span>';
|
var html = '<span class="layui-btn-group"><button class="layui-btn layui-btn-xs" lay-event="add">添加下级部门</button><button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit">编辑</button><button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</button></span>';
|
||||||
|
|
Loading…
Reference in New Issue