Просмотр исходного кода

Merge branch 'logisticsModify-1203' into dev-mysql

# Conflicts:
#	src/main/webapp/resources/js/vendor/controllers/forstore/vendor_index_ctrl.js
#	src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js
#	src/main/webapp/resources/js/vendor/controllers/forstore/vendor_upload_ctrl.js
#	src/main/webapp/resources/view/vendor/forstore/vendor_delivery_rule.html
#	src/main/webapp/resources/view/vendor/forstore/vendor_material.html
#	src/main/webapp/resources/view/vendor/forstore/vendor_order.html
hulh 8 лет назад
Родитель
Сommit
535de7b3c5
36 измененных файлов с 1469 добавлено и 24 удалено
  1. 5 0
      src/main/java/com/uas/platform/b2c/external/erp/order/service/impl/OrderServiceImpl.java
  2. 53 0
      src/main/java/com/uas/platform/b2c/logistics/constant/TipType.java
  3. 9 0
      src/main/java/com/uas/platform/b2c/logistics/controller/DistributionRuleController.java
  4. 36 0
      src/main/java/com/uas/platform/b2c/logistics/controller/TipRecordController.java
  5. 8 0
      src/main/java/com/uas/platform/b2c/logistics/dao/DistributionRuleDao.java
  6. 31 0
      src/main/java/com/uas/platform/b2c/logistics/dao/TipRecordDao.java
  7. 84 0
      src/main/java/com/uas/platform/b2c/logistics/model/TipRecord.java
  8. 24 0
      src/main/java/com/uas/platform/b2c/logistics/model/UsableRuleInfo.java
  9. 7 0
      src/main/java/com/uas/platform/b2c/logistics/service/DistributionRuleService.java
  10. 22 0
      src/main/java/com/uas/platform/b2c/logistics/service/TipRecordService.java
  11. 42 11
      src/main/java/com/uas/platform/b2c/logistics/service/impl/DistributionRuleServiceImpl.java
  12. 63 0
      src/main/java/com/uas/platform/b2c/logistics/service/impl/TipRecordServiceImpl.java
  13. BIN
      src/main/webapp/resources/img/tour/1.gif
  14. BIN
      src/main/webapp/resources/img/tour/2.gif
  15. BIN
      src/main/webapp/resources/img/tour/3.gif
  16. BIN
      src/main/webapp/resources/img/tour/4.gif
  17. BIN
      src/main/webapp/resources/img/tour/4.png
  18. BIN
      src/main/webapp/resources/img/tour/5.gif
  19. BIN
      src/main/webapp/resources/img/tour/5.png
  20. 95 0
      src/main/webapp/resources/js/common/directives.js
  21. 15 0
      src/main/webapp/resources/js/common/query/logisticsPort.js
  22. 45 1
      src/main/webapp/resources/js/vendor/app.js
  23. 54 1
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_deliveryRule_ctrl.js
  24. 35 0
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_index_ctrl.js
  25. 41 1
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js
  26. 32 1
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_onSaleCtrl.js
  27. 33 3
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_upload_ctrl.js
  28. 102 0
      src/main/webapp/resources/lib/ui-tour/tour.js
  29. 109 0
      src/main/webapp/resources/view/common/modal/delivery_rule_modal.html
  30. 133 0
      src/main/webapp/resources/view/common/modal/product_upload_modal.html
  31. 15 1
      src/main/webapp/resources/view/usercenter/forstore/buyer_order.html
  32. 284 2
      src/main/webapp/resources/view/vendor/forstore/vendor_delivery_rule.html
  33. 14 1
      src/main/webapp/resources/view/vendor/forstore/vendor_index.html
  34. 59 1
      src/main/webapp/resources/view/vendor/forstore/vendor_material.html
  35. 3 0
      src/main/webapp/resources/view/vendor/forstore/vendor_onSale.html
  36. 16 1
      src/main/webapp/resources/view/vendor/forstore/vendor_order.html

+ 5 - 0
src/main/java/com/uas/platform/b2c/external/erp/order/service/impl/OrderServiceImpl.java

@@ -186,4 +186,9 @@ public class OrderServiceImpl implements OrderService {
 		logger.log("销售订单", "回写已下载订单,企业:" + SystemSession.getUser().getEnterprise().getEnName() + "数量:" + orderids.length);
 		return true;
 	}
+
+	@Override
+	public Long findAdminuu() {
+		return null;
+	}
 }

+ 53 - 0
src/main/java/com/uas/platform/b2c/logistics/constant/TipType.java

@@ -0,0 +1,53 @@
+package com.uas.platform.b2c.logistics.constant;
+
+/**
+ * 提示类型码
+ * @author hulh 10点16分
+ */
+public enum TipType {
+	/**
+	 * {@code 1201 适用于普通订单}
+	 */
+	TIP_LOGISTICS(101, "配送规则提示");
+
+
+	TipType(int value, String phrase) {
+		this.value = value;
+		this.phrase = phrase;
+	}
+	private final int value;
+
+	private final String phrase;
+
+	public int getValue() {
+		return this.value;
+	}
+
+	public String getPhrase() {
+		return this.phrase;
+	}
+
+	/**
+	 * @param statusCode 状态的编码
+	 * @return 状态
+	 * @throws IllegalArgumentException
+	 *             如果statusCode不存在的话
+	 */
+	public static TipType valueOf(int statusCode) {
+		for (TipType status : values()) {
+			if (status.value == statusCode) {
+				return status;
+			}
+		}
+		throw new IllegalArgumentException("没有与编号 [" + statusCode + "]匹配的类型");
+	}
+
+	/**
+	 * 返回状态码的编号
+	 * @return
+	 */
+	@Override
+	public String toString() {
+		return Integer.toString(value);
+	}
+}

+ 9 - 0
src/main/java/com/uas/platform/b2c/logistics/controller/DistributionRuleController.java

@@ -90,6 +90,15 @@ public class DistributionRuleController {
 		return distributionRuleService.findCountRule();
 	}
 
+	/**
+	 * 返回当前enuu启用配送规则总数
+	 * @return
+	 */
+	@RequestMapping(value = "/active/count", method = RequestMethod.GET)
+	public ResultMap findActiveRuleCount(){
+		return distributionRuleService.findCountActiveRule();
+	}
+
 	/**
 	 * 查找配送规则名是否存在
 	 * @param id

+ 36 - 0
src/main/java/com/uas/platform/b2c/logistics/controller/TipRecordController.java

@@ -0,0 +1,36 @@
+package com.uas.platform.b2c.logistics.controller;
+
+import com.uas.platform.b2c.logistics.model.TipRecord;
+import com.uas.platform.b2c.logistics.service.TipRecordService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 提示记录Controller
+ * @author hulh
+ */
+@RestController
+@RequestMapping("/tip/record")
+public class TipRecordController {
+
+	@Autowired
+	private TipRecordService tipRecordService;
+
+	/**
+	 * 根据当前userUu查询配送规则提示
+	 */
+	@RequestMapping(value = "/rule", method = RequestMethod.GET)
+	public TipRecord findTipRecordOfRule() {
+		return tipRecordService.findByUserUuOfRule();
+	}
+
+	/**
+	 * 根据当前userUu切换配送规则提示
+	 */
+	@RequestMapping(value = "/rule/close", method = RequestMethod.PUT)
+	public TipRecord turnTipRecordOfRule() {
+		return tipRecordService.turnTipRecordOfRule();
+	}
+}

+ 8 - 0
src/main/java/com/uas/platform/b2c/logistics/dao/DistributionRuleDao.java

@@ -33,6 +33,14 @@ public interface DistributionRuleDao extends JpaSpecificationExecutor<Distributi
 	@Query(value = "select count(1) from DistributionRule d where d.enuu = :enuu")
 	int findCountByEnuu(@Param("enuu") Long enuu);
 
+	/**
+	 * 根据enuu查询启用的配送规则数
+	 * @param enuu
+	 * @return
+	 */
+	@Query(value = "select count(1) from DistributionRule d where d.enuu = :enuu and d.active = 1")
+	int findCountByEnuuAndActive(@Param("enuu") Long enuu);
+
 	/**
 	 * 根据enuu获取所有的配送规则
 	 * @param enuu

+ 31 - 0
src/main/java/com/uas/platform/b2c/logistics/dao/TipRecordDao.java

@@ -0,0 +1,31 @@
+package com.uas.platform.b2c.logistics.dao;
+
+import com.uas.platform.b2c.logistics.model.TipRecord;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * 提示记录dao层
+ */
+@Repository
+public interface TipRecordDao extends JpaSpecificationExecutor<TipRecord>, JpaRepository<TipRecord, Long> {
+
+	/**
+	 * 根据类型返回提示记录
+	 * @param useruu
+	 * @param type
+	 * @return
+	 */
+	List<TipRecord> findByUseruuAndTypeOrderByTipAgainDesc(Long useruu, Integer type);
+
+	/**
+	 * 根据类型返回不再提示记录
+	 * @param useruu
+	 * @param type
+	 * @return
+	 */
+	List<TipRecord> findByUseruuAndTypeAndTipAgainOrderByTipAgainDesc(Long useruu, Integer type, Short tipAgain);
+}

