提交 caa71656 编写于 作者: Skyeye云's avatar Skyeye云

工作流整改完成

上级 7f491987
...@@ -12,7 +12,7 @@ layui.config({ ...@@ -12,7 +12,7 @@ layui.config({
layedit = layui.layedit, layedit = layui.layedit,
form = layui.form; form = layui.form;
var actKey = parent.actKey; var actFlowId = parent.actFlowId;
// 加载动态表单页 // 加载动态表单页
AjaxPostUtil.request({url: flowableBasePath + "dsformpage004", params: {rowId: parent.dsFormId}, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "dsformpage004", params: {rowId: parent.dsFormId}, type: 'json', callback: function (json) {
...@@ -28,12 +28,12 @@ layui.config({ ...@@ -28,12 +28,12 @@ layui.config({
form.on('submit(formAddBean)', function (data) { form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
activitiUtil.startProcess(parent.dsFormId, null, function (approvalId) { activitiUtil.startProcess(parent.dsFormId, null, function (approvalId) {
if(isNull(actKey)){ if(isNull(actFlowId)){
winui.window.msg('流程对象为空,无法启动.', {icon: 2, time: 2000}); winui.window.msg('流程对象为空,无法启动.', {icon: 2, time: 2000});
return false; return false;
} }
var jStr = { var jStr = {
keyName: actKey, keyName: actFlowId,
jsonStr: JSON.stringify(dsFormUtil.getPageData($("#showForm"))), jsonStr: JSON.stringify(dsFormUtil.getPageData($("#showForm"))),
pageId: parent.dsFormId, pageId: parent.dsFormId,
approvalId: approvalId approvalId: approvalId
......
...@@ -30,7 +30,6 @@ layui.config({ ...@@ -30,7 +30,6 @@ layui.config({
cols: [[ cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'title', title: '流程名称', width: 100 }, { field: 'title', title: '流程名称', width: 100 },
{ field: 'typeTitle', title: '流程类型', width: 100 },
{ field: 'createTime', title: '申请时间', align: 'center', width: 140}, { field: 'createTime', title: '申请时间', align: 'center', width: 140},
{ field: 'state', title: '状态', align: 'center', width: 80, templet: function (d) { { field: 'state', title: '状态', align: 'center', width: 80, templet: function (d) {
if(d.state == 1){ if(d.state == 1){
...@@ -94,7 +93,6 @@ layui.config({ ...@@ -94,7 +93,6 @@ layui.config({
activitiUtil.startProcess(data.pageId, null, function (approvalId) { activitiUtil.startProcess(data.pageId, null, function (approvalId) {
var params = { var params = {
rowId: data.id, rowId: data.id,
pageId: data.pageId,
approvalId: approvalId approvalId: approvalId
}; };
AjaxPostUtil.request({url: flowableBasePath + "pagesequence005", params: params, type: 'json', callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + "pagesequence005", params: params, type: 'json', callback: function (json) {
......
var actKey = ""; var actFlowId = "";
var dsFormId = ""; var dsFormId = "";
/** /**
...@@ -61,7 +61,10 @@ layui.config({ ...@@ -61,7 +61,10 @@ layui.config({
var title = $(this).attr("showTitle"); var title = $(this).attr("showTitle");
var url = $(this).attr("addPageUrl"); var url = $(this).attr("addPageUrl");
dsFormId = $(this).attr("dsFormId"); dsFormId = $(this).attr("dsFormId");
actKey = $(this).attr("serviceClassName"); if (!isNull(dsFormId)) {
// 只有动态表单类型的流程才要工作流模型的id
actFlowId = $(this).attr("actFlowId");
}
_openNewWindows({ _openNewWindows({
url: url, url: url,
title: title, title: title,
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<div class="layui-card-header" style="border-bottom: 1px solid white;">{{title}}</div> <div class="layui-card-header" style="border-bottom: 1px solid white;">{{title}}</div>
<div class="layui-card-body layui-col-md12"> <div class="layui-card-body layui-col-md12">
{{#each child}} {{#each child}}
<div class="task-launch-item launchTask" dsFormId="{{dsFormId}}" serviceClassName="{{serviceClassName}}" addPageUrl="{{addPageUrl}}" showTitle="{{title}}"> <div class="task-launch-item launchTask" dsFormId="{{dsFormId}}" actFlowId="{{actFlowId}}" addPageUrl="{{addPageUrl}}" showTitle="{{title}}">
<div class="task-left-top" style="background-color: {{iconBg}};"></div> <div class="task-left-top" style="background-color: {{iconBg}};"></div>
<div class="task-launch-item-bk task-launch-item-bk_1" style="border-left: 2px solid {{iconBg}};"></div> <div class="task-launch-item-bk task-launch-item-bk_1" style="border-left: 2px solid {{iconBg}};"></div>
<div class="task-launch-item-bk task-launch-item-bk_2" style="border-top: 2px solid {{iconBg}};"></div> <div class="task-launch-item-bk task-launch-item-bk_2" style="border-top: 2px solid {{iconBg}};"></div>
......
var rowId = ""; var rowId = "";
var actKey = ""; var actFlowId = "";
var dsFormId = ""; var dsFormId = "";
layui.config({ layui.config({
...@@ -131,7 +131,10 @@ layui.config({ ...@@ -131,7 +131,10 @@ layui.config({
var title = $(this).attr("showTitle"); var title = $(this).attr("showTitle");
var url = $(this).attr("addPageUrl"); var url = $(this).attr("addPageUrl");
dsFormId = $(this).attr("dsFormId"); dsFormId = $(this).attr("dsFormId");
actKey = $(this).attr("serviceClassName"); if (!isNull(dsFormId)) {
// 只有动态表单类型的流程才要工作流模型的id
actFlowId = $(this).attr("actFlowId");
}
_openNewWindows({ _openNewWindows({
url: url, url: url,
title: title, title: title,
......
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
<script type="text/x-handlebars-template" id="actModelTemplate"> <script type="text/x-handlebars-template" id="actModelTemplate">
{{#each rows}} {{#each rows}}
<li class="layui-col-sm2 act-model-li" dsFormId="{{dsFormId}}" serviceClassName="{{serviceClassName}}" addPageUrl="{{addPageUrl}}" showTitle="{{title}}" title="{{title}}"> <li class="layui-col-sm2 act-model-li" dsFormId="{{dsFormId}}" actFlowId="{{actFlowId}}" addPageUrl="{{addPageUrl}}" showTitle="{{title}}" title="{{title}}">
<div class="icon"> <div class="icon">
{{#compare1 iconType iconPic icon iconColor}}{{/compare1}} {{#compare1 iconType iconPic icon iconColor}}{{/compare1}}
</div> </div>
......
...@@ -97,11 +97,11 @@ var erpOrderUtil = { ...@@ -97,11 +97,11 @@ var erpOrderUtil = {
* 删除订单信息 * 删除订单信息
* *
* @param id 订单id * @param id 订单id
* @param orderType 单据类型 * @param serviceClassName 单据类型
*/ */
deleteOrderMation: function (id, orderType, callback) { deleteOrderMation: function (id, serviceClassName, callback) {
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index) { layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index) {
AjaxPostUtil.request({url: flowableBasePath + "erpcommon005", params: {rowId: id, orderType: orderType}, method: "DELETE", type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "erpcommon005", params: {rowId: id, serviceClassName: serviceClassName}, method: "DELETE", type: 'json', callback: function(json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
if (typeof (callback) == "function") { if (typeof (callback) == "function") {
callback(); callback();
...@@ -114,26 +114,27 @@ var erpOrderUtil = { ...@@ -114,26 +114,27 @@ var erpOrderUtil = {
* 提交订单信息 * 提交订单信息
* *
* @param id 订单id * @param id 订单id
* @param orderType 单据类型 * @param serviceClassName 单据类型
* @param submitType 单据提交类型 1.走工作流提交 2.直接提交 * @param submitType 单据提交类型 1.走工作流提交 2.直接提交
* @param actKey 该地址为activitiNameKey.json的key * @param actKey 该地址为activitiNameKey.json的key
*/ */
submitOrderMation: function (id, orderType, submitType, actKey, callback) { submitOrderMation: function (id, serviceClassName, submitType, actKey, callback) {
layer.confirm('确认要提交吗?', { icon: 3, title: '提交操作' }, function (index) { layer.confirm('确认要提交吗?', { icon: 3, title: '提交操作' }, function (index) {
layer.close(index);
if (submitType == 1) { if (submitType == 1) {
activitiUtil.startProcess(actKey, null, function (approvalId) { activitiUtil.startProcess(actKey, null, function (approvalId) {
erpOrderUtil.submitOrderMationToData(id, orderType, approvalId, callback); erpOrderUtil.submitOrderMationToData(id, serviceClassName, approvalId, callback);
}); });
} else { } else {
erpOrderUtil.submitOrderMationToData(id, orderType, "", callback); erpOrderUtil.submitOrderMationToData(id, serviceClassName, "", callback);
} }
}); });
}, },
submitOrderMationToData: function (id, orderType, approvalId, callback) { submitOrderMationToData: function (id, serviceClassName, approvalId, callback) {
var params = { var params = {
rowId: id, rowId: id,
orderType: orderType, serviceClassName: serviceClassName,
approvalId: approvalId approvalId: approvalId
}; };
AjaxPostUtil.request({url: flowableBasePath + "erpcommon006", params: params, method: "PUT", type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "erpcommon006", params: params, method: "PUT", type: 'json', callback: function(json) {
...@@ -148,13 +149,13 @@ var erpOrderUtil = { ...@@ -148,13 +149,13 @@ var erpOrderUtil = {
* 撤销订单信息 * 撤销订单信息
* *
* @param processInstanceId 流程实例id * @param processInstanceId 流程实例id
* @param orderType 单据类型 * @param serviceClassName 单据类型
*/ */
revokeOrderMation: function (processInstanceId, orderType, callback) { revokeOrderMation: function (processInstanceId, serviceClassName, callback) {
layer.confirm('确认要撤销吗?', { icon: 3, title: '撤销操作' }, function (index) { layer.confirm('确认要撤销吗?', { icon: 3, title: '撤销操作' }, function (index) {
var params = { var params = {
processInstanceId: processInstanceId, processInstanceId: processInstanceId,
orderType: orderType serviceClassName: serviceClassName
}; };
AjaxPostUtil.request({url: flowableBasePath + "erpcommon003", params: params, type: 'json', method: "PUT", callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "erpcommon003", params: params, type: 'json', method: "PUT", callback: function(json) {
winui.window.msg("撤销成功。", {icon: 1, time: 2000}); winui.window.msg("撤销成功。", {icon: 1, time: 2000});
......
{ {
"vehicleManageUse": {"name": "用车申请", "key": "../../tpl/vehicleManageUse/vehicleManageUseAdd.html"}, "vehicleManageUse": {"name": "用车申请", "key": "com.skyeye.eve.service.impl.VehicleApplyUseServiceImpl"},
"sealManageRevert": {"name": "印章归还", "key": "../../tpl/sealManageRevert/sealManageRevertAdd.html"}, "sealManageRevert": {"name": "印章归还", "key": "com.skyeye.eve.service.impl.SealApplyRevertServiceImpl"},
"sealManageBorrow": {"name": "印章借用", "key": "../../tpl/sealManageBorrow/sealManageBorrowAdd.html"}, "sealManageBorrow": {"name": "印章借用", "key": "com.skyeye.eve.service.impl.SealApplyBorrowServiceImpl"},
"putIsSalesReturns": {"name": "销售退货单申请", "key": "../../tpl/salesreturns/salesreturnsadd.html"}, "putIsSalesReturns": {"name": "销售退货单申请", "key": "com.skyeye.service.impl.SalesReturnsServiceImpl"},
"outIsSalesOutlet": {"name": "销售出库单申请", "key": "../../tpl/salesoutlet/salesoutletadd.html"}, "outIsSalesOutlet": {"name": "销售出库单申请", "key": "com.skyeye.service.impl.SalesOutLetServiceImpl"},
"outchaseOrder": {"name": "销售订单申请", "key": "../../tpl/salesorder/salesorderadd.html"}, "outchaseOrder": {"name": "销售订单申请", "key": "com.skyeye.service.impl.SalesOrderServiceImpl"},
"putIsRetailReturns": {"name": "零售退货单申请", "key": "../../tpl/retailreturns/retailreturnsadd.html"}, "putIsRetailReturns": {"name": "零售退货单申请", "key": "com.skyeye.service.impl.RetailReturnsServiceImpl"},
"outIsRetail": {"name": "零售出库单申请", "key": "../../tpl/retailoutlet/retailoutletadd.html"}, "outIsRetail": {"name": "零售出库单申请", "key": "com.skyeye.service.impl.RetailOutLetServiceImpl"},
"outIsPurchaseReturns": {"name": "采购退货单申请", "key": "../../tpl/purchasereturns/purchasereturnsadd.html"}, "outIsPurchaseReturns": {"name": "采购退货单申请", "key": "com.skyeye.service.impl.PurchaseReturnsServiceImpl"},
"putIsPurchase": {"name": "采购入库单申请", "key": "../../tpl/purchaseput/purchaseputadd.html"}, "putIsPurchase": {"name": "采购入库单申请", "key": "com.skyeye.service.impl.PurchasePutServiceImpl"},
"purchaseOrder": {"name": "采购订单申请", "key": "../../tpl/purchaseorder/purchaseorderadd.html"}, "purchaseOrder": {"name": "采购订单申请", "key": "com.skyeye.service.impl.PurchaseOrderServiceImpl"},
"proworkLoad": {"name": "项目工作量审核", "key": "../../tpl/proworkload/proworkloadadd.html"}, "proworkLoad": {"name": "项目工作量审核", "key": "com.skyeye.service.impl.ProWorkloadServiceImpl"},
"proTask": {"name": "项目任务审核", "key": "../../tpl/protask/protaskadd.html"}, "proTask": {"name": "项目任务审核", "key": "com.skyeye.service.impl.ProTaskServiceImpl"},
"proProject": {"name": "项目立项审批", "key": "../../tpl/proproject/proprojectadd.html"}, "proProject": {"name": "项目立项审批", "key": "com.skyeye.service.impl.ProProjectServiceImpl"},
"proFile": {"name": "项目文档审核", "key": "../../tpl/profile/profileadd.html"}, "proFile": {"name": "项目文档审核", "key": "com.skyeye.service.impl.ProFileServiceImpl"},
"proCostExpense": {"name": "项目费用报销审核", "key": "../../tpl/procostexpense/procostexpenseadd.html"}, "proCostExpense": {"name": "项目费用报销审核", "key": "com.skyeye.service.impl.ProCostExpenseServiceImpl"},
"putIsOthers": {"name": "其他入库单申请", "key": "../../tpl/otherwarehous/otherwarehousadd.html"}, "putIsOthers": {"name": "其他入库单申请", "key": "com.skyeye.service.impl.OtherWareHousServiceImpl"},
"outIsOthers": {"name": "其他出库单申请", "key": "../../tpl/otheroutlets/otheroutletsadd.html"}, "outIsOthers": {"name": "其他出库单申请", "key": "com.skyeye.service.impl.OtherOutLetsServiceImpl"},
"licenceManageRevert": {"name": "证照归还", "key": "../../tpl/licenceManageRevert/licenceManageRevertAdd.html"}, "licenceManageRevert": {"name": "证照归还", "key": "com.skyeye.eve.service.impl.LicenceApplyRevertServiceImpl"},
"licenceManageBorrow": {"name": "证照借用", "key": "../../tpl/licenceManageBorrow/licenceManageBorrowAdd.html"}, "licenceManageBorrow": {"name": "证照借用", "key": "com.skyeye.eve.service.impl.LicenceApplyBorrowServiceImpl"},
"crmOpportUnity": {"name": "商机审核一阶段", "key": "../../tpl/crmopportunity/crmopportunityadd.html"}, "crmOpportUnity": {"name": "商机审核一阶段", "key": "com.skyeye.service.impl.CrmOpportunityServiceImpl"},
"myCrmContract": {"name": "合同审批", "key": "../../tpl/crmcontractmanage/mycrmcontractadd.html"}, "myCrmContract": {"name": "合同审批", "key": "com.skyeye.service.impl.CrmContractServiceImpl"},
"conFerenceRoomReserve": {"name": "会议室预定", "key": "../../tpl/conFerenceRoomReserve/conFerenceRoomReserveAdd.html"}, "conFerenceRoomReserve": {"name": "会议室预定", "key": "com.skyeye.eve.service.impl.ConferenceRoomReserveServiceImpl"},
"checkWorkOvertime": {"name": "加班申请", "key": "../../tpl/checkWorkOvertime/checkWorkOvertimeAdd.html"}, "checkWorkOvertime": {"name": "加班申请", "key": "com.skyeye.eve.service.impl.CheckWorkOvertimeServiceImpl"},
"checkWorkLeave": {"name": "请假申请", "key": "../../tpl/checkWorkLeave/checkWorkLeaveAdd.html"}, "checkWorkLeave": {"name": "请假申请", "key": "com.skyeye.eve.service.impl.CheckWorkLeaveServiceImpl"},
"checkWorkCancelLeave": {"name": "销假申请", "key": "../../tpl/checkWorkCancelLeave/checkWorkCancelLeaveAdd.html"}, "checkWorkCancelLeave": {"name": "销假申请", "key": "com.skyeye.eve.service.impl.CheckWorkCancelLeaveServiceImpl"},
"checkWorkBusinessTrip": {"name": "出差申请", "key": "../../tpl/checkWorkBusinessTrip/checkWorkBusinessTripAdd.html"}, "checkWorkBusinessTrip": {"name": "出差申请", "key": "com.skyeye.eve.service.impl.CheckWorkBusinessTripServiceImpl"},
"assetManageUse": {"name": "资产领用", "key": "../../tpl/assetManageUse/assetManageUseAdd.html"}, "assetManageUse": {"name": "资产领用", "key": "com.skyeye.eve.service.impl.AssetApplyUseServiceImpl"},
"assetManageReturn": {"name": "资产归还", "key": "../../tpl/assetManageReturn/assetManageReturnAdd.html"}, "assetManageReturn": {"name": "资产归还", "key": "com.skyeye.eve.service.impl.AssetApplyReturnServiceImpl"},
"assetManagePurchase": {"name": "资产采购", "key": "../../tpl/assetManagePurchase/assetManagePurchaseAdd.html"}, "assetManagePurchase": {"name": "资产采购", "key": "com.skyeye.eve.service.impl.AssetApplyPurchaseServiceImpl"},
"assetArticlesUse": {"name": "用品领用", "key": "../../tpl/assetArticlesUse/assetArticlesUseAdd.html"}, "assetArticlesUse": {"name": "用品领用", "key": "com.skyeye.eve.service.impl.AssetArticlesApplyUseServiceImpl"},
"assetArticlesPurchase": {"name": "用品采购", "key": "../../tpl/assetArticlesPurchase/assetArticlesPurchaseAdd.html"}, "assetArticlesPurchase": {"name": "用品采购", "key": "com.skyeye.eve.service.impl.AssetArticlesApplyPurchaseServiceImpl"},
"incomeOrder": {"name": "财务明细账", "key": "../../tpl/income/incomeAdd.html"}, "incomeOrder": {"name": "财务明细账", "key": "com.skyeye.service.impl.IncomeServiceImpl"},
"bossPersonRequire": {"name": "人员需求申请", "key": "../../tpl/bossPersonRequire/bossPersonRequireAdd.html"}, "bossPersonRequire": {"name": "人员需求申请", "key": "com.skyeye.service.impl.BossPersonRequireServiceImpl"},
"bossInterviewRegularWorker": {"name": "转正申请", "key": "../../tpl/bossInterviewRegularWorker/bossInterviewRegularWorkerAdd.html"}, "bossInterviewRegularWorker": {"name": "转正申请", "key": "com.skyeye.service.impl.BossInterviewRegularWorkerServiceImpl"},
"bossInterviewQuit": {"name": "离职申请", "key": "../../tpl/bossInterviewQuit/bossInterviewQuitAdd.html"}, "bossInterviewQuit": {"name": "离职申请", "key": "com.skyeye.service.impl.BossInterviewQuitServiceImpl"},
"bossInterviewJobTransfer": {"name": "岗位调动申请", "key": "../../tpl/bossInterviewJobTransfer/bossInterviewJobTransferAdd.html"} "bossInterviewJobTransfer": {"name": "岗位调动申请", "key": "com.skyeye.service.impl.BossInterviewJobTransferServiceImpl"}
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册