Browse Source

联合丽格1.0.2

huangzhiguo 1 year ago
parent
commit
076ed1d102
53 changed files with 484 additions and 232 deletions
  1. 5 5
      src/main/java/com/caimei/modules/bulkpurchase/entity/PurchaseProduct.java
  2. 6 6
      src/main/java/com/caimei/modules/bulkpurchase/web/PurchaseProductController.java
  3. 6 6
      src/main/java/com/caimei/modules/hehe/entity/CmHeheProduct.java
  4. 3 3
      src/main/java/com/caimei/modules/hehe/service/CmHeheProductService.java
  5. 5 5
      src/main/java/com/caimei/modules/order/entity/NewOrderProduct.java
  6. 5 5
      src/main/java/com/caimei/modules/order/entity/OrderProductVo.java
  7. 3 3
      src/main/java/com/caimei/modules/order/service/NewOrderService.java
  8. 2 2
      src/main/java/com/caimei/modules/order/web/NewOrderController.java
  9. 7 0
      src/main/java/com/caimei/modules/product/dao/ProductDao.java
  10. 1 1
      src/main/java/com/caimei/modules/product/dao/ProductNewDao.java
  11. 5 5
      src/main/java/com/caimei/modules/product/entity/CmSecondHandDetail.java
  12. 14 14
      src/main/java/com/caimei/modules/product/entity/CmSku.java
  13. 19 10
      src/main/java/com/caimei/modules/product/entity/Product.java
  14. 3 3
      src/main/java/com/caimei/modules/product/service/CmPromotionService.java
  15. 4 3
      src/main/java/com/caimei/modules/product/service/ProductNewService.java
  16. 62 13
      src/main/java/com/caimei/modules/product/service/ProductService.java
  17. 1 1
      src/main/java/com/caimei/modules/product/web/CmSecondHandDetailController.java
  18. 14 0
      src/main/java/com/caimei/modules/product/web/ProductNewController.java
  19. 7 7
      src/main/java/com/caimei/modules/svip/entity/CmSvipProduct.java
  20. 2 2
      src/main/java/com/caimei/modules/svip/service/CmSvipProductService.java
  21. 4 4
      src/main/java/com/caimei/modules/svip/web/CmSvipProductController.java
  22. 23 5
      src/main/java/com/caimei/modules/weisha/entity/CmOrganizeProduct.java
  23. 0 12
      src/main/java/com/caimei/modules/weisha/entity/CmOrganizeSku.java
  24. 4 0
      src/main/java/com/caimei/modules/weisha/service/CmOrganizeStoreService.java
  25. 2 2
      src/main/resources/config/dev/caimei.properties
  26. 2 2
      src/main/resources/mappings/modules/bulkpurchase/PurchaseProductMapper.xml
  27. 2 2
      src/main/resources/mappings/modules/hehe/CmHeheProductMapper.xml
  28. 3 3
      src/main/resources/mappings/modules/product/CmPromotionMapper.xml
  29. 1 1
      src/main/resources/mappings/modules/product/CmSecondHandDetailMapper.xml
  30. 42 19
      src/main/resources/mappings/modules/product/ProductMapper.xml
  31. 2 2
      src/main/resources/mappings/modules/product/ProductNewMapper.xml
  32. 1 1
      src/main/resources/mappings/modules/product/RepeatPurchasePriceMapper.xml
  33. 3 2
      src/main/resources/mappings/modules/weisha/CmOrganizeProductMapper.xml
  34. 72 0
      src/main/resources/mappings/modules/weisha/CmOrganizeStoreMapper.xml
  35. 2 2
      src/main/webapp/WEB-INF/views/modules/bulkpurchase/orderPurchaseProductList.jsp
  36. 2 2
      src/main/webapp/WEB-INF/views/modules/bulkpurchase/refundRecord.jsp
  37. 7 7
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheProductForm.jsp
  38. 2 2
      src/main/webapp/WEB-INF/views/modules/hehe/heheAddProduct.jsp
  39. 3 3
      src/main/webapp/WEB-INF/views/modules/order/cmOfflineCollectionFrom.jsp
  40. 29 10
      src/main/webapp/WEB-INF/views/modules/order/orderDetail.jsp
  41. 1 1
      src/main/webapp/WEB-INF/views/modules/product-new/cmNewProductForm.jsp
  42. 2 2
      src/main/webapp/WEB-INF/views/modules/product-new/fastEdit.jsp
  43. 63 16
      src/main/webapp/WEB-INF/views/modules/product-new/productEdit.jsp
  44. 4 4
      src/main/webapp/WEB-INF/views/modules/product-new/productList.jsp
  45. 5 5
      src/main/webapp/WEB-INF/views/modules/product-new/secondHand.jsp
  46. 2 2
      src/main/webapp/WEB-INF/views/modules/product-new/singlePromotionForm.jsp
  47. 3 3
      src/main/webapp/WEB-INF/views/modules/product/cmSecondDetailForm.jsp
  48. 3 3
      src/main/webapp/WEB-INF/views/modules/product/cmSecondHandDetailForm.jsp
  49. 3 3
      src/main/webapp/WEB-INF/views/modules/product/productForm.jsp
  50. 1 1
      src/main/webapp/WEB-INF/views/modules/product/toSelectAddOrganizeProduct.jsp
  51. 3 3
      src/main/webapp/WEB-INF/views/modules/svip/cmSvipProductForm.jsp
  52. 4 4
      src/main/webapp/WEB-INF/views/modules/weisha/cmOrganizeProductForm.jsp
  53. 10 10
      src/main/webapp/static/modules/bulkpurchase/orderForm.js

+ 5 - 5
src/main/java/com/caimei/modules/bulkpurchase/entity/PurchaseProduct.java

@@ -55,7 +55,7 @@ public class PurchaseProduct extends DataEntity<PurchaseProduct> {
     private String buyAgainFlag;//订单商品再次购买标识 0否 1是
     private String buyAgainFlag;//订单商品再次购买标识 0否 1是
     private String costCheckFlag;//成本价选中标志:1固定成本 2比例成
     private String costCheckFlag;//成本价选中标志:1固定成本 2比例成
     private String costPrice;//成本价
     private String costPrice;//成本价
-    private String costProportional;//比例成本百分比90%
+    private String shopPercent;//比例成本百分比90%
     private String priceType;  // 虚拟字段  协销帮个人用户下单的时候  priceType = normal 取普通用户价格
     private String priceType;  // 虚拟字段  协销帮个人用户下单的时候  priceType = normal 取普通用户价格
     private String normalPrice; //普通用户的价格
     private String normalPrice; //普通用户的价格
     private Integer userId;//用户Id
     private Integer userId;//用户Id
@@ -378,12 +378,12 @@ public class PurchaseProduct extends DataEntity<PurchaseProduct> {
         this.costPrice = costPrice;
         this.costPrice = costPrice;
     }
     }
 
 
-    public String getCostProportional() {
-        return costProportional;
+    public String getShopPercent() {
+        return shopPercent;
     }
     }
 
 
-    public void setCostProportional(String costProportional) {
-        this.costProportional = costProportional;
+    public void setShopPercent(String shopPercent) {
+        this.shopPercent = shopPercent;
     }
     }
 
 
     public String getShopFee1() {
     public String getShopFee1() {

+ 6 - 6
src/main/java/com/caimei/modules/bulkpurchase/web/PurchaseProductController.java

@@ -114,10 +114,10 @@ public class PurchaseProductController extends BaseController {
                 }
                 }
                 if (StringUtils.equals("2", costCheckFlag)) {
                 if (StringUtils.equals("2", costCheckFlag)) {
                     //比例成本价
                     //比例成本价
-                    String costProportional = p.getCostProportional();
+                    String shopPercent = p.getShopPercent();
                     String price = p.getPrice();
                     String price = p.getPrice();
-                    if (StringUtils.isNotEmpty(costProportional)) {
-                        BigDecimal shopFee1 = (MathUtil.div(MathUtil.mul(costProportional, price), 100)).setScale(2, BigDecimal.ROUND_UP);
+                    if (StringUtils.isNotEmpty(shopPercent)) {
+                        BigDecimal shopFee1 = (MathUtil.div(MathUtil.mul(shopPercent, price), 100)).setScale(2, BigDecimal.ROUND_UP);
                         p.setShopFee1(String.valueOf(shopFee1));
                         p.setShopFee1(String.valueOf(shopFee1));
                     }
                     }
                 }
                 }
@@ -241,10 +241,10 @@ public class PurchaseProductController extends BaseController {
             }
             }
             if (StringUtils.equals("2", costCheckFlag)) {
             if (StringUtils.equals("2", costCheckFlag)) {
                 //比例成本价
                 //比例成本价
-                String costProportional = p.getCostProportional();
+                String shopPercent = p.getShopPercent();
                 String price = p.getPrice();
                 String price = p.getPrice();
-                if (StringUtils.isNotEmpty(costProportional)) {
-                    BigDecimal shopFee1 = (MathUtil.div(MathUtil.mul(costProportional, price), 100)).setScale(2, BigDecimal.ROUND_UP);
+                if (StringUtils.isNotEmpty(shopPercent)) {
+                    BigDecimal shopFee1 = (MathUtil.div(MathUtil.mul(shopPercent, price), 100)).setScale(2, BigDecimal.ROUND_UP);
                     p.setShopFee1(String.valueOf(shopFee1));
                     p.setShopFee1(String.valueOf(shopFee1));
                 }
                 }
             }
             }

+ 6 - 6
src/main/java/com/caimei/modules/hehe/entity/CmHeheProduct.java

@@ -28,7 +28,7 @@ public class CmHeheProduct extends DataEntity<CmHeheProduct> {
     private BigDecimal shopTaxPoint;        // 供应商税率:增值专用发票默认13%,增值税普通发票6%取值范围[0-100]
     private BigDecimal shopTaxPoint;        // 供应商税率:增值专用发票默认13%,增值税普通发票6%取值范围[0-100]
     private String costType;        // 成本价类型:1固定成本 2比例成本
     private String costType;        // 成本价类型:1固定成本 2比例成本
     private BigDecimal costPrice;        // 成本价
     private BigDecimal costPrice;        // 成本价
-    private BigDecimal costProportional;        // 比例成本百分比
+    private BigDecimal shopPercent;        // 比例成本百分比
     private Integer oldProductId;   //旧商品id
     private Integer oldProductId;   //旧商品id
     private Date addTime;        // 添加时间
     private Date addTime;        // 添加时间
     private String name;         //商品名称
     private String name;         //商品名称
@@ -134,12 +134,12 @@ public class CmHeheProduct extends DataEntity<CmHeheProduct> {
         this.costPrice = costPrice;
         this.costPrice = costPrice;
     }
     }
 
 
-    public BigDecimal getCostProportional() {
-        return costProportional;
+    public BigDecimal getShopPercent() {
+        return shopPercent;
     }
     }
 
 
-    public void setCostProportional(BigDecimal costProportional) {
-        this.costProportional = costProportional;
+    public void setShopPercent(BigDecimal shopPercent) {
+        this.shopPercent = shopPercent;
     }
     }
 
 
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@@ -222,4 +222,4 @@ public class CmHeheProduct extends DataEntity<CmHeheProduct> {
     public void setSmallTypeId(Integer smallTypeId) {
     public void setSmallTypeId(Integer smallTypeId) {
         this.smallTypeId = smallTypeId;
         this.smallTypeId = smallTypeId;
     }
     }
-}
+}

+ 3 - 3
src/main/java/com/caimei/modules/hehe/service/CmHeheProductService.java

@@ -56,12 +56,12 @@ public class CmHeheProductService extends CrudService<CmHeheProductDao, CmHehePr
         list.forEach(p -> {
         list.forEach(p -> {
             CmHeheProduct cp = cmHeheProductDao.findProductElement(p.getProductId());
             CmHeheProduct cp = cmHeheProductDao.findProductElement(p.getProductId());
             p.setCostPrice(cp.getCostPrice());
             p.setCostPrice(cp.getCostPrice());
-            p.setCostProportional(cp.getCostProportional());
+            p.setShopPercent(cp.getShopPercent());
             p.setCostType(cp.getCostType());
             p.setCostType(cp.getCostType());
             p.setPrice(cp.getPrice());
             p.setPrice(cp.getPrice());
             //比例成本
             //比例成本
             if ("2".equals(p.getCostType())) {
             if ("2".equals(p.getCostType())) {
-                BigDecimal costPrice = MathUtil.div(MathUtil.mul(p.getPrice(), p.getCostProportional()), 100, 2);
+                BigDecimal costPrice = MathUtil.div(MathUtil.mul(p.getPrice(), p.getShopPercent()), 100, 2);
                 p.setCostPrice(costPrice);
                 p.setCostPrice(costPrice);
             }
             }
             p.setMainImage(AppUtils.getImageURL("product", p.getMainImage(), 0, wwwServer));
             p.setMainImage(AppUtils.getImageURL("product", p.getMainImage(), 0, wwwServer));
@@ -159,4 +159,4 @@ public class CmHeheProductService extends CrudService<CmHeheProductDao, CmHehePr
         skuList.forEach(s -> s.setLadderPriceList(cmHeheProductDao.findLadderList(s.getSkuId())));
         skuList.forEach(s -> s.setLadderPriceList(cmHeheProductDao.findLadderList(s.getSkuId())));
         return skuList;
         return skuList;
     }
     }
-}
+}

+ 5 - 5
src/main/java/com/caimei/modules/order/entity/NewOrderProduct.java

@@ -94,7 +94,7 @@ public class NewOrderProduct extends DataEntity<NewOrderProduct> {
     private List<NewCmFinanceReceipts> newCmFinanceReceiptsList; //订单商品id对应一个进账记录  订单id对应多个
     private List<NewCmFinanceReceipts> newCmFinanceReceiptsList; //订单商品id对应一个进账记录  订单id对应多个
     private String splitFlag;//订单商品是否可拆分   1可拆分(不可以进账确认) 0不可拆分----统计子订单中的
     private String splitFlag;//订单商品是否可拆分   1可拆分(不可以进账确认) 0不可拆分----统计子订单中的
     private String costCheckFlag; //成本价选中标志:1固定成本 2比例成
     private String costCheckFlag; //成本价选中标志:1固定成本 2比例成
-    private Double costProportional;//比例成本百分比
+    private Double shopPercent;//比例成本百分比
     private Integer heUserId; //分销者id(呵呵商城订单使用)
     private Integer heUserId; //分销者id(呵呵商城订单使用)
     private String heUserName; //分销者名称
     private String heUserName; //分销者名称
     private List<CmProductSn> cmProductSnList; //(重光电/轻光电)SN码
     private List<CmProductSn> cmProductSnList; //(重光电/轻光电)SN码
@@ -759,12 +759,12 @@ public class NewOrderProduct extends DataEntity<NewOrderProduct> {
     }
     }
 
 
     @Transient
     @Transient
-    public Double getCostProportional() {
-        return costProportional;
+    public Double getShopPercent() {
+        return shopPercent;
     }
     }
 
 
-    public void setCostProportional(Double costProportional) {
-        this.costProportional = costProportional;
+    public void setShopPercent(Double shopPercent) {
+        this.shopPercent = shopPercent;
     }
     }
 
 
     public List<CmProductSn> getCmProductSnList() {
     public List<CmProductSn> getCmProductSnList() {

+ 5 - 5
src/main/java/com/caimei/modules/order/entity/OrderProductVo.java

@@ -59,7 +59,7 @@ public class OrderProductVo implements Serializable {
     /**
     /**
      * 比例成本百分比
      * 比例成本百分比
      */
      */
-    private Double costProportional;
+    private Double shopPercent;
     /**
     /**
      * 启用阶梯价标志 0否 1是
      * 启用阶梯价标志 0否 1是
      */
      */
@@ -339,12 +339,12 @@ public class OrderProductVo implements Serializable {
         this.normalPrice = normalPrice;
         this.normalPrice = normalPrice;
     }
     }
 
 
-    public Double getCostProportional() {
-        return costProportional;
+    public Double getShopPercent() {
+        return shopPercent;
     }
     }
 
 
-    public void setCostProportional(Double costProportional) {
-        this.costProportional = costProportional;
+    public void setShopPercent(Double shopPercent) {
+        this.shopPercent = shopPercent;
     }
     }
 
 
     public Integer getLadderPriceFlag() {
     public Integer getLadderPriceFlag() {

+ 3 - 3
src/main/java/com/caimei/modules/order/service/NewOrderService.java

@@ -1067,7 +1067,7 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
         if (1 == s.getCostCheckFlag()) {
         if (1 == s.getCostCheckFlag()) {
             product.setCostPrice(s.getCostPrice().toString());
             product.setCostPrice(s.getCostPrice().toString());
         } else {
         } else {
-            product.setCostProportional(s.getCostProportional().toString());
+            product.setShopPercent(s.getShopPercent().toString());
         }
         }
         Float costPrice = 0.0f;//成本价
         Float costPrice = 0.0f;//成本价
         //判断是否选中固定成本价
         //判断是否选中固定成本价
@@ -1078,7 +1078,7 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
             }
             }
         }
         }
         //判断是否选中比例成本价
         //判断是否选中比例成本价
