|
|
<!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" lay-filter="editForm">
|
|
|
<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" 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="save" 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');
|
|
|
var appid=GetQueryString("id");
|
|
|
|
|
|
// 获取分类
|
|
|
$.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;
|
|
|
});
|
|
|
|
|
|
}
|
|
|
})
|
|
|
function getAppInfoByAppid(){
|
|
|
$.ajax({
|
|
|
type : "GET",
|
|
|
async : false,
|
|
|
dataType : "json",
|
|
|
url :"/baseService/app/getAppInfoByAppid?appid="+appid,
|
|
|
success : function(data) {
|
|
|
var list=data.base_info[0];
|
|
|
form.val('editForm', {
|
|
|
'appname':list.appname,
|
|
|
'kfdw':list.developer,
|
|
|
'sort_id':list.sort_id,
|
|
|
'bureau_id':list.bureau_name,
|
|
|
'bureau_hidden':list.bureau_id
|
|
|
})
|
|
|
$("select option[value='"+list.system_type_id+"']").attr('selected',true);
|
|
|
store.set('visible_info',JSON.stringify(data.visible_info));
|
|
|
store.set('appid',appid);
|
|
|
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(),
|
|
|
"appid":appid
|
|
|
}
|
|
|
window.location.href='./selectDw.html?jsonInfo='+JSON.stringify(jsonInfo)+'&edit=1';
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
//监听提交
|
|
|
form.on('submit(save)', function(data) {
|
|
|
var f = data.field;
|
|
|
if(f.bureau_id==""){
|
|
|
layer.alert('请选择购买单位',{icon:0});
|
|
|
return false;
|
|
|
}else{
|
|
|
store.set('data',JSON.stringify(f));
|
|
|
window.location.href='./setOption.html?edit=1';
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
if(GetQueryString("jsonStr")){
|
|
|
var jsonStr=GetQueryString("jsonStr");
|
|
|
jsonStr = eval("(" + jsonStr + ")");
|
|
|
console.log(jsonStr);
|
|
|
// 设置选中的单位名称
|
|
|
store.set('appid',jsonStr.appid);
|
|
|
$("#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();
|
|
|
}else{
|
|
|
getAppInfoByAppid();
|
|
|
}
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
</script>
|
|
|
</body>
|
|
|
|
|
|
</html> |