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.

157 lines
5.9 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>应用系统添加</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<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":encode64($("#appname").val()),
"kfdw":encode64($("#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(decode64(jsonStr.name));
$("#bureau_hidden").val(decode64(jsonStr.id));
$("#kfdw").val(decode64(jsonStr.kfdw));
$("#appname").val(decode64(jsonStr.appname));
$("#sort_id").val(jsonStr.sort_id);
$("#service_type option[value='"+jsonStr.service_type+"']").attr("selected",true);
form.render();
}
});
</script>
</body>
</html>