92 lines
3.1 KiB
Plaintext
92 lines
3.1 KiB
Plaintext
@using WX.CRM.WebHelper
|
||
|
||
@{
|
||
ViewBag.Title = "TraderUpdate";
|
||
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
|
||
}
|
||
<div class="mvctool">
|
||
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
|
||
@Html.Action("ToolBar", "Control", ViewBag.ToolBar as ToolBar)
|
||
</div>
|
||
|
||
<div class="bas_datagrid">
|
||
<div id="tb" style="padding:5px;height:auto" class="grid_toolbar">
|
||
<ul class="toolBar_ul">
|
||
<li>软件用户名:<input type="text" name="txt_SoftName" style="width:120px;" /> </li>
|
||
<li>客户ID:<input type="text" name="txt_ResID" style="width:120px;" /> </li>
|
||
<li>工号:<input type="text" name="txt_SaleEid" value="9999" /> </li>
|
||
<li>
|
||
@*@Html.ToolButtonPlain("btnQuery" , "icon-search", "查询", false, "")*@
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
@Html.Raw(ViewBag.GroupList)
|
||
</div>
|
||
|
||
<script type="text/javascript">
|
||
$(function () {
|
||
|
||
$('#tablist').tablegrid({
|
||
url: '/Soft_Customer/GetSaleUserAssignList',
|
||
height: $(window).height() - 130,
|
||
loadNow: false,
|
||
isPage: true,
|
||
data: GetControlValue
|
||
});
|
||
function GetControlValue() {
|
||
return { groupId: $("#nb1_uc_org_groups").val() };
|
||
}
|
||
$('#tablist').tablegrid("Load");
|
||
$("#btnQuery").click(function () {
|
||
$('#tablist').tablegrid("Search");
|
||
});
|
||
});
|
||
function onLoadSucced() {
|
||
$("#tablist").tablegrid("Search");
|
||
}
|
||
function frameReturnByClose() {
|
||
$("#modalwindow").window('close');
|
||
}
|
||
|
||
function frameReturnByReload(flag) {
|
||
$("#tablist").tablegrid("Load");
|
||
}
|
||
|
||
function frameReturnByMes(mes) {
|
||
$.messageBox5s('提示', mes);
|
||
}
|
||
|
||
function Complete_Click() {
|
||
var inputValue = [];
|
||
$("input[name='Trader']").each(function () {
|
||
if ($(this).val() !== "") {
|
||
inputValue.push({ Id: $(this).attr("id"), oldUserId: $(this).attr("oldTUser"), newUserId: $(this).val(), tradeCode: $(this).attr("tradeCode") });
|
||
}
|
||
|
||
})
|
||
// console.log(inputValue);
|
||
if (inputValue.length > 0) {
|
||
$.r_post("/Soft_Customer/SoftCustomerSalerCommit", { trader: JSON.stringify(inputValue) }, function (data) {
|
||
if (data.type === 1) {
|
||
$("#tablist").tablegrid('Load');
|
||
$.messageBox5s('提示', data.message);
|
||
}
|
||
else if (data.type === 10) {
|
||
CRM_Comon({}).showErrors(data.errors);
|
||
}
|
||
|
||
|
||
}, "json");
|
||
}
|
||
else {
|
||
$.messageBox5s('提示', '请输入要变更的工号');
|
||
}
|
||
}
|
||
function GetIframeHtml(src) {
|
||
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0'' src='" + src + "'></iframe>";
|
||
}
|
||
function ListComplete_Click() {
|
||
$("#modalwindow").html(GetIframeHtml("/Soft/Soft_Customer/ListOfSoftSalerCommit"));
|
||
$("#modalwindow").window({ title: '批量修改', width: 700, height: 400, iconCls: 'icon-add' }).window('open');
|
||
}
|
||
</script> |