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.

209 lines
8.9 KiB
Plaintext

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CwVouchersAddingDo.aspx.cs" Inherits="DSWeb.CW.CwVouchersAddingDo" %>
<!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" />
<script src="../js/m97date/wdatepicker.js" type="text/javascript"></script>
<!--自定义下拉框-->
<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 comboPREPARED;
//两端去空格函数
String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); }
function $(id) {
return document.getElementById(id);
}
function initcomboPREPARED()//
{
var strUserID = document.getElementById("" + '<%= hdUserID.ClientID %>' + "").value;
comboPREPARED = dhtmlXComboFromSelect("ddlPREPARED");
comboPREPARED.loadXML("../FeeCodes/OPAdapter.aspx?mask=0&pos=0&rName=isSaleMan&userID=" + strUserID);
}
function initcomboPREPARED2()//
{
comboPREPARED.attachEvent("onChange", function() {
comboPREPARED.setComboText($("hd_comboPREPARED").value);
});
comboPREPARED.attachEvent("onBlur", function() {
var s1 = comboPREPARED.getComboText().trim();
var s2 = s1.indexOf("|");
if (s1 == "") {
$("hd_comboPREPARED").value = "";
comboPREPARED.setComboText($("hd_comboPREPARED").value);
}
else {
if (s2 > 0) {
s2 = s2 + 2;
}
var s3 = s1.substring(s2);
if (s2 > 0) {
comboPREPARED.setComboText(s3);
$("hd_comboPREPARED").value = s3;
}
else {
comboPREPARED.setComboText($("hd_comboPREPARED").value);
}
}
});
comboPREPARED.setComboText($("hd_comboPREPARED").value);
comboPREPARED.attachEvent("onKeyPressed", function(keyCode) {
if (keyCode != "8") {
var arrayArg = new Array();
setTimeout(function() {
var filterCount = 0;
var is = -1;
var ishd = $("hd_comboPREPARED").value.trim();
if ("" != comboPREPARED.getComboText().trim()) {
while ("undefined" != typeof comboPREPARED.getOptionByIndex(filterCount)) {
var comboValue = comboPREPARED.getOptionByIndex(filterCount).text.toUpperCase(); //.value;
var enterValue = comboPREPARED.getComboText().trim().toUpperCase();
$("hd_comboPREPARED").value = comboPREPARED.getComboText().trim().toUpperCase();
if (comboValue.indexOf(enterValue) == 0) {
comboPREPARED.selectOption(filterCount, true, true);
is = filterCount;
break;
}
++filterCount;
}
if (is == -1) {
$("hd_comboPREPARED").value = ishd;
alert("无此内容,请重新选择!");
}
}
}, 10);
}
});
comboPREPARED.attachEvent("onSelectionChange", function() {
$("hd_comboPREPARED").value = comboPREPARED.getComboText().trim();
});
}
//是否为数字,且数值格式是否正确
function IsNumFormat(val) {
var re = /^[-\+]?\d+(\.\d+)?$/;
if (!re.test(val)) {
return false;
}
else {
if (val.toString().indexOf(".") > 0) {
val.toString().replace("-", "");
val.toString().replace("+", "");
if (val.toString().substr(0, 1) == "0" && val.toString().substr(0, 2) != "0.") {
return false;
}
}
else {
var re1 = /^[-\+]+[1-9]+[0-9]*]*$/;
if (!re1.test(val)) {
re1 = /^[1-9]+[0-9]*]*$/;
if (!re1.test(val)) {
return false;
}
}
}
return true;
}
}
//
function getIsNum(x) {
var str = x.value.trim();
if (str == "0") {
return;
}
else if (str == "") {
str = 0;
x.value = 0;
}
else {
var bl = IsNumFormat(str);
if (!bl) {
alert("数值格式错误!");
x.focus();
x.select();
}
}
}
</script>
<style type="text/css">
.btncss
{
height:20px;
width:60px;
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 style="background-color: #ECF2FF;" onload="initcomboPREPARED2();">
<form id="form1" runat="server" style="background-color: #ECF2FF;">
<div>
<table>
<tr>
<td width=10px height=30px></td>
<td>
<asp:Label ID="Label2" runat="server" Text="制单人" CssClass="cssfont" Width="100px"></asp:Label>
</td>
<td colspan=2>
<select id="ddlPREPARED" name="sel_sale" runat="server" class="txtTab" style="width:204px"></select>
</td>
</tr>
<tr>
<td width=10px height=30px></td>
<td>
<asp:Label ID="Label1" runat="server" Text="记账日期" CssClass="cssfont" Width="100px"></asp:Label>
</td>
<td colspan=2>
<asp:TextBox ID="tbVOUDATE" runat="server" onclick="WdatePicker()" Width="200px" CssClass="txtTab"></asp:TextBox>
</td>
</tr>
<tr>
<td width=10px height=30px></td>
<td>
<asp:Label ID="Label3" runat="server" Text="凭证美元汇率" CssClass="cssfont" Width="100px"></asp:Label>
</td>
<td>
<asp:TextBox ID="tbRATE" runat="server" Width="80px" CssClass="txtTab" onkeypress= "if ((event.keyCode < 48 || event.keyCode > 57) && (event.keyCode != 8) && event.keyCode!=45 && event.keyCode!=46){event.returnValue=false;}" onblur="getIsNum(this);"></asp:TextBox>
</td>
<td>
<asp:CheckBox ID="cbISRATE" runat="server" Text="按照系统录入汇率" Checked=true />
</td>
</tr>
<tr>
<td width=10px height=30px></td>
<td></td>
<td colspan=2>
<asp:CheckBox ID="cbButtSettlement" runat="server" Text="对抵结算是否生成银行账款"/>
</td>
</tr>
<tr>
<td width=10px height=50px></td>
<td colspan=3 align=center height=30px>
<asp:Button ID="btnEnter" runat="server" Text="生成凭证" CssClass="btncss" onclick="btnEnter_Click"/>
</td>
</tr>
</table>
</div>
<div>
<input type="hidden" id="hdUserID" runat="server"/>
<input type="hidden" id="hd_comboPREPARED" runat="server"/>
</div>
</form>
</body>
</html>