Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/dev' into function_vendor_modify

# Conflicts:
#	src/main/java/com/uas/platform/b2c/trade/order/service/impl/PurchaseServiceImpl.java
#	src/main/webapp/resources/view/usercenter/forstore/order_pay.html
#	src/main/webapp/resources/view/vendor/forstore/purchase_detail.html
hulh 8 rokov pred
rodič
commit
fa06cc593b
60 zmenil súbory, kde vykonal 3126 pridanie a 175 odobranie
  1. 56 0
      src/main/java/com/uas/platform/b2c/advertise/ad/api/StoreAdsController.java
  2. 40 0
      src/main/java/com/uas/platform/b2c/advertise/ad/dao/StoreAdsDao.java
  3. 142 0
      src/main/java/com/uas/platform/b2c/advertise/ad/model/StoreAds.java
  4. 13 0
      src/main/java/com/uas/platform/b2c/advertise/ad/model/StoreAdsType.java
  5. 55 0
      src/main/java/com/uas/platform/b2c/advertise/ad/service/StoreAdsService.java
  6. 132 0
      src/main/java/com/uas/platform/b2c/advertise/ad/service/impl/StoreAdsServiceImpl.java
  7. 203 0
      src/main/java/com/uas/platform/b2c/core/constant/EncodingRulesConstant.java
  8. 133 0
      src/main/java/com/uas/platform/b2c/core/constant/ReleaseStatus.java
  9. 102 0
      src/main/java/com/uas/platform/b2c/core/constant/ServiceCode.java
  10. 473 0
      src/main/java/com/uas/platform/b2c/core/constant/Status.java
  11. 329 0
      src/main/java/com/uas/platform/b2c/core/constant/Type.java
  12. 1 1
      src/main/java/com/uas/platform/b2c/prod/commodity/dao/GoodsDao.java
  13. 16 0
      src/main/java/com/uas/platform/b2c/prod/store/controller/ConsignmentAgreeRecordController.java
  14. 28 0
      src/main/java/com/uas/platform/b2c/prod/store/controller/StoreInformationController.java
  15. 25 1
      src/main/java/com/uas/platform/b2c/prod/store/dao/ConsignmentAgreeRecordDao.java
  16. 20 0
      src/main/java/com/uas/platform/b2c/prod/store/exception/EmptyParameterException.java
  17. 3 3
      src/main/java/com/uas/platform/b2c/prod/store/model/ConsignmentAgreeRecord.java
  18. 14 0
      src/main/java/com/uas/platform/b2c/prod/store/model/StoreIn.java
  19. 11 0
      src/main/java/com/uas/platform/b2c/prod/store/service/ConsignmentAgreeRecordService.java
  20. 17 0
      src/main/java/com/uas/platform/b2c/prod/store/service/StoreInService.java
  21. 34 3
      src/main/java/com/uas/platform/b2c/prod/store/service/impl/ConsignmentAgreeRecordServiceImpl.java
  22. 65 1
      src/main/java/com/uas/platform/b2c/prod/store/service/impl/StoreInServiceImpl.java
  23. 20 3
      src/main/java/com/uas/platform/b2c/prod/store/service/impl/StoreViolationsServiceImpl.java
  24. 14 2
      src/main/java/com/uas/platform/b2c/prod/store/task/ViolationsAutoFinish.java
  25. 0 5
      src/main/java/com/uas/platform/b2c/trade/order/service/impl/PurchaseServiceImpl.java
  26. 4 2
      src/main/webapp/WEB-INF/spring/webmvc.xml
  27. 100 0
      src/main/webapp/WEB-INF/views/normal/adminWithNav.html
  28. 29 0
      src/main/webapp/resources/js/admin/app.js
  29. 7 25
      src/main/webapp/resources/js/admin/controllers/StoreInfoListCtrl.js
  30. 72 0
      src/main/webapp/resources/js/admin/controllers/store/StoreCompanyDetailCtrl.js
  31. 75 0
      src/main/webapp/resources/js/admin/controllers/store/StoreCompanyListCtrl.js
  32. 92 2
      src/main/webapp/resources/js/common/module/store_admin_violations_module.js
  33. 57 1
      src/main/webapp/resources/js/common/query/storeInfo.js
  34. 15 8
      src/main/webapp/resources/js/provider/controllers/ProviderFactoriesCtrl.js
  35. 19 3
      src/main/webapp/resources/js/provider/controllers/ProviderHomeCtrl.js
  36. 19 3
      src/main/webapp/resources/js/provider/controllers/ProviderListCtrl.js
  37. 1 1
      src/main/webapp/resources/js/usercenter/app.js
  38. 5 0
      src/main/webapp/resources/js/usercenter/controllers/ComponentStoreCtrl.js
  39. 4 0
      src/main/webapp/resources/js/usercenter/controllers/forstore/browsing_history.js
  40. 2 0
      src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_invoice_ctrl.js
  41. 5 0
      src/main/webapp/resources/js/usercenter/controllers/forstore/order_pay_ctrl.js
  42. 4 0
      src/main/webapp/resources/js/usercenter/controllers/forstore/store_focus_ctrl.js
  43. 5 5
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_delivery_ctrl.js
  44. 124 49
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_standard_putOn_ctrl.js
  45. 9 2
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_store_close_ctrl.js
  46. 32 25
      src/main/webapp/resources/view/admin/store/fragments/enterprise_info.html
  47. 5 5
      src/main/webapp/resources/view/admin/store/fragments/violations_detail.html
  48. 2 3
      src/main/webapp/resources/view/admin/store/fragments/violations_handler.html
  49. 205 0
      src/main/webapp/resources/view/admin/store/store_company_detail.html
  50. 177 0
      src/main/webapp/resources/view/admin/store/store_company_list.html
  51. 3 0
      src/main/webapp/resources/view/admin/store/store_info_detail.html
  52. 14 4
      src/main/webapp/resources/view/admin/store_application_maintenance.html
  53. 17 7
      src/main/webapp/resources/view/admin/store_info_list.html
  54. 2 2
      src/main/webapp/resources/view/provider/provider_factories.html
  55. 1 1
      src/main/webapp/resources/view/usercenter/componentStore.html
  56. 3 3
      src/main/webapp/resources/view/usercenter/forstore/browsing_history.html
  57. 1 1
      src/main/webapp/resources/view/usercenter/forstore/store_focus.html
  58. 1 1
      src/main/webapp/resources/view/usercenter/modal/collectModel.html
  59. 68 2
      src/main/webapp/resources/view/vendor/forstore/vendor_standard_putOn.html
  60. 1 1
      src/main/webapp/resources/view/vendor/forstore/vendor_store_close.html

+ 56 - 0
src/main/java/com/uas/platform/b2c/advertise/ad/api/StoreAdsController.java

@@ -0,0 +1,56 @@
+package com.uas.platform.b2c.advertise.ad.api;
+
+import com.uas.platform.b2c.advertise.ad.model.StoreAds;
+import com.uas.platform.b2c.advertise.ad.service.StoreAdsService;
+import com.uas.platform.b2c.prod.store.model.StoreType;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.domain.Sort;
+import org.springframework.data.web.PageableDefault;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 店铺广告接口类
+ *
+ * @author huxz
+ * @version 2017-08-30 10:38:36 创建文件
+ */
+@RestController
+@RequestMapping(value = "/api/ads/store")
+public class StoreAdsController {
+
+	private final StoreAdsService adsService;
+
+	@Autowired
+	public StoreAdsController(StoreAdsService adsService) {
+		this.adsService = adsService;
+	}
+
+	/**
+	 * 用户获取热销店铺列表信息
+	 * tip: 分页查询默认从第0页开始进行查询,因而,第1页查询不到信息
+	 *
+	 * @param page		分页参数
+	 * @param types		店铺类型
+	 */
+	@RequestMapping(method = RequestMethod.GET, value = "/sales-list", produces = MediaType.APPLICATION_JSON_VALUE)
+	List<StoreAds> showSalesListWhenUserQuery(@PageableDefault(size = 5, sort = "updateTime", direction = Sort.Direction.DESC) Pageable page, StoreType[] types) {
+		return adsService.showSalesListWhenUserQuery(page, types);
+	}
+
+	/**
+	 * 用户获取优秀店铺列表信息
+	 *
+	 * @param page		分页参数
+	 * @param types		店铺类型
+	 */
+	@RequestMapping(method = RequestMethod.GET, value = "/excellence-list", produces = MediaType.APPLICATION_JSON_VALUE)
+	List<StoreAds> showExcellenceListWhenUserQuery(@PageableDefault(size = 5, sort = "updateTime", direction = Sort.Direction.DESC) Pageable page, StoreType[] types) {
+		return adsService.showExcellenceListWhenUserQuery(page, types);
+	}
+}

+ 40 - 0
src/main/java/com/uas/platform/b2c/advertise/ad/dao/StoreAdsDao.java

@@ -0,0 +1,40 @@
+package com.uas.platform.b2c.advertise.ad.dao;
+
+import com.uas.platform.b2c.advertise.ad.model.StoreAds;
+import com.uas.platform.b2c.advertise.ad.model.StoreAdsType;
+import com.uas.platform.b2c.prod.store.model.StoreType;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface StoreAdsDao extends JpaSpecificationExecutor<StoreAds>, JpaRepository<StoreAds, Long> {
+
+	/**
+	 * 根据店铺ID获取店铺广告信息
+	 *
+	 * @param storeId	店铺ID
+	 */
+	List<StoreAds> findByStoreId(Long storeId);
+
+	/**
+	 * 根据店铺ID和店铺广告类型查询店铺广告信息
+	 *
+	 * @param storeId	店铺ID
+	 * @param type		店铺广告类型
+	 */
+	StoreAds findByStoreIdAndType(Long storeId, StoreAdsType type);
+
+	/**
+	 * 分页获取某种广告类型的特定店铺类型的店铺广告信息
+	 *
+	 * @param type 		店铺广告类型
+	 * @param types		店铺类型
+	 * @param pageable	分页参数
+	 */
+	Page<StoreAds> findByTypeAndStoreTypeIn(StoreAdsType type, StoreType[] types, Pageable pageable);
+}

+ 142 - 0
src/main/java/com/uas/platform/b2c/advertise/ad/model/StoreAds.java

@@ -0,0 +1,142 @@
+package com.uas.platform.b2c.advertise.ad.model;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.uas.platform.b2c.core.utils.JacksonUtils;
+import com.uas.platform.b2c.prod.store.model.StoreIn;
+import com.uas.platform.b2c.prod.store.model.StoreType;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Index;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+import java.util.Date;
+
+/**
+ * 店铺广告实体类
+ *
+ * @author huxz
+ * @version 2017-08-30 09:29:29 创建文件
+ */
+@Entity
+@Table(name = "store$ads", indexes = @Index(name = "store_ads_type_unique", columnList = "ad_type,ad_st_id", unique = true))
+@JsonInclude(JsonInclude.Include.NON_EMPTY)
+public class StoreAds {
+
+	/**
+	 * ID
+	 */
+	@Id
+	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "store$ads_gen")
+	@SequenceGenerator(name = "store$ads_gen", sequenceName = "store$ads_seq", allocationSize = 1)
+	@Column(name = "id")
+	private Long id;
+
+	/**
+	 * 广告类型
+	 */
+	@Column(name = "ad_type")
+	@Enumerated(EnumType.STRING)
+	private StoreAdsType type;
+
+	/**
+	 * 店铺类型
+	 */
+	@Column(name = "ad_st_type")
+	@Enumerated(EnumType.STRING)
+	private StoreType storeType;
+
+	/**
+	 * 店铺ID
+	 */
+	@Column(name = "ad_st_id")
+	private Long storeId;
+
+	/**
+	 * 店铺信息
+	 */
+	@Transient
+	private StoreIn store;
+
+	/**
+	 * 店铺创建时间
+	 */
+	@Column(name = "ad_create_time")
+	private Date createTime;
+
+	/**
+	 * 店铺更新时间
+	 */
+	@Column(name = "ad_update_time")
+	private Date updateTime;
+
+	public StoreAds() {
+	}
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public StoreAdsType getType() {
+		return type;
+	}
+
+	public void setType(StoreAdsType type) {
+		this.type = type;
+	}
+
+	public StoreType getStoreType() {
+		return storeType;
+	}
+
+	public void setStoreType(StoreType storeType) {
+		this.storeType = storeType;
+	}
+
+	public Long getStoreId() {
+		return storeId;
+	}
+
+	public void setStoreId(Long storeId) {
+		this.storeId = storeId;
+	}
+
+	public StoreIn getStore() {
+		return store;
+	}
+
+	public void setStore(StoreIn store) {
+		this.store = store;
+	}
+
+	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;
+	}
+
+	@Override
+	public String toString() {
+		return JacksonUtils.toJson(this);
+	}
+}

+ 13 - 0
src/main/java/com/uas/platform/b2c/advertise/ad/model/StoreAdsType.java

@@ -0,0 +1,13 @@
+package com.uas.platform.b2c.advertise.ad.model;
+
+/**
+ * 店铺广告类型
+ *
+ * @author huxz
+ * @version 2017-08-30 09:18:59 创建文件
+ */
+public enum StoreAdsType {
+	NEW_LIST,			// 新开店铺
+	SALES_LIST,			// 热销店铺
+	EXCELLENCE_LIST		// 优秀店铺
+}

+ 55 - 0
src/main/java/com/uas/platform/b2c/advertise/ad/service/StoreAdsService.java

@@ -0,0 +1,55 @@
+package com.uas.platform.b2c.advertise.ad.service;
+
+import com.uas.platform.b2c.advertise.ad.model.StoreAds;
+import com.uas.platform.b2c.advertise.ad.model.StoreAdsType;
+import com.uas.platform.b2c.prod.store.model.StoreType;
+import org.springframework.data.domain.Pageable;
+
+import java.util.List;
+
+/**
+ * 店铺广告业务类
+ *
+ * @author huxz
+ * @version 2017-08-30 09:46:15 创建文件
+ */
+public interface StoreAdsService {
+
+	/**
+	 * 管理推荐时,保存店铺广告信息
+	 *
+	 * @param ads	店铺广告信息
+	 */
+	StoreAds saveWhenAdminRecommend(StoreAds ads);
+
+	/**
+	 * 取消店铺推荐时,删除推荐信息
+	 *
+	 * @param storeId	店铺ID
+	 * @param type		店铺广告类型
+	 */
+	StoreAds deleteOneWhenAdminCancel(Long storeId, StoreAdsType type);
+
+	/**
+	 * 当店铺关闭时,删除对应店铺的广告信息
+	 *
+	 * @param storeId	店铺ID
+	 */
+	List<StoreAds> deleteWhenStoreClose(Long storeId);
+
+	/**
+	 * 用户获取热销店铺列表信息
+	 *
+	 * @param page		分页参数
+	 * @param types		店铺类型
+	 */
+	List<StoreAds> showSalesListWhenUserQuery(Pageable page, StoreType[] types);
+
+	/**
+	 * 用户获取优秀店铺列表信息
+	 *
+	 * @param page		分页参数
+	 * @param types		店铺类型
+	 */
+	List<StoreAds> showExcellenceListWhenUserQuery(Pageable page, StoreType[] types);
+}

+ 132 - 0
src/main/java/com/uas/platform/b2c/advertise/ad/service/impl/StoreAdsServiceImpl.java

@@ -0,0 +1,132 @@
+package com.uas.platform.b2c.advertise.ad.service.impl;
+
+import com.uas.platform.b2c.advertise.ad.dao.StoreAdsDao;
+import com.uas.platform.b2c.advertise.ad.model.StoreAds;
+import com.uas.platform.b2c.advertise.ad.model.StoreAdsType;
+import com.uas.platform.b2c.advertise.ad.service.StoreAdsService;
+import com.uas.platform.b2c.prod.store.dao.StoreInDao;
+import com.uas.platform.b2c.prod.store.exception.EmptyParameterException;
+import com.uas.platform.b2c.prod.store.model.StoreIn;
+import com.uas.platform.b2c.prod.store.model.StoreType;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.Collections;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * 店铺广告业务实现类
+ *
+ * @author huxz
+ * @version 2017-08-30 09:46:15 创建文件
+ */
+@Service
+public class StoreAdsServiceImpl implements StoreAdsService {
+
+	private final StoreAdsDao adsDao;
+
+	private final StoreInDao storeInDao;
+
+	@Autowired
+	public StoreAdsServiceImpl(StoreAdsDao adsDao, StoreInDao storeInDao) {
+		this.adsDao = adsDao;
+		this.storeInDao = storeInDao;
+	}
+
+	@Override
+	public StoreAds saveWhenAdminRecommend(StoreAds ads) {
+		if (ads.getStoreType() == null || ads.getStoreId() == null || ads.getType() == null) {
+			return null;
+		}
+		Date date = new Date();
+
+		ads.setCreateTime(date);
+		ads.setUpdateTime(date);
+
+		return adsDao.save(ads);
+	}
+
+	@Override
+	public StoreAds deleteOneWhenAdminCancel(Long storeId, StoreAdsType type) {
+		if (storeId == null) {
+			throw new EmptyParameterException("店铺ID不能为空");
+		}
+		if (type == null) {
+			throw new EmptyParameterException("店铺广告类型不能为空");
+		}
+
+		StoreAds ads = adsDao.findByStoreIdAndType(storeId, type);
+		if (ads != null) {
+			adsDao.delete(ads);
+		}
+		return ads;
+	}
+
+	@Override
+	public List<StoreAds> deleteWhenStoreClose(Long storeId) {
+		if (storeId == null) {
+			return Collections.emptyList();
+		}
+
+		List<StoreAds> adsList = adsDao.findByStoreId(storeId);
+		if (CollectionUtils.isEmpty(adsList)) {
+			return Collections.emptyList();
+		}
+
+		adsDao.delete(adsList);
+		return adsList;
+	}
+
+	@Override
+	public List<StoreAds> showSalesListWhenUserQuery(Pageable page, StoreType[] types) {
+		if (page == null || types == null || types.length == 0) {
+			return Collections.emptyList();
+		}
+
+		Page<StoreAds> adsPage = adsDao.findByTypeAndStoreTypeIn(StoreAdsType.SALES_LIST, types, page);
+		List<StoreAds> adsList = CollectionUtils.isEmpty(adsPage.getContent()) ? Collections.<StoreAds>emptyList() : adsPage.getContent();
+
+		handlerStoreAdsInformation(adsList);
+
+		// TODO 统计订单的数量
+
+		return adsList;
+	}
+
+	@Override
+	public List<StoreAds> showExcellenceListWhenUserQuery(Pageable page, StoreType[] types) {
+		if (page == null || types == null || types.length == 0) {
+			return Collections.emptyList();
+		}
+
+		Page<StoreAds> adsPage = adsDao.findByTypeAndStoreTypeIn(StoreAdsType.EXCELLENCE_LIST, types, page);
+		List<StoreAds> adsList = CollectionUtils.isEmpty(adsPage.getContent()) ? Collections.<StoreAds>emptyList() : adsPage.getContent();
+
+		handlerStoreAdsInformation(adsList);
+
+		return adsList;
+	}
+
+	/**
+	 * 处理店铺广告信息,并添加店铺信息
+	 *
+	 * @param adsList	店铺广告列表
+	 */
+	private void handlerStoreAdsInformation(List<StoreAds> adsList) {
+		Iterator<StoreAds> iterator = adsList.iterator();
+		while (iterator.hasNext()) {
+			StoreAds ads = iterator.next();
+			StoreIn store = storeInDao.findOne(ads.getStoreId());
+			if (store == null) {
+				iterator.remove();
+			} else {
+				ads.setStore(store);
+			}
+		}
+	}
+}

