Bladeren bron

Merge remote-tracking branch 'origin/developerA' into developerA

Aslee 3 jaren geleden
bovenliggende
commit
bb2d3919f0

+ 1 - 1
src/main/java/com/caimei/modules/coupon/dao/CmCouponVipDao.java

@@ -13,7 +13,7 @@ public interface CmCouponVipDao{
      * 查找所有的超级会员优惠券
      * @return
      */
-    CmVipCoupon findAllVipCouponDao();
+    CmVipCoupon findAllVipCoupon();
 
 
 }

+ 64 - 63
src/main/java/com/caimei/modules/coupon/entity/SvipCouponForm.java

@@ -1,5 +1,6 @@
 package com.caimei.modules.coupon.entity;
 
+import java.math.BigDecimal;
 import java.util.Date;
 
 /**
@@ -30,24 +31,24 @@ public class SvipCouponForm {
     /**
      * 优惠券金额(面值)
      */
-    private Double couponAmount1;
-    private Double couponAmount2;
-    private Double couponAmount3;
-    private Double couponAmount4;
+    private BigDecimal couponAmount1;
+    private BigDecimal couponAmount2;
+    private BigDecimal couponAmount3;
+    private BigDecimal couponAmount4;
     /**
      * 优惠满减条件金额
      */
-    private Double touchPrice1;
-    private Double touchPrice2;
-    private Double touchPrice3;
-    private Double touchPrice4;
+    private BigDecimal touchPrice1;
+    private BigDecimal touchPrice2;
+    private BigDecimal touchPrice3;
+    private BigDecimal touchPrice4;
     /**
      * 优惠商品:1全商城商品 2指定商品(活动券有效)
      */
     private String productType1;
-    private Double productType2;
-    private Double productType3;
-    private Double productType4;
+    private String productType2;
+    private String productType3;
+    private String productType4;
     /**
      * 优惠品类:1产品 2仪器(品类券有效)
      */
@@ -136,108 +137,108 @@ public class SvipCouponForm {
         this.couponType4 = couponType4;
     }
 
