master
yuan 7 years ago
parent 2f2d21f03e
commit c0fffb94e3

@ -100,7 +100,7 @@ define(['angular', 'uiRouter', 'uiBootstrap', 'angularEcharts'], function (angul
loadTradeAmountInTypes();
loadTradePartnersInTypes();
loadTopPartners();
loadTradeTimeAnalysis();
/*loadTradeTimeAnalysis();*/
loadTradeLimite();
};
@ -281,7 +281,7 @@ define(['angular', 'uiRouter', 'uiBootstrap', 'angularEcharts'], function (angul
$scope.analysis.top_partners = chartParser.parse(topPartnerConfig, resp.data.reverse());
})
}
function loadTradeTimeAnalysis() {
/*function loadTradeTimeAnalysis() {
var timeAnalysis = function (legend, series) {
return {
// title : {
@ -413,9 +413,9 @@ define(['angular', 'uiRouter', 'uiBootstrap', 'angularEcharts'], function (angul
});
$scope.analysis.trade_time = timeAnalysis(leg, series);
})
}
}*/
/*function loadFeeAnalysis(params) {
function loadFeeAnalysis(params) {
var analysisConfig = {
chart: {
tooltip: {
@ -473,7 +473,7 @@ define(['angular', 'uiRouter', 'uiBootstrap', 'angularEcharts'], function (angul
})
}
loadFeeAnalysis($scope.scales[2].params())*/
loadFeeAnalysis($scope.scales[2].params())
function getMaxRecord() {
if ($scope.currentUser.org_id == null) {

@ -13,7 +13,10 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
$scope.pagination = {};
$scope.params = {};
$scope.new_bill = {};
$scope.today = new Date();
$scope.minDate = new Date();
var maxDate = new Date();
$scope.maxDate = maxDate.setDate(maxDate.getDate() + 14);
$scope.loadBills = function (page) {
var params = angular.copy($scope.params);
@ -80,6 +83,25 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
}
});
app.filter('remarkCut', function () {
return function (value, wordwise, max, tail) {
if (!value) return '';
max = parseInt(max, 10);
if (!max) return value;
if (value.length <= max) return value;
value = value.substr(0, max);
if (wordwise) {
var lastspace = value.lastIndexOf(' ');
if (lastspace != -1) {
value = value.substr(0, lastspace);
}
}
return value + (tail || ' …');
};
});
return app;
});

@ -24,9 +24,14 @@
<div class="form-group">
<label class="control-label col-xs-4 col-sm-3">* Order Amount</label>
<div class="col-xs-8 col-sm-6">
<input type="number" step="0.01" name="order_amount" class="form-control"
ng-model="new_bill.order_amount" required
onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')">
<div class="input-group">
<input type="number" step="0.01" name="order_amount" class="form-control form-control-float"
ng-model="new_bill.order_amount" required
onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
aria-describedby="basic-addon2">
<span class="input-group-addon" id="basic-addon2">$</span>
</div>
<p class="small text-info"></p>
</div>
</div>
<div class="form-group">
@ -35,7 +40,8 @@
<input class="form-control" ng-model="new_bill.cancle_time"
uib-datepicker-popup size="10" is-open="ctrl.dateInput"
ng-click="ctrl.dateInput=true"
datepicker-options="{minDate:today}" name="cancle_time" required>
datepicker-options="{minDate:minDate,maxDate:maxDate}" name="cancle_time" required>
<p class="small text-info">Expire Date 不得超过十五天</p>
</div>
</div>
@ -49,7 +55,8 @@
<div class="form-group">
<label class="control-label col-xs-4 col-sm-3">Remark</label>
<div class="col-xs-8 col-sm-6">
<textarea class="form-control" ng-model="new_bill.remark"></textarea>
<textarea maxlength="100" class="form-control" ng-model="new_bill.remark"></textarea>
<p class="small text-info">Remark 不得超过100字符</p>
</div>
</div>
<div class="form-group">
@ -88,28 +95,28 @@
<table class="table table-striped">
<thead>
<tr>
<th>Price</th>
<th>Order Amount</th>
<th>Client Order Id</th>
<th>Create time</th>
<th>Expire time</th>
<th>Remark</th>
<th>Payer</th>
<th>Order Status</th>
<th>Bill Status</th>
<th>Payer</th>
<th>Expire Date</th>
<th>Remark</th>
<th>Create time</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="bill in bills"
ng-class="{'delete':bill.status==2}">
<td ng-bind="bill.order_amount"></td>
<td ng-bind="bill.order_amount | currency:'AUD '"></td>
<th ng-bind="bill.client_order_id"></th>
<td ng-bind="bill.create_time"></td>
<td ng-bind="bill.cancle_time"></td>
<td ng-bind="bill.remark"></td>
<td ng-bind="bill.nickname"></td>
<th ng-bind="bill.order_status|tradeStatus"></th>
<th ng-bind="bill.status|billStatus"></th>
<td ng-bind="bill.nickname"></td>
<td ng-bind="bill.cancle_time |limitTo:10"></td>
<td ng-bind="bill.remark|remarkCut:true:10:'...'"></td>
<td ng-bind="bill.create_time"></td>
<td>
<a ng-if="bill.order_id" class="text-primary" role="button" title="Detail"
ng-click="showTradeDetail(bill)">

Loading…
Cancel
Save