first commit
Esse commit está contido em:
@@ -0,0 +1,244 @@
|
||||
<#def designatedPath="/personalRefundRateStat.htm"/>
|
||||
<script>
|
||||
|
||||
var blamerAfterMap = new Z.HashMap();
|
||||
var dataList = [];
|
||||
//倒叙方法 [].reverse();
|
||||
function getObject(json)
|
||||
{
|
||||
json = json.replace(/\r/g, '');
|
||||
json = json.replace(/\n/g, '<br/>');
|
||||
json = json.replace(/\t/g, ' ');
|
||||
var reg = /(\u0000)|(\u0001)|(\u0002)|(\u0003)|(\u0004)|(\u0005)|(\u0006)|(\u0007)|(\u000b)|(\u000e)|(\u000f)|(\u0010)|(\u0011)|(\u0012)|(\u0013)|(\u0014)|(\u0015)|(\u0016)|(\u0017)|(\u0018)|(\u0019)|(\u001a)|(\u001b)|(\u001c)|(\u001d)|(\u001e)|(\u001f)/g;
|
||||
//var reg = //g;
|
||||
return Z.J.toObject(json.replace(reg, ""));
|
||||
}
|
||||
Z.onload(function()
|
||||
{
|
||||
<#for item : blamerAfterMap.values()>
|
||||
blamerAfterMap.put('${item.getAfterBlamer()}', getObject('${item}'));
|
||||
dataList.push(blamerAfterMap.get('${item.getAfterBlamer()}'));
|
||||
</#for>
|
||||
|
||||
//显示数据
|
||||
doShowBlamerList(dataList);
|
||||
//显示详情
|
||||
doShowDetail(dataList.length > 0 ? dataList[0].afterBlamer : '');
|
||||
});
|
||||
|
||||
function doShowBlamerList(dataList)
|
||||
{//显示责任人列表
|
||||
dataList.sort(function (a, b){
|
||||
a.afterCount = Z.V.isInteger(a.afterCount) ? a.afterCount : 0;
|
||||
b.afterCount = Z.V.isInteger(b.afterCount) ? b.afterCount : 0;
|
||||
|
||||
a.lostAmount = Z.V.isFloat(a.lostAmount) ? a.lostAmount : 0;
|
||||
b.lostAmount = Z.V.isFloat(b.lostAmount) ? b.lostAmount : 0;
|
||||
|
||||
var result1 = a.afterCount - b.afterCount;
|
||||
var result2 = a.lostAmount - b.lostAmount;
|
||||
return result2 != 0 ? result2 : result1;
|
||||
});
|
||||
dataList.sort();
|
||||
dataList.reverse();
|
||||
var blamerResultHtml = "";
|
||||
blamerResultHtml +='<table class="z-table z-bordered z-pd6 z-bg-white z-text-center" id="statTable">';
|
||||
blamerResultHtml +='<tr class="z-h40" bgcolor="'+"${zmr_thead_bgcolor}"+'">';
|
||||
blamerResultHtml +=' <td>序号</td>';
|
||||
blamerResultHtml +=' <td>责任人</td>';
|
||||
blamerResultHtml +=' <td>售后单数</td>';
|
||||
blamerResultHtml +=' <td>损失金额</td>';
|
||||
blamerResultHtml +=' <td>订单金额</td>';
|
||||
blamerResultHtml +=' <td>售后金额占比</td>';
|
||||
blamerResultHtml +='</tr>';
|
||||
if (dataList.length > 0)
|
||||
{
|
||||
var totalCount = 0;
|
||||
var totalLossAmount = 0;
|
||||
var totalDesignAmount = 0;
|
||||
Z.each(dataList, function(item, i){
|
||||
var amount=(item.lostAmount ? item.lostAmount : 0)-(item.lossAmountCanceled ? item.lossAmountCanceled : 0);//计算真实损失金额
|
||||
totalCount += parseFloat((item.afterCount ? item.afterCount : 0));
|
||||
var trTotalLossAmount = parseFloat((amount >= 0 ? amount : 0));
|
||||
var trTotalDesignAmount = parseFloat(Z.Amounts.toYuanMustRadix(item.totalOrderAmount));
|
||||
|
||||
var afterDetail = item.afterDetail ? item.afterDetail : [];
|
||||
blamerResultHtml +='<tr class="z-h40" bgcolor="'+(i%2 != 0 ? '#f3fdfc' : '#ffffff')+'" onclick="doShowDetail(\''+(item.afterBlamer)+'\')">';
|
||||
blamerResultHtml +=' <td>'+(i+1)+'</td>';
|
||||
blamerResultHtml +=' <td>'+(item.afterBlamer)+'</td>';
|
||||
blamerResultHtml +=' <td>'+(item.afterCount ? item.afterCount : 0)+'</td>';
|
||||
blamerResultHtml +=' <td>'+(amount >= 0 ? amount : 0).toFixed(2)+'</td>';
|
||||
blamerResultHtml +=' <td>'+(trTotalDesignAmount)+'</td>';
|
||||
blamerResultHtml +=' <td>'+((trTotalLossAmount/trTotalDesignAmount)*100).toFixed(2)+'%</td>';
|
||||
blamerResultHtml +='</tr>';
|
||||
|
||||
totalLossAmount += trTotalLossAmount;
|
||||
totalDesignAmount += trTotalDesignAmount;
|
||||
});
|
||||
|
||||
|
||||
blamerResultHtml +='<tr class="z-h40">';
|
||||
blamerResultHtml +=' <td colspan="2">总计</td>';
|
||||
blamerResultHtml +=' <td>'+totalCount+'</td>';
|
||||
blamerResultHtml +=' <td>'+totalLossAmount.toFixed(2)+'</td>';
|
||||
blamerResultHtml +=' <td>'+totalDesignAmount.toFixed(2)+'</td>';
|
||||
blamerResultHtml +=' <td>'+((totalLossAmount/totalDesignAmount)*100).toFixed(2)+'%</td>';
|
||||
blamerResultHtml +='</tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
blamerResultHtml +='<tr class="z-h40">';
|
||||
blamerResultHtml +=' <td colspan="5">暂时没有数据信息</td>';
|
||||
blamerResultHtml +='</tr>';
|
||||
}
|
||||
Z("#blamerResult").htmlc(blamerResultHtml);
|
||||
|
||||
}
|
||||
|
||||
function getAfterStatusHtml(status)
|
||||
{//获取售后窗台
|
||||
<#for item : AfterConstants.getStatusList()>
|
||||
if (''+status == ''+'${item.value()}')
|
||||
{
|
||||
var status${item_index} = "${AfterConstants.statusHtml(item.value())}";
|
||||
return status${item_index};
|
||||
}
|
||||
</#for>
|
||||
|
||||
return '';
|
||||
}
|
||||
function doShowDetail(afterBlamer)
|
||||
{//显示详情
|
||||
|
||||
var blamer = blamerAfterMap.get(afterBlamer);
|
||||
var afterDetail = blamer ? blamer.afterDetail : [];
|
||||
afterDetail = afterDetail ? afterDetail : [];
|
||||
var canceledDetail = blamer ? blamer.canceledDetail : [];
|
||||
canceledDetail = canceledDetail ? canceledDetail : [];
|
||||
|
||||
var commNorecod = '';
|
||||
commNorecod += '<tr valign="middle" class="z-h40 z-text-center z-bg-white">';
|
||||
commNorecod += ' <td colspan="20">暂无数据信息</td>';
|
||||
commNorecod += '</tr>';
|
||||
var commThead = ''
|
||||
commThead += '<tr class="z-h40 z-text-center z-bg-gray">';
|
||||
commThead += ' <td width="90">售后单号</td>';
|
||||
commThead += ' <td width="90">设计单号</td>';
|
||||
commThead += ' <td width="90">处理状态</td>';
|
||||
commThead += ' <td width="100">损失金额</td>';
|
||||
commThead += ' <td width="100">设计师</td>';
|
||||
commThead += ' <td width="100">店铺</td>';
|
||||
commThead += ' <td width="100">旺旺号</td>';
|
||||
commThead += ' <td width="*">产品</td>';
|
||||
commThead += ' <td width="90">订单金额</td>';
|
||||
commThead += ' <td width="90">售后创建时间</td>';
|
||||
commThead += ' <td width="*">售后原因</td>';
|
||||
commThead += '</tr>';
|
||||
|
||||
var blamerAfterDetailHtml = '';
|
||||
|
||||
blamerAfterDetailHtml += '<div class="z-overflow-y-auto" style="max-height:750px">'
|
||||
blamerAfterDetailHtml += '<table class="z-table z-bordered z-bg-white z-text-center">';
|
||||
blamerAfterDetailHtml += '<tr class="z-h40"> ';
|
||||
blamerAfterDetailHtml += ' <td class="z-text-left z-bold z-px14 z-bg-white" colspan="10"> <span class="z-text-red z-bold">['+afterBlamer+']</span>售后订单详情</td>';
|
||||
blamerAfterDetailHtml += '</tr>';
|
||||
blamerAfterDetailHtml += commThead;
|
||||
if (afterDetail.length > 0)
|
||||
{
|
||||
Z.each(afterDetail, function(item, i)
|
||||
{
|
||||
blamerAfterDetailHtml += '<tr align="center" class="z-h40 z-pointer" bgcolor="'+(i%2 != 0 ? '#f3fdfc' : '#ffffff')+'"> ';
|
||||
blamerAfterDetailHtml += ' <td>'+item.designAfsId+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+item.designId+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+getAfterStatusHtml(item.afterStatus)+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(item.lossAmount ? item.lossAmount : 0).toFixed(2)+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+item.designer+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(item.shopNick ? item.shopNick : '')+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(item.buyerNick ? item.buyerNick : '')+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(item.orderText ? item.orderText : '')+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+parseFloat((item.amount ? Z.Amounts.toYuanMustRadix(''+item.amount) : 0)).toFixed(2)+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(item.afterFinishTime ? item.afterCreateTime : '')+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(item.problemDesc ? item.problemDesc : '')+'</td>';
|
||||
blamerAfterDetailHtml += '</tr>';
|
||||
});
|
||||
|
||||
blamerAfterDetailHtml += '<tr valign="middle" class="z-h40 z-text-right z-bg-white">';
|
||||
blamerAfterDetailHtml += ' <td colspan="15">共 <span class="z-text-red">'+afterDetail.length+'</span> 条数据 </td>';
|
||||
blamerAfterDetailHtml += '</tr>';
|
||||
}
|
||||
else
|
||||
blamerAfterDetailHtml += commNorecod;
|
||||
blamerAfterDetailHtml += ' </table>';
|
||||
blamerAfterDetailHtml += '</div>'
|
||||
blamerAfterDetailHtml += '</table>';
|
||||
blamerAfterDetailHtml += '</div>';
|
||||
Z("#blamerAfterDetailHtml").htmlc(blamerAfterDetailHtml);
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
${zhiqim_manager_breadcrumb("售后统计")}
|
||||
${zhiqim_manager_content()}
|
||||
<#-- 导航栏 -->
|
||||
<div class="z-tabnav-main z-blue z-mg-b20">
|
||||
<nav>
|
||||
<ul>
|
||||
<li onclick="Z.Location.href('personalAfterStatistics.htm');">个人售后统计</li>
|
||||
<#if ZmrPathRule.check(request, "/designAfterStatistics.htm")><li onclick="Z.L.href('designAfterStatistics.htm')">售后订单统计</li></#if>
|
||||
<li class="z-active">售后创建统计</li>
|
||||
<#if ZmrPathRule.check(request, "/designAfterReasonStatistics.htm")><li onclick="Z.L.href('designAfterReasonStatistics.htm')">售后原因统计</li></#if>
|
||||
<#if ZmrPathRule.check(request, "/designAfterOrgStatistics.htm")><li onclick="Z.L.href('designAfterOrgStatistics.htm')">售后组织统计</li></#if>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<table class="z-table z-bordered z-pd6">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<form name="theForm">
|
||||
<table class="z-table">
|
||||
<tr class="z-h40" bgcolor="${zmr_thead_bgcolor}">
|
||||
<td class="z-bold z-px14 zi-pd-l5"> 统计查询条件:</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="z-table z-bordered z-pd6">
|
||||
<tr class="z-h40 z-bg-white">
|
||||
<td>查询日期:
|
||||
<select name="year" class="z-select" data-role="z-select" data-class="z-blue">
|
||||
<#for yyyy : 2018..DateTimes.getCurrentYear()>
|
||||
<option value="${yyyy}" <#if year==yyyy>selected</#if>>${yyyy}</option>
|
||||
</#for>
|
||||
</select>
|
||||
<select name="month" class="z-select" data-role="z-select" data-class="z-blue">
|
||||
<#for mm : 1..12>
|
||||
<option value="${mm}" <#if month==mm>selected</#if>>${mm}</option>
|
||||
</#for>
|
||||
</select>
|
||||
<button type="button" class="z-mg-l10 z-button ${zmr_color_class}" onclick="this.form.submit()">查询</button>
|
||||
</td>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="z-h40">
|
||||
<td width="450" valign="top">
|
||||
<div id="blamerResult" class="z-overflow-y-auto" style="max-height:760px">
|
||||
<table class="z-table z-bordered z-pd6 z-bg-white z-text-center" id="statTable">
|
||||
<tr class="z-h40">
|
||||
<td>责任人</td>
|
||||
<td>售后单数</td>
|
||||
<td>损失金额</td>
|
||||
<td>订单金额</td>
|
||||
<td>售后金额占比</td>
|
||||
</tr>
|
||||
<tr class="z-h40">
|
||||
<td colspan="5">暂时没有数据信息</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
<td width="*" id="blamerAfterDetailHtml" valign="top"></td>
|
||||
</tr>
|
||||
</table>
|
||||
${zhiqim_manager_content_end()}
|
||||
@@ -0,0 +1,365 @@
|
||||
${Scripts.src("/zinc/chart/highcharts.js")}
|
||||
${Scripts.src("/zinc/chart/exporting.js")}
|
||||
${Scripts.src("/zinc/chart/highcharts-zh_CN.js")}
|
||||
<script>
|
||||
|
||||
var dataMap = new Z.HashMap();
|
||||
var dataList = [];
|
||||
var orgMap = new Z.HashMap();
|
||||
var finalizeEndMap = new Z.HashMap();
|
||||
var finalizeSum =0;
|
||||
var allOrgCountMap=new Z.HashMap();
|
||||
var allCount=0;
|
||||
//倒叙方法 [].reverse();
|
||||
function getObject(json)
|
||||
{
|
||||
json = json.replace(/\r/g, '');
|
||||
json = json.replace(/\n/g, '<br/>');
|
||||
json = json.replace(/\t/g, ' ');
|
||||
var reg = /(\u0000)|(\u0001)|(\u0002)|(\u0003)|(\u0004)|(\u0005)|(\u0006)|(\u0007)|(\u000b)|(\u000e)|(\u000f)|(\u0010)|(\u0011)|(\u0012)|(\u0013)|(\u0014)|(\u0015)|(\u0016)|(\u0017)|(\u0018)|(\u0019)|(\u001a)|(\u001b)|(\u001c)|(\u001d)|(\u001e)|(\u001f)/g;
|
||||
//var reg = //g;
|
||||
return Z.J.toObject(json.replace(reg, ""));
|
||||
}
|
||||
|
||||
|
||||
function initData()
|
||||
{//数据初始化
|
||||
<#for item : orgAfterMap.values()>
|
||||
dataMap.put('${item.getAfterBlamer()}', getObject('${item}'));
|
||||
dataList.push(dataMap.get('${item.getAfterBlamer()}'));
|
||||
</#for>
|
||||
|
||||
<#for item : finalizeMap.keySet()>
|
||||
finalizeEndMap.put('${item}','${finalizeMap.get(item)}');
|
||||
</#for>
|
||||
|
||||
<#for item : allDesignOrderCountMap.keySet()>
|
||||
allOrgCountMap.put('${item}','${allDesignOrderCountMap.get(item)}');
|
||||
</#for>
|
||||
|
||||
<#for item : orgList>
|
||||
orgMap.put('${item.getOrgId()}', getObject('${item}'));
|
||||
</#for>
|
||||
|
||||
};
|
||||
|
||||
function getOrgName(orgId)
|
||||
{//获取售后原因
|
||||
return orgMap.get(''+orgId) ? orgMap.get(''+orgId).orgName : ''+orgId;
|
||||
}
|
||||
|
||||
function doBuildCharts()
|
||||
{//构建图表
|
||||
|
||||
var allCount = 0;
|
||||
var chartDatas = [];
|
||||
|
||||
try
|
||||
{
|
||||
Z.each(dataList, function(orgData, i){
|
||||
allCount += orgData.afterCount ? orgData.afterCount : 0;
|
||||
});
|
||||
|
||||
Z.each(dataList, function(orgData, i){
|
||||
var ratio = 0;
|
||||
if (allCount > 0)
|
||||
{
|
||||
ratio = ((orgData.afterCount ? orgData.afterCount : 0) / allCount)*100;
|
||||
}
|
||||
|
||||
var name = getOrgName(orgData.afterBlamer);
|
||||
chartDatas.push({name: name, y:ratio.toFixed(2)*1})
|
||||
//chartDatas.push({name:"1232331", y:200})
|
||||
});
|
||||
}
|
||||
catch(e)
|
||||
{console.error(e)}
|
||||
|
||||
console.log(chartDatas);
|
||||
console.log(allCount);
|
||||
|
||||
|
||||
Highcharts.chart('container',
|
||||
{
|
||||
chart: {plotBackgroundColor: null,plotBorderWidth: null,plotShadow: false,type: 'pie'},
|
||||
title: {text: '售后组织总统计(总售后单量:'+allCount+')'},
|
||||
tooltip: {pointFormat: '{series.name}: <b>{point.percentage:.2f}%</b>'},
|
||||
plotOptions:
|
||||
{
|
||||
pie:
|
||||
{
|
||||
allowPointSelect: true,
|
||||
cursor: 'pointer',
|
||||
dataLabels:
|
||||
{
|
||||
enabled: true,
|
||||
format: '<b>{point.name}</b>: {point.percentage:.2f} %',
|
||||
style: { color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'}
|
||||
}
|
||||
}
|
||||
},
|
||||
series:
|
||||
[{
|
||||
name: '百分比',
|
||||
colorByPoint: true,
|
||||
data:chartDatas
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function doBuildChartTable()
|
||||
{//构建表格统计
|
||||
var allCount = 0;
|
||||
var allLostAmount = 0;
|
||||
var allOrderAmount = 0;
|
||||
var allOrgOrdAmount = 0;
|
||||
Z.each(dataList, function(orgData, i){
|
||||
var oName = getOrgName(orgData.afterBlamer);
|
||||
allCount += orgData.afterCount ? orgData.afterCount : 0;
|
||||
allLostAmount += orgData.lostAmount ? orgData.lostAmount : 0;
|
||||
allOrderAmount += orgData.totalOrderAmount ? Z.Amounts.toYuanMustRadix(orgData.totalOrderAmount)*1 : 0;
|
||||
allOrgOrdAmount += allOrgCountMap.get(oName)==null ? 0:Z.Amounts.toYuanMustRadix(allOrgCountMap.get(oName))*1;
|
||||
});
|
||||
|
||||
var chartTableHtml = '';
|
||||
chartTableHtml += '<table class="z-table z-bordered-line z-pd10 z-bg-white z-text-left">';
|
||||
chartTableHtml += ' <tr class="z-bg-gray">';
|
||||
chartTableHtml += ' <td width="100">售后组织</td>';
|
||||
chartTableHtml += ' <td width="80">总定稿量</td>';
|
||||
chartTableHtml += ' <td width="95">总定稿金额</td>';
|
||||
chartTableHtml += ' <td width="80">售后单量</td>';
|
||||
//chartTableHtml += ' <td width="110">售后单量占比</td>';
|
||||
chartTableHtml += ' <td width="95">售后单损失金额</td>';
|
||||
chartTableHtml += ' <td width="95">售后单金额</td>';
|
||||
chartTableHtml += ' <td width="95">售后&总定稿金额占比</td>';
|
||||
chartTableHtml += ' <td width="95">售后&总定稿量占比</td>';
|
||||
//chartTableHtml += ' <td width="*">售后损失&订单金额占比</td>';
|
||||
chartTableHtml += ' </tr>';
|
||||
|
||||
Z.each(dataList, function(orgData, i){
|
||||
var orgName = getOrgName(orgData.afterBlamer);
|
||||
var afterCount = orgData.afterCount ? orgData.afterCount : 0;
|
||||
var totalOrderAmount = orgData.totalOrderAmount ? Z.Amounts.toYuanMustRadix(orgData.totalOrderAmount)*1 : 0;
|
||||
var lostAmount = orgData.lostAmount ? orgData.lostAmount : 0;
|
||||
var finalizeCount = finalizeEndMap.get(orgName) == null ? 0 : finalizeEndMap.get(orgName);
|
||||
var allOrgCount=allOrgCountMap.get(orgName) == null ? 0 : Z.Amounts.toYuanMustRadix(allOrgCountMap.get(orgName))*1;
|
||||
finalizeSum += parseInt(finalizeCount);
|
||||
|
||||
chartTableHtml += ' <tr class="z-h40" bgcolor="'+(i%2 != 0 ? '#f3fdfc' : '#ffffff')+'">';
|
||||
chartTableHtml += ' <td><a href="javascript:doShowDetailList(\''+orgData.afterBlamer+'\')" class="z-text-ellipsis z-pointer" style="max-width:120px" title="'+orgName+'">'+orgName+'</a></td>';
|
||||
chartTableHtml += ' <td>'+finalizeCount+'</td>';
|
||||
chartTableHtml += ' <td>'+allOrgCount+'</td>';
|
||||
chartTableHtml += ' <td>'+afterCount+'</td>';
|
||||
//chartTableHtml += ' <td>'+(allCount == 0 ? 0 : (afterCount/allCount)*100).toFixed(2)+'%</td>';
|
||||
chartTableHtml += ' <td>'+lostAmount.toFixed(2)+'</td>';
|
||||
chartTableHtml += ' <td>'+totalOrderAmount.toFixed(2)+'</td>';
|
||||
chartTableHtml += ' <td>'+(allOrgCount == 0 ? 100 : (totalOrderAmount/allOrgCount)*100).toFixed(2)+'%</td>';
|
||||
chartTableHtml += ' <td>'+(finalizeCount == 0 ? 100 : (afterCount/finalizeCount)*100).toFixed(2)+'%</td>';
|
||||
//chartTableHtml += ' <td>'+(totalOrderAmount == 0 ? 100 : (lostAmount/totalOrderAmount)*100).toFixed(2)+'%</td>';
|
||||
chartTableHtml += ' </tr>';
|
||||
});
|
||||
|
||||
chartTableHtml += ' <tr class="z-bold">';
|
||||
chartTableHtml += ' <td>总计</td>';
|
||||
chartTableHtml += ' <td>'+finalizeSum+'</td>';
|
||||
chartTableHtml += ' <td>'+allOrgOrdAmount.toFixed(2)+'</td>';
|
||||
chartTableHtml += ' <td>'+allCount+'</td>';
|
||||
//chartTableHtml += ' <td>100%</td>';
|
||||
chartTableHtml += ' <td>'+allLostAmount.toFixed(2)+'</td>';
|
||||
chartTableHtml += ' <td>'+allOrderAmount.toFixed(2)+'</td>';
|
||||
chartTableHtml += ' <td>'+(allOrgOrdAmount == 0 ? 100 : (allOrderAmount/allOrgOrdAmount)*100).toFixed(2)+'%</td>';
|
||||
chartTableHtml += ' <td>'+(finalizeSum == 0 ? 100 : (allCount/finalizeSum)*100).toFixed(2)+'%</td>';
|
||||
//chartTableHtml += ' <td>'+(allOrderAmount == 0 ? 0 : (allLostAmount/allOrderAmount)*100).toFixed(2)+'%</td>';
|
||||
chartTableHtml += ' </tr>';
|
||||
chartTableHtml += ' </table>';
|
||||
|
||||
Z("#chartTable_panal").htmlc(chartTableHtml)
|
||||
}
|
||||
|
||||
Z.onload(function()
|
||||
{
|
||||
|
||||
//初始化数据
|
||||
initData();
|
||||
|
||||
//构建图表
|
||||
doBuildCharts();
|
||||
|
||||
//构建表格统计
|
||||
doBuildChartTable();
|
||||
|
||||
});
|
||||
|
||||
function getAfterStatusHtml(status)
|
||||
{//获取售后状态
|
||||
<#for item : AfterConstants.getStatusList()>
|
||||
if (''+status == ''+'${item.value()}')
|
||||
{
|
||||
var status${item_index} = "${AfterConstants.statusHtml(item.value())}";
|
||||
return status${item_index};
|
||||
}
|
||||
</#for>
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
function doShowDetailList(orgId)
|
||||
{//显示详情列表
|
||||
var afterModule = dataMap.get(''+orgId);
|
||||
var detailList = afterModule.afterDetail ? afterModule.afterDetail : [];
|
||||
if (detailList .length == 0)
|
||||
return;
|
||||
|
||||
|
||||
detailList.sort(function (a, b){
|
||||
a.afterCount = Z.V.isInteger(a.afterCount) ? a.afterCount : 0;
|
||||
b.afterCount = Z.V.isInteger(b.afterCount) ? b.afterCount : 0;
|
||||
|
||||
a.lostAmount = Z.V.isFloat(a.lostAmount) ? a.lostAmount : 0;
|
||||
b.lostAmount = Z.V.isFloat(b.lostAmount) ? b.lostAmount : 0;
|
||||
|
||||
var result1 = a.afterCount - b.afterCount;
|
||||
var result2 = a.lostAmount - b.lostAmount;
|
||||
return result2 != 0 ? result2 : result1;
|
||||
});
|
||||
detailList.sort();
|
||||
detailList.reverse();
|
||||
|
||||
|
||||
var detailHtml = '';
|
||||
|
||||
var commNorecod = '';
|
||||
commNorecod += '<tr valign="middle" class="z-h40 z-text-center z-bg-white">';
|
||||
commNorecod += ' <td colspan="20">暂无数据信息</td>';
|
||||
commNorecod += '</tr>';
|
||||
var commThead = ''
|
||||
commThead += '<tr class="z-h40 z-text-center z-bg-gray">';
|
||||
commThead += ' <td width="90">售后单号</td>';
|
||||
commThead += ' <td width="90">设计单号</td>';
|
||||
commThead += ' <td width="90">处理状态</td>';
|
||||
commThead += ' <td width="100">损失金额</td>';
|
||||
commThead += ' <td width="100">设计师</td>';
|
||||
commThead += ' <td width="100">店铺</td>';
|
||||
commThead += ' <td width="100">旺旺号</td>';
|
||||
commThead += ' <td width="*">产品</td>';
|
||||
commThead += ' <td width="90">订单金额</td>';
|
||||
commThead += ' <td width="90">售后创建时间</td>';
|
||||
commThead += ' <td width="90">联系人</td>';
|
||||
commThead += ' <td width="100">联系电话</td>';
|
||||
commThead += '</tr>';
|
||||
|
||||
detailHtml += '<div class="z-overflow-y-auto" style="max-height:750px">';
|
||||
detailHtml += '<table class="z-table z-bordered z-bg-white z-text-center">';
|
||||
detailHtml += commThead;
|
||||
|
||||
if (detailList.length > 0)
|
||||
{
|
||||
Z.each(detailList, function(item, i)
|
||||
{
|
||||
detailHtml += '<tr align="center" class="z-h40 z-pointer" bgcolor="'+(i%2 != 0 ? '#f3fdfc' : '#ffffff')+'"> ';
|
||||
detailHtml += ' <td>'+item.designAfsId+'</td>';
|
||||
detailHtml += ' <td>'+item.designId+'</td>';
|
||||
detailHtml += ' <td>'+getAfterStatusHtml(item.afterStatus)+'</td>';
|
||||
detailHtml += ' <td>'+(item.lossAmount ? item.lossAmount : 0).toFixed(2)+'</td>';
|
||||
detailHtml += ' <td>'+item.designer+'</td>';
|
||||
detailHtml += ' <td>'+(item.shopNick ? item.shopNick : '')+'</td>';
|
||||
detailHtml += ' <td>'+(item.buyerNick ? item.buyerNick : '')+'</td>';
|
||||
detailHtml += ' <td>'+(item.orderText ? item.orderText : '')+'</td>';
|
||||
detailHtml += ' <td>'+parseFloat((item.amount ? Z.Amounts.toYuanMustRadix(''+item.amount) : 0)).toFixed(2)+'</td>';
|
||||
detailHtml += ' <td>'+(item.afterFinishTime ? item.afterCreateTime : '')+'</td>';
|
||||
detailHtml += ' <td>'+(item.userContact ? item.userContact : '')+'</td>';
|
||||
detailHtml += ' <td>'+(item.userMobile ? item.userMobile : '')+'</td>';
|
||||
detailHtml += '</tr>';
|
||||
});
|
||||
|
||||
detailHtml += '<tr valign="middle" class="z-h40 z-text-right z-bg-white">';
|
||||
detailHtml += ' <td colspan="15">共 <span class="z-text-red">'+detailList.length+'</span> 条数据 </td>';
|
||||
detailHtml += '</tr>';
|
||||
}
|
||||
else
|
||||
detailHtml += commNorecod;
|
||||
detailHtml += ' </table>';
|
||||
detailHtml += '</div>'
|
||||
detailHtml += '</table>';
|
||||
detailHtml += '</div>';
|
||||
|
||||
var title ='<span class="zi-text-red zi-bold">['+getOrgName(afterModule.afterBlamer)+']</span>售后订单详情统';
|
||||
if (Z("#detailHtml").length == 0)
|
||||
Z.dialog({id:'detailDialog',title: '<span id="detailDialogTile"><span>', text: '<div id="detailHtml"></div>', width:1300, height:780, shadow:true})
|
||||
Z("#detailDialogTile").htmlc(title);
|
||||
Z("#detailHtml").htmlc(detailHtml);
|
||||
}
|
||||
|
||||
</script>
|
||||
${zhiqim_manager_breadcrumb("售后统计")}
|
||||
${zhiqim_manager_content()}
|
||||
<#-- 导航栏 -->
|
||||
<div class="z-tabnav-main z-blue z-mg-b20">
|
||||
<nav>
|
||||
<ul>
|
||||
<li onclick="Z.Location.href('personalAfterStatistics.htm');">个人售后统计</li>
|
||||
<#if ZmrPathRule.check(request, "/designAfterStatistics.htm")><li onclick="Z.L.href('designAfterStatistics.htm')">售后订单统计</li></#if>
|
||||
<#if ZmrPathRule.check(request, "/designAfterCreateStatistics.htm")><li onclick="Z.L.href('designAfterCreateStatistics.htm')">售后创建统计</li></#if>
|
||||
<#if ZmrPathRule.check(request, "/designAfterReasonStatistics.htm")><li onclick="Z.L.href('designAfterReasonStatistics.htm')">售后原因统计</li></#if>
|
||||
<li class="z-active">售后组织统计</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<#-- 查询条件 -->
|
||||
${zhiqim_manager_title("查询条件")}
|
||||
<form name="theForm" action="/designAfterOrgStatistics.htm">
|
||||
<table class="z-table z-bordered z-pd6">
|
||||
<tr class="z-h40 z-bg-white">
|
||||
<td>查询日期:
|
||||
<select name="year" class="z-select" data-role="z-select" data-class="z-blue">
|
||||
<#for yyyy : 2018..DateTimes.getCurrentYear()>
|
||||
<option value="${yyyy}" <#if year==yyyy>selected</#if>>${yyyy}</option>
|
||||
</#for>
|
||||
</select>
|
||||
<select name="month" class="z-select" data-role="z-select" data-class="z-blue">
|
||||
<#for mm : 1..12>
|
||||
<option value="${mm}" <#if month==mm>selected</#if>>${mm}</option>
|
||||
</#for>
|
||||
</select>
|
||||
<button type="button" class="z-mg-l10 z-button ${zmr_color_class}" onclick="Z.loading({shadow: true});this.form.submit();">查询</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br>
|
||||
|
||||
<#-- 分页列表-->
|
||||
<table class="z-table z-bordered z-pd6 z-bg-white">
|
||||
<tr>
|
||||
<td width="40%"><div id="container" class="z-bg-white" style="min-width:400px;height:600px"></div></td>
|
||||
<td width="*" valign="top">
|
||||
<div id="chartTable_panal" class="z-overflow-y-auto" style="max-height:750px">
|
||||
<table class="z-table z-bordered-line z-pd10 z-bg-white z-text-left">
|
||||
<tr class="z-bg-gray">
|
||||
<td width="100">售后组织</td>
|
||||
<td width="80">总定稿量</td>
|
||||
<td width="95">总定稿金额</td>
|
||||
<td width="80">售后单量</td>
|
||||
<!--<td width="110">售后单量占比</td> -->
|
||||
<td width="95">售后单损失金额</td>
|
||||
<td width="95">售后单金额</td>
|
||||
<td width="95">售后&总定稿金额占比</td>
|
||||
<td width="95">售后&总定稿量占比</td>
|
||||
<!--<td width="*">售后损失&订单金额占比</td>-->
|
||||
</tr>
|
||||
<tr class="z-bold">
|
||||
<td>总计</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
${zhiqim_manager_content_end()}
|
||||
@@ -0,0 +1,287 @@
|
||||
${Scripts.src("/zinc/chart/highcharts.js")}
|
||||
${Scripts.src("/zinc/chart/exporting.js")}
|
||||
${Scripts.src("/zinc/chart/highcharts-zh_CN.js")}
|
||||
<script>
|
||||
|
||||
var dataList = ${reasonList};
|
||||
|
||||
Z.onload(function()
|
||||
{
|
||||
//构建图表
|
||||
doBuildCharts();
|
||||
|
||||
//构建表格统计
|
||||
doBuildChartTable();
|
||||
|
||||
});
|
||||
|
||||
//构建图表
|
||||
function doBuildCharts()
|
||||
{
|
||||
var allCount = 0;
|
||||
var chartDatas = [];
|
||||
|
||||
try
|
||||
{
|
||||
Z.each(dataList, function(reasonData, i){
|
||||
allCount += reasonData.afterCount ? reasonData.afterCount : 0;
|
||||
});
|
||||
|
||||
Z.each(dataList, function(reasonData, i){
|
||||
var ratio = 0;
|
||||
if (allCount > 0)
|
||||
{
|
||||
ratio = ((reasonData.afterCount ? reasonData.afterCount : 0) / allCount)*100;
|
||||
}
|
||||
|
||||
var name = reasonData.problemReason;
|
||||
chartDatas.push({name: name, y:ratio.toFixed(2)*1})
|
||||
});
|
||||
}
|
||||
catch(e)
|
||||
{console.error(e)}
|
||||
|
||||
Highcharts.chart('container',
|
||||
{
|
||||
chart: {plotBackgroundColor: null,plotBorderWidth: null,plotShadow: false,type: 'pie'},
|
||||
title: {text: '售后原因总统计(总售后单量:'+allCount+')'},
|
||||
tooltip: {pointFormat: '{series.name}: <b>{point.percentage:.2f}%</b>'},
|
||||
plotOptions:
|
||||
{
|
||||
pie:
|
||||
{
|
||||
allowPointSelect: true,
|
||||
cursor: 'pointer',
|
||||
dataLabels:
|
||||
{
|
||||
enabled: true,
|
||||
format: '<b>{point.name}</b>: {point.percentage:.2f} %',
|
||||
style: { color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'}
|
||||
}
|
||||
}
|
||||
},
|
||||
series:
|
||||
[{
|
||||
name: '百分比',
|
||||
colorByPoint: true,
|
||||
data:chartDatas
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
//构建表格统计
|
||||
function doBuildChartTable()
|
||||
{
|
||||
var allCount = 0;
|
||||
var allLostAmount = 0;
|
||||
var allOrderAmount = 0;
|
||||
Z.each(dataList, function(reasonData, i){
|
||||
allCount += reasonData.afterCount ? reasonData.afterCount : 0;
|
||||
allLostAmount += reasonData.lostAmount ? reasonData.lostAmount : 0;
|
||||
allOrderAmount += reasonData.totalOrderAmount ? Z.Amounts.toYuanMustRadix(reasonData.totalOrderAmount)*1 : 0;
|
||||
});
|
||||
|
||||
var chartTableHtml = '';
|
||||
chartTableHtml += '<table class="z-table z-bordered-line z-pd10 z-bg-white z-text-left">';
|
||||
chartTableHtml += ' <tr class="z-bg-gray">';
|
||||
chartTableHtml += ' <td width="200">售后原因</td>';
|
||||
chartTableHtml += ' <td width="100">售后单量</td>';
|
||||
chartTableHtml += ' <td width="100">单量占比</td>';
|
||||
chartTableHtml += ' <td width="100">损失金额</td>';
|
||||
chartTableHtml += ' <td width="100">订单金额</td>';
|
||||
chartTableHtml += ' <td width="*">损失&订单金额占比</td>';
|
||||
chartTableHtml += ' </tr>';
|
||||
|
||||
Z.each(dataList, function(reasonData, i){
|
||||
var reason = reasonData.problemReason;
|
||||
var afterCount = reasonData.afterCount ? reasonData.afterCount : 0;
|
||||
var totalOrderAmount = reasonData.totalOrderAmount ? Z.Amounts.toYuanMustRadix(reasonData.totalOrderAmount)*1 : 0;
|
||||
var lostAmount = reasonData.lostAmount ? reasonData.lostAmount : 0;
|
||||
|
||||
chartTableHtml += ' <tr class="z-h40" bgcolor="'+(i%2 != 0 ? '#f3fdfc' : '#ffffff')+'">';
|
||||
chartTableHtml += ' <td>'+reason+'</td>';
|
||||
chartTableHtml += ' <td>'+afterCount+'</td>';
|
||||
chartTableHtml += ' <td>'+(allCount == 0 ? 0 : (afterCount/allCount)*100).toFixed(2)+'%</td>';
|
||||
chartTableHtml += ' <td>'+lostAmount.toFixed(2)+'</td>';
|
||||
chartTableHtml += ' <td>'+totalOrderAmount.toFixed(2)+'</td>';
|
||||
chartTableHtml += ' <td>'+(totalOrderAmount == 0 ? 100 : (lostAmount/totalOrderAmount)*100).toFixed(2)+'%</td>';
|
||||
chartTableHtml += ' </tr>';
|
||||
});
|
||||
|
||||
chartTableHtml += ' <tr class="z-bold">';
|
||||
chartTableHtml += ' <td>总计</td>';
|
||||
chartTableHtml += ' <td>'+allCount+'</td>';
|
||||
chartTableHtml += ' <td>'+(allCount != 0 ? '100%' : 0)+'</td>';
|
||||
chartTableHtml += ' <td>'+allLostAmount.toFixed(2)+'</td>';
|
||||
chartTableHtml += ' <td>'+allOrderAmount.toFixed(2)+'</td>';
|
||||
chartTableHtml += ' <td>'+(allOrderAmount == 0 ? 0 : (allLostAmount/allOrderAmount)*100).toFixed(2)+'%</td>';
|
||||
chartTableHtml += ' </tr>';
|
||||
chartTableHtml += ' </table>';
|
||||
|
||||
Z("#chartTable_panal").htmlc(chartTableHtml)
|
||||
}
|
||||
|
||||
//显示原因详情列表
|
||||
function doShowDetailList(reason)
|
||||
{
|
||||
var afterModule = dataMap.get(reason);
|
||||
var detailList = afterModule.afterDetail ? afterModule.afterDetail : [];
|
||||
if (detailList .length == 0)
|
||||
return;
|
||||
|
||||
|
||||
detailList.sort(function (a, b){
|
||||
a.afterCount = Z.V.isInteger(a.afterCount) ? a.afterCount : 0;
|
||||
b.afterCount = Z.V.isInteger(b.afterCount) ? b.afterCount : 0;
|
||||
|
||||
a.lostAmount = Z.V.isFloat(a.lostAmount) ? a.lostAmount : 0;
|
||||
b.lostAmount = Z.V.isFloat(b.lostAmount) ? b.lostAmount : 0;
|
||||
|
||||
var result1 = a.afterCount - b.afterCount;
|
||||
var result2 = a.lostAmount - b.lostAmount;
|
||||
return result2 != 0 ? result2 : result1;
|
||||
});
|
||||
detailList.sort();
|
||||
detailList.reverse();
|
||||
|
||||
|
||||
var detailHtml = '';
|
||||
|
||||
var commNorecod = '';
|
||||
commNorecod += '<tr valign="middle" class="z-h40 z-text-center z-bg-white">';
|
||||
commNorecod += ' <td colspan="20">暂无数据信息</td>';
|
||||
commNorecod += '</tr>';
|
||||
var commThead = ''
|
||||
commThead += '<tr class="z-h40 z-text-center z-bg-gray">';
|
||||
commThead += ' <td width="90">售后单号</td>';
|
||||
commThead += ' <td width="90">设计单号</td>';
|
||||
commThead += ' <td width="90">处理状态</td>';
|
||||
commThead += ' <td width="100">损失金额</td>';
|
||||
commThead += ' <td width="100">设计师</td>';
|
||||
commThead += ' <td width="100">店铺</td>';
|
||||
commThead += ' <td width="100">旺旺号</td>';
|
||||
commThead += ' <td width="*">产品</td>';
|
||||
commThead += ' <td width="90">订单金额</td>';
|
||||
commThead += ' <td width="90">售后创建时间</td>';
|
||||
commThead += ' <td width="90">联系人</td>';
|
||||
commThead += ' <td width="100">联系电话</td>';
|
||||
commThead += '</tr>';
|
||||
|
||||
detailHtml += '<div class="z-overflow-y-auto" style="max-height:750px">';
|
||||
detailHtml += '<table class="z-table z-bordered z-bg-white z-text-center">';
|
||||
detailHtml += commThead;
|
||||
|
||||
if (detailList.length > 0)
|
||||
{
|
||||
Z.each(detailList, function(item, i)
|
||||
{
|
||||
detailHtml += '<tr align="center" class="z-h40 z-pointer" bgcolor="'+(i%2 != 0 ? '#f3fdfc' : '#ffffff')+'"> ';
|
||||
detailHtml += ' <td>'+item.designAfsId+'</td>';
|
||||
detailHtml += ' <td>'+item.designId+'</td>';
|
||||
detailHtml += ' <td>'+getAfterStatusHtml(item.afterStatus)+'</td>';
|
||||
detailHtml += ' <td>'+(item.lossAmount ? item.lossAmount : 0).toFixed(2)+'</td>';
|
||||
detailHtml += ' <td>'+item.designer+'</td>';
|
||||
detailHtml += ' <td>'+(item.shopNick ? item.shopNick : '')+'</td>';
|
||||
detailHtml += ' <td>'+(item.buyerNick ? item.buyerNick : '')+'</td>';
|
||||
detailHtml += ' <td>'+(item.orderText ? item.orderText : '')+'</td>';
|
||||
detailHtml += ' <td>'+parseFloat((item.amount ? Z.Amounts.toYuanMustRadix(''+item.amount) : 0)).toFixed(2)+'</td>';
|
||||
detailHtml += ' <td>'+(item.afterFinishTime ? item.afterCreateTime : '')+'</td>';
|
||||
detailHtml += ' <td>'+(item.userContact ? item.userContact : '')+'</td>';
|
||||
detailHtml += ' <td>'+(item.userMobile ? item.userMobile : '')+'</td>';
|
||||
detailHtml += '</tr>';
|
||||
});
|
||||
|
||||
detailHtml += '<tr valign="middle" class="z-h40 z-text-right z-bg-white">';
|
||||
detailHtml += ' <td colspan="15">共 <span class="z-text-red">'+detailList.length+'</span> 条数据 </td>';
|
||||
detailHtml += '</tr>';
|
||||
}
|
||||
else
|
||||
detailHtml += commNorecod;
|
||||
detailHtml += ' </table>';
|
||||
detailHtml += '</div>'
|
||||
detailHtml += '</table>';
|
||||
detailHtml += '</div>';
|
||||
|
||||
var title ='<span class="zi-text-red zi-bold">['+getProblemName(afterModule.afterBlamer)+']</span>售后订单详情统';
|
||||
if (Z("#detailHtml").length == 0)
|
||||
Z.dialog({id:'detailDialog',title: '<span id="detailDialogTile"><span>', text: '<div id="detailHtml"></div>', width:1300, height:780, shadow:true})
|
||||
Z("#detailDialogTile").htmlc(title);
|
||||
Z("#detailHtml").htmlc(detailHtml);
|
||||
}
|
||||
|
||||
|
||||
function getAfterStatusHtml(status)
|
||||
{//获取售后状态
|
||||
<#for item : AfterConstants.getStatusList()>
|
||||
if (''+status == ''+'${item.value()}')
|
||||
{
|
||||
var status${item_index} = "${AfterConstants.statusHtml(item.value())}";
|
||||
return status${item_index};
|
||||
}
|
||||
</#for>
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
${zhiqim_manager_breadcrumb("售后统计")}
|
||||
${zhiqim_manager_content()}
|
||||
<#-- 导航栏 -->
|
||||
<div class="z-tabnav-main z-blue z-mg-b20">
|
||||
<nav>
|
||||
<ul>
|
||||
|
||||
<#if ZmrPathRule.check(request, "/designAfterStatistics.htm")><li onclick="Z.L.href('designAfterStatistics.htm')">售后订单统计</li></#if>
|
||||
<li class="z-active">售后原因统计</li>
|
||||
<!--<li onclick="Z.Location.href('personalAfterStatistics.htm');">个人售后统计</li>
|
||||
<#if ZmrPathRule.check(request, "/designAfterCreateStatistics.htm")><li onclick="Z.L.href('designAfterCreateStatistics.htm')">售后创建统计</li></#if>
|
||||
<#if ZmrPathRule.check(request, "/designAfterOrgStatistics.htm")><li onclick="Z.L.href('designAfterOrgStatistics.htm')">售后组织统计</li></#if>-->
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<#-- 查询条件 -->
|
||||
${zhiqim_manager_title("查询条件")}
|
||||
<form name="theForm">
|
||||
<table class="z-table z-bordered z-pd6">
|
||||
<tr class="z-h40 z-bg-white">
|
||||
<td>售后日期:
|
||||
<input name="beginDate" class="z-input z-w100 ${zmr_color_class}" readonly="true" onfocus="Z.date(this);" value="${beginDate}"> -
|
||||
<input name="endDate" class="z-input z-w100 ${zmr_color_class}" readonly="true" onfocus="Z.date(this);" value="${endDate}">
|
||||
<button type="button" class="z-mg-l10 z-button ${zmr_color_class}" onclick="this.form.action='#?t='+ new Date().getTime();this.form.submit()">查询</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br>
|
||||
|
||||
<#-- 分页列表-->
|
||||
<table class="z-table z-bordered z-pd6 z-bg-white">
|
||||
<tr>
|
||||
<td width="52%"><div id="container" class="z-bg-white" style="min-width:400px;height:600px"></div></td>
|
||||
<td width="*" valign="top">
|
||||
<div id="chartTable_panal" class="z-overflow-y-auto" style="max-height:750px">
|
||||
<table class="z-table z-bordered-line z-pd10 z-bg-white z-text-left">
|
||||
<tr class="z-bg-gray">
|
||||
<td width="200">售后原因</td>
|
||||
<td width="80">单量</td>
|
||||
<td width="100">单量占比</td>
|
||||
<td width="80">损失金额</td>
|
||||
<td width="80">订单金额</td>
|
||||
<td width="*">损失&订单金额占比</td>
|
||||
</tr>
|
||||
<tr class="z-bold">
|
||||
<td>总计</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
${zhiqim_manager_content_end()}
|
||||
@@ -0,0 +1,283 @@
|
||||
<#def designatedPath="/personalRefundRateStat.htm"/>
|
||||
<script>
|
||||
|
||||
var blamerAfterMap = new Z.HashMap();
|
||||
var dataList = [];
|
||||
//倒叙方法 [].reverse();
|
||||
function getObject(json)
|
||||
{
|
||||
json = json.replace(/\r/g, '');
|
||||
json = json.replace(/\n/g, '<br/>');
|
||||
json = json.replace(/\t/g, ' ');
|
||||
var reg = /(\u0000)|(\u0001)|(\u0002)|(\u0003)|(\u0004)|(\u0005)|(\u0006)|(\u0007)|(\u000b)|(\u000e)|(\u000f)|(\u0010)|(\u0011)|(\u0012)|(\u0013)|(\u0014)|(\u0015)|(\u0016)|(\u0017)|(\u0018)|(\u0019)|(\u001a)|(\u001b)|(\u001c)|(\u001d)|(\u001e)|(\u001f)/g;
|
||||
//var reg = //g;
|
||||
return Z.J.toObject(json.replace(reg, ""));
|
||||
}
|
||||
Z.onload(function()
|
||||
{
|
||||
<#for item : blamerAfterMap.values()>
|
||||
blamerAfterMap.put('${item.getAfterBlamer()}', getObject('${item}'));
|
||||
dataList.push(blamerAfterMap.get('${item.getAfterBlamer()}'));
|
||||
</#for>
|
||||
|
||||
//显示数据
|
||||
doShowBlamerList(dataList);
|
||||
//显示详情
|
||||
doShowDetail(dataList.length > 0 ? dataList[0].afterBlamer : '');
|
||||
});
|
||||
|
||||
function doShowBlamerList(dataList)
|
||||
{//显示责任人列表
|
||||
dataList.sort(function (a, b){
|
||||
a.afterCount = Z.V.isInteger(a.afterCount) ? a.afterCount : 0;
|
||||
b.afterCount = Z.V.isInteger(b.afterCount) ? b.afterCount : 0;
|
||||
|
||||
a.lostAmount = Z.V.isFloat(a.lostAmount) ? a.lostAmount : 0;
|
||||
b.lostAmount = Z.V.isFloat(b.lostAmount) ? b.lostAmount : 0;
|
||||
|
||||
var result1 = a.afterCount - b.afterCount;
|
||||
var result2 = a.lostAmount - b.lostAmount;
|
||||
return result2 != 0 ? result2 : result1;
|
||||
});
|
||||
dataList.sort();
|
||||
dataList.reverse();
|
||||
var blamerResultHtml = "";
|
||||
blamerResultHtml +='<table class="z-table z-bordered z-pd6 z-bg-white z-text-center" id="statTable">';
|
||||
blamerResultHtml +='<tr class="z-h40" bgcolor="'+"${zmr_thead_bgcolor}"+'">';
|
||||
blamerResultHtml +=' <td>序号</td>';
|
||||
blamerResultHtml +=' <td>责任人</td>';
|
||||
blamerResultHtml +=' <td>售后单数</td>';
|
||||
blamerResultHtml +=' <td>定稿单数</td>';
|
||||
blamerResultHtml +=' <td title="售后单量/定稿单量">售后率</td>';
|
||||
blamerResultHtml +=' <td width="80">订单金额</td>';
|
||||
blamerResultHtml +=' <td width="80">损失金额</td>';
|
||||
blamerResultHtml +=' <td width="80">赔付金额</td>';
|
||||
blamerResultHtml +='</tr>';
|
||||
if (dataList.length > 0)
|
||||
{
|
||||
var totalCount = 0;
|
||||
var totalAmount = 0;
|
||||
var orderEndSum = 0;
|
||||
var lostAmount = 0;
|
||||
var totalLAmount = 0;
|
||||
var totalOrderAmount = 0;
|
||||
|
||||
var myselectYear=document.getElementById("year");
|
||||
var myselectMonth=document.getElementById("month");
|
||||
var year=myselectYear.value;
|
||||
var month=myselectMonth.value;
|
||||
var dateTime = new Date(year+"-"+month+"-01 00:00:00").getTime();
|
||||
var lDateTime = new Date("2021-10-01 00:00:00").getTime();
|
||||
var amount = 0;
|
||||
var lamount = 0;
|
||||
Z.each(dataList, function(item, i){
|
||||
if(dateTime >= lDateTime){
|
||||
lostAmount = item.compensateAmount;
|
||||
}else {
|
||||
lostAmount = item.lostAmount;
|
||||
}
|
||||
amount=lostAmount ? lostAmount : 0;
|
||||
lamount = (item.lostAmount ? item.lostAmount : 0)-(item.lossAmountCanceled ? item.lossAmountCanceled : 0);
|
||||
blamerResultHtml +='<tr class="z-h40" bgcolor="'+(i%2 != 0 ? '#f3fdfc' : '#ffffff')+'" onclick="doShowDetail(\''+(item.afterBlamer)+'\')">';
|
||||
blamerResultHtml +=' <td>'+(i+1)+'</td>';
|
||||
blamerResultHtml +=' <td>'+(item.afterBlamer)+'</td>';
|
||||
blamerResultHtml +=' <td>'+(item.afterCount ? item.afterCount : 0)+'</td>';
|
||||
blamerResultHtml +=' <td>'+(item.orderEnds)+'</td>';
|
||||
blamerResultHtml +=' <td>'+(item.afterRatio)+'%</td>';
|
||||
blamerResultHtml +=' <td>'+(item.totalOrderAmount>=0 ? item.totalOrderAmount : 0).toFixed(2)/100+'</td>';
|
||||
blamerResultHtml +=' <td>'+(lamount>=0 ? lamount : 0).toFixed(2)+'</td>';
|
||||
blamerResultHtml +=' <td>'+(amount>=0 ? amount : 0).toFixed(2)+'</td>';
|
||||
blamerResultHtml +='</tr>';
|
||||
|
||||
totalOrderAmount += parseFloat((item.totalOrderAmount>=0 ? item.totalOrderAmount : 0))/100;
|
||||
totalCount += parseFloat((item.afterCount ? item.afterCount : 0));
|
||||
totalAmount += parseFloat((lamount>=0 ? lamount : 0));
|
||||
totalLAmount += parseFloat((amount>=0 ? amount : 0));
|
||||
orderEndSum += item.orderEnds;
|
||||
});
|
||||
|
||||
|
||||
blamerResultHtml +='<tr class="z-h40">';
|
||||
blamerResultHtml +=' <td colspan="2">总计</td>';
|
||||
blamerResultHtml +=' <td>'+totalCount+'</td>';
|
||||
blamerResultHtml +=' <td>'+orderEndSum+'</td>';
|
||||
blamerResultHtml +=' <td>'+((totalCount *100)/orderEndSum).toFixed(2)+'%</td>';
|
||||
blamerResultHtml +=' <td>'+totalOrderAmount.toFixed(2)+'</td>';
|
||||
blamerResultHtml +=' <td>'+totalAmount.toFixed(2)+'</td>';
|
||||
blamerResultHtml +=' <td>'+totalLAmount.toFixed(2)+'</td>';
|
||||
blamerResultHtml +='</tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
blamerResultHtml +='<tr class="z-h40">';
|
||||
blamerResultHtml +=' <td colspan="7">暂时没有数据信息</td>';
|
||||
blamerResultHtml +='</tr>';
|
||||
}
|
||||
Z("#blamerResult").htmlc(blamerResultHtml);
|
||||
|
||||
}
|
||||
|
||||
function getAfterStatusHtml(status)
|
||||
{//获取售后窗台
|
||||
<#for item : AfterConstants.getStatusList()>
|
||||
if (''+status == ''+'${item.value()}')
|
||||
{
|
||||
var status${item_index} = "${AfterConstants.statusHtml(item.value())}";
|
||||
return status${item_index};
|
||||
}
|
||||
</#for>
|
||||
|
||||
return '';
|
||||
}
|
||||
function doShowDetail(afterBlamer)
|
||||
{//显示详情
|
||||
|
||||
var blamer = blamerAfterMap.get(afterBlamer);
|
||||
var afterDetail = blamer ? blamer.afterDetail : [];
|
||||
afterDetail = afterDetail ? afterDetail : [];
|
||||
var canceledDetail = blamer ? blamer.canceledDetail : [];
|
||||
canceledDetail = canceledDetail ? canceledDetail : [];
|
||||
|
||||
var commNorecod = '';
|
||||
commNorecod += '<tr valign="middle" class="z-h40 z-text-center z-bg-white">';
|
||||
commNorecod += ' <td colspan="11">暂无数据信息</td>';
|
||||
commNorecod += '</tr>';
|
||||
var commThead = ''
|
||||
commThead += '<tr class="z-h40 z-text-center z-bg-gray">';
|
||||
commThead += ' <td width="120">设计单号</td>';
|
||||
commThead += ' <td width="100">处理状态</td>';
|
||||
commThead += ' <td width="100">损失金额</td>';
|
||||
commThead += ' <td width="100">赔付金额</td>';
|
||||
commThead += ' <td width="100">设计师</td>';
|
||||
commThead += ' <td width="*">产品</td>';
|
||||
commThead += ' <td width="90">售后完成时间</td>';
|
||||
commThead += ' <td width="*">售后原因</td>';
|
||||
commThead += '</tr>';
|
||||
|
||||
var blamerAfterDetailHtml = '';
|
||||
|
||||
blamerAfterDetailHtml += '<div class="z-overflow-y-auto">'
|
||||
blamerAfterDetailHtml += '<table class="z-table z-bordered z-bg-white z-text-center">';
|
||||
blamerAfterDetailHtml += '<tr class="z-h40"> ';
|
||||
blamerAfterDetailHtml += ' <td class="z-text-left z-bold z-px14 z-bg-white" colspan="10"> <span class="z-text-red z-bold">['+afterBlamer+']</span>售后订单详情</td>';
|
||||
blamerAfterDetailHtml += '</tr>';
|
||||
blamerAfterDetailHtml += commThead;
|
||||
var lossAmount = 0;
|
||||
var lamount = 0;
|
||||
if (afterDetail.length > 0)
|
||||
{
|
||||
Z.each(afterDetail, function(item, i)
|
||||
{
|
||||
var myselectYear=document.getElementById("year");
|
||||
var myselectMonth=document.getElementById("month");
|
||||
var year=myselectYear.value;
|
||||
var month=myselectMonth.value;
|
||||
var dateTime = new Date(year+"-"+month+"-01 00:00:00").getTime();
|
||||
var lDateTime = new Date("2021-10-01 00:00:00").getTime();
|
||||
|
||||
if(dateTime >= lDateTime){
|
||||
lossAmount = item.compensateAmount;
|
||||
}else {
|
||||
lossAmount = item.lossAmount;
|
||||
}
|
||||
lamount = item.lossAmount;
|
||||
blamerAfterDetailHtml += '<tr align="center" class="z-h40 z-pointer" bgcolor="'+(i%2 != 0 ? '#f3fdfc' : '#ffffff')+'"> ';
|
||||
blamerAfterDetailHtml += ' <td>'+item.designId+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+getAfterStatusHtml(item.afterStatus)+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(lamount ? lamount : 0).toFixed(2)+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(lossAmount ? lossAmount : 0).toFixed(2)+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+item.designer+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(item.orderText ? item.orderText : '')+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(item.afterFinishTime ? item.afterFinishTime : '')+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(item.problemDesc ? item.problemDesc : '')+'</td>';
|
||||
blamerAfterDetailHtml += '</tr>';
|
||||
});
|
||||
|
||||
blamerAfterDetailHtml += '<tr valign="middle" class="z-h40 z-text-right z-bg-white">';
|
||||
blamerAfterDetailHtml += ' <td colspan="11">共 <span class="z-text-red">'+afterDetail.length+'</span> 条数据 </td>';
|
||||
blamerAfterDetailHtml += '</tr>';
|
||||
}
|
||||
else
|
||||
blamerAfterDetailHtml += commNorecod;
|
||||
blamerAfterDetailHtml += ' </table>';
|
||||
blamerAfterDetailHtml += '</div>'
|
||||
blamerAfterDetailHtml += '</table>';
|
||||
blamerAfterDetailHtml += '</div>';
|
||||
Z("#blamerAfterDetailHtml").htmlc(blamerAfterDetailHtml);
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
${zhiqim_manager_breadcrumb("售后统计")}
|
||||
${zhiqim_manager_content()}
|
||||
<#-- 导航栏 -->
|
||||
<div class="z-tabnav-main z-blue z-mg-b20">
|
||||
<nav>
|
||||
<ul>
|
||||
<!--<li onclick="Z.Location.href('personalAfterStatistics.htm');">个人售后统计</li>-->
|
||||
<li class="z-active">售后订单统计</li>
|
||||
<#if ZmrPathRule.check(request, "/designAfterReasonStatistics.htm")><li onclick="Z.L.href('designAfterReasonStatistics.htm')">售后原因统计</li></#if>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<table class="z-table z-bordered z-pd6">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<form name="theForm">
|
||||
<table class="z-table">
|
||||
<tr class="z-h40" bgcolor="${zmr_thead_bgcolor}">
|
||||
<td class="z-bold z-px14 zi-pd-l5"> 统计查询条件:</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="z-table z-bordered z-pd6">
|
||||
<tr class="z-h40 z-bg-white">
|
||||
<td width="300px">查询日期:
|
||||
<select id="year" name="year" class="z-select" data-role="z-select" data-class="z-blue">
|
||||
<#for yyyy : 2018..DateTimes.getCurrentYear()>
|
||||
<option id="optionYear" value="${yyyy}" <#if year==yyyy>selected</#if>>${yyyy}</option>
|
||||
</#for>
|
||||
</select>
|
||||
<select id="month" name="month" class="z-select" data-role="z-select" data-class="z-blue">
|
||||
<#for mm : 1..12>
|
||||
<option id="optionMonth" value="${mm}" <#if month==mm>selected</#if>>${mm}</option>
|
||||
</#for>
|
||||
</select>
|
||||
</td>
|
||||
<#if Validates.isNotEmpty(orgList)>
|
||||
<td width="250px"> 组 织
|
||||
<select name="orgId" class="z-select z-w180" data-role="z-select-search" data-class="${zmr_color_class}">
|
||||
<option value="">请选择</option>
|
||||
<#for item : orgList>
|
||||
<option value="${item.getOrgId()}" <#if orgId == item.getOrgId()>selected</#if>>${item.getOrgName()}</option>
|
||||
</#for>
|
||||
</select>
|
||||
</td>
|
||||
</#if>
|
||||
<td>
|
||||
<button type="button" class="z-mg-l10 z-button ${zmr_color_class}" onclick="this.form.submit()">查询</button>
|
||||
</td>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="z-h40">
|
||||
<td width="500" valign="top">
|
||||
<div id="blamerResult" class="z-overflow-y-auto" style="max-height:760px">
|
||||
<table class="z-table z-bordered z-pd6 z-bg-white z-text-center" id="statTable">
|
||||
<tr class="z-h40">
|
||||
<td>责任人</td>
|
||||
<td>售后单数</td>
|
||||
<td>损失金额</td>
|
||||
</tr>
|
||||
<tr class="z-h40">
|
||||
<td colspan="5">暂时没有数据信息</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
<td width="*" id="blamerAfterDetailHtml" valign="top"></td>
|
||||
</tr>
|
||||
</table>
|
||||
${zhiqim_manager_content_end()}
|
||||
@@ -0,0 +1,252 @@
|
||||
<#def designatedPath="/personalRefundRateStat.htm"/>
|
||||
<script>
|
||||
|
||||
var blamerAfterMap = new Z.HashMap();
|
||||
var dataList = [];
|
||||
//倒叙方法 [].reverse();
|
||||
function getObject(json)
|
||||
{
|
||||
json = json.replace(/\r/g, '');
|
||||
json = json.replace(/\n/g, '<br/>');
|
||||
json = json.replace(/\t/g, ' ');
|
||||
var reg = /(\u0000)|(\u0001)|(\u0002)|(\u0003)|(\u0004)|(\u0005)|(\u0006)|(\u0007)|(\u000b)|(\u000e)|(\u000f)|(\u0010)|(\u0011)|(\u0012)|(\u0013)|(\u0014)|(\u0015)|(\u0016)|(\u0017)|(\u0018)|(\u0019)|(\u001a)|(\u001b)|(\u001c)|(\u001d)|(\u001e)|(\u001f)/g;
|
||||
//var reg = //g;
|
||||
return Z.J.toObject(json.replace(reg, ""));
|
||||
}
|
||||
Z.onload(function()
|
||||
{
|
||||
<#for item : blamerAfterMap.values()>
|
||||
blamerAfterMap.put('${item.getAfterBlamer()}', getObject('${item}'));
|
||||
dataList.push(blamerAfterMap.get('${item.getAfterBlamer()}'));
|
||||
</#for>
|
||||
|
||||
//显示数据
|
||||
doShowBlamerList(dataList);
|
||||
//显示详情
|
||||
doShowDetail(dataList.length > 0 ? dataList[0].afterBlamer : '');
|
||||
});
|
||||
|
||||
function doShowBlamerList(dataList)
|
||||
{//显示责任人列表
|
||||
dataList.sort(function (a, b){
|
||||
a.afterCount = Z.V.isInteger(a.afterCount) ? a.afterCount : 0;
|
||||
b.afterCount = Z.V.isInteger(b.afterCount) ? b.afterCount : 0;
|
||||
|
||||
a.lostAmount = Z.V.isFloat(a.lostAmount) ? a.lostAmount : 0;
|
||||
b.lostAmount = Z.V.isFloat(b.lostAmount) ? b.lostAmount : 0;
|
||||
|
||||
var result1 = a.afterCount - b.afterCount;
|
||||
result1 = result1 != 0 ? result1 : a.lostAmount - b.lostAmount;
|
||||
return result1;
|
||||
});
|
||||
dataList.sort();
|
||||
dataList.reverse();
|
||||
var blamerResultHtml = "";
|
||||
blamerResultHtml +='<table class="z-table z-bordered z-pd6 z-bg-white z-text-center" id="statTable">';
|
||||
blamerResultHtml +='<tr class="z-h40" bgcolor="'+"${zmr_thead_bgcolor}"+'">';
|
||||
blamerResultHtml +=' <td>责任人</td>';
|
||||
blamerResultHtml +=' <td>售后单数</td>';
|
||||
blamerResultHtml +=' <td>损失金额</td>';
|
||||
blamerResultHtml +='</tr>';
|
||||
if (dataList.length > 0)
|
||||
{
|
||||
var totalCount = 0;
|
||||
var totalAmount = 0;
|
||||
Z.each(dataList, function(item, i){
|
||||
var amount=(item.lostAmount ? item.lostAmount : 0)-(item.lossAmountCanceled ? item.lossAmountCanceled : 0);
|
||||
blamerResultHtml +='<tr class="z-h40" bgcolor="'+(i%2 != 0 ? '#f3fdfc' : '#ffffff')+'" onclick="doShowDetail(\''+(item.afterBlamer)+'\')">';
|
||||
blamerResultHtml +=' <td>'+(item.afterBlamer)+'</td>';
|
||||
blamerResultHtml +=' <td>'+(item.afterCount ? item.afterCount : 0)+'</td>';
|
||||
blamerResultHtml +=' <td>'+(amount>=0 ? amount : 0).toFixed(2)+'</td>';
|
||||
blamerResultHtml +='</tr>';
|
||||
|
||||
totalCount += parseFloat((item.afterCount ? item.afterCount : 0));
|
||||
totalAmount += parseFloat((amount>=0 ? amount : 0));
|
||||
});
|
||||
|
||||
|
||||
blamerResultHtml +='<tr class="z-h40">';
|
||||
blamerResultHtml +=' <td>总计</td>';
|
||||
blamerResultHtml +=' <td>'+totalCount+'</td>';
|
||||
blamerResultHtml +=' <td>'+totalAmount.toFixed(2)+'</td>';
|
||||
blamerResultHtml +='</tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
blamerResultHtml +='<tr class="z-h40">';
|
||||
blamerResultHtml +=' <td colspan="5">暂时没有数据信息</td>';
|
||||
blamerResultHtml +='</tr>';
|
||||
}
|
||||
Z("#blamerResult").htmlc(blamerResultHtml);
|
||||
|
||||
}
|
||||
|
||||
function getAfterStatusHtml(status)
|
||||
{//获取售后窗台
|
||||
<#for item : AfterConstants.getStatusList()>
|
||||
if (''+status == ''+'${item.value()}')
|
||||
{
|
||||
var status${item_index} = "${AfterConstants.statusHtml(item.value())}";
|
||||
return status${item_index};
|
||||
}
|
||||
</#for>
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
function doShowDetail(afterBlamer)
|
||||
{//显示详情
|
||||
|
||||
var blamer = blamerAfterMap.get(afterBlamer);
|
||||
var afterDetail = blamer ? blamer.afterDetail : [];
|
||||
afterDetail = afterDetail ? afterDetail : [];
|
||||
var canceledDetail = blamer ? blamer.canceledDetail : [];
|
||||
canceledDetail = canceledDetail ? canceledDetail : [];
|
||||
|
||||
var commNorecod = '';
|
||||
commNorecod += '<tr valign="middle" class="z-h40 z-text-center z-bg-white">';
|
||||
commNorecod += ' <td colspan="11">暂无数据信息</td>';
|
||||
commNorecod += '</tr>';
|
||||
var commThead = ''
|
||||
commThead += '<tr class="z-h40 z-text-center z-bg-gray">';
|
||||
commThead += ' <td width="100">售后单号</td>';
|
||||
commThead += ' <td width="100">设计单号</td>';
|
||||
commThead += ' <td width="100">处理状态</td>';
|
||||
commThead += ' <td width="100">损失金额</td>';
|
||||
commThead += ' <td width="100">设计师</td>';
|
||||
commThead += ' <td width="*">产品</td>';
|
||||
commThead += ' <td width="90">售后创建时间</td>';
|
||||
commThead += ' <td width="100">店铺</td>';
|
||||
commThead += ' <td width="100">旺旺号</td>';
|
||||
commThead += ' <td width="*">售后原因</td>';
|
||||
commThead += '</tr>';
|
||||
|
||||
var blamerAfterDetailHtml = '';
|
||||
|
||||
blamerAfterDetailHtml += '<div class="z-overflow-y-auto" style="max-height:450px">'
|
||||
blamerAfterDetailHtml += '<table class="z-table z-bordered z-bg-white z-text-center">';
|
||||
blamerAfterDetailHtml += '<tr class="z-h40"> ';
|
||||
blamerAfterDetailHtml += ' <td class="z-text-left z-bold z-px14 z-bg-white" colspan="10"> <span class="z-text-red z-bold">['+afterBlamer+']</span>售后订单详情</td>';
|
||||
blamerAfterDetailHtml += '</tr>';
|
||||
blamerAfterDetailHtml += commThead;
|
||||
if (afterDetail.length > 0)
|
||||
{
|
||||
Z.each(afterDetail, function(item, i)
|
||||
{
|
||||
blamerAfterDetailHtml += '<tr align="center" class="z-h40 z-pointer" bgcolor="'+(i%2 != 0 ? '#f3fdfc' : '#ffffff')+'"> ';
|
||||
blamerAfterDetailHtml += ' <td>'+item.designAfsId+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+item.designId+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+getAfterStatusHtml(item.afterStatus)+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(item.lossAmount ? item.lossAmount : 0).toFixed(2)+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+item.designer+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(item.orderText ? item.orderText : '')+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(item.afterCreateTime ? item.afterCreateTime : '')+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(item.shopNick ? item.shopNick : '')+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(item.buyerNick ? item.buyerNick : '')+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(item.problemDesc ? item.problemDesc : '')+'</td>';
|
||||
blamerAfterDetailHtml += '</tr>';
|
||||
});
|
||||
|
||||
blamerAfterDetailHtml += '<tr valign="middle" class="z-h40 z-text-right z-bg-white">';
|
||||
blamerAfterDetailHtml += ' <td colspan="11">共 <span class="z-text-red">'+afterDetail.length+'</span> 条数据 </td>';
|
||||
blamerAfterDetailHtml += '</tr>';
|
||||
}
|
||||
else
|
||||
blamerAfterDetailHtml += commNorecod;
|
||||
blamerAfterDetailHtml += ' </table>';
|
||||
blamerAfterDetailHtml += '</div>'
|
||||
|
||||
//申诉成功部分
|
||||
blamerAfterDetailHtml += '<div class="z-overflow-y-auto z-mg-t20" style="max-height:350px">'
|
||||
blamerAfterDetailHtml += '<table class="z-table z-bordered z-bg-white z-text-center ">';
|
||||
blamerAfterDetailHtml += '<tr class="z-h40"> ';
|
||||
blamerAfterDetailHtml += ' <td class="z-text-left z-bold z-px14 z-bg-white" colspan="10"> <span class="z-text-red z-bold">['+afterBlamer+']</span>申诉通过订单</td>';
|
||||
blamerAfterDetailHtml += '</tr>';
|
||||
blamerAfterDetailHtml += commThead;
|
||||
//if (afterDetail.length > 0)
|
||||
if (canceledDetail.length > 0)
|
||||
{
|
||||
var canceledLossAmount = 0;
|
||||
Z.each(canceledDetail, function(item, i)
|
||||
{
|
||||
blamerAfterDetailHtml += '<tr align="center" class="z-h40 z-pointer" bgcolor="'+(i%2 != 0 ? '#f3fdfc' : '#ffffff')+'"> ';
|
||||
blamerAfterDetailHtml += ' <td>'+item.designAfsId+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+item.designId+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+getAfterStatusHtml(item.afterStatus)+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(item.lossAmount ? item.lossAmount : 0).toFixed(2)+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+item.designer+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(item.orderText ? item.orderText : '')+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(item.afterCreateTime ? item.afterCreateTime : '')+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(item.shopNick ? item.shopNick : '')+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(item.buyerNick ? item.buyerNick : '')+'</td>';
|
||||
blamerAfterDetailHtml += ' <td>'+(item.problemDesc ? item.problemDesc : '')+'</td>';
|
||||
blamerAfterDetailHtml += '</tr>';
|
||||
|
||||
canceledLossAmount += (item.lossAmount ? item.lossAmount : 0);
|
||||
});
|
||||
|
||||
blamerAfterDetailHtml += '<tr valign="middle" class="z-h40 z-text-right z-bg-white">';
|
||||
blamerAfterDetailHtml += ' <td colspan="11">损失金额:<span class="z-text-red">'+canceledLossAmount.toFixed(2)+'</span> 共 <span class="z-text-red">'+canceledDetail.length+'</span> 条数据 </td>';
|
||||
blamerAfterDetailHtml += '</tr>';
|
||||
}
|
||||
else
|
||||
blamerAfterDetailHtml += commNorecod;
|
||||
|
||||
blamerAfterDetailHtml += '</table>';
|
||||
blamerAfterDetailHtml += '</div>';
|
||||
Z("#blamerAfterDetailHtml").htmlc(blamerAfterDetailHtml);
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
${zhiqim_manager_breadcrumb("售后统计")}
|
||||
${zhiqim_manager_content()}
|
||||
<#-- 导航栏 -->
|
||||
<div class="z-tabnav-main z-blue z-mg-b20">
|
||||
<nav>
|
||||
<ul>
|
||||
<li class="z-active">个人售后统计</li>
|
||||
<#if ZmrPathRule.check(request, "/designAfterStatistics.htm")><li onclick="Z.Location.href('designAfterStatistics.htm');">售后订单统计</li></#if>
|
||||
<#if ZmrPathRule.check(request, "/designAfterCreateStatistics.htm")><li onclick="Z.L.href('designAfterCreateStatistics.htm')">售后创建统计</li></#if>
|
||||
<#if ZmrPathRule.check(request, "/designAfterReasonStatistics.htm")><li onclick="Z.L.href('designAfterReasonStatistics.htm')">售后原因统计</li></#if>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<table class="z-table z-bordered z-pd6">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<form name="theForm">
|
||||
<table class="z-table">
|
||||
<tr class="z-h40" bgcolor="${zmr_thead_bgcolor}">
|
||||
<td class="z-bold z-px14 zi-pd-l5"> 统计查询条件:</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="z-table z-bordered z-pd6">
|
||||
<tr class="z-h40 z-bg-white">
|
||||
<td>查询日期:
|
||||
<select name="year" class="z-select" data-role="z-select" data-class="z-blue">
|
||||
<#for yyyy : 2018..DateTimes.getCurrentYear()>
|
||||
<option value="${yyyy}" <#if year==yyyy>selected</#if>>${yyyy}</option>
|
||||
</#for>
|
||||
</select>
|
||||
<select name="month" class="z-select" data-role="z-select" data-class="z-blue">
|
||||
<#for mm : 1..12>
|
||||
<option value="${mm}" <#if month==mm>selected</#if>>${mm}</option>
|
||||
</#for>
|
||||
</select>
|
||||
<button type="button" class="z-mg-l10 z-button ${zmr_color_class}" onclick="this.form.submit()">查询</button>
|
||||
</td>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="z-h40">
|
||||
<td width="400" valign="top">
|
||||
<div id="blamerResult" class="z-overflow-y-auto" style="max-height:760px"></div>
|
||||
</td>
|
||||
<td width="*" id="blamerAfterDetailHtml" valign="top"></td>
|
||||
</tr>
|
||||
</table>
|
||||
${zhiqim_manager_content_end()}
|
||||
Referência em uma Nova Issue
Bloquear um usuário