You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dongfeng-pay/jhboss/views/platform_profit.html

182 lines
6.5 KiB
Go

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link src="../static/lib/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../static/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css">
<script src="../static/js/jquery.min.js"></script>
<script src="../static/lib/bootstrap/js/bootstrap.min.js"></script>
<script src="../static/js/filter.js"></script>
<script src="../static/lib/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script src="../static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="../static/js/basic.js"></script>
<style>
.search label {
font-weight: normal;
margin-right: 20px;
}
select {
height: 30px;
line-height: 30px;
text-align: center;
}
#total-amount ,#total-platform-profit{
display: inline-block;
margin-right: 40px;
}
.profit{
font-size: 16px;
margin-top: 10px;
}
table tr {
height: 28px;
font-size: 16px;
}
</style>
</head>
<body>
<div class="search">
<label>
<select name="" id="select-merchant-name"></select>
</label>
<label for="">
<select name="" id="select-agent-name"></select>
</label>
<label for="">
<select name="" id="search-order-supplier-name"></select>
</label>
<label for="">
<select name="" id="pay-type">
<option value=""></option>
<option value="WEIXIN_SCAN"></option>
<option value="WEIXIN_H5">H5</option>
<option value="WEIXIN_SYT"></option>
<option value="ALI_SCAN"></option>
<option value="ALI_H5">H5</option>
<option value="ALI_SYT"></option>
<option value="QQ_SCAN">QQ</option>
<option value="QQ_H5">QQ-H5</option>
<option value="QQ_SYT">QQ</option>
<option value="UNION_SCAN"></option>
<option value="UNION_H5">H5</option>
<option value="UNION_PC_WAP">pc-web</option>
<option value="UNION_SYT"></option>
<option value="UNION_FAST"></option>
<option value="BAIDU_SCAN"></option>
<option value="BAIDU_H5">H5</option>
<option value="BAIDU_SYT"></option>
<option value="JD_SCAN"></option>
<option value="JD_H5">H5</option>
<option value="JD_SYT"></option>
</select>
</label>
<label>
<input type="text" name="" value="" id="start-time" class="start-time" value="">
</label>
<label>
<input type="text" name="" value="" id="end-time" class="end-time" value="">
</label>
<label for="">
<input type="button" class="btn btn-primary" value="搜索" onclick="search();">
</label>
<label for="" class="profit">
<span class="color-red"></span>
<span id="total-amount" class="color-red">00.00</span>
<span class="disabled"></span>
<span class="color-red"></span>
<span id="total-platform-profit" class="color-red">00.00</span>
<span class="disabled"></span>
<span class="color-red"></span>
<span id="total-agent-profit" class="color-red">00.00</span>
</label>
</div>
<div class="menu-table">
<table>
<thead class="thead-dark">
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody id="table-body">
</tbody>
</table>
</div>
<script>
function getCutValues() {
let merchantUid = $("#select-merchant-name").val();
let agentUid = $("#select-agent-name").val();
let supplierUid = $("#search-order-supplier-name").val();
let payType = $("#pay-type").val();
let startTime = $("#start-time").val();
let endTime = $("#end-time").val();
return {
"merchantUid": merchantUid,
"agentUid":agentUid,
"supplierUid": supplierUid,
"payType": payType,
"startTime": startTime,
"endTime": endTime
};
}
function randProfit(res) {
$("#total-amount").html(res.TotalAmount);
$("#total-platform-profit").html(res.PlatformTotalProfit);
$("#total-agent-profit").html(res.AgentTotalProfit);
let str = "";
for (let i = 0; i < res.ProfitList.length; i ++) {
let v = res.ProfitList[i];
let tmp = "<tr>" + "<th>" + (i+1) + "</th>" +
"<th>" + v.MerchantName + "</th>" + "<th>" + v.AgentName + "</th>" + "<th>" + v.SupplierName + "</th>" +
"<th>" + v.PayTypeName + "</th>" + "<th>" + v.OrderAmount + "</th>" + "<th>" + v.OrderCount + "</th>" +
"<th>" + v.PlatformProfit + "</th>" +"<th>" + v.AgentProfit + "</th>" + "</tr>";
str = str + tmp;
}
$("#table-body").html(str);
}
function search() {
$.ajax({
url: "/get/profit",
data: getCutValues(),
success: function (res) {
if (res.Code == 404) {
window.parent.location = "/login.html";
} else if (res.Code == -1) {
alert("系统异常,请稍后再试");
} else {
randProfit(res);
}
},
});
}
$(function () {
setMerchant();
setSupplier();
setAgent();
search();
})
</script>
</body>
</html>