Browse Source

站内信、发票

hangb 7 years ago
parent
commit
86fa9a4faa

+ 1 - 36
src/main/webapp/WEB-INF/views/normal/adminWithNav.html

@@ -248,42 +248,7 @@
 				<li><a>快照</a></li>
 			</ul>
 			<!--消息-->
-			<div class="msg" style="display: none;">
-				<span class="message">待处理 <i class="fa fa-angle-double-down angle-hover-up"></i><span class="red-dot">99</span></span>
-				<div class="msg-show">
-					<table>
-						<thead>
-						<tr>
-							<th width="250" class="choose-type">
-								<span class="all-type dropdown-toggle">全部类型 <i class="fa fa-angle-double-down angle-hover-up"></i></span>
-								<ul class="dropdown-menu">
-									<li><a>确认收款</a></li>
-									<li><a>付款申请</a></li>
-									<li><a>财务结算</a></li>
-								</ul>
-							</th>
-							<th width="500"><b></b>任务描述</th>
-							<th width="400"><b></b>发起人</th>
-							<th width="auto"><b></b>发起时间</th>
-						</tr>
-						</thead>
-						<tbody>
-						<tr>
-							<td><span>确认收款</span></td>
-							<td><span>订单 <a href="">SS2018070500000035</a> 买家已付款成功,请确认是否收款成功!</span></td>
-							<td><span>深圳市华商龙科技商龙科技商龙科技有限公司(采购商名称)</span></td>
-							<td><span>2018/07/01  08:32:57</span></td>
-						</tr>
-						<tr>
-							<td><span>确认收款</span></td>
-							<td><span>订单 <a href="">SS2018070500000035</a> 买家已付款成功,请确认是否收款成功!</span></td>
-							<td><span>深圳市华商龙科技商龙科技商龙科技有限公司深圳市华商龙科技商龙科技商龙科技有限公司深圳市华商龙科技商龙科技商龙科技有限公司(采购商名称)</span></td>
-							<td><span>2018/07/01  08:32:57</span></td>
-						</tr>
-						</tbody>
-					</table>
-				</div>
-			</div>
+			<div ng-include src="'static/view/admin/news.html'"></div>
 			<div ui-view></div>
 		</div>
 	</div>

+ 0 - 108
src/main/webapp/resources/css/admin.css

@@ -59,114 +59,6 @@ select {
 	min-width: 720px;
 	overflow: hidden;
 }
