|
|
@@ -973,15 +973,13 @@
|
|
|
* 分页获取消息
|
|
|
*/
|
|
|
var _url = $location.absUrl().toString()
|
|
|
- console.log(_url)
|
|
|
if (_url.indexOf('/admin#/index') > -1) {
|
|
|
$rootScope.newShow = true
|
|
|
}
|
|
|
|
|
|
$scope.newsTableParams = new ngTableParams({
|
|
|
page : 1,
|
|
|
- count : 5,
|
|
|
- type : '确认收款,付款申请,财务结算'
|
|
|
+ count : 5
|
|
|
}, {
|
|
|
total : 0,
|
|
|
getData : function ($defer, params) {
|
|
|
@@ -990,6 +988,7 @@
|
|
|
adminNews.getNewsList(param, function (data) {
|
|
|
params.total(data.totalElements);
|
|
|
$defer.resolve(data.content);
|
|
|
+ $scope.totalElements = data.totalElements
|
|
|
data.content.forEach(function (item) {
|
|
|
if (item.type == "APPLY_PAID_TYPE" || item.type == "CONFIRM_PAID_TYPE" || item.type == "FINANCIAL_SETTLEMENT_TYPE"){
|
|
|
var _arr = item.content.split(' ')[1];
|
|
|
@@ -1005,28 +1004,26 @@
|
|
|
item.newsType = '财务结算'
|
|
|
}
|
|
|
})
|
|
|
- console.log(data.content)
|
|
|
}, function (response) {
|
|
|
toaster.pop('error', '获取消息列表失败');
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- /**
|
|
|
- * 获取未读消息数量
|
|
|
- */
|
|
|
- adminNews.unreadCount({}, function(data){
|
|
|
- $scope.unreadCount = data.count;
|
|
|
- }, function(res){
|
|
|
- toaster.pop('error', '系统错误', '获取未读消息数量失败' + res.data);
|
|
|
- });
|
|
|
+ // /**
|
|
|
+ // * 获取未读消息数量
|
|
|
+ // */
|
|
|
+ // adminNews.unreadCount({}, function(data){
|
|
|
+ // $scope.unreadCount = data.count;
|
|
|
+ // }, function(res){
|
|
|
+ // toaster.pop('error', '系统错误', '获取未读消息数量失败' + res.data);
|
|
|
+ // });
|
|
|
|
|
|
/**
|
|
|
* 跳转消息详情页
|
|
|
*/
|
|
|
var enIdFilter = $filter('EncryptionFilter');
|
|
|
$scope.jumpNewsDetail = function(data) {
|
|
|
- console.log(data.OrderNumber)
|
|
|
if (data.type == "APPLY_PAID_TYPE") {
|
|
|
window.location.href = 'admin#/check/request_pay/' + data.remark
|
|
|
}
|
|
|
@@ -1034,15 +1031,14 @@
|
|
|
window.location.href = '/admin#/trade/order/' + enIdFilter(data.OrderNumber)
|
|
|
}
|
|
|
if (data.type == "FINANCIAL_SETTLEMENT_TYPE") {
|
|
|
- window.location.href = 'admin#/check/settlement#batchCheckMoney'
|
|
|
+ window.location.href = 'admin#/check/settlement'
|
|
|
}
|
|
|
- console.log(window.location.href)
|
|
|
- adminNews.read({messageId: data.id}, null, function () {
|
|
|
- adminNews.unreadCount({}, function(data){
|
|
|
- $scope.unreadCount = data.count;
|
|
|
- }, function(res){
|
|
|
- toaster.pop('error', '系统错误', '获取未读消息数量失败' + res.data);
|
|
|
- });
|
|
|
+ adminNews.read({messageId: data.id, type: data.type}, null, function () {
|
|
|
+ // adminNews.unreadCount({}, function(data){
|
|
|
+ // $scope.unreadCount = data.count;
|
|
|
+ // }, function(res){
|
|
|
+ // toaster.pop('error', '系统错误', '获取未读消息数量失败' + res.data);
|
|
|
+ // });
|
|
|
}, function(res){
|
|
|
toaster.pop('error' + res.data);
|
|
|
});
|