|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
|
|
|
|
<head>
|
|
|
<meta charset="UTF-8">
|
|
|
<title>应用系统添加</title>
|
|
|
<meta name="renderer" content="webkit">
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
|
|
<link rel="stylesheet" href="../../static/css/font.css">
|
|
|
<link rel="stylesheet" href="../../static/css/weadmin.css">
|
|
|
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
|
|
|
<!--[if lt IE 9]>
|
|
|
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
|
|
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
|
|
<![endif]-->
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
|
<div class="weadmin-body">
|
|
|
<form class="layui-form">
|
|
|
<div class="layui-form-item">
|
|
|
<label for="appname" class="layui-form-label">
|
|
|
<span class="we-red">*</span>系统名称
|
|
|
</label>
|
|
|
<div class="layui-input-inline textinput">
|
|
|
<input type="text" id="appname" name="appname" lay-verify="required" autocomplete="" class="layui-input">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-form-item">
|
|
|
<label for="" class="layui-form-label">
|
|
|
<span class="we-red">*</span>系统类型
|
|
|
</label>
|
|
|
<div class="layui-input-inline textinput" id="select_type"></div>
|
|
|
<script type="text/html" id="select_type_script">
|
|
|
<select name="service_type" lay-filter="serviceType" lay-verify="required" id="service_type">
|
|
|
{{#layui.each(d,function(index,item){ }}
|
|
|
<option value={{item.system_type_id}}>{{item.system_type_name}}</option>
|
|
|
{{# }) }}
|
|
|
</select>
|
|
|
</script>
|
|
|
</div>
|
|
|
<div class="layui-form-item">
|
|
|
<label for="sort_id" class="layui-form-label">
|
|
|
<span class="we-red">*</span>排序号
|
|
|
</label>
|
|
|
<div class="layui-input-inline textinput">
|
|
|
<input type="text" id="sort_id" name="sort_id" lay-verify="required|number" autocomplete="" class="layui-input">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-form-item">
|
|
|
<label for="bureau_id" class="layui-form-label">
|
|
|
<span class="we-red">*</span>购买单位
|
|
|
</label>
|
|
|
<div class="layui-input-inline textinput">
|
|
|
<input type="text" id="bureau_id" name="bureau_id" lay-verify="required" placeholder="请点击选择申请单位" autocomplete="" class="layui-input">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-form-item">
|
|
|
<label for="kfdw" class="layui-form-label">
|
|
|
<span class="we-red">*</span>开发公司
|
|
|
</label>
|
|
|
<div class="layui-input-inline textinput">
|
|
|
<input type="text" id="kfdw" name="kfdw" lay-verify="required" autocomplete="" class="layui-input">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-form-item">
|
|
|
<label for="" class="layui-form-label">
|
|
|
</label>
|
|
|
<button class="layui-btn" lay-filter="add" lay-submit="" id="save">下一步</button>
|
|
|
<input type="hidden" value="" id="bureau_hidden" name="bureau_hidden">
|
|
|
</div>
|
|
|
</form>
|
|
|
</div>
|
|
|
<script src="../../lib/layui/layui.js" charset="utf-8"></script>
|
|
|
<script src="../../lib/base64.js"></script>
|
|
|
<script src="../../lib/persist-min.js"></script>
|
|
|
|
|
|
<script>
|
|
|
layui.extend({
|
|
|
admin: '{/}../../static/js/admin'
|
|
|
});
|
|
|
layui.use(['form','upload','jquery','laytpl','admin', 'layer'], function() {
|
|
|
var form = layui.form,
|
|
|
$ = layui.jquery,
|
|
|
admin = layui.admin,
|
|
|
layer = layui.layer,
|
|
|
upload=layui.upload,
|
|
|
laytpl=layui.laytpl;
|
|
|
var store = new Persist.Store('store_name');
|
|
|
|
|
|
// 获取分类
|
|
|
$.ajax({
|
|
|
type : "GET",
|
|
|
async : false,
|
|
|
dataType : "json",
|
|
|
url :"/baseService/app/getIntegratedServicesType",
|
|
|
success : function(data) {
|
|
|
var getTpl = select_type_script.innerHTML
|
|
|
,select_type = document.getElementById('select_type');
|
|
|
laytpl(getTpl).render(data.data, function(html){
|
|
|
select_type.innerHTML = html;
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
form.render();
|
|
|
|
|
|
|
|
|
form.on('select(service_type)',function (data) {
|
|
|
$("#service_type").val(data.value);
|
|
|
})
|
|
|
// 点击申请单位
|
|
|
$("#bureau_id").focus(function () {
|
|
|
var jsonInfo={
|
|
|
"appname":Base64.encode($("#appname").val()),
|
|
|
"kfdw":Base64.encode($("#kfdw").val()),
|
|
|
"sort_id":$("#sort_id").val(),
|
|
|
"service_type":$("#service_type").val()
|
|
|
}
|
|
|
window.location.href='./selectDw.html?jsonInfo='+JSON.stringify(jsonInfo);
|
|
|
})
|
|
|
|
|
|
|
|
|
//监听提交
|
|
|
form.on('submit(add)', function(data) {
|
|
|
var f = data.field;
|
|
|
console.log(f);
|
|
|
store.set('data',JSON.stringify(f))
|
|
|
window.location.href='setOption.html';
|
|
|
return false;
|
|
|
|
|
|
})
|
|
|
|
|
|
// 选择单位后获取数据
|
|
|
if(GetQueryString("jsonStr")){
|
|
|
var jsonStr=GetQueryString("jsonStr");
|
|
|
jsonStr = eval("(" + jsonStr + ")");
|
|
|
console.log(jsonStr);
|
|
|
// 设置选中的单位名称
|
|
|
|
|
|
$("#bureau_id").val(Base64.decode(jsonStr.name));
|
|
|
$("#bureau_hidden").val(Base64.decode(jsonStr.id));
|
|
|
$("#kfdw").val(Base64.decode(jsonStr.kfdw));
|
|
|
$("#appname").val(Base64.decode(jsonStr.appname));
|
|
|
$("#sort_id").val(jsonStr.sort_id);
|
|
|
$("#service_type option[value='"+jsonStr.service_type+"']").attr("selected",true);
|
|
|
form.render();
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
</script>
|
|
|
</body>
|
|
|
|
|
|
</html> |