@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Student/Index.js")
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Travel/NextUserSelect.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student/Index.js
index 1eae0c1fb..77d478e4b 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student/Index.js
@@ -142,9 +142,17 @@ var bootstrap = function ($, learun) {
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
processId = learun.newGuid();
- learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Student/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) {
- //selectedRow.ProcessId = processId;
- refreshGirdData(res, {});
+ CreateFlow(processId, '2-5', function () {
+ learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Student/ModifyStatus',
+ {
+ keyValue: keyValue,
+ status: 1,
+ processId: processId
+ },
+ function (ressub) {
+ refreshGirdData(ressub, {});
+ learun.loading(false);
+ });
});
}
});
@@ -245,19 +253,6 @@ var bootstrap = function ($, learun) {
}
};
refreshGirdData = function (res, postData) {
- if (res && res.code && res.code == 200) {
- // 发起流程
-
- var postData = {
- schemeCode: '2-5',// 填写流程对应模板编号
- processId: processId,
- level: '1',
- };
- learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
- learun.loading(false);
- });
-
- }
page.search();
};
page.init();
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Index.cshtml
index e43a6acdd..eebfab747 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Index.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Index.cshtml
@@ -2,7 +2,7 @@
ViewBag.Title = "教务报账申请";
Layout = "~/Views/Shared/_Index.cshtml";
}
-
+
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Index.js")
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Travel/NextUserSelect.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Index.js
index bb85c7a69..0054c2cbe 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Index.js
@@ -124,9 +124,17 @@ var bootstrap = function ($, learun) {
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
processId = learun.newGuid();
- learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Student_Apply/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) {
- //selectedRow.ProcessId = processId;
- refreshGirdData(res, {});
+ CreateFlow(processId, '1-8', function () {
+ learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Student_Apply/ModifyStatus',
+ {
+ keyValue: keyValue,
+ status: 1,
+ processId: processId
+ },
+ function (ressub) {
+ refreshGirdData(ressub, {});
+ learun.loading(false);
+ });
});
}
});
@@ -224,21 +232,6 @@ var bootstrap = function ($, learun) {
}
};
refreshGirdData = function (res, postData) {
- //$('#gridtable').jfGridSet('reload');
-
- if (res && res.code && res.code == 200) {
- // 发起流程
-
- var postData = {
- schemeCode: '1-8',// 填写流程对应模板编号
- processId: processId,
- level: '1',
- };
- learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
- learun.loading(false);
- });
-
- }
page.search();
};
page.init();
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel/Index.cshtml
index 3a8146ff2..997c55513 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel/Index.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel/Index.cshtml
@@ -47,3 +47,4 @@
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Travel/Index.js")
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Travel/NextUserSelect.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel/Index.js
index 635d8eda4..6534b7981 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel/Index.js
@@ -6,11 +6,13 @@
*/
var refreshGirdData;
var selectedRow;
+
var bootstrap = function ($, learun) {
"use strict";
var logbegin = '';
var logend = '';
var processId = '';
+
var page = {
init: function () {
page.initGird();
@@ -103,10 +105,10 @@ var bootstrap = function ($, learun) {
//res = top[id].validForm();
// 保存数据
//if (res) {
- //res = top[id].save('', function () {
- // page.search();
- //});
- return top[id].acceptClick(refreshGirdData);
+ //res = top[id].save('', function () {
+ // page.search();
+ //});
+ return top[id].acceptClick(refreshGirdData);
//}
}
});
@@ -123,7 +125,7 @@ var bootstrap = function ($, learun) {
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
- learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Travel/DeleteForm', { keyValue: keyValue}, function () {
+ learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Travel/DeleteForm', { keyValue: keyValue }, function () {
//refreshGirdData();
page.search();
});
@@ -140,15 +142,20 @@ var bootstrap = function ($, learun) {
learun.alert.warning("当前记录已提交!");
return false;
}
- learun.layerConfirm('是否确认提交该项!', function (res) {
- if (res) {
- processId = learun.newGuid();
- learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Travel/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) {
- //selectedRow.ProcessId = processId;
- refreshGirdData(res, {});
+ processId = learun.newGuid();
+ CreateFlow(processId, '0.1', function () {
+ learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Travel/ModifyStatus',
+ {
+ keyValue: keyValue,
+ status: 1,
+ processId: processId
+ },
+ function (ressub) {
+ refreshGirdData(ressub, {});
+ learun.loading(false);
});
- }
});
+
}
});
// 查看
@@ -182,11 +189,11 @@ var bootstrap = function ($, learun) {
return row.CreatorName;
}
},
- { label: "随行人员", name: "Follows", width: 100, align: "left"},
+ { label: "随行人员", name: "Follows", width: 100, align: "left" },
{ label: "出差原因", name: "Reason", width: 100, align: "left" },
{ label: "开始时间", name: "Starttime", width: 100, align: "left" },
{ label: "结束时间", name: "Endtime", width: 100, align: "left" },
-
+
{ label: "提交时间", name: "SubmitTime", width: 130, align: "left" },
{
label: "状态", name: "Status", width: 100, align: "left",
@@ -220,7 +227,6 @@ var bootstrap = function ($, learun) {
{
label: "报账状态", name: "ApplyStatus", width: 100, align: "left",
formatter: function (cellvalue, row) {
- console.log(cellvalue)
if (cellvalue == 0) {
return '
待报账';
} else if (cellvalue == 1) {
@@ -231,7 +237,7 @@ var bootstrap = function ($, learun) {
}
},
],
- mainId:'Id',
+ mainId: 'Id',
isPage: true
});
page.search();
@@ -240,21 +246,10 @@ var bootstrap = function ($, learun) {
param = param || {};
param.StartTime = logbegin;
param.EndTime = logend;
- $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
+ $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function (res, postData) {
- if (res && res.code && res.code == 200) {
- // 发起流程
- var postData = {
- schemeCode: '0.1',// 填写流程对应模板编号
- processId: processId,
- level: '1',
- };
- learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
- learun.loading(false);
- });
- }
page.search();
};
page.init();
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel/NextUserSelect.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel/NextUserSelect.js
new file mode 100644
index 000000000..64b3bddf8
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel/NextUserSelect.js
@@ -0,0 +1,83 @@
+var nwflow = {
+ schemeObj: null,
+ nodeMap: {},
+ currentNode: null,
+ history: [],
+ currentIds: [],
+ taskInfo: [],
+ isFinished: 0
+}
+
+function CreateFlow(processId, schemeCode, callback) {
+ top.learun.httpAsync('GET', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetSchemeByCode', { code: schemeCode }, function (data) {
+ if (data) {
+ nwflow.schemeObj = JSON.parse(data.F_Content);
+ // 获取开始节点
+ $.each(nwflow.schemeObj.nodes, function (_index, _item) {
+ if (_item.type == 'startround') {
+ nwflow.currentNode = _item;
+ return false;
+ }
+ });
+ var param = {
+ code: schemeCode,
+ processId: '',
+ taskId: '',
+ nodeId: nwflow.currentNode.id,
+ operationCode: 'agree'
+ };
+ top.learun.httpAsync('GET', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetNextAuditors', param, function (datauser) {
+ var chooseuser = false;
+ $.each(datauser, function (_id, _list) {
+ if (_list.length > 1) {
+ chooseuser = true;
+ return false;
+ }
+ });
+ nwflow.nextUsers = datauser;
+ if (chooseuser) {
+ top.learun.layerForm({
+ id: 'SelectUserForm',
+ title: '选择下一节点审核人员',
+ url: top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/SelectUserForm',
+ width: 400,
+ height: 340,
+ callBack: function (id) {
+ return top[id].acceptClick(function (auditers) {
+ // 创建流程
+ top.learun.loading(true, '创建流程...');
+ var postData = {
+ schemeCode: schemeCode,
+ processId: processId,
+ level: '1',
+ auditors: JSON.stringify(auditers)
+ };
+ top.learun.httpAsync('Post',
+ top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow',
+ postData,
+ function (data) {
+ callback && callback();
+ });
+ });
+ }
+ });
+ } else {
+ // 创建流程
+ top.learun.loading(true, '创建流程...');
+ var postData = {
+ schemeCode: schemeCode,
+ processId: processId,
+ level: '1'
+ };
+ top.learun.httpAsync('Post',
+ top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow',
+ postData,
+ function (data) {
+ callback && callback();
+ });
+ }
+ });
+ }
+ });
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel_Apply/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel_Apply/Index.cshtml
index 320ec3064..07abf87f8 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel_Apply/Index.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel_Apply/Index.cshtml
@@ -2,7 +2,7 @@
ViewBag.Title = "教务报账申请";
Layout = "~/Views/Shared/_Index.cshtml";
}
-
+
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Travel_Apply/Index.js")
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Travel/NextUserSelect.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel_Apply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel_Apply/Index.js
index 8e85d399f..b93e34a15 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel_Apply/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel_Apply/Index.js
@@ -124,9 +124,17 @@ var bootstrap = function ($, learun) {
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
processId = learun.newGuid();
- learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Travel_Apply/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) {
- //selectedRow.ProcessId = processId;
- refreshGirdData(res, {});
+ CreateFlow(processId, '1-5', function () {
+ learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Travel_Apply/ModifyStatus',
+ {
+ keyValue: keyValue,
+ status: 1,
+ processId: processId
+ },
+ function (ressub) {
+ refreshGirdData(ressub, {});
+ learun.loading(false);
+ });
});
}
});
@@ -224,21 +232,6 @@ var bootstrap = function ($, learun) {
}
};
refreshGirdData = function (res, postData) {
- //$('#gridtable').jfGridSet('reload');
-
- if (res && res.code && res.code == 200) {
- // 发起流程
-
- var postData = {
- schemeCode: '1-5',// 填写流程对应模板编号
- processId: processId,
- level: '1',
- };
- learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
- learun.loading(false);
- });
-
- }
page.search();
};
page.init();
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work/Index.cshtml
index 399831d52..cb5d7014d 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work/Index.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work/Index.cshtml
@@ -47,3 +47,4 @@
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Work/Index.js")
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Travel/NextUserSelect.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work/Index.js
index 092b7f917..ee93f7542 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work/Index.js
@@ -142,9 +142,17 @@ var bootstrap = function ($, learun) {
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
processId = learun.newGuid();
- learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Work/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) {
- //selectedRow.ProcessId = processId;
- refreshGirdData(res, {});
+ CreateFlow(processId, '2-1', function () {
+ learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Work/ModifyStatus',
+ {
+ keyValue: keyValue,
+ status: 1,
+ processId: processId
+ },
+ function (ressub) {
+ refreshGirdData(ressub, {});
+ learun.loading(false);
+ });
});
}
});
@@ -245,19 +253,6 @@ var bootstrap = function ($, learun) {
}
};
refreshGirdData = function (res, postData) {
- if (res && res.code && res.code == 200) {
- // 发起流程
-
- var postData = {
- schemeCode: '2-1',// 填写流程对应模板编号
- processId: processId,
- level: '1',
- };
- learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
- learun.loading(false);
- });
-
- }
page.search();
};
page.init();
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Index.cshtml
index 44a8a6bf7..47b9ecb9f 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Index.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Index.cshtml
@@ -2,7 +2,7 @@
ViewBag.Title = "教务报账申请";
Layout = "~/Views/Shared/_Index.cshtml";
}
-
+
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Index.js")
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Travel/NextUserSelect.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Index.js
index 6c06f84a8..8fecd8cae 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Index.js
@@ -124,9 +124,17 @@ var bootstrap = function ($, learun) {
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
processId = learun.newGuid();
- learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Work_Apply/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) {
- //selectedRow.ProcessId = processId;
- refreshGirdData(res, {});
+ CreateFlow(processId, '1-7', function () {
+ learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Work_Apply/ModifyStatus',
+ {
+ keyValue: keyValue,
+ status: 1,
+ processId: processId
+ },
+ function (ressub) {
+ refreshGirdData(ressub, {});
+ learun.loading(false);
+ });
});
}
});
@@ -224,21 +232,6 @@ var bootstrap = function ($, learun) {
}
};
refreshGirdData = function (res, postData) {
- //$('#gridtable').jfGridSet('reload');
-
- if (res && res.code && res.code == 200) {
- // 发起流程
-
- var postData = {
- schemeCode: '1-7',// 填写流程对应模板编号
- processId: processId,
- level: '1',
- };
- learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
- learun.loading(false);
- });
-
- }
page.search();
};
page.init();
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
index 668b4ca10..5c74cfa5e 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
@@ -1452,6 +1452,7 @@
+