Ver código fonte

6月小版本

Duan_xu 2 anos atrás
pai
commit
99ccef3b88

+ 35 - 0
src/main/java/com/caimei/modules/order/entity/CmDiscernReceipt.java

@@ -68,6 +68,34 @@ public class CmDiscernReceipt extends DataEntity<CmDiscernReceipt> {
 
     private Double orderReceivedAmount;//订单已收金额(此收款只计算线上线下收款记录表金额)
     private Double returnBalanceAmount;// 退款余额金额
+    private Integer newReceiptType;//收款款项二级类别1.上架费2.订单返佣3.认证通会员4.认证通企划
+    private String shopOrderNo;
+    private String shopName;
+    private String checkMan;
+
+    public String getCheckMan() {
+        return checkMan;
+    }
+
+    public void setCheckMan(String checkMan) {
+        this.checkMan = checkMan;
+    }
+
+    public String getShopName() {
+        return shopName;
+    }
+
+    public void setShopName(String shopName) {
+        this.shopName = shopName;
+    }
+
+    public String getShopOrderNo() {
+        return shopOrderNo;
+    }
+
+    public void setShopOrderNo(String shopOrderNo) {
+        this.shopOrderNo = shopOrderNo;
+    }
 
     public String getBalanceAccountsRemark() {
         return balanceAccountsRemark;
@@ -77,6 +105,13 @@ public class CmDiscernReceipt extends DataEntity<CmDiscernReceipt> {
         this.balanceAccountsRemark = balanceAccountsRemark;
     }
 
+    public Integer getNewReceiptType() {
+        return newReceiptType;
+    }
+
+    public void setNewReceiptType(Integer newReceiptType) {
+        this.newReceiptType = newReceiptType;
+    }
 
     public String getBackName() {
         return backName;

+ 11 - 1
src/main/java/com/caimei/modules/order/entity/CmReceiptOrderRelation.java

@@ -48,6 +48,16 @@ public class CmReceiptOrderRelation extends DataEntity<CmReceiptOrderRelation> {
      */
     private String payWay;
 
+    private Integer newReceiptType;
+
+    public Integer getNewReceiptType() {
+        return newReceiptType;
+    }
+
+    public void setNewReceiptType(Integer newReceiptType) {
+        this.newReceiptType = newReceiptType;
+    }
+
     public Integer getSplitStatus() {
         return splitStatus;
     }
@@ -165,4 +175,4 @@ public class CmReceiptOrderRelation extends DataEntity<CmReceiptOrderRelation> {
     public void setConfirmType(String confirmType) {
         this.confirmType = confirmType;
     }
-}
+}

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

@@ -141,6 +141,7 @@ public class CmDiscernReceiptController extends BaseController {
     public String detail(CmDiscernReceipt cmDiscernReceipt, Model model) {
         ReceiptDetailVo vo = cmDiscernReceiptService.detail(cmDiscernReceipt);
         model.addAttribute("vo", vo);
+        model.addAttribute("checkMan",cmDiscernReceipt.getCheckMan());
         return "modules/order/cmDiscernReceiptForm";
     }
 
@@ -1368,4 +1369,4 @@ public class CmDiscernReceiptController extends BaseController {
         }
         return Double.parseDouble(data);
     }
-}
+}

+ 10 - 1
src/main/resources/mappings/modules/order/CmDiscernReceiptMapper.xml

@@ -33,7 +33,8 @@
 		a.reviewDate AS "reviewDate",
 		a.cancelDate AS "cancelDate",
 		a.updateDate AS "updateDate",
-		a.delFlag AS "delFlag"
+		a.delFlag AS "delFlag",
+        a.newReceiptType
 	</sql>
 
     <sql id="cmDiscernReceiptJoins">
@@ -63,6 +64,9 @@
         -- 	relationType值为1是为子订单ID,为2时为主订单ID)
         SELECT
         <include refid="cmDiscernReceiptColumns"/>,
