Browse Source

Merge branch 'feature-201820-wangcz' into dev

Administrator 8 years ago
parent
commit
aa6e365e20
60 changed files with 910 additions and 5647 deletions
  1. 1 2
      src/main/java/com/uas/platform/b2c/common/account/service/impl/UserServiceImpl.java
  2. 1 1
      src/main/java/com/uas/platform/b2c/common/search/constant/SearchUrl.java
  3. 27 13
      src/main/java/com/uas/platform/b2c/common/search/rpc/service/Impl/SearchServiceImpl.java
  4. 0 2
      src/main/java/com/uas/platform/b2c/fa/settlement/service/impl/BillSubmitServiceImpl.java
  5. 0 6
      src/main/java/com/uas/platform/b2c/prod/commodity/controller/ReleaseProductByBatchController.java
  6. 2 1
      src/main/java/com/uas/platform/b2c/prod/commodity/dao/GoodsDao.java
  7. 8 1
      src/main/java/com/uas/platform/b2c/prod/commodity/dao/ProductReplaceDao.java
  8. 1 1
      src/main/java/com/uas/platform/b2c/prod/commodity/model/PCBPropertyValue.java
  9. 8 0
      src/main/java/com/uas/platform/b2c/prod/commodity/service/GoodsService.java
  10. 5 0
      src/main/java/com/uas/platform/b2c/prod/commodity/service/ReleaseProductByBatchService.java
  11. 21 2
      src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/GoodsServiceImpl.java
  12. 59 18
      src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ProductServiceImpl.java
  13. 38 49
      src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ReleaseProductByBatchServiceImpl.java
  14. 32 0
      src/main/java/com/uas/platform/b2c/prod/commodity/task/ReleaseByBatchTask.java
  15. 6 0
      src/main/java/com/uas/platform/b2c/prod/store/facade/impl/StoreInFacadeImpl.java
  16. 14 19
      src/main/java/com/uas/platform/b2c/trade/presale/controller/CollectionController.java
  17. 16 1
      src/main/java/com/uas/platform/b2c/trade/presale/model/Collection.java
  18. 15 0
      src/main/java/com/uas/platform/b2c/trade/presale/model/CollectionInfo.java
  19. 1 1
      src/main/java/com/uas/platform/b2c/trade/presale/service/CollectionService.java
  20. 24 4
      src/main/java/com/uas/platform/b2c/trade/presale/service/impl/CollectionServiceImpl.java
  21. BIN
      src/main/resources/jxls-tpl/trade/releaseByBatch-rmb.xls
  22. BIN
      src/main/resources/jxls-tpl/trade/releaseByBatchError-rmb.xls
  23. BIN
      src/main/resources/jxls-tpl/trade/releaseByBatchError-usd.xls
  24. BIN
      src/main/resources/jxls-tpl/trade/releasebyBatch-usd.xls
  25. 5 0
      src/main/resources/spring/task.xml
  26. BIN
      src/main/webapp/WEB-INF/cert/yrsc.cer
  27. BIN
      src/main/webapp/WEB-INF/cert/yrsc.pfx
  28. BIN
      src/main/webapp/resources/img/all/loading.gif
  29. BIN
      src/main/webapp/resources/img/vendor/authority/role-bg-1.png
  30. BIN
      src/main/webapp/resources/img/vendor/authority/role-bg-2.png
  31. BIN
      src/main/webapp/resources/img/vendor/authority/role-bg-3.png
  32. BIN
      src/main/webapp/resources/img/vendor/authority/role-bg-4.png
  33. 15 5
      src/main/webapp/resources/js/common/controllers/commonCtrls.js
  34. 6 17
      src/main/webapp/resources/js/sso/app.js
  35. 0 2296
      src/main/webapp/resources/js/sso/controllers/applyBindCtrl.js
  36. 3 109
      src/main/webapp/resources/js/sso/controllers/forstore/ssoCenterCtrl.js
  37. 0 1604
      src/main/webapp/resources/js/sso/controllers/ssoInfoCtrl.js
  38. 4 53
      src/main/webapp/resources/js/sso/controllers/staffManagementCtrl.js
  39. 1 1
      src/main/webapp/resources/js/vendor/app.js
  40. 2 1
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_store_maintain_ctrl.js
  41. 405 307
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_upload_ctrl.js
  42. 1 1
      src/main/webapp/resources/view/admin/modal/auditRegulpicpass_modal.html
  43. 1 1
      src/main/webapp/resources/view/search/search_component.html
  44. 1 1
      src/main/webapp/resources/view/sso/forstore/ssoCenter.html
  45. 7 7
      src/main/webapp/resources/view/sso/rolePermission.html
  46. 0 1034
      src/main/webapp/resources/view/sso/ssoApplyBind.html
  47. 46 2
      src/main/webapp/resources/view/sso/staffManagement.html
  48. 1 1
      src/main/webapp/resources/view/usercenter/forstore/bomDetail.html
  49. 73 64
      src/main/webapp/resources/view/usercenter/forstore/order_pay.html
  50. 2 2
      src/main/webapp/resources/view/usercenter/forstore/seekPurchase.html
  51. 2 2
      src/main/webapp/resources/view/vendor/forstore/erp/vendor_material_erp.html
  52. 2 2
      src/main/webapp/resources/view/vendor/forstore/erp/vendor_material_person_erp.html
  53. 2 2
      src/main/webapp/resources/view/vendor/forstore/purchasAttendtion.html
  54. 1 1
      src/main/webapp/resources/view/vendor/forstore/purchaseOffer.html
  55. 2 2
      src/main/webapp/resources/view/vendor/forstore/seekPurchase.html
  56. 2 2
      src/main/webapp/resources/view/vendor/forstore/vendor_material.html
  57. 2 2
      src/main/webapp/resources/view/vendor/forstore/vendor_material_person.html
  58. 3 3
      src/main/webapp/resources/view/vendor/forstore/vendor_onSale.html
  59. 40 2
      src/main/webapp/resources/view/vendor/forstore/vendor_upload.html
  60. 2 2
      src/main/webapp/resources/view/vendor/modal/edit_regul_modal.html

+ 1 - 2
src/main/java/com/uas/platform/b2c/common/account/service/impl/UserServiceImpl.java

@@ -610,13 +610,12 @@ public class UserServiceImpl implements UserService {
 
 	@Override
 	public User switchEnterprise(Long enUU) {
-		User user = userDao.findOne(SystemSession.getUser().getUserUU());
+		User user = SystemSession.getUser();
 		if ( enUU == 0L) {
 			user.setEnterprise(null);
 		} else {
 			user.setCurrentEnterprise(enUU);
 		}
-		SystemSession.setUser(user);
 		return user;
 	}
 

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

@@ -149,7 +149,7 @@ public class SearchUrl {
     /**
      * 搜索库存信息(类目)
      */
-    public static final String GOODIS_URL_KIND= "/search/goodsIds?params={params}";
+    public static final String GOODIS_URL_KIND= "/search/oldGoodsIds?params={params}";
 
 
     /**

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

@@ -288,7 +288,7 @@ public class SearchServiceImpl implements SearchService{
     public Map<String,Object> getSimilarKeywords(String keyword, String type) throws SearchException {
         Map<String, Object> map = new HashedMap();
         map.put("keyword", keyword);
-        String result;
+        String result = "",resultKind= "",resultCmp = "",resultBrand = "";
         switch (type) {
             case COMPONENT:
                 result = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.SIMILAR_PRODUCTS_URL, String.class, map);
@@ -300,23 +300,37 @@ public class SearchServiceImpl implements SearchService{
             case KIND:
                 result = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.SIMILAR_KIND_URL, String.class, map);
                 break;
+            case ALL:
+                resultCmp = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.SIMILAR_PRODUCTS_URL, String.class, map);
+                resultCmp = resultCmp.replaceAll("pcmpcode","code");
+                resultBrand = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.SIMILAR_BRAND_URL, String.class, map);
+                resultKind = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.SIMILAR_KIND_URL, String.class, map);
+                break;
             default:
                 result = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.SIMILAR_KEYWORD_URL, String.class, map);
                 break;
         }
-
-        if(StringUtils.isEmpty(result)) {
-            return null;
-        }else {
-            try {
-                List<Object> resultMap = FastjsonUtils.fromJsonArray(result);
-                map.clear();
-                map.put("result",resultMap);
-                return map;
-            }catch (Exception e) {
-                e.printStackTrace();
-                return null;
+        try {
+            switch (type) {
+                case ALL:
+                    List<Object> resultMapCmp = FastjsonUtils.fromJsonArray(resultCmp);
+                    List<Object> resultMapKind = FastjsonUtils.fromJsonArray(resultKind);
+                    List<Object> resultMapBrand = FastjsonUtils.fromJsonArray(resultBrand);
+                    map.clear();
+                    map.put("component",resultMapCmp);
+                    map.put("kind",resultMapKind);
+                    map.put("brand",resultMapBrand);
+                    break;
+                default:
+                    List<Object> resultMap = FastjsonUtils.fromJsonArray(result);
+                    map.clear();
+                    map.put("result",resultMap);
+                    break;
             }
+            return map;
+        }catch (Exception e) {
+            e.printStackTrace();
+            return null;
         }
     }
 

+ 0 - 2
src/main/java/com/uas/platform/b2c/fa/settlement/service/impl/BillSubmitServiceImpl.java

@@ -375,8 +375,6 @@ public class BillSubmitServiceImpl implements BillSubmitService {
                 Order order = orderDao.findOrderByOrderid(orderid);
                 if (order == null)
                     throw new IllegalOperatorException("订单: " + orderid + " 不存在,请与客服人员确认该订单");
-                if (!SystemSession.getUser().getEnterprise().getUu().equals(order.getSellerenuu()))
-                    throw new IllegalOperatorException("订单: " + orderid + " 不属于当前企业,不可开票");
 
                 order.setVatBillStatus(Status.TOBERECEIVE_BILL.value());
                 orderDao.save(order);

+ 0 - 6
src/main/java/com/uas/platform/b2c/prod/commodity/controller/ReleaseProductByBatchController.java

@@ -152,11 +152,8 @@ public class ReleaseProductByBatchController {
      */
     @RequestMapping(value = "/batchRelease", method = RequestMethod.POST)
     public String batchRelease(String batch) {
-        long l = System.currentTimeMillis();
         logger.log("批量上架模块", "批量发布指定批次:" + batch + "的上架内容");
         String byBatch = releaseProductByBatchService.publishByBatch(batch, false);
-        long l1 = System.currentTimeMillis();
-        logger.log("批量上架模块", "l1 ------------l" + (l1 - 1));
         return byBatch;
     }
 
@@ -235,10 +232,7 @@ public class ReleaseProductByBatchController {
             } else {
                 throw new IllegalOperatorException("文件格式不正确!请上传.xls或.xlsx格式的文件");
             }
-            long l = System.currentTimeMillis();
             map = releaseProductByBatchService.releaseByWorkbook(workbook, selfSale, currency, isPerson, repeatImport, false);
-            long l1 = System.currentTimeMillis();
-           System.err.println("批量上架总时间 ------------" + (l1 - l));
         } catch (IOException e) {
             e.printStackTrace();
         }

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

@@ -13,6 +13,7 @@ import org.springframework.stereotype.Repository;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigInteger;
+import java.sql.SQLException;
 import java.util.Date;
 import java.util.List;
 import java.util.Set;
@@ -304,7 +305,7 @@ public interface GoodsDao extends JpaSpecificationExecutor<Goods>, JpaRepository
      * @param code the code 删除的批次
      */
 	@Modifying
-	@Transactional
+	@Transactional(rollbackFor = SQLException.class)
 	@Query(value = "delete from Goods g where g.batchCode=:code")
 	void deleteByBatchCode(@Param("code") String code);
 

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

@@ -7,7 +7,6 @@ import org.springframework.data.jpa.repository.Modifying;
 import org.springframework.data.jpa.repository.Query;
 import org.springframework.data.repository.query.Param;
 
-import javax.persistence.ManyToOne;
 import javax.transaction.Transactional;
 import java.util.List;
 
@@ -18,6 +17,14 @@ public interface ProductReplaceDao extends JpaRepository<ProductReplace, Long>,
 
     List<ProductReplace> findByProductIdOrderByDetno(Long productId);
 
+    /**
+     * 根据物料id 批量获取替代料
+     * @param ids
+     * @return
+     */
+    @Query(value = "select p from ProductReplace p where p.productId in (:ids) order by p.productId desc")
+    List<ProductReplace> findByProductId(@Param("ids") List<Long> ids);
+
     @Transactional
     @Modifying
     void deleteByProductId(Long productId);

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/model/PCBPropertyValue.java

@@ -93,7 +93,7 @@ public class PCBPropertyValue implements Serializable{
     }
 
     public PCBPropertyValue(Long propertyid, String value) {
-        this.productid = propertyid;
+        this.propertyid = propertyid;
         this.value = value;
     }
 }

+ 8 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/service/GoodsService.java

@@ -784,4 +784,12 @@ public interface GoodsService {
      * @return ap<Long, Integer>
      */
     Map<Long, Integer> batchGetCountByProductId(List<Long>  prIds);
+
+
+    /**
+     * 根据 batchid 获取本次上架的信息
+     * @param batchid 本批次上架标识
+     * @return  List<Goods>
+     */
+    List<Goods> findByBatchId(String batchid);
 }

+ 5 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/service/ReleaseProductByBatchService.java

@@ -110,4 +110,9 @@ public interface ReleaseProductByBatchService {
      * @param list
      */
     void udpatePridAndRrodnum(List<ReleaseProductByBatch> list);
+
+    /**
+     * 每天零层删除所有的信息
+     */
+    void deleteAllInfo();
 }

+ 21 - 2
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/GoodsServiceImpl.java

@@ -1044,7 +1044,7 @@ public class GoodsServiceImpl implements GoodsService {
 
 	/**
 	 * 导入Excel发布产品
-	 * 
+	 *
 	 * @author hejq
 	 */
 	@Override
@@ -2046,7 +2046,10 @@ public class GoodsServiceImpl implements GoodsService {
                     }
                     goodsInfos.add(new GoodsInfo(goods));
                     goods.setStatus(Status.REMOVED.value());
-                    goodsDao.deleteByBatchCode(batchCode);
+                    Goods goodses = goodsDao.findByBatchCode(batchCode);
+                    if (goodses != null) {
+                        goodsDao.delete(goodses);
+                    }
 
                     GoodsHistory goodsHist = goodsHistoryService.converTGoodsHist(goods,
                             GoodsHistory.OperateType.Down.getPhrase(), false);
@@ -4314,4 +4317,20 @@ public class GoodsServiceImpl implements GoodsService {
             return resultMap;
         }
     }
+
+    /**
+     * 根据 batchid 获取本次上架的信息
+     *
+     * @param batchid 本批次上架标识
+     * @return List<Goods>
+     */
+    @Override
+    public List<Goods> findByBatchId(String batchid) {
+        if (StringUtils.isEmpty(batchid)) {
+            return new ArrayList<>();
+        } else {
+            List<Goods> goodses = goodsDao.findByBatchid(batchid);
+            return goodses;
+        }
+    }
 }

+ 59 - 18
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ProductServiceImpl.java

@@ -376,32 +376,73 @@ public class ProductServiceImpl implements ProductService {
                 return null;
             }
         }, page);*/
-        List<Long> list = new ArrayList<>();
         List<V_ProductPerson> productList = productPage.getContent();
-        for (V_ProductPerson product : productList) {
-            if ("ERP".equals(product.getSourceApp())) {
-                ProductDetail productDetail = productDetailDao.findByProductId(product.getId());
-                if (productDetail != null) {
-                    product.setProductDetail(productDetail);
+        if (CollectionUtils.isNotEmpty(productList)) {
+            List<Long> list = new ArrayList<>();
+            for (V_ProductPerson product : productList) {
+                if ("ERP".equals(product.getSourceApp())) {
+                    ProductDetail productDetail = productDetailDao.findByProductId(product.getId());
+                    if (productDetail != null) {
+                        product.setProductDetail(productDetail);
+                    }
                 }
+                list.add(product.getId());
             }
-            List<ProductReplace> productReplaceList = productReplaceDao.findByProductIdOrderByDetno(product.getId());
-            product.setProductReplaceList(productReplaceList);
-            list.add(product.getId());
-        }
-        if (CollectionUtils.isNotEmpty(list)) {
-            List<ProductAttachSubmit> submits = productAttachService.findByProductidsAndStatus(list, Status.UNAUDIT.value());
-            for (ProductAttachSubmit productAttachSubmit : submits) {
-                for (V_ProductPerson product : productList) {
-                    if (product.getId().longValue() == productAttachSubmit.getProductId().longValue()) {
-                        product.setProductAttachSubmit(productAttachSubmit);
-                        break;
+            if (CollectionUtils.isNotEmpty(list)) {
+                List<ProductAttachSubmit> submits = productAttachService.findByProductidsAndStatus(list, Status.UNAUDIT.value());
+                for (ProductAttachSubmit productAttachSubmit : submits) {
+                    for (V_ProductPerson product : productList) {
+                        if (product.getId().longValue() == productAttachSubmit.getProductId().longValue()) {
+                            product.setProductAttachSubmit(productAttachSubmit);
+                            break;
+                        }
                     }
+                }
 
+                Map<Long, List<ProductReplace>> batchGetProductReplace = batchGetProductReplace(list);
+                if ((batchGetProductReplace != null) && (batchGetProductReplace.size() != 0)) {
+                    for (V_ProductPerson product : productList) {
+                        List<ProductReplace> productReplaces = batchGetProductReplace.get(product.getId());
+                        if (CollectionUtils.isNotEmpty(productReplaces)) {
+                            product.setProductReplaceList(productReplaces);
+                        }
+                    }
                 }
             }
+            return new PageImpl<V_ProductPerson>(productList, page, productPage.getTotalElements());
+        } else {
+            return productPage;
+        }
+    }
+
+    public Map<Long, List<ProductReplace>> batchGetProductReplace(List<Long> list) {
+        if (CollectionUtils.isNotEmpty(list)) {
+            List<ProductReplace> productReplaceList = productReplaceDao.findByProductId(list);
+            Map<Long, List<ProductReplace>> map = new HashedMap();
+            for (ProductReplace productReplace : productReplaceList) {
+                List<ProductReplace> productReplaces = map.get(productReplace.getProductId());
+                if (productReplaces == null) {
+                    productReplaces = new ArrayList<>();
+                }
+                productReplaces.add(productReplace);
+                map.put(productReplace.getProductId(), productReplaces);
+            }
+            Set<Long> keySet = map.keySet();
+            for (Long id : keySet) {
+                List<ProductReplace> productReplaces = map.get(id);
+                if ((productReplaces != null) && (productReplaces.size() != 0)) {
+                    Collections.sort(productReplaces, new Comparator<ProductReplace>() {
+                        @Override
+                        public int compare(ProductReplace o1, ProductReplace o2) {
+                            return o1.getDetno().shortValue() - o2.getDetno().shortValue();
+                        }
+                    });
+                }
+            }
+            return map;
+        } else {
+            return new HashedMap();
         }
-        return new PageImpl<V_ProductPerson>(productList, page, productPage.getTotalElements());
     }
 
     @Override

+ 38 - 49
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ReleaseProductByBatchServiceImpl.java

@@ -14,10 +14,7 @@ import com.uas.platform.b2c.core.utils.StringUtilB2C;
 import com.uas.platform.b2c.prod.commodity.constant.*;
 import com.uas.platform.b2c.prod.commodity.dao.*;
 import com.uas.platform.b2c.prod.commodity.model.*;
-import com.uas.platform.b2c.prod.commodity.service.GoodsService;
-import com.uas.platform.b2c.prod.commodity.service.ProductPrivateService;
-import com.uas.platform.b2c.prod.commodity.service.ProductService;
-import com.uas.platform.b2c.prod.commodity.service.ReleaseProductByBatchService;
+import com.uas.platform.b2c.prod.commodity.service.*;
 import com.uas.platform.b2c.prod.commodity.util.GoodsUtil;
 import com.uas.platform.b2c.prod.commodity.util.SheetUtil;
 import com.uas.platform.b2c.prod.product.brand.dao.BrandInfoDao;
@@ -134,6 +131,9 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 	@Autowired
 	private  ProductService productService;
 
+    @Autowired
+    private GoodsHistoryService goodsHistoryService;
+
 	/**
 	 * 控制任务提交速度的线程池
 	 */
@@ -253,9 +253,6 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 				}
 			}
 		}
-		System.out.println("获取订单信息缺失");
-		long l1 = System.currentTimeMillis();
-		System.err.println("l1--------------l testyuj" + (l1 - l));
 		Long enUU = SystemSession.getUser().getEnterprise().getUu();
 		if (!isAPerson) {
 			//1:比较品牌、型号、自定义标签是否重复,2:比较六要素是否重复
@@ -280,14 +277,8 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 				}
 			}
 		}
-        long l2 = System.currentTimeMillis();
-        System.err.println("l2--------------l1 testyuj" + (l2 - l1));
 		commonDao.save(releaseProductByBatchs, ReleaseProductByBatch.class);
-		long l3 = System.currentTimeMillis();
-        System.err.println("l3--------------l2 testyuj" + (l3 - l2));
         releaseProductByBatchDao.callReleaseExistValidProcedure(batch, isAPerson, enUU);
-		long l4 = System.currentTimeMillis();
-		System.err.println("l4--------------l3 testyuj" + (l4 - l3));
 		if (isAPerson) {
 			for (ReleaseProductByBatch releaseProductByBatch : releaseProductByBatchs) {
                 Long productid = releaseProductByBatch.getProductid();
@@ -302,7 +293,6 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
                 }
 			}
 		}
-		Long l5 = 0l;
 		String strCount = "0";
 		if (isPcb) {
 			 releaseProductByBatchDao.callValidProcedurePcb(enUU, batch);
@@ -318,14 +308,11 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 					ResultSet rs = stmt.getResultSet();
 					if (null != rs) {
 						rs.next();
-                        System.err.println("测试结果---------" + rs.getString(1));
 						return rs.getString(1);
 					}
 					return "0";
 				}
 			});
-			l5 = System.currentTimeMillis();
-			System.err.println("l5--------------l4 testyuj" + (l5 - l4));
 		}
 		Integer filter = 0, failure = 0, success = 0;
 		if (!StringUtilB2C.isEmpty(strCount)) {
@@ -348,8 +335,6 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		modelMap.put("failure", failure);
 		modelMap.put("filter", filter);
 		modelMap.put("batch", batch);
-		long l6 = System.currentTimeMillis();
-		System.err.println("l6--------------l6 testyuj" + (l6 - l5));
 		return modelMap;
 	}
 
@@ -1710,25 +1695,22 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 
 	@Override
 	public String publishByBatch(String batch, boolean isPcb) {
-		long l = System.currentTimeMillis();
+        if (StringUtils.isEmpty(batch)) {
+            return "0";
+        }
 		List<ReleaseProductByBatch> releaseProductByBatchList =
 				releaseProductByBatchDao.findByRelbatchid(batch);
-		long l1 = System.currentTimeMillis();
-		System.err.println("l1 -------------------l " + (l1 - l));
 		if (CollectionUtils.isEmpty(releaseProductByBatchList)) {
 			return String.valueOf(IntegerConstant.NO_SHORT);
 		}
 		Map<String, Object> map = convertProduct(releaseProductByBatchList, false, isPcb);
 		if (map == null || map.size() == 0) {
-			return "fail";
+			return "0";
 		}
-		long l2 = System.currentTimeMillis();
-		System.err.println("l2 -------------------l1 " + (l2 - l1));
 		Set<Long> idSet = (Set<Long>) map.get("prIds");
 		if (isPcb) {
 			savePcbInfo(idSet, map);
 		}
-		long l8 = System.currentTimeMillis();
 		Enterprise enterprise = SystemSession.getUser().getEnterprise();
         final Object[] obj = new Object[]{enterprise.getUu(), enterprise.getEnName(), batch};
         String sql = "/*#mycat:db_type=master*/ set @enuu = %s; set @enName = '%s'; set @batch = '%s'; call RELEASE_TO_GOODS_V4(@enuu, @enName, @batch, @out); select @out";
@@ -1746,11 +1728,9 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
                 return "0";
             }
         });
-		long l9 = System.currentTimeMillis();
-		System.err.println("l9 -------------------l8 " + (l9 - l8));
 		ArrayList<Long> list = new ArrayList<>();
 		list.addAll((Set<Long>)map.get("prIds"));
-		afterPublishToGoodsDo(list, (Set<Long>)map.get("reIds"));
+		afterPublishToGoodsDo(list, (Set<Long>)map.get("reIds"), batch);
 		return StringUtilB2C.getStr(num);
 	}
 
@@ -1779,11 +1759,14 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 				}
 			}
 
-			List<PCBPropertyValue> propertyValues = (List<PCBPropertyValue>) map.get(product.getEnUU().toString().concat(product.getProdNum()));
-			if (CollectionUtils.isNotEmpty(propertyValues)) {
-				for (PCBPropertyValue propertyValue : propertyValues) {
-					propertyValue.setProductid(prId);
-					propertyValueList.add(propertyValue);
+			if (map.get("propertyvalues") != null) {
+				Map<String, List<PCBPropertyValue>> pcbPropertyValueMap = (Map<String, List<PCBPropertyValue>>) map.get("propertyvalues");
+				List<PCBPropertyValue> propertyValues = pcbPropertyValueMap.get(product.getEnUU().toString().concat(product.getProdNum()));
+				if (CollectionUtils.isNotEmpty(propertyValues)) {
+					for (PCBPropertyValue propertyValue : propertyValues) {
+						propertyValue.setProductid(prId);
+						propertyValueList.add(propertyValue);
+					}
 				}
 			}
 		}
@@ -1817,7 +1800,6 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 			thickCopperProId = propertyDao.findIdByLabelCn(THICKCOPPER);
 			thickProId = propertyDao.findIdByLabelCn(THICK);
 		}
-        long l = System.currentTimeMillis();
         String importNum = createNumberService.getTimeNumber("trade$product_import_num", 8, releaseProductByBatchList.size());
 		if (StringUtils.isEmpty(importNum)) {
 			throw new IllegalOperatorException("生成批次号失败");
@@ -1825,8 +1807,6 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		String time = importNum.substring(IntegerConstant.NO_SHORT, (IntegerConstant.TIME_LENGTH));
 		Integer num = Integer.valueOf(importNum.substring(IntegerConstant.TIME_LENGTH));
 		String prodNum = null;
-        long l1 = System.currentTimeMillis();
-        System.err.println("打印l1-----------l" + (l1 - l));
         List<String> proNums = new ArrayList<>();
         for (ReleaseProductByBatch releaseProductByBatch : releaseProductByBatchList) {
 		    if (releaseProductByBatch.getReleaseCode().equals(ReleaseStatus.failure.value()) ||
@@ -1869,13 +1849,10 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 				}
             }
 		}
-        long l2 = System.currentTimeMillis();
-        System.err.println("打印l2 ----------- l1" + (l2 - l1));
 		List<ReleaseProductByBatch> reList = new ArrayList<>();
 		if (productsfromRelease.size() != 0) {
             productService.saveByJdbcTemplate(productsfromRelease);
 			List<Product> productes = productService.findProductIdAndProdnumsByProdNums(proNums);
-            System.err.println("新增物料之后,获取物料的个数=" + productes.size() + "新增物料的个数 =" + productsfromRelease.size());
 			for (Product producte : productes) {
 				ProductPrivate productPrivate = new ProductPrivate();
 				productPrivate.setB2cEnabled(IntegerConstant.YES_SHORT);
@@ -1894,18 +1871,12 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 			}
 		}
 
-        long l3 = System.currentTimeMillis();
-        System.err.println("打印l3 ----------- l2" + (l3 - l2));
 		if (CollectionUtils.isNotEmpty(reList)) {
             udpatePridAndRrodnum(reList);
 		}
-        long l4 = System.currentTimeMillis();
-        System.err.println("打印l4 ----------- l3" + (l4 - l3));
 		if (CollectionUtils.isNotEmpty(productPrivates)) {
             commonDao.save(productPrivates, ProductPrivate.class);
 		}
-        long l5 = System.currentTimeMillis();
-        System.err.println("打印l5 ----------- l4" + (l5 - l4));
 		if (reIds.size() > 0) {
 			map.put("reIds", reIds);
 		}
@@ -1953,10 +1924,11 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 	/**
 	 * 批量发布之后,需要做的事情,内部使用线程,不需要让用户等结果
 	 */
-	public void afterPublishToGoodsDo(final List<Long> productIds, final Set<Long> reIds) {
-		if (CollectionUtils.isEmpty(productIds)) {
+	public void afterPublishToGoodsDo(final List<Long> productIds, final Set<Long> reIds, String batchid) {
+        if (CollectionUtils.isEmpty(productIds) || StringUtils.isEmpty(batchid)) {
 			return ;
 		}
+//        final List<Goods> goodses = goodsService.findByBatchId(batchid);
 		final Runnable afterPublishToGoodsRunnable = new Runnable() {
 			@Override
 			public void run() {
@@ -1980,7 +1952,16 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 					List<Goods> goodses = goodsDao.findByProductIds(prIds);
 					goodsService.updateSpecByProducts(products, goodses);
 				}
-			}
+
+//                List<GoodsHistory> list = new ArrayList<>();
+//                for (Goods goodse : goodses) {
+//                    GoodsHistory goodsHistory = goodsHistoryService.converTGoodsHist(goodse, GoodsHistory.OperateType.Publish.getPhrase(), false);
+//                    list.add(goodsHistory);
+//                }
+//                if (CollectionUtils.isNotEmpty(list)) {
+//                    commonDao.save(list, GoodsHistory.class);
+//                }
+            }
 		};
 		try {
 			executor.submitTask(afterPublishToGoodsRunnable);
@@ -2016,4 +1997,12 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
             return ;
         }
     }
+
+	/**
+	 * 每天零层删除所有的信息
+	 */
+	@Override
+	public void deleteAllInfo() {
+		releaseProductByBatchDao.deleteAll();
+	}
 }

+ 32 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/task/ReleaseByBatchTask.java

@@ -0,0 +1,32 @@
+package com.uas.platform.b2c.prod.commodity.task;
+
+import com.uas.platform.b2c.prod.commodity.service.ReleaseProductByBatchService;
+import org.apache.log4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * 每天零层执行清空表操作
+ *
+ * @author yuj 2018-07-31 12:15
+ */
+@Component("releaseByBatchTask")
+public class ReleaseByBatchTask {
+
+    private final ReleaseProductByBatchService releaseProductByBatchService;
+
+    private final Logger logger = Logger.getLogger(getClass());
+
+    @Autowired
+    public ReleaseByBatchTask(ReleaseProductByBatchService releaseProductByBatchService) {
+        this.releaseProductByBatchService = releaseProductByBatchService;
+    }
+
+    /**
+     * 每天清空表信息
+     */
+    public void autoCleanReleaseByBatch() {
+        releaseProductByBatchService.deleteAllInfo();
+    }
+
+}

+ 6 - 0
src/main/java/com/uas/platform/b2c/prod/store/facade/impl/StoreInFacadeImpl.java

