ComplianceServer/oldcode/WEB/Views/Csvr/CustomerInfo/getResIdsByCustomerIds.cshtml

122 lines
5.6 KiB
Plaintext

@using WX.CRM.WebHelper;
@{
ViewBag.Title = "旧customerID转resId";
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
}
<link href="~/Content/main.css" rel="stylesheet" />
@*<div class="group ">
<img src="~/Content/Images/communication.gif">
<span>旧客户id转新客户ID</span>
</div>*@
<div class="mvctool bgb">
@Html.ToolButtonPlain("btnSave", "icon-check", "转换", false, "")
</div>
<form id="frmUpload" method="post" action="/Csvr/CustomerInfo/getCustomerIdsAndResIds" enctype="multipart/form-data">
<input id="FileType" name="FileType" type="hidden" value="" />
<input id="TrunType" name="TrunType" type="hidden" value="" />
<div class="formContent">
<div style="width:930px;">
<div class="easyui-tabs" style="height: auto; padding: 0px; margin: 0px; width:930px;" id="batchMible">
<div title="批量转换" style="padding: 5px; width:930px;">
<table class="fromEditTable mainTable" style="border-top:1px dashed #ccc; width:930px;">
<tbody>
<tr>
<td style="width:100px;">
类型:<select id="cmbActive1" name="cmbActive1">
@*<option value="1">旧ID转新ID</option>
<option value="2">新ID转旧ID</option>
<option value="3">交易商代码转客户ID</option>
<option value="4">客户ID转交易商代码</option>*@
<option value="5">用户名转客户ID</option>
<option value="6">手机号码转客户ID</option>
</select>
</td>
<td></td>
</tr>
<tr>
<td style="width:280px;">
<span style="height:300px; line-height:300px;">转换前:</span>
<textarea id='txtoldId' cols="90" rows="7" name="txtoldId" style="width:280px;height:300px;"></textarea>
</td>
<td style="width:380px;">
<span style="height:300px; line-height:300px;">转换后: </span><textarea id='txtnewId' cols="90" rows="7" name="txtnewId" style="width:280px;height:300px;"></textarea>
</td>
</tr>
</tbody>
</table>
<div style="clear:both;"></div>
</div>
<div title="文件上传导入" style="padding: 5px;">
<table>
<tr>
<td>类型:</td>
<td>
<select id="cmbActive2" name="cmbActive2">
<option value="1">旧ID转新ID</option>
<option value="2">新ID转旧ID</option>
<option value="3">交易商代码转客户ID</option>
<option value="4">客户ID转交易商代码</option>
<option value="5">用户名转客户ID</option>
<option value="6">手机号码转客户ID</option>
</select>
<br />
</td>
</tr>
<tr>
<td><br />文件:</td>
<td>
<br />
<input id="FileMobile" name="FileMobile" type="file" />
<br />
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<iframe id="customerOpen" width="0" height="0" scrolling="no" frameborder="0" style="display:none;"></iframe>
</form>
<script type="text/javascript">
$(function () {
$('#frmUpload').ajaxForm({
dataType: 'text',
beforeSend: ForEverajaxLoading,
complete: ForEverajaxLoadEnd,
success: function (getdata) {
// console.log(getdata);
var data = JSON.parse(getdata);
if (data.result) {
if (data.type == "批量") {
$("#txtnewId").val(data.ResIds)
}
else if (data.type == "文件") {
$("#customerOpen").attr("src", "/CustomerInfo/CustomerIdOrResId?path=" + data.path + "&selecttype=" + data.selecttype);
// window.open();
}
} else {
$.messageBox5s('提示', data.message);
}
}
});
$("#btnSave").click(function () {
var $texoldId, $txtnewId, title, type;
$texoldId = $("#txtoldId");
$txtnewId = $("#txtnewId");
title = $("#batchMible .tabs-selected").text();
type = (title == "批量转换" && $("#cmbActive1").val()) || (title == "文件上传导入" && $("#cmbActive2").val())
$txtnewId.html("");
//console.log(title);
$("#FileType").val(title);
$("#TrunType").val(type);
$('#frmUpload').submit();
});
})
</script>