+ 84 - 0
src/main/java/com/uas/platform/b2c/logistics/model/TipRecord.java

@@ -0,0 +1,84 @@
+package com.uas.platform.b2c.logistics.model;
+
+import javax.persistence.*;
+
+/**
+ * 提示记录
+ * @author hulh
+ */
+@Entity
+@Table(name = "tip_record")
+public class TipRecord {
+
+	/**
+	 * 主键id
+	 */
+	@Id
+	@GeneratedValue
+	@Column(name = "tip_id")
+	private Long id;
+
+	/**
+	 * 用户uu
+	 */
+	@Column(name = "tip_uu")
+	private Long useruu;
+
+	/**
+	 * 企业enuu
+	 */
+	@Column(name = "tip_enuu")
+	private Long enuu;
+
+	/**
+	 * 是否再提示 1 再提示 0 不再提示
+	 */
+	@Column(name = "tip_again")
+	private Short tipAgain;
+
+	/**
+	 * 提示类型
+	 */
+	@Column(name = "tip_type")
+	private Integer type;
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public Long getUseruu() {
+		return useruu;
+	}
+
+	public void setUseruu(Long useruu) {
+		this.useruu = useruu;
+	}
+
+	public Long getEnuu() {
+		return enuu;
+	}
+
+	public void setEnuu(Long enuu) {
+		this.enuu = enuu;
+	}
+
+	public Short getTipAgain() {
+		return tipAgain;
+	}
+
+	public void setTipAgain(Short tipAgain) {
+		this.tipAgain = tipAgain;
+	}
+
+	public Integer getType() {
+		return type;
+	}
+
+	public void setType(Integer type) {
+		this.type = type;
+	}
+}

+ 24 - 0
src/main/java/com/uas/platform/b2c/logistics/model/UsableRuleInfo.java

@@ -1,10 +1,34 @@
 package com.uas.platform.b2c.logistics.model;
 
+import com.uas.platform.b2c.core.constant.Type;
+
 /**
  * Created by hulh on 2017/9/13.
  * 适用的配送规则简要信息
  */
 public class UsableRuleInfo {
+
+	/**
+	 * 单例实现共用的上门自提配送规则
+	 */
+	private static volatile UsableRuleInfo TAKE_SELF_RULE = null;
+	private static final String TAKE_SELF_NAME = "上门自提免运费";
+
+	public static UsableRuleInfo getTakeSelfRule(){
+		if (TAKE_SELF_RULE == null){
+			synchronized (UsableRuleInfo.class){
+				if (TAKE_SELF_RULE == null){
+					TAKE_SELF_RULE = new UsableRuleInfo();
+					TAKE_SELF_RULE.setMethod(Type.Delivery_BySelf_Code.value());
+					TAKE_SELF_RULE.setRuleName(TAKE_SELF_NAME);
+					TAKE_SELF_RULE.setFare(0d); //运费默认为0
+					TAKE_SELF_RULE.setFareType((short)1); //运费类型默认为统一运费
+				}
+			}
+		}
+		return TAKE_SELF_RULE;
+	}
+
 	/**
 	 * 配送id
 	 */

+ 7 - 0
src/main/java/com/uas/platform/b2c/logistics/service/DistributionRuleService.java

@@ -58,6 +58,13 @@ public interface DistributionRuleService {
 	 */
 	ResultMap findCountRule();
 
+	/**
+	 * 返回当前enuu下启用配送规则总数
+	 * @return
+	 */
+	ResultMap findCountActiveRule();
+
+
 	/**
 	 * 查找是否已存在该名称
 	 * @param id

+ 22 - 0
src/main/java/com/uas/platform/b2c/logistics/service/TipRecordService.java

@@ -0,0 +1,22 @@
+package com.uas.platform.b2c.logistics.service;
+
+import com.uas.platform.b2c.logistics.model.TipRecord;
+
+/**
+ * 提示记录Service
+ * @author hulh
+ */
+public interface TipRecordService {
+
+	/**
+	 * 根据userUu查询配送规则提示记录
+	 * @return
+	 */
+	TipRecord findByUserUuOfRule();
+
+	/**
+	 * 根据userUu查询配送规则提示记录
+	 * @return
+	 */
+	TipRecord turnTipRecordOfRule();
+}

+ 42 - 11
src/main/java/com/uas/platform/b2c/logistics/service/impl/DistributionRuleServiceImpl.java

@@ -4,15 +4,15 @@ import com.alibaba.fastjson.JSONObject;
 import com.uas.platform.b2c.core.config.SysConf;
 import com.uas.platform.b2c.core.constant.ShortConstant;
 import com.uas.platform.b2c.core.constant.SplitChar;
+import com.uas.platform.b2c.core.constant.Type;
 import com.uas.platform.b2c.core.support.SystemSession;
+import com.uas.platform.b2c.logistics.dao.AddressTakeSelfDao;
 import com.uas.platform.b2c.logistics.dao.DistributionRuleDao;
-import com.uas.platform.b2c.logistics.model.DistributionRule;
-import com.uas.platform.b2c.logistics.model.RuleQtyArea;
-import com.uas.platform.b2c.logistics.model.RuleQtyFare;
-import com.uas.platform.b2c.logistics.model.UsableRuleInfo;
+import com.uas.platform.b2c.logistics.model.*;
 import com.uas.platform.b2c.logistics.service.DistributionRuleService;
 import com.uas.platform.b2c.prod.store.dao.StoreInDao;
 import com.uas.platform.b2c.prod.store.model.StoreIn;
+import com.uas.platform.b2c.prod.store.model.StoreStatus;
 import com.uas.platform.b2c.trade.support.CodeType;
 import com.uas.platform.b2c.trade.support.ResultMap;
 import com.uas.platform.core.exception.IllegalOperatorException;
@@ -47,6 +47,9 @@ public class DistributionRuleServiceImpl implements DistributionRuleService{
 	@Autowired
 	private StoreInDao storeInDao;
 
+	@Autowired
+	private AddressTakeSelfDao takeSelfDao;
+
 	@Autowired
 	private SysConf sysConf;
 
@@ -225,6 +228,26 @@ public class DistributionRuleServiceImpl implements DistributionRuleService{
 		return ResultMap.success(count);
 	}
 
+	/**
+	 * 查询已设置配送规则的数量,启用的,返回是否显示提示
+	 * @return
+	 */
+	@Override
+	public ResultMap findCountActiveRule() {
+		Long enuu = SystemSession.getUser().getEnterprise().getUu();
+		List<StoreIn> storeList = storeInDao.findByEnUU(enuu);
+		int count = distributionRuleDao.findCountByEnuuAndActive(enuu);
+		if (!CollectionUtils.isEmpty(storeList)){
+			StoreIn storeIn = storeList.get(0);
+			if (count == 0 && storeIn.getStatus() == StoreStatus.OPENED){
+				return ResultMap.success(true);
+			}else {
+				return ResultMap.success(false);
+			}
+		}
+		return ResultMap.success(false);
+	}
+
 	/**
 	 * 根据配送规则名称查询是否已存在
 	 * @param id
@@ -287,12 +310,14 @@ public class DistributionRuleServiceImpl implements DistributionRuleService{
 			throw new IllegalOperatorException("配送规则信息丢失,请刷新后重试");
 		}
 		for (UsableRuleInfo info : ruleList){
-			DistributionRule rule = distributionRuleDao.findOne(info.getId());
-			if (rule == null){
-				throw new IllegalOperatorException("配送规则信息丢失,请刷新后重试");
+			if (info.getId() != null && info.getMethod() != Type.Delivery_BySelf_Code.value()){
+				DistributionRule rule = distributionRuleDao.findOne(info.getId());
+				if (rule == null){
+					throw new IllegalOperatorException("配送规则信息丢失,请刷新后重试");
+				}
+				Double fare = getFareOfRule(rule, price);
+				info.setFare(fare);
 			}
-			Double fare = getFareOfRule(rule, price);
-			info.setFare(fare);
 		}
 		return ruleList;
 	}
@@ -332,7 +357,8 @@ public class DistributionRuleServiceImpl implements DistributionRuleService{
 		List<UsableRuleInfo> ruleInfoList = new ArrayList<>();
 		List<Integer> methodList = new ArrayList<>();
 		for (DistributionRule rule : allRuleList){
-			if (!methodList.contains(rule.getShippingMethod())){
+			if (!methodList.contains(rule.getShippingMethod()) &&
+					!rule.getShippingMethod().equals(Type.Delivery_BySelf_Code.value())){
 				List<RuleQtyArea> qtyArea = rule.getAreas();
 				//转化分段地区信息
 				Map<String, Map<String, List<String>>> resultMap = convertArea(qtyArea);
@@ -347,10 +373,15 @@ public class DistributionRuleServiceImpl implements DistributionRuleService{
 					ruleInfoList.add(info);
 				}
 			}
-			if (methodList.size() == 3){
+			if (methodList.size() == 2){
 				break;
 			}
 		}
+		List<AddressTakeSelf> takeSelfList = takeSelfDao.findByEnuuAndActiveOrderByCreatetimeDesc(store.getEnUU(), ShortConstant.YES_SHORT);
+		if (!CollectionUtils.isEmpty(takeSelfList)){
+			UsableRuleInfo takeRule = UsableRuleInfo.getTakeSelfRule();
+			ruleInfoList.add(takeRule);
+		}
 		return ruleInfoList;
 	}
 

+ 63 - 0
src/main/java/com/uas/platform/b2c/logistics/service/impl/TipRecordServiceImpl.java

@@ -0,0 +1,63 @@
+package com.uas.platform.b2c.logistics.service.impl;
+
+import com.uas.platform.b2c.common.account.model.User;
+import com.uas.platform.b2c.core.constant.ShortConstant;
+import com.uas.platform.b2c.core.support.SystemSession;
+import com.uas.platform.b2c.logistics.constant.TipType;
+import com.uas.platform.b2c.logistics.dao.TipRecordDao;
+import com.uas.platform.b2c.logistics.model.TipRecord;
+import com.uas.platform.b2c.logistics.service.TipRecordService;
+import com.uas.platform.core.exception.IllegalOperatorException;
+import org.apache.commons.collections.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * @author hulh
+ */
+@Service
+public class TipRecordServiceImpl implements TipRecordService {
+
+	@Autowired
+	private TipRecordDao tipRecordDao;
+
+	@Override
+	public TipRecord findByUserUuOfRule() {
+		User user = SystemSession.getUser();
+		List<TipRecord> recordList =  tipRecordDao.findByUseruuAndTypeOrderByTipAgainDesc(user.getUserUU(),
+				TipType.TIP_LOGISTICS.getValue());
+		if (CollectionUtils.isEmpty(recordList)){
+			return newOneRecord(user);
+		}
+
+		return recordList.get(0);
+	}
+
+	@Override
+	public TipRecord turnTipRecordOfRule() {
+		User user = SystemSession.getUser();
+		List<TipRecord> recordList =  tipRecordDao.findByUseruuAndTypeOrderByTipAgainDesc(user.getUserUU(),
+				TipType.TIP_LOGISTICS.getValue());
+		if (CollectionUtils.isEmpty(recordList)){
+			throw new IllegalOperatorException("操作异常");
+		}
+		TipRecord record = recordList.get(0);
+		if (record.getTipAgain() == 1)
+			return record;
+		record.setTipAgain(ShortConstant.YES_SHORT);
+		return tipRecordDao.save(record);
+	}
+
+	@Transactional
+	private TipRecord newOneRecord(User user){
+		TipRecord record = new TipRecord();
+		record.setEnuu(user.getEnterprise().getUu());
+		record.setUseruu(user.getUserUU());
+		record.setType(TipType.TIP_LOGISTICS.getValue());
+		record.setTipAgain(ShortConstant.NO_SHORT);
+		return tipRecordDao.save(record);
+	}
+}

BIN
src/main/webapp/resources/img/tour/1.gif


BIN
src/main/webapp/resources/img/tour/2.gif


BIN
src/main/webapp/resources/img/tour/3.gif


BIN
src/main/webapp/resources/img/tour/4.gif


BIN
src/main/webapp/resources/img/tour/4.png


BIN
src/main/webapp/resources/img/tour/5.gif


BIN
src/main/webapp/resources/img/tour/5.png


+ 95 - 0
src/main/webapp/resources/js/common/directives.js

@@ -867,4 +867,99 @@ define(['angular', 'showdown', 'angular-toaster'], function(angular) {
 			}
 		};
 	}]);
