فهرست منبع

未确认机构

plf 3 سال پیش
والد
کامیت
3f07c741ad

+ 15 - 0
src/main/java/com/caimei/modules/user/dao/ClubTemporaryDao.java

@@ -0,0 +1,15 @@
+package com.caimei.modules.user.dao;
+
+import com.thinkgem.jeesite.common.persistence.CrudDao;
+import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
+import com.caimei.modules.user.entity.ClubTemporary;
+
+/**
+ * 未确认机构DAO接口
+ * @author plf
+ * @version 2021-07-13
+ */
+@MyBatisDao
+public interface ClubTemporaryDao extends CrudDao<ClubTemporary> {
+	
+}

+ 273 - 0
src/main/java/com/caimei/modules/user/entity/ClubTemporary.java

@@ -0,0 +1,273 @@
+package com.caimei.modules.user.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+import org.hibernate.validator.constraints.Length;
+
+import java.util.Date;
+
+/**
+ * 未确认机构Entity
+ *
+ * @author plf
+ * @version 2021-07-13
+ */
+public class ClubTemporary extends DataEntity<ClubTemporary> {
+
+    private static final long serialVersionUID = 1L;
+    private String userId;        // 协销用户Id
+    private String name;        // 机构名称
+    private String shortName;        // 机构简称
+    private String bindMobile;        // 企业绑定手机号
+    private String contractEmail;        // 联系邮箱
+    private String linkMan;        // 联系人
+    private String provinceId;        // 省id
+    private String cityId;        // 市id
+    private String townId;        // 地址Id
+    private String address;        // 地址
+    private String shopPhoto;        // 门头照
+    private String businessLicense;        // 营业执照
+    private String socialCreditCode;        // 统一社会信用代码
+    private String firstClubType;        //  一级分类为医美=1和生美=2
+    private String secondClubType;        // 医美的二级分类为诊所=1、门诊=2、医院=3。  生美没有二级分类
+    private String department;        // 若为医美分类下的门诊和医院则可能需要填写科室
+    private String medicalPracticeLicense;        // 医美分类必须上传医疗执业许可证
+    private String mainProduct;        // 主打项目
+    private String isAgreed;        // 是否同意勾选同意协议,1是,其他否
+    private Date addTime;        // 添加时间
+    private String startTime;     //添加时间开始 查询条件
+    private String endTime;        //添加时间结束  查询条件
+    private String spName;          //协销名称
+    private String town; // 区
+    private String city; // 市
+    private String province; //省
+
+    public ClubTemporary() {
+        super();
+    }
+
+    public ClubTemporary(String id) {
+        super(id);
+    }
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    @Length(min = 0, max = 50, message = "机构名称长度必须介于 0 和 50 之间")
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @Length(min = 0, max = 20, message = "机构简称长度必须介于 0 和 20 之间")
+    public String getShortName() {
+        return shortName;
+    }
+
+    public void setShortName(String shortName) {
+        this.shortName = shortName;
+    }
+
+    @Length(min = 0, max = 20, message = "企业绑定手机号长度必须介于 0 和 20 之间")
+    public String getBindMobile() {
+        return bindMobile;
+    }
+
+    public void setBindMobile(String bindMobile) {
+        this.bindMobile = bindMobile;
+    }
+
+    @Length(min = 0, max = 50, message = "联系邮箱长度必须介于 0 和 50 之间")
+    public String getContractEmail() {
+        return contractEmail;
+    }
+
+    public void setContractEmail(String contractEmail) {
+        this.contractEmail = contractEmail;
+    }
+
+    @Length(min = 0, max = 50, message = "联系人长度必须介于 0 和 50 之间")
+    public String getLinkMan() {
+        return linkMan;
+    }
+
+    public void setLinkMan(String linkMan) {
+        this.linkMan = linkMan;
+    }
+
+    public String getProvinceId() {
+        return provinceId;
+    }
+
+    public void setProvinceId(String provinceId) {
+        this.provinceId = provinceId;
+    }
+
+    public String getCityId() {
+        return cityId;
+    }
+
+    public void setCityId(String cityId) {
+        this.cityId = cityId;
+    }
+
+    public String getTownId() {
+        return townId;
+    }
+
+    public void setTownId(String townId) {
+        this.townId = townId;
+    }
+
+    @Length(min = 0, max = 100, message = "地址长度必须介于 0 和 100 之间")
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getShopPhoto() {
+        return shopPhoto;
+    }
+
+    public void setShopPhoto(String shopPhoto) {
+        this.shopPhoto = shopPhoto;
+    }
+
+    public String getBusinessLicense() {
+        return businessLicense;
+    }
+
+    public void setBusinessLicense(String businessLicense) {
+        this.businessLicense = businessLicense;
+    }
+
+    @Length(min = 0, max = 18, message = "统一社会信用代码长度必须介于 0 和 18 之间")
+    public String getSocialCreditCode() {
+        return socialCreditCode;
+    }
+
+    public void setSocialCreditCode(String socialCreditCode) {
+        this.socialCreditCode = socialCreditCode;
+    }
+
+    @Length(min = 0, max = 2, message = " 一级分类为医美=1和生美=2长度必须介于 0 和 2 之间")
+    public String getFirstClubType() {
+        return firstClubType;
+    }
+
+    public void setFirstClubType(String firstClubType) {
+        this.firstClubType = firstClubType;
+    }
+
+    @Length(min = 0, max = 2, message = "医美的二级分类为诊所=1、门诊=2、医院=3。  生美没有二级分类长度必须介于 0 和 2 之间")
+    public String getSecondClubType() {
+        return secondClubType;
+    }
+
+    public void setSecondClubType(String secondClubType) {
+        this.secondClubType = secondClubType;
+    }
+
+    @Length(min = 0, max = 200, message = "若为医美分类下的门诊和医院则可能需要填写科室长度必须介于 0 和 200 之间")
+    public String getDepartment() {
+        return department;
+    }
+
+    public void setDepartment(String department) {
+        this.department = department;
+    }
+
+    public String getMedicalPracticeLicense() {
+        return medicalPracticeLicense;
+    }
+
+    public void setMedicalPracticeLicense(String medicalPracticeLicense) {
+        this.medicalPracticeLicense = medicalPracticeLicense;
+    }
+
+    @Length(min = 0, max = 200, message = "主打项目长度必须介于 0 和 200 之间")
+    public String getMainProduct() {
+        return mainProduct;
+    }
+
+    public void setMainProduct(String mainProduct) {
+        this.mainProduct = mainProduct;
+    }
+
+    @Length(min = 0, max = 2, message = "是否同意勾选同意协议,1是,其他否长度必须介于 0 和 2 之间")
+    public String getIsAgreed() {
+        return isAgreed;
+    }
+
+    public void setIsAgreed(String isAgreed) {
+        this.isAgreed = isAgreed;
+    }
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    public Date getAddTime() {
+        return addTime;
+    }
+
+    public void setAddTime(Date addTime) {
+        this.addTime = addTime;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
+    public String getSpName() {
+        return spName;
+    }
+
+    public void setSpName(String spName) {
+        this.spName = spName;
+    }
+
+    public String getTown() {
+        return town;
+    }
+
+    public void setTown(String town) {
+        this.town = town;
+    }
+
+    public String getCity() {
+        return city;
+    }
+
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    public String getProvince() {
+        return province;
+    }
+
+    public void setProvince(String province) {
+        this.province = province;
+    }
+}

+ 44 - 0
src/main/java/com/caimei/modules/user/service/ClubTemporaryService.java

@@ -0,0 +1,44 @@
+package com.caimei.modules.user.service;
+
+import java.util.List;
+
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.service.CrudService;
+import com.caimei.modules.user.entity.ClubTemporary;
+import com.caimei.modules.user.dao.ClubTemporaryDao;
+
+/**
+ * 未确认机构Service
+ * @author plf
+ * @version 2021-07-13
+ */
+@Service
+@Transactional(readOnly = true)
+public class ClubTemporaryService extends CrudService<ClubTemporaryDao, ClubTemporary> {
+
+	public ClubTemporary get(String id) {
+		return super.get(id);
+	}
+	
+	public List<ClubTemporary> findList(ClubTemporary clubTemporary) {
+		return super.findList(clubTemporary);
+	}
+	
+	public Page<ClubTemporary> findPage(Page<ClubTemporary> page, ClubTemporary clubTemporary) {
+		return super.findPage(page, clubTemporary);
+	}
+	
+	@Transactional(readOnly = false)
+	public void save(ClubTemporary clubTemporary) {
+		super.save(clubTemporary);
+	}
+	
+	@Transactional(readOnly = false)
+	public void delete(ClubTemporary clubTemporary) {
+		super.delete(clubTemporary);
+	}
+	
+}

+ 80 - 0
src/main/java/com/caimei/modules/user/web/ClubTemporaryController.java

@@ -0,0 +1,80 @@
+package com.caimei.modules.user.web;
+
+import com.caimei.modules.user.entity.ClubTemporary;
+import com.caimei.modules.user.service.ClubTemporaryService;
+import com.thinkgem.jeesite.common.config.Global;
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.utils.StringUtils;
+import com.thinkgem.jeesite.common.web.BaseController;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * 未确认机构Controller
+ *
+ * @author plf
+ * @version 2021-07-13
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/user/clubTemporary")
+public class ClubTemporaryController extends BaseController {
+
+    @Autowired
+    private ClubTemporaryService clubTemporaryService;
+
+    @ModelAttribute
+    public ClubTemporary get(@RequestParam(required = false) String id) {
+        ClubTemporary entity = null;
+        if (StringUtils.isNotBlank(id)) {
+            entity = clubTemporaryService.get(id);
+        }
+        if (entity == null) {
+            entity = new ClubTemporary();
+        }
+        return entity;
+    }
+
+    @RequiresPermissions("club:clubTemporary:view")
+    @RequestMapping(value = {"list", ""})
+    public String list(ClubTemporary clubTemporary, HttpServletRequest request, HttpServletResponse response, Model model) {
+        Page<ClubTemporary> page = clubTemporaryService.findPage(new Page<ClubTemporary>(request, response), clubTemporary);
+        model.addAttribute("page", page);
+        model.addAttribute("clubTemporary", clubTemporary);
+        return "modules/user/clubTemporaryList";
+    }
+
+    @RequiresPermissions("club:clubTemporary:view")
+    @RequestMapping(value = "form")
+    public String form(ClubTemporary clubTemporary, Model model) {
+        model.addAttribute("clubTemporary", clubTemporary);
+        return "modules/user/clubTemporaryForm";
+    }
+
+
+    @RequestMapping(value = "save")
+    public String save(ClubTemporary clubTemporary, Model model, RedirectAttributes redirectAttributes) {
+        if (!beanValidator(model, clubTemporary)) {
+            return form(clubTemporary, model);
+        }
+        clubTemporaryService.save(clubTemporary);
+        addMessage(redirectAttributes, "保存未确认机构成功");
+        return "redirect:" + Global.getAdminPath() + "/user/clubTemporary/?repage";
+    }
+
+    @RequestMapping(value = "delete")
+    public String delete(ClubTemporary clubTemporary, RedirectAttributes redirectAttributes) {
+        clubTemporaryService.delete(clubTemporary);
+        addMessage(redirectAttributes, "删除未确认机构成功");
+        return "redirect:" + Global.getAdminPath() + "/user/clubTemporary/?repage";
+    }
+
+}

+ 190 - 0
src/main/resources/mappings/modules/user/ClubTemporaryMapper.xml

@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.caimei.modules.user.dao.ClubTemporaryDao">
+    
+	<sql id="clubTemporaryColumns">
+		a.id AS "id",
+		a.userId AS "userId",
+		a.name AS "name",
+		a.shortName AS "shortName",
+		a.bindMobile AS "bindMobile",
+		a.contractEmail AS "contractEmail",
+		a.linkMan AS "linkMan",
+		a.provinceId AS "provinceId",
+		a.cityId AS "cityId",
+		a.townId AS "townId",
+		a.address AS "address",
+		a.shopPhoto AS "shopPhoto",
+		a.businessLicense AS "businessLicense",
+		a.socialCreditCode AS "socialCreditCode",
+		a.firstClubType AS "firstClubType",
+		a.secondClubType AS "secondClubType",
+		a.department AS "department",
+		a.medicalPracticeLicense AS "medicalPracticeLicense",
+		a.mainProduct AS "mainProduct",
+		a.isAgreed AS "isAgreed",
+		a.addTime AS "addTime",
+		IFNULL(s.name,s.linkMan1) AS "spName"
+	</sql>
+	
+	<sql id="clubTemporaryJoins">
+		LEFT JOIN serviceprovider s ON s.userID = a.userId
+	</sql>
+    
+	<select id="get" resultType="ClubTemporary">
+		SELECT 
+			<include refid="clubTemporaryColumns"/>,
+		d.name AS "province",
+		c.name AS "city",
+		b.name AS  "town"
+		FROM club_temporary a
+		<include refid="clubTemporaryJoins"/>
+		LEFT JOIN town b ON b.townID=a.townID
+		LEFT JOIN city c ON c.cityID=b.cityID
+		LEFT JOIN province d ON d.provinceID=c.provinceID
+		WHERE a.id = #{id}
+	</select>
+	
+	<select id="findList" resultType="ClubTemporary">
+		SELECT 
+			<include refid="clubTemporaryColumns"/>
+		FROM club_temporary a
+		<include refid="clubTemporaryJoins"/>
+		<where>
+			<if test="name != null and name != ''">
+				AND a.name LIKE 
+					<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
+					<if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
+					<if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
+			</if>
+			<if test="bindMobile != null and bindMobile != ''">
+				AND a.bindMobile LIKE 
+					<if test="dbName == 'oracle'">'%'||#{bindMobile}||'%'</if>
+					<if test="dbName == 'mssql'">'%'+#{bindMobile}+'%'</if>
+					<if test="dbName == 'mysql'">concat('%',#{bindMobile},'%')</if>
+			</if>
+			<if test="contractEmail != null and contractEmail != ''">
+				AND a.contractEmail LIKE 
+					<if test="dbName == 'oracle'">'%'||#{contractEmail}||'%'</if>
+					<if test="dbName == 'mssql'">'%'+#{contractEmail}+'%'</if>
+					<if test="dbName == 'mysql'">concat('%',#{contractEmail},'%')</if>
+			</if>
+			<if test="linkMan != null and linkMan != ''">
+				AND a.linkMan LIKE 
+					<if test="dbName == 'oracle'">'%'||#{linkMan}||'%'</if>
+					<if test="dbName == 'mssql'">'%'+#{linkMan}+'%'</if>
+					<if test="dbName == 'mysql'">concat('%',#{linkMan},'%')</if>
+			</if>
+			<if test="startTime != null and startTime != ''">
+				AND a.addTime <![CDATA[ > ]]> #{startTime}
+			</if>
+			<if test="endTime != null and endTime != ''">
+				AND a.addTime <![CDATA[ < ]]> #{endTime}
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.addTime DESC
+			</otherwise>
+		</choose>
+	</select>
+	
+	<select id="findAllList" resultType="ClubTemporary">
+		SELECT 
+			<include refid="clubTemporaryColumns"/>
+		FROM club_temporary a
+		<include refid="clubTemporaryJoins"/>
+		<where>
+			
+		</where>		
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+			</otherwise>
+		</choose>
+	</select>
+	
+	<insert id="insert" parameterType="ClubTemporary"  keyProperty="id" useGeneratedKeys="true">
+		INSERT INTO club_temporary(
+			id,
+			userId,
+			name,
+			shortName,
+			bindMobile,
+			contractEmail,
+			linkMan,
+			provinceId,
+			cityId,
+			townId,
+			address,
+			shopPhoto,
+			businessLicense,
+			socialCreditCode,
+			firstClubType,
+			secondClubType,
+			department,
+			medicalPracticeLicense,
+			mainProduct,
+			isAgreed,
+			addTime
+		) VALUES (
+			#{id},
+			#{userId},
+			#{name},
+			#{shortName},
+			#{bindMobile},
+			#{contractEmail},
+			#{linkMan},
+			#{provinceId},
+			#{cityId},
+			#{townId},
+			#{address},
+			#{shopPhoto},
+			#{businessLicense},
+			#{socialCreditCode},
+			#{firstClubType},
+			#{secondClubType},
+			#{department},
+			#{medicalPracticeLicense},
+			#{mainProduct},
+			#{isAgreed},
+			#{addTime}
+		)
+	</insert>
+	
+	<update id="update">
+		UPDATE club_temporary SET 	
+			userId = #{userId},
+			name = #{name},
+			shortName = #{shortName},
+			bindMobile = #{bindMobile},
+			contractEmail = #{contractEmail},
+			linkMan = #{linkMan},
+			provinceId = #{provinceId},
+			cityId = #{cityId},
+			townId = #{townId},
+			address = #{address},
+			shopPhoto = #{shopPhoto},
+			businessLicense = #{businessLicense},
+			socialCreditCode = #{socialCreditCode},
+			firstClubType = #{firstClubType},
+			secondClubType = #{secondClubType},
+			department = #{department},
+			medicalPracticeLicense = #{medicalPracticeLicense},
+			mainProduct = #{mainProduct},
+			isAgreed = #{isAgreed},
+			addTime = #{addTime}
+		WHERE id = #{id}
+	</update>
+	
+	<delete id="delete">
+		DELETE FROM club_temporary
+		WHERE id = #{id}
+	</delete>
+	
+</mapper>

+ 541 - 0
src/main/webapp/WEB-INF/views/modules/user/clubTemporaryForm.jsp

@@ -0,0 +1,541 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<html>
+<head>
+	<title>未确认机构管理</title>
+	<meta name="decorator" content="default"/>
+	<script src="/static/modules/bulkpurchase/loadAddressById.js"></script>
+	<script type="text/javascript">
+		$(document).ready(function () {
+			$("#inputForm").validate({
+				ignore: "",
+				submitHandler: function (form) {
+					var bindMobile = $("#bindMobile").val();
+					var userID = $("#userId").val();
+					$.post("${ctx}/new/user/agency/checkMobile?bindMobile="+bindMobile+"&userID="+userID, function (data) {
+						if (data.code == -1) {
+							alertx(data.msg);
+						}else {
+							loading('正在提交,请稍等...');
+							form.submit();
+						}
+					})
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function (error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+		});
+
+		function checkMobile() {
+			var bindMobile = $("#bindMobile").val();
+			var userID = $("#userId").val();
+			$.post("${ctx}/new/user/agency/checkMobile?bindMobile="+bindMobile+"&userID="+userID, function (data) {
+				if (data.code == -1) {
+					alertx(data.msg);
+				}
+			})
+		}
+
+		function onlyNumOrLetter(obj) {
+			var reg = /^[0-9a-zA-Z]+$/;
+			var str = document.getElementById("socialCreditCode").value;
+			if (!reg.test(str)) {
+				alertx("营业执照编号格式不正确");
+				$("#socialCreditCode").val("");
+			}
+		}
+
+		/**
+		 * @param obj
+		 * jquery控制input只能输入数字
+		 */
+		function mobileVerification(obj) {
+			var reg = /^1\d{10}$/;
+			var contractMobile = document.getElementById("contractMobile").value;
+			if (!reg.test(contractMobile)) {
+				alertx("手机号格式不正确");
+				$("#contractMobile").val("");
+			}
+		}
+
+		/**
+		 * @param obj
+		 * jquery控制input只能输入数字
+		 */
+		function onlynum(obj) {
+			obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+		}
+
+		/**
+		 * @param obj
+		 * jquery控制input只能输入数字和两位小数
+		 */
+		function num(obj) {
+			obj.value = obj.value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符
+			obj.value = obj.value.replace(/^\./g, ""); //验证第一个字符是数字
+			obj.value = obj.value.replace(/\.{2,}/g, "."); //只保留第一个, 清除多余的
+			obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
+			obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); //只能输入两个小数
+		}
+
+		function int(obj) {
+			obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+		}
+
+		//设置主营类型
+		function setTags(opts) {
+			var tagArr = [];
+			opts.$mainPro.val('')
+			opts.$tagArea.find('.new-tag.active').each(function (i, v) {
+				var _typeName = $(v).attr('data-typeName');
+				tagArr.push(_typeName);
+				opts.$mainPro.val(tagArr.join('/'));
+			})
+		}
+
+		//选择主营内容项目
+		function getTags(opts) {
+			opts.$tagArea.on('click', '.new-tag', function () {
+				var $this = $(this);
+				$this.toggleClass('active');
+				setTags(opts);
+			});
+			opts.$other.on('click', function () {
+				opts.$input.css('display', 'inline-block');
+				opts.$add.css('display', 'inline-block');
+			});
+			opts.$add.on('click', function () {
+				var _tag = $.trim(opts.$input.val());
+				if (_tag) {
+					var flag = false;
+					opts.$tagArea.find('.new-tag').each(function (i, v) {
+						var _name = $(v).attr('data-typeName');
+						if (_tag == _name) {
+							flag = true;
+							return false;
+						} else {
+							if (i == opts.$tagArea.find('.new-tag').length) {
+								flag = false;
+							}
+						}
+
+					})
+					if (flag) {
+						opts.$tagArea.find('.new-tag').each(function (i, v) {
+							var _name = $(v).attr('data-typeName');
+							if (_tag == _name) {
+								$(v).addClass('active');
+								layer.tips('该类型已存在', opts.$add);
+								flag = true;
+								return false;
+							}
+
+						})
+					} else {
+						opts.$tagArea.append('<span class="new-tag up-' + opts.$type + '-tag active" data-typeName="' + _tag + '">' + _tag + '</span> ');
+						setTags(opts);
+						opts.$input.val('');
+						return;
+					}
+				}
+			})
+		}
+
+		$(document).on("change", "#auditStatus", function () {
+			if ($("#auditStatus").val() == 2) {
+				$("#auditNopass").show();
+			} else {
+				$("#auditNopass").hide();
+			}
+		})
+
+		// 初始化选中数据
+		$(function () {
+			//初始化1
+			var firstClubType = $('#firstClubType').val();
+			console.log(firstClubType)
+			if (firstClubType == '1') {
+				$('.med-option,.qualification').show();
+			}
+			$('.medical-radio div input[name="firstClubType"]').on('click', function () {
+				var html = '';
+				var nameval = $(this).val();
+				if (nameval == '1') {
+					$('.med-option,.qualification').show();
+					html += '<span class="new-tag up-club-tag" data-typeName="整形">整形</span>',
+							html += '<span class="new-tag up-club-tag" data-typeName="轻医美">轻医美</span>',
+							html += '<span class="new-tag up-club-tag" data-typeName="皮肤科">皮肤科</span>';
+					$('#clubArea').html(html);
+					$('.Main-content').show();
+				} else if (nameval == '2') {
+					$('.med-option,.qualification,.epart').hide();
+					$('input[name="secondClubType"]').attr('checked', false);
+					html += '<span class="new-tag up-club-tag" data-typeName="美容">美容</span>',
+							html += '<span class="new-tag up-club-tag" data-typeName="美体">美体</span>',
+							html += '<span class="new-tag up-club-tag" data-typeName="美发">美发</span>',
+							html += '<span class="new-tag up-club-tag" data-typeName="皮肤管理">皮肤管理</span>',
+							html += '<span class="new-tag up-club-tag" data-typeName="光电">光电</span>',
+							html += '<span class="new-tag up-club-tag" data-typeName="综合类">综合类</span>',
+							html += '<span class="new-tag up-club-tag" data-typeName="中医养生">中医养生</span>',
+							html += '<span class="new-tag up-club-tag" data-typeName="spa">spa</span>'
+					$('#clubArea').html(html);
+					$('.Main-content').show();
+				}
+			});
+			//初始化2
+			if (firstClubType == '1') {
+				var nameval1 = $('input[name="secondClubType"]:checked').val();
+				if (nameval1 == '1') {
+					$('.epart').hide()
+				} else if (nameval1 == '2') {
+					$('.epart').show()
+				} else if (nameval1 == '3') {
+					$('.epart').show()
+				}
+			}
+			//医美二级选择
+			$('.med-option div input[name="secondClubType"]').on('click', function () {
+				var nameVal = $(this).val();
+				if (nameVal == '1') {
+					$('.epart').hide()
+				} else if (nameVal == '2') {
+					$('.epart').show()
+				} else if (nameVal == '3') {
+					$('.epart').show()
+				}
+			});
+			//主营项目
+			var cMainProVal = $('#cMainPro').val();
+			if (cMainProVal != null && cMainProVal != "") {
+				var _mainPros = cMainProVal.split('/');
+				var proList = $('#clubArea').find('.new-tag');
+				for (var j = 0; j < _mainPros.length; j++) {
+					var _flag = false;
+					for (var i = 0; i < proList.length; i++) {
+						if ($(proList[i]).attr('data-typeName') == _mainPros[j]) {
+							_flag = true;
+						}
+					}
+					if (_flag) {
+						for (var i = 0; i < proList.length; i++) {
+							if ($(proList[i]).attr('data-typeName') == _mainPros[j]) {
+								$(proList[i]).addClass('active');
+							}
+						}
+					} else {
+						$('#clubArea').append('<span class="new-tag up-club-tag active" data-typeName="' + _mainPros[j] + '">' + _mainPros[j] + '</span> ');
+						$('.Main-content').show();
+					}
+				}
+				$('#cMainPro').val(cMainProVal);
+			}
+			//机构品项选择
+			var optsClub = {
+				$tag: $('.up-club-tag'),
+				$tagArea: $('#clubArea'),
+				$mainPro: $('#cMainPro'),
+				$other: $('#clubOther'),
+				$input: $('#clubInput'),
+				$add: $('#clubAdd'),
+				$type: 'club'
+			};
+			getTags(optsClub);
+
+		})
+	</script>
+	<style>
+		#auditBox .bd-row {
+			display: flex;
+			margin-bottom: 15px;
+		}
+
+		#auditBox .bd-row > span {
+			display: inline-block;
+			width: 60px;
+		}
+
+		#auditBox .auditCheckBox {
+			width: 250px;
+		}
+
+		#auditBox .auditCheckBox label {
+			margin: 0 5px 5px 0
+		}
+
+		#auditBox .auditCheckBox input {
+			display: none;
+		}
+
+		#auditBox .auditCheckBox input + span {
+			display: inline-block;
+			line-height: 24px;
+			padding: 0 12px;
+			border: 1px solid #666;
+			border-radius: 5px;
+		}
+
+		#auditBox .auditCheckBox input:checked + span {
+			background-color: #E6633A
+		}
+
+		.detailLine {
+			width: 98%;
+			margin-left: 10px;
+		}
+
+		th {
+			text-align: right;
+			white-space: nowrap;
+		}
+
+		td {
+			padding: 5px 0;
+		}
+
+		#headpicPreview li, #businessLicenseImagePreview li {
+			min-height: 100px;
+		}
+
+		.the-oradio {
+			display: inline-block;
+			vertical-align: top;
+		}
+
+		.the-oradio div {
+			width: 85px;
+			display: inline-block;
+			font-size: 12px;
+			color: #666;
+		}
+
+		.med-option {
+			display: block;
+			margin: 10px 0 0 160px;
+		}
+
+		.control-group .new-tag {
+			display: inline-block;
+			width: 78px;
+			height: 30px;
+			border: 1px solid #e5e5e5;
+			border-radius: 5px;
+			margin: 7px;
+			text-align: center;
+			line-height: 30px;
+			font-size: 14px;
+			overflow: hidden;
+			text-overflow: ellipsis;
+			white-space: nowrap;
+			cursor: pointer;
+		}
+
+		.control-group .new-tag.active {
+			border-color: #e15616;
+			color: #e15616;
+		}
+
+		#clubArea {
+			display: inline-block;
+			width: 450px;
+		}
+
+		#clubOther {
+			height: 40px;
+			line-height: 40px;
+			vertical-align: middle
+		}
+
+		#clubInput {
+			width: 159px;
+			margin: 7px;
+			display: inline-block;
+			height: 30px;
+			display: none;
+		}
+
+		.tags-operate {
+			margin-left: 160px;
+		}
+
+		.control-group .tags-operate .tag-add {
+			height: 40px;
+			line-height: 40px;
+			vertical-align: middle;
+			display: none;
+		}
+	</style>
+</head>
+<body>
+<ul class="nav nav-tabs">
+	<li><a href="${ctx}/new/user/agency/">机构列表</a></li>
+	<li><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
+	<li class="active"><a href="">未确认机构编辑</a></li>
+</ul>
+<form:form id="inputForm" modelAttribute="clubTemporary" action="${ctx}/user/clubTemporary/save" method="post" class="form-horizontal">
+<form:hidden path="id"/>
+<form:hidden path="userId" id="userId"/>
+<div style="max-width:1200px;padding:15px;">
+	<table border="0" cellspacing="0" cellpadding="0" width="100%">
+		<tr height="28">
+			<th>状态:</th>
+			<td colspan="5">未确认</td>
+		</tr>
+		<tr height="28">
+			<th width="12%">机构名称:</th>
+			<td width="13%"><form:input path="name" htmlEscape="false" maxlength="20" class="input-medium"/></td>
+			<th width="12%">机构简称:</th>
+			<td width="13%"><form:input path="shortName" htmlEscape="false" maxlength="20" class="input-medium"/></td>
+			<th width="12%">注册邮箱:</th>
+			<td width="13%"><form:input path="contractEmail" htmlEscape="false" maxlength="20" class="input-medium"/></td>
+		</tr>
+		<tr height="28">
+			<th width="12%"><font color="red">*</font>联系人:</th>
+			<td width="13%">
+				<form:input path="linkMan" htmlEscape="false" maxlength="20" class="input-medium required"/>
+			</td>
+			<th width="12%"><font color="red">*</font> 手机号:</th>
+			<td colspan="3"><form:input path="bindMobile" htmlEscape="false" maxlength="20" class="input-medium required"  onchange="checkMobile()"/></td>
+		</tr>
+	</table>
+</div>
+
+<input type="hidden" id="curProvince" name="curProvince" value="${clubTemporary.province }" disabled="disabled">
+<input type="hidden" id="curCity" name="curCity" value="${clubTemporary.city }" disabled="disabled">
+<input type="hidden" id="curTown" name="curTown" value="${clubTemporary.town }" disabled="disabled">
+<sys:message content="${message}"/>
+<hr class="detailLine">
+<div>
+	<table border="0" cellspacing="0" cellpadding="0" width="100%">
+		<tr>
+			<td colspan="2">
+				<div class="control-group">
+					<label class="control-label"><b>地址:</b></label>
+					<div class="controls">
+						<form:select path="provinceId" class="input-xlarge" id="province"
+									 onchange="loadCity()" style="width:100px;">
+							<form:option value="" label="省" provinceId=""/>
+						</form:select>
+						<form:select path="cityId" class="input-xlarge" id="city" onchange="loadTown()"
+									 style="width:100px;">
+							<form:option value="" label="市" cityId=""/>
+						</form:select>
+						<form:select path="townId" class="input-xlarge" id="town" style="width:100px;">
+							<form:option value="" label="区"/>
+						</form:select>
+						<form:input path="address" class="input-xlarge userAddress" width="20px" maxlength="60"
+									placeholder="请填写会所详细的地址"/>
+					</div>
+				</div>
+			</td>
+		</tr>
+		<tr>
+			<td colspan="2">
+				<div class="control-group">
+					<label class="control-label"><b>营业执照编号:</b></label>
+					<div class="controls">
+						<form:input path="socialCreditCode" htmlEscape="false" maxlength="18"
+									class="input-xlarge" onchange="onlyNumOrLetter(this)"
+									placeholder="请填写统一社会信用代码"/>
+					</div>
+				</div>
+			</td>
+		</tr>
+		<tr>
+			<td>
+				<div class="control-group">
+					<label class="control-label"><b>营业执照:</b></label>
+					<div class="controls">
+						<form:hidden id="businessLicenseImage" path="businessLicense" htmlEscape="false"
+									 maxlength="255" class="input-xlarge required"/>
+						<sys:ckfinder input="businessLicenseImage" type="images" uploadPath="/photo"
+									  selectMultiple="false" maxWidth="100" maxHeight="100"/>
+						<font color="red">注意:请上传jpg/png格式的图片,最大不超过5M</font>
+					</div>
+				</div>
+			</td>
+			<td>
+				<div class="control-group">
+					<label class="control-label"><b>门头照:</b></label>
+					<div class="controls">
+						<form:hidden id="headpic" path="shopPhoto" htmlEscape="false" maxlength="255"
+									 class="input-xlarge"/>
+						<sys:ckfinder input="headpic" type="images" uploadPath="/photo" maxWidth="100" maxHeight="100"/>
+						<font color="red">注意:请上传jpg/png格式的图片,最大不超过5M</font>
+					</div>
+				</div>
+			</td>
+		</tr>
+		<tr>
+			<td>
+				<div class="control-group">
+					<label class="control-label" for=""><b>机构类型:</b></label>
+					<div class="medical-radio the-oradio">
+						<input value="${clubTemporary.firstClubType}" class="hide" type="text" id="firstClubType"/>
+						<div class="med-beauty">
+							<input name="firstClubType" value="1" type="radio" ${clubTemporary.firstClubType == "1" ? "checked" : ""}/>医美
+						</div>
+						<div class="raw-beauty">
+							<input name="firstClubType" value="2" type="radio" ${clubTemporary.firstClubType == "2" ? "checked" : ""}/>生美
+						</div>
+					</div>
+					<span class="err-tip"></span>
+					<div class="med-option the-oradio" style="display: none">
+						<div class="med-beauty"><input name="secondClubType" value="1"
+													   type="radio"  ${clubTemporary.secondClubType == "1" ? "checked" : ""}/>诊所
+						</div>
+						<div class="med-beauty"><input name="secondClubType" value="2"
+													   type="radio"  ${clubTemporary.secondClubType == "2" ? "checked" : ""}/>门诊
+						</div>
+						<div class="med-beauty"><input name="secondClubType" value="3"
+													   type="radio" ${clubTemporary.secondClubType == "3" ? "checked" : ""}/>医院
+						</div>
+						<span class="err-tip"></span>
+					</div>
+					<div class="qualification control-group" style="display: none">
+						<label class="control-label"><b>资质:</b></label>
+						<div class="controls" style="margin-bottom: 10px">
+							<form:hidden id="medicalPracticeLicenseImg" path="medicalPracticeLicense"
+										 htmlEscape="false" maxlength="255"
+										 class="input-xlarge"/>
+							<sys:ckfinder input="medicalPracticeLicenseImg" type="images" uploadPath="/photo"
+										  maxWidth="100" maxHeight="100"/>
+							<font color="red">注意:请上传jpg/png格式的图片,最大不超过5M</font>
+						</div>
+					</div>
+				</div>
+				<div class="control-group epart" style="display: none">
+					<label class="control-label"><b>科室:</b></label>
+					<input class="reg-input" type="text" name="department" id="Department"
+						   placeholder="请填写您的所经营的科室,用逗号隔开。(至少三个)" value="${clubTemporary.department}"
+						   style="margin-left: 10px;"/>
+					<span class="err-tip"></span>
+				</div>
+				<div class="control-group Main-content" style="display: none">
+					<label class="control-label" for=""><b>主营内容:</b></label>
+					<div class="tags-area" id="clubArea"></div>
+					<span class="err-tip" style="display: inline-block;margin-left:-55px;"></span>
+					<input type="hidden" name="mainProduct" value="${clubTemporary.mainProduct}" id="cMainPro">
+					<div class="tags-operate">
+						<span class="new-tag tag-other" id="clubOther">其他</span>
+						<input type="text" class="reg-input tag-input" id="clubInput" placeholder="请输入自定义品项目"
+							   maxlength="5">
+						<span class="new-tag tag-add" id="clubAdd">确认添加</span>
+					</div>
+				</div>
+			</td>
+		</tr>
+	</table>
+	<div class="form-actions">
+		<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;&nbsp;&nbsp;
+		<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+	</div>
+	</form:form>
+</body>
+</html>

