<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page isELIgnored="false"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <script type="text/javascript" src="<%=path %>/static/js/common/ui/Select3.js"></script>
<script type="text/javascript" src="<%=path %>/static/js/fee/basicDistributeFee.js"></script>
<script>
var basePath = '<%=path%>';
document.title = "基础运费结算"
</script>
<style type="text/css">
.mc-form-group label { width: 60px; }
.mc-form-group .form-control {width: 150px; }
.mc-form-group .btn { margin-left: 10px; }
.modal-overflow .modal-body{height:500px;overflow:auto !important;}
.form-horizontal label.three{
text-align : right;
font-size: 14px;
font-weight: 500;
}
.form-group h4{
font-weight: bold;
margin-left:20px;
}
.tdWidth{
width:110px;
}
thead > tr >td {
vertical-align: middle !important;
text-align: center;
}
.grid-table.grid-excel-table > tbody td.grid-cell-no-widget {
color: #444;
}
.ui-state-active {
color: #eb8f00 !important;
}
.grid-table.grid-excel-table.grid-group-table > tbody > tr.grid-row:not(:first-child) {
/*border-top-width: 5px !important;*/
}
.grid-table .grid-row.odd > td {
background-color: #D3D3D3;
}
.file {
position: relative;
display: inline-block;
background: #D0EEFF;
border: 1px solid #99D3F5;
border-radius: 4px;
padding: 4px 12px;
overflow: hidden;
color: #1E88C7;
text-decoration: none;
text-indent: 0;
line-height: 20px;
}
.file input {
position: absolute;
font-size: 100px;
right: 0;
top: 0;
opacity: 0;
}
.file:hover {
background: #AADFFD;
border-color: #78C3F3;
color: #004974;
text-decoration: none;
}
</style>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">查询条件</h3>
</div>
<div class="panel-body">
<form id="search_form" class="form" role="form">
<table>
<tr>
<td>
<div class="form-group mc-form-group">
<label for="userName" class="control-label" >姓名:</label>
<input type="text" style="width: 310px;" id="userName" class="form-control w100" name="userName" placeholder="请输入司机姓名">
</div>
<div class ="form-group mc-form-group">
<button id="search_btn" type="button" style="width: 130px;" class="btn btn-primary">查询</button>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group mc-form-group">
<label for="company_status" class="control-label" >日期:</label>
<input type="text" id="deliveryTime" name="deliveryTime" class="form-control" value="${defaultDay }"
placeholder="请选择时间" onclick="WdatePicker({skin:'bootstrap',firstDayOfWeek:1,onpicked:function(dq){dateChange(dq.cal.getNewDateStr());}});" pattern="(\d{4})-(0\d{1}|1[0-2])-(0\d{1}|[12]\d{1}|3[01])" required/>
<%-- <input type="hidden" id="deliveryTime" name="deliveryTime" value="${defaultDay }"> --%>
<button id="yesterday_btn" onclick="selectDeliveryTime(0);" type="button" style="width: 60px;" class="btn "> 昨天</button>
<button id="today_btn" type="button" onclick="selectDeliveryTime(1);" style="width: 60px;" class="btn btn-primary">今天</button>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group mc-form-group">
<label for="routeType" class="control-label" >服务类型:</label>
<select class="form-control" onchange="getServiceBatch(this);" name="serviceId" id="select_service">
<option value="">全部</option>
<c:forEach items="${distservices }" var="s">
<option value="${s.id }">${s.name }</option>
</c:forEach>
</select>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group mc-form-group">
<label for="routeStatus" class="control-label" >配送批次:</label>
<select class="form-control" name="batchId" id="select_batch">
<option value="">全部</option>
</select>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group mc-form-group">
<label class="control-label" >仓库:</label>
<select id = "warehouseId" name="warehouseId" class="form-control">
<option value="">全部仓库</option>
<c:forEach items="${warehouses }" var="w">
<option value="${w.id }">${w.name }</option>
</c:forEach>
</select>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group mc-form-group">
<label class="control-label" >任务类型:</label>
<select id = "taskType" name="taskType" class="form-control">
<option value="">全部</option>
<option value="10">直送</option>
<option value="20">支线</option>
<option value="25">末端</option>
</select>
</div>
</td>
</tr>
</table>
<div class = "form-group fw-display-ib hidden">
<input name="per_page" value="20" class="form-control">
</div>
<div class = "form-group fw-display-ib hidden">
<input name="page" value="1" class="form-control" type="text" placeholder="第一页">
</div>
</form>
</div> </div>
<div id="export_form_div"></div>
<div class="panel panel-default closeCountDiv">
本次共查询出<span id="span_totalCount">0</span>条数据
<span style="float:right;line-height: 20px;display: block;">
统计信息: &nbsp; &nbsp;
费用合计: <span id="totalAmount">0</span>元 &nbsp;
基础运费: <span id="totalBasicAmount">0</span>元 &nbsp;
多送客户奖励: <span id="totalMoreSend">0</span>元 &nbsp;
补货奖励: <span id="totalBuhuo">0</span>元 &nbsp; &nbsp;
超距配送奖励: <span id="totalOverRange">0</span>元 &nbsp; &nbsp;
<i style="float:right;line-height: 20px;" class='fa fa-times-circle' onclick="closeCountDiv();"></i>
</span>
</div>
<section id = "ui-grid">
<div>
<!--这里是提示信息,用于发送成功以后提醒-->
<div class="grid-message -auto-binded" id="message" data-grid-id="route_grid_index" style="display: block;"></div>
<div class="grid-head">
<ul class="nav nav-tabs">
<li class="pull-right btn-toolbar btn-group">
<a href="#" id="saveFee" class="btn btn-link pull-left" data-grid-id="route_grid_index" data-toggle="grid.run_callback" title="save"><button>保存</button></a>
<a href="#" id="syncTask" class="btn btn-link pull-left" data-grid-id="route_grid_index" data-toggle="grid.run_callback"title="sync"><button>同步任务</button></a>
<a href="#" id="makeFee" class="btn btn-link pull-left" style="display: none;" data-grid-id="route_grid_index" data-toggle="grid.run_callback" title="oneJ"><button>一键做账</button></a>
<a href="#" id="exportExcel" class="btn btn-link pull-left" data-grid-id="route_grid_index" data-toggle="grid.run_callback" title="exportExcel"><button>表格导出</button></a>
<a href="#" id="add_btn" class="btn btn-link pull-left" data-grid-id="user_grid_index" data-toggle="grid.run_callback" title="New"><button>导入Excel</button></a>
</li>
</ul>
</div>
<div id="collection_panel"></div>
<script>
function broweExcle(){
var filePath = $("input[type='file']").val();
if(filePath.indexOf("xls")!=-1||filePath.indexOf("xlsx")!=-1 ){
var arr=filePath.split('\\');
var fileName=arr[arr.length-1];
$(".showFileName").val(fileName);
}else{
alert("导入的不是有效Excel文件!");
$(".showFileName").val("");
return false
}
}
</script>
<script id="import_render_tmpl" type="text/x-handlebars-template">
<div id="dialog_message"></div>
<form method="POST" enctype ="multipart/form-data" id = "importForm">
<div class="form-group fw-mb15">
<h4>请选择Excel文件(<span style="color:red;">*必填</span>)</h4><br>
<label class="col-sm-2"><span style="color:red;">*</span>Excel文件:</label>
<div class="col-sm-6">
<input type="text" class="form-control showFileName" readonly="readonly">
</div>
<div class="col-sm-2">
<a href="javascript:;" class="file" onchange="broweExcle()">浏览
<input type="file" name="fileupload" id="fileupload" accept=".xlsx,.xls">
</a>
</div>
</div>
</form>
</script>
<!-- 校验失败后显示 TODO-->
<script id="checkError_table_tmpl" type="text/x-handlebars-template">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>序号</th>
<th>校验结果</th>
<th>任务单号</th>
</tr>
</thead>
<tbody>
{{#each checkErrorList}}
<tr>
<td>{{addOne @index}}</td>
<td>{{verifyResult}}</td>
<td>{{taskbillNo}}</td>
</tr>
{{/each}}
</tbody>
</table>
</script> <script>
var handleHelper = Handlebars.registerHelper("addOne", function (index) {
//返回+1之后的结果
return index + 1;
}); /*YC*/
function getFormData(formId) {
var arr = $('#' + formId).serializeArray();
var result = {};
for ( var i = 0; i < arr.length; i++) {
result[arr[i].name] = arr[i].value;
}
return result;
}
/*转换时间戳为日期*/
function formatDate(timestamp){
date=new Date(parseInt(timestamp) * 1000);
var year=date.getFullYear();
var month=date.getMonth()+1;
var date=date.getDate();
return year+"-"+month+"-"+date;
}
// 引入组件初始化
seajs.use(["common/ui/Select3"], function(Select3) {
Select3.init($("#select_service"));
Select3.init($("#select_batch"));
Select3.init($("#warehouseId"));
Select3.init($("#taskType"));
}) </script> <script>
var cbSearch = function() {
$("#search_btn").trigger("click")
}
/*var $warehouseId = $("#warehouseId")
var $routeStatus = $("#routeStatus")
var $routeType = $("#routeType")
$warehouseId.change(cbSearch)
$routeStatus.change(cbSearch)
$routeType.change(cbSearch)
// 引入组件初始化
seajs.use(["common/ui/Select3"], function(Select3) {
Select3.init($warehouseId)
Select3.init($routeStatus)
Select3.init($routeType)
})*/ /*grid options*/
var options = {
id: "route_grid_index",
recordClassNames: ["Route"],
columns: [
{ name : '_single_select',hidden:true,sortable : false, renderer : 'FW.MultiSelectColumnRenderer', virtual : true, css: '-single-select fw-w30'},
{ label: "id", name: "id",hidden:true},
{ label: "序号",renderer: 'FW.OrderRenderer',htmlSafe: true,style: "width:1%"},
{ label: "司机姓名", name: "userName", renderer:'FW.NameNoRenderer',htmlSafe: true,style: "width:5%"},
/*{ label: "配送日期", name: "deliveryTime",renderer : 'FW.DeliveryTimeRenderer',virtual:true,hidden:true},*/
{ label: "配送服务", name: "serviceId", renderer:'FW.ServiceRenderer', virtual:true,htmlSafe: true,style: "width:4%"},
{ label: "配送批次", name: "batchId", renderer : 'FW.BatchRenderer', virtual:true,htmlSafe: true,style: "width:4%"},
{ label: "任务单号", name: "taskbillNo",htmlSafe: true,style: "width:4%"},
{ label: "任务类型", name: "taskType",renderer:'FW.TaskTypeRenderer',htmlSafe: true,style: "width:3%"},
{ label: "来源", name: "userSourceName",htmlSafe: true,style: "width:3%"},
{ label: "车型", name: "cartypeName",htmlSafe: true,style: "width:3%"},
{ label: "仓库", name: "warehouseName",virtual:true,htmlSafe: true,style: "width:4%"},
{ label: "线路/站点", name: "originName",htmlSafe: true,style: "width:5%"},
{ label: "费用合计/元", name: "totalAmount",renderer : 'FW.InputTotalAmountRenderer',virtual:true,htmlSafe: true,style: "width:5%"},
{ label: "基础运费", name: "basicAmount",renderer : 'FW.InputBasicAmountRenderer', virtual:true,htmlSafe: true,style: "width:5%"},
{ label: "配送门店数", name: "distributeCustomerNum",virtual:true,htmlSafe: true,style: "width:2%"},
{ label: "取件门店数", name: "pickupCustomerNum",virtual:true,htmlSafe: true,style: "width:2%"},
{ label: "多送客户奖励", name: "rewardAdditionalAmount",renderer : 'FW.InputDuoSongAmountRenderer', virtual:true,htmlSafe: true,style: "width:5%"},
{ label: "补货奖励", name: "rewardReplenishmentAmount",renderer : 'FW.InputBuhuoAmountRenderer', virtual:true,htmlSafe: true,style: "width:5%"},
{ label: "超距配送奖励", name: "rewardOverRangeAmount",renderer : 'FW.InputChaojuAmountRenderer', virtual:true,htmlSafe: true,style: "width:5%"},
{ label: "超额配送奖励", name: "rewardOverQuotaAmount",renderer : 'FW.InputChaoEAmountRenderer', virtual:true,htmlSafe: true,style: "width:5%"},
{ label: "救援奖励", name: "rewardHelpAmount",renderer : 'FW.InputJiuYuanAmountRenderer', virtual:true,htmlSafe: true,style: "width:5%"},
{ label: "被投诉罚款", name: "punishBeComplaintAmount",renderer : 'FW.InputBeiTouSuAmountRenderer', virtual:true,htmlSafe: true,style: "width:5%"},
{ label: "被救援扣除", name: "punishBeHelpedAmount",renderer : 'FW.InputBeiJiuYuanAmountRenderer', virtual:true,htmlSafe: true,style: "width:5%"},
{ label: "迟到罚款", name: "punishLateAmount",renderer : 'FW.InputChiDaoAmountRenderer', virtual:true,htmlSafe: true,style: "width:5%"},
{ label: "其它", name: "otherAmount",renderer : 'FW.InputQiTaAmountRenderer', virtual:true,htmlSafe: true,style: "width:5%"},
{ label: "备注", name: "remark",renderer : 'FW.InputBeiZhuAmountRenderer', virtual:true,htmlSafe: true,style: "width:5%"}
],
target: $("#collection_panel"),
loadAfterRendered: true,
url: '<%=path%>/distributeFee/queryBasicDistributeFeeList',
pagination: true,
scrollable: true,
defaultParams: getFormData("search_form")
}; var gridPanel = new FW.Grid(options);
/*获取所有选择的*/
gridPanel.selectedStatus = function() {
return this.selectedRecords().map(function(record) {
return record.get("status");
});
}; gridPanel.render();
//查询按钮
$('#search_btn').click(function(){ //更新统计信息
$('#totalAmount').html(0);
$('#totalBasicAmount').html(0);
$('#totalMoreSend').html(0);
$('#totalBuhuo').html(0);
$('#totalOverRange').html(0); var params = getFormData("search_form");
gridPanel.updateDefaultParams(params);
$.get('<%=path%>/distributeFee/queryBasicDistributeFeeList', params,
function(data){
gridPanel.setData(data);
showCountDiv();
$('#span_totalCount').text(data.total); //更新右上角数据
//$('#totalTaskbill').text(data.totalTaskbill);
//$('#totalUser').text(data.totalUser);
//$('#totalAmount').text(data.totalAmount);
},
"json");
}); </script>
</div>
</section>
<script type="text/javascript" src="<%=path%>/static/js/vendor/highlight.min.js"></script>
<script type="text/javascript" src="<%=path%>/static/js/plugin/ajaxfileupload.js"></script>
<script>
$(function(){
//hljs.initHighlightingOnLoad();
//var today=new Date();
//$('#deliveryTime').val(today.getFullYear()+"-"+(today.getMonth()+1)+"-"+today.getDate());
}); var serviceBatchs = $.parseJSON('${serviceBatchs}');
var services = $.parseJSON('${services}');;
var sources = $.parseJSON('${sources}');
/* 获取批次 */
function getServiceBatch(select){
var serviceId = $(select).val();
if(serviceId==""){
var tmpHtml = ' <option value="">全部批次</option>';
$('#select_batch').html(tmpHtml);
return false;
} var tmpBathcs = serviceBatchs[serviceId]; if(!tmpBathcs){
$('#select_batch').html('');
} var selectHtml = '<option value="">全部批次</option>';
$.each(tmpBathcs,function(i,o){
selectHtml += '<option value="';
selectHtml += o.id;
selectHtml += '">';
selectHtml += o.name;
selectHtml += '</option>';
}); $('#select_batch').html(selectHtml);
} /*昨天/今天*/
function selectDeliveryTime(type){
//清空配送时间
$('#yesterday_btn').removeClass("btn-primary");
$('#today_btn').removeClass("btn-primary"); var date=new Date();
var year=date.getFullYear();
var month=date.getMonth()+1;
if(type==0){
//昨天
var yesterday = generateDate(type);
$('#yesterday_btn').addClass("btn-primary");
//$('#deliveryTime').val(yesterday);
$('#deliveryTime').val(yesterday);
}else{
//今天
var today = generateDate(type);
$('#today_btn').addClass("btn-primary");
//$('#deliveryTime').val(today);
$('#deliveryTime').val(today);
}
} function generateDate(type){
if(type==0){
var dd = new Date();
dd.setDate(dd.getDate()-1);//获取上一天的日期
var y = dd.getFullYear();
var m = dd.getMonth()+1;//获取当前月份的日期
var d = dd.getDate();
return y+"-"+m+"-"+d;
}else{
var date = new Date();
var year = date.getFullYear();
var month = date.getMonth()+1;
var day= date.getDate();
return year+"-"+month+"-"+day;
}
}
/*日期改变*/
function dateChange(date){
$('#yesterday_btn').removeClass("btn-primary");
$('#today_btn').removeClass("btn-primary"); //$('#deliveryTime').val( (new Date(date)).getTime()/1000 );
//$('#deliveryTime').val(date)
} /* 关闭显示查询数据量div */
function closeCountDiv(){
$(".closeCountDiv").css("display","none");
}
function showCountDiv(){
$(".closeCountDiv").css("display","block");
} /*同步任务*/
$('#syncTask').click(function(){
$.ajax({
url: '<%=path %>/distributeFee/syncTaskbill',
async: true,
type:'post',
dataType:'json',
data: getFormData("search_form"),
success: function(data){
if (data.flag){
TMS.Message.info(data.message,$('#message'),2000);
$('#search_btn').trigger('click');
}else {
TMS.Message.error(data.message,$('#message'),2000);
}
}
});
}); /*导出*/
$('#exportExcel').click(function(){
if(gridPanel.getData().total==0){
alert("没有要导出的内容!");
return false;
} var deliveryTime = $('#deliveryTime').val();
var userName = $('#userName').val();
var serviceId = $('#select_service').val();
var batchId = $('#select_batch').val();
var warehouseId = $('#warehouseId').val();
var taskType = $('#taskType').val();
var cityName = $("#city_switch option:selected ").text();
var form = '<form style="display:none" id="exportForm" action="'+'<%=path %>/distributeFee/exportBasicDistributeFees'+'">';
form += '<input type="hidden" name="deliveryTime" value="'+ deliveryTime +'"/>';
form += '<input type="hidden" name="userName" value="'+ userName +'"/>';
form += '<input type="hidden" name="serviceId" value="'+ serviceId +'"/>';
form += '<input type="hidden" name="batchId" value="'+ batchId +'"/>';
form += '<input type="hidden" name="warehouseId" value="'+ warehouseId +'"/>';
form += '<input type="hidden" name="taskType" value="'+ taskType +'"/>';
form += '<input type="hidden" name="cityName" value="'+ cityName +'"/>';
form += '</form>'; $('#export_form_div').html(form);
$('#exportForm').submit();
}); var importDialog = {};
/*导入*/
$("#add_btn").click(function() {
var data = {
action: ''
};
importDialog = new UserAddActionDialog.asDialog({data:data});
importDialog.show({}, {header: '导入Excel'});
}); /*校验失败的弹窗*/
var checkError_Table_DialogOption = {
header: '',
handlers: [
{label:"关闭", class:"-step-cancel"}
],
}; /*dialog生成函数*/
var checkError_Table_Dialog = FW.Component.pinleiTTT = Class.create(FW.Component.Base, FW.Component.WizardSupport, {
render: function() {
var source = $('#checkError_table_tmpl').html();
var template = Handlebars.compile(source);
var context = this.option("data");
var $dom = $(template(context));
this._setDom($dom); //prepareDialog(); return this.$dom;
}
});
FW.Component.ActAsDialog(checkError_Table_Dialog, checkError_Table_DialogOption); /*dialog生成函数*/
var UserAddActionDialog = FW.Component.UserAdd = Class.create(FW.Component.Base, FW.Component.WizardSupport, {
render: function() {
var source = $("#import_render_tmpl").html();
var template = Handlebars.compile(source);
var context = this.option("data");
var $dom = $(template(context)); this._setDom($dom);
return this.$dom;
}
});
var UserAddActionDialogOption = {
header: '',
width:'700px',
height:'150px',
handlers: [
{
label: "上传",
callback: function () {
$dialog = this.$dialog;
$component = this.component;
var val = $(".showFileName").val();
if(val==null||""==val){
alert("导入文件为空!");
return false;
}
//文件上传地址
//初始化,主要是设置上传参数,以及事件处理方法(回调函数)
$("#importForm").ajaxSubmit({
url:'<%=path%>/distributeFee/importData',
dataType:"json",
success:function(d) {
importDialog.$dialog.parent().next().remove();
importDialog.$dialog.parent().remove();
if (d.ret==1) { //成功
TMS.Message.info(d.message,$('#message'),2000);
$('#search_btn').trigger('click');
setTimeout('location.reload()', 1000);
} else if(d.ret==2){ //失败
TMS.Message.error(d.message,$('#message'),2000);
$('#search_btn').trigger('click');
setTimeout('location.reload()', 1000);
} else if(d.ret==0) {//校验失败,蹦出一个框
new checkError_Table_Dialog.asDialog({data: {
"checkErrorList": d.retData
}}).show({}, {header: "数据校验失败列表"});
}
}
});
return false;
}
}
] };
FW.Component.ActAsDialog(UserAddActionDialog, UserAddActionDialogOption);
/*自动保存*/
var time = 1000*60;//毫秒
//setInterval(autoSave,time);
function autoSave(){
Fee.saveFees('auto_save');
} /*保存*/
$('#saveFee').click(function(){
Fee.saveFees('manual_save');
});
</script>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page isELIgnored="false"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <script type="text/javascript" src="<%=path %>/static/js/common/ui/Select3.js"></script>
<script type="text/javascript" src="<%=path %>/static/js/fee/basicDistributeFee.js"></script>
<script>
var basePath = '<%=path%>';
document.title = "基础运费结算"
</script>
<style type="text/css">
.mc-form-group label { width: 60px; }
.mc-form-group .form-control {width: 150px; }
.mc-form-group .btn { margin-left: 10px; }
.modal-overflow .modal-body{height:500px;overflow:auto !important;}
.form-horizontal label.three{
text-align : right;
font-size: 14px;
font-weight: 500;
}
.form-group h4{
font-weight: bold;
margin-left:20px;
}
.tdWidth{
width:110px;
}
thead > tr >td {
vertical-align: middle !important;
text-align: center;
}
.grid-table.grid-excel-table > tbody td.grid-cell-no-widget {
color: #444;
}
.ui-state-active {
color: #eb8f00 !important;
}
.grid-table.grid-excel-table.grid-group-table > tbody > tr.grid-row:not(:first-child) {
/*border-top-width: 5px !important;*/
}
.grid-table .grid-row.odd > td {
background-color: #D3D3D3;
}
.file {
position: relative;
display: inline-block;
background: #D0EEFF;
border: 1px solid #99D3F5;
border-radius: 4px;
padding: 4px 12px;
overflow: hidden;
color: #1E88C7;
text-decoration: none;
text-indent: 0;
line-height: 20px;
}
.file input {
position: absolute;
font-size: 100px;
right: 0;
top: 0;
opacity: 0;
}
.file:hover {
background: #AADFFD;
border-color: #78C3F3;
color: #004974;
text-decoration: none;
}
</style>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">查询条件</h3>
</div>
<div class="panel-body">
<form id="search_form" class="form" role="form">
<table>
<tr>
<td>
<div class="form-group mc-form-group">
<label for="userName" class="control-label" >姓名:</label>
<input type="text" style="width: 310px;" id="userName" class="form-control w100" name="userName" placeholder="请输入司机姓名">
</div>
<div class ="form-group mc-form-group">
<button id="search_btn" type="button" style="width: 130px;" class="btn btn-primary">查询</button>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group mc-form-group">
<label for="company_status" class="control-label" >日期:</label>
<input type="text" id="deliveryTime" name="deliveryTime" class="form-control" value="${defaultDay }"
placeholder="请选择时间" onclick="WdatePicker({skin:'bootstrap',firstDayOfWeek:1,onpicked:function(dq){dateChange(dq.cal.getNewDateStr());}});" pattern="(\d{4})-(0\d{1}|1[0-2])-(0\d{1}|[12]\d{1}|3[01])" required/>
<%-- <input type="hidden" id="deliveryTime" name="deliveryTime" value="${defaultDay }"> --%>
<button id="yesterday_btn" onclick="selectDeliveryTime(0);" type="button" style="width: 60px;" class="btn "> 昨天</button>
<button id="today_btn" type="button" onclick="selectDeliveryTime(1);" style="width: 60px;" class="btn btn-primary">今天</button>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group mc-form-group">
<label for="routeType" class="control-label" >服务类型:</label>
<select class="form-control" onchange="getServiceBatch(this);" name="serviceId" id="select_service">
<option value="">全部</option>
<c:forEach items="${distservices }" var="s">
<option value="${s.id }">${s.name }</option>
</c:forEach>
</select>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group mc-form-group">
<label for="routeStatus" class="control-label" >配送批次:</label>
<select class="form-control" name="batchId" id="select_batch">
<option value="">全部</option>
</select>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group mc-form-group">
<label class="control-label" >仓库:</label>
<select id = "warehouseId" name="warehouseId" class="form-control">
<option value="">全部仓库</option>
<c:forEach items="${warehouses }" var="w">
<option value="${w.id }">${w.name }</option>
</c:forEach>
</select>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group mc-form-group">
<label class="control-label" >任务类型:</label>
<select id = "taskType" name="taskType" class="form-control">
<option value="">全部</option>
<option value="10">直送</option>
<option value="20">支线</option>
<option value="25">末端</option>
</select>
</div>
</td>
</tr>
</table>
<div class = "form-group fw-display-ib hidden">
<input name="per_page" value="20" class="form-control">
</div>
<div class = "form-group fw-display-ib hidden">
<input name="page" value="1" class="form-control" type="text" placeholder="第一页">
</div>
</form>
</div> </div>
<div id="export_form_div"></div>
<div class="panel panel-default closeCountDiv">
本次共查询出<span id="span_totalCount">0</span>条数据
<span style="float:right;line-height: 20px;display: block;">
统计信息: &nbsp; &nbsp;
费用合计: <span id="totalAmount">0</span>元 &nbsp;
基础运费: <span id="totalBasicAmount">0</span>元 &nbsp;
多送客户奖励: <span id="totalMoreSend">0</span>元 &nbsp;
补货奖励: <span id="totalBuhuo">0</span>元 &nbsp; &nbsp;
超距配送奖励: <span id="totalOverRange">0</span>元 &nbsp; &nbsp;
<i style="float:right;line-height: 20px;" class='fa fa-times-circle' onclick="closeCountDiv();"></i>
</span>
</div>
<section id = "ui-grid">
<div>
<!--这里是提示信息,用于发送成功以后提醒-->
<div class="grid-message -auto-binded" id="message" data-grid-id="route_grid_index" style="display: block;"></div>
<div class="grid-head">
<ul class="nav nav-tabs">
<li class="pull-right btn-toolbar btn-group">
<a href="#" id="saveFee" class="btn btn-link pull-left" data-grid-id="route_grid_index" data-toggle="grid.run_callback" title="save"><button>保存</button></a>
<a href="#" id="syncTask" class="btn btn-link pull-left" data-grid-id="route_grid_index" data-toggle="grid.run_callback"title="sync"><button>同步任务</button></a>
<a href="#" id="makeFee" class="btn btn-link pull-left" style="display: none;" data-grid-id="route_grid_index" data-toggle="grid.run_callback" title="oneJ"><button>一键做账</button></a>
<a href="#" id="exportExcel" class="btn btn-link pull-left" data-grid-id="route_grid_index" data-toggle="grid.run_callback" title="exportExcel"><button>表格导出</button></a>
<a href="#" id="add_btn" class="btn btn-link pull-left" data-grid-id="user_grid_index" data-toggle="grid.run_callback" title="New"><button>导入Excel</button></a>
</li>
</ul>
</div>
<div id="collection_panel"></div>
<script>
function broweExcle(){
var filePath = $("input[type='file']").val();
if(filePath.indexOf("xls")!=-1||filePath.indexOf("xlsx")!=-1 ){
var arr=filePath.split('\\');
var fileName=arr[arr.length-1];
$(".showFileName").val(fileName);
}else{
alert("导入的不是有效Excel文件!");
$(".showFileName").val("");
return false
}
}
</script>
<script id="import_render_tmpl" type="text/x-handlebars-template">
<div id="dialog_message"></div>
<form method="POST" enctype ="multipart/form-data" id = "importForm">
<div class="form-group fw-mb15">
<h4>请选择Excel文件(<span style="color:red;">*必填</span>)</h4><br>
<label class="col-sm-2"><span style="color:red;">*</span>Excel文件:</label>
<div class="col-sm-6">
<input type="text" class="form-control showFileName" readonly="readonly">
</div>
<div class="col-sm-2">
<a href="javascript:;" class="file" onchange="broweExcle()">浏览
<input type="file" name="fileupload" id="fileupload" accept=".xlsx,.xls">
</a>
</div>
</div>
</form>
</script>
<!-- 校验失败后显示 TODO-->
<script id="checkError_table_tmpl" type="text/x-handlebars-template">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>序号</th>
<th>校验结果</th>
<th>任务单号</th>
</tr>
</thead>
<tbody>
{{#each checkErrorList}}
<tr>
<td>{{addOne @index}}</td>
<td>{{verifyResult}}</td>
<td>{{taskbillNo}}</td>
</tr>
{{/each}}
</tbody>
</table>
</script> <script>
var handleHelper = Handlebars.registerHelper("addOne", function (index) {
//返回+1之后的结果
return index + 1;
}); /*YC*/
function getFormData(formId) {
var arr = $('#' + formId).serializeArray();
var result = {};
for ( var i = 0; i < arr.length; i++) {
result[arr[i].name] = arr[i].value;
}
return result;
}
/*转换时间戳为日期*/
function formatDate(timestamp){
date=new Date(parseInt(timestamp) * 1000);
var year=date.getFullYear();
var month=date.getMonth()+1;
var date=date.getDate();
return year+"-"+month+"-"+date;
}
// 引入组件初始化
seajs.use(["common/ui/Select3"], function(Select3) {
Select3.init($("#select_service"));
Select3.init($("#select_batch"));
Select3.init($("#warehouseId"));
Select3.init($("#taskType"));
}) </script> <script>
var cbSearch = function() {
$("#search_btn").trigger("click")
}
/*var $warehouseId = $("#warehouseId")
var $routeStatus = $("#routeStatus")
var $routeType = $("#routeType")
$warehouseId.change(cbSearch)
$routeStatus.change(cbSearch)
$routeType.change(cbSearch)
// 引入组件初始化
seajs.use(["common/ui/Select3"], function(Select3) {
Select3.init($warehouseId)
Select3.init($routeStatus)
Select3.init($routeType)
})*/ /*grid options*/
var options = {
id: "route_grid_index",
recordClassNames: ["Route"],
columns: [
{ name : '_single_select',hidden:true,sortable : false, renderer : 'FW.MultiSelectColumnRenderer', virtual : true, css: '-single-select fw-w30'},
{ label: "id", name: "id",hidden:true},
{ label: "序号",renderer: 'FW.OrderRenderer',htmlSafe: true,style: "width:1%"},
{ label: "司机姓名", name: "userName", renderer:'FW.NameNoRenderer',htmlSafe: true,style: "width:5%"},
/*{ label: "配送日期", name: "deliveryTime",renderer : 'FW.DeliveryTimeRenderer',virtual:true,hidden:true},*/
{ label: "配送服务", name: "serviceId", renderer:'FW.ServiceRenderer', virtual:true,htmlSafe: true,style: "width:4%"},
{ label: "配送批次", name: "batchId", renderer : 'FW.BatchRenderer', virtual:true,htmlSafe: true,style: "width:4%"},
{ label: "任务单号", name: "taskbillNo",htmlSafe: true,style: "width:4%"},
{ label: "任务类型", name: "taskType",renderer:'FW.TaskTypeRenderer',htmlSafe: true,style: "width:3%"},
{ label: "来源", name: "userSourceName",htmlSafe: true,style: "width:3%"},
{ label: "车型", name: "cartypeName",htmlSafe: true,style: "width:3%"},
{ label: "仓库", name: "warehouseName",virtual:true,htmlSafe: true,style: "width:4%"},
{ label: "线路/站点", name: "originName",htmlSafe: true,style: "width:5%"},
{ label: "费用合计/元", name: "totalAmount",renderer : 'FW.InputTotalAmountRenderer',virtual:true,htmlSafe: true,style: "width:5%"},
{ label: "基础运费", name: "basicAmount",renderer : 'FW.InputBasicAmountRenderer', virtual:true,htmlSafe: true,style: "width:5%"},
{ label: "配送门店数", name: "distributeCustomerNum",virtual:true,htmlSafe: true,style: "width:2%"},
{ label: "取件门店数", name: "pickupCustomerNum",virtual:true,htmlSafe: true,style: "width:2%"},
{ label: "多送客户奖励", name: "rewardAdditionalAmount",renderer : 'FW.InputDuoSongAmountRenderer', virtual:true,htmlSafe: true,style: "width:5%"},
{ label: "补货奖励", name: "rewardReplenishmentAmount",renderer : 'FW.InputBuhuoAmountRenderer', virtual:true,htmlSafe: true,style: "width:5%"},
{ label: "超距配送奖励", name: "rewardOverRangeAmount",renderer : 'FW.InputChaojuAmountRenderer', virtual:true,htmlSafe: true,style: "width:5%"},
{ label: "超额配送奖励", name: "rewardOverQuotaAmount",renderer : 'FW.InputChaoEAmountRenderer', virtual:true,htmlSafe: true,style: "width:5%"},
{ label: "救援奖励", name: "rewardHelpAmount",renderer : 'FW.InputJiuYuanAmountRenderer', virtual:true,htmlSafe: true,style: "width:5%"},
{ label: "被投诉罚款", name: "punishBeComplaintAmount",renderer : 'FW.InputBeiTouSuAmountRenderer', virtual:true,htmlSafe: true,style: "width:5%"},
{ label: "被救援扣除", name: "punishBeHelpedAmount",renderer : 'FW.InputBeiJiuYuanAmountRenderer', virtual:true,htmlSafe: true,style: "width:5%"},
{ label: "迟到罚款", name: "punishLateAmount",renderer : 'FW.InputChiDaoAmountRenderer', virtual:true,htmlSafe: true,style: "width:5%"},
{ label: "其它", name: "otherAmount",renderer : 'FW.InputQiTaAmountRenderer', virtual:true,htmlSafe: true,style: "width:5%"},
{ label: "备注", name: "remark",renderer : 'FW.InputBeiZhuAmountRenderer', virtual:true,htmlSafe: true,style: "width:5%"}
],
target: $("#collection_panel"),
loadAfterRendered: true,
url: '<%=path%>/distributeFee/queryBasicDistributeFeeList',
pagination: true,
scrollable: true,
defaultParams: getFormData("search_form")
}; var gridPanel = new FW.Grid(options);
/*获取所有选择的*/
gridPanel.selectedStatus = function() {
return this.selectedRecords().map(function(record) {
return record.get("status");
});
}; gridPanel.render();
//查询按钮
$('#search_btn').click(function(){ //更新统计信息
$('#totalAmount').html(0);
$('#totalBasicAmount').html(0);
$('#totalMoreSend').html(0);
$('#totalBuhuo').html(0);
$('#totalOverRange').html(0); var params = getFormData("search_form");
gridPanel.updateDefaultParams(params);
$.get('<%=path%>/distributeFee/queryBasicDistributeFeeList', params,
function(data){
gridPanel.setData(data);
showCountDiv();
$('#span_totalCount').text(data.total); //更新右上角数据
//$('#totalTaskbill').text(data.totalTaskbill);
//$('#totalUser').text(data.totalUser);
//$('#totalAmount').text(data.totalAmount);
},
"json");
}); </script>
</div>
</section>
<script type="text/javascript" src="<%=path%>/static/js/vendor/highlight.min.js"></script>
<script type="text/javascript" src="<%=path%>/static/js/plugin/ajaxfileupload.js"></script>
<script>
$(function(){
//hljs.initHighlightingOnLoad();
//var today=new Date();
//$('#deliveryTime').val(today.getFullYear()+"-"+(today.getMonth()+1)+"-"+today.getDate());
}); var serviceBatchs = $.parseJSON('${serviceBatchs}');
var services = $.parseJSON('${services}');;
var sources = $.parseJSON('${sources}');
/* 获取批次 */
function getServiceBatch(select){
var serviceId = $(select).val();
if(serviceId==""){
var tmpHtml = ' <option value="">全部批次</option>';
$('#select_batch').html(tmpHtml);
return false;
} var tmpBathcs = serviceBatchs[serviceId]; if(!tmpBathcs){
$('#select_batch').html('');
} var selectHtml = '<option value="">全部批次</option>';
$.each(tmpBathcs,function(i,o){
selectHtml += '<option value="';
selectHtml += o.id;
selectHtml += '">';
selectHtml += o.name;
selectHtml += '</option>';
}); $('#select_batch').html(selectHtml);
} /*昨天/今天*/
function selectDeliveryTime(type){
//清空配送时间
$('#yesterday_btn').removeClass("btn-primary");
$('#today_btn').removeClass("btn-primary"); var date=new Date();
var year=date.getFullYear();
var month=date.getMonth()+1;
if(type==0){
//昨天
var yesterday = generateDate(type);
$('#yesterday_btn').addClass("btn-primary");
//$('#deliveryTime').val(yesterday);
$('#deliveryTime').val(yesterday);
}else{
//今天
var today = generateDate(type);
$('#today_btn').addClass("btn-primary");
//$('#deliveryTime').val(today);
$('#deliveryTime').val(today);
}
} function generateDate(type){
if(type==0){
var dd = new Date();
dd.setDate(dd.getDate()-1);//获取上一天的日期
var y = dd.getFullYear();
var m = dd.getMonth()+1;//获取当前月份的日期
var d = dd.getDate();
return y+"-"+m+"-"+d;
}else{
var date = new Date();
var year = date.getFullYear();
var month = date.getMonth()+1;
var day= date.getDate();
return year+"-"+month+"-"+day;
}
}
/*日期改变*/
function dateChange(date){
$('#yesterday_btn').removeClass("btn-primary");
$('#today_btn').removeClass("btn-primary"); //$('#deliveryTime').val( (new Date(date)).getTime()/1000 );
//$('#deliveryTime').val(date)
} /* 关闭显示查询数据量div */
function closeCountDiv(){
$(".closeCountDiv").css("display","none");
}
function showCountDiv(){
$(".closeCountDiv").css("display","block");
} /*同步任务*/
$('#syncTask').click(function(){
$.ajax({
url: '<%=path %>/distributeFee/syncTaskbill',
async: true,
type:'post',
dataType:'json',
data: getFormData("search_form"),
success: function(data){
if (data.flag){
TMS.Message.info(data.message,$('#message'),2000);
$('#search_btn').trigger('click');
}else {
TMS.Message.error(data.message,$('#message'),2000);
}
}
});
}); /*导出*/
$('#exportExcel').click(function(){
if(gridPanel.getData().total==0){
alert("没有要导出的内容!");
return false;
} var deliveryTime = $('#deliveryTime').val();
var userName = $('#userName').val();
var serviceId = $('#select_service').val();
var batchId = $('#select_batch').val();
var warehouseId = $('#warehouseId').val();
var taskType = $('#taskType').val();
var cityName = $("#city_switch option:selected ").text();
var form = '<form style="display:none" id="exportForm" action="'+'<%=path %>/distributeFee/exportBasicDistributeFees'+'">';
form += '<input type="hidden" name="deliveryTime" value="'+ deliveryTime +'"/>';
form += '<input type="hidden" name="userName" value="'+ userName +'"/>';
form += '<input type="hidden" name="serviceId" value="'+ serviceId +'"/>';
form += '<input type="hidden" name="batchId" value="'+ batchId +'"/>';
form += '<input type="hidden" name="warehouseId" value="'+ warehouseId +'"/>';
form += '<input type="hidden" name="taskType" value="'+ taskType +'"/>';
form += '<input type="hidden" name="cityName" value="'+ cityName +'"/>';
form += '</form>'; $('#export_form_div').html(form);
$('#exportForm').submit();
}); var importDialog = {};
/*导入*/
$("#add_btn").click(function() {
var data = {
action: ''
};
importDialog = new UserAddActionDialog.asDialog({data:data});
importDialog.show({}, {header: '导入Excel'});
}); /*校验失败的弹窗*/
var checkError_Table_DialogOption = {
header: '',
handlers: [
{label:"关闭", class:"-step-cancel"}
],
}; /*dialog生成函数*/
var checkError_Table_Dialog = FW.Component.pinleiTTT = Class.create(FW.Component.Base, FW.Component.WizardSupport, {
render: function() {
var source = $('#checkError_table_tmpl').html();
var template = Handlebars.compile(source);
var context = this.option("data");
var $dom = $(template(context));
this._setDom($dom); //prepareDialog(); return this.$dom;
}
});
FW.Component.ActAsDialog(checkError_Table_Dialog, checkError_Table_DialogOption); /*dialog生成函数*/
var UserAddActionDialog = FW.Component.UserAdd = Class.create(FW.Component.Base, FW.Component.WizardSupport, {
render: function() {
var source = $("#import_render_tmpl").html();
var template = Handlebars.compile(source);
var context = this.option("data");
var $dom = $(template(context)); this._setDom($dom);
return this.$dom;
}
});
var UserAddActionDialogOption = {
header: '',
width:'700px',
height:'150px',
handlers: [
{
label: "上传",
callback: function () {
$dialog = this.$dialog;
$component = this.component;
var val = $(".showFileName").val();
if(val==null||""==val){
alert("导入文件为空!");
return false;
}
//文件上传地址
//初始化,主要是设置上传参数,以及事件处理方法(回调函数)
$("#importForm").ajaxSubmit({
url:'<%=path%>/distributeFee/importData',
dataType:"json",
success:function(d) {
importDialog.$dialog.parent().next().remove();
importDialog.$dialog.parent().remove();
if (d.ret==1) { //成功
TMS.Message.info(d.message,$('#message'),2000);
$('#search_btn').trigger('click');
setTimeout('location.reload()', 1000);
} else if(d.ret==2){ //失败
TMS.Message.error(d.message,$('#message'),2000);
$('#search_btn').trigger('click');
setTimeout('location.reload()', 1000);
} else if(d.ret==0) {//校验失败,蹦出一个框
new checkError_Table_Dialog.asDialog({data: {
"checkErrorList": d.retData
}}).show({}, {header: "数据校验失败列表"});
}
}
});
return false;
}
}
] };
FW.Component.ActAsDialog(UserAddActionDialog, UserAddActionDialogOption);
/*自动保存*/
var time = 1000*60;//毫秒
//setInterval(autoSave,time);
function autoSave(){
Fee.saveFees('auto_save');
} /*保存*/
$('#saveFee').click(function(){
Fee.saveFees('manual_save');
});
</script>

导入jsp的更多相关文章

  1. SpringBoot导入jsp依赖始终报错

    先粘出我自己的pom代码: <?xml version="1.0" encoding="UTF-8"?> <project xmlns=&qu ...

  2. java:JSP(JSPWeb.xml的配置,动态和静态导入JSP文件,重定项和请求转发,使用JSP实现数据库的增删改查实例)

    1.JSP的配置: <%@ page language="java" import="java.util.*" pageEncoding="UT ...

  3. eclipse中导入jsp等工程使用过程中常遇问题

    1.导入的工程JSP文件出现报错的情况 这个一般不怎么影响文件的执行,这些文件飘红主要是因为eclipse的校验问题. 具体错误信息:Multiple annotations found at thi ...

  4. eclipse导入jsp文件第一行报错

  5. JSP知识

    五.JSP概述及最佳实践1.更改MyEclipse生成的JSP模板.模板文件与Servlet.java(Servlet模板文件)很近.2.学好JSP的关键:JSP就是Servlet.一定要记住JSP中 ...

  6. Jsp语法、指令及动作元素

    一.JSP的语法 1.JSP的模板元素:(先写HTML) 就是JSP中的那些HTML标记 作用:页面布局和美化 2.JSP的Java脚本表达式: 作用:输出数据到页面上 语法:<%=表达式%&g ...

  7. 11、Jsp加强/EL表达式/jsp标签

    1 Jsp基础回顾 Jsp基础 1)Jsp的执行过程 tomcat服务器完成:jsp文件->翻译成java文件->编译成class字节码文件-> 构造类对象-> 调用方法 to ...

  8. JavaWeb之 JSP基础

    什么是JSP JSP的全称是java server page, java服务页面.是提供java服务的页面~ 那么和Servlet有什么区别呢?JSP的页面既可以写java代码~也可以写html代码哦 ...

  9. 使用 FreeMarker 替换 JSP 的 10 个理由

    你还在使用 Java 服务器页面(俗称JSP)吗?我曾经也是,但是几年前我抛弃了它们,并且再也没有用过JSP了.JSP 是个很好的概念,但是它却剥夺了 web 开发的乐趣. 对我而言,这些都是小事,比 ...

随机推荐

  1. jquery新增,删除 ,修改,清空select中的option

    jQuery获取Select选择的Text和Value: 1. var checkText=jQuery("#select_id").find("option:selec ...

  2. mina、netty消息边界问题(采用换行符)

    在TCP连接开始到结束连接,之间可能会多次传输数据,也就是服务器和客户端之间可能会在连接过程中互相传输多条消息.理想状况是一方每发送一条消息,另一方就立即接收到一条,也就是一次write对应一次rea ...

  3. 【Android】创建Popwindow弹出菜单的两种方式

    方法一的Activity package com.app.test02; import android.app.Activity; import android.os.Bundle; import a ...

  4. 容易被误解的overflow:hidden

    http://www.ofcss.com/2011/03/20/misunderstood-of-overflow-hidden.html(转) 容易被误解的overflow:hidden 15条评论 ...

  5. Linux 网络编程基础(1)--网络相关的数据结构及转化函数

    在Linux下进行网络编程,使用的语言一般为C.就个人感受而言,在Linux下进行网络程序的编写,重要的不是代码能力要多强,而是对Linux的网络编程思想的理解和对Linux网络数据结构的掌握.如果想 ...

  6. Groovy中那些神奇注解之InheritConstructors

    上一篇:Groovy中那些神奇注解之ToString 写完ToString,本来想今天就写到这了,突然觉得InheritConstructors注解实在也是个神器,写起来也没多少字,还是写了吧. In ...

  7. 了解常见的浏览器内核 Trident,Geckos,Presto,Webkit

    了解常见的浏览器内核 Trident,Geckos,Presto,Webkit 内核只是一个通俗的说法,英文名称为"Layout engine",翻译过来就是"排版引擎& ...

  8. TCP/IP笔记 三.运输层(2)——TCP 流量控制与拥塞控制

    TCP 的流量控制与拥塞控制可以说是一体的.流量控制是通过滑动窗口实现的,拥塞避免主要包含以下2个内容: (1)慢开始,拥塞避免 (2)快重传,快恢复 1.流量控制——滑动窗口 TCP采用大小可变的滑 ...

  9. 第八届河南省赛F.Distribution(水题)

    10411: F.Distribution Time Limit: 1 Sec  Memory Limit: 128 MB Submit: 11  Solved: 8 [Submit][Status] ...

  10. cocos2d-x-3.1 Text Labels(官方正式译文)

    介绍 cocos2d支持(true type字体)标签,和纹理地图集标签. LabelTTF 标签的优缺点: 全部 TTF 字体的长处: 随意大小,支持调整字距. 易于使用. 不须要外部编辑器. 创建 ...