Explorar el Código

Merge branch 'master' of http://git.iamberry.com/hexiugang/iamberry-common-parent

wangxiaoming hace 7 años
padre
commit
9338165f07
Se han modificado 24 ficheros con 3497 adiciones y 4 borrados
  1. 83 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/customer/BillingInfo.java
  2. 75 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/customer/ChannelDivisionInfo.java
  3. 92 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/customer/ChannelSaleInfo.java
  4. 192 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/customer/CustomerBasicInfo.java
  5. 74 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/customer/DockedContactInfo.java
  6. 101 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/customer/TicketOpeningInfo.java
  7. 1 1
      watero-rst-core/src/main/java/com.iamberry.rst.core/sys/Admin.java
  8. 134 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/customer/CustomerBasicInfoSaveService.java
  9. 51 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/customer/CustomerBasicService.java
  10. 2 2
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java
  11. 1 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/customerInfoMapper.xml
  12. 131 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/customer/CustomerBasicInfoSaveServiceImpl.java
  13. 64 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/customer/CustomerBasicServiceImpl.java
  14. 130 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/customer/mapper/CustomerBasicInfoSaveMapper.java
  15. 311 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/customer/mapper/CustomerBasicInfoSaveMapper.xml
  16. 27 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/customer/mapper/CustomerBasicMapper.java
  17. 197 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/customer/mapper/CustomerBasicMapper.xml
  18. 192 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/customer/CustomerBasicController.java
  19. 263 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/customer/CustomerBasicInfoSaveController.java
  20. 8 0
      watero-rst-web/src/main/resources/watero-rst-orm.xml
  21. 331 0
      watero-rst-web/src/main/webapp/WEB-INF/views/customer/custome_basic_detail.ftl
  22. 188 0
      watero-rst-web/src/main/webapp/WEB-INF/views/customer/customer_basic_list.ftl
  23. 646 0
      watero-rst-web/src/main/webapp/WEB-INF/views/customer/save_customer_info.ftl
  24. 203 0
      watero-rst-web/src/main/webapp/common/js/customerSaveAdmin/save_customer_info.js

+ 83 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/customer/BillingInfo.java

@@ -0,0 +1,83 @@
+package com.iamberry.rst.core.customer;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * Created by Administrator on 2018/4/19.
+ */
+public class BillingInfo implements Serializable {
+    private static final long serialVersionUID = 1005879663545392938L;
+    private Integer billingId;//主键
+    private Integer customerId;//主键客户id(外键)
+    private String accountOpeningBranch;//开户支行
+    private String accountName;//账号名称
+    private String accountNum;//账号
+    private String receivablesName;//收款人姓名
+    private String receivablesPhone;//收款人电话
+    private Date create_date;//创建时间
+
+    public Integer getBillingId() {
+        return billingId;
+    }
+
+    public void setBillingId(Integer billingId) {
+        this.billingId = billingId;
+    }
+
+    public Integer getCustomerId() {
+        return customerId;
+    }
+
+    public void setCustomerId(Integer customerId) {
+        this.customerId = customerId;
+    }
+
+    public String getAccountOpeningBranch() {
+        return accountOpeningBranch;
+    }
+
+    public void setAccountOpeningBranch(String accountOpeningBranch) {
+        this.accountOpeningBranch = accountOpeningBranch;
+    }
+
+    public String getAccountName() {
+        return accountName;
+    }
+
+    public void setAccountName(String accountName) {
+        this.accountName = accountName;
+    }
+
+    public String getAccountNum() {
+        return accountNum;
+    }
+
+    public void setAccountNum(String accountNum) {
+        this.accountNum = accountNum;
+    }
+
+    public String getReceivablesName() {
+        return receivablesName;
+    }
+
+    public void setReceivablesName(String receivablesName) {
+        this.receivablesName = receivablesName;
+    }
+
+    public String getReceivablesPhone() {
+        return receivablesPhone;
+    }
+
+    public void setReceivablesPhone(String receivablesPhone) {
+        this.receivablesPhone = receivablesPhone;
+    }
+
+    public Date getCreate_date() {
+        return create_date;
+    }
+
+    public void setCreate_date(Date create_date) {
+        this.create_date = create_date;
+    }
+}

+ 75 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/customer/ChannelDivisionInfo.java

@@ -0,0 +1,75 @@
+package com.iamberry.rst.core.customer;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by Administrator on 2018/4/19.
+ */
+public class ChannelDivisionInfo implements Serializable{
+    private static final long serialVersionUID = -5067289140425572665L;
+    private Integer channelDivisionId;//渠道id(主键)
+    private Integer channelCategory;//渠道类别 1:电商 2:特殊渠道 3:线下 4:海外
+    private String channelType;//渠道类型
+    private String channelCode;//渠道编码
+    private String channelName;//渠道、平台名称
+    private Date createDate;//创建时间
+    private List<ChannelSaleInfo> listChannelSaleInfo;//销售信息集合
+
+    public Integer getChannelDivisionId() {
+        return channelDivisionId;
+    }
+
+    public void setChannelDivisionId(Integer channelDivisionId) {
+        this.channelDivisionId = channelDivisionId;
+    }
+
+    public Integer getChannelCategory() {
+        return channelCategory;
+    }
+
+    public void setChannelCategory(Integer channelCategory) {
+        this.channelCategory = channelCategory;
+    }
+
+    public String getChannelType() {
+        return channelType;
+    }
+
+    public void setChannelType(String channelType) {
+        this.channelType = channelType;
+    }
+
+    public String getChannelCode() {
+        return channelCode;
+    }
+
+    public void setChannelCode(String channelCode) {
+        this.channelCode = channelCode;
+    }
+
+    public Date getCreateDate() {
+        return createDate;
+    }
+
+    public void setCreateDate(Date createDate) {
+        this.createDate = createDate;
+    }
+
+    public List<ChannelSaleInfo> getListChannelSaleInfo() {
+        return listChannelSaleInfo;
+    }
+
+    public void setListChannelSaleInfo(List<ChannelSaleInfo> listChannelSaleInfo) {
+        this.listChannelSaleInfo = listChannelSaleInfo;
+    }
+
+    public String getChannelName() {
+        return channelName;
+    }
+
+    public void setChannelName(String channelName) {
+        this.channelName = channelName;
+    }
+}

+ 92 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/customer/ChannelSaleInfo.java

@@ -0,0 +1,92 @@
+package com.iamberry.rst.core.customer;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * Created by Administrator on 2018/4/19.
+ */
+public class ChannelSaleInfo implements Serializable{
+    private static final long serialVersionUID = -3955769129591845971L;
+    private Integer channelSaleId;//主键
+    private Integer customerId;//客户id(外键)
+    private Integer channelDivisionId;//渠道id(外键)
+    private String promotingProducts;//销售产品
+    private Integer supplyPrice;//供货价格
+    private Integer accountPeriod;//账期 1:先款 2:月结 3:两个月
+    private Date create_date;//创建时间
+    private Integer channelCategory;//渠道类别 1:电商 2:特殊渠道 3:线下 4:海外
+    private String channelType;//渠道类型
+
+    public Integer getChannelSaleId() {
+        return channelSaleId;
+    }
+
+    public void setChannelSaleId(Integer channelSaleId) {
+        this.channelSaleId = channelSaleId;
+    }
+
+    public Integer getCustomerId() {
+        return customerId;
+    }
+
+    public void setCustomerId(Integer customerId) {
+        this.customerId = customerId;
+    }
+
+    public Integer getChannelDivisionId() {
+        return channelDivisionId;
+    }
+
+    public void setChannelDivisionId(Integer channelDivisionId) {
+        this.channelDivisionId = channelDivisionId;
+    }
+
+    public String getPromotingProducts() {
+        return promotingProducts;
+    }
+
+    public void setPromotingProducts(String promotingProducts) {
+        this.promotingProducts = promotingProducts;
+    }
+
+    public Integer getSupplyPrice() {
+        return supplyPrice;
+    }
+
+    public void setSupplyPrice(Integer supplyPrice) {
+        this.supplyPrice = supplyPrice;
+    }
+
+    public Integer getAccountPeriod() {
+        return accountPeriod;
+    }
+
+    public void setAccountPeriod(Integer accountPeriod) {
+        this.accountPeriod = accountPeriod;
+    }
+
+    public Date getCreate_date() {
+        return create_date;
+    }
+
+    public void setCreate_date(Date create_date) {
+        this.create_date = create_date;
+    }
+
+    public Integer getChannelCategory() {
+        return channelCategory;
+    }
+
+    public void setChannelCategory(Integer channelCategory) {
+        this.channelCategory = channelCategory;
+    }
+
+    public String getChannelType() {
+        return channelType;
+    }
+
+    public void setChannelType(String channelType) {
+        this.channelType = channelType;
+    }
+}

+ 192 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/customer/CustomerBasicInfo.java

@@ -0,0 +1,192 @@
+package com.iamberry.rst.core.customer;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * Created by Administrator on 2018/4/19.
+ */
+public class CustomerBasicInfo implements Serializable{
+    private static final long serialVersionUID = 4003986770939403758L;
+    private Integer customerId;//客户id(主键)
+    private String customerName;//客户名称
+    private String customerIndustry;//客户行业
+    private Integer customerType;//客户类型 1:个人 2:企业
+    private Integer cooperativeState;//合作进度1:意向合作 2:已经合作 3:停止合作
+    private String customerProvinceCode;//客户所在省份代号
+    private String customerCityCode;//客户所在城市代号
+    private String customerAddress;//客户详细地址
+    private Integer customerStatus;//状态 1:已删除 2:正常
+    private Date createDate;//创建时间
+    private Date updateDate;//修改时间
+    private Integer idCreateBy;//创建人Id
+    private String customerRemarks;//备注信息
+    private String adminName;//管理员姓名
+    private String provinceName;//客户所在省份名称
+    private String cityName;//客户所在城市姓名
+    private Integer isLookAll;//是否查看全部客户 1:查看全部 2:查看自己的
+    private String contactPhone;//联系人电话
+    private String contactEmail;//联系人邮箱
+    private Integer isSelectAll;//是否查看包括删除的客户信息 1 是 2 否
+
+    public Integer getCustomerId() {
+        return customerId;
+    }
+
+    public void setCustomerId(Integer customerId) {
+        this.customerId = customerId;
+    }
+
+    public String getCustomerName() {
+        return customerName;
+    }
+
+    public void setCustomerName(String customerName) {
+        this.customerName = customerName;
+    }
+
+    public String getCustomerIndustry() {
+        return customerIndustry;
+    }
+
+    public void setCustomerIndustry(String customerIndustry) {
+        this.customerIndustry = customerIndustry;
+    }
+
+    public Integer getCustomerType() {
+        return customerType;
+    }
+
+    public void setCustomerType(Integer customerType) {
+        this.customerType = customerType;
+    }
+
+    public Integer getCooperativeState() {
+        return cooperativeState;
+    }
+
+    public void setCooperativeState(Integer cooperativeState) {
+        this.cooperativeState = cooperativeState;
+    }
+
+    public String getCustomerProvinceCode() {
+        return customerProvinceCode;
+    }
+
+    public void setCustomerProvinceCode(String customerProvinceCode) {
+        this.customerProvinceCode = customerProvinceCode;
+    }
+
+    public String getCustomerCityCode() {
+        return customerCityCode;
+    }
+
+    public void setCustomerCityCode(String customerCityCode) {
+        this.customerCityCode = customerCityCode;
+    }
+
+    public String getCustomerAddress() {
+        return customerAddress;
+    }
+
+    public void setCustomerAddress(String customerAddress) {
+        this.customerAddress = customerAddress;
+    }
+
+    public Integer getCustomerStatus() {
+        return customerStatus;
+    }
+
+    public void setCustomerStatus(Integer customerStatus) {
+        this.customerStatus = customerStatus;
+    }
+
+    public Date getCreateDate() {
+        return createDate;
+    }
+
+    public void setCreateDate(Date createDate) {
+        this.createDate = createDate;
+    }
+
+    public Date getUpdateDate() {
+        return updateDate;
+    }
+
+    public void setUpdateDate(Date updateDate) {
+        this.updateDate = updateDate;
+    }
+
+    public Integer getIdCreateBy() {
+        return idCreateBy;
+    }
+
+    public void setIdCreateBy(Integer idCreateBy) {
+        this.idCreateBy = idCreateBy;
+    }
+
+    public String getCustomerRemarks() {
+        return customerRemarks;
+    }
+
+    public void setCustomerRemarks(String customerRemarks) {
+        this.customerRemarks = customerRemarks;
+    }
+
+    public String getAdminName() {
+        return adminName;
+    }
+
+    public void setAdminName(String adminName) {
+        this.adminName = adminName;
+    }
+
+
+    public String getCityName() {
+        return cityName;
+    }
+
+    public void setCityName(String cityName) {
+        this.cityName = cityName;
+    }
+
+    public String getContactPhone() {
+        return contactPhone;
+    }
+
+    public void setContactPhone(String contactPhone) {
+        this.contactPhone = contactPhone;
+    }
+
+    public String getContactEmail() {
+        return contactEmail;
+    }
+
+    public void setContactEmail(String contactEmail) {
+        this.contactEmail = contactEmail;
+    }
+
+    public Integer getIsLookAll() {
+        return isLookAll;
+    }
+
+    public void setIsLookAll(Integer isLookAll) {
+        this.isLookAll = isLookAll;
+    }
+
+    public Integer getIsSelectAll() {
+        return isSelectAll;
+    }
+
+    public void setIsSelectAll(Integer isSelectAll) {
+        this.isSelectAll = isSelectAll;
+    }
+
+    public String getProvinceName() {
+        return provinceName;
+    }
+
+    public void setProvinceName(String provinceName) {
+        this.provinceName = provinceName;
+    }
+}

+ 74 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/customer/DockedContactInfo.java

@@ -0,0 +1,74 @@
+package com.iamberry.rst.core.customer;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * Created by Administrator on 2018/4/19.
+ */
+public class DockedContactInfo implements Serializable {
+    private static final long serialVersionUID = -7996562007908492949L;
+    private Integer dockedContactId;//主键
+    private Integer customerId;//客户id(外键)
+    private String contactName;//联系人姓名
+    private String contactPhone;//联系人电话
+    private String contactType;//职位/身份
+    private String contactEmail;//联系邮箱
+    private Date createDate;//创建时间
+
+    public Integer getDockedContactId() {
+        return dockedContactId;
+    }
+
+    public void setDockedContactId(Integer dockedContactId) {
+        this.dockedContactId = dockedContactId;
+    }
+
+    public Integer getCustomerId() {
+        return customerId;
+    }
+
+    public void setCustomerId(Integer customerId) {
+        this.customerId = customerId;
+    }
+
+    public String getContactName() {
+        return contactName;
+    }
+
+    public void setContactName(String contactName) {
+        this.contactName = contactName;
+    }
+
+    public String getContactPhone() {
+        return contactPhone;
+    }
+
+    public void setContactPhone(String contactPhone) {
+        this.contactPhone = contactPhone;
+    }
+
+    public String getContactType() {
+        return contactType;
+    }
+
+    public void setContactType(String contactType) {
+        this.contactType = contactType;
+    }
+
+    public String getContactEmail() {
+        return contactEmail;
+    }
+
+    public void setContactEmail(String contactEmail) {
+        this.contactEmail = contactEmail;
+    }
+
+    public Date getCreateDate() {
+        return createDate;
+    }
+
+    public void setCreateDate(Date createDate) {
+        this.createDate = createDate;
+    }
+}

+ 101 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/customer/TicketOpeningInfo.java

@@ -0,0 +1,101 @@
+package com.iamberry.rst.core.customer;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * Created by Administrator on 2018/4/19.
+ */
+public class TicketOpeningInfo implements Serializable {
+    private static final long serialVersionUID = -4097354301734798174L;
+    private Integer ticketOpeningId;//主键
+    private Integer customerId;//客户id(外键)
+    private Integer ticketType;//发票类型1:专票 2:普票
+    private String accountOpeningBranch;//开户支行
+    private String ticketOpeningAccount;//开票账户
+    private String enterpriseName;//企业名称
+    private String taxpayerIdentificationNum;//纳税人识别号
+    private String ticketOpeningPhone;//开票电话
+    private String enterpriseAddress;//企业地址
+    private Date createDate;//创建时间
+
+    public Integer getTicketOpeningId() {
+        return ticketOpeningId;
+    }
+
+    public void setTicketOpeningId(Integer ticketOpeningId) {
+        this.ticketOpeningId = ticketOpeningId;
+    }
+
+    public Integer getCustomerId() {
+        return customerId;
+    }
+
+    public void setCustomerId(Integer customerId) {
+        this.customerId = customerId;
+    }
+
+    public Integer getTicketType() {
+        return ticketType;
+    }
+
+    public void setTicketType(Integer ticketType) {
+        this.ticketType = ticketType;
+    }
+
+    public String getAccountOpeningBranch() {
+        return accountOpeningBranch;
+    }
+
+    public void setAccountOpeningBranch(String accountOpeningBranch) {
+        this.accountOpeningBranch = accountOpeningBranch;
+    }
+
+    public String getTicketOpeningAccount() {
+        return ticketOpeningAccount;
+    }
+
+    public void setTicketOpeningAccount(String ticketOpeningAccount) {
+        this.ticketOpeningAccount = ticketOpeningAccount;
+    }
+
+    public String getEnterpriseName() {
+        return enterpriseName;
+    }
+
+    public void setEnterpriseName(String enterpriseName) {
+        this.enterpriseName = enterpriseName;
+    }
+
+    public String getTaxpayerIdentificationNum() {
+        return taxpayerIdentificationNum;
+    }
+
+    public void setTaxpayerIdentificationNum(String taxpayerIdentificationNum) {
+        this.taxpayerIdentificationNum = taxpayerIdentificationNum;
+    }
+
+    public String getTicketOpeningPhone() {
+        return ticketOpeningPhone;
+    }
+
+    public void setTicketOpeningPhone(String ticketOpeningPhone) {
+        this.ticketOpeningPhone = ticketOpeningPhone;
+    }
+
+    public String getEnterpriseAddress() {
+        return enterpriseAddress;
+    }
+
+    public void setEnterpriseAddress(String enterpriseAddress) {
+        this.enterpriseAddress = enterpriseAddress;
+    }
+
+    public Date getCreateDate() {
+        return createDate;
+    }
+
+    public void setCreateDate(Date createDate) {
+        this.createDate = createDate;
+    }
+}

