Эх сурвалжийг харах

Merge branch 'release' into dev4.5.8.9

lianbingjie 4 жил өмнө
parent
commit
40bea144ed
24 өөрчлөгдсөн 720 нэмэгдсэн , 560 устгасан
  1. 76 50
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_order_detail.js
  2. 21 15
      src/jfw/modules/app/src/web/templates/big-member/page_orderdetail_aiForecastPack.html
  3. 27 22
      src/jfw/modules/app/src/web/templates/big-member/page_orderdetail_member.html
  4. 24 18
      src/jfw/modules/app/src/web/templates/big-member/page_orderdetail_subAccount.html
  5. 50 50
      src/jfw/modules/app/src/web/templates/followent/list.html
  6. 28 28
      src/jfw/modules/app/src/web/templates/weixin/follow/list.html
  7. 5 4
      src/jfw/modules/common/src/qfw/util/dataexport/entdataexport.go
  8. 2 1
      src/jfw/modules/subscribepay/src/entity/dataExportPackStruct.go
  9. 6 3
      src/jfw/modules/subscribepay/src/entity/dataexport.go
  10. 119 117
      src/jfw/modules/subscribepay/src/service/invoice.go
  11. 16 3
      src/jfw/modules/subscribepay/src/service/orderListDetails.go
  12. 2 3
      src/jfw/modules/subscribepay/src/service/payCallback.go
  13. 19 23
      src/web/staticres/common-module/order-list/js/order-list.js
  14. 33 26
      src/web/templates/pc/aiPack_orderDetail.html
  15. 5 3
      src/web/templates/pc/biddetail_rec.html
  16. 4 2
      src/web/templates/pc/dataPack/packDetail.html
  17. 53 50
      src/web/templates/pc/member_orderDetail.html
  18. 19 13
      src/web/templates/pc/myOrder.html
  19. 33 25
      src/web/templates/pc/subAccount_orderDetail.html
  20. 46 20
      src/web/templates/pc/vip_orderDetail.html
  21. 29 20
      src/web/templates/weixin/member/aiForecastPackdetail.html
  22. 28 23
      src/web/templates/weixin/member/memberdetail.html
  23. 24 18
      src/web/templates/weixin/member/subAccountDetail.html
  24. 51 23
      src/web/templates/weixin/vipsubscribe/vip_order_detail.html

+ 76 - 50
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_order_detail.js

@@ -26,7 +26,9 @@ $(function () {
             }
             //产品类型
             if (r.data.order.order_money == 0) {
-                $(".productType").text("超级订阅(试用)");
+                if (r.data.order.billingMode!=0){
+                    $(".productType").text("超级订阅(试用)");
+                }
                 $(".discountPrice").parent().hide();
             }
             //价格
@@ -353,12 +355,27 @@ $(function () {
                   $(".discountPrice").text('-¥'+ formatMoney(parseFloat(r.data.order.discount_price) / 100)+'元')
                 }
                 $(".payPrice").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100) + "元");
-                $("#card-header-bg").addClass("bg finish-bg")
+
+
+
+                if (r.data.order.return_status === 0||r.data.order.return_status === 2){
+                    $("#card-header-bg").addClass("bg nopay-bg")
+                    if (r.data.order.return_status === 0){
+                        $("#pageTitle").text("待付款");
+                    }else if (r.data.order.return_status === 2){
+                        $("#pageTitle").text("待付完");
+                    }
+                }else{
+                    $("#card-header-bg").addClass("bg finish-bg")
+                    $("#pageTitle").text("已完成");
+                }
                 $("#pageTitle").addClass("status")
-                $("#pageTitle").text("已完成");
+
                 //支付时间
-                $(".line_paytime").css("display", "");
-                if (r.data.order.pay_time) $(".payTime").text(r.data.order.pay_time.replace("-", ".").replace("-", "."));
+                if (r.data.order.pay_time){
+                    $(".line_paytime").css("display", "");
+                    $(".payTime").text(r.data.order.pay_time.replace("-", ".").replace("-", "."));
+                }
                 if (r.data.order.order_money == 0) {
                     $(".line_paytime").css("display", "none");
                 }
@@ -377,54 +394,63 @@ $(function () {
 	                }
                 }
                 //支付方式
-                if (r.data.order.pay_way&&r.data.order.pay_way.indexOf("wx") > -1) {
-                    $(".line_payway").css("display", "");
-                    $(".payWay").text("微信支付");
-                    pay_way = "wx_app"
-                } else if (r.data.order.pay_way&&r.data.order.pay_way.indexOf("ali") > -1) {
-                    $(".payWay").text("支付宝支付");
-                    $(".line_payway").css("display", "");
-                    pay_way = "ali_app"
-                } else {//试用用户
-                    $(".invoice").css("display", "none");
-                    return
+                if (r.data.order.billingMode===1){
+                    if (r.data.order.pay_way.indexOf("wx") > -1||r.data.order.return_type===1) {
+                        $(".line_payway").css("display", "");
+                        $(".payWay").text("微信支付");
+                        pay_way = "wx_app"
+                    } else if (r.data.order.pay_way.indexOf("ali") > -1||r.data.order.return_type===2) {
+                        $(".payWay").text("支付宝支付");
+                        $(".line_payway").css("display", "");
+                        pay_way = "ali_app"
+                    } else if(r.data.order.pay_way === "transferAccounts"&&(r.data.order.is_backstage_order===1&&r.data.order.return_status>0||r.data.order.is_backstage_order===0)){
+                        $(".payWay").text("公对公转账");
+                        $(".line_payway").css("display", "");
+                    } else {//试用用户
+                        $(".invoice").css("display", "none");
+                        return
+                    }
                 }
-                $(".line_transaction").css("display", "");
-                if (r.data.transaction_id) $(".transaction_id").text(r.data.transaction_id);
-                var pay_again = ""
-                //发票
-                if (r.data.order.applybill_status === 0) {
-                    //已支付未申请发票
-                    pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()' style='width: 100%!important;'>开发票</button>"
-                    $(".invoice .invoicing").css("display", "");
-                    $(".invoicing").on("click", function () {
-                        var nowTimestamp = (new Date()).valueOf();
-                        $.post("/subscribepay/orderListDetails/emailOperation?v=" + nowTimestamp, {}, function (r) {
-                            if (r.success) {
-                                //没有绑定邮箱
-                                weuiDialog();
-                            } else {
-                                //绑定了邮箱
-                                window.location.href = "/jyapp/front/myOrder/getOrderCode/" + orderCode;
-                            }
-                        })
-                    });
-                } else {
-                    //已支付已申请发票
-                    pay_again += "<button class=\"j-button-cancel\" onclick= 'checkinvoice(" + r.data.order.applybill_status + ")' style='width: 100%!important;'>查看发票</button >"
-                    $(".invoice").css("display", "none");
-                    switch (r.data.order.applybill_type) {
-                        case 0:
-                            $(".person").css("display", "");
-                            break;
-                        case 1:
-                            $(".unit").css("display", "");
-                            $(".company_name").html(r.data.order.applybill_company);
-                            $(".taxpayer_number").html(r.data.order.applybill_taxnum);
-                            break;
+                if (r.data.transaction_id){
+                    $(".line_transaction").css("display", "");
+                    $(".transaction_id").text(r.data.transaction_id);
+                }
+                if (r.data.order.is_backstage_order!==1){
+                    var pay_again = ""
+                    //发票
+                    if (r.data.order.applybill_status === 0) {
+                        //已支付未申请发票
+                        pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()' style='width: 100%!important;'>开发票</button>"
+                        $(".invoice .invoicing").css("display", "");
+                        $(".invoicing").on("click", function () {
+                            var nowTimestamp = (new Date()).valueOf();
+                            $.post("/subscribepay/orderListDetails/emailOperation?v=" + nowTimestamp, {}, function (r) {
+                                if (r.success) {
+                                    //没有绑定邮箱
+                                    weuiDialog();
+                                } else {
+                                    //绑定了邮箱
+                                    window.location.href = "/jyapp/front/myOrder/getOrderCode/" + orderCode;
+                                }
+                            })
+                        });
+                    } else {
+                        //已支付已申请发票
+                        pay_again += "<button class=\"j-button-cancel\" onclick= 'checkinvoice(" + r.data.order.applybill_status + ")' style='width: 100%!important;'>查看发票</button >"
+                        $(".invoice").css("display", "none");
+                        switch (r.data.order.applybill_type) {
+                            case 0:
+                                $(".person").css("display", "");
+                                break;
+                            case 1:
+                                $(".unit").css("display", "");
+                                $(".company_name").html(r.data.order.applybill_company);
+                                $(".taxpayer_number").html(r.data.order.applybill_taxnum);
+                                break;
+                        }
                     }
+                    $(".j-footer").show().html(pay_again)
                 }
-                $(".j-footer").show().html(pay_again)
             } else if (r.data.order.order_status == -2 || r.data.order.order_status == -3) {
                 $("#card-header-bg").addClass("bg cancel-bg")
                 $("#pageTitle").addClass("status")

+ 21 - 15
src/jfw/modules/app/src/web/templates/big-member/page_orderdetail_aiForecastPack.html

@@ -243,23 +243,26 @@
                   $('.j-footer').show().html(pay_again);
                 }
                 //支付方式
-                if (r.data.pay_way.indexOf("wx") > -1) {
-                    $(".line_payway").css("display", "");
-                    $(".payWay").text("微信支付");
-                } else if (r.data.pay_way.indexOf("ali") > -1) {
-                    $(".payWay").text("支付宝支付");
-                    $(".line_payway").css("display", "");
-                } else if (r.data.pay_way === "transferAccounts") {//试用用户
-                    $(".payWay").html("公对公转账");
-                    if (filterObj.transferV&&r.data.product_type!="大会员-补充包") {
-                      $(".payWay").html("公对公转账<span style='color: #2ABED1' onclick='showImg(\"" + filterObj.transferV + "\")'>&nbsp;查看凭证</span>");
+                if(r.data.billingMode){
+                    if (r.data.pay_way.indexOf("wx") > -1||r.data.return_type===1) {
+                        $(".line_payway").css("display", "");
+                        $(".payWay").text("微信支付");
+                    } else if (r.data.pay_way.indexOf("ali") > -1||r.data.return_type===2) {
+                        $(".payWay").text("支付宝支付");
+                        $(".line_payway").css("display", "");
+                    } else if (r.data.pay_way === "transferAccounts"&&(r.data.is_backstage_order===1&&r.data.return_status>0||r.data.is_backstage_order===0)) {//试用用户
+                        $(".payWay").html("公对公转账");
+                        if (filterObj.transferV&&r.data.product_type!="大会员-补充包") {
+                            $(".payWay").html("公对公转账<span style='color: #2ABED1' onclick='showImg(\"" + filterObj.transferV + "\")'>&nbsp;查看凭证</span>");
+                        }
+                        $(".line_payway").css("display", "");
+                        //return
+                    } else {//试用用户
+                        $(".invoice").css("display", "none");
+                        //return
                     }
-                    $(".line_payway").css("display", "");
-                    //return
-                } else {//试用用户
-                    $(".invoice").css("display", "none");
-                    //return
                 }
+
                 $(".paymoney .price").text("¥ " + formatMoney(r.data.pay_money / 100) + "元");
                 $(".l-item.paymoney").css("display", "");
                 if (r.data.pay_time) {
@@ -342,6 +345,9 @@
                 $("#pageTitle").text("已取消");
                 $(".invoice").css("display", "none");//隐藏开发票
             }
+            if(r.data.is_backstage_order===1){
+                $(".invoice").css("display", "none");//隐藏开发票
+            }
         })
     })
 

