Browse Source

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

liusw 8 years ago
parent
commit
6bbb953c5b
31 changed files with 4936 additions and 73 deletions
  1. 43 0
      src/main/java/com/uas/platform/b2c/core/filter/SimpleCORSFilter.java
  2. 40 0
      src/main/java/com/uas/platform/b2c/prod/product/brand/api/VendorListController.java
  3. 40 0
      src/main/java/com/uas/platform/b2c/prod/product/brand/controller/VendorListController.java
  4. 164 0
      src/main/java/com/uas/platform/b2c/prod/product/brand/controller/VendorListSubmitController.java
  5. 48 0
      src/main/java/com/uas/platform/b2c/prod/product/brand/dao/VendorListDao.java
  6. 36 0
      src/main/java/com/uas/platform/b2c/prod/product/brand/dao/VendorListSubmitDao.java
  7. 263 0
      src/main/java/com/uas/platform/b2c/prod/product/brand/modal/VendorList.java
  8. 362 0
      src/main/java/com/uas/platform/b2c/prod/product/brand/modal/VendorListSubmit.java
  9. 28 0
      src/main/java/com/uas/platform/b2c/prod/product/brand/service/VendorListService.java
  10. 75 0
      src/main/java/com/uas/platform/b2c/prod/product/brand/service/VendorListSubmitService.java
  11. 157 0
      src/main/java/com/uas/platform/b2c/prod/product/brand/service/impl/VendorListServiceImpl.java
  12. 490 0
      src/main/java/com/uas/platform/b2c/prod/product/brand/service/impl/VendorListSubmitServiceImpl.java
  13. BIN
      src/main/resources/jxls-tpl/product/brand-vendor.xls
  14. 3 0
      src/main/webapp/WEB-INF/views/normal/admin.html
  15. 6 2
      src/main/webapp/WEB-INF/views/normal/adminWithNav.html
  16. BIN
      src/main/webapp/resources/img/all/border_line.png
  17. 41 42
      src/main/webapp/resources/js/admin/app.js
  18. 153 0
      src/main/webapp/resources/js/admin/controllers/SupplierSubmitDetailCtrl.js
  19. 60 0
      src/main/webapp/resources/js/admin/controllers/SupplierSubmitListCtrl.js
  20. 53 13
      src/main/webapp/resources/js/admin/controllers/help/HelpDetailCtrl.js
  21. 37 7
      src/main/webapp/resources/js/admin/controllers/help/HelpEditCtrl.js
  22. 319 0
      src/main/webapp/resources/js/admin/controllers/supplierMaintenanceCtrl.js
  23. 1 1
      src/main/webapp/resources/js/common/directives.js
  24. 10 0
      src/main/webapp/resources/js/common/query/help.js
  25. 83 0
      src/main/webapp/resources/js/common/query/supplier.js
  26. 833 0
      src/main/webapp/resources/view/admin/brand_add.html
  27. 43 5
      src/main/webapp/resources/view/admin/brand_maintenance.html
  28. 8 3
      src/main/webapp/resources/view/admin/brand_maintenance_detail.html
  29. 899 0
      src/main/webapp/resources/view/admin/supplier_maintenance.html
  30. 573 0
      src/main/webapp/resources/view/admin/supplier_submit_detail.html
  31. 68 0
      src/main/webapp/resources/view/admin/supplier_submit_list.html

+ 43 - 0
src/main/java/com/uas/platform/b2c/core/filter/SimpleCORSFilter.java

@@ -0,0 +1,43 @@
+package com.uas.platform.b2c.core.filter;
+
+
+import java.io.IOException;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * CORS 跨域请求过滤器,实现允许跨域
+ * @author suntg
+ * @since 2018年3月15日17:51:32
+ */
+public class SimpleCORSFilter implements Filter {
+
+    @Override
+    public void init(FilterConfig filterConfig) throws ServletException {
+
+    }
+
+    @Override
+    public void doFilter(ServletRequest request, ServletResponse response,
+                         FilterChain chain) throws IOException, ServletException {
+        HttpServletResponse res = (HttpServletResponse) response;
+        res.setHeader("Access-Control-Allow-Origin", "*");
+        res.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE, PUT");
+        res.setHeader("Access-Control-Allow-Headers", "Content-Type");
+        res.setHeader("Access-Control-Allow-Credentials", "true");
+        res.setHeader("Access-Control-Allow-Headers", "x-requested-with");
+        chain.doFilter(request, res);
+    }
+
+    @Override
+    public void destroy() {
+
+    }
+
+}

+ 40 - 0
src/main/java/com/uas/platform/b2c/prod/product/brand/api/VendorListController.java

@@ -0,0 +1,40 @@
+package com.uas.platform.b2c.prod.product.brand.api;
+
+import com.uas.platform.b2c.prod.product.brand.modal.VendorList;
+import com.uas.platform.b2c.prod.product.brand.service.VendorListService;
+import com.uas.platform.core.model.PageInfo;
+import com.uas.platform.core.model.PageParams;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * Created by wangyc on 2017/11/27.
+ *
+ * @version 2017/11/27 17:38 wangyc
+ */
+@RestController("api.VendorListController")
+@RequestMapping("api/produce/vendorlist")
+public class VendorListController {
+
+    private final VendorListService vendorListService;
+
+    @Autowired
+    public VendorListController(VendorListService vendorListService) {
+        this.vendorListService = vendorListService;
+    }
+
+    /**
+     * 通过品牌uuid获取供应商列表
+     * @param uuid
+     * @return
+     */
+    @RequestMapping(value = "/{uuid}", method = RequestMethod.GET)
+    public Page<VendorList> findByBrand(@PathVariable("uuid") String uuid, PageParams params) {
+        PageInfo pageInfo = new PageInfo(params);
+        return vendorListService.findByBrandAPI(pageInfo, uuid);
+    }
+}

+ 40 - 0
src/main/java/com/uas/platform/b2c/prod/product/brand/controller/VendorListController.java

@@ -0,0 +1,40 @@
+package com.uas.platform.b2c.prod.product.brand.controller;
+
+import com.uas.platform.b2c.prod.product.brand.modal.VendorList;
+import com.uas.platform.b2c.prod.product.brand.service.VendorListService;
+import com.uas.platform.core.model.PageInfo;
+import com.uas.platform.core.model.PageParams;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * Created by wangyc on 2017/11/27.
+ *
+ * @version 2017/11/27 17:38 wangyc
+ */
+@RestController
+@RequestMapping("produce/vendorlist")
+public class VendorListController {
+
+    private final VendorListService vendorListService;
+
+    @Autowired
+    public VendorListController(VendorListService vendorListService) {
+        this.vendorListService = vendorListService;
+    }
+
+    /**
+     * 通过品牌uuid获取供应商列表
+     * @param uuid
+     * @return
+     */
+    @RequestMapping(value = "/{uuid}", method = RequestMethod.GET)
+    public Page<VendorList> findByBrand(@PathVariable("uuid") String uuid, PageParams params) {
+        PageInfo pageInfo = new PageInfo(params);
+        return vendorListService.findByBrand(pageInfo, uuid);
+    }
+}

+ 164 - 0
src/main/java/com/uas/platform/b2c/prod/product/brand/controller/VendorListSubmitController.java

