huangzhiguo 2 anni fa
parent
commit
6440e9b827

+ 9 - 5
src/main/java/com/caimei/modules/order/service/CmPayShopService.java

@@ -245,9 +245,11 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
                     p.setNewCostPrice(newCostPrice);*/
 
                     p.setOldDiscountPrice(p.getDiscountPrice());
-                    p.setDiscountPrice(MathUtil.div(p.getDiscountPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100),100)).doubleValue());
+                    if ("0".equals(p.getIncludedTax()) && null != p.getTaxRate() && p.getTaxRate() > 0d) {
+                        p.setDiscountPrice(MathUtil.div(p.getDiscountPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100), 100)).doubleValue());
+                    }
                     // 付采美总金额
-                    allServeAmount += p.getNum() * p.getCmCostPrice();
+                    allServeAmount =MathUtil.add(allServeAmount , MathUtil.mul(p.getNum(), p.getCmCostPrice())).doubleValue();
                 }
                 so.setAllServeAmount(allServeAmount);
                 so.setNewOrderProducts(orderProductList);
@@ -386,7 +388,7 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
                 Double allServeAmount = 0d;
                 for (NewOrderProduct p : orderProductList) {
                     count = newOrderProductDao.CountReturnedPurchaseProduct(so.getShopOrderID(), p.getOrderProductID());
-                    count = count == null ? 0 : count;
+                    count = count == null ? 0 : p.getNum();
                     p.setReturnedNum(count);
                     // 还原下单时商品成本
                     /*Double newCostPrice = 0d;
@@ -394,9 +396,11 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
                     p.setCostPrice(MathUtil.div(p.getCostPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100),100)).doubleValue());
                     p.setNewCostPrice(newCostPrice);*/
                     p.setOldDiscountPrice(p.getDiscountPrice());
-                    p.setDiscountPrice(MathUtil.div(p.getDiscountPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100),100)).doubleValue());
+                    if ("0".equals(p.getIncludedTax()) && null != p.getTaxRate() && p.getTaxRate() > 0d) {
+                        p.setDiscountPrice(MathUtil.div(p.getDiscountPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100), 100)).doubleValue());
+                    }
                     // 付采美总金额
-                    allServeAmount += p.getNum() * p.getCmCostPrice();
+                    allServeAmount =MathUtil.add(allServeAmount , MathUtil.mul(p.getNum(), p.getCmCostPrice())).doubleValue();
                 }
                 so.setAllServeAmount(allServeAmount);
                 if (so.getShopPostFee() == null) so.setShopPostFee(0D);

+ 1 - 1
src/main/java/com/caimei/modules/order/service/CmRefundShopService.java

@@ -182,7 +182,7 @@ public class CmRefundShopService extends CrudService<CmRefundShopDao, CmRefundSh
                  */
                 for (NewOrderProduct p : orderProductList) {
                     Integer returnNum = newOrderProductDao.CountReturnedPurchaseProduct(so.getShopOrderID(), p.getOrderProductID());
-                    returnNum = returnNum == null ? 0 : returnNum;
+                    returnNum = returnNum == null ? 0 : p.getNum();
                     p.setReturnedNum(returnNum);
                 }
                 so.setNewOrderProducts(orderProductList);

+ 5 - 2
src/main/java/com/caimei/modules/order/service/NewShopOrderService.java