+ 203 - 0
src/main/java/com/uas/platform/b2c/core/constant/EncodingRulesConstant.java

@@ -0,0 +1,203 @@
+package com.uas.platform.b2c.core.constant;
+
+/**
+ * 系统中单号编码规则
+ * 
+ * @author ChenHao
+ * 
+ */
+public class EncodingRulesConstant {
+
+	/**
+	 * 批次号 BT + 8位时间戳 + 8位编码
+	 */
+	public static final String BATCH = "BT_TIMESTAP_NUMBER";
+
+	/**
+	 * 订单号 SS + 8位时间戳 + 8位编码
+	 */
+	public static final String ORDER = "SS_TIMESTAP_NUMBER";
+
+	/**
+	 * 订单明细号 SSD + 8位时间戳 + 9位编码
+	 */
+	public static final String ORDER_DETAIL = "SSD_TIMESTAP_NUMBER";
+
+	/**
+	 * 送样申请号 PP + 8位时间戳 + 8位编码
+	 */
+	public static final String PROOFING = "PP_TIMESTAP_NUMBER";
+
+	/**
+	 * 送样申请号 PP + 8位时间戳 + 9位编码
+	 */
+	public static final String PROOFING_DETAIL = "PPD_TIMESTAP_NUMBER";
+
+	/**
+	 * 采购单号 PO + 8位时间戳 + 8位编码
+	 */
+	public static final String PURCHASE = "PO_TIMESTAP_NUMBER";
+
+	/**
+	 * 采购单明细号 POD + 8位时间戳 + 9位编码
+	 */
+	public static final String PURCHASE_DETAIL = "POD_TIMESTAP_NUMBER";
+
+	/**
+	 * 转账单号 BK + 8位时间戳 + 8位编码
+	 */
+	public static final String BANKTRANSFER = "BK_TIMESTAP_NUMBER";
+
+	/**
+	 * 发货单号(转自订单的) SDFSS + 8位时间戳 + 8位编码
+	 */
+	public static final String INVOICE_FROMORDER = "SDFSS_TIMESTAP_NUMBER";
+
+	/**
+	 * 发货单明细号(转自订单的) SDDFSS + 8位时间戳 + 9位编码
+	 */
+	public static final String INVOICE_DETAIL_FROMORDER = "SDDFSS_TIMESTAP_NUMBER";
+
+	/**
+	 * 发货单号(转自采购单的) SDFPO + 8位时间戳 + 8位编码
+	 */
+	public static final String INVOICE_FROMPURCHASE = "SDFPO_TIMESTAP_NUMBER";
+
+	/**
+	 * 发货单明细号(转自采购单的) SDDFPO + 8位时间戳 + 9位编码
+	 */
+	public static final String INVOICE_DETAIL_FROMPURCHASE = "SDDFPO_TIMESTAP_NUMBER";
+
+	/**
+	 * 发货单号(转自换货单的) SDDFPO + 8位时间戳 + 8位编码
+	 */
+	public static final String INVOICE_FROMCHANGE = "SDFCH_TIMESTAP_NUMBER";
+
+	/**
+	 * 发货单明细号(转自换货单明细的) SDDFPO + 8位时间戳 + 9位编码
+	 */
+	public static final String INVOICE_DETAIL_FROMCHANGE = "SDDFCH_TIMESTAP_NUMBER";
+
+	/**
+	 * 入库单号 YS + 8位时间戳 + 8位编码
+	 */
+	public static final String RECEIPT_FROMPURCHASE = "YS_TIMESTAP_NUMBER";
+
+	/**
+	 * 入库单明细号 YSD + 8位时间戳 + 9位编码
+	 */
+	public static final String RECEIPT_DETAIL_FROMPURCHASE = "YSD_TIMESTAP_NUMBER";
+
+	/**
+	 * 退货单号(来着客户) RFC + 8位时间戳 + 8位编码
+	 */
+	public static final String RETURN_FROMCUST = "RFC_TIMESTAP_NUMBER";
+
+	/**
+	 * 退货明细单号(来着客户) RFCD + 8位时间戳 + 9位编码
+	 */
+	public static final String RETURN_DETAIL_FROMCUST = "RFCD_TIMESTAP_NUMBER";
+
+	/**
+	 * 退货单号(来着平台) RFB + 8位时间戳 + 8位编码
+	 */
+	public static final String RETURN_FROMB2C = "RFB_TIMESTAP_NUMBER";
+
+	/**
+	 * 退货细单号(来着平台) RFBD + 8位时间戳 + 9位编码
+	 */
+	public static final String RETURN_DETAIL_FROMB2C = "RFBD_TIMESTAP_NUMBER";
+
+	/**
+	 * 换货单号(来着客户) CFC + 8位时间戳 + 8位编码
+	 */
+	public static final String CHANGE_FROMCUST = "CFC_TIMESTAP_NUMBER";
+
+	/**
+	 * 换货单号(来着客户) CFCD + 8位时间戳 + 9位编码
+	 */
+	public static final String CHANGE_DETAIL_FROMCUST = "CFCD_TIMESTAP_NUMBER";
+
+	/**
+	 * 换货单号(来着平台) CFB + 8位时间戳 + 8位编码
+	 */
+	public static final String CHANGE_FROMB2C = "CFB_TIMESTAP_NUMBER";
+
+	/**
+	 * 换货单号(来着平台) CFBD + 8位时间戳 + 9位编码
+	 */
+	public static final String CHANGE_DETAIL_FROMB2C = "CFBD_TIMESTAP_NUMBER";
+
+	/**
+	 * 业务中间表 OIU + 8 位时间戳 + 8 位编码
+	 */
+	public static final String OPERATION_INFO_UAS = "OIU_TIMESTAP_NUMBER";
+
+	/**
+	 * 交易流水号 YS + 8位时间戳 + 8位编码
+	 */
+	public static final String YSEPAY = "YS_TIMESTAP_NUMBER";
+
+	/**
+	 * 爬虫任务表CCT + 8 位时间戳 + 8 位编码
+	 */
+	public static final String COMPONENT_CRAWL_TASK = "CCT_TIMESTAP_NUMBER";
+
+	/**
+	 * 器件批量申请单号CCS + 8 位时间戳 + 8 位编码
+	 */
+	public static final String COMPONENT_CRAWL_SUBMIT = "CCS_TIMESTAP_NUMBER";
+
+	/**
+	 * 订单异常申请单号 OAP + 8位时间戳 + 8位编码
+	 */
+	public static final String ORDER_EX_APPLY = "OAP_TIMESTAMP_NUMBER";
+
+	/**
+	 * 采购单异常申请单号 PAP + 8位时间戳 + 8位编码
+	 */
+	public static final String PURCHASE_EX_APPLY = "PAP_TIMESTAMP_NUMBER";
+
+	/**
+	 * 申请明细号 APD + 8位时间戳 + 9位编码
+	 */
+	public static final String APPLY_DETAIL = "APD_TIMESTAMP_NUMBER";
+
+	/**
+	 * 付款申请表 REP + 8 位时间戳 + 8 位编码
+	 */
+	public static final String REQUEST_PAYMENT = "REP_TIMESTAP_NUMBER";
+	
+	/**
+	 *  退款表RE + 8 位时间戳 + 8 位编码
+	 */
+	public static final String REFUND = "RE_TIMESTAP_NUMBER";
+	
+	/**
+	 *  退款明细RED + 8 位时间戳 + 9 位编码
+	 */
+	public static final String REFUND_DETAIL = "RED_TIMESTAP_NUMBER";
+	
+	/**
+	 *  批量上架的批次号 + 8 位时间戳 + 8位编码
+	 */
+	public static final String RELP_BATCH = "RELP_TIMESTAP_NUMBER";
+
+
+	/**
+	 *  产品导入的编号 + 8 位时间戳 + 8位编码
+	 */
+	public static final String PRODUCT_IMPORT = "PROIM_TIMESTAP_NUMBER";
+
+
+	/**
+	 *  产品导入编号 + 8 位时间戳 + 8位编码
+	 */
+	public static final String PRODUCT_NUM = "PNUM_TIMESTAP_NUMBER";
+
+	/**
+	 * 用户导入标准上架信息的批次号 编号 + 8位时间戳 + 8位编码
+	 */
+	public static final String PRODUCTSTANDARDPUTONINFO_NUM = "PSPO_TIMESTAP_NUMBER";
+
+}

+ 133 - 0
src/main/java/com/uas/platform/b2c/core/constant/ReleaseStatus.java

@@ -0,0 +1,133 @@
+package com.uas.platform.b2c.core.constant;
+
+public enum ReleaseStatus {
+	/**
+	 * {@code 101已发布}
+	 */
+	released(101, "已发布"),
+
+	/**
+	 * {@code 102未发布}
+	 */
+	unreleased(102, "未发布"),
+
+	/**
+	 * {@code 103品牌不存在}
+	 */
+	error_brand(103, "品牌不存在"),
+	/**
+	 * {@code 103器件不存在}
+	 */
+	error_component(104, "器件不存在"),
+	
+	/**
+	 * {@code 105 生产日期为空}
+	 */
+	error_productDate(105, "生产日期为空"),
+	
+	/**
+	 * {@code 106库存类型为空}
+	 */
+	error_origial(106, "库存类型为空"),
+	
+	/**
+	 * {@code 107 库存数量为空}
+	 */
+	error_reserve(107, "库存数量为空"),
+	
+	/**
+	 * {@code 108  最小包单价都为空}
+	 */
+	error_minPackPrice(108, "最小包单价都为空"),
+	
+	/**
+	 * {@code 109  交期都为空}
+	 */
+	error_deliveryTime(109, "交期都为空"),
+	
+	/**
+	 * {@code 110 价格信息不统一}
+	 */
+	error_priceNUnite(110, "价格信息不统一"),
+	
+	/**
+	 * {@code 1101 分段价格错误}
+	 */
+	error_sectionPrice(111, "分段价格错误"),
+
+	/**
+	 * {@code 112 匹配成功}
+	 */
+	success(112, "匹配成功"),
+	
+	/**
+	 * {@code 113  匹配失败}
+	 */
+	failure(113, "匹配失败");
+	/**
+	 * @param value
+	 *            发布状态
+	 *            <p>
+	 *            101<i>已发布</i>
+	 *            </p>
+	 *            <p>
+	 *            102<i>未发布</i>
+	 *            </p>
+	 *            <p>
+	 *            103<i>品牌不存在</i>
+	 *            </p>
+	 *            <p>
+	 *            104<i>器件不存在</i>
+	 *            </p>
+	 *            <p>
+	 *            105<i>匹配成功</i>
+	 *            </p>
+	 *
+	 */
+	private ReleaseStatus(int value, String phrase) {
+		this.value = value;
+		this.phrase = phrase;
+	}
+
+	private final int value;
+
+	private final String phrase;
+
+	/**
+	 * @return 发布状态的编码
+	 */
+	public int value() {
+		return this.value;
+	}
+
+	/**
+	 * @return 业务动作描述
+	 */
+	public String getPhrase() {
+		return this.phrase;
+	}
+
+	/**
+	 * @param statusCode
+	 *            状态的编码
+	 * @return 状态
+	 * @throws IllegalArgumentException
+	 *             如果statusCode不存在的话
+	 */
+	public static ReleaseStatus valueOf(int statusCode) {
+		for (ReleaseStatus status : values()) {
+			if (status.value == statusCode) {
+				return status;
+			}
+		}
+		throw new IllegalArgumentException("没有与编号 [" + statusCode + "]匹配的业务状态");
+	}
+
+	/**
+	 * 返回状态的编号
+	 */
+	@Override
+	public String toString() {
+		return Integer.toString(value);
+	}
+}

+ 102 - 0
src/main/java/com/uas/platform/b2c/core/constant/ServiceCode.java

@@ -0,0 +1,102 @@
+package com.uas.platform.b2c.core.constant;
+
+public enum ServiceCode {
+	/**
+	 * {@code 101器件申请}
+	 */
+	componentApply(101, "器件申请"),
+
+	/**
+	 * {@code 102品牌申请}
+	 */
+	brandApply(102, "品牌申请"),
+
+	/**
+	 * {@code 103器件审批}
+	 */
+	componentAudit(103, "器件审核"),
+
+	/**
+	 * {@code 104品牌审批}
+	 */
+	brandAudit(104, "品牌审核"),
+
+	/**
+	 * {@code 201 未下载}
+	 */
+	not_Download(201, "未下载"),
+
+	/**
+	 * {@code 202 已下载}
+	 */
+	download(202, "已下载");
+
+	/**
+	 * @param value
+	 *            业务动作编码
+	 *            <p>
+	 *            101<i>器件申请</i>
+	 *            </p>
+	 *            <p>
+	 *            102<i>品牌申请</i>
+	 *            </p>
+	 *            <p>
+	 *            103<i>器件审批</i>
+	 *            </p>
+	 *            <p>
+	 *            104<i>品牌审批</i>
+	 *            </p>
+	 *            <p>
+	 *            201<i>未下载</i>
+	 *            </p>
+	 *            <p>
+	 *            202<i>已下载</i>
+	 *            </p>
+	 */
+	private ServiceCode(int value, String phrase) {
+		this.value = value;
+		this.phrase = phrase;
+	}
+
+	private final int value;
+
+	private final String phrase;
+
+	/**
+	 * @return 业务动作的编码
+	 */
+	public int value() {
+		return this.value;
+	}
+
+	/**
+	 * @return 业务动作描述
+	 */
+	public String getPhrase() {
+		return this.phrase;
+	}
+
+	/**
+	 * @param statusCode
+	 *            状态的编码
+	 * @return 状态
+	 * @throws IllegalArgumentException
+	 *             如果statusCode不存在的话
+	 */
+	public static ServiceCode valueOf(int statusCode) {
+		for (ServiceCode status : values()) {
+			if (status.value == statusCode) {
+				return status;
+			}
+		}
+		throw new IllegalArgumentException("没有与编号 [" + statusCode + "]匹配的业务动作");
+	}
+
+	/**
+	 * 返回状态的编号
+	 */
+	@Override
+	public String toString() {
+		return Integer.toString(value);
+	}
+}

+ 473 - 0
src/main/java/com/uas/platform/b2c/core/constant/Status.java

