217 lines
9.1 KiB
Plaintext
217 lines
9.1 KiB
Plaintext
@using WX.CRM.WebHelper
|
|
|
|
@{
|
|
ViewBag.Title = "员工业绩确认";
|
|
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
|
|
}
|
|
<style type="text/css">
|
|
#dlg4 ul li {
|
|
height: 20px;
|
|
line-height: 20px;
|
|
}
|
|
</style>
|
|
<div class="mvctool">
|
|
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
|
|
@Html.ToolButton("btnCheck", "icon-check", "组业绩确认", true)
|
|
@*@Html.ToolButton("btnCheck2", "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 {type = "2", onLoadSucced = "onLoadSucced()", controlName = "nb1", roleCodes = ViewBag.roleCodes, saledeptid = "", salegroupid = ViewBag.userGroupId})</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()" />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id="dlg3" class="easyui-dialog" closed="true" style="width: 600px; height: 400px; padding: 10px;">
|
|
<ul>
|
|
<li>出单人数:<span id="orderRate"></span></li>
|
|
<li>出单提成比例:<span id="orderCommissionRate" style="color:red"></span></li>
|
|
<li>缺勤人数:<span id="chuqinGroupRate"></span></li>
|
|
<li>全勤提成比例:<span id="chuqinGroupCommissionRate" style="color:red"></span></li>
|
|
<li>离职人数:<span id="dismissRate"></span></li>
|
|
<li>无离职提成比例:<span id="dismissCommissionRate" style="color:red"></span></li>
|
|
</ul>
|
|
</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>
|
|
<script type="text/javascript">
|
|
//function onLoadBeforeData() {
|
|
// return "&balanceCode=" + $("#slt_opMonth").val();
|
|
//}
|
|
|
|
$(function () {
|
|
$(window).resize(function () {
|
|
$('#tablist').tablegrid('resize', {
|
|
height: $(window).height() - 110
|
|
});
|
|
});
|
|
$("#tablist1").tablegrid({
|
|
url: '/qh/MonthlyGroupPerformanceAudit/index',
|
|
height: $(window).height() / 2 - 110,
|
|
loadNow: true,
|
|
data: GetControlValue()
|
|
});
|
|
|
|
$("#btnQuery").click(function () {
|
|
//$('#tablist1').tablegrid("Search");
|
|
//$('#tablist2').tablegrid("Search");
|
|
LoadData();
|
|
});
|
|
$("#btnCheck").click(function () {
|
|
var row = $("#tablist1").tablegrid("getSelected");
|
|
if (row != null) {
|
|
AuditSingle(row.pkid, row.uname, row.eid);
|
|
} else { $.messageBox5s('提示', "选中要确认的数据!"); }
|
|
});
|
|
|
|
$("#Other3").click(function () {
|
|
AuditBatch();
|
|
});
|
|
});
|
|
//function onLoadSucced() {
|
|
// LoadData();
|
|
//}
|
|
function LoadData() {
|
|
$("#tablist1").tablegrid({
|
|
url: '/qh/MonthlyGroupPerformanceAudit/index',
|
|
height: $(window).height() - 110,
|
|
loadNow: true,
|
|
data: GetControlValue()
|
|
});
|
|
}
|
|
function GetControlValue() {
|
|
return {
|
|
saleDeptId: $("#nb1_uc_org_depts").val()
|
|
, groupId: $("#nb1_uc_org_groups").val()
|
|
, userId: $("#nb1_uc_org_ids").val()
|
|
, status: $("#SltMonStatus").find("option:selected").text()
|
|
//, SltMonDate: $("#SltMonDate").val()
|
|
//, SltMonStatus: $("#SltMonStatus").val()
|
|
//, SltDismStatus: $("#SltDismStatus").val()
|
|
//, SltValueStaus: $("#SltValueStaus").val()
|
|
, balanceCode: $("#slt_opMonth").val()
|
|
};
|
|
}
|
|
//获取datagrid头部及字段
|
|
function getDataGridHeader() {
|
|
var columns = $('#tablist1').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("/qh/MonthlyGroupPerformanceAudit/Export?" + GetQueryStr() + "&SltValueStaus=" + $("#SltValueStaus").val() + "&SltDismStatus=" + $("#SltDismStatus").val() + "&status=" + $("#SltMonStatus").find("option:selected").text() + "&balanceCode=" + $('#slt_opMonth').val() + "&groupId=" + $("#nb1_uc_org_groups").val() + "&userId=" + $("#nb1_uc_org_ids").val() + "&winrand=" + Math.random())));
|
|
$("#modalwindow").window({ title: '导出', width: 480, height: 300, iconCls: 'icon-export' }).window('open');
|
|
}
|
|
|
|
function InitBalanceDate(mcode) {
|
|
/*$("#SltMonDate").get(0).options.length = 0;//清空历史值*/
|
|
/*$("#SltMonDate").empty();
|
|
$("<option></option>").val("-选择-").text("-选择-").appendTo($("#SltMonDate"));
|
|
$.getJSON("/Gjs/Gjs_AuditPerformanceByUser/GetMonDateList?mcode=" + mcode+"&winrand="+Math.random(), function (data) {
|
|
$.each(data, function (i, item) {
|
|
if (i == 0) {
|
|
$("<option selected=\"selected\"></option>").val(item).text(item).appendTo($("#SltMonDate"));
|
|
} else {
|
|
$("<option></option>").val(item).text(item).appendTo($("#SltMonDate"));
|
|
}
|
|
});
|
|
LoadData();
|
|
});*/
|
|
}
|
|
|
|
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: "/qh/MonthlyGroupPerformanceAudit/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');
|
|
$("#tablist1").tablegrid("Load");
|
|
$("#tablist2").tablegrid("Load");
|
|
$.messageBox5s('提示', data.remark);
|
|
}
|
|
else {
|
|
$.messageBox5s('提示', data.remark);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
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 });
|
|
}
|
|
</script>
|