first commit
This commit is contained in:
78
WebRoot/jsp/work/productionIndexDataAdd.jsp
Normal file
78
WebRoot/jsp/work/productionIndexDataAdd.jsp
Normal file
@ -0,0 +1,78 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.work.ProductionIndexPlanNameData"%>
|
||||
<% request.setAttribute("Type_Year", ProductionIndexPlanNameData.Type_Year);%>
|
||||
<% request.setAttribute("Type_Month", ProductionIndexPlanNameData.Type_Month);%>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$.post(ext.contextPath + '/work/productionIndexData/getConfigureJson.do', function(data) {
|
||||
if(data.length>0){
|
||||
var html="";
|
||||
for(var i=0;i<data.length;i++){
|
||||
html+="<div class=\"form-group\">";
|
||||
html+="<label class=\"col-sm-4 control-label\">"+data[i].name+"</label>";
|
||||
html+="<div class=\"col-sm-6\">";
|
||||
html+="<input type=\"number\" class=\"form-control\" id=\""+data[i].id+"\" name =\""+data[i].id+"\" value=\"0\">";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
}
|
||||
$('#fillIn').html(html);
|
||||
}
|
||||
},'json');
|
||||
});
|
||||
|
||||
function doSave() {
|
||||
$.post(ext.contextPath + "/work/productionIndexData/dosave.do",$("#subForm").serialize(),function(result) {
|
||||
if (result>0) {
|
||||
dosearch();
|
||||
closeModal('subModal');
|
||||
}else if(result==-1){
|
||||
showAlert('d','该时间数据已存在,无需重复添加!');
|
||||
}else{
|
||||
showAlert('d','保存失败');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<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>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" class="form-control" id="unitId" name ="unitId" value="${param.unitId}">
|
||||
<div id="alertDiv"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">类型</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="hidden" class="form-control" id="type" name ="type" value="${Type_Month}">
|
||||
<input type="text" class="form-control" id="typeName" name ="typeName" value="月度指标" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">日期</label>
|
||||
<div class="col-sm-6">
|
||||
<input class="form-control date-picker" id="monthtimeId" name="monthtimeId" autocomplete="off" type="text" placeholder="点击选择" value="${param.date}" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="fillIn"></div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doSave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
Reference in New Issue
Block a user