+ 1 - 1
watero-rst-core/src/main/java/com.iamberry.rst.core/sys/Admin.java

@@ -22,7 +22,7 @@ public class Admin implements Serializable {
 
     private Integer adminId;
 
-    private Integer adminDept;              // 1:技术组 2:销售组(深圳销售部) 3:客服组(客服运营部) 4:运营组(广州销售部) 5:其他(财务部) 6工厂生产部
+    private Integer adminDept;              // 1:技术组 2:销售组(深圳销售部) 3:客服组(客服运营部) 4:运营组(广州销售部) 5:其他(财务部) 6工厂生产部 7.管理部
 
     @NotBlank(message="姓名不能为空")
     @Length(min=2,max=10,message="姓名必须由2~10个字组成")

+ 134 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/customer/CustomerBasicInfoSaveService.java

@@ -0,0 +1,134 @@
+package com.iamberry.rst.faces.customer;
+
+
+import com.iamberry.rst.core.address.*;
+import com.iamberry.rst.core.address.City;
+import com.iamberry.rst.core.address.Province;
+import com.iamberry.rst.core.customer.*;
+import com.iamberry.rst.core.order.Product;
+import com.iamberry.rst.core.order.ProductColor;
+import com.iamberry.rst.core.order.ProductType;
+
+import java.util.List;
+
+public interface CustomerBasicInfoSaveService {
+
+    /**
+     * 根据客户id查询客户基本信息
+     * @param queryCustomerId
+     * @return
+     */
+    public CustomerBasicInfo queryCustomerBasicInfoByCustomerId(int queryCustomerId);
+
+    /**
+     * 根据客户id查询对接联系人信息
+     * @param queryCustomerId
+     * @return
+     */
+    public List<DockedContactInfo> queryDockedContactInfoListByCustomerId(int queryCustomerId);
+
+    /**
+     * 根据客户id查询客户销售渠道备案信息
+     * @param queryCustomerId
+     * @return
+     */
+    public List<ChannelSaleInfo> queryChannelSaleInfoListByCustomerId(int queryCustomerId);
+
+    /**
+     * 根据客户id查询客户付款/退款信息
+     * @param queryCustomerId
+     * @return
+     */
+    public BillingInfo queryBillingInfoByCustomerId(int queryCustomerId);
+
+    /**
+     * 根据客户id查询客户开票信息
+     * @param queryCustomerId
+     * @return
+     */
+    public TicketOpeningInfo queryTicketOpeningInfoByCustomerId(int queryCustomerId);
+
+    /**
+     * 添加客户基本信息
+     *
+     * @param customerBasicInfo
+     * @return
+     */
+    public void saveCustomerBasicInfo(CustomerBasicInfo customerBasicInfo,List<DockedContactInfo> dockedContactInfoList, List<ChannelSaleInfo> channelSaleInfoList,
+                                     BillingInfo billingInfo, TicketOpeningInfo ticketOpeningInfo);
+
+    /**
+     * 查询所有省份
+     * @param provinceId
+     * @return
+     */
+    public List<Province> queryProvinceList(String provinceId);
+
+    /**
+     * 根据省份代号查询所有城市
+     * @param provinceId
+     * @return
+     */
+    public List<City> queryCityList(String provinceId);
+
+    /**
+     * 查询所有渠道类别
+     * @param channelCategoryId
+     * @return
+     */
+    public List<ChannelDivisionInfo> queryChannelCategoryList(String channelCategoryId);
+
+    /**
+     * 根据渠道类别查询渠道类型
+     * @param channelCategoryId
+     * @return
+     */
+    public List<ChannelDivisionInfo> queryChannelTypeList(String channelCategoryId);
+
+    /**
+     * 查询销售产品
+     * @param promotingProductsInfo
+     * @return
+     */
+    public List<Product> queryPromotingProductsList(String promotingProductsInfo);
+
+    /**
+     * 根据产品初始化价格
+     * @param promotingProductsId
+     * @return
+     */
+    public List<ProductColor> querySupplyPriceList(String promotingProductsId);
+
+
+    /**
+     * 添加对接联系人信息
+     *
+     * @param dockedContactInfo
+     * @return
+     */
+    /*public void saveDockedContactInfo(DockedContactInfo dockedContactInfo);*/
+
+    /**
+     * 添加客户销售渠道备案信息
+     *
+     * @param channelSaleInfo
+     * @return
+     */
+    /*public void saveChannelSaleInfo(ChannelSaleInfo channelSaleInfo);*/
+
+    /**
+     * 添加付款/退款信息
+     *
+     * @param billingInfo
+     * @return
+     */
+    /*public void saveBillingInfo(BillingInfo billingInfo);*/
+
+    /**
+     * 添加对开票信息
+     *
+     * @param ticketOpeningInfo
+     * @return
+     */
+    /*public void saveTicketOpeningInfo(TicketOpeningInfo ticketOpeningInfo);*/
+}

+ 51 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/customer/CustomerBasicService.java

@@ -0,0 +1,51 @@
+package com.iamberry.rst.faces.customer;
+
+import com.iamberry.rst.core.customer.*;
+import com.iamberry.rst.core.page.PageRequest;
+import com.iamberry.rst.core.page.PagedResult;
+
+import java.util.List;
+
+/**
+ * Created by Administrator on 2018/4/20.
+ */
+public interface CustomerBasicService {
+    /**
+     *  查询客户基本信息列表
+     */
+    PagedResult<CustomerBasicInfo> listCustomerBasic(PageRequest<CustomerBasicInfo> pageRequest);
+
+    /**
+     *  根据id查询客户基本信息
+     */
+    CustomerBasicInfo getCustomerBasic(CustomerBasicInfo customerBasicInfo);
+
+    /**
+     *  根据id修改客户状态
+     */
+    Integer updateState(CustomerBasicInfo customerBasicInfo);
+
+    /**
+     *  根据客户id查询付款/退款信息
+     */
+    BillingInfo getBillingInfo(BillingInfo billingInfo);
+    /**
+     *  根据客户id查询开票信息
+     */
+    TicketOpeningInfo getOpeningInfo(TicketOpeningInfo ticketOpeningInfo);
+
+    /**
+     *  根据客户id查询联系人集合
+     */
+    List<DockedContactInfo> listDockedContactInfo(DockedContactInfo dockedContactInfo);
+
+    /**
+     *  根据客户id渠道销售信息集合
+     */
+    List<ChannelSaleInfo> listChannelSaleInfo(ChannelSaleInfo channelSaleInfo);
+
+    /**
+     *  根据客户id渠道划分信息集合
+     */
+    List<ChannelDivisionInfo> listChannelDivisionInfo(Integer coustomerId);
+}

+ 2 - 2
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java

@@ -450,7 +450,7 @@ public class SalesOrderServiceImpl implements SalesOrderService {
             if (colorList != null && colorList.size() > 0) {
                 color = colorList.get(0);
                 item.setItemColorBar(itemJson.getString("goods_barcode"));//商品69码
-                item.setItemNum(itemJson.getInt("sn"));//商品数量
+                item.setItemNum(itemJson.getInt("goods_number"));//商品数量
                 item.setItemCreateTime(salesOrder.getSalesCreateTime());
                 item.setItemColorId(color.getColorId());
                 item.setItemProductColor(color.getColorName());
@@ -472,7 +472,7 @@ public class SalesOrderServiceImpl implements SalesOrderService {
                 }
                 fittingsInfo = Fittings.get(0);
                 item.setItemColorBar(itemJson.getString("goods_barcode"));//商品69码
-                item.setItemNum(itemJson.getInt("sn"));//商品数量
+                item.setItemNum(itemJson.getInt("goods_number"));//商品数量
                 item.setItemCreateTime(salesOrder.getSalesCreateTime());
                 item.setItemColorId(fittingsInfo.getFittingsId());
                 item.setItemProductColor(fittingsInfo.getFittingsName());

+ 1 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/customerInfoMapper.xml

@@ -390,7 +390,7 @@
            and customer_create_time &lt;= #{endTime}
         </if>
       </where>
-  </select>
+   </select>
 
 
   <select id="listOnCustomer" parameterType="CustomerInfo" resultMap="customerMap">

+ 131 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/customer/CustomerBasicInfoSaveServiceImpl.java

@@ -0,0 +1,131 @@
+package com.iamberry.rst.service.customer;
+
+import com.iamberry.rst.core.address.*;
+import com.iamberry.rst.core.address.City;
+import com.iamberry.rst.core.address.Province;
+import com.iamberry.rst.core.customer.*;
+import com.iamberry.rst.core.order.Product;
+import com.iamberry.rst.core.order.ProductColor;
+import com.iamberry.rst.faces.customer.CustomerBasicInfoSaveService;
+import com.iamberry.rst.service.customer.mapper.CustomerBasicInfoSaveMapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+@Service
+public class CustomerBasicInfoSaveServiceImpl implements CustomerBasicInfoSaveService {
+
+    private Logger logger = LoggerFactory.getLogger(CustomerBasicInfoSaveServiceImpl.class);
+
+    @Autowired
+    private CustomerBasicInfoSaveMapper customerBasicInfoSaveMapper;
+
+
+    @Override
+    public CustomerBasicInfo queryCustomerBasicInfoByCustomerId(int queryCustomerId) {
+        return customerBasicInfoSaveMapper.queryCustomerBasicInfoByCustomerId(queryCustomerId);
+    }
+
+    @Override
+    public List<DockedContactInfo> queryDockedContactInfoListByCustomerId(int queryCustomerId) {
+        return customerBasicInfoSaveMapper.queryDockedContactInfoListByCustomerId(queryCustomerId);
+    }
+
+    @Override
+    public List<ChannelSaleInfo> queryChannelSaleInfoListByCustomerId(int queryCustomerId) {
+        return customerBasicInfoSaveMapper.queryChannelSaleInfoListByCustomerId(queryCustomerId);
+    }
+
+    @Override
+    public BillingInfo queryBillingInfoByCustomerId(int queryCustomerId) {
+        return customerBasicInfoSaveMapper.queryBillingInfoByCustomerId(queryCustomerId);
+    }
+
+    @Override
+    public TicketOpeningInfo queryTicketOpeningInfoByCustomerId(int queryCustomerId) {
+        return customerBasicInfoSaveMapper.queryTicketOpeningInfoByCustomerId(queryCustomerId);
+    }
+
+    @Override
+    @Transactional
+    public void saveCustomerBasicInfo(CustomerBasicInfo customerBasicInfo,List<DockedContactInfo> dockedContactInfoList, List<ChannelSaleInfo> channelSaleInfoList,
+                                     BillingInfo billingInfo, TicketOpeningInfo ticketOpeningInfo) {
+        logger.info("saveCustomerBasicInfo start...");
+        int customerId = -1;
+        try {
+            customerBasicInfo = customerBasicInfoSaveMapper.saveCustomerBasicInfo(customerBasicInfo);
+            if(customerBasicInfo != null){
+                customerId = customerBasicInfo.getCustomerId();
+                if(customerId != -1){
+                    if(dockedContactInfoList != null && dockedContactInfoList.size()>0){
+                        for (DockedContactInfo dockedContactInfo: dockedContactInfoList) {
+                            dockedContactInfo.setCustomerId(customerId);
+                            customerBasicInfoSaveMapper.saveDockedContactInfo(dockedContactInfo);
+                        }
+                    }
+                    if(channelSaleInfoList != null && channelSaleInfoList.size()>0){
+                        for (ChannelSaleInfo channelSaleInfo: channelSaleInfoList) {
+                            channelSaleInfo.setCustomerId(customerId);
+                            customerBasicInfoSaveMapper.saveChannelSaleInfo(channelSaleInfo);
+                        }
+                    }
+                    billingInfo.setCustomerId(customerId);
+                    ticketOpeningInfo.setCustomerId(customerId);
+                    customerBasicInfoSaveMapper.saveBillingInfo(billingInfo);
+                    customerBasicInfoSaveMapper.saveTicketOpeningInfo(ticketOpeningInfo);
+                }
+            }
+            logger.info("saveCustomerBasicInfo end...");
+        }catch (Exception e){
+            logger.error("添加客户信息失败"+e.getMessage());
+        }
+
+    }
+
+    public List<Province> queryProvinceList(String provinceId){
+        return (List<Province>)customerBasicInfoSaveMapper.queryProvinceList(provinceId);
+    }
+
+    public List<City> queryCityList(String provinceId){
+        return (List<City>)customerBasicInfoSaveMapper.queryCityList(provinceId);
+    }
+
+    public List<ChannelDivisionInfo> queryChannelCategoryList(String channelCategoryId){
+        return (List<ChannelDivisionInfo>)customerBasicInfoSaveMapper.queryChannelCategoryList(channelCategoryId);
+    }
+
+    public List<ChannelDivisionInfo> queryChannelTypeList(String channelCategoryId){
+        return (List<ChannelDivisionInfo>)customerBasicInfoSaveMapper.queryChannelTypeList(channelCategoryId);
+    }
+
+    public List<Product> queryPromotingProductsList(String promotingProductsInfo){
+        return (List<Product>)customerBasicInfoSaveMapper.queryPromotingProductsList(promotingProductsInfo);
+    }
+
+    public List<ProductColor> querySupplyPriceList(String promotingProductsId){
+        return (List<ProductColor>)customerBasicInfoSaveMapper.querySupplyPriceList(promotingProductsId);
+    }
+    /*@Override
+    public void saveDockedContactInfo(DockedContactInfo dockedContactInfo) {
+        customerBasicInfoSaveMapper.saveDockedContactInfo(dockedContactInfo);
+    }
+
+    @Override
+    public void saveChannelSaleInfo(ChannelSaleInfo channelSaleInfo) {
+        customerBasicInfoSaveMapper.saveChannelSaleInfo(channelSaleInfo);
+    }
+
+    @Override
+    public void saveBillingInfo(BillingInfo billingInfo) {
+        customerBasicInfoSaveMapper.saveBillingInfo(billingInfo);
+    }
+
+    @Override
+    public void saveTicketOpeningInfo(TicketOpeningInfo ticketOpeningInfo) {
+        customerBasicInfoSaveMapper.saveTicketOpeningInfo(ticketOpeningInfo);
+    }*/
+}

+ 64 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/customer/CustomerBasicServiceImpl.java

@@ -0,0 +1,64 @@
+package com.iamberry.rst.service.customer;
+
+import com.github.pagehelper.PageHelper;
+import com.iamberry.rst.core.customer.*;
+import com.iamberry.rst.core.page.PageRequest;
+import com.iamberry.rst.core.page.PagedResult;
+import com.iamberry.rst.faces.customer.CustomerBasicService;
+import com.iamberry.rst.service.customer.mapper.CustomerBasicMapper;
+import com.iamberry.rst.util.PageUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * Created by Administrator on 2018/4/20.
+ */
+@Service
+public class CustomerBasicServiceImpl implements CustomerBasicService{
+    @Autowired
+    private CustomerBasicMapper customerBasicMapper;
+
+    @Override
+    public PagedResult<CustomerBasicInfo> listCustomerBasic(PageRequest<CustomerBasicInfo> pageRequest) {
+        PageHelper.startPage(pageRequest.getPageNO(), pageRequest.getPageSize(), pageRequest.isPageTotal());
+        List<CustomerBasicInfo> customerBasicList = customerBasicMapper.listCustomerBasic(pageRequest.getData());
+        return PageUtil.getPage(customerBasicList);
+    }
+
+    @Override
+    public CustomerBasicInfo getCustomerBasic(CustomerBasicInfo customerBasicInfo) {
+        return customerBasicMapper.getCustomerBasic(customerBasicInfo);
+    }
+
+    @Override
+    public Integer updateState(CustomerBasicInfo customerBasicInfo) {
+        return customerBasicMapper.updateState(customerBasicInfo);
+    }
+
+    @Override
+    public BillingInfo getBillingInfo(BillingInfo billingInfo) {
+        return customerBasicMapper.getBillingInfo(billingInfo);
+    }
+
+    @Override
+    public TicketOpeningInfo getOpeningInfo(TicketOpeningInfo ticketOpeningInfo) {
+        return customerBasicMapper.getOpeningInfo(ticketOpeningInfo);
+    }
+
+    @Override
+    public List<DockedContactInfo> listDockedContactInfo(DockedContactInfo dockedContactInfo) {
+        return customerBasicMapper.listDockedContactInfo(dockedContactInfo);
+    }
+
+    @Override
+    public List<ChannelSaleInfo> listChannelSaleInfo(ChannelSaleInfo channelSaleInfo) {
+        return customerBasicMapper.listChannelSaleInfo(channelSaleInfo);
+    }
+
+    @Override
+    public List<ChannelDivisionInfo> listChannelDivisionInfo(Integer coustomerId) {
+        return customerBasicMapper.listChannelDivisionInfo(coustomerId);
+    }
+}

+ 130 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/customer/mapper/CustomerBasicInfoSaveMapper.java

@@ -0,0 +1,130 @@
+package com.iamberry.rst.service.customer.mapper;
+
+import com.iamberry.rst.core.address.City;
+import com.iamberry.rst.core.address.Province;
+import com.iamberry.rst.core.customer.*;
+import com.iamberry.rst.core.order.Product;
+import com.iamberry.rst.core.order.ProductColor;
+
+import java.util.List;
+
+public interface CustomerBasicInfoSaveMapper {
+    /**
+     * 添加客户基本信息
+     *
+     * @param customerBasicInfo
+     * @return
+     */
+    public CustomerBasicInfo saveCustomerBasicInfo(CustomerBasicInfo customerBasicInfo);
+
+    /**
+     * 添加对接联系人信息
+     *
+     * @param dockedContactInfo
+     * @return
+     */
+    public void saveDockedContactInfo(DockedContactInfo dockedContactInfo);
+
+    /**
+     * 添加客户销售渠道备案信息
+     *
+     * @param channelSaleInfo
+     * @return
+     */
+    public void saveChannelSaleInfo(ChannelSaleInfo channelSaleInfo);
+
+    /**
+     * 添加付款/退款信息
+     *
+     * @param billingInfo
+     * @return
+     */
+    public void saveBillingInfo(BillingInfo billingInfo);
+
+    /**
+     * 添加开票信息
+     *
+     * @param ticketOpeningInfo
+     * @return
+     */
+    public void saveTicketOpeningInfo(TicketOpeningInfo ticketOpeningInfo);
+
+    //查询部分 start
+    /**
+     * 根据客户id查询客户基本信息
+     * @param queryCustomerId
+     * @return
+     */
+    public CustomerBasicInfo queryCustomerBasicInfoByCustomerId(int queryCustomerId);
+
+    /**
+     * 根据客户id查询对接联系人信息
+     * @param queryCustomerId
+     * @return
+     */
+    public List<DockedContactInfo> queryDockedContactInfoListByCustomerId(int queryCustomerId);
+
+    /**
+     * 根据客户id查询客户销售渠道备案信息
+     * @param queryCustomerId
+     * @return
+     */
+    public List<ChannelSaleInfo> queryChannelSaleInfoListByCustomerId(int queryCustomerId);
+
+    /**
+     * 根据客户id查询客户付款/退款信息
+     * @param queryCustomerId
+     * @return
+     */
+    public BillingInfo queryBillingInfoByCustomerId(int queryCustomerId);
+
+    /**
+     * 根据客户id查询客户开票信息
+     * @param queryCustomerId
+     * @return
+     */
+    public TicketOpeningInfo queryTicketOpeningInfoByCustomerId(int queryCustomerId);
+    //查询部分 end
+
+    /**
+     * 查询所有省份
+     * @param provinceId
+     * @return
+     */
+    public List<Province> queryProvinceList(String provinceId);
+
+    /**
+     * 根据省份代号查询所有城市
+     * @param provinceId
+     * @return
+     */
+    public List<City> queryCityList(String provinceId);
+
+    /**
+     * 查询所有渠道类别
+     * @param channelCategoryId
+     * @return
+     */
+    public List<ChannelDivisionInfo> queryChannelCategoryList(String channelCategoryId);
+
+    /**
+     * 根据渠道类别查询渠道类型
+     * @param channelCategoryId
+     * @return
+     */
+    public List<ChannelDivisionInfo> queryChannelTypeList(String channelCategoryId);
+
+    /**
+     * 查询销售产品
+     * @param promotingProductsInfo
+     * @return
+     */
+    public List<Product> queryPromotingProductsList(String promotingProductsInfo);
+
+    /**
+     * 查询销售产品价格
+     * @param promotingProductsId
+     * @return
+     */
+    public List<ProductColor> querySupplyPriceList(String promotingProductsId);
+}

+ 311 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/customer/mapper/CustomerBasicInfoSaveMapper.xml

@@ -0,0 +1,311 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.iamberry.rst.service.customer.mapper.CustomerBasicInfoSaveMapper" >
+    <!--映射结果集 start-->
+    <!--客户基本信息结果映射-->
+    <resultMap type="com.iamberry.rst.core.customer.CustomerBasicInfo" id="customerBasicInfoResult">
+        <id property="customerId" column="customer_id"/>
+        <result property="customerName" column="customer_name" />
+        <result property="customerIndustry" column="customer_industry" />
+        <result property="customerType" column="customer_type" />
+        <result property="cooperativeState" column="cooperative_state" />
+        <result property="customerProvinceCode" column="customer_province_code" />
+        <result property="customerCityCode" column="customer_city_code" />
+        <result property="customerAddress" column="customer_address" />
+        <result property="customerStatus" column="customer_status" />
+        <result property="createDate" column="create_date" />
+        <result property="updateDate" column="update_date" />
+        <result property="idCreateBy" column="id_create_by" />
+        <result property="customerRemarks" column="customer_remarks" />
+    </resultMap>
+    <!--对接联系人信息结果映射-->
+    <resultMap type="com.iamberry.rst.core.customer.DockedContactInfo" id="dockedContactInfoResult">
+        <id property="dockedContactId" column="docked_contact_id"/>
+        <result property="contactName" column="contact_name" />
+        <result property="contactPhone" column="contact_phone" />
+        <result property="contactType" column="contact_type" />
+        <result property="contactEmail" column="contact_email" />
+        <result property="createDate" column="create_date" />
+    </resultMap>
+    <!--客户渠道销售信息结果映射-->
+    <resultMap type="com.iamberry.rst.core.customer.ChannelSaleInfo" id="channelSaleInfoResult">
+        <id property="channelSaleId" column="channel_sale_id"/>
+        <result property="channelName" column="channel_name" />
+        <result property="promotingProducts" column="promoting_products" />
+        <result property="supplyPrice" column="supply_price" />
+        <result property="accountPeriod" column="account_period" />
+        <result property="createDate" column="create_date" />
+    </resultMap>
+    <!--付款/退款信息结果映射-->
+    <resultMap type="com.iamberry.rst.core.customer.BillingInfo" id="billingInfoResult">
+        <id property="billingId" column="billing_id"/>
+        <result property="accountOpeningBranch" column="account_opening_branch" />
+        <result property="accountName" column="account_name" />
+        <result property="accountNum" column="account_num" />
+        <result property="receivablesName" column="receivables_name" />
+        <result property="receivablesPhone" column="receivables_phone" />
+        <result property="createDate" column="create_date" />
+    </resultMap>
+    <!--开票信息结果映射-->
+    <resultMap type="com.iamberry.rst.core.customer.TicketOpeningInfo" id="ticketOpeningInfoResult">
+        <id property="ticketOpeningId" column="ticket_opening_id"/>
+        <result property="ticketType" column="ticket_type" />
+        <result property="accountOpeningBranch" column="account_opening_branch" />
+        <result property="ticketOpeningAccount" column="ticket_opening_account" />
+        <result property="enterpriseName" column="enterprise_name" />
+        <result property="taxpayerIdentificationNum" column="taxpayer_identification_num" />
+        <result property="ticketOpeningPhone" column="ticket_opening_phone" />
+        <result property="enterpriseAddress" column="enterprise_address" />
+        <result property="createDate" column="create_date" />
+    </resultMap>
+    <!--查询所有省份映射-->
+    <resultMap type="com.iamberry.rst.core.address.Province" id="queryProvinceResult">
+        <id property="provinceId" column="province_id"/>
+        <!--<result property="provinceNum" column="divisionCode" />-->
+        <result property="province" column="province" />
+    </resultMap>
+    <!--根据省份代号查询所有城市映射-->
+    <resultMap type="com.iamberry.rst.core.address.City" id="queryCityResult">
+        <id property="cityId" column="city_id"/>
+        <!--<result property="cityNum" column="city_number" />-->
+        <result property="city" column="city" />
+        <!--<result property="provinceNum" column="provinceid" />-->
+    </resultMap>
+    <!--查询所有渠道类别-->
+    <resultMap type="com.iamberry.rst.core.customer.ChannelDivisionInfo" id="queryChannelCategoryResult">
+        <result property="channelCategory" column="channel_category" />
+        <result property="channelName" column="channel_categoryId" />
+    </resultMap>
+    <!--根据渠道类别查询渠道类型-->
+    <resultMap type="com.iamberry.rst.core.customer.ChannelDivisionInfo" id="queryChannelTypeResult">
+        <!--<id property="channelDivisionId" column="channel_division_id"/>-->
+        <result property="channelType" column="channel_type" />
+        <result property="channelName" column="channel_categoryId" />
+    </resultMap>
+    <!--查询销售产品-->
+    <resultMap type="com.iamberry.rst.core.order.Product" id="queryPromotingProductsResult">
+        <id property="productId" column="product_id"/>
+        <result property="productName" column="product_name" />
+    </resultMap>
+    <!--查询销售产品价格-->
+    <resultMap type="com.iamberry.rst.core.order.ProductColor" id="querySupplyPriceResult">
+        <result property="colorId" column="color_id" />
+        <result property="colorPrice" column="color_price" />
+    </resultMap>
+    <!--映射结果集 end-->
+
+    <!--新增部分 start-->
+    <!-- 添加客户基本信息 -->
+    <insert id="saveCustomerBasicInfo" parameterType="CustomerBasicInfo" useGeneratedKeys="true"  keyProperty="customer_id">
+        INSERT INTO
+        tb_rst_customer_basic_info
+        (
+        customer_name, customer_industry, customer_type, cooperative_state, customer_province_code,customer_city_code,
+        customer_address, customer_status, create_date, update_date,id_create_by,customer_remarks
+        )
+        VALUES
+        (
+        #{customerName},#{customerIndustry},#{customerType},#{cooperativeState},#{customerProvinceCode},#{customerCityCode},
+        #{customerAddress},#{customerStatus},NOW(),NOW(),#{idCreateBy},#{customerRemarks}
+        )
+    </insert>
+
+    <!-- 添加对接联系人信息 -->
+    <insert id="saveDockedContactInfo" parameterType="DockedContactInfo">
+        INSERT INTO
+        tb_rst_docked_contact_info
+        (
+        customer_id, contact_name, contact_phone, contact_type, contact_email,create_date
+        )
+        VALUES
+        (
+        #{customerId},#{contactName},#{contactPhone},#{contactType},#{contactEmail},NOW()
+        )
+    </insert>
+
+    <!-- 添加客户销售渠道备案信息 -->
+    <insert id="saveChannelSaleInfo" parameterType="ChannelSaleInfo">
+        INSERT INTO
+        tb_rst_ channel_sale_info
+        (
+        customer_id, channel_division_id, channel_name, promoting_products, supply_price,account_period,create_date
+        )
+        VALUES
+        (
+        #{customerId},#{channelDivisionId},#{channelName},#{promotingProducts},#{supplyPrice},#{accountPeriod},NOW()
+        )
+    </insert>
+
+    <!-- 添加付款/退款信息 -->
+    <insert id="saveBillingInfo" parameterType="BillingInfo">
+        INSERT INTO
+        tb_rst_billing_info
+        (
+        customer_id, account_opening_branch, account_name, account_num, receivables_name,receivables_phone,create_date
+        )
+        VALUES
+        (
+        #{customerId},#{accountOpeningBranch},#{accountName},#{accountNum},#{receivablesName},#{receivablesPhone},NOW()
+        )
+    </insert>
+
+    <!-- 添加对开票信息 -->
+    <insert id="saveTicketOpeningInfo" parameterType="TicketOpeningInfo">
+        INSERT INTO
+        tb_rst_ticket_opening_info
+        (
+        customer_id, ticket_type, account_opening_branch, ticket_opening_account, enterprise_name,
+        taxpayer_identification_num,ticket_opening_phone, enterprise_address, create_date
+        )
+        VALUES
+        (
+        #{customerId},#{ticketType},#{accountOpeningBranch},#{ticketOpeningAccount},#{enterpriseName},
+        #{taxpayerIdentificationNum},#{ticketOpeningPhone},#{enterpriseAddress},NOW()
+        )
+    </insert>
+    <!--新增部分 end-->
+
+    <!--查询客户信息部分 start-->
+    <!-- 根据客户id查询客户基本信息 -->
+    <select id="queryCustomerBasicInfoByCustomerId" parameterType="Integer" resultMap="customerBasicInfoResult">
+        SELECT * FROM tb_rst_customer_basic_info t WHERE t.customer_id = #{id}
+    </select>
+    <!-- 根据客户id查询对接联系人信息 -->
+    <select id="queryDockedContactInfoListByCustomerId" parameterType="Integer" resultMap="dockedContactInfoResult">
+        SELECT
+          t.docked_contact_id,
+          t.contact_name,
+          t.contact_phone,
+          t.contact_type,
+          t.contact_email,
+          t.create_date
+        FROM
+          tb_rst_docked_contact_info t
+        WHERE
+          t.customer_id = #{id}
+    </select>
+    <!-- 根据客户id查询客户销售渠道备案信息 -->
+    <select id="queryChannelSaleInfoListByCustomerId" parameterType="Integer" resultMap="channelSaleInfoResult">
+        SELECT
+        t.channel_sale_id,
+        t.channel_name,
+        t.promoting_products,
+        t.supply_price,
+        t.account_period,
+        t.create_date
+        FROM
+        tb_rst_channel_sale_info t
+        WHERE
+        t.customer_id = #{id}
+    </select>
+    <!-- 根据客户id查询客户付款/退款信息 -->
+    <select id="queryBillingInfoByCustomerId" parameterType="Integer" resultMap="billingInfoResult">
+        SELECT
+        t.billing_id,
+        t.account_opening_branch,
+        t.account_name,
+        t.account_num,
+        t.receivables_name,
+        t.receivables_phone,
+        t.create_date
+        FROM
+        tb_rst_billing_info t
+        WHERE
+        t.customer_id = #{id}
+    </select>
+    <!-- 根据客户id查询客户开票信息 -->
+    <select id="queryTicketOpeningInfoByCustomerId" parameterType="Integer" resultMap="ticketOpeningInfoResult">
+        SELECT
+        t.ticket_opening_id,
+        t.ticket_type,
+        t.account_opening_branch,
+        t.ticket_opening_account,
+        t.enterprise_name,
+        t.taxpayer_identification_num,
+        t.ticket_opening_phone,
+        t.enterprise_address,
+        t.create_date
+        FROM
+        tb_rst_ticket_opening_info t
+        WHERE
+        t.customer_id = #{id}
+    </select>
+    <!--查询客户信息部分 end-->
+    <!--查询所有省份-->
+    <select id="queryProvinceList" parameterType="java.lang.String" resultMap="queryProvinceResult">
+        SELECT
+            t.province_id,
+            t.province
+        FROM
+            tb_rst_address_province t
+        ORDER BY
+            t.province_id ASC
+    </select>
+    <!--根据省份代号查询所有城市-->
+    <select id="queryCityList" parameterType="java.lang.String" resultMap="queryCityResult">
+        SELECT
+        t.city_id,
+        t.city
+        FROM
+        tb_rst_address_city t
+        WHERE
+        t.province_id = #{id}
+        ORDER BY
+        t.city_id ASC
+    </select>
+    <!--查询所有渠道类别-->
+    <select id="queryChannelCategoryList" parameterType="java.lang.String" resultMap="queryChannelCategoryResult">
+        SELECT
+            DISTINCT (t.channel_category),
+            CASE
+            WHEN t.channel_category = 1 THEN '电商'
+            WHEN t.channel_category = 2 THEN '特殊渠道'
+            WHEN t.channel_category = 3 THEN '线下'
+            ELSE '海外'
+            END AS 'channel_categoryId'
+        FROM
+        tb_rst_channel_division_info t
+        ORDER BY
+        t.channel_division_id ASC
+    </select>
+    <!--根据渠道类别查询渠道类型-->
+    <select id="queryChannelTypeList" parameterType="java.lang.String" resultMap="queryChannelTypeResult">
+        SELECT
+        /*t.channel_division_id,*/
+        DISTINCT (t.channel_type),
+        CASE
+            WHEN t.channel_category = 1 THEN '电商'
+            WHEN t.channel_category = 2 THEN '特殊渠道'
+            WHEN t.channel_category = 3 THEN '线下'
+            ELSE '海外'
+            END AS 'channel_categoryId'
+        FROM
+        tb_rst_channel_division_info t
+        WHERE
+        t.channel_category = #{id}
+        ORDER BY
+        t.channel_division_id ASC
+    </select>
+    <!--查询销售产品-->
+    <select id="queryPromotingProductsList" parameterType="java.lang.String" resultMap="queryPromotingProductsResult">
+        SELECT
+        t.product_id,
+        t.product_name
+        FROM
+        tb_rst_product_info t
+        ORDER BY
+        t.product_id ASC
+    </select>
+    <!--查询销售产品价格-->
+    <select id="querySupplyPriceList" parameterType="java.lang.String" resultMap="querySupplyPriceResult">
+        SELECT
+        t.color_id,
+        t.color_price
+        FROM
+        tb_rst_product_color t
+        WHERE
+        t.color_product_id = #{id}
+        ORDER BY
+        t.color_id ASC
+    </select>
+</mapper>

+ 27 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/customer/mapper/CustomerBasicMapper.java

@@ -0,0 +1,27 @@
+package com.iamberry.rst.service.customer.mapper;
+
+import com.iamberry.rst.core.customer.*;
+
+import java.util.List;
+
+/**
+ * Created by Administrator on 2018/4/20.
+ */
+public interface CustomerBasicMapper {
+    /*查询客户基本信息列表*/
+    List<CustomerBasicInfo> listCustomerBasic(CustomerBasicInfo customerBasicInfo);
+    /*根据id查询客户基本信息*/
+    CustomerBasicInfo getCustomerBasic(CustomerBasicInfo customerBasicInfo);
+    /*根据id修改客户状态*/
+    Integer updateState(CustomerBasicInfo customerBasicInfo);
+    /*根据客户id查询付款/退款信息*/
+    BillingInfo getBillingInfo(BillingInfo billingInfo);
+    /*根据客户id查询开票信息*/
+    TicketOpeningInfo getOpeningInfo(TicketOpeningInfo ticketOpeningInfo);
+    /*根据客户id查询联系人集合*/
+    List<DockedContactInfo> listDockedContactInfo(DockedContactInfo dockedContactInfo);
+    /*根据客户id渠道销售信息集合*/
+    List<ChannelSaleInfo> listChannelSaleInfo(ChannelSaleInfo channelSaleInfo);
+    /*根据客户id渠道划分信息集合*/
+    List<ChannelDivisionInfo> listChannelDivisionInfo(Integer coustomerId);
+}

+ 197 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/customer/mapper/CustomerBasicMapper.xml

@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.iamberry.rst.service.customer.mapper.CustomerBasicMapper" >
+  <select id="listCustomerBasic" resultType="CustomerBasicInfo" parameterType="CustomerBasicInfo">
+      SELECT
+      bi.customer_id customerId,
+      bi.customer_name customerName,
+      bi.customer_industry customerIndustry,
+      bi.customer_type customerType,
+      bi.cooperative_state cooperativeState,
+      bi.customer_province_code customerProvinceCode,
+      bi.customer_city_code customerCityCode,
+      bi.customer_address customerAddress,
+      bi.customer_status customerStatus,
+      bi.create_date createDate,
+      bi.update_date updateDate,
+      bi.id_create_by idCreateBy,
+      bi.customer_remarks customerRemarks,
+      sa.admin_name adminName,
+      ap.province provinceName,
+      ac.city cityName
+      from tb_rst_customer_basic_info bi
+      LEFT JOIN tb_rst_sys_admin sa on bi.id_create_by = sa.admin_id
+      LEFT JOIN tb_rst_address_province ap on ap.division_code = bi.customer_province_code
+      LEFT JOIN tb_rst_address_city ac on ac.division_code = bi.customer_city_code
+      LEFT JOIN tb_rst_docked_contact_info ci on ci.customer_id = bi.customer_id
+      <where>
+        <if test="customerName != null and customerName!='' ">
+            bi.customer_name like CONCAT('%',#{customerName},'%')
+        </if>
+        <if test="customerIndustry != null and customerIndustry!='' ">
+          AND bi.customer_industry = #{customerIndustry}
+        </if>
+        <if test="customerType != null and customerType!='' ">
+          AND bi.customer_type = #{customerType}
+        </if>
+        <if test="cooperativeState != null and cooperativeState!='' ">
+          AND bi.cooperative_state = #{cooperativeState}
+        </if>
+        <if test="customerProvinceCode != null and customerProvinceCode!='' ">
+          AND bi.customer_province_code = #{customerProvinceCode}
+        </if>
+        <if test="customerCityCode != null and customerCityCode!='' ">
+          AND bi.customer_city_code = #{customerCityCode}
+        </if>
+        <if test="customerAddress != null and customerAddress!='' ">
+          AND bi.customer_address = #{customerAddress}
+        </if>
+        <if test="customerStatus != null and customerStatus!='' ">
+          AND bi.customer_status = #{customerStatus}
+        </if>
+        <if test="isLookAll != null and isLookAll!='' and isLookAll == 2 ">
+          AND bi.id_create_by = #{idCreateBy}
+        </if>
+        <if test="contactPhone != null and contactPhone!='' ">
+          AND ci.contact_phone = #{contactPhone}
+        </if>
+        <if test="contactEmail != null and contactEmail!='' ">
+          AND ci.contact_email = #{contactEmail}
+        </if>
+        <!--<if test="isSelectAll != null and isSelectAll == 2 ">
+          AND bi.customer_status = #{isSelectAll}
+        </if>-->
+      </where>
+  </select>
+
+
+    <select id="getCustomerBasic" resultType="CustomerBasicInfo" parameterType="CustomerBasicInfo">
+        SELECT
+        bi.customer_id customerId,
+        bi.customer_name customerName,
+        bi.customer_industry customerIndustry,
+        bi.customer_type customerType,
+        bi.cooperative_state cooperativeState,
+        bi.customer_province_code customerProvinceCode,
+        bi.customer_city_code customerCityCode,
+        bi.customer_address customerAddress,
+        bi.customer_status customerStatus,
+        bi.create_date createDate,
+        bi.update_date updateDate,
+        bi.id_create_by idCreateBy,
+        bi.customer_remarks customerRemarks,
+        ap.province provinceName,
+        ac.city cityName
+        from tb_rst_customer_basic_info bi
+        LEFT JOIN tb_rst_address_province ap on ap.division_code = bi.customer_province_code
+        LEFT JOIN tb_rst_address_city ac on ac.division_code = bi.customer_city_code
+        <where>
+            <if test="customerId != null and customerId!='' ">
+                bi.customer_id  = #{customerId}
+            </if>
+        </where>
+    </select>
+
+    <update id="updateState" parameterType="CustomerBasicInfo">
+        UPDATE tb_rst_customer_basic_info
+        <set >
+            <if test="customerStatus != null" >
+                customer_status = #{customerStatus,jdbcType=INTEGER}
+            </if>
+        </set>
+        where customer_id = #{customerId,jdbcType=INTEGER}
+    </update>
+
+
+    <select id="getBillingInfo" resultType="BillingInfo" parameterType="BillingInfo">
+        SELECT
+        billing_id as billingId,
+        customer_id as customerId,
+        account_opening_branch as accountOpeningBranch,
+        account_name as accountName,
+        account_num as accountNum,
+        receivables_name as receivablesName,
+        receivables_phone as receivablesPhone,
+        create_date as createDate
+        from tb_rst_billing_info
+        <where>
+            <if test="customerId != null and customerId !='' ">
+                customer_id  = #{customerId}
+            </if>
+        </where>
+    </select>
+
+    <select id="getOpeningInfo" resultType="TicketOpeningInfo" parameterType="TicketOpeningInfo">
+        SELECT
+        ticket_opening_id as ticketOpeningId,
+        customer_id as customerId,
+        ticket_type as ticketType,
+        account_opening_branch as accountOpeningBranch,
+        ticket_opening_account as ticketOpeningAccount,
+        enterprise_name as enterpriseName,
+        taxpayer_identification_num as taxpayerIdentificationNum,
+        ticket_opening_phone as ticketOpeningPhone,
+        enterprise_address as enterpriseAddress,
+        create_date as createDate
+        from tb_rst_ticket_opening_info
+        <where>
+            <if test="customerId != null and customerId !='' ">
+                customer_id  = #{customerId}
+            </if>
+        </where>
+    </select>
+
+    <select id="listDockedContactInfo" resultType="DockedContactInfo" parameterType="DockedContactInfo">
+        SELECT
+        docked_contact_id as dockedContactId,
+        customer_id as customerId,
+        contact_name as contactName,
+        contact_phone as contactPhone,
+        contact_type as contactType,
+        contact_email as contactEmail,
+        create_date as createDate
+        from tb_rst_docked_contact_info
+        <where>
+            <if test="customerId != null and customerId !='' ">
+                customer_id  = #{customerId}
+            </if>
+        </where>
+    </select>
+
+    <select id="listChannelSaleInfo" resultType="ChannelSaleInfo" parameterType="ChannelSaleInfo">
+        SELECT
+        si.channel_sale_id as channelSaleId,
+        si.customer_id as customerId,
+        si.channel_division_id as channelDivisionId,
+        si.promoting_products as promotingProducts,
+        si.supply_price as supplyPrice,
+        si.account_period as account_period,
+        si.create_date as createDate
+        from tb_rst_channel_sale_info si
+        where
+            si.channel_division_id  = #{channelDivisionId}
+    </select>
+
+    <resultMap type="ChannelDivisionInfo" id="listChannelDivisionMap">
+        <id property="channelDivisionId" column="channel_division_id"/>
+        <result property="channelCategory" column="channel_category" />
+        <result property="channelType" column="channel_type" />
+        <result property="channelName" column="channel_name" />
+        <result property="channelCode" column="channel_code" />
+        <result property="receivablesPhone" column="receivables_phone" />
+        <result property="createDate" column="create_date" />
+        <collection property="listChannelSaleInfo" column="channel_division_id" ofType="ChannelDivisionInfo" select="listChannelSaleInfo"/>
+    </resultMap>
+    <select id="listChannelDivisionInfo" resultMap="listChannelDivisionMap" parameterType="ChannelDivisionInfo">
+        SELECT
+        channel_division_id,
+        channel_category,
+        channel_type,
+        channel_name,
+        channel_code,
+        create_date
+        FROM tb_rst_channel_division_info
+        WHERE
+        customer_id = #{customerId}
+    </select>
+</mapper>

+ 192 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/customer/CustomerBasicController.java

@@ -0,0 +1,192 @@
+package com.iamberry.rst.controllers.customer;
+
+import com.iamberry.rst.controllers.cm.AdminCustomerController;
+import com.iamberry.rst.core.cm.CustomerInfo;
+import com.iamberry.rst.core.customer.*;
+import com.iamberry.rst.core.page.PageRequest;
+import com.iamberry.rst.core.page.PagedResult;
+import com.iamberry.rst.core.sys.Admin;
+import com.iamberry.rst.faces.customer.CustomerBasicService;
+import com.iamberry.rst.faces.sys.SysService;
+import com.iamberry.rst.utils.AdminUtils;
+import com.iamberry.rst.utils.StitchAttrUtil;
+import com.iamberry.wechat.tools.ResponseJson;
+import org.apache.commons.lang.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * Created by Administrator on 2018/4/20.
+ */
+@Controller
+@RequestMapping("/admin/customerBasic")
+public class CustomerBasicController {
+
+
+    @Autowired
+    private CustomerBasicService customerBasicService;
+    @Autowired
+    private SysService sysService;
+    /**
+     * 查询客户基本信息列表
+     *
+     * @return
+     * @author LJK
+     * @date 时间
+     */
+    @RequiresPermissions("customerBasic:select_all:customerBasic")
+    @RequestMapping("/listCustomerBasic")
+    public ModelAndView listCustomerBasic(HttpServletRequest request, CustomerBasicInfo customerBasicInfo,
+                                       @RequestParam(value = "pageSize", defaultValue = "10", required = false) Integer pageSize,
+                                       @RequestParam(value = "pageNO", defaultValue = "1", required = false) Integer pageNO,
+                                       @RequestParam(value = "totalNum", defaultValue = "0", required = false) Integer totalNum) {
+        ModelAndView mv = new ModelAndView("customer/customer_basic_list");
+        //获取登录员工id
+        Integer adminId = AdminUtils.getLoginAdminId();
+        Admin admin = new Admin();
+        admin.setAdminId(adminId);
+        admin = sysService.get(admin);
+        if(admin.getAdminDept() == 7 || admin.getAdminDept() == 5){//管理部以及财务部
+            customerBasicInfo.setIsSelectAll(1);
+        }else if(admin.getAdminDept() == 2){//销售部(业务员)
+            customerBasicInfo.setIsSelectAll(2);
+        }
+        customerBasicInfo.setIdCreateBy(adminId);
+       /* if(customerBasicInfo.getIsLookAll() != null || !customerBasicInfo.getIsLookAll().equals("")){
+            customerBasicInfo.setIdCreateBy(adminId);
+        }*/
+        // 封装请求数据
+        PageRequest<CustomerBasicInfo> pageRequest = new PageRequest<>(customerBasicInfo, pageNO, pageSize, totalNum == 0);
+        // 查询订单列表
+        PagedResult<CustomerBasicInfo> result = customerBasicService.listCustomerBasic(pageRequest);
+        if (totalNum != 0) {
+            result.setTotal(totalNum);
+        }
+        mv.addObject("adminId",adminId);
+        StitchAttrUtil.setModelAndView(customerBasicInfo, mv, "/admin/customerBasic/listCustomerBasic", result);
+        return mv;
+    }
+
+
+    /**
+     * 修改客户状态为已删除
+     *
+     * @param request
+     * @return
+     */
+    @ResponseBody
+    @RequiresPermissions("customerBasic:update:customerBasic")
+    @RequestMapping("/update_customerState")
+    public ResponseJson updateCustomerIsSolve(HttpServletRequest request) throws Exception {
+        String customerId = request.getParameter("customerId");
+        if (!StringUtils.isNotEmpty(customerId)) {
+            return new ResponseJson(500, "该客户信息不存在!", 500);
+        }
+
+        //根据id获取客诉信息
+        CustomerBasicInfo customerBasicInfo = new CustomerBasicInfo();
+        customerBasicInfo.setCustomerId(Integer.valueOf(customerId));
+        customerBasicInfo.setCustomerStatus(1);
+        CustomerBasicInfo Info = customerBasicService.getCustomerBasic(customerBasicInfo);
+        if (Info == null) {
+            return new ResponseJson(500, "该客户信息不存在!", 500);
+        }
+        //修改客户状态
+        int num = customerBasicService.updateState(customerBasicInfo);
+        if (num > 0) {
+            return new ResponseJson(200, "删除成功!", 200);
+        } else {
+            return new ResponseJson(500, "删除失败!", 500);
+        }
+    }
+
+    /**
+     * 查询客户详情
+     * @param request
+     * @return
+     */
+    @ResponseBody
+    @RequiresPermissions("customerBasic:select:customerBasic")
+    @RequestMapping("/customer_Basic_Detail")
+    public ModelAndView customerBasicDetail(HttpServletRequest request){
+        ModelAndView mv = new ModelAndView("customer/custome_basic_detail");
+        String customerId = request.getParameter("customerId");
+        if (!StringUtils.isNotEmpty(customerId)) {
+            return mv;
+        }
+        /*查询基本信息*/
+        CustomerBasicInfo customerBasicInfo = new CustomerBasicInfo();
+        customerBasicInfo.setCustomerId(Integer.valueOf(customerId));
+        customerBasicInfo = customerBasicService.getCustomerBasic(customerBasicInfo);
+        /*对接联系人信息*/
+        DockedContactInfo dockedContactInfo = new DockedContactInfo();
+        dockedContactInfo.setCustomerId(Integer.valueOf(customerId));
+        List<DockedContactInfo> listDockedContactInfo = customerBasicService.listDockedContactInfo(dockedContactInfo);
+        /*付款/退款信息*/
+        BillingInfo billingInfo = new BillingInfo();
+        billingInfo.setCustomerId(Integer.valueOf(customerId));
+        billingInfo = customerBasicService.getBillingInfo(billingInfo);
+        /*开票信息*/
+        TicketOpeningInfo ticketOpeningInfo = new TicketOpeningInfo();
+        ticketOpeningInfo.setCustomerId(Integer.valueOf(customerId));
+        ticketOpeningInfo = customerBasicService.getOpeningInfo(ticketOpeningInfo);
+        /*渠道销售信息*/
+        /*ChannelSaleInfo channelSaleInfo = new ChannelSaleInfo();
+        channelSaleInfo.setCustomerId(Integer.valueOf(customerId));*/
+        List<ChannelDivisionInfo> listChannelDivisionInfo = customerBasicService.listChannelDivisionInfo(Integer.valueOf(customerId));
+        //渠道销售信息封装
+       /* List<ChannelDivisionInfo> listChannelDivisionInfo = new ArrayList<ChannelDivisionInfo>();
+        for (int i=0;i<listChannelSaleInfo.size();i++){
+            boolean isContinue = true;
+            if(listChannelDivisionInfo.size() > 0){
+                for(ChannelDivisionInfo channelDivisionInfo : listChannelDivisionInfo){
+                    List<ChannelSaleInfo> listChannel = channelDivisionInfo.getListChannelSaleInfo();
+                    for (ChannelSaleInfo Info : listChannel){
+                        if(Info.getChannelDivisionId().intValue() == listChannelSaleInfo.get(i).getChannelDivisionId().intValue()
+                                && Info.getChannelName().equals(listChannelSaleInfo.get(i).getChannelName())){
+                            isContinue = false;
+                        }
+                    }
+
+                }
+            }
+            if(!isContinue){
+                continue;//数据已保存不需要再循环
+            }
+            ChannelDivisionInfo channelDivisionInfo = new ChannelDivisionInfo();
+            channelDivisionInfo.setChannelCategory(listChannelSaleInfo.get(i).getChannelCategory());
+            channelDivisionInfo.setChannelType(listChannelSaleInfo.get(i).getChannelType());
+            channelDivisionInfo.setChannelName(listChannelSaleInfo.get(i).getChannelName());
+                List<ChannelSaleInfo> listChannelSale = new ArrayList<ChannelSaleInfo>();
+            for (int j=0;j<listChannelSaleInfo.size();j++){
+                if(listChannelSaleInfo.get(i).getChannelDivisionId().intValue() == listChannelSaleInfo.get(j).getChannelDivisionId().intValue()
+                  && listChannelSaleInfo.get(i).getChannelName().equals(listChannelSaleInfo.get(j).getChannelName())){
+                    listChannelSale.add(listChannelSaleInfo.get(j));
+                }
+                if(j == listChannelSaleInfo.size()-1){
+                    channelDivisionInfo.setListChannelSaleInfo(listChannelSale);
+                }
+
+            }
+            listChannelDivisionInfo.add(channelDivisionInfo);
+        }*/
+        mv.addObject("customerBasicInfo",customerBasicInfo);
+        mv.addObject("listDockedContactInfo",listDockedContactInfo);
+        mv.addObject("billingInfo",billingInfo);
+        mv.addObject("ticketOpeningInfo",ticketOpeningInfo);
+        mv.addObject("listChannelDivisionInfo",listChannelDivisionInfo);
+        return mv;
+    }
+}

+ 263 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/customer/CustomerBasicInfoSaveController.java

@@ -0,0 +1,263 @@
+package com.iamberry.rst.controllers.customer;
+
+import com.iamberry.rst.core.address.City;
+import com.iamberry.rst.core.address.Province;
+import com.iamberry.rst.core.customer.*;
+import com.iamberry.rst.core.order.Product;
+import com.iamberry.rst.core.order.ProductColor;
+import com.iamberry.rst.core.order.ProductType;
+import com.iamberry.rst.faces.customer.CustomerBasicInfoSaveService;
+import com.iamberry.wechat.tools.ResponseJson;
+import org.apache.commons.lang.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+import javax.servlet.http.HttpServletRequest;
+import java.util.ArrayList;
+import java.util.List;
+
+
+@Controller
+@RequestMapping("/admin/customerBasic")
+public class CustomerBasicInfoSaveController {
+
+    private Logger logger = LoggerFactory.getLogger(CustomerBasicInfoSaveController.class);
+
+    @Autowired
+    private CustomerBasicInfoSaveService customerBasicInfoSaveService;
+
+    /**
+     * 跳转到添加客户信息页面
+     *
+     * @return
+     */
+    @RequiresPermissions("customerBasic:save:customerInfo")
+    @RequestMapping("/saveCustomerInfo")
+    public ModelAndView toAddCustomer(HttpServletRequest request) {
+        ModelAndView mv = new ModelAndView("customer/save_customer_info");
+        return mv;
+    }
+
+    /**
+     * 添加客户信息
+     * @param request
+     * @param customerBasicInfo
+     * @param dockedContactInfoList
+     * @param channelSaleInfoList
+     * @param billingInfo
+     * @param ticketOpeningInfo
+     * @return
+     * @throws Exception
+     */
+    @ResponseBody
+    @RequiresPermissions("customerBasic:save:customerInfo")
+    @RequestMapping("/save_customer_info")
+    public ResponseJson saveCustomerBasicInfo(HttpServletRequest request, CustomerBasicInfo customerBasicInfo, List<DockedContactInfo> dockedContactInfoList,
+                                              List<ChannelSaleInfo> channelSaleInfoList,BillingInfo billingInfo, TicketOpeningInfo ticketOpeningInfo) throws Exception {
+        ResponseJson rjx = this.isValiData(customerBasicInfo);
+        Boolean isSaveSuccess = false;//是否保存成功标识
+        if(rjx.getResultCode() == 500){
+            return rjx;
+        }
+        logger.info("-----------------添加客户信息开始----------------------");
+        try {
+            customerBasicInfoSaveService.saveCustomerBasicInfo(customerBasicInfo,dockedContactInfoList,channelSaleInfoList,billingInfo,ticketOpeningInfo);
+            isSaveSuccess = true;
+        } catch (RuntimeException e) {
+            isSaveSuccess = false;
+            return new ResponseJson(500, e.getMessage(), 500);
+        }
+        logger.info("-----------------添加客户信息结束----------------------");
+        if (!isSaveSuccess) {
+            return new ResponseJson(500, "添加客户信息失败!", 500);
+        }else{
+            return new ResponseJson(200, "添加客户信息成功!", 200);
+        }
+    }
+
+    /**
+     * 跳转到修改客户信息页面
+     *
+     * @return
+     */
+    @RequiresPermissions("customerBasic:save:customerInfo")
+    @RequestMapping(value = "/update_customer_info")
+    public ModelAndView updateCustomerInfo(HttpServletRequest request) throws Exception{
+        ModelAndView mv = new ModelAndView("customerInfoAdmin/update_customer_info");
+        String customerId = request.getParameter("customerId");
+        boolean isSuccess = false;
+        if (!StringUtils.isNotEmpty(customerId)) {
+            return mv;
+        }
+        int queryCustomerId = Integer.valueOf(customerId);
+        CustomerBasicInfo customerBasicInfo = new CustomerBasicInfo();
+        List<DockedContactInfo> dockedContactInfoList = new ArrayList<DockedContactInfo>();
+        List<ChannelSaleInfo> channelSaleInfoList = new ArrayList<ChannelSaleInfo>();
+        BillingInfo billingInfo = new BillingInfo();
+        TicketOpeningInfo ticketOpeningInfo = new TicketOpeningInfo();
+        logger.info("-----------------修改客户信息开始----------------------");
+        try {
+            customerBasicInfo = customerBasicInfoSaveService.queryCustomerBasicInfoByCustomerId(queryCustomerId);
+            dockedContactInfoList = customerBasicInfoSaveService.queryDockedContactInfoListByCustomerId(queryCustomerId);
+            channelSaleInfoList = customerBasicInfoSaveService.queryChannelSaleInfoListByCustomerId(queryCustomerId);
+            billingInfo = customerBasicInfoSaveService.queryBillingInfoByCustomerId(queryCustomerId);
+            ticketOpeningInfo = customerBasicInfoSaveService.queryTicketOpeningInfoByCustomerId(queryCustomerId);
+            isSuccess = true;
+        }catch (Exception e){
+            isSuccess = false;
+            logger.error("跳转修改页面失败:"+e.getMessage());
+        }
+        logger.info("----------------修改客户信息结束----------------------");
+        if(!isSuccess){
+            return mv;
+        }else{
+            mv.addObject("customerBasicInfo", customerBasicInfo);
+            mv.addObject("dockedContactInfoList", dockedContactInfoList);
+            mv.addObject("channelSaleInfoList", channelSaleInfoList);
+            mv.addObject("billingInfo", billingInfo);
+            mv.addObject("ticketOpeningInfo", ticketOpeningInfo);
+        }
+        return mv;
+    }
+
+    /**
+     * 查询所有省份
+     *
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping(value = "/query_provinceList")
+    public ResponseJson queryProvinceList(HttpServletRequest request) {
+        //Province province = new Province();
+        String provinceId =  request.getParameter("provinceListInfo");
+        List<Province> provinceList = null;
+        provinceList = customerBasicInfoSaveService.queryProvinceList(provinceId);
+        if (provinceList != null || provinceList.size() > 0) {
+            ResponseJson rj =new ResponseJson(200, "查询成功", 200);
+            rj.addResponseKeyValue("provinceList", provinceList);
+            return rj;
+        } else {
+            return new ResponseJson(500, "查询失败", 500);
+        }
+    }
+
+    /**
+     * 根据省份代号查询所有城市
+     *
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping(value = "/query_cityList")
+    public ResponseJson queryCityList(HttpServletRequest request) {
+        //Province province = new Province();
+        String provinceId =  request.getParameter("provinceId");
+        List<City> cityList = null;
+        cityList = customerBasicInfoSaveService.queryCityList(provinceId);
+        if (cityList != null || cityList.size() > 0) {
+            ResponseJson rj =new ResponseJson(200, "查询成功", 200);
+            rj.addResponseKeyValue("cityList", cityList);
+            return rj;
+        } else {
+            return new ResponseJson(500, "查询失败", 500);
+        }
+    }
+
+    /**
+     * 查询所有渠道类别
+     *
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping(value = "/query_channelCategoryList")
+    public ResponseJson queryChannelCategoryList(HttpServletRequest request) {
+        String channelCategoryId =  request.getParameter("channelCategoryId");
+        List<ChannelDivisionInfo> channelCategoryList = null;
+        channelCategoryList = customerBasicInfoSaveService.queryChannelCategoryList(channelCategoryId);
+        if (channelCategoryList != null || channelCategoryList.size() > 0) {
+            ResponseJson rj =new ResponseJson(200, "查询成功", 200);
+            rj.addResponseKeyValue("channelCategoryList", channelCategoryList);
+            return rj;
+        } else {
+            return new ResponseJson(500, "查询失败", 500);
+        }
+    }
+
+    /**
+     * 根据渠道类别查询渠道类型
+     *
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping(value = "/query_channelTypeList")
+    public ResponseJson queryChannelTypeList(HttpServletRequest request) {
+        String channelCategoryId =  request.getParameter("channelCategoryId");
+        List<ChannelDivisionInfo> channelTypeList = null;
+        channelTypeList = customerBasicInfoSaveService.queryChannelTypeList(channelCategoryId);
+        if (channelTypeList != null || channelTypeList.size() > 0) {
+            ResponseJson rj =new ResponseJson(200, "查询成功", 200);
+            rj.addResponseKeyValue("channelTypeList", channelTypeList);
+            return rj;
+        } else {
+            return new ResponseJson(500, "查询失败", 500);
+        }
+    }
+
+    /**
+     * 初始化销售产品
+     *
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping(value = "/query_promotingProductsList")
+    public ResponseJson queryPromotingProductsList(HttpServletRequest request) {
+        String promotingProductsInfo =  request.getParameter("promotingProductsInfo");
+        List<Product> promotingProductsList = null;
+        promotingProductsList = customerBasicInfoSaveService.queryPromotingProductsList(promotingProductsInfo);
+        if (promotingProductsList != null || promotingProductsList.size() > 0) {
+            ResponseJson rj =new ResponseJson(200, "查询成功", 200);
+            rj.addResponseKeyValue("promotingProductsList", promotingProductsList);
+            return rj;
+        } else {
+            return new ResponseJson(500, "查询失败", 500);
+        }
+    }
+
+    /**
+     * 根据销售产品初始化价格
+     *
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping(value = "/query_supplyPriceList")
+    public ResponseJson querySupplyPriceList(HttpServletRequest request) {
+        String promotingProductsId =  request.getParameter("promotingProductsId");
+        List<ProductColor> supplyPriceList = null;
+        supplyPriceList = customerBasicInfoSaveService.querySupplyPriceList(promotingProductsId);
+        if (supplyPriceList != null || supplyPriceList.size() > 0) {
+            ResponseJson rj =new ResponseJson(200, "查询成功", 200);
+            rj.addResponseKeyValue("supplyPriceList", supplyPriceList);
+            return rj;
+        } else {
+            return new ResponseJson(500, "查询失败", 500);
+        }
+    }
+
+    /**
+     * 验证方法
+     *
+     * @param customerBasicInfo
+     * @return
+     */
+    public ResponseJson isValiData(CustomerBasicInfo customerBasicInfo) {
+        ResponseJson rj = new ResponseJson();
+        if(customerBasicInfo == null){
+            return new ResponseJson(500, "未填写客户基本信息", 500);
+        }
+        return rj;
+    }
+}

+ 8 - 0
watero-rst-web/src/main/resources/watero-rst-orm.xml

@@ -92,6 +92,13 @@
 		<typeAlias type="com.iamberry.rst.core.address.Country" alias="Country"/>
 		<typeAlias type="com.iamberry.rst.core.address.District" alias="District"/>
 		<typeAlias type="com.iamberry.rst.core.address.Province" alias="Province"/>
+
+		<typeAlias type="com.iamberry.rst.core.customer.BillingInfo" alias="BillingInfo"/>
+		<typeAlias type="com.iamberry.rst.core.customer.ChannelDivisionInfo" alias="ChannelDivisionInfo"/>
+		<typeAlias type="com.iamberry.rst.core.customer.ChannelSaleInfo" alias="ChannelSaleInfo"/>
+		<typeAlias type="com.iamberry.rst.core.customer.CustomerBasicInfo" alias="CustomerBasicInfo"/>
+		<typeAlias type="com.iamberry.rst.core.customer.DockedContactInfo" alias="DockedContactInfo"/>
+		<typeAlias type="com.iamberry.rst.core.customer.TicketOpeningInfo" alias="TicketOpeningInfo"/>
 	</typeAliases>
 	<!-- PageHelper -->
 	<plugins>
@@ -153,6 +160,7 @@
 		<mapper resource="com/iamberry/rst/service/address/mapper/addressMapper.xml"/>
 
 		<mapper resource="com/iamberry/rst/service/sys/mapper/sysConfigMapper.xml"/>
+		<mapper resource="com/iamberry/rst/service/customer/mapper/CustomerBasicMapper.xml"/>
 
 	</mappers>
 </configuration>

+ 331 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/customer/custome_basic_detail.ftl

@@ -0,0 +1,331 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+<#include "/base/add_base.ftl">
+    <link href="${path}/common/lib/jquery.ui/jquery-ui.css" rel="stylesheet" type="text/css"/>
+    <link href="${path}/common/lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css"/>
+    <link href="${path}/common/lib/icheck/icheck.css" rel="stylesheet" type="text/css"/>
+    <style>
+        .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
+        .tit:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
+        .tit-2{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
+        .tit-2:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
+        #province select{margin-right:10px; width:100px;height: 31px;-webkit-appearance:none !important;appearance:none;background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;padding-left:3px;padding-right: 25px;}
+
+        #suggest, #suggest2 {width:200px}
+        .gray {color:gray}
+        .ac_results {background:#fff;border:1px solid #7f9db9;position: absolute;z-index: 10000;display: none}
+        .ac_results li a {white-space: nowrap;text-decoration:none;display:block;color:#05a;padding:1px 3px}
+        .ac_results li {border:1px solid #fff}
+        .ac_over, .ac_results li a:hover {background:#c8e3fc}
+        .ac_results li a span {float:right}
+        .ac_result_tip {border-bottom:1px dashed #666;padding:3px}
+
+        .select-box{background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;}
+        .select-box select{-webkit-appearance:none !important;background-color: transparent; appearance:none;padding-right: 25px;}
+        .dalog-ask{position: absolute;left:60%;top:0;-webkit-transform: translateY(-30%);transform: translateY(-30%);display: none;background-color: #fff;z-index: 10;}
+        .tag{ width:300px; min-height:300px; border:1px solid #32a3d8; position:relative;background-color: #fff;line-height: 1.5;padding: 10px 12px;}
+        .tag em{display:block; border-width:15px; position:absolute; top:30%; left:-30px;border-style:solid dashed dashed; border-color:transparent  #32a3d8 transparent transparent;font-size:0; line-height:0;}
+        .dalog-ask .ask{color: #000;margin: 10px 0 5px 0;}
+        .dalog-ask .answer{color: #666;margin-bottom: 10px;}
+        .dalog-ask .answer:hover{color: #32a3d8;cursor: pointer;}
+        .time-line-list{list-style: none;width: 100%;margin-left: -20px;}
+        .time-line-list>li{position: relative;float: left; text-align: center;width: 100px;overflow: hidden;white-space: nowrap;word-break: break-all;padding: 2px 0;}
+        .time-line-list .number{display: inline-block; padding: 2px; background: #32a3d8;border: 2px solid #fff;box-shadow:0 0 0 1px #32a3d8;width: 20px;height: 20px;color: #fff;line-height: 20px;border-radius: 50%;}
+        .time-line-list .red{display: inline-block; padding: 2px; background: red;border: 2px solid #fff;box-shadow:0 0 0 1px #32a3d8;width: 20px;height: 20px;color: #fff;line-height: 20px;border-radius: 50%;}
+        .time-line-list>li:before{content:'';position: absolute;height: 1px;width: 30%;right:0;top: 15px; background-color: #32a3d8;}
+        .time-line-list>li:after{content: '';position: absolute;height: 1px;width: 30%;left: 0;top: 15px;background:#32a3d8;}
+        .time-line-list>li:first-child:after,.time-line-list>li:last-child:before{display: none;}
+        .time-line-list .arrow{border-width:7px; position:absolute; left:25%; top:9px;border-style:solid dashed dashed; border-color:transparent  transparent  transparent #32a3d8;font-size:0; line-height:0;}
+        .time-line-list>li:first-child .arrow{display: none;}
+        .table-bg th{background-color: #e2f6ff;}
+        .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
+        .my-search-input{padding-left: 30px;background: url(${path}/common/images/cm/search.png) 6px center no-repeat;background-size: auto 60%; }
+        .txt-red{color:red}
+    </style>
+    <title>客诉基本信息</title>
+</head>
+<body>
+<article class="cl pd-20">
+    <form action="" method="post" class="form form-horizontal" id="form-article-add">
+        <div class="row cl">
+            <label class="form-label col-2">
+                <div class="tit-2">客户基本信息</div>
+            </label>
+            <div class="formControls col-9">
+            </div>
+        </div>
+        <div class="row cl">
+            <label class="form-label col-2 col-sm-2">客户类型:</label>
+            <div class="formControls col-4 col-sm-4">
+				<label>
+                    <#if customerBasicInfo.customerType == 1>个人</#if>
+                    <#if customerBasicInfo.customerType == 2>企业</#if>
+                </label>
+            </div>
+            <label class="form-label col-2 col-sm-2">合作进度:</label>
+            <div class="formControls col-4 col-sm-4">
+                <label>
+                    <#if customerBasicInfo.cooperativeState == 1>意向合作</#if>
+                    <#if customerBasicInfo.cooperativeState == 2>已经合作</#if>
+                    <#if customerBasicInfo.cooperativeState == 3>停止合作</#if>
+                </label>
+            </div>
+        </div>
+        <div class="row cl">
+            <label class="form-label col-2 col-sm-2">客户名称:</label>
+            <div class="formControls col-4 col-sm-4">
+                <label>
+                    ${customerBasicInfo.customerName!''}
+                </label>
+            </div>
+            <label class="form-label col-2 col-sm-2">客户行业:</label>
+            <div class="formControls col-4 col-sm-4">
+                <label>
+                    ${customerBasicInfo.customerIndustry!''}
+                </label>
+            </div>
+        </div>
+        <div class="row cl" style="position: relative;">
+            <label class="form-label col-2 col-sm-2">客户地址:</label>
+            <div class="formControls col-4 col-sm-4">
+                <label>
+                ${customerBasicInfo.provinceName!''}-${customerBasicInfo.cityName!''}-${customerBasicInfo.customerAddress!''}
+                </label>
+            </div>
+        </div>
+        <div class="row cl">
+            <label class="form-label col-3">
+                <div class="tit-2">对接联系人信息</div>
+            </label>
+            <div class="formControls col-9">
+            </div>
+        </div>
+
+        <div class="row cl">
+            <label class="form-label col-1 col-sm-1"></label>
+            <div class="formControls col-6 col-sm-6 text-c">
+                <table class="table table-border table-bg table-bordered">
+                    <thead>
+                    <tr>
+                        <th>联系人姓名</th>
+                        <th>联系电话</th>
+                        <th>职位/身份</th>
+                        <th>联系邮箱</th>
+                    </tr>
+                    </thead>
+                    <tbody id="salesOrderHtml">
+
+                    <#if listDockedContactInfo?? &&  (listDockedContactInfo?size > 0) >
+                        <#list listDockedContactInfo as list>
+                        <tr>
+                            <td>${list.contactName!''}</td>
+                            <td>${list.contactPhone!''}</td>
+                            <td>${list.contactType!''}</td>
+                            <td>${list.contactEmail!''}</td>
+                        </tr>
+                        </#list>
+                    <#else>
+                    <tr><td colspan="4" class="td-manage text-c" >暂时没有对接人信息,请添加!</td></tr>
+                    </#if>
+
+                    </tbody>
+                </table>
+            </div>
+        </div>
+
+        <div class="row cl">
+            <label class="form-label col-3">
+                <div class="tit-2">客户销售渠道信息备案</div>
+            </label>
+            <div class="formControls col-9">
+            </div>
+        </div>
+
+        <div class="row cl">
+            <label class="form-label col-1 col-sm-1"></label>
+            <div class="formControls col-6 col-sm-6 text-c">
+                <table class="table table-border table-bg table-bordered">
+                    <thead>
+                    <tr>
+                        <th>渠道类别</th>
+                        <th>渠道类型</th>
+                        <th>渠道/平台名称</th>
+                        <th>销售产品</th>
+                    </tr>
+                    </thead>
+                    <tbody>
+
+                        <#if listChannelDivisionInfo?? &&  (listChannelDivisionInfo?size > 0) >
+                            <#list listChannelDivisionInfo as list>
+                        <tr>
+                        <td>
+                            <#if list.channelCategory == 1 >电商</#if>
+                            <#if list.channelCategory == 2 >特殊渠道</#if>
+                            <#if list.channelCategory == 3 >线下</#if>
+                            <#if list.channelCategory == 4 >海外</#if>
+                        </td>
+                        <td>${list.channelType}</td>
+                        <td>${list.channelName}</td>
+                        <td>
+
+                            <table class="table table-border table-bg table-bordered">
+                                <thead>
+                                <tr>
+                                    <th>销售产品型号</th>
+                                    <th>供货价(元,含17%税)</th>
+                                    <th>账期</th>
+                                </tr>
+                                </thead>
+                                <tbody>
+                                    <#if list.listChannelSaleInfo?? &&  (list.listChannelSaleInfo?size > 0) >
+                                        <#list list.listChannelSaleInfo as list>
+                                        <tr>
+                                            <td>${list.promotingProducts}</td>
+                                            <td>${list.supplyPrice}</td>
+                                            <td>
+                                            <#if list.accountPeriod == 1>先款</#if>
+                                            <#if list.accountPeriod == 2>月结 </#if>
+                                            <#if list.accountPeriod == 3>两个月</#if>
+                                            </td>
+                                        </tr>
+                                        </#list>
+                                    <#else>
+                                    <tr><td colspan="3" class="td-manage text-c" >暂时没有销售信息,请添加!</td></tr>
+                                    </#if>
+
+                                </tbody>
+                            </table>
+
+                        </td>
+                        </tr>
+                            </#list>
+                        <#else>
+                        <tr><td colspan="4" class="td-manage text-c" >暂时没有渠道信息,请添加!</td></tr>
+                        </#if>
+
+                    </tbody>
+                </table>
+            </div>
+        </div>
+        <div class="row cl">
+            <label class="form-label col-3">
+                <div class="tit-2">付款/退款信息</div>
+            </label>
+            <div class="formControls col-9">
+            </div>
+        </div>
+        <#if billingInfo??>
+            <div class="row cl">
+                <label class="form-label col-2 col-sm-2">开户支行:</label>
+                <div class="formControls col-2 col-sm-2">
+                    <label>${billingInfo.accountOpeningBranch!''}</label>
+                </div>
+                <label class="form-label col-2 col-sm-2">账户名称:</label>
+                <div class="formControls col-2 col-sm-2">
+                    <label>${billingInfo.accountName!''}</label>
+                </div>
+                <label class="form-label col-2 col-sm-2">账号:</label>
+                <div class="formControls col-2 col-sm-2">
+                    <label>${billingInfo.accountNum!''}</label>
+                </div>
+            </div>
+            <div class="row cl">
+                <label class="form-label col-2 col-sm-2">收款人姓名:</label>
+                <div class="formControls col-4 col-sm-4">
+                    <label>${billingInfo.receivablesName!''}</label>
+                </div>
+                <label class="form-label col-2 col-sm-2">收款人电话:</label>
+                <div class="formControls col-4 col-sm-4">
+                    <label>${billingInfo.receivablesPhone!''}</label>
+                </div>
+            </div>
+        <#else>
+            <div class="row cl">
+                <label class="form-label col-2 col-sm-2">无付款/退款信息</label>
+            </div>
+        </#if>
+
+
+        <div class="row cl">
+            <label class="form-label col-3">
+                <div class="tit-2">开票信息</div>
+            </label>
+            <div class="formControls col-9">
+            </div>
+        </div>
+        <#if ticketOpeningInfo??>
+        <div class="row cl">
+            <label class="form-label col-2 col-sm-2">发票类型:</label>
+            <div class="formControls col-2 col-sm-2">
+                <label>
+                <#if ticketOpeningInfo.ticketType == 1>专票</#if>
+                <#if ticketOpeningInfo.ticketType == 2>普票</#if>
+                </label>
+            </div>
+            <label class="form-label col-2 col-sm-2">开户支行:</label>
+            <div class="formControls col-2 col-sm-2">
+                <label>${ticketOpeningInfo.accountOpeningBranch!''}</label>
+            </div>
+            <label class="form-label col-2 col-sm-2">开票账号:</label>
+            <div class="formControls col-2 col-sm-2">
+                <label>${ticketOpeningInfo.ticketOpeningAccount!''}</label>
+            </div>
+        </div>
+
+        <div class="row cl">
+            <label class="form-label col-2 col-sm-2">企业名称:</label>
+            <div class="formControls col-2 col-sm-2">
+                <label>${ticketOpeningInfo.enterpriseName!''}</label>
+            </div>
+            <label class="form-label col-2 col-sm-2">纳税人识别号:</label>
+            <div class="formControls col-2 col-sm-2">
+                <label>${ticketOpeningInfo.taxpayerIdentificationNum!''}</label>
+            </div>
+            <label class="form-label col-2 col-sm-2">开票电话:</label>
+            <div class="formControls col-2 col-sm-2">
+                <label>${ticketOpeningInfo.ticketOpeningPhone!''}</label>
+            </div>
+        </div>
+        <div class="row cl">
+            <label class="form-label col-2 col-sm-2">企业地址:</label>
+            <div class="formControls col-2 col-sm-2">
+                <label>${ticketOpeningInfo.enterpriseAddress!''}</label>
+            </div>
+        </div>
+        <#else>
+            <div class="row cl">
+                <label class="form-label col-2 col-sm-2"> 不需开票</label>
+            </div>
+        </#if>
+        <div class="row cl">
+            <label class="form-label col-3">
+                <div class="tit-2">客户备注</div>
+            </label>
+            <div class="formControls col-9">
+            </div>
+        </div>
+        <div class="row cl">
+            <label class="form-label col-1 col-sm-1"></label>
+            <div class="formControls col-4 col-sm-4">
+                <label>${customerBasicInfo.customerRemarks!''}</label>
+            </div>
+        </div>
+    </form>
+</article>
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+<script type="text/javascript" src="${path}/common/lib/webuploader/0.1.5/webuploader.min.js"></script>
+<script type="text/javascript" src="${path}/common/lib/icheck/jquery.icheck.min.js"></script>
+<script type="text/javascript" src="${path}/common/lib/cm.lib/jquery.provincesCity.js"></script>
+<script type="text/javascript" src="${path}/common/lib/cm.lib/provincesData.js"></script>
+<script type="text/javascript" src="${path}/common/lib/cm.lib/airCity.js"></script>
+<script type="text/javascript" src="${path}/common/lib/cm.lib/suggest.js"></script>
+<script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
+
+</body>
+</html>

+ 188 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/customer/customer_basic_list.ftl

@@ -0,0 +1,188 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<meta charset="UTF-8">
+		<title></title>
+        <#include "/base/list_base.ftl">
+		<style>
+			*{padding: 0;margin: 0;}
+			.my-input{border: 1px solid rgba(0,0,0,.1);padding: 1px 5px;height: 32px;margin-right: 10px;}
+			/*.my-input::-webkit-input-placeholder,.my-select{color: #dcdcdc;}*/
+			.my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;height: 34px;margin: 0 10px; -webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/select-1.png) right center no-repeat;background-size:auto 100%;}
+			.my-btn-search{border: 1px solid #32a3d8;padding: 1px 25px;height: 32px;background-color: #32a3d8;color: #fff;}
+            .barcodeImg{margin:10px 0px}
+            .table-bg thead th{background-color: #e2f6ff;}
+            input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+            input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+		</style>
+	</head>
+	<body>
+    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
+        <span class="c-gray en">&gt;</span> 客户信息管理
+        <span class="c-gray en">&gt;</span> 客户信息列表
+        <a class="btn radius r" style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;border:1px solid #32a3d8;" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
+    </nav>
+		<div class="text-c" style="margin-top: 20px;">
+			<form action="${path}/admin/customerBasic/listCustomerBasic" method="post">
+					<select class="my-select" name="isLookAll">
+					<#if isLookAll??>
+						<option value ="1" <#if isLookAll == 1>selected</#if>>查看全部客户</option>
+						<option value ="2" <#if isLookAll == 2>selected</#if>>只看我的客户</option>
+					<#else >
+						<option value ="1">查看全部客户</option>
+						<option value ="2">只看我的客户</option>
+					</#if>
+					</select>
+                    <select class="my-select" name="customerType">
+                        <option value ="">所有客户类型</option>
+                        <#if customerType??>
+                         <option value ="1" <#if customerType == 1>selected</#if>>个人</option>
+                         <option value ="2" <#if customerType == 2>selected</#if>>企业</option>
+                        <#else >
+                            <option value ="1">个人</option>
+                            <option value ="2">企业</option>
+                        </#if>
+                    </select>
+                    <select class="my-select" name="cooperativeState">
+                        <option value ="1">合作状态</option>
+                    <#if cooperativeState??>
+                        <option value ="1" <#if cooperativeState == 1>selected</#if>>意向合作</option>
+                        <option value ="2" <#if cooperativeState == 2>selected</#if>>已经合作</option>
+                        <option value ="3" <#if cooperativeState == 3>selected</#if>>停止合作</option>
+                    <#else >
+                        <option value ="1">意向合作</option>
+                        <option value ="2">已经合作</option>
+                        <option value ="3">停止合作</option>
+                    </#if>
+                    </select>
+                    <input class="my-input" type="text" name="customerName" value="${customerName!''}" placeholder="请输入客户名称"/>
+                    <input class="my-input" type="text" name="contactPhone" value="${contactPhone!''}" placeholder="请输入客户电话"/>
+                    <input class="my-input" type="text" name="contactEmail" value="${contactEmail!''}" placeholder="请输入客户邮箱"/>
+					<button type="submit" style="cursor:pointer; " class="my-btn-search">搜索</button>
+			</form>
+		</div>
+		<div class="mt-20" style="margin: 20px;">
+			<table class="table table-border table-bordered table-bg table-hover table-sort">
+				<thead>
+				<tr class="text-c">
+                    <th width="100">状态</th>
+					<th width="100">合作状态</th>
+					<th width="100">业务员</th>
+					<th width="100">客户类型</th>
+					<th width="100">客户名称</th>
+					<th width="50">客户行业</th>
+                    <th width="40">所在区域</th>
+                    <th width="40">备注信息</th>
+                    <th width="40">添加日期</th>
+					<th width="150">操作</th>
+				</tr>
+				</thead>
+				<tbody id="listid">
+                <#if page.dataList?? &&  (page.dataList?size > 0) >
+					<#list page.dataList as list>
+						<tr>
+                            <td class="text-c" width="100">
+                                <#if list.customerStatus == 1>
+                                    已删除
+                                </#if>
+                                <#if list.customerStatus == 2>
+                                    正常
+                                </#if>
+                            </td>
+							<td class="text-c" width="100">
+                                <#if list.cooperativeState == 1>
+                                    意向合作
+                                </#if>
+                                <#if list.cooperativeState == 2>
+                                    已经合作
+                                </#if>
+                                <#if list.cooperativeState == 3>
+                                    停止合作
+                                </#if>
+                            </td>
+							<td class="text-c" width="100">${list.adminName!''}</td>
+                            <td class="text-c" width="100">
+                                <#if list.customerType == 1>
+                                        个人
+                                </#if>
+                                <#if list.customerType == 2>
+                                        企业
+                                </#if>
+                            </td>
+                            <td class="text-c" width="100">
+                                ${list.customerName!''}
+                            </td>
+                            <td class="text-c" width="100">
+                                ${list.customerIndustry!''}
+                            </td>
+                            <td class="text-c" width="100">
+                                ${list.provinceName!''}-${list.cityName!''}
+                            </td>
+                            <td class="text-c" width="50">${list.customerRemarks!''}</td>
+                            <td class="text-c" width="100">${(list.createDate?string("yyyy-MM-dd"))!''}</td>
+							<!-- 遍历操作 -->
+							<td class="td-manage text-c">
+                                <#if list.customerStatus == 2>
+                                    <#if adminId == list.idCreateBy>
+                                        <a href="#" onclick="deleteState(${list.customerId!''})">删除</a>
+                                    </#if>
+                                </#if>
+                                <#if !isSelectAll?? ||(isSelectAll != 2) || (adminId == list.idCreateBy)>
+                                        <a href="#" onclick="customerDetail(${list.customerId!''})">详情</a>
+                                </#if>
+                            </td>
+						</tr>
+					</#list>
+                <#else>
+                <tr><td id="noMachineTr" colspan="11" class="td-manage text-c" >暂时没有客户信息,请添加!</td></tr>
+                </#if>
+				</tbody>
+			</table>
+		</div>
+		<#include "/base/page_util.ftl">
+
+        <#--jquery.PrintArea 2.4-->
+        <script type="text/javascript" src="${path}/common/lib/jquery.PrintArea/jquery.PrintArea.js"></script>
+        <script type="text/javascript" src="${path}/common/lib/jquery/1.9.1/jquery-barcode.js"></script>
+
+		<script type="text/javascript">
+
+            /**
+             * 删除 (修改状态为已删除)
+             */
+            function deleteState(customerId) {
+                layer.confirm('确认要删除吗?',function(index){
+                    $.ajax({
+                        cache: true,
+                        type: "POST",
+                        data: {"customerId":customerId},
+                        url: "${path}/admin/customerBasic/update_customerState",
+                        async: false,
+                        success: function(data){
+                            if (data.returnCode == 200) {
+                                layer.msg(data.resultMsg,{icon: 1,time:1000});
+                                // $('#txt_customerIsSolve').html('已解决');
+                            } else {
+                                layer.msg(data.resultMsg,{icon: 5,time:1000});
+                            }
+                            location.replace(location.href);
+                        },
+                        error: function(XmlHttpRequest, textStatus, errorThrown){
+                        }
+                    })
+                }, function() {
+
+                });
+            }
+
+
+            /**
+             *跳转到详情页面
+             * @param employee
+             */
+            function customerDetail(customerId) {
+                window.location.href= "${path}/admin/customerBasic/customer_Basic_Detail?customerId="+customerId;
+            }
+        </script>
+	</body>
+</html>

+ 646 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/customer/save_customer_info.ftl

@@ -0,0 +1,646 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <#--new style begin-->
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+    <#include "/base/add_base.ftl">
+    <link href="${path}/common/lib/jquery.ui/jquery-ui.css" rel="stylesheet" type="text/css"/>
+    <link href="${path}/common/lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css"/>
+    <link href="${path}/common/lib/icheck/icheck.css" rel="stylesheet" type="text/css"/>
+    <style>
+        .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
+        .tit:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
+        .tit-2{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
+        .tit-2:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
+        #province select{margin-right:10px; width:100px;height: 31px;-webkit-appearance:none !important;appearance:none;background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;padding-left:3px;padding-right: 25px;}
+        .my-btn-search{border: 1px solid #32a3d8;padding: 1px 25px;height: 32px;background-color: #32a3d8;color: #fff;}
+        #suggest, #suggest2 {width:200px}
+        .gray {color:gray}
+        .ac_results {background:#fff;border:1px solid #7f9db9;position: absolute;z-index: 10000;display: none}
+        .ac_results li a {white-space: nowrap;text-decoration:none;display:block;color:#05a;padding:1px 3px}
+        .ac_results li {border:1px solid #fff}
+        .ac_over, .ac_results li a:hover {background:#c8e3fc}
+        .ac_results li a span {float:right}
+        .ac_result_tip {border-bottom:1px dashed #666;padding:3px}
+
+        .select-box{background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;}
+        .select-box select{-webkit-appearance:none !important;background-color: transparent; appearance:none;padding-right: 25px;}
+        .dalog-ask{position: absolute;left:60%;top:0;-webkit-transform: translateY(-30%);transform: translateY(-30%);display: none;background-color: #fff;z-index: 10;}
+        .tag{ width:300px; min-height:300px; border:1px solid #32a3d8; position:relative;background-color: #fff;line-height: 1.5;padding: 10px 12px;}
+        .tag em{display:block; border-width:15px; position:absolute; top:30%; left:-30px;border-style:solid dashed dashed; border-color:transparent  #32a3d8 transparent transparent;font-size:0; line-height:0;}
+        .dalog-ask .ask{color: #000;margin: 10px 0 5px 0;}
+        .dalog-ask .answer{color: #666;margin-bottom: 10px;}
+        .dalog-ask .answer:hover{color: #32a3d8;cursor: pointer;}
+        .time-line-list{list-style: none;width: 100%;margin-left: -20px;}
+        .time-line-list>li{position: relative;float: left; text-align: center;width: 100px;overflow: hidden;white-space: nowrap;word-break: break-all;padding: 2px 0;}
+        .time-line-list .number{display: inline-block; padding: 2px; background: #32a3d8;border: 2px solid #fff;box-shadow:0 0 0 1px #32a3d8;width: 20px;height: 20px;color: #fff;line-height: 20px;border-radius: 50%;}
+        .time-line-list .red{display: inline-block; padding: 2px; background: red;border: 2px solid #fff;box-shadow:0 0 0 1px #32a3d8;width: 20px;height: 20px;color: #fff;line-height: 20px;border-radius: 50%;}
+        .time-line-list>li:before{content:'';position: absolute;height: 1px;width: 30%;right:0;top: 15px; background-color: #32a3d8;}
+        .time-line-list>li:after{content: '';position: absolute;height: 1px;width: 30%;left: 0;top: 15px;background:#32a3d8;}
+        .time-line-list>li:first-child:after,.time-line-list>li:last-child:before{display: none;}
+        .time-line-list .arrow{border-width:7px; position:absolute; left:25%; top:9px;border-style:solid dashed dashed; border-color:transparent  transparent  transparent #32a3d8;font-size:0; line-height:0;}
+        .time-line-list>li:first-child .arrow{display: none;}
+        .table-bg th{background-color: #e2f6ff;}
+        .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
+        .my-search-input{padding-left: 30px;background: url(${path}/common/images/cm/search.png) 6px center no-repeat;background-size: auto 60%; }
+        .txt-red{color:red}
+    </style>
+    <title>增加客户信息</title>
+</head>
+<body>
+<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
+    <span class="c-gray en">&gt;</span> 客户信息管理
+    <span class="c-gray en">&gt;</span> 增加客户信息
+    <a class="btn radius r" style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;border:1px solid #32a3d8;" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
+</nav>
+<div class="pd-20 cl">
+    <form action="${path}/admin/customerBasic/saveCustomerInfo" method="post">
+    <#--<form action="${path}/admin/customerBasic/save_customer_info" method="post" class="form form-horizontal" id="form-customerInfoAdmin-add"  onkeydown="if(event.keyCode==13)return false;">-->
+        <input type="hidden" id="isNeedSelectOrder" name="isNeedSelectOrder" value="">
+        <#--客户基本信息 start-->
+        <div class="row cl">
+            <label class="form-label col-2">
+                <div class="tit-2">客户基本信息</div>
+            </label>
+            <div class="formControls col-9">
+            </div>
+        </div>
+        <div class="row cl" style="margin-bottom: 10px;">
+            <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>客户类型:</label>
+            <div class="formControls col-4 col-sm-4">
+                 <span class="select-box">
+                        <select name="customerType" class="select">
+                            <option value="1">个人</option>
+                            <option value="2">公司</option>
+                        </select>
+                 </span>
+            </div>
+            <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>合作进度:</label>
+            <div class="formControls col-4 col-sm-4">
+                <span class="select-box">
+                        <select name="cooperativeState" class="select">
+                            <option value="1">意向合作</option>
+                            <option value="2">已经合作</option>
+                            <option value="3">停止合作</option>
+                        </select>
+                </span>
+            </div>
+        </div>
+        <div class="row cl" style="margin-bottom: 10px;">
+            <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>客户名称:</label>
+            <div class="formControls col-4 col-sm-4">
+                <input type="text" class="input-text trim_input" placeholder="公司/客户 全称" id="customerName" name="customerName" value="">
+            </div>
+            <label class="form-label col-2 col-sm-2">客户行业:</label>
+            <div class="formControls col-4 col-sm-4">
+                <input type="text" class="input-text trim_input" placeholder="请输入行业名称" id="customerIndustry" name="customerIndustry" value="">
+            </div>
+        </div>
+        <div class="row cl" style="position: relative;margin-bottom: 10px;">
+            <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>客户地址:</label>
+            <div class="formControls col-4 col-sm-4">
+                <span class="select-box">
+                        <select name="customerProvinceCode" class="select">
+                            <option value="">请选择省份</option>
+                        </select>
+                </span>
+            </div>
+            <div class="formControls col-4 col-sm-4">
+                <span class="select-box">
+                        <select name="customerCityCode" class="select">
+                            <option value="">请选择城市</option>
+                        </select>
+                </span>
+            </div>
+        </div>
+        <div class="row cl" style="margin-bottom: 10px;">
+            <label class="form-label col-2 col-sm-2"></label>
+            <div class="formControls col-9 col-sm-9">
+                <input type="text" class="input-text trim_input" placeholder="请输入客户的详细地址" id="customerAddress" name="customerAddress" value="">
+            </div>
+        </div>
+        <#--客户基本信息 end-->
+        <#--对接联系人信息-->
+        <div class="row cl">
+            <label class="form-label col-3">
+                <div class="tit-2">对接联系人信息<span style="font-family:'Arial Normal', 'Arial';font-weight:400;font-size:14px;">(请确保真实性,公司将不定期抽验回访)</span></div>
+            </label>
+            <div class="formControls col-9">
+            </div>
+        </div>
+        <div class="row cl">
+            <div class="formControls col-9">
+                <span class="c-red">*</span>姓名:<input type="text" class="input-text"  style="width:90px;margin-right: 10px; margin-bottom: 10px;" placeholder="联系人姓名" id="contactName" name="contactName">
+                <span class="c-red">*</span>电话:<input type="text" class="input-text"  style="width:90px;margin-right: 10px;margin-bottom: 10px;"  placeholder="联系人电话" id="contactPhone" name="contactPhone">
+                <span class="c-red">*</span>职位/身份:<input type="text" class="input-text"  style="width:90px;margin-right: 10px;margin-bottom: 10px;"  placeholder="职位或身份" id="contactType" name="contactType">
+                <span class="c-red">*</span>联系邮箱:<input type="text" class="input-text"  style="width:90px;margin-right: 10px;margin-bottom: 10px;"  placeholder="邮箱" id="contactEmail" name="contactEmail">
+                <span class="c-red"><button type="button" style="cursor:pointer; float: right;height: 35px;margin-right: 30px;margin-bottom: 10px;" class="my-btn-search" onclick="toAddDockedContactInfo();">保存</button></span>
+            </div>
+            <div class="mt-20" style="margin: 20px;">
+                <table class="table table-border table-bordered table-bg table-hover table-sort" id="contactTable">
+                    <thead>
+                    <tr class="text-c">
+                        <th width="100">联系人姓名</th>
+                        <th width="100">联系电话</th>
+                        <th width="100">职位/身份</th>
+                        <th width="100">联系邮箱</th>
+                        <th width="100">操作</th>
+                    </tr>
+                    </thead>
+                    <tbody id="listid">
+                        <tr><td colspan="5" class="td-manage text-c" >暂时没有联系人信息,请添加!</td></tr>
+                    </tbody>
+                </table>
+            </div>
+        </div>
+        <#--客户销售渠道信息备案-->
+        <div class="row cl">
+            <label class="form-label col-3">
+                <div class="tit-2">客户销售渠道信息备案</div>
+            </label>
+            <div class="formControls col-9">
+            </div>
+        </div>
+        <div class="row cl">
+            <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>渠道类别:</label>
+            <div class="formControls col-1 col-sm-1">
+                <span class="select-box">
+                    <select name="channelCategory" id="channelCategory" class="select">
+                    </select>
+                </span>
+            </div>
+            <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>渠道类型:</label>
+            <div class="formControls col-1 col-sm-1">
+                <span class="select-box">
+                    <select name="channelType" id="channelType" class="select">
+                    </select>
+                </span>
+            </div>
+            <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>渠道名称:</label>
+            <div class="formControls col-1 col-sm-1">
+                <input type="text" class="input-text"  style="width:90px;margin-right: 0px;margin-bottom: 10px;"  placeholder="填写具体店名" id="channelName" name="channelName">
+            </div>
+            <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>销售产品:</label>
+            <div class="formControls col-1 col-sm-1">
+                <span class="select-box">
+                    <select name="promotingProducts" id="promotingProducts" class="select">
+                    </select>
+                </span>
+            </div>
+            <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>供货价格:</label>
+            <div class="formControls col-1 col-sm-1">
+                <span class="select-box">
+                    <select name="supplyPrice" id="supplyPrice" class="select">
+                    </select>
+                </span>
+                    <input type="text" class="input-text"  style="width:90px;margin-right: 0px;margin-bottom: 10px;"  placeholder="填写供货价格" id="supplyPrice" name="supplyPrice">
+            </div>
+            <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>账期:</label>
+            <div class="formControls col-1 col-sm-1">
+                <span class="select-box">
+                    <select name="accountPeriod" id="accountPeriod" class="select">
+                        <option value="1">先款</option>
+                        <option value="2">月结</option>
+                        <option value="3">两个月</option>
+                    </select>
+                </span>
+            </div>
+            <button type="button" style="cursor:pointer; float: right;height: 35px;margin-right: 30px;margin-bottom: 10px;" class="my-btn-search" onclick="toAddChannelSaleInfo();">保存</button>
+            <div class="mt-20" style="margin: 20px;">
+                <table class="table table-border table-bordered table-bg table-hover table-sort" id="saleTable">
+                    <thead>
+                    <tr class="text-c">
+                        <th width="100">渠道类别</th>
+                        <th width="100">渠道类型</th>
+                        <th width="100">渠道/平台名称</th>
+                        <th width="100">销售产品型号</th>
+                        <th width="100">供货价(元)</th>
+                        <th width="100">账期 </th>
+                        <th width="100">操作</th>
+                    </tr>
+                    </thead>
+                    <tbody id="listid">
+                    <tr><td colspan="7" class="td-manage text-c" >暂时没有联系人信息,请添加!</td></tr>
+                    </tbody>
+                </table>
+            </div>
+        </div>
+        <#--付款/退款信息-->
+        <div class="row cl">
+            <label class="form-label col-3">
+                <div class="tit-2">付款/退款信息<span style="font-family:'Arial Normal', 'Arial';font-weight:400;font-size:14px;">(请真实有效,用于财务收款确认或退款业务)</span></div>
+            </label>
+            <div class="formControls col-9">
+            </div>
+        </div>
+        <div class="row cl" style="margin-bottom: 10px;">
+            <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>开户支行:</label>
+            <div class="formControls col-2 col-sm-2">
+                <input type="text" class="input-text trim_input" placeholder="开户支行" id="accountOpeningBranch" name="accountOpeningBranch" value="">
+            </div>
+            <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>账户名称:</label>
+            <div class="formControls col-2 col-sm-2 skin-minimal">
+                <input type="text" class="input-text trim_input" placeholder="账户名称" id="accountName" name="accountName" value="">
+            </div>
+            <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>账号:</label>
+            <div class="formControls col-2 col-sm-2 skin-minimal">
+                <input type="text" class="input-text trim_input" placeholder="填写账号" id="accountNum" name="accountNum" value="">
+            </div>
+        </div>
+        <div class="row cl" style="margin-bottom: 10px;">
+            <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>收款人姓名:</label>
+            <div class="formControls col-2 col-sm-2 skin-minimal">
+                <input type="text" class="input-text trim_input" placeholder="收款人姓名" id="receivablesName" name="receivablesName" value="">
+            </div>
+            <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>收款人手机:</label>
+            <div class="formControls col-2 col-sm-2 skin-minimal">
+                <input type="text" class="input-text trim_input" placeholder="收款人手机" id="receivablesPhone" name="receivablesPhone" value="">
+            </div>
+        </div>
+
+        <#--开票信息-->
+        <div class="row cl" style="margin-bottom: 10px;">
+            <label class="form-label col-3">
+                <div class="tit-2">开票信息</div>
+            </label>
+            <div class="formControls col-9">
+            </div>
+        </div>
+        <div class="row cl" style="margin-bottom: 10px;">
+            <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>发票类型:</label>
+            <div class="formControls col-2 col-sm-2">
+                <span class="select-box">
+                    <select name="ticketType" class="select">
+                        <option value="1">专票</option>
+                        <option value="2">普票</option>
+                    </select>
+                </span>
+            </div>
+                <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>开户支行:</label>
+                <div class="formControls col-2 col-sm-2 skin-minimal">
+                    <input type="text" class="input-text trim_input" placeholder="开户支行名称" id="accountOpeningBranch" name="accountOpeningBranch" value="">
+                </div>
+                <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>开票账户:</label>
+                <div class="formControls col-2 col-sm-2 skin-minimal">
+                    <input type="text" class="input-text trim_input" placeholder="开票账户" id="ticketOpeningAccount" name="ticketOpeningAccount" value="">
+                </div>
+            </div>
+        <div class="row cl" style="margin-bottom: 10px;">
+            <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>企业名称:</label>
+            <div class="formControls col-2 col-sm-2 skin-minimal">
+                <input type="text" class="input-text trim_input" placeholder="企业名称" id="enterpriseName" name="enterpriseName" value="">
+            </div>
+            <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>纳税人识别号:</label>
+            <div class="formControls col-2 col-sm-2 skin-minimal">
+                <input type="text" class="input-text trim_input" placeholder="纳税人识别号" id="taxpayerIdentificationNum" name="taxpayerIdentificationNum" value="">
+            </div>
+            <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>开票电话:</label>
+            <div class="formControls col-2 col-sm-2 skin-minimal">
+                <input type="text" class="input-text trim_input" placeholder="开票电话" id="ticketOpeningPhone" name="ticketOpeningPhone" value="">
+            </div>
+        </div>
+        <div class="row cl" style="margin-bottom: 10px;">
+            <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>企业地址:</label>
+            <div class="formControls col-2 col-sm-2 skin-minimal">
+                <input type="text" class="input-text trim_input" placeholder="企业地址" id="enterpriseAddress" name="enterpriseAddress" value="">
+            </div>
+        </div>
+
+        <#--客户备注-->
+
+        <div class="row cl">
+            <label class="form-label col-3">
+                <div class="tit-2">客户备注</div>
+            </label>
+            <div class="formControls col-9">
+            </div>
+        </div>
+
+        <div class="row cl">
+            <label class="form-label">
+            </label>
+            <div class="formControls col-9">
+                <textarea id="customerRemarks" name="customerRemarks" ></textarea>
+            </div>
+        </div>
+        <#--添加保存按钮-->
+        <!-- Unnamed (矩形) -->
+        <div id="u29" class="ax_default _三级标题">
+            <div id="u29_div" class=""></div>
+            <!-- Unnamed () -->
+            <div id="u30" class="text" style="visibility: visible;">
+                <p><span onclick="addCustomerBasicInfo()">添加客户信息</span></p>
+            </div>
+        </div>
+    </form>
+</div>
+
+<#--业务js-->
+<#--<script type="text/javascript" src="${path}/common/js/customerSaveAdmin/save_customer_info.js"></script>-->
+<script>
+    /*初始化页面参数*/
+    $(function () {
+        /* 初始化单选框样式 */
+        //initCheck();
+
+        /*初始化省份(大类)*/
+        initProvince();
+
+        /*初始化渠道类别(大类)*/
+        initChannelCategory();
+
+        /*初始化销售产品(大类)*/
+        initPromotingProducts();
+
+        /*监听省份*/
+        $("[name='customerProvinceCode']").change(function (){
+            initCity($(this).val());
+        })
+
+        /*监听渠道类别*/
+        $("[name='channelCategory']").change(function (){
+            initChannelType($(this).val());
+        })
+
+        /*监听销售产品*/
+        $("[name='promotingProducts']").change(function (){
+            initSupplyPrice($(this).val());
+        })
+    })
+
+    /*业务逻辑js控制 start*/
+    $(document).on('click', '.dalog-ask .answer', function() {
+        var customerProvinceCode = $(this).find(".customerProvinceCode").val();
+        $("select[name='complaintId']").val(customerProvinceCode);
+        initCity(customerProvinceCode); //根据省份初始化城市
+        $(".dalog-ask").hide();
+    });
+
+    /*初始化省份*/
+    function initProvince() {
+        //默认查询参数为空
+        var provinceListInfo = null;
+        $.ajax({
+            type: "POST",
+            data: {
+                provinceId : provinceListInfo
+            },
+            url: "${path}/admin/customerBasic/query_provinceList",
+            async: true,
+            success: function(data){
+                var html = '<option value="">请选择省份</option>';
+                var id;
+                if (data.returnCode == 200) {
+                    for(var i=0;i<data.returnMsg.provinceList.length;i++){
+                        provinceListInfo = data.returnMsg.provinceList[i];
+                        if(i == 0 ){
+                            id = provinceListInfo.provinceId;
+                        }
+                        html += '<option value="'+ provinceListInfo.provinceId +'">'+ provinceListInfo.province +'</option>';
+                    }
+                }else{
+                    html = '';
+                }
+                $("[name='customerProvinceCode']").html(html);
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        });
+    }
+
+    /*根据省份代号初始化城市*/
+    function initCity(customerProvinceId){
+        var cityListInfo = null;
+        if(customerProvinceId == null || customerProvinceId == ""){
+            var html = '<option value="">请选择城市</option>';
+            $("[name='customerCityCode']").html(html);
+        }else{
+            $.ajax({
+                type: "POST",
+                data: {
+                    provinceId : customerProvinceId
+                },
+                url: "${path}/admin/customerBasic/query_cityList",
+                async: true,
+                success: function(data){
+                    var html = '<option value="">请选择城市</option>';
+                    if (data.returnCode == 200) {
+                        for(var i=0;i<data.returnMsg.cityList.length;i++){
+                            cityListInfo = data.returnMsg.cityList[i];
+                            html += '<option value="'+ cityListInfo.cityId +'">'+ cityListInfo.city +'</option>';
+                        }
+                    }else{
+                        html = '';
+                    }
+                    $("[name='customerCityCode']").html(html);
+                },
+                error: function(XmlHttpRequest, textStatus, errorThrown){
+                }
+            });
+        }
+    }
+
+    /*初始化渠道类别*/
+    function initChannelCategory() {
+        //默认查询参数为空
+        var channelCategoryListInfo = null;
+        $.ajax({
+            type: "POST",
+            data: {
+                channelCategoryId : channelCategoryListInfo
+            },
+            url: "${path}/admin/customerBasic/query_channelCategoryList",
+            async: true,
+            success: function(data){
+                var html = '<option value="">请选择渠道类别</option>';
+                var id;
+                if (data.returnCode == 200) {
+                    for(var i=0;i<data.returnMsg.channelCategoryList.length;i++){
+                        channelCategoryListInfo = data.returnMsg.channelCategoryList[i];
+                        if(i == 0 ){
+                            id = channelCategoryListInfo.channelCategory;
+                        }
+                        html += '<option value="'+ channelCategoryListInfo.channelCategory +'">'+ channelCategoryListInfo.channelName +'</option>';
+                    }
+                }else{
+                    html = '';
+                }
+                $("[name='channelCategory']").html(html);
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        });
+    }
+
+    /*根据渠道类别初始化渠道类型*/
+    function initChannelType(channelCategory){
+        var channelTypeListInfo = null;
+       /* if(channelCategory == null || channelCategory == ""){
+            var html = '<option value="">请选择渠道类别</option>';
+            $("[name='channelCategory']").html(html);
+        }else{*/
+            $.ajax({
+                type: "POST",
+                data: {
+                    channelCategoryId : channelCategory
+                },
+                url: "${path}/admin/customerBasic/query_channelTypeList",
+                async: true,
+                success: function(data){
+                    var html = '<option value="">请选择渠道类型</option>';
+                    if (data.returnCode == 200) {
+                        for(var i=0;i<data.returnMsg.channelTypeList.length;i++){
+                            channelTypeListInfo = data.returnMsg.channelTypeList[i];
+                            html += '<option value="'+ channelTypeListInfo.channelName +'">'+ channelTypeListInfo.channelType +'</option>';
+                        }
+                    }else{
+                        html = '';
+                    }
+                    $("[name='channelType']").html(html);
+                },
+                error: function(XmlHttpRequest, textStatus, errorThrown){
+                }
+            });
+        //}
+    }
+
+    /*初始化销售产品*/
+    function initPromotingProducts() {
+        var promotingProductsInfo = null;
+        $.ajax({
+            type: "POST",
+            data: {
+                promotingProductsInfo : promotingProductsInfo
+            },
+            url: "${path}/admin/customerBasic/query_promotingProductsList",
+            async: true,
+            success: function(data){
+                var html = '<option value="">请选择销售产品</option>';
+                var id;
+                if (data.returnCode == 200) {
+                    for(var i=0;i<data.returnMsg.promotingProductsList.length;i++){
+                        promotingProductsInfo = data.returnMsg.promotingProductsList[i];
+                        if(i == 0 ){
+                            id = promotingProductsInfo.productId;
+                        }
+                        html += '<option value="'+ promotingProductsInfo.productId +'">'+ promotingProductsInfo.productName +'</option>';
+                    }
+                }else{
+                    html = '';
+                }
+                $("[name='promotingProducts']").html(html);
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        });
+    }
+
+    /*初始化产品价格*/
+    function initSupplyPrice(promotingProductsId){
+        //var supplyPriceInfo = null;
+        if(promotingProductsId == null || promotingProductsId == ""){
+            var html = '<option value="">请选择销售产品</option>';
+            $("[name='promotingProducts']").html(html);
+        }else{
+            $.ajax({
+                type: "POST",
+                data: {
+                    promotingProductsId : promotingProductsId
+                },
+                url: "${path}/admin/customerBasic/query_supplyPriceList",
+                async: true,
+                success: function(data){
+                    var html = '<option value="">请选择产品价格</option>';
+                    if (data.returnCode == 200) {
+                        for(var i=0;i<data.returnMsg.supplyPriceList.length;i++){
+                            var supplyPriceInfo = data.returnMsg.supplyPriceList[i];
+                            html += '<option value="'+ supplyPriceInfo.colorId +'">'+ supplyPriceInfo.colorPrice +'</option>';
+                        }
+                    }else{
+                        html = '';
+                    }
+                    $("[name='supplyPrice']").html(html);
+                },
+                error: function(XmlHttpRequest, textStatus, errorThrown){
+                }
+            });
+        }
+    }
+
+    /*保存对接联系人信息到列表*/
+    function toAddDockedContactInfo() {
+        var contactName = document.getElementById("contactName").value;
+        var contactPhone = document.getElementById("contactPhone").value;
+        var contactType = document.getElementById("contactType").value;
+        var contactEmail = document.getElementById("contactEmail").value;
+        //var operation = "删除";
+        var operation = "<a href='javascript:;' onclick='deleteContact(this)'>删除</a>";
+        //"<a href='javascript:;' onclick='del(this)'>删除</a>";
+        row = document.getElementById("contactTable").insertRow();
+        if(row!=null){
+            cell=row.insertCell();
+            cell.innerHTML=contactName;
+            cell = row.insertCell();
+            cell.innerHTML=contactPhone;
+            cell = row.insertCell();
+            cell.innerHTML=contactType;
+            cell = row.insertCell();
+            cell.innerHTML=contactEmail;
+            cell = row.insertCell();
+            cell.innerHTML=operation;
+        }
+        return false;
+    }
+    /*保存客户销售信息到列表*/
+    function toAddChannelSaleInfo() {
+        var channelCategory = document.getElementById("channelCategory").value;
+        var channelType = document.getElementById("channelType").value;
+        var channelName = document.getElementById("channelName").value;
+        var promotingProducts = document.getElementById("promotingProducts").value;
+        var supplyPrice = document.getElementById("supplyPrice").value;
+        var accountPeriod = document.getElementById("accountPeriod").value;
+        var operation = "删除";
+        //var operation = var operation = "<a href='javascript:;' onclick='deleteChannelSale(this)'>删除</a>";
+        row = document.getElementById("saleTable").insertRow();
+        if(row!=null){
+            cell=row.insertCell();
+            cell.innerHTML=channelCategory;
+            cell = row.insertCell();
+            cell.innerHTML=channelType;
+            cell = row.insertCell();
+            cell.innerHTML=channelName;
+            cell = row.insertCell();
+            cell.innerHTML=promotingProducts;
+            cell = row.insertCell();
+            cell.innerHTML=supplyPrice;
+            cell = row.insertCell();
+            cell.innerHTML=accountPeriod;
+            cell = row.insertCell();
+            cell.innerHTML=operation;
+        }
+        return false;
+    }
+    /*添加客户信息*/
+    function addCustomerBasicInfo() {
+        alert("addCustomerBasicInfo...");
+    }
+
+    // 删除对接联系人函数
+    function deleteContact(x){
+        $(x).parent().parent().remove();
+        // tr.parentNode.removeChild(tr);
+    }
+    // 删除客户销售渠道信息函数
+    function deleteChannelSale(x){
+        var tr = x.parentNode.parentNode;
+        tr.parentNode.removeChild(tr);
+    }
+    /*业务逻辑js控制 end*/
+</script>
+
+</body>
+</html>

+ 203 - 0
watero-rst-web/src/main/webapp/common/js/customerSaveAdmin/save_customer_info.js

@@ -0,0 +1,203 @@
+/*初始化省份*/
+function initProvince() {
+    //默认查询参数为空
+    var provinceListInfo = null;
+    $.ajax({
+        type: "POST",
+        data: {
+            provinceId : provinceListInfo
+        },
+        url: url_path + "/admin/customerBasic/query_provinceList",
+        async: true,
+        success: function(data){
+            var html = '<option value="">请选择省份</option>';
+            var id;
+            if (data.returnCode == 200) {
+                for(var i=0;i<data.returnMsg.provinceList.length;i++){
+                    var provinceListInfo = data.returnMsg.provinceList[i];
+                    if(i == 0 ){
+                        id = provinceListInfo.provinceId;
+                    }
+                    html += '<option value="'+ provinceListInfo.provinceId +'">'+ provinceListInfo.provinceName +'</option>';
+                }
+            }else{
+                html = '';
+            }
+            $("[name='customerProvinceCode']").html(html);
+        },
+        error: function(XmlHttpRequest, textStatus, errorThrown){
+        }
+    });
+}
+
+/*根据省份代号初始化城市*/
+function initCity(complaintId,smallId){
+    if(complaintId == null || complaintId == ""){
+        var html = '<option value="">请选择城市</option>';
+        $("[name='smallClassId']").html(html);
+    }else{
+        $.ajax({
+            type: "POST",
+            data: {
+                complaintId : complaintId
+            },
+            url: url_path + "/admin/complaintQuestion/list_complaintSmallClass",
+            async: true,
+            success: function(data){
+                var html = '<option value="">请选择城市</option>';
+                if (data.returnCode == 200) {
+                    for(var i=0;i<data.returnMsg.complaintSmallClassInfoList.length;i++){
+                        var ComplaintSmallClassInfo = data.returnMsg.complaintSmallClassInfoList[i];
+                        html += '<option value="'+ ComplaintSmallClassInfo.smallClassId +'">'+ ComplaintSmallClassInfo.smallClassName +'</option>';
+                    }
+                }else{
+                    html = '';
+                }
+                $("[name='smallClassId']").html(html);
+
+                if(smallId != null && smallId != "" && typeof(smallId)!="undefined" ){
+                    $("select[name='smallClassId']").val(smallId);
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        });
+    }
+}
+
+/*初始化渠道类别*/
+function initChannelCategory() {
+    //默认为售前咨询
+    //var customerCounselTypeOverall = allCustomerInfoType;
+    var customerChannelCategory = null;
+    $.ajax({
+        type: "POST",
+        data: {
+            complaintConsultingType : customerChannelCategory
+        },
+        url: url_path + "/admin/complaintQuestion/list_complaintType",
+        async: true,
+        success: function(data){
+            var html = '<option value="">请选择渠道类别</option>';
+            var id;
+            if (data.returnCode == 200) {
+                for(var i=0;i<data.returnMsg.complaintTypeInfoList.length;i++){
+                    var complaintTypeInfo = data.returnMsg.complaintTypeInfoList[i];
+                    if(i == 0 ){
+                        id = complaintTypeInfo.complaintId;
+                    }
+                    html += '<option value="'+ complaintTypeInfo.complaintId +'">'+ complaintTypeInfo.complaintClassName +'</option>';
+                }
+            }else{
+                html = '';
+            }
+            $("[name='complaintId']").html(html);
+        },
+        error: function(XmlHttpRequest, textStatus, errorThrown){
+        }
+    });
+}
+
+/*根据渠道类别初始化渠道类型*/
+function initChannelType(complaintId,smallId){
+    if(complaintId == null || complaintId == ""){
+        var html = '<option value="">请选择渠道类别</option>';
+        $("[name='smallClassId']").html(html);
+    }else{
+        $.ajax({
+            type: "POST",
+            data: {
+                complaintId : complaintId
+            },
+            url: url_path + "/admin/complaintQuestion/list_complaintSmallClass",
+            async: true,
+            success: function(data){
+                var html = '<option value="">请选择渠道类型</option>';
+                if (data.returnCode == 200) {
+                    for(var i=0;i<data.returnMsg.customerChannelTypeList.length;i++){
+                        var ComplaintSmallClassInfo = data.returnMsg.customerChannelTypeList[i];
+                        html += '<option value="'+ ComplaintSmallClassInfo.smallClassId +'">'+ ComplaintSmallClassInfo.smallClassName +'</option>';
+                    }
+                }else{
+                    html = '';
+                }
+                $("[name='smallClassId']").html(html);
+
+                if(smallId != null && smallId != "" && typeof(smallId)!="undefined" ){
+                    $("select[name='smallClassId']").val(smallId);
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        });
+    }
+}
+
+/*初始化销售产品*/
+function initPromotingProducts() {
+    //默认为售前咨询
+    //var customerCounselTypeOverall = allCustomerInfoType;
+    var customerChannelCategory = null;
+    $.ajax({
+        type: "POST",
+        data: {
+            complaintConsultingType : customerChannelCategory
+        },
+        url: url_path + "/admin/complaintQuestion/list_complaintType",
+        async: true,
+        success: function(data){
+            var html = '<option value="">请选择渠道类别</option>';
+            var id;
+            if (data.returnCode == 200) {
+                for(var i=0;i<data.returnMsg.complaintTypeInfoList.length;i++){
+                    var complaintTypeInfo = data.returnMsg.complaintTypeInfoList[i];
+                    if(i == 0 ){
+                        id = complaintTypeInfo.complaintId;
+                    }
+                    html += '<option value="'+ complaintTypeInfo.complaintId +'">'+ complaintTypeInfo.complaintClassName +'</option>';
+                }
+            }else{
+                html = '';
+            }
+            $("[name='complaintId']").html(html);
+        },
+        error: function(XmlHttpRequest, textStatus, errorThrown){
+        }
+    });
+}
+
+/*初始化产品价格*/
+function initSupplyPrice(complaintId,smallId){
+    if(complaintId == null || complaintId == ""){
+        var html = '<option value="">请选择渠道类别</option>';
+        $("[name='smallClassId']").html(html);
+    }else{
+        $.ajax({
+            type: "POST",
+            data: {
+                complaintId : complaintId
+            },
+            url: url_path + "/admin/complaintQuestion/list_complaintSmallClass",
+            async: true,
+            success: function(data){
+                var html = '<option value="">请选择渠道类型</option>';
+                if (data.returnCode == 200) {
+                    for(var i=0;i<data.returnMsg.customerChannelTypeList.length;i++){
+                        var ComplaintSmallClassInfo = data.returnMsg.customerChannelTypeList[i];
+                        html += '<option value="'+ ComplaintSmallClassInfo.smallClassId +'">'+ ComplaintSmallClassInfo.smallClassName +'</option>';
+                    }
+                }else{
+                    html = '';
+                }
+                $("[name='smallClassId']").html(html);
+
+                if(smallId != null && smallId != "" && typeof(smallId)!="undefined" ){
+                    $("select[name='smallClassId']").val(smallId);
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        });
+    }
+}
+