-        else if (null != product.getCostProportional() && org.apache.commons.lang3.StringUtils.equals("2", product.getCostCheckFlag()) && StringUtils.isNotEmpty(product.getCostProportional())) {
+        else if (null != product.getShopPercent() && org.apache.commons.lang3.StringUtils.equals("2", product.getCostCheckFlag()) && StringUtils.isNotEmpty(product.getShopPercent())) {
             double price = o.getDiscountPrice();
             double price = o.getDiscountPrice();
             if (userID != null) {
             if (userID != null) {
                 CmUser cmUser = cmUserDao.get(userID.toString());
                 CmUser cmUser = cmUserDao.get(userID.toString());
@@ -1113,7 +1113,7 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
                 price = productDao.getTouchPriceBySku(o.getSkuId());
                 price = productDao.getTouchPriceBySku(o.getSkuId());
             }
             }
             //通过比例成本价计算
             //通过比例成本价计算
-            costPrice = MathUtil.mul(MathUtil.div(product.getCostProportional(), 100), price).floatValue();
+            costPrice = MathUtil.mul(MathUtil.div(product.getShopPercent(), 100), price).floatValue();
             //赠品重新计算供应商税费
             //赠品重新计算供应商税费
             if ((o.getProductType() == 1 || o.getProductType() == 2)
             if ((o.getProductType() == 1 || o.getProductType() == 2)
                     && o.getSupplierTaxRate() != null && o.getSupplierTaxRate() > 0
                     && o.getSupplierTaxRate() != null && o.getSupplierTaxRate() > 0

+ 2 - 2
src/main/java/com/caimei/modules/order/web/NewOrderController.java

@@ -352,7 +352,7 @@ public class NewOrderController extends BaseController {
         model.addAttribute("order", newOrder);
         model.addAttribute("order", newOrder);
         return "modules/order/secondProductOrderForm";
         return "modules/order/secondProductOrderForm";
     }
     }
-    
+
 
 
     @RequiresPermissions("order:order:edit")
     @RequiresPermissions("order:order:edit")
     @RequestMapping(value = "save")
     @RequestMapping(value = "save")
@@ -653,7 +653,7 @@ public class NewOrderController extends BaseController {
                             // 当前购买价格与成本价比较
                             // 当前购买价格与成本价比较
                             String costCheckFlag = product.getCostCheckFlag();//成本价选中标志:1固定成本 2比例成本
                             String costCheckFlag = product.getCostCheckFlag();//成本价选中标志:1固定成本 2比例成本
                             if ("2".equals(costCheckFlag)) {
                             if ("2".equals(costCheckFlag)) {
-                                costPrice = MathUtil.div(MathUtil.mul(product.getPrice(), product.getCostProportional()), 100).toString();
+                                costPrice = MathUtil.div(MathUtil.mul(product.getPrice(), product.getShopPercent()), 100).toString();
                                 if ("0".equals(costPrice)) costPrice = op.getCostPrice().toString();
                                 if ("0".equals(costPrice)) costPrice = op.getCostPrice().toString();
                             }
                             }
                             //购买价大于成本价,采美赚钱 就写入复购价格库
                             //购买价大于成本价,采美赚钱 就写入复购价格库

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

@@ -4,6 +4,7 @@ import com.caimei.modules.brand.entity.BrandAndProductType;
 import com.caimei.modules.bulkpurchase.entity.PurchaseProduct;
 import com.caimei.modules.bulkpurchase.entity.PurchaseProduct;
 import com.caimei.modules.product.entity.*;
 import com.caimei.modules.product.entity.*;
 import com.caimei.modules.svip.entity.CmSvipProduct;
 import com.caimei.modules.svip.entity.CmSvipProduct;
+import com.caimei.modules.weisha.entity.CmOrganizeProduct;
 import com.caimei.po.ProductLadderPrice;
 import com.caimei.po.ProductLadderPrice;
 import com.caimei.po.Shop;
 import com.caimei.po.Shop;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
@@ -16,6 +17,12 @@ import java.util.Map;
 @MyBatisDao
 @MyBatisDao
 public interface ProductDao extends CrudDao<Product> {
 public interface ProductDao extends CrudDao<Product> {
 
 
+    /**
+     * 插入外部商城商品信息
+     * @param product
+     */
+    void insertMallProduct(CmOrganizeProduct product);
+
     int saveSort(@Param("sort") String sort, @Param("id") String id);
     int saveSort(@Param("sort") String sort, @Param("id") String id);
 
 
     int findLadderPriceByNum(@Param("productID") String productID);
     int findLadderPriceByNum(@Param("productID") String productID);

+ 1 - 1
src/main/java/com/caimei/modules/product/dao/ProductNewDao.java

@@ -66,7 +66,7 @@ public interface ProductNewDao extends CrudDao<Product> {
 
 
     List<SplitCode> findSecondSplitCode(String id);
     List<SplitCode> findSecondSplitCode(String id);
 
 
-    void addProductData(@Param("productId") Integer productId,@Param("costPrice") String costPrice,@Param("costProportional") String costProportional,@Param("taxPoint") String taxPoint,@Param("supplierTaxPoint") String supplierTaxPoint);
+    void addProductData(@Param("productId") Integer productId,@Param("costPrice") String costPrice,@Param("shopPercent") String shopPercent,@Param("taxPoint") String taxPoint,@Param("supplierTaxPoint") String supplierTaxPoint);
 
 
     Product validIList(Integer productID);
     Product validIList(Integer productID);
 }
 }

+ 5 - 5
src/main/java/com/caimei/modules/product/entity/CmSecondHandDetail.java

@@ -72,7 +72,7 @@ public class CmSecondHandDetail extends DataEntity<CmSecondHandDetail> {
     /**
     /**
      * 比例成本百分比
      * 比例成本百分比
      */
      */
-    private Double costProportional;
+    private Double shopPercent;
     private Integer stock;//库存
     private Integer stock;//库存
     private Integer brandID;
     private Integer brandID;
     private String source;//信息来源 1网站  2CRM  3后台
     private String source;//信息来源 1网站  2CRM  3后台
@@ -524,12 +524,12 @@ public class CmSecondHandDetail extends DataEntity<CmSecondHandDetail> {
         this.costPrice = costPrice;
         this.costPrice = costPrice;
     }
     }
 
 
-    public Double getCostProportional() {
-        return costProportional;
+    public Double getShopPercent() {
+        return shopPercent;
     }
     }
 
 
-    public void setCostProportional(Double costProportional) {
-        this.costProportional = costProportional;
+    public void setShopPercent(Double shopPercent) {
+        this.shopPercent = shopPercent;
     }
     }
 
 
     public String getProvince() {
     public String getProvince() {

+ 14 - 14
src/main/java/com/caimei/modules/product/entity/CmSku.java

@@ -16,13 +16,14 @@ import java.util.List;
 public class CmSku extends DataEntity<CmSku> {
 public class CmSku extends DataEntity<CmSku> {
     private Integer skuId;
     private Integer skuId;
     private Integer productId;
     private Integer productId;
+    private Integer mallProductId;  // 外部商城商品Id
     private Integer organizeId; // 组织Id
     private Integer organizeId; // 组织Id
     private Double touchPrice; //单品促销优惠价
     private Double touchPrice; //单品促销优惠价
     private String unit;        // 包装规格
     private String unit;        // 包装规格
     private Double normalPrice;        // 市场价
     private Double normalPrice;        // 市场价
     private String stock;        // 库存
     private String stock;        // 库存
     private Integer costCheckFlag;        // 成本价选中标志:1固定成本 2比例成本
     private Integer costCheckFlag;        // 成本价选中标志:1固定成本 2比例成本
-    private Double costProportional;        // 比例成本百分比
+    private Double shopPercent;        // 比例成本百分比
     private Double costPrice;        // 成本价
     private Double costPrice;        // 成本价
     private Double price;        // 机构价
     private Double price;        // 机构价
     private Integer ladderPriceFlag;        // 启用阶梯价格标识 0否 1是
     private Integer ladderPriceFlag;        // 启用阶梯价格标识 0否 1是
@@ -33,7 +34,6 @@ public class CmSku extends DataEntity<CmSku> {
     private Double discount;       //超级会员会员折扣
     private Double discount;       //超级会员会员折扣
     private Integer priceType;     //超级会员价类型:1折扣,2优惠价
     private Integer priceType;     //超级会员价类型:1折扣,2优惠价
     private Double organizePercent; // 组织百分比
     private Double organizePercent; // 组织百分比
-    private Double shopPercent;     // 供应商百分比
     private Double cmPercent;       // 采美百分比
     private Double cmPercent;       // 采美百分比
 
 
     public Double getTouchPrice() {
     public Double getTouchPrice() {
@@ -84,6 +84,14 @@ public class CmSku extends DataEntity<CmSku> {
         this.productId = productId;
         this.productId = productId;
     }
     }
 
 
+    public Integer getMallProductId() {
+        return mallProductId;
+    }
+
+    public void setMallProductId(Integer mallProductId) {
+        this.mallProductId = mallProductId;
+    }
+
     public Integer getOrganizeId() {
     public Integer getOrganizeId() {
         return organizeId;
         return organizeId;
     }
     }
@@ -124,12 +132,12 @@ public class CmSku extends DataEntity<CmSku> {
         this.stock = stock;
         this.stock = stock;
     }
     }
 
 
-    public Double getCostProportional() {
-        return costProportional;
+    public Double getShopPercent() {
+        return shopPercent;
     }
     }
 
 
-    public void setCostProportional(Double costProportional) {
-        this.costProportional = costProportional;
+    public void setShopPercent(Double shopPercent) {
+        this.shopPercent = shopPercent;
     }
     }
 
 
     public Integer getCostCheckFlag() {
     public Integer getCostCheckFlag() {
@@ -188,14 +196,6 @@ public class CmSku extends DataEntity<CmSku> {
         this.organizePercent = organizePercent;
         this.organizePercent = organizePercent;
     }
     }
 
 
-    public Double getShopPercent() {
-        return shopPercent;
-    }
-
-    public void setShopPercent(Double shopPercent) {
-        this.shopPercent = shopPercent;
-    }
-
     public Double getCmPercent() {
     public Double getCmPercent() {
         return cmPercent;
         return cmPercent;
     }
     }

+ 19 - 10
src/main/java/com/caimei/modules/product/entity/Product.java

@@ -74,8 +74,8 @@ public class Product extends DataEntity<Product> {
     private String freePostFlag;        // 是否包邮 0包邮 1不包邮
     private String freePostFlag;        // 是否包邮 0包邮 1不包邮
     private String costPrice;        // 成本价
     private String costPrice;        // 成本价
     private Double SqlCostPrice;
     private Double SqlCostPrice;
-    private String costProportional;        // 比例成本百分比
-    private Double sqlCostProportional;     //入数据库字段
+    private String shopPercent;        // 比例成本百分比
+    private Double sqlShopPercent;     //入数据库字段
     private String costCheckFlag;        // 成本价选中标志:1固定成本 2比例成
     private String costCheckFlag;        // 成本价选中标志:1固定成本 2比例成
     private String precisehKey;        // 精确关键字
     private String precisehKey;        // 精确关键字
     private String giftFlag;//是否可以参加赠送(0:无法参加,1:可以参加赠送,2:已参加过赠送)
     private String giftFlag;//是否可以参加赠送(0:无法参加,1:可以参加赠送,2:已参加过赠送)
@@ -91,6 +91,7 @@ public class Product extends DataEntity<Product> {
     private String splitCode; //  该商品分账商户号
     private String splitCode; //  该商品分账商户号
     private Integer returnGoodsStutas;//退货状态 1 能退货  2 不能退货
     private Integer returnGoodsStutas;//退货状态 1 能退货  2 不能退货
     private List<CmSku> skuList;
     private List<CmSku> skuList;
+    private List<CmSku> mallSkuList;
     //-----------------  虚拟字段 ----
     //-----------------  虚拟字段 ----
     private Integer skuId;
     private Integer skuId;
     private Integer shopType; //供应商类别,0未审核的二手供应商,1普通,2新品供应商,3二手供应商
     private Integer shopType; //供应商类别,0未审核的二手供应商,1普通,2新品供应商,3二手供应商
@@ -326,6 +327,14 @@ public class Product extends DataEntity<Product> {
         this.skuList = skuList;
         this.skuList = skuList;
     }
     }
 
 
+    public List<CmSku> getMallSkuList() {
+        return mallSkuList;
+    }
+
+    public void setMallSkuList(List<CmSku> mallSkuList) {
+        this.mallSkuList = mallSkuList;
+    }
+
     public String[] getValidFlagString() {
     public String[] getValidFlagString() {
         return validFlagString;
         return validFlagString;
     }
     }
@@ -434,12 +443,12 @@ public class Product extends DataEntity<Product> {
         this.announType = announType;
         this.announType = announType;
     }
     }
 
 
-    public Double getSqlCostProportional() {
-        return sqlCostProportional;
+    public Double getSqlShopPercent() {
+        return sqlShopPercent;
     }
     }
 
 
-    public void setSqlCostProportional(Double sqlCostProportional) {
-        this.sqlCostProportional = sqlCostProportional;
+    public void setSqlShopPercent(Double sqlShopPercent) {
+        this.sqlShopPercent = sqlShopPercent;
     }
     }
 
 
     public Double getSqlTaxPoint() {
     public Double getSqlTaxPoint() {
@@ -1053,12 +1062,12 @@ public class Product extends DataEntity<Product> {
         this.costPrice = costPrice;
         this.costPrice = costPrice;
     }
     }
 
 
-    public String getCostProportional() {
-        return costProportional;
+    public String getShopPercent() {
+        return shopPercent;
     }
     }
 
 
-    public void setCostProportional(String costProportional) {
-        this.costProportional = costProportional;
+    public void setShopPercent(String shopPercent) {
+        this.shopPercent = shopPercent;
     }
     }
 
 
     public String getCostCheckFlag() {
     public String getCostCheckFlag() {

+ 3 - 3
src/main/java/com/caimei/modules/product/service/CmPromotionService.java

@@ -174,10 +174,10 @@ public class CmPromotionService extends CrudService<CmPromotionDao, CmPromotion>
                 }
                 }
                 //比例成本价
                 //比例成本价
                 if (com.thinkgem.jeesite.common.utils.StringUtils.equals("2", costCheckFlag)) {
                 if (com.thinkgem.jeesite.common.utils.StringUtils.equals("2", costCheckFlag)) {
-                    String costProportional = p.getCostProportional();
+                    String shopPercent = p.getShopPercent();
                     String price = p.getPrice();
                     String price = p.getPrice();
-                    if (com.thinkgem.jeesite.common.utils.StringUtils.isNotEmpty(costProportional)) {
-                        BigDecimal shopFee1 = (MathUtil.div(MathUtil.mul(costProportional, price), 100)).setScale(2, BigDecimal.ROUND_UP);
+                    if (com.thinkgem.jeesite.common.utils.StringUtils.isNotEmpty(shopPercent)) {
+                        BigDecimal shopFee1 = (MathUtil.div(MathUtil.mul(shopPercent, price), 100)).setScale(2, BigDecimal.ROUND_UP);
                         p.setShopFee1(String.valueOf(shopFee1));
                         p.setShopFee1(String.valueOf(shopFee1));
                     }
                     }
                 }
                 }

+ 4 - 3
src/main/java/com/caimei/modules/product/service/ProductNewService.java

@@ -27,6 +27,7 @@ import com.thinkgem.jeesite.common.utils.Encodes;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.modules.sys.entity.User;
 import com.thinkgem.jeesite.modules.sys.entity.User;
 import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
 import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
@@ -118,7 +119,7 @@ public class ProductNewService extends CrudService<ProductNewDao, Product> {
                 if (1 == costCheckFlag) {
                 if (1 == costCheckFlag) {
                     p.setCostPrice(sku.getCostPrice().toString());
                     p.setCostPrice(sku.getCostPrice().toString());
                 } else {
                 } else {
-                    p.setSqlCostProportional(sku.getCostProportional());
+                    p.setSqlShopPercent(sku.getShopPercent());
                 }
                 }
             }
             }
         });
         });
@@ -463,10 +464,10 @@ public class ProductNewService extends CrudService<ProductNewDao, Product> {
             Product cmProduct = productNewDao.get(heheProduct.getOldProductId().toString());
             Product cmProduct = productNewDao.get(heheProduct.getOldProductId().toString());
             if (null != cmProduct) {
             if (null != cmProduct) {
                 String costPrice = cmProduct.getCostPrice();
                 String costPrice = cmProduct.getCostPrice();
-                String costProportional = cmProduct.getCostProportional();
+                String shopPercent = cmProduct.getShopPercent();
                 String taxPoint = cmProduct.getTaxPoint();
                 String taxPoint = cmProduct.getTaxPoint();
                 String supplierTaxPoint = cmProduct.getSupplierTaxPoint();
                 String supplierTaxPoint = cmProduct.getSupplierTaxPoint();
-                productNewDao.addProductData(heheProduct.getProductId(), costPrice, costProportional, taxPoint, supplierTaxPoint);
+                productNewDao.addProductData(heheProduct.getProductId(), costPrice, shopPercent, taxPoint, supplierTaxPoint);
             }
             }
         });
         });
     }
     }

+ 62 - 13
src/main/java/com/caimei/modules/product/service/ProductService.java

@@ -9,6 +9,7 @@ import com.caimei.modules.newhome.dao.NewPageFloorDao;
 import com.caimei.modules.product.dao.*;
 import com.caimei.modules.product.dao.*;
 import com.caimei.modules.product.entity.*;
 import com.caimei.modules.product.entity.*;
 import com.caimei.modules.sys.utils.UploadImageUtils;
 import com.caimei.modules.sys.utils.UploadImageUtils;
+import com.caimei.modules.weisha.entity.CmOrganizeProduct;
 import com.caimei.po.ProductImage;
 import com.caimei.po.ProductImage;
 import com.caimei.po.ProductLadderPrice;
 import com.caimei.po.ProductLadderPrice;
 import com.caimei.utils.AppUtils;
 import com.caimei.utils.AppUtils;
@@ -25,6 +26,7 @@ import org.springframework.transaction.annotation.Transactional;
 import javax.annotation.Resource;
 import javax.annotation.Resource;
 import java.text.SimpleDateFormat;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.*;
+import java.util.stream.Collectors;
 
 
 @Service
 @Service
 @Transactional(readOnly = false)
 @Transactional(readOnly = false)
@@ -324,7 +326,10 @@ public class ProductService extends CrudService<ProductDao, Product> {
                     listMall.add(c);
                     listMall.add(c);
                 }
                 }
             });
             });
