101 lines
3.8 KiB
Plaintext
101 lines
3.8 KiB
Plaintext
@using WX.CRM.Model.Entity
|
|
@using WX.CRM.Common
|
|
@{
|
|
Layout = null;
|
|
}
|
|
<div class="group content_title_width">
|
|
<span class="csicon WeiXinIcon"></span>
|
|
<span>客户微信</span>
|
|
</div>
|
|
<div class="content_div">
|
|
<table class="layui-table content_width">
|
|
@{
|
|
int wkeid = (int)ViewBag.WorkwxEid;
|
|
string RoleCode = (string)ViewBag.RoleCodes;
|
|
bool isShowAllOrSelf = false;
|
|
if (RoleCode.IndexOf("[ZJ]") > -1 || RoleCode.IndexOf("[GLY]") > -1 || RoleCode.IndexOf("[ZJZG]") > -1 || RoleCode.IndexOf("[ZJZL]") > -1)
|
|
{
|
|
isShowAllOrSelf = true;
|
|
}
|
|
|
|
}
|
|
<thead>
|
|
<tr>
|
|
<td>用户名</td>
|
|
<td>昵称</td>
|
|
<td>微信号</td>
|
|
@if (isShowAllOrSelf == true)
|
|
{
|
|
<td>备注</td>
|
|
}
|
|
<td>工作微信号</td>
|
|
<td>客服昵称</td>
|
|
<td>员工</td>
|
|
<td>绑定时间</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
@foreach (System.Data.DataRow item in (ViewBag.RcontactList as System.Data.DataTable).Rows)
|
|
{
|
|
|
|
int eid = Convert.ToInt32(item["eid"]);
|
|
//if (isShowAllOrSelf == true || wkeid == eid)
|
|
//{
|
|
<tr>
|
|
<td>@Html.Raw(item["username"])</td>
|
|
<td>@Html.Raw(WX.CRM.Common.Utility.ReplaceMobile(item["nickname"]))</td>
|
|
<td>@Html.Raw(item["alias"])</td>
|
|
@if (isShowAllOrSelf == true)
|
|
{
|
|
<td>@Html.Raw(WX.CRM.Common.Utility.ReplaceMobile(item["conremark"]))</td>
|
|
}
|
|
<td>@Html.Raw(item["wokalias"])</td>
|
|
<td>@Html.Raw(item["woknickname"])</td>
|
|
<td>@Html.Raw(item["eid"].ToString() + "-" + item["uname"].ToString())</td>
|
|
<td>@Html.Raw(item["bindrestime"])</td>
|
|
</tr>
|
|
//}
|
|
}
|
|
<tr>
|
|
|
|
<td colspan="@Html.Raw(isShowAllOrSelf?7:6)">
|
|
<input disabled value="" type="text" style="width:150px;" id="wxUserName" />
|
|
<input type="hidden" id="workwxEid" value="@Html.Raw(ViewBag.WorkwxEid.ToString())" />
|
|
<input type="button" class="layui-btn layui-btn-sm layui-bg-cyan" onclick="ChooseCustomerWx()" value="选择微信" />
|
|
<input type="button" class="layui-btn layui-btn-sm layui-btn-normal" onclick="AddWxRcontactContact()" value="关联" />
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<script type="text/javascript">
|
|
function ChooseCustomerWx() {
|
|
$("#modalwindow").html(GetIframeHtml("/WeiXin/SzzyOrder/RContactIndex?eid=" + $('#workwxEid').val().trim()));
|
|
$("#modalwindow").window({ title: '选择客户微信', width: 650, height: 500, iconCls: 'icon-add' }).window('open');
|
|
}
|
|
function selectCustomerWx(userName) {
|
|
$('#wxUserName').val(userName);
|
|
}
|
|
function AddWxRcontactContact() {
|
|
var username = document.getElementById("wxUserName").value;
|
|
$.r_ajax({
|
|
url: "/WeiXin/WXRcontact/AddRcontactResId?resid=@ViewBag.ResId&userName=" + username,
|
|
type: "Post",
|
|
data: "",
|
|
dataType: "json",
|
|
loading: true,
|
|
success: function (data) {
|
|
if (data.type == 1) {
|
|
window.frameReturnByMes(data.message);
|
|
}
|
|
else {
|
|
//alert(data.message);
|
|
window.frameReturnByMes(data.message);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
</script>
|