-
-.main-container .msg{
-	position: relative;
-}
-.main-container .message{
-	position: absolute;
-	top: -46px;
-	right: 45px;
-	width: 78px;
-	height: 26px;
-	line-height: 26px;
-	text-align: center;
-	font-size: 12px;
-	color: #fff;
-	background-color: #31a5e7;
-	border-radius: 4px;
-	cursor: pointer;
-}
-.main-container .message .red-dot {
-	position: absolute;
-	top: -2px;
-	right: -8px;
-	width: 18px;
-	height: 18px;
-	line-height: 18px;
-	font-size: 12px;
-	color: #fff;
-	border-radius: 50%;
-	background: #f00;
-}
-.main-container .message:hover .angle-hover-up{
-	-webkit-transform: rotateZ(180deg);
-	-moz-transform: rotateZ(180deg);
-	-o-transform: rotateZ(180deg);
-	-ms-transform: rotateZ(180deg);
-	transform: rotateZ(180deg);
-}
-.main-container .msg-show{
-	position: absolute;
-	top: -20px;
-	right: 42px;
-	z-index: 1000;
-	background-color: #ffffff;
-	border-radius: 4px;
-	border: solid 1px #31a5e7;
-}
-.main-container .msg-show table{
-	width: 1350px;
-	table-layout: fixed;
-}
-.main-container .msg-show table thead{
-	width: 100%;
-	height: 45px;
-	background-color: rgba(49, 165, 231, 0.1);
-	border-radius: 4px;
-}
-.main-container .msg-show table tr th{
-	height: 45px;
-}
-.main-container .msg-show table tr th,.main-container .msg-show table tr td{
-	vertical-align: middle;
-	font-weight: normal;
-	position:relative;
-	text-align: center;
-}
-.main-container .msg-show table tr th b{
-	position: absolute;
-	top: 13px;
-	left: 0;
-	width: 1px;
-	height: 20px;
-	border: solid 1px #bfbfbf;
-}
-.main-container .msg-show table tr th.choose-type .all-type {
-	cursor: pointer;
-}
-.main-container .msg-show table tr th.choose-type .dropdown-menu{
-	position: absolute;
-	top: 30px;
-	left: 45px;
-	z-index: 1000;
-	display: none;
-	float: left;
-	font-size: 14px;
-	border-radius: 4px;
-	-webkit-box-shadow: 0 6px 12px rgba(0,0,0,0.175);
-	box-shadow: 0 6px 12px rgba(0,0,0,0.175);
-	-webkit-background-clip: padding-box;
-	background-clip: padding-box;
-	width: 100px;
-	height: 78px;
-	background-color: #ffffff;
-	border: solid 1px #d2d2d2;
-}
-.main-container .msg-show table tr th.choose-type .dropdown-menu li{
-	width: 100%;
-	height: 25px;
-	line-height: 25px;
-	text-align: center;
-	font-size: 14px;
-	color: #333;
-}
-.main-container .msg-show table tbody tr{
-	border-bottom: 1px solid #dcdcdc;
-}
-.main-container .msg-show table tbody tr td{
-	padding: 10px 0;
-}
 .top-block {
 	font-size: 14px;
 	font-family: "Microsoft YaHei";

+ 112 - 6
src/main/webapp/resources/js/admin/app.js

@@ -1,4 +1,4 @@
- define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ui-form', 'ngLocal', 'ngTable', 'ngSanitize', 'ngDraggable', 'common/services', 'common/directives', 'common/query/brand', 'common/query/address', 'common/query/return' , 'common/query/change' ,'common/query/component', 'common/query/order', 'common/query/purchase', 'common/query/invoice', 'common/query/property', 'common/query/kind', 'common/query/property', 'common/query/commodity', 'common/query/receipt', 'common/query/logistics' ,'angular-toaster', 'ui-jquery', 'jquery-uploadify','common/query/dateParse' , 'common/query/bankTransfer' ,'common/query/bankInfo', 'common/query/urlencryption', 'common/query/bill', 'common/query/makerDemand', 'common/query/goods', 'common/query/validtime', 'file-upload','file-upload-shim', 'common/query/slideImage', 'common/query/kindAdvice', 'common/query/responseLogistics', 'common/query/search','common/directives/dynamicInput', 'common/query/auditorMail', 'common/query/tradeBasicProperties', 'common/query/exchangeRate', 'common/query/tradeDeliveryDelayTime', 'common/query/payment', 'common/query/kindContrast', 'common/query/crawlTask', 'common/query/afterSale', 'common/query/refund', 'common/query/messageBoard', 'common/query/logisticsPort', 'common/query/storeInfo', 'common/query/cms', 'common/query/help', 'common/query/commonCount', 'common/module/store_admin_violations_module', 'common/query/internalMessage','common/query/user','common/query/secQuestion','common/query/keyWord','common/query/logUsage','common/query/seekQualityBuyer','common/query/loanApply', 'common/query/supplier', 'common/query/seekSalesman', 'common/query/b2bManage'], function(angularAMD) {
+ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ui-form', 'ngLocal', 'ngTable', 'ngSanitize', 'ngDraggable', 'common/services', 'common/directives', 'common/query/brand', 'common/query/address', 'common/query/return' , 'common/query/change' ,'common/query/component', 'common/query/order', 'common/query/purchase', 'common/query/invoice', 'common/query/property', 'common/query/kind', 'common/query/property', 'common/query/commodity', 'common/query/receipt', 'common/query/logistics' ,'angular-toaster', 'ui-jquery', 'jquery-uploadify','common/query/dateParse' , 'common/query/bankTransfer' ,'common/query/bankInfo', 'common/query/urlencryption', 'common/query/bill', 'common/query/makerDemand', 'common/query/goods', 'common/query/validtime', 'file-upload','file-upload-shim', 'common/query/slideImage', 'common/query/kindAdvice', 'common/query/responseLogistics', 'common/query/search','common/directives/dynamicInput', 'common/query/auditorMail', 'common/query/tradeBasicProperties', 'common/query/exchangeRate', 'common/query/tradeDeliveryDelayTime', 'common/query/payment', 'common/query/kindContrast', 'common/query/crawlTask', 'common/query/afterSale', 'common/query/refund', 'common/query/messageBoard', 'common/query/logisticsPort', 'common/query/storeInfo', 'common/query/cms', 'common/query/help', 'common/query/commonCount', 'common/module/store_admin_violations_module', 'common/query/internalMessage','common/query/user','common/query/secQuestion','common/query/keyWord','common/query/logUsage','common/query/seekQualityBuyer','common/query/loanApply', 'common/query/supplier', 'common/query/seekSalesman', 'common/query/b2bManage', 'common/query/adminNews'], function(angularAMD) {
 	'use strict';
 
 	 /**
@@ -8,7 +8,7 @@
 		 return this.length > 0 ? this[this.length - 1] : null;
 	 };
 
-	var app = angular.module('myApp', [ 'ui.router', 'ui.bootstrap', 'ui.form', 'ng.local', 'ngTable', 'ngSanitize', 'ngDraggable', 'common.services', 'common.directives', 'brandServices', 'addressServices', 'returnServices', 'changeServices', 'componentServices', 'orderServices', 'purchaseServices', 'invoiceServices', 'propertyServices', 'receiptServices', 'logisticsServices', 'common.query.kind', 'toaster','ui.jquery', 'commodityServices', 'dateparseServices', 'bankInfo' , 'bankTransfer', 'urlencryptionServices', 'billServices', 'makerDemand', 'goodsServices', 'validtimeServices', 'angularFileUpload', 'slideImageService', 'common.query.kindAdvice', 'responseLogisticsService', 'searchService', 'ngDynamicInput', 'ReviewerEmailInfoService', 'tradeBasicPropertiesServices', 'exchangeRateModule', 'tradeDeliveryDelayTimeModule', 'PaymentService', 'kindContrastServices', 'crawlTaskServices', 'afterSaleService', 'refundModule', 'messageBoardServices', 'logisticsPortService', 'storeInfoServices', 'cmsService', 'helpServices', 'commonCountServices', 'tool.directives', 'StoreAdminViolationsModule', 'internalMessageServices','common.query.user','secQuestionServices','keyWordServices','logUsageServices','seekQualityBuyerServices', 'loanApplyService', 'supplierServices', 'seekSalesmanServices', 'b2bManageService']);
+	var app = angular.module('myApp', [ 'ui.router', 'ui.bootstrap', 'ui.form', 'ng.local', 'ngTable', 'ngSanitize', 'ngDraggable', 'common.services', 'common.directives', 'brandServices', 'addressServices', 'returnServices', 'changeServices', 'componentServices', 'orderServices', 'purchaseServices', 'invoiceServices', 'propertyServices', 'receiptServices', 'logisticsServices', 'common.query.kind', 'toaster','ui.jquery', 'commodityServices', 'dateparseServices', 'bankInfo' , 'bankTransfer', 'urlencryptionServices', 'billServices', 'makerDemand', 'goodsServices', 'validtimeServices', 'angularFileUpload', 'slideImageService', 'common.query.kindAdvice', 'responseLogisticsService', 'searchService', 'ngDynamicInput', 'ReviewerEmailInfoService', 'tradeBasicPropertiesServices', 'exchangeRateModule', 'tradeDeliveryDelayTimeModule', 'PaymentService', 'kindContrastServices', 'crawlTaskServices', 'afterSaleService', 'refundModule', 'messageBoardServices', 'logisticsPortService', 'storeInfoServices', 'cmsService', 'helpServices', 'commonCountServices', 'tool.directives', 'StoreAdminViolationsModule', 'internalMessageServices','common.query.user','secQuestionServices','keyWordServices','logUsageServices','seekQualityBuyerServices', 'loanApplyService', 'supplierServices', 'seekSalesmanServices', 'b2bManageService','adminNewsService']);
 	app.init = function() {
 		angularAMD.bootstrap(app);
 	};
@@ -16,13 +16,13 @@
 	// ui-router 路由配置
 	app.config(['$stateProvider', '$urlRouterProvider', '$httpProvider', function($stateProvider, $urlRouterProvider, $httpProvider){
 		$urlRouterProvider.otherwise("/index");
-		$stateProvider.state('index', {
+		$stateProvider.state('index', angularAMD.route({
 			// 管理首页
 			url: '/index',
 			templateUrl : 'static/view/admin/index.html',
 			controller : '',
 			controllerUrl : ''
-		}).state('trade_purchase', angularAMD.route({
+		})).state('trade_purchase', angularAMD.route({
 			// 采购单管理
 			url: '/trade/purchase',
 			templateUrl : 'static/view/admin/trade/trade_purchase.html',
@@ -850,10 +850,26 @@
 		}]);
 	}]);
 
-	 app.run(['$rootScope', 'BaseService', function($rootScope, BaseService) {
+	app.run(['$rootScope', 'BaseService', '$location',  function($rootScope, BaseService, $location) {
 		 $rootScope.rootPath = BaseService.getRootPath();
 		 $rootScope.page = 'vendor';// 导航栏状态,'个人中心'状态激活
-	 }]);
+         $rootScope.$on('$stateChangeSuccess', function(evt, current, previous) {
+             var _url = $location.absUrl().toString()
+             if (_url.indexOf('/admin#/index') > -1) {
+                 $rootScope.newShow = true
+             } else {
+                 $rootScope.newShow = false
+			 }
+			 window.onmouseup = function() {
+                 var _url = $location.absUrl().toString()
+                 if (_url.indexOf('/admin#/index') > -1) {
+                     $rootScope.newShow = true
+                 } else {
+                     $rootScope.newShow = false
+                 }
+			 }
+         });
+     }]);
 	
 	// 状态码  -> 描述
 	app.filter('status', function(){
@@ -951,6 +967,96 @@
 	    });
 	}]);
 
+	// 消息
+     app.controller('adminNewsCtrl', ['$rootScope', '$location', '$scope', 'ngTableParams', 'adminNews', 'toaster', 'BaseService', '$filter', function ($rootScope, $location, $scope, ngTableParams, adminNews, toaster, BaseService, $filter) {
+         /**
+          * 分页获取消息
+          */
+         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 : '确认收款,付款申请,财务结算'
+         }, {
+             total : 0,
+             getData : function ($defer, params) {
+                 var param = BaseService.parseParams(params.url());
+                 param.keyword = $scope.keyword;
+                 adminNews.getNewsList(param, function (data) {
+                     params.total(data.totalElements);
+                     $defer.resolve(data.content);
+                     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.newsType = '付款申请'
+                         }
+                         if (item.type == "CONFIRM_PAID_TYPE") {
+                             item.newsType = '确认收款'
+                         }
+                         if (item.type == "FINANCIAL_SETTLEMENT_TYPE") {
+                             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);
+         });
+
+         /**
+          * 跳转消息详情页
+          */
+         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
+			 }
+             if (data.type == "CONFIRM_PAID_TYPE") {
+                 window.location.href = '/admin#/trade/order/' + enIdFilter(data.OrderNumber)
+             }
+             if (data.type == "FINANCIAL_SETTLEMENT_TYPE") {
+                 window.location.href = 'admin#/check/settlement#batchCheckMoney'
+             }
+             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);
+                 });
+             }, function(res){
+                 toaster.pop('error' + res.data);
+             });
+         }
+
+         /**
+          * 点击
+          */
+         // $scope.newShow = false
+         $rootScope.lookNews = function() {
+             $rootScope.newShow = !$rootScope.newShow
+         }
+     }]);
+
      //币别的过滤器
      app.filter('currencySysmbol', function() {
          return function(moneyParam, currency, add) {

+ 29 - 0
src/main/webapp/resources/js/common/query/adminNews.js

@@ -0,0 +1,29 @@
+define([ 'ngResource' ], function() {
+    angular.module('adminNewsService', [ 'ngResource' ]).factory('adminNews', ['$resource', function($resource) {
+        return $resource('webMessage', {}, {
+            /**
+             * 分页获取消息
+             */
+            getNewsList: {
+                url: 'webMessage/page',
+                method:'GET'
+            },
+
+            /**
+             * 获取未读消息数量
+             */
+            unreadCount: {
+                url: 'webMessage/count/unread',
+                method:'GET'
+            },
+
+            /**
+             * 跳转消息详情页
+             */
+            read: {
+                url: 'webMessage/read',
+                method:'POST'
+            }
+        });
+    }])
+});

+ 11 - 1
src/main/webapp/resources/js/usercenter/app.js

@@ -715,7 +715,6 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
      */
     app.controller('UserCenterHeaderCtrl', ['$scope', '$rootScope', 'BaseService', 'InternalMessage', '$http', 'toaster', function ($scope, $rootScope, BaseService, InternalMessage, $http, toaster) {
 		$scope.homeUrl = BaseService.getRootPath();
-        console.info($rootScope.userInfo);
         InternalMessage.getUrl({}, function(data) {
             var url = data.url;
             if (url == "http://218.17.158.219:24000/message") {
@@ -781,5 +780,16 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
 		}
 	});
 
+    // 查看发票信息
+    app.controller('invoiceInfoCtrl', ['$scope','$modalInstance', 'ChooseInvoice', 'source', function ($scope, $modalInstance, ChooseInvoice, source) {
+        $scope.chooseInvoice = ChooseInvoice
+        $scope.chooseInvoice.billInfo = angular.fromJson($scope.chooseInvoice.billInfo);
+        $scope.isUserCenter = source
+        console.log($scope.chooseInvoice, '$scope.ChooseInvoice')
+        $scope.closeInvoice = function () {
+            $modalInstance.close();
+        };
+    }]);
+
 	return app;
 });

+ 26 - 1
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_invoice_record_ctrl.js

@@ -1,6 +1,6 @@
 define([ 'app/app' ], function(app) {
     'use strict';
-    app.register.controller('buyerInvoiceRecordCtrl', ['$scope','$rootScope','$modal','BillSubmit','BaseService', 'toaster','ngTableParams', function ($scope, $rootScope, $modal, BillSubmit, BaseService, toaster, ngTableParams) {
+    app.register.controller('buyerInvoiceRecordCtrl', ['$scope','$rootScope','$modal','BillSubmit','BaseService', 'toaster','ngTableParams','$filter', function ($scope, $rootScope, $modal, BillSubmit, BaseService, toaster, ngTableParams, $filter) {
         $scope.tab = 'buyer_invoice-record';
         // 开票申请
         $scope.keyword = '';
@@ -56,6 +56,7 @@ define([ 'app/app' ], function(app) {
                         $defer.resolve(page.content);
                         //划分数据
                         $scope.billData = page.content;
+                        console.log($scope.billData, 'data')
                     }, function (response) {
                         toaster.pop('error', '获取开票记录失败 ', response.data);
                     });
@@ -74,5 +75,29 @@ define([ 'app/app' ], function(app) {
                 $scope.searchByKey();
             }
         }
+        // 加密订单的ID过滤器
+        var enIdFilter = $filter('EncryptionFilter');
+
+        /**
+         * 查看发票信息
+         */
+        $scope.lookInvoiceInfo = function(invoice) {
+            var modalInstance = $modal.open({
+                templateUrl : 'static/view/vendor/modal/invoice_look_modal.html',
+                size : 'md',
+                controller : 'invoiceInfoCtrl',
+                resolve : {
+                    ChooseInvoice: function() {
+                        return invoice
+                    },
+                    source: function() {
+                        return true
+                    }
+                }
+            });
+            modalInstance.result.then(function(){
+            }, function(){
+            });
+        }
     }]);
 });

+ 4 - 1
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_no_invoice_ctrl.js

@@ -1,6 +1,6 @@
 define([ 'app/app' ], function(app) {
     'use strict';
-    app.register.controller('NoInvoiceCtrl', ['$scope','$rootScope','$modal', 'Order', 'toaster','ngTableParams','BaseService','Bill', function ($scope, $rootScope, $modal, Order, toaster, ngTableParams, BaseService, Bill) {
+    app.register.controller('NoInvoiceCtrl', ['$scope','$rootScope','$modal', 'Order', 'toaster','ngTableParams','BaseService','Bill','$filter', function ($scope, $rootScope, $modal, Order, toaster, ngTableParams, BaseService, Bill, $filter) {
         $scope.tab = 'buyer_no_invoice';
         document.title = '未开票订单-优软商城';
         // 开票申请
@@ -124,6 +124,9 @@ define([ 'app/app' ], function(app) {
             $scope.isAllCheck = temAllCheck;
         }
 
+        // 加密订单的ID过滤器
+        var enIdFilter = $filter('EncryptionFilter');
+
     }]);
     app.register.controller('NoInvoiceSubmitCtrl', ['$scope','$rootScope','$modal', 'Order', 'toaster', 'submitInvoice', '$modalInstance','invoiceData','BillSubmit','$state', function ($scope, $rootScope, $modal, Order, toaster, submitInvoice, $modalInstance, invoiceData, BillSubmit, $state) {
         //公司列表

+ 11 - 1
src/main/webapp/resources/js/vendor/app.js

@@ -1121,7 +1121,6 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
 	});
 
 	app.controller('editPictureCtrl', ['$scope', 'pic', '$modalInstance', function ($scope, pic, $modalInstance) {
-		console.log('log');
 		$scope.pic = pic;
 		$scope.cancel = function () {
 			$modalInstance.close();
@@ -1303,5 +1302,16 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
     }
 
   }]);
+
+  // 查看发票信息
+  app.controller('invoiceInfoCtrl', ['$scope','$modalInstance', 'ChooseInvoice', 'source', function ($scope, $modalInstance, ChooseInvoice, source) {
+  		$scope.chooseInvoice = ChooseInvoice
+      	$scope.chooseInvoice.billInfo = angular.fromJson($scope.chooseInvoice.billInfo);
+	  	$scope.isUserCenter = source
+	  	console.log($scope.chooseInvoice, '$scope.ChooseInvoice')
+		$scope.closeInvoice = function () {
+			$modalInstance.close();
+		};
+    }]);
 	return app;
 });

+ 27 - 1
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_invoice_ctrl.js

@@ -1,6 +1,6 @@
 define([ 'app/app' ], function(app) {
     'use strict';
-    app.register.controller('vendorInvoiceCtrl', ['$scope','$rootScope','$modal','BillSubmit','BaseService', 'toaster','ngTableParams','$state', function ($scope, $rootScope, $modal, BillSubmit, BaseService, toaster, ngTableParams, $state) {
+    app.register.controller('vendorInvoiceCtrl', ['$scope','$rootScope','$modal','BillSubmit','BaseService', 'toaster','ngTableParams','$state','$filter', function ($scope, $rootScope, $modal, BillSubmit, BaseService, toaster, ngTableParams, $state, $filter) {
         $rootScope.active = 'vendor_invoice';
         // 切换tab
         document.title = '卖家发票管理-优软商城';
@@ -65,6 +65,7 @@ define([ 'app/app' ], function(app) {
                         $defer.resolve(page.content);
                         //划分数据
                         $scope.billData = page.content;
+                        console.log($scope.billData, '111')
                         //初始化选中状态和地址信息
                         $scope.isAllCheck = false;
                         angular.forEach($scope.billData, function (item) {
@@ -170,5 +171,30 @@ define([ 'app/app' ], function(app) {
             })
         }
 
+        // 加密订单的ID过滤器
+        var enIdFilter = $filter('EncryptionFilter');
+
+
+        /**
+         * 查看发票信息
+         */
+        $scope.lookInvoiceInfo = function(invoice) {
+            var modalInstance = $modal.open({
+                templateUrl : 'static/view/vendor/modal/invoice_look_modal.html',
+                size : 'md',
+                controller : 'invoiceInfoCtrl',
+                resolve : {
+                    ChooseInvoice: function() {
+                        return invoice
+                    },
+                    source: function() {
+                        return false
+                    }
+                }
+            });
+            modalInstance.result.then(function(){
+            }, function(){
+            });
+        }
     }]);
 });

+ 139 - 0
src/main/webapp/resources/view/admin/modal/admin_news_modal.html

@@ -0,0 +1,139 @@
+<style>
+	#msg{
+		position: relative;
+	}
+	#msg .message{
+		position: absolute;
+		top: -46px;
+		right: 45px;
+		width: 78px;
+		height: 26px;
+		line-height: 26px;
+		text-align: center;
+		font-size: 12px;
+		color: #fff;
+		background-color: #31a5e7;
+		border-radius: 4px;
+		cursor: pointer;
+	}
+	#msg .message .red-dot {
+		position: absolute;
+		top: -2px;
+		right: -8px;
+		width: 18px;
+		height: 18px;
+		line-height: 18px;
+		font-size: 12px;
+		color: #fff;
+		border-radius: 50%;
+		background: #f00;
+	}
+	#msg .message:hover .angle-hover-up{
+		-webkit-transform: rotateZ(180deg);
+		-moz-transform: rotateZ(180deg);
+		-o-transform: rotateZ(180deg);
+		-ms-transform: rotateZ(180deg);
+		transform: rotateZ(180deg);
+	}
+	#msg .msg-show{
+		position: absolute;
+		top: -20px;
+		right: 42px;
+		z-index: 1000;
+		background-color: #ffffff;
+		border-radius: 4px;
+		border: solid 1px #31a5e7;
+	}
+	#msg .msg-show table{
+		width: 1350px;
+		table-layout: fixed;
+	}
+	#msg .msg-show table thead{
+		width: 100%;
+		height: 45px;
+		background-color: rgba(49, 165, 231, 0.1);
+		border-radius: 4px;
+	}
+	#msg .msg-show table tr th{
+		height: 45px;
+	}
+	#msg .msg-show table tr th,.main-container .msg-show table tr td{
+		vertical-align: middle;
+		font-weight: normal;
+		position:relative;
+		text-align: center;
+	}
+	#msg .msg-show table tr th b{
+		position: absolute;
+		top: 13px;
+		left: 0;
+		width: 1px;
+		height: 20px;
+		border: solid 1px #bfbfbf;
+	}
+	#msg .msg-show table tr th.choose-type .all-type {
+		cursor: pointer;
+	}
+	#msg .msg-show table tr th.choose-type .dropdown-menu{
+		position: absolute;
+		top: 30px;
+		left: 45px;
+		z-index: 1000;
+		display: none;
+		float: left;
+		font-size: 14px;
+		border-radius: 4px;
+		-webkit-box-shadow: 0 6px 12px rgba(0,0,0,0.175);
+		box-shadow: 0 6px 12px rgba(0,0,0,0.175);
+		-webkit-background-clip: padding-box;
+		background-clip: padding-box;
+		width: 100px;
+		height: 78px;
+		background-color: #ffffff;
+		border: solid 1px #d2d2d2;
+	}
+	#msg .msg-show table tr th.choose-type .dropdown-menu li{
+		width: 100%;
+		height: 25px;
+		line-height: 25px;
+		text-align: center;
+		font-size: 14px;
+		color: #333;
+	}
+	#msg .msg-show table tbody tr{
+		border-bottom: 1px solid #dcdcdc;
+	}
+	#msg .msg-show table tbody tr td{
+		padding: 10px 0;
+	}
+</style>
+<div id="msg" ng-controller="adminNewsCtrl">
+	<span class="message" ng-click="lookNews($data)">待处理 <i class="fa fa-angle-double-down angle-hover-up"></i><span class="red-dot">99</span></span>
+	<div class="msg-show">
+		<table ng-table="newsTableParams">
+			<thead>
+			<tr>
+				<th width="250" class="choose-type">
+					<span class="all-type dropdown-toggle">全部类型 <i class="fa fa-angle-double-down angle-hover-up"></i></span>
+					<ul class="dropdown-menu">
+						<li><a>确认收款</a></li>
+						<li><a>付款申请</a></li>
+						<li><a>财务结算</a></li>
+					</ul>
+				</th>
+				<th width="500"><b></b>任务描述</th>
+				<th width="400"><b></b>发起人</th>
+				<th width="auto"><b></b>发起时间</th>
+			</tr>
+			</thead>
+			<tbody>
+			<tr ng-repeat="news in $data">
+				<td><span ng-bind="news.type">确认收款</span></td>
+				<td><span ng-bind-html="news.content">订单 <a href="">SS2018070500000035</a> 买家已付款成功,请确认是否收款成功!</span></td>
+				<td><span ng-bind="news.sendUserName">深圳市华商龙科技商龙科技商龙科技有限公司(采购商名称)</span></td>
+				<td><span>{{news.createTime | date:'yyyy-MM-dd HH:mm:ss'}}</span></td>
+			</tr>
+			</tbody>
+		</table>
+	</div>
+</div>

+ 156 - 0
src/main/webapp/resources/view/admin/news.html

@@ -0,0 +1,156 @@
+<style>
+	#msg{
+		position: relative;
+	}
+	#msg .message{
+		position: absolute;
+		top: -46px;
+		right: 45px;
+		width: 78px;
+		height: 26px;
+		line-height: 26px;
+		text-align: center;
+		font-size: 12px;
+		color: #fff;
+		background-color: #31a5e7;
+		border-radius: 4px;
+		cursor: pointer;
+	}
+	#msg .message .red-dot {
+		position: absolute;
+		top: -2px;
+		right: -8px;
+		width: 18px;
+		height: 18px;
+		line-height: 18px;
+		font-size: 12px;
+		color: #fff;
+		border-radius: 50%;
+		background: #f00;
+	}
+	#msg .message:hover .angle-hover-up{
+		-webkit-transform: rotateZ(180deg);
+		-moz-transform: rotateZ(180deg);
+		-o-transform: rotateZ(180deg);
+		-ms-transform: rotateZ(180deg);
+		transform: rotateZ(180deg);
+	}
+	#msg .msg-show{
+		position: absolute;
+		top: -20px;
+		right: 42px;
+		z-index: 1000;
+		background-color: #ffffff;
+		border-radius: 4px;
+		border: solid 1px #31a5e7;
+	}
+	#msg .msg-show table{
+		width: 850px;
+		table-layout: fixed;
+	}
+	#msg .msg-show table thead{
+		width: 100%;
+		height: 45px;
+		background-color: rgba(49, 165, 231, 0.1);
+		border-radius: 4px;
+	}
+	#msg .msg-show table tr th{
+		height: 45px;
+	}
+	#msg .msg-show table tr th,.main-container .msg-show table tr td{
+		vertical-align: middle;
+		font-weight: normal;
+		position:relative;
+		text-align: center;
+	}
+	#msg .msg-show table tr th b{
+		position: absolute;
+		top: 13px;
+		left: 0;
+		width: 1px;
+		height: 20px;
+		border: solid 1px #bfbfbf;
+	}
+	#msg .msg-show table tr th.choose-type .all-type {
+		cursor: pointer;
+	}
+	#msg .msg-show table tr th.choose-type .dropdown-menu{
+		position: absolute;
+		top: 30px;
+		left: 45px;
+		z-index: 1000;
+		display: none;
+		float: left;
+		font-size: 14px;
+		border-radius: 4px;
+		-webkit-box-shadow: 0 6px 12px rgba(0,0,0,0.175);
+		box-shadow: 0 6px 12px rgba(0,0,0,0.175);
+		-webkit-background-clip: padding-box;
+		background-clip: padding-box;
+		width: 100px;
+		height: 78px;
+		background-color: #ffffff;
+		border: solid 1px #d2d2d2;
+	}
+	#msg .msg-show table tr th.choose-type .dropdown-menu li{
+		width: 100%;
+		height: 25px;
+		line-height: 25px;
+		text-align: center;
+		font-size: 14px;
+		color: #333;
+	}
+	#msg .msg-show table tbody tr{
+		border-bottom: 1px solid #dcdcdc;
+	}
+	#msg .msg-show table tbody tr td{
+		padding: 10px 0;
+	}
+    #msg .msg-show table tbody tr td span{
+        display: inline-block;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        text-align: center;
+        width: 98%;
+    }
+    #msg .msg-show .ng-table-pager {
+        overflow: hidden;
+        margin-top: 15px;
+    }
+</style>
+<div id="msg" ng-controller="adminNewsCtrl">
+	<span class="message" ng-click="lookNews()">待处理 <i class="fa fa-angle-double-down angle-hover-up"></i><span class="red-dot" ng-bind="unreadCount">99</span></span>
+	<div class="msg-show" ng-show="newShow">
+		<table ng-table="newsTableParams">
+			<thead>
+			<tr>
+				<th width="110" class="choose-type">
+					<span class="all-type dropdown-toggle">全部类型 <i class="fa fa-angle-double-down angle-hover-up"></i></span>
+					<ul class="dropdown-menu">
+						<li><a>确认收款</a></li>
+						<li><a>付款申请</a></li>
+						<li><a>财务结算</a></li>
+					</ul>
+				</th>
+				<th width="400"><b></b>任务描述</th>
+				<th width="200"><b></b>发起人</th>
+				<th width="auto"><b></b>发起时间</th>
+			</tr>
+			</thead>
+			<tbody ng-if="$data">
+			<tr ng-repeat="news in $data">
+				<td><span ng-bind="news.newsType">确认收款</span></td>
+				<td ng-click="jumpNewsDetail(news)" style="cursor: pointer;"><span ng-bind-html="news.content" title="{{news.content}}">订单 <a>SS2018070500000035</a> 买家已付款成功,请确认是否收款成功!</span></td>
+				<td><span ng-bind="news.sendUserName" title="{{news.sendUserName}}">深圳市华商龙科技商龙科技商龙科技有限公司(采购商名称)</span></td>
+				<td><span title="{{news.createTime | date:'yyyy-MM-dd HH:mm:ss'}}">{{news.createTime | date:'yyyy-MM-dd HH:mm:ss'}}</span></td>
+			</tr>
+			</tbody>
+            <tbody ng-if="$data.length == 0">
+            <tr>
+                <td colspan="4">暂无消息</td>
+            </tr>
+            </tbody>
+		</table>
+	</div>
+</div>

