151 lines
4.9 KiB
Plaintext
151 lines
4.9 KiB
Plaintext
@model WX.CRM.Model.Entity.WX_MANUALADDWEIXINFRIEND
|
|
@using WX.CRM.WebHelper;
|
|
|
|
@{
|
|
ViewBag.Title = "手工微信好友录入";
|
|
Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
|
|
|
|
}
|
|
|
|
|
|
<div class="mvctool bgb">
|
|
@Html.ToolButtonPlain("btnSave", "icon-save", "保存", false, "")
|
|
</div>
|
|
|
|
@using (Html.BeginForm("Add", "ManualAddWeixinFriend", null, FormMethod.Post, new { Id = "CreateForm" }))
|
|
{
|
|
@Html.ValidationSummary(true)
|
|
<table class="fromEditTable ">
|
|
|
|
<tr>
|
|
<td style="width:120px;">
|
|
资源手机号
|
|
</td>
|
|
<td style="width:310px">
|
|
<input type="text" name="mobile" id="mobile" />
|
|
</td>
|
|
<td width="120px">
|
|
必须填线下资源库的手机号
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="width:120px;">
|
|
工作微信
|
|
</td>
|
|
<td style="width:310px">
|
|
<input type="text" name="WORKALIAS" id="WORKALIAS" />
|
|
</td>
|
|
<td width="120px"></td>
|
|
</tr>
|
|
<tr>
|
|
|
|
<td style="width:152px;">
|
|
客户微信用户名
|
|
</td>
|
|
<td style="width:383px">
|
|
<input disabled value="" id="wxUserName" />
|
|
@Html.HiddenFor(m => m.USERNAME, new { style = "width:200px;" }) <input type="button" onclick="ChooseCustomerWx()" value="选择微信用户" />
|
|
</td>
|
|
<td width="120px"></td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td style="width:120px;">
|
|
添加方式
|
|
</td>
|
|
<td style="width:310px">
|
|
<select id="ADDTYPE" name="ADDTYPE" style="height:22px;">
|
|
<option value="1">电话</option>
|
|
<option value="2">通讯录扫码</option>
|
|
</select>
|
|
</td>
|
|
<td width="120px"></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="width:120px;">
|
|
录音ID
|
|
</td>
|
|
<td style="width:310px">
|
|
<input type="text" name="RECORDID" id="RECORDID" />
|
|
</td>
|
|
<td width="120px"></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div id="modalwindow" class="easyui-window" data-options="modal:true,closed:true,minimizable:false,shadow:false"></div>
|
|
|
|
}
|
|
<script type="text/javascript">
|
|
var userNameRequired = "@ViewBag.userNameRequired";
|
|
$(function () {
|
|
$("#btnSave").click(function () {
|
|
if ($("#CreateForm").valid()) {
|
|
$.r_ajax({
|
|
url: "/WeiXin/ManualAddWeixinFriend/Add",
|
|
type: "Post",
|
|
data: $("#CreateForm").serialize(),
|
|
dataType: "json",
|
|
loading: true,
|
|
success: function (data) {
|
|
if (data.type == 1) {
|
|
//window.parent.frameReturnByMes(data.message);
|
|
window.parent.frameReturnByMes('创建成功');
|
|
window.parent.frameReturnByReload(true);
|
|
window.parent.frameReturnByClose();
|
|
}
|
|
else {
|
|
$.messager.alert("警告", data.message, "error");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
return false;
|
|
});
|
|
|
|
$("#btnQuery").click(function () {
|
|
$('#tablist').tablegrid("Search");
|
|
});
|
|
|
|
/*$('#productId').val('20008');
|
|
changeselect('20008');*/
|
|
});
|
|
|
|
|
|
|
|
function sourceselect(val) {
|
|
if (userNameRequired === "0") {
|
|
if (val == 1) {
|
|
$('#customerSource').css('display', 'block');
|
|
} else {
|
|
$('#CUSTOMERUSERNAME').val('');
|
|
$('#wxUserName').val('');
|
|
$('#customerSource').css('display', 'none');
|
|
}
|
|
}else {
|
|
$('#customerSource').css('display', 'block');
|
|
}
|
|
}
|
|
|
|
function selectCustomerWx(userName) {
|
|
$('#wxUserName').val(userName);
|
|
$('#USERNAME').val(userName);
|
|
}
|
|
|
|
function ChooseCustomerWx() {
|
|
var workAlias = $('#WORKALIAS').val();
|
|
if (workAlias == undefined || workAlias == '') {
|
|
$.messager.alert("警告", '工作微信不能为空!', "error");
|
|
return;
|
|
}
|
|
$("#modalwindow").html(GetIframeHtml("/WeiXin/ManualAddWeixinFriend/RContactIndex?workAlias=" + workAlias));
|
|
$("#modalwindow").window({ title: '选择客户微信', width: 650, height: 500, iconCls: 'icon-add' }).window('open');
|
|
}
|
|
|
|
function GetIframeHtml(src) {
|
|
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0'' src='" + src + "'></iframe>";
|
|
}
|
|
|
|
function frameReturnByClose() {
|
|
$("#modalwindow").window('close');
|
|
}
|
|
</script> |