|
|
@@ -984,16 +984,16 @@
|
|
|
total : 0,
|
|
|
getData : function ($defer, params) {
|
|
|
var param = BaseService.parseParams(params.url());
|
|
|
- param.keyword = $scope.keyword;
|
|
|
+ param.filter = $scope.filter;
|
|
|
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];
|
|
|
- item.OrderNumber = _arr
|
|
|
- }
|
|
|
+ // if (item.type == "APPLY_PAID_TYPE" || item.type == "CONFIRM_PAID_TYPE" || item.type == "FINANCIAL_SETTLEMENT_TYPE"){
|
|
|
+ // var _arr = item.content.split(' ')[1];
|
|
|
+ // item.OrderNumber = _arr
|
|
|
+ // }
|
|
|
if (item.type == "APPLY_PAID_TYPE") {
|
|
|
item.newsType = '付款申请'
|
|
|
}
|
|
|
@@ -1010,38 +1010,29 @@
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- // /**
|
|
|
- // * 获取未读消息数量
|
|
|
- // */
|
|
|
- // adminNews.unreadCount({}, function(data){
|
|
|
- // $scope.unreadCount = data.count;
|
|
|
- // }, function(res){
|
|
|
- // toaster.pop('error', '系统错误', '获取未读消息数量失败' + res.data);
|
|
|
- // });
|
|
|
-
|
|
|
/**
|
|
|
* 跳转消息详情页
|
|
|
*/
|
|
|
var enIdFilter = $filter('EncryptionFilter');
|
|
|
$scope.jumpNewsDetail = function(data) {
|
|
|
if (data.type == "APPLY_PAID_TYPE") {
|
|
|
- window.location.href = 'admin#/check/request_pay/' + data.remark
|
|
|
+ window.location.href = 'admin#/check/request_pay/' + data.sellerenuu
|
|
|
}
|
|
|
if (data.type == "CONFIRM_PAID_TYPE") {
|
|
|
- window.location.href = '/admin#/trade/order/' + enIdFilter(data.OrderNumber)
|
|
|
+ window.location.href = '/admin#/trade/order/' + enIdFilter(data.orderid)
|
|
|
}
|
|
|
if (data.type == "FINANCIAL_SETTLEMENT_TYPE") {
|
|
|
window.location.href = 'admin#/check/settlement'
|
|
|
}
|
|
|
- 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);
|
|
|
- });
|
|
|
+ // 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);
|
|
|
+ // });
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -1051,6 +1042,21 @@
|
|
|
$rootScope.lookNews = function() {
|
|
|
$rootScope.newShow = !$rootScope.newShow
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 选择消息类型
|
|
|
+ */
|
|
|
+ $scope.showType = false;
|
|
|
+ $scope.openType = function () {
|
|
|
+ $scope.showType = !$scope.showType;
|
|
|
+ }
|
|
|
+ $scope.chooseType = function (type) {
|
|
|
+ $scope.showType = false;
|
|
|
+ $scope.filter = {'type': type};
|
|
|
+ $scope.newsTableParams.page(1);
|
|
|
+ $scope.newsTableParams.reload();
|
|
|
+ }
|
|
|
+
|
|
|
}]);
|
|
|
|
|
|
//币别的过滤器
|