更新经销商账户

This commit is contained in:
liuzhao 2018-11-22 17:49:12 +08:00
parent 3b1335e23a
commit a8ab7472ee
3 changed files with 169 additions and 4 deletions

View File

@ -15,7 +15,7 @@
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] = {
//{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
//{"true","","Button","ÏêÇé","ÏêÇé","viewAndEdit()","","","","btn_icon_detail",""},
{"true","","Button","ÐÞ¸Ä","ÐÞ¸Ä","viewAndEdit()","","","","btn_icon_detail",""},
{"true","","Button","导入Excel","导入Excel","importExcel()","","","","btn_icon_import"},
{"true","","Button","模版下载","模版下载","DistributorDownload()","","","","btn_icon_down",""},
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
@ -34,8 +34,8 @@
AsControl.OpenView(sUrl,'','_self','');
}
function viewAndEdit(){
var sUrl = "";
var sPara = getItemValue(0,getRow(0),'SerialNo');
var sUrl = "/Tenwa/Lease/DistributorManage/DistributorApproval/DistributorAccountImportInfo.jsp";
var sPara = getItemValue(0,getRow(0),'ID');
if(typeof(sPara)=="undefined" || sPara.length==0 ){
alert("参数不能为空!");
return ;

View File

@ -0,0 +1,75 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Author: undefined 2018-11-22
Content: 示例详情页面
History Log:
*/
String sPrevUrl = CurPage.getParameter("PrevUrl");
if(sPrevUrl == null) sPrevUrl = "";
String sTempletNo = "DistributorAccountImportInfo";//--模板号--
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("SerialNo"));
String sButtons[][] = {
{"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
{"true","All","Button","返回","返回列表","returnList()","","","","btn_icon_return"}
//{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 returnList(){
AsControl.OpenView("/Tenwa/Lease/DistributorManage/DistributorApproval/DistributorAccountImport.jsp", "","_self","");
}
var province="";
// 选择省份
function selectProvinceCode(){
AsDialog.OpenSelector("selectProvinceCode","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",
function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"||sReturn=="")
{
//alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@");
// alert(sReturn[1]);
setItemValue(0,0,"provinceInfo",sReturn[1]);
setItemValue(0,0,"district","");
province=sReturn[0];
setCertType();
},"请选择省份",'');
}
// 选择市区
function selectCityCode(){
//alert("参数:"+province);
if(province=="" || province==null){
alert("请先选择省份。");
return;
}else{
AsDialog.OpenSelector("selectCityCode","province,"+province,"dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",
function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"||sReturn=="")
{
//alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@");
// alert(sReturn[1]);
setItemValue(0,0,"district",sReturn[1]);
},"请选择地区",'');
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -8,7 +8,7 @@
String sPrevUrl = CurPage.getParameter("PrevUrl");
if(sPrevUrl == null) sPrevUrl = "";
String sTempletNo = "DistributorInfoIBatchmportInfo";//--Ä£°åºÅ--
String sTempletNo = "DistributorInfoImportInfoNew";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
//doTemp.setColTips("", "²âÊÔ");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
@ -27,5 +27,95 @@
function returnList(){
AsControl.OpenView("/Tenwa/Lease/DistributorManage/DistributorApproval/DistributorInfoIBatchmportList.jsp", "","_self","");
}
//请选择经销商名称
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]);//向页面的框中添加数据
},"请选择经销商");
}
var province="";//定义一个全局变量
// 选择省份
function selectProvinceCode(){
AsDialog.OpenSelector("selectProvinceCode","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",
function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"||sReturn==""){
//alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@");
// alert(sReturn[1]);
setItemValue(0,0,"provinces",sReturn[1]);
province=sReturn[0];
setItemValue(0,0,"DISTRIBUTOR_ADDRESSNAME","");
setItemValue(0,0,"DISTRIBUTOR_ADDRESS","");
setCertType();
},"请选择省份",'');
}
// 选择市区
function selectCityCode(){
//alert("参数:"+province);
if(province=="" || province==null){
alert("请先选择省份。");
return;
}else{
AsDialog.OpenSelector("selectCityCode","province,"+province,"dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",
function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"||sReturn==""){
//alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@");
setItemValue(0,0,"DISTRIBUTOR_ADDRESS",sReturn[0]);//地区区号
setItemValue(0,0,"DISTRIBUTOR_ADDRESSNAME",sReturn[1]);//地区
},"请选择地区",'');
}
}
//组织机构验证码的的校验
function Checkfield(){
var businessLicenseNo = getItemValue(0,getRow(0),"BUSINESS_LICENSE_NO");
if(businessLicenseNo==""){
//alert("组织机构代码不能为空!");
return true;
}
if(checkORGRight(businessLicenseNo)){
return true;
}else{
setErrorTips("BUSINESS_LICENSE_NO","组织机构代码格式不正确!");
//AsDebug.alert("提示","组织机构代码格式不正确!");
return false;
}
}
//校验经销商编号是否唯一
function Uniquenesscheck(){
var DISTRIBUTOR_CODING = getItemValue(0,0,'DISTRIBUTOR_CODING');
var sReturnInfo = RunJavaMethodTrans("com.tenwa.customer.controller.group.CustomerGroupCompanyController","distributor_basic","DISTRIBUTOR_CODING="+DISTRIBUTOR_CODING);
if("false" ==sReturnInfo){
AsDebug.alert("提示","经销商编码已存在,请重新输入!!!");
return false;
}else{
return true;
}
}
function checktel(){
var LINKMAN_TEL = getItemValue(0,getRow(0),"LINKMAN_TEL");
if(LINKMAN_TEL==""){
return true;
}
var phone = /^[1][3,4,5,7,8][0-9]{9}$/;
if(phone.test(LINKMAN_TEL)){
setErrorTips("LINKMAN_TEL","");
return true;
}else{
setErrorTips("LINKMAN_TEL","手机号格式不正确!");
//alert("手机号格式不正确!");
return false;
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>