流程相关2
This commit is contained in:
@ -2,27 +2,7 @@
|
||||
<script type="text/javascript">
|
||||
|
||||
function doupdate() {
|
||||
/* $("#baseForm").validate({
|
||||
rules: {
|
||||
name: "required"
|
||||
},
|
||||
messages: {
|
||||
name: "请输入用户名"
|
||||
},
|
||||
// 校验全部通过
|
||||
submitHandler: function () {
|
||||
alert("校验全部通过!")
|
||||
$.post(ext.contextPath + "/work/group/save.do", $("#baseForm").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
alert("保存成功")
|
||||
}else if(data.res == 0){
|
||||
alert("保存失败")
|
||||
}else{
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}); */
|
||||
$.post(ext.contextPath + "/work/group/update.do", $("#subForm").serialize(), function(data) {
|
||||
$.post(ext.contextPath + "/business/businessunit/update.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
$(".modal").modal("hide");
|
||||
$("#table").bootstrapTable('refresh');
|
||||
@ -34,6 +14,31 @@
|
||||
},'json');
|
||||
}
|
||||
|
||||
$(function() {
|
||||
// 加载流程类型下拉框
|
||||
$.post(ext.contextPath + "/activiti/workflow/getProcessTypes4Combo.do", function(data) {
|
||||
var selelct = $("#processTypeId").select2({
|
||||
data: data,
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
escapeMarkup: function(markup) {
|
||||
return markup;
|
||||
},
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
},
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
}
|
||||
});
|
||||
// 设置当前值
|
||||
selelct.val('${businessUnit.processTypeId}').trigger("change");
|
||||
}, 'json');
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
@ -41,19 +46,32 @@
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑界面</h4>
|
||||
<h4 class="modal-title">编辑业务单元</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<div id="alertDiv"></div>
|
||||
<input id ="id" name="id" type="hidden" value="${group.id}"/>
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
<input id="id" name="id" type="hidden" value="${businessUnit.id}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">名称</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="name" name ="name" placeholder="名称" value="${group.name}">
|
||||
<label class="col-sm-3 control-label">*业务单元名称</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="业务单元名称" value="${businessUnit.name}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">*流程类型</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control select2" id="processTypeId" name="processTypeId" style="width: 100%;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">激活状态</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" id="active" name="active">
|
||||
<option value="1" ${businessUnit.active eq '1' ? 'selected' : ''}>激活</option>
|
||||
<option value="0" ${businessUnit.active eq '0' ? 'selected' : ''}>停用</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user