瀏覽代碼

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

Aslee 3 年之前
父節點
當前提交
ef6b8891c4

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

@@ -2,6 +2,7 @@ package com.caimei.modules.coupon.dao;
 
 import com.caimei.modules.coupon.entity.CmVipCoupon;
 import com.caimei.modules.coupon.entity.SvipCouponList;
+import com.caimei.modules.user.entity.NewCmShop;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 import org.apache.ibatis.annotations.Param;
 
@@ -33,7 +34,7 @@ public interface CmCouponVipDao {
      * @param shopId
      * @return
      */
-    String findShopName(Integer shopId);
+    NewCmShop findShopName(Integer shopId);
 
     List<CmVipCoupon> findGroup(String useTime, Integer status);
 

+ 76 - 0
src/main/java/com/caimei/modules/coupon/entity/SvipCouponForm.java

@@ -1,9 +1,11 @@
 package com.caimei.modules.coupon.entity;
 
+import com.caimei.modules.user.entity.NewCmShop;
 import com.thinkgem.jeesite.common.persistence.DataEntity;
 
 import java.math.BigDecimal;
 import java.util.Date;
+import java.util.List;
 
 /**
  * Description
@@ -19,6 +21,11 @@ public class SvipCouponForm extends DataEntity<SvipCouponForm> {
 
     private String status;
 
+    private NewCmShop shop1;
+    private NewCmShop shop2;
+    private NewCmShop shop3;
+    private NewCmShop shop4;
+
     private String productInfo1;        //商品json数据
     private String productInfo2;        //商品json数据
     private String productInfo3;        //商品json数据
@@ -29,6 +36,11 @@ public class SvipCouponForm extends DataEntity<SvipCouponForm> {
     private String shopName3;
     private String shopName4;
 
+    //商品回显
+    private List<CmCouponAssociate> associateList1;
+    private List<CmCouponAssociate> associateList2;
+    private List<CmCouponAssociate> associateList3;
+    private List<CmCouponAssociate> associateList4;
 //    /**
 //     * 网站活动页banner
 //     */
@@ -94,6 +106,70 @@ public class SvipCouponForm extends DataEntity<SvipCouponForm> {
     private Integer shopId3;
     private Integer shopId4;
 
+    public NewCmShop getShop1() {
+        return shop1;
+    }
+
+    public void setShop1(NewCmShop shop1) {
+        this.shop1 = shop1;
+    }
+
+    public NewCmShop getShop2() {
+        return shop2;
+    }
+
+    public void setShop2(NewCmShop shop2) {
+        this.shop2 = shop2;
+    }
+
+    public NewCmShop getShop3() {
+        return shop3;
+    }
+
+    public void setShop3(NewCmShop shop3) {
+        this.shop3 = shop3;
+    }
+
+    public NewCmShop getShop4() {
+        return shop4;
+    }
+
+    public void setShop4(NewCmShop shop4) {
+        this.shop4 = shop4;
+    }
+
+    public List<CmCouponAssociate> getAssociateList1() {
+        return associateList1;
+    }
+
+    public void setAssociateList1(List<CmCouponAssociate> associateList1) {
+        this.associateList1 = associateList1;
+    }
+
+    public List<CmCouponAssociate> getAssociateList2() {
+        return associateList2;
+    }
+
+    public void setAssociateList2(List<CmCouponAssociate> associateList2) {
+        this.associateList2 = associateList2;
+    }
+
+    public List<CmCouponAssociate> getAssociateList3() {
+        return associateList3;
+    }
+
+    public void setAssociateList3(List<CmCouponAssociate> associateList3) {
+        this.associateList3 = associateList3;
+    }
+
+    public List<CmCouponAssociate> getAssociateList4() {
+        return associateList4;
+    }
+
+    public void setAssociateList4(List<CmCouponAssociate> associateList4) {
+        this.associateList4 = associateList4;
+    }
+
     public String getShopName1() {
         return shopName1;
     }

+ 68 - 14
src/main/java/com/caimei/modules/coupon/service/CmVipCouponService.java

@@ -3,13 +3,12 @@ package com.caimei.modules.coupon.service;
 import com.caimei.modules.coupon.dao.CmCouponDao;
 import com.caimei.modules.coupon.dao.CmCouponVipDao;
 import com.caimei.modules.coupon.dao.SvipCouponListDao;
-import com.caimei.modules.coupon.entity.CmCoupon;
-import com.caimei.modules.coupon.entity.CmVipCoupon;
-import com.caimei.modules.coupon.entity.SvipCouponForm;
-import com.caimei.modules.coupon.entity.SvipCouponList;
+import com.caimei.modules.coupon.entity.*;
+import com.caimei.modules.user.entity.NewCmShop;
 import com.caimei.modules.utils.DateUtil;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.service.CrudService;
+import com.thinkgem.jeesite.common.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -38,12 +37,27 @@ public class CmVipCouponService extends CrudService<SvipCouponListDao, SvipCoupo
         String month = svipcouponForm.getMonth();
         Date beginTime = DateUtil.getMinDay(month);
         Date lastTime = DateUtil.getMaxDay(month);
+
         // 解析SvipCouponForm -> 组装 CmCoupon 列表 保存
         //0活动券 1品类券 3店铺券
         CmCoupon coupon1 = new CmCoupon();
         CmCoupon coupon2 = new CmCoupon();
         CmCoupon coupon3 = new CmCoupon();
         CmCoupon coupon4 = new CmCoupon();
+        if (couponId1 != null && flag.equals("0")) {
+            CmVipCoupon byCoupon = vipDao.findByCoupon(couponId1, null);
+            String bindCoupon = byCoupon.getBindCoupon();
+            String[] split = bindCoupon.split(",");
+            List<CmCoupon> cmCoupons = new ArrayList<>();
+            for (String s : split) {
+                CmCoupon coupon = cmCouponDao.get(s);
+                cmCoupons.add(coupon);
+            }
+            coupon1.setId(cmCoupons.get(0).getId());
+            coupon2.setId(cmCoupons.get(1).getId());
+            coupon3.setId(cmCoupons.get(2).getId());
+            coupon4.setId(cmCoupons.get(3).getId());
+        }
         CmVipCoupon vipCoupon1 = new CmVipCoupon();
         CmVipCoupon vipCoupon2 = new CmVipCoupon();
         CmVipCoupon vipCoupon3 = new CmVipCoupon();
@@ -132,7 +146,6 @@ public class CmVipCouponService extends CrudService<SvipCouponListDao, SvipCoupo
             coupon4.setShopId(svipcouponForm.getShopId4());
             coupon4.setCouponType(3);
         }
-
         cmCouponService.save(coupon1);
         cmCouponService.save(coupon2);
         cmCouponService.save(coupon3);
@@ -282,53 +295,94 @@ public class CmVipCouponService extends CrudService<SvipCouponListDao, SvipCoupo
         form.setTouchPrice4(coupon4.getTouchPrice());
         form.setCouponType4(coupon4.getCouponType());
 
-        //todo 等于0的时候活动券productinfo查出来还回去
+        //等于0的时候活动券productinfo查出来还回去
         if (coupon1.getCouponType() == 0) {
             form.setProductType1(coupon1.getProductType());
+            if ("2".equals(coupon1.getProductType())) {
+                List<CmCouponAssociate> associateList = new ArrayList<>();
+                Integer couponId = coupon1.getCouponId();
+                CmCoupon coupon = new CmCoupon();
+                coupon.setId(couponId.toString());
+                associateList = cmCouponService.findByProductType(coupon);
+                form.setAssociateList1(associateList);
+            }
         }
         if (coupon1.getCouponType() == 1) {
             form.setCategoryType1(coupon1.getCategoryType());
         }
+        // 塞入"shopId": "${cmCoupon.shop.shopID}",
+        //                "name": "${cmCoupon.shop.name}",
+        //                "sname": "${cmCoupon.shop.sname}",
+        //                "linkMan": "${cmCoupon.shop.linkMan}",
+        //                "contractMobile": "${cmCoupon.shop.contractMobile}"
         if (coupon1.getCouponType() == 3) {
             form.setShopId1(coupon1.getShopId());
-            String shopName = vipDao.findShopName(coupon1.getShopId());
-            form.setShopName1(shopName);
+            NewCmShop shop = vipDao.findShopName(coupon1.getShopId());
+            form.setShopName1(shop.getName());
+            form.setShop1(shop);
         }
 
         if (coupon2.getCouponType() == 0) {
             form.setProductType2(coupon2.getProductType());
+            if ("2".equals(coupon2.getProductType())) {
+                List<CmCouponAssociate> associateList = new ArrayList<>();
+                Integer couponId = coupon2.getCouponId();
+                CmCoupon coupon = new CmCoupon();
+                coupon.setId(couponId.toString());
+                associateList = cmCouponService.findByProductType(coupon);
+                form.setAssociateList2(associateList);
+            }
         }
         if (coupon2.getCouponType() == 1) {
             form.setCategoryType2(coupon2.getCategoryType());
         }
         if (coupon2.getCouponType() == 3) {
             form.setShopId2(coupon2.getShopId());
-            String shopName = vipDao.findShopName(coupon2.getShopId());
-            form.setShopName2(shopName);
+            NewCmShop shop = vipDao.findShopName(coupon2.getShopId());
+            form.setShopName2(shop.getName());
+            form.setShop2(shop);
         }
 
         if (coupon3.getCouponType() == 0) {
             form.setProductType3(coupon3.getProductType());
+            if ("2".equals(coupon3.getProductType())) {
+                List<CmCouponAssociate> associateList = new ArrayList<>();
+                Integer couponId = coupon3.getCouponId();
+                CmCoupon coupon = new CmCoupon();
+                coupon.setId(couponId.toString());
+                associateList = cmCouponService.findByProductType(coupon);
+                form.setAssociateList3(associateList);
+            }
         }
         if (coupon3.getCouponType() == 1) {
             form.setCategoryType3(coupon3.getCategoryType());
         }
         if (coupon3.getCouponType() == 3) {
             form.setShopId3(coupon3.getShopId());
-            String shopName = vipDao.findShopName(coupon3.getShopId());
-            form.setShopName3(shopName);
+            NewCmShop shop = vipDao.findShopName(coupon3.getShopId());
+            form.setShopName3(shop.getName());
+            form.setShop3(shop);
         }
 
         if (coupon4.getCouponType() == 0) {
             form.setProductType4(coupon4.getProductType());
+            if ("2".equals(coupon4.getProductType())) {
+                List<CmCouponAssociate> associateList = new ArrayList<>();
+                Integer couponId = coupon4.getCouponId();
+                CmCoupon coupon = new CmCoupon();
+                coupon.setId(couponId.toString());
+                associateList = cmCouponService.findByProductType(coupon);
+                form.setAssociateList4(associateList);
+            }
         }
         if (coupon4.getCouponType() == 1) {
             form.setCategoryType4(coupon4.getCategoryType());
         }
         if (coupon4.getCouponType() == 3) {
             form.setShopId4(coupon4.getShopId());
-            String shopName = vipDao.findShopName(coupon4.getShopId());
-            form.setShopName4(shopName);
+            NewCmShop shop = vipDao.findShopName(coupon4.getShopId());
+            form.setShopName4(shop.getName());
+            form.setShop4(shop);
         }
 
         return form;

+ 8 - 0
src/main/java/com/caimei/modules/order/dao/CmDiscernReceiptDao.java

@@ -83,4 +83,12 @@ public interface CmDiscernReceiptDao extends CrudDao<CmDiscernReceipt> {
     Integer findOrderLastReceiptDetailId(String orderID);
 
     Date findSplitTime(Integer orderID);
+
+    Integer getVipRecordId(String receiptId);
+
+    Integer getVipUserId(Integer vipRecordId);
+
+    String getUserNameByUserId(Integer userId);
+
+    ReceiptVipInfoVo getReceiptVipInfo(String receiptID);
 }

+ 1 - 1
src/main/java/com/caimei/modules/order/entity/CmDiscernReceipt.java

@@ -110,7 +110,7 @@ public class CmDiscernReceipt extends DataEntity<CmDiscernReceipt> {
         this.payType = payType;
     }
 
-    @Length(min = 0, max = 1, message = "收款款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单)长度必须介于 0 和 1 之间")
+    @Length(min = 0, max = 1, message = "收款款项类型:1订单款,2非订单款,3返佣款,4订单款或者非订单款(因财务阶段无法区分订单非订单),5供应商退款,6超级会员款")
     public String getReceiptType() {
         return receiptType;
     }

+ 9 - 0
src/main/java/com/caimei/modules/order/entity/ReceiptDetailVo.java

@@ -29,8 +29,17 @@ public class ReceiptDetailVo {
     private String noOrderReason; //确认原因    非订单款项的确认原因
     private String confirmTime; //确认时间    非订单款项的确认时间
     private List<ReceiptOrderInfoVo> orderInfos; //一个收款可能会关联了一个或多个订单
+    private ReceiptVipInfoVo vipInfo;// 一个收款关联一个会员记录
     private boolean receiptOrderFlag;// 判断订单中抹平的订单是否是和多个订单一起支付的,
 
+    public ReceiptVipInfoVo getVipInfo() {
+        return vipInfo;
+    }
+
+    public void setVipInfo(ReceiptVipInfoVo vipInfo) {
+        this.vipInfo = vipInfo;
+    }
+
     public String getRebateRemarks() {
         return rebateRemarks;
     }

+ 1 - 1
src/main/java/com/caimei/modules/order/entity/ReceiptOrderInfoVo.java

@@ -16,7 +16,7 @@ public class ReceiptOrderInfoVo {
     private String receiptStatus;//(收款买家)收款状态:1待收款、2部分收款、3已收款
     private String orderType;//订单类型 协销订单 0 普通订单 1
     private String orderTime;//下单时间
-    private String relationType;        // 关系类型:1返佣订单(返佣款)、2非返佣订单(订单款或者非订单款)
+    private String relationType;        // 关系类型:1返佣订单(返佣款或供应商退款)、2非返佣订单(订单款或者非订单款)、3超级会员款
     private Integer userID;     //订单用户id
 
     //----------------返佣款项   是根据子订单再去关联的主订单

+ 120 - 0
src/main/java/com/caimei/modules/order/entity/ReceiptVipInfoVo.java

@@ -0,0 +1,120 @@
+package com.caimei.modules.order.entity;
+
+import java.util.Date;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2021/10/13
+ */
+public class ReceiptVipInfoVo {
+    /**
+     * 记录Id
+     */
+    private Integer id;
+    /**
+     * 用户Id
+     */
+    private Integer userId;
+    /**
+     * Vip套餐Id
+     */
+    private Integer packageId;
+    /**
+     * 开始时间
+     */
+    private Date beginTime;
+    /**
+     * 结束时间
+     */
+    private Date endTime;
+    /**
+     * 套餐时长(月)
+     */
+    private Integer duration;
+    /**
+     * 支付金额
+     */
+    private Double price;
+    /**
+     * 支付时间
+     */
+    private Date payTime;
+    /**
+     * 商户唯一订单请求号(订单编号#随机时间戳)
+     */
+    private String orderRequestNo;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
+
+    public Integer getPackageId() {
+        return packageId;
+    }
+
+    public void setPackageId(Integer packageId) {
+        this.packageId = packageId;
+    }
+
+    public Date getBeginTime() {
+        return beginTime;
+    }
+
+    public void setBeginTime(Date beginTime) {
+        this.beginTime = beginTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    public Integer getDuration() {
+        return duration;
+    }
+
+    public void setDuration(Integer duration) {
+        this.duration = duration;
+    }
+
+    public Double getPrice() {
+        return price;
+    }
+
+    public void setPrice(Double price) {
+        this.price = price;
+    }
+
+    public Date getPayTime() {
+        return payTime;
+    }
+
+    public void setPayTime(Date payTime) {
+        this.payTime = payTime;
+    }
+
+    public String getOrderRequestNo() {
+        return orderRequestNo;
+    }
+
+    public void setOrderRequestNo(String orderRequestNo) {
+        this.orderRequestNo = orderRequestNo;
+    }
+}

+ 15 - 2
src/main/java/com/caimei/modules/order/service/CmDiscernReceiptService.java

@@ -90,12 +90,20 @@ public class CmDiscernReceiptService extends CrudService<CmDiscernReceiptDao, Cm
                     } else {
                         type += ("<br>" + (map.get("orderType").toString().equals("0") ? "协销" : "自主"));
                     }
-                    if ("".equals(no))
+                    if ("".equals(no)) {
                         no += "<a href='/a/order/detail?id=" + map.get("orderID") + "'>" + map.get("orderNo") + "</a>";
-                    else
+                    } else {
                         no += ("<br><a href='/a/order/detail?id=" + map.get("orderID") + "'>" + map.get("orderNo")) + "</a>";
+                    }
                 }
             }
+            if ("6".equals(bean.getReceiptType())){
+                // 超级会员款
+                Integer vipRecordId = cmDiscernReceiptDao.getVipRecordId(bean.getId());
+                Integer userId = cmDiscernReceiptDao.getVipUserId(vipRecordId);
+                String userName = cmDiscernReceiptDao.getUserNameByUserId(userId);
+                bean.setName(userName);
+            }
             bean.setOrders(no);
             bean.setOrderType(type);
         });