+ 19 - 3
src/main/webapp/resources/view/usercenter/forstore/buyer_invoice_record.html

@@ -43,6 +43,19 @@
         vertical-align: middle;
         text-align: center;
     }
+    .invoice-com-tab tbody>tr>td:hover a{
+        color: #5078cb;
+    }
+    .invoice-com-tab tbody>tr:hover>td b.invoice-info{
+        display: block;
+    }
+    .invoice-com-tab tbody>tr>td b.invoice-info{
+        display: none;
+        font-size: 12px;
+        font-weight: normal;
+        color: #5078cb;
+        cursor: pointer;
+    }
     .invoice-com-tab thead>tr>th.select-line{
         padding: 8px 0;
     }
@@ -196,12 +209,15 @@
                     <tbody>
                         <tr ng-repeat="item in billData">
                             <td ng-bind="item.createTime | date : 'yyyy-MM-dd'"></td>
-                            <td ng-bind="item.sellername"></td>
+                            <td><a ng-href="{{'store/' + item.storeid}}" ng-bind="item.sellername" target="_blank"></a></td>
                             <td>
-                                <span style="display: block" ng-repeat="orderid in item.orderids.split(',')" ng-bind="orderid"></span>
+                                <a ng-href="user#/order/detail/{{orderid | EncryptionFilter}}" ng-repeat="orderid in item.orderids.split(',')" ng-bind="orderid" target="_blank"></a>
                             </td>
                             <td ng-bind="item.price"></td>
