Browse Source

订单开发票-线下开发票pc提示

wangkaiyue 4 years ago
parent
commit
699f2fbb88

+ 1 - 7
src/jfw/front/dataExport.go

@@ -266,11 +266,6 @@ func (d *DataExport) ToOrderDetail(orderCode string) error {
 	} else {
 	} else {
 		orderDetail["applybill_type"] = "-"
 		orderDetail["applybill_type"] = "-"
 	}
 	}
-	if orderDetail["applybill_status"] != nil && orderDetail["applybill_status"].(int64) == 1 {
-		orderDetail["applybill_status"] = "T" //已申请
-	} else {
-		orderDetail["applybill_status"] = "F" //未申请
-	}
 	orderStatus := util.IntAll((orderDetail)["order_status"])
 	orderStatus := util.IntAll((orderDetail)["order_status"])
 	if orderStatus == 1 {
 	if orderStatus == 1 {
 		orderDetail["transaction_id"] = func() string {
 		orderDetail["transaction_id"] = func() string {
@@ -298,8 +293,7 @@ func (d *DataExport) ToOrderDetail(orderCode string) error {
 	}
 	}
 	d.T["o"] = orderDetail
 	d.T["o"] = orderDetail
 	d.T["logid"] = config.Seoconfig["dataexport"].(string)
 	d.T["logid"] = config.Seoconfig["dataexport"].(string)
-	d.Render("/pc/orderDetail.html", &d.T)
-	return nil
+	return d.Render("/pc/orderDetail.html", &d.T)
 }
 }
 
 
 //------------------------------申请发票跳转页面-----------------------------
 //------------------------------申请发票跳转页面-----------------------------

+ 20 - 8
src/web/templates/order/pc/bidfile/bidfileDetail.html

@@ -150,7 +150,7 @@
 
 
                     $(".price").text("¥ " + formatMoney(r.data.order_money / 100) + "元");
                     $(".price").text("¥ " + formatMoney(r.data.order_money / 100) + "元");
 
 
-                    $(".count").text(filterObj.count+"次");
+                    $(".count").text(filterObj.count + "次");
                     if (r.data.order_status === 1) {
                     if (r.data.order_status === 1) {
                         $("#status_success").removeClass("hide");
                         $("#status_success").removeClass("hide");
                         $(".pay_time_p").css("display", "");
                         $(".pay_time_p").css("display", "");
@@ -176,14 +176,16 @@
                         }
                         }
 
 
                         if (r.data.prepay_id) {
                         if (r.data.prepay_id) {
-                          $(".pay_num").text(r.data.prepay_id);
-                           $(".pay_num_p").show();
+                            $(".pay_num").text(r.data.prepay_id);
+                            $(".pay_num_p").show();
                         }
                         }
                         //发票
                         //发票
                         if (r.data.applybill_status === 0) {
                         if (r.data.applybill_status === 0) {
                             $(".openinvoice").css("display", "");
                             $(".openinvoice").css("display", "");
-                        } else {
-                            $(".lookinvoice").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) {
                     if (r.data.order_status === -2) {
@@ -228,9 +230,6 @@
                     }
                     }
                 })
                 })
             })
             })
-            $(".lookinvoice").on("click", function () {
-                window.open("/front/order/check_invoice/" + orderCode, '_self');
-            })
 
 
             $(".payOrder").on("click", function () {
             $(".payOrder").on("click", function () {
                 location.href = "/front/bidfile/orderPay/" + orderCode
                 location.href = "/front/bidfile/orderPay/" + orderCode
@@ -317,6 +316,19 @@
             var money = t.split('').reverse().join('') + point + right;
             var money = t.split('').reverse().join('') + point + right;
             return money;
             return money;
         }
         }
+
+        //查看发票
+        function checkinvoice(flag, orderCode) {
+            if (flag === 2) {
+                var showHtml = '<div style="width: 100%;height: 100%;z-index: 999; position: absolute;top: 0;background: rgba(0, 0, 0, 0.65);">   <div style="position: fixed;z-index: 9999;width: 540px;height: 262px;left: 50%;top: 30%;margin-left: -270px;background-color: #fff;border-radius: 6px;padding: 32px;display: flex;flex-direction: column;justify-items: center;align-items: center;">       <div class="invoice_title" style="color: #1D1D1D;font-size: 18px;line-height: 28px;">提示</div>       <div class="invoice_body"            style="height: 78px;margin: 20px 0px;font-size: 14px;line-height: 24px;text-align: center;">           您已开具发票<br>           如有问题请联系客服<br>           400-108-6670       </div>       <div class="invoice_control"            style="width: 132px;height: 36px;text-align: center;background: #2CB7CA;border-radius: 6px;font-size: 16px;line-height: 36px;color: #FFFFFF;cursor: pointer;"            onclick="document.querySelector(\'#invoice_tip\').remove()"       >           我知道了       </div>   </div>\n</div>'
+                var div_invoice_tip = document.createElement('div');
+                div_invoice_tip.innerHTML = showHtml;
+                div_invoice_tip.id = "invoice_tip"
+                document.body.appendChild(div_invoice_tip)
+                return
+            }
+            window.open("/front/order/check_invoice/" + orderCode, '_self');
+        }
     </script>
     </script>
 </body>
 </body>
 </html>
 </html>

+ 19 - 7
src/web/templates/order/pc/datareport/detail.html

@@ -168,14 +168,16 @@
                         $(".pay_num_p").css("display", "");
                         $(".pay_num_p").css("display", "");
                         if (r.data.orderInfo.paymentId) $(".pay_num").text(r.data.orderInfo.paymentId);
                         if (r.data.orderInfo.paymentId) $(".pay_num").text(r.data.orderInfo.paymentId);
                         //发票
                         //发票
-                        if (r.data.orderInfo.applybillStatus == 0) {
+                        if (r.data.orderInfo.applybillStatus === 0) {
                             $(".openinvoice").css("display", "");
                             $(".openinvoice").css("display", "");
-                        } else {
-                            $(".lookinvoice").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)
+                            })
                         }
                         }
                         $(".pay_money").text("¥" + price + "元");
                         $(".pay_money").text("¥" + price + "元");
                     }
                     }
-                    if (r.data.orderInfo.state == -2||r.data.orderInfo.state == -3) {
+                    if (r.data.orderInfo.state == -2 || r.data.orderInfo.state == -3) {
                         $("#status_cancelled").removeClass("hide");
                         $("#status_cancelled").removeClass("hide");
                         $("#bg").addClass("qxBg").removeClass("greenBg");
                         $("#bg").addClass("qxBg").removeClass("greenBg");
                         if (r.data.orderInfo.payMoney) {
                         if (r.data.orderInfo.payMoney) {
@@ -204,9 +206,6 @@
                     }
                     }
                 })
                 })
             })
             })
-            $(".lookinvoice").on("click", function () {
-                window.open("/front/order/check_invoice/" + orderCode, '_self');
-            })
             $(".payOrder").on("click", function () {
             $(".payOrder").on("click", function () {
                 location.href = "/front/datareport/orderPay/" + orderCode;
                 location.href = "/front/datareport/orderPay/" + orderCode;
             })
             })
@@ -250,6 +249,19 @@
                 return YY + MM + DD
                 return YY + MM + DD
             }
             }
         }
         }
+
+        //查看发票
+        function checkinvoice(flag, orderCode) {
+            if (flag === 2) {
+                var showHtml = '<div style="width: 100%;height: 100%;z-index: 999; position: absolute;top: 0;background: rgba(0, 0, 0, 0.65);">   <div style="position: fixed;z-index: 9999;width: 540px;height: 262px;left: 50%;top: 30%;margin-left: -270px;background-color: #fff;border-radius: 6px;padding: 32px;display: flex;flex-direction: column;justify-items: center;align-items: center;">       <div class="invoice_title" style="color: #1D1D1D;font-size: 18px;line-height: 28px;">提示</div>       <div class="invoice_body"            style="height: 78px;margin: 20px 0px;font-size: 14px;line-height: 24px;text-align: center;">           您已开具发票<br>           如有问题请联系客服<br>           400-108-6670       </div>       <div class="invoice_control"            style="width: 132px;height: 36px;text-align: center;background: #2CB7CA;border-radius: 6px;font-size: 16px;line-height: 36px;color: #FFFFFF;cursor: pointer;"            onclick="document.querySelector(\'#invoice_tip\').remove()"       >           我知道了       </div>   </div>\n</div>'
+                var div_invoice_tip = document.createElement('div');
+                div_invoice_tip.innerHTML = showHtml;
+                div_invoice_tip.id = "invoice_tip"
+                document.body.appendChild(div_invoice_tip)
+                return
+            }
+            window.open("/front/order/check_invoice/" + orderCode, '_self');
+        }
     </script>
     </script>
 </body>
 </body>
 </html>
 </html>

+ 22 - 10
src/web/templates/pc/aiPack_orderDetail.html

@@ -184,16 +184,18 @@
                             $(".price").text("¥ " + formatMoney(r.data.pay_money / 100) + "元");
                             $(".price").text("¥ " + formatMoney(r.data.pay_money / 100) + "元");
                         }
                         }
                         console.log(r.data.prepay_id)
                         console.log(r.data.prepay_id)
-                        if (r.data.prepay_id){
-                          console.log("~")
-                          $(".pay_num").text(r.data.prepay_id);
-                          $(".pay_num_p").css("display", "");
+                        if (r.data.prepay_id) {
+                            console.log("~")
+                            $(".pay_num").text(r.data.prepay_id);
+                            $(".pay_num_p").css("display", "");
                         }
                         }
                         //发票
                         //发票
                         if (r.data.applybill_status === 0) {
                         if (r.data.applybill_status === 0) {
                             $(".openinvoice").css("display", "");
                             $(".openinvoice").css("display", "");
-                        } else {
-                            $(".lookinvoice").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) {
                     if (r.data.order_status === -2) {
@@ -238,9 +240,6 @@
                     }
                     }
                 })
                 })
             })
             })
-            $(".lookinvoice").on("click", function () {
-                window.open("/front/order/check_invoice/" + orderCode, '_self');
-            })
 
 
             $(".payOrder").on("click", function () {
             $(".payOrder").on("click", function () {
                 location.href = "/front/aiForecastPack/orderPay/" + orderCode;
                 location.href = "/front/aiForecastPack/orderPay/" + orderCode;
@@ -251,7 +250,7 @@
             if (!imgSrc) {
             if (!imgSrc) {
                 retunn
                 retunn
             }
             }
-            if ((window.location.host.indexOf("test") > -1)||(window.location.host.indexOf("zxl") > -1)) {
+            if ((window.location.host.indexOf("test") > -1) || (window.location.host.indexOf("zxl") > -1)) {
                 imgSrc = "https://web2-qmxtest.jianyu360.cn" + imgSrc
                 imgSrc = "https://web2-qmxtest.jianyu360.cn" + imgSrc
             } else if (window.location.host.indexOf("com") > -1) {
             } else if (window.location.host.indexOf("com") > -1) {
                 imgSrc = "https://www.qmx.top" + imgSrc
                 imgSrc = "https://www.qmx.top" + imgSrc
@@ -332,6 +331,19 @@
             var money = t.split('').reverse().join('') + point + right;
             var money = t.split('').reverse().join('') + point + right;
             return money;
             return money;
         }
         }
+
+        //查看发票
+        function checkinvoice(flag, orderCode) {
+            if (flag === 2) {
+                var showHtml = '<div style="width: 100%;height: 100%;z-index: 999; position: absolute;top: 0;background: rgba(0, 0, 0, 0.65);">   <div style="position: fixed;z-index: 9999;width: 540px;height: 262px;left: 50%;top: 30%;margin-left: -270px;background-color: #fff;border-radius: 6px;padding: 32px;display: flex;flex-direction: column;justify-items: center;align-items: center;">       <div class="invoice_title" style="color: #1D1D1D;font-size: 18px;line-height: 28px;">提示</div>       <div class="invoice_body"            style="height: 78px;margin: 20px 0px;font-size: 14px;line-height: 24px;text-align: center;">           您已开具发票<br>           如有问题请联系客服<br>           400-108-6670       </div>       <div class="invoice_control"            style="width: 132px;height: 36px;text-align: center;background: #2CB7CA;border-radius: 6px;font-size: 16px;line-height: 36px;color: #FFFFFF;cursor: pointer;"            onclick="document.querySelector(\'#invoice_tip\').remove()"       >           我知道了       </div>   </div>\n</div>'
+                var div_invoice_tip = document.createElement('div');
+                div_invoice_tip.innerHTML = showHtml;
+                div_invoice_tip.id = "invoice_tip"
+                document.body.appendChild(div_invoice_tip)
+                return
+            }
+            window.open("/front/order/check_invoice/" + orderCode, '_self');
+        }
     </script>
     </script>
 </body>
 </body>
 </html>
 </html>

+ 18 - 6
src/web/templates/pc/entniche_orderDetail.html

@@ -157,10 +157,12 @@
                         $(".pay_num_p").css("display", "");
                         $(".pay_num_p").css("display", "");
                         if (r.data.prepay_id) $(".pay_num").text(r.data.prepay_id);
                         if (r.data.prepay_id) $(".pay_num").text(r.data.prepay_id);
                         //发票
                         //发票
-                        if (r.data.applybill_status == 0) {
+                        if (r.data.applybill_status === 0) {
                             $(".openinvoice").css("display", "");
                             $(".openinvoice").css("display", "");
-                        } else {
-                            $(".lookinvoice").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) {
                     if (r.data.order_status == -2) {
@@ -186,9 +188,6 @@
                     }
                     }
                 })
                 })
             })
             })