+	/*global angular */
+	/**
+	 * uiTour directive
+	 *
+	 * @example:
+	 *   <ul ui-tour="currentStep">
+	 *     <li target="#someId">
+	 *       First Tooltip
+	 *       <a ng-click="currentStep=currentStep+1">Next</a>
+	 *     </li>
+	 *     <li target=".items:eq(2)" name="two">
+	 *       Second Tooltip
+	 *       <a ng-click="currentStep=currentStep-1">Prev</a>
+	 *     </li>
+	 *     <li target=".items:eq(2)">
+	 *       Third Tooltip
+	 *       <a ng-click="currentStep='two'">Go directly to 'two'</a>
+	 *       <a ng-click="currentStep=0">Done</a>
+	 *     </li>
+	 *   </ul>
+	 */
+	angular.module('ui.tour', [])
+
+		.directive('uiTour', ['$timeout', '$parse', function($timeout, $parse){
+			return {
+				link: function($scope, $element, $attributes) {
+					var model = $parse($attributes.uiTour);
+
+					// Watch model and change steps
+					$scope.$watch($attributes.uiTour, function(newVal, oldVal){
+						if (angular.isNumber(newVal)) {
+							showStep(newVal)
+						} else {
+							if (angular.isString(newVal)) {
+								var stepNumber = 0,
+									children = $element.children()
+								angular.forEach(children, function(step, index) {
+									if (angular.element(step).attr('name') === newVal)
+										stepNumber = index+1;
+								});
+								model.assign($scope, stepNumber);
+							} else {
+								model.assign($scope, newVal && 1 || 0);
+							}
+						}
+					});
+
+					// Show step
+					function showStep(stepNumber) {
+						var elm, at, children = $element.children().removeClass('active');
+						elm = children.eq(stepNumber - 1);
+						if (stepNumber) {
+							at = elm.attr('at');
+							$timeout(function(){
+								var target = angular.element(elm.attr('target'))[0];
+
+
+								if (elm.attr('overlay') !== undefined) {
+									$('.tour-overlay').addClass('active').css({
+										// marginLeft: target.offsetLeft + target.offsetWidth / 2 - 150,
+										// marginTop: target.offsetTop + target.offsetHeight / 2 - 150
+									}).addClass('in');
+								}
+								// offset = {};
+                                //
+								// offset.top = target.offsetTop;
+								// offset.left = target.offsetLeft;
+
+								elm.addClass('active');
+
+								// if (at.indexOf('bottom') > -1) {
+								// 	offset.top += target.offsetHeight;
+								// } else if (at.indexOf('top') > -1) {
+								// 	offset.top -= elm[0].offsetHeight;
+								// } else {
+								// 	offset.top += target.offsetHeight / 2 - elm[0].offsetHeight / 2;
+								// }
+								// if (at.indexOf('left') > -1) {
+								// 	offset.left -= elm[0].offsetWidth;
+								// } else if (at.indexOf('right') > -1) {
+								// 	offset.left += target.offsetWidth;
+								// } else {
+								// 	offset.left += target.offsetWidth / 2 - elm[0].offsetWidth / 2;
+								// }
+                                //
+								// elm.css(offset);
+							});
+						} else {
+							$('.tour-overlay').removeClass('in');
+								$('.tour-overlay').removeClass('active');
+						}
+					}
+				}
+			};
+		}]);
 });

+ 15 - 0
src/main/webapp/resources/js/common/query/logisticsPort.js

@@ -107,6 +107,10 @@ define([ 'ngResource' ], function() {
 				url: 'trade/distributionRule/count',
 				method: 'GET'
 			},
+			findCountOfActiveRule : {
+				url: 'trade/distributionRule/active/count',
+				method: 'GET'
+			},
 			checkRuleName : {
 				url: 'trade/distributionRule/checkName',
 				method: 'GET'
@@ -126,5 +130,16 @@ define([ 'ngResource' ], function() {
 				method: 'POST'
 			}
 		})
+	}]).factory('TipRecord', ['$resource', function ($resource) {
+		return $resource('tip/record', {}, {
+			findTipRecordOfRule : {
+				url: 'tip/record/rule',
+				method: 'GET'
+			},
+			turnTipRecordOfRule : {
+				url: 'tip/record/rule/close',
+				method: 'PUT'
+			}
+		})
 	}]);
 });

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

@@ -8,7 +8,7 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
 		return this.length > 0 ? this[this.length - 1] : null;
 	};
 