@@ -165,6 +173,11 @@ public class CmDiscernReceiptService extends CrudService<CmDiscernReceiptDao, Cm
                 orderInfos.add(roi);
             }
         }
+        if ("6".equals(vo.getReceiptType())) {
+            // 3超级会员款
+            ReceiptVipInfoVo receiptVipInfo = cmDiscernReceiptDao.getReceiptVipInfo(vo.getReceiptID());
+            vo.setVipInfo(receiptVipInfo);
+        }
         vo.setOrderInfos(orderInfos);
         return vo;
     }

+ 3 - 3
src/main/resources/config/dev/caimei.properties

@@ -16,9 +16,9 @@ jdbc.url=jdbc:mysql://192.168.2.100:3306/caimei?useUnicode=true&characterEncodin
 jdbc.username=developer
 jdbc.password=05bZ/OxTB:X+yd%1
 
-#jdbc.url=jdbc:mysql://119.29.0.46:3306/caimei?characterEncoding=UTF8&serverTimezone=Asia/Shanghai
-#jdbc.username=general
-#jdbc.password=6#xsI%b4o@5c3RoE
+#jdbc.url=jdbc:mysql://120.79.25.27:3306/caimei?characterEncoding=UTF8&serverTimezone=Asia/Shanghai
+#jdbc.username=developer
+#jdbc.password=J5p3tgOVazNl4ydf
 
 #jdbc.url=jdbc:mysql://119.29.0.46:3306/caimei?useUnicode=true&characterEncoding=utf-8
 #jdbc.username=root

+ 26 - 0
src/main/resources/mappings/modules/order/CmDiscernReceiptMapper.xml

@@ -887,4 +887,30 @@
         LIMIT
           1
     </select>
+    <select id="getVipRecordId" resultType="java.lang.Integer">
+        select vipRecordId from cm_receipt_order_relation where receiptID=#{receiptId}
+    </select>
+    <select id="getVipUserId" resultType="java.lang.Integer">
+        select userId from cm_svip_history where id=#{vipRecordId}
+    </select>
+    <select id="getUserNameByUserId" resultType="java.lang.String">
+        select userName from user where userID = #{userId} LIMIT 1
+    </select>
+    <select id="getReceiptVipInfo" resultType="com.caimei.modules.order.entity.ReceiptVipInfoVo">
+        select svipr.id,
+               svipr.userId,
+               svipr.packageId,
+               svipr.beginTime,
+               svipr.endTime,
+               svipr.price,
+               svipr.payTime,
+               cror.orderRequestNo,
+               cror.vipRecordId,
+               svipp.duration
+        from cm_svip_history svipr
+        left join cm_receipt_order_relation cror on svipr.id = cror.vipRecordId
+        left join cm_svip_package svipp on svipp.id = svipr.packageId
+        where cror.receiptID=#{receiptID}
+        LIMIT 1
+    </select>
 </mapper>

+ 3 - 2
src/main/resources/mappings/modules/super/CmSvipCouponMapper.xml

@@ -31,6 +31,7 @@
         where couponId=#{couponId}
     </update>
 
+
     <!--    <sql id="cmCouponColumns">-->
     <!--        a.id AS "id",-->
     <!--		a.name AS "name",-->
@@ -168,8 +169,8 @@
         </if>
     </select>
 
-    <select id="findShopName" resultType="java.lang.String">
-        select name
+    <select id="findShopName" resultType="com.caimei.modules.user.entity.NewCmShop">
+        select name,sname,linkMan,contractMobile
         from shop
         where shopID = #{shopId}
     </select>

+ 88 - 42
src/main/webapp/WEB-INF/views/modules/order/cmDiscernReceiptForm.jsp

@@ -112,7 +112,17 @@
         .receipt-msg-wrapper {
             display: block;
         }
-        .weishaIcon {background:darkorange;color:white;margin:0 0px;padding:0 3px;font-style:normal;font-size: 12px; display:inline-block;border-radius:2px}
+
+        .weishaIcon {
+            background: darkorange;
+            color: white;
+            margin: 0 0px;
+            padding: 0 3px;
+            font-style: normal;
+            font-size: 12px;
+            display: inline-block;
+            border-radius: 2px
+        }
     </style>
     <script type="text/javascript">
         $(document).ready(function () {
@@ -165,6 +175,9 @@
                         </c:if>
                         <c:if test="${vo.receiptType == 5}">
                             供应商退款
+                        </c:if>
+                        <c:if test="${vo.receiptType == 6}">
+                            超级会员款
                         </c:if>
 					</span>
             <span><label>收款类型:</label>${fns:getPayTypeStr(vo.payType)}</span>
@@ -172,21 +185,21 @@
             <span><label>收款时间:</label>${vo.receiptDate}</span>
             <span><label>收款状态:</label>
                 <c:if test="${vo.payWay ne 3}">
-						<c:if test="${vo.receiptStatus == 1}">
-                            待确认
-                        </c:if>
-						<c:if test="${vo.receiptStatus == 2}">
-                            已确认
-                        </c:if>
-						<c:if test="${vo.receiptStatus == 3}">
-                            审核通过
-                        </c:if>
-						<c:if test="${vo.receiptStatus == 4}">
-                            审核未通过
-                        </c:if>
-						<c:if test="${vo.receiptStatus == 5}">
-                            <font color="red">收款撤销</font>
-                        </c:if>
+                    <c:if test="${vo.receiptStatus == 1}">
+                        待确认
+                    </c:if>
+                    <c:if test="${vo.receiptStatus == 2}">
+                        已确认
+                    </c:if>
+                    <c:if test="${vo.receiptStatus == 3}">
+                        审核通过
+                    </c:if>
+                    <c:if test="${vo.receiptStatus == 4}">
+                        审核未通过
+                    </c:if>
+                    <c:if test="${vo.receiptStatus == 5}">
+                        <font color="red">收款撤销</font>
+                    </c:if>
                 </c:if>
                 <c:if test="${vo.payWay eq 3}">
                     ----------
@@ -209,7 +222,7 @@
             </div>
         </c:if>
     </div>
-    <c:if test="${vo.receiptType != 2}">
+    <c:if test="${vo.receiptType != 2 and vo.receiptType != 6}">
     <h5>关联订单</h5>
     <div class="receipt-order-form">
         <c:forEach items="${vo.orderInfos}" var="orderInfo">
@@ -218,12 +231,16 @@
                     <div class="receipt-suborder-title">
                         <span class="font-blue"><label>子订单编号:</label><a
                                 href="${ctx}/order/detail?id=${orderInfo.orderID}">${orderInfo.shopOrderNo}(${orderInfo.shopOrderID})</a></span>
-                        <span><label>订单金额:</label>¥<fmt:formatNumber value="${orderInfo.shopOrderAmount}" pattern="#0.00"/></span>
+                        <span><label>订单金额:</label>¥<fmt:formatNumber value="${orderInfo.shopOrderAmount}"
+                                                                     pattern="#0.00"/></span>
                         <span><label>供应商:</label>${orderInfo.shopName}</span>
                         <c:if test="${vo.receiptType == 5}">
-                            <span><label>应付金额:</label>¥<fmt:formatNumber value="${orderInfo.shouldPayShopAmount}" pattern="#0.00"/></span>
-                            <span><label>已付金额:</label>¥<fmt:formatNumber value="${orderInfo.payedShopAmount}" pattern="#0.00"/></span>
-                            <span><label>已退金额:</label>¥<fmt:formatNumber value="${orderInfo.refundsAmount}" pattern="#0.00"/></span>
+                            <span><label>应付金额:</label>¥<fmt:formatNumber value="${orderInfo.shouldPayShopAmount}"
+                                                                         pattern="#0.00"/></span>
+                            <span><label>已付金额:</label>¥<fmt:formatNumber value="${orderInfo.payedShopAmount}"
+                                                                         pattern="#0.00"/></span>
+                            <span><label>已退金额:</label>¥<fmt:formatNumber value="${orderInfo.refundsAmount}"
+                                                                         pattern="#0.00"/></span>
                         </c:if>
                     </div>
                 </c:if>
@@ -238,7 +255,8 @@
                             value="${empty orderInfo.receiptAmount ? 0 : orderInfo.receiptAmount}"
                             pattern="#0.00"/>
                         <span>
-                                    <c:forEach items="${orderInfo.receiptRecordVo}" var="receiptRecord" varStatus="index">
+                                    <c:forEach items="${orderInfo.receiptRecordVo}" var="receiptRecord"
+                                               varStatus="index">
                                         <c:if test="${receiptRecord.confirmType eq 1 || receiptRecord.confirmType eq  2 || receiptRecord.confirmType eq 3}">
                                             <label>抹平明细:</label>
                                             <c:if test="${receiptRecord.confirmType eq 1}">
@@ -247,7 +265,9 @@
                                                 </c:if>
                                                 <c:if test="${!vo.receiptOrderFlag}">
                                                     <font color="red">(少收抹平:
-                                                    ¥<fmt:formatNumber value="${orderInfo.payableAmount - (empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount)}" pattern="#0.00"/>元)
+                                                    ¥<fmt:formatNumber
+                                                                value="${orderInfo.payableAmount - (empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount)}"
+                                                                pattern="#0.00"/>元)
                                                     </font>
                                                 </c:if>
                                             </c:if>
@@ -257,7 +277,9 @@
                                                 </c:if>
                                                 <c:if test="${!vo.receiptOrderFlag}">
                                                     <font color="red">(多收抹平:
-                                                    ¥<fmt:formatNumber value="${(empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount) - orderInfo.payableAmount}" pattern="#0.00"/>元)
+                                                    ¥<fmt:formatNumber
+                                                                value="${(empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount) - orderInfo.payableAmount}"
+                                                                pattern="#0.00"/>元)
                                                     </font>
                                                 </c:if>
                                             </c:if>