@@ -0,0 +1,473 @@
+package com.uas.platform.b2c.core.constant;
+
+/**
+ * 状态定义,描述
+ * 
+ * @author yingp
+ * 
+ */
+/**
+ * @author Pro1
+ *
+ */
+public enum Status {
+	/**
+	 * {@code 100 在录入}
+	 */
+	INPUTTING(100, "在录入"),
+	/**
+	 * {@code 101 已提交}
+	 */
+	SUBMITTED(101, "已提交"),
+	/**
+	 * {@code 102 已审核}
+	 */
+	AUDITED(102, "已审核"),
+	/**
+	 * {@code 103 未通过}
+	 */
+	NOTALLOW(103, "未通过"),
+	/**
+	 * {@code 104 已通过}
+	 */
+	ALLOW(104, "已通过"),
+	/**
+	 * {@code 111 已结束}
+	 */
+	FINISH(111, "已结束"),
+	/**
+	 * {@code 112 已删除}
+	 */
+	DELETED(112, "已删除"),
+	/**
+	 * {@code 200 未回复}
+	 */
+	NOT_REPLY(200, "未回复"),
+	/**
+	 * {@code 201 已回复}
+	 */
+	REPLIED(201, "已回复"),
+	/**
+	 * 202 平台的单据未上传到ERP、SAAS等其它系统
+	 */
+	NOT_UPLOAD(202, "待上传"),
+	/**
+	 * 203 ERP、SAAS等其它系统已下载平台的单据
+	 */
+	DOWNLOADED(203, "已下载"),
+	/**
+	 * {@code 210 未阅读}
+	 */
+	NOT_READ(210, "未阅读"),
+	/**
+	 * {@code 211 已阅读}
+	 */
+	READ(211, "已阅读"),
+	/**
+	 * {@code 221 已同意}
+	 */
+	AGREED(221, "已同意"),
+	/**
+	 * {@code 222  不同意}
+	 */
+	NOTAGREED(222, "不同意"),
+	/**
+	 * {@code 310 未启用}
+	 */
+	UNAPPLY(310, "未启用"),
+	/**
+	 * {@code 311 申请中}
+	 */
+	UNAUDIT(311, "申请中"),
+	/**
+	 * {@code 312 未激活}
+	 */
+	UNACT(312, "未激活"),
+	/**
+	 * {@code 313 已激活}
+	 */
+	ENABLED(313, "已激活"),
+	/**
+	 * {@code 314 已禁用}
+	 */
+	DISABLED(314, "已禁用"),
+	/**
+	 * {@code 315 已注销,已取消}
+	 */
+	CANCELLED(315, "已注销"),
+	/**
+	 * {@code 317 已开账}
+	 */
+	CREATED(317, "已开账"),
+	/**
+	 * {@code 350 未完成}
+	 */
+	PENDING(350, "未完成"),
+	/**
+	 * {@code 351 运行中}
+	 */
+	RUNNING(351, "运行中"),
+	/**
+	 * {@code 400 已发货}
+	 */
+	SEND(400, "已发货"),
+	/**
+	 * {@code 401 未发货}
+	 */
+	UNSEND(401, "未发货"),
+	/**
+	 * {@code 402 部分发货}
+	 */
+	PART_SEND(402, "部分发货"),
+	/**
+	 * {@code 403 出货中}
+	 */
+	SHIPPINGIN(403, "出货中"),
+	/**
+	 * {@code 404 待收货}
+	 */
+	INBOUND(404, "待收货"),
+	/**
+	 * {@code 405 已收货,只指货物}
+	 */
+	RECEIVED(405, "已收货"),
+	/**
+	 * {@code 406 待出货}
+	 */
+	TOBESHIPPED(406, "待出货"),
+	/**
+	 * {@code 407 已出货}
+	 */
+	SHIPPED(407, "已出货"),
+	/**
+	 * {@code 408 发货中}
+	 */
+	SENDING(408, "发货中"),
+	/**
+	 * {@code 409 待回寄}
+	 */
+	TOBESHIPPEDBACK(409, "待回寄"),
+	/**
+	 * {@code 410 验货中}
+	 */
+	INSPECTING(410, "验货中"),
+
+	/**
+	 * {@code 411 已验货}
+	 */
+	INSPECTED(411, "已验货"),
+
+	/**
+	 * {@code 412  等待卖家同意}
+	 */
+	WAITSELLERCOMFIRM(412, "等待卖家同意"),
+
+	/**
+	 * {@code 413  卖家接单}
+	 */
+	ORDERTAKE(413, "卖家接单"),
+
+	/**
+	 * {@code 501 待确认}
+	 */
+	TOBECONFIRMED(501, "待确认"),
+	/**
+	 * {@code 502 已确认}
+	 */
+	CONFIRMED(502, "已确认"),
+	/**
+	 * {@code 503 待付款}
+	 */
+	TOBEPAID(503, "待付款"),
+	/**
+	 * {@code 504 已付款}
+	 */
+	PAID(504, "已付款"),
+	/**
+	 * {@code 505 已收款}
+	 */
+	MONEYRECEIVED(505, "已收款"),
+	/**
+	 * {@code 506 待收款}
+	 */
+	TORECEIVEMONEY(506, "待收款"),
+	/**
+	 * {@code 507待退款}
+	 */
+	TOBEREFUNDED(507, "待退款"),
+	/**
+	 * {@code 508 已退款}
+	 */
+	REFUNDED(508, "已退款"),
+	/**
+	 * {@code 509  退货中}
+	 */
+	RETURNINGGOODS(509, "退货中"),
+	
+	/**
+	 * {@code 521 退货}
+	 */
+	RETURN(521, "退货"),
+	/**
+	 * {@code 510  换货中}
+	 */
+	EXCHANGEGOODS(510, "换货中"),
+	/**
+	 * {@code 511  售后中}
+	 */
+	INAFTERSALES(511, "售后处理中"),
+	/**
+	 * {@code 512  待开发票}
+	 */
+	TOBEMADEOUTANINVOICE(512, "待开发票"),
+	/**
+	 * {@code 511  已开发票}
+	 */
+	MADEOUTANINVOICE(513, "已开发票"),
+	/**
+	 * {@code 514  待结算}
+	 */
+	NOTSETTLED(514, "待结算"),
+	/**
+	 * {@code 515  已结算}
+	 */
+	SETTLED(515, "已结算"),
+	/**
+	 * {@code 516  已到结算期}
+	 */
+	CHECKDEADLINE(516, "已到结算期"),
+	/**
+	 * {@code 517  未到结算期}
+	 */
+	NOCHECKDEADLINE(517, "未到结算期"),
+	/**
+	 * {@code 518  已送样}
+	 */
+	PROOFED(518, "已送样"),
+	/**
+	 * {@code 520 已完成}
+	 */
+	COMPLETED(520, "已完成"),
+	/**
+	 * {@code 521 待评论}
+	 */
+	TO_BE_REVIEWED(521, "待评论"),
+	/**
+	 * {@code 521 待评论}
+	 */
+	TO_BE_AFTERREVIEWED(523, "待追评"),
+	/**
+	 * {@code 522 已评论}
+     */
+	REVIEWED(522, "已评论"),
+	/**
+	 * {@code 601  有效的}
+	 */
+	AVAILABLE(601, "有效地"),
+	/**
+	 * {@code 602 无效的(因库存不足而失效)}
+	 */
+	UNAVAILABLE(602, "无效的(因库存不足而失效)"),
+	/**
+	 * {@code 603 无效的(因未按时付款)}
+	 */
+	UNAVAILABLE_NOPAID(603, "无效的(因未按时付款)"),
+
+	/**
+	 * {@code 604  无效的(因供应商拒绝)}
+	 */
+	UNAVAILABLE_DISAGREE(604, "无效的(因供应商拒绝)"),
+
+	/**
+	 * {@code 605 无效的(因全部退货完成的)}
+	 */
+	UNAVAILABLE_RETURN(605, "无效的(因全部退货完成的)"),
+	/**
+	 * {@code 606 无效的(因用户本人取消而失效)}
+	 */
+	UNAVAILABLE_PERSONAL(606, "无效的(因用户本人取消而失效)"),
+	/**
+	 * {@code 607 申请议价中}
+	 */
+	CHARGE_APPLY(607, "申请议价中"),
+	/**
+	 * {@code 608 议价结束(同意)}
+	 */
+	CHARGE_ACCEPT(608, "议价结束(同意)"),
+	/**
+	 * {@code 609 议价结束(不同意)}
+	 */
+	CHARGE_REFUSE(609, "议价结束(不同意)"),
+
+	/**
+	 * {@code 610   确认状态取消(确认状态下供应商拒绝取消)}
+	 */
+	COMFIRM_DISAGREE(610, " 确认状态取消(供应商拒绝取消)"),
+
+	/**
+	 * {@code 611   已付款状态取消(已付款状态下供应商拒绝取消)}
+	 */
+	PAIDED_DISAGREE(611, "已付款状态取消(供应商拒绝取消)"),
+
+	/**
+	 * {@code 612 已下架}
+	 */
+	REMOVED(612, "已下架"),
+
+	/*
+	 * {@code 699 待开发票}
+	 */
+	PREPARE_BILL(699, "准备发票"),
+
+	/*
+	 * {@code 700 待开发票}
+	 */
+	TOBEMAKE_BILL(700, "待开发票"),
+
+	/**
+	 * {@code 701  待收发票} 如果在订单主表代表,已经全部开票,存在待收票的明细 如果在明细表,代表这条明细已经开票,处于待确认收票状态
+	 */
+	TOBERECEIVE_BILL(701, "待收发票"),
+
+	/*
+	 * {@code 702 已收发票}
+	 */
+	RECEIVED_BILL(702, "已收发票"),
+
+	/*
+	 * {@code 703 不需开票}
+	 */
+	NEEDNO_BILL(703, "不需开票"),
+
+	/*
+	 * {@code 704 存在待收票的订单} 区别与701 701状态代表订单中不存在待开票的明细;而704代表订单中可能存在待开票的明细
+	 */
+	TOCONFIRM_BILL(704, "存在待收票的订单"),
+
+	/*
+	 * {@code 705 已开票的全部收票}
+	 */
+	OPENED_RECEIVED_BILL(705, "已开票的全部收票"),
+
+	/**
+	 * {@code 810 创客需求问题待处理}
+	 */
+	TOBE_HANDLE(810, "未处理"),
+
+	/**
+	 * {@code 811 创客需求问题已处理}
+	 */
+	HANDLED(811, "已处理"),
+
+	/**
+	 * {@code 812 待爬取}
+	 */
+	TO_CROWL(812, "未完成"),
+
+	/**
+	 * {@code 813 已爬取}
+	 */
+	CROWLED(813, "已完成"),
+
+	/**
+	 * {@code 814 爬取失败}
+	 */
+	CROWLED_FAILED(814, "任务失败"),
+	/**
+	 * {@code 1669 待入库 <b>待入库</b>}
+	 */
+	TOBE_LOAD(1669, "待入库"),
+
+	/**
+	 * {@code 1670 待上架 <b>待上架</b>}
+	 */
+	TOBE_ONSALE(1670, "未上架"),
+
+	/**
+	 * {@code 1680 未读 <b>未读</b>}
+	 */
+	UNREAD(1680, "未读"),
+
+	/**
+	 * {@code 1690 1690 <b>1690</b>}
+	 */
+	ISREAD(1690, "已读");
+
+	/**
+	 * @param value
+	 *            状态编号
+	 *            <p>
+	 *            100~199 <i>单据基本状态</i>
+	 *            </p>
+	 *            <p>
+	 *            200~299 <i>沟通状态</i>
+	 *            </p>
+	 *            <p>
+	 *            300~399 <i>用户使用状态</i>
+	 *            </p>
+	 *            <p>
+	 *            400~499 <i>物流状态</i>
+	 *            </p>
+	 *            <p>
+	 *            500~599 <i>单据状态</i>
+	 *            </p>
+	 * @param phrase
+	 *            描述
+	 */
+	private Status(int value, String phrase) {
+		this.value = value;
+		this.phrase = phrase;
+	}
+
+	private final int value;
+
+	private final String phrase;
+
+	/**
+	 * @return 状态的整型编码
+	 */
+	public int value() {
+		return this.value;
+	}
+
+	/**
+	 * @return 状态的描述
+	 */
+	public String getPhrase() {
+		return this.phrase;
+	}
+
+	/**
+	 * @param statusCode
+	 *            状态的编码
+	 * @return 状态
+	 * @throws IllegalArgumentException
+	 *             如果statusCode不存在的话
+	 */
+	public static Status valueOf(int statusCode) {
+		for (Status status : values()) {
+			if (status.value == statusCode) {
+				return status;
+			}
+		}
+		throw new IllegalArgumentException("没有与编号 [" + statusCode + "]匹配的状态");
+	}
+
+	/**
+	 * 返回状态的编号
+	 */
+	@Override
+	public String toString() {
+		return Integer.toString(value);
+	}
+
+	/**
+	 * 判断订单或采购单的当前状态是否处于已失效状态
+	 *
+	 * @return	如果已失效,则返回true
+	 */
+	public static boolean isUnavailable(Integer status) {
+		return com.uas.platform.core.model.Status.UNAVAILABLE.value() == status || com.uas.platform.core.model.Status.UNAVAILABLE_DISAGREE.value() == status || com.uas.platform.core.model.Status.UNAVAILABLE_NOPAID.value() == status
+				|| com.uas.platform.core.model.Status.UNAVAILABLE_PERSONAL.value() == status || com.uas.platform.core.model.Status.UNAVAILABLE_RETURN.value() == status || com.uas.platform.core.model.Status.RETURN.value() == status;
+	}
+}

+ 329 - 0
src/main/java/com/uas/platform/b2c/core/constant/Type.java

@@ -0,0 +1,329 @@
+package com.uas.platform.b2c.core.constant;
+
+/**
+ * 类型定义,描述
+ * 
+ * @author chenhao
+ * 
+ */
+
+public enum Type {
+	/**
+	 * {@code 1001  收货地址}
+	 */
+	Address_Shipping_Code(1001, "收货地址"),
+	/**
+	 * {@code 1002 发货地址}
+	 */
+	Address_Sending_Code(1002, "发货地址"),
+	/**
+	 * {@code 1011  增加}
+	 */
+	Add_Code(1011, "增加"),
+	/**
+	 * {@code 1012 扣除}
+	 */
+	Subtract_Code(1012, "扣除"),
+	/**
+	 * {@code 1021  退货}
+	 */
+	Return_Goods_Code(1021, "退货"),
+	/**
+	 * {@code 1022 换货}
+	 */
+	Exchange_Goods_Code(1022, "换货"),
+	/**
+	 * {@code 1030 平台销售换货单}
+	 */
+	Purc_B2c_Change_Code(1030, "平台销售换货单"),
+	/**
+	 * {@code 1031供应商销售换货单}
+	 */
+	Purc_Vender_Change_Code(1031, "供应商销售换货单"),
+	/**
+	 * {@code 1032平台销售退货单}
+	 */
+	Purc_B2c_Return_Code(1032, "平台销售退货单"),
+	/**
+	 * {@code 1033供应商销售退货单}
+	 */
+	Purc_Vender_Return_Code(1033, "供应商销售退货单"),
+	/**
+	 * {@code 1034平台销售验收单}
+	 */
+	Purc_B2c_Accept_Code(1034, "平台销售验收单"),
+	/**
+	 * {@code 1035供应商出货单}
+	 */
+	Invoice_Vender_code(1035, "供应商出货单"),
+	/**
+	 * {@code 1036平台出货单}
+	 */
+	Invoice_B2c_code(1036, "平台出货单"),
+	/**
+	 * {@code 1037供应商换货出货单}
+	 */
+	Invoice_Vender_Change_code(1037, "供应商换货出货单"),
+	/**
+	 * {@code 1038平台换货出货单}
+	 */
+	Invoice_B2c_Change_code(1038, "平台换货出货单"),
+	/**
+	 * {@code 1039订单}
+	 */
+	Order_code(1039, "订单"),
+	/**
+	 * {@code 1040采购订单}
+	 */
+	Purchase_code(1040, "采购单"),
+	/**
+	 * {@code 1041客户退货单}
+	 */
+	Return_Cust_code(1041, "客户退货单"),
+	/**
+	 * {@code 1042平台退货单}
+	 */
+	Return_B2c_code(1042, "平台退货单"),
+	/**
+	 * {@code 1043客户换货单}
+	 */
+	Change_Cust_code(1043, "客户换货单"),
+	/**
+	 * {@code 1044平台换货单}
+	 */
+	Change_B2c_code(1044, "平台换货单"),
+	/**
+	 * {@code 1051  现货}
+	 */
+	Spot_Code(1051, "现货"),
+	/**
+	 * {@code 1052 期货}
+	 */
+	Futures_Code(1052, "期货"),
+	/**
+	 * {@code 1053  进口额外支付费率}
+	 */
+	EXTRA_CHARGE_RATE_IN_IMPORT(1053, "进口额外支付费率"),
+
+	/**
+	 * {@code 1054 提醒卖家发货的类型}
+	 */
+	NOTIFY_SELLER_SHIP(1054, "提醒卖家发货的类型"),
+	/**
+	 * {@code 1061  买家}
+     */
+	BUYER(1061, "买家"),
+	/**
+	 * {@code 1062  商城}
+	 */
+	MALL(1062, "商城"),
+	/**
+	 * {@code 1063  卖家}
+	 */
+	SUP(1063, "卖家"),
+	/**
+	 * {@code 1101 货到付款}
+	 */
+	Payment_CashOnDelivery_Code(1101, "货到付款"),
+	/**
+	 * {@code 1102 在线支付}
+	 */
+	Payment_Online_Code(1102, "在线支付"),
+	/**
+	 * {@code 1103 公司转账}
+	 */
+	Payment_CompanyTransfer_Code(1103, "公司转账"),
+	/**
+	 * {@code 1104 邮局汇款}
+	 */
+	Payment_Remittance_Code(1104, "邮局汇款"),
+	/**
+	 * {@code 120117%增值税可抵扣,累计开票,8%税点}
+	 */
+	Bill_DeductibleCumulative_Code(1201, "17%增值税可抵扣,累计开票,8%税点"),
+	/**
+	 * {@code 1202 17%增值税不可抵扣,累计开票,8%税点}
+	 */
+	Bill_NoDeductibleCumulative_Code(1202, "17%增值税不可抵扣,累计开票,8%税点"),
+	/**
+	 * {@code 1203 17%增值税可抵扣,随元器件一起发货,10%税点}
+	 */
+	Bill_DeductibleNoCumulative_Code(1203, "17%增值税可抵扣,随元器件一起发货,10%税点"),
+	/**
+	 * {@code 1204 17%增值税不可抵扣,,随元器件一起发货,10%税点}
+	 */
+	Bill_NoDeductibleNoCumulative_Code(1204, "17%增值税不可抵扣,,随元器件一起发货,10%税点"),
+	/**
+	 * {@code 1205 增值税专用发票}
+	 */
+	Bill_Deduct(1205, "增值税专用发票"),
+
+	/**
+	 * {@code 1205 增值税普通发票}
+	 */
+	Bill_NoDeduct(1206, "增值税普通发票"),
+
+	/**
+	 * {@code 1207 不需要开票}
+	 */
+	Bill_No(1207, "不需要开票"),
+	/**
+	 * {@code 1301 UU配送}
+	 */
+	Delivery_ByUU_Code(1301, "UU配送"),
+	/**
+	 * {@code 1302 上门自取}
+	 */
+	Delivery_BySelf_Code(1302, "上门自取"),
+
+	/**
+	 * {@code 1311 现货 <b>上架商品类型</b>}
+	 */
+	Goods_Original_Code(1311, "现货"),
+
+	/**
+	 * {@code 1312 呆滞库存 <b>上架商品类型</b>}
+	 */
+	Goods_Inaction_Stock(1312, "呆滞库存"),
+
+	/**
+	 * {@code 1313 废料 <b>上架商品类型</b>}
+	 */
+	// Goods_Wastage_Code(1313, "废料"),
+
+	/**
+	 * {@code 1401 订单发票}
+	 */
+	ORDER_BILL(1401, "订单发票"),
+	
+	/**
+	 * {@code 1402 采购单发票}
+	 */
+	PURCHASE_BILL(1402, "采购单发票"),
+	
+	/**
+	 * {@code 1500  买家待支付时间}
+	 */
+	
+	B2C_PROPERTY_PAYTIEM(1500, "买家付款有效期"),
+
+	/**
+	 * {@code 1501 买家收货后转变成已完成状态的时间}
+	 */
+	B2C_PROPERTY_COMPLETETIME(1501, "买家收货后转变为已完成时间"),
+
+	/**
+	 * {@code 1502  买家自动收货的时间}
+	 */
+	B2C_AUTO_RECEVIED_TIME(1502, "买家自动收货的时间"),
+
+	/**
+	 * 站内信接受角色(卖家)
+	 */
+	SELLER(1507, "SELLER"),
+
+	/**
+	 * 站内信类型(公告)
+	 */
+	PUBLIC(1505, "PUBLIC"),
+
+	/**
+	 * 站内信类型(私信)
+	 */
+	PRIVATE(1506, "PRIVATE"),
+
+	/**
+	 * {@code 1401 订单发票}
+	 */
+	EXCHANGERATE_USD(1600, "USD"),
+
+	/**
+	 * 个人行为
+	 */
+	PERSONAL(1601, "PERSONAL"),
+
+	/**
+	 * 企业行为
+	 */
+	ENTERPRISING(1602, "ENTERPRISING"),
+
+	/**
+	 * {@code 1666 企业入库 <b>企业入库</b>}
+	 */
+	STOCK_IN(1666, "入库动作"),
+
+	/**
+	 * {@code 1667 企业出库 <b>企业出库</b>}
+	 */
+	STOCK_OUT(1667, "出库动作"),
+
+	/**
+	 * {@code 1668 企业销售出库 <b>企业销售出库</b>}
+	 */
+	STOCK_SELLER(1668, "销售出库");
+
+	/**
+	 * @param value
+	 *            状态编号
+	 *            <p>
+	 *            1000~1099 <i>交易相关</i>
+	 *            </p>
+	 *            <p>
+	 *            1100~1199 <i>支付方式</i>
+	 *            </p>
+	 *            <p>
+	 *            1200~1299 <i>票据类型</i>
+	 *            </p>
+	 *            <p>
+	 *            1300~1399 <i>配送类型</i>
+	 *            </p>
+	 * @param phrase
+	 *            描述
+	 */
+	private Type(int value, String phrase) {
+		this.value = value;
+		this.phrase = phrase;
+	}
+
+	private final int value;
+
+	private final String phrase;
+
+	/**
+	 * @return 状态的整型编码
+	 */
+	public int value() {
+		return this.value;
+	}
+
+	/**
+	 * @return 状态的描述
+	 */
+	public String getPhrase() {
+		return this.phrase;
+	}
+
+	/**
+	 * @param statusCode
+	 *            状态的编码
+	 * @return 状态
+	 * @throws IllegalArgumentException
+	 *             如果statusCode不存在的话
+	 */
+	public static Type valueOf(int statusCode) {
+		for (Type status : values()) {
+			if (status.value == statusCode) {
+				return status;
+			}
+		}
+		throw new IllegalArgumentException("没有与编号 [" + statusCode + "]匹配的状态");
+	}
+
+	/**
+	 * 返回状态的编号
+	 */
+	@Override
+	public String toString() {
+		return Integer.toString(value);
+	}
+}

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/dao/GoodsDao.java

@@ -409,7 +409,7 @@ public interface GoodsDao extends JpaSpecificationExecutor<Goods>, JpaRepository
      * @param storeUuid 店铺UUID
      * @return the set
      */
-    @Query(value = "select distinct g.kindUuid from Goods g where g.storeid = :storeUuid")
+    @Query(value = "select distinct g.kindUuid from Goods g where g.storeid = :storeUuid and g.status=601")
 	Set<Long> findAllKindsByStoreUuid(@Param("storeUuid") String storeUuid);
 
     /**

+ 16 - 0
src/main/java/com/uas/platform/b2c/prod/store/controller/ConsignmentAgreeRecordController.java

@@ -1,5 +1,6 @@
 package com.uas.platform.b2c.prod.store.controller;
 
+import com.uas.platform.b2c.common.account.model.Enterprise;
 import com.uas.platform.b2c.prod.store.model.ConsignmentAgreeRecord;
 import com.uas.platform.b2c.prod.store.service.ConsignmentAgreeRecordService;
 import com.uas.platform.b2c.trade.support.ResultMap;
@@ -8,8 +9,11 @@ import com.uas.platform.core.model.PageParams;
 import org.apache.log4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.web.PageableDefault;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 /**
@@ -63,4 +67,16 @@ public class ConsignmentAgreeRecordController {
 		PageInfo pageInfo = new PageInfo(pageParams);
 		return recordService.pageRecordWhenAdminQueryInfo(pageInfo, enUU);
 	}
+
+	/**
+	 * Page Enterprise information by consignment agreement record,
+	 * when admin show operation record logs.
+	 *
+	 * @param pageable	page parameter
+	 * @param keyword 	search keyword
+	 */
+	@RequestMapping(method = RequestMethod.GET, value = "/pageEnterprise")
+	public Page<Enterprise> pageEnterpriseWhenAdminQueryRecord(@PageableDefault Pageable pageable, @RequestParam(required = false) String keyword) {
+		return recordService.pageEnterpriseWhenAdminQueryRecord(pageable, keyword);
+	}
 }

