You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
464 lines
20 KiB
Plaintext
464 lines
20 KiB
Plaintext
9 months ago
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ExchangesUnitRepeat.aspx.cs" Inherits="DSWeb.Shipping.ExchangesUnitRepeat" %>
|
||
|
|
||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml" >
|
||
|
<head id="Head1" runat="server">
|
||
|
<title>重复客户合并</title>
|
||
|
<link rel="STYLESHEET" type="text/css" href="../theme/page.css"/>
|
||
|
<link href="../theme/tab.css" type="text/css" rel="stylesheet" />
|
||
|
<!--页面重新加载-->
|
||
|
<link rel="STYLESHEET" type="text/css" href="../theme/button/default/Fee.css"/>
|
||
|
<!--自定义下拉框-->
|
||
|
<link href="../theme/style.css" type="text/css" rel="Stylesheet" media="screen"/>
|
||
|
<link href="../theme/dhtmlxcombo.css" type="text/css" rel="Stylesheet" media="screen"/>
|
||
|
<!--Grid-->
|
||
|
<link rel="STYLESHEET" type="text/css" href="../theme/dhtmlxgrid.css"/>
|
||
|
<link rel="STYLESHEET" type="text/css" href="../theme/page.css"/>
|
||
|
<script src="../js/dhtmlxcommon.js" type="text/javascript"></script>
|
||
|
<script src="../js/dhtmlxgrid.js" type="text/javascript"></script>
|
||
|
<script src="../js/dhtmlxgridcell.js" type="text/javascript"></script>
|
||
|
<script src="../js/dhtmlxcombo.js" type="text/javascript"></script>
|
||
|
<script src="../js/dhtmlxgrid_keymap_excel.js" type="text/javascript"></script>
|
||
|
<script src="../js/dhtmlxgrid_drag.js" type="text/javascript"></script>
|
||
|
<script src="../js/dhtmlxgrid_group.js" type="text/javascript"></script>
|
||
|
<script src="../js/dhtmlxgrid_mcol.js" type="text/javascript"></script>
|
||
|
<script src="../js/dhtmlxgrid_keymap_excel.js" type="text/javascript"></script>
|
||
|
<script src="../js/json2.js" type="text/javascript"></script>
|
||
|
<script type="text/javascript">
|
||
|
window.dhx_globalImgPath="../images/";
|
||
|
</script>
|
||
|
<script type="text/javascript">
|
||
|
String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/g,""); }
|
||
|
var comboCUSTOMERNAME;
|
||
|
function $(id)
|
||
|
{
|
||
|
return document.getElementById(id);
|
||
|
}
|
||
|
function initComboCUSTOMERNAME()//委托单位
|
||
|
{
|
||
|
comboCUSTOMERNAME = dhtmlXComboFromSelect("ddlCUSTOMERNAME");
|
||
|
comboCUSTOMERNAME.loadXML("../FeeCodes/WebCrmClientAdapterAll.aspx?mask=0&pos=0");
|
||
|
}
|
||
|
function initComboCUSTOMERNAME2()//委托单位
|
||
|
{
|
||
|
//comboCUSTOMERNAME.setOptionWidth(200);
|
||
|
comboCUSTOMERNAME.attachEvent("onChange", function()
|
||
|
{
|
||
|
comboCUSTOMERNAME.setComboText($("hd_comboCUSTOMERNAME").value);
|
||
|
});
|
||
|
comboCUSTOMERNAME.attachEvent("onBlur", function()
|
||
|
{
|
||
|
var s1 = comboCUSTOMERNAME.getComboText().trim();
|
||
|
var s2 = s1.indexOf("|");
|
||
|
if(s1=="")
|
||
|
{
|
||
|
$("hd_comboCUSTOMERNAME").value="";
|
||
|
comboCUSTOMERNAME.setComboText($("hd_comboCUSTOMERNAME").value);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
if(s2>0)
|
||
|
{
|
||
|
s2=s2+2;
|
||
|
}
|
||
|
var s3 = s1.substring(s2);
|
||
|
if(s2>0)
|
||
|
{
|
||
|
comboCUSTOMERNAME.setComboText(s3);
|
||
|
$("hd_comboCUSTOMERNAME").value=s3;
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
comboCUSTOMERNAME.setComboText($("hd_comboCUSTOMERNAME").value);
|
||
|
}
|
||
|
}
|
||
|
//
|
||
|
if($("hd_comboCUSTOMERNAME").value.trim()!="")
|
||
|
{
|
||
|
var loader = dhtmlxAjax.getSync("../FeeCodes/WebCrmClientAdapterAll.aspx?djqstr="+escape($("hd_comboCUSTOMERNAME").value)+"&val="+newGuid());
|
||
|
var altX =loader.xmlDoc.responseText;
|
||
|
if(altX!="")
|
||
|
{
|
||
|
var arrtmp=altX.split(",");//将各参数分离形成参数数组
|
||
|
if(arrtmp.length>0)
|
||
|
{
|
||
|
//document.getElementById("label").innerHTML
|
||
|
$("hdClientID").value = arrtmp[0];
|
||
|
$("lbCODENAME").innerText = arrtmp[1];
|
||
|
$("lbSHORTNAME").innerText = arrtmp[2];
|
||
|
$("lbDESCRIPTION").innerText = arrtmp[3];
|
||
|
$("hdCODENAME").value = arrtmp[1];
|
||
|
$("hdSHORTNAME").value = arrtmp[2];
|
||
|
$("hdDESCRIPTION").value = arrtmp[3];
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
$("hdClientID").value = "";
|
||
|
$("lbCODENAME").value = "";
|
||
|
$("lbSHORTNAME").value = "";
|
||
|
$("lbDESCRIPTION").value = "";
|
||
|
$("hdCODENAME").value = "";
|
||
|
$("hdSHORTNAME").value = "";
|
||
|
$("hdDESCRIPTION").value = "";
|
||
|
}
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
$("hdClientID").value = "";
|
||
|
$("lbCODENAME").value = "";
|
||
|
$("lbSHORTNAME").value = "";
|
||
|
$("lbDESCRIPTION").value = "";
|
||
|
$("hdCODENAME").value = "";
|
||
|
$("hdSHORTNAME").value = "";
|
||
|
$("hdDESCRIPTION").value = "";
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
comboCUSTOMERNAME.setComboText($("hd_comboCUSTOMERNAME").value);
|
||
|
comboCUSTOMERNAME.attachEvent("onKeyPressed", function(keyCode)
|
||
|
{
|
||
|
if(keyCode!="8")
|
||
|
{
|
||
|
var arrayArg = new Array();
|
||
|
setTimeout(function()
|
||
|
{
|
||
|
var filterCount = 0;
|
||
|
var is = -1;
|
||
|
var ishd = $("hd_comboCUSTOMERNAME").value.trim();
|
||
|
if("" != comboCUSTOMERNAME.getComboText().trim())
|
||
|
{
|
||
|
while("undefined" != typeof comboCUSTOMERNAME.getOptionByIndex(filterCount))
|
||
|
{
|
||
|
var comboValue = comboCUSTOMERNAME.getOptionByIndex(filterCount).text.toUpperCase();//.value;
|
||
|
var enterValue = comboCUSTOMERNAME.getComboText().trim().toUpperCase();
|
||
|
$("hd_comboCUSTOMERNAME").value = comboCUSTOMERNAME.getComboText().trim().toUpperCase();
|
||
|
if(comboValue.indexOf(enterValue) == 0)
|
||
|
{
|
||
|
comboCUSTOMERNAME.selectOption(filterCount,true,true);
|
||
|
is=filterCount;
|
||
|
break;
|
||
|
}
|
||
|
++filterCount;
|
||
|
}
|
||
|
if(is==-1)
|
||
|
{
|
||
|
$("hd_comboCUSTOMERNAME").value = ishd;
|
||
|
alert("无此内容,请重新选择!");
|
||
|
}
|
||
|
}
|
||
|
},10);
|
||
|
}
|
||
|
});
|
||
|
comboCUSTOMERNAME.attachEvent("onSelectionChange", function()
|
||
|
{
|
||
|
$("hd_comboCUSTOMERNAME").value = comboCUSTOMERNAME.getComboText().trim();
|
||
|
});
|
||
|
}
|
||
|
//
|
||
|
function setRepeat()
|
||
|
{
|
||
|
if($("hdyCODENAME").value=="" || $("hdySHORTNAME").value=="" || $("hdyDESCRIPTION").value=="")
|
||
|
{
|
||
|
alert("原信息不允许为空!");
|
||
|
return;
|
||
|
}
|
||
|
if($("hdCODENAME").value=="" || $("hdSHORTNAME").value=="" || $("hdDESCRIPTION").value=="")
|
||
|
{
|
||
|
alert("替换信息不允许为空!");
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
var k8j = $("hdCODENAME").value;
|
||
|
var k5j = $("hdyCODENAME").value;
|
||
|
var k4j = $("hdSHORTNAME").value;
|
||
|
var kgj = $("hdySHORTNAME").value;
|
||
|
var kdj = $("hdDESCRIPTION").value;
|
||
|
var khj = $("hdyDESCRIPTION").value;
|
||
|
if($("hdCODENAME").value==$("hdyCODENAME").value && $("hdSHORTNAME").value==$("hdySHORTNAME").value && $("hdDESCRIPTION").value==$("hdyDESCRIPTION").value)
|
||
|
{
|
||
|
alert("替换信息与原信息相同,无需替换!");
|
||
|
return;
|
||
|
}
|
||
|
//
|
||
|
msgBox();
|
||
|
document.getElementById("btnEnter").click();
|
||
|
}
|
||
|
//是否为数字2
|
||
|
function IsNum2(val)
|
||
|
{
|
||
|
var re = /^[0-9]*[1-9][0-9]*$/;
|
||
|
if (!re.test(val))
|
||
|
{
|
||
|
return false;
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
function newGuid()
|
||
|
{
|
||
|
var guid = "";
|
||
|
for (var i = 1; i <= 32; i++)
|
||
|
{
|
||
|
var n = Math.floor(Math.random()*16.0).toString(16);
|
||
|
guid += n;
|
||
|
if((i==8)||(i==12)||(i==16)||(i==20))
|
||
|
guid += "-";
|
||
|
}
|
||
|
return guid.toUpperCase();
|
||
|
}
|
||
|
//回车键控制
|
||
|
document.onkeypress=function()
|
||
|
{
|
||
|
if(event.keyCode==13)
|
||
|
{
|
||
|
if(event.srcElement.tagName== 'TEXTAREA')
|
||
|
{
|
||
|
return true;
|
||
|
}
|
||
|
//window.event.keyCode=9;
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
function imgDelChangePic()
|
||
|
{
|
||
|
var pic1=document.getElementById("imgDel");
|
||
|
var start=pic1.src.lastIndexOf("/");
|
||
|
var str=pic1.src.substring(start+1);
|
||
|
if(str=="remove.gif")
|
||
|
{
|
||
|
pic1.src="../images/delete.gif";
|
||
|
//pic1.alt="我是B图片";
|
||
|
}
|
||
|
else if(str=="delete.gif")
|
||
|
{
|
||
|
pic1.src="../images/icons/remove.gif";
|
||
|
//pic1.alt="我是A图片";
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
<!--蒙板-->
|
||
|
<script type="text/javascript">
|
||
|
function dialog() {
|
||
|
this.width = 450;
|
||
|
this.height = 360;
|
||
|
this.title_height = 20;
|
||
|
this.html = '';
|
||
|
this.title = '';
|
||
|
var self = this;
|
||
|
var bgObj, msgObj, titleObj;
|
||
|
this.close = function () {
|
||
|
document.body.removeChild(document.getElementById("bgDiv"));
|
||
|
document.getElementById("msgDiv").removeChild(document.getElementById("msgTitle"));
|
||
|
document.body.removeChild(document.getElementById("msgDiv"));
|
||
|
}
|
||
|
|
||
|
this.show = function () {
|
||
|
var msgw, msgh, bordercolor;
|
||
|
msgw = self.width;
|
||
|
msgh = self.height;
|
||
|
bordercolor = "#336699";
|
||
|
titlecolor = "#99CCFF";
|
||
|
|
||
|
var sWidth, sHeight;
|
||
|
sWidth = document.body.offsetWidth;
|
||
|
sHeight = screen.height;
|
||
|
bgObj = document.createElement("div");
|
||
|
bgObj.setAttribute('id', 'bgDiv');
|
||
|
bgObj.style.position = "absolute";
|
||
|
bgObj.style.top = "0";
|
||
|
bgObj.style.background = "#777";
|
||
|
bgObj.style.filter = "progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75";
|
||
|
bgObj.style.opacity = "0.6";
|
||
|
bgObj.style.left = "0";
|
||
|
bgObj.style.width = sWidth + "px";
|
||
|
bgObj.style.height = sHeight + "px";
|
||
|
bgObj.style.zIndex = "10000";
|
||
|
document.body.appendChild(bgObj);
|
||
|
|
||
|
msgObj = document.createElement("div")
|
||
|
msgObj.setAttribute("id", "msgDiv");
|
||
|
msgObj.setAttribute("align", "center");
|
||
|
msgObj.style.background = "white";
|
||
|
msgObj.style.border = "1px solid " + bordercolor;
|
||
|
msgObj.style.position = "absolute";
|
||
|
msgObj.style.left = "50%";
|
||
|
msgObj.style.top = "30%";
|
||
|
msgObj.style.font = "12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif";
|
||
|
msgObj.style.marginLeft = "-225px";
|
||
|
msgObj.style.marginTop = -75 + document.documentElement.scrollTop + "px";
|
||
|
msgObj.style.width = msgw + "px";
|
||
|
msgObj.style.height = msgh + "px";
|
||
|
msgObj.style.textAlign = "center";
|
||
|
msgObj.style.lineHeight = "25px";
|
||
|
msgObj.style.zIndex = "10001";
|
||
|
|
||
|
titleObj = document.createElement("h4");
|
||
|
titleObj.setAttribute("id", "msgTitle");
|
||
|
titleObj.setAttribute("align", "center");
|
||
|
titleObj.style.margin = "0";
|
||
|
titleObj.style.padding = "3px";
|
||
|
titleObj.style.background = bordercolor;
|
||
|
titleObj.style.filter = "progid:DXImageTransform.Microsoft.Alpha(startX=20, startY=20, finishX=100, finishY=100,style=1,opacity=75,finishOpacity=100);";
|
||
|
titleObj.style.opacity = "0.75";
|
||
|
titleObj.style.border = "1px solid " + bordercolor;
|
||
|
titleObj.style.height = self.title_height + "px";
|
||
|
titleObj.style.font = "12px Verdana, Geneva, Arial, Helvetica, sans-serif";
|
||
|
titleObj.style.color = "white";
|
||
|
titleObj.style.cursor = "pointer";
|
||
|
titleObj.innerHTML = self.title;
|
||
|
//titleObj.onclick=function(){self.close();}
|
||
|
document.body.appendChild(msgObj);
|
||
|
document.getElementById("msgDiv").appendChild(titleObj);
|
||
|
var txt = document.createElement("div");
|
||
|
txt.style.margin = "1em 0"
|
||
|
txt.setAttribute("id", "msgTxt");
|
||
|
txt.innerHTML = self.html;
|
||
|
document.getElementById("msgDiv").appendChild(txt);
|
||
|
}
|
||
|
}
|
||
|
function msgBox() {
|
||
|
var dg = new dialog();
|
||
|
dg.html = "程序正在提交,请稍等!";
|
||
|
//dg.html+="<input type=button onclick='new dialog().close();' value='确定'>";
|
||
|
dg.width = 200;
|
||
|
dg.height = 100;
|
||
|
dg.title = "标题";
|
||
|
dg.show();
|
||
|
}
|
||
|
</script>
|
||
|
<!--背景条-->
|
||
|
<style type="text/css">
|
||
|
.btn-content0{
|
||
|
width:100%;
|
||
|
height:30px;
|
||
|
background:url("../images/content-header.gif");
|
||
|
cursor:default;
|
||
|
}
|
||
|
.style1
|
||
|
{
|
||
|
width: 80px;
|
||
|
font-size:12px;
|
||
|
}
|
||
|
</style>
|
||
|
<style type="text/css">
|
||
|
*{ margin:0; padding:0;}
|
||
|
html,body{ width:100%; height:100%; overflow:hidden;}
|
||
|
.container{ position:relative; width:100%; height:100%; overflow-y:scroll; overflow-x:auto;}
|
||
|
.topcss{ width:100%; position:absolute; top:0; left:0;}
|
||
|
.boxcss{ height:500px;}
|
||
|
.btncss
|
||
|
{
|
||
|
width:100px;
|
||
|
BORDER-RIGHT: #2C59AA 1px solid;
|
||
|
PADDING-RIGHT: 2px; BORDER-TOP: #2C59AA 1px solid;
|
||
|
PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ffffff, EndColorStr=#C3DAF5);
|
||
|
BORDER-LEFT: #2C59AA 1px solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px;
|
||
|
BORDER-BOTTOM: #2C59AA 1px solid;
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body onload="initComboCUSTOMERNAME2();" style="background-color: #ECF2FF">
|
||
|
<form id="form1" runat="server" style="background-color: #ECF2FF">
|
||
|
<div>
|
||
|
<p class="topcss">
|
||
|
<div style="width:100%;vertical-align:text-bottom;" class="btn-content0">
|
||
|
<div class="btn-blank"></div>
|
||
|
<div class="xbtn" style="width:110px; height:20px;">
|
||
|
<input id="btRepeat" runat="server" type="button" value="合并客户" onclick="setRepeat();" style="width:100px; height:20px;" class="btncss"/>
|
||
|
</div>
|
||
|
</div>
|
||
|
</p>
|
||
|
<!-- 内容开始 -->
|
||
|
<div class="TabContent" style="background-color: #ECF2FF">
|
||
|
<table width=700px style="background-color: #ECF2FF">
|
||
|
<tr>
|
||
|
<td colspan=10 style="font-weight: bold" class="cssfont">原基本信息</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td colspan=10 align="center" height="10"><hr color="#96B3DD" /></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td width=10px></td>
|
||
|
<td class="style1"><asp:Label ID="Label2" runat="server" Text="客户代码"></asp:Label></td>
|
||
|
<td>
|
||
|
<asp:Label ID="tbCODENAME" runat="server" CssClass="txtTab" MaxLength="20" BackColor="White" Height="18px"></asp:Label>
|
||
|
</td>
|
||
|
<td width=10px></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td width=10px></td>
|
||
|
<td class="style1"><asp:Label ID="Label3" runat="server" Text="客户简称"></asp:Label></td>
|
||
|
<td>
|
||
|
<asp:Label ID="tbSHORTNAME" runat="server" CssClass="txtTab" MaxLength="20" BackColor="White" Height="18px"></asp:Label>
|
||
|
</td>
|
||
|
<td width=10px></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td width=10px></td>
|
||
|
<td class="style1"><asp:Label ID="Label1" runat="server" Text="客户全称"></asp:Label></td>
|
||
|
<td>
|
||
|
<asp:Label ID="tbDESCRIPTION" runat="server" CssClass="txtTab" MaxLength="50" BackColor="White" Height="18px"></asp:Label>
|
||
|
</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
<tr><td></td></tr>
|
||
|
<tr>
|
||
|
<td colspan=2 style="font-weight: bold" class="cssfont">替换为</td>
|
||
|
<td>
|
||
|
<select id="ddlCUSTOMERNAME" runat=server style="width:280px;Height:18px;" class="txtTab"></select>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td colspan=10 align="center" height="10"><hr color="#96B3DD" /></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td width=10px></td>
|
||
|
<td class="style1"><asp:Label ID="Label4" runat="server" Text="客户代码"></asp:Label></td>
|
||
|
<td>
|
||
|
<asp:Label ID="lbCODENAME" runat="server" CssClass="txtTab" BackColor="White" Height="18px"></asp:Label>
|
||
|
</td>
|
||
|
<td width=10px></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td width=10px></td>
|
||
|
<td class="style1"><asp:Label ID="Label5" runat="server" Text="客户简称"></asp:Label></td>
|
||
|
<td>
|
||
|
<asp:Label ID="lbSHORTNAME" runat="server" CssClass="txtTab" BackColor="White" Height="18px"></asp:Label>
|
||
|
</td>
|
||
|
<td width=10px></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td width=10px></td>
|
||
|
<td class="style1"><asp:Label ID="Label6" runat="server" Text="客户全称"></asp:Label></td>
|
||
|
<td>
|
||
|
<asp:Label ID="lbDESCRIPTION" runat="server" CssClass="txtTab" BackColor="White" Height="18px"></asp:Label>
|
||
|
</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!-- 选项卡结束 -->
|
||
|
<div>
|
||
|
<input type="hidden" id="hdGid" runat="server"/>
|
||
|
<input type="hidden" id="hdyCODENAME" runat="server"/>
|
||
|
<input type="hidden" id="hdySHORTNAME" runat="server"/>
|
||
|
<input type="hidden" id="hdyDESCRIPTION" runat="server"/>
|
||
|
<input type="hidden" id="hdUserID" runat="server"/>
|
||
|
<input type="hidden" id="hd_comboCUSTOMERNAME" runat="server"/>
|
||
|
<input type="hidden" id="hdClientID" runat="server"/>
|
||
|
<input type="hidden" id="hdCODENAME" runat="server"/>
|
||
|
<input type="hidden" id="hdSHORTNAME" runat="server"/>
|
||
|
<input type="hidden" id="hdDESCRIPTION" runat="server"/>
|
||
|
|
||
|
<asp:Button ID="btnEnter" runat="server" Text="Button" onclick="btnEnter_Click" style="display:none;" />
|
||
|
</div>
|
||
|
|
||
|
<div style="height:200px"></div>
|
||
|
</form>
|
||
|
</body>
|
||
|
</html>
|