-	var app = angular.module('myApp', [ 'ui.router', 'ui.bootstrap', 'ng.local', 'ui.form', 'ui.jquery', 'toaster', 'ngDraggable', 'tool.directives', 'ngSanitize', 'common.query.kind', 'common.services', 'brandServices', 'componentServices', 'goodsServices',  'rateServices','cartServices', 'orderServices', 'addressServices', 'invoiceServices', 'common.query.propertyAdvice', 'propertyServices', 'returnServices' , 'changeServices',  'logisticsServices', 'common.query.kindAdvice', 'ngTable', 'ngDynamicInput', 'common.directives', 'angularFileUpload', 'urlencryptionServices', 'purchaseServices', 'vendorServices', 'goodsServices', 'bankTransfer', 'common.query.enterprise', 'billServices', 'receiptServices', 'collection', 'expressServices', 'bankInfo','Charge', 'statisticsServices', 'currencyService', 'responseLogisticsService', 'PriceServices', 'addressServices', 'searchService', 'urlencryptionServices', 'ReleaseProductByBatchService', 'makerDemand', 'afterSaleService', 'messageBoardServices', 'logisticsServices', 'table.directives', 'storeInfoServices', 'recommendation', 'common.query.user', 'logisticsPortService', 'cmsService', 'materialServices', 'StoreCmsServices', 'productImportModule', 'stockInOutModule', 'StoreCmsModule', 'WebChatModule', 'StandardPutOnAdminModule', 'StoreViolationsServices', 'internalMessageServices', 'installmentServices']);
+	var app = angular.module('myApp', [ 'ui.router', 'ui.bootstrap', 'ng.local', 'ui.form', 'ui.jquery', 'toaster', 'ngDraggable', 'tool.directives', 'ngSanitize', 'common.query.kind', 'common.services', 'brandServices', 'componentServices', 'goodsServices',  'rateServices','cartServices', 'orderServices', 'addressServices', 'invoiceServices', 'common.query.propertyAdvice', 'propertyServices', 'returnServices' , 'changeServices',  'logisticsServices', 'common.query.kindAdvice', 'ngTable', 'ngDynamicInput', 'common.directives', 'angularFileUpload', 'urlencryptionServices', 'purchaseServices', 'vendorServices', 'goodsServices', 'bankTransfer', 'common.query.enterprise', 'billServices', 'receiptServices', 'collection', 'expressServices', 'bankInfo','Charge', 'statisticsServices', 'currencyService', 'responseLogisticsService', 'PriceServices', 'addressServices', 'searchService', 'urlencryptionServices', 'ReleaseProductByBatchService', 'makerDemand', 'afterSaleService', 'messageBoardServices', 'logisticsServices', 'table.directives', 'storeInfoServices', 'recommendation', 'common.query.user', 'logisticsPortService', 'cmsService', 'materialServices', 'StoreCmsServices', 'productImportModule', 'stockInOutModule', 'StoreCmsModule', 'WebChatModule', 'StandardPutOnAdminModule', 'StoreViolationsServices', 'internalMessageServices', 'installmentServices', 'ui.tour']);
 	//初始化,启动时载入app
 	app.init = function() {
 		angularAMD.bootstrap(app);
@@ -924,6 +924,50 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
         });*/
 	}]);
 