+ 28 - 0
src/main/java/com/uas/platform/b2c/prod/store/controller/StoreInformationController.java

@@ -1,15 +1,19 @@
 package com.uas.platform.b2c.prod.store.controller;
 
+import com.uas.platform.b2c.advertise.ad.model.StoreAdsType;
 import com.uas.platform.b2c.prod.store.model.StoreIn;
 import com.uas.platform.b2c.prod.store.model.StoreStatus;
 import com.uas.platform.b2c.prod.store.service.StoreInService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
 
 /**
  * 店铺页面调整控制器
@@ -51,4 +55,28 @@ public class StoreInformationController {
 		}
 	}
 
+	/**
+	 * 当管理员推荐店铺的时候,保存店铺的广告信息
+	 *
+	 * @param type		店铺广告类型
+	 * @param store		店铺信息
+	 */
+	@ResponseBody
+	@RequestMapping(method = RequestMethod.PUT, value = "/auth/api/store/tag-store", produces = MediaType.APPLICATION_JSON_VALUE)
+	public StoreIn tagStoreInWhenAdminRecommend(StoreAdsType type, @RequestBody StoreIn store) {
+		return storeService.tagStoreInWhenAdminRecommend(type, store);
+	}
+
+	/**
+	 * 当管理员推荐店铺的时候,取消推荐店铺
+	 *
+	 * @param type		店铺广告类型
+	 * @param store		店铺信息
+	 */
+	@ResponseBody
+	@RequestMapping(method = RequestMethod.PUT, value = "/auth/api/store/cancel-tag", produces = MediaType.APPLICATION_JSON_VALUE)
+	public StoreIn cancelStoreTagsWhenAdminCancel(StoreAdsType type, @RequestBody StoreIn store) {
+		return storeService.cancelStoreTagsWhenAdminCancel(type, store);
+	}
+
 }

+ 25 - 1
src/main/java/com/uas/platform/b2c/prod/store/dao/ConsignmentAgreeRecordDao.java

@@ -1,8 +1,12 @@
 package com.uas.platform.b2c.prod.store.dao;
 
 import com.uas.platform.b2c.prod.store.model.ConsignmentAgreeRecord;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.query.Param;
 import org.springframework.stereotype.Repository;
 
 import java.util.List;
@@ -22,5 +26,25 @@ public interface ConsignmentAgreeRecordDao extends JpaSpecificationExecutor<Cons
 	 * @param enUU		企业UU
 	 * @param userUU	用户UU
 	 */
-	List<ConsignmentAgreeRecord> findByEnUUAndUserUU(Long enUU, Long userUU);
+	List<ConsignmentAgreeRecord> findByEnUUAndUserUU(String enUU, Long userUU);
+
+	/**
+	 * Page distinct enterprise uu of Entity ConsignmentAgreeRecord.
+	 *
+	 * @param pageable	page parameters
+	 */
+	@Query(value = "select distinct r.enUU from ConsignmentAgreeRecord r",
+		countQuery = "select count(distinct r.enUU) from ConsignmentAgreeRecord r")
+	Page<String> findOrderByEnUUDesc(Pageable pageable);
+
+	/**
+	 * Page distinct enterprise uu of Entity ConsignmentAgreeRecord according to keyword
+	 * and page parameters.
+	 *
+	 * @param keyword	search keyword
+	 * @param page		page parameters
+	 */
+	@Query(value = "select distinct r.enUU from ConsignmentAgreeRecord r where r.enUU like %:keyword% or r.enterpriseName like %:keyword%",
+			countQuery = "select count(distinct r.enUU) from ConsignmentAgreeRecord r where r.enUU like %:keyword% or r.enterpriseName like %:keyword%")
+	Page<String> findEnUUByKeywordAndPage(@Param("keyword") String keyword, Pageable page);
 }

+ 20 - 0
src/main/java/com/uas/platform/b2c/prod/store/exception/EmptyParameterException.java

@@ -0,0 +1,20 @@
+package com.uas.platform.b2c.prod.store.exception;
+
+/**
+ * 参数为空异常
+ */
+public class EmptyParameterException extends RuntimeException {
+
+	private static final long serialVersionUID = 1L;
+
+	public EmptyParameterException() {
+	}
+
+	public EmptyParameterException(String message) {
+		super(message);
+	}
+
+	public EmptyParameterException(Throwable cause) {
+		super(cause);
+	}
+}

+ 3 - 3
src/main/java/com/uas/platform/b2c/prod/store/model/ConsignmentAgreeRecord.java

@@ -33,7 +33,7 @@ public class ConsignmentAgreeRecord {
 	 * 企业UU
 	 */
 	@Column(name = "con_en_uu")
-	private Long enUU;
+	private String enUU;
 
 	/**
 	 * 企业名称
@@ -80,11 +80,11 @@ public class ConsignmentAgreeRecord {
 		this.id = id;
 	}
 
-	public Long getEnUU() {
+	public String getEnUU() {
 		return enUU;
 	}
 
-	public void setEnUU(Long enUU) {
+	public void setEnUU(String enUU) {
 		this.enUU = enUU;
 	}
 

+ 14 - 0
src/main/java/com/uas/platform/b2c/prod/store/model/StoreIn.java

@@ -159,6 +159,12 @@ public class StoreIn implements Serializable {
 	@Column(name = "st_en_qualification", length = 4000)
 	private String enQualification;
 
+	/**
+	 * 店铺标签
+	 */
+	@Column(name = "st_tags")
+	private String tags = "[]";
+
 	/*+************************************************************************
 	 * 资质信息
 	 **************************************************************************/
@@ -365,4 +371,12 @@ public class StoreIn implements Serializable {
 	public void setBrands(Set<StoreBrandInfo> brands) {
 		this.brands = brands;
 	}
+
+	public String getTags() {
+		return tags;
+	}
+
+	public void setTags(String tags) {
+		this.tags = tags;
+	}
 }

+ 11 - 0
src/main/java/com/uas/platform/b2c/prod/store/service/ConsignmentAgreeRecordService.java

@@ -1,9 +1,11 @@
 package com.uas.platform.b2c.prod.store.service;
 
+import com.uas.platform.b2c.common.account.model.Enterprise;
 import com.uas.platform.b2c.prod.store.model.ConsignmentAgreeRecord;
 import com.uas.platform.b2c.trade.support.ResultMap;
 import com.uas.platform.core.model.PageInfo;
 import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
 
 /**
  * 自营转寄售协议,同意操作记录业务类
@@ -32,4 +34,13 @@ public interface ConsignmentAgreeRecordService {
 	 * @param enUU		企业UU
 	 */
 	Page<ConsignmentAgreeRecord> pageRecordWhenAdminQueryInfo(PageInfo pageInfo, Long enUU);
+
+	/**
+	 * Page Enterprise information by consignment agreement record,
+	 * when admin show operation record logs.
+	 *
+	 * @param page    	page parameter
+	 * @param keyword	search keyword
+	 */
+	Page<Enterprise> pageEnterpriseWhenAdminQueryRecord(Pageable page, String keyword);
 }

+ 17 - 0
src/main/java/com/uas/platform/b2c/prod/store/service/StoreInService.java

@@ -1,5 +1,6 @@
 package com.uas.platform.b2c.prod.store.service;
 
+import com.uas.platform.b2c.advertise.ad.model.StoreAdsType;
 import com.uas.platform.b2c.prod.store.model.StoreApply;
 import com.uas.platform.b2c.prod.store.model.StoreIn;
 import com.uas.platform.b2c.prod.store.model.StoreStatus;
@@ -143,4 +144,20 @@ public interface StoreInService {
 	 * @param keyword     查询关键字
 	 */
 	Page<StoreIn> pageStoreInfoWhenAdminQuery(PageInfo pageInfo, StoreType type, StoreStatus status, String keyword);
+
+	/**
+	 * 当管理员推荐店铺的时候,保存店铺的广告信息
+	 *
+	 * @param type		店铺广告类型
+	 * @param store		店铺信息
+	 */
+	StoreIn tagStoreInWhenAdminRecommend(StoreAdsType type, StoreIn store);
+
+	/**
+	 * 当管理员推荐店铺的时候,取消店铺的广告推荐
+	 *
+	 * @param type		店铺广告类型
+	 * @param store		店铺信息
+	 */
+	StoreIn cancelStoreTagsWhenAdminCancel(StoreAdsType type, StoreIn store);
 }

+ 34 - 3
src/main/java/com/uas/platform/b2c/prod/store/service/impl/ConsignmentAgreeRecordServiceImpl.java

@@ -5,7 +5,9 @@ import com.uas.platform.b2c.common.account.dao.UserDao;
 import com.uas.platform.b2c.common.account.model.Enterprise;
 import com.uas.platform.b2c.common.account.model.User;
 import com.uas.platform.b2c.core.support.SystemSession;
+import com.uas.platform.b2c.core.utils.JacksonUtils;
 import com.uas.platform.b2c.prod.store.dao.ConsignmentAgreeRecordDao;
+import com.uas.platform.b2c.prod.store.exception.EmptyParameterException;
 import com.uas.platform.b2c.prod.store.model.ConsignmentAgreeRecord;
 import com.uas.platform.b2c.prod.store.service.ConsignmentAgreeRecordService;
 import com.uas.platform.b2c.trade.support.CodeType;
@@ -14,14 +16,18 @@ import com.uas.platform.core.exception.IllegalStatusException;
 import com.uas.platform.core.model.PageInfo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageImpl;
+import org.springframework.data.domain.Pageable;
 import org.springframework.data.jpa.domain.Specification;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
+import org.springframework.util.StringUtils;
 
 import javax.persistence.criteria.CriteriaBuilder;
 import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
@@ -58,7 +64,7 @@ public class ConsignmentAgreeRecordServiceImpl implements ConsignmentAgreeRecord
 			throw new IllegalStatusException("用户企业信息不存在");
 		}
 
-		List<ConsignmentAgreeRecord> records = recordDao.findByEnUUAndUserUU(enterprise.getUu(), user.getUserUU());
+		List<ConsignmentAgreeRecord> records = recordDao.findByEnUUAndUserUU(enterprise.getUu().toString(), user.getUserUU());
 		if (CollectionUtils.isEmpty(records)) {
 			return null;
 		} else {
@@ -79,7 +85,7 @@ public class ConsignmentAgreeRecordServiceImpl implements ConsignmentAgreeRecord
 
 		Date operateTime = new Date();
 
-		record.setEnUU(enterprise.getUu());
+		record.setEnUU(enterprise.getUu().toString());
 		record.setEnterpriseName(enterprise.getEnName());
 		record.setUserUU(user.getUserUU());
 		record.setUserName(user.getUserName());
@@ -115,7 +121,7 @@ public class ConsignmentAgreeRecordServiceImpl implements ConsignmentAgreeRecord
 					record.setUserName(user.getUserName());
 				}
 
-				Enterprise enterprise = enterpriseDao.findByUu(record.getEnUU());
+				Enterprise enterprise = enterpriseDao.findByUu(Long.valueOf(record.getEnUU()));
 				if (enterprise != null) {
 					record.setEnterpriseName(enterprise.getEnName());
 				}
@@ -125,4 +131,29 @@ public class ConsignmentAgreeRecordServiceImpl implements ConsignmentAgreeRecord
 
 		return page;
 	}
+
+	@Override
+	public Page<Enterprise> pageEnterpriseWhenAdminQueryRecord(Pageable page, String keyword) {
+		if (page == null) {
+			throw new EmptyParameterException("Parameters about page can't be empty");
+		}
+
+		Page<String> pageUU;
+		if (StringUtils.isEmpty(keyword)) {
+			pageUU = recordDao.findOrderByEnUUDesc(page);
+		} else {
+			pageUU = recordDao.findEnUUByKeywordAndPage(keyword, page);
+		}
+
+		List<Enterprise> enterpriseList = new ArrayList<>();
+		if (!CollectionUtils.isEmpty(pageUU.getContent())) {
+			System.out.println(JacksonUtils.toJson(pageUU.getContent()));
+
+			for (String record : pageUU.getContent()) {
+				Enterprise enterprise = enterpriseDao.findByUu(Long.valueOf(record));
+				enterpriseList.add(enterprise);
+			}
+		}
+		return new PageImpl<>(enterpriseList, page, pageUU.getTotalElements());
+	}
 }

+ 65 - 1
src/main/java/com/uas/platform/b2c/prod/store/service/impl/StoreInServiceImpl.java

@@ -1,7 +1,11 @@
 package com.uas.platform.b2c.prod.store.service.impl;
 
+import com.uas.platform.b2c.advertise.ad.model.StoreAds;
+import com.uas.platform.b2c.advertise.ad.model.StoreAdsType;
+import com.uas.platform.b2c.advertise.ad.service.StoreAdsService;
 import com.uas.platform.b2c.core.config.SysConf;
 import com.uas.platform.b2c.core.support.SystemSession;
+import com.uas.platform.b2c.core.utils.JacksonUtils;
 import com.uas.platform.b2c.core.utils.UuidUtils;
 import com.uas.platform.b2c.prod.commodity.dao.GoodsDao;
 import com.uas.platform.b2c.prod.product.component.dao.ComponentDao;
@@ -9,6 +13,7 @@ import com.uas.platform.b2c.prod.product.component.modal.Component;
 import com.uas.platform.b2c.prod.store.dao.QualificationDao;
 import com.uas.platform.b2c.prod.store.dao.StoreBrandInfoDao;
 import com.uas.platform.b2c.prod.store.dao.StoreInDao;
+import com.uas.platform.b2c.prod.store.exception.EmptyParameterException;
 import com.uas.platform.b2c.prod.store.model.Qualification;
 import com.uas.platform.b2c.prod.store.model.StoreApply;
 import com.uas.platform.b2c.prod.store.model.StoreBrandInfo;
@@ -71,16 +76,19 @@ public class StoreInServiceImpl implements StoreInService {
 
 	private final StoreBrandInfoDao brandInfoDao;
 
+	private final StoreAdsService adsService;
+
 	private final SysConf sysConf;
 
 	@Autowired
-	public StoreInServiceImpl(StoreInDao storeDao, QualificationDao qualificationDao, GoodsDao goodsDao, ComponentDao componentDao, PurchaseDao purchaseDao, StoreBrandInfoDao brandInfoDao, SysConf sysConf) {
+	public StoreInServiceImpl(StoreInDao storeDao, QualificationDao qualificationDao, GoodsDao goodsDao, ComponentDao componentDao, PurchaseDao purchaseDao, StoreBrandInfoDao brandInfoDao, StoreAdsService adsService, SysConf sysConf) {
 		this.storeDao = storeDao;
 		this.qualificationDao = qualificationDao;
 		this.goodsDao = goodsDao;
 		this.componentDao = componentDao;
 		this.purchaseDao = purchaseDao;
 		this.brandInfoDao = brandInfoDao;
+		this.adsService = adsService;
 		this.sysConf = sysConf;
 	}
 
@@ -417,6 +425,62 @@ public class StoreInServiceImpl implements StoreInService {
 		}, pageInfo);
 	}
 
