@@ -40,10 +40,56 @@ var bootstrap = function ($, learun) { | |||
}); | |||
}); | |||
function debounce(fn, delay) { | |||
let time = null; | |||
return function () { | |||
if (time !== null) { | |||
clearTimeout(time); | |||
} | |||
time = setTimeout(() => { | |||
fn.call(this); | |||
}, delay) | |||
} | |||
} | |||
//$('#btn_finish').on('click', debounce(function () { | |||
// console.log('123456') | |||
// var datapair = $sigdiv.jsignature("getdata"); | |||
// top.flowauditfn(datapair,stampurl); | |||
// learun.layerclose(window.name); | |||
//},500)) | |||
function debounce(fn, delay) { | |||
let time = null; | |||
return function () { | |||
if (time !== null) { | |||
clearTimeout(time); | |||
} | |||
time = setTimeout(() => { | |||
fn.call(this); | |||
}, delay) | |||
} | |||
} | |||
//$('#btn_finish').on('click', debounce(function () { | |||
// console.log('123456') | |||
// var datapair = $sigdiv.jsignature("getdata"); | |||
// top.flowauditfn(datapair,stampurl); | |||
// learun.layerclose(window.name); | |||
//},500)) | |||
$('#btn_finish').on('click', function () { | |||
var datapair = $sigdiv.jSignature("getData"); | |||
top.flowAuditfn(datapair,stampUrl); | |||
learun.layerClose(window.name); | |||
learun.loading(true, '正在提交'); | |||
var datapair = $sigdiv.jSignature("getData"); | |||
top.flowAuditfn(datapair,stampUrl); | |||
learun.layerClose(window.name); | |||
setTimeout(function () { | |||
learun.loading(false); | |||
}); | |||
}); | |||
} | |||
@@ -45,7 +45,7 @@ var bootstrap = function ($, learun) { | |||
title: '编辑功能', | |||
url: top.$.rootUrl + '/LR_SystemModule/Module/Form?keyValue=' + keyValue, | |||
height: 430, | |||
width: 700, | |||
width: 755, | |||
btn: null | |||
}); | |||
} | |||
@@ -204,18 +204,18 @@ | |||
if (dfop.isShowNum) { | |||
var $num = $('<div class="jfgrid-border-cell jfgrid-border-num"></div>'); | |||
$border.prepend($num); | |||
_width += 30; | |||
_width += 60; | |||
} | |||
if (dfop.isMultiselect) { | |||
var $cb = $('<div class="jfgrid-border-cell jfgrid-border-cb"><input role="checkbox" id="jfgrid_all_cb_' + dfop.id + '" type="checkbox"></div>') | |||
.css('left', _width + 'px').css('line-height', (dfop._headHeight - 1) + 'px'); | |||
$border.prepend($cb); | |||
_width += 30; | |||
_width += 60; | |||
} | |||
if (dfop.isSubGrid) { | |||
var $sub = $('<div class="jfgrid-border-cell jfgrid-border-sub"></div>').css('left', _width + 'px'); | |||
$border.prepend($sub); | |||
_width += 30; | |||
_width += 60; | |||
} | |||
dfop._borderLeftPadding = _width; | |||
@@ -157,6 +157,10 @@ | |||
} else { | |||
} | |||
break; | |||
case 'open':// 窗口 | |||
var newWin = window.open(o.F_UrlAddress); | |||
newWin.location.replace(o.F_UrlAddress); | |||
break; | |||
case "expand": | |||
var n = m.next(); | |||
if (n.is(":visible")) { | |||
@@ -127,6 +127,10 @@ | |||
h.frameTab.open(q) | |||
} else { } | |||
break; | |||
case "open":// 窗口 | |||
var newWin = window.open(q.F_UrlAddress); | |||
newWin.location.replace(q.F_UrlAddress); | |||
break; | |||
case "expand": | |||
if (!o.hasClass("active")) { | |||
// console.log(11) | |||
@@ -152,6 +156,10 @@ | |||
h.frameTab.open(q) | |||
} else { } | |||
break; | |||
case "open":// 窗口 | |||
var newWin = window.open(q.F_UrlAddress); | |||
newWin.location.replace(q.F_UrlAddress); | |||
break; | |||
case "expand": | |||
var p = o.next(); | |||
if (p.is(":visible")) { | |||
@@ -47,7 +47,7 @@ | |||
position: absolute; | |||
top: 0; | |||
left: 0; | |||
width: 30px; | |||
width: 60px; | |||
height: 100%; | |||
border-right: 1px solid #ccc; | |||
} | |||
@@ -165,7 +165,7 @@ | |||
left: 0; | |||
font-size: 12px; | |||
color: #333; | |||
width: 30px; | |||
width: 60px; | |||
line-height: 27px; | |||
border-bottom: 1px solid #ccc; | |||
border-right: 1px solid #ccc; | |||
@@ -154,7 +154,7 @@ | |||
op.running.statisticData[item.name] = op.running.statisticData[item.name] || 0; | |||
op.running.statisticData[item.name] += (parseFloat(text || 0) - rowItem.statisticsNum); | |||
rowItem.statisticsNum = parseFloat(text || 0); | |||
$('#jfgrid_statistic_' + op.id + ' [name="' + item.name + '"]').text(op.running.statisticData[item.name]); | |||
$('#jfgrid_statistic_' + op.id + ' [name="' + item.name + '"]').text(op.running.statisticData[item.name].toFixed(2)); | |||
} | |||
$expend = null; | |||
@@ -174,7 +174,7 @@ | |||
op.running.statisticData[item.name] = op.running.statisticData[item.name] || 0; | |||
op.running.statisticData[item.name] += (parseFloat(text || 0) - rowItem.statisticsNum); | |||
rowItem.statisticsNum = parseFloat(text || 0); | |||
$('#jfgrid_statistic_' + op.id + ' [name="' + item.name + '"]').text(op.running.statisticData[item.name]); | |||
$('#jfgrid_statistic_' + op.id + ' [name="' + item.name + '"]').text(op.running.statisticData[item.name].toFixed(2)); | |||
} | |||
}, value, row, op, rowItem.$cell); | |||
@@ -449,7 +449,7 @@ | |||
op.running.statisticData[item.name] += (parseFloat(rowItem.text || 0) - rowItem.statisticsNum); | |||
rowItem.statisticsNum = parseFloat(rowItem.text || 0); | |||
$('#jfgrid_statistic_' + op.id + ' [name="' + item.name + '"]').text(op.running.statisticData[item.name]); | |||
$('#jfgrid_statistic_' + op.id + ' [name="' + item.name + '"]').text(op.running.statisticData[item.name].toFixed(2)); | |||
} | |||
$expend = null; | |||
@@ -998,20 +998,20 @@ | |||
// 判断是否有序号列 | |||
if (op.isShowNum) { | |||
$border.append('<div class="jfgrid-border-cell jfgrid-border-num"></div>'); | |||
op.running.leftWidth += 30; | |||
op.running.leftWidth += 60; | |||
} | |||
// 判断是否允许多选 | |||
if (op.isMultiselect) { | |||
var $cb = $('<div class="jfgrid-border-cell jfgrid-border-cb"><img id="jfgrid_all_cb_' + op.id + '" src="' + imageurl + cb[0] + '" /></div>') | |||
.css({ 'left': op.running.leftWidth, 'line-height': (op.running.headHeight - 1) + 'px' }); | |||
$border.append($cb); | |||
op.running.leftWidth += 30; | |||
op.running.leftWidth += 60; | |||
} | |||
// 是否有展开 | |||
if (op.isSubGrid) { | |||
var $sub = $('<div class="jfgrid-border-cell jfgrid-border-sub"></div>').css('left', op.running.leftWidth); | |||
$border.append($sub); | |||
op.running.leftWidth += 30; | |||
op.running.leftWidth += 60; | |||
} | |||
op.running.leftWidth += op.running.frozenleft; | |||
$self.css({ 'padding-top': op.running.headHeight }); | |||
@@ -1281,7 +1281,7 @@ | |||
row['jfcheck'].$cell.css({ 'top': row['jfcheck'].top, 'left': row['jfcheck'].left, 'text-align': 'center', 'height': op.rowHeight, 'line-height': (op.rowHeight - 1) + 'px' }); | |||
$left.append(row['jfcheck'].$cell); | |||
_left += 30; | |||
_left += 60; | |||
} | |||
// 是否有子表选项 | |||
if (op.isSubGrid) { | |||
@@ -1293,7 +1293,7 @@ | |||
}; | |||
row['jfsubGrid'].$cell.css({ 'top': row['jfsubGrid'].top, 'left': row['jfsubGrid'].left, 'text-align': 'center', 'height': op.rowHeight, 'line-height': (op.rowHeight - 1) + 'px' }); | |||
$left.append(row['jfsubGrid'].$cell); | |||
_left += 30; | |||
_left += 60; | |||
} | |||
// 加载固定列数据 | |||
@@ -2153,7 +2153,7 @@ | |||
isAutoHeight: false, // 自动适应表格高度 | |||
height: 0, | |||
rowHeight: 28, // 行高 | |||
numRowWitdh: 30 // 序号列宽度 | |||
numRowWitdh: 60 // 序号列宽度 | |||
}; | |||
@@ -591,7 +591,8 @@ namespace Learun.Application.WorkFlow | |||
p.F_ParentProcessId, | |||
p.F_CreateUserId, | |||
p.F_CreateUserName, | |||
p.F_IsStart | |||
p.F_IsStart, | |||
d.F_DepartmentId,d.F_FullName | |||
FROM | |||
( | |||
SELECT | |||
@@ -617,6 +618,9 @@ namespace Learun.Application.WorkFlow | |||
) r | |||
LEFT JOIN LR_NWF_Task t ON t.F_Id = r.F_TaskId | |||
LEFT JOIN LR_NWF_Process p ON p.F_Id = t.F_ProcessId | |||
LEFT JOIN( | |||
SELECT t.F_DepartmentId,t.F_FullName,u.F_RealName,u.F_UserId | |||
FROM LR_Base_Department t left join LR_BASE_USER u on t.F_DepartmentId = u.F_DepartmentId) d ON d.F_UserId=t.F_CreateUserId | |||
WHERE | |||
t.F_IsFinished = 0 AND (p.F_IsFinished = 0 OR t.F_Type = 2 OR t.F_Type = 4 OR t.F_Type = 6)"); | |||
@@ -633,7 +637,7 @@ namespace Learun.Application.WorkFlow | |||
if (!queryParam["keyword"].IsEmpty()) | |||
{ | |||
keyword = "%" + queryParam["keyword"].ToString() + "%"; | |||
strSql.Append(" AND ( p.F_Title like @keyword OR p.F_SchemeName like @keyword ) "); | |||
strSql.Append(" AND ( p.F_Title like @keyword OR p.F_SchemeName like @keyword OR p.F_CreateUserName like @keyword OR d.F_FullName like @keyword ) "); | |||
} | |||
if (!string.IsNullOrEmpty(schemeCode)) | |||
@@ -646,16 +650,16 @@ namespace Learun.Application.WorkFlow | |||
strSql.Append(" AND t.F_IsBatchAudit = 1 "); | |||
} | |||
var data = this.BaseRepository().FindList<NWFProcessEntity>(strSql.ToString(), new { userId, startTime, endTime, keyword, schemeCode }, pagination); | |||
if (data.Count() > 0) | |||
{ | |||
foreach (var item in data) | |||
{ | |||
if (!string.IsNullOrEmpty(item.F_CreateUserName)) | |||
{ | |||
item.F_DepartmentId = this.BaseRepository().FindEntity<UserEntity>(x => x.F_UserId == item.F_CreateUserId)?.F_DepartmentId; | |||
} | |||
} | |||
} | |||
//if (data.Count() > 0) | |||
//{ | |||
// foreach (var item in data) | |||
// { | |||
// if (!string.IsNullOrEmpty(item.F_CreateUserName)) | |||
// { | |||
// item.F_DepartmentId = this.BaseRepository().FindEntity<UserEntity>(x => x.F_UserId == item.F_CreateUserId)?.F_DepartmentId; | |||
// } | |||
// } | |||
//} | |||
return data; | |||
} | |||
catch (Exception ex) | |||
@@ -806,11 +810,17 @@ namespace Learun.Application.WorkFlow | |||
p.F_CreateUserId, | |||
p.F_CreateUserName, | |||
p.F_IsStart, | |||
t.F_NodeId | |||
t.F_NodeId, | |||
d.F_DepartmentId,d.F_FullName | |||
FROM | |||
LR_NWF_Task t | |||
LEFT JOIN LR_NWF_TaskRelation r on r.F_TaskId = t.F_Id | |||
LEFT JOIN LR_NWF_Process p ON t.F_ProcessId = p.F_Id | |||
LEFT JOIN( | |||
SELECT t.F_DepartmentId,t.F_FullName,u.F_RealName,u.F_UserId | |||
FROM LR_Base_Department t | |||
left join LR_BASE_USER u on t.F_DepartmentId = u.F_DepartmentId | |||
) d ON d.F_UserId=t.F_CreateUserId | |||
WHERE | |||
(r.F_Result = 1 OR r.F_Result = 2 OR r.F_Result = 4) AND r.F_UserId = @userId | |||
"); | |||
@@ -829,7 +839,7 @@ namespace Learun.Application.WorkFlow | |||
if (!queryParam["keyword"].IsEmpty()) | |||
{ | |||
keyword = "%" + queryParam["keyword"].ToString() + "%"; | |||
strSql.Append(" AND ( p.F_ProcessName like @keyword OR p.F_SchemeName like @keyword ) "); | |||
strSql.Append(" AND ( p.F_Title like @keyword OR p.F_SchemeName like @keyword OR p.F_CreateUserName like @keyword OR p.F_CreateUserName like @keyword OR d.F_FullName like @keyword) "); | |||
} | |||
if (!string.IsNullOrEmpty(schemeCode)) | |||
{ | |||
@@ -845,10 +855,10 @@ namespace Learun.Application.WorkFlow | |||
{ | |||
item.NextNodeIsAudited = true; | |||
} | |||
if (!string.IsNullOrEmpty(item.F_CreateUserName)) | |||
{ | |||
item.F_DepartmentId = this.BaseRepository().FindEntity<UserEntity>(x => x.F_UserId == item.F_CreateUserId)?.F_DepartmentId; | |||
} | |||
//if (!string.IsNullOrEmpty(item.F_CreateUserName)) | |||
//{ | |||
// item.F_DepartmentId = this.BaseRepository().FindEntity<UserEntity>(x => x.F_UserId == item.F_CreateUserId)?.F_DepartmentId; | |||
//} | |||
} | |||
return data; | |||
} | |||