-            $(".lookinvoice").on("click", function () {
-                window.open("/front/order/check_invoice/" + orderCode, '_self');
-            })
 
 
             $(".payOrder").on("click", function () {
             $(".payOrder").on("click", function () {
                 location.href = "/front/entniche/orderPay/" + orderCode
                 location.href = "/front/entniche/orderPay/" + orderCode
@@ -216,6 +215,19 @@
             }
             }
             return items;
             return items;
         };
         };
+
+        //查看发票
+        function checkinvoice(flag, orderCode) {
+            if (flag === 2) {
+                var showHtml = '<div style="width: 100%;height: 100%;z-index: 999; position: absolute;top: 0;background: rgba(0, 0, 0, 0.65);">   <div style="position: fixed;z-index: 9999;width: 540px;height: 262px;left: 50%;top: 30%;margin-left: -270px;background-color: #fff;border-radius: 6px;padding: 32px;display: flex;flex-direction: column;justify-items: center;align-items: center;">       <div class="invoice_title" style="color: #1D1D1D;font-size: 18px;line-height: 28px;">提示</div>       <div class="invoice_body"            style="height: 78px;margin: 20px 0px;font-size: 14px;line-height: 24px;text-align: center;">           您已开具发票<br>           如有问题请联系客服<br>           400-108-6670       </div>       <div class="invoice_control"            style="width: 132px;height: 36px;text-align: center;background: #2CB7CA;border-radius: 6px;font-size: 16px;line-height: 36px;color: #FFFFFF;cursor: pointer;"            onclick="document.querySelector(\'#invoice_tip\').remove()"       >           我知道了       </div>   </div>\n</div>'
+                var div_invoice_tip = document.createElement('div');
+                div_invoice_tip.innerHTML = showHtml;
+                div_invoice_tip.id = "invoice_tip"
+                document.body.appendChild(div_invoice_tip)
+                return
+            }
+            window.open("/front/order/check_invoice/" + orderCode, '_self');
+        }
     </script>
     </script>
 </body>
 </body>
 </html>
 </html>

+ 17 - 5
src/web/templates/pc/member_orderDetail.html

@@ -215,8 +215,10 @@
                         //发票
                         //发票
                         if (r.data.applybill_status === 0) {
                         if (r.data.applybill_status === 0) {
                             $(".openinvoice").css("display", "");
                             $(".openinvoice").css("display", "");
-                        } else {
-                            $(".lookinvoice").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) {
                     if (r.data.order_status === -2) {
@@ -261,9 +263,6 @@
                     }
                     }
                 })
                 })
             })
             })
-            $(".lookinvoice").on("click", function () {
-                window.open("/front/order/check_invoice/" + orderCode, '_self');
-            })
 
 
             $(".payOrder").on("click", function () {
             $(".payOrder").on("click", function () {
                 location.href = "/front/member/orderPay/" + orderCode
                 location.href = "/front/member/orderPay/" + orderCode
@@ -350,6 +349,19 @@
             var money = t.split('').reverse().join('') + point + right;
             var money = t.split('').reverse().join('') + point + right;
             return money;
             return money;
         }
         }
+
+        //查看发票
+        function checkinvoice(flag, orderCode) {
+            if (flag === 2) {
+                var showHtml = '<div style="width: 100%;height: 100%;z-index: 999; position: absolute;top: 0;background: rgba(0, 0, 0, 0.65);">   <div style="position: fixed;z-index: 9999;width: 540px;height: 262px;left: 50%;top: 30%;margin-left: -270px;background-color: #fff;border-radius: 6px;padding: 32px;display: flex;flex-direction: column;justify-items: center;align-items: center;">       <div class="invoice_title" style="color: #1D1D1D;font-size: 18px;line-height: 28px;">提示</div>       <div class="invoice_body"            style="height: 78px;margin: 20px 0px;font-size: 14px;line-height: 24px;text-align: center;">           您已开具发票<br>           如有问题请联系客服<br>           400-108-6670       </div>       <div class="invoice_control"            style="width: 132px;height: 36px;text-align: center;background: #2CB7CA;border-radius: 6px;font-size: 16px;line-height: 36px;color: #FFFFFF;cursor: pointer;"            onclick="document.querySelector(\'#invoice_tip\').remove()"       >           我知道了       </div>   </div>\n</div>'
+                var div_invoice_tip = document.createElement('div');
+                div_invoice_tip.innerHTML = showHtml;
+                div_invoice_tip.id = "invoice_tip"
+                document.body.appendChild(div_invoice_tip)
+                return
+            }
+            window.open("/front/order/check_invoice/" + orderCode, '_self');
+        }
     </script>
     </script>
 </body>
 </body>
 </html>
 </html>

+ 68 - 54
src/web/templates/pc/myOrder.html

@@ -370,10 +370,10 @@
                                     ',this,\'' + obj.filter_id + '\',0)">取消订单</a></p>'
                                     ',this,\'' + obj.filter_id + '\',0)">取消订单</a></p>'
                             } else if (orderStatus === 1) {//已完成
                             } else if (orderStatus === 1) {//已完成
                                 m_status_html += '<p class="finish_status">已完成</p>'
                                 m_status_html += '<p class="finish_status">已完成</p>'
-                                if (obj.applybill_status === 1) {
-                                    m_handle_html += '<p><a href="/front/order/check_invoice/' + orderCode + '">发票信息</a></p>'
-                                } else {
+                                if (obj.applybill_status === 0) {
                                     m_handle_html += '<p><a onclick="check_over(\'' + orderCode + '\')">开发票</a></p>';
                                     m_handle_html += '<p><a onclick="check_over(\'' + orderCode + '\')">开发票</a></p>';
+                                } else if (obj.applybill_status === 1 || obj.applybill_status === 2) {
+                                    m_handle_html += '<p><a onclick="checkinvoice(' + obj.applybill_status + ',\'' + "/front/order/check_invoice/" + orderCode + '\')" >发票信息</a></p>'
                                 }
                                 }
                                 m_handle_html += '<p><a  orderCode="' + orderCode + '" href="/front/dataExport/toSieve">再次购买</a></p>'
                                 m_handle_html += '<p><a  orderCode="' + orderCode + '" href="/front/dataExport/toSieve">再次购买</a></p>'
                             } else if (orderStatus === -2 || orderStatus === -3) {//已取消
                             } else if (orderStatus === -2 || orderStatus === -3) {//已取消
@@ -411,8 +411,8 @@
                                 //4:对公转账审核通过(同时修改订单状态为已完成);5:退款审核中;6:已退款;
                                 //4:对公转账审核通过(同时修改订单状态为已完成);5:退款审核中;6:已退款;
                                 if (parseInt(course_status) === 5) {
                                 if (parseInt(course_status) === 5) {
                                     m_status_html += '<p class="unfinished">退款审核中</p>'
                                     m_status_html += '<p class="unfinished">退款审核中</p>'
-                                    if (obj.applybill_status) {
-                                        m_handle_html += '<p><a href="/front/course/viewInvoice?orderCode=' + orderCode + '">发票信息</a></p>'
+                                    if (obj.applybill_status === 1 || obj.applybill_status === 2) {
+                                        m_handle_html += '<p><a onclick="checkinvoice(' + obj.applybill_status + ',\'' + "/front/course/viewInvoice?orderCode=" + orderCode + '\')" >发票信息</a></p>'
                                     }
                                     }
                                     m_handle_html += '<p><a href="/front/course/detail?aboutFlag=true&_id=' + obj.filter_id + '">再次购买</a></p>'
                                     m_handle_html += '<p><a href="/front/course/detail?aboutFlag=true&_id=' + obj.filter_id + '">再次购买</a></p>'
                                 } else if (parseInt(course_status) === 6) {
                                 } else if (parseInt(course_status) === 6) {
@@ -429,10 +429,10 @@
                                         }
                                         }
                                     } catch (e) {
                                     } catch (e) {
                                     }
                                     }
-                                    if (obj.applybill_status) {
-                                        m_handle_html += '<p><a href="/front/course/viewInvoice?orderCode=' + orderCode + '">发票信息</a></p>'
-                                    } else {
+                                    if (obj.applybill_status === 0) {
                                         m_handle_html += '<p><a href="/front/course/applyInvoice?orderCode=' + orderCode + '">开发票</a></p>'
                                         m_handle_html += '<p><a href="/front/course/applyInvoice?orderCode=' + orderCode + '">开发票</a></p>'
+                                    } else if (obj.applybill_status === 1 || obj.applybill_status === 2) {
+                                        m_handle_html += '<p><a onclick="checkinvoice(' + obj.applybill_status + ',\'' + "/front/course/viewInvoice?orderCode=" + orderCode + '\')">发票信息</a></p>'
                                     }
                                     }
                                     m_handle_html += '<p><a  href="/front/course/detail?aboutFlag=true&_id=' + obj.filter_id + '">再次购买</a></p>'
                                     m_handle_html += '<p><a  href="/front/course/detail?aboutFlag=true&_id=' + obj.filter_id + '">再次购买</a></p>'
                                 }
                                 }
