@model DTO.IntentionCustomerDTO
|
@using DTO;
|
@using zhengcaioa.Models;
|
@{
|
// List<Zhuanjium> zhuanjia = ViewData["zhuanjia"] as List<Zhuanjium>; //专家
|
List<PltUserDTO> users = ViewData["users"] as List<PltUserDTO>; //采购方式
|
List<Area> sheng = ViewData["sheng"] as List<Area>; //省
|
List<Area> shi = ViewData["shi"] as List<Area>; //市
|
List<Area> quxian = ViewData["quxian"] as List<Area>; //区县
|
List<SysCodeDtl> khlx = ViewData["khlx"] as List<SysCodeDtl>; //客户类型
|
List<SysCodeDtl> khly = ViewData["khly"] as List<SysCodeDtl>; //客户来源
|
List<SysCodeDtl> hyfl = ViewData["hyfl"] as List<SysCodeDtl>; //行业分类
|
List<HrDeptDTO> DeptId = ViewData["DeptId"] as List<HrDeptDTO>; //部门
|
|
List<PageEntity> ActionInfo2 = ViewData["ActionInfo2"] as List<PageEntity>;
|
|
List<IntentionVisitDTO> visitlishi = ViewData["visitlishi"] as List<IntentionVisitDTO>; //意向客户
|
//string[] arrJobLevel = (Model.Zhuanjia ?? "").Split(',');
|
|
}
|
@{
|
Layout = null;
|
}
|
|
<!DOCTYPE html>
|
<html>
|
<head>
|
<meta charset="utf-8">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
<meta name="description" content="">
|
<meta name="author" content="ThemeBucket">
|
<title>@(SiteConfig.SiteName)</title>
|
<link href="~/css/bootstrap.min.css" rel="stylesheet">
|
<link href="~/css/font-awesome.min.css" rel="stylesheet">
|
<link href="~/css/animate.min.css" rel="stylesheet">
|
|
@*<link href="~/css/plugins/iCheck/custom.css" rel="stylesheet">*@
|
<link href="~/css/style.min.css" rel="stylesheet">
|
<link href="~/css/plugins/chosen/chosen.css?v=7" rel="stylesheet">
|
@*<link href="~/js/plugins/layer/skin/layer.css" rel="stylesheet">*@
|
@*<link href="~/css/plugins/datapicker/datepicker3.css" rel="stylesheet">*@
|
<link href="~/css/style.min.css" rel="stylesheet">
|
<link href="~/css/plugins/toastr/toastr.min.css" rel="stylesheet" />
|
<link href="~/css/plugins/webuploader/webuploader.css" rel="stylesheet" />
|
|
<style type="text/css">
|
.webuploader-pick {
|
position: relative;
|
display: inline-block;
|
cursor: pointer;
|
background: #00b7ee;
|
padding: 8px 14px 7px 14px;
|
color: #fff;
|
text-align: center;
|
border-radius: 3px;
|
overflow: hidden;
|
}
|
|
div.clearfix > label {
|
padding-top: 8px;
|
}
|
|
.chosen-container {
|
border-radius: 1px;
|
border: 1px solid #e5e6e7;
|
}
|
|
.col-md-1.control-label {
|
padding-right: 0px;
|
font-weight: 400;
|
}
|
table {
|
border-collapse: collapse;
|
border: none;
|
width: 900px;
|
margin-left: 0px;
|
text-align: center;
|
}
|
|
td {
|
border: solid #000000 1px;
|
height: 30px;
|
}
|
</style>
|
|
<!-- jqgrid-->
|
@*<link href="~/css/plugins/jqgrid/ui.jqgrid.css" rel="stylesheet">*@
|
<script language="javascript" src="~/js/jquery.min.js" type="text/javascript"></script>
|
<script src="~/js/bootstrap.min.js"></script>
|
@*<script src="~/js/plugins/bootstro/bootstro.js"></script>*@
|
|
<!--容器-->
|
@*<script language="javascript" src="~/js/datehelper.js" type="text/javascript"></script>*@
|
@*<script language="javascript" src="~/js/plugins/query/jquery.query-object.js" type="text/javascript"></script>*@
|
@*<script language="javascript" src="~/js/plugins/iCheck/icheck.min.js" type="text/javascript"></script>*@
|
<script language="javascript" src="~/js/plugins/chosen/chosen.jquery.js" type="text/javascript"></script>
|
@*<script language="javascript" src="~/js/plugins/datapicker/bootstrap-datepicker.js" type="text/javascript"></script>*@
|
<script language="javascript" src="~/js/plugins/layer/layer.js" type="text/javascript"></script>
|
@*<script src="~/js/plugins/jqgrid/jquery.jqGrid.min.js" type="text/javascript"></script>*@
|
@*<script src="~/js/plugins/jqgrid/i18n/grid.locale-cn.js" type="text/javascript"></script>*@
|
<script src="~/js/plugins/toastr/toastr.min.js" type="text/javascript"></script>
|
<script src="~/js/plugins/webuploader/webuploader.min.js"></script>
|
|
<script language="javascript" src="~/js/common-layout.js" type="text/javascript"></script>
|
<script src="~/js/plugins/layer/laydate/laydate.js" type="text/javascript"></script>
|
@*<script src="~/js/plugins/iTexbox/itextbox.js" type="text/javascript"></script>*@
|
@*<script src="~/js/plugins/iuploader/iuploader.js"></script>*@
|
<script src="~/js/TUJS.js"></script>
|
</head>
|
<body class="gray-bg" style="overflow:auto">
|
<form id="formtest">
|
<div class="wrapper wrapper-content" id="ibox-content" style="padding:15px;">
|
<div class="row">
|
<div class="col-sm-12">
|
<div class="ibox float-e-margins">
|
<div class="ibox-title">
|
<h5> <i class="fa fa-list"></i> 基本信息</h5>
|
</div>
|
<div id="div_content" class="ibox-content" style="background-color:white;">
|
<div class="row">
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label class="text-right col-sm-1 col-md-1 control-label">客户来源<i class="red">*</i></label>
|
<div class="col-sm-2 col-md-2">
|
<select id="Khly" class="form-control" name="Khly" data-placeholder="选择 序列 ..." style="font-weight:normal;">
|
<option value="" hassubinfo="true">请选择</option>
|
@foreach (var item in khly)
|
{
|
@if (!item.CodeSn.Equals(Model.Khly))
|
{
|
<option value="@item.CodeSn" hassubinfo="true">
|
@item.Comments
|
</option>
|
}
|
else
|
{
|
<option value="@item.CodeSn" hassubinfo="true" selected="selected">
|
@item.Comments
|
</option>
|
}
|
|
}
|
}
|
|
</select>
|
<input type="hidden" id="Id" name="Id" value="@Model.Id" />
|
<input type="hidden" id="Yixiang" name="Yixiang" value="@Model.Yixiang" />
|
</div>
|
|
|
|
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">行业分类<i class="red">*</i></label>
|
<div class="col-sm-2 col-md-2" grouptype="Vdata">
|
<select id="Hyfl" class="form-control" name="Hyfl" data-placeholder="选择 序列 ...">
|
<option value="" hassubinfo="true">请选择</option>
|
@foreach (var item in hyfl)
|
{
|
@if (!item.CodeSn.Equals(Model.Hyfl))
|
{
|
<option value="@item.CodeSn" hassubinfo="true">
|
@item.Comments
|
</option>
|
}
|
else
|
{
|
<option value="@item.CodeSn" hassubinfo="true" selected="selected">
|
@item.Comments
|
</option>
|
}
|
|
}
|
}
|
|
</select>
|
|
</div>
|
|
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">客户类型<i class="red">*</i></label>
|
<div class="col-sm-2 col-md-2" grouptype="Vdata">
|
<select id="Khlx" class="form-control" name="Khlx" data-placeholder="选择 序列 ...">
|
<option value="" hassubinfo="true">请选择</option>
|
@foreach (var item in khlx)
|
{
|
@if (!item.CodeSn.Equals(Model.Khlx))
|
{
|
<option value="@item.CodeSn" hassubinfo="true">
|
@item.Comments
|
</option>
|
}
|
else
|
{
|
<option value="@item.CodeSn" hassubinfo="true" selected="selected">
|
@item.Comments
|
</option>
|
}
|
|
}
|
}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">所属区域<i class="red">*</i></label>
|
|
<div class="col-sm-1 col-md-1" grouptype="Vdata">
|
<select id="Sheng" class="form-control" name="Sheng" data-placeholder="选择 序列 ..." style="font-weight:normal;">
|
<option value="" hassubinfo="true">请选择</option>
|
@foreach (var item in sheng)
|
{
|
@if (!item.CodeId.Equals(Model.Sheng))
|
{
|
<option value="@item.CodeId" hassubinfo="true">
|
@item.Name
|
</option>
|
}
|
else
|
{
|
<option value="@item.CodeId" hassubinfo="true" selected="selected">
|
@item.Name
|
</option>
|
}
|
|
}
|
}
|
|
</select>
|
|
</div>
|
<div class="col-sm-1 col-md-1" grouptype="Vdata">
|
<select id="City" class="form-control" name="City" data-placeholder="选择 序列 ..." style="font-weight:normal;">
|
<option value="" hassubinfo="true">请选择</option>
|
@foreach (var item in shi)
|
{
|
@if (!item.CodeId.Equals(Model.City))
|
{
|
<option value="@item.CodeId" hassubinfo="true">
|
@item.Name
|
</option>
|
}
|
else
|
{
|
<option value="@item.CodeId" hassubinfo="true" selected="selected">
|
@item.Name
|
</option>
|
}
|
|
}
|
}
|
|
</select>
|
|
</div>
|
<div class="col-sm-1 col-md-1" grouptype="Vdata">
|
<select id="AreaId" class="form-control" name="AreaId" data-placeholder="选择 序列 ..." style="font-weight:normal;">
|
<option value="" hassubinfo="true">请选择</option>
|
@foreach (var item in quxian)
|
{
|
@if (!item.CodeId.Equals(Model.AreaId))
|
{
|
<option value="@item.CodeId" hassubinfo="true">
|
@item.Name
|
</option>
|
}
|
else
|
{
|
<option value="@item.CodeId" hassubinfo="true" selected="selected">
|
@item.Name
|
</option>
|
}
|
|
}
|
}
|
|
</select>
|
|
</div>
|
<label class="text-right col-sm-1 col-md-1 control-label">查询部门</label>
|
<div class="col-sm-2 col-md-2">
|
<select id="checkDeptId" class="form-control" name="checkDeptId" data-placeholder="选择 序列 ..." style="font-weight:normal;">
|
<option value="" hassubinfo="true">请选择</option>
|
@foreach (var item in DeptId)
|
{
|
|
<option value="@item.Id" hassubinfo="true">
|
@item.DeptName
|
</option>
|
|
}
|
}
|
|
</select>
|
|
</div>
|
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">业务经理</label>
|
<div class="col-sm-2 col-md-2" grouptype="Vdata">
|
<select id="Ywjl" class="form-control" name="Ywjl" data-placeholder="选择 序列 ...">
|
<option value="" hassubinfo="true">请选择</option>
|
@foreach (var item in users)
|
{
|
@if (!item.Id.Equals(Model.Ywjl))
|
{
|
<option value="@item.Id" hassubinfo="true">
|
@item.UserName
|
</option>
|
}
|
else
|
{
|
<option value="@item.Id" hassubinfo="true" selected="selected">
|
@item.UserName
|
</option>
|
}
|
|
}
|
}
|
|
</select>
|
|
</div>
|
</div>
|
|
<div class="ibox-title">
|
<h5> <i class="fa fa-list"></i> 客户资料</h5>
|
</div>
|
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label class="text-right col-sm-1 col-md-1 control-label">客户单位<i class="red">*</i></label>
|
<div class="col-sm-6 col-md-6">
|
<input class="form-control" label="客户单位" name="Name" id="Name" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="@Model.Name">
|
</div>
|
<label class="text-right col-sm-1 col-md-1 control-label">客户微信</label>
|
<div class="col-sm-2 col-md-2">
|
<input class="form-control" label="客户微信" name="Weixin" id="Weixin" labtype="txt" addvisible="true" editvisible="true" maxlength="50" reg="" ismust="true" type="text" value="@Model.Weixin">
|
</div>
|
<div class="col-sm-2 col-md-2">
|
是否添加微信
|
@if (Model.Shifoutianjiaweixin == "A")
|
{
|
<input id="Shifoutianjiaweixin" name="Shifoutianjiaweixin" type="radio" checked="checked" value="A" class="type_b">
|
}
|
else
|
{
|
<input id="Shifoutianjiaweixin" name="Shifoutianjiaweixin" type="radio" value="A" class="type_b">
|
|
}
|
</div>
|
|
|
</div>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
|
<label class="text-right col-sm-1 col-md-1 control-label">邮政编码</label>
|
<div class="col-sm-2 col-md-2">
|
<input class="form-control" label="邮政编码" name="Postal" id="Postal" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Postal">
|
</div>
|
<label class="text-right col-sm-1 col-md-1 control-label">详细地址</label>
|
<div class="col-sm-5 col-md-5">
|
<input class="form-control" label="详细地址" name="Address" id="Address" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Address">
|
</div>
|
|
<label class="text-right col-sm-1 col-md-1 control-label">网址</label>
|
<div class="col-sm-2 col-md-2">
|
<input class="form-control" label="网址" name="Url" id="Url" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Url">
|
</div>
|
</div>
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
|
<label class="text-right col-sm-1 col-md-1 control-label">联系电话</label>
|
<div class="col-sm-2 col-md-2">
|
<input class="form-control" label="联系电话" name="Tel" id="Tel" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Tel">
|
</div>
|
<label class="text-right col-sm-1 col-md-1 control-label">短信手机</label>
|
<div class="col-sm-2 col-md-2">
|
<input class="form-control" label="短信手机" name="Phone" id="Phone" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Phone">
|
</div>
|
<label class="text-right col-sm-1 col-md-1 control-label">QQ</label>
|
<div class="col-sm-2 col-md-2">
|
<input class="form-control" label="QQ" name="Qq" id="Qq" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Qq">
|
</div>
|
|
<label class="text-right col-sm-1 col-md-1 control-label">电子邮箱</label>
|
<div class="col-sm-2 col-md-2">
|
<input class="form-control" label="电子邮箱" name="Email" id="Email" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Email">
|
</div>
|
</div>
|
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
|
<label class="text-right col-sm-1 col-md-1 control-label">法定代表人</label>
|
<div class="col-sm-2 col-md-2">
|
<input class="form-control" label="法定代表人" name="FName" id="FName" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.FName">
|
</div>
|
<label class="text-right col-sm-1 col-md-1 control-label">联系电话</label>
|
<div class="col-sm-2 col-md-2">
|
<input class="form-control" label="联系电话" name="FTel" id="FTel" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.FTel">
|
</div>
|
<label class="text-right col-sm-1 col-md-1 control-label">QQ</label>
|
<div class="col-sm-2 col-md-2">
|
<input class="form-control" label="QQ" name="FQq" id="FQq" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.FQq">
|
</div>
|
</div>
|
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
|
<label class="text-right col-sm-1 col-md-1 control-label">业务经办人</label>
|
<div class="col-sm-2 col-md-2">
|
<input class="form-control" label="业务经办人" name="YwName" id="YwName" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.YwName">
|
</div>
|
<label class="text-right col-sm-1 col-md-1 control-label">联系电话</label>
|
<div class="col-sm-2 col-md-2">
|
<input class="form-control" label="联系电话" name="YwTel" id="YwTel" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.YwTel">
|
</div>
|
<label class="text-right col-sm-1 col-md-1 control-label">QQ</label>
|
<div class="col-sm-2 col-md-2">
|
<input class="form-control" label="QQ" name="YwQq" id="YwQq" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.YwQq">
|
</div>
|
</div>
|
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
|
<label class="text-right col-sm-1 col-md-1 control-label">机构代码</label>
|
<div class="col-sm-2 col-md-2">
|
<input class="form-control" label="机构代码" name="JgCode" id="JgCode" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.JgCode">
|
</div>
|
<label class="text-right col-sm-1 col-md-1 control-label">开户行</label>
|
<div class="col-sm-2 col-md-2">
|
<input class="form-control" label="开户行" name="Khh" id="Khh" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Khh">
|
</div>
|
<label class="text-right col-sm-1 col-md-1 control-label">账号</label>
|
<div class="col-sm-2 col-md-2">
|
<input class="form-control" label="账号" name="Count" id="Count" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Count">
|
</div>
|
</div>
|
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
|
<label class="text-right col-sm-1 col-md-1 control-label">收货人</label>
|
<div class="col-sm-2 col-md-2">
|
<input class="form-control" label="收货人" name="ShrName" id="ShrName" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.ShrName">
|
</div>
|
<label class="text-right col-sm-1 col-md-1 control-label">联系电话</label>
|
<div class="col-sm-2 col-md-2">
|
<input class="form-control" label="联系电话" name="ShrTel" id="ShrTel" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.ShrTel">
|
</div>
|
<label class="text-right col-sm-1 col-md-1 control-label">收货地址</label>
|
<div class="col-sm-5 col-md-5">
|
<input class="form-control" label="收货地址" name="ShrAddress" id="ShrAddress" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.ShrAddress">
|
</div>
|
</div>
|
|
|
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">备注:</label>
|
<div class="col-sm-11 col-md-11">
|
<textarea class="form-control bt" id="Remark" name="Remark" title="备注" isempty="" maxlength="4000" length="long">@Model.Remark</textarea>
|
</div>
|
</div>
|
|
<div class="clearfix layer-area" style="padding-bottom:15px;">
|
@if (visitlishi.Count > 0)
|
{
|
<table class="col-sm-12 col-md-12">
|
@{
|
int i = 1;
|
}
|
<tr>
|
<td style="width:4%;"> 编号</td>
|
<td style="width:7%;"> 拜访时间</td>
|
|
<td style="width:14%;"> 客户单位</td>
|
<td style="width:7%;"> 拜访方式</td>
|
<td style="width:7%;"> 接待人</td>
|
<td style="width:7%;"> 职务</td>
|
<td style="width:14%;"> 交谈类容</td>
|
<td style="width:14%;"> 客户反馈</td>
|
<td style="width:7%;"> 成交意向</td>
|
<td style="width:7%;"> 跟踪建议</td>
|
<td style="width:7%;"> 访问人</td>
|
</tr>
|
@foreach (var visitDTO in visitlishi)
|
{
|
<tr>
|
<td> @i</td>
|
<td> @visitDTO.VistimeName</td>
|
<td> @visitDTO.Name</td>
|
<td> @visitDTO.VisTypeName</td>
|
<td> @visitDTO.Jdr</td>
|
<td> @visitDTO.ZwName</td>
|
<td> @visitDTO.Talk</td>
|
<td> @visitDTO.Khfk</td>
|
<td> @visitDTO.YxName</td>
|
<td> @visitDTO.JyName</td>
|
<td> @visitDTO.CreaterName</td>
|
</tr>
|
|
i++;
|
}
|
</table>
|
}
|
</div>
|
|
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="wrapper wrapper-content" style="margin-top:0px"></div>
|
<div class="ibox-content" id="top" style="z-index:100; position:fixed; height:50px; width:100%;bottom:0; text-align: right; padding-top:8px ">
|
<div class="" style="float:right;" data-bootstro-width="500px" data-bootstro-content="功能按钮:“保存”,“删除”">
|
<a class="btn btn-success Delete" href="javascript:void(0)" onclick="delPosition();" style="margin-left:4px; border-radius:4px;display:none;">
|
<i class="glyphicon glyphicon-remove"></i> <span class="bold">删除</span>
|
</a>
|
|
<a class="btn btn-success Update" href="javascript:void(0)" onclick="savePosition();" style="margin-left: 4px; border-radius: 4px; display: none;">
|
<i class="glyphicon glyphicon-ok"></i> <span class="bold">提交</span>
|
</a>
|
</div>
|
</div>
|
|
</form>
|
<script type="text/javascript">
|
var hh = document.body.clientHeight - $('.ibox-title').height() - $("#top").height() * 2 - 95;
|
$("#div_content").height(hh);
|
|
toastr.options = {
|
"closeButton": true,
|
"debug": false,
|
"progressBar": true,
|
"positionClass": "toast-bottom-right",
|
"onclick": null,
|
"showDuration": "300",
|
"hideDuration": "600",
|
"timeOut": "4500",
|
"extendedTimeOut": "600",
|
"showEasing": "swing",
|
"hideEasing": "linear",
|
"showMethod": "fadeIn",
|
"hideMethod": "fadeOut"
|
};
|
|
|
$("#Ywjl").chosen();
|
$("#Hyfl").chosen();
|
var id = '@Model.Id';
|
var bUpload = false;
|
var bAdd = false; // 新增操作
|
var fileId = ""; // 上传文件生成的Id
|
var bEditFile = false; // 编辑时,是否关联了附件
|
var bDeleteFile = false; // 删除操作
|
var attachment_id = 0; // 附件id
|
var imgLoad = new Object();
|
|
|
|
var delPosition = function () {
|
|
|
if (id == null || id == '') {
|
toastr.warning("请先保存");
|
return;
|
}
|
$.ajax({
|
type: "GET",
|
url: "/IntentionCustomer/Nullify?id=" + id,
|
dataType: "json",
|
global: false,
|
data: '',
|
success: function (data) {
|
|
|
if (data.Result) {
|
// parent._afterSave(true);
|
parent.layer.msg('删除成功', { icon: 6 });
|
_pageAutoClose();//自动关闭页面方法
|
}
|
else {
|
// toastr.error("");
|
parent.layer.msg('删除失败', { icon: 5 });
|
}
|
|
},
|
error: function () {
|
if ($.isNumber(imgLoad)) {
|
parent.layer.close(imgLoad);
|
}
|
//toastr.error("保存失败");
|
|
parent.layer.msg('保存失败', { icon: 5 });
|
}
|
});
|
|
}
|
|
// 保存岗位信息
|
var savePosition = function () {
|
if ($("#Khly").val() == '') {
|
toastr.warning("客户来源不能为空");
|
return;
|
}
|
if ($("#Hyfl").val() == '') {
|
toastr.warning("行业分类不能为空");
|
return;
|
}
|
if ($("#Khlx").val() == '') {
|
toastr.warning("客户类型不能为空");
|
return;
|
};
|
if (Verify.isNull($("#Sheng").val()) || Verify.isNull($("#City").val()) || Verify.isNull($("#AreaId").val())) {
|
toastr.warning("区域不能为空");
|
return;
|
}
|
|
|
|
|
if ($.trim($("#Name").val()) == '') {
|
toastr.warning("客户单位不能为空");
|
return;
|
}
|
|
|
//var data = { id: $("#Id").val(), StartTime:$("#StartTime").val(), Sheng: $("#Sheng").val(), job_level: $("#Job_level").val().toString(), ExistsAttachment: fileId != "" }
|
$.ajax({
|
type: "POST",
|
url: "/IntentionCustomer/Save",
|
dataType: "json",
|
global: false,
|
data: $('form').serializeArray(),
|
success: function (data) {
|
|
|
|
if (data.Result) {
|
// parent._afterSave(true);
|
parent.layer.msg('成功保存', { icon: 6 });
|
//window.location = "/Project/add?id=" + data.ReturnID;
|
|
|
try {
|
_pageAutoClose();//自动关闭页面方法
|
}
|
catch (err) {
|
parent._CloseTab1("/IntentionCustomer/Edit/");
|
}
|
|
}
|
else {
|
// toastr.error("失败");
|
parent.layer.msg(data.Message, { icon: 5 });
|
}
|
|
},
|
error: function () {
|
|
|
parent.layer.msg('失败', { icon: 5 });
|
}
|
});
|
}
|
|
|
$("#Sheng").change(function () {
|
|
var sheng = $("#Sheng").val();
|
$.ajax({
|
type: "GET",
|
url: "/Project/getCity?shengid=" + sheng,
|
dataType: "json",
|
global: false,
|
data: "",
|
success: function (data) {
|
|
var city = $("#City");
|
city.find('option').remove();
|
var aaa = '<option value="" hassubinfo="true">请选择</option>';
|
city.append(aaa);
|
if (data.length > 0) {
|
for (var i = 0; i < data.length; i++) {
|
|
var o = '<option value="' + data[i].CodeId + '" hassubinfo="true">' + data[i].Name + '</option>';
|
city.append(o);
|
}
|
}
|
},
|
error: function () {
|
|
|
parent.layer.msg('失败', { icon: 5 });
|
}
|
});
|
});
|
|
|
$("#City").change(function () {
|
|
var city = $("#City").val();
|
$.ajax({
|
type: "GET",
|
url: "/Project/getAreaId?cityid=" + city,
|
dataType: "json",
|
global: false,
|
data: "",
|
success: function (data) {
|
|
var quxian = $("#AreaId");
|
quxian.find('option').remove();
|
var aaa = '<option value="" hassubinfo="true">请选择</option>';
|
quxian.append(aaa);
|
if (data.length > 0) {
|
for (var i = 0; i < data.length; i++) {
|
|
var o = '<option value="' + data[i].CodeId + '" hassubinfo="true">' + data[i].Name + '</option>';
|
quxian.append(o);
|
}
|
}
|
},
|
error: function () {
|
|
|
parent.layer.msg('失败', { icon: 5 });
|
}
|
});
|
});
|
|
|
$("#AreaId").change(function () {
|
addresschushi();
|
});
|
|
function addresschushi() {
|
var sheng = $.trim($("#Sheng").find("option:selected").text());
|
var city = $.trim($("#City").find("option:selected").text());
|
var AreaId = $.trim($("#AreaId").find("option:selected").text());
|
var Address = $("#Address");
|
|
Address.val(sheng + city + AreaId.replace("请选择", ""));
|
}
|
|
if ($("#Id").val() == '') {
|
|
addresschushi();
|
}
|
|
|
$("#checkDeptId").change(function () {
|
|
var checkDeptId = $("#checkDeptId").val();
|
$.ajax({
|
type: "GET",
|
url: "/User/GetList?IsYwjl=A&DeptId=" + checkDeptId,
|
dataType: "json",
|
global: false,
|
data: "",
|
success: function (data) {
|
|
var quxian = $("#Ywjl");
|
var userid = '@Model.Ywjl';
|
quxian.find('option').remove();
|
var aaa = '<option value="" hassubinfo="true">请选择</option>';
|
quxian.append(aaa);
|
if (data.length > 0) {
|
for (var i = 0; i < data.length; i++) {
|
|
var o = '<option value="' + data[i].Id + '" hassubinfo="true">' + data[i].UserName + '</option>';
|
|
if (data[i].Id == userid) {
|
o = '<option value="' + data[i].Id + '" hassubinfo="true" selected="selected">' + data[i].UserName + '</option>';
|
}
|
quxian.append(o);
|
}
|
}
|
quxian.trigger('chosen:updated');//更新选项
|
|
|
},
|
error: function () {
|
|
|
parent.layer.msg('失败', { icon: 5 });
|
}
|
});
|
});
|
|
|
function _pageAutoClose() {
|
try {
|
parent.window._reloadPageData();
|
}
|
catch (err) {
|
|
}
|
|
|
var index = parent.layer.getFrameIndex(window.name);
|
parent.layer.isRefresh = true;
|
parent.layer.closeAll('loading');
|
parent.layer.close(index);
|
return false;
|
}
|
|
var ActionInfo22 = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ActionInfo2))';
|
|
|
|
$(function () {
|
var data = JSON.parse(ActionInfo22);
|
for (var o in data) {
|
$("." + data[o].PageShortcut).show();
|
|
}
|
});
|
|
|
$("#Name").change(function () {
|
|
var Name = $("#Name").val();
|
$.ajax({
|
type: "GET",
|
url: "/IntentionCustomer/getTitle?Name=" + Name + "&Id=" + $("#Id").val(),
|
dataType: "json",
|
global: false,
|
data: "",
|
success: function (data) {
|
|
if (!data.Result) {
|
toastr.warning(data.Message);
|
}
|
|
|
|
|
|
},
|
error: function () {
|
|
|
parent.layer.msg('失败', { icon: 5 });
|
}
|
});
|
});
|
</script>
|
</body>
|
</html>
|