<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="kaipiaoKehu.aspx.cs" Inherits="CY.WebForm.Pages.business.kaipiaoKehu" %>
|
|
<!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 runat="server">
|
<uc:CMSHead ID="CMSHead1" runat="server" />
|
</head>
|
<body style="padding:10px">
|
<form runat="server">
|
<table class="tableStyle" >
|
<tr>
|
<td class="ali03 w100px">客户名称:</td>
|
<td><select id='selCustormer' runat="server" keepdefaultstyle='true' datavaluefield='MemberId' datatextfield='CompanyName' onchange='custormerChange(this)' class='Sreq' selinputhtml="True" sign="" style=" width:123px;"></select></td>
|
</tr>
|
|
|
<tr>
|
<td class="ali03">开票金额:</td>
|
<td> <input id='txtkpmoney' runat="server" maxlength='18' onblur="validateAmount(event)" placeholder="请输入开票金额" /></td>
|
</tr>
|
|
|
<tr>
|
<td colspan="2"></td>
|
</tr>
|
<tr id="trbtn" runat="server">
|
<td class="ali02" colspan="2">
|
<asp:Button ID="btn_Submit" Text="提交申请" runat="server" OnClick="btn_Submit_form" />
|
<span style="margin-left:10px"></span>
|
<input type="button" value="取消 " onclick="top.Dialog.close()" />
|
</td>
|
</tr>
|
</table>
|
</form>
|
</body>
|
<script type="text/javascript" language="javascript">
|
function validateAmount(event) {
|
var input = event.target;
|
var value = input.value;
|
var regex = /^[0-9]+(\.[0-9]{1,2})?$/;
|
|
if (!regex.test(value)) {
|
// 输入无效,重置值并将焦点设回文本框
|
input.value = '0';
|
input.focus();
|
alert('请输入有效的金额,例如 123 或 45.67');
|
}
|
}
|
|
//为Select新增过滤功能
|
function SelectAddSearch() {
|
$("select[SelInputHtml='True']").each(function (i, v) {
|
$(this).unbind("blur");
|
var old = $(this).html();
|
var oldObject = $(this).clone();
|
var sign = "selectS" + i;
|
$(v).attr("sign", sign);
|
|
var inputClass = "input_" + sign;
|
var html = "<span style='margin-left:10px'>过滤:</span><input type='text' class='" + inputClass + "' style='width:80px;height:18px;line-height:18px;'/><span onclick='showCustomer()' style=\"padding-left:10px;\" class=\"a_under\">新增客户</span>";
|
$(v).after(html);
|
$("." + inputClass).blur(function () {
|
var nowval = $(this).val().trim();
|
var output = "";
|
if (nowval == "" || nowval == null) {
|
output = old;
|
} else {
|
output += "<option value=''>请选择</option>";
|
var valueArr = new Array();
|
oldObject.find("option").each(function (ii, vv) {
|
|
var value = $.trim($(vv).attr("value"));
|
var text = $.trim($(vv).text());
|
|
if (text.indexOf(nowval) >= 0)
|
valueArr.push(value + "|||" + text);
|
});
|
for (var ss in valueArr) {
|
var s = valueArr[ss];
|
if (s.split("|||").length == 2) {
|
var value1 = s.split("|||")[0];
|
var text1 = s.split("|||")[1];
|
output += "<option value='" + value1 + "'>" + text1 + "</option>";
|
}
|
}
|
}
|
$(v).html(output);
|
});
|
});
|
}
|
|
///新增客户
|
function showCustomer() {
|
top.Dialog.open({ URL: "/Pages/business/CorporateClientsEdit.aspx?src=order", Title: "新增客户", Width: 1200, Height: 780 });
|
}
|
|
$(function () {
|
SelectAddSearch();
|
});
|
</script>
|
</html>
|