@@ -467,16 +467,17 @@
                             } else if (orderStatus === 1) {//已完成
                             } else if (orderStatus === 1) {//已完成
                                 m_status_html += '<p class="finish_status">已完成</p>'
                                 m_status_html += '<p class="finish_status">已完成</p>'
                                 if (filter_.i_drawer === 1) {
                                 if (filter_.i_drawer === 1) {
-                                    if (obj.applybill_status) {
-                                        m_handle_html += '<p><a href="/front/order/check_invoice/' + orderCode + '">发票信息</a></p>'
-                                    } else {
+                                    if (obj.applybill_status === 0) {
                                         m_handle_html += '<p><a href="/front/order/invoice/' + orderCode + '">开发票</a></p>'
                                         m_handle_html += '<p><a href="/front/order/invoice/' + orderCode + '">开发票</a></p>'
+                                    } else if (obj.applybill_status === 1 || obj.applybill_status === 2) {
+                                        m_handle_html += '<p><a onclick="checkinvoice(' + obj.applybill_status + ',\'' + "/front/order/check_invoice/" + orderCode + '\')">发票信息</a></p>'
                                     }
                                     }
                                 } else {
                                 } else {
-                                    if (obj.applybill_status) {
-                                        m_handle_html += '<p><a href="/jyxspc/checkInvoice?ids=' + id + '&code=' + orderCode + '">发票信息</a></p>'
-                                    } else {
+                                    if (obj.applybill_status === 0) {
                                         m_handle_html += '<p><a href="/jyxspc/invoice?ids=' + id + '&code=' + orderCode + '">开发票</a></p>'
                                         m_handle_html += '<p><a href="/jyxspc/invoice?ids=' + id + '&code=' + orderCode + '">开发票</a></p>'
+                                    } else if (obj.applybill_status === 1 || obj.applybill_status === 2) {
+                                        var toHref = "/jyxspc/checkInvoice?ids=" + id + "&code=" + orderCode
+                                        m_handle_html += '<p><a onclick="checkinvoice(' + obj.applybill_status + ',\'' + toHref + '\')">发票信息</a></p>'
                                     }
                                     }
                                 }
                                 }
                             } else if (orderStatus === -2 || orderStatus === -3) {//已取消
                             } else if (orderStatus === -2 || orderStatus === -3) {//已取消
@@ -499,10 +500,10 @@
                                     + '<p><a  orderCode="' + orderCode + '" onclick="toCancel(' + id + ',this,\'' + obj.filter_id + '\',5)">取消订单</a></p>'
                                     + '<p><a  orderCode="' + orderCode + '" onclick="toCancel(' + id + ',this,\'' + obj.filter_id + '\',5)">取消订单</a></p>'
                             } else if (orderStatus === 1) {//已完成
                             } else if (orderStatus === 1) {//已完成
                                 m_status_html += '<p class="finish_status">已完成</p>'
                                 m_status_html += '<p class="finish_status">已完成</p>'
-                                if (obj.applybill_status) {
-                                    m_handle_html += '<p><a href="/front/order/check_invoice/' + orderCode + '">发票信息</a></p>'
-                                } else {
+                                if (obj.applybill_status === 0) {
                                     m_handle_html += '<p><a onclick="check_over(\'' + orderCode + '\')">开发票</a></p>';
                                     m_handle_html += '<p><a onclick="check_over(\'' + orderCode + '\')">开发票</a></p>';
+                                } else if (obj.applybill_status === 1 || obj.applybill_status === 2) {
+                                    m_handle_html += '<p><a onclick="checkinvoice(' + obj.applybill_status + ',\'' + "/front/order/check_invoice/" + orderCode + '\')">发票信息</a></p>'
                                 }
                                 }
                             } else if (orderStatus === -2 || orderStatus === -3) {//已取消
                             } else if (orderStatus === -2 || orderStatus === -3) {//已取消
                                 m_status_html += '<p class="finish_status">已取消</p>'
                                 m_status_html += '<p class="finish_status">已取消</p>'
@@ -611,11 +612,10 @@
                                     m_handle_html += '-'
                                     m_handle_html += '-'
                                 } else {
                                 } else {
                                     m_status_html += '<p class="finish_status">已完成</p>'
                                     m_status_html += '<p class="finish_status">已完成</p>'
-
-                                    if (obj.applybill_status === 1) {
-                                        m_handle_html += '<p><a href="/front/order/check_invoice/' + orderCode + '">发票信息</a></p>'
-                                    } else {
+                                    if (obj.applybill_status === 0) {
                                         m_handle_html += '<p><a onclick="check_over(\'' + orderCode + '\')">开发票</a></p>';
                                         m_handle_html += '<p><a onclick="check_over(\'' + orderCode + '\')">开发票</a></p>';
+                                    } else if (obj.applybill_status === 1 || obj.applybill_status === 2) {
+                                        m_handle_html += '<p><a onclick="checkinvoice(' + obj.applybill_status + ',\'' + "/front/order/check_invoice/" + orderCode + '\')">发票信息</a></p>'
                                     }
                                     }
                                 }
                                 }
                             } else if (orderStatus === -2 || orderStatus === -3) {//已取消
                             } else if (orderStatus === -2 || orderStatus === -3) {//已取消
@@ -641,10 +641,10 @@
 
 
                             } else if (orderStatus === 1) {//已完成
                             } else if (orderStatus === 1) {//已完成
                                 m_status_html += '<p class="finish_status">已完成</p>'
                                 m_status_html += '<p class="finish_status">已完成</p>'
-                                if (obj.applybill_status === 1) {
-                                    m_handle_html += '<p><a href="/front/order/check_invoice/' + orderCode + '">发票信息</a></p>'
-                                } else {
+                                if (obj.applybill_status === 0) {
                                     m_handle_html += '<p><a onclick="check_over(\'' + orderCode + '\')">开发票</a></p>';
                                     m_handle_html += '<p><a onclick="check_over(\'' + orderCode + '\')">开发票</a></p>';
+                                } else if (obj.applybill_status === 1 || obj.applybill_status === 2) {
+                                    m_handle_html += '<p><a onclick="checkinvoice(' + obj.applybill_status + ',\'' + "/front/order/check_invoice/" + orderCode + '\')">发票信息</a></p>'
                                 }
                                 }
                             } else if (orderStatus === -2 || orderStatus === -3) {//已取消
                             } else if (orderStatus === -2 || orderStatus === -3) {//已取消
                                 m_status_html += '<p class="finish_status">已取消</p>'
                                 m_status_html += '<p class="finish_status">已取消</p>'
@@ -674,15 +674,15 @@
                             if (obj.vip_endtime != null) {
                             if (obj.vip_endtime != null) {
                                 member_endtime = formatTime(obj.vip_endtime).replace(/\./g, "/") + " 到期";
                                 member_endtime = formatTime(obj.vip_endtime).replace(/\./g, "/") + " 到期";
                             }
                             }
-                            var member_cycle ;
-                            if (filter_.level==4){
-                              member_cycle=filter_.cycle +"天";
-                            }else{
-                              member_cycle=filter_.cycle +"年";
+                            var member_cycle;
+                            if (filter_.level == 4) {
+                                member_cycle = filter_.cycle + "天";
+                            } else {
+                                member_cycle = filter_.cycle + "年";
                             }
                             }
                             shop_img_html += '<img src=' + imgurl + ' alt="">'
                             shop_img_html += '<img src=' + imgurl + ' alt="">'
                             shop_main_html += '<p style="line-height: 24px;">会员等级:' + level_map.get(filter_.level).get("level") + '</p>'
                             shop_main_html += '<p style="line-height: 24px;">会员等级:' + level_map.get(filter_.level).get("level") + '</p>'
-                                + '<p style="line-height: 24px;">订阅周期:' +member_cycle + '</p>'
+                                + '<p style="line-height: 24px;">订阅周期:' + member_cycle + '</p>'
                                 + '<p style="line-height: 24px;">有效日期:' + member_endtime + '</p>'
                                 + '<p style="line-height: 24px;">有效日期:' + member_endtime + '</p>'
                             if (orderStatus === 0) {//0:待付款;
                             if (orderStatus === 0) {//0:待付款;
                                 var payNameTmp = "去支付"
                                 var payNameTmp = "去支付"
@@ -706,10 +706,10 @@
 
 
                             } else if (orderStatus === 1) {//已完成
                             } else if (orderStatus === 1) {//已完成
                                 m_status_html += '<p class="finish_status">已完成</p>'
                                 m_status_html += '<p class="finish_status">已完成</p>'
-                                if (obj.applybill_status === 1) {
-                                    m_handle_html += '<p><a href="/front/order/check_invoice/' + orderCode + '">发票信息</a></p>'
-                                } else {
+                                if (obj.applybill_status === 0) {
                                     m_handle_html += '<p><a onclick="check_over(\'' + orderCode + '\')">开发票</a></p>';
                                     m_handle_html += '<p><a onclick="check_over(\'' + orderCode + '\')">开发票</a></p>';
+                                } else if (obj.applybill_status === 1 || obj.applybill_status === 2) {
+                                    m_handle_html += '<p><a onclick="checkinvoice(' + obj.applybill_status + ',\'' + "/front/order/check_invoice/" + orderCode + '\')">发票信息</a></p>'
                                 }
                                 }
                             } else if (orderStatus === -2 || orderStatus === -3) {//已取消
                             } else if (orderStatus === -2 || orderStatus === -3) {//已取消
                                 m_status_html += '<p class="finish_status">已取消</p>'
                                 m_status_html += '<p class="finish_status">已取消</p>'
@@ -719,12 +719,12 @@
                             var filter_ = JSON.parse(obj.filter)
                             var filter_ = JSON.parse(obj.filter)
                             console.log(filter_)
                             console.log(filter_)
                             var level;
                             var level;
-                            if (filter_.level==1){
-                                level="专家版";
-                            }else if (filter_.level==2){
-                                level="智慧版";
+                            if (filter_.level == 1) {
+                                level = "专家版";
+                            } else if (filter_.level == 2) {
+                                level = "智慧版";
                             }
                             }
-                            var imgurl="/order/image/aiPack.png"
+                            var imgurl = "/order/image/aiPack.png"
                             shop_img_html += '<img src=' + imgurl + ' alt="">'
                             shop_img_html += '<img src=' + imgurl + ' alt="">'
                             shop_main_html += '<p style="line-height: 24px;">会员等级:' + level + '</p>'
                             shop_main_html += '<p style="line-height: 24px;">会员等级:' + level + '</p>'
                                 + '<p style="line-height: 24px;">功能类型:AI中标预测包</p>'
                                 + '<p style="line-height: 24px;">功能类型:AI中标预测包</p>'
@@ -738,16 +738,16 @@
                                 }
                                 }
                             } else if (orderStatus === 1) {//已完成
                             } else if (orderStatus === 1) {//已完成
                                 m_status_html += '<p class="finish_status">已完成</p>'
                                 m_status_html += '<p class="finish_status">已完成</p>'
-                                if (obj.applybill_status === 1) {
-                                    m_handle_html += '<p><a href="/front/order/check_invoice/' + orderCode + '">发票信息</a></p>'
-                                } else {
+                                if (obj.applybill_status === 0) {
                                     m_handle_html += '<p><a onclick="check_over(\'' + orderCode + '\')">开发票</a></p>';
                                     m_handle_html += '<p><a onclick="check_over(\'' + orderCode + '\')">开发票</a></p>';
+                                } else if (obj.applybill_status === 1 || obj.applybill_status === 2) {
+                                    m_handle_html += '<p><a onclick="checkinvoice(' + obj.applybill_status + ',\'' + "/front/order/check_invoice/" + orderCode + '\')">发票信息</a></p>'
                                 }
                                 }
                             } else if (orderStatus === -2 || orderStatus === -3) {//已取消
                             } else if (orderStatus === -2 || orderStatus === -3) {//已取消
                                 m_status_html += '<p class="finish_status">已取消</p>'
                                 m_status_html += '<p class="finish_status">已取消</p>'
                             }
                             }
                             m_status_html += '<p><a onclick="toDetail(\'' + orderCode + '\',8);">查看详情</a></p>'
                             m_status_html += '<p><a onclick="toDetail(\'' + orderCode + '\',8);">查看详情</a></p>'
-                        }else if (obj.product_type == "大会员-子账号") {
+                        } else if (obj.product_type == "大会员-子账号") {
                             var filter_ = JSON.parse(obj.filter)
                             var filter_ = JSON.parse(obj.filter)
                             var level_map = new Map();
                             var level_map = new Map();
                             var expert = new Map();
                             var expert = new Map();
@@ -780,28 +780,28 @@
                                 }
                                 }
                             } else if (orderStatus === 1) {//已完成
                             } else if (orderStatus === 1) {//已完成
                                 m_status_html += '<p class="finish_status">已完成</p>'
                                 m_status_html += '<p class="finish_status">已完成</p>'
-                                if (obj.applybill_status === 1) {
-                                    m_handle_html += '<p><a href="/front/order/check_invoice/' + orderCode + '">发票信息</a></p>'
-                                } else {
+                                if (obj.applybill_status === 0) {
                                     m_handle_html += '<p><a onclick="check_over(\'' + orderCode + '\')">开发票</a></p>';
                                     m_handle_html += '<p><a onclick="check_over(\'' + orderCode + '\')">开发票</a></p>';
+                                } else if (obj.applybill_status === 1 || obj.applybill_status === 2) {
+                                    m_handle_html += '<p><a onclick="checkinvoice(' + obj.applybill_status + ',\'' + "/front/order/check_invoice/" + orderCode + '\')">发票信息</a></p>'
                                 }
                                 }
                             } else if (orderStatus === -2 || orderStatus === -3) {//已取消
                             } else if (orderStatus === -2 || orderStatus === -3) {//已取消
                                 m_status_html += '<p class="finish_status">已取消</p>'
                                 m_status_html += '<p class="finish_status">已取消</p>'
                             }
                             }
                             m_status_html += '<p><a onclick="toDetail(\'' + orderCode + '\',9);">查看详情</a></p>'
                             m_status_html += '<p><a onclick="toDetail(\'' + orderCode + '\',9);">查看详情</a></p>'
-                        }else if (obj.product_type == "招标文件解读") {
+                        } else if (obj.product_type == "招标文件解读") {
                             var filter_ = JSON.parse(obj.filter)
                             var filter_ = JSON.parse(obj.filter)
                             console.log(filter_.count)
                             console.log(filter_.count)
                             var imgurl = "/order/image/zbwjjd_new.png";
                             var imgurl = "/order/image/zbwjjd_new.png";
                             shop_img_html += '<img src=' + imgurl + ' alt="">'
                             shop_img_html += '<img src=' + imgurl + ' alt="">'
                             shop_main_html += '<p style="line-height: 24px;">产品类型:' + obj.product_type + '</p>'
                             shop_main_html += '<p style="line-height: 24px;">产品类型:' + obj.product_type + '</p>'
                                 + '<p style="line-height: 24px;">购买次数:' + filter_.count + '次</p>'
                                 + '<p style="line-height: 24px;">购买次数:' + filter_.count + '次</p>'
-                                + '<p style="line-height: 24px;">有效日期:' +"2021/11/15"+ '到期</p>'
+                                + '<p style="line-height: 24px;">有效日期:' + "2021/11/15" + '到期</p>'
                             if (orderStatus === 0) {//0:待付款;
                             if (orderStatus === 0) {//0:待付款;
                                 var payNameTmp = "去支付"
                                 var payNameTmp = "去支付"
                                 m_status_html += '<p class="finish_status">待付款</p>'
                                 m_status_html += '<p class="finish_status">待付款</p>'
 
 
-                                   orderStatusClassOne = "blueColor"
+                                orderStatusClassOne = "blueColor"
                                 orderStatusClassTwo = "blueBg"
                                 orderStatusClassTwo = "blueBg"
                                 if (!(obj.pay_way === "transferAccounts" && (obj.course_status === 2 || obj.course_status === 4))) {
                                 if (!(obj.pay_way === "transferAccounts" && (obj.course_status === 2 || obj.course_status === 4))) {
                                     m_handle_html += '<p><a href="/front/bidfile/orderPay/' + orderCode + '" class="go_pay">' + payNameTmp + '</a></p>'
                                     m_handle_html += '<p><a href="/front/bidfile/orderPay/' + orderCode + '" class="go_pay">' + payNameTmp + '</a></p>'
@@ -809,10 +809,10 @@
                                 }
                                 }
                             } else if (orderStatus === 1) {//已完成
                             } else if (orderStatus === 1) {//已完成
                                 m_status_html += '<p class="finish_status">已完成</p>'
                                 m_status_html += '<p class="finish_status">已完成</p>'
-                                if (obj.applybill_status === 1) {
-                                    m_handle_html += '<p><a href="/front/order/check_invoice/' + orderCode + '">发票信息</a></p>'
-                                } else {
+                                if (obj.applybill_status === 0) {
                                     m_handle_html += '<p><a onclick="check_over(\'' + orderCode + '\')">开发票</a></p>';
                                     m_handle_html += '<p><a onclick="check_over(\'' + orderCode + '\')">开发票</a></p>';
+                                } else if (obj.applybill_status === 1 || obj.applybill_status === 2) {
+                                    m_handle_html += '<p><a onclick="checkinvoice(' + obj.applybill_status + ',\'' + "/front/order/check_invoice/" + orderCode + '\')">发票信息</a></p>'
                                 }
                                 }
                             } else if (orderStatus === -2 || orderStatus === -3) {//已取消
                             } else if (orderStatus === -2 || orderStatus === -3) {//已取消
                                 m_status_html += '<p class="finish_status">已取消</p>'
                                 m_status_html += '<p class="finish_status">已取消</p>'
@@ -977,11 +977,11 @@
         } else if (n === 7) {
         } else if (n === 7) {
             window.open("/front/member/memberDetail?order_code=" + orderCode);
             window.open("/front/member/memberDetail?order_code=" + orderCode);
         } else if (n === 8) {
         } else if (n === 8) {
-            window.open("/front/aiForecastPack/aiForecastPackDetail?order_code="+orderCode);
+            window.open("/front/aiForecastPack/aiForecastPackDetail?order_code=" + orderCode);
         } else if (n === 9) {
         } else if (n === 9) {
-            window.open("/front/subAccount/subAccountDetail?order_code="+orderCode);
+            window.open("/front/subAccount/subAccountDetail?order_code=" + orderCode);
         } else if (n === 10) {
         } else if (n === 10) {
-            window.open("/front/bidfile/bidfileDetail?order_code="+orderCode);
+            window.open("/front/bidfile/bidfileDetail?order_code=" + orderCode);
         }
         }
     }
     }
 
 