@@ -329,7 +329,7 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
             List<NewOrderProduct> orderProductList = newOrderProductDao.findByShopOrderID(so.getShopOrderID());
             for (NewOrderProduct p : orderProductList) {
                 Integer returnNum = newOrderProductDao.CountReturnedPurchaseProduct(so.getShopOrderID(), p.getOrderProductID());
-                returnNum = returnNum == null ? 0 : returnNum;
+                returnNum = returnNum == null ? 0 : p.getNum();
                 p.setReturnedNum(returnNum);
                 // 还原下单时商品成本
                 /*Double newCostPrice = 0d;
@@ -337,7 +337,9 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
                 p.setCostPrice(MathUtil.div(p.getCostPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100),100)).doubleValue());
                 p.setNewCostPrice(newCostPrice);*/
                 p.setOldDiscountPrice(p.getDiscountPrice());
-                p.setDiscountPrice(MathUtil.div(p.getDiscountPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100),100)).doubleValue());
+                if ("0".equals(p.getIncludedTax()) && null != p.getTaxRate() && p.getTaxRate() > 0d) {
+                    p.setDiscountPrice(MathUtil.div(p.getDiscountPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100), 100)).doubleValue());
+                }
             }
             if (so.getShopPostFee() == null) so.setShopPostFee(0D);
             if (so.getShopTaxFee() == null) so.setShopTaxFee(0D);
@@ -541,6 +543,7 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
                     list.add(newShopOrder);
                 }
             }
+            order.setShopOrderID(shopOrders.get(0).getShopOrderID());
             //退款(退货)总金额
             Double returnedPurchaseFee = cmReturnedPurchaseDao.refundTotalMoney(order.getOrderID());
             Double returnValue = 0d;   //退货价值

+ 3 - 1
src/main/java/com/caimei/modules/order/web/CmShopOrderController.java

@@ -199,7 +199,9 @@ public class CmShopOrderController extends BaseController {
         for (NewOrderProduct p : list.get(0).getNewOrderProducts()) {
             Double newCostPrice = 0d;
             newCostPrice = p.getCostPrice();
-            p.setCostPrice(MathUtil.div(p.getCostPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100),100)).doubleValue());
+            if ("0".equals(p.getIncludedTax()) && null != p.getTaxRate() && p.getTaxRate() > 0d) {
+                p.setCostPrice(MathUtil.div(p.getCostPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100), 100)).doubleValue());
+            }
             p.setNewCostPrice(newCostPrice);
         }
         BigDecimal payShopOtherFee = cmPayShopRecordDao.findPayShopOtherFee(newShopOrder.getShopOrderID());

+ 86 - 3
src/main/resources/mappings/modules/order/CmPayShopMapper.xml

@@ -57,7 +57,7 @@
 		limit 1
 	</select>
 	<select id="findList" resultType="CmPayShop">