@@ -0,0 +1,164 @@
+package com.uas.platform.b2c.prod.product.brand.controller;
+
+import com.uas.platform.b2c.common.base.model.FileUpload;
+import com.uas.platform.b2c.core.support.log.UsageBufferedLogger;
+import com.uas.platform.b2c.core.support.view.JxlsExcelView;
+import com.uas.platform.b2c.prod.product.brand.modal.VendorListSubmit;
+import com.uas.platform.b2c.prod.product.brand.service.VendorListSubmitService;
+import com.uas.platform.core.exception.IllegalOperatorException;
+import com.uas.platform.core.logging.BufferedLoggerManager;
+import com.uas.platform.core.model.PageInfo;
+import com.uas.platform.core.model.PageParams;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by wangyc on 2017/11/27.
+ *
+ * @version 2017/11/27 10:35 wangyc
+ */
+@RestController
+@RequestMapping("/produce/vendorSubmit")
+public class VendorListSubmitController {
+
+    private final VendorListSubmitService vendorListSubmitService;
+
+    private static final UsageBufferedLogger logger = BufferedLoggerManager.getLogger(UsageBufferedLogger.class);
+
+    @Autowired
+    public VendorListSubmitController(VendorListSubmitService vendorListSubmitService) {
+        this.vendorListSubmitService = vendorListSubmitService;
+    }
+
+    /**
+     * 获取供应商申请
+     * @param id
+     * @return
+     */
+    @RequestMapping(value = "/{id}", method = RequestMethod.GET)
+    public VendorListSubmit getOne(@PathVariable("id") Long id) {
+        return vendorListSubmitService.findOne(id);
+    }
+
+    /**
+     * 新增供应商申请
+     * @param vendorListSubmit
+     * @return
+     */
+    @RequestMapping(method = RequestMethod.POST)
+    public VendorListSubmit save(@RequestBody VendorListSubmit vendorListSubmit) {
+        logger.log("品牌-供应商申请", "新增品牌供应商申请", "供应商名称:" + vendorListSubmit.getVendorName());
+        return vendorListSubmitService.save(vendorListSubmit);
+    }
+
+    /**
+     * 删除供应商申请
+     * @param id 供应商id
+     * @return
+     */
+    @RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
+    public VendorListSubmit delete(@PathVariable("id") Long id) {
+        logger.log("品牌-供应商申请", "删除品牌供应商申请", "供应商id:" + id);
+        return vendorListSubmitService.delete(id);
+    }
+
+    /**
+     * 更新供应商申请
+     * @param vendorListSubmit
+     * @return
+     */
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public VendorListSubmit update(@RequestBody VendorListSubmit vendorListSubmit) {
+        logger.log("品牌-供应商申请", "更新品牌供应商申请", "供应商名称:" + vendorListSubmit.getVendorName());
+        return vendorListSubmitService.update(vendorListSubmit);
+    }
+
+    /**
+     * 审核通过申请
+     * @param vendorListSubmit
+     * @return
+     */
+    @RequestMapping(value = "/audit", method = RequestMethod.POST)
+    public VendorListSubmit audit(@RequestBody VendorListSubmit vendorListSubmit) {
+        logger.log("品牌-供应商申请", "审核通过品牌供应商申请", "供应商名称:" + vendorListSubmit.getVendorName());
+        return vendorListSubmitService.audit(vendorListSubmit);
+    }
+
+    /**
+     * 审核不通过申请
+     * @param id
+     * @return
+     */
+    @RequestMapping(value = "/unaudit/{id}", method = RequestMethod.POST)
+    public VendorListSubmit unaudit(@PathVariable Long id) {
+        logger.log("品牌-供应商申请", "审核不通过品牌供应商申请", "供应商id:" + id);
+        return vendorListSubmitService.unaudit(id);
+    }
+
+    /**
+     * 获取批量导入供应商模板
+     *
+     * @return model and view
+     */
+    @RequestMapping(value = "/template", method = RequestMethod.GET)
+    public ModelAndView downloadTemplate() {
+        ModelAndView modelAndView = new ModelAndView();
+        modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/product/brand-vendor", "优软商城品牌供应商上传模板"));
+
+        logger.log("品牌-供应商申请", "下载批量导入供应商模板");
+        return modelAndView;
+    }
+
+    /**
+     * 批量导入供应商申请
+     * @param uploadItem
+     * @return
+     */
+    @RequestMapping(value = "/upload", method = RequestMethod.POST)
+    public List<VendorListSubmit> uploadVendorList(FileUpload uploadItem) {
+        logger.log("品牌-供应商申请", "批量导入供应商");
+        String fileName = uploadItem.getFile().getOriginalFilename();
+        String suffix = fileName.substring(fileName.lastIndexOf(".") + 1);
+        InputStream is = null;
+        Workbook workbook = null;
+        List<VendorListSubmit> vendorListSubmits = new ArrayList<VendorListSubmit>();
+
+        try {
+            is = uploadItem.getFile().getInputStream();
+            if ("xls".equals(suffix)) {
+                workbook = new HSSFWorkbook(is);
+            } else if ("xlsx".equals(suffix)) {
+                workbook = new XSSFWorkbook(is);
+            } else {
+                throw new IllegalOperatorException("文件格不正确,请上传.xls或.xlsx的文件");
+            }
+            vendorListSubmits = vendorListSubmitService.upload(workbook);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return vendorListSubmits;
+    }
+
+    /**
+     * 分页获取品牌供应商申请
+     * @param params
+     * @param keywords
+     * @param status
+     * @return
+     */
+    @RequestMapping(value = "/page", method = RequestMethod.GET)
+    public Page<VendorListSubmit> getPageInfo(PageParams params, String keywords, Integer status) {
+        PageInfo pageInfo = new PageInfo(params);
+        return vendorListSubmitService.findByPage(pageInfo, keywords, status);
+    }
+}

+ 48 - 0
src/main/java/com/uas/platform/b2c/prod/product/brand/dao/VendorListDao.java

@@ -0,0 +1,48 @@
+package com.uas.platform.b2c.prod.product.brand.dao;
+
+import com.uas.platform.b2c.prod.product.brand.modal.VendorList;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * Created by wangyc on 2017/11/27.
+ *
+ * @version 2017/11/27 11:12 wangyc
+ */
+@Repository
+public interface VendorListDao extends JpaSpecificationExecutor<VendorList>, JpaRepository<VendorList, Long>{
+
+    /**
+     * 通过品牌uuid获取品牌供应商信息
+     * @param uuid
+     * @return
+     */
+    List<VendorList> findByBranduuid(String uuid);
+
+    /**
+     * 通过品牌uuid和供应商名称获取品牌供应商信息
+     * @param uuid
+     * @param vendorName
+     * @return
+     */
+    List<VendorList> findByBranduuidAndVendorName(String uuid, String vendorName);
+
+    /**
+     * 通过品牌uuid和供应商营业执照号获取品牌供应商信息
+     * @param uuid
+     * @param license
+     * @return
+     */
+    List<VendorList> findByBranduuidAndLicense(String uuid, String license);
+
+    /**
+     * 通过品牌uuid和店铺id获取品牌供应商信息
+     * @param branduuid
+     * @param storeuuid
+     * @return
+     */
+    VendorList findByBranduuidAndStoreuuid(String branduuid, String storeuuid);
+}

+ 36 - 0
src/main/java/com/uas/platform/b2c/prod/product/brand/dao/VendorListSubmitDao.java

@@ -0,0 +1,36 @@
+package com.uas.platform.b2c.prod.product.brand.dao;
+
+import com.uas.platform.b2c.prod.product.brand.modal.VendorListSubmit;
+import java.util.List;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.query.Param;
+import org.springframework.stereotype.Repository;
+
+/**
+ * Created by wangyc on 2017/11/27.
+ *
+ * @version 2017/11/27 11:32 wangyc
+ */
+@Repository
+public interface VendorListSubmitDao extends JpaSpecificationExecutor<VendorListSubmit>, JpaRepository<VendorListSubmit, Long> {
+
+    /**
+     * 根据供应商id和申请状态获取申请信息
+     * @param vendorId
+     * @param status
+     * @return
+     */
+    List<VendorListSubmit> findByVendoridAndStatus(Long vendorId, Integer status);
+
+    /**
+     * 根据品牌uuid和申请状态获取新增供应商申请信息
+     * @param branduuid 品牌uuid
+     * @param status 状态
+     * @return
+     */
+    @Query("select v from VendorListSubmit v where v.vendorid is null and v.branduuid =:branduuid and v.status =:status")
+    List<VendorListSubmit> findByBranduuidAndStatusAndVendoridIsNull(@Param("branduuid") String branduuid, @Param("status") Integer status);
+
+}

+ 263 - 0
src/main/java/com/uas/platform/b2c/prod/product/brand/modal/VendorList.java

@@ -0,0 +1,263 @@
+package com.uas.platform.b2c.prod.product.brand.modal;
+
+import com.uas.platform.b2c.prod.store.model.StoreIn;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 品牌-供应商
+ * Created by wangyc on 2017/11/13.
+ *
+ * @version 2017/11/13 17:06 wangyc
+ */
+@Entity
+@Table(name = "product$vendorlist")
+public class VendorList implements Serializable {
+
+    private static final long serialVersionUID = 4427517228899698468L;
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "vl_id")
+    private Long id;
+
+    /**
+     * 供应商名称
+     */
+    @Column(name = "vl_vendorname")
+    private String vendorName;
+
+    /**
+     * 供应商图片
+     */
+    @Column(name = "vl_img")
+    private String img;
+
+    /**
+     * 营业执照号
+     */
+    @Column(name = "vl_license")
+    private String license;
+
+    /**
+     * 供应商地区(以“,”分割,省市县)
+     */
+    @Column(name = "vl_area")
+    private String area;
+
+    /**
+     * 供应商详细地址
+     */
+    @Column(name = "vl_detailaddress")
+    private String detailAddress;
+
+    /**
+     * 供应商电话
+     */
+    @Column(name = "vl_tel")
+    private String tel;
+
+    /**
+     * 传真
+     */
+    @Column(name = "vl_fax")
+    private String fax;
+
+    /**
+     * 供应商网址
+     */
+    @Column(name = "vl_website")
+    private String website;
+
+    /**
+     * 对应商城店铺uuid
+     */
+    @Column(name = "vl_storeuuid")
+    private String storeuuid;
+
+    /**
+     * 店铺信息
+     */
+    @Transient
+    private StoreIn storeIn;
+
+    /**
+     * 供应商邮箱
+     */
+    @Column(name = "vl_email")
+    private String email;
+
+    /**
+     * 更新时间
+     */
+    @Column(name = "vl_updatetime")
+    private Date updatetime;
+
+    /**
+     * 品牌uuid
+     */
+    @Column(name = "vl_branduuid")
+    private String branduuid;
+
+    /**
+     * 是否申请中
+     * 1,是
+     * 0,否
+     */
+    @Column(name = "vl_issubmited")
+    private Short isSubmited;
+
+    /**
+     * 申请时间
+     */
+    @Column(name = "vl_submitTime")
+    private Date submitTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getVendorName() {
+        return vendorName;
+    }
+
+    public void setVendorName(String vendorName) {
+        this.vendorName = vendorName;
+    }
+
+    public String getImg() {
+        return img;
+    }
+
+    public void setImg(String img) {
+        this.img = img;
+    }
+
+    public String getLicense() {
+        return license;
+    }
+
+    public void setLicense(String license) {
+        this.license = license;
+    }
+
+    public String getArea() {
+        return area;
+    }
+
+    public void setArea(String area) {
+        this.area = area;
+    }
+
+    public String getDetailAddress() {
+        return detailAddress;
+    }
+
+    public void setDetailAddress(String detailAddress) {
+        this.detailAddress = detailAddress;
+    }
+
+    public String getTel() {
+        return tel;
+    }
+
+    public void setTel(String tel) {
+        this.tel = tel;
+    }
+
+    public String getFax() {
+        return fax;
+    }
+
+    public void setFax(String fax) {
+        this.fax = fax;
+    }
+
+    public String getWebsite() {
+        return website;
+    }
+
+    public void setWebsite(String website) {
+        this.website = website;
+    }
+
+    public String getStoreuuid() {
+        return storeuuid;
+    }
+
+    public void setStoreuuid(String storeuuid) {
+        this.storeuuid = storeuuid;
+    }
+
+    public StoreIn getStoreIn() {
+        return storeIn;
+    }
+
+    public void setStoreIn(StoreIn storeIn) {
+        this.storeIn = storeIn;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public Date getUpdatetime() {
+        return updatetime;
+    }
+
+    public void setUpdatetime(Date updatetime) {
+        this.updatetime = updatetime;
+    }
+
+    public String getBranduuid() {
+        return branduuid;
+    }
+
+    public void setBranduuid(String branduuid) {
+        this.branduuid = branduuid;
+    }
+
+    public Short getIsSubmited() {
+        return isSubmited;
+    }
+
+    public void setIsSubmited(Short isSubmited) {
+        this.isSubmited = isSubmited;
+    }
+
+    public Date getSubmitTime() {
+        return submitTime;
+    }
+
+    public void setSubmitTime(Date submitTime) {
+        this.submitTime = submitTime;
+    }
+
+    public VendorList() {
+    }
+
+    public VendorList(VendorListSubmit vendorListSubmit) {
+        this.area = vendorListSubmit.getArea();
+        this.branduuid = vendorListSubmit.getBranduuid();
+        this.detailAddress = vendorListSubmit.getDetailAddress();
+        this.email = vendorListSubmit.getEmail();
+        this.license = vendorListSubmit.getLicense();
+        this.storeuuid = vendorListSubmit.getStoreuuid();
+        this.tel = vendorListSubmit.getTel();
+        this.fax = vendorListSubmit.getFax();
+        this.updatetime = new Date();
+        this.vendorName = vendorListSubmit.getVendorName();
+        this.website = vendorListSubmit.getWebsite();
+        this.img = vendorListSubmit.getImg();
+    }
+}

+ 362 - 0
src/main/java/com/uas/platform/b2c/prod/product/brand/modal/VendorListSubmit.java

@@ -0,0 +1,362 @@
+package com.uas.platform.b2c.prod.product.brand.modal;
+
+import com.uas.platform.b2c.common.account.model.UserBaseInfo;
+import com.uas.platform.b2c.prod.store.model.StoreIn;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 品牌-供应商申请
+ * Created by wangyc on 2017/11/13.
+ *
+ * @version 2017/11/13 17:24 wangyc
+ */
+@Entity
+@Table(name = "product$vendorlist_submit")
+public class VendorListSubmit implements Serializable {
+
+    private static final long serialVersionUID = 5300583886223133147L;
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "vls_id")
+    private Long id;
+
+    /**
+     * 供应商名称
+     */
+    @Column(name = "vls_vendorname")
+    private String vendorName;
+
+    /**
+     * 供应商图片
+     */
+    @Column(name = "vls_img")
+    private String img;
+
+    /**
+     * 营业执照号
+     */
+    @Column(name = "vls_license")
+    private String license;
+
+    /**
+     * 供应商地区(以“,”分割,省市县)
+     */
+    @Column(name = "vls_area")
+    private String area;
+
+    /**
+     * 供应商详细地址
+     */
+    @Column(name = "vls_detailaddress")
+    private String detailAddress;
+
+    /**
+     * 供应商电话
+     */
+    @Column(name = "vls_tel")
+    private String tel;
+
+    /**
+     * 传真
+     */
+    @Column(name = "vls_fax")
+    private String fax;
+
+    /**
+     * 供应商网址
+     */
+    @Column(name = "vls_website")
+    private String website;
+
+    /**
+     * 对应商城店铺
+     */
+    @Column(name = "vls_storeuuid")
+    private String storeuuid;
+
+    /**
+     * 店铺信息
+     */
+    @Transient
+    private StoreIn storeIn;
+
+    /**
+     * 供应商邮箱
+     */
+    @Column(name = "vls_email")
+    private String email;
+
+    /**
+     * 更新时间
+     */
+    @Column(name = "vls_updatetime")
+    private Date updatetime;
+
+    /**
+     * 审核时间
+     */
+    @Column(name = "vls_audittime")
+    private Date audittime;
+
+    /**
+     * 品牌uuid
+     */
+    @Column(name = "vls_branduuid")
+    private String branduuid;
+
+    @Transient
+    private BrandInfo brand;
+
+    /**
+     * 审核状态
+     * SUBMITTED(101, "已提交"),
+     * AUDITED(102, "已审核"),
+     * NOTALLOW(103, "未通过"),
+     */
+    @Column(name = "vls_status")
+    private Integer status;
+
+    /**
+     * 申请操作类型
+     * DELETED(112, "删除")
+     * PRELIMINARY(818, "新增")
+     * ACTIVE(815, "更新")
+     */
+    @Column(name = "vls_type")
+    private Integer type;
+
+    /**
+     * 来源品牌--供应商id,以判断是否更新
+     */
+    @Column(name = "vls_vendorid")
+    private Long vendorid;
+
+    /**
+     * 上次更新人uu
+     */
+    @Column(name = "vls_updateruu")
+    private Long updateruu;
+
+    /**
+     * 上次更新人
+     */
+    @Transient
+    private UserBaseInfo updater;
+
+    /**
+     * 审核人uu
+     */
+    @Column(name = "vls_auditeruu")
+    private Long auditeruu;
+
+    /**
+     * 审核人
+     */
+    @Transient
+    private UserBaseInfo auditer;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getVendorName() {
+        return vendorName;
+    }
+
+    public void setVendorName(String vendorName) {
+        this.vendorName = vendorName;
+    }
+
+    public String getImg() {
+        return img;
+    }
+
+    public void setImg(String img) {
+        this.img = img;
+    }
+
+    public String getLicense() {
+        return license;
+    }
+
+    public void setLicense(String license) {
+        this.license = license;
+    }
+
+    public String getArea() {
+        return area;
+    }
+
+    public void setArea(String area) {
+        this.area = area;
+    }
+
+    public String getDetailAddress() {
+        return detailAddress;
+    }
+
+    public void setDetailAddress(String detailAddress) {
+        this.detailAddress = detailAddress;
+    }
+
+    public String getTel() {
+        return tel;
+    }
+
+    public void setTel(String tel) {
+        this.tel = tel;
+    }
+
+    public String getFax() {
+        return fax;
+    }
+
+    public void setFax(String fax) {
+        this.fax = fax;
+    }
+
+    public String getWebsite() {
+        return website;
+    }
+
+    public void setWebsite(String website) {
+        this.website = website;
+    }
+
+    public String getStoreuuid() {
+        return storeuuid;
+    }
+
+    public void setStoreuuid(String storeuuid) {
+        this.storeuuid = storeuuid;
+    }
+
+    public StoreIn getStoreIn() {
+        return storeIn;
+    }
+
+    public void setStoreIn(StoreIn storeIn) {
+        this.storeIn = storeIn;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public Date getUpdatetime() {
+        return updatetime;
+    }
+
+    public Date getAudittime() {
+        return audittime;
+    }
+
+    public void setAudittime(Date audittime) {
+        this.audittime = audittime;
+    }
+
+    public void setUpdatetime(Date updatetime) {
+        this.updatetime = updatetime;
+    }
+
+    public String getBranduuid() {
+        return branduuid;
+    }
+
+    public void setBranduuid(String branduuid) {
+        this.branduuid = branduuid;
+    }
+
+    public BrandInfo getBrand() {
+        return brand;
+    }
+
+    public void setBrand(BrandInfo brand) {
+        this.brand = brand;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public Long getVendorid() {
+        return vendorid;
+    }
+
+    public void setVendorid(Long vendorid) {
+        this.vendorid = vendorid;
+    }
+
+    public Long getUpdateruu() {
+        return updateruu;
+    }
+
+    public void setUpdateruu(Long updateruu) {
+        this.updateruu = updateruu;
+    }
+
+    public UserBaseInfo getUpdater() {
+        return updater;
+    }
+
+    public void setUpdater(UserBaseInfo updater) {
+        this.updater = updater;
+    }
+
+    public Long getAuditeruu() {
+        return auditeruu;
+    }
+
+    public void setAuditeruu(Long auditeruu) {
+        this.auditeruu = auditeruu;
+    }
+
+    public UserBaseInfo getAuditer() {
+        return auditer;
+    }
+
+    public void setAuditer(UserBaseInfo auditer) {
+        this.auditer = auditer;
+    }
+
+    public VendorListSubmit() {
+    }
+
+    public VendorListSubmit(VendorList vendorList) {
+        this.vendorName = vendorList.getVendorName();
+        this.img = vendorList.getImg();
+        this.license = vendorList.getLicense();
+        this.area = vendorList.getArea();
+        this.detailAddress = vendorList.getDetailAddress();
+        this.tel = vendorList.getTel();
+        this.fax = vendorList.getFax();
+        this.website = vendorList.getWebsite();
+        this.storeuuid = vendorList.getStoreuuid();
+        this.email = vendorList.getEmail();
+        this.branduuid = vendorList.getBranduuid();
+    }
+}

+ 28 - 0
src/main/java/com/uas/platform/b2c/prod/product/brand/service/VendorListService.java

@@ -0,0 +1,28 @@
+package com.uas.platform.b2c.prod.product.brand.service;
+
+import com.uas.platform.b2c.prod.product.brand.modal.VendorList;
+import com.uas.platform.core.model.PageInfo;
+import org.springframework.data.domain.Page;
+
+/**
+ * Created by wangyc on 2017/11/27.
+ *
+ * @version 2017/11/27 17:39 wangyc
+ */
+public interface VendorListService {
+
+    /**
+     * 通过品牌uuid获取供应商列表(公共接口调用)
+     * @param uuid
+     * @return
+     */
+    Page<VendorList> findByBrandAPI(PageInfo pageInfo, String uuid);
+
+    /**
+     * 通过品牌uuid获取供应商列表(管理后台调用)
+     * @param pageInfo
+     * @param uuid
+     * @return
+     */
+    Page<VendorList> findByBrand(PageInfo pageInfo, String uuid);
+}

+ 75 - 0
src/main/java/com/uas/platform/b2c/prod/product/brand/service/VendorListSubmitService.java

@@ -0,0 +1,75 @@
+package com.uas.platform.b2c.prod.product.brand.service;
+
+import com.uas.platform.b2c.prod.product.brand.modal.VendorListSubmit;
+import com.uas.platform.core.model.PageInfo;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.springframework.data.domain.Page;
+
+import java.util.List;
+
+/**
+ * Created by wangyc on 2017/11/27.
+ *
+ * @version 2017/11/27 10:38 wangyc
+ */
+public interface VendorListSubmitService {
+
+    /**
+     * 获取供应商申请
+     * @param id
+     * @return
+     */
+    VendorListSubmit findOne(Long id);
+
+    /**
+     * 新增供应商
+     * @param vendorListSubmit
+     * @return
+     */
+    VendorListSubmit save(VendorListSubmit vendorListSubmit);
+
+    /**
+     * 删除供应商申请
+     * @param id 供应商id
+     * @return
+     */
+    VendorListSubmit delete(Long id);
+
+    /**
+     * 更新供应商
+     * @param vendorListSubmit
+     * @return
+     */
+    VendorListSubmit update(VendorListSubmit vendorListSubmit);
+
+    /**
+     * 审核通过申请
+     * @param vendorListSubmit
+     * @return
+     */
+    VendorListSubmit audit(VendorListSubmit vendorListSubmit);
+
+    /**
+     * 审核不通过申请
+     * @param id
+     * @return
+     */
+    VendorListSubmit unaudit(Long id);
+
+    /**
+     * 批量导入供应商申请
+     * @param workbook
+     * @return
+     */
+    List<VendorListSubmit> upload(Workbook workbook);
+
+    /**
+     * 分页获取供应商申请
+     * @param pageInfo
+     * @param keywords
+     * @param status
+     * @return
+     */
+    Page<VendorListSubmit> findByPage(PageInfo pageInfo, String keywords, Integer status);
+
+}

+ 157 - 0
src/main/java/com/uas/platform/b2c/prod/product/brand/service/impl/VendorListServiceImpl.java

@@ -0,0 +1,157 @@
+package com.uas.platform.b2c.prod.product.brand.service.impl;
+
+import com.uas.platform.b2c.core.constant.Status;
+import com.uas.platform.b2c.prod.product.brand.dao.BrandDao;
+import com.uas.platform.b2c.prod.product.brand.dao.VendorListDao;
+import com.uas.platform.b2c.prod.product.brand.dao.VendorListSubmitDao;
+import com.uas.platform.b2c.prod.product.brand.modal.Brand;
+import com.uas.platform.b2c.prod.product.brand.modal.VendorList;
+import com.uas.platform.b2c.prod.product.brand.modal.VendorListSubmit;
+import com.uas.platform.b2c.prod.product.brand.service.VendorListService;
+import com.uas.platform.b2c.prod.store.dao.StoreInDao;
+import com.uas.platform.b2c.prod.store.model.StoreIn;
+import com.uas.platform.core.exception.IllegalOperatorException;
+import com.uas.platform.core.model.Constant;
+import com.uas.platform.core.model.PageInfo;
+import com.uas.platform.core.persistence.criteria.CriterionExpression;
+import com.uas.platform.core.persistence.criteria.SimpleExpression;
+import java.util.ArrayList;
+import java.util.List;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+import org.apache.commons.collections.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageImpl;
+import org.springframework.data.jpa.domain.Specification;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+/**
+ * Created by wangyc on 2017/11/27.
+ *
+ * @version 2017/11/27 17:39 wangyc
+ */
+@Service
+public class VendorListServiceImpl implements VendorListService{
+
+    private final VendorListDao vendorListDao;
+
+    private final VendorListSubmitDao vendorListSubmitDao;
+
+    private final BrandDao brandDao;
+
+    private final StoreInDao storeInDao;
+
+    @Autowired
+    public VendorListServiceImpl (VendorListDao vendorListDao, VendorListSubmitDao vendorListSubmitDao, BrandDao brandDao, StoreInDao storeInDao) {
+        this.vendorListDao = vendorListDao;
+        this.vendorListSubmitDao = vendorListSubmitDao;
+        this.brandDao = brandDao;
+        this.storeInDao = storeInDao;
+    }
+
+    @Override
+    public Page<VendorList> findByBrandAPI(final PageInfo pageInfo, String uuid) {
+        Brand brand = brandDao.findByUuid(uuid);
+
+        if (brand == null)
+            throw new IllegalOperatorException("此品牌为空,请重新确认品牌信息");
+
+        // 根据品牌信息获取
+        if (StringUtils.hasText(uuid)) {
+            SimpleExpression branduuid = new SimpleExpression("branduuid", uuid, CriterionExpression.Operator.EQ);
+            pageInfo.expression(branduuid);
+        }
+
+        return vendorListDao.findAll(new Specification<VendorList>() {
+            public Predicate toPredicate(Root<VendorList> root, CriteriaQuery<?> query, CriteriaBuilder builder) {
+                query.where(pageInfo.getPredicates(root, query, builder));
+                return null;
+            }
+        }, pageInfo);
+    }
+
+    @Override
+    public Page<VendorList> findByBrand(final PageInfo pageInfo, String uuid) {
+        Brand brand = brandDao.findByUuid(uuid);
+        if (brand == null)
+            throw new IllegalOperatorException("此品牌为空,请重新确认品牌信息");
+
+        // 根据品牌信息获取
+        if (StringUtils.hasText(uuid)) {
+            SimpleExpression branduuid = new SimpleExpression("branduuid", uuid, CriterionExpression.Operator.EQ);
+            pageInfo.expression(branduuid);
+        }
+
+        Page<VendorList> vendorListPage = vendorListDao.findAll(new Specification<VendorList>() {
+            public Predicate toPredicate(Root<VendorList> root, CriteriaQuery<?> query, CriteriaBuilder builder) {
+                query.where(pageInfo.getPredicates(root, query, builder));
+                return null;
+            }
+        }, pageInfo);
+
+        List<VendorList> vendorLists = vendorListPage.getContent();
+
+        // 装载店铺信息
+        if (CollectionUtils.isNotEmpty(vendorLists)) {
+            for (VendorList vendorList : vendorLists) {
+                // 如果供应商信息申请状态为正在申请中,用申请信息替换它
+                if (Constant.YES == vendorList.getIsSubmited()) {
+                    List<VendorListSubmit> vendorListSubmits = vendorListSubmitDao.findByVendoridAndStatus(vendorList.getId(),
+                        Status.SUBMITTED.value());
+                    if (CollectionUtils.isNotEmpty(vendorListSubmits)) {
+                        convertBySubmit(vendorList, vendorListSubmits.get(0));
+                    }
+                }
+
+                if (vendorList.getStoreuuid() != null) {
+                    StoreIn store = storeInDao.findByUuid(vendorList.getStoreuuid());
+                    if (store != null) {
+                        vendorList.setStoreIn(store);
+                    }
+                }
+            }
+        }
+
+        List<VendorList> returnVendorLists = new ArrayList<>(vendorLists);
+        Long totalElements = vendorListPage.getTotalElements();
+
+        List<VendorListSubmit> vendorListSubmits = vendorListSubmitDao.findByBranduuidAndStatusAndVendoridIsNull(uuid, Status.SUBMITTED.value());
+        if (CollectionUtils.isNotEmpty(vendorListSubmits)) {
+            for (VendorListSubmit vendorListSubmit : vendorListSubmits) {
+                VendorList vendorList = new VendorList();
+                convertBySubmit(vendorList, vendorListSubmit);
+                vendorList.setIsSubmited((short) 2);
+
+                if (vendorList.getStoreuuid() != null) {
+                    StoreIn store = storeInDao.findByUuid(vendorList.getStoreuuid());
+                    if (store != null) {
+                        vendorList.setStoreIn(store);
+                    }
+                }
+                returnVendorLists.add(vendorList);
+            }
+            totalElements += vendorListSubmits.size();
+//            pageInfo.setPageSize(returnVendorLists.size());
+        }
+
+        return new PageImpl<VendorList>(returnVendorLists, pageInfo, totalElements);
+    }
+
+    private void convertBySubmit(VendorList vendorList, VendorListSubmit vendorListSubmit) {
+        vendorList.setArea(vendorListSubmit.getArea());
+        vendorList.setBranduuid(vendorListSubmit.getBranduuid());
+        vendorList.setDetailAddress(vendorListSubmit.getDetailAddress());
+        vendorList.setEmail(vendorListSubmit.getEmail());
+        vendorList.setLicense(vendorListSubmit.getLicense());
+        vendorList.setStoreuuid(vendorListSubmit.getStoreuuid());
+        vendorList.setTel(vendorListSubmit.getTel());
+        vendorList.setFax(vendorListSubmit.getFax());
+        vendorList.setVendorName(vendorListSubmit.getVendorName());
+        vendorList.setWebsite(vendorListSubmit.getWebsite());
+        vendorList.setImg(vendorListSubmit.getImg());
+    }
+}

+ 490 - 0
src/main/java/com/uas/platform/b2c/prod/product/brand/service/impl/VendorListSubmitServiceImpl.java

@@ -0,0 +1,490 @@
+package com.uas.platform.b2c.prod.product.brand.service.impl;
+
+import com.uas.platform.b2c.common.account.dao.EnterpriseDao;
+import com.uas.platform.b2c.common.account.dao.UserBaseInfoDao;
+import com.uas.platform.b2c.common.account.model.UserBaseInfo;
+import com.uas.platform.b2c.core.constant.Status;
+import com.uas.platform.b2c.core.support.SystemSession;
+import com.uas.platform.b2c.prod.product.brand.dao.BrandDao;
+import com.uas.platform.b2c.prod.product.brand.dao.VendorListDao;
+import com.uas.platform.b2c.prod.product.brand.dao.VendorListSubmitDao;
+import com.uas.platform.b2c.prod.product.brand.modal.Brand;
+import com.uas.platform.b2c.prod.product.brand.modal.BrandInfo;
+import com.uas.platform.b2c.prod.product.brand.modal.VendorList;
+import com.uas.platform.b2c.prod.product.brand.modal.VendorListSubmit;
+import com.uas.platform.b2c.prod.product.brand.service.VendorListSubmitService;
+import com.uas.platform.b2c.prod.store.dao.StoreInDao;
+import com.uas.platform.b2c.prod.store.model.StoreIn;
+import com.uas.platform.b2c.prod.store.model.StoreStatus;
+import com.uas.platform.core.exception.IllegalOperatorException;
+import com.uas.platform.core.model.Constant;
+import com.uas.platform.core.model.PageInfo;
+import com.uas.platform.core.persistence.criteria.CriterionExpression;
+import com.uas.platform.core.persistence.criteria.SimpleExpression;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageImpl;
+import org.springframework.data.jpa.domain.Specification;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+/**
+ * Created by wangyc on 2017/11/27.
+ *
+ * @version 2017/11/27 10:39 wangyc
+ */
+@Service
+public class VendorListSubmitServiceImpl implements VendorListSubmitService {
+
+    private final VendorListDao vendorListDao;
+
+    private final VendorListSubmitDao vendorListSubmitDao;
+
+    private final BrandDao brandDao;
+
+    private final StoreInDao storeInDao;
+
+    private final UserBaseInfoDao userBaseInfoDao;
+
+    private final EnterpriseDao enterpriseDao;
+
+    @Autowired
+    public VendorListSubmitServiceImpl(VendorListDao vendorListDao, VendorListSubmitDao vendorListSubmitDao, BrandDao brandDao, StoreInDao storeInDao, UserBaseInfoDao userBaseInfoDao, EnterpriseDao enterpriseDao){
+        this.vendorListDao = vendorListDao;
+        this.vendorListSubmitDao = vendorListSubmitDao;
+        this.brandDao = brandDao;
+        this.storeInDao = storeInDao;
+        this.userBaseInfoDao = userBaseInfoDao;
+        this.enterpriseDao = enterpriseDao;
+    }
+
+    @Override
+    public VendorListSubmit findOne(Long id) {
+        VendorListSubmit vendorListSubmit = vendorListSubmitDao.findOne(id);
+        if (vendorListSubmit == null) {
+            throw new IllegalOperatorException("此供应商申请不存在");
+        }
+
+        if (vendorListSubmit.getStoreuuid() != null) {
+            vendorListSubmit.setStoreIn(storeInDao.findByUuid(vendorListSubmit.getStoreuuid()));
+        }
+        return vendorListSubmit;
+    }
+
+    @Override
+    public VendorListSubmit save(VendorListSubmit vendorListSubmit) {
+        validition(vendorListSubmit);// 验证申请
+
+        List<VendorList> existsVendors = new ArrayList<VendorList>();
+        if (vendorListSubmit.getLicense() != null) {// 判断供应商信息是否已存在
+            existsVendors = vendorListDao.findByBranduuidAndLicense(vendorListSubmit.getBranduuid(), vendorListSubmit.getLicense());
+        } else {
+            existsVendors = vendorListDao.findByBranduuidAndVendorName(vendorListSubmit.getBranduuid(), vendorListSubmit.getVendorName());
+        }
+
+        if (CollectionUtils.isNotEmpty(existsVendors)) {
+            throw new IllegalOperatorException("此供应商已存在,请重新确认供应商信息或更新对应供应商信息");
+        }
+
+        vendorListSubmit.setUpdateruu(SystemSession.getUser().getUserUU());
+        vendorListSubmit.setUpdatetime(new Date());
+        vendorListSubmit.setStatus(Status.SUBMITTED.value());
+        // 设置操作类型为新增
+        vendorListSubmit.setType(Status.PRELIMINARY.value());
+        return vendorListSubmitDao.save(vendorListSubmit);
+    }
+
+    @Override
+    public VendorListSubmit delete(Long id) {
+        VendorList oldVendor = vendorListDao.findOne(id);
+        if (oldVendor == null) {
+            throw new IllegalOperatorException("此供应商信息不存在,请确认后再进行操作");
+        }
+
+        if (Constant.YES == oldVendor.getIsSubmited()) {
+            throw new IllegalOperatorException("此供应商信息正在申请中,请联系管理员处理完现有申请后,再进行操作");
+        }
+
+        Date now = new Date();
+
+        VendorListSubmit vendorListSubmit = new VendorListSubmit(oldVendor);
+        vendorListSubmit.setUpdateruu(SystemSession.getUser().getUserUU());
+        vendorListSubmit.setUpdatetime(now);
+        vendorListSubmit.setVendorid(oldVendor.getId());
+        vendorListSubmit.setStatus(Status.SUBMITTED.value());
+        // 设置操作类型为删除
+        vendorListSubmit.setType(Status.DELETED.value());
+
+        // 更新供应商信息为正在申请
+        oldVendor.setSubmitTime(now);
+        oldVendor.setIsSubmited(Constant.YES);
+        vendorListDao.save(oldVendor);
+
+        return vendorListSubmitDao.save(vendorListSubmit);
+    }
+
+    @Override
+    public VendorListSubmit update(VendorListSubmit vendorListSubmit) {
+        validition(vendorListSubmit);// 验证申请
+
+        VendorList oldVendor = vendorListDao.findOne(vendorListSubmit.getVendorid());
+        if (oldVendor == null)
+            throw new IllegalOperatorException("此供应商不存在");
+
+        if (Constant.YES == oldVendor.getIsSubmited()) {
+            throw new IllegalOperatorException("此供应商信息正在申请中,请联系管理员处理完现有申请后,再进行操作");
+        }
+
+
+        Date now = new Date();
+
+        vendorListSubmit.setUpdateruu(SystemSession.getUser().getUserUU());
+        vendorListSubmit.setUpdatetime(now);
+        vendorListSubmit.setStatus(Status.SUBMITTED.value());
+        // 设置操作类型为更新
+        vendorListSubmit.setType(Status.ACTIVE.value());
+        vendorListSubmit.setId(null);
+
+        // 更新供应商信息为正在申请
+        oldVendor.setSubmitTime(now);
+        oldVendor.setIsSubmited(Constant.YES);
+        vendorListDao.save(oldVendor);
+
+        return vendorListSubmitDao.save(vendorListSubmit);
+    }
+
+    @Override
+    public VendorListSubmit audit(VendorListSubmit vendorListSubmit) {
+        validition(vendorListSubmit);// 验证申请
+
+        Date now = new Date();
+
+        vendorListSubmit.setStatus(Status.AUDITED.value());// 修改状态为已审核
+        vendorListSubmit.setAuditeruu(SystemSession.getUser().getUserUU());
+        vendorListSubmit.setAudittime(now);
+        vendorListSubmitDao.save(vendorListSubmit);
+
+        // 删除申请,删除原供应商信息
+        if (Status.DELETED.value() == vendorListSubmit.getType()) {
+            // 检测关联供应商信息有效性
+            checkVendorid(vendorListSubmit);
+            vendorListDao.delete(vendorListSubmit.getVendorid());
+        } else {
+            VendorList vendorList = new VendorList(vendorListSubmit);
+            // 若为更新则更新之前的供应商信息
+            if (Status.ACTIVE.value() == vendorListSubmit.getType()) {
+                // 检测关联供应商信息有效性
+                checkVendorid(vendorListSubmit);
+                vendorList.setId(vendorListSubmit.getVendorid());
+            }
+            // 将供应商信息申请状态更新为不在申请中
+            vendorList.setIsSubmited(Constant.NO);
+            vendorList.setSubmitTime(now);
+            vendorListDao.save(vendorList);
+        }
+
+        return vendorListSubmit;
+    }
+
+    /**
+     * 检测关联供应商信息有效性
+     * @param vendorListSubmit 供应商申请
+     */
+    private void checkVendorid(VendorListSubmit vendorListSubmit) {
+        if (vendorListSubmit.getVendorid() == null || vendorListDao.findOne(vendorListSubmit.getVendorid()) == null) {
+            throw new IllegalOperatorException("原供应商信息不存在,请重新确认后再进行操作");
+        }
+    }
+
+    @Override
+    public VendorListSubmit unaudit(Long id) {
+        VendorListSubmit vendorListSubmit = vendorListSubmitDao.findOne(id);
+        if (vendorListSubmit == null)
+            throw new IllegalOperatorException("此申请不存在,请重新确认申请信息");
+        if (Status.SUBMITTED.value() != vendorListSubmit.getStatus())
+            throw new IllegalOperatorException("此申请不为待审核状态,请重新确认申请信息");
+
+        vendorListSubmit.setStatus(Status.NOTALLOW.value());
+        vendorListSubmit.setAuditeruu(SystemSession.getUser().getUserUU());
+        vendorListSubmit.setAudittime(new Date());
+
+        // 若申请关联已生效供应商信息,将已生效信息改为不在申请状态中
+        if (vendorListSubmit.getVendorid() != null) {
+            VendorList oldVendor = vendorListDao.findOne(vendorListSubmit.getVendorid());
+            if (oldVendor != null) {
+                oldVendor.setIsSubmited(Constant.NO);
+                oldVendor.setSubmitTime(new Date());
+                vendorListDao.save(oldVendor);
+            }
+        }
+
+        return vendorListSubmitDao.save(vendorListSubmit);
+    }
+
+    @Override
+    public List<VendorListSubmit> upload(Workbook workbook) {
+        List<VendorListSubmit> vendorListSubmits = new ArrayList<VendorListSubmit>();
+        Sheet sheet = workbook.getSheetAt(0);
+        int rowNum = sheet.getLastRowNum();
+        Date date = new Date();
+
+        Row firstRow = sheet.getRow(0);// 验证表头
+        if (firstRow != null) {
+            List<String> titles = new ArrayList<String>();
+            titles.add("品牌英文名");
+            titles.add("代理商名称");
+            titles.add("营业执照号");
+            titles.add("地区(省,市,区/县。以,分隔)");
+            titles.add("详细地址(街道)");
+            titles.add("电话");
+            titles.add("传真");
+            titles.add("网址");
+            titles.add("关联企业名称");
+            titles.add("邮箱");
+
+            List<String> heads = new ArrayList<String>();
+            for (int j = 0; j < 10; j++) {
+                if (firstRow.getCell(j) != null) {
+                    firstRow.getCell(j).setCellType(Cell.CELL_TYPE_STRING);
+                    Object cell = firstRow.getCell(j);
+                    if (cell != null && StringUtils.hasText(firstRow.getCell(j).getStringCellValue().trim())) {
+                        heads.add(firstRow.getCell(j).getStringCellValue().trim());
+                    }
+                }
+            }
+            if (!titles.equals(heads))
+                throw new IllegalOperatorException("表头不正确,请重新下载模板");
+        } else {
+            throw new IllegalOperatorException("表头不正确,请重新下载模板");
+        }
+
+        List<VendorListSubmit> vendorListSubmitList = new ArrayList<VendorListSubmit>();
+
+        for (int r = 1; r <= rowNum; r++) {
+            Row row = sheet.getRow(r);
+
+            if (row != null && row.getCell(0) != null) {
+                VendorListSubmit vendorListSubmit = new VendorListSubmit();
+
+                // 品牌英文名
+                if (row.getCell(0) != null) {
+                    row.getCell(0).setCellType(Cell.CELL_TYPE_STRING);
+                    String brandNameEn = row.getCell(0).getStringCellValue().trim();
+
+                    if (StringUtils.hasText(brandNameEn)) {
+                        List<Brand> brands = brandDao.findByUpperNameEn(brandNameEn);
+                        if (CollectionUtils.isEmpty(brands))
+                            throw new IllegalOperatorException("第" + (r+1) + "行品牌:" + brandNameEn + " 不存在,请重新确认品牌信息");
+
+                        vendorListSubmit.setBranduuid(brands.get(0).getUuid());
+                    } else {
+                        throw new IllegalOperatorException("第" + (r+1) + "行品牌英文名不可为空");
+                    }
+                } else {
+                    throw new IllegalOperatorException("第" + (r+1) + "行品牌英文名不可为空");
+                }
+
+                // 供应商名称
+                if (row.getCell(1) != null) {
+                    row.getCell(1).setCellType(Cell.CELL_TYPE_STRING);
+                    String vendorName = row.getCell(1).getStringCellValue().trim();
+
+                    if (StringUtils.hasText(vendorName)) {
+                        vendorListSubmit.setVendorName(vendorName);
+                    } else {
+                        throw new IllegalOperatorException("第" + (r+1) + "行供应商名称不可为空");
+                    }
+                } else {
+                    throw new IllegalOperatorException("第" + (r+1) + "行供应商名称不可为空");
+                }
+
+                // 营业执照号
+                if (row.getCell(2) != null) {
+                    row.getCell(2).setCellType(Cell.CELL_TYPE_STRING);
+                    String license = row.getCell(2).getStringCellValue().trim();
+
+                    if (StringUtils.hasText(license))
+                        vendorListSubmit.setLicense(license);
+                }
+
+                // 地区
+                if (row.getCell(3) != null) {
+                    row.getCell(3).setCellType(Cell.CELL_TYPE_STRING);
+                    String area = row.getCell(3).getStringCellValue().trim();
+
+                    if (StringUtils.hasText(area)) {
+                        area.replace(",", ",");
+                        vendorListSubmit.setArea(area);
+                    } else {
+                        throw new IllegalOperatorException("第" + (r+1) + "行地区不可为空");
+                    }
+                } else {
+                    throw new IllegalOperatorException("第" + (r+1) + "行地区不可为空");
+                }
+
+                // 详细地址
+                if (row.getCell(4) != null) {
+                    row.getCell(4).setCellType(Cell.CELL_TYPE_STRING);
+                    String detailAddress = row.getCell(4).getStringCellValue().trim();
+
+                    if (StringUtils.hasText(detailAddress)) {
+                        vendorListSubmit.setDetailAddress(detailAddress);
+                    } else {
+                        throw new IllegalOperatorException("第" + (r+1) + "行详细地址不可为空");
+                    }
+                } else {
+                    throw new IllegalOperatorException("第" + (r+1) + "行详细地址不可为空");
+                }
+
+                // 电话
+                if (row.getCell(5) != null) {
+                    row.getCell(5).setCellType(Cell.CELL_TYPE_STRING);
+                    String tel = row.getCell(5).getStringCellValue().trim();
+
+                    if (StringUtils.hasText(tel)) {
+                        vendorListSubmit.setTel(tel);
+                    }
+                }
+
+                // 传真
+                if (row.getCell(6) != null) {
+                    row.getCell(6).setCellType(Cell.CELL_TYPE_STRING);
+                    String fax = row.getCell(6).getStringCellValue().trim();
+
+                    if (StringUtils.hasText(fax)) {
+                        vendorListSubmit.setFax(fax);
+                    }
+                }
+
+                // 网址
+                if (row.getCell(7) != null) {
+                    row.getCell(7).setCellType(Cell.CELL_TYPE_STRING);
+                    String website = row.getCell(7).getStringCellValue().trim();
+
+                    if (StringUtils.hasText(website)) {
+                        vendorListSubmit.setWebsite(website);
+                    }
+                }
+
+                // 关联企业名称
+                if (row.getCell(8) != null) {
+                    row.getCell(8).setCellType(Cell.CELL_TYPE_STRING);
+                    String enName = row.getCell(8).getStringCellValue().trim();
+
+                    if (StringUtils.hasText(enName)) {
+                        List<Long> enuu = enterpriseDao.findEnuuByName(enName);
+                        if (CollectionUtils.isNotEmpty(enuu)) {
+                            List<StoreIn> storeInExist = storeInDao.findByEnUU(enuu.get(0));
+                            if (CollectionUtils.isNotEmpty(storeInExist)) {
+                                StoreIn storeIn = storeInExist.get(0);
+                                if (StoreStatus.OPENED == storeIn.getStatus()) {
+                                    VendorList vendorLists = vendorListDao.findByBranduuidAndStoreuuid(vendorListSubmit.getBranduuid(), storeIn.getUuid());
+                                    if (vendorLists != null) {
+                                        throw new IllegalOperatorException("第" + (r+1) + "行企业:" + enName + " 店铺,在当前品牌下已关联供应商");
+                                    }
+                                    vendorListSubmit.setStoreuuid(storeIn.getUuid());
+                                } else {
+                                    throw new IllegalOperatorException("第" + (r+1) + "行企业:" + enName + " 店铺不为已开通状态");
+                                }
+                            } else {
+                                throw new IllegalOperatorException("第" + (r+1) + "行企业:" + enName + "未开通店铺");
+                            }
+                        } else {
+                            throw new IllegalOperatorException("第" + (r+1) + "行企业:" + enName + "不存在");
+                        }
+                    }
+                }
+                // 邮箱
+                if (row.getCell(9) != null) {
+                    row.getCell(9).setCellType(Cell.CELL_TYPE_STRING);
+                    String email = row.getCell(9).getStringCellValue().trim();
+
+                    if (StringUtils.hasText(email)) {
+                        vendorListSubmit.setEmail(email);
+                    }
+                }
+
+                vendorListSubmit.setUpdateruu(SystemSession.getUser().getUserUU());
+                vendorListSubmit.setUpdatetime(new Date());
+                vendorListSubmit.setStatus(Status.SUBMITTED.value());
+                // 设置操作类型为新增
+                vendorListSubmit.setType(Status.PRELIMINARY.value());
+                vendorListSubmitList.add(vendorListSubmit);
+            }
+        }
+        return vendorListSubmitDao.save(vendorListSubmitList);
+    }
+
+    @Override
+    public Page<VendorListSubmit> findByPage(final PageInfo pageInfo, String keywords, Integer status) {
+        if (Status.AVAILABLE.value() != status) {// 非全部时过滤状态
+            pageInfo.filter("status", status);
+        }
+
+        if (StringUtils.hasText(keywords)) {
+            SimpleExpression vendorName = new SimpleExpression("vendorName", keywords, CriterionExpression.Operator.LIKE, true);
+            pageInfo.expression(vendorName);
+        }
+
+        Page<VendorListSubmit> vendorListSubmitPage = vendorListSubmitDao.findAll(new Specification<VendorListSubmit>() {
+            @Override
+            public Predicate toPredicate(Root<VendorListSubmit> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
+                query.where(pageInfo.getPredicates(root, query, cb));
+                return null;
+            }
+        }, pageInfo);
+
+        List<VendorListSubmit> vendorListSubmits = vendorListSubmitPage.getContent();
+        for (VendorListSubmit vendorListSubmit : vendorListSubmits) {// 设置品牌信息、提交人、审核人
+            Brand brand = brandDao.findByUuid(vendorListSubmit.getBranduuid());
+            if (brand == null)
+                throw new IllegalOperatorException("供应商申请:" + vendorListSubmit.getVendorName() + " 所属品牌不存在");
+            vendorListSubmit.setBrand(new BrandInfo(brand));
+
+            UserBaseInfo updater = userBaseInfoDao.findUserByUserUU(vendorListSubmit.getUpdateruu());
+            if (updater == null)
+                throw new IllegalOperatorException("供应商申请:" + vendorListSubmit.getVendorName() + " 提交人不存在");
+            vendorListSubmit.setUpdater(updater);
+
+            if (vendorListSubmit.getAuditeruu() != null) {
+                UserBaseInfo auditer = userBaseInfoDao.findUserByUserUU(vendorListSubmit.getUpdateruu());
+                if (auditer == null)
+                    throw new IllegalOperatorException("供应商申请:" + vendorListSubmit.getVendorName() + " 审核人不存在");
+                vendorListSubmit.setAuditer(auditer);
+            }
+        }
+        return new PageImpl<VendorListSubmit>(vendorListSubmits, pageInfo, vendorListSubmitPage.getTotalElements());
+
+    }
+
+    /**
+     * 验证申请数据正确性
+     * @param vendorListSubmit
+     * @return
+     */
+    private void validition(VendorListSubmit vendorListSubmit) {
+        if (vendorListSubmit.getBranduuid() == null) {
+            throw new IllegalOperatorException("品牌信息为空,请确认信息后重新申请");
+        }
+
+        // 店铺id不为空时,验证同品牌下是否存在已关联该店铺的供应商(更新自身除外)
+        if (vendorListSubmit.getStoreuuid() != null) {
+            VendorList existsVendor = vendorListDao.findByBranduuidAndStoreuuid(vendorListSubmit.getBranduuid(), vendorListSubmit.getStoreuuid());
+            if (existsVendor != null && !existsVendor.getId().equals(vendorListSubmit.getVendorid())) {
+                throw new IllegalOperatorException("此店铺关联供应商已入驻,请确认信息后重新申请");
+            }
+        }
+    }
+}

BIN
src/main/resources/jxls-tpl/product/brand-vendor.xls


+ 3 - 0
src/main/webapp/WEB-INF/views/normal/admin.html

@@ -19,6 +19,7 @@
 <link rel="stylesheet" href="static/lib/jquery/themes/summernote/css/summernote.css" />
 <link rel="stylesheet" href="static/css/common.css" />
 <link rel="stylesheet" href="static/css/admin.css" />
+<link rel="stylesheet" href="static/lib/quill/quill.snow.css" />
 </head>
 <body>
 	<!-- main content begin -->
@@ -67,6 +68,8 @@
 	</div>
 	<!-- Loading End -->
 </body>
+<script src="static/lib/quill/quill.core.js"></script>
+<script src="static/lib/quill/quill.min.js"></script>
 <script language="javascript" type="text/javascript" src="static/lib/datePicker/WdatePicker.js"></script>
 <script type="text/javascript" src="static/lib/require.js"
 	data-main="static/js/admin/main.js"></script>

+ 6 - 2
src/main/webapp/WEB-INF/views/normal/adminWithNav.html

@@ -133,8 +133,10 @@
 			<li class="nav-header">审批</li>
 			<li class="nav-node"><a href="#audit/brand"><i
 					class="fa fa-bullhorn"></i><span> 品牌</span></a></li>
-			<li class="nav-node"><a href="#brandmaintenance"><i
-					class="fa fa-bullhorn"></i><span> 品牌维护</span></a></li>
+			<li class="nav-node"><a href="#supplierSubmitList"><i
+					class="fa fa-bullhorn"></i><span> 品牌供应商</span></a></li>
+			<!--<li class="nav-node"><a href="#brandmaintenance"><i-->
+					<!--class="fa fa-bullhorn"></i><span> 品牌维护</span></a></li>-->
 			<li class="nav-node"><a href="#audit/component"><i
 					class="fa fa-shopping-cart"></i><span> 标准器件</span></a></li>
 			<li class="nav-node"><a href="#audit/componentBatchMaintenance"><i
@@ -154,6 +156,8 @@
 					class="fa fa-flag"></i><span> 品牌映射维护</span></a></li>
 			<li class="nav-node"><a href="#/store/company"><i
 					class="fa fa-flag"></i><span> 寄售管理</span></a></li>
+			<li class="nav-node"><a href="#brandmaintenance"><i
+					class="fa fa-bullhorn"></i><span> 品牌维护</span></a></li>
 			<li class="nav-node"><a href="#/store/list"><i
 					class="fa fa-flag"></i><span> 店铺管理</span></a></li>
 			<li class="nav-node"><a href="#/store/application"><i

BIN
src/main/webapp/resources/img/all/border_line.png


+ 41 - 42
src/main/webapp/resources/js/admin/app.js

@@ -1,4 +1,4 @@
- define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ui-form', 'ngLocal', 'ngTable', 'ngSanitize', 'ngDraggable', 'common/services', 'common/directives', 'common/query/brand', 'common/query/address', 'common/query/return' , 'common/query/change' ,'common/query/component', 'common/query/order', 'common/query/purchase', 'common/query/invoice', 'common/query/property', 'common/query/kind', 'common/query/property', 'common/query/receipt', 'common/query/logistics' ,'angular-toaster', 'ui-jquery', 'jquery-uploadify','common/query/dateParse' , 'common/query/bankTransfer' ,'common/query/bankInfo', 'common/query/urlencryption', 'common/query/bill', 'common/query/makerDemand', 'common/query/goods', 'common/query/validtime', 'file-upload','file-upload-shim', 'common/query/slideImage', 'common/query/kindAdvice', 'common/query/responseLogistics', 'common/query/search','common/directives/dynamicInput', 'common/query/auditorMail', 'common/query/tradeBasicProperties', 'common/query/exchangeRate', 'common/query/tradeDeliveryDelayTime', 'common/query/payment', 'common/query/kindContrast', 'common/query/crawlTask', 'common/query/afterSale', 'common/query/refund', 'common/query/messageBoard', 'common/query/logisticsPort', 'common/query/storeInfo', 'common/query/cms', 'common/query/help', 'common/query/commonCount', 'common/module/store_admin_violations_module', 'common/query/internalMessage','common/query/user','common/query/secQuestion','common/query/keyWord','common/query/logUsage','common/query/seekQualityBuyer','common/query/loanApply', 'common/query/seekSalesman'], function(angularAMD) {
+ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ui-form', 'ngLocal', 'ngTable', 'ngSanitize', 'ngDraggable', 'common/services', 'common/directives', 'common/query/brand', 'common/query/address', 'common/query/return' , 'common/query/change' ,'common/query/component', 'common/query/order', 'common/query/purchase', 'common/query/invoice', 'common/query/property', 'common/query/kind', 'common/query/property', 'common/query/receipt', 'common/query/logistics' ,'angular-toaster', 'ui-jquery', 'jquery-uploadify','common/query/dateParse' , 'common/query/bankTransfer' ,'common/query/bankInfo', 'common/query/urlencryption', 'common/query/bill', 'common/query/makerDemand', 'common/query/goods', 'common/query/validtime', 'file-upload','file-upload-shim', 'common/query/slideImage', 'common/query/kindAdvice', 'common/query/responseLogistics', 'common/query/search','common/directives/dynamicInput', 'common/query/auditorMail', 'common/query/tradeBasicProperties', 'common/query/exchangeRate', 'common/query/tradeDeliveryDelayTime', 'common/query/payment', 'common/query/kindContrast', 'common/query/crawlTask', 'common/query/afterSale', 'common/query/refund', 'common/query/messageBoard', 'common/query/logisticsPort', 'common/query/storeInfo', 'common/query/cms', 'common/query/help', 'common/query/commonCount', 'common/module/store_admin_violations_module', 'common/query/internalMessage','common/query/user','common/query/secQuestion','common/query/keyWord','common/query/logUsage','common/query/seekQualityBuyer','common/query/loanApply', 'common/query/supplier', 'common/query/seekSalesman'], function(angularAMD) {
 	'use strict';
 
 	 /**
@@ -8,7 +8,7 @@
 		 return this.length > 0 ? this[this.length - 1] : null;
 	 };
 
-	var app = angular.module('myApp', [ 'ui.router', 'ui.bootstrap', 'ui.form', 'ng.local', 'ngTable', 'ngSanitize', 'ngDraggable', 'common.services', 'common.directives', 'brandServices', 'addressServices', 'returnServices', 'changeServices', 'componentServices', 'orderServices', 'purchaseServices', 'invoiceServices', 'propertyServices', 'receiptServices', 'logisticsServices', 'common.query.kind', 'toaster','ui.jquery' ,'dateparseServices', 'bankInfo' , 'bankTransfer', 'urlencryptionServices', 'billServices', 'makerDemand', 'goodsServices', 'validtimeServices', 'angularFileUpload', 'slideImageService', 'common.query.kindAdvice', 'responseLogisticsService', 'searchService', 'ngDynamicInput', 'ReviewerEmailInfoService', 'tradeBasicPropertiesServices', 'exchangeRateModule', 'tradeDeliveryDelayTimeModule', 'PaymentService', 'kindContrastServices', 'crawlTaskServices', 'afterSaleService', 'refundModule', 'messageBoardServices', 'logisticsPortService', 'storeInfoServices', 'cmsService', 'helpServices', 'commonCountServices', 'tool.directives', 'StoreAdminViolationsModule', 'internalMessageServices','common.query.user','secQuestionServices','keyWordServices','logUsageServices','seekQualityBuyerServices', 'loanApplyService', 'seekSalesmanServices']);
+	var app = angular.module('myApp', [ 'ui.router', 'ui.bootstrap', 'ui.form', 'ng.local', 'ngTable', 'ngSanitize', 'ngDraggable', 'common.services', 'common.directives', 'brandServices', 'addressServices', 'returnServices', 'changeServices', 'componentServices', 'orderServices', 'purchaseServices', 'invoiceServices', 'propertyServices', 'receiptServices', 'logisticsServices', 'common.query.kind', 'toaster','ui.jquery' ,'dateparseServices', 'bankInfo' , 'bankTransfer', 'urlencryptionServices', 'billServices', 'makerDemand', 'goodsServices', 'validtimeServices', 'angularFileUpload', 'slideImageService', 'common.query.kindAdvice', 'responseLogisticsService', 'searchService', 'ngDynamicInput', 'ReviewerEmailInfoService', 'tradeBasicPropertiesServices', 'exchangeRateModule', 'tradeDeliveryDelayTimeModule', 'PaymentService', 'kindContrastServices', 'crawlTaskServices', 'afterSaleService', 'refundModule', 'messageBoardServices', 'logisticsPortService', 'storeInfoServices', 'cmsService', 'helpServices', 'commonCountServices', 'tool.directives', 'StoreAdminViolationsModule', 'internalMessageServices','common.query.user','secQuestionServices','keyWordServices','logUsageServices','seekQualityBuyerServices', 'loanApplyService', 'supplierServices', 'seekSalesmanServices']);
 	app.init = function() {
 		angularAMD.bootstrap(app);
 	};
@@ -310,6 +310,24 @@
 			templateUrl : 'static/view/admin/brand_maintenance_detail.html',
 			controller : 'BrandMaintenanceDetailCtrl',
 			controllerUrl : 'app/controllers/BrandMaintenanceDetailCtrl'
+		})).state('suppliermaintenance', angularAMD.route({
+			// 供应商维护
+			url: '/suppliermaintenance/:uuid',
+			templateUrl : 'static/view/admin/supplier_maintenance.html',
+			controller : 'supplierMaintenanceCtrl',
+			controllerUrl : 'app/controllers/supplierMaintenanceCtrl'
+		})).state('supplierSubmitList', angularAMD.route({
+			// 供应商申请列表
+			url: '/supplierSubmitList',
+			templateUrl : 'static/view/admin/supplier_submit_list.html',
+			controller : 'SupplierSubmitListCtrl',
+			controllerUrl : 'app/controllers/SupplierSubmitListCtrl'
+		})).state('supplierSubmitDetail', angularAMD.route({
+			// 供应商申请详情
+			url: '/supplierSubmit/:id',
+			templateUrl : 'static/view/admin/supplier_submit_detail.html',
+			controller : 'SupplierSubmitDetailCtrl',
+			controllerUrl : 'app/controllers/SupplierSubmitDetailCtrl'
 		})).state('mgr', angularAMD.route({
 			// 类目审批
 			url: '/audit/kind',
@@ -597,38 +615,26 @@
 			controllerUrl: 'app/controllers/product/KindAdviceCtrl',
 			title: '轮播图片管理'
 		})).state('logUsage', angularAMD.route({
-      //用户操作日志
-      url: '/logUsage',
-      templateUrl: 'static/view/admin/logUsage.html',
-      controller: 'LogUsageCtrl',
-      controllerUrl: 'app/controllers/LogUsageCtrl',
-      title: '用户操作日志'
-    })).state('seekQualityBuyer', angularAMD.route({
-
-      url: '/seekQualityBuyer',
-      templateUrl: 'static/view/admin/seekQualityBuyer.html',
-      controller: 'SeekQualityBuyerCtrl',
-      controllerUrl: 'app/controllers/SeekQualityBuyerCtrl',
-      title: '优质采购商'
-    })).state('seekSalesman', angularAMD.route({
-		url: '/seekSalesman',
-		templateUrl: 'static/view/admin/seek_salesman.html',
-		controller: 'SeekSalesmanCtrl',
-		controllerUrl: 'app/controllers/SeekSalesmanCtrl',
-		title: '求购-业务员分配'
-	})).state('seekSalesmandetail', angularAMD.route({
-		// 求购-业务员 查看详情
-		url: '/seekSalesman/:uuid/:name',
-		templateUrl : 'static/view/admin/seek_salesman_detail.html',
-		controller : 'SeekSalesmanDetailCtrl',
-		controllerUrl : 'app/controllers/SeekSalesmanDetailCtrl'
-    })).state('keyWord', angularAMD.route({
-      url: '/keyWord',
-      templateUrl: 'static/view/admin/keyword.html',
-      controller: 'KeyWordCtrl',
-      controllerUrl: 'app/controllers/KeyWordCtrl',
-      title: '非法关键词维护'
-    })).state('slideImage', angularAMD.route({
+			//用户操作日志
+			url: '/logUsage',
+			templateUrl: 'static/view/admin/logUsage.html',
+			controller: 'LogUsageCtrl',
+			controllerUrl: 'app/controllers/LogUsageCtrl',
+			title: '用户操作日志'
+		})).state('seekQualityBuyer', angularAMD.route({
+			//用户操作日志
+			url: '/seekQualityBuyer',
+			templateUrl: 'static/view/admin/seekQualityBuyer.html',
+			controller: 'SeekQualityBuyerCtrl',
+			controllerUrl: 'app/controllers/SeekQualityBuyerCtrl',
+			title: '用户操作日志'
+    	})).state('keyWord', angularAMD.route({
+			url: '/keyWord',
+			templateUrl: 'static/view/admin/keyword.html',
+			controller: 'KeyWordCtrl',
+			controllerUrl: 'app/controllers/KeyWordCtrl',
+			title: '非法关键词维护'
+    	})).state('slideImage', angularAMD.route({
 			// 首页展示(轮播图片管理)
 			url: '/operation/slideImage',
 			templateUrl: 'static/view/admin/operation/slideImage.html',
@@ -921,13 +927,6 @@
              }
          }
      });
-
-     // 币别filter
-     app.filter('currencyStr', function () {
-         return function (str) {
-             return typeof str == 'string' && str != 'RMB' && str != 'USD' ? str.startsWith('RMB') ? '¥' + str.substring(3, str.length) : '$' + str.substring(3, str.length) : '-';
-         }
-     });
-
+	
 	return app;
 });

+ 153 - 0
src/main/webapp/resources/js/admin/controllers/SupplierSubmitDetailCtrl.js

@@ -0,0 +1,153 @@
+define([ 'app/app' ], function(app) {
+	//供应商维护
+	app.register.controller('SupplierSubmitDetailCtrl', ['$scope', 'ngTableParams', 'toaster', 'BrandActive', '$stateParams', 'SupplierSubmit', 'Supplier', 'BaseService', '$window', 'StoreInfo', function($scope, ngTableParams, toaster, BrandActive, $stateParams, SupplierSubmit, Supplier, BaseService, $window, StoreInfo) {
+
+		// 获取申请信息
+		var getData = function () {
+			SupplierSubmit.get({id: $stateParams.id}, function (data) {
+				$scope.supplier = data;
+				getBrand($scope.supplier.branduuid);
+			}, function (response) {
+				toaster.pop('数据获取失败,请刷新重试');
+			})
+		};
+		
+		// 获取品牌信息
+		var getBrand = function (uuid) {
+			BrandActive.get({uuid : uuid}, {}, function(data){
+				$scope.brand = data;
+			}, function(res){
+				toaster.pop('error', '品牌详情数据加载失败', res.data);
+			});
+		};
+
+		getData();
+
+		// 获取供应商列表
+		$scope.supplierTableParams = new ngTableParams({
+			page : 1,
+			count : 5,
+			sorting : {
+				nameEn : 'ASC'
+			}
+		}, {
+			total : 0,
+			getData : function($defer, params) {
+				var param = BaseService.parseParams(params.url());
+				param.keyword = $scope.keyword;
+				Supplier.getPage(param, function(page) {
+					if (page) {
+						params.total(page.totalElements);
+						$defer.resolve(page.content);
+					}
+				});
+			}
+		});
+
+		/**
+		 * 选择店铺类型
+		 *
+		 * @param type	店铺类型
+		 */
+		$scope.chooseStoreType = function (type) {
+			if (!type || type === '')
+				return 0;
+			$scope.storeType = type;
+			$scope.storeStatus = '';
+
+			$scope.storeTableParams.page(1);
+			$scope.storeTableParams.reload();
+		};
+
+		/**
+		 * 根据关键字进行搜索
+		 */
+		$scope.refreshTableData = function () {
+			$scope.storeTableParams.page(1);
+			$scope.storeTableParams.reload();
+		};
+
+		/**
+		 * 选择店铺
+		 * @param supplier 供应商
+		 * @param store 店铺
+		 */
+		$scope.chooseStore = function (supplier, store) {
+			supplier.storeIn = store;
+			supplier.chooseStoreAssociated = false;
+		};
+
+		/**
+		 * 获取店铺信息
+		 */
+		var getStoreData = function () {
+			$scope.storeTableParams = new ngTableParams({
+				page : 1,
+				count : 5,
+				sorting : {
+					updateTime : 'DESC'
+				}
+			}, {
+				total : 0,
+				getData : function($defer, params) {
+					$scope.loading = true;
+					var param = BaseService.parseParams(params.url());
+					// 过滤店铺类型
+					if ($scope.storeType && $scope.storeType !== '' && $scope.storeType !== 'ALL') {
+						param.type = $scope.storeType;
+					}
+					// 根据关键字进行搜索
+					if ($scope.keyword && $scope.keyword !== '') {
+						param.keyword = $scope.keyword;
+					}
+					StoreInfo.pageStoreInfoWhenAdminQuery(param, function (data) {
+						if (!data.content || !Array.isArray(data.content)) {
+							data.content = [];
+						}
+						angular.forEach(data.content, function (store) {
+							var tags = JSON.parse(store.tags || '[]');
+							store.tagsObject = {};
+							for (var i = 0; i < tags.length; i++) {
+								store.tagsObject[tags[i]] = true;
+							}
+						});
+						$defer.resolve(data.content);
+						params.total(data.totalElements);
+					});
+				}
+			});
+		};
+
+		/**
+		 * 开关关联店铺
+		 * @param supplier 供应商
+		 */
+		$scope.storeAssociated = function (supplier){
+			supplier.chooseStoreAssociated = typeof supplier.chooseStoreAssociated == 'undefined' ? true : !supplier.chooseStoreAssociated;
+			if (supplier.chooseStoreAssociated) {
+				getStoreData();
+			}
+		};
+
+		// 审核通过
+		$scope.audit = function () {
+			$scope.supplier.storeuuid = $scope.supplier.storeIn == null ? null : $scope.supplier.storeIn.uuid;
+			SupplierSubmit.audit({}, $scope.supplier, function (data) {
+				toaster.pop('success', '审核通过');
+				$window.location.reload();
+			}, function (response) {
+				toaster.pop('error', response.data);
+			});
+		};
+
+		// 审核不通过
+		$scope.unaudit = function () {
+			SupplierSubmit.unaudit({id: $scope.supplier.id}, {}, function (data) {
+				toaster.pop('success', '审核不通过');
+				$window.location.reload();
+			}, function (response) {
+				toaster.pop('error', response.data);
+			});
+		};
+	}]);
+});