@@ -1083,6 +1083,20 @@
             }
             }
         })
         })
     }
     }
+
+    //查看发票
+    function checkinvoice(flag, toHref) {
+        if (flag === 2) {
+            var showHtml = '<div style="width: 100%;height: 100%;z-index: 999; position: absolute;top: 0;background: rgba(0, 0, 0, 0.65);">   <div style="position: fixed;z-index: 9999;width: 540px;height: 262px;left: 50%;top: 30%;margin-left: -270px;background-color: #fff;border-radius: 6px;padding: 32px;display: flex;flex-direction: column;justify-items: center;align-items: center;">       <div class="invoice_title" style="color: #1D1D1D;font-size: 18px;line-height: 28px;">提示</div>       <div class="invoice_body"            style="height: 78px;margin: 20px 0px;font-size: 14px;line-height: 24px;text-align: center;">           您已开具发票<br>           如有问题请联系客服<br>           400-108-6670       </div>       <div class="invoice_control"            style="width: 132px;height: 36px;text-align: center;background: #2CB7CA;border-radius: 6px;font-size: 16px;line-height: 36px;color: #FFFFFF;cursor: pointer;"            onclick="document.querySelector(\'#invoice_tip\').remove()"       >           我知道了       </div>   </div>\n</div>'
+            var div_invoice_tip = document.createElement('div');
+            div_invoice_tip.innerHTML = showHtml;
+            div_invoice_tip.id = "invoice_tip"
+            document.body.appendChild(div_invoice_tip)
+            return
+        }
+        window.location.href = toHref
+    }
 </script>
 </script>
+
 </body>
 </body>
 </html>
 </html>

+ 323 - 293
src/web/templates/pc/orderDetail.html

@@ -4,136 +4,159 @@
     <meta name="viewport"
     <meta name="viewport"
           content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
           content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/dataExport/css/font_624651_bjdvktmum68.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet"
+          href="{{Msg "seo" "cdn"}}/dataExport/css/font_624651_bjdvktmum68.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/dataExport/css/reset_pc.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/dataExport/css/reset_pc.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/dataExport/css/order_twoleave.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/dataExport/css/order_twoleave.css?v={{Msg "seo" "version"}}">
 
 
     {{include "/common/pnc.html"}}
     {{include "/common/pnc.html"}}
     <link href="{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
     <link href="{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
     <link href="{{Msg "seo" "cdn"}}/css/dev2/reset_pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
     <link href="{{Msg "seo" "cdn"}}/css/dev2/reset_pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
-    <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css"
+          href="{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}"/>
     <script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}"></script>
     <script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}"></script>
     <title>订单详情</title>
     <title>订单详情</title>
     <meta content="增值服务" theme="light" name="enable-header"/>
     <meta content="增值服务" theme="light" name="enable-header"/>
     <style>
     <style>
-        span{
+        span {
             margin-right: 8px;
             margin-right: 8px;
         }
         }
-        .gjc p{
+
+        .gjc p {
             margin-top: 5px;
             margin-top: 5px;
         }
         }
-        .gjc p:nth-child(1){
+
+        .gjc p:nth-child(1) {
             margin-top: 0px !important;
             margin-top: 0px !important;
         }
         }
-        #order_two .c-info .inner .item{
+
+        #order_two .c-info .inner .item {
             display: flex;
             display: flex;
         }
         }
-        #order_two .c-info .inner .item div:nth-child(1){
+
+        #order_two .c-info .inner .item div:nth-child(1) {
             flex-shrink: 0;
             flex-shrink: 0;
         }
         }
-        .gjc{
+
+        .gjc {
             margin-bottom: 10px;
             margin-bottom: 10px;
         }
         }
-        .a-t-d{
+
+        .a-t-d {
             text-decoration: none !important;
             text-decoration: none !important;
         }
         }
-		.btn_sqfp{
-			height:35px;
-			width:110px;
-			background-color: #fff;
-			color:rgb(56, 187, 205);
-			border: 1px   solid rgb(56, 187, 205);
-			border-radius: 6px;
-			cursor: pointer;
-			font-size:14px;
-			margin-left:247px;
-			margin-top: 20px;
-		}
-		#order_two .dd-info .inner .item {
-		    box-sizing: border-box;
-		    padding-left: 30px;
-		    float: left;
-		    width: 50%;
-		    height: 160px;
-		}
-   .o_m_thead {
-    padding: 18px 30px 20px;
-    }
-    .greenBg {
-        border-top: 2px solid #2CB7CA;
-        background-color: rgba(44, 183, 202, 0.08);
-    }
-    .greenFont {
-        color: #2CB7CA;
-    }
-	.redFont {
-	  color: #FE737A;
-	}
-	.redBg {
-	  border-top: 2px solid #FE737A;
-	  background-color: rgba(254, 115, 122, 0.08);
-	}
-    .go_pay {
-        margin-top: -10px;
-        float: right;
-        display: inline-block;
-        padding: 6px 24px;
-        font-size: 14px;
-        line-height: 18px;
-        background: #2CB7CA;
-        border-radius: 4px;
-        color: #fff;
-        text-decoration: none;
-    }
-	.go_pay:hover{
-		text-decoration: none;
-	}
-    .o_m_thead .order_id {
-        font-size: 14px;
-        line-height: 24px;
-    }
-    .o_m_thead .order_state {
-        margin-top: 14px;
-    }
-    .o_m_thead .order_state span:nth-child(1) {
-        float: left;
-    }
-    #order_two .dd-info {
-        box-sizing: border-box;
-        border: 1px solid #ccc;
-        border-top: 2px solid #ccc;
-        margin-bottom: 20px;
-        margin-top: 16px;
-    }
 
 
-    #order_two .c-info {
-        box-sizing: border-box;
-        border: 1px solid #ccc;
-        border-top: 2px solid #ccc;
-        margin-bottom: 20px;
-        margin-top: 16px;
-    }
-    .qxBg{
-        border-top: 2px solid #999999;
-        background-color: #ececec;
-    }
-    .qxBgFont{
-        color: #686868;
-    }
+        .btn_sqfp {
+            height: 35px;
+            width: 110px;
+            background-color: #fff;
+            color: rgb(56, 187, 205);
+            border: 1px solid rgb(56, 187, 205);
+            border-radius: 6px;
+            cursor: pointer;
+            font-size: 14px;
+            margin-left: 247px;
+            margin-top: 20px;
+        }
+
+        #order_two .dd-info .inner .item {
+            box-sizing: border-box;
+            padding-left: 30px;
+            float: left;
+            width: 50%;
+            height: 160px;
+        }
+
+        .o_m_thead {
+            padding: 18px 30px 20px;
+        }
+
+        .greenBg {
+            border-top: 2px solid #2CB7CA;
+            background-color: rgba(44, 183, 202, 0.08);
+        }
+
+        .greenFont {
+            color: #2CB7CA;
+        }
+
+        .redFont {
+            color: #FE737A;
+        }
+
+        .redBg {
+            border-top: 2px solid #FE737A;
+            background-color: rgba(254, 115, 122, 0.08);
+        }
+
+        .go_pay {
+            margin-top: -10px;
+            float: right;
+            display: inline-block;
+            padding: 6px 24px;
+            font-size: 14px;
+            line-height: 18px;
+            background: #2CB7CA;
+            border-radius: 4px;
+            color: #fff;
+            text-decoration: none;
+        }
+
+        .go_pay:hover {
+            text-decoration: none;
+        }
+
+        .o_m_thead .order_id {
+            font-size: 14px;
+            line-height: 24px;
+        }
+
+        .o_m_thead .order_state {
+            margin-top: 14px;
+        }
+
+        .o_m_thead .order_state span:nth-child(1) {
+            float: left;
+        }
+
+        #order_two .dd-info {
+            box-sizing: border-box;
+            border: 1px solid #ccc;
+            border-top: 2px solid #ccc;
+            margin-bottom: 20px;
+            margin-top: 16px;
+        }
+
+        #order_two .c-info {
+            box-sizing: border-box;
+            border: 1px solid #ccc;
+            border-top: 2px solid #ccc;
+            margin-bottom: 20px;
+            margin-top: 16px;
+        }
+
+        .qxBg {
+            border-top: 2px solid #999999;
+            background-color: #ececec;
+        }
+
+        .qxBgFont {
+            color: #686868;
+        }
     </style>
     </style>
     <script>
     <script>
-        function FormatNum(n){
+        function FormatNum(n) {
             var isF = /^-?\d*\.\d+$/.test(n);
             var isF = /^-?\d*\.\d+$/.test(n);
             var n2 = "";
             var n2 = "";
-            if(isF){
-                var t = n+"";
+            if (isF) {
+                var t = n + "";
                 n2 = t.substr(t.indexOf("."));
                 n2 = t.substr(t.indexOf("."));
                 n = parseInt(n);
                 n = parseInt(n);
             }
             }
-            if(n>=1000){
-                n = Math.floor(n/1000)+","+("0000"+n%1000).slice(-3);
+            if (n >= 1000) {
+                n = Math.floor(n / 1000) + "," + ("0000" + n % 1000).slice(-3);
             }
             }
-            return n+n2;
+            return n + n2;
         }
         }
     </script>
     </script>
 </head>
 </head>
@@ -144,28 +167,28 @@
         <a href="/front/swordfish/toMyOrder" class="a-t-d">我的订单></a>
         <a href="/front/swordfish/toMyOrder" class="a-t-d">我的订单></a>
         <a href="#" class="a-t-d">订单详情</a>
         <a href="#" class="a-t-d">订单详情</a>
     </div>
     </div>
-     <div class="o_m_thead greenBg">
-            <p class="order_id">订单编号:{{.T.o.order_code}}</p>
-            <p class="clearfix order_state">
-                <!--greenFont为绿色字体 redFont为红色字体 -->
-                <span class="greenFont" id="status_success" style="display: none;">已完成</span>
-                <span class="redFont" id="status_wait_pay" style="display: none;">待付款</span>
-                <span class="qxBgFont" id="status_cancelled" style="display: none;">已取消</span>
-
-                <!-- 当状态为已完成时显示开发票 或 查看发票 -->
-				<a class="go_pay payOrder" style="display: none;">去支付</a>
-                <a class="openinvoice go_pay" style="display: none;">开发票</a>
-                <a class="lookinvoice go_pay" style="display: none;">查看发票</a>
-                <!-- 当订单状态为待付款时显示去支付 -->
-                <!-- 当状态为已完成时显示开发票 或 查看发票 -->
-
-
-            </p>
-            <!-- 退款信息 -->
-            <!-- <p class="refund_item">申请退款时间:2019.11.12 12:12:23 </p>
-            <p class="refund_item">申请退款原因:信息填写错误 </p>
-            <p class="refund_item">退款金额:13788.00</p> -->
-        </div>
+    <div class="o_m_thead greenBg">
+        <p class="order_id">订单编号:{{.T.o.order_code}}</p>
+        <p class="clearfix order_state">
+            <!--greenFont为绿色字体 redFont为红色字体 -->
+            <span class="greenFont" id="status_success" style="display: none;">已完成</span>
+            <span class="redFont" id="status_wait_pay" style="display: none;">待付款</span>
+            <span class="qxBgFont" id="status_cancelled" style="display: none;">已取消</span>
+
+            <!-- 当状态为已完成时显示开发票 或 查看发票 -->
+            <a class="go_pay payOrder" style="display: none;">去支付</a>
+            <a class="openinvoice go_pay" style="display: none;">开发票</a>
+            <a class="lookinvoice go_pay" style="display: none;">查看发票</a>
+            <!-- 当订单状态为待付款时显示去支付 -->
+            <!-- 当状态为已完成时显示开发票 或 查看发票 -->
+
+
+        </p>
+        <!-- 退款信息 -->
+        <!-- <p class="refund_item">申请退款时间:2019.11.12 12:12:23 </p>
+        <p class="refund_item">申请退款原因:信息填写错误 </p>
+        <p class="refund_item">退款金额:13788.00</p> -->
+    </div>
     <div class="c-info">
     <div class="c-info">
         <div class="title">
         <div class="title">
             筛选条件
             筛选条件
@@ -178,49 +201,44 @@
             <div class="item">
             <div class="item">
                 <p>订单编号:{{.T.o.order_code}}</p>
                 <p>订单编号:{{.T.o.order_code}}</p>
                 <p>下单时间:{{.T.o.create_time}}</p>
                 <p>下单时间:{{.T.o.create_time}}</p>