-    public Double getCouponAmount1() {
-        return couponAmount1;
+    public String getProductType1() {
+        return productType1;
     }
 
-    public void setCouponAmount1(Double couponAmount1) {
-        this.couponAmount1 = couponAmount1;
+    public void setProductType1(String productType1) {
+        this.productType1 = productType1;
     }
 
-    public Double getCouponAmount2() {
-        return couponAmount2;
+    public String getProductType2() {
+        return productType2;
     }
 
-    public void setCouponAmount2(Double couponAmount2) {
-        this.couponAmount2 = couponAmount2;
+    public void setProductType2(String productType2) {
+        this.productType2 = productType2;
     }
 
-    public Double getCouponAmount3() {
-        return couponAmount3;
+    public String getProductType3() {
+        return productType3;
     }
 
-    public void setCouponAmount3(Double couponAmount3) {
-        this.couponAmount3 = couponAmount3;
+    public void setProductType3(String productType3) {
+        this.productType3 = productType3;
     }
 
-    public Double getCouponAmount4() {
-        return couponAmount4;
+    public String getProductType4() {
+        return productType4;
     }
 
-    public void setCouponAmount4(Double couponAmount4) {
-        this.couponAmount4 = couponAmount4;
+    public void setProductType4(String productType4) {
+        this.productType4 = productType4;
     }
 
-    public Double getTouchPrice1() {
-        return touchPrice1;
+    public String getCategoryType1() {
+        return categoryType1;
     }
 
-    public void setTouchPrice1(Double touchPrice1) {
-        this.touchPrice1 = touchPrice1;
+    public void setCategoryType1(String categoryType1) {
+        this.categoryType1 = categoryType1;
     }
 
-    public Double getTouchPrice2() {
-        return touchPrice2;
+    public BigDecimal getCouponAmount1() {
+        return couponAmount1;
     }
 
-    public void setTouchPrice2(Double touchPrice2) {
-        this.touchPrice2 = touchPrice2;
+    public void setCouponAmount1(BigDecimal couponAmount1) {
+        this.couponAmount1 = couponAmount1;
     }
 
-    public Double getTouchPrice3() {
-        return touchPrice3;
+    public BigDecimal getCouponAmount2() {
+        return couponAmount2;
     }
 
-    public void setTouchPrice3(Double touchPrice3) {
-        this.touchPrice3 = touchPrice3;
+    public void setCouponAmount2(BigDecimal couponAmount2) {
+        this.couponAmount2 = couponAmount2;
     }
 
-    public Double getTouchPrice4() {
-        return touchPrice4;
+    public BigDecimal getCouponAmount3() {
+        return couponAmount3;
     }
 
-    public void setTouchPrice4(Double touchPrice4) {
-        this.touchPrice4 = touchPrice4;
+    public void setCouponAmount3(BigDecimal couponAmount3) {
+        this.couponAmount3 = couponAmount3;
     }
 
-    public String getProductType1() {
-        return productType1;
+    public BigDecimal getCouponAmount4() {
+        return couponAmount4;
     }
 
-    public void setProductType1(String productType1) {
-        this.productType1 = productType1;
+    public void setCouponAmount4(BigDecimal couponAmount4) {
+        this.couponAmount4 = couponAmount4;
     }
 
-    public Double getProductType2() {
-        return productType2;
+    public BigDecimal getTouchPrice1() {
+        return touchPrice1;
     }
 
-    public void setProductType2(Double productType2) {
-        this.productType2 = productType2;
+    public void setTouchPrice1(BigDecimal touchPrice1) {
+        this.touchPrice1 = touchPrice1;
     }
 
-    public Double getProductType3() {
-        return productType3;
+    public BigDecimal getTouchPrice2() {
+        return touchPrice2;
     }
 
-    public void setProductType3(Double productType3) {
-        this.productType3 = productType3;
+    public void setTouchPrice2(BigDecimal touchPrice2) {
+        this.touchPrice2 = touchPrice2;
     }
 
-    public Double getProductType4() {
-        return productType4;
+    public BigDecimal getTouchPrice3() {
+        return touchPrice3;
     }
 
-    public void setProductType4(Double productType4) {
-        this.productType4 = productType4;
+    public void setTouchPrice3(BigDecimal touchPrice3) {
+        this.touchPrice3 = touchPrice3;
     }
 
-    public String getCategoryType1() {
-        return categoryType1;
+    public BigDecimal getTouchPrice4() {
+        return touchPrice4;
     }
 
-    public void setCategoryType1(String categoryType1) {
-        this.categoryType1 = categoryType1;
+    public void setTouchPrice4(BigDecimal touchPrice4) {
+        this.touchPrice4 = touchPrice4;
     }
 
     public String getCategoryType2() {

+ 7 - 3
src/main/java/com/caimei/modules/coupon/web/CmVipCouponController.java

@@ -9,6 +9,7 @@ import com.caimei.modules.user.dao.CmUserDao;
 import com.caimei.modules.user.dao.NewCmClubDao;
 import com.caimei.modules.user.entity.CmUser;
 import com.caimei.modules.user.entity.NewCmClub;
+import com.caimei.po.Coupon;
 import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.utils.StringUtils;
@@ -80,11 +81,14 @@ public class CmVipCouponController {
      */
     @RequestMapping(value = "save")
     public String save(SvipCouponForm svipcouponForm, Model model, RedirectAttributes redirectAttributes) {
-
-
         // 解析SvipCouponForm -> 组装 CmCoupon 列表 保存
+        //0活动券 1品类券 3店铺券
+        CmCoupon coupon = new CmCoupon();
+        if(svipcouponForm.getCouponType1().equals("0")){
+            coupon.setCouponType(svipcouponForm.getCouponType1());
+            coupon.setTouchPrice(svipcouponForm.getTouchPrice1());
 
-
+        }
 
         addMessage(redirectAttributes, "保存超级会员专属优惠券成功");
         return "redirect:"+ Global.getAdminPath()+"/vip/cmCoupon/?repage";

+ 114 - 96
src/main/resources/mappings/modules/super/CmSvipCouponMapper.xml

@@ -2,104 +2,122 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.caimei.modules.coupon.dao.CmCouponVipDao">
 
-    <sql id="cmCouponColumns">
-        a.id AS "id",
-		a.name AS "name",
-		a.couponAmount AS "couponAmount",
-		a.touchPrice AS "touchPrice",
-		a.startDate AS "startDate",
-		a.endDate AS "endDate",
-		a.status AS "status",
-		a.couponType AS "couponType",
-		a.userId AS "userId",
-		a.shopId AS "shopId",
-		a.productType AS "productType",
-		a.pcBanner AS "pcBanner",
-		a.appletsBanner AS "appletsBanner",
-		a.categoryType AS "categoryType",
-		a.couponsMode AS "couponsMode",
-		a.createDate AS "createDate",
-		a.delFlag AS "delFlag"
-    </sql>
+<!--    <sql id="cmCouponColumns">-->
+<!--        a.id AS "id",-->
+<!--		a.name AS "name",-->
+<!--		a.couponAmount AS "couponAmount",-->
+<!--		a.touchPrice AS "touchPrice",-->
+<!--		a.startDate AS "startDate",-->
+<!--		a.endDate AS "endDate",-->
+<!--		a.status AS "status",-->
+<!--		a.couponType AS "couponType",-->
+<!--		a.userId AS "userId",-->
+<!--		a.shopId AS "shopId",-->
+<!--		a.productType AS "productType",-->
+<!--		a.pcBanner AS "pcBanner",-->
+<!--		a.appletsBanner AS "appletsBanner",-->
+<!--		a.categoryType AS "categoryType",-->
+<!--		a.couponsMode AS "couponsMode",-->
+<!--		a.createDate AS "createDate",-->
+<!--		a.delFlag AS "delFlag"-->
+<!--    </sql>-->
 
-    <sql id="cmCouponJoins">
-    </sql>
+<!--    <sql id="cmCouponJoins">-->
+<!--    </sql>-->
 
-    <select id="findAllVipCouponDao" resultType="com.caimei.modules.coupon.entity.CmVipCoupon">
-        SELECT
-        <include refid="cmCouponColumns"/>,
-        u.name AS "clubName",
-        s.name AS "shopName"
-        FROM cm_coupon a
-        LEFT JOIN cm_coupon_club ccc ON ccc.couponId = a.id
-        LEFT JOIN USER u ON u.userID = a.userId
-        LEFT JOIN shop s ON s.shopID = a.shopId
-        <include refid="cmCouponJoins"/>
-        <where>
-            AND a.delFlag = 0
-            <if test="couponType != null">
-                AND a.couponType = #{couponType}
-            </if>
-            <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="startDate != null and startDate != ''">
-                AND a.startDate <![CDATA[ >= ]]> #{startDate}
-            </if>
-            <if test="endDate != null and endDate != ''">
-                AND a.endDate <![CDATA[ <= ]]> #{endDate}
-            </if>
-            <if test='status == "0"'>
-                AND a.startDate <![CDATA[ > ]]> NOW()
-            </if>
-            <if test='status == "1"'>
-                AND a.startDate <![CDATA[ <= ]]> NOW()
-                AND a.endDate <![CDATA[ >= ]]> NOW()
-                AND a.status != '2'
-            </if>
-            <if test='status == "2"'>
-                AND a.status = '2'
-            </if>
-            <if test='status == "3"'>
-                AND a.endDate <![CDATA[ < ]]> NOW()
-            </if>
-            <if test="clubName != null and clubName != ''">
-                AND u.name LIKE concat('%',#{clubName},'%')
-            </if>
-            <if test='claimStatus == "1"'>
-                AND ccc.id IS NULL
-            </if>
-            <if test='claimStatus == "2"'>
-                AND ccc.id IS NOT NULL
-            </if>
-            <if test='useStatus == "1"'>
-                AND (ccc.status IS NULL OR ccc.status = #{useStatus})
-            </if>
-            <if test='useStatus == "2"'>
-                AND ccc.status = #{useStatus}
-            </if>
-            <if test="source != null and source != ''">
-                AND ccc.source = #{source}
-            </if>
-            <if test="shopName != null and shopName != ''">
-                AND s.name LIKE concat('%',#{shopName},'%')
-            </if>
-            <if test="couponsMode != null and couponsMode != ''">
-                AND a.couponsMode = #{couponsMode}
-            </if>
-        </where>
-        GROUP BY a.id
-        <choose>
-            <when test="page !=null and page.orderBy != null and page.orderBy != ''">
-                ORDER BY ${page.orderBy}
-            </when>
-            <otherwise>
-                ORDER BY createDate DESC
-            </otherwise>
-        </choose>
+<!--    SELECT-->
+<!--    <include refid="cmCouponColumns"/>,-->
+<!--    u.name AS "clubName",-->
+<!--    s.name AS "shopName"-->
+<!--    FROM cm_coupon a-->
+<!--    LEFT JOIN cm_coupon_club ccc ON ccc.couponId = a.id-->
+<!--    LEFT JOIN USER u ON u.userID = a.userId-->
+<!--    LEFT JOIN shop s ON s.shopID = a.shopId-->
+<!--    <include refid="cmCouponJoins"/>-->
+<!--    <where>-->
+<!--        AND a.delFlag = 0-->
+<!--        <if test="couponType != null">-->
+<!--            AND a.couponType = #{couponType}-->
+<!--        </if>-->
+<!--        <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="startDate != null and startDate != ''">-->
+<!--            AND a.startDate <![CDATA[ >= ]]> #{startDate}-->
+<!--        </if>-->
+<!--        <if test="endDate != null and endDate != ''">-->
+<!--            AND a.endDate <![CDATA[ <= ]]> #{endDate}-->
+<!--        </if>-->
+<!--        <if test='status == "0"'>-->
+<!--            AND a.startDate <![CDATA[ > ]]> NOW()-->
+<!--        </if>-->
+<!--        <if test='status == "1"'>-->
+<!--            AND a.startDate <![CDATA[ <= ]]> NOW()-->
+<!--            AND a.endDate <![CDATA[ >= ]]> NOW()-->
+<!--            AND a.status != '2'-->
+<!--        </if>-->
+<!--        <if test='status == "2"'>-->
+<!--            AND a.status = '2'-->
+<!--        </if>-->
+<!--        <if test='status == "3"'>-->
+<!--            AND a.endDate <![CDATA[ < ]]> NOW()-->
+<!--        </if>-->
+<!--        <if test="clubName != null and clubName != ''">-->
+<!--            AND u.name LIKE concat('%',#{clubName},'%')-->
+<!--        </if>-->
+<!--        <if test='claimStatus == "1"'>-->
+<!--            AND ccc.id IS NULL-->
+<!--        </if>-->
+<!--        <if test='claimStatus == "2"'>-->
+<!--            AND ccc.id IS NOT NULL-->
+<!--        </if>-->
+<!--        <if test='useStatus == "1"'>-->
+<!--            AND (ccc.status IS NULL OR ccc.status = #{useStatus})-->
+<!--        </if>-->
+<!--        <if test='useStatus == "2"'>-->
+<!--            AND ccc.status = #{useStatus}-->
+<!--        </if>-->
+<!--        <if test="source != null and source != ''">-->
+<!--            AND ccc.source = #{source}-->
+<!--        </if>-->
+<!--        <if test="shopName != null and shopName != ''">-->
+<!--            AND s.name LIKE concat('%',#{shopName},'%')-->
+<!--        </if>-->
+<!--        <if test="couponsMode != null and couponsMode != ''">-->
+<!--            AND a.couponsMode = #{couponsMode}-->
+<!--        </if>-->
+<!--    </where>-->
+<!--    GROUP BY a.id-->
+<!--    <choose>-->
+<!--        <when test="page !=null and page.orderBy != null and page.orderBy != ''">-->
+<!--            ORDER BY ${page.orderBy}-->
+<!--        </when>-->
+<!--        <otherwise>-->
+<!--            ORDER BY createDate DESC-->
+<!--        </otherwise>-->
+<!--    </choose>-->
+
+    <select id="findAllVipCoupon" resultType="com.caimei.modules.coupon.entity.CmVipCoupon">
+        SELECT cc.`id` AS "couponId",
+        cc.`couponAmount`,
+        cc.`touchPrice`,
+        cc.`startDate`,
+        cc.`endDate`,
+        cc.`couponType`,
+        cc.`shopId`,
+        cc.`productType`,
+        cc.`categoryType`
+        FROM cm_coupon cc
+        INNER JOIN cm_svip_coupon cs ON cs.couponId = cc.id
+        WHERE cc.delFlag = 0
+        AND cc.status != 2
+        <if test="useTime != null and userTime != ''">
+            AND cs.useTime=#{userTime}
+        </if>
+        ORDER BY cs.created_time DESC
     </select>
 
 

+ 167 - 5
src/main/webapp/WEB-INF/views/modules/svip/cmSvipCouponForm.jsp

@@ -49,10 +49,23 @@
         <div class="control-group coupon-line l0" style="display:none">
             <label class="control-label"><font color="red">*</font>供应商:</label>
             <div class="controls">
-                <a href="javascript:;">请选择供应商</a>
+                <a href="javascript:void(0);" onclick="showSelectShop()" id="chooseShop">请选择供应商</a>
                 <form:hidden path="shopId1"/>
+                <table id="contentTableShop" class="table table-striped table-bordered table-condensed" hidden="hidden">
+                    <thead>
+                    <tr>
+                        <th>机构名称</th>
+                        <th>机构简称</th>
+                        <th>联系人</th>
+                        <th>手机号</th>
+                        <th>操作</th>
+                    </tr>
+                    </thead>
+                    <tbody id="hotSearchShop1"></tbody>
+                </table>
             </div>
         </div>
+
         <div class="control-group coupon-line l1" style="display:none">
             <label class="control-label"><font color="red">*</font>优惠券金额:</label>
             <div class="controls">
@@ -79,6 +92,51 @@
                 <form:radiobutton path="productType1" value="2" label="指定商品"/>
             </div>
         </div>
+<%--        <div class="productData" hidden="hidden">--%>
+<%--            <div class="control-group">--%>
+<%--                <label class="control-label"><font color="red">*</font>网站活动页banner:</label>--%>
+<%--                <div class="controls upload-content-image iconBox">--%>
+<%--                    <div class="conList">--%>
+<%--                        <form:hidden id="pcBanner" path="pcBanner" htmlEscape="false" maxlength="255" class="input-xlarge"/>--%>
+<%--                        <sys:ckfinder input="pcBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>--%>
+<%--                        <br>--%>
+<%--                    </div>--%>
+<%--                </div>--%>
+<%--            </div>--%>
+<%--            <div class="control-group">--%>
+<%--                <label class="control-label"><font color="red">*</font>小程序活动页banner:</label>--%>
+<%--                <div class="controls upload-content-image iconBox">--%>
+<%--                    <div class="conList">--%>
+<%--                        <form:hidden id="appletsBanner" path="appletsBanner" htmlEscape="false" maxlength="255" class="input-xlarge"/>--%>
+<%--                        <sys:ckfinder input="appletsBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>--%>
+<%--                        <br>--%>
+<%--                    </div>--%>
+<%--                </div>--%>
+<%--            </div>--%>
+<%--            <div class="control-group">--%>
+<%--                <input class="btn" id="del" style="width: 50px" onclick="batchDeletion()" value="删除"/>&nbsp;&nbsp;&nbsp;&nbsp;--%>
+<%--                <input class="btn btn-primary" style="width: 70px" onclick="batchSaveSort()" value="一键排序"/>&nbsp;&nbsp;&nbsp;&nbsp;--%>
+<%--                <input class="btn btn-primary" style="width: 50px" onclick="showSelectProduct()" value="添加"/>--%>
+<%--                <br><br>--%>
+<%--                <table id="contentTableProduct" class="table table-striped table-bordered table-condensed" hidden="hidden">--%>
+<%--                    <thead>--%>
+<%--                    <tr>--%>
+<%--                        <th style="width:20px;"><input class="check-all" type="checkbox" onclick="clickAllSelect(this)"/> 全选--%>
+<%--                        </th>--%>
+<%--                        <th>商品图片</th>--%>
+<%--                        <th>商品名称</th>--%>
+<%--                        <th>供应商</th>--%>
+<%--                        <th>网站状态</th>--%>
+<%--                        <th>小程序状态</th>--%>
+<%--                        <th>排序</th>--%>
+<%--                        <th>添加时间</th>--%>
+<%--                        <th>操作</th>--%>
+<%--                    </tr>--%>
+<%--                    </thead>--%>
+<%--                    <tbody id="hotSearchProduct"></tbody>--%>
+<%--                </table>--%>
+<%--            </div>--%>
+<%--        </div>--%>
     </div>
     <div class="coupon-wrap">
         <div class="control-group">
@@ -93,8 +151,20 @@
         <div class="control-group coupon-line l0" style="display:none">
             <label class="control-label"><font color="red">*</font>供应商:</label>
             <div class="controls">
-                <a href="javascript:;">请选择供应商</a>
+                <a href="javascript:void(0);" onclick="showSelectShop()" id="chooseShop">请选择供应商</a>
                 <form:hidden path="shopId2"/>
+                <table id="contentTableShop" class="table table-striped table-bordered table-condensed" hidden="hidden">
+                    <thead>
+                    <tr>
+                        <th>机构名称</th>
+                        <th>机构简称</th>
+                        <th>联系人</th>
+                        <th>手机号</th>
+                        <th>操作</th>
+                    </tr>
+                    </thead>
+                    <tbody id="hotSearchShop2"></tbody>
+                </table>
             </div>
         </div>
         <div class="control-group coupon-line l1" style="display:none">
@@ -135,10 +205,22 @@
             </div>
         </div>
         <div class="control-group coupon-line l0" style="display:none">
-            <label class="control-label"><font color="red">*</font>供应商:</label>
+
             <div class="controls">
                 <a href="javascript:;">请选择供应商</a>
                 <form:hidden path="shopId3"/>
+                <table id="contentTableShop" class="table table-striped table-bordered table-condensed" hidden="hidden">
+                    <thead>
+                    <tr>
+                        <th>机构名称</th>
+                        <th>机构简称</th>
+                        <th>联系人</th>
+                        <th>手机号</th>
+                        <th>操作</th>
+                    </tr>
+                    </thead>
+                    <tbody id="hotSearchShop3"></tbody>
+                </table>
             </div>
         </div>
         <div class="control-group coupon-line l1" style="display:none">
@@ -181,8 +263,23 @@
         <div class="control-group coupon-line l0" style="display:none">
             <label class="control-label"><font color="red">*</font>供应商:</label>
             <div class="controls">
-                <a href="javascript:;">请选择供应商</a>
-                <form:hidden path="shopId4"/>
+                <div class="controls">
+                    <a href="javascript:void(0);" onclick="showSelectShop()" id="chooseShop">请选择供应商</a>
+                    <form:hidden path="shopId4"/>
+                    <table id="contentTableShop" class="table table-striped table-bordered table-condensed" hidden="hidden">
+                        <thead>
+                        <tr>
+                            <th>机构名称</th>
+                            <th>机构简称</th>
+                            <th>联系人</th>
+                            <th>手机号</th>
+                            <th>操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="hotSearchShop4"></tbody>
+                    </table>
+                </div>
+
             </div>
         </div>
         <div class="control-group coupon-line l1" style="display:none">
@@ -236,6 +333,71 @@
         }
     });
 
+    // 点击添加供应商
+    function showSelectShop() {
+        var url = "${ctx}/coupon/cmCoupon/toAddShop";
+        var title = '';
+        title = "选择供应商";
+        top.$.jBox("iframe:" + url, {
+            iframeScrolling: 'yes',
+            width: $(top.document).width() - 400,
+            height: $(top.document).height() - 160,
+            persistent: true,
+            title: title,
+            buttons: {"确定": '1', "取消": '-1'},
+            submit: function (v, h, f) {
+                //确定
+                var $jboxFrame = top.$('#jbox-iframe');
+                var $mainFrame = top.$('#mainFrame');
+                if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
+                    var items = $jboxFrame[0].contentWindow.getCheckedItems();
+                    console.log(items);
+                    appendShopOrderHead(items);
+                }
+                return true;
+            }
+        });
+    }
+
+    $(function() {
+        //店铺券供应商回显
+        if (${not empty cmCoupon.shop}) {
+            var shop = {
+                "shopId": "${cmCoupon.shop.shopID}",
+                "name": "${cmCoupon.shop.name}",
+                "sname": "${cmCoupon.shop.sname}",
+                "linkMan": "${cmCoupon.shop.linkMan}",
+                "contractMobile": "${cmCoupon.shop.contractMobile}"
+            }
+            appendShopOrderHead(shop);
+        }
+    });
+
+    function appendShopOrderHead(data) {
+        var html = '<tr>' +
+            '<td>' +
+            data.name +
+            '</td>' +
+            '<td>' +
+            data.sname +
+            '</td>' +
+            '<td>' +
+            data.linkMan +
+            '</td>' +
+            '<td>' +
+            data.contractMobile +
+            '</td>' +
+            '<td>' +
+            '<a href="javascript:;" onclick="delectShop()">删除</a>' +
+            '</td>' +
+            '</tr>';
+        $("#hotSearchShop").html(html);
+        $("#chooseShop").hide();
+        $('#contentTableShop').show();
+        $("#shopId").val(data.shopId);
+    }
+
+
     /**
      * @param obj
      * jquery控制input只能输入数字