Merge branch 'develop'

master
eason.qian 6 years ago
commit e79066994a

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

@ -13,7 +13,10 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
$scope.pagination = {}; $scope.pagination = {};
$scope.params = {}; $scope.params = {};
$scope.new_bill = {}; $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) { $scope.loadBills = function (page) {
var params = angular.copy($scope.params); 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; return app;
}); });

@ -24,9 +24,14 @@
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-4 col-sm-3">* Order Amount</label> <label class="control-label col-xs-4 col-sm-3">* Order Amount</label>
<div class="col-xs-8 col-sm-6"> <div class="col-xs-8 col-sm-6">
<input type="number" step="0.01" name="order_amount" class="form-control" <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 ng-model="new_bill.order_amount" required
onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"> 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> </div>
<div class="form-group"> <div class="form-group">
@ -35,7 +40,8 @@
<input class="form-control" ng-model="new_bill.cancle_time" <input class="form-control" ng-model="new_bill.cancle_time"
uib-datepicker-popup size="10" is-open="ctrl.dateInput" uib-datepicker-popup size="10" is-open="ctrl.dateInput"
ng-click="ctrl.dateInput=true" 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>
</div> </div>
@ -49,7 +55,8 @@
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-4 col-sm-3">Remark</label> <label class="control-label col-xs-4 col-sm-3">Remark</label>
<div class="col-xs-8 col-sm-6"> <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> </div>
<div class="form-group"> <div class="form-group">
@ -88,28 +95,28 @@
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th>Price</th> <th>Order Amount</th>
<th>Client Order Id</th> <th>Client Order Id</th>
<th>Create time</th> <th>Payer</th>
<th>Expire time</th>
<th>Remark</th>
<th>Order Status</th> <th>Order Status</th>
<th>Bill Status</th> <th>Bill Status</th>
<th>Payer</th> <th>Expire Date</th>
<th>Remark</th>
<th>Create time</th>
<th>Operation</th> <th>Operation</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="bill in bills" <tr ng-repeat="bill in bills"
ng-class="{'delete':bill.status==2}"> 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> <th ng-bind="bill.client_order_id"></th>
<td ng-bind="bill.create_time"></td> <td ng-bind="bill.nickname"></td>
<td ng-bind="bill.cancle_time"></td>
<td ng-bind="bill.remark"></td>
<th ng-bind="bill.order_status|tradeStatus"></th> <th ng-bind="bill.order_status|tradeStatus"></th>
<th ng-bind="bill.status|billStatus"></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> <td>
<a ng-if="bill.order_id" class="text-primary" role="button" title="Detail" <a ng-if="bill.order_id" class="text-primary" role="button" title="Detail"
ng-click="showTradeDetail(bill)"> ng-click="showTradeDetail(bill)">

Loading…
Cancel
Save