提交 9d33376a 编写于 作者: 蝈蝈

V7.0.4 正式版

上级 99991f57
......@@ -10,7 +10,7 @@ namespace tpflow;
define('BEASE_URL', realpath ( dirname ( __FILE__ ) ) );
define('Tpflow_Ver', '7.0.0' );
define('Tpflow_Ver', '7.0.4' );
//引用适配器核心控制
use tpflow\service\Control;
//引用工具类
......
......@@ -216,6 +216,7 @@ class Info
}
//4.0版本新增查找是否有代理审核人员,并给与权限,权限转换
$info = Entrust::change($info);
//拼接返回数据
if ($result) {
if ($result['is_sing'] != 1) {
......
......@@ -93,7 +93,7 @@ class lib
/*事务增加角色判断*/
if ($flowinfo['status']['auto_person'] == 6) {
if ($flowinfo['status']['word_type']==1) {
if (in_array($thisuser['thisrole'], $user)) {
if (in_array($thisuser['thisuid'], $user)) {
$st = 1;
}
}else{
......@@ -113,7 +113,7 @@ class lib
$user_name = $flowinfo['sing_info']['username'];
$btn_default = $btn_lang['singapprove'];
} else {
$user_name = $flowinfo['sing_info']['uid'];
$user_name = $flowinfo['sing_info']['username'];
}
}
} else {
......@@ -784,6 +784,69 @@ php;
public static function tmp_check_ajax($info, $flowinfo)
{
$thisuser = ['thisuid' => unit::getuserinfo('uid'), 'thisrole' => unit::getuserinfo('role')];
//权限判断
$st = 0;
if ($flowinfo != -1 && !empty($flowinfo)) {
if (!isset($flowinfo['status'])) {
$btnHtml = -1;
}
if ($flowinfo['sing_st'] == 0) {
$user = explode(",", $flowinfo['status']['sponsor_ids']);
if ($flowinfo['status']['auto_person'] == 2 ||$flowinfo['status']['auto_person'] == 3 || $flowinfo['status']['auto_person'] == 4) {
if (in_array($thisuser['thisuid'], $user)) {
$st = 1;
}
}
/*事务增加角色判断*/
if ($flowinfo['status']['auto_person'] == 6) {
if ($flowinfo['status']['word_type']==1) {
if (in_array($thisuser['thisuid'], $user)) {
$st = 1;
}
}else{
if (in_array($thisuser['thisrole'], $user)) {
$st = 1;
}
}
}
if ($flowinfo['status']['auto_person'] == 5) {
if(!empty(array_intersect((array)$thisuser['thisrole'], $user))){// Guoke 2021/11/26 13:30 扩展多多用户组的支持
$st = 1;
}
}
} else {
if ($flowinfo['sing_info']['uid'] == $thisuser['thisuid']) {
$st = 1;
}
}
} else {
$btnHtml = -1;
}
if ($st == 1) {
$btnHtml = 1;
} else {
if(empty($flowinfo)){
$btnHtml = -1;
}else{
$btnHtml = -1;
}
}
if(empty($flowinfo)){
return '';
}
if($btnHtml==-1){
$tpflow_view = $info['tpflow_view'].$flowinfo['status']['run_flow'];
$html = '<a class="button" style="background-color: #d4d4d4">√ 同意</a> ';
if ($flowinfo['status']['is_back'] != 2) {
$html .= '<a class="button" style="background-color: #d4d4d4;">↺ 驳回</a> ';
}
if ($flowinfo['status']['is_sing'] != 2) {
$html .= '<a class="button" style="background-color: #d4d4d4;">⇅ 会签</a>';
}
$html .= ' <a class="button" onclick=Tpflow.lopen("审批历史","' . $info['tpflow_log'] . '",50,40)>✤ 审批历史</a> <a class="button" onclick=Tpflow.lopen("审批历史","' . $tpflow_view. '",50,80) style="background-color: #3963bc;">❤ 流程图</a> ';
return $html;
}
$tpflow_view = $info['tpflow_view'].$flowinfo['status']['run_flow'];
if ($flowinfo['sing_st'] == 0) {
$html = '<a class="button" onclick=Tpflow.lopen("提交工作流","' . $info['tpflow_ok'] . '",45,42) style="background-color: #19be6b">√ 同意</a> ';
......@@ -826,7 +889,7 @@ php;
}
$from_html = '';
foreach ($from as $k => $v) {
if(!in_array($k,['id','create_ip','create_os','is_delete','status','create_time','update_time','uptime'])){
if(!in_array($k,['id','create_ip','create_os','is_delete','create_time','update_time','uptime'])){
$from_html .= '<option value="' . $k . '">' . $v . '</option>';
}
}
......
......@@ -705,9 +705,8 @@ class Tpl
$tmpRaw .= "$p FIND_IN_SET('$v',f.sponsor_ids)";
$p=' or';
}
$mapRaw = '(f.auto_person != 5 and FIND_IN_SET(' . unit::getuserinfo('uid') . ",f.sponsor_ids)) or (f.auto_person=5 and ($tmpRaw))or (f.auto_person=6 and ($tmpRaw))";
$mapRaw = '(f.auto_person != 6 and f.auto_person != 5 and FIND_IN_SET(' . unit::getuserinfo('uid') . ',f.sponsor_ids)) or (f.auto_person=5 and (' . $tmpRaw.'))or (f.auto_person=6 and f.word_type=1 and FIND_IN_SET(' . unit::getuserinfo('uid') . ',f.sponsor_ids)) or (f.auto_person=6 and f.word_type=2 and ('.$tmpRaw.'))';
$data = Run::dataRunProcess($map,$mapRaw, $field, $order, $group,$page,$limit);
}
return ['code' => 1, 'msg' => '查询成功', 'data' => $data];
}
......
......@@ -126,13 +126,14 @@
<!--事务接受,即为当条件满足时,系统自动流转到下一个步骤,无需审核-->
<<select class="smalls" name='work_auto' style="width: 130px"><option value="">字段值</option>{$from_html|raw}</select>>
<select class="smalls" name="work_condition">
<option value="=">等于</option>
<option value="=" >等于</option>
<option value=">">大于</option>
<option value="<">小于</option>
<option value=">=">大于等于</option>
<option value="<=">小于小于</option>
<option value="<>">不等于</option>
</select>
<input type="text" class="smalls" name="work_val" value="{$one['work_val'] ?? ''}">系统自动审批
</div>
</td>
......@@ -149,6 +150,7 @@
</form>
</div>
</div>
<input value="{$one['work_condition'] ?? ''}" id="work_condition" type="hidden">
<script src="/static/work/jquery-1.7.2.min.js"></script>
<script src="/static/work/lib/layer/2.4/layer.js"></script>
<script src="/static/work/tpflow.api.js"></script>
......@@ -184,7 +186,7 @@
$("[name='wf_mode']").find("[value='{$one['wf_mode']}']").attr("selected", true);
$("[name='work_auto']").find("[value='{$one['work_auto'] ?? ''}']").attr("selected", true);
$("[name='wf_action_select']").find("[value='{$one['wf_action']}']").attr("selected", true);
$("[name='work_condition']").find("[value='{$one['work_condition'] ?? ''}']").attr("selected", true);
$("[name='work_condition']").find("[value='"+$('#work_condition').val()+"']").attr("selected", true);
$("[name='is_time']").find("[value='{$one['is_time']}']").attr("selected", true);
$(function(){
$("#form").Validform({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册