更改
This commit is contained in:
parent
3c1f21cf96
commit
3403905b2a
@ -0,0 +1,137 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2017-10-11
|
||||
Content: 示例详情页面
|
||||
History Log:
|
||||
*/
|
||||
String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号
|
||||
if(sFlowUnid == null) sFlowUnid="";
|
||||
String sTempletNo = CurPage.getParameter("TempletNo");//模板号
|
||||
if(sTempletNo == null) sTempletNo = "LDistributorInfoSecond";
|
||||
BizObject flow=JBOFactory.createBizObjectQuery("jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT","flow_unid=:flowunid").setParameter("flowunid", sFlowUnid).getSingleResult(false);
|
||||
String DISTRIBUTOR_NO=flow.getAttribute("Flow_Key").getString();
|
||||
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
doTemp.setDefaultValue("FLOWUNID", sFlowUnid);
|
||||
doTemp.setDefaultValue("DISTRIBUTOR_NO", DISTRIBUTOR_NO);
|
||||
//doTemp.setColTips("", "测试");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
dwTemp.ReadOnly = "1";//只读模式
|
||||
ASDataObject ado = dwTemp.getDataObject();
|
||||
ado.setHtmlEvent("LIMIT_APPROVAL_DATE", "onchange", "getenddate");
|
||||
ado.setHtmlEvent("LIMIT_EFFECTIVE_DATE", "onchange", "getenddate");
|
||||
dwTemp.genHTMLObjectWindow(sFlowUnid);
|
||||
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","保存","保存所有修改","save()","","","",""}
|
||||
/* {String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
|
||||
*/ };
|
||||
sButtonPosition = "north";
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
|
||||
function save(){
|
||||
as_save(0,"saveproj_name()");
|
||||
}
|
||||
function saveproj_name(){
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businesspply.CustomerInfoManage","saveDistributorInfo","flowunid=<%=sFlowUnid%>");
|
||||
|
||||
}
|
||||
|
||||
function getenddate(){
|
||||
var limit_approval_date=getItemValue(0,0,"LIMIT_APPROVAL_DATE");
|
||||
var limit_effective_date=getItemValue(0,0,"LIMIT_EFFECTIVE_DATE");
|
||||
var date = new Date(limit_approval_date);
|
||||
var year=date.getFullYear();
|
||||
var month=date.getMonth()+1;
|
||||
var day=date.getDate();
|
||||
if(limit_approval_date==null||limit_approval_date==""||limit_effective_date==null||limit_effective_date==""){
|
||||
setItemValue(0,0,"LIMIT_END_DATE","");
|
||||
return;
|
||||
}
|
||||
month=month+parseInt(limit_effective_date);
|
||||
var n=parseInt(month/12);
|
||||
if(month>12){
|
||||
month=month-12*n;
|
||||
year=year+n;
|
||||
}
|
||||
if(month==0){
|
||||
month=12;
|
||||
}
|
||||
if (month >= 1 && month <= 9) {
|
||||
month = "0" + month;
|
||||
}
|
||||
if (day >= 1 && day <= 9) {
|
||||
day = "0" + day;
|
||||
}
|
||||
var end_date= year+"/"+ month +"/"+ day;
|
||||
setItemValue(0,0,"LIMIT_END_DATE",end_date);
|
||||
}
|
||||
|
||||
//请选择经销商名称
|
||||
function selectcompany(){
|
||||
AsDialog.OpenSelector("SelectCompany","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
|
||||
if(!sReturn||sReturn=="_CANCEL_"){
|
||||
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||
return;
|
||||
}
|
||||
sReturn = sReturn.split("@");//"@"表示了向页面添加数据时的连续性
|
||||
setItemValue(0,getRow(),"SUBSIDIARY_COMPANY",sReturn[0]);//向页面的框中添加数据
|
||||
},"请选择名称");
|
||||
}
|
||||
|
||||
//省市
|
||||
function selectRegionCode(){
|
||||
var area_code = getItemValue(0,getRow(),"DISTRIBUTOR_ADDRESS");
|
||||
AsDialog.PopView("/Common/ToolsA/AreaVFrame.jsp","AreaCode="+area_code,"dialogWidth=850px;dialogHeight=450px;center:yes;status:no;statusbar:no",function(sAreaCodeInfo){
|
||||
//增加清空功能的判断
|
||||
if( sAreaCodeInfo == '_CANCEL_'){
|
||||
return;
|
||||
}
|
||||
if(sAreaCodeInfo == "NO" || sAreaCodeInfo == '_CLEAR_'){
|
||||
setItemValue(0,getRow(),"DISTRIBUTOR_ADDRESS","");
|
||||
setItemValue(0,getRow(),"DISTRIBUTOR_ADDRESSNAME","");
|
||||
}else{
|
||||
if(typeof(sAreaCodeInfo) != "undefined" && sAreaCodeInfo != ""){
|
||||
sAreaCodeInfo = sAreaCodeInfo.split('@');
|
||||
sAreaCodeValue = sAreaCodeInfo[0];//-- 行政区划代码
|
||||
sAreaCodeName = sAreaCodeInfo[1];//--行政区划名称
|
||||
setItemValue(0,getRow(),"DISTRIBUTOR_ADDRESS",sAreaCodeValue);
|
||||
setItemValue(0,getRow(),"DISTRIBUTOR_ADDRESSNAME",sAreaCodeName);
|
||||
}
|
||||
}
|
||||
},'请选择省市');
|
||||
}
|
||||
//验证手机号码
|
||||
/* function checkMobile(str) {
|
||||
var re = /^1\d{10}$/
|
||||
if (re.test(str)) {
|
||||
alert("正确");
|
||||
} else {
|
||||
alert("请输入有效数字");
|
||||
}
|
||||
} */
|
||||
//验证电话号码
|
||||
function checkPhone(){
|
||||
//var str = $("#DEALER_PHONE").val();
|
||||
//var str = document.getElementById("DEALER_PHONE").value;
|
||||
var str=getItemValue(0, 0, "DEALER_PHONE");
|
||||
var re = /^0\d{2,3}-?\d{7,8}$/;
|
||||
if(re.test(str)){
|
||||
}else{
|
||||
alert("请输入有效数字");
|
||||
}
|
||||
}
|
||||
//验证邮箱的有效性
|
||||
/* function checkEmail(str){
|
||||
var re = /^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/
|
||||
if(re.test(str)){
|
||||
alert("正确");
|
||||
}else{
|
||||
alert("请输入正确的邮箱号");
|
||||
}
|
||||
} */
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
Loading…
x
Reference in New Issue
Block a user