Browse Source

企业圈页面显示修改,全部合作伙伴搜索优化,供应商和客户列表排序改为依据最后一次邀请时间。

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@9157 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
dongbw 8 years ago
parent
commit
4a9419a673

+ 10 - 11
src/main/java/com/uas/platform/b2b/controller/InvitationRecordController.java

@@ -1,14 +1,5 @@
 package com.uas.platform.b2b.controller;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.ui.ModelMap;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
 import com.alibaba.fastjson.JSONObject;
 import com.uas.platform.b2b.model.InvitationRecord;
 import com.uas.platform.b2b.search.SearchService;
@@ -19,6 +10,14 @@ import com.uas.search.b2b.model.SPage;
 import com.uas.search.b2b.model.Sort;
 import com.uas.search.b2b.model.Sort.Type;
 import com.uas.search.b2b.util.SearchConstants;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.List;
 
 @RestController
 @RequestMapping("/invitationrecord")
@@ -52,7 +51,7 @@ public class InvitationRecordController {
 		com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, null);
 		pageParams.getFilters().put("in_useruu", SystemSession.getUser().getUserUU());
 		List<Sort> sortList = new ArrayList<>();
-		sortList.add(new Sort("in_id", false, Type.LONG, new Long(1)));
+		sortList.add(new Sort("in_date", false, Type.LONG, new Long(1)));
 		pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
 		return searchService.getInvitationByKeyword(keyword, pageParams);
 	}
@@ -67,7 +66,7 @@ public class InvitationRecordController {
 		com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, null);
 		pageParams.getFilters().put("in_enuu", SystemSession.getUser().getEnterprise().getUu());
 		List<Sort> sortList = new ArrayList<>();
-		sortList.add(new Sort("in_id", false, Type.LONG, new Long(1)));
+		sortList.add(new Sort("in_date", false, Type.LONG, new Long(1)));
 		pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
 		return searchService.getInvitationByKeyword(keyword, pageParams);
 	}

+ 2 - 2
src/main/webapp/resources/tpl/index/baseInfo/myRequest.html

@@ -361,14 +361,14 @@
 				</div> -->
 			<td width="200" class="text-center">
 				<p ng-if="request.statusCode==313 && request.vendor == 0"><a class="btn label-success white" ng-click="addSupplier(request.vendUID)">添加供应商 </a></p>
-				<p class="switch"  ng-if="request.vendor == 1">
+				<p class="switch"  ng-if="request.statusCode==313 && request.vendor == 1">
 					<span style="float: left;">供应商</span>
 					<span class="checkbox">
 						<span class="off" ng-if="request.vendor == 1 && request.vendswitch == 1" ng-click="relieve(request.vendorId)" title="已启用"></span>
 						<span class=""  ng-if="request.vendor == 1 && request.vendswitch == 0" ng-click="activeVend(request.vendorId)" title="已禁用"></span>
 					</span>
 				</p>
-			<p class="switch"  ng-if="request.customer == 1">
+			<p class="switch"  ng-if="request.statusCode==313 && request.customer == 1">
 				<span style="float: left;">客户</span>
 				<span class="checkbox">
 						<span class="off" ng-if="request.customer == 1 && request.custswitch == 1" ng-click="disableCust(request.custId)" title="已启用"></span>