+ 27 - 22
src/jfw/modules/app/src/web/templates/big-member/page_orderdetail_member.html

@@ -255,10 +255,12 @@
             if (filterObj.level == 4) {
                 $(".productType").text("大会员-试用版")
                 cycle = filterObj.cycle + "天"
-            } else {
+            }else if (filterObj.cycleType===1){
+                cycle = filterObj.cycle + "天"
+            }else {
                 cycle = filterObj.cycle + "年"
                 var createType = filterObj.createType
-                if (createType){
+                if (createType||filterObj.cycleType===0){
                   cycle = filterObj.cycle + "个月";
                 }
             }
@@ -297,29 +299,32 @@
                 }
 
                 //支付方式
-                if (r.data.pay_way.indexOf("wx") > -1) {
-                    $(".line_payway").css("display", "");
-                    $(".payWay").text("微信支付");
-                } else if (r.data.pay_way.indexOf("ali") > -1) {
-                    $(".payWay").text("支付宝支付");
-                    $(".line_payway").css("display", "");
-                } else if (r.data.pay_way === "transferAccounts") {//试用用户
-                    window.isTransferPay = r.data.applybill_status === 0
-                    $(".payWay").html("公对公转账");
-                    if (filterObj.transferV&&filterObj.level!=5) {
-                        initImgView(filterObj.transferV)
-                        $(".payWay").html("公对公转账<span style='color: #2ABED1' onclick='showImg()'>&nbsp;查看凭证</span>");
-                    }
-                    $(".line_payway").css("display", "");
+                if (r.data.billingMode===1){
+                    if (r.data.pay_way.indexOf("wx") > -1||r.data.return_type===1) {
+                        $(".line_payway").css("display", "");
+                        $(".payWay").text("微信支付");
+                    } else if (r.data.pay_way.indexOf("ali") > -1||r.data.return_type===2) {
+                        $(".payWay").text("支付宝支付");
+                        $(".line_payway").css("display", "");
+                    } else if (r.data.pay_way === "transferAccounts"&&(r.data.is_backstage_order===1&&r.data.return_status>0||r.data.is_backstage_order===0)) {//试用用户
+                        window.isTransferPay = r.data.applybill_status === 0
+                        $(".payWay").html("公对公转账");
+                        if (filterObj.transferV&&filterObj.level!=5) {
+                            initImgView(filterObj.transferV)
+                            $(".payWay").html("公对公转账<span style='color: #2ABED1' onclick='showImg()'>&nbsp;查看凭证</span>");
+                        }
+                        $(".line_payway").css("display", "");
 
-                    $(".l-item.paymoney").css("display", "");
-                    //$(".price").text("¥ " + formatMoney(r.data.pay_money / 100) + "元");
-                    //return
-                } else {//试用用户
-                    $(".invoice").css("display", "none");
-                    return
+                        $(".l-item.paymoney").css("display", "");
+                        //$(".price").text("¥ " + formatMoney(r.data.pay_money / 100) + "元");
+                        //return
+                    } else {//试用用户
+                        $(".invoice").css("display", "none");
+                        return
+                    }
                 }
 
+
                 $(".l-item.paymoney").css("display", "");
                 $(".price").text("¥ " + formatMoney(r.data.pay_money / 100));
 

+ 24 - 18
src/jfw/modules/app/src/web/templates/big-member/page_orderdetail_subAccount.html

@@ -225,26 +225,29 @@
                 }
 
                 //支付方式
-                if (r.data.pay_way.indexOf("wx") > -1) {
-                    $(".line_payway").css("display", "");
-                    $(".payWay").text("微信支付");
-                } else if (r.data.pay_way.indexOf("ali") > -1) {
-                    $(".payWay").text("支付宝支付");
-                    $(".line_payway").css("display", "");
-                } else if (r.data.pay_way === "transferAccounts") {//试用用户
-                    $(".payWay").html("公对公转账");
-                    if (filterObj.transferV) {
-                        $(".payWay").html("公对公转账<span style='color: #2ABED1' onclick='showImg(\""+filterObj.transferV+"\")'>&nbsp;查看凭证</span>");
-                    }
-                    $(".line_payway").css("display", "");
+                if (r.data.billingMode===1){
+                    if (r.data.pay_way.indexOf("wx") > -1||r.data.return_type===1) {
+                        $(".line_payway").css("display", "");
+                        $(".payWay").text("微信支付");
+                    } else if (r.data.pay_way.indexOf("ali") > -1||r.data.return_type===2) {
+                        $(".payWay").text("支付宝支付");
+                        $(".line_payway").css("display", "");
+                    } else if (r.data.pay_way === "transferAccounts"&&(r.data.is_backstage_order===1&&r.data.return_status>0||r.data.is_backstage_order===0)) {//试用用户
+                        $(".payWay").html("公对公转账");
+                        if (filterObj.transferV) {
+                            $(".payWay").html("公对公转账<span style='color: #2ABED1' onclick='showImg(\""+filterObj.transferV+"\")'>&nbsp;查看凭证</span>");
+                        }
+                        $(".line_payway").css("display", "");
 
-                    $(".l-item.paymoney").css("display", "");
-                    $(".paymoney .price").text("¥ " + formatMoney(r.data.pay_money / 100));
-                    //return
-                } else {//试用用户
-                    $(".invoice").css("display", "none");
-                    return
+                        $(".l-item.paymoney").css("display", "");
+                        $(".paymoney .price").text("¥ " + formatMoney(r.data.pay_money / 100));
+                        //return
+                    } else {//试用用户
+                        $(".invoice").css("display", "none");
+                        return
+                    }
                 }
+
                 if (r.data.pay_time) {
                     $(".line_paytime").css("display", "");
                     $(".payTime").css("display", "").text(r.data.pay_time.replace("-", "/").replace("-", "/"));
@@ -324,6 +327,9 @@
                 $("#pageTitle").text("已取消");
                 $(".invoice").css("display", "none");//隐藏开发票
             }
+            if(r.data.is_backstage_order===1){
+                $(".invoice").css("display", "none");//隐藏开发票
+            }
         })
     })
 

+ 50 - 50
src/jfw/modules/app/src/web/templates/followent/list.html

@@ -36,56 +36,56 @@
 				return;
 			}
 			var data = r.list;
-			$.ajax({
-					type: 'POST',
-					url: '/publicapply/bidcoll/power',
-					success: function(res) {
-							console.log(res)
-							if(res.error_code == 0) {
-								if(!res.data.entniche && !res.data.member && res.data.vip <= 0){
-										(window.slotbydup = window.slotbydup || []).push({
-												id: "u6603901",
-												container: "_yzpxro2x1n",
-												async: true
-										});
-										getAjaxAdv()
-								}
-							}
-					},
-					error: function(err) {
-							console.log(err)
-					}
-			})
-			function getAjaxAdv () {
-					$.ajax({
-						type: 'POST',
-						url: '/publicapply/adLeague/exposure',
-						data: {
-								client: 'APP',
-								id: 'ad8',
-								position: '关注的企业列表页底部'
-						},
-						success: function(res) {
-								console.log(res)
-						}
-					})
-			}
-			addEventListener('focus', function() {
-					if(document.activeElement = document.getElementById('iframeu6603901_0')) {
-							$.ajax({
-									type: 'POST',
-									url: '/publicapply/adLeague/click',
-									data: {
-										client: 'APP',
-										id: 'ad8',
-										position: '关注的企业列表页底部'
-									},
-									success: function(res) {
-											console.log(res)
-									}
-							})
-					}  
-			});
+			// $.ajax({
+			// 		type: 'POST',
+			// 		url: '/publicapply/bidcoll/power',
+			// 		success: function(res) {
+			// 				console.log(res)
+			// 				if(res.error_code == 0) {
+			// 					if(!res.data.entniche && !res.data.member && res.data.vip <= 0){
+			// 							(window.slotbydup = window.slotbydup || []).push({
+			// 									id: "u6603901",
+			// 									container: "_yzpxro2x1n",
+			// 									async: true
+			// 							});
+			// 							getAjaxAdv()
+			// 					}
+			// 				}
+			// 		},
+			// 		error: function(err) {
+			// 				console.log(err)
+			// 		}
+			// })
+			// function getAjaxAdv () {
+			// 		$.ajax({
+			// 			type: 'POST',
+			// 			url: '/publicapply/adLeague/exposure',
+			// 			data: {
+			// 					client: 'APP',
+			// 					id: 'ad8',
+			// 					position: '关注的企业列表页底部'
+			// 			},
+			// 			success: function(res) {
+			// 					console.log(res)
+			// 			}
+			// 		})
+			// }
+			// addEventListener('focus', function() {
+			// 		if(document.activeElement = document.getElementById('iframeu6603901_0')) {
+			// 				$.ajax({
+			// 						type: 'POST',
+			// 						url: '/publicapply/adLeague/click',
+			// 						data: {
+			// 							client: 'APP',
+			// 							id: 'ad8',
+			// 							position: '关注的企业列表页底部'
+			// 						},
+			// 						success: function(res) {
+			// 								console.log(res)
+			// 						}
+			// 				})
+			// 		}  
+			// });
 			var allHtml = "";
 			var jyno = 0;
 			var fronthtml = "";

+ 28 - 28
src/jfw/modules/app/src/web/templates/weixin/follow/list.html

