You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
214 lines
6.0 KiB
214 lines
6.0 KiB
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<title>流程模块--修改</title>
|
|
<%@include file="/wdk/theme/je/module/public/common.jsp"%>
|
|
<script type="text/javascript">
|
|
var actionflag = $.getURLParam('actionflag');
|
|
var id = $.getURLParam('id');
|
|
//渲染应用包选择下拉框
|
|
function renderPackCombo(initValue){
|
|
var param = {
|
|
id : 'pack_uuid',
|
|
url : 'wdk?action=wdk.pub&method=call_service&ajaxparam=' + new Date().getTime(),
|
|
idField:'pack_uuid',
|
|
required:true,
|
|
textField:'pack_name',
|
|
queryParams : {
|
|
_SRVNAME : 'service.portal.package',
|
|
_SRVMETHOD : 'queryAllPackageList',
|
|
_DATA : $.json2str({
|
|
resultfields : 'pack_uuid,pack_name',
|
|
orderfields : 'display_order'
|
|
}),
|
|
_RSFIELD : 'package_info'
|
|
}
|
|
};
|
|
if(initValue){
|
|
param.initvalue = initValue;
|
|
}
|
|
$.combobox(param);
|
|
}
|
|
//初始化
|
|
$(function() {
|
|
if(id && '2' == actionflag){
|
|
$('#id').val(id);
|
|
$.wait_open();
|
|
var dataParam = {
|
|
_SRVNAME : 'service.wf.frame',
|
|
_SRVMETHOD : 'getWorkflowDefine',
|
|
_DATA : $.json2str({
|
|
id:id
|
|
})
|
|
}
|
|
$.cuajax({
|
|
url : 'wdk?action=wdk.pub&method=call_service&ajaxparam=' + new Date().getTime(),
|
|
method : "post",
|
|
timeout : WDK_Timeout,
|
|
data : dataParam,
|
|
success : function(result) {
|
|
$.wait_close();
|
|
//返回值字符串转json
|
|
var jres = $.str2json(result);
|
|
if(jres && jres.code == '1'){
|
|
var data = jres.result;
|
|
$('#enname').val(data.enname);
|
|
$('#cnname').val(data.cnname);
|
|
$('#display_order').val(data.display_order);
|
|
$("input[name='scope']:radio").each(function(){
|
|
if($(this).val() == data.scope){
|
|
$(this).iCheck('check');
|
|
}
|
|
});
|
|
renderPackCombo(data.pack_uuid);
|
|
}
|
|
},
|
|
error : function(result) {
|
|
$.wait_close();
|
|
alert('网络错误!result=' + result);
|
|
}
|
|
});
|
|
}else{
|
|
$('#scope_0').iCheck('check');
|
|
renderPackCombo();
|
|
}
|
|
});
|
|
function opt_close(){
|
|
//$.closeActiveTab();
|
|
var wid = $.getURLParam("wid");
|
|
$.closeWin(wid);
|
|
}
|
|
|
|
//保存数据
|
|
function opt_save() {
|
|
//验证
|
|
var isok = $("#edit_form").form('validate');
|
|
if(!isok){
|
|
alert('尚有必填项未填或输入有误,请检查后提交');
|
|
return false;
|
|
}
|
|
//打开旋转
|
|
$.wait_open();
|
|
|
|
//获取所有input和textarea 的输入值
|
|
var data = $.getFieldValue({formid : 'edit_form'});
|
|
if('1' == actionflag){
|
|
data.syscreatoruuid = $.getSessionUser().account_id;
|
|
data.sysisdelete = '0';
|
|
//data.display_order = '100';
|
|
data.app_uuid = $.getSessionUser().appuuid;
|
|
data.manage_unit_uuid = $.getSessionUser().manageunituuid;
|
|
|
|
}else{
|
|
data.sysupdateuseruuid = $.getSessionUser().account_id;
|
|
}
|
|
$("input[name='scope']:radio").each(function(){
|
|
if(true == $(this).is(':checked')){
|
|
data.scope = $(this).val();
|
|
}
|
|
});
|
|
var dataParam = {
|
|
_SRVNAME : 'service.wf.frame',
|
|
_SRVMETHOD : 'saveWorkflowDefine',
|
|
_DATA : $.json2str({
|
|
jo : data,
|
|
actionFlag:actionflag
|
|
})
|
|
}
|
|
//表单提交的方法、比如ajax提交
|
|
//调用保存组织数据
|
|
$.cuajax({
|
|
url : 'wdk?action=wdk.pub&method=call_service&ajaxparam=' + new Date().getTime(),
|
|
method : "post",
|
|
timeout : WDK_Timeout,
|
|
data : dataParam,
|
|
success : function(result) {
|
|
$.wait_close();
|
|
//返回值字符串转json
|
|
var jres = $.str2json(result);
|
|
if (jres.code == "1") { //操作成功
|
|
alert(jres.desc);
|
|
opt_close();
|
|
} else {
|
|
alert(jres.desc);
|
|
}
|
|
},
|
|
error : function(result) {
|
|
$.wait_close();
|
|
alert('网络错误!result=' + result);
|
|
}
|
|
});
|
|
}
|
|
|
|
</script>
|
|
<style type="text/css">
|
|
.edit-container,.edit-page-toolbar{
|
|
width:auto;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body class="easyui-layout" data-options="fit:true">
|
|
<div data-options="region:'center',border:false,collapsed:false">
|
|
<div class="edit-container">
|
|
<form id="edit_form">
|
|
<input type="hidden" id="id" name="id" value="" />
|
|
<div class="form-title">
|
|
<span class="form-title-text">流程基本信息</span>
|
|
</div>
|
|
<div class="row">
|
|
<div class="formgroup col-12">
|
|
<label class="required">流程模板英文名</label>
|
|
<div>
|
|
<input type="text" class="easyui-validatebox nospaceinside" data-options="required:true,tipPosition:'bottom'" id="enname" name=""enname"" value=""/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="formgroup col-12">
|
|
<label class="required">流程模板中文名</label>
|
|
<div>
|
|
<input type="text" class="easyui-validatebox" data-options="required:true,tipPosition:'bottom'" id="cnname" name="cnname" value=""/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="formgroup col-12">
|
|
<label class="required">流程模板作用范围</label>
|
|
<div>
|
|
<input name="scope" type="radio" id="scope_1" value="1"/><label for="scope_1">全省共享</label>
|
|
<input name="scope" type="radio" id="scope_0" value="0"/><label for="scope_0">本单位使用</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="formgroup col-12">
|
|
<label class="required">所属应用包</label>
|
|
<div>
|
|
<input type="text" id="pack_uuid" name="pack_uuid"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="formgroup col-12">
|
|
<label class="required">排序号</label>
|
|
<div>
|
|
<input type="text" class="easyui-validatebox" data-options="required:true,tipPosition:'bottom'" id="display_order" name="display_order" value=""/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div data-options="region:'south',border:false,collapsed:false" class="page-title" style="height:60px;">
|
|
<div class="edit-page-toolbar">
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-save'" onclick="opt_save()">保存</a>
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-close'" onclick="opt_close()">关闭</a>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
|
|
</html>
|