新增文件下载导入页面
This commit is contained in:
parent
587d328d3c
commit
f16a4d1090
@ -0,0 +1,131 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List01;Describe=定义页面属性;]~*/%>
|
||||
<%
|
||||
String PG_TITLE = "本方信息"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||||
%>
|
||||
|
||||
<%
|
||||
ASObjectModel doTemp = new ASObjectModel("li_Property_import");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(30);
|
||||
dwTemp.genHTMLObjectWindow("id");
|
||||
%>
|
||||
<%/*~END~*/%>
|
||||
|
||||
|
||||
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List04;Describe=定义按钮;]~*/%>
|
||||
<%
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||
{"true","","Button","修改","修改","viewAndEdit()","","","","btn_icon_edit"},
|
||||
{"true","All","Button","删除","删除","deleteRecord()","","","","btn_icon_delete",""},
|
||||
{"true","","Button","excel导入","excel导入","importExcel()","","","","btn_icon_import"},
|
||||
{"true","","Button","模版下载","模版下载","DiscountDownload()","","","","btn_icon_down",""},
|
||||
};
|
||||
%>
|
||||
<%/*~END~*/%>
|
||||
|
||||
|
||||
|
||||
|
||||
<%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=List05;Describe=主体页面;]~*/%>
|
||||
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<%/*~END~*/%>
|
||||
|
||||
<form name=form1 method=post action="<%=sWebRootPath%>/servlet/view/fileTemplateView?CompClientID=<%=sCompClientID%>" target=MyAtt>
|
||||
<div style="display:none">
|
||||
<input id="sqlString" name="sqlString" value="">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List06;Describe=定义按钮事件;]~*/%>
|
||||
<script type="text/javascript">
|
||||
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||
function newRecord(){
|
||||
var sUrl = "/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/Testinfo.jsp";
|
||||
AsDialog.PopView(sUrl,'',"resizable=yes;dialogWidth=800px;dialogHeight=300px;center:yes;status:no;statusbar:no",function(){
|
||||
reloadSelf();
|
||||
},"新增信息");
|
||||
}
|
||||
|
||||
function viewAndEdit(){
|
||||
var sUrl = "/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/LBEquipmentInfo.jsp";
|
||||
var IDs = getItemValueArray(0,'ID');//+","+TablePage.getCheckedItemValueArrayWithOtherPage("ID",s_c_p[0]);
|
||||
if(typeof(IDs) == "undefined" || IDs.length == 0 ){
|
||||
alert("请选择一条信息!");
|
||||
return ;
|
||||
}
|
||||
var sParam = "ids="+IDs;
|
||||
AsDialog.PopView(sUrl,sParam,
|
||||
"dialogWidth=500px;dialogHeight=300px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(sReturnInfo){
|
||||
if(typeof(sReturnInfo)=="undefined" || sReturnInfo=="" || sReturnInfo=="_CANCEL_") return;
|
||||
if("success"==sReturnInfo){
|
||||
alert("修改成功");
|
||||
}
|
||||
reloadSelf();
|
||||
|
||||
},"资产转出登记修改");
|
||||
reloadSelf();
|
||||
}
|
||||
//模板下载
|
||||
function DiscountDownload(){
|
||||
var sId="522b89b1329c46f2af20daced778e366";
|
||||
if (typeof(sId)=="undefined" || sId.length==0){
|
||||
return;
|
||||
}else{
|
||||
$("#sqlString").val("save@"+sId);
|
||||
form1.submit();
|
||||
}
|
||||
|
||||
}
|
||||
function downloadFile(id){
|
||||
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
|
||||
window.open(sWebRootPath+"/servlet/view/docDownloadServlet?CompClientID=<%=sCompClientID%>&sqlString=save@"+id, "downloadTemplate");
|
||||
}
|
||||
//excel导入
|
||||
function importExcel(){
|
||||
var importCondition={};//导入配置
|
||||
importCondition["templateNo"]="522b89b1329c46f2af20daced778e366";//导入的模板编号必填s
|
||||
//增加其他配置参数
|
||||
importCondition["inputuserid"]="<%=CurUser.getUserID()%>";
|
||||
importCondition["inputorgid"]="<%=CurUser.getOrgID()%>";
|
||||
var sparam=JSON.stringify(importCondition).replace(/,/g,"@");//生成模板的参数据
|
||||
AsDialog.PopView("/Tenwa/Core/OfficeTemplate/TemplateManager/BFTemplateTest/uploadExcel.jsp","importparam="+sparam,
|
||||
{width:"350px",height:"40px",title:"上传资产转出数据"},function(){
|
||||
importExcelNew();
|
||||
reloadSelf();});
|
||||
}
|
||||
|
||||
|
||||
function deleteRecord(){
|
||||
var ownNumber = getItemValue(0,getRow(),'id');
|
||||
if(typeof(ownNumber)=="undefined" || ownNumber.length==0 ){
|
||||
alert("请选择一条信息!");
|
||||
return ;
|
||||
}
|
||||
if(confirm('确实要删除吗?')){
|
||||
|
||||
as_delete(0,'');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<%/*~END~*/%>
|
||||
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List07;Describe=自定义函数;]~*/%>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
<%/*~END~*/%>
|
||||
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List08;Describe=页面装载时,进行初始化;]~*/%>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
<%/*~END~*/%>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -0,0 +1,26 @@
|
||||
<%@page import="com.itextpdf.text.log.SysoCounter"%>
|
||||
<%@ page contentType="text/html; charset=GBK"%><%@
|
||||
include
|
||||
file="/Frame/resources/include/include_begin_info.jspf"%>
|
||||
<%
|
||||
//获得参数
|
||||
String id = CurPage.getParameter("id");
|
||||
if (id == null)
|
||||
id = "";
|
||||
ASObjectModel doTemp = new ASObjectModel("li_Property_importS");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2"; //设置DW风格 1:Grid 2:Freeform
|
||||
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
|
||||
String sButtons[][] = {{"true", "All", "Button", "保存","保存所有修改", "saveRecord()", "", "", "", ""},};
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function goBack(){
|
||||
parent.AsDialog.ClosePage();
|
||||
}
|
||||
function saveRecord(sPostEvents) {
|
||||
as_save("myiframe0", "goBack()");
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
Loading…
x
Reference in New Issue
Block a user