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.

583 lines
28 KiB
Plaintext

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CodeFeeSetInfo.aspx.cs" Inherits="DSWeb.ParameterSet.CodeFeeSetInfo" %>
<!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 href="../theme/tab.css" type="text/css" rel="stylesheet" />
<link rel="STYLESHEET" type="text/css" href="../theme/page.css"/>
<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/style.css" type="text/css" rel="Stylesheet" media="screen"/>
<link href="../theme/dhtmlxcombo.css" type="text/css" rel="Stylesheet" media="screen"/>
<script type="text/javascript" src="../js/dhtmlxcommon.js"></script>
<script type="text/javascript" src="../js/dhtmlxcombo.js"></script>
<script type="text/javascript" src="../js/dhtmlxcombo_whp.js"></script>
<script type="text/javascript">
window.dhx_globalImgPath="../images/";
</script>
<script type="text/javascript">
var comboDEFAULTCURR; //货币
var comboFEEGROUP;
function $(id)
{
return document.getElementById(id);
}
//两端去空格函数
String.prototype.trim = function () { return this.replace(/(^\s*)|(\s*$)/g, ""); }
function initComboDEFAULTCURR()//货币
{
comboDEFAULTCURR = dhtmlXComboFromSelect("ddlDEFAULTCURR");
comboDEFAULTCURR.loadXML("../FeeCodes/CURRENCYAdapter.aspx?mask=0&pos=0");
}
function initComboFEEGROUP()//费用分组
{
comboFEEGROUP = dhtmlXComboFromSelect("ddlFEEGROUP");
comboFEEGROUP.loadXML("../FeeCodes/FEEGROUPAdapter.aspx?mask=0&pos=0");
}
function initComboDEFAULTCURR2()//货币
{
if($("hdEnter").value!="")
{
//initComboDEFAULTCURR();
}
comboDEFAULTCURR.attachEvent("onChange", function()
{
comboDEFAULTCURR.setComboText($("hd_comboDEFAULTCURR").value);
});
comboDEFAULTCURR.setComboText($("hd_comboDEFAULTCURR").value);
comboDEFAULTCURR.attachEvent("onKeyPressed", function(keyCode)
{
if(keyCode!="8")
{
var arrayArg = new Array();
setTimeout(function()
{
var filterCount = 0;
var is = -1;
var ishd = $("hd_comboDEFAULTCURR").value;
if("" != comboDEFAULTCURR.getComboText())
{
while("undefined" != typeof comboDEFAULTCURR.getOptionByIndex(filterCount))
{
var comboValue = comboDEFAULTCURR.getOptionByIndex(filterCount).text.toUpperCase();//.value;
var enterValue = comboDEFAULTCURR.getComboText().toUpperCase();
$("hd_comboDEFAULTCURR").value = comboDEFAULTCURR.getComboText().toUpperCase();
if(comboValue.indexOf(enterValue) == 0)
{
comboDEFAULTCURR.selectOption(filterCount,true,true);
is=filterCount;
break;
}
++filterCount;
}
if(is==-1)
{
$("hd_comboDEFAULTCURR").value = ishd;
alert("无此内容,请重新选择!");
}
}
},10);
}
});
comboDEFAULTCURR.attachEvent("onSelectionChange", function()
{
$("hd_comboDEFAULTCURR").value = comboDEFAULTCURR.getComboText();
});
}
function initComboFEEGROUP2()//费用分组
{
if ($("hdEnter").value != "") {
initComboFEEGROUP();
}
comboFEEGROUP.attachEvent("onChange", function () {
comboFEEGROUP.setComboText($("hd_comboFEEGROUP").value);
});
comboFEEGROUP.attachEvent("onBlur", function () {
var s1 = comboFEEGROUP.getComboText();
var s2 = s1.indexOf("|");
if (s1 == "") {
$("hd_comboFEEGROUP").value = "";
comboFEEGROUP.setComboText($("hd_comboFEEGROUP").value);
}
else {
if (s2 > 0) {
s2 = s2 + 2;
}
var s3 = s1.substring(s2);
if (s2 > 0) {
comboFEEGROUP.setComboText(s3);
$("hd_comboFEEGROUP").value = s3;
}
else {
comboFEEGROUP.setComboText($("hd_comboFEEGROUP").value);
}
}
});
comboFEEGROUP.setComboText($("hd_comboFEEGROUP").value);
comboFEEGROUP.attachEvent("onKeyPressed", function (keyCode) {
if (keyCode != "8") {
var arrayArg = new Array();
setTimeout(function () {
var filterCount = 0;
var is = -1;
var ishd = $("hd_comboFEEGROUP").value;
if ("" != comboDEFAULTCURR.getComboText()) {
while ("undefined" != typeof comboFEEGROUP.getOptionByIndex(filterCount)) {
var comboValue = comboFEEGROUP.getOptionByIndex(filterCount).text.toUpperCase(); //.value;
var enterValue = comboFEEGROUP.getComboText().toUpperCase();
$("hd_comboFEEGROUP").value = comboFEEGROUP.getComboText().toUpperCase();
if (comboValue.indexOf(enterValue) == 0) {
comboFEEGROUP.selectOption(filterCount, true, true);
is = filterCount;
break;
}
++filterCount;
}
if (is == -1) {
$("hd_comboFEEGROUP").value = ishd;
alert("无此内容,请重新选择!");
}
}
}, 10);
}
});
comboFEEGROUP.attachEvent("onSelectionChange", function () {
$("hd_comboFEEGROUP").value = comboFEEGROUP.getComboText();
});
}
</script>
<!--页面重新加载-->
<link rel="STYLESHEET" type="text/css" href="../theme/button/default/Fee.css"/>
<script type="text/javascript">
function reloadParent(strBSNO, strHandle) {
//alert("strBSNO="+strBSNO);
var parentObj = window.parent.location;
var oldUrl = parentObj.href;
var idIndex = oldUrl.indexOf("&id"); //alert(oldUrl);
//
var newUrl = "";
if (strHandle == "edit") {
////newUrl = oldUrl.substring(0,idIndex+4);//alert(oldUrl.substring(0,idIndex));
//window.parent.opener.location.href = window.parent.opener.location.href;
////parentObj.href = newUrl+strBSNO;
}
else if (strHandle == "del") {
newUrl = oldUrl.substring(0, idIndex + 4); //alert(oldUrl.substring(0,idIndex));
window.parent.opener.location.href = window.parent.opener.location.href;
parentObj.href = newUrl + strBSNO;
}
else if (strHandle == "add") {
var handleIndex = oldUrl.indexOf("handle="); //alert(handleIndex);
newUrl = oldUrl.substring(0, handleIndex);
window.parent.opener.location.href = window.parent.opener.location.href;
parentObj.href = newUrl + "handle=edit&id=" + strBSNO;
}
//
alert("操作成功!");
}
</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();
}
function setEnter()
{
/*
var loader;
var strFEECODE;
var strNAME;
if($("hdHandleType").value=="edit")
{
loader = dhtmlxAjax.getSync("../FeeCodes/CodeFeeSetInfoAdapter.aspx?GID="+$("hdGid").value+"&strFEECODE="+escape($("tbFEECODE").value)+"&val="+newGuid());
loader = strBL.xmlDoc.responseText;
if(loader!="")
{
var arrtmp=loader.split("&&");//将各参数分离形成参数数组
if(arrtmp.length>0)
{
strFEECODE = arrtmp[0];
strNAME = arrtmp[1];
}
}
//
if(strFEECODE!=$("tbFEECODE").value)
{
if(!confirm('此费用已启用,是否覆盖?'))
{
return;
}
}
//
if(strNAME!=$("tbNAME").value)
{
if(!confirm('此费用已启用,是否覆盖?'))
{
return;
}
}
}
*/
//
var sd = $("ddlFEETYPE").value.trim();
if ($("ddlFEETYPE").value.trim() == '') {
alert("费用类型为必选项,不允许为空!");
return;
}
//
$("hdEnter").value="0";
msgBox();
setTimeout(postEnterOpStatusList,200);
}
//post数据
function postEnterOpStatusList()
{
var myForm = document.getElementById("form1");
myForm.submit() ;
}
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 ShowDetailDel()
{
if(confirm('确定删除吗?'))
{
var loaderX = dhtmlxAjax.getSync("../FeeCodes/FeeCodeService.aspx?val="+newGuid()+"&isbeing="+$("hdGid").value);
var altX = loaderX.xmlDoc.responseText;
if(altX=="")
{
document.getElementById("ibDel").click();
}
else
{
alert(altX);
return;
}
}
}
function isShowCodeName()
{
var loaderX = dhtmlxAjax.getSync("../FeeCodes/FeeCodeService.aspx?val="+newGuid()+"&isbeing="+$("hdGid").value);
var altX = loaderX.xmlDoc.responseText;
if(altX=="")
{
// $("tbNAME").value = $("hdNAME").value;
// document.getElementById('tbNAME').disabled = "";
}
else
{
$("tbNAME").value = $("hdNAME").value;
document.getElementById('tbNAME').disabled = "disabled";
}
}
function setOnBlurNAME()
{
$("hdNAME").value = $("tbNAME").value;
}
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>
<!--背景条-->
<style type="text/css">
.btn-content0{
width:100%;
height:30px;
background:url("../images/content-header.gif");
cursor:default;
}
</style>
</head>
<body style="background-color: #ECF2FF" onload="initComboDEFAULTCURR2();initComboFEEGROUP2();isShowCodeName();">
<form id="form1" runat="server" style="background-color: #ECF2FF">
<div>
<div style="width:100%;vertical-align:text-bottom;" class="btn-content0">
<div class="btn-blank"></div>
<div class="xbtn-img">
<div class="btnimg"><asp:ImageButton ID="ibAdd" runat="server" onclick="ibAdd_Click" ToolTip="添加" ImageUrl="~/images/icons/btnAdd.gif"/></div>
</div>
<div id="divibEnter" class="xbtn-img" runat=server onclick="setEnter();">
<div class="btnimg"><img src="../images/icons/save.gif" width="16px" title="保存" class="cssfont"/></div>
</div>
<div class="xbtn-img">
<img id="imgDel" src="../images/icons/remove.gif" onclick="ShowDetailDel();" class="btnimg" alt="删除" onmouseover="imgDelChangePic();" onMouseOut="imgDelChangePic();"/>
</div>
</div>
<div id="myTab0_Content0" style="float:left; width:780px;background-color: #ECF2FF">
<table width=780px>
<tr>
<td width="100px" valign=top>
<asp:Label ID="Label6" runat="server" Text="费用代码" width="100px" CssClass="cssfont"></asp:Label>
</td>
<td width="100px" valign=top>
<asp:TextBox ID="tbFEECODE" runat="server" CssClass="txtTab2" MaxLength=10 onKeyUp="value=value.replace(/[^a-zA-Z0-9]/g,'')" onMouseOver="value=value.replace(/[^a-zA-Z0-9]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^a-zA-Z0-9]/g,''))"></asp:TextBox>
</td>
<td width="10px"></td>
<td width="100px" valign=top>
<asp:Label ID="Label7" runat="server" Text="费用名称" width="100px" CssClass="cssfont"></asp:Label>
</td>
<td width="100px" valign=top>
<asp:TextBox ID="tbNAME" runat="server" CssClass="txtTab2" MaxLength=20 onblur="setOnBlurNAME();"></asp:TextBox>
</td>
<td width="10px"></td>
<td width="100px" valign=top>
<asp:Label ID="Label8" runat="server" Text="费用英文名称" width="100px" CssClass="cssfont"></asp:Label>
</td>
<td width="100px" valign=top>
<asp:TextBox ID="tbDESCRIPTION" runat="server" CssClass="txtTab2" MaxLength=30></asp:TextBox>
</td>
</tr>
<tr>
<td width="100px">
<asp:Label ID="Label2" runat="server" Text="费用类型" width="100px" CssClass="cssfont"></asp:Label>
</td>
<td width="100px">
<asp:DropDownList ID="ddlFEETYPE" runat="server" CssClass="txtTab6" Width=112px Height=18px>
</asp:DropDownList>
</td>
<td width="10px"></td>
<td width="100px">
<asp:Label ID="Label1" runat="server" Text="默认货币" width="100px" CssClass="cssfont"></asp:Label>
</td>
<td width="100px">
<select id="ddlDEFAULTCURR" runat=server style="width:112px;Height:18px;" CssClass="txtTab6"></select>
</td>
<td width="10px"></td>
<td width="100px">
<asp:Label ID="Label9" runat="server" Text="默认计费标准" width="100px" CssClass="cssfont"></asp:Label>
</td>
<td width="100px">
<asp:DropDownList ID="ddlDEFAULTUNIT" runat="server" CssClass="txtTab6" Width=112px Height=22px>
<asp:ListItem Value=""></asp:ListItem>
<asp:ListItem Value="1">单票</asp:ListItem>
<asp:ListItem Value="2">重量</asp:ListItem>
<asp:ListItem Value="3">尺码</asp:ListItem>
<asp:ListItem Value="5">TEU</asp:ListItem>
<asp:ListItem Value="9">箱型</asp:ListItem>
<asp:ListItem Value="10">CBM</asp:ListItem>
<asp:ListItem Value="11">BILL</asp:ListItem>
<asp:ListItem Value="12">车</asp:ListItem>
</asp:DropDownList>
<!--<asp:ListItem Value="6">净重</asp:ListItem>-->
<!--<asp:ListItem Value="4">计费吨</asp:ListItem>-->
<!--<asp:ListItem Value="7">总价</asp:ListItem>-->
<!--<asp:ListItem Value="8">计价重量</asp:ListItem>-->
</td>
</tr>
<tr>
<td width="100px">
<asp:Label ID="Label10" runat="server" Text="默认收费客户类型" width="100px" CssClass="cssfont"></asp:Label>
</td>
<td width="100px">
<asp:DropDownList ID="ddlDEFAULTDEBIT" runat="server" CssClass="txtTab6" Width=112px Height=22px>
<asp:ListItem Value=""></asp:ListItem>
<asp:ListItem Value="1">船公司</asp:ListItem>
<asp:ListItem Value="2">订舱代理</asp:ListItem>
<asp:ListItem Value="3">场站</asp:ListItem>
<asp:ListItem Value="4">车队</asp:ListItem>
<asp:ListItem Value="5">委托单位</asp:ListItem>
<asp:ListItem Value="6">报关行</asp:ListItem>
<asp:ListItem Value="7">代理</asp:ListItem>
<asp:ListItem Value="8">航空公司</asp:ListItem>
<asp:ListItem Value="9">发货人</asp:ListItem>
<asp:ListItem Value="10">收货人</asp:ListItem>
<asp:ListItem Value="11">通知人</asp:ListItem>
<asp:ListItem Value="12">船代</asp:ListItem>
<asp:ListItem Value="13">码头</asp:ListItem>
</asp:DropDownList>
</td>
<td width="10px"></td>
<td width="100px">
<asp:Label ID="Label11" runat="server" Text="默认付费客户类型" width="100px" CssClass="cssfont"></asp:Label>
</td>
<td width="100px">
<asp:DropDownList ID="ddlDEFAULTCREDIT" runat="server" CssClass="txtTab6" Width=112px Height=22px>
<asp:ListItem Value=""></asp:ListItem>
<asp:ListItem Value="1">船公司</asp:ListItem>
<asp:ListItem Value="2">订舱代理</asp:ListItem>
<asp:ListItem Value="3">场站</asp:ListItem>
<asp:ListItem Value="4">车队</asp:ListItem>
<asp:ListItem Value="5">委托单位</asp:ListItem>
<asp:ListItem Value="6">报关行</asp:ListItem>
<asp:ListItem Value="7">代理</asp:ListItem>
<asp:ListItem Value="8">航空公司</asp:ListItem>
<asp:ListItem Value="9">发货人</asp:ListItem>
<asp:ListItem Value="10">收货人</asp:ListItem>
<asp:ListItem Value="11">通知人</asp:ListItem>
<asp:ListItem Value="12">船代</asp:ListItem>
<asp:ListItem Value="13">码头</asp:ListItem>
</asp:DropDownList>
</td>
<td width="10px"></td>
<td width="100px">
<asp:Label ID="Label3" runat="server" Text="费用分组" width="100px" CssClass="cssfont"></asp:Label>
</td>
<td width="100px">
<select id="ddlFEEGROUP" runat=server style="width:112px;Height:18px;" CssClass="txtTab6"></select>
</td>
</tr>
<tr>
<td width="100px">
<asp:CheckBox ID="cbISSEA" runat="server" Text="是否海运" />
</td>
<td width="100px">
<asp:CheckBox ID="cbISAIR" runat="server" Text="是否空运" />
</td>
<td width="10px"></td>
<td width="100px">
<asp:CheckBox ID="cbISTRUCKING" runat="server" Text="是否陆运" />
</td>
<td width="120px">
<asp:CheckBox ID="cbISTRUCKINGFIXED" runat="server" Text="是否陆运固定费用" />
</td>
<td width="10px"></td>
<td width="100px">
<asp:CheckBox ID="cbISWMS" runat="server" Text="是否仓储费用" />
</td>
</tr>
</table>
</div>
</div>
<!-- 选项卡结束 -->
<div>
<input type="hidden" id="hdGid" runat="server"/>
<input type="hidden" id="hdHandleType" runat="server"/>
<input type="hidden" id="hdEnter" runat="server"/>
<input type="hidden" id="hdNAME" runat="server"/>
<input type="hidden" id="hd_comboDEFAULTCURR" runat="server"/>
<input type="hidden" id="hd_comboFEEGROUP" runat="server"/>
<asp:ImageButton ID="ibEnter" runat="server" ToolTip="保存" ImageUrl="~/images/icons/save.gif" style="display:none;"/>
<asp:ImageButton ID="ibDel" runat="server" onclick="ibDel_Click" ToolTip="删除" ImageUrl="../images/icons/remove.gif" OnClientClick="return confirm('确定删除吗?')" style="display:none;"/>
</div>
<div style="height:200px; width:100%;"></div>
</form>
</body>
</html>