+        cso.shopOrderNo,
+          s.checkMan,
+        s.name AS shopName,
         (case when crr.relationType = '1' then u_cr.userName else u.userName
         end) AS "userName",
         (case when crr.relationType = '1' then u_cr.name else u.name
@@ -79,6 +83,8 @@
         left join cm_shop_order cso on cso.shopOrderID = crr.orderID
         left join cm_order cso_cr on cso.orderID = cso_cr.orderID
         LEFT JOIN USER u_cr ON u_cr.userID = cso_cr.userID
+            -- 供应商
+        LEFT JOIN shop s ON s.shopID = cso.shopID
         <where>
             <if test="id != null and id != '' and id != 0 ">
                 AND a.id = #{id}
@@ -104,6 +110,9 @@
             <if test="receiptType != null and receiptType != ''">
                 AND a.receiptType = #{receiptType}
             </if>
+        <if test="newReceiptType !=null and newReceiptType !=''">
+             and newReceiptType=#{newReceiptType}
+        </if>
             <if test="receiptStatus != null and receiptStatus != ''">
                 AND a.receiptStatus = #{receiptStatus}
             </if>

+ 3 - 1
src/main/resources/mappings/modules/order/CmReceiptOrderRelationMapper.xml

@@ -93,8 +93,10 @@
 
 	<select id="findByReceiptID" resultType="CmReceiptOrderRelation">
 		select
-		<include refid="cmReceiptOrderRelationColumns"/>
+		<include refid="cmReceiptOrderRelationColumns"/>,
+		b.newReceiptType
 		from  cm_receipt_order_relation a
+		left join cm_discern_receipt b on a.receiptID = b.id
 		where a.receiptID = #{receiptID}
 		and a.delFlag = 0
 	</select>

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

@@ -164,6 +164,10 @@
                         </c:if>
 						<c:if test="${vo.receiptType == 2}">
                             非订单款
+                            <c:if test="${cmDiscernReceipt.newReceiptType eq 1}">-上架费</c:if>
+                            <c:if test="${cmDiscernReceipt.newReceiptType eq 2}">-订单返佣</c:if>
+                            <c:if test="${cmDiscernReceipt.newReceiptType eq 3}">-认证通会员</c:if>
+                            <c:if test="${cmDiscernReceipt.newReceiptType eq 4}">-认证通企划</c:if>
                         </c:if>
 						<c:if test="${vo.receiptType == 3}">
                             <c:if test="${vo.payType == 10}">
@@ -224,7 +228,13 @@
                 <span><label>确认人:</label> ${vo.confirmer}</span>
                 <span><label>确认时间: </label>${vo.confirmTime}</span>
                 <br>
-                <span class="not-order-reason"><label>确认原因:</label>${vo.noOrderReason}</span>
+                <c:if test="${cmDiscernReceipt.newReceiptType != 4 && cmDiscernReceipt.shopName != null}"> <span class="not-order-reason"><label>关联供应商:</label>${cmDiscernReceipt.shopName}</span></c:if>
+                <c:if test="${cmDiscernReceipt.newReceiptType eq 4 || cmDiscernReceipt.shopName == null}"> <span class="not-order-reason"><label>关联供应商:</label>无</span></c:if>
+                <br>
+                <c:if test="${not empty vo.noOrderReason}">
+                    <span class="not-order-reason"><label>备注信息:</label>${vo.noOrderReason}</span>
+                </c:if>
+
             </div>
         </c:if>
     </div>
@@ -406,6 +416,9 @@
                                     </c:if>
                                 </c:if>
                                 </span>
+                                <span>
+                                    ${receiptRecord.receiptAmount}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${vo.confirmer} 确认 ${vo.confirmTime}
+                                </span>
                             </div>
                         </c:forEach>
                     </div>

+ 55 - 22
src/main/webapp/WEB-INF/views/modules/order/cmDiscernReceiptList.jsp

@@ -52,9 +52,15 @@
         .weishaIcon {background:darkorange;color:white;margin:0 0px;padding:0 3px;font-style:normal;font-size: 12px; display:inline-block;border-radius:2px}
     </style>
     <script type="text/javascript">
-        // $(document).ready(function () {
-        //
-        // });
+        $(document).ready(function () {
+            $("#receiptType").mouseover(function(){
+                console.log( $("#receiptType").val())
+                $("#mark-info").show();
+                $("#receiptType").mouseout(function(){
+                    $("#mark-info").hide();
+                });
+            });
+        });
             $("#receipt").hover(function(){
                 console.log(1);
                 $("#mark-info").show();
@@ -84,20 +90,15 @@
             obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
         }
 
-        debugger
-        function myClickshow(one){
-            var event=document.getElementById("mark-info");
-            event.style.display="block";
-        }
-        function myClickhide(one){
-            var event=document.getElementById("mark-info");
-            event.style.display="none";
-        }
 
         function changeReceiptType(){
             debugger
             var receiptType = $("#receiptType").val();
-            alertx(receiptType)
+            if (receiptType == 2) {
+                $(".secondType").show();
+            } else {
+                $(".secondType").hide();
+            }
         }
     </script>
 </head>
@@ -133,12 +134,15 @@
                 <form:options items="${fns:getDictList('receiptType')}" itemLabel="label" itemValue="value"
                               htmlEscape="false"/>
             </form:select>
-            <ul id="mark-info" style="display: none">
-                <li>1</li>
-                <li>1</li>
-                <li>1</li>
-                <li>1</li>
-            </ul>
+            <label class="secondType" style="display: none">二级分类:</label>
+            <form:select path="newReceiptType" class="select-ele input-medium secondType" style="display: none">
+                <form:option value="" label="全部"/>
+                <form:option value="1" label="上架费"/>
+                <form:option value="2" label="订单返佣"/>
+                <form:option value="3" label="认证通会员"/>
+                <form:option value="4" label="认证通企划"/>
+            </form:select>
+
             <label>收款状态:</label>
             <form:select path="receiptStatus" class="select-ele input-medium">
                 <form:option value="" label="全部"/>
@@ -221,6 +225,7 @@
             <td>${cmDiscernReceipt.receiptDate}</td>
             <td><fmt:formatNumber type="number" pattern="#,##0.00"
                                   value="${cmDiscernReceipt.receiptAmount}"/></td>
+            <c:if test="${cmDiscernReceipt.receiptType != 2}">
             <td>
                 <c:if test="${cmDiscernReceipt.payWay == '1'}">
                     线上
@@ -235,9 +240,37 @@
                     ---
                 </c:if>
             </td>
-            <td>${fns:getDictLabel(cmDiscernReceipt.receiptType, 'receiptType', null)}</td>
+            </c:if>
+            <c:if test="${cmDiscernReceipt.receiptType == 2}">
+                <td>
+                    <c:if test="${cmDiscernReceipt.payWay == '1'}">
+                        线上
+                    </c:if>
+                    <c:if test="${cmDiscernReceipt.payWay == '2'}">
+                        线下
+                    </c:if>
+                    <c:if test="${cmDiscernReceipt.payWay != '1' && cmDiscernReceipt.payWay != '2'&& cmDiscernReceipt.payWay != '3'}">
+                        ---
+                    </c:if>
+                </td>
+            </c:if>
+            <td>
+                    ${fns:getDictLabel(cmDiscernReceipt.receiptType, 'receiptType', null)}
+                <c:if test="${cmDiscernReceipt.newReceiptType eq 1}">-上架费</c:if>
+                        <c:if test="${cmDiscernReceipt.newReceiptType eq 2}">-订单返佣</c:if>
+                        <c:if test="${cmDiscernReceipt.newReceiptType eq 3}">-认证通会员</c:if>
+                        <c:if test="${cmDiscernReceipt.newReceiptType eq 4}">-认证通企划</c:if>
+            </td>
             <td>${fns:getDictLabel(cmDiscernReceipt.payType, 'payType', null)}</td>
             <td>
+                <c:if test="${cmDiscernReceipt.payWay == 2 && cmDiscernReceipt.newReceiptType == 3}">
+                    <c:if test="${empty cmDiscernReceipt.receiptStatus}"><strong>____</strong></c:if>
+                    <c:if test="${cmDiscernReceipt.receiptStatus == 1}"><strong>待确认</strong></c:if>
+                    <c:if test="${cmDiscernReceipt.receiptStatus == 2}">已确认</c:if>
+                    <c:if test="${cmDiscernReceipt.receiptStatus == 3}">审核通过</c:if>
+                    <c:if test="${cmDiscernReceipt.receiptStatus == 4}"><font color="red">审核未通过</font></c:if>
+                    <c:if test="${cmDiscernReceipt.receiptStatus == 5}"><font color="red">收款撤销</font></c:if>
+                </c:if>
                 <c:if test="${cmDiscernReceipt.payWay == 2}">
                     <c:if test="${cmDiscernReceipt.receiptStatus == 1}"><strong>待确认</strong></c:if>
                     <c:if test="${cmDiscernReceipt.receiptStatus == 2}">已确认</c:if>
@@ -269,14 +302,14 @@
                 <c:if test="${cmDiscernReceipt.receiptType == 8}">-----</c:if>
             </td>
             <td>
-                <c:if test="${cmDiscernReceipt.receiptType != 6}">${cmDiscernReceipt.orders}</c:if>
+                <c:if test="${cmDiscernReceipt.receiptType != 6}">${cmDiscernReceipt.shopOrderNo}</c:if>
                 <c:if test="${cmDiscernReceipt.receiptType == 6}">-----</c:if>
                 <c:if test="${cmDiscernReceipt.receiptType == 7}">-----</c:if>
                 <c:if test="${cmDiscernReceipt.receiptType == 8}">-----</c:if>
             </td>
             <shiro:hasPermission name="order:cmDiscernReceipt:edit">
                 <td>
-                    <a href="${ctx}/order/cmDiscernReceipt/detail?id=${cmDiscernReceipt.id}">查看详情</a>
+                    <a href="${ctx}/order/cmDiscernReceipt/detail?checkMan=${cmDiscernReceipt.checkMan}&shopName=${cmDiscernReceipt.shopName}&id=${cmDiscernReceipt.id}">查看详情</a>
                 </td>
             </shiro:hasPermission>
         </tr>