-		SELECT
+		(SELECT
 			<include refid="cmPayShopColumns"/>,
 		u1.name AS applicantName,
 		u2.name AS reviewerName,
@@ -70,6 +70,15 @@
 		LEFT JOIN cm_pay_shop_record psr ON psr.payShopID = a.id
 		LEFT JOIN cm_shop_order so ON so.shopOrderID = psr.shopOrderID
 		<where>
+			so.shopOrderId IN( SELECT DISTINCT cror.shopOrderId
+					FROM cm_discern_receipt cdr
+					LEFT JOIN cm_receipt_order_relation cror ON cdr.id=cror.receiptID
+					WHERE cdr.payway = 2
+				)
+			AND (a.shopId = 1161 OR s.AccountOwnership = 0 OR so.splitCode = 'E1807059160')
+			and a.delFlag = '0'
+			and (so.organizeID!=4 or so.organizeID is null)
+			and a.shopID != 998
 			<if test="id != null and id != ''">
 				and a.id = #{id}
 			</if>
@@ -118,19 +127,93 @@
 			<if test="paymentType != null">
 				AND a.id IN(SELECT payShopID FROM cm_pay_shop_record WHERE paymentType = #{paymentType} AND delFlag = 0)
 			</if>
+		</where>
+		GROUP BY a.id
+		<!--<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.id desc
+			</otherwise>
+		</choose>-->)
+		union
+		(SELECT
+		<include refid="cmPayShopColumns"/>,
+		u1.name AS applicantName,
+		u2.name AS reviewerName,
+		s.name AS shopName,
+		(SELECT paymentType FROM cm_pay_shop_record WHERE payShopID = a.id LIMIT 1) AS paymentType
+		FROM cm_pay_shop a
+		left join sys_user u1 on u1.id = a.applicant
+		left join sys_user u2 on u2.id = a.reviewer
+		left join shop s on s.shopID = a.shopID
+		LEFT JOIN cm_pay_shop_record psr ON psr.payShopID = a.id
+		LEFT JOIN cm_shop_order so ON so.shopOrderID = psr.shopOrderID
+		<where>
+			so.ordertype = 2
 			and a.delFlag = '0'
 			and (so.organizeID!=4 or so.organizeID is null)
 			and a.shopID != 998
+			<if test="id != null and id != ''">
+				and a.id = #{id}
+			</if>
+			<if test="shopName != null and shopName != ''">
+				and s.name like concat('%', #{shopName}, '%')
+			</if>
+			<if test="name != null and name != ''">
+				AND a.name LIKE
+				<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
+				<if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
+				<if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
+			</if>
+			<if test="startTime != null and startTime != ''">
+				AND a.applyTime <![CDATA[  >=  ]]> #{startTime}
+			</if>
+			<if test="endTime != null and endTime != ''">
+				AND a.applyTime <![CDATA[   <=  ]]> #{endTime}
+			</if>
+			<if test="startTime2 != null and startTime2 != ''">
+				AND a.payTime <![CDATA[  >=  ]]> #{startTime2}
+			</if>
+			<if test="endTime2 != null and endTime2 != ''">
+				AND a.payTime <![CDATA[   <=  ]]> #{endTime2}
+			</if>
+			<if test="status != null and status != ''">
+				AND a.status = #{status}
+			</if>
+			<if test="shopOrderNo != null and shopOrderNo != ''">
+				AND a.id in (select cpsr.payShopID from cm_pay_shop_record cpsr where cpsr.shopOrderNo like concat('%',#{shopOrderNo},'%'))
+			</if>
+			<if test="shopOrderID != null and shopOrderID != ''">
+				AND a.id in (SELECT cpsr.payShopID FROM cm_pay_shop_record cpsr WHERE cpsr.shopOrderID=#{shopOrderID})
+			</if>
+			<if test="orderID != null and orderID != ''">
+				AND a.id in (SELECT cpsr.payShopID FROM cm_pay_shop_record  cpsr LEFT JOIN cm_shop_order so ON so.shopOrderID=cpsr.shopOrderID WHERE so.orderID=#{orderID})
+			</if>
+			<if test='organizeID != null and organizeID != "" and organizeID != "9999"'>
+				AND a.id in (SELECT cpsr.payShopID FROM cm_pay_shop_record  cpsr LEFT JOIN cm_shop_order so ON so.shopOrderID=cpsr.shopOrderID WHERE so.organizeID = #{organizeID})
+			</if>
+			<if test='organizeID == "9999"'>
+				AND a.id IN (SELECT cpsr.payShopID FROM cm_pay_shop_record  cpsr LEFT JOIN cm_shop_order so ON so.shopOrderID=cpsr.shopOrderID WHERE so.orderType = 2)
+			</if>
+			<if test="orderNo != null and orderNo != ''">
+				AND a.id in (SELECT cpsr.payShopID FROM cm_pay_shop_record  cpsr LEFT JOIN cm_shop_order so ON so.shopOrderID=cpsr.shopOrderID WHERE so.orderNo LIKE CONCAT('%',#{orderNo},'%'))
+			</if>
+			<if test="paymentType != null">
+				AND a.id IN(SELECT payShopID FROM cm_pay_shop_record WHERE paymentType = #{paymentType} AND delFlag = 0)
+			</if>
+
 		</where>
 		GROUP BY a.id
-		<choose>
+		<!--<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 				ORDER BY ${page.orderBy}
 			</when>
 			<otherwise>
 				ORDER BY a.id desc
 			</otherwise>
-		</choose>
+		</choose>-->) ORDER BY id DESC
 	</select>
 
 	<select id="findAllList" resultType="CmPayShop">

+ 87 - 1
src/main/resources/mappings/modules/order/ShopOrderMapper.xml

@@ -693,6 +693,90 @@
     </update>
 
     <select id="findPayOrderList" resultType="newShopOrder">
+        (select<include refid="shopOrderColumns"/>,
+        co.payTotalFee AS payTotalFee,
+
+        bou.name AS buyer,
+        s.name AS shopName,
+        c.name AS clubName,
+        cdr.payWay AS payWay
+        from cm_shop_order a
+        left join cm_pay_shop_record cpsr on a.shopOrderID = cpsr.shopOrderID
+        left join bp_order_userinfo bou on bou.orderId = a.orderID
+        left join cm_order co on co.orderID = a.orderID
+        LEFT JOIN cm_receipt_order_relation cror ON cror.orderId = co.orderId
+        LEFT JOIN cm_discern_receipt cdr ON cror.receiptID = cdr.id
+        left join shop s on s.shopID = a.shopID
+        LEFT JOIN club c ON c.userID = a.userID
+        <where>
+            a.shopOrderId IN( SELECT DISTINCT cror.shopOrderId
+                FROM cm_discern_receipt cdr
+                LEFT JOIN cm_receipt_order_relation cror ON cdr.id=cror.receiptID
+                WHERE cdr.payway = 2
+            )
+            AND (s.shopId = 1161 OR s.AccountOwnership = 0 OR a.splitCode = 'E1807059160')
+            <if test="startTime != null and startTime != ''">
+                AND (a.orderTime &gt; #{startTime} OR a.orderTime = #{startTime})
+            </if>
+            <if test="endTime != null and endTime != ''">
+                AND (a.orderTime &lt; #{endTime} OR a.orderTime = #{endTime})
+            </if>
+            <if test="orderID != null and orderID != ''">
+                AND a.orderID = #{orderID}
+            </if>
+            <if test="organizeID != null and organizeID != 9999">
+                AND co.organizeID = #{organizeID}
+            </if>
+            <if test="organizeID == 9999 ">
+                AND co.orderType = 2
+            </if>
+            <if test="orderNo != null and orderNo != ''">
+                AND a.orderNo like concat('%', #{orderNo} ,'%')
+            </if>
+            <if test="ps != null and ps.length>0 ">
+                AND a.payStatus in
+                <foreach item="item" index="index" collection="ps" open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="shopName != null and shopName != ''">
+                AND s.name like concat('%', #{shopName} ,'%')
+            </if>
+            <if test="buyer != null and buyer != ''">
+                AND bou.name like concat('%', #{buyer} ,'%')
+            </if>
+            <if test="clubName != null and clubName != ''">
+                AND c.name like concat('%', #{clubName} ,'%')
+            </if>
+            <if test="shopOrderID != null and shopOrderID != ''">
+                AND a.shopOrderID = #{shopOrderID}
+            </if>
+            <if test="shopOrderNo != null and shopOrderNo != ''">
+                AND a.shopOrderNo like concat('%', #{shopOrderNo} ,'%')
+            </if>
+            and (co.confirmFlag = '1' or co.confirmFlag = '2')
+            <if test="operatingMode != null and operatingMode == '1'.toString()">
+                and a.payStatus != 3 and co.status NOT IN (6,7)
+            </if>
+            <if test="operatingMode != null and operatingMode == '2'.toString()">
+                and a.payStatus != 1 and co.status != 6
+            </if>
+            <if test="operatingMode != null and operatingMode == '3'.toString()">
+                and a.payStatus = 3 and co.status NOT IN (6,7)
+            </if>
+            and co.delFlag = 0
+            -- and not (co.secondHandOrderFlag=1 AND co.rebateFlag=1)
+            and a.delFlag = 0
+            and (a.organizeID!=4 or a.organizeID is null)
+            and a.shopID != 998
+            and co.orderID not in (
+            SELECT orderID FROM cm_order_product WHERE productID IN
+            (6060, 6061, 6062, 6063, 6064, 6065, 6066, 6067, 6068, 6069) GROUP BY orderID
+            )
+        </where>
+        group by a.shopOrderID)
+        union
+        (
         select<include refid="shopOrderColumns"/>,
         co.payTotalFee AS payTotalFee,
 
@@ -709,6 +793,7 @@
         left join shop s on s.shopID = a.shopID
         LEFT JOIN club c ON c.userID = a.userID
         <where>
+            a.ordertype = 2
             <if test="startTime != null and startTime != ''">
                 AND (a.orderTime &gt; #{startTime} OR a.orderTime = #{startTime})
             </if>
@@ -769,7 +854,8 @@
             )
         </where>
         group by a.shopOrderID
-        ORDER BY a.shopOrderID DESC
+        )
+        ORDER BY shopOrderID DESC
     </select>
 
     <select id="payThirdParties" resultType="newShopOrder">

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/order/checkPaymentOrder.jsp

@@ -689,7 +689,7 @@
                 <c:if test="${s.settleRecordNum>0}">
                 <a href="${ctx}/bulkpurchase/cmRefundsProduct/toSettleRecord?orderID=${s.orderID}&pageType=1">结算记录</a>
                 </c:if>
-                <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord?orderID=${s.orderID}&from=3">收付款记录</a>&nbsp;&nbsp;&nbsp;
+                <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord?orderID=${s.orderID}&shopOrderID=${s.shopOrderID}&from=3">收付款记录</a>&nbsp;&nbsp;&nbsp;
                 <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRecturnRecordByOrderID?orderID=${s.orderID}&from=3">用户退款/货记录</a>&nbsp;&nbsp;&nbsp;
                 <a href="${ctx}/shopOrder/refundRecord?orderID=${s.orderID}">供应商退/付款记录</a>
             </div>

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

@@ -216,7 +216,7 @@
                         <td>商品名</td>
                         <td>供应商成本(单)</td>
                         <td>集团成本(单)</td>
-                        <td>采美成本(单)</td>
+                        <td>平台服务费</td>
                         <td>机构税率</td>
                         <td>供应商税费(单)</td>
                     </tr>

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

@@ -401,8 +401,8 @@
                             <c:if test="${s.shopReceiptStatus == 3}"><font color="green">已收款</font></c:if>
                         </td>
                         <td colspan="3">
-                            <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"
-                               style="text-decoration: underline">${s.receiptAmount}</a>
+                            <%--<a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1" style="text-decoration: underline"></a>--%>
+                                ${s.receiptAmount}
                         </td>
                         <td colspan="2">
                             <label class="discountFee">
@@ -450,8 +450,8 @@
                         <th>供应商运费</th>
                         <th>付款状态</th>
                         <th colspan="3">付供应商</th>
-                        <th>付第三方</th>
-                        <th>成本类型</th>
+                        <th colspan="2">付第三方</th>
+                        <%--<th>成本类型</th>--%>
                     </tr>
                     <tr>
                         <td> ${s.buyer}</td>
@@ -485,7 +485,7 @@
                                 仪器到付-产品包邮
                             </c:if>
                             <c:if test="${s.shopPostFlag != 2 && s.shopPostFlag != 0 && s.shopPostFlag != -2}">
-                                <fmt:formatNumber value="${s.shopPostFee}" type="currency"/>
+                                <fmt:formatNumber value="${s.shopPostFee}" type="number" pattern="#,##0.00"/>
                                 <c:if test="${s.returnedFreightFlag eq true}"><font color="red">(已退)</font></c:if>
                             </c:if>
                             <c:if test="${s.userBeans gt 0}">
@@ -527,12 +527,12 @@
                                     class="red wipeText">¥0.00</em></span></label>
                         </td>
 
-                        <td class="third-party-fee">${s.shopOtherFee}</td>
+                        <td colspan="2" class="third-party-fee">${s.shopOtherFee}</td>
 
-                        <td>
+                        <%--<td>
                             <c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if>
                             <c:if test="${s.costType == '2'}">比例成本</c:if>
-                        </td>
+                        </td>--%>
                     </tr>
                     <tr>
                         <th>商品名</th>

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

@@ -151,8 +151,8 @@
                             <c:if test="${s.shopReceiptStatus == 3}"><font color="green">已收款</font></c:if>
                         </td>
                         <td colspan="3">
-                            <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"
-                               style="text-decoration: underline">${s.receiptAmount}</a>
+                            <%--<a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1" style="text-decoration: underline"></a>--%>
+                                ${s.receiptAmount}
                         </td>
                         <td colspan="2">
                             <label class="discountFee">
@@ -200,8 +200,8 @@
                         <th>供应商运费</th>
                         <th>付款状态</th>
                         <th colspan="3">付供应商</th>
-                        <th>付第三方</th>
-                        <th>成本类型</th>
+                        <th colspan="2">付第三方</th>
+                        <%--<th>成本类型</th>--%>
                     </tr>
                     <tr>
                         <td> ${s.buyer}</td>
@@ -235,7 +235,7 @@
                                 仪器到付-产品包邮
                             </c:if>
                             <c:if test="${s.shopPostFlag != 2 && s.shopPostFlag != 0 && s.shopPostFlag != -2}">
-                                <fmt:formatNumber value="${s.shopPostFee}" type="currency"/>
+                                <fmt:formatNumber value="${s.shopPostFee}" type="number" pattern="#,##0.00"/>
                                 <c:if test="${s.returnedFreightFlag eq true}"><font color="red">(已退)</font></c:if>
                             </c:if>
                             <c:if test="${s.userBeans gt 0}">
@@ -277,12 +277,12 @@
                                     class="red wipeText">¥0.00</em></span></label>
                         </td>
 
-                        <td class="third-party-fee">${s.shopOtherFee}</td>
+                        <td colspan="2" class="third-party-fee">${s.shopOtherFee}</td>
 
-                        <td>
+                        <%--<td>
                             <c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if>
                             <c:if test="${s.costType == '2'}">比例成本</c:if>
-                        </td>
+                        </td>--%>
                     </tr>
                     <tr>
                         <th>商品名</th>

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

@@ -483,8 +483,8 @@
                             <c:if test="${s.shopReceiptStatus == 3}"><font color="green">已收款</font></c:if>
                         </td>
                         <td colspan="3">
-                            <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"
-                               style="text-decoration: underline">${s.receiptAmount}</a>
+                            <%--<a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1" style="text-decoration: underline"></a>--%>
+                                ${s.receiptAmount}
                         </td>
                         <td colspan="2">
                             <label class="discountFee">
@@ -532,8 +532,8 @@
                         <th>供应商运费</th>
                         <th>付款状态</th>
                         <th colspan="3">付供应商</th>
-                        <th>付第三方</th>
-                        <th>成本类型</th>
+                        <th colspan="2">付第三方</th>
+                        <%--<th>成本类型</th>--%>
                     </tr>
                     <tr>
                         <td> ${s.buyer}</td>
@@ -567,7 +567,7 @@
                                 仪器到付-产品包邮
                             </c:if>
                             <c:if test="${s.shopPostFlag != 2 && s.shopPostFlag != 0 && s.shopPostFlag != -2}">
-                                <fmt:formatNumber value="${s.shopPostFee}" type="currency"/>
+                                <fmt:formatNumber value="${s.shopPostFee}" type="number" pattern="#,##0.00"/>
                                 <c:if test="${s.returnedFreightFlag eq true}"><font color="red">(已退)</font></c:if>
                             </c:if>
                             <c:if test="${s.userBeans gt 0}">
@@ -609,12 +609,12 @@
                                     class="red wipeText">¥0.00</em></span></label>
                         </td>
 
-                        <td class="third-party-fee">${s.shopOtherFee}</td>
+                        <td colspan="2" class="third-party-fee">${s.shopOtherFee}</td>
 
-                        <td>
+                        <%--<td>
                             <c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if>
                             <c:if test="${s.costType == '2'}">比例成本</c:if>
-                        </td>
+                        </td>--%>
                     </tr>
                     <tr>
                         <th>商品名</th>

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

@@ -410,8 +410,8 @@
                     <th>收款状态</th>
                     <th>收款金额</th>
                     <th colspan="3">经理折扣</th>
-                    <th>优惠券</th>
-                    <th>成本类型</th>
+                    <th colspan="2">优惠券</th>
+<%--                    <th>成本类型</th>--%>
                 </tr>
                 <tr>
                     <td><a href="${ctx}/order/detail?id=${s.orderID}">${s.shopOrderNo}(${s.shopOrderID})</a></td>
@@ -424,7 +424,8 @@
                         <c:if test="${s.shopReceiptStatus == 2}"><font color="#ff8c00">部分收款</font></c:if>
                         <c:if test="${s.shopReceiptStatus == 3}"><font color="green">已收款</font></c:if>
                     </td>
-                    <td><a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1" style="text-decoration: underline">${s.receiptAmount}</a></td>
+                    <td><%--<a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1" style="text-decoration: underline"></a></td>--%>
+                        ${s.receiptAmount}
                     <td colspan="3">
                         <c:if test="${s.discountTotalFee gt 0}">
                             <c:if test="${s.discountTotalFee gt s.returnedPurchaseTotalFee}">
@@ -448,11 +449,11 @@
                         </c:if>
                         <c:if test="${s.discountTotalFee le 0}">¥0.00</c:if>
                     </td>
-                    <td>
+                    <td colspan="2">
                             ${s.couponAmount}
                     </td>
-                    <td><c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if><c:if
-                            test="${s.costType == '2'}">比例成本</c:if></td>
+                    <%--<td><c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if><c:if
+                            test="${s.costType == '2'}">比例成本</c:if></td>--%>
                 </tr>
                 <tr>
                     <th>供应商</th>
@@ -484,7 +485,7 @@
                             仪器到付-产品包邮
                         </c:if>
                         <c:if test="${s.shopPostFlag != 2 && s.shopPostFlag != 0 && s.shopPostFlag != -2}">
-                            <fmt:formatNumber value="${s.shopPostFee}" type="currency"/>
+                            <fmt:formatNumber value="${s.shopPostFee}" type="number" pattern="#,##0.00"/>
                             <c:if test="${s.returnedFreightFlag eq true}"><font color="red">(已退)</font></c:if>
                         </c:if>
                         <c:if test="${s.userBeans > 0}">
@@ -529,7 +530,7 @@
                     <th colspan="3">机构税率 / 单税费 / 总税费</th>
                     <th colspan="2">总价</th>
                     <th colspan="3">供应商税率 / 单税费 / 总税费</th>
-                    <th>成本(单)</th>
+                    <th>成本(单 + 税)</th>
                     <th>成本(总)</th>
                 </tr>
                 <c:forEach items="${s.newOrderProducts}" var="p" varStatus="pIndex">
@@ -593,7 +594,7 @@
                 </c:forEach>
             </table>
             <div class="pay-more-func">
-                <a id="applyShopOtherFee" href="${ctx}/order/cmPayShop/shopOtherFeeForm?shopOrderId=${s.shopOrderID}">付第三方申请</a>
+                <a id="applyShopOtherFee" href="${ctx}/order/cmPayShop/shopOtherFeeForm?shopOrderId=${s.shopOrderID}&payType=1">付第三方申请</a>
                 <c:if test="${s.paying ne '1' and s.payStatus eq '1' and !s.modifyPayable}">
                     <shiro:hasPermission name="order:cmPayShop:modifyPay">
                         <a onclick="applypayWay(${s.shopReceiptStatus},${s.payWay})"  href="${ctx}/shopOrder/toChangePayShopAmount?shopOrderID=${s.shopOrderID}">修改成本</a>

+ 6 - 6
src/main/webapp/WEB-INF/views/modules/order/cmPayShopPrintDetail.jsp

@@ -213,8 +213,8 @@
 							<th>供应商运费</th>
 							<th>付款状态</th>
 							<th colspan="3">付供应商</th>
-							<th>付第三方</th>
-							<th>成本类型</th>
+							<th colspan="2">付第三方</th>
+							<%--<th>成本类型</th>--%>
 						</tr>
 						<tr>
 							<td> ${s.buyer}</td>
@@ -248,7 +248,7 @@
 									仪器到付-产品包邮
 								</c:if>
 								<c:if test="${s.shopPostFlag != 2 && s.shopPostFlag != 0 && s.shopPostFlag != -2}">
-									<fmt:formatNumber value="${s.shopPostFee}" type="currency"/>
+									<fmt:formatNumber value="${s.shopPostFee}" type="number" pattern="#,##0.00"/>
 									<c:if test="${s.returnedFreightFlag eq true}"><font color="red">(已退)</font></c:if>
 								</c:if>
 								<c:if test="${s.userBeans gt 0}">
@@ -290,12 +290,12 @@
 										class="red wipeText">¥0.00</em></span></label>
 							</td>
 
-							<td class="third-party-fee">${s.shopOtherFee}</td>
+							<td colspan="2" class="third-party-fee">${s.shopOtherFee}</td>
 
-							<td>
+							<%--<td>
 								<c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if>
 								<c:if test="${s.costType == '2'}">比例成本</c:if>
-							</td>
+							</td>--%>
 						</tr>
 						<tr>
 							<th>商品名</th>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/order/payThirdParties.jsp

@@ -539,7 +539,7 @@
                 return false;
             }
             var shopOrderId = $(checked[0]).attr('data-shoporderid');
-            window.location.href = '${ctx}/order/cmPayShop/shopOtherFeeForm?shopOrderId=' + shopOrderId+'payType=2';
+            window.location.href = '${ctx}/order/cmPayShop/shopOtherFeeForm?shopOrderId=' + shopOrderId+'&payType=2';
         });
 
         //供应商差价申请

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

@@ -1195,7 +1195,7 @@
                             flag = false;
                         }
                         const num = costPrice*1 + organizeCostPrice*1 + cmCostPrice*1
-                        if (shopId != 11070 ) {
+                        if (shopId != 1161 ) {
                             if (num != price) {
                                 alertx("采美国定成本和需为机构价")
                                 flag = false;
@@ -1223,7 +1223,7 @@
                             flag = false;
                         }
                         const num = shopPercent*1 + organizePercent*1 + cmPercent*1
-                        if (shopId != 11070 ) {
+                        if (shopId != 1161 ) {
                             if (num != 100) {
                                 alertx("采美佣金比例和需为100")
                                 flag = false;
@@ -1258,7 +1258,7 @@
                             flag = false;
                         }
                         const num = mallCostPrice*1 + mallOrganizeCostPrice*1 + mallCmCostPrice*1
-                        if (shopId != 11070 ) {
+                        if (shopId != 1161 ) {
                             if (num != mallprice) {
                                 alertx("丽格国定成本和需为机构价");
                                 flag = false;
@@ -1286,7 +1286,7 @@
                             flag = false;
                         }
                         const num = mallShopPercent*1 + mallOrganizePercent*1 + cmPercent*1
-                        if (shopId != 11070 ) {
+                        if (shopId != 1161 ) {
                             if (num != 100) {
                                 alertx("丽格佣金比例和需为100");
                                 flag = false;