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

171 lines
6.6 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>确认状态:<select id="SltMonStatus" name="SltMonStatus"><option value=""></option><option value="1">已确认</option><option value="0">未确认</option></select></li>
<li><span style="color: red;">本月实付金额不涉及到社保,公积金等的计算。实付金额计算公式:底薪+(有效资源*25*出勤率)-扣款缺勤+全勤</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>
<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/AuditPerformanceByAfterSale/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/AuditPerformanceByAfterSale/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/AuditPerformanceByAfterSale/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/AuditPerformanceByAfterSale/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);
}
}
});
}
</script>