-		{{if .T.o.transaction_id}}
-				<p>支付时间:{{.T.o.pay_time}}</p>
-		{{end}}
+                {{if .T.o.transaction_id}}
+                    <p>支付时间:{{.T.o.pay_time}}</p>
+                {{end}}
                 <p>产品类型:数据导出</p>
                 <p>产品类型:数据导出</p>
-        {{if .T.o.transaction_id}}
-				<p>支付方式:{{.T.o.pay_way}}</p>
-				<p>支付单号:{{.T.o.transaction_id}}</p>
-        {{end}}
+                {{if .T.o.transaction_id}}
+                    <p>支付方式:{{.T.o.pay_way}}</p>
+                    <p>支付单号:{{.T.o.transaction_id}}</p>
+                {{end}}
             </div>
             </div>
             <div class="item">
             <div class="item">
                 <p>数据规格:{{.T.o.data_spec}}</p>
                 <p>数据规格:{{.T.o.data_spec}}</p>
                 <p>数量:{{.T.o.data_count}}条</p>
                 <p>数量:{{.T.o.data_count}}条</p>
-                <p>实付金额:¥<script>document.write(FormatNum({{.T.o.order_money}}))</script>元</p>
+                <p>实付金额:¥
+                    <script>document.write(FormatNum({{.T.o.order_money}}))</script>
+                    元
+                </p>
                 <p>邮箱地址:{{.T.o.user_mail}}</p>
                 <p>邮箱地址:{{.T.o.user_mail}}</p>
-				<p>手机号:{{.T.o.user_phone}}</p>
+                <p>手机号:{{.T.o.user_phone}}</p>
             </div>
             </div>
             <div class="item" style="display:none">
             <div class="item" style="display:none">
-				{{if .T.o.applybill_status}}
-				{{if eq .T.o.applybill_status "F"}}
-                 <p>发票类型:</p>
-				 <p>发票内容:</p>
-				 <p>发票抬头:</p>
-				{{else}}
-				 <p>发票类型:普通发票(电子发票)</p>
-				 <p>发票内容:明细</p>
-				 <p>发票抬头:{{.T.o.applybill_type}}</p>
-				{{end}}
-				{{end}}
-				{{if .T.o.applybill_type}}
-				{{if eq .T.o.applybill_type "单位"}}
-				<p>单位名称:{{.T.o.applybill_company}}</p>
-				<p>纳税人识别号:{{.T.o.applybill_taxnum}}</p>
-				{{end}}
-				{{end}}
-				{{if .T.o.order_status}}
-				{{if eq .T.o.order_status 1}}
-				{{if .T.o.applybill_status}}
-				{{if eq .T.o.applybill_status "F"}}
-				<button class="btn_sqfp" onclick="invoice()">开发票</button>
-				{{end}}
-				{{end}}
-				{{end}}
-				{{end}}
+                {{if eq .T.o.applybill_status 1}}
+                    <p>发票类型:普通发票(电子发票)</p>
+                    <p>发票内容:明细</p>
+                    <p>发票抬头:{{.T.o.applybill_type}}</p>
+                {{end}}
+                {{if .T.o.applybill_type}}
+                    {{if eq .T.o.applybill_type "单位"}}
+                        <p>单位名称:{{.T.o.applybill_company}}</p>
+                        <p>纳税人识别号:{{.T.o.applybill_taxnum}}</p>
+                    {{end}}
+                {{end}}
+                {{if .T.o.order_status}}
+                    {{if eq .T.o.order_status 1}}
+                        {{if eq .T.o.applybill_status 0}}
+                            <button class="btn_sqfp" onclick="invoice()">开发票</button>
+                        {{end}}
+                    {{end}}
+                {{end}}
             </div>
             </div>
         </div>
         </div>
     </div>
     </div>
@@ -233,11 +251,11 @@
         haslogin({{.T.logid}});
         haslogin({{.T.logid}});
         $(".public-nav").css("background-color", "#fff");
         $(".public-nav").css("background-color", "#fff");
         $(".public-nav").css("border-bottom", "1px solid #e0e0e0");
         $(".public-nav").css("border-bottom", "1px solid #e0e0e0");
-        $("section[id='order_two']").css("padding-top","107px");
+        $("section[id='order_two']").css("padding-top", "107px");
 
 
         /*筛选条件*/
         /*筛选条件*/
         var filter = {{.T.o.filter}};
         var filter = {{.T.o.filter}};
-        if (filter){
+        if (filter) {
             var publishtime = filter["publishtime"];
             var publishtime = filter["publishtime"];
             var region = filter["region"];
             var region = filter["region"];
             var area = filter["area"];
             var area = filter["area"];
@@ -248,212 +266,224 @@
             var subType = filter["subtype"];
             var subType = filter["subtype"];
             var buyer = filter["buyer"];
             var buyer = filter["buyer"];
             var winner = filter["winner"];
             var winner = filter["winner"];
-            var selectType=filter["selectType"];
-            if(!publishtime){
+            var selectType = filter["selectType"];
+            if (!publishtime) {
                 publishtime = "全部";
                 publishtime = "全部";
             } else {
             } else {
-				var ptArr = publishtime.split("-")
-				if(ptArr[0]==""&&ptArr[1]!=""){
-					publishtime = ptArr[1]+"前全部"
-				}
-			}
+                var ptArr = publishtime.split("-")
+                if (ptArr[0] == "" && ptArr[1] != "") {
+                    publishtime = ptArr[1] + "前全部"
+                }
+            }
             var regionHtml = "";
             var regionHtml = "";
-            if (region && region.length>0){
-                for (var i=0;i<region.length;i++){
+            if (region && region.length > 0) {
+                for (var i = 0; i < region.length; i++) {
                     regionHtml += "<span>" + region[i] + "</span>";
                     regionHtml += "<span>" + region[i] + "</span>";
                 }
                 }
-            }else if(area && area.length>0){
-                for (var i=0;i<area.length;i++){
+            } else if (area && area.length > 0) {
+                for (var i = 0; i < area.length; i++) {
                     regionHtml += "<span>" + area[i] + "</span>";
                     regionHtml += "<span>" + area[i] + "</span>";
                 }
                 }
-            }else {
+            } else {
                 regionHtml += "<span>全国</span>";
                 regionHtml += "<span>全国</span>";
             }
             }
             var industryHtml = "";
             var industryHtml = "";
-            if(industry && industry.length>0){
-                for (var i=0;i<industry.length;i++){
+            if (industry && industry.length > 0) {
+                for (var i = 0; i < industry.length; i++) {
                     var d = industry[i];
                     var d = industry[i];
-                    if (d && d.split("_").length==2){
+                    if (d && d.split("_").length == 2) {
                         d = d.split("_")[1];
                         d = d.split("_")[1];
-                    }else {
+                    } else {
                         d = "";
                         d = "";
                     }
                     }
                     industryHtml += "<span>" + d + "</span>";
                     industryHtml += "<span>" + d + "</span>";
                 }
                 }
-            }else{
+            } else {
                 industryHtml += "<span>全部</span>";
                 industryHtml += "<span>全部</span>";
             }
             }
             var buyerclassHtml = "";
             var buyerclassHtml = "";
-            if(buyerclass && buyerclass.length>0){
-                for (var i=0;i<buyerclass.length;i++){
+            if (buyerclass && buyerclass.length > 0) {
+                for (var i = 0; i < buyerclass.length; i++) {
                     var d = buyerclass[i];
                     var d = buyerclass[i];
                     buyerclassHtml += "<span>" + d + "</span>";
                     buyerclassHtml += "<span>" + d + "</span>";
                 }
                 }
-            }else{
+            } else {
                 buyerclassHtml += "<span>全部</span>";
                 buyerclassHtml += "<span>全部</span>";
             }
             }
             var keywordsHtml = "<div>";
             var keywordsHtml = "<div>";
             var marginBottom = 0;
             var marginBottom = 0;
-            if (keywords && keywords.length>0){
-                for (var i=0;i<keywords.length;i++){
+            if (keywords && keywords.length > 0) {
+                for (var i = 0; i < keywords.length; i++) {
                     var keywordObj = keywords[i];
                     var keywordObj = keywords[i];
                     var word = keywordObj["keyword"];
                     var word = keywordObj["keyword"];
                     var appended = keywordObj["appended"];
                     var appended = keywordObj["appended"];
                     var exclude = keywordObj["exclude"];
                     var exclude = keywordObj["exclude"];
                     keywordsHtml +=
                     keywordsHtml +=
-                            "<div class=\"gjc fl\">" +
-                            "<p>关键词:" + word + "</p>" +
-                            "<p>附加词:";
-                    if (appended!=null){
-                      for(var j=0;j<appended.length;j++){
-                          keywordsHtml += "<span>" + appended[j] + "</span>";
-                      }
+                        "<div class=\"gjc fl\">" +
+                        "<p>关键词:" + word + "</p>" +
+                        "<p>附加词:";
+                    if (appended != null) {
+                        for (var j = 0; j < appended.length; j++) {
+                            keywordsHtml += "<span>" + appended[j] + "</span>";
+                        }
                     }
                     }
                     keywordsHtml +=
                     keywordsHtml +=
-                            "</p>" +
-                            "<p>排除词:";
-                    if(exclude!=null){
-                      for(var j=0;j<exclude.length;j++){
-                          keywordsHtml += "<span>" + exclude[j] + "</span>";
-                      }
+                        "</p>" +
+                        "<p>排除词:";
+                    if (exclude != null) {
+                        for (var j = 0; j < exclude.length; j++) {
+                            keywordsHtml += "<span>" + exclude[j] + "</span>";
+                        }
                     }
                     }
                     keywordsHtml += "</p>";
                     keywordsHtml += "</p>";
                     keywordsHtml += "</div>";
                     keywordsHtml += "</div>";
                 }
                 }
-            }else {
+            } else {
                 marginBottom = 10;
                 marginBottom = 10;
             }
             }
             keywordsHtml += "</div>";
             keywordsHtml += "</div>";
-           	var selectTypeHtml="";
-            if(selectType){
-            	if(selectType=="title"){
-            		selectTypeHtml+="<span>按标题匹配</span>";
-            	}else if(selectType=="all"){
-            		selectTypeHtml+="<span>按全文匹配</span>";
-            	}
-            }else{
-            	selectTypeHtml+="<span></span>";
+            var selectTypeHtml = "";
+            if (selectType) {
+                if (selectType == "title") {
+                    selectTypeHtml += "<span>按标题匹配</span>";
+                } else if (selectType == "all") {
+                    selectTypeHtml += "<span>按全文匹配</span>";
+                }
+            } else {
+                selectTypeHtml += "<span></span>";
             }
             }
             var priceHtml = "";
             var priceHtml = "";
-            if(price){
+            if (price) {
                 priceHtml += "<span>" + price + "</span>";
                 priceHtml += "<span>" + price + "</span>";
-            }else{
+            } else {
                 priceHtml += "<span>全部</span>";
                 priceHtml += "<span>全部</span>";
             }
             }
             var subTypeHtml = "";
             var subTypeHtml = "";
-            if(subType){
+            if (subType) {
                 var subTypeArr = subType.split(",");
                 var subTypeArr = subType.split(",");
-                for (var i=0;i<subTypeArr.length;i++){
+                for (var i = 0; i < subTypeArr.length; i++) {
                     var d = subTypeArr[i];
                     var d = subTypeArr[i];
-                    if (!d){
+                    if (!d) {
                         d = "";
                         d = "";
                     }
                     }
                     subTypeHtml += "<span>" + d + "</span>";
                     subTypeHtml += "<span>" + d + "</span>";
                 }
                 }
-            }else {
+            } else {
                 subTypeHtml += "<span>全部</span>";
                 subTypeHtml += "<span>全部</span>";
             }
             }
             var buyerHtml = "";
             var buyerHtml = "";
-            if(buyer && buyer.length>0){
-                for (var i=0;i<buyer.length;i++){
+            if (buyer && buyer.length > 0) {
+                for (var i = 0; i < buyer.length; i++) {
                     buyerHtml += "<span>" + buyer[i] + "</span>";
                     buyerHtml += "<span>" + buyer[i] + "</span>";
                 }
                 }
             }
             }
             var winnerHtml = "";
             var winnerHtml = "";
-            if(winner && winner.length>0){
-                for (var i=0;i<winner.length;i++){
+            if (winner && winner.length > 0) {
+                for (var i = 0; i < winner.length; i++) {
                     winnerHtml += "<span>" + winner[i] + "</span>";
                     winnerHtml += "<span>" + winner[i] + "</span>";
                 }
                 }
             }
             }
             var filterHtml =
             var filterHtml =
-                    "<div class=\"inner\">" +
-                        "<div class=\"item clearfix\">" +
-                            "<div class=\"l fl\">\筛选日期:</div>" +
-                            "<div class=\"r fl\">" + publishtime + "</div>" +
-                        "</div>" +
-                        "<div class=\"item clearfix\">" +
-                            "<div class=\"l fl\">区域:</div>" +
-                            "<div class=\"r fl\">" + regionHtml + "</div>" +
-                        "</div>" +
-                        "<div class=\"item clearfix\">" +
-                            "<div class=\"l fl\">行业:</div>" +
-                            "<div class=\"r fl\">" + industryHtml + "</div>" +
-                        "</div>" +
-                        "<div class=\"item clearfix\">" +
-                            "<div class=\"l fl\">采购单位类型:</div>" +
-                            "<div class=\"r fl\">" + buyerclassHtml + "</div>" +
-                        "</div>" +
-                        "<div class=\"item clearfix\" style=\"margin-bottom: "+marginBottom+"px;\">" +
-                            "<div class=\"l fl\">关键词:</div>" +
-                            "" + keywordsHtml + "" +
-                        "</div>" +
-                         "<div class=\"item clearfix\">" +
-                            "<div class=\"l fl\">关键词匹配方式:</div>" +
-                            "<div class=\"r fl\">" + selectTypeHtml + "</div>" +
-                        "</div>" +
-                        "<div class=\"item clearfix\">" +
-                            "<div class=\"l fl\">金额:</div>" +
-                            "<div class=\"r fl\">" + priceHtml + "</div>" +
-                        "</div>" +
-                        "<div class=\"item clearfix\">" +
-                            "<div class=\"l fl\">信息类型:</div>" +
-                            "<div class=\"r fl\">" + subTypeHtml + "</div>" +
-                        "</div>" +
-                        "<div class=\"item clearfix\">" +
-                            "<div class=\"l fl\">采购单位:</div>" +
-                            "<div class=\"r fl\">" + buyerHtml + "</div>" +
-                        "</div>" +
-                        "<div class=\"item clearfix\">" +
-                            "<div class=\"l fl\">中标单位:</div>" +
-                            "<div class=\"r fl\">" + winnerHtml + "</div>" +
-                        "</div>" +
-                    "</div>";
+                "<div class=\"inner\">" +
+                "<div class=\"item clearfix\">" +
+                "<div class=\"l fl\">\筛选日期:</div>" +
+                "<div class=\"r fl\">" + publishtime + "</div>" +
+                "</div>" +
+                "<div class=\"item clearfix\">" +
+                "<div class=\"l fl\">区域:</div>" +
+                "<div class=\"r fl\">" + regionHtml + "</div>" +
+                "</div>" +
+                "<div class=\"item clearfix\">" +
+                "<div class=\"l fl\">行业:</div>" +
+                "<div class=\"r fl\">" + industryHtml + "</div>" +
+                "</div>" +
+                "<div class=\"item clearfix\">" +
+                "<div class=\"l fl\">采购单位类型:</div>" +
+                "<div class=\"r fl\">" + buyerclassHtml + "</div>" +
+                "</div>" +
+                "<div class=\"item clearfix\" style=\"margin-bottom: " + marginBottom + "px;\">" +
+                "<div class=\"l fl\">关键词:</div>" +
+                "" + keywordsHtml + "" +
+                "</div>" +
+                "<div class=\"item clearfix\">" +
+                "<div class=\"l fl\">关键词匹配方式:</div>" +
+                "<div class=\"r fl\">" + selectTypeHtml + "</div>" +
+                "</div>" +
+                "<div class=\"item clearfix\">" +
+                "<div class=\"l fl\">金额:</div>" +
+                "<div class=\"r fl\">" + priceHtml + "</div>" +
+                "</div>" +
+                "<div class=\"item clearfix\">" +
+                "<div class=\"l fl\">信息类型:</div>" +
+                "<div class=\"r fl\">" + subTypeHtml + "</div>" +
+                "</div>" +
+                "<div class=\"item clearfix\">" +
+                "<div class=\"l fl\">采购单位:</div>" +
+                "<div class=\"r fl\">" + buyerHtml + "</div>" +
+                "</div>" +
+                "<div class=\"item clearfix\">" +
+                "<div class=\"l fl\">中标单位:</div>" +
+                "<div class=\"r fl\">" + winnerHtml + "</div>" +
+                "</div>" +
+                "</div>";
 
 
             $(".c-info").append($(filterHtml));
             $(".c-info").append($(filterHtml));
         }
         }
     });
     });
