Browse Source

Merge remote-tracking branch 'origin/release-201819-wangcz' into release-201819-wangcz

yujia 7 years ago
parent
commit
f7877d56bd

+ 4 - 0
src/main/java/com/uas/platform/b2c/common/search/constant/SearchUrl.java

@@ -98,6 +98,10 @@ public class SearchUrl {
      */
     public static final String SIMILAR_COMPONENT_URL = "/search/similarComponents?keyword={keyword}";
 
+    /**
+     * 根据关键字联想产品
+     */
+    public static final String SIMILAR_PRODUCTS_URL = "/search/similarProducts?keyword={keyword}";
 
     /**
      * 根据关键字联想品牌

+ 2 - 1
src/main/java/com/uas/platform/b2c/common/search/rpc/service/Impl/SearchServiceImpl.java

@@ -291,7 +291,8 @@ public class SearchServiceImpl implements SearchService{
         String result;
         switch (type) {
             case COMPONENT:
-                result = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.SIMILAR_COMPONENT_URL, String.class, map);
+                result = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.SIMILAR_PRODUCTS_URL, String.class, map);
+                result = result.replaceAll("pcmpcode","code");
                 break;
             case BRAND:
                 result = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.SIMILAR_BRAND_URL, String.class, map);

+ 6 - 0
src/main/java/com/uas/platform/b2c/common/search/service/impl/SearcherServiceImpl.java

@@ -297,6 +297,12 @@ public class SearcherServiceImpl implements SearcherService {
         return resultMap;
     }
 
+    /**
+     * 根据类目名称搜索供应商列表(现货,期货)
+     * @param keyword
+     * @param page
+     * @return
+     */
     @Override
     public ModelMap getEnterpriseBySearchKind(String keyword, PageParams page) {
         ModelMap resultMap = new ModelMap();

+ 6 - 2
src/main/java/com/uas/platform/b2c/trade/vendor/model/VendorIntroduction.java

@@ -260,7 +260,11 @@ public class VendorIntroduction {
         vendorIntroduction.setEnTel(enterprise.getEnTel());
         vendorIntroduction.setEnCorporation(enterprise.getEnCorporation());
         vendorIntroduction.setEnLogoUrl(enterprise.getEnLogoUrl());
-        vendorIntroduction.setIsStore(enterprise.getEnMallVendorStatus().intValue() ==  313 ? new Short("1") : 0);
-        return vendorIntroduction;
+        if (null == enterprise.getEnMallVendorStatus()) {
+            vendorIntroduction.setIsStore(new Short((short)0));
+        } else {
+            vendorIntroduction.setIsStore(enterprise.getEnMallVendorStatus().intValue() ==  313 ? new Short("1") : 0);
+        }
+       return vendorIntroduction;
     }
 }

+ 31 - 25
src/main/webapp/resources/js/admin/app.js

@@ -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();
+		 }
+
      }]);
 
      //币别的过滤器

+ 2 - 2
src/main/webapp/resources/js/common/controllers/commonCtrls.js

@@ -358,11 +358,11 @@ define([ 'app/app' ], function(app) {
 				if(event.keyCode == 40) { //监听到按下键
 					$scope.selectIndex ++;
 					if($scope.selectIndex >= $scope.associates.length) $scope.selectIndex = 0;
-					$scope.keyword = $scope.associates[$scope.selectIndex];
+					$scope.keyword = $scope.associates[$scope.selectIndex].code || $scope.associates[$scope.selectIndex].nameCn || $scope.associates[$scope.selectIndex].name ||$scope.associates[$scope.selectIndex];
 				} else if(event.keyCode == 38) { //监听到按上键
 					$scope.selectIndex --;
 					if($scope.selectIndex < 0) $scope.selectIndex = $scope.associates.length - 1;
-					$scope.keyword = $scope.keyword = $scope.associates[$scope.selectIndex];
+          $scope.keyword = $scope.associates[$scope.selectIndex].code || $scope.associates[$scope.selectIndex].nameCn || $scope.associates[$scope.selectIndex].name ||$scope.associates[$scope.selectIndex];
 				} else if(event.keyCode == 13) { //确定键
 					$scope.search();
 				}

+ 2 - 1
src/main/webapp/resources/js/common/query/adminNews.js

@@ -6,7 +6,8 @@ define([ 'ngResource' ], function() {
              * 分页获取消息
              */
             getNewsList: {
-                url: rootPath + '/webMessage/page',
+                // url: rootPath + '/webMessage/page',
+                url: rootPath + '/adminToDo/page',
                 method:'GET'
             },
 

+ 14 - 13
src/main/webapp/resources/view/admin/news.html

@@ -77,12 +77,12 @@
 	#msg .msg-show table tr th.choose-type .all-type {
 		cursor: pointer;
 	}
-	#msg .msg-show table tr th.choose-type .dropdown-menu{
+	#msg .msg-show table tr th.choose-type .dropdown-menus{
 		position: absolute;
-		top: 30px;
-		left: 45px;
+		top: 32px;
+		left: 5px;
 		z-index: 1000;
-		display: none;
+		/*display: none;*/
 		float: left;
 		font-size: 14px;
 		border-radius: 4px;
@@ -95,13 +95,14 @@
 		background-color: #ffffff;
 		border: solid 1px #d2d2d2;
 	}
-	#msg .msg-show table tr th.choose-type .dropdown-menu li{
+	#msg .msg-show table tr th.choose-type .dropdown-menus li{
 		width: 100%;
 		height: 25px;
 		line-height: 25px;
 		text-align: center;
 		font-size: 14px;
 		color: #333;
+		list-style: none;
 	}
 	#msg .msg-show table tbody tr{
 		border-bottom: 1px solid #dcdcdc;
@@ -135,11 +136,11 @@
 			<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>
+					<span class="all-type dropdown-toggle" ng-click="openType()">全部类型 <i class="fa fa-angle-double-down angle-hover-up"></i></span>
+					<ul class="dropdown-menus" ng-if="showType">
+						<li ng-click="chooseType('CONFIRM_PAID_TYPE')"><a>确认收款</a></li>
+						<li ng-click="chooseType('APPLY_PAID_TYPE')"><a>付款申请</a></li>
+						<li ng-click="chooseType('FINANCIAL_SETTLEMENT_TYPE')"><a>财务结算</a></li>
 					</ul>
 				</th>
 				<th width="400"><b></b>任务描述</th>
@@ -150,9 +151,9 @@
 			<tbody ng-if="$data">
 			<tr ng-repeat="news in $data">
 				<td><span ng-bind="news.newsType">确认收款</span></td>
-				<td ng-click="jumpNewsDetail(news)" class="hover-color"><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>
+				<td ng-click="jumpNewsDetail(news)" class="hover-color"><span ng-bind-html="news.message" title="{{news.message}}"></span></td>
+				<td><span ng-bind="news.applyname" title="{{news.applyname}}">深圳市华商龙科技商龙科技商龙科技有限公司(采购商名称)</span></td>
+				<td><span title="{{news.applytime | date:'yyyy-MM-dd HH:mm:ss'}}">{{news.applytime | date:'yyyy-MM-dd HH:mm:ss'}}</span></td>
 			</tr>
 			</tbody>
             <tbody ng-if="$data.length == 0">