@@ -267,7 +289,9 @@
                                                 </c:if>
                                                 <c:if test="${!vo.receiptOrderFlag}">
                                                     <font color="red">(多收退余额${receiptRecord.associationType eq 2 ? "(自动)" : ""}:
-                                                    ¥<fmt:formatNumber value="${(empty receiptRecord.returnBalanceAmount ? 0 : receiptRecord.returnBalanceAmount)}" pattern="#0.00"/>元)
+                                                    ¥<fmt:formatNumber
+                                                                value="${(empty receiptRecord.returnBalanceAmount ? 0 : receiptRecord.returnBalanceAmount)}"
+                                                                pattern="#0.00"/>元)
                                                     </font>
                                                 </c:if>
                                             </c:if>
@@ -289,8 +313,8 @@
                                     <c:if test="${orderInfo.receiptStatus == 2}">部分收款</c:if>
                                     <c:if test="${orderInfo.receiptStatus == 3}">已收款</c:if>
                                 </span>
-                            </div>
-                            <div class="receipt-order-row3">
+                </div>
+                <div class="receipt-order-row3">
                                 <span><label>订单类型:</label><c:if test="${orderInfo.orderType == 0}">协销订单</c:if>
                                         <c:if test="${orderInfo.orderType == 1}">自主订单</c:if></span>
                     <span><label>下单日期:</label>${orderInfo.orderTime}</span>
@@ -326,39 +350,61 @@
                             </c:if>
                             <c:if test="${receiptRecord.payWay == 3}">
                                 <%--余额抵扣--%>
-                                <span><a href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${orderInfo.userID}" style="text-decoration: underline">${fns:getPayTypeStr(receiptRecord.payType)}</a></span>
-                                <span><a href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${orderInfo.userID}" style="text-decoration: underline">${receiptRecord.receiptAmount}</a></span>
+                                <span><a
+                                        href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${orderInfo.userID}"
+                                        style="text-decoration: underline">${fns:getPayTypeStr(receiptRecord.payType)}</a></span>
+                                <span><a
+                                        href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${orderInfo.userID}"
+                                        style="text-decoration: underline">${receiptRecord.receiptAmount}</a></span>
                             </c:if>
                             <span>
     <%--                        一款多单的时候直接显示再订单上即可,无需收款记录显示--%>
                                 <c:if test="${!vo.receiptOrderFlag}">
-                                        <c:if test="${receiptRecord.confirmType eq 1 || receiptRecord.confirmType eq  2 || receiptRecord.confirmType eq 3}">
-                                            <label>抹平明细:</label>
-                                            <c:if test="${receiptRecord.confirmType eq 1}">
+                                    <c:if test="${receiptRecord.confirmType eq 1 || receiptRecord.confirmType eq  2 || receiptRecord.confirmType eq 3}">
+                                        <label>抹平明细:</label>
+                                        <c:if test="${receiptRecord.confirmType eq 1}">
                                                 <font color="red">(少收抹平:
-                                                    ¥<fmt:formatNumber value="${orderInfo.payableAmount - (empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount)}" pattern="#0.00"/>元)
+                                                    ¥<fmt:formatNumber
+                                                            value="${orderInfo.payableAmount - (empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount)}"
+                                                            pattern="#0.00"/>元)
                                                 </font>
-                                            </c:if>
-                                            <c:if test="${receiptRecord.confirmType eq 2}">
+                                        </c:if>
+                                        <c:if test="${receiptRecord.confirmType eq 2}">
                                                 <font color="red">(多收抹平:
-                                                    ¥<fmt:formatNumber value="${(empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount) - orderInfo.payableAmount}" pattern="#0.00"/>元)
+                                                    ¥<fmt:formatNumber
+                                                            value="${(empty receiptRecord.orderReceivedAmount ? 0 : receiptRecord.orderReceivedAmount) - orderInfo.payableAmount}"
+                                                            pattern="#0.00"/>元)
                                                 </font>
-                                            </c:if>
-                                            <c:if test="${receiptRecord.confirmType eq 3}">
+                                        </c:if>
+                                        <c:if test="${receiptRecord.confirmType eq 3}">
                                                 <font color="red">(多收退余额${receiptRecord.associationType eq 2 ? "(自动)" : ""}:
-                                                    ¥<fmt:formatNumber value="${(empty receiptRecord.returnBalanceAmount ? 0 : receiptRecord.returnBalanceAmount)}" pattern="#0.00"/>元)
+                                                    ¥<fmt:formatNumber
+                                                            value="${(empty receiptRecord.returnBalanceAmount ? 0 : receiptRecord.returnBalanceAmount)}"
+                                                            pattern="#0.00"/>元)
                                                 </font>
-                                            </c:if>
                                         </c:if>
+                                    </c:if>
                                 </c:if>
                                 </span>
                         </div>
                     </c:forEach>
                 </div>
-            </div><br>
+            </div>
+            <br>
         </c:forEach>
-        </c:if>
     </div>