+ 60 - 0
src/main/webapp/resources/js/admin/controllers/SupplierSubmitListCtrl.js

@@ -0,0 +1,60 @@
+define([ 'app/app' ], function(app) {
+    //品牌审批
+    app.register.controller('SupplierSubmitListCtrl', ['$scope', 'ngTableParams', 'SupplierSubmit', 'BaseService', function($scope, ngTableParams, SupplierSubmit, BaseService) {
+        BaseService.scrollBackToTop();
+
+        $scope.active = 'unAudited';
+
+        $scope.keyword = "";
+        $scope.setActive = function(state) {
+            if($scope.active != state) {
+                $scope.active = state;
+                if($scope.supplierTableParams.page() == 1)
+                    $scope.supplierTableParams.reload();
+                else
+                    $scope.supplierTableParams.page(1);
+            }
+        };
+
+        var getStatus = function() {
+            var status = 601;
+            switch($scope.active) {
+                case 'all' :
+                    break;
+                case 'unAudited' :
+                    status = 101; break;
+                case 'allow' :
+                    status = 102; break;
+                case 'notAllow' :
+                    status = 103; break;
+            }
+            return  status;
+        };
+
+        $scope.supplierTableParams = new ngTableParams({
+            page : 1,
+            count : 50,
+            sorting : {
+                updatetime: 'DESC'
+            }
+        }, {
+            total : 0,
+            getData : function($defer, params) {
+                var param = BaseService.parseParams(params.url());
+                param.keyword = $scope.keyword;
+                param.status = getStatus();
+                SupplierSubmit.getPage(param, function(page) {
+                    if (page) {
+                        params.total(page.totalElements);
+                        $defer.resolve(page.content);					}
+                });
+            }
+        });
+
+        $scope.onSearch = function() {
+            $scope.supplierTableParams.page(1);
+            $scope.supplierTableParams.reload();
+        }
+
+    }]);
+});