@@ -111,19 +111,19 @@ $(function(){
 									$(".app-layout-footer").css("display","")
 									$('#entAdv').hide()
 									$(".app-layout-content-b").css("bottom",$(".app-layout-footer").height())
-									(window.slotbydup = window.slotbydup || []).push({
-											id: "u6603903",
-											container: "_u2w0em6qe4",
-											async: true
-									});
-									getAjaxAdv()
+									// ;(window.slotbydup = window.slotbydup || []).push({
+									// 		id: "u6603903",
+									// 		container: "_u2w0em6qe4",
+									// 		async: true
+									// });
+									// getAjaxAdv()
 								} else {
-									(window.slotbydup = window.slotbydup || []).push({
-										id: "u6603903",
-										container: "_40lx7f736fw",
-										async: true
-									});
-									getAjaxAdv()
+									// ;(window.slotbydup = window.slotbydup || []).push({
+									// 	id: "u6603903",
+									// 	container: "_40lx7f736fw",
+									// 	async: true
+									// });
+									// getAjaxAdv()
 								}
 						} else {
 							if(data.length>0 ) {
@@ -138,22 +138,22 @@ $(function(){
 					console.log(err)
 			}
 	})
-		addEventListener('blur', function() {
-				if(document.activeElement = document.getElementById('iframeu6603903_0')) {
-						$.ajax({
-								type: 'POST',
-								url: '/publicapply/adLeague/click',
-								data: {
-									client: 'APP',
-									id: 'ad9',
-									position: '关注的项目列表页底部'
-								},
-								success: function(res) {
-										console.log(res)
-								}
-						})
-				}  
-		});
+		// addEventListener('blur', function() {
+		// 		if(document.activeElement = document.getElementById('iframeu6603903_0')) {
+		// 				$.ajax({
+		// 						type: 'POST',
+		// 						url: '/publicapply/adLeague/click',
+		// 						data: {
+		// 							client: 'APP',
+		// 							id: 'ad9',
+		// 							position: '关注的项目列表页底部'
+		// 						},
+		// 						success: function(res) {
+		// 								console.log(res)
+		// 						}
+		// 				})
+		// 		}  
+		// });
 		var html = "";
 		var fronthtml = "";
 		var lasthtml = "";

+ 5 - 4
src/jfw/modules/common/src/qfw/util/dataexport/entdataexport.go

@@ -3,8 +3,6 @@ package dataexport
 import (
 	"encoding/json"
 	"fmt"
-	"github.com/tealeg/xlsx"
-	"go.mongodb.org/mongo-driver/bson"
 	"io/ioutil"
 	"log"
 	"mongodb"
@@ -18,6 +16,9 @@ import (
 	"strings"
 	"sync"
 	"time"
+
+	"github.com/tealeg/xlsx"
+	"go.mongodb.org/mongo-driver/bson"
 )
 
 //作者:一组开发
@@ -225,8 +226,8 @@ func FormatExportDatas(Mgo_Ent mongodb.MongodbSim, data *[]map[string]interface{
 				str = strings.Replace(str, " ", "", -1)
 				v["detail"] = str
 			}
-			if v["_id"] != nil {
-				v["url"] = webdomain + "/article/content/" + util.CommonEncodeArticle("content", v["_id"].(string)) + ".html"
+			if v["infoid"] != nil {
+				v["url"] = webdomain + "/article/content/" + util.CommonEncodeArticle("content", v["infoid"].(string)) + ".html"
 			}
 		}(v)
 	}

+ 2 - 1
src/jfw/modules/subscribepay/src/entity/dataExportPackStruct.go

@@ -96,11 +96,12 @@ func (this *dataExportPackStruct) PayCallBack(param *CallBackParam) bool {
 
 				if _, err := perRechargePack(userId, entTime.Format(qutil.Date_Short_Layout), packDetail); err != nil {
 					log.Println(fmt.Sprintf("%s 资源账户更改异常 %v", userId, err))
-					//发异常通知 xxx
 					return false
 				}
 				return true
 			}
+		} else {
+			return true
 		}
 	}
 	return false

+ 6 - 3
src/jfw/modules/subscribepay/src/entity/dataexport.go

@@ -243,7 +243,8 @@ func SendMailToBJFinance(order *map[string]interface{}, pay_time, transaction_id
 			}
 			//超级搜索页面 筛选区域为 area           没有region    移动端数据导出改
 			if sc.Region == nil {
-				region = strings.Join(sc.Area, " ")
+				showAll := append(sc.Area, sc.City...)
+				region = strings.Join(showAll, " ")
 			} else {
 				region = strings.Join(sc.Region, " ")
 			}
@@ -604,7 +605,8 @@ func GetPackDataExportMailContent(filterId, download_url string) (content string
 		}
 		//超级搜索页面 筛选区域为 area           没有region    移动端数据导出改
 		if sc.Region == nil {
-			region = strings.Join(sc.Area, " ")
+			showAll := append(sc.Area, sc.City...)
+			region = strings.Join(showAll, " ")
 		} else {
 			region = strings.Join(sc.Region, " ")
 		}
@@ -711,7 +713,8 @@ func GetDataExportMailContent(orderCode string) (content string, err error) {
 		}
 		//超级搜索页面 筛选区域为 area           没有region    移动端数据导出改
 		if sc.Region == nil {
-			region = strings.Join(sc.Area, " ")
+			showAll := append(sc.Area, sc.City...)
+			region = strings.Join(showAll, " ")
 		} else {
 			region = strings.Join(sc.Region, " ")
 		}

+ 119 - 117
src/jfw/modules/subscribepay/src/service/invoice.go

