group_edit.html 4.86 KB
   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
#override("body")
<div class="ibox float-e-margins">
<div class="ibox-content">
<div class="col-sm-4">
<form id="validForm" class="form-horizontal m-t" novalidate="novalidate">
<input type="hidden" id="group.id" name="id" value="$!group.id"/>
<div class="form-group">
<label class="col-sm-3 control-label">组名称:</label>
<div class="col-sm-8">
<input type="text" placeholder="机构名称" value="$!group.name" aria-required="true" required="true" class="form-control" minlength="2" name="name" id="name">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">建档类型:</label>
<div class="col-sm-8">
<select class="form-control" name="type">
<option value="1" #if($!group.type==1) selected="selected" #end>1</option>
<option value="2" #if($!group.type==2) selected="selected" #end>2</option>
<option value="3" #if($!group.type==3) selected="selected" #end>3</option>
</select>
<!-- <input type="text" placeholder="类型" aria-required="true" required="true" minlength="3" name="type" class="form-control" id="type"> -->
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">连接地址:</label>
<div class="col-sm-8">
<input type="text" value="$!group.clientaddress" placeholder="连接地址" aria-required="true" required="true" minlength="3" name="clientaddress" class="form-control" id="shortCode">
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<div class="col-sm-4 col-sm-offset-3 pull-right">
<button type="button" class="btn btn-primary" onclick="save();"><i class="fa fa-check"></i>&nbsp;提交</button>
<button type="button" class="btn btn-white" onclick="parent.closeAll();"><i class="fa fa-close"></i>&nbsp;取消</button>
</div>
</div>
</form>
</div>
<!-- 机构组拥有机构 -->
<div class="col-sm-8">
<table id="dataTable"></table>
</div>
</div>
</div>
<script type="text/javascript">
function save(){
if($('#validForm').valid()){
var data = $('#validForm').serialize();
//console.log(data);
if("$!group.id" == ""){
ajaxPost(APP.PATH + "/sysOrganGroup/create",data);
}else{
ajaxPost(APP.PATH + "/sysOrganGroup/update",data);
}
parent.reloadGrid('dataTable');
}
}

var controllerRequestMappint = "/sysOrganizations/";

## 参考 base_table_init.js 或者根据empty_bootstrap_table_init.js 来自己创建特殊的table
## 注意:自己创建的特殊的table不能extends base_list.html
var default_dataUrl = APP.PATH + controllerRequestMappint + "list";
var default_dataColumns = [{
field: 'check_state',
title: '',
checkbox: true
},{
field: 'id',
title: '编号'
},{
field: 'name',
title: '名称'
},{
field: 'type',
title: '类型',
formatter:function(value,row,index){
//1:卫生与计划生育委员会,2:妇幼保健院/站,3:妇产(科)医院,4:综合医院,5:计生站,6:卫生院,7:卫生所,8:其他
switch(value){
case 1:return "卫生与计划生育委员会";
case 2:return "妇幼保健院/站";
case 3:return "妇产(科)医院";
case 4:return "综合医院";
case 5:return "计生站";
case 6:return "卫生院";
case 7:return "卫生所";
case 8:return "其他";
}
}
},{
field: 'shortCode',
title: '简码'
},{
field: 'level',
title: '等级',
formatter:function(value,row,index){
switch (value) {
case 1:return "省";
case 2:return "市";
case 3:return "区县";
case 4:return "乡镇";
case 5:return "村";
case 6:return "其他";

default:
return "";
}
}
},{
field: 'gradeLevel',
title: '医院等级'
},{
field: 'mobile',
title: '服务热线'
},{
field: 'starLevel',
title: '星级'
},{
field: 'status',
title: '状态',
formatter:function(value,row,index){
switch (value) {
case 0: return "正式运行";
case 1: return "试运行";
case 2: return "停止运行";
default:
break;
}
}
},{
field: 'address',
title: '地址'
}];
</script>
#end
#extends("/common/base_list.html")