-	function invoice(){
-		window.location.href=("/front/dataExport/getOrderCode/"+{{.T.o.order_code}});
-	}
-
-	$(function(){
-		var orderStatus = {{ .T.o.order_status }};
-		var invoiceStatus = {{ .T.o.applybill_status }}
-		var orderCode = {{.T.o.order_code}}
-		if (orderStatus === 0){
-			$("#status_wait_pay").show();
-			$(".payOrder").show();
-			$(".o_m_thead").removeClass("greenBg").addClass("redBg")
-		}else if(orderStatus === 1){
-			$("#status_success").show();
-			if(invoiceStatus === "F"){
-				$(".openinvoice").show();
-			}else{
-				$(".lookinvoice").show();
-			}
-		}else{
-			$("#status_cancelled").show();
+
+    function invoice() {
+        window.location.href = ("/front/dataExport/getOrderCode/" +{{.T.o.order_code}});
+    }
+
+    $(function () {
+        var orderStatus = {{ .T.o.order_status }};
+        var invoiceStatus = {{ .T.o.applybill_status }}
+        var orderCode = {{.T.o.order_code}}
+        if (orderStatus === 0) {
+            $("#status_wait_pay").show();
+            $(".payOrder").show();
+            $(".o_m_thead").removeClass("greenBg").addClass("redBg")
+        } else if (orderStatus === 1) {
+            $("#status_success").show();
+            if (invoiceStatus === 0) {
+                $(".openinvoice").show();
+            } else if (invoiceStatus === 1 || invoiceStatus === 2) {
+                $(".lookinvoice").show().on("click", function () {
+                    checkinvoice({{.T.o.applybill_status}}, orderCode)
+                });
+            }
+        } else {
+            $("#status_cancelled").show();
             $(".o_m_thead").removeClass("greenBg").addClass("qxBg")
             $(".o_m_thead").removeClass("greenBg").addClass("qxBg")
-		}
-
-		$(".payOrder").on("click", function(){
-			location.href = "/front/dataexport/orderPay/"+ orderCode;
-		})
-
-		$(".openinvoice").on("click",function(){
-			$.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');
-				}
-			})
-		})
-		$(".lookinvoice").on("click",function(){
-			window.open("/front/order/check_invoice/"+orderCode,'_self');
-		})
-	})
+        }
+
+        $(".payOrder").on("click", function () {
+            location.href = "/front/dataexport/orderPay/" + orderCode;
+        })
 
 
+        $(".openinvoice").on("click", function () {
+            $.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');
+                }
+            })
+        })
+    })
+
+    //查看发票
+    function checkinvoice(flag, orderCode) {
+        if (flag === 2) {
+            var showHtml = '<div style="width: 100%;height: 100%;z-index: 999; position: absolute;top: 0;background: rgba(0, 0, 0, 0.65);">   <div style="position: fixed;z-index: 9999;width: 540px;height: 262px;left: 50%;top: 30%;margin-left: -270px;background-color: #fff;border-radius: 6px;padding: 32px;display: flex;flex-direction: column;justify-items: center;align-items: center;">       <div class="invoice_title" style="color: #1D1D1D;font-size: 18px;line-height: 28px;">提示</div>       <div class="invoice_body"            style="height: 78px;margin: 20px 0px;font-size: 14px;line-height: 24px;text-align: center;">           您已开具发票<br>           如有问题请联系客服<br>           400-108-6670       </div>       <div class="invoice_control"            style="width: 132px;height: 36px;text-align: center;background: #2CB7CA;border-radius: 6px;font-size: 16px;line-height: 36px;color: #FFFFFF;cursor: pointer;"            onclick="document.querySelector(\'#invoice_tip\').remove()"       >           我知道了       </div>   </div>\n</div>'
+            var div_invoice_tip = document.createElement('div');
+            div_invoice_tip.innerHTML = showHtml;
+            div_invoice_tip.id = "invoice_tip"
+            document.body.appendChild(div_invoice_tip)
+            return
+        }
+        window.open("/front/order/check_invoice/" + orderCode, '_self');
+    }
 </script>
 </script>
 </body>
 </body>
 </html>
 </html>

+ 16 - 5
src/web/templates/pc/subAccount_orderDetail.html

@@ -195,8 +195,10 @@
                         //发票
                         //发票
                         if (r.data.applybill_status === 0) {
                         if (r.data.applybill_status === 0) {
                             $(".openinvoice").css("display", "");
                             $(".openinvoice").css("display", "");
-                        } else {
-                            $(".lookinvoice").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) {
                     if (r.data.order_status === -2) {
@@ -241,9 +243,6 @@
                     }
                     }
                 })
                 })
             })
             })
-            $(".lookinvoice").on("click", function () {
-                window.open("/front/order/check_invoice/" + orderCode, '_self');
-            })
 
 
             $(".payOrder").on("click", function () {
             $(".payOrder").on("click", function () {
                 location.href = "/front/member/orderPay/" + orderCode
                 location.href = "/front/member/orderPay/" + orderCode
@@ -337,6 +336,18 @@
             var money = t.split('').reverse().join('') + point + right;
             var money = t.split('').reverse().join('') + point + right;
             return money;
             return money;
         }
         }
+        //查看发票
+        function checkinvoice(flag, orderCode) {
+            if (flag === 2) {
+                var showHtml = '<div style="width: 100%;height: 100%;z-index: 999; position: absolute;top: 0;background: rgba(0, 0, 0, 0.65);">   <div style="position: fixed;z-index: 9999;width: 540px;height: 262px;left: 50%;top: 30%;margin-left: -270px;background-color: #fff;border-radius: 6px;padding: 32px;display: flex;flex-direction: column;justify-items: center;align-items: center;">       <div class="invoice_title" style="color: #1D1D1D;font-size: 18px;line-height: 28px;">提示</div>       <div class="invoice_body"            style="height: 78px;margin: 20px 0px;font-size: 14px;line-height: 24px;text-align: center;">           您已开具发票<br>           如有问题请联系客服<br>           400-108-6670       </div>       <div class="invoice_control"            style="width: 132px;height: 36px;text-align: center;background: #2CB7CA;border-radius: 6px;font-size: 16px;line-height: 36px;color: #FFFFFF;cursor: pointer;"            onclick="document.querySelector(\'#invoice_tip\').remove()"       >           我知道了       </div>   </div>\n</div>'
+                var div_invoice_tip = document.createElement('div');
+                div_invoice_tip.innerHTML = showHtml;
+                div_invoice_tip.id = "invoice_tip"
+                document.body.appendChild(div_invoice_tip)
+                return
+            }
+            window.open("/front/order/check_invoice/" + orderCode, '_self');
+        }
     </script>
     </script>
 </body>
 </body>
 </html>
 </html>

+ 357 - 340
src/web/templates/pc/vip_orderDetail.html

@@ -7,9 +7,9 @@
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <title>订单详情</title>
     <title>订单详情</title>
     <meta content="增值服务" theme="light" name="enable-header"/>
     <meta content="增值服务" theme="light" name="enable-header"/>
-	<script>
-		var myPageNavIsNormal = true;
-	</script>
+    <script>
+        var myPageNavIsNormal = true;
+    </script>
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/course/css/bootstrap.min.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/course/css/bootstrap.min.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/course/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/course/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/course/css/reset_pc.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/course/css/reset_pc.css?v={{Msg "seo" "version"}}">
@@ -17,376 +17,393 @@
     {{include "/common/pnc.html"}}
     {{include "/common/pnc.html"}}
     <link href="{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "vebrsion"}}" rel="stylesheet">
     <link href="{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "vebrsion"}}" rel="stylesheet">
     <link href="{{Msg "seo" "cdn"}}/css/dev2/reset_pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
     <link href="{{Msg "seo" "cdn"}}/css/dev2/reset_pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
-    <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}" />
+    <link rel="stylesheet" type="text/css"
+          href="{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}"/>
     <script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}3"></script>
     <script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}3"></script>
     <!--[if lt IE 9]>
     <!--[if lt IE 9]>
-            <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.3/html5shiv.js"></script>
-            <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
-        <![endif]-->
+    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.3/html5shiv.js"></script>
+    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
+    <![endif]-->
     <style>
     <style>
-		.filter_data p{
-			font-size: 14px;
-			margin-bottom: 10px;
-		}
-		#order_detail {
-		    line-height: 1;
-		    padding-top: 76px;
-		    padding-bottom: 0px !important;
-		    background-color: #fff;
-		}
-        .qxBg{
+        .filter_data p {
+            font-size: 14px;
+            margin-bottom: 10px;
+        }
+
+        #order_detail {
+            line-height: 1;
+            padding-top: 76px;
+            padding-bottom: 0px !important;
+            background-color: #fff;
+        }
+
+        .qxBg {
             border-top: 2px solid #999999;
             border-top: 2px solid #999999;
             background-color: #ececec;
             background-color: #ececec;
         }
         }
-        .qxBgFont{
+
+        .qxBgFont {
             color: #686868;
             color: #686868;
         }
         }
     </style>
     </style>
 </head>
 </head>
 <body>
 <body>
