|
@@ -0,0 +1,238 @@
|
|
|
+<!DOCTYPE HTML>
|
|
|
+<html>
|
|
|
+<head>
|
|
|
+ <meta charset="utf-8">
|
|
|
+ <meta name="renderer" content="webkit|ie-comp|ie-stand">
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
|
+ <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
|
|
|
+ <meta http-equiv="Cache-Control" content="no-siteapp" />
|
|
|
+ <link rel="Bookmark" href="/favicon.ico" >
|
|
|
+ <link rel="Shortcut Icon" href="/favicon.ico" />
|
|
|
+<#include "/base/add_base.ftl">
|
|
|
+ <title>订单退换统计列表</title>
|
|
|
+ <style>
|
|
|
+ .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
|
|
|
+ .tit:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
|
|
|
+ .tit-2{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
|
|
|
+ .tit-2:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
|
|
|
+ #province select{margin-right:10px; width:100px;height: 31px;-webkit-appearance:none !important;appearance:none;background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;padding-left:3px;padding-right: 25px;}
|
|
|
+
|
|
|
+ #suggest, #suggest2 {width:200px}
|
|
|
+ .gray {color:gray}
|
|
|
+ .ac_results {background:#fff;border:1px solid #7f9db9;position: absolute;z-index: 10000;display: none}
|
|
|
+ .ac_results li a {white-space: nowrap;text-decoration:none;display:block;color:#05a;padding:1px 3px}
|
|
|
+ .ac_results li {border:1px solid #fff}
|
|
|
+ .ac_over, .ac_results li a:hover {background:#c8e3fc}
|
|
|
+ .ac_results li a span {float:right}
|
|
|
+ .ac_result_tip {border-bottom:1px dashed #666;padding:3px}
|
|
|
+
|
|
|
+ .select-box{background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;}
|
|
|
+ .select-box select{-webkit-appearance:none !important;background-color: transparent; appearance:none;padding-right: 25px;}
|
|
|
+ .dalog-ask{position: absolute;left:60%;top:0;-webkit-transform: translateY(-30%);transform: translateY(-30%);display: none;background-color: #fff;z-index: 10;}
|
|
|
+ .tag{ width:300px; min-height:300px; border:1px solid #32a3d8; position:relative;background-color: #fff;line-height: 1.5;padding: 10px 12px;}
|
|
|
+ .tag em{display:block; border-width:15px; position:absolute; top:30%; left:-30px;border-style:solid dashed dashed; border-color:transparent #32a3d8 transparent transparent;font-size:0; line-height:0;}
|
|
|
+ .dalog-ask .ask{color: #000;margin: 10px 0 5px 0;}
|
|
|
+ .dalog-ask .answer{color: #666;margin-bottom: 10px;}
|
|
|
+ .dalog-ask .answer:hover{color: #32a3d8;cursor: pointer;}
|
|
|
+ .time-line-list{list-style: none;width: 100%;margin-left: -20px;}
|
|
|
+ .time-line-list>li{position: relative;float: left; text-align: center;width: 100px;overflow: hidden;white-space: nowrap;word-break: break-all;padding: 2px 0;}
|
|
|
+ .time-line-list .number{display: inline-block; padding: 2px; background: #32a3d8;border: 2px solid #fff;box-shadow:0 0 0 1px #32a3d8;width: 20px;height: 20px;color: #fff;line-height: 20px;border-radius: 50%;}
|
|
|
+ .time-line-list>li:before{content:'';position: absolute;height: 1px;width: 30%;right:0;top: 15px; background-color: #32a3d8;}
|
|
|
+ .time-line-list>li:after{content: '';position: absolute;height: 1px;width: 30%;left: 0;top: 15px;background:#32a3d8;}
|
|
|
+ .time-line-list>li:first-child:after,.time-line-list>li:last-child:before{display: none;}
|
|
|
+ .time-line-list .arrow{border-width:7px; position:absolute; left:25%; top:9px;border-style:solid dashed dashed; border-color:transparent transparent transparent #32a3d8;font-size:0; line-height:0;}
|
|
|
+ .time-line-list>li:first-child .arrow{display: none;}
|
|
|
+ .table-bg th{background-color: #e2f6ff;}
|
|
|
+ .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
|
|
|
+ .my-search-input{padding-left: 30px;background: url(${path}/common/images/cm/search.png) 6px center no-repeat;background-size: auto 60%; }
|
|
|
+ .input-produce{height: 25px;line-height: 25px}
|
|
|
+ .color-div{height: 30px;}
|
|
|
+ .table-td-color{}
|
|
|
+ .msg-phone{
|
|
|
+ height: 35px;
|
|
|
+ line-height: 35px;
|
|
|
+ }
|
|
|
+ .select-order{text-decoration:none;color: #32A3D8;}
|
|
|
+ .select-order:hover{text-decoration:underline;}
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<div class="page-container">
|
|
|
+ <div class="order-list">
|
|
|
+ <div class="text-c">
|
|
|
+ <form action="" method="post">
|
|
|
+ <div class="row cl" style="margin-left: 0px;">
|
|
|
+ <div class="formControls col-2 col-sm-2" >
|
|
|
+ </div>
|
|
|
+ <div class="formControls col-2 col-sm-2" style="padding: 0px 10px 0px 0px; width: 110px;" > <span class="select-box">
|
|
|
+ <select name="salesStoreId" class="select" id="salesStoreId">
|
|
|
+ <option value="">店铺</option>
|
|
|
+ <#if storeList?? && (storeList?size > 0) >
|
|
|
+ <#list storeList as storeInfo>
|
|
|
+ <option value ="${storeInfo.storeId!""}">${storeInfo.storeName!""}</option>
|
|
|
+ </#list>
|
|
|
+ </#if>
|
|
|
+ </select>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="formControls col-2 col-sm-2" style="padding: 0px 10px 0px 0px; width: 110px;" > <span class="select-box">
|
|
|
+ <select name="itemColorBar" class="select" id="itemColorBar">
|
|
|
+ <option value="">产品</option>
|
|
|
+ <#if productColorList?? && (productColorList?size > 0) >
|
|
|
+ <#list productColorList as productColorInfo>
|
|
|
+ <option value ="${productColorInfo.colorBar!""}">${productColorInfo.productName!""}</option>
|
|
|
+ </#list>
|
|
|
+ </#if>
|
|
|
+ </select>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="formControls col-3 col-sm-3" >
|
|
|
+ <input type="text" style="width:120px;height:36px;margin-right: 0px;margin-bottom: 10px;" name="startTime" id="startTime" class="input-text" placeholder="开始时间" onClick="WdatePicker({startDate: '%y-01-01 00:00:00' ,dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate: true })" value="${(customerInfo.startTime?string("yyyyy-MM-dd HH:mm:ss"))!''}" readonly="readonly"/>-
|
|
|
+ <input type="text" style="width:120px;height:36px;margin-right: 0px;margin-bottom: 10px;" name="endTime" id="endTime" class="input-text" placeholder="结束时间" onClick="WdatePicker({startDate: '%y-01-01 00:00:00' ,dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate: true })" value="${(customerInfo.endTime?string("yyyy-MM-dd HH:mm:ss"))!''}" readonly="readonly"/>
|
|
|
+ </div>
|
|
|
+ <div class="formControls col-1 col-sm-1" >
|
|
|
+ <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" onclick="statistical();" id="" name="">搜索</button>
|
|
|
+ </div>
|
|
|
+ <#--<a src="javascript:void(0)" style="color: #00e;text-decoration: underline;" onclick="addOrder()">去添加</a>-->
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <#--<div class="mt-20" style="height: 330px;overflow: auto;overflow-x: hidden;margin-bottom: 12px;border: 1px solid #ddd;">-->
|
|
|
+ <table class="table table-border table-bordered table-bg table-hover table-sort">
|
|
|
+ <thead>
|
|
|
+ <tr class="text-c">
|
|
|
+ <th width="50">销售月份</th>
|
|
|
+ <th width="50">发货总数</th>
|
|
|
+ <th width="50">销售总数</th>
|
|
|
+ <th width="50">退换货率</th>
|
|
|
+ <th width="100">总换货</th>
|
|
|
+ <th width="60">换货率</th>
|
|
|
+ <th width="80">其中二次换新</th>
|
|
|
+ <th width="80">总退货数</th>
|
|
|
+ <th width="80">总退货率</th>
|
|
|
+ <th width="80">其中二次换新退货</th>
|
|
|
+ <th width="80">二次退换货占总退换货比例</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="statisticalAll">
|
|
|
+
|
|
|
+ <tr class="text-c">
|
|
|
+ <td colspan="11">暂无统计数据
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ <#--</div>-->
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+</div>
|
|
|
+
|
|
|
+<tfoot>
|
|
|
+<#--<#include "/base/page_util.ftl">-->
|
|
|
+</tfoot>
|
|
|
+
|
|
|
+<#--时间控件-->
|
|
|
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
|
|
|
+
|
|
|
+<script>
|
|
|
+
|
|
|
+ $(function () {
|
|
|
+ statistical();
|
|
|
+ })
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 搜索订单
|
|
|
+ */
|
|
|
+ function statistical(){
|
|
|
+ var salesStoreId = convertUndefinedToEmpty($("#salesStoreId").val());
|
|
|
+ var startTime = convertUndefinedToEmpty($("#startTime").val());
|
|
|
+ var endTime = convertUndefinedToEmpty($("endTime").val());
|
|
|
+ var itemColorBar = convertUndefinedToEmpty($("itemColorBar").val());
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ data: {
|
|
|
+ salesStoreId : salesStoreId,
|
|
|
+ startTime : startTime,
|
|
|
+ endTime : endTime,
|
|
|
+ itemColorBar : itemColorBar
|
|
|
+ },
|
|
|
+ url: "${path}/admin/customer/return_statistics",
|
|
|
+ async: true,
|
|
|
+ success: function(data){
|
|
|
+ var html = "";
|
|
|
+ if (data.returnCode == 200 && data.returnMsg.listReturnStatisticsInfo.length > 0 ) {
|
|
|
+ for(var i=0;i<data.returnMsg.listReturnStatisticsInfo.length;i++){
|
|
|
+ var returnStatisticsInfo = data.returnMsg.listReturnStatisticsInfo[i];
|
|
|
+ returnStatisticsInfo.totalSales = undefinedToEmpty(returnStatisticsInfo.totalSales);
|
|
|
+ returnStatisticsInfo.totalExchange = undefinedToEmpty(returnStatisticsInfo.totalExchange);
|
|
|
+ returnStatisticsInfo.totalReturn = undefinedToEmpty(returnStatisticsInfo.totalReturn);
|
|
|
+ returnStatisticsInfo.secondaryChangeNew = undefinedToEmpty(returnStatisticsInfo.secondaryChangeNew);
|
|
|
+ returnStatisticsInfo.returnForSecond = undefinedToEmpty(returnStatisticsInfo.returnForSecond);
|
|
|
+ //总退换货率计算
|
|
|
+ /*alert(returnStatisticsInfo.totalSales+" "+returnStatisticsInfo.totalExchange+" "+returnStatisticsInfo.totalReturn+" "+returnStatisticsInfo.secondaryChangeNew+" "+returnStatisticsInfo.returnForSecond);*/
|
|
|
+ html += '<tr class="text-c">' +
|
|
|
+ ' <td>'+ returnStatisticsInfo.months +'</td>' +
|
|
|
+ ' <td>'+ returnStatisticsInfo.totalSales +'</td>' +
|
|
|
+ ' <td>'+ (Number(returnStatisticsInfo.totalSales)-(Number(returnStatisticsInfo.totalExchange) - Number(returnStatisticsInfo.totalReturn))) +'</td>' +
|
|
|
+ ' <td>'+ toDecimal(Number((returnStatisticsInfo.totalExchange + returnStatisticsInfo.totalReturn))/Number(returnStatisticsInfo.totalSales)* 100) +'%</td>' +
|
|
|
+ ' <td>'+ returnStatisticsInfo.totalExchange +'</td>' +
|
|
|
+ ' <td>'+ toDecimal(Number(returnStatisticsInfo.secondaryChangeNew)/Number(returnStatisticsInfo.totalExchange)* 100) +'%</td>' +
|
|
|
+ ' <td>'+ returnStatisticsInfo.secondaryChangeNew +'</td>' +
|
|
|
+ ' <td>'+ returnStatisticsInfo.totalReturn +'</td>' +
|
|
|
+ ' <td>'+ toDecimal(Number(returnStatisticsInfo.totalReturn)/Number(returnStatisticsInfo.totalSales)* 100) +'%</td>' +
|
|
|
+ ' <td>'+ returnStatisticsInfo.returnForSecond +'</td>' +
|
|
|
+ ' <td>'+ toDecimal(Number(returnStatisticsInfo.returnForSecond)/Number(returnStatisticsInfo.totalReturn) * 100)+'%</td>' +
|
|
|
+ ' </tr>';
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ html = '<tr class="text-c"><td colspan="12">暂无统计数据!</td></tr>';
|
|
|
+ }
|
|
|
+ $("#statisticalAll").html(html);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+
|
|
|
+<script>
|
|
|
+ /**
|
|
|
+ * 该方法用于将Undefined转换为空值
|
|
|
+ *
|
|
|
+ * @param val
|
|
|
+ */
|
|
|
+ function undefinedToEmpty(val) {
|
|
|
+ if (undefined == val || null == val||typeof val == undefined || typeof val == 'undefined'|| 'undefined' == val) {
|
|
|
+ val = 0;
|
|
|
+ }
|
|
|
+ return val;
|
|
|
+ }
|
|
|
+ //保留俩位小数
|
|
|
+ function toDecimal(x) {
|
|
|
+ var f = parseFloat(x);
|
|
|
+ if (isNaN(f)) {
|
|
|
+ return '0.00';
|
|
|
+ }
|
|
|
+ var f = Math.round(x*100)/100;
|
|
|
+ var s = f.toString();
|
|
|
+ var rs = s.indexOf('.');
|
|
|
+ if (rs < 0) {
|
|
|
+ rs = s.length;
|
|
|
+ s += '.';
|
|
|
+ }
|
|
|
+ while (s.length <= rs + 2) {
|
|
|
+ s += '0';
|
|
|
+ }
|
|
|
+ return s;
|
|
|
+ }
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|