Browse Source

Merge remote-tracking branch 'origin/feature-201844-wangcz' into feature-201844-wangcz

shenjunjie 7 years ago
parent
commit
4270518b50

+ 6 - 10
src/main/java/com/uas/platform/b2c/prod/commodity/model/GoodsHistory.java

@@ -3,15 +3,7 @@ package com.uas.platform.b2c.prod.commodity.model;
 import com.uas.platform.b2c.common.account.model.UserBaseInfo;
 import com.uas.platform.b2c.core.utils.FastjsonUtils;
 
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.OneToOne;
-import javax.persistence.Table;
-import javax.persistence.Transient;
+import javax.persistence.*;
 import java.util.Date;
 import java.util.List;
 
@@ -22,7 +14,11 @@ import java.util.List;
  *
  */
 @Entity
-@Table(name = "trade$goods_history")
+@Table(name = "trade$goods_history", indexes = {
+		@Index(name = "goods_history_go_batchcode", columnList = "go_batchcode"),
+		@Index(name = "goods_history_log_operateuu", columnList = "log_operateuu")
+		}
+)
 public class GoodsHistory {
 
 	@Id

+ 348 - 0
src/main/java/com/uas/platform/b2c/prod/store/model/StoreInSimple.java

@@ -0,0 +1,348 @@
+package com.uas.platform.b2c.prod.store.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.uas.platform.b2c.common.account.model.Enterprise;
+import com.uas.platform.b2c.prod.commodity.model.Goods;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 店铺信息类
+ *
+ * @author huxz
+ * @version 2017-08-02 14:39:53 创建文件
+ */
+@Entity
+@Table(name = "store$info")
+@JsonInclude(JsonInclude.Include.NON_EMPTY)
+public class StoreInSimple implements Serializable {
+
+	private static final long serialVersionUID = -2806666044917530730L;
+
+	@Id
+	@GeneratedValue
+	@Column(name = "id")
+	private Long id;
+
+	/*+************************************************************************
+	 * 店铺信息
+	 **************************************************************************/
+
+	/**
+	 * 店铺UUID
+	 */
+	@Column(name = "st_uuid", unique = true)
+	private String uuid;
+
+	/**
+	 * 店铺名称,实际为企业名称
+	 */
+	@Column(name = "st_name", unique = true)
+	private String storeName;
+
+	/**
+	 * 店铺简称,实际为店铺名称
+	 */
+	@Column(name = "st_short_name")
+	private String storeShortName;
+
+	/**
+	 * 应用领域
+	 */
+	@Column(name="st_application",length = 100)
+	private String storeApplication;
+
+	/**
+	 *	店铺LOGO URL
+	 */
+	@Column(name = "st_logo_url")
+	private String logoUrl;
+
+	/**
+	 * 店铺横幅URL
+	 */
+	@Column(name = "st_banner_url")
+	private String bannerUrl;
+
+	/**
+	 * 主营产品
+	 */
+	@Column(name = "st_description", length = 1000)
+	private String description;
+
+	/**
+	 * 店铺模板UUID
+	 */
+	@Column(name = "st_template_uuid")
+	private String templateUuid;
+
+	/**
+	 * 店铺类型
+	 */
+	@Column(name = "st_type")
+	@Enumerated(value = EnumType.STRING)
+	private StoreType type;
+
+	/**
+	 * 创建时间
+	 */
+	@Column(name = "st_create_time")
+	private Date createTime;
+
+	/**
+	 * 更新时间
+	 */
+	@Column(name = "st_update_time")
+	private Date updateTime;
+
+	/**
+	 * 上架商品总库存
+	 */
+	@Column(name = "st_total_reserve")
+	private long totalReserve;
+
+	/**
+	 * 店铺状态
+	 */
+	@Enumerated(value = EnumType.STRING)
+	@Column(name = "st_status")
+	private StoreStatus status = StoreStatus.OPENED;
+
+	/*+************************************************************************
+	 * 企业信息
+	 **************************************************************************/
+
+	/**
+	 * 店铺企业UU
+	 */
+	@Column(name = "st_enuu")
+	private Long enUU;
+
+	@OneToOne(cascade = { CascadeType.REFRESH })
+	@JoinColumn(name = "st_enuu", insertable = false, updatable = false)
+	private Enterprise enterpriseInfo;
+
+	/**
+	 * 企业信息JSON
+	 */
+	@JsonIgnore
+	@Column(name = "st_en_json", length = 2000 ,columnDefinition="TEXT")
+	private String enterpriseJson;
+
+	/**
+	 * 企业资质类型
+	 */
+	@Column(name = "st_en_type")
+	private String enType;
+
+	/**
+	 * 企业资质信息
+	 */
+	@Column(name = "st_en_qualification" ,columnDefinition="TEXT")
+	private String enQualification;
+
+	/**
+	 * 店铺标签
+	 */
+	@Column(name = "st_tags")
+	private String tags = "[]";
+
+	/**
+	 * 企业分数
+	 */
+	@Column(name = "st_score")
+	private Double score = 0d;
+
+	/*+************************************************************************
+	 * 资质信息
+	 **************************************************************************/
+
+	/**
+	 * 最低价三个批次
+	 */
+	@Transient
+	private List<Goods> goodses;
+
+	public Enterprise getEnterpriseInfo() {
+		return enterpriseInfo;
+	}
+
+	public void setEnterpriseInfo(Enterprise enterpriseInfo) {
+		this.enterpriseInfo = enterpriseInfo;
+	}
+
+	public StoreInSimple() {
+	}
+
+	public String getStoreApplication() {
+		return storeApplication;
+	}
+
+	public void setStoreApplication(String storeApplication) {
+		this.storeApplication = storeApplication;
+	}
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public String getUuid() {
+		return uuid;
+	}
+
+	public void setUuid(String uuid) {
+		this.uuid = uuid;
+	}
+
+	public String getStoreName() {
+		return storeName;
+	}
+
+	public void setStoreName(String storeName) {
+		this.storeName = storeName;
+	}
+
+	public String getStoreShortName() {
+		return storeShortName;
+	}
+
+	public void setStoreShortName(String storeShortName) {
+		this.storeShortName = storeShortName;
+	}
+
+	public String getLogoUrl() {
+		return logoUrl;
+	}
+
+	public void setLogoUrl(String logoUrl) {
+		this.logoUrl = logoUrl;
+	}
+
+	public String getBannerUrl() {
+		return bannerUrl;
+	}
+
+	public void setBannerUrl(String bannerUrl) {
+		this.bannerUrl = bannerUrl;
+	}
+
+	public String getDescription() {
+		return description;
+	}
+
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+	public String getTemplateUuid() {
+		return templateUuid;
+	}
+
+	public void setTemplateUuid(String templateUuid) {
+		this.templateUuid = templateUuid;
+	}
+
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	public Date getUpdateTime() {
+		return updateTime;
+	}
+
+	public void setUpdateTime(Date updateTime) {
+		this.updateTime = updateTime;
+	}
+
+	public long getTotalReserve() {
+		return totalReserve;
+	}
+
+	public void setTotalReserve(long totalReserve) {
+		this.totalReserve = totalReserve;
+	}
+
+	public StoreStatus getStatus() {
+		return status;
+	}
+
+	public void setStatus(StoreStatus status) {
+		this.status = status;
+	}
+
+	public Long getEnUU() {
+		return enUU;
+	}
+
+	public void setEnUU(Long enUU) {
+		this.enUU = enUU;
+	}
+
+	public String getEnterpriseJson() {
+		return enterpriseJson;
+	}
+
+	public void setEnterpriseJson(String enterpriseJson) {
+		this.enterpriseJson = enterpriseJson;
+	}
+
+	public String getEnType() {
+		return enType;
+	}
+
+	public void setEnType(String enType) {
+		this.enType = enType;
+	}
+
+	public String getEnQualification() {
+		return enQualification;
+	}
+
+	public void setEnQualification(String enQualification) {
+		this.enQualification = enQualification;
+	}
+
+	public List<Goods> getGoodses() {
+		return goodses;
+	}
+
+	public void setGoodses(List<Goods> goodses) {
+		this.goodses = goodses;
+	}
+
+	public StoreType getType() {
+		return type;
+	}
+
+	public void setType(StoreType type) {
+		this.type = type;
+	}
+
+	public String getTags() {
+		return tags;
+	}
+
+	public void setTags(String tags) {
+		this.tags = tags;
+	}
+
+	public Double getScore() {
+		return score;
+	}
+
+	public void setScore(Double score) {
+		this.score = score;
+	}
+}

+ 4 - 4
src/main/java/com/uas/platform/b2c/trade/presale/model/Cart.java

@@ -3,7 +3,7 @@ package com.uas.platform.b2c.trade.presale.model;
 import com.uas.platform.b2c.core.utils.NumberUtil;
 import com.uas.platform.b2c.prod.commodity.model.Goods;
 import com.uas.platform.b2c.prod.commodity.model.GoodsSimple;
-import com.uas.platform.b2c.prod.store.model.StoreIn;
+import com.uas.platform.b2c.prod.store.model.StoreInSimple;
 import com.uas.platform.b2c.prod.store.model.StoreType;
 import com.uas.platform.b2c.trade.presale.status.cartStatus;
 import com.uas.platform.core.model.Status;
@@ -166,7 +166,7 @@ public class Cart {
 	 */
 	@OneToOne(cascade = { CascadeType.REFRESH }, fetch = FetchType.EAGER)
 	@JoinColumn(name = "cart_store_uuid", referencedColumnName = "st_uuid" ,insertable = false, updatable = false)
-	private StoreIn storeEnterprise;
+	private StoreInSimple storeEnterprise;
 
 	/**
 	 * 店铺名称
@@ -569,11 +569,11 @@ public class Cart {
 		return this;
 	}
 
-	public StoreIn getStoreEnterprise() {
+	public StoreInSimple getStoreEnterprise() {
 		return storeEnterprise;
 	}
 
-	public void setStoreEnterprise(StoreIn storeEnterprise) {
+	public void setStoreEnterprise(StoreInSimple storeEnterprise) {
 		this.storeEnterprise = storeEnterprise;
 	}
 

+ 5 - 3
src/main/java/com/uas/platform/b2c/trade/presale/service/impl/CartServiceImpl.java

@@ -6,6 +6,7 @@ import com.uas.platform.b2c.common.account.model.User;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.core.utils.FastjsonUtils;
 import com.uas.platform.b2c.prod.commodity.constant.IntegerConstant;
+import com.uas.platform.b2c.prod.commodity.controller.GoodsController;
 import com.uas.platform.b2c.prod.commodity.dao.GoodsDao;
 import com.uas.platform.b2c.prod.commodity.dao.GoodsHistoryDao;
 import com.uas.platform.b2c.prod.commodity.dao.GoodsSimpleDao;
@@ -28,6 +29,8 @@ import com.uas.platform.core.exception.IllegalOperatorException;
 import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.model.Status;
 import com.uas.platform.core.model.Type;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Sort;
@@ -79,6 +82,8 @@ public class CartServiceImpl implements CartService {
 	@Autowired
 	private NamedParameterJdbcTemplate namedParameterJdbcTemplate;
 
+	private final Logger logger = LoggerFactory.getLogger(CartServiceImpl.class);
+
 //	@Autowired
 //	public CartServiceImpl(CartDao cartDao, GoodsService goodsService, ComponentService componentService, ComponentDao componentDao, GoodsSimpleDao goodsSimpleDao, GoodsHistoryDao goodsHistoryDao, StoreInDao storeInDao, GoodsDao goodsDao, EnterpriseDao enterpriseDao) {
 //		this.cartDao = cartDao;
@@ -416,7 +421,6 @@ public class CartServiceImpl implements CartService {
 //		info.sorting("storeUuid", Sort.Direction.DESC);
 //		info.sorting("id", Sort.Direction.DESC);
 		info.sorting(Sort.Direction.DESC, "storeUuid", "id");
-		// 获取当前页的购物车记录信息
 		Page<Cart> carts = cartDao.findAll(new Specification<Cart>() {
 			@Override
 			public Predicate toPredicate(Root<Cart> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
@@ -424,8 +428,6 @@ public class CartServiceImpl implements CartService {
 				return null;
 			}
 		}, info);
-		// 将购物车记录按店铺进行分类
-
 		if (!CollectionUtils.isEmpty(carts.getContent())) {
 			cartFillGoodsHistory(carts.getContent());
 			setCartSimilarCount(carts.getContent());

+ 6 - 8
src/main/webapp/resources/js/common/b2bServices.js

@@ -193,21 +193,19 @@ define([ 'angular', 'common/services', 'common/utils', 'big'], function(angular,
                     method: 'GET'
                 },
                 findUsers: {
-                    url: b2bPath + '/account/user/customer/:uu',
-                    method: 'POST',
-                    isArray: true
+                    url: b2bPath + '/account/user/customer/:id',
+                    method: 'GET'
                 },
                 findSaleUsers: {
                     url: b2bPath + '/vendorDistribute/:id',
-                    method: 'POST',
-                    isArray: true
+                    method: 'GET'
                 },
                 addSaleUserToVendor: {
                     url: b2bPath + '/vendorDistribute/bindVendor/:id',
                     method: 'POST'
                 },
                 addUserToVendor: {
-                    url: b2bPath + '/account/user/bindUserToVendor/:uu',
+                    url: b2bPath + '/account/user/bindUserToVendor/:id',
                     method: 'POST'
                 },
                 transferSaleUserToVendor: {
@@ -215,7 +213,7 @@ define([ 'angular', 'common/services', 'common/utils', 'big'], function(angular,
                     method: 'POST'
                 },
                 transferUserToVendor: {
-                    url: b2bPath + '/account/user/transferUserToVendor/:uu',
+                    url: b2bPath + '/account/user/transferUserToVendor/:id',
                     method: 'POST'
                 },
                 transferMyDistribute: {
@@ -228,7 +226,7 @@ define([ 'angular', 'common/services', 'common/utils', 'big'], function(angular,
                     isArray: true
                 },
                 getDistribute: {
-                    url: b2bPath + '/account/user/getDistribute/:custUU',
+                    url: b2bPath + '/account/user/getDistribute/:id',
                     method: 'GET'
                 },
                 getEnTransfer: {

+ 114 - 53
src/main/webapp/resources/js/usercenter/controllers/b2b/Purc/PurcVendorCtrl.js

@@ -67,6 +67,9 @@ define(['app/app'], function(app) {
                 resolve: {
                     customer: function () {
                         return customer;
+                    },
+                    thisUser: function () {
+                        return $scope.thisUser
                     }
                 }
             });
@@ -90,6 +93,9 @@ define(['app/app'], function(app) {
                 resolve: {
                     customer: function () {
                         return customer;
+                    },
+                    thisUser: function () {
+                        return $scope.thisUser
                     }
                 }
             });
@@ -107,43 +113,71 @@ define(['app/app'], function(app) {
     }]);
 
     // 转移权限
-    app.register.controller('TransferUserInfoCtrl', ['$scope', '$rootScope', '$modalInstance', 'customer', 'B2bAccountUser', 'toaster', 'B2bAuthenticationService', function ($scope, $rootScope, $modalInstance, customer, AccountUser, toaster, AuthenticationService) {
-        AuthenticationService.getAuthentication().success(function (data) {
-            $scope.loading = false;
-            $scope.thisUser = data;
-            $scope.checkboxes = {
-                checked: false
-            };
-            $scope.loading = true;
-            $scope.transfer = [];
-            AccountUser.findSaleUsers({id : customer.id}, {}, function (data) {
-                $scope.userinfos = data;
-                var transfer = [];
-                angular.forEach($scope.userinfos, function (user, index) {
-                    // 当前用户是被管理员转移权限时,转移的是被管理员转移的权限。
-                    if ($scope.thisUser.userUU === user.userUU && user.transfer) {
-                        $scope.thisUser.transfer = true;
-                    }
-                });
-                angular.forEach($scope.userinfos, function (user, index) {
-                    if ($scope.thisUser.sys || $scope.thisUser.transfer) {
-                        if (user.transfer) {
-                            transfer.push({num: index});
-                            user.checked = true;
-                        }
-                    } else {
-                        if (user.distribute) {
-                            transfer.push({num: index});
-                            user.checked = true;
-                        }
+    app.register.controller('TransferUserInfoCtrl', ['$scope', '$rootScope', '$modalInstance', 'customer', 'B2bAccountUser', 'toaster', 'ngTableParams', 'BaseService', 'thisUser', function ($scope, $rootScope, $modalInstance, customer, AccountUser, toaster, ngTableParams, BaseService, thisUser) {
+        $scope.checkboxes = {
+            checked: false
+        };
+        $scope.thisUser = thisUser;
+
+        $scope.userParams = new ngTableParams({
+            page: 1,
+            count:10,
+            sorting:{}
+        }, {
+            total: 0,
+            counts: [5, 10, 15, 25, 50],
+            getData: function ($defer, params) {
+                $scope.loading = true;
+                $scope.transfer = [];
+                var pageParams = params.url();
+                pageParams.keyword = $scope.keyword;
+                pageParams.id = customer.id;
+                AccountUser.findSaleUsers(BaseService.parseParams(pageParams), function (data) {
+                    $scope.loading = false;
+                    if (data) {
+                        $defer.resolve(data.content);
+                        $scope.userinfos = data.content;
+                        var transfer = [];
+                        angular.forEach($scope.userinfos, function (user, index) {
+                            // 当前用户是被管理员转移权限时,转移的是被管理员转移的权限。
+                            if ($scope.thisUser.userUU === user.userUU && user.transfer) {
+                                $scope.thisUser.transfer = true;
+                            }
+                        });
+                        angular.forEach($scope.userinfos, function (user, index) {
+                            if ($scope.thisUser.sys || $scope.thisUser.transfer) {
+                                if (user.transfer) {
+                                    transfer.push({num: index});
+                                    user.checked = true;
+                                }
+                            } else {
+                                if (user.distribute) {
+                                    transfer.push({num: index});
+                                    user.checked = true;
+                                }
+                            }
+                        });
+                        $scope.transfer = transfer;
+                        $scope.havedone = angular.copy($scope.transfer);
+                        $scope.total = data.totalElement;
+                        params.total(data.totalElement);
+                        $scope.searchFilterXls = angular.copy(pageParams.searchFilter);//保存当前取值的条件
                     }
+                }, function (response) {
+                    $scope.loading = false;
+                    toaster.pop('error', '数据加载失败', response.data);
                 });
-                $scope.transfer = transfer;
-                $scope.havedone = angular.copy($scope.transfer);
-                $scope.loading = false;
-            });
+            }
         });
 
+        // 搜索框回车
+        $scope.onSearch = function () {
+            $scope.userParams.page(1);
+            $scope.userParams.reload();
+            $scope.isChanged = false;
+            $scope.isChangedAll = false;
+        };
+
         var checkStatus = function (userinfos) {
             var transfer = [];
             angular.forEach(userinfos, function (user, index) {
@@ -198,7 +232,7 @@ define(['app/app'], function(app) {
         $scope.close = function (save) {
             var chooseResult = [];
             if (save) {
-                if (customer.vendorEnterprise.uu) {
+                if (customer.id) {
                     // 当前用户是管理员时
                     angular.forEach($scope.userinfos, function (item, i) {
                         chooseResult.push(item);
@@ -227,29 +261,56 @@ define(['app/app'], function(app) {
         };
 
     }]);
-    app.register.controller('AddUserInfoCtrl', ['$scope', '$modalInstance', 'customer', 'B2bAccountUser', 'toaster', 'AuthenticationService',
-        function ($scope, $modalInstance, customer, AccountUser, toaster, AuthenticationService) {
-            AuthenticationService.getAuthentication().success(function (data) {
-                $scope.thisUser = data;
-                $scope.checkboxes = {
-                    checked: false
-                };
-                $scope.loading = true;
-                $scope.distribute = [];
-                AccountUser.findSaleUsers({id : customer.id}, null, function (data) {
-                    $scope.userinfos = data;
-                    var distribute = [];
-                    angular.forEach($scope.userinfos, function (user, index) {
-                        if (user.distribute) {
-                            distribute.push({num: index});
+    app.register.controller('AddUserInfoCtrl', ['$scope', '$modalInstance', 'customer', 'B2bAccountUser', 'toaster', 'ngTableParams', 'BaseService', 'thisUser',
+        function ($scope, $modalInstance, customer, AccountUser, toaster, ngTableParams, BaseService, thisUser) {
+            $scope.thisUser = thisUser
+            $scope.checkboxes = {
+                checked: false
+            };
+            $scope.userParams = new ngTableParams({
+                page: 1,
+                count: 10,
+                sorting: {}
+            }, {
+                total: 0,
+                counts:[5,10,15,25,50],
+                getData: function ($defer, params) {
+                    $scope.loading = true;
+                    $scope.distribute = [];
+                    var pageParams = params.url();
+                    pageParams.keyword = $scope.keyword;
+                    pageParams.id = customer.id
+                    AccountUser.findSaleUsers(BaseService.parseParams(pageParams), function (data) {
+                        $scope.loading = false;
+                        if(data) {
+                            $defer.resolve(data.content);
+                            $scope.userinfos = data.content;
+                            var distribute = [];
+                            angular.forEach($scope.userinfos, function (user, index) {
+                                if (user.distribute) {
+                                    distribute.push({num: index});
+                                }
+                            });
+                            $scope.distribute = distribute;
+                            $scope.havedone = angular.copy($scope.distribute);
+                            $scope.total = data.totalElement;
+                            params.total(data.totalElement);
+                            $scope.searchFilterXls = angular.copy(pageParams.searchFilter);//保存当前取值的条件
                         }
+                    }, function (err) {
+                        $scope.loading = false;
+                        toaster.pop('error', '数据加载失败', err.data);
                     });
-                    $scope.distribute = distribute;
-                    $scope.havedone = angular.copy($scope.distribute);
-                    $scope.loading = false;
-                });
+                }
             });
 
+            $scope.onSearch = function () {
+                $scope.userParams.page(1);
+                $scope.userParams.reload();
+                $scope.isChanged = false;
+                $scope.isChangedAll = false;
+            };
+
             var checkStatus = function (userinfos) {
                 var distribute = [];
                 angular.forEach(userinfos, function (user, index) {

+ 110 - 56
src/main/webapp/resources/js/vendor/controllers/b2b/sale/saleCustomerCtrl.js

@@ -67,8 +67,8 @@ define(['app/app'], function (app) {
                             customer: function () {
                                 return customer;
                             },
-                            type: function () {
-                                return 'purchase'
+                            thisUser: function () {
+                                return $scope.thisUser
                             }
                         }
                     });
@@ -104,8 +104,8 @@ define(['app/app'], function (app) {
                             customer: function () {
                                 return customer;
                             },
-                            type: function () {
-                                return 'purchase'
+                            thisUser: function () {
+                                return $scope.thisUser
                             }
                         }
                     });
@@ -194,43 +194,70 @@ define(['app/app'], function (app) {
         }
     }]);
     // 转移权限
-    app.register.controller('TransferUserInfoCtrl', ['$scope', '$rootScope', '$modalInstance', 'customer', 'B2bAccountUser', 'toaster', 'B2bAuthenticationService', function ($scope, $rootScope, $modalInstance, customer, AccountUser, toaster, AuthenticationService) {
-        AuthenticationService.getAuthentication().success(function (data) {
-            $scope.loading = false;
-            $scope.thisUser = data;
-            $scope.checkboxes = {
-                checked: false
-            };
-            $scope.loading = true;
-            $scope.transfer = [];
-            AccountUser.findUsers({uu: customer.myEnterprise.uu}, {}, function (data) {
-                $scope.userinfos = data;
-                var transfer = [];
-                angular.forEach($scope.userinfos, function (user, index) {
-                    // 当前用户是被管理员转移权限时,转移的是被管理员转移的权限。
-                    if ($scope.thisUser.userUU === user.userUU && user.transfer) {
-                        $scope.thisUser.transfer = true;
-                    }
-                });
-                angular.forEach($scope.userinfos, function (user, index) {
-                    if ($scope.thisUser.sys || $scope.thisUser.transfer) {
-                        if (user.transfer) {
-                            transfer.push({num: index});
-                            user.checked = true;
-                        }
-                    } else {
-                        if (user.distribute) {
-                            transfer.push({num: index});
-                            user.checked = true;
-                        }
+    app.register.controller('TransferUserInfoCtrl', ['$scope', '$rootScope', '$modalInstance', 'customer', 'B2bAccountUser', 'toaster', 'ngTableParams', 'BaseService', 'thisUser', function ($scope, $rootScope, $modalInstance, customer, AccountUser, toaster, ngTableParams, BaseService, thisUser) {
+        $scope.checkboxes = {
+            checked: false
+        };
+        $scope.thisUser = thisUser;
+        $scope.userParams = new ngTableParams({
+            page: 1,
+            count:10,
+            sorting:{}
+        }, {
+            total: 0,
+            counts: [5, 10, 15, 25, 50],
+            getData: function ($defer, params) {
+                $scope.loading = true;
+                $scope.transfer = [];
+                var pageParams = params.url();
+                pageParams.keyword = $scope.keyword;
+                pageParams.id = customer.id;
+                AccountUser.findUsers(BaseService.parseParams(pageParams), function (data) {
+                    $scope.loading = false;
+                    if (data) {
+                        $defer.resolve(data.content);
+                        $scope.userinfos = data.content;
+                        var transfer = [];
+                        angular.forEach($scope.userinfos, function (user, index) {
+                            // 当前用户是被管理员转移权限时,转移的是被管理员转移的权限。
+                            if ($scope.thisUser.userUU === user.userUU && user.transfer) {
+                                $scope.thisUser.transfer = true;
+                            }
+                        });
+                        angular.forEach($scope.userinfos, function (user, index) {
+                            if ($scope.thisUser.sys || $scope.thisUser.transfer) {
+                                if (user.transfer) {
+                                    transfer.push({num: index});
+                                    user.checked = true;
+                                }
+                            } else {
+                                if (user.distribute) {
+                                    transfer.push({num: index});
+                                    user.checked = true;
+                                }
+                            }
+                        });
+                        $scope.transfer = transfer;
+                        $scope.havedone = angular.copy($scope.transfer);
+                        $scope.total = data.totalElement;
+                        params.total(data.totalElement);
+                        $scope.searchFilterXls = angular.copy(pageParams.searchFilter);//保存当前取值的条件
                     }
+                }, function (response) {
+                    $scope.loading = false;
+                    toaster.pop('error', '数据加载失败', response.data);
                 });
-                $scope.transfer = transfer;
-                $scope.havedone = angular.copy($scope.transfer);
-                $scope.loading = false;
-            });
+            }
         });
 
+        // 搜索框回车
+        $scope.onSearch = function () {
+            $scope.userParams.page(1);
+            $scope.userParams.reload();
+            $scope.isChanged = false;
+            $scope.isChangedAll = false;
+        };
+
         var checkStatus = function (userinfos) {
             var transfer = [];
             angular.forEach(userinfos, function (user, index) {
@@ -285,7 +312,7 @@ define(['app/app'], function (app) {
         $scope.close = function (save) {
             var chooseResult = [];
             if (save) {
-                if (customer.myEnterprise.uu) {
+                if (customer.id) {
                     // 当前用户是管理员时
                     if ($scope.thisUser.sys) {
                         angular.forEach($scope.userinfos, function (item, i) {
@@ -336,29 +363,56 @@ define(['app/app'], function (app) {
         };
 
     }]);
-    app.register.controller('AddUserInfoCtrl', ['$scope', '$modalInstance', 'customer', 'B2bAccountUser', 'toaster', 'AuthenticationService',
-        function ($scope, $modalInstance, customer, AccountUser, toaster, AuthenticationService) {
-        AuthenticationService.getAuthentication().success(function (data) {
-            $scope.thisUser = data;
+    app.register.controller('AddUserInfoCtrl', ['$scope', '$modalInstance', 'customer', 'B2bAccountUser', 'toaster', 'ngTableParams', 'BaseService', 'thisUser',
+        function ($scope, $modalInstance, customer, AccountUser, toaster, ngTableParams, BaseService, thisUser) {
             $scope.checkboxes = {
                 checked: false
             };
-            $scope.loading = true;
-            $scope.distribute = [];
-            AccountUser.findUsers({uu: customer.myEnterprise.uu}, null, function (data) {
-                $scope.userinfos = data;
-                var distribute = [];
-                angular.forEach($scope.userinfos, function (user, index) {
-                    if (user.distribute) {
-                        distribute.push({num: index});
+            $scope.thisUser = thisUser;
+        $scope.userParams = new ngTableParams({
+            page: 1,
+            count: 10,
+            sorting: {}
+        }, {
+            total: 0,
+            counts:[5,10,15,25,50],
+            getData: function ($defer, params) {
+                $scope.loading = true;
+                $scope.distribute = [];
+                var pageParams = params.url();
+                pageParams.keyword = $scope.keyword;
+                pageParams.id = customer.id
+                AccountUser.findUsers(BaseService.parseParams(pageParams), function (data) {
+                    $scope.loading = false;
+                    if(data) {
+                        $defer.resolve(data.content);
+                        $scope.userinfos = data.content;
+                        var distribute = [];
+                        angular.forEach($scope.userinfos, function (user, index) {
+                            if (user.distribute) {
+                                distribute.push({num: index});
+                            }
+                        });
+                        $scope.distribute = distribute;
+                        $scope.havedone = angular.copy($scope.distribute);
+                        $scope.total = data.totalElement;
+                        params.total(data.totalElement);
+                        $scope.searchFilterXls = angular.copy(pageParams.searchFilter);//保存当前取值的条件
                     }
+                }, function (err) {
+                    $scope.loading = false;
+                    toaster.pop('error', '数据加载失败', err.data);
                 });
-                $scope.distribute = distribute;
-                $scope.havedone = angular.copy($scope.distribute);
-                $scope.loading = false;
-            });
+            }
         });
 
+        $scope.onSearch = function () {
+            $scope.userParams.page(1);
+            $scope.userParams.reload();
+            $scope.isChanged = false;
+            $scope.isChangedAll = false;
+        };
+
         var checkStatus = function (userinfos) {
             var distribute = [];
             angular.forEach(userinfos, function (user, index) {
@@ -395,13 +449,13 @@ define(['app/app'], function (app) {
         $scope.close = function (save) {
             var chooseResult = [];
             if (save) {
-                if (customer.myEnterprise.uu) {
+                if (customer.id) {
                     angular.forEach($scope.userinfos, function (item, i) {
                         chooseResult.push(item);
                     });
                     if (chooseResult.length > 0) {
                         $scope.loading = true;
-                        AccountUser.addUserToVendor({uu: customer.myEnterprise.uu}, chooseResult, function (data) {
+                        AccountUser.addUserToVendor({id: customer.id}, chooseResult, function (data) {
                             $scope.loading = false;
                             toaster.pop('success', '提示', '保存成功');
                             $modalInstance.close(false);

+ 23 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/seek_purchase_ctrl.js

@@ -740,6 +740,29 @@ define(['app/app'], function (app) {
           $scope.setLinkBoxIndex = function (index) {
             $scope.linkBoxIndex = index;
           }
+
+          $scope.loadQuotationData = function (seek) {
+              if (seek.quotation) {
+                  console.log(3)
+                  return
+              }
+              var param = {
+                  id: seek.quteId,
+                  enuu: $scope.userInfo.enterprise.uu,
+                  useruu: $scope.userInfo.userUU
+              }
+              $http({
+                  method: 'get',
+                  dataType: 'json',
+                  url: seekUrl + '/inquiry/public/quotation/one',
+                  params: param
+              }).success(function (data) {
+                  seek.quotation = data
+              }).error(function (response) {
+                  toaster.pop('error', response);
+              });
+          }
+
           });
         }]);
 });

+ 6 - 16
src/main/webapp/resources/view/vendor/b2b/modal/add_userInfo.html

@@ -3,20 +3,10 @@
 		width: 492px;
 	}
 	#user-lists{
-		max-height: 600px;
+		max-height: 510px;
 		overflow-x: hidden;
 		overflow-y: scroll;
 	}
-	@media screen and (max-width: 1366px){
-		#user-lists{
-			max-height: 368px;
-		}
-	}
-	@media screen and (max-width: 1600px){
-		#user-lists{
-			max-height: 400px;
-		}
-	}
 </style>
 <div class="b2b-com-modal b2b-operate-modal">
 	<p class="title">
@@ -24,14 +14,14 @@
 	</p>
 	<div class="form-group" id="window-search" style="height: 36px; margin-bottom: 0; margin-top: 16px;padding-bottom: 45px;border-bottom: 1px solid #e3e3e3;">
 		<div class="col-sm-12">
-			<input type="text" class="form-control input-sm" required="" placeholder="输入用户名关键词搜索" autofocus="" ng-model="keyword" ng-search="onSearch(keyword)" />
+			<input type="text" class="form-control input-sm" required="" placeholder="输入用户电话和用户名关键词搜索" ng-model="keyword" ng-search="onSearch(keyword)" />
 			<a class="btn input-group-addon" ng-click="onSearch()">搜索</a>
 		</div>
 	</div>
 	<div class="modal-body" id="user-lists">
-		<table class="table b2b-modal-table">
+		<table class="table b2b-modal-table" ng-table="userParams">
 			<thead>
-			<th width="80px;">用户UU</th>
+			<th width="80px;">用户电话</th>
 			<th width="100px;">用户名称</th>
 			<th width="40px;" style="text-align: center">
 				<label class="com-check-box">
@@ -43,8 +33,8 @@
 			</thead>
 			<tbody>
 			<div style="overflow-y:scroll; width:100%;max-height:500px">
-				<tr ng-repeat="user in userinfos| filter: keyword track by $index">
-					<td width="80px;">{{user.userUU}}</td>
+				<tr ng-repeat="user in userinfos track by $index">
+					<td width="80px;">{{user.userTel}}</td>
 					<td width="100px;">{{user.userName}}</td>
 					<td width="40px;" style="text-align: center">
 						<label class="com-check-box">

+ 10 - 20
src/main/webapp/resources/view/vendor/b2b/modal/transfer_userInfo.html

@@ -3,20 +3,10 @@
 		width: 492px;
 	}
 	#user-lists{
-		max-height: 600px;
+		max-height: 510px;
 		overflow-x: hidden;
 		overflow-y: scroll;
 	}
-	@media screen and (max-width: 1366px){
-		#user-lists{
-			max-height: 368px;
-		}
-	}
-	@media screen and (max-width: 1600px){
-		#user-lists{
-			max-height: 400px;
-		}
-	}
 </style>
 <div class="b2b-com-modal b2b-operate-modal">
 	<p class="title">
@@ -24,21 +14,21 @@
 	</p>
 	<div class="form-group" id="window-search" style="height: 36px; margin-bottom: 0; margin-top: 16px;padding-bottom: 45px;border-bottom: 1px solid #e3e3e3;">
 		<div class="col-sm-12">
-			<input type="text" class="form-control input-sm" required="" placeholder="输入用户名关键词搜索" autofocus="" ng-model="keyword" ng-search="onSearch(keyword)" />
+			<input type="text" class="form-control input-sm" required="" placeholder="输入用户电话和用户名关键词搜索" ng-model="keyword" ng-search="onSearch(keyword)" />
 			<a class="btn input-group-addon" ng-click="onSearch()">搜索</a>
 		</div>
 	</div>
 	<div class="modal-body" id="user-lists">
-		<table class="table b2b-modal-table">
+		<table class="table b2b-modal-table" ng-table="userParams">
 			<thead>
-			<th width="80px;">用户UU</th>
+			<th width="80px;">用户电话</th>
 			<th width="100px;">用户名称</th>
 			<th width="40px;"></th>
 			</thead>
 			<tbody ng-if="thisUser.sys">
 			<!-- 当前用户是管理员时 -->
-			<tr ng-repeat="user in userinfos| filter: keyword track by $index" style="overflow-y:scroll; width:100%;max-height:500px">
-				<td width="80px;">{{user.userUU}}</td>
+			<tr ng-repeat="user in userinfos track by $index" style="overflow-y:scroll; width:100%;max-height:500px">
+				<td width="80px;">{{user.userTel}}</td>
 				<td width="100px;">{{user.userName}}</td>
 				<td width="40px;" style="text-align: center">
 					<label class="com-check-box">
@@ -50,8 +40,8 @@
 			</tbody>
 			<tbody ng-if="!thisUser.sys && thisUser.transfer">
 			<!-- 当前用户是被管理员转移权限时 -->
-			<tr ng-repeat="user in userinfos| filter: keyword track by $index">
-				<td width="80px;">{{user.userUU}}</td>
+			<tr ng-repeat="user in userinfos track by $index">
+				<td width="80px;">{{user.userTel}}</td>
 				<td width="100px;">{{user.userName}}</td>
 				<td width="40px;" style="text-align: center">
 					<label class="com-check-box">
@@ -63,8 +53,8 @@
 			</tbody>
 			<tbody ng-if="!thisUser.sys && !thisUser.transfer">
 			<!-- 当前用户是非管理员,但有查看权限时 -->
-			<tr ng-repeat="user in userinfos| filter: keyword track by $index" ng-if="!user.distribute">
-				<td width="80px;">{{user.userUU}}</td>
+			<tr ng-repeat="user in userinfos track by $index" ng-if="!user.distribute">
+				<td width="80px;">{{user.userTel}}</td>
 				<td width="100px;">{{user.userName}}</td>
 				<td width="40px;" style="text-align: center">
 					<label class="com-check-box">

+ 6 - 2
src/main/webapp/resources/view/vendor/forstore/purchaseOffer.html

@@ -916,8 +916,12 @@
                                     <div class="replace-param" ng-if="seek.isReplace == 1">
                                         <span>规格:</span><span ng-bind="seek.replaceSpec || '-'"></span>
                                     </div>
-                                    <span>交期:</span><span class="red-text" ng-bind="seek.leadtime + '天'">6 天</span>
-                                    <span>税率%:</span><span class="red-text" ng-bind="seek.taxrate">6 天</span>
+                                    <div class="replace-param">
+                                        <span>交期:</span><span class="red-text" ng-bind="seek.leadtime + '天'">6 天</span><br/>
+                                    </div>
+                                    <div class="replace-param">
+                                        <span>税率%:</span><span class="red-text" ng-bind="seek.taxrate || 0">6 天</span>
+                                    </div>
                                 </div>
                                 <!--<div>-->
                                     <!--<span>附件:</span><a href="">下载</a>-->

+ 5 - 2
src/main/webapp/resources/view/vendor/forstore/seekPurchase.html

@@ -1027,7 +1027,7 @@
                         <div ng-if="!seek.newId && userInfo.enterprise.uu != seek.inquiry.enUU && seek.quoted != 1 && seek.remainingTime > 0" ng-click="setSeekActive(seek, true, index)">我要报价</div>
                         <div class="disable" ng-if="userInfo.enterprise.uu == seek.inquiry.enUU && seek.quoted != 1 && seek.remainingTime > 0" title="此为贵公司的求购" ng-disabled="true">我要报价</div>
                         <!--<span ng-if="seek.quoted == 1 || seek.newId">已报价 <img src="static/img/seekPurchase/check.png" alt=""></span>-->
-                        <div class="is-say-price" ng-if="seek.quoted == 1 || seek.newId">已报价 <img src="static/img/seekPurchase/check.png" alt="">
+                        <div ng-mouseenter="loadQuotationData(seek)" class="is-say-price" ng-if="seek.quoted == 1 || seek.newId">已报价 <img src="static/img/seekPurchase/check.png">
                             <div class="say-price-history">
                                 <p class="price-title">{{seek.quotation.isReplace == 1 ? '替代型号报价' : '当前型号报价'}}</p>
                                 <div>
@@ -1038,11 +1038,14 @@
                                         <span>型号:</span><span ng-bind="seek.quotation.replaceCmpCode || '-'"></span>
                                     </div>
                                     <div class="replace-param" ng-if="seek.quotation.isReplace == 1">
-                                        <span>规格:</span><span ng-bind="seek.quotation.replaceSpec || '-'"></span>
+                                          <span>规格:</span><span ng-bind="seek.quotation.replaceSpec || '-'"></span>
                                     </div>
                                     <div class="replace-param">
                                         <span>交期:</span><span class="red-text" ng-bind="seek.quotation.leadtime + '天'"></span>
                                     </div>
+                                    <div class="replace-param">
+                                        <span>税率%:</span><span class="red-text" ng-bind="seek.quotation.taxrate || 0">6 天</span>
+                                    </div>
                                     <!--<div>-->
                                     <!--<span>附件:</span><a href="">下载</a>-->
                                     <!--</div>-->