更改
This commit is contained in:
parent
13e2efbc1c
commit
5868fdeee1
@ -11,9 +11,9 @@
|
||||
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
String sButtons[][] = {
|
||||
/* {"true","All","Button","新增","新增","newRecord()","","","",""}, */
|
||||
{"true","All","Button","修改","修改","edit()","","","",""},
|
||||
{"true","All","Button","删除","删除","do_delete()","","","","btn_icon_delete"},
|
||||
{"true","All","Button","新增","新增","newRecord()","","","",""},
|
||||
{"true","All","Button","详情","详情","viewAndEdit()","","","",""},
|
||||
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""},
|
||||
{"true","All","Button","导入Excel","导入Excel","importExcel()","","","","btn_icon_import"},
|
||||
{"true","","Button","牌照模版下载","牌照模版下载","LicensePlateDownload()","","","","btn_icon_down",""},
|
||||
};
|
||||
@ -28,6 +28,19 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||
function newRecord(){
|
||||
var sUrl = "/Tenwa/Comm/DocList/LbCarLicensePlateInfo.jsp";
|
||||
AsControl.OpenView(sUrl,'','_self','');
|
||||
}
|
||||
function viewAndEdit(){
|
||||
var sUrl = "/Tenwa/Comm/DocList/LbCarLicensePlateInfo.jsp";
|
||||
var sPara = getItemValue(0,getRow(0),'ID');
|
||||
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||
alert("参数不能为空!");
|
||||
return ;
|
||||
}
|
||||
AsControl.OpenView(sUrl,'ID=' +sPara ,'_self','');
|
||||
}
|
||||
|
||||
function LicensePlateDownload(){
|
||||
var sId="4c559680c16242c497816604aedce292";
|
||||
@ -40,7 +53,100 @@
|
||||
|
||||
}
|
||||
|
||||
function newRecord(){
|
||||
function importExcel(){
|
||||
var importCondition={};//导入配置
|
||||
importCondition["templateNo"]="4c559680c16242c497816604aedce292";//导入的模板编号必填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 afterSearch(){
|
||||
for(var i=0;i<getRowCount(0);i++){
|
||||
getObj(0,i,"operation").innerHTML='<a class="box" onclick="upload(\''+getItemValue(0,i,"id")+'\')" style={color:#000;text-decoration:underline;}><font color="blue">上传</font></a>';
|
||||
var filelist=getObj(0,i,"filelist").innerHTML;
|
||||
var obj=eval('('+filelist+')');
|
||||
var html="";
|
||||
for(var file in obj){
|
||||
//if(isReview!="true"&&sRightType!="ReadOnly"&&(sObjectType==obj[file]['objecttype'])&&username.replace(/\s+/g," ")==obj[file]['inputuser']){
|
||||
// html+='<a class="btn_icon btn_icon_close" onclick="deleteFile(\''+obj[file]['id']+'\');"> </a>';
|
||||
//}
|
||||
if(obj[file]['image']=="true"){
|
||||
html+='<a class="btn_icon btn_icon_search" onclick="showImage(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');"> </a>';
|
||||
}
|
||||
if(obj[file]['word']=="true"){
|
||||
html+='<a class="btn_icon btn_icon_search" onclick="showWord(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');"> </a>';
|
||||
}
|
||||
if(obj[file]['pdf']=="true"){
|
||||
html+='<a class="btn_icon btn_icon_search" onclick="showPDF(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');"> </a>';
|
||||
}
|
||||
html+='<a onclick=downloadFile(\''+obj[file]['id']+'\')><font color="blue">'+obj[file]['filename']+'</font></a>';
|
||||
html+='【上传时间:'+obj[file]['inputtime']+'】';
|
||||
html+='【上传人:'+obj[file]['inputuser']+'】';
|
||||
html+='【大小:'+Math.floor(obj[file]['FileSize']/1024*100)/100+'kb】';
|
||||
html+='</br>';
|
||||
|
||||
}
|
||||
getObj(0,i,"filelist").innerHTML=html;
|
||||
getObj(0,i,"filelist").style["white-space"]="pre-wrap";
|
||||
var height = getObj(0,i,"filelist").offsetHeight+1;
|
||||
setItemStyle(0,i,"CONTRACT_NUMBER","height="+height+"px");
|
||||
};
|
||||
}
|
||||
function upload(id){
|
||||
var param="Library_id="+id;
|
||||
var sUrl="/Tenwa/Comm/DocList/PlateAttachmentUpload.jsp";
|
||||
AsDialog.PopView(sUrl,param,"dialogWidth=450px;dialogHeight=400px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(message){
|
||||
|
||||
reloadSelf();
|
||||
heping();
|
||||
},"上传附件");
|
||||
}
|
||||
function heping(){
|
||||
$("#TR_Right_myiframe0_0").attr("class","color_zebra0");
|
||||
huanhang("Doc_Name");
|
||||
}
|
||||
function huanhang(col){
|
||||
var tab=document.getElementById("myiframe0");
|
||||
var a= getColIndex(0,col);
|
||||
for(var i=0;i<tab.rows.length-1;i++){
|
||||
$("#INPUT_myiframe0_"+col+"_"+i+"_"+a).parent().attr("style","white-space: pre-wrap;");
|
||||
}
|
||||
}
|
||||
function showPDF(id,name){
|
||||
var sUrl="/Tenwa/Comm/DocList/showPDF.jsp";
|
||||
var param="attrid="+id;
|
||||
AsControl.OpenPage(sUrl,param,"","");
|
||||
}
|
||||
function showWord(id,name){
|
||||
var sUrl="/Tenwa/Comm/DocList/showWord.jsp";
|
||||
var param="attrid="+id;
|
||||
AsControl.OpenPage(sUrl,param,"","");
|
||||
}
|
||||
function showImage(id,name){
|
||||
var sUrl="/Tenwa/Comm/DocList/showImage.jsp";
|
||||
var param="attrid="+id;
|
||||
AsDialog.PopView(sUrl,param,"dialogWidth=480px;dialogHeight=400px;",function(message){
|
||||
|
||||
},name);
|
||||
}
|
||||
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");
|
||||
}
|
||||
function deleteFile(id){
|
||||
var sParams="attId="+id;
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.doc.action.DocListAction","deleteAttr",sParams);
|
||||
reloadSelf();
|
||||
heping();
|
||||
}
|
||||
|
||||
|
||||
|
||||
<%-- function newRecord(){
|
||||
AsDialog.OpenSelector("SelectContractCarPhoto","","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
|
||||
|
||||
if(!sReturn||sReturn=="_CANCEL_"||sReturn=="_NONE_"){
|
||||
@ -75,15 +181,9 @@
|
||||
},"请选择车辆");
|
||||
},"请选择合同");
|
||||
|
||||
}
|
||||
/* //在加载完表格后调用
|
||||
function afterSearch(){
|
||||
for(var i=0;i<getRowCount(0);i++){
|
||||
getObj(0,i,"action").innerHTML='<a onclick="javascript:upload()" style="color: blue;"><center>添  加</center></a>';
|
||||
}
|
||||
} */
|
||||
} --%>
|
||||
|
||||
function upload(){
|
||||
/* function upload(){
|
||||
var param="contract_id="+getItemValue(0,getRow(0),'id');//主键保存在合同编号里
|
||||
param+="&ObjectType=CarPhoto";
|
||||
var sUrl="/Tenwa/ChannelPortal/BusinessHanding/CarPhoto/LBCarPhotoDocumentInfo.jsp";
|
||||
@ -91,11 +191,13 @@
|
||||
|
||||
reloadSelf();
|
||||
},"上传附件");
|
||||
}
|
||||
function do_delete(){
|
||||
} */
|
||||
/* function do_delete(){
|
||||
as_delete(0);
|
||||
}
|
||||
function edit(){
|
||||
*/
|
||||
|
||||
/* function edit(){
|
||||
var sUrl = "/Tenwa/ChannelPortal/BusinessHanding/CarPhoto/LBCarPhotoDocumentInfo.jsp";
|
||||
// AsControl.OpenView(sUrl,'','_self','');
|
||||
|
||||
@ -106,18 +208,7 @@
|
||||
AsDialog.PopView(sUrl,cparam,"dialogWidth=800px;dialogHeight=480px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(){
|
||||
reloadSelf();
|
||||
},"修改车牌号");
|
||||
}
|
||||
|
||||
function importExcel(){
|
||||
var importCondition={};//导入配置
|
||||
importCondition["templateNo"]="4c559680c16242c497816604aedce292";//导入的模板编号必填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 exportExcel(){
|
||||
var param={};
|
||||
|
||||
33
WebContent/Tenwa/Comm/DocList/LbCarLicensePlateInfo.jsp
Normal file
33
WebContent/Tenwa/Comm/DocList/LbCarLicensePlateInfo.jsp
Normal file
@ -0,0 +1,33 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2018-06-14
|
||||
Content: 示例详情页面
|
||||
History Log:
|
||||
*/
|
||||
String sPrevUrl = CurPage.getParameter("ID");
|
||||
//if(sPrevUrl == null) sPrevUrl = "";
|
||||
|
||||
String sTempletNo = "LB_CAR_LICENSE_PLATE_INFO_Info";//--模板号--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
/* doTemp.setColTips("", "测试"); */
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
//dwTemp.ReadOnly = "-2";//只读模式
|
||||
dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID"));
|
||||
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","保存","保存所有修改","save()","","","",""},
|
||||
{"true","All","Button","返回","返回列表","returnList()","","","",""}
|
||||
};
|
||||
/* sButtonPosition = "south"; */
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function save(){
|
||||
as_save("myiframe0","returnList()");
|
||||
}
|
||||
function returnList(){
|
||||
AsControl.OpenView("/Tenwa/CarPhoto/CarPhotoList.jsp", "","_self","");
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
104
WebContent/Tenwa/Comm/DocList/PlateAttachmentUpload.jsp
Normal file
104
WebContent/Tenwa/Comm/DocList/PlateAttachmentUpload.jsp
Normal file
@ -0,0 +1,104 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2018-05-31
|
||||
Content: 示例详情页面
|
||||
History Log:
|
||||
*/
|
||||
String Library_id = CurPage.getParameter("Library_id");
|
||||
|
||||
//定义变量
|
||||
String sObjectNo = "";//--对象编号
|
||||
//获得组件参数
|
||||
String flowNo=CurPage.getParameter("FlowNo");
|
||||
|
||||
String sPrevUrl = CurPage.getParameter("PrevUrl");
|
||||
//if(sPrevUrl == null) sPrevUrl = "/Tenwa/Lease/FamilyVisit/fieldSurvey/FieldSurveyList.jsp";
|
||||
|
||||
String sTempletNo = "PlateAttachmentUpload";//--模板号--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
//dwTemp.ReadOnly = "-2";//只读模式
|
||||
dwTemp.genHTMLObjectWindow(Library_id);
|
||||
String sButtons[][] = {
|
||||
{"true","","Button","保存","保存所有修改","importRecord()","","","",""},
|
||||
{"true","All","Button","取消","返回列表","pull()","","","","btn_icon_close"}
|
||||
};
|
||||
/* sButtonPosition = "south"; */
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#FILE2").attr("type","file");
|
||||
$("#myiframe0").attr("enctype","multipart/form-data");
|
||||
var params={};
|
||||
params["OBJECTTYPE"]="<%=flowNo%>";
|
||||
var sparma="";
|
||||
for(var key in params){
|
||||
sparma=sparma+"<input type=\"text\" name=\""+key+"\" value=\""+params[key]+"\">"
|
||||
}
|
||||
$("#FILE2").append(sparma);
|
||||
$("#myiframe0").attr("action","<%=sWebRootPath%>/Tenwa/Comm/DocList/DocListUploadTwo.jsp?CompClientID=<%=CurComp.getClientID()%>");
|
||||
$("#myiframe0").attr("method","post");
|
||||
});
|
||||
|
||||
var lock = false;
|
||||
function importRecord(){
|
||||
var o = document.forms["myiframe0"];
|
||||
var sFileName = o.FILE2.value;
|
||||
var nameArr = sFileName.split("\\");
|
||||
setItemValue(0,0,"FileName",encodeURI(nameArr[nameArr.length-1]));
|
||||
if (typeof(sFileName) == "undefined" || sFileName==""){
|
||||
alert("请选上传的附件!");
|
||||
return false;
|
||||
}
|
||||
if(/[!@'"#$%&\^*]/.test(nameArr[nameArr.length-1])){
|
||||
alert("文件名不合法");
|
||||
return;
|
||||
}
|
||||
var flag=CheckStr(nameArr[nameArr.length-1]);
|
||||
/* if(flag!="true"){
|
||||
alert("只能上传后缀名为"+flag+"的文件");
|
||||
return ;
|
||||
} */
|
||||
var fileSize;
|
||||
if(typeof(ActiveXObject) == "function"){ // IE
|
||||
var fso = new ActiveXObject("Scripting.FileSystemObject");
|
||||
var f1 = fso.GetFile(sFileName);
|
||||
fileSize = f1.size;
|
||||
}else{
|
||||
fileSize = o.FILE2.files[0].size;
|
||||
}
|
||||
if(fileSize > 50*1024*1024){
|
||||
alert("文件大于50MB,不能上传!");
|
||||
return false;
|
||||
}
|
||||
if(lock){
|
||||
//锁已经开启,在提交只会被阻断
|
||||
AsDebug.showMessage('提醒:','请勿重复点击','','',true);
|
||||
return false;
|
||||
}else {
|
||||
//锁开启,锁关闭只能是数据被处理完毕或者刷新页面,文档重新加载
|
||||
lock = true;
|
||||
}
|
||||
return o.submit();
|
||||
}
|
||||
function CheckStr(filename){
|
||||
var s="jpg,jpeg,png,bmp,gif,pdf,doc,docx,xls,xlsx,txt";
|
||||
var flag="false";
|
||||
var s2=s.split(",");
|
||||
var filenamelast = filename.lastIndexOf(".");
|
||||
var fileimage = filename.substr(filenamelast+1).toLowerCase();
|
||||
for(var i=0;i<s2.length;i++){
|
||||
if(fileimage==s2[i]){
|
||||
return "true";
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
function pull(){
|
||||
// AsControl.OpenView("/Tenwa/Lease/FamilyVisit/fieldSurvey/FieldSurveyList.jsp", "","_self","");
|
||||
parent.AsDialog.ClosePage("_CANCEL_");
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -23,6 +23,7 @@ import com.amarsoft.app.util.ASOrgObject;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.lang.DataElement;
|
||||
import com.amarsoft.are.util.StringFunction;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.amarsoft.context.ASUser;
|
||||
@ -39,13 +40,20 @@ public class DistributorInfoTempToFormalBusiness extends BaseBussiness {
|
||||
String orgid=this.saveOrgInfo(Sqlca);
|
||||
Map<String,String>fromCondtion=new HashMap<String, String>();
|
||||
fromCondtion.put("flowunid",this.getAttribute("FlowUnid").toString());
|
||||
BizObject dst= DataOperatorUtil.getSingleJBO(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, fromCondtion, Sqlca);
|
||||
BizObject dst= DataOperatorUtil.getSingleJBO(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, fromCondtion, Sqlca);
|
||||
String disStatus = dst.getAttribute("distributor_status").toString();
|
||||
if(null==disStatus || disStatus.length()<=0){
|
||||
dst.setAttributeValue("distributor_status", "distributor_status04");
|
||||
BizObjectManager dit = JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO_TEMP.CLASS_NAME,Sqlca);
|
||||
dit.saveObject(dst);
|
||||
}
|
||||
Map<String,String>toCondtion=new HashMap<String, String>();
|
||||
DistributorCompare dc=new DistributorCompare();
|
||||
fromCondtion.clear();
|
||||
fromCondtion.put("flowunid",this.getAttribute("FlowUnid").toString());
|
||||
toCondtion.clear();
|
||||
toCondtion.put("distributor_no", dst.getAttribute("distributor_no").getString());
|
||||
|
||||
DataOperatorUtil.copyJBOSet(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, fromCondtion, DISTRIBUTOR_INFO.CLASS_NAME, toCondtion, null, dc, Sqlca);
|
||||
String sMessage="true";
|
||||
return sMessage;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user