@@ -62,7 +62,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
return View(); | return View(); | ||||
} | } | ||||
#endregion | #endregion | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -3,16 +3,12 @@ | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | Layout = "~/Views/Shared/_Form.cshtml"; | ||||
} | } | ||||
<div class="lr-form-wrap" id="form"> | <div class="lr-form-wrap" id="form"> | ||||
<div class="col-xs-4 lr-form-item" data-table="Dispatch"> | |||||
<div class="lr-form-item-title">工作名称<font face="宋体">*</font></div> | |||||
<input id="WorkName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="Dispatch"> | |||||
<div class="col-xs-6 lr-form-item" data-table="Dispatch"> | |||||
<div class="lr-form-item-title">标题<font face="宋体">*</font></div> | <div class="lr-form-item-title">标题<font face="宋体">*</font></div> | ||||
<div id="DisTitle" isvalid="yes" checkexpession="NotNull"></div> | |||||
<input id="DisTitle" isvalid="yes" class="form-control" checkexpession="NotNull" /> | |||||
</div> | </div> | ||||
<div class="col-xs-4 lr-form-item" data-table="Dispatch"> | |||||
<div class="lr-form-item-title">来文<font face="宋体">*</font></div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Dispatch"> | |||||
<div class="lr-form-item-title">来文单位<font face="宋体">*</font></div> | |||||
<input id="DisFrom" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | <input id="DisFrom" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-2 lr-form-item" data-table="Dispatch"> | <div class="col-xs-2 lr-form-item" data-table="Dispatch"> | ||||
@@ -58,11 +54,11 @@ | |||||
isvalid="yes" checkexpession="NotNull" /> | isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
@*<div class="col-xs-12 lr-form-item" data-table="Dispatch"> | @*<div class="col-xs-12 lr-form-item" data-table="Dispatch"> | ||||
<div class="lr-form-item-title">批示</div> | |||||
<textarea id="Instructions" class="form-control" style="height:100px;"></textarea> | |||||
</div>*@ | |||||
<div class="lr-form-item-title">批示</div> | |||||
<textarea id="Instructions" class="form-control" style="height:100px;"></textarea> | |||||
</div>*@ | |||||
<div class="col-xs-4 lr-form-item" data-table="Dispatch"> | <div class="col-xs-4 lr-form-item" data-table="Dispatch"> | ||||
<div class="lr-form-item-title">收文</div> | |||||
<div class="lr-form-item-title">收文单位</div> | |||||
<div id="DisOffice"></div> | <div id="DisOffice"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Dispatch" style="display: none; "> | <div class="col-xs-6 lr-form-item" data-table="Dispatch" style="display: none; "> | ||||
@@ -6,7 +6,6 @@ | |||||
*/ | */ | ||||
var acceptClick; | var acceptClick; | ||||
var keyValue = request('keyValue'); | var keyValue = request('keyValue'); | ||||
var DisTitle = request('DisTitle'); | |||||
var DisOffice = request('DisOffice'); | var DisOffice = request('DisOffice'); | ||||
// 设置权限 | // 设置权限 | ||||
var setAuthorize; | var setAuthorize; | ||||
@@ -20,24 +19,23 @@ var bootstrap = function ($, learun) { | |||||
"use strict"; | "use strict"; | ||||
// 设置权限 | // 设置权限 | ||||
setAuthorize = function (data) { | setAuthorize = function (data) { | ||||
if(!!data) | |||||
{ | |||||
for (var field in data) { | |||||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||||
$('#' + data[field].fieldId).parent().remove(); | |||||
} | |||||
else { | |||||
if (data[field].isEdit != 1) { | |||||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||||
if (!!data) { | |||||
for (var field in data) { | |||||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||||
$('#' + data[field].fieldId).parent().remove(); | |||||
} | |||||
else { | |||||
if (data[field].isEdit != 1) { | |||||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||||
} | |||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | |||||
}; | |||||
}; | |||||
var page = { | var page = { | ||||
init: function () { | init: function () { | ||||
$('.lr-form-wrap').lrscroll(); | $('.lr-form-wrap').lrscroll(); | ||||
@@ -45,15 +43,7 @@ var bootstrap = function ($, learun) { | |||||
page.initData(); | page.initData(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
//var DisOfficeUE = UE.getEditor('DisOffice'); | |||||
//$('#DisOffice')[0].ue = DisOfficeUE; | |||||
$('#AttachmentName').lrUploader(); | $('#AttachmentName').lrUploader(); | ||||
$('#DisTitle').lrDataItemSelect({ code: 'Dispatch' }); | |||||
if (DisTitle == "1") { | |||||
$('#DisTitle').lrselectSet("1"); | |||||
} else { | |||||
$('#DisTitle').lrselectSet("2"); | |||||
} | |||||
$('#DisOffice').lrDataItemSelect({ code: 'DisOffice' }); | $('#DisOffice').lrDataItemSelect({ code: 'DisOffice' }); | ||||
if (DisOffice == "1") { | if (DisOffice == "1") { | ||||
$('#DisOffice').lrselectSet("1"); | $('#DisOffice').lrselectSet("1"); | ||||
@@ -66,7 +56,7 @@ var bootstrap = function ($, learun) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Dispatch/GetFormData?keyValue=' + keyValue, function (data) { | $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Dispatch/GetFormData?keyValue=' + keyValue, function (data) { | ||||
for (var id in data) { | for (var id in data) { | ||||
if (!!data[id].length && data[id].length > 0) { | if (!!data[id].length && data[id].length > 0) { | ||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | } | ||||
else { | else { | ||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | $('[data-table="' + id + '"]').lrSetFormData(data[id]); | ||||
@@ -77,23 +67,24 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}; | }; | ||||
// 设置表单数据 | // 设置表单数据 | ||||
setFormData = function (processId,param,callback) { | |||||
setFormData = function (processId, param, callback) { | |||||
if (!!processId) { | if (!!processId) { | ||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Dispatch/GetFormDataByProcessId?processId=' + processId, function (data) { | $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Dispatch/GetFormDataByProcessId?processId=' + processId, function (data) { | ||||
for (var id in data) { | for (var id in data) { | ||||
if (!!data[id] && data[id].length > 0) { | if (!!data[id] && data[id].length > 0) { | ||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
if(id == 'Dispatch' && data[id] ){ | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
if (id == 'Dispatch' && data[id]) { | |||||
keyValue = data[id].Id; | keyValue = data[id].Id; | ||||
} | } | ||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | } | ||||
}); | |||||
} | |||||
callback && callback(); } | |||||
} | |||||
}); | |||||
} | |||||
callback && callback(); | |||||
} | |||||
// 验证数据是否填写完整 | // 验证数据是否填写完整 | ||||
validForm = function () { | validForm = function () { | ||||
if (!$('body').lrValidform()) { | if (!$('body').lrValidform()) { | ||||
@@ -104,8 +95,13 @@ var bootstrap = function ($, learun) { | |||||
// 保存数据 | // 保存数据 | ||||
save = function (processId, callBack, i) { | save = function (processId, callBack, i) { | ||||
var formData = $('body').lrGetFormData(); | var formData = $('body').lrGetFormData(); | ||||
if(!!processId){ | |||||
formData.FlowNo =processId; | |||||
if (!!processId) { | |||||
formData.FlowNo = processId; | |||||
} | |||||
if (formData.WorkName == "1") { | |||||
formData.WorkName = "1"; | |||||
} else { | |||||
formData.WorkName = "2"; | |||||
} | } | ||||
var postData = { | var postData = { | ||||
strEntity: JSON.stringify(formData) | strEntity: JSON.stringify(formData) | ||||
@@ -3,16 +3,12 @@ | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | Layout = "~/Views/Shared/_Form.cshtml"; | ||||
} | } | ||||
<div class="lr-form-wrap" id="form"> | <div class="lr-form-wrap" id="form"> | ||||
<div class="col-xs-4 lr-form-item" data-table="Dispatch"> | |||||
<div class="lr-form-item-title">工作名称<font face="宋体">*</font></div> | |||||
<input id="WorkName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="Dispatch"> | |||||
<div class="col-xs-6 lr-form-item" data-table="Dispatch"> | |||||
<div class="lr-form-item-title">标题<font face="宋体">*</font></div> | <div class="lr-form-item-title">标题<font face="宋体">*</font></div> | ||||
<div id="DisTitle" isvalid="yes" checkexpession="NotNull"></div> | |||||
<input id="DisTitle" isvalid="yes" class="form-control" checkexpession="NotNull" /> | |||||
</div> | </div> | ||||
<div class="col-xs-4 lr-form-item" data-table="Dispatch"> | |||||
<div class="lr-form-item-title">来文<font face="宋体">*</font></div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Dispatch"> | |||||
<div class="lr-form-item-title">来文单位<font face="宋体">*</font></div> | |||||
<input id="DisFrom" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | <input id="DisFrom" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-2 lr-form-item" data-table="Dispatch"> | <div class="col-xs-2 lr-form-item" data-table="Dispatch"> | ||||
@@ -57,14 +53,6 @@ | |||||
onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#RenderDate').trigger('change'); } })" | onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#RenderDate').trigger('change'); } })" | ||||
isvalid="yes" checkexpession="NotNull" /> | isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="Dispatch"> | |||||
<div class="lr-form-item-title">批示</div> | |||||
<textarea id="Instructions" class="form-control" style="height:100px;"></textarea> | |||||
</div> | |||||
@*<div class="col-xs-12 lr-form-item" data-table="Dispatch"> | |||||
<div class="lr-form-item-title">收文</div> | |||||
<input id="DisOffice" type="text" class="form-control" /> | |||||
</div>*@ | |||||
<div class="col-xs-6 lr-form-item" data-table="Dispatch" style="display: none; "> | <div class="col-xs-6 lr-form-item" data-table="Dispatch" style="display: none; "> | ||||
<div class="lr-form-item-title">流程</div> | <div class="lr-form-item-title">流程</div> | ||||
<input id="FlowNo" type="text" class="form-control" /> | <input id="FlowNo" type="text" class="form-control" /> | ||||
@@ -74,7 +62,7 @@ | |||||
<input id="processId" type="text" class="form-control" /> | <input id="processId" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-4 lr-form-item" data-table="Dispatch"> | <div class="col-xs-4 lr-form-item" data-table="Dispatch"> | ||||
<div class="lr-form-item-title">收文</div> | |||||
<div class="lr-form-item-title">收文单位</div> | |||||
<div id="DisOffice"></div> | <div id="DisOffice"></div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -6,7 +6,6 @@ | |||||
*/ | */ | ||||
var acceptClick; | var acceptClick; | ||||
var keyValue = request('keyValue'); | var keyValue = request('keyValue'); | ||||
var DisTitle = request('DisTitle'); | |||||
var DisOffice = request('DisOffice'); | var DisOffice = request('DisOffice'); | ||||
// 设置权限 | // 设置权限 | ||||
var setAuthorize; | var setAuthorize; | ||||
@@ -45,12 +44,6 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#AttachmentName').lrUploader(); | $('#AttachmentName').lrUploader(); | ||||
$('#DisTitle').lrDataItemSelect({ code: 'Dispatch' }); | |||||
if (DisTitle == "1") { | |||||
$('#DisTitle').lrselectSet("1"); | |||||
} else { | |||||
$('#DisTitle').lrselectSet("2"); | |||||
} | |||||
$('#DisOffice').lrDataItemSelect({ code: 'DisOffice' }); | $('#DisOffice').lrDataItemSelect({ code: 'DisOffice' }); | ||||
if (DisOffice == "1") { | if (DisOffice == "1") { | ||||
$('#DisOffice').lrselectSet("1"); | $('#DisOffice').lrselectSet("1"); | ||||
@@ -106,6 +99,7 @@ var bootstrap = function ($, learun) { | |||||
if (!!processId) { | if (!!processId) { | ||||
formData.FlowNo = processId; | formData.FlowNo = processId; | ||||
} | } | ||||
formData.WorkName = 2; | |||||
var postData = { | var postData = { | ||||
strEntity: JSON.stringify(formData) | strEntity: JSON.stringify(formData) | ||||
}; | }; | ||||
@@ -10,14 +10,14 @@ | |||||
<div class="lr-layout-tool-item"> | <div class="lr-layout-tool-item"> | ||||
<div id="multiple_condition_query"> | <div id="multiple_condition_query"> | ||||
<div class="lr-query-formcontent"> | <div class="lr-query-formcontent"> | ||||
@*<div class="col-xs-12 lr-form-item"> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">标题</div> | <div class="lr-form-item-title">标题</div> | ||||
<input id="DisTitle" type="text" class="form-control" /> | <input id="DisTitle" type="text" class="form-control" /> | ||||
</div>*@ | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">收文</div> | |||||
<input id="DisOffice" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
@*<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">收文单位</div> | |||||
<input id="DisOffice" type="text" class="form-control" /> | |||||
</div>*@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -26,9 +26,9 @@ var bootstrap = function ($, learun) { | |||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form', | id: 'form', | ||||
title: '新增', | title: '新增', | ||||
url: top.$.rootUrl + '/EducationalAdministration/Dispatch/Form?DisTitle=' + 1 + '&DisOffice=' + 1, | |||||
url: top.$.rootUrl + '/EducationalAdministration/Dispatch/Form?WorkName=' + 1 + '&DisOffice=' + 1, | |||||
width: 1000, | width: 1000, | ||||
height: 700, | |||||
height: 500, | |||||
callBack: function (id) { | callBack: function (id) { | ||||
var res = false; | var res = false; | ||||
// 验证数据 | // 验证数据 | ||||
@@ -36,7 +36,6 @@ var bootstrap = function ($, learun) { | |||||
// 保存数据 | // 保存数据 | ||||
if (res) { | if (res) { | ||||
res = top[id].save('', function () { | res = top[id].save('', function () { | ||||
page.search(); | page.search(); | ||||
}); | }); | ||||
@@ -61,9 +60,9 @@ var bootstrap = function ($, learun) { | |||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form', | id: 'form', | ||||
title: '编辑', | title: '编辑', | ||||
url: top.$.rootUrl + '/EducationalAdministration/Dispatch/Form?keyValue=' + keyValue + '&DisTitle=' + 1 + '&DisOffice=' + 1, | |||||
url: top.$.rootUrl + '/EducationalAdministration/Dispatch/Form?keyValue=' + keyValue + '&WorkName=' + 1 + '&DisOffice=' + 1, | |||||
width: 1000, | width: 1000, | ||||
height: 700, | |||||
height: 500, | |||||
callBack: function (id) { | callBack: function (id) { | ||||
var res = false; | var res = false; | ||||
// 验证数据 | // 验证数据 | ||||
@@ -140,20 +139,8 @@ var bootstrap = function ($, learun) { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | $('#gridtable').lrAuthorizeJfGrid({ | ||||
url: top.$.rootUrl + '/EducationalAdministration/Dispatch/GetPageList', | url: top.$.rootUrl + '/EducationalAdministration/Dispatch/GetPageList', | ||||
headData: [ | headData: [ | ||||
{ label: "工作名称", name: "WorkName", width: 200, align: "center" }, | |||||
{ | |||||
label: "标题", name: "DisTitle", width: 250, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'Dispatch', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "来文", name: "DisFrom", width: 100, align: "center" }, | |||||
{ label: "标题", name: "DisTitle", width: 250, align: "center" }, | |||||
{ label: "来文单位", name: "DisFrom", width: 200, align: "center" }, | |||||
{ label: "字", name: "DisWork", width: 80, align: "center" }, | { label: "字", name: "DisWork", width: 80, align: "center" }, | ||||
{ label: "号", name: "DisMark", width: 80, align: "center" }, | { label: "号", name: "DisMark", width: 80, align: "center" }, | ||||
{ label: "份数", name: "Copies", width: 50, align: "center" }, | { label: "份数", name: "Copies", width: 50, align: "center" }, | ||||
@@ -161,13 +148,9 @@ var bootstrap = function ($, learun) { | |||||
{ label: "月", name: "DisMonth", width: 50, align: "center" }, | { label: "月", name: "DisMonth", width: 50, align: "center" }, | ||||
{ label: "日", name: "DisDay", width: 50, align: "center" }, | { label: "日", name: "DisDay", width: 50, align: "center" }, | ||||
{ label: "事由", name: "Reasons", width: 150, align: "center" }, | { label: "事由", name: "Reasons", width: 150, align: "center" }, | ||||
//{ label: "附件", name: "AttachmentName", width: 100, align: "center" }, | |||||
{ label: "呈送意见", name: "Render", width: 100, align: "center" }, | |||||
{ | |||||
label: "呈送时间", name: "RenderDate", width: 100, align: "center", | |||||
}, | |||||
{ label: "收文", name: "DisOffice", width: 100, align: "center" }, | |||||
{ label: "批示", name: "Instructions", width: 100, align: "center" }, | |||||
{ label: "呈送意见", name: "Render", width: 200, align: "center" }, | |||||
{ label: "呈送时间", name: "RenderDate", width: 100, align: "center" }, | |||||
{ label: "收文单位", name: "DisOffice", width: 200, align: "center" }, | |||||
{ | { | ||||
label: "审批状态", name: "FlowNo", width: 100, align: "center", | label: "审批状态", name: "FlowNo", width: 100, align: "center", | ||||
formatter: function (cellvalue, row) { | formatter: function (cellvalue, row) { | ||||
@@ -188,7 +171,7 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
param.DisTitle = 1; | |||||
param.WorkName = 1; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
@@ -196,7 +179,7 @@ var bootstrap = function ($, learun) { | |||||
if (res.code == 200) { | if (res.code == 200) { | ||||
// 发起流程 | // 发起流程 | ||||
var postData = { | var postData = { | ||||
schemeCode: 'Dispatch',// 填写流程对应模板编号 | |||||
schemeCode: 'DBSW',// 填写流程对应模板编号 | |||||
processId: processId, | processId: processId, | ||||
level: '1', | level: '1', | ||||
}; | }; | ||||
@@ -10,14 +10,14 @@ | |||||
<div class="lr-layout-tool-item"> | <div class="lr-layout-tool-item"> | ||||
<div id="multiple_condition_query"> | <div id="multiple_condition_query"> | ||||
<div class="lr-query-formcontent"> | <div class="lr-query-formcontent"> | ||||
@*<div class="col-xs-12 lr-form-item"> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">标题</div> | <div class="lr-form-item-title">标题</div> | ||||
<input id="DisTitle" type="text" class="form-control" /> | <input id="DisTitle" type="text" class="form-control" /> | ||||
</div>*@ | |||||
<div class="col-xs-12 lr-form-item"> | |||||
</div> | |||||
@*<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">收文</div> | <div class="lr-form-item-title">收文</div> | ||||
<input id="DisOffice" type="text" class="form-control" /> | <input id="DisOffice" type="text" class="form-control" /> | ||||
</div> | |||||
</div>*@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -26,9 +26,9 @@ var bootstrap = function ($, learun) { | |||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form', | id: 'form', | ||||
title: '新增', | title: '新增', | ||||
url: top.$.rootUrl + '/EducationalAdministration/Dispatch/Form?DisTitle=' + 2 + '&DisOffice=' + 2, | |||||
url: top.$.rootUrl + '/EducationalAdministration/Dispatch/Form?WorkName=' + 2 + '&DisOffice=' + 2, | |||||
width: 1000, | width: 1000, | ||||
height: 700, | |||||
height: 500, | |||||
callBack: function (id) { | callBack: function (id) { | ||||
var res = false; | var res = false; | ||||
// 验证数据 | // 验证数据 | ||||
@@ -57,9 +57,9 @@ var bootstrap = function ($, learun) { | |||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form', | id: 'form', | ||||
title: '编辑', | title: '编辑', | ||||
url: top.$.rootUrl + '/EducationalAdministration/Dispatch/Form?keyValue=' + keyValue + '&DisTitle=' + 2 + '&DisOffice=' + 2, | |||||
url: top.$.rootUrl + '/EducationalAdministration/Dispatch/Form?keyValue=' + keyValue + '&WorkName=' + 2 + '&DisOffice=' + 2, | |||||
width: 1000, | width: 1000, | ||||
height: 700, | |||||
height: 500, | |||||
callBack: function (id) { | callBack: function (id) { | ||||
var res = false; | var res = false; | ||||
// 验证数据 | // 验证数据 | ||||
@@ -136,21 +136,8 @@ var bootstrap = function ($, learun) { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | $('#gridtable').lrAuthorizeJfGrid({ | ||||
url: top.$.rootUrl + '/EducationalAdministration/Dispatch/GetPageList', | url: top.$.rootUrl + '/EducationalAdministration/Dispatch/GetPageList', | ||||
headData: [ | headData: [ | ||||
{ label: "工作名称", name: "WorkName", width: 200, align: "center" }, | |||||
//{ label: "标题", name: "DisTitle", width: 200, align: "center" }, | |||||
{ | |||||
label: "标题", name: "DisTitle", width: 250, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'Dispatch', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "来文", name: "DisFrom", width: 100, align: "center" }, | |||||
{ label: "标题", name: "DisTitle", width: 250, align: "center" }, | |||||
{ label: "来文单位", name: "DisFrom", width: 200, align: "center" }, | |||||
{ label: "字", name: "DisWork", width: 80, align: "center" }, | { label: "字", name: "DisWork", width: 80, align: "center" }, | ||||
{ label: "号", name: "DisMark", width: 80, align: "center" }, | { label: "号", name: "DisMark", width: 80, align: "center" }, | ||||
{ label: "份数", name: "Copies", width: 50, align: "center" }, | { label: "份数", name: "Copies", width: 50, align: "center" }, | ||||
@@ -158,13 +145,9 @@ var bootstrap = function ($, learun) { | |||||
{ label: "月", name: "DisMonth", width: 50, align: "center" }, | { label: "月", name: "DisMonth", width: 50, align: "center" }, | ||||
{ label: "日", name: "DisDay", width: 50, align: "center" }, | { label: "日", name: "DisDay", width: 50, align: "center" }, | ||||
{ label: "事由", name: "Reasons", width: 150, align: "center" }, | { label: "事由", name: "Reasons", width: 150, align: "center" }, | ||||
//{ label: "附件", name: "AttachmentName", width: 100, align: "center" }, | |||||
{ label: "呈送意见", name: "Render", width: 100, align: "center" }, | |||||
{ | |||||
label: "呈送时间", name: "RenderDate", width: 100, align: "center", | |||||
}, | |||||
{ label: "收文", name: "DisOffice", width: 100, align: "center" }, | |||||
{ label: "批示", name: "Instructions", width: 100, align: "center" }, | |||||
{ label: "呈送意见", name: "Render", width: 200, align: "center" }, | |||||
{ label: "呈送时间", name: "RenderDate", width: 100, align: "center" }, | |||||
{ label: "收文单位", name: "DisOffice", width: 200, align: "center" }, | |||||
{ | { | ||||
label: "审批状态", name: "FlowNo", width: 100, align: "center", | label: "审批状态", name: "FlowNo", width: 100, align: "center", | ||||
formatter: function (cellvalue, row) { | formatter: function (cellvalue, row) { | ||||
@@ -185,7 +168,7 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
param.DisTitle = 2; | |||||
param.WorkName = 2; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
@@ -193,7 +176,7 @@ var bootstrap = function ($, learun) { | |||||
if (res.code == 200) { | if (res.code == 200) { | ||||
// 发起流程 | // 发起流程 | ||||
var postData = { | var postData = { | ||||
schemeCode: 'Dispatch',// 填写流程对应模板编号 | |||||
schemeCode: 'XBSW',// 填写流程对应模板编号 | |||||
processId: processId, | processId: processId, | ||||
level: '1', | level: '1', | ||||
}; | }; | ||||
@@ -221,7 +221,7 @@ | |||||
<div class="heder"> | <div class="heder"> | ||||
<div class="hederL"></div> | <div class="hederL"></div> | ||||
<div class="hederR"> | <div class="hederR"> | ||||
<p><span> 来 文 </span><em>@Model.DisFrom</em><span>字</span>@Model.DisWork<span>号</span><em>@Model.DisMark</em></p> | |||||
<p><span> 来 文 单 位 </span><em>@Model.DisFrom</em><span>字</span>@Model.DisWork<span>号</span><em>@Model.DisMark</em></p> | |||||
<p><span> 份 数 </span><em>@Model.Copies</em></p> | <p><span> 份 数 </span><em>@Model.Copies</em></p> | ||||
<p><span>年</span><em>@Model.DisYear</em><span>月</span><em>@Model.DisMonth</em><span>日</span><em>@Model.DisDay</em></p> | <p><span>年</span><em>@Model.DisYear</em><span>月</span><em>@Model.DisMonth</em><span>日</span><em>@Model.DisDay</em></p> | ||||
</div> | </div> | ||||
@@ -244,7 +244,6 @@ | |||||
@Model.RenderDate.ToShortDateString().ToString().Replace("/", "-") | @Model.RenderDate.ToShortDateString().ToString().Replace("/", "-") | ||||
</em> | </em> | ||||
</span> | </span> | ||||
@*<span>年</span><span>月</span><em></em><span>日</span><em></em>*@ | |||||
</p> | </p> | ||||
</div> | </div> | ||||
<div class="ps"> | <div class="ps"> | ||||
@@ -258,7 +257,7 @@ | |||||
</ul> | </ul> | ||||
</div> | </div> | ||||
<p><span> 收 文 </span><em>@Model.DisOffice</em><span>字</span><em>@Model.DisWork</em><span>号</span><em>@Model.DisMark</em><span>年</span><em>@Model.DisYear</em><span>月</span><em>@Model.DisMonth</em><span>日</span><em>@Model.DisDay</em></p> | |||||
<p><span> 收 文 单 位 </span><em>@Model.DisOffice</em><span>字</span><em>@Model.DisWork</em><span>号</span><em>@Model.DisMark</em><span>年</span><em>@Model.DisYear</em><span>月</span><em>@Model.DisMonth</em><span>日</span><em>@Model.DisDay</em></p> | |||||
</div> | </div> | ||||
@@ -56,15 +56,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
var dp = new DynamicParameters(new { }); | var dp = new DynamicParameters(new { }); | ||||
if (!queryParam["DisTitle"].IsEmpty()) | |||||
if (!queryParam["WorkName"].IsEmpty()) | |||||
{ | { | ||||
dp.Add("DisTitle", queryParam["DisTitle"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.DisTitle = @DisTitle "); | |||||
dp.Add("WorkName", queryParam["WorkName"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.WorkName = @WorkName "); | |||||
} | } | ||||
if (!queryParam["DisOffice"].IsEmpty()) | |||||
if (!queryParam["DisTitle"].IsEmpty()) | |||||
{ | { | ||||
dp.Add("DisOffice", "%" + queryParam["DisOffice"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.DisOffice Like @DisOffice "); | |||||
dp.Add("DisTitle", "%" + queryParam["DisTitle"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.DisTitle Like @DisTitle "); | |||||
} | } | ||||
return this.BaseRepository("CollegeMIS").FindList<DispatchEntity>(strSql.ToString(), dp, pagination); | return this.BaseRepository("CollegeMIS").FindList<DispatchEntity>(strSql.ToString(), dp, pagination); | ||||
} | } | ||||