Duan_xu 2 роки тому
батько
коміт
3465f42c28

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

@@ -100,6 +100,7 @@ public class ProductNewController extends BaseController {
     @RequiresPermissions("product:product:view")
     @RequestMapping(value = {"list", ""})
     public String list(Product product, HttpServletRequest request, HttpServletResponse response, Model model) {
+      Product pro=product;
         String id = product.getId();
         if (StringUtils.isEmpty(id)) {
             String shopName = product.getSearchShopName();
@@ -241,18 +242,15 @@ public class ProductNewController extends BaseController {
             // 单个商品搜索
             model.addAttribute("editFlag", "1");
         }
-
+        /**
+         * 初始化回显字段
+         */
+        product.setNewProductType(null);
+        product.setNewvalidFlag(null);
         if ("1".equals(product.getProductCategory())) {
-            /**
-             * 初始化回显字段
-             */
-            product =new Product();
+
             return "modules/product-new/productList";
         } else {
-            /**
-             * 初始化回显字段
-             */
-            product =new Product();
             return "modules/product-new/secondHand";
         }
 
@@ -313,6 +311,7 @@ public class ProductNewController extends BaseController {
 //                product.setProductName(produ.getProductName());
 //            }
 
+
             List<ProductLadderPrice> ladderPriceList = productService.findLadderPrice(product.getProductID());
             if (null != productDetailInfo) {
                 product.setDetailInfo(productDetailInfo.getDetailInfo());

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

@@ -231,13 +231,13 @@
             <if test="publishIdentity != null and publishIdentity !=''">
                 AND cshd.publishIdentity = #{publishIdentity}
             </if>
-            <if test="announType != null and announType!= '' and productCategory == 2">
+            <if test="announType !=null and announType!= '' and productCategory == 2">
                 AND a.announType=#{announType}
             </if>
             <if test="newvalidFlag !=null and newvalidFlag!= ''">
                 AND a.newvalidFlag=#{newvalidFlag}
             </if>
-            <if test="newProductType !=null">
+            <if test="newProductType !=null and productCategory == 1">
                 AND a.newProductType=#{newProductType}
             </if>
             <if test="contactName !=null and contactName !=''">

+ 75 - 68
src/main/webapp/WEB-INF/views/modules/order/cmDiscernReceiptForm.jsp

@@ -191,6 +191,13 @@
                         </c:if>
 					</span>
             <span><label>收款类型:</label>${fns:getPayTypeStr(vo.payType)}</span>
+            <span><label>收款方:</label> <c:if
+                    test="${(vo.payWay == '3' || vo.payWay == '2') && (vo.receiptType==1 || vo.receiptType==2 || vo.receiptType==3 || vo.receiptType==4) || cmDiscernReceipt.newReceiptType == 3 && vo.payWay ==2}">
+                采美
+            </c:if>
+                <c:if test="${vo.payWay == '1' && (vo.receiptType==6 || vo.receiptType==7 || vo.receiptType==8)|| cmDiscernReceipt.newReceiptType == 3 && vo.payWay =='1'}">
+                    ${vo.shopName}
+                </c:if></span>
             <span><label>收款金额:</label>${vo.receiptAmount}</span>
             <span><label>收款时间:</label>${vo.receiptDate}</span>
             <span><label>收款状态:</label>
@@ -227,11 +234,13 @@
             <div class="not-order-type">
                 <span><label>确认人:</label> ${vo.confirmer}</span>
                 <span><label>确认时间: </label>${vo.confirmTime}</span>
-                <c:if test="${ vo.shopName != null && cmDiscernReceipt.newReceiptType != 2 }"> <br> <span class="not-order-reason"><label>关联供应商:</label>${vo.shopName}</span></c:if>
-                <c:if test="${vo.shopName == null && cmDiscernReceipt.newReceiptType != 2}"> <br> <span class="not-order-reason"><label>关联供应商:</label>无</span> <br></c:if>
+                <c:if test="${ vo.shopName != null && cmDiscernReceipt.newReceiptType != 2 }"> <br> <span
+                        class="not-order-reason"><label>关联供应商:</label>${vo.shopName}</span></c:if>
+                <c:if test="${vo.shopName == null && cmDiscernReceipt.newReceiptType != 2}"> <br> <span
+                        class="not-order-reason"><label>关联供应商:</label>无</span> <br></c:if>
                 <br>
                 <c:if test="${not empty vo.noOrderReason}">
-                   <label>备注信息:</label>${vo.noOrderReason}
+                    <label>备注信息:</label>${vo.noOrderReason}
                 </c:if>
 
             </div>
@@ -239,65 +248,65 @@
     </div>
     <c:if test="${cmDiscernReceipt.newReceiptType eq 2}">
         <h5>关联订单</h5>
-            <div class="receipt-order-form">
-                <div class="receipt-order-row2">
+        <div class="receipt-order-form">
+            <div class="receipt-order-row2">
                         <span class="font-blue"><label>子订单编号:</label>
                                <a href="${ctx}/order/detail?id=${op.orderID}">${op.shopOrderNo}(${op.shopOrderId})</a></span>
-                    <span><label>订单金额:</label>¥<fmt:formatNumber
-                            value="${op.productAmount}"
-                            pattern="#0.00"/></span>
-                    <span>
+                <span><label>订单金额:</label>¥<fmt:formatNumber
+                        value="${op.productAmount}"
+                        pattern="#0.00"/></span>
+                <span>
                          <span><label>供应商:</label>${op.shopName}</span>
                     <span>
                         <hr style="margin: 10px;"/>
-                </div>
+            </div>
 
-                <div class="receipt-order-row3">
+            <div class="receipt-order-row3">
 
                          <span class="font-blue"><label>订单编号:</label><a
                                  href="${ctx}/order/detail?id=${op.orderID}">${op.orderNo}(${op.orderID})</a></span>
 
-                        <span><label>订单金额:</label>¥<fmt:formatNumber
-                                value="${op.productAmount}"
-                                pattern="#0.00"/></span>
+                <span><label>订单金额:</label>¥<fmt:formatNumber
+                        value="${op.productAmount}"
+                        pattern="#0.00"/></span>
 
-                            <span><label>应收金额:</label>¥<fmt:formatNumber value="${op.needPayAmount}"
-                                                                         pattern="#0.00"/></span>
-                            <span>
+                <span><label>应收金额:</label>¥<fmt:formatNumber value="${op.needPayAmount}"
+                                                             pattern="#0.00"/></span>
+                <span>
                             <label>已收金额:</label>¥<fmt:formatNumber
-                                    value="${empty op.receiptAmount ? 0 : op.receiptAmount}"
-                                    pattern="#0.00"/>
+                        value="${empty op.receiptAmount ? 0 : op.receiptAmount}"
+                        pattern="#0.00"/>
                             </span>
-                    <span><label>机构名称:</label>${op.jgName}</span>
-                </div>
+                <span><label>机构名称:</label>${op.jgName}</span>
+            </div>
 
-               <label>订单类型:</label><c:if test="${op.orderType eq 0}">普通订单</c:if>
-                    <c:if test="${op.orderType eq 1}">协销订单</c:if>
+            <label>订单类型:</label><c:if test="${op.orderType eq 0}">普通订单</c:if>
+            <c:if test="${op.orderType eq 1}">协销订单</c:if>
 
-                <span><label>下单日期:</label>${cmDiscernReceipt.confirmDate}</span>
+            <span><label>下单日期:</label>${cmDiscernReceipt.confirmDate}</span>
 
-            </div>
+        </div>
         <c:if test="${not empty orderInfo.receiptRecordVo}">
-        <div class="receipt-order-form">
-        <div class="receipt-order-row4">
-            <div><h5><label>订单收款记录:</label></h5></div>
-            <c:forEach items="${orderInfo.receiptRecordVo}" var="receiptRecord" varStatus="index">
-                <div class="row4-wrapper">
-                    <span class="row4-order-no">${index.index + 1}、</span>
-                    <span class="row4-time">${receiptRecord.receiptTime}</span>
-                    <c:if test="${receiptRecord.payWay == 1}">
-                        <%--线上收款--%>
-                        <span>线上&nbsp;${fns:getPayTypeStr(receiptRecord.payType)}</span>
-                        <span>${receiptRecord.receiptAmount}</span>
-                        <span><label>交易号:</label>${receiptRecord.mbOrderId}</span>
-                    </c:if>
-                    <c:if test="${receiptRecord.payWay == 2}">
-                        <span>线下&nbsp;${fns:getPayTypeStr(receiptRecord.payType)}</span>
-                        <span>${receiptRecord.receiptAmount}</span>
-                        <c:if test="${not empty receiptRecord.confirmUserPermissionID}">
-                            <span>${receiptRecord.confirmUserName}确认(${receiptRecord.confirmDate})</span>
-                        </c:if>
-                        <c:if test="${not empty receiptRecord.reviewUserPermissionID}">
+            <div class="receipt-order-form">
+                <div class="receipt-order-row4">
+                    <div><h5><label>订单收款记录:</label></h5></div>
+                    <c:forEach items="${orderInfo.receiptRecordVo}" var="receiptRecord" varStatus="index">
+                        <div class="row4-wrapper">
+                            <span class="row4-order-no">${index.index + 1}、</span>
+                            <span class="row4-time">${receiptRecord.receiptTime}</span>
+                            <c:if test="${receiptRecord.payWay == 1}">
+                                <%--线上收款--%>
+                                <span>线上&nbsp;${fns:getPayTypeStr(receiptRecord.payType)}</span>
+                                <span>${receiptRecord.receiptAmount}</span>
+                                <span><label>交易号:</label>${receiptRecord.mbOrderId}</span>
+                            </c:if>
+                            <c:if test="${receiptRecord.payWay == 2}">
+                                <span>线下&nbsp;${fns:getPayTypeStr(receiptRecord.payType)}</span>
+                                <span>${receiptRecord.receiptAmount}</span>
+                                <c:if test="${not empty receiptRecord.confirmUserPermissionID}">
+                                    <span>${receiptRecord.confirmUserName}确认(${receiptRecord.confirmDate})</span>
+                                </c:if>
+                                <c:if test="${not empty receiptRecord.reviewUserPermissionID}">
                                     <span>
                                         <c:if test="${receiptRecord.receiptStatus eq 4}">
                                             ${receiptRecord.reviewUserName}审核不通过(${receiptRecord.reviewDate})
@@ -306,18 +315,18 @@
                                             ${receiptRecord.reviewUserName}审核通过(${receiptRecord.reviewDate})
                                         </c:if>
                                     </span>
-                        </c:if>
-                    </c:if>
-                    <c:if test="${receiptRecord.payWay == 3}">
-                        <%--余额抵扣--%>
-                        <span><a
-                                href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${orderInfo.userID}"
-                                style="text-decoration: underline">${fns:getPayTypeStr(receiptRecord.payType)}</a></span>
-                        <span><a
-                                href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${orderInfo.userID}"
-                                style="text-decoration: underline">${receiptRecord.receiptAmount}</a></span>
-                    </c:if>
-                    <span>
+                                </c:if>
+                            </c:if>
+                            <c:if test="${receiptRecord.payWay == 3}">
+                                <%--余额抵扣--%>
+                                <span><a
+                                        href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${orderInfo.userID}"
+                                        style="text-decoration: underline">${fns:getPayTypeStr(receiptRecord.payType)}</a></span>
+                                <span><a
+                                        href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${orderInfo.userID}"
+                                        style="text-decoration: underline">${receiptRecord.receiptAmount}</a></span>
+                            </c:if>
+                            <span>
     <%--                        一款多单的时候直接显示再订单上即可,无需收款记录显示--%>
                                 <c:if test="${!vo.receiptOrderFlag}">
                                     <c:if test="${receiptRecord.confirmType eq 1 || receiptRecord.confirmType eq  2 || receiptRecord.confirmType eq 3}">
@@ -346,19 +355,17 @@
                                     </c:if>
                                 </c:if>
                                 </span>
-                    <span>
+                            <span>
                                     ${receiptRecord.receiptAmount}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${vo.confirmer} 确认 ${vo.confirmTime}
                                 </span>
+                        </div>
+                    </c:forEach>
                 </div>
-            </c:forEach>
-        </div>
-        </div>
+            </div>
         </c:if>
     </c:if>
 
 
-
-
     <c:if test="${vo.receiptType != 2 and vo.receiptType != 6 and vo.receiptType != 7 and vo.receiptType != 8}">
         <h5>关联订单</h5>
         <div class="receipt-order-form">
@@ -384,11 +391,11 @@
                     </c:if>
                     <div class="receipt-order-row2">
                         <span class="font-blue"><label>订单编号:</label><a
-                            href="${ctx}/order/detail?id=${orderInfo.orderID}">${orderInfo.orderNo}(${orderInfo.orderID})</a></span>
-                            <span><label>订单金额:</label>¥<fmt:formatNumber
-                                    value="${orderInfo.orderAmount}"
-                                    pattern="#0.00"/></span>
-                            <span>
+                                href="${ctx}/order/detail?id=${orderInfo.orderID}">${orderInfo.orderNo}(${orderInfo.orderID})</a></span>
+                        <span><label>订单金额:</label>¥<fmt:formatNumber
+                                value="${orderInfo.orderAmount}"
+                                pattern="#0.00"/></span>
+                        <span>
                             <span><label>应收金额:</label>¥<fmt:formatNumber value="${orderInfo.payableAmount}"
                                                                          pattern="#0.00"/></span>
                             <span>

+ 11 - 0
src/main/webapp/WEB-INF/views/modules/order/cmDiscernReceiptList.jsp

@@ -119,6 +119,8 @@
             <form:input path="orderNo" htmlEscape="false" maxlength="50" class="input-medium"/>
             <label>机构名称:</label>
             <form:input path="userName" htmlEscape="false" maxlength="25" class="input-medium"/>
+            <label>收款方:</label>
+            <form:input path="Payee" htmlEscape="false" maxlength="20" class="input-medium"/>
         </div>
         <div>
             <label>收款方式:</label>
@@ -208,6 +210,7 @@
         <th>款项类别</th>
         <th>收款账号</th>
         <th>状态</th>
+        <th>收款方</th>
         <th>机构名称</th>
         <th>订单类型</th>
         <th>关联订单号</th>
@@ -278,6 +281,14 @@
                 </c:if>
                 <c:if test="${cmDiscernReceipt.payWay != 2}">-----</c:if>
             </td>
+            <td>
+                <c:if test="${(cmDiscernReceipt.payWay == '3' || cmDiscernReceipt.payWay == '2') && (cmDiscernReceipt.receiptType==1 || cmDiscernReceipt.receiptType==2 || cmDiscernReceipt.receiptType==3 || cmDiscernReceipt.receiptType==4) || cmDiscernReceipt.newReceiptType == 3 && cmDiscernReceipt.payWay ==2}">
+                    采美
+                </c:if>
+                <c:if test="${cmDiscernReceipt.payWay == '1' && (cmDiscernReceipt.receiptType==6 || cmDiscernReceipt.receiptType==7 || cmDiscernReceipt.receiptType==8)||cmDiscernReceipt.newReceiptType == 3 && cmDiscernReceipt.payWay ==1}">
+                    ${cmDiscernReceipt.shopName}
+                </c:if>
+            </td>
             <td>
                 <c:if test="${cmDiscernReceipt.organizeID == 1}">
                     <span class="org-note">星范</span>