-                            <td ng-bind="item.invoicetype==1206?'普票':'专票'"></td>
+                            <td style="padding: 0;">
+                                <span ng-bind="item.invoicetype==1206?'普票':'专票'"></span>
+                                <b ng-click="lookInvoiceInfo(item)" class="invoice-info">开票信息</b>
+                            </td>
                             <td ng-bind="item.invoicetitle"></td>
                             <td ng-bind="item.receiverName"></td>
                             <td ng-bind="item.recTel"></td>

+ 5 - 2
src/main/webapp/resources/view/usercenter/forstore/buyer_no_invoice.html

@@ -60,6 +60,9 @@
     vertical-align: middle;
     text-align: center;
 }
+.invoice-com-tab tbody>tr>td:hover a {
+    color: #5078cb;
+}
 /*无记录与记录条数*/
 .table>tbody>tr.record-num td{
     padding: 0;
@@ -255,9 +258,9 @@ body div.ng-table-pager a.page-a {
                                     <label for={{$index+1}}></label>
                                 </lable>
                             </td>
-                            <td ng-bind="item.storeName"></td>
+                            <td><a ng-href="{{'store/' + item.storeid}}" ng-bind="item.storeName" target="_blank"></a></td>
                             <td>
-                                <span style="display: block" ng-repeat="orderid in item.orderid.split(',')" ng-bind="orderid"></span>
+                                <a ng-href="user#/order/detail/{{orderid | EncryptionFilter}}" ng-repeat="orderid in item.orderid.split(',')" ng-bind="orderid" target="_blank"></a>
                             </td>
                             <td ng-bind="item.price"></td>
                         </tr>

+ 25 - 4
src/main/webapp/resources/view/vendor/forstore/vendor-invoice.html

@@ -60,6 +60,19 @@
         vertical-align: middle;
         text-align: center;
     }
+    .invoice-com-tab tbody>tr>td:hover a{
+        color: #5078cb;
+    }
+    .invoice-com-tab tbody>tr:hover>td b.invoice-info{
+        display: block;
+    }
+    .invoice-com-tab tbody>tr>td b.invoice-info{
+        display: none;
+        font-size: 12px;
+        font-weight: normal;
+        color: #5078cb;
+        cursor: pointer;
+    }
     /*无记录与记录条数*/
     .table>tbody>tr.record-num td{
         padding: 0;
@@ -342,10 +355,15 @@
                         </td>
                         <td ng-bind="item.createTime | date : 'yyyy-MM-dd'"></td>
                         <td>
-                            <span style="display: block" ng-repeat="orderid in item.orderids.split(',')" ng-bind="orderid"></span>
+                            <div>{{orderid}}</div>
+                            <!--<a ng-href="vendor#/purchase/detail/{{orderid | EncryptionFilter}}" ng-repeat="orderid in item.orderids.split(',')" ng-bind="orderid"></a>-->
+                            <a ng-repeat="orderid in item.orderids.split(',')" ng-bind="orderid" style="cursor: default"></a>
                         </td>
                         <td ng-bind="item.price"></td>
-                        <td ng-bind="item.invoicetype==1206?'普票':'专票'"></td>
+                        <td style="padding: 0;">
+                            <span ng-bind="item.invoicetype==1206?'普票':'专票'"></span>
+                            <b ng-click="lookInvoiceInfo(item)" class="invoice-info">开票信息</b>
+                        </td>
                         <td ng-bind="item.invoicetitle"></td>
                         <td ng-bind="item.receiverName"></td>
                         <td class="address" title="{{item.area+'&#10;'+item.detailAddr}}">
@@ -403,10 +421,13 @@
                 <tr ng-repeat="item in billData track by $index">
                     <td ng-bind="item.createTime | date : 'yyyy-MM-dd'"></td>
                     <td>
-                        <span style="display: block" ng-repeat="orderid in item.orderids.split(',')" ng-bind="orderid"></span>
+                        <!--<a ng-href="vendor#/purchase/detail/{{orderid | EncryptionFilter}}" ng-repeat="orderid in item.orderids.split(',')" ng-bind="orderid" target="_blank"></a>-->
+                        <a ng-repeat="orderid in item.orderids.split(',')" ng-bind="orderid" style="cursor: default"></a>
                     </td>
                     <td ng-bind="item.price"></td>
-                    <td ng-bind="item.invoicetype==1206?'普票':'专票'"></td>
+                    <td style="padding: 0;">
+                        <span ng-bind="item.invoicetype==1206?'普票':'专票'"></span>
+                        <b ng-click="lookInvoiceInfo(item)" class="invoice-info">开票信息</b></td>
                     <td ng-bind="item.invoicetitle"></td>
                     <td ng-bind="item.receiverName"></td>
                     <td class="address" title="{{item.area+'&#10;'+item.detailAddr}}">

+ 146 - 0
src/main/webapp/resources/view/vendor/modal/invoice_look_modal.html

@@ -0,0 +1,146 @@
+<style>
+  .modal-backdrop{
+    background-color: transparent;
+  }
+  .modal-dialog{
+    width: 495px;
+    background-color: #ffffff;
+    box-shadow: 0px 5px 5px 0px
+    rgba(187, 186, 186, 0.75);
+    border-radius: 5px;
+  }
+  .modal-header{
+    overflow: hidden;
+    width: 495px;
+    height: 36px;
+    background-color: #5078cb;
+    border-radius: 5px 5px 0 0;
+  }
+  .modal-header .modal-title{
+    float: left;
+    line-height: 10px;
+    font-size: 14px;
+    font-weight: bold;
+    color: #ffffff;
+  }
+  .modal-header .close{
+    line-height: 10px;
+    font-size: 20px;
+    color: #fff;
+    opacity: .8;
+  }
+  .modal-body {
+    width: 100%;
+    margin: 0 auto;
+    text-align: center;
+  }
+  .modal-body .item-list{
+    width: 460px;
+    min-height: 27px;
+    line-height: 21px;
+    margin-bottom: 5px;
+    overflow: hidden;
+  }
+  .modal-body .item-list:first-child {
+    line-height: 27px;
+    background-color: #fff2e7;
+    border-radius: 3px;
+    border: solid 1px #fea55d;
+    max-height: 138px;
+    overflow-y: scroll
+  }
+  .modal-body .item-list:first-child a{
+    display: inline-block;
+    float: left;
+    font-size: 14px;
+    color: #5078cb;
+    text-align: left;
+  }
+  .modal-body .item-list:first-child a:nth-child(odd){
+    margin-right: 25px;
+  }
+  .modal-body .item-list:first-child span{
+    color: #6c3000 !important ;
+  }
+  .modal-body .item-list span{
+    display: inline-block;
+    float: left;
+    font-size: 14px;
+  }
+  .modal-body .item-list span:first-child{
+    margin-right: 18px;
+    width: 100px;
+    color: #666;
+    text-align: right;
+  }
+  .modal-body .item-list span:last-child{
+    width: 320px;
+    color: #333;
+    text-align: left;
+    word-break: break-all;
+  }
+  .modal-body .item-list span.red{
+    color: #f30606;
+  }
+  .modal-footer {
+    text-align: center;
+  }
+  .modal-footer .btn{
+    width: 64px;
+    height: 25px;
+    line-height: 14px;
+    font-size: 14px;
+    color: #fff;
+    background-color: #5078cb;
+  }
+</style>
+<!--开票信息-->
+<div class="modal-header">
+  <h3 class="modal-title">开票信息</h3>
+  <span class="close" ng-click="closeInvoice()">&times;</span>
+</div>
+<div class="modal-body">
+  <div class="item-list">
+    <span>订单号:</span>
+    <span>
+      <a ng-if="isUserCenter" ng-href="user#/order/detail/{{orderid | EncryptionFilter}}" ng-repeat="orderid in chooseInvoice.orderids.split(',')" ng-bind="orderid || '-'" target="_blank">965666768973953454654</a>
+      <a ng-if="!isUserCenter" ng-repeat="orderid in chooseInvoice.orderids.split(',')" ng-bind="orderid || '-'" style="cursor: default">965666768973953454654</a>
+    </span>
+  </div>
+  <div class="item-list">
+    <span>开票金额:</span><span class="red" ng-bind="'¥' + chooseInvoice.price || '-'">¥965432.00</span>
+  </div>
+  <div class="item-list">
+    <span>发票类:</span><span ng-bind="chooseInvoice.invoicetype==1206?'增值税普票(不可抵扣)':'增值税专票(可抵扣)'">增值税专票(可抵扣)</span>
+  </div>
+  <div class="item-list" ng-hide="chooseInvoice.invoicetype==1206">
+    <span>发票抬头:</span><span ng-bind="chooseInvoice.invoicetitle || '-'">深圳市优软商城有限公司</span>
+  </div>
+  <div class="item-list" ng-hide="chooseInvoice.invoicetype==1206">
+    <span>单位地址:</span><span ng-bind="chooseInvoice.billInfo.detailAddress || '-'">深圳市家具卡卡卡卡卡卡阿里看斗罗大陆领深圳市家具卡卡卡卡卡卡阿里看斗罗大陆领</span>
+  </div>
+  <div class="item-list" ng-hide="chooseInvoice.invoicetype==1206">
+    <span>单位电话:</span><span ng-bind="chooseInvoice.billInfo.companyPhone || '-'">125698596566556"</span>
+  </div>
+  <div class="item-list" ng-hide="chooseInvoice.invoicetype==1206">
+    <span>税务登记号:</span><span ng-bind="chooseInvoice.billInfo.companyTaxNumber || '-'">45269859633566566</span>
+  </div>
+  <div class="item-list" ng-hide="chooseInvoice.invoicetype==1206">
+    <span>开户银行:</span><span ng-bind="chooseInvoice.billInfo.bankName || '-'">交通银行</span>
+  </div>
+  <div class="item-list" ng-hide="chooseInvoice.invoicetype==1206">
+    <span>开户银行账号:</span><span ng-bind="chooseInvoice.billInfo.bankAccount || '-'">74859665263366666</span>
+  </div>
+  <div class="item-list"><span>收票人:</span>
+    <span ng-bind="chooseInvoice.receiverName || '-'">哈哈哈哈</span>
+  </div>
+  <div class="item-list"><span>联系电话:</span>
+    <span ng-bind="chooseInvoice.recTel || '-'">526669666666</span>
+  </div>
+  <div class="item-list"><span>收票地址:</span>
+    <span ng-bind="chooseInvoice.invoiceAddress || '-'">北京市开始看锁库锁库开始看看书快送看扩所扩扩扩加上考锁库锁库开始看20号</span>
+  </div>
+</div>
+<div class="modal-footer">
+  <span class="btn" ng-click="closeInvoice()">关闭</span>
+</div>