-	{{include "/common/pchead.html"}}
-    <!-- header -->
-    <!-- main  START -->
-    <div class="order_detail" id="order_detail">
-        <div class="w order_crumb">
-            <a href="#" onclick="window.location.href='/front/swordfish/toMyOrder'">我的订单</a><em> > </em>
-            <a href="#" class="active">订单详情</a>
-        </div>
-        <div class="w order_main">
-            <!-- greenBg 为绿色背景及边框 redBg为红色背景及边框 -->
-            <div id="bg" class="o_m_thead greenBg">
-                <p class="order_id"></p>
-                <p class="clearfix order_state">
-                    <!--greenFont为绿色字体 redFont为红色字体 -->
-                    <span class="greenFont hide" id="status_success">已完成</span>
-                    <span class="redFont hide" id="status_wait_pay">待付款</span>
-                    <span class="qxBgFont hide" id="status_cancelled">已取消</span>
+{{include "/common/pchead.html"}}
+<!-- header -->
+<!-- main  START -->
+<div class="order_detail" id="order_detail">
+    <div class="w order_crumb">
+        <a href="#" onclick="window.location.href='/front/swordfish/toMyOrder'">我的订单</a><em> > </em>
+        <a href="#" class="active">订单详情</a>
+    </div>
+    <div class="w order_main">
+        <!-- greenBg 为绿色背景及边框 redBg为红色背景及边框 -->
+        <div id="bg" class="o_m_thead greenBg">
+            <p class="order_id"></p>
+            <p class="clearfix order_state">
+                <!--greenFont为绿色字体 redFont为红色字体 -->
+                <span class="greenFont hide" id="status_success">已完成</span>
+                <span class="redFont hide" id="status_wait_pay">待付款</span>
+                <span class="qxBgFont hide" id="status_cancelled">已取消</span>
 
 
-					<a class="go_pay payOrder" style="display: none;">去支付</a>
+                <a class="go_pay payOrder" style="display: none;">去支付</a>
 
 
-					<!-- 当状态为已完成时显示开发票 或 查看发票 -->
-					<a  class="openinvoice go_pay" style="display: none;">开发票</a>
-					<a  class="lookinvoice go_pay" style="display: none;">查看发票</a>
-                </p>
-            </div>
+                <!-- 当状态为已完成时显示开发票 或 查看发票 -->
+                <a class="openinvoice go_pay" style="display: none;">开发票</a>
+                <a class="lookinvoice go_pay" style="display: none;">查看发票</a>
+            </p>
+        </div>
 
 
-			<!-- ------订单类型为VIP订阅、商机管理时展示的字段 --------->
-			            <div class="o_m_tbody">
-			                <div class="b_list">
-			                    <div class="list_thead">
-			                        <span class="fl">订阅条件</span>
-			                    </div>
-			                    <div class="clearfix list_tbody">
-			                        <div class="filter_data">
-			                            <p><span class="dq_text">区域</span>:<span class="dq"></span></p>
-			                            <p><span class="hy_text">采购单位行业</span>:<span class="hysl"></span></p>
-			                            <p><span class="zq_text">订阅周期</span>:<span class="dyzq"></span><span class="discount-container hide">
+        <!-- ------订单类型为VIP订阅、商机管理时展示的字段 --------->
+        <div class="o_m_tbody">
+            <div class="b_list">
+                <div class="list_thead">
+                    <span class="fl">订阅条件</span>
+                </div>
+                <div class="clearfix list_tbody">
+                    <div class="filter_data">
+                        <p><span class="dq_text">区域</span>:<span class="dq"></span></p>
+                        <p><span class="hy_text">采购单位行业</span>:<span class="hysl"></span></p>
+                        <p><span class="zq_text">订阅周期</span>:<span class="dyzq"></span><span
+                                    class="discount-container hide">
 											    <span>+</span>
 											    <span>+</span>
 											    <span class="highlight-text" style="color: #2cb7ca;">赠送30天</span>
 											    <span class="highlight-text" style="color: #2cb7ca;">赠送30天</span>
 											</span></p>
 											</span></p>
-			                            <p class="yxrq_p"  style="display:none"><span class="yxrq_text">有效日期</span>:<span class="yxrq"></span></p>
-			                        </div>
-			                    </div>
-			                </div>
-			                <div class="b_list">
-			                    <div class="list_thead">
-			                        <span class="fl">订单信息</span>
-			                    </div>
-			                    <div class="clearfix list_tbody">
-			                        <div class="filter_data">
-			                            <p>订单编号:<span class="order_code"></span></p>
-			                            <p>下单时间:<span class="order_time"></span></p>
-			                            <p class="pay_time_p" style="display: none;">支付时间:<span class="pay_time"></span></p>
-			                            <p>产品类型:超级订阅<span class="vip_type"></span></p>
-			                            <p class="pay_way_p" style="display:none">支付方式:<span class="pay_way"></span></p>
-			                            <p class="pay_num_p" style="display:none">支付单号:<span class="pay_num"></span></p>
-			                            <p class="price_p">实付金额:¥<span class="price"></span>元 &nbsp; <span class="valuationList" style="color:#2CB7CA;display:none;cursor:pointer">计费清单</span></p>
-			                        </div>
-			                    </div>
-			                </div>
-			            </div>
+                        <p class="yxrq_p" style="display:none"><span class="yxrq_text">有效日期</span>:<span
+                                    class="yxrq"></span></p>
+                    </div>
+                </div>
+            </div>
+            <div class="b_list">
+                <div class="list_thead">
+                    <span class="fl">订单信息</span>
+                </div>
+                <div class="clearfix list_tbody">
+                    <div class="filter_data">
+                        <p>订单编号:<span class="order_code"></span></p>
+                        <p>下单时间:<span class="order_time"></span></p>
+                        <p class="pay_time_p" style="display: none;">支付时间:<span class="pay_time"></span></p>
+                        <p>产品类型:超级订阅<span class="vip_type"></span></p>
+                        <p class="pay_way_p" style="display:none">支付方式:<span class="pay_way"></span></p>
+                        <p class="pay_num_p" style="display:none">支付单号:<span class="pay_num"></span></p>
+                        <p class="price_p">实付金额:¥<span class="price"></span>元 &nbsp; <span class="valuationList"
+                                                                                           style="color:#2CB7CA;display:none;cursor:pointer">计费清单</span>
+                        </p>
+                    </div>
+                </div>
+            </div>
+        </div>
 
 
     </div>
     </div>
-	<div style="margin-top: 20px;"></div>
+    <div style="margin-top: 20px;"></div>
     <!-- main END -->
     <!-- main END -->
-	{{include "/common/pcbottom.html"}}
-	{{include "/common/baiducc.html"}}
+    {{include "/common/pcbottom.html"}}
+    {{include "/common/baiducc.html"}}
     <script src="{{Msg "seo" "cdn"}}/course/js/jquery-2.1.4.min.js?v={{Msg "seo" "version"}}"></script>
     <script src="{{Msg "seo" "cdn"}}/course/js/jquery-2.1.4.min.js?v={{Msg "seo" "version"}}"></script>
     <script src="{{Msg "seo" "cdn"}}/course/js/bootstrap.min.js?v={{Msg "seo" "version"}}"></script>
     <script src="{{Msg "seo" "cdn"}}/course/js/bootstrap.min.js?v={{Msg "seo" "version"}}"></script>
     <!-- footer -->
     <!-- footer -->
     <script>
     <script>
