短信发送及其它
This commit is contained in:
@@ -18,19 +18,24 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
<version>3.15</version>
|
||||
<version>3.8</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
<version>4.1.6.RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.jackson</groupId>
|
||||
<artifactId>jackson-mapper-asl</artifactId>
|
||||
<version>1.9.13</version>
|
||||
</dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.46</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
@@ -184,6 +189,20 @@
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/fastdfs-client-java-1.25.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>aliyun-java-sdk-core</artifactId>
|
||||
<version>3.3.1</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/aliyun-java-sdk-core-3.3.1.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/aliyun-java-sdk-dysmsapi-1.0.0.jar</systemPath>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
||||
@@ -1,20 +1,31 @@
|
||||
package com.ifish.action;
|
||||
|
||||
import com.ifish.entity.VipReferrer;
|
||||
import com.ifish.entity.VipType;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
|
||||
import com.aliyuncs.exceptions.ClientException;
|
||||
import com.ifish.entity.*;
|
||||
import com.ifish.excel.VipMemberExportExcel;
|
||||
import com.ifish.excel.VipMemberImportTemplateExcel;
|
||||
import com.ifish.hibernate.Pagination;
|
||||
import com.ifish.search.SearchFilter;
|
||||
import com.ifish.service.VipService;
|
||||
import com.ifish.util.IfishUtil;
|
||||
import com.ifish.util.SmsUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.core.context.SecurityContextImpl;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
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.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author: yan.y
|
||||
@@ -29,119 +40,93 @@ public class VipAction {
|
||||
@Autowired
|
||||
private VipService vipService;
|
||||
|
||||
/** ====================================会员信息============================================ **/
|
||||
@RequestMapping("/list.do")
|
||||
public ModelAndView vipList(){
|
||||
|
||||
return new ModelAndView("vip/vipList");
|
||||
@RequestMapping("/sendSms.do")
|
||||
@ResponseBody
|
||||
public boolean vipSendSms(HttpServletRequest request) throws ClientException {
|
||||
final String birthdayType = "SMS_139242320";
|
||||
final String noticeType = "SMS_139242334";
|
||||
String oneTel = request.getParameter("oneTel");
|
||||
String smsType = request.getParameter("smsType");
|
||||
//生日
|
||||
String smsTel = request.getParameter("smsTel");
|
||||
//通知
|
||||
String smsTitle = request.getParameter("smsTitle");
|
||||
String smsTime = request.getParameter("smsTime");
|
||||
String smsAddress = request.getParameter("smsAddress");
|
||||
String smsSignTime = request.getParameter("smsSignTime");
|
||||
String smsContact = request.getParameter("smsContact");
|
||||
String smsContactTel = request.getParameter("smsContactTel");
|
||||
JSONObject param = new JSONObject();
|
||||
//单个发送
|
||||
if (oneTel != null && StringUtils.isNotBlank(oneTel)) {
|
||||
VipSmsResult vipSmsResult = new VipSmsResult();
|
||||
SendSmsResponse response = null;
|
||||
String[] idTel = oneTel.split("_");
|
||||
String id = idTel[0];
|
||||
VipMember vipMember = this.vipService.getVipMember(Integer.parseInt(id));
|
||||
String name = vipMember.getMemberLegal();
|
||||
vipSmsResult.setResultBussId(Integer.parseInt(id));
|
||||
vipSmsResult.setResultTel(vipMember.getMemberTel());
|
||||
vipSmsResult.setResultTemplate(smsType);
|
||||
//生日提醒
|
||||
if (birthdayType.equals(smsType)) {
|
||||
param.put("name",name);
|
||||
param.put("tel",smsTel);
|
||||
response = SmsUtil.sendSms(vipMember.getMemberTel(), smsType, param.toJSONString());
|
||||
} else if (noticeType.equals(smsType)) {
|
||||
param.put("title",smsTitle);
|
||||
param.put("time",smsTime);
|
||||
param.put("address",smsAddress);
|
||||
param.put("signTime",smsSignTime);
|
||||
param.put("contact",smsContact + " " + smsContactTel);
|
||||
response = SmsUtil.sendSms(vipMember.getMemberTel(), smsType, param.toJSONString());
|
||||
}
|
||||
vipSmsResult.setResultCode(response.getCode());
|
||||
vipSmsResult.setResultMessage(response.getMessage());
|
||||
vipSmsResult.setResultRequestId(response.getRequestId());
|
||||
vipSmsResult.setResultBizId(response.getBizId());
|
||||
vipSmsResult.setResultCreateTime(new Date());
|
||||
this.vipService.saveSmsResult(vipSmsResult);
|
||||
} else {
|
||||
String[] checkMembers = request.getParameter("arrTel").split("-");
|
||||
for (String checkMember : checkMembers) {
|
||||
if (StringUtils.isBlank(checkMember)) {
|
||||
continue;
|
||||
}
|
||||
String[] idTel = checkMember.split("_");
|
||||
String id = idTel[0];
|
||||
VipMember vipMember = this.vipService.getVipMember(Integer.parseInt(id));
|
||||
VipSmsResult vipSmsResult = new VipSmsResult();
|
||||
SendSmsResponse response = null;
|
||||
vipSmsResult.setResultBussId(Integer.parseInt(id));
|
||||
vipSmsResult.setResultTel(vipMember.getMemberTel());
|
||||
vipSmsResult.setResultTemplate(smsType);
|
||||
String name = vipMember.getMemberLegal();
|
||||
//生日提醒
|
||||
if (birthdayType.equals(smsType)) {
|
||||
param.put("name",name);
|
||||
param.put("tel",smsTel);
|
||||
response = SmsUtil.sendSms(vipMember.getMemberTel(), smsType, param.toJSONString());
|
||||
} else if (noticeType.equals(smsType)) {
|
||||
param.put("title",smsTitle);
|
||||
param.put("time",smsTime);
|
||||
param.put("address",smsAddress);
|
||||
param.put("signTime",smsSignTime);
|
||||
param.put("contact",smsContact + " " + smsContactTel);
|
||||
response = SmsUtil.sendSms(vipMember.getMemberTel(), smsType, param.toJSONString());
|
||||
}
|
||||
vipSmsResult.setResultCode(response.getCode());
|
||||
vipSmsResult.setResultMessage(response.getMessage());
|
||||
vipSmsResult.setResultRequestId(response.getRequestId());
|
||||
vipSmsResult.setResultBizId(response.getBizId());
|
||||
vipSmsResult.setResultCreateTime(new Date());
|
||||
this.vipService.saveSmsResult(vipSmsResult);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@RequestMapping("/getVip.do")
|
||||
public ModelAndView getVip(){
|
||||
|
||||
return new ModelAndView("vip/vipDetail");
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/add.do")
|
||||
public boolean vipAdd(){
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@RequestMapping("/update.do")
|
||||
public boolean vipUpdate(){
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@RequestMapping("/delete.do")
|
||||
public boolean vipDelete(){
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@RequestMapping("/export.do")
|
||||
public void vipExport(){
|
||||
|
||||
|
||||
}
|
||||
|
||||
@RequestMapping("/sendSmS.do")
|
||||
public boolean vipSendSMS(){
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/** ====================================单位评价信息============================================ **/
|
||||
|
||||
@RequestMapping("/companyEvaluateList.do")
|
||||
public ModelAndView companyEvaluate(){
|
||||
|
||||
return new ModelAndView("vip/companyEvaluateList");
|
||||
}
|
||||
|
||||
@RequestMapping("/getCompanyEvaluate.do")
|
||||
public ModelAndView getCompanyEvaluate(){
|
||||
|
||||
return new ModelAndView("vip/companyEvaluateDetail");
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/companyEvaluateAdd.do")
|
||||
public void companyEvaluateAdd(){
|
||||
|
||||
|
||||
}
|
||||
|
||||
@RequestMapping("/companyEvaluateUpdate.do")
|
||||
public void companyEvaluateUpdate(){
|
||||
|
||||
|
||||
}
|
||||
|
||||
@RequestMapping("/companyEvaluateDelete.do")
|
||||
public void companyEvaluateDelete(){
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/** ====================================个人评价信息============================================ **/
|
||||
|
||||
@RequestMapping("/personalEvaluateList.do")
|
||||
public ModelAndView personalEvaluate(){
|
||||
|
||||
return new ModelAndView("vip/personalEvaluateList");
|
||||
}
|
||||
|
||||
@RequestMapping("/getPersonalEvaluate.do")
|
||||
public ModelAndView getPersonalEvaluate(){
|
||||
|
||||
return new ModelAndView("vip/personalEvaluateDetail");
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/personalEvaluateAdd.do")
|
||||
public void personalEvaluateAdd(){
|
||||
|
||||
|
||||
}
|
||||
|
||||
@RequestMapping("/personalEvaluateUpdate.do")
|
||||
public void personalEvaluateUpdate(){
|
||||
|
||||
|
||||
}
|
||||
|
||||
@RequestMapping("/personalEvaluateDelete.do")
|
||||
public void personalEvaluateDelete(){
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/** ====================================会员类别============================================ **/
|
||||
|
||||
@RequestMapping("/vipType.do")
|
||||
@@ -182,7 +167,9 @@ public class VipAction {
|
||||
|
||||
/** ====================================推荐人============================================ **/
|
||||
@RequestMapping("/referrer.do")
|
||||
public ModelAndView referrer(){
|
||||
public ModelAndView referrer(HttpServletRequest request){
|
||||
List<VipType> vipTypes = this.vipService.getVipTypeByList();
|
||||
request.setAttribute("vipTypes",vipTypes);
|
||||
return new ModelAndView("vip/vipReferrer");
|
||||
}
|
||||
|
||||
@@ -194,15 +181,16 @@ public class VipAction {
|
||||
}
|
||||
|
||||
@RequestMapping("/getReferrer.do")
|
||||
public ModelAndView getReferrer(){
|
||||
|
||||
return new ModelAndView("vip/referrerDetail");
|
||||
@ResponseBody
|
||||
public Object getReferrer(Integer referrerId){
|
||||
return this.vipService.getVipReferrer(referrerId);
|
||||
}
|
||||
|
||||
@RequestMapping("/referrerAddOrUpdate.do")
|
||||
@ResponseBody
|
||||
public boolean referrerAddOrUpdate(VipReferrer vipReferrer){
|
||||
boolean b = this.vipService.saveOrUpdateVipReferrer(vipReferrer);
|
||||
public boolean referrerAddOrUpdate(VipReferrer vipReferrer,HttpServletRequest request){
|
||||
SecurityContextImpl securityContextImpl = (SecurityContextImpl) request.getSession().getAttribute("SPRING_SECURITY_CONTEXT");
|
||||
boolean b = this.vipService.saveOrUpdateVipReferrer(vipReferrer,securityContextImpl.getAuthentication().getName());
|
||||
return b;
|
||||
}
|
||||
|
||||
@@ -211,12 +199,175 @@ public class VipAction {
|
||||
public boolean referrerDelete(Integer referrerId,HttpServletRequest request){
|
||||
SecurityContextImpl securityContextImpl = (SecurityContextImpl) request.getSession().getAttribute("SPRING_SECURITY_CONTEXT");
|
||||
VipReferrer vipReferrer = this.vipService.getVipReferrer(referrerId);
|
||||
vipReferrer.setModifyUser(securityContextImpl.getAuthentication().getName());
|
||||
vipReferrer.setModifyTime(new Date());
|
||||
vipReferrer.setReferrerStatus("1");
|
||||
boolean b = this.vipService.saveOrUpdateVipReferrer(vipReferrer);
|
||||
boolean b = this.vipService.deleteVipReferrer(vipReferrer,securityContextImpl.getAuthentication().getName());
|
||||
return b;
|
||||
}
|
||||
|
||||
/** ====================================个人培训============================================ **/
|
||||
|
||||
@RequestMapping("/personal.do")
|
||||
public ModelAndView personal(){
|
||||
return new ModelAndView("vip/vipPersonal");
|
||||
}
|
||||
|
||||
@RequestMapping("/personalList.do")
|
||||
@ResponseBody
|
||||
public Object personalList(SearchFilter searchFilter){
|
||||
Pagination<VipPersonal> page = this.vipService.getVipPersonalByPage(searchFilter);
|
||||
return IfishUtil.returnPageData(page,searchFilter.getsEcho());
|
||||
}
|
||||
|
||||
@RequestMapping("/personalAddOrUpdate.do")
|
||||
@ResponseBody
|
||||
public boolean personalAddOrUpdate(VipPersonal vipPersonal,HttpServletRequest request){
|
||||
SecurityContextImpl securityContextImpl = (SecurityContextImpl) request.getSession().getAttribute("SPRING_SECURITY_CONTEXT");
|
||||
boolean b = this.vipService.saveOrUpdateVipPersonal(vipPersonal, securityContextImpl.getAuthentication().getName());
|
||||
return b;
|
||||
}
|
||||
|
||||
@RequestMapping("/getPersonal.do")
|
||||
@ResponseBody
|
||||
public Object getPersonal(Integer personalId){
|
||||
return this.vipService.getVipPersonal(personalId);
|
||||
}
|
||||
|
||||
@RequestMapping("/personalDelete.do")
|
||||
@ResponseBody
|
||||
public boolean personalDelete(Integer personalId,HttpServletRequest request){
|
||||
SecurityContextImpl securityContextImpl = (SecurityContextImpl) request.getSession().getAttribute("SPRING_SECURITY_CONTEXT");
|
||||
VipPersonal vipPersonal = this.vipService.getVipPersonal(personalId);
|
||||
boolean b = this.vipService.deleteVipPersonal(vipPersonal, securityContextImpl.getAuthentication().getName());
|
||||
return b;
|
||||
}
|
||||
|
||||
/** ====================================单位评价证============================================ **/
|
||||
|
||||
@RequestMapping("/company.do")
|
||||
public ModelAndView company(){
|
||||
return new ModelAndView("vip/vipCompany");
|
||||
}
|
||||
|
||||
@RequestMapping("/companyList.do")
|
||||
@ResponseBody
|
||||
public Object companyList(SearchFilter searchFilter){
|
||||
Pagination<VipCompany> page = this.vipService.getVipCompanyByPage(searchFilter);
|
||||
return IfishUtil.returnPageData(page,searchFilter.getsEcho());
|
||||
}
|
||||
|
||||
@RequestMapping("/companyAddOrUpdate.do")
|
||||
@ResponseBody
|
||||
public boolean companyAddOrUpdate(VipCompany vipCompany, HttpServletRequest request){
|
||||
SecurityContextImpl securityContextImpl = (SecurityContextImpl) request.getSession().getAttribute("SPRING_SECURITY_CONTEXT");
|
||||
boolean b = this.vipService.saveOrUpdateVipCompany(vipCompany, securityContextImpl.getAuthentication().getName());
|
||||
return b;
|
||||
}
|
||||
|
||||
@RequestMapping("/companyAddOrUpdateByReturn.do")
|
||||
@ResponseBody
|
||||
public Object companyAdd(VipCompany vipCompany, HttpServletRequest request){
|
||||
SecurityContextImpl securityContextImpl = (SecurityContextImpl) request.getSession().getAttribute("SPRING_SECURITY_CONTEXT");
|
||||
VipCompany company = this.vipService.saveOrUpDateVipCompanyByReturn(vipCompany, securityContextImpl.getAuthentication().getName());
|
||||
return company;
|
||||
}
|
||||
|
||||
@RequestMapping("/getCompany.do")
|
||||
@ResponseBody
|
||||
public Object getCompany(Integer companyId){
|
||||
return this.vipService.getVipCompany(companyId);
|
||||
}
|
||||
|
||||
@RequestMapping("/companyDelete.do")
|
||||
@ResponseBody
|
||||
public boolean companyDelete(Integer companyId,HttpServletRequest request){
|
||||
SecurityContextImpl securityContextImpl = (SecurityContextImpl) request.getSession().getAttribute("SPRING_SECURITY_CONTEXT");
|
||||
VipCompany vipCompany = this.vipService.getVipCompany(companyId);
|
||||
boolean b = this.vipService.deleteVipCompany(vipCompany, securityContextImpl.getAuthentication().getName());
|
||||
return b;
|
||||
}
|
||||
|
||||
|
||||
/** ====================================会员信息============================================ **/
|
||||
|
||||
@RequestMapping("/member.do")
|
||||
public ModelAndView member(){
|
||||
return new ModelAndView("vip/vipMember");
|
||||
}
|
||||
|
||||
@RequestMapping("/memberList.do")
|
||||
@ResponseBody
|
||||
public Object memberList(SearchFilter searchFilter){
|
||||
Pagination<VipMember> page = this.vipService.getVipMemberByPage(searchFilter);
|
||||
return IfishUtil.returnPageData(page,searchFilter.getsEcho());
|
||||
}
|
||||
|
||||
@RequestMapping("/gotoMemberAdd.do")
|
||||
public ModelAndView gotoMemberAdd(HttpServletRequest request){
|
||||
List<VipType> vipTypes = this.vipService.getVipTypeByList();
|
||||
request.setAttribute("vipTypes",vipTypes);
|
||||
return new ModelAndView("vip/vipMemberAdd");
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/memberAddOrUpdate.do")
|
||||
public ModelAndView memberAddOrUpdate(VipMember vipMember, HttpServletRequest request){
|
||||
SecurityContextImpl securityContextImpl = (SecurityContextImpl) request.getSession().getAttribute("SPRING_SECURITY_CONTEXT");
|
||||
String companyIds = request.getParameter("companyIds");
|
||||
this.vipService.saveOrUpdateVipMember(vipMember, securityContextImpl.getAuthentication().getName(),companyIds);
|
||||
return new ModelAndView("vip/vipMember");
|
||||
}
|
||||
|
||||
@RequestMapping("/gotoMemberUpdate.do")
|
||||
public ModelAndView gotoMemberUpdate(Integer memberId,HttpServletRequest request){
|
||||
List<VipType> vipTypes = this.vipService.getVipTypeByList();
|
||||
request.setAttribute("vipTypes",vipTypes);
|
||||
VipMember vipMember = this.vipService.getVipMember(memberId);
|
||||
request.setAttribute("vipMember",vipMember);
|
||||
List<VipCompany> vipCompanys = this.vipService.getVipCompanys(memberId);
|
||||
request.setAttribute("companys",vipCompanys);
|
||||
VipReferrer vipReferrer = this.vipService.getVipReferrer(vipMember.getMemberReferrer().getReferrerId());
|
||||
request.setAttribute("vipReferrer",vipReferrer);
|
||||
return new ModelAndView("vip/vipMemberUpdate");
|
||||
}
|
||||
|
||||
@RequestMapping("/memberDelete.do")
|
||||
@ResponseBody
|
||||
public boolean memberDelete(Integer memberId,HttpServletRequest request){
|
||||
SecurityContextImpl securityContextImpl = (SecurityContextImpl) request.getSession().getAttribute("SPRING_SECURITY_CONTEXT");
|
||||
VipMember vipMember = this.vipService.getVipMember(memberId);
|
||||
boolean b = this.vipService.deleteVipMember(vipMember, securityContextImpl.getAuthentication().getName());
|
||||
return b;
|
||||
}
|
||||
|
||||
/** ====================================下载上传============================================ **/
|
||||
|
||||
@RequestMapping("/downloadMemberImportTemplateToExcel.do")
|
||||
public ModelAndView downloadMemberImportTemplateToExcel(ModelMap model,SearchFilter searchFilter) {
|
||||
Pagination<VipType> vipTypes = this.vipService.getVipTypeByPage(searchFilter);
|
||||
Pagination<VipReferrer> referrers = this.vipService.getVipReferrerByPage(searchFilter);
|
||||
model.put("vipTypes", vipTypes.getList());
|
||||
model.put("referrers", referrers.getList());
|
||||
VipMemberImportTemplateExcel excel = new VipMemberImportTemplateExcel();
|
||||
return new ModelAndView(excel, model);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/downloadMemberExportToExcel.do")
|
||||
public ModelAndView downloadMemberExportToExcel(ModelMap model,SearchFilter searchFilter){
|
||||
Pagination<VipMember> vipMembers = this.vipService.getVipMemberByPage(searchFilter);
|
||||
model.put("vipMembers",vipMembers.getList());
|
||||
VipMemberExportExcel excel = new VipMemberExportExcel();
|
||||
return new ModelAndView(excel,model);
|
||||
}
|
||||
|
||||
@RequestMapping("/downloadMemberImportToExcel.do")
|
||||
public ModelAndView downloadMemberImportToExcel(@RequestParam("fileUpload") MultipartFile fileUpload,HttpServletRequest request){
|
||||
SecurityContextImpl securityContextImpl = (SecurityContextImpl) request.getSession().getAttribute("SPRING_SECURITY_CONTEXT");
|
||||
try {
|
||||
this.vipService.filesSaveVipMember(fileUpload.getInputStream(), securityContextImpl.getAuthentication().getName());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return new ModelAndView("vip/vipMember");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.ifish.dao;
|
||||
|
||||
import com.ifish.entity.VipCompany;
|
||||
|
||||
/**
|
||||
* @author: yan.y
|
||||
* @Description:
|
||||
* @Date: Created in 22:42 2018/7/5
|
||||
* @Modified by:
|
||||
*/
|
||||
public interface VipCompanyDao extends BaseDao<VipCompany,Integer> {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.ifish.dao;
|
||||
|
||||
import com.ifish.entity.VipMember;
|
||||
|
||||
/**
|
||||
* @author: yan.y
|
||||
* @Description:
|
||||
* @Date: Created in 22:42 2018/7/5
|
||||
* @Modified by:
|
||||
*/
|
||||
public interface VipMemberDao extends BaseDao<VipMember,Integer> {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.ifish.dao;
|
||||
|
||||
import com.ifish.entity.VipPersonal;
|
||||
|
||||
/**
|
||||
* @author: yan.y
|
||||
* @Description:
|
||||
* @Date: Created in 22:42 2018/7/5
|
||||
* @Modified by:
|
||||
*/
|
||||
public interface VipPersonalDao extends BaseDao<VipPersonal,Integer> {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.ifish.dao;
|
||||
|
||||
import com.ifish.entity.VipSmsResult;
|
||||
|
||||
/**
|
||||
* @author: yan.y
|
||||
* @Description:
|
||||
* @Date: Created in 22:42 2018/7/5
|
||||
* @Modified by:
|
||||
*/
|
||||
public interface VipSmsResultDao extends BaseDao<VipSmsResult,Integer> {
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ifish.daoImpl;
|
||||
|
||||
import com.ifish.dao.VipCompanyDao;
|
||||
import com.ifish.entity.VipCompany;
|
||||
import com.ifish.hibernate.HibernateBaseDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author: yan.y
|
||||
* @Description:
|
||||
* @Date: Created in 18:38 2018/7/4
|
||||
* @Modified by:
|
||||
*/
|
||||
@Repository("vipCompanyDao")
|
||||
public class VipCompanyDaoImpl extends HibernateBaseDao<VipCompany,Integer> implements VipCompanyDao {
|
||||
@Override
|
||||
protected Class<VipCompany> getEntityClass() {
|
||||
return VipCompany.class;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ifish.daoImpl;
|
||||
|
||||
import com.ifish.dao.VipMemberDao;
|
||||
import com.ifish.entity.VipMember;
|
||||
import com.ifish.hibernate.HibernateBaseDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author: yan.y
|
||||
* @Description:
|
||||
* @Date: Created in 18:38 2018/7/4
|
||||
* @Modified by:
|
||||
*/
|
||||
@Repository("vipMemberDao")
|
||||
public class VipMemberDaoImpl extends HibernateBaseDao<VipMember,Integer> implements VipMemberDao {
|
||||
@Override
|
||||
protected Class<VipMember> getEntityClass() {
|
||||
return VipMember.class;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ifish.daoImpl;
|
||||
|
||||
import com.ifish.dao.VipPersonalDao;
|
||||
import com.ifish.entity.VipPersonal;
|
||||
import com.ifish.hibernate.HibernateBaseDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author: yan.y
|
||||
* @Description:
|
||||
* @Date: Created in 18:38 2018/7/4
|
||||
* @Modified by:
|
||||
*/
|
||||
@Repository("vipPersonalDao")
|
||||
public class VipPersonalDaoImpl extends HibernateBaseDao<VipPersonal,Integer> implements VipPersonalDao {
|
||||
@Override
|
||||
protected Class<VipPersonal> getEntityClass() {
|
||||
return VipPersonal.class;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ifish.daoImpl;
|
||||
|
||||
import com.ifish.dao.VipSmsResultDao;
|
||||
import com.ifish.entity.VipSmsResult;
|
||||
import com.ifish.hibernate.HibernateBaseDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author: yan.y
|
||||
* @Description:
|
||||
* @Date: Created in 18:38 2018/7/4
|
||||
* @Modified by:
|
||||
*/
|
||||
@Repository("vipSmsResultDao")
|
||||
public class VipSmsResultDaoImpl extends HibernateBaseDao<VipSmsResult,Integer> implements VipSmsResultDao {
|
||||
@Override
|
||||
protected Class<VipSmsResult> getEntityClass() {
|
||||
return VipSmsResult.class;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,211 @@
|
||||
package com.ifish.entity;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author: yan.y
|
||||
* @Description:
|
||||
* @Date: Created in 22:29 2018/7/5
|
||||
* @Modified by:
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "tbl_vip_company")
|
||||
public class VipCompany implements Serializable{
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
@Column(name = "vip_company_id")
|
||||
private Integer companyId;
|
||||
|
||||
@OneToOne
|
||||
@JoinColumn(name = "vip_member")
|
||||
private VipMember vipMember;
|
||||
|
||||
@Column(name = "vip_certificate_card")
|
||||
private String certificateCard;
|
||||
|
||||
@Column(name = "vip_certificate_level")
|
||||
private String certificateLevel;
|
||||
|
||||
@Column(name = "vip_certificate_type")
|
||||
private String certificateType;
|
||||
|
||||
@Column(name = "vip_certificate_apply_time")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JSONField(format="yyyy-MM-dd")
|
||||
private Date certificateApplyTime;
|
||||
|
||||
@Column(name = "vip_certificate_maturity_time")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JSONField(format="yyyy-MM-dd")
|
||||
private Date certificateMaturityTime;
|
||||
|
||||
@Column(name = "vip_openticket_time")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JSONField(format="yyyy-MM-dd")
|
||||
private Date openticketTime;
|
||||
|
||||
@Column(name = "vip_outcard_time")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JSONField(format="yyyy-MM-dd")
|
||||
private Date outcardTime;
|
||||
|
||||
@Column(name = "vip_annual_review_time")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JSONField(format="yyyy-MM-dd")
|
||||
private Date annualReviewTime;
|
||||
|
||||
@Column(name = "vip_cost")
|
||||
private Double cost;
|
||||
|
||||
@Column(name = "vip_certificate_status")
|
||||
private String certificateStatus;
|
||||
|
||||
@Column(name = "vip_create_user")
|
||||
private String createUser;
|
||||
|
||||
@Column(name = "vip_create_time")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date createTime;
|
||||
|
||||
@Column(name = "vip_modify_user")
|
||||
private String modifyUser;
|
||||
|
||||
@Column(name = "vip_modify_time")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date modifyTime;
|
||||
|
||||
|
||||
public Integer getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(Integer companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public VipMember getVipMember() {
|
||||
return vipMember;
|
||||
}
|
||||
|
||||
public void setVipMember(VipMember vipMember) {
|
||||
this.vipMember = vipMember;
|
||||
}
|
||||
|
||||
public String getCertificateCard() {
|
||||
return certificateCard;
|
||||
}
|
||||
|
||||
public void setCertificateCard(String certificateCard) {
|
||||
this.certificateCard = certificateCard;
|
||||
}
|
||||
|
||||
public String getCertificateLevel() {
|
||||
return certificateLevel;
|
||||
}
|
||||
|
||||
public void setCertificateLevel(String certificateLevel) {
|
||||
this.certificateLevel = certificateLevel;
|
||||
}
|
||||
|
||||
public String getCertificateType() {
|
||||
return certificateType;
|
||||
}
|
||||
|
||||
public void setCertificateType(String certificateType) {
|
||||
this.certificateType = certificateType;
|
||||
}
|
||||
|
||||
public Date getCertificateApplyTime() {
|
||||
return certificateApplyTime;
|
||||
}
|
||||
|
||||
public void setCertificateApplyTime(Date certificateApplyTime) {
|
||||
this.certificateApplyTime = certificateApplyTime;
|
||||
}
|
||||
|
||||
public Date getCertificateMaturityTime() {
|
||||
return certificateMaturityTime;
|
||||
}
|
||||
|
||||
public void setCertificateMaturityTime(Date certificateMaturityTime) {
|
||||
this.certificateMaturityTime = certificateMaturityTime;
|
||||
}
|
||||
|
||||
public Date getOpenticketTime() {
|
||||
return openticketTime;
|
||||
}
|
||||
|
||||
public void setOpenticketTime(Date openticketTime) {
|
||||
this.openticketTime = openticketTime;
|
||||
}
|
||||
|
||||
public Date getOutcardTime() {
|
||||
return outcardTime;
|
||||
}
|
||||
|
||||
public void setOutcardTime(Date outcardTime) {
|
||||
this.outcardTime = outcardTime;
|
||||
}
|
||||
|
||||
public Date getAnnualReviewTime() {
|
||||
return annualReviewTime;
|
||||
}
|
||||
|
||||
public void setAnnualReviewTime(Date annualReviewTime) {
|
||||
this.annualReviewTime = annualReviewTime;
|
||||
}
|
||||
|
||||
public Double getCost() {
|
||||
return cost;
|
||||
}
|
||||
|
||||
public void setCost(Double cost) {
|
||||
this.cost = cost;
|
||||
}
|
||||
|
||||
public String getCertificateStatus() {
|
||||
return certificateStatus;
|
||||
}
|
||||
|
||||
public void setCertificateStatus(String certificateStatus) {
|
||||
this.certificateStatus = certificateStatus;
|
||||
}
|
||||
|
||||
public String getCreateUser() {
|
||||
return createUser;
|
||||
}
|
||||
|
||||
public void setCreateUser(String createUser) {
|
||||
this.createUser = createUser;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getModifyUser() {
|
||||
return modifyUser;
|
||||
}
|
||||
|
||||
public void setModifyUser(String modifyUser) {
|
||||
this.modifyUser = modifyUser;
|
||||
}
|
||||
|
||||
public Date getModifyTime() {
|
||||
return modifyTime;
|
||||
}
|
||||
|
||||
public void setModifyTime(Date modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,373 @@
|
||||
package com.ifish.entity;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author: yan.y
|
||||
* @Description:
|
||||
* @Date: Created in 22:29 2018/7/5
|
||||
* @Modified by:
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "tbl_vip_member")
|
||||
public class VipMember implements Serializable{
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
@Column(name = "vip_member_id")
|
||||
private Integer memberId;
|
||||
|
||||
@Column(name = "vip_member_name")
|
||||
private String memberName;
|
||||
|
||||
@Column(name = "vip_member_legal")
|
||||
private String memberLegal;
|
||||
|
||||
@Column(name = "vip_member_legal_card")
|
||||
private String memberLegalCard;
|
||||
|
||||
@OneToOne
|
||||
@JoinColumn(name = "vip_member_referrer")
|
||||
private VipReferrer memberReferrer;
|
||||
|
||||
@OneToOne
|
||||
@JoinColumn(name = "vip_member_type")
|
||||
private VipType memberType;
|
||||
|
||||
@OneToMany(targetEntity = VipCompany.class)
|
||||
@JoinColumn(name = "vip_member")
|
||||
@JSONField(serialize = false)
|
||||
private Set<VipCompany> vipCompanies;
|
||||
|
||||
@Column(name = "vip_member_card")
|
||||
private String memberCard;
|
||||
|
||||
@Column(name = "vip_member_admission_time")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JSONField(format="yyyy-MM-dd")
|
||||
private Date memberAdmissionTime;
|
||||
|
||||
@Column(name = "vip_member_maturity_time")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JSONField(format="yyyy-MM-dd")
|
||||
private Date memberMaturityTime;
|
||||
|
||||
@Column(name = "vip_member_contact")
|
||||
private String memberContact;
|
||||
|
||||
@Column(name = "vip_member_contact_tel")
|
||||
private String memberContactTel;
|
||||
|
||||
@Column(name = "vip_member_contact_situation")
|
||||
private String memberContactSituation;
|
||||
|
||||
@Column(name = "vip_member_website")
|
||||
private String memberWebsite;
|
||||
|
||||
@Column(name = "vip_member_tel")
|
||||
private String memberTel;
|
||||
|
||||
@Column(name = "vip_member_qq")
|
||||
private String memberQQ;
|
||||
|
||||
@Column(name = "vip_member_situation")
|
||||
private String memberSituation;
|
||||
|
||||
@Column(name = "vip_member_birthday")
|
||||
private String memberBirthday;
|
||||
|
||||
@Column(name = "vip_member_address")
|
||||
private String memberAddress;
|
||||
|
||||
@Column(name = "vip_member_email")
|
||||
private String memberEmail;
|
||||
|
||||
@Column(name = "vip_member_wechat")
|
||||
private String memberWechat;
|
||||
|
||||
@Column(name = "vip_member_url")
|
||||
private String memberUrl;
|
||||
|
||||
@Column(name = "vip_member_demand")
|
||||
private String memberDemand;
|
||||
|
||||
@Column(name = "vip_member_item")
|
||||
private String memberItem;
|
||||
|
||||
@Column(name = "vip_member_fee")
|
||||
private Double memberFee;
|
||||
|
||||
@Column(name = "vip_member_qualification")
|
||||
private String memberQualification;
|
||||
|
||||
@Column(name = "vip_certificate_status")
|
||||
private String certificateStatus;
|
||||
|
||||
@Column(name = "vip_create_user")
|
||||
private String createUser;
|
||||
|
||||
@Column(name = "vip_create_time")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date createTime;
|
||||
|
||||
@Column(name = "vip_modify_user")
|
||||
private String modifyUser;
|
||||
|
||||
@Column(name = "vip_modify_time")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date modifyTime;
|
||||
|
||||
public Integer getMemberId() {
|
||||
return memberId;
|
||||
}
|
||||
|
||||
public void setMemberId(Integer memberId) {
|
||||
this.memberId = memberId;
|
||||
}
|
||||
|
||||
public String getMemberName() {
|
||||
return memberName;
|
||||
}
|
||||
|
||||
public void setMemberName(String memberName) {
|
||||
this.memberName = memberName;
|
||||
}
|
||||
|
||||
public String getMemberLegal() {
|
||||
return memberLegal;
|
||||
}
|
||||
|
||||
public void setMemberLegal(String memberLegal) {
|
||||
this.memberLegal = memberLegal;
|
||||
}
|
||||
|
||||
public String getMemberLegalCard() {
|
||||
return memberLegalCard;
|
||||
}
|
||||
|
||||
public void setMemberLegalCard(String memberLegalCard) {
|
||||
this.memberLegalCard = memberLegalCard;
|
||||
}
|
||||
|
||||
public VipReferrer getMemberReferrer() {
|
||||
return memberReferrer;
|
||||
}
|
||||
|
||||
public void setMemberReferrer(VipReferrer memberReferrer) {
|
||||
this.memberReferrer = memberReferrer;
|
||||
}
|
||||
|
||||
public VipType getMemberType() {
|
||||
return memberType;
|
||||
}
|
||||
|
||||
public void setMemberType(VipType memberType) {
|
||||
this.memberType = memberType;
|
||||
}
|
||||
|
||||
public Set<VipCompany> getVipCompanies() {
|
||||
return vipCompanies;
|
||||
}
|
||||
|
||||
public void setVipCompanies(Set<VipCompany> vipCompanies) {
|
||||
this.vipCompanies = vipCompanies;
|
||||
}
|
||||
|
||||
public String getMemberCard() {
|
||||
return memberCard;
|
||||
}
|
||||
|
||||
public void setMemberCard(String memberCard) {
|
||||
this.memberCard = memberCard;
|
||||
}
|
||||
|
||||
public Date getMemberAdmissionTime() {
|
||||
return memberAdmissionTime;
|
||||
}
|
||||
|
||||
public void setMemberAdmissionTime(Date memberAdmissionTime) {
|
||||
this.memberAdmissionTime = memberAdmissionTime;
|
||||
}
|
||||
|
||||
public Date getMemberMaturityTime() {
|
||||
return memberMaturityTime;
|
||||
}
|
||||
|
||||
public void setMemberMaturityTime(Date memberMaturityTime) {
|
||||
this.memberMaturityTime = memberMaturityTime;
|
||||
}
|
||||
|
||||
public String getMemberContact() {
|
||||
return memberContact;
|
||||
}
|
||||
|
||||
public void setMemberContact(String memberContact) {
|
||||
this.memberContact = memberContact;
|
||||
}
|
||||
|
||||
public String getMemberContactTel() {
|
||||
return memberContactTel;
|
||||
}
|
||||
|
||||
public void setMemberContactTel(String memberContactTel) {
|
||||
this.memberContactTel = memberContactTel;
|
||||
}
|
||||
|
||||
public String getMemberContactSituation() {
|
||||
return memberContactSituation;
|
||||
}
|
||||
|
||||
public void setMemberContactSituation(String memberContactSituation) {
|
||||
this.memberContactSituation = memberContactSituation;
|
||||
}
|
||||
|
||||
public String getMemberWebsite() {
|
||||
return memberWebsite;
|
||||
}
|
||||
|
||||
public void setMemberWebsite(String memberWebsite) {
|
||||
this.memberWebsite = memberWebsite;
|
||||
}
|
||||
|
||||
public String getMemberTel() {
|
||||
return memberTel;
|
||||
}
|
||||
|
||||
public void setMemberTel(String memberTel) {
|
||||
this.memberTel = memberTel;
|
||||
}
|
||||
|
||||
public String getMemberQQ() {
|
||||
return memberQQ;
|
||||
}
|
||||
|
||||
public void setMemberQQ(String memberQQ) {
|
||||
this.memberQQ = memberQQ;
|
||||
}
|
||||
|
||||
public String getMemberSituation() {
|
||||
return memberSituation;
|
||||
}
|
||||
|
||||
public void setMemberSituation(String memberSituation) {
|
||||
this.memberSituation = memberSituation;
|
||||
}
|
||||
|
||||
public String getMemberBirthday() {
|
||||
return memberBirthday;
|
||||
}
|
||||
|
||||
public void setMemberBirthday(String memberBirthday) {
|
||||
this.memberBirthday = memberBirthday;
|
||||
}
|
||||
|
||||
public String getMemberAddress() {
|
||||
return memberAddress;
|
||||
}
|
||||
|
||||
public void setMemberAddress(String memberAddress) {
|
||||
this.memberAddress = memberAddress;
|
||||
}
|
||||
|
||||
public String getMemberEmail() {
|
||||
return memberEmail;
|
||||
}
|
||||
|
||||
public void setMemberEmail(String memberEmail) {
|
||||
this.memberEmail = memberEmail;
|
||||
}
|
||||
|
||||
public String getMemberWechat() {
|
||||
return memberWechat;
|
||||
}
|
||||
|
||||
public void setMemberWechat(String memberWechat) {
|
||||
this.memberWechat = memberWechat;
|
||||
}
|
||||
|
||||
public String getMemberUrl() {
|
||||
return memberUrl;
|
||||
}
|
||||
|
||||
public void setMemberUrl(String memberUrl) {
|
||||
this.memberUrl = memberUrl;
|
||||
}
|
||||
|
||||
public String getMemberDemand() {
|
||||
return memberDemand;
|
||||
}
|
||||
|
||||
public void setMemberDemand(String memberDemand) {
|
||||
this.memberDemand = memberDemand;
|
||||
}
|
||||
|
||||
public String getMemberItem() {
|
||||
return memberItem;
|
||||
}
|
||||
|
||||
public void setMemberItem(String memberItem) {
|
||||
this.memberItem = memberItem;
|
||||
}
|
||||
|
||||
public Double getMemberFee() {
|
||||
return memberFee;
|
||||
}
|
||||
|
||||
public void setMemberFee(Double memberFee) {
|
||||
this.memberFee = memberFee;
|
||||
}
|
||||
|
||||
public String getMemberQualification() {
|
||||
return memberQualification;
|
||||
}
|
||||
|
||||
public void setMemberQualification(String memberQualification) {
|
||||
this.memberQualification = memberQualification;
|
||||
}
|
||||
|
||||
public String getCertificateStatus() {
|
||||
return certificateStatus;
|
||||
}
|
||||
|
||||
public void setCertificateStatus(String certificateStatus) {
|
||||
this.certificateStatus = certificateStatus;
|
||||
}
|
||||
|
||||
public String getCreateUser() {
|
||||
return createUser;
|
||||
}
|
||||
|
||||
public void setCreateUser(String createUser) {
|
||||
this.createUser = createUser;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getModifyUser() {
|
||||
return modifyUser;
|
||||
}
|
||||
|
||||
public void setModifyUser(String modifyUser) {
|
||||
this.modifyUser = modifyUser;
|
||||
}
|
||||
|
||||
public Date getModifyTime() {
|
||||
return modifyTime;
|
||||
}
|
||||
|
||||
public void setModifyTime(Date modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,213 @@
|
||||
package com.ifish.entity;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author: yan.y
|
||||
* @Description:
|
||||
* @Date: Created in 22:29 2018/7/5
|
||||
* @Modified by:
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "tbl_vip_personal")
|
||||
public class VipPersonal implements Serializable{
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
@Column(name = "vip_personal_id")
|
||||
private Integer personalId;
|
||||
|
||||
@Column(name = "vip_personal_name")
|
||||
private String personalName;
|
||||
|
||||
@Column(name = "vip_certificate_card")
|
||||
private String certificateCard;
|
||||
|
||||
@Column(name = "vip_card_num")
|
||||
private String cardNum;
|
||||
|
||||
@Column(name = "vip_certificate_level")
|
||||
private String certificateLevel;
|
||||
|
||||
@Column(name = "vip_certificate_type")
|
||||
private String certificateType;
|
||||
|
||||
@Column(name = "vip_certificate_apply_time")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JSONField(format="yyyy-MM-dd")
|
||||
private Date certificateApplyTime;
|
||||
|
||||
@Column(name = "vip_certificate_maturity_time")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JSONField(format="yyyy-MM-dd")
|
||||
private Date certificateMaturityTime;
|
||||
|
||||
@Column(name = "vip_certificate_receive_time")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JSONField(format="yyyy-MM-dd")
|
||||
private Date certificateReceiveTime;
|
||||
|
||||
@Column(name = "vip_upload_website")
|
||||
private String uploadWebsite;
|
||||
|
||||
@Column(name = "vip_certificate_remark")
|
||||
private String certificateRemark;
|
||||
|
||||
@Column(name = "vip_certificate_status")
|
||||
private String certificateStatus;
|
||||
|
||||
@Column(name = "vip_create_user")
|
||||
private String createUser;
|
||||
|
||||
@Column(name = "vip_create_time")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@JSONField(format="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
@Column(name = "vip_modify_user")
|
||||
private String modifyUser;
|
||||
|
||||
@Column(name = "vip_modify_time")
|
||||
@JSONField(format="yyyy-MM-dd HH:mm:ss")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date modifyTime;
|
||||
|
||||
|
||||
public Integer getPersonalId() {
|
||||
return personalId;
|
||||
}
|
||||
|
||||
public void setPersonalId(Integer personalId) {
|
||||
this.personalId = personalId;
|
||||
}
|
||||
|
||||
public String getPersonalName() {
|
||||
return personalName;
|
||||
}
|
||||
|
||||
public void setPersonalName(String personalName) {
|
||||
this.personalName = personalName;
|
||||
}
|
||||
|
||||
public String getCertificateCard() {
|
||||
return certificateCard;
|
||||
}
|
||||
|
||||
public void setCertificateCard(String certificateCard) {
|
||||
this.certificateCard = certificateCard;
|
||||
}
|
||||
|
||||
public String getCardNum() {
|
||||
return cardNum;
|
||||
}
|
||||
|
||||
public void setCardNum(String cardNum) {
|
||||
this.cardNum = cardNum;
|
||||
}
|
||||
|
||||
public String getCertificateLevel() {
|
||||
return certificateLevel;
|
||||
}
|
||||
|
||||
public void setCertificateLevel(String certificateLevel) {
|
||||
this.certificateLevel = certificateLevel;
|
||||
}
|
||||
|
||||
public String getCertificateType() {
|
||||
return certificateType;
|
||||
}
|
||||
|
||||
public void setCertificateType(String certificateType) {
|
||||
this.certificateType = certificateType;
|
||||
}
|
||||
|
||||
public Date getCertificateApplyTime() {
|
||||
return certificateApplyTime;
|
||||
}
|
||||
|
||||
public void setCertificateApplyTime(Date certificateApplyTime) {
|
||||
this.certificateApplyTime = certificateApplyTime;
|
||||
}
|
||||
|
||||
public Date getCertificateMaturityTime() {
|
||||
return certificateMaturityTime;
|
||||
}
|
||||
|
||||
public void setCertificateMaturityTime(Date certificateMaturityTime) {
|
||||
this.certificateMaturityTime = certificateMaturityTime;
|
||||
}
|
||||
|
||||
@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
|
||||
public Date getCertificateReceiveTime() {
|
||||
return certificateReceiveTime;
|
||||
}
|
||||
|
||||
public void setCertificateReceiveTime(Date certificateReceiveTime) {
|
||||
this.certificateReceiveTime = certificateReceiveTime;
|
||||
}
|
||||
|
||||
public String getUploadWebsite() {
|
||||
return uploadWebsite;
|
||||
}
|
||||
|
||||
public void setUploadWebsite(String uploadWebsite) {
|
||||
this.uploadWebsite = uploadWebsite;
|
||||
}
|
||||
|
||||
public String getCertificateRemark() {
|
||||
return certificateRemark;
|
||||
}
|
||||
|
||||
public void setCertificateRemark(String certificateRemark) {
|
||||
this.certificateRemark = certificateRemark;
|
||||
}
|
||||
|
||||
public String getCertificateStatus() {
|
||||
return certificateStatus;
|
||||
}
|
||||
|
||||
public void setCertificateStatus(String certificateStatus) {
|
||||
this.certificateStatus = certificateStatus;
|
||||
}
|
||||
|
||||
public String getCreateUser() {
|
||||
return createUser;
|
||||
}
|
||||
|
||||
public void setCreateUser(String createUser) {
|
||||
this.createUser = createUser;
|
||||
}
|
||||
|
||||
|
||||
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
public String getModifyUser() {
|
||||
return modifyUser;
|
||||
}
|
||||
|
||||
public void setModifyUser(String modifyUser) {
|
||||
this.modifyUser = modifyUser;
|
||||
}
|
||||
|
||||
public Date getModifyTime() {
|
||||
return modifyTime;
|
||||
}
|
||||
|
||||
public void setModifyTime(Date modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.ifish.entity;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
@@ -29,6 +31,8 @@ public class VipReferrer implements Serializable{
|
||||
private VipType referrerType;
|
||||
|
||||
@Column(name = "vip_admission_time")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JSONField(format="yyyy-MM-dd")
|
||||
private Date referrerAdmissionTime;
|
||||
|
||||
@Column(name = "vip_referrer_remark")
|
||||
@@ -42,6 +46,7 @@ public class VipReferrer implements Serializable{
|
||||
|
||||
@Column(name = "vip_create_time")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@JSONField(format="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
@Column(name = "vip_modify_user")
|
||||
@@ -49,6 +54,7 @@ public class VipReferrer implements Serializable{
|
||||
|
||||
@Column(name = "vip_mofify_time")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@JSONField(format="yyyy-MM-dd HH:mm:ss")
|
||||
private Date modifyTime;
|
||||
|
||||
public Integer getReferrerId() {
|
||||
@@ -75,7 +81,6 @@ public class VipReferrer implements Serializable{
|
||||
this.referrerType = referrerType;
|
||||
}
|
||||
|
||||
@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
|
||||
public Date getReferrerAdmissionTime() {
|
||||
return referrerAdmissionTime;
|
||||
}
|
||||
@@ -108,7 +113,6 @@ public class VipReferrer implements Serializable{
|
||||
this.createUser = createUser;
|
||||
}
|
||||
|
||||
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
@@ -125,7 +129,6 @@ public class VipReferrer implements Serializable{
|
||||
this.modifyUser = modifyUser;
|
||||
}
|
||||
|
||||
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
public Date getModifyTime() {
|
||||
return modifyTime;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
package com.ifish.entity;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author: yan.y
|
||||
* @Description:
|
||||
* @Date: Created in 23:40 2018/7/11
|
||||
* @Modified by:
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "tbl_vip_sms_result")
|
||||
public class VipSmsResult implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
@Column(name = "vip_result_id")
|
||||
private Integer resultId;
|
||||
|
||||
@Column(name = "vip_result_buss_id")
|
||||
private Integer resultBussId;
|
||||
|
||||
@Column(name = "vip_result_tel")
|
||||
private String resultTel;
|
||||
|
||||
@Column(name = "vip_result_template")
|
||||
private String resultTemplate;
|
||||
|
||||
@Column(name = "vip_result_code")
|
||||
private String resultCode;
|
||||
|
||||
@Column(name = "vip_result_messae")
|
||||
private String resultMessage;
|
||||
|
||||
@Column(name = "vip_result_requestid")
|
||||
private String resultRequestId;
|
||||
|
||||
@Column(name = "vip_result_bizid")
|
||||
private String resultBizId;
|
||||
|
||||
@Column(name = "vip_result_createtime")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date resultCreateTime;
|
||||
|
||||
public Integer getResultId() {
|
||||
return resultId;
|
||||
}
|
||||
|
||||
public void setResultId(Integer resultId) {
|
||||
this.resultId = resultId;
|
||||
}
|
||||
|
||||
public Integer getResultBussId() {
|
||||
return resultBussId;
|
||||
}
|
||||
|
||||
public void setResultBussId(Integer resultBussId) {
|
||||
this.resultBussId = resultBussId;
|
||||
}
|
||||
|
||||
public String getResultTel() {
|
||||
return resultTel;
|
||||
}
|
||||
|
||||
public void setResultTel(String resultTel) {
|
||||
this.resultTel = resultTel;
|
||||
}
|
||||
|
||||
public String getResultTemplate() {
|
||||
return resultTemplate;
|
||||
}
|
||||
|
||||
public void setResultTemplate(String resultTemplate) {
|
||||
this.resultTemplate = resultTemplate;
|
||||
}
|
||||
|
||||
public String getResultCode() {
|
||||
return resultCode;
|
||||
}
|
||||
|
||||
public void setResultCode(String resultCode) {
|
||||
this.resultCode = resultCode;
|
||||
}
|
||||
|
||||
public String getResultMessage() {
|
||||
return resultMessage;
|
||||
}
|
||||
|
||||
public void setResultMessage(String resultMessage) {
|
||||
this.resultMessage = resultMessage;
|
||||
}
|
||||
|
||||
public String getResultRequestId() {
|
||||
return resultRequestId;
|
||||
}
|
||||
|
||||
public void setResultRequestId(String resultRequestId) {
|
||||
this.resultRequestId = resultRequestId;
|
||||
}
|
||||
|
||||
public String getResultBizId() {
|
||||
return resultBizId;
|
||||
}
|
||||
|
||||
public void setResultBizId(String resultBizId) {
|
||||
this.resultBizId = resultBizId;
|
||||
}
|
||||
|
||||
public Date getResultCreateTime() {
|
||||
return resultCreateTime;
|
||||
}
|
||||
|
||||
public void setResultCreateTime(Date resultCreateTime) {
|
||||
this.resultCreateTime = resultCreateTime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.ifish.excel;
|
||||
|
||||
import com.ifish.entity.VipMember;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
|
||||
import org.apache.poi.hssf.usermodel.HSSFFont;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.springframework.web.servlet.view.document.AbstractExcelView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author: yan.y
|
||||
* @Description:
|
||||
* @Date: Created in 23:59 2018/7/10
|
||||
* @Modified by:
|
||||
*/
|
||||
public class VipMemberExportExcel extends AbstractExcelView{
|
||||
|
||||
@Override
|
||||
protected void buildExcelDocument(Map<String, Object> model, HSSFWorkbook workbook, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
//表头样式
|
||||
HSSFCellStyle style = workbook.createCellStyle();
|
||||
//字体样式
|
||||
HSSFFont fontStyle = workbook.createFont();
|
||||
fontStyle.setFontName("微软雅黑");
|
||||
fontStyle.setFontHeightInPoints((short)12);
|
||||
style.setFont(fontStyle);
|
||||
|
||||
HSSFSheet sheet = workbook.createSheet("sheet");
|
||||
getCell(sheet,0,0).setCellValue("单位名称");
|
||||
getCell(sheet,0,1).setCellValue("法人代表");
|
||||
getCell(sheet,0,2).setCellValue("法人身份证号");
|
||||
getCell(sheet,0,3).setCellValue("推荐人");
|
||||
getCell(sheet,0,4).setCellValue("会员类型");
|
||||
getCell(sheet,0,5).setCellValue("会员编号");
|
||||
getCell(sheet,0,6).setCellValue("入会时间");
|
||||
getCell(sheet,0,7).setCellValue("到期时间");
|
||||
getCell(sheet,0,8).setCellValue("联系人");
|
||||
getCell(sheet,0,9).setCellValue("联系人电话");
|
||||
getCell(sheet,0,10).setCellValue("联系情况");
|
||||
getCell(sheet,0,11).setCellValue("官网是否录入");
|
||||
getCell(sheet,0,12).setCellValue("手机");
|
||||
getCell(sheet,0,13).setCellValue("QQ");
|
||||
getCell(sheet,0,14).setCellValue("微信");
|
||||
getCell(sheet,0,15).setCellValue("邮箱");
|
||||
getCell(sheet,0,16).setCellValue("企业情况");
|
||||
getCell(sheet,0,17).setCellValue("生日");
|
||||
getCell(sheet,0,18).setCellValue("单位地址");
|
||||
getCell(sheet,0,19).setCellValue("企业网址");
|
||||
getCell(sheet,0,20).setCellValue("需求信息");
|
||||
getCell(sheet,0,21).setCellValue("项目匹配");
|
||||
getCell(sheet,0,22).setCellValue("会费");
|
||||
getCell(sheet,0,23).setCellValue("是否有环保资质");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
List<VipMember> vipMembers = (List<VipMember>) model.get("vipMembers");
|
||||
for (int i = 0; i < vipMembers.size(); i++) {
|
||||
VipMember vipMember = vipMembers.get(i);
|
||||
getCell(sheet,i+1,0).setCellValue(vipMember.getMemberName());
|
||||
getCell(sheet,i+1,1).setCellValue(vipMember.getMemberLegal());
|
||||
getCell(sheet,i+1,2).setCellValue(vipMember.getMemberLegalCard());
|
||||
getCell(sheet,i+1,3).setCellValue(vipMember.getMemberReferrer().getReferrerName());
|
||||
getCell(sheet,i+1,4).setCellValue(vipMember.getMemberType().getTypeName());
|
||||
getCell(sheet,i+1,5).setCellValue(vipMember.getMemberCard());
|
||||
Date memberAdmissionTime = vipMember.getMemberAdmissionTime();
|
||||
calendar.setTime(memberAdmissionTime);
|
||||
|
||||
getCell(sheet,i+1,6).setCellValue(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1) + "-" + calendar.get(Calendar.DAY_OF_MONTH));
|
||||
Date memberMaturityTime = vipMember.getMemberMaturityTime();
|
||||
calendar.setTime(memberMaturityTime);
|
||||
getCell(sheet,i+1,7).setCellValue(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1) + "-" + calendar.get(Calendar.DAY_OF_MONTH));
|
||||
getCell(sheet,i+1,8).setCellValue(vipMember.getMemberContact());
|
||||
getCell(sheet,i+1,9).setCellValue(vipMember.getMemberContactTel());
|
||||
getCell(sheet,i+1,10).setCellValue(vipMember.getMemberContactSituation());
|
||||
getCell(sheet,i+1,11).setCellValue(vipMember.getMemberWebsite());
|
||||
getCell(sheet,i+1,12).setCellValue(vipMember.getMemberTel());
|
||||
getCell(sheet,i+1,13).setCellValue(vipMember.getMemberQQ());
|
||||
getCell(sheet,i+1,14).setCellValue(vipMember.getMemberWechat());
|
||||
getCell(sheet,i+1,15).setCellValue(vipMember.getMemberEmail());
|
||||
getCell(sheet,i+1,16).setCellValue(vipMember.getMemberSituation());
|
||||
getCell(sheet,i+1,17).setCellValue(vipMember.getMemberBirthday());
|
||||
getCell(sheet,i+1,18).setCellValue(vipMember.getMemberAddress());
|
||||
getCell(sheet,i+1,19).setCellValue(vipMember.getMemberUrl());
|
||||
getCell(sheet,i+1,20).setCellValue(vipMember.getMemberDemand());
|
||||
getCell(sheet,i+1,21).setCellValue(vipMember.getMemberItem());
|
||||
getCell(sheet,i+1,22).setCellValue(vipMember.getMemberFee());
|
||||
getCell(sheet,i+1,23).setCellValue(vipMember.getMemberQualification().equals("0") ? "是" : "否");
|
||||
}
|
||||
|
||||
String filename = URLEncoder.encode("会员信息导出.xls", "UTF-8");
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setHeader("Content-disposition", "attachment;filename=" + filename);
|
||||
OutputStream ouputStream = response.getOutputStream();
|
||||
workbook.write(ouputStream);
|
||||
ouputStream.flush();
|
||||
ouputStream.close();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
package com.ifish.excel;
|
||||
|
||||
import com.ifish.entity.VipReferrer;
|
||||
import com.ifish.entity.VipType;
|
||||
import org.apache.poi.hssf.usermodel.*;
|
||||
import org.apache.poi.ss.util.CellRangeAddressList;
|
||||
import org.springframework.web.servlet.view.document.AbstractExcelView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author: yan.y
|
||||
* @Description:
|
||||
* @Date: Created in 22:23 2018/7/9
|
||||
* @Modified by:
|
||||
*/
|
||||
public class VipMemberImportTemplateExcel extends AbstractExcelView {
|
||||
|
||||
@Override
|
||||
protected void buildExcelDocument(Map<String, Object> model, HSSFWorkbook workbook, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
//表头样式
|
||||
HSSFCellStyle style = workbook.createCellStyle();
|
||||
//字体样式
|
||||
HSSFFont fontStyle = workbook.createFont();
|
||||
fontStyle.setFontName("微软雅黑");
|
||||
fontStyle.setFontHeightInPoints((short)12);
|
||||
style.setFont(fontStyle);
|
||||
|
||||
HSSFSheet sheet = workbook.createSheet("sheet");
|
||||
sheet.autoSizeColumn(0);
|
||||
getCell(sheet,0,0).setCellValue("单位名称(必填)");
|
||||
getCell(sheet,0,1).setCellValue("法人代表(必填)");
|
||||
getCell(sheet,0,2).setCellValue("法人身份证号(必填)");
|
||||
getCell(sheet,0,3).setCellValue("推荐人(只能选择或者为空)");
|
||||
getCell(sheet,0,4).setCellValue("会员类型(必填)");
|
||||
getCell(sheet,0,5).setCellValue("会员编号(必填)");
|
||||
getCell(sheet, 0, 6).setCellValue("入会时间(必填)格式:YYYY-MM-DD");
|
||||
getCell(sheet, 0, 7).setCellValue("到期时间(必填)格式:YYYY-MM-DD");
|
||||
getCell(sheet,0,8).setCellValue("联系人(必填)");
|
||||
getCell(sheet,0,9).setCellValue("联系人电话(必填)");
|
||||
getCell(sheet,0,10).setCellValue("联系情况");
|
||||
getCell(sheet,0,11).setCellValue("官网是否录入");
|
||||
getCell(sheet,0,12).setCellValue("手机(必填)发短信手机号");
|
||||
getCell(sheet,0,13).setCellValue("QQ");
|
||||
getCell(sheet,0,14).setCellValue("微信");
|
||||
getCell(sheet,0,15).setCellValue("邮箱");
|
||||
getCell(sheet,0,16).setCellValue("企业情况");
|
||||
getCell(sheet, 0, 17).setCellValue("生日(必填)格式:MM-DD");
|
||||
|
||||
getCell(sheet,0,18).setCellValue("单位地址(必填)");
|
||||
getCell(sheet,0,19).setCellValue("企业网址");
|
||||
getCell(sheet,0,20).setCellValue("需求信息");
|
||||
getCell(sheet,0,21).setCellValue("项目匹配");
|
||||
getCell(sheet,0,22).setCellValue("会费(必填)");
|
||||
getCell(sheet,0,23).setCellValue("是否有环保资质(必填)");
|
||||
//环保资质
|
||||
String[] qualifications = {"是","否"};
|
||||
CellRangeAddressList regions = new CellRangeAddressList(0, 65535, 23, 23);
|
||||
DVConstraint constraint = DVConstraint.createExplicitListConstraint(qualifications);
|
||||
HSSFDataValidation dataValidation = new HSSFDataValidation(regions, constraint);
|
||||
sheet.addValidationData(dataValidation);
|
||||
|
||||
//会员类型
|
||||
List<VipType> vipTypes = (List<VipType>) model.get("vipTypes");
|
||||
String[] vipTypesStr = new String[vipTypes.size()];
|
||||
for (int i = 0; i < vipTypes.size(); i++) {
|
||||
vipTypesStr[i] = vipTypes.get(i).getTypeName();
|
||||
}
|
||||
|
||||
CellRangeAddressList regions1 = new CellRangeAddressList(0, 65535, 4, 4);
|
||||
DVConstraint constraint1 = DVConstraint.createExplicitListConstraint(vipTypesStr);
|
||||
HSSFDataValidation dataValidation1 = new HSSFDataValidation(regions1, constraint1);
|
||||
sheet.addValidationData(dataValidation1);
|
||||
|
||||
//推荐人
|
||||
List<VipReferrer> referrers = (List<VipReferrer>) model.get("referrers");
|
||||
String[] referrersStr = new String[referrers.size()];
|
||||
for (int i = 0; i < referrers.size(); i++) {
|
||||
referrersStr[i] = referrers.get(i).getReferrerName();
|
||||
}
|
||||
|
||||
CellRangeAddressList regions2 = new CellRangeAddressList(0, 65535, 3, 3);
|
||||
DVConstraint constraint2 = DVConstraint.createExplicitListConstraint(referrersStr);
|
||||
HSSFDataValidation dataValidation2 = new HSSFDataValidation(regions2, constraint2);
|
||||
sheet.addValidationData(dataValidation2);
|
||||
|
||||
HSSFCellStyle cellStyle = workbook.createCellStyle();
|
||||
HSSFDataFormat format = workbook.createDataFormat();
|
||||
cellStyle.setDataFormat(format.getFormat("@"));
|
||||
sheet.setDefaultColumnStyle(0,cellStyle);
|
||||
sheet.setDefaultColumnStyle(1,cellStyle);
|
||||
sheet.setDefaultColumnStyle(2,cellStyle);
|
||||
sheet.setDefaultColumnStyle(3,cellStyle);
|
||||
sheet.setDefaultColumnStyle(4,cellStyle);
|
||||
sheet.setDefaultColumnStyle(5,cellStyle);
|
||||
sheet.setDefaultColumnStyle(6,cellStyle);
|
||||
sheet.setDefaultColumnStyle(7,cellStyle);
|
||||
sheet.setDefaultColumnStyle(8,cellStyle);
|
||||
sheet.setDefaultColumnStyle(9,cellStyle);
|
||||
sheet.setDefaultColumnStyle(10,cellStyle);
|
||||
sheet.setDefaultColumnStyle(11,cellStyle);
|
||||
sheet.setDefaultColumnStyle(12,cellStyle);
|
||||
sheet.setDefaultColumnStyle(13,cellStyle);
|
||||
sheet.setDefaultColumnStyle(14,cellStyle);
|
||||
sheet.setDefaultColumnStyle(15,cellStyle);
|
||||
sheet.setDefaultColumnStyle(16,cellStyle);
|
||||
sheet.setDefaultColumnStyle(17,cellStyle);
|
||||
sheet.setDefaultColumnStyle(18,cellStyle);
|
||||
sheet.setDefaultColumnStyle(19,cellStyle);
|
||||
sheet.setDefaultColumnStyle(20,cellStyle);
|
||||
sheet.setDefaultColumnStyle(21,cellStyle);
|
||||
sheet.setDefaultColumnStyle(22,cellStyle);
|
||||
sheet.setDefaultColumnStyle(23,cellStyle);
|
||||
|
||||
String filename = URLEncoder.encode("会员信息导入模板.xls", "UTF-8");
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setHeader("Content-disposition", "attachment;filename=" + filename);
|
||||
OutputStream ouputStream = response.getOutputStream();
|
||||
workbook.write(ouputStream);
|
||||
ouputStream.flush();
|
||||
ouputStream.close();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,13 @@
|
||||
package com.ifish.service;
|
||||
|
||||
import com.ifish.entity.VipReferrer;
|
||||
import com.ifish.entity.VipType;
|
||||
import com.ifish.entity.*;
|
||||
import com.ifish.hibernate.Pagination;
|
||||
import com.ifish.search.SearchFilter;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author: yan.y
|
||||
* @Description:
|
||||
@@ -12,6 +15,7 @@ import com.ifish.search.SearchFilter;
|
||||
* @Modified by:
|
||||
*/
|
||||
public interface VipService {
|
||||
/**=================================会员类型=================================================*/
|
||||
/**
|
||||
* 查询会员类别
|
||||
* @param searchFilter
|
||||
@@ -23,11 +27,54 @@ public interface VipService {
|
||||
|
||||
VipType getVipTypeById(Integer typeId);
|
||||
|
||||
List<VipType> getVipTypeByList();
|
||||
|
||||
/**=================================推荐人=================================================*/
|
||||
Pagination<VipReferrer> getVipReferrerByPage(SearchFilter searchFilter);
|
||||
|
||||
boolean saveOrUpdateVipReferrer(VipReferrer vipReferrer);
|
||||
boolean saveOrUpdateVipReferrer(VipReferrer vipReferrer,String userName);
|
||||
|
||||
VipReferrer getVipReferrer(Integer referrerId);
|
||||
|
||||
boolean deleteVipReferrer(VipReferrer vipReferrer,String userName);
|
||||
|
||||
/**=================================个人评价=================================================*/
|
||||
|
||||
Pagination<VipPersonal> getVipPersonalByPage(SearchFilter searchFilter);
|
||||
|
||||
boolean saveOrUpdateVipPersonal(VipPersonal vipPersonal,String userName);
|
||||
|
||||
VipPersonal getVipPersonal(Integer personalId);
|
||||
|
||||
boolean deleteVipPersonal(VipPersonal vipPersonal,String userName);
|
||||
|
||||
/**=================================单位评价=================================================*/
|
||||
|
||||
Pagination<VipCompany> getVipCompanyByPage(SearchFilter searchFilter);
|
||||
|
||||
boolean saveOrUpdateVipCompany(VipCompany vipCompany,String userName);
|
||||
|
||||
VipCompany saveOrUpDateVipCompanyByReturn(VipCompany vipCompany,String userName);
|
||||
|
||||
VipCompany getVipCompany(Integer companyId);
|
||||
|
||||
List<VipCompany> getVipCompanys(Integer memberId);
|
||||
|
||||
boolean deleteVipCompany(VipCompany vipCompany,String userName);
|
||||
|
||||
/**=================================会员信息=================================================*/
|
||||
|
||||
Pagination<VipMember> getVipMemberByPage(SearchFilter searchFilter);
|
||||
|
||||
boolean saveOrUpdateVipMember(VipMember vipMember,String userName,String companyIds);
|
||||
|
||||
VipMember getVipMember(Integer memberId);
|
||||
|
||||
boolean deleteVipMember(VipMember vipMember,String userName);
|
||||
|
||||
/**=================================会员信息上传保存=================================================*/
|
||||
|
||||
void filesSaveVipMember(InputStream inputStream,String userName);
|
||||
|
||||
void saveSmsResult(VipSmsResult vipSmsResult);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
package com.ifish.serviceImpl;
|
||||
|
||||
import com.ifish.dao.VipReferrerDao;
|
||||
import com.ifish.dao.VipTypeDao;
|
||||
import com.ifish.entity.VipReferrer;
|
||||
import com.ifish.entity.VipType;
|
||||
import com.ifish.dao.*;
|
||||
import com.ifish.entity.*;
|
||||
import com.ifish.hibernate.Pagination;
|
||||
import com.ifish.search.SearchFilter;
|
||||
import com.ifish.service.VipService;
|
||||
import com.ifish.util.IfishUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.time.DateUtils;
|
||||
import org.apache.poi.hssf.usermodel.HSSFRow;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.hibernate.criterion.Criterion;
|
||||
import org.hibernate.criterion.Order;
|
||||
import org.hibernate.criterion.Restrictions;
|
||||
@@ -16,8 +20,10 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author: yan.y
|
||||
@@ -35,6 +41,18 @@ public class VipServiceImpl implements VipService{
|
||||
@Autowired
|
||||
private VipReferrerDao vipReferrerDao;
|
||||
|
||||
@Autowired
|
||||
private VipPersonalDao vipPersonalDao;
|
||||
|
||||
@Autowired
|
||||
private VipCompanyDao vipCompanyDao;
|
||||
|
||||
@Autowired
|
||||
private VipMemberDao vipMemberDao;
|
||||
|
||||
@Autowired
|
||||
private VipSmsResultDao vipSmsResultDao;
|
||||
|
||||
@Override
|
||||
public Pagination<VipType> getVipTypeByPage(SearchFilter searchFilter) {
|
||||
//查询条件
|
||||
@@ -68,6 +86,13 @@ public class VipServiceImpl implements VipService{
|
||||
return this.vipTypeDao.get(typeId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VipType> getVipTypeByList() {
|
||||
Criterion criterion = Restrictions.eq("typeStatus","0");
|
||||
List<VipType> list = this.vipTypeDao.findByProperty(criterion);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pagination<VipReferrer> getVipReferrerByPage(SearchFilter searchFilter) {
|
||||
//查询条件
|
||||
@@ -89,8 +114,8 @@ public class VipServiceImpl implements VipService{
|
||||
} else if ((searchFilter.getsSearch3() != null && StringUtils.isNotBlank(searchFilter.getsSearch3()))
|
||||
&& (searchFilter.getsSearch4() == null || StringUtils.isBlank(searchFilter.getsSearch4()))) {
|
||||
queryList.add(Restrictions.ge("referrerAdmissionTime", IfishUtil.StrToDate(searchFilter.getsSearch3())));
|
||||
} else if ((searchFilter.getsSearch3() == null || StringUtils.isBlank(searchFilter.getsSearch3())
|
||||
&& (searchFilter.getsSearch4() != null && StringUtils.isNotBlank(searchFilter.getsSearch4())))) {
|
||||
} else if ((searchFilter.getsSearch3() == null || StringUtils.isBlank(searchFilter.getsSearch3()))
|
||||
&& (searchFilter.getsSearch4() != null && StringUtils.isNotBlank(searchFilter.getsSearch4()))) {
|
||||
queryList.add(Restrictions.le("referrerAdmissionTime",IfishUtil.StrToDate(searchFilter.getsSearch4())));
|
||||
}
|
||||
|
||||
@@ -100,14 +125,34 @@ public class VipServiceImpl implements VipService{
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveOrUpdateVipReferrer(VipReferrer vipReferrer) {
|
||||
public boolean saveOrUpdateVipReferrer(VipReferrer vipReferrer,String userName) {
|
||||
Integer referrerId = vipReferrer.getReferrerId();
|
||||
if (referrerId != null) {
|
||||
VipType vipType = this.vipTypeDao.get(vipReferrer.getReferrerType().getTypeId());
|
||||
vipReferrer = this.vipReferrerDao.get(referrerId);
|
||||
vipReferrer.setReferrerType(vipType);
|
||||
vipReferrer.setModifyTime(new Date());
|
||||
vipReferrer.setModifyUser(userName);
|
||||
this.vipReferrerDao.update(vipReferrer);
|
||||
} else {
|
||||
VipType vipType = this.vipTypeDao.get(vipReferrer.getReferrerType().getTypeId());
|
||||
vipReferrer.setReferrerType(vipType);
|
||||
vipReferrer.setCreateTime(new Date());
|
||||
vipReferrer.setCreateUser(userName);
|
||||
vipReferrer.setModifyTime(new Date());
|
||||
vipReferrer.setModifyUser(userName);
|
||||
vipReferrer.setReferrerStatus("0");
|
||||
this.vipReferrerDao.save(vipReferrer);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteVipReferrer(VipReferrer vipReferrer, String userName) {
|
||||
vipReferrer.setReferrerStatus("1");
|
||||
vipReferrer.setModifyTime(new Date());
|
||||
vipReferrer.setModifyUser(userName);
|
||||
this.vipReferrerDao.update(vipReferrer);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -115,4 +160,444 @@ public class VipServiceImpl implements VipService{
|
||||
public VipReferrer getVipReferrer(Integer referrerId) {
|
||||
return this.vipReferrerDao.get(referrerId);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Pagination<VipPersonal> getVipPersonalByPage(SearchFilter searchFilter) {
|
||||
//查询条件
|
||||
List<Criterion> queryList = new ArrayList<Criterion>();
|
||||
//排序条件
|
||||
List<Order> orderList = new ArrayList<Order>();
|
||||
//分页
|
||||
Integer iDisplayStart = searchFilter.getiDisplayStart();
|
||||
Integer iDisplayLength = searchFilter.getiDisplayLength();
|
||||
queryList.add(Restrictions.eq("certificateStatus","0"));
|
||||
if (searchFilter.getsSearch1() != null && StringUtils.isNotBlank(searchFilter.getsSearch1())) {
|
||||
queryList.add(Restrictions.like("personalName", "%" + searchFilter.getsSearch1() + "%"));
|
||||
}
|
||||
if (searchFilter.getsSearch2() != null && StringUtils.isNotBlank(searchFilter.getsSearch2())) {
|
||||
queryList.add(Restrictions.eq("cardNum",searchFilter.getsSearch2()));
|
||||
}
|
||||
if (searchFilter.getsSearch3() != null && StringUtils.isNotBlank(searchFilter.getsSearch3())) {
|
||||
queryList.add(Restrictions.eq("certificateMaturityTime",IfishUtil.StrToDate(searchFilter.getsSearch3())));
|
||||
}
|
||||
if (searchFilter.getsSearch4() != null && StringUtils.isNotBlank(searchFilter.getsSearch4())) {
|
||||
queryList.add(Restrictions.eq("certificateReceiveTime",IfishUtil.StrToDate(searchFilter.getsSearch4())));
|
||||
}
|
||||
orderList.add(Order.asc("certificateMaturityTime"));
|
||||
Pagination<VipPersonal> page = this.vipPersonalDao.findByCriteria(iDisplayStart, iDisplayLength, orderList, queryList.toArray(new Criterion[queryList.size()]));
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveOrUpdateVipPersonal(VipPersonal vipPersonal, String userName) {
|
||||
Integer personalId = vipPersonal.getPersonalId();
|
||||
if (personalId != null) {
|
||||
VipPersonal personal = this.vipPersonalDao.get(personalId);
|
||||
personal.setPersonalName(vipPersonal.getPersonalName());
|
||||
personal.setCardNum(vipPersonal.getCardNum());
|
||||
personal.setCertificateCard(vipPersonal.getCertificateCard());
|
||||
personal.setCertificateLevel(vipPersonal.getCertificateLevel());
|
||||
personal.setCertificateType(vipPersonal.getCertificateType());
|
||||
personal.setCertificateApplyTime(vipPersonal.getCertificateApplyTime());
|
||||
personal.setCertificateReceiveTime(vipPersonal.getCertificateReceiveTime());
|
||||
personal.setCertificateMaturityTime(vipPersonal.getCertificateMaturityTime());
|
||||
personal.setUploadWebsite(vipPersonal.getUploadWebsite());
|
||||
personal.setCertificateRemark(vipPersonal.getCertificateRemark());
|
||||
this.vipPersonalDao.update(personal);
|
||||
} else {
|
||||
vipPersonal.setCreateUser(userName);
|
||||
vipPersonal.setCreateTime(new Date());
|
||||
vipPersonal.setModifyUser(userName);
|
||||
vipPersonal.setModifyTime(new Date());
|
||||
vipPersonal.setCertificateStatus("0");
|
||||
this.vipPersonalDao.save(vipPersonal);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VipPersonal getVipPersonal(Integer personalId) {
|
||||
return this.vipPersonalDao.get(personalId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteVipPersonal(VipPersonal vipPersonal,String userName) {
|
||||
vipPersonal.setModifyUser(userName);
|
||||
vipPersonal.setModifyTime(new Date());
|
||||
vipPersonal.setCertificateStatus("1");
|
||||
this.vipPersonalDao.update(vipPersonal);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Pagination<VipCompany> getVipCompanyByPage(SearchFilter searchFilter) {
|
||||
//查询条件
|
||||
List<Criterion> queryList = new ArrayList<Criterion>();
|
||||
//排序条件
|
||||
List<Order> orderList = new ArrayList<Order>();
|
||||
//分页
|
||||
Integer iDisplayStart = searchFilter.getiDisplayStart();
|
||||
Integer iDisplayLength = searchFilter.getiDisplayLength();
|
||||
queryList.add(Restrictions.eq("certificateStatus","0"));
|
||||
if (searchFilter.getsSearch1() != null && StringUtils.isNotBlank(searchFilter.getsSearch1())) {
|
||||
Pagination<VipMember> members = this.vipMemberDao.findByCriteria(iDisplayStart, iDisplayLength, new ArrayList<Order>(), Restrictions.like("memberName", "%" + searchFilter.getsSearch1() + "%"));
|
||||
List<VipMember> list = members.getList();
|
||||
List<Integer> memberIds = new ArrayList<Integer>();
|
||||
for (VipMember vipMember : list) {
|
||||
memberIds.add(vipMember.getMemberId());
|
||||
}
|
||||
if (memberIds.size() > 0) {
|
||||
queryList.add(Restrictions.in("vipMember.memberId", memberIds));
|
||||
} else {
|
||||
memberIds.add(-1);
|
||||
queryList.add(Restrictions.in("vipMember.memberId", memberIds));
|
||||
}
|
||||
}
|
||||
if (searchFilter.getsSearch3() != null && StringUtils.isNotBlank(searchFilter.getsSearch3())) {
|
||||
queryList.add(Restrictions.eq("certificateMaturityTime",IfishUtil.StrToDate(searchFilter.getsSearch3())));
|
||||
}
|
||||
if (searchFilter.getsSearch4() != null && StringUtils.isNotBlank(searchFilter.getsSearch4())) {
|
||||
queryList.add(Restrictions.eq("certificateApplyTime",IfishUtil.StrToDate(searchFilter.getsSearch4())));
|
||||
}
|
||||
orderList.add(Order.asc("certificateMaturityTime"));
|
||||
Pagination<VipCompany> page = this.vipCompanyDao.findByCriteria(iDisplayStart, iDisplayLength, orderList, queryList.toArray(new Criterion[queryList.size()]));
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveOrUpdateVipCompany(VipCompany vipCompany, String userName) {
|
||||
Integer companyId = vipCompany.getCompanyId();
|
||||
if (companyId != null) {
|
||||
VipCompany vipCompanyUpdate = this.vipCompanyDao.get(companyId);
|
||||
VipMember vipMember = this.vipMemberDao.get(vipCompany.getVipMember().getMemberId());
|
||||
vipCompanyUpdate.setVipMember(vipMember);
|
||||
vipCompanyUpdate.setCertificateCard(vipCompany.getCertificateCard());
|
||||
vipCompanyUpdate.setCertificateLevel(vipCompany.getCertificateLevel());
|
||||
vipCompanyUpdate.setCertificateType(vipCompany.getCertificateType());
|
||||
vipCompanyUpdate.setCertificateApplyTime(vipCompany.getCertificateApplyTime());
|
||||
vipCompanyUpdate.setCertificateMaturityTime(vipCompany.getCertificateMaturityTime());
|
||||
vipCompanyUpdate.setOpenticketTime(vipCompany.getOpenticketTime());
|
||||
vipCompanyUpdate.setOutcardTime(vipCompany.getOutcardTime());
|
||||
vipCompanyUpdate.setAnnualReviewTime(vipCompany.getAnnualReviewTime());
|
||||
vipCompanyUpdate.setCost(vipCompany.getCost());
|
||||
vipCompanyUpdate.setModifyUser(userName);
|
||||
vipCompanyUpdate.setModifyTime(new Date());
|
||||
this.vipCompanyDao.update(vipCompanyUpdate);
|
||||
} else {
|
||||
vipCompany.setCreateUser(userName);
|
||||
vipCompany.setCreateTime(new Date());
|
||||
vipCompany.setModifyUser(userName);
|
||||
vipCompany.setModifyTime(new Date());
|
||||
vipCompany.setCertificateStatus("0");
|
||||
this.vipCompanyDao.save(vipCompany);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VipCompany saveOrUpDateVipCompanyByReturn(VipCompany vipCompany, String userName) {
|
||||
Integer companyId = vipCompany.getCompanyId();
|
||||
VipCompany company = null;
|
||||
if (companyId != null) {
|
||||
VipCompany vipCompanyUpdate = this.vipCompanyDao.get(companyId);
|
||||
vipCompanyUpdate.setCertificateCard(vipCompany.getCertificateCard());
|
||||
vipCompanyUpdate.setCertificateLevel(vipCompany.getCertificateLevel());
|
||||
vipCompanyUpdate.setCertificateType(vipCompany.getCertificateType());
|
||||
vipCompanyUpdate.setCertificateApplyTime(vipCompany.getCertificateApplyTime());
|
||||
vipCompanyUpdate.setCertificateMaturityTime(vipCompany.getCertificateMaturityTime());
|
||||
vipCompanyUpdate.setOpenticketTime(vipCompany.getOpenticketTime());
|
||||
vipCompanyUpdate.setOutcardTime(vipCompany.getOutcardTime());
|
||||
vipCompanyUpdate.setAnnualReviewTime(vipCompany.getAnnualReviewTime());
|
||||
vipCompanyUpdate.setCost(vipCompany.getCost());
|
||||
vipCompanyUpdate.setModifyUser(userName);
|
||||
vipCompanyUpdate.setModifyTime(new Date());
|
||||
company = this.vipCompanyDao.update(vipCompanyUpdate);
|
||||
} else {
|
||||
vipCompany.setCreateUser(userName);
|
||||
vipCompany.setCreateTime(new Date());
|
||||
vipCompany.setModifyUser(userName);
|
||||
vipCompany.setModifyTime(new Date());
|
||||
vipCompany.setCertificateStatus("0");
|
||||
company = this.vipCompanyDao.save(vipCompany);
|
||||
}
|
||||
return company;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VipCompany getVipCompany(Integer companyId) {
|
||||
return this.vipCompanyDao.get(companyId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteVipCompany(VipCompany vipCompany, String userName) {
|
||||
vipCompany.setModifyUser(userName);
|
||||
vipCompany.setModifyTime(new Date());
|
||||
vipCompany.setCertificateStatus("1");
|
||||
this.vipCompanyDao.update(vipCompany);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VipCompany> getVipCompanys(Integer memberId) {
|
||||
//查询条件
|
||||
List<Criterion> queryList = new ArrayList<Criterion>();
|
||||
//排序条件
|
||||
List<Order> orderList = new ArrayList<Order>();
|
||||
Integer iDisplayStart = 0;
|
||||
Integer iDisplayLength = 9999;
|
||||
queryList.add(Restrictions.eq("certificateStatus","0"));
|
||||
queryList.add(Restrictions.eq("vipMember.memberId",memberId));
|
||||
|
||||
List<VipCompany> vipCompanies = this.vipCompanyDao.findByCriteria(iDisplayStart, iDisplayLength, orderList, queryList.toArray(new Criterion[queryList.size()])).getList();
|
||||
|
||||
return vipCompanies;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pagination<VipMember> getVipMemberByPage(SearchFilter searchFilter) {
|
||||
//查询条件
|
||||
List<Criterion> queryList = new ArrayList<Criterion>();
|
||||
//排序条件
|
||||
List<Order> orderList = new ArrayList<Order>();
|
||||
//分页
|
||||
Integer iDisplayStart = searchFilter.getiDisplayStart();
|
||||
Integer iDisplayLength = searchFilter.getiDisplayLength();
|
||||
queryList.add(Restrictions.eq("certificateStatus","0"));
|
||||
if (searchFilter.getsSearch1() != null && StringUtils.isNotBlank(searchFilter.getsSearch1())) {
|
||||
queryList.add(Restrictions.like("memberName", "%" + searchFilter.getsSearch1() + "%"));
|
||||
}
|
||||
if ((searchFilter.getsSearch3() != null && StringUtils.isNotBlank(searchFilter.getsSearch3()))
|
||||
&& (searchFilter.getsSearch4() != null && StringUtils.isNotBlank(searchFilter.getsSearch4()))) {
|
||||
|
||||
queryList.add(Restrictions.ge("memberAdmissionTime",IfishUtil.StrToDate(searchFilter.getsSearch3())));
|
||||
queryList.add(Restrictions.le("memberMaturityTime",IfishUtil.StrToDate(searchFilter.getsSearch4())));
|
||||
} else if ((searchFilter.getsSearch3() != null && StringUtils.isNotBlank(searchFilter.getsSearch3()))
|
||||
&& (searchFilter.getsSearch4() == null || StringUtils.isBlank(searchFilter.getsSearch4()))) {
|
||||
|
||||
queryList.add(Restrictions.ge("memberAdmissionTime", IfishUtil.StrToDate(searchFilter.getsSearch3())));
|
||||
} else if (((searchFilter.getsSearch3() == null || StringUtils.isBlank(searchFilter.getsSearch3()))
|
||||
&& (searchFilter.getsSearch4() != null && StringUtils.isNotBlank(searchFilter.getsSearch4())))) {
|
||||
|
||||
queryList.add(Restrictions.le("memberMaturityTime",IfishUtil.StrToDate(searchFilter.getsSearch4())));
|
||||
}
|
||||
if (searchFilter.getsSearch2() != null && StringUtils.isNotBlank(searchFilter.getsSearch2())) {
|
||||
queryList.add(Restrictions.like("memberContact","%" + searchFilter.getsSearch2() + "%"));
|
||||
}
|
||||
|
||||
if (searchFilter.getsSearch5() != null && StringUtils.isNotBlank(searchFilter.getsSearch5())) {
|
||||
queryList.add(Restrictions.eq("memberBirthday",searchFilter.getsSearch5()));
|
||||
}
|
||||
if (searchFilter.getsSearch6() != null && StringUtils.isNotBlank(searchFilter.getsSearch6())) {
|
||||
queryList.add(Restrictions.like("memberTel","%" + searchFilter.getsSearch6() + "%"));
|
||||
}
|
||||
|
||||
if (searchFilter.getSelectField1() != null && StringUtils.isNotBlank(searchFilter.getSelectField1())) {
|
||||
queryList.add(Restrictions.eq("memberQualification",searchFilter.getSelectField1()));
|
||||
}
|
||||
|
||||
|
||||
orderList.add(Order.asc("memberMaturityTime"));
|
||||
Pagination<VipMember> page = this.vipMemberDao.findByCriteria(iDisplayStart, iDisplayLength, orderList, queryList.toArray(new Criterion[queryList.size()]));
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveOrUpdateVipMember(VipMember vipMember, String userName,String companyIds) {
|
||||
Integer referrerId = vipMember.getMemberReferrer().getReferrerId();
|
||||
VipReferrer vipReferrer = this.vipReferrerDao.get(referrerId);
|
||||
Integer typeId = vipMember.getMemberType().getTypeId();
|
||||
VipType vipType = this.vipTypeDao.get(typeId);
|
||||
vipMember.setMemberReferrer(vipReferrer);
|
||||
Integer vipMemberId = vipMember.getMemberId();
|
||||
if (vipMemberId != null) {
|
||||
VipMember vipMemberUpdate = this.vipMemberDao.get(vipMemberId);
|
||||
vipMemberUpdate.setMemberReferrer(vipReferrer);
|
||||
vipMemberUpdate.setMemberType(vipType);
|
||||
vipMemberUpdate.setMemberName(vipMember.getMemberName());
|
||||
vipMemberUpdate.setMemberLegal(vipMember.getMemberLegal());
|
||||
vipMemberUpdate.setMemberLegalCard(vipMember.getMemberLegalCard());
|
||||
vipMemberUpdate.setMemberCard(vipMember.getMemberCard());
|
||||
vipMemberUpdate.setMemberTel(vipMember.getMemberTel());
|
||||
vipMemberUpdate.setMemberQQ(vipMember.getMemberQQ());
|
||||
vipMemberUpdate.setMemberWechat(vipMember.getMemberWechat());
|
||||
vipMemberUpdate.setMemberEmail(vipMember.getMemberEmail());
|
||||
vipMemberUpdate.setMemberAdmissionTime(vipMember.getMemberAdmissionTime());
|
||||
vipMemberUpdate.setMemberMaturityTime(vipMember.getMemberMaturityTime());
|
||||
vipMemberUpdate.setMemberContact(vipMember.getMemberContact());
|
||||
vipMemberUpdate.setMemberContactTel(vipMember.getMemberContactTel());
|
||||
vipMemberUpdate.setMemberContactSituation(vipMember.getMemberContactSituation());
|
||||
vipMemberUpdate.setMemberWebsite(vipMember.getMemberWebsite());
|
||||
vipMemberUpdate.setMemberSituation(vipMember.getMemberSituation());
|
||||
vipMemberUpdate.setMemberBirthday(vipMember.getMemberBirthday());
|
||||
vipMemberUpdate.setMemberAddress(vipMember.getMemberAddress());
|
||||
vipMemberUpdate.setMemberUrl(vipMember.getMemberUrl());
|
||||
vipMemberUpdate.setMemberDemand(vipMember.getMemberDemand());
|
||||
vipMemberUpdate.setMemberItem(vipMember.getMemberItem());
|
||||
vipMemberUpdate.setMemberFee(vipMember.getMemberFee());
|
||||
vipMemberUpdate.setMemberQualification(vipMember.getMemberQualification());
|
||||
vipMemberUpdate.setModifyUser(userName);
|
||||
vipMemberUpdate.setModifyTime(new Date());
|
||||
this.vipMemberDao.update(vipMemberUpdate);
|
||||
} else {
|
||||
vipMember.setMemberReferrer(vipReferrer);
|
||||
vipMember.setMemberType(vipType);
|
||||
vipMember.setCreateUser(userName);
|
||||
vipMember.setCreateTime(new Date());
|
||||
vipMember.setModifyUser(userName);
|
||||
vipMember.setModifyTime(new Date());
|
||||
vipMember.setCertificateStatus("0");
|
||||
VipMember save = this.vipMemberDao.save(vipMember);
|
||||
vipMemberId = save.getMemberId();
|
||||
}
|
||||
|
||||
String[] companys = companyIds.split("_");
|
||||
VipMember vipMemberForCompany = this.vipMemberDao.get(vipMemberId);
|
||||
for (String companyId : companys) {
|
||||
if (StringUtils.isBlank(companyId)) {
|
||||
continue;
|
||||
}
|
||||
VipCompany vipCompany = this.vipCompanyDao.get(Integer.parseInt(companyId));
|
||||
vipCompany.setVipMember(vipMemberForCompany);
|
||||
this.vipCompanyDao.update(vipCompany);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VipMember getVipMember(Integer memberId) {
|
||||
return this.vipMemberDao.get(memberId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteVipMember(VipMember vipMember, String userName) {
|
||||
vipMember.setModifyUser(userName);
|
||||
vipMember.setModifyTime(new Date());
|
||||
vipMember.setCertificateStatus("1");
|
||||
this.vipMemberDao.update(vipMember);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void filesSaveVipMember(InputStream inputStream,String userName) {
|
||||
SimpleDateFormat yyMMdd = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
HSSFWorkbook wk = null;
|
||||
VipMember member = null;
|
||||
VipReferrer referrer = null;
|
||||
VipType type = null;
|
||||
try {
|
||||
wk = new HSSFWorkbook(inputStream);
|
||||
HSSFSheet sheet = wk.getSheetAt(0);
|
||||
int rows = sheet.getLastRowNum();
|
||||
for (int i = 1; i <= rows; i++) {
|
||||
HSSFRow row = sheet.getRow(i);
|
||||
row.getCell(0).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(1).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(2).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(3).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(4).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(5).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(6).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(7).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(8).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(9).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(10).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(11).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(12).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(13).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(14).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(15).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(16).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(17).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(18).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(19).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(20).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(21).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(22).setCellType(Cell.CELL_TYPE_STRING);
|
||||
row.getCell(23).setCellType(Cell.CELL_TYPE_STRING);
|
||||
String memberName = row.getCell(0).getStringCellValue();
|
||||
if (StringUtils.isBlank(memberName)) {
|
||||
break;
|
||||
}
|
||||
String memberLegal = row.getCell(1).getStringCellValue();
|
||||
String memberLegalCard = row.getCell(2).getStringCellValue();
|
||||
String memberReferrer = row.getCell(3).getStringCellValue();
|
||||
String memberType = row.getCell(4).getStringCellValue();
|
||||
String memberCard = row.getCell(5).getStringCellValue();
|
||||
String memberAdmissionTime = row.getCell(6).getStringCellValue();
|
||||
String memberMaturityTime = row.getCell(7).getStringCellValue();
|
||||
String memberContact = row.getCell(8).getStringCellValue();
|
||||
String memberContactTel = row.getCell(9).getStringCellValue();
|
||||
String memberContactSituation = row.getCell(10).getStringCellValue();
|
||||
String memberWebsite = row.getCell(11).getStringCellValue();
|
||||
String memberTel = row.getCell(12).getStringCellValue();
|
||||
String memberQQ = row.getCell(13).getStringCellValue();
|
||||
String memberWechat = row.getCell(14).getStringCellValue();
|
||||
String memberEmail = row.getCell(15).getStringCellValue();
|
||||
String memberSituation = row.getCell(16).getStringCellValue();
|
||||
String memberBirthday = row.getCell(17).getStringCellValue();
|
||||
String memberAddress = row.getCell(18).getStringCellValue();
|
||||
String memberUrl = row.getCell(19).getStringCellValue();
|
||||
String memberDemand = row.getCell(20).getStringCellValue();
|
||||
String memberItem = row.getCell(21).getStringCellValue();
|
||||
String memberFee = row.getCell(22).getStringCellValue();
|
||||
String memberQualification = row.getCell(23).getStringCellValue().equals("是") ? "0" : "1";
|
||||
|
||||
List<VipReferrer> referrers = this.vipReferrerDao.findByProperty(Restrictions.eq("referrerName", memberReferrer));
|
||||
if (referrers.size() > 0) {
|
||||
referrer = referrers.get(0);
|
||||
}
|
||||
List<VipType> types = this.vipTypeDao.findByProperty(Restrictions.eq("typeName", memberType));
|
||||
if (types.size() > 0) {
|
||||
type = types.get(0);
|
||||
}
|
||||
|
||||
member = new VipMember();
|
||||
member.setMemberReferrer(referrer);
|
||||
member.setMemberType(type);
|
||||
member.setMemberName(memberName);
|
||||
member.setMemberLegal(memberLegal);
|
||||
member.setMemberLegalCard(memberLegalCard);
|
||||
member.setMemberCard(memberCard);
|
||||
member.setMemberAdmissionTime(yyMMdd.parse(memberAdmissionTime));
|
||||
member.setMemberMaturityTime(yyMMdd.parse(memberMaturityTime));
|
||||
member.setMemberContact(memberContact);
|
||||
member.setMemberContactTel(memberContactTel);
|
||||
member.setMemberContactSituation(memberContactSituation);
|
||||
member.setMemberWebsite(memberWebsite);
|
||||
member.setMemberTel(memberTel);
|
||||
member.setMemberQQ(memberQQ);
|
||||
member.setMemberWechat(memberWechat);
|
||||
member.setMemberEmail(memberEmail);
|
||||
member.setMemberSituation(memberSituation);
|
||||
member.setMemberBirthday(memberBirthday);
|
||||
member.setMemberAddress(memberAddress);
|
||||
member.setMemberUrl(memberUrl);
|
||||
member.setMemberDemand(memberDemand);
|
||||
member.setMemberItem(memberItem);
|
||||
member.setMemberFee(Double.parseDouble(memberFee));
|
||||
member.setMemberQualification(memberQualification);
|
||||
member.setCreateUser(userName);
|
||||
member.setCreateTime(new Date());
|
||||
member.setModifyUser(userName);
|
||||
member.setModifyTime(new Date());
|
||||
member.setCertificateStatus("0");
|
||||
this.vipMemberDao.save(member);
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveSmsResult(VipSmsResult vipSmsResult) {
|
||||
this.vipSmsResultDao.save(vipSmsResult);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.security.MessageDigest;
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
@@ -44,6 +45,27 @@ public class IfishUtil {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 对象转Map
|
||||
* @param obj
|
||||
* @return
|
||||
*/
|
||||
public static Map<String,Object> objectToMap(Object obj){
|
||||
Map<String,Object> map = new HashMap<String,Object>(1);
|
||||
Class<?> clazz = obj.getClass();
|
||||
Field[] fields = clazz.getDeclaredFields();
|
||||
try {
|
||||
for (Field field : fields) {
|
||||
field.setAccessible(true);
|
||||
map.put(field.getName(),field.get(obj));
|
||||
}
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* Json转Object(JavaBean)
|
||||
*
|
||||
@@ -217,8 +239,6 @@ public class IfishUtil {
|
||||
|
||||
/**
|
||||
* 返回分页数据
|
||||
*
|
||||
* @param str
|
||||
* @return
|
||||
*/
|
||||
public static Object returnPageData(Pagination<?> page, String sEcho) {
|
||||
@@ -300,10 +320,7 @@ public class IfishUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成微信分享页面
|
||||
*
|
||||
* @param title
|
||||
* @param base64
|
||||
* 生成微信分享页
|
||||
* @return
|
||||
*/
|
||||
public static String getHtmlFile(String htmlName, String ueditorTitle, String ueditorContent) {
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.ifish.util;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.aliyuncs.DefaultAcsClient;
|
||||
import com.aliyuncs.IAcsClient;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.QuerySendDetailsRequest;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.QuerySendDetailsResponse;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
|
||||
import com.aliyuncs.exceptions.ClientException;
|
||||
import com.aliyuncs.profile.DefaultProfile;
|
||||
import com.aliyuncs.profile.IClientProfile;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
public class SmsUtil {
|
||||
|
||||
static final String product = "Dysmsapi";
|
||||
|
||||
static final String domain = "dysmsapi.aliyuncs.com";
|
||||
|
||||
static final String accessKeyId = "LTAIpjjQSHAwa917";
|
||||
|
||||
static final String accessKeySecret = "rVjOMfmaE8RAIB2BGT5t5m48GaFSjB";
|
||||
|
||||
static final String signName = "湘治协";
|
||||
|
||||
/**
|
||||
* 短信发送
|
||||
* @param phoneNumbers 手机号码 多个以,隔开
|
||||
* @param templateCode 模板编号
|
||||
* @param param 模板参数
|
||||
* @return
|
||||
* @throws ClientException
|
||||
*/
|
||||
public static SendSmsResponse sendSms(String phoneNumbers,String templateCode,String param) throws ClientException {
|
||||
|
||||
//可自助调整超时时间
|
||||
System.setProperty("sun.net.client.defaultConnectTimeout", "10000");
|
||||
System.setProperty("sun.net.client.defaultReadTimeout", "10000");
|
||||
|
||||
//初始化acsClient,暂不支持region化
|
||||
IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKeyId, accessKeySecret);
|
||||
DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", product, domain);
|
||||
IAcsClient acsClient = new DefaultAcsClient(profile);
|
||||
|
||||
//组装请求对象-具体描述见控制台-文档部分内容
|
||||
SendSmsRequest request = new SendSmsRequest();
|
||||
//必填:待发送手机号
|
||||
request.setPhoneNumbers(phoneNumbers);
|
||||
//必填:短信签名-可在短信控制台中找到
|
||||
request.setSignName(signName);
|
||||
//必填:短信模板-可在短信控制台中找到
|
||||
request.setTemplateCode(templateCode);
|
||||
//可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为
|
||||
request.setTemplateParam(param);
|
||||
|
||||
//hint 此处可能会抛出异常,注意catch
|
||||
SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request);
|
||||
|
||||
return sendSmsResponse;
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws ClientException, InterruptedException {
|
||||
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("title","2018湖南省-布尔根兰州经贸洽谈会");
|
||||
param.put("time","2018年6月14日(周四)上午9:00");
|
||||
param.put("address","华天大酒店(解放东路300号)B座4楼芙蓉A厅");
|
||||
param.put("signTime","8:30-9:00");
|
||||
param.put("contact","胡萧 18907487848");
|
||||
//发短信
|
||||
SendSmsResponse response = sendSms("18521303581","SMS_139242334",param.toJSONString());
|
||||
System.out.println("短信接口返回的数据----------------");
|
||||
System.out.println("Code=" + response.getCode());
|
||||
System.out.println("Message=" + response.getMessage());
|
||||
System.out.println("RequestId=" + response.getRequestId());
|
||||
System.out.println("BizId=" + response.getBizId());
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,28 @@
|
||||
default-lazy-init="true">
|
||||
|
||||
<!-- @Controller注解的使用前提配置 -->
|
||||
<mvc:annotation-driven />
|
||||
<mvc:annotation-driven>
|
||||
<mvc:message-converters register-defaults="true">
|
||||
<bean class="com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter">
|
||||
<property name="supportedMediaTypes">
|
||||
<list>
|
||||
<value>text/html;charset=UTF-8</value>
|
||||
<value>application/json</value>
|
||||
<value>application/xml;charset=UTF-8</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="features">
|
||||
<list>
|
||||
<value>PrettyFormat</value>
|
||||
<value>WriteMapNullValue</value>
|
||||
<value>WriteNullStringAsEmpty</value>
|
||||
<value>WriteNullListAsEmpty</value>
|
||||
<value>DisableCircularReferenceDetect</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
</mvc:message-converters>
|
||||
</mvc:annotation-driven>
|
||||
<!-- 扫描指定包 -->
|
||||
<context:component-scan base-package="com.ifish.ueditor.action,com.ifish.action,com.ifish.exception" />
|
||||
<!-- 静态资源访问,资源缓存一年 -->
|
||||
@@ -29,21 +50,10 @@
|
||||
<property name="prefix" value="/WEB-INF/view/"></property>
|
||||
<property name="suffix" value=".jsp"></property>
|
||||
</bean>
|
||||
<!-- 过滤器 -->
|
||||
<bean id="multipartResolver" class="com.ifish.ueditor.CommonsMultiparResolver">
|
||||
<property name="maxUploadSize" value="3145728"/>
|
||||
<property name="defaultEncoding" value="UTF-8"/>
|
||||
</bean>
|
||||
<!-- 文件上传 -->
|
||||
<!-- <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
|
||||
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
|
||||
<property name="maxUploadSize" value="3145728"/>
|
||||
</bean> -->
|
||||
</bean>
|
||||
<!-- 配置返回Json数据,方法用ResponseBody注解 -->
|
||||
<!-- <bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter">
|
||||
<property name="messageConverters">
|
||||
<list>
|
||||
<bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter" />
|
||||
</list>
|
||||
</property>
|
||||
</bean> -->
|
||||
|
||||
</beans>
|
||||
Binary file not shown.
Binary file not shown.
@@ -23,6 +23,7 @@
|
||||
%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
|
||||
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<meta http-equiv="expires" content="0">
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
<meta http-equiv="Pragma" content="no-cache">
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
//异步提交表单
|
||||
$('#menuForm').ajaxForm(function(data){
|
||||
//弹出ajax请求后的回调结果
|
||||
if(data==true){
|
||||
if(data=="true"){
|
||||
//刷新树
|
||||
loadData();
|
||||
disabledEl(true);
|
||||
@@ -203,7 +203,7 @@
|
||||
"dataType": "json",
|
||||
"cache": false,
|
||||
"success": function(data){
|
||||
if(data==true){
|
||||
if(data=="true"){
|
||||
//刷新树
|
||||
loadData();
|
||||
disabledEl(true);
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
});
|
||||
//修改用户异步提交
|
||||
$('#form-edit').ajaxForm(function(data){
|
||||
if(data==true){
|
||||
if(data=="true"){
|
||||
jAlert('成功!', '提示');
|
||||
}
|
||||
else if(data==false){
|
||||
@@ -240,7 +240,7 @@
|
||||
});
|
||||
//重置密码提交
|
||||
$('#form-reset').ajaxForm(function(data){
|
||||
if(data==true){
|
||||
if(data=="true"){
|
||||
jAlert('成功!', '提示');
|
||||
}
|
||||
else if(data==false){
|
||||
|
||||
@@ -0,0 +1,592 @@
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>单位评价证</title>
|
||||
<!-- css and js -->
|
||||
<%@ include file="../htm/script.jsp" %>
|
||||
<link href="<%=basePath%>static/css/datepicker.css" rel="stylesheet"/>
|
||||
<script src="<%=basePath%>static/js/date-time/bootstrap-datepicker.min.js"></script>
|
||||
<style type="text/css">
|
||||
.important
|
||||
{
|
||||
vertical-align:middle;
|
||||
text-align:right;
|
||||
padding:10px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var dataTable = null;
|
||||
var dataTableMember = null;
|
||||
$(function () {
|
||||
$("#searchTable").find("td:even").addClass("important");
|
||||
$("#searchTable").find("input").addClass("searchClass");
|
||||
$("#searchTable").find("select").addClass("searchClass");
|
||||
|
||||
$("#searchTableMember").find("td:even").addClass("important");
|
||||
$("#searchTableMember").find("input").addClass("searchClass");
|
||||
$("#searchTableMember").find("select").addClass("searchClass");
|
||||
//日期控件
|
||||
$('#sSearch3,#sSearch4,#certificateApplyTime,#certificateMaturityTime,#openticketTime,#outcardTime,#annualReviewTime').datepicker({
|
||||
language: 'zh-CN',
|
||||
format: "yyyy-mm-dd"
|
||||
});
|
||||
//分页
|
||||
dataTable = $("#sample-table-2").dataTable({
|
||||
"sPaginationType": "bootstrap",
|
||||
//"bProcessing": true,
|
||||
"bLengthChange": true,
|
||||
"bFilter": false,
|
||||
"bServerSide": true,//指定从服务器端获取数据
|
||||
"sAjaxSource": "<%=basePath%>page/vip/companyList.do",
|
||||
"fnServerData": returnServerData,
|
||||
"aoColumns": [
|
||||
{"mData": "companyId", "bSortable": false},
|
||||
{"mData": function(vipCompany){
|
||||
return vipCompany.vipMember.memberName;
|
||||
}, "bSortable": false},
|
||||
{"mData": "certificateCard","bSortable": false },
|
||||
{"mData": "certificateLevel", "bSortable": false},
|
||||
{"mData": "certificateType", "bSortable": false},
|
||||
{"mData": function (vipCompany) {
|
||||
var certificateApplyTime = "<div class='label label-light'><b>证书申请时间:" + vipCompany.certificateApplyTime + "</b></div><br>";
|
||||
var certificateMaturityTime = "<div class='label label-light'><b>证书到期时间:" + vipCompany.certificateMaturityTime + "</b></div><br>";
|
||||
return certificateApplyTime + certificateMaturityTime;
|
||||
}, "bSortable": false},
|
||||
{"mData": "openticketTime", "bSortable": false},
|
||||
{"mData": "outcardTime", "bSortable": false},
|
||||
{"mData": "annualReviewTime", "bSortable": false},
|
||||
{"mData": "cost", "bSortable": false},
|
||||
{"mData": function(vipCompany){
|
||||
return '<a onclick="editVipCompany(\''+vipCompany.companyId+'\');" class="label label-primary"><i class="icon-edit"></i></a>'
|
||||
+'<a href="javascript:void(0);" onclick="deleteVipCompany('+vipCompany.companyId+')" class="label label-danger"><span class="icon-trash"></span></a>';
|
||||
},
|
||||
"bSortable": false,
|
||||
"sClass":"center"
|
||||
}
|
||||
],
|
||||
"oLanguage": {
|
||||
"sLengthMenu": "每页显示 _MENU_条",
|
||||
"sZeroRecords": "没有找到符合条件的数据",
|
||||
"sInfo": "当前第 _START_ - _END_ 条 共计 _TOTAL_ 条",
|
||||
"sProcessing": "<img src='<%=basePath%>static/css/images/loading.gif'>",
|
||||
"sInfoEmpty": "木有记录",
|
||||
"sInfoFiltered": "(从 _MAX_ 条记录中过滤)",
|
||||
"sSearch": "",
|
||||
"oPaginate": {
|
||||
"sFirst": "首页",
|
||||
"sPrevious": "前一页",
|
||||
"sNext": "后一页",
|
||||
"sLast": "尾页"
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//单位列表
|
||||
dataTableMember = $("#sample-table-member").dataTable({
|
||||
"sPaginationType": "bootstrap",
|
||||
//"bProcessing": true,
|
||||
"bLengthChange": true,
|
||||
"bFilter": false,
|
||||
"bServerSide": true,//指定从服务器端获取数据
|
||||
"sAjaxSource": "<%=basePath%>page/vip/memberList.do",
|
||||
"fnServerData": returnServerData,
|
||||
"aoColumns": [
|
||||
{"mData": function (vipMember) {
|
||||
return "<input type='radio' name='memberId' value='" + vipMember.memberId + "_" + vipMember.memberName + "' />";
|
||||
}, "bSortable": false},
|
||||
{"mData": "memberName","bSortable": false },
|
||||
{"mData": "memberLegal", "bSortable": false}
|
||||
],
|
||||
"oLanguage": {
|
||||
"sLengthMenu": "每页显示 _MENU_条",
|
||||
"sZeroRecords": "没有找到符合条件的数据",
|
||||
"sInfo": "当前第 _START_ - _END_ 条 共计 _TOTAL_ 条",
|
||||
"sProcessing": "<img src='<%=basePath%>static/css/images/loading.gif'>",
|
||||
"sInfoEmpty": "木有记录",
|
||||
"sInfoFiltered": "(从 _MAX_ 条记录中过滤)",
|
||||
"sSearch": "",
|
||||
"oPaginate": {
|
||||
"sFirst": "首页",
|
||||
"sPrevious": "前一页",
|
||||
"sNext": "后一页",
|
||||
"sLast": "尾页"
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("#sample-table-2_length").append(' <label><a href="javascript:void(0);" id="addVipCompany" class="btn btn-xs btn-primary"><i class="icon-edit"></i><span class="no-text-shadow">新增</span></a></label>');
|
||||
//重置
|
||||
$("#reset").click(function () {
|
||||
var searchClass = $(".searchClass");
|
||||
for (var i = 0; i < searchClass.length; i++) {
|
||||
$(searchClass[i]).val("");
|
||||
}
|
||||
dataTable.fnDraw();
|
||||
});
|
||||
|
||||
$("#addVipCompany").click(function(){
|
||||
$("#companyId").val("");
|
||||
$("input[id$='memberId']").val("");
|
||||
$("input[id$='memberName']").val("");
|
||||
$("#certificateCard").val("");
|
||||
$("#certificateLevel").val("");
|
||||
$("#certificateType").val("");
|
||||
$("#certificateReceiveTime").val("");
|
||||
$("#certificateMaturityTime").val("");
|
||||
$("#openticketTime").val("");
|
||||
$("#outcardTime").val("");
|
||||
$("#annualReviewTime").val("");
|
||||
$("#cost").val("");
|
||||
$("#addOrUpdateSubmitBtn").attr("disabled",false);
|
||||
$("#companyModal").modal("show");
|
||||
});
|
||||
//模态框
|
||||
$('.modal').modal({
|
||||
backdrop: 'static',
|
||||
show: false
|
||||
});
|
||||
//关闭
|
||||
/*$(".closeBtn").click(function () {
|
||||
$('.modal').modal("hide");
|
||||
});*/
|
||||
$("#companyClose,#companyClose1").click(function () {
|
||||
$("#companyModal").modal("hide");
|
||||
});
|
||||
$("#memberClose,#memberClose1").click(function () {
|
||||
$("#memberModal").modal("hide");
|
||||
});
|
||||
|
||||
//自动查询
|
||||
$("#searchTableMember").find("input,select").change(function () {
|
||||
dataTableMember.fnDraw();
|
||||
});
|
||||
|
||||
//自动查询
|
||||
$("#searchTable").find("input,select").change(function () {
|
||||
dataTable.fnDraw();
|
||||
});
|
||||
|
||||
$("#checkMember").click(function () {
|
||||
var member = $("input[name='memberId']:checked").val();
|
||||
var ms = member.split("_");
|
||||
$("input[id$='memberId']").val(ms[0]);
|
||||
$("input[id$='memberName']").val(ms[1]);
|
||||
// $("#vipMember.memberId").val(ms[0]);
|
||||
// $("#vipMember.memberName").val(ms[1]);
|
||||
$("#memberModal").modal("hide");
|
||||
});
|
||||
//会员检索
|
||||
$("#memberSearch").click(function () {
|
||||
$("#memberModal").modal("show");
|
||||
});
|
||||
$("#addOrUpdateSubmitBtn").click(function(){
|
||||
var memberName = $("#vipMember.memberName").val();
|
||||
if(memberName == ""){
|
||||
jAlert('单位不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var certificateCard = $("#certificateCard").val();
|
||||
if(certificateCard == ""){
|
||||
jAlert('证书编号不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var certificateType = $("#certificateType").val();
|
||||
if(certificateType == ""){
|
||||
jAlert('证件类型不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var certificateLevel = $("#certificateLevel").val();
|
||||
if(certificateLevel == ""){
|
||||
jAlert('证书等级不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var certificateReceiveTime = $("#certificateReceiveTime").val();
|
||||
if(certificateReceiveTime == ""){
|
||||
jAlert('证书领取时间不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var certificateMaturityTime = $("#certificateMaturityTime").val();
|
||||
if(certificateMaturityTime == ""){
|
||||
jAlert('证书到期时间不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var openticketTime = $("#openticketTime").val();
|
||||
if(openticketTime == ""){
|
||||
jAlert('开票时间不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var outcardTime = $("#outcardTime").val();
|
||||
if(outcardTime == ""){
|
||||
jAlert('出证时间不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var annualReviewTime = $("#annualReviewTime").val();
|
||||
if(annualReviewTime == ""){
|
||||
jAlert('年审时间不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var cost = $("#cost").val();
|
||||
if(cost == ""){
|
||||
jAlert('费用不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#addOrUpdateSubmitBtn").attr("disabled",true);
|
||||
$("#form-company").submit();
|
||||
});
|
||||
//提交表单
|
||||
$('#form-company').ajaxForm(function(data){
|
||||
//弹出ajax请求后的回调结果
|
||||
if(data=="true"){
|
||||
//刷新当前页面
|
||||
$("#companyModal").modal("hide");
|
||||
jAlert('成功', '提示');
|
||||
$("#addOrUpdateSubmitBtn").attr("disabled",false);
|
||||
refreshTable();
|
||||
}
|
||||
else{
|
||||
//刷新当前页面
|
||||
jAlert('失败', '提示');
|
||||
$("#addOrUpdateSubmitBtn").attr("disabled",false);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function editVipCompany(companyId){
|
||||
$.ajax({
|
||||
"url": "<%=basePath%>page/vip/getCompany.do?rm="+Math.random(),
|
||||
"type": 'POST',
|
||||
"data": {"companyId":companyId},
|
||||
"dataType": "json",
|
||||
"success":function(data){
|
||||
if(data!=null){
|
||||
$("#companyId").val(data.companyId);
|
||||
$("input[id$='memberId']").val(data.vipMember.memberId);
|
||||
$("input[id$='memberName']").val(data.vipMember.memberName);
|
||||
$("#certificateCard").val(data.certificateCard);
|
||||
$("#certificateLevel").val(data.certificateLevel);
|
||||
$("#certificateType").val(data.certificateType);
|
||||
$("#certificateApplyTime").val(data.certificateApplyTime);
|
||||
$("#certificateMaturityTime").val(data.certificateMaturityTime);
|
||||
$("#openticketTime").val(data.openticketTime);
|
||||
$("#outcardTime").val(data.outcardTime);
|
||||
$("#annualReviewTime").val(data.annualReviewTime);
|
||||
$("#cost").val(data.cost);
|
||||
$("#companyModal").modal("show");
|
||||
}
|
||||
else{
|
||||
jAlert('失败', '提示');
|
||||
//刷新当前页
|
||||
refreshTable();
|
||||
}
|
||||
},
|
||||
error:function(){
|
||||
//刷新当前页
|
||||
refreshTable();
|
||||
jAlert('错误', '提示');
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function deleteVipCompany(companyId){
|
||||
jConfirm("确定要删除吗?", '确认对话框', function(bln){
|
||||
if (bln) {
|
||||
$.ajax({
|
||||
url:"<%=basePath%>page/vip/companyDelete.do?rm="+Math.random(),
|
||||
data:{"companyId":companyId},
|
||||
success:function(bln){
|
||||
if(bln){
|
||||
jAlert('成功', '提示');
|
||||
}
|
||||
else{
|
||||
jAlert('失败', '提示');
|
||||
}
|
||||
refreshTable();
|
||||
},
|
||||
error:function(){
|
||||
jAlert('错误', '提示');
|
||||
refreshTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
//服务器返回数据
|
||||
function returnServerData(sSource, aoData, fnCallback) {
|
||||
//查询参数
|
||||
var searchClass = $(".searchClass");
|
||||
for (var i = 0; i < searchClass.length; i++) {
|
||||
var id = $(searchClass[i]).attr("id");
|
||||
var value = $(searchClass[i]).val();
|
||||
aoData.push({"name": id, "value": value});
|
||||
}
|
||||
$.ajax({
|
||||
"url": sSource,
|
||||
"type": "POST",
|
||||
"data": aoData,
|
||||
"dataType": "json",
|
||||
"cache": false,
|
||||
"success": function (json) {
|
||||
fnCallback(json);
|
||||
}
|
||||
});
|
||||
}
|
||||
//刷新当前页
|
||||
function refreshTable() {
|
||||
var iDisplayStart = dataTable.fnSettings()._iDisplayStart;
|
||||
var iDisplayLength = dataTable.fnSettings()._iDisplayLength;
|
||||
var pageNum = (iDisplayStart + iDisplayLength) / iDisplayLength;
|
||||
dataTable.fnPageChange(--pageNum, true);
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- 头部 -->
|
||||
<%@ include file="../htm/header.jsp" %>
|
||||
<!-- 主体 -->
|
||||
<div class="main-container" id="main-container">
|
||||
<script type="text/javascript">
|
||||
try {
|
||||
ace.settings.check('main-container', 'fixed')
|
||||
} catch (e) {
|
||||
}
|
||||
</script>
|
||||
<div class="main-container-inner">
|
||||
<!-- 侧边栏 -->
|
||||
<%@ include file="../htm/sidebar.jsp" %>
|
||||
<!-- 主体内容 -->
|
||||
<div class="main-content">
|
||||
<div class="breadcrumbs" id="breadcrumbs">
|
||||
<script type="text/javascript">
|
||||
try {
|
||||
ace.settings.check('breadcrumbs', 'fixed')
|
||||
} catch (e) {
|
||||
}
|
||||
</script>
|
||||
<ul class="breadcrumb">
|
||||
<li>
|
||||
<i class="icon-home home-icon"></i>
|
||||
<a href="<%=basePath%>page/public/index.do">首页</a>
|
||||
</li>
|
||||
<li class="active">单位评价证列表</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="page-content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="table-header"></div>
|
||||
<div class="table-responsive">
|
||||
<table id="searchTable" class="col-xs-12">
|
||||
<tr>
|
||||
<td>
|
||||
<label>单位名称</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id='sSearch1' name="sSearch1" class="input-medium" value="" />
|
||||
</td>
|
||||
<td>
|
||||
<label>证书到期时间</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id='sSearch3' name="sSearch3" class="input-medium" value="" maxlength='20'/>
|
||||
</td>
|
||||
<td>
|
||||
<label>证书申请时间</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id='sSearch4' name="sSearch4" class="input-medium" value="" maxlength='20'/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="12" style="text-align:center;">
|
||||
<button type="button" class="btn btn-sm btn-info" onclick="refreshTable();" style="margin-right:20px;"><i class="icon-refresh"></i>刷新</button>
|
||||
<button id="reset" type="reset" class="btn btn-sm btn-info" style="margin-right:20px;"><i class="icon-undo"></i>重置</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="sample-table-2" class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="center">ID</th>
|
||||
<th>单位名称</th>
|
||||
<th>证书编号</th>
|
||||
<th>证书等级</th>
|
||||
<th>证书类型</th>
|
||||
<th>证书时间</th>
|
||||
<th>开票时间</th>
|
||||
<th>出证时间</th>
|
||||
<th>年审时间</th>
|
||||
<th>费用</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form action="<%=basePath%>page/vip/companyAddOrUpdate.do" class="form-horizontal" method="post" id="form-company">
|
||||
<div class="modal fade" id="companyModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" id="companyClose" class="closeBtn close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">单位评价证</h4>
|
||||
</div>
|
||||
<div class="modal-body row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">单位名称<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="hidden" name="companyId" id="companyId" value=""/>
|
||||
<input type="hidden" name="vipMember.memberId" id="vipMember.memberId" value=""/>
|
||||
<input type="text" name="vipMember.memberName" id="vipMember.memberName" class="form-control" value="" readonly maxlength="50"/>
|
||||
<button type="button" class="btn btn-sm btn-info" id="memberSearch" style="margin-right:20px;">检索</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">证书编号<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" name="certificateCard" id="certificateCard" class="form-control" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">证书等级<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" name="certificateLevel" id="certificateLevel" class="form-control" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">证书类型<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" name="certificateType" id="certificateType" class="form-control" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">证书申请时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='certificateApplyTime' name="certificateApplyTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">证书到期时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='certificateMaturityTime' name="certificateMaturityTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">开票时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='openticketTime' name="openticketTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">出证时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='outcardTime' name="outcardTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">年审时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='annualReviewTime' name="annualReviewTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">费用<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" name="cost" id="cost" class="input-medium" maxlength="50" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" id="companyClose1" class="closeBtn btn btn-default">关闭</button>
|
||||
<button type="button" id="addOrUpdateSubmitBtn" class="btn btn-primary">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="modal fade" id="memberModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" id="memberClose" class="closeBtn close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">单位列表</h4>
|
||||
</div>
|
||||
<div class="modal-body row">
|
||||
<div class="page-content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="table-header"></div>
|
||||
<div class="table-responsive">
|
||||
<table id="searchTableMember" class="col-xs-12">
|
||||
<tr>
|
||||
<td>
|
||||
<label>单位名称</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="sSearch2" id='sSearch2' class="input-medium" value="" />
|
||||
</td>
|
||||
<td>
|
||||
<label>法人名称</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="sSearch5" id='sSearch5' class="input-medium" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="sample-table-member" class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="center">选择</th>
|
||||
<th>单位名称</th>
|
||||
<th>法人代表</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" id="memberClose1" class="closeBtn btn btn-default">关闭</button>
|
||||
<button type="button" id="checkMember" class="btn btn-primary">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 设置工具 -->
|
||||
<%@ include file="../htm/setting.jsp" %>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,520 @@
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>会员信息</title>
|
||||
<!-- css and js -->
|
||||
<%@ include file="../htm/script.jsp" %>
|
||||
<link href="<%=basePath%>static/css/datepicker.css" rel="stylesheet"/>
|
||||
<script src="<%=basePath%>static/js/date-time/bootstrap-datepicker.min.js"></script>
|
||||
<style type="text/css">
|
||||
.important
|
||||
{
|
||||
vertical-align:middle;
|
||||
text-align:right;
|
||||
padding:10px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var dataTable = null;
|
||||
$(function () {
|
||||
$("#searchTable").find("td:even").addClass("important");
|
||||
$("#searchTable").find("input").addClass("searchClass");
|
||||
$("#searchTable").find("select").addClass("searchClass");
|
||||
|
||||
$("#searchTableMember").find("td:even").addClass("important");
|
||||
$("#searchTableMember").find("input").addClass("searchClass");
|
||||
$("#searchTableMember").find("select").addClass("searchClass");
|
||||
//日期控件
|
||||
$('#sSearch3,#sSearch4').datepicker({
|
||||
language: 'zh-CN',
|
||||
format: "yyyy-mm-dd"
|
||||
});
|
||||
$('#sSearch5').datepicker({
|
||||
language: 'zh-CN',
|
||||
format: "mm-dd"
|
||||
});
|
||||
//分页
|
||||
dataTable = $("#sample-table-2").dataTable({
|
||||
"sPaginationType": "bootstrap",
|
||||
//"bProcessing": true,
|
||||
"bLengthChange": true,
|
||||
"bFilter": false,
|
||||
"bServerSide": true,//指定从服务器端获取数据
|
||||
"sAjaxSource": "<%=basePath%>page/vip/memberList.do",
|
||||
"fnServerData": returnServerData,
|
||||
"aoColumns": [
|
||||
{"mData": function (vipMember) {
|
||||
return '<input type="checkbox" name="checkMember" value=' + vipMember.memberId + "_" + vipMember.memberTel + ' >';
|
||||
}, "bSortable": false},
|
||||
{"mData": "memberName","bSortable": false },
|
||||
{"mData": "memberLegal","bSortable": false },
|
||||
{"mData": "memberTel","bSortable": false },
|
||||
{"mData": "memberWechat","bSortable": false },
|
||||
{"mData": function (vipMember) {
|
||||
return vipMember.memberType.typeName;
|
||||
}, "bSortable": false},
|
||||
{"mData": "memberAdmissionTime", "bSortable": false},
|
||||
{"mData": "memberMaturityTime", "bSortable": false},
|
||||
{"mData": "memberContact", "bSortable": false},
|
||||
{"mData": "memberContactTel", "bSortable": false},
|
||||
{"mData": function (vipMember) {
|
||||
return vipMember.memberReferrer.referrerName;
|
||||
}, "bSortable": false},
|
||||
{"mData": "memberAddress", "bSortable": false},
|
||||
{"mData": "memberFee", "bSortable": false},
|
||||
{"mData": function(vipMember){
|
||||
return '<a href="javascript:void(0);" onclick="sendSms(\''+vipMember.memberId + '_' + vipMember.memberTel+'\')" class="label label-large"><span class="icon-comment"></span></a>'+
|
||||
'<a href="javascript:void(0);" onclick="editVipMember(\''+vipMember.memberId+'\');" class="label label-primary"><i class="icon-edit"></i></a>'+
|
||||
'<a href="javascript:void(0);" onclick="deleteVipMember(\''+vipMember.memberId+'\')" class="label label-danger"><span class="icon-trash"></span></a>';
|
||||
},
|
||||
"bSortable": false,
|
||||
"sClass":"center"
|
||||
}
|
||||
],
|
||||
"oLanguage": {
|
||||
"sLengthMenu": "每页显示 _MENU_条",
|
||||
"sZeroRecords": "没有找到符合条件的数据",
|
||||
"sInfo": "当前第 _START_ - _END_ 条 共计 _TOTAL_ 条",
|
||||
"sProcessing": "<img src='<%=basePath%>static/css/images/loading.gif'>",
|
||||
"sInfoEmpty": "木有记录",
|
||||
"sInfoFiltered": "(从 _MAX_ 条记录中过滤)",
|
||||
"sSearch": "",
|
||||
"oPaginate": {
|
||||
"sFirst": "首页",
|
||||
"sPrevious": "前一页",
|
||||
"sNext": "后一页",
|
||||
"sLast": "尾页"
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#sample-table-2_length").append(' <label><a href="javascript:void(0);" id="addVipCompany" class="btn btn-default btn-sm"><i class="icon-edit"></i><span class="no-text-shadow">新增</span></a></label>');
|
||||
$("#sample-table-2_length").append(' <label><a href="javascript:void(0);" id="sendSms" class="btn btn-default btn-sm"><i class="icon-comment"></i><span class="no-text-shadow">发送短信</span></a></label>');
|
||||
$("#sample-table-2_length").append(' <label><a href="javascript:void(0);" id="templateDownload" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-cloud-download"></i><span class="no-text-shadow">模板下载</span></a></label>');
|
||||
$("#sample-table-2_length").append(' <label><a href="javascript:void(0);" id="export" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-cloud-download"></i><span class="no-text-shadow">导出</span></a></label>');
|
||||
$("#sample-table-2_length").append(' <label><a href="javascript:void(0);" id="import" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-cloud-download"></i><span class="no-text-shadow">导入</span></a></label>');
|
||||
|
||||
//重置
|
||||
$("#reset").click(function () {
|
||||
var searchClass = $(".searchClass");
|
||||
for (var i = 0; i < searchClass.length; i++) {
|
||||
$(searchClass[i]).val("");
|
||||
}
|
||||
dataTable.fnDraw();
|
||||
});
|
||||
|
||||
$("#addVipCompany").click(function(){
|
||||
window.location.href = "<%=basePath%>page/vip/gotoMemberAdd.do";
|
||||
});
|
||||
//模态框
|
||||
$('.modal').modal({
|
||||
backdrop: 'static',
|
||||
show: false
|
||||
});
|
||||
|
||||
//自动查询
|
||||
$("#searchTable").find("input,select").change(function () {
|
||||
dataTable.fnDraw();
|
||||
});
|
||||
var isCheckAll = false;
|
||||
$("#checkAll").click(function () {
|
||||
if (isCheckAll) {
|
||||
$('input[type="checkbox"][name="checkMember"]').each(function (item, index) {
|
||||
this.checked = false;
|
||||
});
|
||||
isCheckAll = false;
|
||||
} else {
|
||||
$('input[type="checkbox"][name="checkMember"]').each(function (item, index) {
|
||||
this.checked = true;
|
||||
});
|
||||
isCheckAll = true;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$(".closeBtn").click(function () {
|
||||
$('.modal').modal("hide");
|
||||
});
|
||||
|
||||
$("#sendSms").click(function () {
|
||||
var checkSize = $('input[type=checkbox]:checked').length;
|
||||
if (checkSize == 0) {
|
||||
jAlert("请至少选择一条记录!","提示");
|
||||
return ;
|
||||
}
|
||||
$("#oneTel").val("");
|
||||
$("#arrTel").val("");
|
||||
$("#vipSmsModal").modal("show");
|
||||
var type_ = $("#smsType").val();
|
||||
if (type_ == 'SMS_139242334') {
|
||||
$('div[id^=SMS_139242320]').each(function (item, index) {
|
||||
$(this).hide();
|
||||
});
|
||||
$('div[id^=SMS_139242334]').each(function (item, index) {
|
||||
$(this).show();
|
||||
});
|
||||
} else {
|
||||
$('div[id^=SMS_139242334]').each(function (item, index) {
|
||||
$(this).hide();
|
||||
});
|
||||
$('div[id^=SMS_139242320]').each(function (item, index) {
|
||||
$(this).show();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$("#smsType").change(function () {
|
||||
var type_ = $("#smsType").val();
|
||||
if (type_ == 'SMS_139242334') {
|
||||
$('div[id^=SMS_139242320]').each(function (item, index) {
|
||||
$(this).hide();
|
||||
});
|
||||
$('div[id^=SMS_139242334]').each(function (item, index) {
|
||||
$(this).show();
|
||||
});
|
||||
} else {
|
||||
$('div[id^=SMS_139242334]').each(function (item, index) {
|
||||
$(this).hide();
|
||||
});
|
||||
$('div[id^=SMS_139242320]').each(function (item, index) {
|
||||
$(this).show();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$("#templateDownload").click(function () {
|
||||
$("#templateDownForm").submit();
|
||||
});
|
||||
$("#export").click(function () {
|
||||
$("#exportForm").submit();
|
||||
});
|
||||
$("#import").click(function () {
|
||||
$("#fileUpload").click();
|
||||
});
|
||||
|
||||
$("#addOrUpdateSubmitBtn").click(function(){
|
||||
$('input[type=checkbox]:checked').each(function (item, index) {
|
||||
$("#arrTel").val($("#arrTel").val() + "-" + $(this).val());
|
||||
// alert($(this).val());
|
||||
});
|
||||
|
||||
$("#addOrUpdateSubmitBtn").attr("disabled",true);
|
||||
$("#form-sms").submit();
|
||||
});
|
||||
//提交表单
|
||||
$('#form-sms').ajaxForm(function(data){
|
||||
//弹出ajax请求后的回调结果
|
||||
if(data=="true"){
|
||||
//刷新当前页面
|
||||
$("#vipSmsModal").modal("hide");
|
||||
jAlert('成功', '提示');
|
||||
$("#addOrUpdateSubmitBtn").attr("disabled",false);
|
||||
refreshTable();
|
||||
}
|
||||
else{
|
||||
//刷新当前页面
|
||||
jAlert('失败', '提示');
|
||||
$("#addOrUpdateSubmitBtn").attr("disabled",false);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function deleteVipMember(memberId){
|
||||
jConfirm("确定要删除吗?", '确认对话框', function(bln){
|
||||
if (bln) {
|
||||
$.ajax({
|
||||
url:"<%=basePath%>page/vip/memberDelete.do?rm="+Math.random(),
|
||||
data:{"memberId":memberId},
|
||||
success:function(bln){
|
||||
if(bln){
|
||||
jAlert('成功', '提示');
|
||||
}
|
||||
else{
|
||||
jAlert('失败', '提示');
|
||||
}
|
||||
refreshTable();
|
||||
},
|
||||
error:function(){
|
||||
jAlert('错误', '提示');
|
||||
refreshTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function editVipMember(memberId) {
|
||||
window.location.href = "<%=basePath%>page/vip/gotoMemberUpdate.do?memberId=" + memberId;
|
||||
}
|
||||
//服务器返回数据
|
||||
function returnServerData(sSource, aoData, fnCallback) {
|
||||
//查询参数
|
||||
var searchClass = $(".searchClass");
|
||||
for (var i = 0; i < searchClass.length; i++) {
|
||||
var id = $(searchClass[i]).attr("id");
|
||||
var value = $(searchClass[i]).val();
|
||||
aoData.push({"name": id, "value": value});
|
||||
}
|
||||
$.ajax({
|
||||
"url": sSource,
|
||||
"type": "POST",
|
||||
"data": aoData,
|
||||
"dataType": "json",
|
||||
"cache": false,
|
||||
"success": function (json) {
|
||||
fnCallback(json);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function sendSms(tel) {
|
||||
$("#oneTel").val(tel);
|
||||
$("#vipSmsModal").modal("show");
|
||||
var type_ = $("#smsType").val();
|
||||
if (type_ == 'SMS_139242334') {
|
||||
$('div[id^=SMS_139242320]').each(function (item, index) {
|
||||
$(this).hide();
|
||||
});
|
||||
$('div[id^=SMS_139242334]').each(function (item, index) {
|
||||
$(this).show();
|
||||
});
|
||||
} else {
|
||||
$('div[id^=SMS_139242334]').each(function (item, index) {
|
||||
$(this).hide();
|
||||
});
|
||||
$('div[id^=SMS_139242320]').each(function (item, index) {
|
||||
$(this).show();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function uploadFile() {
|
||||
var file = $("#fileUpload");
|
||||
var fileName = file[0].files[0].name;
|
||||
var suffixName = fileName.substr(fileName.lastIndexOf("."))
|
||||
if (suffixName != '.xls') {
|
||||
jAlert('只能为xls的文件!', '提示');
|
||||
return ;
|
||||
}
|
||||
$("#importForm").submit();
|
||||
}
|
||||
|
||||
//刷新当前页
|
||||
function refreshTable() {
|
||||
var iDisplayStart = dataTable.fnSettings()._iDisplayStart;
|
||||
var iDisplayLength = dataTable.fnSettings()._iDisplayLength;
|
||||
var pageNum = (iDisplayStart + iDisplayLength) / iDisplayLength;
|
||||
dataTable.fnPageChange(--pageNum, true);
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- 头部 -->
|
||||
<%@ include file="../htm/header.jsp" %>
|
||||
<!-- 主体 -->
|
||||
<div class="main-container" id="main-container">
|
||||
<script type="text/javascript">
|
||||
try {
|
||||
ace.settings.check('main-container', 'fixed')
|
||||
} catch (e) {
|
||||
}
|
||||
</script>
|
||||
<div class="main-container-inner">
|
||||
<!-- 侧边栏 -->
|
||||
<%@ include file="../htm/sidebar.jsp" %>
|
||||
<!-- 主体内容 -->
|
||||
<div class="main-content">
|
||||
<div class="breadcrumbs" id="breadcrumbs">
|
||||
<script type="text/javascript">
|
||||
try {
|
||||
ace.settings.check('breadcrumbs', 'fixed')
|
||||
} catch (e) {
|
||||
}
|
||||
</script>
|
||||
<ul class="breadcrumb">
|
||||
<li>
|
||||
<i class="icon-home home-icon"></i>
|
||||
<a href="<%=basePath%>page/public/index.do">首页</a>
|
||||
</li>
|
||||
<li class="active">会员信息列表</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="page-content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="table-header"></div>
|
||||
<div class="table-responsive">
|
||||
<table id="searchTable" class="col-xs-12">
|
||||
<tr>
|
||||
<td>
|
||||
<label>单位名称</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id='sSearch1' name="sSearch1" class="input-medium" value="" />
|
||||
</td>
|
||||
<td>
|
||||
<label>入会时间</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id='sSearch3' name="sSearch3" class="input-medium" value="" maxlength='20'/>-<input type="text" id='sSearch4' name="sSearch4" class="input-medium" value="" maxlength='20'/>
|
||||
</td>
|
||||
<td>
|
||||
<label>手机号码</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id='sSearch6' name="sSearch6" class="input-medium" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label>联系人</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id='sSearch2' name="sSearch2" class="input-medium" value="" />
|
||||
</td>
|
||||
<td>
|
||||
<label>是否有环保资质</label>
|
||||
</td>
|
||||
<td>
|
||||
<select id="selectField1" name="selectField1" class="input-medium">
|
||||
<option value="">请选择</option>
|
||||
<option value="0">是</option>
|
||||
<option value="1">否</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<label>生日</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id='sSearch5' name="sSearch5" class="input-medium" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="12" style="text-align:center;">
|
||||
<button type="button" class="btn btn-sm btn-info" onclick="refreshTable();" style="margin-right:20px;"><i class="icon-refresh"></i>刷新</button>
|
||||
<button id="reset" type="reset" class="btn btn-sm btn-info" style="margin-right:20px;"><i class="icon-undo"></i>重置</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="sample-table-2" class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th><input type="checkbox" name="checkAll" id="checkAll" onclick=""/> 全选</th>
|
||||
<th>单位名称</th>
|
||||
<th>法人代表</th>
|
||||
<th>手机号码</th>
|
||||
<th>微信</th>
|
||||
<th>会员类型</th>
|
||||
<th>入会时间</th>
|
||||
<th>到期时间</th>
|
||||
<th>联系人</th>
|
||||
<th>联系电话</th>
|
||||
<th>推荐人</th>
|
||||
<th>单位地址</th>
|
||||
<th>会费</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form id="templateDownForm" action="<%=basePath%>page/vip/downloadMemberImportTemplateToExcel.do"></form>
|
||||
<form id="exportForm" action="<%=basePath%>page/vip/downloadMemberExportToExcel.do"></form>
|
||||
<div style="display: none;">
|
||||
<form id="importForm" action="<%=basePath%>page/vip/downloadMemberImportToExcel.do" method="post" enctype="multipart/form-data">
|
||||
<input type="file" id="fileUpload" onchange="uploadFile();" name="fileUpload" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<form action="<%=basePath%>page/vip/sendSms.do" class="form-horizontal" method="post" id="form-sms">
|
||||
<input type="hidden" id="oneTel" name="oneTel" />
|
||||
<input type="hidden" id="arrTel" name="arrTel" />
|
||||
<div class="modal fade" id="vipSmsModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="closeBtn close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">短信发送</h4>
|
||||
</div>
|
||||
<div class="modal-body row">
|
||||
<div class="col-xs-12">
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">短信类型<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<select id="smsType" name="smsType" class="form-control">
|
||||
<option value="SMS_139242320">生日</option>
|
||||
<option value="SMS_139242334">活动通知</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4" id="SMS_139242320_smsTel_space"></div>
|
||||
<div class="form-group" id="SMS_139242320_smsTel">
|
||||
<label class="col-xs-2 control-label no-padding-right">秘书处电话<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='smsTel' name="smsTel" class="input-medium" value="0731-84476408" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="space-4" id="SMS_139242334_smsTitle_space"></div>
|
||||
<div class="form-group" id="SMS_139242334_smsTitle">
|
||||
<label class="col-xs-2 control-label no-padding-right">会议名称<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='smsTitle' name="smsTitle" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4" id="SMS_139242334_smsTime_space"></div>
|
||||
<div class="form-group" id="SMS_139242334_smsTime">
|
||||
<label class="col-xs-2 control-label no-padding-right">会议时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='smsTime' name="smsTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4" id="SMS_139242334_smsAddress_space"></div>
|
||||
<div class="form-group" id="SMS_139242334_smsAddress">
|
||||
<label class="col-xs-2 control-label no-padding-right">会议地址<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='smsAddress' name="smsAddress" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4" id="SMS_139242334_smsSignTime_space"></div>
|
||||
<div class="form-group" id="SMS_139242334_smsSignTime">
|
||||
<label class="col-xs-2 control-label no-padding-right">签到时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='smsSignTime' name="smsSignTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4" id="SMS_139242334_smsContact_space"></div>
|
||||
<div class="form-group" id="SMS_139242334_smsContact">
|
||||
<label class="col-xs-2 control-label no-padding-right">联系人及电话<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='smsContact' name="smsContact" class="input-medium" value="胡萧" maxlength='20'/>
|
||||
<input type="text" id='smsContactTel' name="smsContactTel" class="input-medium" value="18907487848" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="closeBtn btn btn-default">关闭</button>
|
||||
<button type="button" id="addOrUpdateSubmitBtn" class="btn btn-primary">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- 设置工具 -->
|
||||
<%@ include file="../htm/setting.jsp" %>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,781 @@
|
||||
<%@ page language="java" pageEncoding="utf-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>会员新增</title>
|
||||
<!-- css and js -->
|
||||
<%@ include file="../htm/script.jsp" %>
|
||||
<link href="<%=basePath%>static/css/datepicker.css" rel="stylesheet"/>
|
||||
<script src="<%=basePath%>static/js/date-time/bootstrap-datepicker.min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataTableReferrer = null;
|
||||
$(function(){
|
||||
$("#searchTableReferrer").find("td:even").addClass("important");
|
||||
$("#searchTableReferrer").find("input").addClass("searchClass");
|
||||
$("#searchTableReferrer").find("select").addClass("searchClass");
|
||||
|
||||
//日期控件
|
||||
$('#memberAdmissionTime,#memberMaturityTime,#referrerAdmissionTime,#certificateApplyTime,#certificateMaturityTime,#openticketTime,#outcardTime,#annualReviewTime').datepicker({
|
||||
language: 'zh-CN',
|
||||
format: "yyyy-mm-dd"
|
||||
});
|
||||
//日期控件
|
||||
$('#memberBirthday').datepicker({
|
||||
language: 'zh-CN',
|
||||
format: "mm-dd"
|
||||
});
|
||||
$("#saveBtn").attr("disabled",false);
|
||||
//模态框
|
||||
$('.modal').modal({
|
||||
backdrop:'static',
|
||||
show:false
|
||||
});
|
||||
//关闭
|
||||
$(".closeBtn").click(function(){
|
||||
$('.modal').modal("hide");
|
||||
});
|
||||
//分页
|
||||
dataTableReferrer = $("#dataTableReferrer").dataTable({
|
||||
"sPaginationType": "bootstrap",
|
||||
//"bProcessing": true,
|
||||
"bLengthChange": true,
|
||||
"bFilter": false,
|
||||
"bServerSide": true,//指定从服务器端获取数据
|
||||
"sAjaxSource": "<%=basePath%>page/vip/referrerList.do",
|
||||
"fnServerData": returnServerData,
|
||||
"aoColumns": [
|
||||
{"mData": function (vipReferrer) {
|
||||
return '<input type="radio" id="memberReferrer.referrerId" name="memberReferrer.referrerId1" value=' + vipReferrer.referrerId + ' >';
|
||||
}, "bSortable": false},
|
||||
{"mData": "referrerName", "bSortable": false},
|
||||
{"mData": function(vipReferrer) {
|
||||
return vipReferrer.referrerType.typeName;
|
||||
},"bSortable": false },
|
||||
{"mData": "referrerAdmissionTime", "bSortable": false},
|
||||
{"mData": "referrerRemark", "bSortable": false}
|
||||
],
|
||||
"oLanguage": {
|
||||
"sLengthMenu": "每页显示 _MENU_条",
|
||||
"sZeroRecords": "没有找到符合条件的数据",
|
||||
"sInfo": "当前第 _START_ - _END_ 条 共计 _TOTAL_ 条",
|
||||
"sProcessing": "<img src='<%=basePath%>static/css/images/loading.gif'>",
|
||||
"sInfoEmpty": "木有记录",
|
||||
"sInfoFiltered": "(从 _MAX_ 条记录中过滤)",
|
||||
"sSearch": "",
|
||||
"oPaginate": {
|
||||
"sFirst": "首页",
|
||||
"sPrevious": "前一页",
|
||||
"sNext": "后一页",
|
||||
"sLast": "尾页"
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//自动查询
|
||||
$("#searchTableReferrer").find("input,select").change(function () {
|
||||
dataTableReferrer.fnDraw();
|
||||
});
|
||||
//重置
|
||||
$("#resetReferrer").click(function () {
|
||||
var searchClass = $(".searchClass");
|
||||
for (var i = 0; i < searchClass.length; i++) {
|
||||
$(searchClass[i]).val("");
|
||||
}
|
||||
dataTableReferrer.fnDraw();
|
||||
});
|
||||
|
||||
$("#addVipReferrer").click(function(){
|
||||
$("#referrerId").val("");
|
||||
$("#referrerName").val("");
|
||||
$("#referrerAdmissionTime").val("");
|
||||
$("#referrerRemark").val("");
|
||||
$("#referrerSubmitBtn").attr("disabled",false);
|
||||
$("#referrerModal").modal("show");
|
||||
});
|
||||
|
||||
$("#referrerSubmitBtn").click(function(){
|
||||
var referrerName = $("#referrerName").val();
|
||||
if(referrerName == ""){
|
||||
jAlert('推荐人名称不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var referrerAdmissionTime = $("#referrerAdmissionTime").val();
|
||||
if(referrerAdmissionTime == ""){
|
||||
jAlert('推荐人入会时间不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
$("#addOrUpdateSubmitBtn").attr("disabled",true);
|
||||
$("#form-referrer").submit();
|
||||
});
|
||||
//提交表单
|
||||
$('#form-referrer').ajaxForm(function(data){
|
||||
//弹出ajax请求后的回调结果
|
||||
if(data=="true"){
|
||||
//刷新当前页面
|
||||
$("#referrerModal").modal("hide");
|
||||
jAlert('成功', '提示');
|
||||
$("#referrerSubmitBtn").attr("disabled",false);
|
||||
refreshTableReferrer();
|
||||
}
|
||||
else{
|
||||
//刷新当前页面
|
||||
jAlert('失败', '提示');
|
||||
$("#referrerSubmitBtn").attr("disabled",false);
|
||||
}
|
||||
});
|
||||
|
||||
$("#addVipCompany").click(function(){
|
||||
$("#companyId").val("");
|
||||
$("#certificateCard").val("");
|
||||
$("#certificateLevel").val("");
|
||||
$("#certificateType").val("");
|
||||
$("#certificateReceiveTime").val("");
|
||||
$("#certificateMaturityTime").val("");
|
||||
$("#openticketTime").val("");
|
||||
$("#outcardTime").val("");
|
||||
$("#annualReviewTime").val("");
|
||||
$("#cost").val("");
|
||||
$("#addOrUpdateCompanySubmitBtn").attr("disabled",false);
|
||||
$("#companyModal").modal("show");
|
||||
});
|
||||
|
||||
$("#companyClose1").click(function () {
|
||||
$("#companyModal").modal("hide");
|
||||
});
|
||||
|
||||
|
||||
$("#addOrUpdateCompanySubmitBtn").click(function(){
|
||||
var certificateCard = $("#certificateCard").val();
|
||||
if(certificateCard == ""){
|
||||
jAlert('证书编号不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var certificateType = $("#certificateType").val();
|
||||
if(certificateType == ""){
|
||||
jAlert('证件类型不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var certificateLevel = $("#certificateLevel").val();
|
||||
if(certificateLevel == ""){
|
||||
jAlert('证书等级不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var certificateReceiveTime = $("#certificateReceiveTime").val();
|
||||
if(certificateReceiveTime == ""){
|
||||
jAlert('证书领取时间不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var certificateMaturityTime = $("#certificateMaturityTime").val();
|
||||
if(certificateMaturityTime == ""){
|
||||
jAlert('证书到期时间不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var openticketTime = $("#openticketTime").val();
|
||||
if(openticketTime == ""){
|
||||
jAlert('开票时间不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var outcardTime = $("#outcardTime").val();
|
||||
if(outcardTime == ""){
|
||||
jAlert('出证时间不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var annualReviewTime = $("#annualReviewTime").val();
|
||||
if(annualReviewTime == ""){
|
||||
jAlert('年审时间不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var cost = $("#cost").val();
|
||||
if(cost == ""){
|
||||
jAlert('费用不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
$("#addOrUpdateCompanySubmitBtn").attr("disabled",true);
|
||||
$("#form-company").submit();
|
||||
});
|
||||
//提交表单
|
||||
$('#form-company').ajaxForm(function(data){
|
||||
//弹出ajax请求后的回调结果
|
||||
var _data = eval("(" + data + ")");
|
||||
alert(_data);
|
||||
alert(_data.companyId);
|
||||
if(_data.companyId != null && _data.companyId != 'undefined'){
|
||||
//刷新当前页面
|
||||
$("#companyModal").modal("hide");
|
||||
jAlert('成功', '提示');
|
||||
$("#addOrUpdateCompanySubmitBtn").attr("disabled",false);
|
||||
var ids = $("#companyIds").val().split("_");
|
||||
alert(ids);
|
||||
var b = true;
|
||||
ids.forEach(function (val,index) {
|
||||
if (val == _data.companyId) {
|
||||
b = false;
|
||||
}
|
||||
})
|
||||
if (b) {
|
||||
$("#companyIds").val($("#companyIds").val() + "_" +_data.companyId);
|
||||
var companyContentHtml = "<tr id='"+_data.companyId+"' class='odd'>" +
|
||||
"<td>"+ _data.certificateCard +"</td>" +
|
||||
"<td>"+ _data.certificateLevel +"</td>" +
|
||||
"<td>"+ _data.certificateType +"</td>" +
|
||||
"<td>"+ _data.certificateApplyTime +"</td>" +
|
||||
"<td>"+ _data.certificateMaturityTime +"</td>" +
|
||||
"<td>"+ _data.openticketTime +"</td>" +
|
||||
"<td>"+ _data.outcardTime +"</td>" +
|
||||
"<td>"+ _data.annualReviewTime +"</td>" +
|
||||
"<td>"+ _data.cost +"</td>" +
|
||||
"<td>" + '<a onclick="editVipCompany(\''+_data.companyId+'\');" class="label label-primary"><i class="icon-edit"></i></a>'
|
||||
+'<a href="javascript:void(0);" onclick="deleteVipCompany('+_data.companyId+',this)" class="label label-danger"><span class="icon-trash"></span></a>' + "</td>" +
|
||||
"</tr>";
|
||||
$("#companyContent").append(companyContentHtml);
|
||||
} else {
|
||||
var companyTrHtml =
|
||||
"<td>"+ _data.certificateCard +"</td>" +
|
||||
"<td>"+ _data.certificateLevel +"</td>" +
|
||||
"<td>"+ _data.certificateType +"</td>" +
|
||||
"<td>"+ _data.certificateApplyTime +"</td>" +
|
||||
"<td>"+ _data.certificateMaturityTime +"</td>" +
|
||||
"<td>"+ _data.openticketTime +"</td>" +
|
||||
"<td>"+ _data.outcardTime +"</td>" +
|
||||
"<td>"+ _data.annualReviewTime +"</td>" +
|
||||
"<td>"+ _data.cost +"</td>" +
|
||||
"<td>" + '<a onclick="editVipCompany(\''+_data.companyId+'\');" class="label label-primary"><i class="icon-edit"></i></a>'
|
||||
+'<a href="javascript:void(0);" onclick="deleteVipCompany('+_data.companyId+',this)" class="label label-danger"><span class="icon-trash"></span></a>' + "</td>";
|
||||
$("#" + _data.companyId).html(companyTrHtml);
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
//刷新当前页面
|
||||
jAlert('失败', '提示');
|
||||
$("#addOrUpdateCompanySubmitBtn").attr("disabled",false);
|
||||
}
|
||||
});
|
||||
|
||||
$("#memberSubmitBtn").click(function () {
|
||||
var referrerId = $('input[type="radio"][name="memberReferrer.referrerId1"]:checked').val();
|
||||
alert(referrerId);
|
||||
if (referrerId != null && referrerId != 'undefined') {
|
||||
$("#referrerId").val(referrerId);
|
||||
$("#form-add").submit();
|
||||
} else {
|
||||
jAlert('请选择推荐人!', '提示');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//服务器返回数据
|
||||
function returnServerData(sSource, aoData, fnCallback){
|
||||
//查询参数
|
||||
var searchClass = $(".searchClass");
|
||||
for (var i = 0; i < searchClass.length; i++) {
|
||||
var id = $(searchClass[i]).attr("id");
|
||||
var value = $(searchClass[i]).val();
|
||||
aoData.push({"name":id,"value":value});
|
||||
}
|
||||
$.ajax({
|
||||
"url": sSource,
|
||||
"type": "POST",
|
||||
"data": aoData,
|
||||
"dataType": "json",
|
||||
"cache": false,
|
||||
"success": function(json){
|
||||
fnCallback(json);
|
||||
}
|
||||
});
|
||||
}
|
||||
//刷新当前页
|
||||
function refreshTableReferrer(){
|
||||
var iDisplayStart = dataTableReferrer.fnSettings()._iDisplayStart;
|
||||
var iDisplayLength = dataTableReferrer.fnSettings()._iDisplayLength;
|
||||
var pageNum = (iDisplayStart+iDisplayLength)/iDisplayLength;
|
||||
dataTableReferrer.fnPageChange(--pageNum,true);
|
||||
}
|
||||
|
||||
function editVipCompany(companyId){
|
||||
$.ajax({
|
||||
"url": "<%=basePath%>page/vip/getCompany.do?rm="+Math.random(),
|
||||
"type": 'POST',
|
||||
"data": {"companyId":companyId},
|
||||
"dataType": "json",
|
||||
"success":function(data){
|
||||
if(data!=null){
|
||||
$("#companyId").val(data.companyId);
|
||||
$("#certificateCard").val(data.certificateCard);
|
||||
$("#certificateLevel").val(data.certificateLevel);
|
||||
$("#certificateType").val(data.certificateType);
|
||||
$("#certificateApplyTime").val(data.certificateApplyTime);
|
||||
$("#certificateMaturityTime").val(data.certificateMaturityTime);
|
||||
$("#openticketTime").val(data.openticketTime);
|
||||
$("#outcardTime").val(data.outcardTime);
|
||||
$("#annualReviewTime").val(data.annualReviewTime);
|
||||
$("#cost").val(data.cost);
|
||||
$("#companyModal").modal("show");
|
||||
}
|
||||
else{
|
||||
jAlert('失败', '提示');
|
||||
//刷新当前页
|
||||
refreshTable();
|
||||
}
|
||||
},
|
||||
error:function(){
|
||||
//刷新当前页
|
||||
refreshTable();
|
||||
jAlert('错误', '提示');
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function deleteVipCompany(companyId,_this){
|
||||
jConfirm("确定要删除吗?", '确认对话框', function(bln){
|
||||
if (bln) {
|
||||
$.ajax({
|
||||
url:"<%=basePath%>page/vip/companyDelete.do?rm="+Math.random(),
|
||||
data:{"companyId":companyId},
|
||||
success:function(bln){
|
||||
if(bln){
|
||||
$(_this).parent().parent().parent().remove();
|
||||
jAlert('成功', '提示');
|
||||
}
|
||||
else{
|
||||
jAlert('失败', '提示');
|
||||
}
|
||||
},
|
||||
error:function(){
|
||||
jAlert('错误', '提示');
|
||||
refreshTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- 头部 -->
|
||||
<%@ include file="../htm/header.jsp" %>
|
||||
<!-- 主体 -->
|
||||
<div class="main-container" id="main-container">
|
||||
<script type="text/javascript">
|
||||
try{ace.settings.check('main-container' , 'fixed')}catch(e){}
|
||||
</script>
|
||||
<div class="main-container-inner">
|
||||
<!-- 侧边栏 -->
|
||||
<%@ include file="../htm/sidebar.jsp" %>
|
||||
<!-- 主体内容 -->
|
||||
<div class="main-content">
|
||||
<div class="breadcrumbs" id="breadcrumbs">
|
||||
<script type="text/javascript">
|
||||
try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
|
||||
</script>
|
||||
<ul class="breadcrumb">
|
||||
<li>
|
||||
<i class="icon-home home-icon"></i>
|
||||
<a href="<%=basePath%>page/public/index.do">首页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<%=basePath%>page/admin/userList.do">会员信息</a>
|
||||
</li>
|
||||
<li class="active">会员详情</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="page-content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="table-responsive">
|
||||
<h4 class="header smaller lighter blue">会员详情</h4>
|
||||
<div class="page-content">
|
||||
<h4 class="header smaller lighter blue"></h4>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<form id="form-add" method="post" class="form-horizontal" action="<%=basePath%>page/vip/memberAddOrUpdate.do">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">单位名称<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="hidden" name="memberId" id="memberId" value=""/>
|
||||
<input type="hidden" name="companyIds" id="companyIds" value=""/>
|
||||
<input type="hidden" name="memberReferrer.referrerId" id="referrerId" value=""/>
|
||||
<input type="text" name="memberName" id="memberName" value="${vipMember.memberName}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">法人代表<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberLegal" id="memberLegal" value="${vipMember.memberLegal}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">法人身份证号<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberLegalCard" id="memberLegalCard" value="${vipMember.memberLegalCard}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">会员类型<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<select name="memberType.typeId" id="memberType.typeId">
|
||||
<c:forEach items="${vipTypes}" var="vipType">
|
||||
<option value="${vipType.typeId}">${vipType.typeName}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">会员编号<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberCard" id="memberCard" value="${vipMember.memberCard}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">手机<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberTel" id="memberTel" value="${vipMember.memberTel}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">QQ<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberQQ" id="memberQQ" value="${vipMember.memberQQ}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">微信<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberWechat" id="memberWechat" value="${vipMember.memberWechat}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">邮箱<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberEmail" id="memberEmail" value="${vipMember.memberEmail}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">入会时间<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberAdmissionTime" id="memberAdmissionTime" value="${vipMember.memberAdmissionTime}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">到期时间<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberMaturityTime" id="memberMaturityTime" value="${vipMember.memberMaturityTime}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">联系人<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberContact" id="memberContact" value="${vipMember.memberContact}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">联系人电话<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberContactTel" id="memberContactTel" value="${vipMember.memberContactTel}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">联系情况<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<textarea name="memberContactSituation" id="memberContactSituation" class="form-control" required="required" maxlength="200">${vipMember.memberContactSituation }</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">官网是否录入<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberWebsite" id="memberWebsite" value="${vipMember.memberWebsite}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">企业情况<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<textarea name="memberSituation" id="memberSituation" class="form-control" required="required" maxlength="200">${vipMember.memberSituation }</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">生日<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberBirthday" id="memberBirthday" value="${vipMember.memberBirthday}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">单位地址<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberAddress" id="memberAddress" value="${vipMember.memberAddress}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">企业网址<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberUrl" id="memberUrl" value="${vipMember.memberUrl}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">需求信息<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<textarea name="memberDemand" id="memberDemand" class="form-control" required="required" maxlength="200">${vipMember.memberDemand }</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">项目匹配<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberItem" id="memberItem" value="${vipMember.memberItem}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">会费<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberFee" id="memberFee" value="${vipMember.memberFee}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">是否有环保资质<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<select name="memberQualification" id="memberQualification">
|
||||
<option value="0">是</option>
|
||||
<option value="1">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix form-actions">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-info" type="button" id="memberSubmitBtn"><i class="icon-ok bigger-110"></i>提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space"></div>
|
||||
<h4 class="header smaller lighter blue">推荐人列表</h4><label><a href="javascript:void(0);" id="addVipReferrer" class="btn btn-xs btn-primary"><i class="icon-edit"></i><span class="no-text-shadow">新增</span></a></label>
|
||||
<table id="searchTableReferrer" class="col-xs-12">
|
||||
<tr>
|
||||
<td>
|
||||
<label>推荐人名称</label>
|
||||
<input type="text" name="sSearch1" id='sSearch1' class="input-medium" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="12" style="text-align:center;">
|
||||
<button type="button" class="btn btn-sm btn-info" onclick="refreshTableReferrer();" style="margin-right:20px;"><i class="icon-refresh"></i>刷新</button>
|
||||
<button id="resetReferrer" type="reset" class="btn btn-sm btn-info" style="margin-right:20px;"><i class="icon-undo"></i>重置</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="dataTableReferrer" class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>选择</th>
|
||||
<th>推荐人名称</th>
|
||||
<th>推荐人类型</th>
|
||||
<th>入会时间</th>
|
||||
<th>备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div class="space"></div>
|
||||
<h4 class="header smaller lighter blue">单位评价证列表</h4><label><a href="javascript:void(0);" id="addVipCompany" class="btn btn-xs btn-primary"><i class="icon-edit"></i><span class="no-text-shadow">新增</span></a></label>
|
||||
<table id="dataTableCompany" class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>证书编号</th>
|
||||
<th>证书等级</th>
|
||||
<th>证书类型</th>
|
||||
<th>证书申请时间</th>
|
||||
<th>证书到期时间</th>
|
||||
<th>开票时间</th>
|
||||
<th>出证时间</th>
|
||||
<th>年审时间</th>
|
||||
<th>费用</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody role="alert" id="companyContent" aria-live="polite" aria-relevant="all">
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<form action="<%=basePath%>page/vip/referrerAddOrUpdate.do" class="form-horizontal" method="post" id="form-referrer">
|
||||
<div class="modal fade" id="referrerModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="closeBtn close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">推荐人信息</h4>
|
||||
</div>
|
||||
<div class="modal-body row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">推荐人姓名<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" name="referrerName" id="referrerName" class="form-control" maxlength="50"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">推荐人类型<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<select id="referrerType" name="referrerType.typeId" class="form-control">
|
||||
<option value="">请选择</option>
|
||||
<c:forEach items="${vipTypes}" var="vipType">
|
||||
<option value="${vipType.typeId}">${vipType.typeName}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">入会时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='referrerAdmissionTime' name="referrerAdmissionTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">备注</label>
|
||||
<div class="col-xs-8">
|
||||
<textarea rows="3" cols="10" name="referrerRemark" id="referrerRemark" class="form-control" maxlength="50" required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="closeBtn btn btn-default">关闭</button>
|
||||
<button type="button" id="referrerSubmitBtn" class="btn btn-primary">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<form action="<%=basePath%>page/vip/companyAddOrUpdateByReturn.do" class="form-horizontal" method="post" id="form-company">
|
||||
<div class="modal fade" id="companyModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" id="companyClose" class="closeBtn close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">单位评价证</h4>
|
||||
</div>
|
||||
<div class="modal-body row">
|
||||
<div class="col-xs-12">
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">证书编号<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="hidden" name="companyId" id="companyId" value=""/>
|
||||
<input type="text" name="certificateCard" id="certificateCard" class="form-control" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">证书等级<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" name="certificateLevel" id="certificateLevel" class="form-control" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">证书类型<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" name="certificateType" id="certificateType" class="form-control" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">证书申请时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='certificateApplyTime' name="certificateApplyTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">证书到期时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='certificateMaturityTime' name="certificateMaturityTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">开票时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='openticketTime' name="openticketTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">出证时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='outcardTime' name="outcardTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">年审时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='annualReviewTime' name="annualReviewTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">费用<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" name="cost" id="cost" class="input-medium" maxlength="50" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" id="companyClose1" class="closeBtn btn btn-default">关闭</button>
|
||||
<button type="button" id="addOrUpdateCompanySubmitBtn" class="btn btn-primary">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 设置工具 -->
|
||||
<%@ include file="../htm/setting.jsp" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,816 @@
|
||||
<%@ page language="java" pageEncoding="utf-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>会员编辑</title>
|
||||
<!-- css and js -->
|
||||
<%@ include file="../htm/script.jsp" %>
|
||||
<link href="<%=basePath%>static/css/datepicker.css" rel="stylesheet"/>
|
||||
<script src="<%=basePath%>static/js/date-time/bootstrap-datepicker.min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataTableReferrer = null;
|
||||
$(function(){
|
||||
$("#searchTableReferrer").find("td:even").addClass("important");
|
||||
$("#searchTableReferrer").find("input").addClass("searchClass");
|
||||
$("#searchTableReferrer").find("select").addClass("searchClass");
|
||||
|
||||
//日期控件
|
||||
$('#memberAdmissionTime,#memberMaturityTime,#referrerAdmissionTime,#certificateApplyTime,#certificateMaturityTime,#openticketTime,#outcardTime,#annualReviewTime').datepicker({
|
||||
language: 'zh-CN',
|
||||
format: "yyyy-mm-dd"
|
||||
});
|
||||
//日期控件
|
||||
$('#memberBirthday').datepicker({
|
||||
language: 'zh-CN',
|
||||
format: "mm-dd"
|
||||
});
|
||||
$("#saveBtn").attr("disabled",false);
|
||||
//模态框
|
||||
$('.modal').modal({
|
||||
backdrop:'static',
|
||||
show:false
|
||||
});
|
||||
//关闭
|
||||
$(".closeBtn").click(function(){
|
||||
$('.modal').modal("hide");
|
||||
});
|
||||
//分页
|
||||
dataTableReferrer = $("#dataTableReferrer").dataTable({
|
||||
"sPaginationType": "bootstrap",
|
||||
//"bProcessing": true,
|
||||
"bLengthChange": true,
|
||||
"bFilter": false,
|
||||
"bServerSide": true,//指定从服务器端获取数据
|
||||
"sAjaxSource": "<%=basePath%>page/vip/referrerList.do",
|
||||
"fnServerData": returnServerData,
|
||||
"aoColumns": [
|
||||
{"mData": function (vipReferrer) {
|
||||
return '<input type="radio" id="memberReferrer.referrerId" name="memberReferrer.referrerId1" value=' + vipReferrer.referrerId + ' >';
|
||||
}, "bSortable": false},
|
||||
{"mData": "referrerName", "bSortable": false},
|
||||
{"mData": function(vipReferrer) {
|
||||
return vipReferrer.referrerType.typeName;
|
||||
},"bSortable": false },
|
||||
{"mData": "referrerAdmissionTime", "bSortable": false},
|
||||
{"mData": "referrerRemark", "bSortable": false}
|
||||
],
|
||||
"oLanguage": {
|
||||
"sLengthMenu": "每页显示 _MENU_条",
|
||||
"sZeroRecords": "没有找到符合条件的数据",
|
||||
"sInfo": "当前第 _START_ - _END_ 条 共计 _TOTAL_ 条",
|
||||
"sProcessing": "<img src='<%=basePath%>static/css/images/loading.gif'>",
|
||||
"sInfoEmpty": "木有记录",
|
||||
"sInfoFiltered": "(从 _MAX_ 条记录中过滤)",
|
||||
"sSearch": "",
|
||||
"oPaginate": {
|
||||
"sFirst": "首页",
|
||||
"sPrevious": "前一页",
|
||||
"sNext": "后一页",
|
||||
"sLast": "尾页"
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//自动查询
|
||||
$("#searchTableReferrer").find("input,select").change(function () {
|
||||
dataTableReferrer.fnDraw();
|
||||
});
|
||||
//重置
|
||||
$("#resetReferrer").click(function () {
|
||||
var searchClass = $(".searchClass");
|
||||
for (var i = 0; i < searchClass.length; i++) {
|
||||
$(searchClass[i]).val("");
|
||||
}
|
||||
dataTableReferrer.fnDraw();
|
||||
});
|
||||
|
||||
$("#addVipReferrer").click(function(){
|
||||
$("#referrerId").val("");
|
||||
$("#referrerName").val("");
|
||||
$("#referrerAdmissionTime").val("");
|
||||
$("#referrerRemark").val("");
|
||||
$("#referrerSubmitBtn").attr("disabled",false);
|
||||
$("#referrerModal").modal("show");
|
||||
});
|
||||
|
||||
$("#referrerSubmitBtn").click(function(){
|
||||
var referrerName = $("#referrerName").val();
|
||||
if(referrerName == ""){
|
||||
jAlert('推荐人名称不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var referrerAdmissionTime = $("#referrerAdmissionTime").val();
|
||||
if(referrerAdmissionTime == ""){
|
||||
jAlert('推荐人入会时间不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
$("#addOrUpdateSubmitBtn").attr("disabled",true);
|
||||
$("#form-referrer").submit();
|
||||
});
|
||||
//提交表单
|
||||
$('#form-referrer').ajaxForm(function(data){
|
||||
//弹出ajax请求后的回调结果
|
||||
if(data=="true"){
|
||||
//刷新当前页面
|
||||
$("#referrerModal").modal("hide");
|
||||
jAlert('成功', '提示');
|
||||
$("#referrerSubmitBtn").attr("disabled",false);
|
||||
refreshTableReferrer();
|
||||
}
|
||||
else{
|
||||
//刷新当前页面
|
||||
jAlert('失败', '提示');
|
||||
$("#referrerSubmitBtn").attr("disabled",false);
|
||||
}
|
||||
});
|
||||
|
||||
$("#addVipCompany").click(function(){
|
||||
$("#companyId").val("");
|
||||
$("#certificateCard").val("");
|
||||
$("#certificateLevel").val("");
|
||||
$("#certificateType").val("");
|
||||
$("#certificateReceiveTime").val("");
|
||||
$("#certificateMaturityTime").val("");
|
||||
$("#openticketTime").val("");
|
||||
$("#outcardTime").val("");
|
||||
$("#annualReviewTime").val("");
|
||||
$("#cost").val("");
|
||||
$("#addOrUpdateCompanySubmitBtn").attr("disabled",false);
|
||||
$("#companyModal").modal("show");
|
||||
});
|
||||
|
||||
$("#companyClose1").click(function () {
|
||||
$("#companyModal").modal("hide");
|
||||
});
|
||||
|
||||
|
||||
$("#addOrUpdateCompanySubmitBtn").click(function(){
|
||||
var certificateCard = $("#certificateCard").val();
|
||||
if(certificateCard == ""){
|
||||
jAlert('证书编号不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var certificateType = $("#certificateType").val();
|
||||
if(certificateType == ""){
|
||||
jAlert('证件类型不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var certificateLevel = $("#certificateLevel").val();
|
||||
if(certificateLevel == ""){
|
||||
jAlert('证书等级不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var certificateReceiveTime = $("#certificateReceiveTime").val();
|
||||
if(certificateReceiveTime == ""){
|
||||
jAlert('证书领取时间不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var certificateMaturityTime = $("#certificateMaturityTime").val();
|
||||
if(certificateMaturityTime == ""){
|
||||
jAlert('证书到期时间不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var openticketTime = $("#openticketTime").val();
|
||||
if(openticketTime == ""){
|
||||
jAlert('开票时间不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var outcardTime = $("#outcardTime").val();
|
||||
if(outcardTime == ""){
|
||||
jAlert('出证时间不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var annualReviewTime = $("#annualReviewTime").val();
|
||||
if(annualReviewTime == ""){
|
||||
jAlert('年审时间不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var cost = $("#cost").val();
|
||||
if(cost == ""){
|
||||
jAlert('费用不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
$("#addOrUpdateCompanySubmitBtn").attr("disabled",true);
|
||||
$("#form-company").submit();
|
||||
});
|
||||
//提交表单
|
||||
$('#form-company').ajaxForm(function(data){
|
||||
//弹出ajax请求后的回调结果
|
||||
var _data = eval("(" + data + ")");
|
||||
if(_data.companyId != null && _data.companyId != 'undefined'){
|
||||
//刷新当前页面
|
||||
$("#companyModal").modal("hide");
|
||||
jAlert('成功', '提示');
|
||||
$("#addOrUpdateCompanySubmitBtn").attr("disabled",false);
|
||||
var ids = $("#companyIds").val().split("_");
|
||||
var b = true;
|
||||
ids.forEach(function (val,index) {
|
||||
if (val == _data.companyId) {
|
||||
b = false;
|
||||
}
|
||||
})
|
||||
if (b) {
|
||||
$("#companyIds").val($("#companyIds").val() + "_" +_data.companyId);
|
||||
var companyContentHtml = "<tr id='"+_data.companyId+"' class='odd'>" +
|
||||
"<td>"+ _data.certificateCard +"</td>" +
|
||||
"<td>"+ _data.certificateLevel +"</td>" +
|
||||
"<td>"+ _data.certificateType +"</td>" +
|
||||
"<td>"+ _data.certificateApplyTime +"</td>" +
|
||||
"<td>"+ _data.certificateMaturityTime +"</td>" +
|
||||
"<td>"+ _data.openticketTime +"</td>" +
|
||||
"<td>"+ _data.outcardTime +"</td>" +
|
||||
"<td>"+ _data.annualReviewTime +"</td>" +
|
||||
"<td>"+ _data.cost +"</td>" +
|
||||
"<td>" + '<a href="javascript:void(0);" onclick="editVipCompany(\''+_data.companyId+'\');" class="label label-primary"><i class="icon-edit"></i></a>'
|
||||
+'<a href="javascript:void(0);" onclick="deleteVipCompany('+_data.companyId+',this)" class="label label-danger"><span class="icon-trash"></span></a>' + "</td>" +
|
||||
"</tr>";
|
||||
$("#companyContent").append(companyContentHtml);
|
||||
} else {
|
||||
var companyTrHtml =
|
||||
"<td>"+ _data.certificateCard +"</td>" +
|
||||
"<td>"+ _data.certificateLevel +"</td>" +
|
||||
"<td>"+ _data.certificateType +"</td>" +
|
||||
"<td>"+ _data.certificateApplyTime +"</td>" +
|
||||
"<td>"+ _data.certificateMaturityTime +"</td>" +
|
||||
"<td>"+ _data.openticketTime +"</td>" +
|
||||
"<td>"+ _data.outcardTime +"</td>" +
|
||||
"<td>"+ _data.annualReviewTime +"</td>" +
|
||||
"<td>"+ _data.cost +"</td>" +
|
||||
"<td>" + '<a href="javascript:void(0);" onclick="editVipCompany(\''+_data.companyId+'\');" class="label label-primary"><i class="icon-edit"></i></a>'
|
||||
+'<a href="javascript:void(0);" onclick="deleteVipCompany('+_data.companyId+',this)" class="label label-danger"><span class="icon-trash"></span></a>' + "</td>";
|
||||
$("#" + _data.companyId).html(companyTrHtml);
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
//刷新当前页面
|
||||
jAlert('失败', '提示');
|
||||
$("#addOrUpdateCompanySubmitBtn").attr("disabled",false);
|
||||
}
|
||||
});
|
||||
|
||||
$("#memberSubmitBtn").click(function () {
|
||||
var referrerId = $('input[type="radio"][name="memberReferrer.referrerId1"]:checked').val();
|
||||
if (referrerId != null && referrerId != 'undefined') {
|
||||
$("#referrerId").val(referrerId);
|
||||
$("#form-add").submit();
|
||||
} else {
|
||||
jAlert('请选择推荐人!', '提示');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//服务器返回数据
|
||||
function returnServerData(sSource, aoData, fnCallback){
|
||||
//查询参数
|
||||
var searchClass = $(".searchClass");
|
||||
for (var i = 0; i < searchClass.length; i++) {
|
||||
var id = $(searchClass[i]).attr("id");
|
||||
var value = $(searchClass[i]).val();
|
||||
aoData.push({"name":id,"value":value});
|
||||
}
|
||||
$.ajax({
|
||||
"url": sSource,
|
||||
"type": "POST",
|
||||
"data": aoData,
|
||||
"dataType": "json",
|
||||
"cache": false,
|
||||
"success": function(json){
|
||||
fnCallback(json);
|
||||
}
|
||||
});
|
||||
}
|
||||
//刷新当前页
|
||||
function refreshTableReferrer(){
|
||||
var iDisplayStart = dataTableReferrer.fnSettings()._iDisplayStart;
|
||||
var iDisplayLength = dataTableReferrer.fnSettings()._iDisplayLength;
|
||||
var pageNum = (iDisplayStart+iDisplayLength)/iDisplayLength;
|
||||
dataTableReferrer.fnPageChange(--pageNum,true);
|
||||
}
|
||||
|
||||
function editVipCompany(companyId){
|
||||
$.ajax({
|
||||
"url": "<%=basePath%>page/vip/getCompany.do?rm="+Math.random(),
|
||||
"type": 'POST',
|
||||
"data": {"companyId":companyId},
|
||||
"dataType": "json",
|
||||
"success":function(data){
|
||||
if(data!=null){
|
||||
$("#companyId").val(data.companyId);
|
||||
$("#certificateCard").val(data.certificateCard);
|
||||
$("#certificateLevel").val(data.certificateLevel);
|
||||
$("#certificateType").val(data.certificateType);
|
||||
$("#certificateApplyTime").val(data.certificateApplyTime);
|
||||
$("#certificateMaturityTime").val(data.certificateMaturityTime);
|
||||
$("#openticketTime").val(data.openticketTime);
|
||||
$("#outcardTime").val(data.outcardTime);
|
||||
$("#annualReviewTime").val(data.annualReviewTime);
|
||||
$("#cost").val(data.cost);
|
||||
$("#companyModal").modal("show");
|
||||
}
|
||||
else{
|
||||
jAlert('失败', '提示');
|
||||
//刷新当前页
|
||||
refreshTable();
|
||||
}
|
||||
},
|
||||
error:function(){
|
||||
//刷新当前页
|
||||
refreshTable();
|
||||
jAlert('错误', '提示');
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function deleteVipCompany(companyId,_this){
|
||||
jConfirm("确定要删除吗?", '确认对话框', function(bln){
|
||||
if (bln) {
|
||||
$.ajax({
|
||||
url:"<%=basePath%>page/vip/companyDelete.do?rm="+Math.random(),
|
||||
data:{"companyId":companyId},
|
||||
success:function(bln){
|
||||
if(bln){
|
||||
$(_this).parent().parent().remove();
|
||||
jAlert('成功', '提示');
|
||||
}
|
||||
else{
|
||||
jAlert('失败', '提示');
|
||||
}
|
||||
},
|
||||
error:function(){
|
||||
jAlert('错误', '提示');
|
||||
refreshTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- 头部 -->
|
||||
<%@ include file="../htm/header.jsp" %>
|
||||
<!-- 主体 -->
|
||||
<div class="main-container" id="main-container">
|
||||
<script type="text/javascript">
|
||||
try{ace.settings.check('main-container' , 'fixed')}catch(e){}
|
||||
</script>
|
||||
<div class="main-container-inner">
|
||||
<!-- 侧边栏 -->
|
||||
<%@ include file="../htm/sidebar.jsp" %>
|
||||
<!-- 主体内容 -->
|
||||
<div class="main-content">
|
||||
<div class="breadcrumbs" id="breadcrumbs">
|
||||
<script type="text/javascript">
|
||||
try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
|
||||
</script>
|
||||
<ul class="breadcrumb">
|
||||
<li>
|
||||
<i class="icon-home home-icon"></i>
|
||||
<a href="<%=basePath%>page/public/index.do">首页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<%=basePath%>page/admin/userList.do">会员信息</a>
|
||||
</li>
|
||||
<li class="active">会员详情</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="page-content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="table-responsive">
|
||||
<h4 class="header smaller lighter blue">会员详情</h4>
|
||||
<div class="page-content">
|
||||
<h4 class="header smaller lighter blue"></h4>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<form id="form-add" method="post" class="form-horizontal" action="<%=basePath%>page/vip/memberAddOrUpdate.do">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">单位名称<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="hidden" name="memberId" id="memberId" value="${vipMember.memberId}"/>
|
||||
<input type="hidden" name="companyIds" id="companyIds" value=""/>
|
||||
<input type="hidden" name="memberReferrer.referrerId" id="referrerId" value=""/>
|
||||
<input type="text" name="memberName" id="memberName" value="${vipMember.memberName}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">法人代表<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberLegal" id="memberLegal" value="${vipMember.memberLegal}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">法人身份证号<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberLegalCard" id="memberLegalCard" value="${vipMember.memberLegalCard}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">会员类型<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<select name="memberType.typeId" id="memberType.typeId">
|
||||
<c:forEach items="${vipTypes}" var="vipType">
|
||||
<option value="${vipType.typeId}">${vipType.typeName}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">会员编号<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberCard" id="memberCard" value="${vipMember.memberCard}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">手机<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberTel" id="memberTel" value="${vipMember.memberTel}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">QQ<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberQQ" id="memberQQ" value="${vipMember.memberQQ}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">微信<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberWechat" id="memberWechat" value="${vipMember.memberWechat}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">邮箱<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberEmail" id="memberEmail" value="${vipMember.memberEmail}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">入会时间<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberAdmissionTime" id="memberAdmissionTime" value="<fmt:formatDate value="${vipMember.memberAdmissionTime}" pattern="yyyy-MM-dd" />" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">到期时间<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberMaturityTime" id="memberMaturityTime" value="<fmt:formatDate value="${vipMember.memberMaturityTime}" pattern="yyyy-MM-dd" />" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">联系人<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberContact" id="memberContact" value="${vipMember.memberContact}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">联系人电话<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberContactTel" id="memberContactTel" value="${vipMember.memberContactTel}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">联系情况<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<textarea name="memberContactSituation" id="memberContactSituation" class="form-control" required="required" maxlength="200">${vipMember.memberContactSituation }</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">官网是否录入<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberWebsite" id="memberWebsite" value="${vipMember.memberWebsite}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">企业情况<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<textarea name="memberSituation" id="memberSituation" class="form-control" required="required" maxlength="200">${vipMember.memberSituation }</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">生日<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberBirthday" id="memberBirthday" value="${vipMember.memberBirthday}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">单位地址<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberAddress" id="memberAddress" value="${vipMember.memberAddress}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">企业网址<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberUrl" id="memberUrl" value="${vipMember.memberUrl}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">需求信息<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<textarea name="memberDemand" id="memberDemand" class="form-control" required="required" maxlength="200">${vipMember.memberDemand }</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">项目匹配<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberItem" id="memberItem" value="${vipMember.memberItem}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">会费<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" name="memberFee" id="memberFee" value="${vipMember.memberFee}" class="form-control" required="required" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">是否有环保资质<span style="color:red;">*</span></label>
|
||||
<div class="col-sm-4">
|
||||
<select name="memberQualification" id="memberQualification">
|
||||
<option value="0" <c:if test="${vipMember.memberQualification == '0'}">selected</c:if>>是</option>
|
||||
<option value="1" <c:if test="${vipMember.memberQualification == '1'}">selected</c:if>>否</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix form-actions">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-info" type="button" id="memberSubmitBtn"><i class="icon-ok bigger-110"></i>提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space"></div>
|
||||
<h4 class="header smaller lighter blue">推荐人列表</h4><label><a href="javascript:void(0);" id="addVipReferrer" class="btn btn-xs btn-primary"><i class="icon-edit"></i><span class="no-text-shadow">新增</span></a></label>
|
||||
<table id="searchTableReferrer" class="col-xs-12">
|
||||
<tr>
|
||||
<td>
|
||||
<label>推荐人名称</label>
|
||||
<input type="text" name="sSearch1" id='sSearch1' class="input-medium" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="12" style="text-align:center;">
|
||||
<button type="button" class="btn btn-sm btn-info" onclick="refreshTableReferrer();" style="margin-right:20px;"><i class="icon-refresh"></i>刷新</button>
|
||||
<button id="resetReferrer" type="reset" class="btn btn-sm btn-info" style="margin-right:20px;"><i class="icon-undo"></i>重置</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="dataTableReferrer" class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>选择</th>
|
||||
<th>推荐人名称</th>
|
||||
<th>推荐人类型</th>
|
||||
<th>入会时间</th>
|
||||
<th>备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<table id="searchTableReferrer1" class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>选择</th>
|
||||
<th>推荐人名称</th>
|
||||
<th>推荐人类型</th>
|
||||
<th>入会时间</th>
|
||||
<th>备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="checkedReferrer">
|
||||
<tr class="odd">
|
||||
<td class="sorting_1">
|
||||
<input type="radio" id="memberReferrer.referrerId" name="memberReferrer.referrerId1" checked value="${vipReferrer.referrerId}">
|
||||
</td>
|
||||
<td class="">${vipReferrer.referrerName}</td>
|
||||
<td class="">${vipReferrer.referrerType.typeName}</td>
|
||||
<td class=""><fmt:formatDate value="${vipReferrer.referrerAdmissionTime}" pattern="yyyy-MM-dd" /></td>
|
||||
<td class="">${vipReferrer.referrerRemark}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="space"></div>
|
||||
<h4 class="header smaller lighter blue">单位评价证列表</h4><label><a href="javascript:void(0);" id="addVipCompany" class="btn btn-xs btn-primary"><i class="icon-edit"></i><span class="no-text-shadow">新增</span></a></label>
|
||||
<table id="dataTableCompany" class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>证书编号</th>
|
||||
<th>证书等级</th>
|
||||
<th>证书类型</th>
|
||||
<th>证书申请时间</th>
|
||||
<th>证书到期时间</th>
|
||||
<th>开票时间</th>
|
||||
<th>出证时间</th>
|
||||
<th>年审时间</th>
|
||||
<th>费用</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody role="alert" id="companyContent" aria-live="polite" aria-relevant="all">
|
||||
<c:forEach var="company" items="${companys}">
|
||||
<tr>
|
||||
<td>${company.certificateCard}</td>
|
||||
<td>${company.certificateLevel}</td>
|
||||
<td>${company.certificateType}</td>
|
||||
<td><fmt:formatDate value="${company.certificateApplyTime}" pattern="yyyy-MM-dd" /></td>
|
||||
<td><fmt:formatDate value="${company.certificateMaturityTime}" pattern="yyyy-MM-dd" /></td>
|
||||
<td><fmt:formatDate value="${company.openticketTime}" pattern="yyyy-MM-dd" /></td>
|
||||
<td><fmt:formatDate value="${company.outcardTime}" pattern="yyyy-MM-dd" /></td>
|
||||
<td><fmt:formatDate value="${company.annualReviewTime}" pattern="yyyy-MM-dd" /></td>
|
||||
<td>${company.cost}</td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" onclick="editVipCompany(${company.companyId});" class="label label-primary"><i class="icon-edit"></i></a>
|
||||
<a href="javascript:void(0);" onclick="deleteVipCompany(${company.companyId},this)" class="label label-danger"><span class="icon-trash"></span></a>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<form action="<%=basePath%>page/vip/referrerAddOrUpdate.do" class="form-horizontal" method="post" id="form-referrer">
|
||||
<div class="modal fade" id="referrerModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="closeBtn close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">推荐人信息</h4>
|
||||
</div>
|
||||
<div class="modal-body row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">推荐人姓名<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" name="referrerName" id="referrerName" class="form-control" maxlength="50"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">推荐人类型<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<select id="referrerType" name="referrerType.typeId" class="form-control">
|
||||
<option value="">请选择</option>
|
||||
<c:forEach items="${vipTypes}" var="vipType">
|
||||
<option value="${vipType.typeId}">${vipType.typeName}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">入会时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='referrerAdmissionTime' name="referrerAdmissionTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">备注</label>
|
||||
<div class="col-xs-8">
|
||||
<textarea rows="3" cols="10" name="referrerRemark" id="referrerRemark" class="form-control" maxlength="50" required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="closeBtn btn btn-default">关闭</button>
|
||||
<button type="button" id="referrerSubmitBtn" class="btn btn-primary">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<form action="<%=basePath%>page/vip/companyAddOrUpdateByReturn.do" class="form-horizontal" method="post" id="form-company">
|
||||
<div class="modal fade" id="companyModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" id="companyClose" class="closeBtn close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">单位评价证</h4>
|
||||
</div>
|
||||
<div class="modal-body row">
|
||||
<div class="col-xs-12">
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">证书编号<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="hidden" name="companyId" id="companyId" value=""/>
|
||||
<input type="text" name="certificateCard" id="certificateCard" class="form-control" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">证书等级<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" name="certificateLevel" id="certificateLevel" class="form-control" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">证书类型<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" name="certificateType" id="certificateType" class="form-control" maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">证书申请时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='certificateApplyTime' name="certificateApplyTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">证书到期时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='certificateMaturityTime' name="certificateMaturityTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">开票时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='openticketTime' name="openticketTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">出证时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='outcardTime' name="outcardTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">年审时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='annualReviewTime' name="annualReviewTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">费用<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" name="cost" id="cost" class="input-medium" maxlength="50" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" id="companyClose1" class="closeBtn btn btn-default">关闭</button>
|
||||
<button type="button" id="addOrUpdateCompanySubmitBtn" class="btn btn-primary">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 设置工具 -->
|
||||
<%@ include file="../htm/setting.jsp" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,456 @@
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>个人评价证</title>
|
||||
<!-- css and js -->
|
||||
<%@ include file="../htm/script.jsp" %>
|
||||
<link href="<%=basePath%>static/css/datepicker.css" rel="stylesheet"/>
|
||||
<script src="<%=basePath%>static/js/date-time/bootstrap-datepicker.min.js"></script>
|
||||
<style type="text/css">
|
||||
.important
|
||||
{
|
||||
vertical-align:middle;
|
||||
text-align:right;
|
||||
padding:10px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var dataTable = null;
|
||||
$(function () {
|
||||
$("#searchTable").find("td:even").addClass("important");
|
||||
$("#searchTable").find("input").addClass("searchClass");
|
||||
$("#searchTable").find("select").addClass("searchClass");
|
||||
//日期控件
|
||||
$('#sSearch3,#sSearch4,#certificateApplyTime,#certificateReceiveTime,#certificateMaturityTime').datepicker({
|
||||
language: 'zh-CN',
|
||||
format: "yyyy-mm-dd"
|
||||
});
|
||||
//分页
|
||||
dataTable = $("#sample-table-2").dataTable({
|
||||
"sPaginationType": "bootstrap",
|
||||
//"bProcessing": true,
|
||||
"bLengthChange": true,
|
||||
"bFilter": false,
|
||||
"bServerSide": true,//指定从服务器端获取数据
|
||||
"sAjaxSource": "<%=basePath%>page/vip/personalList.do",
|
||||
"fnServerData": returnServerData,
|
||||
"aoColumns": [
|
||||
{"mData": "personalId", "bSortable": false},
|
||||
{"mData": "personalName", "bSortable": false},
|
||||
{"mData": "cardNum","bSortable": false },
|
||||
{"mData": "certificateCard", "bSortable": false},
|
||||
{"mData": "certificateLevel", "bSortable": false},
|
||||
{"mData": "certificateType", "bSortable": false},
|
||||
{"mData": function (vipPersonal) {
|
||||
var certificateApplyTime = "<div class='label label-light'><b>证书申请时间:" + vipPersonal.certificateApplyTime + "</b></div><br>";
|
||||
var certificateReceiveTime = "<div class='label label-light'><b>证书领取时间:" + vipPersonal.certificateReceiveTime + "</b></div><br>";
|
||||
var certificateMaturityTime = "<div class='label label-light'><b>证书到期时间:" + vipPersonal.certificateMaturityTime + "</b></div><br>";
|
||||
return certificateApplyTime + certificateReceiveTime + certificateMaturityTime;
|
||||
}, "bSortable": false},
|
||||
{"mData": "uploadWebsite", "bSortable": false},
|
||||
{"mData": "certificateRemark", "bSortable": false},
|
||||
{"mData": function(vipPersonal){
|
||||
return '<a onclick="editVipPersonal(\''+vipPersonal.personalId+'\');" class="label label-primary"><i class="icon-edit"></i></a> '
|
||||
+'<a href="javascript:void(0);" onclick="deleteVipPersonal('+vipPersonal.personalId+')" class="label label-danger"><span class="icon-trash"></span></a>';
|
||||
},
|
||||
"bSortable": false,
|
||||
"sClass":"center"
|
||||
}
|
||||
],
|
||||
"oLanguage": {
|
||||
"sLengthMenu": "每页显示 _MENU_条",
|
||||
"sZeroRecords": "没有找到符合条件的数据",
|
||||
"sInfo": "当前第 _START_ - _END_ 条 共计 _TOTAL_ 条",
|
||||
"sProcessing": "<img src='<%=basePath%>static/css/images/loading.gif'>",
|
||||
"sInfoEmpty": "木有记录",
|
||||
"sInfoFiltered": "(从 _MAX_ 条记录中过滤)",
|
||||
"sSearch": "",
|
||||
"oPaginate": {
|
||||
"sFirst": "首页",
|
||||
"sPrevious": "前一页",
|
||||
"sNext": "后一页",
|
||||
"sLast": "尾页"
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#sample-table-2_length").append(' <label><a href="javascript:void(0);" id="addVipPersonal" class="btn btn-xs btn-primary"><i class="icon-edit"></i><span class="no-text-shadow">新增</span></a></label>');
|
||||
//重置
|
||||
$("#reset").click(function () {
|
||||
var searchClass = $(".searchClass");
|
||||
for (var i = 0; i < searchClass.length; i++) {
|
||||
$(searchClass[i]).val("");
|
||||
}
|
||||
dataTable.fnDraw();
|
||||
});
|
||||
$("#addVipPersonal").click(function(){
|
||||
$("#personalId").val("");
|
||||
$("#personalName").val("");
|
||||
$("#cardNum").val("");
|
||||
$("#certificateCard").val("");
|
||||
$("#certificateLevel").val("");
|
||||
$("#certificateType").val("");
|
||||
$("#certificateApplyTime").val("");
|
||||
$("#certificateReceiveTime").val("");
|
||||
$("#certificateMaturityTime").val("");
|
||||
$("#uploadWebsite").val("");
|
||||
$("#certificateRemark").val("");
|
||||
$("#addOrUpdateSubmitBtn").attr("disabled",false);
|
||||
$("#personalModal").modal("show");
|
||||
});
|
||||
//模态框
|
||||
$('.modal').modal({
|
||||
backdrop: 'static',
|
||||
show: false
|
||||
});
|
||||
//关闭
|
||||
$(".closeBtn").click(function () {
|
||||
$('.modal').modal("hide");
|
||||
});
|
||||
//自动查询
|
||||
$("#searchTable").find("input,select").change(function () {
|
||||
dataTable.fnDraw();
|
||||
});
|
||||
$("#addOrUpdateSubmitBtn").click(function(){
|
||||
var personalName = $("#personalName").val();
|
||||
if(personalName == ""){
|
||||
jAlert('姓名不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var cardNum = $("#cardNum").val();
|
||||
if(cardNum == ""){
|
||||
jAlert('身份证号不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var certificateType = $("#certificateType").val();
|
||||
if(certificateType == ""){
|
||||
jAlert('证件类型不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var certificateLevel = $("#certificateLevel").val();
|
||||
if(certificateLevel == ""){
|
||||
jAlert('证书等级不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var certificateCard = $("#certificateCard").val();
|
||||
if(certificateCard == ""){
|
||||
jAlert('证书编号不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var certificateApplyTime = $("#certificateApplyTime").val();
|
||||
if(certificateApplyTime == ""){
|
||||
jAlert('证书申请时间不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var certificateReceiveTime = $("#certificateReceiveTime").val();
|
||||
if(certificateReceiveTime == ""){
|
||||
jAlert('证书领取时间不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var certificateMaturityTime = $("#certificateMaturityTime").val();
|
||||
if(certificateMaturityTime == ""){
|
||||
jAlert('证书到期时间不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#addOrUpdateSubmitBtn").attr("disabled",true);
|
||||
$("#form-personal").submit();
|
||||
});
|
||||
//提交表单
|
||||
$('#form-personal').ajaxForm(function(data){
|
||||
//弹出ajax请求后的回调结果
|
||||
if(data=="true"){
|
||||
//刷新当前页面
|
||||
$("#personalModal").modal("hide");
|
||||
jAlert('成功', '提示');
|
||||
$("#addOrUpdateSubmitBtn").attr("disabled",false);
|
||||
refreshTable();
|
||||
}
|
||||
else{
|
||||
//刷新当前页面
|
||||
jAlert('失败', '提示');
|
||||
$("#addOrUpdateSubmitBtn").attr("disabled",false);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function editVipPersonal(personalId){
|
||||
$.ajax({
|
||||
"url": "<%=basePath%>page/vip/getPersonal.do?rm="+Math.random(),
|
||||
"type": 'POST',
|
||||
"data": {"personalId":personalId},
|
||||
"dataType": "json",
|
||||
"success":function(data){
|
||||
if(data!=null){
|
||||
$("#personalId").val(data.personalId);
|
||||
$("#personalName").val(data.personalName);
|
||||
$("#cardNum").val(data.cardNum);
|
||||
$("#certificateCard").val(data.certificateCard);
|
||||
$("#certificateLevel").val(data.certificateLevel);
|
||||
$("#certificateType").val(data.certificateType);
|
||||
$("#certificateApplyTime").val(data.certificateApplyTime);
|
||||
$("#certificateReceiveTime").val(data.certificateReceiveTime);
|
||||
$("#certificateMaturityTime").val(data.certificateMaturityTime);
|
||||
$("#uploadWebsite").val(data.uploadWebsite);
|
||||
$("#certificateRemark").val(data.certificateRemark);
|
||||
$("#personalModal").modal("show");
|
||||
}
|
||||
else{
|
||||
jAlert('失败', '提示');
|
||||
//刷新当前页
|
||||
refreshTable();
|
||||
}
|
||||
},
|
||||
error:function(){
|
||||
//刷新当前页
|
||||
refreshTable();
|
||||
jAlert('错误', '提示');
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function deleteVipPersonal(personalId){
|
||||
jConfirm("确定要删除吗?", '确认对话框', function(bln){
|
||||
if (bln) {
|
||||
$.ajax({
|
||||
url:"<%=basePath%>page/vip/personalDelete.do?rm="+Math.random(),
|
||||
data:{"personalId":personalId},
|
||||
success:function(bln){
|
||||
if(bln){
|
||||
jAlert('成功', '提示');
|
||||
}
|
||||
else{
|
||||
jAlert('失败', '提示');
|
||||
}
|
||||
refreshTable();
|
||||
},
|
||||
error:function(){
|
||||
jAlert('错误', '提示');
|
||||
refreshTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
//服务器返回数据
|
||||
function returnServerData(sSource, aoData, fnCallback) {
|
||||
//查询参数
|
||||
var searchClass = $(".searchClass");
|
||||
for (var i = 0; i < searchClass.length; i++) {
|
||||
var id = $(searchClass[i]).attr("id");
|
||||
var value = $(searchClass[i]).val();
|
||||
aoData.push({"name": id, "value": value});
|
||||
}
|
||||
$.ajax({
|
||||
"url": sSource,
|
||||
"type": "POST",
|
||||
"data": aoData,
|
||||
"dataType": "json",
|
||||
"cache": false,
|
||||
"success": function (json) {
|
||||
fnCallback(json);
|
||||
}
|
||||
});
|
||||
}
|
||||
//刷新当前页
|
||||
function refreshTable() {
|
||||
var iDisplayStart = dataTable.fnSettings()._iDisplayStart;
|
||||
var iDisplayLength = dataTable.fnSettings()._iDisplayLength;
|
||||
var pageNum = (iDisplayStart + iDisplayLength) / iDisplayLength;
|
||||
dataTable.fnPageChange(--pageNum, true);
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- 头部 -->
|
||||
<%@ include file="../htm/header.jsp" %>
|
||||
<!-- 主体 -->
|
||||
<div class="main-container" id="main-container">
|
||||
<script type="text/javascript">
|
||||
try {
|
||||
ace.settings.check('main-container', 'fixed')
|
||||
} catch (e) {
|
||||
}
|
||||
</script>
|
||||
<div class="main-container-inner">
|
||||
<!-- 侧边栏 -->
|
||||
<%@ include file="../htm/sidebar.jsp" %>
|
||||
<!-- 主体内容 -->
|
||||
<div class="main-content">
|
||||
<div class="breadcrumbs" id="breadcrumbs">
|
||||
<script type="text/javascript">
|
||||
try {
|
||||
ace.settings.check('breadcrumbs', 'fixed')
|
||||
} catch (e) {
|
||||
}
|
||||
</script>
|
||||
<ul class="breadcrumb">
|
||||
<li>
|
||||
<i class="icon-home home-icon"></i>
|
||||
<a href="<%=basePath%>page/public/index.do">首页</a>
|
||||
</li>
|
||||
<li class="active">个人培训证列表</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="page-content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="table-header"></div>
|
||||
<div class="table-responsive">
|
||||
<table id="searchTable" class="col-xs-12">
|
||||
<tr>
|
||||
<td>
|
||||
<label>姓名</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="sSearch1" id='sSearch1' class="input-medium" value="" />
|
||||
</td>
|
||||
<td>
|
||||
<label>身份证号</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="sSearch2" id='sSearch2' class="input-medium" value="" />
|
||||
</td>
|
||||
<td>
|
||||
<label>证书到期时间</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id='sSearch3' name="sSearch3" class="input-medium" maxlength='20'/>
|
||||
</td>
|
||||
<td>
|
||||
<label>证书领取时间</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id='sSearch4' name="sSearch4" class="input-medium" maxlength='20'/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="12" style="text-align:center;">
|
||||
<button type="button" class="btn btn-sm btn-info" onclick="refreshTable();" style="margin-right:20px;"><i class="icon-refresh"></i>刷新</button>
|
||||
<button id="reset" type="reset" class="btn btn-sm btn-info" style="margin-right:20px;"><i class="icon-undo"></i>重置</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="sample-table-2" class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="center">ID</th>
|
||||
<th>姓名</th>
|
||||
<th>身份证号</th>
|
||||
<th>证书编号</th>
|
||||
<th>证书等级</th>
|
||||
<th>证书类型</th>
|
||||
<th>证书时间</th>
|
||||
<th>证书上传官网</th>
|
||||
<th>备注</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form action="<%=basePath%>page/vip/personalAddOrUpdate.do" class="form-horizontal" method="post" id="form-personal">
|
||||
<div class="modal fade" id="personalModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="closeBtn close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">个人培训证</h4>
|
||||
</div>
|
||||
<div class="modal-body row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">姓名<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="hidden" name="personalId" id="personalId" value=""/>
|
||||
<input type="text" name="personalName" id="personalName" class="form-control" maxlength="50"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">身份证号<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" name="cardNum" id="cardNum" class="form-control" maxlength="50"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">证书等级<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" name="certificateLevel" id="certificateLevel" class="form-control" maxlength="50"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">证书类型<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" name="certificateType" id="certificateType" class="form-control" maxlength="50"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">证书编号<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" name="certificateCard" id="certificateCard" class="form-control" maxlength="50"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">证书申请时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='certificateApplyTime' name="certificateApplyTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">证书领取时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='certificateReceiveTime' name="certificateReceiveTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">证书到期时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='certificateMaturityTime' name="certificateMaturityTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">证书上传官网</label>
|
||||
<div class="col-xs-8">
|
||||
<textarea rows="3" cols="10" name="uploadWebsite" id="uploadWebsite" class="form-control" maxlength="50" required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">备注</label>
|
||||
<div class="col-xs-8">
|
||||
<textarea rows="3" cols="10" name="certificateRemark" id="certificateRemark" class="form-control" maxlength="50" required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="closeBtn btn btn-default">关闭</button>
|
||||
<button type="button" id="addOrUpdateSubmitBtn" class="btn btn-primary">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- 设置工具 -->
|
||||
<%@ include file="../htm/setting.jsp" %>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -22,7 +22,7 @@
|
||||
$("#searchTable").find("input").addClass("searchClass");
|
||||
$("#searchTable").find("select").addClass("searchClass");
|
||||
//日期控件
|
||||
$('#sSearch3,#sSearch4').datepicker({
|
||||
$('#sSearch3,#sSearch4,#referrerAdmissionTime').datepicker({
|
||||
language: 'zh-CN',
|
||||
format: "yyyy-mm-dd"
|
||||
});
|
||||
@@ -43,6 +43,7 @@
|
||||
},"bSortable": false },
|
||||
{"mData": "referrerAdmissionTime", "bSortable": false},
|
||||
{"mData": "referrerRemark", "bSortable": false},
|
||||
{"mData": "referrerRemark", "bSortable": false},
|
||||
{"mData": "createUser", "bSortable": false},
|
||||
{"mData": "createTime", "bSortable": false},
|
||||
{"mData": function(vipReferrer){
|
||||
@@ -69,7 +70,7 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#sample-table-2_length").append(' <label><a href="javascript:void(0);" id="addVipType" class="btn btn-xs btn-primary"><i class="icon-edit"></i><span class="no-text-shadow">新增</span></a></label>');
|
||||
$("#sample-table-2_length").append(' <label><a href="javascript:void(0);" id="addVipReferrer" class="btn btn-xs btn-primary"><i class="icon-edit"></i><span class="no-text-shadow">新增</span></a></label>');
|
||||
//重置
|
||||
$("#reset").click(function () {
|
||||
var searchClass = $(".searchClass");
|
||||
@@ -78,6 +79,14 @@
|
||||
}
|
||||
dataTable.fnDraw();
|
||||
});
|
||||
$("#addVipReferrer").click(function(){
|
||||
$("#referrerId").val("");
|
||||
$("#referrerName").val("");
|
||||
$("#referrerAdmissionTime").val("");
|
||||
$("#referrerRemark").val("");
|
||||
$("#addOrUpdateSubmitBtn").attr("disabled",false);
|
||||
$("#referrerModal").modal("show");
|
||||
});
|
||||
//模态框
|
||||
$('.modal').modal({
|
||||
backdrop: 'static',
|
||||
@@ -91,28 +100,91 @@
|
||||
$("#searchTable").find("input,select").change(function () {
|
||||
dataTable.fnDraw();
|
||||
});
|
||||
$("#addOrUpdateSubmitBtn").click(function(){
|
||||
var referrerName = $("#referrerName").val();
|
||||
if(referrerName == ""){
|
||||
jAlert('推荐人名称不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
var referrerAdmissionTime = $("#referrerAdmissionTime").val();
|
||||
if(referrerAdmissionTime == ""){
|
||||
jAlert('推荐人入会时间不能为空!', '提示');
|
||||
return false;
|
||||
}
|
||||
$("#addOrUpdateSubmitBtn").attr("disabled",true);
|
||||
$("#form-referrer").submit();
|
||||
});
|
||||
//提交表单
|
||||
$('#form-referrer').ajaxForm(function(data){
|
||||
//弹出ajax请求后的回调结果
|
||||
if(data=="true"){
|
||||
//刷新当前页面
|
||||
$("#referrerModal").modal("hide");
|
||||
jAlert('成功', '提示');
|
||||
$("#addOrUpdateSubmitBtn").attr("disabled",false);
|
||||
refreshTable();
|
||||
}
|
||||
else{
|
||||
//刷新当前页面
|
||||
jAlert('失败', '提示');
|
||||
$("#addOrUpdateSubmitBtn").attr("disabled",false);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function editVipReferrer(referrerId){
|
||||
$.ajax({
|
||||
"url": "<%=basePath%>page/vip/getReferrer.do?rm="+Math.random(),
|
||||
"type": 'POST',
|
||||
"data": {"referrerId":referrerId},
|
||||
"dataType": "json",
|
||||
"success":function(data){
|
||||
if(data!=null){
|
||||
$("#referrerId").val(data.referrerId);
|
||||
$("#referrerName").val(data.referrerName);
|
||||
$("#referrerType option").each(function() {
|
||||
if ($(this).val() == data.referrerType.typeId) {
|
||||
$(this).attr("selected",true);
|
||||
}
|
||||
});
|
||||
$("#referrerAdmissionTime").val(data.referrerAdmissionTime);
|
||||
$("#referrerRemark").val(data.referrerRemark);
|
||||
$("#referrerModal").modal("show");
|
||||
}
|
||||
else{
|
||||
jAlert('失败', '提示');
|
||||
//刷新当前页
|
||||
refreshTable();
|
||||
}
|
||||
},
|
||||
error:function(){
|
||||
//刷新当前页
|
||||
refreshTable();
|
||||
jAlert('错误', '提示');
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function deleteVipReferrer(referrerId){
|
||||
jConfirm("确定要删除吗?", '确认对话框', function(bln){
|
||||
if (bln) {
|
||||
$.ajax({
|
||||
url:"<%=basePath%>page/vip/referrerDelete.do?rm="+Math.random(),
|
||||
data:{"referrerId":referrerId},
|
||||
success:function(bln){
|
||||
if(bln){
|
||||
jAlert('成功', '提示');
|
||||
}
|
||||
else{
|
||||
jAlert('失败', '提示');
|
||||
}
|
||||
refreshTable();
|
||||
},
|
||||
error:function(){
|
||||
jAlert('错误', '提示');
|
||||
refreshTable();
|
||||
}
|
||||
});
|
||||
url:"<%=basePath%>page/vip/referrerDelete.do?rm="+Math.random(),
|
||||
data:{"referrerId":referrerId},
|
||||
success:function(bln){
|
||||
if(bln){
|
||||
jAlert('成功', '提示');
|
||||
}
|
||||
else{
|
||||
jAlert('失败', '提示');
|
||||
}
|
||||
refreshTable();
|
||||
},
|
||||
error:function(){
|
||||
jAlert('错误', '提示');
|
||||
refreshTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -176,7 +248,7 @@
|
||||
<i class="icon-home home-icon"></i>
|
||||
<a href="<%=basePath%>page/public/index.do">首页</a>
|
||||
</li>
|
||||
<li class="active">用户列表</li>
|
||||
<li class="active">推荐人列表</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="page-content">
|
||||
@@ -190,7 +262,7 @@
|
||||
<label>推荐人名称</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="sSearch1" id='sSearch1' class="input-medium" value="" />
|
||||
<input type="text" name="sSearch1" id='sSearch1' class="input-medium" value="" />
|
||||
</td>
|
||||
<td>
|
||||
<label>入会时间</label>
|
||||
@@ -215,6 +287,7 @@
|
||||
<th>推荐人类型</th>
|
||||
<th>推荐人入会时间</th>
|
||||
<th>备注</th>
|
||||
<th>单位列表</th>
|
||||
<th>创建人</th>
|
||||
<th>创建时间</th>
|
||||
<th>操作</th>
|
||||
@@ -225,55 +298,61 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form action="<%=basePath%>page/admin/updateRemarks.do" class="form-horizontal" method="post" id="form-remarks">
|
||||
<div class="modal fade" id="remarksModal">
|
||||
<form action="<%=basePath%>page/vip/referrerAddOrUpdate.do" class="form-horizontal" method="post" id="form-referrer">
|
||||
<div class="modal fade" id="referrerModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="closeBtn close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">备注</h4>
|
||||
<h4 class="modal-title">推荐人信息</h4>
|
||||
</div>
|
||||
<div class="modal-body row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">备注<span style="color:red;">*</span></label>
|
||||
<label class="col-xs-2 control-label no-padding-right">推荐人姓名<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="hidden" name="userId" id="userId">
|
||||
<textarea name="remarks" id="remarks" rows="5" class="form-control" maxlength="30"></textarea>
|
||||
<input type="hidden" name="referrerId" id="referrerId" value=""/>
|
||||
<input type="text" name="referrerName" id="referrerName" class="form-control" maxlength="50"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">推荐人类型<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<select id="referrerType" name="referrerType.typeId" class="form-control">
|
||||
<option value="">请选择</option>
|
||||
<c:forEach items="${vipTypes}" var="vipType">
|
||||
<option value="${vipType.typeId}">${vipType.typeName}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">入会时间<span style="color:red;">*</span></label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" id='referrerAdmissionTime' name="referrerAdmissionTime" class="input-medium" maxlength='20'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label no-padding-right">备注</label>
|
||||
<div class="col-xs-8">
|
||||
<textarea rows="3" cols="10" name="referrerRemark" id="referrerRemark" class="form-control" maxlength="50" required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="closeBtn btn btn-default">关闭</button>
|
||||
<button type="submit" id="form-remarks-saveBtn" class="btn btn-primary">保存</button>
|
||||
<button type="button" id="addOrUpdateSubmitBtn" class="btn btn-primary">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="modal fade" id="taskModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="closeBtn close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">任务</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table id="taskTable" class="table table-striped table-bordered table-hover">
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="closeBtn btn btn-default">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 设置工具 -->
|
||||
<%@ include file="../htm/setting.jsp" %>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
//提交表单
|
||||
$('#form1').ajaxForm(function(data){
|
||||
//弹出ajax请求后的回调结果
|
||||
if(data==true){
|
||||
if(data=="true"){
|
||||
//刷新当前页面
|
||||
$('.modal').modal("hide");
|
||||
jAlert('成功', '提示');
|
||||
|
||||
Reference in New Issue
Block a user