@@ -122,128 +122,130 @@ func (this *Invoice) Addinvoice() error {
 		pos := qutil.IntAllDef(last, 0)
 		locks[pos].Lock()
 		defer locks[pos].Unlock()
-		u := util.Mysql.FindOne("dataexport_order", map[string]interface{}{"order_code": order_code, "user_id": userId, "applyBill_status": map[string]interface{}{"ne": 2}}, "order_money,product_type,pay_way,pay_money", "")
+		u := util.Mysql.FindOne("dataexport_order", map[string]interface{}{"order_code": order_code, "user_id": userId, "applyBill_status": map[string]interface{}{"ne": 2}}, "order_money,product_type,pay_way,pay_money,is_backstage_order,billingMode", "")
 		if u != nil {
-			var prices float64
-			//公对公转账 账单金额可以修改 开发票应取实付金额 pay_money
-			//微信支付宝支付 pay_money为订单金额减去微信or支付包红包
-			if qutil.ObjToString((*u)["pay_way"]) == "transferAccounts" {
-				prices = qutil.Float64All((*u)["pay_money"]) / float64(100)
-			} else {
-				prices = qutil.Float64All((*u)["order_money"]) / float64(100)
-			}
-			price = strconv.FormatFloat(prices, 'f', -1, 64)
-			product_name = (*u)["product_type"].(string)
-			applyBill_status = 1
-			data := make(map[string]interface{})
-			dataexport_data := make(map[string]interface{})
-			dataexport_data["applyBill_status"] = applyBill_status
-			if applyBill_type == "个人" {
-				dataexport_data["applyBill_type"] = 0
-				data["taxpayer_identnum"] = ""
-				data["company_name"] = ""
-				dataexport_data["applyBill_taxnum"] = ""
-				dataexport_data["applybill_company"] = ""
-			} else {
-				data["taxpayer_identnum"] = code
-				data["company_name"] = applyBill_company
-				dataexport_data["applyBill_taxnum"] = code
-				dataexport_data["applybill_company"] = applyBill_company
-				dataexport_data["applyBill_type"] = 1
-			}
-			dataexport_data["user_mail"] = my_email
-			data["product_type"] = product_name
-			data["order_code"] = order_code
-			data["mail"] = my_email
-			data["phone"] = phone_num
-			data["invoice_type"] = applyBill_type
-			data["invoice_changed"] = 0
-			data["create_time"] = time.Now().Unix()
-			data["user_id"] = userId
-			data["invoice_status"] = 0
-			var orders = []map[string]interface{}{}
-			var items = []map[string]interface{}{}
-			item := map[string]interface{}{
-				"name":        product_name,
-				"code":        config.InvoiceConfig.Code,
-				"yhzcbs":      config.InvoiceConfig.Tax_policy,
-				"lineType":    config.InvoiceConfig.Invoice_nature,
-				"taxRate":     config.InvoiceConfig.Tax_rate,
-				"taxPrice":    price,
-				"totalAmount": price,
-				"quantity":    "1",
-			}
-			items = append(items, item)
-			order := map[string]interface{}{
-				"billNo": order_code,
-				"items":  items,
-			}
-			orders = append(orders, order)
-			client := &http.Client{}
-			body := map[string]interface{}{
-				"Swno":      order_code,
-				"custType":  "03",
-				"orders":    orders,
-				"custTaxNo": code,
-			}
-			if applyBill_type == "单位" {
-				body["custName"] = applyBill_company
-			} else {
-				body["custName"] = applyBill_type
-			}
-			//发送请求之前插入数据,防止请求时间过长
-			if !isSys {
-				status := util.Mysql.Find(dbname, map[string]interface{}{"order_code": order_code, "user_id": userId}, "", "create_time", 0, 0)
-				if len(*status) > 0 {
-					return nil
+			if qutil.IntAll((*u)["billingMode"]) == 1 && qutil.IntAll((*u)["is_backstage_order"]) != 1 {
+				var prices float64
+				//公对公转账 账单金额可以修改 开发票应取实付金额 pay_money
+				//微信支付宝支付 pay_money为订单金额减去微信or支付包红包
+				if qutil.ObjToString((*u)["pay_way"]) == "transferAccounts" {
+					prices = qutil.Float64All((*u)["pay_money"]) / float64(100)
+				} else {
+					prices = qutil.Float64All((*u)["order_money"]) / float64(100)
 				}
-				util.Mysql.Insert(dbname, data)
-				if !util.Mysql.Update("dataexport_order", map[string]interface{}{"order_code": order_code, "user_id": userId}, dataexport_data) {
-					invoice_status = -1
+				price = strconv.FormatFloat(prices, 'f', -1, 64)
+				product_name = (*u)["product_type"].(string)
+				applyBill_status = 1
+				data := make(map[string]interface{})
+				dataexport_data := make(map[string]interface{})
+				dataexport_data["applyBill_status"] = applyBill_status
+				if applyBill_type == "个人" {
+					dataexport_data["applyBill_type"] = 0
+					data["taxpayer_identnum"] = ""
+					data["company_name"] = ""
+					dataexport_data["applyBill_taxnum"] = ""
+					dataexport_data["applybill_company"] = ""
+				} else {
+					data["taxpayer_identnum"] = code
+					data["company_name"] = applyBill_company
+					dataexport_data["applyBill_taxnum"] = code
+					dataexport_data["applybill_company"] = applyBill_company
+					dataexport_data["applyBill_type"] = 1
 				}
-			} else {
-				util.Mysql.Update(dbname, map[string]interface{}{
-					"order_code":      order_code,
-					"user_id":         userId,
-					"invoice_changed": 0,
-				}, data)
-			}
-			b, _ := json.Marshal(body)
-			buffer := bytes.NewBuffer(b)
-			request, _ := http.NewRequest("POST", config.InvoiceConfig.Invoice_interface_address+"/Invoice/Add", buffer)
-			response, err := client.Do(request)
-			if err == nil {
-				res, err := ioutil.ReadAll(response.Body)
-				if err != nil {
-					invoice_status = -1
+				dataexport_data["user_mail"] = my_email
+				data["product_type"] = product_name
+				data["order_code"] = order_code
+				data["mail"] = my_email
+				data["phone"] = phone_num
+				data["invoice_type"] = applyBill_type
+				data["invoice_changed"] = 0
+				data["create_time"] = time.Now().Unix()
+				data["user_id"] = userId
+				data["invoice_status"] = 0
+				var orders = []map[string]interface{}{}
+				var items = []map[string]interface{}{}
+				item := map[string]interface{}{
+					"name":        product_name,
+					"code":        config.InvoiceConfig.Code,
+					"yhzcbs":      config.InvoiceConfig.Tax_policy,
+					"lineType":    config.InvoiceConfig.Invoice_nature,
+					"taxRate":     config.InvoiceConfig.Tax_rate,
+					"taxPrice":    price,
+					"totalAmount": price,
+					"quantity":    "1",
+				}
+				items = append(items, item)
+				order := map[string]interface{}{
+					"billNo": order_code,
+					"items":  items,
+				}
+				orders = append(orders, order)
+				client := &http.Client{}
+				body := map[string]interface{}{
+					"Swno":      order_code,
+					"custType":  "03",
+					"orders":    orders,
+					"custTaxNo": code,
+				}
+				if applyBill_type == "单位" {
+					body["custName"] = applyBill_company
 				} else {
-					resMap := qutil.ObjToMap(string(res))
-					if *resMap != nil {
-						if qutil.IntAll((*resMap)["code"]) == 0 { //开票成功
-							invoice_status = 1
-							jsonData["invoice_status"] = invoice_status
-						} else if qutil.IntAll((*resMap)["code"]) == 2 { //开票中
-							// log.Println("开票中")
-							invoice_status = 0
-							jsonData["invoice_status"] = invoice_status
-						} else { //开票失败
-							// log.Println("开票失败")
-							invoice_status = -1
-							jsonData["invoice_status"] = invoice_status
-						}
+					body["custName"] = applyBill_type
+				}
+				//发送请求之前插入数据,防止请求时间过长
+				if !isSys {
+					status := util.Mysql.Find(dbname, map[string]interface{}{"order_code": order_code, "user_id": userId}, "", "create_time", 0, 0)
+					if len(*status) > 0 {
+						return nil
 					}
-					defer response.Body.Close()
-
-					resData := (*resMap)["data"].(map[string]interface{})
-					update_status := util.Mysql.Update(dbname, map[string]interface{}{"order_code": order_code}, map[string]interface{}{
-						"invoice_serialnum": resData["swno"],
-						"invoice_code":      resData["fpdm"],
-						"invoice_number":    resData["fphm"],
-						"url":               resData["path"],
-						"invoice_status":    invoice_status,
-					})
-					if !update_status {
-						log.Println("order_ocde:", order_code+"update fail")
+					util.Mysql.Insert(dbname, data)
+					if !util.Mysql.Update("dataexport_order", map[string]interface{}{"order_code": order_code, "user_id": userId}, dataexport_data) {
+						invoice_status = -1
+					}
+				} else {
+					util.Mysql.Update(dbname, map[string]interface{}{
+						"order_code":      order_code,
+						"user_id":         userId,
+						"invoice_changed": 0,
+					}, data)
+				}
+				b, _ := json.Marshal(body)
+				buffer := bytes.NewBuffer(b)
+				request, _ := http.NewRequest("POST", config.InvoiceConfig.Invoice_interface_address+"/Invoice/Add", buffer)
+				response, err := client.Do(request)
+				if err == nil {
+					res, err := ioutil.ReadAll(response.Body)
+					if err != nil {
+						invoice_status = -1
+					} else {
+						resMap := qutil.ObjToMap(string(res))
+						if *resMap != nil {
+							if qutil.IntAll((*resMap)["code"]) == 0 { //开票成功
+								invoice_status = 1
+								jsonData["invoice_status"] = invoice_status
+							} else if qutil.IntAll((*resMap)["code"]) == 2 { //开票中
+								// log.Println("开票中")
+								invoice_status = 0
+								jsonData["invoice_status"] = invoice_status
+							} else { //开票失败
+								// log.Println("开票失败")
+								invoice_status = -1
+								jsonData["invoice_status"] = invoice_status
+							}
+						}
+						defer response.Body.Close()
+
+						resData := (*resMap)["data"].(map[string]interface{})
+						update_status := util.Mysql.Update(dbname, map[string]interface{}{"order_code": order_code}, map[string]interface{}{
+							"invoice_serialnum": resData["swno"],
+							"invoice_code":      resData["fpdm"],
+							"invoice_number":    resData["fphm"],
+							"url":               resData["path"],
+							"invoice_status":    invoice_status,
+						})
+						if !update_status {
+							log.Println("order_ocde:", order_code+"update fail")
+						}
 					}
 				}
 			}

+ 16 - 3
src/jfw/modules/subscribepay/src/service/orderListDetails.go

@@ -67,7 +67,7 @@ func (this *OrderListDetails) GetOrderPayAllMsg() {
 			"order_code": orderCode,
 			//"order_status": 1,
 		}
-		oData := util.Mysql.FindOne(tableName_order, query, "id,order_code,prepay_time,create_time,pay_time,pay_way,original_price,order_money,pay_money,applybill_status,out_trade_no,filter,product_type,order_status,applybill_type,applybill_taxnum,applybill_company,vip_starttime,vip_endtime,vip_type,discount_price,d_relation_id", "")
+		oData := util.Mysql.FindOne(tableName_order, query, "id,order_code,prepay_time,create_time,pay_time,pay_way,original_price,order_money,pay_money,applybill_status,out_trade_no,filter,product_type,order_status,applybill_type,applybill_taxnum,applybill_company,vip_starttime,vip_endtime,vip_type,discount_price,d_relation_id,billingMode,return_status,is_backstage_order", "")
 		//配置订单到期时间
 		order_countdown := config.Config.OrderCountdown //配置文件读取
 		activeData := util.Mysql.FindOne("prefer_active", map[string]interface{}{"order_code": orderCode, "user_id": userId}, "active_code", "")
@@ -84,6 +84,13 @@ func (this *OrderListDetails) GetOrderPayAllMsg() {
 		if oData == nil || len(*oData) == 0 {
 			return &entity.FuncResult{false, errors.New("未找到此订单"), nil}
 		}
+		//查询回款记录
+		if qutil.IntAll((*oData)["is_backstage_order"]) == 1 && qutil.IntAll((*oData)["return_status"]) > 0 {
+			if returnRecord := util.Mysql.FindOne("return_money_record", map[string]interface{}{"order_code": orderCode}, "return_type", "id desc"); returnRecord != nil && len(*returnRecord) > 0 {
+				(*oData)["return_type"] = (*returnRecord)["return_type"]
+			}
+		}
+
 		//卡卷id加密
 		if (*oData)["d_relation_id"] != "" {
 			(*oData)["userLotteryId"] = qutil.SE.Encode2Hex(qutil.ObjToString((*oData)["d_relation_id"]))
@@ -639,7 +646,7 @@ func (o *OrderListDetails) SetRes(res []map[string]interface{}, queryM map[strin
 
 //查询数据
 func (o *OrderListDetails) Datas(queryM map[string]interface{}, pageNum, pagesize_max int) (haveNextPage bool, result []map[string]interface{}, err error) {
-	res := *util.Mysql.Find(tableName_order, queryM, "id,order_code,filter_publishtime,create_time,data_spec,filter_id,filter_keys,order_money,pay_money,data_count,order_status,pay_way,product_type,filter,pay_time,vip_starttime,vip_endtime,applybill_status,applybill_type,applybill_taxnum,applybill_company,vip_type,course_status,discount_price,d_relation_id", "create_time desc", -1, 0)
+	res := *util.Mysql.Find(tableName_order, queryM, "id,order_code,filter_publishtime,create_time,data_spec,filter_id,filter_keys,order_money,pay_money,data_count,order_status,pay_way,product_type,filter,pay_time,vip_starttime,vip_endtime,applybill_status,applybill_type,applybill_taxnum,applybill_company,vip_type,course_status,discount_price,d_relation_id,billingMode,is_backstage_order,return_status", "create_time desc", -1, 0)
 	if len(res) > 0 {
 		start := (pageNum - 1) * pagesize_max
 		end := pageNum * pagesize_max
@@ -876,9 +883,15 @@ func (o *OrderListDetails) GetMemberDetail() {
 			data = *util.Mysql.FindOne(tableName_order, map[string]interface{}{
 				"order_code": order_code,
 				"user_id":    userId,
-			}, "id,order_code,order_status,create_time,pay_time,pay_way,out_trade_no,prepay_id,product_type,pay_money,order_money,filter,applybill_type,applybill_taxnum,applybill_company,applybill_status,vip_starttime,vip_endtime,course_status", "")
+			}, "id,order_code,order_status,create_time,pay_time,pay_way,out_trade_no,prepay_id,product_type,pay_money,order_money,filter,applybill_type,applybill_taxnum,applybill_company,applybill_status,vip_starttime,vip_endtime,course_status,is_backstage_order,return_status,billingMode", "")
 
 			if data != nil {
+				//查询回款记录
+				if qutil.IntAll((data)["is_backstage_order"]) == 1 && qutil.IntAll((data)["return_status"]) > 0 {
+					if returnRecord := util.Mysql.FindOne("return_money_record", map[string]interface{}{"order_code": order_code}, "return_type", "id desc"); returnRecord != nil && len(*returnRecord) > 0 {
+						(data)["return_type"] = (*returnRecord)["return_type"]
+					}
+				}
 				//filter
 				filter := qutil.ObjToString(data["filter"].(string))
 				filter_map := map[string]interface{}{}

+ 2 - 3
src/jfw/modules/subscribepay/src/service/payCallback.go

@@ -292,9 +292,8 @@ func (p *PayCallBackAction) WxPayCallback() {
 				log.Printf("微信剑鱼币更新执行出错 %+v\n", thisParam)
 			}
 		} else if strings.HasPrefix(thisParam.OutTradeno, pay.WX_DATAPACK_APP) || strings.HasPrefix(thisParam.OutTradeno, pay.WX_DATAPACK_JSAIP) || strings.HasPrefix(thisParam.OutTradeno, pay.WX_DATAPACK_NATIVE) { //个人数据包
-			if !entity.JyDataExportPack.PayCallBack(thisParam) {
-				log.Println("微信个人数据包支付回调更新执行出错 %+v\n", thisParam)
-				return false
+			if update = entity.JyDataExportPack.PayCallBack(thisParam); !update {
+				log.Printf("微信个人数据包支付回调更新执行出错 %+v\n", thisParam)
 			}
 		} else {
 			log.Printf("微信支付完成回调 未知订单类型%s\n", thisParam.OutTradeno)

+ 19 - 23
src/web/staticres/common-module/order-list/js/order-list.js

@@ -18,6 +18,7 @@ var vm = new Vue({
         '大会员-AI中标预测包',
         '大会员-招标文件解读',
         '大会员-子账号',
+        'VIP订阅',
       ]
     },
     tabList: [
@@ -480,13 +481,8 @@ var vm = new Vue({
       var orderStatus = order.order_status
       var productType = order.product_type
       var filterInfo = JSON.parse(order.filter)
-      var customPayProduction = [
-        '大会员',
-        '大会员-补充包',
-        '大会员-AI中标预测包',
-        '大会员-招标文件解读',
-        '大会员-子账号'
-      ]
+      var customPayProduction = this.prodConf.transformProductions
+
       var orderStateMap = {
         0: '待付款',
         1: '已完成',
@@ -518,10 +514,10 @@ var vm = new Vue({
           if (filterInfo.isAll) {
             customIsAll = filterInfo.isAll
           }
-          if (customIsAll === 2){
+          if (customIsAll === 2 || order.return_status === 0){
             stateText = '待付款'
             className = 'notpay'
-          }else if (customIsAll == 3) {
+          }else if (customIsAll === 3|| order.return_status === 2) {
             stateText = '待付完'
             className = 'notpay'
           }
@@ -760,7 +756,7 @@ var vm = new Vue({
           state.bugAgainText = '再次购买'
         }
         // 判断开发票
-        if (canInvoke.indexOf(productType) !== -1) {
+        if (canInvoke.indexOf(productType) !== -1 && order.billingMode === 1 && order.is_backstage_order === 0) {
           state.invokeButtonShow = true
         }
 
@@ -1642,17 +1638,17 @@ var vm = new Vue({
         }
       }
 
-      if (filter_vip.cyclecount && filter_vip.cycleunit) {
-        if (parseInt(filter_vip.cycleunit) === 1) {
-          effectiveduration_vip = filter_vip.cyclecount + "年"
-        } else if (parseInt(filter_vip.cycleunit) === 2) {
-          effectiveduration_vip = filter_vip.cyclecount + "个月"
-        }  else if (parseInt(filter_vip.cycleunit) === 4) {
-          effectiveduration_vip = filter_vip.cyclecount + "季"
-        } else {
-          effectiveduration_vip = "7天"
-        }
-      }
+      // if (filter_vip.cyclecount && filter_vip.cycleunit) {
+      //   if (parseInt(filter_vip.cycleunit) === 1) {
+      //     effectiveduration_vip = filter_vip.cyclecount + "年"
+      //   } else if (parseInt(filter_vip.cycleunit) === 2) {
+      //     effectiveduration_vip = filter_vip.cyclecount + "个月"
+      //   }  else if (parseInt(filter_vip.cycleunit) === 4) {
+      //     effectiveduration_vip = filter_vip.cyclecount + "季"
+      //   } else {
+      //     effectiveduration_vip = "7天"
+      //   }
+      // }
       if (filter_vip.cycleunit === 0 && filter_vip.cyclecount === 0) {
         effectiveduration_vip = "不延期";
       }
@@ -1802,11 +1798,11 @@ var vm = new Vue({
         text: '-'
       }
       // 订阅周期计算
-      if (level === 4) {
+      if (level === 4|| filterInfo.cycleType === 1) {
         duration.text = filterInfo.cycle + '天'
       } else {
         duration.text = filterInfo.cycle + '年'
-        if (filterInfo.createType) {
+        if (filterInfo.createType||filterInfo.cycleType === 0) {
           duration.text = filterInfo.cycle + '个月'
         }
       }

+ 33 - 26
src/web/templates/pc/aiPack_orderDetail.html

@@ -206,40 +206,47 @@
                         }else{
                           $("#status_success").removeClass("hide");
                         }
-                        $(".pay_time_p").css("display", "");
-                        if (r.data.pay_time) $(".pay_time").text(r.data.pay_time.replace("-", ".").replace("-", "."));
+                        if (r.data.pay_time){
+                            $(".pay_time_p").css("display", "");
+                            $(".pay_time").text(r.data.pay_time.replace("-", ".").replace("-", "."));
+                        }
                         //支付方式
-                        if (r.data.pay_way.indexOf("wx") > -1) {
-                            $(".pay_way_p").css("display", "");
-                            $(".pay_way").text("微信支付");
-                        } else if (r.data.pay_way.indexOf("ali") > -1) {
-                            $(".pay_way").text("支付宝支付");
-                            $(".pay_way_p").css("display", "");
-                        } else if (r.data.pay_way === "transferAccounts") {
-                            //$(".pay_time_p").css("display", "none");
-                            $(".pay_num_p").css("display", "none");
-                            if (filterObj.transferV && r.data.product_type!="大会员-补充包") {
-                                $(".pay_pic").css("display", "")
-                                $(".show_pay_pic").attr("onclick", "showImg('" + filterObj.transferV + "')")
-                            }
-                            $(".pay_way").text("公对公转账");
-                            $(".pay_way_p").css("display", "");
+                        if (r.data.billingMode===1){
+                            if (r.data.pay_way.indexOf("wx") > -1||r.data.return_type===1) {
+                                $(".pay_way_p").css("display", "");
+                                $(".pay_way").text("微信支付");
+                            } else if (r.data.pay_way.indexOf("ali") > -1||r.data.return_type===2) {
+                                $(".pay_way").text("支付宝支付");
+                                $(".pay_way_p").css("display", "");
+                            } else if (r.data.pay_way === "transferAccounts"&&(r.data.is_backstage_order===1&&r.data.return_status>0||r.data.is_backstage_order===0)) {
+                                //$(".pay_time_p").css("display", "none");
+                                $(".pay_num_p").css("display", "none");
+                                if (filterObj.transferV && r.data.product_type!="大会员-补充包") {
+                                    $(".pay_pic").css("display", "")
+                                    $(".show_pay_pic").attr("onclick", "showImg('" + filterObj.transferV + "')")
+                                }
+                                $(".pay_way").text("公对公转账");
+                                $(".pay_way_p").css("display", "");
 
-                            $(".price").text("¥ " + formatMoney(r.data.pay_money / 100) + "元");
+                                $(".price").text("¥ " + formatMoney(r.data.pay_money / 100) + "元");
+                            }
                         }
+
                         if (r.data.prepay_id) {
                             $(".pay_num").text(r.data.prepay_id);
                             $(".pay_num_p").css("display", "");
                         }
                         if (source===""){
-                          //发票
-                          if (r.data.applybill_status === 0) {
-                              $(".openinvoice").css("display", "");
-                          }  else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
-                            $(".lookinvoice").css("display", "").on("click", function () {
-                                checkinvoice(r.data.applybill_status, orderCode)
-                            })
-                          }
+                            if (r.data.is_backstage_order!==1){
+                                //发票
+                                if (r.data.applybill_status === 0) {
+                                    $(".openinvoice").css("display", "");
+                                }  else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
+                                    $(".lookinvoice").css("display", "").on("click", function () {
+                                        checkinvoice(r.data.applybill_status, orderCode)
+                                    })
+                                }
+                            }
                         }
                     }
                     if (r.data.order_status === -2) {

+ 5 - 3
src/web/templates/pc/biddetail_rec.html

@@ -1620,9 +1620,11 @@ var IframeOnClick = {
 					keyArr.push(buyerObj)
 				} else if(keys) {
 					if(keys.indexOf(",") != -1) {
-						keys = keys.split(' ')
-					} else {
 						keys = keys.split(',')
+					} else if(keys.indexOf("+") != -1) {
+						keys = keys.split('+')
+					} else {
+						keys = keys.split(' ')
 					}
 					keys.forEach(function(item) {
 						let buyerObj = {
@@ -1729,7 +1731,7 @@ var IframeOnClick = {
 				if(bidPower) {
 					bidPower = JSON.parse(bidPower)
 					if(bidPower.indexOf(6) != -1) {
-						location.href = '/swordfish/page_big_pc/analysis_result?ptid=' + {{.T.obj._id}}
+						location.href = '/swordfish/page_big_pc/analysis_result?sid=' + {{.T.obj._id}}
 					}
 				}
 			},

+ 4 - 2
src/web/templates/pc/dataPack/packDetail.html

@@ -175,8 +175,10 @@
                     }
                     if (r.data.order.order_status == 1) {
                         $("#status_success").removeClass("hide");
-                        $(".pay_time_p").css("display", "");
-                        if (r.data.order.pay_time) $(".pay_time").text(r.data.order.pay_time.replace("-", ".").replace("-", "."));
+                        if (r.data.order.pay_time){
+                            $(".pay_time_p").css("display", "");
+                            $(".pay_time").text(r.data.order.pay_time.replace("-", ".").replace("-", "."));
+                        }
                         //支付方式
                         if (r.data.order.pay_way.indexOf("wx") > -1) {
                             $(".pay_way_p").css("display", "");

+ 53 - 50
src/web/templates/pc/member_orderDetail.html

@@ -137,7 +137,6 @@
             $(".public-nav").css("border-bottom", "1px solid #e0e0e0");
             $("section[id='drder']").css("padding-top", "80px");
             haslogin({{.T.logid}});
-
             var orderCode = getParam("order_code");
             $(".order_id").text("订单编号:" + orderCode);
             $.post("/subscribepay/orderListDetails/getMemberDetail", {"order_code": orderCode}, function (r) {
@@ -198,14 +197,14 @@
                     //if (r.data.combo!=""&&r.data.combo!=null&&r.data.combo!=undefined){
                     //  level="自定义-"+r.data.combo;
                     //}
+                    //启明星后台创建的订单 cycleType: 1-天  0-月  cycle:数量
                     $(".level").text(level);
                     var cycle =r.data.cycle;
-                    if(r.data.level==4){
+                    if(r.data.level==4||filterObj.cycleType===1){
                       cycle+="天"
                       $(".vip_type").text("-试用版")
                     }else{
-                      var createType = filterObj.createType
-                      if (createType){
+                      if (filterObj.createType||filterObj.cycleType===0){
                         cycle+="个月";
                       }else{
                         cycle+="年"
@@ -231,46 +230,65 @@
                         }else{
                           $("#status_success").removeClass("hide");
                         }
-                        $(".pay_time_p").css("display", "");
-                        if (r.data.pay_time) $(".pay_time").text(r.data.pay_time.replace("-", ".").replace("-", "."));
+                        if (r.data.pay_time){
+                            $(".pay_time_p").css("display", "");
+                            $(".pay_time").text(r.data.pay_time.replace("-", ".").replace("-", "."));
+                        }
                         //支付方式
-                        if (r.data.pay_way.indexOf("wx") > -1) {
-                            $(".pay_way_p").css("display", "");
-                            $(".pay_way").text("微信支付");
-                        } else if (r.data.pay_way.indexOf("ali") > -1) {
-                            $(".pay_way").text("支付宝支付");
-                            $(".pay_way_p").css("display", "");
-                        } else if (r.data.pay_way === "transferAccounts") {
-                            window.isTransferPay = r.data.applybill_status === 0
-                            //$(".pay_time_p").css("display", "none");
-                            $(".pay_num_p").css("display", "none");
-                            if (filterObj.transferV&&r.data.level!=5) {
-                                $(".pay_pic").css("display", "")
-                                $(".show_pay_pic").attr("onclick", "showImg('" + filterObj.transferV + "')")
-                            }
-                            $(".pay_way").text("公对公转账");
-                            $(".pay_way_p").css("display", "");
+                        if (r.data.billingMode===1){
+                            if (r.data.pay_way.indexOf("wx") > -1||r.data.return_type===1) {
+                                $(".pay_way_p").css("display", "");
+                                $(".pay_way").text("微信支付");
+                            } else if (r.data.pay_way.indexOf("ali") > -1||r.data.return_type===2) {
+                                $(".pay_way").text("支付宝支付");
+                                $(".pay_way_p").css("display", "");
+                            } else if (r.data.pay_way === "transferAccounts"&&(r.data.is_backstage_order===1&&r.data.return_status>0||r.data.is_backstage_order===0)) {
+                                window.isTransferPay = r.data.applybill_status === 0
+                                //$(".pay_time_p").css("display", "none");
+                                $(".pay_num_p").css("display", "none");
+                                if (filterObj.transferV&&r.data.level!=5) {
+                                    $(".pay_pic").css("display", "")
+                                    $(".show_pay_pic").attr("onclick", "showImg('" + filterObj.transferV + "')")
+                                }
+                                $(".pay_way").text("公对公转账");
+                                $(".pay_way_p").css("display", "");
 
-                            $(".price").text("¥ " + formatMoney(r.data.pay_money / 100) + "元");
-                            $(".openinvoice").css({
-                                'background': '#EDEFF2',
-                                'color': '#5F5E64'
-                            })
+                                $(".price").text("¥ " + formatMoney(r.data.pay_money / 100) + "元");
+                                $(".openinvoice").css({
+                                    'background': '#EDEFF2',
+                                    'color': '#5F5E64'
+                                })
+                            }
                         }
 
+
                         if (r.data.prepay_id) {
                           $(".pay_num").text(r.data.prepay_id);
                            $(".pay_num_p").show();
                         }
                         if (source===""){
-                          //发票
-                          if (r.data.applybill_status === 0) {
-                              $(".openinvoice").css("display", "");
-                          }else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
-                            $(".lookinvoice").css("display", "").on("click", function () {
-                                checkinvoice(r.data.applybill_status, orderCode)//查看发票
-                            })
-                          }
+                            if(r.data.is_backstage_order!==1){ //发票
+                                if (r.data.applybill_status === 0) {
+                                    $(".openinvoice").css("display", "").on("click", function () {
+                                        if (window.isTransferPay) {
+                                            checkinvoice(2, '', '请联系客服开票<br>客服热线:400-108-6670')
+                                            return
+                                        }
+                                        $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (r) {
+                                            if (r.status != 1) {
+                                                window.open("/front/order/invoicetimeOut", '_self');
+                                            } else {
+                                                window.open("/front/order/invoice/" + orderCode, '_self');
+                                            }
+                                        })
+                                    });
+                                }else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
+                                    $(".lookinvoice").css("display", "").on("click", function () {
+                                        checkinvoice(r.data.applybill_status, orderCode)//查看发票
+                                    })
+                                }
+                            }
+
                         }else{
                           var buchongbaoHtml = '';
                           var serversName = filterObj.serversName;
@@ -318,21 +336,6 @@
                 }
             })
 
-
-            $(".openinvoice").on("click", function () {
-                if (window.isTransferPay) {
-                    checkinvoice(2, '', '请联系客服开票<br>客服热线:400-108-6670')
-                    return
-                }
-                $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (r) {
-                    if (r.status != 1) {
-                        window.open("/front/order/invoicetimeOut", '_self');
-                    } else {
-                        window.open("/front/order/invoice/" + orderCode, '_self');
-                    }
-                })
-            })
-
             $(".payOrder").on("click", function () {
                 var paramsUnit = getParam('unit')
                 location.href = "/front/member/orderPay/" + orderCode + (paramsUnit ? ('?unit=' + paramsUnit): '')

+ 19 - 13
src/web/templates/pc/myOrder.html

@@ -344,8 +344,8 @@
                                         <span v-else-if="item.course_status === 3" style='color: #FE737A'>未收到转账</span>
                                     </div>
                                     <div v-if="item.order_status === 1">
-                                        <p class="finish_status" v-if="item.filter.isAll == 2">待付款</p>
-                                        <p class="finish_status" v-else-if="item.filter.isAll == 3">待付完</p>
+                                        <p class="finish_status" v-if="item.filter.isAll == 2 || item.return_status === 0">待付款</p>
+                                        <p class="finish_status" v-else-if="item.filter.isAll == 3 || item.return_status === 2">待付完</p>
                                         <p class="finish_status" v-else>已完成</p>
                                     </div>
                                     <p v-if="item.order_status === -2 || item.order_status === -3" class="finish_status">已取消</p>
@@ -368,6 +368,10 @@
                                 <div class="stateBox" v-else>
                                     <!--待支付-->
                                     <p class="finish_status" v-if="item.order_status === 0">待付款</p>
+                                    <!--已开通未付钱-->
+                                    <p class="finish_status" v-else-if="item.order_status === 1 && item.return_status === 0">待付款</p>
+                                    <!--已开通未付完-->
+                                    <p class="finish_status" v-else-if="item.order_status === 1 && item.return_status === 2">待付完</p>
                                     <!--已完成-->
                                     <p class="finish_status" v-else-if="item.order_status === 1">已完成</p>
                                     <!--已取消-->
@@ -409,7 +413,7 @@
                                     <p v-if="item.order_status === 0"><a class="go_pay" data-jy-track="click-hover" @click="goPay(item)">去支付</a></p>
                                     <p v-if="item.order_status === 0"><a data-jy-track="click-hover" @click="goCancel(item)">取消订单</a></p>
                                     <!--已完成-->
-                                    <p v-if="item.order_status === 1"><a v-if="item.applybill_status === 0" data-jy-track="click-hover" @click="goInvoice(item)">开发票</a></p>
+                                    <p v-if="item.order_status === 1"><a v-if="item.applybill_status === 0 && item.billingMode === 1 && item.is_backstage_order === 0" data-jy-track="click-hover" @click="goInvoice(item)">开发票</a></p>
                                     <p v-if="item.order_status === 1"><a v-if="item.applybill_status === 1 || item.applybill_status === 2" data-jy-track="click-hover" @click="goInvoice(item)">发票信息</a></p>
                                     <!--已取消-->
                                     <!--历史数据 再次购买-->
@@ -1069,15 +1073,15 @@
               if (v.vip_endtime != null) {
                 v.memberInfo.endTime = formatTime(v.vip_endtime).replace(/\./g, "/") + " 到期";
               }
-              if (v.filter.level == 4) {
-                v.memberInfo.cycle = v.filter.cycle + "天";
-              } else {
-                v.memberInfo.cycle = v.filter.cycle + "年";
-                var createType = v.filter.createType
-                if (createType){
-                  v.memberInfo.cycle = v.filter.cycle + "个月";
+                //启明星后台创建的订单 cycleType: 1-天  0-月  cycle:数量
+                if (v.filter.level == 4||v.filter.cycleType===1) {
+                    v.memberInfo.cycle = v.filter.cycle + "天";
+                }else {
+                    v.memberInfo.cycle = v.filter.cycle + "年";
+                    if (v.filter.createType||v.filter.cycleType===0){
+                        v.memberInfo.cycle = v.filter.cycle + "个月";
+                    }
                 }
-              }
               // 超级订阅
               if (v.product_type === 'VIP订阅') {
                 var vipOriginalInfo = v.filter.newBuyset
@@ -1142,10 +1146,12 @@
                     vipInfo.cycle = v.filter.cyclecount + "年"
                   } else if (parseInt(v.filter.cycleunit) === 2) {
                     vipInfo.cycle = v.filter.cyclecount + "个月"
-                  } else if (parseInt(v.filter.cycleunit) === 4) {
+                  } else if (parseInt(v.filter.cycleunit) === 3) {
+                    vipInfo.cycle = v.filter.cyclecount + "天"
+                  }else if (parseInt(v.filter.cycleunit) === 4) {
                     vipInfo.cycle = v.filter.cyclecount + "季"
                   } else {
-                    vipInfo.cycle = "7天"
+                    vipInfo.cycle = "-"
                   }
                 }
                 if (v.filter.cycleunit === 0 && v.filter.cyclecount === 0) {

+ 33 - 25
src/web/templates/pc/subAccount_orderDetail.html

@@ -186,39 +186,47 @@
                         }else{
                           $("#status_success").removeClass("hide");
                         }
-                        $(".pay_time_p").css("display", "");
-                        if (r.data.pay_time) $(".pay_time").text(r.data.pay_time.replace("-", ".").replace("-", "."));
+
+                        if (r.data.pay_time){
+                            $(".pay_time_p").css("display", "");
+                            $(".pay_time").text(r.data.pay_time.replace("-", ".").replace("-", "."));
+                        }
                         //支付方式
-                        if (r.data.pay_way.indexOf("wx") > -1) {
-                            $(".pay_way_p").css("display", "");
-                            $(".pay_way").text("微信支付");
-                        } else if (r.data.pay_way.indexOf("ali") > -1) {
-                            $(".pay_way").text("支付宝支付");
-                            $(".pay_way_p").css("display", "");
-                        } else if (r.data.pay_way === "transferAccounts") {
-                            //$(".pay_time_p").css("display", "none");
-                            $(".pay_num_p").css("display", "none");
-                            if (filterObj.transferV && false) { //子账号只能后台创建订单、后台创建订单不展示凭证
-                                $(".pay_pic").css("display", "")
-                                $(".show_pay_pic").attr("onclick", "showImg('" + filterObj.transferV + "')")
-                            }
-                            $(".pay_way").text("公对公转账");
-                            $(".pay_way_p").css("display", "");
+                        if (r.data.billingMode===1){
+                            if (r.data.pay_way.indexOf("wx") > -1||r.data.return_type===1) {
+                                $(".pay_way_p").css("display", "");
+                                $(".pay_way").text("微信支付");
+                            } else if (r.data.pay_way.indexOf("ali") > -1||r.data.return_type===2) {
+                                $(".pay_way").text("支付宝支付");
+                                $(".pay_way_p").css("display", "");
+                            } else if (r.data.pay_way === "transferAccounts"&&(r.data.is_backstage_order===1&&r.data.return_status>0||r.data.is_backstage_order===0)) {
+                                //$(".pay_time_p").css("display", "none");
+                                $(".pay_num_p").css("display", "none");
+                                if (filterObj.transferV && false) { //子账号只能后台创建订单、后台创建订单不展示凭证
+                                    $(".pay_pic").css("display", "")
+                                    $(".show_pay_pic").attr("onclick", "showImg('" + filterObj.transferV + "')")
+                                }
+                                $(".pay_way").text("公对公转账");
+                                $(".pay_way_p").css("display", "");
 
-                            $(".price").text("¥ " + formatMoney(r.data.pay_money / 100) + "元");
+                                $(".price").text("¥ " + formatMoney(r.data.pay_money / 100) + "元");
+                            }
                         }
 
+
                         if (r.data.prepay_id) $(".pay_num").text(r.data.prepay_id);
 
                         if (source===""){
                           //发票
-                          if (r.data.applybill_status === 0) {
-                              $(".openinvoice").css("display", "");
-                          } else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
-                              $(".lookinvoice").css("display", "").on("click", function () {
-                                  checkinvoice(r.data.applybill_status, orderCode)//查看发票
-                              })
-                          }
+                            if (r.data.is_backstage_order!==1){
+                                if (r.data.applybill_status === 0) {
+                                    $(".openinvoice").css("display", "");
+                                } else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
+                                    $(".lookinvoice").css("display", "").on("click", function () {
+                                        checkinvoice(r.data.applybill_status, orderCode)//查看发票
+                                    })
+                                }
+                            }
                         }
                     }
                     if (r.data.order_status === -2) {

+ 46 - 20
src/web/templates/pc/vip_orderDetail.html

@@ -63,6 +63,7 @@
             <p class="clearfix order_state">
                 <!--greenFont为绿色字体 redFont为红色字体 -->
                 <span class="greenFont hide" id="status_success">已完成</span>
+                <span class="redFont hide" id="status_wait_payfull">待付完</span>
                 <span class="redFont hide" id="status_wait_pay">待付款</span>
                 <span class="qxBgFont hide" id="status_cancelled">已取消</span>
 
@@ -184,31 +185,56 @@
                         $(".discount-container").removeClass("hide");
                         $(".highlight-text").text("赠送"+give_cycle);
                     }
-                    if (r.data.order.order_status == 1) {
-                        $("#status_success").removeClass("hide");
-                        $(".pay_time_p").css("display", "");
-                        if (r.data.order.pay_time) $(".pay_time").text(r.data.order.pay_time.replace("-", ".").replace("-", "."));
+                    if (r.data.order.order_status === 1) {
+                        if(r.data.order.return_status === 0 ||r.data.order.return_status === 2 ){
+                            $("#bg").addClass("yellowBg").removeClass("greenBg");
+                            if (r.data.order.return_status === 0){
+                                $("#status_wait_pay").removeClass("hide");
+                            }else if (r.data.order.return_status === 2 ){
+                                $("#status_wait_payfull").removeClass("hide");
+                            }
+                        }else {
+                            $("#status_success").removeClass("hide");
+                        }
+
+                        if (r.data.order.pay_time){
+                            $(".pay_time_p").css("display", "");
+                            $(".pay_time").text(r.data.order.pay_time.replace("-", ".").replace("-", "."));
+                        }
                         //支付方式
-                        if (r.data.order.pay_way.indexOf("wx") > -1) {
-                            $(".pay_way_p").css("display", "");
-                            $(".pay_way").text("微信支付");
-                        } else if (r.data.order.pay_way.indexOf("ali") > -1) {
-                            $(".pay_way").text("支付宝支付");
-                            $(".pay_way_p").css("display", "");
+                        if (r.data.order.billingMode===1){
+                            if (r.data.order.pay_way.indexOf("wx") > -1||r.data.order.return_type===1) {
+                                $(".pay_way_p").css("display", "");
+                                $(".pay_way").text("微信支付");
+                            } else if (r.data.order.pay_way.indexOf("ali") > -1||r.data.order.return_type===2) {
+                                $(".pay_way").text("支付宝支付");
+                                $(".pay_way_p").css("display", "");
+                            }else if(r.data.order.pay_way === "transferAccounts"&&(r.data.order.is_backstage_order===1&&r.data.order.return_status>0||r.data.order.is_backstage_order===0)) {
+                                $(".pay_way").text("公对公转账");
+                                $(".pay_way_p").css("display", "");
+                            }
                         }
-                        if (r.data.order.original_price == 0) {
+
+
+                        if (r.data.order.order_money == 0) {
                             $(".pay_time_p").css("display", "none");
-                            $(".vip_type").text("(试用)");
+                            if (r.data.order.billingMode!=0){
+                                $(".vip_type").text("(试用)");
+                            }
                         } else {
-                            $(".pay_num_p").css("display", "");
-                            if (r.data.transaction_id) $(".pay_num").text(r.data.transaction_id);
+                            if (r.data.transaction_id){
+                                $(".pay_num_p").css("display", "");
+                                $(".pay_num").text(r.data.transaction_id);
+                            }
                             //发票
-                            if (r.data.order.applybill_status === 0) {
-                                $(".openinvoice").css("display", "");
-                            } else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
-                                $(".lookinvoice").css("display", "").on("click", function () {
-                                    checkinvoice(r.data.applybill_status, orderCode)//查看发票
-                                })
+                            if (r.data.order.is_backstage_order!==1){
+                                if (r.data.order.applybill_status === 0) {
+                                    $(".openinvoice").css("display", "");
+                                } else if (r.data.applybill_status === 1 || r.data.applybill_status === 2) {
+                                    $(".lookinvoice").css("display", "").on("click", function () {
+                                        checkinvoice(r.data.applybill_status, orderCode)//查看发票
+                                    })
+                                }
                             }
                         }
                     }

+ 29 - 20
src/web/templates/weixin/member/aiForecastPackdetail.html

@@ -241,34 +241,40 @@
                       $('.j-footer').show().html(pay_again);
                     }
                     //支付方式
-                    if (r.data.pay_way.indexOf("wx") > -1) {
-                        $(".line_payway").css("display", "");
-                        $(".payWay").text("微信支付");
-                    } else if (r.data.pay_way.indexOf("ali") > -1) {
-                        $(".payWay").text("支付宝支付");
-                        $(".line_payway").css("display", "");
-                    } else if (r.data.pay_way === "transferAccounts") {//试用用户
-                        $(".payWay").html("公对公转账");
-                        if (filterObj.transferV&&r.data.product_type!="大会员-补充包") {
-                          $(".payWay").html("公对公转账<span style='color: #2ABED1' onclick='showImg(\"" + filterObj.transferV + "\")'>&nbsp;查看凭证</span>");
+                    if (r.data.billingMode===1){
+                        if (r.data.pay_way.indexOf("wx") > -1||r.data.return_type===1) {
+                            $(".line_payway").css("display", "");
+                            $(".payWay").text("微信支付");
+                        } else if (r.data.pay_way.indexOf("ali") > -1||r.data.return_type===2) {
+                            $(".payWay").text("支付宝支付");
+                            $(".line_payway").css("display", "");
+                        } else if (r.data.pay_way === "transferAccounts"&&(r.data.is_backstage_order===1&&r.data.return_status>0||r.data.is_backstage_order===0)) {//试用用户
+                            $(".payWay").html("公对公转账");
+                            if (filterObj.transferV&&r.data.product_type!="大会员-补充包") {
+                                $(".payWay").html("公对公转账<span style='color: #2ABED1' onclick='showImg(\"" + filterObj.transferV + "\")'>&nbsp;查看凭证</span>");
+                            }
+                            $(".line_payway").css("display", "");
+
+                            $(".l-item.paymoney").css("display", "");
+                            $(".paymoney .price").text("¥ " + formatMoney(r.data.pay_money / 100) + "元");
+                            return
+                        } else {//试用用户
+                            $(".invoice").css("display", "none");
+                            return
                         }
-                        $(".line_payway").css("display", "");
-    
-                        $(".l-item.paymoney").css("display", "");
-                        $(".paymoney .price").text("¥ " + formatMoney(r.data.pay_money / 100) + "元");
-                        return
-                    } else {//试用用户
-                        $(".invoice").css("display", "none");
-                        return
                     }
+
     
                     if (r.data.pay_time) {
                         $(".line_paytime").css("display", "");
                         $(".payTime").text(r.data.pay_time.replace("-", ".").replace("-", "."));
                     }
     
-                    $(".line_transaction").css("display", "");
-                    if (r.data.prepay_id){ $(".transaction_id").text(r.data.prepay_id);}
+
+                    if (r.data.prepay_id){
+                        $(".transaction_id").text(r.data.prepay_id);
+                        $(".line_transaction").css("display", "");
+                    }
                 }
                 if (r.data.order_status == 0) {
                     //未支付
@@ -339,6 +345,9 @@
                     $("#pageTitle").text("已取消");
                     $(".invoice").css("display", "none");//隐藏开发票
                 }
+                if(r.data.is_backstage_order===1){
+                    $(".invoice").css("display", "none");//隐藏开发票
+                }
             }
         })
     })

+ 28 - 23
src/web/templates/weixin/member/memberdetail.html

@@ -229,12 +229,14 @@
             $(".level_value").text(level);
             //
             var cycle = r.data.cycle;
-            if (filterObj.level == 4) {
+            if (filterObj.level === 4) {
                 cycle += "天"
                 $(".vip_type").text("-试用版");
-            } else {
+            } else if (filterObj.cycleType===1){
+                cycle += "天"
+            }else {
               var createType = filterObj.createType
-              if (createType){
+              if (createType||filterObj.cycleType===0){
                 cycle+="个月";
               }else{
                 cycle+="年"
@@ -298,28 +300,31 @@
                   }
                 }
                 //支付方式
-                if (r.data.pay_way.indexOf("wx") > -1) {
-                    $(".line_payway").css("display", "");
-                    $(".payWay").text("微信支付");
-                } else if (r.data.pay_way.indexOf("ali") > -1) {
-                    $(".payWay").text("支付宝支付");
-                    $(".line_payway").css("display", "");
-                } else if (r.data.pay_way === "transferAccounts") {//试用用户 
-                    window.isTransferPay = r.data.applybill_status === 0
-                    $(".payWay").html("公对公转账");
-                    if(filterObj.transferV&&filterObj.level!=5){
-                        initImgView(filterObj.transferV)
-                        $(".payWay").html("公对公转账<span style='color: #2ABED1' onclick='showImg()'>&nbsp;查看凭证</span>");
-                    }
-                    $(".line_payway").css("display", "");
+                if (r.data.billingMode===1){
+                    if (r.data.pay_way.indexOf("wx") > -1||r.data.return_type===1) {
+                        $(".line_payway").css("display", "");
+                        $(".payWay").text("微信支付");
+                    } else if (r.data.pay_way.indexOf("ali") > -1||r.data.return_type===2) {
+                        $(".payWay").text("支付宝支付");
+                        $(".line_payway").css("display", "");
+                    } else if (r.data.pay_way === "transferAccounts"&&(r.data.is_backstage_order===1&&r.data.return_status>0||r.data.is_backstage_order===0)) {//试用用户
+                        window.isTransferPay = r.data.applybill_status === 0
+                        $(".payWay").html("公对公转账");
+                        if(filterObj.transferV&&filterObj.level!=5){
+                            initImgView(filterObj.transferV)
+                            $(".payWay").html("公对公转账<span style='color: #2ABED1' onclick='showImg()'>&nbsp;查看凭证</span>");
+                        }
+                        $(".line_payway").css("display", "");
 
-                    $(".l-item.paymoney").css("display", "");
-                    //$(".price").text("¥ " + formatMoney(r.data.pay_money / 100) + "元");
-                    //return
-                } else {//试用用户
-                    $(".invoice").css("display", "none");
-                    //return
+                        $(".l-item.paymoney").css("display", "");
+                        //$(".price").text("¥ " + formatMoney(r.data.pay_money / 100) + "元");
+                        //return
+                    } else {//试用用户
+                        $(".invoice").css("display", "none");
+                        //return
+                    }
                 }
+
                 $(".l-item.paymoney").css("display", "");
                 $(".price").text("¥ " + formatMoney(r.data.pay_money / 100));
                 if (r.data.pay_time) {

+ 24 - 18
src/web/templates/weixin/member/subAccountDetail.html

@@ -230,27 +230,30 @@
                   $('.j-footer').show().html(pay_again);
                 }
                 //支付方式
-                if (r.data.pay_way.indexOf("wx") > -1) {
-                    $(".line_payway").css("display", "");
-                    $(".payWay").text("微信支付");
-                } else if (r.data.pay_way.indexOf("ali") > -1) {
-                    $(".payWay").text("支付宝支付");
-                    $(".line_payway").css("display", "");
-                } else if (r.data.pay_way === "transferAccounts") {//试用用户
-                    $(".payWay").html("公对公转账");
-                    if (filterObj.transferV) {
-                      $(".payWay").html("公对公转账<span style='color: #2ABED1' onclick='showImg(\"" + filterObj.transferV + "\")'>&nbsp;查看凭证</span>");
-                    }
-                    $(".line_payway").css("display", "");
+                if(r.data.billingMode===1){
+                    if (r.data.pay_way.indexOf("wx") > -1||r.data.return_type===1) {
+                        $(".line_payway").css("display", "");
+                        $(".payWay").text("微信支付");
+                    } else if (r.data.pay_way.indexOf("ali") > -1||r.data.return_type===2) {
+                        $(".payWay").text("支付宝支付");
+                        $(".line_payway").css("display", "");
+                    } else if (r.data.pay_way === "transferAccounts"&&(r.data.is_backstage_order===1&&r.data.return_status>0||r.data.is_backstage_order===0)) {//试用用户
+                        $(".payWay").html("公对公转账");
+                        if (filterObj.transferV) {
+                            $(".payWay").html("公对公转账<span style='color: #2ABED1' onclick='showImg(\"" + filterObj.transferV + "\")'>&nbsp;查看凭证</span>");
+                        }
+                        $(".line_payway").css("display", "");
 
-                    $(".l-item.paymoney").css("display", "");
-                    $(".paymoney .price").text("¥ " + formatMoney(r.data.pay_money / 100));
-                   // return
-                } else {//试用用户
-                    $(".invoice").css("display", "none");
-                    return
+                        $(".l-item.paymoney").css("display", "");
+                        $(".paymoney .price").text("¥ " + formatMoney(r.data.pay_money / 100));
+                        // return
+                    } else {//试用用户
+                        $(".invoice").css("display", "none");
+                        return
+                    }
                 }
 
+
                 if (r.data.pay_time) {
                     $(".line_paytime").css("display", "");
                     $(".payTime").text(r.data.pay_time.replace("-", ".").replace("-", "."));
@@ -330,6 +333,9 @@
                 $("#pageTitle").text("已取消");
                 $(".invoice").css("display", "none");//隐藏开发票
             }
+            if(r.data.is_backstage_order===1){
+                $(".invoice").css("display", "none");//隐藏开发票
+            }
         })
     })
 

+ 51 - 23
src/web/templates/weixin/vipsubscribe/vip_order_detail.html

@@ -223,7 +223,9 @@
                 }
                 //产品类型
                 if (r.data.order.order_money == 0) {
-                    $(".productType").text("超级订阅(试用)");
+                    if (r.data.order.billingMode!=0){
+                        $(".productType").text("超级订阅(试用)");
+                    }
                     $(".discountPrice").parent().hide();
                 }
                 //价格
@@ -634,11 +636,26 @@
                     }
                     $(".payPrice").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100) + "元");
                     $("#card-header-bg").addClass("bg finish-bg")
+
+
+                    if (r.data.order.return_status === 0||r.data.order.return_status === 2){
+                        $("#card-header-bg").addClass("bg nopay-bg")
+                        if (r.data.order.return_status === 0){
+                            $("#pageTitle").text("待付款");
+                        }else if (r.data.order.return_status === 2){
+                            $("#pageTitle").text("待付完");
+                        }
+                    }else{
+                        $("#card-header-bg").addClass("bg finish-bg")
+                        $("#pageTitle").text("已完成");
+                    }
                     $("#pageTitle").addClass("status")
-                    $("#pageTitle").text("已完成");
+
                     //支付时间
-                    $(".line_paytime").css("display", "");
-                    if (r.data.order.pay_time) $(".payTime").text(r.data.order.pay_time.replace("-", ".").replace("-", "."));
+                    if (r.data.order.pay_time){
+                        $(".line_paytime").css("display", "");
+                        $(".payTime").text(r.data.order.pay_time.replace("-", ".").replace("-", "."));
+                    }
                     if (r.data.order.order_money == 0) {
                         $(".line_paytime").css("display", "none");
                     }
@@ -658,29 +675,40 @@
                     }
 
                     //支付方式
-                    if (r.data.order.pay_way&&r.data.order.pay_way.indexOf("wx") > -1) {
-                        $(".line_payway").css("display", "");
-                        $(".payWay").text("微信支付");
-                    } else if (r.data.order.pay_way&&r.data.order.pay_way.indexOf("ali") > -1) {
-                        $(".payWay").text("支付宝支付");
-                        $(".line_payway").css("display", "");
-                    } else {//试用用户
-                        $(".invoice").css("display", "none");
-                        return
+                    if(r.data.order.billingMode===1){
+                        if (r.data.order.pay_way.indexOf("wx") > -1||r.data.order.return_type===1) {
+                            $(".line_payway").css("display", "");
+                            $(".payWay").text("微信支付");
+                        } else if (r.data.order.pay_way.indexOf("ali") > -1||r.data.order.return_type===2) {
+                            $(".payWay").text("支付宝支付");
+                            $(".line_payway").css("display", "");
+                        } else if(r.data.order.pay_way === "transferAccounts"&&(r.data.order.is_backstage_order===1&&r.data.order.return_status>0||r.data.order.is_backstage_order===0)){
+                            $(".payWay").text("公对公转账");
+                            $(".line_payway").css("display", "");
+                        }else {
+                            $(".invoice").css("display", "none");
+                            return
+                        }
+                    }
+
+
+                    if (r.data.transaction_id){
+                        $(".line_transaction").css("display", "");
+                        $(".transaction_id").text(r.data.transaction_id);
                     }
 
-                    $(".line_transaction").css("display", "");
-                    if (r.data.transaction_id) $(".transaction_id").text(r.data.transaction_id);
-                    var pay_again = ""
                     //发票
-                    if (r.data.order.applybill_status === 0) {
-                        //已支付未申请发票
-                        pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()'>开发票</button>"
-                    } else if (r.data.order.applybill_status === 1 || r.data.order.applybill_status === 2) {
-                        //已支付已申请发票
-                        pay_again += "<button class=\"j-button-cancel\" onclick='checkInvoice(" + r.data.order.applybill_status + ")'>查看发票</button>"
+                    if (r.data.order.is_backstage_order!==1){
+                        var pay_again = ""
+                        if (r.data.order.applybill_status === 0) {
+                            //已支付未申请发票
+                            pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()'>开发票</button>"
+                        } else if (r.data.order.applybill_status === 1 || r.data.order.applybill_status === 2) {
+                            //已支付已申请发票
+                            pay_again += "<button class=\"j-button-cancel\" onclick='checkInvoice(" + r.data.order.applybill_status + ")'>查看发票</button>"
+                        }
+                        $('.j-footer').show().html(pay_again)
                     }
-                    $('.j-footer').show().html(pay_again)
                 } else if (r.data.order.order_status == -2 || r.data.order.order_status == -3) {
                     $("#card-header-bg").addClass("bg cancel-bg")
                     $("#pageTitle").addClass("status")