@model DTO.IntentionVisitDTO
|
@using DTO;
|
@using zhengcaioa.Models;
|
@{
|
|
List<IntentionCustomerDTO> customer = ViewData["customer"] as List<IntentionCustomerDTO>; //意向客户
|
|
List<SysCodeDtl> visType = ViewData["visType"] as List<SysCodeDtl>; //拜访方式
|
List<SysCodeDtl> jtype = ViewData["jtype"] as List<SysCodeDtl>; //访问业务
|
List<SysCodeDtl> zw = ViewData["zw"] as List<SysCodeDtl>; //职务
|
List<SysCodeDtl> yx = ViewData["yx"] as List<SysCodeDtl>; //成交意向
|
List<SysCodeDtl> jy = ViewData["jy"] as List<SysCodeDtl>; //跟踪建议
|
string IsYwjl = ViewBag.IsYwjl as string;
|
|
|
List<IntentionVisitDuanxinDTO> Duanxin = ViewData["Duanxin"] as List<IntentionVisitDuanxinDTO>; //短信
|
|
List<IntentionVisitDTO> visitlishi = ViewData["visitlishi"] as List<IntentionVisitDTO>; //意向客户
|
|
List<PageEntity> ActionInfo2 = ViewData["ActionInfo2"] as List<PageEntity>;
|
}
|
@{
|
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" 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">
|
<input id="Vistime" class="form-control" label="公告时间" name="Vistime" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="text" value="@Model.Vistime.ToString("yyyy/MM/dd")" readonly="readonly">
|
|
</div>
|
|
<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="Viscustomer" class="form-control" name="Viscustomer" data-placeholder="选择 序列 ..." style="font-weight:normal;">
|
<option value="" hassubinfo="true">请选择</option>
|
@foreach (var item in customer)
|
{
|
@if (!item.Id.Equals(Model.Viscustomer))
|
{
|
<option value="@item.Id" hassubinfo="true">
|
@item.Name
|
</option>
|
}
|
else
|
{
|
<option value="@item.Id" hassubinfo="true" selected="selected">
|
@item.Name
|
</option>
|
}
|
|
}
|
}
|
|
</select>
|
<input type="hidden" id="Id" name="Id" value="@Model.Id" />
|
<input type="hidden" id="IsYwjl" name="IsYwjl" value="@IsYwjl" />
|
</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-2 col-md-2" grouptype="Vdata">
|
<select id="VisType" class="form-control" name="VisType" data-placeholder="选择 序列 ...">
|
<option value="" hassubinfo="true">请选择</option>
|
@foreach (var item in visType)
|
{
|
@if (!item.CodeSn.Equals(Model.VisType))
|
{
|
<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="Jtype" class="form-control" name="Jtype" data-placeholder="选择 序列 ...">
|
<option value="" hassubinfo="true">请选择</option>
|
@foreach (var item in jtype)
|
{
|
@if (!item.CodeSn.Equals(Model.Jtype))
|
{
|
<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">接待人</label>
|
<div class="col-sm-2 col-md-2" grouptype="Vdata">
|
<input class="form-control" label="接待人" name="Jdr" id="Jdr" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="@Model.Jdr">
|
|
</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="Zw" class="form-control" name="Zw" data-placeholder="选择 序列 ...">
|
<option value="" hassubinfo="true">请选择</option>
|
@foreach (var item in zw)
|
{
|
@if (!item.CodeSn.Equals(Model.Zw))
|
{
|
<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-8 col-md-8">
|
<textarea class="form-control bt" id="Talk" name="Talk" title="交谈内容" isempty="" maxlength="4000" length="long">@Model.Talk</textarea>
|
</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-8 col-md-8">
|
<textarea class="form-control bt" id="Khfk" name="Khfk" title="客户反馈" isempty="" maxlength="4000" length="long">@Model.Khfk</textarea>
|
</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-2 col-md-2" grouptype="Vdata">
|
<select id="Yx" class="form-control" name="Yx" data-placeholder="选择 序列 ...">
|
<option value="" hassubinfo="true">请选择</option>
|
@foreach (var item in yx)
|
{
|
@if (!item.CodeSn.Equals(Model.Yx))
|
{
|
<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="Jy" class="form-control" name="Jy" data-placeholder="选择 序列 ...">
|
<option value="" hassubinfo="true">请选择</option>
|
@foreach (var item in jy)
|
{
|
@if (!item.CodeSn.Equals(Model.Jy))
|
{
|
<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">短信模板</label>
|
<div class="col-sm-2 col-md-2" grouptype="Vdata">
|
<select id="Duanxin" class="form-control" name="Duanxin" data-placeholder="选择 序列 ...">
|
<option value="" hassubinfo="true">请选择</option>
|
@foreach (var item in Duanxin)
|
{
|
|
<option value="@item.Id" hassubinfo="true">
|
@item.DuanxinTitle
|
</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">短信内容</label>
|
<div class="col-sm-8 col-md-8">
|
<textarea class="form-control bt" id="DuanxinNeirong" name="DuanxinNeirong" title="短信内容" isempty="" maxlength="4000" length="long" style="resize:none;overflow-y:hidden; min-height:60px;" onpropertychange="this.style.height=this.scrollHeight + 'px'" oninput="this.style.height=this.scrollHeight + 'px'">@Model.DuanxinNeirong</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 DuanxinNeirong = document.getElementById("DuanxinNeirong");
|
|
DuanxinNeirong.style.height = DuanxinNeirong.scrollHeight + 'px';
|
|
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"
|
};
|
|
laydate({ elem: "#Vistime", format: 'YYYY/MM/DD', istime: true, event: "focus" });
|
$("#Viscustomer").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: "/IntentionVisit/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 ($("#Vistime").val() == '') {
|
toastr.warning("拜访时间不能为空");
|
return;
|
}
|
|
if ($("#Viscustomer").val() == '') {
|
toastr.warning("意向客户不能为空");
|
return;
|
}
|
if ($("#VisType").val() == '') {
|
toastr.warning("拜访方式不能为空");
|
return;
|
}
|
if ($("#Jtype").val() == '') {
|
toastr.warning("访问业务不能为空");
|
return;
|
};
|
|
//if ($("#Zw").val() == '') {
|
// toastr.warning("职务不能为空");
|
// return;
|
//};
|
|
//if ($("#Jdr").val() == '') {
|
// toastr.warning("接待人不能为空");
|
// return;
|
//}
|
|
|
|
if ($.trim($("#Talk").val()) == '') {
|
toastr.warning("交谈内容不能为空");
|
return;
|
}
|
if ($.trim($("#Khfk").val()) == '') {
|
toastr.warning("客户反馈不能为空");
|
return;
|
}
|
|
if ($("#Yx").val() == '') {
|
toastr.warning("成交意向不能为空");
|
return;
|
}
|
if ($("#Jy").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: "/IntentionVisit/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("/IntentionVisit/Edit/");
|
}
|
|
}
|
else {
|
// toastr.error("失败");
|
parent.layer.msg(data.Message, { icon: 5 });
|
}
|
|
},
|
error: function () {
|
|
|
parent.layer.msg('失败', { icon: 5 });
|
}
|
});
|
}
|
|
|
|
|
$("#Duanxin").change(function () {
|
var sheng = $("#Duanxin").val();
|
$.ajax({
|
type: "GET",
|
url: "/IntentionVisit/getDuanxin?id=" + sheng,
|
dataType: "json",
|
global: false,
|
data: "",
|
success: function (data) {
|
|
if (data.Result) {
|
$("#DuanxinNeirong").val(data.Message);
|
var DuanxinNeirong = document.getElementById("DuanxinNeirong");
|
|
DuanxinNeirong.style.height = DuanxinNeirong.scrollHeight + 'px';
|
} else {
|
parent.layer.msg('查询失败', { icon: 5 });
|
}
|
},
|
error: function () {
|
|
|
parent.layer.msg('查询失败', { icon: 5 });
|
}
|
});
|
});
|
|
function _pageAutoClose() {
|
parent.window._reloadPageData();
|
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();
|
|
}
|
});
|
</script>
|
</body>
|
</html>
|