+	@Override
+	@Transactional
+	public StoreIn tagStoreInWhenAdminRecommend(StoreAdsType type, StoreIn store) {
+		if (type == null) {
+			throw  new EmptyParameterException("店铺广告类型不能为空");
+		}
+		if (store == null || store.getId() == null) {
+			throw new EmptyParameterException("待推荐店铺的ID不能为空");
+		}
+
+		store = storeDao.findOne(store.getId());
+
+		StoreAds ads = new StoreAds();
+		ads.setStoreId(store.getId());
+		ads.setStoreType(store.getType());
+		ads.setType(type);
+
+		ads = adsService.saveWhenAdminRecommend(ads);
+
+		if (ads != null) {
+			// 为店铺打上标签
+			String tagsJson = StringUtils.isEmpty(store.getTags()) ? "[]" : store.getTags();
+			List<StoreAdsType> tags = JacksonUtils.fromJsonArray(tagsJson, StoreAdsType.class);
+			Set<StoreAdsType> tagSet = new HashSet<>(tags);
+			tagSet.add(type);
+			store.setTags(JacksonUtils.toJson(tagSet));
+
+			storeDao.save(store);
+		}
+		return store;
+	}
+
+	@Override
+	@Transactional
+	public StoreIn cancelStoreTagsWhenAdminCancel(StoreAdsType type, StoreIn store) {
+		if (type == null) {
+			throw  new EmptyParameterException("店铺广告类型不能为空");
+		}
+		if (store == null || store.getId() == null) {
+			throw new EmptyParameterException("待推荐店铺的ID不能为空");
+		}
+
+		store = storeDao.findOne(store.getId());
+		StoreAds ads = adsService.deleteOneWhenAdminCancel(store.getId(), type);
+
+		// 为店铺打上标签
+		String tagsJson = StringUtils.isEmpty(store.getTags()) ? "[]" : store.getTags();
+		List<StoreAdsType> tags = JacksonUtils.fromJsonArray(tagsJson, StoreAdsType.class);
+		Set<StoreAdsType> tagSet = new HashSet<>(tags);
+		tagSet.remove(type);
+		store.setTags(JacksonUtils.toJson(tagSet));
+
+		storeDao.save(store);
+		return store;
+	}
+
 	@Override
 	public List<StoreIn> findFiveStores(String types, Integer num) {
 		String[] typeArray = types.split("-");

+ 20 - 3
src/main/java/com/uas/platform/b2c/prod/store/service/impl/StoreViolationsServiceImpl.java

@@ -1,5 +1,6 @@
 package com.uas.platform.b2c.prod.store.service.impl;
 
+import com.uas.platform.b2c.advertise.ad.service.StoreAdsService;
 import com.uas.platform.b2c.common.account.model.User;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.prod.store.dao.StoreInDao;
@@ -42,12 +43,15 @@ import java.util.List;
 @Service
 public class StoreViolationsServiceImpl implements StoreViolationsService {
 
+	private final StoreAdsService storeAdsService;
+
 	private final StoreViolationsDao violationsDao;
 
 	private final StoreInDao storeInDao;
 
 	@Autowired
-	public StoreViolationsServiceImpl(StoreViolationsDao violationsDao, StoreInDao storeInDao) {
+	public StoreViolationsServiceImpl(StoreAdsService storeAdsService, StoreViolationsDao violationsDao, StoreInDao storeInDao) {
+		this.storeAdsService = storeAdsService;
 		this.violationsDao = violationsDao;
 		this.storeInDao = storeInDao;
 	}
@@ -89,7 +93,10 @@ public class StoreViolationsServiceImpl implements StoreViolationsService {
 			if (days != null && days > 0) {
 				Calendar calendar = Calendar.getInstance();
 				calendar.setTime(violations.getCreateTime());
-				calendar.add(Calendar.DAY_OF_MONTH, days);
+				// calendar.add(Calendar.DAY_OF_MONTH, days);
+
+				// TODO huxz 暂时固定处置结束时间
+				calendar.add(Calendar.MINUTE, 10);
 
 				violations.setDisposeEndTime(calendar.getTime());
 			} else {
@@ -104,8 +111,12 @@ public class StoreViolationsServiceImpl implements StoreViolationsService {
 		// 设置店铺状态为违规关店
 		storeIn.setUpdateTime(new Date());
 		storeIn.setStatus(StoreStatus.CLOSED);
+		storeIn.setTags("[]");		// 清除推荐标签信息
 		storeInDao.save(storeIn);
 
+		// 去除违规店铺的推荐状态
+		storeAdsService.deleteWhenStoreClose(storeIn.getId());
+
 		return ResultMap.success(violations);
 	}
 
@@ -288,7 +299,7 @@ public class StoreViolationsServiceImpl implements StoreViolationsService {
 	}
 
 	@Override
-	@Transactional
+	@Transactional(rollbackFor = Exception.class)
 	public void autoFinishViolationsWhenDisposeTimeIsInvalid() {
 		Date date = new Date();
 		List<StoreViolations> violationsList = violationsDao.findByDisposeEndTimeLessThanAndCurrent(date, true);
@@ -302,6 +313,12 @@ public class StoreViolationsServiceImpl implements StoreViolationsService {
 					continue;
 				}
 
+				// 如果用户发起申述但没有审核或者管理员审核成功,则不进行自动任务
+				if (ViolationsStatus.COMPLAINT == violations.getStatus() || ViolationsStatus.SUCCESS == violations.getStatus()) {
+					continue;
+				}
+
+				violations.setRestore(true);
 				violations.setStatus(ViolationsStatus.DONE);
 				violations.setCurrent(false);
 				violations.setUpdateTime(new Date());

+ 14 - 2
src/main/java/com/uas/platform/b2c/prod/store/task/ViolationsAutoFinish.java

@@ -1,6 +1,7 @@
 package com.uas.platform.b2c.prod.store.task;
 
 import com.uas.platform.b2c.prod.store.service.StoreViolationsService;
+import org.apache.log4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.EnableAsync;
@@ -8,9 +9,12 @@ import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
 /**
  * 店铺违规处置自动结束定时任务
- * 每天0:0:0执行任务
+ * 每天0:0:0执行任务[cron: '0 0 0 1/1 * ?']
  *
  * @author huxz
  * @version 2017-08-14 14:59:56 创建文件
@@ -22,15 +26,23 @@ public class ViolationsAutoFinish {
 
 	private final StoreViolationsService violationsService;
 
+	private final Logger logger = Logger.getLogger(getClass());
+
 	@Autowired
 	public ViolationsAutoFinish(StoreViolationsService violationsService) {
 		this.violationsService = violationsService;
+		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+		logger.info(String.format("%s 店铺违规处置自动完成任务实例化", dateFormat.format(new Date())));
 	}
 
 	@Async
-	@Scheduled(cron = "0 0 0 1/1 * ?")
+	@Scheduled(cron = "0 */1 * * * ?")
 	public void execute() {
 		try {
+			Date startTime = new Date();
+			SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+			logger.info(String.format("%s 店铺违规处置自动完成任务开始", dateFormat.format(startTime)));
+
 			violationsService.autoFinishViolationsWhenDisposeTimeIsInvalid();
 		} catch (Exception e) {
 			e.printStackTrace();

+ 0 - 5
src/main/java/com/uas/platform/b2c/trade/order/service/impl/PurchaseServiceImpl.java

@@ -1436,9 +1436,4 @@ public class PurchaseServiceImpl implements PurchaseService {
 	public Logistics findByLgtId(Long lgtId) {
 		return logisticsDao.findOne(lgtId);
 	}
-
-	@Override
-	public Logistics modifyPurchaseLogistics(Long id) {
-		return null;
-	}
 }

+ 4 - 2
src/main/webapp/WEB-INF/spring/webmvc.xml

@@ -32,7 +32,7 @@
 
 	</mvc:annotation-driven>
 
-	<mvc:annotation-driven />
+	<!--<mvc:annotation-driven />-->
 
 	<mvc:default-servlet-handler />
 
@@ -42,7 +42,9 @@
 	<mvc:resources mapping="/images/static/**" location="/resources/" />
 	<mvc:resources mapping="/shop/static/**" location="/resources/" />
 
-	<context:component-scan base-package="com.uas.platform" />
+	<context:component-scan base-package="com.uas.platform" >
+		<context:exclude-filter type="annotation" expression="org.springframework.scheduling.annotation.EnableScheduling"/>
+	</context:component-scan>
 
 	<bean class="org.springframework.mobile.device.view.LiteDeviceDelegatingViewResolver">
 		<constructor-arg>

+ 100 - 0
src/main/webapp/WEB-INF/views/normal/adminWithNav.html

@@ -148,6 +148,8 @@
 			<li class="nav-node"><a href="#audit/bankinfo"><i class="fa fa-bank"></i><span> 银行账户信息</span></a></li>
 
 			<li class="nav-header">维护</li>
+			<li class="nav-node"><a href="#/store/company"><i
+					class="fa fa-flag"></i><span> 寄售管理</span></a></li>
 			<li class="nav-node"><a href="#/store/list"><i
 					class="fa fa-flag"></i><span> 店铺管理</span></a></li>
 			<li class="nav-node"><a href="#/store/application"><i
@@ -247,7 +249,105 @@
 		<i></i>
 	</div>
 	<!-- Loading End -->
+
+	<!-- 图片预览 -->
+	<div id="image-box" style="display: none">
+		<div class="x-floating-wrap"></div>
+		<div class="x-floating">
+			<div id="item-content">
+				<div class="x-close-wrap"><a href="javascript:void(0);">&times;</a></div>
+				<div class="img"><img/></div>
+			</div>
+		</div>
+	</div>
 </body>
+<style type="text/css">
+	/*查看大图*/
+	#image-box .x-floating-wrap,.image-box .x-floating-wrap {
+		position: fixed;
+		z-index: 99998;
+		background: #000;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		opacity: 0.5;
+	}
+	#image-box,.image-box{
+		display:table; overflow:hidden; margin-left:50px; _position:relative;  width: 1200px;height: 700px;
+		position: fixed;
+		top: 50%;
+		margin-top: -300px;
+		left: 50%;
+		margin-left: -600px;
+		z-index: 2000;
+	}
+	#image-box .x-floating,.image-box .x-floating {
+		vertical-align:middle !important;
+		display:table-cell;
+		text-align:center;
+		_position:absolute;
+		_top:50%; _left:50%;
+		top: inherit !important;
+		left: inherit !important;
+	}
+	#image-box .x-floating img ,.image-box .x-floating img {
+		margin: auto auto;
+		max-width: 970px !important;
+		max-height: 600px !important;
+		-webkit-user-select: none;
+		-moz-user-select: none;
+		-ms-user-select: none;
+		user-select: none;
+	}
+	#image-box .x-floating-wrap,.image-box .x-floating-wrap{
+		z-index: 1000000 !important;
+	}
+	#item-content{
+		color:#fff; display:inline-block; _position:relative; _top:-50%; _left:-50%;
+		position: relative;
+		z-index: 10000000;
+	}
+	#item-content div.x-close-wrap{
+		position: absolute;
+		right: -15px;
+		line-height: 30px;
+		top: -13px;
+		color: #fff;
+		width: 35px;
+		height: 35px;
+		background: rgba(0, 0, 0, 0.5);
+		border-radius: 100%;
+		opacity: 1;
+		margin: 0;
+		z-index: 100000;
+		min-height: initial;
+		text-align: center;
+	}
+	#item-content div.x-close-wrap a{
+		position: relative;
+		left: 0;
+		bottom: 0;
+		font-size: 34px;
+		color: #fff;
+	}
+	#item-content div.x-close-wrap a:hover{
+		text-decoration: none;
+		color: #fff !important;
+	}
+	#item-content div.x-close-wrap:hover{
+		cursor: pointer;
+		opacity: .9;
+	}
+	#item-content div.x-close-wrap img{
+		width: 30px !important;
+		height: 30px !important;
+	}
+	#item-content .img{
+		position: relative;
+		z-index: 10;
+	}
+</style>
 <script src="static/lib/quill/quill.core.js"></script>
 <script src="static/lib/quill/quill.min.js"></script>
 <script language="javascript" type="text/javascript" src="static/lib/datePicker/WdatePicker.js"></script>

+ 29 - 0
src/main/webapp/resources/js/admin/app.js

@@ -262,6 +262,18 @@
 			templateUrl : 'static/view/admin/brand_maintenance.html',
 			controller : 'BrandMaintenanceCtrl',
 			controllerUrl : 'app/controllers/BrandMaintenanceCtrl'
+		})).state('store_company_list', angularAMD.route({
+			// 寄售管理
+			url: '/store/company',
+			templateUrl : 'static/view/admin/store/store_company_list.html',
+			controller : 'StoreCompanyListCtrl',
+			controllerUrl : 'app/controllers/store/StoreCompanyListCtrl'
+		})).state('store_company_detail', angularAMD.route({
+			// 寄售管理-详情
+			url: '/store/company/:enUU/detail',
+			templateUrl : 'static/view/admin/store/store_company_detail.html',
+			controller : 'StoreCompanyDetailCtrl',
+			controllerUrl : 'app/controllers/store/StoreCompanyDetailCtrl'
 		})).state('store_application_maintenance', angularAMD.route({
 			// 店铺申请
 			url: '/store/application',
@@ -782,6 +794,23 @@
 			return '暂无信息'
 		};
 	});
+
+	 /**
+	  * 列表编号处理过滤器
+	  */
+	 app.filter('indexId', function () {
+		 return function (data) {
+			 if (data) {
+				 var len = data.toString().length;
+				 while(len < 3) {
+					 data = "0" + data;
+					 len++;
+				 }
+				 return data;
+			 }
+			 return '暂无信息'
+		 };
+	 });
 	
 	app.controller('AuthenticationCtrl', ['$scope', '$window', 'AuthenticationService', function($scope, $window, AuthenticationService) {
 	    $scope.logout = function() {

+ 7 - 25
src/main/webapp/resources/js/admin/controllers/StoreInfoListCtrl.js

@@ -37,6 +37,13 @@ define([ 'app/app' ], function(app) {
 					if (!data.content || !Array.isArray(data.content)) {
 						data.content = [];
 					}
+					angular.forEach(data.content, function (store) {
+						var tags = JSON.parse(store.tags || '[]');
+						store.tagsObject = {};
+						for (var i = 0; i < tags.length; i++) {
+							store.tagsObject[tags[i]] = true;
+						}
+					});
 					$defer.resolve(data.content);
 					params.total(data.totalElements);
 					console.log(data);
@@ -96,31 +103,6 @@ define([ 'app/app' ], function(app) {
 		}, function (resp) {
 		});
 
-		$scope.excellentSupplierMap = {};
-
-		/**
-		 * 获取原厂推荐信息
-		 */
-		StoreInfo.fiveStoresByTypes({	num : 5, types : 'ORIGINAL_FACTORY' }, {}, function (data) {
-			if (data && data.length > 0) {
-				angular.forEach(data, function (store) {
-					$scope.excellentSupplierMap[store.uuid] = true;
-				});
-			}
-		}, function () {
-		});
-
-		/**
-		 * 获取经销代理优秀供应商信息
-		 */
-		StoreCms.getStoreCmsByUseForAndCmsType({ num:5, types:'AGENCY-DISTRIBUTION' }, function (exStoreCms) {
-			if (exStoreCms && exStoreCms.length > 0) {
-				angular.forEach(exStoreCms, function (store) {
-					$scope.excellentSupplierMap[store.uuid] = true;
-				});
-			}
-		});
-
 		/**
 		 * 添加到店铺相关内容管理系统
 		 *

+ 72 - 0
src/main/webapp/resources/js/admin/controllers/store/StoreCompanyDetailCtrl.js

@@ -0,0 +1,72 @@
+define([ 'app/app' ], function(app) {
+	/**
+	 * 寄售管理详情页面,列表展示签订寄售协议记录信息
+	 *
+	 * @author huxz
+	 * @version 2017-09-01 17:17:23 create file
+	 */
+	app.register.controller('StoreCompanyDetailCtrl', ['$scope', 'ngTableParams', 'BaseService', 'toaster', 'ConsignmentAgreementRecord', '$stateParams', function ($scope, ngTableParams, BaseService, toaster, ConsignmentAgreementRecord, $stateParams) {
+
+		$scope.enUU = $stateParams.enUU || 0;
+
+		$scope.totalPages = 0;
+
+		$scope.isShow = 'ALL';
+
+		// 执行初始化操作
+		active();
+
+		/**
+		 * 初始化操作.
+		 */
+		function active() {
+			$scope.recordsTableParams = new ngTableParams({
+				page : 1,
+				count : 10,
+				sorting : {
+					operateTime : 'desc'
+				}
+			}, {
+				total : 0,
+				getData : function($defer, params) {
+					// 处理分页参数到URL中
+					var param = BaseService.parseParams(params.url());
+					param.enUU = $scope.enUU;
+
+					ConsignmentAgreementRecord.pageRecordWhenAdminQueryInfo(param, {}, function (page) {
+						$defer.resolve(page.content || []);
+						params.total(page.numberOfElements);
+						$scope.totalPages = page.totalPages;
+					}, function (error) {
+						console.log(error);
+						$defer.resolve([]);
+						params.total(0);
+						$scope.totalPages = 0;
+						toaster.pop('error', '数据获取失败,请重新刷新页面');
+					});
+				}
+			});
+		}
+
+		/**
+		 * 改变创建时间排序
+		 */
+		$scope.changeShorting = function () {
+			if ($scope.isShow === 'ALL') {
+				$scope.isShow = 'DOWN';
+
+				$scope.recordsTableParams.sorting({operateTime : 'DESC'});
+			} else if ($scope.isShow === 'DOWN') {
+				$scope.isShow = 'UP';
+
+				$scope.recordsTableParams.sorting({operateTime : 'ASC'});
+			} else if ($scope.isShow === 'UP') {
+				$scope.isShow = 'ALL';
+
+				$scope.recordsTableParams.sorting({operateTime : 'DESC'});
+			}
+			$scope.recordsTableParams.page(1);
+			$scope.recordsTableParams.reload();
+		};
+	}]);
+});

+ 75 - 0
src/main/webapp/resources/js/admin/controllers/store/StoreCompanyListCtrl.js

@@ -0,0 +1,75 @@
+define([ 'app/app' ], function(app) {
+	/**
+	 * 寄售管理页面,展示签订寄售协议的公司信息列表,点击“查看详情”跳转该公司签订寄售协议记录页面
+	 *
+	 * @author huxz
+	 * @version 2017-09-01 16:28:34 create file
+	 */
+	app.register.controller('StoreCompanyListCtrl', ['$scope', 'ngTableParams', 'BaseService', 'toaster', 'ConsignmentAgreementRecord', '$state', function ($scope, ngTableParams, BaseService, toaster, ConsignmentAgreementRecord, $state) {
+
+		$scope.keyword = "";
+		$scope.refreshTableData = refreshTableData;
+		$scope.totalPages = 0;
+
+		$scope.goDetailPage = goDetailPage;
+
+		// 执行初始化操作
+		active();
+
+		/**
+		 * 初始化操作.
+		 */
+		function active() {
+			$scope.recordsTableParams = new ngTableParams({
+				page : 1,
+				count : 10
+			}, {
+				total : 0,
+				getData : function($defer, params) {
+
+					// 处理分页参数到URL中
+					var param = BaseService.parseParams(params.url());
+
+					// 与服务器的分页参数名同步
+					param.page = param.page - 1;
+					param.size = param.count;
+
+					// 设置搜索关键字
+					if ($scope.keyword && $scope.keyword !== '') {
+						param.keyword = $scope.keyword;
+					}
+
+					ConsignmentAgreementRecord.pageEnterpriseWhenAdminQueryRecord(param, {}, function (page) {
+						console.log(page);
+						$defer.resolve(page.content || []);
+						params.total(page.totalElements);
+						$scope.totalPages = page.totalPages;
+					}, function (error) {
+						console.log(error);
+						$defer.resolve([]);
+						params.total(0);
+						$scope.totalPages = 0;
+						toaster.pop('error', '数据获取失败,请重新刷新页面!');
+					});
+				}
+			});
+		}
+
+		/**
+		 * 触发根据搜索关键字进行搜索
+		 */
+		function refreshTableData() {
+			console.log($scope.keyword);
+			$scope.recordsTableParams.page(1);
+			$scope.recordsTableParams.reload();
+			console.log($scope.recordsTableParams);
+		}
+
+		/**
+		 * 跳转签订寄售协议记录详情页面
+		 */
+		function goDetailPage(enterprise) {
+			$state.go('store_company_detail', {enUU: enterprise.uu});
+		}
+	}]);
+});

+ 92 - 2
src/main/webapp/resources/js/common/module/store_admin_violations_module.js

@@ -23,11 +23,15 @@ define([ 'ngResource', 'common/query/storeViolations', 'ngTable', 'ngSanitize',
 	/**
 	 * 企业信息记录
 	 */
-	module.controller('EnterpriseInfoCtrl', ['$scope', 'StoreInfo', 'toaster', 'ConsignmentAgreementRecord', 'ngTableParams', 'BaseService', function ($scope, StoreInfo, toaster, ConsignmentAgreementRecord, ngTableParams, BaseService) {
+	module.controller('EnterpriseInfoCtrl', ['$scope', 'StoreInfo', 'toaster', 'ConsignmentAgreementRecord', 'StoreAdsInformation', 'ngTableParams', 'BaseService', function ($scope, StoreInfo, toaster, ConsignmentAgreementRecord, StoreAdsInformation, ngTableParams, BaseService) {
 		console.log('EnterpriseInfoCtrl');
 
 		$scope.showRecords = true;
 
+		$scope.tagStoreWithTag = tagStoreWithTag;
+
+		$scope.showImg = showImg;
+
 		active();
 
 		/**
@@ -43,6 +47,12 @@ define([ 'ngResource', 'common/query/storeViolations', 'ngTable', 'ngSanitize',
 							return qualification.type === 'APTITUDE' && qualification.resourceUrl && qualification.resourceUrl !== '';
 						});
 					}
+					// 设置店铺推荐标签
+					var tags = JSON.parse($scope.store.tags || '[]');
+					$scope.store.tagsObject = {};
+					for (var i = 0; i < tags.length; i++) {
+						$scope.store.tagsObject[tags[i]] = true;
+					}
 					console.log($scope.store);
 					loadRecords($scope.store.enUU);
 				} else {
@@ -92,6 +102,48 @@ define([ 'ngResource', 'common/query/storeViolations', 'ngTable', 'ngSanitize',
 			});
 		}
 
+		/**
+		 * 为店铺打标签
+		 */
+		function tagStoreWithTag(store, tag) {
+			if ($scope.store.tagsObject[tag]) {
+				StoreAdsInformation.cancelStoreTagsWhenAdminCancel({type: tag}, store, function (store) {
+					toaster.pop('success', '操作成功');
+					$scope.tags = store.tags;
+					$scope.store.tagsObject[tag] = false;
+				}, function (error) {
+					toaster.pop('warning', '操作失败,请重试');
+					window.location.reload();
+				});
+			} else {
+				StoreAdsInformation.tagStoreInWhenAdminRecommend({type: tag}, store, function (store) {
+					toaster.pop('success', '操作成功');
+					$scope.tags = store.tags;
+					$scope.store.tagsObject[tag] = true;
+				}, function (error) {
+					toaster.pop('warning', '操作失败,请重试');
+					window.location.reload();
+				});
+			}
+		}
+
+		/**
+		 * 查看大图
+		 *
+		 * @param imgUrl		图片链接
+		 */
+		function showImg(imgUrl) {
+			var src = imgUrl, box = $('#image-box'), modal = $('.modal-content');
+			box.show();
+			box.find('img').attr('src', src);
+			box.find('a').click(function(){
+				box.hide();
+			});
+			box.dblclick(function(){
+				box.hide();
+			});
+		}
+
 	}]);
 
 	/**
@@ -111,6 +163,8 @@ define([ 'ngResource', 'common/query/storeViolations', 'ngTable', 'ngSanitize',
 		$scope.onUploadDisposeInfo = onUploadDisposeInfo;
 		$scope.deleteDisposeInfo = deleteDisposeInfo;
 
+		$scope.showImg = showImg;
+
 		active();
 
 		/**
@@ -180,7 +234,7 @@ define([ 'ngResource', 'common/query/storeViolations', 'ngTable', 'ngSanitize',
 				return 0;
 			}
 
-			// TODO huxz 处置店铺违规处置上传证明
+			// 处置店铺违规处置上传证明
 			if ($scope.disposeProof && $scope.disposeProof.length > 0) {
 				$scope.violations.disposeProof = $scope.disposeProof.filter(function (proof) {
 					return proof.url && proof.url !== '';
@@ -203,6 +257,23 @@ define([ 'ngResource', 'common/query/storeViolations', 'ngTable', 'ngSanitize',
 			});
 		}
 
+		/**
+		 * 查看大图
+		 *
+		 * @param imgUrl		图片链接
+		 */
+		function showImg(imgUrl) {
+			var src = imgUrl, box = $('#image-box'), modal = $('.modal-content');
+			box.show();
+			box.find('img').attr('src', src);
+			box.find('a').click(function(){
+				box.hide();
+			});
+			box.dblclick(function(){
+				box.hide();
+			});
+		}
+
 	}]);
 
 	/**
@@ -323,6 +394,8 @@ define([ 'ngResource', 'common/query/storeViolations', 'ngTable', 'ngSanitize',
 		$scope.wantRestoreStore = wantRestoreStore;
 		$scope.confirmRestoreStore = confirmRestoreStore;
 
+		$scope.showImg = showImg;
+
 		/**
 		 * 设置审核信息
 		 */
@@ -404,6 +477,23 @@ define([ 'ngResource', 'common/query/storeViolations', 'ngTable', 'ngSanitize',
 			});
 		}
 
+		/**
+		 * 查看大图
+		 *
+		 * @param imgUrl		图片链接
+		 */
+		function showImg(imgUrl) {
+			var src = imgUrl, box = $('#image-box'), modal = $('.modal-content');
+			box.show();
+			box.find('img').attr('src', src);
+			box.find('a').click(function(){
+				box.hide();
+			});
+			box.dblclick(function(){
+				box.hide();
+			});
+		}
+
 	}]);
 
 });

