ComplianceServer/oldcode/WEB/Views/WeiXin/AuditPerformanceByUserThree/Index.cshtml

219 lines
9.0 KiB
Plaintext

@using WX.CRM.WebHelper
@{
ViewBag.Title = "三部员工业绩确认";
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
}
<script src="~/Scripts/op/ofixedtable.js"></script>
<div class="mvctool">
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
@Html.ToolButton("btnCheck", "icon-check", "确认", true)
@*@Html.ToolButton("btnBatchCheck", "icon-check", "批量确认", 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.DropDownList("slt_opMonth", new WX.CRM.WEB.Handler.ControlResource().GetAllOpMonthAndYearList())
</li>
@*<li>@Html.Action("UserComBoxByRole", "Control", new { controlName = "nb1", onLoadSucced = "onLoadSucced()", roleCodes = ViewBag.roleCodes, saledeptid = "", salegroupid = ViewBag.userGroupId, iseid = "0", inneruserid = ViewBag.inneruserid })</li>*@
@*<li>月结时间:<select id="SltMonDate">
<option>-选择-</option>
</select>
</li>*@
<li>
确认状态:<select id="SltMonStatus" name="SltMonStatus"><option value=""></option><option value="1">已确认</option><option value="0">未确认</option></select>
</li>
<li><span style="color: red;">本月实付金额不涉及到社保,公积金等的计算。实付金额计算公式:底薪+本月应发金额+预留返还金额-退款-扣款缺勤+全勤</span></li>
</ul>
</div>
@Html.Raw(ViewBag.RptList)
</div>
<div id="dlg4" class="easyui-dialog" closed="true" style="width: 600px; height: 400px; padding: 10px">
<table>
<tr>
<td width="120" align="right">姓名:</td>
<td align="left">
<input id="grouperName" name="grouperName" type="text" style="width:120px;" disabled="disabled" />
<input id="auditPkid" type="hidden" value="0" />
<input id="GrouperEID" type="hidden" value="0" />
</td>
</tr>
<tr>
<td align="right">状态:</td>
<td>
<input type='radio' value='1' name='chkauditsta' checked='checked' />通过
<input type='radio' value='2' name='chkauditsta'>不通过
</td>
</tr>
<tr>
<td align="right">备注:</td>
<td><textarea id="TxtRemark" rows="2" cols="40"></textarea></td>
</tr>
<tr>
<td colspan="2" align="right">
<input id="BtnAudit" name="BtnAudit" type="button" value="确认" onclick="Btn_Audit()" /> &nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
</table>
</div>
<div id="dlg5" class="easyui-dialog" closed="true" style="width: 600px; height: 400px; padding: 10px;">
<ul>
<li>确认时间:<span id="AUDITTIME"></span></li>
<li>确认人:<span id="AUDITBYUSERNAME"></span></li>
<li>说明:<span id="REMARK"></span></li>
</ul>
</div>
<div id="dlg1" class="easyui-dialog" closed="true" style="width: 600px; height: 400px; padding: 10px;">
<ul>
<li>底薪:<span id="dixing" style="color:red">2000</span></li>
<li>交通补贴:<span id="jiaotong" style="color:red">200</span></li>
<li>岗位补贴:<span id="gangwei" style="color:red"></span></li>
<li id="haszhengshu" style="display: none">有证书:<span id="zhengshu" style="color:red"></span></li>
</ul>
</div>
<script type="text/javascript">
$(function () {
var ofix1 = null;
$(window).resize(function () {
$('#tablist').tablegrid('resize', {
height: $(window).height() - 110
});
if (ofix1 != null)
ofix1.resize();
});
$("#tablist").tablegrid({
url: '/weixin/AuditPerformanceByUserThree/index',
height: $(window).height() - 110,
loadNow: true,
data: GetControlValue,
onLoadSuccess: function (data) {
if (ofix1 == null) {
ofix1 = new oFixedTable('ofix1', document.getElementById('tablist'), {});
} else {
ofix1.resize();
}
}
});
$("#btnQuery").click(function () {
$('#tablist').tablegrid("Search");
});
$("#btnCheck").click(function () {
var row = $("#tablist").tablegrid("getSelected");
if (row != null) {
AuditSingle(row.pkid, row.uname, row.eid);
} else { $.messageBox5s('提示', "选中要确认的数据!"); }
});
$("#Other3").click(function () {
AuditBatch();
});
});
function GetControlValue() {
return {
status: $("#SltMonStatus").find("option:selected").text()
, balanceCode: $("#slt_opMonth").val()
};
}
function frameReturnByClose() {
$("#modalwindow").window('close');
}
function frameReturnByReload(flag) {
$("#tablist").tablegrid("Load");
}
//获取datagrid头部及字段
function getDataGridHeader() {
var columns = $('#tablist').tablegrid("getHead");
return columns;
}
function GetIframeHtml(src) {
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0' src='" + src + "'></iframe>";
}
function BtnExportAll_Click() {
$("#modalwindow").html(GetIframeHtml("/Control/ExcelExport?Query=" + encodeURIComponent("/weixin/AuditPerformanceByUserThree/Export?" + GetQueryStr() + "&status=" + $("#SltMonStatus").find("option:selected").text() + "&balanceCode=" + $('#slt_opMonth').val() + "&winrand=" + Math.random())));
$("#modalwindow").window({ title: '导出', width: 480, height: 300, iconCls: 'icon-export' }).window('open');
}
function AuditSingle(pkid, grouperNmae, groupereid) {
$("#auditPkid").val(pkid);
$("#grouperName").val(grouperNmae);
$("#TxtRemark").val("");
$("#GrouperEID").val(groupereid);
$('#dlg4').dialog({
title: "员工业绩确认",
width: 550,
height: 250,
closed: false,
cache: false,
modal: true
});
}
function Btn_Audit() {
var v_id = $("#auditPkid").val();
var v_remark = $("#TxtRemark").val();
var v_eid = $("#GrouperEID").val();
var v_sta = $("input:radio[name=chkauditsta]:checked").val();
$.r_ajax({
url: "/weixin/AuditPerformanceByUserThree/GetAuditPerformance",
type: "Post",
data: { PKID: v_id, PSTATUS: v_sta, REMARK: v_remark, EID: v_eid },
dataType: "json",
loading: true,
success: function (data) {
if (data.result == 1) {
$('#dlg4').dialog('close');
frameReturnByReload();
$.messageBox5s('提示', data.remark);
}
else {
$.messageBox5s('提示', data.remark);
}
}
});
}
function AuditBatch() {
var v_balanceCode = $("#slt_opMonth").val();
$.r_ajax({
url: "/weixin/AuditPerformanceByUserThree/BatchAuditPerformance",
type: "Post",
data: { balanceCode: v_balanceCode },
dataType: "json",
loading: true,
success: function (data) {
if (data.result == 1) {
frameReturnByReload();
$.messageBox5s('提示', data.remark);
}
else {
$.messageBox5s('提示', data.remark);
}
}
});
}
function GetRefundInfo(inneruserid,yearmonth) {
if (inneruserid != undefined && inneruserid.length != 0 && inneruserid != 0) {
$("#modalwindow").html(GetIframeHtml("/WeiXin/SzzyOrderRefundThree/Info?inneruserid=" + inneruserid + "&yearmonth=" + yearmonth + "&Ieguid=" + GetGuid()));
$("#modalwindow").window({ title: '退款信息', width: 830, height: 550, iconCls: 'icon-edit' }).window('open');
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
}
function Show2(AUDITTIME, AUDITBYUSERNAME, REMARK) {
$("#AUDITTIME").html(AUDITTIME);
$("#AUDITBYUSERNAME").html(AUDITBYUSERNAME);
$("#REMARK").html(REMARK);
$('#dlg5').dialog({ title: "确认情况", width: 550, height: 250, closed: false, cache: false, modal: true });
}
function ShowDiXing(gangwei, zhengshu) {
$("#gangwei").html(gangwei);
$("#zhengshu").html(zhengshu);
if (zhengshu > 0) {
$("#haszhengshu").show();
} else {
$("#haszhengshu").hide();
}
$('#dlg1').dialog({ title: "底薪明细", width: 550, height: 250, closed: false, cache: false, modal: true });
}
</script>