@@ -67,6 +67,12 @@ public class StoreInFacadeImpl implements StoreInFacade {
 		if (resultMap != null) {
 			return resultMap;
 		}
+		StoreIn storeIn = storeInDao.findByStoreName(newStoreInfo.getStoreName());
+		if (!StringUtils.isEmpty(storeIn)) {
+			if (!storeIn.getEnUU().equals(newStoreInfo.getEnterprise().getUu())) {
+				return new ResultMap(CodeType.NOT_PERMIT, "该名称店铺名称已经存在,请您更换一个店铺名称进行更改");
+			}
+		}
 		Set<Qualification> qualifications = store.getQualifications();
 		if (!CollectionUtils.isEmpty(qualifications)) {
 			Iterator<Qualification> iterator = qualifications.iterator();

+ 14 - 19
src/main/java/com/uas/platform/b2c/trade/presale/controller/CollectionController.java

@@ -16,11 +16,7 @@ import com.wordnik.swagger.annotations.ApiParam;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
 import org.springframework.util.StringUtils;
-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.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.ArrayList;
 import java.util.Date;
@@ -189,24 +185,23 @@ public class CollectionController {
 	 */
 	@RequestMapping(value = "/save", method = RequestMethod.POST)
 	@ApiOperation(value = "保存收藏信息", httpMethod = "POST")
-	public String saveEntity(@ApiParam(required = true, value = "保存的json对象") @RequestBody String str) {
-		String result = "success";
+	public ResultMap saveEntity(@ApiParam(required = true, value = "保存的json对象") @RequestBody String str) {
+		ResultMap map = ResultMap.success("ok");
 		if (StringUtils.hasText(str)) {
 			Collection store = FastjsonUtils.fromJson(str, Collection.class);
-			if (store.getComponentid() != null){
-				store.setUseruu(SystemSession.getUser().getUserUU());
-				if (SystemSession.getUser().getEnterprise() != null) {
-					store.setDissociative(Type.ENTERPRISING.value());
-					store.setEnuu(SystemSession.getUser().getEnterprise().getUu());
-				} else {
-					store.setDissociative(Type.PERSONAL.value());
-				}
-				store.setCreatetime(new Date());
-				result = collectionService.save(store);
+			store.setUseruu(SystemSession.getUser().getUserUU());
+			if (SystemSession.getUser().getEnterprise() != null) {
+				store.setDissociative(Type.ENTERPRISING.value());
+				store.setEnuu(SystemSession.getUser().getEnterprise().getUu());
+			} else {
+				store.setDissociative(Type.PERSONAL.value());
+			}
+			store.setCreatetime(new Date());
+			if ((store.getComponentid() != null) || (!StringUtils.isEmpty(store.getCmpuuid()))) {
+				map = collectionService.save(store);
 			}
 		}
-		System.out.println("result = " + result);
-		return result;
+		return map;
 	}
 
 }

+ 16 - 1
src/main/java/com/uas/platform/b2c/trade/presale/model/Collection.java

@@ -84,9 +84,15 @@ public class Collection implements Serializable {
 	/**
 	 * 规格信息
 	 */
-	@Column(name = "store_spec")
+	@Column(name = "store_spec", length = 4000)
 	private String spec;
 
+	/**
+	 * 器件的uuid
+	 */
+	@Column(name = "store_cmpuuid", length = 100)
+	private String cmpuuid;
+
 	/**
 	 * 收藏类型
 	 */
@@ -211,4 +217,13 @@ public class Collection implements Serializable {
 		this.spec = spec;
 		return this;
 	}
+
+	public String getCmpuuid() {
+		return cmpuuid;
+	}
+
+	public Collection setCmpuuid(String cmpuuid) {
+		this.cmpuuid = cmpuuid;
+		return this;
+	}
 }

+ 15 - 0
src/main/java/com/uas/platform/b2c/trade/presale/model/CollectionInfo.java

@@ -62,6 +62,12 @@ public class CollectionInfo implements Serializable{
 	@Column(name = "store_spec")
 	private String spec;
 
+	/**
+	 * 器件的uuid
+	 */
+	@Column(name = "store_cmpuuid", length = 100)
+	private String cmpuuid;
+
 	public Long getUseruu() {
 		return useruu;
 	}
@@ -126,4 +132,13 @@ public class CollectionInfo implements Serializable{
 		this.spec = spec;
 		return this;
 	}
+
+	public String getCmpuuid() {
+		return cmpuuid;
+	}
+
+	public CollectionInfo setCmpuuid(String cmpuuid) {
+		this.cmpuuid = cmpuuid;
+		return this;
+	}
 }

+ 1 - 1
src/main/java/com/uas/platform/b2c/trade/presale/service/CollectionService.java

@@ -52,7 +52,7 @@ public interface CollectionService {
 	 * @param store 收藏的信息
 	 * @return String 返回success
 	 */
-	String save(Collection store);
+	ResultMap save(Collection store);
 
 	/**
 	 * 2016年3月23日 下午3:35:26

+ 24 - 4
src/main/java/com/uas/platform/b2c/trade/presale/service/impl/CollectionServiceImpl.java

@@ -2,11 +2,14 @@ package com.uas.platform.b2c.trade.presale.service.impl;
 
 import com.uas.platform.b2c.common.account.model.User;
 import com.uas.platform.b2c.core.support.SystemSession;
+import com.uas.platform.b2c.prod.product.component.dao.ComponentDao;
+import com.uas.platform.b2c.prod.product.component.modal.Component;
 import com.uas.platform.b2c.trade.presale.dao.CollectionDao;
 import com.uas.platform.b2c.trade.presale.dao.CollectionInfoDao;
 import com.uas.platform.b2c.trade.presale.model.Collection;
 import com.uas.platform.b2c.trade.presale.model.CollectionInfo;
 import com.uas.platform.b2c.trade.presale.service.CollectionService;
+import com.uas.platform.b2c.trade.support.CodeType;
 import com.uas.platform.b2c.trade.support.ResultMap;
 import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.model.Type;
@@ -15,6 +18,7 @@ import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Sort;
 import org.springframework.data.jpa.domain.Specification;
 import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
 
 import javax.persistence.criteria.CriteriaBuilder;
 import javax.persistence.criteria.CriteriaQuery;
@@ -37,6 +41,9 @@ public class CollectionServiceImpl implements CollectionService {
 	@Autowired
 	private CollectionInfoDao collectionInfoDao;
 
+	@Autowired
+	private ComponentDao componentDao;
+
 	@Override
 	public List<CollectionInfo> deleteById(Long id) {
 		collectionDao.delete(id);
@@ -82,7 +89,20 @@ public class CollectionServiceImpl implements CollectionService {
 	}
 
 	@Override
-	public String save(Collection store) {
+	public ResultMap save(Collection store) {
+		if ((!StringUtils.isEmpty(store.getCmpuuid())) || (store.getComponentid() != null)) {
+			Component component = null;
+			if(!StringUtils.isEmpty(store.getCmpuuid())) {
+				component = componentDao.findByUuid(store.getCmpuuid());
+			} else if (store.getComponentid() != null) {
+				component = componentDao.findOne(store.getComponentid());
+			}
+
+			if (component != null) {
+				store.setComponentid(component.getId());
+				store.setSpec(component.getDescription());
+			}
+		}
 		List<Collection> storeList = new ArrayList<Collection>();
 		if (store.getKind() == 1) {
 			if (SystemSession.getUser().getEnterprise() != null) {
@@ -95,7 +115,7 @@ public class CollectionServiceImpl implements CollectionService {
 			if (storeList.size() == 0) {
 				collectionDao.save(store);
 			}else {
-				return "repeat";
+				return new ResultMap(CodeType.NOT_PERMIT, "该信息已被收藏");
 			}
 		} else if (store.getKind() == 2) {
 			if (SystemSession.getUser().getEnterprise() != null){
@@ -107,10 +127,10 @@ public class CollectionServiceImpl implements CollectionService {
 			if (storeList.size() == 0) {
 				collectionDao.save(store);
 			}else {
-				return "repeat";
+				return new ResultMap(CodeType.NOT_PERMIT, "该信息已被收藏");
 			}
 		}
-		return "success";
+		return ResultMap.success("成功");
 	}
 
 	@Override

BIN
src/main/resources/jxls-tpl/trade/releaseByBatch-rmb.xls


BIN
src/main/resources/jxls-tpl/trade/releaseByBatchError-rmb.xls


BIN
src/main/resources/jxls-tpl/trade/releaseByBatchError-usd.xls


BIN
src/main/resources/jxls-tpl/trade/releasebyBatch-usd.xls


+ 5 - 0
src/main/resources/spring/task.xml

@@ -10,6 +10,11 @@
     <task:scheduled-tasks>
         <task:scheduled ref="OrderTask" method="autoConfirmOrderRevice" cron="0 0 1 * * ?"/>
     </task:scheduled-tasks>
+
+    <!--每天零层清理上架的临时表-->
+    <task:scheduled-tasks>
+        <task:scheduled ref="releaseByBatchTask" method="autoCleanReleaseByBatch" cron="0 0 1 * * ?"/>
+    </task:scheduled-tasks>
     <!--超时自动初评-->
     <task:scheduled-tasks>
         <task:scheduled ref="RateTask" method="autoRate" cron="0 0 1 * * ?"/>

BIN
src/main/webapp/WEB-INF/cert/yrsc.cer


BIN
src/main/webapp/WEB-INF/cert/yrsc.pfx


BIN
src/main/webapp/resources/img/all/loading.gif


BIN
src/main/webapp/resources/img/vendor/authority/role-bg-1.png


BIN
src/main/webapp/resources/img/vendor/authority/role-bg-2.png


BIN
src/main/webapp/resources/img/vendor/authority/role-bg-3.png


BIN
src/main/webapp/resources/img/vendor/authority/role-bg-4.png


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

@@ -15,28 +15,38 @@ define([ 'app/app' ], function(app) {
 			if(--i < 1) Loading.hide();
 		};
 
-		var im_api_url = 'api/chat/message';
+		// var im_api_url = 'api/chat/message';
+		// var upload_api_url = 'release/product/release/excel'
+		// var upload_api_urlPCB = 'release/product/release/excel/pcb'
+		var RegluArr = [
+			'api/chat/message',
+			'release/product/release/excel',
+			'release/product/release/excel/pcb',
+			'release/product/batchRelease/pcb',
+			'release/product/batchRelease'
+		]
 		return {
 			request: function(cfg){
-				if(cfg.url && cfg.url.indexOf(im_api_url) < 0) {
+				// console.log(cfg.url)
+				if(cfg.url && RegluArr.indexOf(cfg.url) < 0) {
 					startLoading();
 				}
 				return cfg;
 			},
 			requestError: function(rejection) {
-				if(rejection.config.url && rejection.config.url.indexOf(im_api_url) < 0) {
+				if(rejection.config.url && RegluArr.indexOf(rejection.config.url) < 0) {
 					endLoading();
 				}
 				return $q.reject(rejection);
 			},
 			response: function(res) {
-				if(res.config.url && res.config.url.indexOf(im_api_url) < 0) {
+				if(res.config.url && RegluArr.indexOf(res.config.url) < 0) {
 					endLoading();
 				}
 				return res;
 			},
 			responseError: function(rejection) {
-				if(rejection.config.url && rejection.config.url.indexOf(im_api_url) < 0) {
+				if(rejection.config.url && RegluArr.indexOf(rejection.config.url) < 0) {
 					endLoading();
 				}
 				if(rejection.status == 401) {

+ 6 - 17
src/main/webapp/resources/js/sso/app.js

@@ -51,12 +51,6 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
             title: '角色权限',
 			controller: 'rolePermissionCtrl',
 			controllerUrl: 'app/controllers/rolePermissionCtrl'
-		})).state('ssoApplyBind', angularAMD.route({
-			url: '/apply',
-			templateUrl: 'static/view/sso/ssoApplyBind.html',
-            title: '申请绑定',
-			controller: 'applyBindCtrl',
-			controllerUrl: 'app/controllers/applyBindCtrl'
 		})).state('ssoAddress', angularAMD.route({
             url: '/address',
             templateUrl: 'static/view/sso/ssoAddress.html',
@@ -218,29 +212,25 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
 		$rootScope.rootPath = BaseService.getRootPath();
 		$rootScope.page = 'sso';// 导航栏状态,'帐户中心'状态激活
         AuthenticationService.getAuthentication().success(function (data) {
+            data.enterprise = {};
             angular.forEach(data.enterprises, function (item) {
-                if (item.current) {
+            	if (item.current) {
                     data.enterprise = item;
-                }
+                    return;
+				}
             });
             $rootScope.userInfo = data;
-            $rootScope.personage = $rootScope.userInfo.enterprise ? true : false;
+            $rootScope.userInfo.enterprise.enName ? $rootScope.personage = true : $rootScope.personage = false;
             if ($rootScope.userInfo.enterprise) {
-                $rootScope.isAdmin = $rootScope.userInfo.enterprise.enAdminuu === $rootScope.userInfo.userUU ? true : false;
+            	$rootScope.userInfo.enterprise.enAdminuu === $rootScope.userInfo.userUU ? $rootScope.isAdmin = true : $rootScope.isAdmin = false;
 			} else {
                 $rootScope.isAdmin = false
 			}
-
         }).error(function (error) {
             toaster.pop('error', '获取登录信息失败');
         })
 	}]);
 
-	// 个人中心左侧导航,这里只是读取rootScopt进行隐藏的控制
-	app.controller('LeftMenuCtrl', ['$scope', '$rootScope', function($scope, $rootScope) {
-
-	}]);
-
 	app.controller('UserCenterHeaderCtrl', ['$scope',  'InternalMessage', /*'$rootScope',, '$q',*/ function ($scope, InternalMessage/*, $rootScope, , $q*/) {
 		$scope.homeUrl = window.location.pathname.replace('/user', '');
 		// 获取未读消息数量
@@ -416,7 +406,6 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
      */
     app.controller('UserCenterHeaderCtrl', ['$scope', '$rootScope', 'BaseService', 'InternalMessage', '$http', 'toaster', function ($scope, $rootScope, BaseService, InternalMessage, $http, toaster) {
 		$scope.homeUrl = BaseService.getRootPath();
-        console.info($rootScope.userInfo);
         InternalMessage.getUrl({}, function(data) {
             var url = data.url;
             if (url == "http://218.17.158.219:24000/message") {

+ 0 - 2296
src/main/webapp/resources/js/sso/controllers/applyBindCtrl.js

@@ -1,2296 +0,0 @@
-/**
- * Created by yujia on 2017/3/24.
- *  原厂认证
- */
-define(['app/app'], function (app) {
-    "use strict";
-    app.register.controller('applyBindCtrl', ['$scope', '$rootScope', 'Enterprise', 'User', 'toaster', '$modal', 'BaseService', 'ngTableParams', '$http', 'AuthenticationService', '$stateParams','AccountResource','AccountRole', 'Authority', function ($scope, $rootScope, Enterprise, User, toaster, $modal, BaseService, ngTableParams, $http, AuthenticationService, $stateParams, AccountResource, AccountRole, Authority) {
-        $rootScope.active = 'sso_apply';
-        document.title = '绑定审核——帐户中心';
-        $scope.tab = 'base';
-        $scope.addingUser = false;
-        $scope.setAddingUser = function (status) {
-            $scope.addingUser = status;
-            $scope.adding = false;
-        };
-        $scope.userInfo = $rootScope.userInfo;
-        $scope.updateState = false;
-        $scope.filterRole = 'all';
-        $scope.searchParams = {
-            keyword: ''
-        };
-        $scope.isAdmin = $rootScope.userInfo.enterprise.enAdminuu === $rootScope.userInfo.userUU ? true : false;
-        // $scope.userInfo.pwdEnable = false;
-        // $scope.userInfo.haveUserQuestion = false;
-        // $scope.userInfo.userEmail = null;
-
-        //table设置
-        var applyToEnterpriseTableParams = function () {
-            $scope.applyToEnterpriseTableParams = new ngTableParams({
-                page : 1,
-                count : 10
-            }, {
-                total : 0,
-                getData : function ($defer, params) {
-                    var param = BaseService.parseParams(params.url());
-                    if ($scope.page.totalElements) {
-                        if (param.page < 1 || param.page > $scope.page.totalElements) {
-                            toaster.pop('error', '请输入正确的页数!');
-                            return;
-                        }
-                    }
-                    //param.page = param.page;
-                    param.size = param.count;
-                    param.speaceUU = $scope.userInfo.enterprise.uu;
-                    if (!($scope.searchParams.keyword.trim() == '')) {
-                        param.keyword = $scope.searchParams.keyword.trim();
-                    }
-                    // 状态为申请中
-                    param.status = 311;
-                    $http({
-                        method: 'get',
-                        dataType: 'json',
-                        url: $scope.urlPrex + '/api/userspace/apply/info/mall',
-                        params: {speaceUU: param.speaceUU, page: param.page, size: param.size, status: param.status, keyword: param.keyword}
-                    }).success(function (page) {
-                        params.total(page.content.totalElements);
-                        $scope.page = page.content;
-                        $scope.totalPages = page.content.totalPages;
-                        $scope.content = page.content.content;
-                        $scope.totalElements = page.content.totalElements;
-                    }).error(function (response) {
-                        toaster.pop('error', '获取未处理审批数据失败');
-                    });
-                    // Enterprise.findApplyToMall(param, {}, function (page) {
-                    //     $defer.resolve(page.content || []);
-                    //     params.total(page.totalElements);
-                    //     $scope.page = page;
-                    //     $scope.totalPages = page.totalPages;
-                    //     $scope.content = page.content;
-                    // }, function (error) {
-                    //     console.log(error);
-                    //     $defer.resolve([]);
-                    //     params.total(0);
-                    //     $scope.totalPages = 0;
-                    //     toaster.pop('error', '数据获取失败,请重新刷新页面!');
-                    // });
-                }
-            });
-        };
-
-        if ($scope.isAdmin) {
-            User.isDevOrProd(null, function (data) {
-                // $scope.isProd = data.data;
-                $scope.urlPrex = data.data == 'success' ? 'https://sso.ubtob.com' : 'http://192.168.253.6:32323';
-                applyToEnterpriseTableParams();
-            }, function (response) {
-                toaster.pop('error', '获取运行环境失败');
-            });
-        }
-        // 申请
-        $scope.auditApply = function (status, id, UU) {
-            var param = {
-                userUU: UU,
-                id: id,
-                status: status
-            }
-            Enterprise.auditApply(param, {}, function (data) {
-                console.log(data);
-                applyToEnterpriseTableParams();
-            }, function (error) {
-                console.log(error);
-                $defer.resolve([]);
-                params.total(0);
-                $scope.totalPages = 0;
-                toaster.pop('error', '数据获取失败,请重新刷新页面!');
-            });
-        }
-
-        $scope.searchApply = function () {
-            applyToEnterpriseTableParams();
-        }
-
-        var getEnterprise = function () {
-            // 获取企业信息
-            Enterprise.getEnterpriseInfo({enuu : $scope.userInfo.enterprise.uu}, function(data) {
-                $scope.enterpriseInfo = data;
-                $scope.enBusinessScope = $scope.enterpriseInfo.enBusinessScope ? angular.copy($scope.enterpriseInfo.enBusinessScope).split(',') : [];
-                $scope.enterpriseInfoBackup = angular.copy($scope.enterpriseInfo);
-                $scope.enAdminuu = $scope.enterpriseInfo.enAdminuu;
-                User.getUserByUU({uu: $scope.enAdminuu}, {}, function(data){
-                    $scope.adminInfo = data;
-                    console.log($scope.adminInfo);
-                }, function(){
-                    toaster.pop('error', '获取管理员信息失败');
-                });
-            },function() {
-                toaster.pop('error', '获取企业信息失败');
-            });
-        }
-        if (typeof $scope.userInfo != 'undefined' && typeof $scope.userInfo.enterprise != 'undefined') {
-            getEnterprise();
-        } else {
-            AuthenticationService.getAuthentication().success(function (data) {
-                $scope.userInfo = data;
-                for (var i=0; i<$scope.userInfo.enterprises.length; i++) {
-                    if ($scope.userInfo.enterprises[i].current) {
-                        $scope.userInfo.enterprise = $scope.userInfo.enterprises[i];
-                        break;
-                    }
-                }
-                getEnterprise();
-            }, function (error) {
-                toaster.pop('error', '获取用户信息失败');
-            })
-        }
-
-        $scope.pageParam = {};
-        $scope.tableParams = new ngTableParams({
-            page : 1, // show first page
-            count : 10 // count per page
-        }, {
-            total : 0,
-            getData : function($defer, params) {
-                var param = BaseService.parseParams(params.url());
-                param.enuu = $scope.userInfo.enterprise.uu;
-                if(!$scope.searchMthod) {
-                    Enterprise.getAllUsersByEnuu(param, function (page) {
-                        if (page) {
-                            $scope.pageParam.start = (page.number-1)*page.size+1;
-                            $scope.pageParam.end = $scope.pageParam.start + page.numberOfElements - 1;
-                            $scope.pageParam.all = page.totalElements;
-                            params.total(page.totalElements);
-                            $defer.resolve(page.content);
-                            $scope.users = page.content;
-                            $scope.reloadUserCheck(false);
-                        }
-                    },function (error) {
-                        toaster.pop('error', '获取企业人员信息失败',error.data);
-                    });
-                }
-                else {
-                    param.keyword = $scope.keyword;
-                    if (filterRolejs !== 1){
-                        param.roleId = filterRolejs;
-                    }
-                    Enterprise.findUsersByKeyword(param,function (page) {
-                        if (page) {
-                            $scope.pageParam.start = (page.number-1)*page.size+1;
-                            $scope.pageParam.end = $scope.pageParam.start + page.numberOfElements - 1;
-                            $scope.pageParam.all = page.totalElements;
-                            params.total(page.totalElements);
-                            $defer.resolve(page.content);
-                            $scope.users = page.content;
-                            $scope.reloadUserCheck(false);
-                        }
-                    },function (error) {
-                        toaster.pop('error', '获取企业人员信息失败',error.data);
-                    })
-                }
-            }
-        });
-
-        var filterRolejs = 1;
-        $scope.onSearch = function (keyword,filterRole) {
-            filterRolejs = 1;
-            if ((keyword != null && keyword != '') || filterRole !== 'all') {
-                if (filterRole === 'all'){
-                    filterRolejs = 1;
-                }else {
-                    filterRolejs = filterRole;
-                }
-                $scope.searchMthod = true;
-                $scope.keyword = keyword;
-            } else {
-                $scope.searchMthod = false;
-            }
-            $scope.tableParams.page(1);
-            $scope.tableParams.reload();
-        };
-        $scope.onKeyUpSearch = function (keyword, filterRole, event) {
-            if (event && event.keyCode == 13) {
-                $scope.onSearch(keyword, filterRole);
-            }
-        }
-
-        $scope.newUser = {};
-
-        //弹出添加用户模态框
-        $scope.addExistUser = function () {
-            $scope.adding = false;
-            $scope.setAddingUser(false);
-            $scope.newUser = {};
-            var modalInstance = $modal.open({
-                animation: true,
-                templateUrl: $rootScope.rootPath + '/static/view/vendor/forstore/addExistUser.html',
-                controller: 'AddExistUserCtrl'
-            });
-
-            modalInstance.result.then(function () {
-                $scope.userTelSuccess = false;
-                $scope.userTelError = false;
-                $scope.tableParams.page(1);
-                $scope.tableParams.reload();
-            }, function () {
-
-            });
-
-        };
-        /**
-         * 添加未注册用户
-         */
-        $scope.addUser = function () {
-            if (!$scope.userEmailSuccess || !$scope.userTelSuccess) {
-                toaster.pop('error', '请输入正确的信息后提交');
-                return;
-            }
-            $scope.adding = true;
-            $scope.loading = true;
-            Enterprise.saveUser({}, $scope.newUser, function () {
-                $scope.loading = false;
-                toaster.pop('success', '提示', '增加用户成功:' + $scope.newUser.userName);
-                $scope.setAddingUser(false);
-                $scope.newUser = {userSex: 'M'};
-                $scope.tableParams.page(1);
-                $scope.tableParams.reload();
-                $scope.adding = false;
-                // $scope.newUserForm.newUserTel.$setValidity('available', false);
-                // $scope.newUserForm.newUserEmail.$setValidity('available', false);
-                $scope.userTelSuccess = false;
-                $scope.userTelError = false;
-                $scope.userEmailSuccess = false;
-                $scope.userEmailError = false;
-            }, function (response) {
-                $scope.loading = false;
-                toaster.pop('error', '错误', response.data);
-            });
-        };
-
-        $scope.adding = false;
-        $scope.setAdding = function (status) {
-            $scope.adding = status;
-        }
-        /**
-         * 删除用户
-         */
-        $scope.removeUser = function (user) {
-
-            // if (confirm('确定删除用户(' + user.userName + ')吗?')) {
-            // }
-            Enterprise.removeUser({uu: user.userUU}, function () {
-                toaster.pop('success', '提示', '用户删除成功。');
-                $scope.tableParams.page(1);
-                $scope.tableParams.reload();
-                $scope.showDelUserFlag = false;
-            }, function (response) {
-                toaster.pop('error', '删除失败', response.data);
-            });
-        };
-        //用户删除确认框
-        $scope.showDelUserFlag = false;
-
-        $scope.setShowDelUserFlag = function (flag, user) {
-            $scope.showDelUserFlag = flag;
-            if (flag) {
-                $scope.delUser = user;
-            }
-        }
-        /***
-         * 全选
-         * */
-        $scope.isCheckAll = false;
-        $scope.doCheckAll = function () {
-            $scope.isCheckAll = !$scope.isCheckAll;
-            if ($scope.isCheckAll) {
-                $scope.reloadUserCheck(true);
-            } else {
-                $scope.reloadUserCheck(false);
-            }
-        }
-
-        $scope.checkUser = function (user) {
-            user.checked = !user.checked;
-            var allcheck = true
-            angular.forEach($scope.users, function (item) {
-                if (!item.checked) {
-                    allcheck = false;
-                }
-            });
-            $scope.isCheckAll = allcheck;
-        }
-
-        $scope.reloadUserCheck = function (flag) {
-            angular.forEach($scope.users, function (item) {
-                item.checked = flag;
-            });
-        }
-        /**
-         * 验证手机号是否可用
-         */
-        $scope.telValid = function (tel) {
-            if (tel) {
-                $http.get('basic/user/telEnable', {
-                    params: {
-                        tel: tel
-                    }
-                }).success(function (data) {
-                    data = eval(data);
-                    if (data == true) {
-                        // $scope.newUserForm.newUserTel.$setValidity('available', true);
-                        $scope.userTelSuccess = true;
-                        $scope.userTelError = false;
-                    } else {
-                        // $scope.newUserForm.newUserTel.$setValidity('available', false);
-                        $scope.userTelError = true;
-                        $scope.userTelSuccess = false;
-                        if (tel.length == 11)
-                            toaster.pop('error', '错误', '手机号 ' + tel + ' 已被注册');
-                    }
-                }).error(function () {
-                    $scope.userTelSuccess = false;
-                    $scope.userTelError = true;
-                });
-            } else {
-                $scope.userTelSuccess = false;
-                $scope.userTelError = false;
-            }
-        };
-
-        /**
-         * 验证邮箱是否可用
-         */
-        $scope.emailValid = function (email) {
-            if (email) {
-                $http.get('basic/user/emailEnable', {
-                    params: {
-                        email: email
-                    }
-                }).success(function (data) {
-                    data = eval(data);
-                    if (data == true) {
-                        // $scope.newUserForm.newUserEmail.$setValidity('available',
-                        //     true);
-                        $scope.userEmailSuccess = true;
-                        $scope.userEmailError = false;
-                    } else {
-                        // $scope.newUserForm.newUserEmail.$setValidity('available',
-                        //     false);
-                        $scope.userEmailError = true;
-                        $scope.userEmailSuccess = false;
-                        toaster.pop('error', '错误', '邮箱 ' + email + ' 已被注册');
-                    }
-                }).error(function () {
-                    $scope.userEmailError = true;
-                    $scope.userEmailSuccess = false;
-                });
-            } else {
-                $scope.userEmailError = false;
-                $scope.userEmailSuccess = false;
-            }
-        };
-
-        /**
-         * 变更到更新状态
-         */
-        $scope.changeToUpdate = function (isUpdate) {
-            // if ($rootScope.userInfo.userUU != $rootScope.userInfo.enterprise.enAdminuu) {
-            //     toaster.pop('error', '您无该模块的编辑权限,请联系企业管理员进行编辑维护!');
-            //     return;
-            // }
-            Authority.getAuthority({resUrl: '/basic/enterprise/*/updateInfo'}, function (data) {
-                if (data.status == 'fail') {
-                    toaster.pop('error', data.msg || '系统错误');
-                } else {
-                    $scope.updateState = isUpdate;
-                    if ($scope.updateState == false) {
-                        $scope.enterpriseInfo = angular.copy($scope.enterpriseInfoBackup);
-                    }
-                }
-            });
-        };
-
-        /**
-         * 验证企业信息
-         */
-        function validateEnterpriseInfo() {
-            var props = ['enName', 'enAddress', 'enUrl'];
-
-            var flag = true;
-            angular.forEach(props, function (prop) {
-                if ($scope.enterpriseInfo.hasOwnProperty(prop)) {
-                    if (!$scope.enterpriseInfo[prop] || $scope.enterpriseInfo[prop]
-                        === '') {
-                        console.log(prop + '不能为空');
-                        // TODO 记录验证信息
-                        flag = false;
-                    }
-                } else {
-                    console.log(prop + '不能为空');
-                    flag = false;
-                }
-            });
-            return flag;
-        }
-
-        // 获取行业信息
-        $http.get('static/data/profession.json').success(function (data) {
-            $scope.list = data;
-        });
-
-        // 选择行业
-        $scope.profession = new Array();
-        $scope.showProfession = false;
-        $scope.selectProfession = function () {
-            $scope.professionArray = [];
-            $scope.active = [];
-            $scope.showProfession = !$scope.showProfession;
-            $scope.profession[0] = $scope.list;
-        };
-
-        $scope.isInList = false;
-        $scope.isInInput = false;
-        $scope.hideList = function () {
-            if (!$scope.isInList && !$scope.isInInput && $scope.showProfession) {
-                $scope.showProfession = false;
-            }
-        };
-
-        $scope.enterInput = function () {
-            $scope.isInInput = true;
-        };
-
-        $scope.leaveInput = function () {
-            $scope.isInInput = false;
-        };
-
-        $scope.enterList = function () {
-            $scope.isInList = true;
-        };
-
-        $scope.leaveList = function () {
-            $scope.isInList = false;
-        };
-
-        // 行业子菜单点击
-        $scope.onItemClick = function (key, index, value) {
-            $scope.active[index] = key;
-            if (angular.isString(value)){ // 值为字符串说明点击的是最后一级
-                $scope.enterpriseInfo.enIndustry = value;
-                $scope.showProfession = false;
-                return;
-            }
-            $scope.professionArray = [];
-            $scope.profession.splice(index+1);
-            if (angular.isArray(value)){ // 值为数组说明下一级是最后一级
-                $scope.professionArray = value;
-            } else if (angular.isObject(value)) {
-                $scope.profession[index+1] = value;
-            }
-        };
-
-        // 判断值是否为字符串
-        $scope.isString = function (value) {
-            return angular.isString(value);
-        };
-
-        // 增加经营范围内容标签
-        $scope._scope = $scope
-        $scope.addBusinessScope = function () {
-            if(!$scope.businessScope) return false;
-            if($scope.enBusinessScope.length > 20) {
-                toaster.pop('error', '经营范围内容标签不能超过20个!');
-                return false;
-            }
-            $scope.enBusinessScope.push($scope.businessScope);
-            $scope.businessScope = '';
-        }
-
-        // 删除选择的内容标签
-        $scope.clearBusinessScope = function (key) {
-            $scope.enBusinessScope.splice(key, 1);
-        }
-        /**
-         * 保存企业信息
-         */
-        $scope.saveUpdate = function () {
-            $scope.enterpriseInfo.enBusinessScope = $scope.enBusinessScope.join(',');
-            // 先检查信息是否为空
-            if (angular.equals($scope.enterpriseInfo,
-                $scope.enterpriseInfoBackup)) {
-                toaster.pop('error', '未做任何修改');
-                $scope.updateState = false;
-                return;
-            }
-            var enterpriseInfoFlag = validateEnterpriseInfo();
-            if (!enterpriseInfoFlag) {
-                toaster.pop('error', '请补充完信息后再次提交');
-                return;
-            }
-
-            Enterprise.updateEnterpriseInfo(
-                {enuu: $scope.userInfo.enterprise.uu}, $scope.enterpriseInfo,
-                function () {
-                    $scope.loading = false;
-                    toaster.pop('success', '提示', '企业信息修改成功');
-                    $scope.enterpriseInfoBackup = angular.copy(
-                        $scope.enterpriseInfo);
-                    $scope.updateState = false;
-
-                }, function (response) {
-                    $scope.loading = false;
-                    toaster.pop('error', '修改失败', response.data);
-                });
-        };
-
-        // 直接跳转到申请绑定
-        if ($rootScope.tab) {
-            $scope.tab = $rootScope.tab;
-            // 删除$rootScope.tab属性
-            delete $rootScope.tab;
-        }
-        // 切换tab
-        $scope.checkTab = function (t) {
-            $scope.tab = t;
-            if (t === 'role' && $scope.rolesExcept) {
-                toaster.pop('error', '获取企业角色信息失败',$scope.rolesExcept);
-            }
-            // if (t === 'auth') {
-            //     $scope.keyword = '';
-            //     $scope.onSearch($scope.keyword,'all');
-            // }
-        };
-
-        /* 查询接口权限 */
-        // AccountRole.findAuthority({resUrl: encodeURIComponent('/account/role'), method: 'GET'}, function (data) {
-        //
-        // }, function (error) {
-        //
-        // })
-
-        $scope.updatePassword = function () {
-            AuthenticationService.redirectPassword();
-        };
-
-        $scope.updateUserEmail = function(){
-            AuthenticationService.redirectEmail();
-        };
-
-        $scope.updateUserTel = function(){
-            AuthenticationService.redirectPhone();
-        };
-
-        $scope.updateUserPay = function(){
-            var modalInstance = $modal.open({
-                animation: true,
-                templateUrl: $rootScope.rootPath + '/static/view/vendor/modal/updateUserPay.html',
-                controller: 'UserPayCtrl',
-                resolve: {
-                    user: function(){return angular.copy($rootScope.userInfo);}
-                }
-            });
-
-            modalInstance.result.then(function(){
-            }, function(){
-            });
-        };
-
-        $scope.updateUserQuestion = function(){
-            AuthenticationService.redirectSecQuestion();
-        };
-
-        $scope.updateRealAuth = function(){
-            AuthenticationService.redirectRealNameAuth();
-        };
-
-        //卖家中心 等级提示跳转
-        if($stateParams.op!=""){
-            var op =$stateParams.op;
-            $scope.checkTab('safe');
-            switch(op)
-            {
-                case 'pwd':
-                    $scope.updatePassword();
-                    break;
-                case 'question':
-                    $scope.updateUserQuestion();
-                    break;
-                case 'email':
-                    $scope.updateUserEmail();
-                    break;
-            }
-        }
-        //角色控制
-        $scope.roles = {};
-        AccountResource.query({}, function (data) {
-            if (data && data.length > 0) {
-                data[0].$open = true;
-            }
-            $scope.resources = data;
-        });
-        var getData = function () {
-            AccountRole.findAll({}, function (data) {
-                var defaults = [], custom = [];
-                angular.forEach(data, function (d) {
-                    if (d.isdefault == 1)
-                        defaults.push(d);
-                    else
-                        custom.push(d);
-                });
-                $scope.roles = {defaults: defaults, custom: custom};
-            },function (error) {
-                $scope.rolesExcept = error.data;
-            });
-            AccountRole.getByExistRoleAndEnuu({}, function (data) {
-                var defaults = [], custom = [];
-                angular.forEach(data, function (d) {
-                    if (d.isdefault == 1)
-                        defaults.push(d);
-                    else
-                        custom.push(d);
-                });
-                $scope.existRoles = {defaults: defaults, custom: custom};
-            });
-        };
-        getData();
-        $scope.editRole = function (role) {
-            var modalInstance = $modal.open({
-                animation: true,
-                templateUrl: $rootScope.rootPath + '/static/view/vendor/modal/role_detail.html',
-                controller: 'RoleEditCtrl',
-                resolve: {
-                    role: function () {
-                        return role;
-                    }
-                }
-            });
-            modalInstance.result.then(function (added) {
-                added && getData();
-            });
-        };
-
-        $scope.editUserRole = function (user) {
-            var modalInstance = $modal.open({
-                animation: true,
-                templateUrl: $rootScope.rootPath + '/static/view/vendor/modal/edit_user_role.html',
-                controller: 'UserRoleEditCtrl',
-                resolve: {
-                    user: function () {
-                        return user;
-                    }
-                }
-            });
-        };
-
-        $scope.inSelect = false;
-        $scope.setInSelect = function (status) {
-            $scope.inSelect = status;
-        }
-        $(document).on("click", function () {
-            $scope.$apply(function () {
-                if (!$scope.inSelect) {
-                    $scope.setAdding(false);
-                }
-            })
-        })
-    }]);
-
-
-    /*
-     * 绑定用户到企业
-     */
-    app.register.controller('AddExistUserCtrl',
-        ['$scope', '$modalInstance', 'Enterprise', 'AuthenticationService',
-            '$timeout', 'toaster',
-            function ($scope, $modalInstance, Enterprise, AuthenticationService,
-                      $timeout, toaster) {
-                $scope.searching = false;
-                //根据输入的内容查找用户
-                $scope.searchUser = function (keyWord) {
-                    $scope.searching = true;
-                    $scope.searchSuccess = false;
-                    $scope.searchFailed = false;
-                    $scope.illegalError = false;
-                    $scope.reBindError = false;
-                    $scope.okDisabled = false;
-                    Enterprise.searchUser({keyWord: keyWord}, function (data) {
-                        $scope.searchSuccess = true;
-                        $scope.searchFailed = false;
-                        $scope.user = data;		//查询到的用户
-                    }, function (response) {
-                        $scope.searchSuccess = false;
-                        $scope.searchFailed = true;
-                    });
-                };
-
-                $scope.onKeyDown = function (e, key) {
-                    var keycode = window.event ? e.keyCode : e.which;
-                    if (keycode == 13) {
-                        $scope.searchUser(key);
-                    }
-                }
-
-                //确认绑定
-                $scope.ok = function (keyWord) {
-                    AuthenticationService.getAuthentication().success(function (data) {
-                        $scope.currentUser = data;	//当前登录的用户(管理员)
-                        //不可自己绑定自己
-                        if ($scope.currentUser.userUU == $scope.user.userUU) {
-                            $scope.illegalError = true;
-                            $scope.okDisabled = true;
-                            return false;
-                        }
-
-                        //用户未绑定到任何企业时
-                        if (!$scope.user.enterprises) {
-                            //正常绑定
-                            Enterprise.bindUserToMyEnterprise({userUU: $scope.user.userUU},
-                                function (data) {
-                                    $scope.okDisabled = true;
-                                    toaster.pop("success", "提示", "用户绑定成功");
-                                    $modalInstance.close(true);
-                                }, function (response) {
-                                    toaster.pop('error', response.data);
-                                });
-                            return true;
-                        }
-
-                        //用户已绑定到某些企业时
-                        for (var i = 0; i < $scope.currentUser.enterprises.length; i++) {
-                            if ($scope.currentUser.enterprises[i].current) {
-                                for (var j = 0; j < $scope.user.enterprises.length; j++) {
-                                    //该用户已绑定到当前企业,不可重复绑定
-                                    if ($scope.currentUser.enterprises[i].uu
-                                        == $scope.user.enterprises[j].uu) {
-                                        $scope.reBindError = true;
-                                        $scope.okDisabled = true;
-                                        return false;
-                                    }
-                                }
-                                //该用户未绑定到当前企业,可以进行绑定
-                                Enterprise.bindUserToMyEnterprise(
-                                    {userUU: $scope.user.userUU}, function (data) {
-                                        $scope.okDisabled = true;
-                                        toaster.pop("success", "提示", "用户绑定成功");
-                                        $modalInstance.close(true);
-                                    }, function (response) {
-                                        toaster.pop('error', response.data);
-                                    });
-
-                            }
-                        }
-
-                    });
-                };
-
-                $scope.cancel = function () {
-                    $modalInstance.dismiss();
-                };
-            }]);
-
-    // 修改密码Controller
-    app.register.controller('PasswordCtrl',
-        ['$rootScope', '$scope', '$modalInstance', 'user', 'User', 'toaster','$state',
-            function ($rootScope, $scope, $modalInstance, user, User, toaster,$state) {
-                $rootScope.$on('$stateChangeStart',
-                    function(event, toState, toParams, fromState, fromParams){
-                        $modalInstance.dismiss();
-                    })
-                $scope.user = user;
-                $scope.checking = false;
-                $scope.showPassword = false;
-                $scope.showNewPassword = false;
-                $scope.showPassword1 = false;
-                $scope.reloadKeyboard = function (type, $event) {
-                    $event.stopPropagation();
-                    if (type === 'showPassword') {
-                        $scope.showPassword = !$scope.showPassword;
-                        if (!$scope.showPassword) {
-                            $scope.checkPassword($scope.user.password);
-                        } else {
-                            $scope.closeOtherKeyboard('showPassword');
-                        }
-                    } else if (type === 'showNewPassword') {
-                        $scope.showNewPassword = !$scope.showNewPassword;
-                        if (!$scope.showNewPassword) {
-                            $scope.checkNewPassword($scope.user.newPassword);
-                        } else {
-                            $scope.closeOtherKeyboard('showNewPassword');
-                        }
-                    } else if (type === 'showPassword1') {
-                        $scope.showPassword1 = !$scope.showPassword1;
-                        if (!$scope.showNewPassword1) {
-                            $scope.checkNewPassword1($scope.user.newPassword1);
-                        } else {
-                            $scope.closeOtherKeyboard('showPassword1');
-                        }
-                    }
-                }
-
-                function resetPassword() {
-                    $scope.showPassword = false;
-                    $scope.checkPassword($scope.user.password);
-                }
-
-                function resetNewPassword() {
-                    $scope.showNewPassword = false;
-                    $scope.checkNewPassword($scope.user.newPassword);
-                }
-
-                function resetPassword1() {
-                    $scope.showPassword1 = false;
-                    $scope.checkNewPassword1($scope.user.newPassword1);
-                }
-
-                $scope.closeOtherKeyboard = function (type) {
-                    if (type == 'showPassword') {
-                        if ($scope.showNewPassword) {
-                            resetNewPassword();
-                        } else if ($scope.showPassword1) {
-                            resetPassword1();
-                        }
-                    } else if (type == 'showNewPassword') {
-                        if ($scope.showPassword) {
-                            resetPassword();
-                        } else if ($scope.showPassword1) {
-                            resetPassword1();
-                        }
-                    } else if (type == 'showPassword1') {
-                        if ($scope.showPassword) {
-                            resetPassword();
-                        } else if ($scope.showNewPassword) {
-                            resetNewPassword();
-                        }
-                    }
-                }
-                $scope.closeKeyboard = function () {
-                    if ($scope.showPassword) {
-                        $scope.showPassword = false;
-                        $scope.checkPassword($scope.user.password);
-                    } else if ($scope.showNewPassword) {
-                        $scope.showNewPassword = false;
-                        $scope.checkNewPassword($scope.user.newPassword);
-                    } else if ($scope.showPassword1) {
-                        $scope.showPassword1 = false;
-                        $scope.checkNewPassword1($scope.user.newPassword1);
-                    }
-                }
-                //输入原密码后验证原密码是否正确
-                $scope.checkSuccess = false;
-                $scope.checkFailed = false;
-                $scope.checkPassword = function (password) {
-                    $scope.checkSuccess = false;
-                    $scope.checkFailed = false;
-                    if(!password){
-                        $scope.checkFailed = true;
-                        $scope.checkSuccess = false;
-                    }
-                    User.checkPassword({password: password}, function () {
-                        $scope.checkSuccess = true;
-                        $scope.checkFailed = false;
-                    }, function () {
-                        $scope.checkFailed = true;
-                        $scope.checkSuccess = false;
-                    });
-                };
-
-                // 对新密码进行校验
-                $scope.checkSuccess1 = false;
-                $scope.checkFailed1 = false;
-                $scope.checkNewPassword = function (newPassword) {
-                    var middlLevelReg = /^(?=.{8,20})(((?=.*[0-9])(?=.*[a-z]))|((?=.*[0-9])(?=.*[A-Z]))).*$/;
-                    if (newPassword == null || !middlLevelReg.test(newPassword)) {
-                        //toaster.pop('error', '错误', '密码为8-20字符的英文、数字混合');
-                        $scope.checkSuccess1 = false;
-                        $scope.checkFailed1 = true;
-                        return false;
-                    } else {
-                        $scope.checkSuccess1 = true;
-                        $scope.checkFailed1 = false;
-                    }
-                }
-
-                $scope.$watch('user.newPassword', function (newValue, oldValue) {
-                    $scope.checkPasswordLevel(newValue);
-                });
-
-                // 密码强度校验
-                $scope.secLevel = 0;
-                $scope.checkPasswordLevel = function (newPassword) {
-                    $scope.checkFailed1 = false;
-                    if (newPassword == null) {
-                        $scope.secLevel = 0;
-                        return false;
-                    }
-                    // 密码强度中的正则
-                    var middlLevelReg = /^(?=.{8,20})(((?=.*[0-9])(?=.*[a-z]))|((?=.*[0-9])(?=.*[A-Z]))).*$/;
-                    // 密码强度高的正则
-                    var heightLevelReg = /^(?=.{8,20})(((?=.*[0-9])(?=.*[a-z])(?=.*[A-Z]))|((?=.*[0-9])((?=.*[a-zA-Z]))(?=.*[^a-zA-Z0-9]))).*$/;
-                    if(heightLevelReg.test(newPassword)){
-                        $scope.secLevel = 3;
-                        return true;
-                    }else if(middlLevelReg.test(newPassword)){
-                        $scope.secLevel = 2;
-                        return true;
-                    }else{
-                        $scope.secLevel = 1;
-                        return false;
-                    }
-                }
-
-                //校验确认密码是否与新密码相同
-                $scope.checkSuccess2 = false;
-                $scope.checkFailed2 = false;
-                $scope.checkNewPassword1 = function () {
-                    if ($scope.checkSuccess1 == true && ($scope.user.newPassword
-                        == $scope.user.newPassword1)) {
-                        $scope.checkSuccess2 = true;
-                        $scope.checkFailed2 = false;
-                        return false;
-                    }
-                    $scope.checkSuccess2 = false;
-                    $scope.checkFailed2 = true;
-                }
-
-                // 修改密码
-                $scope.ok = function () {
-                    // 原密码校验
-                    if(!$scope.checkSuccess){
-                        $scope.checkPassword($scope.user.password);
-                    }
-                    // 新密码校验
-                    $scope.checkNewPassword($scope.user.newPassword);
-                    // 再次输入密码校验
-                    $scope.checkNewPassword1();
-                    if(!$scope.checkSuccess || !$scope.checkSuccess1 || !$scope.checkSuccess2){
-                        return;
-                    }
-                    // 密码强度校验
-                    if(!$scope.checkPasswordLevel($scope.user.newPassword)){
-                        toaster.pop('error', '错误', '密码强度不够,请重新输入');
-                        return;
-                    }
-                    if ($scope.user.newPassword == $scope.user.password) {
-                        toaster.pop('error', '错误', '新密码与原密码相同');
-                        return;
-                    }
-                    if ($scope.user.newPassword == $scope.user.newPassword1) {//验证重复密码相等
-                        User.updatePassword({
-                            password: $scope.user.password,
-                            newPassword: $scope.user.newPassword,
-                            secLevel: $scope.secLevel
-                        }, {}, function () {
-                            toaster.pop('success', '成功', '修改密码成功,请牢记您的新密码。');
-                            $scope.user.password = null;
-                            $scope.user.newPassword = null;
-                            $scope.user.newPassword1 = null;
-                            $scope.checking = false;
-                            $scope.checkSuccess = false;
-                            $scope.checkFailed = false;
-                            $scope.checkSuccess1 = false;
-                            $scope.checkFailed1 = false;
-                            $scope.checkSuccess2 = false;
-                            $scope.checkFailed2 = false;
-                            window.location.href = "vendor#/account/management/sec";
-                            window.location.reload();
-                            $modalInstance.close();
-                        }, function (response) {
-                            toaster.pop('error', '错误', response.data);
-                            $modalInstance.close();
-                        });
-                    } else {
-                        toaster.pop('error', '错误', '重复密码不一致');
-                    }
-                };
-
-                $scope.cancel = function () {
-                    $modalInstance.close();
-                };
-                $scope.hideKeyboard = function () {
-                    $scope.closeKeyboard();
-                    console.log(1);
-                }
-            }]);
-
-    // 修改邮箱Controller
-    app.register.controller('UserEmailCtrl',
-        ['$rootScope', '$scope', '$modalInstance', 'user', 'User', 'toaster', '$interval',
-            function ($rootScope, $scope, $modalInstance, user, User, toaster, $interval) {
-                $rootScope.$on('$stateChangeStart',
-                    function(event, toState, toParams, fromState, fromParams){
-                        $modalInstance.dismiss();
-                    })
-                User.getPageToken();
-                $scope.user = user;
-                $scope.user.userEmail = null;
-                $scope.user.newUserEmail = null;
-                //验证用户输入的旧邮箱地址是否正确
-                $scope.checkUserEmail = function (userEmail) {
-                    if (userEmail == null) {
-                        $scope.checkFailed = true;
-                        $scope.checkSuccess = false;
-                        return false;
-                    }
-                    $scope.checkSuccess = false;
-                    $scope.checkFailed = false;
-                    User.checkUserEmail({userEmail: userEmail}, function () {
-                        $scope.checkSuccess = true;
-                        $scope.checkFailed = false;
-                    }, function () {
-                        $scope.checkFailed = true;
-                        $scope.checkSuccess = false;
-                    });
-                };
-                //如果之前未绑定
-                if($scope.userInfo.userEmail==null?true:false){
-                    $scope.checkSuccess = true;
-                }
-
-                //验证用户新输入的邮箱是否可用
-                $scope.checkSuccess1 = false;
-                $scope.checkFailed1 = false;
-                $scope.checkFailed1_1 = false;
-                $scope.emailEnable = function (newUserEmail) {
-                    //邮箱不可用
-                    if ((newUserEmail == null || newUserEmail.length > 30)
-                        || newUserEmail.indexOf("@") == -1 || newUserEmail.indexOf(".") == -1) {
-                        $scope.checkSuccess1 = false;
-                        $scope.checkFailed1 = true;
-                        $scope.checkFailed1_1 = false;
-                        return false;
-                    }
-                    User.emailEnable({email: newUserEmail}, function (data) {
-                        if (data.data == "true") {//邮箱可用
-                            $scope.checkSuccess1 = true;
-                            $scope.checkFailed1 = false;
-                            $scope.checkFailed1_1 = false;
-                        } else {//邮箱不可用
-                            $scope.checkSuccess1 = false;
-                            $scope.checkFailed1 = false;
-                            $scope.checkFailed1_1 = true;
-                        }
-                    }, function () {
-                        $scope.checkSuccess1 = false;
-                        $scope.checkFailed1 = true;
-                        $scope.checkFailed1_1 = false;
-                    });
-                };
-
-                $scope.codeSuccess = false;
-                $scope.sendSuccess = true;
-                //发送验证码
-                $scope.sendCheckCode = function (newUserEmail) {
-                    if (!$scope.checkSuccess1 || ($scope.userInfo.userEmail!=null && !$scope.checkSuccess)) {
-                        if ($scope.userInfo.userEmail!=null && !$scope.checkSuccess) {
-                            $scope.checkFailed = true;
-                        }
-                        return;
-                    }
-                    $scope.sendSuccess = false;
-                    User.sendCheckCode({newUserEmail: newUserEmail}, function () {
-                        $scope.codeSuccess = true;
-                        $interval.cancel(timePromise);
-                        var second = 60,
-                            timePromise = $interval(function () {
-                                if (second <= 0) {
-                                    $interval.cancel(timePromise);
-                                    second = 60;
-                                } else {
-                                    second--;
-                                    $scope.paracont = second + "秒后可重发";
-                                    if (second == 0) {
-                                        $scope.paracont = "重发验证码";
-                                        $scope.sendSuccess = true;
-                                    }
-                                }
-                            }, 1000, 60);
-                    }, function (response) {
-                        toaster.pop('error', '错误', response.data);
-                        $scope.sendSuccess = true;
-                    });
-                };
-
-                $scope.checkSuccess2 = false;
-                $scope.checkFailed2 = false;
-                //校验验证码
-                $scope.validCheckCode = function (checkCode) {
-                    if(!checkCode){
-                        $scope.checkSuccess2 = false;
-                        $scope.checkFailed2 = true;
-                        return false;
-                    }
-                    User.validCheckCode({checkCode: checkCode,newUserEmail:$scope.user.newUserEmail}, function (data) {
-                        var status = data.status;
-                        var message = data.message;
-                        if (status == 1) {
-                            $scope.checkSuccess2 = true;
-                            $scope.checkFailed2 = false;
-                        } else {
-                            $scope.checkSuccess2 = false;
-                            $scope.checkFailed2 = true;
-                        }
-                    });
-                };
-
-                //修改邮箱地址
-                $scope.ok = function () {
-                    //原邮箱校验
-                    if($scope.userInfo.userEmail && !$scope.checkSuccess ){
-                        $scope.checkUserEmail($scope.user.userEmail);
-                    }
-                    //新邮箱校验
-                    if(!$scope.checkSuccess1){
-                        $scope.emailEnable($scope.user.newUserEmail);
-                    }
-                    //验证码
-                    $scope.validCheckCode($scope.checkCode);
-                    if((!$scope.checkSuccess && $scope.userInfo.userEmail)|| !$scope.checkSuccess1 || !$scope.checkSuccess2){
-                        return;
-                    }
-                    var param = {
-                        newUserEmail: $scope.user.newUserEmail,
-                        checkCode:$scope.checkCode
-                    };
-                    if ($scope.user.userEmail!=null && $scope.user.newUserEmail == $scope.user.userEmail) {
-                        toaster.pop('error', '错误', '新邮箱地址与旧邮箱地址相同');
-                        return;
-                    }else{
-                        param["userEmail"]=$scope.user.userEmail;
-                    }
-
-                    User.updateUserEmail(param, {}, function () {
-                        toaster.pop('success', '成功', '修改邮箱成功。');
-                        //修改userInfo里面的userEmail
-                        $scope.userInfo.userEmail =$scope.user.newUserEmail.substr(
-                            0,1) + "***"
-                            + $scope.user.newUserEmail.substr($scope.user.newUserEmail.indexOf("@"));
-                        $scope.user.userEmail = null;
-                        $scope.user.newUserEmail = null;
-                        $scope.checking = false;
-                        $scope.checkSuccess = false;
-                        $scope.checkFailed = false;
-                        $scope.codeSuccess = false;
-                        $scope.validSuccess = false;
-                        $scope.checkSuccess1 = false;
-                        $scope.checkFailed1 = false;
-                        window.location.href = "vendor#/account/management/sec";
-                        window.location.reload();
-                        $modalInstance.close();
-                    }, function (response) {
-                        toaster.pop('error', '错误', response.data);
-                        $modalInstance.close();
-                    });
-                };
-
-                $scope.cancel = function () {
-                    $modalInstance.close();
-                };
-            }]);
-
-    //手机验证Controller
-    app.register.controller('UserTelCtrl',
-        ['$rootScope', '$scope', '$modalInstance', 'user', 'User', 'toaster', '$interval',
-            function ($rootScope, $scope, $modalInstance, user, User, toaster, $interval) {
-                $rootScope.$on('$stateChangeStart',
-                    function(event, toState, toParams, fromState, fromParams){
-                        $modalInstance.dismiss();
-                    })
-                User.getPageToken();
-                $scope.user = user;
-                $scope.user.userTel = null;
-                //原手机号校验
-                $scope.checking = false;
-                //验证用户输入的旧邮箱地址是否正确
-                $scope.checkUserTel = function (userTel) {
-                    $scope.checking = true;
-                    $scope.checkSuccess = false;
-                    $scope.checkFailed = false;
-                    User.checkUserTel({userTel: userTel}, function () {
-                        $scope.checkSuccess = true;
-                        $scope.checking = false;
-                        $scope.checkFailed = false;
-                    }, function () {
-                        $scope.checkFailed = true;
-                        $scope.checking = false;
-                        $scope.checkSuccess = false;
-                    });
-                };
-
-                //新手机号是否可用
-                $scope.checkFailed1 = false;
-                $scope.checkFailed1_1 = false;
-                $scope.checkSuccess1 = false;
-                $scope.telEnable = function (newUserTel) {
-                    if (newUserTel == null || !/^[0-9]{8,11}$/.test(newUserTel)) {
-                        $scope.checkFailed1 = true;
-                        $scope.checkSuccess1 = false;
-                        $scope.checkFailed1_1 = false;
-                        return false;
-                    }
-                    $scope.checking1 = true;
-                    $scope.checkSuccess1 = false;
-                    $scope.checkFailed1 = false;
-                    User.telEnable({tel: newUserTel}, function (data) {
-                        if (data.data == "true") {//手机可用
-                            $scope.checkSuccess1 = true;
-                            $scope.checkFailed1 = false;
-                            $scope.checkFailed1_1 = false;
-                        } else {//手机不可用
-                            $scope.checkFailed1_1 = true;
-                            $scope.checking1 = false;
-                            $scope.checkSuccess1 = false;
-                        }
-                    }, function () {
-                        $scope.checkFailed1 = true;
-                        $scope.checking1 = false;
-                        $scope.checkSuccess1 = false;
-                        $scope.checkFailed1_1 = false;
-                    });
-                };
-
-                //发送验证码
-                $scope.codeSuccess = false;
-                $scope.sendSuccess = true;
-                //发送验证码
-                $scope.sendTelCheckCode = function (newUserTel) {
-                    if (!$scope.checkSuccess1 || ($scope.userInfo.userTel!=null && !$scope.checkSuccess)) {
-                        if ($scope.userInfo.userTel!=null && !$scope.checkSuccess) {
-                            $scope.checkFailed = true;
-                        }
-                        return;
-                    }
-                    $scope.sendSuccess = false;
-                    User.sendTelCheckCode({newUserTel: newUserTel}, function () {
-                        $scope.codeSuccess = true;
-                        $interval.cancel(timePromise);
-                        var second = 60,
-                            timePromise = $interval(function () {
-                                if (second <= 0) {
-                                    $interval.cancel(timePromise);
-                                    second = 60;
-                                } else {
-                                    second--;
-                                    $scope.paracont = second + "秒后可重发";
-                                    if (second == 0) {
-                                        $scope.paracont = "重发验证码";
-                                        $scope.sendSuccess = true;
-                                    }
-                                }
-                            }, 1000, 60);
-                    }, function (response) {
-                        toaster.pop('error', '错误', response.data);
-                        $scope.sendSuccess = true;
-                    });
-                };
-
-                $scope.checkSuccess2 = false;
-                $scope.checkFailed2 = false;
-                //校验验证码
-                $scope.validTelCheckCode = function (telCheckCode) {
-                    if(!telCheckCode){
-                        $scope.checkSuccess2 = false;
-                        $scope.checkFailed2 = true;
-                        return false;
-                    }
-                    User.validTelCheckCode({telCheckCode: telCheckCode,newUserTel:$scope.user.newUserTel},
-                        function (data) {
-                            var status = data.status;
-                            var message = data.message;
-                            if (status == 1) {
-                                $scope.checkSuccess2 = true;
-                                $scope.checkFailed2 = false;
-                            } else {
-                                $scope.checkSuccess2 = false;
-                                $scope.checkFailed2 = true;
-                            }
-                        });
-                };
-
-                //修改手机
-                $scope.ok = function () {
-                    //原手机校验
-                    if(!$scope.checkSuccess){
-                        $scope.checkUserTel($scope.user.userTel);
-                    }
-                    //新手机校验
-                    if(!$scope.checkSuccess1){
-                        $scope.telEnable($scope.user.newUserTel);
-                    }
-                    //验证码校验
-                    $scope.validTelCheckCode($scope.telCheckCode);
-                    if(!$scope.checkSuccess || !$scope.checkSuccess1 || !$scope.checkSuccess2){
-                        return;
-                    }
-                    if ($scope.user.newUserTel == $scope.user.userTel) {
-                        toaster.pop('error', '错误', '新手机号与旧手机号相同');
-                        return;
-                    }
-                    User.updateUserTel({
-                        newUserTel: $scope.user.newUserTel,
-                        userTel: $scope.user.userTel,
-                        telCheckCode:$scope.telCheckCode
-                    }, {}, function () {
-                        toaster.pop('success', '成功', '手机修改成功。');
-                        $scope.userInfo.userTel = $scope.user.newUserTel.substr(0, 3)
-                            + '****' + $scope.user.newUserTel.substr(7);
-                        $scope.user.userTel = null;
-                        $scope.user.newUserTel = null;
-                        $scope.checking = false;
-                        $scope.checkSuccess = false;
-                        $scope.checkFailed = false;
-                        $scope.checking1 = false;
-                        $scope.checkSuccess1 = false;
-                        $scope.checkFailed1 = false;
-                        $scope.emailSuccess = false;
-                        $scope.codeSuccess = false;
-                        $scope.validSuccess = false;
-                        window.location.href = "vendor#/account/management/sec";
-                        window.location.reload();
-                        $modalInstance.close();
-                    }, function (response) {
-                        toaster.pop('error', '错误', response.data);
-                        //$modalInstance.close();
-                    });
-                };
-
-                $scope.cancel = function () {
-                    $modalInstance.close();
-                };
-            }]);
-
-    // 设置支付密码Controller
-    app.register.controller('UserPayCtrl',
-        ['$rootScope', '$scope', '$modalInstance', 'user', 'User', 'toaster',
-            function ($rootScope, $scope, $modalInstance, user, User, toaster) {
-                $rootScope.$on('$stateChangeStart',
-                    function(event, toState, toParams, fromState, fromParams){
-                        $modalInstance.dismiss();
-                    })
-                //原密码框是否显示
-                $scope.user = angular.copy(user);
-                $scope.checking = true;
-                $scope.showNewUserPay = false;
-                $scope.showUserPay = false;
-                $scope.showNewUserPay1 = false;
-                $scope.reloadKeyboard = function (type, $event) {
-                    $event.stopPropagation();
-                    if (type === 'showNewUserPay') {
-                        $scope.showNewUserPay = !$scope.showNewUserPay;
-                        if (!$scope.showNewUserPay) {
-                            $scope.checkNewUserPay($scope.user.newUserPay);
-                        } else {
-                            $scope.closeOtherKeyboard('showNewUserPay');
-                        }
-                    } else if (type === 'showUserPay') {
-                        $scope.showUserPay = !$scope.showUserPay;
-                        if (!$scope.showUserPay) {
-                            $scope.checkUserPay($scope.user.userPay);
-                        } else {
-                            $scope.closeOtherKeyboard('showUserPay');
-                        }
-                    } else if (type === 'showNewUserPay1') {
-                        $scope.showNewUserPay1 = !$scope.showNewUserPay1;
-                        if (!$scope.showNewUserPay1) {
-                            $scope.checkNewUserPay1($scope.user.newUserPay1);
-                        } else {
-                            $scope.closeOtherKeyboard('showNewUserPay1');
-                        }
-                    }
-                }
-
-                function resetNewUserPay() {
-                    $scope.showNewUserPay = false;
-                    $scope.checkNewUserPay($scope.user.newUserPay);
-                }
-
-                function resetUserPay() {
-                    $scope.showUserPay = false;
-                    $scope.checkUserPay($scope.user.userPay);
-                }
-
-                function resetNewUserPay1() {
-                    $scope.showNewUserPay1 = false;
-                    $scope.checkNewUserPay1($scope.user.newUserPay1);
-                }
-
-                $scope.closeOtherKeyboard = function (type) {
-                    if (type == 'showNewUserPay') {
-                        if ($scope.showUserPay) {
-                            resetUserPay();
-                        } else if ($scope.showNewUserPay1) {
-                            resetNewUserPay1();
-                        }
-                    } else if (type == 'showUserPay') {
-                        if ($scope.showNewUserPay) {
-                            resetNewUserPay();
-                        } else if ($scope.showNewUserPay1) {
-                            resetNewUserPay1();
-                        }
-                    } else if (type == 'showNewUserPay1') {
-                        if ($scope.showNewUserPay) {
-                            resetNewUserPay();
-                        } else if ($scope.showUserPay) {
-                            resetUserPay();
-                        }
-                    }
-                }
-                $scope.closeKeyboard = function () {
-                    if ($scope.showNewUserPay) {
-                        $scope.showNewUserPay = false;
-                        $scope.checkNewUserPay($scope.user.newUserPay);
-                    } else if ($scope.showUserPay) {
-                        $scope.showUserPay = false;
-                        $scope.checkUserPay($scope.user.userPay);
-                    } else if ($scope.showNewUserPay1) {
-                        $scope.showNewUserPay1 = false;
-                        $scope.checkNewUserPay1($scope.user.newUserPay1);
-                    }
-                }
-                //验证是否设置密码
-                $scope.isNewSuccess = false;
-                $scope.isNewFailed = false;
-                $scope.checkHaveUserPay = function () {
-                    $scope.isNewSuccess = false;
-                    $scope.isNewFailed = true;
-                    User.checkHaveUserPay(function (data) {
-                        var flag = data.data;
-                        if (flag == "false") {
-                            //隐藏原密码输入框
-                            angular.element(".oldUserPay").remove();
-                            //修改新密码框内容
-                            $scope.newUserPayLabel = "密码";
-                            $scope.isNewSuccess = true;
-                            $scope.isNewFailed = false;
-                        }
-                    });
-                }
-
-                //校验原密码是否正确
-                $scope.checkFailed = false;
-                $scope.checkSuccess = false;
-                $scope.checkUserPay = function (userPay) {
-                    if (userPay == null) {
-                        $scope.checkFailed = true;
-                        $scope.checkSuccess = false;
-                        return false;
-                    }
-                    $scope.checkSuccess = false;
-                    $scope.checkFailed = false;
-                    User.checkUserPay({userPay: userPay}, function () {
-                        $scope.checkFailed = false;
-                        $scope.checkSuccess = true;
-                    }, function () {
-                        $scope.checkFailed = true;
-                        $scope.checkSuccess = false;
-                    });
-                }
-
-                //输入新密码,进行校验
-                $scope.checkSuccess1 = false;
-                $scope.checkFailed1 = false;
-                $scope.checkNewUserPay = function (newUserPay) {
-                    if (newUserPay == null) {
-                        $scope.checkFailed1 = true;
-                        $scope.checkSuccess1 = false;
-                        return false;
-                    }
-                    //如果两者相同 则返回
-                    if ($scope.checking && ($scope.user.userPay
-                        == $scope.user.newUserPay)) {
-                        toaster.pop('error', '错误', '新密码与原密码相同');
-                        $scope.checkFailed1 = true;
-                        $scope.checkSuccess1 = false;
-                        return false;
-                    }
-                    //正则校验
-                    var reg = /^\d{6}$/;
-                    if (!reg.test(newUserPay)) {
-                        $scope.checkFailed1 = true;
-                        $scope.checkSuccess1 = false;
-                        return false;
-                    }
-                    $scope.checkFailed1 = false;
-                    $scope.checkSuccess1 = true;
-                }
-
-
-                //校验确认密码是否与新密码相同
-                $scope.checkSuccess2 = false;
-                $scope.checkFailed2 = false;
-                $scope.checkNewUserPay1 = function () {
-                    if($scope.user.newUserPay1 == null){
-                        $scope.checkSuccess2 = false;
-                        $scope.checkFailed2 = true;
-                    }
-                    if ($scope.user.newUserPay1 != null) {
-                        //如果输入密码正确,并且输入密码=重新输入密码
-                        if ($scope.checkSuccess1 && ($scope.user.newUserPay
-                            == $scope.user.newUserPay1)) {
-                            $scope.checkSuccess2 = true;
-                            $scope.checkFailed2 = false;
-                            return false;
-                        }
-                        $scope.checkSuccess2 = false;
-                        $scope.checkFailed2 = true;
-                    }
-                }
-
-                //支付密码
-                $scope.ok = function () {
-                    //原密码校验
-                    if(!$scope.checkSuccess && $scope.userInfo.havePayPwd){
-                        $scope.checkUserPay($scope.user.userPay);
-                    }
-                    //新密码校验
-                    $scope.checkNewUserPay($scope.user.newUserPay);
-                    //密码确认
-                    $scope.checkNewUserPay1();
-                    if((!$scope.checkSuccess && $scope.userInfo.havePayPwd) || !$scope.checkSuccess1 || !$scope.checkSuccess2){
-                        return;
-                    }
-                    if ($scope.checking && ($scope.user.newUserPay
-                        == $scope.user.userPay)) {
-                        toaster.pop('error', '错误', '新密码与旧密码相同');
-                        return;
-                    }
-                    User.updateUserPay({
-                        newUserPay: $scope.user.newUserPay,
-                        userPay: $scope.user.userPay
-                    }, {}, function () {
-                        toaster.pop('success', '成功', '支付密码设置成功。');
-                        $scope.user.userPay = null;
-                        $scope.user.newUserPay = null;
-                        $scope.checkSuccess = false;
-                        $scope.checkFailed = false;
-                        $scope.checkSuccess1 = false;
-                        $scope.checkFailed1 = false;
-                        $scope.checkSuccess2 = false;
-                        $scope.checkFailed2 = false;
-                        $scope.checking = true;
-                        window.location.href = "vendor#/account/management/sec";
-                        window.location.reload();
-                        $modalInstance.close();
-                    }, function (response) {
-                        toaster.pop('error', '错误', response.data);
-                        $modalInstance.close();
-                    });
-                };
-
-                $scope.cancel = function () {
-                    $modalInstance.close();
-                };
-            }]);
-
-    // 设置密保问题Controller
-    app.register.controller('UserQuestionCtrl',
-        ['$rootScope', '$scope', '$modalInstance', 'user', 'User', 'toaster','$timeout',
-            function ($rootScope, $scope, $modalInstance, user, User, toaster,$timeout) {
-                $rootScope.$on('$stateChangeStart',
-                    function(event, toState, toParams, fromState, fromParams){
-                        $modalInstance.dismiss();
-                    })
-                //查询所有的密保问题
-                $scope.pageInfo = {page: 1, count: 20};
-                User.getAllSecQuestion($scope.pageInfo, function (data) {
-                    $scope.secQuestions = data.content;
-                    //查询当前用户密保问题
-                    User.getUserQuestion({userUU: $scope.userInfo.userUU},function (data) {
-                        $scope.uq[0] = data[0];
-                        $scope.uq[1] = data[1];
-                    });
-                });
-                //选择问题 校验
-                $scope.checkSuccess = false;
-                $scope.checkFailed = false;
-                $scope.checkSuccess2 = false;
-                $scope.checkFailed2 = false;
-                $scope.choose = function () {
-                    if ($scope.uq[0]!=undefined && $scope.uq[0].question != undefined && $scope.uq[0].question!="") {
-                        $scope.checkSuccess = true;
-                        $scope.checkFailed = false;
-                    } else {
-                        $scope.checkSuccess = false;
-                        $scope.checkFailed = true;
-                    }
-                }
-
-                $scope.choose1 = function () {
-                    if ($scope.uq[1]!=undefined && $scope.uq[1].question != undefined && $scope.uq[1].question!="") {
-                        $scope.checkSuccess2 = true;
-                        $scope.checkFailed2 = false;
-                    } else {
-                        $scope.checkSuccess2 = false;
-                        $scope.checkFailed2 = true;
-                    }
-                }
-
-                //答案校验 不超过30个字符
-                $scope.checkSuccess1 = false;
-                $scope.checkFailed1 = false;
-                $scope.checkFailed1_1 = false;
-                $scope.checkSuccess3 = false;
-                $scope.checkFailed3 = false;
-                $scope.checkFailed3_1 = false;
-                $scope.inputAnswer = function () {
-                    if ($scope.uq[0]==undefined || $scope.uq[0].answer == undefined || $scope.uq[0].answer=="") {
-                        $scope.checkSuccess1 = false;
-                        $scope.checkFailed1 = true;
-                        $scope.checkFailed1_1 = false;
-                        return false;
-                    }
-                    if ($scope.uq[0].answer.length > 30) {
-                        $scope.checkSuccess1 = false;
-                        $scope.checkFailed1 = false;
-                        $scope.checkFailed1_1 = true;
-                        return false;
-                    }
-                    $scope.checkSuccess1 = true;
-                    $scope.checkFailed1 = false;
-                    $scope.checkFailed1_1 = false;
-                }
-
-                $scope.inputAnswer1 = function () {
-                    if ($scope.uq[1]==undefined || $scope.uq[1].answer == undefined || $scope.uq[1].answer=="") {
-                        $scope.checkSuccess3 = false;
-                        $scope.checkFailed3 = true;
-                        $scope.checkFailed3_1 = false;
-                        return false;
-                    }
-                    if ($scope.uq[1].answer.length > 30) {
-                        $scope.checkSuccess3 = false;
-                        $scope.checkFailed3 = false;
-                        $scope.checkFailed3_1 = true;
-                        return false;
-                    }
-                    $scope.checkSuccess3 = true;
-                    $scope.checkFailed3 = false;
-                    $scope.checkFailed3_1 = false;
-                }
-
-                //保存密保
-                $scope.ok = function () {
-                    //问题1校验
-                    $scope.choose();
-                    $scope.inputAnswer();
-                    $scope.choose1();
-                    $scope.inputAnswer1();
-                    if(!$scope.checkSuccess || !$scope.checkSuccess1 || !$scope.checkSuccess2 || !$scope.checkSuccess3){
-                        return;
-                    }
-                    var arr = [];
-                    for (var key in $scope.uq) {
-                        $scope.uq[key].sort = Number(key) + 1;
-                        arr[key] = $scope.uq[key];
-                    }
-                    User.updateUserQuestion({}, arr, function () {
-                        toaster.pop('success', '成功', '密保问题设置成功。');
-                        $modalInstance.close();
-                        $scope.uq = null;
-                        $scope.checkSuccess = false;
-                        $scope.checkFailed = false;
-                        $scope.checkSuccess1 = false;
-                        $scope.checkFailed1 = false;
-                        $scope.checkSuccess2 = false;
-                        $scope.checkFailed2 = false;
-                        $scope.checkSuccess3 = false;
-                        $scope.checkFailed3 = false;
-                        $scope.checkFailed3_1 = false;
-                        $scope.checkFailed1_1 = false;
-                        window.location.href = "vendor#/account/management/sec";
-                        window.location.reload();
-                        $modalInstance.close();
-                    }, function (response) {
-                        toaster.pop('error', '错误', response.data);
-                        $modalInstance.close();
-                    });
-                };
-                $scope.cancel = function () {
-                    $modalInstance.close();
-                };
-            }]);
-
-    // 实名认证Controller
-    app.register.controller('UserRealAuthCtrl',
-        ['$rootScope', '$scope', '$modalInstance', 'user', 'User', 'toaster',
-            function ($rootScope, $scope, $modalInstance, user, User, toaster) {
-                $rootScope.$on('$stateChangeStart',
-                    function(event, toState, toParams, fromState, fromParams){
-                        $modalInstance.dismiss();
-                    })
-                $scope.user = user;
-                //姓名验证  不超过20个字符
-                $scope.checkSuccess = false;
-                $scope.checkFailed = false;
-                $scope.checkUserName = function (userName) {
-                    if (!userName) {
-                        //toaster.pop('error', '请输入您的真实姓名');
-                        $scope.checkSuccess = false;
-                        $scope.checkFailed = true;
-                        return false;
-                    } else if (userName.length > 20) {
-                        //toaster.pop('error', '请勿超过20个字符');
-                        $scope.checkSuccess = false;
-                        $scope.checkFailed_1 = true;
-                        return false;
-                    } else {
-                        $scope.checkSuccess = true;
-                        $scope.checkFailed = false;
-                        $scope.checkFailed_1 = false;
-                    }
-                }
-
-                //检查身份证
-                $scope.checkSuccess1 = false;
-                $scope.checkFailed1 = false;
-                $scope.checkFailed1_1 = false;
-                $scope.checkUserIdcode = function (userIdcode) {
-                    if (userIdcode == null) {
-                        //toaster.pop('error', '请输入您的身份证号');
-                        $scope.checkSuccess1 = false;
-                        $scope.checkFailed1 = true;
-                        $scope.checkFailed1_1 = false;
-                        return false;
-                    } else if (!(/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(userIdcode))) {
-                        //toaster.pop('error', '请输入18位的身份证号');
-                        $scope.checkSuccess1 = false;
-                        $scope.checkFailed1 = false;
-                        $scope.checkFailed1_1 = true;
-                        return false;
-                    } else {
-                        $scope.checkSuccess1 = true;
-                        $scope.checkFailed1 = false;
-                        $scope.checkFailed1_1 = false;
-                    }
-                }
-
-                //图片上传
-                $scope.checkSuccess2 = false;
-                $scope.onUploadID = function ($data) {
-                    if (!$data || !$data.path) {
-                        toaster.pop('error', '图片上传失败');
-                        return;
-                    }
-                    $scope.user.idImgUrl = $data.path;
-                    $scope.checkSuccess2 = true;
-                };
-
-                $scope.deleteImg =function () {
-                    $scope.user.idImgUrl = '';
-                    $scope.checkSuccess2=false;
-                };
-
-                // 查看范例
-                $scope.showImg = function(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();
-                    });
-                };
-                //保存
-                $scope.ok = function () {
-                    //姓名
-                    $scope.checkUserName($scope.user.userName);
-                    //身份证
-                    $scope.checkUserIdcode($scope.user.userIdcode);
-                    //身份证
-                    if(!$scope.checkSuccess2){
-                        toaster.pop('error', '错误', '请上传您的证件...');
-                        return;
-                    }
-                    if(!$scope.checkSuccess || !$scope.checkSuccess1 || !$scope.checkSuccess2){
-                        return;
-                    }
-                    User.updateRealAuth({userName:$scope.user.userName,userIdcode:$scope.user.userIdcode,idImgUrl:$scope.user.idImgUrl},{},function(){
-                        toaster.pop('success', '成功', '身份信息提交成功。');
-                        $modalInstance.close();
-                        $scope.checkSuccess2 = false;
-                        $scope.checkSuccess1 = false;
-                        $scope.checkFailed1 = false;
-                        $scope.checkSuccess = false;
-                        $scope.checkFailed = false;
-                        window.location.href = "vendor#/account/management/sec";
-
-                        window.location.reload();
-                        $modalInstance.close();
-                    }, function (response) {
-                        toaster.pop('error', '错误', response.data);
-                        $modalInstance.close();
-                    });
-                };
-
-                $scope.cancel = function () {
-                    $modalInstance.close();
-                };
-            }]);
-//角色管理-编辑角色controller
-    app.register.controller('RoleEditCtrl', ['$scope', '$modalInstance', '$timeout', 'AccountResource', 'AccountRole', 'toaster', 'role', 'BaseService', function ($scope, $modalInstance, $timeout, AccountResource, AccountRole, toaster, role, BaseService) {
-        BaseService.scrollBackToTop();
-        $scope.role = angular.copy(role || {});
-        $scope.master = angular.copy($scope.role);
-        var isNew = role == null;
-        $scope.cancel = function () {
-            $modalInstance.close(false);
-        };
-
-        var getCheckRoleResource = function (data, rs) {
-            if (data.items.length > 0) {
-                var c = 0;
-                angular.forEach(data.items, function (item) {
-                    if (rs.indexOf(item.id) > -1) {
-                        item.$checked = true;
-                        c += 1;
-                    }
-                });
-                data.$checked = c > 0 && c == data.items.length;
-                data.$halfChecked = c > 0 && c < data.items.length;
-            } else {
-                angular.forEach(data.children, function (item) {
-                    getCheckRoleResource(item, rs);
-                    var activeCount = 0;
-                    angular.forEach(data.children, function (item) {
-                        if (!item.$checked) {
-                            activeCount ++;
-                        }
-                    });
-                    data.$checked = activeCount > 0 && activeCount == data.children.length;
-
-                    data.$halfChecked = activeCount > 0 && activeCount < data.children.length;
-                });
-            }
-        }
-
-        AccountResource.query({}, function (data) {
-            if (data && data.length > 0) {
-                var rs = [];// 已分配的资源的id
-                if (role && role.resourceItems) {
-                    angular.forEach(role.resourceItems, function (item) {
-                        rs.push(item.id);
-                    });
-                }
-                angular.forEach(data, function (data2) {
-                    getCheckRoleResource(data2, rs);
-                })
-                $scope.resourceItems = data[0].items;
-                $scope.activeResource = data[0];
-                data[0].$active = true;
-            }
-            $scope.resources = data;
-            // if ($scope.role) {
-            // 	angular.forEach($scope.role.resourceItems,function (item) {
-            // 		angular.forEach($scope.resources, function (roleItem) {
-            // 			if (item.id == roleItem.id) {
-            // 				roleItem.$active = true;
-            // 			}
-            // 		})
-            // 	})
-            // }
-            $timeout(function () {
-                angular.forEach($scope.resources, function (resource) {
-                    var c = 0;
-                    angular.forEach(resource.items, function (item) {
-                        item.$checked && (c += 1);
-                    });
-                    angular.element(document.getElementById('check_' + resource.id)).prop('indeterminate', (c > 0 && !resource.$checked));
-                });
-            }, 100);
-            getChecked();
-        });
-
-        $scope.onItemClick = function (resource) {
-            if (resource.items.length > 0) {
-                $scope.resourceItems = resource.items;
-                $scope.activeResource = resource;
-            } else {
-                $scope.resourceItems = [];
-                if (!resource.activeLevel) {
-                    resource.activeLevel = true;
-                } else {
-                    resource.activeLevel = false;
-                }
-            }
-            setNoActive($scope.resources);
-            resource.$active = true;
-        };
-        var setNoActive = function (obj) {
-            angular.forEach(obj, function (r) {
-                r.$active = false;
-                if (r.children) {
-                    setNoActive(r.children);
-                }
-            });
-        }
-
-        var getChecked = function () {
-            var items = [];
-            angular.forEach($scope.resources, function (resource) {
-                pushCheckedResource(resource, items);
-            });
-            if ($scope.role) {
-                $scope.role.resourceItems = items;
-            }
-        };
-        var pushCheckedResource = function (resource, items) {
-            if (resource.items.length > 0) {
-                var activeCount = 0;
-                angular.forEach(resource.items, function (item) {
-                    // item.$checked && items.push(item);
-                    if (item.$checked) {
-                        items.push(item);
-                        activeCount ++;
-                    }
-                });
-                resource.$checked = activeCount > 0 && activeCount == resource.items.length;
-                resource.$halfChecked = activeCount > 0 && activeCount < resource.items.length;
-
-            } else {
-                var halfCount = 0;
-                var fullCount = 0;
-                angular.forEach(resource.children, function (item) {
-                    if (item.$checked) {
-                        fullCount ++;
-                    } else if (item.$halfChecked) {
-                        halfCount ++;
-                    }
-                    pushCheckedResource(item, items);
-                })
-                resource.$halfChecked = halfCount > 0 || (fullCount > 0 && fullCount < resource.children.length);
-                resource.$checked = fullCount > 0 && fullCount == resource.children.length;
-            }
-        }
-        $scope.onResourceChange = function (resource) {
-            levelResourceChecked(resource);
-            getChecked();
-        };
-        var levelResourceChecked = function (resource) {
-            if (resource.items.length > 0) {
-                angular.forEach(resource.items, function (item) {
-                    item.$checked = resource.$checked;
-                });
-            } else {
-                angular.forEach(resource.children, function (item) {
-                    item.$checked = resource.$checked;
-                    levelResourceChecked(item);
-                });
-            }
-
-        }
-
-        $scope.onItemChange = function () {
-            var activeCount = 0;
-            var resourceItems = $scope.resourceItems;
-            // debugger;
-            // console.log(resourceItems);
-            angular.forEach(resourceItems, function (item) {
-                if (item.$checked) {
-                    activeCount++;
-                }
-            })
-            // console.log(activeCount);
-            // console.log( $scope.activeResource)
-            $scope.activeResource.$checked = activeCount == resourceItems.length;
-
-            $scope.activeResource.$halfChecked = activeCount > 0 && activeCount < resourceItems.length;
-
-            angular.forEach($scope.resources, function (resource) {
-                if (resource.$active) {
-                    var c = 0;
-                    angular.forEach(resource.items, function (item) {
-                        item.$checked && (c += 1);
-                    });
-                    resource.$checked = (c == resource.items.length);
-                    resource.$halfChecked = c > 0 && c < resource.items.length;
-                    angular.element(document.getElementById('check_' + resource.id)).prop('indeterminate', (c > 0 && !resource.$checked));
-                }
-            });
-            getChecked();
-        };
-        $scope.isChanged = function (formData) {
-            if (!$scope.master)
-                return true;
-            return !angular.equals(formData, $scope.master);
-        };
-        $scope.save = function () {
-            $scope.master = angular.copy($scope.role);
-            if (!$scope.master.color || $scope.master.color == '') {
-                $scope.master.color = parseInt(Math.random() * 5) + 1 + '';
-            }
-            AccountRole.save($scope.master, function () {
-                toaster.pop('success', '提示', '角色:' + $scope.role.desc + ' 资料' + (isNew ? '添加' : '修改') + '成功');
-                $modalInstance.close(true);
-            }, function (response) {
-                toaster.pop('error', '错误', response.data);
-            });
-        };
-        $scope.del = function () {
-            if (confirm('确定删除角色(' + $scope.role.desc + ')吗?')) {
-                AccountRole.remove({id: role.id}, function () {
-                    toaster.pop('success', '提示', '角色:' + $scope.role.desc + ' 删除成功');
-                    $modalInstance.close(true);
-                }, function (response) {
-                    toaster.pop('error', '错误', response.data);
-                });
-            }
-        };
-    }]);
-
-    app.register.controller('UserRoleEditCtrl', ['$scope', '$modalInstance', '$timeout', 'AccountResource', 'toaster', 'user', 'BaseService', 'AccountRole', 'User', function ($scope, $modalInstance, $timeout, AccountResource, toaster, user, BaseService, AccountRole, User) {
-
-        $scope.pages = [];
-
-        $scope.params = {
-            page: 1,
-            count: 6,
-            totalPage: 1,
-            currentPage: 1
-        };
-
-        var loadCurrentRoles = function () {
-            var start = ($scope.params.page - 1) * $scope.params.count;
-            var end = $scope.params.page * $scope.params.count;
-            $scope.currentRoles = $scope.rolesData.slice(start, end);
-        };
-
-        var init = function () {
-            $scope.user = angular.copy(user);
-            AccountRole.query({}, function (data) {
-                $scope.rolesData = data;
-                loadCurrentRoles();
-                $scope.params.totalPage = Math.ceil($scope.rolesData.length / 6);
-                $scope.acculatePages(1, $scope.params.totalPage);
-                angular.forEach($scope.rolesData, function (item) {
-                    item.checked = false;
-                    angular.forEach($scope.user.roles, function (userItem) {
-                        if (item.id === userItem.id) {
-                            item.checked = true;
-                        }
-                    });
-                });
-            });
-        }
-        init();
-
-        $scope.checked = [];
-        //勾选角色
-        $scope.checkRole = function (role) {
-            role.checked = !role.checked;
-        }
-
-        //关闭模态框
-        $scope.cancelModal = function () {
-            $modalInstance.close();
-        }
-        $scope.close = function (save) {
-            if (save) {
-                if (user.userUU) {
-                    angular.forEach($scope.rolesData, function (item) {
-                        if (item.checked) {
-                            $scope.checked.push(item);
-                        }
-                    });
-                    $scope.user.roles = $scope.checked;
-                    User.update({}, $scope.user, function () {
-                        toaster.pop('success', '提示', '保存成功');
-                        user.roles = $scope.checked
-                        $modalInstance.close(true);
-                    }, function (response) {
-                        toaster.pop('error', '保存失败', response.data);
-                    });
-                } else {
-                    $modalInstance.close(true, $scope.checked);
-                }
-            } else {
-                $modalInstance.close(false);
-            }
-        };
-
-        // //初始化分页数据
-        // var initPages = function () {
-        // 	$scope.totalPages = Math.ceil = ($scope.rolesData.length/6);
-        // }
-        //初始化页数信息
-        $scope.initPages = function (totalElementPages) {
-            var pageNum = [];
-            if (totalElementPages == 1) {
-                return;
-            } else if (totalElementPages < 10) {
-                for (var i = 0; i < totalElementPages + 2; i++) {
-                    pageNum.push(i);
-                }
-            } else {
-                pageNum = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
-            }
-            angular.forEach(pageNum, function (number) {
-                var page = {active: true, type: 'page', number: number};
-                if (number == 0) {
-                    page.type = 'prev';
-                } else if (number == 1) {
-                    page.type = 'first';
-                } else if (number == pageNum.length - 2) {
-                    page.type = 'last';
-                    page.number = totalElementPages;
-                } else if (number == pageNum.length - 1) {
-                    page.type = 'next';
-                }
-                $scope.pages.push(page);
-            });
-        };
-
-        //当前页在后端计算方式
-        $scope.endSegment = function (currentPage, totalElementPages) {
-            if (totalElementPages > 8) {
-                angular.forEach($scope.pages, function (page) {
-                    switch (page.number) {
-                        case 2:
-                            page.active = false;
-                            page.type = 'more';
-                            break;
-                        case 10:
-                            if (currentPage == totalElementPages) {
-                                page.active = false;
-                            }
-                            break;
-                        case 0:
-                        case 1:
-                            break;
-                        default:
-                            if (page.number != totalElementPages) {
-                                page.number = totalElementPages - 9 + page.number;
-                            }
-                            page.current = (currentPage == page.number);
-                            break;
-                    }
-                });
-            }
-        };
-
-        //当前页在中间计算方式
-        $scope.middleSegment = function (currentPage) {
-            angular.forEach($scope.pages, function (page) {
-                switch (page.number) {
-                    case 2:
-                    case 8:
-                        page.type = 'more';
-                        page.active = false;
-                        break;
-                    case 3:
-                        page.number = currentPage - 2;
-                        break;
-                    case 4:
-                        page.number = currentPage - 1;
-                        break;
-                    case 5:
-                        page.number = currentPage;
-                        page.current = true;
-                        break;
-                    case 6:
-                        page.number = currentPage + 1;
-                        break;
-                    case 7:
-                        page.number = currentPage + 2;
-                        break;
-                }
-            });
-        };
-
-        //当前页在前段的计算方式
-        $scope.frontSegment = function (currentPage, totalElementPages) {
-            if (totalElementPages > 8) {
-                angular.forEach($scope.pages, function (page) {
-                    switch (page.number) {
-                        case 8:
-                            page.type = 'more';
-                            page.active = false;
-                            break;
-                        case 0:
-                            if (currentPage == 1) {
-                                page.active = false;
-                            }
-                        default : {
-                            page.current = (currentPage == page.number);
-                        }
-                    }
-                });
-            }
-        };
-
-        //输入框监听Enter事件
-        $scope.listenEnter = function () {
-            if (event.keyCode == 13) {
-                $scope.setPage("page", $scope.params.currentPage);
-            }
-        };
-        $scope.setPage = function (type, number) {
-            if (type != 'prev' && type != 'page' && type != 'next' && type != 'last' && type != 'first') {
-                return;
-            }
-            ;
-            var page = -1;
-            switch (type) {
-                case "page":
-                    if (number < 1) {
-                        page = 1;
-                    } else if (number > $scope.params.totalPage) {
-                        page = $scope.params.totalPage;
-                    } else {
-                        page = number;
-                    }
-                    ;
-                    break;
-                case "prev":
-                    if ($scope.params.page <= 1) {
-                        page = 1;
-                    } else {
-                        page = $scope.params.page - 1;
-                    }
-                    ;
-                    break;
-                case "next":
-                    if ($scope.params.page >= $scope.params.totalPage) {
-                        page = $scope.params.totalPage;
-                    } else {
-                        page = $scope.params.page + 1;
-                    }
-                    break;
-                case "first":
-                    page = 1;
-                    break;
-                case "last":
-                    page = $scope.params.totalPage;
-                    break;
-            }
-            if (page == $scope.params.page || page < 1 || page > $scope.params.totalPage) {
-                $scope.params.currentPage = $scope.params.page;
-                return;
-            }
-            $scope.params.page = page;
-            $scope.params.currentPage = page;
-            loadData();
-        };
-
-        //计算页数的方式。
-        $scope.acculatePages = function (currentPage, totalElementPages) {
-            $scope.pages = [];
-            if (totalElementPages < 1) {
-                return;
-            }
-            //初始化页面数据
-            $scope.initPages(totalElementPages);
-            if (currentPage < 6) {//当期页小于6
-                $scope.frontSegment(currentPage, totalElementPages);
-            } else if (currentPage > totalElementPages - 5) { //当期页在后面
-                $scope.endSegment(currentPage, totalElementPages);
-            } else { //当期页在中间
-                $scope.middleSegment(currentPage);
-            }
-        };
-
-        var loadData = function () {
-            loadCurrentRoles();
-            $scope.acculatePages($scope.params.page, $scope.params.totalPage);
-        };
-    }]);
-});

+ 3 - 109
src/main/webapp/resources/js/sso/controllers/forstore/ssoCenterCtrl.js

@@ -8,8 +8,6 @@ define(['app/app', 'calendar'], function(app) {
         $rootScope.active = 'index';
         $scope.count = 0;
         document.title='帐户中心-优软商城';
-        $scope.userInfo = $rootScope.userInfo;
-
         // 申请
         $scope.auditApply = function (status, id, UU) {
             var param = {
@@ -36,7 +34,7 @@ define(['app/app', 'calendar'], function(app) {
             var param = {};
             param.page = params.page;
             param.size = params.count;
-            param.speaceUU = $scope.userInfo.enterprise.uu;
+            param.speaceUU = $rootScope.userInfo.enterprise.uu;
             // 状态为申请中
             param.status = 311;
 
@@ -53,40 +51,7 @@ define(['app/app', 'calendar'], function(app) {
                 toaster.pop('error', '获取未处理审批数据失败');
             });
 
-
-            // Enterprise.findApplyToMall(param, {}, function (page) {
-            //     $scope.totalPages = page.totalPages;
-            //     $scope.content = page.content;
-            //     $scope.totalElements = page.totalElements;
-            // }, function (error) {
-            //     $scope.totalPages = 0;
-            //     toaster.pop('error', '数据获取失败,请重新刷新页面!');
-            // });
         }
-        // applyToEnterpriseTableParams();
-
-        $scope.toAccount = function(){
-            //urlPrex = 'http://192.168.253.118:3001';
-            var url = $scope.urlPrex + '/sso/login/change/userspace?spaceUU='+$scope.userInfo.enterprise.uu;
-            var newTab=window.open('about:blank');
-            $.ajax({
-                url:url,
-                dataType:'jsonp',
-                processData: false,
-                type:'get',
-                crossDomain: true,
-                jsonp:'callback',
-                jsonpCallback:"successCallback",
-                success:function(data){
-                    console.log(data);
-                    // window.open(urlPrex + '/cloudcenter/enterprise');
-                    newTab.location.href = $scope.urlPrex + '/cloudcenter/enterprise';
-                },
-                error:function(data) {
-                    console.log(data);
-                }
-            });
-        };
 
         $scope.updateUserEmail = function(){
             AuthenticationService.redirectEmail();
@@ -96,37 +61,14 @@ define(['app/app', 'calendar'], function(app) {
             AuthenticationService.redirectPhone();
         };
 
-        if ($rootScope.userInfo.enterprise){
-            $scope.isAdmin = $rootScope.userInfo.enterprise.enAdminuu === $rootScope.userInfo.userUU ? true : false;
-        }
-
-        //个人账户
-        // if (!$rootScope.userInfo.enterprise){
-        //     window.location.href = './personalMaterial';
-        // } else {
-        //
-        // }
-        VendorService.getVendorInfo(null, function(data){
-            $scope.vendor = data;
-        }, function(response) {
-            toaster.pop('error', '获取卖家的信息失败,请重新刷新界面获取' + response.data);
-        });
-
-        // VendorService.getTransactionInfo(null, function(data) {
-        //     $scope.transition = data;
-        // }, function (response) {
-        //     toaster.pop('error', '获取商家的交易信息失败');
-        // });
-
-        if ($scope.isAdmin) {
+        if ($rootScope.isAdmin) {
             User.isDevOrProd(null, function (data) {
-                // $scope.isProd = data.data;
                 $scope.urlPrex = data.data == 'success' ? 'https://sso.ubtob.com' : 'http://192.168.253.6:32323';
                 $http({
                     method: 'get',
                     dataType: 'json',
                     url: $scope.urlPrex + '/api/userspace/apply/count',
-                    params: {spaceUU: $scope.userInfo.enterprise.uu}
+                    params: {spaceUU: $rootScope.userInfo.enterprise.uu}
                 }).success(function (data) {
                     $scope.count = data.content[311] || 0;
                 }).error(function (response) {
@@ -135,17 +77,10 @@ define(['app/app', 'calendar'], function(app) {
 
                 // 查询企业绑定列表
                 applyToEnterpriseTableParams();
-                // VendorService.getNotDealApplyCount({spaceUU: $scope.userInfo.enterprise.uu}, function (data) {
-                //     console.log(data);
-                //     $scope.count = data.content[311];
-                // },function (err) {
-                //     toaster.pop('error', '获取未处理审批数据失败');
-                // })
             }, function (response) {
                 toaster.pop('error', '获取运行环境失败');
             });
         }
-        var num = $filter('number')(0.1, 6);
 
         /**
          *  日历组件
@@ -155,47 +90,6 @@ define(['app/app', 'calendar'], function(app) {
             width: 270,
             height: 220
         });
-
-        var initRuleCount = function () {
-            return DistributionRule.findCountOfActiveRule({},{},function (data) {
-                if (data.success){
-                    $scope.needShowTip = data.data;
-                }
-            }, function (error) {
-                toaster.pop("error", error.data);
-            })
-        };
-
-        //安全级别
-        // $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;
-        //                     },
-        //                     success : function () {
-        //                         return false;
-        //                     },
-        //                     uuid: function () {
-        //                         return null;
-        //                     }
-        //                 }
-        //             });
-        //         }
-        //     }
-        // });
-        // if(!($scope.userInfo.pwdEnable && $scope.userInfo.haveUserQuestion && ($scope.userInfo.userEmail==null?false:true))){
-        //     // $scope.openHomeCenterModel();
-        // } else {}
-
     }]);
 
     app.register.controller('homeModalCtrl', ['$rootScope', '$scope',  '$modalInstance', 'toaster', '$http', 'ShippingAddress','$state', function($rootScope, $scope, $modalInstance, toaster, $http, ShippingAddress,$state){

+ 0 - 1604
src/main/webapp/resources/js/sso/controllers/ssoInfoCtrl.js

@@ -22,10 +22,6 @@ define(['app/app'], function (app) {
         if($rootScope.userInfo.enterprise) {
             $scope.isAdmin = $rootScope.userInfo.enterprise.enAdminuu === $rootScope.userInfo.userUU ? true : false;
         }
-        // $scope.userInfo.pwdEnable = false;
-        // $scope.userInfo.haveUserQuestion = false;
-        // $scope.userInfo.userEmail = null;
-
         //table设置
         var applyToEnterpriseTableParams = function () {
             $scope.applyToEnterpriseTableParams = new ngTableParams({
@@ -695,1604 +691,4 @@ define(['app/app'], function (app) {
             })
         })
     }]);
-
-
-    /*
-     * 绑定用户到企业
-     */
-    app.register.controller('AddExistUserCtrl',
-        ['$scope', '$modalInstance', 'Enterprise', 'AuthenticationService',
-            '$timeout', 'toaster',
-            function ($scope, $modalInstance, Enterprise, AuthenticationService,
-                      $timeout, toaster) {
-                $scope.searching = false;
-                //根据输入的内容查找用户
-                $scope.searchUser = function (keyWord) {
-                    $scope.searching = true;
-                    $scope.searchSuccess = false;
-                    $scope.searchFailed = false;
-                    $scope.illegalError = false;
-                    $scope.reBindError = false;
-                    $scope.okDisabled = false;
-                    Enterprise.searchUser({keyWord: keyWord}, function (data) {
-                        $scope.searchSuccess = true;
-                        $scope.searchFailed = false;
-                        $scope.user = data;		//查询到的用户
-                    }, function (response) {
-                        $scope.searchSuccess = false;
-                        $scope.searchFailed = true;
-                    });
-                };
-
-                $scope.onKeyDown = function (e, key) {
-                    var keycode = window.event ? e.keyCode : e.which;
-                    if (keycode == 13) {
-                        $scope.searchUser(key);
-                    }
-                }
-
-                //确认绑定
-                $scope.ok = function (keyWord) {
-                    AuthenticationService.getAuthentication().success(function (data) {
-                        $scope.currentUser = data;	//当前登录的用户(管理员)
-                        //不可自己绑定自己
-                        if ($scope.currentUser.userUU == $scope.user.userUU) {
-                            $scope.illegalError = true;
-                            $scope.okDisabled = true;
-                            return false;
-                        }
-
-                        //用户未绑定到任何企业时
-                        if (!$scope.user.enterprises) {
-                            //正常绑定
-                            Enterprise.bindUserToMyEnterprise({userUU: $scope.user.userUU},
-                                function (data) {
-                                    $scope.okDisabled = true;
-                                    toaster.pop("success", "提示", "用户绑定成功");
-                                    $modalInstance.close(true);
-                                }, function (response) {
-                                    toaster.pop('error', response.data);
-                                });
-                            return true;
-                        }
-
-                        //用户已绑定到某些企业时
-                        for (var i = 0; i < $scope.currentUser.enterprises.length; i++) {
-                            if ($scope.currentUser.enterprises[i].current) {
-                                for (var j = 0; j < $scope.user.enterprises.length; j++) {
-                                    //该用户已绑定到当前企业,不可重复绑定
-                                    if ($scope.currentUser.enterprises[i].uu
-                                        == $scope.user.enterprises[j].uu) {
-                                        $scope.reBindError = true;
-                                        $scope.okDisabled = true;
-                                        return false;
-                                    }
-                                }
-                                //该用户未绑定到当前企业,可以进行绑定
-                                Enterprise.bindUserToMyEnterprise(
-                                    {userUU: $scope.user.userUU}, function (data) {
-                                        $scope.okDisabled = true;
-                                        toaster.pop("success", "提示", "用户绑定成功");
-                                        $modalInstance.close(true);
-                                    }, function (response) {
-                                        toaster.pop('error', response.data);
-                                    });
-
-                }
-              }
-
-            });
-          };
-
-          $scope.cancel = function () {
-            $modalInstance.dismiss();
-          };
-        }]);
-
-  // 修改密码Controller
-  app.register.controller('PasswordCtrl',
-      ['$rootScope', '$scope', '$modalInstance', 'user', 'User', 'toaster','$state',
-        function ($rootScope, $scope, $modalInstance, user, User, toaster,$state) {
-          $rootScope.$on('$stateChangeStart',
-              function(event, toState, toParams, fromState, fromParams){
-                $modalInstance.dismiss();
-          })
-          $scope.user = user;
-          $scope.checking = false;
-          $scope.showPassword = false;
-          $scope.showNewPassword = false;
-          $scope.showPassword1 = false;
-          $scope.reloadKeyboard = function (type, $event) {
-            $event.stopPropagation();
-            if (type === 'showPassword') {
-              $scope.showPassword = !$scope.showPassword;
-              if (!$scope.showPassword) {
-                $scope.checkPassword($scope.user.password);
-              } else {
-                $scope.closeOtherKeyboard('showPassword');
-              }
-            } else if (type === 'showNewPassword') {
-              $scope.showNewPassword = !$scope.showNewPassword;
-              if (!$scope.showNewPassword) {
-                $scope.checkNewPassword($scope.user.newPassword);
-              } else {
-                $scope.closeOtherKeyboard('showNewPassword');
-              }
-            } else if (type === 'showPassword1') {
-              $scope.showPassword1 = !$scope.showPassword1;
-              if (!$scope.showNewPassword1) {
-                $scope.checkNewPassword1($scope.user.newPassword1);
-              } else {
-                $scope.closeOtherKeyboard('showPassword1');
-              }
-            }
-          }
-
-          function resetPassword() {
-            $scope.showPassword = false;
-            $scope.checkPassword($scope.user.password);
-          }
-
-          function resetNewPassword() {
-            $scope.showNewPassword = false;
-            $scope.checkNewPassword($scope.user.newPassword);
-          }
-
-          function resetPassword1() {
-            $scope.showPassword1 = false;
-            $scope.checkNewPassword1($scope.user.newPassword1);
-          }
-
-          $scope.closeOtherKeyboard = function (type) {
-            if (type == 'showPassword') {
-              if ($scope.showNewPassword) {
-                resetNewPassword();
-              } else if ($scope.showPassword1) {
-                resetPassword1();
-              }
-            } else if (type == 'showNewPassword') {
-              if ($scope.showPassword) {
-                resetPassword();
-              } else if ($scope.showPassword1) {
-                resetPassword1();
-              }
-            } else if (type == 'showPassword1') {
-              if ($scope.showPassword) {
-                resetPassword();
-              } else if ($scope.showNewPassword) {
-                resetNewPassword();
-              }
-            }
-          }
-          $scope.closeKeyboard = function () {
-            if ($scope.showPassword) {
-              $scope.showPassword = false;
-              $scope.checkPassword($scope.user.password);
-            } else if ($scope.showNewPassword) {
-              $scope.showNewPassword = false;
-              $scope.checkNewPassword($scope.user.newPassword);
-            } else if ($scope.showPassword1) {
-              $scope.showPassword1 = false;
-              $scope.checkNewPassword1($scope.user.newPassword1);
-            }
-          }
-          //输入原密码后验证原密码是否正确
-          $scope.checkSuccess = false;
-          $scope.checkFailed = false;
-          $scope.checkPassword = function (password) {
-            $scope.checkSuccess = false;
-            $scope.checkFailed = false;
-            if(!password){
-              $scope.checkFailed = true;
-              $scope.checkSuccess = false;
-            }
-            User.checkPassword({password: password}, function () {
-              $scope.checkSuccess = true;
-              $scope.checkFailed = false;
-            }, function () {
-              $scope.checkFailed = true;
-              $scope.checkSuccess = false;
-            });
-          };
-
-          // 对新密码进行校验
-          $scope.checkSuccess1 = false;
-          $scope.checkFailed1 = false;
-          $scope.checkNewPassword = function (newPassword) {
-            var middlLevelReg = /^(?=.{8,20})(((?=.*[0-9])(?=.*[a-z]))|((?=.*[0-9])(?=.*[A-Z]))).*$/;
-            if (newPassword == null || !middlLevelReg.test(newPassword)) {
-              //toaster.pop('error', '错误', '密码为8-20字符的英文、数字混合');
-              $scope.checkSuccess1 = false;
-              $scope.checkFailed1 = true;
-              return false;
-            } else {
-              $scope.checkSuccess1 = true;
-              $scope.checkFailed1 = false;
-            }
-          }
-
-          $scope.$watch('user.newPassword', function (newValue, oldValue) {
-            $scope.checkPasswordLevel(newValue);
-          });
-
-          // 密码强度校验
-          $scope.secLevel = 0;
-          $scope.checkPasswordLevel = function (newPassword) {
-            $scope.checkFailed1 = false;
-            if (newPassword == null) {
-              $scope.secLevel = 0;
-              return false;
-            }
-            // 密码强度中的正则
-            var middlLevelReg = /^(?=.{8,20})(((?=.*[0-9])(?=.*[a-z]))|((?=.*[0-9])(?=.*[A-Z]))).*$/;
-            // 密码强度高的正则
-            var heightLevelReg = /^(?=.{8,20})(((?=.*[0-9])(?=.*[a-z])(?=.*[A-Z]))|((?=.*[0-9])((?=.*[a-zA-Z]))(?=.*[^a-zA-Z0-9]))).*$/;
-            if(heightLevelReg.test(newPassword)){
-              $scope.secLevel = 3;
-              return true;
-            }else if(middlLevelReg.test(newPassword)){
-              $scope.secLevel = 2;
-              return true;
-            }else{
-              $scope.secLevel = 1;
-              return false;
-            }
-          }
-
-          //校验确认密码是否与新密码相同
-          $scope.checkSuccess2 = false;
-          $scope.checkFailed2 = false;
-          $scope.checkNewPassword1 = function () {
-            if ($scope.checkSuccess1 == true && ($scope.user.newPassword
-                    == $scope.user.newPassword1)) {
-              $scope.checkSuccess2 = true;
-              $scope.checkFailed2 = false;
-              return false;
-            }
-            $scope.checkSuccess2 = false;
-            $scope.checkFailed2 = true;
-          }
-
-          // 修改密码
-          $scope.ok = function () {
-            // 原密码校验
-            if(!$scope.checkSuccess){
-              $scope.checkPassword($scope.user.password);
-            }
-            // 新密码校验
-            $scope.checkNewPassword($scope.user.newPassword);
-            // 再次输入密码校验
-            $scope.checkNewPassword1();
-            if(!$scope.checkSuccess || !$scope.checkSuccess1 || !$scope.checkSuccess2){
-              return;
-            }
-            // 密码强度校验
-            if(!$scope.checkPasswordLevel($scope.user.newPassword)){
-              toaster.pop('error', '错误', '密码强度不够,请重新输入');
-              return;
-            }
-            if ($scope.user.newPassword == $scope.user.password) {
-              toaster.pop('error', '错误', '新密码与原密码相同');
-              return;
-            }
-            if ($scope.user.newPassword == $scope.user.newPassword1) {//验证重复密码相等
-              User.updatePassword({
-                password: $scope.user.password,
-                newPassword: $scope.user.newPassword,
-                secLevel: $scope.secLevel
-              }, {}, function () {
-                toaster.pop('success', '成功', '修改密码成功,请牢记您的新密码。');
-                $scope.user.password = null;
-                $scope.user.newPassword = null;
-                $scope.user.newPassword1 = null;
-                $scope.checking = false;
-                $scope.checkSuccess = false;
-                $scope.checkFailed = false;
-                $scope.checkSuccess1 = false;
-                $scope.checkFailed1 = false;
-                $scope.checkSuccess2 = false;
-                $scope.checkFailed2 = false;
-                window.location.href = "vendor#/account/management/sec";
-                window.location.reload();
-                $modalInstance.close();
-              }, function (response) {
-                toaster.pop('error', '错误', response.data);
-                $modalInstance.close();
-              });
-            } else {
-              toaster.pop('error', '错误', '重复密码不一致');
-            }
-          };
-
-          $scope.cancel = function () {
-            $modalInstance.close();
-          };
-          $scope.hideKeyboard = function () {
-            $scope.closeKeyboard();
-            console.log(1);
-          }
-        }]);
-
-  // 修改邮箱Controller
-  app.register.controller('UserEmailCtrl',
-      ['$rootScope', '$scope', '$modalInstance', 'user', 'User', 'toaster', '$interval',
-        function ($rootScope, $scope, $modalInstance, user, User, toaster, $interval) {
-          $rootScope.$on('$stateChangeStart',
-              function(event, toState, toParams, fromState, fromParams){
-                $modalInstance.dismiss();
-          })
-          User.getPageToken();
-          $scope.user = user;
-          $scope.user.userEmail = null;
-          $scope.user.newUserEmail = null;
-          //验证用户输入的旧邮箱地址是否正确
-          $scope.checkUserEmail = function (userEmail) {
-            if (userEmail == null) {
-              $scope.checkFailed = true;
-              $scope.checkSuccess = false;
-              return false;
-            }
-            $scope.checkSuccess = false;
-            $scope.checkFailed = false;
-            User.checkUserEmail({userEmail: userEmail}, function () {
-              $scope.checkSuccess = true;
-              $scope.checkFailed = false;
-            }, function () {
-              $scope.checkFailed = true;
-              $scope.checkSuccess = false;
-            });
-          };
-          //如果之前未绑定
-          if($scope.userInfo.userEmail==null?true:false){
-            $scope.checkSuccess = true;
-          }
-
-          //验证用户新输入的邮箱是否可用
-          $scope.checkSuccess1 = false;
-          $scope.checkFailed1 = false;
-          $scope.checkFailed1_1 = false;
-          $scope.emailEnable = function (newUserEmail) {
-            //邮箱不可用
-            if ((newUserEmail == null || newUserEmail.length > 30)
-                || newUserEmail.indexOf("@") == -1 || newUserEmail.indexOf(".") == -1) {
-              $scope.checkSuccess1 = false;
-              $scope.checkFailed1 = true;
-              $scope.checkFailed1_1 = false;
-              return false;
-            }
-            User.emailEnable({email: newUserEmail}, function (data) {
-              if (data.data == "true") {//邮箱可用
-                $scope.checkSuccess1 = true;
-                $scope.checkFailed1 = false;
-                $scope.checkFailed1_1 = false;
-              } else {//邮箱不可用
-                $scope.checkSuccess1 = false;
-                $scope.checkFailed1 = false;
-                $scope.checkFailed1_1 = true;
-              }
-            }, function () {
-              $scope.checkSuccess1 = false;
-              $scope.checkFailed1 = true;
-              $scope.checkFailed1_1 = false;
-            });
-          };
-
-          $scope.codeSuccess = false;
-          $scope.sendSuccess = true;
-          //发送验证码
-          $scope.sendCheckCode = function (newUserEmail) {
-            if (!$scope.checkSuccess1 || ($scope.userInfo.userEmail!=null && !$scope.checkSuccess)) {
-                if ($scope.userInfo.userEmail!=null && !$scope.checkSuccess) {
-                    $scope.checkFailed = true;
-                }
-              return;
-            }
-            $scope.sendSuccess = false;
-            User.sendCheckCode({newUserEmail: newUserEmail}, function () {
-              $scope.codeSuccess = true;
-              $interval.cancel(timePromise);
-              var second = 60,
-                  timePromise = $interval(function () {
-                    if (second <= 0) {
-                      $interval.cancel(timePromise);
-                      second = 60;
-                    } else {
-                      second--;
-                      $scope.paracont = second + "秒后可重发";
-                      if (second == 0) {
-                        $scope.paracont = "重发验证码";
-                        $scope.sendSuccess = true;
-                      }
-                    }
-                  }, 1000, 60);
-            }, function (response) {
-              toaster.pop('error', '错误', response.data);
-              $scope.sendSuccess = true;
-            });
-          };
-
-          $scope.checkSuccess2 = false;
-          $scope.checkFailed2 = false;
-          //校验验证码
-          $scope.validCheckCode = function (checkCode) {
-            if(!checkCode){
-              $scope.checkSuccess2 = false;
-              $scope.checkFailed2 = true;
-              return false;
-            }
-            User.validCheckCode({checkCode: checkCode,newUserEmail:$scope.user.newUserEmail}, function (data) {
-              var status = data.status;
-              var message = data.message;
-              if (status == 1) {
-                $scope.checkSuccess2 = true;
-                $scope.checkFailed2 = false;
-              } else {
-                $scope.checkSuccess2 = false;
-                $scope.checkFailed2 = true;
-              }
-            });
-          };
-
-          //修改邮箱地址
-          $scope.ok = function () {
-            //原邮箱校验
-            if($scope.userInfo.userEmail && !$scope.checkSuccess ){
-              $scope.checkUserEmail($scope.user.userEmail);
-            }
-            //新邮箱校验
-            if(!$scope.checkSuccess1){
-              $scope.emailEnable($scope.user.newUserEmail);
-            }
-            //验证码
-            $scope.validCheckCode($scope.checkCode);
-            if((!$scope.checkSuccess && $scope.userInfo.userEmail)|| !$scope.checkSuccess1 || !$scope.checkSuccess2){
-              return;
-            }
-            var param = {
-              newUserEmail: $scope.user.newUserEmail,
-              checkCode:$scope.checkCode
-            };
-            if ($scope.user.userEmail!=null && $scope.user.newUserEmail == $scope.user.userEmail) {
-              toaster.pop('error', '错误', '新邮箱地址与旧邮箱地址相同');
-              return;
-            }else{
-              param["userEmail"]=$scope.user.userEmail;
-            }
-
-            User.updateUserEmail(param, {}, function () {
-              toaster.pop('success', '成功', '修改邮箱成功。');
-              //修改userInfo里面的userEmail
-              $scope.userInfo.userEmail =$scope.user.newUserEmail.substr(
-                  0,1) + "***"
-                  + $scope.user.newUserEmail.substr($scope.user.newUserEmail.indexOf("@"));
-              $scope.user.userEmail = null;
-              $scope.user.newUserEmail = null;
-              $scope.checking = false;
-              $scope.checkSuccess = false;
-              $scope.checkFailed = false;
-              $scope.codeSuccess = false;
-              $scope.validSuccess = false;
-              $scope.checkSuccess1 = false;
-              $scope.checkFailed1 = false;
-              window.location.href = "vendor#/account/management/sec";
-              window.location.reload();
-              $modalInstance.close();
-            }, function (response) {
-              toaster.pop('error', '错误', response.data);
-              $modalInstance.close();
-            });
-          };
-
-          $scope.cancel = function () {
-            $modalInstance.close();
-          };
-        }]);
-
-  //手机验证Controller
-  app.register.controller('UserTelCtrl',
-      ['$rootScope', '$scope', '$modalInstance', 'user', 'User', 'toaster', '$interval',
-        function ($rootScope, $scope, $modalInstance, user, User, toaster, $interval) {
-          $rootScope.$on('$stateChangeStart',
-              function(event, toState, toParams, fromState, fromParams){
-                $modalInstance.dismiss();
-          })
-          User.getPageToken();
-          $scope.user = user;
-          $scope.user.userTel = null;
-          //原手机号校验
-          $scope.checking = false;
-          //验证用户输入的旧邮箱地址是否正确
-          $scope.checkUserTel = function (userTel) {
-            $scope.checking = true;
-            $scope.checkSuccess = false;
-            $scope.checkFailed = false;
-            User.checkUserTel({userTel: userTel}, function () {
-              $scope.checkSuccess = true;
-              $scope.checking = false;
-              $scope.checkFailed = false;
-            }, function () {
-              $scope.checkFailed = true;
-              $scope.checking = false;
-              $scope.checkSuccess = false;
-            });
-          };
-
-          //新手机号是否可用
-          $scope.checkFailed1 = false;
-          $scope.checkFailed1_1 = false;
-          $scope.checkSuccess1 = false;
-          $scope.telEnable = function (newUserTel) {
-            if (newUserTel == null || !/^[0-9]{8,11}$/.test(newUserTel)) {
-              $scope.checkFailed1 = true;
-              $scope.checkSuccess1 = false;
-              $scope.checkFailed1_1 = false;
-              return false;
-            }
-            $scope.checking1 = true;
-            $scope.checkSuccess1 = false;
-            $scope.checkFailed1 = false;
-            User.telEnable({tel: newUserTel}, function (data) {
-              if (data.data == "true") {//手机可用
-                $scope.checkSuccess1 = true;
-                $scope.checkFailed1 = false;
-                $scope.checkFailed1_1 = false;
-              } else {//手机不可用
-                $scope.checkFailed1_1 = true;
-                $scope.checking1 = false;
-                $scope.checkSuccess1 = false;
-              }
-            }, function () {
-              $scope.checkFailed1 = true;
-              $scope.checking1 = false;
-              $scope.checkSuccess1 = false;
-              $scope.checkFailed1_1 = false;
-            });
-          };
-
-          //发送验证码
-          $scope.codeSuccess = false;
-          $scope.sendSuccess = true;
-          //发送验证码
-          $scope.sendTelCheckCode = function (newUserTel) {
-            if (!$scope.checkSuccess1 || ($scope.userInfo.userTel!=null && !$scope.checkSuccess)) {
-                if ($scope.userInfo.userTel!=null && !$scope.checkSuccess) {
-                    $scope.checkFailed = true;
-                }
-                return;
-            }
-            $scope.sendSuccess = false;
-            User.sendTelCheckCode({newUserTel: newUserTel}, function () {
-              $scope.codeSuccess = true;
-              $interval.cancel(timePromise);
-              var second = 60,
-                  timePromise = $interval(function () {
-                    if (second <= 0) {
-                      $interval.cancel(timePromise);
-                      second = 60;
-                    } else {
-                      second--;
-                      $scope.paracont = second + "秒后可重发";
-                      if (second == 0) {
-                        $scope.paracont = "重发验证码";
-                        $scope.sendSuccess = true;
-                      }
-                    }
-                  }, 1000, 60);
-            }, function (response) {
-              toaster.pop('error', '错误', response.data);
-              $scope.sendSuccess = true;
-            });
-          };
-
-          $scope.checkSuccess2 = false;
-          $scope.checkFailed2 = false;
-          //校验验证码
-          $scope.validTelCheckCode = function (telCheckCode) {
-            if(!telCheckCode){
-              $scope.checkSuccess2 = false;
-              $scope.checkFailed2 = true;
-              return false;
-            }
-            User.validTelCheckCode({telCheckCode: telCheckCode,newUserTel:$scope.user.newUserTel},
-                function (data) {
-                  var status = data.status;
-                  var message = data.message;
-                  if (status == 1) {
-                    $scope.checkSuccess2 = true;
-                    $scope.checkFailed2 = false;
-                  } else {
-                    $scope.checkSuccess2 = false;
-                    $scope.checkFailed2 = true;
-                  }
-                });
-          };
-
-          //修改手机
-          $scope.ok = function () {
-            //原手机校验
-            if(!$scope.checkSuccess){
-              $scope.checkUserTel($scope.user.userTel);
-            }
-            //新手机校验
-            if(!$scope.checkSuccess1){
-              $scope.telEnable($scope.user.newUserTel);
-            }
-            //验证码校验
-            $scope.validTelCheckCode($scope.telCheckCode);
-            if(!$scope.checkSuccess || !$scope.checkSuccess1 || !$scope.checkSuccess2){
-              return;
-            }
-            if ($scope.user.newUserTel == $scope.user.userTel) {
-              toaster.pop('error', '错误', '新手机号与旧手机号相同');
-              return;
-            }
-            User.updateUserTel({
-              newUserTel: $scope.user.newUserTel,
-              userTel: $scope.user.userTel,
-              telCheckCode:$scope.telCheckCode
-            }, {}, function () {
-              toaster.pop('success', '成功', '手机修改成功。');
-              $scope.userInfo.userTel = $scope.user.newUserTel.substr(0, 3)
-                  + '****' + $scope.user.newUserTel.substr(7);
-              $scope.user.userTel = null;
-              $scope.user.newUserTel = null;
-              $scope.checking = false;
-              $scope.checkSuccess = false;
-              $scope.checkFailed = false;
-              $scope.checking1 = false;
-              $scope.checkSuccess1 = false;
-              $scope.checkFailed1 = false;
-              $scope.emailSuccess = false;
-              $scope.codeSuccess = false;
-              $scope.validSuccess = false;
-              window.location.href = "vendor#/account/management/sec";
-              window.location.reload();
-              $modalInstance.close();
-            }, function (response) {
-              toaster.pop('error', '错误', response.data);
-              //$modalInstance.close();
-            });
-          };
-
-          $scope.cancel = function () {
-            $modalInstance.close();
-          };
-        }]);
-
-  // 设置支付密码Controller
-  app.register.controller('UserPayCtrl',
-      ['$rootScope', '$scope', '$modalInstance', 'user', 'User', 'toaster',
-        function ($rootScope, $scope, $modalInstance, user, User, toaster) {
-          $rootScope.$on('$stateChangeStart',
-              function(event, toState, toParams, fromState, fromParams){
-                $modalInstance.dismiss();
-          })
-          //原密码框是否显示
-          $scope.user = angular.copy(user);
-          $scope.checking = true;
-          $scope.showNewUserPay = false;
-          $scope.showUserPay = false;
-          $scope.showNewUserPay1 = false;
-          $scope.reloadKeyboard = function (type, $event) {
-            $event.stopPropagation();
-            if (type === 'showNewUserPay') {
-              $scope.showNewUserPay = !$scope.showNewUserPay;
-              if (!$scope.showNewUserPay) {
-                $scope.checkNewUserPay($scope.user.newUserPay);
-              } else {
-                $scope.closeOtherKeyboard('showNewUserPay');
-              }
-            } else if (type === 'showUserPay') {
-              $scope.showUserPay = !$scope.showUserPay;
-              if (!$scope.showUserPay) {
-                $scope.checkUserPay($scope.user.userPay);
-              } else {
-                $scope.closeOtherKeyboard('showUserPay');
-              }
-            } else if (type === 'showNewUserPay1') {
-              $scope.showNewUserPay1 = !$scope.showNewUserPay1;
-              if (!$scope.showNewUserPay1) {
-                $scope.checkNewUserPay1($scope.user.newUserPay1);
-              } else {
-                $scope.closeOtherKeyboard('showNewUserPay1');
-              }
-            }
-          }
-
-          function resetNewUserPay() {
-            $scope.showNewUserPay = false;
-            $scope.checkNewUserPay($scope.user.newUserPay);
-          }
-
-          function resetUserPay() {
-            $scope.showUserPay = false;
-            $scope.checkUserPay($scope.user.userPay);
-          }
-
-          function resetNewUserPay1() {
-            $scope.showNewUserPay1 = false;
-            $scope.checkNewUserPay1($scope.user.newUserPay1);
-          }
-
-          $scope.closeOtherKeyboard = function (type) {
-            if (type == 'showNewUserPay') {
-              if ($scope.showUserPay) {
-                resetUserPay();
-              } else if ($scope.showNewUserPay1) {
-                resetNewUserPay1();
-              }
-            } else if (type == 'showUserPay') {
-              if ($scope.showNewUserPay) {
-                resetNewUserPay();
-              } else if ($scope.showNewUserPay1) {
-                resetNewUserPay1();
-              }
-            } else if (type == 'showNewUserPay1') {
-              if ($scope.showNewUserPay) {
-                resetNewUserPay();
-              } else if ($scope.showUserPay) {
-                resetUserPay();
-              }
-            }
-          }
-          $scope.closeKeyboard = function () {
-            if ($scope.showNewUserPay) {
-              $scope.showNewUserPay = false;
-              $scope.checkNewUserPay($scope.user.newUserPay);
-            } else if ($scope.showUserPay) {
-              $scope.showUserPay = false;
-              $scope.checkUserPay($scope.user.userPay);
-            } else if ($scope.showNewUserPay1) {
-              $scope.showNewUserPay1 = false;
-              $scope.checkNewUserPay1($scope.user.newUserPay1);
-            }
-          }
-          //验证是否设置密码
-          $scope.isNewSuccess = false;
-          $scope.isNewFailed = false;
-          $scope.checkHaveUserPay = function () {
-            $scope.isNewSuccess = false;
-            $scope.isNewFailed = true;
-            User.checkHaveUserPay(function (data) {
-              var flag = data.data;
-              if (flag == "false") {
-                //隐藏原密码输入框
-                angular.element(".oldUserPay").remove();
-                //修改新密码框内容
-                $scope.newUserPayLabel = "密码";
-                $scope.isNewSuccess = true;
-                $scope.isNewFailed = false;
-              }
-            });
-          }
-
-          //校验原密码是否正确
-          $scope.checkFailed = false;
-          $scope.checkSuccess = false;
-          $scope.checkUserPay = function (userPay) {
-            if (userPay == null) {
-              $scope.checkFailed = true;
-              $scope.checkSuccess = false;
-              return false;
-            }
-            $scope.checkSuccess = false;
-            $scope.checkFailed = false;
-            User.checkUserPay({userPay: userPay}, function () {
-              $scope.checkFailed = false;
-              $scope.checkSuccess = true;
-            }, function () {
-              $scope.checkFailed = true;
-              $scope.checkSuccess = false;
-            });
-          }
-
-          //输入新密码,进行校验
-          $scope.checkSuccess1 = false;
-          $scope.checkFailed1 = false;
-          $scope.checkNewUserPay = function (newUserPay) {
-            if (newUserPay == null) {
-              $scope.checkFailed1 = true;
-              $scope.checkSuccess1 = false;
-              return false;
-            }
-            //如果两者相同 则返回
-            if ($scope.checking && ($scope.user.userPay
-                    == $scope.user.newUserPay)) {
-              toaster.pop('error', '错误', '新密码与原密码相同');
-              $scope.checkFailed1 = true;
-              $scope.checkSuccess1 = false;
-              return false;
-            }
-            //正则校验
-            var reg = /^\d{6}$/;
-            if (!reg.test(newUserPay)) {
-              $scope.checkFailed1 = true;
-              $scope.checkSuccess1 = false;
-              return false;
-            }
-            $scope.checkFailed1 = false;
-            $scope.checkSuccess1 = true;
-          }
-
-
-          //校验确认密码是否与新密码相同
-          $scope.checkSuccess2 = false;
-          $scope.checkFailed2 = false;
-          $scope.checkNewUserPay1 = function () {
-            if($scope.user.newUserPay1 == null){
-              $scope.checkSuccess2 = false;
-              $scope.checkFailed2 = true;
-            }
-            if ($scope.user.newUserPay1 != null) {
-              //如果输入密码正确,并且输入密码=重新输入密码
-              if ($scope.checkSuccess1 && ($scope.user.newUserPay
-                      == $scope.user.newUserPay1)) {
-                $scope.checkSuccess2 = true;
-                $scope.checkFailed2 = false;
-                return false;
-              }
-              $scope.checkSuccess2 = false;
-              $scope.checkFailed2 = true;
-            }
-          }
-
-          //支付密码
-          $scope.ok = function () {
-            //原密码校验
-            if(!$scope.checkSuccess && $scope.userInfo.havePayPwd){
-              $scope.checkUserPay($scope.user.userPay);
-            }
-            //新密码校验
-            $scope.checkNewUserPay($scope.user.newUserPay);
-            //密码确认
-            $scope.checkNewUserPay1();
-            if((!$scope.checkSuccess && $scope.userInfo.havePayPwd) || !$scope.checkSuccess1 || !$scope.checkSuccess2){
-              return;
-            }
-            if ($scope.checking && ($scope.user.newUserPay
-                    == $scope.user.userPay)) {
-              toaster.pop('error', '错误', '新密码与旧密码相同');
-              return;
-            }
-            User.updateUserPay({
-              newUserPay: $scope.user.newUserPay,
-              userPay: $scope.user.userPay
-            }, {}, function () {
-              toaster.pop('success', '成功', '支付密码设置成功。');
-              $scope.user.userPay = null;
-              $scope.user.newUserPay = null;
-              $scope.checkSuccess = false;
-              $scope.checkFailed = false;
-              $scope.checkSuccess1 = false;
-              $scope.checkFailed1 = false;
-              $scope.checkSuccess2 = false;
-              $scope.checkFailed2 = false;
-              $scope.checking = true;
-              window.location.href = "vendor#/account/management/sec";
-              window.location.reload();
-              $modalInstance.close();
-            }, function (response) {
-              toaster.pop('error', '错误', response.data);
-              $modalInstance.close();
-            });
-          };
-
-          $scope.cancel = function () {
-            $modalInstance.close();
-          };
-        }]);
-
-  // 设置密保问题Controller
-  app.register.controller('UserQuestionCtrl',
-      ['$rootScope', '$scope', '$modalInstance', 'user', 'User', 'toaster','$timeout',
-        function ($rootScope, $scope, $modalInstance, user, User, toaster,$timeout) {
-          $rootScope.$on('$stateChangeStart',
-              function(event, toState, toParams, fromState, fromParams){
-                $modalInstance.dismiss();
-          })
-          //查询所有的密保问题
-          $scope.pageInfo = {page: 1, count: 20};
-          User.getAllSecQuestion($scope.pageInfo, function (data) {
-            $scope.secQuestions = data.content;
-            //查询当前用户密保问题
-            User.getUserQuestion({userUU: $scope.userInfo.userUU},function (data) {
-              $scope.uq[0] = data[0];
-              $scope.uq[1] = data[1];
-            });
-          });
-          //选择问题 校验
-          $scope.checkSuccess = false;
-          $scope.checkFailed = false;
-          $scope.checkSuccess2 = false;
-          $scope.checkFailed2 = false;
-          $scope.choose = function () {
-            if ($scope.uq[0]!=undefined && $scope.uq[0].question != undefined && $scope.uq[0].question!="") {
-              $scope.checkSuccess = true;
-              $scope.checkFailed = false;
-            } else {
-              $scope.checkSuccess = false;
-              $scope.checkFailed = true;
-            }
-          }
-
-          $scope.choose1 = function () {
-            if ($scope.uq[1]!=undefined && $scope.uq[1].question != undefined && $scope.uq[1].question!="") {
-              $scope.checkSuccess2 = true;
-              $scope.checkFailed2 = false;
-            } else {
-              $scope.checkSuccess2 = false;
-              $scope.checkFailed2 = true;
-            }
-          }
-
-          //答案校验 不超过30个字符
-          $scope.checkSuccess1 = false;
-          $scope.checkFailed1 = false;
-          $scope.checkFailed1_1 = false;
-          $scope.checkSuccess3 = false;
-          $scope.checkFailed3 = false;
-          $scope.checkFailed3_1 = false;
-          $scope.inputAnswer = function () {
-            if ($scope.uq[0]==undefined || $scope.uq[0].answer == undefined || $scope.uq[0].answer=="") {
-              $scope.checkSuccess1 = false;
-              $scope.checkFailed1 = true;
-              $scope.checkFailed1_1 = false;
-              return false;
-            }
-            if ($scope.uq[0].answer.length > 30) {
-              $scope.checkSuccess1 = false;
-              $scope.checkFailed1 = false;
-              $scope.checkFailed1_1 = true;
-              return false;
-            }
-            $scope.checkSuccess1 = true;
-            $scope.checkFailed1 = false;
-            $scope.checkFailed1_1 = false;
-          }
-
-          $scope.inputAnswer1 = function () {
-            if ($scope.uq[1]==undefined || $scope.uq[1].answer == undefined || $scope.uq[1].answer=="") {
-              $scope.checkSuccess3 = false;
-              $scope.checkFailed3 = true;
-              $scope.checkFailed3_1 = false;
-              return false;
-            }
-            if ($scope.uq[1].answer.length > 30) {
-              $scope.checkSuccess3 = false;
-              $scope.checkFailed3 = false;
-              $scope.checkFailed3_1 = true;
-              return false;
-            }
-            $scope.checkSuccess3 = true;
-            $scope.checkFailed3 = false;
-            $scope.checkFailed3_1 = false;
-          }
-
-          //保存密保
-          $scope.ok = function () {
-            //问题1校验
-            $scope.choose();
-            $scope.inputAnswer();
-            $scope.choose1();
-            $scope.inputAnswer1();
-            if(!$scope.checkSuccess || !$scope.checkSuccess1 || !$scope.checkSuccess2 || !$scope.checkSuccess3){
-              return;
-            }
-            var arr = [];
-            for (var key in $scope.uq) {
-              $scope.uq[key].sort = Number(key) + 1;
-              arr[key] = $scope.uq[key];
-            }
-            User.updateUserQuestion({}, arr, function () {
-              toaster.pop('success', '成功', '密保问题设置成功。');
-              $modalInstance.close();
-              $scope.uq = null;
-              $scope.checkSuccess = false;
-              $scope.checkFailed = false;
-              $scope.checkSuccess1 = false;
-              $scope.checkFailed1 = false;
-              $scope.checkSuccess2 = false;
-              $scope.checkFailed2 = false;
-              $scope.checkSuccess3 = false;
-              $scope.checkFailed3 = false;
-              $scope.checkFailed3_1 = false;
-              $scope.checkFailed1_1 = false;
-              window.location.href = "vendor#/account/management/sec";
-              window.location.reload();
-              $modalInstance.close();
-            }, function (response) {
-              toaster.pop('error', '错误', response.data);
-              $modalInstance.close();
-            });
-          };
-          $scope.cancel = function () {
-            $modalInstance.close();
-          };
-        }]);
-
-  // 实名认证Controller
-  app.register.controller('UserRealAuthCtrl',
-      ['$rootScope', '$scope', '$modalInstance', 'user', 'User', 'toaster',
-        function ($rootScope, $scope, $modalInstance, user, User, toaster) {
-          $rootScope.$on('$stateChangeStart',
-              function(event, toState, toParams, fromState, fromParams){
-                $modalInstance.dismiss();
-          })
-          $scope.user = user;
-          //姓名验证  不超过20个字符
-          $scope.checkSuccess = false;
-          $scope.checkFailed = false;
-          $scope.checkUserName = function (userName) {
-            if (!userName) {
-              //toaster.pop('error', '请输入您的真实姓名');
-              $scope.checkSuccess = false;
-              $scope.checkFailed = true;
-              return false;
-            } else if (userName.length > 20) {
-              //toaster.pop('error', '请勿超过20个字符');
-              $scope.checkSuccess = false;
-              $scope.checkFailed_1 = true;
-              return false;
-            } else {
-              $scope.checkSuccess = true;
-              $scope.checkFailed = false;
-              $scope.checkFailed_1 = false;
-            }
-          }
-
-          //检查身份证
-          $scope.checkSuccess1 = false;
-          $scope.checkFailed1 = false;
-          $scope.checkFailed1_1 = false;
-          $scope.checkUserIdcode = function (userIdcode) {
-            if (userIdcode == null) {
-              //toaster.pop('error', '请输入您的身份证号');
-              $scope.checkSuccess1 = false;
-              $scope.checkFailed1 = true;
-              $scope.checkFailed1_1 = false;
-              return false;
-            } else if (!(/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(userIdcode))) {
-              //toaster.pop('error', '请输入18位的身份证号');
-              $scope.checkSuccess1 = false;
-              $scope.checkFailed1 = false;
-              $scope.checkFailed1_1 = true;
-              return false;
-            } else {
-              $scope.checkSuccess1 = true;
-              $scope.checkFailed1 = false;
-              $scope.checkFailed1_1 = false;
-            }
-          }
-
-          //图片上传
-          $scope.checkSuccess2 = false;
-          $scope.onUploadID = function ($data) {
-            if (!$data || !$data.path) {
-              toaster.pop('error', '图片上传失败');
-              return;
-            }
-            $scope.user.idImgUrl = $data.path;
-            $scope.checkSuccess2 = true;
-          };
-
-          $scope.deleteImg =function () {
-            $scope.user.idImgUrl = '';
-            $scope.checkSuccess2=false;
-          };
-
-          // 查看范例
-          $scope.showImg = function(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();
-            });
-          };
-          //保存
-          $scope.ok = function () {
-            //姓名
-            $scope.checkUserName($scope.user.userName);
-            //身份证
-            $scope.checkUserIdcode($scope.user.userIdcode);
-            //身份证
-            if(!$scope.checkSuccess2){
-              toaster.pop('error', '错误', '请上传您的证件...');
-              return;
-            }
-            if(!$scope.checkSuccess || !$scope.checkSuccess1 || !$scope.checkSuccess2){
-              return;
-            }
-            User.updateRealAuth({userName:$scope.user.userName,userIdcode:$scope.user.userIdcode,idImgUrl:$scope.user.idImgUrl},{},function(){
-              toaster.pop('success', '成功', '身份信息提交成功。');
-              $modalInstance.close();
-              $scope.checkSuccess2 = false;
-              $scope.checkSuccess1 = false;
-              $scope.checkFailed1 = false;
-              $scope.checkSuccess = false;
-              $scope.checkFailed = false;
-              window.location.href = "vendor#/account/management/sec";
-
-                        window.location.reload();
-                        $modalInstance.close();
-                    }, function (response) {
-                        toaster.pop('error', '错误', response.data);
-                        $modalInstance.close();
-                    });
-                };
-
-                $scope.cancel = function () {
-                    $modalInstance.close();
-                };
-            }]);
-//角色管理-编辑角色controller
-    app.register.controller('RoleEditCtrl', ['$scope', '$modalInstance', '$timeout', 'AccountResource', 'AccountRole', 'toaster', 'role', 'BaseService', function ($scope, $modalInstance, $timeout, AccountResource, AccountRole, toaster, role, BaseService) {
-        BaseService.scrollBackToTop();
-        $scope.role = angular.copy(role || {});
-        $scope.master = angular.copy($scope.role);
-        var isNew = role == null;
-        $scope.cancel = function () {
-            $modalInstance.close(false);
-        };
-
-        var getCheckRoleResource = function (data, rs) {
-            if (data.items.length > 0) {
-                var c = 0;
-                angular.forEach(data.items, function (item) {
-                    if (rs.indexOf(item.id) > -1) {
-                        item.$checked = true;
-                        c += 1;
-                    }
-                });
-                data.$checked = c > 0 && c == data.items.length;
-                data.$halfChecked = c > 0 && c < data.items.length;
-            } else {
-                angular.forEach(data.children, function (item) {
-                    getCheckRoleResource(item, rs);
-                    var activeCount = 0;
-                    angular.forEach(data.children, function (item) {
-                        if (!item.$checked) {
-                            activeCount ++;
-                        }
-                    });
-                    data.$checked = activeCount > 0 && activeCount == data.children.length;
-
-                    data.$halfChecked = activeCount > 0 && activeCount < data.children.length;
-                });
-            }
-        }
-
-        AccountResource.query({}, function (data) {
-            if (data && data.length > 0) {
-                var rs = [];// 已分配的资源的id
-                if (role && role.resourceItems) {
-                    angular.forEach(role.resourceItems, function (item) {
-                        rs.push(item.id);
-                    });
-                }
-                angular.forEach(data, function (data2) {
-                    getCheckRoleResource(data2, rs);
-                })
-                $scope.resourceItems = data[0].items;
-                $scope.activeResource = data[0];
-                data[0].$active = true;
-            }
-            $scope.resources = data;
-            // if ($scope.role) {
-            // 	angular.forEach($scope.role.resourceItems,function (item) {
-            // 		angular.forEach($scope.resources, function (roleItem) {
-            // 			if (item.id == roleItem.id) {
-            // 				roleItem.$active = true;
-            // 			}
-            // 		})
-            // 	})
-            // }
-            $timeout(function () {
-                angular.forEach($scope.resources, function (resource) {
-                    var c = 0;
-                    angular.forEach(resource.items, function (item) {
-                        item.$checked && (c += 1);
-                    });
-                    angular.element(document.getElementById('check_' + resource.id)).prop('indeterminate', (c > 0 && !resource.$checked));
-                });
-            }, 100);
-            getChecked();
-        });
-
-        $scope.onItemClick = function (resource) {
-            if (resource.items.length > 0) {
-                $scope.resourceItems = resource.items;
-                $scope.activeResource = resource;
-            } else {
-                $scope.resourceItems = [];
-                if (!resource.activeLevel) {
-                    resource.activeLevel = true;
-                } else {
-                    resource.activeLevel = false;
-                }
-            }
-            setNoActive($scope.resources);
-            resource.$active = true;
-        };
-        var setNoActive = function (obj) {
-            angular.forEach(obj, function (r) {
-                r.$active = false;
-                if (r.children) {
-                    setNoActive(r.children);
-                }
-            });
-        }
-
-        var getChecked = function () {
-            var items = [];
-            angular.forEach($scope.resources, function (resource) {
-                pushCheckedResource(resource, items);
-            });
-            if ($scope.role) {
-                $scope.role.resourceItems = items;
-            }
-        };
-        var pushCheckedResource = function (resource, items) {
-            if (resource.items.length > 0) {
-                var activeCount = 0;
-                angular.forEach(resource.items, function (item) {
-                    // item.$checked && items.push(item);
-                    if (item.$checked) {
-                        items.push(item);
-                        activeCount ++;
-                    }
-                });
-                resource.$checked = activeCount > 0 && activeCount == resource.items.length;
-                resource.$halfChecked = activeCount > 0 && activeCount < resource.items.length;
-
-            } else {
-                var halfCount = 0;
-                var fullCount = 0;
-                angular.forEach(resource.children, function (item) {
-                    if (item.$checked) {
-                        fullCount ++;
-                    } else if (item.$halfChecked) {
-                        halfCount ++;
-                    }
-                    pushCheckedResource(item, items);
-                })
-                resource.$halfChecked = halfCount > 0 || (fullCount > 0 && fullCount < resource.children.length);
-                resource.$checked = fullCount > 0 && fullCount == resource.children.length;
-            }
-        }
-        $scope.onResourceChange = function (resource) {
-            levelResourceChecked(resource);
-            getChecked();
-        };
-        var levelResourceChecked = function (resource) {
-            if (resource.items.length > 0) {
-                angular.forEach(resource.items, function (item) {
-                    item.$checked = resource.$checked;
-                });
-            } else {
-                angular.forEach(resource.children, function (item) {
-                    item.$checked = resource.$checked;
-                    levelResourceChecked(item);
-                });
-            }
-
-        }
-
-        $scope.onItemChange = function () {
-            var activeCount = 0;
-            var resourceItems = $scope.resourceItems;
-            // debugger;
-            // console.log(resourceItems);
-            angular.forEach(resourceItems, function (item) {
-                if (item.$checked) {
-                    activeCount++;
-                }
-            })
-            // console.log(activeCount);
-            // console.log( $scope.activeResource)
-            $scope.activeResource.$checked = activeCount == resourceItems.length;
-
-            $scope.activeResource.$halfChecked = activeCount > 0 && activeCount < resourceItems.length;
-
-            angular.forEach($scope.resources, function (resource) {
-                if (resource.$active) {
-                    var c = 0;
-                    angular.forEach(resource.items, function (item) {
-                        item.$checked && (c += 1);
-                    });
-                    resource.$checked = (c == resource.items.length);
-                    resource.$halfChecked = c > 0 && c < resource.items.length;
-                    angular.element(document.getElementById('check_' + resource.id)).prop('indeterminate', (c > 0 && !resource.$checked));
-                }
-            });
-            getChecked();
-        };
-        $scope.isChanged = function (formData) {
-            if (!$scope.master)
-                return true;
-            return !angular.equals(formData, $scope.master);
-        };
-        $scope.save = function () {
-            $scope.master = angular.copy($scope.role);
-            if (!$scope.master.color || $scope.master.color == '') {
-                $scope.master.color = parseInt(Math.random() * 5) + 1 + '';
-            }
-            AccountRole.save($scope.master, function () {
-                toaster.pop('success', '提示', '角色:' + $scope.role.desc + ' 资料' + (isNew ? '添加' : '修改') + '成功');
-                $modalInstance.close(true);
-            }, function (response) {
-                toaster.pop('error', '错误', response.data);
-            });
-        };
-        $scope.del = function () {
-            if (confirm('确定删除角色(' + $scope.role.desc + ')吗?')) {
-                AccountRole.remove({id: role.id}, function () {
-                    toaster.pop('success', '提示', '角色:' + $scope.role.desc + ' 删除成功');
-                    $modalInstance.close(true);
-                }, function (response) {
-                    toaster.pop('error', '错误', response.data);
-                });
-            }
-        };
-    }]);
-
-    app.register.controller('UserRoleEditCtrl', ['$scope', '$modalInstance', '$timeout', 'AccountResource', 'toaster', 'user', 'BaseService', 'AccountRole', 'User', function ($scope, $modalInstance, $timeout, AccountResource, toaster, user, BaseService, AccountRole, User) {
-
-        $scope.pages = [];
-
-        $scope.params = {
-            page: 1,
-            count: 6,
-            totalPage: 1,
-            currentPage: 1
-        };
-
-        var loadCurrentRoles = function () {
-            var start = ($scope.params.page - 1) * $scope.params.count;
-            var end = $scope.params.page * $scope.params.count;
-            $scope.currentRoles = $scope.rolesData.slice(start, end);
-        };
-
-        var init = function () {
-            $scope.user = angular.copy(user);
-            AccountRole.query({}, function (data) {
-                $scope.rolesData = data;
-                loadCurrentRoles();
-                $scope.params.totalPage = Math.ceil($scope.rolesData.length / 6);
-                $scope.acculatePages(1, $scope.params.totalPage);
-                angular.forEach($scope.rolesData, function (item) {
-                    item.checked = false;
-                    angular.forEach($scope.user.roles, function (userItem) {
-                        if (item.id === userItem.id) {
-                            item.checked = true;
-                        }
-                    });
-                });
-            });
-        }
-        init();
-
-        $scope.checked = [];
-        //勾选角色
-        $scope.checkRole = function (role) {
-            role.checked = !role.checked;
-        }
-
-        //关闭模态框
-        $scope.cancelModal = function () {
-            $modalInstance.close();
-        }
-        $scope.close = function (save) {
-            if (save) {
-                if (user.userUU) {
-                    angular.forEach($scope.rolesData, function (item) {
-                        if (item.checked) {
-                            $scope.checked.push(item);
-                        }
-                    });
-                    $scope.user.roles = $scope.checked;
-                    User.update({}, $scope.user, function () {
-                        toaster.pop('success', '提示', '保存成功');
-                        user.roles = $scope.checked
-                        $modalInstance.close(true);
-                    }, function (response) {
-                        toaster.pop('error', '保存失败', response.data);
-                    });
-                } else {
-                    $modalInstance.close(true, $scope.checked);
-                }
-            } else {
-                $modalInstance.close(false);
-            }
-        };
-
-        // //初始化分页数据
-        // var initPages = function () {
-        // 	$scope.totalPages = Math.ceil = ($scope.rolesData.length/6);
-        // }
-        //初始化页数信息
-        $scope.initPages = function (totalElementPages) {
-            var pageNum = [];
-            if (totalElementPages == 1) {
-                return;
-            } else if (totalElementPages < 10) {
-                for (var i = 0; i < totalElementPages + 2; i++) {
-                    pageNum.push(i);
-                }
-            } else {
-                pageNum = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
-            }
-            angular.forEach(pageNum, function (number) {
-                var page = {active: true, type: 'page', number: number};
-                if (number == 0) {
-                    page.type = 'prev';
-                } else if (number == 1) {
-                    page.type = 'first';
-                } else if (number == pageNum.length - 2) {
-                    page.type = 'last';
-                    page.number = totalElementPages;
-                } else if (number == pageNum.length - 1) {
-                    page.type = 'next';
-                }
-                $scope.pages.push(page);
-            });
-        };
-
-        //当前页在后端计算方式
-        $scope.endSegment = function (currentPage, totalElementPages) {
-            if (totalElementPages > 8) {
-                angular.forEach($scope.pages, function (page) {
-                    switch (page.number) {
-                        case 2:
-                            page.active = false;
-                            page.type = 'more';
-                            break;
-                        case 10:
-                            if (currentPage == totalElementPages) {
-                                page.active = false;
-                            }
-                            break;
-                        case 0:
-                        case 1:
-                            break;
-                        default:
-                            if (page.number != totalElementPages) {
-                                page.number = totalElementPages - 9 + page.number;
-                            }
-                            page.current = (currentPage == page.number);
-                            break;
-                    }
-                });
-            }
-        };
-
-        //当前页在中间计算方式
-        $scope.middleSegment = function (currentPage) {
-            angular.forEach($scope.pages, function (page) {
-                switch (page.number) {
-                    case 2:
-                    case 8:
-                        page.type = 'more';
-                        page.active = false;
-                        break;
-                    case 3:
-                        page.number = currentPage - 2;
-                        break;
-                    case 4:
-                        page.number = currentPage - 1;
-                        break;
-                    case 5:
-                        page.number = currentPage;
-                        page.current = true;
-                        break;
-                    case 6:
-                        page.number = currentPage + 1;
-                        break;
-                    case 7:
-                        page.number = currentPage + 2;
-                        break;
-                }
-            });
-        };
-
-        //当前页在前段的计算方式
-        $scope.frontSegment = function (currentPage, totalElementPages) {
-            if (totalElementPages > 8) {
-                angular.forEach($scope.pages, function (page) {
-                    switch (page.number) {
-                        case 8:
-                            page.type = 'more';
-                            page.active = false;
-                            break;
-                        case 0:
-                            if (currentPage == 1) {
-                                page.active = false;
-                            }
-                        default : {
-                            page.current = (currentPage == page.number);
-                        }
-                    }
-                });
-            }
-        };
-
-        //输入框监听Enter事件
-        $scope.listenEnter = function () {
-            if (event.keyCode == 13) {
-                $scope.setPage("page", $scope.params.currentPage);
-            }
-        };
-        $scope.setPage = function (type, number) {
-            if (type != 'prev' && type != 'page' && type != 'next' && type != 'last' && type != 'first') {
-                return;
-            }
-            ;
-            var page = -1;
-            switch (type) {
-                case "page":
-                    if (number < 1) {
-                        page = 1;
-                    } else if (number > $scope.params.totalPage) {
-                        page = $scope.params.totalPage;
-                    } else {
-                        page = number;
-                    }
-                    ;
-                    break;
-                case "prev":
-                    if ($scope.params.page <= 1) {
-                        page = 1;
-                    } else {
-                        page = $scope.params.page - 1;
-                    }
-                    ;
-                    break;
-                case "next":
-                    if ($scope.params.page >= $scope.params.totalPage) {
-                        page = $scope.params.totalPage;
-                    } else {
-                        page = $scope.params.page + 1;
-                    }
-                    break;
-                case "first":
-                    page = 1;
-                    break;
-                case "last":
-                    page = $scope.params.totalPage;
-                    break;
-            }
-            if (page == $scope.params.page || page < 1 || page > $scope.params.totalPage) {
-                $scope.params.currentPage = $scope.params.page;
-                return;
-            }
-            $scope.params.page = page;
-            $scope.params.currentPage = page;
-            loadData();
-        };
-
-        //计算页数的方式。
-        $scope.acculatePages = function (currentPage, totalElementPages) {
-            $scope.pages = [];
-            if (totalElementPages < 1) {
-                return;
-            }
-            //初始化页面数据
-            $scope.initPages(totalElementPages);
-            if (currentPage < 6) {//当期页小于6
-                $scope.frontSegment(currentPage, totalElementPages);
-            } else if (currentPage > totalElementPages - 5) { //当期页在后面
-                $scope.endSegment(currentPage, totalElementPages);
-            } else { //当期页在中间
-                $scope.middleSegment(currentPage);
-            }
-        };
-
-        var loadData = function () {
-            loadCurrentRoles();
-            $scope.acculatePages($scope.params.page, $scope.params.totalPage);
-        };
-    }]);
 });

+ 4 - 53
src/main/webapp/resources/js/sso/controllers/staffManagementCtrl.js

@@ -7,7 +7,7 @@ define(['app/app'], function (app) {
     app.register.controller('staffManagementCtrl', ['$scope', '$rootScope', 'Enterprise', 'User', 'toaster', '$modal', 'BaseService', 'ngTableParams', '$http', 'AuthenticationService', '$stateParams','AccountResource','AccountRole', 'Authority', function ($scope, $rootScope, Enterprise, User, toaster, $modal, BaseService, ngTableParams, $http, AuthenticationService, $stateParams, AccountResource, AccountRole, Authority) {
         $rootScope.active = 'sso_management';
         document.title = '员工管理-帐户中心';
-        $scope.tab = 'base';
+        $scope.tab = 'auth';
         $scope.addingUser = false;
         $scope.setAddingUser = function (status) {
             $scope.addingUser = status;
@@ -22,14 +22,6 @@ define(['app/app'], function (app) {
         $scope.searchParams = {
             keyword: ''
         };
-        if ($rootScope.userInfo.enterprise) {
-            $scope.isAdmin = $rootScope.userInfo.enterprise.enAdminuu === $rootScope.userInfo.userUU ? true : false;
-        } else {
-            $scope.isAdmin = false
-        }
-        // $scope.userInfo.pwdEnable = false;
-        // $scope.userInfo.haveUserQuestion = false;
-        // $scope.userInfo.userEmail = null;
 
         //table设置
         var applyToEnterpriseTableParams = function () {
@@ -549,31 +541,15 @@ define(['app/app'], function (app) {
                 });
           };
 
-        // 直接跳转到申请绑定
-        if ($rootScope.tab) {
-            $scope.tab = $rootScope.tab;
-            // 删除$rootScope.tab属性
-            delete $rootScope.tab;
-        }
         // 切换tab
         $scope.checkTab = function (t) {
             $scope.tab = t;
-            if (t === 'role' && $scope.rolesExcept) {
-                toaster.pop('error', '获取企业角色信息失败',$scope.rolesExcept);
+            if (t === 'auth') {
+                $scope.keyword = '';
+                $scope.onSearch($scope.keyword,'all');
             }
-            // if (t === 'auth') {
-            //     $scope.keyword = '';
-            //     $scope.onSearch($scope.keyword,'all');
-            // }
           };
 
-          /* 查询接口权限 */
-        // AccountRole.findAuthority({resUrl: encodeURIComponent('/account/role'), method: 'GET'}, function (data) {
-        //
-        // }, function (error) {
-        //
-        // })
-
           $scope.updatePassword = function () {
               AuthenticationService.redirectPassword();
           };
@@ -601,31 +577,6 @@ define(['app/app'], function (app) {
             });
           };
 
-          $scope.updateUserQuestion = function(){
-              AuthenticationService.redirectSecQuestion();
-          };
-
-          $scope.updateRealAuth = function(){
-              AuthenticationService.redirectRealNameAuth();
-          };
-
-          //卖家中心 等级提示跳转
-          if($stateParams.op!=""){
-            var op =$stateParams.op;
-            $scope.checkTab('safe');
-            switch(op)
-            {
-              case 'pwd':
-                $scope.updatePassword();
-                break;
-              case 'question':
-                $scope.updateUserQuestion();
-                break;
-              case 'email':
-                $scope.updateUserEmail();
-                break;
-            }
-        }
         //角色控制
         $scope.roles = {};
         AccountResource.query({}, function (data) {

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

@@ -706,7 +706,7 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
 					window.location.href = 'personalMaterial';
 				} else {
 					if (data.enterprise.isVendor === 313) {
-						window.location.href = 'vendor#/index';
+						// window.location.href = 'vendor#/index';
 					} else {
 						window.location.href = 'register-saler';
 					}

+ 2 - 1
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_store_maintain_ctrl.js

@@ -212,10 +212,11 @@ define(['app/app'], function (app) {
 					$rootScope.store = result.data;
 					updateStoreInfo();
 					toaster.pop('success', '保存成功');
+					$scope.closeEdit(module);
 				} else {
 					toaster.pop('error', result.message);
+					$scope.undoModify('BASIC_INFO');
 				}
-				$scope.closeEdit(module);
 			}, function (resp) {
 				toaster.pop('error', resp.data);
 				$scope.undoModify(module);

+ 405 - 307
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_upload_ctrl.js

@@ -71,169 +71,169 @@ define([ 'app/app' ], function(app) {
 
 		//选择相应的销售类型
 		$scope.sellType = function(type) {
-            if (type == 'self') {
-                $scope.batch.selfSellEabled && ($scope.batch.sellType = 'self');
-            } else if (type == 'UAS') {
-                if (!$rootScope.isPcbStore) {
-                    $scope.batch.sellType = 'UAS';
-                    $scope.setShowSelfSellRemindBox(true);
+        if (type == 'self') {
+            $scope.batch.selfSellEabled && ($scope.batch.sellType = 'self');
+        } else if (type == 'UAS') {
+            if (!$rootScope.isPcbStore) {
+                $scope.batch.sellType = 'UAS';
+                $scope.setShowSelfSellRemindBox(true);
+            }
+        }
+        // if($scope.batch.selfSellEabled) {
+    // $scope.batch.sellType = type;
+    // if (type == 'UAS') {
+        //         $scope.setShowSelfSellRemindBox(true);
+    // }
+        // } else {
+    // $scope.batch.sellType = 'UAS';
+        // }
+
+    };
+
+    //上架信息展示
+    $scope.relTableParams = new ngTableParams({
+        count : 10,
+        page : 1
+    }, {
+        total : 0,
+        getData : function($defer, params) {
+            var param = BaseService.parseParams(params.url());
+            if($scope.result && $scope.result.batch) {
+                param.batch = $scope.result.batch;
+                ReleaseProductByBatch.getPageBatchRelease(param, function(page) {
+                    $defer.resolve(page.content);
+                    params.total(page.totalElements);
+                    $scope.pageParams.number = page.number;
+                    $scope.pageParams.content = page.content;
+                    $scope.pageParams.totalElements = page.totalElements;
+                    $scope.pageParams.totalPages = page.totalPages;
+                    $scope.pageParams.start = ((page.number - 1) * page.size) + 1;
+                    $scope.pageParams.end =  page.number * page.size;
+                    if($scope.pageParams.end > $scope.pageParams.totalElements) {
+                        $scope.pageParams.end = $scope.pageParams.totalElements
+                    }
+                }, function(data) {
+                    toaster.pop();
+                });
+            }
+        }
+    });
+
+    /**
+     * 打开删除的模态框
+     */
+    $scope.showDelete = function (item) {
+        var modalInstance = $modal.open({
+            animation: true,
+            templateUrl: 'static/view/common/modal/delete_modal.html',
+            controller: 'product_delete_ctrl',
+            resolve: {
+                id : function() {
+                    return item.id;
                 }
             }
-            // if($scope.batch.selfSellEabled) {
-				// $scope.batch.sellType = type;
-				// if (type == 'UAS') {
-            //         $scope.setShowSelfSellRemindBox(true);
-				// }
-            // } else {
-				// $scope.batch.sellType = 'UAS';
-            // }
-
-        };
+        });
+        modalInstance.result.then(function(){
+            if (item.releaseCode == 112){
+                $scope.result.success = $scope.result.success - 1;
+            }else if(item.releaseCode == 113){
+                $scope.result.failure = $scope.result.failure - 1;
+            }
+            //不需要返回的第一页
+            $scope.relTableParams.reload();
+        }, function(){
+        });
+    };
 
-        //上架信息展示
-        $scope.relTableParams = new ngTableParams({
-            count : 10,
-            page : 1
-        }, {
-            total : 0,
-            getData : function($defer, params) {
-                var param = BaseService.parseParams(params.url());
-                if($scope.result && $scope.result.batch) {
-                    param.batch = $scope.result.batch;
-                    ReleaseProductByBatch.getPageBatchRelease(param, function(page) {
-                        $defer.resolve(page.content);
-                        params.total(page.totalElements);
-                        $scope.pageParams.number = page.number;
-                        $scope.pageParams.content = page.content;
-                        $scope.pageParams.totalElements = page.totalElements;
-                        $scope.pageParams.totalPages = page.totalPages;
-                        $scope.pageParams.start = ((page.number - 1) * page.size) + 1;
-                        $scope.pageParams.end =  page.number * page.size;
-                        if($scope.pageParams.end > $scope.pageParams.totalElements) {
-                            $scope.pageParams.end = $scope.pageParams.totalElements
-                        }
-                    }, function(data) {
-                        toaster.pop();
+    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 = '';
+        if($scope.batch.currency === 'RMB') {
+            src = $rootScope.rootPath + "/static/img/product/releaseByBatch-rmb.png";
+        }else {
+            src = $rootScope.rootPath + "/static/img/product/releaseByBatch-usd.png";
+        }
+        var box = $('#image-box');
+        box.find('img').attr('src', src);
+        box.find('a').click(function(){
+            box.hide();
+        });
+        box.dblclick(function(){
+            box.hide();
+        });
+        box.show();
+    };
+
+    //获取登录的信息
+    var getAuthentication = function () {
+        return AuthenticationService.getAuthentication().success(function(data) {
+            if(data && data.enterprises) {
+                data.enterprise = data.enterprises[data.enterprises.length - 1];
+                if(data.enterprises.length > 1) {
+                    var enSelect = [];
+                    angular.forEach(data.enterprises, function(e){
+                        if(e.current)
+                            data.enterprise = e;
+                        else
+                            enSelect.push(e);
                     });
+                    data.enSelect = enSelect;
                 }
             }
+            $rootScope.userInfo = data;
+        }).error(function(response) {
+            toaster.pop('info', '获取定单的信息' + response);
         });
-
-        /**
-         * 打开删除的模态框
-         */
-        $scope.showDelete = function (item) {
-            var modalInstance = $modal.open({
-                animation: true,
-                templateUrl: 'static/view/common/modal/delete_modal.html',
-                controller: 'product_delete_ctrl',
-                resolve: {
-                    id : function() {
-                        return item.id;
-                    }
-                }
-            });
-            modalInstance.result.then(function(){
-                if (item.releaseCode == 112){
-                    $scope.result.success = $scope.result.success - 1;
-                }else if(item.releaseCode == 113){
-                    $scope.result.failure = $scope.result.failure - 1;
-                }
-                //不需要返回的第一页
-                $scope.relTableParams.reload();
-            }, function(){
-            });
-        };
-
-        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 = '';
-            if($scope.batch.currency === 'RMB') {
-                src = $rootScope.rootPath + "/static/img/product/releaseByBatch-rmb.png";
+    };
+
+    //判断是否是商城管理公司,是否可以选择自营。
+    $q.all([getAuthentication()]).then(function() {
+        //获取店铺的信息
+        StoreInfo.getStoreInfoByEnuu({enUU : $rootScope.userInfo.enterprise.uu}, function(data) {
+            $scope.storeInfo = data;
+            if(!data.uuid || data.storeName.indexOf('优软测试二') > -1 || data.storeName.indexOf('优软商城') > -1) {
+                $scope.batch.sellType = 'UAS';
+                $scope.batch.selfSellEabled = false;
             }else {
-                src = $rootScope.rootPath + "/static/img/product/releaseByBatch-usd.png";
+                $scope.batch.sellType = 'self';
+                $scope.batch.selfSellEabled = true;
             }
-            var box = $('#image-box');
-            box.find('img').attr('src', src);
-            box.find('a').click(function(){
-                box.hide();
-            });
-            box.dblclick(function(){
-                box.hide();
-            });
-            box.show();
-        };
-
-        //获取登录的信息
-        var getAuthentication = function () {
-            return AuthenticationService.getAuthentication().success(function(data) {
-                if(data && data.enterprises) {
-                    data.enterprise = data.enterprises[data.enterprises.length - 1];
-                    if(data.enterprises.length > 1) {
-                        var enSelect = [];
-                        angular.forEach(data.enterprises, function(e){
-                            if(e.current)
-                                data.enterprise = e;
-                            else
-                                enSelect.push(e);
-                        });
-                        data.enSelect = enSelect;
-                    }
-                }
-                $rootScope.userInfo = data;
-            }).error(function(response) {
-                toaster.pop('info', '获取定单的信息' + response);
-            });
-        };
-
-        //判断是否是商城管理公司,是否可以选择自营。
-        $q.all([getAuthentication()]).then(function() {
-            //获取店铺的信息
-            StoreInfo.getStoreInfoByEnuu({enUU : $rootScope.userInfo.enterprise.uu}, function(data) {
-                $scope.storeInfo = data;
-                if(!data.uuid || data.storeName.indexOf('优软测试二') > -1 || data.storeName.indexOf('优软商城') > -1) {
-                    $scope.batch.sellType = 'UAS';
-                    $scope.batch.selfSellEabled = false;
-                }else {
-                    $scope.batch.sellType = 'self';
-                    $scope.batch.selfSellEabled = true;
-                }
-            }, function(response) {
-                toaster.pop('error', '获取店铺的信息失败, ' + response.data);
-            });
+        }, function(response) {
+            toaster.pop('error', '获取店铺的信息失败, ' + response.data);
         });
-
-        // 返回店铺的uuid,未开店则返回寄售uuid
-        $q.all([getAuthentication()]).then(function() {
-            //获取店铺的信息
-            StoreInfo.getUuidByEnuu({enUU : $rootScope.userInfo.enterprise.uu}, function(data) {
-                $scope.storeUuid = data.data;
-            }, function(response) {
-                toaster.pop('error', '获取店铺的信息失败, ' + response.data);
-            });
+    });
+
+    // 返回店铺的uuid,未开店则返回寄售uuid
+    $q.all([getAuthentication()]).then(function() {
+        //获取店铺的信息
+        StoreInfo.getUuidByEnuu({enUU : $rootScope.userInfo.enterprise.uu}, function(data) {
+            $scope.storeUuid = data.data;
+        }, function(response) {
+            toaster.pop('error', '获取店铺的信息失败, ' + response.data);
         });
+    });
 
 
-        //选择文件
-        $scope.selectFile = function(value) {
-            if(value != null) {
-                upload_text.value = value;
-            }else {
-                var fileInput = angular.element('#uploadCommodity')[0];
-                upload_text.value = fileInput.value;
-            }
-        };
+    //选择文件
+    $scope.selectFile = function(value) {
+        if(value != null) {
+            upload_text.value = value;
+        }else {
+            var fileInput = angular.element('#uploadCommodity')[0];
+            upload_text.value = fileInput.value;
+        }
+    };
 
 		// 上传Excel批量发布(大量)
 		$scope.upload = function() {
@@ -251,12 +251,22 @@ define([ 'app/app' ], function(app) {
                 var param = {selfSale : $scope.batch.sellType == 'self', currency : $scope.batch.currency, repeatImport : $scope.repeatImport};
 			}
 			var uploadUrl = $rootScope.isPcbStore ? 'release/product/release/excel/pcb' : 'release/product/release/excel';
+			// 上传文件进度条
+			// $scope.uploadProgressText = ''
+      $scope.showCanvas = false
 			$upload.upload({
 				url: uploadUrl,
 				file: file,
 				method: 'POST',
 				params : param
-			}).success(function(data) {
+			}).progress(function(evt) {
+			  clearInterval($scope.AnimationCanvas)
+        $scope.showCanvas = true
+        var progressPercentage = parseInt(100.0 * evt.loaded / evt.total);
+        drawFrame(progressPercentage)
+        // $scope.uploadProgressText = progressPercentage + '%'
+        // console.log('progess:' + progressPercentage + '%' + evt.config.file.name);
+      }).success(function(data) {
 				$scope.selectFile(' ');
 				$scope.batch.myFiles = [];
 				$scope.proInfo = data.info;
@@ -283,178 +293,266 @@ define([ 'app/app' ], function(app) {
 				// if(!message) {
 				// 	message = '没有提交任何信息'
 				// }
-                if ($scope.result.filter && $scope.result.filter > 0) {
-                    toaster.pop('warning', '警告', '存在导入失败产品,可下载导入失败表格查看详情');
-                } else {
-                    toaster.pop('success', '提示', '上传完成');
-                }
+        if ($scope.result.filter && $scope.result.filter > 0) {
+            toaster.pop('warning', '警告', '存在导入失败产品,可下载导入失败表格查看详情');
+        } else {
+            toaster.pop('success', '提示', '上传完成');
+        }
 				$scope.relTableParams.page(1);
 				$scope.relTableParams.reload();
-                if ($rootScope.$$productOn.tab === 'bathOnPerson') {
-                    publicPersonProduct();
-                }
-            }).error(function(response) {
-                $scope.result = {};
-                $scope.result.total = 0;
-                $scope.pageParams.number = 0;
-                $scope.pageParams.content = null;
-                $scope.pageParams.totalElements = 0;
-                $scope.pageParams.totalPages = 0;
-                toaster.pop('error', response.data || response);
+        if ($rootScope.$$productOn.tab === 'bathOnPerson') {
+            publicPersonProduct();
+        }
+        $scope.showCanvas = false
+        }).error(function(response) {
+            $scope.result = {};
+            $scope.result.total = 0;
+            $scope.pageParams.number = 0;
+            $scope.pageParams.content = null;
+            $scope.pageParams.totalElements = 0;
+            $scope.pageParams.totalPages = 0;
+            toaster.pop('error', response.data || response);
+            $scope.showCanvas = false
+        })
+    };
+
+    // 下载模板
+    $scope.download = function() {
+        var show = SessionService.get($scope.userInfo.userUU + "-releasetip");
+        var downloadUrl = $rootScope.isPcbStore ? '/release/product/release/template/pcb' : '/release/product/release/template'
+        if (!show) {
+            var modalInstance = $modal.open({
+                animation: true,
+                templateUrl : $rootScope.rootPath + '/static/view/vendor/modal/releaseProductByBatchTip.html',
+                controller : 'releaseProductByBatchTipCtrl'
             });
-        };
-
-        // 下载模板
-        $scope.download = function() {
-            var show = SessionService.get($scope.userInfo.userUU + "-releasetip");
-            var downloadUrl = $rootScope.isPcbStore ? '/release/product/release/template/pcb' : '/release/product/release/template'
-            if (!show) {
-                var modalInstance = $modal.open({
-                    animation: true,
-                    templateUrl : $rootScope.rootPath + '/static/view/vendor/modal/releaseProductByBatchTip.html',
-                    controller : 'releaseProductByBatchTipCtrl'
-                });
-                modalInstance.result.then(function(response) {
-                }, function(res) {
-                    window.location.href = $rootScope.rootPath + downloadUrl + '?currency=' + $scope.batch.currency + ($rootScope.$$productOn.tab == 'bathOnPerson' ? '&isPerson=1' : '');
-                });
-            } else {
+            modalInstance.result.then(function(response) {
+            }, function(res) {
                 window.location.href = $rootScope.rootPath + downloadUrl + '?currency=' + $scope.batch.currency + ($rootScope.$$productOn.tab == 'bathOnPerson' ? '&isPerson=1' : '');
-            }
-        };
-
-        var afterPublish = function () {
-            $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;
-                    },
-                    success : function () {
-                        return $scope.needShowTip;
-                    },
-                    uuid: function () {
-                        return $scope.storeUuid;
-                    }
-                }
             });
-            $scope.relTableParams.page(1);
-            $scope.relTableParams.reload();
-            $scope.result.success = 0;//设置成0,让前端用户不能点击
-            $scope.hadImport = true; //上架后隐藏提示语
+        } else {
+            window.location.href = $rootScope.rootPath + downloadUrl + '?currency=' + $scope.batch.currency + ($rootScope.$$productOn.tab == 'bathOnPerson' ? '&isPerson=1' : '');
         }
-        //批量发布
-        $scope.publish = function(event) {
-            if ($scope.pageParams.totalElements > 0) {
-                if ($rootScope.isPcbStore) {
-                    ReleaseProductByBatch.batchReleasePcb({batch : $scope.result.batch}, null, function(data) {
-                        afterPublish();
-                    }, function(res) {
-                        toaster.pop("error", "发布失败", res.data);
-                    });
-                } else {
-                    ReleaseProductByBatch.batchRelease({batch : $scope.result.batch}, null, function(data) {
-                        afterPublish();
-                    }, function(res) {
-                        toaster.pop("error", "发布失败", res.data);
-                    });
+    };
+
+    var afterPublish = function () {
+        speed = 100
+        clearInterval($scope.AnimationCanvas)
+        $scope.showCanvas = false
+        $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;
+                },
+                success : function () {
+                    return $scope.needShowTip;
+                },
+                uuid: function () {
+                    return $scope.storeUuid;
                 }
-            } else {
-                event.stopPropagation();//阻止冒泡事件
-                event.preventDefault();//阻止默认的事件。
-                toaster.pop("info", "提示", "没有信息发布");
             }
-        };
+        });
+        $scope.relTableParams.page(1);
+        $scope.relTableParams.reload();
+        $scope.result.success = 0;//设置成0,让前端用户不能点击
+        $scope.hadImport = true; //上架后隐藏提示语
+    }
+    //批量发布
+    $scope.publish = function(event) {
+        if ($scope.pageParams.totalElements > 0) {
+            speed = 1
+            $scope.showCanvas = true
+            $scope.AnimationCanvas = setInterval(function () {
+              if (speed > 100) clearInterval($scope.AnimationCanvas)
+              if (speed >= 98) clearInterval($scope.AnimationCanvas)
+              else {
+                speed += RandomNumber();
+                drawFrame(speed)
+              }
+            }, 30)
+          if ($rootScope.isPcbStore) {
+              ReleaseProductByBatch.batchReleasePcb({batch : $scope.result.batch}, null, function(data) {
+                  afterPublish();
+              }, function(res) {
+                  toaster.pop("error", "发布失败", res.data);
+                  clearInterval($scope.AnimationCanvas)
+                  $scope.showCanvas = false
+              });
+          } else {
+              ReleaseProductByBatch.batchRelease({batch : $scope.result.batch}, null, function(data) {
+                  afterPublish();
+              }, function(res) {
+                  toaster.pop("error", "发布失败", res.data);
+                  clearInterval($scope.AnimationCanvas)
+                  $scope.showCanvas = false
+              });
+          }
+        } else {
+            event.stopPropagation();//阻止冒泡事件
+            event.preventDefault();//阻止默认的事件。
+            toaster.pop("info", "提示", "没有信息发布");
+        }
+    };
 
-        function publicPersonProduct() {
-            ReleaseProductByBatch.batchReleasePerson({batch : $scope.result.batch}, null, function(data) {
-                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;
-                            },
-                            success : function () {
-                                return false;
-                            },
-                            uuid: function () {
-                                return null;
-                            }
-                        }
-                    });
-                    return ;
-                }
-                // toaster.pop("success", "提示", "发布成功 :" + data.data + "条");
-                $scope.personMedol = true;
+    function publicPersonProduct() {
+        ReleaseProductByBatch.batchReleasePerson({batch : $scope.result.batch}, null, function(data) {
+            if ($scope.needShowTip) {
                 $scope.relTableParams.page(1);
                 $scope.relTableParams.reload();
                 //$scope.result.success = 0;//设置成0,让前端用户不能点击
-                /*$scope.hadImport = true; //上架后隐藏提示语*/ // 个人上传不隐藏
-            }, function(res) {
-                toaster.pop("error", "发布失败", res.data);
-            });
-        }
-
-        //下载未匹配成功的数据
-        $scope.downloadExcel = function(){
-            if ($rootScope.$$productOn.tab === 'bathOnPerson') {
-                var datatem = {isAjax : true, batch : $scope.result.batch, isPerson : 1};
-            } else {
-                var datatem = {isAjax : true, batch : $scope.result.batch};
-            }
-            var downloadFailureUrl = $rootScope.isPcbStore ? 'release/product/release/failure/pcb/xls' : 'release/product/release/failure/xls';
-            if($scope.result && $scope.result.batch && $scope.result.filter) {
-                var form = document.getElementById('load-error');
-                form.action= downloadFailureUrl;
-                form.submit();
-                Loading.show();
-                var intervalId = null;
-                var getDownLoadStatus = function () {
-                    $.ajax({
-                        type: 'GET',
-                        url: downloadFailureUrl,
-                        data : datatem,
-                        dataType : 'json',
-                        success: function (data) {
-                            if(!data.load) {
-                                $scope.$apply(function () {
-                                    Loading.hide();
-                                    /*toaster.pop('success', '数据处理完毕,正在下载文件,请稍等。');*/
-                                });
-                                clearInterval(intervalId);
-                            }
+                $modal.open({
+                    animation : true,
+                    templateUrl : 'static/view/common/modal/product_upload_modal.html',
+                    controller : 'rule_tip_ctrl',
+                    resolve : {
+                        type : function() {
+                            return 'upload';
                         },
-                        error: function () {
-                            Loading.hide();
+                        tipModal : function() {
+                            return true;
+                        },
+                        success : function () {
+                            return false;
+                        },
+                        uuid: function () {
+                            return null;
+                        }
+                    }
+                });
+                return ;
+            }
+            // toaster.pop("success", "提示", "发布成功 :" + data.data + "条");
+            $scope.personMedol = true;
+            $scope.relTableParams.page(1);
+            $scope.relTableParams.reload();
+            //$scope.result.success = 0;//设置成0,让前端用户不能点击
+            /*$scope.hadImport = true; //上架后隐藏提示语*/ // 个人上传不隐藏
+        }, function(res) {
+            toaster.pop("error", "发布失败", res.data);
+        });
+    }
+
+    //下载未匹配成功的数据
+    $scope.downloadExcel = function(){
+        if ($rootScope.$$productOn.tab === 'bathOnPerson') {
+            var datatem = {isAjax : true, batch : $scope.result.batch, isPerson : 1};
+        } else {
+            var datatem = {isAjax : true, batch : $scope.result.batch};
+        }
+        var downloadFailureUrl = $rootScope.isPcbStore ? 'release/product/release/failure/pcb/xls' : 'release/product/release/failure/xls';
+        if($scope.result && $scope.result.batch && $scope.result.filter) {
+            var form = document.getElementById('load-error');
+            form.action= downloadFailureUrl;
+            form.submit();
+            Loading.show();
+            var intervalId = null;
+            var getDownLoadStatus = function () {
+                $.ajax({
+                    type: 'GET',
+                    url: downloadFailureUrl,
+                    data : datatem,
+                    dataType : 'json',
+                    success: function (data) {
+                        if(!data.load) {
+                            $scope.$apply(function () {
+                                Loading.hide();
+                                /*toaster.pop('success', '数据处理完毕,正在下载文件,请稍等。');*/
+                            });
                             clearInterval(intervalId);
                         }
-                    });
-                };
-                intervalId= setInterval(function () {
-                    getDownLoadStatus();
-                }, 500);
-            }else {
-                if(!$scope.result || !$scope.result.batch) {
-                    toaster.pop('info', '提示', '您没有上传信息');
-                }else if(!$scope.result.filter) {
-                    toaster.pop('info', '提示', '您没有匹配不成功的数据');
-                }
+                    },
+                    error: function () {
+                        Loading.hide();
+                        clearInterval(intervalId);
+                    }
+                });
+            };
+            intervalId= setInterval(function () {
+                getDownLoadStatus();
+            }, 500);
+        }else {
+            if(!$scope.result || !$scope.result.batch) {
+                toaster.pop('info', '提示', '您没有上传信息');
+            }else if(!$scope.result.filter) {
+                toaster.pop('info', '提示', '您没有匹配不成功的数据');
             }
-        };
+        }
+    };
+
+    var RandomNumber = function() {
+      return Math.random()
+    }
+    /**
+     * 创建canvas环境*/
+    var canvas = document.getElementById('canvas'), // 获取canvas元素
+        context = canvas.getContext('2d'), // 设置画图环境
+        contextX = canvas.width / 2, // 获取canvas中心点X轴坐标
+        contextY = canvas.height / 2,  // 获取canvas中心点Y轴坐标
+        rad = Math.PI * 2 / 100, // //将360度分成100份,那么每一份就是rad度
+        speed = 1, // 当前数值
+        speed_step = 0.3; // 加载速度
+    //绘制5像素宽的运动外圈
+    function blueCircle(n) {
+      context.save(); // 保存状态
+      // context.strokeStyle = '#fff'; //设置描边样式
+      context.beginPath();//路径开始
+      context.lineWidth = 3; //设置线宽
+      context.arc(contextX, contextY, 45, -Math.PI / 2, -Math.PI / 2 + n * rad, false);
+
+      // 渐变色 - 可自定义
+      var linGrad = context.createLinearGradient(
+          contextX-100-3, contextY, contextX+100+3, contextY
+      );
+      linGrad.addColorStop(0.0, '#45b1fc');
+      linGrad.addColorStop(1.0, '#dbdbdb');
+      context.strokeStyle = linGrad;
+      context.lineCap = 'round';
+      // 用于绘制圆弧context.arc(x坐标,y坐标,半径,起始角度,终止角度,顺时针/逆时针)
+      context.stroke();//绘制
+      context.closePath();//路径结束
+      context.restore();// 获取保存的状态
+    }
+    //绘制3像素宽的背景白色外圈
+    function whiteCirecle() {
+      context.save();
+      context.beginPath();
+      context.lineWidth = 3; //设置线宽
+      context.lineCap = "round";
+      // context.strokeStyle = '#dbdbdb';
+      context.strokeStyle = "#dbdbdb"
+      context.arc(contextX, contextY, 45, 0, Math.PI*2, false);
+      context.stroke();
+      context.closePath();
+      context.restore();
+    }
+    function text(n) {
+      context.save();
+      context.fillStyle = '#49b2fb';
+      var font_size = 20;
+      context.font = font_size + 'px Arial';
+      var text_width = context.measureText(n.toFixed(0)+"%").width;
+      context.fillText(n.toFixed(0) + "%", contextX - text_width/2, contextY + font_size / 2);
+      context.restore()
+    }
+
+    function drawFrame(speed) {
+      context.clearRect(0, 0, canvas.width, canvas.height);
+      whiteCirecle()
+      text(speed)
+      blueCircle(speed)
+    }
+    (function drawFrame2(){
+      window.requestAnimationFrame(drawFrame2);
+      if(speed > 100) speed = 0;
+      speed += 0.1;
+      drawFrame(speed)
+    }());
 	}]);
 
 	//批量上架的Ctrl

+ 1 - 1
src/main/webapp/resources/view/admin/modal/auditRegulpicpass_modal.html

@@ -73,7 +73,7 @@
       <div class="col-sm-9">{{item.product.pbranden || item.product.brand || '-'}}</div>
     </div>
     <div class="form-group">
-      <div class="col-sm-3 name">物料名称(类目):</div>
+      <div class="col-sm-3 name">物料名称:</div>
       <div class="col-sm-9">{{item.product.prodName || item.product.kind || '-'}}</div>
     </div>
     <div class="form-group">

+ 1 - 1
src/main/webapp/resources/view/search/search_component.html

@@ -216,7 +216,7 @@
 	<div id="notFound" ng-if="componentDatas.total == 0">
 		<div>很抱歉,我们没有找到相关的产品型号!</div>
 		<div>
-			您可以选择 <a href="product#/home">按物料名称(类目)查找产品</a> 或 <a href="product#/brandList">按品牌查找产品</a>。
+			您可以选择 <a href="product#/home">按物料名称查找产品</a> 或 <a href="product#/brandList">按品牌查找产品</a>。
 		</div>
 	</div>
 </div>

+ 1 - 1
src/main/webapp/resources/view/sso/forstore/ssoCenter.html

@@ -148,7 +148,7 @@
                     <p>
                         <span>用户名:</span>
                         <span ng-bind="userInfo.userName" class="user" title="{{userInfo.userName}}"></span>
-                        <span ng-bind="'|&nbsp;' + (vendor.enName || '个人账户')" class="enName" title="{{vendor.enName}}"></span>
+                        <span ng-bind="'|&nbsp;' + userInfo.enterprise.enName || '个人账户'" class="enName" title="{{userInfo.enterprise.enName}}"></span>
                     </p>
                     <p>
                         <span>邮&nbsp; &nbsp;箱:</span>

+ 7 - 7
src/main/webapp/resources/view/sso/rolePermission.html

@@ -541,19 +541,19 @@
         float: left;
     }
     .user_right .bgimg-1 {
-        background: url(static/img/vendor/authority/role-bg-1.jpg)no-repeat;
+        background: url(static/img/vendor/authority/role-bg-1.png)no-repeat;
     }
     .user_right .bgimg-2 {
-        background: url(static/img/vendor/authority/role-bg-2.jpg)no-repeat;
+        background: url(static/img/vendor/authority/role-bg-2.png)no-repeat;
     }
     .user_right .bgimg-3 {
-        background: url(static/img/vendor/authority/role-bg-3.jpg)no-repeat;
+        background: url(static/img/vendor/authority/role-bg-3.png)no-repeat;
     }
     .user_right .bgimg-4 {
-        background: url(static/img/vendor/authority/role-bg-4.jpg)no-repeat;
+        background: url(static/img/vendor/authority/role-bg-4.png)no-repeat;
     }
     .user_right .bgimg-5 {
-        background: url(static/img/vendor/authority/role-bg-5.jpg)no-repeat;
+        background: url(static/img/vendor/authority/role-bg-5.png)no-repeat;
     }
     /*新增*/
     #account_manager a {
@@ -911,7 +911,7 @@
         <div class="count01 clearfix role-manage" >
             <p>默认角色</p>
             <div class="default-role-area">
-                <div class="{{'default-role-box bgimg-'+ role.color || 1}}" ng-repeat="role in roles.defaults track by role.id" ng-click="editRole(role)">
+                <div class="{{'default-role-box bgimg-'+ ((role.color == 5 ? 4 : role.color) || 1)}}" ng-repeat="role in roles.defaults track by role.id" ng-click="editRole(role)">
                     <p>{{role.desc}}</p>
                     <span>{{role.duty}}</span>
                 </div>
@@ -919,7 +919,7 @@
             <p class="self-header">自定义角色</p>
             <div class="define-role-area">
                 <div class="default-role-area">
-                    <div class="{{'default-role-box bgimg-'+ role.color || 1}}" ng-repeat="role in roles.custom track by role.id" ng-click="editRole(role)">
+                    <div class="{{'default-role-box bgimg-'+ ((role.color == 5 ? 4 : role.color) || 1)}}" ng-repeat="role in roles.custom track by role.id" ng-click="editRole(role)">
                         <p>{{role.desc}}</p>
                         <span>{{role.duty}}</span>
                     </div>

+ 0 - 1034
src/main/webapp/resources/view/sso/ssoApplyBind.html

@@ -1,1034 +0,0 @@
-<style>
-  .count .count01 {
-    display: block;
-  }
-
-  /*account*/
-  .user-role > .role-item {
-    float: left;
-  }
-
-  .user-role > .role-item > .icon {
-    text-align: center;
-    color: #333;
-    padding: 1px 3px;
-    border-radius: 50%;
-    border: 1px solid #333;
-  }
-
-  .user-role > .role-item > .icon.info {
-    color: #56a022;
-    border: 1px solid #56a022;
-  }
-
-  .user-role > .role-item > .icon.warning {
-    color: #8a6d3b;
-    border: 1px solid #8a6d3b;
-  }
-
-  .row-operator > .operator-menu a:hover {
-    color: #fff;
-  }
-
-  .row-operator > .operator-menu {
-    right: 100%;
-    left: inherit;
-  }
-
-  .row-operator2 {
-    position: relative;
-  }
-
-  .row-operator2 > .operator-menu2 {
-    position: absolute;
-    width: 140px;
-    height: 60;
-    line-height: 30px;
-    padding: 0 10px;
-    top: 30;
-    background-color: #333;
-    border-radius: 0 3px 3px 0;
-    opacity: 0;
-    right: 0;
-  }
-
-  .row-operator2 > .operator-menu2 a {
-    color: #fff;
-  }
-
-  .row-operator2 > .operator-menu2 a:hover {
-    color: #56a022;
-  }
-
-  .row-operator2:hover > .operator-menu2 {
-    z-index: 100;
-    height: 60px;
-    opacity: .75;
-    -webkit-transition: all 0s ease-in-out;
-    -moz-transition: all 0s ease-in-out;
-    transition: all 0s ease-in-out;
-  }
-
-  .row-operator2 > .operator-menu3 {
-    position: absolute;
-    width: 125px;
-    height: 60px;
-    line-height: 30px;
-    padding: 0 10px;
-    top: 30px;
-    background-color: #333;
-    border-radius: 0 3px 3px 0;
-    opacity: 0;
-  }
-
-  .row-operator2 > .operator-menu3 a {
-    color: #fff;
-  }
-
-  .row-operator2 > .operator-menu3 a:hover {
-    color: #56a022;
-  }
-
-  .row-operator2:hover > .operator-menu3 {
-    z-index: 100;
-    height: 40px;
-    opacity: .75;
-    -webkit-transition: all 0s ease-in-out;
-    -moz-transition: all 0s ease-in-out;
-    transition: all 0s ease-in-out;
-  }
-
-  .title-div .row-operator2 ul li a {
-    color: #fff;
-  }
-
-  .title-div .row-operator2 ul li a:hover {
-    color: #fff;
-  }
-
-  .title-div .pull-right {
-    float: right;
-    margin-right: 15px;
-    font-weight: normal;
-  }
-
-  .title-div .pull-right a {
-    font-weight: normal;
-    font-size: 14px;
-    color: #5078cb;
-  }
-
-  .member-list.table > tbody > tr {
-    height: 50px;
-  }
-
-  .public-tab.table > thead > tr > th {
-    border-bottom: #e8e8e8 1px solid !important;
-  }
-
-  .member-list.table > tbody > tr > td a {
-    font-size: 14px;
-    color: #5078cb;
-  }
-
-  .member-list.table > tbody > tr > td a:hover {
-    color: #5078cb;
-  }
-
-  .user-list {
-    padding-bottom: 50px;
-  }
-
-  .member-list {
-    margin-bottom: 20px;
-  }
-
-  .user-list .search .form-control {
-    height: 36px;
-    border: #bfbfbf 1px solid;
-    font-size: 14px;
-    margin-left: 5px;
-    margin-top: 10px;
-  }
-
-  .user-list .search .input-group-addon {
-    width: 70px;
-    height: 36px;
-    display: inline-block;
-    background: #5078cb;
-    font-size: 16px;
-    text-align: center;
-    line-height: 36px;
-    color: #fff;
-    padding: 0;
-    border: none;
-    border-radius: 0;
-    position: absolute;
-    top: 0;
-    right: -4px;
-  }
-
-  .user-list-head .row-operator2 a {
-    color: #5078cb;
-  }
-
-  .user-list-head .pull-right {
-    margin-right: 10px;
-  }
-
-  select.input-sm {
-    line-height: inherit;
-  }
-
-  .user-list-head .pull-right .btn-success[disabled] {
-    background: #5078cb;
-    border: none;
-  }
-
-  .user-list-head .pull-right .text-simple {
-    color: #5078cb;
-    font-weight: 500;
-  }
-
-  .user-list-head .row-operator2 ul li {
-    line-height: 30px;
-    padding: 0;
-    margin-top: 0;
-    text-align: center;
-  }
-
-  .user-list-head .row-operator2 ul li a {
-    color: #fff;
-  }
-
-  .user-list-head .row-operator2 ul li a:hover {
-    color: #fff;
-  }
-
-  .count_basic ul li div.fl {
-    width: 90px;
-  }
-
-  .basic_title span.fr button {
-    width: 40px;
-    line-height: 40px;
-    color: #5078cb;
-    text-align: center;
-    display: inline-block;
-    margin-right: 10px;
-    border: none;
-    background: none;
-    font-size: 14px;
-  }
-
-  .count_basic .col-sm-10 .form-control {
-    border-radius: inherit;
-  }
-
-    .role-info .check-act input{
-        display: none;
-    }
-    .role-info .check-act label{
-        width: 12px;
-        height: 12px;
-        display: inline-block;
-        background: url(static/img/icon/check-rule.png) no-repeat;
-        position: relative;
-        top: 1px;
-    }
-    .role-info .check-act label{
-        background-position: -48px 0;
-    }
-    .role-info .check-act input:checked + label{
-        background-position: -31px 0;
-    }
-
-    table.role-info{
-        box-sizing: border-box;
-        border-bottom: none;
-    }
-    table.role-info thead{
-        height: 38px;
-        width: 100%;
-        background: #89aefa;
-        line-height: 38px;
-    }
-    table.role-info thead>tr th{
-        color: #fff;
-        font-weight: normal;
-        font-size: 14px;
-        text-align: center;
-        border-bottom: none;
-        vertical-align: middle;
-    }
-    table.role-info tbody:first-of-type tr:hover {
-        background: #f1f5ff;
-        cursor: default;
-    }
-    table.role-info tbody tr:nth-child(even){
-        background: #f1f5ff;
-    }
-    table.role-info tbody tr {
-        height: 50px;
-        line-height: 50px;
-    }
-    table.role-info tbody tr.role-filter td input,table.role-info tbody tr.role-filter td select {
-        width: 80%;
-        padding-left: 5px;
-        height: 28px;
-        border: 1px solid #d3d4d3;
-        border-radius: 0;
-    }
-    table.role-info tbody tr.role-filter td select {
-        background: url("static/img/vendor/images/xiala.png") no-repeat;
-        background-position: 30px 9px;
-    }
-    table.role-info tbody >tr>td{
-        font-size: 14px;
-        color: #666;
-        border-bottom: 1px solid #dae5fd;
-        border-right: 1px solid #dae5fd;
-        border-left: 1px solid #dae5fd;
-        height: 40px;
-        vertical-align: middle;
-        text-align: center;
-    }
-    table.role-info tbody:last-child >tr>td {
-        border: none;
-    }
-    .auth-info-area {
-        padding: 15px;
-    }
-    .auth-info-area .role-info .role-tag-area {
-        padding: 5px 0 0 13px;
-        text-align: left!important;
-    }
-    .auth-info-area .role-info .role-tag-area .role-tag {
-        color: #fff;
-        width: 25px;
-        height: 25px;
-        display: inline-block;
-        line-height: 25px;
-        border-radius: 2px;
-        text-align: center;
-    }
-    .user_right .bgcolor-1 {
-        background: #89aefa !important;
-    }
-    .user_right .bgcolor-2 {
-        background: #f7b73c !important;
-    }
-    .user_right .bgcolor-3 {
-        background: #01d9ce !important;
-    }
-    .user_right .bgcolor-4 {
-        background: #ff6769 !important;
-    }
-    .user_right .bgcolor-5 {
-        background: #ff8050 !important;
-    }
-    .user_right  .bgcolor-6 {
-        background: #64bfe9 !important;
-    }
-    .user_right .bgcolor-7 {
-        background: #4bc701 !important;
-    }
-    .auth-info-area .role-info .submit-area span {
-        font-size: 12px;
-        display: inline-block;
-        cursor: pointer;
-    }
-    .auth-info-area .role-info .submit-area span:last-child {
-        width: 50px;
-        height: 24px;
-        background: #5078cb;
-        line-height: 24px;
-        color: #fff;
-        margin-left: 5px;
-    }
-    .auth-info-area .role-info tr td.edit-btn-area a, .auth-info-area .role-info tr td.edit-btn-area span{
-        color: #5078cb;
-        cursor: pointer;
-    }
-    .auth-info-header {
-        height: 40px;
-        line-height: 40px;
-        background: #f5f8fe;
-        margin-top: 7px;
-        padding-right: 24px;
-    }
-    .auth-info-header >div {
-        display: inline-block;
-        float: right;
-    }
-    .auth-info-header .addUser-group {
-        position: relative;
-    }
-    .auth-info-header .addUser-group .addUser-btn {
-        cursor: pointer;
-    }
-    .auth-info-header .addUser-group .addUser-btn img {
-        position: relative;
-        top: -4px;
-        margin-right: 2px;
-    }
-    .auth-info-header .addUser-group .addUser-btn span {
-        font-size: 12px;
-    }
-    .auth-info-header .addUser-group .addUser-expand {
-        position: absolute;
-        right: -24px;
-        height: 54px;
-        width: 121px;
-        box-shadow: 1.5px 2.598px 7px 0px rgb( 0, 0, 0 );
-        background: #fff;
-    }
-    .auth-info-header .addUser-group .addUser-expand >div {
-        height: 27px;
-        line-height: 27px;
-        font-size: 12px;
-        cursor: pointer;
-        margin-left: 5px;
-    }
-    .auth-info-header .addUser-group .addUser-expand >div:hover {
-        color: #5a7fce;
-    }
-    .auth-info-header .addUser-group .addUser-expand >div i {
-        color: #dfe0e1;
-        font-size: 14px;
-    }
-    .auth-info-header .addUser-group .addUser-expand >div:hover i {
-        color: #5a7fce;
-    }
-    .auth-info-header .searchUser-group {
-        margin-right: 50px;
-        margin-top: 4px;
-        height: 32px;
-        line-height: 32px;
-    }
-    .auth-info-header .searchUser-group span {
-        width: 58px;
-        height: 32px;
-        display: inline-block;
-        line-height: 32px;
-        text-align: center;
-        background: #5078cb;
-        color: #fff;
-        font-size: 14px;
-        float: right;
-        cursor: pointer;
-    }
-    .auth-info-header .searchUser-group input {
-        width: 330px;
-        height: 32px;
-        line-height: 32px;
-        float: right;
-        padding-left: 5px;
-    }
-    .auth-info-header .searchUser-group >div {
-        background: #fff;
-        display: inline-block;
-        height: 30px;
-        margin-right: 5px;
-        vertical-align: middle;
-    }
-    .auth-info-header .searchUser-group >div >select {
-        width: 90px;
-        height: 32px;
-        font-size: 14px;
-        padding-left: 5px;
-        position: relative;
-        top: -3px;
-        border: 1px solid #5078cb;
-        background: url(static/img/vendor/images/xiala-blue.jpg) no-repeat;
-        background-position: 72px 11px;
-    }
-    .auth-info-area ul {
-        width: auto;
-        margin: 0 0 20px 0;
-    }
-    .auth-info-area ul li {
-        width: auto;
-        height: auto;
-        line-height: inherit;
-        margin: 0;
-        border-bottom: none;
-        font-size: 12px;
-    }
-    .auth-info-area ul li a {
-        width: auto;
-        float: left;
-    }
-    .auth-info-area .record-line {
-        margin-right: 22px;
-    }
-    .role-manage {
-        padding: 0 14px;
-    }
-    .role-manage p {
-        font-size: 14px;
-        font-weight: bold;
-    }
-    .role-manage >p {
-        margin: 20px 9px;
-    }
-    .role-manage >p.self-header {
-        margin-top: 30px;
-    }
-    .role-manage .default-role-area {
-        padding: 0 9px 10px 9px;
-        border-bottom: 2px solid #fde7bd;
-    }
-    .role-manage .default-role-box {
-        width: 190px;
-        height: 114px;
-        display: inline-block;
-        background: #89aefa;
-        color: #fff;
-        padding: 12px 10px;
-        vertical-align: middle;
-        margin-right: 50px;
-        margin-bottom: 20px;
-        border-radius: 3px;
-        cursor: pointer;
-    }
-    .role-manage .default-role-box p {
-        text-align: center;
-        margin-bottom: 10px;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
-    }
-    .role-manage .default-role-box span {
-        font-size: 12px;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: pre-wrap;
-        word-break: normal;
-        height: 55px;
-        width: 100%;
-        display: block;
-    }
-    .role-manage .define-role-area {
-        margin-bottom: 28px;
-    }
-    .role-manage .define-role-area .add-role-box {
-        background: #f4fff9;
-        color: #4aca80;
-        border: 2px dashed #4aca80;
-    }
-    .role-manage .define-role-area .add-role-box i {
-        font-size: 40px;
-        color: #fff;
-        background: #4aca80;
-        border-radius: 100%;
-        display: inline-block;
-        width: 40px;
-        height: 40px;
-        line-height: 37px;
-        text-align: center;
-        position: relative;
-        top: -20px;
-        left: -5px;
-    }
-    .role-manage .define-role-area .add-role-box >div {
-        display: inline-block;
-        width: 121px;
-    }
-    .auth-info-area .role-info .role-tag-area.detail-role-tag .role-tag {
-        margin-right: 5px;
-        margin-bottom: 5px;
-        float: left;
-    }
-    .user_right .bgimg-1 {
-        background: url(static/img/vendor/authority/role-bg-1.jpg)no-repeat;
-    }
-    .user_right .bgimg-2 {
-        background: url(static/img/vendor/authority/role-bg-2.jpg)no-repeat;
-    }
-    .user_right .bgimg-3 {
-        background: url(static/img/vendor/authority/role-bg-3.jpg)no-repeat;
-    }
-    .user_right .bgimg-4 {
-        background: url(static/img/vendor/authority/role-bg-4.jpg)no-repeat;
-    }
-    .user_right .bgimg-5 {
-        background: url(static/img/vendor/authority/role-bg-5.jpg)no-repeat;
-    }
-    /*新增*/
-    #account_manager a {
-      text-decoration: none;
-    }
-
-  #account_manager a:hover {
-    text-decoration: none;
-  }
-  li .fi {
-    float: left;
-  }
-  li .fr {
-    width: 89%;
-    color: #666;
-  }
-  .rt_menu{
-    border-bottom: #e8e8e8 1px solid;
-    background: #ecf2fd;
-  }
-  .rt_menu span{
-    margin-left: 30px;
-    color: #666;
-    font-size: 14px;
-  }
-  .count01 .count-content{
-    width: 100%;
-    background: #fff;
-  }
-  .count01 .count-content ul{
-    width: 94%;
-  }
-  .count01 .count-content ul li{
-    border-bottom: none;
-  }
-  .count-content ul li div.fl{
-    width: 90px;
-  }
-  .rt_menu span.fr button{
-    width: 40px;
-    line-height: 40px;
-    color: #5078cb;
-    text-align: center;
-    display: inline-block;
-    margin-right: 10px;
-    border: none;
-    background: none;
-    font-size: 14px;
-  }
-  .count-content .col-sm-10 .form-control{
-    border-radius: inherit;
-    margin-top: 12px;
-  }
-  .count01 ul li span h5 img {
-    margin-top: 20px;
-    margin-left: 0;
-  }
-  .count01 ul li span h5 img.ok-icon {
-    margin-top: 25px;
-  }
-  .count01 ul li span>span {
-    color: #666;
-    margin-left: 0;
-  }
-  .count01 > ul li >a {
-    background: #fff;
-    color: #5078cb;
-    text-align: center;
-    height: 30px;
-    line-height: 30px;
-    padding: 0 7px;
-    margin-top: 16px;
-    margin-right: 7px;
-  }
-  .count01 ul li >a.mall-btn-default {
-    background: #5078cb;
-    color: #fff;
-  }
-  .count01 ul li.safe-level>span >span {
-    display: inline-block;
-    height: 14px;
-    line-height: 14px;
-    background: rgb(255, 90, 0);
-    color: #fff;
-    margin-right: 1px;
-    width: 64px;
-    margin-left: 0px;
-    font-size: 12px;
-    text-align: center;
-    position: relative;
-    bottom: 1px;
-  }
-  .count01 ul li.safe-level>span >span:nth-child(3) {
-    background: rgb(255,171,44);
-  }
-  .count01 ul li.safe-level>span>i {
-    margin-left: 13px;
-    color: #666;
-  }
-  .count01 ul li.safe-level .last-login {
-    float: right;
-    font-size: 12px;
-    color: #666;
-    margin-right: 7px;
-  }
-  .count01 ul li span font {
-    font-size: 14px;
-    color: #333;
-    letter-spacing: 0;
-    margin-right: 0;
-  }
-  .count01 ul li span h5 {
-    width: 30px;
-  }
-  .count01 ul li.safe-level .safe-remind {
-    float: right;
-    margin-right: 87px;
-  }
-  .count01 ul li.safe-level .safe-remind a {
-    color: #ff0000;
-    float: none !important;
-  }
-  .rt_menu span.last-login {
-    font-size: 12px;
-    margin: 0 22px 0 0;
-    font-weight: normal;
-  }
-  .rt_menu span.last-login span {
-    font-size: 12px;
-    font-weight: normal;
-    margin: 0;
-  }
-  .count01 ul li.active-safe-box {
-    background: #fef2f2;
-    border: 1px solid #faaebe;
-  }
-  .bind-enter-tab {
-    width: 999px;
-    margin: 15px auto 5px;
-  }
-  .bind-enter-tab thead {
-    background: #8eb0f5;
-    color: #fff;
-    height: 38px;
-    line-height: 38px;
-  }
-  .bind-enter-tab th {
-    font-size: 14px;
-    font-weight: normal;
-  }
-  .bind-enter-tab tbody .default-row {
-    height: 50px;
-    line-height: 50px;
-    color: #666;
-    background: #fff;
-    text-align: center;
-    border: 1px solid #e8efff;
-    border-top: none;
-  }
-  .bind-enter-tab tbody .default-row:nth-child(even) {
-    background: #f1f5ff;
-  }
-  .bind-enter-tab tbody .default-row:hover {
-    background: #f1f5ff;
-  }
-  .bind-enter-tab tbody .default-row td {
-    font-size: 14px;
-    border-right: 1px solid #e8efff;
-  }
-  .bind-enter-tab tbody .default-row td:last-child {
-    border-right: none;
-  }
-  .bind-enter-tab .operate-btn {
-    color: #5078cb;
-  }
-  .bind-en {
-    background: #fff;
-    padding-top: 7px;
-  }
-  .bind-en .pull-right {
-    margin-right: 18px;
-    position: relative;
-    line-height: 39px;
-  }
-  .bind-en .pull-right .form-control {
-    width: 388px;
-    height: 32px;
-    display: inline-block;
-    border-radius: 0;
-    padding: 0 68px 0 10px;
-    position: absolute;
-    right: 0;
-    top: 4px;
-  }
-  .bind-en .pull-right button {
-    width: 58px;
-    height: 32px;
-    background: #5078cb;
-    color: #fff;
-    border-radius: 0;
-    position: absolute;
-    right: 0;
-    top: 4px;
-  }
-  .bind-enter-tab .grey {
-    height: 156px;
-    text-align: center;
-    border: 1px solid #e8efff;
-    font-size: 14px;
-  }
-  .bind-enter-tab .grey img {
-    margin-right: 15px;
-  }
-  .white {
-    background-color: white;
-  }
-  .com_tab ul li{
-    margin-left: 0px;
-    position: relative;
-  }
-  .com_tab ul li.active a{
-    border-bottom: #fff;
-    background: #5078cb;
-    color: #fff;
-  }
-  .com_tab ul li::after{
-    background: url('static/img/vendor/images/downicon.png');
-    width: 11px;
-    height: 6px;
-    position: absolute;
-    bottom: 0px;
-    left: 50%;
-    content: ' ';
-    margin-left: -5px;
-    display: none;
-  }
-  .com_tab ul li.active:after{
-    display: block
-  }
-</style>
-
-<style>
-  .count_basic .choose-body {
-    display: table;
-    width: 33.333333%;
-    margin-top: 10px;
-    padding: 10px;
-    table-layout: fixed;
-    border-collapse: separate;
-    border: 1px solid #ccc;
-    position: relative;
-    background: #fff;
-    z-index: 1000;
-    padding-right: 2px;
-    float:left;
-  }
-
-  .count_basic .choose-body>.choose-item {
-    display: table-cell;
-  }
-
-  .count_basic .choose-body>.choose-item>ul {
-    height: 200px;
-    overflow-x: hidden;
-    overflow-y: scroll;
-    width:100%;
-    margin:0;
-  }
-
-  .count_basic .choose-body>.choose-item>ul>li {
-    line-height: 30px;
-    position: relative;
-    margin:0;
-  }
-
-  .count_basic .choose-body>.choose-item>ul>li.active a {
-    color: #3c7cf5;
-    background: #e8f0ff;
-  }
-
-   .count_basic .choose-body>.choose-item>ul>li>a {
-      display: block;
-      color: #666666;
-      margin:0;
-       width:100%;
-       text-align:left;
-       overflow:hidden;
-       background: #fff;
-    }
-
-  .count_basic .choose-body>.choose-item .caret {
-    float: right;
-    margin-top: 14px;
-    margin-right: 8px;
-    border-left: 3px solid;
-    border-right: none;
-    border-top: 3px solid transparent;
-    border-bottom: 3px solid transparent;
-  }
-
-  .count_basic .area-bg{
-    background: url("static/img/all/dot.png") no-repeat 732px center;
-  }
-  .count_basic .area-list{
-    position: absolute;
-    top: 26px;
-    left: 15px;
-    width: 756px;
-  }
-
-  .count_basic .business_scope{
-    padding-bottom:10px;
-  }
-  .count_basic .business_scope ul{
-    width:100%;
-    margin:0;
-    margin-left:-10px;
-  }
-  .count_basic .business_scope ul li{
-    position:relative;
-    width:auto;
-    padding:0 10px;
-    margin:0 10px;
-    float:none;
-    background: #5078cb;
-    border-radius:5px;
-    text-align: center;
-    line-height: 25px;
-  }
-  .count_basic .business_scope ul li span{
-    color:#fff;
-  }
-  .count_basic .business_scope ul li i{
-    position:absolute;
-    right:-10px;
-    top:-10px;
-    cursor:pointer;
-    display:inline-block;
-    width:20px;
-    height:20px;
-    line-height: 20px;
-    font-size: 16px;
-    text-align: center;
-    color:red;
-    border-radius:50%;
-    background: #eee;
-  }
-</style>
-<!--右侧主体部分-->
-<div class="count user_right fr" ng-click="hideList()">
-      <!--申请绑定-->
-    <div class="rt_menu"><span>绑定审核</span></div>
-    <div class="clearfix bind-en">
-          <div class="rt_menu">
-              <span class="pull-right"><input type="text" ng-model="searchParams.keyword" class="form-control" placeholder="用户名/UU账号/手机号"/><button class="btn" ng-click="searchApply()">搜索</button> </span></span>
-          </div>
-        <table class="bind-enter-tab" ng-table="applyToEnterpriseTableParams">
-          <thead>
-          <tr>
-            <th>用户名</th>
-            <th>UU账号</th>
-            <th>手机号</th>
-            <th>邮箱</th>
-            <th>操作</th>
-          </tr>
-          </thead>
-          <tbody>
-          <tr class="default-row" ng-repeat="item in content">
-            <td class="user-name" ng-bind="item.user.vipName || '-'"></td>
-            <td ng-bind="item.user.userUU || '-'"></td>
-            <td ng-bind="item.user.mobile || '-'"></td>
-            <td ng-bind="item.user.email || '-'"></td>
-            <td>
-              <a class="operate-btn" ng-click="auditApply(1, item.id, item.user.userUU)">同意</a>
-              <a class="operate-btn" ng-click="auditApply(0, item.id, item.user.userUU)">|&nbsp;拒绝</a>
-            </td>
-          </tr>
-          <tr class="num" ng-if="content && content.length > 0">
-            <td colspan="5">
-              <span class="last-login pull-right">显示<span ng-bind="page.size * (page.number - 1) + 1"></span>-<span ng-bind="page.size * (page.number - 1) + page.numberOfElements"></span>条,共<span ng-bind="page.totalElements"></span>条</span>
-            </td>
-          </tr>
-          <tr ng-if="!content || !content.length">
-            <td colspan="5" class="grey white">
-              <img src="static/img/all/empty-cart.png">暂无申请信息
-            </td>
-          </tr>
-          </tbody>
-        </table>
-      </div>
-</div>
-<style>
-  .com-del-box {
-    position: fixed;
-    z-index: 2;
-    height: 152px;
-    opacity: 1;
-    background-color: white;
-    width: 310px;
-    -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
-    box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
-    margin: -155px 0 0 -75px;
-    top: 55%;
-    left: 50%;
-  }
-
-  .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 {
-    width: 100%;
-    text-align: center;
-    margin: 0 auto;
-  }
-
-  .com-del-box .content p {
-    line-height: 50px;
-    font-size: 14px;
-    padding-top: 10px;
-    padding-bottom: 10px;
-  }
-
-  .com-del-box .content p i {
-    color: #5078cb;
-    font-size: 16px;
-    margin-right: 10px;
-  }
-
-  .com-del-box .content div {
-    width: 100%;
-    text-align: center;
-    margin: 0 auto;
-  }
-
-  .com-del-box .content div a {
-    width: 55px;
-    height: 26px;
-    line-height: 26px;
-    display: inline-block;
-    text-align: center;
-    font-size: 14px;
-  }
-
-  .com-del-box .content div a:first-child {
-    background: #b4b5b9;
-    color: #333;
-    margin-right: 10px;
-  }
-
-  .com-del-box .content div a:last-child {
-    background: #5078cb;
-    color: #fff;
-  }
-
-  .com-del-box .content div a:hover {
-    background: #3f7ae3;
-    color: #fff;
-  }
-</style>
-<div class="com-del-box" style="display: none;">
-  <div class="title">
-    <a @click="delFlag=false"><i class="fa fa-close fa-lg"></i></a>
-  </div>
-  <div class="content">
-    <p><i class="fa fa-exclamation-circle"></i>是否删除此地址</p>
-    <div><a ng-click="">取消</a><a ng-click="">确认</a></div>
-  </div>
-</div>

+ 46 - 2
src/main/webapp/resources/view/sso/staffManagement.html

@@ -908,9 +908,14 @@
 <!--右侧主体部分-->
 <div class="count user_right fr" ng-click="hideList()">
     <div class="count_center">
-        <div class="rt_menu"><span>您的安全服务</span></div>
+        <div class="com_tab">
+            <ul class="fl">
+                <li ng-class="{'active': tab=='auth'}"><a ng-click="checkTab('auth')">员工管理</a></li>
+                <li ng-class="{'active': tab=='bind'}" ng-if="isAdmin"><a ng-click="checkTab('bind')">申请绑定</a></li>
+            </ul>
+        </div>
         <!-- 人员信息 -->
-        <div class="count01 clearfix">
+        <div class="count01 clearfix" ng-if="tab=='auth'">
             <!--<div class="power_title">员工账号及权限管理</div>-->
             <div class="auth-info-header">
                 <div class="addUser-group">
@@ -1050,6 +1055,45 @@
                 </div>
             </div>
         </div>
+        <!-- 申请绑定 -->
+        <div class="clearfix bind-en" ng-if="tab=='bind'">
+            <div class="rt_menu">
+                <span class="pull-right"><input type="text" ng-model="searchParams.keyword" class="form-control" placeholder="用户名/UU账号/手机号"/><button class="btn" ng-click="searchApply()">搜索</button> </span></span>
+            </div>
+            <table class="bind-enter-tab" ng-table="applyToEnterpriseTableParams">
+                <thead>
+                <tr>
+                    <th>用户名</th>
+                    <th>UU账号</th>
+                    <th>手机号</th>
+                    <th>邮箱</th>
+                    <th>操作</th>
+                </tr>
+                </thead>
+                <tbody>
+                <tr class="default-row" ng-repeat="item in content">
+                    <td class="user-name" ng-bind="item.user.vipName || '-'"></td>
+                    <td ng-bind="item.user.userUU || '-'"></td>
+                    <td ng-bind="item.user.mobile || '-'"></td>
+                    <td ng-bind="item.user.email || '-'"></td>
+                    <td>
+                        <a class="operate-btn" ng-click="auditApply(1, item.id, item.user.userUU)">同意</a>
+                        <a class="operate-btn" ng-click="auditApply(0, item.id, item.user.userUU)">|&nbsp;拒绝</a>
+                    </td>
+                </tr>
+                <tr class="num" ng-if="content && content.length > 0">
+                    <td colspan="5">
+                        <span class="last-login pull-right">显示<span ng-bind="page.size * (page.number - 1) + 1"></span>-<span ng-bind="page.size * (page.number - 1) + page.numberOfElements"></span>条,共<span ng-bind="page.totalElements"></span>条</span>
+                    </td>
+                </tr>
+                <tr ng-if="!content || !content.length">
+                    <td colspan="5" class="grey white">
+                        <img src="static/img/all/empty-cart.png">暂无申请信息
+                    </td>
+                </tr>
+                </tbody>
+            </table>
+        </div>
       </div>
     </div>
 </div>

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

@@ -663,7 +663,7 @@
                     <div class="row-wrap il-content">
                         <div class="il-box-large il-box">
                             <div title="{{seek.inbrand}}"  style="width: 100%"  class="fl item size-middle"><span>品牌:</span><div class="content" style="width:135px">{{seek.inbrand || '-'}}</div></div>
-                            <div title="{{seek.prodTitle | nullStrFilter}}" style="width: 100%"  class="fl bottom item size-middle"><span>物料名称(类目):</span><div class="content" style="width:135px">{{(seek.prodTitle || '-') | nullStrFilter}}</div></div>
+                            <div title="{{seek.prodTitle | nullStrFilter}}" style="width: 100%"  class="fl bottom item size-middle"><span>物料名称:</span><div class="content" style="width:135px">{{(seek.prodTitle || '-') | nullStrFilter}}</div></div>
                         </div>
                     </div>
                 </td>

+ 73 - 64
src/main/webapp/resources/view/usercenter/forstore/order_pay.html

@@ -617,63 +617,6 @@
 				<span>4,评论</span>
 			</div>
 		</div>
-		<div class="adress_list">
-			<div class="pay_com"><span>确认收货地址</span></div>
-			<ul id="address" class="clearfix address" ng-if="sendAddress.length != 0" ng-class="{'inital' : !expand}">
-				<li class="clearfix" ng-repeat="address in sendAddress" ng-click="selectAdd(address)" ng-class="{'active' : payment.address.id == address.id}">
-					<!--<h4 ng-bind="address.company"></h4>-->
-					<p class="">{{address.area}}, {{address.detailAddress}}</p>
-					<span class="adderss-name">{{address.tel}} &nbsp;&nbsp;{{address.name}}(收)<a ng-if="order.status == 501" href="javascript:void(0)" ng-click="addShippingAddress(address, $index)"><i class="fa fa-pencil-square-o" aria-hidden="true"></i>&nbsp;编辑</a></span>
-					<em ng-if="address.num ==1">默认地址</em>
-				</li>
-			</ul>
-			<div class="f14 notice margin-top-20 margin-bottom-10 text-center" ng-if="sendAddress.length == 0">您还没有添加收货地址信息,请先新增收货地址信息</div>
-			<div class="pay_add">
-				<a class="add_adr fl" ng-click="addShippingAddress()" ng-if="order.status == 501 && sendAddress.length < 20"><i class="fa fa-plus-square" aria-hidden="true"></i>&nbsp;新增地址</a>
-				<a class="add_adr fr" ng-click="toggleAddress()" ng-if="sendAddress.length/3 > 1"><b ng-if="expand">隐藏地址</b><b ng-if="!expand">显示地址</b></a>
-			</div>
-		</div>
-		<!--发票订单详情-->
-		<div class="pay_oder_xq">
-			<div class="pay_com">
-				<span>发票信息详情
-					<!--<a ng-click="modifyInvoice(bill)" ng-if="order.invoicetype!='1207'&&order.status == 501"><i class="fa fa-plus-square" aria-hidden="true"></i>&nbsp;<em ng-if="!bill.name">新增发票</em><em ng-if="bill.name">修改发票</em></a>-->
-					<span ng-click="modifyInvoice(bill)" ng-if="order.invoicetype!='1207'&&order.status == 501"><i class="fa fa-plus-square" aria-hidden="true"></i>&nbsp;<button ng-if="!bill.name">新增发票</button><button ng-if="bill.name">修改发票</button></span>
-				</span>
-			</div>
-			<p class="bill-radio" ng-if="order.status == '501'">
-				<span  ng-click="selectBill('1207')">
-					<input type="radio"  name="bill" ng-checked="order.invoicetype == '1207'"/>
-					<label></label><em>暂不开票</em>
-				</span>
-				<span  ng-click="selectBill('1206')" ng-hide="storeArray.length == 1 && hideNormal">
-					<input type="radio"  name="bill" ng-checked="order.invoicetype == '1206'"/>
-					<label></label><em>增值税普通发票</em>
-				</span>
-				<span ng-click="selectBill('1205')">
-					<input type="radio"  name="bill" ng-checked="order.invoicetype == '1205'"/>
-					<label></label><em>增值税专用发票</em>
-				</span>
-				<b ng-if="order.invoicetype == '1206' && hideNormal">因存在部分寄售产品,寄售产品默认仅提供增值税专票</b>
-			</p>
-			<div class="pay_oder_xq_list no-need-bill f14" ng-if="order.invoicetype=='1207'">
-			</div>
-			<div class="pay_oder_xq_list no-need-bill notice" ng-if="order.invoicetype!='1207' && !bill.name">
-				还没有对应的发票信息,请新增相应的发票信息
-			</div>
-			<div class="pay_oder_xq_list" ng-if="order.invoicetype&&order.invoicetype != '1207'&&bill.name">
-				<p><em>发票类型:</em><span ng-bind="order.invoicetype | billTypeFilter "></span></p>
-				<p><em>发票抬头:</em><span ng-bind="bill.head || '空'"></span></p>
-				<p ng-if="order.invoicetype == '1205'"><em>单位地址:</em><span ng-bind="bill.companyAddress || '空'"></span></p>
-				<p ng-if="order.invoicetype == '1205'"><em>单位电话:</em><span ng-bind="bill.companyPhone || '空'"></span></p>
-				<p ng-if="order.invoicetype == '1205'"><em>税务登记号:</em><span ng-bind="bill.companyTaxNumber || '空'"></span></p>
-				<p ng-if="order.invoicetype == '1205'"><em>开户银行:</em><span ng-bind="bill.bankName || '空'"></span></p>
-				<p ng-if="order.invoicetype == '1205'"><em>开户银行账户:</em><span ng-bind="bill.bankAccount || '空'"></span></p>
-				<p><em>收票人:</em><span ng-bind="bill.name || '空'"></span></p>
-				<p><em>联系电话:</em><span ng-bind="bill.telephone || '空'"></span></p>
-				<p><em>详细地址:</em><span>{{bill.area}}, {{bill.detailAddress}}</span></p>
-			</div>
-		</div>
 		<!--确认订单信息-->
 		<div class="sure_oder">
 			<div class="pay_com"><span style="border-bottom: none">确认订单信息</span></div>
@@ -921,8 +864,74 @@
 							<!--</span>-->
 						<!--</div>-->
 					</div>
+
+				</dl>
+			</div>
+		</div>
+		<!-- 确认收货地址 -->
+		<div class="adress_list">
+			<div class="pay_com"><span>确认收货地址</span></div>
+			<ul id="address" class="clearfix address" ng-if="sendAddress.length != 0" ng-class="{'inital' : !expand}">
+				<li class="clearfix" ng-repeat="address in sendAddress" ng-click="selectAdd(address)" ng-class="{'active' : payment.address.id == address.id}">
+					<!--<h4 ng-bind="address.company"></h4>-->
+					<p class="">{{address.area}}, {{address.detailAddress}}</p>
+					<span class="adderss-name">{{address.tel}} &nbsp;&nbsp;{{address.name}}(收)<a ng-if="order.status == 501" href="javascript:void(0)" ng-click="addShippingAddress(address, $index)"><i class="fa fa-pencil-square-o" aria-hidden="true"></i>&nbsp;编辑</a></span>
+					<em ng-if="address.num ==1">默认地址</em>
+				</li>
+			</ul>
+			<div class="f14 notice margin-top-20 margin-bottom-10 text-center" ng-if="sendAddress.length == 0">您还没有添加收货地址信息,请先新增收货地址信息</div>
+			<div class="pay_add">
+				<a class="add_adr fl" ng-click="addShippingAddress()" ng-if="order.status == 501 && sendAddress.length < 20"><i class="fa fa-plus-square" aria-hidden="true"></i>&nbsp;新增地址</a>
+				<a class="add_adr fr" ng-click="toggleAddress()" ng-if="sendAddress.length/3 > 1"><b ng-if="expand">隐藏地址</b><b ng-if="!expand">显示地址</b></a>
+			</div>
+		</div>
+		<!--发票订单详情-->
+		<div class="pay_oder_xq">
+			<div class="pay_com">
+				<span>发票信息详情
+					<!--<a ng-click="modifyInvoice(bill)" ng-if="order.invoicetype!='1207'&&order.status == 501"><i class="fa fa-plus-square" aria-hidden="true"></i>&nbsp;<em ng-if="!bill.name">新增发票</em><em ng-if="bill.name">修改发票</em></a>-->
+					<span ng-click="modifyInvoice(bill)" ng-if="order.invoicetype!='1207'&&order.status == 501"><i class="fa fa-plus-square" aria-hidden="true"></i>&nbsp;<button ng-if="!bill.name">新增发票</button><button ng-if="bill.name">修改发票</button></span>
+				</span>
+			</div>
+			<p class="bill-radio" ng-if="order.status == '501'">
+				<span  ng-click="selectBill('1207')">
+					<input type="radio"  name="bill" ng-checked="order.invoicetype == '1207'"/>
+					<label></label><em>暂不开票</em>
+				</span>
+				<span  ng-click="selectBill('1206')" ng-hide="storeArray.length == 1 && hideNormal">
+					<input type="radio"  name="bill" ng-checked="order.invoicetype == '1206'"/>
+					<label></label><em>增值税普通发票</em>
+				</span>
+				<span ng-click="selectBill('1205')">
+					<input type="radio"  name="bill" ng-checked="order.invoicetype == '1205'"/>
+					<label></label><em>增值税专用发票</em>
+				</span>
+				<b ng-if="order.invoicetype == '1206' && hideNormal">因存在部分寄售产品,寄售产品默认仅提供增值税专票</b>
+			</p>
+			<div class="pay_oder_xq_list no-need-bill f14" ng-if="order.invoicetype=='1207'">
+			</div>
+			<div class="pay_oder_xq_list no-need-bill notice" ng-if="order.invoicetype!='1207' && !bill.name">
+				还没有对应的发票信息,请新增相应的发票信息
+			</div>
+			<div class="pay_oder_xq_list" ng-if="order.invoicetype&&order.invoicetype != '1207'&&bill.name">
+				<p><em>发票类型:</em><span ng-bind="order.invoicetype | billTypeFilter "></span></p>
+				<p><em>发票抬头:</em><span ng-bind="bill.head || '空'"></span></p>
+				<p ng-if="order.invoicetype == '1205'"><em>单位地址:</em><span ng-bind="bill.companyAddress || '空'"></span></p>
+				<p ng-if="order.invoicetype == '1205'"><em>单位电话:</em><span ng-bind="bill.companyPhone || '空'"></span></p>
+				<p ng-if="order.invoicetype == '1205'"><em>税务登记号:</em><span ng-bind="bill.companyTaxNumber || '空'"></span></p>
+				<p ng-if="order.invoicetype == '1205'"><em>开户银行:</em><span ng-bind="bill.bankName || '空'"></span></p>
+				<p ng-if="order.invoicetype == '1205'"><em>开户银行账户:</em><span ng-bind="bill.bankAccount || '空'"></span></p>
+				<p><em>收票人:</em><span ng-bind="bill.name || '空'"></span></p>
+				<p><em>联系电话:</em><span ng-bind="bill.telephone || '空'"></span></p>
+				<p><em>详细地址:</em><span>{{bill.area}}, {{bill.detailAddress}}</span></p>
+			</div>
+		</div>
+		<!-- 付款金额 -->
+		<div class="sure_oder" style="margin-top: 10px">
+			<div class="oder_xq_list">
+				<dl>
 					<dd class="pay_price">
-						<div>
+						<div style="background: rgba(0,0,0,0)">
 							<h4>总计:
 								<em ng-bind="order.ensurePrice | formateNumber : 2 | currencySysmbol : order.currency.substring(0,3) "></em>
 
@@ -953,12 +962,12 @@
 							<input type="hidden" name="sign" value={{ysepayRequest.sign}}>
 						</form>
 						<p>
-							<span class="style01" style="width: 220px; margin-left: 610px;">付款方式:
-								<select class="select" ng-model="order.paytype">
-									<option value="1102">在线支付</option>
-									<option value="1103">线下支付</option>
-								</select>
-							</span>
+									<span class="style01" style="width: 220px; margin-left: 610px;">付款方式:
+										<select class="select" ng-model="order.paytype">
+											<option value="1102">在线支付</option>
+											<option value="1103">线下支付</option>
+										</select>
+									</span>
 							<a ng-click="confirmPay()">提交订单</a></p>
 						<p class="bulb-remind"><img src="static/img/user/bulb.png" alt="">若价格变动,请在订单提交后联系卖家改价</p>
 					</dd>

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

@@ -944,7 +944,7 @@
                     </ul>
                 </div>
                 <div class="form-block">
-                    <span><i>*</i>物料名称(类目)</span>
+                    <span><i>*</i>物料名称</span>
                     <input type="text" class="form-group" ng-model="applyObj.prodTitle" ng-class="{'error': !validObj.prodTitle}" ng-change="onProdTitleInput()" ng-blur="checkProdTitle()">
                 </div>
                 <div class="form-block">
@@ -1081,7 +1081,7 @@
                     <div class="row-wrap il-content">
                         <div class="il-box-large il-box">
                             <div title="{{seek.inbrand}}" class="fl item size-middle"><span>品牌:</span><div class="content">{{seek.inbrand || '-'}}</div></div>
-                            <div title="{{seek.prodTitle | nullStrFilter}}" class="fl bottom item size-middle"><span>物料名称(类目):</span><div class="content">{{(seek.prodTitle || '-') | nullStrFilter}}</div></div>
+                            <div title="{{seek.prodTitle | nullStrFilter}}" class="fl bottom item size-middle"><span>物料名称:</span><div class="content">{{(seek.prodTitle || '-') | nullStrFilter}}</div></div>
                         </div>
                     </div>
                 </td>

+ 2 - 2
src/main/webapp/resources/view/vendor/forstore/erp/vendor_material_erp.html

@@ -1789,7 +1789,7 @@
 									</a>
 								</div>
 							</th>
-							<th width="140">产品名称(类目)</th>
+							<th width="140">物料名称</th>
 							<th width="180">产品型号</th>
 							<th width="130">品牌</th>
 							<th width="100">单位</th>
@@ -2319,7 +2319,7 @@
 						<thead>
 						<tr>
 							<th width="60">序号</th>
-							<th width="120">产品名称(类目)</th>
+							<th width="120">物料名称</th>
 							<th width="120">品牌</th>
 							<th width="100">型号</th>
 							<!--<th width="100">封装</th>-->

+ 2 - 2
src/main/webapp/resources/view/vendor/forstore/erp/vendor_material_person_erp.html

@@ -1821,7 +1821,7 @@
 								</label>
 							</th>
 							<th width="80">序号</th>
-							<th width="180">产品名称(类目)</th>
+							<th width="180">物料名称</th>
 							<th width="200">产品型号</th>
 							<th width="150">品牌</th>
 							<!--<th width="100">单位</th>-->
@@ -2345,7 +2345,7 @@
 						<thead>
 						<tr>
 							<th width="60">序号</th>
-							<th width="120">产品名称(类目)</th>
+							<th width="120">物料名称</th>
 							<th width="120">品牌</th>
 							<th width="100">型号</th>
 							<th width="100">封装</th>

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

@@ -180,7 +180,7 @@
   <div class="seek-purchase-content">
     <div class="search-check">
       <div class="search fl">
-        <input type="text" class="form-control ng-pristine ng-untouched ng-valid" ng-model="keyWord" placeholder="请输入您要搜索的物料名称(类目)">
+        <input type="text" class="form-control ng-pristine ng-untouched ng-valid" ng-model="keyWord" placeholder="请输入您要搜索的物料名称">
         <button ng-click="onSearch()">搜索</button>
       </div>
       <div class="check fr">
@@ -193,7 +193,7 @@
           <th width="80" class="onCheckBoxClick" ng-click="onCheckBoxClick()">
             <input ng-checked="checkBoxAll" type="checkbox" class="checkbox">{{checkBoxAll ? '取消全选': '全选'}}</th>
           <th width="80">序号</th>
-          <th width="556">物料名称(类目)</th>
+          <th width="556">物料名称</th>
           <th width="310">操作</th>
         </tr>
       </thead>

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

@@ -708,7 +708,7 @@
                     <div class="row-wrap il-content">
                         <div class="il-box-large il-box">
                             <div title="{{seek.inbrand}}" style="width: 100%" class="fl item size-middle"><span>品牌:</span><div class="content" style="width:135px">{{seek.inbrand || '-'}}</div></div>
-                            <div title="{{seek.prodTitle | nullStrFilter}}" style="width: 100%" class="fl item bottom size-middle"><span>物料名称(类目):</span><div class="content" style="width:135px">{{(seek.prodTitle || '-') | nullStrFilter}}</div></div>
+                            <div title="{{seek.prodTitle | nullStrFilter}}" style="width: 100%" class="fl item bottom size-middle"><span>物料名称:</span><div class="content" style="width:135px">{{(seek.prodTitle || '-') | nullStrFilter}}</div></div>
                         </div>
                     </div>
                 </td>

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

@@ -874,7 +874,7 @@
                         <div class="row-wrap il-content">
                             <div class="il-box-large il-box">
                                 <div title="{{seek.inbrand}}" style="width: 100%" class="fl item size-middle"><span>品牌:</span><div class="content" style="width:134px">{{seek.inbrand || '-'}}</div></div>
-                                <div title="{{seek.prodTitle | nullStrFilter}}" style="width: 100%" class="fl item size-middle bottom"><span>物料名称(类目):</span><div class="content" style="width:134px">{{(seek.prodTitle || '-') | nullStrFilter}}</div></div>
+                                <div title="{{seek.prodTitle | nullStrFilter}}" style="width: 100%" class="fl item size-middle bottom"><span>物料名称:</span><div class="content" style="width:134px">{{(seek.prodTitle || '-') | nullStrFilter}}</div></div>
                             </div>
                         </div>
                     </td>
@@ -971,7 +971,7 @@
                 </div>
                 <div class="content-line">
                     <div class="form-item form-left text-line">
-                        <span>物料名称(类目):</span><span class="text" ng-bind="inquiryItem.prodTitle || '-'" title="{{inquiryItem.prodTitle || '-'}}"></span>
+                        <span>物料名称:</span><span class="text" ng-bind="inquiryItem.prodTitle || '-'" title="{{inquiryItem.prodTitle || '-'}}"></span>
                     </div>
                 </div>
                 <div class="content-line">

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

@@ -2048,7 +2048,7 @@
 							</label>
 						</th>
 						<th width="120">品牌</th>
-						<th width="130">物料名称(类目)</th>
+						<th width="130">物料名称</th>
 						<th width="150">型号</th>
 						<th width="100">规格</th>
 						<th width="100">规格书</th>
@@ -2621,7 +2621,7 @@
 						<thead>
 						<tr>
 							<th width="60">序号</th>
-							<th width="120">物料名称(类目)</th>
+							<th width="120">物料名称</th>
 							<th width="120">品牌</th>
 							<th width="100">型号</th>
 							<!--<th width="100">封装</th>-->

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

@@ -1862,7 +1862,7 @@
 					<tr>
 						<th width="80">序号</th>
 						<th width="150">品牌</th>
-						<th width="180">物料名称(类目)</th>
+						<th width="180">物料名称</th>
 						<th width="190">型号</th>
 						<!--<th width="100">单位</th>-->
 						<th width="60">规格</th>
@@ -2407,7 +2407,7 @@
 						<thead>
 						<tr>
 							<th width="60">序号</th>
-							<th width="120">物料名称(类目)</th>
+							<th width="120">物料名称</th>
 							<th width="120">品牌</th>
 							<th width="100">型号</th>
 							<th width="100">封装</th>

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

@@ -1149,8 +1149,8 @@
                             <div class="fr wid135">
                                 <p ng-if="!commodity.uuid">品牌: <em ng-bind="commodity.brandNameEn" title="{{commodity.brandNameEn}}">NXP</em></a></p>
                                 <p ng-if="commodity.uuid" name="brand-a"><a href="product/brand/{{commodity.branduuid}}" style="margin: 0; color: #333;" target="_blank">品牌: <em ng-bind="commodity.brandNameEn" title="{{commodity.brandNameEn}}">NXP</em></a></p>
-                                <p ng-if="!commodity.uuid">物料名称(类目): <em ng-bind="commodity.kindNameCn || '-'" title="{{commodity.kindNameCn}}"></em></a></p>
-                                <p ng-if="commodity.uuid" name="kind-a"><a href="product/kind/{{commodity.kindUuid}}" style="margin: 0; color: #333;" target="_blank">物料名称(类目): <em ng-bind="commodity.kindNameCn || '-'" title="{{commodity.kindNameCn}}"></em></a></p>
+                                <p ng-if="!commodity.uuid">物料名称: <em ng-bind="commodity.kindNameCn || '-'" title="{{commodity.kindNameCn}}"></em></a></p>
+                                <p ng-if="commodity.uuid" name="kind-a"><a href="product/kind/{{commodity.kindUuid}}" style="margin: 0; color: #333;" target="_blank">物料名称: <em ng-bind="commodity.kindNameCn || '-'" title="{{commodity.kindNameCn}}"></em></a></p>
                                 <p>型号: <em class="href" ng-bind="commodity.code" title="{{commodity.code}}"  ng-click="goToBatchDetail($event, commodity)">LPC1112</em></p>
                                 <p>规格: <em ng-bind="commodity.spec  || '-'" title="{{commodity.spec}}">LPC1112</em></p>
                                 <!--<div class="margin0">-->
@@ -1283,7 +1283,7 @@
                                             <input style="border-radius: 3px;border: 1px solid #a9a9a9;height: 24px;line-height: 24px;width: 107px" type="text" ng-model="commodity.spec" maxlength="50" style="width:106px"/>
                                         </p>
                                         <!--<p>品牌: <em ng-bind="commodity.brandNameEn" title="{{commodity.brandNameEn}}">NXP</em></p>-->
-                                        <!--<p>物料名称(类目): <em ng-bind="commodity.kindNameCn || '-'" title="{{commodity.kindNameCn}}"></em></p>-->
+                                        <!--<p>物料名称: <em ng-bind="commodity.kindNameCn || '-'" title="{{commodity.kindNameCn}}"></em></p>-->
                                         <!--<p>型号: <em ng-bind="commodity.code" title="{{commodity.code}}">LPC1112</em></p>-->
                                         <!--<p>规格: <em ng-bind="commodity.spec || '-'" title="{{commodity.spec}}">LPC1112</em></p>-->
                                         <!--<p>-->

+ 40 - 2
src/main/webapp/resources/view/vendor/forstore/vendor_upload.html

@@ -646,7 +646,7 @@
                                     </td>
                                     <td style="padding-left: 10px;">
                                         <div class="text-more">品牌:&nbsp;<em title="{{batchCommodity.b2cBranden || '空'}}" ng-bind="batchCommodity.b2cBranden || '空'"></em></div>
-                                        <div class="text-more">物料名称(类目):&nbsp;<em title="{{batchCommodity.kindName || '空'}}" ng-bind="batchCommodity.kindName || '空'"></em></div>
+                                        <div class="text-more">物料名称:&nbsp;<em title="{{batchCommodity.kindName || '空'}}" ng-bind="batchCommodity.kindName || '空'"></em></div>
                                         <div class="text-more">型号:&nbsp;<em title="{{batchCommodity.b2cCode || '空'}}" ng-bind="batchCommodity.b2cCode || '空'"></em></div>
                                         <div class="text-more">规格:&nbsp;<em title="{{batchCommodity.spec || '空'}}" ng-bind="batchCommodity.spec || '空'"></em></div>
                                     </td>
@@ -776,4 +776,42 @@
             <div class="img"><img src=""></div>
         </div>
     </div>
-</div>
+</div>
+
+<!-- 弹窗进度条加载 -->
+<div class="FixedCanvas" ng-show="showCanvas">
+    <div class="fix">
+        <canvas id="canvas" width="100" height="100"></canvas>
+        <div class="infoTEXT">上传中,请不要离开....</div>
+    </div>
+</div>
+
+<style>
+    .FixedCanvas {
+        position: fixed;
+        left: 0;
+        top: 0;
+        z-index: 111;
+        width: 100%;
+        height: 100%;
+        /*background: rgba(0, 0, 0, 0.3);*/
+        text-align: center;
+        /*transition: all 0.3s;*/
+    }
+    .FixedCanvas .fix {
+        position: absolute;
+        top: 50%;
+        left: 50%;
+        margin-left: -50px;
+        margin-top: -60px;
+    }
+    #canvas {
+        margin: 0 auto;
+        margin-top: 5%;
+    }
+    .infoTEXT {
+        font-size: 18px;
+        color: #333;
+        margin-top: 10px;
+    }
+</style>

+ 2 - 2
src/main/webapp/resources/view/vendor/modal/edit_regul_modal.html

@@ -307,12 +307,12 @@
           </div>
           </div>
           <div class="pull-left clearboth">
-            <div class="name pull-left"><em style="color: #f01414">*</em>物料名称(类目):</div>
+            <div class="name pull-left"><em style="color: #f01414">*</em>物料名称:</div>
             <div class="pull-left" style="position: relative;">
               <div ng-show="IsLookOrUpdate === 'update'">
                 <!-- 可编辑状态 -->
                 <input type="text"
-                       placeholder="请输入物料名称(类目)"
+                       placeholder="请输入物料名称"
                        style="width: 165px;height: 28px;border-radius: 2px;color: #333"
                        ng-model="kind"
                        class="form-control" maxlength="20"/>