+ 57 - 1
src/main/webapp/resources/js/common/query/storeInfo.js

@@ -223,8 +223,64 @@ define([ 'ngResource' ], function() {
 			pageRecordWhenAdminQueryInfo: {
 				url: 'auth/store/consignment/record/pageByAdmin',
 				method: 'GET'
+			},
+			/**
+			 * 后台管理员分页获取同意寄售协议的企业信息
+			 *
+			 * @param page 页码,默认从0开始,第一页页码为0
+			 * @param size 每页记录数目,默认10条
+			 */
+			pageEnterpriseWhenAdminQueryRecord: {
+				url: 'auth/store/consignment/record/pageEnterprise',
+				method: 'GET'
+			}
+		});
+	}]).factory('StoreAdsInformation', ['$resource', function ($resource) {
+		return $resource('auth/api/store', {}, {
+			/**
+			 * 当管理员推荐店铺的时候,保存店铺的广告信息
+			 *
+			 * @param type		店铺广告类型
+			 * @param store		店铺信息
+			 */
+			tagStoreInWhenAdminRecommend: {
+				url: 'auth/api/store/tag-store',
+				method: 'PUT'
+			},
+			/**
+			 * 当管理员推荐店铺的时候,取消推荐店铺
+			 *
+			 * @param type		店铺广告类型
+			 * @param store		店铺信息
+			 */
+			cancelStoreTagsWhenAdminCancel: {
+				url: 'auth/api/store/cancel-tag',
+				method: 'PUT'
+			},
+			/**
+			 * 用户获取热销店铺列表信息
+			 *
+			 * @param page		页面,默认从0开始
+			 * @param size		页面大小
+			 * @param types		店铺类型
+			 */
+			showSalesListWhenUserQuery: {
+				url: 'api/ads/store/sales-list',
+				method: 'GET',
+				isArray: true
+			},
+			/**
+			 * 用户获取优秀店铺列表信息
+			 *
+			 * @param page		页面,默认从0开始
+			 * @param size		页面大小
+			 * @param types		店铺类型
+			 */
+			showExcellenceListWhenUserQuery: {
+				url: 'api/ads/store/excellence-list',
+				method: 'GET',
+				isArray: true
 			}
 		});
-
 	}]);
 });

+ 15 - 8
src/main/webapp/resources/js/provider/controllers/ProviderFactoriesCtrl.js

