浏览代码

自营商城

huangzhiguo 1 年之前
父节点
当前提交
36b6be00a6

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

@@ -75,7 +75,7 @@ public class NewOrderProduct extends DataEntity<NewOrderProduct> {
     private Integer orderPromotionsId; //` INT(11) NULL   COMMENT '订单促销id
     private String image; // 商品图片
     private Double discountFee; //协销订单:经理折扣(平摊到每个商品上,  按照每种商品的总价占订单总价的比例来均分);普通订单 无'
-    private String productUnit;
+    private String productUnit; // sku规格
     private String productImage;
     private String shopFee1; // 单个应付供应商金额
     private String otherFee1; // 单个应付第三方金额
@@ -87,6 +87,8 @@ public class NewOrderProduct extends DataEntity<NewOrderProduct> {
     private Integer deliveryNum; // 发货数量
     private Integer outStoreTimes;  // 发货批次
     private Double costPrice; // 成本价(快照商品成本价格)
+    private Double organizeCostPrice; // 集团成本价
+    private Double cmCostPrice; // 采美成本价
     private Integer stock; // 库存
     private Integer status; // 状态
     private String logisticsBatchID; // 发货批次ID
@@ -94,7 +96,9 @@ public class NewOrderProduct extends DataEntity<NewOrderProduct> {
     private List<NewCmFinanceReceipts> newCmFinanceReceiptsList; //订单商品id对应一个进账记录  订单id对应多个
     private String splitFlag;//订单商品是否可拆分   1可拆分(不可以进账确认) 0不可拆分----统计子订单中的
     private String costCheckFlag; //成本价选中标志:1固定成本 2比例成
-    private Double shopPercent;//比例成本百分比
+    private Double shopPercent;//供应商成本百分比
+    private Double organizePercent;//集团百分比
+    private Double cmPercent;//采美百分比
     private Integer heUserId; //分销者id(呵呵商城订单使用)
     private String heUserName; //分销者名称
     private List<CmProductSn> cmProductSnList; //(重光电/轻光电)SN码
@@ -634,6 +638,22 @@ public class NewOrderProduct extends DataEntity<NewOrderProduct> {
         this.costPrice = costPrice;
     }
 
+    public Double getOrganizeCostPrice() {
+        return organizeCostPrice;
+    }
+
+    public void setOrganizeCostPrice(Double organizeCostPrice) {
+        this.organizeCostPrice = organizeCostPrice;
+    }
+
+    public Double getCmCostPrice() {
+        return cmCostPrice;
+    }
+
+    public void setCmCostPrice(Double cmCostPrice) {
+        this.cmCostPrice = cmCostPrice;
+    }
+
     @Transient
     public Integer getStock() {
         return stock;
@@ -767,6 +787,22 @@ public class NewOrderProduct extends DataEntity<NewOrderProduct> {
         this.shopPercent = shopPercent;
     }
 
+    public Double getOrganizePercent() {
+        return organizePercent;
+    }
+
+    public void setOrganizePercent(Double organizePercent) {
+        this.organizePercent = organizePercent;
+    }
+
+    public Double getCmPercent() {
+        return cmPercent;
+    }
+
+    public void setCmPercent(Double cmPercent) {
+        this.cmPercent = cmPercent;
+    }
+
     public List<CmProductSn> getCmProductSnList() {
         return cmProductSnList;
     }

+ 62 - 3
src/main/java/com/caimei/modules/order/web/CmPayShopController.java

@@ -49,7 +49,7 @@ import java.util.concurrent.atomic.AtomicReference;
 @Controller
 @RequestMapping(value = "${adminPath}/order/cmPayShop")
 public class CmPayShopController extends BaseController {
-    
+
     @Resource
     private RedisService redisService;
     @Resource
@@ -304,6 +304,8 @@ public class CmPayShopController extends BaseController {
             for (NewOrderProduct product : newOrderProducts) {
                 Integer orderProductID = product.getOrderProductID();
                 Double costPrice = product.getCostPrice() == null ? 0d : product.getCostPrice();
+                Double organizeCostPrice = product.getOrganizeCostPrice() == null ? 0d : product.getOrganizeCostPrice();
+                Double cmCostPrice = product.getCmCostPrice() == null ? 0d : product.getCmCostPrice();
                 if (soZeroCostFlag && costPrice > 0) {
                     soZeroCostFlag = false;
                 }
@@ -335,6 +337,8 @@ public class CmPayShopController extends BaseController {
                 }
 
                 orderProduct.setCostPrice(costPrice);
+                orderProduct.setOrganizeCostPrice(organizeCostPrice);
+                orderProduct.setCmCostPrice(cmCostPrice);
                 orderProduct.setSupplierTaxRate(supplierTaxRate);
                 orderProduct.setSingleShouldPayTotalTax(singleShouldPayTotalTax);
                 orderProducts.add(orderProduct);
@@ -360,7 +364,62 @@ public class CmPayShopController extends BaseController {
         }
         // 比例成本
         if ("2".equals(costType)) {
-            // 保存修改之前的记录
+            for (NewOrderProduct product : newOrderProducts) {
+                Integer orderProductID = product.getOrderProductID();
+                Double costPrice = product.getCostPrice() == null ? 0d : product.getCostPrice();
+                if (soZeroCostFlag && costPrice > 0) {
+                    soZeroCostFlag = false;
+                }
+                Double singleShouldPayTotalTax = product.getSingleShouldPayTotalTax() == null ? 0d : product.getSingleShouldPayTotalTax();
+                Double supplierTaxRate = product.getSupplierTaxRate() == null ? 0d : product.getSupplierTaxRate();
+                // 获取已被退款的商品数量
+                Integer returnNum = newOrderProductDao.CountReturnedPurchaseProduct(Integer.parseInt(shopOrderID), orderProductID);
+                returnNum = returnNum == null ? 0 : returnNum;
+                NewOrderProduct orderProduct = newOrderProductService.get(String.valueOf(orderProductID));
+                // 修改前
+                if (StringUtils.isEmpty(dbcostType)) {
+                    CmChangePayShopProduct cmChangePayShopProduct = new CmChangePayShopProduct();
+                    cmChangePayShopProduct.setRecondType("1");
+                    cmChangePayShopProduct.setChangeType("1");
+                    cmChangePayShopProduct.setChangePayShopId(Integer.parseInt(cmChangePayShopRecondId));
+                    cmChangePayShopProduct.setOrderProductId(orderProductID);
+                    cmChangePayShopProduct.setOrderProductName(product.getName());
+                    cmChangePayShopProduct.setSupplierTaxRate(orderProduct.getSupplierTaxRate());
+                    cmChangePayShopProduct.setCostPrice(orderProduct.getNewCostPrice());
+                    cmChangePayShopProduct.setSingleShouldPayTotalTax(orderProduct.getSingleShouldPayTotalTax());
+                    cmChangePayShopProductService.save(cmChangePayShopProduct);
+                }
+                // 设置比例
+                orderProduct.setShopPercent(product.getShopPercent());
+                orderProduct.setOrganizePercent(product.getOrganizePercent());
+                orderProduct.setCmPercent(product.getCmPercent());
+                //售价
+                Double price = orderProduct.getTouchPrice() == null ? orderProduct.getDiscountPrice() : orderProduct.getTouchPrice();
+                // 成本 = 售价 * 供应商比例
+                orderProduct.setCostPrice(price * product.getShopPercent() / 100);
+                orderProduct.setSupplierTaxRate(supplierTaxRate);
+                orderProduct.setSingleShouldPayTotalTax(singleShouldPayTotalTax);
+                int num = orderProduct.getNum() == null ? 0 : orderProduct.getNum();
+                int presentNum = orderProduct.getPresentNum() == null ? 0 : orderProduct.getPresentNum();
+                totalCostFee += (num + presentNum - returnNum) * costPrice;
+                orderProduct.setShouldPayTotalTax(singleShouldPayTotalTax * (num + presentNum - returnNum));
+                totalTaxesFee += singleShouldPayTotalTax * (num + presentNum - returnNum);
+                orderProducts.add(orderProduct);
+                // 修改后
+                CmChangePayShopProduct cmChangePayShopProduct = new CmChangePayShopProduct();
+                cmChangePayShopProduct.setRecondType("2");
+                cmChangePayShopProduct.setChangeType(costType);
+                cmChangePayShopProduct.setChangePayShopId(Integer.parseInt(cmChangePayShopRecondId2));
+                cmChangePayShopProduct.setOrderProductId(orderProductID);
+                cmChangePayShopProduct.setOrderProductName(product.getName());
+                cmChangePayShopProduct.setSupplierTaxRate(supplierTaxRate);
+                cmChangePayShopProduct.setCostPrice(product.getCostPrice());
+                cmChangePayShopProduct.setSingleShouldPayTotalTax(product.getSingleShouldPayTotalTax());
+                cmChangePayShopProductService.save(cmChangePayShopProduct);
+            }
+            shopOrder.setShopTaxFee(totalTaxesFee); //总税费
+            shopOrder.setShopProductAmount(totalCostFee); //商品费
+            /*// 保存修改之前的记录
             List<NewOrderProduct> orderProductList = newOrderProductService.getListByShopOrderID(Integer.parseInt(shopOrderID));
             if (CollectionUtils.isNotEmpty(orderProductList)) {
                 for (NewOrderProduct orderProduct : orderProductList) {
@@ -390,7 +449,7 @@ public class CmPayShopController extends BaseController {
             shopOrder.setProportional(proportional);
             shopOrder.setShopTaxFee(0D); //总税费
             Double productAmount = shopOrder.getProductAmount();//子订单金额
-            shopOrder.setShopProductAmount(productAmount * proportional / 100); //商品费
+            shopOrder.setShopProductAmount(productAmount * proportional / 100); //商品费*/
 
         }
         shopOrder.setPayStatus(soZeroCostFlag ? "3" : "1");

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

@@ -25,6 +25,8 @@ public class CmSku extends DataEntity<CmSku> {
     private Integer costCheckFlag;        // 成本价选中标志:1固定成本 2比例成本
     private Double shopPercent;        // 比例成本百分比
     private Double costPrice;        // 成本价
+    private Double OrganizeCostPrice;        // 成本价
+    private Double cmCostPrice;        // 成本价
     private Double price;        // 机构价
     private Integer ladderPriceFlag;        // 启用阶梯价格标识 0否 1是
     private Integer minBuyNumber;        // 无阶梯价起订量
@@ -156,6 +158,22 @@ public class CmSku extends DataEntity<CmSku> {
         this.costPrice = costPrice;
     }
 
+    public Double getOrganizeCostPrice() {
+        return OrganizeCostPrice;
+    }
+
+    public void setOrganizeCostPrice(Double organizeCostPrice) {
+        OrganizeCostPrice = organizeCostPrice;
+    }
+
+    public Double getCmCostPrice() {
+        return cmCostPrice;
+    }
+
+    public void setCmCostPrice(Double cmCostPrice) {
+        this.cmCostPrice = cmCostPrice;
+    }
+
     public Double getPrice() {
         return price;
     }

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

@@ -672,7 +672,7 @@ public class ProductService extends CrudService<ProductDao, Product> {
     public List<CmSku> findSkuList(Integer productID) {
         List<CmSku> skus = productDao.findSkuListProduct(productID);
         skus.forEach(s -> {
-            s.setCostCheckFlag(2);
+            //s.setCostCheckFlag(2);
             s.ladderPriceList(productDao.findLadderPriceBySku(s.skuId()));
         });
 

+ 12 - 1
src/main/resources/mappings/modules/order/OrderProductMapper.xml

@@ -477,6 +477,11 @@
     <update id="updateProductFee">
         UPDATE cm_order_product
         SET costPrice               = #{costPrice},
+            organizeCostPrice       = #{organizeCostPrice},
+            cmCostPrice             = #{cmCostPrice},
+            shopPercent             = #{shopPercent},
+            organizePercent         = #{organizePercent},
+            cmPercent               = #{cmPercent},
             supplierTaxRate         = #{supplierTaxRate},
             shouldPayTotalTax       = #{shouldPayTotalTax},
             singleShouldPayTotalTax = #{singleShouldPayTotalTax}
@@ -544,7 +549,6 @@
                cop.totalFee                AS totalFee,
                cop.shouldPayTotalTax       AS shouldPayTotalTax,
                cop.shopProductAmount       AS shopProductAmount,
-               cop.costPrice               AS costPrice,
                cop.singleShouldPayTotalTax AS singleShouldPayTotalTax,
                cop.taxRate                 AS taxRate,
                cop.supplierTaxRate         AS supplierTaxRate,
@@ -554,6 +558,13 @@
                cop.productType             AS productType,
                cop.totalAddedValueTax      AS totalAddedValueTax,
                cs.organizeId      AS organizeId,
+               cs.unit as productUnit,
+               cop.costPrice               AS costPrice,
+               cop.organizeCostPrice       AS organizeCostPrice,
+               cop.cmCostPrice             AS cmCostPrice,
+               cop.shopPercent,
+               cop.organizePercent,
+               cop.cmPercent,
                cpo.touchPrice              AS touchPrice
         from cm_order_product cop
                  left join cm_sku cs on cop.skuId = cs.skuId and cs.organizeId=cop.organizeId

+ 8 - 0
src/main/resources/mappings/modules/product/ProductMapper.xml

@@ -1053,6 +1053,8 @@
          ladderPriceFlag,
          costCheckFlag,
          costprice,
+         organizeCostPrice,
+         cmCostPrice,
          stock,
          shopPercent,
          organizePercent,
@@ -1066,6 +1068,8 @@
                 #{ladderPriceFlag},
                 #{costCheckFlag},
                 #{costPrice},
+                #{organizeCostPrice},
+                #{cmCostPrice},
                 #{stock},
                 #{shopPercent},
                 #{organizePercent},
@@ -1094,6 +1098,8 @@
                 #{stock},
                 #{minBuyNumber},
                 #{unit},
+                #{organizeCostPrice},
+                #{cmCostPrice},
                 #{organizePercent},
                 #{shopPercent},
                 #{cmPercent})
@@ -1714,6 +1720,8 @@
             organizePercent=#{organizePercent},
             cmPercent=#{cmPercent},
             costPrice=#{costPrice},
+            organizeCostPrice = #{organizeCostPrice},
+            cmCostPrice = #{cmCostPrice},
             costCheckFlag=#{costCheckFlag},
             stock=#{stock},
             unit=#{unit},

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

@@ -39,14 +39,14 @@
 <body>
 	<ul class="nav nav-tabs">
 		<li class="active"><a href="${ctx}/order/cmPayShop/">付款列表</a></li>
-		<shiro:hasPermission name="order:cmPayShop:view">
+		<%--<shiro:hasPermission name="order:cmPayShop:view">
             <li onclick="sessionStorage.removeItem('checkedIndexArr')"><a href="${ctx}/shopOrder/payOrderList?operatingMode=1">申请付款</a></li>
 			<li onclick="sessionStorage.removeItem('checkedIndexArr')"><a href="${ctx}/shopOrder/payOrderList?operatingMode=3">已付款子订单</a></li>
 		</shiro:hasPermission>
 		<shiro:hasPermission name="order:cmPayShop:split">
 			<li><a href="${ctx}/shopOrder/splitList">子订单手动分账</a></li>
 		</shiro:hasPermission>
-		<li><a href="${ctx}/shopOrder/settlement">子订单手动结算</a></li>
+		<li><a href="${ctx}/shopOrder/settlement">子订单手动结算</a></li>--%>
 	</ul>
 	<form:form id="searchForm" modelAttribute="cmPayShop" action="${ctx}/order/cmPayShop/" method="post" class="breadcrumb form-search">
 		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>

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

@@ -163,7 +163,7 @@
 </head>
 <body>
 <ul class="nav nav-tabs">
-		<li><a href="${ctx}/order/cmPayShop">付款列表</a></li>
+<%--		<li><a href="${ctx}/order/cmPayShop">付款列表</a></li>--%>
 		<li><a href="${ctx}/shopOrder/payOrderList?operatingMode=1">申请付款</a></li>
 		<li class="active"><a href="${ctx}/shopOrder/toChangePayShopAmount?costType=1&shopOrderID=${shopOrderId}">修改成本</a></li>
 </ul>
@@ -185,10 +185,12 @@
 			<input id="orderID" type="hidden"  name="orderID" value="${newShopOrder.orderID}">
 			<input id="productAmount" type="hidden"  name="productAmount" value="${newShopOrder.productAmount}">
 				<label style="color:red">注意:计算成本时请注意,含税商品的成本包括税费,无需另外计算税费</label>
-				<table class="table table-striped table-bordered table-condensed"  style="width: 800px">
+				<table class="table table-striped table-bordered table-condensed"  style="width: 70%">
 					<tr>
 						<td>商品名</td>
-						<td>成本(单)</td>
+						<td>供应商成本(单)</td>
+						<td>集团成本(单)</td>
+						<td>采美成本(单)</td>
 						<td>供应商税率</td>
 						<td>供应商税费(单)</td>
 					</tr>
@@ -208,6 +210,8 @@
 												</label>
 											</c:if>
 										</td>
+										<td><input id="organizeCostPrice"  style="width: 80px;float: left" name="newOrderProducts[${index.index}].organizeCostPrice" value="${product.organizeCostPrice}"/></td>
+										<td><input id="cmCostPrice"  style="width: 80px;float: left" name="newOrderProducts[${index.index}].cmCostPrice" value="${product.cmCostPrice}"/></td>
 										<td width="20%">
 											<c:choose>
 												<c:when test="${product.includedTax ne '' and product.includedTax eq 0 and product.invoiceType ne 1 and product.invoiceType ne 2}">

+ 123 - 14
src/main/webapp/WEB-INF/views/modules/order/cmPayShopChange1.jsp

@@ -120,21 +120,54 @@
         }
 	</style>
 	<script type="text/javascript">
+        var orderProducts = new Array();
         $(document).ready(function() {
             $("#inputForm").validate({
                 ignore:"",
                 submitHandler: function(form){
-                var proportional = $("#proportional").val();// 子订单占比
-                var modifyShouldPayNote = $("#modifyShouldPayNote").val();//备注
-                if(null == proportional || ""  == proportional){
-                    alertx("比例不能为空");
-                    return false;
-                }
-                if(null == modifyShouldPayNote || ""  == modifyShouldPayNote){
-                    alertx("请填写备注内容");
-                    return false;
-                }
+                    var flag = setOrderProductInfo();
+                    // var proportional = $("#proportional").val();// 子订单占比
+                    var modifyShouldPayNote = $("#modifyShouldPayNote").val();//备注
+                    var shopPostFee = $("#shopPostFee").val();//供应商运费
+                    var shopOtherFee = $("#shopOtherFee").val();//付第三方
+                    /*if(null == proportional || ""  == proportional){
+                        alertx("比例不能为空");
+                        return false;
+                    }*/
+                    if(null == modifyShouldPayNote || ""  == modifyShouldPayNote){
+                        alertx("请填写备注内容");
+                        return false;
+                    }
+                    if (!flag) {
+                        top.$.jBox.confirm("每个商品三个比例之和需要等于100%", '提示');
+                        return false;
+                    }
+                    console.log('orderProducts',orderProducts)
                     loading('正在提交,请稍等...');
+                    <%--$.ajax({--%>
+                    <%--    url: '${ctx}/order/cmPayShop/saveChangePayShopAmount',--%>
+                    <%--    data: {--%>
+                    <%--        'id': ${shopOrderId},--%>
+                    <%--        'costType' : 2,--%>
+                    <%--        'modifyShouldPayNote' : modifyShouldPayNote,--%>
+                    <%--        'newOrderProducts' : orderProducts,--%>
+                    <%--        'shopPostFee' : shopPostFee,--%>
+                    <%--        'shopOtherFee' : shopOtherFee--%>
+                    <%--    },--%>
+                    <%--    type: 'POST',--%>
+                    <%--    async: false,--%>
+                    <%--    success: function (data) {--%>
+                    <%--        loading('修改比例成本失败');--%>
+                    <%--        setTimeout(function () {--%>
+                    <%--            window.location.href = "${ctx}/weisha/cmOrganizeProduct/?organizeId=${organizeId}&productName=${cmOrganizeProductFront.productName}&shopName=${cmOrganizeProductFront.shopName}&includedTax=${cmOrganizeProductFront.includedTax}&status=${cmOrganizeProduct.status}";--%>
+                    <%--        }, 1000);--%>
+                    <%--    },--%>
+                    <%--    error: function (json) {--%>
+                    <%--        alertx('输入有误,请先更正。', function () {--%>
+                    <%--            window.location.href = "${ctx}/shopOrder/toChangePayShopAmount?costType=2&shopOrderID=${shopOrderId}"--%>
+                    <%--        });--%>
+                    <%--    }--%>
+                    <%--})--%>
                     form.submit();
                 },
                 errorContainer: "#messageBox",
@@ -149,6 +182,43 @@
             });
 
         });
+        function setOrderProductInfo() {
+            var flag = true;
+            $('.tr_orderProduct').each(function (dom, index) {
+                var index = 0;
+                var that = $(this)
+                var num = that.find('.num').val()
+                num.attr('num', 'skuList[' + skuIndex + '].organizeId');
+                var presentNum = that.find('.presentNum').val()
+                var name = that.find('.name').val()
+                var orderProductID = that.find('.orderProductID').val()
+                var includedTax = that.find('.includedTax').val()
+                var productID = that.find('.productID').val()
+                var cmPercent = that.find('.cmPercent').val()
+                var organizePercent = that.find('.organizePercent').val()
+                var shopPercent = that.find('.shopPercent').val()
+                console.log('shopPercent'+shopPercent)
+                console.log('organizePercent'+organizePercent)
+                console.log('cmPercent'+cmPercent)
+                if (100 != (shopPercent*1 + organizePercent*1 + cmPercent*1)) {
+                    top.$.jBox.confirm("每个商品三个比例之和需要等于100%", '提示');
+                    flag = false;
+                    return;
+                }
+                orderProducts.push({
+                    'num': num,
+                    'presentNum': presentNum,
+                    'name': name,
+                    'includedTax': includedTax,
+                    'productID': productID,
+                    'orderProductID': orderProductID,
+                    'shopPercent': shopPercent,
+                    'organizePercent': organizePercent,
+                    'cmPercent': cmPercent,
+                })
+            })
+            return flag;
+        }
         function page(n,s){
             $("#pageNo").val(n);
             $("#pageSize").val(s);
@@ -162,7 +232,7 @@
 </head>
 <body>
 <ul class="nav nav-tabs">
-		<li><a href="${ctx}/order/cmPayShop">付款列表</a></li>
+		<%--<li><a href="${ctx}/order/cmPayShop">付款列表</a></li>--%>
 		<li><a href="${ctx}/shopOrder/payOrderList?operatingMode=1">申请付款</a></li>
 		<li class="active"><a href="${ctx}/shopOrder/toChangePayShopAmount?costType=2&shopOrderID=${shopOrderId}">修改应付</a></li>
 </ul>
@@ -182,8 +252,35 @@
                 <input id="shopOrderID" type="hidden"  name="shopOrderID" value="${newShopOrder.shopOrderID}">
                 <input id="orderID" type="hidden"  name="orderID" value="${newShopOrder.orderID}">
                 <input id="productAmount" type="hidden"  name="productAmount" value="${newShopOrder.productAmount}">
-                <table class="table table-striped table-bordered table-condensed" style="width: 450px">
-                    <tr>
+                <table class="table table-striped table-bordered table-condensed" style="width: 80%">
+                    <thead>
+                        <tr>
+                            <th hidden>订单商品Id</th>
+                            <th>商品名</th>
+                            <th>规格</th>
+                            <th>供应商比例</th>
+                            <th>集团比例</th>
+                            <th>采美比例</th>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <c:forEach var="product" items="${newShopOrder.newOrderProducts}" varStatus="index">
+                            <tr class="tr_orderProduct">
+                                <td hidden><input id="num" name="newOrderProducts[${index.index}].num" class="num" value="${product.num - product.returnedNum}"></td>
+                                <td hidden><input id="presentNum" name="newOrderProducts[${index.index}].presentNum" class="presentNum" value="${product.presentNum}"></td>
+                                <td hidden><input id="name" name="newOrderProducts[${index.index}].name" class="name" value="${product.name}"></td>
+                                <td hidden><input id="orderProductID" name="newOrderProducts[${index.index}].orderProductID" class="orderProductID" value="${product.orderProductID}"></td>
+                                <td hidden><input id="includedTax${index.index}" class="includedTax" value="${product.includedTax}"></td>
+                                <td hidden><input id="productID${index.index}" class="productID" value="${product.productID}"></td>
+                                <td>${product.name}</td>
+                                <td>${product.productUnit}</td>
+                                <td><input id="shopPercent" type="number" name="newOrderProducts[${index.index}].shopPercent" class="shopPercent" value="${product.shopPercent}" style="width: 100px"/> %</td>
+                                <td><input id="organizePercent" type="number" name="newOrderProducts[${index.index}].organizePercent" class="organizePercent" value="${product.organizePercent}" style="width: 100px"/> %</td>
+                                <td><input id="cmPercent" type="number" name="newOrderProducts[${index.index}].cmPercent" class="cmPercent" value="${product.cmPercent}" style="width: 100px"/> %</td>
+                            </tr>
+                        </c:forEach>
+                    </tbody>
+                    <%--<tr>
                         <td colspan="2">
                         <input type="hidden" id="shopOrderAmount" name="shopOrderAmount" value="${newShopOrder.productAmount}">
                             <font color="#6495ed"><b>子订单金额:</b>${newShopOrder.productAmount}</font>
@@ -205,7 +302,7 @@
                         <td>
                             <input type="number" id="shopPostFee" name="shopPostFee"  onchange="changeShouldPay(this)"  value="${newShopOrder.shopPostFee}" style="margin-left: 20px"/>
                         </td>
-                    </tr>
+                    </tr>--%>
                     <%--<tr>
                         <td>
                            <b>付第三方:</b>
@@ -219,6 +316,18 @@
 			</div>
 
 			<table>
+                <td>
+                    <b>供应商运费:</b>
+                </td>
+                <td>
+                    <input type="number" id="shopPostFee" name="shopPostFee"  onchange="changeShouldPay(this)"  value="${newShopOrder.shopPostFee}" style="margin-left: 20px"/>
+                </td>
+                <td>
+                    <b>付第三方:</b>
+                </td>
+                <td>
+                    <input type="number" id="shopOtherFee" name="shopOtherFee"  onchange="changeShouldPay(this)"  value="${newShopOrder.shopOtherFee}" style="margin-left: 20px"/>
+                </td>
 				<tr>
 					<td style="padding-top: 10px;">
 						<b>付供应商:</b><font color="red"><span id="div-supplier-fee">${newShopOrder.shouldPayShopAmount}</span></font>

+ 4 - 4
src/main/webapp/WEB-INF/views/modules/order/cmPayShopList.jsp

@@ -293,18 +293,18 @@
 <body>
 <ul class="nav nav-tabs">
     <c:if test="${operatingMode == '1'}">
-        <li><a href="${ctx}/order/cmPayShop">付款列表</a></li>
+        <%--<li><a href="${ctx}/order/cmPayShop">付款列表</a></li>--%>
         <li class="active tab-li"><a href="${ctx}/shopOrder/payOrderList?operatingMode=1">申请付款</a></li>
-        <li><a href="${ctx}/shopOrder/payOrderList?operatingMode=3">已付款子订单</a></li>
+        <%--<li><a href="${ctx}/shopOrder/payOrderList?operatingMode=3">已付款子订单</a></li>--%>
     </c:if>
-    <c:if test="${operatingMode == '2'}">
+    <%--<c:if test="${operatingMode == '2'}">
         <li><a href="${ctx}/order/cmRefundShop/">退款列表</a></li>
         <li class="active tab-li"><a href="${ctx}/shopOrder/refundRecordList?operatingMode=2">记录退款</a></li>
     </c:if>
     <shiro:hasPermission name="order:cmPayShop:split">
         <li><a href="${ctx}/shopOrder/splitList">子订单手动分账</a></li>
     </shiro:hasPermission>
-        <li><a href="${ctx}/shopOrder/settlement">子订单手动结算</a></li>
+        <li><a href="${ctx}/shopOrder/settlement">子订单手动结算</a></li>--%>
 </ul>
 <form:form id="searchForm" onsubmit="submitFunc()" modelAttribute="newShopOrder"
            action="${ctx}/shopOrder/payOrderList?operatingMode=${operatingMode

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

@@ -315,9 +315,9 @@
 				<div class="refund-wrapper">
 					欠款账簿
 					<input type="number" name="refundBalanceAmount" id="refundBalanceAmount" class="refund-amount" value="0">
-					<br>
+					<%--<br>
 					虚拟银行
-					<input type="number" name="refundAmount" id="refundAmount" class="refund-amount" value="0">
+					<input type="number" name="refundAmount" id="refundAmount" class="refund-amount" value="0">--%>
 				</div>
 				<%--<div class="refund-wrapper">
                     <select name="refundType" id="">

+ 4 - 4
src/main/webapp/WEB-INF/views/modules/order/paidShopOrderList.jsp

@@ -249,13 +249,13 @@
 </head>
 <body>
 <ul class="nav nav-tabs">
-    <li><a href="${ctx}/order/cmPayShop">付款列表</a></li>
-    <li><a href="${ctx}/shopOrder/payOrderList?operatingMode=1">申请付款</a></li>
+    <%--<li><a href="${ctx}/order/cmPayShop">付款列表</a></li>
+    <li><a href="${ctx}/shopOrder/payOrderList?operatingMode=1">申请付款</a></li>--%>
     <li class="active tab-li"><a href="${ctx}/shopOrder/payOrderList?operatingMode=3">已付款子订单</a></li>
-    <shiro:hasPermission name="order:cmPayShop:split">
+    <%--<shiro:hasPermission name="order:cmPayShop:split">
     <li><a href="${ctx}/shopOrder/splitList">子订单手动分账</a></li>
     </shiro:hasPermission>
-    <li><a href="${ctx}/shopOrder/settlement">子订单手动结算</a></li>
+    <li><a href="${ctx}/shopOrder/settlement">子订单手动结算</a></li>--%>
 </ul>
 <form:form id="searchForm" onsubmit="submitFunc()" modelAttribute="newShopOrder"
            action="${ctx}/shopOrder/payOrderList?operatingMode=${operatingMode

+ 13 - 3
src/main/webapp/WEB-INF/views/modules/product-new/productEdit.jsp

@@ -896,7 +896,7 @@
         </div>
         <div class="sku-item-li">
             <div class="sku-item sku-costCheckFlag">
-                <span class="red">*</span>成本:
+                <span class="red">*</span>成本类型
                 <label><input type="radio" name="costCheckFlag" value="1" checked/>固定成本</label>
                 <b class="line">|</b>
                 <label><input type="radio" name="costCheckFlag" value="2"/>比例成本</label>
@@ -904,7 +904,9 @@
             <div class="sku-item sku-costPrice">
                 <span class="red">*</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"/>
+                集团:<input style="width: 60px" name="OrganizeCostPrice" type="number" maxlength="11" class="short"/>
+                采美:<input style="width: 60px" name="cmCostPrice" type="number" maxlength="11" class="short"/>
             </div>
             <div class="sku-item sku-shopPercent" style="display: none;">
                 <span class="red">*</span>佣金比例:
@@ -2141,6 +2143,14 @@
         var costPrice = el.find('input[name$="costPrice"]');
         costPrice.val(product.costPrice)
         costPrice.attr('name', 'skuList[' + skuIndex + '].costPrice');
+        // 成本价
+        var organizeCostPrice = el.find('input[name$="organizeCostPrice"]');
+        organizeCostPrice.val(product.organizeCostPrice)
+        organizeCostPrice.attr('name', 'skuList[' + skuIndex + '].organizeCostPrice');
+        // 成本价
+        var cmCostPrice = el.find('input[name$="cmCostPrice"]');
+        cmCostPrice.val(product.cmCostPrice)
+        cmCostPrice.attr('name', 'skuList[' + skuIndex + '].cmCostPrice');
         // 比例成本百分比
         var shopPercent = el.find('input[name$="shopPercent"]');
         shopPercent.val(product.shopPercent)
@@ -2187,7 +2197,7 @@
         // if (organize != 0) {
         //     ladderPriceFlag.parent().parent().hide();
         // }
-        costCheckFlag.parent().parent().hide();
+        // costCheckFlag.parent().parent().hide();
 
         ladderPriceBox.find('.ladderPrice').each(function (index, item) {
             var ladderPrice = {}