瀏覽代碼

发布新品

zhijiezhao 3 年之前
父節點
當前提交
2b449cbfa3

+ 2 - 0
src/main/java/com/caimei/modules/product/dao/ProductDao.java

@@ -181,4 +181,6 @@ public interface ProductDao extends CrudDao<Product> {
     List<Integer> getProductIdByBrandId(String brandId);
 
     List<Shop> findSepcialShopList();
+
+    void updateMainImage(Product product);
 }

+ 36 - 0
src/main/java/com/caimei/modules/product/entity/Product.java

@@ -69,6 +69,7 @@ public class Product extends DataEntity<Product> {
     private Date downlineTime;        // 下架时间
     private String freePostFlag;        // 是否包邮 0包邮 1不包邮
     private String costPrice;        // 成本价
+    private Double SqlCostPrice;
     private String costProportional;        // 比例成本百分比
     private String costCheckFlag;        // 成本价选中标志:1固定成本 2比例成
     private String precisehKey;        // 精确关键字
@@ -84,6 +85,7 @@ public class Product extends DataEntity<Product> {
     private String productDetail; //普通机构商品详情1同资质机构商品详情,2用普通机构商品详情
     private String splitCode; //  该商品分账商户号
     //-----------------  虚拟字段 ----
+    private Integer shopType; //供应商类别,普通1,新品供应商2,二手供应商3
     private boolean customClass = false;  //是否有自定义分类
     private String brandName;//品牌名称
     private String otherBrandName;//其他手填品牌名称
@@ -106,7 +108,9 @@ public class Product extends DataEntity<Product> {
     private String includedTax;//是否含税   0不含税,1含税
     private String invoiceType;//发票类型(基于是否含税基础)   1增值税票,2普通票, 3不能开票
     private String taxPoint;//机构开票税点(基于不含税基础) :增值税默认13%,普通票6%取值范围[0-100]
+    private Double sqlTaxPoint;
     private String supplierTaxPoint;//供应商开票税点(基于不含税基础) :增值税默认13%,普通票6%取值范围[0-100]
+    private Double sqlSupplierTaxPoint;//供应商开票税点(基于不含税基础) :增值税默认13%,普通票6%取值范围[0-100]
     private Integer giftNumber;//赠品数量
     private BigDecimal reducedPrice;//优惠价格
     private String promotionType;//促销类型
@@ -219,6 +223,38 @@ public class Product extends DataEntity<Product> {
      */
     private Integer searchType;
 
+    public Double getSqlTaxPoint() {
+        return sqlTaxPoint;
+    }
+
+    public void setSqlTaxPoint(Double sqlTaxPoint) {
+        this.sqlTaxPoint = sqlTaxPoint;
+    }
+
+    public Double getSqlCostPrice() {
+        return SqlCostPrice;
+    }
+
+    public void setSqlCostPrice(Double sqlCostPrice) {
+        SqlCostPrice = sqlCostPrice;
+    }
+
+    public Integer getShopType() {
+        return shopType;
+    }
+
+    public void setShopType(Integer shopType) {
+        this.shopType = shopType;
+    }
+
+    public Double getSqlSupplierTaxPoint() {
+        return sqlSupplierTaxPoint;
+    }
+
+    public void setSqlSupplierTaxPoint(Double sqlSupplierTaxPoint) {
+        this.sqlSupplierTaxPoint = sqlSupplierTaxPoint;
+    }
+
     public String getCompanyName() {
         return companyName;
     }

+ 87 - 6
src/main/java/com/caimei/modules/product/service/ProductService.java

@@ -4,12 +4,10 @@ import com.caimei.dfs.image.beens.ImageUploadInfo;
 import com.caimei.modules.brand.dao.CmBrandDao;
 import com.caimei.modules.brand.entity.CmBrand;
 import com.caimei.modules.common.utils.UploadUtils;
-import com.caimei.modules.product.dao.CmBigtypeDao;
-import com.caimei.modules.product.dao.CmSmalltypeDao;
-import com.caimei.modules.product.dao.CmTinytypeDao;
-import com.caimei.modules.product.dao.ProductDao;
+import com.caimei.modules.product.dao.*;
 import com.caimei.modules.product.entity.*;
 import com.caimei.modules.sys.utils.UploadImageUtils;
+import com.caimei.po.ProductImage;
 import com.caimei.po.ProductLadderPrice;
 import com.caimei.po.Shop;
 import com.caimei.utils.AppUtils;
@@ -26,6 +24,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
 import java.util.*;
 
 @Service
@@ -42,7 +42,8 @@ public class ProductService extends CrudService<ProductDao, Product> {
     private CmSmalltypeDao cmSmalltypeDao;
     @Autowired
     private CmTinytypeDao cmTinytypeDao;
-
+    @Resource
+    private ProductNewDao productNewDao;
 
     @Override
     public Product get(String id) {
@@ -387,7 +388,49 @@ public class ProductService extends CrudService<ProductDao, Product> {
 //        if(StringUtils.isNotBlank(product.getSplitCode())&&"0".equals(product.getSplitCode())){
 //            product.setSplitCode(null);
 //        }
-        productDao.updateByPrimaryKeySelective(product);
+        if (null != product.getShopType() && 2 == product.getShopType()) {
+            product.setValidFlag("2");
+            if(StringUtils.isNotBlank(product.getCostPrice())){
+                product.setSqlCostPrice(Double.valueOf(product.getCostPrice()));
+            }
+            if(StringUtils.isNotBlank(product.getTaxPoint())){
+                product.setSqlTaxPoint(Double.valueOf(product.getTaxPoint()));
+            }
+            if(StringUtils.isNotBlank(product.getSupplierTaxPoint())){
+                product.setSqlSupplierTaxPoint(Double.valueOf(product.getSupplierTaxPoint()));
+            }
+            productDao.insert(product);
+            // 保存商品图片
+            String image1 = product.getImage1();
+            if (StringUtils.isNotEmpty(image1)) {
+                String imageUrl = getImageUrl(image1);
+                product.setMainImage(imageUrl);
+                addProductImage(imageUrl, "1", product.getProductID(), product.getShopID());
+            }
+            String image2 = product.getImage2();
+            if (StringUtils.isNotEmpty(image2)) {
+                String imageUrl = getImageUrl(image2);
+                addProductImage(imageUrl, "0",  product.getProductID(), product.getShopID());
+            }
+            String image3 = product.getImage3();
+            if (StringUtils.isNotEmpty(image3)) {
+                String imageUrl = getImageUrl(image3);
+                addProductImage(imageUrl, "0",  product.getProductID(), product.getShopID());
+            }
+            String image4 = product.getImage4();
+            if (StringUtils.isNotEmpty(image4)) {
+                String imageUrl = getImageUrl(image4);
+                addProductImage(imageUrl, "0", product.getProductID(), product.getShopID());
+            }
+            String image5 = product.getImage5();
+            if (StringUtils.isNotEmpty(image5)) {
+                String imageUrl = getImageUrl(image5);
+                addProductImage(imageUrl, "0",  product.getProductID(), product.getShopID());
+            }
+            productDao.updateMainImage(product);
+        }else{
+            productDao.updateByPrimaryKeySelective(product);
+        }
         ProductDetailInfo queryProductDetailInfo = productDao.queryProductDetailInfo(product.getProductID());
         if (queryProductDetailInfo != null) {
             productDao.updateproductDetailInfo(productDetailInfo);
@@ -425,6 +468,44 @@ public class ProductService extends CrudService<ProductDao, Product> {
         }
     }
 
+    public void addProductImage(String image, String mainFlag, Integer productID, Integer shopID) {
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        String dateStr = simpleDateFormat.format(new Date());
+        ProductImage productimage = new ProductImage();
+        productimage.setImage(image);
+        productimage.setProductID(productID);
+        productimage.setShopID(shopID);
+        productimage.setAddTime(dateStr);
+        productimage.setMainFlag(mainFlag);
+        productimage.setSortIndex(null);
+        productNewDao.insertProductImage(productimage);
+    }
+
+
+    /**
+     * 获取商品图片服务器全路径
+     *
+     * @param imageUrl
+     * @return
+     */
+    public String getImageUrl(String imageUrl) {
+        String photoServer = Global.getConfig("photoServer");//获取文件服务器地址
+        ImageUploadInfo saveImageSerivce = new ImageUploadInfo();
+        if (StringUtils.isNotBlank(imageUrl) && !imageUrl.startsWith("http:") && !imageUrl.startsWith("https:")) {
+            imageUrl = Encodes.urlDecode(imageUrl);
+            String realPath = UploadImageUtils.getAbsolutePath(imageUrl);
+            int pointerIndex = realPath.lastIndexOf(".");
+            try {
+                saveImageSerivce = UploadUtils.saveImageSerivce(realPath, pointerIndex, realPath);
+                imageUrl = photoServer + saveImageSerivce.getSource();
+            } catch (Exception e) {
+                logger.error("图片上传错误:" + e.toString(), e);
+            }
+        }
+        return imageUrl;
+    }
+
+
     /**
      * 获取未添加推荐的商品分页
      *

+ 23 - 8
src/main/java/com/caimei/modules/product/web/ProductNewController.java

@@ -299,9 +299,23 @@ public class ProductNewController extends BaseController {
             product.setProductDescribe(productService.findProductDescribe(product.getProductID()));
             product.setLadderPriceList(ladderPriceList);
             product.setProductDetail(productService.findProductDetail(product.getProductID()));
+        } else {
+            //发布特殊商品给默认值
+            product.setIncludedTax("2");
+            product.setInvoiceType("3");
+            product.setStep("1");
+            product.setAllAreaFlag("1");
+            product.setLadderPriceFlag("0");
+            product.setPrice(0d);
+            product.setSvipFlag(2);
+            product.setCommodityType("1");
+            product.setBigTypeID(0);
+            product.setSmallTypeID(0);
+            product.setTinyTypeID(0);
         }
         product.setCommodityType(StringUtils.isEmpty(product.getCommodityType()) ? "0" : product.getCommodityType());
         List<CmBrand> brandList = productService.findBrandList();
+        List<Shop> shopList = productService.findSepcialShopList();
         Map<String, Object> classify = productService.findClassify();
         List<Province> provinceList = areaService.loadProvince();
         List<CmProductCombination> combinationList = cmProductCombinationService.findProductCombinationList();
@@ -344,6 +358,7 @@ public class ProductNewController extends BaseController {
 //        model.addAttribute("splitCodeList",splitCodeList);
         model.addAttribute("combinationList", combinationList);
         model.addAttribute("brandList", brandList);
+        model.addAttribute("shopList", shopList);
         model.addAttribute("classify", classify);
         model.addAttribute("provinceList", provinceList);
         model.addAttribute("product", product);
@@ -351,7 +366,7 @@ public class ProductNewController extends BaseController {
     }
 
     @RequestMapping(value = "productNewSave")
-    public String productNewSave(Product product, RedirectAttributes redirectAttributes){
+    public String productNewSave(Product product, RedirectAttributes redirectAttributes) {
         // 组合搜索关键词
         List<String> searchKeyList = product.getSearchKeyList();
         String searchKeyStr = "";
@@ -366,30 +381,30 @@ public class ProductNewController extends BaseController {
         productService.save(product);
 
         // 保存商品图片
-        String image1=product.getImage1();
+        String image1 = product.getImage1();
         if (StringUtils.isNotEmpty(image1)) {
             String imageUrl = getImageUrl(image1);
-            addProductImage(imageUrl, "1", Integer.valueOf(product.getId()),product.getShopID());
+            addProductImage(imageUrl, "1", Integer.valueOf(product.getId()), product.getShopID());
         }
         String image2 = product.getImage2();
         if (StringUtils.isNotEmpty(image2)) {
             String imageUrl = getImageUrl(image2);
-            addProductImage(imageUrl, "0", Integer.valueOf(product.getId()),product.getShopID());
+            addProductImage(imageUrl, "0", Integer.valueOf(product.getId()), product.getShopID());
         }
         String image3 = product.getImage3();
         if (StringUtils.isNotEmpty(image3)) {
             String imageUrl = getImageUrl(image3);
-            addProductImage(imageUrl, "0", Integer.valueOf(product.getId()),product.getShopID());
+            addProductImage(imageUrl, "0", Integer.valueOf(product.getId()), product.getShopID());
         }
         String image4 = product.getImage4();
         if (StringUtils.isNotEmpty(image4)) {
             String imageUrl = getImageUrl(image4);
-            addProductImage(imageUrl, "0", Integer.valueOf(product.getId()),product.getShopID());
+            addProductImage(imageUrl, "0", Integer.valueOf(product.getId()), product.getShopID());
         }
         String image5 = product.getImage5();
         if (StringUtils.isNotEmpty(image5)) {
             String imageUrl = getImageUrl(image5);
-            addProductImage(imageUrl, "0", Integer.valueOf(product.getId()),product.getShopID());
+            addProductImage(imageUrl, "0", Integer.valueOf(product.getId()), product.getShopID());
         }
         // 保存商品相关参数
         List<ProductParameters> productParametersList = product.getProductParametersList();
@@ -461,7 +476,7 @@ public class ProductNewController extends BaseController {
         return "redirect:" + Global.getAdminPath() + "/product/new/list/";
     }
 
-    public void addProductImage(String image, String mainFlag, Integer productID,Integer shopID) {
+    public void addProductImage(String image, String mainFlag, Integer productID, Integer shopID) {
         SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         String dateStr = simpleDateFormat.format(new Date());
         ProductImage productimage = new ProductImage();

+ 42 - 7
src/main/resources/mappings/modules/product/ProductMapper.xml

@@ -322,9 +322,8 @@
 		</choose>
 	</select>
 
-	<insert id="insert" parameterType="Product"  keyProperty="id" useGeneratedKeys="true">
+	<insert id="insert" parameterType="Product"  keyProperty="productID"  keyColumn="productID" useGeneratedKeys="true">
 		INSERT INTO product(
-			productID,
 			brandID,
 			bigTypeID,
 			smallTypeID,
@@ -372,15 +371,30 @@
 			step,
 			actFlag,
 			actType,
+			actSort,
 			onlineTime,
 			downlineTime,
 			freePostFlag,
 			costPrice,
 			costProportional,
 			costCheckFlag,
-			precisehKey
+			precisehKey,
+			visibility,
+			productType,
+			qualificationImg,
+			invoiceType,
+			taxPoint,
+			supplierTaxPoint,
+			tags,
+			recommendType,
+			machineType,
+			includedTax,
+			commodityType,
+			trainingMethod,
+			trainingType,
+			trainingFee,
+			splitCode
 		) VALUES (
-					 #{id},
 					 #{brandID},
 					 #{bigTypeID},
 					 #{smallTypeID},
@@ -428,14 +442,30 @@
 					 #{step},
 					 #{actFlag},
 					 #{actType},
+		          	 #{actSort},
 					 #{onlineTime},
 					 #{downlineTime},
 					 #{freePostFlag},
-					 #{costPrice},
+					 #{SqlCostPrice},
 					 #{costProportional},
 					 #{costCheckFlag},
-					 #{precisehKey}
-				 )
+					 #{precisehKey},
+		         	 #{visibility},
+		         	 #{productType},
+					 #{qualificationImg},
+					 #{invoiceType},
+					 #{sqlTaxPoint},
+					 #{sqlSupplierTaxPoint},
+					 #{tags},
+					 #{recommendType},
+					 #{machineType},
+					 #{includedTax},
+					 #{commodityType},
+					 #{trainingMethod},
+					 #{trainingType},
+					 #{trainingFee},
+					 #{splitCode}
+						 )
 	</insert>
 
 	<update id="update">
@@ -1659,6 +1689,11 @@
 			delFlag = #{delFlag}
 		where id = #{id}
 	</update>
+	<update id="updateMainImage">
+		update product
+		set mainImage =#{mainImage}
+		where productID=#{productID}
+	</update>
 
 	<select id="getProductByTypeName" resultType="com.caimei.modules.brand.entity.BrandAndProductType">
 		select

+ 393 - 1
src/main/webapp/WEB-INF/views/modules/product-new/cmNewProductForm.jsp

@@ -291,7 +291,7 @@
             <div class="controls upload-content" id="secondHandImage">
                 <div class="conList">
                     <form:hidden value="${product.image1}" id="image1" path="image1" htmlEscape="false"
-                                 maxlength="255" class="input-xlarge"/>
+                                 maxlength="255" class="input-xlarge required"/>
                     <sys:ckfinder input="image1" type="images" uploadPath="/photo" selectMultiple="false"
                                   maxWidth="100"
                                   maxHeight="100"/>
@@ -330,6 +330,398 @@
             </div>
         </div>
 
+        <tr>
+            <th>组合名称:</th>
+            <td colspan="3">
+                <form:select path="combinationID" class="input-small">
+                    <form:option value="" label="请选择"/>
+                    <form:options items="${combinationList}" itemLabel="name" itemValue="id" htmlEscape="false"/>
+                </form:select>
+            </td>
+        </tr>
+        <tr>
+            <th><span class="red">*</span>商品标签:</th>
+            <td colspan="3">
+                <input id="inputTags" maxlength="15" style="width:217px;border-radius:5px" placeholder="请输入商品标签"
+                       class="input-small"/>
+                <button class="addTags" onclick="return false">添加标签</button>
+                <p style="margin-top: 5px">简述商品功效和特性,最多可添加6个标签,每个标签字数不超过15个汉字(如:美白祛斑,消除皱纹)</p>
+                <div id="tagsList">
+                    <input type="hidden" name="tagsLists" value="${product.tags}" id="tagsLists">
+                        <%--标签--%>
+                </div>
+            </td>
+        </tr>
+        <tr>
+            <th><span class="red">*</span>商品属性:</th>
+            <td colspan="3">
+                <label><input type="radio" name="commodityType" value="1"
+                              onchange="loadBigType()" ${product.commodityType == "1" ? "checked" : ""} />产品<b
+                        class="line">|</b></label>
+                <label><input type="radio" name="commodityType" value="2"
+                              onchange="loadBigType()" ${product.commodityType == "2" ? "checked" : ""} />仪器</label>
+            </td>
+        </tr>
+        <tr class="training" hidden>
+            <th><span class="red">*</span>培训方式:</th>
+            <td colspan="3">
+                <label><input type="radio" name="trainingMethod"
+                              value="1" ${empty product.trainingMethod || product.trainingMethod == 1 ? "checked" : ""} />线上培训<b
+                        class="line">|</b></label>
+                <label><input type="radio" name="trainingMethod"
+                              value="2" ${product.trainingMethod == 2 ? "checked" : ""} />线下培训</label>
+            </td>
+        </tr>
+        <tr class="training" hidden>
+            <th><span class="red">*</span>培训费用:</th>
+            <td colspan="3">
+                <label><input type="radio" name="trainingType"
+                              value="1" ${empty product.trainingType || product.trainingType == 1 ? "checked" : ""}
+                              onchange="trainingShow()"/>售价未包含<b class="line">|</b></label>
+                <label><input type="radio" name="trainingType" value="2" ${product.trainingType == 2 ? "checked" : ""}
+                              onchange="trainingShow()"/>售价已包含</label>
+            </td>
+        </tr>
+        <tr id="trainingFee" hidden>
+            <th></th>
+            <td colspan="3">
+                <input type="number" name="trainingFee" value="${product.trainingFee}" style="width: 250px" min="0"
+                       placeholder="请填写包含食宿,交通等各项费用的总金额"/>
+            </td>
+        </tr>
+        <tr>
+            <th><span class="red">*</span>分类:</th>
+            <td colspan="3">
+                <form:select path="bigTypeID" class="input-small required" id="bigType" onchange="loadSmallType()">
+                    <form:option value="" label="请选择"/>
+                    <form:options items="${classify.bigTypeList}" itemLabel="name" itemValue="bigTypeID"
+                                  htmlEscape="false"/>
+                </form:select>
+                <form:select path="smallTypeID" class="input-small" id="smallType" onchange="loadTinyType()">
+                    <form:option value="" label="请选择"/>
+                    <c:forEach items="${classify.smalltypeList}" var="smallType">
+                        <form:option value="${smallType.smallTypeID}" label="${smallType.name}"
+                                     bigTypeID="${smallType.bigTypeID}"/>
+                    </c:forEach>
+                </form:select>
+                <form:select path="tinyTypeID" class="input-small" id="tinyType">
+                    <form:option value="" label="请选择"/>
+                    <c:forEach items="${classify.tinytypeList}" var="tinyType">
+                        <form:option value="${tinyType.tinyTypeID}" label="${tinyType.name}"
+                                     bigTypeID="${tinyType.smallTypeID}"/>
+                    </c:forEach>
+                </form:select>
+            </td>
+        </tr>
+        <tr>
+            <th><span class="red">*</span>商品类型:</th>
+            <td colspan="3">
+                <form:select path="productType" class="input-small required" onclick="changeMachine(this)">
+                    <form:option value="" label="请选择"/>
+                    <form:option value="1" label="妆字号"/>
+                    <form:option value="2" label="械字号"/>
+                    <form:option value="0" label="其它"/>
+                </form:select>
+                <span class="machineType">
+                    <form:select path="machineType" class="input-small">
+                        <form:option value="" label="请选择"/>
+                        <form:option value="1" label="一类"/>
+                        <form:option value="2" label="二类"/>
+                        <form:option value="3" label="三类"/>
+                    </form:select>
+                </span>
+            </td>
+        </tr>
+        <tr id="xiezihao" class="machineType">
+            <th><span class="red">*</span>资质证书:</th>
+            <td colspan="3">
+                    <%-- 械字号医疗证书--%>
+                <form:hidden id="qualificationImg" path="qualificationImg" htmlEscape="false" maxlength="255"
+                             class="input-xlarge"/>
+                <sys:ckfinder input="qualificationImg" type="images" uploadPath="/photo" selectMultiple="false"
+                              maxWidth="100" maxHeight="100"/>
+            </td>
+        </tr>
+        <tr>
+            <th><span class="red">*</span>市场价:</th>
+            <td colspan="3"><form:input path="normalPrice" type="number" maxlength="11"
+                                        class="short input-small required"/>元
+            </td>
+        </tr>
+        <tr>
+            <th><span class="red">*</span>商品展示价格:</th>
+            <td colspan="3">
+                <label><input type="radio" name="ladderPriceFlag" value="0"
+                              onchange="changeLadderPrice()" ${product.ladderPriceFlag == "0" ? "checked" : ""} />不使用阶梯价格<b
+                        class="line">|</b></label>
+                <label><input type="radio" name="ladderPriceFlag" value="1"
+                              onchange="changeLadderPrice()" ${product.ladderPriceFlag == "1" ? "checked" : ""} />使用阶梯价格</label>
+            </td>
+        </tr>
+        <tr>
+            <th style="vertical-align:top;padding-top:15px;"><span class="red">*</span>机构价:</th>
+            <td colspan="3">
+                <div class="item">
+                    <div id="normalPriceBox">
+                        <form:input path="price" type="number" id="price" maxlength="11"
+                                    class="short computedPrice required" onkeyup="computedPriceLevel(this.value)"/>
+                        <b class="line">|</b>游客展示等级:<span>
+                            <i class="priceIcon"></i>
+                            <i class="priceIcon"></i>
+                            <i class="priceIcon"></i>
+                            <i class="priceIcon"></i>
+                            <i class="priceIcon"></i>
+                        </span>
+                    </div>
+                    <div id="ladderPriceBox">
+                        <div id="ladderPrice1">
+                            起订量:<form:input path="ladderPriceList[0].buyNum" min="1" type="number" maxlength="11"
+                                            class="short number" onblur="checkBuyNum(this, 0)"/>(${product.unit})及以上,
+                            <form:input path="ladderPriceList[0].buyPrice" type="number" maxlength="11"
+                                        class="short price" onblur="checkBuyPrice(this, 0)"/>元/(${product.unit})
+                            <span class="showBtn ${null != product.ladderPriceList[1] && null != product.ladderPriceList[1].buyNum ? "hide" : ""}">
+                                <a class="addBtn" href="javascript:;">添加</a>
+                                <form:hidden path="ladderPriceList[0].id"/>
+                                <form:hidden path="ladderPriceList[0].delFlag" id="delFlag1"/>
+                            </span>
+                        </div>
+                        <div id="ladderPrice2" ${null == product.ladderPriceList[1] && null == product.ladderPriceList[1].buyNum ? "class='hide'" : ""}>
+                            起订量:<form:input path="ladderPriceList[1].buyNum" type="number" maxlength="11"
+                                            class="short number" onblur="checkBuyNum(this, 1)"/>(${product.unit})及以上,
+                            <form:input path="ladderPriceList[1].buyPrice" type="number" maxlength="11"
+                                        class="short price" onblur="checkBuyPrice(this, 1)"/>元/(${product.unit})
+                            <span class="showBtn ${null != product.ladderPriceList[2] && null != product.ladderPriceList[2].buyNum ? "hide" : ""}">
+                                <a class="delBtn" href="javascript:;">删除</a> / <a class="addBtn"
+                                                                                  href="javascript:;">添加</a>
+                                <form:hidden path="ladderPriceList[1].id"/>
+                                <form:hidden path="ladderPriceList[1].delFlag" id="delFlag2"/>
+                            </span>
+                        </div>
+                        <div id="ladderPrice3" ${null == product.ladderPriceList[2] && null == product.ladderPriceList[2].buyNum ? "class='hide'" : ""}>
+                            起订量:<form:input path="ladderPriceList[2].buyNum" type="number" maxlength="11"
+                                            class="short number" onblur="checkBuyNum(this, 2)"/>(${product.unit})及以上,
+                            <form:input path="ladderPriceList[2].buyPrice" type="number" maxlength="11"
+                                        class="short price" onblur="checkBuyPrice(this, 2)"/>元/(${product.unit})
+                            <span class="showBtn"><a class="delBtn" href="javascript:;">删除</a></span>
+                            <form:hidden path="ladderPriceList[2].id"/>
+                            <form:hidden path="ladderPriceList[2].delFlag" id="delFlag3"/>
+                        </div>
+                    </div>
+                </div>
+            </td>
+        </tr>
+        <tr>
+            <th><span class="red">*</span>是否含税:</th>
+            <td>
+
+                <label><input type="radio" name="includedTax" value="1"
+                              onclick="chageIncludedTax(${product.taxPoint})"  ${product.includedTax == "1" ? "checked" : ""}>含税<b
+                        class="line">|</b></label>
+                <label><input type="radio" name="includedTax" value="0"
+                              onclick="chageIncludedTax(${product.taxPoint})"   ${product.includedTax == "0" ? "checked" : ""}>不含税<b
+                        class="line">|</b></label>
+                <label><input type="radio" name="includedTax" value="2"
+                              onclick="chageIncludedTax(${product.taxPoint})"   ${product.includedTax == "2" ? "checked" : ""}>未知</label>
+            </td>
+        </tr>
+        <tr id="invoiceItem">
+            <th></th>
+            <td>
+                <span class="invoice">
+                    <label><input type="radio" name="invoiceType" value="1"
+                                  onclick="changeInvoiceType(${product.taxPoint})" ${product.invoiceType == "1" ? "checked" : ""}>开增值税专用发票<b
+                            class="line">|</b></label>
+                    <label><input type="radio" name="invoiceType" value="2"
+                                  onclick="changeInvoiceType(${product.taxPoint})" ${product.invoiceType == "2" ? "checked" : ""}>开增值税普通发票</label>
+                </span>
+                <span class="notInvoice">
+                    <b class="line">|</b>
+                    <label><input type="radio" name="invoiceType" value="3"
+                                  onclick="changeInvoiceType(${product.taxPoint})" ${product.invoiceType == "3" ? "checked" : ""}>不能开票</label>
+                </span>
+            </td>
+        </tr>
+        <tr>
+            <th>线上分账账号:</th>
+            <td colspan="3">
+                <form:input path="splitCode" type="number" id="splitCode" maxlength="10"/>
+            </td>
+        </tr>
+        <tr id="taxPointDiv">
+            <th><span class="red">*</span>机构税率:</th>
+            <td>
+                <span><form:input path="taxPoint" maxlength="5" cssStyle="width: 35PX" class="number"
+                                  onchange="setTwoNumberDecimal(this)"/>%</span>
+            </td>
+        </tr>
+        <tr id="supplierTaxPointDiv">
+            <th><span class="red">*</span>供应商税率:</th>
+            <td>
+                <span><form:input path="supplierTaxPoint" maxlength="5" cssStyle="width: 35PX" class="number"
+                                  onchange="setTwoNumberDecimal(this)"/>%</span>
+            </td>
+        </tr>
+
+        <tr id="priceMinNumber">
+            <th><span class="red">*</span>起订量:</th>
+            <td colspan="3"><form:input path="minBuyNumber" maxlength="11" class="short"/></td>
+        </tr>
+        <tr>
+            <th><span class="red">*</span>商品可见度:</th>
+            <td colspan="3">
+                <form:select path="visibility" class="input-large required" id="visibility">
+                    <form:option value="3" label="所有人可见"/>
+                    <form:option value="2" label="所有机构可见"/>
+                    <form:option value="1" label="仅会员机构可见"/>
+                    <form:option value="4" label="仅医美机构可见"/>
+                </form:select>
+            </td>
+        </tr>
+        <tr>
+            <th><span class="red">*</span>价格可见度:</th>
+            <td colspan="3">
+                <form:select path="priceFlag" class="input-large required" id="priceFlag">
+                    <form:option value="0" label="对所有机构公开"/>
+                    <form:option value="2" label="仅对会员机构公开"/>
+                    <form:option value="3" label="仅对医美机构公开"/>
+                    <form:option value="1" label="价格不公开"/>
+                </form:select>
+            </td>
+        </tr>
+        <tr>
+            <th><span class="red">*</span>成本:</th>
+            <td colspan="3">
+                <label><input type="radio" name="costCheckFlag" value="1"
+                              onchange="changeCostPriceShow()" ${product.costCheckFlag == "1" ? "checked" : ""} />固定成本<b
+                        class="line">|</b></label>
+                <label><input type="radio" name="costCheckFlag" value="2"
+                              onchange="changeCostPriceShow()" ${product.costCheckFlag == "1" ? "" : "checked"} />比例成本</label>
+            </td>
+        </tr>
+        <tr id="costPriceShow">
+            <th><span class="red">*</span><b class="costFlagText">成本价</b>:</th>
+            <td colspan="3"><form:input path="costPrice" id="costPrice" type="number" maxlength="11" class="short"/> 元
+            </td>
+        </tr>
+        <tr id="costPropShow">
+            <th><span class="red">*</span>比例成本百分比:</th>
+            <td colspan="3"><form:input path="costProportional" id="costProportional" type="number" maxlength="11"
+                                        class="short"/> %
+            </td>
+        </tr>
+        <tr>
+            <th>库存:</th>
+            <td colspan="3"><form:input path="stock" type="number" maxlength="11" class="short"/></td>
+        </tr>
+        <tr>
+            <th><span class="red">*</span>购买数量:</th>
+            <td colspan="3">
+                <label><input type="radio" name="step" value="1"  ${product.step == "1" ? "checked" : ""}>逐步增长<b
+                        class="line">|</b></label>
+                <label><input type="radio" name="step" value="2"  ${product.step == "2" ? "checked" : ""}>以起订量增长</label>
+            </td>
+        </tr>
+        <tr>
+            <th><span class="red">*</span>运费:</th>
+                <%--<td colspan="3">
+                    <label><input type="radio" name="byFlag" value="0"  ${product.byFlag == "0" ? "checked" : ""}>买家承担<b class="line">|</b></label>
+                    <label><input type="radio" name="byFlag" value="1"  ${product.byFlag == "1" ? "checked" : ""}>卖家承担</label>
+                </td>--%>
+            <td colspan="3">
+                <label><input type="radio" name="freePostFlag"
+                              value="2"  ${(empty product.freePostFlag || product.freePostFlag eq "2") ? "checked" : ""}>默认(遵循运费规则)<b
+                        class="line">|</b></label>
+                <label><input type="radio" name="freePostFlag"
+                              value="0"  ${product.freePostFlag == "0" ? "checked" : ""}>包邮<b class="line">|</b></label>
+                <label><input type="radio" name="freePostFlag"
+                              value="1"  ${product.freePostFlag == "1" ? "checked" : ""}>到付</label>
+            </td>
+        </tr>
+        <tr>
+            <th><span class="red">*</span>包装规格:</th>
+            <td><form:input path="unit" maxlength="20" class="short required"/></td>
+        </tr>
+        <tr>
+            <th><span class="red">*</span>销售区域:</th>
+            <td colspan="3">
+                <label><input type="radio" name="allAreaFlag" value="1"
+                              onchange="changeAreaFlag()" ${product.allAreaFlag == "1" ? "checked" : ""}>全部区域<b
+                        class="line">|</b></label>
+                <label><input type="radio" name="allAreaFlag" value="0"
+                              onchange="changeAreaFlag()" ${product.allAreaFlag == "1" ? "" : "checked"}>指定区域</label>
+            </td>
+        </tr>
+        <tr>
+            <th>商品说明:</th>
+            <td colspan="3">
+                <form:textarea path="productDescribe" id="wipeRemarks" maxlength="200" placeholder="请输入备注文字,不能超过200字" class="input-xlarge"  rows="4"></form:textarea>
+                <p style="width:500px;text-align:left;"><span id="remarkLen" style="color:red;">0</span>/200</p>
+            </td>
+        </tr>
+        <tr id="allAreaInput">
+            <th></th>
+            <td>
+                <span>
+                    <form:checkboxes path="provinceIDs" items="${provinceList}" itemLabel="name" itemValue="id"/>
+                </span>
+            </td>
+        </tr>
+        <tr>
+            <th>订购方案:</th>
+            <td colspan="3">
+                <div class="detailInfoEditor" style="width: 620px;">
+                    <form:textarea path="orderInfo" class="input-xlarge  hide"/>
+                    <!-- 富文本编辑器 -->
+                    <div id="orderInfoEditor">${product.orderInfo}</div>
+                </div>
+            </td>
+        </tr>
+        <tr>
+            <th>服务详情:</th>
+            <td colspan="3">
+                <div class="detailInfoEditor" style="width: 620px;">
+                    <form:textarea path="serviceInfo" class="input-xlarge  hide"/>
+                    <!-- 富文本编辑器 -->
+                    <div id="serviceInfoEditor">${product.serviceInfo}</div>
+                </div>
+            </td>
+        </tr>
+        <tr>
+            <th><span class="red">*</span>资质机构商品详情:</th>
+            <td><span style="color: red">(适用于资质机构)</span></td>
+            <th><span class="red">*</span>普通机构商品详情:</th>
+            <td><span style="color: red">(适用于游客和个人机构,可选择是否和资质机构商品详情相同,不相同的话需要编辑内容)</span>
+                <label>
+                    <input type="radio"
+                           name="productDetail"
+                           value="1" ${product.productDetail == "1" ? "checked" : ""} />同资质机构商品详情<b
+                        class="line">|</b>
+                </label>
+                <label>
+                    <input type="radio"
+                           name="productDetail"
+                           value="2" ${product.productDetail == "2" || product.productDetail == null ? "checked" : ""} />不同于资质机构商品详情(即使用以下编辑内容)
+                </label>
+            </td>
+        </tr>
+        <tr>
+            <td colspan="2" style="vertical-align: top;">
+                <div class="detailInfoEditor" style="width: 620px;">
+                    <form:textarea path="detailInfo" htmlEscape="false" class="input-xlarge required hide"/>
+                    <!-- 富文本编辑器 -->
+                    <div id="detailInfoEditor">${product.detailInfo}</div>
+                </div>
+            </td>
+            <td colspan="3" style="vertical-align: top;">
+                <div class="detailInfoEditor" style="width: 620px;">
+                    <form:textarea path="commonDetailInfo" htmlEscape="false" class="input-xlarge required hide"/>
+                    <!-- 富文本编辑器 -->
+                    <div id="detailInfoEditor2">${product.commonDetailInfo==""||product.commonDetailInfo==null?"若要查看更多产品信息,请注册机构会员,如有疑问请联系客服。":product.commonDetailInfo}</div>
+                </div>
+            </td>
+        </tr>
+
+
         <div class="form-actions">
             <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>
             <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>

+ 210 - 4
src/main/webapp/WEB-INF/views/modules/product-new/productEdit.jsp

@@ -152,7 +152,7 @@
     <li class="active"><a href="${ctx}/product/new/productEdit?id=${product.id}">商品信息编辑</a></li>
 </ul>
 <form:form id="inputForm" modelAttribute="product"
-           action="${ctx}/product/new/productSave?searchShopID=${product.searchShopID}&searchShopName=${product.searchShopName}&searchBigTypeID=${product.searchBigTypeID}&searchSmallTypeID=${product.searchSmallTypeID}&searchTinyTypeID=${product.searchTinyTypeID}&searchValidFlag=${product.searchValidFlag}&searchActStatus=${product.searchActStatus}&searchProductType=${product.searchProductType}&searchBrandID=${product.searchBrandID}&searchPreferredFlag=${product.searchPreferredFlag}&searchProductCategory=${product.searchProductCategory}&editFlag=${product.editFlag}"
+           action="${ctx}/product/new/productSave?searchShopID=${product.searchShopID}&searchShopName=${product.searchShopName}&searchBigTypeID=${product.searchBigTypeID}&searchSmallTypeID=${product.searchSmallTypeID}&searchTinyTypeID=${product.searchTinyTypeID}&searchValidFlag=${product.searchValidFlag}&searchActStatus=${product.searchActStatus}&searchProductType=${product.searchProductType}&searchBrandID=${product.searchBrandID}&searchPreferredFlag=${product.searchPreferredFlag}&searchProductCategory=${product.searchProductCategory}&editFlag=${product.editFlag}&shopType=${product.shopType}"
            method="post" class="form-horizontal">
     <form:hidden path="id"/>
     <form:hidden path="searchName"/>
@@ -232,6 +232,60 @@
                 </form:select>
             </td>
         </tr>
+        <c:if test="${product.shopType == 2}">
+        <tr>
+                <th><span style="color: red">*</span>供应商:</th>
+            <td colspan="3">
+                <form:select path="shopID" class="input-small required">
+                    <form:option value="" label="请选择"/>
+                    <form:options items="${shopList}" itemLabel="name" itemValue="shopID" htmlEscape="false"/>
+                </form:select>
+            </td>
+        </tr>
+        <tr>
+            <th>商品图片:</th>
+            <td class="controls upload-content" id="secondHandImage">
+                <div class="conList">
+                    <form:hidden value="${product.image1}" id="image1" path="image1" htmlEscape="false"
+                                 maxlength="255" class="input-xlarge required"/>
+                    <sys:ckfinder input="image1" type="images" uploadPath="/photo" selectMultiple="false"
+                                  maxWidth="100"
+                                  maxHeight="100"/>
+                </div>
+                <div class="conList hide-pic">
+                    <form:hidden value="${product.image2}" id="image2" path="image2" htmlEscape="false"
+                                 maxlength="255" class="input-xlarge"/>
+                    <sys:ckfinder input="image2" type="images" uploadPath="/photo" selectMultiple="false"
+                                  maxWidth="100"
+                                  maxHeight="100"/>
+                </div>
+                <div class="conList hide-pic">
+                    <form:hidden value="${product.image3}" id="image3" path="image3" htmlEscape="false"
+                                 maxlength="255" class="input-xlarge"/>
+                    <sys:ckfinder input="image3" type="images" uploadPath="/photo" selectMultiple="false"
+                                  maxWidth="100"
+                                  maxHeight="100"/>
+                </div>
+                <div class="conList hide-pic">
+                    <form:hidden value="${product.image4}" id="image4" path="image4" htmlEscape="false"
+                                 maxlength="255" class="input-xlarge"/>
+                    <sys:ckfinder input="image4" type="images" uploadPath="/photo" selectMultiple="false"
+                                  maxWidth="100"
+                                  maxHeight="100"/>
+                </div>
+                <div class="conList hide-pic">
+                    <form:hidden value="${product.image5}" id="image5" path="image5" htmlEscape="false"
+                                 maxlength="255" class="input-xlarge"/>
+                    <sys:ckfinder input="image5" type="images" uploadPath="/photo" selectMultiple="false"
+                                  maxWidth="100"
+                                  maxHeight="100"/>
+                </div>
+                <div class="conList upload-tips" style="margin-left: 205px">
+                    <font color="red">第一张图作为商品主图必传;最多上传5张商品图片,请尽量全部上传,单张图片不能超过5M</font>
+                </div>
+            </td>
+        </tr>
+        </c:if>
         <tr>
             <th>组合名称:</th>
             <td colspan="3">
@@ -415,7 +469,6 @@
         <tr>
             <th><span class="red">*</span>是否含税:</th>
             <td>
-
                 <label><input type="radio" name="includedTax" value="1"
                               onclick="chageIncludedTax(${product.taxPoint})"  ${product.includedTax == "1" ? "checked" : ""}>含税<b
                         class="line">|</b></label>
@@ -423,7 +476,7 @@
                               onclick="chageIncludedTax(${product.taxPoint})"   ${product.includedTax == "0" ? "checked" : ""}>不含税<b
                         class="line">|</b></label>
                 <label><input type="radio" name="includedTax" value="2"
-                              onclick="chageIncludedTax(${product.taxPoint})"   ${product.includedTax == "2" ? "checked" : ""}>未知</label>
+                              onclick="chageIncludedTax(${product.taxPoint})"   ${product.includedTax == "2"||product.includedTax==null ? "checked" : ""}>未知</label>
             </td>
         </tr>
         <tr id="invoiceItem">
@@ -439,7 +492,7 @@
                 <span class="notInvoice">
                     <b class="line">|</b>
                     <label><input type="radio" name="invoiceType" value="3"
-                                  onclick="changeInvoiceType(${product.taxPoint})" ${product.invoiceType == "3" ? "checked" : ""}>不能开票</label>
+                                  onclick="changeInvoiceType(${product.taxPoint})" ${product.invoiceType == "3"||product.invoiceType ==null ? "checked" : ""}>不能开票</label>
                 </span>
             </td>
         </tr>
@@ -804,6 +857,159 @@
     <%--    });--%>
     <%--});--%>
 
+    //图片初始化
+    if(${product.shopType == 2}){
+    $(function () {
+
+        function checkmaxlengthsBySearch(searckThis, str, maxlength) {
+            var realLength = 0;
+            var maxChange = "1";
+            for (var i = 0; i < str.length; i++) {
+                charCode = str.charCodeAt(i);
+                if (charCode >= 0 && charCode <= 128)
+                    realLength += 1;
+                else {
+                    realLength += 2;
+                    maxChange = "2";
+                }
+            }
+            if (maxChange == "2") {
+                var s = str.substr(0, 16);
+                $(searckThis).val(s);
+            }
+            if (realLength > maxlength) {
+                alertx("关键字最多16个汉字,即32个字符!");
+            }
+        }
+
+        $('.upload-content .conList .btn:nth-of-type(1)').html('<div><span>+</span><h5>选择图片</h5></div>');
+        $('.upload-content .conList .btn:nth-of-type(2)').after('<img class="cancel-upload" src="/static/images/close-btn1.png">').remove();
+        $('.upload-content .conList').find('.cancel-upload').hide();
+        var observeEle = document.getElementsByClassName('upload-content')[0];
+
+        var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
+        var MutationObserverConfig = {
+            childList: true,
+            subtree: true,
+            characterData: true
+        };
+        var observer = new MutationObserver(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').show();
+                    if (nextEle.hasClass('hide-pic')) {
+                        nextEle.removeClass('hide-pic');
+                    }
+                }
+            })
+        });
+        observer.observe(observeEle, MutationObserverConfig);
+
+
+        $('body').on('click', '.upload-content li', function () {
+            var index = $(this).closest('.conList').index() + 1,
+                str = 'image' + index + 'FinderOpen';
+            eval(str + '()');
+        });
+        $('body').on('click', '.cancel-upload', function () {
+            var wrapper = $(this).closest('.conList');
+            wrapper.find('li').css('z-index', '-1');
+            wrapper.find('input').val('');
+            $(this).hide();
+            if ($('.cancel-upload:visible').length < 9) {
+                wrapper.addClass("hide-pic");
+            } else {
+                wrapper.removeClass("hide-pic");
+            }
+            wrapper.parent().append(wrapper.clone());
+            wrapper.remove();
+            $(".conList").each(function (i, ele) {
+                if ($(ele).find("input.input-xlarge").val()) {
+                    $(ele).next().removeClass("hide-pic")
+                }
+            })
+        });
+        $(window).on("load", function () {
+            setTimeout(function () {
+                $("#secondHandImage").find("input.input-xlarge").each(function (i, ele) {
+                    if ($(ele).val()) {
+                        $(ele).next().find("li").css("z-index", "99");
+                        $(ele).parents(".conList").find(".cancel-upload").show();
+                        $(ele).parents(".conList").next().removeClass("hide-pic")
+                    }
+                })
+            }, 500);
+        });
+
+
+        $('.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")
+                }
+            })
+        });
+    });
+    }
+    /**
+     * @param obj
+     * jquery控制input只能输入数字和两位小数
+     */
+    function num(obj) {
+        obj.value = obj.value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符
+        obj.value = obj.value.replace(/^\./g, ""); //验证第一个字符是数字
+        obj.value = obj.value.replace(/\.{2,}/g, "."); //只保留第一个, 清除多余的
+        obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
+        obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); //只能输入两个小数
+    }
+
+
     //初始化标签
     $(function () {
         var html = '';

+ 2 - 2
src/main/webapp/WEB-INF/views/modules/product-new/productList.jsp

@@ -126,7 +126,7 @@
 				</div>
 				<div class="item">
 					<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" style="margin-left:20px;"/>
-					&nbsp;&nbsp;&nbsp;&nbsp;<input class="btn btn-primary" onclick="window.location='${ctx}/product/new/productAdd'" value="发布特殊供应商新品"/>
+					&nbsp;&nbsp;&nbsp;&nbsp;<input class="btn btn-primary" onclick="window.location='${ctx}/product/new/productEdit?shopType=2'" value="发布特殊供应商新品"/>
 				</div>
 				<%--<div class="item">
 					<input type="button" class="btn btn-primary" value="更新所有商品索引" onclick="updateAllIndex()"  style="margin-left:20px;"/>
@@ -270,7 +270,7 @@
 					<c:if test="${product.productCategory eq 2}">
 						<c:if test="${product.validFlag ne 0}">
                             <td class="todo">
-                                   <a href="${ctx}/product/cmSecondHandDetail/form?id=${product.id}&searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&searchProductCategory=${searchProductCategory}&editFlag=${editFlag}">商品编辑</a>
+                                   <a href="${ctx}/product/cmSecondHandDetail/form?id=${product.id}&searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&searchProductCategory=${searchProductCategory}&editFlag=${editFlag}&shopType=${product.shopType}">商品编辑</a>
                                    <a href="${ctx}/product/cmSecondHandTransaction/toRecommend?id=${product.id}&searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&searchProductCategory=${searchProductCategory}">相关推荐</a><br>
 <%--                                   <a href="${ctx}/product/new/imageList?id=${product.id}&searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&searchProductCategory=${searchProductCategory}">图片管理</a>--%>
                                    <%--待审核或审核未通过才需要审核( 1待审核 2已上架 3已下架 8审核未通过 9已冻结)--%>