You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1202 lines
51 KiB
1202 lines
51 KiB
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase
|
|
@{
|
|
ViewBag.Title = "员工业绩流水表";
|
|
Layout = "Shared/_ReportLayout.cshtml";
|
|
ViewBag.PrintSupport = false;
|
|
ViewBag.PreviewSupport = false;
|
|
ViewBag.ExportSupport = true;
|
|
}
|
|
|
|
<script language="javascript" type="text/javascript">
|
|
|
|
var gridEmployee = null;
|
|
var gridItem = null;
|
|
var gridGoods = null;
|
|
var gridCourse = null;
|
|
var gridCoursePack = null;
|
|
var gridCard = null;
|
|
|
|
|
|
var param = null;
|
|
|
|
var itemData = null;
|
|
var goodsData = null;
|
|
var cardData = null;
|
|
var courseData = null;
|
|
var itemSum = null;
|
|
var goodsSum = null;
|
|
var cardSum = null;
|
|
var totalSum = null;
|
|
var courseSum = null;
|
|
var currItemSum = null;
|
|
var currGoodsSum = null;
|
|
var currCardSum = null;
|
|
var currCourseSum = null;
|
|
var currCoursePackSum = null;
|
|
var currentEmpNo = "";
|
|
var companyInput = null;
|
|
var groupInput = null;
|
|
|
|
|
|
// window.onerror = handleError;
|
|
|
|
$(document).ready(function () {
|
|
|
|
gridEmployee = mini.get("gridEmployee");
|
|
gridItem = mini.get("gridItem");
|
|
gridGoods = mini.get("gridGoods");
|
|
gridCourse = mini.get("gridCourse");
|
|
gridCoursePack = mini.get("gridCoursePack");
|
|
gridCard = mini.get("gridCard");
|
|
|
|
|
|
var companys = getAllowCompanys();
|
|
companyInput = new MultiSelectEdit(
|
|
{
|
|
objectId: "companyInput",
|
|
data: companys,
|
|
idField: "Id",
|
|
parentIdField: "ParentId",
|
|
valueField: "No",
|
|
textField: "Abbr",
|
|
// idAllValue:-1
|
|
});
|
|
var company = getLoginCompany();
|
|
companyInput.setValue(company.No);
|
|
|
|
|
|
var groups = getBasicTypesByKey("EmployeeGroup");
|
|
//groups.insert(0, { Id: 0, No: "*", Name: "全部" });
|
|
groupNoInput = mini.getByName("groupNo", this.id);
|
|
groupNoInput.setData(groups);
|
|
|
|
var groupTree = groupNoInput.tree;
|
|
groupTree.expandOnDblClick = false;
|
|
groupTree.enableHotTrack = true;
|
|
groupTree.showExpandButtons = false;
|
|
groupTree.autoCheckParent = false;
|
|
|
|
|
|
bindRange(mini.get("fromDate"),mini.get("toDate"));
|
|
var today = new Date().format("yyyy-MM-dd");
|
|
mini.get("fromDate").setValue(today);
|
|
mini.get("toDate").setValue(today);
|
|
|
|
bindDateShortcut("dateShortcut","fromDate","toDate");
|
|
|
|
gridEmployee.on("select",function(e){
|
|
var empNo = e.record.EmpNo;
|
|
filterEmployee(empNo);
|
|
});
|
|
|
|
//更改排序后重新加载
|
|
gridItem.on("beforeload", function (e) {
|
|
e.cancel = true;
|
|
if(currentEmpNo)
|
|
filterEmployee(currentEmpNo);
|
|
});
|
|
|
|
//绑定grid事件
|
|
function bingGridEvents(grid){
|
|
grid.on("drawcell",function(e){
|
|
//点击单号跳转到指定的单据
|
|
if(e.field == "BillTime"){
|
|
var repayBillTime = e.record.RepayBillTime;
|
|
if(repayBillTime && repayBillTime != ''){
|
|
e.cellHtml = '<div>欠款时间:' +e.record.BillTime + '</div><div>还款时间:' + repayBillTime + '</div>' ;
|
|
}
|
|
}
|
|
else if(e.field == "BillNo"){
|
|
|
|
try {
|
|
|
|
var record = e.record;
|
|
var column = e.column;
|
|
var billNo = e.value;
|
|
var bizType = record.Category;
|
|
var compNo = param.compNo;
|
|
|
|
|
|
var repayBillNo = record.RepayBillNo;
|
|
if(repayBillNo && repayBillNo != ''){
|
|
var repayBillType = 'Repay';
|
|
e.cellHtml = '<div>欠款单:<a href="javascript:myOpenBill(\'' + compNo + '\', \'' + bizType + '\',\'' + billNo + '\')">'+billNo+'</a> </div> <div>还款单:<a href="javascript:myOpenBill(\'' + compNo + '\', \'' + repayBillType + '\',\'' + repayBillNo + '\')">'+repayBillNo+'</a> </div>'
|
|
}else{
|
|
e.cellHtml = '<a href="javascript:myOpenBill(\'' + compNo + '\', \'' + bizType + '\',\'' + billNo + '\')">'+billNo+'</a> ';
|
|
}
|
|
|
|
} catch (e) {
|
|
|
|
}
|
|
}
|
|
});
|
|
}
|
|
bingGridEvents(gridItem);
|
|
bingGridEvents(gridGoods);
|
|
bingGridEvents(gridCourse);
|
|
bingGridEvents(gridCard);
|
|
bingGridEvents(gridCoursePack);
|
|
|
|
|
|
var itemWorkType = mini.get("itemWorkType");
|
|
itemWorkType.on("valuechanged", function (e) {
|
|
if(param == null){
|
|
return;
|
|
}
|
|
filterEmployee(currentEmpNo);
|
|
});
|
|
var courseWorkType = mini.get("courseWorkType");
|
|
courseWorkType.on("valuechanged", function (e) {
|
|
if(param == null){
|
|
return;
|
|
}
|
|
filterEmployee(currentEmpNo);
|
|
});
|
|
|
|
var moneyCardWorkType = mini.get("moneyCardWorkType");
|
|
moneyCardWorkType.on("valuechanged", function (e) {
|
|
if(param == null){
|
|
return;
|
|
}
|
|
filterEmployee(currentEmpNo);
|
|
});
|
|
|
|
var workTypes = getBasicTypesByKey("ServeWorkType");
|
|
var workTypeData = [{id:0,text:'全部'}];
|
|
for(var i=0;i<workTypes.length;i++){
|
|
workTypeData.push({id:workTypes[i].Id,text:workTypes[i].Name});
|
|
}
|
|
itemWorkType.setData( workTypeData);
|
|
itemWorkType.value = 0;
|
|
|
|
var courseWorkTypes = getBasicTypesByKey("MemSaleWorkType");
|
|
var courseWorkTypeData = [{id:0,text:'全部'}];
|
|
for(var i=0;i<courseWorkTypes.length;i++){
|
|
courseWorkTypeData.push({id:courseWorkTypes[i].Id,text:courseWorkTypes[i].Name});
|
|
}
|
|
courseWorkType.setData( courseWorkTypeData);
|
|
courseWorkType.value = 0;
|
|
|
|
var moneyCardWorkTypes = getBasicTypesByKey("MemSaleWorkType");
|
|
var moneyCardWorkTypeData = [{id:0,text:'全部'}];
|
|
for(var i=0;i<moneyCardWorkTypes.length;i++){
|
|
moneyCardWorkTypeData.push({id:moneyCardWorkTypes[i].Id,text:moneyCardWorkTypes[i].Name});
|
|
}
|
|
moneyCardWorkType.setData( moneyCardWorkTypeData);
|
|
moneyCardWorkType.value = 0;
|
|
|
|
var itemDispatchMode = mini.get("itemDispatchMode");
|
|
var modes = getBasicTypesByKey("ServeDispatchMode");
|
|
var modeData = [{id:0,text:'全部'}];
|
|
for(var i=0;i<modes.length;i++){
|
|
modeData.push({id:modes[i].Id,text:modes[i].Name});
|
|
}
|
|
itemDispatchMode.setData( modeData);
|
|
itemDispatchMode.value = 0;
|
|
|
|
itemDispatchMode.on("valuechanged", function (e) {
|
|
if(param == null){
|
|
return;
|
|
}
|
|
filterEmployee(currentEmpNo);
|
|
});
|
|
|
|
//销售/充值
|
|
var cardCategory = mini.get("cardCategory");
|
|
cardCategory.on("valuechanged", function (e) {
|
|
if(param == null){
|
|
return;
|
|
}
|
|
filterEmployee(currentEmpNo);
|
|
});
|
|
|
|
//部门
|
|
var depts = getBasicTypesByKey("Department");
|
|
depts.insert(0, { Id: 0, No: "*", Name: "全部" });
|
|
mini.get("deptNo").setData(depts);
|
|
mini.get("deptNo").setValue("*");
|
|
|
|
|
|
mini.get("empFilter").on("enter",function()
|
|
{
|
|
if(param == null){
|
|
mini.alert("请先点击查询后再操作");
|
|
return;
|
|
}
|
|
var name = mini.get("empFilter").getValue().toLowerCase();
|
|
|
|
//多条件组合过滤
|
|
gridEmployee.filter(function (row) {
|
|
if((name == "")
|
|
|| (String(row.EmpNo).toLowerCase() == name)
|
|
|| (String(row.EmpName).toLowerCase().indexOf(name) != -1)){
|
|
return true;
|
|
}
|
|
return false;
|
|
});
|
|
|
|
var row = gridEmployee.getRow(0);
|
|
if(row){
|
|
gridEmployee.select(row);
|
|
}
|
|
})
|
|
|
|
var accts = getPayAccounts();
|
|
//accts.insert(0,{Id:0,No:"",Name:"全部"});
|
|
|
|
mini.get("payTypeNo").setData(accts);
|
|
|
|
var tree = mini.get("payTypeNo").tree;
|
|
tree.expandOnDblClick=false;
|
|
tree.enableHotTrack=true;
|
|
tree.showExpandButtons=false;
|
|
tree.autoCheckParent = false;
|
|
|
|
//卡类别
|
|
var cardTypes = getMemberCardTypes();
|
|
mini.get("cardTypeNo").setData(cardTypes);
|
|
var tree = mini.get("cardTypeNo").tree;
|
|
tree.expandOnDblClick=false;
|
|
tree.enableHotTrack=true;
|
|
tree.showExpandButtons=false;
|
|
tree.autoCheckParent = false;
|
|
});
|
|
|
|
function filterEmployee(empNo){
|
|
document.loading("请稍候...");
|
|
setTimeout(function(){
|
|
filterEmployeeTask(empNo);
|
|
document.unloading();
|
|
},100);
|
|
}
|
|
|
|
function filterEmployeeTask(empNo){
|
|
currentEmpNo = empNo;
|
|
|
|
function round(v,e){
|
|
var t=1;
|
|
for(;e>0;t*=10,e--);
|
|
for(;e<0;t/=10,e++);
|
|
return Math.round(v*t)/t;
|
|
}
|
|
function filterData(target,targetSum,source,empNo,workType,dispatchMode,catg){
|
|
if(!source){
|
|
return;
|
|
}
|
|
|
|
var lastItem = null;
|
|
var allSum = lastPaySum = {PayTypeId:0,
|
|
PayTypeName:'',
|
|
Quantity:0,
|
|
Perf:0,
|
|
Comm:0,
|
|
PayAmt:0,
|
|
DedCostPerf:0};
|
|
|
|
var currentBillId = "";
|
|
for(var i=0;i<source.length;i++){
|
|
var item = source[i];
|
|
if(item.EmpNo != empNo){
|
|
continue;
|
|
}
|
|
if(workType != 0 && item.WorkType != workType){
|
|
continue;
|
|
}
|
|
if(dispatchMode != 0 && item.DispatchMode != dispatchMode){
|
|
continue;
|
|
}
|
|
if(catg != "" && item.Category != catg){
|
|
continue;
|
|
}
|
|
// item.MergeKey = item.BillNo + "_" + item.BillDetailId + '_' + item.WorkType + "_" + item.RepayBillNo;
|
|
if(!item.RepayBillNo){
|
|
item.RepayBillNo = "";
|
|
}
|
|
if(item.BillId){
|
|
item.MergeKey = item.BillId + "_" + item.RepayBillNo;
|
|
}else{
|
|
item.MergeKey = item.BillNo + "_" + item.RepayBillNo;
|
|
}
|
|
target.push(item);
|
|
|
|
allSum["Perf"] += item["Perf"];
|
|
allSum["DedCostPerf"] += item["DedCostPerf"];
|
|
allSum["Comm"] += item["Comm"];
|
|
allSum["PayAmt"] += item["PayAmt"];
|
|
|
|
//不同的单子累计客数
|
|
if (currentBillId == "" || item["BillId"] != currentBillId) {
|
|
if (item["CustQuantity"]) {
|
|
if (!allSum["CustQuantity"]) {
|
|
allSum["CustQuantity"] = 0;
|
|
}
|
|
allSum["CustQuantity"] += item["CustQuantity"];
|
|
}
|
|
currentBillId = item["BillId"];
|
|
}
|
|
|
|
//不是同一个行, 数量才累计
|
|
if(targetSum == currItemSum){
|
|
allSum["Quantity"] += item["Quantity"];
|
|
}else{
|
|
var flag = false;
|
|
if(lastItem == null){
|
|
flag = true;
|
|
}else {
|
|
if(item.Category != 'Goods' && lastItem.MergeKey != item.MergeKey ){
|
|
flag = true;
|
|
}else if(item.Category == 'Goods'){
|
|
flag = true;
|
|
}
|
|
}
|
|
if(flag ){
|
|
allSum["Quantity"] += item["Quantity"];
|
|
}
|
|
}
|
|
lastItem = item;
|
|
|
|
if(lastPaySum == null || lastPaySum.PayTypeId != item.PayTypeId){
|
|
lastPaySum = null;
|
|
for(var j=0;j<targetSum.length;j++){
|
|
if(targetSum[j].PayTypeId == item.PayTypeId){
|
|
lastPaySum = targetSum[j];
|
|
break;
|
|
}
|
|
}
|
|
if(lastPaySum == null){
|
|
lastPaySum = {PayTypeId:item.PayTypeId,
|
|
PayTypeName:item.PayTypeName,
|
|
CustQuantity:0,
|
|
Quantity:0,
|
|
Perf:0,
|
|
Comm:0,
|
|
PayAmt:0,
|
|
DedCostPerf:0};
|
|
targetSum.push(lastPaySum);
|
|
}
|
|
}
|
|
lastPaySum["Perf"] += item["Perf"];
|
|
lastPaySum["DedCostPerf"] += item["DedCostPerf"];
|
|
lastPaySum["Comm"] += item["Comm"];
|
|
lastPaySum["PayAmt"] += item["PayAmt"];
|
|
|
|
}
|
|
targetSum.push(allSum);
|
|
for(var j=0;j<targetSum.length;j++){
|
|
var sum = targetSum[j];
|
|
sum["BillTime"] = ".";
|
|
sum["Perf"] = round(sum["Perf"],2);
|
|
sum["DedCostPerf"] = round(sum["DedCostPerf"],2);
|
|
sum["Comm"] = round(sum["Comm"],2);
|
|
sum["PayAmt"] = round(sum["PayAmt"],2);
|
|
}
|
|
//targetSum.push(allPaySum);
|
|
}
|
|
function getSumData(target,source,empNo){
|
|
if(source == null){
|
|
return;
|
|
}
|
|
for(var i=0;i<source.length;i++){
|
|
var item = source[i];
|
|
if(item.EmpNo != empNo){
|
|
continue;
|
|
}
|
|
target.push(item);
|
|
}
|
|
}
|
|
var currItemData = [];
|
|
currItemSum = [];
|
|
filterData(currItemData,currItemSum,itemData,empNo,mini.get("itemWorkType").value,mini.get("itemDispatchMode").value,"");
|
|
|
|
|
|
|
|
var currGoodsData = [];
|
|
currGoodsSum = [];
|
|
filterData(currGoodsData,currGoodsSum,goodsData,empNo,0,0,"");
|
|
|
|
|
|
//储值卡
|
|
var catgValue = mini.get("cardCategory").value;
|
|
var catg = "";
|
|
if(catgValue == 1){
|
|
catg = "CardSale";
|
|
}
|
|
else if(catgValue == 2){
|
|
catg = "CardRchg";
|
|
}
|
|
var currCardData = [];
|
|
currCardSum = [];
|
|
filterData(currCardData,currCardSum,cardData,empNo,mini.get("moneyCardWorkType").value,0,catg);
|
|
|
|
var currCourseData = [];
|
|
currCourseSum = [];
|
|
filterData(currCourseData,currCourseSum,courseData,empNo,mini.get("courseWorkType").value,0,"");
|
|
|
|
var currCoursePackData = [];
|
|
currCoursePackSum = [];
|
|
filterData(currCoursePackData,currCoursePackSum,coursePackData,empNo,0,0,"" );
|
|
|
|
gridItem.setData(currItemData);
|
|
if(!gridItem.sortField ){
|
|
// mergeGridCells(gridItem, currItemData,"MergeKey",["colBillNo","colBillTime","colCustInfo","colItemName_","colWorkTypeName_","colDispatchModeName_","colQuantity_","colCustQuantity","colCustGender"]);
|
|
}
|
|
gridCard.setData(currCardData);
|
|
//mergeGridCells(gridCard, currCardData,"MergeKey",["colBillNo","colBillTime","colCustInfo","colItemName","colWorkTypeName","colQuantity","colCategory"]);
|
|
|
|
gridGoods.setData(currGoodsData);
|
|
// mergeGridCells(gridGoods, currGoodsData,"MergeKey",["colBillNo","colBillTime","colCustInfo","colItemName","colWorkTypeName","colQuantity"]);
|
|
|
|
gridCourse.setData(currCourseData);
|
|
// mergeGridCells(gridCourse, currCourseData,"MergeKey",["colBillNo","colBillTime","colCustInfo","","",""]);
|
|
|
|
gridCoursePack.setData(currCoursePackData);
|
|
currTotalSum = [];
|
|
|
|
getSumData(currTotalSum,totalSum,empNo);
|
|
if (currTotalSum && currTotalSum != null && currTotalSum.length > 0) {
|
|
var currTotalRow = currTotalSum[0];
|
|
$("#totalSum").html("总业绩: " + currTotalRow.Perf + " , 总提成: " + currTotalRow.Comm);
|
|
}
|
|
}
|
|
|
|
function onQuery() {
|
|
getParam();
|
|
executeQuery();
|
|
}
|
|
|
|
function executeQuery() {
|
|
|
|
itemData = null;
|
|
goodsData = null;
|
|
cardData = null;
|
|
courseData = null;
|
|
coursePackData = null;
|
|
itemSum = null;
|
|
goodsSum = null;
|
|
cardSum = null;
|
|
courseSum = null;
|
|
coursePackSum = null;
|
|
totalSum = null;
|
|
currItemSum = null;
|
|
currGoodsSum = null;
|
|
currCardSum = null;
|
|
currCourseSum = null;
|
|
currCoursePackSum = null;
|
|
|
|
currItemSumHtml = null;
|
|
|
|
gridEmployee.setData(null);
|
|
gridItem.setData(null);
|
|
gridGoods.setData(null);
|
|
gridCard.setData(null);
|
|
gridCourse.setData(null);
|
|
|
|
$("#totalSum").html("");
|
|
|
|
mini.get("empFilter").setValue("");
|
|
document.loading("正在查询数据...");
|
|
|
|
$.ajax({
|
|
type: "POST",
|
|
dataType: "json",
|
|
url: "@Url.Content( "~/WageReport01/GetReportData")",
|
|
data: param,
|
|
complete: function () {
|
|
document.unloading();
|
|
},
|
|
success: function (msg) {
|
|
if (hasError(msg)) {
|
|
showError(msg);
|
|
return;
|
|
}
|
|
if(msg.data == null){
|
|
mini.alert("没有数据");
|
|
return;
|
|
}
|
|
processReportData(msg.data);
|
|
}
|
|
});
|
|
}
|
|
|
|
function processReportData(data){
|
|
currentEmpNo = "";
|
|
gridEmployee.setData(data.employee);
|
|
if(data.employee.length > 0){
|
|
mini.get("empFilter").getEl().style.display = "";
|
|
}
|
|
itemData = data.item;
|
|
goodsData = data.goods;
|
|
cardData = data.card;
|
|
courseData = data.course;
|
|
coursePackData = data.coursePack;
|
|
|
|
itemSum = data.itemSum;
|
|
goodsSum = data.goodsSum;
|
|
cardSum = data.cardSum;
|
|
courseSum = data.courseSum;
|
|
totalSum = data.totalSum;
|
|
coursePackSum = data.coursePackSum;
|
|
|
|
var allowViewComm = true;
|
|
if(typeof data.allowViewComm != "undefined" && data.allowViewComm.toString() == "false"){
|
|
allowViewComm = false;
|
|
}
|
|
gridItem.clearSort();
|
|
gridItem.getColumn("colComm").visible = allowViewComm;
|
|
gridItem.getColumn("colEvalContent").visible = param.evalVisible == 1;
|
|
gridItem.getColumn("colEvalLevelName").visible = param.evalVisible == 1;
|
|
|
|
gridItem.setColumns(gridItem.getColumns());
|
|
|
|
gridGoods.getColumn("colComm").visible = allowViewComm;
|
|
gridGoods.setColumns(gridGoods.getColumns());
|
|
|
|
gridCourse.getColumn("colComm").visible = allowViewComm;
|
|
gridCourse.setColumns(gridCourse.getColumns());
|
|
|
|
gridCoursePack.getColumn("colComm").visible = allowViewComm;
|
|
gridCoursePack.setColumns(gridCoursePack.getColumns());
|
|
|
|
gridCard.getColumn("colComm").visible = allowViewComm;
|
|
gridCard.setColumns(gridCard.getColumns());
|
|
// if(itemData.length > 0 && itemData[0].custGender ){
|
|
// gridItem.getColumn("colCustGender").visible = true;
|
|
// }else{
|
|
// gridItem.getColumn("colCustGender").visible = false;
|
|
// }
|
|
|
|
if(data.employee.length > 0){
|
|
gridEmployee.setSelected (gridEmployee.getRow(0));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
var htmlContent = document.getElementById("htmlContent");
|
|
function htmlClick() {
|
|
if(!htmlContent)
|
|
htmlContent = document.getElementById("htmlContent");
|
|
htmlContent.style.display = "";
|
|
mini.showMessageBox({
|
|
width: 250,
|
|
title: "自定义Html",
|
|
buttons: ["ok", "cancel"],
|
|
message: "自定义Html",
|
|
html: htmlContent,
|
|
showModal: false,
|
|
callback: function (action) {
|
|
alert(action);
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
//点击导出
|
|
function onExport(action) {
|
|
|
|
var param = {}
|
|
if(action == '1'){
|
|
param.empNo = currentEmpNo;
|
|
}else{
|
|
param.empNo = "";
|
|
}
|
|
|
|
var rpc = new Rpc({service:"@Url.Content("~/WageReport01")",method:"ExportExcel"});
|
|
rpc.call({param:param},
|
|
function(resp){
|
|
if(hasError(resp)){
|
|
showError(resp);
|
|
return;
|
|
}
|
|
downloadFile(getRootPath() + resp.result.url,resp.result.fileName);
|
|
},
|
|
"正在生成excel...");
|
|
|
|
}
|
|
|
|
function getSummaryCellHtml(sumData,field){
|
|
if(sumData == null || sumData.length == 0){
|
|
return "";
|
|
}
|
|
|
|
try{
|
|
var html = "";
|
|
for(var i=0;i<sumData.length;i++){
|
|
var item = sumData[i];
|
|
|
|
var value = item[field];
|
|
if(typeof value == 'undefined'){
|
|
value = "";
|
|
}
|
|
|
|
|
|
var div = "";
|
|
if(value != ""){
|
|
div = "<div style='border-bottom:1px solid red;'>";
|
|
}
|
|
else{
|
|
div = "<div >";
|
|
}
|
|
div = "<div >";
|
|
if(value == ""){
|
|
value = " ";
|
|
}
|
|
div = div + value + "</div>";
|
|
html += div;
|
|
}
|
|
return html;
|
|
} catch (e) {
|
|
return e.message
|
|
}
|
|
}
|
|
|
|
function onItemDrawSummaryCell(e){
|
|
e.cellHtml = getSummaryCellHtml(currItemSum,e.field);
|
|
setSummaryStyle(e);
|
|
}
|
|
function onGoodsDrawSummaryCell(e){
|
|
e.cellHtml = getSummaryCellHtml(currGoodsSum,e.field);
|
|
setSummaryStyle(e);
|
|
}
|
|
function onCardDrawSummaryCell(e){
|
|
e.cellHtml = getSummaryCellHtml(currCardSum,e.field);
|
|
setSummaryStyle(e);
|
|
}
|
|
function onCourseDrawSummaryCell(e){
|
|
e.cellHtml = getSummaryCellHtml(currCourseSum,e.field);
|
|
setSummaryStyle(e);
|
|
}
|
|
function onCoursePackDrawSummaryCell(e){
|
|
e.cellHtml = getSummaryCellHtml(currCoursePackSum,e.field);
|
|
setSummaryStyle(e);
|
|
}
|
|
function setSummaryStyle(e){
|
|
if(e.cellHtml != undefined && e.cellHtml != ""){
|
|
e.cellHtml = "<a style='color:Red'>" + e.cellHtml + "</a>";
|
|
}
|
|
}
|
|
|
|
function mergeData(data,idField,mergeColumns,customCallback){
|
|
if(data == null){
|
|
return;
|
|
}
|
|
var lastId = "";
|
|
var call = false;
|
|
if(typeof customCallback != 'undefined'){
|
|
call = true;
|
|
}
|
|
|
|
for(var i=0;i<data.length;i++){
|
|
var item = data[i];
|
|
var id = item[idField];
|
|
if(lastId != "" && id == lastId){
|
|
for(var j = 0;j<mergeColumns.length;j++){
|
|
item[mergeColumns[j]] = "";
|
|
}
|
|
}
|
|
else{
|
|
lastId = id;
|
|
}
|
|
if(call){
|
|
customCallback(item);
|
|
}
|
|
}
|
|
}
|
|
function mergeGridCells(grid,data,idField,mergeColumns,customCallback){
|
|
var spans = new Array();
|
|
var lastId = "";
|
|
var rowIndex = 0;
|
|
var span = 1;
|
|
var colIdxes = [];
|
|
|
|
for(var i=0;i<mergeColumns.length;i++){
|
|
var col = grid.getColumn(mergeColumns[i]);
|
|
if(col){
|
|
colIdxes.push(col._index);
|
|
}
|
|
}
|
|
var call = false;
|
|
if(typeof customCallback != 'undefined'){
|
|
call = true;
|
|
}
|
|
for(var i=0;i<data.length;i++){
|
|
var item = data[i];
|
|
var id = item[idField];
|
|
if(lastId != id || i >= data.length-1){
|
|
if(lastId == id){
|
|
span++;
|
|
}
|
|
if(span != 1){
|
|
for(var j = 0;j<colIdxes.length;j++){
|
|
spans.push({ rowIndex: rowIndex, columnIndex: colIdxes[j], rowSpan: span, colSpan: 1 });
|
|
}
|
|
}
|
|
span = 1;
|
|
rowIndex = i;
|
|
}
|
|
else{
|
|
span++;
|
|
}
|
|
lastId = id;
|
|
if(call){
|
|
customCallback(item);
|
|
}
|
|
}
|
|
|
|
grid.mergeCells(spans);
|
|
}
|
|
function getParam() {
|
|
param = {};
|
|
param.company = companyInput.getValue();
|
|
param.compNo = param.company;
|
|
param.fromDate = mini.get("fromDate").getFormValue();
|
|
param.toDate = mini.get("toDate").getFormValue();
|
|
|
|
var nodes = mini.get("payTypeNo").tree.getCheckedNodes (true);
|
|
param.payTypeNo = "";
|
|
|
|
if( mini.get("payTypeNo").getFormValue() != ""){
|
|
$.each(nodes,function(index,value){
|
|
if(param.payTypeNo != ""){
|
|
param.payTypeNo += ",";
|
|
}
|
|
param.payTypeNo += value.No;
|
|
});
|
|
}
|
|
//alert(param.payTypeNo);
|
|
param.itemNo = mini.get("item").getText();
|
|
//部门
|
|
param.deptNo = mini.get("deptNo").getValue();
|
|
if(param.deptNo == "*"){
|
|
param.deptNo = "";
|
|
}
|
|
|
|
param.groupNo = "";
|
|
if (groupNoInput.getFormValue() != "") {
|
|
var nodes = groupNoInput.tree.getCheckedNodes(true);
|
|
$.each(nodes, function (index, value) {
|
|
if (param.groupNo != "") {
|
|
param.groupNo += ",";
|
|
}
|
|
param.groupNo += value.No;
|
|
});
|
|
}
|
|
|
|
//卡类别
|
|
param.cardTypeNo = "";
|
|
if( mini.get("cardTypeNo").getFormValue() != ""){
|
|
var nodes = mini.get("cardTypeNo").tree.getCheckedNodes (true);
|
|
$.each(nodes,function(index,value){
|
|
if(param.cardTypeNo != ""){
|
|
param.cardTypeNo += ",";
|
|
}
|
|
param.cardTypeNo += value.No;
|
|
});
|
|
}
|
|
|
|
//疗程
|
|
param.courseNo = mini.get("courseNo").getText();
|
|
//评价
|
|
param.evalVisible = mini.get("evalVisible").checked == true ? 1 : 0;
|
|
}
|
|
|
|
|
|
//点击员工选择按钮
|
|
function onItemClick(){
|
|
|
|
var arr = mini.get("item").getText().split(',');
|
|
var itemData = [];
|
|
$.each(arr, function(key, val) {
|
|
itemData.push({No:val});
|
|
});
|
|
browseBasicInfo("Item", {
|
|
mutli: false,
|
|
data: itemData,
|
|
success: function (data) {
|
|
|
|
var str = "";
|
|
for(var i=0;i<data.length;i++){
|
|
var item = data[i];
|
|
if(str != ''){
|
|
str += ",";
|
|
}
|
|
str += item.No;
|
|
}
|
|
mini.get("item").setText(str);
|
|
}
|
|
});
|
|
}
|
|
//点击疗程选择按钮
|
|
function onCourseClick(){
|
|
var arr = mini.get("courseNo").getText().split(',');
|
|
var empData = [];
|
|
$.each(arr, function(key, val) {
|
|
empData.push({No:val});
|
|
});
|
|
browseBasicInfo("Course", {
|
|
mutli: true,
|
|
data: empData,
|
|
success: function (data) {
|
|
|
|
var str = "";
|
|
for(var i=0;i<data.length;i++){
|
|
var item = data[i];
|
|
if(str != ''){
|
|
str += ",";
|
|
}
|
|
str += item.No;
|
|
}
|
|
mini.get("courseNo").setText(str);
|
|
}
|
|
});
|
|
}
|
|
function onCardSaleRender(e){
|
|
if(e.value == "CardSale"){
|
|
return "销售";
|
|
}
|
|
if(e.value == "CardRchg"){
|
|
return "充值";
|
|
}
|
|
return e.value;
|
|
}
|
|
function myOpenBill(compNo,bizType,billNo){
|
|
if(bizType == "CardSale"
|
|
|| bizType == "CardRchg" || bizType == "Repay"
|
|
|| bizType == "CourseSale" || bizType=="CoursePackSale"
|
|
|| bizType == "Exchange"){
|
|
bizType = "KK";
|
|
}
|
|
else if(bizType == "Item" || bizType == "Goods"){
|
|
bizType = "XF";
|
|
}
|
|
else if(bizType == "Expenses"){
|
|
bizType = "KZ";
|
|
}
|
|
else if(bizType == "OtherIncome"){
|
|
bizType = "QT";
|
|
}
|
|
openBill(compNo,bizType,billNo);
|
|
}
|
|
|
|
function resetSize(){
|
|
|
|
var detailPerf = document.getElementById('detailPerf');
|
|
var totalSum = document.getElementById('totalSum');
|
|
var empGrid = document.getElementById('gridEmployee');
|
|
var tabBody = document.getElementById('tabBody');
|
|
|
|
var detailWidth = (document.documentElement.clientWidth - employeeList.offsetWidth) - 10;
|
|
|
|
var detailHeight = (document.getElementById("bodyContent").offsetHeight)
|
|
detailPerf.style.width = detailWidth + 'px';
|
|
detailPerf.style.left = employeeList.offsetWidth + 2 + 'px';
|
|
detailPerf.style.height = detailHeight + 'px';
|
|
|
|
tabBody.style.height = (detailHeight - 30) + 'px';
|
|
tabBody.style.width = (detailWidth) + 'px';
|
|
|
|
totalSum.style.left = '0px';
|
|
totalSum.style.top = '0px';//(detailHeight - 28) + 'px';
|
|
totalSum.style.width = detailPerf.style.width;
|
|
totalSum.style.height = "30px";
|
|
totalSum.style.width = (detailWidth - 10) + 'px';;
|
|
|
|
empGrid.style.height = tabBody.style.height;
|
|
empGrid.style.top = '30px';
|
|
}
|
|
$(window).resize(function()
|
|
{
|
|
resetSize();
|
|
});
|
|
$(window).ready(function()
|
|
{
|
|
resetSize();
|
|
mini.parse();
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
<div id="pnlCond" style="display:none;padding:5px;position:relative; width:400px; height:300px; border-width:1px; border-color:#000" >
|
|
|
|
<table class="form-table" border="0" cellpadding="1" cellspacing="2">
|
|
<colgroup>
|
|
<col style="width:100px" />
|
|
</colgroup>
|
|
|
|
<tr>
|
|
<td style="height:30px">选择门店:</td>
|
|
<td colspan="3">
|
|
<input id="companyInput" class="mini-treeselect"
|
|
allowInput="false" expandOnLoad="true" showClose="true" showFolderCheckBox="true"
|
|
popupHeight="auto" style ="width:278px"
|
|
multiSelect="false" emptyText="请选择门店"
|
|
valueField="Id" textField="Abbr" parentField="ParentId" />
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr style=" line-height:20px ">
|
|
<td style="height:20px"> </td>
|
|
<td id="dateShortcut" style="white-space:nowrap;">
|
|
<a name="today" >今天</a>
|
|
<a name="prevDay" >前一天</a>
|
|
<a name="thisMonth" >本月</a>
|
|
<a name="prevMonth" >上一月</a>
|
|
<a name="thisWeek" >本周</a>
|
|
<a name="prevWeek" >上一周</a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="height:30px">账务日期:</td>
|
|
<td style="white-space:nowrap;">
|
|
<input id="fromDate" format="yyyy-MM-dd" class="mini-datepicker" />
|
|
<a>~</a>
|
|
<input id="toDate" format="yyyy-MM-dd"class="mini-datepicker" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="height:30px">选择部门:</td>
|
|
<td style="width:80px">
|
|
<input id="deptNo" class="mini-combobox" textField="Name" valueField="No"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="height:30px">业绩分组:</td>
|
|
<td style="width:80px">
|
|
<input name="groupNo" class="mini-treeselect" valueField="No" textField="Name" parentField="pid"
|
|
allowInput="false" checkRecursive="true" showFolderCheckBox="true" expandOnLoad="true" emptyText="全部"
|
|
showClose="true" style="width:280px" multiSelect="true" showTreeIcon="false" popupHeight="500px"
|
|
oncloseclick="this.setValue('');this.setText('');" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="width:auto;">支付方式:</td>
|
|
<td style="width:100px">
|
|
<input id="payTypeNo" class="mini-treeselect" valueField="No" textField="Name" parentField="pid"
|
|
allowInput="false" checkRecursive="true" showFolderCheckBox="true" expandOnLoad="true" emptyText="默认所有支付方式"
|
|
showClose="true"style ="width:274px" multiSelect="true" showTreeIcon ="false" popupHeight="500px"
|
|
oncloseclick="this.setValue('');this.setText('');" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="height:25px">选择项目:</td>
|
|
<td style="white-space:nowrap;">
|
|
<input id="item" class="mini-buttonedit" onbuttonclick="onItemClick" style ="width:274px" emptyText="默认所有项目"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="height:25px">储值卡类别:</td>
|
|
<td style="white-space:nowrap;">
|
|
<input id="cardTypeNo" class="mini-treeselect" textField="Name" valueField="No"style ="width:274px" emptyText="默认所有储值卡类别"
|
|
allowInput="false" checkRecursive="true" showFolderCheckBox="true"
|
|
oncloseclick="this.setValue('');this.setText('');" showClose="true"multiSelect="true" showTreeIcon ="false" popupHeight="500px" expandOnLoad="true"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="height:25px">@{ @ViewBag.CourseDefineName}:</td>
|
|
<td style="white-space:nowrap;">
|
|
<input id="courseNo" class="mini-buttonedit" onbuttonclick="onCourseClick" style ="width:274px" emptyText="默认所有@{ @ViewBag.CourseDefineName}"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td >
|
|
<input id="evalVisible" class="mini-checkbox" text="显示评价" value="false" visible="true" trueValue="true" falseValue="false"/>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div style="width:100%; right:0px;top:0px; left:0; bottom:0px; height:100%; width:100%; position:relative; float: left; padding-left:0px; ">
|
|
|
|
<div id="employeeList" style="width:150px; right:0px;top:0px; left:0; bottom:0px; height:100%; position:absolute; margin-bottom:0px; padding-top:0px; float: left; background-color:White">
|
|
<div style="width:100%;margin-top:0px;left:0;top:0; margin:3px; height:30px; position:absolute">
|
|
<input id="empFilter" property="filter" class="mini-textbox" style="width:140px; margin-top:3px" emptyText="输入工号/姓名查找员工" />
|
|
</div>
|
|
|
|
|
|
<div id="gridEmployee" class="mini-treegrid" style="width:100%; height:100%; top:30px; position:relative"
|
|
url="" showTreeIcon="true" sortMode="client" resultAsTree="false"
|
|
allowResize="false" expandOnLoad="true" showFilterRow="false">
|
|
|
|
<div property="columns">
|
|
<div name="colEmpNo" field="EmpNo" width="60" headerAlign="center" allowSort="true" allowMove="false">工号</div>
|
|
<div name="colEmpName" field="EmpName" width="70" headerAlign="center" allowSort="true" allowMove="false">姓名 </div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="detailPerf" style="right:0px;top:0px; left:0; bottom:0px; position:relative; height:100%; width:100%; margin-bottom:0px; background-color:White; float: left; padding-right:0px">
|
|
<div id="tabBody" class="mini-tabs" style="width:100%; height:100%; top:0; bottom:0; right:0; position:relative; " activeindex="0">
|
|
<div id="tabItem" title="项目业绩" style="width:100%; height:100%;background-color:Black;padding:0;">
|
|
<table style="height:4%; color:Blue">
|
|
<tr>
|
|
<td>
|
|
服务岗位:
|
|
</td>
|
|
<td>
|
|
<input id="itemWorkType" class="mini-radiobuttonlist" data="[ {id: 0, text: '全部'},{id: 11001, text: '岗位1'},{id: 11002, text: '岗位2'},{id: 11003, text: '岗位3'} ,{id: 11004, text: '岗位4'}]" value="0" />
|
|
</td>
|
|
<td style="width:100px">
|
|
</td>
|
|
<td>
|
|
指定方式:
|
|
</td>
|
|
<td>
|
|
<input id="itemDispatchMode" class="mini-radiobuttonlist" data="[ {id: 0, text: '全部'},{id: 10001, text: '指定'},{id: 10002, text: '非指定'}]" value="0" />
|
|
</td>
|
|
|
|
</tr>
|
|
</table>
|
|
<div id="gridItem" class="mini-datagrid" style=" width:100%; height:94%; "
|
|
allowResize="false" showColumnsMenu="true"
|
|
showPager="false" fitColumns="true" pageSize="100" virtualScroll="false" sortMode="client" showSummaryRow="true"
|
|
ondrawsummarycell="onItemDrawSummaryCell" >
|
|
<div property="columns">
|
|
<div name="colBillTime" field="BillTime" width="150" headerAlign="center" allowSort="true" allowMove="true">单据时间</div>
|
|
<div name="colBillNo" field="BillNo" width="130" headerAlign="center" allowSort="true" allowMove="true">单号</div>
|
|
<div name="colCustInfo" field="CustInfo" width="100" headerAlign="center" allowSort="true" allowMove="false">客户信息</div>
|
|
|
|
<div name="colCustGender" field="CustGender" width="60" headerAlign="center" allowSort="true" allowMove="false">客户性别</div>
|
|
@if (ViewBag.ShowCustQuantity)
|
|
{
|
|
<div name="colCustQuantity" field="CustQuantity" width="50" headerAlign="center" allowSort="true" allowMove="true">客数</div>
|
|
}
|
|
<div name="colCardTypeName" field="PayCardTypeName" width="120" headerAlign="center" allowSort="true" allowMove="false">卡类别</div>
|
|
|
|
@if (ViewBag.ShowCardMemo) {
|
|
<div name="colCardCreateDate" field="CardCreateDate" width="100" headerAlign="center" allowSort="true" allowMove="true">开卡日期</div>
|
|
<div name="colCardMemo" field="CardMemo" width="130" headerAlign="center" allowSort="true" allowMove="true">卡备注</div>
|
|
}
|
|
|
|
<div name="colItemName" field="ItemName" width="130" headerAlign="center" allowSort="true" allowMove="true">项目名称</div>
|
|
<div name="colWorkTypeName" field="WorkTypeName" width="70" headerAlign="center" allowSort="true" allowMove="true">服务岗位</div>
|
|
<div name="colDispatchModeName" field="DispatchModeName" width="60" headerAlign="center" allowSort="true" allowMove="true">指定方式</div>
|
|
|
|
<div name="colEvalLevelName" field="EvalLevelName" width="60" headerAlign="center" allowSort="false" allowMove="true" visible="false">评价级别</div>
|
|
<div name="colEvalContent" field="EvalContent" width="80" headerAlign="center" allowSort="false" allowMove="true" visible="false">评价内容</div>
|
|
|
|
<div name="colQuantity" field="Quantity" width="50" headerAlign="center" allowSort="true" allowMove="true"dataType="int" >数量</div>
|
|
<div name="colPayTypeName" field="PayTypeName" width="90" headerAlign="center" allowSort="true" allowMove="true">支付方式</div>
|
|
<div name="colPayAmt" field="PayAmt" width="70" headerAlign="center" allowSort="true" allowMove="true"dataType="int" >支付金额</div>
|
|
<div name="colPerf" field="Perf" width="70" headerAlign="center" allowSort="true" allowMove="true"dataType="int" >业绩</div>
|
|
<div name="colDedCostPerf" field="DedCostPerf" width="70" headerAlign="center" allowSort="true" allowMove="true" dataType="int">扣成本业绩</div>
|
|
<div name="colComm" field="Comm" width="70" headerAlign="center" allowSort="true" allowMove="true" dataType="int">提成</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="tabGoods" title="外卖产品业绩" style="width:100%; height:100%;background-color:Black;padding:0;">
|
|
<div id="gridGoods" class="mini-datagrid" style=" width:100%; height:100%" allowResize="false" ondrawsummarycell="onGoodsDrawSummaryCell"
|
|
showPager="false" fitColumns="true" pageSize="100" virtualScroll="false" sortMode="client" showSummaryRow="true">
|
|
<div property="columns">
|
|
<div name="colBillTime" field="BillTime" width="150" headerAlign="center" allowSort="true" allowMove="false">单据时间</div>
|
|
<div name="colBillNo" field="BillNo" width="130" headerAlign="center" allowSort="true" allowMove="false">单号</div>
|
|
<div name="colCustInfo" field="CustInfo" width="100" headerAlign="center" allowSort="true" allowMove="false">客户信息</div>
|
|
<div name="colCardTypeName" field="PayCardTypeName" width="100" headerAlign="center" allowSort="true" allowMove="false">卡类别</div>
|
|
<div name="colItemName" field="ItemName" width="100" headerAlign="center" allowSort="true" allowMove="false">产品名称</div>
|
|
<div name="colWorkTypeName" field="WorkTypeName" width="70" headerAlign="center" allowSort="true" allowMove="false">销售岗位</div>
|
|
<div name="colQuantity" field="Quantity" width="50" headerAlign="center" allowSort="true" allowMove="false" dataType="int">数量</div>
|
|
<div name="colPayTypeName" field="PayTypeName" width="90" headerAlign="center" allowSort="true" allowMove="false">支付方式</div>
|
|
<div name="colPayAmt" field="PayAmt" width="70" headerAlign="center" allowSort="true" allowMove="false" dataType="int">支付金额</div>
|
|
<div name="colPerf" field="Perf" width="70" headerAlign="center" allowSort="true" allowMove="false" dataType="int">业绩</div>
|
|
<div name="colDedCostPerf" field="DedCostPerf" width="70" headerAlign="center" allowSort="true" allowMove="true" dataType="int">扣成本业绩</div>
|
|
<div name="colComm" field="Comm" width="70" headerAlign="center" allowSort="true" allowMove="false" dataType="int">提成</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="tabCard" title="储值卡销售业绩" style="width:100%; height:100%;background-color:Black;padding:0;">
|
|
<table style="height:4%; color:Blue">
|
|
<tr>
|
|
<td>
|
|
<input id="cardCategory" class="mini-radiobuttonlist" data="[ {id: 0, text: '全部'},{id: 1, text: '储值卡销售'},{id: 2, text: '储值卡充值'}]" value="0" />
|
|
</td>
|
|
<td>
|
|
销售岗位:
|
|
</td>
|
|
<td>
|
|
<input id="moneyCardWorkType" class="mini-radiobuttonlist" data="[ {id: 0, text: '全部'},{id: 11001, text: '岗位1'},{id: 11002, text: '岗位2'},{id: 11003, text: '岗位3'} ,{id: 11004, text: '岗位4'}]" value="0" />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div id="gridCard" class="mini-datagrid" style=" width:100%; height:96%" allowResize="false" showColumnsMenu="true" ondrawsummarycell="onCardDrawSummaryCell"
|
|
showPager="false" fitColumns="true" pageSize="100" virtualScroll="false" sortMode="client" showSummaryRow="true">
|
|
<div property="columns">
|
|
<div name="colBillTime" field="BillTime" width="150" headerAlign="center" allowSort="true" allowMove="true">单据时间</div>
|
|
<div name="colBillNo" field="BillNo" width="130" headerAlign="center" allowSort="true" allowMove="true">单号</div>
|
|
<div name="colCustInfo" field="CustInfo" width="100" headerAlign="center" allowSort="true" allowMove="false">客户信息</div>
|
|
<div name="colCategory" field="Category" width="50" headerAlign="center" allowSort="true" allowMove="true"renderer="onCardSaleRender"></div>
|
|
<div name="colItemName" field="ItemName" width="100" headerAlign="center" allowSort="true" allowMove="true">卡类别名称</div>
|
|
<div name="colWorkTypeName" field="WorkTypeName" width="60" headerAlign="center" allowSort="true" allowMove="true">销售岗位</div>
|
|
<div name="colQuantity" field="Quantity" width="50" headerAlign="center" allowSort="true" allowMove="true" dataType="int">数量</div>
|
|
<div name="colPayTypeName" field="PayTypeName" width="90" headerAlign="center" allowSort="true" allowMove="true" >支付方式</div>
|
|
<div name="colPayAmt" field="PayAmt" width="70" headerAlign="center" allowSort="true" allowMove="true" dataType="int">支付金额</div>
|
|
<div name="colPerf" field="Perf" width="70" headerAlign="center" allowSort="true" allowMove="true" dataType="int">业绩</div>
|
|
<div name="colComm" field="Comm" width="70" headerAlign="center" allowSort="true" allowMove="true" dataType="int">提成</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="tabCourse" title="@{@ViewBag.CourseDefineName}销售业绩" style="width:100%; height:100%;background-color:Black;padding:0;">
|
|
<table style="height:4%; color:Blue">
|
|
<tr>
|
|
<td>
|
|
销售岗位:
|
|
</td>
|
|
<td>
|
|
<input id="courseWorkType" class="mini-radiobuttonlist" data="[ {id: 0, text: '全部'},{id: 11001, text: '岗位1'},{id: 11002, text: '岗位2'},{id: 11003, text: '岗位3'} ,{id: 11004, text: '岗位4'}]" value="0" />
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
</table>
|
|
<div id="gridCourse" class="mini-datagrid" style=" width:100%; height:90%" allowResize="false" showColumnsMenu="true"ondrawsummarycell="onCourseDrawSummaryCell"
|
|
showPager="false" fitColumns="true" pageSize="100" virtualScroll="false" sortMode="client" showSummaryRow="true">
|
|
<div property="columns">
|
|
<div name="colBillTime" field="BillTime" width="150" headerAlign="center" allowSort="true" allowMove="true">单据时间</div>
|
|
<div name="colBillNo" field="BillNo" width="130" headerAlign="center" allowSort="true" allowMove="true">单号</div>
|
|
<div name="colCustInfo" field="CustInfo" width="100" headerAlign="center" allowSort="true" allowMove="false">客户信息</div>
|
|
<div name="colItemName" field="ItemName" width="100" headerAlign="center" allowSort="true" allowMove="true">@{@ViewBag.CourseDefineName}名称</div>
|
|
<div name="colWorkTypeName" field="WorkTypeName" width="60" headerAlign="center" allowSort="true" allowMove="true">销售岗位</div>
|
|
<div name="colQuantity" field="Quantity" width="50" headerAlign="center" allowSort="true" allowMove="true" dataType="int">数量</div>
|
|
<div name="colPayTypeName" field="PayTypeName" width="90" headerAlign="center" allowSort="true" allowMove="true">支付方式</div>
|
|
<div name="colPayAmt" field="PayAmt" width="70" headerAlign="center" allowSort="true" allowMove="true" dataType="int">支付金额</div>
|
|
<div name="colPerf" field="Perf" width="70" headerAlign="center" allowSort="true" allowMove="true" dataType="int">业绩</div>
|
|
<div name="colComm" field="Comm" width="70" headerAlign="center" allowSort="true" allowMove="true" dataType="int">提成</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="tabCoursePack" title="套餐销售业绩" style="width:100%; height:100%;background-color:Black;padding:0;">
|
|
<div id="gridCoursePack" class="mini-datagrid" style=" width:100%; height:100%" allowResize="false" showColumnsMenu="true"ondrawsummarycell="onCoursePackDrawSummaryCell"
|
|
showPager="false" fitColumns="true" pageSize="100" virtualScroll="false" sortMode="client" showSummaryRow="true">
|
|
<div property="columns">
|
|
<div name="colBillTime" field="BillTime" width="150" headerAlign="center" allowSort="true" allowMove="true">单据时间</div>
|
|
<div name="colBillNo" field="BillNo" width="130" headerAlign="center" allowSort="true" allowMove="true">单号</div>
|
|
<div name="colCustInfo" field="CustInfo" width="100" headerAlign="center" allowSort="true" allowMove="false">客户信息</div>
|
|
<div name="colItemName" field="ItemName" width="100" headerAlign="center" allowSort="true" allowMove="true">@{@ViewBag.CourseDefineName}名称</div>
|
|
<div name="colWorkTypeName" field="WorkTypeName" width="60" headerAlign="center" allowSort="true" allowMove="true">销售岗位</div>
|
|
<div name="colQuantity" field="Quantity" width="50" headerAlign="center" allowSort="true" allowMove="true" dataType="int">数量</div>
|
|
<div name="colPayTypeName" field="PayTypeName" width="90" headerAlign="center" allowSort="true" allowMove="true">支付方式</div>
|
|
<div name="colPayAmt" field="PayAmt" width="70" headerAlign="center" allowSort="true" allowMove="true" dataType="int">支付金额</div>
|
|
<div name="colPerf" field="Perf" width="70" headerAlign="center" allowSort="true" allowMove="true" dataType="int">业绩</div>
|
|
<div name="colComm" field="Comm" width="70" headerAlign="center" allowSort="true" allowMove="true" dataType="int">提成</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div id="totalSum" style="right:0px; left:0px; bottom:0px; height:28px; position: relative; padding-right:10px; text-align:right; color:Red; background-color:White;">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!--menu-->
|
|
<ul id="exportMenu" class="mini-menu" style="display:none;">
|
|
<li onclick="onExport('1');" > 导出当前员工</li>
|
|
<li onclick="onExport('');" >导出所有员工</li>
|
|
</ul> |