@@ -1,6 +1,6 @@
 define([ 'app/app', 'jquery-summernote' ], function(app) {
 	'use strict';
-	app.register.controller('ProviderFactoriesCtrl', ['$scope', '$rootScope', 'toaster', 'BrandActiveAPI', 'Carousel', 'StoreInfo', 'ngTableParams', 'BaseService', 'StoreCms', 'Order', function($scope, $rootScope, toaster, BrandActiveAPI, Carousel, StoreInfo, ngTableParams, BaseService, StoreCms, Order) {
+	app.register.controller('ProviderFactoriesCtrl', ['$scope', '$rootScope', 'toaster', 'BrandActiveAPI', 'Carousel', 'StoreInfo', 'ngTableParams', 'BaseService', 'StoreCms', 'Order', 'StoreAdsInformation', function($scope, $rootScope, toaster, BrandActiveAPI, Carousel, StoreInfo, ngTableParams, BaseService, StoreCms, Order, StoreAdsInformation) {
 		$rootScope.page = 'factories';
 		document.title = "原厂专区" + "-优软商城";
 
@@ -47,16 +47,23 @@ define([ 'app/app', 'jquery-summernote' ], function(app) {
 			/**
 			 * 获取原厂推荐信息
 			 */
-			StoreInfo.fiveStoresByTypes({	num : 5, types : 'ORIGINAL_FACTORY' }, {}, function (data) {
-				console.log(data.length);
-				if (data.length > 0) {
+			StoreAdsInformation.showExcellenceListWhenUserQuery({types: 'ORIGINAL_FACTORY'}, {}, function (data) {
+				if (angular.isArray(data) && data.length > 0) {
 					$scope.recommendOriginal = data;
-					console.log($scope.recommendOriginal);
+					angular.forEach(data, function (storeAds) {
+						if (storeAds.store) {
+							storeAds.uuid = storeAds.store.uuid;
+							storeAds.logoUrl = storeAds.store.logoUrl;
+							storeAds.storeName = storeAds.store.storeName;
+							storeAds.description = storeAds.store.description;
+						}
+					});
 				} else {
-					$scope.recommendOriginal = null;
+					$scope.recommendOriginal = [];
 				}
-			}, function () {
-				$scope.recommendOriginal = null;
+			}, function (error) {
+				console.log(error);
+				$scope.recommendOriginal = [];
 			});
 
 			/**

+ 19 - 3
src/main/webapp/resources/js/provider/controllers/ProviderHomeCtrl.js

@@ -6,7 +6,7 @@
  */
 define(['app/app'], function(app) {
 
-	app.register.controller('ProviderHomeCtrl', ['$scope', 'StoreCms', 'Carousel', '$rootScope', 'ngTableParams', 'BaseService', 'StoreInfo', 'Order', function ($scope, StoreCms, Carousel, $rootScope, ngTableParams, BaseService, StoreInfo, Order) {
+	app.register.controller('ProviderHomeCtrl', ['$scope', 'StoreCms', 'Carousel', '$rootScope', 'ngTableParams', 'BaseService', 'StoreInfo', 'Order', 'StoreAdsInformation', function ($scope, StoreCms, Carousel, $rootScope, ngTableParams, BaseService, StoreInfo, Order, StoreAdsInformation) {
 
 		/**********************************************************************
 		 * 初始化
@@ -47,8 +47,24 @@ define(['app/app'], function(app) {
 		/**
 		 * 获取优秀供应商信息
 		 */
-		StoreCms.getStoreCmsByUseForAndCmsType({ num:5, types:'AGENCY-DISTRIBUTION' }, function (exStoreCms) {
-			$scope.exStoreCms = exStoreCms || {};
+		StoreAdsInformation.showExcellenceListWhenUserQuery({types: 'AGENCY,DISTRIBUTION'}, {}, function (data) {
+			console.log(data);
+			if (angular.isArray(data) && data.length > 0) {
+				$scope.exStoreCms = data;
+				angular.forEach(data, function (storeAds) {
+					if (storeAds.store) {
+						storeAds.uuid = storeAds.store.uuid;
+						storeAds.logoUrl = storeAds.store.logoUrl;
+						storeAds.storeName = storeAds.store.storeName;
+						storeAds.description = storeAds.store.description;
+					}
+				});
+			} else {
+				$scope.exStoreCms = [];
+			}
+		}, function (error) {
+			console.log(error);
+			$scope.exStoreCms = [];
 		});
 
 		/**

+ 19 - 3
src/main/webapp/resources/js/provider/controllers/ProviderListCtrl.js

@@ -6,7 +6,7 @@
  */
 define(['app/app'], function(app) {
 
-	app.register.controller('ProviderListCtrl', ['$scope', 'StoreInfo', 'ngTableParams', 'BaseService', 'StoreCms', function ($scope, StoreInfo, ngTableParams, BaseService, StoreCms) {
+	app.register.controller('ProviderListCtrl', ['$scope', 'StoreInfo', 'ngTableParams', 'BaseService', 'StoreCms', 'StoreAdsInformation', function ($scope, StoreInfo, ngTableParams, BaseService, StoreCms, StoreAdsInformation) {
 
 		$scope.stores = {};
 
@@ -37,8 +37,24 @@ define(['app/app'], function(app) {
 		/**
 		 * 获取优秀供应商信息
 		 */
-		StoreCms.getStoreCmsByUseForAndCmsType({ num:5, types:'AGENCY-DISTRIBUTION' }, function (exStoreCms) {
-			$scope.exStoreCms = exStoreCms || {};
+		StoreAdsInformation.showExcellenceListWhenUserQuery({types: 'AGENCY,DISTRIBUTION'}, {}, function (data) {
+			console.log(data);
+			if (angular.isArray(data) && data.length > 0) {
+				$scope.exStoreCms = data;
+				angular.forEach(data, function (storeAds) {
+					if (storeAds.store) {
+						storeAds.uuid = storeAds.store.uuid;
+						storeAds.logoUrl = storeAds.store.logoUrl;
+						storeAds.storeName = storeAds.store.storeName;
+						storeAds.description = storeAds.store.description;
+					}
+				});
+			} else {
+				$scope.exStoreCms = [];
+			}
+		}, function (error) {
+			console.log(error);
+			$scope.exStoreCms = [];
 		});
 
 		$scope.search = function () {

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

@@ -560,7 +560,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
 					 size : 'sm',
 					 resolve : {
 						haveAdd : function(){
-							if (data == "success"){
+							if (data.data == "success"){
 								return true;
 							} else{
 								return false;

+ 5 - 0
src/main/webapp/resources/js/usercenter/controllers/ComponentStoreCtrl.js

@@ -18,7 +18,11 @@ define(['app/app'], function(app) {
 			params.page = $scope.pageInfo.page;
 			params.count = $scope.pageInfo.count;
 			collectionService.getStoreByUUAndComponent.call(null, params,function(data) {
+				$scope.isChooseAll = false;
 				$scope.collectInfo = data.content;
+				if ($scope.collectInfo.length==0){
+					$scope.isBatch = false;
+				}
 				$scope.totalElements = data.totalElements;
 				$scope.totalPages = data.totalPages;
 				$scope.number = data.number;
@@ -161,6 +165,7 @@ define(['app/app'], function(app) {
 				}
 				$scope.isBatchDelete = false;
 				$scope.deleteDiv = false;
+				$scope.isChooseAll = false;
 			} else {
 				collectionService.deleteStoreById({id: $scope.deleteID}, null, function(data) {
 					var store = [];

+ 4 - 0
src/main/webapp/resources/js/usercenter/controllers/forstore/browsing_history.js

@@ -12,6 +12,7 @@ define(['app/app'], function(app) {
 
         var loadData = function(){
             GoodsBrowsingHistory.getAllHistoryPage($scope.param, function(data){
+                $scope.isChooseAll = false;
                 $scope.initHistory = data.content;
                 $scope.param.currentPage = data.number;
                 $scope.totalPages = data.totalPages;
@@ -34,6 +35,9 @@ define(['app/app'], function(app) {
                     newhistory.dateList = $scope.midhistory[uniqueArr[i]];
                     $scope.history.push(newhistory);
                 };
+                if ($scope.history.length == 0){
+                    $scope.isBatch = false;
+                }
             },function () {
                 toaster.pop("error", "获取浏览历史记录失败");
             })

+ 2 - 0
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_invoice_ctrl.js

@@ -228,6 +228,8 @@ define(['app/app'], function(app) {
                 }, function(response) {
                     toaster.pop('error', '获取指定的发票信息失败');
                 });
+            } else {
+                return {};
             }
         };
 

+ 5 - 0
src/main/webapp/resources/js/usercenter/controllers/forstore/order_pay_ctrl.js

@@ -41,6 +41,11 @@ define(['app/app'], function(app) {
             });
         };
 
+        $scope.deliveryMethod = {
+			1301 : '第三方配送',
+			1302 : '卖家配送',
+			1303 : '上门自提'
+		};
 
         //选择相应的发票信息
 		$scope.selectBill = function(kind) {

+ 4 - 0
src/main/webapp/resources/js/usercenter/controllers/forstore/store_focus_ctrl.js

@@ -16,7 +16,11 @@ define(['app/app'], function(app) {
 		
 		var loadData = function(){
 			StoreFocusService.getStoreFocusPage($scope.param, {}, function(data){
+                $scope.isChooseAll = false;
 				$scope.store = data.content;
+                if ($scope.store.length == 0){
+                    $scope.isBatch = false;
+                }
                 $scope.totalElements = data.totalElements;
                 $scope.param.currentPage = data.number;
                 $scope.totalPages = data.totalPages;

+ 5 - 5
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_delivery_ctrl.js

@@ -482,11 +482,11 @@ define(['app/app'], function(app) {
                     toaster.pop('info', '注意', '物流公司名称为空');
                     return false;
                 }
-                var addrPatt = new RegExp("^[A-Za-z0-9\u4e00-\u9fa5]+$");
-                if (!addrPatt.test($scope.logistics.companyName)){
-                    toaster.pop("error", "注意", '请输入正确的物流公司名称');
-                    return false;
-                }
+                // var addrPatt = new RegExp("^[A-Za-z0-9\u4e00-\u9fa5]+$");
+                // if (!addrPatt.test($scope.logistics.companyName)){
+                //     toaster.pop("error", "注意", '请输入正确的物流公司名称');
+                //     return false;
+                // }
                 var patt = new RegExp("^[A-Za-z0-9]+$");
                 if (!patt.test($scope.logistics.number)){
                     toaster.pop("info", "注意", '请输入正确的物流单号');

+ 124 - 49
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_standard_putOn_ctrl.js

@@ -11,6 +11,7 @@ define(['app/app'], function (app) {
 
         $scope.$$putOn = {};
 
+        $scope.canSubmit = true;
 
         //判断是否是店铺信息
         var initSelfSale = function () {
@@ -264,21 +265,23 @@ define(['app/app'], function (app) {
          */
         $scope.blurLockQty = function (standard) {
             if(!standard.editLockQty) {
+				$scope.canSubmit = true;
                 return ;
             }
             if(isNaN(standard.editLockQty)) {
                 toaster.pop('warning', '提示', '锁库数只能是数字');
-                standard.editLockQty = null;
+				$scope.canSubmit = false;
                 return ;
             }
             if(Number(standard.editLockQty) < 0) {
-                standard.editLockQty = null;
                 toaster.pop('warning', '提示', '锁库数必须是大于等于0');
+				$scope.canSubmit = false;
                 return ;
             }
             if(Number(standard.repositoryQty) < Number(standard.editLockQty)) {
                 toaster.pop('warning', '提示', '锁库数大于了总库存数');
-                standard.editLockQty = null;
+				$scope.canSubmit = false;
+				return ;
             }
             standard.lockQty = !standard.lockQty ? 0 : standard.lockQty;
             standard.editLockQty =!standard.editLockQty ? 0 : standard.editLockQty;
@@ -288,10 +291,14 @@ define(['app/app'], function (app) {
             var minus = Number(standard.editLockQty)  - Number(standard.lockQty);
             if(minus > onSale) {
                 toaster.pop('warning', '提示', '新增锁库数不能超过可用库存');
-                standard.editLockQty = onSale + standard.lockQty;
-                standard.editAvailableOnSale = 0;
-                standard.editOnSaleQty = 0;
+				$scope.canSubmit = false;
+				return ;
+
+				/*standard.editLockQty = onSale + standard.lockQty;
+				standard.editAvailableOnSale = 0;
+				standard.editOnSaleQty = 0;*/
             }else {
+				$scope.canSubmit = true;
                 standard.editOnSaleQty = Number(standard.onSaleQty) - minus;
                 if(standard.editOnSaleQty < 1) {
                     standard.editAvailableOnSale = standard.editOnSaleQty + standard.availableOnSale;
@@ -309,71 +316,139 @@ define(['app/app'], function (app) {
          * @param index
          */
         $scope.putOn = function (standard, index) {
-            //验证库存信息
-            if(!$scope.checkGoodsInfo(standard)) {
-                return ;
+
+			//验证库存信息
+			if(!$scope.checkGoodsInfo(standard)) {
+				return ;
+			}
+
+            // 如果没有开启店铺,第一次寄售时则弹出寄售协议
+            if (!$scope.$$putOn.isSelfStore) {
+				ConsignmentAgreementRecord.findRecordOfUser({}, {}, function (record) {
+					if (!record.id) {
+						// 弹出寄售协议弹窗
+						$modal.open({
+							templateUrl : 'static/view/vendor/modal/confirm_consignment_agreement.html',
+							controller : 'ConfirmConsignmentAgreement'
+						}).result.then(function(){
+							productStandardPutOnInfoPutOn(standard, index);
+							// toaster.pop('success', '操作成功');
+						}, function(){
+							toaster.pop('success', '请签订寄售协议');
+						});
+					} else {
+						productStandardPutOnInfoPutOn(standard, index);
+                    }
+				}, function (error) {
+					console.log(error);
+					toaster.pop('error', '系统异常,请联系管理员寻求帮助');
+				});
+            } else {
+				productStandardPutOnInfoPutOn(standard, index);
             }
-            StandardPutOnAdminService.productStandardPutOnInfoPutOn(null, standard, function(data){
-                if(data.code == 1) {
-                    toaster.pop('success', '上架成功');
-                    $scope.standarPutOnTable.data.splice(index, 1, data.data);
-                }else {
-                    toaster.pop('warning', '失败', data.message);
-                }
-            }, function(response){
-                toaster.pop('error', '修改失败', response.data);
-            });
         };
 
+        function productStandardPutOnInfoPutOn(standard, index) {
+
+			StandardPutOnAdminService.productStandardPutOnInfoPutOn(null, standard, function(data){
+				if(data.code == 1) {
+					toaster.pop('success', '上架成功');
+					$scope.standarPutOnTable.data.splice(index, 1, data.data);
+				}else {
+					toaster.pop('warning', '失败', data.message);
+				}
+			}, function(response){
+				toaster.pop('error', '修改失败', response.data);
+			});
+		}
+
         /**
          * 用户更新库存信息
          * @param standard
          * @param index
          */
         $scope.updateInfo = function (standard, index) {
-            //验证库存信息
-            if(!$scope.checkGoodsInfo(standard)) {
-                return ;
-            }
-            StandardPutOnAdminService.updateProductStandardPutOnInfo(null, standard, function(data){
-                if(data.code == 1) {
-                    toaster.pop('success', '标准上架信息更新成功');
-                    $scope.standarPutOnTable.data.splice(index, 1, data.data);
-                }else {
-                    toaster.pop('warning', '失败', data.message);
-                }
-            }, function(response){
-                toaster.pop('error', '修改失败', response.data);
-            });
-        };
-
-        /**
-         * 改变销售方式
-         */
-        $scope.changeSale = function (standard) {
-            standard.editIsSelfSale = standard.editSelfSaleNum == 0;
-
-            if (!standard.editIsSelfSale) {
+			//验证库存信息
+			if(!$scope.checkGoodsInfo(standard)) {
+			    console.log('AVSSC');
+				return ;
+			}
+
+			// 如果没有开启店铺,第一次寄售时则弹出寄售协议
+			if (!$scope.$$putOn.isSelfStore) {
 				ConsignmentAgreementRecord.findRecordOfUser({}, {}, function (record) {
-				    if (!record.id) {
-				        // 弹出寄售协议弹窗
+					if (!record.id) {
+						// 弹出寄售协议弹窗
 						$modal.open({
 							templateUrl : 'static/view/vendor/modal/confirm_consignment_agreement.html',
 							controller : 'ConfirmConsignmentAgreement'
 						}).result.then(function(){
-							toaster.pop('success', '操作成功');
+							updateProductStandardPutOnInfo(standard, index);
+							// toaster.pop('success', '操作成功');
 						}, function(){
-							standard.editSelfSaleNum = 0;
-							standard.editIsSelfSale = standard.editSelfSaleNum === 0;
+							toaster.pop('success', '请签订寄售协议');
 						});
+					} else {
+						updateProductStandardPutOnInfo(standard, index);
                     }
 				}, function (error) {
-                    console.log(error);
-                    toaster.pop('error', '系统异常,请联系管理员寻求帮助');
+					console.log(error);
+					toaster.pop('error', '系统异常,请联系管理员寻求帮助');
 				});
+			} else {
+				updateProductStandardPutOnInfo(standard, index);
+			}
+        };
+
+        function updateProductStandardPutOnInfo(standard, index) {
+			StandardPutOnAdminService.updateProductStandardPutOnInfo(null, standard, function(data){
+				if(data.code == 1) {
+					toaster.pop('success', '标准上架信息更新成功');
+					$scope.standarPutOnTable.data.splice(index, 1, data.data);
+				}else {
+					toaster.pop('warning', '失败', data.message);
+				}
+			}, function(response){
+				toaster.pop('error', '修改失败', response.data);
+			});
+		}
+
+        /**
+         * 改变销售方式
+         */
+        $scope.changeSale = function (standard) {
+            standard.editIsSelfSale = standard.editSelfSaleNum == 0;
+
+            if (!standard.editIsSelfSale) {
+				checkAndShowConsignmentAgreement(standard);
             }
         };
 
+		/**
+         * 检查是否签订寄售协议,否则弹出寄售协议弹框
+         *
+		 * @param standard  标准产品信息
+		 */
+		function checkAndShowConsignmentAgreement(standard) {
+			ConsignmentAgreementRecord.findRecordOfUser({}, {}, function (record) {
+				if (!record.id) {
+					// 弹出寄售协议弹窗
+					$modal.open({
+						templateUrl : 'static/view/vendor/modal/confirm_consignment_agreement.html',
+						controller : 'ConfirmConsignmentAgreement'
+					}).result.then(function(){
+						toaster.pop('success', '操作成功');
+					}, function(){
+						standard.editSelfSaleNum = 0;
+						standard.editIsSelfSale = standard.editSelfSaleNum === 0;
+					});
+				}
+			}, function (error) {
+				console.log(error);
+				toaster.pop('error', '系统异常,请联系管理员寻求帮助');
+			});
+		}
+
         /**
          * 搜索的方法
          */

+ 9 - 2
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_store_close_ctrl.js

@@ -56,6 +56,12 @@ define(['app/app'], function (app) {
 		function clickShowComplaintArea() {
 			if ($scope.showComplaintArea) {
 				$scope.complaint = {};
+				$scope.complaint.complaintProof = [];
+
+				// 初始化用户的申述证明信息
+				for (var i = 0; i < 5; i++) {
+					$scope.complaint.complaintProof.push({createTime: new Date()});
+				}
 			}
 			$scope.showComplaintArea = !$scope.showComplaintArea;
 		}
@@ -101,7 +107,7 @@ define(['app/app'], function (app) {
 				return 0;
 			}
 
-			// TODO huxz 处理卖家待申述信息,去掉没有上传的证明信息
+			// 处理卖家待申述信息,去掉没有上传的证明信息
 			if ($scope.complaint.complaintProof && $scope.complaint.complaintProof.length > 0) {
 				$scope.violations.complaintProof = $scope.complaint.complaintProof.filter(function (proof) {
 					return proof && proof.url && proof.url !== '';
@@ -117,7 +123,8 @@ define(['app/app'], function (app) {
 					toaster.pop('success', '提交申述信息成功,请耐心等待!');
 				} else {
 					$scope.complaint = {};
-					toaster.pop('error', result.message);
+					// toaster.pop('error', result.message);
+					window.location.reload();
 				}
 			}, function (error) {
 				console.log(error);

+ 32 - 25
src/main/webapp/resources/view/admin/store/fragments/enterprise_info.html

@@ -193,6 +193,12 @@
 	.application-tab table tbody tr:hover{
 		background: #e4f3fc;
 	}
+	.text-left{
+		text-align: left !important;
+	}
+	.padding-left-30{
+		padding-left: 30px !important;
+	}
 </style>
 <div class="enterprise-info" ng-controller="EnterpriseInfoCtrl">
 	<h2 ng-bind="store.enterprise.enName">深圳市优软商城科技有限公司</h2>
@@ -266,9 +272,8 @@
 					<li ng-repeat="qualification in qualifications">
 						<div class="img"><img ng-src="{{qualification.resourceUrl}}"></div>
 						<div class="hover-show">
-							<!-- TODO huxz 暂时使用浏览器链接进行预览 -->
-							<!--<a ng-click=""><i class="fa fa-search"></i>查看</a>-->
-							<a ng-href="{{qualification.resourceUrl}}" target="_blank"><i class="fa fa-search"></i>查看</a>
+							<!-- 图片预览 -->
+							<a ng-click="showImg(qualification.resourceUrl)"><i class="fa fa-search"></i>查看</a>
 						</div>
 					</li>
 				</ul>
@@ -278,21 +283,23 @@
 		<div ng-if="showRecords" class="application-tab" style="width: 98%;margin: 0 auto;">
 			<div class="row" style="width: 100%">
 				<div class="col-md-12">
-					<div style="width: 100%;line-height: 50px;font-size: 16px;">
-						企业寄售协议操作记录
+					<div style="width: 100%;line-height: 50px;font-size: 14px;color: #3ba9e9;">
+						签订企业寄售协议记录
 					</div>
 					<table class="table" ng-table="recordsTableParams">
 						<thead>
 						<tr>
 							<th>序号</th>
+							<th>ID</th>
 							<th>操作人</th>
 							<th>操作时间</th>
 						</tr>
 						</thead>
 						<tbody>
 						<tr ng-repeat="record in $data">
-							<td style="text-align: center;" ng-bind="(recordsTableParams.page() - 1) * recordsTableParams.count() + $index + 1"></td>
-							<td style="text-align: center;" ng-bind="record.userName"></td>
+							<td style="text-align: center;" ng-bind="((recordsTableParams.page() - 1) * 10 + $index + 1) | indexId"></td>
+							<td class="text-left padding-left-30" ng-bind="record.userUU"></td>
+							<td class="text-left padding-left-30" ng-bind="record.userName"></td>
 							<td style="text-align: center;" ng-bind="record.operateTime | date: 'yyyy-MM-dd HH:mm:ss'"></td>
 						</tr>
 						</tbody>
@@ -301,23 +308,23 @@
 			</div>
 		</div>
 	</div>
-</div>
-<!--推荐相关内容 TODO huxz 暂时隐藏 -->
-<div class="recommend" style="display: none;">
-	<div class="recommend-list hot-icon">推荐成为:
-		<label>
-			<i class="hot"></i>热销
-			<input type="checkbox" id="hot">
-			<label for="hot"></label>
-		</label>
-		<label><i class="new"></i>新入驻
-			<input type="checkbox" id="new">
-			<label for="new"></label>
-		</label>
-		<label><i class="new-apply"></i>优秀供应商
-			<input type="checkbox" id="new-apply">
-			<label for="new-apply"></label>
-		</label>
+	<!--推荐相关内容 -->
+	<div class="recommend">
+		<div class="recommend-list hot-icon" ng-if="store.status === 'OPENED'">推荐成为:
+			<label>
+				<i class="hot"></i>热销
+				<input type="checkbox" id="hot"/><!-- ng-checked="store.tagsObject['SALES_LIST']" ng-click="tagStoreWithTag(store, 'SALES_LIST')" -->
+				<label for="hot"></label>
+			</label>
+			<label><i class="new"></i>新入驻
+				<input type="checkbox" id="new">
+				<label for="new"></label>
+			</label>
+			<label><i class="new-apply"></i>优秀供应商
+				<input type="checkbox" id="new-apply" ng-checked="store.tagsObject['EXCELLENCE_LIST']" ng-click="tagStoreWithTag(store, 'EXCELLENCE_LIST')">
+				<label for="new-apply"></label>
+			</label>
+		</div>
 	</div>
+	<div class="back-store"><a ng-href="{{'store/' + storeUuid}}" target="_blank"><button>前往店铺</button></a></div>
 </div>
-<div class="back-store"><a ng-href="{{'store/' + storeUuid}}" target="_blank"><button>前往店铺</button></a></div>

+ 5 - 5
src/main/webapp/resources/view/admin/store/fragments/violations_detail.html

@@ -309,8 +309,8 @@
 					<li ng-repeat="proof in violations.disposeProof">
 						<div class="img"><img ng-src="{{proof.url || 'static/img/vendor/images/company_zz.jpg'}}"></div>
 						<div class="hover-show">
-							<!--<a ng-click=""><i class="fa fa-search"></i>查看</a>-->
-							<a ng-href="{{proof.url}}" target="_blank"><i class="fa fa-search"></i>查看</a>
+							<!-- 图片预览 -->
+							<a ng-click="showImg(proof.url)"><i class="fa fa-search"></i>查看</a>
 						</div>
 					</li>
 				</ul>
@@ -329,8 +329,8 @@
 					<li ng-repeat="proof in violations.complaintProof">
 						<div class="img"><img ng-src="{{proof.url || 'static/img/vendor/images/company_zz.jpg'}}"></div>
 						<div class="hover-show">
-							<!--<a ng-click=""><i class="fa fa-search"></i>查看</a>-->
-							<a ng-href="{{proof.url}}" target="_blank"><i class="fa fa-search"></i>查看</a>
+							<!-- 图片预览 -->
+							<a ng-click="showImg(proof.url)"><i class="fa fa-search"></i>查看</a>
 						</div>
 					</li>
 				</ul>
@@ -371,7 +371,7 @@
 	<!-- 管理员恢复店铺经营记录 -->
 	<div class="violation-handler" style="margin-top: 5px" ng-if="violations.status === 'DONE' && violations.restore">
 		<div class="violation-content">
-			<h3 style="color: #f00">恢复店铺经营<span>审核人:<em ng-bind="violations.restoreOperator.name">哈哈哈</em><em ng-bind="violations.restoreOperator.operateTime | date: 'yyyy-MM-dd HH:mm:ss'">2017-07-02-13 14:50:50</em></span></h3>
+			<h3 style="color: #f00">恢复店铺经营<span>审核人:<em ng-bind="violations.restoreOperator.name || '系统'">哈哈哈</em><em ng-bind="(violations.restoreOperator.operateTime || violations.updateTime) | date: 'yyyy-MM-dd HH:mm:ss'">2017-07-02-13 14:50:50</em></span></h3>
 			<div class="recovery-deal">
 				<span>店铺已恢复经营</span>
 			</div>

+ 2 - 3
src/main/webapp/resources/view/admin/store/fragments/violations_handler.html

@@ -249,9 +249,8 @@
 						</div>
 						<div class="hover-show" ng-if="proof.url && proof.url !== ''">
 							<span class="delete" title="删除" ng-click="deleteDisposeInfo($index)"><i class="fa fa-trash"></i></span>
-							<!-- TODO huxz 暂时不做图片预览 -->
-							<!--<a ng-click=""><i class="fa fa-search"></i>查看</a>-->
-							<a ng-href="{{proof.url}}" target="_blank"><i class="fa fa-search"></i>查看</a>
+							<!-- 图片预览 -->
+							<a ng-click="showImg(proof.url)"><i class="fa fa-search"></i>查看</a>
 						</div>
 					</li>
 				</ul>

+ 205 - 0
src/main/webapp/resources/view/admin/store/store_company_detail.html

@@ -0,0 +1,205 @@
+<style>
+    /*导航样式*/
+    .com-title h2{
+        font-size: 24px;
+        color: #219ee6;
+    }
+    /*表格样式*/
+    .application-tab table tbody tr{
+        height: 50px;
+    }
+    .application-tab table tr th,.application-tab table tr td{
+        border: #cfedfe 1px solid;
+        text-align: center;
+        vertical-align: middle;
+    }
+    .application-tab .table-bordered{
+        border-top: #cfedfe 1px solid;
+    }
+    .application-tab table tr th{
+        background: #cfedfe;
+        height: 35px;
+    }
+    .application-tab table tbody tr:hover{
+        background: #e4f3fc;
+    }
+    .application-tab table tbody tr .btn{
+        border: none;
+        width: 60px;
+        height: 22px;
+        line-height: 22px;
+        color: #fff;
+        display: inline-block;
+        padding: 0;
+        font-size: 12px;
+        border-radius: 2px;
+    }
+    .application-tab table tbody tr .btn:hover{
+        background: #219ee6 ;
+    }
+    .application-tab table tbody tr .detail-bg {
+        background: #3ba9e9;
+    }
+    .text-left{
+        text-align: left !important;
+    }
+    .padding-left-30{
+        padding-left: 30px !important;
+    }
+    /*切换导航*/
+    .menu .col-sm-8{
+        padding: 0;
+        width: auto;
+    }
+    .menu{
+        width: 100%;
+        height: 40px;
+        background: #229ee6;
+        margin: 0;
+        line-height: 40px;
+        overflow: hidden;
+    }
+    .menu .btn{
+        border: none;
+        background: none;
+        color: #fff;
+        padding: 8px 30px;
+        width: 100px;
+    }
+    .menu .btn:active{
+        background: none;
+    }
+    .menu .btn-group{
+        height: 40px;
+    }
+    .menu .btn-primary:before,.menu a:hover:before{
+        content: "";
+        width: 20px;
+        height: 20px;
+        display: inline-block;
+        background: #fff;
+        transform: rotate(-45deg);
+        position: absolute;
+        bottom: -18px;
+        left: 47%;
+    }
+    .menu .col-sm-3{
+        float: right;
+        margin-right: 100px;
+        width: 270px;
+        padding: 0;
+    }
+    .menu .sreach-input{
+        position: relative;
+        margin-top: 5px;
+        width: 270px;
+        height: 40px;
+    }
+    .menu .sreach-input .form-control{
+        height: 30px;
+        float: left;
+        border-radius: 0;
+        font-size: 12px;
+    }
+    .menu .sreach-input button{
+        width: 60px;
+        height: 30px;
+        background: #b9e1f9;
+        float: right;
+        position: absolute;
+        right: 0;
+        top: 0;
+        border: none;
+        font-size: 14px;
+    }
+    /*显示记录条数*/
+    .text-rt{
+        text-align: right;
+    }
+    .record-stort{
+        line-height: 34px;
+        font-size: 12px;
+        margin-bottom: 0;
+        padding-right: 30px;
+    }
+    .record-stort em{
+        font-family: "Microsoft Yahei", "微软雅黑";
+        color: #229ee6;
+        font-style: inherit;
+        font-weight: inherit;
+        background: none;
+    }
+    .bread-crumb {
+        height: 24px;
+    }
+    .bread-crumb a{
+        color: #3ba9e9;
+    }
+
+    .application-tab table thead th p i {
+        color: #219ee6;
+    }
+    .tab-border {
+        border: #e9e9e9 1px solid;
+        padding-top: 20px;
+        padding-bottom: 100px;
+    }
+    .agree-text{
+        width: 500px;
+        color: #3ba9e9;
+        font-size: 12px;
+        margin-left: 40px;
+        position: relative;
+        top: -10px;
+    }
+</style>
+<div class="bread-crumb">
+    <a href="admin#/store/company">寄售管理</a>
+    <span>&gt;寄售协议</span>
+</div>
+<div class="row-fluid sortable tab-border">
+    <div class="menu row">
+        <div class="col-sm-8">
+            <div class="btn-group" role="group" aria-label="...">
+                <a type="button" class="btn btn-default btn-primary">寄售协议</a>
+            </div>
+        </div>
+        <div class="col-sm-3">
+        </div>
+    </div>
+    <div class="row">
+        <div class="text-rt col-sm-12">
+            <p class="record-stort">显示 <em style="color: #000000;" ng-bind="(recordsTableParams.page() - 1) * 10 + 1">1</em>-<em style="color: #000000;" ng-if="recordsTableParams.page() !== totalPages" ng-bind="recordsTableParams.page() * 10">10</em><em style="color: #000000;" ng-if="recordsTableParams.page() === totalPages" ng-bind="recordsTableParams.total()">10</em> 条记录,&nbsp;&nbsp;共 <em ng-bind="recordsTableParams.total()">1000</em> 条</p>
+        </div>
+    </div>
+    <!--公司自营表格-->
+    <div class="application-tab">
+        <table class="table table-bordered" ng-table="recordsTableParams">
+            <thead>
+                <tr>
+                    <th width="120">序号</th>
+                    <th width="340">ID</th>
+                    <th width="310">用户名</th>
+                    <th width="250">
+                        <p ng-click="changeShorting()" style="margin: 0;">签约时间
+                            <i class="fa fa-long-arrow-up" ng-if="isShow === 'ALL' || isShow == 'UP'"></i>
+                            <i class="fa fa-long-arrow-down" ng-if="isShow === 'ALL' || isShow == 'DOWN'"></i>
+                        </p>
+                    </th>
+                </tr>
+            </thead>
+            <tbody>
+                <tr ng-repeat="record in $data">
+                    <td ng-bind="((recordsTableParams.page() - 1) * 10 + $index + 1) | indexId">001</td>
+                    <td class="text-left padding-left-30" ng-bind="record.userUU">1452962582566</td>
+                    <td class="text-left padding-left-30" ng-bind="record.userName">维护和维护维护</td>
+                    <td ng-bind="record.operateTime | date: 'yyyy-MM-dd HH:mm:ss'">2017-05-09 10:28:30</td>
+                </tr>
+                <tr ng-if="!$data || $data.length <= 0">
+                    <td colspan="5">暂无寄售管理信息!</td>
+                </tr>
+            </tbody>
+        </table>
+        <div class="agree-text"><font style="color: #f00">*</font> 以上为该公司账套下,已同意寄售协议条款的ID</div>
+    </div>
+</div>

+ 177 - 0
src/main/webapp/resources/view/admin/store/store_company_list.html

@@ -0,0 +1,177 @@
+<style>
+    /*导航样式*/
+    .com-title h2{
+        font-size: 24px;
+        color: #219ee6;
+    }
+    /*表格样式*/
+    .application-tab table tbody tr{
+        height: 50px;
+    }
+    .application-tab table tr th,.application-tab table tr td{
+        border: #cfedfe 1px solid;
+        text-align: center;
+        vertical-align: middle;
+    }
+    .application-tab .table-bordered{
+        border-top: #cfedfe 1px solid;
+    }
+    .application-tab table tr th{
+        background: #cfedfe;
+        height: 35px;
+    }
+    .application-tab table tbody tr:hover{
+        background: #e4f3fc;
+    }
+    .application-tab table tbody tr .btn{
+        border: none;
+        width: 60px;
+        height: 22px;
+        line-height: 22px;
+        color: #fff;
+        display: inline-block;
+        padding: 0;
+        font-size: 12px;
+        border-radius: 2px;
+    }
+    .application-tab table tbody tr .btn:hover{
+        background: #219ee6 ;
+    }
+    .application-tab table tbody tr .detail-bg {
+        background: #3ba9e9;
+    }
+    .text-left{
+        text-align: left !important;
+    }
+    .padding-left-30{
+        padding-left: 30px !important;
+    }
+    /*切换导航*/
+    .menu .col-sm-8{
+        padding: 0;
+        width: auto;
+    }
+    .menu{
+        width: 100%;
+        height: 40px;
+        background: #229ee6;
+        margin: 0;
+        line-height: 40px;
+        overflow: hidden;
+    }
+    .menu .btn{
+        border: none;
+        background: none;
+        color: #fff;
+        padding: 8px 30px;
+        width: 100px;
+    }
+    .menu .btn:active{
+        background: none;
+    }
+    .menu .btn-group{
+        height: 40px;
+    }
+    .menu .btn-primary:before,.menu a:hover:before{
+        content: "";
+        width: 20px;
+        height: 20px;
+        display: inline-block;
+        background: #fff;
+        transform: rotate(-45deg);
+        position: absolute;
+        bottom: -18px;
+        left: 40%;
+    }
+    .menu .col-sm-3{
+        float: right;
+        margin-right: 100px;
+        width: 270px;
+        padding: 0;
+    }
+    .menu .sreach-input{
+        position: relative;
+        margin-top: 5px;
+        width: 270px;
+        height: 40px;
+    }
+    .menu .sreach-input .form-control{
+        height: 30px;
+        float: left;
+        border-radius: 0;
+        font-size: 12px;
+    }
+    .menu .sreach-input button{
+        width: 60px;
+        height: 30px;
+        background: #b9e1f9;
+        float: right;
+        position: absolute;
+        right: 0;
+        top: 0;
+        border: none;
+        font-size: 14px;
+    }
+    /*显示记录条数*/
+    .text-rt{
+        text-align: right;
+    }
+    .record-stort{
+        line-height: 34px;
+        font-size: 12px;
+        margin-bottom: 0;
+        padding-right: 30px;
+    }
+    .record-stort em{
+        font-family: "Microsoft Yahei", "微软雅黑";
+        color: #229ee6;
+        font-style: inherit;
+        font-weight: inherit;
+        background: none;
+    }
+</style>
+<div class="row-fluid sortable">
+    <div class="com-title">
+        <h2>寄售管理</h2>
+    </div>
+    <div class="menu row">
+        <div class="col-sm-8"></div>
+        <div class="col-sm-3">
+            <div class="sreach-input">
+                <input type="search" class="form-control" placeholder="公司名称/编号" ng-model="keyword" ng-search="refreshTableData()"/>
+                <button ng-click="refreshTableData()">搜索</button>
+            </div>
+        </div>
+    </div>
+    <div class="row">
+        <div class="text-rt col-sm-12">
+            <p class="record-stort">显示 <em style="color: #000000;" ng-bind="(recordsTableParams.page() - 1) * 10 + 1">1</em>-<em style="color: #000000;" ng-if="recordsTableParams.page() !== totalPages" ng-bind="recordsTableParams.page() * 10">10</em><em style="color: #000000;" ng-if="recordsTableParams.page() === totalPages" ng-bind="recordsTableParams.total()">10</em> 条记录,&nbsp;&nbsp;共 <em ng-bind="recordsTableParams.total()">1000</em> 条</p>
+        </div>
+    </div>
+    <!--公司自营表格-->
+    <div class="application-tab">
+        <table class="table table-bordered" ng-table="recordsTableParams">
+            <thead>
+                <tr>
+                    <th width="120">序号</th>
+                    <th width="200">公司编号</th>
+                    <th width="460">公司名称</th>
+                    <th width="250">创建时间</th>
+                    <th width="140">操作</th>
+                </tr>
+            </thead>
+            <tbody>
+                <tr ng-repeat="enterprise in $data">
+                    <td ng-bind="((recordsTableParams.page() - 1) * 10 + $index + 1) | indexId">001</td>
+                    <td ng-bind="enterprise.uu">001001001001</td>
+                    <td class="text-left padding-left-30" ng-bind="enterprise.enName">深圳市优软商城科技有限公司商城科技有限公司</td>
+                    <td ng-bind="enterprise.enDate | date:'yyyy-MM-dd HH:mm:ss'">2017-05-09 10:28:30</td>
+                    <td><a ng-click="goDetailPage(enterprise)" class="detail-bg btn">查看详情</a></td>
+                </tr>
+                <tr ng-if="!$data || $data.length <= 0">
+                    <td colspan="5">暂无寄售管理信息!</td>
+                </tr>
+            </tbody>
+        </table>
+    </div>
+</div>

+ 3 - 0
src/main/webapp/resources/view/admin/store/store_info_detail.html

@@ -1,4 +1,7 @@
 <style>
+	#store-detail a:hover {
+		text-decoration: none;
+	}
 	#store-detail .bread-crumb {
 		height: 24px;
 	}

+ 14 - 4
src/main/webapp/resources/view/admin/store_application_maintenance.html

@@ -22,9 +22,10 @@
 		text-align: right;
 	}
 	.record-stort{
-		line-height: 40px;
-		font-size: 14px;
+		line-height: 34px;
+		font-size: 12px;
 		margin-bottom: 0;
+		padding-right: 30px;
 	}
 	.record-stort em{
 		font-family: "Microsoft Yahei", "微软雅黑";
@@ -35,6 +36,7 @@
 	}
 	.menu .col-sm-8 ,.menu02 .col-sm-8{
 		padding: 0;
+		width: auto;
 	}
 	.menu{
 		width: 100%;
@@ -85,16 +87,21 @@
 	}
 	.menu .col-sm-3{
 		float: right;
-		margin-right: 4%;
+		margin-right: 100px;
+		width: 270px;
+		padding: 0;
 	}
 	.menu .sreach-input{
 		position: relative;
 		margin-top: 5px;
+		width: 270px;
+		height: 40px;
 	}
 	.menu .sreach-input .form-control{
 		height: 30px;
 		float: left;
 		border-radius: 0;
+		font-size: 12px;
 	}
 	.menu .sreach-input button{
 		width: 60px;
@@ -131,6 +138,9 @@
 		font-size: 12px;
 		border-radius: 2px;
 	}
+	.text-left{
+		text-align: left !important;
+	}
 	.application-tab table tbody tr .btn:hover{
 		background: #219ee6 ;
 	}
@@ -209,7 +219,7 @@
 			<tbody>
 			<tr ng-repeat="application in $data ">
 				<td ng-bind="$index + (applicationTableParams.page()-1 )* 10 + 1"></td>
-				<td ng-bind="application.storeName"></td>
+				<td ng-bind="application.storeName" class="text-left"></td>
 				<td ng-bind="application.storeShortName"></td>
 				<td ng-bind="application.type | storeType"></td>
 				<td>{{application.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>

+ 17 - 7
src/main/webapp/resources/view/admin/store_info_list.html

@@ -11,6 +11,7 @@
 	/*切换导航*/
 	.menu .col-sm-8{
 		padding: 0;
+		width: auto;
 	}
 	.menu{
 		width: 100%;
@@ -46,16 +47,21 @@
 	}
 	.menu .col-sm-3{
 		float: right;
-		margin-right: 4%;
+		margin-right: 100px;
+		width: 270px;
+		padding: 0;
 	}
 	.menu .sreach-input{
 		position: relative;
 		margin-top: 5px;
+		width: 270px;
+		height: 40px;
 	}
 	.menu .sreach-input .form-control{
 		height: 30px;
 		float: left;
 		border-radius: 0;
+		font-size: 12px;
 	}
 	.menu .sreach-input button{
 		width: 60px;
@@ -77,9 +83,10 @@
 		text-align: right;
 	}
 	.record-stort{
-		line-height: 40px;
-		font-size: 14px;
+		line-height: 34px;
+		font-size: 12px;
 		margin-bottom: 0;
+		padding-right: 30px;
 	}
 	.record-stort em{
 		font-family: "Microsoft Yahei", "微软雅黑";
@@ -119,6 +126,9 @@
 		font-size: 12px;
 		border-radius: 2px;
 	}
+	.text-left{
+		text-align: left !important;
+	}
 	.application-tab table tbody tr .btn:hover{
 		background: #219ee6 ;
 	}
@@ -215,8 +225,8 @@
 			<thead>
 			<tr>
 				<th width="140">店铺编号</th>
-				<th width="220">公司名称</th>
-				<th width="220">类型</th>
+				<th width="300">公司名称</th>
+				<th width="120">类型</th>
 				<th width="220">
 					<p ng-click="changeShorting()" style="margin: 0;">创建时间
 						<i class="fa fa-long-arrow-up" ng-if="isShow === 'ALL' || isShow == 'UP'"></i>
@@ -239,7 +249,7 @@
 			<tbody>
 			<tr ng-repeat="store in $data">
 				<td><a ng-href="{{'store/' + store.uuid}}" target="_blank"><span ng-bind="store.id | storeId"></span></a></td>
-				<td><span ng-bind="store.enterprise && store.enterprise.enName && store.enterprise.enName !== '' ? store.enterprise.enName : '暂无公司名称'"></span></td>
+				<td class="text-left"><span ng-bind="store.enterprise && store.enterprise.enName && store.enterprise.enName !== '' ? store.enterprise.enName : '暂无公司名称'"></span></td>
 				<td><span ng-bind="store.type | storeType"></span></td>
 				<td><span ng-bind="store.createTime | date : 'yyyy-MM-dd HH:mm:ss'"></span></td>
 				<td><span ng-bind="store.updateTime | date : 'yyyy-MM-dd HH:mm:ss'"></span></td>
@@ -250,7 +260,7 @@
 					<div ng-if="hotSalesMap[store.uuid]">
 						<i class="new"></i><span>新入驻</span>
 					</div>
-					<div ng-if="excellentSupplierMap[store.uuid]">
+					<div ng-if="store.tagsObject['EXCELLENCE_LIST']">
 						<i class="new-apply"></i><span>优秀供应商</span>
 					</div>
 				</td>

+ 2 - 2
src/main/webapp/resources/view/provider/provider_factories.html

@@ -434,7 +434,7 @@
 	</div>
 </div>-->
 
-<div id="recommends"  class="container" ng-if="recommendOriginal">
+<div id="recommends"  class="container" ng-if="recommendOriginal && recommendOriginal.length > 0">
 	<div class="title-icon">原厂推荐</div>
 	<div class="hr-blue"></div>
 	<ul class="recommend-list list-unstyled list-inline">
@@ -459,7 +459,7 @@
 	</ul>
 </div>
 
-<div>
+<div style="margin-top: 20px;">
 	<!-- 供应商列表 -->
 	<div ng-include src="'static/view/provider/list/suppliers.html'"></div>
 </div>

+ 1 - 1
src/main/webapp/resources/view/usercenter/componentStore.html

@@ -239,7 +239,7 @@ td {
 <div class="user_right fr">
 	<div class="rt_menu">
 		<span style="color:#5078cb">产品收藏({{totalElements}})</span>
-		<span ng-click="doBatch()" style="margin-left:840px" ng-hide="isBatch"><a>批量操作</a></span>
+		<span ng-click="doBatch()" style="margin-left:840px" ng-hide="isBatch || collectInfo.length == 0 || !collectInfo"><a>批量操作</a></span>
 		<div ng-show="isBatch" class="collect-batch">
 			<span ng-click="cancleBatch()"><a>取消</a></span>
 			<span ng-click="deleteByselected()"><a>移除</a></span>

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

@@ -389,9 +389,9 @@
             </select>-->
         </div>
         <div class="fr">
-            <span ng-hide="isBatch"ng-click="doBatch()">批量操作</span>
-            <span ng-show="isBatch"ng-click="cancleBatch()">取消</span>
-            <span ng-show="isBatch"ng-click="deleteByIds()">删除</span>
+            <span ng-hide="isBatch || history.length == 0" ng-click="doBatch()">批量操作</span>
+            <span ng-show="isBatch" ng-click="cancleBatch()">取消</span>
+            <span ng-show="isBatch" ng-click="deleteByIds()">删除</span>
             <span ng-show="isBatch">
                 <label class="check-active">
                     <input type="checkbox" id="isChooseAll" ng-checked="isChooseAll" ng-click="chooseAllHistory()">

+ 1 - 1
src/main/webapp/resources/view/usercenter/forstore/store_focus.html

@@ -277,7 +277,7 @@
 	<div class="store-whole">
 		<div class="store-header">
 			<span>全部店铺({{totalElements}})</span>
-			<span style="margin-left:850px;cursor:pointer;" ng-click="doBatch()" ng-hide="isBatch">批量操作</span>
+			<span style="margin-left:850px;cursor:pointer;" ng-click="doBatch()" ng-hide="isBatch || store.length == 0">批量操作</span>
 			<div ng-show="isBatch" class="store-isBatch">
 				<span ng-click="cancelBatch()">取消</span>
 				<span ng-click="deleteByIds()">取消关注</span>

+ 1 - 1
src/main/webapp/resources/view/usercenter/modal/collectModel.html

@@ -21,7 +21,7 @@
 <div>
 	<div class="modal-header">
 		<h3 class="header-text" ng-if="haveAdd">收藏成功!</h3>
-		<h3 class="header-text" ng-if="!haveAdd">请勿重复收藏!</h3>
+		<h3 class="header-text" ng-if="!haveAdd">你已收藏过该产品!</h3>
 	</div>
 	<div class="modal-body">
 		<button type="button" ng-click="cancel()" class="btn" style="margin-left:25px;">关&nbsp;&nbsp;闭</button>

+ 68 - 2
src/main/webapp/resources/view/vendor/forstore/vendor_standard_putOn.html

@@ -278,6 +278,16 @@
     .shelf-tab.table .edit-icon a.refresh i,.shelf-tab.table .edit-icon a.edit i,.shelf-tab.table .edit-icon a.upload i{
         color: #36ba02;
     }
+    /* 上架按钮 */
+    .shelf-tab.table .edit-icon a.refresh i,.shelf-tab.table .edit-icon a.edit i,.shelf-tab.table .edit-icon a.upload-custom{
+        background: none;
+        color: #36ba02;;
+        border: none;
+        padding: 0;
+    }
+    .shelf-tab.table .edit-icon a.refresh i,.shelf-tab.table .edit-icon a.edit i,.shelf-tab.table .edit-icon a.upload-custom i{
+        color: #36ba02;
+    }
     .shelf-tab.table .edit-icon a:hover i{
         color: #fff !important;
     }
@@ -323,6 +333,60 @@
     .text-more-40 span.text-more{
         width: 40px;
     }
+    /* 去掉按钮点击蓝框 */
+    .btn:focus,
+    .btn:active:focus,
+    .btn.active:focus,
+    .btn.focus,
+    .btn:active.focus,
+    .btn.active.focus {
+        outline: none;
+    }
+    /* 产品上架按钮 */
+    button.upload-custom {
+        width: 16px;
+        height: 16px;
+        background: #FFFFFF;
+        border-radius: 50%;
+        color: #36BA02;
+        border: none;
+        padding: 0;
+        text-align: center;
+        line-height: 14px;
+        font-size: 12px;
+    }
+    button.upload-custom:hover,
+    button.upload-custom:focus,
+    button.upload-custom:active{
+        background-color: #36BA02;
+        color: #FFFFFF;
+    }
+    button.upload-custom:focus {
+        background-color: #FFFFFF;
+        color: #36BA02;
+    }
+    /* 产品更新按钮 */
+    button.refresh-custom {
+        width: 16px;
+        height: 16px;
+        background: #FFFFFF;
+        border-radius: 50%;
+        color: #36BA02;
+        border: none;
+        padding: 0;
+        text-align: center;
+        line-height: 14px;
+        font-size: 12px;
+    }
+    button.refresh-custom:hover,
+    button.refresh-custom:active{
+        background-color: #36BA02;
+        color: #FFFFFF;
+    }
+    button.refresh-custom:focus {
+        background-color: #FFFFFF;
+        color: #36BA02;
+    }
 </style>
 <div class="user_right fr">
     <!--货品管理-->
@@ -571,8 +635,10 @@
                             <div ng-if="standard.status == 612">已下架</div>
                         </td>
                         <td class="edit-icon">
-                            <a title="上架"  ng-if="(standard.status == 1670 || standard.status == 612)&&((standard.editAvailableOnSale + standard.editOnSaleQty) >= 0)" ng-click="putOn(standard, $index)" class="upload"><i class="fa fa-upload"></i></a>
-                            <a title="更新" ng-if="standard.status == 601" ng-click="updateInfo(standard, $index)" class="refresh"><i class="fa fa-refresh"></i></a>
+                            <!--<a title="上架"  ng-if="(standard.status == 1670 || standard.status == 612)&&((standard.editAvailableOnSale + standard.editOnSaleQty) >= 0)" ng-click="putOn(standard, $index)" class="upload" ng-disabled="!canSubmit"><i class="fa fa-upload"></i></a>-->
+                            <!--<a title="更新" ng-if="standard.status == 601" ng-click="updateInfo(standard, $index)" class="refresh" ng-disabled="!canSubmit"><i class="fa fa-refresh"></i></a>-->
+                            <button type="button" title="上架"  ng-if="(standard.status == 1670 || standard.status == 612)&&((standard.editAvailableOnSale + standard.editOnSaleQty) >= 0)" ng-click="putOn(standard, $index)" class="btn upload-custom" ng-disabled="!canSubmit"><i class="fa fa-upload"></i></button>
+                            <button type="button" title="更新" ng-if="standard.status == 601" ng-click="updateInfo(standard, $index)" class="btn refresh-custom" ng-disabled="!canSubmit"><i class="fa fa-refresh"></i></button>
                             <a title="取消" ng-click="cancle(standard)" class="remove"><i class="fa fa-remove"></i></a>
                         </td>
                     </tr>

+ 1 - 1
src/main/webapp/resources/view/vendor/forstore/vendor_store_close.html

@@ -328,7 +328,7 @@
 						</div>
 						<div class="hover-show" ng-if="proof.url && proof.url !== ''">
 							<span class="delete" title="删除" ng-click="deleteProofInfo($index)"><i class="fa fa-trash"></i></span>
-							<!-- TODO huxz 暂时不做图片预览 -->
+							<!-- 图片预览 -->
 							<a ng-click="showImg(proof.url)"><i class="fa fa-search"></i>查看</a>
 							<!--<a ng-href="{{proof.url}}" target="_blank"><i class="fa fa-search"></i>查看</a>-->
 						</div>