142 lines
5.4 KiB
Plaintext
142 lines
5.4 KiB
Plaintext
@using WX.CRM.WebHelper;
|
|
@{
|
|
ViewBag.Title = "员工组别调动日志";
|
|
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>@Html.Action("UserComBoxByRole", "Control", new { type = "2", onLoadSucced = "onLoadSucced1()", controlName = "nb1", roleCodes = ViewBag.roleCodes, saledeptid = "", salegroupid = ViewBag.userGroupId, labGroupTitle = "调入组别" })</li>
|
|
<li>@Html.Action("UserComBoxByRole", "Control", new { type = "2", onLoadSucced = "onLoadSucced2()", controlName = "nb2", roleCodes = ViewBag.roleCodes, saledeptid = "", salegroupid = ViewBag.userGroupId, labGroupTitle = "调出组别" })</li>
|
|
@*<li>调入组别:<input type="text" name="txt_inGroupId" id="txt_inGroupId" style="width:150px;" /> </li>
|
|
<li>调出组别:<input type="text" name="txt_outGroupId" id="txt_outGroupId" style="width:150px;" /> </li>*@
|
|
<li>员工工号:<input type="text" name="txt_eid" /> </li>
|
|
<li>员工姓名:<input type="text" name="txt_userName" /> </li>
|
|
<li>
|
|
<input type="hidden" name="txt_inGroupId" id="txt_inGroupId" />
|
|
<input type="hidden" name="txt_outGroupId" id="txt_outGroupId" />
|
|
@*@Html.ToolButtonPlain("btnQuery" , "icon-search", "查询", false, "")*@
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
@Html.Raw(ViewBag.gridTable)
|
|
</div>
|
|
<div id="modalwindow2" class="easyui-window" data-options="modal:true,closed:true,minimizable:false,shadow:false">
|
|
<div class="mvctool bgb" noControl>
|
|
@Html.ToolButtonPlain("btnSave", "icon-save", "保存", false, "")
|
|
</div>
|
|
<div id="myid">
|
|
<table class="layui-table ">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
调入日期:
|
|
</td>
|
|
<td>
|
|
@Html.WdatePickerText("up_inDate", "")
|
|
@Html.Hidden("up_pkid", 0)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
调出日期:
|
|
</td>
|
|
<td>
|
|
@Html.WdatePickerText("up_outDate", "")
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
function onLoadSucced1() {
|
|
xmkss++;
|
|
LoadSucee();
|
|
}
|
|
function onLoadSucced2() {
|
|
xmkss++;
|
|
LoadSucee();
|
|
}
|
|
var xmkss = 0;//调用次数
|
|
function LoadSucee() {
|
|
if (xmkss >= 2)
|
|
$('#tablist').tablegrid("Search");
|
|
}
|
|
$(function () {
|
|
$('#tablist').tablegrid({
|
|
url: '/Base/UserGroupChangerLog/GetHtmlList',
|
|
height: $(window).height() - 110,
|
|
loadNow: false,
|
|
data: GetControlValue,
|
|
onLoadSuccess: function (data) {
|
|
//成功
|
|
}, onLoadError: function (ex) {
|
|
//失败
|
|
}
|
|
});
|
|
function GetControlValue() {
|
|
return { inGroupId: $("#nb1_uc_org_groups").val(), outGroupId: $("#nb2_uc_org_groups").val() };
|
|
}
|
|
$("#btnQuery").click(function () {//搜索按钮点击事件
|
|
$('#tablist').tablegrid("Search");
|
|
});
|
|
$(window).resize(function () {//自动适应大小
|
|
$('#tablist').tablegrid('resize', {
|
|
height: $(window).height() - 110
|
|
});
|
|
});
|
|
$("#btnSave").click(function () {
|
|
$.r_ajax({
|
|
url: "/Base/UserGroupChangerLog/UpdateTime",
|
|
type: "Post",
|
|
data: { pkid: $("#up_pkid").val(), inDate: $("#up_inDate").val(), outDate: $("#up_outDate").val() },
|
|
dataType: "json",
|
|
loading: true,
|
|
success: function (data) {
|
|
if (data.type == 1) {
|
|
frameReturnByMes(data.message);
|
|
frameReturnByReload(true);
|
|
frameReturnByClose();
|
|
}
|
|
else {
|
|
frameReturnByMes(data.message);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
|
|
function frameReturnByClose() {
|
|
$("#modalwindow2").window('close');
|
|
}
|
|
function frameReturnByReload(flag) {
|
|
$("#tablist").tablegrid("Load");
|
|
}
|
|
function frameReturnByMes(mes) {
|
|
$.messageBox5s('提示', mes);
|
|
}
|
|
</script>
|
|
@*ToolBar事件处理*@
|
|
<script type="text/javascript">
|
|
function Update_Click() {
|
|
var row = $('#tablist').tablegrid('getSelected');
|
|
if (row != null) {
|
|
$("#up_pkid").val(row.PKID);
|
|
$("#up_inDate").val(row.INDATE);
|
|
if (row.OUTDATE == "2050-01-01")
|
|
$("#up_outDate").attr("disabled", "disabled");
|
|
else
|
|
$("#up_outDate").removeAttr("disabled");
|
|
$("#up_outDate").val(row.OUTDATE);
|
|
|
|
$("#modalwindow2").window({ title: '编辑', width: 400, height: 220, iconCls: 'icon-edit' }).window('open');
|
|
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
|
|
}
|
|
|
|
</script>
|