-            product.setGroundMall(StringUtils.strip(listMall.toString(),"[]"));
+            String strip = StringUtils.strip(listMall.toString(), "[]");
+            product.setGroundMall(strip.replaceAll(",","##").trim());
+        } else {
+            product.setGroundMall("");
         }
         }
         if (null != product.getShopType() && 2 == product.getShopType()) {
         if (null != product.getShopType() && 2 == product.getShopType()) {
             product.setValidFlag("2");
             product.setValidFlag("2");
@@ -380,8 +385,12 @@ public class ProductService extends CrudService<ProductDao, Product> {
     }
     }
 
 
     private void updateSku(Product product) {
     private void updateSku(Product product) {
-        List<CmSku> skuList = product.getSkuList().stream().filter(p -> 0 == p.getOrganizeId()).collect(Collectors.toList());
-        List<CmSku> skuOrganizeList = product.getSkuList().stream().filter(p -> 4 == p.getOrganizeId()).collect(Collectors.toList());
+        List<CmSku> skuList = null;
+        List<CmSku> skuOrganizeList = null;
+        if (null != product.getSkuList()) {
+            product.getSkuList().stream().filter(p -> 0 == p.getOrganizeId()).collect(Collectors.toList());
+            product.getSkuList().stream().filter(p -> 4 == p.getOrganizeId()).collect(Collectors.toList());
+        }
         if (null != skuList && skuList.size() > 0) {
         if (null != skuList && skuList.size() > 0) {
             List<Integer> skuIds = new ArrayList<>();
             List<Integer> skuIds = new ArrayList<>();
             skuList.forEach(s -> {
             skuList.forEach(s -> {
@@ -418,21 +427,43 @@ public class ProductService extends CrudService<ProductDao, Product> {
         // 外部商城
         // 外部商城
         if (null != skuOrganizeList && skuOrganizeList.size() > 0) {
         if (null != skuOrganizeList && skuOrganizeList.size() > 0) {
             List<Integer> skuIds = new ArrayList<>();
             List<Integer> skuIds = new ArrayList<>();
-
+            boolean flag = false;
+            for (CmSku s : skuOrganizeList) {
+                if (null != s.getSkuId()) {
+                    flag = true;
+                }
+            }
+            CmOrganizeProduct mallProduct = new CmOrganizeProduct();
+            if (!flag) {
+                // 插入外部商城商品库
+                // 商品数据赋值
+                mallProduct.setShopId(product.getShopID());
+                mallProduct.setOrganizeId(skuOrganizeList.get(0).getOrganizeId());
+                mallProduct.setProductId(product.getProductID());
+                mallProduct.setLadderPriceFlag(0);
+                mallProduct.setMinBuyNumber(1);
+                mallProduct.setValidFlag(1);
+                mallProduct.setAddTime(new Date());
+                mallProduct.setDelFlag("0");
+                // 插入外部商城商品
+                productDao.insertMallProduct(mallProduct);
+            }
             skuOrganizeList.forEach(s -> {
             skuOrganizeList.forEach(s -> {
                 s.setProductId(product.getProductID());
                 s.setProductId(product.getProductID());
-                s.setShopPercent(s.getCostProportional());
+                if (StringUtils.isNotBlank(mallProduct.getId())) {
+                    s.setMallProductId(Integer.parseInt(mallProduct.getId()));
+                }
                 if (null != s.getSkuId()) {
                 if (null != s.getSkuId()) {
                     productDao.updateOrganizeSku(s);
                     productDao.updateOrganizeSku(s);
+                    skuIds.add(s.getSkuId());
                 } else {
                 } else {
-                    /*s.setOrganizePercent(0.00d);
-                    s.setShopPercent(83.00d);
-                    s.setCmPercent(17.00d);*/
                     productDao.insertOrganizeSku(s);
                     productDao.insertOrganizeSku(s);
                     skuIds.add(s.getSkuId());
                     skuIds.add(s.getSkuId());
                 }
                 }
             });
             });
-            productDao.deleteProductOrganizeSkus(skuIds, product.getProductID());
+            if (null != skuIds && skuIds.size() > 0) {
+                productDao.deleteProductOrganizeSkus(skuIds, product.getProductID());
+            }
         }
         }
     }
     }
 
 
@@ -442,13 +473,26 @@ public class ProductService extends CrudService<ProductDao, Product> {
         if (null != skuList && skuList.size() > 0) {
         if (null != skuList && skuList.size() > 0) {
 //            productDao.deleteLadderPriceById(product.getProductID());
 //            productDao.deleteLadderPriceById(product.getProductID());
             skuList.forEach(s -> {
             skuList.forEach(s -> {
-
                 if (null != s.getPrice()) {
                 if (null != s.getPrice()) {
                     s.productId(product.getProductID());
                     s.productId(product.getProductID());
-                    s.setShopPercent(s.getCostProportional());
+                    s.setShopPercent(s.getShopPercent());
                     if (0 == s.getOrganizeId()) {
                     if (0 == s.getOrganizeId()) {
                         productDao.insertSku(s);
                         productDao.insertSku(s);
                     } else {
                     } else {
+                        CmOrganizeProduct mallProduct = new CmOrganizeProduct();
+                        // 插入外部商城商品库
+                        // 商品数据赋值
+                        mallProduct.setShopId(product.getShopID());
+                        mallProduct.setOrganizeId(s.getOrganizeId());
+                        mallProduct.setProductId(product.getProductID());
+                        mallProduct.setLadderPriceFlag(0);
+                        mallProduct.setMinBuyNumber(1);
+                        mallProduct.setValidFlag(1);
+                        mallProduct.setAddTime(new Date());
+                        mallProduct.setDelFlag("0");
+                        // 插入外部商城商品
+                        productDao.insertMallProduct(mallProduct);
+                        s.setMallProductId(Integer.parseInt(mallProduct.getId()));
                         productDao.insertOrganizeSku(s);
                         productDao.insertOrganizeSku(s);
                     }
                     }
                     if (s.getLadderPriceFlag().equals("1") && 0 == s.getOrganizeId()) {
                     if (s.getLadderPriceFlag().equals("1") && 0 == s.getOrganizeId()) {
@@ -603,12 +647,17 @@ public class ProductService extends CrudService<ProductDao, Product> {
             s.setOrganizeId(0);
             s.setOrganizeId(0);
             s.ladderPriceList(productDao.findLadderPriceBySku(s.skuId()));
             s.ladderPriceList(productDao.findLadderPriceBySku(s.skuId()));
         });
         });
+
+        return skus;
+    }
+
+    public List<CmSku> findMallSkuList(Integer productID) {
         List<CmSku> skuOrganizeList = productDao.findSkuOrganizeList(productID);
         List<CmSku> skuOrganizeList = productDao.findSkuOrganizeList(productID);
         skuOrganizeList.forEach(o -> {
         skuOrganizeList.forEach(o -> {
             o.setOrganizeId(4);
             o.setOrganizeId(4);
-            skus.add(o);
+            o.setCostCheckFlag(2);
         });
         });
-        return skus;
+        return skuOrganizeList;
     }
     }
 
 
     public Product getBySku(String skuId) {
     public Product getBySku(String skuId) {

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

@@ -405,7 +405,7 @@ public class CmSecondHandDetailController extends BaseController {
         if ("1".equals(cmSecondHandDetail.getCostCheckFlag())) {
         if ("1".equals(cmSecondHandDetail.getCostCheckFlag())) {
             cmSku.setCostPrice(cmSecondHandDetail.getCostPrice());
             cmSku.setCostPrice(cmSecondHandDetail.getCostPrice());
         } else {
         } else {
-            cmSku.setCostProportional(cmSecondHandDetail.getCostProportional());
+            cmSku.setShopPercent(cmSecondHandDetail.getShopPercent());
         }
         }
         Integer skuId = productDao.findSkuId(product.getProductID());
         Integer skuId = productDao.findSkuId(product.getProductID());
         if (null != skuId) {
         if (null != skuId) {

+ 14 - 0
src/main/java/com/caimei/modules/product/web/ProductNewController.java

@@ -26,6 +26,7 @@ import com.caimei.modules.user.service.CmUserOrganizeService;
 import com.caimei.po.ProductImage;
 import com.caimei.po.ProductImage;
 import com.caimei.redis.RedisService;
 import com.caimei.redis.RedisService;
 import com.caimei.utils.AppUtils;
 import com.caimei.utils.AppUtils;
+import com.caimei.utils.MathUtil;
 import com.caimei.vo.JsonModel;
 import com.caimei.vo.JsonModel;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Maps;
 import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.config.Global;
@@ -318,6 +319,7 @@ public class ProductNewController extends BaseController {
             product.setProductDescribe(productService.findProductDescribe(product.getProductID()));
             product.setProductDescribe(productService.findProductDescribe(product.getProductID()));
             product.setProductDetail(productService.findProductDetail(product.getProductID()));
             product.setProductDetail(productService.findProductDetail(product.getProductID()));
             product.setSkuList(productService.findSkuList(product.getProductID()));
             product.setSkuList(productService.findSkuList(product.getProductID()));
+            product.setMallSkuList(productService.findMallSkuList(product.getProductID()));
             // 供应商信息
             // 供应商信息
             String shopKeyWord = productService.getShopKeyWord(product.getProductID());
             String shopKeyWord = productService.getShopKeyWord(product.getProductID());
             product.setKeywords(shopKeyWord);
             product.setKeywords(shopKeyWord);
@@ -337,6 +339,7 @@ public class ProductNewController extends BaseController {
             product.setTinyTypeID(0);
             product.setTinyTypeID(0);
             product.setShopType(2);
             product.setShopType(2);
             product.setInsertStatus(1);
             product.setInsertStatus(1);
+            product.setGroundMall("");
         }
         }
         product.setCommodityType(StringUtils.isEmpty(product.getCommodityType()) ? "0" : product.getCommodityType());
         product.setCommodityType(StringUtils.isEmpty(product.getCommodityType()) ? "0" : product.getCommodityType());
         List<CmBrand> brandList = productService.findBrandList();
         List<CmBrand> brandList = productService.findBrandList();
@@ -480,6 +483,17 @@ public class ProductNewController extends BaseController {
                 searchKeyStr += "##";
                 searchKeyStr += "##";
             }
             }
         }
         }
+        if (null != product.getSkuList()) {
+            for (CmSku s : product.getSkuList()) {
+                if (null != s.getCostCheckFlag() && s.getCostCheckFlag() == 2) {
+                    double v = MathUtil.add(MathUtil.add(s.getShopPercent(), s.getOrganizePercent()), s.getCmPercent()).doubleValue();
+                    if (v != 100) {
+                        addMessage(redirectAttributes, "保存商品失败,佣金比例和必须为100");
+                        return "redirect:" + Global.getAdminPath() + "/product/new/productEdit";
+                    }
+                }
+            }
+        }
         product.setSearchKey(searchKeyStr);
         product.setSearchKey(searchKeyStr);
         productDetailInfo.setProductID(product.getProductID());
         productDetailInfo.setProductID(product.getProductID());
         productService.saveProduct(product, productDetailInfo);
         productService.saveProduct(product, productDetailInfo);

+ 7 - 7
src/main/java/com/caimei/modules/svip/entity/CmSvipProduct.java

@@ -15,7 +15,7 @@ import com.thinkgem.jeesite.common.persistence.DataEntity;
  * @version 2021-09-23
  * @version 2021-09-23
  */
  */
 public class CmSvipProduct extends DataEntity<CmSvipProduct> {
 public class CmSvipProduct extends DataEntity<CmSvipProduct> {
-	
+
 	private static final long serialVersionUID = 1L;
 	private static final long serialVersionUID = 1L;
 	private Integer productId;		// 商品id
 	private Integer productId;		// 商品id
 	private Integer priceType;		// 会员价类型:1折扣,2优惠价
 	private Integer priceType;		// 会员价类型:1折扣,2优惠价
@@ -33,7 +33,7 @@ public class CmSvipProduct extends DataEntity<CmSvipProduct> {
 	private String taxPoint;		//机构开票税点(基于不含税基础) :增值税默认13%,普通票6%取值范围[0-100]
 	private String taxPoint;		//机构开票税点(基于不含税基础) :增值税默认13%,普通票6%取值范围[0-100]
 	private String supplierTaxPoint;//供应商开票税点(基于不含税基础) :增值税默认13%,普通票6%取值范围[0-100]
 	private String supplierTaxPoint;//供应商开票税点(基于不含税基础) :增值税默认13%,普通票6%取值范围[0-100]
 	private String costPrice;        // 成本价
 	private String costPrice;        // 成本价
-	private String costProportional;        // 比例成本百分比
+	private String shopPercent;        // 比例成本百分比
 	private String costCheckFlag;        // 成本价选中标志:1固定成本 2比例成
 	private String costCheckFlag;        // 成本价选中标志:1固定成本 2比例成
 	private Integer svipPriceFlag;		//超级会员价标识
 	private Integer svipPriceFlag;		//超级会员价标识
 	private Integer status;            // 优惠状态 1已下架 0已上架
 	private Integer status;            // 优惠状态 1已下架 0已上架
@@ -184,12 +184,12 @@ public class CmSvipProduct extends DataEntity<CmSvipProduct> {
 		this.costPrice = costPrice;
 		this.costPrice = costPrice;
 	}
 	}
 
 
-	public String getCostProportional() {
-		return costProportional;
+	public String getShopPercent() {
+		return shopPercent;
 	}
 	}
 
 
-	public void setCostProportional(String costProportional) {
-		this.costProportional = costProportional;
+	public void setShopPercent(String shopPercent) {
+		this.shopPercent = shopPercent;
 	}
 	}
 
 
 	public String getCostCheckFlag() {
 	public String getCostCheckFlag() {
@@ -207,4 +207,4 @@ public class CmSvipProduct extends DataEntity<CmSvipProduct> {
 	public void setSvipPriceFlag(Integer svipPriceFlag) {
 	public void setSvipPriceFlag(Integer svipPriceFlag) {
 		this.svipPriceFlag = svipPriceFlag;
 		this.svipPriceFlag = svipPriceFlag;
 	}
 	}
-}
+}

+ 2 - 2
src/main/java/com/caimei/modules/svip/service/CmSvipProductService.java

@@ -42,7 +42,7 @@ public class CmSvipProductService extends CrudService<CmSvipProductDao, CmSvipPr
         if (1 == sku.getCostCheckFlag()) {
         if (1 == sku.getCostCheckFlag()) {
             cmSvipProduct.setCostPrice(sku.getCostPrice().toString());
             cmSvipProduct.setCostPrice(sku.getCostPrice().toString());
         } else {
         } else {
-            cmSvipProduct.setCostProportional(sku.getCostProportional().toString());
+            cmSvipProduct.setShopPercent(sku.getShopPercent().toString());
         }
         }
         return cmSvipProduct;
         return cmSvipProduct;
     }
     }
@@ -147,4 +147,4 @@ public class CmSvipProductService extends CrudService<CmSvipProductDao, CmSvipPr
     public CmSku getSvipSku(Integer skuId) {
     public CmSku getSvipSku(Integer skuId) {
         return cmSvipProductDao.getSvipSku(skuId);
         return cmSvipProductDao.getSvipSku(skuId);
     }
     }
-}
+}

+ 4 - 4
src/main/java/com/caimei/modules/svip/web/CmSvipProductController.java

@@ -51,8 +51,8 @@ public class CmSvipProductController extends BaseController {
     private ProductService productService;
     private ProductService productService;
     @Resource
     @Resource
     private CmSvipProductDao vipDao;
     private CmSvipProductDao vipDao;
-    
-    
+
+
 
 
     @ModelAttribute
     @ModelAttribute
     public CmSvipProduct get(@RequestParam(required = false) String id) {
     public CmSvipProduct get(@RequestParam(required = false) String id) {
@@ -89,7 +89,7 @@ public class CmSvipProductController extends BaseController {
         cmSvipProduct.setSkus(skuList);
         cmSvipProduct.setSkus(skuList);
         model.addAttribute("cmSvipProduct", cmSvipProduct);
         model.addAttribute("cmSvipProduct", cmSvipProduct);
         if ("2".equals(cmSvipProduct.getCostCheckFlag())) {
         if ("2".equals(cmSvipProduct.getCostCheckFlag())) {
-            BigDecimal mul = MathUtil.mul(cmSvipProduct.getPrice(), new BigDecimal(cmSvipProduct.getCostProportional()));
+            BigDecimal mul = MathUtil.mul(cmSvipProduct.getPrice(), new BigDecimal(cmSvipProduct.getShopPercent()));
             cmSvipProduct.setCostPrice(MathUtil.mul(mul, new BigDecimal(0.01d)).toString());
             cmSvipProduct.setCostPrice(MathUtil.mul(mul, new BigDecimal(0.01d)).toString());
         }
         }
         return "modules/svip/cmSvipProductForm";
         return "modules/svip/cmSvipProductForm";
@@ -188,4 +188,4 @@ public class CmSvipProductController extends BaseController {
         addMessage(redirectAttributes, "保存成功");
         addMessage(redirectAttributes, "保存成功");
         return "redirect:" + Global.getAdminPath() + "/svip/cmSvipProduct/?repage";
         return "redirect:" + Global.getAdminPath() + "/svip/cmSvipProduct/?repage";
     }
     }
-}
+}

+ 23 - 5
src/main/java/com/caimei/modules/weisha/entity/CmOrganizeProduct.java

@@ -28,13 +28,15 @@ public class CmOrganizeProduct extends DataEntity<CmOrganizeProduct> {
 	private Integer costType;		// 成本价类型:1固定成本 2比例成本
 	private Integer costType;		// 成本价类型:1固定成本 2比例成本
 	private Double costPrice;		// 成本价
 	private Double costPrice;		// 成本价
 	private Double retailPrice;		// 售价
 	private Double retailPrice;		// 售价
-	private Double costProportional;		// 比例成本百分比
+	private Double shopPercent;		// 比例成本百分比
 	private Integer status;		// 商品状态:0已下架,1已上架
 	private Integer status;		// 商品状态:0已下架,1已上架
 	private Date addTime;		// 添加时间
 	private Date addTime;		// 添加时间
 	private Date updateTime;	// 更新时间
 	private Date updateTime;	// 更新时间
 	private String delFlag;	// 0 有效 其它无效
 	private String delFlag;	// 0 有效 其它无效
 	private Double supplierTaxPoint; 	// 供应商税率
 	private Double supplierTaxPoint; 	// 供应商税率
 	private Double taxPoint; 	// 机构税率
 	private Double taxPoint; 	// 机构税率
+	private Integer shopId;	// 供应商Id
+	private Integer validFlag; // 上架状态
 
 
 	private List<CmOrganizeSku> sku;		// sku信息
 	private List<CmOrganizeSku> sku;		// sku信息
 	private String skus;	// sku json
 	private String skus;	// sku json
@@ -140,12 +142,12 @@ public class CmOrganizeProduct extends DataEntity<CmOrganizeProduct> {
 		this.retailPrice = retailPrice;
 		this.retailPrice = retailPrice;
 	}
 	}
 
 
-	public Double getCostProportional() {
-		return costProportional;
+	public Double getShopPercent() {
+		return shopPercent;
 	}
 	}
 
 
-	public void setCostProportional(Double costProportional) {
-		this.costProportional = costProportional;
+	public void setShopPercent(Double shopPercent) {
+		this.shopPercent = shopPercent;
 	}
 	}
 
 
 	public Integer getStatus() {
 	public Integer getStatus() {
@@ -181,6 +183,22 @@ public class CmOrganizeProduct extends DataEntity<CmOrganizeProduct> {
 		this.taxPoint = taxPoint;
 		this.taxPoint = taxPoint;
 	}
 	}
 
 
+	public Integer getShopId() {
+		return shopId;
+	}
+
+	public void setShopId(Integer shopId) {
+		this.shopId = shopId;
+	}
+
+	public Integer getValidFlag() {
+		return validFlag;
+	}
+
+	public void setValidFlag(Integer validFlag) {
+		this.validFlag = validFlag;
+	}
+
 	public List<CmOrganizeSku> getSku() {
 	public List<CmOrganizeSku> getSku() {
 		return sku;
 		return sku;
 	}
 	}

+ 0 - 12
src/main/java/com/caimei/modules/weisha/entity/CmOrganizeSku.java

@@ -52,10 +52,6 @@ public class CmOrganizeSku {
      * 成本价
      * 成本价
      */
      */
     private Double costPrice;
     private Double costPrice;
-    /**
-     * 比例成本百分比
-     */
-    private Double costProportional;
     /**
     /**
      * 采美起订量
      * 采美起订量
      */
      */
@@ -161,14 +157,6 @@ public class CmOrganizeSku {
         this.costPrice = costPrice;
         this.costPrice = costPrice;
     }
     }
 
 
-    public Double getCostProportional() {
-        return costProportional;
-    }
-
-    public void setCostProportional(Double costProportional) {
-        this.costProportional = costProportional;
-    }
-
     public Integer getCmMinBuyNumber() {
     public Integer getCmMinBuyNumber() {
         return cmMinBuyNumber;
         return cmMinBuyNumber;
     }
     }

+ 4 - 0
src/main/java/com/caimei/modules/weisha/service/CmOrganizeStoreService.java

@@ -4,6 +4,7 @@ package com.caimei.modules.weisha.service;
 import com.caimei.utils.AppKeys;
 import com.caimei.utils.AppKeys;
 import com.caimei.utils.AppUtils;
 import com.caimei.utils.AppUtils;
 import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.config.Global;
+import com.thinkgem.jeesite.common.persistence.Page;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 import com.thinkgem.jeesite.common.service.CrudService;
 import com.thinkgem.jeesite.common.service.CrudService;
@@ -24,6 +25,9 @@ public class CmOrganizeStoreService extends CrudService<CmOrganizeStoreDao, CmOr
 	@Resource
 	@Resource
 	private CmOrganizeStoreDao cmOrganizeStoreDao;
 	private CmOrganizeStoreDao cmOrganizeStoreDao;
 
 
+	public Page<CmOrganizeStore> findPage(Page<CmOrganizeStore> page, CmOrganizeStore cmOrganizeStore) {
+		return super.findPage(page, cmOrganizeStore);
+	}
 
 
 	public CmOrganizeStore gtClubInfo(CmOrganizeStore cmOrganizeStore) {
 	public CmOrganizeStore gtClubInfo(CmOrganizeStore cmOrganizeStore) {
 		CmOrganizeStore cmOrganizeStores = cmOrganizeStoreDao.getclubInfo(cmOrganizeStore);
 		CmOrganizeStore cmOrganizeStores = cmOrganizeStoreDao.getclubInfo(cmOrganizeStore);

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

@@ -12,9 +12,9 @@
 #mysql database setting
 #mysql database setting
 jdbc.type=mysql
 jdbc.type=mysql
 jdbc.driver=com.mysql.cj.jdbc.Driver
 jdbc.driver=com.mysql.cj.jdbc.Driver
-jdbc.url=jdbc:mysql://120.79.25.27:3306/caimei?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
+jdbc.url=jdbc:mysql://192.168.2.100:3306/caimei?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
 jdbc.username=developer
 jdbc.username=developer
-jdbc.password=J5p3tgOVazNl4ydf
+jdbc.password=05bZ/OxTB:X+yd%1
 
 
 
 
 #jdbc.url=jdbc:mysql://192.168.2.100:3306/caimei?characterEncoding=UTF8&serverTimezone=Asia/Shanghai
 #jdbc.url=jdbc:mysql://192.168.2.100:3306/caimei?characterEncoding=UTF8&serverTimezone=Asia/Shanghai

+ 2 - 2
src/main/resources/mappings/modules/bulkpurchase/PurchaseProductMapper.xml

@@ -36,7 +36,7 @@
 	<select id="findSencondProductPage" resultType="com.caimei.modules.bulkpurchase.entity.PurchaseProduct">
 	<select id="findSencondProductPage" resultType="com.caimei.modules.bulkpurchase.entity.PurchaseProduct">
 		SELECT b.name as shopName ,b.`shopID` as shopId,a.name purchaseProductName,
 		SELECT b.name as shopName ,b.`shopID` as shopId,a.name purchaseProductName,
 		cs.price,a.`productID` as productId,a.productCode productNo,a.mainImage image
 		cs.price,a.`productID` as productId,a.productCode productNo,a.mainImage image
-		,cs.costCheckFlag,cs.costPrice,cs.costProportional, cs.normalPrice
+		,cs.costCheckFlag,cs.costPrice,cs.shopPercent, cs.normalPrice
 		,a.productCategory as "productCategory",cshd.secondHandType as "secondHandType",cs.ladderPriceFlag
 		,a.productCategory as "productCategory",cshd.secondHandType as "secondHandType",cs.ladderPriceFlag
 		,a.includedTax,a.invoiceType
 		,a.includedTax,a.invoiceType
 		FROM product a LEFT JOIN shop b ON b.shopID=a.shopID
 		FROM product a LEFT JOIN shop b ON b.shopID=a.shopID
@@ -87,4 +87,4 @@
 		where csps.productId=#{productId}
 		where csps.productId=#{productId}
 		order by cs.price asc limit 1
 		order by cs.price asc limit 1
 	</select>
 	</select>
-</mapper>
+</mapper>

+ 2 - 2
src/main/resources/mappings/modules/hehe/CmHeheProductMapper.xml

@@ -294,7 +294,7 @@
 
 
     <select id="findProductElement" resultType="com.caimei.modules.hehe.entity.CmHeheProduct">
     <select id="findProductElement" resultType="com.caimei.modules.hehe.entity.CmHeheProduct">
         select ifnull(chs.price, 0)           as price,
         select ifnull(chs.price, 0)           as price,
-               ifnull(cs.costProportional, 0) as costProportional,
+               ifnull(cs.shopPercent, 0) as shopPercent,
                ifnull(cs.costCheckFlag, 0)    as costType,
                ifnull(cs.costCheckFlag, 0)    as costType,
                ifnull(cs.costPrice, 0)        as costPrice
                ifnull(cs.costPrice, 0)        as costPrice
         from cm_sku cs
         from cm_sku cs
@@ -326,4 +326,4 @@
         from cm_hehe_activity_ladder
         from cm_hehe_activity_ladder
         where skuId=#{skuId}
         where skuId=#{skuId}
     </select>
     </select>
-</mapper>
+</mapper>

+ 3 - 3
src/main/resources/mappings/modules/product/CmPromotionMapper.xml

@@ -137,7 +137,7 @@
                p.mainImage         image,
                p.mainImage         image,
                cs.costCheckFlag    costCheckFlag,
                cs.costCheckFlag    costCheckFlag,
                cs.costPrice        costPrice,
                cs.costPrice        costPrice,
-               cs.costProportional costProportional,
+               cs.shopPercent shopPercent,
                cs.normalPrice AS   normalPrice,
                cs.normalPrice AS   normalPrice,
                cpg.number     AS   num,
                cpg.number     AS   num,
                cp.discount    as   discounts
                cp.discount    as   discounts
@@ -450,7 +450,7 @@
     </select>
     </select>
 
 
     <select id="getPromotionSkus" resultType="com.caimei.modules.product.entity.CmSku">
     <select id="getPromotionSkus" resultType="com.caimei.modules.product.entity.CmSku">
-        SELECT DISTINCT cs.unit, cs.costCheckFlag, cs.costPrice, cs.costProportional, cps.touchPrice, cs.skuId
+        SELECT DISTINCT cs.unit, cs.costCheckFlag, cs.costPrice, cs.shopPercent, cps.touchPrice, cs.skuId
         FROM cm_promotions cp
         FROM cm_promotions cp
                  LEFT JOIN cm_promotions_product cpp ON cp.id = cpp.promotionsId
                  LEFT JOIN cm_promotions_product cpp ON cp.id = cpp.promotionsId
                  LEFT JOIN cm_sku cs ON cpp.productId = cs.productId
                  LEFT JOIN cm_sku cs ON cpp.productId = cs.productId
@@ -459,7 +459,7 @@
     </select>
     </select>
 
 
     <select id="getPromotionSkusByProduct" resultType="com.caimei.modules.product.entity.CmSku">
     <select id="getPromotionSkusByProduct" resultType="com.caimei.modules.product.entity.CmSku">
-        SELECT cs.unit, cs.costCheckFlag, cs.costPrice, cs.costProportional, cps.touchPrice, cs.skuId
+        SELECT cs.unit, cs.costCheckFlag, cs.costPrice, cs.shopPercent, cps.touchPrice, cs.skuId
         FROM cm_sku cs
         FROM cm_sku cs
                  LEFT JOIN cm_promotion_sku cps ON cs.skuId = cps.skuId
                  LEFT JOIN cm_promotion_sku cps ON cs.skuId = cps.skuId
         WHERE cs.productId = #{productIds}
         WHERE cs.productId = #{productIds}

+ 1 - 1
src/main/resources/mappings/modules/product/CmSecondHandDetailMapper.xml

@@ -48,7 +48,7 @@
 		p.brandID AS "brandID",
 		p.brandID AS "brandID",
 		cs.costPrice as "costPrice",
 		cs.costPrice as "costPrice",
 		cs.costCheckFlag AS "costCheckFlag",
 		cs.costCheckFlag AS "costCheckFlag",
-		cs.costProportional AS "costProportional",
+		cs.shopPercent AS "shopPercent",
 		p.visibility AS "visibility",
 		p.visibility AS "visibility",
 		p.splitCode AS "splitCode"
 		p.splitCode AS "splitCode"
     </sql>
     </sql>

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

@@ -98,7 +98,12 @@
     <sql id="ActivityJoins">
     <sql id="ActivityJoins">
         LEFT JOIN shop s on s.shopID = a.shopID
         LEFT JOIN shop s on s.shopID = a.shopID
     </sql>
     </sql>
-
+    <insert id="insertMallProduct" keyColumn="id" keyProperty="id" useGeneratedKeys="true" parameterType="com.caimei.modules.weisha.entity.CmOrganizeProduct">
+        INSERT INTO cm_mall_organize_products (organizeID, productID, shopId, normalPrice, costPrice, ladderPriceFlag, minBuyNumber,
+                                               validFlag, addTime, updateTime, delFlag)
+        VALUES (#{organizeId}, #{productId}, #{shopId}, #{normalPrice}, #{costPrice}, #{ladderPriceFlag}, #{minBuyNumber},
+                #{validFlag}, #{addTime}, #{updateTime}, #{delFlag})
+    </insert>
     <update id="saveSort">
     <update id="saveSort">
         UPDATE cm_search_recommend_product
         UPDATE cm_search_recommend_product
         SET sort = #{sort}
         SET sort = #{sort}
@@ -331,6 +336,7 @@
 
 
     <insert id="insert" parameterType="Product" keyProperty="productID" keyColumn="productID" useGeneratedKeys="true">
     <insert id="insert" parameterType="Product" keyProperty="productID" keyColumn="productID" useGeneratedKeys="true">
         INSERT INTO product(brandID,
         INSERT INTO product(brandID,
+        groundMall,
         bigTypeID,
         bigTypeID,
         smallTypeID,
         smallTypeID,
         tinyTypeID,
         tinyTypeID,
@@ -410,6 +416,7 @@
         </if>
         </if>
         showFlag)
         showFlag)
         VALUES (#{brandID},
         VALUES (#{brandID},
+        #{groundMall},
         #{bigTypeID},
         #{bigTypeID},
         #{smallTypeID},
         #{smallTypeID},
         #{tinyTypeID},
         #{tinyTypeID},
@@ -1030,7 +1037,9 @@
          costCheckFlag,
          costCheckFlag,
          costprice,
          costprice,
          stock,
          stock,
-         costProportional,
+         shopPercent,
+         organizePercent,
+         cmPercent,
          minBuyNumber,
          minBuyNumber,
          unit)
          unit)
         values (#{productId},
         values (#{productId},
@@ -1040,7 +1049,9 @@
                 #{costCheckFlag},
                 #{costCheckFlag},
                 #{costPrice},
                 #{costPrice},
                 #{stock},
                 #{stock},
-                #{costProportional},
+                #{shopPercent},
+                #{organizePercent},
+                #{cmPercent},
                 #{minBuyNumber},
                 #{minBuyNumber},
                 #{unit})
                 #{unit})
     </insert>
     </insert>
@@ -1048,9 +1059,9 @@
             useGeneratedKeys="true">
             useGeneratedKeys="true">
         insert into cm_mall_product_sku
         insert into cm_mall_product_sku
         (productId,
         (productId,
+         mallProductId,
          normalPrice,
          normalPrice,
          price,
          price,
-         costprice,
          stock,
          stock,
          minBuyNumber,
          minBuyNumber,
          unit,
          unit,
@@ -1058,9 +1069,9 @@
          shopPercent,
          shopPercent,
          cmPercent)
          cmPercent)
         values (#{productId},
         values (#{productId},
+                #{mallProductId},
                 #{normalPrice},
                 #{normalPrice},
                 #{price},
                 #{price},
-                #{costPrice},
                 #{stock},
                 #{stock},
                 #{minBuyNumber},
                 #{minBuyNumber},
                 #{unit},
                 #{unit},
@@ -1138,7 +1149,7 @@
         DELETE
         DELETE
         FROM cm_mall_product_sku
         FROM cm_mall_product_sku
         WHERE productId = #{productId}
         WHERE productId = #{productId}
-        and skuId not in
+        and id not in
         <foreach collection="skuIds" close=")" separator="," open="(" item="id">
         <foreach collection="skuIds" close=")" separator="," open="(" item="id">
             #{id}
             #{id}
         </foreach>
         </foreach>
@@ -1387,6 +1398,9 @@
             <if test="productDescribe != null and productDescribe != ''">
             <if test="productDescribe != null and productDescribe != ''">
                 productDescribe = #{productDescribe},
                 productDescribe = #{productDescribe},
             </if>
             </if>
+            <if test="groundMall != null and groundMall != ''">
+                groundMall = #{groundMall},
+            </if>
             <if test="productDetail != null and productDetail != ''">
             <if test="productDetail != null and productDetail != ''">
                 productDetail = #{productDetail},
                 productDetail = #{productDetail},
             </if>
             </if>
@@ -1666,7 +1680,9 @@
             ladderPriceFlag=#{ladderPriceFlag},
             ladderPriceFlag=#{ladderPriceFlag},
             normalPrice=#{normalPrice},
             normalPrice=#{normalPrice},
             price=#{price},
             price=#{price},
-            costProportional=#{costProportional},
+            shopPercent=#{shopPercent},
+            organizePercent=#{organizePercent},
+            cmPercent=#{cmPercent},
             costPrice=#{costPrice},
             costPrice=#{costPrice},
             costCheckFlag=#{costCheckFlag},
             costCheckFlag=#{costCheckFlag},
             stock=#{stock},
             stock=#{stock},
@@ -1677,14 +1693,15 @@
     <update id="updateOrganizeSku">
     <update id="updateOrganizeSku">
         update cm_mall_product_sku
         update cm_mall_product_sku
         set productId=#{productId},
         set productId=#{productId},
-            ladderPriceFlag=#{ladderPriceFlag},
             normalPrice=#{normalPrice},
             normalPrice=#{normalPrice},
             price=#{price},
             price=#{price},
-            costProportional=#{costProportional},
             costPrice=#{costPrice},
             costPrice=#{costPrice},
             stock=#{stock},
             stock=#{stock},
             unit=#{unit},
             unit=#{unit},
-            minBuyNumber=#{minBuyNumber}
+            minBuyNumber=#{minBuyNumber},
+            organizePercent=#{organizePercent},
+            shopPercent=#{shopPercent},
+            cmPercent=#{cmPercent}
         where id = #{skuId}
         where id = #{skuId}
     </update>
     </update>
 
 
@@ -1921,7 +1938,7 @@
                normalPrice,
                normalPrice,
                stock,
                stock,
                costCheckFlag,
                costCheckFlag,
-               costProportional,
+               shopPercent,
                costPrice,
                costPrice,
                price,
                price,
                ladderPriceFlag,
                ladderPriceFlag,
@@ -1942,7 +1959,9 @@
                normalPrice,
                normalPrice,
                stock,
                stock,
                costCheckFlag,
                costCheckFlag,
-               costProportional,
+               shopPercent,
+               organizePercent,
+               cmPercent,
                costPrice,
                costPrice,
                price,
                price,
                ladderPriceFlag,
                ladderPriceFlag,
@@ -1957,14 +1976,18 @@
     <select id="findSkuOrganizeList" resultType="com.caimei.modules.product.entity.CmSku">
     <select id="findSkuOrganizeList" resultType="com.caimei.modules.product.entity.CmSku">
         select id as skuId,
         select id as skuId,
                productId,
                productId,
+               mallProductId,
                unit,
                unit,
                normalPrice,
                normalPrice,
                stock,
                stock,
-               "1" as costCheckFlag,
-               shopPercent as costProportional,
+               "2" as costCheckFlag,
+               shopPercent as shopPercent,
                costPrice,
                costPrice,
                price,
                price,
-               minBuyNumber
+               minBuyNumber,
+               organizePercent,
+               shopPercent,
+               cmPercent
         from cm_mall_product_sku
         from cm_mall_product_sku
         where productId = #{productID}
         where productId = #{productID}
     </select>
     </select>
@@ -2004,7 +2027,7 @@
                cs.unit,
                cs.unit,
                cs.stock,
                cs.stock,
                cs.costCheckFlag,
                cs.costCheckFlag,
-               cs.costProportional,
+               cs.shopPercent,
                cs.costPrice,
                cs.costPrice,
                chs.price
                chs.price
         from cm_sku cs
         from cm_sku cs
@@ -2017,21 +2040,21 @@
         where productId = #{productId}
         where productId = #{productId}
     </select>
     </select>
     <select id="findSku" resultType="com.caimei.modules.product.entity.CmSku">
     <select id="findSku" resultType="com.caimei.modules.product.entity.CmSku">
-        select price, costPrice, costCheckFlag, costProportional, normalPrice
+        select price, costPrice, costCheckFlag, shopPercent, normalPrice
         from cm_sku
         from cm_sku
         where productId = #{productId}
         where productId = #{productId}
         order by price asc
         order by price asc
         limit 1
         limit 1
     </select>
     </select>
     <select id="findOrganizeSku" resultType="com.caimei.modules.product.entity.CmSku">
     <select id="findOrganizeSku" resultType="com.caimei.modules.product.entity.CmSku">
-        SELECT price, costPrice,"1" AS costCheckFlag, shopPercent AS costProportional, normalPrice
+        SELECT price, costPrice,"1" AS costCheckFlag, shopPercent AS shopPercent, normalPrice
         FROM cm_mall_product_sku
         FROM cm_mall_product_sku
         WHERE productId = 1686
         WHERE productId = 1686
         ORDER BY price ASC
         ORDER BY price ASC
         LIMIT 1
         LIMIT 1
     </select>
     </select>
     <select id="findSkuById" resultType="com.caimei.modules.product.entity.CmSku">
     <select id="findSkuById" resultType="com.caimei.modules.product.entity.CmSku">
-        select skuId, price, costPrice, costCheckFlag, costProportional, unit
+        select skuId, price, costPrice, costCheckFlag, shopPercent, unit
         from cm_sku
         from cm_sku
         where skuId = #{skuId}
         where skuId = #{skuId}
     </select>
     </select>

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

@@ -664,8 +664,8 @@
             <if test="costPrice != null and costPrice != ''">
             <if test="costPrice != null and costPrice != ''">
                 costPrice = #{costPrice},
                 costPrice = #{costPrice},
             </if>
             </if>
-            <if test="costProportional != null and costProportional !=''">
-                costProportional = #{costProportional},
+            <if test="shopPercent != null and shopPercent !=''">
+                shopPercent = #{shopPercent},
             </if>
             </if>
             <if test="costCheckFlag != null and costCheckFlag !=''">
             <if test="costCheckFlag != null and costCheckFlag !=''">
                 costCheckFlag = #{costCheckFlag},
                 costCheckFlag = #{costCheckFlag},

+ 1 - 1
src/main/resources/mappings/modules/product/RepeatPurchasePriceMapper.xml

@@ -63,7 +63,7 @@
 		  	cs.unit,
 		  	cs.unit,
             CASE   cs.costCheckFlag
             CASE   cs.costCheckFlag
             WHEN  1 THEN cs.`costPrice`
             WHEN  1 THEN cs.`costPrice`
-            WHEN  2 THEN cs.`costProportional` * cs.`price` / 100
+            WHEN  2 THEN cs.`shopPercent` * cs.`price` / 100
             END   AS "costPrice"
             END   AS "costPrice"
 		FROM repeat_purchase_price a
 		FROM repeat_purchase_price a
 		<include refid="repeatPurchasePriceJoins"/>
 		<include refid="repeatPurchasePriceJoins"/>

+ 3 - 2
src/main/resources/mappings/modules/weisha/CmOrganizeProductMapper.xml

@@ -15,7 +15,7 @@
 		a.minBuyNumber AS "minBuyNumber",
 		a.minBuyNumber AS "minBuyNumber",
 		a.costType AS "costType",
 		a.costType AS "costType",
 		a.costPrice AS "costPrice",
 		a.costPrice AS "costPrice",
-		a.costProportional AS "costProportional",
+		a.shopPercent AS "shopPercent",
 		a.status AS "status",
 		a.status AS "status",
 		a.addTime AS "addTime",
 		a.addTime AS "addTime",
 		a.delFlag AS "delFlag",
 		a.delFlag AS "delFlag",
@@ -79,8 +79,9 @@
         cmps.productId,
         cmps.productId,
         cmps.minBuyNumber,
         cmps.minBuyNumber,
         cmps.price,
         cmps.price,
-        cmps.stock
+        cmps.stock,
         cmps.unit,
         cmps.unit,
+        "2" as costCheckFlag,
         cmps.organizePercent,
         cmps.organizePercent,
         cmps.shopPercent,
         cmps.shopPercent,
         cmps.cmPercent
         cmps.cmPercent

+ 72 - 0
src/main/resources/mappings/modules/weisha/CmOrganizeStoreMapper.xml

@@ -1,7 +1,79 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.caimei.modules.weisha.dao.CmOrganizeStoreDao">
 <mapper namespace="com.caimei.modules.weisha.dao.CmOrganizeStoreDao">
+    <sql id="cmOrganizeUserinfo">
+        u.userID AS userID,
+		c.clubID as clubID,
+		u.userOrganizeID AS organizeId,
+		c.name AS NAME,
+		c.linkMan AS linkMan,
+		c.contractMobile AS mobile,
+		c.provinceId AS provinceId,
+		c.cityId AS cityId,
+		c.townId AS townId,
+		c.address AS address,
+		c.status AS STATUS,
+		c.addTime AS ADDTIME
+    </sql>
+    <sql id="addressName">
+        p.name AS provinceName,
+		ct.name AS cityName,
+		t.name AS townName
+    </sql>
+    <sql id="cmOrganizeStoreJoins">
+        LEFT JOIN province p ON c.provinceId = p.provinceID
+		LEFT JOIN city ct ON c.cityId = ct.cityID
+		LEFT JOIN town t ON c.townId = t.townID
+    </sql>
 
 
+    <select id="findList" resultType="CmOrganizeStore">
+        SELECT
+        <include refid="cmOrganizeUserinfo"/>,
+        <include refid="addressName"/>
+        FROM USER u
+        LEFT JOIN club c ON c.userId = u.userId
+        <include refid="cmOrganizeStoreJoins"/>
+        <where>
+            <if test="name != null and name != ''">
+                AND c.name LIKE
+                <if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
+                <if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
+                <if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
+            </if>
+            <if test="linkMan != null and linkMan != ''">
+                AND c.linkMan LIKE
+                <if test="dbName == 'oracle'">'%'||#{linkMan}||'%'</if>
+                <if test="dbName == 'mssql'">'%'+#{linkMan}+'%'</if>
+                <if test="dbName == 'mysql'">concat('%',#{linkMan},'%')</if>
+            </if>
+            <if test="mobile != null and mobile != ''">
+                AND c.contractMobile LIKE
+                <if test="dbName == 'oracle'">'%'||#{mobile}||'%'</if>
+                <if test="dbName == 'mssql'">'%'+#{mobile}+'%'</if>
+                <if test="dbName == 'mysql'">concat('%',#{mobile},'%')</if>
+            </if>
+            <if test="status != null and status != ''">
+                AND c.status = #{status}
+            </if>
+            <if test="startTime != null and startTime != ''">
+                AND c.addTime >= #{startTime}
+            </if>
+            <if test="endTime != null and endTime != ''">
+                AND c.addTime <![CDATA[   <=  ]]> #{endTime}
+            </if>
+            <if test="organizeId != null">
+                and u.userOrganizeID = #{organizeId}  AND u.userIdentity != 1
+            </if>
+        </where>
+        <choose>
+            <when test="page !=null and page.orderBy != null and page.orderBy != ''">
+                ORDER BY ${page.orderBy}
+            </when>
+            <otherwise>
+                order by c.addTime desc
+            </otherwise>
+        </choose>
+    </select>
     <select id="getOrganizeUser" resultType="java.lang.Integer">
     <select id="getOrganizeUser" resultType="java.lang.Integer">
         SELECT DISTINCT userID
         SELECT DISTINCT userID
         FROM cm_mall_operation_user
         FROM cm_mall_operation_user

+ 2 - 2
src/main/webapp/WEB-INF/views/modules/bulkpurchase/orderPurchaseProductList.jsp

@@ -689,8 +689,8 @@
                 </td>
                 </td>
                     <%--比例成本百分比90%--%>
                     <%--比例成本百分比90%--%>
                 <td style="display: none">
                 <td style="display: none">
-                    <input name="costProportional" id="costProportional${state.index}"
-                           value="${purchaseProduct.costProportional}" readonly style="width: 80px">
+                    <input name="shopPercent" id="shopPercent${state.index}"
+                           value="${purchaseProduct.shopPercent}" readonly style="width: 80px">
                 </td>
                 </td>
                     <%--旧商品标志,供应商税率跟随机构税率变动--%>
                     <%--旧商品标志,供应商税率跟随机构税率变动--%>
                 <td style="display: none">
                 <td style="display: none">

+ 2 - 2
src/main/webapp/WEB-INF/views/modules/bulkpurchase/refundRecord.jsp

@@ -272,7 +272,7 @@
                 经理折扣:¥${order.discountFee}
                 经理折扣:¥${order.discountFee}
             </td>
             </td>
         </c:if>
         </c:if>
-        <td>
+        <%--<td>
             运费:
             运费:
             <c:if test="${order.organizeID != 4}">
             <c:if test="${order.organizeID != 4}">
 
 
@@ -295,7 +295,7 @@
             <c:if test="${order.organizeID == 4}">
             <c:if test="${order.organizeID == 4}">
                 ${postageInfo}
                 ${postageInfo}
             </c:if>
             </c:if>
-        </td>
+        </td>--%>
     </tr>
     </tr>
     <tr>
     <tr>
         <c:if test="${order.organizeID != 4}">
         <c:if test="${order.organizeID != 4}">

+ 7 - 7
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheProductForm.jsp

@@ -347,7 +347,7 @@
                             <label><font color="red">*</font>成本价:${sku.costPrice}</label>
                             <label><font color="red">*</font>成本价:${sku.costPrice}</label>
                         </c:if>
                         </c:if>
                         <c:if test="${sku.costCheckFlag eq 2}">
                         <c:if test="${sku.costCheckFlag eq 2}">
-                            <label><font color="red">*</font>成本比例百分比:${sku.costProportional}%</label>
+                            <label><font color="red">*</font>成本比例百分比:${sku.shopPercent}%</label>
                         </c:if>
                         </c:if>
                     </div>
                     </div>
                 </div>
                 </div>
@@ -399,8 +399,8 @@
             <%--        </div>--%>
             <%--        </div>--%>
             <%--        <div class="control-group" id="costProportionalShow">--%>
             <%--        <div class="control-group" id="costProportionalShow">--%>
             <%--            <label class="control-label"><font color="red">*</font>比例成本百分比:</label>--%>
             <%--            <label class="control-label"><font color="red">*</font>比例成本百分比:</label>--%>
-            <%--            <div class="controls" id="costProportional">--%>
-            <%--                    ${cmHeheProduct.costProportional}%--%>
+            <%--            <div class="controls" id="shopPercent">--%>
+            <%--                    ${cmHeheProduct.shopPercent}%--%>
             <%--            </div>--%>
             <%--            </div>--%>
             <%--        </div>--%>
             <%--        </div>--%>
     </div>
     </div>
@@ -502,7 +502,7 @@
                             for (let i = 0; i < skus.length; i++) {
                             for (let i = 0; i < skus.length; i++) {
                                 var unit=i+1;
                                 var unit=i+1;
                                 var cost = skus[i].costCheckFlag == 1 ? '固定成本' : '比例成本';
                                 var cost = skus[i].costCheckFlag == 1 ? '固定成本' : '比例成本';
-                                var costShow = skus[i].costCheckFlag == 1 ? '<label><font color="red">*</font>成本价:' + skus[i].costPrice + '</label>' : '<label><font color="red">*</font>成本比例百分比:' + skus[i].costProportional + '%</label>';
+                                var costShow = skus[i].costCheckFlag == 1 ? '<label><font color="red">*</font>成本价:' + skus[i].costPrice + '</label>' : '<label><font color="red">*</font>成本比例百分比:' + skus[i].shopPercent + '%</label>';
                                 html += '<div><input type="number" style="display:none" value="' + skus[i].skuId + '" name="skus[' + i + '].skuId">';
                                 html += '<div><input type="number" style="display:none" value="' + skus[i].skuId + '" name="skus[' + i + '].skuId">';
                                 html += '<label class="control-label"><font color="red">*</font>规格:规格' + unit;
                                 html += '<label class="control-label"><font color="red">*</font>规格:规格' + unit;
                                 html += '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>';
                                 html += '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>';
@@ -530,7 +530,7 @@
                             var shopTaxPoint = items[0].shopTaxPoint;
                             var shopTaxPoint = items[0].shopTaxPoint;
                             var costType = items[0].costType;
                             var costType = items[0].costType;
                             var costPrice = items[0].costPrice;
                             var costPrice = items[0].costPrice;
-                            var costProportional = items[0].costProportional;
+                            var shopPercent = items[0].shopPercent;
                             $("#mainImage").attr("src", mainImage);
                             $("#mainImage").attr("src", mainImage);
                             $("#shopName").text(shopName);
                             $("#shopName").text(shopName);
                             $("#productId").val(productId);
                             $("#productId").val(productId);
@@ -556,7 +556,7 @@
                                 $('#costType').text('比例成本');
                                 $('#costType').text('比例成本');
                             }
                             }
                             $("#costPrice").text(costPrice);
                             $("#costPrice").text(costPrice);
-                            $("#costProportional").text(costProportional + '%');
+                            $("#shopPercent").text(shopPercent + '%');
                             chageIncludedTax();
                             chageIncludedTax();
                             // changeCostPriceShow(costType);
                             // changeCostPriceShow(costType);
                             showTaxPoint();
                             showTaxPoint();
@@ -725,4 +725,4 @@
         }
         }
     </script>
     </script>
 </body>
 </body>
-</html>
+</html>

+ 2 - 2
src/main/webapp/WEB-INF/views/modules/hehe/heheAddProduct.jsp

@@ -74,7 +74,7 @@
                 <input type="hidden" value="${item.supplierTaxPoint}" id="shopTaxPoint">
                 <input type="hidden" value="${item.supplierTaxPoint}" id="shopTaxPoint">
                 <input type="hidden" value="${item.costCheckFlag}" id="costType">
                 <input type="hidden" value="${item.costCheckFlag}" id="costType">
                 <input type="hidden" value="${item.costPrice}" id="costPrice">
                 <input type="hidden" value="${item.costPrice}" id="costPrice">
-                <input type="hidden" value="${item.costProportional}" id="costProportional">
+                <input type="hidden" value="${item.shopPercent}" id="shopPercent">
             </tr>
             </tr>
         </c:forEach>
         </c:forEach>
     </c:if>
     </c:if>
@@ -119,7 +119,7 @@
                 shopTaxPoint: $(this).parents(".itemtr").find("#shopTaxPoint").val(),
                 shopTaxPoint: $(this).parents(".itemtr").find("#shopTaxPoint").val(),
                 costType: $(this).parents(".itemtr").find("#costType").val(),
                 costType: $(this).parents(".itemtr").find("#costType").val(),
                 costPrice: $(this).parents(".itemtr").find("#costPrice").val(),
                 costPrice: $(this).parents(".itemtr").find("#costPrice").val(),
-                costProportional: $(this).parents(".itemtr").find("#costProportional").val()
+                shopPercent: $(this).parents(".itemtr").find("#shopPercent").val()
             })
             })
         });
         });
         return items;
         return items;

+ 3 - 3
src/main/webapp/WEB-INF/views/modules/order/cmOfflineCollectionFrom.jsp

@@ -30,13 +30,13 @@
         <div class="control-group">
         <div class="control-group">
             <form:hidden path="id" />
             <form:hidden path="id" />
             <label class="control-label"><font color="red">*</font>银行账号:</label>
             <label class="control-label"><font color="red">*</font>银行账号:</label>
-            <form:input path="bankAccount" htmlEscape="false" maxlength="10" class="input-xlarge required" required="true"
+            <form:input path="bankAccount" htmlEscape="false" maxlength="30" class="input-xlarge required" required="true"
                         id="bankAccount"/><br/><br/>
                         id="bankAccount"/><br/><br/>
             <label class="control-label"><font color="red">*</font>户名:</label>
             <label class="control-label"><font color="red">*</font>户名:</label>
-            <form:input path="bankUserName" htmlEscape="false" class="input-xlarge required" required="true"
+            <form:input path="bankUserName" htmlEscape="false" maxlength="30" class="input-xlarge required" required="true"
                         id="bankAccount"/><br/><br/>
                         id="bankAccount"/><br/><br/>
             <label class="control-label"><font color="red">*</font>开户行:</label>
             <label class="control-label"><font color="red">*</font>开户行:</label>
-            <form:input path="bankOfDeposit" htmlEscape="false" class="input-xlarge required" required="true"
+            <form:input path="bankOfDeposit" htmlEscape="false" maxlength="30" class="input-xlarge required" required="true"
                         id="bankAccount"/><br/><br/>
                         id="bankAccount"/><br/><br/>
             <label class="control-label"><font color="red">*</font>银行卡号:</label>
             <label class="control-label"><font color="red">*</font>银行卡号:</label>
             <form:input path="bankCardNo" htmlEscape="false" maxlength="20" class="input-xlarge required" required="true" onchange="onlynum(this)"
             <form:input path="bankCardNo" htmlEscape="false" maxlength="20" class="input-xlarge required" required="true" onchange="onlynum(this)"

+ 29 - 10
src/main/webapp/WEB-INF/views/modules/order/orderDetail.jsp

@@ -839,6 +839,8 @@
                 <c:if test="${order.status ne '0'}">
                 <c:if test="${order.status ne '0'}">
                     <a onclick="copyText('${shopOrder.shopOrderID}')" style="cursor:pointer;">供应商订单二维码</a>
                     <a onclick="copyText('${shopOrder.shopOrderID}')" style="cursor:pointer;">供应商订单二维码</a>
                 </c:if>
                 </c:if>
+                <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${order.orderID}&from=2">收付款记录</a>
+                <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRecturnRecordByOrderID.rpc?orderID=${order.orderID}">退款(退货)记录</a>
                 <c:if test="${order.onlinePayFlag eq 0}">
                 <c:if test="${order.onlinePayFlag eq 0}">
                     <c:if test="${order.status == 12 || order.status == 13 || order.status == 21 || order.status == 22 || order.status == 23 || order.status == 31 || order.status == 32 || order.status == 33 || order.status == 4 || order.status == 5}">
                     <c:if test="${order.status == 12 || order.status == 13 || order.status == 21 || order.status == 22 || order.status == 23 || order.status == 31 || order.status == 32 || order.status == 33 || order.status == 4 || order.status == 5}">
                         <%--  返佣订单不能申请退款(退货) --%>
                         <%--  返佣订单不能申请退款(退货) --%>
@@ -873,22 +875,39 @@
             <br/>
             <br/>
             <span>商品总额:<fmt:formatNumber value="${shopOrder.needPayAmount}" type="currency"/></span>
             <span>商品总额:<fmt:formatNumber value="${shopOrder.needPayAmount}" type="currency"/></span>
             <span>优惠:<fmt:formatNumber value="${shopOrder.eachDiscount}" type="currency"/></span>
             <span>优惠:<fmt:formatNumber value="${shopOrder.eachDiscount}" type="currency"/></span>
+            <span>运费:
+                <c:if test="${order.organizeID != 4}">
+                    <c:if test="${order.freePostFlag == 0}">
+                        包邮
+                    </c:if>
+                    <c:if test="${order.freePostFlag == -1}">
+                        到付
+                    </c:if>
+                    <c:if test="${order.freePostFlag == -2}">
+                        仪器到付-产品包邮
+                    </c:if>
+                    <c:if test="${order.freePostFlag != -1 && order.freePostFlag != 0 && order.freePostFlag != -2}">
+                        <fmt:formatNumber value="${order.freight}" type="currency"/>
+                    </c:if>
+                    <c:if test="${order.userBeans > 0}">
+                        <font color="red">(采美豆抵用:${order.userBeans})</font>
+                    </c:if>
+                </c:if>
+                <c:if test="${order.organizeID == 4}">
+                    ${postageInfo}
+                </c:if>
+            </span>
+            <span>子订单总额:<fmt:formatNumber value="${shopOrder.totalAmount}" type="currency"/></span>
             <span>应付金额:<fmt:formatNumber value="${shopOrder.realPay}" type="currency"/></span>
             <span>应付金额:<fmt:formatNumber value="${shopOrder.realPay}" type="currency"/></span>
             <span>
             <span>
-                已付金额:<fmt:formatNumber value="${shopOrder.receiptAmount}" type="currency"/>
+                已收金额:<fmt:formatNumber value="${shopOrder.receiptAmount}" type="currency"/>
+                <c:if test="${shopOrder.useBalanceFlag eq 1 and shopOrder.accountAmount ne null}">(余额抵扣¥${shopOrder.accountAmount})</c:if>
                 <c:if test="${order.organizeID != 4&&shopOrder.commercialCode eq 'E1807059160' && (order.receiptStatus == 2 || order.receiptStatus == 3)}">
                 <c:if test="${order.organizeID != 4&&shopOrder.commercialCode eq 'E1807059160' && (order.receiptStatus == 2 || order.receiptStatus == 3)}">
                     <font color="red">(采美信息线上收款)</font>
                     <font color="red">(采美信息线上收款)</font>
                 </c:if>
                 </c:if>
-                <c:if test="${order.organizeID == 4}">
-                    <c:if test="${order.organizeID == 4&& voucherVo eq null }">
-                        <font color="red">(联合丽格线上收款)</font>
-                    </c:if>
-                    <c:if test="${order.organizeID == 4&& voucherVo ne null }">
-                        <font color="red">(联合丽格线下收款)</font>
-                    </c:if>
-                </c:if>
+
             </span>
             </span>
-            <span>待付金额:<fmt:formatNumber value="${shopOrder.restAmount}" type="currency"/></span>
+            <span>待收金额:<fmt:formatNumber value="${shopOrder.restAmount}" type="currency"/></span>
             <br/>
             <br/>
             <span>收款状态:
             <span>收款状态:
                 <c:if test="${shopOrder.shopReceiptStatus == 1}">
                 <c:if test="${shopOrder.shopReceiptStatus == 1}">

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

@@ -605,7 +605,7 @@
         </tr>
         </tr>
         <tr id="costPropShow">
         <tr id="costPropShow">
             <th><span class="red">*</span>比例成本百分比:</th>
             <th><span class="red">*</span>比例成本百分比:</th>
-            <td colspan="3"><form:input path="costProportional" id="costProportional" type="number" maxlength="11"
+            <td colspan="3"><form:input path="shopPercent" id="shopPercent" type="number" maxlength="11"
                                         class="short"/> %
                                         class="short"/> %
             </td>
             </td>
         </tr>
         </tr>

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

@@ -82,7 +82,7 @@
         </tr>
         </tr>
         <tr id="costPropShow">
         <tr id="costPropShow">
             <th><span class="red">*</span>比例成本百分比:</th>
             <th><span class="red">*</span>比例成本百分比:</th>
-            <td colspan="3"><form:input path="costProportional" id="costProportional" type="number" maxlength="11" class="short" /> %</td>
+            <td colspan="3"><form:input path="shopPercent" id="shopPercent" type="number" maxlength="11" class="short" /> %</td>
         </tr>
         </tr>
         <tr><td colspan="4" style="text-align:center;">
         <tr><td colspan="4" style="text-align:center;">
 			<shiro:hasPermission name="product:product:edit">
 			<shiro:hasPermission name="product:product:edit">
@@ -109,7 +109,7 @@
                         return false;
                         return false;
                     };
                     };
                 }else{
                 }else{
-                    if ($("#costProportional").val() == '') {
+                    if ($("#shopPercent").val() == '') {
                         alertx("请输入成本比例");
                         alertx("请输入成本比例");
                         return false;
                         return false;
                     };
                     };

+ 63 - 16
src/main/webapp/WEB-INF/views/modules/product-new/productEdit.jsp

@@ -856,6 +856,7 @@
     <div class="sku">
     <div class="sku">
         <input type="hidden" name="skuId">
         <input type="hidden" name="skuId">
         <input type="hidden" name="organizeId">
         <input type="hidden" name="organizeId">
+        <input type="hidden" name="mallProductId">
         <div class="sku-item sku-unit">
         <div class="sku-item sku-unit">
             <span class="red">*</span>包装规格:
             <span class="red">*</span>包装规格:
             <input name="unit" type="text" maxlength="15" style="width: 40px" class="short required"/>
             <input name="unit" type="text" maxlength="15" style="width: 40px" class="short required"/>
@@ -880,9 +881,9 @@
             <span class="costFlagText">成本价</span>:
             <span class="costFlagText">成本价</span>:
             <input style="width: 60px" name="costPrice" type="number" maxlength="11" class="short"/> 元
             <input style="width: 60px" name="costPrice" type="number" maxlength="11" class="short"/> 元
         </div>
         </div>
-        <div class="sku-item sku-costProportional" style="display: none;">
+        <div class="sku-item sku-shopPercent" style="display: none;">
             <span class="red">*</span>佣金比例:
             <span class="red">*</span>佣金比例:
-            供应商:<input style="width: 50px" name="costProportional" type="number" maxlength="11" class="short"/>%
+            供应商:<input style="width: 50px" name="shopPercent" type="number" maxlength="11" class="short"/>%
             集团:<input style="width: 50px" name="organizePercent" type="number" maxlength="11" class="short"/>%
             集团:<input style="width: 50px" name="organizePercent" type="number" maxlength="11" class="short"/>%
             采美:<input style="width: 50px" name="cmPercent" type="number" maxlength="11" class="short"/>%
             采美:<input style="width: 50px" name="cmPercent" type="number" maxlength="11" class="short"/>%
         </div>
         </div>
@@ -944,7 +945,6 @@
 <script type="text/javascript" src="${ctxStatic}/bootstrap-select/js/bootstrap-select.js"></script>
 <script type="text/javascript" src="${ctxStatic}/bootstrap-select/js/bootstrap-select.js"></script>
 
 
 <script type="text/javascript">
 <script type="text/javascript">
-
     $('#caimei').change(function () {
     $('#caimei').change(function () {
         var item = $('#caimei').val()
         var item = $('#caimei').val()
         console.log('item---'+item)
         console.log('item---'+item)
@@ -1060,10 +1060,10 @@
                     }
                     }
                     ;
                     ;
                 } else {
                 } else {
-                    var costProportional = $("#costProportional").val()
+                    var shopPercent = $("#shopPercent").val()
                     var organizePercent = $("#organizePercent").val()
                     var organizePercent = $("#organizePercent").val()
                     var cmPercent = $("#cmPercent").val()
                     var cmPercent = $("#cmPercent").val()
-                    if ($("#costProportional").val() == '') {
+                    if ($("#shopPercent").val() == '') {
                         alertx("请输入成本比例");
                         alertx("请输入成本比例");
                         return false;
                         return false;
                     };
                     };
@@ -1075,7 +1075,7 @@
                         alertx("请输入供应商比例");
                         alertx("请输入供应商比例");
                         return false;
                         return false;
                     };
                     };
-                    /*const num = costProportional*1 + organizePercent*1 + cmPercent*1
+                    /*const num = shopPercent*1 + organizePercent*1 + cmPercent*1
                     if (num != 100) {
                     if (num != 100) {
                         alertx("佣金比例和需为100")
                         alertx("佣金比例和需为100")
                         return false;
                         return false;
@@ -1179,6 +1179,8 @@
         }
         }
         // 初始化sku
         // 初始化sku
         insertDefaultSkuRow();
         insertDefaultSkuRow();
+        // 初始化外部商城sku
+        insertDefaultMallSkuRow();
         // 初始化关联标签库
         // 初始化关联标签库
         initLabelSelects();
         initLabelSelects();
     });
     });
@@ -1971,15 +1973,27 @@
     var productJson = ${productJson};
     var productJson = ${productJson};
     console.log("productJson",productJson);
     console.log("productJson",productJson);
     var skuList = productJson.skuList;
     var skuList = productJson.skuList;
+    var mallSkuList = productJson.mallSkuList;
     var groundMall = productJson.groundMall;
     var groundMall = productJson.groundMall;
     console.log("groundMall",groundMall)
     console.log("groundMall",groundMall)
 
 
+    if (skuList === undefined) {
+        skuList = ""
+    }
+    if (mallSkuList === undefined) {
+        mallSkuList = ""
+    }
     $(".addSku").click(function () {
     $(".addSku").click(function () {
         var skuTemplate = $('#skuTemplate').html()
         var skuTemplate = $('#skuTemplate').html()
         $("#skus").append(skuTemplate).show();
         $("#skus").append(skuTemplate).show();
         var current = $("#skus").find('.sku').eq(-1);
         var current = $("#skus").find('.sku').eq(-1);
+        if(skuList.length>0 || mallSkuList.length >0){
+            skuIndexNum = ++skuIndex;
+        }else{
+            skuIndexNum = 0;
+        }
         var product = {
         var product = {
-            skuIndex: ++skuIndex,
+            skuIndex: ++skuIndex-1,
             costCheckFlag: '1',
             costCheckFlag: '1',
             ladderPriceFlag: '0'
             ladderPriceFlag: '0'
         }
         }
@@ -1991,8 +2005,13 @@
         var skuTemplate = $('#skuTemplate').html()
         var skuTemplate = $('#skuTemplate').html()
         $("#mallSkus").append(skuTemplate).show();
         $("#mallSkus").append(skuTemplate).show();
         var current = $("#mallSkus").find('.sku').eq(-1);
         var current = $("#mallSkus").find('.sku').eq(-1);
+        if(skuList.length>0 || mallSkuList.length >0){
+            skuIndexNum = ++skuIndex;
+        }else{
+            skuIndexNum = 0;
+        }
         var product = {
         var product = {
-            skuIndex: ++skuIndex,
+            skuIndex: ++skuIndex-1,
             costCheckFlag: '1',
             costCheckFlag: '1',
             ladderPriceFlag: '0'
             ladderPriceFlag: '0'
         }
         }
@@ -2017,6 +2036,31 @@
                 skuEventBind(current, product);
                 skuEventBind(current, product);
                 skuIndex = i
                 skuIndex = i
             }
             }
+        } else {
+            $("#skus").hide();
+        }
+        // else {
+        //     var product = {};
+        //     product.skuIndex = 0;
+        //     setSkuPrototypeValues(current, product);
+        //     skuEventBind(current, product);
+        // }
+    }
+    function insertDefaultMallSkuRow() {
+        console.log('mallSkuList', mallSkuList);
+        if (mallSkuList) {
+            for (var i = skuList.length; i < mallSkuList.length+skuList.length; i++) {
+                var skuTemplate = $('#skuTemplate').html();
+                $("#mallSkus").append(skuTemplate).show();
+                var current = $("#mallSkus").find('.sku').eq(-1);
+                var product = mallSkuList[i-skuList.length];
+                product.skuIndex = i;
+                setSkuPrototypeValues(current, product, product.organizeId);
+                skuEventBind(current, product);
+                skuIndex = i
+            }
+        } else {
+            $("#mallSkus").hide();
         }
         }
         // else {
         // else {
         //     var product = {};
         //     var product = {};
@@ -2035,6 +2079,9 @@
         var organizeId = el.find('input[name$="organizeId"]');
         var organizeId = el.find('input[name$="organizeId"]');
         organizeId.val(organize)
         organizeId.val(organize)
         organizeId.attr('name', 'skuList[' + skuIndex + '].organizeId');
         organizeId.attr('name', 'skuList[' + skuIndex + '].organizeId');
+        var mallProductId = el.find('input[name$="mallProductId"]');
+        mallProductId.val(product.mallProductId)
+        mallProductId.attr('name', 'skuList[' + skuIndex + '].mallProductId');
         var index = el.find('input[name$="index"]');
         var index = el.find('input[name$="index"]');
         index.val(skuIndex);
         index.val(skuIndex);
 
 
@@ -2065,9 +2112,9 @@
         costPrice.val(product.costPrice)
         costPrice.val(product.costPrice)
         costPrice.attr('name', 'skuList[' + skuIndex + '].costPrice');
         costPrice.attr('name', 'skuList[' + skuIndex + '].costPrice');
         // 比例成本百分比
         // 比例成本百分比
-        var costProportional = el.find('input[name$="costProportional"]');
-        costProportional.val(product.costProportional)
-        costProportional.attr('name', 'skuList[' + skuIndex + '].costProportional');
+        var shopPercent = el.find('input[name$="shopPercent"]');
+        shopPercent.val(product.shopPercent)
+        shopPercent.attr('name', 'skuList[' + skuIndex + '].shopPercent');
         // 组织百分比
         // 组织百分比
         var organizePercent = el.find('input[name$="organizePercent"]');
         var organizePercent = el.find('input[name$="organizePercent"]');
         organizePercent.val(product.organizePercent)
         organizePercent.val(product.organizePercent)
@@ -2078,11 +2125,11 @@
         cmPercent.attr('name', 'skuList[' + skuIndex + '].cmPercent');
         cmPercent.attr('name', 'skuList[' + skuIndex + '].cmPercent');
 
 
         if (product.costCheckFlag != 1) {
         if (product.costCheckFlag != 1) {
-            costProportional.parent('.sku-costProportional').show();
+            shopPercent.parent('.sku-shopPercent').show();
             costPrice.parent('.sku-costPrice').hide();
             costPrice.parent('.sku-costPrice').hide();
         } else {
         } else {
             costPrice.parent('.sku-costPrice').show();
             costPrice.parent('.sku-costPrice').show();
-            costProportional.parent('.sku-costProportional').hide();
+            shopPercent.parent('.sku-shopPercent').hide();
         }
         }
 
 
         // 机构价
         // 机构价
@@ -2152,7 +2199,7 @@
         // 成本价 or 百分比
         // 成本价 or 百分比
         var costCheckFlag = el.find('input[name$="costCheckFlag"]');
         var costCheckFlag = el.find('input[name$="costCheckFlag"]');
         var costPrice = el.find('input[name$="costPrice"]');
         var costPrice = el.find('input[name$="costPrice"]');
-        var costProportional = el.find('input[name$="costProportional"]');
+        var shopPercent = el.find('input[name$="shopPercent"]');
         var organizePercent = el.find('input[name$="organizePercent"]');
         var organizePercent = el.find('input[name$="organizePercent"]');
         var cmPercent = el.find('input[name$="cmPercent"]');
         var cmPercent = el.find('input[name$="cmPercent"]');
         // 机构价
         // 机构价
@@ -2268,10 +2315,10 @@
 
 
         costCheckFlag.on('change', function () {
         costCheckFlag.on('change', function () {
             if ($(this).val() == 1) {
             if ($(this).val() == 1) {
-                costProportional.parent('.sku-costProportional').hide();
+                shopPercent.parent('.sku-shopPercent').hide();
                 costPrice.parent('.sku-costPrice').show();
                 costPrice.parent('.sku-costPrice').show();
             } else {
             } else {
-                costProportional.parent('.sku-costProportional').show();
+                shopPercent.parent('.sku-shopPercent').show();
                 costPrice.parent('.sku-costPrice').hide();
                 costPrice.parent('.sku-costPrice').hide();
             }
             }
         })
         })

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

@@ -714,11 +714,11 @@
                             <br>
                             <br>
                             <c:if test="${product.validFlag eq 1 or product.validFlag eq 8}">
                             <c:if test="${product.validFlag eq 1 or product.validFlag eq 8}">
                                 <a class="red" href="javascript:void(0);"
                                 <a class="red" href="javascript:void(0);"
-                                   onclick="auditThis(${product.id},'${product.brand.name}','${product.brand.status}','${product.costCheckFlag}','${product.costPrice}','${product.sqlCostProportional}','${product.newvalidFlag}','${product.showTime}','${product.addTime}','${product.newProductType}')">上架审核</a>
+                                   onclick="auditThis(${product.id},'${product.brand.name}','${product.brand.status}','${product.costCheckFlag}','${product.costPrice}','${product.sqlShopPercent}','${product.newvalidFlag}','${product.showTime}','${product.addTime}','${product.newProductType}')">上架审核</a>
                             </c:if>
                             </c:if>
                             <c:if test="${product.newProductType eq 1 &&  product.newvalidFlag != 1 && product.validFlag == 2}"><a
                             <c:if test="${product.newProductType eq 1 &&  product.newvalidFlag != 1 && product.validFlag == 2}"><a
                                     href="javascript:void(0);"
                                     href="javascript:void(0);"
-                                    onclick="auditThis(${product.id},'${product.brand.name}','${product.brand.status}','${product.costCheckFlag}','${product.costPrice}','${product.sqlCostProportional}','${product.newvalidFlag}','${product.showTime}','${product.addTime}','${product.newProductType}','${product.validFlag}')">新品展示审核</a></c:if>
+                                    onclick="auditThis(${product.id},'${product.brand.name}','${product.brand.status}','${product.costCheckFlag}','${product.costPrice}','${product.sqlShopPercent}','${product.newvalidFlag}','${product.showTime}','${product.addTime}','${product.newProductType}','${product.validFlag}')">新品展示审核</a></c:if>
                             <c:if test="${product.validFlag ne 10 && product.validFlag ne 1 && product.validFlag ne 8}">
                             <c:if test="${product.validFlag ne 10 && product.validFlag ne 1 && product.validFlag ne 8}">
                                 <a class="red" href="javascript:void(0);"
                                 <a class="red" href="javascript:void(0);"
                                    onclick="validChange(${product.id}, 10)">冻结</a>
                                    onclick="validChange(${product.id}, 10)">冻结</a>
@@ -1012,7 +1012,7 @@
     }
     }
 
 
     // 审核(正常)
     // 审核(正常)
-    function auditThis(id, name, status, costCheckFlag, costPrice, costProportional, newvalidFlag, showtime, addtime, newProductType, validFlag) {
+    function auditThis(id, name, status, costCheckFlag, costPrice, shopPercent, newvalidFlag, showtime, addtime, newProductType, validFlag) {
         // 商品成本判断
         // 商品成本判断
         if (null == costCheckFlag || "" == costCheckFlag) {
         if (null == costCheckFlag || "" == costCheckFlag) {
             alertx("成本价未填写,请编辑成本价后再审核");
             alertx("成本价未填写,请编辑成本价后再审核");
@@ -1025,7 +1025,7 @@
             }
             }
         } else if (costCheckFlag == 2) {
         } else if (costCheckFlag == 2) {
             //比例成
             //比例成
-            if (null == costProportional || "" == costProportional) {
+            if (null == shopPercent || "" == shopPercent) {
                 alertx("成本价未填写,请编辑成本价后再审核");
                 alertx("成本价未填写,请编辑成本价后再审核");
                 return;
                 return;
             }
             }

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

@@ -301,7 +301,7 @@
                             <a href="${ctx}/product/hehe/edit?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/hehe/edit?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="javascript:void(0);" data-productid="${product.id}" data-preferred="${product.preferredFlag}" onclick="settingApplets($(this))">小程序配置</a>
                             <a href="javascript:void(0);" data-productid="${product.id}" data-preferred="${product.preferredFlag}" onclick="settingApplets($(this))">小程序配置</a>
                             <c:if test="${product.validFlag eq 1 or product.validFlag eq 8}">
                             <c:if test="${product.validFlag eq 1 or product.validFlag eq 8}">
-                                <a class="red" href="javascript:void(0);" onclick="auditThis(${product.id},'${product.brand.name}',${product.brand.status},'${product.costCheckFlag}','${product.costPrice}','${product.costProportional}')">审核</a>
+                                <a class="red" href="javascript:void(0);" onclick="auditThis(${product.id},'${product.brand.name}',${product.brand.status},'${product.costCheckFlag}','${product.costPrice}','${product.shopPercent}')">审核</a>
                             </c:if>
                             </c:if>
                             <c:if test="${product.validFlag ne 9}">
                             <c:if test="${product.validFlag ne 9}">
                                 <a class="red" href="javascript:void(0);" onclick="validChange(${product.id}, 9)">冻结</a>
                                 <a class="red" href="javascript:void(0);" onclick="validChange(${product.id}, 9)">冻结</a>
@@ -419,7 +419,7 @@
     }
     }
 
 
     // 审核(二手)
     // 审核(二手)
-    function auditThisBySencodeProduct(id,costPrice,price,costProportional){
+    function auditThisBySencodeProduct(id,costPrice,price,shopPercent){
 
 
         var html = "<div id='auditBox'>"
         var html = "<div id='auditBox'>"
             + "<div class='bd-row'>"
             + "<div class='bd-row'>"
@@ -439,7 +439,7 @@
         var submit = function (v, h, f) {
         var submit = function (v, h, f) {
             console.log(f.validFlag)
             console.log(f.validFlag)
             if(f.validFlag ==2) {
             if(f.validFlag ==2) {
-                if (((costPrice == 0.00 || costPrice == undefined) && (price == undefined || price == '')) || ((costProportional == '' || costProportional == undefined) && (price == undefined || price == ''))) {
+                if (((costPrice == 0.00 || costPrice == undefined) && (price == undefined || price == '')) || ((shopPercent == '' || shopPercent == undefined) && (price == undefined || price == ''))) {
                     $.jBox(htmls, {title: "提示"});
                     $.jBox(htmls, {title: "提示"});
                     // $.jBox.tip("审核通过前请先填写交易价和成本", 'error', {focusId: "validFlag"});
                     // $.jBox.tip("审核通过前请先填写交易价和成本", 'error', {focusId: "validFlag"});
                     return false;
                     return false;
@@ -466,7 +466,7 @@
     }
     }
 
 
     // 审核(正常)
     // 审核(正常)
-    function auditThis(id,name,status,costCheckFlag,costPrice,costProportional) {
+    function auditThis(id,name,status,costCheckFlag,costPrice,shopPercent) {
         // 商品成本判断
         // 商品成本判断
         if(null == costCheckFlag || "" == costCheckFlag){
         if(null == costCheckFlag || "" == costCheckFlag){
             alertx("成本价未填写,请编辑成本价后再审核");
             alertx("成本价未填写,请编辑成本价后再审核");
@@ -479,7 +479,7 @@
             }
             }
         }else if(costCheckFlag == 2){
         }else if(costCheckFlag == 2){
             //比例成
             //比例成
-            if(null == costProportional || "" == costProportional){
+            if(null == shopPercent || "" == shopPercent){
                 alertx("成本价未填写,请编辑成本价后再审核");
                 alertx("成本价未填写,请编辑成本价后再审核");
                 return;
                 return;
             }
             }

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

@@ -401,7 +401,7 @@
                                 成本价格:¥${sku.costPrice}
                                 成本价格:¥${sku.costPrice}
                             </c:if>
                             </c:if>
                             <c:if test="${sku.costCheckFlag eq 2}">
                             <c:if test="${sku.costCheckFlag eq 2}">
-                                成本比例:${sku.costProportional}%
+                                成本比例:${sku.shopPercent}%
                             </c:if>
                             </c:if>
                         </td>
                         </td>
                     </tr>
                     </tr>
@@ -606,4 +606,4 @@
     }
     }
 </script>
 </script>
 </body>
 </body>
-</html>
+</html>

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

@@ -37,7 +37,7 @@
                             return false;
                             return false;
                         }
                         }
                     } else {
                     } else {
-                        if ($("#costProportional").val() == '') {
+                        if ($("#shopPercent").val() == '') {
                             alertx("请输入成本比例");
                             alertx("请输入成本比例");
                             return false;
                             return false;
                         }
                         }
@@ -470,8 +470,8 @@
         <label class="control-label"><font color="red">*</font>比例成本百分比:</label>
         <label class="control-label"><font color="red">*</font>比例成本百分比:</label>
         <div class="controls">
         <div class="controls">
             <input style="padding-left: 7px;padding-top: 8px;border-radius: 4px;background: white;border: 1px solid #ccc;padding-right: 5px"
             <input style="padding-left: 7px;padding-top: 8px;border-radius: 4px;background: white;border: 1px solid #ccc;padding-right: 5px"
-                   id="costProportional" name="costProportional"
-                   value="<fmt:formatNumber type='number' value='${cmSecondHandDetail.costProportional}' pattern='0.00'/>"
+                   id="shopPercent" name="shopPercent"
+                   value="<fmt:formatNumber type='number' value='${cmSecondHandDetail.shopPercent}' pattern='0.00'/>"
                    onkeyup="num(this)" class="input-xlarge"/> %
                    onkeyup="num(this)" class="input-xlarge"/> %
         </div>
         </div>
     </div>
     </div>

+ 3 - 3
src/main/webapp/WEB-INF/views/modules/product/cmSecondHandDetailForm.jsp

@@ -40,7 +40,7 @@
                             return false;
                             return false;
                         }
                         }
                     } else {
                     } else {
-                        if ($("#costProportional").val() == '') {
+                        if ($("#shopPercent").val() == '') {
                             alertx("请输入成本比例");
                             alertx("请输入成本比例");
                             return false;
                             return false;
                         }
                         }
@@ -475,8 +475,8 @@
         <label class="control-label"><font color="red">*</font>比例成本百分比:</label>
         <label class="control-label"><font color="red">*</font>比例成本百分比:</label>
         <div class="controls">
         <div class="controls">
             <input style="padding-left: 7px;padding-top: 8px;border-radius: 4px;background: white;border: 1px solid #ccc;padding-right: 5px"
             <input style="padding-left: 7px;padding-top: 8px;border-radius: 4px;background: white;border: 1px solid #ccc;padding-right: 5px"
-                   id="costProportional" name="costProportional"
-                   value="<fmt:formatNumber type='number' value='${cmSecondHandDetail.costProportional}' pattern='0.00'/>"
+                   id="shopPercent" name="shopPercent"
+                   value="<fmt:formatNumber type='number' value='${cmSecondHandDetail.shopPercent}' pattern='0.00'/>"
                    onkeyup="num(this)" class="input-xlarge"/> %
                    onkeyup="num(this)" class="input-xlarge"/> %
         </div>
         </div>
     </div>
     </div>

+ 3 - 3
src/main/webapp/WEB-INF/views/modules/product/productForm.jsp

@@ -32,7 +32,7 @@
 	</ul><br/>
 	</ul><br/>
 	<form:form id="inputForm" modelAttribute="product" action="${ctx}/product/product/save" method="post" class="form-horizontal">
 	<form:form id="inputForm" modelAttribute="product" action="${ctx}/product/product/save" method="post" class="form-horizontal">
 		<form:hidden path="id"/>
 		<form:hidden path="id"/>
-		<sys:message content="${message}"/>		
+		<sys:message content="${message}"/>
 		<div class="control-group">
 		<div class="control-group">
 			<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>productID:</label>
 			<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>productID:</label>
 			<div class="controls">
 			<div class="controls">
@@ -638,7 +638,7 @@
 		<div class="control-group">
 		<div class="control-group">
 			<label class="control-label">比例成本百分比:</label>
 			<label class="control-label">比例成本百分比:</label>
 			<div class="controls">
 			<div class="controls">
-				<form:input path="costProportional" htmlEscape="false" class="input-xlarge "/>
+				<form:input path="shopPercent" htmlEscape="false" class="input-xlarge "/>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
@@ -686,4 +686,4 @@
 		</div>
 		</div>
 	</form:form>
 	</form:form>
 </body>
 </body>
-</html>
+</html>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/product/toSelectAddOrganizeProduct.jsp

@@ -136,7 +136,7 @@
 					</c:if>
 					</c:if>
 					<c:if test="${item.costCheckFlag ne 1}">
 					<c:if test="${item.costCheckFlag ne 1}">
 						<%--会员价格*比例成本--%>
 						<%--会员价格*比例成本--%>
-						<input  id="costPrice${item.productID}" name="costPrice${item.productID}" style="width:80px;" value="<fmt:formatNumber value="${item.costProportional * item.price / 100}" type="currency" pattern="0.00"/>"  onkeyup="num(this)"  ></td>
+						<input  id="costPrice${item.productID}" name="costPrice${item.productID}" style="width:80px;" value="<fmt:formatNumber value="${item.shopPercent * item.price / 100}" type="currency" pattern="0.00"/>"  onkeyup="num(this)"  ></td>
 					</c:if>
 					</c:if>
 				</td>
 				</td>
 				<%--星范售价默认为会所价--%>
 				<%--星范售价默认为会所价--%>

+ 3 - 3
src/main/webapp/WEB-INF/views/modules/svip/cmSvipProductForm.jsp

@@ -95,7 +95,7 @@
     <%--		<div class="control-group" style="display: ${cmSvipProduct.costCheckFlag eq '1'?'none':''}">--%>
     <%--		<div class="control-group" style="display: ${cmSvipProduct.costCheckFlag eq '1'?'none':''}">--%>
     <%--			<label class="control-label">比例成本百分比:</label>--%>
     <%--			<label class="control-label">比例成本百分比:</label>--%>
     <%--			<div class="controls">--%>
     <%--			<div class="controls">--%>
-    <%--                <label class="showLabel">${cmSvipProduct.costProportional}%</label>--%>
+    <%--                <label class="showLabel">${cmSvipProduct.shopPercent}%</label>--%>
     <%--            </div>--%>
     <%--            </div>--%>
     <%--		</div>--%>
     <%--		</div>--%>
     <%--		<div class="control-group">--%>
     <%--		<div class="control-group">--%>
@@ -162,7 +162,7 @@
                     <td>${sku.unit}</td>
                     <td>${sku.unit}</td>
                     <td>${sku.price}</td>
                     <td>${sku.price}</td>
                     <td>${1 eq sku.costCheckFlag?"固定成本":"比例成本"}</td>
                     <td>${1 eq sku.costCheckFlag?"固定成本":"比例成本"}</td>
-                    <td>${1 eq sku.costCheckFlag?sku.costPrice:sku.costProportional}</td>
+                    <td>${1 eq sku.costCheckFlag?sku.costPrice:sku.shopPercent}</td>
                     <td><input class="discount required" id="discount${sku.skuId}${s.index}"
                     <td><input class="discount required" id="discount${sku.skuId}${s.index}"
                                name="skus[${s.index}].discount" ${sku.priceType eq 2?'disabled':''}
                                name="skus[${s.index}].discount" ${sku.priceType eq 2?'disabled':''}
                                onchange="changeDiscount(${sku.skuId},1,${s.index})" type="number" maxlength="11"
                                onchange="changeDiscount(${sku.skuId},1,${s.index})" type="number" maxlength="11"
@@ -270,4 +270,4 @@
     // }
     // }
 </script>
 </script>
 </body>
 </body>
-</html>
+</html>

+ 4 - 4
src/main/webapp/WEB-INF/views/modules/weisha/cmOrganizeProductForm.jsp

@@ -143,14 +143,14 @@
 					<td style="text-align: center">
 					<td style="text-align: center">
 						<input type="number" class="sku_minNum" value="${sku.minBuyNumber}" style="width: 100px"/>
 						<input type="number" class="sku_minNum" value="${sku.minBuyNumber}" style="width: 100px"/>
 					</td>
 					</td>
-					<td style="text-align: center">${sku.clubPrice eq null?"":sku.clubPrice}</td>
+					<td style="text-align: center">${sku.price eq null?"":sku.price}</td>
 					<td style="text-align: center">${sku.costCheckFlag == 1?"固定成本":sku.costCheckFlag == 2?"比例成本":""}</td>
 					<td style="text-align: center">${sku.costCheckFlag == 1?"固定成本":sku.costCheckFlag == 2?"比例成本":""}</td>
 					<td style="text-align: center">
 					<td style="text-align: center">
 						<c:if test="${sku.costCheckFlag == 1}">
 						<c:if test="${sku.costCheckFlag == 1}">
-							¥&nbsp;&nbsp;${sku.costPrice}
+							¥&nbsp;&nbsp;${sku.price}
 						</c:if>
 						</c:if>
 						<c:if test="${sku.costCheckFlag == 2}">
 						<c:if test="${sku.costCheckFlag == 2}">
-							${sku.costProportional}%
+							${sku.shopPercent}%
 						</c:if>
 						</c:if>
 					</td>
 					</td>
 					<td style="text-align: center">
 					<td style="text-align: center">
@@ -265,7 +265,7 @@
     <div class="control-group" id="costPropShow">
     <div class="control-group" id="costPropShow">
         <label class="control-label">比例成本百分比:</label>
         <label class="control-label">比例成本百分比:</label>
         <div class="controls">
         <div class="controls">
-            <form:input path="costProportional" htmlEscape="false"  maxlength="11" class="short  number" /> %
+            <form:input path="shopPercent" htmlEscape="false"  maxlength="11" class="short  number" /> %
         </div>
         </div>
     </div>--%>
     </div>--%>
 	<div class="form-actions">
 	<div class="form-actions">

+ 10 - 10
src/main/webapp/static/modules/bulkpurchase/orderForm.js

@@ -1621,8 +1621,8 @@ function taxRateVal(index) {
     var costCheckFlag = $checkItem["costCheckFlag"] == undefined ? 1 : $checkItem[
     var costCheckFlag = $checkItem["costCheckFlag"] == undefined ? 1 : $checkItem[
         "costCheckFlag"]; //成本价选中标志:1固定成本 2比例成  11
         "costCheckFlag"]; //成本价选中标志:1固定成本 2比例成  11
     var costPrice = $checkItem["costPrice"] == undefined ? 0.0 : $checkItem["costPrice"]; //成本价  11
     var costPrice = $checkItem["costPrice"] == undefined ? 0.0 : $checkItem["costPrice"]; //成本价  11
-    var costProportional = $checkItem["costProportional"] == undefined ? 90 : $checkItem[
-        "costProportional"]; //比例成本百分比90%  11
+    var shopPercent = $checkItem["shopPercent"] == undefined ? 90 : $checkItem[
+        "shopPercent"]; //比例成本百分比90%  11
     var oldProductFlag = $checkItem["oldProductFlag"] == undefined ? 0 : $checkItem["oldProductFlag"]; //旧商品标志,0否1是
     var oldProductFlag = $checkItem["oldProductFlag"] == undefined ? 0 : $checkItem["oldProductFlag"]; //旧商品标志,0否1是
     var obj1 = document.getElementById("priceLabel" + index); //选择商品页面商品单价
     var obj1 = document.getElementById("priceLabel" + index); //选择商品页面商品单价
     var obj2 = document.getElementById("price"); //设置商品页面商品单价
     var obj2 = document.getElementById("price"); //设置商品页面商品单价
@@ -1731,8 +1731,8 @@ function taxRateVal(index) {
                 //计算总价
                 //计算总价
                 var totalFee = parseFloat(((touchPrice * 100000 * numVal) / 100000).toFixed(2));
                 var totalFee = parseFloat(((touchPrice * 100000 * numVal) / 100000).toFixed(2));
                 //计算成本价
                 //计算成本价
-                if (costCheckFlag == 2 && costProportional != null) {
-                    costPrice = parseFloat((((touchPrice * costProportional) / 100).toFixed(2)));
+                if (costCheckFlag == 2 && shopPercent != null) {
+                    costPrice = parseFloat((((touchPrice * shopPercent) / 100).toFixed(2)));
                 }
                 }
                 if (price != null) {
                 if (price != null) {
                     price.style.cssText = "text-decoration: line-through";
                     price.style.cssText = "text-decoration: line-through";
@@ -1742,8 +1742,8 @@ function taxRateVal(index) {
             } else {
             } else {
                 var totalFee = parseFloat(((discountPrice * 100000 * numVal) / 100000).toFixed(2));
                 var totalFee = parseFloat(((discountPrice * 100000 * numVal) / 100000).toFixed(2));
                 //计算成本价
                 //计算成本价
-                if (costCheckFlag == 2 && costProportional != null) {
-                    costPrice = parseFloat((((discountPrice * costProportional) / 100).toFixed(2)));
+                if (costCheckFlag == 2 && shopPercent != null) {
+                    costPrice = parseFloat((((discountPrice * shopPercent) / 100).toFixed(2)));
                 }
                 }
                 if (price != null) {
                 if (price != null) {
                     price.style.cssText = "";
                     price.style.cssText = "";
@@ -1841,8 +1841,8 @@ function taxRateVal(index) {
                     //税费=商品总额*税率【税率:(4舍5入保留2位小数)】
                     //税费=商品总额*税率【税率:(4舍5入保留2位小数)】
                     var totalAddedValueTax = (totalTax * taxRate * 0.01).toFixed(2);
                     var totalAddedValueTax = (totalTax * taxRate * 0.01).toFixed(2);
                     //计算成本价
                     //计算成本价
-                    if (costCheckFlag == 2 && costProportional != null) {
-                        costPrice = (((parseFloat(touchPrice) + parseFloat(addedValueTax)) * costProportional) / 100)
+                    if (costCheckFlag == 2 && shopPercent != null) {
+                        costPrice = (((parseFloat(touchPrice) + parseFloat(addedValueTax)) * shopPercent) / 100)
                             .toFixed(2);
                             .toFixed(2);
                     }
                     }
                     //计算总价(存在折扣)【总价=[折后单价 x 数量](4舍5入保留2位小数) + 税费 】
                     //计算总价(存在折扣)【总价=[折后单价 x 数量](4舍5入保留2位小数) + 税费 】
@@ -1863,8 +1863,8 @@ function taxRateVal(index) {
                     //机构税费=商品总额*税率【税率:(4舍5入保留2位小数)】
                     //机构税费=商品总额*税率【税率:(4舍5入保留2位小数)】
                     var totalAddedValueTax = (totalTax * taxRate * 0.01).toFixed(2);
                     var totalAddedValueTax = (totalTax * taxRate * 0.01).toFixed(2);
                     //计算成本价
                     //计算成本价
-                    if (costCheckFlag == 2 && costProportional != null) {
-                        costPrice = ((((parseFloat(discountPrice) + parseFloat(addedValueTax))) * costProportional) /
+                    if (costCheckFlag == 2 && shopPercent != null) {
+                        costPrice = ((((parseFloat(discountPrice) + parseFloat(addedValueTax))) * shopPercent) /
                             100).toFixed(2);
                             100).toFixed(2);
                     }
                     }