247 lines
12 KiB
Plaintext
247 lines
12 KiB
Plaintext
|
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Customer_Form.aspx.cs" Inherits="Customer_Form" %>
|
||
|
|
||
|
<!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">
|
||
|
<title></title>
|
||
|
<script type="text/javascript"></script>
|
||
|
<link href="../Css/index.css" rel="stylesheet" type="text/css" />
|
||
|
<link href="../Css/edit.css" rel="stylesheet" type="text/css" />
|
||
|
<script src="../Js/Calendar3.js" type="text/javascript"></script>
|
||
|
<script src="../Jquery-ui/js/jquery-1.10.2.js" type="text/javascript"></script>
|
||
|
<script src="../Jquery-ui/js/jquery-ui-1.10.4.custom.js" type="text/javascript"></script>
|
||
|
<link href="../Jquery-ui/css/pepper-grinder/jquery-ui-1.10.4.custom.css" rel="stylesheet" type="text/css" />
|
||
|
<script src="../Js/commonality.js" type="text/javascript"></script>
|
||
|
<link rel="stylesheet" href="../Css/gh-buttons.css" type="text/css"/>
|
||
|
<link rel="stylesheet" href="../Css/prettify.css"/>
|
||
|
<script src="../Js/prettify.js" type="text/javascript"></script>
|
||
|
<script type="text/javascript">
|
||
|
//调用添加方法
|
||
|
function setbcbd() {
|
||
|
$("#<%=severbc.ClientID%>").click();
|
||
|
}
|
||
|
function add_khlxr() {
|
||
|
$("#lxjia").append("<tr><td width='25px' > <img src='../Images_Folder/Button/tjljh.png' onclick='jianhang(this)' width='25px' height='25px' /></td>"
|
||
|
+ " <td ><input class='inpittxt' type='text'/></td>"
|
||
|
+ " <td ><input class='inpittxt' type='text'/></td>"
|
||
|
+ "<td><input class='inpittxt' type='text'/></td>"
|
||
|
+ "<td ><input class='inpittxt' type='text'/></td></tr>");
|
||
|
}
|
||
|
var beforval="";
|
||
|
$(document).ready(function () {
|
||
|
beforval=$("#mingcheng").val();
|
||
|
$("#severbc").click(function () {
|
||
|
debugger
|
||
|
var jsonStr2 = "";
|
||
|
jsonStr2 += "[";
|
||
|
$("#lxjia tr").each(function(){
|
||
|
var lianxiren = $(this).find("td").eq(1).children().val();
|
||
|
var zhiwei = $(this).find("td").eq(2).children(0).val();
|
||
|
var shouji = $(this).find("td").eq(3).children(0).val();
|
||
|
var beizhu= $(this).find("td").eq(4).children(0).val();
|
||
|
if(lianxiren !="")
|
||
|
{
|
||
|
jsonStr2 += "{";
|
||
|
jsonStr2 += "\"lianxiren\":\"" + lianxiren + "\",";
|
||
|
jsonStr2 += "\"zhiwei\":\"" + zhiwei + "\",";
|
||
|
jsonStr2 += "\"shouji\":\"" + shouji + "\",";
|
||
|
jsonStr2 += "\"beizhu\":\"" + beizhu + "\"";
|
||
|
jsonStr2 += "},";
|
||
|
}
|
||
|
})
|
||
|
jsonStr2 = jsonStr2.substring(0, jsonStr2.length - 1);
|
||
|
jsonStr2 += "]";
|
||
|
$("#lxr").val(jsonStr2);
|
||
|
});
|
||
|
var availableTags = [
|
||
|
<%=kehumingtishi %>
|
||
|
];
|
||
|
$("#mingcheng").autocomplete({
|
||
|
source: availableTags
|
||
|
});
|
||
|
|
||
|
});
|
||
|
function pd() {
|
||
|
if ($("#mingcheng").val().replace(/(^\s*)|(\s*$)/g, "") == "") {
|
||
|
$("#z_error").text("客户名称不能为空!");
|
||
|
return false;
|
||
|
}else if($("#xyed").val()!="")
|
||
|
{
|
||
|
var xyed=$("#xyed").val();
|
||
|
var shouxinedu= parseFloat(xyed);
|
||
|
if(xyed!=shouxinedu || isNaN(shouxinedu))
|
||
|
{
|
||
|
$("#z_error").text("授信额度格式不正确!");
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
else if ($("#riqi").val().replace(/(^\s*)|(\s*$)/g, "") == "") {
|
||
|
$("#z_error").text("日期不能为空!");
|
||
|
return false;
|
||
|
}else if ($("#hangye").children().length==0) {
|
||
|
$("#z_error").text("行业不能为空!");
|
||
|
return false;
|
||
|
}else if ($("#xingzhi").children().length==0) {
|
||
|
$("#z_error").text("性质不能为空!");
|
||
|
return false;
|
||
|
}else if ($("#laiyuan").children().length==0) {
|
||
|
$("#z_error").text("来源不能为空!");
|
||
|
return false;
|
||
|
}else if ($("#leixing").children().length==0) {
|
||
|
$("#z_error").text("类型不能为空!");
|
||
|
return false;
|
||
|
}else if ($("#diqu").children().length==0) {
|
||
|
$("#z_error").text("地区不能为空!");
|
||
|
return false;
|
||
|
}else if ($("#guimo").children().length==0) {
|
||
|
$("#z_error").text("规模不能为空!");
|
||
|
return false;
|
||
|
}else{
|
||
|
$("#z_error").text("");
|
||
|
}
|
||
|
if($("#id").val()=="")
|
||
|
{
|
||
|
var fanhuicount= Customer_Form.serchmingcheng($("#mingcheng").val()).value;
|
||
|
if(fanhuicount>0)
|
||
|
{
|
||
|
$("#z_error").html("此客户名称已存在");
|
||
|
return false;
|
||
|
}else{
|
||
|
$("#z_error").html("");
|
||
|
}
|
||
|
}else{
|
||
|
if($("#mingcheng").val()!=beforval)
|
||
|
{
|
||
|
var fanhuicount= Customer_Form.serchmingcheng($("#mingcheng").val()).value;
|
||
|
if(fanhuicount>0)
|
||
|
{
|
||
|
$("#z_error").html("此客户名称已存在");
|
||
|
return false;
|
||
|
}else{
|
||
|
$("#z_error").html("");
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
</script>
|
||
|
|
||
|
<style type="text/css">
|
||
|
.auto-style5 {
|
||
|
width: 81px
|
||
|
}
|
||
|
.auto-style6 {
|
||
|
height: 45px;
|
||
|
font-size: 13px;
|
||
|
text-align: right;
|
||
|
padding-right: 5px;
|
||
|
width: 119px;
|
||
|
}
|
||
|
.auto-style7 {
|
||
|
width: 246px;
|
||
|
}
|
||
|
.auto-style10 {
|
||
|
height: 45px;
|
||
|
font-size: 13px;
|
||
|
text-align: right;
|
||
|
padding-right: 5px;
|
||
|
width: 81px;
|
||
|
}
|
||
|
.auto-style11 {
|
||
|
height: 45px;
|
||
|
font-size: 13px;
|
||
|
text-align: right;
|
||
|
padding-right: 5px;
|
||
|
width: 100px;
|
||
|
}
|
||
|
.auto-style12 {
|
||
|
height: 20px;
|
||
|
}
|
||
|
.auto-style13 {
|
||
|
height: 45px;
|
||
|
font-size: 13px;
|
||
|
text-align: right;
|
||
|
padding-right: 5px;
|
||
|
width: 93px;
|
||
|
}
|
||
|
.auto-style14 {
|
||
|
width: 214px;
|
||
|
}
|
||
|
</style>
|
||
|
|
||
|
</head>
|
||
|
<body>
|
||
|
<form id="form" runat="server">
|
||
|
<div class="rtbjdiv" >
|
||
|
<div class="add-top" >
|
||
|
<div class="add-top-dh" id="div_listdaohang"><h4>客户档案表单页   </h4> <a href="Customer_list.aspx" id="bt_fhlb" runat="server" style=" width:65px" class="button icon pin">回到列表</a></div>
|
||
|
<div class="add-top-cz" >
|
||
|
<a href="#button" id="bt_tj" onclick="setbcbd()" class="button icon log">保存</a>
|
||
|
<a href="#button" id="chongzhi" onclick="form.reset();" style=" width:60px; " class=" button icon reload">重置表单</a>
|
||
|
<a href="#button" id="fanhui" onclick="history.back();" style=" width:60px; " class="button icon arrowleft">返回上级</a>
|
||
|
<asp:label id="z_error" CssClass="error" runat="server"></asp:label>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="alert-tip">
|
||
|
<b>温馨提示:</b>
|
||
|
<p>• 信息表单中加*号红色标题框为必填项,为了可以顺利保存信息,请您注意填写红色栏目中的信息</p>
|
||
|
<p>• 填写信息表单中的客户名称时,系统将获取到已存在的相似名称。请您确认是否是相同客户后添加,已避免信息重复</p>
|
||
|
</div>
|
||
|
<div id="dd_kong" style=" overflow:auto;">
|
||
|
<table class="bule"> <tr class="tdlietou"><td><h4>客户基本信息</h4></td></tr></table>
|
||
|
<table class="tablewk">
|
||
|
<tr><td colspan="13" class="auto-style12"></td></tr>
|
||
|
<tr>
|
||
|
<td class="auto-style6"><span>客户编号</span></td><td class="auto-style14" ><asp:TextBox id="bh" runat="server" CssClass="tbinput_hx" ReadOnly Text="自动生成"></asp:TextBox></td>
|
||
|
<td class="auto-style11"><span><font>*客户名称</font></span> </td><td class="auto-style7" ><asp:TextBox id="mingcheng" runat="server" CssClass="tbinput_bt ui-autocomplete-input"></asp:TextBox></td>
|
||
|
<td class="auto-style13"><span>客户简称</span></td><td ><asp:TextBox id="khjc" runat="server" CssClass="tbinput"></asp:TextBox></td>
|
||
|
<td class="auto-style10"><span>业务员</span></td><td ><asp:TextBox id="ywy" runat="server" ReadOnly=true CssClass="tbinput"></asp:TextBox></td>
|
||
|
<td class="tdjj5">  </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="auto-style6"><span>授信额度</span></td><td class="auto-style14" ><input type="text" id="xyed" runat="server" class="tbinput" onkeyup="doubleshuru(this)" /></td>
|
||
|
<td class="auto-style11"><span>邮政编号</span></td><td class="auto-style7" ><asp:TextBox id="youbian" runat="server" CssClass="tbinput"></asp:TextBox></td>
|
||
|
<td class="auto-style13"><span>公司网站</span></td><td ><asp:TextBox id="wangzhi" runat="server" CssClass="tbinput"></asp:TextBox></td>
|
||
|
<td class="auto-style10"><span>联系电话</span></td><td ><asp:TextBox id="dianhua" runat="server" CssClass="tbinput"></asp:TextBox></td>
|
||
|
<td class="tdjj5">  </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="auto-style6"><span>传真号码</span></td><td class="auto-style14" ><asp:TextBox id="chuanzhen" runat="server" CssClass="tbinput"></asp:TextBox></td>
|
||
|
<td class="auto-style11"><span>开户行</span></td><td class="auto-style7" ><asp:TextBox id="kaihuhang" runat="server" CssClass="tbinput"></asp:TextBox></td>
|
||
|
<td class="auto-style13"><span>账号</span></td><td ><asp:TextBox id="zhanghao" runat="server" CssClass="tbinput"></asp:TextBox></td>
|
||
|
<td class="auto-style10"><span>税号</span></td><td ><asp:TextBox id="shuihao" runat="server" CssClass="tbinput"></asp:TextBox></td>
|
||
|
<td class="tdjj5">  </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="auto-style6"><span>邮件地址</span></td><td class="auto-style14" ><asp:TextBox id="youjian" runat="server" CssClass="tbinput"></asp:TextBox></td>
|
||
|
<td class="auto-style11"><span>地区</span></td><td class="auto-style7" ><asp:dropdownlist id="diqu" runat="server" CssClass="tbinput_xl"></asp:dropdownlist></td>
|
||
|
<td class="auto-style13"><span>日期</span></td><td ><input name='control_date' type='text' id='riqi' size='10' maxlength='10' onclick='new Calendar().show(this);' readonly runat=server class="tbinput_rl" /></td>
|
||
|
<td class="auto-style5">  </td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td class="auto-style6"><span>详细地址</span></td><td colspan="5"><asp:TextBox id="dizhi" runat="server" CssClass="tbinput"></asp:TextBox></td>
|
||
|
<td class="auto-style5">  </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="auto-style6"><span>备注</span></td><td colspan="11"><asp:TextBox id="beizhu" runat="server" CssClass="tbinput" ></asp:TextBox></td>
|
||
|
<td class="tdjj5">  </td>
|
||
|
</tr>
|
||
|
<tr><td style=" height:20px" colspan="13"></td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div runat="server" id="lianxiren" >
|
||
|
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<span style=" display:none"> <asp:button id="severbc" runat="server" CssClass="button bluez small" Text="保存" OnClientClick="return pd()" onclick="bt_tj_Click" ></asp:button> </span>
|
||
|
<asp:HiddenField ID="lxr" runat="server" Value="" />
|
||
|
<asp:HiddenField ID="id" runat="server" Value="" />
|
||
|
<script src="../Js/messageshow.js" type="text/javascript"></script>
|
||
|
</form>
|
||
|
</body>
|
||
|
</html>
|