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.

699 lines
39 KiB
Plaintext

10 months ago
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CRMClientInfo.aspx.cs" Inherits="DSWeb.CRM.CRMClientInfo" %>
<!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 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" src="../js/jquery/jquery-ui/jquery.js"></script>
<script type="text/javascript" src="../js/jquery/jquery-ui/jquery-ui.js"></script>
<script src="../js/jsGridCRMClientInfo.js" type="text/javascript"></script>
<link href="../Css/right.css" rel="stylesheet" type="text/css" />
<link href="../js/jquery/jquery-ui/jquery-ui.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
window.dhx_globalImgPath = "../images/";
</script>
<!--页面重新加载-->
<link rel="STYLESHEET" type="text/css" href="../theme/button/default/Fee.css" />
<script type="text/javascript">
function reloadParent(strBSNO) {
//alert("strBSNO="+strBSNO);
var parentObj = window.parent.location;
var oldUrl = parentObj.href;
var idIndex = oldUrl.indexOf("&id");//alert(oldUrl);
//
var newUrl = "";
if (idIndex > 0) {
var addfull = oldUrl.indexOf("addfull");
if (addfull > 0) {
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;
}
else {
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 {
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("成功提交!");
}
//回车键控制
document.onkeypress = function () {
if (event.keyCode == 13) {
if (event.srcElement.tagName == 'TEXTAREA') {
return true;
}
//window.event.keyCode=9;
return false;
}
}
</script>
<!--背景条-->
<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;
}
.btn-content0 {
width: 100%;
height: 30px;
background: url("../images/content-header.gif");
cursor: default;
}
.style1 {
width: 100px;
font-size: 12px;
}
</style>
</head>
<body onload="isShowCodeName();" 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-img">
<asp:ImageButton ID="ibAdd" runat="server" OnClick="btnAdd_Click" ToolTip="添加" ImageUrl="~/images/icons/btnAdd.gif" CssClass="btnimg" />
</div>
<div class="xbtn-img">
<div class="btnimg">
<img id="ibEnter" runat="server" src="../images/icons/save.gif" style="width: 16px;" title="保存" onclick="setEnter();" />
</div>
</div>
<div class="xbtn-img">
<img id="imgDel" runat="server" src="../images/icons/remove.gif" onclick="ShowDetailDel();" class="btnimg" alt="删除" onmouseover="imgDelChangePic();" onmouseout="imgDelChangePic();" />
</div>
</div>
</p>
<div class="container" style="float: left; width: 100%; height: 500px; overflow-x: hidden;">
<div style="float: left;">
<!-- 选项卡开始 -->
<div class="nTab">
<!-- 内容开始 -->
<div class="TabContent">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td colspan="4" class="row3">基本信息
</td>
</tr>
<tr>
<td colspan="4" class="row4">
<hr width="98%" color="#96B3DD" />
</td>
</tr>
<tr>
<td class="row1">
<span class="star">*</span>客户全称
</td>
<td class="row2">
<asp:TextBox ID="txtName" runat="server" CssClass="txtTab" MaxLength="50" onblur="onblurDESCRIPTION();"></asp:TextBox>
</td>
<td class="row1">
<span class="star">*</span>客户代码
</td>
<td class="row2">
<asp:TextBox ID="txtCode" runat="server" CssClass="txtTab" MaxLength="20" onblur="onblurCODENAME();"></asp:TextBox>
</td>
</tr>
<tr>
<td class="row1">
<span class="star">*</span>客户简称
</td>
<td class="row2">
<asp:TextBox ID="txtShortName" runat="server" CssClass="txtTab" MaxLength="20" onblur="onblurSHORTNAME();"></asp:TextBox>
</td>
<td class="row1">来源部门
</td>
<td class="row2">
<asp:TextBox ID="txtEnShortName" runat="server" CssClass="txtTab" MaxLength="50" Visible="false"></asp:TextBox>
<asp:TextBox runat="server" ID="autoDetpFrom" CssClass="txtTab"></asp:TextBox>
</td>
</tr>
<tr>
<td class="row1">
<span class="star">*</span>英文全称
</td>
<td class="row2">
<asp:TextBox ID="txtEnName" runat="server" CssClass="txtTab" MaxLength="50"></asp:TextBox>
</td>
<td class="row1">专职销售
</td>
<td class="row2">
<asp:TextBox ID="txtENFULLNAME2" runat="server" CssClass="txtTab" MaxLength="50" Visible="false"></asp:TextBox>
<asp:TextBox runat="server" ID="autoSaler" CssClass="txtTab"></asp:TextBox>
</td>
</tr>
<tr>
<td class="row1">所属行业
</td>
<td class="row2">
<asp:TextBox ID="txtENFULLNAME3" runat="server" CssClass="txtTab" MaxLength="50" Visible="false"></asp:TextBox>
<asp:DropDownList ID="selTrade" runat="server" CssClass="txtTab" Height="25px">
<asp:ListItem>纺织针织</asp:ListItem>
<asp:ListItem>化工业</asp:ListItem>
<asp:ListItem>工艺品业</asp:ListItem>
<asp:ListItem>农业</asp:ListItem>
<asp:ListItem>铝材业</asp:ListItem>
<asp:ListItem>建筑业</asp:ListItem>
<asp:ListItem>环保业</asp:ListItem>
<asp:ListItem>劳保制品</asp:ListItem>
<asp:ListItem>家具制造</asp:ListItem>
<asp:ListItem>机械铸造</asp:ListItem>
<asp:ListItem>食品加工</asp:ListItem>
<asp:ListItem>玻璃制品</asp:ListItem>
<asp:ListItem>轮胎加工</asp:ListItem>
<asp:ListItem>塑料制品</asp:ListItem>
<asp:ListItem>医药业</asp:ListItem>
<asp:ListItem>橡胶业</asp:ListItem>
<asp:ListItem>木材业</asp:ListItem>
<asp:ListItem>服装业</asp:ListItem>
<asp:ListItem>零售批发业</asp:ListItem>
<asp:ListItem>其他</asp:ListItem>
</asp:DropDownList>
</td>
<td class="row1">
<span class="star">*</span>通讯地址
</td>
<td class="row2">
<asp:TextBox ID="txtAddress" runat="server" CssClass="txtTab" MaxLength="200"></asp:TextBox>
</td>
</tr>
<tr>
<td class="row1">
<span class="star">*</span>企业法人
</td>
<td class="row2">
<asp:TextBox ID="txtPrincipal" runat="server" CssClass="txtTab" MaxLength="20"></asp:TextBox>
</td>
<td class="row1">
<span class="star">*</span>联系电话
</td>
<td class="row2">
<asp:TextBox ID="txtPhone1" runat="server" CssClass="txtTab" Width="50px" MaxLength="7">86</asp:TextBox>
<span class="shortline">-</span><asp:TextBox ID="txtPhone2" runat="server" CssClass="txtTab"
Width="50px" MaxLength="4"></asp:TextBox>
<span class="shortline">-</span><asp:TextBox ID="txtPhone3" runat="server" CssClass="txtTab"
Width="120px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="row1">电子邮箱
</td>
<td class="row2">
<asp:TextBox ID="txtEmail" runat="server" CssClass="txtTab" MaxLength="50"></asp:TextBox>
</td>
<td class="row1">是否奖励
</td>
<td class="row2">
<asp:TextBox ID="txtFax1" runat="server" CssClass="txtTab" Width="50px" MaxLength="7" Visible="false">86</asp:TextBox>
<%--<span class="shortline">-</span>--%>
<asp:TextBox ID="txtFax2" runat="server" CssClass="txtTab" Width="50px" MaxLength="4" Visible="false"></asp:TextBox>
<%--<span class="shortline">-</span>--%>
<asp:TextBox ID="txtFax3" runat="server" CssClass="txtTab" Width="120px" Visible="false"></asp:TextBox>
<asp:DropDownList ID="selIsReward" runat="server" CssClass="txtTab" Width="80px" Height="25px">
<asp:ListItem>是</asp:ListItem>
<asp:ListItem>否</asp:ListItem>
</asp:DropDownList>
比例
<asp:DropDownList ID="selRewardPersent" runat="server" CssClass="txtTab" Width="120px" Height="25px">
<asp:ListItem>2%</asp:ListItem>
<asp:ListItem>5%</asp:ListItem>
<asp:ListItem>8%</asp:ListItem>
<asp:ListItem>10%</asp:ListItem>
<asp:ListItem>15%</asp:ListItem>
<asp:ListItem>16%</asp:ListItem>
<asp:ListItem>18%</asp:ListItem>
<asp:ListItem>20%</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="row1">厂房性质
</td>
<td class="row2">
<asp:TextBox ID="txtWeb" runat="server" CssClass="txtTab" MaxLength="50" Visible="false"></asp:TextBox>
<asp:DropDownList ID="selWorkshopType" runat="server" CssClass="txtTab" Height="25px">
<asp:ListItem>自有</asp:ListItem>
<asp:ListItem>租赁</asp:ListItem>
</asp:DropDownList>
</td>
<td class="row1">奖励类型
</td>
<td class="row2">
<asp:TextBox ID="txtAREA" runat="server" CssClass="txtTab" MaxLength="50" Visible="false"></asp:TextBox>
<asp:DropDownList ID="selRewardType" runat="server" CssClass="txtTab" Height="25px">
<asp:ListItem>固定新客户奖励</asp:ListItem>
<asp:ListItem>老客户挖潜奖励</asp:ListItem>
<asp:ListItem>同行货奖励</asp:ListItem>
<asp:ListItem>外地客户奖励</asp:ListItem>
<asp:ListItem>成本控制奖励</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="row1">所属类别
</td>
<td class="row2">
<asp:TextBox ID="txtPRODUCT" runat="server" CssClass="txtTab" MaxLength="50" Visible="false"></asp:TextBox>
<asp:DropDownList ID="selCategory" runat="server" CssClass="txtTab" Height="25px" Width="150px">
<asp:ListItem>高密区域新客户</asp:ListItem>
<asp:ListItem>网点区域新客户</asp:ListItem>
<asp:ListItem>专职销售新客户</asp:ListItem>
<asp:ListItem>外地客户</asp:ListItem>
<asp:ListItem>同行客户</asp:ListItem>
<asp:ListItem>域外挖潜客户</asp:ListItem>
<asp:ListItem>仓储业务客户</asp:ListItem>
<asp:ListItem>关联客户</asp:ListItem>
<asp:ListItem>公示客户</asp:ListItem>
<asp:ListItem>注销停产客户</asp:ListItem>
<asp:ListItem>供用商</asp:ListItem>
<asp:ListItem>其他</asp:ListItem>
</asp:DropDownList>
<asp:DropDownList ID="selInfoClient" runat="server" CssClass="txtTab" Height="25px" Width="100px" Style="display: none;">
</asp:DropDownList>
</td>
<td class="row1">奖励期限
</td>
<td class="row2">
<asp:TextBox ID="txtCTNNUM" runat="server" CssClass="txtTab" MaxLength="50" Visible="false"></asp:TextBox>
<asp:DropDownList ID="selRewardMonth" runat="server" CssClass="txtTab" Height="25px">
<asp:ListItem>9个月</asp:ListItem>
<asp:ListItem>12个月</asp:ListItem>
<asp:ListItem>3年</asp:ListItem>
<asp:ListItem>5年</asp:ListItem>
<asp:ListItem>无限制期限</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="row1">起始奖励月份
</td>
<td class="row2">
<asp:TextBox ID="txtRewardStart" runat="server" CssClass="txtTab"></asp:TextBox>
</td>
<td class="row1">结束奖励月份
</td>
<td class="row2">
<asp:TextBox ID="txtRewardEnd" runat="server" CssClass="txtTab"></asp:TextBox>
</td>
</tr>
<tr>
<td class="row1">航线
</td>
<td class="row2" colspan="3">
<table>
<tr>
<td>
<asp:CheckBox ID="cbISLANE1" runat="server" Text="非洲航线" Width="70px" />
</td>
<td>
<asp:CheckBox ID="cbISLANE2" runat="server" Text="澳洲航线" Width="70px" />
</td>
<td>
<asp:CheckBox ID="cbISLANE3" runat="server" Text="黑海航线" Width="70px" />
</td>
<td>
<asp:CheckBox ID="cbISLANE4" runat="server" Text="欧洲航线" Width="70px" />
</td>
<td>
<asp:CheckBox ID="cbISLANE5" runat="server" Text="印巴航线" Width="70px" />
</td>
<td>
<asp:CheckBox ID="cbISLANE6" runat="server" Text="日本航线" Width="70px" />
</td>
<td>
<asp:CheckBox ID="cbISLANE7" runat="server" Text="韩国航线" Width="70px" />
</td>
</tr>
<tr>
<td>
<asp:CheckBox ID="cbISLANE8" runat="server" Text="中东航线" Width="70px" />
</td>
<td>
<asp:CheckBox ID="cbISLANE9" runat="server" Text="红海航线" Width="70px" />
</td>
<td>
<asp:CheckBox ID="cbISLANE10" runat="server" Text="东南亚航线" Width="80px" />
</td>
<td>
<asp:CheckBox ID="cbISLANE11" runat="server" Text="南美航线" Width="70px" />
</td>
<td>
<asp:CheckBox ID="cbISLANE12" runat="server" Text="台湾航线" Width="70px" />
</td>
<td>
<asp:CheckBox ID="cbISLANE13" runat="server" Text="美加航线" Width="70px" />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="row1">简介</td>
<td class="row2" colspan="3">
<asp:TextBox ID="txtREMARK" runat="server" CssClass="txtTab" MaxLength="200" Width="662px" Height="100px" TextMode="MultiLine" Style="overflow-y: auto; height: 100px;"></asp:TextBox>
</td>
</tr>
<tr>
<td class="row1">图片1</td>
<td class="row2">
<asp:Image ID="Image1" runat="server" Width="250px" Height="200px" />
</td>
<td class="row1">图片2</td>
<td class="row2">
<asp:Image ID="Image2" runat="server" Width="250px" Height="200px" />
</td>
<td width="10px"></td>
</tr>
<tr>
<td class="row1"></td>
<td class="row2">
<asp:FileUpload ID="FileUpload1" runat="server" Width="250px" onchange="document.getElementById('Image1').src=this.value" CssClass="btncss" />
</td>
<td class="row1"></td>
<td class="row2">
<asp:FileUpload ID="FileUpload2" runat="server" Width="250px" onchange="document.getElementById('Image2').src=this.value" CssClass="btncss" />
</td>
<td width="10px"></td>
</tr>
<tr>
<td class="row1"></td>
<td class="row2">&nbsp;&nbsp;250 * 200 为最佳)
</td>
<td class="row1"></td>
<td class="row2">&nbsp;&nbsp;250 * 200 为最佳)
</td>
<td width="10px"></td>
</tr>
<tr>
<td colspan="4" class="row3">财务信息
</td>
</tr>
<tr>
<td colspan="4" class="row4">
<hr width="98%" color="#96B3DD" />
</td>
</tr>
<tr>
<td class="row1">发票抬头1
</td>
<td class="row2">
<asp:TextBox ID="txtFPTT1" runat="server" CssClass="txtTab" MaxLength="60"></asp:TextBox>
</td>
<td class="row1">USD开户行
</td>
<td class="row2">
<asp:TextBox ID="txtUSDBank" runat="server" CssClass="txtTab" MaxLength="60"></asp:TextBox>
</td>
</tr>
<tr>
<td class="row1">RMB支票抬头
</td>
<td class="row2">
<asp:TextBox ID="txtRMBZPTT" runat="server" CssClass="txtTab" MaxLength="60"></asp:TextBox>
</td>
<td class="row1">RMB开户行
</td>
<td class="row2">
<asp:TextBox ID="txtRMBBank" runat="server" CssClass="txtTab" MaxLength="60"></asp:TextBox>
</td>
</tr>
<tr>
<td class="row1">RMB账号
</td>
<td class="row2">
<asp:TextBox ID="txtRMBCode" runat="server" CssClass="txtTab" MaxLength="30"></asp:TextBox>
</td>
<td class="row1">付款信誉
</td>
<td class="row2">
<asp:TextBox ID="txtRMBNum" runat="server" CssClass="txtTab" MaxLength="20" Visible="false"></asp:TextBox>
<asp:DropDownList ID="selPayCredit" runat="server" CssClass="txtTab" Height="25px">
<asp:ListItem>良好</asp:ListItem>
<asp:ListItem>一般</asp:ListItem>
<asp:ListItem>差</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="row1">USD支票抬头
</td>
<td class="row2">
<asp:TextBox ID="txtUSDZPTT" runat="server" CssClass="txtTab" MaxLength="60"></asp:TextBox>
</td>
<td class="row1">注册资金(万)
</td>
<td class="row2">
<asp:TextBox ID="txtFPTT2" runat="server" CssClass="txtTab" MaxLength="60" Visible="false"></asp:TextBox>
<asp:TextBox ID="txtRegMoney" runat="server" CssClass="txtTab" MaxLength="60" Text="0.00"></asp:TextBox>
</td>
</tr>
<tr>
<td class="row1">USD账号
</td>
<td class="row2">
<asp:TextBox ID="txtUSDCode" runat="server" CssClass="txtTab" MaxLength="30"></asp:TextBox>
</td>
<td class="row1">结算账期(天)
</td>
<td class="row2">
<asp:TextBox ID="txtUSDNum" runat="server" CssClass="txtTab" MaxLength="20" Visible="false"></asp:TextBox>
<asp:TextBox ID="txtSettlePeriod" runat="server" CssClass="txtTab" MaxLength="20" Text="0"></asp:TextBox>
</td>
</tr>
<tr>
<td class="row1">客户性质
</td>
<td class="row2">
<asp:DropDownList ID="ddlJSFS" runat="server" CssClass="txtTab" Height="22px" Width="80px" Visible="false">
<asp:ListItem>RMB</asp:ListItem>
<asp:ListItem>USA</asp:ListItem>
</asp:DropDownList>
<asp:DropDownList ID="selCustomerType" runat="server" CssClass="txtTab" Height="25px">
<asp:ListItem>工业企业</asp:ListItem>
<asp:ListItem>贸易公司</asp:ListItem>
<asp:ListItem>其他</asp:ListItem>
</asp:DropDownList>
</td>
<td class="row1">授信额度RMB/万)
</td>
<td class="row2">
<asp:TextBox ID="txtUSDHL" runat="server" CssClass="txtTab" Text="0.00" MaxLength="20" onkeypress="if ((event.keyCode < 48 || event.keyCode > 57) && (event.keyCode != 8) && event.keyCode!=13 && event.keyCode!=45 && event.keyCode!=46){event.returnValue=false;}" onblur="getIsNum(this);" Visible="false"></asp:TextBox>
<asp:TextBox ID="txtCreditMoney" runat="server" CssClass="txtTab" MaxLength="20" Text="0.00"></asp:TextBox>
</td>
</tr>
<tr>
<td class="row1">客户等级
</td>
<td class="row2">
<asp:DropDownList ID="selCustomerGrade" runat="server" CssClass="txtTab" Height="25px">
<asp:ListItem>A级</asp:ListItem>
<asp:ListItem>B级</asp:ListItem>
<asp:ListItem>C级</asp:ListItem>
<asp:ListItem>D级</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
</div>
</div>
<!-- 选项卡结束 -->
</div>
</div>
</div>
<div>
<input type="hidden" id="hd_Name" runat="server" />
<input type="hidden" id="hd_ShortName" runat="server" />
<input type="hidden" id="hd_Code" runat="server" />
<input type="hidden" id="hdGid" runat="server" />
<input type="hidden" id="hdUserID" runat="server" />
<input type="hidden" id="hdhandle" runat="server" />
<input type="hidden" id="hdEnabled" runat="server" />
<input type="hidden" id="hdIMAGEURL" runat="server" />
<input type="hidden" id="hdIMAGEURL2" runat="server" />
<asp:Button ID="btnEnter" runat="server" Text="Button" OnClick="btnEnter_Click" Style="display: none;" />
<asp:ImageButton ID="ibDel" runat="server" OnClick="btnDel_Click" ToolTip="删除" ImageUrl="~/images/icons/remove.gif" OnClientClick="return confirm('确定删除吗?')" CssClass="btnimg" Style="display: none;" />
</div>
<div style="height: 200px"></div>
</form>
<script type="text/javascript">
$(function () {
$("#autoDetpFrom").autocomplete({
source: "../Dispatch/Common/SearchDeptForCrm",
select: function (event, ui) {
}
});
$("#autoSaler").autocomplete({
source: "../Dispatch/Common/SearchUserForCrm",
select: function (event, ui) {
}
});
$("#txtRewardStart").datepicker({
dateFormat: "yy-mm"
});
$("#txtRewardEnd").datepicker({
dateFormat: "yy-mm"
});
$("#selCategory").on('change', function () {
showHideInfoClient();
});
showHideInfoClient();
$("#selIsReward").on('change', function () {
selIsRewardChg();
});
selIsRewardChg();
$("#txtRewardStart,#selRewardMonth").on('change', function () {
calcEndDate()
});
$("#txtCreditMoney").on('change', function () {
var val = parseFloat($("#txtCreditMoney").val());
if (val >= 10) {
$("#selCustomerGrade").val("A级");
} else if (val >= 5 && val < 10) {
$("#selCustomerGrade").val("B级");
} else if (val >= 1 && val < 5) {
$("#selCustomerGrade").val("C级");
} else {
$("#selCustomerGrade").val("D级");
}
});
});
function showHideInfoClient() {
if ($("#selCategory").val() == "关联客户") {
$("#selInfoClient").show();
} else {
$("#selInfoClient").hide();
}
}
function selIsRewardChg() {
var isReward = $("#selIsReward").val();
if (isReward == "是") {
$("#selRewardPersent").prop("disabled", null);
$("#selRewardType").prop("disabled", null);
$("#selRewardMonth").prop("disabled", null);
$("#txtRewardStart").prop("disabled", null);
$("#txtRewardEnd").prop("disabled", null);
} else if (isReward == "否") {
$("#selRewardPersent").prop("disabled", "disabled");
$("#selRewardType").prop("disabled", "disabled");
$("#selRewardMonth").prop("disabled", "disabled");
$("#txtRewardStart").prop("disabled", "disabled");
$("#txtRewardEnd").prop("disabled", "disabled");
}
}
function calcEndDate() {
var valStart = $("#txtRewardStart").val();
if (valStart.length > 0 && /[0-9]{4}\-[0-9]{2}/.test(valStart)) {
var year = parseInt(valStart.substring(0, 4));
var month = parseInt(valStart.substring(5, 7));
debugger;
var selMonth = $("#selRewardMonth").val();
if (selMonth == "9个月") {
month += 9;
if (month > 12) {
year += 1;
month -= 12;
}
} else if (selMonth == "12个月") {
year += 1;
} else if (selMonth == "3年") {
year += 3;
} else if (selMonth == "5年") {
year += 5;
} else {
$("#txtRewardEnd").val("");
return;
}
var monthStr = month > 9 ? month + '' : '0' + month;
$("#txtRewardEnd").val(year + '-' + monthStr);
}
}
</script>
</body>
</html>