|
@@ -16,7 +16,7 @@ var auditors = []; |
|
|
var workforms = []; |
|
|
var workforms = []; |
|
|
var workformMap = {}; |
|
|
var workformMap = {}; |
|
|
// 按钮 |
|
|
// 按钮 |
|
|
var btnList = [{ id: '1', name: '同意', code: 'agree', file: '1', next: '1' }, { id: '2', name: '不同意', code: 'disagree', file: '1', next: '1' }]; |
|
|
|
|
|
|
|
|
var btnList = [{ id: '1', name: '同意', code: 'agree', file: '1', option: '1', next: '1' }, { id: '2', name: '不同意', code: 'disagree', file: '1', option: '1', next: '1' }]; |
|
|
// 条件节点 |
|
|
// 条件节点 |
|
|
var conditions = []; |
|
|
var conditions = []; |
|
|
|
|
|
|
|
@@ -69,7 +69,7 @@ var bootstrap = function ($, learun) { |
|
|
$('.div_batchAudit').show(); |
|
|
$('.div_batchAudit').show(); |
|
|
$('.div_agreeGz').show(); |
|
|
$('.div_agreeGz').show(); |
|
|
$('.div_noPeopleGz').show(); |
|
|
$('.div_noPeopleGz').show(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#name').removeAttr('readonly'); |
|
|
$('#name').removeAttr('readonly'); |
|
|
break; |
|
|
break; |
|
|
case 'auditornode': // 传阅节点 |
|
|
case 'auditornode': // 传阅节点 |
|
@@ -344,7 +344,7 @@ var bootstrap = function ($, learun) { |
|
|
$('#lr_form_schoolmaster').on('click', function () { |
|
|
$('#lr_form_schoolmaster').on('click', function () { |
|
|
learun.layerConfirm('是否确认增加分管校长?', function (res) { |
|
|
learun.layerConfirm('是否确认增加分管校长?', function (res) { |
|
|
if (res) { |
|
|
if (res) { |
|
|
var data = { auditorId:'fgxzid', type: '7', auditorName:'分管校长'}; |
|
|
|
|
|
|
|
|
var data = { auditorId: 'fgxzid', type: '7', auditorName: '分管校长' }; |
|
|
if (!isRepeat(data.auditorId)) { |
|
|
if (!isRepeat(data.auditorId)) { |
|
|
data.id = learun.newGuid(); |
|
|
data.id = learun.newGuid(); |
|
|
auditors.push(data); |
|
|
auditors.push(data); |
|
@@ -387,120 +387,120 @@ var bootstrap = function ($, learun) { |
|
|
subGridExpanded: function (subid, rowdata) { |
|
|
subGridExpanded: function (subid, rowdata) { |
|
|
$('#' + subid).jfGrid({ |
|
|
$('#' + subid).jfGrid({ |
|
|
headData: [ |
|
|
headData: [ |
|
|
{ |
|
|
|
|
|
label: "字段名称", name: "fieldName", width: 240, align: "left", |
|
|
|
|
|
edit: { |
|
|
|
|
|
type: rowdata.type == '0' ? 'input' : 'label', |
|
|
|
|
|
change: function (data, num) {// 行数据和行号 |
|
|
|
|
|
workformMap[rowdata.id].authorize[data.id] = data; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: "字段ID", name: "fieldId", width: 240, align: "left", |
|
|
|
|
|
edit: { |
|
|
|
|
|
type: rowdata.type == '0' ? 'input' : 'label', |
|
|
|
|
|
change: function (data, num) {// 行数据和行号 |
|
|
|
|
|
workformMap[rowdata.id].authorize[data.id] = data; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: "查看", name: "isLook", width: 70, align: "center", |
|
|
|
|
|
formatter: function (cellvalue, row, dfop, $dcell) { |
|
|
|
|
|
$dcell.on('click', function () { |
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
label: "字段名称", name: "fieldName", width: 240, align: "left", |
|
|
|
|
|
edit: { |
|
|
|
|
|
type: rowdata.type == '0' ? 'input' : 'label', |
|
|
|
|
|
change: function (data, num) {// 行数据和行号 |
|
|
|
|
|
workformMap[rowdata.id].authorize[data.id] = data; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: "字段ID", name: "fieldId", width: 240, align: "left", |
|
|
|
|
|
edit: { |
|
|
|
|
|
type: rowdata.type == '0' ? 'input' : 'label', |
|
|
|
|
|
change: function (data, num) {// 行数据和行号 |
|
|
|
|
|
workformMap[rowdata.id].authorize[data.id] = data; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: "查看", name: "isLook", width: 70, align: "center", |
|
|
|
|
|
formatter: function (cellvalue, row, dfop, $dcell) { |
|
|
|
|
|
$dcell.on('click', function () { |
|
|
|
|
|
|
|
|
if (row.isLook == 1) { |
|
|
|
|
|
if (dfop.isEdit) {// 系统表单 |
|
|
|
|
|
workformMap[rowdata.id].authorize[row.id].isLook = 0; |
|
|
|
|
|
} |
|
|
|
|
|
else {// 自定义表单 |
|
|
|
|
|
var _formAuthorize = workformMap[row.formId].authorize; |
|
|
|
|
|
_formAuthorize[row.fieldId] = _formAuthorize[row.fieldId] || { isLook: 1, isEdit: 1 }; |
|
|
|
|
|
_formAuthorize[row.fieldId].isLook = 0; |
|
|
|
|
|
} |
|
|
|
|
|
row.isLook = 0; |
|
|
|
|
|
$(this).html('<span class=\"label label-default \" style=\"cursor: pointer;\">否</span>'); |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
if (dfop.isEdit) {// 系统表单 |
|
|
|
|
|
workformMap[rowdata.id].authorize[row.id].isLook = 1; |
|
|
|
|
|
} |
|
|
|
|
|
else {// 自定义表单 |
|
|
|
|
|
var _formAuthorize = workformMap[row.formId].authorize; |
|
|
|
|
|
_formAuthorize[row.fieldId] = _formAuthorize[row.fieldId] || { isLook: 1, isEdit: 1 }; |
|
|
|
|
|
_formAuthorize[row.fieldId].isLook = 1; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (row.isLook == 1) { |
|
|
|
|
|
if (dfop.isEdit) {// 系统表单 |
|
|
|
|
|
workformMap[rowdata.id].authorize[row.id].isLook = 0; |
|
|
|
|
|
} |
|
|
|
|
|
else {// 自定义表单 |
|
|
|
|
|
var _formAuthorize = workformMap[row.formId].authorize; |
|
|
|
|
|
_formAuthorize[row.fieldId] = _formAuthorize[row.fieldId] || { isLook: 1, isEdit: 1 }; |
|
|
|
|
|
_formAuthorize[row.fieldId].isLook = 0; |
|
|
|
|
|
} |
|
|
|
|
|
row.isLook = 0; |
|
|
|
|
|
$(this).html('<span class=\"label label-default \" style=\"cursor: pointer;\">否</span>'); |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
if (dfop.isEdit) {// 系统表单 |
|
|
|
|
|
workformMap[rowdata.id].authorize[row.id].isLook = 1; |
|
|
|
|
|
} |
|
|
|
|
|
else {// 自定义表单 |
|
|
|
|
|
var _formAuthorize = workformMap[row.formId].authorize; |
|
|
|
|
|
_formAuthorize[row.fieldId] = _formAuthorize[row.fieldId] || { isLook: 1, isEdit: 1 }; |
|
|
|
|
|
_formAuthorize[row.fieldId].isLook = 1; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
row.isLook = 1; |
|
|
|
|
|
$(this).html('<span class=\"label label-success \" style=\"cursor: pointer;\">是</span>'); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
row.isLook = 1; |
|
|
|
|
|
$(this).html('<span class=\"label label-success \" style=\"cursor: pointer;\">是</span>'); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
//默认绑定授权值 |
|
|
|
|
|
if (dfop.isEdit) {// 系统表单 |
|
|
|
|
|
workformMap[rowdata.id].authorize[row.id].isLook = cellvalue; |
|
|
|
|
|
} |
|
|
|
|
|
else {// 自定义表单 |
|
|
|
|
|
var _formAuthorize = workformMap[row.formId].authorize; |
|
|
|
|
|
_formAuthorize[row.fieldId] = _formAuthorize[row.fieldId] || { isLook: 1, isEdit: 1 }; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//默认绑定授权值 |
|
|
|
|
|
if (dfop.isEdit) {// 系统表单 |
|
|
|
|
|
workformMap[rowdata.id].authorize[row.id].isLook = cellvalue; |
|
|
|
|
|
} |
|
|
|
|
|
else {// 自定义表单 |
|
|
|
|
|
var _formAuthorize = workformMap[row.formId].authorize; |
|
|
|
|
|
_formAuthorize[row.fieldId] = _formAuthorize[row.fieldId] || { isLook: 1, isEdit: 1 }; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (cellvalue == 1) { |
|
|
|
|
|
return '<span class=\"label label-success \" style=\"cursor: pointer;\">是</span>'; |
|
|
|
|
|
} else if (cellvalue == 0) { |
|
|
|
|
|
return '<span class=\"label label-default \" style=\"cursor: pointer;\">否</span>'; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: "编辑", name: "isEdit", width: 70, align: "center", |
|
|
|
|
|
formatter: function (cellvalue, row, dfop, $dcell) { |
|
|
|
|
|
$dcell.on('click', function () { |
|
|
|
|
|
if (row.isEdit == 1) { |
|
|
|
|
|
if (dfop.isEdit) {// 系统表单 |
|
|
|
|
|
workformMap[rowdata.id].authorize[row.id].isEdit = 0; |
|
|
|
|
|
} |
|
|
|
|
|
else {// 自定义表单 |
|
|
|
|
|
var _formAuthorize = workformMap[row.formId].authorize; |
|
|
|
|
|
_formAuthorize[row.fieldId] = _formAuthorize[row.fieldId] || { isLook: 1, isEdit: 1 }; |
|
|
|
|
|
_formAuthorize[row.fieldId].isEdit = 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (cellvalue == 1) { |
|
|
|
|
|
return '<span class=\"label label-success \" style=\"cursor: pointer;\">是</span>'; |
|
|
|
|
|
} else if (cellvalue == 0) { |
|
|
|
|
|
return '<span class=\"label label-default \" style=\"cursor: pointer;\">否</span>'; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: "编辑", name: "isEdit", width: 70, align: "center", |
|
|
|
|
|
formatter: function (cellvalue, row, dfop, $dcell) { |
|
|
|
|
|
$dcell.on('click', function () { |
|
|
|
|
|
if (row.isEdit == 1) { |
|
|
|
|
|
if (dfop.isEdit) {// 系统表单 |
|
|
|
|
|
workformMap[rowdata.id].authorize[row.id].isEdit = 0; |
|
|
|
|
|
} |
|
|
|
|
|
else {// 自定义表单 |
|
|
|
|
|
var _formAuthorize = workformMap[row.formId].authorize; |
|
|
|
|
|
_formAuthorize[row.fieldId] = _formAuthorize[row.fieldId] || { isLook: 1, isEdit: 1 }; |
|
|
|
|
|
_formAuthorize[row.fieldId].isEdit = 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
row.isEdit = 0; |
|
|
|
|
|
$(this).html('<span class=\"label label-default \" style=\"cursor: pointer;\">否</span>'); |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
if (dfop.isEdit) {// 系统表单 |
|
|
|
|
|
workformMap[rowdata.id].authorize[row.id].isEdit = 1; |
|
|
|
|
|
} |
|
|
|
|
|
else {// 自定义表单 |
|
|
|
|
|
var _formAuthorize = workformMap[row.formId].authorize; |
|
|
|
|
|
_formAuthorize[row.fieldId] = _formAuthorize[row.fieldId] || { isLook: 1, isEdit: 1 }; |
|
|
|
|
|
_formAuthorize[row.fieldId].isEdit = 1; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
row.isEdit = 0; |
|
|
|
|
|
$(this).html('<span class=\"label label-default \" style=\"cursor: pointer;\">否</span>'); |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
if (dfop.isEdit) {// 系统表单 |
|
|
|
|
|
workformMap[rowdata.id].authorize[row.id].isEdit = 1; |
|
|
|
|
|
} |
|
|
|
|
|
else {// 自定义表单 |
|
|
|
|
|
var _formAuthorize = workformMap[row.formId].authorize; |
|
|
|
|
|
_formAuthorize[row.fieldId] = _formAuthorize[row.fieldId] || { isLook: 1, isEdit: 1 }; |
|
|
|
|
|
_formAuthorize[row.fieldId].isEdit = 1; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
row.isEdit = 1; |
|
|
|
|
|
$(this).html('<span class=\"label label-success \" style=\"cursor: pointer;\">是</span>'); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
row.isEdit = 1; |
|
|
|
|
|
$(this).html('<span class=\"label label-success \" style=\"cursor: pointer;\">是</span>'); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
//默认绑定授权值 |
|
|
|
|
|
if (dfop.isEdit) {// 系统表单 |
|
|
|
|
|
workformMap[rowdata.id].authorize[row.id].isEdit = cellvalue; |
|
|
|
|
|
} |
|
|
|
|
|
else {// 自定义表单 |
|
|
|
|
|
var _formAuthorize = workformMap[row.formId].authorize; |
|
|
|
|
|
_formAuthorize[row.fieldId] = _formAuthorize[row.fieldId] || { isLook: 1, isEdit: 1 }; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//默认绑定授权值 |
|
|
|
|
|
if (dfop.isEdit) {// 系统表单 |
|
|
|
|
|
workformMap[rowdata.id].authorize[row.id].isEdit = cellvalue; |
|
|
|
|
|
} |
|
|
|
|
|
else {// 自定义表单 |
|
|
|
|
|
var _formAuthorize = workformMap[row.formId].authorize; |
|
|
|
|
|
_formAuthorize[row.fieldId] = _formAuthorize[row.fieldId] || { isLook: 1, isEdit: 1 }; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (cellvalue == 1) { |
|
|
|
|
|
return '<span class=\"label label-success \" style=\"cursor: pointer;\">是</span>'; |
|
|
|
|
|
} else if (cellvalue == 0) { |
|
|
|
|
|
return '<span class=\"label label-default \" style=\"cursor: pointer;\">否</span>'; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (cellvalue == 1) { |
|
|
|
|
|
return '<span class=\"label label-success \" style=\"cursor: pointer;\">是</span>'; |
|
|
|
|
|
} else if (cellvalue == 0) { |
|
|
|
|
|
return '<span class=\"label label-default \" style=\"cursor: pointer;\">否</span>'; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
], |
|
|
], |
|
|
onAddRow: function (row, rows) {//行数据和所有行数据 |
|
|
onAddRow: function (row, rows) {//行数据和所有行数据 |
|
|
row.isLook = 0; |
|
|
row.isLook = 0; |
|
@@ -679,7 +679,7 @@ var bootstrap = function ($, learun) { |
|
|
value: 'F_StrategyCode', |
|
|
value: 'F_StrategyCode', |
|
|
url: top.$.rootUrl + '/LR_Message/LR_StrategyInfo/GetList' |
|
|
url: top.$.rootUrl + '/LR_Message/LR_StrategyInfo/GetList' |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*按钮设置*/ |
|
|
/*按钮设置*/ |
|
|
$('#btn_girdtable').jfGrid({ |
|
|
$('#btn_girdtable').jfGrid({ |
|
|
headData: [ |
|
|
headData: [ |
|
@@ -709,6 +709,16 @@ var bootstrap = function ($, learun) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: "需要填写意见", name: "isOpinion", width: 100, align: "left", |
|
|
|
|
|
formatter: function (cellvalue, row) { |
|
|
|
|
|
if (cellvalue == '1') { |
|
|
|
|
|
return '需要'; |
|
|
|
|
|
} else { |
|
|
|
|
|
return '不需要'; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: "下一节点审核人", name: "next", width: 100, align: "left", |
|
|
label: "下一节点审核人", name: "next", width: 100, align: "left", |
|
|
formatter: function (cellvalue, row) { |
|
|
formatter: function (cellvalue, row) { |
|
@@ -728,11 +738,11 @@ var bootstrap = function ($, learun) { |
|
|
title: '添加按钮', |
|
|
title: '添加按钮', |
|
|
url: top.$.rootUrl + '/LR_NewWorkFlow/NWFScheme/ButtonForm', |
|
|
url: top.$.rootUrl + '/LR_NewWorkFlow/NWFScheme/ButtonForm', |
|
|
width: 400, |
|
|
width: 400, |
|
|
height: 320, |
|
|
|
|
|
|
|
|
height: 350, |
|
|
callBack: function (id) { |
|
|
callBack: function (id) { |
|
|
return top[id].acceptClick(function (data) { |
|
|
return top[id].acceptClick(function (data) { |
|
|
var _flag = true; |
|
|
var _flag = true; |
|
|
$.each(btnList, function (_index,_item) { |
|
|
|
|
|
|
|
|
$.each(btnList, function (_index, _item) { |
|
|
if (_item.code == data.code) { |
|
|
if (_item.code == data.code) { |
|
|
learun.alert.error('按钮编码重复!'); |
|
|
learun.alert.error('按钮编码重复!'); |
|
|
_flag = false; |
|
|
_flag = false; |
|
@@ -761,7 +771,7 @@ var bootstrap = function ($, learun) { |
|
|
title: '编辑按钮', |
|
|
title: '编辑按钮', |
|
|
url: top.$.rootUrl + '/LR_NewWorkFlow/NWFScheme/ButtonForm?id=' + _id, |
|
|
url: top.$.rootUrl + '/LR_NewWorkFlow/NWFScheme/ButtonForm?id=' + _id, |
|
|
width: 400, |
|
|
width: 400, |
|
|
height: 320, |
|
|
|
|
|
|
|
|
height: 350, |
|
|
callBack: function (id) { |
|
|
callBack: function (id) { |
|
|
return top[id].acceptClick(function (data) { |
|
|
return top[id].acceptClick(function (data) { |
|
|
for (var i = 0, l = btnList.length; i < l; i++) { |
|
|
for (var i = 0, l = btnList.length; i < l; i++) { |
|
@@ -974,7 +984,7 @@ var bootstrap = function ($, learun) { |
|
|
if (currentNode.auditors) { |
|
|
if (currentNode.auditors) { |
|
|
auditors = currentNode.auditors; |
|
|
auditors = currentNode.auditors; |
|
|
} |
|
|
} |
|
|
if (currentNode.btnList && currentNode.btnList.length >0) { |
|
|
|
|
|
|
|
|
if (currentNode.btnList && currentNode.btnList.length > 0) { |
|
|
btnList = currentNode.btnList; |
|
|
btnList = currentNode.btnList; |
|
|
} |
|
|
} |
|
|
if (currentNode.conditions) { |
|
|
if (currentNode.conditions) { |
|
@@ -1000,7 +1010,7 @@ var bootstrap = function ($, learun) { |
|
|
$('#iocName').val(currentNode.iocName); |
|
|
$('#iocName').val(currentNode.iocName); |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
// 保存数据 |
|
|
// 保存数据 |
|
@@ -1024,7 +1034,7 @@ var bootstrap = function ($, learun) { |
|
|
currentNode.auditorAgainType = baseInfo.auditorAgainType; |
|
|
currentNode.auditorAgainType = baseInfo.auditorAgainType; |
|
|
currentNode.auditorType = baseInfo.auditorType; |
|
|
currentNode.auditorType = baseInfo.auditorType; |
|
|
currentNode.auditExecutType = baseInfo.auditExecutType; |
|
|
currentNode.auditExecutType = baseInfo.auditExecutType; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
currentNode.isSign = baseInfo.isSign; |
|
|
currentNode.isSign = baseInfo.isSign; |
|
|
currentNode.isBatchAudit = baseInfo.isBatchAudit; |
|
|
currentNode.isBatchAudit = baseInfo.isBatchAudit; |
|
@@ -1086,7 +1096,6 @@ var bootstrap = function ($, learun) { |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
callBack(); |
|
|
callBack(); |
|
|
return true; |
|
|
return true; |
|
|
}; |
|
|
}; |
|
|