add transaction pos 条件

master
luoyang 6 years ago
parent 6c48a15615
commit 4754d0b844

@ -130,6 +130,9 @@
<if test="trans_type==1">and t.transaction_type = 'Credit'</if>
<if test="trans_type==2">and t.refund_id is NOT NULL</if>
<if test="trans_type==3">and t.transaction_type='Debit' and t.refund_id is NULL</if>
<if test="dev_id!=null">
and o.dev_id = #{dev_id}
</if>
<if test="channel!=null">
and
<foreach collection="channel" item="chan" open="(" close=")" separator=" or ">o.channel=#{chan}
@ -198,6 +201,9 @@
<if test="trans_type==1">and t.transaction_type = 'Credit'</if>
<if test="trans_type==2">and t.refund_id is NOT NULL</if>
<if test="trans_type==3">and t.transaction_type='Debit' and t.refund_id is NULL</if>
<if test="dev_id!=null">
and o.dev_id = #{dev_id}
</if>
<if test="channel!=null">
and
<foreach collection="channel" item="chan" open="(" close=")" separator=" or ">o.channel=#{chan}

@ -368,12 +368,11 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="remark-input">Following
BD</label>
<label class="control-label col-sm-2" for="remark-input">Remark</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.remark"
name="remark"
id="remark-input" maxlength="50">
id="remark-input" maxlength="500">
</div>
</div>
<div class="form-group">

@ -166,13 +166,13 @@
<p class="form-control-static" ng-bind="partner.description"></p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Remark</label>
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">Remark</label>-->
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.remark"></p>
</div>
</div>
<!--<div class="col-sm-10">-->
<!--<p class="form-control-static" ng-bind="partner.remark"></p>-->
<!--</div>-->
<!--</div>-->
</div>
</div>
</div>

@ -168,19 +168,19 @@
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.remark.$invalid && partnerForm.remark.$dirty}">
<label class="control-label col-sm-2" for="desc-input">Remark</label>
<div class="col-sm-8">
<textarea class="form-control" ng-model="partner.remark"
name="remark" id="remark-input" maxlength="200" required></textarea>
<div ng-messages="partnerForm.remark.$error"
ng-if="partnerForm.remark.$dirty">
<p class="small text-danger" ng-message="maxlength">Less Than 200
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
<!--<div class="form-group"-->
<!--ng-class="{'has-error':partnerForm.remark.$invalid && partnerForm.remark.$dirty}">-->
<!--<label class="control-label col-sm-2" for="desc-input">Remark</label>-->
<!--<div class="col-sm-8">-->
<!--<textarea class="form-control" ng-model="partner.remark"-->
<!--name="remark" id="remark-input" maxlength="200" required></textarea>-->
<!--<div ng-messages="partnerForm.remark.$error"-->
<!--ng-if="partnerForm.remark.$dirty">-->
<!--<p class="small text-danger" ng-message="maxlength">Less Than 200-->
<!--Characters(including symbols and spaces)</p>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
</div>
</div>
</div>

@ -430,7 +430,7 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Following BD</label>
<label class="control-label col-sm-2">Remark</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.remark"></p>

@ -99,7 +99,7 @@
<div ng-messages="partnerForm.store_name.$error"
ng-if="partnerForm.store_name.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Less Than 50
<p class="small text-danger" ng-message="maxlength">Less Than 15
Characters(including symbols and spaces)</p>
</div>
</div>
@ -168,12 +168,11 @@
<div ng-messages="partnerForm.store_name.$error"
ng-if="partnerForm.store_name.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Less Than 50
<p class="small text-danger" ng-message="maxlength">Less Than 15
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
</div>
<div class="form-group"
@ -344,10 +343,10 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="remark-input">Following BD</label>
<label class="control-label col-sm-2" for="remark-input">Remark</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.remark" name="remark"
id="remark-input" maxlength="50">
id="remark-input" maxlength="500">
</div>
</div>
<div class="form-group">

@ -103,6 +103,17 @@
</p>
</div>
</div>
<div class="form-group col-xs-12" ng-if="devices.length">
<label class="control-label col-xs-4 col-sm-2">Devices</label>
<div class="col-sm-10 col-xs-8">
<p class="form-control-static">
<a role="button" ng-class="{'bg-primary':device_isAll}" ng-click="chooseDevices('all')">All</a>
<label ng-repeat="device in devices">
|&nbsp;<a role="button" ng-class="{'bg-primary':device.dev_id==chooseDevice_id}" ng-click="chooseDevices(device.dev_id)">{{device.remark}}</a>&nbsp;
</label>
</p>
</div>
</div>
<div class="form-group col-xs-12">
<label class="control-label col-xs-4 col-sm-2">Date Range</label>
<div class="col-sm-10 col-xs-8">

@ -17,6 +17,8 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
$scope.pagination = {};
$scope.params.clearing_status = -1;
$scope.params.channel = 'ALL'
$scope.dev_params = {client_type:'sunmi',limit:100};
$scope.device_isAll = true;
$scope.params.trans_type = 0;
$scope.isAll = true;
$scope.clients = [$scope.currentUser.client];
@ -69,6 +71,26 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
$scope.params.datefrom = monthBegin;
$scope.loadTradeLogs(1);
};
$scope.listDevices = function () {
var params = angular.copy($scope.dev_params)
$http.get('/client/partner_info/devices', {params: params}).then(function (resp) {
$scope.devices = resp.data.data;
})
};
$scope.chooseDevices = function (dev_id) {
if(dev_id == 'all'){
$scope.chooseDevice_id = '';
$scope.params.dev_id = null;
$scope.device_isAll = true;
$scope.loadTradeLogs(1);
}else {
$scope.chooseDevice_id = dev_id;
$scope.params.dev_id = dev_id;
$scope.device_isAll = false;
$scope.loadTradeLogs(1);
}
};
$scope.listDevices();
$scope.loadTradeLogs = function (page) {
var params = angular.copy($scope.params);
if (params.datefrom) {
@ -123,6 +145,10 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
url += connectSymbol + 'trans_type=' + params.trans_type;
connectSymbol = '&';
}
if (params.dev_id) {
url += connectSymbol + 'dev_id=' + params.dev_id;
connectSymbol = '&'
}
params.client_ids.forEach(function (i) {
url += connectSymbol + 'client_ids=' + i;
connectSymbol = '&';
@ -137,6 +163,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
url += connectSymbol + 'dateto=' + params.dateto;
connectSymbol = '&';
}
params.page = page || $scope.pagination.page || 1;
url += connectSymbol + 'page=' + params.page;
return url;

Loading…
Cancel
Save