+    </c:if>
+    <c:if test="${vo.receiptType == 6}">
+        <h5>关联超级会员记录</h5>
+        <div class="receipt-order-form">
+            <div>
+            <c:if test="${not empty vo.vipInfo}">
+                <span>会员套餐:${vo.vipInfo.duration}个月</span>
+                <span>交易号:${vo.vipInfo.orderRequestNo}</span>
+            </c:if>
+            </div>
+        </div>
+    </c:if>
 </div>
 <script>
     (function () {

+ 8 - 2
src/main/webapp/WEB-INF/views/modules/order/cmDiscernReceiptList.jsp

@@ -227,8 +227,14 @@
 
                 </c:if>
             </td>
-            <td>${cmDiscernReceipt.orderType}</td>
-            <td>${cmDiscernReceipt.orders}</td>
+            <td>
+                <c:if test="${cmDiscernReceipt.receiptType != 6}">${cmDiscernReceipt.orderType}</c:if>
+                <c:if test="${cmDiscernReceipt.receiptType == 6}">----</c:if>
+            </td>
+            <td>
+                <c:if test="${cmDiscernReceipt.receiptType != 6}">${cmDiscernReceipt.orders}</c:if>
+                <c:if test="${cmDiscernReceipt.receiptType == 6}">----</c:if>
+            </td>
             <shiro:hasPermission name="order:cmDiscernReceipt:edit">
                 <td>
                     <a href="${ctx}/order/cmDiscernReceipt/detail?id=${cmDiscernReceipt.id}">查看详情</a>

+ 1091 - 901
src/main/webapp/WEB-INF/views/modules/svip/cmSvipCouponForm.jsp

@@ -11,12 +11,14 @@
             padding: 20px 20px 0;
             margin-bottom: 20px;
         }
+
         .couponType {
-            margin-right:15px;
+            margin-right: 15px;
         }
     </style>
     <script type="text/javascript">
-        $(document).ready(function() {
+        $(document).ready(function () {
+
             $("#inputForm").validate({
                 submitHandler: function (form) {
                     if (imageList1.length > 0) {
@@ -38,26 +40,26 @@
 
                     var couponType1 = $("#couponType1").val();
                     var shopId1 = $("#shopId1").val();
-                    if(couponType1 == 3){
-                        if(shopId1 == "" || shopId1 == null){
+                    if (couponType1 == 3) {
+                        if (shopId1 == "" || shopId1 == null) {
                             alert("店铺券供应商不能为空 !");
                             return false;
                         }
                     }
                     var month = $("#month").val();
                     // 判断月份 ...
-                    if(month == null || month == ""){
+                    if (month == null || month == "") {
                         alert("请选择生效时间! ");
                         return false;
                     }
 
                     var couponAmount1 = $("#couponAmount1").val() * 1;
                     var touchPrice1 = $("#touchPrice1").val() * 1;
-                    if(couponAmount1 == ""){
+                    if (couponAmount1 == "") {
                         alertx("【优惠券1】优惠券金额不能为空");
                         return false;
                     }
-                    if(touchPrice1 == ""){
+                    if (touchPrice1 == "") {
                         alertx("【优惠券1】优惠条件不能为空");
                         return false;
                     }
@@ -68,11 +70,11 @@
 
                     var couponAmount2 = $("#couponAmount2").val() * 1;
                     var touchPrice2 = $("#touchPrice2").val() * 1;
-                    if(couponAmount2 == ""){
+                    if (couponAmount2 == "") {
                         alertx("【优惠券2】优惠券金额不能为空");
                         return false;
                     }
-                    if(touchPrice2 == ""){
+                    if (touchPrice2 == "") {
                         alertx("【优惠券2】优惠条件不能为空");
                         return false;
                     }
@@ -83,11 +85,11 @@
 
                     var couponAmount3 = $("#couponAmount3").val() * 1;
                     var touchPrice3 = $("#touchPrice3").val() * 1;
-                    if(couponAmount3 == ""){
+                    if (couponAmount3 == "") {
                         alertx("【优惠券3】优惠券金额不能为空");
                         return false;
                     }
-                    if(touchPrice3 == ""){
+                    if (touchPrice3 == "") {
                         alertx("【优惠券3】优惠条件不能为空");
                         return false;
                     }
@@ -98,11 +100,11 @@
 
                     var couponAmount4 = $("#couponAmount4").val() * 1;
                     var touchPrice4 = $("#touchPrice4").val() * 1;
-                    if(couponAmount4 == ""){
+                    if (couponAmount4 == "") {
                         alertx("【优惠券4】优惠券金额不能为空");
                         return false;
                     }
-                    if(touchPrice4 == ""){
+                    if (touchPrice4 == "") {
                         alertx("【优惠券4】优惠条件不能为空");
                         return false;
                     }
@@ -137,343 +139,369 @@
 </ul>
 <br/>
 
-<form:form id="inputForm" modelAttribute="svipcouponForm" action="${ctx}/vip/cmCoupon/save?couponId1=${svipcouponForm.couponId1}" method="post" class="form-horizontal">
-    <sys:message content="${message}"/>
+<form:form id="inputForm" modelAttribute="svipcouponForm"
+           action="${ctx}/vip/cmCoupon/save?couponId1=${svipcouponForm.couponId1}" method="post"
+           class="form-horizontal">
+<sys:message content="${message}"/>
+<div class="control-group">
+    <label class="control-label"><font color="red">*</font>优惠月份:</label>
+    <div class="controls">
+        <form:input path="month" type="text" maxlength="20" class="input-medium Wdate" value="${useTime}"
+                    onclick="WdatePicker({dateFmt:'yyyy-MM',isShowClear:false});"/>
+    </div>
+</div>
+
+<div class="coupon-wrap" id="couponWrap1">
     <div class="control-group">
-        <label class="control-label"><font color="red">*</font>优惠月份:</label>
+        <label class="control-label"><font color="red">*</font><b>优惠券1:</b></label>
         <div class="controls">
-            <form:input path="month" type="text" maxlength="20" class="input-medium Wdate" value="${useTime}"
-                      onclick="WdatePicker({dateFmt:'yyyy-MM',isShowClear:false});"/>
+            <form:radiobutton path="couponType1" class="couponType" label="请选择" value="99"
+                              checked="true"></form:radiobutton>
+            <form:radiobutton path="couponType1" class="couponType" label="活动券" value="0"></form:radiobutton>
+            <form:radiobutton path="couponType1" class="couponType" label="品类券" value="1"
+                              onclick="cType(1)"></form:radiobutton>
+            <form:radiobutton path="couponType1" class="couponType" label="店铺券" value="3"
+                              onclick="cType(1)"></form:radiobutton>
         </div>
     </div>
-
-    <div class="coupon-wrap" id="couponWrap1">
-        <div class="control-group">
-            <label class="control-label"><font color="red">*</font><b>优惠券1:</b></label>
-            <div class="controls">
-                <form:radiobutton path="couponType1" class="couponType" label="请选择" value="99" checked="true" ></form:radiobutton>
-                <form:radiobutton path="couponType1" class="couponType" label="活动券" value="0"></form:radiobutton>
-                <form:radiobutton path="couponType1" class="couponType" label="品类券" value="1" onclick="cType(1)"></form:radiobutton>
-                <form:radiobutton path="couponType1" class="couponType" label="店铺券" value="3" onclick="cType(1)"></form:radiobutton>
-            </div>
-        </div>
-        <form:hidden path="couponId1" id="couponId1"/>
-        <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:void(0);" onclick="showSelectShop(1)" id="chooseShop1">请选择供应商</a>
-                <form:hidden path="shopId1"/>
-                <table class="contentTableShop table table-striped table-bordered table-condensed" hidden="hidden">
-                    <thead>
-                    <tr>
-                        <th>机构名称</th>
-                        <th>机构简称</th>
-                        <th>联系人</th>
-                        <th>手机号</th>
-                        <th>操作</th>
-                    </tr>
-                    </thead>
-                    <tbody class="hotSearchShop"></tbody>
-                </table>
-            </div>
+    <form:hidden path="couponId1" id="couponId1"/>
+    <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:void(0);" onclick="showSelectShop(1)" id="chooseShop1">请选择供应商</a>
+            <form:hidden path="shopId1"/>
+            <table class="contentTableShop table table-striped table-bordered table-condensed" hidden="hidden">
+                <thead>
+                <tr>
+                    <th>机构名称</th>
+                    <th>机构简称</th>
+                    <th>联系人</th>
+                    <th>手机号</th>
+                    <th>操作</th>
+                </tr>
+                </thead>
+                <tbody class="hotSearchShop"></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">
-                <form:input path="couponAmount1" htmlEscape="false" maxlength="20" class="input-xlarge required"/>
-            </div>
+    <div class="control-group coupon-line l1" style="display:none">
+        <label class="control-label"><font color="red">*</font>优惠券金额:</label>
+        <div class="controls">
+            <form:input path="couponAmount1" htmlEscape="false" maxlength="20" class="input-xlarge required"/>
         </div>
-        <div class="control-group coupon-line l2" style="display:none">
-            <label class="control-label"><font color="red">*</font>优惠条件:</label>
-            <div class="controls"> 订单商品总额满&nbsp;
-                <form:input path="touchPrice1" htmlEscape="false" maxlength="20" class="input-medium required"/>
-            </div>
+    </div>
+    <div class="control-group coupon-line l2" style="display:none">
+        <label class="control-label"><font color="red">*</font>优惠条件:</label>
+        <div class="controls"> 订单商品总额满&nbsp;
+            <form:input path="touchPrice1" htmlEscape="false" maxlength="20" class="input-medium required"/>
         </div>
-        <div class="control-group coupon-line l3" style="display:none">
-            <label class="control-label"><font color="red">*</font>优惠品类:</label>
-            <div class="controls">
-                <form:radiobutton path="categoryType1" value="1" label="产品" checked="${empty cmCoupon.categoryType ? true:false}"/>
-                <form:radiobutton path="categoryType1" value="2" label="仪器"/>
-            </div>
+    </div>
+    <div class="control-group coupon-line l3" style="display:none">
+        <label class="control-label"><font color="red">*</font>优惠品类:</label>
+        <div class="controls">
+            <form:radiobutton path="categoryType1" value="1" label="产品"
+                              checked="${empty cmCoupon.categoryType ? true:false}"/>
+            <form:radiobutton path="categoryType1" value="2" label="仪器"/>
         </div>
-        <div class="control-group coupon-line l4" style="display:none">
-            <label class="control-label"><font color="red">*</font>优惠商品:</label>
-            <div class="controls">
-                <form:radiobutton path="productType1" value="1" label="全商城商品" onclick="productShow(value,1)" checked="${empty cmCoupon.productType ? true:false}"/>
-                <form:radiobutton path="productType1" value="2" label="指定商品" onclick="productShow(value,1)"/>
-            </div>
+    </div>
+    <div class="control-group coupon-line l4" style="display:none">
+        <label class="control-label"><font color="red">*</font>优惠商品:</label>
+        <div class="controls">
+            <form:radiobutton path="productType1" value="1" label="全商城商品" onclick="productShow(value,1)"
+                              checked="${empty cmCoupon.productType ? true:false}"/>
+            <form:radiobutton path="productType1" value="2" label="指定商品" onclick="productShow(value,1)"/>
         </div>
+    </div>
 
-        <div class="productData1" hidden="hidden">
-            <form:hidden path="productInfo1" id="productInfo1"/>
-<%--            <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="pcBanner1" 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="appletsBanner1" 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">
-                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input class="btn" class="del" style="width: 50px" onclick="batchDeletion(1)" value="删除"/>&nbsp;&nbsp;&nbsp;&nbsp;
-<%--                <input class="btn btn-primary" style="width: 70px" onclick="batchSaveSort(1)" value="一键排序"/>&nbsp;&nbsp;&nbsp;&nbsp;--%>
-                <input class="btn btn-primary" style="width: 50px" onclick="showSelectProduct(1)" value="添加"/>
-                <br><br>
-                <table class="contentTableProduct 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 class="hotSearchProduct"></tbody>
-                </table>
-            </div>
+    <div class="productData1" hidden="hidden">
+        <form:hidden path="productInfo1" id="productInfo1"/>
+            <%--            <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="pcBanner1" 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="appletsBanner1" 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">
+            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input
+                class="btn" class="del" style="width: 50px" onclick="batchDeletion(1)" value="删除"/>&nbsp;&nbsp;&nbsp;&nbsp;
+                <%--                <input class="btn btn-primary" style="width: 70px" onclick="batchSaveSort(1)" value="一键排序"/>&nbsp;&nbsp;&nbsp;&nbsp;--%>
+            <input class="btn btn-primary" style="width: 50px" onclick="showSelectProduct(1)" value="添加"/>
+            <br><br>
+            <table class="contentTableProduct 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 class="hotSearchProduct"></tbody>
+            </table>
         </div>
-
     </div>
-    <div class="coupon-wrap" id="couponWrap2">
-        <div class="control-group">
-            <label class="control-label"><font color="red">*</font><b>优惠券2:</b></label>
-            <div class="controls">
-                <form:radiobutton path="couponType2" class="couponType" label="请选择" value="99" checked="true" ></form:radiobutton>
-                <form:radiobutton path="couponType2" class="couponType" label="活动券" value="0"></form:radiobutton>
-                <form:radiobutton path="couponType2" class="couponType" label="品类券" value="1" onclick="cType(2)"></form:radiobutton>
-                <form:radiobutton path="couponType2" class="couponType" label="店铺券" value="3" onclick="cType(2)"></form:radiobutton>
-            </div>
+
+</div>
+<div class="coupon-wrap" id="couponWrap2">
+    <div class="control-group">
+        <label class="control-label"><font color="red">*</font><b>优惠券2:</b></label>
+        <div class="controls">
+            <form:radiobutton path="couponType2" class="couponType" label="请选择" value="99"
+                              checked="true"></form:radiobutton>
+            <form:radiobutton path="couponType2" class="couponType" label="活动券" value="0"></form:radiobutton>
+            <form:radiobutton path="couponType2" class="couponType" label="品类券" value="1"
+                              onclick="cType(2)"></form:radiobutton>
+            <form:radiobutton path="couponType2" class="couponType" label="店铺券" value="3"
+                              onclick="cType(2)"></form:radiobutton>
         </div>
-        <form:hidden path="couponId2" id="couponId2"/>
-        <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:void(0);" onclick="showSelectShop(2)" id="chooseShop2">请选择供应商</a>
-                <form:hidden path="shopId2"/>
-                <table class="contentTableShop table table-striped table-bordered table-condensed" hidden="hidden">
-                    <thead>
-                    <tr>
-                        <th>机构名称</th>
-                        <th>机构简称</th>
-                        <th>联系人</th>
-                        <th>手机号</th>
-                        <th>操作</th>
-                    </tr>
-                    </thead>
-                    <tbody class="hotSearchShop"></tbody>
-                </table>
-            </div>
+    </div>
+    <form:hidden path="couponId2" id="couponId2"/>
+    <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:void(0);" onclick="showSelectShop(2)" id="chooseShop2">请选择供应商</a>
+            <form:hidden path="shopId2"/>
+            <table class="contentTableShop table table-striped table-bordered table-condensed" hidden="hidden">
+                <thead>
+                <tr>
+                    <th>机构名称</th>
+                    <th>机构简称</th>
+                    <th>联系人</th>
+                    <th>手机号</th>
+                    <th>操作</th>
+                </tr>
+                </thead>
+                <tbody class="hotSearchShop"></tbody>
+            </table>
         </div>
-        <div class="control-group coupon-line l1" style="display:none">
-            <label class="control-label"><font color="red">*</font>优惠券金额:</label>
-            <div class="controls">
-                <form:input path="couponAmount2" htmlEscape="false" maxlength="20" class="input-xlarge required"/>
-            </div>
+    </div>
+    <div class="control-group coupon-line l1" style="display:none">
+        <label class="control-label"><font color="red">*</font>优惠券金额:</label>
+        <div class="controls">
+            <form:input path="couponAmount2" htmlEscape="false" maxlength="20" class="input-xlarge required"/>
         </div>
-        <div class="control-group coupon-line l2" style="display:none">
-            <label class="control-label"><font color="red">*</font>优惠条件:</label>
-            <div class="controls"> 订单商品总额满&nbsp;
-                <form:input path="touchPrice2" htmlEscape="false" maxlength="20" class="input-medium required"/>
-            </div>
+    </div>
+    <div class="control-group coupon-line l2" style="display:none">
+        <label class="control-label"><font color="red">*</font>优惠条件:</label>
+        <div class="controls"> 订单商品总额满&nbsp;
+            <form:input path="touchPrice2" htmlEscape="false" maxlength="20" class="input-medium required"/>
         </div>
-        <div class="control-group coupon-line l3" style="display:none">
-            <label class="control-label"><font color="red">*</font>优惠品类:</label>
-            <div class="controls">
-                <form:radiobutton path="categoryType2" value="1" label="产品" checked="${empty cmCoupon.categoryType ? true:false}"/>
-                <form:radiobutton path="categoryType2" value="2" label="仪器"/>
-            </div>
+    </div>
+    <div class="control-group coupon-line l3" style="display:none">
+        <label class="control-label"><font color="red">*</font>优惠品类:</label>
+        <div class="controls">
+            <form:radiobutton path="categoryType2" value="1" label="产品"
+                              checked="${empty cmCoupon.categoryType ? true:false}"/>
+            <form:radiobutton path="categoryType2" value="2" label="仪器"/>
         </div>
-        <div class="control-group coupon-line l4" style="display:none">
-            <label class="control-label"><font color="red">*</font>优惠商品:</label>
-            <div class="controls">
-                <form:radiobutton path="productType2" value="1" label="全商城商品" onclick="productShow(value,2)" checked="${empty cmCoupon.productType ? true:false}"/>
-                <form:radiobutton path="productType2" value="2" label="指定商品" onclick="productShow(value,2)"/>
-            </div>
+    </div>
+    <div class="control-group coupon-line l4" style="display:none">
+        <label class="control-label"><font color="red">*</font>优惠商品:</label>
+        <div class="controls">
+            <form:radiobutton path="productType2" value="1" label="全商城商品" onclick="productShow(value,2)"
+                              checked="${empty cmCoupon.productType ? true:false}"/>
+            <form:radiobutton path="productType2" value="2" label="指定商品" onclick="productShow(value,2)"/>
         </div>
+    </div>
 
-        <div class="productData2" hidden="hidden">
-            <form:hidden path="productInfo2" id="productInfo2"/>
-<%--            <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="pcBanner2" 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="appletsBanner2" 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">
-                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input class="btn" class="del" style="width: 50px" onclick="batchDeletion(2)" value="删除"/>&nbsp;&nbsp;&nbsp;&nbsp;
-<%--                <input class="btn btn-primary" style="width: 70px" onclick="batchSaveSort(2)" value="一键排序"/>&nbsp;&nbsp;&nbsp;&nbsp;--%>
-                <input class="btn btn-primary" style="width: 50px" onclick="showSelectProduct(2)" value="添加"/>
-                <br><br>
-                <table class="contentTableProduct 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 class="hotSearchProduct"></tbody>
-                </table>
-            </div>
+    <div class="productData2" hidden="hidden">
+        <form:hidden path="productInfo2" id="productInfo2"/>
+            <%--            <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="pcBanner2" 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="appletsBanner2" 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">
+            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input
+                class="btn" class="del" style="width: 50px" onclick="batchDeletion(2)" value="删除"/>&nbsp;&nbsp;&nbsp;&nbsp;
+                <%--                <input class="btn btn-primary" style="width: 70px" onclick="batchSaveSort(2)" value="一键排序"/>&nbsp;&nbsp;&nbsp;&nbsp;--%>
+            <input class="btn btn-primary" style="width: 50px" onclick="showSelectProduct(2)" value="添加"/>
+            <br><br>
+            <table class="contentTableProduct 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 class="hotSearchProduct"></tbody>
+            </table>
         </div>
-
     </div>
-    <div class="coupon-wrap" id="couponWrap3">
-        <div class="control-group">
-            <label class="control-label"><font color="red">*</font><b>优惠券3:</b></label>
-            <div class="controls">
-                <form:radiobutton path="couponType3" class="couponType" label="请选择" value="99" checked="true" ></form:radiobutton>
-                <form:radiobutton path="couponType3" class="couponType" label="活动券" value="0"></form:radiobutton>
-                <form:radiobutton path="couponType3" class="couponType" label="品类券" value="1" onclick="cType(3)"></form:radiobutton>
-                <form:radiobutton path="couponType3" class="couponType" label="店铺券" value="3" onclick="cType(3)"></form:radiobutton>
-            </div>
+
+</div>
+<div class="coupon-wrap" id="couponWrap3">
+    <div class="control-group">
+        <label class="control-label"><font color="red">*</font><b>优惠券3:</b></label>
+        <div class="controls">
+            <form:radiobutton path="couponType3" class="couponType" label="请选择" value="99"
+                              checked="true"></form:radiobutton>
+            <form:radiobutton path="couponType3" class="couponType" label="活动券" value="0"></form:radiobutton>
+            <form:radiobutton path="couponType3" class="couponType" label="品类券" value="1"
+                              onclick="cType(3)"></form:radiobutton>
+            <form:radiobutton path="couponType3" class="couponType" label="店铺券" value="3"
+                              onclick="cType(3)"></form:radiobutton>
         </div>
-        <form:hidden path="couponId3" id="couponId3"/>
-        <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:void(0);" onclick="showSelectShop(3)" id="chooseShop3">请选择供应商</a>
-                <form:hidden path="shopId3"/>
-                <table class="contentTableShop table table-striped table-bordered table-condensed" hidden="hidden">
-                    <thead>
-                    <tr>
-                        <th>机构名称</th>
-                        <th>机构简称</th>
-                        <th>联系人</th>
-                        <th>手机号</th>
-                        <th>操作</th>
-                    </tr>
-                    </thead>
-                    <tbody class="hotSearchShop"></tbody>
-                </table>
-            </div>
+    </div>
+    <form:hidden path="couponId3" id="couponId3"/>
+    <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:void(0);" onclick="showSelectShop(3)" id="chooseShop3">请选择供应商</a>
+            <form:hidden path="shopId3"/>
+            <table class="contentTableShop table table-striped table-bordered table-condensed" hidden="hidden">
+                <thead>
+                <tr>
+                    <th>机构名称</th>
+                    <th>机构简称</th>
+                    <th>联系人</th>
+                    <th>手机号</th>
+                    <th>操作</th>
+                </tr>
+                </thead>
+                <tbody class="hotSearchShop"></tbody>
+            </table>
         </div>
-        <div class="control-group coupon-line l1" style="display:none">
-            <label class="control-label"><font color="red">*</font>优惠券金额:</label>
-            <div class="controls">
-                <form:input path="couponAmount3" htmlEscape="false" maxlength="20" class="input-xlarge required"/>
-            </div>
+    </div>
+    <div class="control-group coupon-line l1" style="display:none">
+        <label class="control-label"><font color="red">*</font>优惠券金额:</label>
+        <div class="controls">
+            <form:input path="couponAmount3" htmlEscape="false" maxlength="20" class="input-xlarge required"/>
         </div>
-        <div class="control-group coupon-line l2" style="display:none">
-            <label class="control-label"><font color="red">*</font>优惠条件:</label>
-            <div class="controls"> 订单商品总额满&nbsp;
-                <form:input path="touchPrice3" htmlEscape="false" maxlength="20" class="input-medium required"/>
-            </div>
+    </div>
+    <div class="control-group coupon-line l2" style="display:none">
+        <label class="control-label"><font color="red">*</font>优惠条件:</label>
+        <div class="controls"> 订单商品总额满&nbsp;
+            <form:input path="touchPrice3" htmlEscape="false" maxlength="20" class="input-medium required"/>
         </div>
-        <div class="control-group coupon-line l3" style="display:none">
-            <label class="control-label"><font color="red">*</font>优惠品类:</label>
-            <div class="controls">
-                <form:radiobutton path="categoryType3" value="1" label="产品" checked="${empty cmCoupon.categoryType ? true:false}"/>
-                <form:radiobutton path="categoryType3" value="2" label="仪器"/>
-            </div>
+    </div>
+    <div class="control-group coupon-line l3" style="display:none">
+        <label class="control-label"><font color="red">*</font>优惠品类:</label>
+        <div class="controls">
+            <form:radiobutton path="categoryType3" value="1" label="产品"
+                              checked="${empty cmCoupon.categoryType ? true:false}"/>
+            <form:radiobutton path="categoryType3" value="2" label="仪器"/>
         </div>
-        <div class="control-group coupon-line l4" style="display:none">
-            <label class="control-label"><font color="red">*</font>优惠商品:</label>
-            <div class="controls">
-                <form:radiobutton path="productType3" value="1" label="全商城商品" onclick="productShow(value,3)" checked="${empty cmCoupon.productType ? true:false}"/>
-                <form:radiobutton path="productType3" value="2" label="指定商品" onclick="productShow(value,3)"/>
-            </div>
+    </div>
+    <div class="control-group coupon-line l4" style="display:none">
+        <label class="control-label"><font color="red">*</font>优惠商品:</label>
+        <div class="controls">
+            <form:radiobutton path="productType3" value="1" label="全商城商品" onclick="productShow(value,3)"
+                              checked="${empty cmCoupon.productType ? true:false}"/>
+            <form:radiobutton path="productType3" value="2" label="指定商品" onclick="productShow(value,3)"/>
         </div>
+    </div>
 
-        <div class="productData3" hidden="hidden">
-            <form:hidden path="productInfo3" id="productInfo3"/>
-<%--            <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="pcBanner3" 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="appletsBanner3" 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">
-                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input class="btn" class="del" style="width: 50px" onclick="batchDeletion(3)" value="删除"/>&nbsp;&nbsp;&nbsp;&nbsp;
-<%--                <input class="btn btn-primary" style="width: 70px" onclick="batchSaveSort(3)" value="一键排序"/>&nbsp;&nbsp;&nbsp;&nbsp;--%>
-                <input class="btn btn-primary" style="width: 50px" onclick="showSelectProduct(3)" value="添加"/>
-                <br><br>
-                <table class="contentTableProduct 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 class="hotSearchProduct"></tbody>
-                </table>
-            </div>
+    <div class="productData3" hidden="hidden">
+        <form:hidden path="productInfo3" id="productInfo3"/>
+            <%--            <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="pcBanner3" 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="appletsBanner3" 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">
+            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input
+                class="btn" class="del" style="width: 50px" onclick="batchDeletion(3)" value="删除"/>&nbsp;&nbsp;&nbsp;&nbsp;
+                <%--                <input class="btn btn-primary" style="width: 70px" onclick="batchSaveSort(3)" value="一键排序"/>&nbsp;&nbsp;&nbsp;&nbsp;--%>
+            <input class="btn btn-primary" style="width: 50px" onclick="showSelectProduct(3)" value="添加"/>
+            <br><br>
+            <table class="contentTableProduct 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 class="hotSearchProduct"></tbody>
+            </table>
         </div>
-
     </div>
-    <div class="coupon-wrap" id="couponWrap4">
-        <div class="control-group">
-            <label class="control-label"><font color="red">*</font><b>优惠券4:</b></label>
-            <div class="controls">
-                <form:radiobutton path="couponType4" class="couponType" label="请选择" value="99" checked="true"></form:radiobutton>
-                <form:radiobutton path="couponType4" class="couponType" label="活动券" value="0"></form:radiobutton>
-                <form:radiobutton path="couponType4" class="couponType" label="品类券" value="1" onclick="cType(4)"></form:radiobutton>
-                <form:radiobutton path="couponType4" class="couponType" label="店铺券" value="3" onclick="cType(4)"></form:radiobutton>
-            </div>
+
+</div>
+<div class="coupon-wrap" id="couponWrap4">
+    <div class="control-group">
+        <label class="control-label"><font color="red">*</font><b>优惠券4:</b></label>
+        <div class="controls">
+            <form:radiobutton path="couponType4" class="couponType" label="请选择" value="99"
+                              checked="true"></form:radiobutton>
+            <form:radiobutton path="couponType4" class="couponType" label="活动券" value="0"></form:radiobutton>
+            <form:radiobutton path="couponType4" class="couponType" label="品类券" value="1"
+                              onclick="cType(4)"></form:radiobutton>
+            <form:radiobutton path="couponType4" class="couponType" label="店铺券" value="3"
+                              onclick="cType(4)"></form:radiobutton>
         </div>
+    </div>
         <form:hidden path="couponId4" id="couponId4"/>
+    <c:if test="${svipcouponForm.shopId4 != null}">
+    <div class="control-group coupon-line l0">
+        </c:if>
         <div class="control-group coupon-line l0" style="display:none">
             <label class="control-label"><font color="red">*</font>供应商:</label>
             <div class="controls">
@@ -505,625 +533,787 @@
                 <form:input path="touchPrice4" htmlEscape="false" maxlength="20" class="input-medium required"/>
             </div>
         </div>
+            <c:if test="${svipcouponForm.categoryType4 eq '1' or svipcouponForm.categoryType4 eq '2'}">
+            <div class="control-group coupon-line l3" style="display:none">
+            </c:if>
         <div class="control-group coupon-line l3" style="display:none">
             <label class="control-label"><font color="red">*</font>优惠品类:</label>
             <div class="controls">
-                <form:radiobutton path="categoryType4" value="1" label="产品" checked="${empty cmCoupon.categoryType ? true:false}"/>
+                <form:radiobutton path="categoryType4" value="1" label="产品"
+                                  checked="${empty cmCoupon.categoryType ? true:false}"/>
                 <form:radiobutton path="categoryType4" value="2" label="仪器"/>
             </div>
         </div>
+        <c:if test="${svipcouponForm.couponType4 eq '0'}">
+        <div class="control-group coupon-line l4">
+        </c:if>
+        <c:if test="${svipcouponForm.couponType4 ne '0'}">
         <div class="control-group coupon-line l4" style="display:none">
-            <label class="control-label"><font color="red">*</font>优惠商品:</label>
-            <div class="controls">
-                <form:radiobutton path="productType4" value="1" label="全商城商品" onclick="productShow(value,4)" checked="${empty cmCoupon.productType ? true:false}"/>
-                <form:radiobutton path="productType4" value="2" label="指定商品" onclick="productShow(value,4)"/>
+        </c:if>
+
+                <label class="control-label"><font color="red">*</font>优惠商品:</label>
+                <div class="controls">
+                    <form:radiobutton path="productType4" value="1" label="全商城商品" onclick="productShow(value,4)"
+                                      checked="${empty cmCoupon.productType ? true:false}"/>
+                    <form:radiobutton path="productType4" value="2" label="指定商品" onclick="productShow(value,4)"/>
+                </div>
             </div>
-        </div>
 
-        <div class="productData4" hidden="hidden">
+            <c:if test="${svipcouponForm.productType4 eq '2'}">
+            <div class="productData4">
+            </c:if>
+            <c:if test="${svipcouponForm.couponType4 eq '99'}">
+            <div class="productData4" hidden="hidden">
+            </c:if>
             <form:hidden path="productInfo4" id="productInfo4"/>
-<%--            <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="pcBanner4" 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="appletsBanner4" 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">
-                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input class="btn" class="del" style="width: 50px" onclick="batchDeletion(4)" value="删除"/>&nbsp;&nbsp;&nbsp;&nbsp;
-<%--                <input class="btn btn-primary" style="width: 70px" onclick="batchSaveSort(4)" value="一键排序"/>&nbsp;&nbsp;&nbsp;&nbsp;--%>
-                <input class="btn btn-primary" style="width: 50px" onclick="showSelectProduct(4)" value="添加"/>
-                <br><br>
-                <table class="contentTableProduct 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 class="hotSearchProduct"></tbody>
-                </table>
+                        <%--            <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="pcBanner4" 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="appletsBanner4" 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">
+                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input
+                            class="btn" class="del" style="width: 50px" onclick="batchDeletion(4)" value="删除"/>&nbsp;&nbsp;&nbsp;&nbsp;
+                            <%--                <input class="btn btn-primary" style="width: 70px" onclick="batchSaveSort(4)" value="一键排序"/>&nbsp;&nbsp;&nbsp;&nbsp;--%>
+                        <input class="btn btn-primary" style="width: 50px" onclick="showSelectProduct(4)" value="添加"/>
+                        <br><br>
+                        <table class="contentTableProduct 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 class="hotSearchProduct"></tbody>
+                        </table>
+                    </div>
+                </div>
             </div>
-        </div>
-    </div>
-    <div class="form-actions">
-        <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;
-        <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
-    </div>
-</form:form>
-<script>
-    $("body").on("change", ".couponType", function(){
-        var value = $(this).parent().find('input.couponType:checked').val()*1;
-        $(this).parents(".coupon-wrap").find(".coupon-line").hide();
-        if (0 === value) {
-            $(this).parents(".coupon-wrap").find(".coupon-line.l1").show();
-            $(this).parents(".coupon-wrap").find(".coupon-line.l2").show();
-            $(this).parents(".coupon-wrap").find(".coupon-line.l4").show();
-        } else if (1 === value) {
-            $(this).parents(".coupon-wrap").find(".coupon-line.l1").show();
-            $(this).parents(".coupon-wrap").find(".coupon-line.l2").show();
-            $(this).parents(".coupon-wrap").find(".coupon-line.l3").show();
-        } else if (3 === value) {
-            $(this).parents(".coupon-wrap").find(".coupon-line.l0").show();
-            $(this).parents(".coupon-wrap").find(".coupon-line.l1").show();
-            $(this).parents(".coupon-wrap").find(".coupon-line.l2").show();
-        }
-    });
-
-
-    function cType(id){
-        $("#couponWrap"+id).find(".productData"+id).hide();
-    }
-
-    // 点击添加供应商
-    function showSelectShop(id) {
-        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, id);
+            <div class="form-actions">
+                <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;
+                <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+            </div>
+            </form:form>
+
+
+            <script>
+
+
+                $("body").on("change", ".couponType", function () {
+                    var value = $(this).parent().find('input.couponType:checked').val() * 1;
+                    $(this).parents(".coupon-wrap").find(".coupon-line").hide();
+                    if (0 === value) {
+                        $(this).parents(".coupon-wrap").find(".coupon-line.l1").show();
+                        $(this).parents(".coupon-wrap").find(".coupon-line.l2").show();
+                        $(this).parents(".coupon-wrap").find(".coupon-line.l4").show();
+                    } else if (1 === value) {
+                        $(this).parents(".coupon-wrap").find(".coupon-line.l1").show();
+                        $(this).parents(".coupon-wrap").find(".coupon-line.l2").show();
+                        $(this).parents(".coupon-wrap").find(".coupon-line.l3").show();
+                    } else if (3 === value) {
+                        $(this).parents(".coupon-wrap").find(".coupon-line.l0").show();
+                        $(this).parents(".coupon-wrap").find(".coupon-line.l1").show();
+                        $(this).parents(".coupon-wrap").find(".coupon-line.l2").show();
+                    }
+                });
+
+
+                function cType(id) {
+                    $("#couponWrap" + id).find(".productData" + id).hide();
                 }
-                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 () {
-    //     $('.upload-content-image .conList .btn:nth-of-type(1)').html('<div><span>+</span><h5>选择图片</h5></div>');
-    //     $('.upload-content-image .conList .btn:nth-of-type(2)').after('<img class="cancel-upload-image" src="/static/images/close-btn1.png">').remove();
-    //     $('.upload-content-image .conList').find('.cancel-upload-image').hide();
-    //     var observeEleImage = document.getElementsByClassName('upload-content-image')[0];
-    //     var observeEleImage1 = document.getElementsByClassName('upload-content-image')[1];
-    //     var MutationObserverImage = window.MutationObserver || window.WebKitMutationObserver;
-    //     var MutationObserverConfigImage = {
-    //         childList: true,
-    //         subtree: true,
-    //         characterData: true
-    //     };
-    //     var observerImage = new MutationObserverImage(function (mutations) {
-    //         $.each(mutations, function (index, item) {
-    //             if (item.type === 'childList') {
-    //                 // 在创建新的 element 时调用
-    //                 var target = $(item.target),
-    //                     thisWrapper = target.closest('.conList'),
-    //                     nextEle = thisWrapper.next();
-    //                 thisWrapper.find('li').css('z-index', 99);
-    //                 thisWrapper.find('.cancel-upload-image').show();
-    //                 if (nextEle.hasClass('hide-pic-image')) {
-    //                     nextEle.removeClass('hide-pic-image');
-    //                 }
-    //             }
-    //         })
-    //     });
-    //     observerImage.observe(observeEleImage, MutationObserverConfigImage);
-    //     observerImage.observe(observeEleImage1, MutationObserverConfigImage);
-    //
-    //     $('body').on('click', '.upload-content-image li', function () {
-    //         var index = $(this).closest('.conList').index() + 1,
-    //             str = 'remarkImage' + index + 'FinderOpen';
-    //         eval(str + '()');
-    //     });
-    //     $('body').on('click', '.cancel-upload-image', function () {
-    //         var wrapper = $(this).closest('.conList');
-    //         wrapper.find('li').css('z-index', '-1');
-    //         wrapper.find('input').val('');
-    //         $(this).hide();
-    //         wrapper.removeClass("hide-pic-image");
-    //         wrapper.parent().append(wrapper.clone());
-    //         wrapper.remove();
-    //         $(".conList").each(function (i, ele) {
-    //             if ($(ele).find("input.input-xlarge").val()) {
-    //                 $(ele).next().removeClass("hide-pic-image")
-    //             }
-    //         })
-    //     });
-    //     $(window).on("load", function () {
-    //         setTimeout(function () {
-    //             var input = $("#pcBanner");
-    //             if (input.val()) {
-    //                 input.next().find("li").css("z-index", "99");
-    //                 input.parents(".conList").find(".cancel-upload-image").show();
-    //                 input.parents(".conList").next().removeClass("hide-pic-image")
-    //             }
-    //             input = $("#appletsBanner");
-    //             if (input.val()) {
-    //                 input.next().find("li").css("z-index", "99");
-    //                 input.parents(".conList").find(".cancel-upload-image").show();
-    //                 input.parents(".conList").next().removeClass("hide-pic-image")
-    //             }
-    //         }, 500);
-    //     });
-    //     // productShow(value,id)
-    // });
-
-
-    function productShow(value,id) {
-        if (value == 2){
-            $(".productData"+id).show();
-        }else {
-            $(".productData"+id).hide();
-        }
-    }
-
-    var productIds1 = '';
-    var productIds2 = '';
-    var productIds3 = '';
-    var productIds4 = '';
-    var imageList1 = [];
-    var imageList2 = [];
-    var imageList3 = [];
-    var imageList4 = [];
-    //点击添加
-    function showSelectProduct(id) {
-        var url = "${ctx}/coupon/cmCoupon/toAddProduct?productIds=";
-        if (id*1 === 1){
-            url += productIds1;
-        }
-        if (id*1 === 2){
-            url += productIds2;
-        }
-        if (id*1 === 3){
-            url += productIds3;
-        }
-        if (id*1 === 4){
-            url += productIds4;
-        }
-        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);
-                    console.log(items[0]);
-                    for (var i = 0; i < items.length; i++) {
-                        console.log(items[i]);
-                        if (id*1 === 1){
-                            imageList1.push(items[i]);
+
+                // 点击添加供应商
+                function showSelectShop(id) {
+                    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, id);
+                            }
+                            return true;
                         }
-                        if (id*1 === 2){
-                            imageList2.push(items[i]);
+                    });
+                }
+
+                $(function () {
+                    //店铺券供应商回显
+                    if (${not empty svipcouponForm.shop1}) {
+                        var shop = {
+                            "shopId": "${svipcouponForm.shop1.shopID}",
+                            "name": "${svipcouponForm.shop1.name}",
+                            "sname": "${svipcouponForm.shop1.sname}",
+                            "linkMan": "${svipcouponForm.shop1.linkMan}",
+                            "contractMobile": "${svipcouponForm.shop1.contractMobile}"
                         }
-                        if (id*1 === 3){
-                            imageList3.push(items[i]);
+                        appendShopOrderHead(shop, 1);
+                    }
+                });
+
+                $(function () {
+                    //店铺券供应商回显
+                    if (${not empty svipcouponForm.shop2}) {
+                        var shop = {
+                            "shopId": "${svipcouponForm.shop2.shopID}",
+                            "name": "${svipcouponForm.shop2.name}",
+                            "sname": "${svipcouponForm.shop2.sname}",
+                            "linkMan": "${svipcouponForm.shop2.linkMan}",
+                            "contractMobile": "${svipcouponForm.shop2.contractMobile}"
                         }
-                        if (id*1 === 4){
-                            imageList4.push(items[i]);
+                        appendShopOrderHead(shop, 2);
+                    }
+                });
+
+
+                $(function () {
+                    //店铺券供应商回显
+                    if (${not empty svipcouponForm.shop3}) {
+                        var shop = {
+                            "shopId": "${svipcouponForm.shop3.shopID}",
+                            "name": "${svipcouponForm.shop3.name}",
+                            "sname": "${svipcouponForm.shop3.sname}",
+                            "linkMan": "${svipcouponForm.shop3.linkMan}",
+                            "contractMobile": "${svipcouponForm.shop3.contractMobile}"
                         }
-                        $("#couponWrap"+id).find(".contentTableProduct").show();
-                        $(".del").removeAttr("disabled");
-                        batchSaveSort(id);
-                    };
-                }
-                return true;
-            }
-        });
-    }
-    //一键排序
-    function batchSaveSort(id) {
-        if (id*1 === 1){
-            imageList1.sort(sort);
-            insertHtmlProduct(imageList1, id);
-        }
-        if (id*1 === 2){
-            imageList2.sort(sort);
-            insertHtmlProduct(imageList2, id);
-        }
-        if (id*1 === 3){
-            imageList3.sort(sort);
-            insertHtmlProduct(imageList3, id);
-        }
-        if (id*1 === 4){
-            imageList4.sort(sort);
-            insertHtmlProduct(imageList4, id);
-        }
+                        appendShopOrderHead(shop, 3);
+                    }
+                });
 
-    }
-    //根据sort值 从小到大排序
-    function sort(a, b) {
-        return a.sort - b.sort;
-    }
-
-    //相关图片列表数据
-    function appendProductOrderHead(data, index, id) {
-        var html = '<tr id ="ai' + index + '">' +
-            '<td>' +
-            '<input class="check-item" type="checkbox" name="info" value="' + index + '"/>' + (index + 1) +
-            '</td>' +
-            '<td>' +
-            '<img src="' + data.image + '" width="60px" border="none" title="启用">' +
-            '</td>' +
-            '<td>' +
-            data.productName +
-            '</td>' +
-            '<td>' +
-            data.shopName +
-            '</td>' +
-            '<td>' +
-            (data.pcStatus == 1 ? (
-                '<font color="green">已启用</font>&nbsp;&nbsp;&nbsp;' +
-                '<a href="javascript:void(0);" onclick="updatePcStatus(0,' + index + ',' + id + ');" >' +
-                '停用</a>'
-            ) : (
-                '<font color="red">已停用</font>&nbsp;&nbsp;&nbsp;' +
-                '<a href="javascript:void(0)" onclick="updatePcStatus(1,' + index + ',' + id + ');">' +
-                '启用</a>'
-            )) +
-            '</td>' +
-            '<td>' +
-            (data.appletsStatus == 1 ? (
-                '<font color="green">已启用</font>&nbsp;&nbsp;&nbsp;' +
-                '<a href="javascript:void(0);" onclick="updateAppletsStatus(0,' + index + ',' + id + ');" >' +
-                '停用</a>'
-            ) : (
-                '<font color="red">已停用</font>&nbsp;&nbsp;&nbsp;' +
-                '<a href="javascript:void(0)" onclick="updateAppletsStatus(1,' + index + ',' + id + ');">' +
-                '启用</a>'
-            )) +
-            '</td>' +
-            '<td>' +
-            '<input name="sort" style="width:50px;" value="' + data.sort + '"  onkeyup="onlynum(this)"  onchange="changeSort(' + index + ',this,' + id + ')"></td>' +
-            '</td>' +
-            '<td>' +
-            (data.addTime == '' ? (
-                '<fmt:formatDate value="<%=new Date()%>" pattern="yyyy-MM-dd HH:mm:ss"/>'
-            ) : (
-                data.addTime
-            )) +
-            '</td>' +
-            '<td>' +
-            '<a href="javascript:;" onclick="delect(' + index + ',' + id + ')">删除</a>' +
-            '</td>' +
-            '</tr>';
-        return html;
-    }
-
-    function insertHtmlProduct(list, id) {
-        var html = '';
-        tempIds = '';
-        if (list && list.length>0){
-            list.forEach(function (item, index) {
-                html += appendProductOrderHead(item, index, id);
-                tempIds += "," + item.productId;
-            });
-        }
-        if (id*1 === 1){
-            productIds1 = tempIds;
-        }
-        if (id*1 === 2){
-            productIds2 = tempIds;
-        }
-        if (id*1 === 3){
-            productIds3 = tempIds;
-        }
-        if (id*1 === 4){
-            productIds4 = tempIds;
-        }
-        $("#couponWrap"+id).find(".hotSearchProduct").html(html);
-    }
-
-    function changeSort(index, sortThis, id) {
-        var sort = sortThis.value;
-        if (sort > 0) {
-            var image;
-            if (id*1 === 1){
-                image = imageList1[index];
-            }
-            if (id*1 === 2){
-                image = imageList2[index];
-            }
-            if (id*1 === 3){
-                image = imageList3[index];
-            }
-            if (id*1 === 4){
-                image = imageList4[index];
-            }
-            if (image) {
-                image.sort = sort;
-            }
-        }
-    }
+                $(function () {
+                    //店铺券供应商回显
+                    if (${not empty svipcouponForm.shop4}) {
+                        var shop = {
+                            "shopId": "${svipcouponForm.shop4.shopID}",
+                            "name": "${svipcouponForm.shop4.name}",
+                            "sname": "${svipcouponForm.shop4.sname}",
+                            "linkMan": "${svipcouponForm.shop4.linkMan}",
+                            "contractMobile": "${svipcouponForm.shop4.contractMobile}"
+                        }
+                        appendShopOrderHead(shop, 4);
+                    }
+                });
 
-    function updatePcStatus(status, index, id) {
-        var image;
-        if (id*1 === 1){
-            image = imageList1[index];
-        }
-        if (id*1 === 2){
-            image = imageList2[index];
-        }
-        if (id*1 === 3){
-            image = imageList3[index];
-        }
-        if (id*1 === 4){
-            image = imageList4[index];
-        }
-        if (image) {
-            confirmx(status == 0 ? '确定停用吗?' : '确定启用吗?', function () {
-                image.pcStatus = status;
-                batchSaveSort(id);
-            });
-        }
-    }
 
-    function updateAppletsStatus(status, index, id) {
-        var image;
-        if (id*1 === 1){
-            image = imageList1[index];
-        }
-        if (id*1 === 2){
-            image = imageList2[index];
-        }
-        if (id*1 === 3){
-            image = imageList3[index];
-        }
-        if (id*1 === 4){
-            image = imageList4[index];
-        }
-        if (image) {
-            confirmx(status == 0 ? '确定停用吗?' : '确定启用吗?', function () {
-                image.appletsStatus = status;
-                batchSaveSort(id);
-            });
-        }
-    }
-
-    /**
-     * 批量删除
-     */
-    function batchDeletion(id) {
-        var index = -1;
-        var i = 1;
-        return confirmx("确定删除吗?", function () {
-            $('input[name="info"]:checked').each(function () {
-                var thisIndex = $(this).val();
-                if (index >= 0 && index < thisIndex) {
-                    thisIndex = thisIndex - i;
-                    i++;
-                } else {
-                    index = thisIndex;
-                }
-                var image,tempList;
-                if (id*1 === 1){
-                    image = imageList1[index];
-                    if (image.productId != '') {
-                        productIds1 = productIds1.replace(image.productId, "");
+                // $(function () {
+                //     $('.upload-content-image .conList .btn:nth-of-type(1)').html('<div><span>+</span><h5>选择图片</h5></div>');
+                //     $('.upload-content-image .conList .btn:nth-of-type(2)').after('<img class="cancel-upload-image" src="/static/images/close-btn1.png">').remove();
+                //     $('.upload-content-image .conList').find('.cancel-upload-image').hide();
+                //     var observeEleImage = document.getElementsByClassName('upload-content-image')[0];
+                //     var observeEleImage1 = document.getElementsByClassName('upload-content-image')[1];
+                //     var MutationObserverImage = window.MutationObserver || window.WebKitMutationObserver;
+                //     var MutationObserverConfigImage = {
+                //         childList: true,
+                //         subtree: true,
+                //         characterData: true
+                //     };
+                //     var observerImage = new MutationObserverImage(function (mutations) {
+                //         $.each(mutations, function (index, item) {
+                //             if (item.type === 'childList') {
+                //                 // 在创建新的 element 时调用
+                //                 var target = $(item.target),
+                //                     thisWrapper = target.closest('.conList'),
+                //                     nextEle = thisWrapper.next();
+                //                 thisWrapper.find('li').css('z-index', 99);
+                //                 thisWrapper.find('.cancel-upload-image').show();
+                //                 if (nextEle.hasClass('hide-pic-image')) {
+                //                     nextEle.removeClass('hide-pic-image');
+                //                 }
+                //             }
+                //         })
+                //     });
+                //     observerImage.observe(observeEleImage, MutationObserverConfigImage);
+                //     observerImage.observe(observeEleImage1, MutationObserverConfigImage);
+                //
+                //     $('body').on('click', '.upload-content-image li', function () {
+                //         var index = $(this).closest('.conList').index() + 1,
+                //             str = 'remarkImage' + index + 'FinderOpen';
+                //         eval(str + '()');
+                //     });
+                //     $('body').on('click', '.cancel-upload-image', function () {
+                //         var wrapper = $(this).closest('.conList');
+                //         wrapper.find('li').css('z-index', '-1');
+                //         wrapper.find('input').val('');
+                //         $(this).hide();
+                //         wrapper.removeClass("hide-pic-image");
+                //         wrapper.parent().append(wrapper.clone());
+                //         wrapper.remove();
+                //         $(".conList").each(function (i, ele) {
+                //             if ($(ele).find("input.input-xlarge").val()) {
+                //                 $(ele).next().removeClass("hide-pic-image")
+                //             }
+                //         })
+                //     });
+                //     $(window).on("load", function () {
+                //         setTimeout(function () {
+                //             var input = $("#pcBanner");
+                //             if (input.val()) {
+                //                 input.next().find("li").css("z-index", "99");
+                //                 input.parents(".conList").find(".cancel-upload-image").show();
+                //                 input.parents(".conList").next().removeClass("hide-pic-image")
+                //             }
+                //             input = $("#appletsBanner");
+                //             if (input.val()) {
+                //                 input.next().find("li").css("z-index", "99");
+                //                 input.parents(".conList").find(".cancel-upload-image").show();
+                //                 input.parents(".conList").next().removeClass("hide-pic-image")
+                //             }
+                //         }, 500);
+                //     });
+                //     // productShow(value,id)
+                // });
+
+
+                function productShow(value, id) {
+                    if (value == 2) {
+                        $(".productData" + id).show();
+                    } else {
+                        $(".productData" + id).hide();
                     }
-                    imageList1.splice(thisIndex, 1);
-                    tempList = imageList1;
                 }
-                if (id*1 === 2){
-                    image = imageList2[index];
-                    if (image.productId != '') {
-                        productIds2 = productIds2.replace(image.productId, "");
+
+                var productIds1 = '';
+                var productIds2 = '';
+                var productIds3 = '';
+                var productIds4 = '';
+                var imageList1 = [];
+                var imageList2 = [];
+                var imageList3 = [];
+                var imageList4 = [];
+
+                //点击添加
+                function showSelectProduct(id) {
+                    var url = "${ctx}/coupon/cmCoupon/toAddProduct?productIds=";
+                    if (id * 1 === 1) {
+                        url += productIds1;
                     }
-                    imageList2.splice(thisIndex, 1);
-                    tempList = imageList2;
-                }
-                if (id*1 === 3){
-                    image = imageList3[index];
-                    if (image.productId != '') {
-                        productIds3 = productIds3.replace(image.productId, "");
+                    if (id * 1 === 2) {
+                        url += productIds2;
+                    }
+                    if (id * 1 === 3) {
+                        url += productIds3;
+                    }
+                    if (id * 1 === 4) {
+                        url += productIds4;
                     }
-                    imageList3.splice(thisIndex, 1);
-                    tempList = imageList3;
+                    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);
+                                console.log(items[0]);
+                                for (var i = 0; i < items.length; i++) {
+                                    console.log(items[i]);
+                                    if (id * 1 === 1) {
+                                        imageList1.push(items[i]);
+                                    }
+                                    if (id * 1 === 2) {
+                                        imageList2.push(items[i]);
+                                    }
+                                    if (id * 1 === 3) {
+                                        imageList3.push(items[i]);
+                                    }
+                                    if (id * 1 === 4) {
+                                        imageList4.push(items[i]);
+                                    }
+                                    $("#couponWrap" + id).find(".contentTableProduct").show();
+                                    $(".del").removeAttr("disabled");
+                                    batchSaveSort(id);
+                                }
+                                ;
+                            }
+                            return true;
+                        }
+                    });
                 }
-                if (id*1 === 4){
-                    image = imageList4[index];
-                    if (image.productId != '') {
-                        productIds4 = productIds4.replace(image.productId, "");
+
+                //产品回显
+                $(function () {
+                    <c:forEach items="${associateList1}" var="associate" varStatus="index">
+                    imageList1.push({
+                        id: "${associate.id}",
+                        productId: "${empty associate.productId ? "":associate.productId}",
+                        image: "${associate.image}",
+                        productName: "${associate.productName}",
+                        shopName: "${associate.shopName}",
+                        sort: "${associate.sort}",
+                        pcStatus: "${associate.pcStatus}",
+                        appletsStatus: "${associate.appletsStatus}",
+                        addTime: "<fmt:formatDate value="${associate.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+                    });
+                    </c:forEach>
+
+                    if (imageList1.length > 0) {
+                        $('#couponWrap1').find('.contentTableProduct').show();
+                        batchSaveSort(1);
+                        showSelectProduct(1);
+                    }
+                });
+
+                $(function () {
+                    <c:forEach items="${associateList2}" var="associate" varStatus="index">
+                    imageList2.push({
+                        id: "${associate.id}",
+                        productId: "${empty associate.productId ? "":associate.productId}",
+                        image: "${associate.image}",
+                        productName: "${associate.productName}",
+                        shopName: "${associate.shopName}",
+                        sort: "${associate.sort}",
+                        pcStatus: "${associate.pcStatus}",
+                        appletsStatus: "${associate.appletsStatus}",
+                        addTime: "<fmt:formatDate value="${associate.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+                    });
+                    </c:forEach>
+
+                    if (imageList2.length > 0) {
+                        $('#couponWrap2').find('.contentTableProduct').show();
+                        batchSaveSort(2);
+                        showSelectProduct(2);
+                    }
+                });
+
+                $(function () {
+                    <c:forEach items="${associateList3}" var="associate" varStatus="index">
+                    imageList3.push({
+                        id: "${associate.id}",
+                        productId: "${empty associate.productId ? "":associate.productId}",
+                        image: "${associate.image}",
+                        productName: "${associate.productName}",
+                        shopName: "${associate.shopName}",
+                        sort: "${associate.sort}",
+                        pcStatus: "${associate.pcStatus}",
+                        appletsStatus: "${associate.appletsStatus}",
+                        addTime: "<fmt:formatDate value="${associate.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+                    });
+                    </c:forEach>
+
+                    if (imageList3.length > 0) {
+                        $('#couponWrap3').find('.contentTableProduct').show();
+                        batchSaveSort(3);
+                        showSelectProduct(3);
                     }
-                    imageList4.splice(thisIndex, 1);
-                    tempList = imageList4;
+                });
+
+                $(function () {
+                    <c:forEach items="${associateList4}" var="associate" varStatus="index">
+                    imageList4.push({
+                        id: "${associate.id}",
+                        productId: "${empty associate.productId ? "":associate.productId}",
+                        image: "${associate.image}",
+                        productName: "${associate.productName}",
+                        shopName: "${associate.shopName}",
+                        sort: "${associate.sort}",
+                        pcStatus: "${associate.pcStatus}",
+                        appletsStatus: "${associate.appletsStatus}",
+                        addTime: "<fmt:formatDate value="${associate.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+                    });
+                    </c:forEach>
+
+                    if (imageList4.length > 0) {
+                        $('#couponWrap4').find('.contentTableProduct').show();
+                        batchSaveSort(4);
+                        showSelectProduct(4);
+                    }
+                });
+
+                //一键排序
+                function batchSaveSort(id) {
+                    if (id * 1 === 1) {
+                        imageList1.sort(sort);
+                        insertHtmlProduct(imageList1, id);
+                    }
+                    if (id * 1 === 2) {
+                        imageList2.sort(sort);
+                        insertHtmlProduct(imageList2, id);
+                    }
+                    if (id * 1 === 3) {
+                        imageList3.sort(sort);
+                        insertHtmlProduct(imageList3, id);
+                    }
+                    if (id * 1 === 4) {
+                        imageList4.sort(sort);
+                        insertHtmlProduct(imageList4, id);
+                    }
+
                 }
-                insertHtmlProduct(tempList, id);
-                if (tempList.length == 0) {
-                    $("#couponWrap"+id).find('.contentTableProduct').hide();
-                    $(".del").attr("disabled", "disabled");
+
+                //根据sort值 从小到大排序
+                function sort(a, b) {
+                    return a.sort - b.sort;
                 }
-            });
-        });
-    }
-
-    function appendShopOrderHead(data, id) {
-        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('+id+')">删除</a>' +
-            '</td>' +
-            '</tr>';
-        $("#couponWrap"+id).find(".hotSearchShop").html(html);
-        $("#chooseShop"+id).hide();
-        $("#couponWrap"+id).find(".contentTableShop").show();
-        $("#shopId"+id).val(data.shopId);
-    }
-
-    function delectShop(id) {
-        return confirmx("确定删除吗?", function () {
-            $("#chooseShop"+id).show();
-            $("#couponWrap"+id).find(".contentTableShop").hide();
-            $("#shopId"+id).val("");
-        });
-    }
-
-    /**
-     * 删除操作
-     */
-    function delect(index,id) {
-        return confirmx("确定删除吗?", function () {
-            var image;
-            if (id*1 === 1){
-                image = imageList1[index];
-                if (image.productId != '') {
-                    productIds1 = productIds1.replace(image.productId, "");
+
+                //相关图片列表数据
+                function appendProductOrderHead(data, index, id) {
+                    var html = '<tr id ="ai' + index + '">' +
+                        '<td>' +
+                        '<input class="check-item" type="checkbox" name="info" value="' + index + '"/>' + (index + 1) +
+                        '</td>' +
+                        '<td>' +
+                        '<img src="' + data.image + '" width="60px" border="none" title="启用">' +
+                        '</td>' +
+                        '<td>' +
+                        data.productName +
+                        '</td>' +
+                        '<td>' +
+                        data.shopName +
+                        '</td>' +
+                        '<td>' +
+                        (data.pcStatus == 1 ? (
+                            '<font color="green">已启用</font>&nbsp;&nbsp;&nbsp;' +
+                            '<a href="javascript:void(0);" onclick="updatePcStatus(0,' + index + ',' + id + ');" >' +
+                            '停用</a>'
+                        ) : (
+                            '<font color="red">已停用</font>&nbsp;&nbsp;&nbsp;' +
+                            '<a href="javascript:void(0)" onclick="updatePcStatus(1,' + index + ',' + id + ');">' +
+                            '启用</a>'
+                        )) +
+                        '</td>' +
+                        '<td>' +
+                        (data.appletsStatus == 1 ? (
+                            '<font color="green">已启用</font>&nbsp;&nbsp;&nbsp;' +
+                            '<a href="javascript:void(0);" onclick="updateAppletsStatus(0,' + index + ',' + id + ');" >' +
+                            '停用</a>'
+                        ) : (
+                            '<font color="red">已停用</font>&nbsp;&nbsp;&nbsp;' +
+                            '<a href="javascript:void(0)" onclick="updateAppletsStatus(1,' + index + ',' + id + ');">' +
+                            '启用</a>'
+                        )) +
+                        '</td>' +
+                        '<td>' +
+                        '<input name="sort" style="width:50px;" value="' + data.sort + '"  onkeyup="onlynum(this)"  onchange="changeSort(' + index + ',this,' + id + ')"></td>' +
+                        '</td>' +
+                        '<td>' +
+                        (data.addTime == '' ? (
+                            '<fmt:formatDate value="<%=new Date()%>" pattern="yyyy-MM-dd HH:mm:ss"/>'
+                        ) : (
+                            data.addTime
+                        )) +
+                        '</td>' +
+                        '<td>' +
+                        '<a href="javascript:;" onclick="delect(' + index + ',' + id + ')">删除</a>' +
+                        '</td>' +
+                        '</tr>';
+                    return html;
+                }
+
+                function insertHtmlProduct(list, id) {
+                    var html = '';
+                    tempIds = '';
+                    if (list && list.length > 0) {
+                        list.forEach(function (item, index) {
+                            html += appendProductOrderHead(item, index, id);
+                            tempIds += "," + item.productId;
+                        });
+                    }
+                    if (id * 1 === 1) {
+                        productIds1 = tempIds;
+                    }
+                    if (id * 1 === 2) {
+                        productIds2 = tempIds;
+                    }
+                    if (id * 1 === 3) {
+                        productIds3 = tempIds;
+                    }
+                    if (id * 1 === 4) {
+                        productIds4 = tempIds;
+                    }
+                    $("#couponWrap" + id).find(".hotSearchProduct").html(html);
+                }
+
+                function changeSort(index, sortThis, id) {
+                    var sort = sortThis.value;
+                    if (sort > 0) {
+                        var image;
+                        if (id * 1 === 1) {
+                            image = imageList1[index];
+                        }
+                        if (id * 1 === 2) {
+                            image = imageList2[index];
+                        }
+                        if (id * 1 === 3) {
+                            image = imageList3[index];
+                        }
+                        if (id * 1 === 4) {
+                            image = imageList4[index];
+                        }
+                        if (image) {
+                            image.sort = sort;
+                        }
+                    }
                 }
-                imageList1.splice(index, 1);
-                insertHtmlProduct(imageList1,id);
-                if (imageList1.length == 0) {
-                    $("#couponWrap"+id).find('#contentTableProduct').hide();
-                    $(".del").attr("disabled", "disabled");
+
+                function updatePcStatus(status, index, id) {
+                    var image;
+                    if (id * 1 === 1) {
+                        image = imageList1[index];
+                    }
+                    if (id * 1 === 2) {
+                        image = imageList2[index];
+                    }
+                    if (id * 1 === 3) {
+                        image = imageList3[index];
+                    }
+                    if (id * 1 === 4) {
+                        image = imageList4[index];
+                    }
+                    if (image) {
+                        confirmx(status == 0 ? '确定停用吗?' : '确定启用吗?', function () {
+                            image.pcStatus = status;
+                            batchSaveSort(id);
+                        });
+                    }
                 }
-            }
-            if (id*1 === 2){
-                image = imageList2[index];
-                if (image.productId != '') {
-                    productIds2 = productIds2.replace(image.productId, "");
+
+                function updateAppletsStatus(status, index, id) {
+                    var image;
+                    if (id * 1 === 1) {
+                        image = imageList1[index];
+                    }
+                    if (id * 1 === 2) {
+                        image = imageList2[index];
+                    }
+                    if (id * 1 === 3) {
+                        image = imageList3[index];
+                    }
+                    if (id * 1 === 4) {
+                        image = imageList4[index];
+                    }
+                    if (image) {
+                        confirmx(status == 0 ? '确定停用吗?' : '确定启用吗?', function () {
+                            image.appletsStatus = status;
+                            batchSaveSort(id);
+                        });
+                    }
                 }
-                imageList2.splice(index, 1);
-                insertHtmlProduct(imageList2,id);
-                if (imageList2.length == 0) {
-                    $("#couponWrap"+id).find('#contentTableProduct').hide();
-                    $(".del").attr("disabled", "disabled");
+
+                /**
+                 * 批量删除
+                 */
+                function batchDeletion(id) {
+                    var index = -1;
+                    var i = 1;
+                    return confirmx("确定删除吗?", function () {
+                        $('input[name="info"]:checked').each(function () {
+                            var thisIndex = $(this).val();
+                            if (index >= 0 && index < thisIndex) {
+                                thisIndex = thisIndex - i;
+                                i++;
+                            } else {
+                                index = thisIndex;
+                            }
+                            var image, tempList;
+                            if (id * 1 === 1) {
+                                image = imageList1[index];
+                                if (image.productId != '') {
+                                    productIds1 = productIds1.replace(image.productId, "");
+                                }
+                                imageList1.splice(thisIndex, 1);
+                                tempList = imageList1;
+                            }
+                            if (id * 1 === 2) {
+                                image = imageList2[index];
+                                if (image.productId != '') {
+                                    productIds2 = productIds2.replace(image.productId, "");
+                                }
+                                imageList2.splice(thisIndex, 1);
+                                tempList = imageList2;
+                            }
+                            if (id * 1 === 3) {
+                                image = imageList3[index];
+                                if (image.productId != '') {
+                                    productIds3 = productIds3.replace(image.productId, "");
+                                }
+                                imageList3.splice(thisIndex, 1);
+                                tempList = imageList3;
+                            }
+                            if (id * 1 === 4) {
+                                image = imageList4[index];
+                                if (image.productId != '') {
+                                    productIds4 = productIds4.replace(image.productId, "");
+                                }
+                                imageList4.splice(thisIndex, 1);
+                                tempList = imageList4;
+                            }
+                            insertHtmlProduct(tempList, id);
+                            if (tempList.length == 0) {
+                                $("#couponWrap" + id).find('.contentTableProduct').hide();
+                                $(".del").attr("disabled", "disabled");
+                            }
+                        });
+                    });
                 }
-            }
-            if (id*1 === 3){
-                image = imageList3[index];
-                if (image.productId != '') {
-                    productIds3 = productIds3.replace(image.productId, "");
+
+                function appendShopOrderHead(data, id) {
+                    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(' + id + ')">删除</a>' +
+                        '</td>' +
+                        '</tr>';
+                    $("#couponWrap" + id).find(".hotSearchShop").html(html);
+                    $("#chooseShop" + id).hide();
+                    $("#couponWrap" + id).find(".contentTableShop").show();
+                    $("#shopId" + id).val(data.shopId);
                 }
-                imageList3.splice(index, 1);
-                insertHtmlProduct(imageList3,id);
-                if (imageList3.length == 0) {
-                    $("#couponWrap"+id).find('#contentTableProduct').hide();
-                    $(".del").attr("disabled", "disabled");
+
+                function delectShop(id) {
+                    return confirmx("确定删除吗?", function () {
+                        $("#chooseShop" + id).show();
+                        $("#couponWrap" + id).find(".contentTableShop").hide();
+                        $("#shopId" + id).val("");
+                    });
                 }
-            }
-            if (id*1 === 4){
-                image = imageList4[index];
-                if (image.productId != '') {
-                    productIds4 = productIds4.replace(image.productId, "");
+
+                /**
+                 * 删除操作
+                 */
+                function delect(index, id) {
+                    return confirmx("确定删除吗?", function () {
+                        var image;
+                        if (id * 1 === 1) {
+                            image = imageList1[index];
+                            if (image.productId != '') {
+                                productIds1 = productIds1.replace(image.productId, "");
+                            }
+                            imageList1.splice(index, 1);
+                            insertHtmlProduct(imageList1, id);
+                            if (imageList1.length == 0) {
+                                $("#couponWrap" + id).find('#contentTableProduct').hide();
+                                $(".del").attr("disabled", "disabled");
+                            }
+                        }
+                        if (id * 1 === 2) {
+                            image = imageList2[index];
+                            if (image.productId != '') {
+                                productIds2 = productIds2.replace(image.productId, "");
+                            }
+                            imageList2.splice(index, 1);
+                            insertHtmlProduct(imageList2, id);
+                            if (imageList2.length == 0) {
+                                $("#couponWrap" + id).find('#contentTableProduct').hide();
+                                $(".del").attr("disabled", "disabled");
+                            }
+                        }
+                        if (id * 1 === 3) {
+                            image = imageList3[index];
+                            if (image.productId != '') {
+                                productIds3 = productIds3.replace(image.productId, "");
+                            }
+                            imageList3.splice(index, 1);
+                            insertHtmlProduct(imageList3, id);
+                            if (imageList3.length == 0) {
+                                $("#couponWrap" + id).find('#contentTableProduct').hide();
+                                $(".del").attr("disabled", "disabled");
+                            }
+                        }
+                        if (id * 1 === 4) {
+                            image = imageList4[index];
+                            if (image.productId != '') {
+                                productIds4 = productIds4.replace(image.productId, "");
+                            }
+                            imageList4.splice(index, 1);
+                            insertHtmlProduct(imageList4, id);
+                            if (imageList4.length == 0) {
+                                $("#couponWrap" + id).find('#contentTableProduct').hide();
+                                $(".del").attr("disabled", "disabled");
+                            }
+                        }
+                    });
                 }
-                imageList4.splice(index, 1);
-                insertHtmlProduct(imageList4,id);
-                if (imageList4.length == 0) {
-                    $("#couponWrap"+id).find('#contentTableProduct').hide();
-                    $(".del").attr("disabled", "disabled");
+
+
+                function clickAllSelect(ckb) {
+                    var isChecked = ckb.checked;
+                    $(".check-item").attr('checked', isChecked);
                 }
-            }
-        });
-    }
-
-
-    function clickAllSelect(ckb) {
-        var isChecked = ckb.checked;
-        $(".check-item").attr('checked', isChecked);
-    }
-
-    /**
-     * @param obj
-     * jquery控制input只能输入数字
-     */
-    function onlynum(obj) {
-        obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
-    }
-
-    $(document).ready(function () {
-        //$("#name").focus();
-        $("#inputForm").validate({
-            submitHandler: function (form) {
-
-                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);
+
+                /**
+                 * @param obj
+                 * jquery控制input只能输入数字
+                 */
+                function onlynum(obj) {
+                    obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
                 }
-            }
-        });
-    });
-</script>
+
+                $(document).ready(function () {
+                    //$("#name").focus();
+                    $("#inputForm").validate({
+                        submitHandler: function (form) {
+
+                            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);
+                            }
+                        }
+                    });
+                });
+
+
+            </script>
 </body>
 </html>