358 lines
15 KiB
Plaintext
358 lines
15 KiB
Plaintext
@model WX.CRM.Model.Entity.RES_CUSTOMER
|
||
@using WX.CRM.Model.Entity
|
||
@using WX.CRM.WebHelper;
|
||
@using WX.CRM.Model.QueryMap;
|
||
@using WX.CRM.Model;
|
||
@using WX.CRM.Model.DTO;
|
||
@{
|
||
Layout = null;
|
||
CustomerInfo info = ViewBag.CustomerInfo as CustomerInfo;
|
||
}
|
||
<script src="/layui-v2.5.4/layui.js"></script>
|
||
<style>
|
||
.boundFont {
|
||
background-color: #00b900;
|
||
padding: 3px 4px;
|
||
border-radius: 5px;
|
||
color: #fff;
|
||
}
|
||
</style>
|
||
<script type="text/javascript">
|
||
function SetBiaoQian(resid) {
|
||
var src = "/Res/Customer/SetTag?resid=" + resid;
|
||
$("#modalwindow").html(GetIframeHtml(src));
|
||
var maxwidth = 600;
|
||
var maxheight = 500;
|
||
$("#modalwindow").window({ title: '设置', width: maxwidth, height: maxheight, iconCls: 'icon-edit' }).window('open');
|
||
}
|
||
function BaseInfoLink_Click(tag, id) {
|
||
var resid = id;
|
||
var src = "";
|
||
switch (tag) {
|
||
case "fav": src = "/Csvr/FavoriteCustomer/Edit?resid=" + resid; break;
|
||
case "ec": src = "/Res/Customer/Edit?resid=" + resid; break;
|
||
}
|
||
$("#modalwindow").html(GetIframeHtml(src));
|
||
var maxwidth = $(window).width() * 0.7;
|
||
var maxheight = $(window).height() * 0.7;
|
||
$("#modalwindow").window({ title: '编辑', width: maxwidth, height: maxheight, iconCls: 'icon-edit' }).window('open');
|
||
}
|
||
function BaseInfoNext_Click(resid) {
|
||
debugger
|
||
//parent.
|
||
var url = "/Csvr/CustomerInfo/CustomerDetail?resid=" + resid + "&isOther=1";
|
||
//$("#modalwindow").html(GetIframeHtml(url));
|
||
window.location.replace(url)
|
||
@* $.r_ajax({
|
||
url: "/Csvr/CustomerInfo/CustomerDetail?resid=" + resid+"&isOther=1",
|
||
type: "Post",
|
||
data: "",
|
||
dataType: "json",
|
||
loading: true,
|
||
success: function (data) {
|
||
debugger
|
||
if (data.type == 1) {
|
||
window.frameReturnByMes(data.message);
|
||
}
|
||
else {
|
||
alert(data.message);
|
||
window.frameReturnByMes(data.message);
|
||
}
|
||
}
|
||
});*@
|
||
}
|
||
function Link_Click2(tag, id) {
|
||
var resid = id;
|
||
var src = "";
|
||
switch (tag) {
|
||
case "level": src = "/Res/CustomerExtend/Edit?resid=" + resid + "&tag=" + tag; break;
|
||
}
|
||
|
||
$("#modalwindow").html(GetIframeHtml(src));
|
||
$("#modalwindow").window({ title: '编辑', width: 600, height: 450, iconCls: 'icon-edit' }).window('open');
|
||
|
||
}
|
||
$(function () {
|
||
$("#fromDeptcodeShow").html($("#deptNameFromxxx").val());
|
||
});
|
||
function GiveUp(obj, resid) {
|
||
$.messager.confirm('确认操作', '确定放弃该资源吗?', function (r) {
|
||
if (r) {
|
||
$(obj).text("执行中...").attr("disabled", "disabled");
|
||
$.r_post("/Csvr/CustomerUC/GiveUp", { resid: resid }, function (res) {
|
||
if (res.result) {
|
||
if (res.msg == "success") {
|
||
$(obj).val("已放弃");
|
||
}
|
||
else if (res.msg == "notexists") {
|
||
$.messager.alert("警告", "不是您的客户,不能执行该操作!", "error");
|
||
}
|
||
else {
|
||
$.messager.alert("警告", "执行失败,请重试!", "error");
|
||
$(obj).text("放弃").removeAttr("disabled");
|
||
};
|
||
}
|
||
else {
|
||
$.messager.alert("警告", "执行失败,请重试!", "error");
|
||
$(obj).text("放弃").removeAttr("disabled");
|
||
}
|
||
});
|
||
}
|
||
});
|
||
}
|
||
function SetZJL(resid) {
|
||
$("#modalwindow").html(GetIframeHtml("/Res/Customer/SetZJL?resid=" + resid));
|
||
var maxwidth = 400;
|
||
var maxheight = 300;
|
||
$("#modalwindow").window({ title: '设置资金量', width: maxwidth, height: maxheight, iconCls: 'icon-edit' }).window('open');
|
||
}
|
||
</script>
|
||
|
||
<script>
|
||
layui.use('layer', function () {
|
||
$('#rfmrecord').on('click', function () {
|
||
var that = this;
|
||
var appuserid = $(that).attr("data-value");
|
||
if (appuserid != "") {
|
||
var url = "http://sc.soft.dn8188.com/saleClus/cgi/getRfmHistory";
|
||
//var url = "http://192.168.11.141:10045/saleClus/cgi/getRfmHistory";
|
||
$.r_post(url, { appid: "com.dongniu", appuserid }, function (rsp) {
|
||
//console.log(rsp);
|
||
if (rsp.iRet == 0) {
|
||
var html = "<br /><div style=\"height:350px; overflow: auto;\"><ul class=\"layui-timeline\" style=\"pading:0;margin:0\">";
|
||
$.each(rsp.list, function (i, j) {
|
||
var oldbg = setbgcolor(j.oldvalue);
|
||
var newbg = setbgcolor(j.newvalue);
|
||
html += "<li class=\"layui-timeline-item\">";
|
||
html += " <i class=\"layui-icon layui-timeline-axis\" ></i >";
|
||
html += " <div class=\"layui-timeline-content layui-text\">";
|
||
html += " <h3 class=\"layui-timeline-title\" style=\"font-size:16px;\">标签从 <span class=\"layui-badge\" style=\"height: 28px; line-height: 28px; background-color: " + oldbg + "\">" + j.oldvalue + "</span> 变更 <span class=\"layui-badge\" style=\"height: 28px; line-height: 28px; background-color: " + newbg + "\">" + j.newvalue + "</span><span style=\"padding-left:50px; font-size:14px; color:#666\">" + j.ctime + "</span></h3 >";
|
||
html += " <p>" + j.reason + "</p>";
|
||
html += " </div>";
|
||
html += "</li>";
|
||
});
|
||
html += "</ul></div>";
|
||
|
||
layer.tips(html, that, { time: 0, area: '500px', tips: [2, '#f0f0f0'], closeBtn: true });
|
||
}
|
||
});
|
||
}
|
||
});
|
||
|
||
function setbgcolor(lablename) {
|
||
var color = "#fff";
|
||
switch (lablename) {
|
||
case "复购": color = "#1E9FFF"; break;
|
||
case "升级意向": color = "#FF5722"; break;
|
||
case "购买": color = "#E400FF"; break;
|
||
case "消退": color = "#393D49"; break;
|
||
case "意向": color = "#FFB800"; break;
|
||
case "互动": color = "#800080"; break;
|
||
case "一般": color = "#009688"; break;
|
||
case "失联": color = "#999999"; break;
|
||
}
|
||
return color;
|
||
}
|
||
});
|
||
function showComplaintInfo(id) {
|
||
layui.use('layer', function () {
|
||
var layer = layui.layer;
|
||
layer.open({
|
||
title: '查看情况',
|
||
type: 2,
|
||
content: '/HgComplaint/ComplaintInfo?complaintLogId=' + id,
|
||
area: ['80%', '80%']
|
||
});
|
||
});
|
||
}
|
||
</script>
|
||
|
||
<div class="group content_title_width">
|
||
<span class="csicon UserInfoIcon"></span>
|
||
<span>客户基本信息</span>
|
||
<span class="righttitle">
|
||
<a href="#" onclick="BaseInfoLink_Click('fav','@Html.DisplayFor(p => p.map_ResId)')">收藏客户</a>
|
||
|
||
<a href="#" onclick="BaseInfoLink_Click('ec','@Html.DisplayFor(p => p.map_ResId)')">修改客户资料</a>
|
||
|
||
@if (info.ResCustomerList.Count > 1)
|
||
{
|
||
for (int i = 0; i < info.ResCustomerList.Count; i++)
|
||
{
|
||
if (info.ResCustomerList[i].RESID == Model.RESID)
|
||
{
|
||
if (info.ResCustomerList.Count - 1 > i)
|
||
{
|
||
<a href="#" onclick="BaseInfoNext_Click('@info.ResCustomerList[i+1].RESID')">下一个</a> }
|
||
else
|
||
{
|
||
<a href="#" onclick="BaseInfoNext_Click('@info.ResCustomerList[0].RESID')">下一个</a>
|
||
}
|
||
|
||
}
|
||
}
|
||
}
|
||
</span>
|
||
</div>
|
||
<div class="content_div">
|
||
@using (Html.BeginForm("CustomerBaseInfoUC", "CustomerInfo", null, FormMethod.Post, new { Id = "CreateForm", style = "margin:0 0 5px;" }))
|
||
{
|
||
<table class="layui-table content_width">
|
||
<tr>
|
||
<td>
|
||
客户ID:@Html.DisplayFor(p => p.UMID)
|
||
</td>
|
||
<td>
|
||
最后登陆时间:@Html.DisplayFor(p => p.RES_CUSTOMERDETAIL.ZX_USERID)
|
||
</td>
|
||
<td>
|
||
股票:@Html.DisplayFor(p => p.RES_CUSTOMERDETAIL.GUPIAO)
|
||
</td>
|
||
<td>
|
||
承受风险能力:@Html.DisplayFor(p => p.RES_CUSTOMERDETAIL.RISKTOLERANCE)
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
@*姓名:@Html.DisplayFor(p => p.map_CNAME)*@
|
||
姓名:@Html.Raw(string.IsNullOrWhiteSpace(ViewBag.CName)? Html.DisplayFor(p => p.map_CNAME) : ViewBag.CName)
|
||
</td>
|
||
<td>
|
||
客户分类:@Html.DisplayFor(p => p.RES_CUSTOMERDETAIL.CUSTOMERCATEGORY)
|
||
</td>
|
||
<td>
|
||
股龄:@Html.DisplayFor(p => p.RES_CUSTOMERDETAIL.OPERATIONTIME)
|
||
</td>
|
||
<td>
|
||
操作风格:@Html.DisplayFor(p => p.map_OpenrationTypeStr)
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
@*年龄:@Html.DisplayFor(p => p.map_BIRTHDAYAREASTR)*@
|
||
年龄:@Html.Raw(string.IsNullOrWhiteSpace(ViewBag.Age) ? Html.DisplayFor(p => p.map_BIRTHDAYAREASTR) : ViewBag.Age)
|
||
</td>
|
||
<td style="padding: 0px 5px;">
|
||
<span>
|
||
客户标签:
|
||
</span>
|
||
@{
|
||
var rfm = ViewBag.rfm as ResCustomerRfmDto;
|
||
if (rfm != null)
|
||
{
|
||
if (!string.IsNullOrEmpty(rfm.LableName))
|
||
{
|
||
<span class="layui-badge" style="height:28px; line-height:28px; background-color: @rfm.Color">@rfm.LableName</span>
|
||
}
|
||
}
|
||
|
||
var complaint = ViewBag.Complaint as ComplaintLabelDto;
|
||
if (complaint != null)
|
||
{
|
||
if (complaint.InComplaint)
|
||
{
|
||
<span class="layui-badge" style="height: 28px; line-height: 28px; background-color: red">内诉</span>
|
||
}
|
||
if (complaint.OutComplaint)
|
||
{
|
||
<span class="layui-badge" style="height: 28px; line-height: 28px; background-color: red">外诉</span>
|
||
}
|
||
}
|
||
|
||
var complaintId = (int)ViewBag.ComplaintId;
|
||
if (complaintId > 0)
|
||
{
|
||
<span class="layui-badge" onclick="showComplaintInfo('@Html.Raw(complaintId)')" style="cursor: pointer; height: 28px; line-height: 28px; background-color: orange">潜在风险</span>
|
||
}
|
||
|
||
if (rfm != null && !string.IsNullOrEmpty(rfm.AppUserId))
|
||
{
|
||
<span style="padding-left:20px;"><a href="javascript:void(0)" id="rfmrecord" data-value="@rfm.AppUserId">变更记录</a></span>
|
||
}
|
||
|
||
var ResTag = (List<Res_TagDto>)ViewBag.ResTag;
|
||
if (ResTag != null && ResTag.Count > 0)
|
||
{
|
||
foreach (var item in ResTag)
|
||
{
|
||
<span class="layui-badge" style='cursor: pointer; height: 28px; line-height: 28px; background-color:@Html.Raw(item.tag.Contains("退款")?"red":"")'>@Html.Raw(item.tag)</span>
|
||
}
|
||
}
|
||
}
|
||
<span style="padding-left:20px;"><a href="javascript:void(0)" id="setbiao" onclick="SetBiaoQian('@Html.DisplayFor(p => p.map_ResId)')" >设置</a></span>
|
||
</td>
|
||
<td>
|
||
资金量:@Html.DisplayFor(p => p.map_AMOUNTTYPEID)
|
||
<a href="javascript:SetZJL('@Html.DisplayFor(p => p.map_ResId)')">设置</a>
|
||
</td>
|
||
<td rowspan="2" valign="top">
|
||
产品版本:@Html.DisplayFor(p => p.map_OrderStr)
|
||
</td>
|
||
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
@*性别:@Html.DisplayFor(p => p.map_GENDER)*@
|
||
性别:@Html.Raw(string.IsNullOrWhiteSpace(ViewBag.Genger) ? Html.DisplayFor(p => p.map_GENDER) : ViewBag.Genger)
|
||
</td>
|
||
<td>
|
||
注册时间:@Html.DisplayFor(p => p.map_CTIME)
|
||
</td>
|
||
<td>
|
||
盈亏情况:@Html.DisplayFor(p => p.RES_CUSTOMERDETAIL.PROFITANDLOSS)
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
职业:@Html.DisplayFor(p => p.map_JOBTYPEID)
|
||
</td>
|
||
<td>
|
||
最后跟进人员:@Html.DisplayFor(p => p.map_LastSericeStaff)
|
||
</td>
|
||
<td>
|
||
仓位情况:@Html.DisplayFor(p => p.RES_CUSTOMERDETAIL.STOCKPOSITION)
|
||
</td>
|
||
<td> 地址:@Html.DisplayFor(p => p.map_ADDRESS_ALL)</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
收藏分类:@Html.Raw(ViewBag.FavoritesCustType)
|
||
</td>
|
||
<td>
|
||
加好友:@Html.Raw(Model.isBound == 1 ? "<font class='boundFont'>是</font>" : "否")
|
||
</td>
|
||
<td>
|
||
身份证地区:@ViewBag.IdCardAddr
|
||
</td>
|
||
<td>
|
||
@{ var quda = DataCacheHelper.GetCache().GetList_SubComType(WX.CRM.Model.Enum.ComType.CustomerType);
|
||
var entry = quda.FirstOrDefault(m => m.SUBTYPECODE == Model.map_CUSTOMERTYPEID);
|
||
var laiyuan = (entry == null ? "空" : entry.SUBTYPENAME);
|
||
|
||
}
|
||
渠道来源:@Html.Raw(laiyuan)
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
客户类型:@Html.Raw(Model.TYPE == 2 || Model.TYPE == 3 ? "企微客户" : "手机号客户")
|
||
</td>
|
||
<td>
|
||
是否注册:@Html.Raw(ViewBag.register == true ? "是" : "否")
|
||
</td>
|
||
<td>
|
||
IP访问地区:@ViewBag.IpAddr
|
||
</td>
|
||
<td>
|
||
@if (!string.IsNullOrEmpty(Model.RES_CUSTOMERDETAIL.REMARK))
|
||
{
|
||
<span>备注:@Html.Raw(Model.RES_CUSTOMERDETAIL.REMARK)</span>
|
||
}
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
|
||
}
|
||
</div>
|
||
|