Przeglądaj źródła

公文通知 只能删除草稿 和 提交报错修改

金隅分支
zhichao lei 3 lat temu
rodzic
commit
c1f112d92c
3 zmienionych plików z 77 dodań i 18 usunięć
  1. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormFlow.cshtml
  2. +58
    -7
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormFlow.js
  3. +17
    -9
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/IndexFlow.js

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormFlow.cshtml Wyświetl plik

@@ -18,8 +18,8 @@
<input id="F_ReleaseTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy/MM/dd HH:mm' })" isvalid="yes" checkexpession="NotNull" value="@Learun.Util.Time.GetToday("yyyy/MM/dd HH:mm")" />
</div>
<div class="col-xs-6 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">信息来源</div>
<input id="F_SourceName" type="text" class="form-control" />
<div class="lr-form-item-title">信息来源<font face="宋体">*</font></div>
<input id="F_SourceName" type="text" isvalid="yes" checkexpession="NotNull" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">来源地址</div>


+ 58
- 7
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormFlow.js Wyświetl plik

@@ -84,17 +84,68 @@ var bootstrap = function ($, learun) {
};
// 保存数据
save = function (processId, callBack, i) {
var formData = $('body').lrGetFormData();
if (!!processId) {
formData.RProcessId = processId;
if (!$('#form').lrValidform()) {
return false;
}
$.lrSaveForm(top.$.rootUrl + '/LR_OAModule/Notice/SaveForm?keyValue=' + keyValue, formData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack(res, formData, i);
var formData = $('body').lrGetFormData();
if (!!processId) {
formData.RProcessId = processId;
}

learun.clientdata.getAsync('dataItem', {

key: $("#F_CategoryId").lrselectGet(),
code: 'NoticeCategory',
callback: function (_data) {
$("#F_Category").val(_data.text);

var postData = $('#form').lrGetFormData(keyValue);
postData["F_NewsContent"] = ue.getContent(null, null, true);
$.lrSaveForm(top.$.rootUrl + '/LR_OAModule/Notice/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack(res, formData, i);
}
});
}
});





//$.lrSaveForm(top.$.rootUrl + '/LR_OAModule/Notice/SaveForm?keyValue=' + keyValue, formData, function (res) {
// // 保存成功后才回调
// if (!!callBack) {
// callBack(res, formData, i);
// }
//});
};

acceptClick = function (callBack) {
if (!$('#form').lrValidform()) {
return false;
}
learun.clientdata.getAsync('dataItem', {
key: $("#F_CategoryId").lrselectGet(),
code: 'NoticeCategory',
callback: function (_data) {
$("#F_Category").val(_data.text);

var postData = $('#form').lrGetFormData(keyValue);
postData["F_NewsContent"] = ue.getContent(null, null, true);
$.lrSaveForm(top.$.rootUrl + '/LR_OAModule/Notice/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
}
});


}
page.init();
}



+ 17
- 9
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/IndexFlow.js Wyświetl plik

@@ -94,14 +94,22 @@ var bootstrap = function ($, learun) {
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('F_NewsId');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/LR_OAModule/Notice/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
var status = $('#gridtable').jfGridValue('F_Status');
console.log(status);
if (status.indexOf("1")>0 || status.indexOf("2")>0) {
learun.alert.warning("只能删除草稿!");
return;
} else {

if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/LR_OAModule/Notice/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
}
});
//  提交
@@ -109,7 +117,7 @@ var bootstrap = function ($, learun) {
var keyValue = $('#gridtable').jfGridValue('F_NewsId');
if (learun.checkrow(keyValue)) {
var SendFlag = $('#gridtable').jfGridValue('F_Status');
if (SendFlag == "1" || SendFlag=="2") {
if (SendFlag == "1" || SendFlag == "2") {
learun.alert.warning("当前项目已提交,请耐心等待审批!");
return;
}


Ładowanie…
Anuluj
Zapisz