-        $(function(){
-			$("#public-nav").css("background","#fff");
-			$(".public-nav").css("border-bottom", "1px solid #e0e0e0");
-			$("section[id='drder']").css("padding-top", "80px");
-			haslogin({{.T.logid}});
+        $(function () {
+            $("#public-nav").css("background", "#fff");
+            $(".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/getOrderPayAllMsg",{"orderCode":orderCode},function(r){
-					if(r =='{"error":"需要登录!"}'){
-						location.href = '/';
-					}
-					if (r.success){
-						//订单信息
-						$(".order_code").text(orderCode);
-						var filterObj=JSON.parse(r.data.order.filter);
-						if(r.data.order.create_time) {
-							$(".order_time").text(r.data.order.create_time.replaceAll("-","."));
-						}
-						$(".price").text(r.data.order.original_price/100);
-						//优惠码
-						if(r.data.order.isUsedActiveCode){
-							$(".discount-container").removeClass("hide");
-						}
-						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_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.original_price==0){
-								$(".pay_time_p").css("display","none");
-								$(".vip_type").text("(试用)");
-							}else{
-								$(".pay_num_p").css("display","");
-								if(r.data.transaction_id) $(".pay_num").text(r.data.transaction_id);
-								//发票
-								if(r.data.order.applybill_status==0){
-									$(".openinvoice").css("display","");
-								}else{
-									$(".lookinvoice").css("display","");
-								}
-							}
-						}
-						if(r.data.order.order_status==-2||r.data.order.order_status==-3){
-							$("#status_cancelled").removeClass("hide");
-							$("#bg").addClass("qxBg").removeClass("greenBg");
-						}
-						if(r.data.order.order_status==0){
-							$("#status_wait_pay").removeClass("hide");
-							$("#bg").addClass("redBg").removeClass("greenBg");
-							$(".payOrder").show();
-						}
+            var orderCode = getParam("order_code");
+            $(".order_id").text("订单编号:" + orderCode);
+            $.post("/subscribepay/orderListDetails/getOrderPayAllMsg", {"orderCode": orderCode}, function (r) {
+                if (r == '{"error":"需要登录!"}') {
+                    location.href = '/';
+                }
+                if (r.success) {
+                    //订单信息
+                    $(".order_code").text(orderCode);
+                    var filterObj = JSON.parse(r.data.order.filter);
+                    if (r.data.order.create_time) {
+                        $(".order_time").text(r.data.order.create_time.replaceAll("-", "."));
+                    }
+                    $(".price").text(r.data.order.original_price / 100);
+                    //优惠码
+                    if (r.data.order.isUsedActiveCode) {
+                        $(".discount-container").removeClass("hide");
+                    }
+                    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_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.original_price == 0) {
+                            $(".pay_time_p").css("display", "none");
+                            $(".vip_type").text("(试用)");
+                        } else {
+                            $(".pay_num_p").css("display", "");
+                            if (r.data.transaction_id) $(".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.order_status == -2 || r.data.order.order_status == -3) {
+                        $("#status_cancelled").removeClass("hide");
+                        $("#bg").addClass("qxBg").removeClass("greenBg");
+                    }
+                    if (r.data.order.order_status == 0) {
+                        $("#status_wait_pay").removeClass("hide");
+                        $("#bg").addClass("redBg").removeClass("greenBg");
+                        $(".payOrder").show();
+                    }
 
 
-						//订阅条件
-						if(!$.isEmptyObject(filterObj.newBuyset)){	//p1版本
-							var newbuyset= filterObj.newBuyset;
-							if(newbuyset.areacount==-1){
-								$(".dq").text("全国");
-							}else{
-								var newcitys=newbuyset.newcitys;
-								var scatter=newcitys.length ;//分布
-								var citynum=0;
-								for(var k in newcitys){
-									citynum+=newcitys[k];
-								}
-								if(newbuyset.areacount>0){
-									areaText=newbuyset.areacount+"个省级区域";
-									if(citynum!=0){
-										if(scatter>1){
-											areaText+="、"+citynum+"个地市(分布在"+scatter+"省内)";
-										}else{
-											areaText+="、"+citynum+"个地市";
-										}
-									}
-								}else{
-									if (scatter>1){
-										areaText=citynum+"个地市(分布在"+scatter+"省内)";
-									}else{
-										areaText=citynum+"个地市";
-									}
-								}
-								$(".dq").text(areaText);
-							}
-							if(newbuyset.buyerclasscount!=-1){
-								var hysl = newbuyset.buyerclasscount +"个行业";
-								$(".hysl").html(hysl);
-							}else{
-								$(".hysl").html("全行业");
-							}
-						}else{	//老版本
-							var region_vipArr = filterObj.area;
-							var province_length=0;
-							var city_length=0;
-							if(JSON.stringify(region_vipArr) != JSON.stringify({})){
-								for(i in region_vipArr){
-									if(region_vipArr[i].length==0){
-										province_length++;
-									}else{
-										city_length+=region_vipArr[i].length;
-									}
-								}
-							}else{
-								region_vip="全国";
-							}
-							if((province_length!=0)&&(city_length!=0)){
-							  region_vip=province_length+"个省级区域、"+city_length+"个地市";
-							}else if((province_length==0)&&(city_length!=0)){
-							  region_vip=city_length+"个地市";
-							}else if((province_length!=0)&&(city_length==0)){
-							  region_vip=province_length+"个省级区域";
-							}
-							//行业
-							var industry_vip = filterObj.industry.length;	//数组
-							if(industry_vip==0){
-								industry_vip="全行业";
-							}else{
-								industry_vip=industry_vip+"个行业";
-							}
-							$(".dq").html(region_vip);
-							$(".hysl").html(industry_vip);
-						}
-						//周期
-					   if((r.data.order.vip_starttime!=undefined)&&(r.data.order.vip_endtime!=undefined)){
-							var start_time_vip = r.data.order.vip_starttime;
-							var end_time_vip = r.data.order.vip_endtime;
-							var start_time_arr = start_time_vip.split(" ")[0].split("-")
-							var end_time_arr = end_time_vip.split(" ")[0].split("-")
-							var start_year=start_time_arr[0];
-							var start_month=start_time_arr[1];
-							var end_year=end_time_arr[0];
-							var end_month=end_time_arr[1];
-							var year = 0;
-							var month = 0;
-							if(end_year > start_year){
-								if(end_month > start_month){
-									year = end_year - start_year;
-									month = end_month - start_month;
-								}else{
-									year = end_year - start_year-1;
-									month = 12+Number(end_month)-start_month;
-									if (month==12){
-										year=Number(year)+1;
-										month=0;
-									}
-								}
-							}else if(end_year === start_year){
-								month = end_month - start_month;
-							}
+                    //订阅条件
+                    if (!$.isEmptyObject(filterObj.newBuyset)) {	//p1版本
+                        var newbuyset = filterObj.newBuyset;
+                        if (newbuyset.areacount == -1) {
+                            $(".dq").text("全国");
+                        } else {
+                            var newcitys = newbuyset.newcitys;
+                            var scatter = newcitys.length;//分布
+                            var citynum = 0;
+                            for (var k in newcitys) {
+                                citynum += newcitys[k];
+                            }
+                            if (newbuyset.areacount > 0) {
+                                areaText = newbuyset.areacount + "个省级区域";
+                                if (citynum != 0) {
+                                    if (scatter > 1) {
+                                        areaText += "、" + citynum + "个地市(分布在" + scatter + "省内)";
+                                    } else {
+                                        areaText += "、" + citynum + "个地市";
+                                    }
+                                }
+                            } else {
+                                if (scatter > 1) {
+                                    areaText = citynum + "个地市(分布在" + scatter + "省内)";
+                                } else {
+                                    areaText = citynum + "个地市";
+                                }
+                            }
+                            $(".dq").text(areaText);
+                        }
+                        if (newbuyset.buyerclasscount != -1) {
+                            var hysl = newbuyset.buyerclasscount + "个行业";
+                            $(".hysl").html(hysl);
+                        } else {
+                            $(".hysl").html("全行业");
+                        }
+                    } else {	//老版本
+                        var region_vipArr = filterObj.area;
+                        var province_length = 0;
+                        var city_length = 0;
+                        if (JSON.stringify(region_vipArr) != JSON.stringify({})) {
+                            for (i in region_vipArr) {
+                                if (region_vipArr[i].length == 0) {
+                                    province_length++;
+                                } else {
+                                    city_length += region_vipArr[i].length;
+                                }
+                            }
+                        } else {
+                            region_vip = "全国";
+                        }
+                        if ((province_length != 0) && (city_length != 0)) {
+                            region_vip = province_length + "个省级区域、" + city_length + "个地市";
+                        } else if ((province_length == 0) && (city_length != 0)) {
+                            region_vip = city_length + "个地市";
+                        } else if ((province_length != 0) && (city_length == 0)) {
+                            region_vip = province_length + "个省级区域";
+                        }
+                        //行业
+                        var industry_vip = filterObj.industry.length;	//数组
+                        if (industry_vip == 0) {
+                            industry_vip = "全行业";
+                        } else {
+                            industry_vip = industry_vip + "个行业";
+                        }
+                        $(".dq").html(region_vip);
+                        $(".hysl").html(industry_vip);
+                    }
+                    //周期
+                    if ((r.data.order.vip_starttime != undefined) && (r.data.order.vip_endtime != undefined)) {
+                        var start_time_vip = r.data.order.vip_starttime;
+                        var end_time_vip = r.data.order.vip_endtime;
+                        var start_time_arr = start_time_vip.split(" ")[0].split("-")
+                        var end_time_arr = end_time_vip.split(" ")[0].split("-")
+                        var start_year = start_time_arr[0];
+                        var start_month = start_time_arr[1];
+                        var end_year = end_time_arr[0];
+                        var end_month = end_time_arr[1];
+                        var year = 0;
+                        var month = 0;
+                        if (end_year > start_year) {
+                            if (end_month > start_month) {
+                                year = end_year - start_year;
+                                month = end_month - start_month;
+                            } else {
+                                year = end_year - start_year - 1;
+                                month = 12 + Number(end_month) - start_month;
+                                if (month == 12) {
+                                    year = Number(year) + 1;
+                                    month = 0;
+                                }
+                            }
+                        } else if (end_year === start_year) {
+                            month = end_month - start_month;
+                        }
 
 
-							if(year != 0 && month !=0){
-								$(".dyzq").text(year+"年"+month+"个月");
-							}else if(year !== 0&& month ===0){
-								$(".dyzq").text(year+"年");
-							}else if(year === 0&& month !==0){
-								$(".dyzq").text(month+"个月");
-							}
-							if(filterObj.cycleunit==1){
-								$(".dyzq").text(filterObj.cyclecount+"年")
-							}else if(filterObj.cycleunit==2){
-							   $(".dyzq").text(filterObj.cyclecount+"个月")
-							}else if(filterObj.cycleunit==3){
-							   $(".dyzq").text(filterObj.cyclecount+"天")
-							}
-					   }else{
-							//未支付
-						  if(filterObj.cycleunit==1){
-							$(".dyzq").text(filterObj.cyclecount+"年")
-						  }else if(filterObj.cycleunit==2){
-						   $(".dyzq").text(filterObj.cyclecount+"个月")
-						  }else if(filterObj.cycleunit==3){
-							   $(".dyzq").text(filterObj.cyclecount+"天")
-						  }
-					   }
-					   if (r.data.order.order_status==1){
-							//有效周期
-							$(".yxrq_p").css("display","");
-							 //有效日期
-							if(r.data.time.vip_starttime&&r.data.time.vip_endtime){
-								var vip_starttime=r.data.time.vip_starttime+"";
-								var vip_endtime=r.data.time.vip_endtime+"";
-								vip_starttime=vip_starttime.split(" ")[0].replace(/-/g,".");
-								vip_endtime=vip_endtime.split(" ")[0].replace(/-/g,".");
-								var serviceTime=vip_starttime+" - "+vip_endtime;
-								$(".yxrq").text(serviceTime)
-							}
-						}
-						//判断是升级或续费
-						if(r.data.order.vip_type==1){
-							$(".vip_type").text("(续费)");
-							$(".dq_text").text("续费区域");
-							$(".hy_text").text("续费采购单位行业");
-							$(".zq_text").text("续费周期");
-						}else if(r.data.order.vip_type==2){
-							$(".vip_type").text("(升级)");
-							if(filterObj.cycleunit==1){
-								$(".dyzq").text(filterObj.cyclecount+"年")
-							}else if(filterObj.cycleunit==2){
-								$(".dyzq").text(filterObj.cyclecount+"个月")
-							}else if(filterObj.cycleunit==3){
-								$(".dyzq").text(filterObj.cyclecount+"天")
-							}else if (filterObj.cycleunit==-1){
-								$(".dyzq").text("不延期");
-							}
-							//续费升级逻辑修改后判断是否不延期
-							if(filterObj.cycleunit==0&&filterObj.cyclecount==0){
-								$(".dyzq").text("不延期");
-							}
-							$(".dq_text").text("升级区域");
-							$(".hy_text").text("升级采购单位行业");
-							$(".zq_text").text("延长周期");
-						}
+                        if (year != 0 && month != 0) {
+                            $(".dyzq").text(year + "年" + month + "个月");
+                        } else if (year !== 0 && month === 0) {
+                            $(".dyzq").text(year + "年");
+                        } else if (year === 0 && month !== 0) {
+                            $(".dyzq").text(month + "个月");
+                        }
+                        if (filterObj.cycleunit == 1) {
+                            $(".dyzq").text(filterObj.cyclecount + "年")
+                        } else if (filterObj.cycleunit == 2) {
+                            $(".dyzq").text(filterObj.cyclecount + "个月")
+                        } else if (filterObj.cycleunit == 3) {
+                            $(".dyzq").text(filterObj.cyclecount + "天")
+                        }
+                    } else {
+                        //未支付
+                        if (filterObj.cycleunit == 1) {
+                            $(".dyzq").text(filterObj.cyclecount + "年")
+                        } else if (filterObj.cycleunit == 2) {
+                            $(".dyzq").text(filterObj.cyclecount + "个月")
+                        } else if (filterObj.cycleunit == 3) {
+                            $(".dyzq").text(filterObj.cyclecount + "天")
+                        }
+                    }
+                    if (r.data.order.order_status == 1) {
+                        //有效周期
+                        $(".yxrq_p").css("display", "");
+                        //有效日期
+                        if (r.data.time.vip_starttime && r.data.time.vip_endtime) {
+                            var vip_starttime = r.data.time.vip_starttime + "";
+                            var vip_endtime = r.data.time.vip_endtime + "";
+                            vip_starttime = vip_starttime.split(" ")[0].replace(/-/g, ".");
+                            vip_endtime = vip_endtime.split(" ")[0].replace(/-/g, ".");
+                            var serviceTime = vip_starttime + " - " + vip_endtime;
+                            $(".yxrq").text(serviceTime)
+                        }
+                    }
+                    //判断是升级或续费
+                    if (r.data.order.vip_type == 1) {
+                        $(".vip_type").text("(续费)");
+                        $(".dq_text").text("续费区域");
+                        $(".hy_text").text("续费采购单位行业");
+                        $(".zq_text").text("续费周期");
+                    } else if (r.data.order.vip_type == 2) {
+                        $(".vip_type").text("(升级)");
+                        if (filterObj.cycleunit == 1) {
+                            $(".dyzq").text(filterObj.cyclecount + "年")
+                        } else if (filterObj.cycleunit == 2) {
+                            $(".dyzq").text(filterObj.cyclecount + "个月")
+                        } else if (filterObj.cycleunit == 3) {
+                            $(".dyzq").text(filterObj.cyclecount + "天")
+                        } else if (filterObj.cycleunit == -1) {
+                            $(".dyzq").text("不延期");
+                        }
+                        //续费升级逻辑修改后判断是否不延期
+                        if (filterObj.cycleunit == 0 && filterObj.cyclecount == 0) {
+                            $(".dyzq").text("不延期");
+                        }
+                        $(".dq_text").text("升级区域");
+                        $(".hy_text").text("升级采购单位行业");
+                        $(".zq_text").text("延长周期");
+                    }
 
 
-						//计价清单
-						var filterObj=JSON.parse(r.data.order.filter);
-						var upgradeSubtotail=filterObj.upgradeSubtotail;
-						if (upgradeSubtotail){	//有则显示
-							$(".valuationList").css("display","");
-							$(".valuationList").on("click",function(){
-								window.location.href="/front/order/valuationList/"+orderCode;
-							})
-						}
-					}
-			})
+                    //计价清单
+                    var filterObj = JSON.parse(r.data.order.filter);
+                    var upgradeSubtotail = filterObj.upgradeSubtotail;
+                    if (upgradeSubtotail) {	//有则显示
+                        $(".valuationList").css("display", "");
+                        $(".valuationList").on("click", function () {
+                            window.location.href = "/front/order/valuationList/" + orderCode;
+                        })
+                    }
+                }
+            })
 
 
 
 
-			$(".openinvoice").on("click",function(){
-				$.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');
-					}
-				})
-			})
-			$(".lookinvoice").on("click",function(){
-				window.open("/front/order/check_invoice/"+orderCode,'_self');
-			})
-			$(".payOrder").on("click", function(){
-				location.href = "/front/subvip/orderPay/"+ orderCode;
-			})
+            $(".openinvoice").on("click", function () {
+                $.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 () {
+                location.href = "/front/subvip/orderPay/" + orderCode;
+            })
         })
         })
 
 
 
 
-
-
-		/******* 获取url参数(正则)********/
-		function getParam(name) {
-		    var search = document.location.search;
-		    // alert(search);
-		    var pattern = new RegExp("[?&]" + name + "\=([^&]+)", "g");
-		    var matcher = pattern.exec(search);
-		    var items = null;
-		    if (null != matcher) {
-		        try {
-		            items = decodeURIComponent(decodeURIComponent(matcher[1]));
-		        } catch (e) {
-		            try {
-		                items = decodeURIComponent(matcher[1]);
-		            } catch (e) {
-		                items = matcher[1];
-		            }
-		        }
-		    }
-		    return items;
-		};
+        /******* 获取url参数(正则)********/
+        function getParam(name) {
+            var search = document.location.search;
+            // alert(search);
+            var pattern = new RegExp("[?&]" + name + "\=([^&]+)", "g");
+            var matcher = pattern.exec(search);
+            var items = null;
+            if (null != matcher) {
+                try {
+                    items = decodeURIComponent(decodeURIComponent(matcher[1]));
+                } catch (e) {
+                    try {
+                        items = decodeURIComponent(matcher[1]);
+                    } catch (e) {
+                        items = matcher[1];
+                    }
+                }
+            }
+            return items;
+        };
+        //查看发票
+        function checkinvoice(flag, orderCode) {
+            if (flag === 2) {
+                var showHtml = '<div style="width: 100%;height: 100%;z-index: 999; position: absolute;top: 0;background: rgba(0, 0, 0, 0.65);">   <div style="position: fixed;z-index: 9999;width: 540px;height: 262px;left: 50%;top: 30%;margin-left: -270px;background-color: #fff;border-radius: 6px;padding: 32px;display: flex;flex-direction: column;justify-items: center;align-items: center;">       <div class="invoice_title" style="color: #1D1D1D;font-size: 18px;line-height: 28px;">提示</div>       <div class="invoice_body"            style="height: 78px;margin: 20px 0px;font-size: 14px;line-height: 24px;text-align: center;">           您已开具发票<br>           如有问题请联系客服<br>           400-108-6670       </div>       <div class="invoice_control"            style="width: 132px;height: 36px;text-align: center;background: #2CB7CA;border-radius: 6px;font-size: 16px;line-height: 36px;color: #FFFFFF;cursor: pointer;"            onclick="document.querySelector(\'#invoice_tip\').remove()"       >           我知道了       </div>   </div>\n</div>'
+                var div_invoice_tip = document.createElement('div');
+                div_invoice_tip.innerHTML = showHtml;
+                div_invoice_tip.id = "invoice_tip"
+                document.body.appendChild(div_invoice_tip)
+                return
+            }
+            window.open("/front/order/check_invoice/" + orderCode, '_self');
+        }
     </script>
     </script>
 </body>
 </body>
 </html>
 </html>