新增乘用车车型导入
This commit is contained in:
parent
091bb20906
commit
b1a13ac757
@ -0,0 +1,27 @@
|
||||
<%@page import="com.itextpdf.text.log.SysoCounter"%>
|
||||
<%@ page contentType="text/html; charset=GBK"%><%@
|
||||
include
|
||||
file="/Frame/resources/include/include_begin_info.jspf"%>
|
||||
<%
|
||||
String sPrevUrl = CurPage.getParameter("PrevUrl");
|
||||
if(sPrevUrl == null) sPrevUrl = "/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/Introductionofrepairvehiclemodelslist.jsp";
|
||||
String sTempletNo = "li_cardata_commercialS";//--模板号--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
dwTemp.ReadOnly = "0";//只读模式
|
||||
dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID"));
|
||||
|
||||
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"%>
|
||||
@ -0,0 +1,179 @@
|
||||
<%@ 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_cardata_commercial");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.MultiSelect = true; //多选
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(30);
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
%>
|
||||
<%/*~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",""},
|
||||
/* {"true","All","Button","生成租金计划","生成租金计划","createPlan()","","","","btn_icon_generate"},
|
||||
{"true","All","Button","测试拷贝","测试拷贝","copyPath()","","","","btn_icon_generate"}, */
|
||||
};
|
||||
%>
|
||||
<%/*~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 copyPath(){
|
||||
var contractNoArray=getItemValueArray(0,"CONTRACT_NO");
|
||||
if(typeof(contractNoArray)=="undefined"||contractNoArray==null||contractNoArray==""){alert("请选择数据");return;}
|
||||
var contractNos = contractNoArray.join("@");
|
||||
var sUrl = "/Tenwa/Core/FlowManager/CopyFileToOther.jsp";
|
||||
var param = "contractNos="+contractNos;
|
||||
AsControl.RunJsp(sUrl,param,function(result){
|
||||
if(result=="SUCCESS"){
|
||||
|
||||
}
|
||||
alert("拷贝成功!!");
|
||||
});
|
||||
|
||||
//本地测试数据
|
||||
//var contractNos="BQAP(AH)201904230002";
|
||||
/* var sparam = "contractNos="+contractNos;
|
||||
var result=RunJavaMethod("com.tenwa.reckon.copydata.FileCopyToOtherPath","copyFile",sparam);
|
||||
if(result=="SUCCESS"){
|
||||
alert("拷贝成功!!");
|
||||
}else{
|
||||
alert(result);
|
||||
} */
|
||||
}
|
||||
//生成数据
|
||||
function createPlan(){
|
||||
var Id = getItemValueArray(0,"ID");
|
||||
var CONTRACT_NO = getItemValueArray(0,"CONTRACT_NO");
|
||||
var number = 0;
|
||||
var faile_no="";
|
||||
if(typeof(Id)=="undefined"||Id==null||Id==""){alert("请选择数据");return;}
|
||||
for(var i=0;i<Id.length;i++){
|
||||
var param={};
|
||||
var tempParam={};
|
||||
var sparam="";
|
||||
//模板号
|
||||
param["templateNo"]="8c0b32eefcf349e5b5f76d898df0bbbb";
|
||||
|
||||
//生成文件关联关系
|
||||
tempParam["OBJECTTYPE"]="租金支付表导出";
|
||||
tempParam["CONTRACT_NO"]=CONTRACT_NO[i];
|
||||
//tempParam["contract_id"]=Id[i];
|
||||
//生成模板固定参数
|
||||
tempParam["CurUserId"]="<%=CurUser.getUserID()%>";
|
||||
tempParam["CurOrgId"]="<%=CurUser.getOrgID()%>";
|
||||
tempParam["fileSavePath"]="<%=CurConfig.getConfigure("FileSavePath")%>";
|
||||
|
||||
param["templateParam"]=JSON.stringify(tempParam).replace(/,/g,"@");//生成模板的参数据
|
||||
for(var key in param){
|
||||
if(sparam.length>0){sparam+=",";}
|
||||
sparam+=key+"="+param[key];
|
||||
}
|
||||
|
||||
var result=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction","createOfficeByTemplate",sparam);
|
||||
|
||||
if(result=="success"){
|
||||
number++;
|
||||
}else{
|
||||
faile_no+=CONTRACT_NO[i]+";";
|
||||
}
|
||||
|
||||
}
|
||||
if(Id.length==0){
|
||||
alert("请先选择数据!!!");
|
||||
return;
|
||||
}else if(number==0){
|
||||
alert("生成失败!!!");
|
||||
}else if(number==Id.length){
|
||||
alert("生成成功!!!");
|
||||
}else{
|
||||
alert("部分生成成功!!!"+faile_no+"生成失败!!!");
|
||||
}
|
||||
reloadSelf();
|
||||
}
|
||||
function newRecord(){
|
||||
var sUrl = "/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/Introductionofrepairvehiclemodelsinfo.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/Introductionofrepairvehiclemodelsinfo.jsp";
|
||||
var sPara = getItemValue(0,getRow(0),'ID');
|
||||
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||
alert("参数不能为空!");
|
||||
return ;
|
||||
}
|
||||
AsDialog.PopView(sUrl,"ID="+sPara,"resizable=yes;dialogWidth=800px;dialogHeight=300px;center:yes;status:no;statusbar:no",function(){reloadSelf();},"修改信息");
|
||||
}
|
||||
|
||||
//excel导入
|
||||
function importExcel(){
|
||||
var importCondition={};//导入配置
|
||||
importCondition["templateNo"]="114edfb2dc7249c9a31c989a7606ba95";//导入的模板编号必填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(){
|
||||
reloadSelf();});
|
||||
}
|
||||
//模板下载
|
||||
function DiscountDownload(){
|
||||
var sId="114edfb2dc7249c9a31c989a7606ba95";
|
||||
if (typeof(sId)=="undefined" || sId.length==0){
|
||||
return;
|
||||
}else{
|
||||
$("#sqlString").val("save@"+sId);
|
||||
form1.submit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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"%>
|
||||
Loading…
x
Reference in New Issue
Block a user