+ 53 - 13
src/main/webapp/resources/js/admin/controllers/help/HelpDetailCtrl.js

@@ -3,7 +3,7 @@
  */
 define(['app/app'], function(app) {
     'use strict';
-    app.register.controller('HelpDetailCtrl', ['$scope', '$modal', 'HelpIssue', 'toaster', '$stateParams', 'HelpAPI', '$state', function ($scope, $modal, HelpIssue, toaster, $stateParams, HelpAPI, $state) {
+    app.register.controller('HelpDetailCtrl', ['$scope', '$modal', 'HelpIssue', 'toaster', '$stateParams', 'HelpAPI', '$state', '$http', 'BaseService', 'HelpUpload', '$q', function ($scope, $modal, HelpIssue, toaster, $stateParams, HelpAPI, $state, $http, BaseService, HelpUpload, $q) {
 
         HelpIssue.get({id : $stateParams.id}, function (data) {
             $scope.issue = data;
@@ -31,6 +31,26 @@ define(['app/app'], function(app) {
             }
         });
 
+        $scope.rootPath = BaseService.getRootPath();
+        function switchBase64ToImg(el) {
+            var deferred = $q.defer();
+            var data = el.src;
+            var arr = data.split(','), mime = arr[0].match(/:(.*?);/)[1],
+                bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
+            while(n--){
+                u8arr[n] = bstr.charCodeAt(n);
+            }
+            var obj = new Blob([u8arr], {type:mime});
+            var fd = new FormData();
+            fd.append("upfile", obj, "image.png");
+            return HelpUpload.upload(fd, function (data) {
+                el.src = data[0].path;
+                // console.log(el);
+            }, function (err) {
+                toaster.pop('error', '上传失败');
+            })
+        }
+
         // 选择导航
         $scope.chooseNav = function() {
             var modalInstance = $modal.open({
@@ -52,12 +72,22 @@ define(['app/app'], function(app) {
         $scope.save = function () {
             $scope.issue.article = quill.container.innerHTML.replace('\<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','').replace('contenteditable="true"', 'contenteditable="false"');
             $scope.issue.content = angular.toJson(quill.getContents());
-            HelpIssue.update({}, $scope.issue, function (data) {
-                toaster.pop('success', '保存成功');
-                $state.go('helpPublish');
-                window.location.href ='admin_n#/help/publish';// quilljs锁定了跳转 必须这样跳两次才有效
-            }, function(response) {
-                toaster.pop('error', response.data);
+            var els = $($scope.issue.article);
+            var imgs = els.find('img');
+            var promises = [];
+            angular.forEach(imgs, function (img) {
+                promises.push(switchBase64ToImg(img).$promise);
+            })
+            $q.all(promises).then(function () {
+                // console.log(els.html());
+                $scope.issue.article = els.html()
+                HelpIssue.update({}, $scope.issue, function (data) {
+                    toaster.pop('success', '保存成功');
+                    $state.go('helpPublish');
+                    window.location.href ='admin_n#/help/publish';// quilljs锁定了跳转 必须这样跳两次才有效
+                }, function(response) {
+                    toaster.pop('error', response.data);
+                });
             });
         };
 
@@ -65,12 +95,22 @@ define(['app/app'], function(app) {
         $scope.publish = function () {
             $scope.issue.article = quill.container.innerHTML.replace('\<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','').replace('contenteditable="true"', 'contenteditable="false"');
             $scope.issue.content = angular.toJson(quill.getContents());
-            HelpIssue.publish({}, $scope.issue, function (data) {
-                toaster.pop('success', '发布成功');
-                $state.go('helpPublish');
-                window.location.href = 'admin_n#/help/publish';
-            }, function(response) {
-                toaster.pop('error', response.data);
+            var els = $($scope.issue.article);
+            var imgs = els.find('img');
+            var promises = [];
+            angular.forEach(imgs, function (img) {
+                promises.push(switchBase64ToImg(img).$promise);
+            })
+            $q.all(promises).then(function () {
+                // console.log(els.html());
+                $scope.issue.article = els.html()
+                HelpIssue.publish({}, $scope.issue, function (data) {
+                    toaster.pop('success', '发布成功');
+                    $state.go('helpPublish');
+                    window.location.href = 'admin_n#/help/publish';
+                }, function(response) {
+                    toaster.pop('error', response.data);
+                });
             });
         };
         

+ 37 - 7
src/main/webapp/resources/js/admin/controllers/help/HelpEditCtrl.js

@@ -1,6 +1,6 @@
 define(['app/app'], function(app) {
     'use strict';
-    app.register.controller('HelpEditCtrl', ['$scope', '$modal', 'HelpIssue', 'toaster', '$state', function ($scope, $modal, HelpIssue, toaster, $state) {
+    app.register.controller('HelpEditCtrl', ['$scope', '$modal', 'HelpIssue', 'toaster', '$state', '$http', 'BaseService', 'HelpUpload', '$q', function ($scope, $modal, HelpIssue, toaster, $state, $http, BaseService, HelpUpload, $q) {
 
         $scope.issue = {};
 
@@ -31,16 +31,46 @@ define(['app/app'], function(app) {
             });
         };
 
+        $scope.rootPath = BaseService.getRootPath();
+        function switchBase64ToImg(el) {
+            var deferred = $q.defer();
+            var data = el.src;
+            var arr = data.split(','), mime = arr[0].match(/:(.*?);/)[1],
+                bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
+            while(n--){
+                u8arr[n] = bstr.charCodeAt(n);
+            }
+            var obj = new Blob([u8arr], {type:mime});
+            var fd = new FormData();
+            fd.append("upfile", obj, "image.png");
+            return HelpUpload.upload(fd, function (data) {
+                el.src = data[0].path;
+                // console.log(el);
+            }, function (err) {
+                toaster.pop('error', '上传失败');
+            })
+        }
+        
         // 保存
         $scope.save = function () {
             $scope.issue.article = quill.container.innerHTML.replace('\<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','').replace('contenteditable="true"', 'contenteditable="false"');
             $scope.issue.content = angular.toJson(quill.getContents());
-            HelpIssue.save({}, $scope.issue, function (data) {
-                toaster.pop('success', '保存成功');
-                $state.go('helpDetail',{id : data.id});
-                window.location.href = '#/help/issue/' + data.id;// quilljs锁定了跳转 必须这样跳两次才有效
-            }, function(response) {
-                toaster.pop('error', response.data);
+            var els = $($scope.issue.article);
+            var imgs = els.find('img');
+            var promises = [];
+            angular.forEach(imgs, function (img) {
+                promises.push(switchBase64ToImg(img).$promise);
+            })
+            $q.all(promises).then(function () {
+                // console.log(els.html());
+                $scope.issue.article = els.html()
+                HelpIssue.save({}, $scope.issue, function (data) {
+                    toaster.pop('success', '保存成功');
+                    $state.go('helpDetail',{id : data.id});
+                    window.location.href = '#/help/issue/' + data.id;// quilljs锁定了跳转 必须这样跳两次才有效
+                }, function(response) {
+                    toaster.pop('error', response.data);
+                });
             });
         };
 

+ 319 - 0
src/main/webapp/resources/js/admin/controllers/supplierMaintenanceCtrl.js

@@ -0,0 +1,319 @@
+define([ 'app/app' ], function(app) {
+	//供应商维护
+	app.register.controller('supplierMaintenanceCtrl', ['$scope', 'ngTableParams', 'toaster', 'BrandActive', '$stateParams', 'SupplierSubmit', 'Loading', 'BaseService', '$window', 'Supplier', 'StoreInfo', '$upload', function($scope, ngTableParams, toaster, BrandActive, $stateParams, SupplierSubmit, Loading, BaseService, $window, Supplier, StoreInfo, $upload) {
+		$scope.storeType = '';
+		$scope.addedSupplier = false;
+		$scope.brandKeyword = '';
+
+		// 根据路由地址获取品牌信息
+		var getBrand = function () {
+			BrandActive.get({uuid : $stateParams.uuid}, {}, function(data){
+				$scope.brand = data;
+			}, function(res){
+				toaster.pop('error', '品牌详情数据加载失败', res.data);
+			});
+		};
+		getBrand();
+
+        // 获取供应商信息
+		var loadSupplier = function () {
+			$scope.supplierTableParams = new ngTableParams({
+				page : 1,
+				count : 5,
+				sorting : {
+					submitTime : 'DESC'
+				}
+			}, {
+				total : 0,
+				getData : function($defer, params) {
+					$scope.loading = true;
+					var param = BaseService.parseParams(params.url());
+					param.uuid = $stateParams.uuid;
+					Supplier.getPage(param, function(data){
+						$defer.resolve(data.content);
+						params.total(data.totalElements);
+						$scope.suppliersData = data.content;
+						angular.forEach($scope.suppliersData, function (item) {
+							item.edit = false;
+						})
+						$scope.addedSupplier = false;
+					})
+				}
+			});
+		};
+        loadSupplier();
+
+		// 删除供应商信息
+		$scope.deleteSupplier = function(flag, supplier) {
+			SupplierSubmit.deleteById({id : flag}, function(){
+				toaster.pop('info', '提示', "删除申请已提交待审核");
+			});
+			supplier.edit = false;
+			$scope.supplierTableParams.page(1);
+			$scope.supplierTableParams.reload();
+		};
+
+		// 取消修改供应商信息
+		$scope.cancelSupplier = function (supplier) {
+			supplier.storeIn =supplier.oldStoreIn;
+			toaster.pop('info', '提示', "取消修改");
+			supplier.edit = false;
+		};
+
+		// 下载模板
+		$scope.download = function () {
+			Loading.show();
+			window.location.href = BaseService.getRootPath() + '/produce/vendorSubmit/template';
+			Loading.hide();
+		};
+
+		// 新增供应商信息
+		$scope.addSupplier = function() {
+			angular.forEach($scope.suppliersData, function (item) {
+				item.edit = false;
+			})
+			$scope.addedSupplier = !$scope.addedSupplier
+		};
+
+		// 保存新增供应商信息
+		$scope.sure = function(supplier) {
+			supplier.img = supplier.editImg;
+			supplier.branduuid = $stateParams.uuid;
+			supplier.storeuuid = supplier.storeIn == null ? null : supplier.storeIn.uuid;
+            if (!supplier.vendorName) {
+                toaster.pop('error', '代理商名称不能为空');
+                return;
+            }
+			SupplierSubmit.submit({},supplier,function(data){
+				toaster.pop('success', '提示', "申请成功");
+				data.isSubmited = '2';
+				$scope.supplierTableParams.data.push(data);
+				$scope.supplier = {};
+				$scope.addedSupplier = false;
+			},function(res){
+				toaster.pop('error', '警告', res.data);
+			});
+		};
+
+		// 取消保存新增供应商
+		$scope.cancelAddSupplier = function () {
+			toaster.pop('info', '提示', "取消新增");
+			$scope.supplier = {};
+			$scope.addedSupplier = false;
+		};
+
+		// 更改供应商信息
+		$scope.changeSupplier = function (supplier) {
+			angular.forEach($scope.suppliersData, function (item) {
+				item.edit = false;
+			})
+			supplier.oldStoreIn = supplier.storeIn;
+			supplier.edit = true;
+			supplier.editImg = supplier.img;
+			supplier.editVendorName = supplier.vendorName;
+			supplier.editLicense = supplier.license;
+			supplier.editDetailAddress = supplier.detailAddress;
+			supplier.editTel = supplier.tel;
+			supplier.editFax = supplier.fax;
+			supplier.editWebsite = supplier.website;
+			supplier.editEmail = supplier.email;
+			supplier.vendorid = supplier.id;
+			$scope.addedSupplier = false;
+		};
+
+		// 保存更改后的供应商信息
+		$scope.updateSupplier = function(supplier){
+			var updateSupplier = inverseSupplier(supplier)
+			if (!updateSupplier.vendorName) {
+				toaster.pop('error', '代理商名称不能为空');
+				return;
+			}
+			SupplierSubmit.updateSupplier({}, updateSupplier, function(data){
+				toaster.pop('success', '供应商信息申请成功');
+				supplier.edit = false;
+				$scope.supplierTableParams.page(1);
+				$scope.supplierTableParams.reload();
+			}, function(response){
+				toaster.pop('error', '申请失败', response.data);
+			});
+		};
+
+        /**
+         * 初始化修改的供应商信息
+         * @param supplier 供应商信息
+         */
+		var inverseSupplier = function (supplier) {
+			var a = {};
+            a.img = supplier.editImg;
+            a.vendorName = supplier.editVendorName;
+            a.license = supplier.editLicense;
+            a.detailAddress = supplier.editDetailAddress;
+            a.tel = supplier.editTel;
+            a.fax = supplier.editFax;
+            a.website = supplier.editWebsite;
+            a.email = supplier.editEmail;
+            a.vendorid = supplier.id != null ? supplier.id : null;
+            a.branduuid = $stateParams.uuid;
+            a.storeuuid = supplier.storeIn == null ? null : supplier.storeIn.uuid;
+            return a;
+		};
+
+		/**
+		 * 获取店铺信息
+		 */
+		var getStoreData = function () {
+            $scope.storeTableParams = new ngTableParams({
+                page : 1,
+                count : 5,
+                sorting : {
+                    updateTime : 'DESC'
+                }
+            }, {
+                total : 0,
+                getData : function($defer, params) {
+                    $scope.loading = true;
+                    var param = BaseService.parseParams(params.url());
+                    // 过滤店铺类型
+                    if ($scope.storeType && $scope.storeType !== '' && $scope.storeType !== 'ALL') {
+                        param.type = $scope.storeType;
+                    }
+                    // 根据关键字进行搜索
+                    if ($scope.brandKeyword && $scope.brandKeyword !== '') {
+                        param.keyword = $scope.brandKeyword;
+                    }
+					StoreInfo.pageStoreInfoWhenAdminQuery(param, function (data) {
+						if (!data.content || !Array.isArray(data.content)) {
+							data.content = [];
+						}
+						angular.forEach(data.content, function (store) {
+							var tags = JSON.parse(store.tags || '[]');
+							store.tagsObject = {};
+							for (var i = 0; i < tags.length; i++) {
+								store.tagsObject[tags[i]] = true;
+							}
+						});
+						$defer.resolve(data.content);
+						params.total(data.totalElements);
+					});
+                }
+            });
+        };
+
+		// 上传Excel批量申请(大量)
+		$scope.upload = function() {
+			var file = $scope.myFiles[0];
+			$upload.upload({
+				url: 'produce/vendorSubmit/upload',
+				file: file,
+				method: 'POST'
+			}).success(function(data) {
+				toaster.pop('success', '提示', '提交成功');
+			}).error(function(response) {
+				toaster.pop('error', '提示', response);
+			});
+		};
+
+		/**
+		 * 选择店铺类型
+		 *
+		 * @param type	店铺类型
+		 */
+		$scope.chooseStoreType = function (type) {
+			if (!type || type === '')
+				return 0;
+			$scope.storeType = type;
+			$scope.storeStatus = '';
+
+			$scope.storeTableParams.page(1);
+			$scope.storeTableParams.reload();
+		};
+
+		/**
+		 * 根据关键字进行搜索
+		 */
+		$scope.refreshTableData = function (keyword) {
+      $scope.brandKeyword = keyword;
+			$scope.storeTableParams.page(1);
+			$scope.storeTableParams.reload();
+		};
+
+		/**
+		 * 选择店铺
+		 * @param supplier 供应商
+		 * @param store 店铺
+		 */
+		$scope.chooseStore = function (supplier, store) {
+			supplier.storeIn = store;
+      $scope.brandKeyword = '';
+			supplier.chooseStoreAssociated = false;
+		};
+
+		/**
+		 * 开关关联店铺
+		 * @param supplier 供应商
+		 */
+		$scope.storeAssociated = function (supplier){
+      $scope.brandKeyword = '';
+			supplier.chooseStoreAssociated = typeof supplier.chooseStoreAssociated == 'undefined' ? true : !supplier.chooseStoreAssociated;
+			if (supplier.chooseStoreAssociated) {
+				getStoreData();
+			}
+		};
+
+		/**
+		 * 上传修改供应商图片
+		 */
+		$scope.supplier = {};
+		$scope.onUploadImage = function ($data, supplier) {
+			if (!$data || !$data.path) {
+				toaster.pop('error', '图片上传失败');
+				return ;
+			}
+			supplier.editImg = $data.path;
+		};
+
+		/**
+		 * 删除修改供应商图片
+		 */
+		$scope.deleteImage = function (supplier) {
+			delete supplier.editImg;
+		};
+
+		/**
+		 * 上传新增供应商图片
+		 */
+		$scope.addImg = '';
+		$scope.onUploadImg = function ($data) {
+			if (!$data || !$data.path) {
+				toaster.pop('error', '图片上传失败');
+				return ;
+			}
+			$scope.addImg = $data.path;
+		};
+
+		/**
+		 * 删除新增供应商图片
+		 */
+		$scope.deleteAddImg = function () {
+			delete $scope.addImg;
+		};
+
+		/**
+		 * 查看大图
+		 *
+		 * @param imgUrl		图片链接
+		 */
+		function showImg (imgUrl) {
+			var src = imgUrl, box = $('#image-box'), modal = $('.modal-content');
+			box.show();
+			box.find('img').attr('src', src);
+			box.find('a').click(function(){
+				box.hide();
+			});
+			box.dblclick(function(){
+				box.hide();
+			});
+		}
+
+	}]);
+});

+ 1 - 1
src/main/webapp/resources/js/common/directives.js

@@ -847,7 +847,7 @@ define(['angular', 'showdown', 'angular-toaster'], function(angular) {
 				var errorSizeMsg = attr.errorSizeMsg;
 
 				// 设置图片预览
-				element.append('<img class=previewImage title="请上传附件"/>');
+				element.append('<img class=previewImage title=""/>');
 				var previewImage = $(element).find('.previewImage');
 				previewImage.attr('src', attr.src);
 

+ 10 - 0
src/main/webapp/resources/js/common/query/help.js

@@ -115,5 +115,15 @@ define([ 'ngResource' ], function() {
                 method: 'GET'
             }
         })
+    }]).factory('HelpUpload', ['$resource', 'BaseService', function ($resource) {
+        //文章编辑图片处理
+        return $resource('file', {}, {
+            upload: {
+                url: 'file',
+                method: 'POST',
+                headers : {'Content-Type' : undefined},
+                isArray: true
+            }
+        })
     }]);
 });

+ 83 - 0
src/main/webapp/resources/js/common/query/supplier.js

@@ -0,0 +1,83 @@
+define([ 'ngResource' ], function() {
+	angular.module('supplierServices', [ 'ngResource' ]).factory('SupplierAPI', ['$resource', 'BaseService', function($resource, BaseService) {
+		const rootPath = BaseService.getRootPath();
+		// 供应商
+		return $resource('api/produce/vendorlist', {}, {
+			/*
+			 * 分页获取品牌供应商信息
+			 */
+			getPage : {
+				url: rootPath + '/api/produce/vendorlist/:uuid',
+				method: 'GET'
+			}
+		});
+	}]).factory('Supplier', ['$resource', 'BaseService', function($resource, BaseService) {
+		const rootPath = BaseService.getRootPath();
+		// 供应商
+		return $resource('produce/vendorlist', {}, {
+			/*
+			 * 分页获取品牌供应商信息
+			 */
+			getPage : {
+				url: rootPath + '/produce/vendorlist/:uuid',
+				method: 'GET'
+			}
+		});
+	}]).factory('SupplierSubmit', ['$resource', 'BaseService', function($resource, BaseService) {
+		const rootPath = BaseService.getRootPath();
+		// 供应商申请
+		return $resource('/produce/vendorSubmit', {}, {
+			/*
+			 * 获取品牌供应商申请信息
+			 */
+			get: {
+				url: rootPath + '/produce/vendorSubmit/:id',
+				method: 'GET'
+			},
+
+			/*
+			 * 删除品牌供应商申请信息
+			 */
+			deleteById: {
+				url: rootPath + '/produce/vendorSubmit/:id',
+				method: 'DELETE'
+			},
+
+			/*
+			 * 分页获取品牌供应商申请信息
+			 */
+			getPage : {
+				url: rootPath + '/produce/vendorSubmit/page',
+				method: 'GET'
+			},
+			/*
+			 * 保存
+			 */
+			submit: {
+				url : rootPath + '/produce/vendorSubmit',
+				method : 'POST'
+			},
+			/*
+			 * 更新供应商申请
+			 */
+			updateSupplier: {
+				url : rootPath + '/produce/vendorSubmit/update',
+				method : 'POST'
+			},
+			/*
+			 * 审核通过
+			 */
+			audit: {
+				url : rootPath + '/produce/vendorSubmit/audit',
+				method : 'POST'
+			},
+			/*
+			 * 审核不通过
+			 */
+			unaudit: {
+				url : rootPath + '/produce/vendorSubmit/unaudit/:id',
+				method : 'POST'
+			}
+		});
+	}])
+});

+ 833 - 0
src/main/webapp/resources/view/admin/brand_add.html

@@ -0,0 +1,833 @@
+<style type="text/css">
+	.padding-left-5 {
+		padding: 5px 30px;
+	}
+
+	.dashboard-avatar-brand {
+		height: 50px;
+		width: 50px;
+		padding: 1px;
+		float: left;
+		margin-left: 15px;
+		margin-right: 15px;
+		border: 1px solid #EBEBEB;
+	}
+
+	.border_top {
+		/*border-top: 1px solid #f5f5f5;*/
+	}
+	.border_top .pull-right {
+		margin-top: 45px;
+	}
+	.border_bottom {
+		border-bottom: 1px solid #f5f5f5;
+	}
+
+	.margintop {
+		margin-top: 2px;
+	}
+
+	.box-content .form-horizontal .span12 {
+		margin-left: 0px;
+	}
+
+	.radio-inline {
+		position: relative;
+		display: inline-block;
+		padding-left: 20px;
+		font-weight: 400;
+		vertical-align: middle;
+		cursor: pointer;
+	}
+
+	.width100 {
+		width: 100%;
+	}
+	.box-header h2{
+		float: none;
+	}
+	/*供应商维护*/
+	.box-contents{
+		padding: 0 ;
+	}
+	.box-top{
+		overflow: hidden;
+		padding: 0 10px;
+		height: 50px;
+		line-height: 50px;
+		border-bottom: 1px solid #dcdcdc;
+	}
+	.box-top .maintenance{
+		margin: 0;
+		float: left;
+		height: 50px;
+		line-height: 50px;
+		font-size: 16px;
+		color: #317eac;
+	}
+	.box-top .load{
+		float: right;
+		height: 50px;
+		line-height: 50px;
+	}
+	.box-top .load div:first-child {
+		float: left;
+		font-size: 14px;
+		color: #666;
+	}
+	.box-top .load div:first-child a{
+		font-size: 14px;
+		color: #4fb2eb;
+	}
+	.box-top .load div:last-child{
+		margin-top: 8px;
+		margin-left: 20px;
+		position: relative;
+		float: left;
+		width: 290px;
+	}
+	.box-top .load div:last-child input[type='text']{
+		padding-left: 7px;
+		width: 190px;
+		height: 34px;
+		line-height: 34px;
+		border: 1px solid #c0c6ca;
+	}
+	.box-top .load div:last-child input[type='file']{
+		position: absolute;
+		top: 7px;
+		left: 7px;
+		width: 190px;
+		height: 20px;
+	}
+	.box-top .load div:last-child button{
+		position: absolute;
+		right: 0;
+		top: 5px;
+		width: 79px;
+		height: 25px;
+		line-height: 25px;
+		font-size: 14px;
+		color: #fff;
+		background: #3caae8;
+		border-radius: 3px;
+		border: none;
+		outline: none;
+	}
+	.box-bottom table{
+		table-layout: fixed ;
+	}
+	.box-bottom table thead{
+		width: 100%;
+		height: 40px;
+		line-height: 40px;
+		background: #f1f1f1;
+		border-bottom: 1px solid #dcdcdc;
+	}
+	.box-bottom table thead th{
+		font-size: 14px;
+		color: #333;
+		text-align: center;
+		vertical-align: middle ;
+
+	}
+	.box-bottom table thead th:nth-child(2){
+		text-align: left;
+		padding-left: 60px;
+	}
+	.box-bottom table tbody tr{
+		text-align: center ;
+		border-bottom: 1px solid #dcdcdc;
+	}
+	.box-bottom table td .agency{
+		height: 73px;
+		line-height: 73px;
+	}
+	/*遮罩层*/
+	.box-bottom table td .agency .uploadImg .hover-show{
+		position: absolute;
+		width: 100%;
+		height: 100%;
+		top: 0;
+		left: 0;
+		background: rgba(0,0,0,.5);
+		z-index: 100;
+		display: block;
+	}
+	.box-bottom table td .agency .uploadImg .hover-show .delete{
+		position: absolute;
+		top: -12px;
+		right: 0px;
+		padding: 0;
+		width: 20px;
+		height: 20px;
+		float: right;
+		text-align: center;
+		cursor: pointer;
+	}
+	.box-bottom table td .agency .uploadImg .hover-show .delete i{
+		color: #fff;
+		font-size: 18px;
+	}
+	.box-bottom table td .agency .uploadImg .hover-show a i{
+		position: absolute;
+		left: 5px;
+		top: 22px;
+		margin-right: 5px;
+		font-size: 16px;
+	}
+	.box-bottom table td .agency .uploadImg{
+		position: relative ;
+		margin: 12px 0 0 20px;
+		float: left;
+		width: 100px;
+		height: 50px;
+		line-height: 50px;
+		border: 1px solid #dcdcdc;
+	}
+	.box-bottom table td .agency .uploadImg img{
+		width: 100%;
+		height: 100%;
+	}
+	.box-bottom table td .agency .uploadImg	div{
+		position: relative;
+		width: 98px;
+		height: 22px;
+	}
+	.box-bottom table td .agency .uploadImg	div input{
+		position: absolute;
+		top: 15px;
+		left: 18px;
+		width: 53px;
+		height: 100%;
+		opacity: 0;
+	}
+	.box-bottom table td .agency .uploadImg span{
+		position: absolute;
+		top: 0;
+		right: 34%;
+		font-size: 12px;
+		color: #fff;
+		cursor: pointer;
+	}
+	.box-bottom table td input{
+		/*padding: 0 15px;*/
+		width: 80%;
+		height: 29px;
+		line-height: 29px;
+		text-align: center;
+		font-size: 12px;
+		color: #666;
+		background: #f4f4f4;
+		border: 1px solid #dcdcdc;
+	}
+
+	.box-bottom table td select{
+		padding: 0;
+		width: 98px;
+		height: 29px;
+		background: #f4f4f4;
+		border: 1px solid #dcdcdc;
+	}
+	.box-bottom table td span{
+		font-size: 14px;
+		color: #2fa4e7;
+	}
+	.box-bottom table tbody tr td span.operate {
+		display: inline-block;
+		height: 25px;
+		line-height: 25px;
+		width: 42px!important ;
+		font-size: 14px;
+		color: #2fa4e7!important ;
+		border-radius: 3px;
+		cursor: pointer;
+	}
+	.box-bottom table tbody tr td span.operate:hover {
+		background: #2fa4e7;
+		color: #fff!important ;
+	}
+	.box-bottom table tbody.add-supply{
+		height: 55px;
+	}
+	.box-bottom table tbody.add-supply tr{
+		height: 32px;
+		border-bottom: 1px dashed #d2d2d2;
+	}
+	.box-bottom table tbody.add-supply tr td{
+		position: relative;
+	}
+	.box-bottom table tbody.add-supply tr td span{
+		position: absolute;
+		width: 206px;
+		font-size: 14px;
+		color: #2fa4e7;
+		display: inline-block;
+		background: #fff;
+		cursor: pointer;
+	}
+	.box-bottom table tbody.add-supply tr td span em{
+		font-size: 14px;
+		font-style: normal;
+		color: #2fa4e7;
+		background: none;
+	}
+	.box-bottom table tbody.add-supply tr td span i{
+		margin-right: 5px;
+		font-size: 24px;
+		color: #2fa4e7;
+	}
+	.box-bottom table tbody.add-supply tr td img{
+		position: absolute;
+		top: -4px;
+		cursor: pointer;
+	}
+
+	.upImg img{
+		width: 100%;
+		height: 100%;
+	}
+	.box-bottom table tbody.edit tr td span{
+		display: inline-block;
+		max-width: 180px;
+		text-overflow: ellipsis;
+		white-space: nowrap ;
+		overflow: hidden ;
+		font-size: 12px;
+		color: #333333;
+	}
+	.box-bottom table tbody.edit tr td .agency span{
+		display: inline-block;
+		width: 200px;
+		text-overflow: ellipsis;
+		white-space: nowrap ;
+		overflow: hidden ;
+		font-size: 12px;
+		color: #333333;
+	}
+	/*选择关联店铺*/
+
+	.box-bottom table td .choose{
+		position: absolute;
+		top: 52px;
+		left: -55px;
+		z-index: 1000;
+		background: #fff;
+		border: 1px solid #2fa4e7;
+		width: 375px;
+		/*height: 220px;*/
+	}
+	.box-bottom table td .choose .top{
+		padding-left: 10px;
+		overflow: hidden;
+		width: 100%;
+		height: 34px;
+		line-height: 34px;
+	}
+	.box-bottom table td .choose .top span{
+		float: left;
+		font-size: 12px;
+		color: #2fa4e7;
+	}
+	.box-bottom table td .choose .top label{
+		float: left;
+		margin-left: 10px;
+	}
+	.box-bottom table td .choose .top label input{
+		float: left;
+		margin-top: 13px;
+		width: 10px;
+		height: 10px;
+	}
+	.box-bottom table td .choose .top label span{
+		margin-left: 5px;
+		font-size: 12px;
+		color: #666;
+		font-weight: normal;
+		float: left;
+	}
+	.box-bottom table td .choose .top .form-search{
+		float: left;
+		position: relative;
+		width: 176px;
+		height: 20px;
+	}
+	.box-bottom table td .choose .top .form-search input{
+		width: 156px;
+		height: 20px;
+		border-radius: 0;
+		border : 1px solid #2fa4e7;
+	}
+	.box-bottom table td .choose .top .form-search button{
+		position: absolute;
+		top: 8px;
+		right: 0;
+		width: 21px;
+		height: 20px;
+		line-height: 20px;
+		text-align: center;
+		background: #2fa4e7;
+		border: none;
+		outline: none;
+	}
+	.box-bottom table td .choose .top .form-search i{
+		font-size:12px;
+		color: #fff;
+	}
+	.box-bottom table td .choose table{
+		table-layout: fixed ;
+		width: 100%;
+	}
+	.box-bottom table td .choose table thead{
+		width: 100%;
+		height: 25px;
+		background: #e9e9e9;
+	}
+	.box-bottom table td .choose table thead tr{
+		width: 100%;
+		height: 25px;
+		line-height: 25px;
+		font-size: 14px;
+		font-weight: normal;
+		color: #333333;
+		text-align: center;
+	}
+	.box-bottom table td .choose table thead tr th:nth-child(2){
+		padding-left: 0;
+	}
+	.box-bottom table td .choose table tbody tr{
+		height: 25px;
+		vertical-align: middle ;
+	}
+	.box-bottom table td .choose table tr td{
+		border-bottom: 1px solid #e9e9e9;
+		font-size: 12px;
+		color: #666666;
+	}
+	.box-bottom table td .choose table td input{
+		width: 10px;
+		height: 10px;
+	}
+	/*上传图片*/
+	#uploadImg{
+		position: relative;
+		width: 150px;
+		height: 90px;
+		line-height: 90px;
+		text-align: center;
+		border-radius: 5px;
+		background: #7f7f7f;
+	}
+	#uploadImg .fa-upload{
+		font-size: 12px;
+		color: #fff;
+	}
+	#uploadImg span{
+		font-size: 12px;
+		color: #fff;
+	}
+	#uploadImg input{
+		position: absolute ;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		outline: none;
+		opacity: 0;
+	}
+</style>
+<div class="row-fluid-fluid sortable">
+	<!-- 品牌维护详情Start -->
+	<div class="box span9 page-header">
+		<div class="box-header well" data-original-title>
+			<h2><i class="icon-user"></i> 品牌维护详情</h2>
+		</div>
+		<div class="box-content">
+			<form class="form-horizontal" name="form1" novalidate>
+				<div class="span12">
+					<label class="span2 control-label">
+						<span class="text-required">*</span>中文品牌:
+					</label>
+					<div class="span9">
+						<input type="text" class="form-control input-sm" name="nameCn" required autofocus ng-blur="exist('Cn')"
+							   ng-model="BrandActiveData.nameCn" placeholder="输入品牌名称,例如:松下">
+					</div>
+				</div>
+				<div class="span12">
+					<label class="span2 control-label">
+						<span class="text-required">*</span>英文品牌:
+					</label>
+					<div class="span9">
+						<input type="text" class="form-control input-sm" name="nameEn" required autofocus ng-blur="exist('En')"
+							   ng-model="BrandActiveData.nameEn" placeholder="输入品牌名称,例如:Panasonic">
+					</div>
+				</div>
+				<div class="span12">
+					<label class="control-label"><span
+							class="text-required">*</span>官网地址:</label>
+					<div class="">
+						<input type="text" class="form-control input-sm" name="vendor" required
+							   ng-model="BrandActiveData.url" placeholder="输入品牌官网地址,例如:http://panasonic.cn/" autocomplete="off">
+					</div>
+				</div>
+				<div class="span12">
+					<label class="span2 control-label"><span
+							class="text-required">*</span>Logo:</label>
+					<div class="span9">
+						<div id="uploadImg">
+							<span><i class="fa fa-upload"></i>上传</span>
+							<input type="file">
+						</div>
+						<span class="help-block">品牌Logo,建议图片尺寸在150*90像素左右</span>
+					</div>
+				</div>
+				<div class="span12">
+					<label class="span2 control-label"><span
+							class="text-required">*</span>简介:</label>
+					<div class="span9">
+						<textarea ng-model="BrandActiveData.brief" required style="width:100%; height: 190px; float: left;border: #ccc 1px solid;"></textarea>
+					</div>
+				</div>
+				<div class="span12">
+					<label class="span2 control-label"><span
+							class="text-required">*</span>销售区域:</label>
+					<div class="span9">
+						<label class="radio-inline" ng-repeat="area in areas">
+							<input type="checkbox" name="area" ng-model="area.checked" value="area" style="margin-top: 2px;">
+							<span ng-bind="area.name"></span>
+						</label>
+						<hr>
+						<div class="well well-sm">
+							<div class="span12" ng-repeat="e in extraAreas">
+								<div class="span4">
+									<div class="input-group">
+										<input type="text" class="form-control input-sm" ng-model="e.name">
+										<span class="input-group-btn">
+											<button class="btn btn-default btn-sm" type="button" ng-click="removeExtraAreas($index)">删除</button>
+										</span>
+									</div>
+								</div>
+							</div>
+							<div class="span12">
+								<div class="span3">
+									<a ng-click="addExtraAreas()"><span
+											class="fa fa-plus-square fa-fw"></span>&nbsp;其他销售区域</a>
+								</div>
+								<div class="span8 text-muted">
+									如果您的品牌销售区域不在上述范围,您可以手动添加其他销售区域</div>
+							</div>
+						</div>
+					</div>
+				</div>
+			</form>
+
+			<form class="form-horizontal" name="form2" novalidate>
+				<div class="span12">
+					<label class="span2 control-label"><span
+							class="text-required">*</span>主打产品:</label>
+					<div class="span9">
+						<textarea rows="3" class="width100" name="series"
+								  ng-model="BrandActiveData.series" placeholder="输入主要生产产品,例如:车载继电器" required></textarea>
+					</div>
+				</div>
+				<div class="span12">
+					<label class="span2 control-label"><span
+							class="text-required">*</span>应用领域:</label>
+					<div class="span9">
+						<div>
+							<label class="radio-inline" ng-repeat="app in applications">
+								<input type="checkbox" name="application" ng-model="app.checked"
+									   value="app" style="margin-top: 1px;"> <span ng-bind="app.name"></span>
+							</label>
+						</div>
+						<hr>
+						<div class="well well-sm">
+							<div class="span12" ng-repeat="e in extraApp">
+								<div class="span4">
+									<div class="input-group">
+										<input type="text" class="form-control input-sm" ng-model="e.name">
+										<span class="input-group-btn">
+											<button class="btn btn-default btn-sm" type="button" ng-click="removeExtraApp($index)">删除</button>
+										</span>
+									</div>
+								</div>
+							</div>
+							<div class="span12">
+								<div class="span2">
+									<a ng-click="addExtraApp()"><span
+											class="fa fa-plus-square fa-fw"></span>&nbsp;其他领域</a>
+								</div>
+								<div class="span9 text-muted">
+									如果您的品牌应用领域不在上述范围,您可以手动添加其他领域</div>
+							</div>
+						</div>
+					</div>
+				</div>
+			</form>
+			<!-- <div class="page-header">
+				<h1>{{BrandActiveData.name}} </h1>
+				<h1><small class="padding-left-5" ng-bind-html="BrandActiveData.brief"></small></h1>
+			</div>
+			<ul class="dashboard-list">
+				<li style="border-bottom-width: 0px;">
+					<img class="dashboard-avatar-brand" alt="" ng-src="{{BrandActiveData.logoUrl}}">
+					<strong>品牌 : </strong> {{BrandActiveData.nameCn}}
+					<br>
+					<strong>制造商 : </strong> {{BrandActiveData.vendor}}<br>
+					<strong>地区 : </strong> {{BrandActiveData.area}}
+				</li>
+			</ul>
+			<div class="row-fluid-fluid">
+				<div class="span12">
+					<h3>主要产品</h3>
+					<p class="padding-left-5">
+						{{BrandActiveData.series}}
+					</p>
+				</div>
+			</div>
+			<div class="row-fluid-fluid">
+				<div class="span12">
+					<h3>应用领域</h3>
+					<p class="padding-left-5">
+						{{BrandActiveData.application}}
+					</p>
+				</div>
+			</div>
+			<div class="row-fluid-fluid">
+				<div class="span12">
+					<h3>经营成果</h3>
+					<p class="padding-left-5" ng-bind-html="BrandActiveData.achievement"></p>
+				</div>
+			</div> -->
+
+			<!--<div class="row-fluid-fluid border_top">-->
+			<!--<div class="span6"></div>-->
+			<!--<div class="span6">-->
+			<!--<p class="pull-right">-->
+			<!--<button ng-click="brandUpdate()" class="btn btn-large btn-danger"-->
+			<!--ng-disabled="form1.$invalid || form2.$invalid || nameExist">-->
+			<!--<i class="icon-ok icon-white"></i> 更新品牌-->
+			<!--</button>-->
+			<!--<a ng-href="#/brandmaintenance">-->
+			<!--<button type="button" class="btn btn-large btn-primary">-->
+			<!--<i class="icon-remove icon-white"></i> 返回列表-->
+			<!--</button>-->
+			<!--</a>-->
+			<!--</p>-->
+			<!--</div>-->
+			<!--</div>-->
+
+		</div>
+	</div>
+	<!-- 品牌维护详情End -->
+	<!--供应商维护 Start-->
+	<div class="box span9 page-header" style="padding-bottom: 27px;">
+		<div class="box-header well" data-original-title></div>
+		<div class="box-content box-contents">
+			<div class="box-top">
+				<h2 class="maintenance"><i class="icon-user"></i> 供应商维护</h2>
+				<div class="load">
+					<div>批量导入:<a href="">下载模板</a></div>
+					<div>
+						<input type="text" class="form-control"/>
+						<input type="file"/>
+						<button>确认上传</button>
+					</div>
+				</div>
+			</div>
+			<div class="box-bottom">
+				<table>
+					<thead>
+					<tr>
+						<th width="10%"></th>
+						<th width="15%">代理商</th>
+						<th width="5%">营业执照号</th>
+						<th width="20%">地址</th>
+						<th width="10%">电话</th>
+						<th width="10%">传真</th>
+						<th width="12%">网址</th>
+						<th width="5%">关联店铺</th>
+						<th width="10%">邮箱</th>
+						<th width="5%"></th>
+					</tr>
+					</thead>
+					<!--非修改状态-->
+					<tbody class="edit">
+					<tr>
+						<td>
+							<div class="agency">
+								<div class="uploadImg">
+									<img src="static/img/all/admin.png" alt=""/>
+								</div>
+							</div>
+						</td>
+						<td>
+							<span>深圳市华商龙商务互联科技有限公司</span>
+						</td>
+						<td>
+							<span>000000567</span>
+						</td>
+						<td>
+							<span>深圳市南山区科技园科技南五路英唐大厦一楼</span>
+						</td>
+						<td>
+							<span>0755-12345678</span>
+						</td>
+						<td>
+							<span>0755-12345678</span>
+						</td>
+						<td>
+							<span>http://www.wordshine.net.com</span>
+						</td>
+						<td>
+							<select name="" id="">
+								<option value="">选择关联店铺</option>
+							</select>
+						</td>
+						<td>
+							<span>12345678@qq.com</span>
+						</td>
+						<td><span class="operate">修改</span></td>
+					</tr>
+					</tbody>
+					<!--修改状态-->
+					<tbody>
+					<tr>
+						<td>
+							<div class="agency">
+								<div class="uploadImg">
+									<img src="static/img/all/admin.png" alt=""/>
+									<div class="hover-show">
+										<span class="delete" title="删除"><i class="fa fa-trash"></i></span>
+										<span class="update"><i class="fa fa-refresh" style="margin-right: 5px;"></i>更新</span>
+									</div>
+								</div>
+							</div>
+						</td>
+						<td>
+							<input type="text" class="comName"/>
+						</td>
+						<td>
+							<input type="text" class="license"/>
+						</td>
+						<td>
+							<input type="text" class="address"/>
+						</td>
+						<td>
+							<input type="text" class="phone"/>
+						</td>
+						<td>
+							<input type="text" class="fax"/>
+						</td>
+						<td>
+							<input type="text" class="network"/>
+						</td>
+						<td style="position: relative ">
+							<select name="" id="">
+								<option value="">选择关联店铺</option>
+							</select>
+							<div class="choose">
+								<div class="top">
+									<span>类型选择</span>
+									<label for="">
+										<input type="checkbox" class="fl">
+										<span class="fl">代理商</span>
+									</label>
+									<label for="">
+										<input type="checkbox" class="fl">
+										<span class="fl">经销商</span>
+									</label>
+									<div class="form-search">
+										<input type="text">
+										<button><i class="fa fa-search"></i></button>
+									</div>
+								</div>
+								<table>
+									<thead>
+									<tr>
+										<th width="30"></th>
+										<th width="70">店铺编号</th>
+										<th width="170">公司名称</th>
+										<th width="60">类型</th>
+									</tr>
+									</thead>
+									<tbody>
+									<tr>
+										<td><input type="checkbox"></td>
+										<td>000000501</td>
+										<td>深圳市萨科微科技有限公司</td>
+										<td>代理商</td>
+									</tr>
+									</tbody>
+								</table>
+								<div ng-table-pagination="params" template-url="templates.pagination" class="ng-scope ng-isolate-scope">
+									<div ng-include="templateUrl" class="ng-scope">
+										<div class="ng-table-pager ng-scope" ng-if="params.data.length">
+											<ul ng-if="pages.length" class="pagination ng-table-pagination ng-scope" style="float:right;margin-left:20px;">
+												<li><input type="number" class="page-number ng-pristine ng-untouched ng-valid" ng-model="page.redirectPage"></li>
+												<li><a href="" class="page-a" ng-click="params.page(page.redirectPage)">GO</a></li>
+											</ul>
+											<ul ng-if="pages.length" class="pagination ng-table-pagination ng-scope" style="float: right;">
+												<li ng-class="{'disabled': !page.active &amp;&amp; !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type" class="ng-scope disabled">
+													<a ng-switch-when="prev" ng-click="params.page(page.number)" href="" class="ng-scope">«</a>
+												</li>
+												<li ng-class="{'disabled': !page.active &amp;&amp; !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type" class="ng-scope active">
+													<a ng-switch-when="first" ng-click="params.page(page.number)" href="" class="ng-scope"><span ng-bind="page.number" class="ng-binding">1</span></a>
+												</li>
+												<li ng-class="{'disabled': !page.active &amp;&amp; !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type" class="ng-scope">
+													<a ng-switch-when="page" ng-click="params.page(page.number)" href="" class="ng-scope"><span ng-bind="page.number" class="ng-binding">2</span></a>
+												</li>
+												<li ng-class="{'disabled': !page.active &amp;&amp; !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type" class="ng-scope">
+													<a ng-switch-when="page" ng-click="params.page(page.number)" href="" class="ng-scope"><span ng-bind="page.number" class="ng-binding">3</span></a>
+												</li>
+												<li ng-class="{'disabled': !page.active &amp;&amp; !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type" class="ng-scope">
+													<a ng-switch-when="page" ng-click="params.page(page.number)" href="" class="ng-scope"><span ng-bind="page.number" class="ng-binding">4</span></a>
+												</li>
+												<li ng-class="{'disabled': !page.active &amp;&amp; !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type" class="ng-scope">
+													<a ng-switch-when="page" ng-click="params.page(page.number)" href="" class="ng-scope"><span ng-bind="page.number" class="ng-binding">5</span></a>
+												</li>
+												<li ng-class="{'disabled': !page.active &amp;&amp; !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type" class="ng-scope">
+													<a ng-switch-when="next" ng-click="params.page(page.number)" href="" class="ng-scope">»</a>
+												</li>
+											</ul>
+										</div>
+									</div>
+								</div>
+							</div>
+						</td>
+						<td>
+							<input type="text" class="mail"/>
+						</td>
+						<td><span class="operate">确认</span></td>
+					</tr>
+					</tbody>
+					<tbody class="add-supply">
+					<tr>
+						<td colspan="8">
+							<span><i class="fa fa-plus-circle"></i><em>新增供应商</em></span>
+							<img src="static/img/all/border_line.png" alt=""/>
+						</td>
+					</tr>
+					</tbody>
+				</table>
+			</div>
+		</div>
+	</div>
+	<div class="row-fluid-fluid border_top">
+		<div class="span6"></div>
+		<div class="span6">
+			<p class="pull-right">
+				<button ng-click="brandUpdate()" class="btn btn-large btn-danger"
+						ng-disabled="form1.$invalid || form2.$invalid || nameExist">
+					<i class="icon-ok icon-white"></i> 更新品牌
+				</button>
+				<a ng-href="#/brandmaintenance">
+					<button type="button" class="btn btn-large btn-primary">
+						<i class="icon-remove icon-white"></i> 返回列表
+					</button>
+				</a>
+			</p>
+		</div>
+	</div>
+	<!--供应商维护 End-->
+</div><!--/row-fluid-->

+ 43 - 5
src/main/webapp/resources/view/admin/brand_maintenance.html

@@ -118,15 +118,47 @@ div.row.total button:HOVER {
 /* 品牌搜索框 */
 .brand-search {
 	width: 30%;
+	float: left;
+}
+/*新增品牌*/
+.clearfix{
+	overflow: hidden;
+}
+.addBrand {
+	float: right;
+}
+.addBrand a{
+	display: inline-block;
+	width: 96px;
+	height: 38px;
+	line-height: 38px;
+	text-align: center;
+	font-size: 14px;
+	color: #fff;
+	background: #4fb2eb;
+	border-radius: 3px;
+}
+.addBrand a:visited, .addBrand a:hover, .addBrand a.active{
+	text-decoration: none;
+}
+.addBrand a i{
+	margin-right: 8px;
+	font-size: 14px;
+	color: #fff;
+}
+	table tbody tr td button{
+		float: left;
+	}
+table tbody tr td button:first-child {
+	margin-right: 5px;
 }
-
 </style>
 <div class="row">
 	<div class="col-xs-6">
 		<h2>品牌列表</h2>
 	</div>
 </div>
-<div>
+<div class="clearfix">
 	<div class="col-xs-1">
 		<p style="margin-top: 8px; font-weight: bold;">
 			共<span class="totalNum">{{brandTableParams.total()}}</span>条
@@ -139,7 +171,9 @@ div.row.total button:HOVER {
 			<button ng-click="onSearch()" class="btn btn-primary" type="button">搜索</button>
 		</span>
 	</div>
-	
+	<!--<div class="addBrand">-->
+		<!--<a href=""><i class="fa fa-plus-circle"></i>新增品牌</a>-->
+	<!--</div>-->
 </div>
 </br>
 <table ng-table="brandTableParams"
@@ -150,7 +184,7 @@ div.row.total button:HOVER {
 			<th class="text-center" style="width: 180px">品牌名</th>
 			<th class="text-center" style="width: 180px">英文品牌名</th>
 			<th class="text-center">制造商</th>
-			<th class="text-center" style="width: 120px">操作</th>
+			<th class="text-center" style="width: 250px">操作</th>
 		</tr>
 	</thead>
 	<tbody class="text-center">
@@ -159,11 +193,15 @@ div.row.total button:HOVER {
 			<td class="text-center">{{brand.nameCn}}</td>
 			<td class="text-center">{{brand.nameEn}}</td>
 			<td class="text-center">{{brand.vendor}}</td>
-			<td class="text-center">
+			<td class="text-left">
 				<a target="_blank" ng-href="#/brandmaintenance/{{brand.uuid}}">
 					<button type="button" class="btn btn-default">查看详情及更新
 					</button>
 				</a>
+				<a target="_blank" ng-href="#/suppliermaintenance/{{brand.uuid}}">
+					<button type="button" class="btn btn-default">供应商维护
+					</button>
+				</a>
 			</td>
 		</tr>
 		<tr ng-if="$data.length == 0">

+ 8 - 3
src/main/webapp/resources/view/admin/brand_maintenance_detail.html

@@ -14,9 +14,11 @@
 }
 
 .border_top {
-	border-top: 1px solid #f5f5f5;
+	/*border-top: 1px solid #f5f5f5;*/
+}
+.border_top .pull-right {
+	margin-top: 45px;
 }
-
 .border_bottom {
 	border-bottom: 1px solid #f5f5f5;
 }
@@ -41,6 +43,9 @@
 .width100 {
 	width: 100%;
 }
+.box-header h2{
+	float: none;
+}
 </style>
 <div class="row-fluid-fluid sortable">
 	<!-- 品牌维护详情Start -->	
@@ -203,6 +208,7 @@
 					<p class="padding-left-5" ng-bind-html="BrandActiveData.achievement"></p>
 				</div>
 			</div> -->
+
 			<div class="row-fluid-fluid border_top">
 				<div class="span6"></div>
 				<div class="span6">
@@ -223,5 +229,4 @@
 		</div>
 	</div>
 	<!-- 品牌维护详情End -->
-
 </div><!--/row-fluid-->

+ 899 - 0
src/main/webapp/resources/view/admin/supplier_maintenance.html

@@ -0,0 +1,899 @@
+<style type="text/css">
+	.padding-left-5 {
+		padding: 5px 30px;
+	}
+
+	.dashboard-avatar-brand {
+		height: 50px;
+		width: 50px;
+		padding: 1px;
+		float: left;
+		margin-left: 15px;
+		margin-right: 15px;
+		border: 1px solid #EBEBEB;
+	}
+
+	.border_top {
+		/*border-top: 1px solid #f5f5f5;*/
+	}
+	.border_top .pull-right {
+		margin-top: 45px;
+	}
+	.border_bottom {
+		border-bottom: 1px solid #f5f5f5;
+	}
+
+	.margintop {
+		margin-top: 2px;
+	}
+
+	.box-content .form-horizontal .row {
+		margin-left: 0px;
+	}
+
+	.radio-inline {
+		position: relative;
+		display: inline-block;
+		padding-left: 20px;
+		font-weight: 400;
+		vertical-align: middle;
+		cursor: pointer;
+	}
+
+	.width100 {
+		width: 100%;
+	}
+	.box-header h2{
+		float: none;
+	}
+	/*供应商维护*/
+	.box-contents{
+		padding: 0 ;
+	}
+	.box-top{
+		padding: 0 10px;
+		height: 50px;
+		line-height: 50px;
+		overflow: hidden;
+		border-bottom: 1px solid #dcdcdc;
+	}
+	.box-top .maintenance{
+		float: left;
+		margin: 0;
+		height: 50px;
+		line-height: 50px;
+		font-size: 16px;
+		color: #317eac;
+	}
+	.box-bottom table{
+		width: 100%;
+		table-layout: fixed ;
+	}
+	.box-bottom table thead{
+		width: 100%;
+		height: 40px;
+		line-height: 40px;
+		background: #f1f1f1;
+		border-bottom: 1px solid #dcdcdc;
+	}
+	.box-bottom table thead th{
+		font-size: 14px;
+		color: #333;
+		text-align: center;
+		vertical-align: middle ;
+
+	}
+	.box-bottom table thead th:nth-child(2){
+		padding-left: 60px;
+		text-align: left;
+	}
+	.box-bottom table tbody tr{
+		text-align: center ;
+		border-bottom: 1px solid #dcdcdc;
+	}
+	.box-bottom table td .agency{
+		height: 73px;
+		line-height: 73px;
+	}
+	/*遮罩层*/
+	.box-bottom table td .agency .uploadImg .hover-show{
+		position: absolute;
+		width: 100%;
+		height: 100%;
+		top: 0;
+		left: 0;
+		background: rgba(0,0,0,.5);
+		z-index: 100;
+		display: none;
+	}
+	.box-bottom table td .agency .uploadImg .hover-shows{
+		display: block;
+	}
+	.box-bottom table td .agency .uploadImg:hover .hover-show{
+		display: block;
+	}
+	.box-bottom table td .agency .uploadImg .hover-show .delete{
+		float: right;
+		position: absolute;
+		top: 0;
+		right: 0;
+		padding: 0;
+		width: 20px;
+		height: 20px;
+		text-align: center;
+		overflow: visible;
+		cursor: pointer;
+		z-index: 10000000;
+	}
+	.box-bottom table td .agency .uploadImg .hover-show .update{
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 98px;
+		height: 48px;
+		color: #fff;
+		font-size: 14px;
+		cursor: pointer;
+	}
+	.box-bottom table td .agency .uploadImg .hover-show .update i{
+		color: #fff;
+		font-size: 14px;
+	}
+	.box-bottom table td .agency .uploadImg .hover-show .delete i{
+		color: #fff;
+		font-size: 18px;
+	}
+	.box-bottom table td .agency .uploadImg .hover-show a i{
+		position: absolute;
+		left: 5px;
+		top: 22px;
+		margin-right: 5px;
+		font-size: 16px;
+	}
+	.box-bottom table td .agency .uploadImg{
+		float: left;
+		position: relative ;
+		margin: 12px 0 0 20px;
+		width: 100px;
+		height: 50px;
+		line-height: 50px;
+		overflow: hidden ;
+		border: 1px solid #dcdcdc;
+	}
+	.box-bottom table td .agency .uploadImg img{
+		width: 100%;
+		height: 100%;
+	}
+	.box-bottom table td .agency .uploadImg img.uploadNew {
+		position: absolute;
+		top: 0;
+		left: 0;
+		z-index: 0;
+	}
+	.box-bottom table td .agency .uploadImg	div{
+		position: relative;
+		width: 98px;
+		height: 22px;
+	}
+	.box-bottom table td .agency .uploadImg	div.preview {
+		width: 98px;
+		height: 50px;
+		z-index: 10000 !important;
+	}
+	.box-bottom table td .agency .uploadImg	div input{
+		position: absolute;
+		top: 15px;
+		left: 18px;
+		width: 53px;
+		height: 100%;
+		opacity: 0;
+	}
+	.box-bottom table tbody.edit tr td .agency .uploadImg span{
+		position: absolute;
+		top: 10px;
+		right: 34%;
+		width: auto;
+		font-size: 12px;
+		color: #fff;
+		cursor: pointer;
+		z-index: 10;
+	}
+	.box-bottom table td .agency .uploadImg .hover-show .update .preview {
+		z-index: 10000;
+	}
+	.box-bottom table td input{
+		/*padding: 0 15px;*/
+		width: 80%;
+		height: 29px;
+		line-height: 29px;
+		text-align: center;
+		font-size: 12px;
+		color: #666;
+		background: #f4f4f4;
+		border: 1px solid #dcdcdc;
+	}
+	.box-bottom table td input.mail {
+		margin-left: 53%;
+		width: 50%;
+	}
+
+	.box-bottom table td select{
+		padding: 0;
+		width: 98px;
+		height: 29px;
+		background: #f4f4f4;
+		border: 1px solid #dcdcdc;
+	}
+	.box-bottom table td button{
+		padding: 0;
+		width: 98px;
+		height: 29px;
+		background: #f4f4f4;
+		border: 1px solid #dcdcdc;
+		outline: none;
+		overflow: hidden;
+		text-overflow: ellipsis ;
+		white-space: nowrap ;
+	}
+	.box-bottom table td span{
+		font-size: 14px;
+		color: #2fa4e7;
+	}
+	.box-bottom table tbody tr td span.operate {
+		display: inline-block;
+		height: 25px;
+		line-height: 25px;
+		width: 42px !important;
+		font-size: 14px;
+		color: #2fa4e7 !important;
+		border-radius: 3px;
+		cursor: pointer;
+	}
+	.box-bottom table tbody tr td span.operate:hover {
+		background: #2fa4e7;
+		color: #fff !important ;
+	}
+	.box-bottom table tbody.add-supply{
+		height: 55px;
+	}
+	.box-bottom table tbody.add-supply tr{
+		height: 32px;
+		border-bottom: 1px dashed #d2d2d2;
+	}
+	.box-bottom table tbody.add-supply tr td{
+		position: relative;
+	}
+	.box-bottom table tbody.add-supply tr td span{
+		display: inline-block;
+		position: absolute;
+		bottom: -5px;
+		width: 206px;
+		font-size: 14px;
+		color: #2fa4e7;
+		background: #fff;
+		cursor: pointer;
+	}
+	.box-bottom table tbody.add-supply tr td span em{
+		font-size: 14px;
+		font-style: normal;
+		color: #2fa4e7;
+		background: none;
+	}
+	.box-bottom table tbody.add-supply tr td span i{
+		margin-right: 5px;
+		font-size: 18px;
+		color: #2fa4e7;
+	}
+	.box-bottom table tbody.add-supply tr td img{
+		position: absolute;
+		top: -4px;
+		cursor: pointer;
+		z-index: -1;
+	}
+
+	.upImg img{
+		width: 100%;
+		height: 100%;
+	}
+	.box-bottom table tbody.edit tr td span{
+		display: inline-block;
+		max-width: 90px;
+		height: 30px;
+		line-height: 30px;
+		font-size: 12px;
+		color: #333333;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+		overflow: hidden;
+	}
+	.box-bottom table tbody.edit tr td span.emails {
+		margin-left: 60px;
+		max-width: 50px;
+	}
+	.box-bottom table tbody.edit tr td .agency span{
+		display: inline-block;
+		width: 200px;
+		font-size: 12px;
+		color: #333333;
+		text-overflow: ellipsis;
+		white-space: nowrap ;
+		overflow: hidden ;
+	}
+	/*选择关联企业*/
+
+	.box-bottom table td .choose{
+		position: absolute;
+		top: 52px;
+		left: -55px;
+		width: 375px;
+		/*height: 220px;*/
+		background: #fff;
+		border: 1px solid #2fa4e7;
+		z-index: 1000;
+	}
+	.box-bottom table td .choose .top{
+		padding-left: 10px;
+		width: 100%;
+		height: 34px;
+		line-height: 34px;
+		overflow: hidden;
+	}
+	.box-bottom table td .choose .top span{
+		float: left;
+		font-size: 12px;
+		color: #2fa4e7;
+	}
+	.box-bottom table td .choose .top label{
+		float: left;
+		margin-left: 10px;
+	}
+	.box-bottom table td .choose .top label input{
+		float: left;
+		margin-top: 13px;
+		width: 10px;
+		height: 10px;
+	}
+	.box-bottom table td .choose .top label span{
+		float: left;
+		margin-left: 5px;
+		font-size: 12px;
+		color: #666;
+		font-weight: normal;
+	}
+	.box-bottom table td .choose .top .form-search{
+		float: left;
+		position: relative;
+		width: 176px;
+		height: 20px;
+	}
+	.box-bottom table td .choose .top .form-search input{
+		width: 156px;
+		height: 20px;
+		border-radius: 0;
+		border : 1px solid #2fa4e7;
+	}
+	.box-bottom table td .choose .top .form-search button{
+		position: absolute;
+		top: 8px;
+		right: 0;
+		width: 21px;
+		height: 20px;
+		line-height: 20px;
+		text-align: center;
+		background: #2fa4e7;
+		border: none;
+		outline: none;
+	}
+	.box-bottom table td .choose .top .form-search i{
+		font-size:12px;
+		color: #fff;
+	}
+	.box-bottom table td .choose table{
+		table-layout: fixed ;
+		width: 100%;
+	}
+	.box-bottom table td .choose table thead{
+		width: 100%;
+		height: 25px;
+		background: #e9e9e9;
+	}
+	.box-bottom table td .choose table thead tr{
+		width: 100%;
+		height: 25px;
+		line-height: 25px;
+		text-align: center;
+		font-size: 14px;
+		font-weight: normal;
+		color: #333333;
+	}
+	.box-bottom table td .choose table thead tr th:nth-child(2){
+		padding-left: 0;
+	}
+	.box-bottom table td .choose table tbody tr{
+		height: 25px;
+		vertical-align: middle ;
+	}
+	.box-bottom table td .choose table tr td{
+		font-size: 12px;
+		color: #666666;
+		border-bottom: 1px solid #e9e9e9;
+	}
+	.box-bottom table td .choose table td input{
+		width: 10px;
+		height: 10px;
+	}
+	.box-top {
+		margin-top: -20px;
+		overflow: hidden;
+	}
+	.box-top .load{
+		float: left;
+	}
+	.box-top .load span{
+		font-size: 16px;
+		color: #317eac;
+	}
+	.box-top div.upload{
+		float: right;
+	}
+	.box-top div.upload div:first-child {
+		float: left;
+		font-size: 14px;
+		color: #666;
+	}
+	.box-top div.upload div:first-child a{
+		font-size: 14px;
+		color: #4fb2eb;
+	}
+	.box-top div.upload div:last-child {
+		float: left;
+		position: relative;
+		margin: 8px 0 0 20px;
+		width: 290px;
+	}
+	.box-top .upload div:last-child input[type='text']{
+		padding-left: 7px;
+		width: 190px;
+		height: 34px;
+		line-height: 34px;
+		border: 1px solid #c0c6ca;
+	}
+	.box-top .upload div:last-child input[type='file']{
+		position: absolute;
+		top: -3px;
+		left: 7px;
+		width: 190px;
+		height: 20px;
+	}
+	.box-top .upload div:last-child button{
+		position: absolute;
+		right: 0;
+		top: 5px;
+		width: 79px;
+		height: 25px;
+		line-height: 25px;
+		font-size: 14px;
+		color: #fff;
+		background: #3caae8;
+		border-radius: 3px;
+		border: none;
+		outline: none;
+	}
+	.box-bottom table td .agency .uploadImg img {
+		width: 100%;
+		height: 100%;
+		vertical-align: baseline;
+	}
+	/*查看大图*/
+	.image-box .x-floating-wrap {
+		position: fixed;
+		z-index: 99998;
+		background: #000;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		opacity: 0.5;
+	}
+	.image-box{
+		display:table; overflow:hidden; margin-left:50px; _position:relative;  width: 1200px;height: 700px;
+		position: fixed;
+		top: 50%;
+		margin-top: -300px;
+		left: 50%;
+		margin-left: -600px;
+		z-index: 2000;
+	}
+	.image-box .x-floating {
+		vertical-align:middle !important;
+		display:table-cell;
+		text-align:center;
+		_position:absolute;
+		_top:50%; _left:50%;
+		top: inherit !important;
+		left: inherit !important;
+	}
+	.image-box .x-floating img {
+		margin: auto auto;
+		max-width: 970px !important;
+		max-height: 600px !important;
+		-webkit-user-select: none;
+		-moz-user-select: none;
+		-ms-user-select: none;
+		user-select: none;
+	}
+	.image-box .x-floating-wrap{
+		z-index: 1000000 !important;
+	}
+	/*分页样式*/
+	body .ng-table-pager .ng-table-pagination li a span{
+		height: 10px !important;
+		line-height: 10px !important;
+	}
+	body div.ng-table-pager input.page-number {
+		width: 30px !important;
+	}
+	.pagination>li>a, .pagination>li>span {
+		padding: 6px 7px;
+	}
+	.ng-table-pager{
+		margin-top: 15px;
+	}
+	body .ng-table-pager .ng-table-pagination li.active a span {
+		color: #fff;
+	}
+</style>
+	<!-- 品牌维护详情Start -->
+	<div class="box">
+		<div class="box-header well" data-original-title>
+			<i class="icon-user"></i> 品牌详情
+		</div>
+		<div class="box-content">
+			<div class="fullscreen" style="padding: 10px;">
+				<div class="form-group">
+					<span>中文品牌:</span>
+					<span ng-bind="brand.nameCn"></span>
+				</div>
+				<div class="form-group">
+					<span>英文品牌:</span>
+					<span ng-bind="brand.nameEn"></span>
+				</div>
+				<div class="form-group">
+					<span>官网地址:</span>
+					<span ng-bind="brand.url"></span>
+				</div>
+				<div class="form-group">
+					<span>Logo:</span>
+					<span class="thumbnail" style="width: 200px; height: 150px; vertical-align: middle; display: table-cell;">
+						<img ng-src="{{brand.logoUrl}}" alt="" style="max-width: 200px; max-height: 150px;">
+					</span>
+				</div>
+				<div class="form-group">
+					<span>简介:</span>
+					<span ng-bind="brand.brief"></span>
+				</div>
+				<div class="form-group">
+					<span>销售区域:</span>
+					<span ng-bind="brand.area"></span>
+				</div>
+				<div class="form-group">
+					<span>主打产品:</span>
+					<span ng-bind="brand.series"></span>
+				</div>
+				<div class="form-group">
+					<span>应用领域:</span>
+					<span ng-bind="brand.application"></span>
+				</div>
+			</div>
+		</div>
+	</div>
+	<!-- 品牌维护详情End -->
+	<!--供应商维护 Start-->
+	<div class="box">
+		<div class="box-header well" data-original-title>
+		</div>
+		<div class="box-content">
+			<!-- ng-tableStart -->
+			<div class="fullscreen" style="padding: 50px;">
+				<div class="box-top">
+					<div class="load">
+						<span>供应商维护</span>
+					</div>
+					<div class="upload">
+						<div>批量导入:<a href="javascript:void(0)" ng-click="download()">下载模板</a></div>
+						<div>
+							<input required="" ng-file-select="" accept=".xls,.xlsx" ng-model="myFiles" type="file" ng-multiple="false" class="form-control input-sm ng-pristine ng-invalid ng-invalid-required ng-touched" id="xlsFile" name="xlsFile" placeholder="请上传.xls或.xlsx文件" style="height: 40px; padding: 9px 10px;">
+							<button ng-click="upload()">确认上传</button>
+						</div>
+					</div>
+				</div>
+				<div class="box-bottom">
+					<table ng-table="supplierTableParams">
+						<thead>
+						<tr>
+							<th width="10%">供应商logo</th>
+							<th width="15%">代理商</th>
+							<th width="5%">营业执照号</th>
+							<th width="20%">地址</th>
+							<th width="10%">电话</th>
+							<th width="10%">传真</th>
+							<th width="12%">网址</th>
+							<th width="5%">关联企业</th>
+							<th width="10%">邮箱</th>
+							<th width="5%"></th>
+						</tr>
+						</thead>
+						<tbody class="edit" ng-repeat="supplier in $data">
+                        	<!--非修改状态-->
+							<tr ng-if="!supplier.edit">
+								<td>
+									<div class="agency">
+										<div class="uploadImg">
+											<img ng-src="{{supplier.img || 'static/img/store/common/default.png'}}"/>
+										</div>
+									</div>
+								</td>
+								<td>
+									<span ng-bind="supplier.vendorName" title="{{supplier.vendorName}}"></span>
+								</td>
+								<td>
+									<span ng-bind="supplier.license" title="{{supplier.license}}">000000567</span>
+								</td>
+								<td>
+									<span ng-bind="supplier.detailAddress" title="{{supplier.detailAddress}}">深圳市南山区科技园科技南五路英唐大厦一楼</span>
+								</td>
+								<td>
+									<span ng-bind="supplier.tel" title="{{supplier.tel}}">0755-12345678</span>
+								</td>
+								<td>
+									<span ng-bind="supplier.fax" title="{{supplier.fax}}">0755-12345678</span>
+								</td>
+								<td>
+									<span ng-bind="supplier.website" title="{{supplier.website}}">http://www.wordshine.net.com</span>
+								</td>
+								<td>
+									<button ng-click="storeAssociated(supplier)" ng-bind="supplier.storeIn.storeName">选择关联企业 <i class="fa fa-angle-down"></i></button>
+								</td>
+								<td>
+									<span ng-bind="supplier.email" class="emails" title="{{supplier.email}}">12345678@qq.com</span>
+								</td>
+								<td>
+									<span class="operate" ng-if="supplier.isSubmited==0" ng-click="changeSupplier(supplier)">修改</span>
+									<span ng-if="supplier.isSubmited==1">申请中</span>
+									<span ng-if="supplier.isSubmited==2">待审核</span>
+								</td>
+							</tr>
+							<!--修改状态-->
+							<tr ng-if="supplier.edit">
+								<td>
+									<div class="agency">
+										<div class="uploadImg">
+											<img ng-src="{{supplier.editImg || 'static/img/store/common/default.png'}}" alt=""/>
+											<div class="hover-show hover-shows" ng-if="supplier.edit">
+												<span class="delete" title="删除" ng-click="deleteImage(supplier)"><i class="fa fa-trash"></i></span>
+												<span class="update">
+													<input type="file" image-upload on-success="onUploadImage($data, supplier)" title="" non-preview="true"/>
+													<span><i class="fa fa-refresh"></i> 更新</span>
+												</span>
+											</div>
+										</div>
+									</div>
+								</td>
+								<td>
+									<input type="text" class="comName" ng-model="supplier.editVendorName" required/>
+								</td>
+								<td>
+									<input type="text" class="license" ng-model="supplier.editLicense"/>
+								</td>
+								<td>
+									<input type="text" class="address" ng-model="supplier.editDetailAddress" required/>
+								</td>
+								<td>
+									<input type="text" class="phone" ng-model="supplier.editTel"/>
+								</td>
+								<td>
+									<input type="text" class="fax" ng-model="supplier.editFax"/>
+								</td>
+								<td>
+									<input type="text" class="network" ng-model="supplier.editWebsite"/>
+								</td>
+								<td style="position: relative ">
+									<button ng-click="storeAssociated(supplier)" ng-bind="supplier.storeIn.storeName ? supplier.storeIn.storeName : '选择关联企业'"><i class="fa fa-angle-down"></i></button>
+									<div class="choose" ng-if="supplier.chooseStoreAssociated">
+										<div class="top">
+											<span>类型选择</span>
+											<label>
+												<input type="checkbox" class="fl" ng-click="chooseStoreType('AGENCY')">
+												<span class="fl">代理商</span>
+											</label>
+											<label>
+												<input type="checkbox" class="fl" ng-click="chooseStoreType('DISTRIBUTION')">
+												<span class="fl">经销商</span>
+											</label>
+											<div class="form-search">
+												<input type="text" ng-model="brandKeyword">
+												<button><i class="fa fa-search" ng-click="refreshTableData(brandKeyword)"></i></button>
+											</div>
+										</div>
+										<table ng-table="storeTableParams">
+											<thead>
+											<tr>
+												<th width="30"></th>
+												<th width="70">店铺编号</th>
+												<th width="170">公司名称</th>
+												<th width="60">类型</th>
+											</tr>
+											</thead>
+											<tbody>
+												<tr ng-repeat="store in $data" >
+													<td><input type="checkbox" ng-click="chooseStore(supplier, store)"></td>
+													<td ng-bind="store.id | storeId">000000501</td>
+													<td ng-bind="store.enterprise &amp;&amp; store.enterprise.enName &amp;&amp; store.enterprise.enName !== '' ? store.enterprise.enName : '暂无公司名称'" >深圳市萨科微科技有限公司</td>
+													<td ng-bind="store.type | storeType" >代理商</td>
+												</tr>
+											</tbody>
+										</table>
+									</div>
+								</td>
+								<td>
+									<input type="text" class="mail" ng-model="supplier.editEmail"/>
+								</td>
+								<td>
+									<span class="operate" ng-click="updateSupplier(supplier)">确认</span>
+									<span class="operate" ng-click="deleteSupplier(supplier.id, supplier)">删除</span>
+									<span class="operate" ng-click="cancelSupplier(supplier)">取消</span>
+								</td>
+							</tr>
+						</tbody>
+						<!--新增供应商-->
+						<tbody ng-if="addedSupplier">
+						<tr>
+							<td>
+								<div class="agency">
+									<div class="uploadImg">
+										<!--<input type="file" ng-if="!supplier.editImg" image-upload on-success="onUploadImage(supplier)" non-preview="true" />-->
+										<img ng-src="{{supplier.editImg || 'static/img/store/common/default.png'}}" alt=""/>
+										<div class="hover-show hover-shows" ng-if="supplier.editImg || 'static/img/store/common/default.png'">
+											<span class="delete" title="删除" ng-click="deleteImage(supplier)"><i class="fa fa-trash"></i></span>
+											<!--<span class="update" ng-click="showImg(supplier.editImg, $index); refreshImg()"><i class="fa fa-refresh"></i> 查看</span>-->
+											<span class="update">
+												<input type="file" image-upload on-success="onUploadImage($data, supplier)" title="" non-preview="true"/>
+												<span><i class="fa fa-refresh"></i> 更新</span>
+											</span>
+										</div>
+									</div>
+								</div>
+							</td>
+							<td>
+								<input type="text" class="comName" ng-model="supplier.vendorName" required/>
+							</td>
+							<td>
+								<input type="text" class="license" ng-model="supplier.license"/>
+							</td>
+							<td>
+								<input type="text" class="address" ng-model="supplier.detailAddress" required/>
+							</td>
+							<td>
+								<input type="text" class="phone" ng-model="supplier.tel"/>
+							</td>
+							<td>
+								<input type="text" class="fax" ng-model="supplier.fax"/>
+							</td>
+							<td>
+								<input type="text" class="network" ng-model="supplier.website"/>
+							</td>
+							<td style="position: relative ">
+								<button ng-click="storeAssociated(supplier)" ng-bind="supplier.storeIn.storeName ? supplier.storeIn.storeName : '选择关联企业'"> <i class="fa fa-angle-down"></i></button>
+								<div class="choose" ng-if="supplier.chooseStoreAssociated">
+									<div class="top">
+										<span>类型选择</span>
+										<label>
+											<input type="checkbox" class="fl" ng-click="chooseStoreType('AGENCY')">
+											<span class="fl">代理商</span>
+										</label>
+										<label>
+											<input type="checkbox" class="fl" ng-click="chooseStoreType('DISTRIBUTION')">
+											<span class="fl">经销商</span>
+										</label>
+										<div class="form-search">
+											<input type="text" ng-model="brandKeyword">
+											<button><i class="fa fa-search"  ng-click="refreshTableData(brandKeyword)"></i></button>
+										</div>
+									</div>
+									<table ng-table="storeTableParams">
+										<thead>
+										<tr>
+											<th width="30"></th>
+											<th width="70">店铺编号</th>
+											<th width="170">公司名称</th>
+											<th width="60">类型</th>
+										</tr>
+										</thead>
+										<tbody>
+										<tr ng-repeat="store in $data" >
+											<td><input type="checkbox" ng-click="chooseStore(supplier, store)"></td>
+											<td ng-bind="store.id | storeId">000000501</td>
+											<td ng-bind="store.enterprise &amp;&amp; store.enterprise.enName &amp;&amp; store.enterprise.enName !== '' ? store.enterprise.enName : '暂无公司名称'" >深圳市萨科微科技有限公司</td>
+											<td ng-bind="store.type | storeType" >代理商</td>
+										</tr>
+										</tbody>
+									</table>
+									<div ng-table-pagination="params" template-url="templates.pagination" class="ng-scope ng-isolate-scope">
+										<div ng-include="templateUrl" class="ng-scope">
+											<div class="ng-table-pager ng-scope" ng-if="params.data.length">
+												<ul ng-if="pages.length" class="pagination ng-table-pagination ng-scope" style="float:right;margin-left:20px;">
+													<li><input type="number" class="page-number ng-pristine ng-untouched ng-valid" ng-model="page.redirectPage"></li>
+													<li><a href="" class="page-a" ng-click="params.page(page.redirectPage)">GO</a></li>
+												</ul>
+												<ul ng-if="pages.length" class="pagination ng-table-pagination ng-scope" style="float: right;">
+													<li ng-class="{'disabled': !page.active &amp;&amp; !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type" class="ng-scope disabled">
+														<a ng-switch-when="prev" ng-click="params.page(page.number)" href="" class="ng-scope">«</a>
+													</li>
+													<li ng-class="{'disabled': !page.active &amp;&amp; !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type" class="ng-scope active">
+														<a ng-switch-when="first" ng-click="params.page(page.number)" href="" class="ng-scope"><span ng-bind="page.number" class="ng-binding">1</span></a>
+													</li>
+													<li ng-class="{'disabled': !page.active &amp;&amp; !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type" class="ng-scope">
+														<a ng-switch-when="page" ng-click="params.page(page.number)" href="" class="ng-scope"><span ng-bind="page.number" class="ng-binding">2</span></a>
+													</li>
+													<li ng-class="{'disabled': !page.active &amp;&amp; !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type" class="ng-scope">
+														<a ng-switch-when="page" ng-click="params.page(page.number)" href="" class="ng-scope"><span ng-bind="page.number" class="ng-binding">3</span></a>
+													</li>
+													<li ng-class="{'disabled': !page.active &amp;&amp; !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type" class="ng-scope">
+														<a ng-switch-when="page" ng-click="params.page(page.number)" href="" class="ng-scope"><span ng-bind="page.number" class="ng-binding">4</span></a>
+													</li>
+													<li ng-class="{'disabled': !page.active &amp;&amp; !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type" class="ng-scope">
+														<a ng-switch-when="page" ng-click="params.page(page.number)" href="" class="ng-scope"><span ng-bind="page.number" class="ng-binding">5</span></a>
+													</li>
+													<li ng-class="{'disabled': !page.active &amp;&amp; !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type" class="ng-scope">
+														<a ng-switch-when="next" ng-click="params.page(page.number)" href="" class="ng-scope">»</a>
+													</li>
+												</ul>
+											</div>
+										</div>
+									</div>
+								</div>
+							</td>
+							<td>
+								<input type="text" class="mail" ng-model="supplier.email"/>
+							</td>
+							<td>
+								<span class="operate" ng-click="sure(supplier)">确认</span>
+								<span class="operate" ng-click="cancelAddSupplier(supplier)">取消</span>
+							</td>
+						</tr>
+						</tbody>
+						<tbody class="add-supply">
+						<tr>
+							<td colspan="10">
+								<span ng-click="addSupplier()"><i class="fa fa-plus-circle"></i><em>新增供应商</em></span>
+								<img src="static/img/all/border_line.png" alt=""/>
+							</td>
+						</tr>
+						</tbody>
+					</table>
+				</div>
+			</div>
+		</div>
+	</div>
+	<div class="row border_top">
+		<div class="col-xs-6"></div>
+		<div class="col-xs-6">
+			<p class="pull-right">
+				<a ng-href="#/brandmaintenance">
+					<button type="button" class="btn btn-large btn-primary">
+						<i class="icon-remove icon-white"></i> 返回列表
+					</button>
+				</a>
+			</p>
+		</div>
+	</div>
+	<!--供应商维护 End-->
+	<div id="image-box" style="display: none">
+		<div class="x-floating-wrap"></div>
+		<div class="x-floating">
+			<div id="item-content">
+				<div class="x-close-wrap"><a href="javascript:void(0);">&times;</a></div>
+				<div class="img"><img/></div>
+			</div>
+		</div>
+	</div>

+ 573 - 0
src/main/webapp/resources/view/admin/supplier_submit_detail.html

@@ -0,0 +1,573 @@
+<style type="text/css">
+	.padding-left-5 {
+		padding: 5px 30px;
+	}
+
+	.dashboard-avatar-brand {
+		height: 50px;
+		width: 50px;
+		padding: 1px;
+		float: left;
+		margin-left: 15px;
+		margin-right: 15px;
+		border: 1px solid #EBEBEB;
+	}
+
+	.border_top {
+		/*border-top: 1px solid #f5f5f5;*/
+	}
+	.border_top .pull-right {
+		margin-top: 45px;
+	}
+	.border_bottom {
+		border-bottom: 1px solid #f5f5f5;
+	}
+
+	.margintop {
+		margin-top: 2px;
+	}
+
+	.box-content .form-horizontal .row {
+		margin-left: 0px;
+	}
+
+	.radio-inline {
+		position: relative;
+		display: inline-block;
+		padding-left: 20px;
+		font-weight: 400;
+		vertical-align: middle;
+		cursor: pointer;
+	}
+
+	.width100 {
+		width: 100%;
+	}
+	.box-header h2{
+		float: none;
+	}
+	/*供应商维护*/
+	.box-contents{
+		padding: 0 ;
+	}
+	.box-top{
+		overflow: hidden;
+		padding: 0 10px;
+		height: 50px;
+		line-height: 50px;
+		border-bottom: 1px solid #dcdcdc;
+	}
+	.box-top .maintenance{
+		margin: 0;
+		float: left;
+		height: 50px;
+		line-height: 50px;
+		font-size: 16px;
+		color: #317eac;
+	}
+	.box-bottom table{
+		table-layout: fixed ;
+	}
+	.box-bottom table thead{
+		width: 100%;
+		height: 40px;
+		line-height: 40px;
+		background: #f1f1f1;
+		border-bottom: 1px solid #dcdcdc;
+	}
+	.box-bottom table thead th{
+		font-size: 14px;
+		color: #333;
+		text-align: center;
+		vertical-align: middle ;
+
+	}
+	.box-bottom table thead th:nth-child(2){
+		text-align: left;
+		padding-left: 60px;
+	}
+	.box-bottom table tbody tr{
+		text-align: center ;
+		border-bottom: 1px solid #dcdcdc;
+	}
+	.box-bottom table td .agency{
+		height: 73px;
+		line-height: 73px;
+	}
+	/*遮罩层*/
+	.box-bottom table td .agency .uploadImg .hover-show{
+		position: absolute;
+		width: 100%;
+		height: 100%;
+		top: 0;
+		left: 0;
+		background: rgba(0,0,0,.5);
+		z-index: 100;
+		display: block;
+	}
+	.box-bottom table td .agency .uploadImg .hover-show .delete{
+		position: absolute;
+		top: -12px;
+		right: 0;
+		padding: 0;
+		width: 20px;
+		/*height: 20px;*/
+		float: right;
+		text-align: center;
+		cursor: pointer;
+	}
+	.box-bottom table td .agency .uploadImg .hover-show .delete i{
+		color: #fff;
+		font-size: 18px;
+	}
+	.box-bottom table td .agency .uploadImg .hover-show a i{
+		position: absolute;
+		left: 5px;
+		top: 22px;
+		margin-right: 5px;
+		font-size: 16px;
+	}
+	.box-bottom table td .agency .uploadImg{
+		position: relative ;
+		margin: 12px 0 0 20px;
+		float: left;
+		width: 100px;
+		height: 50px;
+		line-height: 50px;
+		border: 1px solid #dcdcdc;
+	}
+	.box-bottom table td .agency .uploadImg img{
+		width: 100%;
+		height: 100%;
+	}
+	.box-bottom table td .agency .uploadImg	div{
+		position: relative;
+	}
+	.box-bottom table td .agency .uploadImg	div input{
+		position: absolute;
+		top: 15px;
+		left: 18px;
+		width: 53px;
+		height: 100%;
+		opacity: 0;
+	}
+	.box-bottom table td .agency .uploadImg span.update{
+		position: absolute;
+		top: 0;
+		right: 50%;
+		margin-right: -20px;
+		font-size: 12px;
+		color: #fff;
+		cursor: pointer;
+	}
+	.box-bottom table td .agency .uploadImg span.update span{
+		font-size: 12px;
+		color: #fff;
+	}
+	.box-bottom table td input{
+		/*padding: 0 15px;*/
+		width: 80%;
+		height: 29px;
+		line-height: 29px;
+		text-align: center;
+		font-size: 12px;
+		color: #666;
+		background: #f4f4f4;
+		border: 1px solid #dcdcdc;
+	}
+
+	.box-bottom table td select{
+		padding: 0;
+		width: 98px;
+		height: 29px;
+		background: #f4f4f4;
+		border: 1px solid #dcdcdc;
+	}
+	.box-bottom table td span{
+		font-size: 14px;
+		color: #2fa4e7;
+	}
+	.box-bottom table tbody tr td span.operate {
+		display: inline-block;
+		height: 25px;
+		line-height: 25px;
+		width: 42px!important ;
+		font-size: 14px;
+		color: #2fa4e7!important ;
+		border-radius: 3px;
+		cursor: pointer;
+	}
+	.box-bottom table tbody tr td span.operate:hover {
+		background: #2fa4e7;
+		color: #fff!important ;
+	}
+	.box-bottom table tbody.add-supply{
+		height: 55px;
+	}
+	.box-bottom table tbody.add-supply tr{
+		height: 32px;
+		border-bottom: 1px dashed #d2d2d2;
+	}
+	.box-bottom table tbody.add-supply tr td{
+		position: relative;
+	}
+	.box-bottom table tbody.add-supply tr td span{
+		position: absolute;
+		width: 206px;
+		font-size: 14px;
+		color: #2fa4e7;
+		display: inline-block;
+		background: #fff;
+		cursor: pointer;
+	}
+	.box-bottom table tbody.add-supply tr td span em{
+		font-size: 14px;
+		font-style: normal;
+		color: #2fa4e7;
+		background: none;
+	}
+	.box-bottom table tbody.add-supply tr td span i{
+		margin-right: 5px;
+		font-size: 24px;
+		color: #2fa4e7;
+	}
+	.box-bottom table tbody.add-supply tr td img{
+		position: absolute;
+		top: -4px;
+		cursor: pointer;
+	}
+
+	.upImg img{
+		width: 100%;
+		height: 100%;
+	}
+	.box-bottom table tbody.edit tr td span{
+		display: inline-block;
+		max-width: 180px;
+		text-overflow: ellipsis;
+		white-space: nowrap ;
+		overflow: hidden ;
+		font-size: 12px;
+		color: #333333;
+	}
+	.box-bottom table tbody.edit tr td button.choose-store {
+		padding: 0;
+		width: 98px;
+		height: 29px;
+		background: #f4f4f4;
+		border: 1px solid #dcdcdc;
+		outline: none;
+		overflow: hidden;
+		text-overflow: ellipsis ;
+		white-space: nowrap ;
+	}
+	/*选择关联店铺*/
+
+	.box-bottom table td .choose{
+		position: absolute;
+		top: 52px;
+		left: -55px;
+		z-index: 1000;
+		background: #fff;
+		border: 1px solid #2fa4e7;
+		width: 375px;
+		/*height: 220px;*/
+	}
+	.box-bottom table td .choose .top{
+		padding-left: 10px;
+		overflow: hidden;
+		width: 100%;
+		height: 34px;
+		line-height: 34px;
+	}
+	.box-bottom table td .choose .top span{
+		float: left;
+		font-size: 12px;
+		color: #2fa4e7;
+	}
+	.box-bottom table td .choose .top label{
+		float: left;
+		margin-left: 10px;
+	}
+	.box-bottom table td .choose .top label input{
+		float: left;
+		margin-top: 13px;
+		width: 10px;
+		height: 10px;
+	}
+	.box-bottom table td .choose .top label span{
+		margin-left: 5px;
+		font-size: 12px;
+		color: #666;
+		font-weight: normal;
+		float: left;
+	}
+	.box-bottom table td .choose .top .form-search{
+		float: left;
+		position: relative;
+		width: 176px;
+		height: 20px;
+	}
+	.box-bottom table td .choose .top .form-search input{
+		width: 156px;
+		height: 20px;
+		border-radius: 0;
+		border : 1px solid #2fa4e7;
+	}
+	.box-bottom table td .choose .top .form-search button{
+		position: absolute;
+		top: 8px;
+		right: 0;
+		width: 21px;
+		height: 20px;
+		line-height: 20px;
+		text-align: center;
+		background: #2fa4e7;
+		border: none;
+		outline: none;
+	}
+	.box-bottom table td .choose .top .form-search i{
+		font-size:12px;
+		color: #fff;
+	}
+	.box-bottom table td .choose table{
+		table-layout: fixed ;
+		width: 100%;
+	}
+	.box-bottom table td .choose table thead{
+		width: 100%;
+		height: 25px;
+		background: #e9e9e9;
+	}
+	.box-bottom table td .choose table thead tr{
+		width: 100%;
+		height: 25px;
+		line-height: 25px;
+		font-size: 14px;
+		font-weight: normal;
+		color: #333333;
+		text-align: center;
+	}
+	.box-bottom table td .choose table thead tr th:nth-child(2){
+		padding-left: 0;
+	}
+	.box-bottom table td .choose table tbody tr{
+		height: 25px;
+		vertical-align: middle ;
+	}
+	.box-bottom table td .choose table tr td{
+		border-bottom: 1px solid #e9e9e9;
+		font-size: 12px;
+		color: #666666;
+	}
+	.box-bottom table td .choose table td input{
+		width: 10px;
+		height: 10px;
+	}
+	.box-top {
+		overflow: hidden;
+		margin-top: -20px;
+	}
+	.box-top .load{
+		float: left;
+	}
+	.box-top .load span{
+		font-size: 16px;
+		color: #317eac;
+	}
+	.box-top div.upload{
+		float: right;
+	}
+	.box-top div.upload div:first-child {
+		float: left;
+		font-size: 14px;
+		color: #666;
+	}
+	.box-top div.upload div:first-child a{
+		font-size: 14px;
+		color: #4fb2eb;
+	}
+	.box-top div.upload div:last-child {
+		margin-top: 8px;
+		margin-left: 20px;
+		position: relative;
+		float: left;
+		width: 290px;
+	}
+	.box-top .upload div:last-child input[type='text']{
+		padding-left: 7px;
+		width: 190px;
+		height: 34px;
+		line-height: 34px;
+		border: 1px solid #c0c6ca;
+	}
+	.box-top .upload div:last-child input[type='file']{
+		position: absolute;
+		top: 7px;
+		left: 7px;
+		width: 190px;
+		height: 20px;
+	}
+	.box-top .upload div:last-child button{
+		position: absolute;
+		right: 0;
+		top: 5px;
+		width: 79px;
+		height: 25px;
+		line-height: 25px;
+		font-size: 14px;
+		color: #fff;
+		background: #3caae8;
+		border-radius: 3px;
+		border: none;
+		outline: none;
+	}
+</style>
+	<!-- 品牌维护详情Start -->
+	<div class="box">
+		<div class="box-header well" data-original-title>
+			<i class="icon-user"></i> 品牌详情
+		</div>
+		<div class="box-content">
+			<div class="fullscreen" style="padding: 10px;">
+				<div class="form-group">
+					<span>中文品牌:</span>
+					<span ng-bind="brand.nameCn"></span>
+				</div>
+				<div class="form-group">
+					<span>英文品牌:</span>
+					<span ng-bind="brand.nameEn"></span>
+				</div>
+				<div class="form-group">
+					<span>官网地址:</span>
+					<span ng-bind="brand.url"></span>
+				</div>
+				<div class="form-group">
+					<span>Logo:</span>
+					<span class="thumbnail" style="width: 200px; height: 150px; vertical-align: middle; display: table-cell;">
+						<img ng-src="{{brand.logoUrl}}" alt="" style="max-width: 200px; max-height: 150px;">
+					</span>
+				</div>
+				<div class="form-group">
+					<span>简介:</span>
+					<span ng-bind="brand.brief"></span>
+				</div>
+				<div class="form-group">
+					<span>销售区域:</span>
+					<span ng-bind="brand.area"></span>
+				</div>
+				<div class="form-group">
+					<span>主打产品:</span>
+					<span ng-bind="brand.series"></span>
+				</div>
+				<div class="form-group">
+					<span>应用领域:</span>
+					<span ng-bind="brand.application"></span>
+				</div>
+			</div>
+		</div>
+	</div>
+	<!-- 品牌维护详情End -->
+	<!--供应商维护 Start-->
+	<div class="box">
+		<div class="box-header well" data-original-title>
+		</div>
+		<div class="box-content">
+			<!-- ng-tableStart -->
+			<div class="fullscreen" style="padding: 10px;">
+				<div class="box-bottom">
+					<table>
+						<thead>
+						<tr>
+							<th width="10%"></th>
+							<th width="15%">代理商</th>
+							<th width="5%">营业执照号</th>
+							<th width="20%">地址</th>
+							<th width="10%">电话</th>
+							<th width="10%">传真</th>
+							<th width="12%">网址</th>
+							<th width="5%">关联店铺</th>
+							<th width="10%">邮箱</th>
+							<th width="5%"></th>
+						</tr>
+						</thead>
+						<tbody class="edit">
+							<tr>
+								<td>
+									<div class="agency">
+										<div class="uploadImg">
+											<img ng-src="{{supplier.img || 'static/img/store/common/default.png'}}" alt=""/>
+										</div>
+									</div>
+								</td>
+								<td>
+									<input type="text" class="comName" ng-model="supplier.vendorName" required/>
+								</td>
+								<td>
+									<input type="text" class="license" ng-model="supplier.license"/>
+								</td>
+								<td>
+									<input type="text" class="address" ng-model="supplier.detailAddress" required/>
+								</td>
+								<td>
+									<input type="text" class="phone" ng-model="supplier.tel"/>
+								</td>
+								<td>
+									<input type="text" class="fax" ng-model="supplier.fax"/>
+								</td>
+								<td>
+									<input type="text" class="network" ng-model="supplier.website"/>
+								</td>
+								<td style="position: relative ">
+									<button ng-click="storeAssociated(supplier)" ng-bind="supplier.storeIn.storeName ? supplier.storeIn.storeName : '选择关联店铺'" class="choose-store"><i class="fa fa-angle-down"></i></button>
+									<div class="choose" ng-if="supplier.chooseStoreAssociated">
+										<div class="top">
+											<span>类型选择</span>
+											<label>
+												<input type="checkbox" class="fl" ng-click="chooseStoreType('AGENCY')">
+												<span class="fl">代理商</span>
+											</label>
+											<label>
+												<input type="checkbox" class="fl" ng-click="chooseStoreType('DISTRIBUTION')">
+												<span class="fl">经销商</span>
+											</label>
+											<div class="form-search">
+												<input type="text" ng-click="refreshTableData()">
+												<button><i class="fa fa-search" ng-click="refreshTableData()"></i></button>
+											</div>
+										</div>
+										<table ng-table="storeTableParams">
+											<thead>
+											<tr>
+												<th width="30"></th>
+												<th width="70">店铺编号</th>
+												<th width="170">公司名称</th>
+												<th width="60">类型</th>
+											</tr>
+											</thead>
+											<tbody>
+											<tr ng-repeat="store in $data" >
+												<td><input type="checkbox" ng-click="chooseStore(supplier, store)"></td>
+												<td ng-bind="store.id | storeId">000000501</td>
+												<td ng-bind="store.enterprise &amp;&amp; store.enterprise.enName &amp;&amp; store.enterprise.enName !== '' ? store.enterprise.enName : '暂无公司名称'" >深圳市萨科微科技有限公司</td>
+												<td ng-bind="store.type | storeType" >代理商</td>
+											</tr>
+											</tbody>
+										</table>
+									</div>
+								</td>
+								<td>
+									<input type="text" class="mail" ng-model="supplier.email"/>
+								</td>
+							</tr>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="text-center" ng-if="supplier.status == 101">
+				<button class="btn btn-success" ng-click="audit()">审核通过</button>
+				<button class="btn btn-danger" ng-click="unaudit()">审核不通过</button>
+			</div>
+		</div>
+	</div>
+	<!--供应商维护 End-->

+ 68 - 0
src/main/webapp/resources/view/admin/supplier_submit_list.html

@@ -0,0 +1,68 @@
+<div class="box">
+    <div class="box-header well" data-original-title>
+        <i class="icon-user"></i> 供应商审批
+    </div>
+    <div class="box-content">
+        <!-- ng-tableStart -->
+        <div class="fullscreen" style="padding: 10px;">
+            <div class="row">
+                <div class="col-sm-1">
+                    共<span class="badge">{{supplierTableParams.total()}} </span>条
+                </div>
+                <div class="col-sm-5">
+                    <div class="btn-group" role="group" aria-label="...">
+                        <button type="button" class="btn btn-default" ng-class="{'btn-primary':active=='all'}" ng-click="setActive('all')">全部</button>
+                        <button type="button" class="btn btn-default" ng-class="{'btn-primary':active=='unAudited'}" ng-click="setActive('unAudited')">待审核</button>
+                        <button type="button" class="btn btn-default" ng-class="{'btn-primary':active=='allow'}" ng-click="setActive('allow')">已通过</button>
+                        <button type="button" class="btn btn-default" ng-class="{'btn-primary':active=='notAllow'}" ng-click="setActive('notAllow')">未通过</button>
+                    </div>
+                </div>
+                <div class="col-sm-6">
+                    <div class="input-group" style="float: right">
+                        <input type="search" class="form-control ng-pristine ng-valid ng-touched" ng-model="keyword"
+                               ng-search="onSearch()" placeholder="按供应商名称搜索">
+                        <div class="input-group-btn">
+                            <button ng-click="onSearch()" class="btn btn-primary" type="button">搜索</button>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <table ng-table="supplierTableParams" class="table table-bordered table-striped" style="margin-top: 10px;">
+                <thead>
+                <tr>
+                    <th width="30"></th>
+                    <th width="150">品牌英文名</th>
+                    <th width="auto">供应商名称</th>
+                    <th width="80">提交人</th>
+                    <th width="150">提交时间</th>
+                    <th width="80">审核状态</th>
+                    <th width="80">操作</th>
+                </tr>
+                </thead>
+                <tbody>
+                <tr ng-repeat="supplier in $data">
+                    <td class="text-center">{{($index + 1)}}</td>
+                    <td width="150" style="word-break: break-all">{{supplier.brand.nameEn}}
+                        <span class="label label-success f12" ng-if="supplier.type == 818">新增</span>
+                        <span class="label label-warning f12" ng-if="supplier.type == 815">更新</span>
+                        <span class="label label-danger f12" ng-if="supplier.type == 112">删除</span>
+                    </td>
+                    <td ng-bind="supplier.vendorName"></td>
+                    <td ng-bind="supplier.updater.userName"></td>
+                    <td ng-bind="supplier.updatetime | date: 'yyyy-MM-dd HH:mm'"></td>
+                    <td ng-bind="supplier.status | statusAndTypeFilter"></td>
+                    <td>
+                        <a ui-sref="supplierSubmitDetail({id: supplier.id})" target="_blank">
+                            <button type="button" class="btn btn-default btn-sm">查 看</button>
+                        </a>
+                    </td>
+                </tr>
+                <tr ng-if="$data.length == 0">
+                    <td colspan="10" class="text-center" style="line-height: 40px; font-size: 20px;"><i class="fa fa-smile-o fa-lg"></i> 当前没有对应的供应商申请信息</td>
+                </tr>
+                </tbody>
+            </table>
+        </div>
+        <!-- ng-tableEnd -->
+    </div>
+</div><!--/span-->