+	/**
+	 * 配送规则提示共用控制器
+	 */
+	app.controller('rule_tip_ctrl', ['$scope', 'toaster', '$modalInstance', 'type', 'tipModal', function ($scope, toaster, $modalInstance, type, tipModal) {
+		$scope.tipModal = tipModal;
+		$scope.type = type;
+
+		$scope.cancelDelete = function () {
+			$scope.tipModal = false;
+			$modalInstance.dismiss();
+		};
+
+		$scope.hrefToRule = function () {
+			$modalInstance.dismiss();
+			window.location.href = 'vendor#vendor_deliveryRule';
+		};
+
+		/**
+		 * 监听点击的事件
+		 */
+		document.onclick = function (event) {
+			if($scope.tipModal) {
+				if(event) {
+					var tag = event.target;
+					if(tag) {
+						var attribute = tag.getAttribute("name");
+						while(tag.nodeName != 'BODY') {
+							if(attribute == 'rule_model' ||
+								attribute == 'rule_cancel' || attribute == 'rule_href') {
+								return ;
+							}
+							tag = tag.parentElement;
+							attribute = tag.getAttribute("name");
+						}
+						$scope.$apply(function () {
+							$scope.tipModal = false;
+							$modalInstance.close();
+						});
+
+					}
+				}
+			}
+		};
+	}]);
 
 	//币别的过滤器
 	app.filter('currencySysmbol', function() {

+ 54 - 1
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_deliveryRule_ctrl.js

@@ -1,11 +1,14 @@
 define([ 'app/app' ], function(app) {
     'use strict';
-    app.register.controller('vendorDeliveryRuleCtrl', ['$scope', '$rootScope', 'ngTableParams', 'DistributionRule', 'BaseService', 'toaster', '$state', '$http', 'Enterprise', 'TreeData','$q','NumberService', function ($scope, $rootScope, ngTableParams, DistributionRule, BaseService, toaster, $state, $http, Enterprise, TreeData,$q,NumberService) {
+    app.register.controller('vendorDeliveryRuleCtrl', ['$scope', '$rootScope', 'ngTableParams', 'DistributionRule', 'BaseService', 'toaster', '$state', '$http', 'Enterprise', 'TreeData','$q','NumberService','TipRecord', function ($scope, $rootScope, ngTableParams, DistributionRule, BaseService, toaster, $state, $http, Enterprise, TreeData,$q,NumberService,TipRecord) {
         $rootScope.active = 'vendor_logistics';
         $scope.tab = 'deliverRule';
         $scope.title = '配送规则';
         $scope.$$rule = {};
+        $scope.currentStep = 1;
         document.title = '配送规则-优软商城';
+        $scope.imgIndex = ['static/img/tour/1.gif','static/img/tour/2.gif','static/img/tour/3.gif','static/img/tour/4.gif','static/img/tour/5.png'];
+        $scope.imagesObject = [{'img' : 'static/img/tour/1.gif'},{'img' : ''},{'img' : ''},{'img' : ''},{'img' : ''}];
         $scope.ruleTableParams = new ngTableParams({
             page : 1,
             count : 10,
@@ -39,6 +42,15 @@ define([ 'app/app' ], function(app) {
             $scope.tab = tab;
         };
 
+        var getTipRecord = function () {
+            TipRecord.findTipRecordOfRule({}, {}, function (data) {
+                $scope.showOperate = data.tipAgain == 0;
+            }, function (error) {
+                toaster.pop("error", error.data);
+            });
+        };
+        getTipRecord();
+
         /**
          * 编辑或新增配送规则,初始化
          * @param data
@@ -141,6 +153,47 @@ define([ 'app/app' ], function(app) {
                 $scope.fareArray.push(secondFare);
             }
         };
+        // 新手引导
+        $scope.prevIndex = function () {
+            $scope.currentStep =  $scope.currentStep - 1;
+            angular.forEach ($scope.imagesObject, function (object, index) {
+                object.img = '';
+                if ($scope.currentStep == index + 1) {
+                    object.img = $scope.imgIndex[index];
+                }
+            })
+        };
+        $scope.currentIndex = function (idx) {
+            $scope.currentStep = idx;
+            angular.forEach ($scope.imagesObject, function (object, index) {
+                object.img = '';
+                if ($scope.currentStep == index + 1) {
+                    object.img = $scope.imgIndex[index];
+                }
+            })
+        };
+        $scope.nextIndex = function () {
+            $scope.currentStep =  $scope.currentStep + 1;
+            angular.forEach ($scope.imagesObject, function (object, index) {
+                object.img = '';
+                if ($scope.currentStep == index + 1) {
+                    object.img = $scope.imgIndex[index];
+                }
+            })
+
+        };
+
+        $scope.cancelOperateTip = function (noTip) {
+            if (noTip){
+                TipRecord.turnTipRecordOfRule({}, {}, function (data) {
+                    
+                },function (error) {
+                    toaster.pop("error", error.data)
+                })
+            }
+            $scope.currentStep = 1;
+            $scope.showOperate = false;
+        };
 
         //配送方式类型
         $scope.deliveryMethod = {

+ 35 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_index_ctrl.js

@@ -71,4 +71,39 @@ define(['app/app', 'calendar'], function(app) {
       $modalInstance.dismiss('cancel');
     }
   }]);
+
+        var initRuleCount = function () {
+            return DistributionRule.findCountOfActiveRule({},{},function (data) {
+                if (data.success){
+                    $scope.needShowTip = data.data;
+                }
+            }, function (error) {
+                toaster.pop("error", error.data);
+            })
+        };
+        initRuleCount();
+
+        $q.all([initRuleCount().$promise]).then(function (data) {
+            if (data){
+                if ($scope.needShowTip){
+                    $modal.open({
+                        animation: true,
+                        templateUrl: 'static/view/common/modal/delivery_rule_modal.html',
+                        controller: 'rule_tip_ctrl',
+                        resolve : {
+                            type : function() {
+                                return 'center';
+                            },
+                            tipModal : function() {
+                                return true;
+                            }
+                        }
+                    });
+                }
+            }
+        });
+
+    }]);
+
+
 });

+ 41 - 1
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js

@@ -162,6 +162,16 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 			checkChoosedAll();
 		};
 
+		var initRuleCount = function () {
+			return DistributionRule.findCountOfActiveRule({},{},function (data) {
+				if (data.success){
+					$scope.needShowTip = data.data;
+				}
+			}, function (error) {
+				toaster.pop("error", error.data);
+			})
+		};
+
 		//获取选中之后的信息
 		$scope.getChoosedInfo = function () {
 			angular.forEach($scope.currenctMaterial, function (material) {
@@ -546,6 +556,36 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 				}
 			}, function (error) {
 				toaster.pop('error', error.data);
+			$q.all([initRuleCount().$promise]).then(function (data) {
+				if (data){
+					if ($scope.needShowTip){
+						$modal.open({
+							templateUrl: 'static/view/common/modal/delivery_rule_modal.html',
+							controller: 'rule_tip_ctrl',
+							resolve : {
+								type : function() {
+									return 'product';
+								},
+								tipModal : function() {
+									return true;
+								}
+							}
+						});
+						return ;
+					}
+					$scope.goods.breakUp = 1 === $scope.goods.breakUp;
+					$scope.isSelfSupport = 1 === $scope.goods.isSelfSupport;
+					Material.newStockByStandardProduct({ id: product.id, isSelfSupport: $scope.isSelfSupport}, $scope.goods, function (result) {
+						if (result.success) {
+							toaster.pop('success', '商品上架成功');
+							closeShelArea(product);
+						} else {
+							toaster.pop('error', result.message);
+						}
+					}, function (error) {
+						toaster.pop('error', error.data);
+					});
+				}
 			});
 		}
 
@@ -1173,7 +1213,7 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 					return;
 				}
 				BrandSubmit.unstandardSubmit({}, material.submitProduct, function (data) {
-					
+
 				}, function (response) {
 
 				})

+ 32 - 1
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_onSaleCtrl.js

@@ -1,6 +1,6 @@
 define([ 'app/app' ], function(app) {
     'use strict';
-    app.register.controller('vendor_onSaleCtrl', ['$scope', '$rootScope', 'Goods', '$modal', 'toaster', 'Loading', 'StoreInfo', 'AuthenticationService', '$q', 'StoreCms', 'NumberService', 'Enterprise', function ($scope, $rootScope, Goods, $modal, toaster, Loading, StoreInfo, AuthenticationService, $q, StoreCms, NumberService, Enterprise) {
+    app.register.controller('vendor_onSaleCtrl', ['$scope', '$rootScope', 'Goods', '$modal', 'toaster', 'Loading', 'StoreInfo', 'AuthenticationService', '$q', 'StoreCms', 'NumberService', 'Enterprise', 'DistributionRule', function ($scope, $rootScope, Goods, $modal, toaster, Loading, StoreInfo, AuthenticationService, $q, StoreCms, NumberService, Enterprise, DistributionRule) {
         $rootScope.active = 'vendor_material';
         $scope.keyword = '';
         $scope.tab = 'onSale';
@@ -1314,6 +1314,37 @@ define([ 'app/app' ], function(app) {
             getDownLoadStatus();
         };
 
+        var initRuleCount = function () {
+            return DistributionRule.findCountOfActiveRule({},{},function (data) {
+                if (data.success){
+                    $scope.needShowTip = data.data;
+                }
+            }, function (error) {
+                toaster.pop("error", error.data);
+            })
+        };
+        initRuleCount();
+
+        $q.all([initRuleCount().$promise]).then(function (data) {
+            if (data){
+                if ($scope.needShowTip){
+                    $modal.open({
+                        animation: true,
+                        templateUrl: 'static/view/common/modal/delivery_rule_modal.html',
+                        controller: 'rule_tip_ctrl',
+                        resolve : {
+                            type : function() {
+                                return 'product';
+                            },
+                            tipModal : function() {
+                                return true;
+                            }
+                        }
+                    });
+                }
+            }
+        });
+
         // 点击下架操作
         $scope.soldOut = function (commodity) {
             $scope.isSoldOut = true;

+ 33 - 3
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_upload_ctrl.js

@@ -8,7 +8,7 @@ define([ 'app/app' ], function(app) {
 	}]);
 
 	//批量上架的Ctrl
-	app.register.controller('batchPutOnCtrl', ['$scope', '$rootScope', 'ngTableParams', '$upload', '$q', 'AuthenticationService', 'BaseService', 'StoreInfo', 'SessionService', '$modal', 'toaster', 'ReleaseProductByBatch', 'Loading', 'Enterprise', function ($scope, $rootScope, ngTableParams, $upload, $q, AuthenticationService, BaseService, StoreInfo, SessionService, $modal, toaster, ReleaseProductByBatch, Loading, Enterprise) {
+	app.register.controller('batchPutOnCtrl', ['$scope', '$rootScope', 'ngTableParams', '$upload', '$q', 'AuthenticationService', 'BaseService', 'StoreInfo', 'SessionService', '$modal', 'toaster', 'ReleaseProductByBatch', 'Loading', 'Enterprise', 'DistributionRule', function ($scope, $rootScope, ngTableParams, $upload, $q, AuthenticationService, BaseService, StoreInfo, SessionService, $modal, toaster, ReleaseProductByBatch, Loading, Enterprise, DistributionRule) {
 
 		//获取币别信息
 		Enterprise.getCurrencyByRegisterAddress(null, function (data) {
@@ -90,6 +90,17 @@ define([ 'app/app' ], function(app) {
 			});
 		};
 
+		var initRuleCount = function () {
+			return DistributionRule.findCountOfActiveRule({},{},function (data) {
+				if (data.success){
+					$scope.needShowTip = data.data;
+				}
+			}, function (error) {
+				toaster.pop("error", error.data);
+			})
+		};
+		initRuleCount();
+
 		// 查看范例
 		$scope.showImg = function() {
 			var src = '';
@@ -235,8 +246,26 @@ define([ 'app/app' ], function(app) {
 		$scope.publish = function(event) {
 			if ($scope.pageParams.totalElements > 0) {
 				ReleaseProductByBatch.batchRelease({batch : $scope.result.batch}, null, function(data) {
-					// toaster.pop("success", "提示", "发布成功 :" + data.data + "条");
-					toaster.pop("success", "提示", "发布成功");
+					if ($scope.needShowTip){
+						$scope.relTableParams.page(1);
+						$scope.relTableParams.reload();
+						$scope.result.success = 0;//设置成0,让前端用户不能点击
+						$modal.open({
+							animation : true,
+							templateUrl : 'static/view/common/modal/product_upload_modal.html',
+							controller : 'rule_tip_ctrl',
+							resolve : {
+								type : function() {
+									return 'upload';
+								},
+								tipModal : function() {
+									return true;
+								}
+							}
+						});
+						return ;
+					}
+					toaster.pop("success", "提示", "发布成功 :" + data.data + "条");
 					$scope.relTableParams.page(1);
 					$scope.relTableParams.reload();
 					$scope.result.success = 0;//设置成0,让前端用户不能点击
@@ -303,4 +332,5 @@ define([ 'app/app' ], function(app) {
 			$modalInstance.dismiss();
 		};
 	}]);
+
 });

+ 102 - 0
src/main/webapp/resources/lib/ui-tour/tour.js

@@ -0,0 +1,102 @@
+/*global angular */
+/**
+ * uiTour directive
+ *
+ * @example:
+ *   <ul ui-tour="currentStep">
+ *     <li target="#someId">
+ *       First Tooltip
+ *       <a ng-click="currentStep=currentStep+1">Next</a>
+ *     </li>
+ *     <li target=".items:eq(2)" name="two">
+ *       Second Tooltip
+ *       <a ng-click="currentStep=currentStep-1">Prev</a>
+ *     </li>
+ *     <li target=".items:eq(2)">
+ *       Third Tooltip
+ *       <a ng-click="currentStep='two'">Go directly to 'two'</a>
+ *       <a ng-click="currentStep=0">Done</a>
+ *     </li>
+ *   </ul>
+ */
+angular.module('ui.tour', [])
+
+.directive('uiTour', ['$timeout', '$parse', function($timeout, $parse){
+  return {
+    link: function($scope, $element, $attributes) {
+      var model = $parse($attributes.uiTour);
+
+      // Watch model and change steps
+      $scope.$watch($attributes.uiTour, function(newVal, oldVal){
+        if (angular.isNumber(newVal)) {
+          showStep(newVal)
+        } else {
+          if (angular.isString(newVal)) {
+            var stepNumber = 0,
+              children = $element.children()
+            angular.forEach(children, function(step, index) {
+              if (angular.element(step).attr('name') === newVal)
+                stepNumber = index+1;
+            });
+            model.assign($scope, stepNumber);
+          } else {
+            model.assign($scope, newVal && 1 || 0);
+          }
+        }
+      });
+
+      // Show step
+      function showStep(stepNumber) {
+        var elm, at, children = $element.children().removeClass('active');
+        elm = children.eq(stepNumber - 1);
+        if (stepNumber && elm.length) {
+          at = elm.attr('at');
+          $timeout(function(){
+            var target = angular.element(elm.attr('target'))[0];
+
+
+            if (elm.attr('overlay') !== undefined) {
+              $('.tour-overlay').addClass('active').css({
+                marginLeft: target.offsetLeft + target.offsetWidth / 2 - 150,
+                marginTop: target.offsetTop + target.offsetHeight / 2 - 150
+              }).addClass('in');
+            } else {
+              $('.tour-overlay').removeClass('in');
+              setTimeout(function(){
+                $('.tour-overlay').removeClass('active');
+              }, 1000);
+            }
+            offset = {};
+            
+            offset.top = target.offsetTop;
+            offset.left = target.offsetLeft;
+
+            elm.addClass('active');
+              
+            if (at.indexOf('bottom') > -1) {
+              offset.top += target.offsetHeight;
+            } else if (at.indexOf('top') > -1) {
+              offset.top -= elm[0].offsetHeight;
+            } else {
+              offset.top += target.offsetHeight / 2 - elm[0].offsetHeight / 2;
+            }
+            if (at.indexOf('left') > -1) {
+              offset.left -= elm[0].offsetWidth;
+            } else if (at.indexOf('right') > -1) {
+              offset.left += target.offsetWidth;
+            } else {
+              offset.left += target.offsetWidth / 2 - elm[0].offsetWidth / 2;
+            }
+            
+            elm.css(offset);
+          });
+        } else {
+          $('.tour-overlay').removeClass('in');
+          setTimeout(function(){
+            $('.tour-overlay').removeClass('active');
+          }, 1000);
+        }
+      }
+    }
+  };
+}]);

+ 109 - 0
src/main/webapp/resources/view/common/modal/delivery_rule_modal.html

@@ -0,0 +1,109 @@
+<style>
+    /*配送规则弹框*/
+    .modal-dialog .modal-content{
+        position: fixed;
+        z-index: 2;
+        opacity: 1;
+        background-color: white;
+        top: 55%;
+        left: 50%;
+        height: 155px;
+        width: 290px;
+        margin: -145px 0 0 -77px;
+    }
+    .com-del-box{
+        height: 155px;
+        width: 290px;
+    }
+    .com-del-box .title {
+        height: 30px;
+        background-color: #5078cb;
+        text-align: right;
+        padding-right: 15px;
+        line-height: 30px;
+    }
+    .com-del-box .title a {
+        color: white;
+        font-size: 16px;
+    }
+    .com-del-box .content{
+        padding: 15px 12px 14px 20px;
+        width: 100%;
+        text-align: center;
+        margin: 0 auto;
+    }
+    .com-del-box .content p{
+        font-size: 14px;
+        padding-top: 10px;
+        padding-bottom: 10px;
+        margin-bottom: 7px;
+        overflow: hidden;
+        line-height: 0;
+    }
+    .com-del-box .content p .fa-exclamation-circle{
+        float: left;
+        margin-top: 3px;
+        margin-right: 6px;
+        color: #5078cb;
+        font-size: 18px;
+    }
+    .com-del-box .content p span{
+        float: left;
+        width: 230px;
+        line-height: 21px;
+        text-align: left;
+        font-size: 14px;
+        color: #333333
+    }
+    .com-del-box .content div {
+        margin: 0 auto;
+        text-align: center;
+    }
+    .com-del-box .content div a{
+        display: inline-block;
+        margin-right: 15px ;
+        width: 74px;
+        height: 28px;
+        line-height: 28px;
+        text-align: center;
+        font-size: 14px;
+        color: #fff;
+    }
+    .com-del-box .content div a:first-child {
+        margin-right: 15px ;
+        background: #c8c6c6;
+    }
+    .com-del-box .content div a:last-child {
+        background: #5078cb;
+    }
+    .modal{
+        box-shadow: none!important ;
+    }
+    .modal-content{
+        box-shadow: none!important ;
+    }
+    .modal.in .modal-dialog{
+        transform: none;
+    }
+    .modal.fade .modal-dialog{
+        transform: none;
+    }
+    /*.modal-backdrop {*/
+        /*background-color: transparent ;*/
+    /*}*/
+</style>
+<div class="com-del-box" name="rule_model">
+    <div class="title">
+        <a name="rule_cancel" ng-click="cancelDelete()"><i class="fa fa-close fa-lg"></i></a>
+    </div>
+    <!--卖家首页-->
+    <div class="content" ng-if="type=='center'">
+        <p><i class="fa fa-exclamation-circle"></i><span>您的店铺尚未设置配送规则,无法计算运费,建议尽快设置!</span></p>
+        <div><a name="rule_cancel" ng-click="cancelDelete()">以后再说</a><a name="rule_href" ng-click="hrefToRule()">立即设置</a></div>
+    </div>
+    <!--其他页面-->
+    <div class="content" ng-if="type=='product'">
+        <p><i class="fa fa-exclamation-circle"></i><span>您当前尚未设置配送规则,买家将无法下单,建议尽快设置!</span></p>
+        <div><a name="rule_href" ng-click="hrefToRule()">立即设置</a></div>
+    </div>
+</div>

+ 133 - 0
src/main/webapp/resources/view/common/modal/product_upload_modal.html

@@ -0,0 +1,133 @@
+<style>
+    .modal-dialog .modal-content{
+        position: fixed;
+        z-index: 2;
+        opacity: 1;
+        background-color: white;
+        top: 55%;
+        left: 50%;
+        height: 160px;
+        width: 290px;
+        margin: -145px 0 0 -80px;
+    }
+    .com-del-box{
+        height: 160px;
+        width: 290px;
+    }
+    .com-del-box .title {
+        height: 30px;
+        background-color: #5078cb;
+        text-align: right;
+        padding-right: 15px;
+        line-height: 30px;
+    }
+    .com-del-box .title a {
+        color: white;
+        font-size: 16px;
+    }
+    .com-del-box .content{
+        padding: 15px 12px 14px 20px;
+        width: 100%;
+        text-align: center;
+        margin: 0 auto;
+    }
+    .com-del-box .content p{
+        font-size: 14px;
+        padding-top: 10px;
+        padding-bottom: 10px;
+        margin-bottom: 7px;
+        overflow: hidden;
+        line-height: 0;
+    }
+    .com-del-box .content p .fa-exclamation-circle{
+        float: left;
+        margin-top: 3px;
+        margin-right: 6px;
+        color: #5078cb;
+        font-size: 18px;
+    }
+    .com-del-box .content p span{
+        float: left;
+        width: 230px;
+        line-height: 21px;
+        text-align: left;
+        font-size: 14px;
+        color: #333333
+    }
+    .com-del-box .content div {
+        margin: 0 auto;
+        text-align: center;
+    }
+    .com-del-box .content div a{
+        display: inline-block;
+        margin-right: 15px ;
+        width: 74px;
+        height: 28px;
+        line-height: 28px;
+        text-align: center;
+        font-size: 14px;
+        color: #fff;
+    }
+    .com-del-box .content div a:first-child {
+        margin-right: 15px ;
+        background: #c8c6c6;
+    }
+    .com-del-box .content div a:last-child {
+        background: #5078cb;
+    }
+    .modal{
+        box-shadow: none!important ;
+    }
+    .modal-content{
+        box-shadow: none!important ;
+    }
+    .modal.in .modal-dialog{
+        transform: none;
+    }
+    .modal.fade .modal-dialog{
+        transform: none;
+    }
+    .modal-backdrop {
+        background-color: transparent ;
+    }
+    .modal-dialog .modal-content{
+        position: fixed;
+        z-index: 2;
+        opacity: 1;
+        background-color: white;
+        top: 55%;
+        left: 50%;
+        height: 160px;
+        width: 290px;
+        margin: -145px 0 0 -80px;
+    }
+    .com-del-box{
+        height: 160px;
+        width: 290px;
+    }
+    .com-del-box .product .info{
+        margin: 0 auto;
+        width: 100%;
+        font-size: 16px;
+        font-weight: bold;
+        color: #5078cb;
+    }
+    .com-del-box .product .info i{
+        margin-right: 12px;
+        font-size: 20px;
+    }
+    .com-del-box .product p{
+        margin-bottom: -5px;
+    }
+</style>
+<div class="com-del-box" name="rule_model">
+    <div class="title">
+        <a name="rule_cancel" ng-click="cancelDelete()"><i class="fa fa-close fa-lg"></i></a>
+    </div>
+    <!--产品导入-->
+    <div class="content product">
+        <div class="info"><i class="fa fa-check-circle"></i>上架成功</div>
+        <p><span>您当前尚未设置配送规则,买家将无法下单,建议尽快设置!</span></p>
+        <div><a name="rule_href" ng-click="hrefToRule()">立即设置</a></div>
+    </div>
+</div>

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

@@ -677,6 +677,17 @@
 		background: #eff0f2;
 		font-size: 12px;
 	}
+	/*含运费*/
+	.oder_list dl b.freight{
+		font-size: 12px;
+		color: #999;
+	}
+	.oder_list dl b.total{
+		margin-right: 0;
+	}
+	.com-sub-pager .pagination li:first-child a, .pagination li:last-child a{
+		font-size: 12px;
+	}
 </style>
 <div class="user_right fr">
 	<!--订单中心-->
@@ -941,7 +952,10 @@
                             </div>
                         </span>
 					</dd>
-					<dd class="price"><b>总金额:<em ng-bind="::order.ensurePrice | formateNumber : 2 | currencySysmbol : order.currency"></em></b><b>总共<em ng-bind="::order.batchQty || 0"></em>件产品</b></dd>
+					<dd class="price">
+						<b class="freight">(含运费<em ng-bind="::order.fare || 0 | formateNumber : 2 | currencySysmbol : order.currency">¥ 0.00 </em>)</b>
+						<b class="total">总金额:<em ng-bind="::order.ensurePrice | formateNumber : 2 | currencySysmbol : order.currency"></em></b>
+						<b>总共<em ng-bind="::order.batchQty || 0"></em>件产品</b></dd>
 				</div>
 				<div ng-if="currenctOrders.length == 0" class="text-center">
 					<div class="col-xs-offset-3 col-xs-2" >

+ 284 - 2
src/main/webapp/resources/view/vendor/forstore/vendor_delivery_rule.html

@@ -210,6 +210,233 @@
 	.ng-table-pager{
 		margin-right: 0 !important;
 	}
+	/*配送规则常见问题*/
+	.question_content{
+		margin-top: 25px;
+		padding: 26px 45px 56px 36px;
+		width: 100%;
+		background: #fff;
+	}
+	.question_content h3.title{
+		margin-bottom: 24px;
+		font-size: 20px;
+		color: #5782dc;
+	}
+	.question_content .text-content{
+		margin-bottom: 24px;
+	}
+	.question_content .text-content h5{
+		margin-bottom: 8px;
+		font-size: 14px;
+		color: #333;
+		font-weight: bold;
+	}
+	.question_content .text-content p{
+		margin-bottom: 8px;
+		font-size: 14px;
+		color: #333;
+	}
+	.question_content .text-content span{
+		margin-bottom: 24px;
+		font-size: 14px;
+		color: #333;
+	}
+	.question_content .button{
+		margin: 0 auto;
+		text-align: center;
+	}
+	.question_content .button a{
+		font-size: 14px;
+		color: #5782dc;
+		text-decoration: underline ;
+	}
+	/*新手引导*/
+
+	/*.fade{*/
+		/*opacity: 1;*/
+	/*}*/
+	h1 { width: 50%; margin: 100px auto; text-align: center; background: lightblue; color: white;}
+
+	[ui-tour] > li {
+		display: none;
+	}
+	.active {
+		display: block !important;
+	}
+
+	.tour-overlay {
+		z-index: 10;
+		display: none;
+		height: 500px;
+		width: 500px;
+		top: -4100px;
+		left: -4100px;
+		background: transparent;
+		border-radius: 8000px;
+		border: 4000px solid rgba(0,0,0,.5);
+		position: fixed;
+		-webkit-transition: all 1s ease;
+		-moz-transition: all 1s ease;
+		-ms-transition: all 1s ease;
+		-o-transition: all 1s ease;
+		transition: all 1s ease;
+	}
+	.tour-overlay.in {
+		height: 300px;
+		width: 300px;
+		top: -4000px;
+		left: -4000px;
+	}
+
+	.popover{
+		/*display: block!important ;*/
+		max-height: 0;
+		max-width: 0;
+	}
+	.guide ul.guide-content{
+		position: relative;
+	}
+	.guide ul.guide-content li{
+		position: absolute ;
+	}
+	.guide ul.guide-content li.guide01{
+		top: -134px;
+		left: -374px;
+	}
+	.guide ul.guide-content li.guide02{
+		top: -127px;
+		left: -370px;
+	}
+	.guide ul.guide-content li.guide03{
+		top: -130px;
+		left: -367px;
+	}
+	.guide ul.guide-content li.guide04{
+		top: -193px;
+		left: -365px;
+	}
+	.guide ul.guide-content li.guide05{
+		top: -193px;
+		left: -365px;
+	}
+	.guide ul.guide-content li span.next-btn{
+		position: absolute;
+		top: 430px;
+		left: 624px;
+		display: inline-block;
+		width: 95px;
+		height: 44px;
+		background: transparent ;
+		cursor: pointer;
+	}
+	.guide ul.guide-content li div.click2{
+		position: absolute;
+		top: 837px;
+		left: 598px;
+		width: 250px;
+	}
+	.guide ul.guide-content li div.click3{
+		position: absolute;
+		top: 547px;
+		left: 563px;
+		width: 250px;
+	}
+	.guide ul.guide-content li div.click4{
+		position: absolute;
+		top: 678px;
+		left: 561px;
+		width: 330px;
+	}
+	.guide ul.guide-content li div.click5{
+		position: absolute;
+		top: 714px;
+		left: 1245px;
+		width: 330px;
+	}
+	.guide ul.guide-content li div.click5 .next{
+		display: inline-block;
+		width: 120px;
+		height: 44px;
+		background: transparent;
+		cursor: pointer;
+	}
+	.guide ul.guide-content li div.click5 input{
+		margin-left: 32px;
+		margin-top: -12px;
+		width: 20px;
+		height: 20px;
+		background: transparent;
+		color: transparent;
+	}
+	.guide ul.guide-content li div span{
+		display: inline-block;
+		width: 95px;
+		height: 44px;
+		background: transparent;
+		cursor: pointer;
+	}
+	.guide ul.guide-content li div span.pre{
+		margin-right: 23px;
+	}
+	.guide ul.guide-content li .rightBtn{
+		position: absolute;
+		width: 400px;
+	}
+	.guide ul.guide-content li .rightBtn span{
+		margin-right: 30.5px;
+		display: inline-block;
+		width: 15px;
+		height: 15px;
+		border-radius: 100%;
+		background: transparent;
+	}
+	.guide ul.guide-content li .rightBtn span.lastBtn{
+		margin-right: 23px;
+	}
+	.guide ul.guide-content li .rightBtn em{
+		margin-right: 22px;
+		display: inline-block;
+		width: 20px;
+		height: 20px;
+		border-radius: 100%;
+		background: transparent ;
+		cursor: pointer;
+	}
+	.guide ul.guide-content li.guide01 .rightBtn{
+		top: 377px;
+		left: 528px;
+	}
+	.guide ul.guide-content li.guide02 .rightBtn{
+		top: 784px;
+		left: 565px;
+	}
+	.guide ul.guide-content li.guide03 .rightBtn{
+		top: 494px;
+		left: 530px;
+	}
+	.guide ul.guide-content li.guide04 .rightBtn{
+		top: 628px;
+		left: 535px;
+	}
+	.guide ul.guide-content li.guide04 .rightBtn em{
+		margin-right: 16px;
+	}
+	.guide ul.guide-content li.guide04 .rightBtn span{
+		margin-right: 31px;
+	}
+	.guide ul.guide-content li.guide04 .rightBtn span.lastBtn {
+		margin-right: 16px;
+	}
+	.guide ul.guide-content li.guide05 .rightBtn{
+		top: 663px;
+		left: 1215px;
+	}
+	.guide ul.guide-content li .rightBtn em.disableBtn{
+		cursor: default;
+	}
+	.ng-table-pagination {
+		display: inline-flex;
+	}
 	/**/
 	.no-record-list .empty{
 		overflow: hidden;
@@ -242,6 +469,7 @@
 		margin-right:5px;
 	}
 </style>
+<script src="static/lib/ui-tour/tour.js"></script>
 <!--右侧主体部分-->
 <div class="count user_right fr">
 	<div class="count_center">
@@ -336,7 +564,7 @@
 						<option value="">请选择配送方式</option>
 						<option value="1301">第三方配送</option>
 						<option value="1302">卖家配送</option>
-						<option value="1303">上门自提</option>
+						<!--<option value="1303">上门自提</option>-->
 					</select>
 					<span style="width: 70px;">优先级排序</span>
 					<input type="text" class="form-control sort" ng-model="modifyRule.num" ng-blur="inputNum(modifyRule)">
@@ -619,6 +847,57 @@
 			</div>
 		</div>
 	</div>
+	<!--配送规则常见问题-->
+	<div class="question_content" ng-if="tab=='editRule'">
+		<h3 class="title">配送规则常见问题</h3>
+		<div class="text-content">
+			<h5>1、如果我想设置广东省内包邮,外省买满2000元才包邮,怎么设置?</h5>
+			<p>您需要分别设置两条配送规则:</p>
+			<span>一条“适用范围”选择广东省(规则名称可设为:广东省包邮),“统一运费”设为0;另一条“适用范围”选择中国大陆并去掉广东
+省(规则名称可设为:全国满额包邮,广东省除外),计费方式选择“按总金额计费”,2000元以下运费自定,2000元以上运费设为0。</span>
+		</div>
+		<div class="text-content">
+			<h5>2、我有多个实体店可以让顾客自提,要怎么样才能让买家结算时看到这项服务?</h5>
+			<span> 您可以在“物流管理-自提点”设置您支持自提的地址,只要有一个状态为“生效”的自提点,买家就能在结算页选择“上门自提”,并自助选择自提点。</span>
+		</div>
+		<div class="button"><a href="/help/home">更多常见问题可点击查看 <i class="fa fa-angle-double-right"></i></a></div>
+	</div>
+</div>
+<!--新手引导页面-->
+<div ng-if="tab=='editRule' && showOperate" class="guide">
+	<ul  ui-tour="currentStep" class="guide-content" id="one">
+		<li target="h1:eq(0)" class="popover right in guide01" overlay>
+			<img ng-src="{{imagesObject[currentStep-1].img}}" alt=""/>
+			<!--点击下一步-->
+			<span class="next-btn" ng-click="nextIndex()"></span>
+			<div class="rightBtn"><em class="disableBtn"></em><span ng-click="currentIndex(1)"></span><span ng-click="currentIndex(2)"></span><span ng-click="currentIndex(3)"></span><span ng-click="currentIndex(4)"></span><span class="lastBtn" ng-click="currentIndex(5)"></span><em ng-click="nextIndex()"></em></div>
+		</li>
+		<li target="h1:eq(1)" at="top" class="popover top in guide02">
+			<img ng-src="{{imagesObject[currentStep-1].img}}" alt=""/>
+			<!--点击上一步 下一步-->
+			<div class="click2"><span class="pre"  ng-click="prevIndex()"></span><span class="next" ng-click="nextIndex()"></span></div>
+			<div class="rightBtn"><em ng-click="prevIndex()"></em><span ng-click="currentIndex(1)"></span><span ng-click="currentIndex(2)"></span><span ng-click="currentIndex(3)"></span><span ng-click="currentIndex(4)"></span><span class="lastBtn" ng-click="currentIndex(5)"></span><em ng-click="nextIndex()"></em></div>
+		</li>
+		<li target="h1:eq(2) a" at="left" name="chapter3" class="popover left in guide03">
+			<img ng-src="{{imagesObject[currentStep-1].img}}" alt=""/>
+			<!--点击上一步 下一步-->
+			<div class="click3"><span class="pre" ng-click="prevIndex()"></span><span class="next"  ng-click="nextIndex()"></span></div>
+			<div class="rightBtn"><em ng-click="prevIndex()"></em><span ng-click="currentIndex(1)"></span><span ng-click="currentIndex(2)"></span><span ng-click="currentIndex(3)"></span><span ng-click="currentIndex(4)"></span><span class="lastBtn" ng-click="currentIndex(5)"></span><em ng-click="nextIndex()"></em></div>
+		</li>
+		<li target="h1:eq(3)" at="bottom" class="popover bottom in guide04">
+			<img ng-src="{{imagesObject[currentStep-1].img}}" alt=""/>
+			<!--点击上一步 下一步-->
+			<div class="click4"><span class="pre"  ng-click="prevIndex()"></span><span class="next" ng-click="nextIndex()"></span></div>
+			<div class="rightBtn"><em ng-click="prevIndex()"></em><span ng-click="currentIndex(1)"></span><span ng-click="currentIndex(2)"></span><span ng-click="currentIndex(3)"></span><span ng-click="currentIndex(4)"></span><span class="lastBtn" ng-click="currentIndex(5)"></span><em ng-click="nextIndex()"></em></div>
+		</li>
+		<li target="h1:eq(4)" at="bottom" class="popover bottom in guide05">
+			<img ng-src="{{imagesObject[currentStep-1].img}}" alt=""/>
+			<!--点击上一步 下一步-->
+			<div class="click5"><span class="pre"  ng-click="prevIndex()"></span><span class="next" ng-click="cancelOperateTip(noTip)"></span> <input type="checkbox" ng-model="noTip"></div>
+			<div class="rightBtn"><em ng-click="prevIndex()"></em><span ng-click="currentIndex(1)"></span><span ng-click="currentIndex(2)"></span><span ng-click="currentIndex(3)"></span><span ng-click="currentIndex(4)"></span><span class="lastBtn" ng-click="currentIndex(5)"></span><em class="disableBtn"></em></div>
+		</li>
+	</ul>
+	<div class="tour-overlay fade"></div>
 </div>
 <!--防误删-->
 <div class="com-del-box" ng-if="deleteFrame">
@@ -631,6 +910,9 @@
 	</div>
 </div>
 <style>
+	.tour-overlay{
+		display: block;
+	}
 	.count .count01 {
 		display: block;
 	}
@@ -1131,4 +1413,4 @@
 	.rule-main .rule-content .common-style .row .add-box span{
 		width: auto;
 	}
-</style>
+</style>

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

@@ -12,6 +12,9 @@
         border-radius: 4px;
         margin-right: 5px;
     }
+    .modal-backdrop {
+    /*background-color: transparent ;*/
+    }
 </style>
 <div class="user_right fr">
     <div class="right_l">
@@ -104,4 +107,14 @@
             </dl>
         </div>-->
     </div>
-</div>
+</div>
+<!--未设置配送规则提醒-->
+<!--<div class="com-del-box" ng-if="showNoRuleTip">-->
+    <!--<div class="title">-->
+        <!--<a ng-click="cancelDelete()"><i class="fa fa-close fa-lg"></i></a>-->
+    <!--</div>-->
+    <!--<div class="content">-->
+        <!--<p><i class="fa fa-exclamation-circle"></i><span>您的店铺尚未设置配送规则,无法计算运费,建议尽快设置!</span></p>-->
+        <!--<div><a ng-click="cancelDelete()">以后再说</a><a href="vendor#/vendor_deliveryRule">立即设置</a></div>-->
+    <!--</div>-->
+<!--</div>-->

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

@@ -269,9 +269,9 @@
 		font-size: 14px;
 	}
 	.com-del-box .content div a:first-child{
+		margin-right: 10px!important;
 		background: #b4b5b9;
 		color: #333;
-		margin-right: 10px;
 	}
 	.com-del-box .content div a:last-child{
 		background: #5078cb;
@@ -430,6 +430,52 @@
 	.device .wanted_list01 a.page-a:hover{
 		color: #fff!important;
 	}
+	/*上架提醒弹框*/
+	 .com-del-box {
+		 height: 155px;
+		 width: 290px;
+		 margin: -145px 0 0 -77px;
+		 top: 55%;
+		 left: 50%;
+	 }
+	.com-del-box .content{
+		padding: 15px 12px 14px 20px;
+	}
+	.com-del-box .content p{
+		margin-bottom: 7px;
+		overflow: hidden;
+		line-height: 0;
+	}
+	.com-del-box .content p .fa-exclamation-circle{
+		/*float: left;*/
+		margin-top: 3px;
+		margin-right: 6px;
+		font-size: 18px;
+	}
+	.com-del-box .content p span{
+		float: left;
+		width: 230px;
+		line-height: 21px;
+		text-align: left;
+		font-size: 14px;
+		color: #333333
+	}
+	.com-del-box .content div a{
+		margin-right: 0!important ;
+		width: 74px;
+		height: 28px;
+		line-height: 28px;
+		font-size: 14px;
+		color: #fff;
+		background: #5078cb;
+	}
+	.modal-backdrop {
+		background-color: transparent ;
+		bottom: unset!important;
+	}
+	.modal{
+		bottom: unset!important;
+	}
 </style>
 <div class="user_right fr">
 	<!--货品管理-->
@@ -666,6 +712,18 @@
 		<div><a ng-click="cancleDelete()">取消</a><a ng-click="confirmDelete()">确认</a></div>
 	</div>
 </div>
+<!--上架设置提醒-->
+<div class="com-del-box" ng-if="showNoRuleTip">
+	<div class="title">
+		<a ng-click="cancelDelete()"><i class="fa fa-close fa-lg"></i></a>
+	</div>
+	<div class="content">
+		<p><i class="fa fa-exclamation-circle"></i><span>您当前尚未设置配送规则,买家将无法下单,建议尽快设置!</span></p>
+		<div><a href="vendor#/vendor_deliveryRule">立即设置</a></div>
+	</div>
+</div>
+
+
 <style>
 	/**/
 	.wanted_list01 .empty{

+ 3 - 0
src/main/webapp/resources/view/vendor/forstore/vendor_onSale.html

@@ -506,6 +506,9 @@
         width: 100%;
         white-space: nowrap;
     }
+    .modal-backdrop {
+        background-color: transparent ;
+    }
 </style>
 <div class="user_right fr">
     <!--货品管理-->

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

@@ -1089,6 +1089,20 @@
 		background-position: 0px 7px;
 		padding-left: 25px;
 	}
+	/*含运费*/
+	.oder_list dl b.freight{
+		float: none;
+		font-size: 12px;
+		color: #999;
+	}
+	.oder_list dl b.freight em{
+		font-size: 12px;
+		font-style: normal ;
+		color: #999;
+	}
+	.oder_list dl b.total{
+		margin-right: 0;
+	}
 </style>
 <div class="user_right fr">
 	<!--订单中心-->
@@ -1374,7 +1388,8 @@
 					</dd>
 					<dd class="price" style="text-align: right;">
 						<b style="float: none;">总共<em ng-bind="purchase.batchQty"></em>件商品</b>
-						<b style="float: none;">总金额:<em ng-bind="purchase.ensurePrice | formateNumber : 2 | currencySysmbol : purchase.currency"></em></b>
+						<b style="float: none;" class="total">总金额:<em ng-bind="purchase.ensurePrice | formateNumber : 2 | currencySysmbol : purchase.currency"></em></b>
+						<b class="freight">(含运费<em ng-bind="purchase.fare || 0 | formateNumber : 2 | currencySysmbol : purchase.currency"></em>)</b>
 					</dd>
 					<div class="com-del-box conuter-box" ng-if="purchase.showGotoSettle && purchase.showTip == 1" style="display: block;">
 						<div class="title">