You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.8 KiB
50 lines
1.8 KiB
/**
|
|
* Created by davep on 2016-08-15.
|
|
*/
|
|
define(['../app'], function (app) {
|
|
'use strict';
|
|
app.factory('clearingDetailService', ['$uibModal', function ($uibModal) {
|
|
function openDetail(url, is_partner) {
|
|
$uibModal.open({
|
|
templateUrl: '/static/payment/tradelog/templates/partner_settlement_dialog.html',
|
|
controller: 'clearingDetailCtrl',
|
|
resolve: {
|
|
detail: ['$http', function ($http) {
|
|
return $http.get(url);
|
|
}],
|
|
is_partner: is_partner
|
|
},
|
|
size: 'lg'
|
|
})
|
|
}
|
|
|
|
return {
|
|
clientClearingDetail: function (client_id, detailId, is_partner) {
|
|
openDetail('/client/clean_logs/' + client_id + '/settlement_logs/' + detailId, is_partner);
|
|
}
|
|
|
|
}
|
|
}]);
|
|
app.controller('clearingDetailCtrl', ['$scope', 'detail', 'is_partner', function ($scope, detail, is_partner) {
|
|
$scope.ctrl = {channel: null};
|
|
$scope.report = detail.data;
|
|
$scope.is_partner = is_partner;
|
|
}]);
|
|
app.filter('channel_image', function () {
|
|
return function (channel) {
|
|
switch (channel) {
|
|
case 'Alipay':
|
|
case 'AlipayOnline':
|
|
return '/static/images/alipay_sign_lg.png';
|
|
case 'System':
|
|
return '/static/images/royalpay_sign.png';
|
|
case 'Bestpay':
|
|
return '/static/images/bestpay_sign_lg.png';
|
|
case 'Wechat':
|
|
return '/static/images/wechatpay_sign_lg.png';
|
|
case 'jd':
|
|
return '/static/images/jd_sign_lg.png';
|
|
}
|
|
}
|
|
});
|
|
}); |