zhijiezhao 7 months ago
parent
commit
84caedbdd8

+ 51 - 49
src/main/java/com/caimei/modules/product/web/CmSecondHandDetailController.java

@@ -285,41 +285,42 @@ public class CmSecondHandDetailController extends BaseController {
         if (!beanValidator(model, cmSecondHandDetail)) {
             return form(cmSecondHandDetail, model);
         }
-        String cardNumber = cmSecondHandDetail.getCardNumber();
-        if (StringUtils.isBlank(cardNumber) && cmSecondHandDetail.getAnnounType() != null && cmSecondHandDetail.getAnnounType() != 2) {
-            addMessage(redirectAttributes, "请填写收款卡号");
-            model.addAttribute("cmSecondHandDetail", cmSecondHandDetail);
-            return "redirect:" + Global.getAdminPath() + "/product/new/list?searchProductCategory=2";
-        }
-        Integer shopId = cmSecondHandDetailService.findSecondShop(cmSecondHandDetail.getProductID());
+//        String cardNumber = cmSecondHandDetail.getCardNumber();
+//        if (StringUtils.isBlank(cardNumber) && cmSecondHandDetail.getAnnounType() != null && cmSecondHandDetail.getAnnounType() != 2) {
+//            addMessage(redirectAttributes, "请填写收款卡号");
+//            model.addAttribute("cmSecondHandDetail", cmSecondHandDetail);
+//            return "redirect:" + Global.getAdminPath() + "/product/new/list?searchProductCategory=2";
+//        }
+//        Integer shopId = cmSecondHandDetailService.findSecondShop(cmSecondHandDetail.getProductID());
         //保存为特殊二手供应商
-        Shop shopVo = new Shop();
-        shopVo.setShopID(shopId);
-        //1个人,2公司
-        String name = "1".equals(cmSecondHandDetail.getPublishIdentity()) ? cmSecondHandDetail.getContactName() : cmSecondHandDetail.getCompanyName();
-        shopVo.setName(name);
-        shopVo.setLinkMan(cmSecondHandDetail.getContactName());
-        shopVo.setContractMobile(cmSecondHandDetail.getContactMobile());
-        shopVo.setCardNumber(cmSecondHandDetail.getCardNumber());
-        if (cmSecondHandDetail.getBanOfDeposit() != null) {
-            shopVo.setBanOfDeposit(cmSecondHandDetail.getBanOfDeposit());
-        }
-        if (cmSecondHandDetail.getAccountName() != null) {
-            shopVo.setAccountName(cmSecondHandDetail.getAccountName());
-        }
-        if (cmSecondHandDetail.getAccountType() != null) {
-            shopVo.setAccountType(cmSecondHandDetail.getAccountType());
-        }
+//        Shop shopVo = new Shop();
+//        shopVo.setShopID(shopId);
+//        //1个人,2公司
+//        String name = "1".equals(cmSecondHandDetail.getPublishIdentity()) ? cmSecondHandDetail.getContactName() : cmSecondHandDetail.getCompanyName();
+//        shopVo.setName(name);
+//        shopVo.setLinkMan(cmSecondHandDetail.getContactName());
+//        shopVo.setContractMobile(cmSecondHandDetail.getContactMobile());
+//        shopVo.setCardNumber(cmSecondHandDetail.getCardNumber());
+//        if (cmSecondHandDetail.getBanOfDeposit() != null) {
+//            shopVo.setBanOfDeposit(cmSecondHandDetail.getBanOfDeposit());
+//        }
+//        if (cmSecondHandDetail.getAccountName() != null) {
+//            shopVo.setAccountName(cmSecondHandDetail.getAccountName());
+//        }
+//        if (cmSecondHandDetail.getAccountType() != null) {
+//            shopVo.setAccountType(cmSecondHandDetail.getAccountType());
+//        }
         String validFlag = cmSecondHandDetail.getValidFlag();
-        if (StringUtils.isNotBlank(validFlag) && "2".equals(validFlag)) {
-            shopVo.setShopType(3);
-        } else {
-            shopVo.setShopType(0);
-        }
-        cmSecondHandDetailService.insertShop(shopVo);
-        if (null == shopId) {
-            shopId = shopVo.getShopID();
-        }
+//        if (StringUtils.isNotBlank(validFlag) && "2".equals(validFlag)) {
+//            shopVo.setShopType(3);
+//        } else {
+//            shopVo.setShopType(0);
+//        }
+//        cmSecondHandDetailService.insertShop(shopVo);
+//        if (null == shopId) {
+//            shopId = shopVo.getShopID();
+//        }
+        Integer shopId = 0;
         String[] ids = null;
         List<String> fileTypes = null;
         if (cmSecondHandDetail.getAnnounType() != null && cmSecondHandDetail.getAnnounType() != 2) {
@@ -396,17 +397,18 @@ public class CmSecondHandDetailController extends BaseController {
         if (null != stock && stock > 0) {
             cmSku.setStock(String.valueOf(stock));
         }
-        String normalPrice = cmSecondHandDetail.getNormalPrice();
+        String normalPrice = "0";
         if (StringUtils.isNotEmpty(normalPrice)) {
             cmSku.setNormalPrice(Double.parseDouble(normalPrice));
         }
-        cmSku.setPrice(cmSecondHandDetail.getPrice());
-        cmSku.setCostCheckFlag(Integer.valueOf(cmSecondHandDetail.getCostCheckFlag()));
-        if ("1".equals(cmSecondHandDetail.getCostCheckFlag())) {
-            cmSku.setCostPrice(cmSecondHandDetail.getCostPrice());
-        } else {
-            cmSku.setShopPercent(cmSecondHandDetail.getShopPercent());
-        }
+        cmSku.setPrice(0d);
+        cmSku.setCostCheckFlag(1);
+        cmSku.setCostPrice(0d);
+//        if ("1".equals(cmSecondHandDetail.getCostCheckFlag())) {
+//            cmSku.setCostPrice(cmSecondHandDetail.getCostPrice());
+//        } else {
+//            cmSku.setShopPercent(cmSecondHandDetail.getShopPercent());
+//        }
         Integer skuId = productDao.findSkuId(product.getProductID());
         if (null != skuId) {
             cmSku.setSkuId(skuId);
@@ -469,14 +471,14 @@ public class CmSecondHandDetailController extends BaseController {
             String imageUrl = getImageUrl(licenseImage);
             cmSecondHandDetail.setLicenseImage(imageUrl);
         }
-        // 去除联系方式的空格
-        if (StringUtils.isNotEmpty(cmSecondHandDetail.getContactMobile())) {
-            cmSecondHandDetail.setContactMobile(cmSecondHandDetail.getContactMobile().replaceAll(" ", ""));
-        }
-        // 去除采美对接人联系方式所有空格
-        if (StringUtils.isNotEmpty(cmSecondHandDetail.getDockingPeopleMobile())) {
-            cmSecondHandDetail.setDockingPeopleMobile(cmSecondHandDetail.getDockingPeopleMobile().replaceAll(" ", ""));
-        }
+//        // 去除联系方式的空格
+//        if (StringUtils.isNotEmpty(cmSecondHandDetail.getContactMobile())) {
+//            cmSecondHandDetail.setContactMobile(cmSecondHandDetail.getContactMobile().replaceAll(" ", ""));
+//        }
+//        // 去除采美对接人联系方式所有空格
+//        if (StringUtils.isNotEmpty(cmSecondHandDetail.getDockingPeopleMobile())) {
+//            cmSecondHandDetail.setDockingPeopleMobile(cmSecondHandDetail.getDockingPeopleMobile().replaceAll(" ", ""));
+//        }
         // 保存二手详细信息
         cmSecondHandDetailService.save(cmSecondHandDetail);
         if (cmSecondHandDetail.getAnnounType() != null && cmSecondHandDetail.getAnnounType() != 2) {

+ 4 - 2
src/main/java/com/caimei/modules/product/web/ProductNewController.java

@@ -970,8 +970,10 @@ public class ProductNewController extends BaseController {
                 //审核未通过
                 cmSecondHandDetailService.updateRevieweInfo(date, null, productID);
             } else {
-                //把shoptype置为3
-                cmSecondHandDetailService.updateShopType(productID);
+                /** 当前版本二手变更为非交易模式,供应商id在发布时统一设置为0,无临时供应商
+                 * //把shoptype置为3
+                 * cmSecondHandDetailService.updateShopType(productID);
+                 */
                 cmSecondHandDetailService.updateRevieweInfo(date, date, productID);
             }
             cleanRedisCache();

+ 2 - 22
src/main/resources/mappings/modules/product/ProductMapper.xml

@@ -885,7 +885,6 @@
             `productCategory`,
         </if>
         `preferredFlag`,
-        -- `selfTypeID`,
         `shopID`,
         `name`,
         `aliasName`,
@@ -898,28 +897,20 @@
         `propertiesInfo`,
         `addTime`,
         `updateTime`,
-        -- `weekSellNumber`,
         `beforeValidFlag`,
-        `validFlag`,
         `favoriteTimes`,
         `commentScore`,
         `commentTimes`,
-        -- `selfRecommendFlag`,
-        -- `sysRecommendFlag`,
         `sortIndex`,
         `featuredFlag`,
         `featuredSortIndex`,
         `productCode`,
-        -- `synToERPFlag`,
         `allAreaFlag`,
         `provinceIDs`,
         `serviceNumber`,
         `packageCount`,
         `byFlag`,
         `normalProductFlag`,
-        -- `wholeSaleProductFlag`,
-        -- `promotionProductFlag`,
-        -- `groupBuyProductFlag`,
         `step`,
         `actFlag`,
         `actStatus`,
@@ -929,7 +920,6 @@
         `onlineTime`,
         `downlineTime`,
         `freePostFlag`,
-        -- `precisehKey`,
         `tags`,
         `productType`,
         `machineType`,
@@ -950,7 +940,6 @@
             #{productCategory},
         </if>
         #{preferredFlag},
-        -- #{selfTypeID},
         #{shopID},
         #{name},
         #{aliasName},
@@ -963,28 +952,20 @@
         #{propertiesInfo},
         #{addTime},
         #{updateTime},
-        -- #{weekSellNumber},
         #{beforeValidFlag},
-        #{validFlag},
         #{favoriteTimes},
         #{commentScore},
         #{commentTimes},
-        -- #{selfRecommendFlag},
-        -- #{sysRecommendFlag},
         #{sortIndex},
         #{featuredFlag},
         #{featuredSortIndex},
         #{productCode},
-        -- #{synToERPFlag},
         #{allAreaFlag},
         #{provinceIDs},
         #{serviceNumber},
         #{packageCount},
         #{byFlag},
         #{normalProductFlag},
-        -- #{wholeSaleProductFlag},
-        -- #{promotionProductFlag},
-        -- #{groupBuyProductFlag},
         #{step},
         #{actFlag},
         #{actStatus},
@@ -994,7 +975,6 @@
         #{onlineTime},
         #{downlineTime},
         #{freePostFlag},
-        -- #{precisehKey},
         #{tags},
         #{productType},
         #{machineType},
@@ -1092,7 +1072,7 @@
         <if test="cmPercent != null">
             #{cmPercent},
         </if>
-        #{organizeId},
+        ifnull(0,#{organizeId}),
         #{minBuyNumber},
         #{unit})
     </insert>
@@ -1736,7 +1716,7 @@
         ladderPriceFlag=#{ladderPriceFlag},
         normalPrice=#{normalPrice},
         price=#{price},
-        organizeId=#{organizeId},
+        organizeId=ifnull(0,#{organizeId}),
         <if test="shopPercent != null">
             shopPercent=#{shopPercent},
         </if>

+ 35 - 32
src/main/webapp/WEB-INF/views/modules/product-new/secondHand.jsp

@@ -19,8 +19,8 @@
 <body>
 <ul class="nav nav-tabs">
     <li class="active"><a href="${ctx}/product/new/list?searchProductCategory=2">二手商品列表</a></li>
-    <li><a href="${ctx}/product/cmSecondHandDetail/form?searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&fileTypes=999">添加二手预成交商品</a></li>
-    <li><a href="${ctx}/product/cmSecondHandDetail/cmSecondDetailForm?searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&fileTypes=999">二手估价商品添加</a></li>
+<%--    <li><a href="${ctx}/product/cmSecondHandDetail/form?searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&fileTypes=999">添加二手预成交商品</a></li>--%>
+<%--    <li><a href="${ctx}/product/cmSecondHandDetail/cmSecondDetailForm?searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&fileTypes=999">二手估价商品添加</a></li>--%>
 </ul>
 <form:form id="searchForm" modelAttribute="product" action="${ctx}/product/new/list" method="post" class="breadcrumb form-search">
     <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
@@ -128,14 +128,14 @@
         <th>商品名称</th>
         <th>发布者身份</th>
         <th>卖家</th>
-        <th>采美对接人</th>
+<%--        <th>采美对接人</th>--%>
         <th>来源</th>
-        <th>交易价</th>
-        <th>线上分帐号</th>
-        <th>发布类型</th>
+<%--        <th>交易价</th>--%>
+<%--        <th>线上分帐号</th>--%>
+<%--        <th>发布类型</th>--%>
         <th>分类</th>
         <th>商品状态</th>
-        <th>交易状态</th>
+<%--        <th>交易状态</th>--%>
         <th>提交时间</th>
         <th>审核时间</th>
         <th>到期时间</th>
@@ -190,7 +190,7 @@
                     ${product.companyName}
                 </c:if>
             </td>
-            <td>${product.dockingPeopleName}</td>
+<%--            <td>${product.dockingPeopleName}</td>--%>
             <td>
                 <c:if test="${product.source eq 1}">
                     网站
@@ -205,19 +205,19 @@
                     小程序-协销
                 </c:if>
             </td>
-            <td>${product.price}</td>
-            <td>
-                    ${product.splitCode}
-            </td>
+<%--            <td>${product.price}</td>--%>
+<%--            <td>--%>
+<%--                    ${product.splitCode}--%>
+<%--            </td>--%>
 
-            <td>
-                <c:if test="${product.announType eq 1}">
-                    二手预成交商品
-                </c:if>
-                <c:if test="${product.announType eq 2}">
-                    二手估价商品
-                </c:if>
-            </td>
+<%--            <td>--%>
+<%--                <c:if test="${product.announType eq 1}">--%>
+<%--                    二手预成交商品--%>
+<%--                </c:if>--%>
+<%--                <c:if test="${product.announType eq 2}">--%>
+<%--                    二手估价商品--%>
+<%--                </c:if>--%>
+<%--            </td>--%>
 
             <td>
                 ${product.secondHandType eq 1?'二手仪器':product.secondHandType eq 2?'临期产品':'其他'}
@@ -228,9 +228,9 @@
             <td>
                 <font color=${product.validFlag eq '1'?'blue':product.validFlag eq '2'?'green':product.validFlag eq '3'?'orange':'red'}>${product.validFlag eq '1'?'待审核':product.validFlag eq '2'?'已上架':product.validFlag eq '3'?'已下架':product.validFlag eq '8'?'审核未通过':'其他'}</font>
             </td>
-            <td>
-                ${product.sold eq '1'?'已售':'未售'}
-            </td>
+<%--            <td>--%>
+<%--                ${product.sold eq '1'?'已售':'未售'}--%>
+<%--            </td>--%>
             <td>
                 <c:if test="${empty product.submitDate}">
                     ---
@@ -267,10 +267,10 @@
                         </c:if>
                             <c:if test="${product.announType eq 2}">
                                 <a href="${ctx}/product/cmSecondHandDetail/cmSecondDetailForm?id=${product.id}&searchProductCategory=2&searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&fileTypes=999&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}&fileTypes=999">转为预成交商品</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}&fileTypes=999">转为预成交商品</a>--%>
 <%--                                <a href="${ctx}/product/cmSecondHandDetail/form?searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&fileTypes=999">转为预成交商品</a>--%>
                             </c:if>
-                            <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/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已冻结)--%>
                             <c:if test="${product.validFlag eq 1 or product.validFlag eq 8}">
@@ -438,13 +438,16 @@
             + "</div>";
         var submit = function (v, h, f) {
             console.log(f.validFlag)
-            if(f.validFlag ==2) {
-                if (((costPrice == 0.00 || costPrice == undefined) && (price == undefined || price == '')) || ((shopPercent == '' || shopPercent == undefined) && (price == undefined || price == ''))) {
-                    $.jBox(htmls, {title: "提示"});
-                    // $.jBox.tip("审核通过前请先填写交易价和成本", 'error', {focusId: "validFlag"});
-                    return false;
-                }
-            }
+            /**
+             *  当前版本不产生交易,不判断价格
+             */
+            // if(f.validFlag ==2) {
+            //     if (((costPrice == 0.00 || costPrice == undefined) && (price == undefined || price == '')) || ((shopPercent == '' || shopPercent == undefined) && (price == undefined || price == ''))) {
+            //         $.jBox(htmls, {title: "提示"});
+            //         // $.jBox.tip("审核通过前请先填写交易价和成本", 'error', {focusId: "validFlag"});
+            //         return false;
+            //     }
+            // }
 
             if (f.auditStatus == '') {
                 $.jBox.tip("请选择状态", 'error', {focusId: "validFlag"});

+ 176 - 176
src/main/webapp/WEB-INF/views/modules/product/cmSecondDetailForm.jsp

@@ -26,43 +26,43 @@
                             return false;
                         }
                     }
-                    if (costCheckFlag * 1 === 1) {
-                        if ($("#costPrice").val() == '') {
-                            alertx("请输入成本价");
-                            return false;
-                        }
-                        var costPrice = $("#costPrice").val();
-                        if (0 == costPrice) {
-                            alertx('成本价不能为0');
-                            return false;
-                        }
-                    } else {
-                        if ($("#shopPercent").val() == '') {
-                            alertx("请输入成本比例");
-                            return false;
-                        }
-                    }
+                    // if (costCheckFlag * 1 === 1) {
+                    //     if ($("#costPrice").val() == '') {
+                    //         alertx("请输入成本价");
+                    //         return false;
+                    //     }
+                    //     var costPrice = $("#costPrice").val();
+                    //     if (0 == costPrice) {
+                    //         alertx('成本价不能为0');
+                    //         return false;
+                    //     }
+                    // } else {
+                    //     if ($("#shopPercent").val() == '') {
+                    //         alertx("请输入成本比例");
+                    //         return false;
+                    //     }
+                    // }
 
                     // 验证填写参数
-                    var payStatus = $('#payStatus').val();
-                    if (payStatus == 2) {
-                        var payAmount = $("#payAmount").val();
-                        // (验证付款金额)
-                        if (payAmount == "" || payAmount == null) {
-                            alertx('请填写付款金额');
-                            return false;
-                        }
-                        if (0 == payAmount) {
-                            alertx('付款金额不能为0');
-                            return false;
-                        }
-                    }
-
-                    var price = $("#price").val();
-                    if (0 == price) {
-                        alertx('交易价不能为0');
-                        return false;
-                    }
+                    // var payStatus = $('#payStatus').val();
+                    // if (payStatus == 2) {
+                    //     var payAmount = $("#payAmount").val();
+                    //     // (验证付款金额)
+                    //     if (payAmount == "" || payAmount == null) {
+                    //         alertx('请填写付款金额');
+                    //         return false;
+                    //     }
+                    //     if (0 == payAmount) {
+                    //         alertx('付款金额不能为0');
+                    //         return false;
+                    //     }
+                    // }
+
+                    // var price = $("#price").val();
+                    // if (0 == price) {
+                    //     alertx('交易价不能为0');
+                    //     return false;
+                    // }
 
                     var secondHandType = $("input[name ='secondHandType']:checked").val();
                     if (secondHandType == 2) {
@@ -73,25 +73,25 @@
                             return false;
                         }
                         //(验证临期价格信息)
-                        var normalPrice = $("#normalPrice").val();
-                        if (null == normalPrice || normalPrice == "") {
-                            alertx('请输入市场价');
-                            return false;
-                        }
-                        if (0 == normalPrice) {
-                            alertx('市场价不能为0');
-                            return false;
-                        }
-                        //
-                        var originalPrice = $("#originalPrice").val();
-                        if (null == originalPrice || originalPrice == "") {
-                            alertx('请输入采购价/原价');
-                            return false;
-                        }
-                        if (0 == originalPrice) {
-                            alertx('采购价/原价不能为0');
-                            return false;
-                        }
+                        // var normalPrice = $("#normalPrice").val();
+                        // if (null == normalPrice || normalPrice == "") {
+                        //     alertx('请输入市场价');
+                        //     return false;
+                        // }
+                        // if (0 == normalPrice) {
+                        //     alertx('市场价不能为0');
+                        //     return false;
+                        // }
+                        // //
+                        // var originalPrice = $("#originalPrice").val();
+                        // if (null == originalPrice || originalPrice == "") {
+                        //     alertx('请输入采购价/原价');
+                        //     return false;
+                        // }
+                        // if (0 == originalPrice) {
+                        //     alertx('采购价/原价不能为0');
+                        //     return false;
+                        // }
 
                         var stock = $("#stock").val();
                         if (null == stock || stock == "") {
@@ -103,14 +103,14 @@
                     var townId = $("#town option:selected").attr("townId");
                     $("#townId").val(townId);
 
-                    var peopleMobile = $("#dockingPeopleMobile").val();
-                    if (peopleMobile != '' && peopleMobile != undefined) {
-                        var reg = new RegExp('^1[0-9]{10}$');
-                        if (!reg.test(peopleMobile)) {
-                            alertx('请填写正确的采美对接人联系方式');
-                            return false;
-                        }
-                    }
+                    // var peopleMobile = $("#dockingPeopleMobile").val();
+                    // if (peopleMobile != '' && peopleMobile != undefined) {
+                    //     var reg = new RegExp('^1[0-9]{10}$');
+                    //     if (!reg.test(peopleMobile)) {
+                    //         alertx('请填写正确的采美对接人联系方式');
+                    //         return false;
+                    //     }
+                    // }
                     loading('正在提交,请稍等...');
                     form.submit();
                 },
@@ -386,19 +386,19 @@
             </form:select>
         </div>
     </div>
-    <c:if test="${not empty cmSecondHandDetail.id}">
-        <div class="control-group">
-            <label class="control-label">线上分账账号:</label>
-            <div class="controls">
-                <form:select path="splitCode" class="select-ele input-medium">
-                    <form:option value="" label="请选择"/>
-                    <c:forEach items="${splitCodeList}" var="splitCodeList" varStatus="index">
-                        <form:option value="${splitCodeList.splitCode}" label="${splitCodeList.codeRemark}"/>
-                    </c:forEach>
-                </form:select>
-            </div>
-        </div>
-    </c:if>
+<%--    <c:if test="${not empty cmSecondHandDetail.id}">--%>
+<%--        <div class="control-group">--%>
+<%--            <label class="control-label">线上分账账号:</label>--%>
+<%--            <div class="controls">--%>
+<%--                <form:select path="splitCode" class="select-ele input-medium">--%>
+<%--                    <form:option value="" label="请选择"/>--%>
+<%--                    <c:forEach items="${splitCodeList}" var="splitCodeList" varStatus="index">--%>
+<%--                        <form:option value="${splitCodeList.splitCode}" label="${splitCodeList.codeRemark}"/>--%>
+<%--                    </c:forEach>--%>
+<%--                </form:select>--%>
+<%--            </div>--%>
+<%--        </div>--%>
+<%--    </c:if>--%>
     <div class="control-group">
         <label class="control-label"><font color="red">*</font>商品品牌:</label>
         <div class="controls">
@@ -433,48 +433,48 @@
             <form:input path="companyName" htmlEscape="false" maxlength="20" class="input-xlarge "/>
         </div>
     </div>
-    <div class="control-group">
-        <label class="control-label"><font color="red">*</font>交易价:</label>
-        <div class="controls">
-            <form:input path="price" htmlEscape="false" maxlength="11" onkeyup="num(this)"
-                        class="input-xlarge required"/>
-            <label>
-                <input id="detailTalkFlag" name="detailTalkFlag" type="hidden"/>
-                <input style="padding-left: 7px;padding-top: 8px;border-radius: 4px;background: white;border: 1px solid #ccc;padding-right: 5px"
-                       id="detailTalk" name="detailTalk" type="checkbox" onclick="detailTalkFlagCheckd()"
-                       <c:if test="${cmSecondHandDetail.detailTalkFlag eq 2}">checked="checked"</c:if> /><font
-                    color="red">价格详聊</font>(勾选代表同意不显示交易价)
-            </label>
-        </div>
-    </div>
-
-    <div class="control-group">
-        <label class="control-label"><font color="red">*</font>成本:</label>
-        <div class="controls">
-            <label><input type="radio" name="costCheckFlag" value="1"
-                          onchange="changeCostPriceShow()" ${cmSecondHandDetail.costCheckFlag eq "1" ? "checked" : ""} />固定成本</label>
-            <label><input type="radio" name="costCheckFlag" value="2"
-                          onchange="changeCostPriceShow()" ${cmSecondHandDetail.costCheckFlag eq "1" ? "" : "checked"} />比例成本</label>
-        </div>
-    </div>
-    <div class="control-group costPriceShow">
-        <label class="control-label"><font color="red">*</font>成本价:</label>
-        <div class="controls">
-            <input style="padding-left: 7px;padding-top: 8px;border-radius: 4px;background: white;border: 1px solid #ccc;padding-right: 5px"
-                   id="costPrice" name="costPrice"
-                   value="<fmt:formatNumber type='number' value='${cmSecondHandDetail.costPrice}' pattern='0.00'/>"
-                   onkeyup="num(this)" class="input-xlarge"/>
-        </div>
-    </div>
-    <div class="control-group costPropShow">
-        <label class="control-label"><font color="red">*</font>比例成本百分比:</label>
-        <div class="controls">
-            <input style="padding-left: 7px;padding-top: 8px;border-radius: 4px;background: white;border: 1px solid #ccc;padding-right: 5px"
-                   id="shopPercent" name="shopPercent"
-                   value="<fmt:formatNumber type='number' value='${cmSecondHandDetail.shopPercent}' pattern='0.00'/>"
-                   onkeyup="num(this)" class="input-xlarge"/> %
-        </div>
-    </div>
+<%--    <div class="control-group">--%>
+<%--        <label class="control-label"><font color="red">*</font>交易价:</label>--%>
+<%--        <div class="controls">--%>
+<%--            <form:input path="price" htmlEscape="false" maxlength="11" onkeyup="num(this)"--%>
+<%--                        class="input-xlarge required"/>--%>
+<%--            <label>--%>
+<%--                <input id="detailTalkFlag" name="detailTalkFlag" type="hidden"/>--%>
+<%--                <input style="padding-left: 7px;padding-top: 8px;border-radius: 4px;background: white;border: 1px solid #ccc;padding-right: 5px"--%>
+<%--                       id="detailTalk" name="detailTalk" type="checkbox" onclick="detailTalkFlagCheckd()"--%>
+<%--                       <c:if test="${cmSecondHandDetail.detailTalkFlag eq 2}">checked="checked"</c:if> /><font--%>
+<%--                    color="red">价格详聊</font>(勾选代表同意不显示交易价)--%>
+<%--            </label>--%>
+<%--        </div>--%>
+<%--    </div>--%>
+
+<%--    <div class="control-group">--%>
+<%--        <label class="control-label"><font color="red">*</font>成本:</label>--%>
+<%--        <div class="controls">--%>
+<%--            <label><input type="radio" name="costCheckFlag" value="1"--%>
+<%--                          onchange="changeCostPriceShow()" ${cmSecondHandDetail.costCheckFlag eq "1" ? "checked" : ""} />固定成本</label>--%>
+<%--            <label><input type="radio" name="costCheckFlag" value="2"--%>
+<%--                          onchange="changeCostPriceShow()" ${cmSecondHandDetail.costCheckFlag eq "1" ? "" : "checked"} />比例成本</label>--%>
+<%--        </div>--%>
+<%--    </div>--%>
+<%--    <div class="control-group costPriceShow">--%>
+<%--        <label class="control-label"><font color="red">*</font>成本价:</label>--%>
+<%--        <div class="controls">--%>
+<%--            <input style="padding-left: 7px;padding-top: 8px;border-radius: 4px;background: white;border: 1px solid #ccc;padding-right: 5px"--%>
+<%--                   id="costPrice" name="costPrice"--%>
+<%--                   value="<fmt:formatNumber type='number' value='${cmSecondHandDetail.costPrice}' pattern='0.00'/>"--%>
+<%--                   onkeyup="num(this)" class="input-xlarge"/>--%>
+<%--        </div>--%>
+<%--    </div>--%>
+<%--    <div class="control-group costPropShow">--%>
+<%--        <label class="control-label"><font color="red">*</font>比例成本百分比:</label>--%>
+<%--        <div class="controls">--%>
+<%--            <input style="padding-left: 7px;padding-top: 8px;border-radius: 4px;background: white;border: 1px solid #ccc;padding-right: 5px"--%>
+<%--                   id="shopPercent" name="shopPercent"--%>
+<%--                   value="<fmt:formatNumber type='number' value='${cmSecondHandDetail.shopPercent}' pattern='0.00'/>"--%>
+<%--                   onkeyup="num(this)" class="input-xlarge"/> %--%>
+<%--        </div>--%>
+<%--    </div>--%>
     <div class="control-group">
         <label class="control-label"><font color="red">*</font>商品成色:</label>
         <div class="controls">
@@ -517,19 +517,19 @@
             </div>
         </div>
     </div>
-    <div class="control-group">
-        <label class="control-label">采美对接人:</label>
-        <div class="controls">
-            <form:input path="dockingPeopleName" htmlEscape="false" maxlength="15" class="input-xlarge"/>
-        </div>
-    </div>
-    <div class="control-group">
-        <label class="control-label">采美对接人联系方式:</label>
-        <div class="controls">
-            <form:input path="dockingPeopleMobile" id="dockingPeopleMobile" htmlEscape="false" maxlength="11"
-                        class="input-xlarge"/>
-        </div>
-    </div>
+<%--    <div class="control-group">--%>
+<%--        <label class="control-label">采美对接人:</label>--%>
+<%--        <div class="controls">--%>
+<%--            <form:input path="dockingPeopleName" htmlEscape="false" maxlength="15" class="input-xlarge"/>--%>
+<%--        </div>--%>
+<%--    </div>--%>
+<%--    <div class="control-group">--%>
+<%--        <label class="control-label">采美对接人联系方式:</label>--%>
+<%--        <div class="controls">--%>
+<%--            <form:input path="dockingPeopleMobile" id="dockingPeopleMobile" htmlEscape="false" maxlength="11"--%>
+<%--                        class="input-xlarge"/>--%>
+<%--        </div>--%>
+<%--    </div>--%>
     <div class="control-group">
         <label class="control-label">商品类型:</label>
         <div class="controls" style="margin-top: 5px">
@@ -648,43 +648,43 @@
         // 加载地址
         loadProvince();
 
-        // 初始化付款状态
-        if ($('#payStatus').val() == '1' || $('#payStatus').val() == '3') {
-            //待支付情况下不能填写付款金额
-            $('.payAmount').hide();
-            $('#payAmount').removeClass('required');
-        }
-
-        if ($('#payStatus').val() == '2') {
-            //已支付情况下需要填写付款金额, 而且必填
-            $('.payAmount').show();
-            $('#payAmount').addClass('required');
-        }
-
-        // 价格控制
-        if (val == 1 || val == 3) {
-            $('.showClassDiv').hide();
-        }
-        if (val == 2) {
-            $('.showClassDiv').show();
-        }
-
-        //	修改支付状态
-        $('#payStatus').change(function () {
-                var val = $("#payStatus").val();
-                if (val == 1 || val == 3) {
-                    //待支付情况下不能填写付款金额
-                    $('.payAmount').hide();
-                    $('#payAmount').removeClass('required');
-                }
-                if (val == 2) {
-                    //待支付情况下不能填写付款金额
-                    $('.payAmount').show();
-                    $('#payAmount').addClass('required');
-                }
-            }
-        );
-
+        // // 初始化付款状态
+        // if ($('#payStatus').val() == '1' || $('#payStatus').val() == '3') {
+        //     //待支付情况下不能填写付款金额
+        //     $('.payAmount').hide();
+        //     $('#payAmount').removeClass('required');
+        // }
+        //
+        // if ($('#payStatus').val() == '2') {
+        //     //已支付情况下需要填写付款金额, 而且必填
+        //     $('.payAmount').show();
+        //     $('#payAmount').addClass('required');
+        // }
+        //
+        // // 价格控制
+        // if (val == 1 || val == 3) {
+        //     $('.showClassDiv').hide();
+        // }
+        // if (val == 2) {
+        //     $('.showClassDiv').show();
+        // }
+        //
+        // //	修改支付状态
+        // $('#payStatus').change(function () {
+        //         var val = $("#payStatus").val();
+        //         if (val == 1 || val == 3) {
+        //             //待支付情况下不能填写付款金额
+        //             $('.payAmount').hide();
+        //             $('#payAmount').removeClass('required');
+        //         }
+        //         if (val == 2) {
+        //             //待支付情况下不能填写付款金额
+        //             $('.payAmount').show();
+        //             $('#payAmount').addClass('required');
+        //         }
+        //     }
+        // );
+        //
 
         // 初始化分类
         var val = $("input[name ='secondHandType']:checked").val();
@@ -1098,15 +1098,15 @@
                 submitHandler: function (form) {
 
                     // 验证填写参数
-                    var payStatus = $('#payStatus').val();
-                    if (payStatus == 2) {
-                        var payAmount = $("#payAmount").val();
-                        // (验证付款金额)
-                        if (payAmount == "" || payAmount == null) {
-                            alertx('请填写付款金额');
-                            return false;
-                        }
-                    }
+                    // var payStatus = $('#payStatus').val();
+                    // if (payStatus == 2) {
+                    //     var payAmount = $("#payAmount").val();
+                    //     // (验证付款金额)
+                    //     if (payAmount == "" || payAmount == null) {
+                    //         alertx('请填写付款金额');
+                    //         return false;
+                    //     }
+                    // }
 
                     var secondHandType = $("input[name ='secondHandType']:checked").val();
                     console.log(secondHandType)