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

工作流整改完成

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