+ 106 - 0
src/main/webapp/WEB-INF/views/modules/user/clubTemporaryList.jsp

@@ -0,0 +1,106 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+	<title>未确认机构管理</title>
+	<meta name="decorator" content="default"/>
+	<style type="text/css">
+		.table th{text-align: center;}
+		.table td{text-align: center;}
+	</style>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			
+		});
+		function page(n,s){
+			$("#pageNo").val(n);
+			$("#pageSize").val(s);
+			$("#searchForm").submit();
+        	return false;
+        }
+	</script>
+</head>
+<body>
+	<ul class="nav nav-tabs">
+		<li><a href="${ctx}/new/user/agency/">机构列表</a></li>
+		<li class="active"><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
+	</ul>
+	<form:form id="searchForm" modelAttribute="clubTemporary" action="${ctx}/user/clubTemporary/" method="post" class="breadcrumb form-search">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<div class="ul-form">
+			 <label>机构名称:</label>
+				<form:input path="name" htmlEscape="false" maxlength="50" class="input-medium"/>
+			 <label>联系人:</label>
+				<form:input path="linkMan" htmlEscape="false" maxlength="50" class="input-medium"/>
+			 <label>手机号:</label>
+				<form:input path="bindMobile" htmlEscape="false" maxlength="20" class="input-medium"/>
+			 <label>邮箱:</label>
+				<form:input path="contractEmail" htmlEscape="false" maxlength="50" class="input-medium"/>
+			<br><br>
+			 <label>添加时间:</label>
+				<input name="startTime" type="text" readonly="readonly" maxlength="15" class="input-mini Wdate"
+					   value="${clubTemporary.startTime}"
+					   onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/> -
+				<input name="endTime" type="text" readonly="readonly" maxlength="15" class="input-mini Wdate"
+					   value="${clubTemporary.endTime}"
+					   onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+			<div class="clearfix"></div>
+		</div>
+	</form:form>
+	<sys:message content="${message}"/>
+	<font color="red">未确认机构是指协销拉机构上线后,暂未通过协销分享的链接确认注册的机构。客服可在本页面暂时为机构确认注册,确认后<br>
+		协销可以帮机构下一个订单。在机构没有自己确认之前,每次协销为机构下单前都需要客服确认一次</font>
+	<table id="contentTable" class="table table-striped table-bordered table-condensed">
+		<thead>
+			<tr>
+				<th>机构名称</th>
+				<th>机构简称</th>
+				<th>联系人</th>
+				<th>手机号</th>
+				<th>邮箱</th>
+				<th>协销人员</th>
+				<th>机构类别</th>
+				<th>添加时间</th>
+				<th>操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="club">
+			<tr>
+				<td>
+					${empty club.name ? "------" : club.name}
+				</td>
+				<td>
+					${empty club.shortName ? "------" : club.shortName}
+				</td>
+				<td>
+						${club.linkMan}
+				</td>
+				<td>
+					${club.bindMobile}
+				</td>
+				<td>
+					${empty club.contractEmail ? "------" : club.contractEmail}
+				</td>
+				<td>${club.spName}</td>
+				<td>
+						${empty club.businessLicense ? "普通机构" : "会员机构"}
+				</td>
+				<td>
+					<fmt:formatDate value="${club.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				</td>
+				<td>
+    				<a href="${ctx}/user/clubTemporary/form?id=${club.id}">编辑</a>
+					<a>确认注册</a>
+					<a>确认记录</a>
+					<%--<a href="${ctx}/user/clubTemporary/delete?id=${club.id}" onclick="return confirmx('确认要删除该未确认机构吗?', this.href)">删除</a>--%>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	<div class="pagination">${page}</div>
+</body>
+</html>

+ 1 - 0
src/main/webapp/WEB-INF/views/modules/userNew/cmAgencyList.jsp

@@ -252,6 +252,7 @@
 <body>
 <ul class="nav nav-tabs">
     <li class="active"><a href="${ctx}/new/user/agency/">机构列表</a></li>
+    <li><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
 </ul>
 <form:form id="searchForm" modelAttribute="newCmClub" action="${ctx}/new/user/agency/" method="post"
            class="breadcrumb form-search">